@tamagui/web 3.0.0-beta.807.1 → 3.0.0-beta.881.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 (587) hide show
  1. package/dist/cjs/config.cjs +1 -1
  2. package/dist/cjs/config.native.cjs +1 -1
  3. package/dist/cjs/config.native.js +1 -1
  4. package/dist/cjs/config.native.js.map +1 -1
  5. package/dist/cjs/createComponent.cjs +40 -19
  6. package/dist/cjs/createComponent.native.cjs +42 -21
  7. package/dist/cjs/createComponent.native.js +42 -21
  8. package/dist/cjs/createComponent.native.js.map +1 -1
  9. package/dist/cjs/createStyledHOC.cjs +54 -4
  10. package/dist/cjs/createStyledHOC.native.cjs +55 -4
  11. package/dist/cjs/createStyledHOC.native.js +55 -4
  12. package/dist/cjs/createStyledHOC.native.js.map +1 -1
  13. package/dist/cjs/createTokens.cjs +1 -1
  14. package/dist/cjs/createTokens.native.cjs +1 -1
  15. package/dist/cjs/createTokens.native.js +1 -1
  16. package/dist/cjs/createTokens.native.js.map +1 -1
  17. package/dist/cjs/createVariable.cjs +0 -10
  18. package/dist/cjs/createVariable.native.cjs +0 -10
  19. package/dist/cjs/createVariable.native.js +0 -10
  20. package/dist/cjs/createVariable.native.js.map +1 -1
  21. package/dist/cjs/dom/html.cjs +147 -99
  22. package/dist/cjs/dom/htmlRuntime.native.cjs +6 -2
  23. package/dist/cjs/dom/htmlRuntime.native.js +6 -2
  24. package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
  25. package/dist/cjs/dom/primitives.native.cjs +16 -13
  26. package/dist/cjs/dom/primitives.native.js +16 -13
  27. package/dist/cjs/dom/primitives.native.js.map +1 -1
  28. package/dist/cjs/helpers/borderComponents.cjs +62 -0
  29. package/dist/cjs/helpers/borderComponents.native.cjs +82 -0
  30. package/dist/cjs/helpers/borderComponents.native.js +84 -0
  31. package/dist/cjs/helpers/borderComponents.native.js.map +1 -0
  32. package/dist/cjs/helpers/componentDisplayName.cjs +1 -11
  33. package/dist/cjs/helpers/componentDisplayName.native.cjs +1 -11
  34. package/dist/cjs/helpers/componentDisplayName.native.js +1 -11
  35. package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
  36. package/dist/cjs/helpers/createDesignSystem.cjs +0 -2
  37. package/dist/cjs/helpers/createStyledContext.cjs +10 -18
  38. package/dist/cjs/helpers/createStyledContext.native.cjs +14 -18
  39. package/dist/cjs/helpers/createStyledContext.native.js +14 -18
  40. package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
  41. package/dist/cjs/helpers/formatDiagnostic.cjs +8 -10
  42. package/dist/cjs/helpers/formatDiagnostic.native.cjs +8 -10
  43. package/dist/cjs/helpers/formatDiagnostic.native.js +8 -10
  44. package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
  45. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +133 -114
  46. package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +11 -3
  47. package/dist/cjs/helpers/getCSSStylesAtomic.native.js +11 -3
  48. package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
  49. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.cjs +13 -1
  50. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.cjs +15 -1
  51. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +15 -1
  52. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
  53. package/dist/cjs/helpers/getDynamicVal.cjs +5 -1
  54. package/dist/cjs/helpers/getDynamicVal.native.cjs +5 -1
  55. package/dist/cjs/helpers/getDynamicVal.native.js +5 -1
  56. package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
  57. package/dist/cjs/helpers/getSplitStyles.cjs +1063 -2168
  58. package/dist/cjs/helpers/getSplitStyles.native.cjs +1115 -2515
  59. package/dist/cjs/helpers/getSplitStyles.native.js +1115 -2515
  60. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  61. package/dist/cjs/helpers/grammarConfig.cjs +163 -1
  62. package/dist/cjs/helpers/grammarConfig.native.cjs +186 -1
  63. package/dist/cjs/helpers/grammarConfig.native.js +186 -1
  64. package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
  65. package/dist/cjs/helpers/insertStyleRule.cjs +5 -1
  66. package/dist/cjs/helpers/insertStyleRule.native.cjs +7 -1
  67. package/dist/cjs/helpers/insertStyleRule.native.js +7 -1
  68. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  69. package/dist/cjs/helpers/log.cjs +9 -8
  70. package/dist/cjs/helpers/log.native.cjs +9 -8
  71. package/dist/cjs/helpers/log.native.js +9 -8
  72. package/dist/cjs/helpers/log.native.js.map +1 -1
  73. package/dist/cjs/helpers/mergeVariants.cjs +44 -13
  74. package/dist/cjs/helpers/mergeVariants.native.cjs +79 -14
  75. package/dist/cjs/helpers/mergeVariants.native.js +79 -14
  76. package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
  77. package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
  78. package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
  79. package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
  80. package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
  81. package/dist/cjs/helpers/nativeStyleEngine.cjs +34 -14
  82. package/dist/cjs/helpers/nativeStyleEngine.native.cjs +36 -14
  83. package/dist/cjs/helpers/nativeStyleEngine.native.js +36 -14
  84. package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
  85. package/dist/cjs/helpers/normalizeValueWithProperty.cjs +7 -8
  86. package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +9 -8
  87. package/dist/cjs/helpers/normalizeValueWithProperty.native.js +9 -8
  88. package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
  89. package/dist/cjs/helpers/parseBorderShorthand.native.cjs +25 -56
  90. package/dist/cjs/helpers/parseBorderShorthand.native.js +25 -56
  91. package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
  92. package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +9 -49
  93. package/dist/cjs/helpers/parseOutlineShorthand.native.js +9 -49
  94. package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
  95. package/dist/cjs/helpers/resolveSafeArea.cjs +35 -100
  96. package/dist/cjs/helpers/resolveVariantStyle.cjs +57 -0
  97. package/dist/cjs/helpers/resolveVariantStyle.native.cjs +67 -0
  98. package/dist/cjs/helpers/resolveVariantStyle.native.js +69 -0
  99. package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -0
  100. package/dist/cjs/helpers/splitStyleProps.cjs +46 -0
  101. package/dist/cjs/helpers/splitStyleProps.native.cjs +49 -0
  102. package/dist/cjs/helpers/splitStyleProps.native.js +51 -0
  103. package/dist/cjs/helpers/splitStyleProps.native.js.map +1 -0
  104. package/dist/cjs/helpers/{getDefaultProps.native.cjs → styleStaticConfig.cjs} +7 -8
  105. package/dist/cjs/helpers/{getDefaultProps.native.js → styleStaticConfig.native.cjs} +7 -8
  106. package/dist/cjs/helpers/styleStaticConfig.native.js +31 -0
  107. package/dist/cjs/helpers/styleStaticConfig.native.js.map +1 -0
  108. package/dist/cjs/helpers/styleStaticConfigCore.cjs +107 -0
  109. package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +127 -0
  110. package/dist/cjs/helpers/styleStaticConfigCore.native.js +129 -0
  111. package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -0
  112. package/dist/cjs/helpers/styledDynamic.cjs +160 -0
  113. package/dist/cjs/helpers/styledDynamic.native.cjs +195 -0
  114. package/dist/cjs/helpers/styledDynamic.native.js +197 -0
  115. package/dist/cjs/helpers/styledDynamic.native.js.map +1 -0
  116. package/dist/cjs/helpers/tokenCategories.cjs +12 -74
  117. package/dist/cjs/helpers/tokenCategories.native.cjs +12 -76
  118. package/dist/cjs/helpers/tokenCategories.native.js +12 -76
  119. package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
  120. package/dist/cjs/helpers/variableValue.cjs +17 -12
  121. package/dist/cjs/helpers/variableValue.native.cjs +46 -23
  122. package/dist/cjs/helpers/variableValue.native.js +46 -23
  123. package/dist/cjs/helpers/variableValue.native.js.map +1 -1
  124. package/dist/cjs/helpers/warnOnce.cjs +5 -4
  125. package/dist/cjs/helpers/warnOnce.native.cjs +6 -4
  126. package/dist/cjs/helpers/warnOnce.native.js +6 -4
  127. package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
  128. package/dist/cjs/hooks/useAnimationDriver.cjs +2 -2
  129. package/dist/cjs/hooks/useAnimationDriver.native.cjs +2 -2
  130. package/dist/cjs/hooks/useAnimationDriver.native.js +2 -2
  131. package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
  132. package/dist/cjs/hooks/useComponentState.cjs +41 -82
  133. package/dist/cjs/hooks/useComponentState.native.cjs +45 -84
  134. package/dist/cjs/hooks/useComponentState.native.js +45 -84
  135. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  136. package/dist/cjs/hooks/useMedia.cjs +2 -2
  137. package/dist/cjs/hooks/useMedia.native.cjs +2 -2
  138. package/dist/cjs/hooks/useMedia.native.js +2 -2
  139. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  140. package/dist/cjs/hooks/useSplitStyles.cjs +2 -2
  141. package/dist/cjs/hooks/useSplitStyles.native.cjs +2 -2
  142. package/dist/cjs/hooks/useSplitStyles.native.js +2 -2
  143. package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
  144. package/dist/cjs/{helpers/getDefaultProps.cjs → hooks/useStyle.cjs} +10 -4
  145. package/dist/cjs/{helpers/directStyleCSS.native.js → hooks/useStyle.native.cjs} +16 -6
  146. package/dist/cjs/hooks/useStyle.native.js +34 -0
  147. package/dist/cjs/hooks/useStyle.native.js.map +1 -0
  148. package/dist/cjs/hooks/useThemeState.cjs +25 -90
  149. package/dist/cjs/hooks/useThemeState.native.cjs +34 -94
  150. package/dist/cjs/hooks/useThemeState.native.js +34 -94
  151. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  152. package/dist/cjs/index.cjs +9 -12
  153. package/dist/cjs/index.native.cjs +9 -12
  154. package/dist/cjs/index.native.js +9 -12
  155. package/dist/cjs/index.native.js.map +1 -1
  156. package/dist/cjs/internal-runtime.cjs +8 -7
  157. package/dist/cjs/internal-runtime.native.cjs +8 -7
  158. package/dist/cjs/internal-runtime.native.js +8 -7
  159. package/dist/cjs/internal-runtime.native.js.map +1 -1
  160. package/dist/cjs/static-resolve.cjs +8 -7
  161. package/dist/cjs/static-resolve.native.cjs +8 -7
  162. package/dist/cjs/static-resolve.native.js +8 -7
  163. package/dist/cjs/static-resolve.native.js.map +1 -1
  164. package/dist/cjs/style.cjs +91 -0
  165. package/dist/cjs/style.native.cjs +98 -0
  166. package/dist/cjs/style.native.js +100 -0
  167. package/dist/cjs/style.native.js.map +1 -0
  168. package/dist/cjs/styled.cjs +15 -62
  169. package/dist/cjs/styled.native.cjs +15 -64
  170. package/dist/cjs/styled.native.js +15 -64
  171. package/dist/cjs/styled.native.js.map +1 -1
  172. package/dist/cjs/types.cjs +4 -22
  173. package/dist/cjs/types.native.cjs +4 -22
  174. package/dist/cjs/types.native.js +4 -22
  175. package/dist/cjs/types.native.js.map +1 -1
  176. package/dist/cjs/views/TamaguiProvider.cjs +1 -2
  177. package/dist/cjs/views/TamaguiProvider.native.cjs +1 -2
  178. package/dist/cjs/views/TamaguiProvider.native.js +1 -2
  179. package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
  180. package/dist/cjs/views/Text.cjs +21 -14
  181. package/dist/cjs/views/Text.native.cjs +5 -2
  182. package/dist/cjs/views/Text.native.js +5 -2
  183. package/dist/cjs/views/Text.native.js.map +1 -1
  184. package/dist/cjs/views/Theme.cjs +2 -2
  185. package/dist/cjs/views/Theme.native.cjs +2 -2
  186. package/dist/cjs/views/Theme.native.js +2 -2
  187. package/dist/cjs/views/Theme.native.js.map +1 -1
  188. package/dist/cjs/views/ThemeDebug.cjs +1 -4
  189. package/dist/cjs/views/View.cjs +4 -2
  190. package/dist/cjs/views/View.native.cjs +4 -2
  191. package/dist/cjs/views/View.native.js +4 -2
  192. package/dist/cjs/views/View.native.js.map +1 -1
  193. package/dist/esm/config.mjs +1 -1
  194. package/dist/esm/config.mjs.map +1 -1
  195. package/dist/esm/config.native.js +1 -1
  196. package/dist/esm/config.native.js.map +1 -1
  197. package/dist/esm/createComponent.mjs +41 -20
  198. package/dist/esm/createComponent.mjs.map +1 -1
  199. package/dist/esm/createComponent.native.js +43 -22
  200. package/dist/esm/createComponent.native.js.map +1 -1
  201. package/dist/esm/createStyledHOC.mjs +55 -5
  202. package/dist/esm/createStyledHOC.mjs.map +1 -1
  203. package/dist/esm/createStyledHOC.native.js +56 -5
  204. package/dist/esm/createStyledHOC.native.js.map +1 -1
  205. package/dist/esm/createTokens.mjs +1 -1
  206. package/dist/esm/createTokens.mjs.map +1 -1
  207. package/dist/esm/createTokens.native.js +1 -1
  208. package/dist/esm/createTokens.native.js.map +1 -1
  209. package/dist/esm/createVariable.mjs +1 -9
  210. package/dist/esm/createVariable.mjs.map +1 -1
  211. package/dist/esm/createVariable.native.js +1 -9
  212. package/dist/esm/createVariable.native.js.map +1 -1
  213. package/dist/esm/dom/html.mjs +147 -99
  214. package/dist/esm/dom/html.mjs.map +1 -1
  215. package/dist/esm/dom/htmlRuntime.native.js +7 -3
  216. package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
  217. package/dist/esm/dom/primitives.native.js +16 -13
  218. package/dist/esm/dom/primitives.native.js.map +1 -1
  219. package/dist/esm/helpers/borderComponents.mjs +37 -0
  220. package/dist/esm/helpers/borderComponents.mjs.map +1 -0
  221. package/dist/esm/helpers/borderComponents.native.js +55 -0
  222. package/dist/esm/helpers/borderComponents.native.js.map +1 -0
  223. package/dist/esm/helpers/componentDisplayName.mjs +1 -8
  224. package/dist/esm/helpers/componentDisplayName.mjs.map +1 -1
  225. package/dist/esm/helpers/componentDisplayName.native.js +1 -8
  226. package/dist/esm/helpers/componentDisplayName.native.js.map +1 -1
  227. package/dist/esm/helpers/createDesignSystem.mjs +0 -2
  228. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  229. package/dist/esm/helpers/createStyledContext.mjs +10 -18
  230. package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
  231. package/dist/esm/helpers/createStyledContext.native.js +14 -18
  232. package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
  233. package/dist/esm/helpers/formatDiagnostic.mjs +8 -10
  234. package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
  235. package/dist/esm/helpers/formatDiagnostic.native.js +8 -10
  236. package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
  237. package/dist/esm/helpers/getCSSStylesAtomic.mjs +131 -114
  238. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  239. package/dist/esm/helpers/getCSSStylesAtomic.native.js +7 -4
  240. package/dist/esm/helpers/getCSSStylesAtomic.native.js.map +1 -1
  241. package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +8 -1
  242. package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -1
  243. package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +10 -1
  244. package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -1
  245. package/dist/esm/helpers/getDynamicVal.mjs +5 -1
  246. package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
  247. package/dist/esm/helpers/getDynamicVal.native.js +5 -1
  248. package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
  249. package/dist/esm/helpers/getSplitStyles.mjs +1052 -2151
  250. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  251. package/dist/esm/helpers/getSplitStyles.native.js +1090 -2481
  252. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  253. package/dist/esm/helpers/grammarConfig.mjs +164 -2
  254. package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
  255. package/dist/esm/helpers/grammarConfig.native.js +187 -2
  256. package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
  257. package/dist/esm/helpers/insertStyleRule.mjs +5 -2
  258. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  259. package/dist/esm/helpers/insertStyleRule.native.js +7 -2
  260. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  261. package/dist/esm/helpers/log.mjs +9 -8
  262. package/dist/esm/helpers/log.mjs.map +1 -1
  263. package/dist/esm/helpers/log.native.js +9 -8
  264. package/dist/esm/helpers/log.native.js.map +1 -1
  265. package/dist/esm/helpers/mergeVariants.mjs +44 -13
  266. package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
  267. package/dist/esm/helpers/mergeVariants.native.js +79 -14
  268. package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
  269. package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
  270. package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
  271. package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
  272. package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
  273. package/dist/esm/helpers/nativeStyleEngine.mjs +34 -15
  274. package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
  275. package/dist/esm/helpers/nativeStyleEngine.native.js +36 -15
  276. package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
  277. package/dist/esm/helpers/normalizeValueWithProperty.mjs +7 -8
  278. package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
  279. package/dist/esm/helpers/normalizeValueWithProperty.native.js +9 -8
  280. package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
  281. package/dist/esm/helpers/parseBorderShorthand.native.js +23 -56
  282. package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
  283. package/dist/esm/helpers/parseOutlineShorthand.native.js +10 -49
  284. package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
  285. package/dist/esm/helpers/resolveSafeArea.mjs +35 -97
  286. package/dist/esm/helpers/resolveSafeArea.mjs.map +1 -1
  287. package/dist/esm/helpers/resolveVariantStyle.mjs +38 -0
  288. package/dist/esm/helpers/resolveVariantStyle.mjs.map +1 -0
  289. package/dist/esm/helpers/resolveVariantStyle.native.js +46 -0
  290. package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -0
  291. package/dist/esm/helpers/splitStyleProps.mjs +27 -0
  292. package/dist/esm/helpers/splitStyleProps.mjs.map +1 -0
  293. package/dist/esm/helpers/splitStyleProps.native.js +28 -0
  294. package/dist/esm/helpers/splitStyleProps.native.js.map +1 -0
  295. package/dist/esm/helpers/styleStaticConfig.mjs +8 -0
  296. package/dist/esm/helpers/styleStaticConfig.mjs.map +1 -0
  297. package/dist/esm/helpers/styleStaticConfig.native.js +8 -0
  298. package/dist/esm/helpers/styleStaticConfig.native.js.map +1 -0
  299. package/dist/esm/helpers/styleStaticConfigCore.mjs +88 -0
  300. package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -0
  301. package/dist/esm/helpers/styleStaticConfigCore.native.js +106 -0
  302. package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -0
  303. package/dist/esm/helpers/styledDynamic.mjs +136 -0
  304. package/dist/esm/helpers/styledDynamic.mjs.map +1 -0
  305. package/dist/esm/helpers/styledDynamic.native.js +169 -0
  306. package/dist/esm/helpers/styledDynamic.native.js.map +1 -0
  307. package/dist/esm/helpers/tokenCategories.mjs +12 -72
  308. package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
  309. package/dist/esm/helpers/tokenCategories.native.js +12 -74
  310. package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
  311. package/dist/esm/helpers/variableValue.mjs +17 -12
  312. package/dist/esm/helpers/variableValue.mjs.map +1 -1
  313. package/dist/esm/helpers/variableValue.native.js +46 -23
  314. package/dist/esm/helpers/variableValue.native.js.map +1 -1
  315. package/dist/esm/helpers/warnOnce.mjs +5 -4
  316. package/dist/esm/helpers/warnOnce.mjs.map +1 -1
  317. package/dist/esm/helpers/warnOnce.native.js +6 -4
  318. package/dist/esm/helpers/warnOnce.native.js.map +1 -1
  319. package/dist/esm/hooks/useAnimationDriver.mjs +2 -2
  320. package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
  321. package/dist/esm/hooks/useAnimationDriver.native.js +2 -2
  322. package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
  323. package/dist/esm/hooks/useComponentState.mjs +41 -82
  324. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  325. package/dist/esm/hooks/useComponentState.native.js +45 -84
  326. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  327. package/dist/esm/hooks/useMedia.mjs +2 -2
  328. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  329. package/dist/esm/hooks/useMedia.native.js +2 -2
  330. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  331. package/dist/esm/hooks/useSplitStyles.mjs +2 -2
  332. package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
  333. package/dist/esm/hooks/useSplitStyles.native.js +2 -2
  334. package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
  335. package/dist/esm/hooks/useStyle.mjs +11 -0
  336. package/dist/esm/hooks/useStyle.mjs.map +1 -0
  337. package/dist/esm/hooks/useStyle.native.js +11 -0
  338. package/dist/esm/hooks/useStyle.native.js.map +1 -0
  339. package/dist/esm/hooks/useThemeState.mjs +25 -90
  340. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  341. package/dist/esm/hooks/useThemeState.native.js +34 -94
  342. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  343. package/dist/esm/index.js +8 -8
  344. package/dist/esm/index.mjs +8 -8
  345. package/dist/esm/index.native.js +8 -8
  346. package/dist/esm/internal-runtime.mjs +8 -7
  347. package/dist/esm/internal-runtime.mjs.map +1 -1
  348. package/dist/esm/internal-runtime.native.js +8 -7
  349. package/dist/esm/internal-runtime.native.js.map +1 -1
  350. package/dist/esm/static-resolve.mjs +11 -9
  351. package/dist/esm/static-resolve.mjs.map +1 -1
  352. package/dist/esm/static-resolve.native.js +11 -9
  353. package/dist/esm/static-resolve.native.js.map +1 -1
  354. package/dist/esm/style.mjs +58 -0
  355. package/dist/esm/style.mjs.map +1 -0
  356. package/dist/esm/style.native.js +63 -0
  357. package/dist/esm/style.native.js.map +1 -0
  358. package/dist/esm/styled.mjs +17 -62
  359. package/dist/esm/styled.mjs.map +1 -1
  360. package/dist/esm/styled.native.js +17 -64
  361. package/dist/esm/styled.native.js.map +1 -1
  362. package/dist/esm/types.mjs +3 -21
  363. package/dist/esm/types.mjs.map +1 -1
  364. package/dist/esm/types.native.js +3 -21
  365. package/dist/esm/types.native.js.map +1 -1
  366. package/dist/esm/views/TamaguiProvider.mjs +1 -2
  367. package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
  368. package/dist/esm/views/TamaguiProvider.native.js +1 -2
  369. package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
  370. package/dist/esm/views/Text.mjs +21 -14
  371. package/dist/esm/views/Text.mjs.map +1 -1
  372. package/dist/esm/views/Text.native.js +4 -2
  373. package/dist/esm/views/Text.native.js.map +1 -1
  374. package/dist/esm/views/Theme.mjs +2 -2
  375. package/dist/esm/views/Theme.mjs.map +1 -1
  376. package/dist/esm/views/Theme.native.js +2 -2
  377. package/dist/esm/views/Theme.native.js.map +1 -1
  378. package/dist/esm/views/ThemeDebug.mjs +1 -4
  379. package/dist/esm/views/ThemeDebug.mjs.map +1 -1
  380. package/dist/esm/views/View.mjs +4 -2
  381. package/dist/esm/views/View.mjs.map +1 -1
  382. package/dist/esm/views/View.native.js +4 -2
  383. package/dist/esm/views/View.native.js.map +1 -1
  384. package/package.json +15 -15
  385. package/src/config.ts +1 -1
  386. package/src/createComponent.tsx +62 -31
  387. package/src/createStyledHOC.tsx +56 -9
  388. package/src/createTokens.ts +1 -1
  389. package/src/createVariable.ts +0 -10
  390. package/src/dom/html.tsx +778 -877
  391. package/src/dom/htmlRuntime.native.tsx +7 -3
  392. package/src/dom/primitives.native.tsx +30 -39
  393. package/src/helpers/borderComponents.ts +62 -0
  394. package/src/helpers/componentDisplayName.ts +0 -11
  395. package/src/helpers/createDesignSystem.ts +0 -2
  396. package/src/helpers/createStyledContext.tsx +15 -53
  397. package/src/helpers/formatDiagnostic.ts +11 -13
  398. package/src/helpers/getCSSStylesAtomic.native.ts +6 -3
  399. package/src/helpers/getCSSStylesAtomic.ts +197 -206
  400. package/src/helpers/getCSSStylesAtomicCompiled.ts +13 -1
  401. package/src/helpers/getDynamicVal.ts +4 -0
  402. package/src/helpers/getSplitStyles.tsx +2058 -4052
  403. package/src/helpers/grammarConfig.ts +218 -1
  404. package/src/helpers/insertStyleRule.tsx +4 -2
  405. package/src/helpers/log.ts +12 -11
  406. package/src/helpers/mergeVariants.ts +55 -18
  407. package/src/helpers/nativeOnlyProps.ts +0 -1
  408. package/src/helpers/nativeStyleEngine.ts +55 -14
  409. package/src/helpers/normalizeValueWithProperty.ts +10 -12
  410. package/src/helpers/parseBorderShorthand.native.ts +23 -45
  411. package/src/helpers/parseOutlineShorthand.native.ts +9 -40
  412. package/src/helpers/resolveSafeArea.ts +34 -101
  413. package/src/helpers/resolveVariantStyle.ts +77 -0
  414. package/src/helpers/splitStyleProps.ts +166 -0
  415. package/src/helpers/styleFrontend.ts +16 -9
  416. package/src/helpers/styleStaticConfig.ts +21 -0
  417. package/src/helpers/styleStaticConfigCore.ts +110 -0
  418. package/src/helpers/styledDynamic.ts +191 -0
  419. package/src/helpers/tokenCategories.ts +32 -88
  420. package/src/helpers/variableValue.ts +20 -15
  421. package/src/helpers/warnOnce.ts +5 -4
  422. package/src/hooks/useAnimationDriver.ts +6 -2
  423. package/src/hooks/useComponentState.ts +55 -183
  424. package/src/hooks/useMedia.tsx +10 -8
  425. package/src/hooks/useSplitStyles.tsx +17 -2
  426. package/src/hooks/useStyle.ts +10 -0
  427. package/src/hooks/useTheme.tsx +1 -1
  428. package/src/hooks/useThemeState.ts +51 -264
  429. package/src/index.ts +14 -10
  430. package/src/internal-runtime.ts +10 -9
  431. package/src/internalRuntimeTypes.ts +1 -0
  432. package/src/static-resolve.ts +25 -18
  433. package/src/style.ts +97 -0
  434. package/src/styled.tsx +46 -332
  435. package/src/types.tsx +107 -192
  436. package/src/views/TamaguiProvider.tsx +0 -2
  437. package/src/views/Text.tsx +26 -21
  438. package/src/views/Theme.tsx +10 -8
  439. package/src/views/ThemeDebug.tsx +0 -1
  440. package/src/views/View.tsx +6 -7
  441. package/types/createComponent.d.ts.map +1 -1
  442. package/types/createStyledHOC.d.ts.map +1 -1
  443. package/types/createVariable.d.ts +0 -2
  444. package/types/createVariable.d.ts.map +1 -1
  445. package/types/dom/html.d.ts.map +1 -1
  446. package/types/dom/htmlRuntime.native.d.ts.map +1 -1
  447. package/types/dom/primitives.native.d.ts.map +1 -1
  448. package/types/helpers/borderComponents.d.ts +10 -0
  449. package/types/helpers/borderComponents.d.ts.map +1 -0
  450. package/types/helpers/componentDisplayName.d.ts +0 -3
  451. package/types/helpers/componentDisplayName.d.ts.map +1 -1
  452. package/types/helpers/createDesignSystem.d.ts.map +1 -1
  453. package/types/helpers/createStyledContext.d.ts.map +1 -1
  454. package/types/helpers/formatDiagnostic.d.ts.map +1 -1
  455. package/types/helpers/getCSSStylesAtomic.d.ts +25 -22
  456. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  457. package/types/helpers/getCSSStylesAtomic.native.d.ts +5 -0
  458. package/types/helpers/getCSSStylesAtomic.native.d.ts.map +1 -1
  459. package/types/helpers/getCSSStylesAtomicCompiled.d.ts +6 -1
  460. package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -1
  461. package/types/helpers/getDynamicVal.d.ts.map +1 -1
  462. package/types/helpers/getSplitStyles.d.ts +9 -11
  463. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  464. package/types/helpers/grammarConfig.d.ts +25 -2
  465. package/types/helpers/grammarConfig.d.ts.map +1 -1
  466. package/types/helpers/insertStyleRule.d.ts +1 -0
  467. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  468. package/types/helpers/log.d.ts.map +1 -1
  469. package/types/helpers/mergeVariants.d.ts.map +1 -1
  470. package/types/helpers/nativeOnlyProps.d.ts +0 -1
  471. package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
  472. package/types/helpers/nativeStyleEngine.d.ts +6 -0
  473. package/types/helpers/nativeStyleEngine.d.ts.map +1 -1
  474. package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
  475. package/types/helpers/parseBorderShorthand.native.d.ts +1 -0
  476. package/types/helpers/parseBorderShorthand.native.d.ts.map +1 -1
  477. package/types/helpers/parseOutlineShorthand.native.d.ts.map +1 -1
  478. package/types/helpers/resolveSafeArea.d.ts +0 -1
  479. package/types/helpers/resolveSafeArea.d.ts.map +1 -1
  480. package/types/helpers/resolveVariantStyle.d.ts +3 -0
  481. package/types/helpers/resolveVariantStyle.d.ts.map +1 -0
  482. package/types/helpers/splitStyleProps.d.ts +44 -0
  483. package/types/helpers/splitStyleProps.d.ts.map +1 -0
  484. package/types/helpers/styleFrontend.d.ts +7 -9
  485. package/types/helpers/styleFrontend.d.ts.map +1 -1
  486. package/types/helpers/styleStaticConfig.d.ts +14 -0
  487. package/types/helpers/styleStaticConfig.d.ts.map +1 -0
  488. package/types/helpers/styleStaticConfigCore.d.ts +4 -0
  489. package/types/helpers/styleStaticConfigCore.d.ts.map +1 -0
  490. package/types/helpers/styledDynamic.d.ts +18 -0
  491. package/types/helpers/styledDynamic.d.ts.map +1 -0
  492. package/types/helpers/tokenCategories.d.ts +0 -1
  493. package/types/helpers/tokenCategories.d.ts.map +1 -1
  494. package/types/helpers/variableValue.d.ts.map +1 -1
  495. package/types/helpers/warnOnce.d.ts.map +1 -1
  496. package/types/helpers/webPropsToSkip.native.d.ts +68 -68
  497. package/types/hooks/useAnimationDriver.d.ts.map +1 -1
  498. package/types/hooks/useComponentState.d.ts.map +1 -1
  499. package/types/hooks/useMedia.d.ts.map +1 -1
  500. package/types/hooks/useSplitStyles.d.ts.map +1 -1
  501. package/types/hooks/useStyle.d.ts +4 -0
  502. package/types/hooks/useStyle.d.ts.map +1 -0
  503. package/types/hooks/useThemeState.d.ts +1 -11
  504. package/types/hooks/useThemeState.d.ts.map +1 -1
  505. package/types/index.d.ts +8 -8
  506. package/types/index.d.ts.map +1 -1
  507. package/types/internal-runtime.d.ts.map +1 -1
  508. package/types/internalRuntimeTypes.d.ts +1 -1
  509. package/types/internalRuntimeTypes.d.ts.map +1 -1
  510. package/types/static-resolve.d.ts +2 -2
  511. package/types/static-resolve.d.ts.map +1 -1
  512. package/types/style.d.ts +18 -0
  513. package/types/style.d.ts.map +1 -0
  514. package/types/styled.d.ts +12 -48
  515. package/types/styled.d.ts.map +1 -1
  516. package/types/types.d.ts +75 -60
  517. package/types/types.d.ts.map +1 -1
  518. package/types/views/TamaguiProvider.d.ts +1 -1
  519. package/types/views/TamaguiProvider.d.ts.map +1 -1
  520. package/types/views/Text.d.ts.map +1 -1
  521. package/types/views/Theme.d.ts.map +1 -1
  522. package/types/views/ThemeDebug.d.ts.map +1 -1
  523. package/types/views/View.d.ts.map +1 -1
  524. package/dist/cjs/helpers/directStyleCSS.cjs +0 -348
  525. package/dist/cjs/helpers/directStyleCSS.native.cjs +0 -20
  526. package/dist/cjs/helpers/directStyleCSS.native.js.map +0 -1
  527. package/dist/cjs/helpers/directStyleCSSCompiled.cjs +0 -40
  528. package/dist/cjs/helpers/directStyleCSSCompiled.native.cjs +0 -46
  529. package/dist/cjs/helpers/directStyleCSSCompiled.native.js +0 -48
  530. package/dist/cjs/helpers/directStyleCSSCompiled.native.js.map +0 -1
  531. package/dist/cjs/helpers/getDefaultProps.native.js.map +0 -1
  532. package/dist/cjs/helpers/getVariantExtras.cjs +0 -91
  533. package/dist/cjs/helpers/getVariantExtras.native.cjs +0 -94
  534. package/dist/cjs/helpers/getVariantExtras.native.js +0 -96
  535. package/dist/cjs/helpers/getVariantExtras.native.js.map +0 -1
  536. package/dist/cjs/helpers/themeable.cjs +0 -92
  537. package/dist/cjs/helpers/themeable.native.cjs +0 -95
  538. package/dist/cjs/helpers/themeable.native.js +0 -97
  539. package/dist/cjs/helpers/themeable.native.js.map +0 -1
  540. package/dist/cjs/hooks/useProps.cjs +0 -129
  541. package/dist/cjs/hooks/useProps.native.cjs +0 -135
  542. package/dist/cjs/hooks/useProps.native.js +0 -137
  543. package/dist/cjs/hooks/useProps.native.js.map +0 -1
  544. package/dist/esm/helpers/directStyleCSS.mjs +0 -320
  545. package/dist/esm/helpers/directStyleCSS.mjs.map +0 -1
  546. package/dist/esm/helpers/directStyleCSS.native.js +0 -1
  547. package/dist/esm/helpers/directStyleCSSCompiled.mjs +0 -11
  548. package/dist/esm/helpers/directStyleCSSCompiled.mjs.map +0 -1
  549. package/dist/esm/helpers/directStyleCSSCompiled.native.js +0 -15
  550. package/dist/esm/helpers/directStyleCSSCompiled.native.js.map +0 -1
  551. package/dist/esm/helpers/getDefaultProps.mjs +0 -4
  552. package/dist/esm/helpers/getDefaultProps.mjs.map +0 -1
  553. package/dist/esm/helpers/getDefaultProps.native.js +0 -6
  554. package/dist/esm/helpers/getDefaultProps.native.js.map +0 -1
  555. package/dist/esm/helpers/getVariantExtras.mjs +0 -69
  556. package/dist/esm/helpers/getVariantExtras.mjs.map +0 -1
  557. package/dist/esm/helpers/getVariantExtras.native.js +0 -70
  558. package/dist/esm/helpers/getVariantExtras.native.js.map +0 -1
  559. package/dist/esm/helpers/themeable.mjs +0 -67
  560. package/dist/esm/helpers/themeable.mjs.map +0 -1
  561. package/dist/esm/helpers/themeable.native.js +0 -68
  562. package/dist/esm/helpers/themeable.native.js.map +0 -1
  563. package/dist/esm/hooks/useProps.mjs +0 -100
  564. package/dist/esm/hooks/useProps.mjs.map +0 -1
  565. package/dist/esm/hooks/useProps.native.js +0 -104
  566. package/dist/esm/hooks/useProps.native.js.map +0 -1
  567. package/src/helpers/directStyleCSS.native.ts +0 -1
  568. package/src/helpers/directStyleCSS.ts +0 -534
  569. package/src/helpers/directStyleCSSCompiled.ts +0 -32
  570. package/src/helpers/getDefaultProps.ts +0 -3
  571. package/src/helpers/getVariantExtras.tsx +0 -95
  572. package/src/helpers/themeable.tsx +0 -96
  573. package/src/hooks/useProps.tsx +0 -186
  574. package/types/helpers/directStyleCSS.d.ts +0 -28
  575. package/types/helpers/directStyleCSS.d.ts.map +0 -1
  576. package/types/helpers/directStyleCSS.native.d.ts +0 -2
  577. package/types/helpers/directStyleCSS.native.d.ts.map +0 -1
  578. package/types/helpers/directStyleCSSCompiled.d.ts +0 -10
  579. package/types/helpers/directStyleCSSCompiled.d.ts.map +0 -1
  580. package/types/helpers/getDefaultProps.d.ts +0 -3
  581. package/types/helpers/getDefaultProps.d.ts.map +0 -1
  582. package/types/helpers/getVariantExtras.d.ts +0 -4
  583. package/types/helpers/getVariantExtras.d.ts.map +0 -1
  584. package/types/helpers/themeable.d.ts +0 -3
  585. package/types/helpers/themeable.d.ts.map +0 -1
  586. package/types/hooks/useProps.d.ts +0 -39
  587. package/types/hooks/useProps.d.ts.map +0 -1
@@ -0,0 +1,107 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+ var styleStaticConfigCore_exports = {};
22
+ __export(styleStaticConfigCore_exports, { resolveStyleStaticConfig: () => resolveStyleStaticConfig });
23
+ module.exports = __toCommonJS(styleStaticConfigCore_exports);
24
+ var import_helpers = require("@tamagui/helpers");
25
+ var import_style = require("../style.cjs");
26
+ const styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
27
+ function resolveStyleStaticConfig(staticConfig, conf, revision) {
28
+ let configCache = styleStaticConfigCache.get(staticConfig);
29
+ const cached = configCache?.get(conf);
30
+ if (cached?.revision === revision) return cached.value;
31
+ const normalized = staticConfig.styleFrontend?.normalizeStaticConfig?.(staticConfig, conf);
32
+ const variants = normalized ? normalized.variants : staticConfig.variants;
33
+ const authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
34
+ const authoredDefaultProps = staticConfig.defaultProps;
35
+ let baseStyle;
36
+ let baseVariantProps;
37
+ let defaultProps;
38
+ const validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);
39
+ if (authoredDefaultProps) {
40
+ for (const key in authoredDefaultProps) {
41
+ const isVariant = Boolean(variants?.[key]);
42
+ const isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
43
+ if (isVariant || isStyle) {
44
+ ;
45
+ (baseStyle ||= authoredBaseStyle ? { ...authoredBaseStyle } : {})[key] = authoredDefaultProps[key];
46
+ }
47
+ if (isVariant || !isStyle) {
48
+ ;
49
+ (defaultProps ||= {})[key] = authoredDefaultProps[key];
50
+ }
51
+ if (isVariant) {
52
+ ;
53
+ (baseVariantProps ||= {})[key] = authoredDefaultProps[key];
54
+ }
55
+ }
56
+ }
57
+ const resolvedBaseStyle = baseStyle || authoredBaseStyle;
58
+ let baseStylePiece;
59
+ let baseStylePieces;
60
+ if (resolvedBaseStyle && !staticConfig.disableBaseStylePiece) {
61
+ let directBaseStyle;
62
+ let directBaseKeys;
63
+ const flushDirectBaseStyle = () => {
64
+ if (!directBaseStyle || !directBaseKeys) return;
65
+ const piece = (0, import_style.createStylePiece)(directBaseStyle, "base");
66
+ baseStylePiece ||= piece;
67
+ baseStylePieces ||= {};
68
+ for (const key of directBaseKeys) {
69
+ baseStylePieces[key] = piece;
70
+ }
71
+ directBaseStyle = void 0;
72
+ directBaseKeys = void 0;
73
+ };
74
+ for (const key in resolvedBaseStyle) {
75
+ const expanded = conf.shorthands[key] || key;
76
+ if (key !== "transition" && !variants?.[key] && expanded in validStyles) {
77
+ ;
78
+ (directBaseStyle ||= {})[key] = resolvedBaseStyle[key];
79
+ (directBaseKeys ||= []).push(key);
80
+ } else {
81
+ flushDirectBaseStyle();
82
+ }
83
+ }
84
+ flushDirectBaseStyle();
85
+ }
86
+ const keys = staticConfig.contextProps || staticConfig.context?.propKeys;
87
+ const value = {
88
+ baseStyle: resolvedBaseStyle,
89
+ baseVariantProps,
90
+ baseStylePiece,
91
+ baseStylePieces,
92
+ defaultProps,
93
+ styledContextKeys: keys ? new Set(keys) : null,
94
+ variants,
95
+ variantStyleResolver: staticConfig.variantStyleResolver,
96
+ passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
97
+ };
98
+ if (!configCache) {
99
+ configCache = /* @__PURE__ */ new WeakMap();
100
+ styleStaticConfigCache.set(staticConfig, configCache);
101
+ }
102
+ configCache.set(conf, {
103
+ revision,
104
+ value
105
+ });
106
+ return value;
107
+ }
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var styleStaticConfigCore_exports = {};
24
+ __export(styleStaticConfigCore_exports, { resolveStyleStaticConfig: () => resolveStyleStaticConfig });
25
+ module.exports = __toCommonJS(styleStaticConfigCore_exports);
26
+ var import_helpers = require("@tamagui/helpers");
27
+ var import_style = require("../style.native.js");
28
+ var styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
29
+ function resolveStyleStaticConfig(staticConfig, conf, revision) {
30
+ var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;
31
+ var configCache = styleStaticConfigCache.get(staticConfig);
32
+ var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);
33
+ if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;
34
+ var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);
35
+ var variants = normalized ? normalized.variants : staticConfig.variants;
36
+ var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
37
+ var authoredDefaultProps = staticConfig.defaultProps;
38
+ var baseStyle;
39
+ var baseVariantProps;
40
+ var defaultProps;
41
+ var validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);
42
+ if (authoredDefaultProps) {
43
+ for (var key in authoredDefaultProps) {
44
+ var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
45
+ var isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
46
+ if (isVariant || isStyle) {
47
+ ;
48
+ (baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
49
+ }
50
+ if (isVariant || !isStyle) {
51
+ ;
52
+ (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
53
+ }
54
+ if (isVariant) {
55
+ ;
56
+ (baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];
57
+ }
58
+ }
59
+ }
60
+ var resolvedBaseStyle = baseStyle || authoredBaseStyle;
61
+ var baseStylePiece;
62
+ var baseStylePieces;
63
+ if (resolvedBaseStyle && !staticConfig.disableBaseStylePiece) {
64
+ var directBaseStyle;
65
+ var directBaseKeys;
66
+ var flushDirectBaseStyle = function() {
67
+ if (!directBaseStyle || !directBaseKeys) return;
68
+ var piece = (0, import_style.createStylePiece)(directBaseStyle, "base");
69
+ baseStylePiece || (baseStylePiece = piece);
70
+ baseStylePieces || (baseStylePieces = {});
71
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
72
+ try {
73
+ for (var _iterator = directBaseKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
74
+ var key2 = _step.value;
75
+ baseStylePieces[key2] = piece;
76
+ }
77
+ } catch (err) {
78
+ _didIteratorError = true;
79
+ _iteratorError = err;
80
+ } finally {
81
+ try {
82
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
83
+ _iterator.return();
84
+ }
85
+ } finally {
86
+ if (_didIteratorError) {
87
+ throw _iteratorError;
88
+ }
89
+ }
90
+ }
91
+ directBaseStyle = void 0;
92
+ directBaseKeys = void 0;
93
+ };
94
+ for (var key1 in resolvedBaseStyle) {
95
+ var expanded = conf.shorthands[key1] || key1;
96
+ if (key1 !== "transition" && !(variants === null || variants === void 0 ? void 0 : variants[key1]) && expanded in validStyles) {
97
+ ;
98
+ (directBaseStyle || (directBaseStyle = {}))[key1] = resolvedBaseStyle[key1];
99
+ (directBaseKeys || (directBaseKeys = [])).push(key1);
100
+ } else {
101
+ flushDirectBaseStyle();
102
+ }
103
+ }
104
+ flushDirectBaseStyle();
105
+ }
106
+ var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
107
+ var value = {
108
+ baseStyle: resolvedBaseStyle,
109
+ baseVariantProps,
110
+ baseStylePiece,
111
+ baseStylePieces,
112
+ defaultProps,
113
+ styledContextKeys: keys ? new Set(keys) : null,
114
+ variants,
115
+ variantStyleResolver: staticConfig.variantStyleResolver,
116
+ passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
117
+ };
118
+ if (!configCache) {
119
+ configCache = /* @__PURE__ */ new WeakMap();
120
+ styleStaticConfigCache.set(staticConfig, configCache);
121
+ }
122
+ configCache.set(conf, {
123
+ revision,
124
+ value
125
+ });
126
+ return value;
127
+ }
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var styleStaticConfigCore_exports = {};
24
+ __export(styleStaticConfigCore_exports, { resolveStyleStaticConfig: () => resolveStyleStaticConfig });
25
+ module.exports = __toCommonJS(styleStaticConfigCore_exports);
26
+ var import_helpers = require("@tamagui/helpers");
27
+ var import_style = require("../style.native.js");
28
+ var styleStaticConfigCache = /* @__PURE__ */ new WeakMap();
29
+ function resolveStyleStaticConfig(staticConfig, conf, revision) {
30
+ var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;
31
+ var configCache = styleStaticConfigCache.get(staticConfig);
32
+ var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);
33
+ if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;
34
+ var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);
35
+ var variants = normalized ? normalized.variants : staticConfig.variants;
36
+ var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
37
+ var authoredDefaultProps = staticConfig.defaultProps;
38
+ var baseStyle;
39
+ var baseVariantProps;
40
+ var defaultProps;
41
+ var validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);
42
+ if (authoredDefaultProps) {
43
+ for (var key in authoredDefaultProps) {
44
+ var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
45
+ var isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
46
+ if (isVariant || isStyle) {
47
+ ;
48
+ (baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
49
+ }
50
+ if (isVariant || !isStyle) {
51
+ ;
52
+ (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
53
+ }
54
+ if (isVariant) {
55
+ ;
56
+ (baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];
57
+ }
58
+ }
59
+ }
60
+ var resolvedBaseStyle = baseStyle || authoredBaseStyle;
61
+ var baseStylePiece;
62
+ var baseStylePieces;
63
+ if (resolvedBaseStyle && !staticConfig.disableBaseStylePiece) {
64
+ var directBaseStyle;
65
+ var directBaseKeys;
66
+ var flushDirectBaseStyle = function() {
67
+ if (!directBaseStyle || !directBaseKeys) return;
68
+ var piece = (0, import_style.createStylePiece)(directBaseStyle, "base");
69
+ baseStylePiece || (baseStylePiece = piece);
70
+ baseStylePieces || (baseStylePieces = {});
71
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
72
+ try {
73
+ for (var _iterator = directBaseKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
74
+ var key2 = _step.value;
75
+ baseStylePieces[key2] = piece;
76
+ }
77
+ } catch (err) {
78
+ _didIteratorError = true;
79
+ _iteratorError = err;
80
+ } finally {
81
+ try {
82
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
83
+ _iterator.return();
84
+ }
85
+ } finally {
86
+ if (_didIteratorError) {
87
+ throw _iteratorError;
88
+ }
89
+ }
90
+ }
91
+ directBaseStyle = void 0;
92
+ directBaseKeys = void 0;
93
+ };
94
+ for (var key1 in resolvedBaseStyle) {
95
+ var expanded = conf.shorthands[key1] || key1;
96
+ if (key1 !== "transition" && !(variants === null || variants === void 0 ? void 0 : variants[key1]) && expanded in validStyles) {
97
+ ;
98
+ (directBaseStyle || (directBaseStyle = {}))[key1] = resolvedBaseStyle[key1];
99
+ (directBaseKeys || (directBaseKeys = [])).push(key1);
100
+ } else {
101
+ flushDirectBaseStyle();
102
+ }
103
+ }
104
+ flushDirectBaseStyle();
105
+ }
106
+ var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
107
+ var value = {
108
+ baseStyle: resolvedBaseStyle,
109
+ baseVariantProps,
110
+ baseStylePiece,
111
+ baseStylePieces,
112
+ defaultProps,
113
+ styledContextKeys: keys ? new Set(keys) : null,
114
+ variants,
115
+ variantStyleResolver: staticConfig.variantStyleResolver,
116
+ passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
117
+ };
118
+ if (!configCache) {
119
+ configCache = /* @__PURE__ */ new WeakMap();
120
+ styleStaticConfigCache.set(staticConfig, configCache);
121
+ }
122
+ configCache.set(conf, {
123
+ revision,
124
+ value
125
+ });
126
+ return value;
127
+ }
128
+
129
+ //# sourceMappingURL=styleStaticConfigCore.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleStaticConfigCore.native.js","names":[],"sources":["cjs/helpers/styleStaticConfigCore.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styleStaticConfigCore_exports = {};\n__export(styleStaticConfigCore_exports, {\n resolveStyleStaticConfig: () => resolveStyleStaticConfig\n});\nmodule.exports = __toCommonJS(styleStaticConfigCore_exports);\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_style = require(\"../style\");\nvar styleStaticConfigCache = /* @__PURE__ */ new WeakMap();\nfunction resolveStyleStaticConfig(staticConfig, conf, revision) {\n var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;\n var configCache = styleStaticConfigCache.get(staticConfig);\n var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);\n if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;\n var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);\n var variants = normalized ? normalized.variants : staticConfig.variants;\n var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;\n var authoredDefaultProps = staticConfig.defaultProps;\n var baseStyle;\n var baseVariantProps;\n var defaultProps;\n var validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);\n if (authoredDefaultProps) {\n for (var key in authoredDefaultProps) {\n var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);\n var isStyle = key !== \"transition\" && (key in validStyles || key in conf.shorthands);\n if (isVariant || isStyle) {\n ;\n (baseStyle || (baseStyle = authoredBaseStyle ? {\n ...authoredBaseStyle\n } : {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant || !isStyle) {\n ;\n (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant) {\n ;\n (baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];\n }\n }\n }\n var resolvedBaseStyle = baseStyle || authoredBaseStyle;\n var baseStylePiece;\n var baseStylePieces;\n if (resolvedBaseStyle && !staticConfig.disableBaseStylePiece) {\n var directBaseStyle;\n var directBaseKeys;\n var flushDirectBaseStyle = function() {\n if (!directBaseStyle || !directBaseKeys) return;\n var piece = (0, import_style.createStylePiece)(directBaseStyle, \"base\");\n baseStylePiece || (baseStylePiece = piece);\n baseStylePieces || (baseStylePieces = {});\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = directBaseKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key2 = _step.value;\n baseStylePieces[key2] = piece;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n directBaseStyle = void 0;\n directBaseKeys = void 0;\n };\n for (var key1 in resolvedBaseStyle) {\n var expanded = conf.shorthands[key1] || key1;\n if (key1 !== \"transition\" && !(variants === null || variants === void 0 ? void 0 : variants[key1]) && expanded in validStyles) {\n ;\n (directBaseStyle || (directBaseStyle = {}))[key1] = resolvedBaseStyle[key1];\n (directBaseKeys || (directBaseKeys = [])).push(key1);\n } else {\n flushDirectBaseStyle();\n }\n }\n flushDirectBaseStyle();\n }\n var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);\n var value = {\n baseStyle: resolvedBaseStyle,\n baseVariantProps,\n baseStylePiece,\n baseStylePieces,\n defaultProps,\n styledContextKeys: keys ? new Set(keys) : null,\n variants,\n variantStyleResolver: staticConfig.variantStyleResolver,\n passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName\n };\n if (!configCache) {\n configCache = /* @__PURE__ */ new WeakMap();\n styleStaticConfigCache.set(staticConfig, configCache);\n }\n configCache.set(conf, {\n revision,\n value\n });\n return value;\n}\n//# sourceMappingURL=styleStaticConfigCore.js.map\n"],"mappings":"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"}
@@ -0,0 +1,160 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+ var styledDynamic_exports = {};
22
+ __export(styledDynamic_exports, {
23
+ getDynamicEnv: () => getDynamicEnv,
24
+ getFontsForLanguage: () => getFontsForLanguage,
25
+ isStyledDynamic: () => isStyledDynamic,
26
+ styledDynamic: () => styledDynamic
27
+ });
28
+ module.exports = __toCommonJS(styledDynamic_exports);
29
+ var import_config = require("../config.cjs");
30
+ var import_createVariable = require("../createVariable.cjs");
31
+ var import_types = require("../types.cjs");
32
+ const fontLanguageCache = /* @__PURE__ */ new WeakMap();
33
+ function getFontsForLanguage(fonts, language) {
34
+ if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);
35
+ const next = { ...fonts };
36
+ for (const name in language) {
37
+ const lang = language[name];
38
+ if (lang !== "default") next[name] = fonts[`${name}_${lang}`];
39
+ }
40
+ fontLanguageCache.set(language, next);
41
+ return next;
42
+ }
43
+ function isStyledDynamic(value) {
44
+ return !!value && (typeof value === "function" || typeof value === "object") && import_types.styledDynamicSymbol in value;
45
+ }
46
+ const bareStyledDynamic = { [import_types.styledDynamicSymbol]: true };
47
+ const dynamicSpreadProbe = /* @__PURE__ */ Symbol("tamagui.dynamicSpreadProbe");
48
+ const dynamicComputedProbe = "__tamagui_dynamic_computed_key__";
49
+ const dynamicComputedNumberProbe = 712367821;
50
+ const dynamicShapeProbeValues = /* @__PURE__ */ new WeakSet();
51
+ function createDynamicShapeProbe() {
52
+ const target = function() {};
53
+ let probe;
54
+ probe = new Proxy(target, {
55
+ apply: () => probe,
56
+ construct: () => probe,
57
+ get: (_target, key) => {
58
+ if (key === Symbol.toPrimitive) {
59
+ return (hint) => hint === "number" ? dynamicComputedNumberProbe : dynamicComputedProbe;
60
+ }
61
+ if (key === Symbol.iterator) {
62
+ return function* () {
63
+ yield dynamicComputedProbe;
64
+ };
65
+ }
66
+ if (key === dynamicSpreadProbe) return true;
67
+ return probe;
68
+ },
69
+ getOwnPropertyDescriptor: (target2, key) => key === dynamicSpreadProbe ? {
70
+ configurable: true,
71
+ enumerable: true,
72
+ value: true
73
+ } : Reflect.getOwnPropertyDescriptor(target2, key),
74
+ ownKeys: (target2) => [...Reflect.ownKeys(target2), dynamicSpreadProbe]
75
+ });
76
+ dynamicShapeProbeValues.add(probe);
77
+ return probe;
78
+ }
79
+ function findDynamicShapeViolation(value) {
80
+ if (!value || typeof value !== "object" && typeof value !== "function") return;
81
+ const seen = /* @__PURE__ */ new WeakSet();
82
+ let spread = false;
83
+ let computed = false;
84
+ const visit = (current) => {
85
+ if (dynamicShapeProbeValues.has(current) || seen.has(current)) return;
86
+ seen.add(current);
87
+ let descriptors;
88
+ try {
89
+ descriptors = Object.getOwnPropertyDescriptors(current);
90
+ } catch {
91
+ return;
92
+ }
93
+ for (const key of Reflect.ownKeys(descriptors)) {
94
+ if (key === dynamicSpreadProbe) spread = true;
95
+ if (typeof key === "string" && (key.includes(dynamicComputedProbe) || key === String(dynamicComputedNumberProbe))) {
96
+ computed = true;
97
+ }
98
+ const nested = descriptors[key]?.value;
99
+ if (nested && (typeof nested === "object" || typeof nested === "function")) {
100
+ visit(nested);
101
+ }
102
+ }
103
+ };
104
+ visit(value);
105
+ if (spread || computed) return {
106
+ spread,
107
+ computed
108
+ };
109
+ }
110
+ function validateDynamicShape(fn) {
111
+ try {
112
+ const probe = createDynamicShapeProbe();
113
+ const warn = console.warn;
114
+ let output;
115
+ try {
116
+ console.warn = () => {};
117
+ output = fn(probe, probe);
118
+ } finally {
119
+ console.warn = warn;
120
+ }
121
+ const violation = findDynamicShapeViolation(output);
122
+ if (!violation) return;
123
+ const reasons = [violation.spread ? "a spread from a dynamic input" : "", violation.computed ? "a computed key from a dynamic input" : ""].filter(Boolean);
124
+ console.warn(`[tamagui] styled.dynamic${fn.name ? ` (${fn.name})` : ""} returned ${reasons.join(" and ")} during its development shape check. Dynamic style bodies require static object keys for extraction; this definition will deopt instead.`);
125
+ } catch {}
126
+ }
127
+ function styledDynamic(fn) {
128
+ if (!fn) return bareStyledDynamic;
129
+ if (process.env.NODE_ENV === "development") validateDynamicShape(fn);
130
+ fn[import_types.styledDynamicSymbol] = true;
131
+ return fn;
132
+ }
133
+ function getDynamicEnv(styleState) {
134
+ const cached = styleState.flatDynamicEnv;
135
+ if (cached) return cached;
136
+ const { props, conf, context, theme } = styleState;
137
+ let fonts = conf.fontsParsed;
138
+ if (context?.language) {
139
+ fonts = getFontsForLanguage(conf.fontsParsed, context.language);
140
+ }
141
+ const next = {
142
+ fonts,
143
+ tokens: conf.tokensParsed,
144
+ theme,
145
+ get fontFamily() {
146
+ return (0, import_createVariable.getVariableValue)(styleState.fontFamily || props.fontFamily) || props.fontFamily || (0, import_createVariable.getVariableValue)((0, import_config.getSetting)("defaultFont"));
147
+ },
148
+ get font() {
149
+ const found = fonts[this.fontFamily];
150
+ if (found) return found;
151
+ const className = props.className;
152
+ if (typeof className === "string") {
153
+ const name = /(?:^|\s)font_(\S+)/.exec(className)?.[1];
154
+ if (name && fonts[name]) return fonts[name];
155
+ }
156
+ return fonts[conf.defaultFontToken];
157
+ }
158
+ };
159
+ return styleState.flatDynamicEnv = next;
160
+ }