@tamagui/web 3.0.0-beta.748.1 → 3.0.0-beta.752.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.
Files changed (47) hide show
  1. package/dist/cjs/helpers/directStyle.cjs +6 -3
  2. package/dist/cjs/helpers/directStyle.native.cjs +6 -3
  3. package/dist/cjs/helpers/directStyle.native.js +6 -3
  4. package/dist/cjs/helpers/directStyle.native.js.map +1 -1
  5. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +6 -7
  6. package/dist/cjs/helpers/getSplitStyles.cjs +106 -10
  7. package/dist/cjs/helpers/getSplitStyles.native.cjs +168 -10
  8. package/dist/cjs/helpers/getSplitStyles.native.js +168 -10
  9. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  10. package/dist/cjs/helpers/propMapper.cjs +17 -6
  11. package/dist/cjs/helpers/propMapper.native.cjs +17 -6
  12. package/dist/cjs/helpers/propMapper.native.js +17 -6
  13. package/dist/cjs/helpers/propMapper.native.js.map +1 -1
  14. package/dist/cjs/hooks/useComponentState.cjs +6 -4
  15. package/dist/cjs/hooks/useComponentState.native.cjs +6 -4
  16. package/dist/cjs/hooks/useComponentState.native.js +6 -4
  17. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  18. package/dist/esm/helpers/directStyle.mjs +6 -3
  19. package/dist/esm/helpers/directStyle.mjs.map +1 -1
  20. package/dist/esm/helpers/directStyle.native.js +6 -3
  21. package/dist/esm/helpers/directStyle.native.js.map +1 -1
  22. package/dist/esm/helpers/getCSSStylesAtomic.mjs +6 -7
  23. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  24. package/dist/esm/helpers/getSplitStyles.mjs +107 -11
  25. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  26. package/dist/esm/helpers/getSplitStyles.native.js +169 -11
  27. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  28. package/dist/esm/helpers/propMapper.mjs +17 -6
  29. package/dist/esm/helpers/propMapper.mjs.map +1 -1
  30. package/dist/esm/helpers/propMapper.native.js +17 -6
  31. package/dist/esm/helpers/propMapper.native.js.map +1 -1
  32. package/dist/esm/hooks/useComponentState.mjs +6 -4
  33. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  34. package/dist/esm/hooks/useComponentState.native.js +6 -4
  35. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  36. package/package.json +15 -15
  37. package/src/helpers/directStyle.ts +9 -3
  38. package/src/helpers/getCSSStylesAtomic.ts +16 -10
  39. package/src/helpers/getSplitStyles.tsx +183 -17
  40. package/src/helpers/propMapper.ts +31 -12
  41. package/src/hooks/useComponentState.ts +15 -4
  42. package/types/helpers/directStyle.d.ts.map +1 -1
  43. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  44. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  45. package/types/helpers/propMapper.d.ts +2 -2
  46. package/types/helpers/propMapper.d.ts.map +1 -1
  47. package/types/hooks/useComponentState.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 { 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\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,OA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K,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"}
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 { 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(state, prev, conditionSource, value) {\n\tif (typeof value === \"string\" || typeof value === \"number\") {\n\t\tif (prev == null) return `${conditionSource}:${value}`;\n\t\tif (typeof prev === \"string\" || typeof prev === \"number\") return `${prev} ${conditionSource}:${value}`;\n\t}\n\tif (prev == null) return { [conditionSource]: value };\n\tif (typeof prev === \"string\" && prev.includes(\":\")) return;\n\tif (typeof prev === \"object\" && !Array.isArray(prev) && !isVariable(prev) && isConditionalStyleObject(state, prev)) return {\n\t\t...prev,\n\t\t[conditionSource]: value\n\t};\n\treturn {\n\t\tdefault: prev,\n\t\t[conditionSource]: value\n\t};\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(styleState, 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}\" cannot join the existing clause string; 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,OAAO,MAAM,iBAAiB,OAAO;CAC9D,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;EAC3D,IAAI,QAAQ,MAAM,OAAO,GAAG,gBAAgB,GAAG;EAC/C,IAAI,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU,OAAO,GAAG,KAAK,GAAG,gBAAgB,GAAG;CAChG;CACA,IAAI,QAAQ,MAAM,OAAO,GAAG,kBAAkB,MAAM;CACpD,IAAI,OAAO,SAAS,YAAY,KAAK,SAAS,GAAG,GAAG;CACpD,IAAI,OAAO,SAAS,YAAY,CAAC,MAAM,QAAQ,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,yBAAyB,OAAO,IAAI,GAAG,OAAO;EAC1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E,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"}
@@ -19,10 +19,21 @@ function _type_of(obj) {
19
19
  "@swc/helpers - typeof";
20
20
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
21
21
  }
22
- function appendFlatClause(prev, conditionSource, value) {
23
- if (prev != null && typeof prev !== "string" && typeof prev !== "number") return;
24
- if (typeof value !== "string" && typeof value !== "number") return;
25
- return prev == null ? `${conditionSource}:${value}` : `${prev} ${conditionSource}:${value}`;
22
+ function appendFlatClause(state, prev, conditionSource, value) {
23
+ if (typeof value === "string" || typeof value === "number") {
24
+ if (prev == null) return `${conditionSource}:${value}`;
25
+ if (typeof prev === "string" || typeof prev === "number") return `${prev} ${conditionSource}:${value}`;
26
+ }
27
+ if (prev == null) return { [conditionSource]: value };
28
+ if (typeof prev === "string" && prev.includes(":")) return;
29
+ if ((typeof prev === "undefined" ? "undefined" : _type_of(prev)) === "object" && !Array.isArray(prev) && !isVariable(prev) && isConditionalStyleObject(state, prev)) return {
30
+ ...prev,
31
+ [conditionSource]: value
32
+ };
33
+ return {
34
+ default: prev,
35
+ [conditionSource]: value
36
+ };
26
37
  }
27
38
  var propMapperHandler = {
28
39
  segment(ctx, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {
@@ -300,9 +311,9 @@ var resolveTokensAndVariants = function(key, value, styleProps, styleState, pare
300
311
  var [_$key, val1, originalVal, conditionSource] = _step.value;
301
312
  if (val1 == null) continue;
302
313
  if (conditionSource !== void 0) {
303
- var appended = appendFlatClause(res[_$key], conditionSource, val1);
314
+ var appended = appendFlatClause(styleState, res[_$key], conditionSource, val1);
304
315
  if (appended === void 0) {
305
- if (process.env.NODE_ENV === "development") console.warn(`[tamagui] conditional variant value for "${_$key}" is not string-representable; dropping the clause`);
316
+ if (process.env.NODE_ENV === "development") console.warn(`[tamagui] conditional variant value for "${_$key}" cannot join the existing clause string; dropping the clause`);
306
317
  continue;
307
318
  }
308
319
  res[_$key] = appended;
@@ -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 { 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":";;;;;;;;;;;;;;;;;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,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(state, prev, conditionSource, value) {\n\tif (typeof value === \"string\" || typeof value === \"number\") {\n\t\tif (prev == null) return `${conditionSource}:${value}`;\n\t\tif (typeof prev === \"string\" || typeof prev === \"number\") return `${prev} ${conditionSource}:${value}`;\n\t}\n\tif (prev == null) return { [conditionSource]: value };\n\tif (typeof prev === \"string\" && prev.includes(\":\")) return;\n\tif ((typeof prev === \"undefined\" ? \"undefined\" : _type_of(prev)) === \"object\" && !Array.isArray(prev) && !isVariable(prev) && isConditionalStyleObject(state, prev)) return {\n\t\t...prev,\n\t\t[conditionSource]: value\n\t};\n\treturn {\n\t\tdefault: prev,\n\t\t[conditionSource]: value\n\t};\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(styleState, 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}\" cannot join the existing clause string; 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,OAAO,MAAM,iBAAiB,OAAO;CAC9D,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;EAC3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AAK,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"}
@@ -37,7 +37,7 @@ const lifecycleHandler = {
37
37
  return true;
38
38
  }
39
39
  };
40
- function hasFlatModifier(props, config, modifiers, ctx) {
40
+ function hasFlatModifier(props, config, modifiers, ctx, variants) {
41
41
  const scan = ctx.flatScan ||= [
42
42
  "",
43
43
  enterModifier,
@@ -51,7 +51,9 @@ function hasFlatModifier(props, config, modifiers, ctx) {
51
51
  continue;
52
52
  }
53
53
  const property = config.shorthands[key] || key;
54
- if (!(property in stylePropsAll) && property !== "transition") continue;
54
+ if (!(property in stylePropsAll) && property !== "transition" && !(variants && key in variants)) {
55
+ continue;
56
+ }
55
57
  if (!isString) {
56
58
  if (property === "transition") continue;
57
59
  for (const chain in value) {
@@ -96,7 +98,7 @@ const useComponentState = (props, animationDriver, staticConfig, config) => {
96
98
  if (!needsHydration && hasAnimationProp) {
97
99
  curStateRef.hasAnimated = true;
98
100
  }
99
- const platformPseudo = Boolean(!isHOC && useAnimations && animationDriver?.avoidReRenders && getPlatformDriver()?.pseudo && hasFlatModifier(props, config, platformPseudoModifiers, curStateRef));
101
+ const platformPseudo = Boolean(!isHOC && useAnimations && animationDriver?.avoidReRenders && getPlatformDriver()?.pseudo && hasFlatModifier(props, config, platformPseudoModifiers, curStateRef, staticConfig.variants));
100
102
  const willBeAnimatedClient = (() => {
101
103
  const next = !!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations);
102
104
  return Boolean(next || curStateRef.hasAnimated);
@@ -110,7 +112,7 @@ const useComponentState = (props, animationDriver, staticConfig, config) => {
110
112
  const presenceState = presence?.[2];
111
113
  const isExiting = presenceState?.isPresent === false;
112
114
  const isEntering = presenceState?.isPresent === true && presenceState.initial !== false;
113
- const hasEnterStyle = hasFlatModifier(props, config, enterModifier, curStateRef);
115
+ const hasEnterStyle = hasFlatModifier(props, config, enterModifier, curStateRef, staticConfig.variants);
114
116
  const hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && (animationDriver?.isReactNative || inputStyle !== "css");
115
117
  const canImmediatelyEnter = hasEnterStyle || isEntering;
116
118
  const shouldEnter = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || disableClassName);
@@ -1 +1 @@
1
- {"version":3,"file":"useComponentState.js","names":[],"sources":["esm/hooks/useComponentState.js"],"sourcesContent":["import { getPlatformDriver, isServer, isWeb } from \"@tamagui/constants\";\nimport { stylePropsAll } from \"@tamagui/helpers\";\nimport {\n canonicalClauseModifier,\n scanFlatValue\n} from \"@tamagui/style-grammar/runtime\";\nimport { mergeIfNotShallowEqual } from \"@tamagui/is-equal-shallow\";\nimport { useDidFinishSSR, useIsClientOnly } from \"@tamagui/use-did-finish-ssr\";\nimport { useRef, useState } from \"react\";\nimport { getSetting } from \"../config\";\nimport { formatDiagnostic } from \"../helpers/formatDiagnostic\";\nimport { isOptimizedForFirstRender } from \"./isOptimizedForFirstRender\";\nimport {\n defaultComponentState,\n defaultComponentStateMounted,\n defaultComponentStateShouldEnter\n} from \"../defaultComponentState\";\nimport { isObj } from \"../helpers/isObj\";\nimport { log } from \"../helpers/log\";\nconst platformPseudoModifiers = /* @__PURE__ */ new Set([\"hover\", \"press\", \"focus\"]);\nconst enterModifier = /* @__PURE__ */ new Set([\"enter\"]);\nconst lifecycleHandler = {\n segment(ctx, start, end, isBase, valid) {\n const scan = ctx.flatScan;\n if (!isBase && valid && start < end && scan[3]) scan[2] = true;\n scan[3] = false;\n },\n chain(ctx, start, end, valid) {\n const scan = ctx.flatScan;\n scan[3] = false;\n if (!valid) return true;\n for (let index = start; index <= end; index++) {\n if (index !== end && scan[0].charCodeAt(index) !== 58) continue;\n if (scan[1].has(canonicalClauseModifier(scan[0].slice(start, index)))) {\n scan[3] = true;\n }\n start = index + 1;\n }\n return true;\n }\n};\nfunction hasFlatModifier(props, config, modifiers, ctx) {\n const scan = ctx.flatScan ||= [\"\", enterModifier, false, false];\n for (const key in props) {\n const value = props[key];\n const isString = typeof value === \"string\";\n if (isString ? value.indexOf(\":\") === -1 : !value || typeof value !== \"object\") {\n continue;\n }\n const property = config.shorthands[key] || key;\n if (!(property in stylePropsAll) && property !== \"transition\") continue;\n if (!isString) {\n if (property === \"transition\") continue;\n for (const chain in value) {\n if (chain === \"default\" || value[chain] == null) continue;\n let start = 0;\n for (let index = 0; index <= chain.length; index++) {\n if (index !== chain.length && chain.charCodeAt(index) !== 58) continue;\n if (modifiers.has(canonicalClauseModifier(chain.slice(start, index)))) {\n return true;\n }\n start = index + 1;\n }\n }\n continue;\n }\n scan[0] = value;\n scan[1] = modifiers;\n scan[2] = false;\n scan[3] = false;\n scanFlatValue(value, lifecycleHandler, ctx);\n if (scan[2]) return true;\n }\n return false;\n}\nconst useComponentState = (props, animationDriver, staticConfig, config) => {\n \"use no memo\";\n const isHydrated = useDidFinishSSR();\n const needsHydration = !useIsClientOnly();\n const useAnimations = animationDriver?.isStub ? void 0 : animationDriver?.useAnimations;\n const { isHOC } = staticConfig;\n const stateRef = useRef(\n // performance: avoid creating object every render\n void 0\n );\n if (!stateRef.current) {\n stateRef.current = {\n startedUnhydrated: needsHydration && !isHydrated,\n optimizeForFirstRender: isOptimizedForFirstRender()\n };\n }\n const hasAnimationProp = Boolean(\n !isHOC && \"transition\" in props || props.style && hasAnimatedStyleValue(props.style)\n );\n const inputStyle = animationDriver?.inputStyle ?? \"css\";\n const outputStyle = animationDriver?.outputStyle ?? \"css\";\n const curStateRef = stateRef.current;\n if (!needsHydration && hasAnimationProp) {\n curStateRef.hasAnimated = true;\n }\n const platformPseudo = Boolean(\n !isHOC && useAnimations && animationDriver?.avoidReRenders && getPlatformDriver()?.pseudo && hasFlatModifier(\n props,\n config,\n platformPseudoModifiers,\n curStateRef\n )\n );\n const willBeAnimatedClient = (() => {\n const next = !!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations);\n return Boolean(next || curStateRef.hasAnimated);\n })();\n const willBeAnimated = !isServer && willBeAnimatedClient;\n if (willBeAnimated && !curStateRef.hasAnimated) {\n curStateRef.hasAnimated = true;\n }\n const { disableClassName } = props;\n const presence = !isHOC && willBeAnimated && props[\"animatePresence\"] !== false && animationDriver?.usePresence?.() || null;\n const presenceState = presence?.[2];\n const isExiting = presenceState?.isPresent === false;\n const isEntering = presenceState?.isPresent === true && presenceState.initial !== false;\n const hasEnterStyle = hasFlatModifier(\n props,\n config,\n enterModifier,\n curStateRef\n );\n const hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && (animationDriver?.isReactNative || inputStyle !== \"css\");\n const canImmediatelyEnter = hasEnterStyle || isEntering;\n const shouldEnter = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || // disableClassName doesnt work server side, only client, so needs hydrate\n // this is just for a better ux, supports css variables for light/dark, media queries, etc\n disableClassName);\n const initialState = shouldEnter ? (\n // on the very first render we switch all spring animation drivers to css rendering\n // this is because we need to use css variables, which they don't support to do proper SSR\n // without flickers of the wrong colors.\n // but once we do that initial hydration and we are in client side rendering mode,\n // we can avoid the extra re-render on mount\n canImmediatelyEnter ? defaultComponentStateShouldEnter : defaultComponentState\n ) : defaultComponentStateMounted;\n const disabled = isDisabled(props);\n if (disabled != null) {\n initialState.disabled = disabled;\n }\n const states = useState(initialState);\n const state = props.forceStyle ? { ...states[0], [props.forceStyle]: true } : states[0];\n const setState = states[1];\n let isAnimated = willBeAnimated;\n if (isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated) {\n isAnimated = false;\n curStateRef.willHydrate = true;\n }\n if (disabled !== state.disabled) {\n if (disabled) {\n Object.assign(state, defaultComponentStateMounted);\n }\n state.disabled = disabled;\n setState((_) => ({ ...state }));\n }\n const groupName = props.group;\n if (!stateRef.current.baseSetStateShallow) {\n const r = stateRef.current;\n r.baseSetStateShallow = (stateOrGetState) => {\n setState((prev) => {\n const next = typeof stateOrGetState === \"function\" ? stateOrGetState(prev) : stateOrGetState;\n const update = mergeIfNotShallowEqual(prev, next);\n if (process.env.NODE_ENV === \"development\") {\n const dbg = r.__debug;\n if (dbg && update !== prev) {\n console.groupCollapsed(`setStateShallow CHANGE`, \"=>\", update);\n console.info(`previously`, prev);\n console.trace();\n console.groupEnd();\n }\n }\n return update;\n });\n };\n }\n if (process.env.NODE_ENV === \"development\") {\n ;\n stateRef.current.__debug = props.debug;\n }\n const setStateShallow = stateRef.current.baseSetStateShallow;\n if (process.env.NODE_ENV === \"development\" && globalThis.time)\n globalThis.time`state-useCreateShallowSetState`;\n let outProps = props;\n if (presenceState && isAnimated && isHydrated && staticConfig.variants) {\n if (process.env.NODE_ENV === \"development\" && props.debug === \"verbose\") {\n console.warn(\n formatDiagnostic(\n \"TAMAGUI_PRESENCE_STATE\",\n staticConfig.Component?.displayName || staticConfig.Component?.name || \"TamaguiComponent\",\n \"AnimatePresence supplied lifecycle state to an animated component\",\n 'Remove debug=\"verbose\" after inspecting the animation state',\n \"presenceState\",\n presenceState\n )\n );\n }\n const { custom } = presenceState;\n if (isObj(custom)) {\n outProps = { ...props, ...custom };\n }\n }\n let noClass = !isWeb || !!props.forceStyle;\n if (!isHydrated) {\n noClass = false;\n } else {\n if (isWeb && isHydrated) {\n const isAnimatedAndHydrated = isAnimated && isHydrated;\n const isClassNameDisabled = !staticConfig.acceptsClassName && (getSetting(\"disableSSR\") || !state.unmounted);\n const isDisabledManually = disableClassName && !state.unmounted;\n if (\n // Only disable className for animation drivers that output inline styles (not css)\n isAnimatedAndHydrated && outputStyle !== \"css\" || isDisabledManually || isClassNameDisabled\n ) {\n noClass = true;\n if (process.env.NODE_ENV === \"development\" && props.debug === \"verbose\") {\n log(`avoiding className`, {\n isAnimatedAndHydrated,\n isDisabledManually,\n isClassNameDisabled\n });\n }\n }\n }\n }\n return {\n props: outProps,\n startedUnhydrated: curStateRef.startedUnhydrated,\n curStateRef,\n disabled,\n groupName,\n hasAnimationProp,\n hasEnterStyle,\n isAnimated,\n isExiting,\n isHydrated,\n presence,\n presenceState,\n setState,\n setStateShallow,\n noClass,\n state,\n stateRef,\n inputStyle,\n outputStyle,\n willBeAnimated,\n willBeAnimatedClient,\n platformPseudo\n };\n};\nfunction hasAnimatedStyleValue(style) {\n for (const k in style) {\n const val = style[k];\n if (val && typeof val === \"object\" && \"_animation\" in val) {\n return true;\n }\n }\n return false;\n}\nconst isDisabled = (props) => {\n return props.disabled || props.passThrough || props.accessibilityState?.disabled || props[\"aria-disabled\"] || props.accessibilityDisabled || false;\n};\nexport {\n useComponentState\n};\n//# sourceMappingURL=useComponentState.js.map\n"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAM,0CAA0C,IAAI,IAAI;CAAC;CAAS;CAAS;AAAO,CAAC;AACnF,MAAM,gCAAgC,IAAI,IAAI,CAAC,OAAO,CAAC;AACvD,MAAM,mBAAmB;CACvB,QAAQ,KAAK,OAAO,KAAK,QAAQ,OAAO;EACtC,MAAM,OAAO,IAAI;EACjB,IAAI,CAAC,UAAU,SAAS,QAAQ,OAAO,KAAK,IAAI,KAAK,KAAK;EAC1D,KAAK,KAAK;CACZ;CACA,MAAM,KAAK,OAAO,KAAK,OAAO;EAC5B,MAAM,OAAO,IAAI;EACjB,KAAK,KAAK;EACV,IAAI,CAAC,OAAO,OAAO;EACnB,KAAK,IAAI,QAAQ,OAAO,SAAS,KAAK,SAAS;GAC7C,IAAI,UAAU,OAAO,KAAK,EAAE,CAAC,WAAW,KAAK,MAAM,IAAI;GACvD,IAAI,KAAK,EAAE,CAAC,IAAI,wBAAwB,KAAK,EAAE,CAAC,MAAM,OAAO,KAAK,CAAC,CAAC,GAAG;IACrE,KAAK,KAAK;GACZ;GACA,QAAQ,QAAQ;EAClB;EACA,OAAO;CACT;AACF;AACA,SAAS,gBAAgB,OAAO,QAAQ,WAAW,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G;IAAO,GAAG;GAAO;EACnC;CACF;CACA,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM;CAChC,IAAI,CAAC,YAAY;EACf,UAAU;CACZ,OAAO;EACL,IAAI,SAAS,YAAY;GACvB,MAAM,wBAAwB,cAAc;GAC5C,MAAM,sBAAsB,CAAC,aAAa,qBAAqB,WAAW,YAAY,KAAK,CAAC,MAAM;GAClG,MAAM,qBAAqB,oBAAoB,CAAC,MAAM;GACtD,IAEE,yBAAyB,gBAAgB,SAAS,sBAAsB,qBACxE;IACA,UAAU;IACV,IAAI,QAAQ,IAAI,aAAa,iBAAiB,MAAM,UAAU,WAAW;KACvE,IAAI,sBAAsB;MACxB;MACA;MACA;KACF,CAAC;IACH;GACF;EACF;CACF;CACA,OAAO;EACL,OAAO;EACP,mBAAmB,YAAY;EAC/B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;AACA,SAAS,sBAAsB,OAAO;CACpC,KAAK,MAAM,KAAK,OAAO;EACrB,MAAM,MAAM,MAAM;EAClB,IAAI,OAAO,OAAO,QAAQ,YAAY,gBAAgB,KAAK;GACzD,OAAO;EACT;CACF;CACA,OAAO;AACT;AACA,MAAM,cAAc,UAAU;CAC5B,OAAO,MAAM,YAAY,MAAM,eAAe,MAAM,oBAAoB,YAAY,MAAM,oBAAoB,MAAM,yBAAyB;AAC/I"}
1
+ {"version":3,"file":"useComponentState.js","names":[],"sources":["esm/hooks/useComponentState.js"],"sourcesContent":["import { getPlatformDriver, isServer, isWeb } from \"@tamagui/constants\";\nimport { stylePropsAll } from \"@tamagui/helpers\";\nimport {\n canonicalClauseModifier,\n scanFlatValue\n} from \"@tamagui/style-grammar/runtime\";\nimport { mergeIfNotShallowEqual } from \"@tamagui/is-equal-shallow\";\nimport { useDidFinishSSR, useIsClientOnly } from \"@tamagui/use-did-finish-ssr\";\nimport { useRef, useState } from \"react\";\nimport { getSetting } from \"../config\";\nimport { formatDiagnostic } from \"../helpers/formatDiagnostic\";\nimport { isOptimizedForFirstRender } from \"./isOptimizedForFirstRender\";\nimport {\n defaultComponentState,\n defaultComponentStateMounted,\n defaultComponentStateShouldEnter\n} from \"../defaultComponentState\";\nimport { isObj } from \"../helpers/isObj\";\nimport { log } from \"../helpers/log\";\nconst platformPseudoModifiers = /* @__PURE__ */ new Set([\"hover\", \"press\", \"focus\"]);\nconst enterModifier = /* @__PURE__ */ new Set([\"enter\"]);\nconst lifecycleHandler = {\n segment(ctx, start, end, isBase, valid) {\n const scan = ctx.flatScan;\n if (!isBase && valid && start < end && scan[3]) scan[2] = true;\n scan[3] = false;\n },\n chain(ctx, start, end, valid) {\n const scan = ctx.flatScan;\n scan[3] = false;\n if (!valid) return true;\n for (let index = start; index <= end; index++) {\n if (index !== end && scan[0].charCodeAt(index) !== 58) continue;\n if (scan[1].has(canonicalClauseModifier(scan[0].slice(start, index)))) {\n scan[3] = true;\n }\n start = index + 1;\n }\n return true;\n }\n};\nfunction hasFlatModifier(props, config, modifiers, ctx, variants) {\n const scan = ctx.flatScan ||= [\"\", enterModifier, false, false];\n for (const key in props) {\n const value = props[key];\n const isString = typeof value === \"string\";\n if (isString ? value.indexOf(\":\") === -1 : !value || typeof value !== \"object\") {\n continue;\n }\n const property = config.shorthands[key] || key;\n if (!(property in stylePropsAll) && property !== \"transition\" && // conditional variant props resolve style branches too, so their\n // lifecycle clauses drive the same decision\n !(variants && key in variants)) {\n continue;\n }\n if (!isString) {\n if (property === \"transition\") continue;\n for (const chain in value) {\n if (chain === \"default\" || value[chain] == null) continue;\n let start = 0;\n for (let index = 0; index <= chain.length; index++) {\n if (index !== chain.length && chain.charCodeAt(index) !== 58) continue;\n if (modifiers.has(canonicalClauseModifier(chain.slice(start, index)))) {\n return true;\n }\n start = index + 1;\n }\n }\n continue;\n }\n scan[0] = value;\n scan[1] = modifiers;\n scan[2] = false;\n scan[3] = false;\n scanFlatValue(value, lifecycleHandler, ctx);\n if (scan[2]) return true;\n }\n return false;\n}\nconst useComponentState = (props, animationDriver, staticConfig, config) => {\n \"use no memo\";\n const isHydrated = useDidFinishSSR();\n const needsHydration = !useIsClientOnly();\n const useAnimations = animationDriver?.isStub ? void 0 : animationDriver?.useAnimations;\n const { isHOC } = staticConfig;\n const stateRef = useRef(\n // performance: avoid creating object every render\n void 0\n );\n if (!stateRef.current) {\n stateRef.current = {\n startedUnhydrated: needsHydration && !isHydrated,\n optimizeForFirstRender: isOptimizedForFirstRender()\n };\n }\n const hasAnimationProp = Boolean(\n !isHOC && \"transition\" in props || props.style && hasAnimatedStyleValue(props.style)\n );\n const inputStyle = animationDriver?.inputStyle ?? \"css\";\n const outputStyle = animationDriver?.outputStyle ?? \"css\";\n const curStateRef = stateRef.current;\n if (!needsHydration && hasAnimationProp) {\n curStateRef.hasAnimated = true;\n }\n const platformPseudo = Boolean(\n !isHOC && useAnimations && animationDriver?.avoidReRenders && getPlatformDriver()?.pseudo && hasFlatModifier(\n props,\n config,\n platformPseudoModifiers,\n curStateRef,\n staticConfig.variants\n )\n );\n const willBeAnimatedClient = (() => {\n const next = !!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations);\n return Boolean(next || curStateRef.hasAnimated);\n })();\n const willBeAnimated = !isServer && willBeAnimatedClient;\n if (willBeAnimated && !curStateRef.hasAnimated) {\n curStateRef.hasAnimated = true;\n }\n const { disableClassName } = props;\n const presence = !isHOC && willBeAnimated && props[\"animatePresence\"] !== false && animationDriver?.usePresence?.() || null;\n const presenceState = presence?.[2];\n const isExiting = presenceState?.isPresent === false;\n const isEntering = presenceState?.isPresent === true && presenceState.initial !== false;\n const hasEnterStyle = hasFlatModifier(\n props,\n config,\n enterModifier,\n curStateRef,\n staticConfig.variants\n );\n const hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && (animationDriver?.isReactNative || inputStyle !== \"css\");\n const canImmediatelyEnter = hasEnterStyle || isEntering;\n const shouldEnter = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || // disableClassName doesnt work server side, only client, so needs hydrate\n // this is just for a better ux, supports css variables for light/dark, media queries, etc\n disableClassName);\n const initialState = shouldEnter ? (\n // on the very first render we switch all spring animation drivers to css rendering\n // this is because we need to use css variables, which they don't support to do proper SSR\n // without flickers of the wrong colors.\n // but once we do that initial hydration and we are in client side rendering mode,\n // we can avoid the extra re-render on mount\n canImmediatelyEnter ? defaultComponentStateShouldEnter : defaultComponentState\n ) : defaultComponentStateMounted;\n const disabled = isDisabled(props);\n if (disabled != null) {\n initialState.disabled = disabled;\n }\n const states = useState(initialState);\n const state = props.forceStyle ? { ...states[0], [props.forceStyle]: true } : states[0];\n const setState = states[1];\n let isAnimated = willBeAnimated;\n if (isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated) {\n isAnimated = false;\n curStateRef.willHydrate = true;\n }\n if (disabled !== state.disabled) {\n if (disabled) {\n Object.assign(state, defaultComponentStateMounted);\n }\n state.disabled = disabled;\n setState((_) => ({ ...state }));\n }\n const groupName = props.group;\n if (!stateRef.current.baseSetStateShallow) {\n const r = stateRef.current;\n r.baseSetStateShallow = (stateOrGetState) => {\n setState((prev) => {\n const next = typeof stateOrGetState === \"function\" ? stateOrGetState(prev) : stateOrGetState;\n const update = mergeIfNotShallowEqual(prev, next);\n if (process.env.NODE_ENV === \"development\") {\n const dbg = r.__debug;\n if (dbg && update !== prev) {\n console.groupCollapsed(`setStateShallow CHANGE`, \"=>\", update);\n console.info(`previously`, prev);\n console.trace();\n console.groupEnd();\n }\n }\n return update;\n });\n };\n }\n if (process.env.NODE_ENV === \"development\") {\n ;\n stateRef.current.__debug = props.debug;\n }\n const setStateShallow = stateRef.current.baseSetStateShallow;\n if (process.env.NODE_ENV === \"development\" && globalThis.time)\n globalThis.time`state-useCreateShallowSetState`;\n let outProps = props;\n if (presenceState && isAnimated && isHydrated && staticConfig.variants) {\n if (process.env.NODE_ENV === \"development\" && props.debug === \"verbose\") {\n console.warn(\n formatDiagnostic(\n \"TAMAGUI_PRESENCE_STATE\",\n staticConfig.Component?.displayName || staticConfig.Component?.name || \"TamaguiComponent\",\n \"AnimatePresence supplied lifecycle state to an animated component\",\n 'Remove debug=\"verbose\" after inspecting the animation state',\n \"presenceState\",\n presenceState\n )\n );\n }\n const { custom } = presenceState;\n if (isObj(custom)) {\n outProps = { ...props, ...custom };\n }\n }\n let noClass = !isWeb || !!props.forceStyle;\n if (!isHydrated) {\n noClass = false;\n } else {\n if (isWeb && isHydrated) {\n const isAnimatedAndHydrated = isAnimated && isHydrated;\n const isClassNameDisabled = !staticConfig.acceptsClassName && (getSetting(\"disableSSR\") || !state.unmounted);\n const isDisabledManually = disableClassName && !state.unmounted;\n if (\n // Only disable className for animation drivers that output inline styles (not css)\n isAnimatedAndHydrated && outputStyle !== \"css\" || isDisabledManually || isClassNameDisabled\n ) {\n noClass = true;\n if (process.env.NODE_ENV === \"development\" && props.debug === \"verbose\") {\n log(`avoiding className`, {\n isAnimatedAndHydrated,\n isDisabledManually,\n isClassNameDisabled\n });\n }\n }\n }\n }\n return {\n props: outProps,\n startedUnhydrated: curStateRef.startedUnhydrated,\n curStateRef,\n disabled,\n groupName,\n hasAnimationProp,\n hasEnterStyle,\n isAnimated,\n isExiting,\n isHydrated,\n presence,\n presenceState,\n setState,\n setStateShallow,\n noClass,\n state,\n stateRef,\n inputStyle,\n outputStyle,\n willBeAnimated,\n willBeAnimatedClient,\n platformPseudo\n };\n};\nfunction hasAnimatedStyleValue(style) {\n for (const k in style) {\n const val = style[k];\n if (val && typeof val === \"object\" && \"_animation\" in val) {\n return true;\n }\n }\n return false;\n}\nconst isDisabled = (props) => {\n return props.disabled || props.passThrough || props.accessibilityState?.disabled || props[\"aria-disabled\"] || props.accessibilityDisabled || false;\n};\nexport {\n useComponentState\n};\n//# sourceMappingURL=useComponentState.js.map\n"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAM,0CAA0C,IAAI,IAAI;CAAC;CAAS;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OAAO;EACP,mBAAmB,YAAY;EAC/B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;AACA,SAAS,sBAAsB,OAAO;CACpC,KAAK,MAAM,KAAK,OAAO;EACrB,MAAM,MAAM,MAAM;EAClB,IAAI,OAAO,OAAO,QAAQ,YAAY,gBAAgB,KAAK;GACzD,OAAO;EACT;CACF;CACA,OAAO;AACT;AACA,MAAM,cAAc,UAAU;CAC5B,OAAO,MAAM,YAAY,MAAM,eAAe,MAAM,oBAAoB,YAAY,MAAM,oBAAoB,MAAM,yBAAyB;AAC/I"}
@@ -41,7 +41,7 @@ var lifecycleHandler = {
41
41
  return true;
42
42
  }
43
43
  };
44
- function hasFlatModifier(props, config, modifiers, ctx) {
44
+ function hasFlatModifier(props, config, modifiers, ctx, variants) {
45
45
  var _ctx;
46
46
  var scan = (_ctx = ctx).flatScan || (_ctx.flatScan = [
47
47
  "",
@@ -56,7 +56,9 @@ function hasFlatModifier(props, config, modifiers, ctx) {
56
56
  continue;
57
57
  }
58
58
  var property = config.shorthands[key] || key;
59
- if (!(property in stylePropsAll) && property !== "transition") continue;
59
+ if (!(property in stylePropsAll) && property !== "transition" && !(variants && key in variants)) {
60
+ continue;
61
+ }
60
62
  if (!isString) {
61
63
  if (property === "transition") continue;
62
64
  for (var chain in value) {
@@ -104,7 +106,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
104
106
  if (!needsHydration && hasAnimationProp) {
105
107
  curStateRef.hasAnimated = true;
106
108
  }
107
- var platformPseudo = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) && hasFlatModifier(props, config, platformPseudoModifiers, curStateRef));
109
+ var platformPseudo = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) && hasFlatModifier(props, config, platformPseudoModifiers, curStateRef, staticConfig.variants));
108
110
  var willBeAnimatedClient = (function() {
109
111
  var next = !!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations);
110
112
  return Boolean(next || curStateRef.hasAnimated);
@@ -118,7 +120,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
118
120
  var presenceState = presence === null || presence === void 0 ? void 0 : presence[2];
119
121
  var isExiting = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === false;
120
122
  var isEntering = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === true && presenceState.initial !== false;
121
- var hasEnterStyle = hasFlatModifier(props, config, enterModifier, curStateRef);
123
+ var hasEnterStyle = hasFlatModifier(props, config, enterModifier, curStateRef, staticConfig.variants);
122
124
  var hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isReactNative) || inputStyle !== "css");
123
125
  var canImmediatelyEnter = hasEnterStyle || isEntering;
124
126
  var shouldEnter = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || disableClassName);