@tamagui/web 3.0.0-beta.924.1 → 3.0.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 (636) hide show
  1. package/dist/cjs/_withNativeStyle.cjs +3 -0
  2. package/dist/cjs/_withNativeStyle.native.cjs +3 -0
  3. package/dist/cjs/_withNativeStyle.native.js +3 -0
  4. package/dist/cjs/_withNativeStyle.native.js.map +1 -1
  5. package/dist/cjs/_withStableStyle.native.cjs +1 -5
  6. package/dist/cjs/_withStableStyle.native.js +1 -5
  7. package/dist/cjs/_withStableStyle.native.js.map +1 -1
  8. package/dist/cjs/config.cjs +6 -3
  9. package/dist/cjs/config.native.cjs +7 -5
  10. package/dist/cjs/config.native.js +7 -5
  11. package/dist/cjs/config.native.js.map +1 -1
  12. package/dist/cjs/contexts/ComponentContext.cjs +1 -0
  13. package/dist/cjs/contexts/ComponentContext.native.cjs +8 -0
  14. package/dist/cjs/contexts/ComponentContext.native.js +8 -0
  15. package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
  16. package/dist/cjs/createComponent.cjs +46 -32
  17. package/dist/cjs/createComponent.native.cjs +92 -72
  18. package/dist/cjs/createComponent.native.js +92 -72
  19. package/dist/cjs/createComponent.native.js.map +1 -1
  20. package/dist/cjs/createTamagui.cjs +32 -14
  21. package/dist/cjs/createTamagui.native.cjs +33 -19
  22. package/dist/cjs/createTamagui.native.js +33 -19
  23. package/dist/cjs/createTamagui.native.js.map +1 -1
  24. package/dist/cjs/createTokens.native.cjs +1 -5
  25. package/dist/cjs/createTokens.native.js +1 -5
  26. package/dist/cjs/createTokens.native.js.map +1 -1
  27. package/dist/cjs/createVariable.native.cjs +1 -5
  28. package/dist/cjs/createVariable.native.js +1 -5
  29. package/dist/cjs/createVariable.native.js.map +1 -1
  30. package/dist/cjs/createVariables.native.cjs +2 -6
  31. package/dist/cjs/createVariables.native.js +2 -6
  32. package/dist/cjs/createVariables.native.js.map +1 -1
  33. package/dist/cjs/dom/html.cjs +87 -329
  34. package/dist/cjs/dom/html.native.cjs +53 -2
  35. package/dist/cjs/dom/html.native.js +53 -2
  36. package/dist/cjs/dom/html.native.js.map +1 -1
  37. package/dist/cjs/{helpers/timer.native.js → dom/htmlReset.cjs} +6 -12
  38. package/dist/cjs/{helpers/timer.native.cjs → dom/htmlReset.native.cjs} +6 -8
  39. package/dist/cjs/dom/htmlReset.native.js +30 -0
  40. package/dist/cjs/dom/htmlReset.native.js.map +1 -0
  41. package/dist/cjs/dom/htmlRuntime.native.cjs +4 -0
  42. package/dist/cjs/dom/htmlRuntime.native.js +4 -0
  43. package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
  44. package/dist/cjs/dom/htmlStaticConfig.cjs +44 -0
  45. package/dist/cjs/dom/htmlStaticConfig.native.cjs +46 -0
  46. package/dist/cjs/dom/htmlStaticConfig.native.js +48 -0
  47. package/dist/cjs/dom/htmlStaticConfig.native.js.map +1 -0
  48. package/dist/cjs/dom/primitives.native.cjs +81 -34
  49. package/dist/cjs/dom/primitives.native.js +81 -34
  50. package/dist/cjs/dom/primitives.native.js.map +1 -1
  51. package/dist/cjs/eventHandling.cjs +10 -4
  52. package/dist/cjs/eventHandling.native.cjs +52 -16
  53. package/dist/cjs/eventHandling.native.js +52 -16
  54. package/dist/cjs/eventHandling.native.js.map +1 -1
  55. package/dist/cjs/helpers/NativeTextBinding.cjs +36 -0
  56. package/dist/cjs/helpers/NativeTextBinding.native.cjs +39 -0
  57. package/dist/cjs/helpers/NativeTextBinding.native.js +41 -0
  58. package/dist/cjs/helpers/NativeTextBinding.native.js.map +1 -0
  59. package/dist/cjs/helpers/configVariables.native.cjs +2 -6
  60. package/dist/cjs/helpers/configVariables.native.js +2 -6
  61. package/dist/cjs/helpers/configVariables.native.js.map +1 -1
  62. package/dist/cjs/helpers/createDesignSystem.cjs +14 -10
  63. package/dist/cjs/helpers/createDesignSystem.native.cjs +5 -4
  64. package/dist/cjs/helpers/createDesignSystem.native.js +5 -4
  65. package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
  66. package/dist/cjs/helpers/createStyledContext.native.cjs +1 -5
  67. package/dist/cjs/helpers/createStyledContext.native.js +1 -5
  68. package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
  69. package/dist/cjs/helpers/expandStyle.cjs +45 -1
  70. package/dist/cjs/helpers/expandStyle.native.cjs +38 -2
  71. package/dist/cjs/helpers/expandStyle.native.js +38 -2
  72. package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
  73. package/dist/cjs/helpers/expandStyles.cjs +15 -3
  74. package/dist/cjs/helpers/expandStyles.native.cjs +14 -8
  75. package/dist/cjs/helpers/expandStyles.native.js +14 -8
  76. package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
  77. package/dist/cjs/helpers/fluid.cjs +56 -0
  78. package/dist/cjs/helpers/fluid.native.cjs +58 -0
  79. package/dist/cjs/helpers/fluid.native.js +60 -0
  80. package/dist/cjs/helpers/fluid.native.js.map +1 -0
  81. package/dist/cjs/helpers/formatDiagnostic.native.cjs +2 -6
  82. package/dist/cjs/helpers/formatDiagnostic.native.js +2 -6
  83. package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
  84. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +6 -6
  85. package/dist/cjs/helpers/getSplitStyles.cjs +366 -150
  86. package/dist/cjs/helpers/getSplitStyles.native.cjs +584 -184
  87. package/dist/cjs/helpers/getSplitStyles.native.js +584 -184
  88. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  89. package/dist/cjs/helpers/getThemeCSSRules.cjs +37 -25
  90. package/dist/cjs/helpers/grammarConfig.cjs +6 -14
  91. package/dist/cjs/helpers/grammarConfig.native.cjs +32 -22
  92. package/dist/cjs/helpers/grammarConfig.native.js +32 -22
  93. package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
  94. package/dist/cjs/helpers/insertStyleRule.cjs +11 -4
  95. package/dist/cjs/helpers/insertStyleRule.native.cjs +8 -11
  96. package/dist/cjs/helpers/insertStyleRule.native.js +8 -11
  97. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  98. package/dist/cjs/helpers/isObj.native.cjs +1 -5
  99. package/dist/cjs/helpers/isObj.native.js +1 -5
  100. package/dist/cjs/helpers/isObj.native.js.map +1 -1
  101. package/dist/cjs/helpers/mainThreadPressEvents.native.cjs +48 -100
  102. package/dist/cjs/helpers/mainThreadPressEvents.native.js +48 -100
  103. package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
  104. package/dist/cjs/helpers/mergeProps.cjs +18 -21
  105. package/dist/cjs/helpers/mergeProps.native.cjs +20 -23
  106. package/dist/cjs/helpers/mergeProps.native.js +20 -23
  107. package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
  108. package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
  109. package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
  110. package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
  111. package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
  112. package/dist/cjs/helpers/nativeTextMetrics.cjs +74 -0
  113. package/dist/cjs/helpers/nativeTextMetrics.native.cjs +77 -0
  114. package/dist/cjs/helpers/nativeTextMetrics.native.js +79 -0
  115. package/dist/cjs/helpers/nativeTextMetrics.native.js.map +1 -0
  116. package/dist/cjs/helpers/normalizeColor.native.cjs +17 -2
  117. package/dist/cjs/helpers/normalizeColor.native.js +17 -2
  118. package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
  119. package/dist/cjs/helpers/normalizeValueWithProperty.cjs +2 -1
  120. package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +3 -6
  121. package/dist/cjs/helpers/normalizeValueWithProperty.native.js +3 -6
  122. package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
  123. package/dist/cjs/helpers/objectIdentityKey.native.cjs +1 -5
  124. package/dist/cjs/helpers/objectIdentityKey.native.js +1 -5
  125. package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
  126. package/dist/cjs/helpers/parseNativeStyle.cjs +187 -0
  127. package/dist/cjs/helpers/parseNativeStyle.native.cjs +6 -4
  128. package/dist/cjs/helpers/parseNativeStyle.native.js +6 -4
  129. package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -1
  130. package/dist/cjs/helpers/proxyThemeToParents.cjs +9 -2
  131. package/dist/cjs/helpers/proxyThemeToParents.native.cjs +28 -2
  132. package/dist/cjs/helpers/proxyThemeToParents.native.js +28 -2
  133. package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
  134. package/dist/cjs/helpers/resolveAnimationDriver.native.cjs +1 -5
  135. package/dist/cjs/helpers/resolveAnimationDriver.native.js +1 -5
  136. package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
  137. package/dist/cjs/helpers/{timer.cjs → resolveNativeUnits.cjs} +12 -8
  138. package/dist/cjs/helpers/resolveNativeUnits.native.cjs +205 -0
  139. package/dist/cjs/helpers/resolveNativeUnits.native.js +207 -0
  140. package/dist/cjs/helpers/resolveNativeUnits.native.js.map +1 -0
  141. package/dist/cjs/helpers/resolveRem.native.cjs +18 -21
  142. package/dist/cjs/helpers/resolveRem.native.js +18 -21
  143. package/dist/cjs/helpers/resolveRem.native.js.map +1 -1
  144. package/dist/cjs/helpers/resolveSizing.cjs +124 -0
  145. package/dist/cjs/helpers/resolveSizing.native.cjs +133 -0
  146. package/dist/cjs/helpers/resolveSizing.native.js +135 -0
  147. package/dist/cjs/helpers/resolveSizing.native.js.map +1 -0
  148. package/dist/cjs/helpers/resolveVariableValue.cjs +7 -7
  149. package/dist/cjs/helpers/resolveVariableValue.native.cjs +7 -9
  150. package/dist/cjs/helpers/resolveVariableValue.native.js +7 -9
  151. package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -1
  152. package/dist/cjs/helpers/resolveVariantStyle.native.cjs +2 -6
  153. package/dist/cjs/helpers/resolveVariantStyle.native.js +2 -6
  154. package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -1
  155. package/dist/cjs/helpers/skipProps.cjs +0 -1
  156. package/dist/cjs/helpers/skipProps.native.cjs +0 -1
  157. package/dist/cjs/helpers/skipProps.native.js +0 -1
  158. package/dist/cjs/helpers/skipProps.native.js.map +1 -1
  159. package/dist/cjs/helpers/styleFrontend.cjs +23 -1
  160. package/dist/cjs/helpers/styleFrontend.native.cjs +23 -1
  161. package/dist/cjs/helpers/styleFrontend.native.js +23 -1
  162. package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
  163. package/dist/cjs/helpers/styleStaticConfigCore.cjs +5 -4
  164. package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +7 -4
  165. package/dist/cjs/helpers/styleStaticConfigCore.native.js +7 -4
  166. package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -1
  167. package/dist/cjs/helpers/styledDynamic.cjs +5 -0
  168. package/dist/cjs/helpers/styledDynamic.native.cjs +8 -7
  169. package/dist/cjs/helpers/styledDynamic.native.js +8 -7
  170. package/dist/cjs/helpers/styledDynamic.native.js.map +1 -1
  171. package/dist/cjs/helpers/subscribeToContextGroup.cjs +16 -7
  172. package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +18 -8
  173. package/dist/cjs/helpers/subscribeToContextGroup.native.js +18 -8
  174. package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
  175. package/dist/cjs/helpers/themeRef.native.cjs +1 -5
  176. package/dist/cjs/helpers/themeRef.native.js +1 -5
  177. package/dist/cjs/helpers/themeRef.native.js.map +1 -1
  178. package/dist/cjs/helpers/themes.cjs +26 -11
  179. package/dist/cjs/helpers/themes.native.cjs +26 -11
  180. package/dist/cjs/helpers/themes.native.js +26 -11
  181. package/dist/cjs/helpers/themes.native.js.map +1 -1
  182. package/dist/cjs/helpers/tokenCategories.cjs +2 -2
  183. package/dist/cjs/helpers/tokenCategories.native.cjs +2 -2
  184. package/dist/cjs/helpers/tokenCategories.native.js +2 -2
  185. package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
  186. package/dist/cjs/helpers/variables.cjs +1 -1
  187. package/dist/cjs/helpers/variables.native.cjs +4 -8
  188. package/dist/cjs/helpers/variables.native.js +4 -8
  189. package/dist/cjs/helpers/variables.native.js.map +1 -1
  190. package/dist/cjs/helpers/warnOnce.cjs +6 -0
  191. package/dist/cjs/helpers/warnOnce.native.cjs +6 -0
  192. package/dist/cjs/helpers/warnOnce.native.js +6 -0
  193. package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
  194. package/dist/cjs/helpers/webPropsToSkip.native.cjs +3 -3
  195. package/dist/cjs/helpers/webPropsToSkip.native.js +3 -3
  196. package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
  197. package/dist/cjs/helpers/wrapStyleTags.cjs +1 -1
  198. package/dist/cjs/helpers/wrapStyleTags.native.cjs +1 -1
  199. package/dist/cjs/helpers/wrapStyleTags.native.js +1 -1
  200. package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
  201. package/dist/cjs/hooks/useComponentState.native.cjs +1 -5
  202. package/dist/cjs/hooks/useComponentState.native.js +1 -5
  203. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  204. package/dist/cjs/hooks/useMedia.cjs +27 -34
  205. package/dist/cjs/hooks/useMedia.native.cjs +45 -51
  206. package/dist/cjs/hooks/useMedia.native.js +45 -51
  207. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  208. package/dist/cjs/hooks/useSplitStyles.cjs +1 -1
  209. package/dist/cjs/hooks/useSplitStyles.native.cjs +1 -1
  210. package/dist/cjs/hooks/useSplitStyles.native.js +1 -1
  211. package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
  212. package/dist/cjs/hooks/useThemeState.cjs +37 -47
  213. package/dist/cjs/hooks/useThemeState.native.cjs +44 -50
  214. package/dist/cjs/hooks/useThemeState.native.js +44 -50
  215. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  216. package/dist/cjs/index.cjs +7 -0
  217. package/dist/cjs/index.native.cjs +7 -0
  218. package/dist/cjs/index.native.js +7 -0
  219. package/dist/cjs/index.native.js.map +1 -1
  220. package/dist/cjs/internal-runtime.cjs +22 -0
  221. package/dist/cjs/internal-runtime.native.cjs +22 -0
  222. package/dist/cjs/internal-runtime.native.js +22 -0
  223. package/dist/cjs/internal-runtime.native.js.map +1 -1
  224. package/dist/cjs/static-resolve.native.cjs +2 -9
  225. package/dist/cjs/static-resolve.native.js +2 -9
  226. package/dist/cjs/static-resolve.native.js.map +1 -1
  227. package/dist/cjs/style.cjs +1 -1
  228. package/dist/cjs/style.native.cjs +4 -7
  229. package/dist/cjs/style.native.js +4 -7
  230. package/dist/cjs/style.native.js.map +1 -1
  231. package/dist/cjs/views/Theme.cjs +10 -17
  232. package/dist/cjs/views/Theme.native.cjs +9 -11
  233. package/dist/cjs/views/Theme.native.js +9 -11
  234. package/dist/cjs/views/Theme.native.js.map +1 -1
  235. package/dist/cjs/views/ThemeDebug.cjs +1 -1
  236. package/dist/cjs/views/ThemeUpdate.cjs +1 -1
  237. package/dist/cjs/views/ThemeUpdate.native.cjs +1 -1
  238. package/dist/cjs/views/ThemeUpdate.native.js +1 -1
  239. package/dist/cjs/views/ThemeUpdate.native.js.map +1 -1
  240. package/dist/esm/_withNativeStyle.mjs +4 -1
  241. package/dist/esm/_withNativeStyle.mjs.map +1 -1
  242. package/dist/esm/_withNativeStyle.native.js +4 -1
  243. package/dist/esm/_withNativeStyle.native.js.map +1 -1
  244. package/dist/esm/_withStableStyle.native.js +1 -5
  245. package/dist/esm/_withStableStyle.native.js.map +1 -1
  246. package/dist/esm/config.mjs +6 -3
  247. package/dist/esm/config.mjs.map +1 -1
  248. package/dist/esm/config.native.js +7 -5
  249. package/dist/esm/config.native.js.map +1 -1
  250. package/dist/esm/contexts/ComponentContext.mjs +9 -9
  251. package/dist/esm/contexts/ComponentContext.mjs.map +1 -1
  252. package/dist/esm/contexts/ComponentContext.native.js +16 -9
  253. package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
  254. package/dist/esm/createComponent.mjs +45 -42
  255. package/dist/esm/createComponent.mjs.map +1 -1
  256. package/dist/esm/createComponent.native.js +93 -82
  257. package/dist/esm/createComponent.native.js.map +1 -1
  258. package/dist/esm/createTamagui.mjs +33 -15
  259. package/dist/esm/createTamagui.mjs.map +1 -1
  260. package/dist/esm/createTamagui.native.js +34 -20
  261. package/dist/esm/createTamagui.native.js.map +1 -1
  262. package/dist/esm/createTokens.native.js +1 -5
  263. package/dist/esm/createTokens.native.js.map +1 -1
  264. package/dist/esm/createVariable.native.js +1 -5
  265. package/dist/esm/createVariable.native.js.map +1 -1
  266. package/dist/esm/createVariables.native.js +2 -6
  267. package/dist/esm/createVariables.native.js.map +1 -1
  268. package/dist/esm/dom/html.mjs +87 -329
  269. package/dist/esm/dom/html.mjs.map +1 -1
  270. package/dist/esm/dom/html.native.js +53 -2
  271. package/dist/esm/dom/html.native.js.map +1 -1
  272. package/dist/esm/dom/htmlReset.mjs +6 -0
  273. package/dist/esm/dom/htmlReset.mjs.map +1 -0
  274. package/dist/esm/dom/htmlReset.native.js +6 -0
  275. package/dist/esm/dom/htmlReset.native.js.map +1 -0
  276. package/dist/esm/dom/htmlRuntime.native.js +4 -0
  277. package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
  278. package/dist/esm/dom/htmlStaticConfig.mjs +22 -0
  279. package/dist/esm/dom/htmlStaticConfig.mjs.map +1 -0
  280. package/dist/esm/dom/htmlStaticConfig.native.js +22 -0
  281. package/dist/esm/dom/htmlStaticConfig.native.js.map +1 -0
  282. package/dist/esm/dom/primitives.native.js +81 -34
  283. package/dist/esm/dom/primitives.native.js.map +1 -1
  284. package/dist/esm/eventHandling.mjs +10 -4
  285. package/dist/esm/eventHandling.mjs.map +1 -1
  286. package/dist/esm/eventHandling.native.js +52 -16
  287. package/dist/esm/eventHandling.native.js.map +1 -1
  288. package/dist/esm/helpers/NativeTextBinding.mjs +17 -0
  289. package/dist/esm/helpers/NativeTextBinding.mjs.map +1 -0
  290. package/dist/esm/helpers/NativeTextBinding.native.js +18 -0
  291. package/dist/esm/helpers/NativeTextBinding.native.js.map +1 -0
  292. package/dist/esm/helpers/configVariables.native.js +2 -6
  293. package/dist/esm/helpers/configVariables.native.js.map +1 -1
  294. package/dist/esm/helpers/createDesignSystem.mjs +14 -10
  295. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  296. package/dist/esm/helpers/createDesignSystem.native.js +4 -4
  297. package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
  298. package/dist/esm/helpers/createStyledContext.native.js +1 -5
  299. package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
  300. package/dist/esm/helpers/expandStyle.mjs +41 -1
  301. package/dist/esm/helpers/expandStyle.mjs.map +1 -1
  302. package/dist/esm/helpers/expandStyle.native.js +36 -3
  303. package/dist/esm/helpers/expandStyle.native.js.map +1 -1
  304. package/dist/esm/helpers/expandStyles.mjs +15 -3
  305. package/dist/esm/helpers/expandStyles.mjs.map +1 -1
  306. package/dist/esm/helpers/expandStyles.native.js +14 -8
  307. package/dist/esm/helpers/expandStyles.native.js.map +1 -1
  308. package/dist/esm/helpers/fluid.mjs +36 -0
  309. package/dist/esm/helpers/fluid.mjs.map +1 -0
  310. package/dist/esm/helpers/fluid.native.js +36 -0
  311. package/dist/esm/helpers/fluid.native.js.map +1 -0
  312. package/dist/esm/helpers/formatDiagnostic.native.js +2 -6
  313. package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
  314. package/dist/esm/helpers/getCSSStylesAtomic.mjs +6 -6
  315. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  316. package/dist/esm/helpers/getSplitStyles.mjs +364 -150
  317. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  318. package/dist/esm/helpers/getSplitStyles.native.js +588 -188
  319. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  320. package/dist/esm/helpers/getThemeCSSRules.mjs +37 -25
  321. package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
  322. package/dist/esm/helpers/grammarConfig.mjs +6 -14
  323. package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
  324. package/dist/esm/helpers/grammarConfig.native.js +32 -22
  325. package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
  326. package/dist/esm/helpers/insertStyleRule.mjs +11 -4
  327. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  328. package/dist/esm/helpers/insertStyleRule.native.js +4 -4
  329. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  330. package/dist/esm/helpers/isObj.native.js +1 -5
  331. package/dist/esm/helpers/isObj.native.js.map +1 -1
  332. package/dist/esm/helpers/mainThreadPressEvents.native.js +48 -100
  333. package/dist/esm/helpers/mainThreadPressEvents.native.js.map +1 -1
  334. package/dist/esm/helpers/mergeProps.mjs +18 -21
  335. package/dist/esm/helpers/mergeProps.mjs.map +1 -1
  336. package/dist/esm/helpers/mergeProps.native.js +20 -23
  337. package/dist/esm/helpers/mergeProps.native.js.map +1 -1
  338. package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
  339. package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
  340. package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
  341. package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
  342. package/dist/esm/helpers/nativeTextMetrics.mjs +55 -0
  343. package/dist/esm/helpers/nativeTextMetrics.mjs.map +1 -0
  344. package/dist/esm/helpers/nativeTextMetrics.native.js +56 -0
  345. package/dist/esm/helpers/nativeTextMetrics.native.js.map +1 -0
  346. package/dist/esm/helpers/normalizeColor.native.js +17 -2
  347. package/dist/esm/helpers/normalizeColor.native.js.map +1 -1
  348. package/dist/esm/helpers/normalizeValueWithProperty.mjs +2 -1
  349. package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
  350. package/dist/esm/helpers/normalizeValueWithProperty.native.js +3 -6
  351. package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
  352. package/dist/esm/helpers/objectIdentityKey.native.js +1 -5
  353. package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -1
  354. package/dist/esm/helpers/parseNativeStyle.mjs +168 -0
  355. package/dist/esm/helpers/parseNativeStyle.mjs.map +1 -0
  356. package/dist/esm/helpers/parseNativeStyle.native.js +4 -1
  357. package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -1
  358. package/dist/esm/helpers/proxyThemeToParents.mjs +10 -2
  359. package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
  360. package/dist/esm/helpers/proxyThemeToParents.native.js +29 -2
  361. package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
  362. package/dist/esm/helpers/resolveAnimationDriver.native.js +1 -5
  363. package/dist/esm/helpers/resolveAnimationDriver.native.js.map +1 -1
  364. package/dist/esm/helpers/resolveNativeUnits.mjs +9 -0
  365. package/dist/esm/helpers/resolveNativeUnits.mjs.map +1 -0
  366. package/dist/esm/helpers/resolveNativeUnits.native.js +178 -0
  367. package/dist/esm/helpers/resolveNativeUnits.native.js.map +1 -0
  368. package/dist/esm/helpers/resolveRem.native.js +18 -21
  369. package/dist/esm/helpers/resolveRem.native.js.map +1 -1
  370. package/dist/esm/helpers/resolveSizing.mjs +102 -0
  371. package/dist/esm/helpers/resolveSizing.mjs.map +1 -0
  372. package/dist/esm/helpers/resolveSizing.native.js +109 -0
  373. package/dist/esm/helpers/resolveSizing.native.js.map +1 -0
  374. package/dist/esm/helpers/resolveVariableValue.mjs +7 -7
  375. package/dist/esm/helpers/resolveVariableValue.mjs.map +1 -1
  376. package/dist/esm/helpers/resolveVariableValue.native.js +7 -9
  377. package/dist/esm/helpers/resolveVariableValue.native.js.map +1 -1
  378. package/dist/esm/helpers/resolveVariantStyle.native.js +2 -6
  379. package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -1
  380. package/dist/esm/helpers/skipProps.mjs +0 -1
  381. package/dist/esm/helpers/skipProps.mjs.map +1 -1
  382. package/dist/esm/helpers/skipProps.native.js +0 -1
  383. package/dist/esm/helpers/skipProps.native.js.map +1 -1
  384. package/dist/esm/helpers/styleFrontend.mjs +20 -1
  385. package/dist/esm/helpers/styleFrontend.mjs.map +1 -1
  386. package/dist/esm/helpers/styleFrontend.native.js +20 -1
  387. package/dist/esm/helpers/styleFrontend.native.js.map +1 -1
  388. package/dist/esm/helpers/styleStaticConfigCore.mjs +5 -4
  389. package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -1
  390. package/dist/esm/helpers/styleStaticConfigCore.native.js +7 -4
  391. package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -1
  392. package/dist/esm/helpers/styledDynamic.mjs +5 -0
  393. package/dist/esm/helpers/styledDynamic.mjs.map +1 -1
  394. package/dist/esm/helpers/styledDynamic.native.js +8 -7
  395. package/dist/esm/helpers/styledDynamic.native.js.map +1 -1
  396. package/dist/esm/helpers/subscribeToContextGroup.mjs +16 -7
  397. package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
  398. package/dist/esm/helpers/subscribeToContextGroup.native.js +18 -8
  399. package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
  400. package/dist/esm/helpers/themeRef.native.js +1 -5
  401. package/dist/esm/helpers/themeRef.native.js.map +1 -1
  402. package/dist/esm/helpers/themes.mjs +20 -11
  403. package/dist/esm/helpers/themes.mjs.map +1 -1
  404. package/dist/esm/helpers/themes.native.js +20 -11
  405. package/dist/esm/helpers/themes.native.js.map +1 -1
  406. package/dist/esm/helpers/tokenCategories.mjs +2 -2
  407. package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
  408. package/dist/esm/helpers/tokenCategories.native.js +2 -2
  409. package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
  410. package/dist/esm/helpers/variables.mjs +1 -1
  411. package/dist/esm/helpers/variables.mjs.map +1 -1
  412. package/dist/esm/helpers/variables.native.js +4 -8
  413. package/dist/esm/helpers/variables.native.js.map +1 -1
  414. package/dist/esm/helpers/warnOnce.mjs +6 -1
  415. package/dist/esm/helpers/warnOnce.mjs.map +1 -1
  416. package/dist/esm/helpers/warnOnce.native.js +6 -1
  417. package/dist/esm/helpers/warnOnce.native.js.map +1 -1
  418. package/dist/esm/helpers/webPropsToSkip.native.js +3 -3
  419. package/dist/esm/helpers/webPropsToSkip.native.js.map +1 -1
  420. package/dist/esm/helpers/wrapStyleTags.mjs +1 -1
  421. package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
  422. package/dist/esm/helpers/wrapStyleTags.native.js +1 -1
  423. package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
  424. package/dist/esm/hooks/useComponentState.native.js +1 -5
  425. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  426. package/dist/esm/hooks/useMedia.mjs +27 -34
  427. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  428. package/dist/esm/hooks/useMedia.native.js +45 -51
  429. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  430. package/dist/esm/hooks/useSplitStyles.mjs +1 -1
  431. package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
  432. package/dist/esm/hooks/useSplitStyles.native.js +1 -1
  433. package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
  434. package/dist/esm/hooks/useThemeState.mjs +36 -48
  435. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  436. package/dist/esm/hooks/useThemeState.native.js +44 -50
  437. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  438. package/dist/esm/index.js +4 -1
  439. package/dist/esm/index.mjs +4 -1
  440. package/dist/esm/index.native.js +4 -1
  441. package/dist/esm/internal-runtime.mjs +22 -3
  442. package/dist/esm/internal-runtime.mjs.map +1 -1
  443. package/dist/esm/internal-runtime.native.js +22 -3
  444. package/dist/esm/internal-runtime.native.js.map +1 -1
  445. package/dist/esm/static-resolve.native.js +2 -9
  446. package/dist/esm/static-resolve.native.js.map +1 -1
  447. package/dist/esm/style.mjs +1 -1
  448. package/dist/esm/style.mjs.map +1 -1
  449. package/dist/esm/style.native.js +4 -7
  450. package/dist/esm/style.native.js.map +1 -1
  451. package/dist/esm/views/Theme.mjs +15 -14
  452. package/dist/esm/views/Theme.mjs.map +1 -1
  453. package/dist/esm/views/Theme.native.js +15 -15
  454. package/dist/esm/views/Theme.native.js.map +1 -1
  455. package/dist/esm/views/ThemeDebug.mjs +1 -1
  456. package/dist/esm/views/ThemeDebug.mjs.map +1 -1
  457. package/dist/esm/views/ThemeUpdate.mjs +1 -1
  458. package/dist/esm/views/ThemeUpdate.mjs.map +1 -1
  459. package/dist/esm/views/ThemeUpdate.native.js +1 -1
  460. package/dist/esm/views/ThemeUpdate.native.js.map +1 -1
  461. package/package.json +20 -18
  462. package/reset.css +11 -0
  463. package/src/_withNativeStyle.tsx +6 -1
  464. package/src/config.ts +6 -6
  465. package/src/contexts/ComponentContext.tsx +8 -0
  466. package/src/createComponent.tsx +177 -57
  467. package/src/createStyledHOC.tsx +25 -26
  468. package/src/createTamagui.ts +47 -28
  469. package/src/dom/contract.ts +4 -1
  470. package/src/dom/html.native.tsx +55 -2
  471. package/src/dom/html.tsx +189 -388
  472. package/src/dom/htmlReset.ts +15 -0
  473. package/src/dom/htmlRuntime.native.tsx +5 -0
  474. package/src/dom/htmlStaticConfig.ts +40 -0
  475. package/src/dom/primitives.native.tsx +138 -33
  476. package/src/dom/standalone.ts +2 -1
  477. package/src/dom/styleTypes.ts +82 -92
  478. package/src/eventHandling.native.ts +61 -11
  479. package/src/eventHandling.ts +19 -4
  480. package/src/helpers/NativeTextBinding.tsx +26 -0
  481. package/src/helpers/createDesignSystem.ts +24 -8
  482. package/src/helpers/expandStyle.ts +88 -4
  483. package/src/helpers/expandStyles.ts +6 -11
  484. package/src/helpers/fluid.ts +66 -0
  485. package/src/helpers/getCSSStylesAtomic.ts +11 -6
  486. package/src/helpers/getSplitStyles.tsx +1032 -296
  487. package/src/helpers/getThemeCSSRules.ts +73 -35
  488. package/src/helpers/grammarConfig.ts +23 -8
  489. package/src/helpers/insertStyleRule.tsx +14 -8
  490. package/src/helpers/mainThreadPressEvents.native.ts +65 -141
  491. package/src/helpers/mergeProps.ts +29 -62
  492. package/src/helpers/nativeOnlyProps.ts +0 -1
  493. package/src/helpers/nativeTextMetrics.ts +77 -0
  494. package/src/helpers/normalizeColor.native.ts +29 -4
  495. package/src/helpers/normalizeValueWithProperty.ts +2 -1
  496. package/src/helpers/{parseNativeStyle.native.ts → parseNativeStyle.ts} +8 -1
  497. package/src/helpers/proxyThemeToParents.ts +13 -2
  498. package/src/helpers/resolveNativeUnits.native.ts +247 -0
  499. package/src/helpers/resolveNativeUnits.ts +10 -0
  500. package/src/helpers/resolveRem.native.ts +25 -26
  501. package/src/helpers/resolveSizing.ts +167 -0
  502. package/src/helpers/resolveVariableValue.ts +21 -17
  503. package/src/helpers/skipProps.ts +0 -1
  504. package/src/helpers/styleFrontend.ts +39 -0
  505. package/src/helpers/styleProvenance.ts +1 -1
  506. package/src/helpers/styleStaticConfigCore.ts +15 -4
  507. package/src/helpers/styledDynamic.ts +3 -1
  508. package/src/helpers/subscribeToContextGroup.tsx +16 -7
  509. package/src/helpers/themes.ts +27 -11
  510. package/src/helpers/tokenCategories.ts +15 -3
  511. package/src/helpers/variables.ts +2 -2
  512. package/src/helpers/warnOnce.ts +6 -0
  513. package/src/helpers/webPropsToSkip.native.ts +9 -3
  514. package/src/helpers/wrapStyleTags.tsx +4 -1
  515. package/src/hooks/useMedia.tsx +36 -47
  516. package/src/hooks/useSplitStyles.tsx +4 -1
  517. package/src/hooks/useThemeState.ts +69 -74
  518. package/src/index.ts +13 -0
  519. package/src/interfaces/RNExclusiveTypes.ts +1 -3
  520. package/src/internal-runtime.ts +43 -2
  521. package/src/style.ts +4 -1
  522. package/src/styled.tsx +34 -3
  523. package/src/types.tsx +412 -132
  524. package/src/views/Theme.tsx +18 -21
  525. package/src/views/ThemeDebug.tsx +1 -1
  526. package/src/views/ThemeUpdate.tsx +1 -1
  527. package/types/_withNativeStyle.d.ts.map +1 -1
  528. package/types/config.d.ts.map +1 -1
  529. package/types/contexts/ComponentContext.d.ts +1 -1
  530. package/types/contexts/ComponentContext.d.ts.map +1 -1
  531. package/types/createComponent.d.ts.map +1 -1
  532. package/types/createStyledHOC.d.ts +5 -2
  533. package/types/createStyledHOC.d.ts.map +1 -1
  534. package/types/createTamagui.d.ts.map +1 -1
  535. package/types/dom/contract.d.ts +4 -1
  536. package/types/dom/contract.d.ts.map +1 -1
  537. package/types/dom/html.d.ts +60 -51
  538. package/types/dom/html.d.ts.map +1 -1
  539. package/types/dom/html.native.d.ts.map +1 -1
  540. package/types/dom/htmlReset.d.ts +10 -0
  541. package/types/dom/htmlReset.d.ts.map +1 -0
  542. package/types/dom/htmlRuntime.native.d.ts.map +1 -1
  543. package/types/dom/htmlStaticConfig.d.ts +22 -0
  544. package/types/dom/htmlStaticConfig.d.ts.map +1 -0
  545. package/types/dom/primitives.native.d.ts.map +1 -1
  546. package/types/dom/standalone.d.ts +2 -1
  547. package/types/dom/standalone.d.ts.map +1 -1
  548. package/types/dom/styleTypes.d.ts +63 -84
  549. package/types/dom/styleTypes.d.ts.map +1 -1
  550. package/types/eventHandling.d.ts +12 -4
  551. package/types/eventHandling.d.ts.map +1 -1
  552. package/types/eventHandling.native.d.ts.map +1 -1
  553. package/types/helpers/NativeTextBinding.d.ts +11 -0
  554. package/types/helpers/NativeTextBinding.d.ts.map +1 -0
  555. package/types/helpers/createDesignSystem.d.ts.map +1 -1
  556. package/types/helpers/expandStyle.d.ts +1 -0
  557. package/types/helpers/expandStyle.d.ts.map +1 -1
  558. package/types/helpers/expandStyles.d.ts.map +1 -1
  559. package/types/helpers/fluid.d.ts +21 -0
  560. package/types/helpers/fluid.d.ts.map +1 -0
  561. package/types/helpers/getCSSStylesAtomic.d.ts +3 -1
  562. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  563. package/types/helpers/getSplitStyles.d.ts +2 -1
  564. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  565. package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
  566. package/types/helpers/grammarConfig.d.ts.map +1 -1
  567. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  568. package/types/helpers/mainThreadPressEvents.native.d.ts +0 -7
  569. package/types/helpers/mainThreadPressEvents.native.d.ts.map +1 -1
  570. package/types/helpers/mergeProps.d.ts +1 -15
  571. package/types/helpers/mergeProps.d.ts.map +1 -1
  572. package/types/helpers/nativeOnlyProps.d.ts +0 -1
  573. package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
  574. package/types/helpers/nativeTextMetrics.d.ts +16 -0
  575. package/types/helpers/nativeTextMetrics.d.ts.map +1 -0
  576. package/types/helpers/normalizeColor.native.d.ts +4 -1
  577. package/types/helpers/normalizeColor.native.d.ts.map +1 -1
  578. package/types/helpers/normalizeShadow.native.d.ts +3 -1
  579. package/types/helpers/normalizeShadow.native.d.ts.map +1 -1
  580. package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
  581. package/types/helpers/{parseNativeStyle.native.d.ts → parseNativeStyle.d.ts} +1 -1
  582. package/types/helpers/parseNativeStyle.d.ts.map +1 -0
  583. package/types/helpers/proxyThemeToParents.d.ts +1 -1
  584. package/types/helpers/proxyThemeToParents.d.ts.map +1 -1
  585. package/types/helpers/resolveNativeUnits.d.ts +6 -0
  586. package/types/helpers/resolveNativeUnits.d.ts.map +1 -0
  587. package/types/helpers/resolveNativeUnits.native.d.ts +16 -0
  588. package/types/helpers/resolveNativeUnits.native.d.ts.map +1 -0
  589. package/types/helpers/resolveRem.native.d.ts +6 -4
  590. package/types/helpers/resolveRem.native.d.ts.map +1 -1
  591. package/types/helpers/resolveSizing.d.ts +90 -0
  592. package/types/helpers/resolveSizing.d.ts.map +1 -0
  593. package/types/helpers/resolveVariableValue.d.ts.map +1 -1
  594. package/types/helpers/skipProps.d.ts +0 -1
  595. package/types/helpers/skipProps.d.ts.map +1 -1
  596. package/types/helpers/styleFrontend.d.ts +21 -0
  597. package/types/helpers/styleFrontend.d.ts.map +1 -1
  598. package/types/helpers/styleProvenance.d.ts +1 -1
  599. package/types/helpers/styleProvenance.d.ts.map +1 -1
  600. package/types/helpers/styleStaticConfigCore.d.ts.map +1 -1
  601. package/types/helpers/styledDynamic.d.ts +1 -1
  602. package/types/helpers/styledDynamic.d.ts.map +1 -1
  603. package/types/helpers/themes.d.ts +4 -0
  604. package/types/helpers/themes.d.ts.map +1 -1
  605. package/types/helpers/tokenCategories.d.ts +1 -1
  606. package/types/helpers/tokenCategories.d.ts.map +1 -1
  607. package/types/helpers/warnOnce.d.ts +1 -0
  608. package/types/helpers/warnOnce.d.ts.map +1 -1
  609. package/types/helpers/webPropsToSkip.native.d.ts +6 -2
  610. package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
  611. package/types/helpers/wrapStyleTags.d.ts.map +1 -1
  612. package/types/hooks/useMedia.d.ts +5 -2
  613. package/types/hooks/useMedia.d.ts.map +1 -1
  614. package/types/hooks/useSplitStyles.d.ts.map +1 -1
  615. package/types/hooks/useThemeState.d.ts.map +1 -1
  616. package/types/index.d.ts +4 -1
  617. package/types/index.d.ts.map +1 -1
  618. package/types/interfaces/RNExclusiveTypes.d.ts +2 -3
  619. package/types/interfaces/RNExclusiveTypes.d.ts.map +1 -1
  620. package/types/internal-runtime.d.ts +12 -1
  621. package/types/internal-runtime.d.ts.map +1 -1
  622. package/types/style.d.ts.map +1 -1
  623. package/types/styled.d.ts +7 -4
  624. package/types/styled.d.ts.map +1 -1
  625. package/types/types.d.ts +258 -102
  626. package/types/types.d.ts.map +1 -1
  627. package/types/views/Theme.d.ts.map +1 -1
  628. package/dist/cjs/helpers/timer.native.js.map +0 -1
  629. package/dist/esm/helpers/timer.mjs +0 -13
  630. package/dist/esm/helpers/timer.mjs.map +0 -1
  631. package/dist/esm/helpers/timer.native.js +0 -13
  632. package/dist/esm/helpers/timer.native.js.map +0 -1
  633. package/src/helpers/timer.ts +0 -9
  634. package/types/helpers/parseNativeStyle.native.d.ts.map +0 -1
  635. package/types/helpers/timer.d.ts +0 -2
  636. package/types/helpers/timer.d.ts.map +0 -1
@@ -1,7 +1,8 @@
1
+ import { getTransitionResolver } from "@tamagui/animation-helpers/transitionResolver";
1
2
  import { isClient } from "@tamagui/constants";
2
3
  import { nonAnimatableStyleProps, stylePropsAll, stylePropsInput, stylePropsText, stylePropsTransform, validStyles } from "@tamagui/helpers";
3
- import { addTransformValue, createTransformAccumulator, finalizeTransformAccumulator, getTransformPartKeys, removeTransformValue } from "@tamagui/style-grammar/runtime";
4
- import { getConfig, getConfigMaybe } from "../config.mjs";
4
+ import { addTransformValue, createTransformAccumulator, finalizeTransformAccumulator, getTransformPartKeys, grammarMaxNonPlatformDepth, namedCssColors, removeTransformValue } from "@tamagui/style-grammar/runtime";
5
+ import { getConfig, getConfigMaybe, getSetting } from "../config.mjs";
5
6
  import { isDevTools } from "../constants/isDevTools.mjs";
6
7
  import { defaultComponentStateMounted } from "../defaultComponentState.mjs";
7
8
  import { isVariable } from "../createVariable.mjs";
@@ -11,12 +12,14 @@ import { splitComponents, startsValueFunction } from "./borderComponents.mjs";
11
12
  import { getConfigRevisionState } from "./grammarConfig.mjs";
12
13
  import { mediaKeyMatch, mediaState } from "./mediaState.mjs";
13
14
  import { getStyleStaticConfig } from "./styleStaticConfig.mjs";
15
+ import { mergeFrontendCondition } from "./styleFrontend.mjs";
14
16
  import { warnOnce, warnRefusedValue } from "./warnOnce.mjs";
15
17
  import { getDynamicEnv } from "./styledDynamic.mjs";
16
18
  import { getRulesForIdentifier, insertStyleRules, shouldInsertStyleRules } from "./insertStyleRule.mjs";
17
19
  import { log } from "./log.mjs";
18
20
  import { normalizeColor } from "./normalizeColor.mjs";
19
21
  import { normalizeValueWithProperty } from "./normalizeValueWithProperty.mjs";
22
+ import { parseNativeTransform } from "./parseNativeTransform.native.js";
20
23
  import { resolveVariableValue } from "./resolveVariableValue.mjs";
21
24
  import { HOC_CLASSNAME_MARKER, skipProps } from "./skipProps.mjs";
22
25
  import { styleOriginalValues } from "./styleOriginalValues.mjs";
@@ -215,6 +218,7 @@ const passFrontendContainerType = 27;
215
218
  const passSourceLayer = 28;
216
219
  const passParentCursor = 29;
217
220
  const passMapSourceKey = 30;
221
+ const passVariantOutput = 31;
218
222
  const passFlags = 13;
219
223
  const sourceLayerBase = 0;
220
224
  const sourceLayerVariant = 1;
@@ -229,6 +233,9 @@ const passHocFlag = 16;
229
233
  const passTextFlag = 32;
230
234
  const passInputFlag = 64;
231
235
  const passAsChildStyleFlag = 128;
236
+ function isRemovedVendorStyleProp(property) {
237
+ return /^(Webkit|Moz|ms)[A-Z]/.test(property) && !(property in stylePropsAll);
238
+ }
232
239
  function isValidStyleKey(key, validStyles) {
233
240
  return key in validStyles;
234
241
  }
@@ -252,7 +259,6 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
252
259
  const shouldCheckSkipProps = !noSkip;
253
260
  const asChildExceptStyleLike = Boolean(flags & passAsChildStyleFlag);
254
261
  const isTextOrInput = isText || isInput;
255
- const hocParentVariants = isHOC ? parentVariants : void 0;
256
262
  let keyInit = keyOg;
257
263
  let valInit = valOg;
258
264
  if (keyInit === "children") {
@@ -276,17 +282,24 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
276
282
  return;
277
283
  }
278
284
  const resolveClassName = styleFrontend?.resolveClassName;
285
+ let composedProps = null;
279
286
  const sink = (entry) => {
280
287
  const property = entry[0];
281
- if (entry[2] !== void 0) {
282
- if (isValidStyleKey(property, validStyles)) contributeValue(styleState, property, entry[1], void 0, false, entry[2]);
288
+ const condition2 = entry[2];
289
+ if (property.charCodeAt(0) === 95 && property.charCodeAt(1) === 95) {
290
+ composedProps ||= {};
291
+ composedProps[property] = mergeFrontendCondition(composedProps[property], entry[1], condition2);
292
+ return;
293
+ }
294
+ if (condition2 !== void 0) {
295
+ if (isValidStyleKey(property, validStyles)) contributeValue(styleState, property, entry[1], void 0, false, condition2);
283
296
  else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property}" is not a valid style on this component; the frontend value is dropped.`);
284
- } else {
285
- if (property === "group") pass[passFrontendGroup] = entry[1];
286
- else if (property === "container") pass[passFrontendContainer] = entry[1];
287
- else if (property === "containerType") pass[passFrontendContainerType] = entry[1];
288
- contributeProp(pass, property, entry[1]);
297
+ return;
289
298
  }
299
+ if (property === "group") pass[passFrontendGroup] = entry[1];
300
+ else if (property === "container") pass[passFrontendContainer] = entry[1];
301
+ else if (property === "containerType") pass[passFrontendContainerType] = entry[1];
302
+ contributeProp(pass, property, entry[1]);
290
303
  };
291
304
  let start = 0;
292
305
  for (let index = 0; index <= valInit.length; index++) {
@@ -312,18 +325,38 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
312
325
  }
313
326
  start = index + 1;
314
327
  }
328
+ if (composedProps) {
329
+ const composed = styleFrontend.compose?.(composedProps);
330
+ for (const property in composed) contributeProp(pass, property, composed[property]);
331
+ }
315
332
  }
316
333
  return;
317
334
  }
318
335
  if (keyInit === HOC_CLASSNAME_MARKER) {
319
- if (valInit && typeof valInit === "object") {
336
+ if (valInit) {
337
+ const [hocClassNames, hocSlots] = valInit;
320
338
  const direct = styleState;
321
339
  const layers = direct.flatPropertyLayers ||= /* @__PURE__ */ new Map();
322
- for (const property in valInit) {
340
+ for (const property in hocClassNames) {
341
+ if (hocSlots?.has(property)) continue;
323
342
  clearDirectStyle(styleState, property);
324
- styleState.classNames[property] = valInit[property];
343
+ styleState.classNames[property] = hocClassNames[property];
325
344
  layers.set(property, pass[passSourceLayer]);
326
345
  }
346
+ if (hocSlots) {
347
+ const slots = direct.flatSlots ||= /* @__PURE__ */ new Map();
348
+ const markerLayer = pass[passSourceLayer];
349
+ for (const [slot, entries] of hocSlots) for (const entry of entries) {
350
+ pass[passSourceLayer] = Math.max(entry[7] >> 5, sourceLayerResolver);
351
+ if (!ownsSourceLayer(styleState, entry[0], !!entry[2])) continue;
352
+ if (!isHOC && styleState.styleProps.isAnimated && (slot === "transition" || entry[8]) && !(entry[0] in nonAnimatableStyleProps)) {
353
+ const property = entry[0] === "--t-x" ? "x" : entry[0] === "--t-y" ? "y" : entry[0] === "--t-scale-x" ? "scaleX" : entry[0] === "--t-scale-y" ? "scaleY" : entry[0];
354
+ const value = styleState.animationDriver?.inputStyle === "value" ? entry[6] : entry[1];
355
+ entry[3] ? contributeValue(styleState, property, value, entry[6], false, entry[3]) : emitValue(styleState, property, value, null, entry[6], false);
356
+ } else writeStyleSlot(slots, slot, [...entry], pass[passSourceLayer]);
357
+ }
358
+ pass[passSourceLayer] = markerLayer;
359
+ }
327
360
  }
328
361
  return;
329
362
  }
@@ -351,11 +384,30 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
351
384
  continue;
352
385
  }
353
386
  const styleOriginals = shouldTrackStyleTokenProvenance ? styleOriginalValues.get(style) : void 0;
354
- for (const key in style) {
355
- if (style[key] == null) continue;
356
- if (key === "containerName") pass[passContainerName] = style[key];
357
- else if (key === "containerType") pass[passContainerType] = style[key];
358
- contributeValue(styleState, key, style[key], styleOriginals?.[key]);
387
+ for (const authoredKey in style) {
388
+ const value = style[authoredKey];
389
+ if (value == null) continue;
390
+ const key = disableExpandShorthands ? authoredKey : shorthands[authoredKey] || authoredKey;
391
+ let inline = !styleState.styleProps.stylePieceEntries;
392
+ if (key === "containerName") {
393
+ pass[passContainerName] = value;
394
+ inline = false;
395
+ } else if (key === "containerType") {
396
+ pass[passContainerType] = value;
397
+ inline = false;
398
+ }
399
+ if (inline) {
400
+ if (typeof value === "string") {
401
+ const [segments] = getConfigRevisionState(conf).parseFlatValue(value);
402
+ for (let index2 = 4; index2 < segments.length; index2 += 5) if (!(segments[index2] & 1)) {
403
+ inline = false;
404
+ break;
405
+ }
406
+ } else if (value && typeof value === "object" && !Array.isArray(value) && !isVariable(value) && classifyConditionalObject(value, styleState) !== 0) inline = false;
407
+ }
408
+ styleState.flatInlineStyleProp = inline;
409
+ contributeValue(styleState, key, value, styleOriginals?.[authoredKey]);
410
+ styleState.flatInlineStyleProp = false;
359
411
  }
360
412
  }
361
413
  pass[passSourceLayer] = layerBeforeStyle;
@@ -365,12 +417,26 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
365
417
  const defaultVal = defaultProps[keyOg] ?? defaultProps[keyInit];
366
418
  if (defaultVal !== void 0 && valInit === defaultVal) return;
367
419
  }
420
+ if (process.env.NODE_ENV === "development") {
421
+ if (!isValidStyleKey(keyInit, validStyles) && (keyInit === "animation" || !(keyInit in stylePropsAll)) && (!variants || !(keyInit in variants))) {
422
+ let replacement;
423
+ if (keyInit === "animation") replacement = "transition=";
424
+ else if (keyInit === "hoverStyle") replacement = "hover: clause";
425
+ else if (keyInit === "pressStyle") replacement = "press: clause";
426
+ else if (keyInit === "focusStyle") replacement = "focus: clause";
427
+ else if (keyInit === "enterStyle") replacement = "enter: clause";
428
+ else if (keyInit === "exitStyle") replacement = "exit: clause";
429
+ else if (keyInit.charCodeAt(0) === 36 && keyInit.length > 1) replacement = `${keyInit.slice(1)}: clause`;
430
+ if (replacement) warnOnce(`v2-prop:${keyInit}`, `prop "${keyInit}" was removed in v3; use ${replacement}`);
431
+ }
432
+ }
368
433
  if (keyInit in skipProps && shouldSkipDirectProps && !neverSkipProps?.[keyInit]) {
369
434
  if (keyInit === "container") pass[passContainerValue] = valInit;
370
435
  if (keyInit === "transition" && typeof valInit === "string") {
371
- const animationConfig = driverAnimations?.[valInit];
372
- if (animationConfig && driverOutputStyle === "css" && process.env.IS_STATIC === "is_static") valInit = `all ${animationConfig}`;
373
- else if (animationConfig) return;
436
+ const transitions = getTransitionResolver();
437
+ const resolved = transitions?.resolve(valInit, { animations: driverAnimations });
438
+ if (resolved?.fused) if (driverOutputStyle === "css" && process.env.IS_STATIC === "is_static") valInit = transitions.toCSS(resolved) ?? valInit;
439
+ else return;
374
440
  } else return;
375
441
  }
376
442
  let isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles);
@@ -378,11 +444,15 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
378
444
  viewProps[keyInit] = valInit;
379
445
  return;
380
446
  }
447
+ if (pass[passVariantOutput] && !isValidStyleKeyInit && !keyInit.startsWith("aria-") && !(keyInit in stylePropsAll) && !(keyInit in skipProps) && !(variants && keyInit in variants) && !(parentVariants && keyInit in parentVariants) && !styledContextKeys?.has(keyInit) && !(styledContext && keyInit in styledContext)) {
448
+ if (process.env.NODE_ENV === "development") warnOnce(`variant-non-style:${keyInit}`, `a variant set "${keyInit}", which is not a style. Variants hold styles and aria/data attributes only: set "${keyInit}" on the component one level up.`);
449
+ return;
450
+ }
381
451
  if (!noExpand) {
382
452
  if (keyInit === "disabled" && valInit === true) {
383
453
  viewProps["aria-disabled"] = true;
384
454
  if (isInput || elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") viewProps.disabled = true;
385
- if (!variants?.disabled) return;
455
+ if (!variants?.disabled && !isHOC) return;
386
456
  }
387
457
  if (keyInit === "testID") {
388
458
  viewProps["data-testid"] = valInit;
@@ -401,9 +471,8 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
401
471
  let isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
402
472
  const isStyleProp = isValidStyleKeyInit || isVariant && !noExpand;
403
473
  if (isStyleProp && asChildExceptStyleLike) return;
404
- const shouldPassProp = !isStyleProp && isHOC || hocParentVariants && keyInit in hocParentVariants || inlineProps?.has(keyInit);
405
- const parentVariant = parentVariants?.[keyInit];
406
- const isHOCShouldPassThrough = Boolean(isHOC && (parentVariant || keyInit in skipProps));
474
+ const shouldPassProp = !isStyleProp && isHOC || isHOC && keyInit === "disabled" || parentVariants && keyInit in parentVariants || inlineProps?.has(keyInit);
475
+ const isHOCShouldPassThrough = isHOC && keyInit in skipProps;
407
476
  const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
408
477
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
409
478
  console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
@@ -427,7 +496,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
427
496
  if (!isVariant) return;
428
497
  }
429
498
  if (shouldCheckSkipProps && !neverSkipProps?.[keyInit]) {
430
- if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit === "string" && !driverAnimations?.[valInit])) {
499
+ if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit === "string" && !getTransitionResolver()?.resolve(valInit, { animations: driverAnimations }).fused)) {
431
500
  if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
432
501
  return;
433
502
  }
@@ -455,7 +524,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
455
524
  }
456
525
  const isHostStyleKey = isValidStyleKeyInit || false;
457
526
  if (isHostStyleKey || isStyledContextProp) {
458
- contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey);
527
+ contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey || isStyledContextProp && typeof valInit === "boolean");
459
528
  return;
460
529
  }
461
530
  const condition = pass[passParentCursor];
@@ -468,8 +537,8 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
468
537
  } else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${keyInit}" is not a valid style on this component; the conditional variant value is dropped.`);
469
538
  return;
470
539
  }
471
- if (keyInit in stylePropsAll) {
472
- if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${keyInit}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
540
+ if (keyInit in stylePropsAll || isRemovedVendorStyleProp(keyInit)) {
541
+ if (process.env.NODE_ENV === "development" && true) console.warn(`[tamagui] "${keyInit}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
473
542
  return;
474
543
  }
475
544
  viewProps[keyInit] = valInit;
@@ -497,7 +566,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
497
566
  const variants = styleStaticConfig.variants;
498
567
  const viewProps = {};
499
568
  const mediaState$1 = styleProps.mediaState || mediaState;
500
- let shouldDoClasses = !process.env.TAMAGUI_DID_OUTPUT_CSS && acceptsClassName && !styleProps.noClass;
569
+ let shouldDoClasses = process.env.TAMAGUI_RUNTIME !== "island" && acceptsClassName && !styleProps.noClass;
501
570
  const rulesToInsert = {};
502
571
  const classNames = {};
503
572
  let hasMedia = false;
@@ -553,7 +622,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
553
622
  let frontendContainer;
554
623
  let frontendContainerType;
555
624
  const processedProps = props;
556
- const parentVariants = parentStaticConfig ? getStyleStaticConfig(parentStaticConfig, conf).variants : void 0;
625
+ const parentVariants = isHOC ? staticConfig.Component?.staticConfig?.variants : void 0;
557
626
  const defaultProps = asChild ? styleStaticConfig.defaultProps : void 0;
558
627
  const asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
559
628
  let containerValue;
@@ -577,7 +646,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
577
646
  styledContextKeys,
578
647
  (noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0),
579
648
  debug,
580
- parentStaticConfig,
649
+ process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
581
650
  defaultProps,
582
651
  driverAnimations,
583
652
  driverOutputStyle,
@@ -624,6 +693,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
624
693
  }
625
694
  const resolvers = staticConfig.resolvers;
626
695
  if (resolvers && !noExpand) {
696
+ const prevSourceLayer = pass[passSourceLayer];
627
697
  pass[passSourceLayer] = sourceLayerResolver;
628
698
  const flagsBefore = pass[passFlags];
629
699
  pass[passFlags] = flagsBefore | passNoExpandFlag;
@@ -636,6 +706,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
636
706
  }
637
707
  }
638
708
  pass[passFlags] = flagsBefore;
709
+ pass[passSourceLayer] = prevSourceLayer;
639
710
  }
640
711
  className = pass[passClassName];
641
712
  shouldDoClasses = pass[passShouldDoClasses];
@@ -669,6 +740,8 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
669
740
  if (slots) for (const [slot, entries] of slots) styleProps.stylePieceEntries[slot] = entries;
670
741
  }
671
742
  completeResolvedStyles(styleState);
743
+ if (styleState.flatGroupKeys?.size) pseudoGroups = styleState.flatGroupKeys;
744
+ if (styleState.flatGroupMedia?.size) mediaGroups = styleState.flatGroupMedia;
672
745
  if (styleProps.isStatic) for (const property in classNames) {
673
746
  const identifier = classNames[property];
674
747
  if (rulesToInsert[identifier]) continue;
@@ -748,7 +821,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
748
821
  const fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "";
749
822
  const group = props.group ?? frontendGroup;
750
823
  const groupClassName = group ? `t_group_${group}` : "";
751
- let finalClassName = isText ? "is_Text" : "is_View";
824
+ let finalClassName = staticConfig.isDOM ? "is_DOM" : isText ? "is_Text" : "is_View";
752
825
  if (fontFamilyClassName) finalClassName += ` ${fontFamilyClassName}`;
753
826
  let hasPropertyClassNames = false;
754
827
  if (classNames) for (const key in classNames) {
@@ -757,7 +830,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
757
830
  }
758
831
  if (groupClassName) finalClassName += ` ${groupClassName}`;
759
832
  if (className) finalClassName += ` ${className}`;
760
- if (isHOC && hasPropertyClassNames) viewProps[HOC_CLASSNAME_MARKER] = classNames;
833
+ if (isHOC && hasPropertyClassNames) viewProps[HOC_CLASSNAME_MARKER] = [classNames, styleState.flatCapturedSlots];
761
834
  if (finalClassName) viewProps.className = finalClassName;
762
835
  if (style) viewProps.style = style;
763
836
  }
@@ -788,7 +861,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
788
861
  const stylePieceStaticConfig = {
789
862
  acceptsClassName: true,
790
863
  isText: true,
791
- validStyles: stylePropsAll
864
+ validStyles: stylePropsInput
792
865
  };
793
866
  const compiledStylePieces = /* @__PURE__ */ new WeakMap();
794
867
  const compileStylePieceRuntime = (piece, layer) => {
@@ -865,7 +938,7 @@ function applyStylePieceClasses(styleState, piece, sourceLayer) {
865
938
  for (const slot in compiled.slots) for (const entry of compiled.slots[slot]) {
866
939
  const property = entry[0];
867
940
  if (!ownsSourceLayer(styleState, property, !!entry[2])) continue;
868
- writeCapturedStyleRecord(slots, slot, entry, sourceLayer);
941
+ writeStyleSlot(slots, slot, [...entry], sourceLayer);
869
942
  }
870
943
  if (compiled.programStates) {
871
944
  const target = styleState.flatStateKeys ||= /* @__PURE__ */ new Set();
@@ -911,7 +984,7 @@ function applyStylePieceClasses(styleState, piece, sourceLayer) {
911
984
  }
912
985
  return applied;
913
986
  }
914
- function writeCapturedStyleRecord(slots, slot, source, sourceLayer) {
987
+ function writeStyleSlot(slots, slot, source, sourceLayer) {
915
988
  let list = slots.get(slot);
916
989
  if (!list) slots.set(slot, list = []);
917
990
  const flags = source[7] & 31;
@@ -920,7 +993,10 @@ function writeCapturedStyleRecord(slots, slot, source, sourceLayer) {
920
993
  for (let index = 0; index < list.length; index++) {
921
994
  const entry = list[index];
922
995
  const entryFlags = entry[7] & 31;
923
- if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) continue;
996
+ if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) {
997
+ if (sourceLayer === sourceLayerStyle && entry[7] >> 5 === sourceLayerStyle && entry[0] === source[0] && !condition && !entry[2]) list.splice(index--, 1);
998
+ continue;
999
+ }
924
1000
  if (entry[0] !== source[0]) continue;
925
1001
  if (flags & recordDefault) {
926
1002
  if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
@@ -933,9 +1009,8 @@ function writeCapturedStyleRecord(slots, slot, source, sourceLayer) {
933
1009
  break;
934
1010
  }
935
1011
  }
936
- const next = [...source];
937
- next[7] = flags | sourceLayer << 5;
938
- list.push(next);
1012
+ source[7] = flags | sourceLayer << 5;
1013
+ list.push(source);
939
1014
  }
940
1015
  function mergeStyle(styleState, key, val, disableNormalize = false, originalVal) {
941
1016
  const { viewProps, styleProps, staticConfig } = styleState;
@@ -948,7 +1023,7 @@ function mergeStyle(styleState, key, val, disableNormalize = false, originalVal)
948
1023
  styleState.transformAccumulator ||= createTransformAccumulator();
949
1024
  addTransformValue(styleState.transformAccumulator, key, val);
950
1025
  } else {
951
- const out = !disableNormalize && !styleProps.noNormalize ? normalizeValueWithProperty(val, key) : val;
1026
+ let out = !disableNormalize && !styleProps.noNormalize ? normalizeValueWithProperty(val, key) : val;
952
1027
  styleState.style ||= {};
953
1028
  styleState.style[key] = out;
954
1029
  if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
@@ -958,8 +1033,8 @@ function recordStyleTokenProvenance(styleState, key, originalVal) {
958
1033
  let tokenName = typeof originalVal === "string" ? originalVal : "";
959
1034
  if (tokenName) {
960
1035
  const slash = tokenName.lastIndexOf("/");
961
- const opacity = slash === -1 ? NaN : Number(tokenName.slice(slash + 1));
962
- if (Number.isInteger(opacity) && opacity >= 0 && opacity <= 100) tokenName = tokenName.slice(0, slash);
1036
+ const opacity = slash === -1 ? NaN : +tokenName.slice(slash + 1);
1037
+ if (opacity % 1 === 0 && opacity >= 0 && opacity <= 100) tokenName = tokenName.slice(0, slash);
963
1038
  }
964
1039
  if (tokenName !== "" && (tokenName in styleState.theme || tokenName in (styleState.conf.themes?.[styleState.flatThemeName || ""] || {}) || Object.values(styleState.conf.tokensParsed).some((category) => tokenName in category))) (styleState.tokenProvenance ||= {})[key] = originalVal;
965
1040
  else if (styleState.tokenProvenance && key in styleState.tokenProvenance) delete styleState.tokenProvenance[key];
@@ -1002,11 +1077,34 @@ const recordNormalize = 2;
1002
1077
  const recordRetract = 4;
1003
1078
  const recordDefault = 8;
1004
1079
  const recordCSS = 16;
1080
+ const webRTLRenames = {
1081
+ marginHorizontal: "marginInline",
1082
+ marginVertical: "marginBlock",
1083
+ paddingHorizontal: "paddingInline",
1084
+ paddingVertical: "paddingBlock",
1085
+ writingDirection: "direction",
1086
+ paddingStart: "paddingInlineStart",
1087
+ paddingEnd: "paddingInlineEnd",
1088
+ marginStart: "marginInlineStart",
1089
+ marginEnd: "marginInlineEnd",
1090
+ borderStartWidth: "borderInlineStartWidth",
1091
+ borderEndWidth: "borderInlineEndWidth",
1092
+ borderStartColor: "borderInlineStartColor",
1093
+ borderEndColor: "borderInlineEndColor",
1094
+ borderStartStyle: "borderInlineStartStyle",
1095
+ borderEndStyle: "borderInlineEndStyle",
1096
+ borderTopStartRadius: "borderStartStartRadius",
1097
+ borderTopEndRadius: "borderStartEndRadius",
1098
+ borderBottomStartRadius: "borderEndStartRadius",
1099
+ borderBottomEndRadius: "borderEndEndRadius",
1100
+ start: "insetInlineStart",
1101
+ end: "insetInlineEnd"
1102
+ };
1005
1103
  const webStyleProperties = /* @__PURE__ */ new Map();
1006
1104
  function webStyleProperty(property) {
1007
1105
  let web = webStyleProperties.get(property);
1008
1106
  if (web === void 0) {
1009
- web = property === "writingDirection" ? "direction" : property.endsWith("Horizontal") ? `${property.slice(0, -10)}Inline` : property.endsWith("Vertical") ? `${property.slice(0, -8)}Block` : property;
1107
+ web = webRTLRenames[property] || property;
1010
1108
  webStyleProperties.set(property, web);
1011
1109
  }
1012
1110
  return web;
@@ -1025,26 +1123,21 @@ function writeStyleRecord(state, property, value, cursor, original, flags, condi
1025
1123
  const identity = cursor ? cursor[conditionKey] : "";
1026
1124
  const direct = state;
1027
1125
  const slots = direct.flatSlots ||= /* @__PURE__ */ new Map();
1028
- const slot = canGenerateCSS && (state.flatShouldDoClasses || flags & recordCSS) ? styleSlot(property) : property.startsWith("transition") ? "transition" : property;
1126
+ const sourceLayer = direct.flatPass?.[passSourceLayer] || 0;
1127
+ if (direct.flatInlineStyleProp) flags |= recordInline;
1128
+ const cssSlot = canGenerateCSS && (state.flatShouldDoClasses || flags & recordCSS) ? styleSlot(property) : property.startsWith("transition") ? "transition" : property;
1129
+ const slot = flags & recordInline && cssSlot !== property ? property : cssSlot;
1029
1130
  let list = slots.get(slot);
1030
1131
  if (!list) slots.set(slot, list = []);
1031
- for (let index = 0; index < list.length; index++) {
1032
- const entry = list[index];
1033
- const entryFlags = entry[7];
1034
- if ((entryFlags & 17) !== (flags & 17)) continue;
1035
- if (entry[0] !== property) continue;
1036
- if (flags & recordDefault) {
1037
- if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
1038
- } else if (entryFlags & recordDefault && (!condition || entry[3] === identity)) {
1039
- list.splice(index--, 1);
1040
- continue;
1041
- }
1042
- if (entry[3] === identity) {
1043
- list.splice(index, 1);
1044
- break;
1132
+ if (sourceLayer === sourceLayerStyle && !condition) {
1133
+ const other = slot === cssSlot ? list : slots.get(flags & recordInline ? cssSlot : property);
1134
+ if (other) for (let index = 0; index < other.length; index++) {
1135
+ const entry = other[index];
1136
+ const entryFlags = entry[7];
1137
+ if (entry[0] === property && !entry[2] && entryFlags >> 5 === sourceLayerStyle && (entryFlags & 17) !== (flags & 17)) other.splice(index--, 1);
1045
1138
  }
1046
1139
  }
1047
- list.push([
1140
+ writeStyleSlot(slots, slot, [
1048
1141
  property,
1049
1142
  value,
1050
1143
  condition,
@@ -1052,8 +1145,10 @@ function writeStyleRecord(state, property, value, cursor, original, flags, condi
1052
1145
  cursor ? cursor[conditionSelector] : "",
1053
1146
  cursor ? cursor[conditionWrappers] : void 0,
1054
1147
  original,
1055
- flags | (state.flatPass?.[passSourceLayer] || 0) << 5
1056
- ]);
1148
+ flags,
1149
+ void 0,
1150
+ !sourceLayer && direct.flatPass?.[passVariantOutput]
1151
+ ], sourceLayer);
1057
1152
  }
1058
1153
  function streamWriteInline(state, property, value, cursor, original, normalize = property === "lineHeight", conditionOverride = -1, force = false) {
1059
1154
  writeStyleRecord(state, property, value, cursor, original, (normalize ? recordNormalize : 0) | (force ? recordInline : 0), conditionOverride);
@@ -1080,6 +1175,7 @@ function completeResolvedStyles(state, merge = mergeStyle) {
1080
1175
  }
1081
1176
  const slots = direct.flatSlots;
1082
1177
  if (!slots) return;
1178
+ const capture = state.staticConfig.isHOC ? direct.flatCapturedSlots ||= /* @__PURE__ */ new Map() : void 0;
1083
1179
  for (const [property, entries] of slots) {
1084
1180
  let cssEntries;
1085
1181
  let inlineWinner;
@@ -1108,7 +1204,17 @@ function completeResolvedStyles(state, merge = mergeStyle) {
1108
1204
  }
1109
1205
  }
1110
1206
  }
1111
- if (cssEntries) registerAtomicSlot(direct, property, cssEntries);
1207
+ if (cssEntries) {
1208
+ registerAtomicSlot(direct, property, cssEntries);
1209
+ if (capture) {
1210
+ for (const entry of cssEntries) {
1211
+ entry[7] = entry[7] | recordCSS;
1212
+ if (!(entry[2] & 12)) continue;
1213
+ for (const sibling of cssEntries) if (sibling[0] === entry[0]) sibling[8] = true;
1214
+ }
1215
+ capture.set(property, cssEntries);
1216
+ }
1217
+ }
1112
1218
  if (inlineWinner) if (inlineWinner[7] & recordRetract) {
1113
1219
  if (state.style) delete state.style[inlineWinner[0]];
1114
1220
  } else merge(state, inlineWinner[0], inlineWinner[1], !(inlineWinner[7] & recordNormalize), inlineWinner[6] !== void 0 ? inlineWinner[6] : inlineWinner[1]);
@@ -1133,7 +1239,7 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
1133
1239
  }
1134
1240
  return condition;
1135
1241
  }
1136
- const formatScanFailure = (failure, source, failureIndex) => failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : "an unterminated \"(\"";
1242
+ const formatScanFailure = (failure, source, failureIndex) => failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : failure === "over-deep-clause" ? `a clause with more than ${grammarMaxNonPlatformDepth} non-platform conditions` : "an unterminated \"(\"";
1137
1243
  const warnScanFailure = (property, source, failure, failureIndex) => {
1138
1244
  if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, formatScanFailure(failure, source, failureIndex));
1139
1245
  };
@@ -1143,15 +1249,28 @@ let valueCaches = /* @__PURE__ */ new WeakMap();
1143
1249
  let valueCacheEntries = 0;
1144
1250
  const valueCacheRoot = {};
1145
1251
  const parsedSlices = /* @__PURE__ */ new WeakMap();
1146
- const fontProperties = /* @__PURE__ */ new Map();
1147
- function configuredValue(state, property, raw, embedded = false) {
1252
+ const cssWideColorKeywords = /* @__PURE__ */ new Set([
1253
+ "inherit",
1254
+ "initial",
1255
+ "unset",
1256
+ "revert",
1257
+ "revert-layer",
1258
+ "currentcolor",
1259
+ "transparent"
1260
+ ]);
1261
+ const shadowRecipeProperties = /* @__PURE__ */ new Set([
1262
+ "boxShadow",
1263
+ "textShadow",
1264
+ "filter"
1265
+ ]);
1266
+ function configuredValue(state, property, raw, embedded = false, nativeColors) {
1148
1267
  const grammar = getConfigRevisionState(state.conf);
1149
1268
  let name = raw;
1150
1269
  let opacity;
1151
1270
  const slash = raw.lastIndexOf("/");
1152
1271
  if (slash > 0) {
1153
- const amount = Number(raw.slice(slash + 1));
1154
- if (Number.isInteger(amount) && amount >= 0 && amount <= 100) {
1272
+ const amount = +raw.slice(slash + 1);
1273
+ if (amount % 1 === 0 && amount >= 0 && amount <= 100) {
1155
1274
  name = raw.slice(0, slash);
1156
1275
  opacity = amount;
1157
1276
  }
@@ -1161,36 +1280,32 @@ function configuredValue(state, property, raw, embedded = false) {
1161
1280
  state.flatUsesSafeArea = true;
1162
1281
  return safeArea;
1163
1282
  }
1164
- let fontProperty = fontProperties.get(property);
1165
- if (fontProperty === void 0) {
1166
- fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
1167
- fontProperties.set(property, fontProperty);
1168
- }
1169
- const revision = grammar.revision;
1170
- if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
1171
- valueCacheConf = state.conf;
1172
- valueCacheRevision = revision;
1173
- valueCaches = /* @__PURE__ */ new WeakMap();
1174
- valueCacheEntries = 0;
1175
- state.flatValueScope = void 0;
1176
- }
1177
- const resolveValues = !state.flatShouldDoClasses && state.styleProps.resolveValues === "auto" ? "value" : state.styleProps.resolveValues;
1178
- const direct = state;
1179
- let scope = direct.flatValueScope;
1180
- if (scope === void 0 || direct.flatValueScopeKind !== resolveValues) {
1181
- const themeObject = state.theme && typeof state.theme === "object" ? state.theme : valueCacheRoot;
1182
- let byScope = valueCaches.get(themeObject);
1183
- if (!byScope) valueCaches.set(themeObject, byScope = /* @__PURE__ */ new Map());
1184
- const scopeKey = `${state.flatThemeName || ""}${resolveValues}`;
1185
- scope = byScope.get(scopeKey);
1186
- if (!scope) byScope.set(scopeKey, scope = /* @__PURE__ */ new Map());
1187
- direct.flatValueScope = scope;
1188
- direct.flatValueScopeKind = resolveValues;
1189
- }
1190
- let maps = scope.get(property);
1191
- if (maps === void 0) scope.set(property, maps = { direct: /* @__PURE__ */ new Map() });
1192
- const byRaw = embedded ? maps.embedded ||= /* @__PURE__ */ new Map() : maps.direct;
1193
- if (!fontProperty) {
1283
+ const fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
1284
+ const resolveValues = state.styleProps.resolveValues;
1285
+ let byRaw;
1286
+ if (!fontProperty && !nativeColors) {
1287
+ const revision = grammar.revision;
1288
+ if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
1289
+ valueCacheConf = state.conf;
1290
+ valueCacheRevision = revision;
1291
+ valueCaches = /* @__PURE__ */ new WeakMap();
1292
+ valueCacheEntries = 0;
1293
+ state.flatValueScope = void 0;
1294
+ }
1295
+ const direct = state;
1296
+ let scope = direct.flatValueScope;
1297
+ if (scope === void 0) {
1298
+ const themeObject = state.theme && typeof state.theme === "object" ? state.theme : valueCacheRoot;
1299
+ let byScope = valueCaches.get(themeObject);
1300
+ if (!byScope) valueCaches.set(themeObject, byScope = /* @__PURE__ */ new Map());
1301
+ const scopeKey = `${state.flatThemeName || ""}${resolveValues}`;
1302
+ scope = byScope.get(scopeKey);
1303
+ if (!scope) byScope.set(scopeKey, scope = /* @__PURE__ */ new Map());
1304
+ direct.flatValueScope = scope;
1305
+ }
1306
+ let maps = scope.get(property);
1307
+ if (maps === void 0) scope.set(property, maps = { direct: /* @__PURE__ */ new Map() });
1308
+ byRaw = embedded ? maps.embedded ||= /* @__PURE__ */ new Map() : maps.direct;
1194
1309
  const known = byRaw.get(raw);
1195
1310
  if (known !== void 0 || byRaw.has(raw)) return known;
1196
1311
  }
@@ -1220,20 +1335,87 @@ function configuredValue(state, property, raw, embedded = false) {
1220
1335
  }
1221
1336
  }
1222
1337
  if (process.env.NODE_ENV === "development") {
1223
- const category = grammar.tokenCategory(property);
1224
- if (category && category !== "color" && state.conf.tokensParsed.color?.[name]) warnOnce(`"${name}" contributes to "color", not "${property}"`);
1338
+ const category = grammar.tokenCategory(property) || grammar.tokenCategory(state.conf.shorthands[property] || property);
1339
+ if (category && category !== "color" && category !== "boxShadow" && category !== "textShadow" && state.conf.tokensParsed.color?.[name]) warnOnce(`"${name}" contributes to "color", not "${property}"`);
1340
+ if (!value && !fontProperty) {
1341
+ if (name.charCodeAt(0) === 36 || raw.charCodeAt(0) === 36) {
1342
+ const suggested = name.charCodeAt(0) === 36 ? name.slice(1) : raw.slice(1);
1343
+ warnOnce(`v2-token:${property}=${raw}`, `${property}="${raw}": v3 tokens have no "$" prefix, did you mean "${suggested}"?`);
1344
+ } else if ((category === "size" || category === "space" || category === "radius" || category === "zIndex") && /^-?\d+(?:\.\d+)?$/.test(name)) {
1345
+ let nearest;
1346
+ let minDistance = Infinity;
1347
+ const rawNum = Number(name);
1348
+ const tokens = category ? state.conf.tokensParsed[category] : void 0;
1349
+ if (tokens && Number.isFinite(rawNum)) for (const key in tokens) {
1350
+ const val = tokens[key]?.val;
1351
+ const valNum = typeof val === "number" ? val : Number(val);
1352
+ if (Number.isFinite(valNum)) {
1353
+ const dist = Math.abs(valNum - rawNum);
1354
+ if (dist < minDistance) {
1355
+ minDistance = dist;
1356
+ nearest = key;
1357
+ }
1358
+ }
1359
+ }
1360
+ if (nearest) warnOnce(`numeric-token:${property}=${raw}`, `${property}="${raw}" was passed to CSS as-is${category === "zIndex" ? "" : " with px units"}${nearest ? `; nearest token is "${nearest}"` : ""}`);
1361
+ } else if (category === "color" && /^[a-zA-Z0-9-]+$/.test(name) && /[a-zA-Z]/.test(name)) {
1362
+ const lower = name.toLowerCase();
1363
+ if (!namedCssColors.has(lower) && !cssWideColorKeywords.has(lower)) {
1364
+ const themeKeys = [];
1365
+ if (state.theme && typeof state.theme === "object") for (const k in state.theme) themeKeys.push(k);
1366
+ if (state.conf.themes) {
1367
+ const active = state.conf.themes[state.flatThemeName || ""];
1368
+ if (active) for (const k in active) themeKeys.push(k);
1369
+ else for (const t in state.conf.themes) for (const k in state.conf.themes[t]) themeKeys.push(k);
1370
+ }
1371
+ let bestMatch;
1372
+ let minDistance = 3;
1373
+ for (const key of themeKeys) {
1374
+ if (Math.abs(key.length - name.length) > 2) continue;
1375
+ const m = name.length;
1376
+ const n = key.length;
1377
+ const d = [];
1378
+ for (let i = 0; i <= m; i++) d[i] = i;
1379
+ for (let j = 1; j <= n; j++) {
1380
+ let prev = d[0];
1381
+ d[0] = j;
1382
+ for (let i = 1; i <= m; i++) {
1383
+ const temp = d[i];
1384
+ d[i] = name[i - 1] === key[j - 1] ? prev : Math.min(prev, d[i], d[i - 1]) + 1;
1385
+ prev = temp;
1386
+ }
1387
+ }
1388
+ const dist = d[m];
1389
+ if (dist <= 2 && dist < minDistance) {
1390
+ minDistance = dist;
1391
+ bestMatch = key;
1392
+ }
1393
+ }
1394
+ warnOnce(`unknown-color:${property}=${raw}`, bestMatch ? `unknown color "${name}", did you mean "${bestMatch}"?` : `unknown color "${name}"`);
1395
+ }
1396
+ }
1397
+ }
1225
1398
  }
1226
1399
  let out = raw;
1227
1400
  if (isVariable(value)) {
1228
- out = resolveValues === "except-theme" && fromTheme ? `${THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : resolveVariableValue(property, value, resolveValues);
1401
+ out = resolveValues === "except-theme" && fromTheme ? `${THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : resolveVariableValue(nativeColors ? "color" : property, value, resolveValues);
1229
1402
  if (opacity !== void 0) out = `color-mix(in srgb, ${out} ${opacity}%, transparent)`;
1230
1403
  }
1404
+ if (nativeColors && out && typeof out === "object") {
1405
+ const reference = `__tamagui_native_color_${nativeColors.size}`;
1406
+ nativeColors.set(reference, out);
1407
+ out = reference;
1408
+ }
1231
1409
  if (embedded && out === raw) {
1232
1410
  const usedSafeArea = state.flatUsesSafeArea;
1233
- out = grammar.embeddedTokens(raw, (word) => configuredValue(state, property, word));
1411
+ out = grammar.embeddedTokens(raw, (word) => {
1412
+ const resolved = configuredValue(state, property, word, false, nativeColors);
1413
+ if (resolved !== word || !shadowRecipeProperties.has(property) || !/^[a-z][\w-]*$/i.test(word)) return resolved;
1414
+ return configuredValue(state, "color", word, false, nativeColors);
1415
+ });
1234
1416
  if (!usedSafeArea && state.flatUsesSafeArea) return out;
1235
1417
  }
1236
- if (!fontProperty && !fromTheme) if (valueCacheEntries > 8192) {
1418
+ if (!fontProperty && !fromTheme && !nativeColors) if (valueCacheEntries > 8192) {
1237
1419
  valueCaches = /* @__PURE__ */ new WeakMap();
1238
1420
  valueCacheEntries = 0;
1239
1421
  } else {
@@ -1247,13 +1429,15 @@ function ownsSourceLayer(state, property, conditional = false) {
1247
1429
  const layer = direct.flatPass?.[passSourceLayer] || 0;
1248
1430
  const layers = direct.flatPropertyLayers ||= /* @__PURE__ */ new Map();
1249
1431
  const previous = layers.get(property);
1250
- if (previous !== void 0) {
1251
- if (previous > layer) return false;
1252
- if (previous < layer) {
1253
- if (conditional) return true;
1254
- clearDirectStyle(state, property);
1432
+ if (!layer && !conditional && !direct.flatPass?.[passVariantOutput]) {
1433
+ const entries = direct.flatSlots?.get(styleSlot(property));
1434
+ if (entries) {
1435
+ for (let index = entries.length; index--;) if (entries[index][0] === property && entries[index][9]) entries.splice(index, 1);
1255
1436
  }
1256
- } else if (conditional) return true;
1437
+ }
1438
+ if (previous > layer) return false;
1439
+ if (conditional && previous !== layer) return true;
1440
+ if (previous < layer) clearDirectStyle(state, property);
1257
1441
  layers.set(property, layer);
1258
1442
  return true;
1259
1443
  }
@@ -1280,6 +1464,10 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
1280
1464
  addTransformValue(state.transformAccumulator, property, value);
1281
1465
  return;
1282
1466
  }
1467
+ if (property === "transition" && condition & 12 && !state.staticConfig.isHOC && state.styleProps.isAnimated) {
1468
+ streamWriteInline(state, property, value, cursor, originalValue, false, -1, true);
1469
+ return;
1470
+ }
1283
1471
  const shouldPromoteAnimatedStyle = canGenerateCSS && !condition && !state.flatShouldDoClasses && !state.styleProps.noMergeStyle && state.styleProps.isAnimated && state.animationDriver?.inputStyle === "css" && property in nonAnimatableStyleProps;
1284
1472
  if (canGenerateCSS && (state.flatShouldDoClasses || shouldPromoteAnimatedStyle)) {
1285
1473
  writeStyleRecord(state, property, value, cursor, originalValue, shouldPromoteAnimatedStyle ? recordCSS : 0);
@@ -1288,19 +1476,19 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
1288
1476
  streamWriteInline(state, property, value, cursor, originalValue);
1289
1477
  }
1290
1478
  function numericUnitValue(value, first, second) {
1291
- const unitLength = value.endsWith(first) || second !== void 0 && value.endsWith(second) ? first.length : 0;
1292
- if (!unitLength || value.length === unitLength) return NaN;
1293
- const numeric = Number(value.slice(0, value.length - unitLength));
1294
- return Number.isFinite(numeric) ? numeric : NaN;
1479
+ return value.length > first.length && (value.endsWith(first) || value.endsWith(second)) ? +value.slice(0, -first.length) : NaN;
1480
+ }
1481
+ function resolveNumericValue(value) {
1482
+ let numeric = numericUnitValue(value, "px", "dp");
1483
+ return isFinite(numeric) ? numeric : isFinite(numeric = +value) ? numeric : value;
1295
1484
  }
1296
1485
  function emitResolved(state, property, raw, cursor, originalValue, contextOnly) {
1297
- let value = configuredValue(state, property, raw, true);
1298
- if (!state.flatShouldDoClasses && typeof value === "string") {
1299
- const unitValue = numericUnitValue(value, "px", "dp");
1300
- if (Number.isFinite(unitValue)) value = unitValue;
1301
- else if (value !== "" && Number.isFinite(Number(value))) value = Number(value);
1302
- }
1303
- emitProperty(state, property, value, cursor, originalValue, contextOnly);
1486
+ emitProperty(state, property, resolveValue(state, property, raw), cursor, originalValue, contextOnly);
1487
+ }
1488
+ function resolveValue(state, property, raw, nativeColors) {
1489
+ let value = typeof raw === "string" ? configuredValue(state, property, raw, true, nativeColors) : raw;
1490
+ if (!state.flatShouldDoClasses && typeof value === "string" && value !== "" && property !== "lineHeight") value = resolveNumericValue(value);
1491
+ return value;
1304
1492
  }
1305
1493
  function shadowUnit(part) {
1306
1494
  return typeof part === "number" ? `${part}px` : part || "0px";
@@ -1320,7 +1508,13 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1320
1508
  const grammar = getConfigRevisionState(state.conf);
1321
1509
  property = webStyleProperty(property);
1322
1510
  if (property === "backdropFilter") emitValue(state, "WebkitBackdropFilter", raw, cursor, originalValue, contextOnly);
1323
- if (isVariable(raw)) raw = resolveVariableValue(property, raw, !state.flatShouldDoClasses && state.styleProps.resolveValues === "auto" ? "value" : state.styleProps.resolveValues);
1511
+ if (isVariable(raw)) {
1512
+ raw = resolveVariableValue(property, raw, state.styleProps.resolveValues);
1513
+ if (property === "lineHeight") {
1514
+ emitProperty(state, property, raw, cursor, originalValue, contextOnly);
1515
+ return;
1516
+ }
1517
+ }
1324
1518
  if (typeof raw === "string" && (property === "transition" || property === "transitionProperty")) raw = grammar.normalizeTransition(raw);
1325
1519
  if ((property === "borderWidth" || property === "borderTopWidth" || property === "borderRightWidth" || property === "borderBottomWidth" || property === "borderLeftWidth") && state.styleProps.noNormalize !== false) writeStyleRecord(state, property.slice(0, -5) + "Style", "solid", cursor, originalValue, recordDefault);
1326
1520
  const propertyKind = grammar.propertyKind(property);
@@ -1357,10 +1551,17 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1357
1551
  }
1358
1552
  if (property === "transform") {
1359
1553
  if (canGenerateCSS && state.flatShouldDoClasses && Array.isArray(raw)) raw = transformsToString(raw);
1554
+ if (typeof raw === "string" && !state.flatShouldDoClasses && state.animationDriver?.inputStyle === "value") {
1555
+ const transform = parseNativeTransform(raw);
1556
+ if (transform) {
1557
+ emitProperty(state, property, transform, cursor, originalValue, contextOnly);
1558
+ return;
1559
+ }
1560
+ }
1360
1561
  }
1361
1562
  if (typeof raw === "string" && property === "background") {
1362
1563
  const parts = splitComponents(raw);
1363
- if (parts.length === 1 && !startsValueFunction(parts[0])) {
1564
+ if (parts.length === 1 && (!startsValueFunction(parts[0]) || false)) {
1364
1565
  emitResolved(state, "backgroundColor", parts[0], cursor, originalValue, contextOnly);
1365
1566
  return;
1366
1567
  }
@@ -1368,7 +1569,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1368
1569
  if (property === "x" || property === "y" || property === "scale" || property === "scaleX" || property === "scaleY" || property === "rotate") {
1369
1570
  let value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
1370
1571
  if (!state.flatShouldDoClasses && typeof value2 === "string" && !value2.startsWith(THEME_REF_PREFIX)) {
1371
- if (property === "rotate" && !Number.isFinite(numericUnitValue(value2, "deg", "rad"))) {
1572
+ if (property === "rotate" && !isFinite(numericUnitValue(value2, "deg", "rad")) && !startsValueFunction(value2)) {
1372
1573
  if (process.env.NODE_ENV === "development") warnOnce(`native transform "${property}" cannot represent "${value2}"; dropping it`);
1373
1574
  if (condition & 1) {
1374
1575
  removeTransformValue(state.transformAccumulator, property);
@@ -1376,9 +1577,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1376
1577
  }
1377
1578
  return;
1378
1579
  }
1379
- const unitValue = numericUnitValue(value2, "px", "dp");
1380
- if (Number.isFinite(unitValue)) value2 = unitValue;
1381
- else if (Number.isFinite(Number(value2))) value2 = Number(value2);
1580
+ value2 = resolveNumericValue(value2);
1382
1581
  }
1383
1582
  if (!canGenerateCSS || !state.flatShouldDoClasses) {
1384
1583
  emitProperty(state, property, value2, cursor, originalValue, contextOnly);
@@ -1402,13 +1601,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1402
1601
  else emitProperty(state, property, raw, cursor, originalValue, contextOnly);
1403
1602
  return;
1404
1603
  }
1405
- let value = raw;
1406
- if (typeof raw === "string") value = configuredValue(state, property, raw, true);
1407
- if (!state.flatShouldDoClasses && typeof value === "string") {
1408
- const unitValue = numericUnitValue(value, "px", "dp");
1409
- if (Number.isFinite(unitValue)) value = unitValue;
1410
- else if (value !== "" && Number.isFinite(Number(value))) value = Number(value);
1411
- }
1604
+ let value = resolveValue(state, property, raw, void 0);
1412
1605
  if (canGenerateCSS && state.flatShouldDoClasses && property === "boxShadow" && !condition) {
1413
1606
  state.flatBoxShadow = value;
1414
1607
  state.flatBoxShadowSequence = frameSequence + 1;
@@ -1419,7 +1612,12 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1419
1612
  }
1420
1613
  emitProperty(state, property, value, cursor, originalValue, contextOnly);
1421
1614
  }
1422
- function walkConditionalValue(state, property, value, parent, sink, warnMode = 0) {
1615
+ function emitConditionalValue(state, property, payload, condition, source, sink, mode, contextOnly) {
1616
+ if (sink) sink(payload, condition, source);
1617
+ else if (condition) emitUnderCondition(state, property, payload, condition, mode === 2 || state.staticConfig.isHOC || state.styleProps.stylePieceEntries ? payload : void 0, contextOnly, mode, source);
1618
+ else emitValue(state, property, payload, null, payload, contextOnly);
1619
+ }
1620
+ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0, contextOnly = false) {
1423
1621
  const parentCondition = parent || null;
1424
1622
  let hasBase = false;
1425
1623
  let conditions = 0;
@@ -1427,13 +1625,18 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
1427
1625
  if (typeof value === "string") {
1428
1626
  const parsed = getConfigRevisionState(state.conf).parseFlatValue(value);
1429
1627
  const [segments, failure, failureIndex] = parsed;
1628
+ if (process.env.NODE_ENV === "development") {
1629
+ if (getSetting("styleValueSyntax") === "object") {
1630
+ if (segments.length > 5 || segments.length >= 5 && segments[2] !== -1 || value.includes(":")) warnOnce(`syntax:string:${property}=${value}`, `string syntax is disabled by config (styleValueSyntax: 'object'); received "${property}=${value}"`);
1631
+ }
1632
+ }
1430
1633
  let slices = parsedSlices.get(parsed);
1431
1634
  if (slices === void 0) parsedSlices.set(parsed, slices = []);
1432
1635
  const chainCount = segments.length / 5 - 1;
1433
1636
  if (property === "aspectRatio" && chainCount === 1) {
1434
- const left = Number(value.slice(segments[7], segments[8]));
1435
- const right = Number(value.slice(segments[5], segments[6]));
1436
- if (left > 0 && right > 0 && Number.isFinite(left) && Number.isFinite(right)) return false;
1637
+ const left = +value.slice(segments[7], segments[8]);
1638
+ const right = +value.slice(segments[5], segments[6]);
1639
+ if (left > 0 && right > 0 && isFinite(left) && isFinite(right)) return false;
1437
1640
  }
1438
1641
  for (let index = 0; index < segments.length; index += 5) {
1439
1642
  const start = segments[index];
@@ -1443,10 +1646,10 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
1443
1646
  if (start === end) continue;
1444
1647
  if (flags & 2) {
1445
1648
  const payload = slices[index] ??= value.slice(start, end);
1446
- sink(payload, parentCondition, payload);
1649
+ emitConditionalValue(state, property, payload, parentCondition, payload, sink, warnMode, contextOnly);
1447
1650
  hasBase = true;
1448
1651
  } else if (process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
1449
- sink(value, parentCondition, value);
1652
+ emitConditionalValue(state, property, value, parentCondition, value, sink, warnMode, contextOnly);
1450
1653
  hasBase = true;
1451
1654
  } else if (warnMode) warnScanFailure(property, value, failure, failureIndex);
1452
1655
  }
@@ -1467,30 +1670,36 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
1467
1670
  }
1468
1671
  const cursor = conditionFromKey(state, slices[index + 2] ??= value.slice(segments[index + 2], segments[index + 3]), parentCondition);
1469
1672
  conditions |= cursor[conditionValue];
1470
- if (cursor[conditionValue] & conditionResolvedFlag || warnMode) sink(slices[index] ??= value.slice(start, end), cursor, value);
1673
+ if (cursor[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, slices[index] ??= value.slice(start, end), cursor, value, sink, warnMode, contextOnly);
1471
1674
  }
1472
1675
  if (process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
1473
1676
  } else {
1474
1677
  if (!value || typeof value !== "object" || Array.isArray(value) || isVariable(value) || !classifyConditionalObject(value, state)) return false;
1678
+ if (process.env.NODE_ENV === "development") {
1679
+ if (getSetting("styleValueSyntax") === "string") warnOnce(`syntax:object:${property}=${JSON.stringify(value)}`, `object-form conditional syntax is disabled by config (styleValueSyntax: 'string'); received "${property}"`);
1680
+ }
1475
1681
  if (value.default != null) {
1476
- sink(value.default, parentCondition, value.default);
1682
+ emitConditionalValue(state, property, value.default, parentCondition, value.default, sink, warnMode, contextOnly);
1477
1683
  hasBase = true;
1478
1684
  }
1479
1685
  for (const key in value) {
1480
1686
  if (key === "default" || value[key] == null) continue;
1481
1687
  const cursor = conditionFromKey(state, key, parentCondition);
1482
1688
  conditions |= cursor[conditionValue];
1483
- if (cursor[conditionValue] & conditionResolvedFlag || warnMode) sink(value[key], cursor, value[key]);
1689
+ if (cursor[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, value[key], cursor, value[key], sink, warnMode, contextOnly);
1484
1690
  }
1485
1691
  }
1486
- if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && getConfigRevisionState(state.conf).tokenCategory(property) && splitComponents(lastPayload).length > 1) warnOnce(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
1487
- if (warnMode === 1 && (!canGenerateCSS || !state.flatShouldDoClasses) && conditions & 12 && !hasBase) {
1692
+ if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && getConfigRevisionState(state.conf).tokenCategory(property) && getConfigRevisionState(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && splitComponents(lastPayload).length > 1) warnOnce(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
1693
+ if (warnMode === 1 && conditions & 12 && !hasBase) {
1488
1694
  const resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
1489
- if (resting !== null && !state.flatPropertyLayers?.has(property)) sink(resting, parentCondition, resting);
1695
+ const layers = state.flatPropertyLayers;
1696
+ const owned = !canGenerateCSS || !state.flatShouldDoClasses ? layers?.has(property) : property === "scale" ? layers?.has("--t-scale-x") || layers?.has("--t-scale-y") : layers?.has(property === "x" ? "--t-x" : property === "y" ? "--t-y" : property === "scaleX" ? "--t-scale-x" : property === "scaleY" ? "--t-scale-y" : property);
1697
+ if (resting !== null && !owned) emitConditionalValue(state, property, resting, parentCondition, resting, sink, warnMode, contextOnly);
1490
1698
  }
1491
1699
  return true;
1492
1700
  }
1493
1701
  function contributeValue(state, property, value, originalValue, contextOnly = false, condition) {
1702
+ if (!contextOnly && isRemovedVendorStyleProp(property) && !(state.staticConfig.validStyles && property in state.staticConfig.validStyles)) return;
1494
1703
  if (condition !== void 0) {
1495
1704
  const parent2 = state.flatPass?.[passParentCursor] || null;
1496
1705
  let effective;
@@ -1500,7 +1709,7 @@ function contributeValue(state, property, value, originalValue, contextOnly = fa
1500
1709
  if (!(condition[conditionValue] & conditionResolvedFlag)) setConditionUnresolved(effective);
1501
1710
  commitCondition(effective);
1502
1711
  } else effective = condition;
1503
- if (typeof value !== "string" && walkConditionalValue(state, property, value, effective, (payload, cursor, source) => emitUnderCondition(state, property, payload, cursor, payload, contextOnly, 2, source), 2)) return true;
1712
+ if (typeof value !== "string" && walkConditionalValue(state, property, value, effective, null, 2, contextOnly)) return true;
1504
1713
  emitUnderCondition(state, property, value, effective, originalValue, contextOnly, 2, value);
1505
1714
  return true;
1506
1715
  }
@@ -1517,7 +1726,7 @@ function contributeValue(state, property, value, originalValue, contextOnly = fa
1517
1726
  return true;
1518
1727
  }
1519
1728
  }
1520
- if (walkConditionalValue(state, property, value, state.flatPass?.[passParentCursor] || null, (payload, cursor, source) => cursor ? emitUnderCondition(state, property, payload, cursor, void 0, contextOnly, 1, source) : emitValue(state, property, payload, null, payload, contextOnly), 1)) return true;
1729
+ if (walkConditionalValue(state, property, value, state.flatPass?.[passParentCursor] || null, null, 1, contextOnly)) return true;
1521
1730
  if (value != null) {
1522
1731
  emitAtParentCondition(state, property, value, originalValue ?? value, contextOnly);
1523
1732
  return true;
@@ -1526,19 +1735,21 @@ function contributeValue(state, property, value, originalValue, contextOnly = fa
1526
1735
  }
1527
1736
  function clearDirectStyle(state, property) {
1528
1737
  const direct = state;
1738
+ if (direct.flatDynamicColors) delete direct.flatDynamicColors[property];
1529
1739
  property = webStyleProperty(property);
1530
1740
  const propertyKind = getConfigRevisionState(state.conf).propertyKind(property);
1531
1741
  const atomicKey = property.startsWith("transition") ? "transition" : propertyKind > 0 && propertyKind < 5 ? "boxShadow" : propertyKind === 6 ? "textShadow" : propertyKind === 5 ? "transform" : property;
1532
1742
  const slot = styleSlot(atomicKey);
1533
1743
  direct.flatAtomics?.delete(slot);
1534
1744
  if (direct.flatSlots) {
1535
- if (slot !== atomicKey) {
1745
+ if (slot !== atomicKey || atomicKey === "flex") {
1536
1746
  const entries = direct.flatSlots.get(slot);
1537
1747
  if (entries) {
1538
1748
  for (let index = entries.length; index--;) if (entries[index][0] === atomicKey) entries.splice(index, 1);
1749
+ if (!entries.length) direct.flatSlots.delete(slot);
1539
1750
  }
1540
1751
  }
1541
- direct.flatSlots.delete(atomicKey);
1752
+ if (atomicKey !== "flex") direct.flatSlots.delete(atomicKey);
1542
1753
  }
1543
1754
  if (atomicKey === "transform") state.transformAccumulator = void 0;
1544
1755
  if (state.style) delete state.style[atomicKey];
@@ -1550,9 +1761,12 @@ function emitVariantStyle(state, key, value, original, condition, disabled) {
1550
1761
  if (key !== pass[passMapSourceKey] && state.flatCallerVariantKeys?.has(key)) return;
1551
1762
  if (state.flatStyleStaticConfig.styledContextKeys?.has(key)) (state.overriddenContextProps ||= {})[key] = (state.originalContextPropValues ||= {})[key] = original;
1552
1763
  const parent = pass[passParentCursor];
1764
+ const parentVariantOutput = pass[passVariantOutput];
1553
1765
  pass[passParentCursor] = condition;
1766
+ pass[passVariantOutput] = true;
1554
1767
  contributeProp(pass, key, value, original, disabled);
1555
1768
  pass[passParentCursor] = parent;
1769
+ pass[passVariantOutput] = parentVariantOutput;
1556
1770
  }
1557
1771
  function getFontFamilyFromNameOrVariable(input, conf) {
1558
1772
  if (isVariable(input)) {