@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
@@ -32,6 +32,7 @@ __export(getSplitStyles_exports, {
32
32
  walkConditionalValue: () => walkConditionalValue
33
33
  });
34
34
  module.exports = __toCommonJS(getSplitStyles_exports);
35
+ var import_transitionResolver = require("@tamagui/animation-helpers/transitionResolver");
35
36
  var import_constants = require("@tamagui/constants");
36
37
  var import_helpers = require("@tamagui/helpers");
37
38
  var import_runtime = require("@tamagui/style-grammar/runtime");
@@ -47,6 +48,7 @@ require("./expandStyles.cjs");
47
48
  var import_grammarConfig = require("./grammarConfig.cjs");
48
49
  var import_mediaState = require("./mediaState.cjs");
49
50
  var import_styleStaticConfig = require("./styleStaticConfig.cjs");
51
+ var import_styleFrontend = require("./styleFrontend.cjs");
50
52
  require("./nativeStyleEngine.cjs");
51
53
  var import_warnOnce = require("./warnOnce.cjs");
52
54
  require("./getDynamicVal.cjs");
@@ -55,8 +57,11 @@ var import_insertStyleRule = require("./insertStyleRule.cjs");
55
57
  var import_log = require("./log.cjs");
56
58
  var import_normalizeColor = require("./normalizeColor.cjs");
57
59
  var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs");
58
- require("./parseNativeStyle.native.cjs");
59
- require("./parseNativeTransform.native.cjs");
60
+ require("./nativeTextMetrics.cjs");
61
+ require("./isTamaguiElement.cjs");
62
+ require("./parseNativeStyle.cjs");
63
+ var import_parseNativeTransform = require("./parseNativeTransform.native.cjs");
64
+ require("./resolveNativeUnits.cjs");
60
65
  var import_resolveVariableValue = require("./resolveVariableValue.cjs");
61
66
  var import_skipProps = require("./skipProps.cjs");
62
67
  var import_styleOriginalValues = require("./styleOriginalValues.cjs");
@@ -254,6 +259,7 @@ const passFrontendContainerType = 27;
254
259
  const passSourceLayer = 28;
255
260
  const passParentCursor = 29;
256
261
  const passMapSourceKey = 30;
262
+ const passVariantOutput = 31;
257
263
  const passFlags = 13;
258
264
  const sourceLayerBase = 0;
259
265
  const sourceLayerVariant = 1;
@@ -268,6 +274,9 @@ const passHocFlag = 16;
268
274
  const passTextFlag = 32;
269
275
  const passInputFlag = 64;
270
276
  const passAsChildStyleFlag = 128;
277
+ function isRemovedVendorStyleProp(property) {
278
+ return /^(Webkit|Moz|ms)[A-Z]/.test(property) && !(property in import_helpers.stylePropsAll);
279
+ }
271
280
  function isValidStyleKey(key, validStyles) {
272
281
  return key in validStyles;
273
282
  }
@@ -291,7 +300,6 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
291
300
  const shouldCheckSkipProps = !noSkip;
292
301
  const asChildExceptStyleLike = Boolean(flags & passAsChildStyleFlag);
293
302
  const isTextOrInput = isText || isInput;
294
- const hocParentVariants = isHOC ? parentVariants : void 0;
295
303
  let keyInit = keyOg;
296
304
  let valInit = valOg;
297
305
  if (keyInit === "children") {
@@ -315,17 +323,24 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
315
323
  return;
316
324
  }
317
325
  const resolveClassName = styleFrontend?.resolveClassName;
326
+ let composedProps = null;
318
327
  const sink = (entry) => {
319
328
  const property = entry[0];
320
- if (entry[2] !== void 0) {
321
- if (isValidStyleKey(property, validStyles)) contributeValue(styleState, property, entry[1], void 0, false, entry[2]);
329
+ const condition2 = entry[2];
330
+ if (property.charCodeAt(0) === 95 && property.charCodeAt(1) === 95) {
331
+ composedProps ||= {};
332
+ composedProps[property] = (0, import_styleFrontend.mergeFrontendCondition)(composedProps[property], entry[1], condition2);
333
+ return;
334
+ }
335
+ if (condition2 !== void 0) {
336
+ if (isValidStyleKey(property, validStyles)) contributeValue(styleState, property, entry[1], void 0, false, condition2);
322
337
  else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property}" is not a valid style on this component; the frontend value is dropped.`);
323
- } else {
324
- if (property === "group") pass[passFrontendGroup] = entry[1];
325
- else if (property === "container") pass[passFrontendContainer] = entry[1];
326
- else if (property === "containerType") pass[passFrontendContainerType] = entry[1];
327
- contributeProp(pass, property, entry[1]);
338
+ return;
328
339
  }
340
+ if (property === "group") pass[passFrontendGroup] = entry[1];
341
+ else if (property === "container") pass[passFrontendContainer] = entry[1];
342
+ else if (property === "containerType") pass[passFrontendContainerType] = entry[1];
343
+ contributeProp(pass, property, entry[1]);
329
344
  };
330
345
  let start = 0;
331
346
  for (let index = 0; index <= valInit.length; index++) {
@@ -351,18 +366,38 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
351
366
  }
352
367
  start = index + 1;
353
368
  }
369
+ if (composedProps) {
370
+ const composed = styleFrontend.compose?.(composedProps);
371
+ for (const property in composed) contributeProp(pass, property, composed[property]);
372
+ }
354
373
  }
355
374
  return;
356
375
  }
357
376
  if (keyInit === import_skipProps.HOC_CLASSNAME_MARKER) {
358
- if (valInit && typeof valInit === "object") {
377
+ if (valInit) {
378
+ const [hocClassNames, hocSlots] = valInit;
359
379
  const direct = styleState;
360
380
  const layers = direct.flatPropertyLayers ||= /* @__PURE__ */ new Map();
361
- for (const property in valInit) {
381
+ for (const property in hocClassNames) {
382
+ if (hocSlots?.has(property)) continue;
362
383
  clearDirectStyle(styleState, property);
363
- styleState.classNames[property] = valInit[property];
384
+ styleState.classNames[property] = hocClassNames[property];
364
385
  layers.set(property, pass[passSourceLayer]);
365
386
  }
387
+ if (hocSlots) {
388
+ const slots = direct.flatSlots ||= /* @__PURE__ */ new Map();
389
+ const markerLayer = pass[passSourceLayer];
390
+ for (const [slot, entries] of hocSlots) for (const entry of entries) {
391
+ pass[passSourceLayer] = Math.max(entry[7] >> 5, sourceLayerResolver);
392
+ if (!ownsSourceLayer(styleState, entry[0], !!entry[2])) continue;
393
+ if (!isHOC && styleState.styleProps.isAnimated && (slot === "transition" || entry[8]) && !(entry[0] in import_helpers.nonAnimatableStyleProps)) {
394
+ 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];
395
+ const value = styleState.animationDriver?.inputStyle === "value" ? entry[6] : entry[1];
396
+ entry[3] ? contributeValue(styleState, property, value, entry[6], false, entry[3]) : emitValue(styleState, property, value, null, entry[6], false);
397
+ } else writeStyleSlot(slots, slot, [...entry], pass[passSourceLayer]);
398
+ }
399
+ pass[passSourceLayer] = markerLayer;
400
+ }
366
401
  }
367
402
  return;
368
403
  }
@@ -390,11 +425,30 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
390
425
  continue;
391
426
  }
392
427
  const styleOriginals = shouldTrackStyleTokenProvenance ? import_styleOriginalValues.styleOriginalValues.get(style) : void 0;
393
- for (const key in style) {
394
- if (style[key] == null) continue;
395
- if (key === "containerName") pass[passContainerName] = style[key];
396
- else if (key === "containerType") pass[passContainerType] = style[key];
397
- contributeValue(styleState, key, style[key], styleOriginals?.[key]);
428
+ for (const authoredKey in style) {
429
+ const value = style[authoredKey];
430
+ if (value == null) continue;
431
+ const key = disableExpandShorthands ? authoredKey : shorthands[authoredKey] || authoredKey;
432
+ let inline = !styleState.styleProps.stylePieceEntries;
433
+ if (key === "containerName") {
434
+ pass[passContainerName] = value;
435
+ inline = false;
436
+ } else if (key === "containerType") {
437
+ pass[passContainerType] = value;
438
+ inline = false;
439
+ }
440
+ if (inline) {
441
+ if (typeof value === "string") {
442
+ const [segments] = (0, import_grammarConfig.getConfigRevisionState)(conf).parseFlatValue(value);
443
+ for (let index2 = 4; index2 < segments.length; index2 += 5) if (!(segments[index2] & 1)) {
444
+ inline = false;
445
+ break;
446
+ }
447
+ } else if (value && typeof value === "object" && !Array.isArray(value) && !(0, import_createVariable.isVariable)(value) && classifyConditionalObject(value, styleState) !== 0) inline = false;
448
+ }
449
+ styleState.flatInlineStyleProp = inline;
450
+ contributeValue(styleState, key, value, styleOriginals?.[authoredKey]);
451
+ styleState.flatInlineStyleProp = false;
398
452
  }
399
453
  }
400
454
  pass[passSourceLayer] = layerBeforeStyle;
@@ -404,12 +458,26 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
404
458
  const defaultVal = defaultProps[keyOg] ?? defaultProps[keyInit];
405
459
  if (defaultVal !== void 0 && valInit === defaultVal) return;
406
460
  }
461
+ if (process.env.NODE_ENV === "development") {
462
+ if (!isValidStyleKey(keyInit, validStyles) && (keyInit === "animation" || !(keyInit in import_helpers.stylePropsAll)) && (!variants || !(keyInit in variants))) {
463
+ let replacement;
464
+ if (keyInit === "animation") replacement = "transition=";
465
+ else if (keyInit === "hoverStyle") replacement = "hover: clause";
466
+ else if (keyInit === "pressStyle") replacement = "press: clause";
467
+ else if (keyInit === "focusStyle") replacement = "focus: clause";
468
+ else if (keyInit === "enterStyle") replacement = "enter: clause";
469
+ else if (keyInit === "exitStyle") replacement = "exit: clause";
470
+ else if (keyInit.charCodeAt(0) === 36 && keyInit.length > 1) replacement = `${keyInit.slice(1)}: clause`;
471
+ if (replacement) (0, import_warnOnce.warnOnce)(`v2-prop:${keyInit}`, `prop "${keyInit}" was removed in v3; use ${replacement}`);
472
+ }
473
+ }
407
474
  if (keyInit in import_skipProps.skipProps && shouldSkipDirectProps && !neverSkipProps?.[keyInit]) {
408
475
  if (keyInit === "container") pass[passContainerValue] = valInit;
409
476
  if (keyInit === "transition" && typeof valInit === "string") {
410
- const animationConfig = driverAnimations?.[valInit];
411
- if (animationConfig && driverOutputStyle === "css" && process.env.IS_STATIC === "is_static") valInit = `all ${animationConfig}`;
412
- else if (animationConfig) return;
477
+ const transitions = (0, import_transitionResolver.getTransitionResolver)();
478
+ const resolved = transitions?.resolve(valInit, { animations: driverAnimations });
479
+ if (resolved?.fused) if (driverOutputStyle === "css" && process.env.IS_STATIC === "is_static") valInit = transitions.toCSS(resolved) ?? valInit;
480
+ else return;
413
481
  } else return;
414
482
  }
415
483
  let isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles);
@@ -417,11 +485,15 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
417
485
  viewProps[keyInit] = valInit;
418
486
  return;
419
487
  }
488
+ if (pass[passVariantOutput] && !isValidStyleKeyInit && !keyInit.startsWith("aria-") && !(keyInit in import_helpers.stylePropsAll) && !(keyInit in import_skipProps.skipProps) && !(variants && keyInit in variants) && !(parentVariants && keyInit in parentVariants) && !styledContextKeys?.has(keyInit) && !(styledContext && keyInit in styledContext)) {
489
+ if (process.env.NODE_ENV === "development") (0, import_warnOnce.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.`);
490
+ return;
491
+ }
420
492
  if (!noExpand) {
421
493
  if (keyInit === "disabled" && valInit === true) {
422
494
  viewProps["aria-disabled"] = true;
423
495
  if (isInput || elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") viewProps.disabled = true;
424
- if (!variants?.disabled) return;
496
+ if (!variants?.disabled && !isHOC) return;
425
497
  }
426
498
  if (keyInit === "testID") {
427
499
  viewProps["data-testid"] = valInit;
@@ -440,9 +512,8 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
440
512
  let isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
441
513
  const isStyleProp = isValidStyleKeyInit || isVariant && !noExpand;
442
514
  if (isStyleProp && asChildExceptStyleLike) return;
443
- const shouldPassProp = !isStyleProp && isHOC || hocParentVariants && keyInit in hocParentVariants || inlineProps?.has(keyInit);
444
- const parentVariant = parentVariants?.[keyInit];
445
- const isHOCShouldPassThrough = Boolean(isHOC && (parentVariant || keyInit in import_skipProps.skipProps));
515
+ const shouldPassProp = !isStyleProp && isHOC || isHOC && keyInit === "disabled" || parentVariants && keyInit in parentVariants || inlineProps?.has(keyInit);
516
+ const isHOCShouldPassThrough = isHOC && keyInit in import_skipProps.skipProps;
446
517
  const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
447
518
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
448
519
  console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
@@ -466,7 +537,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
466
537
  if (!isVariant) return;
467
538
  }
468
539
  if (shouldCheckSkipProps && !neverSkipProps?.[keyInit]) {
469
- if (keyInit in import_skipProps.skipProps && !(keyInit === "transition" && typeof valInit === "string" && !driverAnimations?.[valInit])) {
540
+ if (keyInit in import_skipProps.skipProps && !(keyInit === "transition" && typeof valInit === "string" && !(0, import_transitionResolver.getTransitionResolver)()?.resolve(valInit, { animations: driverAnimations }).fused)) {
470
541
  if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
471
542
  return;
472
543
  }
@@ -494,7 +565,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
494
565
  }
495
566
  const isHostStyleKey = isValidStyleKeyInit || false;
496
567
  if (isHostStyleKey || isStyledContextProp) {
497
- contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey);
568
+ contributeValue(styleState, keyInit, valInit, originalOg, !isHostStyleKey || isStyledContextProp && typeof valInit === "boolean");
498
569
  return;
499
570
  }
500
571
  const condition = pass[passParentCursor];
@@ -507,8 +578,8 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
507
578
  } 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.`);
508
579
  return;
509
580
  }
510
- if (keyInit in import_helpers.stylePropsAll) {
511
- 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.`);
581
+ if (keyInit in import_helpers.stylePropsAll || isRemovedVendorStyleProp(keyInit)) {
582
+ 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.`);
512
583
  return;
513
584
  }
514
585
  viewProps[keyInit] = valInit;
@@ -536,7 +607,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
536
607
  const variants = styleStaticConfig.variants;
537
608
  const viewProps = {};
538
609
  const mediaState = styleProps.mediaState || import_mediaState.mediaState;
539
- let shouldDoClasses = !process.env.TAMAGUI_DID_OUTPUT_CSS && acceptsClassName && !styleProps.noClass;
610
+ let shouldDoClasses = process.env.TAMAGUI_RUNTIME !== "island" && acceptsClassName && !styleProps.noClass;
540
611
  const rulesToInsert = {};
541
612
  const classNames = {};
542
613
  let hasMedia = false;
@@ -592,7 +663,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
592
663
  let frontendContainer;
593
664
  let frontendContainerType;
594
665
  const processedProps = props;
595
- const parentVariants = parentStaticConfig ? (0, import_styleStaticConfig.getStyleStaticConfig)(parentStaticConfig, conf).variants : void 0;
666
+ const parentVariants = isHOC ? staticConfig.Component?.staticConfig?.variants : void 0;
596
667
  const defaultProps = asChild ? styleStaticConfig.defaultProps : void 0;
597
668
  const asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
598
669
  let containerValue;
@@ -616,7 +687,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
616
687
  styledContextKeys,
617
688
  (noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0),
618
689
  debug,
619
- parentStaticConfig,
690
+ process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
620
691
  defaultProps,
621
692
  driverAnimations,
622
693
  driverOutputStyle,
@@ -663,6 +734,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
663
734
  }
664
735
  const resolvers = staticConfig.resolvers;
665
736
  if (resolvers && !noExpand) {
737
+ const prevSourceLayer = pass[passSourceLayer];
666
738
  pass[passSourceLayer] = sourceLayerResolver;
667
739
  const flagsBefore = pass[passFlags];
668
740
  pass[passFlags] = flagsBefore | passNoExpandFlag;
@@ -675,6 +747,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
675
747
  }
676
748
  }
677
749
  pass[passFlags] = flagsBefore;
750
+ pass[passSourceLayer] = prevSourceLayer;
678
751
  }
679
752
  className = pass[passClassName];
680
753
  shouldDoClasses = pass[passShouldDoClasses];
@@ -708,6 +781,8 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
708
781
  if (slots) for (const [slot, entries] of slots) styleProps.stylePieceEntries[slot] = entries;
709
782
  }
710
783
  completeResolvedStyles(styleState);
784
+ if (styleState.flatGroupKeys?.size) pseudoGroups = styleState.flatGroupKeys;
785
+ if (styleState.flatGroupMedia?.size) mediaGroups = styleState.flatGroupMedia;
711
786
  if (styleProps.isStatic) for (const property in classNames) {
712
787
  const identifier = classNames[property];
713
788
  if (rulesToInsert[identifier]) continue;
@@ -787,7 +862,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
787
862
  const fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "";
788
863
  const group = props.group ?? frontendGroup;
789
864
  const groupClassName = group ? `t_group_${group}` : "";
790
- let finalClassName = isText ? "is_Text" : "is_View";
865
+ let finalClassName = staticConfig.isDOM ? "is_DOM" : isText ? "is_Text" : "is_View";
791
866
  if (fontFamilyClassName) finalClassName += ` ${fontFamilyClassName}`;
792
867
  let hasPropertyClassNames = false;
793
868
  if (classNames) for (const key in classNames) {
@@ -796,7 +871,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
796
871
  }
797
872
  if (groupClassName) finalClassName += ` ${groupClassName}`;
798
873
  if (className) finalClassName += ` ${className}`;
799
- if (isHOC && hasPropertyClassNames) viewProps[import_skipProps.HOC_CLASSNAME_MARKER] = classNames;
874
+ if (isHOC && hasPropertyClassNames) viewProps[import_skipProps.HOC_CLASSNAME_MARKER] = [classNames, styleState.flatCapturedSlots];
800
875
  if (finalClassName) viewProps.className = finalClassName;
801
876
  if (style) viewProps.style = style;
802
877
  }
@@ -827,7 +902,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
827
902
  const stylePieceStaticConfig = {
828
903
  acceptsClassName: true,
829
904
  isText: true,
830
- validStyles: import_helpers.stylePropsAll
905
+ validStyles: import_helpers.stylePropsInput
831
906
  };
832
907
  const compiledStylePieces = /* @__PURE__ */ new WeakMap();
833
908
  const compileStylePieceRuntime = (piece, layer) => {
@@ -904,7 +979,7 @@ function applyStylePieceClasses(styleState, piece, sourceLayer) {
904
979
  for (const slot in compiled.slots) for (const entry of compiled.slots[slot]) {
905
980
  const property = entry[0];
906
981
  if (!ownsSourceLayer(styleState, property, !!entry[2])) continue;
907
- writeCapturedStyleRecord(slots, slot, entry, sourceLayer);
982
+ writeStyleSlot(slots, slot, [...entry], sourceLayer);
908
983
  }
909
984
  if (compiled.programStates) {
910
985
  const target = styleState.flatStateKeys ||= /* @__PURE__ */ new Set();
@@ -950,7 +1025,7 @@ function applyStylePieceClasses(styleState, piece, sourceLayer) {
950
1025
  }
951
1026
  return applied;
952
1027
  }
953
- function writeCapturedStyleRecord(slots, slot, source, sourceLayer) {
1028
+ function writeStyleSlot(slots, slot, source, sourceLayer) {
954
1029
  let list = slots.get(slot);
955
1030
  if (!list) slots.set(slot, list = []);
956
1031
  const flags = source[7] & 31;
@@ -959,7 +1034,10 @@ function writeCapturedStyleRecord(slots, slot, source, sourceLayer) {
959
1034
  for (let index = 0; index < list.length; index++) {
960
1035
  const entry = list[index];
961
1036
  const entryFlags = entry[7] & 31;
962
- if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) continue;
1037
+ if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) {
1038
+ if (sourceLayer === sourceLayerStyle && entry[7] >> 5 === sourceLayerStyle && entry[0] === source[0] && !condition && !entry[2]) list.splice(index--, 1);
1039
+ continue;
1040
+ }
963
1041
  if (entry[0] !== source[0]) continue;
964
1042
  if (flags & recordDefault) {
965
1043
  if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
@@ -972,9 +1050,8 @@ function writeCapturedStyleRecord(slots, slot, source, sourceLayer) {
972
1050
  break;
973
1051
  }
974
1052
  }
975
- const next = [...source];
976
- next[7] = flags | sourceLayer << 5;
977
- list.push(next);
1053
+ source[7] = flags | sourceLayer << 5;
1054
+ list.push(source);
978
1055
  }
979
1056
  function mergeStyle(styleState, key, val, disableNormalize = false, originalVal) {
980
1057
  const { viewProps, styleProps, staticConfig } = styleState;
@@ -987,7 +1064,7 @@ function mergeStyle(styleState, key, val, disableNormalize = false, originalVal)
987
1064
  styleState.transformAccumulator ||= (0, import_runtime.createTransformAccumulator)();
988
1065
  (0, import_runtime.addTransformValue)(styleState.transformAccumulator, key, val);
989
1066
  } else {
990
- const out = !disableNormalize && !styleProps.noNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
1067
+ let out = !disableNormalize && !styleProps.noNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
991
1068
  styleState.style ||= {};
992
1069
  styleState.style[key] = out;
993
1070
  if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
@@ -997,8 +1074,8 @@ function recordStyleTokenProvenance(styleState, key, originalVal) {
997
1074
  let tokenName = typeof originalVal === "string" ? originalVal : "";
998
1075
  if (tokenName) {
999
1076
  const slash = tokenName.lastIndexOf("/");
1000
- const opacity = slash === -1 ? NaN : Number(tokenName.slice(slash + 1));
1001
- if (Number.isInteger(opacity) && opacity >= 0 && opacity <= 100) tokenName = tokenName.slice(0, slash);
1077
+ const opacity = slash === -1 ? NaN : +tokenName.slice(slash + 1);
1078
+ if (opacity % 1 === 0 && opacity >= 0 && opacity <= 100) tokenName = tokenName.slice(0, slash);
1002
1079
  }
1003
1080
  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;
1004
1081
  else if (styleState.tokenProvenance && key in styleState.tokenProvenance) delete styleState.tokenProvenance[key];
@@ -1041,11 +1118,34 @@ const recordNormalize = 2;
1041
1118
  const recordRetract = 4;
1042
1119
  const recordDefault = 8;
1043
1120
  const recordCSS = 16;
1121
+ const webRTLRenames = {
1122
+ marginHorizontal: "marginInline",
1123
+ marginVertical: "marginBlock",
1124
+ paddingHorizontal: "paddingInline",
1125
+ paddingVertical: "paddingBlock",
1126
+ writingDirection: "direction",
1127
+ paddingStart: "paddingInlineStart",
1128
+ paddingEnd: "paddingInlineEnd",
1129
+ marginStart: "marginInlineStart",
1130
+ marginEnd: "marginInlineEnd",
1131
+ borderStartWidth: "borderInlineStartWidth",
1132
+ borderEndWidth: "borderInlineEndWidth",
1133
+ borderStartColor: "borderInlineStartColor",
1134
+ borderEndColor: "borderInlineEndColor",
1135
+ borderStartStyle: "borderInlineStartStyle",
1136
+ borderEndStyle: "borderInlineEndStyle",
1137
+ borderTopStartRadius: "borderStartStartRadius",
1138
+ borderTopEndRadius: "borderStartEndRadius",
1139
+ borderBottomStartRadius: "borderEndStartRadius",
1140
+ borderBottomEndRadius: "borderEndEndRadius",
1141
+ start: "insetInlineStart",
1142
+ end: "insetInlineEnd"
1143
+ };
1044
1144
  const webStyleProperties = /* @__PURE__ */ new Map();
1045
1145
  function webStyleProperty(property) {
1046
1146
  let web = webStyleProperties.get(property);
1047
1147
  if (web === void 0) {
1048
- web = property === "writingDirection" ? "direction" : property.endsWith("Horizontal") ? `${property.slice(0, -10)}Inline` : property.endsWith("Vertical") ? `${property.slice(0, -8)}Block` : property;
1148
+ web = webRTLRenames[property] || property;
1049
1149
  webStyleProperties.set(property, web);
1050
1150
  }
1051
1151
  return web;
@@ -1064,26 +1164,21 @@ function writeStyleRecord(state, property, value, cursor, original, flags, condi
1064
1164
  const identity = cursor ? cursor[conditionKey] : "";
1065
1165
  const direct = state;
1066
1166
  const slots = direct.flatSlots ||= /* @__PURE__ */ new Map();
1067
- const slot = import_getCSSStylesAtomic.canGenerateCSS && (state.flatShouldDoClasses || flags & recordCSS) ? styleSlot(property) : property.startsWith("transition") ? "transition" : property;
1167
+ const sourceLayer = direct.flatPass?.[passSourceLayer] || 0;
1168
+ if (direct.flatInlineStyleProp) flags |= recordInline;
1169
+ const cssSlot = import_getCSSStylesAtomic.canGenerateCSS && (state.flatShouldDoClasses || flags & recordCSS) ? styleSlot(property) : property.startsWith("transition") ? "transition" : property;
1170
+ const slot = flags & recordInline && cssSlot !== property ? property : cssSlot;
1068
1171
  let list = slots.get(slot);
1069
1172
  if (!list) slots.set(slot, list = []);
1070
- for (let index = 0; index < list.length; index++) {
1071
- const entry = list[index];
1072
- const entryFlags = entry[7];
1073
- if ((entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) continue;
1074
- if (entry[0] !== property) continue;
1075
- if (flags & recordDefault) {
1076
- if (!(entryFlags & recordDefault) && (!entry[2] || entry[3] === identity)) return;
1077
- } else if (entryFlags & recordDefault && (!condition || entry[3] === identity)) {
1078
- list.splice(index--, 1);
1079
- continue;
1080
- }
1081
- if (entry[3] === identity) {
1082
- list.splice(index, 1);
1083
- break;
1173
+ if (sourceLayer === sourceLayerStyle && !condition) {
1174
+ const other = slot === cssSlot ? list : slots.get(flags & recordInline ? cssSlot : property);
1175
+ if (other) for (let index = 0; index < other.length; index++) {
1176
+ const entry = other[index];
1177
+ const entryFlags = entry[7];
1178
+ if (entry[0] === property && !entry[2] && entryFlags >> 5 === sourceLayerStyle && (entryFlags & (recordInline | recordCSS)) !== (flags & (recordInline | recordCSS))) other.splice(index--, 1);
1084
1179
  }
1085
1180
  }
1086
- list.push([
1181
+ writeStyleSlot(slots, slot, [
1087
1182
  property,
1088
1183
  value,
1089
1184
  condition,
@@ -1091,8 +1186,10 @@ function writeStyleRecord(state, property, value, cursor, original, flags, condi
1091
1186
  cursor ? cursor[conditionSelector] : "",
1092
1187
  cursor ? cursor[conditionWrappers] : void 0,
1093
1188
  original,
1094
- flags | (state.flatPass?.[passSourceLayer] || 0) << 5
1095
- ]);
1189
+ flags,
1190
+ void 0,
1191
+ !sourceLayer && direct.flatPass?.[passVariantOutput]
1192
+ ], sourceLayer);
1096
1193
  }
1097
1194
  function streamWriteInline(state, property, value, cursor, original, normalize = property === "lineHeight", conditionOverride = -1, force = false) {
1098
1195
  writeStyleRecord(state, property, value, cursor, original, (normalize ? recordNormalize : 0) | (force ? recordInline : 0), conditionOverride);
@@ -1119,6 +1216,7 @@ function completeResolvedStyles(state, merge = mergeStyle) {
1119
1216
  }
1120
1217
  const slots = direct.flatSlots;
1121
1218
  if (!slots) return;
1219
+ const capture = state.staticConfig.isHOC ? direct.flatCapturedSlots ||= /* @__PURE__ */ new Map() : void 0;
1122
1220
  for (const [property, entries] of slots) {
1123
1221
  let cssEntries;
1124
1222
  let inlineWinner;
@@ -1147,7 +1245,17 @@ function completeResolvedStyles(state, merge = mergeStyle) {
1147
1245
  }
1148
1246
  }
1149
1247
  }
1150
- if (cssEntries) (0, import_getCSSStylesAtomic.registerAtomicSlot)(direct, property, cssEntries);
1248
+ if (cssEntries) {
1249
+ (0, import_getCSSStylesAtomic.registerAtomicSlot)(direct, property, cssEntries);
1250
+ if (capture) {
1251
+ for (const entry of cssEntries) {
1252
+ entry[7] = entry[7] | recordCSS;
1253
+ if (!(entry[2] & 12)) continue;
1254
+ for (const sibling of cssEntries) if (sibling[0] === entry[0]) sibling[8] = true;
1255
+ }
1256
+ capture.set(property, cssEntries);
1257
+ }
1258
+ }
1151
1259
  if (inlineWinner) if (inlineWinner[7] & recordRetract) {
1152
1260
  if (state.style) delete state.style[inlineWinner[0]];
1153
1261
  } else merge(state, inlineWinner[0], inlineWinner[1], !(inlineWinner[7] & recordNormalize), inlineWinner[6] !== void 0 ? inlineWinner[6] : inlineWinner[1]);
@@ -1172,7 +1280,7 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
1172
1280
  }
1173
1281
  return condition;
1174
1282
  }
1175
- 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 \"(\"";
1283
+ 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 ${import_runtime.grammarMaxNonPlatformDepth} non-platform conditions` : "an unterminated \"(\"";
1176
1284
  const warnScanFailure = (property, source, failure, failureIndex) => {
1177
1285
  if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, formatScanFailure(failure, source, failureIndex));
1178
1286
  };
@@ -1182,15 +1290,28 @@ let valueCaches = /* @__PURE__ */ new WeakMap();
1182
1290
  let valueCacheEntries = 0;
1183
1291
  const valueCacheRoot = {};
1184
1292
  const parsedSlices = /* @__PURE__ */ new WeakMap();
1185
- const fontProperties = /* @__PURE__ */ new Map();
1186
- function configuredValue(state, property, raw, embedded = false) {
1293
+ const cssWideColorKeywords = /* @__PURE__ */ new Set([
1294
+ "inherit",
1295
+ "initial",
1296
+ "unset",
1297
+ "revert",
1298
+ "revert-layer",
1299
+ "currentcolor",
1300
+ "transparent"
1301
+ ]);
1302
+ const shadowRecipeProperties = /* @__PURE__ */ new Set([
1303
+ "boxShadow",
1304
+ "textShadow",
1305
+ "filter"
1306
+ ]);
1307
+ function configuredValue(state, property, raw, embedded = false, nativeColors) {
1187
1308
  const grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
1188
1309
  let name = raw;
1189
1310
  let opacity;
1190
1311
  const slash = raw.lastIndexOf("/");
1191
1312
  if (slash > 0) {
1192
- const amount = Number(raw.slice(slash + 1));
1193
- if (Number.isInteger(amount) && amount >= 0 && amount <= 100) {
1313
+ const amount = +raw.slice(slash + 1);
1314
+ if (amount % 1 === 0 && amount >= 0 && amount <= 100) {
1194
1315
  name = raw.slice(0, slash);
1195
1316
  opacity = amount;
1196
1317
  }
@@ -1200,36 +1321,32 @@ function configuredValue(state, property, raw, embedded = false) {
1200
1321
  state.flatUsesSafeArea = true;
1201
1322
  return safeArea;
1202
1323
  }
1203
- let fontProperty = fontProperties.get(property);
1204
- if (fontProperty === void 0) {
1205
- fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
1206
- fontProperties.set(property, fontProperty);
1207
- }
1208
- const revision = grammar.revision;
1209
- if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
1210
- valueCacheConf = state.conf;
1211
- valueCacheRevision = revision;
1212
- valueCaches = /* @__PURE__ */ new WeakMap();
1213
- valueCacheEntries = 0;
1214
- state.flatValueScope = void 0;
1215
- }
1216
- const resolveValues = !state.flatShouldDoClasses && state.styleProps.resolveValues === "auto" ? "value" : state.styleProps.resolveValues;
1217
- const direct = state;
1218
- let scope = direct.flatValueScope;
1219
- if (scope === void 0 || direct.flatValueScopeKind !== resolveValues) {
1220
- const themeObject = state.theme && typeof state.theme === "object" ? state.theme : valueCacheRoot;
1221
- let byScope = valueCaches.get(themeObject);
1222
- if (!byScope) valueCaches.set(themeObject, byScope = /* @__PURE__ */ new Map());
1223
- const scopeKey = `${state.flatThemeName || ""}${resolveValues}`;
1224
- scope = byScope.get(scopeKey);
1225
- if (!scope) byScope.set(scopeKey, scope = /* @__PURE__ */ new Map());
1226
- direct.flatValueScope = scope;
1227
- direct.flatValueScopeKind = resolveValues;
1228
- }
1229
- let maps = scope.get(property);
1230
- if (maps === void 0) scope.set(property, maps = { direct: /* @__PURE__ */ new Map() });
1231
- const byRaw = embedded ? maps.embedded ||= /* @__PURE__ */ new Map() : maps.direct;
1232
- if (!fontProperty) {
1324
+ const fontProperty = property.startsWith("font") || property === "lineHeight" || property === "letterSpacing";
1325
+ const resolveValues = state.styleProps.resolveValues;
1326
+ let byRaw;
1327
+ if (!fontProperty && !nativeColors) {
1328
+ const revision = grammar.revision;
1329
+ if (state.conf !== valueCacheConf || revision !== valueCacheRevision) {
1330
+ valueCacheConf = state.conf;
1331
+ valueCacheRevision = revision;
1332
+ valueCaches = /* @__PURE__ */ new WeakMap();
1333
+ valueCacheEntries = 0;
1334
+ state.flatValueScope = void 0;
1335
+ }
1336
+ const direct = state;
1337
+ let scope = direct.flatValueScope;
1338
+ if (scope === void 0) {
1339
+ const themeObject = state.theme && typeof state.theme === "object" ? state.theme : valueCacheRoot;
1340
+ let byScope = valueCaches.get(themeObject);
1341
+ if (!byScope) valueCaches.set(themeObject, byScope = /* @__PURE__ */ new Map());
1342
+ const scopeKey = `${state.flatThemeName || ""}${resolveValues}`;
1343
+ scope = byScope.get(scopeKey);
1344
+ if (!scope) byScope.set(scopeKey, scope = /* @__PURE__ */ new Map());
1345
+ direct.flatValueScope = scope;
1346
+ }
1347
+ let maps = scope.get(property);
1348
+ if (maps === void 0) scope.set(property, maps = { direct: /* @__PURE__ */ new Map() });
1349
+ byRaw = embedded ? maps.embedded ||= /* @__PURE__ */ new Map() : maps.direct;
1233
1350
  const known = byRaw.get(raw);
1234
1351
  if (known !== void 0 || byRaw.has(raw)) return known;
1235
1352
  }
@@ -1259,20 +1376,87 @@ function configuredValue(state, property, raw, embedded = false) {
1259
1376
  }
1260
1377
  }
1261
1378
  if (process.env.NODE_ENV === "development") {
1262
- const category = grammar.tokenCategory(property);
1263
- if (category && category !== "color" && state.conf.tokensParsed.color?.[name]) (0, import_warnOnce.warnOnce)(`"${name}" contributes to "color", not "${property}"`);
1379
+ const category = grammar.tokenCategory(property) || grammar.tokenCategory(state.conf.shorthands[property] || property);
1380
+ if (category && category !== "color" && category !== "boxShadow" && category !== "textShadow" && state.conf.tokensParsed.color?.[name]) (0, import_warnOnce.warnOnce)(`"${name}" contributes to "color", not "${property}"`);
1381
+ if (!value && !fontProperty) {
1382
+ if (name.charCodeAt(0) === 36 || raw.charCodeAt(0) === 36) {
1383
+ const suggested = name.charCodeAt(0) === 36 ? name.slice(1) : raw.slice(1);
1384
+ (0, import_warnOnce.warnOnce)(`v2-token:${property}=${raw}`, `${property}="${raw}": v3 tokens have no "$" prefix, did you mean "${suggested}"?`);
1385
+ } else if ((category === "size" || category === "space" || category === "radius" || category === "zIndex") && /^-?\d+(?:\.\d+)?$/.test(name)) {
1386
+ let nearest;
1387
+ let minDistance = Infinity;
1388
+ const rawNum = Number(name);
1389
+ const tokens = category ? state.conf.tokensParsed[category] : void 0;
1390
+ if (tokens && Number.isFinite(rawNum)) for (const key in tokens) {
1391
+ const val = tokens[key]?.val;
1392
+ const valNum = typeof val === "number" ? val : Number(val);
1393
+ if (Number.isFinite(valNum)) {
1394
+ const dist = Math.abs(valNum - rawNum);
1395
+ if (dist < minDistance) {
1396
+ minDistance = dist;
1397
+ nearest = key;
1398
+ }
1399
+ }
1400
+ }
1401
+ if (nearest) (0, import_warnOnce.warnOnce)(`numeric-token:${property}=${raw}`, `${property}="${raw}" was passed to CSS as-is${category === "zIndex" ? "" : " with px units"}${nearest ? `; nearest token is "${nearest}"` : ""}`);
1402
+ } else if (category === "color" && /^[a-zA-Z0-9-]+$/.test(name) && /[a-zA-Z]/.test(name)) {
1403
+ const lower = name.toLowerCase();
1404
+ if (!import_runtime.namedCssColors.has(lower) && !cssWideColorKeywords.has(lower)) {
1405
+ const themeKeys = [];
1406
+ if (state.theme && typeof state.theme === "object") for (const k in state.theme) themeKeys.push(k);
1407
+ if (state.conf.themes) {
1408
+ const active = state.conf.themes[state.flatThemeName || ""];
1409
+ if (active) for (const k in active) themeKeys.push(k);
1410
+ else for (const t in state.conf.themes) for (const k in state.conf.themes[t]) themeKeys.push(k);
1411
+ }
1412
+ let bestMatch;
1413
+ let minDistance = 3;
1414
+ for (const key of themeKeys) {
1415
+ if (Math.abs(key.length - name.length) > 2) continue;
1416
+ const m = name.length;
1417
+ const n = key.length;
1418
+ const d = [];
1419
+ for (let i = 0; i <= m; i++) d[i] = i;
1420
+ for (let j = 1; j <= n; j++) {
1421
+ let prev = d[0];
1422
+ d[0] = j;
1423
+ for (let i = 1; i <= m; i++) {
1424
+ const temp = d[i];
1425
+ d[i] = name[i - 1] === key[j - 1] ? prev : Math.min(prev, d[i], d[i - 1]) + 1;
1426
+ prev = temp;
1427
+ }
1428
+ }
1429
+ const dist = d[m];
1430
+ if (dist <= 2 && dist < minDistance) {
1431
+ minDistance = dist;
1432
+ bestMatch = key;
1433
+ }
1434
+ }
1435
+ (0, import_warnOnce.warnOnce)(`unknown-color:${property}=${raw}`, bestMatch ? `unknown color "${name}", did you mean "${bestMatch}"?` : `unknown color "${name}"`);
1436
+ }
1437
+ }
1438
+ }
1264
1439
  }
1265
1440
  let out = raw;
1266
1441
  if ((0, import_createVariable.isVariable)(value)) {
1267
- out = resolveValues === "except-theme" && fromTheme ? `${import_themeRef.THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : (0, import_resolveVariableValue.resolveVariableValue)(property, value, resolveValues);
1442
+ out = resolveValues === "except-theme" && fromTheme ? `${import_themeRef.THEME_REF_PREFIX}${lookupName}${opacity !== void 0 ? `/${opacity}` : ""}` : (0, import_resolveVariableValue.resolveVariableValue)(nativeColors ? "color" : property, value, resolveValues);
1268
1443
  if (opacity !== void 0) out = `color-mix(in srgb, ${out} ${opacity}%, transparent)`;
1269
1444
  }
1445
+ if (nativeColors && out && typeof out === "object") {
1446
+ const reference = `__tamagui_native_color_${nativeColors.size}`;
1447
+ nativeColors.set(reference, out);
1448
+ out = reference;
1449
+ }
1270
1450
  if (embedded && out === raw) {
1271
1451
  const usedSafeArea = state.flatUsesSafeArea;
1272
- out = grammar.embeddedTokens(raw, (word) => configuredValue(state, property, word));
1452
+ out = grammar.embeddedTokens(raw, (word) => {
1453
+ const resolved = configuredValue(state, property, word, false, nativeColors);
1454
+ if (resolved !== word || !shadowRecipeProperties.has(property) || !/^[a-z][\w-]*$/i.test(word)) return resolved;
1455
+ return configuredValue(state, "color", word, false, nativeColors);
1456
+ });
1273
1457
  if (!usedSafeArea && state.flatUsesSafeArea) return out;
1274
1458
  }
1275
- if (!fontProperty && !fromTheme) if (valueCacheEntries > 8192) {
1459
+ if (!fontProperty && !fromTheme && !nativeColors) if (valueCacheEntries > 8192) {
1276
1460
  valueCaches = /* @__PURE__ */ new WeakMap();
1277
1461
  valueCacheEntries = 0;
1278
1462
  } else {
@@ -1286,13 +1470,15 @@ function ownsSourceLayer(state, property, conditional = false) {
1286
1470
  const layer = direct.flatPass?.[passSourceLayer] || 0;
1287
1471
  const layers = direct.flatPropertyLayers ||= /* @__PURE__ */ new Map();
1288
1472
  const previous = layers.get(property);
1289
- if (previous !== void 0) {
1290
- if (previous > layer) return false;
1291
- if (previous < layer) {
1292
- if (conditional) return true;
1293
- clearDirectStyle(state, property);
1473
+ if (!layer && !conditional && !direct.flatPass?.[passVariantOutput]) {
1474
+ const entries = direct.flatSlots?.get(styleSlot(property));
1475
+ if (entries) {
1476
+ for (let index = entries.length; index--;) if (entries[index][0] === property && entries[index][9]) entries.splice(index, 1);
1294
1477
  }
1295
- } else if (conditional) return true;
1478
+ }
1479
+ if (previous > layer) return false;
1480
+ if (conditional && previous !== layer) return true;
1481
+ if (previous < layer) clearDirectStyle(state, property);
1296
1482
  layers.set(property, layer);
1297
1483
  return true;
1298
1484
  }
@@ -1319,6 +1505,10 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
1319
1505
  (0, import_runtime.addTransformValue)(state.transformAccumulator, property, value);
1320
1506
  return;
1321
1507
  }
1508
+ if (property === "transition" && condition & 12 && !state.staticConfig.isHOC && state.styleProps.isAnimated) {
1509
+ streamWriteInline(state, property, value, cursor, originalValue, false, -1, true);
1510
+ return;
1511
+ }
1322
1512
  const shouldPromoteAnimatedStyle = import_getCSSStylesAtomic.canGenerateCSS && !condition && !state.flatShouldDoClasses && !state.styleProps.noMergeStyle && state.styleProps.isAnimated && state.animationDriver?.inputStyle === "css" && property in import_helpers.nonAnimatableStyleProps;
1323
1513
  if (import_getCSSStylesAtomic.canGenerateCSS && (state.flatShouldDoClasses || shouldPromoteAnimatedStyle)) {
1324
1514
  writeStyleRecord(state, property, value, cursor, originalValue, shouldPromoteAnimatedStyle ? recordCSS : 0);
@@ -1327,19 +1517,19 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
1327
1517
  streamWriteInline(state, property, value, cursor, originalValue);
1328
1518
  }
1329
1519
  function numericUnitValue(value, first, second) {
1330
- const unitLength = value.endsWith(first) || second !== void 0 && value.endsWith(second) ? first.length : 0;
1331
- if (!unitLength || value.length === unitLength) return NaN;
1332
- const numeric = Number(value.slice(0, value.length - unitLength));
1333
- return Number.isFinite(numeric) ? numeric : NaN;
1520
+ return value.length > first.length && (value.endsWith(first) || value.endsWith(second)) ? +value.slice(0, -first.length) : NaN;
1521
+ }
1522
+ function resolveNumericValue(value) {
1523
+ let numeric = numericUnitValue(value, "px", "dp");
1524
+ return isFinite(numeric) ? numeric : isFinite(numeric = +value) ? numeric : value;
1334
1525
  }
1335
1526
  function emitResolved(state, property, raw, cursor, originalValue, contextOnly) {
1336
- let value = configuredValue(state, property, raw, true);
1337
- if (!state.flatShouldDoClasses && typeof value === "string") {
1338
- const unitValue = numericUnitValue(value, "px", "dp");
1339
- if (Number.isFinite(unitValue)) value = unitValue;
1340
- else if (value !== "" && Number.isFinite(Number(value))) value = Number(value);
1341
- }
1342
- emitProperty(state, property, value, cursor, originalValue, contextOnly);
1527
+ emitProperty(state, property, resolveValue(state, property, raw), cursor, originalValue, contextOnly);
1528
+ }
1529
+ function resolveValue(state, property, raw, nativeColors) {
1530
+ let value = typeof raw === "string" ? configuredValue(state, property, raw, true, nativeColors) : raw;
1531
+ if (!state.flatShouldDoClasses && typeof value === "string" && value !== "" && property !== "lineHeight") value = resolveNumericValue(value);
1532
+ return value;
1343
1533
  }
1344
1534
  function shadowUnit(part) {
1345
1535
  return typeof part === "number" ? `${part}px` : part || "0px";
@@ -1359,7 +1549,13 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1359
1549
  const grammar = (0, import_grammarConfig.getConfigRevisionState)(state.conf);
1360
1550
  property = webStyleProperty(property);
1361
1551
  if (property === "backdropFilter") emitValue(state, "WebkitBackdropFilter", raw, cursor, originalValue, contextOnly);
1362
- if ((0, import_createVariable.isVariable)(raw)) raw = (0, import_resolveVariableValue.resolveVariableValue)(property, raw, !state.flatShouldDoClasses && state.styleProps.resolveValues === "auto" ? "value" : state.styleProps.resolveValues);
1552
+ if ((0, import_createVariable.isVariable)(raw)) {
1553
+ raw = (0, import_resolveVariableValue.resolveVariableValue)(property, raw, state.styleProps.resolveValues);
1554
+ if (property === "lineHeight") {
1555
+ emitProperty(state, property, raw, cursor, originalValue, contextOnly);
1556
+ return;
1557
+ }
1558
+ }
1363
1559
  if (typeof raw === "string" && (property === "transition" || property === "transitionProperty")) raw = grammar.normalizeTransition(raw);
1364
1560
  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);
1365
1561
  const propertyKind = grammar.propertyKind(property);
@@ -1396,10 +1592,17 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1396
1592
  }
1397
1593
  if (property === "transform") {
1398
1594
  if (import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses && Array.isArray(raw)) raw = (0, import_transformsToString.transformsToString)(raw);
1595
+ if (typeof raw === "string" && !state.flatShouldDoClasses && state.animationDriver?.inputStyle === "value") {
1596
+ const transform = (0, import_parseNativeTransform.parseNativeTransform)(raw);
1597
+ if (transform) {
1598
+ emitProperty(state, property, transform, cursor, originalValue, contextOnly);
1599
+ return;
1600
+ }
1601
+ }
1399
1602
  }
1400
1603
  if (typeof raw === "string" && property === "background") {
1401
1604
  const parts = (0, import_borderComponents.splitComponents)(raw);
1402
- if (parts.length === 1 && !(0, import_borderComponents.startsValueFunction)(parts[0])) {
1605
+ if (parts.length === 1 && (!(0, import_borderComponents.startsValueFunction)(parts[0]) || false)) {
1403
1606
  emitResolved(state, "backgroundColor", parts[0], cursor, originalValue, contextOnly);
1404
1607
  return;
1405
1608
  }
@@ -1407,7 +1610,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1407
1610
  if (property === "x" || property === "y" || property === "scale" || property === "scaleX" || property === "scaleY" || property === "rotate") {
1408
1611
  let value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
1409
1612
  if (!state.flatShouldDoClasses && typeof value2 === "string" && !value2.startsWith(import_themeRef.THEME_REF_PREFIX)) {
1410
- if (property === "rotate" && !Number.isFinite(numericUnitValue(value2, "deg", "rad"))) {
1613
+ if (property === "rotate" && !isFinite(numericUnitValue(value2, "deg", "rad")) && !(0, import_borderComponents.startsValueFunction)(value2)) {
1411
1614
  if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native transform "${property}" cannot represent "${value2}"; dropping it`);
1412
1615
  if (condition & 1) {
1413
1616
  (0, import_runtime.removeTransformValue)(state.transformAccumulator, property);
@@ -1415,9 +1618,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1415
1618
  }
1416
1619
  return;
1417
1620
  }
1418
- const unitValue = numericUnitValue(value2, "px", "dp");
1419
- if (Number.isFinite(unitValue)) value2 = unitValue;
1420
- else if (Number.isFinite(Number(value2))) value2 = Number(value2);
1621
+ value2 = resolveNumericValue(value2);
1421
1622
  }
1422
1623
  if (!import_getCSSStylesAtomic.canGenerateCSS || !state.flatShouldDoClasses) {
1423
1624
  emitProperty(state, property, value2, cursor, originalValue, contextOnly);
@@ -1441,13 +1642,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1441
1642
  else emitProperty(state, property, raw, cursor, originalValue, contextOnly);
1442
1643
  return;
1443
1644
  }
1444
- let value = raw;
1445
- if (typeof raw === "string") value = configuredValue(state, property, raw, true);
1446
- if (!state.flatShouldDoClasses && typeof value === "string") {
1447
- const unitValue = numericUnitValue(value, "px", "dp");
1448
- if (Number.isFinite(unitValue)) value = unitValue;
1449
- else if (value !== "" && Number.isFinite(Number(value))) value = Number(value);
1450
- }
1645
+ let value = resolveValue(state, property, raw, void 0);
1451
1646
  if (import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses && property === "boxShadow" && !condition) {
1452
1647
  state.flatBoxShadow = value;
1453
1648
  state.flatBoxShadowSequence = frameSequence + 1;
@@ -1458,7 +1653,12 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
1458
1653
  }
1459
1654
  emitProperty(state, property, value, cursor, originalValue, contextOnly);
1460
1655
  }
1461
- function walkConditionalValue(state, property, value, parent, sink, warnMode = 0) {
1656
+ function emitConditionalValue(state, property, payload, condition, source, sink, mode, contextOnly) {
1657
+ if (sink) sink(payload, condition, source);
1658
+ else if (condition) emitUnderCondition(state, property, payload, condition, mode === 2 || state.staticConfig.isHOC || state.styleProps.stylePieceEntries ? payload : void 0, contextOnly, mode, source);
1659
+ else emitValue(state, property, payload, null, payload, contextOnly);
1660
+ }
1661
+ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0, contextOnly = false) {
1462
1662
  const parentCondition = parent || null;
1463
1663
  let hasBase = false;
1464
1664
  let conditions = 0;
@@ -1466,13 +1666,18 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
1466
1666
  if (typeof value === "string") {
1467
1667
  const parsed = (0, import_grammarConfig.getConfigRevisionState)(state.conf).parseFlatValue(value);
1468
1668
  const [segments, failure, failureIndex] = parsed;
1669
+ if (process.env.NODE_ENV === "development") {
1670
+ if ((0, import_config.getSetting)("styleValueSyntax") === "object") {
1671
+ if (segments.length > 5 || segments.length >= 5 && segments[2] !== -1 || value.includes(":")) (0, import_warnOnce.warnOnce)(`syntax:string:${property}=${value}`, `string syntax is disabled by config (styleValueSyntax: 'object'); received "${property}=${value}"`);
1672
+ }
1673
+ }
1469
1674
  let slices = parsedSlices.get(parsed);
1470
1675
  if (slices === void 0) parsedSlices.set(parsed, slices = []);
1471
1676
  const chainCount = segments.length / 5 - 1;
1472
1677
  if (property === "aspectRatio" && chainCount === 1) {
1473
- const left = Number(value.slice(segments[7], segments[8]));
1474
- const right = Number(value.slice(segments[5], segments[6]));
1475
- if (left > 0 && right > 0 && Number.isFinite(left) && Number.isFinite(right)) return false;
1678
+ const left = +value.slice(segments[7], segments[8]);
1679
+ const right = +value.slice(segments[5], segments[6]);
1680
+ if (left > 0 && right > 0 && isFinite(left) && isFinite(right)) return false;
1476
1681
  }
1477
1682
  for (let index = 0; index < segments.length; index += 5) {
1478
1683
  const start = segments[index];
@@ -1482,10 +1687,10 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
1482
1687
  if (start === end) continue;
1483
1688
  if (flags & 2) {
1484
1689
  const payload = slices[index] ??= value.slice(start, end);
1485
- sink(payload, parentCondition, payload);
1690
+ emitConditionalValue(state, property, payload, parentCondition, payload, sink, warnMode, contextOnly);
1486
1691
  hasBase = true;
1487
1692
  } else if (process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
1488
- sink(value, parentCondition, value);
1693
+ emitConditionalValue(state, property, value, parentCondition, value, sink, warnMode, contextOnly);
1489
1694
  hasBase = true;
1490
1695
  } else if (warnMode) warnScanFailure(property, value, failure, failureIndex);
1491
1696
  }
@@ -1506,30 +1711,36 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
1506
1711
  }
1507
1712
  const cursor = conditionFromKey(state, slices[index + 2] ??= value.slice(segments[index + 2], segments[index + 3]), parentCondition);
1508
1713
  conditions |= cursor[conditionValue];
1509
- if (cursor[conditionValue] & conditionResolvedFlag || warnMode) sink(slices[index] ??= value.slice(start, end), cursor, value);
1714
+ if (cursor[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, slices[index] ??= value.slice(start, end), cursor, value, sink, warnMode, contextOnly);
1510
1715
  }
1511
1716
  if (process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
1512
1717
  } else {
1513
1718
  if (!value || typeof value !== "object" || Array.isArray(value) || (0, import_createVariable.isVariable)(value) || !classifyConditionalObject(value, state)) return false;
1719
+ if (process.env.NODE_ENV === "development") {
1720
+ if ((0, import_config.getSetting)("styleValueSyntax") === "string") (0, import_warnOnce.warnOnce)(`syntax:object:${property}=${JSON.stringify(value)}`, `object-form conditional syntax is disabled by config (styleValueSyntax: 'string'); received "${property}"`);
1721
+ }
1514
1722
  if (value.default != null) {
1515
- sink(value.default, parentCondition, value.default);
1723
+ emitConditionalValue(state, property, value.default, parentCondition, value.default, sink, warnMode, contextOnly);
1516
1724
  hasBase = true;
1517
1725
  }
1518
1726
  for (const key in value) {
1519
1727
  if (key === "default" || value[key] == null) continue;
1520
1728
  const cursor = conditionFromKey(state, key, parentCondition);
1521
1729
  conditions |= cursor[conditionValue];
1522
- if (cursor[conditionValue] & conditionResolvedFlag || warnMode) sink(value[key], cursor, value[key]);
1730
+ if (cursor[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, value[key], cursor, value[key], sink, warnMode, contextOnly);
1523
1731
  }
1524
1732
  }
1525
- if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
1526
- if (warnMode === 1 && (!import_getCSSStylesAtomic.canGenerateCSS || !state.flatShouldDoClasses) && conditions & 12 && !hasBase) {
1733
+ if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
1734
+ if (warnMode === 1 && conditions & 12 && !hasBase) {
1527
1735
  const resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
1528
- if (resting !== null && !state.flatPropertyLayers?.has(property)) sink(resting, parentCondition, resting);
1736
+ const layers = state.flatPropertyLayers;
1737
+ const owned = !import_getCSSStylesAtomic.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);
1738
+ if (resting !== null && !owned) emitConditionalValue(state, property, resting, parentCondition, resting, sink, warnMode, contextOnly);
1529
1739
  }
1530
1740
  return true;
1531
1741
  }
1532
1742
  function contributeValue(state, property, value, originalValue, contextOnly = false, condition) {
1743
+ if (!contextOnly && isRemovedVendorStyleProp(property) && !(state.staticConfig.validStyles && property in state.staticConfig.validStyles)) return;
1533
1744
  if (condition !== void 0) {
1534
1745
  const parent2 = state.flatPass?.[passParentCursor] || null;
1535
1746
  let effective;
@@ -1539,7 +1750,7 @@ function contributeValue(state, property, value, originalValue, contextOnly = fa
1539
1750
  if (!(condition[conditionValue] & conditionResolvedFlag)) setConditionUnresolved(effective);
1540
1751
  commitCondition(effective);
1541
1752
  } else effective = condition;
1542
- if (typeof value !== "string" && walkConditionalValue(state, property, value, effective, (payload, cursor, source) => emitUnderCondition(state, property, payload, cursor, payload, contextOnly, 2, source), 2)) return true;
1753
+ if (typeof value !== "string" && walkConditionalValue(state, property, value, effective, null, 2, contextOnly)) return true;
1543
1754
  emitUnderCondition(state, property, value, effective, originalValue, contextOnly, 2, value);
1544
1755
  return true;
1545
1756
  }
@@ -1556,7 +1767,7 @@ function contributeValue(state, property, value, originalValue, contextOnly = fa
1556
1767
  return true;
1557
1768
  }
1558
1769
  }
1559
- 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;
1770
+ if (walkConditionalValue(state, property, value, state.flatPass?.[passParentCursor] || null, null, 1, contextOnly)) return true;
1560
1771
  if (value != null) {
1561
1772
  emitAtParentCondition(state, property, value, originalValue ?? value, contextOnly);
1562
1773
  return true;
@@ -1565,19 +1776,21 @@ function contributeValue(state, property, value, originalValue, contextOnly = fa
1565
1776
  }
1566
1777
  function clearDirectStyle(state, property) {
1567
1778
  const direct = state;
1779
+ if (direct.flatDynamicColors) delete direct.flatDynamicColors[property];
1568
1780
  property = webStyleProperty(property);
1569
1781
  const propertyKind = (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property);
1570
1782
  const atomicKey = property.startsWith("transition") ? "transition" : propertyKind > 0 && propertyKind < 5 ? "boxShadow" : propertyKind === 6 ? "textShadow" : propertyKind === 5 ? "transform" : property;
1571
1783
  const slot = styleSlot(atomicKey);
1572
1784
  direct.flatAtomics?.delete(slot);
1573
1785
  if (direct.flatSlots) {
1574
- if (slot !== atomicKey) {
1786
+ if (slot !== atomicKey || atomicKey === "flex") {
1575
1787
  const entries = direct.flatSlots.get(slot);
1576
1788
  if (entries) {
1577
1789
  for (let index = entries.length; index--;) if (entries[index][0] === atomicKey) entries.splice(index, 1);
1790
+ if (!entries.length) direct.flatSlots.delete(slot);
1578
1791
  }
1579
1792
  }
1580
- direct.flatSlots.delete(atomicKey);
1793
+ if (atomicKey !== "flex") direct.flatSlots.delete(atomicKey);
1581
1794
  }
1582
1795
  if (atomicKey === "transform") state.transformAccumulator = void 0;
1583
1796
  if (state.style) delete state.style[atomicKey];
@@ -1589,9 +1802,12 @@ function emitVariantStyle(state, key, value, original, condition, disabled) {
1589
1802
  if (key !== pass[passMapSourceKey] && state.flatCallerVariantKeys?.has(key)) return;
1590
1803
  if (state.flatStyleStaticConfig.styledContextKeys?.has(key)) (state.overriddenContextProps ||= {})[key] = (state.originalContextPropValues ||= {})[key] = original;
1591
1804
  const parent = pass[passParentCursor];
1805
+ const parentVariantOutput = pass[passVariantOutput];
1592
1806
  pass[passParentCursor] = condition;
1807
+ pass[passVariantOutput] = true;
1593
1808
  contributeProp(pass, key, value, original, disabled);
1594
1809
  pass[passParentCursor] = parent;
1810
+ pass[passVariantOutput] = parentVariantOutput;
1595
1811
  }
1596
1812
  function getFontFamilyFromNameOrVariable(input, conf) {
1597
1813
  if ((0, import_createVariable.isVariable)(input)) {