Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stitches/core

Package Overview
Dependencies
Maintainers
2
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stitches/core - npm Package Compare versions

Comparing version 0.0.3-canary.0 to 0.0.3-canary.1

49

dist/core.cjs.dev.js

@@ -210,3 +210,4 @@ 'use strict';

var setChainedValue = function setChainedValue(existingValue, value) {
return existingValue ? "".concat(existingValue, ",").concat(value) : value;
var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ',';
return existingValue ? "".concat(existingValue).concat(separator).concat(value) : value;
};

@@ -520,2 +521,18 @@

};
var textDecoration = createPropertyParser(function (tokens, css, value) {
if (matchString(value, /unset/)) {
css.textDecorationStyle = value;
css.textDecorationLine = value;
css.textDecorationColor = value;
css.textDecorationThickness = value;
} else if (matchString(value, /solid|double|dotted|dashed|wavy/)) {
css.textDecorationStyle = value;
} else if (matchString(value, /none|underline|overline|line-through|blink/)) {
css.textDecorationLine = setChainedValue(css.textDecorationLine, value, ' ');
} else if (matchString(value, unitMatch) || matchString(value, /auto|from-font/)) {
css.textDecorationThickness = value;
} else {
css.textDecorationColor = tokens.colors[value] || value;
}
});

@@ -653,3 +670,3 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

tags: tags,
sheets: ['__variables__', MAIN_BREAKPOINT_ID].concat(Object.keys(screens)).reduce(function (aggr, key, index) {
sheets: ['__variables__', '__keyframes__', MAIN_BREAKPOINT_ID].concat(Object.keys(screens)).reduce(function (aggr, key, index) {
var style = existingStyles[index];

@@ -671,3 +688,3 @@

tags: tags,
sheets: ['__variables__', MAIN_BREAKPOINT_ID].concat(Object.keys(screens)).reduce(function (aggr, key) {
sheets: ['__variables__', '__keyframes__', MAIN_BREAKPOINT_ID].concat(Object.keys(screens)).reduce(function (aggr, key) {
aggr[key] = enhanceSheet({

@@ -734,3 +751,4 @@ content: '',

borderTop: borderTop,
borderRight: borderRight
borderRight: borderRight,
textDecoration: textDecoration
};

@@ -907,3 +925,3 @@ var getVendorPrefixAndProps = function getVendorPrefixAndProps(env) {

// Resolve the util from the util function:
var resolvedUtils = config.utils[key](config)(val);
var resolvedUtils = config.utils[key](val, config);
processStyleObject(resolvedUtils, config, valueMiddleware, _toConsumableArray(currentNestingPath), false);

@@ -1127,3 +1145,5 @@ continue;

var createCss = function createCss(_config) {
var env = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : typeof window === 'undefined' ? null : window;
var _window;
var env = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : typeof window === 'undefined' || ((_window = window) === null || _window === void 0 ? void 0 : _window.Deno) ? null : window;
// pre-checked config to avoid checking these all the time

@@ -1202,3 +1222,3 @@ // tslint:disable-next-line

var themeToString = createThemeToString(classPrefix, sheets.__variables__);
var keyframesToString = createKeyframesToString(sheets[MAIN_BREAKPOINT_ID]);
var keyframesToString = createKeyframesToString(sheets.__keyframes__);

@@ -1386,2 +1406,3 @@ var compose = function compose() {

cssInstance.global = function (definitions) {
var atoms = [];
processStyleObject(definitions, config, function (prop, value, path) {

@@ -1394,3 +1415,3 @@ var _resolveBreakpointAnd2 = resolveBreakpointAndSelectorAndInlineMedia(path, config),

if (!nestingPath.length) {
throw new Error('Global styles need to be nested');
throw new Error('Global styles need to be nested within a selector');
} // Create a global atom and call toString() on it directly to inject it

@@ -1400,4 +1421,7 @@ // as global atoms don't generate class names of their own

createAtom(prop, value, breakpoint, nestingPath, inlineMediaQueries, true).toString();
atoms.push(createAtom(prop, value, breakpoint, nestingPath, inlineMediaQueries, true));
});
return function () {
return compose.apply(void 0, atoms).toString();
};
};

@@ -1423,2 +1447,3 @@

});
cssRule += "}";
var hash = hashString(cssRule); // Check if an atom exist with the same hash and return it if so

@@ -1448,3 +1473,5 @@

for (var sheet in sheets) {
sheets[sheet].cssRules.length = 0;
if (sheet !== '__keyframes__') {
sheets[sheet].cssRules.length = 0;
}
}

@@ -1475,3 +1502,3 @@

return aggr.concat("/* STITCHES:".concat(key, " */\n").concat(sheets[key].cssRules.join('\n')));
}, ["/* STITCHES:__variables__ */\n".concat(sheets.__variables__.cssRules.join('\n')), "/* STITCHES */\n".concat(sheets[MAIN_BREAKPOINT_ID].cssRules.join('\n'))])
}, ["/* STITCHES:__variables__ */\n".concat(sheets.__variables__.cssRules.join('\n')), "/* STITCHES:__keyframes__ */\n".concat(sheets.__keyframes__.cssRules.join('\n')), "/* STITCHES */\n".concat(sheets[MAIN_BREAKPOINT_ID].cssRules.join('\n'))])
};

@@ -1478,0 +1505,0 @@ };

@@ -155,3 +155,4 @@ "use strict";

}, setChainedValue = function(existingValue, value) {
return existingValue ? "".concat(existingValue, ",").concat(value) : value;
var separator = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : ",";
return existingValue ? "".concat(existingValue).concat(separator).concat(value) : value;
}, emptyTokens = {};

@@ -283,3 +284,6 @@

};
};
}, textDecoration = createPropertyParser((function(tokens, css, value) {
matchString(value, /unset/) ? (css.textDecorationStyle = value, css.textDecorationLine = value,
css.textDecorationColor = value, css.textDecorationThickness = value) : matchString(value, /solid|double|dotted|dashed|wavy/) ? css.textDecorationStyle = value : matchString(value, /none|underline|overline|line-through|blink/) ? css.textDecorationLine = setChainedValue(css.textDecorationLine, value, " ") : matchString(value, unitMatch) || matchString(value, /auto|from-font/) ? css.textDecorationThickness = value : css.textDecorationColor = tokens.colors[value] || value;
}));

@@ -430,3 +434,3 @@ function ownKeys(object, enumerableOnly) {

tags: tags,
sheets: [ "__variables__", MAIN_BREAKPOINT_ID ].concat(Object.keys(screens)).reduce((function(aggr, key, index) {
sheets: [ "__variables__", "__keyframes__", MAIN_BREAKPOINT_ID ].concat(Object.keys(screens)).reduce((function(aggr, key, index) {
var style = existingStyles[index];

@@ -440,3 +444,3 @@ return style || (style = env.document.createElement("style"), head.appendChild(style)),

tags: tags,
sheets: [ "__variables__", MAIN_BREAKPOINT_ID ].concat(Object.keys(screens)).reduce((function(aggr, key) {
sheets: [ "__variables__", "__keyframes__", MAIN_BREAKPOINT_ID ].concat(Object.keys(screens)).reduce((function(aggr, key) {
return aggr[key] = enhanceSheet({

@@ -495,3 +499,4 @@ content: "",

borderTop: borderTop,
borderRight: borderRight
borderRight: borderRight,
textDecoration: textDecoration
}, getVendorPrefixAndProps = function(env) {

@@ -658,3 +663,3 @@ var styles = env.getComputedStyle(env.document.documentElement), vendorProps = Array.from(styles).filter((function(prop) {

if ("object" !== _typeof(val) || isSpecificityProp || isUtilProp) if (isUtilProp) {
var resolvedUtils = config.utils[key](config)(val);
var resolvedUtils = config.utils[key](val, config);
processStyleObject(resolvedUtils, config, valueMiddleware, _toConsumableArray(currentNestingPath), !1);

@@ -750,3 +755,3 @@ } else if (isSpecificityProp) {

}, createCss = function(_config) {
var env = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "undefined" == typeof window ? null : window, config = Object.assign({
var _window, env = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "undefined" == typeof window || (null === (_window = window) || void 0 === _window ? void 0 : _window.Deno) ? null : window, config = Object.assign({
tokens: {},

@@ -787,3 +792,3 @@ utils: {},

}
var toString = env ? createToString(sheets, config.breakpoints, cssClassnameProvider, preInjectedRules) : createServerToString(sheets, config.breakpoints, cssClassnameProvider), themeToString = createThemeToString(classPrefix, sheets.__variables__), keyframesToString = createKeyframesToString(sheets[MAIN_BREAKPOINT_ID]), compose = function() {
var toString = env ? createToString(sheets, config.breakpoints, cssClassnameProvider, preInjectedRules) : createServerToString(sheets, config.breakpoints, cssClassnameProvider), themeToString = createThemeToString(classPrefix, sheets.__variables__), keyframesToString = createKeyframesToString(sheets.__keyframes__), compose = function() {
for (var map = new Map, _len = arguments.length, atoms = new Array(_len), _key = 0; _key < _len; _key++) atoms[_key] = arguments[_key];

@@ -843,7 +848,10 @@ return composeIntoMap(map, atoms), _defineProperty$1({

}, cssInstance.global = function(definitions) {
processStyleObject(definitions, config, (function(prop, value, path) {
var atoms = [];
return processStyleObject(definitions, config, (function(prop, value, path) {
var _resolveBreakpointAnd2 = resolveBreakpointAndSelectorAndInlineMedia(path, config), nestingPath = _resolveBreakpointAnd2.nestingPath, breakpoint = _resolveBreakpointAnd2.breakpoint, inlineMediaQueries = _resolveBreakpointAnd2.inlineMediaQueries;
if (!nestingPath.length) throw new Error("Global styles need to be nested");
createAtom(prop, value, breakpoint, nestingPath, inlineMediaQueries, !0).toString();
}));
if (!nestingPath.length) throw new Error("Global styles need to be nested within a selector");
atoms.push(createAtom(prop, value, breakpoint, nestingPath, inlineMediaQueries, !0));
})), function() {
return compose.apply(void 0, atoms).toString();
};
}, cssInstance.keyframes = function(definition) {

@@ -856,3 +864,3 @@ var cssRule = "", currentTimeProp = "";

}));
var hash = hashString(cssRule), cachedAtom = keyFramesCache.get(hash);
var hash = hashString(cssRule += "}"), cachedAtom = keyFramesCache.get(hash);
if (cachedAtom) return cachedAtom;

@@ -867,3 +875,3 @@ cssRule = "@keyframes ".concat(hash, " {").concat(cssRule, "}");

}, cssInstance.getStyles = function(cb) {
for (var sheet in sheets) sheets[sheet].cssRules.length = 0;
for (var sheet in sheets) "__keyframes__" !== sheet && (sheets[sheet].cssRules.length = 0);
return baseTokens && sheets.__variables__.insertRule(baseTokens), toString = createServerToString(sheets, config.breakpoints, cssClassnameProvider),

@@ -881,3 +889,3 @@ keyframesToString = createKeyframesToString(sheets[MAIN_BREAKPOINT_ID]), themeToString = createThemeToString(classPrefix, sheets.__variables__),

return aggr.concat("/* STITCHES:".concat(key, " */\n").concat(sheets[key].cssRules.join("\n")));
}), [ "/* STITCHES:__variables__ */\n".concat(sheets.__variables__.cssRules.join("\n")), "/* STITCHES */\n".concat(sheets[MAIN_BREAKPOINT_ID].cssRules.join("\n")) ])
}), [ "/* STITCHES:__variables__ */\n".concat(sheets.__variables__.cssRules.join("\n")), "/* STITCHES:__keyframes__ */\n".concat(sheets.__keyframes__.cssRules.join("\n")), "/* STITCHES */\n".concat(sheets[MAIN_BREAKPOINT_ID].cssRules.join("\n")) ])
};

@@ -884,0 +892,0 @@ }, env && hotReloadingCache.set(prefix, cssInstance), cssInstance;

@@ -206,3 +206,4 @@ var tokenTypes = ['colors', 'space', 'fontSizes', 'fonts', 'fontWeights', 'lineHeights', 'letterSpacings', 'sizes', 'borderWidths', 'borderStyles', 'radii', 'shadows', 'zIndices', 'transitions']; // Note: when running Jest tests, make sure that the test file is running in node env

var setChainedValue = function setChainedValue(existingValue, value) {
return existingValue ? "".concat(existingValue, ",").concat(value) : value;
var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ',';
return existingValue ? "".concat(existingValue).concat(separator).concat(value) : value;
};

@@ -516,2 +517,18 @@

};
var textDecoration = createPropertyParser(function (tokens, css, value) {
if (matchString(value, /unset/)) {
css.textDecorationStyle = value;
css.textDecorationLine = value;
css.textDecorationColor = value;
css.textDecorationThickness = value;
} else if (matchString(value, /solid|double|dotted|dashed|wavy/)) {
css.textDecorationStyle = value;
} else if (matchString(value, /none|underline|overline|line-through|blink/)) {
css.textDecorationLine = setChainedValue(css.textDecorationLine, value, ' ');
} else if (matchString(value, unitMatch) || matchString(value, /auto|from-font/)) {
css.textDecorationThickness = value;
} else {
css.textDecorationColor = tokens.colors[value] || value;
}
});

@@ -649,3 +666,3 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

tags: tags,
sheets: ['__variables__', MAIN_BREAKPOINT_ID].concat(Object.keys(screens)).reduce(function (aggr, key, index) {
sheets: ['__variables__', '__keyframes__', MAIN_BREAKPOINT_ID].concat(Object.keys(screens)).reduce(function (aggr, key, index) {
var style = existingStyles[index];

@@ -667,3 +684,3 @@

tags: tags,
sheets: ['__variables__', MAIN_BREAKPOINT_ID].concat(Object.keys(screens)).reduce(function (aggr, key) {
sheets: ['__variables__', '__keyframes__', MAIN_BREAKPOINT_ID].concat(Object.keys(screens)).reduce(function (aggr, key) {
aggr[key] = enhanceSheet({

@@ -730,3 +747,4 @@ content: '',

borderTop: borderTop,
borderRight: borderRight
borderRight: borderRight,
textDecoration: textDecoration
};

@@ -903,3 +921,3 @@ var getVendorPrefixAndProps = function getVendorPrefixAndProps(env) {

// Resolve the util from the util function:
var resolvedUtils = config.utils[key](config)(val);
var resolvedUtils = config.utils[key](val, config);
processStyleObject(resolvedUtils, config, valueMiddleware, _toConsumableArray(currentNestingPath), false);

@@ -1123,3 +1141,5 @@ continue;

var createCss = function createCss(_config) {
var env = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : typeof window === 'undefined' ? null : window;
var _window;
var env = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : typeof window === 'undefined' || ((_window = window) === null || _window === void 0 ? void 0 : _window.Deno) ? null : window;
// pre-checked config to avoid checking these all the time

@@ -1198,3 +1218,3 @@ // tslint:disable-next-line

var themeToString = createThemeToString(classPrefix, sheets.__variables__);
var keyframesToString = createKeyframesToString(sheets[MAIN_BREAKPOINT_ID]);
var keyframesToString = createKeyframesToString(sheets.__keyframes__);

@@ -1382,2 +1402,3 @@ var compose = function compose() {

cssInstance.global = function (definitions) {
var atoms = [];
processStyleObject(definitions, config, function (prop, value, path) {

@@ -1390,3 +1411,3 @@ var _resolveBreakpointAnd2 = resolveBreakpointAndSelectorAndInlineMedia(path, config),

if (!nestingPath.length) {
throw new Error('Global styles need to be nested');
throw new Error('Global styles need to be nested within a selector');
} // Create a global atom and call toString() on it directly to inject it

@@ -1396,4 +1417,7 @@ // as global atoms don't generate class names of their own

createAtom(prop, value, breakpoint, nestingPath, inlineMediaQueries, true).toString();
atoms.push(createAtom(prop, value, breakpoint, nestingPath, inlineMediaQueries, true));
});
return function () {
return compose.apply(void 0, atoms).toString();
};
};

@@ -1419,2 +1443,3 @@

});
cssRule += "}";
var hash = hashString(cssRule); // Check if an atom exist with the same hash and return it if so

@@ -1444,3 +1469,5 @@

for (var sheet in sheets) {
sheets[sheet].cssRules.length = 0;
if (sheet !== '__keyframes__') {
sheets[sheet].cssRules.length = 0;
}
}

@@ -1471,3 +1498,3 @@

return aggr.concat("/* STITCHES:".concat(key, " */\n").concat(sheets[key].cssRules.join('\n')));
}, ["/* STITCHES:__variables__ */\n".concat(sheets.__variables__.cssRules.join('\n')), "/* STITCHES */\n".concat(sheets[MAIN_BREAKPOINT_ID].cssRules.join('\n'))])
}, ["/* STITCHES:__variables__ */\n".concat(sheets.__variables__.cssRules.join('\n')), "/* STITCHES:__keyframes__ */\n".concat(sheets.__keyframes__.cssRules.join('\n')), "/* STITCHES */\n".concat(sheets[MAIN_BREAKPOINT_ID].cssRules.join('\n'))])
};

@@ -1474,0 +1501,0 @@ };

@@ -7,3 +7,8 @@ import { ITokensDefinition, TConfig, TCss } from './types';

export declare const hotReloadingCache: Map<string, any>;
declare global {
interface Window {
Deno: any;
}
}
export declare const createTokens: <T extends ITokensDefinition>(tokens: T) => T;
export declare const createCss: <T extends TConfig<false>>(_config: T, env?: Window | null) => TCss<T>;

@@ -19,1 +19,2 @@ export declare const background: (tokens: any, value: any) => {};

};
export declare const textDecoration: (tokens: any, value: any) => {};

@@ -1,2 +0,2 @@

import { Color, LineStyle, LineWidth, Properties } from './css-types';
import { Color, LineStyle, LineWidth, Properties, MarginProperty, MarginTopProperty, MarginLeftProperty, MarginRightProperty, MarginBottomProperty, PaddingProperty, PaddingTopProperty, PaddingLeftProperty, PaddingRightProperty, PaddingBottomProperty, GridGapProperty, GridColumnGapProperty, GridRowGapProperty, FontSizeProperty, BorderColorProperty, BorderTopColorProperty, BorderLeftColorProperty, BorderRightColorProperty, BorderBottomColorProperty, FontFamilyProperty, FontWeightProperty, LineHeightProperty, LetterSpacingProperty, FlexBasisProperty, WidthProperty, HeightProperty, MinWidthProperty, MaxWidthProperty, MinHeightProperty, MaxHeightProperty, BorderWidthProperty, BorderTopWidthProperty, BorderLeftWidthProperty, BorderRightWidthProperty, BorderBottomWidthProperty, BorderStyleProperty, BorderTopStyleProperty, BorderLeftStyleProperty, BorderRightStyleProperty, BorderBottomStyleProperty, BorderRadiusProperty, BorderTopLeftRadiusProperty, BorderTopRightRadiusProperty, BorderBottomRightRadiusProperty, BorderBottomLeftRadiusProperty, TextShadowProperty, ZIndexProperty, InsetProperty, InsetBlockProperty, InsetBlockEndProperty, InsetBlockStartProperty, InsetInlineEndProperty, InsetInlineStartProperty, MarginInlineEndProperty, MarginInlineProperty, MarginInlineStartProperty, MarginBlockProperty, MarginBlockEndProperty, MarginBlockStartProperty, PaddingInlineProperty, PaddingInlineEndProperty, PaddingInlineStartProperty, PaddingBlockProperty, PaddingBlockEndProperty, PaddingBlockStartProperty, TopProperty, RightProperty, BottomProperty, LeftProperty, BackgroundColorProperty, CaretColorProperty, ColumnRuleColorProperty, OutlineColorProperty, FillProperty, StrokeProperty, BlockSizeProperty, MinBlockSizeProperty, MaxBlockSizeProperty, InlineSizeProperty, MinInlineSizeProperty, MaxInlineSizeProperty } from './css-types';
export interface IBreakpoints {

@@ -39,13 +39,19 @@ [key: string]: (css: string) => string;

};
export declare type TRecursiveCss<T extends TConfig> = TTopCss<T> | {
[selector: string]: TRecursiveCss<T>;
export declare type TRecursiveCss<T extends TConfig, D = TFlatCSS<T>> = (D | {
[pseudo: string]: (D | {
[pseudo: string]: (D | {
[pseudo: string]: D;
}) & D;
}) & D;
}) & D;
export declare type TFlatCSS<T extends TConfig> = {
[K in keyof Properties]?: K extends keyof ICssPropToToken<T> ? T extends {
strict: true;
} ? ICssPropToToken<T>[K] : ICssPropToToken<T>[K] | Properties[K] : Properties[K];
};
export declare type TFlatCSS<T extends TConfig, D = {
[K in keyof Properties]?: K extends keyof ICssPropToToken<T> ? ICssPropToToken<T>[K] | Properties[K] : Properties[K];
}> = D;
export declare type TFlatUtils<T extends TConfig, UT = {
[U in keyof T['utils']]?: T['utils'][U] extends TUtility<any, any> ? ReturnType<T['utils'][U]> extends (arg: infer A) => {} ? A : never : never;
[U in keyof T['utils']]?: T['utils'][U] extends TUtility<any, any> ? T['utils'][U] extends (arg: infer A, config: T) => {} ? A : never : never;
}> = UT;
export declare type TTopUtils<T extends TConfig> = {
[U in keyof T['utils']]?: T['utils'][U] extends TUtility<any, any> ? ReturnType<T['utils'][U]> extends (arg: infer A) => {} ? A : never : never;
[U in keyof T['utils']]?: T['utils'][U] extends TUtility<any, any> ? T['utils'][U] extends (arg: infer A, config: T) => {} ? A : never : never;
};

@@ -55,93 +61,93 @@ export declare type TRecursiveUtils<T extends TConfig> = TTopUtils<T> | {

};
export declare type TUtility<A extends any, T extends TConfig> = (config: T) => (arg: A) => TRecursiveCss<T>;
export declare type TUtility<A extends any, T extends TConfig> = (arg: A, config: T) => TRecursiveCss<T>;
export declare type ICssPropToToken<T extends TConfig> = T['tokens'] extends object ? {
gap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
gridGap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
columnGap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
gridColumnGap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
rowGap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
gridRowGap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
inset: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
insetBlock: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
insetBlockEnd: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
insetBlockStart: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
insetInline: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
insetInlineEnd: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
insetInlineStart: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
margin: T['tokens']['space'] extends object ? keyof T['tokens']['space'] | [keyof T['tokens']['space'], keyof T['tokens']['space']] | [keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space']] | [keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space']] : never;
marginTop: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
marginRight: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
marginBottom: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
marginLeft: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
marginInline: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
marginInlineEnd: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
marginInlineStart: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
marginBlock: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
marginBlockEnd: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
marginBlockStart: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
padding: T['tokens']['space'] extends object ? keyof T['tokens']['space'] | [keyof T['tokens']['space'], keyof T['tokens']['space']] | [keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space']] | [keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space']] : never;
paddingTop: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
paddingRight: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
paddingBottom: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
paddingLeft: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
paddingInline: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
paddingInlineEnd: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
paddingInlineStart: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
paddingBlock: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
paddingBlockEnd: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
paddingBlockStart: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
top: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
right: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
bottom: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
left: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never;
fontSize: T['tokens']['fontSizes'] extends object ? keyof T['tokens']['fontSizes'] : never;
backgroundColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
gap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : GridGapProperty<never>;
gridGap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : GridGapProperty<never>;
columnGap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : GridColumnGapProperty<never>;
gridColumnGap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : GridColumnGapProperty<never>;
rowGap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : GridRowGapProperty<never>;
gridRowGap: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : GridRowGapProperty<never>;
inset: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : InsetProperty<never>;
insetBlock: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : InsetBlockProperty<never>;
insetBlockEnd: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : InsetBlockEndProperty<never>;
insetBlockStart: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : InsetBlockStartProperty<never>;
insetInline: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : InsetInlineEndProperty<never>;
insetInlineEnd: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : InsetInlineEndProperty<never>;
insetInlineStart: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : InsetInlineStartProperty<never>;
margin: T['tokens']['space'] extends object ? keyof T['tokens']['space'] | [keyof T['tokens']['space'], keyof T['tokens']['space']] | [keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space']] | [keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space']] : MarginProperty<never>;
marginTop: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : MarginTopProperty<never>;
marginRight: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : MarginRightProperty<never>;
marginBottom: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : MarginBottomProperty<never>;
marginLeft: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : MarginLeftProperty<never>;
marginInline: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : MarginInlineProperty<never>;
marginInlineEnd: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : MarginInlineEndProperty<never>;
marginInlineStart: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : MarginInlineStartProperty<never>;
marginBlock: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : MarginBlockProperty<never>;
marginBlockEnd: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : MarginBlockEndProperty<never>;
marginBlockStart: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : MarginBlockStartProperty<never>;
padding: T['tokens']['space'] extends object ? keyof T['tokens']['space'] | [keyof T['tokens']['space'], keyof T['tokens']['space']] | [keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space']] | [keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space'], keyof T['tokens']['space']] : PaddingProperty<never>;
paddingTop: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : PaddingTopProperty<never>;
paddingRight: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : PaddingRightProperty<never>;
paddingBottom: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : PaddingBottomProperty<never>;
paddingLeft: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : PaddingLeftProperty<never>;
paddingInline: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : PaddingInlineProperty<never>;
paddingInlineEnd: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : PaddingInlineEndProperty<never>;
paddingInlineStart: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : PaddingInlineStartProperty<never>;
paddingBlock: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : PaddingBlockProperty<never>;
paddingBlockEnd: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : PaddingBlockEndProperty<never>;
paddingBlockStart: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : PaddingBlockStartProperty<never>;
top: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : TopProperty<never>;
right: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : RightProperty<never>;
bottom: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : BottomProperty<never>;
left: T['tokens']['space'] extends object ? keyof T['tokens']['space'] : LeftProperty<never>;
fontSize: T['tokens']['fontSizes'] extends object ? keyof T['tokens']['fontSizes'] : FontSizeProperty<never>;
backgroundColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : BackgroundColorProperty;
border: [LineWidth<(string & {}) | 0>, T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : LineStyle, T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : Color];
borderColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
borderTopColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
borderRightColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
borderBottomColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
borderLeftColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
caretColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
color: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
columnRuleColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
outlineColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
fill: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
stroke: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : never;
fontFamily: T['tokens']['fonts'] extends object ? keyof T['tokens']['fonts'] : never;
fontWeight: T['tokens']['fontWeights'] extends object ? keyof T['tokens']['fontWeights'] : never;
lineHeight: T['tokens']['lineHeights'] extends object ? keyof T['tokens']['lineHeights'] : never;
letterSpacing: T['tokens']['letterSpacings'] extends object ? keyof T['tokens']['letterSpacings'] : never;
blockSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
minBlockSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
maxBlockSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
inlineSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
minInlineSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
maxInlineSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
width: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
minWidth: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
maxWidth: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
height: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
minHeight: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
maxHeight: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
flexBasis: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : never;
borderColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : BorderColorProperty;
borderTopColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : BorderTopColorProperty;
borderRightColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : BorderRightColorProperty;
borderBottomColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : BorderBottomColorProperty;
borderLeftColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : BorderLeftColorProperty;
caretColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : CaretColorProperty;
color: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : Color;
columnRuleColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : ColumnRuleColorProperty;
outlineColor: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : OutlineColorProperty;
fill: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : FillProperty;
stroke: T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : StrokeProperty;
fontFamily: T['tokens']['fonts'] extends object ? keyof T['tokens']['fonts'] : FontFamilyProperty;
fontWeight: T['tokens']['fontWeights'] extends object ? keyof T['tokens']['fontWeights'] : FontWeightProperty;
lineHeight: T['tokens']['lineHeights'] extends object ? keyof T['tokens']['lineHeights'] : LineHeightProperty<never>;
letterSpacing: T['tokens']['letterSpacings'] extends object ? keyof T['tokens']['letterSpacings'] : LetterSpacingProperty<never>;
blockSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : BlockSizeProperty<never>;
minBlockSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : MinBlockSizeProperty<never>;
maxBlockSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : MaxBlockSizeProperty<never>;
inlineSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : InlineSizeProperty<never>;
minInlineSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : MinInlineSizeProperty<never>;
maxInlineSize: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : MaxInlineSizeProperty<never>;
width: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : WidthProperty<never>;
minWidth: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : MinWidthProperty<never>;
maxWidth: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : MaxWidthProperty<never>;
height: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : HeightProperty<never>;
minHeight: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : MinHeightProperty<never>;
maxHeight: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : MaxHeightProperty<never>;
flexBasis: T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : FlexBasisProperty<never>;
flex: (T['tokens']['space'] extends object ? keyof T['tokens']['space'] : never) | [number, T['tokens']['space'] extends object ? keyof T['tokens']['space'] : string | number] | [number, number, T['tokens']['sizes'] extends object ? keyof T['tokens']['sizes'] : string | number];
borderWidth: T['tokens']['borderWidths'] extends object ? keyof T['tokens']['borderWidths'] : never;
borderTopWidth: T['tokens']['borderWidths'] extends object ? keyof T['tokens']['borderWidths'] : never;
borderLeftWidth: T['tokens']['borderWidths'] extends object ? keyof T['tokens']['borderWidths'] : never;
borderRightWidth: T['tokens']['borderWidths'] extends object ? keyof T['tokens']['borderWidths'] : never;
borderBottomWidth: T['tokens']['borderWidths'] extends object ? keyof T['tokens']['borderWidths'] : never;
borderStyle: T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : never;
borderTopStyle: T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : never;
borderRightStyle: T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : never;
borderBottomStyle: T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : never;
borderLeftStyle: T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : never;
borderRadius: T['tokens']['radii'] extends object ? keyof T['tokens']['radii'] : never;
borderTopLeftRadius: T['tokens']['radii'] extends object ? keyof T['tokens']['radii'] : never;
borderTopRightRadius: T['tokens']['radii'] extends object ? keyof T['tokens']['radii'] : never;
borderBottomRightRadius: T['tokens']['radii'] extends object ? keyof T['tokens']['radii'] : never;
borderBottomLeftRadius: T['tokens']['radii'] extends object ? keyof T['tokens']['radii'] : never;
borderWidth: T['tokens']['borderWidths'] extends object ? keyof T['tokens']['borderWidths'] : BorderWidthProperty<never>;
borderTopWidth: T['tokens']['borderWidths'] extends object ? keyof T['tokens']['borderWidths'] : BorderTopWidthProperty<never>;
borderLeftWidth: T['tokens']['borderWidths'] extends object ? keyof T['tokens']['borderWidths'] : BorderLeftWidthProperty<never>;
borderRightWidth: T['tokens']['borderWidths'] extends object ? keyof T['tokens']['borderWidths'] : BorderRightWidthProperty<never>;
borderBottomWidth: T['tokens']['borderWidths'] extends object ? keyof T['tokens']['borderWidths'] : BorderBottomWidthProperty<never>;
borderStyle: T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : BorderStyleProperty;
borderTopStyle: T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : BorderTopStyleProperty;
borderRightStyle: T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : BorderRightStyleProperty;
borderBottomStyle: T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : BorderBottomStyleProperty;
borderLeftStyle: T['tokens']['borderStyles'] extends object ? keyof T['tokens']['borderStyles'] : BorderLeftStyleProperty;
borderRadius: T['tokens']['radii'] extends object ? keyof T['tokens']['radii'] : BorderRadiusProperty<never>;
borderTopLeftRadius: T['tokens']['radii'] extends object ? keyof T['tokens']['radii'] : BorderTopLeftRadiusProperty<never>;
borderTopRightRadius: T['tokens']['radii'] extends object ? keyof T['tokens']['radii'] : BorderTopRightRadiusProperty<never>;
borderBottomRightRadius: T['tokens']['radii'] extends object ? keyof T['tokens']['radii'] : BorderBottomRightRadiusProperty<never>;
borderBottomLeftRadius: T['tokens']['radii'] extends object ? keyof T['tokens']['radii'] : BorderBottomLeftRadiusProperty<never>;
boxShadow: T['tokens']['shadows'] extends object ? keyof T['tokens']['shadows'] : [string | number, string | number, string | number, T['tokens']['colors'] extends object ? keyof T['tokens']['colors'] : Color];
textShadow: T['tokens']['shadows'] extends object ? keyof T['tokens']['shadows'] : never;
zIndex: T['tokens']['zIndices'] extends object ? keyof T['tokens']['zIndices'] : never;
textShadow: T['tokens']['shadows'] extends object ? keyof T['tokens']['shadows'] : TextShadowProperty;
zIndex: T['tokens']['zIndices'] extends object ? keyof T['tokens']['zIndices'] : ZIndexProperty;
transition: T['tokens']['transitions'] extends object ? keyof T['tokens']['transitions'] : never;

@@ -154,7 +160,3 @@ } : {};

export interface ITokensDefinition {
colors?: ITokenDefinition & {
modes?: {
[a: string]: ITokenDefinition;
};
};
colors?: ITokenDefinition;
space?: ITokenDefinition;

@@ -180,2 +182,3 @@ fontSizes?: ITokenDefinition;

prefix?: string;
strict?: boolean;
} & (STRICT_MODE extends true ? {

@@ -200,3 +203,3 @@ breakpoints: IBreakpoints;

keyframes: (definition: Record<string, TFlatCSS<T> & TFlatUtils<T>>) => string;
global: (definition: Record<string, TCssProperties<T>>) => string;
global: (definition: Record<string, TCssProperties<T>>) => () => string;
theme: (theme: Partial<{

@@ -203,0 +206,0 @@ [TO in keyof T['tokens']]: Partial<T['tokens'][TO]>;

{
"name": "@stitches/core",
"version": "0.0.3-canary.0",
"version": "0.0.3-canary.1",
"description": "The modern CSS-in-JS library",

@@ -55,3 +55,3 @@ "main": "dist/core.cjs.js",

},
"gitHead": "483ad0781514a92f7323df56bfd4948ad781686c"
"gitHead": "60ef24464cb5d1eef7f4be01add51c5d9d43ed70"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc