@tamagui/web 3.0.0-beta.1216.1 → 3.0.0-beta.1310.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/createComponent.cjs +4 -6
- package/dist/cjs/createComponent.native.cjs +3 -5
- package/dist/cjs/createComponent.native.js +3 -5
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +9 -7
- package/dist/cjs/helpers/createDesignSystem.native.cjs +4 -4
- package/dist/cjs/helpers/createDesignSystem.native.js +4 -4
- package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyle.native.cjs +0 -1
- package/dist/cjs/helpers/expandStyle.native.js +0 -1
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyles.cjs +8 -2
- package/dist/cjs/helpers/expandStyles.native.cjs +7 -7
- package/dist/cjs/helpers/expandStyles.native.js +7 -7
- package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +7 -2
- package/dist/cjs/helpers/getSplitStyles.native.cjs +21 -6
- package/dist/cjs/helpers/getSplitStyles.native.js +21 -6
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.cjs +6 -6
- package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +3 -2
- package/dist/cjs/views/Theme.native.cjs +3 -2
- package/dist/cjs/views/Theme.native.js +3 -2
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +4 -15
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +3 -14
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/helpers/createDesignSystem.mjs +9 -7
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createDesignSystem.native.js +4 -4
- package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +1 -2
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyles.mjs +8 -2
- package/dist/esm/helpers/expandStyles.mjs.map +1 -1
- package/dist/esm/helpers/expandStyles.native.js +7 -7
- package/dist/esm/helpers/expandStyles.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +7 -2
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +21 -6
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs +6 -6
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
- package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
- package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +3 -2
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +3 -2
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/package.json +17 -18
- package/src/createComponent.tsx +18 -12
- package/src/dom/styleTypes.ts +1 -1
- package/src/helpers/createDesignSystem.ts +19 -5
- package/src/helpers/expandStyle.ts +0 -4
- package/src/helpers/expandStyles.ts +0 -9
- package/src/helpers/getSplitStyles.tsx +82 -15
- package/src/helpers/getThemeCSSRules.ts +8 -5
- package/src/helpers/nativeOnlyProps.ts +0 -1
- package/src/interfaces/RNExclusiveTypes.ts +0 -2
- package/src/types.tsx +9 -0
- package/src/views/Theme.tsx +7 -4
- package/types/createComponent.d.ts.map +1 -1
- package/types/dom/styleTypes.d.ts +1 -1
- package/types/dom/styleTypes.d.ts.map +1 -1
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/expandStyle.d.ts.map +1 -1
- package/types/helpers/expandStyles.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
- package/types/helpers/nativeOnlyProps.d.ts +0 -1
- package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
- package/types/interfaces/RNExclusiveTypes.d.ts +1 -2
- package/types/interfaces/RNExclusiveTypes.d.ts.map +1 -1
- package/types/types.d.ts +3 -0
- package/types/types.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/dist/cjs/helpers/timer.cjs +0 -28
- package/dist/cjs/helpers/timer.native.cjs +0 -30
- package/dist/cjs/helpers/timer.native.js +0 -32
- package/dist/cjs/helpers/timer.native.js.map +0 -1
- package/dist/esm/helpers/timer.mjs +0 -13
- package/dist/esm/helpers/timer.mjs.map +0 -1
- package/dist/esm/helpers/timer.native.js +0 -13
- package/dist/esm/helpers/timer.native.js.map +0 -1
- package/src/helpers/timer.ts +0 -9
- package/types/helpers/timer.d.ts +0 -2
- package/types/helpers/timer.d.ts.map +0 -1
|
@@ -75,11 +75,11 @@ function createFontCSS(fontsParsed, registerFontVariables) {
|
|
|
75
75
|
function buildCSSRuleSets(declarations, fontDeclarations, defaultFontToken = "") {
|
|
76
76
|
if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
|
|
77
77
|
let declarationsToRuleSet = function(decs, selector = "") {
|
|
78
|
-
return `:root${selector}
|
|
79
|
-
}`;
|
|
78
|
+
return `:root${selector}${sep}{${sep}${[...decs].join(`;${sep}`)}${developmentWhitespace ? "\n" : ""}}`;
|
|
80
79
|
};
|
|
81
80
|
const cssRuleSets = [];
|
|
82
|
-
const
|
|
81
|
+
const developmentWhitespace = process.env.NODE_ENV === "development";
|
|
82
|
+
const sep = developmentWhitespace ? " " : "";
|
|
83
83
|
if (declarations.length) cssRuleSets.push(declarationsToRuleSet(declarations));
|
|
84
84
|
const fontSelectors = [];
|
|
85
85
|
const sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort();
|
|
@@ -94,7 +94,7 @@ function buildCSSRuleSets(declarations, fontDeclarations, defaultFontToken = "")
|
|
|
94
94
|
if (fontSelectors.length) {
|
|
95
95
|
if (fontDeclarations[defaultFontToken]?.fontParsed) {
|
|
96
96
|
const sharedSelectors = `:where(${[...fontSelectors, ".is_View"].join(", ")})`;
|
|
97
|
-
cssRuleSets.push(`${sharedSelectors}
|
|
97
|
+
cssRuleSets.push(`${sharedSelectors}${sep}{font-family:${sep}var(--f-family)}`);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
return cssRuleSets;
|
|
@@ -134,7 +134,8 @@ const getStaticCSS = (themeConfig, separator, withThemes, state) => {
|
|
|
134
134
|
if (hit !== void 0) return hit;
|
|
135
135
|
const themeRules = withThemes ? themeConfig.getThemeRulesSets().join(separator) : "";
|
|
136
136
|
const autoVariableCSS = (0, import_registerCSSVariable.getAutoVariableCSS)();
|
|
137
|
-
const
|
|
137
|
+
const autoVarCSS = autoVariableCSS ? `:root{${autoVariableCSS}}` : "";
|
|
138
|
+
const baseDesignSystem = `._ovs-contain {overscroll-behavior:contain;}
|
|
138
139
|
.t_unmounted .is_View, .t_unmounted .is_Text { transition: none !important; }
|
|
139
140
|
:where(.is_View) { display: flex; align-items: stretch; flex-direction: column; flex-basis: auto; box-sizing: border-box; min-height: 0; min-width: 0; flex-shrink: 0; }
|
|
140
141
|
:where(.is_Text) { display: inline; box-sizing: border-box; word-wrap: break-word; white-space: pre-wrap; margin: 0; }
|
|
@@ -146,8 +147,9 @@ const getStaticCSS = (themeConfig, separator, withThemes, state) => {
|
|
|
146
147
|
._hsb-x::-webkit-scrollbar:horizontal { display: none !important; }
|
|
147
148
|
._hsb-y::-webkit-scrollbar:vertical { display: none !important; }
|
|
148
149
|
._hsb-x { scrollbar-width: none !important; }
|
|
149
|
-
._hsb-y { scrollbar-width: none !important; }
|
|
150
|
-
|
|
150
|
+
._hsb-y { scrollbar-width: none !important; }`;
|
|
151
|
+
const css = `${`${process.env.NODE_ENV === "production" ? baseDesignSystem.replaceAll(" {", "{").replaceAll("{ ", "{").replaceAll(": ", ":").replaceAll("; ", ";").replaceAll(";}", "}").replaceAll("\n", "") : baseDesignSystem}
|
|
152
|
+
${autoVarCSS}
|
|
151
153
|
${themeConfig.cssRuleSets.join(separator)}`}
|
|
152
154
|
${themeRules}
|
|
153
155
|
`;
|
|
@@ -117,11 +117,11 @@ function buildCSSRuleSets(declarations, fontDeclarations) {
|
|
|
117
117
|
var defaultFontToken = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
118
118
|
if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
|
|
119
119
|
let declarationsToRuleSet2 = function(decs) {
|
|
120
|
-
return `:root${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""}
|
|
121
|
-
}`;
|
|
120
|
+
return `:root${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""}${sep}{${sep}${[...decs].join(`;${sep}`)}${developmentWhitespace ? "\n" : ""}}`;
|
|
122
121
|
};
|
|
123
122
|
var cssRuleSets = [];
|
|
124
|
-
var
|
|
123
|
+
var developmentWhitespace = process.env.NODE_ENV === "development";
|
|
124
|
+
var sep = developmentWhitespace ? " " : "";
|
|
125
125
|
if (declarations.length) cssRuleSets.push(declarationsToRuleSet2(declarations));
|
|
126
126
|
var fontSelectors = [];
|
|
127
127
|
var sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort();
|
|
@@ -149,7 +149,7 @@ function buildCSSRuleSets(declarations, fontDeclarations) {
|
|
|
149
149
|
var defaultFont = fontDeclarations[defaultFontToken];
|
|
150
150
|
if (defaultFont === null || defaultFont === void 0 ? void 0 : defaultFont.fontParsed) {
|
|
151
151
|
var sharedSelectors = `:where(${[...fontSelectors, ".is_View"].join(", ")})`;
|
|
152
|
-
cssRuleSets.push(`${sharedSelectors}
|
|
152
|
+
cssRuleSets.push(`${sharedSelectors}${sep}{font-family:${sep}var(--f-family)}`);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
return cssRuleSets;
|
|
@@ -117,11 +117,11 @@ function buildCSSRuleSets(declarations, fontDeclarations) {
|
|
|
117
117
|
var defaultFontToken = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
118
118
|
if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
|
|
119
119
|
let declarationsToRuleSet2 = function(decs) {
|
|
120
|
-
return `:root${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""}
|
|
121
|
-
}`;
|
|
120
|
+
return `:root${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""}${sep}{${sep}${[...decs].join(`;${sep}`)}${developmentWhitespace ? "\n" : ""}}`;
|
|
122
121
|
};
|
|
123
122
|
var cssRuleSets = [];
|
|
124
|
-
var
|
|
123
|
+
var developmentWhitespace = process.env.NODE_ENV === "development";
|
|
124
|
+
var sep = developmentWhitespace ? " " : "";
|
|
125
125
|
if (declarations.length) cssRuleSets.push(declarationsToRuleSet2(declarations));
|
|
126
126
|
var fontSelectors = [];
|
|
127
127
|
var sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort();
|
|
@@ -149,7 +149,7 @@ function buildCSSRuleSets(declarations, fontDeclarations) {
|
|
|
149
149
|
var defaultFont = fontDeclarations[defaultFontToken];
|
|
150
150
|
if (defaultFont === null || defaultFont === void 0 ? void 0 : defaultFont.fontParsed) {
|
|
151
151
|
var sharedSelectors = `:where(${[...fontSelectors, ".is_View"].join(", ")})`;
|
|
152
|
-
cssRuleSets.push(`${sharedSelectors}
|
|
152
|
+
cssRuleSets.push(`${sharedSelectors}${sep}{font-family:${sep}var(--f-family)}`);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
return cssRuleSets;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDesignSystem.native.js","names":[],"sources":["cjs/helpers/createDesignSystem.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar createDesignSystem_exports = {};\n__export(createDesignSystem_exports, {\n\tbuildCSSRuleSets: () => buildCSSRuleSets,\n\tcreateFontCSS: () => createFontCSS,\n\tcreateThemeCSS: () => createThemeCSS,\n\tcreateTokenCSS: () => createTokenCSS,\n\tgetCSS: () => getCSS\n});\nmodule.exports = __toCommonJS(createDesignSystem_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_registerCSSVariable = require(\"./registerCSSVariable\");\nrequire(\"../config\");\nvar import_getThemeCSSRules = require(\"./getThemeCSSRules\");\nrequire(\"./insertStyleRule\");\nfunction createTokenCSS(tokens, shouldTokenCategoryHaveUnits) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar declarations = [];\n\t\tvar sortedTokenKeys = Object.keys(tokens).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedTokenKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar key = _step.value;\n\t\t\t\tvar sortedSubKeys = Object.keys(tokens[key]).sort();\n\t\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator1 = sortedSubKeys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\t\tvar skey = _step1.value;\n\t\t\t\t\t\tvar variable = tokens[key][skey];\n\t\t\t\t\t\tif (import_constants.isWeb) {\n\t\t\t\t\t\t\t(0, import_registerCSSVariable.registerCSSVariable)(variable);\n\t\t\t\t\t\t\tvar variableNeedsPx = variable.needsPx === true;\n\t\t\t\t\t\t\tvar categoryNeedsPx = shouldTokenCategoryHaveUnits(key);\n\t\t\t\t\t\t\tvar shouldBeUnitless = !(variableNeedsPx || categoryNeedsPx);\n\t\t\t\t\t\t\tdeclarations.push((0, import_registerCSSVariable.variableToCSS)(variable, shouldBeUnitless));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t\t_iteratorError1 = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\treturn declarations;\n\t}\n\treturn [];\n}\nfunction createFontCSS(fontsParsed, registerFontVariables) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar fontDeclarations = {};\n\t\tif (!fontsParsed) return fontDeclarations;\n\t\tvar sortedFontKeys = Object.keys(fontsParsed).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedFontKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar key = _step.value;\n\t\t\t\tvar fontParsed = fontsParsed[key];\n\t\t\t\tvar [name, language] = key.includes(\"_\") ? key.split(\"_\") : [key];\n\t\t\t\tfontDeclarations[key] = {\n\t\t\t\t\tname,\n\t\t\t\t\tdeclarations: registerFontVariables(fontParsed),\n\t\t\t\t\tlanguage,\n\t\t\t\t\tfontParsed\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\treturn fontDeclarations;\n\t}\n\treturn {};\n}\nfunction buildCSSRuleSets(declarations, fontDeclarations) {\n\tvar defaultFontToken = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : \"\";\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tlet declarationsToRuleSet2 = function(decs) {\n\t\t\treturn `:root${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\"} {${sep}${[...decs].join(`;${sep}`)}\n}`;\n\t\t};\n\t\tvar cssRuleSets = [];\n\t\tvar sep = \" \";\n\t\tif (declarations.length) cssRuleSets.push(declarationsToRuleSet2(declarations));\n\t\tvar fontSelectors = [];\n\t\tvar sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedFontDeclarationKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar { name, declarations: _$declarations, language = \"default\" } = fontDeclarations[_step.value];\n\t\t\t\tvar fontSelector = `.font_${name}`;\n\t\t\t\tfontSelectors.push(fontSelector);\n\t\t\t\tvar langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`;\n\t\t\t\tvar specificRuleSet = declarationsToRuleSet2(_$declarations, language === \"default\" ? ` ${fontSelector}, ${langSelector}` : langSelector);\n\t\t\t\tcssRuleSets.push(specificRuleSet);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\tif (fontSelectors.length) {\n\t\t\tvar defaultFont = fontDeclarations[defaultFontToken];\n\t\t\tif (defaultFont === null || defaultFont === void 0 ? void 0 : defaultFont.fontParsed) {\n\t\t\t\tvar sharedSelectors = `:where(${[...fontSelectors, \".is_View\"].join(\", \")})`;\n\t\t\t\tcssRuleSets.push(`${sharedSelectors} {font-family: var(--f-family)}`);\n\t\t\t}\n\t\t}\n\t\treturn cssRuleSets;\n\t}\n\treturn [];\n}\nfunction createThemeCSS(dedupedThemes, configIn) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar themeRuleSets = [];\n\t\tif (import_constants.isWeb) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = dedupedThemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar { names, theme } = _step.value;\n\t\t\t\t\tvar nextRules = (0, import_getThemeCSSRules.getThemeCSSRules)({\n\t\t\t\t\t\tconfig: configIn,\n\t\t\t\t\t\tthemeName: names[0],\n\t\t\t\t\t\tnames,\n\t\t\t\t\t\ttheme\n\t\t\t\t\t});\n\t\t\t\t\tthemeRuleSets = [...themeRuleSets, ...nextRules];\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn themeRuleSets;\n\t}\n\treturn [];\n}\nfunction getCSS(themeConfig) {\n\targuments.length > 1 && arguments[1] !== void 0 && arguments[1];\n\targuments.length > 2 && arguments[2];\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);\n\treturn \"\";\n}\n//# sourceMappingURL=createDesignSystem.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OA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IAAI,0BAA0B;CAC3C,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"createDesignSystem.native.js","names":[],"sources":["cjs/helpers/createDesignSystem.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar createDesignSystem_exports = {};\n__export(createDesignSystem_exports, {\n\tbuildCSSRuleSets: () => buildCSSRuleSets,\n\tcreateFontCSS: () => createFontCSS,\n\tcreateThemeCSS: () => createThemeCSS,\n\tcreateTokenCSS: () => createTokenCSS,\n\tgetCSS: () => getCSS\n});\nmodule.exports = __toCommonJS(createDesignSystem_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_registerCSSVariable = require(\"./registerCSSVariable\");\nrequire(\"../config\");\nvar import_getThemeCSSRules = require(\"./getThemeCSSRules\");\nrequire(\"./insertStyleRule\");\nfunction createTokenCSS(tokens, shouldTokenCategoryHaveUnits) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar declarations = [];\n\t\tvar sortedTokenKeys = Object.keys(tokens).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedTokenKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar key = _step.value;\n\t\t\t\tvar sortedSubKeys = Object.keys(tokens[key]).sort();\n\t\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator1 = sortedSubKeys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\t\tvar skey = _step1.value;\n\t\t\t\t\t\tvar variable = tokens[key][skey];\n\t\t\t\t\t\tif (import_constants.isWeb) {\n\t\t\t\t\t\t\t(0, import_registerCSSVariable.registerCSSVariable)(variable);\n\t\t\t\t\t\t\tvar variableNeedsPx = variable.needsPx === true;\n\t\t\t\t\t\t\tvar categoryNeedsPx = shouldTokenCategoryHaveUnits(key);\n\t\t\t\t\t\t\tvar shouldBeUnitless = !(variableNeedsPx || categoryNeedsPx);\n\t\t\t\t\t\t\tdeclarations.push((0, import_registerCSSVariable.variableToCSS)(variable, shouldBeUnitless));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t\t_iteratorError1 = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\treturn declarations;\n\t}\n\treturn [];\n}\nfunction createFontCSS(fontsParsed, registerFontVariables) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar fontDeclarations = {};\n\t\tif (!fontsParsed) return fontDeclarations;\n\t\tvar sortedFontKeys = Object.keys(fontsParsed).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedFontKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar key = _step.value;\n\t\t\t\tvar fontParsed = fontsParsed[key];\n\t\t\t\tvar [name, language] = key.includes(\"_\") ? key.split(\"_\") : [key];\n\t\t\t\tfontDeclarations[key] = {\n\t\t\t\t\tname,\n\t\t\t\t\tdeclarations: registerFontVariables(fontParsed),\n\t\t\t\t\tlanguage,\n\t\t\t\t\tfontParsed\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\treturn fontDeclarations;\n\t}\n\treturn {};\n}\nfunction buildCSSRuleSets(declarations, fontDeclarations) {\n\tvar defaultFontToken = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : \"\";\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tlet declarationsToRuleSet2 = function(decs) {\n\t\t\treturn `:root${arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\"}${sep}{${sep}${[...decs].join(`;${sep}`)}${developmentWhitespace ? \"\\n\" : \"\"}}`;\n\t\t};\n\t\tvar cssRuleSets = [];\n\t\tvar developmentWhitespace = process.env.NODE_ENV === \"development\";\n\t\tvar sep = developmentWhitespace ? \" \" : \"\";\n\t\tif (declarations.length) cssRuleSets.push(declarationsToRuleSet2(declarations));\n\t\tvar fontSelectors = [];\n\t\tvar sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = sortedFontDeclarationKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar { name, declarations: _$declarations, language = \"default\" } = fontDeclarations[_step.value];\n\t\t\t\tvar fontSelector = `.font_${name}`;\n\t\t\t\tfontSelectors.push(fontSelector);\n\t\t\t\tvar langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`;\n\t\t\t\tvar specificRuleSet = declarationsToRuleSet2(_$declarations, language === \"default\" ? ` ${fontSelector}, ${langSelector}` : langSelector);\n\t\t\t\tcssRuleSets.push(specificRuleSet);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\tif (fontSelectors.length) {\n\t\t\tvar defaultFont = fontDeclarations[defaultFontToken];\n\t\t\tif (defaultFont === null || defaultFont === void 0 ? void 0 : defaultFont.fontParsed) {\n\t\t\t\tvar sharedSelectors = `:where(${[...fontSelectors, \".is_View\"].join(\", \")})`;\n\t\t\t\tcssRuleSets.push(`${sharedSelectors}${sep}{font-family:${sep}var(--f-family)}`);\n\t\t\t}\n\t\t}\n\t\treturn cssRuleSets;\n\t}\n\treturn [];\n}\nfunction createThemeCSS(dedupedThemes, configIn) {\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS) {\n\t\tvar themeRuleSets = [];\n\t\tif (import_constants.isWeb) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = dedupedThemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar { names, theme } = _step.value;\n\t\t\t\t\tvar nextRules = (0, import_getThemeCSSRules.getThemeCSSRules)({\n\t\t\t\t\t\tconfig: configIn,\n\t\t\t\t\t\tthemeName: names[0],\n\t\t\t\t\t\tnames,\n\t\t\t\t\t\ttheme\n\t\t\t\t\t});\n\t\t\t\t\tthemeRuleSets = [...themeRuleSets, ...nextRules];\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn themeRuleSets;\n\t}\n\treturn [];\n}\nfunction getCSS(themeConfig) {\n\targuments.length > 1 && arguments[1] !== void 0 && arguments[1];\n\targuments.length > 2 && arguments[2];\n\tif (!process.env.TAMAGUI_DID_OUTPUT_CSS && false);\n\treturn \"\";\n}\n//# sourceMappingURL=createDesignSystem.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,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UAAU;KACT,IAAI,mBAAmB,MAAM;IAC9B;GACD;EACD;EACA,OAAO;CACR;CACA,OAAO,CAAC;AACT;AACA,SAAS,OAAO,aAAa;CAC5B,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,KAAK,UAAU;CAC7D,UAAU,SAAS,KAAK,UAAU;CAClC,IAAI,CAAC,QAAQ,IAAI,0BAA0B;CAC3C,OAAO;AACR"}
|
|
@@ -37,7 +37,6 @@ var _loop = function(parent2) {
|
|
|
37
37
|
};
|
|
38
38
|
function expandStyle(key, value) {
|
|
39
39
|
arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (0, import_config.getStyleCompat)();
|
|
40
|
-
if (import_constants.isAndroid && key === "elevationAndroid") return [["elevation", value]];
|
|
41
40
|
switch (key) {
|
|
42
41
|
case "objectFit": return [["resizeMode", resizeModeMap[value] || "cover"]];
|
|
43
42
|
case "verticalAlign": return [["textAlignVertical", verticalAlignMap[value] || "auto"]];
|
|
@@ -37,7 +37,6 @@ var _loop = function(parent2) {
|
|
|
37
37
|
};
|
|
38
38
|
function expandStyle(key, value) {
|
|
39
39
|
arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (0, import_config.getStyleCompat)();
|
|
40
|
-
if (import_constants.isAndroid && key === "elevationAndroid") return [["elevation", value]];
|
|
41
40
|
switch (key) {
|
|
42
41
|
case "objectFit": return [["resizeMode", resizeModeMap[value] || "cover"]];
|
|
43
42
|
case "verticalAlign": return [["textAlignVertical", verticalAlignMap[value] || "auto"]];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandStyle.native.js","names":[],"sources":["cjs/helpers/expandStyle.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all2) => {\n\tfor (var name in all2) __defProp(target, name, {\n\t\tget: all2[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar expandStyle_exports = {};\n__export(expandStyle_exports, { expandStyle: () => expandStyle });\nmodule.exports = __toCommonJS(expandStyle_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_config = require(\"../config\");\nvar import_parseBorderShorthand = require(\"./parseBorderShorthand\");\nvar import_parseOutlineShorthand = require(\"./parseOutlineShorthand\");\nvar _loop = function(parent2) {\n\tvar _exec;\n\tvar _exec_index;\n\tvar prefix = parent2.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent2)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent2.length);\n\tEXPANSIONS[parent2] = EXPANSIONS[parent2].map(function(k) {\n\t\treturn `${prefix}${k}`;\n\t});\n};\nfunction expandStyle(key, value) {\n\targuments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (0, import_config.getStyleCompat)();\n\tif (import_constants.isAndroid && key === \"elevationAndroid\") return [[\"elevation\", value]];\n\tswitch (key) {\n\t\tcase \"objectFit\": return [[\"resizeMode\", resizeModeMap[value] || \"cover\"]];\n\t\tcase \"verticalAlign\": return [[\"textAlignVertical\", verticalAlignMap[value] || \"auto\"]];\n\t\tcase \"position\":\n\t\t\tif (value === \"fixed\" || value === \"sticky\") return [[\"position\", \"absolute\"]];\n\t\t\treturn;\n\t\tcase \"visibility\":\n\t\t\tif (value === \"hidden\") return [[\"opacity\", 0], [\"pointerEvents\", \"none\"]];\n\t\t\treturn [];\n\t\tcase \"backgroundImage\":\n\t\t\tif (typeof value === \"string\") return;\n\t\t\treturn [[\"experimental_backgroundImage\", value]];\n\t\tcase \"border\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed = (0, import_parseBorderShorthand.parseBorderShorthand)(value);\n\t\t\t\tif (parsed) return parsed;\n\t\t\t}\n\t\t\treturn;\n\t\tcase \"outline\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed1 = (0, import_parseOutlineShorthand.parseOutlineShorthand)(value);\n\t\t\t\tif (parsed1) return parsed1;\n\t\t\t}\n\t\t\treturn;\n\t}\n\tif (key in nativeInlineExpansions) return nativeInlineExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in universalExpansions) return universalExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in EXPANSIONS) return EXPANSIONS[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n}\nvar resizeModeMap = {\n\tfill: \"stretch\",\n\tnone: \"center\",\n\t\"scale-down\": \"contain\",\n\tcontain: \"contain\",\n\tcover: \"cover\"\n};\nvar verticalAlignMap = {\n\ttop: \"top\",\n\tmiddle: \"center\",\n\tbottom: \"bottom\",\n\tauto: \"auto\"\n};\nvar all = [\n\t\"Top\",\n\t\"Right\",\n\t\"Bottom\",\n\t\"Left\"\n];\nvar horiz = [\"Right\", \"Left\"];\nvar vert = [\"Top\", \"Bottom\"];\nvar xy = [\"X\", \"Y\"];\nvar EXPANSIONS = {\n\tborderColor: [\n\t\t\"TopColor\",\n\t\t\"RightColor\",\n\t\t\"BottomColor\",\n\t\t\"LeftColor\"\n\t],\n\tborderRadius: [\n\t\t\"TopLeftRadius\",\n\t\t\"TopRightRadius\",\n\t\t\"BottomRightRadius\",\n\t\t\"BottomLeftRadius\"\n\t],\n\tborderWidth: [\n\t\t\"TopWidth\",\n\t\t\"RightWidth\",\n\t\t\"BottomWidth\",\n\t\t\"LeftWidth\"\n\t],\n\tmargin: all,\n\tmarginHorizontal: horiz,\n\tmarginVertical: vert,\n\tpadding: all,\n\tpaddingHorizontal: horiz,\n\tpaddingVertical: vert,\n\t...import_constants.isWeb && {\n\t\tborderStyle: [\n\t\t\t\"TopStyle\",\n\t\t\t\"RightStyle\",\n\t\t\t\"BottomStyle\",\n\t\t\t\"LeftStyle\"\n\t\t],\n\t\toverflow: xy,\n\t\toverscrollBehavior: xy\n\t}\n};\nfor (var parent in EXPANSIONS) _loop(parent);\nvar universalExpansions = {\n\tinset: [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t],\n\tinsetBlock: [\"top\", \"bottom\"],\n\tinsetBlockStart: [\"top\"],\n\tinsetBlockEnd: [\"bottom\"],\n\tmarginBlock: [\"marginTop\", \"marginBottom\"],\n\tmarginBlockStart: [\"marginTop\"],\n\tmarginBlockEnd: [\"marginBottom\"],\n\tpaddingBlock: [\"paddingTop\", \"paddingBottom\"],\n\tpaddingBlockStart: [\"paddingTop\"],\n\tpaddingBlockEnd: [\"paddingBottom\"],\n\tborderBlockColor: [\"borderTopColor\", \"borderBottomColor\"],\n\tborderBlockWidth: [\"borderTopWidth\", \"borderBottomWidth\"],\n\tborderBlockStyle: [\"borderTopStyle\", \"borderBottomStyle\"],\n\tborderBlockStartColor: [\"borderTopColor\"],\n\tborderBlockEndColor: [\"borderBottomColor\"],\n\tborderBlockStartWidth: [\"borderTopWidth\"],\n\tborderBlockEndWidth: [\"borderBottomWidth\"],\n\tborderBlockStartStyle: [\"borderTopStyle\"],\n\tborderBlockEndStyle: [\"borderBottomStyle\"],\n\tminBlockSize: [\"minHeight\"],\n\tmaxBlockSize: [\"maxHeight\"],\n\tminInlineSize: [\"minWidth\"],\n\tmaxInlineSize: [\"maxWidth\"],\n\tblockSize: [\"height\"],\n\tinlineSize: [\"width\"]\n};\nvar nativeInlineExpansions = {\n\tborderInlineColor: [\"borderEndColor\", \"borderStartColor\"],\n\tborderInlineWidth: [\"borderEndWidth\", \"borderStartWidth\"],\n\tborderInlineStyle: [\"borderEndStyle\", \"borderStartStyle\"],\n\tborderInlineStartColor: [\"borderStartColor\"],\n\tborderInlineEndColor: [\"borderEndColor\"],\n\tborderInlineStartWidth: [\"borderStartWidth\"],\n\tborderInlineEndWidth: [\"borderEndWidth\"],\n\tborderInlineStartStyle: [\"borderStartStyle\"],\n\tborderInlineEndStyle: [\"borderEndStyle\"],\n\tmarginInline: [\"marginEnd\", \"marginStart\"],\n\tmarginInlineStart: [\"marginStart\"],\n\tmarginInlineEnd: [\"marginEnd\"],\n\tpaddingInline: [\"paddingEnd\", \"paddingStart\"],\n\tpaddingInlineStart: [\"paddingStart\"],\n\tpaddingInlineEnd: [\"paddingEnd\"],\n\tinsetInlineStart: [\"left\"],\n\tinsetInlineEnd: [\"right\"]\n};\n//# sourceMappingURL=expandStyle.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,SAAS;CAChC,KAAK,IAAI,QAAQ,MAAM,UAAU,QAAQ,MAAM;EAC9C,KAAK,KAAK;EACV,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,sBAAsB,CAAC;AAC3B,SAAS,qBAAqB,EAAE,m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,OAAO;AACzB"}
|
|
1
|
+
{"version":3,"file":"expandStyle.native.js","names":[],"sources":["cjs/helpers/expandStyle.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all2) => {\n\tfor (var name in all2) __defProp(target, name, {\n\t\tget: all2[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar expandStyle_exports = {};\n__export(expandStyle_exports, { expandStyle: () => expandStyle });\nmodule.exports = __toCommonJS(expandStyle_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_config = require(\"../config\");\nvar import_parseBorderShorthand = require(\"./parseBorderShorthand\");\nvar import_parseOutlineShorthand = require(\"./parseOutlineShorthand\");\nvar _loop = function(parent2) {\n\tvar _exec;\n\tvar _exec_index;\n\tvar prefix = parent2.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent2)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent2.length);\n\tEXPANSIONS[parent2] = EXPANSIONS[parent2].map(function(k) {\n\t\treturn `${prefix}${k}`;\n\t});\n};\nfunction expandStyle(key, value) {\n\targuments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (0, import_config.getStyleCompat)();\n\tswitch (key) {\n\t\tcase \"objectFit\": return [[\"resizeMode\", resizeModeMap[value] || \"cover\"]];\n\t\tcase \"verticalAlign\": return [[\"textAlignVertical\", verticalAlignMap[value] || \"auto\"]];\n\t\tcase \"position\":\n\t\t\tif (value === \"fixed\" || value === \"sticky\") return [[\"position\", \"absolute\"]];\n\t\t\treturn;\n\t\tcase \"visibility\":\n\t\t\tif (value === \"hidden\") return [[\"opacity\", 0], [\"pointerEvents\", \"none\"]];\n\t\t\treturn [];\n\t\tcase \"backgroundImage\":\n\t\t\tif (typeof value === \"string\") return;\n\t\t\treturn [[\"experimental_backgroundImage\", value]];\n\t\tcase \"border\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed = (0, import_parseBorderShorthand.parseBorderShorthand)(value);\n\t\t\t\tif (parsed) return parsed;\n\t\t\t}\n\t\t\treturn;\n\t\tcase \"outline\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parsed1 = (0, import_parseOutlineShorthand.parseOutlineShorthand)(value);\n\t\t\t\tif (parsed1) return parsed1;\n\t\t\t}\n\t\t\treturn;\n\t}\n\tif (key in nativeInlineExpansions) return nativeInlineExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in universalExpansions) return universalExpansions[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n\tif (key in EXPANSIONS) return EXPANSIONS[key].map(function(k) {\n\t\treturn [k, value];\n\t});\n}\nvar resizeModeMap = {\n\tfill: \"stretch\",\n\tnone: \"center\",\n\t\"scale-down\": \"contain\",\n\tcontain: \"contain\",\n\tcover: \"cover\"\n};\nvar verticalAlignMap = {\n\ttop: \"top\",\n\tmiddle: \"center\",\n\tbottom: \"bottom\",\n\tauto: \"auto\"\n};\nvar all = [\n\t\"Top\",\n\t\"Right\",\n\t\"Bottom\",\n\t\"Left\"\n];\nvar horiz = [\"Right\", \"Left\"];\nvar vert = [\"Top\", \"Bottom\"];\nvar xy = [\"X\", \"Y\"];\nvar EXPANSIONS = {\n\tborderColor: [\n\t\t\"TopColor\",\n\t\t\"RightColor\",\n\t\t\"BottomColor\",\n\t\t\"LeftColor\"\n\t],\n\tborderRadius: [\n\t\t\"TopLeftRadius\",\n\t\t\"TopRightRadius\",\n\t\t\"BottomRightRadius\",\n\t\t\"BottomLeftRadius\"\n\t],\n\tborderWidth: [\n\t\t\"TopWidth\",\n\t\t\"RightWidth\",\n\t\t\"BottomWidth\",\n\t\t\"LeftWidth\"\n\t],\n\tmargin: all,\n\tmarginHorizontal: horiz,\n\tmarginVertical: vert,\n\tpadding: all,\n\tpaddingHorizontal: horiz,\n\tpaddingVertical: vert,\n\t...import_constants.isWeb && {\n\t\tborderStyle: [\n\t\t\t\"TopStyle\",\n\t\t\t\"RightStyle\",\n\t\t\t\"BottomStyle\",\n\t\t\t\"LeftStyle\"\n\t\t],\n\t\toverflow: xy,\n\t\toverscrollBehavior: xy\n\t}\n};\nfor (var parent in EXPANSIONS) _loop(parent);\nvar universalExpansions = {\n\tinset: [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t],\n\tinsetBlock: [\"top\", \"bottom\"],\n\tinsetBlockStart: [\"top\"],\n\tinsetBlockEnd: [\"bottom\"],\n\tmarginBlock: [\"marginTop\", \"marginBottom\"],\n\tmarginBlockStart: [\"marginTop\"],\n\tmarginBlockEnd: [\"marginBottom\"],\n\tpaddingBlock: [\"paddingTop\", \"paddingBottom\"],\n\tpaddingBlockStart: [\"paddingTop\"],\n\tpaddingBlockEnd: [\"paddingBottom\"],\n\tborderBlockColor: [\"borderTopColor\", \"borderBottomColor\"],\n\tborderBlockWidth: [\"borderTopWidth\", \"borderBottomWidth\"],\n\tborderBlockStyle: [\"borderTopStyle\", \"borderBottomStyle\"],\n\tborderBlockStartColor: [\"borderTopColor\"],\n\tborderBlockEndColor: [\"borderBottomColor\"],\n\tborderBlockStartWidth: [\"borderTopWidth\"],\n\tborderBlockEndWidth: [\"borderBottomWidth\"],\n\tborderBlockStartStyle: [\"borderTopStyle\"],\n\tborderBlockEndStyle: [\"borderBottomStyle\"],\n\tminBlockSize: [\"minHeight\"],\n\tmaxBlockSize: [\"maxHeight\"],\n\tminInlineSize: [\"minWidth\"],\n\tmaxInlineSize: [\"maxWidth\"],\n\tblockSize: [\"height\"],\n\tinlineSize: [\"width\"]\n};\nvar nativeInlineExpansions = {\n\tborderInlineColor: [\"borderEndColor\", \"borderStartColor\"],\n\tborderInlineWidth: [\"borderEndWidth\", \"borderStartWidth\"],\n\tborderInlineStyle: [\"borderEndStyle\", \"borderStartStyle\"],\n\tborderInlineStartColor: [\"borderStartColor\"],\n\tborderInlineEndColor: [\"borderEndColor\"],\n\tborderInlineStartWidth: [\"borderStartWidth\"],\n\tborderInlineEndWidth: [\"borderEndWidth\"],\n\tborderInlineStartStyle: [\"borderStartStyle\"],\n\tborderInlineEndStyle: [\"borderEndStyle\"],\n\tmarginInline: [\"marginEnd\", \"marginStart\"],\n\tmarginInlineStart: [\"marginStart\"],\n\tmarginInlineEnd: [\"marginEnd\"],\n\tpaddingInline: [\"paddingEnd\", \"paddingStart\"],\n\tpaddingInlineStart: [\"paddingStart\"],\n\tpaddingInlineEnd: [\"paddingEnd\"],\n\tinsetInlineStart: [\"left\"],\n\tinsetInlineEnd: [\"right\"]\n};\n//# sourceMappingURL=expandStyle.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,SAAS;CAChC,KAAK,IAAI,QAAQ,MAAM,UAAU,QAAQ,MAAM;EAC9C,KAAK,KAAK;EACV,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;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CACjC,iBAAiB,CAAC,WAAW;CAC7B,eAAe,CAAC,cAAc,cAAc;CAC5C,oBAAoB,CAAC,cAAc;CACnC,kBAAkB,CAAC,YAAY;CAC/B,kBAAkB,CAAC,MAAM;CACzB,gBAAgB,CAAC,OAAO;AACzB"}
|
|
@@ -24,8 +24,14 @@ module.exports = __toCommonJS(expandStyles_exports);
|
|
|
24
24
|
var import_constants = require("@tamagui/constants");
|
|
25
25
|
var import_normalizeShadow = require("./normalizeShadow.cjs");
|
|
26
26
|
function fixStyles(style) {
|
|
27
|
-
if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset)
|
|
28
|
-
|
|
27
|
+
if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) {
|
|
28
|
+
Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
29
|
+
}
|
|
30
|
+
for (const key in borderDefaults) {
|
|
31
|
+
if (key in style) {
|
|
32
|
+
style[borderDefaults[key]] ||= "solid";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
29
35
|
}
|
|
30
36
|
const nativeStyle = import_constants.isWeb ? null : "borderStyle";
|
|
31
37
|
const borderDefaults = {
|
|
@@ -26,14 +26,14 @@ module.exports = __toCommonJS(expandStyles_exports);
|
|
|
26
26
|
var import_constants = require("@tamagui/constants");
|
|
27
27
|
var import_normalizeShadow = require("./normalizeShadow.native.js");
|
|
28
28
|
function fixStyles(style) {
|
|
29
|
-
if (
|
|
30
|
-
style
|
|
31
|
-
delete style.elevationAndroid;
|
|
29
|
+
if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) {
|
|
30
|
+
Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
for (var key in borderDefaults) {
|
|
33
|
+
if (key in style) {
|
|
34
|
+
var _style, _borderDefaults_key;
|
|
35
|
+
(_style = style)[_borderDefaults_key = borderDefaults[key]] || (_style[_borderDefaults_key] = "solid");
|
|
36
|
+
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
var nativeStyle = import_constants.isWeb ? null : "borderStyle";
|
|
@@ -26,14 +26,14 @@ module.exports = __toCommonJS(expandStyles_exports);
|
|
|
26
26
|
var import_constants = require("@tamagui/constants");
|
|
27
27
|
var import_normalizeShadow = require("./normalizeShadow.native.js");
|
|
28
28
|
function fixStyles(style) {
|
|
29
|
-
if (
|
|
30
|
-
style
|
|
31
|
-
delete style.elevationAndroid;
|
|
29
|
+
if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) {
|
|
30
|
+
Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
for (var key in borderDefaults) {
|
|
33
|
+
if (key in style) {
|
|
34
|
+
var _style, _borderDefaults_key;
|
|
35
|
+
(_style = style)[_borderDefaults_key = borderDefaults[key]] || (_style[_borderDefaults_key] = "solid");
|
|
36
|
+
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
var nativeStyle = import_constants.isWeb ? null : "borderStyle";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandStyles.native.js","names":[],"sources":["cjs/helpers/expandStyles.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n
|
|
1
|
+
{"version":3,"file":"expandStyles.native.js","names":[],"sources":["cjs/helpers/expandStyles.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar expandStyles_exports = {};\n__export(expandStyles_exports, {\n fixStyles: () => fixStyles\n});\nmodule.exports = __toCommonJS(expandStyles_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_normalizeShadow = require(\"./normalizeShadow\");\nfunction fixStyles(style) {\n if (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) {\n Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));\n }\n for (var key in borderDefaults) {\n if (key in style) {\n var _style, _borderDefaults_key;\n (_style = style)[_borderDefaults_key = borderDefaults[key]] || (_style[_borderDefaults_key] = \"solid\");\n }\n }\n}\nvar nativeStyle = import_constants.isWeb ? null : \"borderStyle\";\nvar borderDefaults = {\n borderWidth: \"borderStyle\",\n borderBottomWidth: nativeStyle || \"borderBottomStyle\",\n borderTopWidth: nativeStyle || \"borderTopStyle\",\n borderLeftWidth: nativeStyle || \"borderLeftStyle\",\n borderRightWidth: nativeStyle || \"borderRightStyle\",\n borderBlockWidth: nativeStyle || \"borderBlockStyle\",\n borderBlockStartWidth: nativeStyle || \"borderBlockStartStyle\",\n borderBlockEndWidth: nativeStyle || \"borderBlockEndStyle\",\n borderInlineWidth: nativeStyle || \"borderInlineStyle\",\n borderInlineStartWidth: nativeStyle || \"borderInlineStartStyle\",\n borderInlineEndWidth: nativeStyle || \"borderInlineEndStyle\"\n};\n//# sourceMappingURL=expandStyles.js.map\n"],"mappings":";;;AACA,IAAI,YAAY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mB,eAAe;CAClC,gBAAgB,eAAe;CAC/B,iBAAiB,eAAe;CAChC,kBAAkB,eAAe;CACjC,kBAAkB,eAAe;CACjC,uBAAuB,eAAe;CACtC,qBAAqB,eAAe;CACpC,mBAAmB,eAAe;CAClC,wBAAwB,eAAe;CACvC,sBAAsB,eAAe;AACvC"}
|
|
@@ -381,7 +381,9 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
381
381
|
}
|
|
382
382
|
if (hocSlots) {
|
|
383
383
|
const slots = direct.flatSlots ||= /* @__PURE__ */ new Map();
|
|
384
|
+
const markerLayer = pass[passSourceLayer];
|
|
384
385
|
for (const [slot, entries] of hocSlots) for (const entry of entries) {
|
|
386
|
+
pass[passSourceLayer] = Math.max(entry[7] >> 5, sourceLayerResolver);
|
|
385
387
|
if (!ownsSourceLayer(styleState, entry[0], !!entry[2])) continue;
|
|
386
388
|
if (!isHOC && styleState.styleProps.isAnimated && (slot === "transition" || entry[8]) && !(entry[0] in import_helpers.nonAnimatableStyleProps)) {
|
|
387
389
|
const property = entry[0] === "--t-x" ? "x" : entry[0] === "--t-y" ? "y" : entry[0] === "--t-scale-x" ? "scaleX" : entry[0] === "--t-scale-y" ? "scaleY" : entry[0];
|
|
@@ -389,6 +391,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
389
391
|
entry[3] ? contributeValue(styleState, property, value, entry[6], false, entry[3]) : emitValue(styleState, property, value, null, entry[6], false);
|
|
390
392
|
} else writeCapturedStyleRecord(slots, slot, entry, pass[passSourceLayer]);
|
|
391
393
|
}
|
|
394
|
+
pass[passSourceLayer] = markerLayer;
|
|
392
395
|
}
|
|
393
396
|
}
|
|
394
397
|
return;
|
|
@@ -1712,9 +1715,11 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
|
|
|
1712
1715
|
}
|
|
1713
1716
|
}
|
|
1714
1717
|
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1715
|
-
if (warnMode === 1 &&
|
|
1718
|
+
if (warnMode === 1 && conditions & 12 && !hasBase) {
|
|
1716
1719
|
const resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
|
|
1717
|
-
|
|
1720
|
+
const layers = state.flatPropertyLayers;
|
|
1721
|
+
const owned = !import_getCSSStylesAtomic.canGenerateCSS || !state.flatShouldDoClasses ? layers?.has(property) : property === "scale" ? layers?.has("--t-scale-x") || layers?.has("--t-scale-y") : layers?.has(property === "x" ? "--t-x" : property === "y" ? "--t-y" : property === "scaleX" ? "--t-scale-x" : property === "scaleY" ? "--t-scale-y" : property);
|
|
1722
|
+
if (resting !== null && !owned) emitConditionalValue(state, property, resting, parentCondition, resting, sink, warnMode, contextOnly);
|
|
1718
1723
|
}
|
|
1719
1724
|
return true;
|
|
1720
1725
|
}
|
|
@@ -413,6 +413,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
413
413
|
if (hocSlots) {
|
|
414
414
|
var _direct1;
|
|
415
415
|
var slots = (_direct1 = direct).flatSlots || (_direct1.flatSlots = /* @__PURE__ */ new Map());
|
|
416
|
+
var markerLayer = pass[passSourceLayer];
|
|
416
417
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
417
418
|
try {
|
|
418
419
|
for (var _iterator = hocSlots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
@@ -421,6 +422,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
421
422
|
try {
|
|
422
423
|
for (var _iterator1 = entries[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
423
424
|
var entry = _step1.value;
|
|
425
|
+
pass[passSourceLayer] = Math.max(entry[7] >> 5, sourceLayerResolver);
|
|
424
426
|
if (!ownsSourceLayer(styleState, entry[0], !!entry[2])) continue;
|
|
425
427
|
if (!isHOC && styleState.styleProps.isAnimated && (slot === "transition" || entry[8]) && !(entry[0] in import_helpers.nonAnimatableStyleProps)) {
|
|
426
428
|
var _styleState_animationDriver;
|
|
@@ -450,6 +452,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
450
452
|
if (_didIteratorError) throw _iteratorError;
|
|
451
453
|
}
|
|
452
454
|
}
|
|
455
|
+
pass[passSourceLayer] = markerLayer;
|
|
453
456
|
}
|
|
454
457
|
}
|
|
455
458
|
return;
|
|
@@ -521,9 +524,6 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
521
524
|
}
|
|
522
525
|
}
|
|
523
526
|
if (!isValidStyleKeyInit) {
|
|
524
|
-
if (!import_constants.isAndroid) {
|
|
525
|
-
if (keyInit === "elevationAndroid") return;
|
|
526
|
-
}
|
|
527
527
|
if (keyInit === "userSelect") {
|
|
528
528
|
keyInit = "selectable";
|
|
529
529
|
valInit = valInit !== "none";
|
|
@@ -676,6 +676,12 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
676
676
|
animationDriver: resolvedDriver
|
|
677
677
|
};
|
|
678
678
|
styleState.flatStyleStaticConfig = styleStaticConfig;
|
|
679
|
+
var prev = styleProps.prevStyle;
|
|
680
|
+
if (prev) {
|
|
681
|
+
styleState.flatPrevStyle = prev;
|
|
682
|
+
styleState.flatStyleChanged = false;
|
|
683
|
+
styleState.flatStyleKeyCount = 0;
|
|
684
|
+
}
|
|
679
685
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
680
686
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && import_constants.isClient) {
|
|
681
687
|
if (import_isDevTools.isDevTools) {
|
|
@@ -894,6 +900,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
894
900
|
}
|
|
895
901
|
if (hasProvenance) (0, import_styleProvenance.setStyleTokenProvenance)(styleState.style, provenance);
|
|
896
902
|
}
|
|
903
|
+
var direct = styleState;
|
|
904
|
+
var prevStyle = direct.flatPrevStyle;
|
|
905
|
+
if (prevStyle && styleState.style && !direct.flatStyleChanged && Object.keys(prevStyle).length === Object.keys(styleState.style).length) styleState.style = prevStyle;
|
|
897
906
|
var result = {
|
|
898
907
|
hasMedia,
|
|
899
908
|
fontFamily: styleState.fontFamily,
|
|
@@ -1035,6 +1044,11 @@ function mergeStyle(styleState, key, val) {
|
|
|
1035
1044
|
if (staticConfig.isInput && key in import_nativeStyleEngine.nativeTextInputColorProps) viewProps[import_nativeStyleEngine.nativeTextInputColorProps[key]] = out;
|
|
1036
1045
|
else {
|
|
1037
1046
|
var _styleState4;
|
|
1047
|
+
var direct = styleState;
|
|
1048
|
+
if (direct.flatPrevStyle) {
|
|
1049
|
+
direct.flatStyleKeyCount = (direct.flatStyleKeyCount || 0) + 1;
|
|
1050
|
+
if (!direct.flatStyleChanged && direct.flatPrevStyle[key] !== out) direct.flatStyleChanged = true;
|
|
1051
|
+
}
|
|
1038
1052
|
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
1039
1053
|
styleState.style[key] = out;
|
|
1040
1054
|
if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
|
|
@@ -1898,10 +1912,11 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1898
1912
|
}
|
|
1899
1913
|
}
|
|
1900
1914
|
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1901
|
-
if (warnMode === 1 &&
|
|
1902
|
-
var _state_flatPropertyLayers;
|
|
1915
|
+
if (warnMode === 1 && conditions & 12 && !hasBase) {
|
|
1903
1916
|
var resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
|
|
1904
|
-
|
|
1917
|
+
var layers = state.flatPropertyLayers;
|
|
1918
|
+
var owned = !import_getCSSStylesAtomic.canGenerateCSS || !state.flatShouldDoClasses ? layers === null || layers === void 0 ? void 0 : layers.has(property) : property === "scale" ? (layers === null || layers === void 0 ? void 0 : layers.has("--t-scale-x")) || (layers === null || layers === void 0 ? void 0 : layers.has("--t-scale-y")) : layers === null || layers === void 0 ? void 0 : layers.has(property === "x" ? "--t-x" : property === "y" ? "--t-y" : property === "scaleX" ? "--t-scale-x" : property === "scaleY" ? "--t-scale-y" : property);
|
|
1919
|
+
if (resting !== null && !owned) emitConditionalValue(state, property, resting, parentCondition, resting, sink, warnMode, contextOnly);
|
|
1905
1920
|
}
|
|
1906
1921
|
return true;
|
|
1907
1922
|
}
|
|
@@ -413,6 +413,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
413
413
|
if (hocSlots) {
|
|
414
414
|
var _direct1;
|
|
415
415
|
var slots = (_direct1 = direct).flatSlots || (_direct1.flatSlots = /* @__PURE__ */ new Map());
|
|
416
|
+
var markerLayer = pass[passSourceLayer];
|
|
416
417
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
417
418
|
try {
|
|
418
419
|
for (var _iterator = hocSlots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
@@ -421,6 +422,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
421
422
|
try {
|
|
422
423
|
for (var _iterator1 = entries[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
423
424
|
var entry = _step1.value;
|
|
425
|
+
pass[passSourceLayer] = Math.max(entry[7] >> 5, sourceLayerResolver);
|
|
424
426
|
if (!ownsSourceLayer(styleState, entry[0], !!entry[2])) continue;
|
|
425
427
|
if (!isHOC && styleState.styleProps.isAnimated && (slot === "transition" || entry[8]) && !(entry[0] in import_helpers.nonAnimatableStyleProps)) {
|
|
426
428
|
var _styleState_animationDriver;
|
|
@@ -450,6 +452,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
450
452
|
if (_didIteratorError) throw _iteratorError;
|
|
451
453
|
}
|
|
452
454
|
}
|
|
455
|
+
pass[passSourceLayer] = markerLayer;
|
|
453
456
|
}
|
|
454
457
|
}
|
|
455
458
|
return;
|
|
@@ -521,9 +524,6 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
521
524
|
}
|
|
522
525
|
}
|
|
523
526
|
if (!isValidStyleKeyInit) {
|
|
524
|
-
if (!import_constants.isAndroid) {
|
|
525
|
-
if (keyInit === "elevationAndroid") return;
|
|
526
|
-
}
|
|
527
527
|
if (keyInit === "userSelect") {
|
|
528
528
|
keyInit = "selectable";
|
|
529
529
|
valInit = valInit !== "none";
|
|
@@ -676,6 +676,12 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
676
676
|
animationDriver: resolvedDriver
|
|
677
677
|
};
|
|
678
678
|
styleState.flatStyleStaticConfig = styleStaticConfig;
|
|
679
|
+
var prev = styleProps.prevStyle;
|
|
680
|
+
if (prev) {
|
|
681
|
+
styleState.flatPrevStyle = prev;
|
|
682
|
+
styleState.flatStyleChanged = false;
|
|
683
|
+
styleState.flatStyleKeyCount = 0;
|
|
684
|
+
}
|
|
679
685
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
680
686
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && import_constants.isClient) {
|
|
681
687
|
if (import_isDevTools.isDevTools) {
|
|
@@ -894,6 +900,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
894
900
|
}
|
|
895
901
|
if (hasProvenance) (0, import_styleProvenance.setStyleTokenProvenance)(styleState.style, provenance);
|
|
896
902
|
}
|
|
903
|
+
var direct = styleState;
|
|
904
|
+
var prevStyle = direct.flatPrevStyle;
|
|
905
|
+
if (prevStyle && styleState.style && !direct.flatStyleChanged && Object.keys(prevStyle).length === Object.keys(styleState.style).length) styleState.style = prevStyle;
|
|
897
906
|
var result = {
|
|
898
907
|
hasMedia,
|
|
899
908
|
fontFamily: styleState.fontFamily,
|
|
@@ -1035,6 +1044,11 @@ function mergeStyle(styleState, key, val) {
|
|
|
1035
1044
|
if (staticConfig.isInput && key in import_nativeStyleEngine.nativeTextInputColorProps) viewProps[import_nativeStyleEngine.nativeTextInputColorProps[key]] = out;
|
|
1036
1045
|
else {
|
|
1037
1046
|
var _styleState4;
|
|
1047
|
+
var direct = styleState;
|
|
1048
|
+
if (direct.flatPrevStyle) {
|
|
1049
|
+
direct.flatStyleKeyCount = (direct.flatStyleKeyCount || 0) + 1;
|
|
1050
|
+
if (!direct.flatStyleChanged && direct.flatPrevStyle[key] !== out) direct.flatStyleChanged = true;
|
|
1051
|
+
}
|
|
1038
1052
|
(_styleState4 = styleState).style || (_styleState4.style = {});
|
|
1039
1053
|
styleState.style[key] = out;
|
|
1040
1054
|
if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
|
|
@@ -1898,10 +1912,11 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1898
1912
|
}
|
|
1899
1913
|
}
|
|
1900
1914
|
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1901
|
-
if (warnMode === 1 &&
|
|
1902
|
-
var _state_flatPropertyLayers;
|
|
1915
|
+
if (warnMode === 1 && conditions & 12 && !hasBase) {
|
|
1903
1916
|
var resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
|
|
1904
|
-
|
|
1917
|
+
var layers = state.flatPropertyLayers;
|
|
1918
|
+
var owned = !import_getCSSStylesAtomic.canGenerateCSS || !state.flatShouldDoClasses ? layers === null || layers === void 0 ? void 0 : layers.has(property) : property === "scale" ? (layers === null || layers === void 0 ? void 0 : layers.has("--t-scale-x")) || (layers === null || layers === void 0 ? void 0 : layers.has("--t-scale-y")) : layers === null || layers === void 0 ? void 0 : layers.has(property === "x" ? "--t-x" : property === "y" ? "--t-y" : property === "scaleX" ? "--t-scale-x" : property === "scaleY" ? "--t-scale-y" : property);
|
|
1919
|
+
if (resting !== null && !owned) emitConditionalValue(state, property, resting, parentCondition, resting, sink, warnMode, contextOnly);
|
|
1905
1920
|
}
|
|
1906
1921
|
return true;
|
|
1907
1922
|
}
|