@tamagui/web 3.0.0-beta.669.1 → 3.0.0-beta.728.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 (841) hide show
  1. package/dist/cjs/Tamagui.cjs +0 -1
  2. package/dist/cjs/Tamagui.native.cjs +0 -1
  3. package/dist/cjs/Tamagui.native.js +0 -1
  4. package/dist/cjs/Tamagui.native.js.map +1 -1
  5. package/dist/cjs/_withNativeStyle.cjs +0 -1
  6. package/dist/cjs/_withNativeStyle.native.cjs +0 -1
  7. package/dist/cjs/_withNativeStyle.native.js +0 -1
  8. package/dist/cjs/_withNativeStyle.native.js.map +1 -1
  9. package/dist/cjs/_withStableStyle.cjs +0 -1
  10. package/dist/cjs/_withStableStyle.native.cjs +0 -1
  11. package/dist/cjs/_withStableStyle.native.js +0 -1
  12. package/dist/cjs/_withStableStyle.native.js.map +1 -1
  13. package/dist/cjs/config.cjs +7 -1
  14. package/dist/cjs/config.native.cjs +7 -1
  15. package/dist/cjs/config.native.js +7 -1
  16. package/dist/cjs/config.native.js.map +1 -1
  17. package/dist/cjs/constants/accessibilityDirectMap.cjs +0 -1
  18. package/dist/cjs/constants/accessibilityDirectMap.native.cjs +0 -1
  19. package/dist/cjs/constants/accessibilityDirectMap.native.js +0 -1
  20. package/dist/cjs/constants/accessibilityDirectMap.native.js.map +1 -1
  21. package/dist/cjs/constants/constants.cjs +0 -1
  22. package/dist/cjs/constants/constants.native.cjs +0 -1
  23. package/dist/cjs/constants/constants.native.js +0 -1
  24. package/dist/cjs/constants/constants.native.js.map +1 -1
  25. package/dist/cjs/constants/isDevTools.cjs +0 -1
  26. package/dist/cjs/constants/isDevTools.native.cjs +0 -1
  27. package/dist/cjs/constants/isDevTools.native.js +0 -1
  28. package/dist/cjs/constants/isDevTools.native.js.map +1 -1
  29. package/dist/cjs/contexts/ComponentContext.cjs +0 -1
  30. package/dist/cjs/contexts/ComponentContext.native.cjs +0 -1
  31. package/dist/cjs/contexts/ComponentContext.native.js +0 -1
  32. package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
  33. package/dist/cjs/contexts/GroupContext.cjs +0 -1
  34. package/dist/cjs/contexts/GroupContext.native.cjs +0 -1
  35. package/dist/cjs/contexts/GroupContext.native.js +0 -1
  36. package/dist/cjs/contexts/GroupContext.native.js.map +1 -1
  37. package/dist/cjs/createComponent.cjs +1 -2
  38. package/dist/cjs/createComponent.native.cjs +1 -2
  39. package/dist/cjs/createComponent.native.js +1 -2
  40. package/dist/cjs/createComponent.native.js.map +1 -1
  41. package/dist/cjs/createFont.cjs +0 -1
  42. package/dist/cjs/createFont.native.cjs +0 -1
  43. package/dist/cjs/createFont.native.js +0 -1
  44. package/dist/cjs/createFont.native.js.map +1 -1
  45. package/dist/cjs/createShorthands.cjs +0 -1
  46. package/dist/cjs/createShorthands.native.cjs +0 -1
  47. package/dist/cjs/createShorthands.native.js +0 -1
  48. package/dist/cjs/createShorthands.native.js.map +1 -1
  49. package/dist/cjs/createStyledHOC.cjs +0 -1
  50. package/dist/cjs/createStyledHOC.native.cjs +0 -1
  51. package/dist/cjs/createStyledHOC.native.js +0 -1
  52. package/dist/cjs/createStyledHOC.native.js.map +1 -1
  53. package/dist/cjs/createTamagui.cjs +3 -4
  54. package/dist/cjs/createTamagui.native.cjs +3 -4
  55. package/dist/cjs/createTamagui.native.js +3 -4
  56. package/dist/cjs/createTamagui.native.js.map +1 -1
  57. package/dist/cjs/createTokens.cjs +0 -1
  58. package/dist/cjs/createTokens.native.cjs +0 -1
  59. package/dist/cjs/createTokens.native.js +0 -1
  60. package/dist/cjs/createTokens.native.js.map +1 -1
  61. package/dist/cjs/createVariable.cjs +0 -1
  62. package/dist/cjs/createVariable.native.cjs +0 -1
  63. package/dist/cjs/createVariable.native.js +0 -1
  64. package/dist/cjs/createVariable.native.js.map +1 -1
  65. package/dist/cjs/createVariables.cjs +0 -1
  66. package/dist/cjs/createVariables.native.cjs +0 -1
  67. package/dist/cjs/createVariables.native.js +0 -1
  68. package/dist/cjs/createVariables.native.js.map +1 -1
  69. package/dist/cjs/defaultComponentState.cjs +0 -1
  70. package/dist/cjs/defaultComponentState.native.cjs +0 -1
  71. package/dist/cjs/defaultComponentState.native.js +0 -1
  72. package/dist/cjs/defaultComponentState.native.js.map +1 -1
  73. package/dist/cjs/dom/adapters.cjs +0 -1
  74. package/dist/cjs/dom/adapters.native.cjs +0 -1
  75. package/dist/cjs/dom/adapters.native.js +0 -1
  76. package/dist/cjs/dom/adapters.native.js.map +1 -1
  77. package/dist/cjs/dom/contract.cjs +0 -1
  78. package/dist/cjs/dom/contract.native.cjs +0 -1
  79. package/dist/cjs/dom/contract.native.js +0 -1
  80. package/dist/cjs/dom/contract.native.js.map +1 -1
  81. package/dist/cjs/dom/domEventProps.native.cjs +0 -1
  82. package/dist/cjs/dom/domEventProps.native.js +0 -1
  83. package/dist/cjs/dom/domEventProps.native.js.map +1 -1
  84. package/dist/cjs/dom/html.cjs +0 -1
  85. package/dist/cjs/dom/html.native.cjs +0 -1
  86. package/dist/cjs/dom/html.native.js +0 -1
  87. package/dist/cjs/dom/html.native.js.map +1 -1
  88. package/dist/cjs/dom/htmlRuntime.native.cjs +0 -1
  89. package/dist/cjs/dom/htmlRuntime.native.js +0 -1
  90. package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
  91. package/dist/cjs/dom/index.cjs +0 -1
  92. package/dist/cjs/dom/index.native.cjs +0 -1
  93. package/dist/cjs/dom/index.native.js +0 -1
  94. package/dist/cjs/dom/index.native.js.map +1 -1
  95. package/dist/cjs/dom/primitives.native.cjs +2 -3
  96. package/dist/cjs/dom/primitives.native.js +2 -3
  97. package/dist/cjs/dom/primitives.native.js.map +1 -1
  98. package/dist/cjs/dom/standalone.cjs +0 -1
  99. package/dist/cjs/dom/standalone.native.cjs +0 -1
  100. package/dist/cjs/dom/standalone.native.js +0 -1
  101. package/dist/cjs/dom/standalone.native.js.map +1 -1
  102. package/dist/cjs/dom/standaloneHtml.cjs +0 -1
  103. package/dist/cjs/dom/standaloneHtml.native.cjs +0 -1
  104. package/dist/cjs/dom/standaloneHtml.native.js +0 -1
  105. package/dist/cjs/dom/standaloneHtml.native.js.map +1 -1
  106. package/dist/cjs/dom/styleTypes.cjs +0 -1
  107. package/dist/cjs/dom/styleTypes.native.cjs +0 -1
  108. package/dist/cjs/dom/styleTypes.native.js +0 -1
  109. package/dist/cjs/dom/styleTypes.native.js.map +1 -1
  110. package/dist/cjs/eventDetails.cjs +0 -1
  111. package/dist/cjs/eventDetails.native.cjs +0 -1
  112. package/dist/cjs/eventDetails.native.js +0 -1
  113. package/dist/cjs/eventDetails.native.js.map +1 -1
  114. package/dist/cjs/eventHandling.cjs +0 -1
  115. package/dist/cjs/eventHandling.native.cjs +0 -1
  116. package/dist/cjs/eventHandling.native.js +0 -1
  117. package/dist/cjs/eventHandling.native.js.map +1 -1
  118. package/dist/cjs/helpers/componentDisplayName.cjs +0 -1
  119. package/dist/cjs/helpers/componentDisplayName.native.cjs +0 -1
  120. package/dist/cjs/helpers/componentDisplayName.native.js +0 -1
  121. package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
  122. package/dist/cjs/helpers/configVariables.cjs +79 -0
  123. package/dist/cjs/helpers/configVariables.native.cjs +86 -0
  124. package/dist/cjs/helpers/configVariables.native.js +88 -0
  125. package/dist/cjs/helpers/configVariables.native.js.map +1 -0
  126. package/dist/cjs/helpers/consoleLog.native.cjs +0 -1
  127. package/dist/cjs/helpers/consoleLog.native.js +0 -1
  128. package/dist/cjs/helpers/consoleLog.native.js.map +1 -1
  129. package/dist/cjs/helpers/createDesignSystem.cjs +0 -1
  130. package/dist/cjs/helpers/createDesignSystem.native.cjs +0 -1
  131. package/dist/cjs/helpers/createDesignSystem.native.js +0 -1
  132. package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
  133. package/dist/cjs/helpers/createStyledContext.cjs +0 -1
  134. package/dist/cjs/helpers/createStyledContext.native.cjs +0 -1
  135. package/dist/cjs/helpers/createStyledContext.native.js +0 -1
  136. package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
  137. package/dist/cjs/helpers/defaultAnimationDriver.cjs +1 -6
  138. package/dist/cjs/helpers/defaultAnimationDriver.native.cjs +0 -13
  139. package/dist/cjs/helpers/defaultAnimationDriver.native.js +0 -13
  140. package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -1
  141. package/dist/cjs/helpers/defaultOffset.cjs +0 -1
  142. package/dist/cjs/helpers/defaultOffset.native.cjs +0 -1
  143. package/dist/cjs/helpers/defaultOffset.native.js +0 -1
  144. package/dist/cjs/helpers/defaultOffset.native.js.map +1 -1
  145. package/dist/cjs/helpers/directStyle.cjs +258 -284
  146. package/dist/cjs/helpers/directStyle.native.cjs +274 -306
  147. package/dist/cjs/helpers/directStyle.native.js +274 -306
  148. package/dist/cjs/helpers/directStyle.native.js.map +1 -1
  149. package/dist/cjs/helpers/expandStyle.cjs +0 -1
  150. package/dist/cjs/helpers/expandStyle.native.cjs +0 -1
  151. package/dist/cjs/helpers/expandStyle.native.js +0 -1
  152. package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
  153. package/dist/cjs/helpers/expandStyles.cjs +0 -1
  154. package/dist/cjs/helpers/expandStyles.native.cjs +0 -1
  155. package/dist/cjs/helpers/expandStyles.native.js +0 -1
  156. package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
  157. package/dist/cjs/helpers/extractPseudoState.cjs +0 -1
  158. package/dist/cjs/helpers/extractPseudoState.native.cjs +0 -1
  159. package/dist/cjs/helpers/extractPseudoState.native.js +0 -1
  160. package/dist/cjs/helpers/extractPseudoState.native.js.map +1 -1
  161. package/dist/cjs/helpers/formatDiagnostic.cjs +0 -1
  162. package/dist/cjs/helpers/formatDiagnostic.native.cjs +0 -1
  163. package/dist/cjs/helpers/formatDiagnostic.native.js +0 -1
  164. package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
  165. package/dist/cjs/helpers/frontendProgram.cjs +0 -1
  166. package/dist/cjs/helpers/frontendProgram.native.cjs +0 -1
  167. package/dist/cjs/helpers/frontendProgram.native.js +0 -1
  168. package/dist/cjs/helpers/frontendProgram.native.js.map +1 -1
  169. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +5 -2
  170. package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +0 -1
  171. package/dist/cjs/helpers/getCSSStylesAtomic.native.js +0 -1
  172. package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
  173. package/dist/cjs/helpers/getDefaultProps.cjs +0 -1
  174. package/dist/cjs/helpers/getDefaultProps.native.cjs +0 -1
  175. package/dist/cjs/helpers/getDefaultProps.native.js +0 -1
  176. package/dist/cjs/helpers/getDefaultProps.native.js.map +1 -1
  177. package/dist/cjs/helpers/getDynamicVal.cjs +0 -1
  178. package/dist/cjs/helpers/getDynamicVal.native.cjs +0 -1
  179. package/dist/cjs/helpers/getDynamicVal.native.js +0 -1
  180. package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
  181. package/dist/cjs/helpers/getExpandedShorthands.cjs +0 -1
  182. package/dist/cjs/helpers/getExpandedShorthands.native.cjs +0 -1
  183. package/dist/cjs/helpers/getExpandedShorthands.native.js +0 -1
  184. package/dist/cjs/helpers/getExpandedShorthands.native.js.map +1 -1
  185. package/dist/cjs/helpers/getFontLanguage.cjs +0 -1
  186. package/dist/cjs/helpers/getFontLanguage.native.cjs +0 -1
  187. package/dist/cjs/helpers/getFontLanguage.native.js +0 -1
  188. package/dist/cjs/helpers/getFontLanguage.native.js.map +1 -1
  189. package/dist/cjs/helpers/getShorthandValue.cjs +0 -1
  190. package/dist/cjs/helpers/getShorthandValue.native.cjs +0 -1
  191. package/dist/cjs/helpers/getShorthandValue.native.js +0 -1
  192. package/dist/cjs/helpers/getShorthandValue.native.js.map +1 -1
  193. package/dist/cjs/helpers/getSplitStyles.cjs +2 -10
  194. package/dist/cjs/helpers/getSplitStyles.native.cjs +2 -10
  195. package/dist/cjs/helpers/getSplitStyles.native.js +2 -10
  196. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  197. package/dist/cjs/helpers/getThemeCSSRules.cjs +0 -1
  198. package/dist/cjs/helpers/getThemeCSSRules.native.cjs +0 -1
  199. package/dist/cjs/helpers/getThemeCSSRules.native.js +0 -1
  200. package/dist/cjs/helpers/getThemeCSSRules.native.js.map +1 -1
  201. package/dist/cjs/helpers/getVariantExtras.cjs +0 -1
  202. package/dist/cjs/helpers/getVariantExtras.native.cjs +0 -1
  203. package/dist/cjs/helpers/getVariantExtras.native.js +0 -1
  204. package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
  205. package/dist/cjs/helpers/grammarConfig.cjs +63 -14
  206. package/dist/cjs/helpers/grammarConfig.native.cjs +84 -18
  207. package/dist/cjs/helpers/grammarConfig.native.js +84 -18
  208. package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
  209. package/dist/cjs/helpers/insertStyleRule.cjs +0 -1
  210. package/dist/cjs/helpers/insertStyleRule.native.cjs +0 -1
  211. package/dist/cjs/helpers/insertStyleRule.native.js +0 -1
  212. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  213. package/dist/cjs/helpers/isObj.cjs +0 -1
  214. package/dist/cjs/helpers/isObj.native.cjs +0 -1
  215. package/dist/cjs/helpers/isObj.native.js +0 -1
  216. package/dist/cjs/helpers/isObj.native.js.map +1 -1
  217. package/dist/cjs/helpers/isTamaguiComponent.cjs +0 -1
  218. package/dist/cjs/helpers/isTamaguiComponent.native.cjs +0 -1
  219. package/dist/cjs/helpers/isTamaguiComponent.native.js +0 -1
  220. package/dist/cjs/helpers/isTamaguiComponent.native.js.map +1 -1
  221. package/dist/cjs/helpers/isTamaguiElement.cjs +0 -1
  222. package/dist/cjs/helpers/isTamaguiElement.native.cjs +0 -1
  223. package/dist/cjs/helpers/isTamaguiElement.native.js +0 -1
  224. package/dist/cjs/helpers/isTamaguiElement.native.js.map +1 -1
  225. package/dist/cjs/helpers/log.cjs +0 -1
  226. package/dist/cjs/helpers/log.native.cjs +0 -1
  227. package/dist/cjs/helpers/log.native.js +0 -1
  228. package/dist/cjs/helpers/log.native.js.map +1 -1
  229. package/dist/cjs/helpers/mainThreadPressEvents.cjs +0 -1
  230. package/dist/cjs/helpers/mainThreadPressEvents.native.cjs +0 -1
  231. package/dist/cjs/helpers/mainThreadPressEvents.native.js +0 -1
  232. package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
  233. package/dist/cjs/helpers/matchMedia.cjs +0 -1
  234. package/dist/cjs/helpers/matchMedia.native.cjs +0 -1
  235. package/dist/cjs/helpers/matchMedia.native.js +0 -1
  236. package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
  237. package/dist/cjs/helpers/mediaObjectToString.cjs +0 -1
  238. package/dist/cjs/helpers/mediaObjectToString.native.cjs +0 -1
  239. package/dist/cjs/helpers/mediaObjectToString.native.js +0 -1
  240. package/dist/cjs/helpers/mediaObjectToString.native.js.map +1 -1
  241. package/dist/cjs/helpers/mediaState.cjs +0 -1
  242. package/dist/cjs/helpers/mediaState.native.cjs +0 -1
  243. package/dist/cjs/helpers/mediaState.native.js +0 -1
  244. package/dist/cjs/helpers/mediaState.native.js.map +1 -1
  245. package/dist/cjs/helpers/mergeProps.cjs +0 -1
  246. package/dist/cjs/helpers/mergeProps.native.cjs +0 -1
  247. package/dist/cjs/helpers/mergeProps.native.js +0 -1
  248. package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
  249. package/dist/cjs/helpers/mergeRenderElementProps.cjs +0 -1
  250. package/dist/cjs/helpers/mergeRenderElementProps.native.cjs +0 -1
  251. package/dist/cjs/helpers/mergeRenderElementProps.native.js +0 -1
  252. package/dist/cjs/helpers/mergeRenderElementProps.native.js.map +1 -1
  253. package/dist/cjs/helpers/mergeSlotStyleProps.cjs +0 -1
  254. package/dist/cjs/helpers/mergeSlotStyleProps.native.cjs +0 -1
  255. package/dist/cjs/helpers/mergeSlotStyleProps.native.js +0 -1
  256. package/dist/cjs/helpers/mergeSlotStyleProps.native.js.map +1 -1
  257. package/dist/cjs/helpers/mergeVariants.cjs +1 -2
  258. package/dist/cjs/helpers/mergeVariants.native.cjs +1 -2
  259. package/dist/cjs/helpers/mergeVariants.native.js +1 -2
  260. package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
  261. package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
  262. package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
  263. package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
  264. package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
  265. package/dist/cjs/helpers/nativeStyleEngine.cjs +0 -1
  266. package/dist/cjs/helpers/nativeStyleEngine.native.cjs +0 -1
  267. package/dist/cjs/helpers/nativeStyleEngine.native.js +0 -1
  268. package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
  269. package/dist/cjs/helpers/nativeTransitionTarget.cjs +0 -1
  270. package/dist/cjs/helpers/nativeTransitionTarget.native.cjs +0 -1
  271. package/dist/cjs/helpers/nativeTransitionTarget.native.js +0 -1
  272. package/dist/cjs/helpers/nativeTransitionTarget.native.js.map +1 -1
  273. package/dist/cjs/helpers/normalizeColor.cjs +0 -1
  274. package/dist/cjs/helpers/normalizeColor.native.cjs +0 -1
  275. package/dist/cjs/helpers/normalizeColor.native.js +0 -1
  276. package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
  277. package/dist/cjs/helpers/normalizeShadow.cjs +0 -1
  278. package/dist/cjs/helpers/normalizeShadow.native.cjs +0 -1
  279. package/dist/cjs/helpers/normalizeShadow.native.js +0 -1
  280. package/dist/cjs/helpers/normalizeShadow.native.js.map +1 -1
  281. package/dist/cjs/helpers/normalizeStyle.cjs +0 -1
  282. package/dist/cjs/helpers/normalizeStyle.native.cjs +0 -1
  283. package/dist/cjs/helpers/normalizeStyle.native.js +0 -1
  284. package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
  285. package/dist/cjs/helpers/normalizeStylePropKeys.cjs +0 -1
  286. package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs +0 -1
  287. package/dist/cjs/helpers/normalizeStylePropKeys.native.js +0 -1
  288. package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +1 -1
  289. package/dist/cjs/helpers/normalizeValueWithProperty.cjs +0 -1
  290. package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +0 -1
  291. package/dist/cjs/helpers/normalizeValueWithProperty.native.js +0 -1
  292. package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
  293. package/dist/cjs/helpers/noteOnce.cjs +0 -1
  294. package/dist/cjs/helpers/noteOnce.native.cjs +0 -1
  295. package/dist/cjs/helpers/noteOnce.native.js +0 -1
  296. package/dist/cjs/helpers/noteOnce.native.js.map +1 -1
  297. package/dist/cjs/helpers/objectIdentityKey.cjs +0 -1
  298. package/dist/cjs/helpers/objectIdentityKey.native.cjs +0 -1
  299. package/dist/cjs/helpers/objectIdentityKey.native.js +0 -1
  300. package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
  301. package/dist/cjs/helpers/parseBorderShorthand.cjs +0 -1
  302. package/dist/cjs/helpers/parseBorderShorthand.native.cjs +0 -1
  303. package/dist/cjs/helpers/parseBorderShorthand.native.js +0 -1
  304. package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
  305. package/dist/cjs/helpers/parseNativeStyle.native.cjs +0 -1
  306. package/dist/cjs/helpers/parseNativeStyle.native.js +0 -1
  307. package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -1
  308. package/dist/cjs/helpers/parseNativeTransform.native.cjs +0 -1
  309. package/dist/cjs/helpers/parseNativeTransform.native.js +0 -1
  310. package/dist/cjs/helpers/parseNativeTransform.native.js.map +1 -1
  311. package/dist/cjs/helpers/parseOutlineShorthand.cjs +0 -1
  312. package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +0 -1
  313. package/dist/cjs/helpers/parseOutlineShorthand.native.js +0 -1
  314. package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
  315. package/dist/cjs/helpers/pointerEvents.cjs +0 -1
  316. package/dist/cjs/helpers/pointerEvents.native.cjs +0 -1
  317. package/dist/cjs/helpers/pointerEvents.native.js +0 -1
  318. package/dist/cjs/helpers/pointerEvents.native.js.map +1 -1
  319. package/dist/cjs/helpers/propMapper.cjs +30 -39
  320. package/dist/cjs/helpers/propMapper.native.cjs +30 -39
  321. package/dist/cjs/helpers/propMapper.native.js +30 -39
  322. package/dist/cjs/helpers/propMapper.native.js.map +1 -1
  323. package/dist/cjs/helpers/proxyThemeToParents.cjs +0 -1
  324. package/dist/cjs/helpers/proxyThemeToParents.native.cjs +0 -1
  325. package/dist/cjs/helpers/proxyThemeToParents.native.js +0 -1
  326. package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
  327. package/dist/cjs/helpers/registerCSSVariable.cjs +0 -1
  328. package/dist/cjs/helpers/registerCSSVariable.native.cjs +0 -1
  329. package/dist/cjs/helpers/registerCSSVariable.native.js +0 -1
  330. package/dist/cjs/helpers/registerCSSVariable.native.js.map +1 -1
  331. package/dist/cjs/helpers/resolveAnimationDriver.cjs +0 -1
  332. package/dist/cjs/helpers/resolveAnimationDriver.native.cjs +0 -1
  333. package/dist/cjs/helpers/resolveAnimationDriver.native.js +0 -1
  334. package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
  335. package/dist/cjs/helpers/resolveRem.cjs +0 -1
  336. package/dist/cjs/helpers/resolveRem.native.cjs +0 -1
  337. package/dist/cjs/helpers/resolveRem.native.js +0 -1
  338. package/dist/cjs/helpers/resolveRem.native.js.map +1 -1
  339. package/dist/cjs/helpers/resolveSafeArea.cjs +0 -1
  340. package/dist/cjs/helpers/resolveSafeArea.native.cjs +0 -1
  341. package/dist/cjs/helpers/resolveSafeArea.native.js +0 -1
  342. package/dist/cjs/helpers/resolveSafeArea.native.js.map +1 -1
  343. package/dist/cjs/helpers/resolveSafeAreaVariable.cjs +0 -1
  344. package/dist/cjs/helpers/resolveSafeAreaVariable.native.cjs +0 -1
  345. package/dist/cjs/helpers/resolveSafeAreaVariable.native.js +0 -1
  346. package/dist/cjs/helpers/resolveSafeAreaVariable.native.js.map +1 -1
  347. package/dist/cjs/helpers/resolveVariableValue.cjs +0 -1
  348. package/dist/cjs/helpers/resolveVariableValue.native.cjs +0 -1
  349. package/dist/cjs/helpers/resolveVariableValue.native.js +0 -1
  350. package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -1
  351. package/dist/cjs/helpers/setElementProps.cjs +0 -1
  352. package/dist/cjs/helpers/setElementProps.native.cjs +0 -1
  353. package/dist/cjs/helpers/setElementProps.native.js +0 -1
  354. package/dist/cjs/helpers/setElementProps.native.js.map +1 -1
  355. package/dist/cjs/helpers/skipProps.cjs +0 -1
  356. package/dist/cjs/helpers/skipProps.native.cjs +0 -1
  357. package/dist/cjs/helpers/skipProps.native.js +0 -1
  358. package/dist/cjs/helpers/skipProps.native.js.map +1 -1
  359. package/dist/cjs/helpers/sortString.cjs +0 -1
  360. package/dist/cjs/helpers/sortString.native.cjs +0 -1
  361. package/dist/cjs/helpers/sortString.native.js +0 -1
  362. package/dist/cjs/helpers/sortString.native.js.map +1 -1
  363. package/dist/cjs/helpers/styleFrontend.cjs +0 -1
  364. package/dist/cjs/helpers/styleFrontend.native.cjs +0 -1
  365. package/dist/cjs/helpers/styleFrontend.native.js +0 -1
  366. package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
  367. package/dist/cjs/helpers/styleOriginalValues.cjs +0 -1
  368. package/dist/cjs/helpers/styleOriginalValues.native.cjs +0 -1
  369. package/dist/cjs/helpers/styleOriginalValues.native.js +0 -1
  370. package/dist/cjs/helpers/styleOriginalValues.native.js.map +1 -1
  371. package/dist/cjs/helpers/styleProvenance.cjs +0 -1
  372. package/dist/cjs/helpers/styleProvenance.native.cjs +0 -1
  373. package/dist/cjs/helpers/styleProvenance.native.js +0 -1
  374. package/dist/cjs/helpers/styleProvenance.native.js.map +1 -1
  375. package/dist/cjs/helpers/subscribeToContextGroup.cjs +0 -1
  376. package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +0 -1
  377. package/dist/cjs/helpers/subscribeToContextGroup.native.js +0 -1
  378. package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
  379. package/dist/cjs/helpers/themeRef.cjs +0 -1
  380. package/dist/cjs/helpers/themeRef.native.cjs +0 -1
  381. package/dist/cjs/helpers/themeRef.native.js +0 -1
  382. package/dist/cjs/helpers/themeRef.native.js.map +1 -1
  383. package/dist/cjs/helpers/themeUpdateState.cjs +24 -0
  384. package/dist/cjs/helpers/themeUpdateState.native.cjs +26 -0
  385. package/dist/cjs/helpers/themeUpdateState.native.js +28 -0
  386. package/dist/cjs/helpers/themeUpdateState.native.js.map +1 -0
  387. package/dist/cjs/helpers/themeable.cjs +0 -1
  388. package/dist/cjs/helpers/themeable.native.cjs +0 -1
  389. package/dist/cjs/helpers/themeable.native.js +0 -1
  390. package/dist/cjs/helpers/themeable.native.js.map +1 -1
  391. package/dist/cjs/helpers/themes.cjs +0 -1
  392. package/dist/cjs/helpers/themes.native.cjs +0 -1
  393. package/dist/cjs/helpers/themes.native.js +0 -1
  394. package/dist/cjs/helpers/themes.native.js.map +1 -1
  395. package/dist/cjs/helpers/timer.cjs +0 -1
  396. package/dist/cjs/helpers/timer.native.cjs +0 -1
  397. package/dist/cjs/helpers/timer.native.js +0 -1
  398. package/dist/cjs/helpers/timer.native.js.map +1 -1
  399. package/dist/cjs/helpers/tokenCategories.cjs +0 -1
  400. package/dist/cjs/helpers/tokenCategories.native.cjs +0 -1
  401. package/dist/cjs/helpers/tokenCategories.native.js +0 -1
  402. package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
  403. package/dist/cjs/helpers/transformsToString.cjs +0 -1
  404. package/dist/cjs/helpers/transformsToString.native.cjs +0 -1
  405. package/dist/cjs/helpers/transformsToString.native.js +0 -1
  406. package/dist/cjs/helpers/transformsToString.native.js.map +1 -1
  407. package/dist/cjs/helpers/useRenderElement.cjs +0 -1
  408. package/dist/cjs/helpers/useRenderElement.native.cjs +0 -1
  409. package/dist/cjs/helpers/useRenderElement.native.js +0 -1
  410. package/dist/cjs/helpers/useRenderElement.native.js.map +1 -1
  411. package/dist/cjs/helpers/variableValue.cjs +66 -0
  412. package/dist/cjs/helpers/variableValue.native.cjs +88 -0
  413. package/dist/cjs/helpers/variableValue.native.js +90 -0
  414. package/dist/cjs/helpers/variableValue.native.js.map +1 -0
  415. package/dist/cjs/helpers/variables.cjs +95 -139
  416. package/dist/cjs/helpers/variables.native.cjs +97 -161
  417. package/dist/cjs/helpers/variables.native.js +97 -161
  418. package/dist/cjs/helpers/variables.native.js.map +1 -1
  419. package/dist/cjs/helpers/warnOnce.cjs +1 -2
  420. package/dist/cjs/helpers/warnOnce.native.cjs +1 -2
  421. package/dist/cjs/helpers/warnOnce.native.js +1 -2
  422. package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
  423. package/dist/cjs/helpers/webPropsToSkip.cjs +0 -1
  424. package/dist/cjs/helpers/webPropsToSkip.native.cjs +0 -1
  425. package/dist/cjs/helpers/webPropsToSkip.native.js +0 -1
  426. package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
  427. package/dist/cjs/helpers/wrapStyleTags.cjs +0 -1
  428. package/dist/cjs/helpers/wrapStyleTags.native.cjs +0 -1
  429. package/dist/cjs/helpers/wrapStyleTags.native.js +0 -1
  430. package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
  431. package/dist/cjs/hooks/doesRootSchemeMatchSystem.cjs +0 -1
  432. package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.cjs +0 -1
  433. package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js +0 -1
  434. package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js.map +1 -1
  435. package/dist/cjs/hooks/getThemeProxied.cjs +1 -2
  436. package/dist/cjs/hooks/getThemeProxied.native.cjs +2 -3
  437. package/dist/cjs/hooks/getThemeProxied.native.js +2 -3
  438. package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
  439. package/dist/cjs/hooks/isOptimizedForFirstRender.cjs +0 -1
  440. package/dist/cjs/hooks/isOptimizedForFirstRender.native.cjs +0 -1
  441. package/dist/cjs/hooks/isOptimizedForFirstRender.native.js +0 -1
  442. package/dist/cjs/hooks/isOptimizedForFirstRender.native.js.map +1 -1
  443. package/dist/cjs/hooks/useAnimationDriver.cjs +14 -9
  444. package/dist/cjs/hooks/useAnimationDriver.native.cjs +14 -9
  445. package/dist/cjs/hooks/useAnimationDriver.native.js +14 -9
  446. package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
  447. package/dist/cjs/hooks/useComponentState.cjs +27 -25
  448. package/dist/cjs/hooks/useComponentState.native.cjs +28 -25
  449. package/dist/cjs/hooks/useComponentState.native.js +28 -25
  450. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  451. package/dist/cjs/hooks/useDisableSSR.cjs +0 -1
  452. package/dist/cjs/hooks/useDisableSSR.native.cjs +0 -1
  453. package/dist/cjs/hooks/useDisableSSR.native.js +0 -1
  454. package/dist/cjs/hooks/useDisableSSR.native.js.map +1 -1
  455. package/dist/cjs/hooks/useIsTouchDevice.cjs +0 -1
  456. package/dist/cjs/hooks/useIsTouchDevice.native.cjs +0 -1
  457. package/dist/cjs/hooks/useIsTouchDevice.native.js +0 -1
  458. package/dist/cjs/hooks/useIsTouchDevice.native.js.map +1 -1
  459. package/dist/cjs/hooks/useMedia.cjs +0 -1
  460. package/dist/cjs/hooks/useMedia.native.cjs +0 -1
  461. package/dist/cjs/hooks/useMedia.native.js +0 -1
  462. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  463. package/dist/cjs/hooks/usePortalThemeState.cjs +1 -2
  464. package/dist/cjs/hooks/usePortalThemeState.native.cjs +1 -2
  465. package/dist/cjs/hooks/usePortalThemeState.native.js +1 -2
  466. package/dist/cjs/hooks/usePortalThemeState.native.js.map +1 -1
  467. package/dist/cjs/hooks/useProps.cjs +1 -2
  468. package/dist/cjs/hooks/useProps.native.cjs +1 -2
  469. package/dist/cjs/hooks/useProps.native.js +1 -2
  470. package/dist/cjs/hooks/useProps.native.js.map +1 -1
  471. package/dist/cjs/hooks/useTheme.cjs +0 -1
  472. package/dist/cjs/hooks/useTheme.native.cjs +0 -1
  473. package/dist/cjs/hooks/useTheme.native.js +0 -1
  474. package/dist/cjs/hooks/useTheme.native.js.map +1 -1
  475. package/dist/cjs/hooks/useThemeName.cjs +0 -1
  476. package/dist/cjs/hooks/useThemeName.native.cjs +0 -1
  477. package/dist/cjs/hooks/useThemeName.native.js +0 -1
  478. package/dist/cjs/hooks/useThemeName.native.js.map +1 -1
  479. package/dist/cjs/hooks/useThemeState.cjs +11 -16
  480. package/dist/cjs/hooks/useThemeState.native.cjs +13 -18
  481. package/dist/cjs/hooks/useThemeState.native.js +13 -18
  482. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  483. package/dist/cjs/index.cjs +0 -2
  484. package/dist/cjs/index.native.cjs +0 -2
  485. package/dist/cjs/index.native.js +0 -2
  486. package/dist/cjs/index.native.js.map +1 -1
  487. package/dist/cjs/inject-styles.cjs +0 -1
  488. package/dist/cjs/inject-styles.native.cjs +0 -1
  489. package/dist/cjs/inject-styles.native.js +0 -1
  490. package/dist/cjs/inject-styles.native.js.map +1 -1
  491. package/dist/cjs/insertFont.cjs +0 -1
  492. package/dist/cjs/insertFont.native.cjs +0 -1
  493. package/dist/cjs/insertFont.native.js +0 -1
  494. package/dist/cjs/insertFont.native.js.map +1 -1
  495. package/dist/cjs/interfaces/CSSColorNames.cjs +0 -1
  496. package/dist/cjs/interfaces/CSSColorNames.native.cjs +0 -1
  497. package/dist/cjs/interfaces/CSSColorNames.native.js +0 -1
  498. package/dist/cjs/interfaces/CSSColorNames.native.js.map +1 -1
  499. package/dist/cjs/interfaces/GetRef.cjs +0 -1
  500. package/dist/cjs/interfaces/GetRef.native.cjs +0 -1
  501. package/dist/cjs/interfaces/GetRef.native.js +0 -1
  502. package/dist/cjs/interfaces/GetRef.native.js.map +1 -1
  503. package/dist/cjs/interfaces/RNExclusiveTypes.cjs +0 -1
  504. package/dist/cjs/interfaces/RNExclusiveTypes.native.cjs +0 -1
  505. package/dist/cjs/interfaces/RNExclusiveTypes.native.js +0 -1
  506. package/dist/cjs/interfaces/RNExclusiveTypes.native.js.map +1 -1
  507. package/dist/cjs/interfaces/TamaguiComponentEvents.cjs +0 -1
  508. package/dist/cjs/interfaces/TamaguiComponentEvents.native.cjs +0 -1
  509. package/dist/cjs/interfaces/TamaguiComponentEvents.native.js +0 -1
  510. package/dist/cjs/interfaces/TamaguiComponentEvents.native.js.map +1 -1
  511. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.cjs +0 -1
  512. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.cjs +0 -1
  513. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js +0 -1
  514. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js.map +1 -1
  515. package/dist/cjs/internal-runtime.cjs +1 -4
  516. package/dist/cjs/internal-runtime.native.cjs +1 -4
  517. package/dist/cjs/internal-runtime.native.js +1 -4
  518. package/dist/cjs/internal-runtime.native.js.map +1 -1
  519. package/dist/cjs/internalRuntimeTypes.cjs +0 -1
  520. package/dist/cjs/internalRuntimeTypes.native.cjs +0 -1
  521. package/dist/cjs/internalRuntimeTypes.native.js +0 -1
  522. package/dist/cjs/internalRuntimeTypes.native.js.map +1 -1
  523. package/dist/cjs/setupHooks.cjs +0 -1
  524. package/dist/cjs/setupHooks.native.cjs +0 -1
  525. package/dist/cjs/setupHooks.native.js +0 -1
  526. package/dist/cjs/setupHooks.native.js.map +1 -1
  527. package/dist/cjs/setupReactNative.cjs +0 -1
  528. package/dist/cjs/setupReactNative.native.cjs +0 -1
  529. package/dist/cjs/setupReactNative.native.js +0 -1
  530. package/dist/cjs/setupReactNative.native.js.map +1 -1
  531. package/dist/cjs/styled.cjs +0 -1
  532. package/dist/cjs/styled.native.cjs +0 -1
  533. package/dist/cjs/styled.native.js +0 -1
  534. package/dist/cjs/styled.native.js.map +1 -1
  535. package/dist/cjs/theme-update.cjs +19 -0
  536. package/dist/cjs/theme-update.native.cjs +21 -0
  537. package/dist/cjs/theme-update.native.js +23 -0
  538. package/dist/cjs/theme-update.native.js.map +1 -0
  539. package/dist/cjs/type-utils.cjs +0 -1
  540. package/dist/cjs/type-utils.native.cjs +0 -1
  541. package/dist/cjs/type-utils.native.js +0 -1
  542. package/dist/cjs/type-utils.native.js.map +1 -1
  543. package/dist/cjs/types.cjs +0 -1
  544. package/dist/cjs/types.native.cjs +0 -1
  545. package/dist/cjs/types.native.js +0 -1
  546. package/dist/cjs/types.native.js.map +1 -1
  547. package/dist/cjs/views/ConfigRevisionCheck.cjs +0 -1
  548. package/dist/cjs/views/ConfigRevisionCheck.native.cjs +0 -1
  549. package/dist/cjs/views/ConfigRevisionCheck.native.js +0 -1
  550. package/dist/cjs/views/ConfigRevisionCheck.native.js.map +1 -1
  551. package/dist/cjs/views/Configuration.cjs +0 -1
  552. package/dist/cjs/views/Configuration.native.cjs +0 -1
  553. package/dist/cjs/views/Configuration.native.js +0 -1
  554. package/dist/cjs/views/Configuration.native.js.map +1 -1
  555. package/dist/cjs/views/FontLanguage.cjs +0 -1
  556. package/dist/cjs/views/FontLanguage.native.cjs +0 -1
  557. package/dist/cjs/views/FontLanguage.native.js +0 -1
  558. package/dist/cjs/views/FontLanguage.native.js.map +1 -1
  559. package/dist/cjs/views/SafeAreaTracker.cjs +0 -1
  560. package/dist/cjs/views/SafeAreaTracker.native.cjs +0 -1
  561. package/dist/cjs/views/SafeAreaTracker.native.js +0 -1
  562. package/dist/cjs/views/SafeAreaTracker.native.js.map +1 -1
  563. package/dist/cjs/views/Slot.cjs +0 -1
  564. package/dist/cjs/views/Slot.native.cjs +0 -1
  565. package/dist/cjs/views/Slot.native.js +0 -1
  566. package/dist/cjs/views/Slot.native.js.map +1 -1
  567. package/dist/cjs/views/TamaguiProvider.cjs +0 -1
  568. package/dist/cjs/views/TamaguiProvider.native.cjs +0 -1
  569. package/dist/cjs/views/TamaguiProvider.native.js +0 -1
  570. package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
  571. package/dist/cjs/views/TamaguiRoot.cjs +0 -1
  572. package/dist/cjs/views/TamaguiRoot.native.cjs +0 -1
  573. package/dist/cjs/views/TamaguiRoot.native.js +0 -1
  574. package/dist/cjs/views/TamaguiRoot.native.js.map +1 -1
  575. package/dist/cjs/views/Text.cjs +0 -1
  576. package/dist/cjs/views/Text.native.cjs +0 -1
  577. package/dist/cjs/views/Text.native.js +0 -1
  578. package/dist/cjs/views/Text.native.js.map +1 -1
  579. package/dist/cjs/views/Theme.cjs +7 -33
  580. package/dist/cjs/views/Theme.native.cjs +8 -20
  581. package/dist/cjs/views/Theme.native.js +8 -20
  582. package/dist/cjs/views/Theme.native.js.map +1 -1
  583. package/dist/cjs/views/ThemeDebug.cjs +0 -1
  584. package/dist/cjs/views/ThemeDebug.native.cjs +0 -1
  585. package/dist/cjs/views/ThemeDebug.native.js +0 -1
  586. package/dist/cjs/views/ThemeDebug.native.js.map +1 -1
  587. package/dist/cjs/views/ThemeProvider.cjs +0 -1
  588. package/dist/cjs/views/ThemeProvider.native.cjs +0 -1
  589. package/dist/cjs/views/ThemeProvider.native.js +0 -1
  590. package/dist/cjs/views/ThemeProvider.native.js.map +1 -1
  591. package/dist/cjs/views/ThemeUpdate.cjs +82 -0
  592. package/dist/cjs/views/ThemeUpdate.native.cjs +84 -0
  593. package/dist/cjs/views/ThemeUpdate.native.js +86 -0
  594. package/dist/cjs/views/ThemeUpdate.native.js.map +1 -0
  595. package/dist/cjs/views/View.cjs +0 -1
  596. package/dist/cjs/views/View.native.cjs +0 -1
  597. package/dist/cjs/views/View.native.js +0 -1
  598. package/dist/cjs/views/View.native.js.map +1 -1
  599. package/dist/esm/Tamagui.mjs.map +1 -1
  600. package/dist/esm/Tamagui.native.js.map +1 -1
  601. package/dist/esm/_withNativeStyle.mjs.map +1 -1
  602. package/dist/esm/config.mjs +7 -0
  603. package/dist/esm/config.mjs.map +1 -1
  604. package/dist/esm/config.native.js +7 -0
  605. package/dist/esm/config.native.js.map +1 -1
  606. package/dist/esm/constants/isDevTools.mjs.map +1 -1
  607. package/dist/esm/constants/isDevTools.native.js.map +1 -1
  608. package/dist/esm/createComponent.mjs +1 -1
  609. package/dist/esm/createComponent.mjs.map +1 -1
  610. package/dist/esm/createComponent.native.js +1 -1
  611. package/dist/esm/createComponent.native.js.map +1 -1
  612. package/dist/esm/createFont.mjs.map +1 -1
  613. package/dist/esm/createFont.native.js.map +1 -1
  614. package/dist/esm/createTamagui.mjs +2 -2
  615. package/dist/esm/createTamagui.mjs.map +1 -1
  616. package/dist/esm/createTamagui.native.js +2 -2
  617. package/dist/esm/createTamagui.native.js.map +1 -1
  618. package/dist/esm/createVariable.mjs.map +1 -1
  619. package/dist/esm/createVariable.native.js.map +1 -1
  620. package/dist/esm/dom/primitives.native.js +1 -1
  621. package/dist/esm/dom/primitives.native.js.map +1 -1
  622. package/dist/esm/eventHandling.native.js.map +1 -1
  623. package/dist/esm/helpers/configVariables.mjs +60 -0
  624. package/dist/esm/helpers/configVariables.mjs.map +1 -0
  625. package/dist/esm/helpers/configVariables.native.js +65 -0
  626. package/dist/esm/helpers/configVariables.native.js.map +1 -0
  627. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  628. package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
  629. package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
  630. package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
  631. package/dist/esm/helpers/defaultAnimationDriver.mjs +1 -5
  632. package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
  633. package/dist/esm/helpers/defaultAnimationDriver.native.js +0 -12
  634. package/dist/esm/helpers/defaultAnimationDriver.native.js.map +1 -1
  635. package/dist/esm/helpers/directStyle.mjs +258 -283
  636. package/dist/esm/helpers/directStyle.mjs.map +1 -1
  637. package/dist/esm/helpers/directStyle.native.js +274 -305
  638. package/dist/esm/helpers/directStyle.native.js.map +1 -1
  639. package/dist/esm/helpers/expandStyle.mjs.map +1 -1
  640. package/dist/esm/helpers/expandStyle.native.js.map +1 -1
  641. package/dist/esm/helpers/expandStyles.native.js.map +1 -1
  642. package/dist/esm/helpers/extractPseudoState.mjs.map +1 -1
  643. package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
  644. package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
  645. package/dist/esm/helpers/getCSSStylesAtomic.mjs +5 -1
  646. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  647. package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
  648. package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
  649. package/dist/esm/helpers/getExpandedShorthands.mjs.map +1 -1
  650. package/dist/esm/helpers/getExpandedShorthands.native.js.map +1 -1
  651. package/dist/esm/helpers/getFontLanguage.mjs.map +1 -1
  652. package/dist/esm/helpers/getFontLanguage.native.js.map +1 -1
  653. package/dist/esm/helpers/getShorthandValue.mjs.map +1 -1
  654. package/dist/esm/helpers/getShorthandValue.native.js.map +1 -1
  655. package/dist/esm/helpers/getSplitStyles.mjs +2 -9
  656. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  657. package/dist/esm/helpers/getSplitStyles.native.js +2 -9
  658. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  659. package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
  660. package/dist/esm/helpers/getVariantExtras.mjs.map +1 -1
  661. package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
  662. package/dist/esm/helpers/grammarConfig.mjs +59 -13
  663. package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
  664. package/dist/esm/helpers/grammarConfig.native.js +80 -17
  665. package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
  666. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  667. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  668. package/dist/esm/helpers/matchMedia.native.js.map +1 -1
  669. package/dist/esm/helpers/mediaObjectToString.mjs.map +1 -1
  670. package/dist/esm/helpers/mediaObjectToString.native.js.map +1 -1
  671. package/dist/esm/helpers/mergeVariants.mjs +1 -1
  672. package/dist/esm/helpers/mergeVariants.mjs.map +1 -1
  673. package/dist/esm/helpers/mergeVariants.native.js +1 -1
  674. package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
  675. package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
  676. package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
  677. package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
  678. package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
  679. package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -1
  680. package/dist/esm/helpers/parseNativeTransform.native.js.map +1 -1
  681. package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
  682. package/dist/esm/helpers/propMapper.mjs +31 -39
  683. package/dist/esm/helpers/propMapper.mjs.map +1 -1
  684. package/dist/esm/helpers/propMapper.native.js +31 -39
  685. package/dist/esm/helpers/propMapper.native.js.map +1 -1
  686. package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
  687. package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
  688. package/dist/esm/helpers/registerCSSVariable.mjs.map +1 -1
  689. package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
  690. package/dist/esm/helpers/resolveSafeAreaVariable.native.js.map +1 -1
  691. package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
  692. package/dist/esm/helpers/themeRef.mjs.map +1 -1
  693. package/dist/esm/helpers/themeRef.native.js.map +1 -1
  694. package/dist/esm/helpers/themeUpdateState.mjs +4 -0
  695. package/dist/esm/helpers/themeUpdateState.mjs.map +1 -0
  696. package/dist/esm/helpers/themeUpdateState.native.js +4 -0
  697. package/dist/esm/helpers/themeUpdateState.native.js.map +1 -0
  698. package/dist/esm/helpers/timer.mjs.map +1 -1
  699. package/dist/esm/helpers/timer.native.js.map +1 -1
  700. package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
  701. package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
  702. package/dist/esm/helpers/transformsToString.native.js.map +1 -1
  703. package/dist/esm/helpers/useRenderElement.mjs.map +1 -1
  704. package/dist/esm/helpers/useRenderElement.native.js.map +1 -1
  705. package/dist/esm/helpers/variableValue.mjs +44 -0
  706. package/dist/esm/helpers/variableValue.mjs.map +1 -0
  707. package/dist/esm/helpers/variableValue.native.js +64 -0
  708. package/dist/esm/helpers/variableValue.native.js.map +1 -0
  709. package/dist/esm/helpers/variables.mjs +96 -136
  710. package/dist/esm/helpers/variables.mjs.map +1 -1
  711. package/dist/esm/helpers/variables.native.js +98 -158
  712. package/dist/esm/helpers/variables.native.js.map +1 -1
  713. package/dist/esm/helpers/warnOnce.mjs +1 -1
  714. package/dist/esm/helpers/warnOnce.mjs.map +1 -1
  715. package/dist/esm/helpers/warnOnce.native.js +1 -1
  716. package/dist/esm/helpers/warnOnce.native.js.map +1 -1
  717. package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
  718. package/dist/esm/hooks/getThemeProxied.native.js +2 -2
  719. package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
  720. package/dist/esm/hooks/useAnimationDriver.mjs +14 -8
  721. package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
  722. package/dist/esm/hooks/useAnimationDriver.native.js +14 -8
  723. package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
  724. package/dist/esm/hooks/useComponentState.mjs +27 -24
  725. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  726. package/dist/esm/hooks/useComponentState.native.js +28 -24
  727. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  728. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  729. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  730. package/dist/esm/hooks/usePortalThemeState.mjs +2 -2
  731. package/dist/esm/hooks/usePortalThemeState.mjs.map +1 -1
  732. package/dist/esm/hooks/usePortalThemeState.native.js +2 -2
  733. package/dist/esm/hooks/usePortalThemeState.native.js.map +1 -1
  734. package/dist/esm/hooks/useProps.mjs +1 -1
  735. package/dist/esm/hooks/useProps.mjs.map +1 -1
  736. package/dist/esm/hooks/useProps.native.js +1 -1
  737. package/dist/esm/hooks/useProps.native.js.map +1 -1
  738. package/dist/esm/hooks/useThemeName.mjs.map +1 -1
  739. package/dist/esm/hooks/useThemeState.mjs +12 -15
  740. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  741. package/dist/esm/hooks/useThemeState.native.js +14 -17
  742. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  743. package/dist/esm/index.js +0 -2
  744. package/dist/esm/index.mjs +0 -2
  745. package/dist/esm/index.native.js +0 -2
  746. package/dist/esm/insertFont.mjs.map +1 -1
  747. package/dist/esm/insertFont.native.js.map +1 -1
  748. package/dist/esm/internal-runtime.mjs +1 -3
  749. package/dist/esm/internal-runtime.mjs.map +1 -1
  750. package/dist/esm/internal-runtime.native.js +1 -3
  751. package/dist/esm/internal-runtime.native.js.map +1 -1
  752. package/dist/esm/styled.mjs.map +1 -1
  753. package/dist/esm/styled.native.js.map +1 -1
  754. package/dist/esm/theme-update.mjs +3 -0
  755. package/dist/esm/theme-update.native.js +3 -0
  756. package/dist/esm/views/FontLanguage.mjs.map +1 -1
  757. package/dist/esm/views/SafeAreaTracker.native.js.map +1 -1
  758. package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
  759. package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
  760. package/dist/esm/views/Theme.mjs +8 -33
  761. package/dist/esm/views/Theme.mjs.map +1 -1
  762. package/dist/esm/views/Theme.native.js +9 -20
  763. package/dist/esm/views/Theme.native.js.map +1 -1
  764. package/dist/esm/views/ThemeUpdate.mjs +54 -0
  765. package/dist/esm/views/ThemeUpdate.mjs.map +1 -0
  766. package/dist/esm/views/ThemeUpdate.native.js +53 -0
  767. package/dist/esm/views/ThemeUpdate.native.js.map +1 -0
  768. package/package.json +26 -17
  769. package/src/config.ts +7 -0
  770. package/src/createComponent.tsx +1 -4
  771. package/src/createTamagui.ts +3 -8
  772. package/src/dom/primitives.native.tsx +1 -1
  773. package/src/helpers/configVariables.ts +64 -0
  774. package/src/helpers/defaultAnimationDriver.tsx +0 -4
  775. package/src/helpers/directStyle.ts +876 -477
  776. package/src/helpers/getCSSStylesAtomic.ts +5 -1
  777. package/src/helpers/getSplitStyles.tsx +2 -23
  778. package/src/helpers/grammarConfig.ts +82 -12
  779. package/src/helpers/mergeVariants.ts +1 -3
  780. package/src/helpers/nativeTransitionTarget.native.ts +1 -1
  781. package/src/helpers/nativeTransitionTarget.ts +1 -1
  782. package/src/helpers/propMapper.ts +42 -49
  783. package/src/helpers/themeUpdateState.ts +27 -0
  784. package/src/helpers/variableValue.ts +45 -0
  785. package/src/helpers/variables.ts +149 -195
  786. package/src/helpers/warnOnce.ts +2 -2
  787. package/src/hooks/getThemeProxied.ts +9 -7
  788. package/src/hooks/useAnimationDriver.ts +26 -11
  789. package/src/hooks/useComponentState.ts +44 -34
  790. package/src/hooks/usePortalThemeState.ts +8 -8
  791. package/src/hooks/useProps.tsx +1 -4
  792. package/src/hooks/useThemeState.ts +16 -37
  793. package/src/index.ts +0 -1
  794. package/src/internal-runtime.ts +1 -8
  795. package/src/theme-update.ts +2 -0
  796. package/src/types.tsx +13 -21
  797. package/src/views/Theme.tsx +18 -80
  798. package/src/views/ThemeUpdate.tsx +88 -0
  799. package/types/config.d.ts.map +1 -1
  800. package/types/createComponent.d.ts.map +1 -1
  801. package/types/helpers/configVariables.d.ts +3 -0
  802. package/types/helpers/configVariables.d.ts.map +1 -0
  803. package/types/helpers/defaultAnimationDriver.d.ts.map +1 -1
  804. package/types/helpers/directStyle.d.ts +2 -23
  805. package/types/helpers/directStyle.d.ts.map +1 -1
  806. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  807. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  808. package/types/helpers/grammarConfig.d.ts +9 -0
  809. package/types/helpers/grammarConfig.d.ts.map +1 -1
  810. package/types/helpers/mergeVariants.d.ts.map +1 -1
  811. package/types/helpers/nativeTransitionTarget.d.ts +1 -1
  812. package/types/helpers/nativeTransitionTarget.d.ts.map +1 -1
  813. package/types/helpers/nativeTransitionTarget.native.d.ts +1 -1
  814. package/types/helpers/nativeTransitionTarget.native.d.ts.map +1 -1
  815. package/types/helpers/propMapper.d.ts.map +1 -1
  816. package/types/helpers/themeUpdateState.d.ts +23 -0
  817. package/types/helpers/themeUpdateState.d.ts.map +1 -0
  818. package/types/helpers/variableValue.d.ts +4 -0
  819. package/types/helpers/variableValue.d.ts.map +1 -0
  820. package/types/helpers/variables.d.ts +7 -24
  821. package/types/helpers/variables.d.ts.map +1 -1
  822. package/types/helpers/warnOnce.d.ts +1 -1
  823. package/types/hooks/getThemeProxied.d.ts.map +1 -1
  824. package/types/hooks/useAnimationDriver.d.ts.map +1 -1
  825. package/types/hooks/useComponentState.d.ts.map +1 -1
  826. package/types/hooks/usePortalThemeState.d.ts +5 -5
  827. package/types/hooks/usePortalThemeState.d.ts.map +1 -1
  828. package/types/hooks/useProps.d.ts.map +1 -1
  829. package/types/hooks/useThemeState.d.ts +2 -5
  830. package/types/hooks/useThemeState.d.ts.map +1 -1
  831. package/types/index.d.ts +0 -1
  832. package/types/index.d.ts.map +1 -1
  833. package/types/internal-runtime.d.ts.map +1 -1
  834. package/types/theme-update.d.ts +3 -0
  835. package/types/theme-update.d.ts.map +1 -0
  836. package/types/types.d.ts +6 -17
  837. package/types/types.d.ts.map +1 -1
  838. package/types/views/Theme.d.ts +2 -15
  839. package/types/views/Theme.d.ts.map +1 -1
  840. package/types/views/ThemeUpdate.d.ts +15 -0
  841. package/types/views/ThemeUpdate.d.ts.map +1 -0
@@ -1,14 +1,14 @@
1
1
  import { isAndroid, isIos, isTV, isWeb, supportsDynamicColorIOS } from "@tamagui/constants";
2
2
  import { StyleObjectIdentifier, StyleObjectRules, nonAnimatableStyleProps, tokenCategories } from "@tamagui/helpers";
3
- import { canonicalClauseModifier, clauseConditionSetKey, clauseSubjectClassRepetitions, createClausePrecedenceOrder, getClausePrecedenceKeyFromKinds, isRootThemeName, scanFlatValue } from "@tamagui/style-grammar/runtime";
3
+ import { canonicalStateModifierNames, isContainerSizeQueryText, isModifierName, modifierKindMedia, modifierKindPlatform, modifierKindState, modifierKindTheme, scanFlatValue, stateModifierSelectors } from "@tamagui/style-grammar/runtime";
4
4
  import { isVariable } from "../createVariable.mjs";
5
5
  import { mediaKeyMatch } from "../hooks/useMedia.mjs";
6
6
  import { warnOnce, warnRefusedValue } from "./warnOnce.mjs";
7
7
  import { expandStyle } from "./expandStyle.mjs";
8
8
  import { getCSSStyleAtomic } from "./getCSSStylesAtomic.mjs";
9
+ import { getConfigRevisionState } from "./grammarConfig.mjs";
9
10
  import { isColorStyleKey } from "./getDynamicVal.mjs";
10
11
  import { shouldInsertStyleRules, updateRules } from "./insertStyleRule.mjs";
11
- import { mediaObjectToString } from "./mediaObjectToString.mjs";
12
12
  import { normalizeColor } from "./normalizeColor.mjs";
13
13
  import { getTokenCategoryForProperty, tokenCategoryByProperty } from "./tokenCategories.mjs";
14
14
  import { resolveSafeAreaVariable } from "./resolveSafeAreaVariable.mjs";
@@ -17,18 +17,54 @@ import { resolveVariableValue } from "./resolveVariableValue.mjs";
17
17
  import { THEME_REF_PREFIX } from "./themeRef.mjs";
18
18
  import { transformsToString } from "./transformsToString.mjs";
19
19
 
20
- const stateSelectors = {
21
- hover: ":hover",
22
- press: ":active",
23
- focus: ":focus",
24
- "focus-visible": ":focus-visible",
25
- "focus-within": ":focus-within",
26
- disabled: "[aria-disabled]",
27
- open: "[data-state=\"open\"]",
28
- checked: "[data-state=\"checked\"]",
29
- highlighted: "[data-highlighted]",
30
- selected: "[data-state=\"active\"]",
31
- invalid: "[aria-invalid=\"true\"]"
20
+ const directStyleHandler = {
21
+ segment(state, start, end, isBase, valid, source, chainStart, chainEnd, chainValid, chainCount, _result, failure, failureIndex, property, merge, originalValue, contextOnly) {
22
+ if (isBase) {
23
+ if (start === end) return;
24
+ if (!valid) {
25
+ if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, 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 \"(\"");
26
+ return;
27
+ }
28
+ const value = source.slice(start, end);
29
+ emitValue(state, property, value, 0, "", void 0, "", "", merge, value, contextOnly);
30
+ return 5;
31
+ }
32
+ if (!chainValid) {
33
+ if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, 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 \"(\"");
34
+ return;
35
+ }
36
+ if (start === end) {
37
+ if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, "a conditional clause has no value");
38
+ return;
39
+ }
40
+ if (property === "aspectRatio" && chainCount === 1) {
41
+ const left = Number(source.slice(chainStart, chainEnd));
42
+ const right = Number(source.slice(start, end));
43
+ if (chainStart < chainEnd && Number.isFinite(left) && left > 0 && Number.isFinite(right) && right > 0) return 12;
44
+ }
45
+ const condition = resolveClauseChain(state, source, chainStart, chainEnd, property, void 0, valid ? merge : void 0, void 0, contextOnly, start, end, 1);
46
+ if (!condition) return;
47
+ if (!valid) {
48
+ if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, 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 \"(\"");
49
+ return;
50
+ }
51
+ return 4 | (condition & 12 ? 2 : 0);
52
+ },
53
+ chain() {
54
+ return true;
55
+ },
56
+ end(state, source, result, lastPayloadStart, chainCount, property, merge, originalValue, contextOnly) {
57
+ let hasBase = !!(result & 1);
58
+ if (result & 8 && chainCount === 1) {
59
+ emitValue(state, property, source, 0, "", void 0, "", "", merge, originalValue ?? source, contextOnly);
60
+ hasBase = true;
61
+ }
62
+ if (process.env.NODE_ENV === "development" && !hasBase && result & 4 && (property in tokenCategories.color || property in tokenCategoryByProperty) && splitComponents(source.slice(lastPayloadStart)).length > 1) warnOnce(`${property}="${source}" has multiple values after its first conditional. Write the base value before the first conditional.`);
63
+ if ((!isWeb || !state.flatShouldDoClasses) && result & 2 && !hasBase) {
64
+ const value = property === "opacity" ? 1 : property === "scale" || property === "scaleX" || property === "scaleY" ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
65
+ if (value !== null) emitValue(state, property, value, 0, "", void 0, "", "", merge, value, contextOnly);
66
+ }
67
+ }
32
68
  };
33
69
  const legacyTransformParts = /* @__PURE__ */ new Set([
34
70
  "matrix",
@@ -127,38 +163,6 @@ const borderStyleDefaults = {
127
163
  borderBottomWidth: "borderBottomStyle",
128
164
  borderLeftWidth: "borderLeftStyle"
129
165
  };
130
- const mediaQueries = /* @__PURE__ */ new WeakMap();
131
- const clausePrecedenceOrders = /* @__PURE__ */ new WeakMap();
132
- function queryFor(state, name) {
133
- let queries = mediaQueries.get(state.conf);
134
- if (!queries) {
135
- queries = {};
136
- const media = state.conf.media || {};
137
- for (const key in media) queries[key] = mediaObjectToString(media[key]);
138
- mediaQueries.set(state.conf, queries);
139
- }
140
- return queries[name];
141
- }
142
- function precedenceOrderFor(state) {
143
- let order = clausePrecedenceOrders.get(state.conf);
144
- if (!order) {
145
- order = createClausePrecedenceOrder(state.conf.media);
146
- clausePrecedenceOrders.set(state.conf, order);
147
- }
148
- return order;
149
- }
150
- function stateIsActive(state, name) {
151
- const component = state.componentState;
152
- if (name === "hover") return !!component.hover;
153
- if (name === "press") return !!(component.press || component.pressIn);
154
- if (name === "focus") return !!component.focus;
155
- if (name === "focus-visible") return !!component.focusVisible;
156
- if (name === "focus-within") return !!component.focusWithin;
157
- if (name === "disabled") return !!(component.disabled || state.props.disabled);
158
- if (name === "enter") return !!component.unmounted;
159
- if (name === "exit") return !!state.styleProps.isExiting;
160
- return false;
161
- }
162
166
  function platformMatches(name) {
163
167
  if (name === "web") return isWeb;
164
168
  if (name === "native") return !isWeb;
@@ -168,115 +172,160 @@ function platformMatches(name) {
168
172
  if (name === "androidtv") return isAndroid && isTV;
169
173
  return name === "tv" && isTV;
170
174
  }
171
- function groupCondition(state, modifier, out) {
172
- const slash = modifier.indexOf("/");
173
- const stateName = modifier.slice(6, slash === -1 ? void 0 : slash);
174
- const groupName = slash === -1 ? "true" : modifier.slice(slash + 1);
175
- const selector = stateSelectors[stateName];
176
- if (!selector || !groupName) return false;
177
- out.selector += `:where(.t_group_${groupName}${selector} *)`;
178
- if (stateName === "hover") (out.wrappers ||= []).push("@media (hover: hover)");
179
- const component = state.componentState.group?.[groupName];
180
- const context = state.flatGroupContext?.[groupName];
181
- out.active &&= !!(component?.pseudo ?? context?.state.pseudo)?.[stateName];
182
- (state.flatGroupKeys ||= /* @__PURE__ */ new Set()).add(groupName);
183
- return true;
184
- }
185
- function containerCondition(state, modifier, out) {
186
- const slash = modifier.indexOf("/");
187
- const size = modifier.slice(1, slash === -1 ? void 0 : slash);
188
- const name = slash === -1 ? null : modifier.slice(slash + 1);
189
- const query = queryFor(state, size);
190
- if (!query || name !== null && !name) return false;
191
- const key = name === null ? "@" : `@${name}`;
192
- (out.wrappers ||= []).push(name === null ? `@container ${query}` : `@container ${name} ${query}`);
193
- const component = state.componentState.group?.[key];
194
- const context = state.flatGroupContext?.[key];
195
- const active = component?.media?.[size];
196
- out.active &&= active === void 0 ? !!(context?.state.layout && mediaKeyMatch(size, context.state.layout)) : !!active;
197
- (state.flatGroupKeys ||= /* @__PURE__ */ new Set()).add(key);
198
- (state.flatGroupMedia ||= /* @__PURE__ */ new Set()).add(size);
199
- return true;
200
- }
201
- function getCondition(state, source) {
202
- const out = {
203
- key: "",
204
- active: true,
205
- emit: true,
206
- selector: ""
207
- };
208
- const canonical = [];
209
- const kinds = [];
210
- const seenModifiers = /* @__PURE__ */ new Set();
175
+ function resolveClauseChain(state, source, start, end, property, raw, merge, originalValue, contextOnly = false, payloadStart = -1, payloadEnd = -1, warning = 0) {
176
+ const compiled = getConfigRevisionState(state.conf);
177
+ const sourceStart = start;
178
+ let key = "";
179
+ let active = true;
180
+ let emit = true;
181
+ let selector = "";
182
+ let wrappers;
183
+ let theme = "";
184
+ let enter = false;
185
+ let exit = false;
186
+ let unsupportedState = "";
187
+ let platformRank = 0;
188
+ let depth = 0;
189
+ let categoryRank = 0;
190
+ let withinRank = 0;
211
191
  let selfStateSpecificity = 0;
212
- let start = 0;
213
- for (let index = 0; index <= source.length; index++) {
214
- if (index !== source.length && source.charCodeAt(index) !== 58) continue;
215
- let modifier = canonicalClauseModifier(source.slice(start, index));
192
+ for (let index = start; index <= end; index++) {
193
+ if (index !== end && source.charCodeAt(index) !== 58) continue;
194
+ let modifier = source.slice(start, index);
216
195
  start = index + 1;
217
- if (!modifier) return null;
218
- if (seenModifiers.has(modifier)) continue;
219
- seenModifiers.add(modifier);
220
- if (modifier.startsWith("group-")) {
221
- if (!groupCondition(state, modifier, out)) return null;
222
- canonical.push(modifier);
223
- kinds.push("group");
224
- continue;
225
- }
226
- if (modifier.charCodeAt(0) === 64) {
227
- if (!containerCondition(state, modifier, out)) return null;
228
- canonical.push(modifier);
229
- kinds.push("container");
230
- continue;
231
- }
232
- if (modifier in stateSelectors || modifier === "enter" || modifier === "exit") {
233
- canonical.push(modifier);
234
- kinds.push("state");
235
- selfStateSpecificity++;
236
- const selector = stateSelectors[modifier];
237
- if (!isWeb && modifier !== "hover" && modifier !== "press" && modifier !== "focus" && modifier !== "focus-visible" && modifier !== "focus-within" && modifier !== "disabled" && modifier !== "enter" && modifier !== "exit") out.unsupportedState = modifier;
238
- if (modifier === "enter" || modifier === "exit") {
239
- const cls = modifier === "enter" ? ".t_unmounted" : ".t_exiting";
240
- out.selector += `:is(${cls}, ${cls} *)`;
241
- out[modifier] = true;
242
- } else if (selector) out.selector += selector;
243
- if (modifier === "hover") (out.wrappers ||= []).push("@media (hover: hover)");
244
- out.active &&= stateIsActive(state, modifier);
245
- if (modifier === "hover" || modifier === "press" || modifier === "focus" || modifier === "focus-visible" || modifier === "focus-within") (state.flatStateKeys ||= /* @__PURE__ */ new Set()).add(modifier);
246
- continue;
247
- }
248
- if (modifier in (state.conf.media || {})) {
249
- const query = queryFor(state, modifier);
250
- if (!query) return null;
251
- canonical.push(modifier);
252
- kinds.push("media");
253
- (out.wrappers ||= []).push(`@media ${query}`);
254
- out.active &&= !!state.flatMediaState?.[modifier];
255
- (state.flatMediaKeys ||= /* @__PURE__ */ new Set()).add(modifier);
256
- continue;
196
+ let code = compiled.modifiers[modifier];
197
+ let kind = code & 7;
198
+ let rank = code >> 3;
199
+ let stateSelector = "";
200
+ let conditionStateName = "";
201
+ let groupName = "";
202
+ let containerSize = "";
203
+ let containerName = "";
204
+ let containerQuery = "";
205
+ if (kind === modifierKindState) {
206
+ modifier = canonicalStateModifierNames[rank];
207
+ stateSelector = stateModifierSelectors[rank];
208
+ } else if (!kind && modifier.startsWith("group-")) {
209
+ const slash = modifier.indexOf("/");
210
+ const authoredState = modifier.slice(6, slash === -1 ? void 0 : slash);
211
+ code = compiled.modifiers[authoredState];
212
+ if ((code & 7) !== modifierKindState) kind = 0;
213
+ else {
214
+ rank = code >> 3;
215
+ groupName = slash === -1 ? "true" : modifier.slice(slash + 1);
216
+ if (rank === 6 || rank === 7 || slash !== -1 && !isModifierName(groupName, 0, groupName.length)) kind = 0;
217
+ else {
218
+ kind = 5;
219
+ const stateName = canonicalStateModifierNames[rank];
220
+ conditionStateName = stateName;
221
+ stateSelector = stateModifierSelectors[rank];
222
+ modifier = `group-${stateName}${slash === -1 ? "" : modifier.slice(slash)}`;
223
+ }
224
+ }
225
+ } else if (!kind && modifier.charCodeAt(0) === 64) {
226
+ const slash = modifier.indexOf("/");
227
+ containerSize = modifier.slice(1, slash === -1 ? void 0 : slash);
228
+ containerName = slash === -1 ? "" : modifier.slice(slash + 1);
229
+ if (isModifierName(containerSize, 0, containerSize.length) && (slash === -1 || isModifierName(containerName, 0, containerName.length)) && ((code = compiled.modifiers[containerSize]) & 7) === modifierKindMedia && (containerQuery = compiled.mediaQueries[containerSize]) && isContainerSizeQueryText(containerQuery)) {
230
+ kind = 6;
231
+ rank = code >> 3;
232
+ }
257
233
  }
258
- if (isRootThemeName(modifier) && modifier in (state.conf.themes || {})) {
259
- canonical.push(modifier);
260
- kinds.push("theme");
261
- out.theme = modifier;
262
- out.selector += `:where(.t_${modifier}, .t_${modifier} *)`;
263
- out.active &&= state.flatThemeName === modifier || state.flatThemeName?.startsWith(`${modifier}_`) === true;
264
- continue;
234
+ if (!kind) {
235
+ if (warning && process.env.NODE_ENV === "development") warnRefusedValue(property, warning === 1 ? source : raw, `unknown modifier "${source.slice(sourceStart, end)}"`);
236
+ return 0;
237
+ }
238
+ let slotStart = 0;
239
+ let duplicate = false;
240
+ let inserted = !key;
241
+ if (!key) key = modifier;
242
+ else {
243
+ while (slotStart <= key.length) {
244
+ let slotEnd = key.indexOf(":", slotStart);
245
+ if (slotEnd === -1) slotEnd = key.length;
246
+ let order = 0;
247
+ const compareLength = Math.min(modifier.length, slotEnd - slotStart);
248
+ for (let offset = 0; offset < compareLength; offset++) {
249
+ order = modifier.charCodeAt(offset) - key.charCodeAt(slotStart + offset);
250
+ if (order) break;
251
+ }
252
+ order ||= modifier.length - (slotEnd - slotStart);
253
+ if (!order) {
254
+ duplicate = true;
255
+ break;
256
+ }
257
+ if (order < 0) {
258
+ key = `${key.slice(0, slotStart)}${modifier}:${key.slice(slotStart)}`;
259
+ inserted = true;
260
+ break;
261
+ }
262
+ if (slotEnd === key.length) break;
263
+ slotStart = slotEnd + 1;
264
+ }
265
+ if (!duplicate && !inserted) key += `:${modifier}`;
265
266
  }
266
- if (modifier === "web" || modifier === "native" || modifier === "ios" || modifier === "android" || modifier === "tv" || modifier === "tvos" || modifier === "androidtv") {
267
- canonical.push(modifier);
268
- kinds.push("platform");
267
+ if (duplicate) continue;
268
+ if (kind === modifierKindPlatform) {
269
+ if (rank > platformRank) platformRank = rank;
269
270
  const matches = platformMatches(modifier);
270
- out.active &&= matches;
271
- out.emit &&= matches;
271
+ active &&= matches;
272
+ emit &&= matches;
272
273
  continue;
273
274
  }
274
- return null;
275
- }
276
- out.key = clauseConditionSetKey(canonical);
277
- out.precedence = getClausePrecedenceKeyFromKinds(canonical, kinds, precedenceOrderFor(state));
278
- out.classRepetitions = clauseSubjectClassRepetitions(out.precedence, selfStateSpecificity);
279
- return out;
275
+ depth++;
276
+ const nextCategory = kind === modifierKindMedia ? 0 : kind === 6 ? 1 : kind === modifierKindTheme ? 2 : kind === 5 ? 3 : 4;
277
+ if (nextCategory > categoryRank) {
278
+ categoryRank = nextCategory;
279
+ withinRank = rank;
280
+ } else if (nextCategory === categoryRank && rank > withinRank) withinRank = rank;
281
+ if (kind === modifierKindMedia) {
282
+ const query = compiled.mediaQueries[modifier];
283
+ if (!query) return 0;
284
+ (wrappers ||= []).push(`@media ${query}`);
285
+ active &&= !!state.flatMediaState?.[modifier];
286
+ (state.flatMediaKeys ||= /* @__PURE__ */ new Set()).add(modifier);
287
+ } else if (kind === modifierKindTheme) {
288
+ theme = modifier;
289
+ selector += `:where(.t_${modifier}, .t_${modifier} *)`;
290
+ active &&= state.flatThemeName === modifier || state.flatThemeName?.startsWith(`${modifier}_`) === true;
291
+ } else if (kind === 5) {
292
+ selector += `:where(.t_group_${groupName}${stateSelector} *)`;
293
+ if (rank === 0) (wrappers ||= []).push("@media (hover: hover)");
294
+ const component = state.componentState.group?.[groupName];
295
+ const context = state.flatGroupContext?.[groupName];
296
+ active &&= !!(component?.pseudo ?? context?.state.pseudo)?.[conditionStateName];
297
+ (state.flatGroupKeys ||= /* @__PURE__ */ new Set()).add(groupName);
298
+ } else if (kind === 6) {
299
+ const groupKey = `@${containerName}`;
300
+ (wrappers ||= []).push(containerName ? `@container ${containerName} ${containerQuery}` : `@container ${containerQuery}`);
301
+ const component = state.componentState.group?.[groupKey];
302
+ const context = state.flatGroupContext?.[groupKey];
303
+ const match = component?.media?.[containerSize];
304
+ active &&= match === void 0 ? !!(context?.state.layout && mediaKeyMatch(containerSize, context.state.layout)) : !!match;
305
+ (state.flatGroupKeys ||= /* @__PURE__ */ new Set()).add(groupKey);
306
+ (state.flatGroupMedia ||= /* @__PURE__ */ new Set()).add(containerSize);
307
+ } else {
308
+ selfStateSpecificity++;
309
+ if (!isWeb && stateSelector[0] === "[" && modifier !== "disabled") unsupportedState = modifier;
310
+ if (stateSelector[0] === ".") {
311
+ selector += `:is(${stateSelector}, ${stateSelector} *)`;
312
+ if (rank === 6) enter = true;
313
+ else exit = true;
314
+ } else selector += stateSelector;
315
+ if (rank === 0) (wrappers ||= []).push("@media (hover: hover)");
316
+ const component = state.componentState;
317
+ active &&= rank === 0 ? !!component.hover : rank === 4 ? !!(component.press || component.pressIn) : rank === 2 ? !!component.focus : rank === 3 ? !!component.focusVisible : rank === 1 ? !!component.focusWithin : rank === 5 ? !!(component.disabled || state.props.disabled) : rank === 6 ? !!component.unmounted : rank === 7 ? !!state.styleProps.isExiting : false;
318
+ if (stateSelector[0] === ":") (state.flatStateKeys ||= /* @__PURE__ */ new Set()).add(modifier);
319
+ }
320
+ }
321
+ if (depth > 5) throw new Error(`a flat value clause supports at most 5 non-platform conditions; received ${depth} in "${source.slice(sourceStart, end)}:"`);
322
+ const condition = (platformRank << 26 | depth << 23 | categoryRank << 20 | withinRank) * 256 + selfStateSpecificity * 32 + 16 + (active ? 1 : 0) + (emit ? 2 : 0) + (enter ? 4 : 0) + (exit ? 8 : 0);
323
+ if (warning && unsupportedState && process.env.NODE_ENV === "development") warnOnce(`${property}: "${unsupportedState}:" has no native component-state source; dropping the clause`);
324
+ if (merge && property && condition & 2 && (condition & 1 || isWeb && state.flatShouldDoClasses || warning === 1 && !isWeb && theme && supportsDynamicColorIOS && isColorStyleKey(property))) {
325
+ const value = payloadStart === -1 ? raw : source.slice(payloadStart, payloadEnd);
326
+ emitValue(state, property, value, condition, key, wrappers, selector, theme, merge, warning === 2 ? originalValue : originalValue ?? value, contextOnly);
327
+ }
328
+ return condition;
280
329
  }
281
330
  const tokenLookup = {
282
331
  value: void 0,
@@ -337,7 +386,7 @@ function configuredValue(state, property, raw) {
337
386
  opacity = amount;
338
387
  }
339
388
  }
340
- const safeArea = process.env.TAMAGUI_RUNTIME_SAFE_AREA === "disabled" ? void 0 : resolveSafeAreaVariable(name);
389
+ const safeArea = resolveSafeAreaVariable(name);
341
390
  if (safeArea !== void 0) {
342
391
  state.flatUsesSafeArea = true;
343
392
  return safeArea;
@@ -415,13 +464,13 @@ function normalizeTransitionNames(state, raw) {
415
464
  function directStyleSignature(property, value, conditionKey = "") {
416
465
  return `${property}${conditionKey}${String(value)}`;
417
466
  }
418
- function directAtomic(state, property, value, condition, isDefault = false) {
467
+ function directAtomic(state, property, value, condition, conditionKey, conditionWrappers, conditionSelector, isDefault = false) {
419
468
  const atomics = state.flatAtomics ||= {};
420
469
  const atomicKey = property.startsWith("transition") ? "transition" : property;
421
470
  const existing = atomics[atomicKey];
422
- const contribution = directStyleSignature(property, value, condition?.key || "");
471
+ const contribution = directStyleSignature(property, value, conditionKey);
423
472
  const signature = existing ? existing.signature + contribution : contribution;
424
- const next = getCSSStyleAtomic(property, value, condition?.selector, condition?.wrappers, signature, true, atomicKey, condition?.classRepetitions);
473
+ const next = getCSSStyleAtomic(property, value, conditionSelector, conditionWrappers, signature, true, atomicKey, condition ? 1 + (Math.floor(condition / 256) >>> 23 & 7) + (Math.floor(condition / 256) >>> 26) * 6 - (condition >>> 5 & 7) : void 0);
425
474
  if (!next) return;
426
475
  const identifier = next[StyleObjectIdentifier];
427
476
  const nextRules = next[StyleObjectRules];
@@ -433,10 +482,10 @@ function directAtomic(state, property, value, condition, isDefault = false) {
433
482
  signature,
434
483
  styleObject: next
435
484
  };
436
- if (slotted) atomic.conditions = { [atomicKey === "transition" ? `${condition?.key || ""}\0${property}` : condition.key]: {
485
+ if (slotted) atomic.conditions = { [atomicKey === "transition" ? `${conditionKey}\0${property}` : conditionKey]: {
437
486
  count: nextRules.length,
438
487
  index: 0,
439
- precedence: condition?.precedence ?? 0,
488
+ precedence: condition ? Math.floor(condition / 256) : 0,
440
489
  default: isDefault
441
490
  } };
442
491
  atomics[atomicKey] = atomic;
@@ -459,7 +508,7 @@ function directAtomic(state, property, value, condition, isDefault = false) {
459
508
  for (let index = 0; index < rules.length; index++) rules[index] = rules[index].replaceAll(oldSelector, newSelector);
460
509
  }
461
510
  if (slotted) {
462
- const slot = atomicKey === "transition" ? `${condition?.key || ""}\0${property}` : condition.key;
511
+ const slot = atomicKey === "transition" ? `${conditionKey}\0${property}` : conditionKey;
463
512
  const previous = existing.conditions?.[slot];
464
513
  if (previous) {
465
514
  rules.splice(previous.index, previous.count);
@@ -469,7 +518,7 @@ function directAtomic(state, property, value, condition, isDefault = false) {
469
518
  }
470
519
  delete existing.conditions[slot];
471
520
  }
472
- const precedence = condition?.precedence ?? 0;
521
+ const precedence = condition ? Math.floor(condition / 256) : 0;
473
522
  let insertionIndex = rules.length;
474
523
  if (existing.conditions) {
475
524
  for (const key in existing.conditions) {
@@ -500,13 +549,13 @@ function directAtomic(state, property, value, condition, isDefault = false) {
500
549
  }
501
550
  state.classNames[atomicKey] = identifier;
502
551
  }
503
- function emitBorderStyleDefault(state, property, condition) {
552
+ function emitBorderStyleDefault(state, property, condition, conditionKey, conditionWrappers, conditionSelector) {
504
553
  if (!isWeb || !state.flatShouldDoClasses || state.styleProps.noNormalize === false) return;
505
554
  const target = borderStyleDefaults[property];
506
555
  if (!target) return;
507
556
  const atomic = state.flatAtomics?.[target];
508
- if (atomic?.baseRules || state.classNames[target] && !atomic || condition && atomic?.conditions?.[condition.key]) return;
509
- directAtomic(state, target, "solid", condition, true);
557
+ if (atomic?.baseRules || state.classNames[target] && !atomic || condition && atomic?.conditions?.[conditionKey]) return;
558
+ directAtomic(state, target, "solid", condition, conditionKey, conditionWrappers, conditionSelector, true);
510
559
  }
511
560
  function flushDirectStyles(state, clear = false) {
512
561
  const direct = state;
@@ -525,21 +574,21 @@ function flushDirectStyles(state, clear = false) {
525
574
  function getDirectDynamicThemeAccess(state) {
526
575
  return state.flatDynamicThemeAccess;
527
576
  }
528
- function emitProperty(state, property, value, condition, merge, originalValue, contextOnly) {
577
+ function emitProperty(state, property, value, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly) {
529
578
  const direct = state;
530
- if (condition?.enter) (state.flatEnterKeys ||= /* @__PURE__ */ new Set()).add(property);
531
- if (condition?.exit) (state.flatExitKeys ||= /* @__PURE__ */ new Set()).add(property);
532
- if (!isWeb && condition?.theme) {
579
+ if (condition & 4) (state.flatEnterKeys ||= /* @__PURE__ */ new Set()).add(property);
580
+ if (condition & 8) (state.flatExitKeys ||= /* @__PURE__ */ new Set()).add(property);
581
+ if (!isWeb && conditionTheme) {
533
582
  if (supportsDynamicColorIOS && isColorStyleKey(property)) {
534
583
  const schemes = (direct.flatDynamicColors ||= {})[property] ||= {};
535
- schemes[condition.theme] = typeof originalValue === "string" && /^[a-z]+$/i.test(originalValue) ? originalValue : value;
584
+ schemes[conditionTheme] = typeof originalValue === "string" && /^[a-z]+$/i.test(originalValue) ? originalValue : value;
536
585
  merge(state, property, { dynamic: { ...schemes } }, 1, false, originalValue);
537
586
  return;
538
587
  }
539
588
  direct.flatDynamicThemeAccess = true;
540
589
  }
541
590
  if (contextOnly) {
542
- if (!condition || condition.active) (state.overriddenContextProps ||= {})[property] = originalValue;
591
+ if (!condition || condition & 1) (state.overriddenContextProps ||= {})[property] = originalValue;
543
592
  return;
544
593
  }
545
594
  const shouldPromoteAnimatedStyle = isWeb && !condition && !state.flatShouldDoClasses && !state.styleProps.noMergeStyle && state.styleProps.isAnimated && !state.animationDriver?.isReactNative && property in nonAnimatableStyleProps;
@@ -547,14 +596,15 @@ function emitProperty(state, property, value, condition, merge, originalValue, c
547
596
  if (!condition) {
548
597
  if (state.style) delete state.style[property];
549
598
  }
550
- directAtomic(state, property, value, condition);
599
+ directAtomic(state, property, value, condition, conditionKey, conditionWrappers, conditionSelector);
551
600
  return;
552
601
  }
553
602
  if (condition) {
554
- if (!condition.active) return;
603
+ if (!(condition & 1)) return;
604
+ const precedence = Math.floor(condition / 256);
555
605
  const previous = direct.flatPrecedence?.[property];
556
- if (previous !== void 0 && condition.precedence < previous) return;
557
- (direct.flatPrecedence ||= {})[property] = condition.precedence;
606
+ if (previous !== void 0 && precedence < previous) return;
607
+ (direct.flatPrecedence ||= {})[property] = precedence;
558
608
  (state.flatActiveConditions ||= {})[property] = true;
559
609
  } else if (state.flatActiveConditions?.[property]) return;
560
610
  merge(state, property, value, 1, true, originalValue);
@@ -581,7 +631,7 @@ function splitComponents(value) {
581
631
  }
582
632
  return parts;
583
633
  }
584
- function emitBorder(state, property, raw, condition, merge, originalValue, contextOnly) {
634
+ function emitBorder(state, property, raw, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly) {
585
635
  if (!isWeb && (property === "borderBlock" || property === "borderInline")) {
586
636
  if (process.env.NODE_ENV === "development") warnOnce(`RN has no logical border shorthand "${property}"; dropping it`);
587
637
  return;
@@ -597,15 +647,15 @@ function emitBorder(state, property, raw, condition, merge, originalValue, conte
597
647
  else color = part;
598
648
  }
599
649
  if (style === "none" && width === void 0) width = "0";
600
- if (width !== void 0) for (const target of targets.width) emitResolved(state, target, width, condition, merge, originalValue, contextOnly);
650
+ if (width !== void 0) for (const target of targets.width) emitResolved(state, target, width, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
601
651
  if (style !== void 0) {
602
652
  const styleTargets = !isWeb && property === "border" ? ["borderStyle"] : targets.style;
603
- for (const target of styleTargets) emitProperty(state, target, style, condition, merge, originalValue, contextOnly);
653
+ for (const target of styleTargets) emitProperty(state, target, style, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
604
654
  }
605
- if (color !== void 0) for (const target of targets.color) emitResolved(state, target, color, condition, merge, originalValue, contextOnly);
655
+ if (color !== void 0) for (const target of targets.color) emitResolved(state, target, color, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
606
656
  }
607
- function emitTextDecoration(state, raw, condition, merge, originalValue, contextOnly) {
608
- for (const part of splitComponents(raw)) emitResolved(state, part === "solid" || part === "double" || part === "dotted" || part === "dashed" || part === "wavy" ? "textDecorationStyle" : part === "underline" || part === "overline" || part === "line-through" || part === "none" ? "textDecorationLine" : "textDecorationColor", part, condition, merge, originalValue, contextOnly);
657
+ function emitTextDecoration(state, raw, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly) {
658
+ for (const part of splitComponents(raw)) emitResolved(state, part === "solid" || part === "double" || part === "dotted" || part === "dashed" || part === "wavy" ? "textDecorationStyle" : part === "underline" || part === "overline" || part === "line-through" || part === "none" ? "textDecorationLine" : "textDecorationColor", part, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
609
659
  }
610
660
  function addComposition(state, property) {
611
661
  if (state.classNames[property]) return;
@@ -620,12 +670,12 @@ function addComposition(state, property) {
620
670
  }
621
671
  state.classNames[property] = identifier;
622
672
  }
623
- function emitTransform(state, property, value, condition, merge, originalValue, contextOnly) {
673
+ function emitTransform(state, property, value, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly) {
624
674
  if (!isWeb || !state.flatShouldDoClasses) {
625
675
  if (!isWeb && property === "scale") {
626
- emitProperty(state, "scaleX", value, condition, merge, originalValue, contextOnly);
627
- emitProperty(state, "scaleY", value, condition, merge, originalValue, contextOnly);
628
- } else emitProperty(state, property, value, condition, merge, originalValue, contextOnly);
676
+ emitProperty(state, "scaleX", value, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
677
+ emitProperty(state, "scaleY", value, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
678
+ } else emitProperty(state, property, value, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
629
679
  return;
630
680
  }
631
681
  const targets = property === "scale" ? ["--t-scale-x", "--t-scale-y"] : [property === "x" ? "--t-x" : property === "y" ? "--t-y" : property === "scaleX" ? "--t-scale-x" : property === "scaleY" ? "--t-scale-y" : "rotate"];
@@ -635,19 +685,19 @@ function emitTransform(state, property, value, condition, merge, originalValue,
635
685
  if (target === "--t-x" || target === "--t-y") targetValue = `${targetValue}px`;
636
686
  else if (target === "rotate") targetValue = `${targetValue}deg`;
637
687
  }
638
- emitProperty(state, target, targetValue, condition, merge, originalValue, contextOnly);
688
+ emitProperty(state, target, targetValue, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
639
689
  if (target === "--t-x" || target === "--t-y") addComposition(state, "translate");
640
690
  else if (target.startsWith("--t-scale")) addComposition(state, "scale");
641
691
  }
642
692
  }
643
- function emitResolved(state, property, raw, condition, merge, originalValue, contextOnly) {
693
+ function emitResolved(state, property, raw, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly) {
644
694
  let value = configuredValue(state, property, raw);
645
695
  if (value === raw && /[\s,(]/.test(raw)) value = resolveEmbeddedTokens(state, property, raw);
646
696
  if ((!isWeb || !state.flatShouldDoClasses) && typeof value === "string") {
647
697
  if (/^-?(?:\d+\.?\d*|\.\d+)(?:px|dp)$/i.test(value)) value = Number.parseFloat(value);
648
698
  else if (value !== "" && Number.isFinite(Number(value))) value = Number(value);
649
699
  }
650
- emitProperty(state, property, value, condition, merge, originalValue, contextOnly);
700
+ emitProperty(state, property, value, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
651
701
  }
652
702
  function shadowUnit(part) {
653
703
  return typeof part === "number" ? `${part}px` : part || "0px";
@@ -662,7 +712,7 @@ function emitWebShadow(state, property, value, merge, originalValue, contextOnly
662
712
  const color = normalizeColor(shadow.shadowColor, shadow.shadowOpacity ?? 1);
663
713
  if (!color) return;
664
714
  const next = `${shadowUnit(offset.width)} ${shadowUnit(offset.height)} ${shadowUnit(shadow.shadowRadius)} ${color}`;
665
- emitProperty(state, "boxShadow", state.flatBoxShadow ? `${state.flatBoxShadow}, ${next}` : next, null, merge, originalValue, contextOnly);
715
+ emitProperty(state, "boxShadow", state.flatBoxShadow ? `${state.flatBoxShadow}, ${next}` : next, 0, "", void 0, "", "", merge, originalValue, contextOnly);
666
716
  }
667
717
  function emitWebTextShadow(state, property, value, merge, originalValue, contextOnly) {
668
718
  const shadow = state.flatTextShadow ||= {};
@@ -672,12 +722,12 @@ function emitWebTextShadow(state, property, value, merge, originalValue, context
672
722
  height: 0
673
723
  };
674
724
  if (!shadow.textShadowColor) return;
675
- emitProperty(state, "textShadow", `${shadowUnit(offset.width)} ${shadowUnit(offset.height)} ${shadowUnit(shadow.textShadowRadius)} ${shadow.textShadowColor}`, null, merge, originalValue, contextOnly);
725
+ emitProperty(state, "textShadow", `${shadowUnit(offset.width)} ${shadowUnit(offset.height)} ${shadowUnit(shadow.textShadowRadius)} ${shadow.textShadowColor}`, 0, "", void 0, "", "", merge, originalValue, contextOnly);
676
726
  }
677
- function emitValue(state, property, raw, condition, merge, originalValue, contextOnly) {
727
+ function emitValue(state, property, raw, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly) {
678
728
  if (typeof raw === "string") raw = raw.trim();
679
729
  if (isVariable(raw)) raw = resolveVariableValue(property, raw, isWeb && !state.flatShouldDoClasses && state.styleProps.resolveValues === "auto" ? "value" : state.styleProps.resolveValues);
680
- emitBorderStyleDefault(state, property, condition);
730
+ emitBorderStyleDefault(state, property, condition, conditionKey, conditionWrappers, conditionSelector);
681
731
  if (typeof raw === "string" && (property === "transition" || property === "transitionProperty")) raw = normalizeTransitionNames(state, raw);
682
732
  if (legacyTransformParts.has(property)) {
683
733
  if (isWeb && state.flatShouldDoClasses && state.classNames.transform) {
@@ -688,8 +738,8 @@ function emitValue(state, property, raw, condition, merge, originalValue, contex
688
738
  if (isWeb && state.flatShouldDoClasses && !condition) {
689
739
  const direct = state;
690
740
  (direct.flatLegacyTransforms ||= {})[property] = value2;
691
- emitProperty(state, "transform", transformsToString(Object.keys(direct.flatLegacyTransforms).sort().map((key) => ({ [key]: direct.flatLegacyTransforms[key] }))), null, merge, originalValue, contextOnly);
692
- } else if (condition && isWeb && state.flatShouldDoClasses) emitProperty(state, "transform", `${property}(${value2})`, condition, merge, originalValue, contextOnly);
741
+ emitProperty(state, "transform", transformsToString(Object.keys(direct.flatLegacyTransforms).sort().map((key) => ({ [key]: direct.flatLegacyTransforms[key] }))), 0, "", void 0, "", "", merge, originalValue, contextOnly);
742
+ } else if (condition && isWeb && state.flatShouldDoClasses) emitProperty(state, "transform", `${property}(${value2})`, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
693
743
  else merge(state, property, value2, 1, false, originalValue);
694
744
  return;
695
745
  }
@@ -718,17 +768,17 @@ function emitValue(state, property, raw, condition, merge, originalValue, contex
718
768
  }
719
769
  if (isWeb && state.flatShouldDoClasses && property === "transform" && Array.isArray(raw)) raw = transformsToString(raw);
720
770
  if (typeof raw === "string" && property in borderTargets) {
721
- emitBorder(state, property, raw, condition, merge, originalValue, contextOnly);
771
+ emitBorder(state, property, raw, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
722
772
  return;
723
773
  }
724
774
  if (typeof raw === "string" && property === "textDecoration") {
725
- emitTextDecoration(state, raw, condition, merge, originalValue, contextOnly);
775
+ emitTextDecoration(state, raw, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
726
776
  return;
727
777
  }
728
778
  if (typeof raw === "string" && property === "background") {
729
779
  const parts = splitComponents(raw);
730
780
  if (parts.length === 1 && !/^(?:url|image-set|.*gradient)\(/i.test(parts[0])) {
731
- emitResolved(state, "backgroundColor", parts[0], condition, merge, originalValue, contextOnly);
781
+ emitResolved(state, "backgroundColor", parts[0], condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
732
782
  return;
733
783
  }
734
784
  if (!isWeb) {
@@ -741,18 +791,18 @@ function emitValue(state, property, raw, condition, merge, originalValue, contex
741
791
  if ((!isWeb || !state.flatShouldDoClasses) && typeof value2 === "string" && !value2.startsWith(THEME_REF_PREFIX)) {
742
792
  if (property === "rotate" && !/^-?(?:\d+\.?\d*|\.\d+)(?:deg|rad)$/i.test(value2)) {
743
793
  if (process.env.NODE_ENV === "development") warnOnce(`native transform "${property}" cannot represent "${value2}"; dropping it`);
744
- if (condition?.active && state.flatTransforms) delete state.flatTransforms[property];
794
+ if (condition & 1 && state.flatTransforms) delete state.flatTransforms[property];
745
795
  return;
746
796
  }
747
797
  if (/^-?(?:\d+\.?\d*|\.\d+)(?:px|dp)$/i.test(value2)) value2 = Number.parseFloat(value2);
748
798
  else if (Number.isFinite(Number(value2))) value2 = Number(value2);
749
799
  }
750
- emitTransform(state, property, value2, condition, merge, originalValue, contextOnly);
800
+ emitTransform(state, property, value2, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
751
801
  return;
752
802
  }
753
803
  if (isWeb && !state.flatShouldDoClasses && !condition && property === "borderRadius") {
754
- if (typeof raw === "string") emitResolved(state, property, raw, condition, merge, originalValue, contextOnly);
755
- else emitProperty(state, property, raw, condition, merge, originalValue, contextOnly);
804
+ if (typeof raw === "string") emitResolved(state, property, raw, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
805
+ else emitProperty(state, property, raw, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
756
806
  return;
757
807
  }
758
808
  let value = raw;
@@ -768,7 +818,7 @@ function emitValue(state, property, raw, condition, merge, originalValue, contex
768
818
  if (!isWeb && property === "fontVariant" && typeof value === "string") value = value.split(/[,\s]+/).filter(Boolean);
769
819
  const expanded = state.styleProps.noExpand ? null : expandStyle(property, value, state.conf.settings.styleCompat || "web");
770
820
  if (!expanded) {
771
- emitProperty(state, property, value, condition, merge, originalValue, contextOnly);
821
+ emitProperty(state, property, value, condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
772
822
  return;
773
823
  }
774
824
  if (typeof raw === "string" && expanded.length > 1) {
@@ -776,123 +826,48 @@ function emitValue(state, property, raw, condition, merge, originalValue, contex
776
826
  if (parts.length > 0 && parts.length <= (expanded.length === 4 ? 4 : 2)) {
777
827
  for (let index = 0; index < expanded.length; index++) {
778
828
  const partIndex = index === 0 || parts.length === 1 ? 0 : index === 1 || index === 3 && parts.length < 4 ? 1 : index === 2 && parts.length < 3 ? 0 : index;
779
- emitResolved(state, expanded[index][0], parts[partIndex], condition, merge, originalValue, contextOnly);
829
+ emitResolved(state, expanded[index][0], parts[partIndex], condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
780
830
  }
781
831
  return;
782
832
  }
783
833
  }
784
- for (let index = 0; index < expanded.length; index++) emitProperty(state, expanded[index][0], expanded[index][1], condition, merge, originalValue, contextOnly);
785
- }
786
- function emitSegment(state, property, source, start, end, condition, merge, originalValue, contextOnly) {
787
- while (start < end && source.charCodeAt(start) <= 32) start++;
788
- while (end > start && source.charCodeAt(end - 1) <= 32) end--;
789
- if (start === end) return false;
790
- if (!condition || condition.emit && (condition.active || isWeb && state.flatShouldDoClasses || !isWeb && condition.theme && supportsDynamicColorIOS && isColorStyleKey(property))) {
791
- const value = source.slice(start, end);
792
- emitValue(state, property, value, condition, merge, value, contextOnly);
793
- }
794
- return true;
834
+ for (let index = 0; index < expanded.length; index++) emitProperty(state, expanded[index][0], expanded[index][1], condition, conditionKey, conditionWrappers, conditionSelector, conditionTheme, merge, originalValue, contextOnly);
795
835
  }
796
836
  function contributeStyleString(state, property, source, merge, originalValue, contextOnly = false) {
797
- if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled") {
798
- emitValue(state, property, source, null, merge, originalValue ?? source, contextOnly);
799
- return true;
800
- }
801
837
  if (isWeb && source.indexOf(":") !== -1 && (webShadowParts.has(property) || legacyTransformParts.has(property))) {
802
838
  if (process.env.NODE_ENV === "development") warnOnce(`conditional "${property}" needs its composite property; dropping it`);
803
839
  return true;
804
840
  }
805
841
  if (source.indexOf(":") === -1) {
806
- emitValue(state, property, source, null, merge, originalValue ?? source, contextOnly);
842
+ emitValue(state, property, source, 0, "", void 0, "", "", merge, originalValue ?? source, contextOnly);
807
843
  return true;
808
844
  }
809
- const conditions = [];
810
- const starts = [];
811
- const ends = [];
812
- let pending = null;
813
- let refused = "";
814
- let lifecycle = false;
815
- scanFlatValue(source, {
816
- segment(start, end, isBase) {
817
- if (start === end) {
818
- if (!isBase && !refused) refused = "a conditional clause has no value";
819
- return;
820
- }
821
- conditions.push(pending);
822
- starts.push(start);
823
- ends.push(end);
824
- },
825
- chain(start, end) {
826
- if (refused) return false;
827
- const next = getCondition(state, source.slice(start, end));
828
- if (!next) {
829
- refused = `unknown modifier "${source.slice(start, end)}"`;
830
- return false;
831
- }
832
- if (process.env.NODE_ENV === "development" && next.unsupportedState) warnOnce(`${property}: "${next.unsupportedState}:" has no native component-state source; dropping the clause`);
833
- pending = next;
834
- lifecycle ||= !!(next.enter || next.exit);
835
- return true;
836
- },
837
- error(code, index) {
838
- if (refused) return;
839
- refused = code === "invalid-character" ? `"${source[index]}" would end the declaration or rule` : code === "unterminated-string" ? "an unterminated string" : code === "unterminated-comment" ? "an unterminated \"/*\" comment" : code === "stray-comment-close" ? "a stray \"*/\"" : "an unterminated \"(\"";
840
- }
841
- });
842
- if (refused) {
843
- if (property === "aspectRatio") {
844
- emitValue(state, property, source, null, merge, originalValue ?? source, contextOnly);
845
- return true;
846
- }
847
- if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, refused);
848
- return true;
849
- }
850
- let hasBase = false;
851
- let lastPayloadStart = 0;
852
- for (let index = 0; index < conditions.length; index++) {
853
- const condition = conditions[index];
854
- lastPayloadStart = starts[index];
855
- const emitted = emitSegment(state, property, source, starts[index], ends[index], condition, merge, originalValue, contextOnly);
856
- if (!condition && emitted) hasBase = true;
857
- }
858
- if (process.env.NODE_ENV === "development" && !hasBase && conditions.length > 0 && (property in tokenCategories.color || property in tokenCategoryByProperty) && splitComponents(source.slice(lastPayloadStart)).length > 1) warnOnce(`${property}="${source}" has multiple values after its first conditional. Write the base value before the first conditional.`);
859
- if ((!isWeb || !state.flatShouldDoClasses) && lifecycle && !hasBase) {
860
- const value = property === "opacity" ? 1 : property === "scale" || property === "scaleX" || property === "scaleY" ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
861
- if (value !== null) emitValue(state, property, value, null, merge, value, contextOnly);
862
- }
845
+ scanFlatValue(source, directStyleHandler, state, property, merge, originalValue, contextOnly);
863
846
  return true;
864
847
  }
865
848
  function contributeFrontendValue(state, property, value, merge, contextOnly = false) {
866
- if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled") return false;
867
- if (value.base !== null) emitValue(state, property, value.base, null, merge, value.base, contextOnly);
849
+ if (value.base !== null) emitValue(state, property, value.base, 0, "", void 0, "", "", merge, value.base, contextOnly);
868
850
  for (const clause of value.clauses) {
869
- const condition = getCondition(state, clause.modifiers.join(":"));
870
- if (condition && condition.emit && (condition.active || isWeb && state.flatShouldDoClasses)) emitValue(state, property, clause.payload, condition, merge, clause.payload, contextOnly);
851
+ const source = clause.modifiers.join(":");
852
+ resolveClauseChain(state, source, 0, source.length, property, clause.payload, merge, clause.payload, contextOnly);
871
853
  }
872
854
  return true;
873
855
  }
874
856
  function contributeVariantClauseValue(state, property, value, conditionSource, merge, originalValue, contextOnly = false) {
875
- if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled") return;
876
- const condition = getCondition(state, conditionSource);
877
- if (!condition) {
878
- if (process.env.NODE_ENV === "development") warnRefusedValue(property, value, `unknown modifier "${conditionSource}"`);
879
- return;
880
- }
881
- if (process.env.NODE_ENV === "development" && condition.unsupportedState) warnOnce(`${property}: "${condition.unsupportedState}:" has no native component-state source; dropping the clause`);
882
- if (condition.emit && (condition.active || isWeb && state.flatShouldDoClasses)) emitValue(state, property, value, condition, merge, originalValue, contextOnly);
857
+ resolveClauseChain(state, conditionSource, 0, conditionSource.length, property, value, merge, originalValue, contextOnly, -1, -1, 2);
883
858
  }
884
859
  function contributeStyleValue(state, property, value, merge, originalValue, contextOnly = false) {
885
- if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && value === "safe" && isSafeAreaKey(property)) {
860
+ if (value === "safe" && isSafeAreaKey(property)) {
886
861
  const expanded = expandSafeAreaValue(property);
887
862
  if (expanded) {
888
863
  state.flatUsesSafeArea = true;
889
- for (const [key, resolved] of expanded) emitValue(state, key, resolved, null, merge, originalValue ?? value, contextOnly);
864
+ for (const [key, resolved] of expanded) emitValue(state, key, resolved, 0, "", void 0, "", "", merge, originalValue ?? value, contextOnly);
890
865
  return true;
891
866
  }
892
867
  }
893
868
  if (typeof value === "string") return contributeStyleString(state, property, value, merge, originalValue, contextOnly);
894
869
  if (value != null) {
895
- emitValue(state, property, value, null, merge, originalValue ?? value, contextOnly);
870
+ emitValue(state, property, value, 0, "", void 0, "", "", merge, originalValue ?? value, contextOnly);
896
871
  return true;
897
872
  }
898
873
  return false;
@@ -904,5 +879,5 @@ function clearDirectStyle(state, property) {
904
879
  delete state.classNames[atomicKey];
905
880
  }
906
881
 
907
- export { clearDirectStyle, contributeFrontendValue, contributeStyleString, contributeStyleValue, contributeVariantClauseValue, directStyleSignature, flushDirectStyles, getCondition, getDirectDynamicThemeAccess, platformMatches };
882
+ export { clearDirectStyle, contributeFrontendValue, contributeStyleString, contributeStyleValue, contributeVariantClauseValue, directStyleSignature, flushDirectStyles, getDirectDynamicThemeAccess, platformMatches, resolveClauseChain };
908
883
  //# sourceMappingURL=directStyle.mjs.map