@tamagui/web 3.0.0-beta.745.1 → 3.0.0-beta.748.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/helpers/directStyle.cjs +1 -0
- package/dist/cjs/helpers/directStyle.native.cjs +1 -0
- package/dist/cjs/helpers/directStyle.native.js +1 -0
- package/dist/cjs/helpers/directStyle.native.js.map +1 -1
- package/dist/cjs/helpers/propMapper.cjs +15 -0
- package/dist/cjs/helpers/propMapper.native.cjs +28 -0
- package/dist/cjs/helpers/propMapper.native.js +28 -0
- package/dist/cjs/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/helpers/directStyle.mjs +1 -1
- package/dist/esm/helpers/directStyle.mjs.map +1 -1
- package/dist/esm/helpers/directStyle.native.js +1 -1
- package/dist/esm/helpers/directStyle.native.js.map +1 -1
- package/dist/esm/helpers/propMapper.mjs +16 -1
- package/dist/esm/helpers/propMapper.mjs.map +1 -1
- package/dist/esm/helpers/propMapper.native.js +29 -1
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/package.json +15 -15
- package/src/helpers/directStyle.ts +1 -1
- package/src/helpers/propMapper.ts +33 -1
- package/src/styled.tsx +4 -0
- package/src/types.tsx +13 -2
- package/types/dom/html.d.ts +49 -49
- package/types/dom/html.native.d.ts +46 -46
- package/types/helpers/directStyle.d.ts +1 -0
- package/types/helpers/directStyle.d.ts.map +1 -1
- package/types/helpers/propMapper.d.ts.map +1 -1
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +4 -1
- package/types/types.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propMapper.js","names":[],"sources":["esm/helpers/propMapper.js"],"sourcesContent":["import { scanFlatValue } from \"@tamagui/style-grammar/runtime\";\nimport { isVariable } from \"../createVariable\";\nimport { variantResolverNames } from \"../types\";\nimport { resolveClauseChain } from \"./directStyle\";\nimport { expandStyle } from \"./expandStyle\";\nimport { resolveVariableValue } from \"./resolveVariableValue\";\nimport { getVariantExtras } from \"./getVariantExtras\";\nimport { isObj } from \"./isObj\";\nimport { normalizeStyle } from \"./normalizeStyle\";\nimport { isRemValue, resolveRem } from \"./resolveRem\";\nimport { expandSafeAreaValue, isSafeAreaKey } from \"./resolveSafeArea\";\nimport { skipProps } from \"./skipProps\";\nimport { styleOriginalValues } from \"./styleOriginalValues\";\n\nexport * from \"./tokenCategories\"\n\nfunction appendFlatClause(prev, conditionSource, value) {\n\tif (prev != null && typeof prev !== \"string\" && typeof prev !== \"number\") return;\n\tif (typeof value !== \"string\" && typeof value !== \"number\") return;\n\treturn prev == null ? `${conditionSource}:${value}` : `${prev} ${conditionSource}:${value}`;\n}\nconst propMapperHandler = {\n\tsegment(ctx, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {\n\t\tif (isBase) {\n\t\t\tif (valid && start < end) ctx.push(start, end, -1, -1);\n\t\t\treturn;\n\t\t}\n\t\tif (!chainValid) return;\n\t\tif (resolveClauseChain(ctx[0], source, chainStart, chainEnd) && valid && start < end) ctx.push(start, end, chainStart, chainEnd);\n\t},\n\tchain(ctx) {\n\t\tctx[2] = true;\n\t\treturn true;\n\t},\n\terror(ctx) {\n\t\tctx[2] = true;\n\t}\n};\nconst propMapper = (key, value, styleState, disabled, map) => {\n\tif (disabled) return map(key, value);\n\tif (key === \"elevationAndroid\") return;\n\tconst { conf, styleProps, staticConfig } = styleState;\n\tconst { variants } = staticConfig;\n\tif (!styleProps.noExpand) {\n\t\tif (variants && key in variants) {\n\t\t\tconst variantValue = resolveVariants(key, value, styleProps, styleState, \"\");\n\t\t\tif (variantValue) {\n\t\t\t\tfor (const entry of variantValue) map(entry[0], entry[1], entry[2], entry[3]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\tif (!styleProps.disableExpandShorthands) {\n\t\tif (key in conf.shorthands) key = conf.shorthands[key];\n\t}\n\tconst originalValue = value;\n\tif (value === \"safe\" && isSafeAreaKey(key)) {\n\t\tconst expanded = expandSafeAreaValue(key);\n\t\tif (expanded) {\n\t\t\tfor (let i = 0; i < expanded.length; i++) {\n\t\t\t\tconst [nkey, nvalue] = expanded[i];\n\t\t\t\tmap(nkey, nvalue, originalValue);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}\n\tif (value != null) {\n\t\tif (typeof value === \"string\") value = isRemValue(value) ? resolveRem(value) : value;\n\t\telse if (isVariable(value)) value = resolveVariableValue(key, value, styleProps.resolveValues);\n\t\telse if (isRemValue(value)) value = resolveRem(value);\n\t}\n\tif (value != null) {\n\t\tif (key === \"fontFamily\" && typeof originalValue === \"string\") {\n\t\t\tif (originalValue in conf.fontsParsed) styleState.fontFamily = originalValue;\n\t\t}\n\t\tconst expanded = styleProps.noExpand || typeof value === \"string\" ? null : expandStyle(key, value, conf.settings.styleCompat || \"web\");\n\t\tif (expanded) {\n\t\t\tconst max = expanded.length;\n\t\t\tfor (let i = 0; i < max; i++) {\n\t\t\t\tconst [nkey, nvalue, noriginalValue] = expanded[i];\n\t\t\t\tmap(nkey, nvalue, noriginalValue ?? originalValue);\n\t\t\t}\n\t\t} else map(key, value, originalValue);\n\t}\n};\nconst resolveVariants = (key, value, styleProps, styleState, parentVariantKey) => {\n\tconst variantDefinition = styleState.staticConfig.variants?.[key];\n\tif (typeof value === \"string\" && value.indexOf(\":\") !== -1 && !(variantDefinition && typeof variantDefinition === \"object\" && value in variantDefinition)) {\n\t\tconst scan = [\n\t\t\tstyleState,\n\t\t\tvalue,\n\t\t\tfalse\n\t\t];\n\t\tscanFlatValue(value, propMapperHandler, scan);\n\t\tif (scan[2]) {\n\t\t\tlet entries;\n\t\t\tfor (let index = 3; index < scan.length; index += 4) {\n\t\t\t\tconst resolved = resolveVariantValue(key, value.slice(scan[index], scan[index + 1]), styleProps, styleState, parentVariantKey);\n\t\t\t\tif (!resolved) continue;\n\t\t\t\tentries ||= [];\n\t\t\t\tconst chainStart = scan[index + 2];\n\t\t\t\tconst modifier = chainStart === -1 ? void 0 : value.slice(chainStart, scan[index + 3]);\n\t\t\t\tfor (const entry of resolved) {\n\t\t\t\t\tif (modifier !== void 0) entry[3] = modifier;\n\t\t\t\t\tentries.push(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn entries || [];\n\t\t}\n\t}\n\treturn resolveVariantValue(key, value, styleProps, styleState, parentVariantKey);\n};\nconst resolveVariantValue = (key, value, styleProps, styleState, parentVariantKey) => {\n\tconst { staticConfig, conf, debug } = styleState;\n\tconst { variants } = staticConfig;\n\tif (!variants) return;\n\tconst variant = variants[key];\n\tlet variantValue = getVariantDefinition(variant, value, conf, styleState);\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") {\n\t\tconsole.groupCollapsed(`\\u2666\\uFE0F\\u2666\\uFE0F\\u2666\\uFE0F resolve variant ${key}`);\n\t\tconsole.info({\n\t\t\tkey,\n\t\t\tvalue,\n\t\t\tvariantValue,\n\t\t\tvariants\n\t\t});\n\t\tconsole.groupEnd();\n\t}\n\tif (!variantValue) {\n\t\tif (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === \"1\") {\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tconst name = styleState.styleProps.displayName || \"[UnnamedComponent]\";\n\t\t\t\tconsole.warn(`No variant found: ${name} has variant \"${key}\", but no matching value \"${value}\"`);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tif (typeof variantValue === \"function\") {\n\t\tconst fn = variantValue;\n\t\tconst extras = getVariantExtras(styleState);\n\t\tvariantValue = fn(value, extras);\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\" && true) {\n\t\t\tconsole.groupCollapsed(\" expanded functional variant\", key);\n\t\t\tconsole.info({\n\t\t\t\tfn,\n\t\t\t\tvariantValue,\n\t\t\t\textras\n\t\t\t});\n\t\t\tconsole.groupEnd();\n\t\t}\n\t}\n\tlet fontFamilyResult;\n\tif (isObj(variantValue)) {\n\t\tconst fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];\n\t\tif (fontFamilyUpdate) {\n\t\t\tfontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf);\n\t\t\tstyleState.fontFamily = fontFamilyResult;\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` updating font family`, fontFamilyResult);\n\t\t}\n\t\tvariantValue = resolveTokensAndVariants(key, variantValue, styleProps, styleState, parentVariantKey);\n\t}\n\tif (variantValue) {\n\t\tconst expanded = normalizeStyle(variantValue, !!styleProps.noNormalize);\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` expanding styles from `, variantValue, `to`, expanded);\n\t\tconst originalValues = styleOriginalValues.get(expanded);\n\t\tconst next = [];\n\t\tfor (const key2 in expanded) next.push([\n\t\t\tkey2,\n\t\t\texpanded[key2],\n\t\t\toriginalValues?.[key2]\n\t\t]);\n\t\treturn next;\n\t}\n};\nfunction getFontFamilyFromNameOrVariable(input, conf) {\n\tif (isVariable(input)) {\n\t\tconst val = variableToFontNameCache.get(input);\n\t\tif (val) return val;\n\t\tfor (const key in conf.fontsParsed) {\n\t\t\tconst familyVariable = conf.fontsParsed[key].family;\n\t\t\tif (isVariable(familyVariable)) {\n\t\t\t\tvariableToFontNameCache.set(familyVariable, key);\n\t\t\t\tif (familyVariable === input) return key;\n\t\t\t}\n\t\t}\n\t} else if (typeof input === \"string\" && input in conf.fontsParsed) return input;\n}\nconst variableToFontNameCache = /* @__PURE__ */ new WeakMap();\nconst resolveTokensAndVariants = (key, value, styleProps, styleState, parentVariantKey) => {\n\tconst { conf, staticConfig, debug } = styleState;\n\tconst { variants } = staticConfig;\n\tconst res = {};\n\tlet originalValues;\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` - resolveTokensAndVariants`, key, value);\n\tfor (const _key in value) {\n\t\tconst subKey = conf.shorthands[_key] || _key;\n\t\tconst val = value[_key];\n\t\tif (!styleProps.noSkip && subKey in skipProps) continue;\n\t\toriginalValues ||= {};\n\t\toriginalValues[subKey] = val;\n\t\tif (staticConfig) {\n\t\t\tconst contextProps = staticConfig.context?.props || staticConfig.parentStaticConfig?.context?.props;\n\t\t\tconst inheritedContextPropKeys = !staticConfig.context || staticConfig.context === staticConfig.parentStaticConfig?.context ? staticConfig.parentStaticConfig?.contextProps : void 0;\n\t\t\tconst contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;\n\t\t\tif (contextProps && subKey in contextProps || contextPropKeys?.includes(subKey) || staticConfig.context?.propKeys?.includes(subKey) || staticConfig.parentStaticConfig?.context?.propKeys?.includes(subKey)) {\n\t\t\t\tstyleState.overriddenContextProps ||= {};\n\t\t\t\tstyleState.overriddenContextProps[subKey] = val;\n\t\t\t\tstyleState.originalContextPropValues ||= {};\n\t\t\t\tstyleState.originalContextPropValues[subKey] = val;\n\t\t\t}\n\t\t}\n\t\tif (styleProps.noExpand) res[subKey] = val;\n\t\telse if (variants && subKey in variants) {\n\t\t\tif (parentVariantKey && parentVariantKey === key) res[subKey] = val;\n\t\t\telse {\n\t\t\t\tconst variantOut = resolveVariants(subKey, val, styleProps, styleState, key);\n\t\t\t\tif (variantOut) for (const [key2, val2, originalVal, conditionSource] of variantOut) {\n\t\t\t\t\tif (val2 == null) continue;\n\t\t\t\t\tif (conditionSource !== void 0) {\n\t\t\t\t\t\tconst appended = appendFlatClause(res[key2], conditionSource, val2);\n\t\t\t\t\t\tif (appended === void 0) {\n\t\t\t\t\t\t\tif (process.env.NODE_ENV === \"development\") console.warn(`[tamagui] conditional variant value for \"${key2}\" is not string-representable; dropping the clause`);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tres[key2] = appended;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tres[key2] = val2;\n\t\t\t\t\tif (originalVal !== void 0) {\n\t\t\t\t\t\toriginalValues ||= {};\n\t\t\t\t\t\toriginalValues[key2] = originalVal;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (isVariable(val)) {\n\t\t\tres[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`variable`, subKey, res[subKey]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof val === \"string\") {\n\t\t\tres[subKey] = isRemValue(val) ? resolveRem(val) : val;\n\t\t\tcontinue;\n\t\t}\n\t\tif (isObj(val)) {\n\t\t\tconst subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`object`, subKey, subObject);\n\t\t\tres[subKey] ??= {};\n\t\t\tObject.assign(res[subKey], subObject);\n\t\t\tconst subOriginalValues = styleOriginalValues.get(subObject);\n\t\t\tif (subOriginalValues) {\n\t\t\t\tconst existing = styleOriginalValues.get(res[subKey]);\n\t\t\t\tif (existing) Object.assign(existing, subOriginalValues);\n\t\t\t\telse styleOriginalValues.set(res[subKey], { ...subOriginalValues });\n\t\t\t}\n\t\t} else res[subKey] = val;\n\t}\n\tif (originalValues) styleOriginalValues.set(res, originalValues);\n\treturn res;\n};\nfunction getVariantDefinition(variant, value, conf, { theme }) {\n\tif (!variant) return;\n\tif (value === void 0) return;\n\tif (typeof variant === \"function\") return variant;\n\tif (Object.prototype.hasOwnProperty.call(variant, value)) return variant[value];\n\tfor (const { key, parts } of getCompiledVariantResolvers(variant)) for (const part of parts) if (matchesVariantResolver(part, value, conf, theme)) return variant[key];\n}\nconst variantResolverNameSet = new Set(variantResolverNames);\nconst variantResolverCache = /* @__PURE__ */ new WeakMap();\nfunction getCompiledVariantResolvers(variant) {\n\tlet cached = variantResolverCache.get(variant);\n\tif (cached) return cached;\n\tconst compiled = [];\n\tfor (const key of Object.keys(variant)) {\n\t\tconst parts = parseVariantResolverKey(key);\n\t\tif (parts) compiled.push({\n\t\t\tkey,\n\t\t\tparts\n\t\t});\n\t}\n\tvariantResolverCache.set(variant, compiled);\n\treturn compiled;\n}\nfunction parseVariantResolverKey(key) {\n\tif (!key) return null;\n\tconst parts = key.split(\"|\").map((part) => part.trim());\n\tif (!parts.length) return null;\n\tfor (const part of parts) if (!variantResolverNameSet.has(part)) return null;\n\treturn parts;\n}\nconst numberStringPattern = /[+-]?(?:(?:\\d+\\.?\\d*)|(?:\\.\\d+))(?:[eE][+-]?\\d+)?|[+-]?0[xX][\\da-fA-F]+|[+-]?0[bB][01]+|[+-]?0[oO][0-7]+/;\nconst remStringPattern = new RegExp(`^(?:${numberStringPattern.source})rem$`);\nconst viewportValuePattern = new RegExp(`^(?:${numberStringPattern.source})(vw|dvw|lvw|svw|vh|dvh|lvh|svh)$`);\nfunction isAllowedStyleValue(category, value, conf, string, number, rem) {\n\tconst hasSetting = Object.prototype.hasOwnProperty.call(conf.settings, \"allowedStyleValues\");\n\tconst configured = conf.settings.allowedStyleValues;\n\tconst setting = configured && typeof configured === \"object\" ? configured[category] : configured;\n\tconst web = value === \"unset\" || value === \"inherit\" || string && /^var\\(.*\\)$/.test(value) || (category === \"size\" || category === \"space\") && (value === \"max-content\" || value === \"min-content\" || string && (viewportValuePattern.test(value) || /^(calc|min|max)\\(.*\\)$/.test(value)));\n\tconst somewhat = category === \"size\" || category === \"space\" ? value === \"auto\" || number || rem || string && value.endsWith(\"%\") : number;\n\tif (setting === \"strict\") return false;\n\tif (setting === \"strict-web\") return web;\n\tif (setting === \"somewhat-strict\") return somewhat;\n\tif (setting === \"somewhat-strict-web\") return somewhat || web;\n\treturn number || string && (category === \"size\" || category === \"space\" || !hasSetting);\n}\nfunction matchesVariantResolver(resolverName, value, conf, theme) {\n\tconst string = typeof value === \"string\";\n\tconst number = typeof value === \"number\";\n\tconst rem = string && remStringPattern.test(value);\n\tswitch (resolverName) {\n\t\tcase \"Size\":\n\t\tcase \"Space\":\n\t\tcase \"Radius\":\n\t\tcase \"ZIndex\": {\n\t\t\tconst category = resolverName === \"ZIndex\" ? \"zIndex\" : resolverName.toLowerCase();\n\t\t\treturn value === true || value != null && value in conf.tokensParsed[category] || (resolverName === \"Space\" || resolverName === \"Radius\" || resolverName === \"ZIndex\") && isVariable(value) || (resolverName === \"Radius\" || resolverName === \"ZIndex\") && (number || rem) || isAllowedStyleValue(category, value, conf, string, number, rem);\n\t\t}\n\t\tcase \"Color\": return value != null && value in conf.tokensParsed.color || string;\n\t\tcase \"Theme\": return string && !!theme && value in theme;\n\t\tcase \"FontSize\": return value === true || !!conf.fontsParsed.body?.size?.[value] || number || rem;\n\t\tcase \"FontStyle\": return !!conf.fontsParsed.body?.style?.[value] || value === \"normal\" || value === \"italic\";\n\t\tcase \"FontTransform\": return !!conf.fontsParsed.body?.transform?.[value] || value === \"none\" || value === \"capitalize\" || value === \"uppercase\" || value === \"lowercase\";\n\t\tcase \"FontLineHeight\": return !!conf.fontsParsed.body?.lineHeight?.[value] || number || rem;\n\t\tcase \"FontLetterSpacing\": return !!conf.fontsParsed.body?.letterSpacing?.[value] || number || rem;\n\t\tcase \"number\":\n\t\tcase \"string\":\n\t\tcase \"boolean\": return typeof value === resolverName;\n\t\tcase \"any\": return true;\n\t}\n}\n\nexport { appendFlatClause, getFontFamilyFromNameOrVariable, propMapper };"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,SAAS,iBAAiB,MAAM,iBAAiB,OAAO;CACvD,IAAI,QAAQ,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;CAC1E,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;CAC5D,OAAO,QAAQ,OAAO,GAAG,gBAAgB,GAAG,UAAU,GAAG,KAAK,GAAG,gBAAgB,GAAG;AACrF;AACA,MAAM,oBAAoB;CACzB,QAAQ,KAAK,OAAO,KAAK,QAAQ,OAAO,QAAQ,YAAY,UAAU,YAAY;EACjF,IAAI,QAAQ;GACX,IAAI,SAAS,QAAQ,KAAK,IAAI,KAAK,OAAO,KAAK,CAAC,GA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\";\nimport { isVariable } from \"../createVariable\";\nimport { variantResolverNames } from \"../types\";\nimport { isConditionalStyleObject, resolveClauseChain } from \"./directStyle\";\nimport { expandStyle } from \"./expandStyle\";\nimport { resolveVariableValue } from \"./resolveVariableValue\";\nimport { getVariantExtras } from \"./getVariantExtras\";\nimport { isObj } from \"./isObj\";\nimport { normalizeStyle } from \"./normalizeStyle\";\nimport { isRemValue, resolveRem } from \"./resolveRem\";\nimport { expandSafeAreaValue, isSafeAreaKey } from \"./resolveSafeArea\";\nimport { skipProps } from \"./skipProps\";\nimport { styleOriginalValues } from \"./styleOriginalValues\";\n\nexport * from \"./tokenCategories\"\n\nfunction appendFlatClause(prev, conditionSource, value) {\n\tif (prev != null && typeof prev !== \"string\" && typeof prev !== \"number\") return;\n\tif (typeof value !== \"string\" && typeof value !== \"number\") return;\n\treturn prev == null ? `${conditionSource}:${value}` : `${prev} ${conditionSource}:${value}`;\n}\nconst propMapperHandler = {\n\tsegment(ctx, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {\n\t\tif (isBase) {\n\t\t\tif (valid && start < end) ctx.push(start, end, -1, -1);\n\t\t\treturn;\n\t\t}\n\t\tif (!chainValid) return;\n\t\tif (resolveClauseChain(ctx[0], source, chainStart, chainEnd) && valid && start < end) ctx.push(start, end, chainStart, chainEnd);\n\t},\n\tchain(ctx) {\n\t\tctx[2] = true;\n\t\treturn true;\n\t},\n\terror(ctx) {\n\t\tctx[2] = true;\n\t}\n};\nconst propMapper = (key, value, styleState, disabled, map) => {\n\tif (disabled) return map(key, value);\n\tif (key === \"elevationAndroid\") return;\n\tconst { conf, styleProps, staticConfig } = styleState;\n\tconst { variants } = staticConfig;\n\tif (!styleProps.noExpand) {\n\t\tif (variants && key in variants) {\n\t\t\tconst variantValue = resolveVariants(key, value, styleProps, styleState, \"\");\n\t\t\tif (variantValue) {\n\t\t\t\tfor (const entry of variantValue) map(entry[0], entry[1], entry[2], entry[3]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\tif (!styleProps.disableExpandShorthands) {\n\t\tif (key in conf.shorthands) key = conf.shorthands[key];\n\t}\n\tconst originalValue = value;\n\tif (value === \"safe\" && isSafeAreaKey(key)) {\n\t\tconst expanded = expandSafeAreaValue(key);\n\t\tif (expanded) {\n\t\t\tfor (let i = 0; i < expanded.length; i++) {\n\t\t\t\tconst [nkey, nvalue] = expanded[i];\n\t\t\t\tmap(nkey, nvalue, originalValue);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}\n\tif (value != null) {\n\t\tif (typeof value === \"string\") value = isRemValue(value) ? resolveRem(value) : value;\n\t\telse if (isVariable(value)) value = resolveVariableValue(key, value, styleProps.resolveValues);\n\t\telse if (isRemValue(value)) value = resolveRem(value);\n\t}\n\tif (value != null) {\n\t\tif (key === \"fontFamily\" && typeof originalValue === \"string\") {\n\t\t\tif (originalValue in conf.fontsParsed) styleState.fontFamily = originalValue;\n\t\t}\n\t\tconst expanded = styleProps.noExpand || typeof value === \"string\" ? null : expandStyle(key, value, conf.settings.styleCompat || \"web\");\n\t\tif (expanded) {\n\t\t\tconst max = expanded.length;\n\t\t\tfor (let i = 0; i < max; i++) {\n\t\t\t\tconst [nkey, nvalue, noriginalValue] = expanded[i];\n\t\t\t\tmap(nkey, nvalue, noriginalValue ?? originalValue);\n\t\t\t}\n\t\t} else map(key, value, originalValue);\n\t}\n};\nconst resolveVariants = (key, value, styleProps, styleState, parentVariantKey) => {\n\tconst variantDefinition = styleState.staticConfig.variants?.[key];\n\tif (typeof value === \"string\" && value.indexOf(\":\") !== -1 && !(variantDefinition && typeof variantDefinition === \"object\" && value in variantDefinition)) {\n\t\tconst scan = [\n\t\t\tstyleState,\n\t\t\tvalue,\n\t\t\tfalse\n\t\t];\n\t\tscanFlatValue(value, propMapperHandler, scan);\n\t\tif (scan[2]) {\n\t\t\tlet entries;\n\t\t\tfor (let index = 3; index < scan.length; index += 4) {\n\t\t\t\tconst resolved = resolveVariantValue(key, value.slice(scan[index], scan[index + 1]), styleProps, styleState, parentVariantKey);\n\t\t\t\tif (!resolved) continue;\n\t\t\t\tentries ||= [];\n\t\t\t\tconst chainStart = scan[index + 2];\n\t\t\t\tconst modifier = chainStart === -1 ? void 0 : value.slice(chainStart, scan[index + 3]);\n\t\t\t\tfor (const entry of resolved) {\n\t\t\t\t\tif (modifier !== void 0) entry[3] = modifier;\n\t\t\t\t\tentries.push(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn entries || [];\n\t\t}\n\t}\n\tif (value && typeof value === \"object\" && !Array.isArray(value) && !isVariable(value) && isConditionalStyleObject(styleState, value)) {\n\t\tlet entries;\n\t\tfor (const objKey in value) {\n\t\t\tconst payload = value[objKey];\n\t\t\tif (payload == null) continue;\n\t\t\tconst resolved = resolveVariantValue(key, payload, styleProps, styleState, parentVariantKey);\n\t\t\tif (!resolved) continue;\n\t\t\tentries ||= [];\n\t\t\tfor (const entry of resolved) {\n\t\t\t\tif (objKey !== \"default\") entry[3] = objKey;\n\t\t\t\tentries.push(entry);\n\t\t\t}\n\t\t}\n\t\treturn entries || [];\n\t}\n\treturn resolveVariantValue(key, value, styleProps, styleState, parentVariantKey);\n};\nconst resolveVariantValue = (key, value, styleProps, styleState, parentVariantKey) => {\n\tconst { staticConfig, conf, debug } = styleState;\n\tconst { variants } = staticConfig;\n\tif (!variants) return;\n\tconst variant = variants[key];\n\tlet variantValue = getVariantDefinition(variant, value, conf, styleState);\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") {\n\t\tconsole.groupCollapsed(`\\u2666\\uFE0F\\u2666\\uFE0F\\u2666\\uFE0F resolve variant ${key}`);\n\t\tconsole.info({\n\t\t\tkey,\n\t\t\tvalue,\n\t\t\tvariantValue,\n\t\t\tvariants\n\t\t});\n\t\tconsole.groupEnd();\n\t}\n\tif (!variantValue) {\n\t\tif (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === \"1\") {\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tconst name = styleState.styleProps.displayName || \"[UnnamedComponent]\";\n\t\t\t\tconsole.warn(`No variant found: ${name} has variant \"${key}\", but no matching value \"${value}\"`);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tif (typeof variantValue === \"function\") {\n\t\tconst fn = variantValue;\n\t\tconst extras = getVariantExtras(styleState);\n\t\tvariantValue = fn(value, extras);\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\" && true) {\n\t\t\tconsole.groupCollapsed(\" expanded functional variant\", key);\n\t\t\tconsole.info({\n\t\t\t\tfn,\n\t\t\t\tvariantValue,\n\t\t\t\textras\n\t\t\t});\n\t\t\tconsole.groupEnd();\n\t\t}\n\t}\n\tlet fontFamilyResult;\n\tif (isObj(variantValue)) {\n\t\tconst fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];\n\t\tif (fontFamilyUpdate) {\n\t\t\tfontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf);\n\t\t\tstyleState.fontFamily = fontFamilyResult;\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` updating font family`, fontFamilyResult);\n\t\t}\n\t\tvariantValue = resolveTokensAndVariants(key, variantValue, styleProps, styleState, parentVariantKey);\n\t}\n\tif (variantValue) {\n\t\tconst expanded = normalizeStyle(variantValue, !!styleProps.noNormalize);\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` expanding styles from `, variantValue, `to`, expanded);\n\t\tconst originalValues = styleOriginalValues.get(expanded);\n\t\tconst next = [];\n\t\tfor (const key2 in expanded) next.push([\n\t\t\tkey2,\n\t\t\texpanded[key2],\n\t\t\toriginalValues?.[key2]\n\t\t]);\n\t\treturn next;\n\t}\n};\nfunction getFontFamilyFromNameOrVariable(input, conf) {\n\tif (isVariable(input)) {\n\t\tconst val = variableToFontNameCache.get(input);\n\t\tif (val) return val;\n\t\tfor (const key in conf.fontsParsed) {\n\t\t\tconst familyVariable = conf.fontsParsed[key].family;\n\t\t\tif (isVariable(familyVariable)) {\n\t\t\t\tvariableToFontNameCache.set(familyVariable, key);\n\t\t\t\tif (familyVariable === input) return key;\n\t\t\t}\n\t\t}\n\t} else if (typeof input === \"string\" && input in conf.fontsParsed) return input;\n}\nconst variableToFontNameCache = /* @__PURE__ */ new WeakMap();\nconst resolveTokensAndVariants = (key, value, styleProps, styleState, parentVariantKey) => {\n\tconst { conf, staticConfig, debug } = styleState;\n\tconst { variants } = staticConfig;\n\tconst res = {};\n\tlet originalValues;\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` - resolveTokensAndVariants`, key, value);\n\tfor (const _key in value) {\n\t\tconst subKey = conf.shorthands[_key] || _key;\n\t\tconst val = value[_key];\n\t\tif (!styleProps.noSkip && subKey in skipProps) continue;\n\t\toriginalValues ||= {};\n\t\toriginalValues[subKey] = val;\n\t\tif (staticConfig) {\n\t\t\tconst contextProps = staticConfig.context?.props || staticConfig.parentStaticConfig?.context?.props;\n\t\t\tconst inheritedContextPropKeys = !staticConfig.context || staticConfig.context === staticConfig.parentStaticConfig?.context ? staticConfig.parentStaticConfig?.contextProps : void 0;\n\t\t\tconst contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;\n\t\t\tif (contextProps && subKey in contextProps || contextPropKeys?.includes(subKey) || staticConfig.context?.propKeys?.includes(subKey) || staticConfig.parentStaticConfig?.context?.propKeys?.includes(subKey)) {\n\t\t\t\tstyleState.overriddenContextProps ||= {};\n\t\t\t\tstyleState.overriddenContextProps[subKey] = val;\n\t\t\t\tstyleState.originalContextPropValues ||= {};\n\t\t\t\tstyleState.originalContextPropValues[subKey] = val;\n\t\t\t}\n\t\t}\n\t\tif (styleProps.noExpand) res[subKey] = val;\n\t\telse if (variants && subKey in variants) {\n\t\t\tif (parentVariantKey && parentVariantKey === key) res[subKey] = val;\n\t\t\telse {\n\t\t\t\tconst variantOut = resolveVariants(subKey, val, styleProps, styleState, key);\n\t\t\t\tif (variantOut) for (const [key2, val2, originalVal, conditionSource] of variantOut) {\n\t\t\t\t\tif (val2 == null) continue;\n\t\t\t\t\tif (conditionSource !== void 0) {\n\t\t\t\t\t\tconst appended = appendFlatClause(res[key2], conditionSource, val2);\n\t\t\t\t\t\tif (appended === void 0) {\n\t\t\t\t\t\t\tif (process.env.NODE_ENV === \"development\") console.warn(`[tamagui] conditional variant value for \"${key2}\" is not string-representable; dropping the clause`);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tres[key2] = appended;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tres[key2] = val2;\n\t\t\t\t\tif (originalVal !== void 0) {\n\t\t\t\t\t\toriginalValues ||= {};\n\t\t\t\t\t\toriginalValues[key2] = originalVal;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (isVariable(val)) {\n\t\t\tres[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`variable`, subKey, res[subKey]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof val === \"string\") {\n\t\t\tres[subKey] = isRemValue(val) ? resolveRem(val) : val;\n\t\t\tcontinue;\n\t\t}\n\t\tif (isObj(val)) {\n\t\t\tconst subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`object`, subKey, subObject);\n\t\t\tres[subKey] ??= {};\n\t\t\tObject.assign(res[subKey], subObject);\n\t\t\tconst subOriginalValues = styleOriginalValues.get(subObject);\n\t\t\tif (subOriginalValues) {\n\t\t\t\tconst existing = styleOriginalValues.get(res[subKey]);\n\t\t\t\tif (existing) Object.assign(existing, subOriginalValues);\n\t\t\t\telse styleOriginalValues.set(res[subKey], { ...subOriginalValues });\n\t\t\t}\n\t\t} else res[subKey] = val;\n\t}\n\tif (originalValues) styleOriginalValues.set(res, originalValues);\n\treturn res;\n};\nfunction getVariantDefinition(variant, value, conf, { theme }) {\n\tif (!variant) return;\n\tif (value === void 0) return;\n\tif (typeof variant === \"function\") return variant;\n\tif (Object.prototype.hasOwnProperty.call(variant, value)) return variant[value];\n\tfor (const { key, parts } of getCompiledVariantResolvers(variant)) for (const part of parts) if (matchesVariantResolver(part, value, conf, theme)) return variant[key];\n}\nconst variantResolverNameSet = new Set(variantResolverNames);\nconst variantResolverCache = /* @__PURE__ */ new WeakMap();\nfunction getCompiledVariantResolvers(variant) {\n\tlet cached = variantResolverCache.get(variant);\n\tif (cached) return cached;\n\tconst compiled = [];\n\tfor (const key of Object.keys(variant)) {\n\t\tconst parts = parseVariantResolverKey(key);\n\t\tif (parts) compiled.push({\n\t\t\tkey,\n\t\t\tparts\n\t\t});\n\t}\n\tvariantResolverCache.set(variant, compiled);\n\treturn compiled;\n}\nfunction parseVariantResolverKey(key) {\n\tif (!key) return null;\n\tconst parts = key.split(\"|\").map((part) => part.trim());\n\tif (!parts.length) return null;\n\tfor (const part of parts) if (!variantResolverNameSet.has(part)) return null;\n\treturn parts;\n}\nconst numberStringPattern = /[+-]?(?:(?:\\d+\\.?\\d*)|(?:\\.\\d+))(?:[eE][+-]?\\d+)?|[+-]?0[xX][\\da-fA-F]+|[+-]?0[bB][01]+|[+-]?0[oO][0-7]+/;\nconst remStringPattern = new RegExp(`^(?:${numberStringPattern.source})rem$`);\nconst viewportValuePattern = new RegExp(`^(?:${numberStringPattern.source})(vw|dvw|lvw|svw|vh|dvh|lvh|svh)$`);\nfunction isAllowedStyleValue(category, value, conf, string, number, rem) {\n\tconst hasSetting = Object.prototype.hasOwnProperty.call(conf.settings, \"allowedStyleValues\");\n\tconst configured = conf.settings.allowedStyleValues;\n\tconst setting = configured && typeof configured === \"object\" ? configured[category] : configured;\n\tconst web = value === \"unset\" || value === \"inherit\" || string && /^var\\(.*\\)$/.test(value) || (category === \"size\" || category === \"space\") && (value === \"max-content\" || value === \"min-content\" || string && (viewportValuePattern.test(value) || /^(calc|min|max)\\(.*\\)$/.test(value)));\n\tconst somewhat = category === \"size\" || category === \"space\" ? value === \"auto\" || number || rem || string && value.endsWith(\"%\") : number;\n\tif (setting === \"strict\") return false;\n\tif (setting === \"strict-web\") return web;\n\tif (setting === \"somewhat-strict\") return somewhat;\n\tif (setting === \"somewhat-strict-web\") return somewhat || web;\n\treturn number || string && (category === \"size\" || category === \"space\" || !hasSetting);\n}\nfunction matchesVariantResolver(resolverName, value, conf, theme) {\n\tconst string = typeof value === \"string\";\n\tconst number = typeof value === \"number\";\n\tconst rem = string && remStringPattern.test(value);\n\tswitch (resolverName) {\n\t\tcase \"Size\":\n\t\tcase \"Space\":\n\t\tcase \"Radius\":\n\t\tcase \"ZIndex\": {\n\t\t\tconst category = resolverName === \"ZIndex\" ? \"zIndex\" : resolverName.toLowerCase();\n\t\t\treturn value === true || value != null && value in conf.tokensParsed[category] || (resolverName === \"Space\" || resolverName === \"Radius\" || resolverName === \"ZIndex\") && isVariable(value) || (resolverName === \"Radius\" || resolverName === \"ZIndex\") && (number || rem) || isAllowedStyleValue(category, value, conf, string, number, rem);\n\t\t}\n\t\tcase \"Color\": return value != null && value in conf.tokensParsed.color || string;\n\t\tcase \"Theme\": return string && !!theme && value in theme;\n\t\tcase \"FontSize\": return value === true || !!conf.fontsParsed.body?.size?.[value] || number || rem;\n\t\tcase \"FontStyle\": return !!conf.fontsParsed.body?.style?.[value] || value === \"normal\" || value === \"italic\";\n\t\tcase \"FontTransform\": return !!conf.fontsParsed.body?.transform?.[value] || value === \"none\" || value === \"capitalize\" || value === \"uppercase\" || value === \"lowercase\";\n\t\tcase \"FontLineHeight\": return !!conf.fontsParsed.body?.lineHeight?.[value] || number || rem;\n\t\tcase \"FontLetterSpacing\": return !!conf.fontsParsed.body?.letterSpacing?.[value] || number || rem;\n\t\tcase \"number\":\n\t\tcase \"string\":\n\t\tcase \"boolean\": return typeof value === resolverName;\n\t\tcase \"any\": return true;\n\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AAS,KAAK,aAAa,cAAc,iBAAiB,WAAW,iBAAiB,YAAY,iBAAiB,aAAa,WAAW,KAAK,MAAM,iBAAiB,YAAY,iBAAiB,cAAc,UAAU,QAAQ,oBAAoB,UAAU,OAAO,MAAM,QAAQ,QAAQ,GAAG;EAC7U;EACA,KAAK,SAAS,OAAO,SAAS,QAAQ,SAAS,KAAK,aAAa,SAAS;EAC1E,KAAK,SAAS,OAAO,UAAU,CAAC,CAAC,SAAS,SAAS;EACnD,KAAK,YAAY,OAAO,UAAU,QAAQ,CAAC,CAAC,KAAK,YAAY,MAAM,OAAO,UAAU,UAAU;EAC9F,KAAK,aAAa,OAAO,CAAC,CAAC,KAAK,YAAY,MAAM,QAAQ,UAAU,UAAU,YAAY,UAAU;EACpG,KAAK,iBAAiB,OAAO,CAAC,CAAC,KAAK,YAAY,MAAM,YAAY,UAAU,UAAU,UAAU,UAAU,gBAAgB,UAAU,eAAe,UAAU;EAC7J,KAAK,kBAAkB,OAAO,CAAC,CAAC,KAAK,YAAY,MAAM,aAAa,UAAU,UAAU;EACxF,KAAK,qBAAqB,OAAO,CAAC,CAAC,KAAK,YAAY,MAAM,gBAAgB,UAAU,UAAU;EAC9F,KAAK;EACL,KAAK;EACL,KAAK,WAAW,OAAO,OAAO,UAAU;EACxC,KAAK,OAAO,OAAO;CACpB;AACD"}
|
|
@@ -2,7 +2,7 @@ import { isAndroid } from "@tamagui/constants";
|
|
|
2
2
|
import { scanFlatValue } from "@tamagui/style-grammar/runtime";
|
|
3
3
|
import { isVariable } from "../createVariable.native.js";
|
|
4
4
|
import { variantResolverNames } from "../types.native.js";
|
|
5
|
-
import { resolveClauseChain } from "./directStyle.native.js";
|
|
5
|
+
import { isConditionalStyleObject, resolveClauseChain } from "./directStyle.native.js";
|
|
6
6
|
import { expandStyle } from "./expandStyle.native.js";
|
|
7
7
|
import { resolveVariableValue } from "./resolveVariableValue.native.js";
|
|
8
8
|
import { getVariantExtras } from "./getVariantExtras.native.js";
|
|
@@ -167,6 +167,34 @@ var resolveVariants = function(key, value, styleProps, styleState, parentVariant
|
|
|
167
167
|
return entries || [];
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
+
if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !isVariable(value) && isConditionalStyleObject(styleState, value)) {
|
|
171
|
+
var entries1;
|
|
172
|
+
for (var objKey in value) {
|
|
173
|
+
var payload = value[objKey];
|
|
174
|
+
if (payload == null) continue;
|
|
175
|
+
var resolved1 = resolveVariantValue(key, payload, styleProps, styleState, parentVariantKey);
|
|
176
|
+
if (!resolved1) continue;
|
|
177
|
+
entries1 || (entries1 = []);
|
|
178
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
179
|
+
try {
|
|
180
|
+
for (var _iterator1 = resolved1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
181
|
+
var entry1 = _step1.value;
|
|
182
|
+
if (objKey !== "default") entry1[3] = objKey;
|
|
183
|
+
entries1.push(entry1);
|
|
184
|
+
}
|
|
185
|
+
} catch (err) {
|
|
186
|
+
_didIteratorError1 = true;
|
|
187
|
+
_iteratorError1 = err;
|
|
188
|
+
} finally {
|
|
189
|
+
try {
|
|
190
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
|
|
191
|
+
} finally {
|
|
192
|
+
if (_didIteratorError1) throw _iteratorError1;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return entries1 || [];
|
|
197
|
+
}
|
|
170
198
|
return resolveVariantValue(key, value, styleProps, styleState, parentVariantKey);
|
|
171
199
|
};
|
|
172
200
|
var resolveVariantValue = function(key, value, styleProps, styleState, parentVariantKey) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propMapper.native.js","names":[],"sources":["esm/helpers/propMapper.native.js"],"sourcesContent":["import { isAndroid } from \"@tamagui/constants\";\nimport { scanFlatValue } from \"@tamagui/style-grammar/runtime\";\nimport { isVariable } from \"../createVariable\";\nimport { variantResolverNames } from \"../types\";\nimport { resolveClauseChain } from \"./directStyle\";\nimport { expandStyle } from \"./expandStyle\";\nimport { resolveVariableValue } from \"./resolveVariableValue\";\nimport { getVariantExtras } from \"./getVariantExtras\";\nimport { isObj } from \"./isObj\";\nimport { normalizeStyle } from \"./normalizeStyle\";\nimport { isRemValue, resolveRem } from \"./resolveRem\";\nimport { expandSafeAreaValue, isSafeAreaKey } from \"./resolveSafeArea\";\nimport { skipProps } from \"./skipProps\";\nimport { styleOriginalValues } from \"./styleOriginalValues\";\n\nexport * from \"./tokenCategories\"\n\nfunction _type_of(obj) {\n\t\"@swc/helpers - typeof\";\n\treturn obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction appendFlatClause(prev, conditionSource, value) {\n\tif (prev != null && typeof prev !== \"string\" && typeof prev !== \"number\") return;\n\tif (typeof value !== \"string\" && typeof value !== \"number\") return;\n\treturn prev == null ? `${conditionSource}:${value}` : `${prev} ${conditionSource}:${value}`;\n}\nvar propMapperHandler = {\n\tsegment(ctx, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {\n\t\tif (isBase) {\n\t\t\tif (valid && start < end) ctx.push(start, end, -1, -1);\n\t\t\treturn;\n\t\t}\n\t\tif (!chainValid) return;\n\t\tif (resolveClauseChain(ctx[0], source, chainStart, chainEnd) && valid && start < end) ctx.push(start, end, chainStart, chainEnd);\n\t},\n\tchain(ctx) {\n\t\tctx[2] = true;\n\t\treturn true;\n\t},\n\terror(ctx) {\n\t\tctx[2] = true;\n\t}\n};\nvar propMapper = function(key, value, styleState, disabled, map) {\n\tif (disabled) return map(key, value);\n\tif (!isAndroid) {\n\t\tif (key === \"elevationAndroid\") return;\n\t}\n\tvar { conf, styleProps, staticConfig } = styleState;\n\tvar { variants } = staticConfig;\n\tif (value === \"unset\") {\n\t\tvar expandedKey = !styleProps.disableExpandShorthands && conf.shorthands[key] || key;\n\t\tvar expanded = styleProps.noExpand ? null : expandStyle(expandedKey, value, conf.settings.styleCompat || \"web\");\n\t\tif (styleState.style) if (expanded) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar [nkey] = _step.value;\n\t\t\t\t\tdelete styleState.style[nkey];\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} else delete styleState.style[expandedKey];\n\t\treturn;\n\t}\n\tif (!styleProps.noExpand) {\n\t\tif (variants && key in variants) {\n\t\t\tvar variantValue = resolveVariants(key, value, styleProps, styleState, \"\");\n\t\t\tif (variantValue) {\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 = variantValue[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\t\tvar entry = _step1.value;\n\t\t\t\t\t\tmap(entry[0], entry[1], entry[2], entry[3]);\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\treturn;\n\t\t\t}\n\t\t}\n\t}\n\tif (!styleProps.disableExpandShorthands) {\n\t\tif (key in conf.shorthands) key = conf.shorthands[key];\n\t}\n\tvar originalValue = value;\n\tif (value === \"safe\" && isSafeAreaKey(key)) {\n\t\tvar expanded1 = expandSafeAreaValue(key);\n\t\tif (expanded1) {\n\t\t\tfor (var i = 0; i < expanded1.length; i++) {\n\t\t\t\tvar [nkey1, nvalue] = expanded1[i];\n\t\t\t\tmap(nkey1, nvalue, originalValue);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}\n\tif (value != null) {\n\t\tif (typeof value === \"string\") value = isRemValue(value) ? resolveRem(value) : value;\n\t\telse if (isVariable(value)) value = resolveVariableValue(key, value, styleProps.resolveValues);\n\t\telse if (isRemValue(value)) value = resolveRem(value);\n\t}\n\tif (value != null) {\n\t\tif (key === \"fontFamily\" && typeof originalValue === \"string\") {\n\t\t\tif (originalValue in conf.fontsParsed) styleState.fontFamily = originalValue;\n\t\t}\n\t\tvar expanded2 = styleProps.noExpand || typeof value === \"string\" ? null : expandStyle(key, value, conf.settings.styleCompat || \"web\");\n\t\tif (expanded2) {\n\t\t\tvar max = expanded2.length;\n\t\t\tfor (var i1 = 0; i1 < max; i1++) {\n\t\t\t\tvar [nkey2, nvalue1, noriginalValue] = expanded2[i1];\n\t\t\t\tmap(nkey2, nvalue1, noriginalValue !== null && noriginalValue !== void 0 ? noriginalValue : originalValue);\n\t\t\t}\n\t\t} else map(key, value, originalValue);\n\t}\n};\nvar resolveVariants = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar _styleState_staticConfig_variants;\n\tvar variantDefinition = (_styleState_staticConfig_variants = styleState.staticConfig.variants) === null || _styleState_staticConfig_variants === void 0 ? void 0 : _styleState_staticConfig_variants[key];\n\tif (typeof value === \"string\" && value.indexOf(\":\") !== -1 && !(variantDefinition && (typeof variantDefinition === \"undefined\" ? \"undefined\" : _type_of(variantDefinition)) === \"object\" && value in variantDefinition)) {\n\t\tvar scan = [\n\t\t\tstyleState,\n\t\t\tvalue,\n\t\t\tfalse\n\t\t];\n\t\tscanFlatValue(value, propMapperHandler, scan);\n\t\tif (scan[2]) {\n\t\t\tvar entries;\n\t\t\tfor (var index = 3; index < scan.length; index += 4) {\n\t\t\t\tvar resolved = resolveVariantValue(key, value.slice(scan[index], scan[index + 1]), styleProps, styleState, parentVariantKey);\n\t\t\t\tif (!resolved) continue;\n\t\t\t\tentries || (entries = []);\n\t\t\t\tvar chainStart = scan[index + 2];\n\t\t\t\tvar modifier = chainStart === -1 ? void 0 : value.slice(chainStart, scan[index + 3]);\n\t\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator = resolved[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar entry = _step.value;\n\t\t\t\t\t\tif (modifier !== void 0) entry[3] = modifier;\n\t\t\t\t\t\tentries.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t_iteratorError = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn entries || [];\n\t\t}\n\t}\n\treturn resolveVariantValue(key, value, styleProps, styleState, parentVariantKey);\n};\nvar resolveVariantValue = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar { staticConfig, conf, debug } = styleState;\n\tvar { variants } = staticConfig;\n\tif (!variants) return;\n\tvar variant = variants[key];\n\tvar variantValue = getVariantDefinition(variant, value, conf, styleState);\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") {\n\t\tconsole.groupCollapsed(`\\u2666\\uFE0F\\u2666\\uFE0F\\u2666\\uFE0F resolve variant ${key}`);\n\t\tconsole.info({\n\t\t\tkey,\n\t\t\tvalue,\n\t\t\tvariantValue,\n\t\t\tvariants\n\t\t});\n\t\tconsole.groupEnd();\n\t}\n\tif (!variantValue) {\n\t\tif (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === \"1\") {\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tvar name = styleState.styleProps.displayName || \"[UnnamedComponent]\";\n\t\t\t\tconsole.warn(`No variant found: ${name} has variant \"${key}\", but no matching value \"${value}\"`);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tif (typeof variantValue === \"function\") {\n\t\tvariantValue = variantValue(value, getVariantExtras(styleState));\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\" && false);\n\t}\n\tvar fontFamilyResult;\n\tif (isObj(variantValue)) {\n\t\tvar fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];\n\t\tif (fontFamilyUpdate) {\n\t\t\tfontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf);\n\t\t\tstyleState.fontFamily = fontFamilyResult;\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` updating font family`, fontFamilyResult);\n\t\t}\n\t\tvariantValue = resolveTokensAndVariants(key, variantValue, styleProps, styleState, parentVariantKey);\n\t}\n\tif (variantValue) {\n\t\tvar expanded = normalizeStyle(variantValue, !!styleProps.noNormalize);\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` expanding styles from `, variantValue, `to`, expanded);\n\t\tvar originalValues = styleOriginalValues.get(expanded);\n\t\tvar next = [];\n\t\tfor (var _$key in expanded) next.push([\n\t\t\t_$key,\n\t\t\texpanded[_$key],\n\t\t\toriginalValues === null || originalValues === void 0 ? void 0 : originalValues[_$key]\n\t\t]);\n\t\treturn next;\n\t}\n};\nfunction getFontFamilyFromNameOrVariable(input, conf) {\n\tif (isVariable(input)) {\n\t\tvar val = variableToFontNameCache.get(input);\n\t\tif (val) return val;\n\t\tfor (var key in conf.fontsParsed) {\n\t\t\tvar familyVariable = conf.fontsParsed[key].family;\n\t\t\tif (isVariable(familyVariable)) {\n\t\t\t\tvariableToFontNameCache.set(familyVariable, key);\n\t\t\t\tif (familyVariable === input) return key;\n\t\t\t}\n\t\t}\n\t} else if (typeof input === \"string\" && input in conf.fontsParsed) return input;\n}\nvar variableToFontNameCache = /* @__PURE__ */ new WeakMap();\nvar resolveTokensAndVariants = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar { conf, staticConfig, debug } = styleState;\n\tvar { variants } = staticConfig;\n\tvar res = {};\n\tvar originalValues;\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` - resolveTokensAndVariants`, key, value);\n\tfor (var _key in value) {\n\t\tvar subKey = conf.shorthands[_key] || _key;\n\t\tvar val = value[_key];\n\t\tif (!styleProps.noSkip && subKey in skipProps) continue;\n\t\toriginalValues || (originalValues = {});\n\t\toriginalValues[subKey] = val;\n\t\tif (staticConfig) {\n\t\t\tvar _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, _staticConfig_parentStaticConfig1, _staticConfig_parentStaticConfig2, _staticConfig_context_propKeys, _staticConfig_context1, _staticConfig_parentStaticConfig_context_propKeys, _staticConfig_parentStaticConfig_context1, _staticConfig_parentStaticConfig3;\n\t\t\tvar contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);\n\t\t\tvar inheritedContextPropKeys = !staticConfig.context || staticConfig.context === ((_staticConfig_parentStaticConfig1 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig1 === void 0 ? void 0 : _staticConfig_parentStaticConfig1.context) ? (_staticConfig_parentStaticConfig2 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig2 === void 0 ? void 0 : _staticConfig_parentStaticConfig2.contextProps : void 0;\n\t\t\tvar contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;\n\t\t\tif (contextProps && subKey in contextProps || (contextPropKeys === null || contextPropKeys === void 0 ? void 0 : contextPropKeys.includes(subKey)) || ((_staticConfig_context1 = staticConfig.context) === null || _staticConfig_context1 === void 0 ? void 0 : (_staticConfig_context_propKeys = _staticConfig_context1.propKeys) === null || _staticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_context_propKeys.includes(subKey)) || ((_staticConfig_parentStaticConfig3 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig3 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context1 = _staticConfig_parentStaticConfig3.context) === null || _staticConfig_parentStaticConfig_context1 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context_propKeys = _staticConfig_parentStaticConfig_context1.propKeys) === null || _staticConfig_parentStaticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_parentStaticConfig_context_propKeys.includes(subKey))) {\n\t\t\t\tvar _styleState, _styleState1;\n\t\t\t\t(_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});\n\t\t\t\tstyleState.overriddenContextProps[subKey] = val;\n\t\t\t\t(_styleState1 = styleState).originalContextPropValues || (_styleState1.originalContextPropValues = {});\n\t\t\t\tstyleState.originalContextPropValues[subKey] = val;\n\t\t\t}\n\t\t}\n\t\tif (styleProps.noExpand) res[subKey] = val;\n\t\telse if (variants && subKey in variants) {\n\t\t\tif (parentVariantKey && parentVariantKey === key) res[subKey] = val;\n\t\t\telse {\n\t\t\t\tvar variantOut = resolveVariants(subKey, val, styleProps, styleState, key);\n\t\t\t\tif (variantOut) {\n\t\t\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator = variantOut[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\t\tvar [_$key, val1, originalVal, conditionSource] = _step.value;\n\t\t\t\t\t\t\tif (val1 == null) continue;\n\t\t\t\t\t\t\tif (conditionSource !== void 0) {\n\t\t\t\t\t\t\t\tvar appended = appendFlatClause(res[_$key], conditionSource, val1);\n\t\t\t\t\t\t\t\tif (appended === void 0) {\n\t\t\t\t\t\t\t\t\tif (process.env.NODE_ENV === \"development\") console.warn(`[tamagui] conditional variant value for \"${_$key}\" is not string-representable; dropping the clause`);\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tres[_$key] = appended;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tres[_$key] = val1;\n\t\t\t\t\t\t\tif (originalVal !== void 0) {\n\t\t\t\t\t\t\t\toriginalValues || (originalValues = {});\n\t\t\t\t\t\t\t\toriginalValues[_$key] = originalVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t\t_iteratorError = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (isVariable(val)) {\n\t\t\tres[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`variable`, subKey, res[subKey]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof val === \"string\") {\n\t\t\tres[subKey] = isRemValue(val) ? resolveRem(val) : val;\n\t\t\tcontinue;\n\t\t}\n\t\tif (isObj(val)) {\n\t\t\tvar _res, _subKey;\n\t\t\tvar subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`object`, subKey, subObject);\n\t\t\tvar _;\n\t\t\t(_ = (_res = res)[_subKey = subKey]) !== null && _ !== void 0 || (_res[_subKey] = {});\n\t\t\tObject.assign(res[subKey], subObject);\n\t\t\tvar subOriginalValues = styleOriginalValues.get(subObject);\n\t\t\tif (subOriginalValues) {\n\t\t\t\tvar existing = styleOriginalValues.get(res[subKey]);\n\t\t\t\tif (existing) Object.assign(existing, subOriginalValues);\n\t\t\t\telse styleOriginalValues.set(res[subKey], { ...subOriginalValues });\n\t\t\t}\n\t\t} else res[subKey] = val;\n\t}\n\tif (originalValues) styleOriginalValues.set(res, originalValues);\n\treturn res;\n};\nfunction getVariantDefinition(variant, value, conf, param) {\n\tvar { theme } = param;\n\tif (!variant) return;\n\tif (value === void 0) return;\n\tif (typeof variant === \"function\") return variant;\n\tif (Object.prototype.hasOwnProperty.call(variant, value)) return variant[value];\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = getCompiledVariantResolvers(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar { key, parts } = _step.value;\n\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator1 = parts[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\tvar part = _step1.value;\n\t\t\t\t\tif (matchesVariantResolver(part, value, conf, theme)) return variant[key];\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t_iteratorError1 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n}\nvar variantResolverNameSet = new Set(variantResolverNames);\nvar variantResolverCache = /* @__PURE__ */ new WeakMap();\nfunction getCompiledVariantResolvers(variant) {\n\tvar cached = variantResolverCache.get(variant);\n\tif (cached) return cached;\n\tvar compiled = [];\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = Object.keys(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar key = _step.value;\n\t\t\tvar parts = parseVariantResolverKey(key);\n\t\t\tif (parts) compiled.push({\n\t\t\t\tkey,\n\t\t\t\tparts\n\t\t\t});\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\tvariantResolverCache.set(variant, compiled);\n\treturn compiled;\n}\nfunction parseVariantResolverKey(key) {\n\tif (!key) return null;\n\tvar parts = key.split(\"|\").map(function(part2) {\n\t\treturn part2.trim();\n\t});\n\tif (!parts.length) return null;\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar part = _step.value;\n\t\t\tif (!variantResolverNameSet.has(part)) return null;\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\treturn parts;\n}\nvar numberStringPattern = /[+-]?(?:(?:\\d+\\.?\\d*)|(?:\\.\\d+))(?:[eE][+-]?\\d+)?|[+-]?0[xX][\\da-fA-F]+|[+-]?0[bB][01]+|[+-]?0[oO][0-7]+/;\nvar remStringPattern = new RegExp(`^(?:${numberStringPattern.source})rem$`);\nvar viewportValuePattern = new RegExp(`^(?:${numberStringPattern.source})(vw|dvw|lvw|svw|vh|dvh|lvh|svh)$`);\nfunction isAllowedStyleValue(category, value, conf, string, number, rem) {\n\tvar hasSetting = Object.prototype.hasOwnProperty.call(conf.settings, \"allowedStyleValues\");\n\tvar configured = conf.settings.allowedStyleValues;\n\tvar setting = configured && (typeof configured === \"undefined\" ? \"undefined\" : _type_of(configured)) === \"object\" ? configured[category] : configured;\n\tvar web = value === \"unset\" || value === \"inherit\" || string && /^var\\(.*\\)$/.test(value) || (category === \"size\" || category === \"space\") && (value === \"max-content\" || value === \"min-content\" || string && (viewportValuePattern.test(value) || /^(calc|min|max)\\(.*\\)$/.test(value)));\n\tvar somewhat = category === \"size\" || category === \"space\" ? value === \"auto\" || number || rem || string && value.endsWith(\"%\") : number;\n\tif (setting === \"strict\") return false;\n\tif (setting === \"strict-web\") return web;\n\tif (setting === \"somewhat-strict\") return somewhat;\n\tif (setting === \"somewhat-strict-web\") return somewhat || web;\n\treturn number || string && (category === \"size\" || category === \"space\" || !hasSetting);\n}\nfunction matchesVariantResolver(resolverName, value, conf, theme) {\n\tvar string = typeof value === \"string\";\n\tvar number = typeof value === \"number\";\n\tvar rem = string && remStringPattern.test(value);\n\tswitch (resolverName) {\n\t\tcase \"Size\":\n\t\tcase \"Space\":\n\t\tcase \"Radius\":\n\t\tcase \"ZIndex\":\n\t\t\tvar category = resolverName === \"ZIndex\" ? \"zIndex\" : resolverName.toLowerCase();\n\t\t\treturn value === true || value != null && value in conf.tokensParsed[category] || (resolverName === \"Space\" || resolverName === \"Radius\" || resolverName === \"ZIndex\") && isVariable(value) || (resolverName === \"Radius\" || resolverName === \"ZIndex\") && (number || rem) || isAllowedStyleValue(category, value, conf, string, number, rem);\n\t\tcase \"Color\": return value != null && value in conf.tokensParsed.color || string;\n\t\tcase \"Theme\": return string && !!theme && value in theme;\n\t\tcase \"FontSize\":\n\t\t\tvar _conf_fontsParsed_body_size, _conf_fontsParsed_body;\n\t\t\treturn value === true || !!((_conf_fontsParsed_body = conf.fontsParsed.body) === null || _conf_fontsParsed_body === void 0 ? void 0 : (_conf_fontsParsed_body_size = _conf_fontsParsed_body.size) === null || _conf_fontsParsed_body_size === void 0 ? void 0 : _conf_fontsParsed_body_size[value]) || number || rem;\n\t\tcase \"FontStyle\":\n\t\t\tvar _conf_fontsParsed_body_style, _conf_fontsParsed_body1;\n\t\t\treturn !!((_conf_fontsParsed_body1 = conf.fontsParsed.body) === null || _conf_fontsParsed_body1 === void 0 ? void 0 : (_conf_fontsParsed_body_style = _conf_fontsParsed_body1.style) === null || _conf_fontsParsed_body_style === void 0 ? void 0 : _conf_fontsParsed_body_style[value]) || value === \"normal\" || value === \"italic\";\n\t\tcase \"FontTransform\":\n\t\t\tvar _conf_fontsParsed_body_transform, _conf_fontsParsed_body2;\n\t\t\treturn !!((_conf_fontsParsed_body2 = conf.fontsParsed.body) === null || _conf_fontsParsed_body2 === void 0 ? void 0 : (_conf_fontsParsed_body_transform = _conf_fontsParsed_body2.transform) === null || _conf_fontsParsed_body_transform === void 0 ? void 0 : _conf_fontsParsed_body_transform[value]) || value === \"none\" || value === \"capitalize\" || value === \"uppercase\" || value === \"lowercase\";\n\t\tcase \"FontLineHeight\":\n\t\t\tvar _conf_fontsParsed_body_lineHeight, _conf_fontsParsed_body3;\n\t\t\treturn !!((_conf_fontsParsed_body3 = conf.fontsParsed.body) === null || _conf_fontsParsed_body3 === void 0 ? void 0 : (_conf_fontsParsed_body_lineHeight = _conf_fontsParsed_body3.lineHeight) === null || _conf_fontsParsed_body_lineHeight === void 0 ? void 0 : _conf_fontsParsed_body_lineHeight[value]) || number || rem;\n\t\tcase \"FontLetterSpacing\":\n\t\t\tvar _conf_fontsParsed_body_letterSpacing, _conf_fontsParsed_body4;\n\t\t\treturn !!((_conf_fontsParsed_body4 = conf.fontsParsed.body) === null || _conf_fontsParsed_body4 === void 0 ? void 0 : (_conf_fontsParsed_body_letterSpacing = _conf_fontsParsed_body4.letterSpacing) === null || _conf_fontsParsed_body_letterSpacing === void 0 ? void 0 : _conf_fontsParsed_body_letterSpacing[value]) || number || rem;\n\t\tcase \"number\":\n\t\tcase \"string\":\n\t\tcase \"boolean\": return (typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === resolverName;\n\t\tcase \"any\": return true;\n\t}\n}\n\nexport { appendFlatClause, getFontFamilyFromNameOrVariable, propMapper };"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,SAAS,SAAS,KAAK;CACtB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAC/F;AACA,SAAS,iBAAiB,MAAM,iBAAiB,OAAO;CACvD,IAAI,QAAQ,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;CAC1E,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;CAC5D,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,KAAK,uCAAuC,wBAAwB,mBAAmB,QAAQ,yCAAyC,KAAK,IAAI,KAAK,IAAI,qCAAqC,WAAW,UAAU;EACvU,KAAK;EACL,KAAK;EACL,KAAK,WAAW,QAAQ,OAAO,UAAU,cAAc,cAAc,SAAS,KAAK,OAAO;EAC1F,KAAK,OAAO,OAAO;CACpB;AACD"}
|
|
1
|
+
{"version":3,"file":"propMapper.native.js","names":[],"sources":["esm/helpers/propMapper.native.js"],"sourcesContent":["import { isAndroid } from \"@tamagui/constants\";\nimport { scanFlatValue } from \"@tamagui/style-grammar/runtime\";\nimport { isVariable } from \"../createVariable\";\nimport { variantResolverNames } from \"../types\";\nimport { isConditionalStyleObject, resolveClauseChain } from \"./directStyle\";\nimport { expandStyle } from \"./expandStyle\";\nimport { resolveVariableValue } from \"./resolveVariableValue\";\nimport { getVariantExtras } from \"./getVariantExtras\";\nimport { isObj } from \"./isObj\";\nimport { normalizeStyle } from \"./normalizeStyle\";\nimport { isRemValue, resolveRem } from \"./resolveRem\";\nimport { expandSafeAreaValue, isSafeAreaKey } from \"./resolveSafeArea\";\nimport { skipProps } from \"./skipProps\";\nimport { styleOriginalValues } from \"./styleOriginalValues\";\n\nexport * from \"./tokenCategories\"\n\nfunction _type_of(obj) {\n\t\"@swc/helpers - typeof\";\n\treturn obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction appendFlatClause(prev, conditionSource, value) {\n\tif (prev != null && typeof prev !== \"string\" && typeof prev !== \"number\") return;\n\tif (typeof value !== \"string\" && typeof value !== \"number\") return;\n\treturn prev == null ? `${conditionSource}:${value}` : `${prev} ${conditionSource}:${value}`;\n}\nvar propMapperHandler = {\n\tsegment(ctx, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {\n\t\tif (isBase) {\n\t\t\tif (valid && start < end) ctx.push(start, end, -1, -1);\n\t\t\treturn;\n\t\t}\n\t\tif (!chainValid) return;\n\t\tif (resolveClauseChain(ctx[0], source, chainStart, chainEnd) && valid && start < end) ctx.push(start, end, chainStart, chainEnd);\n\t},\n\tchain(ctx) {\n\t\tctx[2] = true;\n\t\treturn true;\n\t},\n\terror(ctx) {\n\t\tctx[2] = true;\n\t}\n};\nvar propMapper = function(key, value, styleState, disabled, map) {\n\tif (disabled) return map(key, value);\n\tif (!isAndroid) {\n\t\tif (key === \"elevationAndroid\") return;\n\t}\n\tvar { conf, styleProps, staticConfig } = styleState;\n\tvar { variants } = staticConfig;\n\tif (value === \"unset\") {\n\t\tvar expandedKey = !styleProps.disableExpandShorthands && conf.shorthands[key] || key;\n\t\tvar expanded = styleProps.noExpand ? null : expandStyle(expandedKey, value, conf.settings.styleCompat || \"web\");\n\t\tif (styleState.style) if (expanded) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar [nkey] = _step.value;\n\t\t\t\t\tdelete styleState.style[nkey];\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} else delete styleState.style[expandedKey];\n\t\treturn;\n\t}\n\tif (!styleProps.noExpand) {\n\t\tif (variants && key in variants) {\n\t\t\tvar variantValue = resolveVariants(key, value, styleProps, styleState, \"\");\n\t\t\tif (variantValue) {\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 = variantValue[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\t\tvar entry = _step1.value;\n\t\t\t\t\t\tmap(entry[0], entry[1], entry[2], entry[3]);\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\treturn;\n\t\t\t}\n\t\t}\n\t}\n\tif (!styleProps.disableExpandShorthands) {\n\t\tif (key in conf.shorthands) key = conf.shorthands[key];\n\t}\n\tvar originalValue = value;\n\tif (value === \"safe\" && isSafeAreaKey(key)) {\n\t\tvar expanded1 = expandSafeAreaValue(key);\n\t\tif (expanded1) {\n\t\t\tfor (var i = 0; i < expanded1.length; i++) {\n\t\t\t\tvar [nkey1, nvalue] = expanded1[i];\n\t\t\t\tmap(nkey1, nvalue, originalValue);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}\n\tif (value != null) {\n\t\tif (typeof value === \"string\") value = isRemValue(value) ? resolveRem(value) : value;\n\t\telse if (isVariable(value)) value = resolveVariableValue(key, value, styleProps.resolveValues);\n\t\telse if (isRemValue(value)) value = resolveRem(value);\n\t}\n\tif (value != null) {\n\t\tif (key === \"fontFamily\" && typeof originalValue === \"string\") {\n\t\t\tif (originalValue in conf.fontsParsed) styleState.fontFamily = originalValue;\n\t\t}\n\t\tvar expanded2 = styleProps.noExpand || typeof value === \"string\" ? null : expandStyle(key, value, conf.settings.styleCompat || \"web\");\n\t\tif (expanded2) {\n\t\t\tvar max = expanded2.length;\n\t\t\tfor (var i1 = 0; i1 < max; i1++) {\n\t\t\t\tvar [nkey2, nvalue1, noriginalValue] = expanded2[i1];\n\t\t\t\tmap(nkey2, nvalue1, noriginalValue !== null && noriginalValue !== void 0 ? noriginalValue : originalValue);\n\t\t\t}\n\t\t} else map(key, value, originalValue);\n\t}\n};\nvar resolveVariants = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar _styleState_staticConfig_variants;\n\tvar variantDefinition = (_styleState_staticConfig_variants = styleState.staticConfig.variants) === null || _styleState_staticConfig_variants === void 0 ? void 0 : _styleState_staticConfig_variants[key];\n\tif (typeof value === \"string\" && value.indexOf(\":\") !== -1 && !(variantDefinition && (typeof variantDefinition === \"undefined\" ? \"undefined\" : _type_of(variantDefinition)) === \"object\" && value in variantDefinition)) {\n\t\tvar scan = [\n\t\t\tstyleState,\n\t\t\tvalue,\n\t\t\tfalse\n\t\t];\n\t\tscanFlatValue(value, propMapperHandler, scan);\n\t\tif (scan[2]) {\n\t\t\tvar entries;\n\t\t\tfor (var index = 3; index < scan.length; index += 4) {\n\t\t\t\tvar resolved = resolveVariantValue(key, value.slice(scan[index], scan[index + 1]), styleProps, styleState, parentVariantKey);\n\t\t\t\tif (!resolved) continue;\n\t\t\t\tentries || (entries = []);\n\t\t\t\tvar chainStart = scan[index + 2];\n\t\t\t\tvar modifier = chainStart === -1 ? void 0 : value.slice(chainStart, scan[index + 3]);\n\t\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator = resolved[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar entry = _step.value;\n\t\t\t\t\t\tif (modifier !== void 0) entry[3] = modifier;\n\t\t\t\t\t\tentries.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t_iteratorError = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn entries || [];\n\t\t}\n\t}\n\tif (value && (typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === \"object\" && !Array.isArray(value) && !isVariable(value) && isConditionalStyleObject(styleState, value)) {\n\t\tvar entries1;\n\t\tfor (var objKey in value) {\n\t\t\tvar payload = value[objKey];\n\t\t\tif (payload == null) continue;\n\t\t\tvar resolved1 = resolveVariantValue(key, payload, styleProps, styleState, parentVariantKey);\n\t\t\tif (!resolved1) continue;\n\t\t\tentries1 || (entries1 = []);\n\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator1 = resolved1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\tvar entry1 = _step1.value;\n\t\t\t\t\tif (objKey !== \"default\") entry1[3] = objKey;\n\t\t\t\t\tentries1.push(entry1);\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t_iteratorError1 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn entries1 || [];\n\t}\n\treturn resolveVariantValue(key, value, styleProps, styleState, parentVariantKey);\n};\nvar resolveVariantValue = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar { staticConfig, conf, debug } = styleState;\n\tvar { variants } = staticConfig;\n\tif (!variants) return;\n\tvar variant = variants[key];\n\tvar variantValue = getVariantDefinition(variant, value, conf, styleState);\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") {\n\t\tconsole.groupCollapsed(`\\u2666\\uFE0F\\u2666\\uFE0F\\u2666\\uFE0F resolve variant ${key}`);\n\t\tconsole.info({\n\t\t\tkey,\n\t\t\tvalue,\n\t\t\tvariantValue,\n\t\t\tvariants\n\t\t});\n\t\tconsole.groupEnd();\n\t}\n\tif (!variantValue) {\n\t\tif (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === \"1\") {\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tvar name = styleState.styleProps.displayName || \"[UnnamedComponent]\";\n\t\t\t\tconsole.warn(`No variant found: ${name} has variant \"${key}\", but no matching value \"${value}\"`);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tif (typeof variantValue === \"function\") {\n\t\tvariantValue = variantValue(value, getVariantExtras(styleState));\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\" && false);\n\t}\n\tvar fontFamilyResult;\n\tif (isObj(variantValue)) {\n\t\tvar fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];\n\t\tif (fontFamilyUpdate) {\n\t\t\tfontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf);\n\t\t\tstyleState.fontFamily = fontFamilyResult;\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` updating font family`, fontFamilyResult);\n\t\t}\n\t\tvariantValue = resolveTokensAndVariants(key, variantValue, styleProps, styleState, parentVariantKey);\n\t}\n\tif (variantValue) {\n\t\tvar expanded = normalizeStyle(variantValue, !!styleProps.noNormalize);\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` expanding styles from `, variantValue, `to`, expanded);\n\t\tvar originalValues = styleOriginalValues.get(expanded);\n\t\tvar next = [];\n\t\tfor (var _$key in expanded) next.push([\n\t\t\t_$key,\n\t\t\texpanded[_$key],\n\t\t\toriginalValues === null || originalValues === void 0 ? void 0 : originalValues[_$key]\n\t\t]);\n\t\treturn next;\n\t}\n};\nfunction getFontFamilyFromNameOrVariable(input, conf) {\n\tif (isVariable(input)) {\n\t\tvar val = variableToFontNameCache.get(input);\n\t\tif (val) return val;\n\t\tfor (var key in conf.fontsParsed) {\n\t\t\tvar familyVariable = conf.fontsParsed[key].family;\n\t\t\tif (isVariable(familyVariable)) {\n\t\t\t\tvariableToFontNameCache.set(familyVariable, key);\n\t\t\t\tif (familyVariable === input) return key;\n\t\t\t}\n\t\t}\n\t} else if (typeof input === \"string\" && input in conf.fontsParsed) return input;\n}\nvar variableToFontNameCache = /* @__PURE__ */ new WeakMap();\nvar resolveTokensAndVariants = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar { conf, staticConfig, debug } = styleState;\n\tvar { variants } = staticConfig;\n\tvar res = {};\n\tvar originalValues;\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` - resolveTokensAndVariants`, key, value);\n\tfor (var _key in value) {\n\t\tvar subKey = conf.shorthands[_key] || _key;\n\t\tvar val = value[_key];\n\t\tif (!styleProps.noSkip && subKey in skipProps) continue;\n\t\toriginalValues || (originalValues = {});\n\t\toriginalValues[subKey] = val;\n\t\tif (staticConfig) {\n\t\t\tvar _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, _staticConfig_parentStaticConfig1, _staticConfig_parentStaticConfig2, _staticConfig_context_propKeys, _staticConfig_context1, _staticConfig_parentStaticConfig_context_propKeys, _staticConfig_parentStaticConfig_context1, _staticConfig_parentStaticConfig3;\n\t\t\tvar contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);\n\t\t\tvar inheritedContextPropKeys = !staticConfig.context || staticConfig.context === ((_staticConfig_parentStaticConfig1 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig1 === void 0 ? void 0 : _staticConfig_parentStaticConfig1.context) ? (_staticConfig_parentStaticConfig2 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig2 === void 0 ? void 0 : _staticConfig_parentStaticConfig2.contextProps : void 0;\n\t\t\tvar contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;\n\t\t\tif (contextProps && subKey in contextProps || (contextPropKeys === null || contextPropKeys === void 0 ? void 0 : contextPropKeys.includes(subKey)) || ((_staticConfig_context1 = staticConfig.context) === null || _staticConfig_context1 === void 0 ? void 0 : (_staticConfig_context_propKeys = _staticConfig_context1.propKeys) === null || _staticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_context_propKeys.includes(subKey)) || ((_staticConfig_parentStaticConfig3 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig3 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context1 = _staticConfig_parentStaticConfig3.context) === null || _staticConfig_parentStaticConfig_context1 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context_propKeys = _staticConfig_parentStaticConfig_context1.propKeys) === null || _staticConfig_parentStaticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_parentStaticConfig_context_propKeys.includes(subKey))) {\n\t\t\t\tvar _styleState, _styleState1;\n\t\t\t\t(_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});\n\t\t\t\tstyleState.overriddenContextProps[subKey] = val;\n\t\t\t\t(_styleState1 = styleState).originalContextPropValues || (_styleState1.originalContextPropValues = {});\n\t\t\t\tstyleState.originalContextPropValues[subKey] = val;\n\t\t\t}\n\t\t}\n\t\tif (styleProps.noExpand) res[subKey] = val;\n\t\telse if (variants && subKey in variants) {\n\t\t\tif (parentVariantKey && parentVariantKey === key) res[subKey] = val;\n\t\t\telse {\n\t\t\t\tvar variantOut = resolveVariants(subKey, val, styleProps, styleState, key);\n\t\t\t\tif (variantOut) {\n\t\t\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator = variantOut[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\t\tvar [_$key, val1, originalVal, conditionSource] = _step.value;\n\t\t\t\t\t\t\tif (val1 == null) continue;\n\t\t\t\t\t\t\tif (conditionSource !== void 0) {\n\t\t\t\t\t\t\t\tvar appended = appendFlatClause(res[_$key], conditionSource, val1);\n\t\t\t\t\t\t\t\tif (appended === void 0) {\n\t\t\t\t\t\t\t\t\tif (process.env.NODE_ENV === \"development\") console.warn(`[tamagui] conditional variant value for \"${_$key}\" is not string-representable; dropping the clause`);\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tres[_$key] = appended;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tres[_$key] = val1;\n\t\t\t\t\t\t\tif (originalVal !== void 0) {\n\t\t\t\t\t\t\t\toriginalValues || (originalValues = {});\n\t\t\t\t\t\t\t\toriginalValues[_$key] = originalVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t\t_iteratorError = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (isVariable(val)) {\n\t\t\tres[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`variable`, subKey, res[subKey]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof val === \"string\") {\n\t\t\tres[subKey] = isRemValue(val) ? resolveRem(val) : val;\n\t\t\tcontinue;\n\t\t}\n\t\tif (isObj(val)) {\n\t\t\tvar _res, _subKey;\n\t\t\tvar subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`object`, subKey, subObject);\n\t\t\tvar _;\n\t\t\t(_ = (_res = res)[_subKey = subKey]) !== null && _ !== void 0 || (_res[_subKey] = {});\n\t\t\tObject.assign(res[subKey], subObject);\n\t\t\tvar subOriginalValues = styleOriginalValues.get(subObject);\n\t\t\tif (subOriginalValues) {\n\t\t\t\tvar existing = styleOriginalValues.get(res[subKey]);\n\t\t\t\tif (existing) Object.assign(existing, subOriginalValues);\n\t\t\t\telse styleOriginalValues.set(res[subKey], { ...subOriginalValues });\n\t\t\t}\n\t\t} else res[subKey] = val;\n\t}\n\tif (originalValues) styleOriginalValues.set(res, originalValues);\n\treturn res;\n};\nfunction getVariantDefinition(variant, value, conf, param) {\n\tvar { theme } = param;\n\tif (!variant) return;\n\tif (value === void 0) return;\n\tif (typeof variant === \"function\") return variant;\n\tif (Object.prototype.hasOwnProperty.call(variant, value)) return variant[value];\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = getCompiledVariantResolvers(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar { key, parts } = _step.value;\n\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator1 = parts[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\tvar part = _step1.value;\n\t\t\t\t\tif (matchesVariantResolver(part, value, conf, theme)) return variant[key];\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t_iteratorError1 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n}\nvar variantResolverNameSet = new Set(variantResolverNames);\nvar variantResolverCache = /* @__PURE__ */ new WeakMap();\nfunction getCompiledVariantResolvers(variant) {\n\tvar cached = variantResolverCache.get(variant);\n\tif (cached) return cached;\n\tvar compiled = [];\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = Object.keys(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar key = _step.value;\n\t\t\tvar parts = parseVariantResolverKey(key);\n\t\t\tif (parts) compiled.push({\n\t\t\t\tkey,\n\t\t\t\tparts\n\t\t\t});\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\tvariantResolverCache.set(variant, compiled);\n\treturn compiled;\n}\nfunction parseVariantResolverKey(key) {\n\tif (!key) return null;\n\tvar parts = key.split(\"|\").map(function(part2) {\n\t\treturn part2.trim();\n\t});\n\tif (!parts.length) return null;\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar part = _step.value;\n\t\t\tif (!variantResolverNameSet.has(part)) return null;\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\treturn parts;\n}\nvar numberStringPattern = /[+-]?(?:(?:\\d+\\.?\\d*)|(?:\\.\\d+))(?:[eE][+-]?\\d+)?|[+-]?0[xX][\\da-fA-F]+|[+-]?0[bB][01]+|[+-]?0[oO][0-7]+/;\nvar remStringPattern = new RegExp(`^(?:${numberStringPattern.source})rem$`);\nvar viewportValuePattern = new RegExp(`^(?:${numberStringPattern.source})(vw|dvw|lvw|svw|vh|dvh|lvh|svh)$`);\nfunction isAllowedStyleValue(category, value, conf, string, number, rem) {\n\tvar hasSetting = Object.prototype.hasOwnProperty.call(conf.settings, \"allowedStyleValues\");\n\tvar configured = conf.settings.allowedStyleValues;\n\tvar setting = configured && (typeof configured === \"undefined\" ? \"undefined\" : _type_of(configured)) === \"object\" ? configured[category] : configured;\n\tvar web = value === \"unset\" || value === \"inherit\" || string && /^var\\(.*\\)$/.test(value) || (category === \"size\" || category === \"space\") && (value === \"max-content\" || value === \"min-content\" || string && (viewportValuePattern.test(value) || /^(calc|min|max)\\(.*\\)$/.test(value)));\n\tvar somewhat = category === \"size\" || category === \"space\" ? value === \"auto\" || number || rem || string && value.endsWith(\"%\") : number;\n\tif (setting === \"strict\") return false;\n\tif (setting === \"strict-web\") return web;\n\tif (setting === \"somewhat-strict\") return somewhat;\n\tif (setting === \"somewhat-strict-web\") return somewhat || web;\n\treturn number || string && (category === \"size\" || category === \"space\" || !hasSetting);\n}\nfunction matchesVariantResolver(resolverName, value, conf, theme) {\n\tvar string = typeof value === \"string\";\n\tvar number = typeof value === \"number\";\n\tvar rem = string && remStringPattern.test(value);\n\tswitch (resolverName) {\n\t\tcase \"Size\":\n\t\tcase \"Space\":\n\t\tcase \"Radius\":\n\t\tcase \"ZIndex\":\n\t\t\tvar category = resolverName === \"ZIndex\" ? \"zIndex\" : resolverName.toLowerCase();\n\t\t\treturn value === true || value != null && value in conf.tokensParsed[category] || (resolverName === \"Space\" || resolverName === \"Radius\" || resolverName === \"ZIndex\") && isVariable(value) || (resolverName === \"Radius\" || resolverName === \"ZIndex\") && (number || rem) || isAllowedStyleValue(category, value, conf, string, number, rem);\n\t\tcase \"Color\": return value != null && value in conf.tokensParsed.color || string;\n\t\tcase \"Theme\": return string && !!theme && value in theme;\n\t\tcase \"FontSize\":\n\t\t\tvar _conf_fontsParsed_body_size, _conf_fontsParsed_body;\n\t\t\treturn value === true || !!((_conf_fontsParsed_body = conf.fontsParsed.body) === null || _conf_fontsParsed_body === void 0 ? void 0 : (_conf_fontsParsed_body_size = _conf_fontsParsed_body.size) === null || _conf_fontsParsed_body_size === void 0 ? void 0 : _conf_fontsParsed_body_size[value]) || number || rem;\n\t\tcase \"FontStyle\":\n\t\t\tvar _conf_fontsParsed_body_style, _conf_fontsParsed_body1;\n\t\t\treturn !!((_conf_fontsParsed_body1 = conf.fontsParsed.body) === null || _conf_fontsParsed_body1 === void 0 ? void 0 : (_conf_fontsParsed_body_style = _conf_fontsParsed_body1.style) === null || _conf_fontsParsed_body_style === void 0 ? void 0 : _conf_fontsParsed_body_style[value]) || value === \"normal\" || value === \"italic\";\n\t\tcase \"FontTransform\":\n\t\t\tvar _conf_fontsParsed_body_transform, _conf_fontsParsed_body2;\n\t\t\treturn !!((_conf_fontsParsed_body2 = conf.fontsParsed.body) === null || _conf_fontsParsed_body2 === void 0 ? void 0 : (_conf_fontsParsed_body_transform = _conf_fontsParsed_body2.transform) === null || _conf_fontsParsed_body_transform === void 0 ? void 0 : _conf_fontsParsed_body_transform[value]) || value === \"none\" || value === \"capitalize\" || value === \"uppercase\" || value === \"lowercase\";\n\t\tcase \"FontLineHeight\":\n\t\t\tvar _conf_fontsParsed_body_lineHeight, _conf_fontsParsed_body3;\n\t\t\treturn !!((_conf_fontsParsed_body3 = conf.fontsParsed.body) === null || _conf_fontsParsed_body3 === void 0 ? void 0 : (_conf_fontsParsed_body_lineHeight = _conf_fontsParsed_body3.lineHeight) === null || _conf_fontsParsed_body_lineHeight === void 0 ? void 0 : _conf_fontsParsed_body_lineHeight[value]) || number || rem;\n\t\tcase \"FontLetterSpacing\":\n\t\t\tvar _conf_fontsParsed_body_letterSpacing, _conf_fontsParsed_body4;\n\t\t\treturn !!((_conf_fontsParsed_body4 = conf.fontsParsed.body) === null || _conf_fontsParsed_body4 === void 0 ? void 0 : (_conf_fontsParsed_body_letterSpacing = _conf_fontsParsed_body4.letterSpacing) === null || _conf_fontsParsed_body_letterSpacing === void 0 ? void 0 : _conf_fontsParsed_body_letterSpacing[value]) || number || rem;\n\t\tcase \"number\":\n\t\tcase \"string\":\n\t\tcase \"boolean\": return (typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === resolverName;\n\t\tcase \"any\": return true;\n\t}\n}\n\nexport { appendFlatClause, getFontFamilyFromNameOrVariable, propMapper };"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,SAAS,SAAS,KAAK;CACtB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAC/F;AACA,SAAS,iBAAiB,MAAM,iBAAiB,OAAO;CACvD,IAAI,QAAQ,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;CAC1E,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;CAC5D,OAAO,QAAQ,OAAO,GAAG,gBAAgB,GAAG,UAAU,GAAG,KAAK,GAAG,gB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|
90
90
|
"test:web": "vitest --typecheck --run"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@tamagui/compose-refs": "3.0.0-beta.
|
|
94
|
-
"@tamagui/constants": "3.0.0-beta.
|
|
95
|
-
"@tamagui/dom": "3.0.0-beta.
|
|
96
|
-
"@tamagui/helpers": "3.0.0-beta.
|
|
97
|
-
"@tamagui/is-equal-shallow": "3.0.0-beta.
|
|
98
|
-
"@tamagui/native": "3.0.0-beta.
|
|
99
|
-
"@tamagui/normalize-css-color": "3.0.0-beta.
|
|
100
|
-
"@tamagui/style-grammar": "3.0.0-beta.
|
|
101
|
-
"@tamagui/timer": "3.0.0-beta.
|
|
102
|
-
"@tamagui/types": "3.0.0-beta.
|
|
103
|
-
"@tamagui/use-did-finish-ssr": "3.0.0-beta.
|
|
104
|
-
"@tamagui/use-event": "3.0.0-beta.
|
|
105
|
-
"@tamagui/use-force-update": "3.0.0-beta.
|
|
93
|
+
"@tamagui/compose-refs": "3.0.0-beta.748.1",
|
|
94
|
+
"@tamagui/constants": "3.0.0-beta.748.1",
|
|
95
|
+
"@tamagui/dom": "3.0.0-beta.748.1",
|
|
96
|
+
"@tamagui/helpers": "3.0.0-beta.748.1",
|
|
97
|
+
"@tamagui/is-equal-shallow": "3.0.0-beta.748.1",
|
|
98
|
+
"@tamagui/native": "3.0.0-beta.748.1",
|
|
99
|
+
"@tamagui/normalize-css-color": "3.0.0-beta.748.1",
|
|
100
|
+
"@tamagui/style-grammar": "3.0.0-beta.748.1",
|
|
101
|
+
"@tamagui/timer": "3.0.0-beta.748.1",
|
|
102
|
+
"@tamagui/types": "3.0.0-beta.748.1",
|
|
103
|
+
"@tamagui/use-did-finish-ssr": "3.0.0-beta.748.1",
|
|
104
|
+
"@tamagui/use-event": "3.0.0-beta.748.1",
|
|
105
|
+
"@tamagui/use-force-update": "3.0.0-beta.748.1"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@tamagui/build": "3.0.0-beta.
|
|
108
|
+
"@tamagui/build": "3.0.0-beta.748.1",
|
|
109
109
|
"@testing-library/react": "^16.1.0",
|
|
110
110
|
"csstype": "^3.0.10",
|
|
111
111
|
"react": "19.2.3",
|
|
@@ -2075,7 +2075,7 @@ export function contributeFrontendValue(
|
|
|
2075
2075
|
// resolvable modifier chain; anything else is a structured leaf value
|
|
2076
2076
|
// (shadowOffset) and stays whole. only the first key is probed, the same way
|
|
2077
2077
|
// the string scanner commits at its first clause
|
|
2078
|
-
function isConditionalStyleObject(
|
|
2078
|
+
export function isConditionalStyleObject(
|
|
2079
2079
|
state: GetStyleState,
|
|
2080
2080
|
value: Record<string, any>
|
|
2081
2081
|
): boolean {
|
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
VariantSpreadFunction,
|
|
12
12
|
} from '../types'
|
|
13
13
|
import { variantResolverNames } from '../types'
|
|
14
|
-
import { resolveClauseChain } from './directStyle'
|
|
14
|
+
import { isConditionalStyleObject, resolveClauseChain } from './directStyle'
|
|
15
15
|
import { expandStyle } from './expandStyle'
|
|
16
16
|
import { resolveVariableValue } from './resolveVariableValue'
|
|
17
17
|
import { getFontsForLanguage, getVariantExtras } from './getVariantExtras'
|
|
@@ -227,6 +227,38 @@ const resolveVariants: StyleResolver = (
|
|
|
227
227
|
// no clause structure found: the colon belongs to the value itself
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
+
// the object spelling of a conditional variant prop mirrors the clause
|
|
231
|
+
// string: density={{ default: 'compact', sm: 'roomy' }}. a payload object
|
|
232
|
+
// with no default and no modifier first key (a functional variant's own
|
|
233
|
+
// argument shape) falls through whole
|
|
234
|
+
if (
|
|
235
|
+
value &&
|
|
236
|
+
typeof value === 'object' &&
|
|
237
|
+
!Array.isArray(value) &&
|
|
238
|
+
!isVariable(value) &&
|
|
239
|
+
isConditionalStyleObject(styleState, value)
|
|
240
|
+
) {
|
|
241
|
+
let entries: [string, any, any?, string?][] | undefined
|
|
242
|
+
for (const objKey in value) {
|
|
243
|
+
const payload = value[objKey]
|
|
244
|
+
if (payload == null) continue
|
|
245
|
+
const resolved = resolveVariantValue(
|
|
246
|
+
key,
|
|
247
|
+
payload,
|
|
248
|
+
styleProps,
|
|
249
|
+
styleState,
|
|
250
|
+
parentVariantKey
|
|
251
|
+
)
|
|
252
|
+
if (!resolved) continue
|
|
253
|
+
entries ||= []
|
|
254
|
+
for (const entry of resolved) {
|
|
255
|
+
if (objKey !== 'default') entry[3] = objKey
|
|
256
|
+
entries.push(entry)
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return entries || []
|
|
260
|
+
}
|
|
261
|
+
|
|
230
262
|
return resolveVariantValue(key, value, styleProps, styleState, parentVariantKey)
|
|
231
263
|
}
|
|
232
264
|
|
package/src/styled.tsx
CHANGED
|
@@ -52,6 +52,10 @@ type AreVariantsUndefined<Variants> =
|
|
|
52
52
|
// because we pass in the Generic variants which for some reason has this :)
|
|
53
53
|
Required<Variants> extends { _isEmpty: 1 } ? true : false
|
|
54
54
|
|
|
55
|
+
// these stay strict (exact branch keys): defaultVariants, options roots,
|
|
56
|
+
// compound matchers, and the stored component variants all use them, so typos
|
|
57
|
+
// there remain type errors. the conditional flat forms (clause strings and
|
|
58
|
+
// objects) widen only at the final public props, in WithThemeAndShorthands
|
|
55
59
|
type GetVariantAcceptedValues<V> = V extends object
|
|
56
60
|
? {
|
|
57
61
|
[Key in keyof V]?: V[Key] extends VariantSpreadFunction<any, infer Val>
|
package/src/types.tsx
CHANGED
|
@@ -2122,14 +2122,25 @@ type MaybeOmitLonghands<A> = OnlyShorthandStyleProps extends true
|
|
|
2122
2122
|
? Omit<A, ShorthandLonghandProps>
|
|
2123
2123
|
: A
|
|
2124
2124
|
|
|
2125
|
+
// variant props at the call site take the same conditional forms as style
|
|
2126
|
+
// values: density="compact sm:roomy" and density={{ default: 'compact', sm: 'roomy' }}.
|
|
2127
|
+
// the widening happens only here, at the final public props, so every
|
|
2128
|
+
// definition-side type (defaultVariants, compound matchers, inheritance)
|
|
2129
|
+
// keeps the exact branch-key unions
|
|
2130
|
+
export type WithFlatVariantValues<Variants> = {
|
|
2131
|
+
[Key in keyof Variants]?: FlatStyleValue<NonNullable<Variants[Key]>>
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2125
2134
|
export type WithThemeAndShorthands<
|
|
2126
2135
|
A extends object,
|
|
2127
2136
|
Variants = {},
|
|
2128
2137
|
> = OnlyAllowShorthands extends true
|
|
2129
2138
|
? WithThemeValues<MaybeOmitLonghands<Omit<A, Longhands>>> &
|
|
2130
|
-
Variants &
|
|
2139
|
+
WithFlatVariantValues<Variants> &
|
|
2140
|
+
WithShorthands<WithThemeValues<A>>
|
|
2141
|
+
: WithThemeValues<MaybeOmitLonghands<A>> &
|
|
2142
|
+
WithFlatVariantValues<Variants> &
|
|
2131
2143
|
WithShorthands<WithThemeValues<A>>
|
|
2132
|
-
: WithThemeValues<MaybeOmitLonghands<A>> & Variants & WithShorthands<WithThemeValues<A>>
|
|
2133
2144
|
|
|
2134
2145
|
/**
|
|
2135
2146
|
* Base style-only props (no media, pseudo):
|