@tamagui/web 3.0.0-beta.661.1 → 3.0.0-beta.669.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 (127) hide show
  1. package/dist/cjs/createComponent.cjs +1 -1
  2. package/dist/cjs/createComponent.native.cjs +1 -1
  3. package/dist/cjs/createComponent.native.js +1 -1
  4. package/dist/cjs/createComponent.native.js.map +1 -1
  5. package/dist/cjs/createTamagui.cjs +1 -1
  6. package/dist/cjs/createTamagui.native.cjs +1 -1
  7. package/dist/cjs/createTamagui.native.js +1 -1
  8. package/dist/cjs/createTamagui.native.js.map +1 -1
  9. package/dist/cjs/helpers/directStyle.cjs +12 -12
  10. package/dist/cjs/helpers/directStyle.native.cjs +12 -12
  11. package/dist/cjs/helpers/directStyle.native.js +12 -12
  12. package/dist/cjs/helpers/directStyle.native.js.map +1 -1
  13. package/dist/cjs/helpers/formatDiagnostic.cjs +3 -0
  14. package/dist/cjs/helpers/formatDiagnostic.native.cjs +3 -0
  15. package/dist/cjs/helpers/formatDiagnostic.native.js +3 -0
  16. package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
  17. package/dist/cjs/helpers/getSplitStyles.cjs +2 -2
  18. package/dist/cjs/helpers/getSplitStyles.native.cjs +2 -2
  19. package/dist/cjs/helpers/getSplitStyles.native.js +2 -2
  20. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  21. package/dist/cjs/helpers/mergeVariants.cjs +1 -1
  22. package/dist/cjs/helpers/mergeVariants.native.cjs +1 -1
  23. package/dist/cjs/helpers/mergeVariants.native.js +1 -1
  24. package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
  25. package/dist/cjs/helpers/propMapper.cjs +2 -2
  26. package/dist/cjs/helpers/propMapper.native.cjs +2 -2
  27. package/dist/cjs/helpers/propMapper.native.js +2 -2
  28. package/dist/cjs/helpers/propMapper.native.js.map +1 -1
  29. package/dist/cjs/hooks/getThemeProxied.native.cjs +1 -1
  30. package/dist/cjs/hooks/getThemeProxied.native.js +1 -1
  31. package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
  32. package/dist/cjs/hooks/useComponentState.cjs +2 -2
  33. package/dist/cjs/hooks/useComponentState.native.cjs +2 -2
  34. package/dist/cjs/hooks/useComponentState.native.js +2 -2
  35. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  36. package/dist/cjs/hooks/useProps.cjs +1 -1
  37. package/dist/cjs/hooks/useProps.native.cjs +1 -1
  38. package/dist/cjs/hooks/useProps.native.js +1 -1
  39. package/dist/cjs/hooks/useProps.native.js.map +1 -1
  40. package/dist/cjs/hooks/useThemeState.cjs +2 -2
  41. package/dist/cjs/hooks/useThemeState.native.cjs +2 -2
  42. package/dist/cjs/hooks/useThemeState.native.js +2 -2
  43. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  44. package/dist/cjs/internal-runtime.cjs +3 -1
  45. package/dist/cjs/internal-runtime.native.cjs +3 -1
  46. package/dist/cjs/internal-runtime.native.js +3 -1
  47. package/dist/cjs/internal-runtime.native.js.map +1 -1
  48. package/dist/cjs/views/Theme.cjs +1 -1
  49. package/dist/cjs/views/Theme.native.cjs +1 -1
  50. package/dist/cjs/views/Theme.native.js +1 -1
  51. package/dist/cjs/views/Theme.native.js.map +1 -1
  52. package/dist/esm/createComponent.mjs +1 -1
  53. package/dist/esm/createComponent.mjs.map +1 -1
  54. package/dist/esm/createComponent.native.js +1 -1
  55. package/dist/esm/createComponent.native.js.map +1 -1
  56. package/dist/esm/createTamagui.mjs +1 -1
  57. package/dist/esm/createTamagui.mjs.map +1 -1
  58. package/dist/esm/createTamagui.native.js +1 -1
  59. package/dist/esm/createTamagui.native.js.map +1 -1
  60. package/dist/esm/helpers/directStyle.mjs +13 -13
  61. package/dist/esm/helpers/directStyle.mjs.map +1 -1
  62. package/dist/esm/helpers/directStyle.native.js +13 -13
  63. package/dist/esm/helpers/directStyle.native.js.map +1 -1
  64. package/dist/esm/helpers/formatDiagnostic.mjs +3 -0
  65. package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
  66. package/dist/esm/helpers/formatDiagnostic.native.js +3 -0
  67. package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
  68. package/dist/esm/helpers/getSplitStyles.mjs +2 -2
  69. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  70. package/dist/esm/helpers/getSplitStyles.native.js +2 -2
  71. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  72. package/dist/esm/helpers/mergeVariants.mjs +1 -1
  73. package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
  74. package/dist/esm/helpers/mergeVariants.native.js +1 -1
  75. package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
  76. package/dist/esm/helpers/propMapper.mjs +2 -2
  77. package/dist/esm/helpers/propMapper.mjs.map +1 -1
  78. package/dist/esm/helpers/propMapper.native.js +2 -2
  79. package/dist/esm/helpers/propMapper.native.js.map +1 -1
  80. package/dist/esm/hooks/getThemeProxied.native.js +1 -1
  81. package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
  82. package/dist/esm/hooks/useComponentState.mjs +2 -2
  83. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  84. package/dist/esm/hooks/useComponentState.native.js +2 -2
  85. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  86. package/dist/esm/hooks/useProps.mjs +1 -1
  87. package/dist/esm/hooks/useProps.mjs.map +1 -1
  88. package/dist/esm/hooks/useProps.native.js +1 -1
  89. package/dist/esm/hooks/useProps.native.js.map +1 -1
  90. package/dist/esm/hooks/useThemeState.mjs +2 -2
  91. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  92. package/dist/esm/hooks/useThemeState.native.js +2 -2
  93. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  94. package/dist/esm/internal-runtime.mjs +3 -1
  95. package/dist/esm/internal-runtime.mjs.map +1 -1
  96. package/dist/esm/internal-runtime.native.js +3 -1
  97. package/dist/esm/internal-runtime.native.js.map +1 -1
  98. package/dist/esm/views/Theme.mjs +1 -1
  99. package/dist/esm/views/Theme.mjs.map +1 -1
  100. package/dist/esm/views/Theme.native.js +2 -1
  101. package/dist/esm/views/Theme.native.js.map +1 -1
  102. package/package.json +15 -15
  103. package/src/createComponent.tsx +4 -1
  104. package/src/createTamagui.ts +6 -1
  105. package/src/helpers/directStyle.ts +23 -12
  106. package/src/helpers/formatDiagnostic.ts +3 -0
  107. package/src/helpers/getSplitStyles.tsx +8 -2
  108. package/src/helpers/mergeVariants.ts +3 -1
  109. package/src/helpers/propMapper.ts +6 -1
  110. package/src/hooks/getThemeProxied.ts +4 -3
  111. package/src/hooks/useComponentState.ts +4 -1
  112. package/src/hooks/useProps.tsx +4 -1
  113. package/src/hooks/useThemeState.ts +8 -2
  114. package/src/internal-runtime.ts +8 -1
  115. package/src/views/Theme.tsx +4 -1
  116. package/types/createComponent.d.ts.map +1 -1
  117. package/types/helpers/directStyle.d.ts.map +1 -1
  118. package/types/helpers/formatDiagnostic.d.ts.map +1 -1
  119. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  120. package/types/helpers/mergeVariants.d.ts.map +1 -1
  121. package/types/helpers/propMapper.d.ts.map +1 -1
  122. package/types/hooks/getThemeProxied.d.ts.map +1 -1
  123. package/types/hooks/useComponentState.d.ts.map +1 -1
  124. package/types/hooks/useProps.d.ts.map +1 -1
  125. package/types/hooks/useThemeState.d.ts.map +1 -1
  126. package/types/internal-runtime.d.ts.map +1 -1
  127. package/types/views/Theme.d.ts.map +1 -1
@@ -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 { getCondition } 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 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 starts = [];\n\t\tvar ends = [];\n\t\tvar modifiers = [];\n\t\tvar pendingModifier;\n\t\tvar sawClause = false;\n\t\tvar refused = false;\n\t\tscanFlatValue(value, {\n\t\t\tsegment(start, end, isBase) {\n\t\t\t\tif (start === end) {\n\t\t\t\t\tif (!isBase) refused = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tstarts.push(start);\n\t\t\t\tends.push(end);\n\t\t\t\tmodifiers.push(pendingModifier);\n\t\t\t},\n\t\t\tchain(start, end) {\n\t\t\t\tif (refused) return false;\n\t\t\t\tvar source = value.slice(start, end);\n\t\t\t\tif (!getCondition(styleState, source)) {\n\t\t\t\t\trefused = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tpendingModifier = source;\n\t\t\t\tsawClause = true;\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\terror() {\n\t\t\t\trefused = true;\n\t\t\t}\n\t\t});\n\t\tif (refused) return [];\n\t\tif (sawClause) {\n\t\t\tvar entries;\n\t\t\tfor (var index = 0; index < starts.length; index++) {\n\t\t\t\tvar resolved = resolveVariantValue(key, value.slice(starts[index], ends[index]), styleProps, styleState, parentVariantKey);\n\t\t\t\tif (!resolved) continue;\n\t\t\t\tentries || (entries = []);\n\t\t\t\tvar modifier = modifiers[index];\n\t\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator = resolved[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar entry = _step.value;\n\t\t\t\t\t\tif (modifier !== void 0) entry[3] = modifier;\n\t\t\t\t\t\tentries.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t_iteratorError = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn entries || [];\n\t\t}\n\t}\n\treturn resolveVariantValue(key, value, styleProps, styleState, parentVariantKey);\n};\nvar resolveVariantValue = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar { staticConfig, conf, debug } = styleState;\n\tvar { variants } = staticConfig;\n\tif (!variants) return;\n\tvar variant = variants[key];\n\tvar variantValue = getVariantDefinition(variant, value, conf, styleState);\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") {\n\t\tconsole.groupCollapsed(`\\u2666\\uFE0F\\u2666\\uFE0F\\u2666\\uFE0F resolve variant ${key}`);\n\t\tconsole.info({\n\t\t\tkey,\n\t\t\tvalue,\n\t\t\tvariantValue,\n\t\t\tvariants\n\t\t});\n\t\tconsole.groupEnd();\n\t}\n\tif (!variantValue) {\n\t\tif (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === \"1\") {\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tvar name = styleState.styleProps.displayName || \"[UnnamedComponent]\";\n\t\t\t\tconsole.warn(`No variant found: ${name} has variant \"${key}\", but no matching value \"${value}\"`);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tif (typeof variantValue === \"function\") {\n\t\tvariantValue = variantValue(value, getVariantExtras(styleState));\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\" && false);\n\t}\n\tvar fontFamilyResult;\n\tif (isObj(variantValue)) {\n\t\tvar fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];\n\t\tif (fontFamilyUpdate) {\n\t\t\tfontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf);\n\t\t\tstyleState.fontFamily = fontFamilyResult;\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` updating font family`, fontFamilyResult);\n\t\t}\n\t\tvariantValue = resolveTokensAndVariants(key, variantValue, styleProps, styleState, parentVariantKey);\n\t}\n\tif (variantValue) {\n\t\tvar expanded = normalizeStyle(variantValue, !!styleProps.noNormalize);\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` expanding styles from `, variantValue, `to`, expanded);\n\t\tvar originalValues = styleOriginalValues.get(expanded);\n\t\tvar next = [];\n\t\tfor (var _$key in expanded) next.push([\n\t\t\t_$key,\n\t\t\texpanded[_$key],\n\t\t\toriginalValues === null || originalValues === void 0 ? void 0 : originalValues[_$key]\n\t\t]);\n\t\treturn next;\n\t}\n};\nfunction getFontFamilyFromNameOrVariable(input, conf) {\n\tif (isVariable(input)) {\n\t\tvar val = variableToFontNameCache.get(input);\n\t\tif (val) return val;\n\t\tfor (var key in conf.fontsParsed) {\n\t\t\tvar familyVariable = conf.fontsParsed[key].family;\n\t\t\tif (isVariable(familyVariable)) {\n\t\t\t\tvariableToFontNameCache.set(familyVariable, key);\n\t\t\t\tif (familyVariable === input) return key;\n\t\t\t}\n\t\t}\n\t} else if (typeof input === \"string\" && input in conf.fontsParsed) return input;\n}\nvar variableToFontNameCache = /* @__PURE__ */ new WeakMap();\nvar resolveTokensAndVariants = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar { conf, staticConfig, debug } = styleState;\n\tvar { variants } = staticConfig;\n\tvar res = {};\n\tvar originalValues;\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` - resolveTokensAndVariants`, key, value);\n\tfor (var _key in value) {\n\t\tvar subKey = conf.shorthands[_key] || _key;\n\t\tvar val = value[_key];\n\t\tif (!styleProps.noSkip && subKey in skipProps) continue;\n\t\toriginalValues || (originalValues = {});\n\t\toriginalValues[subKey] = val;\n\t\tif (staticConfig) {\n\t\t\tvar _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, _staticConfig_parentStaticConfig1, _staticConfig_parentStaticConfig2, _staticConfig_context_propKeys, _staticConfig_context1, _staticConfig_parentStaticConfig_context_propKeys, _staticConfig_parentStaticConfig_context1, _staticConfig_parentStaticConfig3;\n\t\t\tvar contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);\n\t\t\tvar inheritedContextPropKeys = !staticConfig.context || staticConfig.context === ((_staticConfig_parentStaticConfig1 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig1 === void 0 ? void 0 : _staticConfig_parentStaticConfig1.context) ? (_staticConfig_parentStaticConfig2 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig2 === void 0 ? void 0 : _staticConfig_parentStaticConfig2.contextProps : void 0;\n\t\t\tvar contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;\n\t\t\tif (contextProps && subKey in contextProps || (contextPropKeys === null || contextPropKeys === void 0 ? void 0 : contextPropKeys.includes(subKey)) || ((_staticConfig_context1 = staticConfig.context) === null || _staticConfig_context1 === void 0 ? void 0 : (_staticConfig_context_propKeys = _staticConfig_context1.propKeys) === null || _staticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_context_propKeys.includes(subKey)) || ((_staticConfig_parentStaticConfig3 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig3 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context1 = _staticConfig_parentStaticConfig3.context) === null || _staticConfig_parentStaticConfig_context1 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context_propKeys = _staticConfig_parentStaticConfig_context1.propKeys) === null || _staticConfig_parentStaticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_parentStaticConfig_context_propKeys.includes(subKey))) {\n\t\t\t\tvar _styleState, _styleState1;\n\t\t\t\t(_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});\n\t\t\t\tstyleState.overriddenContextProps[subKey] = val;\n\t\t\t\t(_styleState1 = styleState).originalContextPropValues || (_styleState1.originalContextPropValues = {});\n\t\t\t\tstyleState.originalContextPropValues[subKey] = val;\n\t\t\t}\n\t\t}\n\t\tif (styleProps.noExpand) res[subKey] = val;\n\t\telse if (variants && subKey in variants) {\n\t\t\tif (parentVariantKey && parentVariantKey === key) res[subKey] = val;\n\t\t\telse {\n\t\t\t\tvar variantOut = resolveVariants(subKey, val, styleProps, styleState, key);\n\t\t\t\tif (variantOut) {\n\t\t\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator = variantOut[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\t\tvar [_$key, val1, originalVal, conditionSource] = _step.value;\n\t\t\t\t\t\t\tif (val1 == null) continue;\n\t\t\t\t\t\t\tif (conditionSource !== void 0) {\n\t\t\t\t\t\t\t\tvar appended = appendFlatClause(res[_$key], conditionSource, val1);\n\t\t\t\t\t\t\t\tif (appended === void 0) {\n\t\t\t\t\t\t\t\t\tif (process.env.NODE_ENV === \"development\") console.warn(`[tamagui] conditional variant value for \"${_$key}\" is not string-representable; dropping the clause`);\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tres[_$key] = appended;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tres[_$key] = val1;\n\t\t\t\t\t\t\tif (originalVal !== void 0) {\n\t\t\t\t\t\t\t\toriginalValues || (originalValues = {});\n\t\t\t\t\t\t\t\toriginalValues[_$key] = originalVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t\t_iteratorError = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (isVariable(val)) {\n\t\t\tres[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`variable`, subKey, res[subKey]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof val === \"string\") {\n\t\t\tres[subKey] = isRemValue(val) ? resolveRem(val) : val;\n\t\t\tcontinue;\n\t\t}\n\t\tif (isObj(val)) {\n\t\t\tvar _res, _subKey;\n\t\t\tvar subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`object`, subKey, subObject);\n\t\t\tvar _;\n\t\t\t(_ = (_res = res)[_subKey = subKey]) !== null && _ !== void 0 || (_res[_subKey] = {});\n\t\t\tObject.assign(res[subKey], subObject);\n\t\t\tvar subOriginalValues = styleOriginalValues.get(subObject);\n\t\t\tif (subOriginalValues) {\n\t\t\t\tvar existing = styleOriginalValues.get(res[subKey]);\n\t\t\t\tif (existing) Object.assign(existing, subOriginalValues);\n\t\t\t\telse styleOriginalValues.set(res[subKey], { ...subOriginalValues });\n\t\t\t}\n\t\t} else res[subKey] = val;\n\t}\n\tif (originalValues) styleOriginalValues.set(res, originalValues);\n\treturn res;\n};\nfunction getVariantDefinition(variant, value, conf, param) {\n\tvar { theme } = param;\n\tif (!variant) return;\n\tif (value === void 0) return;\n\tif (typeof variant === \"function\") return variant;\n\tif (Object.prototype.hasOwnProperty.call(variant, value)) return variant[value];\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = getCompiledVariantResolvers(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar { key, parts } = _step.value;\n\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator1 = parts[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\tvar part = _step1.value;\n\t\t\t\t\tif (matchesVariantResolver(part, value, conf, theme)) return variant[key];\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t_iteratorError1 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n}\nvar variantResolverNameSet = new Set(variantResolverNames);\nvar variantResolverCache = /* @__PURE__ */ new WeakMap();\nfunction getCompiledVariantResolvers(variant) {\n\tvar cached = variantResolverCache.get(variant);\n\tif (cached) return cached;\n\tvar compiled = [];\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = Object.keys(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar key = _step.value;\n\t\t\tvar parts = parseVariantResolverKey(key);\n\t\t\tif (parts) compiled.push({\n\t\t\t\tkey,\n\t\t\t\tparts\n\t\t\t});\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\tvariantResolverCache.set(variant, compiled);\n\treturn compiled;\n}\nfunction parseVariantResolverKey(key) {\n\tif (!key) return null;\n\tvar parts = key.split(\"|\").map(function(part2) {\n\t\treturn part2.trim();\n\t});\n\tif (!parts.length) return null;\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar part = _step.value;\n\t\t\tif (!variantResolverNameSet.has(part)) return null;\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\treturn parts;\n}\nvar numberStringPattern = /[+-]?(?:(?:\\d+\\.?\\d*)|(?:\\.\\d+))(?:[eE][+-]?\\d+)?|[+-]?0[xX][\\da-fA-F]+|[+-]?0[bB][01]+|[+-]?0[oO][0-7]+/;\nvar remStringPattern = new RegExp(`^(?:${numberStringPattern.source})rem$`);\nvar viewportValuePattern = new RegExp(`^(?:${numberStringPattern.source})(vw|dvw|lvw|svw|vh|dvh|lvh|svh)$`);\nfunction isAllowedStyleValue(category, value, conf, string, number, rem) {\n\tvar hasSetting = Object.prototype.hasOwnProperty.call(conf.settings, \"allowedStyleValues\");\n\tvar configured = conf.settings.allowedStyleValues;\n\tvar setting = configured && (typeof configured === \"undefined\" ? \"undefined\" : _type_of(configured)) === \"object\" ? configured[category] : configured;\n\tvar web = value === \"unset\" || value === \"inherit\" || string && /^var\\(.*\\)$/.test(value) || (category === \"size\" || category === \"space\") && (value === \"max-content\" || value === \"min-content\" || string && (viewportValuePattern.test(value) || /^(calc|min|max)\\(.*\\)$/.test(value)));\n\tvar somewhat = category === \"size\" || category === \"space\" ? value === \"auto\" || number || rem || string && value.endsWith(\"%\") : number;\n\tif (setting === \"strict\") return false;\n\tif (setting === \"strict-web\") return web;\n\tif (setting === \"somewhat-strict\") return somewhat;\n\tif (setting === \"somewhat-strict-web\") return somewhat || web;\n\treturn number || string && (category === \"size\" || category === \"space\" || !hasSetting);\n}\nfunction matchesVariantResolver(resolverName, value, conf, theme) {\n\tvar string = typeof value === \"string\";\n\tvar number = typeof value === \"number\";\n\tvar rem = string && remStringPattern.test(value);\n\tswitch (resolverName) {\n\t\tcase \"Size\":\n\t\tcase \"Space\":\n\t\tcase \"Radius\":\n\t\tcase \"ZIndex\":\n\t\t\tvar category = resolverName === \"ZIndex\" ? \"zIndex\" : resolverName.toLowerCase();\n\t\t\treturn value === true || value != null && value in conf.tokensParsed[category] || (resolverName === \"Space\" || resolverName === \"Radius\" || resolverName === \"ZIndex\") && isVariable(value) || (resolverName === \"Radius\" || resolverName === \"ZIndex\") && (number || rem) || isAllowedStyleValue(category, value, conf, string, number, rem);\n\t\tcase \"Color\": return value != null && value in conf.tokensParsed.color || string;\n\t\tcase \"Theme\": return string && !!theme && value in theme;\n\t\tcase \"FontSize\":\n\t\t\tvar _conf_fontsParsed_body_size, _conf_fontsParsed_body;\n\t\t\treturn value === true || !!((_conf_fontsParsed_body = conf.fontsParsed.body) === null || _conf_fontsParsed_body === void 0 ? void 0 : (_conf_fontsParsed_body_size = _conf_fontsParsed_body.size) === null || _conf_fontsParsed_body_size === void 0 ? void 0 : _conf_fontsParsed_body_size[value]) || number || rem;\n\t\tcase \"FontStyle\":\n\t\t\tvar _conf_fontsParsed_body_style, _conf_fontsParsed_body1;\n\t\t\treturn !!((_conf_fontsParsed_body1 = conf.fontsParsed.body) === null || _conf_fontsParsed_body1 === void 0 ? void 0 : (_conf_fontsParsed_body_style = _conf_fontsParsed_body1.style) === null || _conf_fontsParsed_body_style === void 0 ? void 0 : _conf_fontsParsed_body_style[value]) || value === \"normal\" || value === \"italic\";\n\t\tcase \"FontTransform\":\n\t\t\tvar _conf_fontsParsed_body_transform, _conf_fontsParsed_body2;\n\t\t\treturn !!((_conf_fontsParsed_body2 = conf.fontsParsed.body) === null || _conf_fontsParsed_body2 === void 0 ? void 0 : (_conf_fontsParsed_body_transform = _conf_fontsParsed_body2.transform) === null || _conf_fontsParsed_body_transform === void 0 ? void 0 : _conf_fontsParsed_body_transform[value]) || value === \"none\" || value === \"capitalize\" || value === \"uppercase\" || value === \"lowercase\";\n\t\tcase \"FontLineHeight\":\n\t\t\tvar _conf_fontsParsed_body_lineHeight, _conf_fontsParsed_body3;\n\t\t\treturn !!((_conf_fontsParsed_body3 = conf.fontsParsed.body) === null || _conf_fontsParsed_body3 === void 0 ? void 0 : (_conf_fontsParsed_body_lineHeight = _conf_fontsParsed_body3.lineHeight) === null || _conf_fontsParsed_body_lineHeight === void 0 ? void 0 : _conf_fontsParsed_body_lineHeight[value]) || number || rem;\n\t\tcase \"FontLetterSpacing\":\n\t\t\tvar _conf_fontsParsed_body_letterSpacing, _conf_fontsParsed_body4;\n\t\t\treturn !!((_conf_fontsParsed_body4 = conf.fontsParsed.body) === null || _conf_fontsParsed_body4 === void 0 ? void 0 : (_conf_fontsParsed_body_letterSpacing = _conf_fontsParsed_body4.letterSpacing) === null || _conf_fontsParsed_body_letterSpacing === void 0 ? void 0 : _conf_fontsParsed_body_letterSpacing[value]) || number || rem;\n\t\tcase \"number\":\n\t\tcase \"string\":\n\t\tcase \"boolean\": return (typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === resolverName;\n\t\tcase \"any\": return true;\n\t}\n}\n\nexport { appendFlatClause, getFontFamilyFromNameOrVariable, propMapper };"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,SAAS,SAAS,KAAK;CACtB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAC/F;AACA,SAAS,iBAAiB,MAAM,iBAAiB,OAAO;CACvD,IAAI,QAAQ,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;CAC1E,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;CAC5D,OAAO,QAAQ,OAAO,GAAG,gBAAgB,GAAG,UAAU,GAAG,KAAK,GAAG,gBAAgB,GAAG;AACrF;AACA,IAAI,aAAa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"],"sourcesContent":["import { isAndroid } from \"@tamagui/constants\";\nimport { scanFlatValue } from \"@tamagui/style-grammar/runtime\";\nimport { isVariable } from \"../createVariable\";\nimport { variantResolverNames } from \"../types\";\nimport { getCondition } 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 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 (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== \"disabled\" && 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 (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== \"disabled\" && typeof value === \"string\" && value.indexOf(\":\") !== -1 && !(variantDefinition && (typeof variantDefinition === \"undefined\" ? \"undefined\" : _type_of(variantDefinition)) === \"object\" && value in variantDefinition)) {\n\t\tvar starts = [];\n\t\tvar ends = [];\n\t\tvar modifiers = [];\n\t\tvar pendingModifier;\n\t\tvar sawClause = false;\n\t\tvar refused = false;\n\t\tscanFlatValue(value, {\n\t\t\tsegment(start, end, isBase) {\n\t\t\t\tif (start === end) {\n\t\t\t\t\tif (!isBase) refused = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tstarts.push(start);\n\t\t\t\tends.push(end);\n\t\t\t\tmodifiers.push(pendingModifier);\n\t\t\t},\n\t\t\tchain(start, end) {\n\t\t\t\tif (refused) return false;\n\t\t\t\tvar source = value.slice(start, end);\n\t\t\t\tif (!getCondition(styleState, source)) {\n\t\t\t\t\trefused = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tpendingModifier = source;\n\t\t\t\tsawClause = true;\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\terror() {\n\t\t\t\trefused = true;\n\t\t\t}\n\t\t});\n\t\tif (refused) return [];\n\t\tif (sawClause) {\n\t\t\tvar entries;\n\t\t\tfor (var index = 0; index < starts.length; index++) {\n\t\t\t\tvar resolved = resolveVariantValue(key, value.slice(starts[index], ends[index]), styleProps, styleState, parentVariantKey);\n\t\t\t\tif (!resolved) continue;\n\t\t\t\tentries || (entries = []);\n\t\t\t\tvar modifier = modifiers[index];\n\t\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator = resolved[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar entry = _step.value;\n\t\t\t\t\t\tif (modifier !== void 0) entry[3] = modifier;\n\t\t\t\t\t\tentries.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t_iteratorError = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn entries || [];\n\t\t}\n\t}\n\treturn resolveVariantValue(key, value, styleProps, styleState, parentVariantKey);\n};\nvar resolveVariantValue = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar { staticConfig, conf, debug } = styleState;\n\tvar { variants } = staticConfig;\n\tif (!variants) return;\n\tvar variant = variants[key];\n\tvar variantValue = getVariantDefinition(variant, value, conf, styleState);\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") {\n\t\tconsole.groupCollapsed(`\\u2666\\uFE0F\\u2666\\uFE0F\\u2666\\uFE0F resolve variant ${key}`);\n\t\tconsole.info({\n\t\t\tkey,\n\t\t\tvalue,\n\t\t\tvariantValue,\n\t\t\tvariants\n\t\t});\n\t\tconsole.groupEnd();\n\t}\n\tif (!variantValue) {\n\t\tif (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === \"1\") {\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tvar name = styleState.styleProps.displayName || \"[UnnamedComponent]\";\n\t\t\t\tconsole.warn(`No variant found: ${name} has variant \"${key}\", but no matching value \"${value}\"`);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tif (typeof variantValue === \"function\") {\n\t\tvariantValue = variantValue(value, getVariantExtras(styleState));\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\" && false);\n\t}\n\tvar fontFamilyResult;\n\tif (isObj(variantValue)) {\n\t\tvar fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];\n\t\tif (fontFamilyUpdate) {\n\t\t\tfontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf);\n\t\t\tstyleState.fontFamily = fontFamilyResult;\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` updating font family`, fontFamilyResult);\n\t\t}\n\t\tvariantValue = resolveTokensAndVariants(key, variantValue, styleProps, styleState, parentVariantKey);\n\t}\n\tif (variantValue) {\n\t\tvar expanded = normalizeStyle(variantValue, !!styleProps.noNormalize);\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` expanding styles from `, variantValue, `to`, expanded);\n\t\tvar originalValues = styleOriginalValues.get(expanded);\n\t\tvar next = [];\n\t\tfor (var _$key in expanded) next.push([\n\t\t\t_$key,\n\t\t\texpanded[_$key],\n\t\t\toriginalValues === null || originalValues === void 0 ? void 0 : originalValues[_$key]\n\t\t]);\n\t\treturn next;\n\t}\n};\nfunction getFontFamilyFromNameOrVariable(input, conf) {\n\tif (isVariable(input)) {\n\t\tvar val = variableToFontNameCache.get(input);\n\t\tif (val) return val;\n\t\tfor (var key in conf.fontsParsed) {\n\t\t\tvar familyVariable = conf.fontsParsed[key].family;\n\t\t\tif (isVariable(familyVariable)) {\n\t\t\t\tvariableToFontNameCache.set(familyVariable, key);\n\t\t\t\tif (familyVariable === input) return key;\n\t\t\t}\n\t\t}\n\t} else if (typeof input === \"string\" && input in conf.fontsParsed) return input;\n}\nvar variableToFontNameCache = /* @__PURE__ */ new WeakMap();\nvar resolveTokensAndVariants = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar { conf, staticConfig, debug } = styleState;\n\tvar { variants } = staticConfig;\n\tvar res = {};\n\tvar originalValues;\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` - resolveTokensAndVariants`, key, value);\n\tfor (var _key in value) {\n\t\tvar subKey = conf.shorthands[_key] || _key;\n\t\tvar val = value[_key];\n\t\tif (!styleProps.noSkip && subKey in skipProps) continue;\n\t\toriginalValues || (originalValues = {});\n\t\toriginalValues[subKey] = val;\n\t\tif (staticConfig) {\n\t\t\tvar _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, _staticConfig_parentStaticConfig1, _staticConfig_parentStaticConfig2, _staticConfig_context_propKeys, _staticConfig_context1, _staticConfig_parentStaticConfig_context_propKeys, _staticConfig_parentStaticConfig_context1, _staticConfig_parentStaticConfig3;\n\t\t\tvar contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);\n\t\t\tvar inheritedContextPropKeys = !staticConfig.context || staticConfig.context === ((_staticConfig_parentStaticConfig1 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig1 === void 0 ? void 0 : _staticConfig_parentStaticConfig1.context) ? (_staticConfig_parentStaticConfig2 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig2 === void 0 ? void 0 : _staticConfig_parentStaticConfig2.contextProps : void 0;\n\t\t\tvar contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;\n\t\t\tif (contextProps && subKey in contextProps || (contextPropKeys === null || contextPropKeys === void 0 ? void 0 : contextPropKeys.includes(subKey)) || ((_staticConfig_context1 = staticConfig.context) === null || _staticConfig_context1 === void 0 ? void 0 : (_staticConfig_context_propKeys = _staticConfig_context1.propKeys) === null || _staticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_context_propKeys.includes(subKey)) || ((_staticConfig_parentStaticConfig3 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig3 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context1 = _staticConfig_parentStaticConfig3.context) === null || _staticConfig_parentStaticConfig_context1 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context_propKeys = _staticConfig_parentStaticConfig_context1.propKeys) === null || _staticConfig_parentStaticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_parentStaticConfig_context_propKeys.includes(subKey))) {\n\t\t\t\tvar _styleState, _styleState1;\n\t\t\t\t(_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});\n\t\t\t\tstyleState.overriddenContextProps[subKey] = val;\n\t\t\t\t(_styleState1 = styleState).originalContextPropValues || (_styleState1.originalContextPropValues = {});\n\t\t\t\tstyleState.originalContextPropValues[subKey] = val;\n\t\t\t}\n\t\t}\n\t\tif (styleProps.noExpand) res[subKey] = val;\n\t\telse if (variants && subKey in variants) {\n\t\t\tif (parentVariantKey && parentVariantKey === key) res[subKey] = val;\n\t\t\telse {\n\t\t\t\tvar variantOut = resolveVariants(subKey, val, styleProps, styleState, key);\n\t\t\t\tif (variantOut) {\n\t\t\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator = variantOut[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\t\tvar [_$key, val1, originalVal, conditionSource] = _step.value;\n\t\t\t\t\t\t\tif (val1 == null) continue;\n\t\t\t\t\t\t\tif (conditionSource !== void 0) {\n\t\t\t\t\t\t\t\tvar appended = appendFlatClause(res[_$key], conditionSource, val1);\n\t\t\t\t\t\t\t\tif (appended === void 0) {\n\t\t\t\t\t\t\t\t\tif (process.env.NODE_ENV === \"development\") console.warn(`[tamagui] conditional variant value for \"${_$key}\" is not string-representable; dropping the clause`);\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tres[_$key] = appended;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tres[_$key] = val1;\n\t\t\t\t\t\t\tif (originalVal !== void 0) {\n\t\t\t\t\t\t\t\toriginalValues || (originalValues = {});\n\t\t\t\t\t\t\t\toriginalValues[_$key] = originalVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t\t_iteratorError = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (isVariable(val)) {\n\t\t\tres[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`variable`, subKey, res[subKey]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof val === \"string\") {\n\t\t\tres[subKey] = isRemValue(val) ? resolveRem(val) : val;\n\t\t\tcontinue;\n\t\t}\n\t\tif (isObj(val)) {\n\t\t\tvar _res, _subKey;\n\t\t\tvar subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`object`, subKey, subObject);\n\t\t\tvar _;\n\t\t\t(_ = (_res = res)[_subKey = subKey]) !== null && _ !== void 0 || (_res[_subKey] = {});\n\t\t\tObject.assign(res[subKey], subObject);\n\t\t\tvar subOriginalValues = styleOriginalValues.get(subObject);\n\t\t\tif (subOriginalValues) {\n\t\t\t\tvar existing = styleOriginalValues.get(res[subKey]);\n\t\t\t\tif (existing) Object.assign(existing, subOriginalValues);\n\t\t\t\telse styleOriginalValues.set(res[subKey], { ...subOriginalValues });\n\t\t\t}\n\t\t} else res[subKey] = val;\n\t}\n\tif (originalValues) styleOriginalValues.set(res, originalValues);\n\treturn res;\n};\nfunction getVariantDefinition(variant, value, conf, param) {\n\tvar { theme } = param;\n\tif (!variant) return;\n\tif (value === void 0) return;\n\tif (typeof variant === \"function\") return variant;\n\tif (Object.prototype.hasOwnProperty.call(variant, value)) return variant[value];\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = getCompiledVariantResolvers(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar { key, parts } = _step.value;\n\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator1 = parts[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\tvar part = _step1.value;\n\t\t\t\t\tif (matchesVariantResolver(part, value, conf, theme)) return variant[key];\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t_iteratorError1 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n}\nvar variantResolverNameSet = new Set(variantResolverNames);\nvar variantResolverCache = /* @__PURE__ */ new WeakMap();\nfunction getCompiledVariantResolvers(variant) {\n\tvar cached = variantResolverCache.get(variant);\n\tif (cached) return cached;\n\tvar compiled = [];\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = Object.keys(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar key = _step.value;\n\t\t\tvar parts = parseVariantResolverKey(key);\n\t\t\tif (parts) compiled.push({\n\t\t\t\tkey,\n\t\t\t\tparts\n\t\t\t});\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\tvariantResolverCache.set(variant, compiled);\n\treturn compiled;\n}\nfunction parseVariantResolverKey(key) {\n\tif (!key) return null;\n\tvar parts = key.split(\"|\").map(function(part2) {\n\t\treturn part2.trim();\n\t});\n\tif (!parts.length) return null;\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar part = _step.value;\n\t\t\tif (!variantResolverNameSet.has(part)) return null;\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\treturn parts;\n}\nvar numberStringPattern = /[+-]?(?:(?:\\d+\\.?\\d*)|(?:\\.\\d+))(?:[eE][+-]?\\d+)?|[+-]?0[xX][\\da-fA-F]+|[+-]?0[bB][01]+|[+-]?0[oO][0-7]+/;\nvar remStringPattern = new RegExp(`^(?:${numberStringPattern.source})rem$`);\nvar viewportValuePattern = new RegExp(`^(?:${numberStringPattern.source})(vw|dvw|lvw|svw|vh|dvh|lvh|svh)$`);\nfunction isAllowedStyleValue(category, value, conf, string, number, rem) {\n\tvar hasSetting = Object.prototype.hasOwnProperty.call(conf.settings, \"allowedStyleValues\");\n\tvar configured = conf.settings.allowedStyleValues;\n\tvar setting = configured && (typeof configured === \"undefined\" ? \"undefined\" : _type_of(configured)) === \"object\" ? configured[category] : configured;\n\tvar web = value === \"unset\" || value === \"inherit\" || string && /^var\\(.*\\)$/.test(value) || (category === \"size\" || category === \"space\") && (value === \"max-content\" || value === \"min-content\" || string && (viewportValuePattern.test(value) || /^(calc|min|max)\\(.*\\)$/.test(value)));\n\tvar somewhat = category === \"size\" || category === \"space\" ? value === \"auto\" || number || rem || string && value.endsWith(\"%\") : number;\n\tif (setting === \"strict\") return false;\n\tif (setting === \"strict-web\") return web;\n\tif (setting === \"somewhat-strict\") return somewhat;\n\tif (setting === \"somewhat-strict-web\") return somewhat || web;\n\treturn number || string && (category === \"size\" || category === \"space\" || !hasSetting);\n}\nfunction matchesVariantResolver(resolverName, value, conf, theme) {\n\tvar string = typeof value === \"string\";\n\tvar number = typeof value === \"number\";\n\tvar rem = string && remStringPattern.test(value);\n\tswitch (resolverName) {\n\t\tcase \"Size\":\n\t\tcase \"Space\":\n\t\tcase \"Radius\":\n\t\tcase \"ZIndex\":\n\t\t\tvar category = resolverName === \"ZIndex\" ? \"zIndex\" : resolverName.toLowerCase();\n\t\t\treturn value === true || value != null && value in conf.tokensParsed[category] || (resolverName === \"Space\" || resolverName === \"Radius\" || resolverName === \"ZIndex\") && isVariable(value) || (resolverName === \"Radius\" || resolverName === \"ZIndex\") && (number || rem) || isAllowedStyleValue(category, value, conf, string, number, rem);\n\t\tcase \"Color\": return value != null && value in conf.tokensParsed.color || string;\n\t\tcase \"Theme\": return string && !!theme && value in theme;\n\t\tcase \"FontSize\":\n\t\t\tvar _conf_fontsParsed_body_size, _conf_fontsParsed_body;\n\t\t\treturn value === true || !!((_conf_fontsParsed_body = conf.fontsParsed.body) === null || _conf_fontsParsed_body === void 0 ? void 0 : (_conf_fontsParsed_body_size = _conf_fontsParsed_body.size) === null || _conf_fontsParsed_body_size === void 0 ? void 0 : _conf_fontsParsed_body_size[value]) || number || rem;\n\t\tcase \"FontStyle\":\n\t\t\tvar _conf_fontsParsed_body_style, _conf_fontsParsed_body1;\n\t\t\treturn !!((_conf_fontsParsed_body1 = conf.fontsParsed.body) === null || _conf_fontsParsed_body1 === void 0 ? void 0 : (_conf_fontsParsed_body_style = _conf_fontsParsed_body1.style) === null || _conf_fontsParsed_body_style === void 0 ? void 0 : _conf_fontsParsed_body_style[value]) || value === \"normal\" || value === \"italic\";\n\t\tcase \"FontTransform\":\n\t\t\tvar _conf_fontsParsed_body_transform, _conf_fontsParsed_body2;\n\t\t\treturn !!((_conf_fontsParsed_body2 = conf.fontsParsed.body) === null || _conf_fontsParsed_body2 === void 0 ? void 0 : (_conf_fontsParsed_body_transform = _conf_fontsParsed_body2.transform) === null || _conf_fontsParsed_body_transform === void 0 ? void 0 : _conf_fontsParsed_body_transform[value]) || value === \"none\" || value === \"capitalize\" || value === \"uppercase\" || value === \"lowercase\";\n\t\tcase \"FontLineHeight\":\n\t\t\tvar _conf_fontsParsed_body_lineHeight, _conf_fontsParsed_body3;\n\t\t\treturn !!((_conf_fontsParsed_body3 = conf.fontsParsed.body) === null || _conf_fontsParsed_body3 === void 0 ? void 0 : (_conf_fontsParsed_body_lineHeight = _conf_fontsParsed_body3.lineHeight) === null || _conf_fontsParsed_body_lineHeight === void 0 ? void 0 : _conf_fontsParsed_body_lineHeight[value]) || number || rem;\n\t\tcase \"FontLetterSpacing\":\n\t\t\tvar _conf_fontsParsed_body_letterSpacing, _conf_fontsParsed_body4;\n\t\t\treturn !!((_conf_fontsParsed_body4 = conf.fontsParsed.body) === null || _conf_fontsParsed_body4 === void 0 ? void 0 : (_conf_fontsParsed_body_letterSpacing = _conf_fontsParsed_body4.letterSpacing) === null || _conf_fontsParsed_body_letterSpacing === void 0 ? void 0 : _conf_fontsParsed_body_letterSpacing[value]) || number || rem;\n\t\tcase \"number\":\n\t\tcase \"string\":\n\t\tcase \"boolean\": return (typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === resolverName;\n\t\tcase \"any\": return true;\n\t}\n}\n\nexport { appendFlatClause, getFontFamilyFromNameOrVariable, propMapper };"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,SAAS,SAAS,KAAK;CACtB;CACA,OAAO,OAAO,OAAO,WAAW,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AC1C,OAAO,CAAC,GAAG,0BAA0B,KAAK,YAAY,UAAU,QAAQ,4BAA4B,KAAK,IAAI,KAAK,KAAK,uCAAuC,wBAAwB,mBAAmB,QAAQ,yCAAyC,KAAK,IAAI,KAAK,IAAI,qCAAqC,WAAW,UAAU;EACvU,KAAK;EACL,KAAK;EACL,KAAK,WAAW,QAAQ,OAAO,UAAU,cAAc,cAAc,SAAS,KAAK,OAAO;EAC1F,KAAK,OAAO,OAAO;CACpB;AACD"}
@@ -47,7 +47,7 @@ function getThemeProxied(_props, _state, _keys, _schemeKeys) {
47
47
  var shouldOptimize = scheme && platform !== "web" && supportsDynamicColorIOS && !curProps.deopt && !curState.inverses && fastSchemeChange && rootMatchesSystem;
48
48
  if (process.env.NODE_ENV === "development" && curProps.debug === "verbose") console.info(` \u{1F3A8} useTheme().get(${key}) theme=${name} scheme=${scheme}`, `
49
49
  shouldOptimize=${shouldOptimize} (dynamicColorIOS=${supportsDynamicColorIOS} deopt=${curProps.deopt} inverses=${curState.inverses} fastScheme=${fastSchemeChange} rootMatch=${rootMatchesSystem})`);
50
- var inlineLayer = (_curState_theme = curState.theme) === null || _curState_theme === void 0 ? void 0 : _curState_theme[inlineLayerKey];
50
+ var inlineLayer = process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES === "disabled" ? void 0 : (_curState_theme = curState.theme) === null || _curState_theme === void 0 ? void 0 : _curState_theme[inlineLayerKey];
51
51
  var inlineOverridden = !!(inlineLayer === null || inlineLayer === void 0 ? void 0 : inlineLayer.overridden.has(key));
52
52
  if (shouldOptimize && inlineOverridden) {
53
53
  var pair = inlineLayer.pairs[key];
@@ -1 +1 @@
1
- {"version":3,"file":"getThemeProxied.native.js","names":[],"sources":["esm/hooks/getThemeProxied.native.js"],"sourcesContent":["import { supportsDynamicColorIOS } from \"@tamagui/constants\";\nimport { getConfig, getSetting } from \"../config\";\nimport { getVariable } from \"../createVariable\";\nimport { getDynamicVal } from \"../helpers/getDynamicVal\";\nimport { inlineLayerKey } from \"../helpers/variables\";\nimport { doesRootSchemeMatchSystem } from \"./doesRootSchemeMatchSystem\";\n\nvar trackingCache = /* @__PURE__ */ new WeakMap();\nvar untrackedCache = /* @__PURE__ */ new WeakMap();\nvar curKeys;\nvar curSchemeKeys;\nvar curProps;\nvar curState;\nvar emptyObject = {};\nfunction track(key) {\n\tvar schemeOptimized = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n\tif (!curKeys) return;\n\tif (!curKeys.current) curKeys.current = /* @__PURE__ */ new Set();\n\tcurKeys.current.add(key);\n\tif (schemeOptimized && curSchemeKeys) {\n\t\tif (!curSchemeKeys.current) curSchemeKeys.current = /* @__PURE__ */ new Set();\n\t\tcurSchemeKeys.current.add(key);\n\t}\n\tif (process.env.NODE_ENV === \"development\" && curProps.debug) console.info(` \\u{1F3A8} useTheme() tracking key: ${key} schemeOptimized=${schemeOptimized}`);\n}\nfunction getThemeProxied(_props, _state, _keys, _schemeKeys) {\n\tvar optimizeForFirstRender = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;\n\tif (!(_state === null || _state === void 0 ? void 0 : _state.theme)) return emptyObject;\n\tif (!optimizeForFirstRender) {\n\t\tcurKeys = _keys;\n\t\tcurSchemeKeys = _schemeKeys;\n\t}\n\tcurProps = _props;\n\tcurState = _state;\n\tvar cache = optimizeForFirstRender ? untrackedCache : trackingCache;\n\tif (cache.has(curState.theme)) return cache.get(curState.theme);\n\tvar config = getConfig();\n\tvar proxied1 = Object.fromEntries(Object.entries(_state.theme).flatMap(function(param) {\n\t\tvar [key, value] = param;\n\t\tvar get = function(platform) {\n\t\t\tif (!curState) return;\n\t\t\tvar outVal = getVariable(value);\n\t\t\tvar { name, scheme } = curState;\n\t\t\tvar _curState_theme;\n\t\t\tvar fastSchemeChange = getSetting(\"fastSchemeChange\");\n\t\t\tvar rootMatchesSystem = doesRootSchemeMatchSystem();\n\t\t\tvar shouldOptimize = scheme && platform !== \"web\" && supportsDynamicColorIOS && !curProps.deopt && !curState.inverses && fastSchemeChange && rootMatchesSystem;\n\t\t\tif (process.env.NODE_ENV === \"development\" && curProps.debug === \"verbose\") console.info(` \\u{1F3A8} useTheme().get(${key}) theme=${name} scheme=${scheme}`, `\n shouldOptimize=${shouldOptimize} (dynamicColorIOS=${supportsDynamicColorIOS} deopt=${curProps.deopt} inverses=${curState.inverses} fastScheme=${fastSchemeChange} rootMatch=${rootMatchesSystem})`);\n\t\t\tvar inlineLayer = (_curState_theme = curState.theme) === null || _curState_theme === void 0 ? void 0 : _curState_theme[inlineLayerKey];\n\t\t\tvar inlineOverridden = !!(inlineLayer === null || inlineLayer === void 0 ? void 0 : inlineLayer.overridden.has(key));\n\t\t\tif (shouldOptimize && inlineOverridden) {\n\t\t\t\tvar pair = inlineLayer.pairs[key];\n\t\t\t\tif (pair) {\n\t\t\t\t\tif (!optimizeForFirstRender) track(key, true);\n\t\t\t\t\treturn getDynamicVal({\n\t\t\t\t\t\tscheme,\n\t\t\t\t\t\tval: String(pair[scheme]),\n\t\t\t\t\t\toppositeVal: String(pair[scheme === \"dark\" ? \"light\" : \"dark\"])\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (shouldOptimize && !inlineOverridden) {\n\t\t\t\tvar _config_themes_name, _config_themes_oppositeName;\n\t\t\t\tvar oppositeScheme = scheme === \"dark\" ? \"light\" : \"dark\";\n\t\t\t\tvar oppositeName = name.replace(scheme, oppositeScheme);\n\t\t\t\tvar color = getVariable((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]);\n\t\t\t\tvar oppositeColor = getVariable((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]);\n\t\t\t\tif (process.env.NODE_ENV === \"development\" && curProps.debug === \"verbose\") console.info(` \\u{1F3A8} useTheme().get(${key}) using DynamicColorIOS`, `\n color=${color} oppositeColor=${oppositeColor}`);\n\t\t\t\tvar dynamicVal = getDynamicVal({\n\t\t\t\t\tscheme,\n\t\t\t\t\tval: color,\n\t\t\t\t\toppositeVal: oppositeColor\n\t\t\t\t});\n\t\t\t\tif (!optimizeForFirstRender) track(key, true);\n\t\t\t\treturn dynamicVal;\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV === \"development\" && curProps.debug) console.info(` \\u{1F3A8} useTheme().get(${key}) tracking key (not optimizing)`, `\n platform=${platform} dynamicColorIOS=${supportsDynamicColorIOS} deopt=${curProps.deopt} fastScheme=${fastSchemeChange}`);\n\t\t\tif (!optimizeForFirstRender) track(key, false);\n\t\t\treturn outVal;\n\t\t};\n\t\treturn [[key, optimizeForFirstRender ? {\n\t\t\t...value,\n\t\t\tval: value.val,\n\t\t\tget\n\t\t} : {\n\t\t\t...value,\n\t\t\tget val() {\n\t\t\t\tif (!globalThis.tamaguiAvoidTracking) track(key, false);\n\t\t\t\treturn value.val;\n\t\t\t},\n\t\t\tget\n\t\t}]];\n\t}));\n\tcache.set(_state.theme, proxied1);\n\treturn proxied1;\n}\n\nexport { getThemeProxied };"],"mappings":";;;;;;;;AAOA,IAAI,gCAAgC,IAAI,QAAQ;AAChD,IAAI,iCAAiC,IAAI,QAAQ;AACjD,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI,cAAc,CAAC;AACnB,SAAS,MAAM,KAAK;CACnB,IAAI,kBAAkB,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CACvF,IAAI,CAAC,SAAS;CACd,IAAI,CAAC,QAAQ,SAAS,QAAQ,0BAA0B,IAAI,IAAI;CAChE,QAAQ,QAAQ,IAAI,GAAG;CACvB,IAAI,mBAAmB,eAAe;EACrC,IAAI,CAAC,cAAc,SAAS,cAAc,0BAA0B,IAAI,IAAI;EAC5E,cAAc,QAAQ,IAAI,GAAG;CAC9B;CACA,IAAI,QAAQ,IAAI,aAAa,iBAAiB,SAAS,OAAO,QAAQ,KAAK,uCAAuC,IAAI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,OAAO,MAAM;GACd;GACA;EACD,CAAC,CAAC;CACH,CAAC,CAAC;CACF,MAAM,IAAI,OAAO,OAAO,QAAQ;CAChC,OAAO;AACR"}
1
+ {"version":3,"file":"getThemeProxied.native.js","names":[],"sources":["esm/hooks/getThemeProxied.native.js"],"sourcesContent":["import { supportsDynamicColorIOS } from \"@tamagui/constants\";\nimport { getConfig, getSetting } from \"../config\";\nimport { getVariable } from \"../createVariable\";\nimport { getDynamicVal } from \"../helpers/getDynamicVal\";\nimport { inlineLayerKey } from \"../helpers/variables\";\nimport { doesRootSchemeMatchSystem } from \"./doesRootSchemeMatchSystem\";\n\nvar trackingCache = /* @__PURE__ */ new WeakMap();\nvar untrackedCache = /* @__PURE__ */ new WeakMap();\nvar curKeys;\nvar curSchemeKeys;\nvar curProps;\nvar curState;\nvar emptyObject = {};\nfunction track(key) {\n\tvar schemeOptimized = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n\tif (!curKeys) return;\n\tif (!curKeys.current) curKeys.current = /* @__PURE__ */ new Set();\n\tcurKeys.current.add(key);\n\tif (schemeOptimized && curSchemeKeys) {\n\t\tif (!curSchemeKeys.current) curSchemeKeys.current = /* @__PURE__ */ new Set();\n\t\tcurSchemeKeys.current.add(key);\n\t}\n\tif (process.env.NODE_ENV === \"development\" && curProps.debug) console.info(` \\u{1F3A8} useTheme() tracking key: ${key} schemeOptimized=${schemeOptimized}`);\n}\nfunction getThemeProxied(_props, _state, _keys, _schemeKeys) {\n\tvar optimizeForFirstRender = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;\n\tif (!(_state === null || _state === void 0 ? void 0 : _state.theme)) return emptyObject;\n\tif (!optimizeForFirstRender) {\n\t\tcurKeys = _keys;\n\t\tcurSchemeKeys = _schemeKeys;\n\t}\n\tcurProps = _props;\n\tcurState = _state;\n\tvar cache = optimizeForFirstRender ? untrackedCache : trackingCache;\n\tif (cache.has(curState.theme)) return cache.get(curState.theme);\n\tvar config = getConfig();\n\tvar proxied1 = Object.fromEntries(Object.entries(_state.theme).flatMap(function(param) {\n\t\tvar [key, value] = param;\n\t\tvar get = function(platform) {\n\t\t\tif (!curState) return;\n\t\t\tvar outVal = getVariable(value);\n\t\t\tvar { name, scheme } = curState;\n\t\t\tvar _curState_theme;\n\t\t\tvar fastSchemeChange = getSetting(\"fastSchemeChange\");\n\t\t\tvar rootMatchesSystem = doesRootSchemeMatchSystem();\n\t\t\tvar shouldOptimize = scheme && platform !== \"web\" && supportsDynamicColorIOS && !curProps.deopt && !curState.inverses && fastSchemeChange && rootMatchesSystem;\n\t\t\tif (process.env.NODE_ENV === \"development\" && curProps.debug === \"verbose\") console.info(` \\u{1F3A8} useTheme().get(${key}) theme=${name} scheme=${scheme}`, `\n shouldOptimize=${shouldOptimize} (dynamicColorIOS=${supportsDynamicColorIOS} deopt=${curProps.deopt} inverses=${curState.inverses} fastScheme=${fastSchemeChange} rootMatch=${rootMatchesSystem})`);\n\t\t\tvar inlineLayer = process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES === \"disabled\" ? void 0 : (_curState_theme = curState.theme) === null || _curState_theme === void 0 ? void 0 : _curState_theme[inlineLayerKey];\n\t\t\tvar inlineOverridden = !!(inlineLayer === null || inlineLayer === void 0 ? void 0 : inlineLayer.overridden.has(key));\n\t\t\tif (shouldOptimize && inlineOverridden) {\n\t\t\t\tvar pair = inlineLayer.pairs[key];\n\t\t\t\tif (pair) {\n\t\t\t\t\tif (!optimizeForFirstRender) track(key, true);\n\t\t\t\t\treturn getDynamicVal({\n\t\t\t\t\t\tscheme,\n\t\t\t\t\t\tval: String(pair[scheme]),\n\t\t\t\t\t\toppositeVal: String(pair[scheme === \"dark\" ? \"light\" : \"dark\"])\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (shouldOptimize && !inlineOverridden) {\n\t\t\t\tvar _config_themes_name, _config_themes_oppositeName;\n\t\t\t\tvar oppositeScheme = scheme === \"dark\" ? \"light\" : \"dark\";\n\t\t\t\tvar oppositeName = name.replace(scheme, oppositeScheme);\n\t\t\t\tvar color = getVariable((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]);\n\t\t\t\tvar oppositeColor = getVariable((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]);\n\t\t\t\tif (process.env.NODE_ENV === \"development\" && curProps.debug === \"verbose\") console.info(` \\u{1F3A8} useTheme().get(${key}) using DynamicColorIOS`, `\n color=${color} oppositeColor=${oppositeColor}`);\n\t\t\t\tvar dynamicVal = getDynamicVal({\n\t\t\t\t\tscheme,\n\t\t\t\t\tval: color,\n\t\t\t\t\toppositeVal: oppositeColor\n\t\t\t\t});\n\t\t\t\tif (!optimizeForFirstRender) track(key, true);\n\t\t\t\treturn dynamicVal;\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV === \"development\" && curProps.debug) console.info(` \\u{1F3A8} useTheme().get(${key}) tracking key (not optimizing)`, `\n platform=${platform} dynamicColorIOS=${supportsDynamicColorIOS} deopt=${curProps.deopt} fastScheme=${fastSchemeChange}`);\n\t\t\tif (!optimizeForFirstRender) track(key, false);\n\t\t\treturn outVal;\n\t\t};\n\t\treturn [[key, optimizeForFirstRender ? {\n\t\t\t...value,\n\t\t\tval: value.val,\n\t\t\tget\n\t\t} : {\n\t\t\t...value,\n\t\t\tget val() {\n\t\t\t\tif (!globalThis.tamaguiAvoidTracking) track(key, false);\n\t\t\t\treturn value.val;\n\t\t\t},\n\t\t\tget\n\t\t}]];\n\t}));\n\tcache.set(_state.theme, proxied1);\n\treturn proxied1;\n}\n\nexport { getThemeProxied };"],"mappings":";;;;;;;;AAOA,IAAI,gCAAgC,IAAI,QAAQ;AAChD,IAAI,iCAAiC,IAAI,QAAQ;AACjD,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI,cAAc,CAAC;AACnB,SAAS,MAAM,KAAK;CACnB,IAAI,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AAwB,MAAM,KAAK,IAAI;IAC5C,OAAO;GACR;GACA,IAAI,QAAQ,IAAI,aAAa,iBAAiB,SAAS,OAAO,QAAQ,KAAK,6BAA6B,IAAI,kCAAkC;cACnI,SAAS,mBAAmB,wBAAwB,SAAS,SAAS,MAAM,cAAc,kBAAkB;GACvH,IAAI,CAAC,wBAAwB,MAAM,KAAK,KAAK;GAC7C,OAAO;EACR;EACA,OAAO,CAAC,CAAC,KAAK,yBAAyB;GACtC,GAAG;GACH,KAAK,MAAM;GACX;EACD,IAAI;GACH,GAAG;GACH,IAAI,MAAM;IACT,IAAI,CAAC,WAAW,sBAAsB,MAAM,KAAK,KAAK;IACtD,OAAO,MAAM;GACd;GACA;EACD,CAAC,CAAC;CACH,CAAC,CAAC;CACF,MAAM,IAAI,OAAO,OAAO,QAAQ;CAChC,OAAO;AACR"}
@@ -75,7 +75,7 @@ const useComponentState = (props, animationDriver, staticConfig, config) => {
75
75
  if (!needsHydration && hasAnimationProp) {
76
76
  curStateRef.hasAnimated = true;
77
77
  }
78
- const platformPseudo = Boolean(!isHOC && useAnimations && animationDriver?.avoidReRenders && getPlatformDriver()?.pseudo && hasFlatModifier(props, config, platformPseudoModifiers));
78
+ const platformPseudo = Boolean(!isHOC && useAnimations && animationDriver?.avoidReRenders && getPlatformDriver()?.pseudo && process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && hasFlatModifier(props, config, platformPseudoModifiers));
79
79
  const willBeAnimatedClient = (() => {
80
80
  const next = !!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations);
81
81
  return Boolean(next || curStateRef.hasAnimated);
@@ -89,7 +89,7 @@ const useComponentState = (props, animationDriver, staticConfig, config) => {
89
89
  const presenceState = presence?.[2];
90
90
  const isExiting = presenceState?.isPresent === false;
91
91
  const isEntering = presenceState?.isPresent === true && presenceState.initial !== false;
92
- const hasEnterStyle = hasFlatModifier(props, config, enterModifier);
92
+ const hasEnterStyle = process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && hasFlatModifier(props, config, enterModifier);
93
93
  const hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && (animationDriver?.isReactNative || inputStyle !== "css");
94
94
  const canImmediatelyEnter = hasEnterStyle || isEntering;
95
95
  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 { canonicalClauseModifier, scanFlatValue } 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\"]);\nlet scanSource = \"\";\nlet scanWanted = enterModifier;\nlet scanFound = false;\nlet scanRefused = false;\nconst lifecycleVisitor = {\n segment(start, end, isBase) {\n if (start === end && !isBase) scanRefused = true;\n },\n chain(start, end) {\n if (scanRefused) return false;\n for (let index = start; index <= end; index++) {\n if (index !== end && scanSource.charCodeAt(index) !== 58) continue;\n if (scanWanted.has(canonicalClauseModifier(scanSource.slice(start, index)))) {\n scanFound = true;\n }\n start = index + 1;\n }\n return true;\n },\n error() {\n scanRefused = true;\n }\n};\nfunction hasFlatModifier(props, config, modifiers) {\n for (const key in props) {\n const value = props[key];\n if (typeof value !== \"string\" || value.indexOf(\":\") === -1) continue;\n const property = config.shorthands[key] || key;\n if (!(property in stylePropsAll) && property !== \"transition\") continue;\n scanSource = value;\n scanWanted = modifiers;\n scanFound = false;\n scanRefused = false;\n scanFlatValue(value, lifecycleVisitor);\n if (scanFound && !scanRefused) 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(props, config, platformPseudoModifiers)\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(props, config, enterModifier);\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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AAM,UAAU,WAAW;GACvE,QAAQ,KACN,iBACE,0BACA,aAAa,WAAW,eAAe,aAAa,WAAW,QAAQ,oBACvE,qEACA,iEACA,iBACA,aACF,CACF;EACF;EACA,MAAM,EAAE,WAAW;EACnB,IAAI,MAAM,MAAM,GAAG;GACjB,WAAW;IAAE,GAAG;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 { canonicalClauseModifier, scanFlatValue } 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\"]);\nlet scanSource = \"\";\nlet scanWanted = enterModifier;\nlet scanFound = false;\nlet scanRefused = false;\nconst lifecycleVisitor = {\n segment(start, end, isBase) {\n if (start === end && !isBase) scanRefused = true;\n },\n chain(start, end) {\n if (scanRefused) return false;\n for (let index = start; index <= end; index++) {\n if (index !== end && scanSource.charCodeAt(index) !== 58) continue;\n if (scanWanted.has(canonicalClauseModifier(scanSource.slice(start, index)))) {\n scanFound = true;\n }\n start = index + 1;\n }\n return true;\n },\n error() {\n scanRefused = true;\n }\n};\nfunction hasFlatModifier(props, config, modifiers) {\n for (const key in props) {\n const value = props[key];\n if (typeof value !== \"string\" || value.indexOf(\":\") === -1) continue;\n const property = config.shorthands[key] || key;\n if (!(property in stylePropsAll) && property !== \"transition\") continue;\n scanSource = value;\n scanWanted = modifiers;\n scanFound = false;\n scanRefused = false;\n scanFlatValue(value, lifecycleVisitor);\n if (scanFound && !scanRefused) 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 && process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== \"disabled\" && hasFlatModifier(props, config, platformPseudoModifiers)\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 = process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== \"disabled\" && hasFlatModifier(props, config, enterModifier);\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":";;;;;;;;;;;;;;AAgBA,MAAM,0CAA0C,IAAI,IAAI;CAAC;CAAS;CAAS;AAAO,CAAC;AACnF,MAAM,gCAAgC,IAAI,IAAI,CAAC,OAAO,CAAC;AACvD,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI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O;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"}
@@ -82,7 +82,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
82
82
  if (!needsHydration && hasAnimationProp) {
83
83
  curStateRef.hasAnimated = true;
84
84
  }
85
- 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));
85
+ var platformPseudo = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) && process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && hasFlatModifier(props, config, platformPseudoModifiers));
86
86
  var willBeAnimatedClient = (function() {
87
87
  var next = !!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations);
88
88
  return Boolean(next || curStateRef.hasAnimated);
@@ -96,7 +96,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
96
96
  var presenceState = presence === null || presence === void 0 ? void 0 : presence[2];
97
97
  var isExiting = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === false;
98
98
  var isEntering = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === true && presenceState.initial !== false;
99
- var hasEnterStyle = hasFlatModifier(props, config, enterModifier);
99
+ var hasEnterStyle = process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && hasFlatModifier(props, config, enterModifier);
100
100
  var hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isReactNative) || inputStyle !== "css");
101
101
  var canImmediatelyEnter = hasEnterStyle || isEntering;
102
102
  var shouldEnter = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || disableClassName);
@@ -1 +1 @@
1
- {"version":3,"file":"useComponentState.native.js","names":[],"sources":["esm/hooks/useComponentState.native.js"],"sourcesContent":["import { getPlatformDriver, isServer, isWeb } from \"@tamagui/constants\";\nimport { stylePropsAll } from \"@tamagui/helpers\";\nimport { canonicalClauseModifier, scanFlatValue } 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 { defaultComponentState, defaultComponentStateMounted, defaultComponentStateShouldEnter } from \"../defaultComponentState\";\nimport { isObj } from \"../helpers/isObj\";\nimport { log } from \"../helpers/log\";\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar platformPseudoModifiers = /* @__PURE__ */ new Set([\n \"hover\",\n \"press\",\n \"focus\"\n]);\nvar enterModifier = /* @__PURE__ */ new Set([\n \"enter\"\n]);\nvar scanSource = \"\";\nvar scanWanted = enterModifier;\nvar scanFound = false;\nvar scanRefused = false;\nvar lifecycleVisitor = {\n segment(start, end, isBase) {\n if (start === end && !isBase) scanRefused = true;\n },\n chain(start, end) {\n if (scanRefused) return false;\n for (var index = start; index <= end; index++) {\n if (index !== end && scanSource.charCodeAt(index) !== 58) continue;\n if (scanWanted.has(canonicalClauseModifier(scanSource.slice(start, index)))) {\n scanFound = true;\n }\n start = index + 1;\n }\n return true;\n },\n error() {\n scanRefused = true;\n }\n};\nfunction hasFlatModifier(props, config, modifiers) {\n for (var key in props) {\n var value = props[key];\n if (typeof value !== \"string\" || value.indexOf(\":\") === -1) continue;\n var property = config.shorthands[key] || key;\n if (!(property in stylePropsAll) && property !== \"transition\") continue;\n scanSource = value;\n scanWanted = modifiers;\n scanFound = false;\n scanRefused = false;\n scanFlatValue(value, lifecycleVisitor);\n if (scanFound && !scanRefused) return true;\n }\n return false;\n}\nvar useComponentState = function(props, animationDriver, staticConfig, config) {\n \"use no memo\";\n var _getPlatformDriver, _animationDriver_usePresence;\n var isHydrated = useDidFinishSSR();\n var needsHydration = !useIsClientOnly();\n var useAnimations = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isStub) ? void 0 : animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.useAnimations;\n var { isHOC } = staticConfig;\n var 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 var hasAnimationProp = Boolean(!isHOC && \"transition\" in props || props.style && hasAnimatedStyleValue(props.style));\n var _animationDriver_inputStyle;\n var inputStyle = (_animationDriver_inputStyle = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.inputStyle) !== null && _animationDriver_inputStyle !== void 0 ? _animationDriver_inputStyle : \"css\";\n var _animationDriver_outputStyle;\n var outputStyle = (_animationDriver_outputStyle = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.outputStyle) !== null && _animationDriver_outputStyle !== void 0 ? _animationDriver_outputStyle : \"css\";\n var curStateRef = stateRef.current;\n if (!needsHydration && hasAnimationProp) {\n curStateRef.hasAnimated = true;\n }\n 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));\n var willBeAnimatedClient = (function() {\n var next = !!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations);\n return Boolean(next || curStateRef.hasAnimated);\n })();\n var willBeAnimated = !isServer && willBeAnimatedClient;\n if (willBeAnimated && !curStateRef.hasAnimated) {\n curStateRef.hasAnimated = true;\n }\n var { disableClassName } = props;\n var presence = !isHOC && willBeAnimated && props[\"animatePresence\"] !== false && (animationDriver === null || animationDriver === void 0 ? void 0 : (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null;\n var presenceState = presence === null || presence === void 0 ? void 0 : presence[2];\n var isExiting = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === false;\n var isEntering = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === true && presenceState.initial !== false;\n var hasEnterStyle = hasFlatModifier(props, config, enterModifier);\n var hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isReactNative) || inputStyle !== \"css\");\n var canImmediatelyEnter = hasEnterStyle || isEntering;\n var 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 var 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 var disabled = isDisabled(props);\n if (disabled != null) {\n initialState.disabled = disabled;\n }\n var states = useState(initialState);\n var state = props.forceStyle ? {\n ...states[0],\n [props.forceStyle]: true\n } : states[0];\n var setState = states[1];\n var 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(function(_) {\n return {\n ...state\n };\n });\n }\n var groupName = props.group;\n if (!stateRef.current.baseSetStateShallow) {\n var r = stateRef.current;\n r.baseSetStateShallow = function(stateOrGetState) {\n setState(function(prev) {\n var next = typeof stateOrGetState === \"function\" ? stateOrGetState(prev) : stateOrGetState;\n var update = mergeIfNotShallowEqual(prev, next);\n if (process.env.NODE_ENV === \"development\") {\n var 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 var setStateShallow = stateRef.current.baseSetStateShallow;\n if (process.env.NODE_ENV === \"development\" && globalThis.time) globalThis.time`state-useCreateShallowSetState`;\n var outProps = props;\n if (presenceState && isAnimated && isHydrated && staticConfig.variants) {\n if (process.env.NODE_ENV === \"development\" && props.debug === \"verbose\") {\n var _staticConfig_Component, _staticConfig_Component1;\n console.warn(formatDiagnostic(\"TAMAGUI_PRESENCE_STATE\", ((_staticConfig_Component = staticConfig.Component) === null || _staticConfig_Component === void 0 ? void 0 : _staticConfig_Component.displayName) || ((_staticConfig_Component1 = staticConfig.Component) === null || _staticConfig_Component1 === void 0 ? void 0 : _staticConfig_Component1.name) || \"TamaguiComponent\", \"AnimatePresence supplied lifecycle state to an animated component\", 'Remove debug=\"verbose\" after inspecting the animation state', \"presenceState\", presenceState));\n }\n var { custom } = presenceState;\n if (isObj(custom)) {\n outProps = {\n ...props,\n ...custom\n };\n }\n }\n var noClass = !isWeb || !!props.forceStyle;\n if (!isHydrated) {\n noClass = false;\n } else {\n if (isWeb && isHydrated) {\n var isAnimatedAndHydrated = isAnimated && isHydrated;\n var isClassNameDisabled = !staticConfig.acceptsClassName && (getSetting(\"disableSSR\") || !state.unmounted);\n var 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 (var k in style) {\n var val = style[k];\n if (val && (typeof val === \"undefined\" ? \"undefined\" : _type_of(val)) === \"object\" && \"_animation\" in val) {\n return true;\n }\n }\n return false;\n}\nvar isDisabled = function(props) {\n var _props_accessibilityState;\n return props.disabled || props.passThrough || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props[\"aria-disabled\"] || props.accessibilityDisabled || false;\n};\nexport {\n useComponentState\n};\n//# sourceMappingURL=useComponentState.js.map\n"],"mappings":";;;;;;;;;;;;;;AAYA,SAAS,SAAS,KAAK;CACrB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAChG;AACA,IAAI,0CAA0C,IAAI,IAAI;CACpD;CACA;CACA;AACF,CAAC;AACD,IAAI,gCAAgC,IAAI,IAAI,CAC1C,OACF,CAAC;AACD,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,mBAAmB;CACrB,QAAQ,OAAO,KAAK,QAAQ;EAC1B,IAAI,UAAU,OAAO,CAAC,QAAQ,cAAc;CAC9C;CACA,MAAM,OAAO,KAAK;EAChB,IAAI,aAAa,OAAO;EACxB,KAAK,IAAI,QAAQ,OAAO,SAAS,KAAK,SAAS;GAC7C,IAAI,UAAU,OAAO,WAAW,WAAW,KAAK,MAAM,IAAI;GAC1D,IAAI,WAAW,IAAI,wBAAwB,WAAW,MAAM,OAAO,KAAK,CAAC,CAAC,GAAG;IAC3E,YAAY;GACd;GACA,QAAQ,QAAQ;EAClB;EACA,OAAO;CACT;CACA,QAAQ;EACN,cAAc;CAChB;AACF;AACA,SAAS,gBAAgB,OAAO,QAAQ,WAAW;CACjD,KAAK,IAAI,OAAO,OAAO;EACr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CACJ,OAAO,MAAM,YAAY,MAAM,iBAAiB,4BAA4B,MAAM,wBAAwB,QAAQ,8BAA8B,KAAK,IAAI,KAAK,IAAI,0BAA0B,aAAa,MAAM,oBAAoB,MAAM,yBAAyB;AACpQ"}
1
+ {"version":3,"file":"useComponentState.native.js","names":[],"sources":["esm/hooks/useComponentState.native.js"],"sourcesContent":["import { getPlatformDriver, isServer, isWeb } from \"@tamagui/constants\";\nimport { stylePropsAll } from \"@tamagui/helpers\";\nimport { canonicalClauseModifier, scanFlatValue } 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 { defaultComponentState, defaultComponentStateMounted, defaultComponentStateShouldEnter } from \"../defaultComponentState\";\nimport { isObj } from \"../helpers/isObj\";\nimport { log } from \"../helpers/log\";\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar platformPseudoModifiers = /* @__PURE__ */ new Set([\n \"hover\",\n \"press\",\n \"focus\"\n]);\nvar enterModifier = /* @__PURE__ */ new Set([\n \"enter\"\n]);\nvar scanSource = \"\";\nvar scanWanted = enterModifier;\nvar scanFound = false;\nvar scanRefused = false;\nvar lifecycleVisitor = {\n segment(start, end, isBase) {\n if (start === end && !isBase) scanRefused = true;\n },\n chain(start, end) {\n if (scanRefused) return false;\n for (var index = start; index <= end; index++) {\n if (index !== end && scanSource.charCodeAt(index) !== 58) continue;\n if (scanWanted.has(canonicalClauseModifier(scanSource.slice(start, index)))) {\n scanFound = true;\n }\n start = index + 1;\n }\n return true;\n },\n error() {\n scanRefused = true;\n }\n};\nfunction hasFlatModifier(props, config, modifiers) {\n for (var key in props) {\n var value = props[key];\n if (typeof value !== \"string\" || value.indexOf(\":\") === -1) continue;\n var property = config.shorthands[key] || key;\n if (!(property in stylePropsAll) && property !== \"transition\") continue;\n scanSource = value;\n scanWanted = modifiers;\n scanFound = false;\n scanRefused = false;\n scanFlatValue(value, lifecycleVisitor);\n if (scanFound && !scanRefused) return true;\n }\n return false;\n}\nvar useComponentState = function(props, animationDriver, staticConfig, config) {\n \"use no memo\";\n var _getPlatformDriver, _animationDriver_usePresence;\n var isHydrated = useDidFinishSSR();\n var needsHydration = !useIsClientOnly();\n var useAnimations = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isStub) ? void 0 : animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.useAnimations;\n var { isHOC } = staticConfig;\n var 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 var hasAnimationProp = Boolean(!isHOC && \"transition\" in props || props.style && hasAnimatedStyleValue(props.style));\n var _animationDriver_inputStyle;\n var inputStyle = (_animationDriver_inputStyle = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.inputStyle) !== null && _animationDriver_inputStyle !== void 0 ? _animationDriver_inputStyle : \"css\";\n var _animationDriver_outputStyle;\n var outputStyle = (_animationDriver_outputStyle = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.outputStyle) !== null && _animationDriver_outputStyle !== void 0 ? _animationDriver_outputStyle : \"css\";\n var curStateRef = stateRef.current;\n if (!needsHydration && hasAnimationProp) {\n curStateRef.hasAnimated = true;\n }\n var platformPseudo = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) && process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== \"disabled\" && hasFlatModifier(props, config, platformPseudoModifiers));\n var willBeAnimatedClient = (function() {\n var next = !!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations);\n return Boolean(next || curStateRef.hasAnimated);\n })();\n var willBeAnimated = !isServer && willBeAnimatedClient;\n if (willBeAnimated && !curStateRef.hasAnimated) {\n curStateRef.hasAnimated = true;\n }\n var { disableClassName } = props;\n var presence = !isHOC && willBeAnimated && props[\"animatePresence\"] !== false && (animationDriver === null || animationDriver === void 0 ? void 0 : (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null;\n var presenceState = presence === null || presence === void 0 ? void 0 : presence[2];\n var isExiting = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === false;\n var isEntering = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === true && presenceState.initial !== false;\n var hasEnterStyle = process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== \"disabled\" && hasFlatModifier(props, config, enterModifier);\n var hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isReactNative) || inputStyle !== \"css\");\n var canImmediatelyEnter = hasEnterStyle || isEntering;\n var 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 var 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 var disabled = isDisabled(props);\n if (disabled != null) {\n initialState.disabled = disabled;\n }\n var states = useState(initialState);\n var state = props.forceStyle ? {\n ...states[0],\n [props.forceStyle]: true\n } : states[0];\n var setState = states[1];\n var 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(function(_) {\n return {\n ...state\n };\n });\n }\n var groupName = props.group;\n if (!stateRef.current.baseSetStateShallow) {\n var r = stateRef.current;\n r.baseSetStateShallow = function(stateOrGetState) {\n setState(function(prev) {\n var next = typeof stateOrGetState === \"function\" ? stateOrGetState(prev) : stateOrGetState;\n var update = mergeIfNotShallowEqual(prev, next);\n if (process.env.NODE_ENV === \"development\") {\n var 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 var setStateShallow = stateRef.current.baseSetStateShallow;\n if (process.env.NODE_ENV === \"development\" && globalThis.time) globalThis.time`state-useCreateShallowSetState`;\n var outProps = props;\n if (presenceState && isAnimated && isHydrated && staticConfig.variants) {\n if (process.env.NODE_ENV === \"development\" && props.debug === \"verbose\") {\n var _staticConfig_Component, _staticConfig_Component1;\n console.warn(formatDiagnostic(\"TAMAGUI_PRESENCE_STATE\", ((_staticConfig_Component = staticConfig.Component) === null || _staticConfig_Component === void 0 ? void 0 : _staticConfig_Component.displayName) || ((_staticConfig_Component1 = staticConfig.Component) === null || _staticConfig_Component1 === void 0 ? void 0 : _staticConfig_Component1.name) || \"TamaguiComponent\", \"AnimatePresence supplied lifecycle state to an animated component\", 'Remove debug=\"verbose\" after inspecting the animation state', \"presenceState\", presenceState));\n }\n var { custom } = presenceState;\n if (isObj(custom)) {\n outProps = {\n ...props,\n ...custom\n };\n }\n }\n var noClass = !isWeb || !!props.forceStyle;\n if (!isHydrated) {\n noClass = false;\n } else {\n if (isWeb && isHydrated) {\n var isAnimatedAndHydrated = isAnimated && isHydrated;\n var isClassNameDisabled = !staticConfig.acceptsClassName && (getSetting(\"disableSSR\") || !state.unmounted);\n var 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 (var k in style) {\n var val = style[k];\n if (val && (typeof val === \"undefined\" ? \"undefined\" : _type_of(val)) === \"object\" && \"_animation\" in val) {\n return true;\n }\n }\n return false;\n}\nvar isDisabled = function(props) {\n var _props_accessibilityState;\n return props.disabled || props.passThrough || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props[\"aria-disabled\"] || props.accessibilityDisabled || false;\n};\nexport {\n useComponentState\n};\n//# sourceMappingURL=useComponentState.js.map\n"],"mappings":";;;;;;;;;;;;;;AAYA,SAAS,SAAS,KAAK;CACrB;CACA,OAAO,OAAO,OAAO,WAAW,eAAe,IAAI,gBAAgB,SAAS,WAAW,OAAO;AAChG;AACA,IAAI,0CAA0C,IAAI,IAAI;CACpD;CACA;CACA;AACF,CAAC;AACD,IAAI,gCAAgC,IA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AAqB,WAAW,YAAY,KAAK,CAAC,MAAM;GAChG,IAAI,qBAAqB,oBAAoB,CAAC,MAAM;GACpD,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,IAAI,KAAK,OAAO;EACnB,IAAI,MAAM,MAAM;EAChB,IAAI,QAAQ,OAAO,QAAQ,cAAc,cAAc,SAAS,GAAG,OAAO,YAAY,gBAAgB,KAAK;GACzG,OAAO;EACT;CACF;CACA,OAAO;AACT;AACA,IAAI,aAAa,SAAS,OAAO;CAC/B,IAAI;CACJ,OAAO,MAAM,YAAY,MAAM,iBAAiB,4BAA4B,MAAM,wBAAwB,QAAQ,8BAA8B,KAAK,IAAI,KAAK,IAAI,0BAA0B,aAAa,MAAM,oBAAoB,MAAM,yBAAyB;AACpQ"}
@@ -51,7 +51,7 @@ function usePropsAndStyle(props, opts) {
51
51
  const { mediaGroups, pseudoGroups } = splitStyles || {};
52
52
  useIsomorphicLayoutEffect(() => {
53
53
  let disposeSafeArea;
54
- if (splitStyles?.usesSafeArea) {
54
+ if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && splitStyles?.usesSafeArea) {
55
55
  const updateSafeArea = () => {
56
56
  setState((previous) => ({ ...previous }));
57
57
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useProps.js","names":[],"sources":["esm/hooks/useProps.js"],"sourcesContent":["import { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getConfig } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { GroupContext } from \"../contexts/GroupContext\";\nimport { useSplitStyles } from \"../helpers/getSplitStyles\";\nimport { subscribeToSafeArea } from \"../helpers/resolveSafeAreaVariable\";\nimport { subscribeToContextGroup } from \"../helpers/subscribeToContextGroup\";\nimport { View } from \"../views/View\";\nimport { useComponentState } from \"./useComponentState\";\nimport { mediaState } from \"../helpers/mediaState\";\nimport { useMedia } from \"./useMedia\";\nimport { useThemeWithState } from \"./useTheme\";\nfunction useProps(props, opts) {\n const [propsOut, styleOut] = usePropsAndStyle(props, {\n ...opts,\n noExpand: true,\n noNormalize: true,\n resolveValues: \"none\"\n });\n return {\n ...propsOut,\n ...styleOut\n };\n}\nfunction useStyle(props, opts) {\n return usePropsAndStyle(props, opts)[1] || {};\n}\nfunction usePropsAndStyle(props, opts) {\n const staticConfig = opts?.forComponent?.staticConfig ?? View.staticConfig;\n const [theme, themeState] = useThemeWithState({\n name: \"theme\" in props ? props.theme : void 0,\n needsUpdate() {\n return true;\n }\n });\n const componentContext = React.useContext(ComponentContext);\n const groupContext = React.useContext(GroupContext);\n const {\n props: statefulProps,\n state,\n disabled,\n setState,\n setStateShallow\n } = useComponentState(\n props,\n componentContext.animationDriver,\n staticConfig,\n getConfig()\n );\n const mediaStateNow = opts?.noMedia ? (\n // not safe to use mediaState but really marginal to hit this\n mediaState\n ) : useMedia();\n const splitStyles = useSplitStyles(\n statefulProps,\n staticConfig,\n theme,\n themeState?.name || \"\",\n state,\n {\n isAnimated: false,\n mediaState: mediaStateNow,\n noSkip: true,\n noMergeStyle: true,\n noClass: true,\n resolveValues: \"auto\",\n ...opts\n },\n null,\n componentContext,\n groupContext\n );\n const { mediaGroups, pseudoGroups } = splitStyles || {};\n useIsomorphicLayoutEffect(() => {\n let disposeSafeArea;\n if (splitStyles?.usesSafeArea) {\n const updateSafeArea = () => {\n setState((previous) => ({ ...previous }));\n };\n disposeSafeArea = subscribeToSafeArea(updateSafeArea);\n updateSafeArea();\n }\n if (disabled) {\n return disposeSafeArea;\n }\n if (state.unmounted) {\n setStateShallow({ unmounted: false });\n return disposeSafeArea;\n }\n if (groupContext) {\n const disposeGroup = subscribeToContextGroup({\n groupContext,\n setStateShallow,\n mediaGroups,\n pseudoGroups\n });\n if (!disposeSafeArea) return disposeGroup;\n return () => {\n disposeSafeArea();\n disposeGroup?.();\n };\n }\n return disposeSafeArea;\n }, [\n disabled,\n groupContext,\n splitStyles?.usesSafeArea,\n pseudoGroups ? Object.keys([...pseudoGroups]).join(\"\") : 0,\n mediaGroups ? Object.keys([...mediaGroups]).join(\"\") : 0\n ]);\n return [\n splitStyles?.viewProps || {},\n splitStyles?.style || {},\n theme,\n mediaState\n ];\n}\nexport {\n useProps,\n usePropsAndStyle,\n useStyle\n};\n//# sourceMappingURL=useProps.js.map\n"],"mappings":";;;;;;;;;;;;;;;AAaA,SAAS,SAAS,OAAO,MAAM;CAC7B,MAAM,CAAC,UAAU,YAAY,iBAAiB,OAAO;EACnD,GAAG;EACH,UAAU;EACV,aAAa;EACb,eAAe;CACjB,CAAC;CACD,OAAO;EACL,GAAG;EACH,GAAG;CACL;AACF;AACA,SAAS,SAAS,OAAO,MAAM;CAC7B,OAAO,iBAAiB,OAAO,IAAI,EAAE,MAAM,CAAC;AAC9C;AACA,SAAS,iBAAiB,OAAO,MAAM;CACrC,MAAM,eAAe,MAAM,cAAc,gBAAgB,KAAK;CAC9D,MAAM,CAAC,OAAO,cAAc,kBAAkB;EAC5C,MAAM,WAAW,QAAQ,MAAM,QAAQ,KAAK;EAC5C,cAAc;GACZ,OAAO;EACT;CACF,CAAC;CACD,MAAM,mBAAmB,MAAM,WAAW,gBAAgB;CAC1D,MAAM,eAAe,MAAM,WAAW,YAAY;CAClD,MAAM,EACJ,OAAO,eACP,OACA,UACA,UACA,oBACE,kBACF,OACA,iBAAiB,iBACjB,cACA,UAAU,CACZ;CACA,MAAM,gBAAgB,MAAM,UAE1B,aACE,SAAS;CACb,MAAM,cAAc,eAClB,eACA,cACA,OACA,YAAY,QAAQ,IACpB,OACA;EACE,YAAY;EACZ,YAAY;EACZ,QAAQ;EACR,cAAc;EACd,SAAS;EACT,eAAe;EACf,GAAG;CACL,GACA,MACA,kBACA,YACF;CACA,MAAM,EAAE,aAAa,iBAAiB,eAAe,CAAC;CACtD,gCAAgC;EAC9B,IAAI;EACJ,IAAI,aAAa,cAAc;GAC7B,MAAM,uBAAuB;IAC3B,UAAU,cAAc,EAAE,GAAG,SAAS,EAAE;GAC1C;GACA,kBAAkB,oBAAoB,cAAc;GACpD,eAAe;EACjB;EACA,IAAI,UAAU;GACZ,OAAO;EACT;EACA,IAAI,MAAM,WAAW;GACnB,gBAAgB,EAAE,WAAW,MAAM,CAAC;GACpC,OAAO;EACT;EACA,IAAI,cAAc;GAChB,MAAM,eAAe,wBAAwB;IAC3C;IACA;IACA;IACA;GACF,CAAC;GACD,IAAI,CAAC,iBAAiB,OAAO;GAC7B,aAAa;IACX,gBAAgB;IAChB,eAAe;GACjB;EACF;EACA,OAAO;CACT,GAAG;EACD;EACA;EACA,aAAa;EACb,eAAe,OAAO,KAAK,CAAC,GAAG,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI;EACzD,cAAc,OAAO,KAAK,CAAC,GAAG,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI;CACzD,CAAC;CACD,OAAO;EACL,aAAa,aAAa,CAAC;EAC3B,aAAa,SAAS,CAAC;EACvB;EACA;CACF;AACF"}
1
+ {"version":3,"file":"useProps.js","names":[],"sources":["esm/hooks/useProps.js"],"sourcesContent":["import { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getConfig } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { GroupContext } from \"../contexts/GroupContext\";\nimport { useSplitStyles } from \"../helpers/getSplitStyles\";\nimport { subscribeToSafeArea } from \"../helpers/resolveSafeAreaVariable\";\nimport { subscribeToContextGroup } from \"../helpers/subscribeToContextGroup\";\nimport { View } from \"../views/View\";\nimport { useComponentState } from \"./useComponentState\";\nimport { mediaState } from \"../helpers/mediaState\";\nimport { useMedia } from \"./useMedia\";\nimport { useThemeWithState } from \"./useTheme\";\nfunction useProps(props, opts) {\n const [propsOut, styleOut] = usePropsAndStyle(props, {\n ...opts,\n noExpand: true,\n noNormalize: true,\n resolveValues: \"none\"\n });\n return {\n ...propsOut,\n ...styleOut\n };\n}\nfunction useStyle(props, opts) {\n return usePropsAndStyle(props, opts)[1] || {};\n}\nfunction usePropsAndStyle(props, opts) {\n const staticConfig = opts?.forComponent?.staticConfig ?? View.staticConfig;\n const [theme, themeState] = useThemeWithState({\n name: \"theme\" in props ? props.theme : void 0,\n needsUpdate() {\n return true;\n }\n });\n const componentContext = React.useContext(ComponentContext);\n const groupContext = React.useContext(GroupContext);\n const {\n props: statefulProps,\n state,\n disabled,\n setState,\n setStateShallow\n } = useComponentState(\n props,\n componentContext.animationDriver,\n staticConfig,\n getConfig()\n );\n const mediaStateNow = opts?.noMedia ? (\n // not safe to use mediaState but really marginal to hit this\n mediaState\n ) : useMedia();\n const splitStyles = useSplitStyles(\n statefulProps,\n staticConfig,\n theme,\n themeState?.name || \"\",\n state,\n {\n isAnimated: false,\n mediaState: mediaStateNow,\n noSkip: true,\n noMergeStyle: true,\n noClass: true,\n resolveValues: \"auto\",\n ...opts\n },\n null,\n componentContext,\n groupContext\n );\n const { mediaGroups, pseudoGroups } = splitStyles || {};\n useIsomorphicLayoutEffect(() => {\n let disposeSafeArea;\n if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== \"disabled\" && splitStyles?.usesSafeArea) {\n const updateSafeArea = () => {\n setState((previous) => ({ ...previous }));\n };\n disposeSafeArea = subscribeToSafeArea(updateSafeArea);\n updateSafeArea();\n }\n if (disabled) {\n return disposeSafeArea;\n }\n if (state.unmounted) {\n setStateShallow({ unmounted: false });\n return disposeSafeArea;\n }\n if (groupContext) {\n const disposeGroup = subscribeToContextGroup({\n groupContext,\n setStateShallow,\n mediaGroups,\n pseudoGroups\n });\n if (!disposeSafeArea) return disposeGroup;\n return () => {\n disposeSafeArea();\n disposeGroup?.();\n };\n }\n return disposeSafeArea;\n }, [\n disabled,\n groupContext,\n splitStyles?.usesSafeArea,\n pseudoGroups ? Object.keys([...pseudoGroups]).join(\"\") : 0,\n mediaGroups ? Object.keys([...mediaGroups]).join(\"\") : 0\n ]);\n return [\n splitStyles?.viewProps || {},\n splitStyles?.style || {},\n theme,\n mediaState\n ];\n}\nexport {\n useProps,\n usePropsAndStyle,\n useStyle\n};\n//# sourceMappingURL=useProps.js.map\n"],"mappings":";;;;;;;;;;;;;;;AAaA,SAAS,SAAS,OAAO,MAAM;CAC7B,MAAM,CAAC,UAAU,YAAY,iBAAiB,OAAO;EACnD,GAAG;EACH,UAAU;EACV,aAAa;EACb,eAAe;CACjB,CAAC;CACD,OAAO;EACL,GAAG;EACH,GAAG;CACL;AACF;AACA,SAAS,SAAS,OAAO,MAAM;CAC7B,OAAO,iBAAiB,OAAO,IAAI,EAAE,MAAM,CAAC;AAC9C;AACA,SAAS,iBAAiB,OAAO,MAAM;CACrC,MAAM,eAAe,MAAM,cAAc,gBAAgB,KAAK;CAC9D,MAAM,CAAC,OAAO,cAAc,kBAAkB;EAC5C,MAAM,WAAW,QAAQ,MAAM,QAAQ,KAAK;EAC5C,cAAc;GACZ,OAAO;EACT;CACF,CAAC;CACD,MAAM,mBAAmB,MAAM,WAAW,gBAAgB;CAC1D,MAAM,eAAe,MAAM,WAAW,YAAY;CAClD,MAAM,EACJ,OAAO,eACP,OACA,UACA,UACA,oBACE,kBACF,OACA,iBAAiB,iBACjB,cACA,UAAU,CACZ;CACA,MAAM,gBAAgB,MAAM,UAE1B,aACE,SAAS;CACb,MAAM,cAAc,eAClB,eACA,cACA,OACA,YAAY,QAAQ,IACpB,OACA;EACE,YAAY;EACZ,YAAY;EACZ,QAAQ;EACR,cAAc;EACd,SAAS;EACT,eAAe;EACf,GAAG;CACL,GACA,MACA,kBACA,YACF;CACA,MAAM,EAAE,aAAa,iBAAiB,eAAe,CAAC;CACtD,gCAAgC;EAC9B,IAAI;EACJ,IAAI,QAAQ,IAAI,8BAA8B,cAAc,aAAa,cAAc;GACrF,MAAM,uBAAuB;IAC3B,UAAU,cAAc,EAAE,GAAG,SAAS,EAAE;GAC1C;GACA,kBAAkB,oBAAoB,cAAc;GACpD,eAAe;EACjB;EACA,IAAI,UAAU;GACZ,OAAO;EACT;EACA,IAAI,MAAM,WAAW;GACnB,gBAAgB,EAAE,WAAW,MAAM,CAAC;GACpC,OAAO;EACT;EACA,IAAI,cAAc;GAChB,MAAM,eAAe,wBAAwB;IAC3C;IACA;IACA;IACA;GACF,CAAC;GACD,IAAI,CAAC,iBAAiB,OAAO;GAC7B,aAAa;IACX,gBAAgB;IAChB,eAAe;GACjB;EACF;EACA,OAAO;CACT,GAAG;EACD;EACA;EACA,aAAa;EACb,eAAe,OAAO,KAAK,CAAC,GAAG,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI;EACzD,cAAc,OAAO,KAAK,CAAC,GAAG,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI;CACzD,CAAC;CACD,OAAO;EACL,aAAa,aAAa,CAAC;EAC3B,aAAa,SAAS,CAAC;EACvB;EACA;CACF;AACF"}
@@ -53,7 +53,7 @@ function usePropsAndStyle(props, opts) {
53
53
  var { mediaGroups, pseudoGroups } = splitStyles || {};
54
54
  useIsomorphicLayoutEffect(function() {
55
55
  var disposeSafeArea;
56
- if (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea) {
56
+ if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea)) {
57
57
  var updateSafeArea = function() {
58
58
  setState(function(previous) {
59
59
  return { ...previous };
@@ -1 +1 @@
1
- {"version":3,"file":"useProps.native.js","names":[],"sources":["esm/hooks/useProps.native.js"],"sourcesContent":["import { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getConfig } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { GroupContext } from \"../contexts/GroupContext\";\nimport { useSplitStyles } from \"../helpers/getSplitStyles\";\nimport { subscribeToSafeArea } from \"../helpers/resolveSafeAreaVariable\";\nimport { subscribeToContextGroup } from \"../helpers/subscribeToContextGroup\";\nimport { View } from \"../views/View\";\nimport { useComponentState } from \"./useComponentState\";\nimport { mediaState } from \"../helpers/mediaState\";\nimport { useMedia } from \"./useMedia\";\nimport { useThemeWithState } from \"./useTheme\";\nfunction useProps(props, opts) {\n var [propsOut, styleOut] = usePropsAndStyle(props, {\n ...opts,\n noExpand: true,\n noNormalize: true,\n resolveValues: \"none\"\n });\n return {\n ...propsOut,\n ...styleOut\n };\n}\nfunction useStyle(props, opts) {\n return usePropsAndStyle(props, opts)[1] || {};\n}\nfunction usePropsAndStyle(props, opts) {\n var _opts_forComponent;\n var _opts_forComponent_staticConfig;\n var staticConfig = (_opts_forComponent_staticConfig = opts === null || opts === void 0 ? void 0 : (_opts_forComponent = opts.forComponent) === null || _opts_forComponent === void 0 ? void 0 : _opts_forComponent.staticConfig) !== null && _opts_forComponent_staticConfig !== void 0 ? _opts_forComponent_staticConfig : View.staticConfig;\n var [theme, themeState] = useThemeWithState({\n name: \"theme\" in props ? props.theme : void 0,\n needsUpdate() {\n return true;\n }\n });\n var componentContext = React.useContext(ComponentContext);\n var groupContext = React.useContext(GroupContext);\n var { props: statefulProps, state, disabled, setState, setStateShallow } = useComponentState(props, componentContext.animationDriver, staticConfig, getConfig());\n var mediaStateNow = (opts === null || opts === void 0 ? void 0 : opts.noMedia) ? (\n // not safe to use mediaState but really marginal to hit this\n mediaState\n ) : useMedia();\n var splitStyles = useSplitStyles(statefulProps, staticConfig, theme, (themeState === null || themeState === void 0 ? void 0 : themeState.name) || \"\", state, {\n isAnimated: false,\n mediaState: mediaStateNow,\n noSkip: true,\n noMergeStyle: true,\n noClass: true,\n resolveValues: \"auto\",\n ...opts\n }, null, componentContext, groupContext);\n var { mediaGroups, pseudoGroups } = splitStyles || {};\n useIsomorphicLayoutEffect(function() {\n var disposeSafeArea;\n if (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea) {\n var updateSafeArea = function() {\n setState(function(previous) {\n return {\n ...previous\n };\n });\n };\n disposeSafeArea = subscribeToSafeArea(updateSafeArea);\n updateSafeArea();\n }\n if (disabled) {\n return disposeSafeArea;\n }\n if (state.unmounted) {\n setStateShallow({\n unmounted: false\n });\n return disposeSafeArea;\n }\n if (groupContext) {\n var disposeGroup = subscribeToContextGroup({\n groupContext,\n setStateShallow,\n mediaGroups,\n pseudoGroups\n });\n if (!disposeSafeArea) return disposeGroup;\n return function() {\n disposeSafeArea();\n disposeGroup === null || disposeGroup === void 0 ? void 0 : disposeGroup();\n };\n }\n return disposeSafeArea;\n }, [\n disabled,\n groupContext,\n splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea,\n pseudoGroups ? Object.keys([\n ...pseudoGroups\n ]).join(\"\") : 0,\n mediaGroups ? Object.keys([\n ...mediaGroups\n ]).join(\"\") : 0\n ]);\n return [\n (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.viewProps) || {},\n (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.style) || {},\n theme,\n mediaState\n ];\n}\nexport {\n useProps,\n usePropsAndStyle,\n useStyle\n};\n//# sourceMappingURL=useProps.js.map\n"],"mappings":";;;;;;;;;;;;;;;AAaA,SAAS,SAAS,OAAO,MAAM;CAC7B,IAAI,CAAC,UAAU,YAAY,iBAAiB,OAAO;EACjD,GAAG;EACH,UAAU;EACV,aAAa;EACb,eAAe;CACjB,CAAC;CACD,OAAO;EACL,GAAG;EACH,GAAG;CACL;AACF;AACA,SAAS,SAAS,OAAO,MAAM;CAC7B,OAAO,iBAAiB,OAAO,IAAI,EAAE,MAAM,CAAC;AAC9C;AACA,SAAS,iBAAi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C;GACD,OAAO;EACT;EACA,IAAI,cAAc;GAChB,IAAI,eAAe,wBAAwB;IACzC;IACA;IACA;IACA;GACF,CAAC;GACD,IAAI,CAAC,iBAAiB,OAAO;GAC7B,OAAO,WAAW;IAChB,gBAAgB;IAChB,iBAAiB,QAAQ,iBAAiB,KAAK,IAAI,KAAK,IAAI,aAAa;GAC3E;EACF;EACA,OAAO;CACT,GAAG;EACD;EACA;EACA,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY;EACtE,eAAe,OAAO,KAAK,CACzB,GAAG,YACL,CAAC,EAAE,KAAK,EAAE,IAAI;EACd,cAAc,OAAO,KAAK,CACxB,GAAG,WACL,CAAC,EAAE,KAAK,EAAE,IAAI;CAChB,CAAC;CACD,OAAO;GACJ,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,cAAc,CAAC;GACrF,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,UAAU,CAAC;EAClF;EACA;CACF;AACF"}
1
+ {"version":3,"file":"useProps.native.js","names":[],"sources":["esm/hooks/useProps.native.js"],"sourcesContent":["import { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getConfig } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { GroupContext } from \"../contexts/GroupContext\";\nimport { useSplitStyles } from \"../helpers/getSplitStyles\";\nimport { subscribeToSafeArea } from \"../helpers/resolveSafeAreaVariable\";\nimport { subscribeToContextGroup } from \"../helpers/subscribeToContextGroup\";\nimport { View } from \"../views/View\";\nimport { useComponentState } from \"./useComponentState\";\nimport { mediaState } from \"../helpers/mediaState\";\nimport { useMedia } from \"./useMedia\";\nimport { useThemeWithState } from \"./useTheme\";\nfunction useProps(props, opts) {\n var [propsOut, styleOut] = usePropsAndStyle(props, {\n ...opts,\n noExpand: true,\n noNormalize: true,\n resolveValues: \"none\"\n });\n return {\n ...propsOut,\n ...styleOut\n };\n}\nfunction useStyle(props, opts) {\n return usePropsAndStyle(props, opts)[1] || {};\n}\nfunction usePropsAndStyle(props, opts) {\n var _opts_forComponent;\n var _opts_forComponent_staticConfig;\n var staticConfig = (_opts_forComponent_staticConfig = opts === null || opts === void 0 ? void 0 : (_opts_forComponent = opts.forComponent) === null || _opts_forComponent === void 0 ? void 0 : _opts_forComponent.staticConfig) !== null && _opts_forComponent_staticConfig !== void 0 ? _opts_forComponent_staticConfig : View.staticConfig;\n var [theme, themeState] = useThemeWithState({\n name: \"theme\" in props ? props.theme : void 0,\n needsUpdate() {\n return true;\n }\n });\n var componentContext = React.useContext(ComponentContext);\n var groupContext = React.useContext(GroupContext);\n var { props: statefulProps, state, disabled, setState, setStateShallow } = useComponentState(props, componentContext.animationDriver, staticConfig, getConfig());\n var mediaStateNow = (opts === null || opts === void 0 ? void 0 : opts.noMedia) ? (\n // not safe to use mediaState but really marginal to hit this\n mediaState\n ) : useMedia();\n var splitStyles = useSplitStyles(statefulProps, staticConfig, theme, (themeState === null || themeState === void 0 ? void 0 : themeState.name) || \"\", state, {\n isAnimated: false,\n mediaState: mediaStateNow,\n noSkip: true,\n noMergeStyle: true,\n noClass: true,\n resolveValues: \"auto\",\n ...opts\n }, null, componentContext, groupContext);\n var { mediaGroups, pseudoGroups } = splitStyles || {};\n useIsomorphicLayoutEffect(function() {\n var disposeSafeArea;\n if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== \"disabled\" && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea)) {\n var updateSafeArea = function() {\n setState(function(previous) {\n return {\n ...previous\n };\n });\n };\n disposeSafeArea = subscribeToSafeArea(updateSafeArea);\n updateSafeArea();\n }\n if (disabled) {\n return disposeSafeArea;\n }\n if (state.unmounted) {\n setStateShallow({\n unmounted: false\n });\n return disposeSafeArea;\n }\n if (groupContext) {\n var disposeGroup = subscribeToContextGroup({\n groupContext,\n setStateShallow,\n mediaGroups,\n pseudoGroups\n });\n if (!disposeSafeArea) return disposeGroup;\n return function() {\n disposeSafeArea();\n disposeGroup === null || disposeGroup === void 0 ? void 0 : disposeGroup();\n };\n }\n return disposeSafeArea;\n }, [\n disabled,\n groupContext,\n splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea,\n pseudoGroups ? Object.keys([\n ...pseudoGroups\n ]).join(\"\") : 0,\n mediaGroups ? Object.keys([\n ...mediaGroups\n ]).join(\"\") : 0\n ]);\n return [\n (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.viewProps) || {},\n (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.style) || {},\n theme,\n mediaState\n ];\n}\nexport {\n useProps,\n usePropsAndStyle,\n useStyle\n};\n//# sourceMappingURL=useProps.js.map\n"],"mappings":";;;;;;;;;;;;;;;AAaA,SAAS,SAAS,OAAO,MAAM;CAC7B,IAAI,CAAC,UAAU,YAAY,iBAAiB,OAAO;EACjD,GAAG;EACH,UAAU;EACV,aAAa;EACb,eAAe;CACjB,CAAC;CACD,OAAO;EACL,GAAG;EACH,GAAG;CACL;AACF;AACA,SAAS,SAAS,OAAO,MAAM;CAC7B,OAAO,iBAAiB,OAAO,IAAI,EAAE,MAAM,CAAC;AAC9C;AACA,SAAS,iBAAiB,OAAO,MAAM;CACrC,IAAI;CACJ,IAAI;CACJ,IAAI,gBAAgB,kCAAkC,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,KAAK,qBAAqB,KAAK,kBAAkB,QAAQ,uBAAuB,KAAK,IAAI,KAAK,IAAI,mBAAmB,kBAAkB,QAAQ,oCAAoC,KAAK,IAAI,kCAAkC,KAAK;CACjU,IAAI,CAAC,OAAO,cAAc,kBAAkB;EAC1C,MAAM,WAAW,QAAQ,MAAM,QAAQ,KAAK;EAC5C,cAAc;GACZ,OAAO;EACT;CACF,CAAC;CACD,IAAI,mBAAmB,MAAM,WAAW,gBAAgB;CACxD,IAAI,eAAe,MAAM,WAAW,YAAY;CAChD,IAAI,EAAE,OAA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WACL,CAAC,EAAE,KAAK,EAAE,IAAI;CAChB,CAAC;CACD,OAAO;GACJ,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,cAAc,CAAC;GACrF,gBAAgB,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,YAAY,UAAU,CAAC;EAClF;EACA;CACF;AACF"}
@@ -175,7 +175,7 @@ const getSnapshotImpl = (r) => {
175
175
  const needsUpdate = props.passThrough ? false : optimizeForFirstRender ? true : isRoot || props.name === "light" || props.name === "dark" || props.name === null ? true : !HasRenderedOnce.get(keys) ? true : canSkipForSchemeChange ? false : keys?.current?.size ? true : props.needsUpdate?.();
176
176
  const [rerender, nextRaw] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
177
177
  let next = nextRaw;
178
- if (props.inlineValues && nextRaw?.theme) {
178
+ if (process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES !== "disabled" && props.inlineValues && nextRaw?.theme) {
179
179
  const merged = getMergedInlineTheme(states.get(parentId)?.theme || nextRaw.theme, props.inlineValues, nextRaw.name, getConfig());
180
180
  if (merged !== nextRaw.theme) next = {
181
181
  ...nextRaw,
@@ -349,7 +349,7 @@ function resolveThemeName(parentName, name, reset, themes2, forceUpdate = false)
349
349
  if (!forceUpdate && found === parentName && !validSchemes[found]) return null;
350
350
  return found;
351
351
  }
352
- const getPropsKey = ({ name, reset, forceClassName, inlineValues }) => `${name || ""}${reset || ""}${forceClassName || ""}${inlineValues ? getInlineValuesKey(inlineValues) : ""}`;
352
+ const getPropsKey = ({ name, reset, forceClassName, inlineValues }) => `${name || ""}${reset || ""}${forceClassName || ""}${process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES !== "disabled" && inlineValues ? getInlineValuesKey(inlineValues) : ""}`;
353
353
  const hasThemeUpdatingProps = (props) => "name" in props || "reset" in props || "forceClassName" in props || "inlineValues" in props;
354
354
 
355
355
  export { ThemeStateContext, forceUpdateThemes, getInlineThemeLayer, getNewThemeName, getRootThemeState, getThemeNameCacheSize, getThemeProviderChainSizes, getThemeProviderParent, getThemeState, hasThemeUpdatingProps, resolveThemeName, useThemeState };