@tamagui/web 3.0.0-beta.807.1 → 3.0.0-beta.831.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/config.cjs +1 -1
- package/dist/cjs/config.native.cjs +1 -1
- package/dist/cjs/config.native.js +1 -1
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +28 -18
- package/dist/cjs/createComponent.native.cjs +30 -20
- package/dist/cjs/createComponent.native.js +30 -20
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createStyledHOC.cjs +54 -4
- package/dist/cjs/createStyledHOC.native.cjs +55 -4
- package/dist/cjs/createStyledHOC.native.js +55 -4
- package/dist/cjs/createStyledHOC.native.js.map +1 -1
- package/dist/cjs/createTokens.cjs +1 -1
- package/dist/cjs/createTokens.native.cjs +1 -1
- package/dist/cjs/createTokens.native.js +1 -1
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +147 -99
- package/dist/cjs/dom/htmlRuntime.native.cjs +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js +6 -2
- package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
- package/dist/cjs/dom/primitives.native.cjs +16 -13
- package/dist/cjs/dom/primitives.native.js +16 -13
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/helpers/componentDisplayName.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.cjs +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js +1 -11
- package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/cjs/helpers/directStyleCSS.cjs +101 -104
- package/dist/cjs/helpers/formatDiagnostic.cjs +2 -4
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +2 -4
- package/dist/cjs/helpers/formatDiagnostic.native.js +2 -4
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getCSSStylesAtomic.cjs +10 -10
- package/dist/cjs/helpers/getSplitStyles.cjs +168 -600
- package/dist/cjs/helpers/getSplitStyles.native.cjs +168 -762
- package/dist/cjs/helpers/getSplitStyles.native.js +168 -762
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/splitStyleProps.cjs +46 -0
- package/dist/cjs/helpers/splitStyleProps.native.cjs +49 -0
- package/dist/cjs/helpers/splitStyleProps.native.js +51 -0
- package/dist/cjs/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/cjs/helpers/styleStaticConfig.cjs +76 -0
- package/dist/cjs/helpers/styleStaticConfig.native.cjs +79 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js +81 -0
- package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/cjs/helpers/tokenCategories.cjs +32 -71
- package/dist/cjs/helpers/tokenCategories.native.cjs +34 -73
- package/dist/cjs/helpers/tokenCategories.native.js +34 -73
- package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
- package/dist/cjs/helpers/variantResolvers.cjs +87 -0
- package/dist/cjs/helpers/variantResolvers.native.cjs +140 -0
- package/dist/cjs/helpers/variantResolvers.native.js +142 -0
- package/dist/cjs/helpers/variantResolvers.native.js.map +1 -0
- package/dist/cjs/hooks/useSplitStyles.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.cjs +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js +2 -2
- package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/cjs/index.cjs +3 -9
- package/dist/cjs/index.native.cjs +3 -9
- package/dist/cjs/index.native.js +3 -9
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +8 -7
- package/dist/cjs/internal-runtime.native.cjs +8 -7
- package/dist/cjs/internal-runtime.native.js +8 -7
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/cjs/static-resolve.cjs +6 -5
- package/dist/cjs/static-resolve.native.cjs +6 -5
- package/dist/cjs/static-resolve.native.js +6 -5
- package/dist/cjs/static-resolve.native.js.map +1 -1
- package/dist/cjs/styled.cjs +4 -56
- package/dist/cjs/styled.native.cjs +4 -58
- package/dist/cjs/styled.native.js +4 -58
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/types.cjs +1 -21
- package/dist/cjs/types.native.cjs +1 -21
- package/dist/cjs/types.native.js +1 -21
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/views/Text.cjs +4 -2
- package/dist/cjs/views/Text.native.cjs +4 -2
- package/dist/cjs/views/Text.native.js +4 -2
- package/dist/cjs/views/Text.native.js.map +1 -1
- package/dist/cjs/views/View.cjs +4 -2
- package/dist/cjs/views/View.native.cjs +4 -2
- package/dist/cjs/views/View.native.js +4 -2
- package/dist/cjs/views/View.native.js.map +1 -1
- package/dist/esm/config.mjs +1 -1
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +1 -1
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +29 -19
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +31 -21
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createStyledHOC.mjs +55 -5
- package/dist/esm/createStyledHOC.mjs.map +1 -1
- package/dist/esm/createStyledHOC.native.js +56 -5
- package/dist/esm/createStyledHOC.native.js.map +1 -1
- package/dist/esm/createTokens.mjs +1 -1
- package/dist/esm/createTokens.mjs.map +1 -1
- package/dist/esm/createTokens.native.js +1 -1
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/dom/html.mjs +147 -99
- package/dist/esm/dom/html.mjs.map +1 -1
- package/dist/esm/dom/htmlRuntime.native.js +7 -3
- package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
- package/dist/esm/dom/primitives.native.js +16 -13
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/helpers/componentDisplayName.mjs +1 -8
- package/dist/esm/helpers/componentDisplayName.mjs.map +1 -1
- package/dist/esm/helpers/componentDisplayName.native.js +1 -8
- package/dist/esm/helpers/componentDisplayName.native.js.map +1 -1
- package/dist/esm/helpers/directStyleCSS.mjs +101 -104
- package/dist/esm/helpers/directStyleCSS.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.mjs +2 -4
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js +2 -4
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getCSSStylesAtomic.mjs +10 -10
- package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +166 -594
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +166 -757
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/splitStyleProps.mjs +27 -0
- package/dist/esm/helpers/splitStyleProps.mjs.map +1 -0
- package/dist/esm/helpers/splitStyleProps.native.js +28 -0
- package/dist/esm/helpers/splitStyleProps.native.js.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.mjs +57 -0
- package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -0
- package/dist/esm/helpers/styleStaticConfig.native.js +58 -0
- package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -0
- package/dist/esm/helpers/tokenCategories.mjs +33 -72
- package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
- package/dist/esm/helpers/tokenCategories.native.js +35 -74
- package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
- package/dist/esm/helpers/variantResolvers.mjs +65 -0
- package/dist/esm/helpers/variantResolvers.mjs.map +1 -0
- package/dist/esm/helpers/variantResolvers.native.js +116 -0
- package/dist/esm/helpers/variantResolvers.native.js.map +1 -0
- package/dist/esm/hooks/useSplitStyles.mjs +2 -2
- package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
- package/dist/esm/hooks/useSplitStyles.native.js +2 -2
- package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
- package/dist/esm/index.js +3 -5
- package/dist/esm/index.mjs +3 -5
- package/dist/esm/index.native.js +3 -5
- package/dist/esm/internal-runtime.mjs +8 -7
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +8 -7
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/dist/esm/static-resolve.mjs +8 -6
- package/dist/esm/static-resolve.mjs.map +1 -1
- package/dist/esm/static-resolve.native.js +8 -6
- package/dist/esm/static-resolve.native.js.map +1 -1
- package/dist/esm/styled.mjs +6 -57
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +6 -59
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/types.mjs +1 -18
- package/dist/esm/types.mjs.map +1 -1
- package/dist/esm/types.native.js +1 -18
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/views/Text.mjs +4 -2
- package/dist/esm/views/Text.mjs.map +1 -1
- package/dist/esm/views/Text.native.js +4 -2
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/View.mjs +4 -2
- package/dist/esm/views/View.mjs.map +1 -1
- package/dist/esm/views/View.native.js +4 -2
- package/dist/esm/views/View.native.js.map +1 -1
- package/package.json +15 -15
- package/src/config.ts +1 -1
- package/src/createComponent.tsx +41 -30
- package/src/createStyledHOC.tsx +56 -9
- package/src/createTokens.ts +1 -1
- package/src/dom/html.tsx +778 -877
- package/src/dom/htmlRuntime.native.tsx +7 -3
- package/src/dom/primitives.native.tsx +30 -39
- package/src/helpers/componentDisplayName.ts +0 -11
- package/src/helpers/directStyleCSS.ts +91 -112
- package/src/helpers/formatDiagnostic.ts +2 -4
- package/src/helpers/getCSSStylesAtomic.ts +32 -26
- package/src/helpers/getSplitStyles.tsx +315 -1119
- package/src/helpers/getVariantExtras.tsx +3 -3
- package/src/helpers/splitStyleProps.ts +166 -0
- package/src/helpers/styleFrontend.ts +8 -4
- package/src/helpers/styleStaticConfig.ts +88 -0
- package/src/helpers/tokenCategories.ts +62 -93
- package/src/helpers/variantResolvers.ts +121 -0
- package/src/hooks/useSplitStyles.tsx +17 -2
- package/src/hooks/useTheme.tsx +1 -1
- package/src/index.ts +8 -4
- package/src/internal-runtime.ts +10 -9
- package/src/static-resolve.ts +18 -14
- package/src/styled.tsx +7 -264
- package/src/types.tsx +19 -40
- package/src/views/Text.tsx +6 -7
- package/src/views/View.tsx +6 -7
- package/types/createComponent.d.ts.map +1 -1
- package/types/createStyledHOC.d.ts.map +1 -1
- package/types/dom/html.d.ts.map +1 -1
- package/types/dom/htmlRuntime.native.d.ts.map +1 -1
- package/types/dom/primitives.native.d.ts.map +1 -1
- package/types/helpers/componentDisplayName.d.ts +0 -3
- package/types/helpers/componentDisplayName.d.ts.map +1 -1
- package/types/helpers/directStyleCSS.d.ts.map +1 -1
- package/types/helpers/formatDiagnostic.d.ts.map +1 -1
- package/types/helpers/getCSSStylesAtomic.d.ts +17 -15
- package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +6 -6
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/splitStyleProps.d.ts +44 -0
- package/types/helpers/splitStyleProps.d.ts.map +1 -0
- package/types/helpers/styleFrontend.d.ts +4 -4
- package/types/helpers/styleFrontend.d.ts.map +1 -1
- package/types/helpers/styleStaticConfig.d.ts +19 -0
- package/types/helpers/styleStaticConfig.d.ts.map +1 -0
- package/types/helpers/tokenCategories.d.ts +1 -1
- package/types/helpers/tokenCategories.d.ts.map +1 -1
- package/types/helpers/variantResolvers.d.ts +9 -0
- package/types/helpers/variantResolvers.d.ts.map +1 -0
- package/types/hooks/useSplitStyles.d.ts.map +1 -1
- package/types/index.d.ts +2 -4
- package/types/index.d.ts.map +1 -1
- package/types/internal-runtime.d.ts.map +1 -1
- package/types/static-resolve.d.ts +2 -2
- package/types/static-resolve.d.ts.map +1 -1
- package/types/styled.d.ts +3 -39
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +2 -12
- package/types/types.d.ts.map +1 -1
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/View.d.ts.map +1 -1
- package/dist/cjs/helpers/getDefaultProps.cjs +0 -24
- package/dist/cjs/helpers/getDefaultProps.native.cjs +0 -28
- package/dist/cjs/helpers/getDefaultProps.native.js +0 -30
- package/dist/cjs/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/cjs/helpers/themeable.cjs +0 -92
- package/dist/cjs/helpers/themeable.native.cjs +0 -95
- package/dist/cjs/helpers/themeable.native.js +0 -97
- package/dist/cjs/helpers/themeable.native.js.map +0 -1
- package/dist/cjs/hooks/useProps.cjs +0 -129
- package/dist/cjs/hooks/useProps.native.cjs +0 -135
- package/dist/cjs/hooks/useProps.native.js +0 -137
- package/dist/cjs/hooks/useProps.native.js.map +0 -1
- package/dist/esm/helpers/getDefaultProps.mjs +0 -4
- package/dist/esm/helpers/getDefaultProps.mjs.map +0 -1
- package/dist/esm/helpers/getDefaultProps.native.js +0 -6
- package/dist/esm/helpers/getDefaultProps.native.js.map +0 -1
- package/dist/esm/helpers/themeable.mjs +0 -67
- package/dist/esm/helpers/themeable.mjs.map +0 -1
- package/dist/esm/helpers/themeable.native.js +0 -68
- package/dist/esm/helpers/themeable.native.js.map +0 -1
- package/dist/esm/hooks/useProps.mjs +0 -100
- package/dist/esm/hooks/useProps.mjs.map +0 -1
- package/dist/esm/hooks/useProps.native.js +0 -104
- package/dist/esm/hooks/useProps.native.js.map +0 -1
- package/src/helpers/getDefaultProps.ts +0 -3
- package/src/helpers/themeable.tsx +0 -96
- package/src/hooks/useProps.tsx +0 -186
- package/types/helpers/getDefaultProps.d.ts +0 -3
- package/types/helpers/getDefaultProps.d.ts.map +0 -1
- package/types/helpers/themeable.d.ts +0 -3
- package/types/helpers/themeable.d.ts.map +0 -1
- package/types/hooks/useProps.d.ts +0 -39
- package/types/hooks/useProps.d.ts.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { stylePropsAll } from "@tamagui/helpers";
|
|
2
|
+
import { getConfig } from "../config.mjs";
|
|
3
|
+
|
|
4
|
+
function splitStyleProps(props, options = {}) {
|
|
5
|
+
const styleProps = {};
|
|
6
|
+
const regularProps = {};
|
|
7
|
+
const { expandShorthands = false, filter } = options;
|
|
8
|
+
const shorthands = getConfig().shorthands;
|
|
9
|
+
const filterIsFunction = typeof filter === "function";
|
|
10
|
+
const propsRecord = props;
|
|
11
|
+
for (const originalKey in props) {
|
|
12
|
+
if (!Object.hasOwn(props, originalKey)) continue;
|
|
13
|
+
const value = propsRecord[originalKey];
|
|
14
|
+
const key = shorthands[originalKey] || originalKey;
|
|
15
|
+
const isStyleProp = key in stylePropsAll;
|
|
16
|
+
const selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;
|
|
17
|
+
if (selected) {
|
|
18
|
+
styleProps[expandShorthands ? key : originalKey] = value;
|
|
19
|
+
} else {
|
|
20
|
+
regularProps[originalKey] = value;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return [styleProps, regularProps];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { splitStyleProps };
|
|
27
|
+
//# sourceMappingURL=splitStyleProps.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitStyleProps.js","names":[],"sources":["esm/helpers/splitStyleProps.js"],"sourcesContent":["import { stylePropsAll } from \"@tamagui/helpers\";\nimport { getConfig } from \"../config\";\nfunction splitStyleProps(props, options = {}) {\n const styleProps = {};\n const regularProps = {};\n const { expandShorthands = false, filter } = options;\n const shorthands = getConfig().shorthands;\n const filterIsFunction = typeof filter === \"function\";\n const propsRecord = props;\n for (const originalKey in props) {\n if (!Object.hasOwn(props, originalKey)) continue;\n const value = propsRecord[originalKey];\n const key = shorthands[originalKey] || originalKey;\n const isStyleProp = key in stylePropsAll;\n const selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;\n if (selected) {\n styleProps[expandShorthands ? key : originalKey] = value;\n } else {\n regularProps[originalKey] = value;\n }\n }\n return [styleProps, regularProps];\n}\nexport {\n splitStyleProps\n};\n//# sourceMappingURL=splitStyleProps.js.map\n"],"mappings":";;;;AAEA,SAAS,gBAAgB,OAAO,UAAU,CAAC,GAAG;CAC5C,MAAM,aAAa,CAAC;CACpB,MAAM,eAAe,CAAC;CACtB,MAAM,EAAE,mBAAmB,OAAO,WAAW;CAC7C,MAAM,aAAa,UAAU,CAAC,CAAC;CAC/B,MAAM,mBAAmB,OAAO,WAAW;CAC3C,MAAM,cAAc;CACpB,KAAK,MAAM,eAAe,OAAO;EAC/B,IAAI,CAAC,OAAO,OAAO,OAAO,WAAW,GAAG;EACxC,MAAM,QAAQ,YAAY;EAC1B,MAAM,MAAM,WAAW,gBAAgB;EACvC,MAAM,cAAc,OAAO;EAC3B,MAAM,WAAW,SAAS,mBAAmB,OAAO,KAAK,OAAO,aAAa,WAAW,IAAI,OAAO,OAAO,QAAQ,GAAG,IAAI;EACzH,IAAI,UAAU;GACZ,WAAW,mBAAmB,MAAM,eAAe;EACrD,OAAO;GACL,aAAa,eAAe;EAC9B;CACF;CACA,OAAO,CAAC,YAAY,YAAY;AAClC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { stylePropsAll } from "@tamagui/helpers";
|
|
2
|
+
import { getConfig } from "../config.native.js";
|
|
3
|
+
|
|
4
|
+
function splitStyleProps(props) {
|
|
5
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6
|
+
var styleProps = {};
|
|
7
|
+
var regularProps = {};
|
|
8
|
+
var { expandShorthands = false, filter } = options;
|
|
9
|
+
var shorthands = getConfig().shorthands;
|
|
10
|
+
var filterIsFunction = typeof filter === "function";
|
|
11
|
+
var propsRecord = props;
|
|
12
|
+
for (var originalKey in props) {
|
|
13
|
+
if (!Object.hasOwn(props, originalKey)) continue;
|
|
14
|
+
var value = propsRecord[originalKey];
|
|
15
|
+
var key = shorthands[originalKey] || originalKey;
|
|
16
|
+
var isStyleProp = key in stylePropsAll;
|
|
17
|
+
var selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;
|
|
18
|
+
if (selected) {
|
|
19
|
+
styleProps[expandShorthands ? key : originalKey] = value;
|
|
20
|
+
} else {
|
|
21
|
+
regularProps[originalKey] = value;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return [styleProps, regularProps];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { splitStyleProps };
|
|
28
|
+
//# sourceMappingURL=splitStyleProps.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitStyleProps.native.js","names":[],"sources":["esm/helpers/splitStyleProps.native.js"],"sourcesContent":["import { stylePropsAll } from \"@tamagui/helpers\";\nimport { getConfig } from \"../config\";\nfunction splitStyleProps(props) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var styleProps = {};\n var regularProps = {};\n var { expandShorthands = false, filter } = options;\n var shorthands = getConfig().shorthands;\n var filterIsFunction = typeof filter === \"function\";\n var propsRecord = props;\n for (var originalKey in props) {\n if (!Object.hasOwn(props, originalKey)) continue;\n var value = propsRecord[originalKey];\n var key = shorthands[originalKey] || originalKey;\n var isStyleProp = key in stylePropsAll;\n var selected = filter ? filterIsFunction ? filter(key, value, originalKey, isStyleProp) : Object.hasOwn(filter, key) : isStyleProp;\n if (selected) {\n styleProps[expandShorthands ? key : originalKey] = value;\n } else {\n regularProps[originalKey] = value;\n }\n }\n return [\n styleProps,\n regularProps\n ];\n}\nexport {\n splitStyleProps\n};\n//# sourceMappingURL=splitStyleProps.js.map\n"],"mappings":";;;;AAEA,SAAS,gBAAgB,OAAO;CAC9B,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAChF,IAAI,aAAa,CAAC;CAClB,IAAI,eAAe,CAAC;CACpB,IAAI,EAAE,mBAAmB,OAAO,WAAW;CAC3C,IAAI,aAAa,UAAU,CAAC,CAAC;CAC7B,IAAI,mBAAmB,OAAO,WAAW;CACzC,IAAI,cAAc;CAClB,KAAK,IAAI,eAAe,OAAO;EAC7B,IAAI,CAAC,OAAO,OAAO,OAAO,WAAW,GAAG;EACxC,IAAI,QAAQ,YAAY;EACxB,IAAI,MAAM,WAAW,gBAAgB;EACrC,IAAI,cAAc,OAAO;EACzB,IAAI,WAAW,SAAS,mBAAmB,OAAO,KAAK,OAAO,aAAa,WAAW,IAAI,OAAO,OAAO,QAAQ,GAAG,IAAI;EACvH,IAAI,UAAU;GACZ,WAAW,mBAAmB,MAAM,eAAe;EACrD,OAAO;GACL,aAAa,eAAe;EAC9B;CACF;CACA,OAAO,CACL,YACA,YACF;AACF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { stylePropsText, validStyles } from "@tamagui/helpers";
|
|
2
|
+
import { getConfigRevisionState } from "./grammarConfig.mjs";
|
|
3
|
+
|
|
4
|
+
const styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
function getStyleStaticConfig(staticConfig, conf) {
|
|
6
|
+
let configCache = styleStaticConfigCache.get(staticConfig);
|
|
7
|
+
const revision = getConfigRevisionState(conf).revision;
|
|
8
|
+
const cached = configCache?.get(conf);
|
|
9
|
+
if (cached?.revision === revision) return cached.value;
|
|
10
|
+
const normalized = staticConfig.styleFrontend?.normalizeStaticConfig?.(staticConfig, conf);
|
|
11
|
+
const variants = normalized ? normalized.variants : staticConfig.variants;
|
|
12
|
+
const authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
|
|
13
|
+
const authoredDefaultProps = staticConfig.defaultProps;
|
|
14
|
+
let baseStyle;
|
|
15
|
+
let baseVariantProps;
|
|
16
|
+
let defaultProps;
|
|
17
|
+
if (authoredDefaultProps) {
|
|
18
|
+
const validStyles$1 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
|
|
19
|
+
for (const key in authoredDefaultProps) {
|
|
20
|
+
const isVariant = Boolean(variants?.[key]);
|
|
21
|
+
const isStyle = key !== "transition" && (key in validStyles$1 || key in conf.shorthands);
|
|
22
|
+
if (isVariant || isStyle) {
|
|
23
|
+
;
|
|
24
|
+
(baseStyle ||= authoredBaseStyle ? { ...authoredBaseStyle } : {})[key] = authoredDefaultProps[key];
|
|
25
|
+
}
|
|
26
|
+
if (isVariant || !isStyle) {
|
|
27
|
+
;
|
|
28
|
+
(defaultProps ||= {})[key] = authoredDefaultProps[key];
|
|
29
|
+
}
|
|
30
|
+
if (isVariant) {
|
|
31
|
+
;
|
|
32
|
+
(baseVariantProps ||= {})[key] = authoredDefaultProps[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const keys = staticConfig.contextProps || staticConfig.context?.propKeys;
|
|
37
|
+
const value = {
|
|
38
|
+
baseStyle: baseStyle || authoredBaseStyle,
|
|
39
|
+
baseVariantProps,
|
|
40
|
+
defaultProps,
|
|
41
|
+
styledContextKeys: keys ? new Set(keys) : null,
|
|
42
|
+
variants,
|
|
43
|
+
passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
|
|
44
|
+
};
|
|
45
|
+
if (!configCache) {
|
|
46
|
+
configCache = /* @__PURE__ */ new WeakMap();
|
|
47
|
+
styleStaticConfigCache.set(staticConfig, configCache);
|
|
48
|
+
}
|
|
49
|
+
configCache.set(conf, {
|
|
50
|
+
revision,
|
|
51
|
+
value
|
|
52
|
+
});
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { getStyleStaticConfig };
|
|
57
|
+
//# sourceMappingURL=styleStaticConfig.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleStaticConfig.js","names":["validStyles","validStylesView"],"sources":["esm/helpers/styleStaticConfig.js"],"sourcesContent":["import { stylePropsText, validStyles as validStylesView } from \"@tamagui/helpers\";\nimport { getConfigRevisionState } from \"./grammarConfig\";\nconst styleStaticConfigCache = /* @__PURE__ */ new WeakMap();\nfunction getStyleStaticConfig(staticConfig, conf) {\n let configCache = styleStaticConfigCache.get(staticConfig);\n const revision = getConfigRevisionState(conf).revision;\n const cached = configCache?.get(conf);\n if (cached?.revision === revision) return cached.value;\n const normalized = staticConfig.styleFrontend?.normalizeStaticConfig?.(\n staticConfig,\n conf\n );\n const variants = normalized ? normalized.variants : staticConfig.variants;\n const authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;\n const authoredDefaultProps = staticConfig.defaultProps;\n let baseStyle;\n let baseVariantProps;\n let defaultProps;\n if (authoredDefaultProps) {\n const validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStylesView);\n for (const key in authoredDefaultProps) {\n const isVariant = Boolean(variants?.[key]);\n const isStyle = key !== \"transition\" && (key in validStyles || key in conf.shorthands);\n if (isVariant || isStyle) {\n ;\n (baseStyle ||= authoredBaseStyle ? { ...authoredBaseStyle } : {})[key] = authoredDefaultProps[key];\n }\n if (isVariant || !isStyle) {\n ;\n (defaultProps ||= {})[key] = authoredDefaultProps[key];\n }\n if (isVariant) {\n ;\n (baseVariantProps ||= {})[key] = authoredDefaultProps[key];\n }\n }\n }\n const keys = staticConfig.contextProps || staticConfig.context?.propKeys;\n const value = {\n baseStyle: baseStyle || authoredBaseStyle,\n baseVariantProps,\n defaultProps,\n styledContextKeys: keys ? new Set(keys) : null,\n variants,\n passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName\n };\n if (!configCache) {\n configCache = /* @__PURE__ */ new WeakMap();\n styleStaticConfigCache.set(staticConfig, configCache);\n }\n configCache.set(conf, { revision, value });\n return value;\n}\nexport {\n getStyleStaticConfig\n};\n//# sourceMappingURL=styleStaticConfig.js.map\n"],"mappings":";;;;AAEA,MAAM,yCAAyC,IAAI,QAAQ;AAC3D,SAAS,qBAAqB,cAAc,MAAM;CAChD,IAAI,cAAc,uBAAuB,IAAI,YAAY;CACzD,MAAM,WAAW,uBAAuB,IAAI,CAAC,CAAC;CAC9C,MAAM,SAAS,aAAa,IAAI,IAAI;CACpC,IAAI,QAAQ,aAAa,UAAU,OAAO,OAAO;CACjD,MAAM,aAAa,aAAa,eAAe,wBAC7C,cACA,IACF;CACA,MAAM,WAAW,aAAa,WAAW,WAAW,aAAa;CACjE,MAAM,oBAAoB,aAAa,WAAW,YAAY,aAAa;CAC3E,MAAM,uBAAuB,aAAa;CAC1C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI,sBAAsB;EACxB,MAAMA,gBAAc,aAAa,gBAAgB,aAAa,UAAU,aAAa,UAAU,iBAAiBC;EAChH,KAAK,MAAM,OAAO,sBAAsB;GACtC,MAAM,YAAY,QAAQ,WAAW,IAAI;GACzC,MAAM,UAAU,QAAQ,iBAAiB,OAAOD,iBAAe,OAAO,KAAK;GAC3E,IAAI,aAAa,SAAS;IACxB;IACA,CAAC,cAAc,oBAAoB,EAAE,GAAG,kBAAkB,IAAI,CAAC,EAAC,CAAE,OAAO,qBAAqB;GAChG;GACA,IAAI,aAAa,CAAC,SAAS;IACzB;IACA,CAAC,iBAAiB,CAAC,EAAC,CAAE,OAAO,qBAAqB;GACpD;GACA,IAAI,WAAW;IACb;IACA,CAAC,qBAAqB,CAAC,EAAC,CAAE,OAAO,qBAAqB;GACxD;EACF;CACF;CACA,MAAM,OAAO,aAAa,gBAAgB,aAAa,SAAS;CAChE,MAAM,QAAQ;EACZ,WAAW,aAAa;EACxB;EACA;EACA,mBAAmB,OAAO,IAAI,IAAI,IAAI,IAAI;EAC1C;EACA,sBAAsB,aAAa,WAAW,uBAAuB,aAAa;CACpF;CACA,IAAI,CAAC,aAAa;EAChB,8BAA8B,IAAI,QAAQ;EAC1C,uBAAuB,IAAI,cAAc,WAAW;CACtD;CACA,YAAY,IAAI,MAAM;EAAE;EAAU;CAAM,CAAC;CACzC,OAAO;AACT"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { stylePropsText, validStyles } from "@tamagui/helpers";
|
|
2
|
+
import { getConfigRevisionState } from "./grammarConfig.native.js";
|
|
3
|
+
|
|
4
|
+
var styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
function getStyleStaticConfig(staticConfig, conf) {
|
|
6
|
+
var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;
|
|
7
|
+
var configCache = styleStaticConfigCache.get(staticConfig);
|
|
8
|
+
var revision = getConfigRevisionState(conf).revision;
|
|
9
|
+
var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);
|
|
10
|
+
if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;
|
|
11
|
+
var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);
|
|
12
|
+
var variants = normalized ? normalized.variants : staticConfig.variants;
|
|
13
|
+
var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
|
|
14
|
+
var authoredDefaultProps = staticConfig.defaultProps;
|
|
15
|
+
var baseStyle;
|
|
16
|
+
var baseVariantProps;
|
|
17
|
+
var defaultProps;
|
|
18
|
+
if (authoredDefaultProps) {
|
|
19
|
+
var validStyles$1 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
|
|
20
|
+
for (var key in authoredDefaultProps) {
|
|
21
|
+
var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
|
|
22
|
+
var isStyle = key !== "transition" && (key in validStyles$1 || key in conf.shorthands);
|
|
23
|
+
if (isVariant || isStyle) {
|
|
24
|
+
;
|
|
25
|
+
(baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
|
|
26
|
+
}
|
|
27
|
+
if (isVariant || !isStyle) {
|
|
28
|
+
;
|
|
29
|
+
(defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
|
|
30
|
+
}
|
|
31
|
+
if (isVariant) {
|
|
32
|
+
;
|
|
33
|
+
(baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
|
|
38
|
+
var value = {
|
|
39
|
+
baseStyle: baseStyle || authoredBaseStyle,
|
|
40
|
+
baseVariantProps,
|
|
41
|
+
defaultProps,
|
|
42
|
+
styledContextKeys: keys ? new Set(keys) : null,
|
|
43
|
+
variants,
|
|
44
|
+
passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
|
|
45
|
+
};
|
|
46
|
+
if (!configCache) {
|
|
47
|
+
configCache = /* @__PURE__ */ new WeakMap();
|
|
48
|
+
styleStaticConfigCache.set(staticConfig, configCache);
|
|
49
|
+
}
|
|
50
|
+
configCache.set(conf, {
|
|
51
|
+
revision,
|
|
52
|
+
value
|
|
53
|
+
});
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { getStyleStaticConfig };
|
|
58
|
+
//# sourceMappingURL=styleStaticConfig.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleStaticConfig.native.js","names":["validStyles","validStylesView"],"sources":["esm/helpers/styleStaticConfig.native.js"],"sourcesContent":["import { stylePropsText, validStyles as validStylesView } from \"@tamagui/helpers\";\nimport { getConfigRevisionState } from \"./grammarConfig\";\nvar styleStaticConfigCache = /* @__PURE__ */ new WeakMap();\nfunction getStyleStaticConfig(staticConfig, conf) {\n var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;\n var configCache = styleStaticConfigCache.get(staticConfig);\n var revision = getConfigRevisionState(conf).revision;\n var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);\n if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;\n var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);\n var variants = normalized ? normalized.variants : staticConfig.variants;\n var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;\n var authoredDefaultProps = staticConfig.defaultProps;\n var baseStyle;\n var baseVariantProps;\n var defaultProps;\n if (authoredDefaultProps) {\n var validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStylesView);\n for (var key in authoredDefaultProps) {\n var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);\n var isStyle = key !== \"transition\" && (key in validStyles || key in conf.shorthands);\n if (isVariant || isStyle) {\n ;\n (baseStyle || (baseStyle = authoredBaseStyle ? {\n ...authoredBaseStyle\n } : {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant || !isStyle) {\n ;\n (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant) {\n ;\n (baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];\n }\n }\n }\n var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);\n var value = {\n baseStyle: baseStyle || authoredBaseStyle,\n baseVariantProps,\n defaultProps,\n styledContextKeys: keys ? new Set(keys) : null,\n variants,\n passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName\n };\n if (!configCache) {\n configCache = /* @__PURE__ */ new WeakMap();\n styleStaticConfigCache.set(staticConfig, configCache);\n }\n configCache.set(conf, {\n revision,\n value\n });\n return value;\n}\nexport {\n getStyleStaticConfig\n};\n//# sourceMappingURL=styleStaticConfig.js.map\n"],"mappings":";;;;AAEA,IAAI,yCAAyC,IAAI,QAAQ;AACzD,SAAS,qBAAqB,cAAc,MAAM;CAChD,IAAI,mDAAmD,6BAA6B;CACpF,IAAI,cAAc,uBAAuB,IAAI,YAAY;CACzD,IAAI,WAAW,uBAAuB,IAAI,CAAC,CAAC;CAC5C,IAAI,SAAS,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,IAAI,IAAI;CAC3F,KAAK,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,cAAc,UAAU,OAAO,OAAO;CAClG,IAAI,cAAc,8BAA8B,aAAa,mBAAmB,QAAQ,gCAAgC,KAAK,IAAI,KAAK,KAAK,oDAAoD,4BAA4B,2BAA2B,QAAQ,sDAAsD,KAAK,IAAI,KAAK,IAAI,kDAAkD,KAAK,6BAA6B,cAAc,IAAI;CAC5a,IAAI,WAAW,aAAa,WAAW,WAAW,aAAa;CAC/D,IAAI,oBAAoB,aAAa,WAAW,YAAY,aAAa;CACzE,IAAI,uBAAuB,aAAa;CACxC,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI,sBAAsB;EACxB,IAAIA,gBAAc,aAAa,gBAAgB,aAAa,UAAU,aAAa,UAAU,iBAAiBC;EAC9G,KAAK,IAAI,OAAO,sBAAsB;GACpC,IAAI,YAAY,QAAQ,aAAa,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,IAAI;GACzF,IAAI,UAAU,QAAQ,iBAAiB,OAAOD,iBAAe,OAAO,KAAK;GACzE,IAAI,aAAa,SAAS;IACxB;IACA,CAAC,cAAc,YAAY,oBAAoB,EAC7C,GAAG,kBACL,IAAI,CAAC,GAAE,CAAE,OAAO,qBAAqB;GACvC;GACA,IAAI,aAAa,CAAC,SAAS;IACzB;IACA,CAAC,iBAAiB,eAAe,CAAC,GAAE,CAAE,OAAO,qBAAqB;GACpE;GACA,IAAI,WAAW;IACb;IACA,CAAC,qBAAqB,mBAAmB,CAAC,GAAE,CAAE,OAAO,qBAAqB;GAC5E;EACF;CACF;CACA,IAAI,OAAO,aAAa,kBAAkB,wBAAwB,aAAa,aAAa,QAAQ,0BAA0B,KAAK,IAAI,KAAK,IAAI,sBAAsB;CACtK,IAAI,QAAQ;EACV,WAAW,aAAa;EACxB;EACA;EACA,mBAAmB,OAAO,IAAI,IAAI,IAAI,IAAI;EAC1C;EACA,sBAAsB,aAAa,WAAW,uBAAuB,aAAa;CACpF;CACA,IAAI,CAAC,aAAa;EAChB,8BAA8B,IAAI,QAAQ;EAC1C,uBAAuB,IAAI,cAAc,WAAW;CACtD;CACA,YAAY,IAAI,MAAM;EACpB;EACA;CACF,CAAC;CACD,OAAO;AACT"}
|
|
@@ -1,79 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getTokenCategoryName, propToTokenCategoryCode, tokenCategoryColor, tokenCategoryFontFamily, tokenCategoryFontSize, tokenCategoryFontWeight, tokenCategoryLetterSpacing, tokenCategoryLineHeight, tokenCategoryRadius, tokenCategorySize, tokenCategorySpace, tokenCategoryZIndex } from "@tamagui/helpers";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const tokenCategoryByProperty = {
|
|
7
|
-
...mapTokenCategory(tokenCategories.size, "size"),
|
|
8
|
-
...mapTokenCategory(tokenCategories.radius, "radius"),
|
|
9
|
-
...mapTokenCategory(tokenCategories.zIndex, "zIndex"),
|
|
10
|
-
x: "space",
|
|
11
|
-
y: "space",
|
|
12
|
-
fontSize: "fontSize",
|
|
13
|
-
borderWidth: "space",
|
|
14
|
-
borderTopWidth: "space",
|
|
15
|
-
borderRightWidth: "space",
|
|
16
|
-
borderBottomWidth: "space",
|
|
17
|
-
borderLeftWidth: "space",
|
|
18
|
-
borderBlockWidth: "space",
|
|
19
|
-
borderBlockStartWidth: "space",
|
|
20
|
-
borderBlockEndWidth: "space",
|
|
21
|
-
borderInlineWidth: "space",
|
|
22
|
-
borderInlineStartWidth: "space",
|
|
23
|
-
borderInlineEndWidth: "space",
|
|
24
|
-
outlineOffset: "space",
|
|
25
|
-
outlineWidth: "space",
|
|
26
|
-
gap: "space",
|
|
27
|
-
rowGap: "space",
|
|
28
|
-
columnGap: "space",
|
|
29
|
-
top: "space",
|
|
30
|
-
right: "space",
|
|
31
|
-
bottom: "space",
|
|
32
|
-
left: "space",
|
|
33
|
-
inset: "space",
|
|
34
|
-
insetBlock: "space",
|
|
35
|
-
insetBlockEnd: "space",
|
|
36
|
-
insetBlockStart: "space",
|
|
37
|
-
insetInline: "space",
|
|
38
|
-
insetInlineEnd: "space",
|
|
39
|
-
insetInlineStart: "space",
|
|
40
|
-
margin: "space",
|
|
41
|
-
marginBlock: "space",
|
|
42
|
-
marginBlockEnd: "space",
|
|
43
|
-
marginBlockStart: "space",
|
|
44
|
-
marginInline: "space",
|
|
45
|
-
marginInlineEnd: "space",
|
|
46
|
-
marginInlineStart: "space",
|
|
47
|
-
marginTop: "space",
|
|
48
|
-
marginRight: "space",
|
|
49
|
-
marginBottom: "space",
|
|
50
|
-
marginEnd: "space",
|
|
51
|
-
marginLeft: "space",
|
|
52
|
-
marginHorizontal: "space",
|
|
53
|
-
marginStart: "space",
|
|
54
|
-
marginVertical: "space",
|
|
55
|
-
padding: "space",
|
|
56
|
-
paddingBlock: "space",
|
|
57
|
-
paddingBlockEnd: "space",
|
|
58
|
-
paddingBlockStart: "space",
|
|
59
|
-
paddingInline: "space",
|
|
60
|
-
paddingInlineEnd: "space",
|
|
61
|
-
paddingInlineStart: "space",
|
|
62
|
-
paddingTop: "space",
|
|
63
|
-
paddingRight: "space",
|
|
64
|
-
paddingBottom: "space",
|
|
65
|
-
paddingEnd: "space",
|
|
66
|
-
paddingLeft: "space",
|
|
67
|
-
paddingHorizontal: "space",
|
|
68
|
-
paddingStart: "space",
|
|
69
|
-
paddingVertical: "space"
|
|
3
|
+
const legacyCategory = (property) => {
|
|
4
|
+
const category = getTokenCategoryName(propToTokenCategoryCode[property]);
|
|
5
|
+
return category === "space" || category === "size" || category === "radius" || category === "zIndex" || category === "fontSize" ? category : void 0;
|
|
70
6
|
};
|
|
7
|
+
const tokenCategoryByProperty = /* @__PURE__ */ new Proxy(/* @__PURE__ */ Object.create(null), {
|
|
8
|
+
get(_, property) {
|
|
9
|
+
return typeof property === "string" ? legacyCategory(property) : void 0;
|
|
10
|
+
},
|
|
11
|
+
has(_, property) {
|
|
12
|
+
return typeof property === "string" && legacyCategory(property) !== void 0;
|
|
13
|
+
},
|
|
14
|
+
ownKeys() {
|
|
15
|
+
return Object.keys(propToTokenCategoryCode).filter((property) => legacyCategory(property) !== void 0);
|
|
16
|
+
},
|
|
17
|
+
getOwnPropertyDescriptor(_, property) {
|
|
18
|
+
if (typeof property !== "string" || legacyCategory(property) === void 0) return;
|
|
19
|
+
return {
|
|
20
|
+
configurable: true,
|
|
21
|
+
enumerable: true
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
});
|
|
71
25
|
function getTokenCategoryForProperty(property) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return "
|
|
26
|
+
switch (propToTokenCategoryCode[property]) {
|
|
27
|
+
case tokenCategorySpace: return "space";
|
|
28
|
+
case tokenCategorySize: return "size";
|
|
29
|
+
case tokenCategoryRadius: return "radius";
|
|
30
|
+
case tokenCategoryZIndex: return "zIndex";
|
|
31
|
+
case tokenCategoryColor: return "color";
|
|
32
|
+
case tokenCategoryFontFamily: return "fontFamily";
|
|
33
|
+
case tokenCategoryFontSize:
|
|
34
|
+
case tokenCategoryFontWeight:
|
|
35
|
+
case tokenCategoryLineHeight:
|
|
36
|
+
case tokenCategoryLetterSpacing: return "font";
|
|
75
37
|
}
|
|
76
|
-
return tokenCategoryByProperty[property] || (property in tokenCategories.color ? "color" : void 0);
|
|
77
38
|
}
|
|
78
39
|
|
|
79
40
|
export { getTokenCategoryForProperty, tokenCategoryByProperty };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenCategories.js","names":[],"sources":["esm/helpers/tokenCategories.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"tokenCategories.js","names":[],"sources":["esm/helpers/tokenCategories.js"],"sourcesContent":["import {\n getTokenCategoryName,\n propToTokenCategoryCode,\n tokenCategoryColor,\n tokenCategoryFontFamily,\n tokenCategoryFontSize,\n tokenCategoryFontWeight,\n tokenCategoryLetterSpacing,\n tokenCategoryLineHeight,\n tokenCategoryRadius,\n tokenCategorySize,\n tokenCategorySpace,\n tokenCategoryZIndex\n} from \"@tamagui/helpers\";\nconst legacyCategory = (property) => {\n const category = getTokenCategoryName(propToTokenCategoryCode[property]);\n return category === \"space\" || category === \"size\" || category === \"radius\" || category === \"zIndex\" || category === \"fontSize\" ? category : void 0;\n};\nconst tokenCategoryByProperty = /* @__PURE__ */ new Proxy(/* @__PURE__ */ Object.create(null), {\n get(_, property) {\n return typeof property === \"string\" ? legacyCategory(property) : void 0;\n },\n has(_, property) {\n return typeof property === \"string\" && legacyCategory(property) !== void 0;\n },\n ownKeys() {\n return Object.keys(propToTokenCategoryCode).filter(\n (property) => legacyCategory(property) !== void 0\n );\n },\n getOwnPropertyDescriptor(_, property) {\n if (typeof property !== \"string\" || legacyCategory(property) === void 0) return;\n return { configurable: true, enumerable: true };\n }\n});\nfunction getTokenCategoryForProperty(property) {\n switch (propToTokenCategoryCode[property]) {\n case tokenCategorySpace:\n return \"space\";\n case tokenCategorySize:\n return \"size\";\n case tokenCategoryRadius:\n return \"radius\";\n case tokenCategoryZIndex:\n return \"zIndex\";\n case tokenCategoryColor:\n return \"color\";\n case tokenCategoryFontFamily:\n return \"fontFamily\";\n case tokenCategoryFontSize:\n case tokenCategoryFontWeight:\n case tokenCategoryLineHeight:\n case tokenCategoryLetterSpacing:\n return \"font\";\n }\n}\nexport {\n getTokenCategoryForProperty,\n tokenCategoryByProperty\n};\n//# sourceMappingURL=tokenCategories.js.map\n"],"mappings":";;;AAcA,MAAM,kBAAkB,aAAa;CACnC,MAAM,WAAW,qBAAqB,wBAAwB,SAAS;CACvE,OAAO,aAAa,WAAW,aAAa,UAAU,aAAa,YAAY,aAAa,YAAY,aAAa,aAAa,WAAW,KAAK;AACpJ;AACA,MAAM,0CAA0C,IAAI,MAAsB,uBAAO,OAAO,IAAI,GAAG;CAC7F,IAAI,GAAG,UAAU;EACf,OAAO,OAAO,aAAa,WAAW,eAAe,QAAQ,IAAI,KAAK;CACxE;CACA,IAAI,GAAG,UAAU;EACf,OAAO,OAAO,aAAa,YAAY,eAAe,QAAQ,MAAM,KAAK;CAC3E;CACA,UAAU;EACR,OAAO,OAAO,KAAK,uBAAuB,CAAC,CAAC,QACzC,aAAa,eAAe,QAAQ,MAAM,KAAK,CAClD;CACF;CACA,yBAAyB,GAAG,UAAU;EACpC,IAAI,OAAO,aAAa,YAAY,eAAe,QAAQ,MAAM,KAAK,GAAG;EACzE,OAAO;GAAE,cAAc;GAAM,YAAY;EAAK;CAChD;AACF,CAAC;AACD,SAAS,4BAA4B,UAAU;CAC7C,QAAQ,wBAAwB,WAAhC;EACE,KAAK,oBACH,OAAO;EACT,KAAK,mBACH,OAAO;EACT,KAAK,qBACH,OAAO;EACT,KAAK,qBACH,OAAO;EACT,KAAK,oBACH,OAAO;EACT,KAAK,yBACH,OAAO;EACT,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,4BACH,OAAO;CACX;AACF"}
|
|
@@ -1,81 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getTokenCategoryName, propToTokenCategoryCode, tokenCategoryColor, tokenCategoryFontFamily, tokenCategoryFontSize, tokenCategoryFontWeight, tokenCategoryLetterSpacing, tokenCategoryLineHeight, tokenCategoryRadius, tokenCategorySize, tokenCategorySpace, tokenCategoryZIndex } from "@tamagui/helpers";
|
|
2
2
|
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}));
|
|
7
|
-
}
|
|
8
|
-
var tokenCategoryByProperty = {
|
|
9
|
-
...mapTokenCategory(tokenCategories.size, "size"),
|
|
10
|
-
...mapTokenCategory(tokenCategories.radius, "radius"),
|
|
11
|
-
...mapTokenCategory(tokenCategories.zIndex, "zIndex"),
|
|
12
|
-
x: "space",
|
|
13
|
-
y: "space",
|
|
14
|
-
fontSize: "fontSize",
|
|
15
|
-
borderWidth: "space",
|
|
16
|
-
borderTopWidth: "space",
|
|
17
|
-
borderRightWidth: "space",
|
|
18
|
-
borderBottomWidth: "space",
|
|
19
|
-
borderLeftWidth: "space",
|
|
20
|
-
borderBlockWidth: "space",
|
|
21
|
-
borderBlockStartWidth: "space",
|
|
22
|
-
borderBlockEndWidth: "space",
|
|
23
|
-
borderInlineWidth: "space",
|
|
24
|
-
borderInlineStartWidth: "space",
|
|
25
|
-
borderInlineEndWidth: "space",
|
|
26
|
-
outlineOffset: "space",
|
|
27
|
-
outlineWidth: "space",
|
|
28
|
-
gap: "space",
|
|
29
|
-
rowGap: "space",
|
|
30
|
-
columnGap: "space",
|
|
31
|
-
top: "space",
|
|
32
|
-
right: "space",
|
|
33
|
-
bottom: "space",
|
|
34
|
-
left: "space",
|
|
35
|
-
inset: "space",
|
|
36
|
-
insetBlock: "space",
|
|
37
|
-
insetBlockEnd: "space",
|
|
38
|
-
insetBlockStart: "space",
|
|
39
|
-
insetInline: "space",
|
|
40
|
-
insetInlineEnd: "space",
|
|
41
|
-
insetInlineStart: "space",
|
|
42
|
-
margin: "space",
|
|
43
|
-
marginBlock: "space",
|
|
44
|
-
marginBlockEnd: "space",
|
|
45
|
-
marginBlockStart: "space",
|
|
46
|
-
marginInline: "space",
|
|
47
|
-
marginInlineEnd: "space",
|
|
48
|
-
marginInlineStart: "space",
|
|
49
|
-
marginTop: "space",
|
|
50
|
-
marginRight: "space",
|
|
51
|
-
marginBottom: "space",
|
|
52
|
-
marginEnd: "space",
|
|
53
|
-
marginLeft: "space",
|
|
54
|
-
marginHorizontal: "space",
|
|
55
|
-
marginStart: "space",
|
|
56
|
-
marginVertical: "space",
|
|
57
|
-
padding: "space",
|
|
58
|
-
paddingBlock: "space",
|
|
59
|
-
paddingBlockEnd: "space",
|
|
60
|
-
paddingBlockStart: "space",
|
|
61
|
-
paddingInline: "space",
|
|
62
|
-
paddingInlineEnd: "space",
|
|
63
|
-
paddingInlineStart: "space",
|
|
64
|
-
paddingTop: "space",
|
|
65
|
-
paddingRight: "space",
|
|
66
|
-
paddingBottom: "space",
|
|
67
|
-
paddingEnd: "space",
|
|
68
|
-
paddingLeft: "space",
|
|
69
|
-
paddingHorizontal: "space",
|
|
70
|
-
paddingStart: "space",
|
|
71
|
-
paddingVertical: "space"
|
|
3
|
+
var legacyCategory = function(property) {
|
|
4
|
+
var category = getTokenCategoryName(propToTokenCategoryCode[property]);
|
|
5
|
+
return category === "space" || category === "size" || category === "radius" || category === "zIndex" || category === "fontSize" ? category : void 0;
|
|
72
6
|
};
|
|
7
|
+
var tokenCategoryByProperty = /* @__PURE__ */ new Proxy(/* @__PURE__ */ Object.create(null), {
|
|
8
|
+
get(_, property) {
|
|
9
|
+
return typeof property === "string" ? legacyCategory(property) : void 0;
|
|
10
|
+
},
|
|
11
|
+
has(_, property) {
|
|
12
|
+
return typeof property === "string" && legacyCategory(property) !== void 0;
|
|
13
|
+
},
|
|
14
|
+
ownKeys() {
|
|
15
|
+
return Object.keys(propToTokenCategoryCode).filter(function(property) {
|
|
16
|
+
return legacyCategory(property) !== void 0;
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
getOwnPropertyDescriptor(_, property) {
|
|
20
|
+
if (typeof property !== "string" || legacyCategory(property) === void 0) return;
|
|
21
|
+
return {
|
|
22
|
+
configurable: true,
|
|
23
|
+
enumerable: true
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
73
27
|
function getTokenCategoryForProperty(property) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return "
|
|
28
|
+
switch (propToTokenCategoryCode[property]) {
|
|
29
|
+
case tokenCategorySpace: return "space";
|
|
30
|
+
case tokenCategorySize: return "size";
|
|
31
|
+
case tokenCategoryRadius: return "radius";
|
|
32
|
+
case tokenCategoryZIndex: return "zIndex";
|
|
33
|
+
case tokenCategoryColor: return "color";
|
|
34
|
+
case tokenCategoryFontFamily: return "fontFamily";
|
|
35
|
+
case tokenCategoryFontSize:
|
|
36
|
+
case tokenCategoryFontWeight:
|
|
37
|
+
case tokenCategoryLineHeight:
|
|
38
|
+
case tokenCategoryLetterSpacing: return "font";
|
|
77
39
|
}
|
|
78
|
-
return tokenCategoryByProperty[property] || (property in tokenCategories.color ? "color" : void 0);
|
|
79
40
|
}
|
|
80
41
|
|
|
81
42
|
export { getTokenCategoryForProperty, tokenCategoryByProperty };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenCategories.native.js","names":[],"sources":["esm/helpers/tokenCategories.native.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"tokenCategories.native.js","names":[],"sources":["esm/helpers/tokenCategories.native.js"],"sourcesContent":["import { getTokenCategoryName, propToTokenCategoryCode, tokenCategoryColor, tokenCategoryFontFamily, tokenCategoryFontSize, tokenCategoryFontWeight, tokenCategoryLetterSpacing, tokenCategoryLineHeight, tokenCategoryRadius, tokenCategorySize, tokenCategorySpace, tokenCategoryZIndex } from \"@tamagui/helpers\";\nvar legacyCategory = function(property) {\n var category = getTokenCategoryName(propToTokenCategoryCode[property]);\n return category === \"space\" || category === \"size\" || category === \"radius\" || category === \"zIndex\" || category === \"fontSize\" ? category : void 0;\n};\nvar tokenCategoryByProperty = /* @__PURE__ */ new Proxy(/* @__PURE__ */ Object.create(null), {\n get(_, property) {\n return typeof property === \"string\" ? legacyCategory(property) : void 0;\n },\n has(_, property) {\n return typeof property === \"string\" && legacyCategory(property) !== void 0;\n },\n ownKeys() {\n return Object.keys(propToTokenCategoryCode).filter(function(property) {\n return legacyCategory(property) !== void 0;\n });\n },\n getOwnPropertyDescriptor(_, property) {\n if (typeof property !== \"string\" || legacyCategory(property) === void 0) return;\n return {\n configurable: true,\n enumerable: true\n };\n }\n});\nfunction getTokenCategoryForProperty(property) {\n switch (propToTokenCategoryCode[property]) {\n case tokenCategorySpace:\n return \"space\";\n case tokenCategorySize:\n return \"size\";\n case tokenCategoryRadius:\n return \"radius\";\n case tokenCategoryZIndex:\n return \"zIndex\";\n case tokenCategoryColor:\n return \"color\";\n case tokenCategoryFontFamily:\n return \"fontFamily\";\n case tokenCategoryFontSize:\n case tokenCategoryFontWeight:\n case tokenCategoryLineHeight:\n case tokenCategoryLetterSpacing:\n return \"font\";\n }\n}\nexport {\n getTokenCategoryForProperty,\n tokenCategoryByProperty\n};\n//# sourceMappingURL=tokenCategories.js.map\n"],"mappings":";;;AACA,IAAI,iBAAiB,SAAS,UAAU;CACtC,IAAI,WAAW,qBAAqB,wBAAwB,SAAS;CACrE,OAAO,aAAa,WAAW,aAAa,UAAU,aAAa,YAAY,aAAa,YAAY,aAAa,aAAa,WAAW,KAAK;AACpJ;AACA,IAAI,0CAA0C,IAAI,MAAsB,uBAAO,OAAO,IAAI,GAAG;CAC3F,IAAI,GAAG,UAAU;EACf,OAAO,OAAO,aAAa,WAAW,eAAe,QAAQ,IAAI,KAAK;CACxE;CACA,IAAI,GAAG,UAAU;EACf,OAAO,OAAO,aAAa,YAAY,eAAe,QAAQ,MAAM,KAAK;CAC3E;CACA,UAAU;EACR,OAAO,OAAO,KAAK,uBAAuB,CAAC,CAAC,OAAO,SAAS,UAAU;GACpE,OAAO,eAAe,QAAQ,MAAM,KAAK;EAC3C,CAAC;CACH;CACA,yBAAyB,GAAG,UAAU;EACpC,IAAI,OAAO,aAAa,YAAY,eAAe,QAAQ,MAAM,KAAK,GAAG;EACzE,OAAO;GACL,cAAc;GACd,YAAY;EACd;CACF;AACF,CAAC;AACD,SAAS,4BAA4B,UAAU;CAC7C,QAAQ,wBAAwB,WAAhC;EACE,KAAK,oBACH,OAAO;EACT,KAAK,mBACH,OAAO;EACT,KAAK,qBACH,OAAO;EACT,KAAK,qBACH,OAAO;EACT,KAAK,oBACH,OAAO;EACT,KAAK,yBACH,OAAO;EACT,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,4BACH,OAAO;CACX;AACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { isVariable } from "../createVariable.mjs";
|
|
2
|
+
|
|
3
|
+
const variantResolverCache = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function getCompiledVariantResolvers(variant) {
|
|
5
|
+
let compiled = variantResolverCache.get(variant);
|
|
6
|
+
if (!compiled) {
|
|
7
|
+
const next = [];
|
|
8
|
+
for (const key in variant) {
|
|
9
|
+
const parts = parseVariantResolverKey(key);
|
|
10
|
+
if (parts) next.push({
|
|
11
|
+
key,
|
|
12
|
+
parts
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
compiled = next;
|
|
16
|
+
variantResolverCache.set(variant, compiled);
|
|
17
|
+
}
|
|
18
|
+
return compiled;
|
|
19
|
+
}
|
|
20
|
+
function parseVariantResolverKey(key) {
|
|
21
|
+
if (!key) return null;
|
|
22
|
+
return key.split("|").map((part) => part.trim());
|
|
23
|
+
}
|
|
24
|
+
function getVariantDefinition(variant, value, conf, { theme }) {
|
|
25
|
+
if (!variant) return;
|
|
26
|
+
if (value === void 0) return;
|
|
27
|
+
if (typeof variant === "function") {
|
|
28
|
+
return variant;
|
|
29
|
+
}
|
|
30
|
+
if (value in variant) {
|
|
31
|
+
return variant[value];
|
|
32
|
+
}
|
|
33
|
+
for (const { key, parts } of getCompiledVariantResolvers(variant)) {
|
|
34
|
+
for (const part of parts) {
|
|
35
|
+
if (matchesVariantResolver(part, value, conf, theme)) {
|
|
36
|
+
return variant[key];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function matchesVariantResolver(resolverName, value, conf, theme) {
|
|
42
|
+
const string = typeof value === "string";
|
|
43
|
+
const number = typeof value === "number";
|
|
44
|
+
const rem = string && value.length > 3 && value.endsWith("rem") && Number.isFinite(Number(value.slice(0, -3)));
|
|
45
|
+
switch (resolverName) {
|
|
46
|
+
case "Size":
|
|
47
|
+
case "Space":
|
|
48
|
+
case "Radius":
|
|
49
|
+
case "ZIndex": return value === true || number || string || resolverName !== "Size" && isVariable(value);
|
|
50
|
+
case "Color": return string;
|
|
51
|
+
case "Theme": return string && !!theme && value in theme;
|
|
52
|
+
case "FontSize": return value === true || !!conf.fontsParsed.body?.size?.[value] || number || rem;
|
|
53
|
+
case "FontStyle": return !!conf.fontsParsed.body?.style?.[value] || value === "normal" || value === "italic";
|
|
54
|
+
case "FontTransform": return !!conf.fontsParsed.body?.transform?.[value] || value === "none" || value === "capitalize" || value === "uppercase" || value === "lowercase";
|
|
55
|
+
case "FontLineHeight": return !!conf.fontsParsed.body?.lineHeight?.[value] || number || rem;
|
|
56
|
+
case "FontLetterSpacing": return !!conf.fontsParsed.body?.letterSpacing?.[value] || number || rem;
|
|
57
|
+
case "number":
|
|
58
|
+
case "string":
|
|
59
|
+
case "boolean": return typeof value === resolverName;
|
|
60
|
+
case "any": return true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { getCompiledVariantResolvers, getVariantDefinition };
|
|
65
|
+
//# sourceMappingURL=variantResolvers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variantResolvers.js","names":[],"sources":["esm/helpers/variantResolvers.js"],"sourcesContent":["import { isVariable } from \"../createVariable\";\nconst variantResolverCache = /* @__PURE__ */ new WeakMap();\nfunction getCompiledVariantResolvers(variant) {\n let compiled = variantResolverCache.get(variant);\n if (!compiled) {\n const next = [];\n for (const key in variant) {\n const parts = parseVariantResolverKey(key);\n if (parts) next.push({ key, parts });\n }\n compiled = next;\n variantResolverCache.set(variant, compiled);\n }\n return compiled;\n}\nfunction parseVariantResolverKey(key) {\n if (!key) return null;\n return key.split(\"|\").map((part) => part.trim());\n}\nfunction getVariantDefinition(variant, value, conf, { theme }) {\n if (!variant) return;\n if (value === void 0) return;\n if (typeof variant === \"function\") {\n return variant;\n }\n if (value in variant) {\n return variant[value];\n }\n for (const { key, parts } of getCompiledVariantResolvers(variant)) {\n for (const part of parts) {\n if (matchesVariantResolver(part, value, conf, theme)) {\n return variant[key];\n }\n }\n }\n}\nfunction matchesVariantResolver(resolverName, value, conf, theme) {\n const string = typeof value === \"string\";\n const number = typeof value === \"number\";\n const rem = string && value.length > 3 && value.endsWith(\"rem\") && Number.isFinite(Number(value.slice(0, -3)));\n switch (resolverName) {\n case \"Size\":\n case \"Space\":\n case \"Radius\":\n case \"ZIndex\":\n return value === true || number || string || resolverName !== \"Size\" && isVariable(value);\n // a token or theme color, otherwise any string is taken to be a raw CSS\n // color and left for the browser to resolve. checking that against a CSS\n // color-name table costs 2.3KB gzip to reject values that were never valid\n // anyway. `red/50` opacity modifiers stay limited to token and theme\n // colors, which the branches above already covered.\n case \"Color\":\n return string;\n case \"Theme\":\n return string && !!theme && value in theme;\n case \"FontSize\":\n return value === true || !!conf.fontsParsed.body?.size?.[value] || number || rem;\n case \"FontStyle\":\n return !!conf.fontsParsed.body?.style?.[value] || value === \"normal\" || value === \"italic\";\n case \"FontTransform\":\n return !!conf.fontsParsed.body?.transform?.[value] || value === \"none\" || value === \"capitalize\" || value === \"uppercase\" || value === \"lowercase\";\n case \"FontLineHeight\":\n return !!conf.fontsParsed.body?.lineHeight?.[value] || number || rem;\n case \"FontLetterSpacing\":\n return !!conf.fontsParsed.body?.letterSpacing?.[value] || number || rem;\n case \"number\":\n case \"string\":\n case \"boolean\":\n return typeof value === resolverName;\n case \"any\":\n return true;\n }\n}\nexport {\n getCompiledVariantResolvers,\n getVariantDefinition\n};\n//# sourceMappingURL=variantResolvers.js.map\n"],"mappings":";;;AACA,MAAM,uCAAuC,IAAI,QAAQ;AACzD,SAAS,4BAA4B,SAAS;CAC5C,IAAI,WAAW,qBAAqB,IAAI,OAAO;CAC/C,IAAI,CAAC,UAAU;EACb,MAAM,OAAO,CAAC;EACd,KAAK,MAAM,OAAO,SAAS;GACzB,MAAM,QAAQ,wBAAwB,GAAG;GACzC,IAAI,OAAO,KAAK,KAAK;IAAE;IAAK;GAAM,CAAC;EACrC;EACA,WAAW;EACX,qBAAqB,IAAI,SAAS,QAAQ;CAC5C;CACA,OAAO;AACT;AACA,SAAS,wBAAwB,KAAK;CACpC,IAAI,CAAC,KAAK,OAAO;CACjB,OAAO,IAAI,MAAM,GAAG,CAAC,CAAC,KAAK,SAAS,KAAK,KAAK,CAAC;AACjD;AACA,SAAS,qBAAqB,SAAS,OAAO,MAAM,EAAE,SAAS;CAC7D,IAAI,CAAC,SAAS;CACd,IAAI,UAAU,KAAK,GAAG;CACtB,IAAI,OAAO,YAAY,YAAY;EACjC,OAAO;CACT;CACA,IAAI,SAAS,SAAS;EACpB,OAAO,QAAQ;CACjB;CACA,KAAK,MAAM,EAAE,KAAK,WAAW,4BAA4B,OAAO,GAAG;EACjE,KAAK,MAAM,QAAQ,OAAO;GACxB,IAAI,uBAAuB,MAAM,OAAO,MAAM,KAAK,GAAG;IACpD,OAAO,QAAQ;GACjB;EACF;CACF;AACF;AACA,SAAS,uBAAuB,cAAc,OAAO,MAAM,OAAO;CAChE,MAAM,SAAS,OAAO,UAAU;CAChC,MAAM,SAAS,OAAO,UAAU;CAChC,MAAM,MAAM,UAAU,MAAM,SAAS,KAAK,MAAM,SAAS,KAAK,KAAK,OAAO,SAAS,OAAO,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;CAC7G,QAAQ,cAAR;EACE,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,UACH,OAAO,UAAU,QAAQ,UAAU,UAAU,iBAAiB,UAAU,WAAW,KAAK;EAM1F,KAAK,SACH,OAAO;EACT,KAAK,SACH,OAAO,UAAU,CAAC,CAAC,SAAS,SAAS;EACvC,KAAK,YACH,OAAO,UAAU,QAAQ,CAAC,CAAC,KAAK,YAAY,MAAM,OAAO,UAAU,UAAU;EAC/E,KAAK,aACH,OAAO,CAAC,CAAC,KAAK,YAAY,MAAM,QAAQ,UAAU,UAAU,YAAY,UAAU;EACpF,KAAK,iBACH,OAAO,CAAC,CAAC,KAAK,YAAY,MAAM,YAAY,UAAU,UAAU,UAAU,UAAU,gBAAgB,UAAU,eAAe,UAAU;EACzI,KAAK,kBACH,OAAO,CAAC,CAAC,KAAK,YAAY,MAAM,aAAa,UAAU,UAAU;EACnE,KAAK,qBACH,OAAO,CAAC,CAAC,KAAK,YAAY,MAAM,gBAAgB,UAAU,UAAU;EACtE,KAAK;EACL,KAAK;EACL,KAAK,WACH,OAAO,OAAO,UAAU;EAC1B,KAAK,OACH,OAAO;CACX;AACF"}
|