@tamagui/web 3.0.0-beta.661.1 → 3.0.0-beta.719.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 (825) 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 +0 -1
  38. package/dist/cjs/createComponent.native.cjs +0 -1
  39. package/dist/cjs/createComponent.native.js +0 -1
  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 +2 -3
  54. package/dist/cjs/createTamagui.native.cjs +2 -3
  55. package/dist/cjs/createTamagui.native.js +2 -3
  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 +257 -283
  146. package/dist/cjs/helpers/directStyle.native.cjs +273 -305
  147. package/dist/cjs/helpers/directStyle.native.js +273 -305
  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 +3 -1
  162. package/dist/cjs/helpers/formatDiagnostic.native.cjs +3 -1
  163. package/dist/cjs/helpers/formatDiagnostic.native.js +3 -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 +0 -8
  194. package/dist/cjs/helpers/getSplitStyles.native.cjs +0 -8
  195. package/dist/cjs/helpers/getSplitStyles.native.js +0 -8
  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 +0 -1
  258. package/dist/cjs/helpers/mergeVariants.native.cjs +0 -1
  259. package/dist/cjs/helpers/mergeVariants.native.js +0 -1
  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 +28 -37
  320. package/dist/cjs/helpers/propMapper.native.cjs +28 -37
  321. package/dist/cjs/helpers/propMapper.native.js +28 -37
  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 +0 -1
  468. package/dist/cjs/hooks/useProps.native.cjs +0 -1
  469. package/dist/cjs/hooks/useProps.native.js +0 -1
  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 +0 -1
  516. package/dist/cjs/internal-runtime.native.cjs +0 -1
  517. package/dist/cjs/internal-runtime.native.js +0 -1
  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.map +1 -1
  609. package/dist/esm/createComponent.native.js.map +1 -1
  610. package/dist/esm/createFont.mjs.map +1 -1
  611. package/dist/esm/createFont.native.js.map +1 -1
  612. package/dist/esm/createTamagui.mjs +1 -1
  613. package/dist/esm/createTamagui.mjs.map +1 -1
  614. package/dist/esm/createTamagui.native.js +1 -1
  615. package/dist/esm/createTamagui.native.js.map +1 -1
  616. package/dist/esm/createVariable.mjs.map +1 -1
  617. package/dist/esm/createVariable.native.js.map +1 -1
  618. package/dist/esm/dom/primitives.native.js +1 -1
  619. package/dist/esm/dom/primitives.native.js.map +1 -1
  620. package/dist/esm/eventHandling.native.js.map +1 -1
  621. package/dist/esm/helpers/configVariables.mjs +60 -0
  622. package/dist/esm/helpers/configVariables.mjs.map +1 -0
  623. package/dist/esm/helpers/configVariables.native.js +65 -0
  624. package/dist/esm/helpers/configVariables.native.js.map +1 -0
  625. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  626. package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
  627. package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
  628. package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
  629. package/dist/esm/helpers/defaultAnimationDriver.mjs +1 -5
  630. package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
  631. package/dist/esm/helpers/defaultAnimationDriver.native.js +0 -12
  632. package/dist/esm/helpers/defaultAnimationDriver.native.js.map +1 -1
  633. package/dist/esm/helpers/directStyle.mjs +257 -282
  634. package/dist/esm/helpers/directStyle.mjs.map +1 -1
  635. package/dist/esm/helpers/directStyle.native.js +273 -304
  636. package/dist/esm/helpers/directStyle.native.js.map +1 -1
  637. package/dist/esm/helpers/expandStyle.mjs.map +1 -1
  638. package/dist/esm/helpers/expandStyle.native.js.map +1 -1
  639. package/dist/esm/helpers/expandStyles.native.js.map +1 -1
  640. package/dist/esm/helpers/extractPseudoState.mjs.map +1 -1
  641. package/dist/esm/helpers/formatDiagnostic.mjs +3 -0
  642. package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
  643. package/dist/esm/helpers/formatDiagnostic.native.js +3 -0
  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 +0 -7
  656. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  657. package/dist/esm/helpers/getSplitStyles.native.js +0 -7
  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/nativeStyleEngine.mjs.map +1 -1
  672. package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
  673. package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
  674. package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
  675. package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -1
  676. package/dist/esm/helpers/parseNativeTransform.native.js.map +1 -1
  677. package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
  678. package/dist/esm/helpers/propMapper.mjs +29 -37
  679. package/dist/esm/helpers/propMapper.mjs.map +1 -1
  680. package/dist/esm/helpers/propMapper.native.js +29 -37
  681. package/dist/esm/helpers/propMapper.native.js.map +1 -1
  682. package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
  683. package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
  684. package/dist/esm/helpers/registerCSSVariable.mjs.map +1 -1
  685. package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
  686. package/dist/esm/helpers/resolveSafeAreaVariable.native.js.map +1 -1
  687. package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
  688. package/dist/esm/helpers/themeRef.mjs.map +1 -1
  689. package/dist/esm/helpers/themeRef.native.js.map +1 -1
  690. package/dist/esm/helpers/themeUpdateState.mjs +4 -0
  691. package/dist/esm/helpers/themeUpdateState.mjs.map +1 -0
  692. package/dist/esm/helpers/themeUpdateState.native.js +4 -0
  693. package/dist/esm/helpers/themeUpdateState.native.js.map +1 -0
  694. package/dist/esm/helpers/timer.mjs.map +1 -1
  695. package/dist/esm/helpers/timer.native.js.map +1 -1
  696. package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
  697. package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
  698. package/dist/esm/helpers/transformsToString.native.js.map +1 -1
  699. package/dist/esm/helpers/useRenderElement.mjs.map +1 -1
  700. package/dist/esm/helpers/useRenderElement.native.js.map +1 -1
  701. package/dist/esm/helpers/variableValue.mjs +44 -0
  702. package/dist/esm/helpers/variableValue.mjs.map +1 -0
  703. package/dist/esm/helpers/variableValue.native.js +64 -0
  704. package/dist/esm/helpers/variableValue.native.js.map +1 -0
  705. package/dist/esm/helpers/variables.mjs +96 -136
  706. package/dist/esm/helpers/variables.mjs.map +1 -1
  707. package/dist/esm/helpers/variables.native.js +98 -158
  708. package/dist/esm/helpers/variables.native.js.map +1 -1
  709. package/dist/esm/helpers/warnOnce.mjs +1 -1
  710. package/dist/esm/helpers/warnOnce.mjs.map +1 -1
  711. package/dist/esm/helpers/warnOnce.native.js +1 -1
  712. package/dist/esm/helpers/warnOnce.native.js.map +1 -1
  713. package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
  714. package/dist/esm/hooks/getThemeProxied.native.js +2 -2
  715. package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
  716. package/dist/esm/hooks/useAnimationDriver.mjs +14 -8
  717. package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
  718. package/dist/esm/hooks/useAnimationDriver.native.js +14 -8
  719. package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
  720. package/dist/esm/hooks/useComponentState.mjs +27 -24
  721. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  722. package/dist/esm/hooks/useComponentState.native.js +28 -24
  723. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  724. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  725. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  726. package/dist/esm/hooks/usePortalThemeState.mjs +2 -2
  727. package/dist/esm/hooks/usePortalThemeState.mjs.map +1 -1
  728. package/dist/esm/hooks/usePortalThemeState.native.js +2 -2
  729. package/dist/esm/hooks/usePortalThemeState.native.js.map +1 -1
  730. package/dist/esm/hooks/useProps.mjs.map +1 -1
  731. package/dist/esm/hooks/useProps.native.js.map +1 -1
  732. package/dist/esm/hooks/useThemeName.mjs.map +1 -1
  733. package/dist/esm/hooks/useThemeState.mjs +12 -15
  734. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  735. package/dist/esm/hooks/useThemeState.native.js +14 -17
  736. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  737. package/dist/esm/index.js +0 -2
  738. package/dist/esm/index.mjs +0 -2
  739. package/dist/esm/index.native.js +0 -2
  740. package/dist/esm/insertFont.mjs.map +1 -1
  741. package/dist/esm/insertFont.native.js.map +1 -1
  742. package/dist/esm/styled.mjs.map +1 -1
  743. package/dist/esm/styled.native.js.map +1 -1
  744. package/dist/esm/theme-update.mjs +3 -0
  745. package/dist/esm/theme-update.native.js +3 -0
  746. package/dist/esm/views/FontLanguage.mjs.map +1 -1
  747. package/dist/esm/views/SafeAreaTracker.native.js.map +1 -1
  748. package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
  749. package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
  750. package/dist/esm/views/Theme.mjs +8 -33
  751. package/dist/esm/views/Theme.mjs.map +1 -1
  752. package/dist/esm/views/Theme.native.js +9 -19
  753. package/dist/esm/views/Theme.native.js.map +1 -1
  754. package/dist/esm/views/ThemeUpdate.mjs +54 -0
  755. package/dist/esm/views/ThemeUpdate.mjs.map +1 -0
  756. package/dist/esm/views/ThemeUpdate.native.js +53 -0
  757. package/dist/esm/views/ThemeUpdate.native.js.map +1 -0
  758. package/package.json +26 -17
  759. package/src/config.ts +7 -0
  760. package/src/createTamagui.ts +2 -2
  761. package/src/dom/primitives.native.tsx +1 -1
  762. package/src/helpers/configVariables.ts +64 -0
  763. package/src/helpers/defaultAnimationDriver.tsx +0 -4
  764. package/src/helpers/directStyle.ts +875 -465
  765. package/src/helpers/formatDiagnostic.ts +3 -0
  766. package/src/helpers/getCSSStylesAtomic.ts +5 -1
  767. package/src/helpers/getSplitStyles.tsx +0 -15
  768. package/src/helpers/grammarConfig.ts +82 -12
  769. package/src/helpers/nativeTransitionTarget.native.ts +1 -1
  770. package/src/helpers/nativeTransitionTarget.ts +1 -1
  771. package/src/helpers/propMapper.ts +41 -43
  772. package/src/helpers/themeUpdateState.ts +27 -0
  773. package/src/helpers/variableValue.ts +45 -0
  774. package/src/helpers/variables.ts +149 -195
  775. package/src/helpers/warnOnce.ts +2 -2
  776. package/src/hooks/getThemeProxied.ts +8 -5
  777. package/src/hooks/useAnimationDriver.ts +26 -11
  778. package/src/hooks/useComponentState.ts +44 -31
  779. package/src/hooks/usePortalThemeState.ts +8 -8
  780. package/src/hooks/useThemeState.ts +16 -31
  781. package/src/index.ts +0 -1
  782. package/src/theme-update.ts +2 -0
  783. package/src/types.tsx +13 -21
  784. package/src/views/Theme.tsx +18 -77
  785. package/src/views/ThemeUpdate.tsx +88 -0
  786. package/types/config.d.ts.map +1 -1
  787. package/types/helpers/configVariables.d.ts +3 -0
  788. package/types/helpers/configVariables.d.ts.map +1 -0
  789. package/types/helpers/defaultAnimationDriver.d.ts.map +1 -1
  790. package/types/helpers/directStyle.d.ts +2 -23
  791. package/types/helpers/directStyle.d.ts.map +1 -1
  792. package/types/helpers/formatDiagnostic.d.ts.map +1 -1
  793. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  794. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  795. package/types/helpers/grammarConfig.d.ts +9 -0
  796. package/types/helpers/grammarConfig.d.ts.map +1 -1
  797. package/types/helpers/nativeTransitionTarget.d.ts +1 -1
  798. package/types/helpers/nativeTransitionTarget.d.ts.map +1 -1
  799. package/types/helpers/nativeTransitionTarget.native.d.ts +1 -1
  800. package/types/helpers/nativeTransitionTarget.native.d.ts.map +1 -1
  801. package/types/helpers/propMapper.d.ts.map +1 -1
  802. package/types/helpers/themeUpdateState.d.ts +23 -0
  803. package/types/helpers/themeUpdateState.d.ts.map +1 -0
  804. package/types/helpers/variableValue.d.ts +4 -0
  805. package/types/helpers/variableValue.d.ts.map +1 -0
  806. package/types/helpers/variables.d.ts +7 -24
  807. package/types/helpers/variables.d.ts.map +1 -1
  808. package/types/helpers/warnOnce.d.ts +1 -1
  809. package/types/hooks/getThemeProxied.d.ts.map +1 -1
  810. package/types/hooks/useAnimationDriver.d.ts.map +1 -1
  811. package/types/hooks/useComponentState.d.ts.map +1 -1
  812. package/types/hooks/usePortalThemeState.d.ts +5 -5
  813. package/types/hooks/usePortalThemeState.d.ts.map +1 -1
  814. package/types/hooks/useThemeState.d.ts +2 -5
  815. package/types/hooks/useThemeState.d.ts.map +1 -1
  816. package/types/index.d.ts +0 -1
  817. package/types/index.d.ts.map +1 -1
  818. package/types/theme-update.d.ts +3 -0
  819. package/types/theme-update.d.ts.map +1 -0
  820. package/types/types.d.ts +6 -17
  821. package/types/types.d.ts.map +1 -1
  822. package/types/views/Theme.d.ts +2 -15
  823. package/types/views/Theme.d.ts.map +1 -1
  824. package/types/views/ThemeUpdate.d.ts +15 -0
  825. package/types/views/ThemeUpdate.d.ts.map +1 -0
@@ -13,17 +13,17 @@ import {
13
13
  type StyleObject,
14
14
  } from '@tamagui/helpers'
15
15
  import {
16
- canonicalClauseModifier,
17
- clauseConditionSetKey,
18
- clauseSubjectClassRepetitions,
19
- compareClausePrecedence,
20
- createClausePrecedenceOrder,
21
- getClausePrecedenceKeyFromKinds,
22
- isRootThemeName,
16
+ canonicalStateModifierNames,
17
+ isContainerSizeQueryText,
18
+ isModifierName,
19
+ modifierKindMedia,
20
+ modifierKindPlatform,
21
+ modifierKindState,
22
+ modifierKindTheme,
23
23
  scanFlatValue,
24
+ stateModifierSelectors,
24
25
  type ClausePrecedenceKey,
25
- type ClausePrecedenceOrder,
26
- type ModifierKind,
26
+ type FlatValueHandler,
27
27
  type ParsedValue,
28
28
  } from '@tamagui/style-grammar/runtime'
29
29
 
@@ -33,9 +33,9 @@ import type { GetStyleState } from '../types'
33
33
  import { warnOnce, warnRefusedValue } from './warnOnce'
34
34
  import { expandStyle } from './expandStyle'
35
35
  import { getCSSStyleAtomic } from './getCSSStylesAtomic'
36
+ import { getConfigRevisionState } from './grammarConfig'
36
37
  import { isColorStyleKey } from './getDynamicVal'
37
38
  import { shouldInsertStyleRules, updateRules } from './insertStyleRule'
38
- import { mediaObjectToString } from './mediaObjectToString'
39
39
  import { normalizeColor } from './normalizeColor'
40
40
  import { parseNativeStyle } from './parseNativeStyle.native'
41
41
  import { parseNativeTransform } from './parseNativeTransform.native'
@@ -55,20 +55,6 @@ export type MergeStyle = (
55
55
  originalValue?: any
56
56
  ) => void
57
57
 
58
- type Condition = {
59
- key: string
60
- active: boolean
61
- emit: boolean
62
- selector: string
63
- wrappers?: string[]
64
- enter?: true
65
- exit?: true
66
- theme?: string
67
- precedence: ClausePrecedenceKey
68
- classRepetitions: number
69
- unsupportedState?: string
70
- }
71
-
72
58
  type DirectAtomic = {
73
59
  baseRules: number
74
60
  conditions?: Record<
@@ -95,23 +81,204 @@ type DirectState = GetStyleState & {
95
81
  flatWebShadow?: Record<string, any>
96
82
  }
97
83
 
98
- const baseClausePrecedence = [0, 0, 0, 0] as const
99
-
100
- // keyed by the CANONICAL modifier spelling: `canonicalClauseModifier` has
101
- // already folded `active`, `pressed`, `starting` and `ending` into their one
102
- // spelling before anything looks in here
103
- const stateSelectors: Record<string, string> = {
104
- hover: ':hover',
105
- press: ':active',
106
- focus: ':focus',
107
- 'focus-visible': ':focus-visible',
108
- 'focus-within': ':focus-within',
109
- disabled: '[aria-disabled]',
110
- open: '[data-state="open"]',
111
- checked: '[data-state="checked"]',
112
- highlighted: '[data-highlighted]',
113
- selected: '[data-state="active"]',
114
- invalid: '[aria-invalid="true"]',
84
+ const directStyleHandler: FlatValueHandler<GetStyleState> = {
85
+ segment(
86
+ state,
87
+ start,
88
+ end,
89
+ isBase,
90
+ valid,
91
+ source,
92
+ chainStart,
93
+ chainEnd,
94
+ chainValid,
95
+ chainCount,
96
+ _result,
97
+ failure,
98
+ failureIndex,
99
+ property,
100
+ merge,
101
+ originalValue,
102
+ contextOnly
103
+ ) {
104
+ if (isBase) {
105
+ if (start === end) return
106
+ if (!valid) {
107
+ if (process.env.NODE_ENV === 'development') {
108
+ warnRefusedValue(
109
+ property,
110
+ source,
111
+ failure === 'invalid-character'
112
+ ? `"${source[failureIndex]}" would end the declaration or rule`
113
+ : failure === 'unterminated-string'
114
+ ? 'an unterminated string'
115
+ : failure === 'unterminated-comment'
116
+ ? 'an unterminated "/*" comment'
117
+ : failure === 'stray-comment-close'
118
+ ? 'a stray "*/"'
119
+ : 'an unterminated "("'
120
+ )
121
+ }
122
+ return
123
+ }
124
+ const value = source.slice(start, end)
125
+ emitValue(
126
+ state,
127
+ property,
128
+ value,
129
+ 0,
130
+ '',
131
+ undefined,
132
+ '',
133
+ '',
134
+ merge,
135
+ value,
136
+ contextOnly
137
+ )
138
+ return 5
139
+ }
140
+ if (!chainValid) {
141
+ if (process.env.NODE_ENV === 'development') {
142
+ warnRefusedValue(
143
+ property,
144
+ source,
145
+ failure === 'invalid-character'
146
+ ? `"${source[failureIndex]}" would end the declaration or rule`
147
+ : failure === 'unterminated-string'
148
+ ? 'an unterminated string'
149
+ : failure === 'unterminated-comment'
150
+ ? 'an unterminated "/*" comment'
151
+ : failure === 'stray-comment-close'
152
+ ? 'a stray "*/"'
153
+ : 'an unterminated "("'
154
+ )
155
+ }
156
+ return
157
+ }
158
+ if (start === end) {
159
+ if (process.env.NODE_ENV === 'development') {
160
+ warnRefusedValue(property, source, 'a conditional clause has no value')
161
+ }
162
+ return
163
+ }
164
+ if (property === 'aspectRatio' && chainCount === 1) {
165
+ const left = Number(source.slice(chainStart, chainEnd))
166
+ const right = Number(source.slice(start, end))
167
+ if (
168
+ chainStart < chainEnd &&
169
+ Number.isFinite(left) &&
170
+ left > 0 &&
171
+ Number.isFinite(right) &&
172
+ right > 0
173
+ ) {
174
+ return 12
175
+ }
176
+ }
177
+ const condition = resolveClauseChain(
178
+ state,
179
+ source,
180
+ chainStart,
181
+ chainEnd,
182
+ property,
183
+ undefined,
184
+ valid ? merge : undefined,
185
+ undefined,
186
+ contextOnly,
187
+ start,
188
+ end,
189
+ 1
190
+ )
191
+ if (!condition) return
192
+ if (!valid) {
193
+ if (process.env.NODE_ENV === 'development') {
194
+ warnRefusedValue(
195
+ property,
196
+ source,
197
+ failure === 'invalid-character'
198
+ ? `"${source[failureIndex]}" would end the declaration or rule`
199
+ : failure === 'unterminated-string'
200
+ ? 'an unterminated string'
201
+ : failure === 'unterminated-comment'
202
+ ? 'an unterminated "/*" comment'
203
+ : failure === 'stray-comment-close'
204
+ ? 'a stray "*/"'
205
+ : 'an unterminated "("'
206
+ )
207
+ }
208
+ return
209
+ }
210
+ return 4 | (condition & 12 ? 2 : 0)
211
+ },
212
+ chain() {
213
+ return true
214
+ },
215
+ end(
216
+ state,
217
+ source,
218
+ result,
219
+ lastPayloadStart,
220
+ chainCount,
221
+ property,
222
+ merge,
223
+ originalValue,
224
+ contextOnly
225
+ ) {
226
+ let hasBase = !!(result & 1)
227
+ if (result & 8 && chainCount === 1) {
228
+ emitValue(
229
+ state,
230
+ property,
231
+ source,
232
+ 0,
233
+ '',
234
+ undefined,
235
+ '',
236
+ '',
237
+ merge,
238
+ originalValue ?? source,
239
+ contextOnly
240
+ )
241
+ hasBase = true
242
+ }
243
+ if (
244
+ process.env.NODE_ENV === 'development' &&
245
+ !hasBase &&
246
+ result & 4 &&
247
+ (property in tokenCategories.color || property in tokenCategoryByProperty) &&
248
+ splitComponents(source.slice(lastPayloadStart)).length > 1
249
+ ) {
250
+ warnOnce(
251
+ `${property}="${source}" has multiple values after its first conditional. Write the base value before the first conditional.`
252
+ )
253
+ }
254
+ if ((!isWeb || !state.flatShouldDoClasses) && result & 2 && !hasBase) {
255
+ const value =
256
+ property === 'opacity'
257
+ ? 1
258
+ : property === 'scale' || property === 'scaleX' || property === 'scaleY'
259
+ ? 1
260
+ : property === 'rotate'
261
+ ? '0deg'
262
+ : property === 'x' || property === 'y'
263
+ ? 0
264
+ : null
265
+ if (value !== null) {
266
+ emitValue(
267
+ state,
268
+ property,
269
+ value,
270
+ 0,
271
+ '',
272
+ undefined,
273
+ '',
274
+ '',
275
+ merge,
276
+ value,
277
+ contextOnly
278
+ )
279
+ }
280
+ }
281
+ },
115
282
  }
116
283
 
117
284
  const legacyTransformParts = new Set([
@@ -205,41 +372,6 @@ const borderStyleDefaults: Record<string, string> = {
205
372
  borderLeftWidth: 'borderLeftStyle',
206
373
  }
207
374
 
208
- const mediaQueries = new WeakMap<object, Record<string, string>>()
209
- const clausePrecedenceOrders = new WeakMap<object, ClausePrecedenceOrder>()
210
- function queryFor(state: GetStyleState, name: string): string | undefined {
211
- let queries = mediaQueries.get(state.conf)
212
- if (!queries) {
213
- queries = {}
214
- const media = state.conf.media || {}
215
- for (const key in media) queries[key] = mediaObjectToString(media[key])
216
- mediaQueries.set(state.conf, queries)
217
- }
218
- return queries[name]
219
- }
220
-
221
- function precedenceOrderFor(state: GetStyleState): ClausePrecedenceOrder {
222
- let order = clausePrecedenceOrders.get(state.conf)
223
- if (!order) {
224
- order = createClausePrecedenceOrder(state.conf.media)
225
- clausePrecedenceOrders.set(state.conf, order)
226
- }
227
- return order
228
- }
229
-
230
- function stateIsActive(state: GetStyleState, name: string): boolean {
231
- const component = state.componentState
232
- if (name === 'hover') return !!component.hover
233
- if (name === 'press') return !!(component.press || component.pressIn)
234
- if (name === 'focus') return !!component.focus
235
- if (name === 'focus-visible') return !!component.focusVisible
236
- if (name === 'focus-within') return !!component.focusWithin
237
- if (name === 'disabled') return !!(component.disabled || state.props.disabled)
238
- if (name === 'enter') return !!component.unmounted
239
- if (name === 'exit') return !!state.styleProps.isExiting
240
- return false
241
- }
242
-
243
375
  export function platformMatches(name: string): boolean {
244
376
  if (name === 'web') return isWeb
245
377
  if (name === 'native') return !isWeb
@@ -250,164 +382,278 @@ export function platformMatches(name: string): boolean {
250
382
  return name === 'tv' && isTV
251
383
  }
252
384
 
253
- function groupCondition(state: GetStyleState, modifier: string, out: Condition) {
254
- const slash = modifier.indexOf('/')
255
- const stateName = modifier.slice(6, slash === -1 ? undefined : slash)
256
- const groupName = slash === -1 ? 'true' : modifier.slice(slash + 1)
257
- const selector = stateSelectors[stateName]
258
- if (!selector || !groupName) return false
259
- out.selector += `:where(.t_group_${groupName}${selector} *)`
260
- if (stateName === 'hover') (out.wrappers ||= []).push('@media (hover: hover)')
261
- const component = state.componentState.group?.[groupName]
262
- const context = state.flatGroupContext?.[groupName]
263
- out.active &&= !!(component?.pseudo ?? context?.state.pseudo)?.[stateName]
264
- ;(state.flatGroupKeys ||= new Set()).add(groupName)
265
- return true
266
- }
267
-
268
- function containerCondition(state: GetStyleState, modifier: string, out: Condition) {
269
- const slash = modifier.indexOf('/')
270
- const size = modifier.slice(1, slash === -1 ? undefined : slash)
271
- const name = slash === -1 ? null : modifier.slice(slash + 1)
272
- const query = queryFor(state, size)
273
- if (!query || (name !== null && !name)) return false
274
- const key = name === null ? '@' : `@${name}`
275
- ;(out.wrappers ||= []).push(
276
- name === null ? `@container ${query}` : `@container ${name} ${query}`
277
- )
278
- const component = state.componentState.group?.[key]
279
- const context = state.flatGroupContext?.[key]
280
- const active = component?.media?.[size]
281
- out.active &&=
282
- active === undefined
283
- ? !!(context?.state.layout && mediaKeyMatch(size, context.state.layout))
284
- : !!active
285
- ;(state.flatGroupKeys ||= new Set()).add(key)
286
- ;(state.flatGroupMedia ||= new Set()).add(size)
287
- return true
288
- }
289
-
290
- /**
291
- * Resolve one modifier chain against the live state, or null when the runtime
292
- * has no such modifier. Exported because the variant scanner in `propMapper`
293
- * has to refuse exactly the chains this one refuses; two answers to "is this a
294
- * modifier" is how the prop and variant paths came to disagree about how much
295
- * of a bad value survives.
296
- */
297
- export function getCondition(state: GetStyleState, source: string): Condition | null {
298
- const out = { key: '', active: true, emit: true, selector: '' } as Condition
299
- const canonical: string[] = []
300
- const kinds: ModifierKind[] = []
301
- const seenModifiers = new Set<string>()
385
+ export function resolveClauseChain(
386
+ state: GetStyleState,
387
+ source: string,
388
+ start: number,
389
+ end: number,
390
+ property?: string,
391
+ raw?: any,
392
+ merge?: MergeStyle,
393
+ originalValue?: any,
394
+ contextOnly = false,
395
+ payloadStart = -1,
396
+ payloadEnd = -1,
397
+ warning = 0
398
+ ): number {
399
+ const compiled = getConfigRevisionState(state.conf)
400
+ const sourceStart = start
401
+ let key = ''
402
+ let active = true
403
+ let emit = true
404
+ let selector = ''
405
+ let wrappers: string[] | undefined
406
+ let theme = ''
407
+ let enter = false
408
+ let exit = false
409
+ let unsupportedState = ''
410
+ let platformRank = 0
411
+ let depth = 0
412
+ let categoryRank = 0
413
+ let withinRank = 0
302
414
  let selfStateSpecificity = 0
303
- let start = 0
304
- for (let index = 0; index <= source.length; index++) {
305
- if (index !== source.length && source.charCodeAt(index) !== 58) continue
306
- let modifier = canonicalClauseModifier(source.slice(start, index))
415
+ for (let index = start; index <= end; index++) {
416
+ if (index !== end && source.charCodeAt(index) !== 58) continue
417
+ let modifier = source.slice(start, index)
307
418
  start = index + 1
308
- if (!modifier) return null
309
- if (seenModifiers.has(modifier)) continue
310
- seenModifiers.add(modifier)
311
-
312
- if (modifier.startsWith('group-')) {
313
- if (!groupCondition(state, modifier, out)) return null
314
- canonical.push(modifier)
315
- kinds.push('group')
316
- continue
317
- }
318
- if (modifier.charCodeAt(0) === 64) {
319
- if (!containerCondition(state, modifier, out)) return null
320
- canonical.push(modifier)
321
- kinds.push('container')
322
- continue
323
- }
324
- if (modifier in stateSelectors || modifier === 'enter' || modifier === 'exit') {
325
- canonical.push(modifier)
326
- kinds.push('state')
327
- selfStateSpecificity++
328
- const selector = stateSelectors[modifier]
419
+ let code = compiled.modifiers[modifier]
420
+ let kind = code & 7
421
+ let rank = code >> 3
422
+ let stateSelector = ''
423
+ let conditionStateName = ''
424
+ let groupName = ''
425
+ let containerSize = ''
426
+ let containerName = ''
427
+ let containerQuery = ''
428
+ if (kind === modifierKindState) {
429
+ modifier = canonicalStateModifierNames[rank]
430
+ stateSelector = stateModifierSelectors[rank]
431
+ } else if (!kind && modifier.startsWith('group-')) {
432
+ const slash = modifier.indexOf('/')
433
+ const authoredState = modifier.slice(6, slash === -1 ? undefined : slash)
434
+ code = compiled.modifiers[authoredState]
435
+ if ((code & 7) !== modifierKindState) kind = 0
436
+ else {
437
+ rank = code >> 3
438
+ groupName = slash === -1 ? 'true' : modifier.slice(slash + 1)
439
+ if (
440
+ rank === 6 ||
441
+ rank === 7 ||
442
+ (slash !== -1 && !isModifierName(groupName, 0, groupName.length))
443
+ ) {
444
+ kind = 0
445
+ } else {
446
+ kind = 5
447
+ const stateName = canonicalStateModifierNames[rank]
448
+ conditionStateName = stateName
449
+ stateSelector = stateModifierSelectors[rank]
450
+ modifier = `group-${stateName}${slash === -1 ? '' : modifier.slice(slash)}`
451
+ }
452
+ }
453
+ } else if (!kind && modifier.charCodeAt(0) === 64) {
454
+ const slash = modifier.indexOf('/')
455
+ containerSize = modifier.slice(1, slash === -1 ? undefined : slash)
456
+ containerName = slash === -1 ? '' : modifier.slice(slash + 1)
329
457
  if (
330
- !isWeb &&
331
- modifier !== 'hover' &&
332
- modifier !== 'press' &&
333
- modifier !== 'focus' &&
334
- modifier !== 'focus-visible' &&
335
- modifier !== 'focus-within' &&
336
- modifier !== 'disabled' &&
337
- modifier !== 'enter' &&
338
- modifier !== 'exit'
458
+ isModifierName(containerSize, 0, containerSize.length) &&
459
+ (slash === -1 || isModifierName(containerName, 0, containerName.length)) &&
460
+ ((code = compiled.modifiers[containerSize]) & 7) === modifierKindMedia &&
461
+ (containerQuery = compiled.mediaQueries[containerSize]) &&
462
+ isContainerSizeQueryText(containerQuery)
339
463
  ) {
340
- out.unsupportedState = modifier
464
+ kind = 6
465
+ rank = code >> 3
341
466
  }
342
- if (modifier === 'enter' || modifier === 'exit') {
343
- const cls = modifier === 'enter' ? '.t_unmounted' : '.t_exiting'
344
- out.selector += `:is(${cls}, ${cls} *)`
345
- out[modifier] = true
346
- } else if (selector) {
347
- out.selector += selector
467
+ }
468
+ if (!kind) {
469
+ if (warning && process.env.NODE_ENV === 'development') {
470
+ warnRefusedValue(
471
+ property!,
472
+ warning === 1 ? source : raw,
473
+ `unknown modifier "${source.slice(sourceStart, end)}"`
474
+ )
348
475
  }
349
- if (modifier === 'hover') (out.wrappers ||= []).push('@media (hover: hover)')
350
- out.active &&= stateIsActive(state, modifier)
351
- if (
352
- modifier === 'hover' ||
353
- modifier === 'press' ||
354
- modifier === 'focus' ||
355
- modifier === 'focus-visible' ||
356
- modifier === 'focus-within'
357
- ) {
358
- ;(state.flatStateKeys ||= new Set()).add(modifier)
476
+ return 0
477
+ }
478
+
479
+ let slotStart = 0
480
+ let duplicate = false
481
+ let inserted = !key
482
+ if (!key) key = modifier
483
+ else {
484
+ while (slotStart <= key.length) {
485
+ let slotEnd = key.indexOf(':', slotStart)
486
+ if (slotEnd === -1) slotEnd = key.length
487
+ let order = 0
488
+ const compareLength = Math.min(modifier.length, slotEnd - slotStart)
489
+ for (let offset = 0; offset < compareLength; offset++) {
490
+ order = modifier.charCodeAt(offset) - key.charCodeAt(slotStart + offset)
491
+ if (order) break
492
+ }
493
+ order ||= modifier.length - (slotEnd - slotStart)
494
+ if (!order) {
495
+ duplicate = true
496
+ break
497
+ }
498
+ if (order < 0) {
499
+ key = `${key.slice(0, slotStart)}${modifier}:${key.slice(slotStart)}`
500
+ inserted = true
501
+ break
502
+ }
503
+ if (slotEnd === key.length) break
504
+ slotStart = slotEnd + 1
359
505
  }
360
- continue
506
+ if (!duplicate && !inserted) key += `:${modifier}`
361
507
  }
362
- if (modifier in (state.conf.media || {})) {
363
- const query = queryFor(state, modifier)
364
- if (!query) return null
365
- canonical.push(modifier)
366
- kinds.push('media')
367
- ;(out.wrappers ||= []).push(`@media ${query}`)
368
- out.active &&= !!state.flatMediaState?.[modifier]
369
- ;(state.flatMediaKeys ||= new Set()).add(modifier)
508
+ if (duplicate) continue
509
+
510
+ if (kind === modifierKindPlatform) {
511
+ if (rank > platformRank) platformRank = rank
512
+ const matches = platformMatches(modifier)
513
+ active &&= matches
514
+ emit &&= matches
370
515
  continue
371
516
  }
372
- if (isRootThemeName(modifier) && modifier in (state.conf.themes || {})) {
373
- canonical.push(modifier)
374
- kinds.push('theme')
375
- out.theme = modifier
376
- out.selector += `:where(.t_${modifier}, .t_${modifier} *)`
377
- out.active &&=
517
+ depth++
518
+ const nextCategory =
519
+ kind === modifierKindMedia
520
+ ? 0
521
+ : kind === 6
522
+ ? 1
523
+ : kind === modifierKindTheme
524
+ ? 2
525
+ : kind === 5
526
+ ? 3
527
+ : 4
528
+ if (nextCategory > categoryRank) {
529
+ categoryRank = nextCategory
530
+ withinRank = rank
531
+ } else if (nextCategory === categoryRank && rank > withinRank) {
532
+ withinRank = rank
533
+ }
534
+
535
+ if (kind === modifierKindMedia) {
536
+ const query = compiled.mediaQueries[modifier]
537
+ if (!query) return 0
538
+ ;(wrappers ||= []).push(`@media ${query}`)
539
+ active &&= !!state.flatMediaState?.[modifier]
540
+ ;(state.flatMediaKeys ||= new Set()).add(modifier)
541
+ } else if (kind === modifierKindTheme) {
542
+ theme = modifier
543
+ selector += `:where(.t_${modifier}, .t_${modifier} *)`
544
+ active &&=
378
545
  state.flatThemeName === modifier ||
379
546
  state.flatThemeName?.startsWith(`${modifier}_`) === true
380
- continue
381
- }
382
- if (
383
- modifier === 'web' ||
384
- modifier === 'native' ||
385
- modifier === 'ios' ||
386
- modifier === 'android' ||
387
- modifier === 'tv' ||
388
- modifier === 'tvos' ||
389
- modifier === 'androidtv'
390
- ) {
391
- canonical.push(modifier)
392
- kinds.push('platform')
393
- const matches = platformMatches(modifier)
394
- out.active &&= matches
395
- out.emit &&= matches
396
- continue
547
+ } else if (kind === 5) {
548
+ selector += `:where(.t_group_${groupName}${stateSelector} *)`
549
+ if (rank === 0) (wrappers ||= []).push('@media (hover: hover)')
550
+ const component = state.componentState.group?.[groupName]
551
+ const context = state.flatGroupContext?.[groupName]
552
+ active &&= !!(component?.pseudo ?? context?.state.pseudo)?.[conditionStateName]
553
+ ;(state.flatGroupKeys ||= new Set()).add(groupName)
554
+ } else if (kind === 6) {
555
+ const groupKey = `@${containerName}`
556
+ ;(wrappers ||= []).push(
557
+ containerName
558
+ ? `@container ${containerName} ${containerQuery}`
559
+ : `@container ${containerQuery}`
560
+ )
561
+ const component = state.componentState.group?.[groupKey]
562
+ const context = state.flatGroupContext?.[groupKey]
563
+ const match = component?.media?.[containerSize]
564
+ active &&=
565
+ match === undefined
566
+ ? !!(
567
+ context?.state.layout && mediaKeyMatch(containerSize, context.state.layout)
568
+ )
569
+ : !!match
570
+ ;(state.flatGroupKeys ||= new Set()).add(groupKey)
571
+ ;(state.flatGroupMedia ||= new Set()).add(containerSize)
572
+ } else {
573
+ selfStateSpecificity++
574
+ if (!isWeb && stateSelector[0] === '[' && modifier !== 'disabled') {
575
+ unsupportedState = modifier
576
+ }
577
+ if (stateSelector[0] === '.') {
578
+ selector += `:is(${stateSelector}, ${stateSelector} *)`
579
+ if (rank === 6) enter = true
580
+ else exit = true
581
+ } else {
582
+ selector += stateSelector
583
+ }
584
+ if (rank === 0) (wrappers ||= []).push('@media (hover: hover)')
585
+ const component = state.componentState
586
+ active &&=
587
+ rank === 0
588
+ ? !!component.hover
589
+ : rank === 4
590
+ ? !!(component.press || component.pressIn)
591
+ : rank === 2
592
+ ? !!component.focus
593
+ : rank === 3
594
+ ? !!component.focusVisible
595
+ : rank === 1
596
+ ? !!component.focusWithin
597
+ : rank === 5
598
+ ? !!(component.disabled || state.props.disabled)
599
+ : rank === 6
600
+ ? !!component.unmounted
601
+ : rank === 7
602
+ ? !!state.styleProps.isExiting
603
+ : false
604
+ if (stateSelector[0] === ':') {
605
+ ;(state.flatStateKeys ||= new Set()).add(modifier)
606
+ }
397
607
  }
398
- return null
399
608
  }
400
- out.key = clauseConditionSetKey(canonical)
401
- out.precedence = getClausePrecedenceKeyFromKinds(
402
- canonical,
403
- kinds,
404
- precedenceOrderFor(state)
405
- )
406
- out.classRepetitions = clauseSubjectClassRepetitions(
407
- out.precedence,
408
- selfStateSpecificity
409
- )
410
- return out
609
+ if (depth > 5) {
610
+ throw new Error(
611
+ `a flat value clause supports at most 5 non-platform conditions; received ${depth} in "${source.slice(sourceStart, end)}:"`
612
+ )
613
+ }
614
+ const precedence =
615
+ (platformRank << 26) | (depth << 23) | (categoryRank << 20) | withinRank
616
+ const condition =
617
+ precedence * 256 +
618
+ selfStateSpecificity * 32 +
619
+ 16 +
620
+ (active ? 1 : 0) +
621
+ (emit ? 2 : 0) +
622
+ (enter ? 4 : 0) +
623
+ (exit ? 8 : 0)
624
+ if (warning && unsupportedState && process.env.NODE_ENV === 'development') {
625
+ warnOnce(
626
+ `${property}: "${unsupportedState}:" has no native component-state source; dropping the clause`
627
+ )
628
+ }
629
+ if (
630
+ merge &&
631
+ property &&
632
+ condition & 2 &&
633
+ (condition & 1 ||
634
+ (isWeb && state.flatShouldDoClasses) ||
635
+ (warning === 1 &&
636
+ !isWeb &&
637
+ theme &&
638
+ supportsDynamicColorIOS &&
639
+ isColorStyleKey(property)))
640
+ ) {
641
+ const value = payloadStart === -1 ? raw : source.slice(payloadStart, payloadEnd)
642
+ emitValue(
643
+ state,
644
+ property,
645
+ value,
646
+ condition,
647
+ key,
648
+ wrappers,
649
+ selector,
650
+ theme,
651
+ merge,
652
+ warning === 2 ? originalValue : (originalValue ?? value),
653
+ contextOnly
654
+ )
655
+ }
656
+ return condition
411
657
  }
412
658
 
413
659
  interface TokenLookup {
@@ -639,23 +885,31 @@ function directAtomic(
639
885
  state: DirectState,
640
886
  property: string,
641
887
  value: any,
642
- condition: Condition | null,
888
+ condition: number,
889
+ conditionKey: string,
890
+ conditionWrappers: string[] | undefined,
891
+ conditionSelector: string,
643
892
  isDefault = false
644
893
  ) {
645
894
  const atomics = (state.flatAtomics ||= {})
646
895
  const atomicKey = property.startsWith('transition') ? 'transition' : property
647
896
  const existing = atomics[atomicKey]
648
- const contribution = directStyleSignature(property, value, condition?.key || '')
897
+ const contribution = directStyleSignature(property, value, conditionKey)
649
898
  const signature = existing ? existing.signature + contribution : contribution
650
899
  const next = getCSSStyleAtomic(
651
900
  property,
652
901
  value,
653
- condition?.selector,
654
- condition?.wrappers,
902
+ conditionSelector,
903
+ conditionWrappers,
655
904
  signature,
656
905
  true,
657
906
  atomicKey,
658
- condition?.classRepetitions
907
+ condition
908
+ ? 1 +
909
+ ((Math.floor(condition / 256) >>> 23) & 7) +
910
+ (Math.floor(condition / 256) >>> 26) * 6 -
911
+ ((condition >>> 5) & 7)
912
+ : undefined
659
913
  )
660
914
  if (!next) return
661
915
  const identifier = next[StyleObjectIdentifier]
@@ -675,12 +929,10 @@ function directAtomic(
675
929
  }
676
930
  if (slotted) {
677
931
  atomic.conditions = {
678
- [atomicKey === 'transition'
679
- ? `${condition?.key || ''}\0${property}`
680
- : condition!.key]: {
932
+ [atomicKey === 'transition' ? `${conditionKey}\0${property}` : conditionKey]: {
681
933
  count: nextRules.length,
682
934
  index: 0,
683
- precedence: condition?.precedence ?? baseClausePrecedence,
935
+ precedence: condition ? Math.floor(condition / 256) : 0,
684
936
  default: isDefault,
685
937
  },
686
938
  }
@@ -710,9 +962,7 @@ function directAtomic(
710
962
  }
711
963
  if (slotted) {
712
964
  const slot =
713
- atomicKey === 'transition'
714
- ? `${condition?.key || ''}\0${property}`
715
- : condition!.key
965
+ atomicKey === 'transition' ? `${conditionKey}\0${property}` : conditionKey
716
966
  const previous = existing.conditions?.[slot]
717
967
  if (previous) {
718
968
  rules.splice(previous.index, previous.count)
@@ -726,15 +976,12 @@ function directAtomic(
726
976
  }
727
977
  delete existing.conditions![slot]
728
978
  }
729
- const precedence = condition?.precedence ?? baseClausePrecedence
979
+ const precedence = condition ? Math.floor(condition / 256) : 0
730
980
  let insertionIndex = rules.length
731
981
  if (existing.conditions) {
732
982
  for (const key in existing.conditions) {
733
983
  const entry = existing.conditions[key]
734
- if (
735
- compareClausePrecedence(entry.precedence, precedence) > 0 &&
736
- entry.index < insertionIndex
737
- ) {
984
+ if (entry.precedence > precedence && entry.index < insertionIndex) {
738
985
  insertionIndex = entry.index
739
986
  }
740
987
  }
@@ -769,7 +1016,10 @@ function directAtomic(
769
1016
  function emitBorderStyleDefault(
770
1017
  state: GetStyleState,
771
1018
  property: string,
772
- condition: Condition | null
1019
+ condition: number,
1020
+ conditionKey: string,
1021
+ conditionWrappers: string[] | undefined,
1022
+ conditionSelector: string
773
1023
  ) {
774
1024
  if (!isWeb || !state.flatShouldDoClasses || state.styleProps.noNormalize === false) {
775
1025
  return
@@ -780,11 +1030,20 @@ function emitBorderStyleDefault(
780
1030
  if (
781
1031
  atomic?.baseRules ||
782
1032
  (state.classNames[target] && !atomic) ||
783
- (condition && atomic?.conditions?.[condition.key])
1033
+ (condition && atomic?.conditions?.[conditionKey])
784
1034
  ) {
785
1035
  return
786
1036
  }
787
- directAtomic(state as DirectState, target, 'solid', condition, true)
1037
+ directAtomic(
1038
+ state as DirectState,
1039
+ target,
1040
+ 'solid',
1041
+ condition,
1042
+ conditionKey,
1043
+ conditionWrappers,
1044
+ conditionSelector,
1045
+ true
1046
+ )
788
1047
  }
789
1048
 
790
1049
  export function flushDirectStyles(state: GetStyleState, clear = false) {
@@ -810,19 +1069,23 @@ function emitProperty(
810
1069
  state: GetStyleState,
811
1070
  property: string,
812
1071
  value: any,
813
- condition: Condition | null,
1072
+ condition: number,
1073
+ conditionKey: string,
1074
+ conditionWrappers: string[] | undefined,
1075
+ conditionSelector: string,
1076
+ conditionTheme: string,
814
1077
  merge: MergeStyle,
815
1078
  originalValue: any,
816
1079
  contextOnly: boolean
817
1080
  ) {
818
1081
  const direct = state as DirectState
819
- if (condition?.enter) (state.flatEnterKeys ||= new Set()).add(property)
820
- if (condition?.exit) (state.flatExitKeys ||= new Set()).add(property)
1082
+ if (condition & 4) (state.flatEnterKeys ||= new Set()).add(property)
1083
+ if (condition & 8) (state.flatExitKeys ||= new Set()).add(property)
821
1084
 
822
- if (!isWeb && condition?.theme) {
1085
+ if (!isWeb && conditionTheme) {
823
1086
  if (supportsDynamicColorIOS && isColorStyleKey(property)) {
824
1087
  const schemes = ((direct.flatDynamicColors ||= {})[property] ||= {})
825
- schemes[condition.theme] =
1088
+ schemes[conditionTheme] =
826
1089
  typeof originalValue === 'string' && /^[a-z]+$/i.test(originalValue)
827
1090
  ? originalValue
828
1091
  : value
@@ -833,7 +1096,7 @@ function emitProperty(
833
1096
  }
834
1097
 
835
1098
  if (contextOnly) {
836
- if (!condition || condition.active) {
1099
+ if (!condition || condition & 1) {
837
1100
  ;(state.overriddenContextProps ||= {})[property] = originalValue
838
1101
  }
839
1102
  return
@@ -852,15 +1115,24 @@ function emitProperty(
852
1115
  if (!condition) {
853
1116
  if (state.style) delete state.style[property]
854
1117
  }
855
- directAtomic(state as DirectState, property, value, condition)
1118
+ directAtomic(
1119
+ state as DirectState,
1120
+ property,
1121
+ value,
1122
+ condition,
1123
+ conditionKey,
1124
+ conditionWrappers,
1125
+ conditionSelector
1126
+ )
856
1127
  return
857
1128
  }
858
1129
 
859
1130
  if (condition) {
860
- if (!condition.active) return
1131
+ if (!(condition & 1)) return
1132
+ const precedence = Math.floor(condition / 256)
861
1133
  const previous = direct.flatPrecedence?.[property]
862
- if (previous && compareClausePrecedence(condition.precedence, previous) < 0) return
863
- ;(direct.flatPrecedence ||= {})[property] = condition.precedence
1134
+ if (previous !== undefined && precedence < previous) return
1135
+ ;(direct.flatPrecedence ||= {})[property] = precedence
864
1136
  ;(state.flatActiveConditions ||= {})[property] = true
865
1137
  } else if (state.flatActiveConditions?.[property]) {
866
1138
  return
@@ -895,7 +1167,11 @@ function emitBorder(
895
1167
  state: GetStyleState,
896
1168
  property: string,
897
1169
  raw: string,
898
- condition: Condition | null,
1170
+ condition: number,
1171
+ conditionKey: string,
1172
+ conditionWrappers: string[] | undefined,
1173
+ conditionSelector: string,
1174
+ conditionTheme: string,
899
1175
  merge: MergeStyle,
900
1176
  originalValue: any,
901
1177
  contextOnly: boolean
@@ -929,18 +1205,54 @@ function emitBorder(
929
1205
  if (style === 'none' && width === undefined) width = '0'
930
1206
  if (width !== undefined) {
931
1207
  for (const target of targets.width) {
932
- emitResolved(state, target, width, condition, merge, originalValue, contextOnly)
1208
+ emitResolved(
1209
+ state,
1210
+ target,
1211
+ width,
1212
+ condition,
1213
+ conditionKey,
1214
+ conditionWrappers,
1215
+ conditionSelector,
1216
+ conditionTheme,
1217
+ merge,
1218
+ originalValue,
1219
+ contextOnly
1220
+ )
933
1221
  }
934
1222
  }
935
1223
  if (style !== undefined) {
936
1224
  const styleTargets = !isWeb && property === 'border' ? ['borderStyle'] : targets.style
937
1225
  for (const target of styleTargets) {
938
- emitProperty(state, target, style, condition, merge, originalValue, contextOnly)
1226
+ emitProperty(
1227
+ state,
1228
+ target,
1229
+ style,
1230
+ condition,
1231
+ conditionKey,
1232
+ conditionWrappers,
1233
+ conditionSelector,
1234
+ conditionTheme,
1235
+ merge,
1236
+ originalValue,
1237
+ contextOnly
1238
+ )
939
1239
  }
940
1240
  }
941
1241
  if (color !== undefined) {
942
1242
  for (const target of targets.color) {
943
- emitResolved(state, target, color, condition, merge, originalValue, contextOnly)
1243
+ emitResolved(
1244
+ state,
1245
+ target,
1246
+ color,
1247
+ condition,
1248
+ conditionKey,
1249
+ conditionWrappers,
1250
+ conditionSelector,
1251
+ conditionTheme,
1252
+ merge,
1253
+ originalValue,
1254
+ contextOnly
1255
+ )
944
1256
  }
945
1257
  }
946
1258
  }
@@ -948,7 +1260,11 @@ function emitBorder(
948
1260
  function emitTextDecoration(
949
1261
  state: GetStyleState,
950
1262
  raw: string,
951
- condition: Condition | null,
1263
+ condition: number,
1264
+ conditionKey: string,
1265
+ conditionWrappers: string[] | undefined,
1266
+ conditionSelector: string,
1267
+ conditionTheme: string,
952
1268
  merge: MergeStyle,
953
1269
  originalValue: any,
954
1270
  contextOnly: boolean
@@ -967,7 +1283,19 @@ function emitTextDecoration(
967
1283
  part === 'none'
968
1284
  ? 'textDecorationLine'
969
1285
  : 'textDecorationColor'
970
- emitResolved(state, property, part, condition, merge, originalValue, contextOnly)
1286
+ emitResolved(
1287
+ state,
1288
+ property,
1289
+ part,
1290
+ condition,
1291
+ conditionKey,
1292
+ conditionWrappers,
1293
+ conditionSelector,
1294
+ conditionTheme,
1295
+ merge,
1296
+ originalValue,
1297
+ contextOnly
1298
+ )
971
1299
  }
972
1300
  }
973
1301
 
@@ -993,17 +1321,57 @@ function emitTransform(
993
1321
  state: GetStyleState,
994
1322
  property: string,
995
1323
  value: any,
996
- condition: Condition | null,
1324
+ condition: number,
1325
+ conditionKey: string,
1326
+ conditionWrappers: string[] | undefined,
1327
+ conditionSelector: string,
1328
+ conditionTheme: string,
997
1329
  merge: MergeStyle,
998
1330
  originalValue: any,
999
1331
  contextOnly: boolean
1000
1332
  ) {
1001
1333
  if (!isWeb || !state.flatShouldDoClasses) {
1002
1334
  if (!isWeb && property === 'scale') {
1003
- emitProperty(state, 'scaleX', value, condition, merge, originalValue, contextOnly)
1004
- emitProperty(state, 'scaleY', value, condition, merge, originalValue, contextOnly)
1335
+ emitProperty(
1336
+ state,
1337
+ 'scaleX',
1338
+ value,
1339
+ condition,
1340
+ conditionKey,
1341
+ conditionWrappers,
1342
+ conditionSelector,
1343
+ conditionTheme,
1344
+ merge,
1345
+ originalValue,
1346
+ contextOnly
1347
+ )
1348
+ emitProperty(
1349
+ state,
1350
+ 'scaleY',
1351
+ value,
1352
+ condition,
1353
+ conditionKey,
1354
+ conditionWrappers,
1355
+ conditionSelector,
1356
+ conditionTheme,
1357
+ merge,
1358
+ originalValue,
1359
+ contextOnly
1360
+ )
1005
1361
  } else {
1006
- emitProperty(state, property, value, condition, merge, originalValue, contextOnly)
1362
+ emitProperty(
1363
+ state,
1364
+ property,
1365
+ value,
1366
+ condition,
1367
+ conditionKey,
1368
+ conditionWrappers,
1369
+ conditionSelector,
1370
+ conditionTheme,
1371
+ merge,
1372
+ originalValue,
1373
+ contextOnly
1374
+ )
1007
1375
  }
1008
1376
  return
1009
1377
  }
@@ -1028,7 +1396,19 @@ function emitTransform(
1028
1396
  if (target === '--t-x' || target === '--t-y') targetValue = `${targetValue}px`
1029
1397
  else if (target === 'rotate') targetValue = `${targetValue}deg`
1030
1398
  }
1031
- emitProperty(state, target, targetValue, condition, merge, originalValue, contextOnly)
1399
+ emitProperty(
1400
+ state,
1401
+ target,
1402
+ targetValue,
1403
+ condition,
1404
+ conditionKey,
1405
+ conditionWrappers,
1406
+ conditionSelector,
1407
+ conditionTheme,
1408
+ merge,
1409
+ originalValue,
1410
+ contextOnly
1411
+ )
1032
1412
  if (target === '--t-x' || target === '--t-y') addComposition(state, 'translate')
1033
1413
  else if (target.startsWith('--t-scale')) addComposition(state, 'scale')
1034
1414
  }
@@ -1038,7 +1418,11 @@ function emitResolved(
1038
1418
  state: GetStyleState,
1039
1419
  property: string,
1040
1420
  raw: string,
1041
- condition: Condition | null,
1421
+ condition: number,
1422
+ conditionKey: string,
1423
+ conditionWrappers: string[] | undefined,
1424
+ conditionSelector: string,
1425
+ conditionTheme: string,
1042
1426
  merge: MergeStyle,
1043
1427
  originalValue: any,
1044
1428
  contextOnly: boolean
@@ -1054,7 +1438,19 @@ function emitResolved(
1054
1438
  value = Number(value)
1055
1439
  }
1056
1440
  }
1057
- emitProperty(state, property, value, condition, merge, originalValue, contextOnly)
1441
+ emitProperty(
1442
+ state,
1443
+ property,
1444
+ value,
1445
+ condition,
1446
+ conditionKey,
1447
+ conditionWrappers,
1448
+ conditionSelector,
1449
+ conditionTheme,
1450
+ merge,
1451
+ originalValue,
1452
+ contextOnly
1453
+ )
1058
1454
  }
1059
1455
 
1060
1456
  function shadowUnit(part: any) {
@@ -1079,7 +1475,11 @@ function emitWebShadow(
1079
1475
  state,
1080
1476
  'boxShadow',
1081
1477
  state.flatBoxShadow ? `${state.flatBoxShadow}, ${next}` : next,
1082
- null,
1478
+ 0,
1479
+ '',
1480
+ undefined,
1481
+ '',
1482
+ '',
1083
1483
  merge,
1084
1484
  originalValue,
1085
1485
  contextOnly
@@ -1102,7 +1502,11 @@ function emitWebTextShadow(
1102
1502
  state,
1103
1503
  'textShadow',
1104
1504
  `${shadowUnit(offset.width)} ${shadowUnit(offset.height)} ${shadowUnit(shadow.textShadowRadius)} ${shadow.textShadowColor}`,
1105
- null,
1505
+ 0,
1506
+ '',
1507
+ undefined,
1508
+ '',
1509
+ '',
1106
1510
  merge,
1107
1511
  originalValue,
1108
1512
  contextOnly
@@ -1113,7 +1517,11 @@ function emitValue(
1113
1517
  state: GetStyleState,
1114
1518
  property: string,
1115
1519
  raw: any,
1116
- condition: Condition | null,
1520
+ condition: number,
1521
+ conditionKey: string,
1522
+ conditionWrappers: string[] | undefined,
1523
+ conditionSelector: string,
1524
+ conditionTheme: string,
1117
1525
  merge: MergeStyle,
1118
1526
  originalValue: any,
1119
1527
  contextOnly: boolean
@@ -1132,7 +1540,14 @@ function emitValue(
1132
1540
  )
1133
1541
  }
1134
1542
 
1135
- emitBorderStyleDefault(state, property, condition)
1543
+ emitBorderStyleDefault(
1544
+ state,
1545
+ property,
1546
+ condition,
1547
+ conditionKey,
1548
+ conditionWrappers,
1549
+ conditionSelector
1550
+ )
1136
1551
 
1137
1552
  if (
1138
1553
  typeof raw === 'string' &&
@@ -1162,7 +1577,11 @@ function emitValue(
1162
1577
  .sort()
1163
1578
  .map((key) => ({ [key]: direct.flatLegacyTransforms![key] }))
1164
1579
  ),
1165
- null,
1580
+ 0,
1581
+ '',
1582
+ undefined,
1583
+ '',
1584
+ '',
1166
1585
  merge,
1167
1586
  originalValue,
1168
1587
  contextOnly
@@ -1173,6 +1592,10 @@ function emitValue(
1173
1592
  'transform',
1174
1593
  `${property}(${value})`,
1175
1594
  condition,
1595
+ conditionKey,
1596
+ conditionWrappers,
1597
+ conditionSelector,
1598
+ conditionTheme,
1176
1599
  merge,
1177
1600
  originalValue,
1178
1601
  contextOnly
@@ -1251,11 +1674,34 @@ function emitValue(
1251
1674
  }
1252
1675
 
1253
1676
  if (typeof raw === 'string' && property in borderTargets) {
1254
- emitBorder(state, property, raw, condition, merge, originalValue, contextOnly)
1677
+ emitBorder(
1678
+ state,
1679
+ property,
1680
+ raw,
1681
+ condition,
1682
+ conditionKey,
1683
+ conditionWrappers,
1684
+ conditionSelector,
1685
+ conditionTheme,
1686
+ merge,
1687
+ originalValue,
1688
+ contextOnly
1689
+ )
1255
1690
  return
1256
1691
  }
1257
1692
  if (typeof raw === 'string' && property === 'textDecoration') {
1258
- emitTextDecoration(state, raw, condition, merge, originalValue, contextOnly)
1693
+ emitTextDecoration(
1694
+ state,
1695
+ raw,
1696
+ condition,
1697
+ conditionKey,
1698
+ conditionWrappers,
1699
+ conditionSelector,
1700
+ conditionTheme,
1701
+ merge,
1702
+ originalValue,
1703
+ contextOnly
1704
+ )
1259
1705
  return
1260
1706
  }
1261
1707
  if (typeof raw === 'string' && property === 'background') {
@@ -1266,6 +1712,10 @@ function emitValue(
1266
1712
  'backgroundColor',
1267
1713
  parts[0],
1268
1714
  condition,
1715
+ conditionKey,
1716
+ conditionWrappers,
1717
+ conditionSelector,
1718
+ conditionTheme,
1269
1719
  merge,
1270
1720
  originalValue,
1271
1721
  contextOnly
@@ -1304,7 +1754,7 @@ function emitValue(
1304
1754
  `native transform "${property}" cannot represent "${value}"; dropping it`
1305
1755
  )
1306
1756
  }
1307
- if (condition?.active && state.flatTransforms) {
1757
+ if (condition & 1 && state.flatTransforms) {
1308
1758
  delete state.flatTransforms[property]
1309
1759
  }
1310
1760
  return
@@ -1315,7 +1765,19 @@ function emitValue(
1315
1765
  value = Number(value)
1316
1766
  }
1317
1767
  }
1318
- emitTransform(state, property, value, condition, merge, originalValue, contextOnly)
1768
+ emitTransform(
1769
+ state,
1770
+ property,
1771
+ value,
1772
+ condition,
1773
+ conditionKey,
1774
+ conditionWrappers,
1775
+ conditionSelector,
1776
+ conditionTheme,
1777
+ merge,
1778
+ originalValue,
1779
+ contextOnly
1780
+ )
1319
1781
  return
1320
1782
  }
1321
1783
 
@@ -1323,9 +1785,33 @@ function emitValue(
1323
1785
  // css reads the shorthand, so skip the four-corner expansion here. a string
1324
1786
  // value still needs its token resolved, which is what emitResolved does.
1325
1787
  if (typeof raw === 'string') {
1326
- emitResolved(state, property, raw, condition, merge, originalValue, contextOnly)
1788
+ emitResolved(
1789
+ state,
1790
+ property,
1791
+ raw,
1792
+ condition,
1793
+ conditionKey,
1794
+ conditionWrappers,
1795
+ conditionSelector,
1796
+ conditionTheme,
1797
+ merge,
1798
+ originalValue,
1799
+ contextOnly
1800
+ )
1327
1801
  } else {
1328
- emitProperty(state, property, raw, condition, merge, originalValue, contextOnly)
1802
+ emitProperty(
1803
+ state,
1804
+ property,
1805
+ raw,
1806
+ condition,
1807
+ conditionKey,
1808
+ conditionWrappers,
1809
+ conditionSelector,
1810
+ conditionTheme,
1811
+ merge,
1812
+ originalValue,
1813
+ contextOnly
1814
+ )
1329
1815
  }
1330
1816
  return
1331
1817
  }
@@ -1342,6 +1828,10 @@ function emitValue(
1342
1828
  property,
1343
1829
  transform,
1344
1830
  condition,
1831
+ conditionKey,
1832
+ conditionWrappers,
1833
+ conditionSelector,
1834
+ conditionTheme,
1345
1835
  merge,
1346
1836
  originalValue,
1347
1837
  contextOnly
@@ -1385,6 +1875,10 @@ function emitValue(
1385
1875
  key,
1386
1876
  parsedValue,
1387
1877
  condition,
1878
+ conditionKey,
1879
+ conditionWrappers,
1880
+ conditionSelector,
1881
+ conditionTheme,
1388
1882
  merge,
1389
1883
  originalValue,
1390
1884
  contextOnly
@@ -1396,6 +1890,10 @@ function emitValue(
1396
1890
  property === 'backgroundImage' ? 'experimental_backgroundImage' : property,
1397
1891
  parsed,
1398
1892
  condition,
1893
+ conditionKey,
1894
+ conditionWrappers,
1895
+ conditionSelector,
1896
+ conditionTheme,
1399
1897
  merge,
1400
1898
  originalValue,
1401
1899
  contextOnly
@@ -1413,7 +1911,19 @@ function emitValue(
1413
1911
  ? null
1414
1912
  : expandStyle(property, value, state.conf.settings.styleCompat || 'web')
1415
1913
  if (!expanded) {
1416
- emitProperty(state, property, value, condition, merge, originalValue, contextOnly)
1914
+ emitProperty(
1915
+ state,
1916
+ property,
1917
+ value,
1918
+ condition,
1919
+ conditionKey,
1920
+ conditionWrappers,
1921
+ conditionSelector,
1922
+ conditionTheme,
1923
+ merge,
1924
+ originalValue,
1925
+ contextOnly
1926
+ )
1417
1927
  return
1418
1928
  }
1419
1929
 
@@ -1434,6 +1944,10 @@ function emitValue(
1434
1944
  expanded[index][0],
1435
1945
  parts[partIndex],
1436
1946
  condition,
1947
+ conditionKey,
1948
+ conditionWrappers,
1949
+ conditionSelector,
1950
+ conditionTheme,
1437
1951
  merge,
1438
1952
  originalValue,
1439
1953
  contextOnly
@@ -1448,6 +1962,10 @@ function emitValue(
1448
1962
  expanded[index][0],
1449
1963
  expanded[index][1],
1450
1964
  condition,
1965
+ conditionKey,
1966
+ conditionWrappers,
1967
+ conditionSelector,
1968
+ conditionTheme,
1451
1969
  merge,
1452
1970
  originalValue,
1453
1971
  contextOnly
@@ -1455,36 +1973,6 @@ function emitValue(
1455
1973
  }
1456
1974
  }
1457
1975
 
1458
- function emitSegment(
1459
- state: GetStyleState,
1460
- property: string,
1461
- source: string,
1462
- start: number,
1463
- end: number,
1464
- condition: Condition | null,
1465
- merge: MergeStyle,
1466
- originalValue: any,
1467
- contextOnly: boolean
1468
- ) {
1469
- while (start < end && source.charCodeAt(start) <= 32) start++
1470
- while (end > start && source.charCodeAt(end - 1) <= 32) end--
1471
- if (start === end) return false
1472
- if (
1473
- !condition ||
1474
- (condition.emit &&
1475
- (condition.active ||
1476
- (isWeb && state.flatShouldDoClasses) ||
1477
- (!isWeb &&
1478
- condition.theme &&
1479
- supportsDynamicColorIOS &&
1480
- isColorStyleKey(property))))
1481
- ) {
1482
- const value = source.slice(start, end)
1483
- emitValue(state, property, value, condition, merge, value, contextOnly)
1484
- }
1485
- return true
1486
- }
1487
-
1488
1976
  export function contributeStyleString(
1489
1977
  state: GetStyleState,
1490
1978
  property: string,
@@ -1509,140 +1997,31 @@ export function contributeStyleString(
1509
1997
  // with no colon is emitted verbatim by contract. Keep the two paths in mind
1510
1998
  // together when reading a bug report about one of them.
1511
1999
  if (source.indexOf(':') === -1) {
1512
- emitValue(state, property, source, null, merge, originalValue ?? source, contextOnly)
1513
- return true
1514
- }
1515
-
1516
- // The scan collects and the emit happens after it, because `parseValue`
1517
- // reports a refused modifier or a rule-breaking character as one failure over
1518
- // the WHOLE value: there is no such thing as the good half of a value the
1519
- // grammar rejects. Emitting as the scan went is what used to make this path
1520
- // lose the base it had already read while the variant path kept it.
1521
- const conditions: (Condition | null)[] = []
1522
- const starts: number[] = []
1523
- const ends: number[] = []
1524
- let pending: Condition | null = null
1525
- // the first thing that made the value unusable, and the whole refusal test
1526
- let refused = ''
1527
- let lifecycle = false
1528
-
1529
- scanFlatValue(source, {
1530
- segment(start, end, isBase) {
1531
- if (start === end) {
1532
- // an empty base is simply no base; an empty clause payload is a clause
1533
- // with nothing in it, which parseValue reports as `empty-payload`
1534
- if (!isBase && !refused) refused = 'a conditional clause has no value'
1535
- return
1536
- }
1537
- conditions.push(pending)
1538
- starts.push(start)
1539
- ends.push(end)
1540
- },
1541
- chain(start, end) {
1542
- if (refused) return false
1543
- const next = getCondition(state, source.slice(start, end))
1544
- if (!next) {
1545
- refused = `unknown modifier "${source.slice(start, end)}"`
1546
- return false
1547
- }
1548
- if (process.env.NODE_ENV === 'development' && next.unsupportedState) {
1549
- warnOnce(
1550
- `${property}: "${next.unsupportedState}:" has no native component-state source; dropping the clause`
1551
- )
1552
- }
1553
- pending = next
1554
- lifecycle ||= !!(next.enter || next.exit)
1555
- return true
1556
- },
1557
- error(code, index) {
1558
- if (refused) return
1559
- refused =
1560
- code === 'invalid-character'
1561
- ? `"${source[index]}" would end the declaration or rule`
1562
- : code === 'unterminated-string'
1563
- ? 'an unterminated string'
1564
- : code === 'unterminated-comment'
1565
- ? 'an unterminated "/*" comment'
1566
- : code === 'stray-comment-close'
1567
- ? 'a stray "*/"'
1568
- : 'an unterminated "("'
1569
- },
1570
- })
1571
-
1572
- if (refused) {
1573
- // `16:9` is the one value whose top-level colon is content rather than a
1574
- // clause, and only this property can hold it
1575
- if (property === 'aspectRatio') {
1576
- emitValue(
1577
- state,
1578
- property,
1579
- source,
1580
- null,
1581
- merge,
1582
- originalValue ?? source,
1583
- contextOnly
1584
- )
1585
- return true
1586
- }
1587
- if (process.env.NODE_ENV === 'development') {
1588
- warnRefusedValue(property, source, refused)
1589
- }
1590
- return true
1591
- }
1592
-
1593
- let hasBase = false
1594
- let lastPayloadStart = 0
1595
- for (let index = 0; index < conditions.length; index++) {
1596
- const condition = conditions[index]
1597
- lastPayloadStart = starts[index]
1598
- const emitted = emitSegment(
2000
+ emitValue(
1599
2001
  state,
1600
2002
  property,
1601
2003
  source,
1602
- starts[index],
1603
- ends[index],
1604
- condition,
2004
+ 0,
2005
+ '',
2006
+ undefined,
2007
+ '',
2008
+ '',
1605
2009
  merge,
1606
- originalValue,
2010
+ originalValue ?? source,
1607
2011
  contextOnly
1608
2012
  )
1609
- if (!condition && emitted) hasBase = true
1610
- }
1611
-
1612
- if (
1613
- process.env.NODE_ENV === 'development' &&
1614
- !hasBase &&
1615
- conditions.length > 0 &&
1616
- (property in tokenCategories.color || property in tokenCategoryByProperty) &&
1617
- splitComponents(source.slice(lastPayloadStart)).length > 1
1618
- ) {
1619
- warnOnce(
1620
- `${property}="${source}" has multiple values after its first conditional. Write the base value before the first conditional.`
1621
- )
2013
+ return true
1622
2014
  }
1623
2015
 
1624
- // a lifecycle-only value (`opacity="enter:0 exit:0"`) has no resting value to
1625
- // return to. CSS does not need one: the property is simply absent and the
1626
- // browser's own default applies. A style object does need one, because an
1627
- // animation driver can only animate between values it can see, and that is
1628
- // every native render plus every web render a driver drives inline. Without
1629
- // this the enter style lands and then the target style has no such key at
1630
- // all, so the driver has nothing to animate toward and the element snaps.
1631
- if ((!isWeb || !state.flatShouldDoClasses) && lifecycle && !hasBase) {
1632
- const value =
1633
- property === 'opacity'
1634
- ? 1
1635
- : property === 'scale' || property === 'scaleX' || property === 'scaleY'
1636
- ? 1
1637
- : property === 'rotate'
1638
- ? '0deg'
1639
- : property === 'x' || property === 'y'
1640
- ? 0
1641
- : null
1642
- if (value !== null) {
1643
- emitValue(state, property, value, null, merge, value, contextOnly)
1644
- }
1645
- }
2016
+ scanFlatValue(
2017
+ source,
2018
+ directStyleHandler,
2019
+ state,
2020
+ property,
2021
+ merge,
2022
+ originalValue,
2023
+ contextOnly
2024
+ )
1646
2025
  return true
1647
2026
  }
1648
2027
 
@@ -1654,25 +2033,33 @@ export function contributeFrontendValue(
1654
2033
  contextOnly = false
1655
2034
  ) {
1656
2035
  if (value.base !== null) {
1657
- emitValue(state, property, value.base, null, merge, value.base, contextOnly)
2036
+ emitValue(
2037
+ state,
2038
+ property,
2039
+ value.base,
2040
+ 0,
2041
+ '',
2042
+ undefined,
2043
+ '',
2044
+ '',
2045
+ merge,
2046
+ value.base,
2047
+ contextOnly
2048
+ )
1658
2049
  }
1659
2050
  for (const clause of value.clauses) {
1660
- const condition = getCondition(state, clause.modifiers.join(':'))
1661
- if (
1662
- condition &&
1663
- condition.emit &&
1664
- (condition.active || (isWeb && state.flatShouldDoClasses))
1665
- ) {
1666
- emitValue(
1667
- state,
1668
- property,
1669
- clause.payload,
1670
- condition,
1671
- merge,
1672
- clause.payload,
1673
- contextOnly
1674
- )
1675
- }
2051
+ const source = clause.modifiers.join(':')
2052
+ resolveClauseChain(
2053
+ state,
2054
+ source,
2055
+ 0,
2056
+ source.length,
2057
+ property,
2058
+ clause.payload,
2059
+ merge,
2060
+ clause.payload,
2061
+ contextOnly
2062
+ )
1676
2063
  }
1677
2064
  return true
1678
2065
  }
@@ -1686,21 +2073,20 @@ export function contributeVariantClauseValue(
1686
2073
  originalValue?: any,
1687
2074
  contextOnly = false
1688
2075
  ) {
1689
- const condition = getCondition(state, conditionSource)
1690
- if (!condition) {
1691
- if (process.env.NODE_ENV === 'development') {
1692
- warnRefusedValue(property, value, `unknown modifier "${conditionSource}"`)
1693
- }
1694
- return
1695
- }
1696
- if (process.env.NODE_ENV === 'development' && condition.unsupportedState) {
1697
- warnOnce(
1698
- `${property}: "${condition.unsupportedState}:" has no native component-state source; dropping the clause`
1699
- )
1700
- }
1701
- if (condition.emit && (condition.active || (isWeb && state.flatShouldDoClasses))) {
1702
- emitValue(state, property, value, condition, merge, originalValue, contextOnly)
1703
- }
2076
+ resolveClauseChain(
2077
+ state,
2078
+ conditionSource,
2079
+ 0,
2080
+ conditionSource.length,
2081
+ property,
2082
+ value,
2083
+ merge,
2084
+ originalValue,
2085
+ contextOnly,
2086
+ -1,
2087
+ -1,
2088
+ 2
2089
+ )
1704
2090
  }
1705
2091
 
1706
2092
  export function contributeStyleValue(
@@ -1716,7 +2102,19 @@ export function contributeStyleValue(
1716
2102
  if (expanded) {
1717
2103
  state.flatUsesSafeArea = true
1718
2104
  for (const [key, resolved] of expanded) {
1719
- emitValue(state, key, resolved, null, merge, originalValue ?? value, contextOnly)
2105
+ emitValue(
2106
+ state,
2107
+ key,
2108
+ resolved,
2109
+ 0,
2110
+ '',
2111
+ undefined,
2112
+ '',
2113
+ '',
2114
+ merge,
2115
+ originalValue ?? value,
2116
+ contextOnly
2117
+ )
1720
2118
  }
1721
2119
  return true
1722
2120
  }
@@ -1732,7 +2130,19 @@ export function contributeStyleValue(
1732
2130
  )
1733
2131
  }
1734
2132
  if (value != null) {
1735
- emitValue(state, property, value, null, merge, originalValue ?? value, contextOnly)
2133
+ emitValue(
2134
+ state,
2135
+ property,
2136
+ value,
2137
+ 0,
2138
+ '',
2139
+ undefined,
2140
+ '',
2141
+ '',
2142
+ merge,
2143
+ originalValue ?? value,
2144
+ contextOnly
2145
+ )
1736
2146
  return true
1737
2147
  }
1738
2148
  return false