@tamagui/web 3.0.0-beta.1313.1 → 3.0.0-beta.1341.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/contexts/ComponentContext.cjs +1 -0
- package/dist/cjs/contexts/ComponentContext.native.cjs +8 -0
- package/dist/cjs/contexts/ComponentContext.native.js +8 -0
- package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +3 -1
- package/dist/cjs/createComponent.native.cjs +30 -6
- package/dist/cjs/createComponent.native.js +30 -6
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +0 -7
- package/dist/cjs/createTamagui.native.cjs +0 -12
- package/dist/cjs/createTamagui.native.js +0 -12
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/dom/html.cjs +87 -329
- package/dist/cjs/dom/html.native.cjs +46 -0
- package/dist/cjs/dom/html.native.js +46 -0
- package/dist/cjs/dom/html.native.js.map +1 -1
- package/dist/cjs/dom/htmlReset.cjs +26 -0
- package/dist/cjs/dom/htmlReset.native.cjs +28 -0
- package/dist/cjs/dom/htmlReset.native.js +30 -0
- package/dist/cjs/dom/htmlReset.native.js.map +1 -0
- package/dist/cjs/dom/htmlStaticConfig.cjs +44 -0
- package/dist/cjs/dom/htmlStaticConfig.native.cjs +46 -0
- package/dist/cjs/dom/htmlStaticConfig.native.js +48 -0
- package/dist/cjs/dom/htmlStaticConfig.native.js.map +1 -0
- package/dist/cjs/dom/primitives.native.cjs +80 -29
- package/dist/cjs/dom/primitives.native.js +80 -29
- package/dist/cjs/dom/primitives.native.js.map +1 -1
- package/dist/cjs/helpers/NativeTextBinding.cjs +36 -0
- package/dist/cjs/helpers/NativeTextBinding.native.cjs +39 -0
- package/dist/cjs/helpers/NativeTextBinding.native.js +41 -0
- package/dist/cjs/helpers/NativeTextBinding.native.js.map +1 -0
- package/dist/cjs/helpers/createDesignSystem.cjs +3 -1
- package/dist/cjs/helpers/createDesignSystem.native.cjs +1 -0
- package/dist/cjs/helpers/createDesignSystem.native.js +1 -0
- package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/cjs/helpers/expandStyle.cjs +1 -0
- package/dist/cjs/helpers/expandStyle.native.cjs +13 -0
- package/dist/cjs/helpers/expandStyle.native.js +13 -0
- package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +10 -2
- package/dist/cjs/helpers/getSplitStyles.native.cjs +53 -18
- package/dist/cjs/helpers/getSplitStyles.native.js +53 -18
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/mergeProps.cjs +7 -3
- package/dist/cjs/helpers/mergeProps.native.cjs +7 -3
- package/dist/cjs/helpers/mergeProps.native.js +7 -3
- package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
- package/dist/cjs/helpers/nativeTextMetrics.cjs +74 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.cjs +77 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.js +79 -0
- package/dist/cjs/helpers/nativeTextMetrics.native.js.map +1 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.cjs +2 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +2 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js +2 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/cjs/helpers/resolveVariableValue.cjs +7 -7
- package/dist/cjs/helpers/resolveVariableValue.native.cjs +7 -9
- package/dist/cjs/helpers/resolveVariableValue.native.js +7 -9
- package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -1
- package/dist/cjs/helpers/styledDynamic.cjs +0 -1
- package/dist/cjs/helpers/styledDynamic.native.cjs +0 -1
- package/dist/cjs/helpers/styledDynamic.native.js +0 -1
- package/dist/cjs/helpers/styledDynamic.native.js.map +1 -1
- package/dist/cjs/helpers/webPropsToSkip.native.cjs +3 -2
- package/dist/cjs/helpers/webPropsToSkip.native.js +3 -2
- package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.native.cjs +2 -0
- package/dist/cjs/index.native.js +2 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/contexts/ComponentContext.mjs +9 -9
- package/dist/esm/contexts/ComponentContext.mjs.map +1 -1
- package/dist/esm/contexts/ComponentContext.native.js +16 -9
- package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +1 -1
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +30 -6
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createTamagui.mjs +0 -7
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +0 -12
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/dom/html.mjs +87 -329
- package/dist/esm/dom/html.mjs.map +1 -1
- package/dist/esm/dom/html.native.js +46 -0
- package/dist/esm/dom/html.native.js.map +1 -1
- package/dist/esm/dom/htmlReset.mjs +6 -0
- package/dist/esm/dom/htmlReset.mjs.map +1 -0
- package/dist/esm/dom/htmlReset.native.js +6 -0
- package/dist/esm/dom/htmlReset.native.js.map +1 -0
- package/dist/esm/dom/htmlStaticConfig.mjs +22 -0
- package/dist/esm/dom/htmlStaticConfig.mjs.map +1 -0
- package/dist/esm/dom/htmlStaticConfig.native.js +22 -0
- package/dist/esm/dom/htmlStaticConfig.native.js.map +1 -0
- package/dist/esm/dom/primitives.native.js +80 -29
- package/dist/esm/dom/primitives.native.js.map +1 -1
- package/dist/esm/helpers/NativeTextBinding.mjs +17 -0
- package/dist/esm/helpers/NativeTextBinding.mjs.map +1 -0
- package/dist/esm/helpers/NativeTextBinding.native.js +18 -0
- package/dist/esm/helpers/NativeTextBinding.native.js.map +1 -0
- package/dist/esm/helpers/createDesignSystem.mjs +3 -1
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +13 -0
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +8 -2
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +53 -18
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.mjs +7 -3
- package/dist/esm/helpers/mergeProps.mjs.map +1 -1
- package/dist/esm/helpers/mergeProps.native.js +7 -3
- package/dist/esm/helpers/mergeProps.native.js.map +1 -1
- package/dist/esm/helpers/nativeTextMetrics.mjs +55 -0
- package/dist/esm/helpers/nativeTextMetrics.mjs.map +1 -0
- package/dist/esm/helpers/nativeTextMetrics.native.js +56 -0
- package/dist/esm/helpers/nativeTextMetrics.native.js.map +1 -0
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +2 -1
- package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +2 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/resolveVariableValue.mjs +7 -7
- package/dist/esm/helpers/resolveVariableValue.mjs.map +1 -1
- package/dist/esm/helpers/resolveVariableValue.native.js +7 -9
- package/dist/esm/helpers/resolveVariableValue.native.js.map +1 -1
- package/dist/esm/helpers/styledDynamic.mjs +0 -1
- package/dist/esm/helpers/styledDynamic.mjs.map +1 -1
- package/dist/esm/helpers/styledDynamic.native.js +0 -1
- package/dist/esm/helpers/styledDynamic.native.js.map +1 -1
- package/dist/esm/helpers/webPropsToSkip.native.js +3 -2
- package/dist/esm/helpers/webPropsToSkip.native.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.native.js +2 -1
- package/package.json +16 -16
- package/src/contexts/ComponentContext.tsx +8 -0
- package/src/createComponent.tsx +78 -3
- package/src/createTamagui.ts +0 -19
- package/src/dom/contract.ts +4 -1
- package/src/dom/html.native.tsx +46 -0
- package/src/dom/html.tsx +189 -388
- package/src/dom/htmlReset.ts +15 -0
- package/src/dom/htmlStaticConfig.ts +40 -0
- package/src/dom/primitives.native.tsx +138 -33
- package/src/dom/standalone.ts +2 -1
- package/src/dom/styleTypes.ts +16 -23
- package/src/helpers/NativeTextBinding.tsx +26 -0
- package/src/helpers/createDesignSystem.ts +3 -1
- package/src/helpers/expandStyle.ts +30 -0
- package/src/helpers/getSplitStyles.tsx +88 -9
- package/src/helpers/mergeProps.ts +15 -3
- package/src/helpers/nativeTextMetrics.ts +77 -0
- package/src/helpers/normalizeValueWithProperty.ts +2 -1
- package/src/helpers/resolveVariableValue.ts +15 -16
- package/src/helpers/styledDynamic.ts +0 -1
- package/src/helpers/webPropsToSkip.native.ts +9 -2
- package/src/index.ts +3 -3
- package/src/types.tsx +51 -60
- package/types/contexts/ComponentContext.d.ts +1 -1
- package/types/contexts/ComponentContext.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/dom/contract.d.ts +4 -1
- package/types/dom/contract.d.ts.map +1 -1
- package/types/dom/html.d.ts +60 -51
- package/types/dom/html.d.ts.map +1 -1
- package/types/dom/html.native.d.ts.map +1 -1
- package/types/dom/htmlReset.d.ts +10 -0
- package/types/dom/htmlReset.d.ts.map +1 -0
- package/types/dom/htmlStaticConfig.d.ts +22 -0
- package/types/dom/htmlStaticConfig.d.ts.map +1 -0
- package/types/dom/primitives.native.d.ts.map +1 -1
- package/types/dom/standalone.d.ts +2 -1
- package/types/dom/standalone.d.ts.map +1 -1
- package/types/dom/styleTypes.d.ts +16 -26
- package/types/dom/styleTypes.d.ts.map +1 -1
- package/types/helpers/NativeTextBinding.d.ts +11 -0
- package/types/helpers/NativeTextBinding.d.ts.map +1 -0
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/expandStyle.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/mergeProps.d.ts.map +1 -1
- package/types/helpers/nativeTextMetrics.d.ts +16 -0
- package/types/helpers/nativeTextMetrics.d.ts.map +1 -0
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
- package/types/helpers/resolveVariableValue.d.ts.map +1 -1
- package/types/helpers/styledDynamic.d.ts.map +1 -1
- package/types/helpers/webPropsToSkip.native.d.ts +0 -1
- package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +1 -1
- package/types/types.d.ts +30 -45
- package/types/types.d.ts.map +1 -1
|
@@ -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}{${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}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AAc,OAAO,SAAS,CAAC,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,EAAC,CAAE,OAAO,4BAA4B,MAAM;KAC/J,IAAI,EAAE,OAAO,UAAU,MAAM;KAC7B,IAAI,aAAa,GAAG,wBAAwB,iBAAgB,CAAE;MAC7D,QAAQ;MACR,WAAW,MAAM;MACjB;MACA;KACD,CAAC;KACD,gBAAgB,CAAC,GAAG,eAAe,GAAG,SAAS;IAChD;GACD,SAAS,KAAK;IACb,oBAAoB;IACpB,iBAAiB;GAClB,UAAU;IACT,IAAI;KACH,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM,UAAU,OAAO;IAC9E,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"}
|
|
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\");\nrequire(\"../dom/htmlReset\");\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,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,6BAA6B,CAAC;AAClC,SAAS,4BAA4B;CACpC,wBAAwB;CACxB,qBAAqB;CACrB,sBAAsB;CACtB,sBAAsB;CACtB,cAAc;AACf,CAAC;AACD,OAAO,UAAU,aAAa,0BAA0B;AACxD,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,6BAA6B,QAAQ,iCAAuB;AAChE,QAAQ,qBAAW;AACnB,QAAQ,4BAAkB;AAC1B,IAAI,0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B;GAC/E;EACD;EACA,OAAO;CACR;CACA,OAAO,CAAC;AACT;AACA,SAAS,eAAe,eAAe,UAAU;CAChD,IAAI,CAAC,QAAQ,IAAI,wBAAwB;EACxC,IAAI,gBAAgB,CAAC;EACrB,IAAI,iBAAiB,OAAO;GAC3B,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;GACvF,IAAI;IACH,KAAK,IAAI,YAAY,cAAc,OAAO,SAAS,CAAC,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,EAAC,CAAE,OAAO,4BAA4B,MAAM;KAC/J,IAAI,EAAE,OAAO,UAAU,MAAM;KAC7B,IAAI,aAAa,GAAG,wBAAwB,iBAAgB,CAAE;MAC7D,QAAQ;MACR,WAAW,MAAM;MACjB;MACA;KACD,CAAC;KACD,gBAAgB,CAAC,GAAG,eAAe,GAAG,SAAS;IAChD;GACD,SAAS,KAAK;IACb,oBAAoB;IACpB,iBAAiB;GAClB,UAAU;IACT,IAAI;KACH,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM,UAAU,OAAO;IAC9E,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"}
|
|
@@ -23,6 +23,7 @@ __export(expandStyle_exports, { expandStyle: () => expandStyle });
|
|
|
23
23
|
module.exports = __toCommonJS(expandStyle_exports);
|
|
24
24
|
var import_constants = require("@tamagui/constants");
|
|
25
25
|
var import_config = require("../config.cjs");
|
|
26
|
+
require("./borderComponents.cjs");
|
|
26
27
|
require("./parseBorderShorthand.cjs");
|
|
27
28
|
require("./parseOutlineShorthand.cjs");
|
|
28
29
|
const neg1Flex = [
|
|
@@ -25,6 +25,7 @@ __export(expandStyle_exports, { expandStyle: () => expandStyle });
|
|
|
25
25
|
module.exports = __toCommonJS(expandStyle_exports);
|
|
26
26
|
var import_constants = require("@tamagui/constants");
|
|
27
27
|
var import_config = require("../config.native.js");
|
|
28
|
+
var import_borderComponents = require("./borderComponents.native.js");
|
|
28
29
|
var import_parseBorderShorthand = require("./parseBorderShorthand.native.js");
|
|
29
30
|
var import_parseOutlineShorthand = require("./parseOutlineShorthand.native.js");
|
|
30
31
|
var _loop = function(parent2) {
|
|
@@ -40,6 +41,13 @@ function expandStyle(key, value) {
|
|
|
40
41
|
switch (key) {
|
|
41
42
|
case "objectFit": return [["resizeMode", resizeModeMap[value] || "cover"]];
|
|
42
43
|
case "verticalAlign": return [["textAlignVertical", verticalAlignMap[value] || "auto"]];
|
|
44
|
+
case "direction": return [["direction", value], ["writingDirection", directionMap[value] || "auto"]];
|
|
45
|
+
case "gap":
|
|
46
|
+
if (typeof value === "string") {
|
|
47
|
+
var parts = (0, import_borderComponents.splitComponents)(value);
|
|
48
|
+
if (parts.length === 2) return [["rowGap", parts[0]], ["columnGap", parts[1]]];
|
|
49
|
+
}
|
|
50
|
+
return;
|
|
43
51
|
case "position":
|
|
44
52
|
if (value === "fixed" || value === "sticky") return [["position", "absolute"]];
|
|
45
53
|
return;
|
|
@@ -85,6 +93,11 @@ var verticalAlignMap = {
|
|
|
85
93
|
bottom: "bottom",
|
|
86
94
|
auto: "auto"
|
|
87
95
|
};
|
|
96
|
+
var directionMap = {
|
|
97
|
+
ltr: "ltr",
|
|
98
|
+
rtl: "rtl",
|
|
99
|
+
inherit: "auto"
|
|
100
|
+
};
|
|
88
101
|
var all = [
|
|
89
102
|
"Top",
|
|
90
103
|
"Right",
|
|
@@ -25,6 +25,7 @@ __export(expandStyle_exports, { expandStyle: () => expandStyle });
|
|
|
25
25
|
module.exports = __toCommonJS(expandStyle_exports);
|
|
26
26
|
var import_constants = require("@tamagui/constants");
|
|
27
27
|
var import_config = require("../config.native.js");
|
|
28
|
+
var import_borderComponents = require("./borderComponents.native.js");
|
|
28
29
|
var import_parseBorderShorthand = require("./parseBorderShorthand.native.js");
|
|
29
30
|
var import_parseOutlineShorthand = require("./parseOutlineShorthand.native.js");
|
|
30
31
|
var _loop = function(parent2) {
|
|
@@ -40,6 +41,13 @@ function expandStyle(key, value) {
|
|
|
40
41
|
switch (key) {
|
|
41
42
|
case "objectFit": return [["resizeMode", resizeModeMap[value] || "cover"]];
|
|
42
43
|
case "verticalAlign": return [["textAlignVertical", verticalAlignMap[value] || "auto"]];
|
|
44
|
+
case "direction": return [["direction", value], ["writingDirection", directionMap[value] || "auto"]];
|
|
45
|
+
case "gap":
|
|
46
|
+
if (typeof value === "string") {
|
|
47
|
+
var parts = (0, import_borderComponents.splitComponents)(value);
|
|
48
|
+
if (parts.length === 2) return [["rowGap", parts[0]], ["columnGap", parts[1]]];
|
|
49
|
+
}
|
|
50
|
+
return;
|
|
43
51
|
case "position":
|
|
44
52
|
if (value === "fixed" || value === "sticky") return [["position", "absolute"]];
|
|
45
53
|
return;
|
|
@@ -85,6 +93,11 @@ var verticalAlignMap = {
|
|
|
85
93
|
bottom: "bottom",
|
|
86
94
|
auto: "auto"
|
|
87
95
|
};
|
|
96
|
+
var directionMap = {
|
|
97
|
+
ltr: "ltr",
|
|
98
|
+
rtl: "rtl",
|
|
99
|
+
inherit: "auto"
|
|
100
|
+
};
|
|
88
101
|
var all = [
|
|
89
102
|
"Top",
|
|
90
103
|
"Right",
|
|
@@ -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\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,mBAAmB,YAAY,CAAC;AAChE,OAAO,UAAU,aAAa,mBAAmB;AACjD,IAA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CAAC,WAAW;CAC9B,gBAAgB,CAAC,cAAc;CAC/B,cAAc,CAAC,cAAc,eAAe;CAC5C,mBAAmB,CAAC,YAAY;CAChC,iBAAiB,CAAC,eAAe;CACjC,kBAAkB,CAAC,kBAAkB,mBAAmB;CACxD,kBAAkB,CAAC,kBAAkB,mBAAmB;CACxD,kBAAkB,CAAC,kBAAkB,mBAAmB;CACxD,uBAAuB,CAAC,gBAAgB;CACxC,qBAAqB,CAAC,mBAAmB;CACzC,uBAAuB,CAAC,gBAAgB;CACxC,qBAAqB,CAAC,mBAAmB;CACzC,uBAAuB,CAAC,gBAAgB;CACxC,qBAAqB,CAAC,mBAAmB;CACzC,cAAc,CAAC,WAAW;CAC1B,cAAc,CAAC,WAAW;CAC1B,eAAe,CAAC,UAAU;CAC1B,eAAe,CAAC,UAAU;CAC1B,WAAW,CAAC,QAAQ;CACpB,YAAY,CAAC,OAAO;AACrB;AACA,IAAI,yBAAyB;CAC5B,mBAAmB,CAAC,kBAAkB,kBAAkB;CACxD,mBAAmB,CAAC,kBAAkB,kBAAkB;CACxD,mBAAmB,CAAC,kBAAkB,kBAAkB;CACxD,wBAAwB,CAAC,kBAAkB;CAC3C,sBAAsB,CAAC,gBAAgB;CACvC,wBAAwB,CAAC,kBAAkB;CAC3C,sBAAsB,CAAC,gBAAgB;CACvC,wBAAwB,CAAC,kBAAkB;CAC3C,sBAAsB,CAAC,gBAAgB;CACvC,cAAc,CAAC,aAAa,aAAa;CACzC,mBAAmB,CAAC,aAAa;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"}
|
|
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_borderComponents = require(\"./borderComponents\");\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 \"direction\": return [[\"direction\", value], [\"writingDirection\", directionMap[value] || \"auto\"]];\n\t\tcase \"gap\":\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tvar parts = (0, import_borderComponents.splitComponents)(value);\n\t\t\t\tif (parts.length === 2) return [[\"rowGap\", parts[0]], [\"columnGap\", parts[1]]];\n\t\t\t}\n\t\t\treturn;\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 directionMap = {\n\tltr: \"ltr\",\n\trtl: \"rtl\",\n\tinherit: \"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,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B;CACzC,uBAAuB,CAAC,gBAAgB;CACxC,qBAAqB,CAAC,mBAAmB;CACzC,cAAc,CAAC,WAAW;CAC1B,cAAc,CAAC,WAAW;CAC1B,eAAe,CAAC,UAAU;CAC1B,eAAe,CAAC,UAAU;CAC1B,WAAW,CAAC,QAAQ;CACpB,YAAY,CAAC,OAAO;AACrB;AACA,IAAI,yBAAyB;CAC5B,mBAAmB,CAAC,kBAAkB,kBAAkB;CACxD,mBAAmB,CAAC,kBAAkB,kBAAkB;CACxD,mBAAmB,CAAC,kBAAkB,kBAAkB;CACxD,wBAAwB,CAAC,kBAAkB;CAC3C,sBAAsB,CAAC,gBAAgB;CACvC,wBAAwB,CAAC,kBAAkB;CAC3C,sBAAsB,CAAC,gBAAgB;CACvC,wBAAwB,CAAC,kBAAkB;CAC3C,sBAAsB,CAAC,gBAAgB;CACvC,cAAc,CAAC,aAAa,aAAa;CACzC,mBAAmB,CAAC,aAAa;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"}
|
|
@@ -57,6 +57,8 @@ var import_insertStyleRule = require("./insertStyleRule.cjs");
|
|
|
57
57
|
var import_log = require("./log.cjs");
|
|
58
58
|
var import_normalizeColor = require("./normalizeColor.cjs");
|
|
59
59
|
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs");
|
|
60
|
+
require("./nativeTextMetrics.cjs");
|
|
61
|
+
require("./isTamaguiElement.cjs");
|
|
60
62
|
require("./parseNativeStyle.cjs");
|
|
61
63
|
var import_parseNativeTransform = require("./parseNativeTransform.native.cjs");
|
|
62
64
|
require("./resolveNativeUnits.cjs");
|
|
@@ -853,7 +855,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
853
855
|
const fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "";
|
|
854
856
|
const group = props.group ?? frontendGroup;
|
|
855
857
|
const groupClassName = group ? `t_group_${group}` : "";
|
|
856
|
-
let finalClassName = isText ? "is_Text" : "is_View";
|
|
858
|
+
let finalClassName = staticConfig.isDOM ? "is_DOM" : isText ? "is_Text" : "is_View";
|
|
857
859
|
if (fontFamilyClassName) finalClassName += ` ${fontFamilyClassName}`;
|
|
858
860
|
let hasPropertyClassNames = false;
|
|
859
861
|
if (classNames) for (const key in classNames) {
|
|
@@ -1539,7 +1541,13 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1539
1541
|
const grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
|
|
1540
1542
|
property = webStyleProperty(property);
|
|
1541
1543
|
if (property === "backdropFilter") emitValue(state, "WebkitBackdropFilter", raw, cursor, originalValue, contextOnly);
|
|
1542
|
-
if ((0, import_createVariable.isVariable)(raw))
|
|
1544
|
+
if ((0, import_createVariable.isVariable)(raw)) {
|
|
1545
|
+
raw = (0, import_resolveVariableValue.resolveVariableValue)(property, raw, state.styleProps.resolveValues);
|
|
1546
|
+
if (property === "lineHeight") {
|
|
1547
|
+
emitProperty(state, property, raw, cursor, originalValue, contextOnly);
|
|
1548
|
+
return;
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1543
1551
|
if (typeof raw === "string" && (property === "transition" || property === "transitionProperty")) raw = grammar.normalizeTransition(raw);
|
|
1544
1552
|
if ((property === "borderWidth" || property === "borderTopWidth" || property === "borderRightWidth" || property === "borderBottomWidth" || property === "borderLeftWidth") && state.styleProps.noNormalize !== false) writeStyleRecord(state, property.slice(0, -5) + "Style", "solid", cursor, originalValue, recordDefault);
|
|
1545
1553
|
const propertyKind = grammar.propertyKind(property);
|
|
@@ -59,6 +59,8 @@ var import_insertStyleRule = require("./insertStyleRule.native.js");
|
|
|
59
59
|
var import_log = require("./log.native.js");
|
|
60
60
|
var import_normalizeColor = require("./normalizeColor.native.js");
|
|
61
61
|
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.native.js");
|
|
62
|
+
var import_nativeTextMetrics = require("./nativeTextMetrics.native.js");
|
|
63
|
+
var import_isTamaguiElement = require("./isTamaguiElement.native.js");
|
|
62
64
|
var import_parseNativeStyle = require("./parseNativeStyle.native.js");
|
|
63
65
|
var import_parseNativeTransform = require("./parseNativeTransform.native.js");
|
|
64
66
|
var import_resolveNativeUnits = require("./resolveNativeUnits.native.js");
|
|
@@ -523,11 +525,12 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
523
525
|
if (replacement) (0, import_warnOnce.warnOnce)(`v2-prop:${keyInit}`, `prop "${keyInit}" was removed in v3; use ${replacement}`);
|
|
524
526
|
}
|
|
525
527
|
}
|
|
528
|
+
if (keyInit === "userSelect") {
|
|
529
|
+
viewProps.selectable = valInit !== "none";
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
526
532
|
if (!isValidStyleKeyInit) {
|
|
527
|
-
if (keyInit === "
|
|
528
|
-
keyInit = "selectable";
|
|
529
|
-
valInit = valInit !== "none";
|
|
530
|
-
} else if (keyInit === "textOverflow") {
|
|
533
|
+
if (keyInit === "textOverflow") {
|
|
531
534
|
if (isText && valInit === "ellipsis") {
|
|
532
535
|
var _viewProps, _viewProps1;
|
|
533
536
|
var _numberOfLines;
|
|
@@ -865,26 +868,47 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
865
868
|
}
|
|
866
869
|
}
|
|
867
870
|
}
|
|
871
|
+
var nativeTextMetrics;
|
|
872
|
+
var _styleState_style2;
|
|
868
873
|
if (viewProps.tabIndex === 0) {
|
|
869
874
|
var _viewProps;
|
|
870
875
|
var _accessible;
|
|
871
876
|
(_accessible = (_viewProps = viewProps).accessible) !== null && _accessible !== void 0 || (_viewProps.accessible = true);
|
|
872
877
|
}
|
|
873
|
-
|
|
874
|
-
|
|
878
|
+
if ((isText || isInput || staticConfig.isDOM) && !isHOC && (styleState.nativeLineHeight !== void 0 || ((_styleState_style2 = styleState.style) === null || _styleState_style2 === void 0 ? void 0 : _styleState_style2.fontSize) !== void 0 || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.parentFontSize) !== void 0 || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.parentLineHeight) !== void 0)) {
|
|
879
|
+
var _parentSplitStyles_nativeTextMetrics;
|
|
880
|
+
var _styleState2;
|
|
881
|
+
var style = (_styleState2 = styleState).style || (_styleState2.style = {});
|
|
882
|
+
var _styleState_nativeLineHeight;
|
|
883
|
+
var lineHeight = (_styleState_nativeLineHeight = styleState.nativeLineHeight) !== null && _styleState_nativeLineHeight !== void 0 ? _styleState_nativeLineHeight : parentSplitStyles === null || parentSplitStyles === void 0 ? void 0 : (_parentSplitStyles_nativeTextMetrics = parentSplitStyles.nativeTextMetrics) === null || _parentSplitStyles_nativeTextMetrics === void 0 ? void 0 : _parentSplitStyles_nativeTextMetrics.lineHeight;
|
|
884
|
+
if (typeof lineHeight === "string") {
|
|
885
|
+
var length = (0, import_resolveNativeUnits.resolveNativeUnits)("lineHeight", lineHeight, styleState);
|
|
886
|
+
if (typeof length === "number") lineHeight = `${length}px`;
|
|
887
|
+
}
|
|
888
|
+
nativeTextMetrics = (0, import_nativeTextMetrics.resolveTextMetrics)(style, lineHeight, componentContext, styleProps.isStatic, !staticConfig.isDOM && !(processedProps.asChild && (0, import_isTamaguiElement.isTamaguiElement)(processedProps.children)));
|
|
889
|
+
if (staticConfig.isDOM) viewProps.__textMetrics = nativeTextMetrics;
|
|
890
|
+
var directText = styleState;
|
|
891
|
+
var prevTextStyle = directText.flatPrevStyle;
|
|
892
|
+
if (prevTextStyle && !directText.flatStyleChanged) {
|
|
893
|
+
var resolvedTextStyle = styleState.style;
|
|
894
|
+
if (resolvedTextStyle && (resolvedTextStyle.fontSize !== prevTextStyle.fontSize || resolvedTextStyle.lineHeight !== prevTextStyle.lineHeight)) directText.flatStyleChanged = true;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
var style1 = styleState.style;
|
|
898
|
+
if (style1 === null || style1 === void 0 ? void 0 : style1.fontFamily) {
|
|
875
899
|
var _getFont;
|
|
876
|
-
var faceInfo = (_getFont = (0, import_config.getFont)(
|
|
900
|
+
var faceInfo = (_getFont = (0, import_config.getFont)(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
|
|
877
901
|
if (faceInfo) {
|
|
878
902
|
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight;
|
|
879
|
-
var overrideFace = (_faceInfo_style_fontWeight = faceInfo[
|
|
903
|
+
var overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 ? void 0 : (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
|
|
880
904
|
if (overrideFace) {
|
|
881
|
-
|
|
905
|
+
style1.fontFamily = overrideFace;
|
|
882
906
|
styleState.fontFamily = overrideFace;
|
|
883
|
-
delete
|
|
884
|
-
delete
|
|
907
|
+
delete style1.fontWeight;
|
|
908
|
+
delete style1.fontStyle;
|
|
885
909
|
}
|
|
886
910
|
}
|
|
887
|
-
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") (0, import_log.log)(`Found fontFamily native: ${
|
|
911
|
+
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") (0, import_log.log)(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
|
|
888
912
|
}
|
|
889
913
|
if (styleState.style) styleState.style = (0, import_nativeStyleEngine.normalizeNativeStyle)(styleState.style);
|
|
890
914
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
@@ -914,6 +938,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
914
938
|
mediaGroups,
|
|
915
939
|
overriddenContextProps: styleState.overriddenContextProps
|
|
916
940
|
};
|
|
941
|
+
if (nativeTextMetrics) result.nativeTextMetrics = nativeTextMetrics;
|
|
917
942
|
if (effectiveTransition != null) result.effectiveTransition = effectiveTransition;
|
|
918
943
|
if (conditionalStates) result.programStates = conditionalStates;
|
|
919
944
|
if (usesSafeArea) result.usesSafeArea = true;
|
|
@@ -929,8 +954,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
929
954
|
if (frontendContainerType !== void 0) result.frontendContainerType = frontendContainerType;
|
|
930
955
|
if (!noMergeStyle) {
|
|
931
956
|
if (!asChildExceptStyleLike) {
|
|
932
|
-
var
|
|
933
|
-
if (
|
|
957
|
+
var style2 = styleState.style;
|
|
958
|
+
if (style2) viewProps.style = style2;
|
|
934
959
|
}
|
|
935
960
|
}
|
|
936
961
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
@@ -1033,7 +1058,8 @@ function mergeStyle(styleState, key, val) {
|
|
|
1033
1058
|
(0, import_runtime.addTransformValue)(styleState.transformAccumulator, key, val);
|
|
1034
1059
|
} else {
|
|
1035
1060
|
var out = val;
|
|
1036
|
-
if (typeof out === "
|
|
1061
|
+
if (key === "lineHeight") styleState.nativeLineHeight = typeof out === "number" && (0, import_createVariable.isVariable)(originalVal) && typeof originalVal.val === "number" ? `${out}px` : out;
|
|
1062
|
+
else if (typeof out === "string") {
|
|
1037
1063
|
if (out.includes("cqi") || out.includes("cqw")) {
|
|
1038
1064
|
var _styleState2, _styleState3;
|
|
1039
1065
|
((_styleState2 = styleState).flatGroupKeys || (_styleState2.flatGroupKeys = /* @__PURE__ */ new Set())).add("@");
|
|
@@ -1675,7 +1701,7 @@ function emitResolved(state, property, raw, cursor, originalValue, contextOnly)
|
|
|
1675
1701
|
}
|
|
1676
1702
|
function resolveValue(state, property, raw, nativeColors) {
|
|
1677
1703
|
var value = typeof raw === "string" ? configuredValue(state, property, raw, true, nativeColors) : raw;
|
|
1678
|
-
if (typeof value === "string" && value !== "" &&
|
|
1704
|
+
if (typeof value === "string" && value !== "" && property !== "lineHeight") value = resolveNumericValue(value);
|
|
1679
1705
|
return value;
|
|
1680
1706
|
}
|
|
1681
1707
|
function shadowUnit(part) {
|
|
@@ -1684,7 +1710,13 @@ function shadowUnit(part) {
|
|
|
1684
1710
|
function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1685
1711
|
var condition = cursor ? cursor[conditionValue] : 0;
|
|
1686
1712
|
var grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
|
|
1687
|
-
if ((0, import_createVariable.isVariable)(raw))
|
|
1713
|
+
if ((0, import_createVariable.isVariable)(raw)) {
|
|
1714
|
+
raw = (0, import_resolveVariableValue.resolveVariableValue)(property, raw, state.styleProps.resolveValues);
|
|
1715
|
+
if (property === "lineHeight") {
|
|
1716
|
+
emitProperty(state, property, raw, cursor, originalValue, contextOnly);
|
|
1717
|
+
return;
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1688
1720
|
if (typeof raw === "string" && (property === "transition" || property === "transitionProperty")) raw = grammar.normalizeTransition(raw);
|
|
1689
1721
|
if ((property === "borderWidth" || property === "borderTopWidth" || property === "borderRightWidth" || property === "borderBottomWidth" || property === "borderLeftWidth") && state.styleProps.noNormalize !== false) writeStyleRecord(state, "borderStyle", "solid", cursor, originalValue, recordDefault);
|
|
1690
1722
|
if (grammar.propertyKind(property) === 5) {
|
|
@@ -1813,7 +1845,9 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1813
1845
|
emitProperty(state, property, value3, cursor, originalValue, contextOnly);
|
|
1814
1846
|
return;
|
|
1815
1847
|
}
|
|
1816
|
-
if (typeof raw === "string" && expanded.length > 1) {
|
|
1848
|
+
if (typeof raw === "string" && expanded.length > 1 && expanded.every(function(entry) {
|
|
1849
|
+
return entry[1] === expanded[0][1];
|
|
1850
|
+
})) {
|
|
1817
1851
|
var parts1 = (0, import_borderComponents.splitComponents)(raw);
|
|
1818
1852
|
if (parts1.length > 0 && parts1.length <= (expanded.length === 4 ? 4 : 2)) {
|
|
1819
1853
|
for (var index1 = 0; index1 < expanded.length; index1++) {
|
|
@@ -1974,6 +2008,7 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
1974
2008
|
}
|
|
1975
2009
|
function clearDirectStyle(state, property) {
|
|
1976
2010
|
var _direct_flatAtomics;
|
|
2011
|
+
if (property === "lineHeight") state.nativeLineHeight = void 0;
|
|
1977
2012
|
var direct = state;
|
|
1978
2013
|
if (direct.flatDynamicColors) delete direct.flatDynamicColors[property];
|
|
1979
2014
|
var propertyKind = (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property);
|
|
@@ -59,6 +59,8 @@ var import_insertStyleRule = require("./insertStyleRule.native.js");
|
|
|
59
59
|
var import_log = require("./log.native.js");
|
|
60
60
|
var import_normalizeColor = require("./normalizeColor.native.js");
|
|
61
61
|
var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.native.js");
|
|
62
|
+
var import_nativeTextMetrics = require("./nativeTextMetrics.native.js");
|
|
63
|
+
var import_isTamaguiElement = require("./isTamaguiElement.native.js");
|
|
62
64
|
var import_parseNativeStyle = require("./parseNativeStyle.native.js");
|
|
63
65
|
var import_parseNativeTransform = require("./parseNativeTransform.native.js");
|
|
64
66
|
var import_resolveNativeUnits = require("./resolveNativeUnits.native.js");
|
|
@@ -523,11 +525,12 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
523
525
|
if (replacement) (0, import_warnOnce.warnOnce)(`v2-prop:${keyInit}`, `prop "${keyInit}" was removed in v3; use ${replacement}`);
|
|
524
526
|
}
|
|
525
527
|
}
|
|
528
|
+
if (keyInit === "userSelect") {
|
|
529
|
+
viewProps.selectable = valInit !== "none";
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
526
532
|
if (!isValidStyleKeyInit) {
|
|
527
|
-
if (keyInit === "
|
|
528
|
-
keyInit = "selectable";
|
|
529
|
-
valInit = valInit !== "none";
|
|
530
|
-
} else if (keyInit === "textOverflow") {
|
|
533
|
+
if (keyInit === "textOverflow") {
|
|
531
534
|
if (isText && valInit === "ellipsis") {
|
|
532
535
|
var _viewProps, _viewProps1;
|
|
533
536
|
var _numberOfLines;
|
|
@@ -865,26 +868,47 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
865
868
|
}
|
|
866
869
|
}
|
|
867
870
|
}
|
|
871
|
+
var nativeTextMetrics;
|
|
872
|
+
var _styleState_style2;
|
|
868
873
|
if (viewProps.tabIndex === 0) {
|
|
869
874
|
var _viewProps;
|
|
870
875
|
var _accessible;
|
|
871
876
|
(_accessible = (_viewProps = viewProps).accessible) !== null && _accessible !== void 0 || (_viewProps.accessible = true);
|
|
872
877
|
}
|
|
873
|
-
|
|
874
|
-
|
|
878
|
+
if ((isText || isInput || staticConfig.isDOM) && !isHOC && (styleState.nativeLineHeight !== void 0 || ((_styleState_style2 = styleState.style) === null || _styleState_style2 === void 0 ? void 0 : _styleState_style2.fontSize) !== void 0 || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.parentFontSize) !== void 0 || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.parentLineHeight) !== void 0)) {
|
|
879
|
+
var _parentSplitStyles_nativeTextMetrics;
|
|
880
|
+
var _styleState2;
|
|
881
|
+
var style = (_styleState2 = styleState).style || (_styleState2.style = {});
|
|
882
|
+
var _styleState_nativeLineHeight;
|
|
883
|
+
var lineHeight = (_styleState_nativeLineHeight = styleState.nativeLineHeight) !== null && _styleState_nativeLineHeight !== void 0 ? _styleState_nativeLineHeight : parentSplitStyles === null || parentSplitStyles === void 0 ? void 0 : (_parentSplitStyles_nativeTextMetrics = parentSplitStyles.nativeTextMetrics) === null || _parentSplitStyles_nativeTextMetrics === void 0 ? void 0 : _parentSplitStyles_nativeTextMetrics.lineHeight;
|
|
884
|
+
if (typeof lineHeight === "string") {
|
|
885
|
+
var length = (0, import_resolveNativeUnits.resolveNativeUnits)("lineHeight", lineHeight, styleState);
|
|
886
|
+
if (typeof length === "number") lineHeight = `${length}px`;
|
|
887
|
+
}
|
|
888
|
+
nativeTextMetrics = (0, import_nativeTextMetrics.resolveTextMetrics)(style, lineHeight, componentContext, styleProps.isStatic, !staticConfig.isDOM && !(processedProps.asChild && (0, import_isTamaguiElement.isTamaguiElement)(processedProps.children)));
|
|
889
|
+
if (staticConfig.isDOM) viewProps.__textMetrics = nativeTextMetrics;
|
|
890
|
+
var directText = styleState;
|
|
891
|
+
var prevTextStyle = directText.flatPrevStyle;
|
|
892
|
+
if (prevTextStyle && !directText.flatStyleChanged) {
|
|
893
|
+
var resolvedTextStyle = styleState.style;
|
|
894
|
+
if (resolvedTextStyle && (resolvedTextStyle.fontSize !== prevTextStyle.fontSize || resolvedTextStyle.lineHeight !== prevTextStyle.lineHeight)) directText.flatStyleChanged = true;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
var style1 = styleState.style;
|
|
898
|
+
if (style1 === null || style1 === void 0 ? void 0 : style1.fontFamily) {
|
|
875
899
|
var _getFont;
|
|
876
|
-
var faceInfo = (_getFont = (0, import_config.getFont)(
|
|
900
|
+
var faceInfo = (_getFont = (0, import_config.getFont)(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
|
|
877
901
|
if (faceInfo) {
|
|
878
902
|
var _faceInfo_style_fontWeight_, _faceInfo_style_fontWeight;
|
|
879
|
-
var overrideFace = (_faceInfo_style_fontWeight = faceInfo[
|
|
903
|
+
var overrideFace = (_faceInfo_style_fontWeight = faceInfo[style1.fontWeight]) === null || _faceInfo_style_fontWeight === void 0 ? void 0 : (_faceInfo_style_fontWeight_ = _faceInfo_style_fontWeight[style1.fontStyle || "normal"]) === null || _faceInfo_style_fontWeight_ === void 0 ? void 0 : _faceInfo_style_fontWeight_.val;
|
|
880
904
|
if (overrideFace) {
|
|
881
|
-
|
|
905
|
+
style1.fontFamily = overrideFace;
|
|
882
906
|
styleState.fontFamily = overrideFace;
|
|
883
|
-
delete
|
|
884
|
-
delete
|
|
907
|
+
delete style1.fontWeight;
|
|
908
|
+
delete style1.fontStyle;
|
|
885
909
|
}
|
|
886
910
|
}
|
|
887
|
-
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") (0, import_log.log)(`Found fontFamily native: ${
|
|
911
|
+
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") (0, import_log.log)(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
|
|
888
912
|
}
|
|
889
913
|
if (styleState.style) styleState.style = (0, import_nativeStyleEngine.normalizeNativeStyle)(styleState.style);
|
|
890
914
|
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
@@ -914,6 +938,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
914
938
|
mediaGroups,
|
|
915
939
|
overriddenContextProps: styleState.overriddenContextProps
|
|
916
940
|
};
|
|
941
|
+
if (nativeTextMetrics) result.nativeTextMetrics = nativeTextMetrics;
|
|
917
942
|
if (effectiveTransition != null) result.effectiveTransition = effectiveTransition;
|
|
918
943
|
if (conditionalStates) result.programStates = conditionalStates;
|
|
919
944
|
if (usesSafeArea) result.usesSafeArea = true;
|
|
@@ -929,8 +954,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
929
954
|
if (frontendContainerType !== void 0) result.frontendContainerType = frontendContainerType;
|
|
930
955
|
if (!noMergeStyle) {
|
|
931
956
|
if (!asChildExceptStyleLike) {
|
|
932
|
-
var
|
|
933
|
-
if (
|
|
957
|
+
var style2 = styleState.style;
|
|
958
|
+
if (style2) viewProps.style = style2;
|
|
934
959
|
}
|
|
935
960
|
}
|
|
936
961
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
@@ -1033,7 +1058,8 @@ function mergeStyle(styleState, key, val) {
|
|
|
1033
1058
|
(0, import_runtime.addTransformValue)(styleState.transformAccumulator, key, val);
|
|
1034
1059
|
} else {
|
|
1035
1060
|
var out = val;
|
|
1036
|
-
if (typeof out === "
|
|
1061
|
+
if (key === "lineHeight") styleState.nativeLineHeight = typeof out === "number" && (0, import_createVariable.isVariable)(originalVal) && typeof originalVal.val === "number" ? `${out}px` : out;
|
|
1062
|
+
else if (typeof out === "string") {
|
|
1037
1063
|
if (out.includes("cqi") || out.includes("cqw")) {
|
|
1038
1064
|
var _styleState2, _styleState3;
|
|
1039
1065
|
((_styleState2 = styleState).flatGroupKeys || (_styleState2.flatGroupKeys = /* @__PURE__ */ new Set())).add("@");
|
|
@@ -1675,7 +1701,7 @@ function emitResolved(state, property, raw, cursor, originalValue, contextOnly)
|
|
|
1675
1701
|
}
|
|
1676
1702
|
function resolveValue(state, property, raw, nativeColors) {
|
|
1677
1703
|
var value = typeof raw === "string" ? configuredValue(state, property, raw, true, nativeColors) : raw;
|
|
1678
|
-
if (typeof value === "string" && value !== "" &&
|
|
1704
|
+
if (typeof value === "string" && value !== "" && property !== "lineHeight") value = resolveNumericValue(value);
|
|
1679
1705
|
return value;
|
|
1680
1706
|
}
|
|
1681
1707
|
function shadowUnit(part) {
|
|
@@ -1684,7 +1710,13 @@ function shadowUnit(part) {
|
|
|
1684
1710
|
function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1685
1711
|
var condition = cursor ? cursor[conditionValue] : 0;
|
|
1686
1712
|
var grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
|
|
1687
|
-
if ((0, import_createVariable.isVariable)(raw))
|
|
1713
|
+
if ((0, import_createVariable.isVariable)(raw)) {
|
|
1714
|
+
raw = (0, import_resolveVariableValue.resolveVariableValue)(property, raw, state.styleProps.resolveValues);
|
|
1715
|
+
if (property === "lineHeight") {
|
|
1716
|
+
emitProperty(state, property, raw, cursor, originalValue, contextOnly);
|
|
1717
|
+
return;
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1688
1720
|
if (typeof raw === "string" && (property === "transition" || property === "transitionProperty")) raw = grammar.normalizeTransition(raw);
|
|
1689
1721
|
if ((property === "borderWidth" || property === "borderTopWidth" || property === "borderRightWidth" || property === "borderBottomWidth" || property === "borderLeftWidth") && state.styleProps.noNormalize !== false) writeStyleRecord(state, "borderStyle", "solid", cursor, originalValue, recordDefault);
|
|
1690
1722
|
if (grammar.propertyKind(property) === 5) {
|
|
@@ -1813,7 +1845,9 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1813
1845
|
emitProperty(state, property, value3, cursor, originalValue, contextOnly);
|
|
1814
1846
|
return;
|
|
1815
1847
|
}
|
|
1816
|
-
if (typeof raw === "string" && expanded.length > 1) {
|
|
1848
|
+
if (typeof raw === "string" && expanded.length > 1 && expanded.every(function(entry) {
|
|
1849
|
+
return entry[1] === expanded[0][1];
|
|
1850
|
+
})) {
|
|
1817
1851
|
var parts1 = (0, import_borderComponents.splitComponents)(raw);
|
|
1818
1852
|
if (parts1.length > 0 && parts1.length <= (expanded.length === 4 ? 4 : 2)) {
|
|
1819
1853
|
for (var index1 = 0; index1 < expanded.length; index1++) {
|
|
@@ -1974,6 +2008,7 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
1974
2008
|
}
|
|
1975
2009
|
function clearDirectStyle(state, property) {
|
|
1976
2010
|
var _direct_flatAtomics;
|
|
2011
|
+
if (property === "lineHeight") state.nativeLineHeight = void 0;
|
|
1977
2012
|
var direct = state;
|
|
1978
2013
|
if (direct.flatDynamicColors) delete direct.flatDynamicColors[property];
|
|
1979
2014
|
var propertyKind = (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property);
|