@tamagui/web 3.0.0-beta.755.1 → 3.0.0-beta.804.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 (424) hide show
  1. package/dist/cjs/createComponent.cjs +83 -86
  2. package/dist/cjs/createComponent.native.cjs +96 -103
  3. package/dist/cjs/createComponent.native.js +96 -103
  4. package/dist/cjs/createComponent.native.js.map +1 -1
  5. package/dist/cjs/createTamagui.cjs +10 -8
  6. package/dist/cjs/createTamagui.native.cjs +10 -8
  7. package/dist/cjs/createTamagui.native.js +10 -8
  8. package/dist/cjs/createTamagui.native.js.map +1 -1
  9. package/dist/cjs/dom/htmlRuntime.native.cjs +1 -0
  10. package/dist/cjs/dom/htmlRuntime.native.js +1 -0
  11. package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
  12. package/dist/cjs/helpers/defaultAnimationDriver.cjs +0 -1
  13. package/dist/cjs/helpers/defaultAnimationDriver.native.cjs +0 -1
  14. package/dist/cjs/helpers/defaultAnimationDriver.native.js +0 -1
  15. package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -1
  16. package/dist/cjs/helpers/directStyleCSS.cjs +348 -0
  17. package/dist/cjs/helpers/directStyleCSS.native.cjs +20 -0
  18. package/dist/cjs/helpers/directStyleCSS.native.js +22 -0
  19. package/dist/cjs/helpers/directStyleCSS.native.js.map +1 -0
  20. package/dist/cjs/helpers/directStyleCSSCompiled.cjs +40 -0
  21. package/dist/cjs/helpers/directStyleCSSCompiled.native.cjs +46 -0
  22. package/dist/cjs/helpers/directStyleCSSCompiled.native.js +48 -0
  23. package/dist/cjs/helpers/directStyleCSSCompiled.native.js.map +1 -0
  24. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +92 -74
  25. package/dist/cjs/helpers/{getFontLanguage.native.cjs → getCSSStylesAtomicCompiled.cjs} +12 -8
  26. package/dist/cjs/helpers/{getFontLanguage.native.js → getCSSStylesAtomicCompiled.native.cjs} +12 -8
  27. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +36 -0
  28. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -0
  29. package/dist/cjs/helpers/getSplitStyles.cjs +2417 -548
  30. package/dist/cjs/helpers/getSplitStyles.native.cjs +2758 -621
  31. package/dist/cjs/helpers/getSplitStyles.native.js +2758 -621
  32. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  33. package/dist/cjs/helpers/getVariantExtras.cjs +8 -3
  34. package/dist/cjs/helpers/getVariantExtras.native.cjs +8 -3
  35. package/dist/cjs/helpers/getVariantExtras.native.js +8 -3
  36. package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
  37. package/dist/cjs/helpers/insertStyleRule.cjs +3 -2
  38. package/dist/cjs/helpers/insertStyleRule.native.cjs +70 -7
  39. package/dist/cjs/helpers/insertStyleRule.native.js +70 -7
  40. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  41. package/dist/cjs/helpers/mediaState.cjs +12 -0
  42. package/dist/cjs/helpers/mediaState.native.cjs +12 -0
  43. package/dist/cjs/helpers/mediaState.native.js +12 -0
  44. package/dist/cjs/helpers/mediaState.native.js.map +1 -1
  45. package/dist/cjs/helpers/normalizeStyle.cjs +16 -2
  46. package/dist/cjs/helpers/normalizeStyle.native.cjs +16 -2
  47. package/dist/cjs/helpers/normalizeStyle.native.js +16 -2
  48. package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
  49. package/dist/cjs/helpers/resolveRem.cjs +1 -1
  50. package/dist/cjs/helpers/skipProps.cjs +6 -1
  51. package/dist/cjs/helpers/skipProps.native.cjs +6 -1
  52. package/dist/cjs/helpers/skipProps.native.js +6 -1
  53. package/dist/cjs/helpers/skipProps.native.js.map +1 -1
  54. package/dist/cjs/helpers/styleFrontend.cjs +2 -8
  55. package/dist/cjs/helpers/styleFrontend.native.cjs +2 -10
  56. package/dist/cjs/helpers/styleFrontend.native.js +2 -10
  57. package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
  58. package/dist/cjs/helpers/styleToCSS.cjs +59 -0
  59. package/dist/cjs/helpers/{normalizeStylePropKeys.cjs → styleToCSS.native.cjs} +6 -4
  60. package/dist/cjs/helpers/{getFontLanguage.cjs → styleToCSS.native.js} +8 -4
  61. package/dist/cjs/helpers/styleToCSS.native.js.map +1 -0
  62. package/dist/cjs/helpers/subscribeToContextGroup.cjs +28 -1
  63. package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +45 -1
  64. package/dist/cjs/helpers/subscribeToContextGroup.native.js +45 -1
  65. package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
  66. package/dist/cjs/helpers/variables.cjs +3 -2
  67. package/dist/cjs/helpers/variables.native.cjs +3 -2
  68. package/dist/cjs/helpers/variables.native.js +3 -2
  69. package/dist/cjs/helpers/variables.native.js.map +1 -1
  70. package/dist/cjs/helpers/wrapStyleTags.cjs +5 -3
  71. package/dist/cjs/helpers/wrapStyleTags.native.cjs +3 -1
  72. package/dist/cjs/helpers/wrapStyleTags.native.js +3 -1
  73. package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
  74. package/dist/cjs/hooks/useComponentState.cjs +70 -89
  75. package/dist/cjs/hooks/useComponentState.native.cjs +70 -88
  76. package/dist/cjs/hooks/useComponentState.native.js +70 -88
  77. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  78. package/dist/cjs/hooks/useMedia.cjs +3 -15
  79. package/dist/cjs/hooks/useMedia.native.cjs +3 -15
  80. package/dist/cjs/hooks/useMedia.native.js +3 -15
  81. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  82. package/dist/cjs/hooks/useProps.cjs +7 -5
  83. package/dist/cjs/hooks/useProps.native.cjs +7 -5
  84. package/dist/cjs/hooks/useProps.native.js +7 -5
  85. package/dist/cjs/hooks/useProps.native.js.map +1 -1
  86. package/dist/cjs/hooks/useSplitStyles.cjs +42 -0
  87. package/dist/cjs/hooks/useSplitStyles.native.cjs +42 -0
  88. package/dist/cjs/hooks/useSplitStyles.native.js +44 -0
  89. package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -0
  90. package/dist/cjs/index.cjs +184 -70
  91. package/dist/cjs/index.native.cjs +184 -70
  92. package/dist/cjs/index.native.js +184 -70
  93. package/dist/cjs/index.native.js.map +1 -1
  94. package/dist/cjs/insertFont.cjs +1 -1
  95. package/dist/cjs/insertFont.native.cjs +1 -0
  96. package/dist/cjs/insertFont.native.js +1 -0
  97. package/dist/cjs/insertFont.native.js.map +1 -1
  98. package/dist/cjs/internal-runtime.cjs +33 -6
  99. package/dist/cjs/internal-runtime.native.cjs +33 -6
  100. package/dist/cjs/internal-runtime.native.js +33 -6
  101. package/dist/cjs/internal-runtime.native.js.map +1 -1
  102. package/dist/cjs/setupReactNative.cjs +1 -29
  103. package/dist/cjs/setupReactNative.native.cjs +1 -3
  104. package/dist/cjs/setupReactNative.native.js +1 -3
  105. package/dist/cjs/setupReactNative.native.js.map +1 -1
  106. package/dist/cjs/static-resolve.cjs +229 -0
  107. package/dist/cjs/static-resolve.native.cjs +242 -0
  108. package/dist/cjs/static-resolve.native.js +244 -0
  109. package/dist/cjs/static-resolve.native.js.map +1 -0
  110. package/dist/cjs/styled.cjs +23 -37
  111. package/dist/cjs/styled.native.cjs +22 -37
  112. package/dist/cjs/styled.native.js +22 -37
  113. package/dist/cjs/styled.native.js.map +1 -1
  114. package/dist/cjs/views/TamaguiProvider.cjs +4 -8
  115. package/dist/cjs/views/TamaguiProvider.native.cjs +4 -8
  116. package/dist/cjs/views/TamaguiProvider.native.js +4 -8
  117. package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
  118. package/dist/cjs/views/ThemeUpdate.cjs +1 -1
  119. package/dist/cjs/views/ThemeUpdate.native.cjs +1 -1
  120. package/dist/cjs/views/ThemeUpdate.native.js +1 -1
  121. package/dist/cjs/views/ThemeUpdate.native.js.map +1 -1
  122. package/dist/esm/createComponent.mjs +85 -88
  123. package/dist/esm/createComponent.mjs.map +1 -1
  124. package/dist/esm/createComponent.native.js +98 -105
  125. package/dist/esm/createComponent.native.js.map +1 -1
  126. package/dist/esm/createTamagui.mjs +10 -8
  127. package/dist/esm/createTamagui.mjs.map +1 -1
  128. package/dist/esm/createTamagui.native.js +10 -8
  129. package/dist/esm/createTamagui.native.js.map +1 -1
  130. package/dist/esm/dom/htmlRuntime.native.js +1 -0
  131. package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
  132. package/dist/esm/helpers/defaultAnimationDriver.mjs +0 -1
  133. package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
  134. package/dist/esm/helpers/defaultAnimationDriver.native.js +0 -1
  135. package/dist/esm/helpers/defaultAnimationDriver.native.js.map +1 -1
  136. package/dist/esm/helpers/directStyleCSS.mjs +320 -0
  137. package/dist/esm/helpers/directStyleCSS.mjs.map +1 -0
  138. package/dist/esm/helpers/directStyleCSS.native.js +1 -0
  139. package/dist/esm/helpers/directStyleCSSCompiled.mjs +11 -0
  140. package/dist/esm/helpers/directStyleCSSCompiled.mjs.map +1 -0
  141. package/dist/esm/helpers/directStyleCSSCompiled.native.js +15 -0
  142. package/dist/esm/helpers/directStyleCSSCompiled.native.js.map +1 -0
  143. package/dist/esm/helpers/getCSSStylesAtomic.mjs +86 -72
  144. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  145. package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +9 -0
  146. package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -0
  147. package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +9 -0
  148. package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -0
  149. package/dist/esm/helpers/getSplitStyles.mjs +2406 -545
  150. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  151. package/dist/esm/helpers/getSplitStyles.native.js +2751 -618
  152. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  153. package/dist/esm/helpers/getVariantExtras.mjs +8 -3
  154. package/dist/esm/helpers/getVariantExtras.mjs.map +1 -1
  155. package/dist/esm/helpers/getVariantExtras.native.js +8 -3
  156. package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
  157. package/dist/esm/helpers/insertStyleRule.mjs +3 -2
  158. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  159. package/dist/esm/helpers/insertStyleRule.native.js +71 -5
  160. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  161. package/dist/esm/helpers/mediaState.mjs +12 -1
  162. package/dist/esm/helpers/mediaState.mjs.map +1 -1
  163. package/dist/esm/helpers/mediaState.native.js +12 -1
  164. package/dist/esm/helpers/mediaState.native.js.map +1 -1
  165. package/dist/esm/helpers/normalizeStyle.mjs +16 -2
  166. package/dist/esm/helpers/normalizeStyle.mjs.map +1 -1
  167. package/dist/esm/helpers/normalizeStyle.native.js +16 -2
  168. package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
  169. package/dist/esm/helpers/resolveRem.mjs +1 -1
  170. package/dist/esm/helpers/resolveRem.mjs.map +1 -1
  171. package/dist/esm/helpers/skipProps.mjs +3 -1
  172. package/dist/esm/helpers/skipProps.mjs.map +1 -1
  173. package/dist/esm/helpers/skipProps.native.js +3 -1
  174. package/dist/esm/helpers/skipProps.native.js.map +1 -1
  175. package/dist/esm/helpers/styleFrontend.mjs +2 -4
  176. package/dist/esm/helpers/styleFrontend.mjs.map +1 -1
  177. package/dist/esm/helpers/styleFrontend.native.js +2 -6
  178. package/dist/esm/helpers/styleFrontend.native.js.map +1 -1
  179. package/dist/esm/helpers/styleToCSS.mjs +40 -0
  180. package/dist/esm/helpers/styleToCSS.mjs.map +1 -0
  181. package/dist/esm/helpers/styleToCSS.native.js +4 -0
  182. package/dist/esm/helpers/styleToCSS.native.js.map +1 -0
  183. package/dist/esm/helpers/subscribeToContextGroup.mjs +25 -1
  184. package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
  185. package/dist/esm/helpers/subscribeToContextGroup.native.js +42 -1
  186. package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
  187. package/dist/esm/helpers/variables.mjs +2 -1
  188. package/dist/esm/helpers/variables.mjs.map +1 -1
  189. package/dist/esm/helpers/variables.native.js +2 -1
  190. package/dist/esm/helpers/variables.native.js.map +1 -1
  191. package/dist/esm/helpers/wrapStyleTags.mjs +5 -3
  192. package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
  193. package/dist/esm/helpers/wrapStyleTags.native.js +3 -1
  194. package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
  195. package/dist/esm/hooks/useComponentState.mjs +71 -90
  196. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  197. package/dist/esm/hooks/useComponentState.native.js +71 -89
  198. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  199. package/dist/esm/hooks/useMedia.mjs +2 -15
  200. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  201. package/dist/esm/hooks/useMedia.native.js +2 -15
  202. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  203. package/dist/esm/hooks/useProps.mjs +7 -5
  204. package/dist/esm/hooks/useProps.mjs.map +1 -1
  205. package/dist/esm/hooks/useProps.native.js +7 -5
  206. package/dist/esm/hooks/useProps.native.js.map +1 -1
  207. package/dist/esm/hooks/useSplitStyles.mjs +17 -0
  208. package/dist/esm/hooks/useSplitStyles.mjs.map +1 -0
  209. package/dist/esm/hooks/useSplitStyles.native.js +14 -0
  210. package/dist/esm/hooks/useSplitStyles.native.js.map +1 -0
  211. package/dist/esm/index.js +57 -137
  212. package/dist/esm/index.mjs +57 -137
  213. package/dist/esm/index.native.js +57 -137
  214. package/dist/esm/insertFont.mjs +1 -1
  215. package/dist/esm/insertFont.mjs.map +1 -1
  216. package/dist/esm/insertFont.native.js +1 -0
  217. package/dist/esm/insertFont.native.js.map +1 -1
  218. package/dist/esm/internal-runtime.mjs +23 -4
  219. package/dist/esm/internal-runtime.mjs.map +1 -1
  220. package/dist/esm/internal-runtime.native.js +23 -4
  221. package/dist/esm/internal-runtime.native.js.map +1 -1
  222. package/dist/esm/setupReactNative.mjs +1 -29
  223. package/dist/esm/setupReactNative.mjs.map +1 -1
  224. package/dist/esm/setupReactNative.native.js +1 -3
  225. package/dist/esm/setupReactNative.native.js.map +1 -1
  226. package/dist/esm/static-resolve.mjs +194 -0
  227. package/dist/esm/static-resolve.mjs.map +1 -0
  228. package/dist/esm/static-resolve.native.js +205 -0
  229. package/dist/esm/static-resolve.native.js.map +1 -0
  230. package/dist/esm/styled.mjs +24 -40
  231. package/dist/esm/styled.mjs.map +1 -1
  232. package/dist/esm/styled.native.js +23 -40
  233. package/dist/esm/styled.native.js.map +1 -1
  234. package/dist/esm/views/TamaguiProvider.mjs +4 -8
  235. package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
  236. package/dist/esm/views/TamaguiProvider.native.js +4 -8
  237. package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
  238. package/dist/esm/views/ThemeUpdate.mjs +1 -1
  239. package/dist/esm/views/ThemeUpdate.mjs.map +1 -1
  240. package/dist/esm/views/ThemeUpdate.native.js +1 -1
  241. package/dist/esm/views/ThemeUpdate.native.js.map +1 -1
  242. package/package.json +25 -15
  243. package/reset.css +3 -3
  244. package/src/createComponent.tsx +175 -192
  245. package/src/createTamagui.ts +13 -10
  246. package/src/dom/html.native.tsx +99 -92
  247. package/src/dom/html.tsx +105 -98
  248. package/src/dom/htmlRuntime.native.tsx +1 -0
  249. package/src/helpers/defaultAnimationDriver.tsx +0 -1
  250. package/src/helpers/directStyleCSS.native.ts +1 -0
  251. package/src/helpers/directStyleCSS.ts +534 -0
  252. package/src/helpers/directStyleCSSCompiled.ts +32 -0
  253. package/src/helpers/getCSSStylesAtomic.ts +168 -88
  254. package/src/helpers/getCSSStylesAtomicCompiled.ts +9 -0
  255. package/src/helpers/getSplitStyles.tsx +4653 -1003
  256. package/src/helpers/getVariantExtras.tsx +15 -3
  257. package/src/helpers/insertStyleRule.tsx +8 -3
  258. package/src/helpers/mediaState.ts +15 -0
  259. package/src/helpers/normalizeStyle.ts +27 -2
  260. package/src/helpers/resolveRem.ts +1 -1
  261. package/src/helpers/skipProps.ts +3 -0
  262. package/src/helpers/styleFrontend.ts +20 -27
  263. package/src/helpers/styleToCSS.native.ts +1 -0
  264. package/src/helpers/styleToCSS.ts +43 -0
  265. package/src/helpers/subscribeToContextGroup.tsx +30 -0
  266. package/src/helpers/variables.ts +2 -1
  267. package/src/helpers/warnOnce.ts +3 -4
  268. package/src/helpers/wrapStyleTags.tsx +1 -1
  269. package/src/hooks/useComponentState.ts +118 -158
  270. package/src/hooks/useMedia.tsx +2 -18
  271. package/src/hooks/useProps.tsx +19 -15
  272. package/src/hooks/useSplitStyles.tsx +26 -0
  273. package/src/index.ts +298 -73
  274. package/src/insertFont.ts +5 -1
  275. package/src/internal-runtime.ts +49 -24
  276. package/src/internalRuntimeTypes.ts +2 -7
  277. package/src/setupReactNative.ts +7 -30
  278. package/src/static-resolve.ts +396 -0
  279. package/src/styled.tsx +34 -11
  280. package/src/types.tsx +41 -31
  281. package/src/views/TamaguiProvider.tsx +23 -22
  282. package/src/views/ThemeUpdate.tsx +3 -1
  283. package/types/createComponent.d.ts.map +1 -1
  284. package/types/createTamagui.d.ts.map +1 -1
  285. package/types/dom/html.d.ts +54 -50
  286. package/types/dom/html.d.ts.map +1 -1
  287. package/types/dom/html.native.d.ts +51 -47
  288. package/types/dom/html.native.d.ts.map +1 -1
  289. package/types/dom/htmlRuntime.native.d.ts.map +1 -1
  290. package/types/helpers/defaultAnimationDriver.d.ts.map +1 -1
  291. package/types/helpers/directStyleCSS.d.ts +28 -0
  292. package/types/helpers/directStyleCSS.d.ts.map +1 -0
  293. package/types/helpers/directStyleCSS.native.d.ts +2 -0
  294. package/types/helpers/directStyleCSS.native.d.ts.map +1 -0
  295. package/types/helpers/directStyleCSSCompiled.d.ts +10 -0
  296. package/types/helpers/directStyleCSSCompiled.d.ts.map +1 -0
  297. package/types/helpers/getCSSStylesAtomic.d.ts +22 -1
  298. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  299. package/types/helpers/getCSSStylesAtomicCompiled.d.ts +4 -0
  300. package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -0
  301. package/types/helpers/getSplitStyles.d.ts +11 -4
  302. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  303. package/types/helpers/getVariantExtras.d.ts.map +1 -1
  304. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  305. package/types/helpers/mediaState.d.ts +4 -0
  306. package/types/helpers/mediaState.d.ts.map +1 -1
  307. package/types/helpers/normalizeStyle.d.ts +1 -1
  308. package/types/helpers/normalizeStyle.d.ts.map +1 -1
  309. package/types/helpers/skipProps.d.ts +2 -0
  310. package/types/helpers/skipProps.d.ts.map +1 -1
  311. package/types/helpers/styleFrontend.d.ts +13 -17
  312. package/types/helpers/styleFrontend.d.ts.map +1 -1
  313. package/types/helpers/styleToCSS.d.ts +2 -0
  314. package/types/helpers/styleToCSS.d.ts.map +1 -0
  315. package/types/helpers/styleToCSS.native.d.ts +2 -0
  316. package/types/helpers/styleToCSS.native.d.ts.map +1 -0
  317. package/types/helpers/subscribeToContextGroup.d.ts +1 -0
  318. package/types/helpers/subscribeToContextGroup.d.ts.map +1 -1
  319. package/types/helpers/variables.d.ts.map +1 -1
  320. package/types/helpers/warnOnce.d.ts.map +1 -1
  321. package/types/helpers/webPropsToSkip.native.d.ts +5 -0
  322. package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
  323. package/types/hooks/useComponentState.d.ts +3 -2
  324. package/types/hooks/useComponentState.d.ts.map +1 -1
  325. package/types/hooks/useMedia.d.ts +1 -5
  326. package/types/hooks/useMedia.d.ts.map +1 -1
  327. package/types/hooks/useProps.d.ts.map +1 -1
  328. package/types/hooks/useSplitStyles.d.ts +3 -0
  329. package/types/hooks/useSplitStyles.d.ts.map +1 -0
  330. package/types/index.d.ts +58 -72
  331. package/types/index.d.ts.map +1 -1
  332. package/types/insertFont.d.ts.map +1 -1
  333. package/types/internal-runtime.d.ts +24 -11
  334. package/types/internal-runtime.d.ts.map +1 -1
  335. package/types/internalRuntimeTypes.d.ts +1 -6
  336. package/types/internalRuntimeTypes.d.ts.map +1 -1
  337. package/types/setupReactNative.d.ts +2 -3
  338. package/types/setupReactNative.d.ts.map +1 -1
  339. package/types/static-resolve.d.ts +79 -0
  340. package/types/static-resolve.d.ts.map +1 -0
  341. package/types/styled.d.ts.map +1 -1
  342. package/types/types.d.ts +30 -23
  343. package/types/types.d.ts.map +1 -1
  344. package/types/views/TamaguiProvider.d.ts.map +1 -1
  345. package/types/views/ThemeUpdate.d.ts.map +1 -1
  346. package/dist/cjs/constants/accessibilityDirectMap.cjs +0 -34
  347. package/dist/cjs/constants/accessibilityDirectMap.native.cjs +0 -36
  348. package/dist/cjs/constants/accessibilityDirectMap.native.js +0 -38
  349. package/dist/cjs/constants/accessibilityDirectMap.native.js.map +0 -1
  350. package/dist/cjs/helpers/directStyle.cjs +0 -962
  351. package/dist/cjs/helpers/directStyle.native.cjs +0 -1165
  352. package/dist/cjs/helpers/directStyle.native.js +0 -1167
  353. package/dist/cjs/helpers/directStyle.native.js.map +0 -1
  354. package/dist/cjs/helpers/frontendProgram.cjs +0 -43
  355. package/dist/cjs/helpers/frontendProgram.native.cjs +0 -49
  356. package/dist/cjs/helpers/frontendProgram.native.js +0 -51
  357. package/dist/cjs/helpers/frontendProgram.native.js.map +0 -1
  358. package/dist/cjs/helpers/getFontLanguage.native.js.map +0 -1
  359. package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs +0 -37
  360. package/dist/cjs/helpers/normalizeStylePropKeys.native.js +0 -39
  361. package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +0 -1
  362. package/dist/cjs/helpers/propMapper.cjs +0 -384
  363. package/dist/cjs/helpers/propMapper.native.cjs +0 -536
  364. package/dist/cjs/helpers/propMapper.native.js +0 -538
  365. package/dist/cjs/helpers/propMapper.native.js.map +0 -1
  366. package/dist/cjs/helpers/useRenderElement.cjs +0 -47
  367. package/dist/cjs/helpers/useRenderElement.native.cjs +0 -53
  368. package/dist/cjs/helpers/useRenderElement.native.js +0 -55
  369. package/dist/cjs/helpers/useRenderElement.native.js.map +0 -1
  370. package/dist/esm/constants/accessibilityDirectMap.mjs +0 -8
  371. package/dist/esm/constants/accessibilityDirectMap.mjs.map +0 -1
  372. package/dist/esm/constants/accessibilityDirectMap.native.js +0 -8
  373. package/dist/esm/constants/accessibilityDirectMap.native.js.map +0 -1
  374. package/dist/esm/helpers/directStyle.mjs +0 -929
  375. package/dist/esm/helpers/directStyle.mjs.map +0 -1
  376. package/dist/esm/helpers/directStyle.native.js +0 -1132
  377. package/dist/esm/helpers/directStyle.native.js.map +0 -1
  378. package/dist/esm/helpers/frontendProgram.mjs +0 -20
  379. package/dist/esm/helpers/frontendProgram.mjs.map +0 -1
  380. package/dist/esm/helpers/frontendProgram.native.js +0 -24
  381. package/dist/esm/helpers/frontendProgram.native.js.map +0 -1
  382. package/dist/esm/helpers/getFontLanguage.mjs +0 -4
  383. package/dist/esm/helpers/getFontLanguage.mjs.map +0 -1
  384. package/dist/esm/helpers/getFontLanguage.native.js +0 -6
  385. package/dist/esm/helpers/getFontLanguage.native.js.map +0 -1
  386. package/dist/esm/helpers/normalizeStylePropKeys.mjs +0 -4
  387. package/dist/esm/helpers/normalizeStylePropKeys.mjs.map +0 -1
  388. package/dist/esm/helpers/normalizeStylePropKeys.native.js +0 -15
  389. package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +0 -1
  390. package/dist/esm/helpers/propMapper.mjs +0 -360
  391. package/dist/esm/helpers/propMapper.mjs.map +0 -1
  392. package/dist/esm/helpers/propMapper.native.js +0 -511
  393. package/dist/esm/helpers/propMapper.native.js.map +0 -1
  394. package/dist/esm/helpers/useRenderElement.mjs +0 -26
  395. package/dist/esm/helpers/useRenderElement.mjs.map +0 -1
  396. package/dist/esm/helpers/useRenderElement.native.js +0 -31
  397. package/dist/esm/helpers/useRenderElement.native.js.map +0 -1
  398. package/src/constants/accessibilityDirectMap.native.tsx +0 -10
  399. package/src/constants/accessibilityDirectMap.tsx +0 -11
  400. package/src/helpers/directStyle.ts +0 -2294
  401. package/src/helpers/frontendProgram.ts +0 -48
  402. package/src/helpers/getFontLanguage.ts +0 -2
  403. package/src/helpers/normalizeStylePropKeys.native.ts +0 -12
  404. package/src/helpers/normalizeStylePropKeys.ts +0 -3
  405. package/src/helpers/propMapper.ts +0 -721
  406. package/src/helpers/useRenderElement.tsx +0 -73
  407. package/types/constants/accessibilityDirectMap.d.ts +0 -6
  408. package/types/constants/accessibilityDirectMap.d.ts.map +0 -1
  409. package/types/constants/accessibilityDirectMap.native.d.ts +0 -6
  410. package/types/constants/accessibilityDirectMap.native.d.ts.map +0 -1
  411. package/types/helpers/directStyle.d.ts +0 -15
  412. package/types/helpers/directStyle.d.ts.map +0 -1
  413. package/types/helpers/frontendProgram.d.ts +0 -10
  414. package/types/helpers/frontendProgram.d.ts.map +0 -1
  415. package/types/helpers/getFontLanguage.d.ts +0 -2
  416. package/types/helpers/getFontLanguage.d.ts.map +0 -1
  417. package/types/helpers/normalizeStylePropKeys.d.ts +0 -2
  418. package/types/helpers/normalizeStylePropKeys.d.ts.map +0 -1
  419. package/types/helpers/normalizeStylePropKeys.native.d.ts +0 -13
  420. package/types/helpers/normalizeStylePropKeys.native.d.ts.map +0 -1
  421. package/types/helpers/propMapper.d.ts +0 -6
  422. package/types/helpers/propMapper.d.ts.map +0 -1
  423. package/types/helpers/useRenderElement.d.ts +0 -13
  424. package/types/helpers/useRenderElement.d.ts.map +0 -1
@@ -1,376 +1,787 @@
1
- import { isAndroid, isClient, isWeb } from "@tamagui/constants";
2
- import { stylePropsAll, stylePropsText, stylePropsTransform, validStyles } from "@tamagui/helpers";
3
- import React from "react";
4
- import { STYLE_FRONTEND_PASSTHROUGH_PREFIX, STYLE_FRONTEND_PREPROCESSED } from "./styleFrontend.native.js";
1
+ import { isAndroid, isClient, platformMatches, supportsDynamicColorIOS } from "@tamagui/constants";
2
+ import { nonAnimatableStyleProps, stylePropsAll, stylePropsText, stylePropsTransform, tokenCategories, validStyles } from "@tamagui/helpers";
5
3
  import { getConfig, getFont } from "../config.native.js";
6
4
  import { isVariable } from "../createVariable.native.js";
7
5
  import { isDevTools } from "../constants/isDevTools.native.js";
8
- import { mediaState } from "./mediaState.native.js";
9
- import { scanFlatValue } from "@tamagui/style-grammar/runtime";
6
+ import { mediaKeyMatch, mediaState } from "./mediaState.native.js";
7
+ import { variantResolverNames } from "../types.native.js";
8
+ import { addTransformValue, canonicalStateModifierNames, createTransformAccumulator, finalizeTransformAccumulator, getTransformPartKeys, isContainerSizeQueryText, isModifierName, modifierKindMedia, modifierKindPlatform, modifierKindState, modifierKindTheme, removeTransformValue, scanFlatValue, stateModifierSelectors } from "@tamagui/style-grammar/runtime";
9
+ import { warnOnce, warnRefusedValue } from "./warnOnce.native.js";
10
+ import { expandStyle } from "./expandStyle.native.js";
10
11
  import { fixStyles } from "./expandStyles.native.js";
11
- import { styleToCSS } from "./getCSSStylesAtomic.native.js";
12
+ import { addComposition, canGenerateCSS, clearFrameAtomic, completeStreamingCSS, directStyleSignature, flushDirectStyles, flushDirectStyles as flushDirectStyles2, requestBorderStyleDefault, streamAtomic } from "./directStyleCSS.native.js";
13
+ import { getConfigRevisionState } from "./grammarConfig.native.js";
14
+ import { isColorStyleKey } from "./getDynamicVal.native.js";
12
15
  import { getDefaultProps } from "./getDefaultProps.native.js";
13
- import { isPlainObject } from "./isObj.native.js";
16
+ import { isObj, isPlainObject } from "./isObj.native.js";
14
17
  import { log } from "./log.native.js";
18
+ import { normalizeStyle } from "./normalizeStyle.native.js";
19
+ import { normalizeColor } from "./normalizeColor.native.js";
15
20
  import { normalizeValueWithProperty } from "./normalizeValueWithProperty.native.js";
16
- import { appendFlatClause, propMapper } from "./propMapper.native.js";
17
- import { clearDirectStyle, contributeStyleValue, contributeVariantClauseValue, flushDirectStyles, getDirectDynamicThemeAccess, resolveClauseChain } from "./directStyle.native.js";
18
- import { contributeFrontendProgram, isFrontendProgram } from "./frontendProgram.native.js";
19
- import { skipProps } from "./skipProps.native.js";
20
- import { sortString } from "./sortString.native.js";
21
+ import { parseNativeStyle } from "./parseNativeStyle.native.js";
22
+ import { parseNativeTransform } from "./parseNativeTransform.native.js";
23
+ import { getVariantExtras } from "./getVariantExtras.native.js";
24
+ import { isRemValue, resolveRem } from "./resolveRem.native.js";
25
+ import { expandSafeAreaValue, isSafeAreaKey } from "./resolveSafeArea.native.js";
26
+ import { resolveSafeAreaVariable } from "./resolveSafeAreaVariable.native.js";
27
+ import { resolveVariableValue } from "./resolveVariableValue.native.js";
28
+ import { THEME_REF_PREFIX } from "./themeRef.native.js";
29
+ import { getTokenCategoryForProperty, tokenCategoryByProperty } from "./tokenCategories.native.js";
30
+ import { HOC_CLASSNAME_MARKER, skipProps } from "./skipProps.native.js";
21
31
  import { styleOriginalValues } from "./styleOriginalValues.native.js";
22
32
  import { STYLE_TOKEN_PROVENANCE_KEY, getStyleTokenProvenance, setStyleTokenProvenance } from "./styleProvenance.native.js";
23
33
  import { transformsToString } from "./transformsToString.native.js";
24
34
 
35
+ export * from "./tokenCategories.native.js"
36
+
25
37
  function _type_of(obj) {
26
38
  "@swc/helpers - typeof";
27
39
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
28
40
  }
41
+ var TAMAGUI_CLASS_PROPS = "$$tamaguiClassProps";
29
42
  var shouldTrackStyleTokenProvenance = process.env.NODE_ENV === "development" && process.env.TAMAGUI_ENABLE_STYLE_TOKEN_PROVENANCE === "1";
30
43
  function compoundMatcherMatches(expected, actual) {
31
- if (Array.isArray(expected)) return expected.some(function(value) {
32
- return Object.is(value, actual);
33
- });
34
- return Object.is(expected, actual);
35
- }
36
- function compoundMatcherMatchesPayload(expected, payload) {
37
- if (Array.isArray(expected)) return expected.some(function(value) {
38
- return compoundMatcherMatchesPayload(value, payload);
39
- });
40
- return typeof expected === "string" ? expected === payload : String(expected) === payload;
41
- }
42
- var compoundScanHandler = {
43
- segment(ctx, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {
44
- if (!valid || start >= end) return;
45
- if (!compoundMatcherMatchesPayload(ctx[1], source.slice(start, end))) return;
46
- if (isBase) {
47
- ctx[4] = true;
44
+ if (Array.isArray(expected)) {
45
+ for (var index = 0; index < expected.length; index++) if (expected[index] === actual) return true;
46
+ return false;
47
+ }
48
+ return expected === actual;
49
+ }
50
+ function compoundMatcherMatchesPayload(expected, source, start, end) {
51
+ if (Array.isArray(expected)) {
52
+ for (var index = 0; index < expected.length; index++) if (compoundMatcherMatchesPayload(expected[index], source, start, end)) return true;
53
+ return false;
54
+ }
55
+ var expectedValue = typeof expected === "string" ? expected : String(expected);
56
+ if (expectedValue.length !== end - start) return false;
57
+ for (var index1 = 0; index1 < expectedValue.length; index1++) if (expectedValue.charCodeAt(index1) !== source.charCodeAt(start + index1)) return false;
58
+ return true;
59
+ }
60
+ var preparedCompoundsKey = /* @__PURE__ */ Symbol();
61
+ function prepareStaticConfigCompounds(staticConfig) {
62
+ var compoundVariants = staticConfig.compoundVariants;
63
+ var preparedConfig = staticConfig;
64
+ if (!(compoundVariants === null || compoundVariants === void 0 ? void 0 : compoundVariants.length)) {
65
+ preparedConfig[preparedCompoundsKey] = null;
66
+ return;
67
+ }
68
+ var selectorCounts = [];
69
+ var indexesByKey = /* @__PURE__ */ Object.create(null);
70
+ indexesByKey[preparedCompoundsKey] = selectorCounts;
71
+ for (var index = 0; index < compoundVariants.length; index++) {
72
+ var compoundVariant = compoundVariants[index];
73
+ var selectorCount = 0;
74
+ for (var key in compoundVariant) {
75
+ var _indexesByKey, _key;
76
+ if (key === "style") continue;
77
+ selectorCount++;
78
+ ((_indexesByKey = indexesByKey)[_key = key] || (_indexesByKey[_key] = [])).push(index);
79
+ }
80
+ selectorCounts[index] = selectorCount;
81
+ }
82
+ preparedConfig[preparedCompoundsKey] = indexesByKey;
83
+ }
84
+ var conditionWidth = 4;
85
+ var conditionValueOffset = 0;
86
+ var conditionFlagsOffset = 1;
87
+ var conditionPrecedenceOffset = 2;
88
+ var conditionWrapperOffset = 3;
89
+ var conditionActiveFlag = 1;
90
+ var conditionEmitFlag = 2;
91
+ var conditionResolvedFlag = 4;
92
+ var conditionEnterFlag = 8;
93
+ var conditionExitFlag = 16;
94
+ var conditionPlatformPseudoFlag = 32;
95
+ var conditionInitialFlags = conditionActiveFlag | conditionEmitFlag | conditionResolvedFlag;
96
+ var conditionTextWidth = 5;
97
+ var conditionKeyOffset = 0;
98
+ var conditionSelectorOffset = 1;
99
+ var conditionThemeOffset = 2;
100
+ var conditionUnsupportedStateOffset = 3;
101
+ var conditionUnresolvedNameOffset = 4;
102
+ var conditionNumbers = /* @__PURE__ */ new Float64Array(2048);
103
+ var conditionTexts = [];
104
+ var conditionWrappers = [];
105
+ var conditionWrapperTop = 0;
106
+ var conditionCursorTop = conditionWidth;
107
+ function reserveConditionCursor(cursor) {
108
+ var required = cursor + conditionWidth;
109
+ if (required > conditionTexts.length) {
110
+ var previous = conditionTexts.length;
111
+ conditionTexts.length = required;
112
+ conditionTexts.fill("", previous);
113
+ }
114
+ if (required <= conditionNumbers.length) return;
115
+ var length = conditionNumbers.length * 2;
116
+ while (length < required) length *= 2;
117
+ var previous1 = conditionNumbers;
118
+ conditionNumbers = new Float64Array(length);
119
+ conditionNumbers.set(previous1);
120
+ }
121
+ function conditionWrapperCopy(cursor) {
122
+ var wrapper = conditionNumbers[cursor + conditionWrapperOffset];
123
+ var count = wrapper & 7;
124
+ if (!count) return void 0;
125
+ var start = wrapper >> 3;
126
+ var wrappers = new Array(count);
127
+ for (var index = 0; index < count; index++) wrappers[index] = conditionWrappers[start + index];
128
+ return wrappers;
129
+ }
130
+ function setConditionUnresolved(cursor) {
131
+ var name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
132
+ conditionNumbers[cursor + conditionFlagsOffset] &= ~conditionResolvedFlag;
133
+ if (name) {
134
+ var _conditionTexts, _text;
135
+ var text = cursor + conditionUnresolvedNameOffset;
136
+ (_conditionTexts = conditionTexts)[_text = text] || (_conditionTexts[_text] = name);
137
+ }
138
+ }
139
+ function appendConditionWrapper(cursor, wrapper) {
140
+ conditionWrappers[conditionWrapperTop++] = wrapper;
141
+ conditionNumbers[cursor + conditionWrapperOffset]++;
142
+ }
143
+ function copyConditionCursor(target2, source) {
144
+ for (var offset = 0; offset <= conditionPrecedenceOffset; offset++) conditionNumbers[target2 + offset] = conditionNumbers[source + offset];
145
+ for (var offset1 = 0; offset1 < conditionTextWidth; offset1++) conditionTexts[target2 + offset1] = conditionTexts[source + offset1] || "";
146
+ var wrapper = conditionNumbers[source + conditionWrapperOffset];
147
+ var wrapperStart = wrapper >> 3;
148
+ var wrapperCount = wrapper & 7;
149
+ for (var index = 0; index < wrapperCount; index++) conditionWrappers[conditionWrapperTop++] = conditionWrappers[wrapperStart + index];
150
+ conditionNumbers[target2 + conditionWrapperOffset] += wrapperCount;
151
+ }
152
+ function resetConditionCursor(cursor, parent) {
153
+ conditionNumbers[cursor + conditionValueOffset] = 0;
154
+ conditionNumbers[cursor + conditionFlagsOffset] = conditionInitialFlags;
155
+ conditionNumbers[cursor + conditionPrecedenceOffset] = 0;
156
+ conditionNumbers[cursor + conditionWrapperOffset] = conditionWrapperTop << 3;
157
+ conditionTexts.fill("", cursor, cursor + conditionTextWidth);
158
+ if (parent) copyConditionCursor(cursor, parent);
159
+ }
160
+ function acquireConditionCursor() {
161
+ var parent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
162
+ var cursor = conditionCursorTop;
163
+ conditionCursorTop += conditionWidth;
164
+ reserveConditionCursor(cursor);
165
+ resetConditionCursor(cursor, parent);
166
+ return cursor;
167
+ }
168
+ function releaseConditionCursors(watermark) {
169
+ if (watermark >= conditionCursorTop) return;
170
+ conditionTexts.fill("", watermark, conditionCursorTop);
171
+ conditionCursorTop = watermark;
172
+ }
173
+ function releaseConditionPayloads(wrapperBase) {
174
+ conditionWrappers.fill("", wrapperBase, conditionWrapperTop);
175
+ conditionWrapperTop = wrapperBase;
176
+ }
177
+ function accumulateConditionAtom(state, cursor, kind, rank, name) {
178
+ var keySlot = cursor + conditionKeyOffset;
179
+ var key = conditionTexts[keySlot];
180
+ if (!key) conditionTexts[keySlot] = name;
181
+ else {
182
+ var slotStart = 0;
183
+ var inserted = false;
184
+ while (slotStart <= key.length) {
185
+ var slotEnd = key.indexOf(":", slotStart);
186
+ if (slotEnd === -1) slotEnd = key.length;
187
+ var order = 0;
188
+ var compareLength = Math.min(name.length, slotEnd - slotStart);
189
+ for (var offset = 0; offset < compareLength; offset++) {
190
+ order = name.charCodeAt(offset) - key.charCodeAt(slotStart + offset);
191
+ if (order) break;
192
+ }
193
+ order || (order = name.length - (slotEnd - slotStart));
194
+ if (!order) return;
195
+ if (order < 0) {
196
+ conditionTexts[keySlot] = `${key.slice(0, slotStart)}${name}:${key.slice(slotStart)}`;
197
+ inserted = true;
198
+ break;
199
+ }
200
+ if (slotEnd === key.length) break;
201
+ slotStart = slotEnd + 1;
202
+ }
203
+ if (!inserted) conditionTexts[keySlot] = `${key}:${name}`;
204
+ }
205
+ if (kind === modifierKindPlatform) {
206
+ var precedence = conditionNumbers[cursor + conditionPrecedenceOffset];
207
+ if (rank > precedence >>> 26) conditionNumbers[cursor + conditionPrecedenceOffset] = precedence & 67108863 | rank << 26;
208
+ if (!platformMatches(name)) conditionNumbers[cursor + conditionFlagsOffset] &= ~(conditionActiveFlag | conditionEmitFlag);
209
+ return;
210
+ }
211
+ var precedence1 = conditionNumbers[cursor + conditionPrecedenceOffset];
212
+ var depth = Math.min((precedence1 >> 23 & 7) + 1, 7);
213
+ var nextCategory = kind === modifierKindMedia ? 0 : kind === 6 ? 1 : kind === modifierKindTheme ? 2 : kind === 5 ? 3 : 4;
214
+ var categoryRank = precedence1 >> 20 & 7;
215
+ var withinRank = precedence1 & 1048575;
216
+ if (nextCategory > categoryRank) {
217
+ categoryRank = nextCategory;
218
+ withinRank = rank;
219
+ } else if (nextCategory === categoryRank && rank > withinRank) withinRank = rank;
220
+ precedence1 = precedence1 & -67108864 | depth << 23 | categoryRank << 20 | withinRank;
221
+ conditionNumbers[cursor + conditionPrecedenceOffset] = precedence1;
222
+ var buildCSS = canGenerateCSS && state.flatShouldDoClasses;
223
+ if (kind === modifierKindMedia) {
224
+ var _state_flatMediaState;
225
+ var _state;
226
+ var query = getConfigRevisionState(state.conf).mediaQueries[name];
227
+ if (!query) {
228
+ setConditionUnresolved(cursor, name);
48
229
  return;
49
230
  }
50
- if (!chainValid) return;
51
- var chain = source.slice(chainStart, chainEnd);
52
- if (ctx[2](chain)) ctx[3].push(chain);
53
- },
54
- chain() {
55
- return true;
56
- },
57
- error() {}
58
- };
59
- function matcherChains(expected, actual, isChain) {
60
- if (typeof actual === "string" && actual.indexOf(":") !== -1) {
61
- var scan = [
62
- actual,
63
- expected,
64
- isChain,
65
- [],
66
- false
67
- ];
68
- scanFlatValue(actual, compoundScanHandler, scan);
69
- if (scan[4]) return [""];
70
- return scan[3].length ? scan[3] : null;
71
- }
72
- if (actual && (typeof actual === "undefined" ? "undefined" : _type_of(actual)) === "object" && !Array.isArray(actual) && !isVariable(actual)) {
73
- var conditional = Object.prototype.hasOwnProperty.call(actual, "default");
74
- if (!conditional) for (var key in actual) {
75
- conditional = key.length > 0 && isChain(key);
76
- break;
231
+ if (buildCSS) appendConditionWrapper(cursor, `@media ${query}`);
232
+ if (!((_state_flatMediaState = state.flatMediaState) === null || _state_flatMediaState === void 0 ? void 0 : _state_flatMediaState[name])) conditionNumbers[cursor + conditionFlagsOffset] &= ~conditionActiveFlag;
233
+ ((_state = state).flatMediaKeys || (_state.flatMediaKeys = /* @__PURE__ */ new Set())).add(name);
234
+ } else if (kind === modifierKindTheme) {
235
+ var _state_flatThemeName;
236
+ conditionTexts[cursor + conditionThemeOffset] = name;
237
+ if (buildCSS) {
238
+ var selector = cursor + conditionSelectorOffset;
239
+ conditionTexts[selector] += `:where(.t_${name}, .t_${name} *)`;
240
+ }
241
+ if (state.flatThemeName !== name && ((_state_flatThemeName = state.flatThemeName) === null || _state_flatThemeName === void 0 ? void 0 : _state_flatThemeName.startsWith(`${name}_`)) !== true) conditionNumbers[cursor + conditionFlagsOffset] &= ~conditionActiveFlag;
242
+ } else if (kind === 5) {
243
+ var _state_componentState_group, _state_flatGroupContext, _this;
244
+ var _state1;
245
+ var slash = name.indexOf("/");
246
+ var groupName = slash === -1 ? "true" : name.slice(slash + 1);
247
+ var stateSelector = stateModifierSelectors[rank];
248
+ var conditionStateName = canonicalStateModifierNames[rank];
249
+ if (buildCSS) {
250
+ var selector1 = cursor + conditionSelectorOffset;
251
+ conditionTexts[selector1] += `:where(.t_group_${groupName}${stateSelector} *)`;
252
+ if (rank === 0) appendConditionWrapper(cursor, "@media (hover: hover)");
253
+ }
254
+ var component = (_state_componentState_group = state.componentState.group) === null || _state_componentState_group === void 0 ? void 0 : _state_componentState_group[groupName];
255
+ var context = (_state_flatGroupContext = state.flatGroupContext) === null || _state_flatGroupContext === void 0 ? void 0 : _state_flatGroupContext[groupName];
256
+ var _component_pseudo;
257
+ if (!((_this = (_component_pseudo = component === null || component === void 0 ? void 0 : component.pseudo) !== null && _component_pseudo !== void 0 ? _component_pseudo : context === null || context === void 0 ? void 0 : context.state.pseudo) === null || _this === void 0 ? void 0 : _this[conditionStateName])) conditionNumbers[cursor + conditionFlagsOffset] &= ~conditionActiveFlag;
258
+ ((_state1 = state).flatGroupKeys || (_state1.flatGroupKeys = /* @__PURE__ */ new Set())).add(groupName);
259
+ } else if (kind === 6) {
260
+ var _state_componentState_group1, _state_flatGroupContext1, _state_flatGroupContext2, _component_media;
261
+ var _state2, _state3;
262
+ var slash1 = name.indexOf("/");
263
+ var containerSize = name.slice(1, slash1 === -1 ? name.length : slash1);
264
+ var containerName = slash1 === -1 ? "" : name.slice(slash1 + 1);
265
+ var containerQuery = getConfigRevisionState(state.conf).mediaQueries[containerSize];
266
+ var groupKey = `@${containerName}`;
267
+ if (buildCSS) appendConditionWrapper(cursor, containerName ? `@container ${containerName} ${containerQuery}` : `@container ${containerQuery}`);
268
+ var component1 = (_state_componentState_group1 = state.componentState.group) === null || _state_componentState_group1 === void 0 ? void 0 : _state_componentState_group1[groupKey];
269
+ var context1 = (_state_flatGroupContext1 = state.flatGroupContext) === null || _state_flatGroupContext1 === void 0 ? void 0 : _state_flatGroupContext1[groupKey];
270
+ if (process.env.NODE_ENV === "development" && containerName && !component1 && !context1 && ((_state_flatGroupContext2 = state.flatGroupContext) === null || _state_flatGroupContext2 === void 0 ? void 0 : _state_flatGroupContext2[containerName])) warnOnce(`group-container:${containerName}`, `@${containerSize}/${containerName}: targets group="${containerName}", but groups no longer establish query containers. Add container="${containerName}" to that group.`);
271
+ var match = component1 === null || component1 === void 0 ? void 0 : (_component_media = component1.media) === null || _component_media === void 0 ? void 0 : _component_media[containerSize];
272
+ if (!(match === void 0 ? (context1 === null || context1 === void 0 ? void 0 : context1.state.layout) && mediaKeyMatch(containerSize, context1.state.layout) : match)) conditionNumbers[cursor + conditionFlagsOffset] &= ~conditionActiveFlag;
273
+ ((_state2 = state).flatGroupKeys || (_state2.flatGroupKeys = /* @__PURE__ */ new Set())).add(groupKey);
274
+ ((_state3 = state).flatGroupMedia || (_state3.flatGroupMedia = /* @__PURE__ */ new Set())).add(containerSize);
275
+ } else {
276
+ var stateSelector1 = stateModifierSelectors[rank];
277
+ conditionNumbers[cursor + conditionFlagsOffset] += 64;
278
+ if (stateSelector1[0] === "[" && name !== "disabled") conditionTexts[cursor + conditionUnsupportedStateOffset] = name;
279
+ if (rank === 6) conditionNumbers[cursor + conditionFlagsOffset] |= conditionEnterFlag;
280
+ else if (rank === 7) conditionNumbers[cursor + conditionFlagsOffset] |= conditionExitFlag;
281
+ else if (rank === 0 || rank === 2 || rank === 4) conditionNumbers[cursor + conditionFlagsOffset] |= conditionPlatformPseudoFlag;
282
+ if (buildCSS) {
283
+ var selector2 = cursor + conditionSelectorOffset;
284
+ if (stateSelector1[0] === ".") conditionTexts[selector2] += `:is(${stateSelector1}, ${stateSelector1} *)`;
285
+ else conditionTexts[selector2] += stateSelector1;
286
+ if (rank === 0) appendConditionWrapper(cursor, "@media (hover: hover)");
77
287
  }
78
- if (conditional) {
79
- var chains = [];
80
- for (var key1 in actual) {
81
- var payload = actual[key1];
82
- if (payload == null || !compoundMatcherMatches(expected, payload)) continue;
83
- if (key1 === "default") return [""];
84
- if (isChain(key1)) chains.push(key1);
288
+ var component2 = state.componentState;
289
+ if (!(rank === 0 ? !!component2.hover : rank === 4 ? !!(component2.press || component2.pressIn) : rank === 2 ? !!component2.focus : rank === 3 ? !!component2.focusVisible : rank === 1 ? !!component2.focusWithin : rank === 5 ? !!(component2.disabled || state.props.disabled) : rank === 6 ? !!component2.unmounted : rank === 7 ? !!state.styleProps.isExiting : false)) conditionNumbers[cursor + conditionFlagsOffset] &= ~conditionActiveFlag;
290
+ if (stateSelector1[0] === ":") {
291
+ var _state4;
292
+ ((_state4 = state).flatStateKeys || (_state4.flatStateKeys = /* @__PURE__ */ new Set())).add(name);
293
+ }
294
+ }
295
+ }
296
+ function resolveConditionModifier(state, cursor, modifier) {
297
+ var compiled = getConfigRevisionState(state.conf);
298
+ var code = compiled.modifiers[modifier];
299
+ var kind = code & 7;
300
+ var rank = code >> 3;
301
+ if (kind === modifierKindState) {
302
+ accumulateConditionAtom(state, cursor, kind, rank, canonicalStateModifierNames[rank]);
303
+ return;
304
+ }
305
+ if (!kind && modifier.startsWith("group-")) {
306
+ var slash = modifier.indexOf("/");
307
+ var authoredState = modifier.slice(6, slash === -1 ? void 0 : slash);
308
+ code = compiled.modifiers[authoredState];
309
+ if ((code & 7) === modifierKindState) {
310
+ rank = code >> 3;
311
+ var groupName = slash === -1 ? "true" : modifier.slice(slash + 1);
312
+ if (rank !== 6 && rank !== 7 && (slash === -1 || isModifierName(groupName, 0, groupName.length))) {
313
+ var stateName = canonicalStateModifierNames[rank];
314
+ accumulateConditionAtom(state, cursor, 5, rank, `group-${stateName}${slash === -1 ? "" : modifier.slice(slash)}`);
315
+ return;
85
316
  }
86
- return chains.length ? chains : null;
87
317
  }
318
+ } else if (!kind && modifier.charCodeAt(0) === 64) {
319
+ var slash1 = modifier.indexOf("/");
320
+ var containerSize = modifier.slice(1, slash1 === -1 ? void 0 : slash1);
321
+ var containerName = slash1 === -1 ? "" : modifier.slice(slash1 + 1);
322
+ var containerQuery = "";
323
+ if (isModifierName(containerSize, 0, containerSize.length) && (slash1 === -1 || isModifierName(containerName, 0, containerName.length)) && ((code = compiled.modifiers[containerSize]) & 7) === modifierKindMedia && (containerQuery = compiled.mediaQueries[containerSize]) && isContainerSizeQueryText(containerQuery)) {
324
+ accumulateConditionAtom(state, cursor, 6, code >> 3, modifier);
325
+ return;
326
+ }
327
+ } else if (kind) {
328
+ accumulateConditionAtom(state, cursor, kind, rank, modifier);
329
+ return;
88
330
  }
89
- return compoundMatcherMatches(expected, actual) ? [""] : null;
331
+ setConditionUnresolved(cursor, modifier);
90
332
  }
91
- function isConditionalObjectValue(value, isChain) {
92
- if (Object.prototype.hasOwnProperty.call(value, "default")) return true;
93
- for (var key in value) return key.length > 0 && isChain(key);
94
- return false;
333
+ function resolveConditionText(state, cursor, text) {
334
+ var start = 0;
335
+ for (var index = 0; index <= text.length; index++) {
336
+ if (index !== text.length && text.charCodeAt(index) !== 58) continue;
337
+ if (index === start) {
338
+ setConditionUnresolved(cursor);
339
+ return;
340
+ }
341
+ if (!(conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag)) return;
342
+ resolveConditionModifier(state, cursor, text.slice(start, index));
343
+ start = index + 1;
344
+ }
95
345
  }
96
- var joinChains = function(a, b) {
97
- if (!a) return b;
98
- if (!b) return a;
99
- var segments = a.split(":");
100
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
101
- try {
102
- for (var _iterator = b.split(":")[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
103
- var segment = _step.value;
104
- if (!segments.includes(segment)) segments.push(segment);
346
+ function commitConditionCursor(state, cursor) {
347
+ if (!(conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag)) {
348
+ conditionNumbers[cursor + conditionValueOffset] = 0;
349
+ return 0;
350
+ }
351
+ var key = conditionTexts[cursor + conditionKeyOffset] || "";
352
+ var precedence = conditionNumbers[cursor + conditionPrecedenceOffset];
353
+ var depth = precedence >> 23 & 7;
354
+ if (depth > 5) throw new Error(`a flat value clause supports at most 5 non-platform conditions; received ${depth} in "${key}:"`);
355
+ var flags = conditionNumbers[cursor + conditionFlagsOffset];
356
+ var condition = precedence * 256 + (flags >> 6) * 32 + 16 + (flags & conditionActiveFlag ? 1 : 0) + (flags & conditionEmitFlag ? 2 : 0) + (flags & conditionEnterFlag ? 4 : 0) + (flags & conditionExitFlag ? 8 : 0);
357
+ conditionNumbers[cursor + conditionValueOffset] = condition;
358
+ return condition;
359
+ }
360
+ function acquireConditionKeyCursor(state, key) {
361
+ var cursor = acquireConditionCursor();
362
+ if (key) {
363
+ resolveConditionText(state, cursor, key);
364
+ commitConditionCursor(state, cursor);
365
+ }
366
+ return cursor;
367
+ }
368
+ function combineConditionKeys(state, first, second) {
369
+ if (!first) return second;
370
+ if (!second || first === second) return first;
371
+ var watermark = conditionCursorTop;
372
+ var target2 = acquireConditionKeyCursor(state, first);
373
+ resolveConditionText(state, target2, second);
374
+ commitConditionCursor(state, target2);
375
+ var key = conditionTexts[target2 + conditionKeyOffset] || "";
376
+ releaseConditionCursors(watermark);
377
+ return key;
378
+ }
379
+ function freshCompoundState() {
380
+ return {
381
+ seen: 0,
382
+ failed: false,
383
+ matchedBase: false,
384
+ scanned: false,
385
+ pending: null,
386
+ combinations: null
387
+ };
388
+ }
389
+ function beginCompoundEdges(indexes, states) {
390
+ if (!indexes) return;
391
+ for (var index = 0; index < indexes.length; index++) {
392
+ var _states, _indexes_index;
393
+ var state = (_states = states)[_indexes_index = indexes[index]] || (_states[_indexes_index] = freshCompoundState());
394
+ state.pending = null;
395
+ state.matchedBase = false;
396
+ state.scanned = false;
397
+ }
398
+ }
399
+ function feedCompoundSegment(state, source, start, end, isBase, valid, conditionKey) {
400
+ if (state.flatCompoundOutputDepth) return;
401
+ var pass = state.flatPass;
402
+ var indexes = pass[passCompoundIndexes];
403
+ var states = pass[passCompoundStates];
404
+ var key = pass[passCompoundKey];
405
+ if (!indexes || !states || !key) return;
406
+ var compoundVariants = state.staticConfig.compoundVariants;
407
+ for (var index = 0; index < indexes.length; index++) {
408
+ var _states, _compoundIndex;
409
+ var compoundIndex = indexes[index];
410
+ var compoundState = (_states = states)[_compoundIndex = compoundIndex] || (_states[_compoundIndex] = freshCompoundState());
411
+ compoundState.scanned = true;
412
+ if (!valid || start === end || !compoundMatcherMatchesPayload(compoundVariants[compoundIndex][key], source, start, end)) continue;
413
+ if (isBase) compoundState.matchedBase = true;
414
+ else if (!compoundState.matchedBase) {
415
+ var _compoundState;
416
+ ((_compoundState = compoundState).pending || (_compoundState.pending = [])).push(conditionKey);
105
417
  }
106
- } catch (err) {
107
- _didIteratorError = true;
108
- _iteratorError = err;
109
- } finally {
110
- try {
111
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
112
- } finally {
113
- if (_didIteratorError) throw _iteratorError;
418
+ }
419
+ }
420
+ var compoundOnlyHandler = {
421
+ segment(state, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {
422
+ if (isBase) {
423
+ feedCompoundSegment(state, source, start, end, true, valid, "");
424
+ return;
425
+ }
426
+ var cursor = state.flatScanCursor;
427
+ if (!chainValid || !cursor || !(conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) || !conditionNumbers[cursor + conditionValueOffset]) {
428
+ feedCompoundSegment(state, source, start, end, false, false, "");
429
+ return;
430
+ }
431
+ feedCompoundSegment(state, source, start, end, false, valid, conditionTexts[cursor + conditionKeyOffset] || "");
432
+ },
433
+ modifier(state, start, end, valid, first, source) {
434
+ var cursor = state.flatScanCursor;
435
+ if (!cursor) cursor = state.flatScanCursor = acquireConditionCursor();
436
+ else if (first) resetConditionCursor(cursor, 0);
437
+ if (!valid) {
438
+ setConditionUnresolved(cursor);
439
+ return;
114
440
  }
441
+ if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) resolveConditionModifier(state, cursor, source.slice(start, end));
442
+ },
443
+ chain(state, _start, _end, valid) {
444
+ var cursor = state.flatScanCursor;
445
+ if (cursor) {
446
+ if (!valid) setConditionUnresolved(cursor);
447
+ if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) commitConditionCursor(state, cursor);
448
+ }
449
+ return true;
115
450
  }
116
- return segments.join(":");
117
451
  };
118
- function compoundVariantMatchChains(compoundVariant, props, isChain) {
119
- var chains = [""];
120
- for (var key in compoundVariant) {
121
- if (key === "style") continue;
122
- var keyChains = matcherChains(compoundVariant[key], props[key], isChain);
123
- if (!keyChains) return null;
124
- var next = [];
125
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
452
+ function finishCompoundEdges(pass, key, value, indexes, states) {
453
+ if (!indexes) return;
454
+ var state = pass[passStyleState];
455
+ pass[passCompoundIndexes] = indexes;
456
+ pass[passCompoundKey] = key;
457
+ pass[passCompoundStates] = states;
458
+ var needsScan = false;
459
+ for (var index = 0; index < indexes.length; index++) {
460
+ var _states, _indexes_index;
461
+ if (!((_states = states)[_indexes_index = indexes[index]] || (_states[_indexes_index] = freshCompoundState())).scanned) {
462
+ needsScan = true;
463
+ break;
464
+ }
465
+ }
466
+ if (needsScan) if (typeof value === "string") {
467
+ var watermark = conditionCursorTop;
468
+ var previousCursor = state.flatScanCursor;
469
+ state.flatScanCursor = null;
126
470
  try {
127
- for (var _iterator = chains[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
128
- var a = _step.value;
129
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
130
- try {
131
- for (var _iterator1 = keyChains[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
132
- var b = _step1.value;
133
- var joined = joinChains(a, b);
134
- if (!next.includes(joined)) next.push(joined);
135
- }
136
- } catch (err) {
137
- _didIteratorError1 = true;
138
- _iteratorError1 = err;
139
- } finally {
140
- try {
141
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
142
- } finally {
143
- if (_didIteratorError1) throw _iteratorError1;
144
- }
145
- }
146
- }
147
- } catch (err) {
148
- _didIteratorError = true;
149
- _iteratorError = err;
471
+ scanFlatValue(value, compoundOnlyHandler, state);
150
472
  } finally {
151
- try {
152
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
153
- } finally {
154
- if (_didIteratorError) throw _iteratorError;
473
+ state.flatScanCursor = previousCursor;
474
+ releaseConditionCursors(watermark);
475
+ }
476
+ } else if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !isVariable(value) && Object.prototype.hasOwnProperty.call(value, "default")) for (var conditionKey in value) {
477
+ var payload = value[conditionKey];
478
+ if (conditionKey === "default") {
479
+ var payloadString = String(payload);
480
+ feedCompoundSegment(state, payloadString, 0, payloadString.length, true, true, "");
481
+ } else {
482
+ var watermark1 = conditionCursorTop;
483
+ var cursor = acquireConditionCursor();
484
+ resolveConditionText(state, cursor, conditionKey);
485
+ var condition = commitConditionCursor(state, cursor);
486
+ var payloadString1 = String(payload);
487
+ feedCompoundSegment(state, payloadString1, 0, payloadString1.length, false, Boolean(condition), condition ? conditionTexts[cursor + conditionKeyOffset] || "" : "");
488
+ releaseConditionCursors(watermark1);
489
+ }
490
+ }
491
+ else {
492
+ var variants = state.staticConfig.compoundVariants;
493
+ for (var index1 = 0; index1 < indexes.length; index1++) {
494
+ var _states1, _compoundIndex;
495
+ var compoundIndex = indexes[index1];
496
+ var compoundState1 = (_states1 = states)[_compoundIndex = compoundIndex] || (_states1[_compoundIndex] = freshCompoundState());
497
+ compoundState1.scanned = true;
498
+ if (compoundMatcherMatches(variants[compoundIndex][key], value)) compoundState1.matchedBase = true;
499
+ }
500
+ }
501
+ var variants1 = state.staticConfig.compoundVariants;
502
+ var selectorCounts = state.staticConfig[preparedCompoundsKey][preparedCompoundsKey];
503
+ for (var index2 = 0; index2 < indexes.length; index2++) {
504
+ var compoundIndex1 = indexes[index2];
505
+ var compoundState2 = states[compoundIndex1];
506
+ if (compoundState2.failed) continue;
507
+ var branches = compoundState2.matchedBase ? [""] : compoundState2.pending;
508
+ if (!branches || !branches.length) {
509
+ compoundState2.failed = true;
510
+ continue;
511
+ }
512
+ if (!compoundState2.seen) compoundState2.combinations = branches;
513
+ else {
514
+ var previous = compoundState2.combinations;
515
+ var next = [];
516
+ for (var left = 0; left < previous.length; left++) for (var right = 0; right < branches.length; right++) {
517
+ var conditionKey1 = combineConditionKeys(state, previous[left], branches[right]);
518
+ if (!next.includes(conditionKey1)) next.push(conditionKey1);
155
519
  }
520
+ compoundState2.combinations = next;
521
+ }
522
+ compoundState2.seen++;
523
+ if (compoundState2.seen !== selectorCounts[compoundIndex1]) continue;
524
+ var style = variants1[compoundIndex1].style;
525
+ if (!isPlainObject(style)) continue;
526
+ var combinations = compoundState2.combinations;
527
+ for (var combination = 0; combination < combinations.length; combination++) for (var styleKey in style) contributeProp(pass, styleKey, style[styleKey], void 0, states, combinations[combination]);
528
+ }
529
+ }
530
+ function classifyConditionalObject(value, state, isChain, firstCursor) {
531
+ if (Object.prototype.hasOwnProperty.call(value, "default")) return -1;
532
+ for (var key in value) {
533
+ if (!key.length) return 0;
534
+ if (!state) return (isChain === null || isChain === void 0 ? void 0 : isChain(key)) ? 1 : 0;
535
+ var watermark = conditionCursorTop;
536
+ var cursor = firstCursor || acquireConditionCursor();
537
+ try {
538
+ resolveConditionText(state, cursor, key);
539
+ return commitConditionCursor(state, cursor);
540
+ } finally {
541
+ if (!firstCursor) releaseConditionCursors(watermark);
156
542
  }
157
- chains = next;
158
543
  }
159
- return chains;
544
+ return 0;
160
545
  }
546
+ var passStyleState = 0;
547
+ var passClassName = 21;
548
+ var passShouldDoClasses = 22;
549
+ var passFrontendGroup = 26;
550
+ var passFrontendContainer = 27;
551
+ var passFrontendContainerType = 28;
552
+ var passHocMappedProperties = 29;
553
+ var passHocMappedClasses = 30;
554
+ var passCompoundIndexes = 31;
555
+ var passCompoundKey = 32;
556
+ var passCompoundStates = 33;
557
+ var passParentCursor = 35;
558
+ var passMapSourceKey = 36;
559
+ var passMapFlags = 37;
560
+ var passNoSkipFlag = 1;
561
+ var passDisableShorthandsFlag = 2;
562
+ var passNoExpandFlag = 4;
563
+ var passNoMergeFlag = 8;
564
+ var passHocFlag = 16;
565
+ var passTextFlag = 32;
566
+ var passInputFlag = 64;
567
+ var passAsChildStyleFlag = 128;
161
568
  var styledDefaultsCache = /* @__PURE__ */ new WeakMap();
162
- function getStyledDefaults(staticConfig) {
163
- var entries = styledDefaultsCache.get(staticConfig);
164
- if (entries === void 0) {
165
- entries = null;
569
+ function getStyledDefaults(staticConfig, shorthands) {
570
+ var prepared = styledDefaultsCache.get(staticConfig);
571
+ if (prepared === void 0) {
572
+ var entries = null;
166
573
  var defaults = staticConfig.defaultProps;
167
- if (defaults) for (var key in defaults) (entries || (entries = [])).push([key, defaults[key]]);
168
- styledDefaultsCache.set(staticConfig, entries);
574
+ if (defaults) for (var key in defaults) {
575
+ if (!(key in stylePropsAll || key in shorthands)) continue;
576
+ var value = defaults[key];
577
+ if (maybeStyleProgram(value)) (entries || (entries = [])).push(key, value);
578
+ }
579
+ prepared = entries;
580
+ styledDefaultsCache.set(staticConfig, prepared);
169
581
  }
170
- return entries;
582
+ return prepared;
171
583
  }
172
584
  var maybeStyleProgram = function(value) {
173
- return typeof value === "string" ? value.includes(":") : !!value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !isVariable(value);
585
+ return typeof value === "string" ? value.indexOf(":") !== -1 : !!value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !isVariable(value);
174
586
  };
175
- function contributeDisplacedStyledDefaults(styledDefaults, processedProps, shorthands, contribute) {
587
+ function contributeDisplacedStyledDefaults(styledDefaults, processedProps, pass) {
176
588
  if (!styledDefaults) return;
177
- for (var index = 0; index < styledDefaults.length; index++) {
178
- var key = styledDefaults[index][0];
179
- var styledValue = styledDefaults[index][1];
589
+ for (var offset = 0; offset < styledDefaults.length; offset += 2) {
590
+ var key = styledDefaults[offset];
591
+ var value = styledDefaults[offset + 1];
180
592
  var propValue = processedProps[key];
181
- if (!(key in stylePropsAll) && !(key in shorthands)) continue;
182
- if (propValue !== void 0 && propValue !== styledValue && (maybeStyleProgram(styledValue) || maybeStyleProgram(propValue))) contribute(key, styledValue);
593
+ if (propValue !== void 0 && propValue !== value) contributeProp(pass, key, value);
594
+ }
595
+ }
596
+ function injectDisplacedStyledDefault(pass, key, value) {
597
+ var _pass__defaultProps;
598
+ var defaultValue = (_pass__defaultProps = pass[4].defaultProps) === null || _pass__defaultProps === void 0 ? void 0 : _pass__defaultProps[key];
599
+ if (defaultValue === void 0 || value === void 0 || value === defaultValue || maybeStyleProgram(defaultValue)) return;
600
+ var state = pass[passStyleState];
601
+ state.flatWeakContribution = true;
602
+ try {
603
+ contributeProp(pass, key, defaultValue);
604
+ } finally {
605
+ state.flatWeakContribution = false;
183
606
  }
184
607
  }
185
- function forEachPropInForwardOrder(processedProps, staticConfig, shorthands, contribute, isChain) {
608
+ function forEachPropInForwardOrder(pass) {
609
+ var _staticConfig_compoundVariants;
610
+ var styleState = pass[passStyleState];
611
+ var staticConfig = styleState.staticConfig;
612
+ var processedProps = styleState.props;
613
+ var shorthands = styleState.conf.shorthands;
186
614
  var processedBaseStyle = staticConfig.baseStyle;
187
- var compoundVariants = staticConfig.compoundVariants;
188
- var styledDefaults = getStyledDefaults(staticConfig);
189
- if (!(compoundVariants === null || compoundVariants === void 0 ? void 0 : compoundVariants.length)) {
190
- if (processedBaseStyle) for (var key in processedBaseStyle) contribute(key, processedBaseStyle[key]);
191
- contributeDisplacedStyledDefaults(styledDefaults, processedProps, shorthands, contribute);
192
- for (var key1 in processedProps) contribute(key1, processedProps[key1]);
615
+ var styledDefaults = getStyledDefaults(staticConfig, shorthands);
616
+ var directState = styleState;
617
+ var preparedCompounds = staticConfig[preparedCompoundsKey];
618
+ if (preparedCompounds === void 0 && ((_staticConfig_compoundVariants = staticConfig.compoundVariants) === null || _staticConfig_compoundVariants === void 0 ? void 0 : _staticConfig_compoundVariants.length)) throw new Error("A component with compoundVariants reached style resolution before its static config was prepared.");
619
+ var conditionWrapperBase = conditionWrapperTop;
620
+ if (!preparedCompounds) {
621
+ try {
622
+ if (processedBaseStyle) for (var key in processedBaseStyle) contributeProp(pass, key, processedBaseStyle[key]);
623
+ contributeDisplacedStyledDefaults(styledDefaults, processedProps, pass);
624
+ for (var key1 in processedProps) {
625
+ var value = processedProps[key1];
626
+ directState.flatPropSawCondition = false;
627
+ contributeProp(pass, key1, value);
628
+ if (directState.flatPropSawCondition) injectDisplacedStyledDefault(pass, key1, value);
629
+ }
630
+ } finally {
631
+ releaseConditionPayloads(conditionWrapperBase);
632
+ }
193
633
  return;
194
634
  }
195
- var propEntries = Object.entries(processedProps);
196
- var orderedEntries = processedBaseStyle ? Object.entries(processedBaseStyle) : [];
197
- contributeDisplacedStyledDefaults(styledDefaults, processedProps, shorthands, function(k, v) {
198
- return orderedEntries.push([k, v]);
199
- });
200
- var compoundsByAnchor = /* @__PURE__ */ new Map();
201
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
635
+ var compoundVariants = staticConfig.compoundVariants;
636
+ var compoundStates = new Array(compoundVariants.length);
202
637
  try {
203
- for (var _iterator = compoundVariants[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
204
- var compoundVariant = _step.value;
205
- var chains = compoundVariantMatchChains(compoundVariant, processedProps, isChain);
206
- if (!chains) continue;
207
- var { style } = compoundVariant;
638
+ if (processedBaseStyle) for (var key2 in processedBaseStyle) contributeProp(pass, key2, processedBaseStyle[key2]);
639
+ contributeDisplacedStyledDefaults(styledDefaults, processedProps, pass);
640
+ var selectorCounts = preparedCompounds[preparedCompoundsKey];
641
+ for (var compoundIndex = 0; compoundIndex < compoundVariants.length; compoundIndex++) {
642
+ if (selectorCounts[compoundIndex]) continue;
643
+ var style = compoundVariants[compoundIndex].style;
208
644
  if (!isPlainObject(style)) continue;
209
- var anchor = -1;
210
- for (var selectorKey in compoundVariant) {
211
- if (selectorKey === "style") continue;
212
- for (var index = propEntries.length - 1; index >= 0; index--) if (propEntries[index][0] === selectorKey) {
213
- anchor = Math.max(anchor, index);
214
- break;
215
- }
216
- }
217
- var entries = compoundsByAnchor.get(anchor) || [];
218
- for (var key2 in style) {
219
- var value = style[key2];
220
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
221
- try {
222
- for (var _iterator1 = chains[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
223
- var chain = _step1.value;
224
- if (!chain) {
225
- entries.push([key2, value]);
226
- continue;
227
- }
228
- if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !isVariable(value) && isConditionalObjectValue(value, isChain)) {
229
- var composed = {};
230
- for (var inner in value) composed[inner === "default" ? chain : `${chain}:${inner}`] = value[inner];
231
- entries.push([key2, composed]);
232
- continue;
233
- }
234
- if (typeof value === "string" && value.includes(":")) {
235
- if (process.env.NODE_ENV === "development") console.warn(`[tamagui] compound variant "${key2}" carries a clause string and matched conditionally; dropping it. use the object form in the compound style`);
236
- continue;
237
- }
238
- entries.push([key2, { [chain]: value }]);
239
- }
240
- } catch (err) {
241
- _didIteratorError1 = true;
242
- _iteratorError1 = err;
243
- } finally {
244
- try {
245
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
246
- } finally {
247
- if (_didIteratorError1) throw _iteratorError1;
248
- }
249
- }
250
- }
251
- compoundsByAnchor.set(anchor, entries);
645
+ for (var key3 in style) contributeProp(pass, key3, style[key3]);
646
+ }
647
+ for (var key4 in processedProps) {
648
+ var compoundIndexes = preparedCompounds[key4];
649
+ var value1 = processedProps[key4];
650
+ beginCompoundEdges(compoundIndexes, compoundStates);
651
+ directState.flatPropSawCondition = false;
652
+ contributeProp(pass, key4, value1, compoundIndexes, compoundStates);
653
+ if (directState.flatPropSawCondition) injectDisplacedStyledDefault(pass, key4, value1);
654
+ finishCompoundEdges(pass, key4, value1, compoundIndexes, compoundStates);
655
+ }
656
+ } finally {
657
+ releaseConditionPayloads(conditionWrapperBase);
658
+ }
659
+ }
660
+ function isValidStyleKey(key, validStyles, accept) {
661
+ return Boolean(key in validStyles || accept && key in accept);
662
+ }
663
+ function flushForwardStylesToClasses(pass) {
664
+ var styleState = pass[passStyleState];
665
+ if (!pass[passShouldDoClasses]) return;
666
+ completeStreamingCSS(styleState);
667
+ flushDirectStyles(styleState, true);
668
+ }
669
+ function effectiveLifecycleKeys(keys) {
670
+ if (!keys) return;
671
+ var out = /* @__PURE__ */ new Set();
672
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
673
+ try {
674
+ for (var _iterator2 = keys[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
675
+ var key = _step2.value;
676
+ out.add(key === "--t-x" || key === "--t-y" ? "translate" : key === "--t-scale-x" || key === "--t-scale-y" ? "scale" : key);
252
677
  }
253
678
  } catch (err) {
254
- _didIteratorError = true;
255
- _iteratorError = err;
679
+ _didIteratorError2 = true;
680
+ _iteratorError2 = err;
256
681
  } finally {
257
682
  try {
258
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
683
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
259
684
  } finally {
260
- if (_didIteratorError) throw _iteratorError;
685
+ if (_didIteratorError2) throw _iteratorError2;
261
686
  }
262
687
  }
263
- for (var index1 = 0; index1 < orderedEntries.length; index1++) contribute(orderedEntries[index1][0], orderedEntries[index1][1]);
264
- var beforeProps = compoundsByAnchor.get(-1);
265
- if (beforeProps) for (var index2 = 0; index2 < beforeProps.length; index2++) contribute(beforeProps[index2][0], beforeProps[index2][1]);
266
- for (var index3 = 0; index3 < propEntries.length; index3++) {
267
- contribute(propEntries[index3][0], propEntries[index3][1]);
268
- var compounds = compoundsByAnchor.get(index3);
269
- if (compounds) for (var i = 0; i < compounds.length; i++) contribute(compounds[i][0], compounds[i][1]);
270
- }
271
- }
272
- function isValidStyleKey(key, validStyles, accept) {
273
- return Boolean(key in validStyles || isWeb && (key === "transitionProperty" || key === "transitionDuration" || key === "transitionTimingFunction" || key === "transitionDelay" || key === "transitionBehavior") || accept && key in accept);
688
+ return out;
274
689
  }
275
- var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver) {
276
- var _staticConfig_styleFrontend, _styleState_flatMediaKeys, _styleState_flatGroupKeys, _styleState_flatGroupMedia, _styleState_style;
277
- var conf = getConfig();
278
- if ((_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : _staticConfig_styleFrontend.normalizeStaticConfig) staticConfig = staticConfig.styleFrontend.normalizeStaticConfig(staticConfig, conf);
279
- var driver = animationDriver || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.animationDriver) || conf.animations;
280
- var resolvedDriver = (driver === null || driver === void 0 ? void 0 : driver.isStub) ? null : driver;
281
- if (props.passThrough) return null;
282
- if (isWeb && styleProps.isAnimated && (driver === null || driver === void 0 ? void 0 : driver.isReactNative) && !styleProps.noNormalize) styleProps.noNormalize = "values";
283
- var { shorthands } = conf;
284
- var { isHOC, isText, isInput, variants, isReactNative, inlineProps, parentStaticConfig, acceptsClassName } = staticConfig;
285
- var viewProps = {};
286
- var mediaState$1 = styleProps.mediaState || mediaState;
287
- var shouldDoClasses = acceptsClassName && isWeb && !styleProps.noClass;
288
- var rulesToInsert = void 0;
289
- var classNames = {};
290
- props.space;
291
- var hasMedia = false;
292
- var pseudoGroups;
293
- var mediaGroups;
294
- var className = staticConfig.passthroughClassName || "";
295
- if (className) shouldDoClasses = false;
296
- var validStyles$1 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
297
- if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
298
- var styleState = {
299
- classNames,
300
- conf,
301
- props,
302
- styleProps,
303
- componentState,
304
- staticConfig,
305
- style: null,
306
- theme,
307
- viewProps,
308
- context: componentContext,
309
- debug,
310
- flatRulesToInsert: rulesToInsert,
311
- flatShouldDoClasses: shouldDoClasses,
312
- flatThemeName: themeName,
313
- flatMediaState: mediaState$1,
314
- flatGroupContext: groupContext,
315
- animationDriver: resolvedDriver
316
- };
317
- if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
318
- if (process.env.NODE_ENV === "development" && debug === "verbose" && isClient) {
319
- if (isDevTools) {
320
- console.groupCollapsed("🔹 getSplitStyles 👇");
690
+ function mapContributedProp(styleState, key, val, originalVal, condition) {
691
+ var pass = styleState.flatPass;
692
+ var keyInit = pass[passMapSourceKey];
693
+ var disablePropMap = Boolean(pass[passMapFlags]);
694
+ var [, conf, props, viewProps, , validStyles, accept, , variants, inlineProps, parentVariants, , styledContext, styledContextKeys, flags, debug] = pass;
695
+ var isHOC = Boolean(flags & passHocFlag);
696
+ var hocParentVariants = isHOC ? parentVariants : void 0;
697
+ var canResolveContextPrograms = !isHOC;
698
+ var isStyledContextProp = (styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(key)) || styledContext && key in styledContext;
699
+ if (key === "className") return;
700
+ if (canResolveContextPrograms && disablePropMap && !isStyledContextProp) {
701
+ if (key in stylePropsAll && !isValidStyleKey(key, validStyles, accept)) {
702
+ if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
703
+ return;
704
+ }
705
+ viewProps[key] = val;
706
+ return;
707
+ }
708
+ if (process.env.NODE_ENV === "development" && debug === "verbose") {
709
+ console.groupCollapsed(" 💠 expanded", keyInit, "=>", key);
710
+ log(val);
711
+ console.groupEnd();
712
+ }
713
+ if (val == null) return;
714
+ if (accept && key in accept) {
715
+ viewProps[key] = val;
716
+ return;
717
+ }
718
+ var isHostStyleKey = isValidStyleKey(key, validStyles, accept) || isAndroid && key === "elevation";
719
+ var isContextProgramKey = canResolveContextPrograms && Boolean(isStyledContextProp);
720
+ if (condition !== void 0) {
721
+ var conditionCursor = condition;
722
+ if (isHostStyleKey || isContextProgramKey) contributeValue(styleState, key, val, mergeStyle, originalVal, !isHostStyleKey, conditionCursor);
723
+ else if (isHOC) {
724
+ var structured = mergeConditionTransport(styleState, viewProps[key], conditionCursor, val);
725
+ if (key in viewProps) delete viewProps[key];
726
+ viewProps[key] = structured;
727
+ } else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key}" is not a valid style on this component; the conditional variant value is dropped.`);
728
+ return;
729
+ }
730
+ if (isHostStyleKey || isContextProgramKey) {
731
+ contributeValue(styleState, key, val, mergeStyle, originalVal, !isHostStyleKey);
732
+ return;
733
+ }
734
+ var isVariant = Boolean(variants && key in variants);
735
+ if (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key)) {
736
+ var _props_key;
737
+ viewProps[key] = (_props_key = props[key]) !== null && _props_key !== void 0 ? _props_key : val;
738
+ }
739
+ if (Boolean(hocParentVariants && hocParentVariants[keyInit])) {
740
+ passDownProp(viewProps, key, val);
741
+ if (process.env.NODE_ENV === "development" && debug === "verbose") {
742
+ console.groupCollapsed(` - passing down prop ${key}`);
321
743
  log({
322
- props,
323
- staticConfig,
324
- shouldDoClasses,
325
- styleProps,
326
- rulesToInsert,
327
- componentState,
328
- styleState,
329
- theme: { ...theme }
744
+ val,
745
+ after: { ...viewProps[key] }
330
746
  });
747
+ console.groupEnd();
331
748
  }
749
+ return;
332
750
  }
333
- var { asChild } = props;
334
- var { accept, neverSkipProps } = staticConfig;
335
- var { noSkip, disableExpandShorthands, noExpand, styledContext } = styleProps;
336
- var processedProps;
337
- var styleFrontend = staticConfig.styleFrontend;
338
- if (styleFrontend && !props[STYLE_FRONTEND_PREPROCESSED]) processedProps = styleFrontend.preprocessProps(props, conf);
339
- else processedProps = props;
340
- var { webContainerType } = conf.settings;
341
- var parentVariants = parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.variants;
342
- var mergeStylePropAtCurrentPosition = function(styleProp) {
343
- if (styleProps.noMergeStyle || !styleProp) return;
344
- if (isHOC) {
345
- viewProps.style = normalizeStyle(styleProp);
751
+ if (!isVariant) {
752
+ if (isStyledContextProp) return;
753
+ if (key in stylePropsAll && !isValidStyleKey(key, validStyles, accept)) {
754
+ if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
346
755
  return;
347
756
  }
348
- var isArray = Array.isArray(styleProp);
349
- var length = isArray ? styleProp.length : 1;
350
- for (var index = 0; index < length; index++) {
351
- var style2 = isArray ? styleProp[index] : styleProp;
352
- if (!style2) continue;
353
- if (style2["$$css"]) {
354
- for (var key8 in style2) clearDirectStyle(styleState, key8);
355
- Object.assign(styleState.classNames, style2);
356
- continue;
357
- }
358
- var normalized = normalizeStyle(style2);
359
- var styleOriginals = shouldTrackStyleTokenProvenance ? styleOriginalValues.get(style2) : void 0;
360
- for (var key12 in normalized) {
361
- if (normalized[key12] == null) continue;
362
- contributeStyleValue(styleState, key12, normalized[key12], mergeStyle, styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[key12]);
363
- }
364
- }
365
- };
366
- var flushForwardStylesToClasses = function() {
367
- if (!shouldDoClasses) return;
368
- flushDirectStyles(styleState, true);
369
- };
370
- var contributeProp = function(keyOg, valOg) {
757
+ viewProps[key] = val;
758
+ }
759
+ }
760
+ function contributeProp(pass, keyOg, valOg, compoundIndexes, compoundStates, parentConditionKey) {
761
+ var parentWatermark = conditionCursorTop;
762
+ if (compoundIndexes) {
763
+ pass[passCompoundIndexes] = compoundIndexes;
764
+ pass[passCompoundKey] = keyOg;
765
+ pass[passCompoundStates] = compoundStates;
766
+ } else if (pass[passCompoundIndexes]) pass[passCompoundIndexes] = void 0;
767
+ if (parentConditionKey) pass[passParentCursor] = acquireConditionKeyCursor(pass[passStyleState], parentConditionKey);
768
+ try {
769
+ var [styleState, conf, props, viewProps, staticConfig, validStyles, accept, neverSkipProps, variants, inlineProps, parentVariants, styleFrontend, styledContext, styledContextKeys, flags, debug, parentStaticConfig, defaultProps, driverAnimations, driverOutputStyle, elementType] = pass;
770
+ var noSkip = Boolean(flags & passNoSkipFlag);
771
+ var disableExpandShorthands = Boolean(flags & passDisableShorthandsFlag);
772
+ var noExpand = Boolean(flags & passNoExpandFlag);
773
+ var noMergeStyle = Boolean(flags & passNoMergeFlag);
774
+ var isHOC = Boolean(flags & passHocFlag);
775
+ var isText = Boolean(flags & passTextFlag);
776
+ var isInput = Boolean(flags & passInputFlag);
777
+ var shorthands = conf.shorthands;
778
+ var shouldSkipDirectProps = !noSkip && !isHOC;
779
+ var shouldCheckSkipProps = !noSkip;
780
+ var asChildExceptStyleLike = Boolean(flags & passAsChildStyleFlag);
781
+ var isTextOrInput = isText || isInput;
782
+ var hocParentVariants = isHOC ? parentVariants : void 0;
371
783
  var keyInit = keyOg;
372
784
  var valInit = valOg;
373
- if (styleFrontend && keyInit.startsWith(STYLE_FRONTEND_PASSTHROUGH_PREFIX)) keyInit = "className";
374
785
  if (keyInit === "children") {
375
786
  viewProps[keyInit] = valInit;
376
787
  return;
@@ -379,11 +790,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
379
790
  if (keyInit[0] === "d" && keyInit.startsWith("data-")) return;
380
791
  if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
381
792
  if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return;
382
- if (keyInit === "transition" || keyInit === "transitionProperty" || keyInit === "transitionDuration" || keyInit === "transitionTimingFunction" || keyInit === "transitionDelay" || keyInit === "transitionBehavior") return;
383
793
  if (accept) {
384
794
  var accepted = accept[keyInit];
385
795
  if ((accepted === "style" || accepted === "textStyle") && valInit && (typeof valInit === "undefined" ? "undefined" : _type_of(valInit)) === "object") {
386
- viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass);
796
+ viewProps[keyInit] = resolveAcceptedStyle(styleState, valInit);
387
797
  return;
388
798
  }
389
799
  }
@@ -391,58 +801,120 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
391
801
  if (keyInit in shorthands) keyInit = shorthands[keyInit];
392
802
  }
393
803
  if (keyInit === "className") {
394
- if (typeof valInit === "string" && valInit) {
395
- className = `${className} ${valInit}`.trim();
396
- if (styleFrontend) {
397
- flushForwardStylesToClasses();
398
- shouldDoClasses = false;
804
+ if (typeof valInit === "string" && valInit && (styleFrontend === null || styleFrontend === void 0 ? void 0 : styleFrontend.getClassPlan)) {
805
+ if (noMergeStyle) {
806
+ viewProps.className = valInit;
807
+ return;
808
+ }
809
+ var hocClassNames = props[HOC_CLASSNAME_MARKER];
810
+ if (hocClassNames && (typeof hocClassNames === "undefined" ? "undefined" : _type_of(hocClassNames)) === "object") {
811
+ flushForwardStylesToClasses(pass);
812
+ for (var property in hocClassNames) {
813
+ var _pass, _passHocMappedProperties, _pass1, _passHocMappedClasses;
814
+ var generatedClass = hocClassNames[property];
815
+ if (typeof generatedClass !== "string") continue;
816
+ clearDirectStyle(styleState, property);
817
+ styleState.classNames[property] = generatedClass;
818
+ ((_pass = pass)[_passHocMappedProperties = passHocMappedProperties] || (_pass[_passHocMappedProperties] = /* @__PURE__ */ new Set())).add(property);
819
+ ((_pass1 = pass)[_passHocMappedClasses = passHocMappedClasses] || (_pass1[_passHocMappedClasses] = /* @__PURE__ */ new Set())).add(generatedClass);
820
+ }
821
+ }
822
+ var getClassPlan = styleFrontend === null || styleFrontend === void 0 ? void 0 : styleFrontend.getClassPlan;
823
+ var start = 0;
824
+ for (var index = 0; index <= valInit.length; index++) {
825
+ var _pass_passHocMappedClasses;
826
+ if (index !== valInit.length && valInit.charCodeAt(index) > 32) continue;
827
+ if (index === start) {
828
+ start = index + 1;
829
+ continue;
830
+ }
831
+ var candidate = valInit.slice(start, index);
832
+ if ((_pass_passHocMappedClasses = pass[passHocMappedClasses]) === null || _pass_passHocMappedClasses === void 0 ? void 0 : _pass_passHocMappedClasses.has(candidate)) {
833
+ start = index + 1;
834
+ continue;
835
+ }
836
+ var plan = getClassPlan ? getClassPlan(candidate, conf) : "raw";
837
+ if (plan === null) {
838
+ if (process.env.NODE_ENV === "development") warnOnce(`[tamagui] frontend candidate "${candidate}" is unavailable on this platform and was dropped.`);
839
+ } else if (plan === "raw") {
840
+ pass[passClassName] = pass[passClassName] ? `${pass[passClassName]} ${candidate}` : candidate;
841
+ if (getClassPlan) {
842
+ flushForwardStylesToClasses(pass);
843
+ pass[passShouldDoClasses] = false;
844
+ styleState.flatShouldDoClasses = false;
845
+ }
846
+ } else {
847
+ var parentPlan = plan;
848
+ if (!Array.isArray(plan) && parentPlan.preserveRawClass) {
849
+ pass[passClassName] = pass[passClassName] ? `${pass[passClassName]} ${candidate}` : candidate;
850
+ flushForwardStylesToClasses(pass);
851
+ pass[passShouldDoClasses] = false;
852
+ styleState.flatShouldDoClasses = false;
853
+ }
854
+ var entries = Array.isArray(plan) ? plan : parentPlan.entries;
855
+ for (var entryIndex = 0; entryIndex < entries.length; entryIndex++) {
856
+ var entry = entries[entryIndex];
857
+ if (entry[2] !== void 0) {
858
+ if (isValidStyleKey(entry[0], validStyles, accept)) contributeValue(styleState, entry[0], entry[1], mergeStyle, void 0, false, entry[2]);
859
+ else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${entry[0]}" is not a valid style on this component; the frontend value is dropped.`);
860
+ } else {
861
+ if (entry[0] === "group") pass[passFrontendGroup] = entry[1];
862
+ else if (entry[0] === "container") pass[passFrontendContainer] = entry[1];
863
+ else if (entry[0] === "containerType") pass[passFrontendContainerType] = entry[1];
864
+ contributeProp(pass, entry[0], entry[1]);
865
+ }
866
+ }
867
+ }
868
+ start = index + 1;
869
+ }
870
+ if (props[HOC_CLASSNAME_MARKER] !== void 0) {
871
+ flushForwardStylesToClasses(pass);
872
+ pass[passShouldDoClasses] = false;
399
873
  styleState.flatShouldDoClasses = false;
400
874
  }
401
875
  }
402
876
  return;
403
877
  }
404
878
  if (keyInit === "style") {
405
- mergeStylePropAtCurrentPosition(valInit);
406
- return;
407
- }
408
- if (asChild) {
409
- var defaults = getDefaultProps(staticConfig);
410
- if (defaults) {
411
- var _defaults_keyOg;
412
- var defaultVal = (_defaults_keyOg = defaults[keyOg]) !== null && _defaults_keyOg !== void 0 ? _defaults_keyOg : defaults[keyInit];
413
- if (defaultVal !== void 0 && valInit === defaultVal) return;
414
- }
415
- }
416
- if (keyInit in skipProps && !noSkip && !isHOC && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) {
417
- if (keyInit === "group");
418
- if (keyInit === "container" && valInit) {}
419
- if (keyInit === "transition" && typeof valInit === "string") {
420
- var _driver_animations;
421
- var animationConfig = driver === null || driver === void 0 ? void 0 : (_driver_animations = driver.animations) === null || _driver_animations === void 0 ? void 0 : _driver_animations[valInit];
422
- if (animationConfig && (driver === null || driver === void 0 ? void 0 : driver.outputStyle) === "css" && process.env.IS_STATIC === "is_static") valInit = `all ${animationConfig}`;
423
- else if (animationConfig) return;
424
- } else return;
425
- }
426
- if (isFrontendProgram(valInit)) {
427
- if (isValidStyleKey(valInit.property, validStyles$1, accept)) contributeFrontendProgram(styleState, valInit, mergeStyle);
428
- else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${valInit.property}" is not a valid style on this component; the frontend value is dropped.`);
429
- return;
430
- }
431
- var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles$1, accept);
432
- if (isWeb) {
433
- var _driver_View;
434
- if ((staticConfig.isReactNative || styleProps.isAnimated && (driver === null || driver === void 0 ? void 0 : driver.isReactNative) && !((_driver_View = driver.View) === null || _driver_View === void 0 ? void 0 : _driver_View.acceptRenderProp)) && keyInit.startsWith("data-")) {
435
- var _viewProps2, _dataSet;
436
- keyInit = keyInit.replace("data-", "");
437
- (_viewProps2 = viewProps)[_dataSet = "dataSet"] || (_viewProps2[_dataSet] = {});
438
- viewProps["dataSet"][keyInit] = valInit;
879
+ if (!valInit) return;
880
+ if (noMergeStyle) {
881
+ viewProps.style = valInit;
439
882
  return;
440
883
  }
441
- if (keyInit.startsWith("data-")) {
442
- viewProps[keyInit] = valInit;
443
- return;
884
+ var isArray = Array.isArray(valInit);
885
+ var length = isArray ? valInit.length : 1;
886
+ for (var index1 = 0; index1 < length; index1++) {
887
+ var style = isArray ? valInit[index1] : valInit;
888
+ if (!style) continue;
889
+ var hocClassNames1 = style[TAMAGUI_CLASS_PROPS];
890
+ if (hocClassNames1) {
891
+ for (var property1 in hocClassNames1) {
892
+ var _pass2, _passHocMappedProperties1;
893
+ clearDirectStyle(styleState, property1);
894
+ styleState.classNames[property1] = hocClassNames1[property1];
895
+ ((_pass2 = pass)[_passHocMappedProperties1 = passHocMappedProperties] || (_pass2[_passHocMappedProperties1] = /* @__PURE__ */ new Set())).add(property1);
896
+ }
897
+ continue;
898
+ }
899
+ var normalized = normalizeStyle(style, false, true);
900
+ var styleOriginals = shouldTrackStyleTokenProvenance ? styleOriginalValues.get(style) : void 0;
901
+ for (var key in normalized) {
902
+ var _pass_passHocMappedProperties;
903
+ if (normalized[key] == null) continue;
904
+ if ((_pass_passHocMappedProperties = pass[passHocMappedProperties]) === null || _pass_passHocMappedProperties === void 0 ? void 0 : _pass_passHocMappedProperties.delete(key)) clearDirectStyle(styleState, key);
905
+ contributeValue(styleState, key, normalized[key], mergeStyle, styleOriginals === null || styleOriginals === void 0 ? void 0 : styleOriginals[key]);
906
+ }
444
907
  }
908
+ return;
445
909
  }
910
+ if (defaultProps) {
911
+ var _defaultProps_keyOg;
912
+ var defaultVal = (_defaultProps_keyOg = defaultProps[keyOg]) !== null && _defaultProps_keyOg !== void 0 ? _defaultProps_keyOg : defaultProps[keyInit];
913
+ if (defaultVal !== void 0 && valInit === defaultVal) return;
914
+ }
915
+ if (keyInit in skipProps && shouldSkipDirectProps && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) if (keyInit === "transition" && typeof valInit === "string") return;
916
+ else return;
917
+ var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles, accept);
446
918
  if (!isValidStyleKeyInit) {
447
919
  if (!isAndroid) {
448
920
  if (keyInit === "elevationAndroid") return;
@@ -452,11 +924,11 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
452
924
  valInit = valInit !== "none";
453
925
  } else if (keyInit === "textOverflow") {
454
926
  if (isText && valInit === "ellipsis") {
455
- var _viewProps1, _viewProps22;
927
+ var _viewProps, _viewProps1;
456
928
  var _numberOfLines;
457
- (_numberOfLines = (_viewProps1 = viewProps).numberOfLines) !== null && _numberOfLines !== void 0 || (_viewProps1.numberOfLines = 1);
929
+ (_numberOfLines = (_viewProps = viewProps).numberOfLines) !== null && _numberOfLines !== void 0 || (_viewProps.numberOfLines = 1);
458
930
  var _ellipsizeMode;
459
- (_ellipsizeMode = (_viewProps22 = viewProps).ellipsizeMode) !== null && _ellipsizeMode !== void 0 || (_viewProps22.ellipsizeMode = "tail");
931
+ (_ellipsizeMode = (_viewProps1 = viewProps).ellipsizeMode) !== null && _ellipsizeMode !== void 0 || (_viewProps1.ellipsizeMode = "tail");
460
932
  }
461
933
  return;
462
934
  } else if (keyInit.startsWith("data-")) return;
@@ -464,10 +936,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
464
936
  var isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
465
937
  var isStyleLikeKey = isValidStyleKeyInit || isVariant;
466
938
  var isStyleProp = isValidStyleKeyInit || isVariant && !noExpand;
467
- if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) return;
468
- var shouldPassProp = !isStyleProp && isHOC || isHOC && parentVariants && keyInit in parentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
939
+ if (isStyleProp && asChildExceptStyleLike) return;
940
+ var shouldPassProp = !isStyleProp && isHOC || hocParentVariants && keyInit in hocParentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
469
941
  var parentVariant = parentVariants === null || parentVariants === void 0 ? void 0 : parentVariants[keyInit];
470
- var isHOCShouldPassThrough = Boolean(isHOC && (isValidStyleKeyInit || parentVariant || keyInit in skipProps));
942
+ var isHOCShouldPassThrough = Boolean(isHOC && (parentVariant || keyInit in skipProps));
471
943
  var shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
472
944
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
473
945
  console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
@@ -489,179 +961,237 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
489
961
  if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
490
962
  if (!isVariant) return;
491
963
  }
492
- if (!noSkip && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) {
493
- var _driver_animations1;
494
- if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit === "string" && !(driver === null || driver === void 0 ? void 0 : (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0 ? void 0 : _driver_animations1[valInit]))) {
964
+ if (shouldCheckSkipProps && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) {
965
+ if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit === "string" && !(driverAnimations === null || driverAnimations === void 0 ? void 0 : driverAnimations[valInit]))) {
495
966
  if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
496
967
  return;
497
968
  }
498
969
  }
499
- if (isText || isInput) {
970
+ if (isTextOrInput) {
500
971
  if (valInit && (keyInit === "fontFamily" || keyInit === shorthands["fontFamily"]) && valInit in conf.fontsParsed) styleState.fontFamily = valInit;
501
972
  }
502
973
  var disablePropMap = !isStyleLikeKey;
503
- if (!isHOC && isValidStyleKeyInit && valInit != null && !(valInit === "unset") && !(variants && keyInit in variants) && !(accept && keyInit in accept) && !(styledContext && keyInit in styledContext)) {
504
- contributeStyleValue(styleState, keyInit, valInit, mergeStyle);
974
+ if (isValidStyleKeyInit && valInit != null && !(valInit === "unset") && !(variants && keyInit in variants) && !(accept && keyInit in accept) && !((styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(keyInit)) || styledContext && keyInit in styledContext)) {
975
+ contributeValue(styleState, keyInit, valInit, mergeStyle);
505
976
  return;
506
977
  }
507
- propMapper(keyInit, valInit, styleState, disablePropMap, function(key8, val2, originalVal, conditionSource) {
508
- var _parentStaticConfig_variants;
509
- var isStyledContextProp = styledContext && key8 in styledContext;
510
- if (key8 === "className") {
511
- if (typeof val2 === "string" && val2) className = `${className} ${val2}`.trim();
512
- return;
513
- }
514
- if (!isHOC && disablePropMap && !isStyledContextProp) {
515
- if (key8 in stylePropsAll && !isValidStyleKey(key8, validStyles$1, accept)) {
516
- if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key8}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
517
- return;
518
- }
519
- viewProps[key8] = val2;
520
- return;
521
- }
522
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
523
- console.groupCollapsed(" 💠 expanded", keyInit, "=>", key8);
524
- log(val2);
525
- console.groupEnd();
526
- }
527
- if (val2 == null) return;
528
- if (accept && key8 in accept) {
529
- viewProps[key8] = val2;
530
- return;
531
- }
532
- var isHostStyleKey = !isHOC && isValidStyleKey(key8, validStyles$1, accept) || isAndroid && key8 === "elevation";
533
- var isContextProgramKey = !isHOC && Boolean(isStyledContextProp);
534
- if (conditionSource !== void 0) {
535
- if (isHostStyleKey || isContextProgramKey) contributeVariantClauseValue(styleState, key8, val2, conditionSource, mergeStyle, originalVal, !isHostStyleKey);
536
- else if (isHOC) {
537
- var appended = appendFlatClause(styleState, viewProps[key8], conditionSource, val2);
538
- if (appended !== void 0) viewProps[key8] = appended;
539
- else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] conditional variant value for "${key8}" cannot join the existing clause string; dropping the clause`);
540
- } else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key8}" is not a valid style on this component; the conditional variant value is dropped.`);
541
- return;
542
- }
543
- if (isHostStyleKey || isContextProgramKey) {
544
- contributeStyleValue(styleState, key8, val2, mergeStyle, originalVal, !isHostStyleKey);
545
- return;
546
- }
547
- isVariant = variants && key8 in variants;
548
- if (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(key8)) {
549
- var _props_key;
550
- viewProps[key8] = (_props_key = props[key8]) !== null && _props_key !== void 0 ? _props_key : val2;
551
- }
552
- if (isHOC && Boolean(parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit])) {
553
- passDownProp(viewProps, key8, val2);
554
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
555
- console.groupCollapsed(` - passing down prop ${key8}`);
556
- log({
557
- val: val2,
558
- after: { ...viewProps[key8] }
559
- });
560
- console.groupEnd();
561
- }
562
- return;
563
- }
564
- if (!isVariant) {
565
- if (isStyledContextProp) return;
566
- if (key8 in stylePropsAll && !isValidStyleKey(key8, validStyles$1, accept)) {
567
- if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${key8}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
568
- return;
569
- }
570
- viewProps[key8] = val2;
571
- }
572
- });
978
+ pass[passMapSourceKey] = keyInit;
979
+ pass[passMapFlags] = disablePropMap ? 1 : 0;
980
+ contributeMappedValue(keyInit, valInit, styleState, disablePropMap);
573
981
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
574
982
  try {
575
983
  log(` \u2714\uFE0F expand complete`, keyInit);
576
984
  log("style", { ...styleState.style });
577
985
  log("viewProps", { ...viewProps });
578
- log("transforms", { ...styleState.flatTransforms });
986
+ log("transforms", styleState.transformAccumulator);
579
987
  } catch (e) {}
580
988
  console.groupEnd();
581
989
  }
990
+ } finally {
991
+ if (parentConditionKey) pass[passParentCursor] = null;
992
+ releaseConditionCursors(parentWatermark);
993
+ }
994
+ }
995
+ var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver) {
996
+ var _staticConfig_styleFrontend, _styleState_flatMediaKeys, _styleState_flatGroupKeys, _styleState_flatGroupMedia, _styleState_style;
997
+ var conf = getConfig();
998
+ if ((_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : _staticConfig_styleFrontend.normalizeStaticConfig) staticConfig = staticConfig.styleFrontend.normalizeStaticConfig(staticConfig, conf);
999
+ var driver = animationDriver || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.animationDriver) || conf.animations;
1000
+ var driverAnimations = driver === null || driver === void 0 ? void 0 : driver.animations;
1001
+ driver === null || driver === void 0 || driver.inputStyle;
1002
+ var driverOutputStyle = driver === null || driver === void 0 ? void 0 : driver.outputStyle;
1003
+ var resolvedDriver = (driver === null || driver === void 0 ? void 0 : driver.isStub) ? null : driver;
1004
+ if (props.passThrough) return null;
1005
+ var { shorthands } = conf;
1006
+ var { isHOC, isText, isInput, variants, inlineProps, parentStaticConfig, acceptsClassName } = staticConfig;
1007
+ var viewProps = {};
1008
+ var mediaState$1 = styleProps.mediaState || mediaState;
1009
+ var shouldDoClasses = !process.env.TAMAGUI_DID_OUTPUT_CSS && acceptsClassName && false;
1010
+ var rulesToInsert = void 0;
1011
+ var classNames = {};
1012
+ var hasMedia = false;
1013
+ var pseudoGroups;
1014
+ var mediaGroups;
1015
+ var staticPassthroughClassName = "";
1016
+ var className = staticPassthroughClassName;
1017
+ if (staticPassthroughClassName) shouldDoClasses = false;
1018
+ var validStyles$1 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
1019
+ if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
1020
+ var styleState = {
1021
+ classNames,
1022
+ conf,
1023
+ props,
1024
+ styleProps,
1025
+ componentState,
1026
+ staticConfig,
1027
+ style: null,
1028
+ theme,
1029
+ viewProps,
1030
+ context: componentContext,
1031
+ debug,
1032
+ flatRulesToInsert: rulesToInsert,
1033
+ flatShouldDoClasses: shouldDoClasses,
1034
+ flatThemeName: themeName,
1035
+ flatMediaState: mediaState$1,
1036
+ flatGroupContext: groupContext,
1037
+ animationDriver: resolvedDriver
582
1038
  };
583
- forEachPropInForwardOrder(processedProps, staticConfig, shorthands, contributeProp, function(chain) {
584
- return !!resolveClauseChain(styleState, chain, 0, chain.length);
585
- });
1039
+ if (canGenerateCSS && shouldDoClasses && styleProps.canPlatformPseudo) styleState.flatDeferCSS = true;
1040
+ if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
1041
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && isClient) {
1042
+ if (isDevTools) {
1043
+ console.groupCollapsed("🔹 getSplitStyles 👇");
1044
+ log({
1045
+ props,
1046
+ staticConfig,
1047
+ shouldDoClasses,
1048
+ styleProps,
1049
+ rulesToInsert,
1050
+ componentState,
1051
+ styleState,
1052
+ theme: { ...theme }
1053
+ });
1054
+ }
1055
+ }
1056
+ var { asChild } = props;
1057
+ var { accept, neverSkipProps } = staticConfig;
1058
+ var { noSkip, disableExpandShorthands, noExpand, noClass, noMergeStyle, noNormalize, isAnimated, styledContext, styledContextKeys } = styleProps;
1059
+ var styleFrontend = staticConfig.styleFrontend;
1060
+ var frontendGroup;
1061
+ var frontendContainer;
1062
+ var frontendContainerType;
1063
+ var parentVariants = parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.variants;
1064
+ var defaultProps = asChild ? getDefaultProps(staticConfig) : void 0;
1065
+ var asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
1066
+ var containerValue;
1067
+ var containerName;
1068
+ var containerType;
1069
+ var hocMappedClassProperties;
1070
+ var hocMappedClasses;
1071
+ var stylePassFlags = (noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0);
1072
+ var pass = [
1073
+ styleState,
1074
+ conf,
1075
+ props,
1076
+ viewProps,
1077
+ staticConfig,
1078
+ validStyles$1,
1079
+ accept,
1080
+ neverSkipProps,
1081
+ variants,
1082
+ inlineProps,
1083
+ parentVariants,
1084
+ styleFrontend,
1085
+ styledContext,
1086
+ styledContextKeys,
1087
+ stylePassFlags,
1088
+ debug,
1089
+ parentStaticConfig,
1090
+ defaultProps,
1091
+ driverAnimations,
1092
+ driverOutputStyle,
1093
+ elementType,
1094
+ className,
1095
+ shouldDoClasses,
1096
+ containerValue,
1097
+ containerName,
1098
+ containerType,
1099
+ frontendGroup,
1100
+ frontendContainer,
1101
+ frontendContainerType,
1102
+ hocMappedClassProperties,
1103
+ hocMappedClasses
1104
+ ];
1105
+ styleState.flatPass = pass;
1106
+ forEachPropInForwardOrder(pass);
1107
+ [, , , , , , , , , , , , , , , , , , , , , className, shouldDoClasses, containerValue, containerName, containerType, frontendGroup, frontendContainer, frontendContainerType, hocMappedClassProperties, hocMappedClasses] = pass;
586
1108
  if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
587
1109
  var conditionalStates = styleState.flatStateKeys || null;
588
1110
  var usesSafeArea = !!styleState.flatUsesSafeArea;
589
1111
  if ((_styleState_flatMediaKeys = styleState.flatMediaKeys) === null || _styleState_flatMediaKeys === void 0 ? void 0 : _styleState_flatMediaKeys.size) {
590
1112
  if (!hasMedia) hasMedia = /* @__PURE__ */ new Set();
591
1113
  if (typeof hasMedia !== "boolean") {
592
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
1114
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
593
1115
  try {
594
- for (var _iterator = styleState.flatMediaKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
595
- var key = _step.value;
1116
+ for (var _iterator2 = styleState.flatMediaKeys[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
1117
+ var key = _step2.value;
596
1118
  hasMedia.add(key);
597
1119
  }
598
1120
  } catch (err) {
599
- _didIteratorError = true;
600
- _iteratorError = err;
1121
+ _didIteratorError2 = true;
1122
+ _iteratorError2 = err;
601
1123
  } finally {
602
1124
  try {
603
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
1125
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
604
1126
  } finally {
605
- if (_didIteratorError) throw _iteratorError;
1127
+ if (_didIteratorError2) throw _iteratorError2;
606
1128
  }
607
1129
  }
608
1130
  }
609
1131
  }
610
1132
  if ((_styleState_flatGroupKeys = styleState.flatGroupKeys) === null || _styleState_flatGroupKeys === void 0 ? void 0 : _styleState_flatGroupKeys.size) {
611
1133
  pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set());
612
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
1134
+ var _iteratorNormalCompletion12 = true, _didIteratorError12 = false, _iteratorError12 = void 0;
613
1135
  try {
614
- for (var _iterator1 = styleState.flatGroupKeys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
615
- var key1 = _step1.value;
1136
+ for (var _iterator12 = styleState.flatGroupKeys[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
1137
+ var key1 = _step12.value;
616
1138
  pseudoGroups.add(key1);
617
1139
  }
618
1140
  } catch (err) {
619
- _didIteratorError1 = true;
620
- _iteratorError1 = err;
1141
+ _didIteratorError12 = true;
1142
+ _iteratorError12 = err;
621
1143
  } finally {
622
1144
  try {
623
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
1145
+ if (!_iteratorNormalCompletion12 && _iterator12.return != null) _iterator12.return();
624
1146
  } finally {
625
- if (_didIteratorError1) throw _iteratorError1;
1147
+ if (_didIteratorError12) throw _iteratorError12;
626
1148
  }
627
1149
  }
628
1150
  }
629
1151
  if ((_styleState_flatGroupMedia = styleState.flatGroupMedia) === null || _styleState_flatGroupMedia === void 0 ? void 0 : _styleState_flatGroupMedia.size) {
630
1152
  mediaGroups || (mediaGroups = /* @__PURE__ */ new Set());
631
- var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
1153
+ var _iteratorNormalCompletion22 = true, _didIteratorError22 = false, _iteratorError22 = void 0;
632
1154
  try {
633
- for (var _iterator2 = styleState.flatGroupMedia[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
634
- var key2 = _step2.value;
1155
+ for (var _iterator22 = styleState.flatGroupMedia[Symbol.iterator](), _step22; !(_iteratorNormalCompletion22 = (_step22 = _iterator22.next()).done); _iteratorNormalCompletion22 = true) {
1156
+ var key2 = _step22.value;
635
1157
  mediaGroups.add(key2);
636
1158
  }
637
1159
  } catch (err) {
638
- _didIteratorError2 = true;
639
- _iteratorError2 = err;
1160
+ _didIteratorError22 = true;
1161
+ _iteratorError22 = err;
640
1162
  } finally {
641
1163
  try {
642
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
1164
+ if (!_iteratorNormalCompletion22 && _iterator22.return != null) _iterator22.return();
643
1165
  } finally {
644
- if (_didIteratorError2) throw _iteratorError2;
1166
+ if (_didIteratorError22) throw _iteratorError22;
645
1167
  }
646
1168
  }
647
1169
  }
1170
+ if (styleProps.canPlatformPseudo && styleState.flatHasPlatformPseudo) {
1171
+ shouldDoClasses = false;
1172
+ styleState.flatShouldDoClasses = false;
1173
+ if (styleState.transformAccumulator) {
1174
+ mergeStyle(styleState, "transform", finalizeTransformAccumulator(styleState.transformAccumulator), 1, true);
1175
+ styleState.transformAccumulator = void 0;
1176
+ }
1177
+ convertDeferredInline(styleState, mergeStyle);
1178
+ }
1179
+ completeStreaming(styleState, mergeStyle);
648
1180
  var effectiveTransition = (_styleState_style = styleState.style) === null || _styleState_style === void 0 ? void 0 : _styleState_style.transition;
649
1181
  if (effectiveTransition != null && styleState.style && true) delete styleState.style.transition;
650
1182
  if (styleState.style) {
651
1183
  if ("containerType" in styleState.style) delete styleState.style.containerType;
652
1184
  if ("containerName" in styleState.style) delete styleState.style.containerName;
653
1185
  }
654
- if (!(styleProps.noNormalize === false)) {
1186
+ if (!(noNormalize === false)) {
655
1187
  if (styleState.style) {
656
1188
  fixStyles(styleState.style);
657
- if (!styleProps.noExpand && !styleProps.noMergeStyle) {
658
- if (isWeb && (isReactNative ? (driver === null || driver === void 0 ? void 0 : driver.inputStyle) !== "css" : true)) styleToCSS(styleState.style);
659
- }
1189
+ if (!noExpand && !noMergeStyle) {}
660
1190
  }
661
- if (styleState.flatTransforms) {
1191
+ if (styleState.transformAccumulator && !styleState.flatShouldDoClasses) {
662
1192
  var _styleState;
663
1193
  (_styleState = styleState).style || (_styleState.style = {});
664
- mergeFlatTransforms(styleState.style, styleState.flatTransforms);
1194
+ styleState.style.transform = finalizeTransformAccumulator(styleState.transformAccumulator);
665
1195
  }
666
1196
  if (parentSplitStyles) {
667
1197
  if (!shouldDoClasses) for (var key4 in parentSplitStyles.style) {
@@ -721,35 +1251,16 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
721
1251
  if (conditionalStates) result.programStates = conditionalStates;
722
1252
  if (usesSafeArea) result.usesSafeArea = true;
723
1253
  if (getDirectDynamicThemeAccess(styleState)) result.dynamicThemeAccess = true;
724
- if (styleState.flatEnterKeys || styleState.flatExitKeys) {
725
- var effectiveKeys = function(keys) {
726
- if (!keys) return;
727
- var out = /* @__PURE__ */ new Set();
728
- var _iteratorNormalCompletion4 = true, _didIteratorError4 = false, _iteratorError4 = void 0;
729
- try {
730
- for (var _iterator4 = keys[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
731
- var key8 = _step4.value;
732
- out.add(key8 === "--t-x" || key8 === "--t-y" ? "translate" : key8 === "--t-scale-x" || key8 === "--t-scale-y" ? "scale" : key8);
733
- }
734
- } catch (err) {
735
- _didIteratorError4 = true;
736
- _iteratorError4 = err;
737
- } finally {
738
- try {
739
- if (!_iteratorNormalCompletion4 && _iterator4.return != null) _iterator4.return();
740
- } finally {
741
- if (_didIteratorError4) throw _iteratorError4;
742
- }
743
- }
744
- return out;
745
- };
746
- result.programLifecycleStyleKeys = {
747
- enter: effectiveKeys(styleState.flatEnterKeys),
748
- exit: effectiveKeys(styleState.flatExitKeys)
749
- };
750
- }
751
- var asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
752
- if (!styleProps.noMergeStyle) {
1254
+ if (styleState.flatEnterKeys || styleState.flatExitKeys) result.programLifecycleStyleKeys = {
1255
+ enter: effectiveLifecycleKeys(styleState.flatEnterKeys),
1256
+ exit: effectiveLifecycleKeys(styleState.flatExitKeys)
1257
+ };
1258
+ if (styleState.flatHasEnterStyle) result.hasEnterStyle = true;
1259
+ if (styleState.flatHasPlatformPseudo) result.platformPseudo = true;
1260
+ if (frontendGroup !== void 0) result.frontendGroup = frontendGroup;
1261
+ if (frontendContainer !== void 0) result.frontendContainer = frontendContainer;
1262
+ if (frontendContainerType !== void 0) result.frontendContainerType = frontendContainerType;
1263
+ if (!noMergeStyle) {
753
1264
  if (!asChildExceptStyleLike) {
754
1265
  var style1 = styleState.style;
755
1266
  if (style1) viewProps.style = style1;
@@ -777,50 +1288,12 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
777
1288
  if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
778
1289
  return result;
779
1290
  };
780
- function mergeFlatTransforms(target, flatTransforms) {
781
- var transform = [];
782
- if ("x" in flatTransforms) transform.push({ translateX: flatTransforms.x });
783
- if ("y" in flatTransforms) transform.push({ translateY: flatTransforms.y });
784
- if ("rotate" in flatTransforms) transform.push({ rotate: flatTransforms.rotate });
785
- var hasScaleX = "scaleX" in flatTransforms;
786
- var hasScaleY = "scaleY" in flatTransforms;
787
- if (hasScaleX && hasScaleY && Object.is(flatTransforms.scaleX, flatTransforms.scaleY)) transform.push({ scale: flatTransforms.scaleX });
788
- else {
789
- if (hasScaleX) transform.push({ scaleX: flatTransforms.scaleX });
790
- if (hasScaleY) transform.push({ scaleY: flatTransforms.scaleY });
791
- if (!hasScaleX && !hasScaleY && "scale" in flatTransforms) transform.push({ scale: flatTransforms.scale });
792
- }
793
- var keys = [];
794
- for (var key in flatTransforms) if (key !== "x" && key !== "y" && key !== "rotate" && key !== "scale" && key !== "scaleX" && key !== "scaleY") keys.push(key);
795
- keys.sort(sortString);
796
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
797
- try {
798
- for (var _iterator = keys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
799
- var key1 = _step.value;
800
- transform.push({ [mapTransformKeys[key1] || key1]: flatTransforms[key1] });
801
- }
802
- } catch (err) {
803
- _didIteratorError = true;
804
- _iteratorError = err;
805
- } finally {
806
- try {
807
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
808
- } finally {
809
- if (_didIteratorError) throw _iteratorError;
810
- }
811
- }
812
- if (Array.isArray(target.transform)) transform.push(...target.transform);
813
- target.transform = transform;
814
- }
815
1291
  function mergeStyle(styleState, key, val, _importance) {
816
- var disableNormalize = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, originalVal = arguments.length > 5 ? arguments[5] : void 0;
817
- var _staticConfig_parentStaticConfig, _staticConfig_parentStaticConfig1, _staticConfig_parentStaticConfig2, _contextConfig_propKeys;
1292
+ arguments.length > 4 && arguments[4] !== void 0 && arguments[4];
1293
+ var originalVal = arguments.length > 5 ? arguments[5] : void 0;
818
1294
  var { viewProps, styleProps, staticConfig } = styleState;
819
- var contextConfig = staticConfig.context || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : _staticConfig_parentStaticConfig.context);
820
- var contextProps = contextConfig === null || contextConfig === void 0 ? void 0 : contextConfig.props;
821
- var inheritedContextPropKeys = !staticConfig.context || staticConfig.context === ((_staticConfig_parentStaticConfig1 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig1 === void 0 ? void 0 : _staticConfig_parentStaticConfig1.context) ? (_staticConfig_parentStaticConfig2 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig2 === void 0 ? void 0 : _staticConfig_parentStaticConfig2.contextProps : void 0;
822
- var contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;
823
- if (contextProps && key in contextProps || (contextPropKeys === null || contextPropKeys === void 0 ? void 0 : contextPropKeys.includes(key)) || (contextConfig === null || contextConfig === void 0 ? void 0 : (_contextConfig_propKeys = contextConfig.propKeys) === null || _contextConfig_propKeys === void 0 ? void 0 : _contextConfig_propKeys.includes(key))) {
1295
+ var contextPropSet = getContextPropSet(staticConfig);
1296
+ if (contextPropSet === null || contextPropSet === void 0 ? void 0 : contextPropSet.has(key)) {
824
1297
  var _styleState_originalContextPropValues;
825
1298
  var _styleState;
826
1299
  (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});
@@ -828,17 +1301,17 @@ function mergeStyle(styleState, key, val, _importance) {
828
1301
  var _ref;
829
1302
  styleState.overriddenContextProps[key] = (_ref = originalVal !== null && originalVal !== void 0 ? originalVal : originalFromState) !== null && _ref !== void 0 ? _ref : val;
830
1303
  }
831
- if (key in stylePropsTransform) {
1304
+ if (key === "transform" || key in stylePropsTransform) {
832
1305
  var _styleState1;
833
- (_styleState1 = styleState).flatTransforms || (_styleState1.flatTransforms = {});
834
- styleState.flatTransforms[key] = val;
1306
+ (_styleState1 = styleState).transformAccumulator || (_styleState1.transformAccumulator = createTransformAccumulator());
1307
+ addTransformValue(styleState.transformAccumulator, key, val);
835
1308
  } else {
836
- var out = isWeb && !disableNormalize && !styleProps.noNormalize ? normalizeValueWithProperty(val, key) : val;
1309
+ var out = val;
837
1310
  if (staticConfig.accept && key in staticConfig.accept) viewProps[key] = out;
838
1311
  else {
839
1312
  var _styleState2;
840
1313
  (_styleState2 = styleState).style || (_styleState2.style = {});
841
- styleState.style[key] = key === "transform" && Array.isArray(out) ? [...out] : out;
1314
+ styleState.style[key] = out;
842
1315
  if (shouldTrackStyleTokenProvenance) recordStyleTokenProvenance(styleState, key, originalVal);
843
1316
  }
844
1317
  }
@@ -858,101 +1331,1761 @@ function recordStyleTokenProvenance(styleState, key, originalVal) {
858
1331
  ((_styleState = styleState).tokenProvenance || (_styleState.tokenProvenance = {}))[key] = originalVal;
859
1332
  } else if (styleState.tokenProvenance && key in styleState.tokenProvenance) delete styleState.tokenProvenance[key];
860
1333
  }
861
- var getSubStyle = function(styleState, _subKey, styleIn, avoidMergeTransform) {
862
- var { staticConfig, conf, styleProps } = styleState;
1334
+ var resolveAcceptedStyle = function(styleState, styleIn) {
1335
+ var { conf, styleProps } = styleState;
863
1336
  var styleOut = {};
864
1337
  var originalValues;
865
1338
  var styleInOriginalValues = styleOriginalValues.get(styleIn);
866
- var parentProps = styleState.props;
867
- styleState.props = Object.create(parentProps, Object.getOwnPropertyDescriptors(styleIn));
868
- try {
869
- var _loop = function(key1) {
870
- var val = styleIn[key1];
871
- key1 = conf.shorthands[key1] || key1;
872
- if (!staticConfig.isHOC && key1 in skipProps && !styleProps.noSkip) return key = key1, "continue";
873
- propMapper(key1, val, styleState, false, function(skey, sval, originalVal) {
874
- var _styleInOriginalValues_skey;
875
- var trackedOriginalVal = (_styleInOriginalValues_skey = styleInOriginalValues === null || styleInOriginalValues === void 0 ? void 0 : styleInOriginalValues[skey]) !== null && _styleInOriginalValues_skey !== void 0 ? _styleInOriginalValues_skey : originalVal;
876
- if (trackedOriginalVal !== void 0) {
877
- originalValues || (originalValues = {});
878
- originalValues[skey] = trackedOriginalVal;
879
- }
880
- if (!avoidMergeTransform && skey in stylePropsTransform) mergeTransform(styleOut, skey, sval);
881
- else styleOut[skey] = styleProps.noNormalize ? sval : normalizeValueWithProperty(sval, key1);
882
- });
883
- key = key1;
884
- };
885
- for (var key in styleIn) _loop(key);
886
- } finally {
887
- styleState.props = parentProps;
888
- }
889
- if (!avoidMergeTransform) {
890
- var _styleState_style;
891
- var parentTransform = (_styleState_style = styleState.style) === null || _styleState_style === void 0 ? void 0 : _styleState_style.transform;
892
- var flatTransforms = styleState.flatTransforms;
893
- var styleOutTransform = styleOut.transform;
894
- if (Array.isArray(styleOutTransform) && styleOutTransform.length) {
895
- var len = styleOutTransform.length;
896
- if (Array.isArray(parentTransform)) {
897
- var merged = [];
898
- outer: for (var i = 0; i < parentTransform.length; i++) {
899
- var pt = parentTransform[i];
900
- for (var pk in pt) {
901
- for (var j = 0; j < len; j++) for (var sk in styleOutTransform[j]) {
902
- if (pk === sk) continue outer;
903
- break;
904
- }
905
- merged.push(pt);
906
- break;
907
- }
908
- }
909
- for (var i1 = 0; i1 < len; i1++) merged.push(styleOutTransform[i1]);
910
- styleOut.transform = merged;
911
- }
912
- if (flatTransforms) outer: for (var fk in flatTransforms) {
913
- var ck = fk === "x" ? "translateX" : fk === "y" ? "translateY" : fk;
914
- for (var j1 = 0; j1 < len; j1++) for (var sk1 in styleOutTransform[j1]) {
915
- if (ck === sk1) continue outer;
916
- break;
917
- }
918
- mergeTransform(styleOut, fk, flatTransforms[fk]);
919
- }
920
- } else if (flatTransforms) mergeFlatTransforms(styleOut, flatTransforms);
1339
+ var childState = {
1340
+ ...styleState,
1341
+ classNames: {},
1342
+ flatShouldDoClasses: false,
1343
+ props: styleIn,
1344
+ style: styleOut,
1345
+ transformAccumulator: void 0
1346
+ };
1347
+ childState.flatUsed = void 0;
1348
+ childState.flatTransitions = void 0;
1349
+ childState.flatAtomics = void 0;
1350
+ childState.flatSingleEntries = void 0;
1351
+ childState.flatSlots = void 0;
1352
+ childState.flatBorderDefaultRequests = void 0;
1353
+ var mergeAccepted = function(_state, key2, value2, _importance, disableNormalize, originalValue) {
1354
+ styleOut[key2] = disableNormalize || styleProps.noNormalize ? value2 : normalizeValueWithProperty(value2, key2);
1355
+ var _styleInOriginalValues_key;
1356
+ var trackedOriginal = (_styleInOriginalValues_key = styleInOriginalValues === null || styleInOriginalValues === void 0 ? void 0 : styleInOriginalValues[key2]) !== null && _styleInOriginalValues_key !== void 0 ? _styleInOriginalValues_key : originalValue;
1357
+ if (trackedOriginal !== void 0) (originalValues || (originalValues = {}))[key2] = trackedOriginal;
1358
+ };
1359
+ for (var key in styleIn) {
1360
+ var value = styleIn[key];
1361
+ key = conf.shorthands[key] || key;
1362
+ if (key in skipProps || value == null) continue;
1363
+ contributeValue(childState, key, value, mergeAccepted);
921
1364
  }
1365
+ completeStreaming(childState, mergeAccepted);
1366
+ if (childState.transformAccumulator) styleOut.transform = finalizeTransformAccumulator(childState.transformAccumulator);
922
1367
  if (!styleProps.noNormalize) fixStyles(styleOut);
923
1368
  if (originalValues) styleOriginalValues.set(styleOut, originalValues);
924
1369
  return styleOut;
925
1370
  };
926
- isWeb && React.useInsertionEffect;
927
- var useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l, m) {
928
- "use no memo";
929
- return getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m);
1371
+ function passDownProp(viewProps, key, val) {
1372
+ if (key in viewProps) delete viewProps[key];
1373
+ viewProps[key] = val;
1374
+ }
1375
+ var frameSequence = 0;
1376
+ function streamWriteCSS(state, property, value, cursor, original) {
1377
+ var conditionOverride = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : -1;
1378
+ var direct = state;
1379
+ var condition = conditionOverride !== -1 ? conditionOverride : cursor ? conditionNumbers[cursor + conditionValueOffset] : 0;
1380
+ var identity = cursor ? conditionTexts[cursor + conditionKeyOffset] || "" : "";
1381
+ if (property.charCodeAt(0) === 116 && property.startsWith("transition")) {
1382
+ var _direct;
1383
+ var transitions = (_direct = direct).flatTransitions || (_direct.flatTransitions = []);
1384
+ for (var index = 0; index < transitions.length; index++) if (transitions[index].property === property && transitions[index].identity === identity) {
1385
+ transitions[index].value = value;
1386
+ transitions[index].condition = condition;
1387
+ return;
1388
+ }
1389
+ transitions.push({
1390
+ property,
1391
+ value,
1392
+ condition,
1393
+ identity,
1394
+ selector: cursor ? conditionTexts[cursor + conditionSelectorOffset] || "" : "",
1395
+ wrappers: cursor ? conditionWrapperCopy(cursor) : void 0
1396
+ });
1397
+ return;
1398
+ }
1399
+ streamAtomic(state, property, value, condition, identity, cursor ? conditionTexts[cursor + conditionSelectorOffset] || "" : "", cursor ? conditionWrappers : void 0, cursor ? conditionNumbers[cursor + conditionWrapperOffset] >> 3 : 0, cursor ? conditionNumbers[cursor + conditionWrapperOffset] & 7 : 0, direct.flatWeakContribution === true, original);
1400
+ }
1401
+ function streamWriteInline(state, property, value, cursor, merge, original) {
1402
+ var normalize = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : false, conditionOverride = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : -1;
1403
+ var _direct;
1404
+ var direct = state;
1405
+ var condition = conditionOverride !== -1 ? conditionOverride : cursor ? conditionNumbers[cursor + conditionValueOffset] : 0;
1406
+ var importance = condition ? Math.floor(condition / 256) + 1 : 0;
1407
+ var used = (_direct = direct).flatUsed || (_direct.flatUsed = {});
1408
+ var previous = used[property];
1409
+ if (previous !== void 0) {
1410
+ if (previous > importance) return;
1411
+ if (direct.flatWeakContribution === true) return;
1412
+ }
1413
+ used[property] = importance;
1414
+ merge(state, property, value, 1, !normalize, original);
1415
+ }
1416
+ function streamRetractInline(state, property, cursor) {
1417
+ var _direct;
1418
+ var direct = state;
1419
+ var condition = cursor ? conditionNumbers[cursor + conditionValueOffset] : 0;
1420
+ var importance = condition ? Math.floor(condition / 256) + 1 : 0;
1421
+ var used = (_direct = direct).flatUsed || (_direct.flatUsed = {});
1422
+ var previous = used[property];
1423
+ if (previous !== void 0 && previous > importance) return;
1424
+ used[property] = importance;
1425
+ if (state.style) delete state.style[property];
1426
+ }
1427
+ function convertDeferredInline(state, merge) {
1428
+ var _direct;
1429
+ var direct = state;
1430
+ var used = (_direct = direct).flatUsed || (_direct.flatUsed = {});
1431
+ var consume = function(entries) {
1432
+ for (var index = 0; index < entries.length; index++) {
1433
+ var entry = entries[index];
1434
+ var condition = entry.condition;
1435
+ if (condition && !(condition & 1)) continue;
1436
+ var importance = condition ? Math.floor(condition / 256) + 1 : 0;
1437
+ var previous = used[entry.property];
1438
+ if (previous !== void 0 && previous > importance) continue;
1439
+ used[entry.property] = importance;
1440
+ merge(state, entry.property, entry.value, 1, true, entry.original !== void 0 ? entry.original : entry.value);
1441
+ }
1442
+ };
1443
+ var slots = direct.flatSlots;
1444
+ if (slots) {
1445
+ direct.flatSlots = void 0;
1446
+ for (var property in slots) consume(slots[property]);
1447
+ }
1448
+ var transitions = direct.flatTransitions;
1449
+ if (transitions) {
1450
+ direct.flatTransitions = void 0;
1451
+ consume(transitions);
1452
+ }
1453
+ direct.flatBorderDefaultRequests = void 0;
1454
+ }
1455
+ function completeStreaming(state, merge) {
1456
+ var direct = state;
1457
+ var shadow = direct.flatWebShadow;
1458
+ if (shadow && (direct.flatBoxShadowSequence || 0) <= shadow[4]) {
1459
+ var offset = shadow[1] || {
1460
+ width: 0,
1461
+ height: 0
1462
+ };
1463
+ var _shadow_;
1464
+ var color = normalizeColor(shadow[0], (_shadow_ = shadow[2]) !== null && _shadow_ !== void 0 ? _shadow_ : 1);
1465
+ if (color) {
1466
+ var next = `${shadowUnit(offset.width)} ${shadowUnit(offset.height)} ${shadowUnit(shadow[3])} ${color}`;
1467
+ emitProperty(state, "boxShadow", direct.flatBoxShadow ? `${direct.flatBoxShadow}, ${next}` : next, null, merge, shadow[5], shadow[6]);
1468
+ }
1469
+ }
1470
+ completeStreamingCSS(state);
1471
+ }
1472
+ function emitAtParentCondition(state, property, value, merge, originalValue, contextOnly) {
1473
+ var _state_flatPass;
1474
+ emitValue(state, property, value, ((_state_flatPass = state.flatPass) === null || _state_flatPass === void 0 ? void 0 : _state_flatPass[passParentCursor]) || null, merge, originalValue, contextOnly);
1475
+ }
1476
+ function emitUnderCondition(state, property, value, cursor, merge, originalValue, contextOnly, warnMode, warnSource) {
1477
+ var condition = conditionNumbers[cursor + conditionValueOffset];
1478
+ if (merge && property && condition) state.flatPropSawCondition = true;
1479
+ if (!(conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag)) {
1480
+ if (warnMode && process.env.NODE_ENV === "development") warnRefusedValue(property, warnSource, `unknown modifier "${conditionTexts[cursor + conditionUnresolvedNameOffset] || ""}"`);
1481
+ return 0;
1482
+ }
1483
+ var unsupportedState = conditionTexts[cursor + conditionUnsupportedStateOffset] || "";
1484
+ if (warnMode && unsupportedState && process.env.NODE_ENV === "development") warnOnce(`${property}: "${unsupportedState}:" has no native component-state source; dropping the clause`);
1485
+ if (merge && property && condition & 2 && (condition & 1 || canGenerateCSS && state.flatShouldDoClasses || warnMode === 1 && conditionTexts[cursor + conditionThemeOffset] && supportsDynamicColorIOS && isColorStyleKey(property))) {
1486
+ emitValue(state, property, value, cursor, merge, warnMode === 2 ? originalValue : originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
1487
+ var flags = conditionNumbers[cursor + conditionFlagsOffset];
1488
+ if (flags & conditionEnterFlag) state.flatHasEnterStyle = true;
1489
+ if (flags & conditionPlatformPseudoFlag) state.flatHasPlatformPseudo = true;
1490
+ } else if (merge && property && condition & 2) {
1491
+ var flags1 = conditionNumbers[cursor + conditionFlagsOffset];
1492
+ if (flags1 & conditionEnterFlag) state.flatHasEnterStyle = true;
1493
+ if (flags1 & conditionPlatformPseudoFlag) state.flatHasPlatformPseudo = true;
1494
+ }
1495
+ return condition;
1496
+ }
1497
+ var directStyleHandler = {
1498
+ segment(state, start, end, isBase, valid, source, chainStart, chainEnd, chainValid, chainCount, _result, failure, failureIndex, property, merge, originalValue, contextOnly) {
1499
+ var _directState_flatPass;
1500
+ if (isBase) {
1501
+ if (start === end) return;
1502
+ feedCompoundSegment(state, source, start, end, true, valid || failure === "invalid-character" || failure === "stray-comment-close", "");
1503
+ if (!valid) {
1504
+ if (failure === "invalid-character" || failure === "stray-comment-close") return 16;
1505
+ if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : "an unterminated \"(\"");
1506
+ return;
1507
+ }
1508
+ var value = source.slice(start, end);
1509
+ emitAtParentCondition(state, property, value, merge, value, contextOnly);
1510
+ return 5;
1511
+ }
1512
+ if (!chainValid) {
1513
+ if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : "an unterminated \"(\"");
1514
+ return;
1515
+ }
1516
+ if (start === end) {
1517
+ if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, "a conditional clause has no value");
1518
+ return;
1519
+ }
1520
+ if (property === "aspectRatio" && chainCount === 1) {
1521
+ var left = Number(source.slice(chainStart, chainEnd));
1522
+ var right = Number(source.slice(start, end));
1523
+ if (chainStart < chainEnd && Number.isFinite(left) && left > 0 && Number.isFinite(right) && right > 0) return 12;
1524
+ }
1525
+ var directState = state;
1526
+ var cursor = directState.flatScanCursor;
1527
+ var condition = valid ? emitUnderCondition(state, property, source.slice(start, end), cursor, merge, void 0, contextOnly, 1, source) : conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag ? conditionNumbers[cursor + conditionValueOffset] : 0;
1528
+ feedCompoundSegment(directState, source, start, end, false, valid && Boolean(condition), condition && ((_directState_flatPass = directState.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passCompoundIndexes]) ? conditionTexts[cursor + conditionKeyOffset] || "" : "");
1529
+ if (!condition) return;
1530
+ if (!valid) {
1531
+ if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : "an unterminated \"(\"");
1532
+ return;
1533
+ }
1534
+ return 4 | (condition & 12 ? 2 : 0);
1535
+ },
1536
+ modifier(state, start, end, valid, first, source) {
1537
+ var directState = state;
1538
+ var cursor = directState.flatScanCursor;
1539
+ if (!cursor) {
1540
+ var _directState_flatPass;
1541
+ cursor = directState.flatScanCursor = acquireConditionCursor(((_directState_flatPass = directState.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passParentCursor]) || null);
1542
+ } else if (first) {
1543
+ var _directState_flatPass1;
1544
+ resetConditionCursor(cursor, ((_directState_flatPass1 = directState.flatPass) === null || _directState_flatPass1 === void 0 ? void 0 : _directState_flatPass1[passParentCursor]) || null);
1545
+ }
1546
+ if (!valid) {
1547
+ setConditionUnresolved(cursor);
1548
+ return;
1549
+ }
1550
+ if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) resolveConditionModifier(state, cursor, source.slice(start, end));
1551
+ },
1552
+ chain(state, _start, _end, valid) {
1553
+ var cursor = state.flatScanCursor;
1554
+ if (cursor) {
1555
+ if (!valid) setConditionUnresolved(cursor);
1556
+ if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) commitConditionCursor(state, cursor);
1557
+ }
1558
+ return true;
1559
+ },
1560
+ end(state, source, result, lastPayloadStart, chainCount, property, merge, originalValue, contextOnly, failure, failureIndex) {
1561
+ var hasBase = !!(result & 1);
1562
+ if (result & 16) {
1563
+ if (chainCount === 0) {
1564
+ emitAtParentCondition(state, property, source, merge, originalValue !== null && originalValue !== void 0 ? originalValue : source, contextOnly);
1565
+ hasBase = true;
1566
+ } else if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : "an unterminated \"(\"");
1567
+ }
1568
+ if (result & 8 && chainCount === 1) {
1569
+ emitAtParentCondition(state, property, source, merge, originalValue !== null && originalValue !== void 0 ? originalValue : source, contextOnly);
1570
+ hasBase = true;
1571
+ }
1572
+ if (process.env.NODE_ENV === "development" && !hasBase && result & 4 && (property in tokenCategories.color || property in tokenCategoryByProperty) && splitComponents(source.slice(lastPayloadStart)).length > 1) warnOnce(`${property}="${source}" has multiple values after its first conditional. Write the base value before the first conditional.`);
1573
+ if ((!canGenerateCSS || !state.flatShouldDoClasses) && result & 2 && !hasBase) {
1574
+ var value = implicitLifecycleBase(property);
1575
+ if (value !== null) emitAtParentCondition(state, property, value, merge, value, contextOnly);
1576
+ }
1577
+ }
1578
+ };
1579
+ function implicitLifecycleBase(property) {
1580
+ return property === "opacity" || property === "scale" || property === "scaleX" || property === "scaleY" ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
1581
+ }
1582
+ var legacyTransformParts = /* @__PURE__ */ new Set([
1583
+ "matrix",
1584
+ "perspective",
1585
+ "rotateX",
1586
+ "rotateY",
1587
+ "rotateZ",
1588
+ "scaleZ",
1589
+ "skewX",
1590
+ "skewY"
1591
+ ]);
1592
+ var webShadowParts = {
1593
+ shadowColor: 1,
1594
+ shadowOffset: 2,
1595
+ shadowOpacity: 3,
1596
+ shadowRadius: 4
930
1597
  };
931
- var mergeTransform = function(obj, key, val) {
932
- var backwards = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
933
- var _obj;
934
- if (typeof obj.transform === "string") return;
935
- (_obj = obj).transform || (_obj.transform = []);
936
- obj.transform[backwards ? "unshift" : "push"]({ [mapTransformKeys[key] || key]: val });
1598
+ var webTextShadowParts = /* @__PURE__ */ new Set([
1599
+ "textShadowColor",
1600
+ "textShadowOffset",
1601
+ "textShadowRadius"
1602
+ ]);
1603
+ var lineStyles = /* @__PURE__ */ new Set([
1604
+ "none",
1605
+ "hidden",
1606
+ "dotted",
1607
+ "dashed",
1608
+ "solid",
1609
+ "double",
1610
+ "groove",
1611
+ "ridge",
1612
+ "inset",
1613
+ "outset"
1614
+ ]);
1615
+ var borderTargets = {
1616
+ border: {
1617
+ width: [
1618
+ "borderTopWidth",
1619
+ "borderRightWidth",
1620
+ "borderBottomWidth",
1621
+ "borderLeftWidth"
1622
+ ],
1623
+ style: [
1624
+ "borderTopStyle",
1625
+ "borderRightStyle",
1626
+ "borderBottomStyle",
1627
+ "borderLeftStyle"
1628
+ ],
1629
+ color: [
1630
+ "borderTopColor",
1631
+ "borderRightColor",
1632
+ "borderBottomColor",
1633
+ "borderLeftColor"
1634
+ ]
1635
+ },
1636
+ borderTop: {
1637
+ width: ["borderTopWidth"],
1638
+ style: ["borderTopStyle"],
1639
+ color: ["borderTopColor"]
1640
+ },
1641
+ borderRight: {
1642
+ width: ["borderRightWidth"],
1643
+ style: ["borderRightStyle"],
1644
+ color: ["borderRightColor"]
1645
+ },
1646
+ borderBottom: {
1647
+ width: ["borderBottomWidth"],
1648
+ style: ["borderBottomStyle"],
1649
+ color: ["borderBottomColor"]
1650
+ },
1651
+ borderLeft: {
1652
+ width: ["borderLeftWidth"],
1653
+ style: ["borderLeftStyle"],
1654
+ color: ["borderLeftColor"]
1655
+ },
1656
+ outline: {
1657
+ width: ["outlineWidth"],
1658
+ style: ["outlineStyle"],
1659
+ color: ["outlineColor"]
1660
+ },
1661
+ borderBlock: {
1662
+ width: ["borderBlockStartWidth", "borderBlockEndWidth"],
1663
+ style: ["borderBlockStartStyle", "borderBlockEndStyle"],
1664
+ color: ["borderBlockStartColor", "borderBlockEndColor"]
1665
+ },
1666
+ borderInline: {
1667
+ width: ["borderInlineStartWidth", "borderInlineEndWidth"],
1668
+ style: ["borderInlineStartStyle", "borderInlineEndStyle"],
1669
+ color: ["borderInlineStartColor", "borderInlineEndColor"]
1670
+ }
937
1671
  };
938
- var mapTransformKeys = {
939
- x: "translateX",
940
- y: "translateY"
1672
+ var tokenLookup = {
1673
+ value: void 0,
1674
+ fromTheme: false,
1675
+ themeKey: ""
941
1676
  };
942
- function passDownProp(viewProps, key, val) {
943
- viewProps[key] = val;
1677
+ function fillTokenLookup(value, fromTheme, themeKey) {
1678
+ tokenLookup.value = value;
1679
+ tokenLookup.fromTheme = fromTheme;
1680
+ tokenLookup.themeKey = themeKey;
1681
+ return tokenLookup;
944
1682
  }
945
- function normalizeStyle(style) {
946
- var out = {};
947
- for (var key in style) {
948
- var val = style[key];
949
- if (key in stylePropsTransform) mergeTransform(out, key, val);
950
- else out[key] = normalizeValueWithProperty(val, key);
1683
+ function tokenVariable(state, property, name) {
1684
+ var _state_theme, _state_conf_themes_, _state_conf_themes, _state_conf_tokensParsed_space, _state_conf_tokensParsed_color;
1685
+ var lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
1686
+ if (property === "fontFamily") {
1687
+ var _state_conf_fontsParsed_lookupName;
1688
+ var family = (_state_conf_fontsParsed_lookupName = state.conf.fontsParsed[lookupName]) === null || _state_conf_fontsParsed_lookupName === void 0 ? void 0 : _state_conf_fontsParsed_lookupName.family;
1689
+ return family ? fillTokenLookup(family, false, lookupName) : void 0;
1690
+ }
1691
+ var fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : void 0;
1692
+ if (fontKey) {
1693
+ var _font_fontKey;
1694
+ var font = state.conf.fontsParsed[state.fontFamily || state.conf.defaultFontToken] || state.conf.fontsParsed[state.conf.defaultFontToken];
1695
+ var value = font === null || font === void 0 ? void 0 : (_font_fontKey = font[fontKey]) === null || _font_fontKey === void 0 ? void 0 : _font_fontKey[lookupName];
1696
+ return value ? fillTokenLookup(value, false, lookupName) : void 0;
1697
+ }
1698
+ var category = getTokenCategoryForProperty(property);
1699
+ var dot = lookupName.indexOf(".");
1700
+ if (dot !== -1) {
1701
+ var prefix = lookupName.slice(0, dot);
1702
+ if (!category || prefix === category || prefix === "color") lookupName = lookupName.slice(dot + 1);
1703
+ }
1704
+ if (category) {
1705
+ var _state_conf_tokensParsed_category;
1706
+ var own = (_state_conf_tokensParsed_category = state.conf.tokensParsed[category]) === null || _state_conf_tokensParsed_category === void 0 ? void 0 : _state_conf_tokensParsed_category[lookupName];
1707
+ if (own) return fillTokenLookup(own, false, lookupName);
1708
+ for (var _i = 0, _iter = [
1709
+ "color",
1710
+ "space",
1711
+ "size",
1712
+ "radius",
1713
+ "zIndex"
1714
+ ]; _i < _iter.length; _i++) {
1715
+ var sibling = _iter[_i];
1716
+ var _state_conf_tokensParsed_sibling;
1717
+ if (sibling !== category && ((_state_conf_tokensParsed_sibling = state.conf.tokensParsed[sibling]) === null || _state_conf_tokensParsed_sibling === void 0 ? void 0 : _state_conf_tokensParsed_sibling[lookupName])) return;
1718
+ }
1719
+ } else {
1720
+ var first = lookupName.charCodeAt(0);
1721
+ if (first >= 48 && first <= 57 || first === 43 || first === 45 || first === 46) return;
1722
+ }
1723
+ var theme = ((_state_theme = state.theme) === null || _state_theme === void 0 ? void 0 : _state_theme[lookupName]) || ((_state_conf_themes = state.conf.themes) === null || _state_conf_themes === void 0 ? void 0 : (_state_conf_themes_ = _state_conf_themes[state.flatThemeName || ""]) === null || _state_conf_themes_ === void 0 ? void 0 : _state_conf_themes_[lookupName]);
1724
+ if (theme) return fillTokenLookup(theme, true, lookupName);
1725
+ if (category) return;
1726
+ var token = ((_state_conf_tokensParsed_space = state.conf.tokensParsed.space) === null || _state_conf_tokensParsed_space === void 0 ? void 0 : _state_conf_tokensParsed_space[lookupName]) || ((_state_conf_tokensParsed_color = state.conf.tokensParsed.color) === null || _state_conf_tokensParsed_color === void 0 ? void 0 : _state_conf_tokensParsed_color[lookupName]);
1727
+ return token ? fillTokenLookup(token, false, lookupName) : void 0;
1728
+ }
1729
+ var literalMissConf = null;
1730
+ var literalMissRevision = -1;
1731
+ var literalMisses = /* @__PURE__ */ new WeakMap();
1732
+ var literalMissRootTheme = {};
1733
+ function isFontKeyedProperty(property) {
1734
+ return property === "fontFamily" || property === "fontSize" || property === "fontWeight" || property === "lineHeight" || property === "letterSpacing";
1735
+ }
1736
+ function literalMissSet(state) {
1737
+ var revision = getConfigRevisionState(state.conf).revision;
1738
+ if (state.conf !== literalMissConf || revision !== literalMissRevision) {
1739
+ literalMissConf = state.conf;
1740
+ literalMissRevision = revision;
1741
+ literalMisses = /* @__PURE__ */ new WeakMap();
1742
+ }
1743
+ var themeKey = state.theme && _type_of(state.theme) === "object" ? state.theme : literalMissRootTheme;
1744
+ var set = literalMisses.get(themeKey);
1745
+ if (!set) {
1746
+ set = /* @__PURE__ */ new Set();
1747
+ literalMisses.set(themeKey, set);
1748
+ }
1749
+ return set;
1750
+ }
1751
+ function configuredValue(state, property, raw) {
1752
+ var name = raw;
1753
+ var opacity;
1754
+ var slash = raw.lastIndexOf("/");
1755
+ if (slash > 0) {
1756
+ var amount = Number(raw.slice(slash + 1));
1757
+ if (Number.isInteger(amount) && amount >= 0 && amount <= 100) {
1758
+ name = raw.slice(0, slash);
1759
+ opacity = amount;
1760
+ }
1761
+ }
1762
+ var safeArea = resolveSafeAreaVariable(name);
1763
+ if (safeArea !== void 0) {
1764
+ state.flatUsesSafeArea = true;
1765
+ return safeArea;
1766
+ }
1767
+ var cacheable = !isFontKeyedProperty(property);
1768
+ var misses;
1769
+ var missKey = "";
1770
+ if (cacheable) {
1771
+ misses = literalMissSet(state);
1772
+ missKey = `${state.flatThemeName || ""}${property}${name}`;
1773
+ if (misses.has(missKey)) return raw;
1774
+ }
1775
+ var lookup = tokenVariable(state, property, name);
1776
+ if (!lookup || !isVariable(lookup.value)) {
1777
+ var _state_conf_tokensParsed_color;
1778
+ if (misses) misses.add(missKey);
1779
+ if (process.env.NODE_ENV === "development" && tokenCategoryByProperty[property] && ((_state_conf_tokensParsed_color = state.conf.tokensParsed.color) === null || _state_conf_tokensParsed_color === void 0 ? void 0 : _state_conf_tokensParsed_color[name])) warnOnce(`"${name}" contributes to "color", not "${property}"; keeping it literal`);
1780
+ return raw;
1781
+ }
1782
+ var resolveValues = state.styleProps.resolveValues;
1783
+ if (resolveValues === "except-theme" && lookup.fromTheme) return `${THEME_REF_PREFIX}${lookup.themeKey}${opacity !== void 0 ? `/${opacity}` : ""}`;
1784
+ var value = resolveVariableValue(property, lookup.value, resolveValues);
1785
+ if (opacity !== void 0) value = normalizeColor(value, opacity / 100);
1786
+ return value;
1787
+ }
1788
+ function resolveEmbeddedTokens(state, property, raw) {
1789
+ var copyFrom = 0;
1790
+ var out = "";
1791
+ var quote = 0;
1792
+ for (var index = 0; index < raw.length; index++) {
1793
+ var code = raw.charCodeAt(index);
1794
+ if (quote) {
1795
+ if (code === 92) index++;
1796
+ else if (code === quote) quote = 0;
1797
+ continue;
1798
+ }
1799
+ if (code === 34 || code === 39) {
1800
+ quote = code;
1801
+ continue;
1802
+ }
1803
+ if (!(code === 36 || code === 95 || code >= 65 && code <= 90 || code >= 97 && code <= 122)) continue;
1804
+ var end = index + 1;
1805
+ while (end < raw.length) {
1806
+ var next = raw.charCodeAt(end);
1807
+ if (next === 36 || next === 45 || next === 46 || next === 95 || next >= 48 && next <= 57 || next >= 65 && next <= 90 || next >= 97 && next <= 122) end++;
1808
+ else break;
1809
+ }
1810
+ if (raw.charCodeAt(end) === 47) {
1811
+ var suffix = end + 1;
1812
+ while (suffix < raw.length) {
1813
+ var next1 = raw.charCodeAt(suffix);
1814
+ if (next1 < 48 || next1 > 57) break;
1815
+ suffix++;
1816
+ }
1817
+ if (suffix > end + 1) end = suffix;
1818
+ }
1819
+ var before = raw.charCodeAt(index - 1);
1820
+ if (code !== 36 && (before >= 48 && before <= 57 || before === 35 || before === 45 && raw.charCodeAt(index - 2) === 45 || raw.charCodeAt(end) === 40)) {
1821
+ index = end - 1;
1822
+ continue;
1823
+ }
1824
+ var word = raw.slice(index, end);
1825
+ var value = configuredValue(state, property, word);
1826
+ if (value !== word) {
1827
+ out += raw.slice(copyFrom, index);
1828
+ out += String(value);
1829
+ copyFrom = end;
1830
+ }
1831
+ index = end - 1;
1832
+ }
1833
+ return copyFrom ? out + raw.slice(copyFrom) : raw;
1834
+ }
1835
+ function normalizeTransitionNames(state, raw) {
1836
+ var quote = 0;
1837
+ var depth = 0;
1838
+ var copyFrom = 0;
1839
+ var out = "";
1840
+ for (var index = 0; index < raw.length; index++) {
1841
+ var code = raw.charCodeAt(index);
1842
+ if (quote) {
1843
+ if (code === 92) index++;
1844
+ else if (code === quote) quote = 0;
1845
+ continue;
1846
+ }
1847
+ if (code === 34 || code === 39) {
1848
+ quote = code;
1849
+ continue;
1850
+ }
1851
+ if (code === 40) {
1852
+ depth++;
1853
+ continue;
1854
+ }
1855
+ if (code === 41) {
1856
+ depth--;
1857
+ continue;
1858
+ }
1859
+ if (depth || !(code >= 65 && code <= 90 || code >= 97 && code <= 122 || code === 95) || index > 1 && raw.charCodeAt(index - 1) === 45 && raw.charCodeAt(index - 2) === 45) continue;
1860
+ var end = index + 1;
1861
+ while (end < raw.length) {
1862
+ var next = raw.charCodeAt(end);
1863
+ if (next >= 48 && next <= 57 || next >= 65 && next <= 90 || next >= 97 && next <= 122 || next === 45 || next === 95) end++;
1864
+ else break;
1865
+ }
1866
+ if (raw.charCodeAt(end) !== 40) {
1867
+ var authored = raw.slice(index, end);
1868
+ var property = state.conf.shorthands[authored] || authored;
1869
+ if (property === "x" || property === "y") property = "translate";
1870
+ else if (property === "scaleX" || property === "scaleY") property = "scale";
1871
+ else if (legacyTransformParts.has(property)) property = "transform";
1872
+ var hasUpper = false;
1873
+ for (var offset = 0; offset < property.length; offset++) {
1874
+ var letter = property.charCodeAt(offset);
1875
+ if (letter >= 65 && letter <= 90) {
1876
+ hasUpper = true;
1877
+ break;
1878
+ }
1879
+ }
1880
+ if (property !== authored || hasUpper) {
1881
+ out += raw.slice(copyFrom, index);
1882
+ for (var offset1 = 0; offset1 < property.length; offset1++) {
1883
+ var letter1 = property.charCodeAt(offset1);
1884
+ out += letter1 >= 65 && letter1 <= 90 ? `-${String.fromCharCode(letter1 + 32)}` : property[offset1];
1885
+ }
1886
+ copyFrom = end;
1887
+ }
1888
+ }
1889
+ index = end - 1;
1890
+ }
1891
+ return copyFrom ? out + raw.slice(copyFrom) : raw;
1892
+ }
1893
+ function getDirectDynamicThemeAccess(state) {
1894
+ return state.flatDynamicThemeAccess;
1895
+ }
1896
+ function emitProperty(state, property, value, cursor, merge, originalValue, contextOnly) {
1897
+ var _state_animationDriver;
1898
+ var _state, _state1;
1899
+ var direct = state;
1900
+ var condition = cursor ? conditionNumbers[cursor + conditionValueOffset] : 0;
1901
+ if (condition & 4) ((_state = state).flatEnterKeys || (_state.flatEnterKeys = /* @__PURE__ */ new Set())).add(property);
1902
+ if (condition & 8) ((_state1 = state).flatExitKeys || (_state1.flatExitKeys = /* @__PURE__ */ new Set())).add(property);
1903
+ var theme = cursor ? conditionTexts[cursor + conditionThemeOffset] || "" : "";
1904
+ if (theme) {
1905
+ if (supportsDynamicColorIOS && isColorStyleKey(property)) {
1906
+ var _direct, _ref, _property;
1907
+ var schemes = (_ref = (_direct = direct).flatDynamicColors || (_direct.flatDynamicColors = {}))[_property = property] || (_ref[_property] = {});
1908
+ schemes[theme] = typeof originalValue === "string" && isAsciiLetters(originalValue) ? originalValue : value;
1909
+ streamWriteInline(state, property, { dynamic: { ...schemes } }, cursor, merge, originalValue, true, condition & 1 ? condition : condition + 1);
1910
+ return;
1911
+ }
1912
+ direct.flatDynamicThemeAccess = true;
1913
+ }
1914
+ if (contextOnly) {
1915
+ if (!condition || condition & 1) {
1916
+ var _state2;
1917
+ ((_state2 = state).overriddenContextProps || (_state2.overriddenContextProps = {}))[property] = originalValue;
1918
+ }
1919
+ return;
1920
+ }
1921
+ if (canGenerateCSS && state.flatShouldDoClasses && !condition && property === "transform") {
1922
+ var _state3;
1923
+ if (process.env.NODE_ENV === "development" && state.transformAccumulator) {
1924
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
1925
+ try {
1926
+ for (var _iterator2 = getTransformPartKeys(state.transformAccumulator)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
1927
+ var part3 = _step2.value;
1928
+ warnOnce(`legacy transform part "${part3}" is dropped because "transform" owns the property`);
1929
+ }
1930
+ } catch (err) {
1931
+ _didIteratorError2 = true;
1932
+ _iteratorError2 = err;
1933
+ } finally {
1934
+ try {
1935
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
1936
+ } finally {
1937
+ if (_didIteratorError2) throw _iteratorError2;
1938
+ }
1939
+ }
1940
+ }
1941
+ (_state3 = state).transformAccumulator || (_state3.transformAccumulator = createTransformAccumulator());
1942
+ addTransformValue(state.transformAccumulator, property, value);
1943
+ return;
1944
+ }
1945
+ var shouldPromoteAnimatedStyle = canGenerateCSS && !condition && !state.flatShouldDoClasses && !state.styleProps.noMergeStyle && state.styleProps.isAnimated && ((_state_animationDriver = state.animationDriver) === null || _state_animationDriver === void 0 ? void 0 : _state_animationDriver.inputStyle) === "css" && property in nonAnimatableStyleProps;
1946
+ if (canGenerateCSS && (state.flatShouldDoClasses || shouldPromoteAnimatedStyle)) {
1947
+ if (!condition && state.style && direct.flatWeakContribution !== true && !(direct.flatUsed && direct.flatUsed[property])) delete state.style[property];
1948
+ streamWriteCSS(state, property, value, cursor, originalValue);
1949
+ return;
1950
+ }
1951
+ if (condition && !(condition & 1)) return;
1952
+ streamWriteInline(state, property, value, cursor, merge, originalValue);
1953
+ }
1954
+ function splitComponents(value) {
1955
+ var parts = [];
1956
+ var start = 0;
1957
+ var quote = 0;
1958
+ var depth = 0;
1959
+ for (var index = 0; index <= value.length; index++) {
1960
+ var code = index === value.length ? 32 : value.charCodeAt(index);
1961
+ if (quote) {
1962
+ if (code === 92) index++;
1963
+ else if (code === quote) quote = 0;
1964
+ continue;
1965
+ }
1966
+ if (code === 34 || code === 39) quote = code;
1967
+ else if (code === 40) depth++;
1968
+ else if (code === 41) depth--;
1969
+ else if (!depth && code <= 32) {
1970
+ if (index > start) parts.push(value.slice(start, index));
1971
+ start = index + 1;
1972
+ }
1973
+ }
1974
+ return parts;
1975
+ }
1976
+ function isAsciiLetters(value) {
1977
+ if (!value) return false;
1978
+ for (var index = 0; index < value.length; index++) {
1979
+ var code = value.charCodeAt(index) | 32;
1980
+ if (code < 97 || code > 122) return false;
1981
+ }
1982
+ return true;
1983
+ }
1984
+ function numericUnitValue(value, first, second) {
1985
+ var unitLength = value.endsWith(first) || second !== void 0 && value.endsWith(second) ? first.length : 0;
1986
+ if (!unitLength || value.length === unitLength) return NaN;
1987
+ var numeric = Number(value.slice(0, value.length - unitLength));
1988
+ return Number.isFinite(numeric) ? numeric : NaN;
1989
+ }
1990
+ function isNumericCSSComponent(value) {
1991
+ var index = 0;
1992
+ if (value.charCodeAt(index) === 43 || value.charCodeAt(index) === 45) index++;
1993
+ var digits = 0;
1994
+ var dot = false;
1995
+ for (; index < value.length; index++) {
1996
+ var code = value.charCodeAt(index);
1997
+ if (code >= 48 && code <= 57) {
1998
+ digits++;
1999
+ continue;
2000
+ }
2001
+ if (code === 46 && !dot) {
2002
+ dot = true;
2003
+ continue;
2004
+ }
2005
+ break;
2006
+ }
2007
+ if (!digits) return false;
2008
+ for (; index < value.length; index++) {
2009
+ var code1 = value.charCodeAt(index);
2010
+ if (code1 !== 37 && (code1 < 97 || code1 > 122)) return false;
2011
+ }
2012
+ return true;
2013
+ }
2014
+ function startsValueFunction(value) {
2015
+ var index = 0;
2016
+ while (index < value.length) {
2017
+ var code = value.charCodeAt(index);
2018
+ if (code === 45 || code >= 97 && code <= 122) {
2019
+ index++;
2020
+ continue;
2021
+ }
2022
+ break;
2023
+ }
2024
+ return index > 0 && value.charCodeAt(index) === 40;
2025
+ }
2026
+ function emitBorder(state, property, raw, cursor, merge, originalValue, contextOnly) {
2027
+ if (property === "borderBlock" || property === "borderInline") {
2028
+ if (process.env.NODE_ENV === "development") warnOnce(`RN has no logical border shorthand "${property}"; dropping it`);
2029
+ return;
2030
+ }
2031
+ var width;
2032
+ var style;
2033
+ var color;
2034
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
2035
+ try {
2036
+ for (var _iterator2 = splitComponents(raw)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
2037
+ var part3 = _step2.value;
2038
+ if (lineStyles.has(part3) || property === "outline" && part3 === "auto") style = part3;
2039
+ else if (part3 === "thin" || part3 === "medium" || part3 === "thick" || isNumericCSSComponent(part3) || startsValueFunction(part3)) width = part3;
2040
+ else color = part3;
2041
+ }
2042
+ } catch (err) {
2043
+ _didIteratorError2 = true;
2044
+ _iteratorError2 = err;
2045
+ } finally {
2046
+ try {
2047
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
2048
+ } finally {
2049
+ if (_didIteratorError2) throw _iteratorError2;
2050
+ }
2051
+ }
2052
+ if (style === "none" && width === void 0) width = "0";
2053
+ var targets = borderTargets[property];
2054
+ if (width !== void 0) {
2055
+ var _iteratorNormalCompletion12 = true, _didIteratorError12 = false, _iteratorError12 = void 0;
2056
+ try {
2057
+ for (var _iterator12 = targets.width[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
2058
+ var target2 = _step12.value;
2059
+ emitResolved(state, target2, width, cursor, merge, originalValue, contextOnly);
2060
+ }
2061
+ } catch (err) {
2062
+ _didIteratorError12 = true;
2063
+ _iteratorError12 = err;
2064
+ } finally {
2065
+ try {
2066
+ if (!_iteratorNormalCompletion12 && _iterator12.return != null) _iterator12.return();
2067
+ } finally {
2068
+ if (_didIteratorError12) throw _iteratorError12;
2069
+ }
2070
+ }
2071
+ }
2072
+ if (style !== void 0) {
2073
+ var styleTargets = property === "border" ? ["borderStyle"] : targets.style;
2074
+ var _iteratorNormalCompletion22 = true, _didIteratorError22 = false, _iteratorError22 = void 0;
2075
+ try {
2076
+ for (var _iterator22 = styleTargets[Symbol.iterator](), _step22; !(_iteratorNormalCompletion22 = (_step22 = _iterator22.next()).done); _iteratorNormalCompletion22 = true) {
2077
+ var target1 = _step22.value;
2078
+ emitProperty(state, target1, style, cursor, merge, originalValue, contextOnly);
2079
+ }
2080
+ } catch (err) {
2081
+ _didIteratorError22 = true;
2082
+ _iteratorError22 = err;
2083
+ } finally {
2084
+ try {
2085
+ if (!_iteratorNormalCompletion22 && _iterator22.return != null) _iterator22.return();
2086
+ } finally {
2087
+ if (_didIteratorError22) throw _iteratorError22;
2088
+ }
2089
+ }
2090
+ }
2091
+ if (color !== void 0) {
2092
+ var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = void 0;
2093
+ try {
2094
+ for (var _iterator3 = targets.color[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
2095
+ var target22 = _step3.value;
2096
+ emitResolved(state, target22, color, cursor, merge, originalValue, contextOnly);
2097
+ }
2098
+ } catch (err) {
2099
+ _didIteratorError3 = true;
2100
+ _iteratorError3 = err;
2101
+ } finally {
2102
+ try {
2103
+ if (!_iteratorNormalCompletion3 && _iterator3.return != null) _iterator3.return();
2104
+ } finally {
2105
+ if (_didIteratorError3) throw _iteratorError3;
2106
+ }
2107
+ }
2108
+ }
2109
+ }
2110
+ function emitTextDecoration(state, raw, cursor, merge, originalValue, contextOnly) {
2111
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
2112
+ try {
2113
+ for (var _iterator2 = splitComponents(raw)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
2114
+ var part3 = _step2.value;
2115
+ emitResolved(state, part3 === "solid" || part3 === "double" || part3 === "dotted" || part3 === "dashed" || part3 === "wavy" ? "textDecorationStyle" : part3 === "underline" || part3 === "overline" || part3 === "line-through" || part3 === "none" ? "textDecorationLine" : "textDecorationColor", part3, cursor, merge, originalValue, contextOnly);
2116
+ }
2117
+ } catch (err) {
2118
+ _didIteratorError2 = true;
2119
+ _iteratorError2 = err;
2120
+ } finally {
2121
+ try {
2122
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
2123
+ } finally {
2124
+ if (_didIteratorError2) throw _iteratorError2;
2125
+ }
2126
+ }
2127
+ }
2128
+ function emitTransform(state, property, value, cursor, merge, originalValue, contextOnly) {
2129
+ if (!canGenerateCSS || !state.flatShouldDoClasses) {
2130
+ emitProperty(state, property, value, cursor, merge, originalValue, contextOnly);
2131
+ return;
2132
+ }
2133
+ var targets = property === "scale" ? ["--t-scale-x", "--t-scale-y"] : [property === "x" ? "--t-x" : property === "y" ? "--t-y" : property === "scaleX" ? "--t-scale-x" : property === "scaleY" ? "--t-scale-y" : "rotate"];
2134
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
2135
+ try {
2136
+ for (var _iterator2 = targets[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
2137
+ var target2 = _step2.value;
2138
+ var targetValue = value;
2139
+ if (typeof targetValue === "number") {
2140
+ if (target2 === "--t-x" || target2 === "--t-y") targetValue = `${targetValue}px`;
2141
+ else if (target2 === "rotate") targetValue = `${targetValue}deg`;
2142
+ }
2143
+ emitProperty(state, target2, targetValue, cursor, merge, originalValue, contextOnly);
2144
+ if (target2 === "--t-x" || target2 === "--t-y") addComposition(state, "translate");
2145
+ else if (target2.startsWith("--t-scale")) addComposition(state, "scale");
2146
+ }
2147
+ } catch (err) {
2148
+ _didIteratorError2 = true;
2149
+ _iteratorError2 = err;
2150
+ } finally {
2151
+ try {
2152
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
2153
+ } finally {
2154
+ if (_didIteratorError2) throw _iteratorError2;
2155
+ }
2156
+ }
2157
+ }
2158
+ function emitResolved(state, property, raw, cursor, merge, originalValue, contextOnly) {
2159
+ var value = configuredValue(state, property, raw);
2160
+ if (value === raw) value = resolveEmbeddedTokens(state, property, raw);
2161
+ if (typeof value === "string") {
2162
+ var unitValue = numericUnitValue(value, "px", "dp");
2163
+ if (Number.isFinite(unitValue)) value = unitValue;
2164
+ else if (value !== "" && Number.isFinite(Number(value))) value = Number(value);
2165
+ }
2166
+ emitProperty(state, property, value, cursor, merge, originalValue, contextOnly);
2167
+ }
2168
+ var emitKindTransition = 1;
2169
+ var emitKindTransformPart = 2;
2170
+ var emitKindWebShadow = 3;
2171
+ var emitKindWebTextShadow = 4;
2172
+ var emitKindTransform = 5;
2173
+ var emitKindBorder = 6;
2174
+ var emitKindTextDecoration = 7;
2175
+ var emitKindBackground = 8;
2176
+ var emitKindAxis = 9;
2177
+ var emitKindBorderRadius = 10;
2178
+ var emitKindBorderWidth = 11;
2179
+ var emitValueKinds = {
2180
+ transition: emitKindTransition,
2181
+ transitionProperty: emitKindTransition,
2182
+ transform: emitKindTransform,
2183
+ textDecoration: emitKindTextDecoration,
2184
+ background: emitKindBackground,
2185
+ x: emitKindAxis,
2186
+ y: emitKindAxis,
2187
+ scale: emitKindAxis,
2188
+ scaleX: emitKindAxis,
2189
+ scaleY: emitKindAxis,
2190
+ rotate: emitKindAxis,
2191
+ borderRadius: emitKindBorderRadius,
2192
+ borderWidth: emitKindBorderWidth,
2193
+ borderTopWidth: emitKindBorderWidth,
2194
+ borderRightWidth: emitKindBorderWidth,
2195
+ borderBottomWidth: emitKindBorderWidth,
2196
+ borderLeftWidth: emitKindBorderWidth
2197
+ };
2198
+ var _iteratorNormalCompletion = true;
2199
+ var _didIteratorError = false;
2200
+ var _iteratorError = void 0;
2201
+ try {
2202
+ for (var _iterator = legacyTransformParts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2203
+ var part = _step.value;
2204
+ emitValueKinds[part] = emitKindTransformPart;
2205
+ }
2206
+ } catch (err) {
2207
+ _didIteratorError = true;
2208
+ _iteratorError = err;
2209
+ } finally {
2210
+ try {
2211
+ if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
2212
+ } finally {
2213
+ if (_didIteratorError) throw _iteratorError;
2214
+ }
2215
+ }
2216
+ for (var part1 in webShadowParts) emitValueKinds[part1] = emitKindWebShadow;
2217
+ var _iteratorNormalCompletion1 = true;
2218
+ var _didIteratorError1 = false;
2219
+ var _iteratorError1 = void 0;
2220
+ try {
2221
+ for (var _iterator1 = webTextShadowParts[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
2222
+ var part2 = _step1.value;
2223
+ emitValueKinds[part2] = emitKindWebTextShadow;
2224
+ }
2225
+ } catch (err) {
2226
+ _didIteratorError1 = true;
2227
+ _iteratorError1 = err;
2228
+ } finally {
2229
+ try {
2230
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
2231
+ } finally {
2232
+ if (_didIteratorError1) throw _iteratorError1;
2233
+ }
2234
+ }
2235
+ for (var target in borderTargets) emitValueKinds[target] = emitKindBorder;
2236
+ function shadowUnit(part3) {
2237
+ return typeof part3 === "number" ? `${part3}px` : part3 || "0px";
2238
+ }
2239
+ function emitValue(state, property, raw, cursor, merge, originalValue, contextOnly) {
2240
+ var condition = cursor ? conditionNumbers[cursor + conditionValueOffset] : 0;
2241
+ if (isVariable(raw)) raw = resolveVariableValue(property, raw, state.styleProps.resolveValues);
2242
+ var emitKind = emitValueKinds[property];
2243
+ if (emitKind !== void 0) switch (emitKind) {
2244
+ case emitKindTransition:
2245
+ if (typeof raw === "string") raw = normalizeTransitionNames(state, raw);
2246
+ break;
2247
+ case emitKindBorderWidth:
2248
+ requestBorderStyleDefault(state, property, condition, cursor ? conditionTexts[cursor + conditionKeyOffset] || "" : "", cursor ? conditionTexts[cursor + conditionSelectorOffset] || "" : "", cursor ? conditionWrappers : void 0, cursor ? conditionNumbers[cursor + conditionWrapperOffset] >> 3 : 0, cursor ? conditionNumbers[cursor + conditionWrapperOffset] & 7 : 0);
2249
+ break;
2250
+ case emitKindTransformPart:
2251
+ var value = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
2252
+ if (canGenerateCSS && state.flatShouldDoClasses && !condition) {
2253
+ var _state;
2254
+ (_state = state).transformAccumulator || (_state.transformAccumulator = createTransformAccumulator());
2255
+ addTransformValue(state.transformAccumulator, property, value);
2256
+ } else if (condition && canGenerateCSS && state.flatShouldDoClasses) emitProperty(state, "transform", `${property}(${value})`, cursor, merge, originalValue, contextOnly);
2257
+ else streamWriteInline(state, property, value, cursor, merge, originalValue, true);
2258
+ return;
2259
+ case emitKindWebShadow: break;
2260
+ case emitKindWebTextShadow: break;
2261
+ case emitKindTransform:
2262
+ if (canGenerateCSS && state.flatShouldDoClasses && Array.isArray(raw)) raw = transformsToString(raw);
2263
+ if (typeof raw === "string") {
2264
+ var transform = parseNativeTransform(raw);
2265
+ if (transform) {
2266
+ emitProperty(state, property, transform, cursor, merge, originalValue, contextOnly);
2267
+ return;
2268
+ }
2269
+ }
2270
+ break;
2271
+ case emitKindBorder:
2272
+ if (typeof raw === "string") {
2273
+ emitBorder(state, property, raw, cursor, merge, originalValue, contextOnly);
2274
+ return;
2275
+ }
2276
+ break;
2277
+ case emitKindTextDecoration:
2278
+ if (typeof raw === "string") {
2279
+ emitTextDecoration(state, raw, cursor, merge, originalValue, contextOnly);
2280
+ return;
2281
+ }
2282
+ break;
2283
+ case emitKindBackground:
2284
+ if (typeof raw === "string") {
2285
+ var parts = splitComponents(raw);
2286
+ if (parts.length === 1 && !startsValueFunction(parts[0])) {
2287
+ emitResolved(state, "backgroundColor", parts[0], cursor, merge, originalValue, contextOnly);
2288
+ return;
2289
+ }
2290
+ if (process.env.NODE_ENV === "development") warnOnce(`native background cannot represent "${raw}"; dropping it`);
2291
+ return;
2292
+ }
2293
+ break;
2294
+ case emitKindAxis:
2295
+ var value3 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
2296
+ if (typeof value3 === "string" && !value3.startsWith(THEME_REF_PREFIX)) {
2297
+ if (property === "rotate" && !Number.isFinite(numericUnitValue(value3, "deg", "rad"))) {
2298
+ if (process.env.NODE_ENV === "development") warnOnce(`native transform "${property}" cannot represent "${value3}"; dropping it`);
2299
+ if (condition & 1) {
2300
+ removeTransformValue(state.transformAccumulator, property);
2301
+ streamRetractInline(state, property, cursor);
2302
+ }
2303
+ return;
2304
+ }
2305
+ var unitValue = numericUnitValue(value3, "px", "dp");
2306
+ if (Number.isFinite(unitValue)) value3 = unitValue;
2307
+ else if (Number.isFinite(Number(value3))) value3 = Number(value3);
2308
+ }
2309
+ emitTransform(state, property, value3, cursor, merge, originalValue, contextOnly);
2310
+ return;
2311
+ case emitKindBorderRadius: break;
2312
+ }
2313
+ var value4 = raw;
2314
+ if (typeof raw === "string") {
2315
+ value4 = configuredValue(state, property, raw);
2316
+ if (value4 === raw) value4 = resolveEmbeddedTokens(state, property, raw);
2317
+ }
2318
+ if (typeof value4 === "string") {
2319
+ var unitValue1 = numericUnitValue(value4, "px", "dp");
2320
+ if (Number.isFinite(unitValue1)) value4 = unitValue1;
2321
+ else if (value4 !== "" && Number.isFinite(Number(value4))) value4 = Number(value4);
2322
+ }
2323
+ if (canGenerateCSS && state.flatShouldDoClasses && property === "boxShadow" && !condition) {
2324
+ state.flatBoxShadow = value4;
2325
+ state.flatBoxShadowSequence = frameSequence + 1;
2326
+ }
2327
+ if (typeof value4 === "string" && (property === "backgroundImage" || property === "boxShadow" || property === "textShadow")) {
2328
+ var parsed = parseNativeStyle(property, value4);
2329
+ if (parsed) {
2330
+ if (property === "textShadow") {
2331
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
2332
+ try {
2333
+ for (var _iterator2 = parsed[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
2334
+ var [key, parsedValue] = _step2.value;
2335
+ emitProperty(state, key, parsedValue, cursor, merge, originalValue, contextOnly);
2336
+ }
2337
+ } catch (err) {
2338
+ _didIteratorError2 = true;
2339
+ _iteratorError2 = err;
2340
+ } finally {
2341
+ try {
2342
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
2343
+ } finally {
2344
+ if (_didIteratorError2) throw _iteratorError2;
2345
+ }
2346
+ }
2347
+ } else emitProperty(state, property === "backgroundImage" ? "experimental_backgroundImage" : property, parsed, cursor, merge, originalValue, contextOnly);
2348
+ return;
2349
+ }
2350
+ }
2351
+ if (property === "fontVariant" && typeof value4 === "string") {
2352
+ var variants = [];
2353
+ var start = 0;
2354
+ for (var index = 0; index <= value4.length; index++) {
2355
+ var code = index === value4.length ? 32 : value4.charCodeAt(index);
2356
+ if (code !== 44 && code > 32) continue;
2357
+ if (start < index) variants.push(value4.slice(start, index));
2358
+ start = index + 1;
2359
+ }
2360
+ value4 = variants;
2361
+ }
2362
+ var expanded = state.styleProps.noExpand ? null : expandStyle(property, value4, state.conf.settings.styleCompat || "web");
2363
+ if (!expanded) {
2364
+ emitProperty(state, property, value4, cursor, merge, originalValue, contextOnly);
2365
+ return;
2366
+ }
2367
+ if (typeof raw === "string" && expanded.length > 1) {
2368
+ var parts1 = splitComponents(raw);
2369
+ if (parts1.length > 0 && parts1.length <= (expanded.length === 4 ? 4 : 2)) {
2370
+ for (var index1 = 0; index1 < expanded.length; index1++) {
2371
+ var partIndex = index1 === 0 || parts1.length === 1 ? 0 : index1 === 1 || index1 === 3 && parts1.length < 4 ? 1 : index1 === 2 && parts1.length < 3 ? 0 : index1;
2372
+ emitResolved(state, expanded[index1][0], parts1[partIndex], cursor, merge, originalValue, contextOnly);
2373
+ }
2374
+ return;
2375
+ }
2376
+ }
2377
+ for (var index2 = 0; index2 < expanded.length; index2++) emitProperty(state, expanded[index2][0], expanded[index2][1], cursor, merge, originalValue, contextOnly);
2378
+ }
2379
+ function contributeStyleString(state, property, source, merge, originalValue) {
2380
+ var contextOnly = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
2381
+ var directState = state;
2382
+ var watermark = conditionCursorTop;
2383
+ var previousCursor = directState.flatScanCursor;
2384
+ var previousExpectMulti = directState.flatExpectMulti;
2385
+ directState.flatScanCursor = null;
2386
+ directState.flatExpectMulti = source.indexOf(":") !== -1;
2387
+ try {
2388
+ scanFlatValue(source, directStyleHandler, state, property, merge, originalValue, contextOnly);
2389
+ } finally {
2390
+ directState.flatScanCursor = previousCursor;
2391
+ directState.flatExpectMulti = previousExpectMulti;
2392
+ releaseConditionCursors(watermark);
2393
+ }
2394
+ return true;
2395
+ }
2396
+ function contributeStyleObject(state, property, value, merge, contextOnly) {
2397
+ var outerState = state;
2398
+ var previousExpectMulti = outerState.flatExpectMulti;
2399
+ outerState.flatExpectMulti = true;
2400
+ try {
2401
+ return contributeStyleObjectInner(state, property, value, merge, contextOnly);
2402
+ } finally {
2403
+ outerState.flatExpectMulti = previousExpectMulti;
2404
+ }
2405
+ }
2406
+ function contributeStyleObjectInner(state, property, value, merge, contextOnly) {
2407
+ var _directState_flatPass;
2408
+ var directState = state;
2409
+ var parent = ((_directState_flatPass = directState.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passParentCursor]) || null;
2410
+ var hasDefault = Object.prototype.hasOwnProperty.call(value, "default");
2411
+ var hasBase = false;
2412
+ var base = hasDefault ? value.default : void 0;
2413
+ if (base != null) {
2414
+ var baseString = String(base);
2415
+ feedCompoundSegment(directState, baseString, 0, baseString.length, true, true, "");
2416
+ emitAtParentCondition(state, property, base, merge, base, contextOnly);
2417
+ hasBase = true;
2418
+ }
2419
+ var conditions = 0;
2420
+ var firstCondition = !hasDefault;
2421
+ for (var key in value) {
2422
+ if (key === "default") continue;
2423
+ var payload = value[key];
2424
+ var watermark = conditionCursorTop;
2425
+ var cursor = acquireConditionCursor(parent);
2426
+ resolveConditionText(state, cursor, key);
2427
+ var condition = commitConditionCursor(state, cursor);
2428
+ if (firstCondition) {
2429
+ firstCondition = false;
2430
+ if (!condition) {
2431
+ releaseConditionCursors(watermark);
2432
+ return false;
2433
+ }
2434
+ }
2435
+ if (payload != null) {
2436
+ var _directState_flatPass1;
2437
+ conditions |= emitUnderCondition(state, property, payload, cursor, merge, payload, contextOnly, 1, payload);
2438
+ var payloadString = String(payload);
2439
+ feedCompoundSegment(directState, payloadString, 0, payloadString.length, false, Boolean(condition), condition && ((_directState_flatPass1 = directState.flatPass) === null || _directState_flatPass1 === void 0 ? void 0 : _directState_flatPass1[passCompoundIndexes]) ? conditionTexts[cursor + conditionKeyOffset] || "" : "");
2440
+ }
2441
+ releaseConditionCursors(watermark);
2442
+ }
2443
+ if (!hasDefault && firstCondition) return false;
2444
+ if ((!canGenerateCSS || !state.flatShouldDoClasses) && conditions & 12 && !hasBase) {
2445
+ var resting = implicitLifecycleBase(property);
2446
+ if (resting !== null) emitAtParentCondition(state, property, resting, merge, resting, contextOnly);
2447
+ }
2448
+ return true;
2449
+ }
2450
+ function contributeValue(state, property, value, merge, originalValue) {
2451
+ var contextOnly = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false, condition = arguments.length > 6 ? arguments[6] : void 0;
2452
+ if (isConditionTransport(value)) {
2453
+ if (value.hasBase) contributeValue(state, property, value.base, merge, value.base, contextOnly);
2454
+ for (var offset = 0; offset < value.entries.length;) {
2455
+ var entryValue = value.entries[offset];
2456
+ var watermark = conditionCursorTop;
2457
+ try {
2458
+ var _state_flatPass;
2459
+ emitUnderCondition(state, property, entryValue, acquireTransportCursor(state, value.entries, offset, ((_state_flatPass = state.flatPass) === null || _state_flatPass === void 0 ? void 0 : _state_flatPass[passParentCursor]) || null), merge, entryValue, contextOnly, 2, entryValue);
2460
+ } finally {
2461
+ releaseConditionCursors(watermark);
2462
+ }
2463
+ offset += transportEntryWidth;
2464
+ }
2465
+ return true;
2466
+ }
2467
+ if (condition !== void 0) {
2468
+ var _directState_flatPass;
2469
+ var parent = ((_directState_flatPass = state.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passParentCursor]) || null;
2470
+ var watermark1 = conditionCursorTop;
2471
+ try {
2472
+ var effective;
2473
+ if (typeof condition === "string") {
2474
+ effective = acquireConditionCursor(parent);
2475
+ resolveConditionText(state, effective, condition);
2476
+ commitConditionCursor(state, effective);
2477
+ } else if (parent) {
2478
+ effective = acquireConditionCursor(parent);
2479
+ var conditionKey = conditionTexts[condition + conditionKeyOffset] || "";
2480
+ if (conditionKey) resolveConditionText(state, effective, conditionKey);
2481
+ if (!(conditionNumbers[condition + conditionFlagsOffset] & conditionResolvedFlag)) setConditionUnresolved(effective);
2482
+ commitConditionCursor(state, effective);
2483
+ } else effective = condition;
2484
+ var isObjectValue = value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !isVariable(value);
2485
+ var objectHasDefault = isObjectValue && Object.prototype.hasOwnProperty.call(value, "default");
2486
+ var firstChild = isObjectValue && !objectHasDefault ? acquireConditionCursor(effective) : null;
2487
+ if (isObjectValue && classifyConditionalObject(value, state, void 0, firstChild || void 0)) {
2488
+ var useFirstChild = firstChild !== null;
2489
+ for (var key in value) {
2490
+ var payload = value[key];
2491
+ if (payload == null) continue;
2492
+ if (key === "default") emitUnderCondition(state, property, payload, effective, merge, payload, contextOnly, 2, payload);
2493
+ else {
2494
+ var keyWatermark = conditionCursorTop;
2495
+ var child = useFirstChild ? firstChild : acquireConditionCursor(effective);
2496
+ if (useFirstChild) useFirstChild = false;
2497
+ else {
2498
+ resolveConditionText(state, child, key);
2499
+ commitConditionCursor(state, child);
2500
+ }
2501
+ emitUnderCondition(state, property, payload, child, merge, payload, contextOnly, 2, payload);
2502
+ if (child !== firstChild) releaseConditionCursors(keyWatermark);
2503
+ }
2504
+ }
2505
+ return true;
2506
+ }
2507
+ emitUnderCondition(state, property, value, effective, merge, originalValue, contextOnly, 2, value);
2508
+ return true;
2509
+ } finally {
2510
+ releaseConditionCursors(watermark1);
2511
+ }
2512
+ }
2513
+ if (value === "safe" && isSafeAreaKey(property)) {
2514
+ var expanded = expandSafeAreaValue(property);
2515
+ if (expanded) {
2516
+ state.flatUsesSafeArea = true;
2517
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
2518
+ try {
2519
+ for (var _iterator2 = expanded[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
2520
+ var [key1, resolved] = _step2.value;
2521
+ emitAtParentCondition(state, key1, resolved, merge, originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
2522
+ }
2523
+ } catch (err) {
2524
+ _didIteratorError2 = true;
2525
+ _iteratorError2 = err;
2526
+ } finally {
2527
+ try {
2528
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
2529
+ } finally {
2530
+ if (_didIteratorError2) throw _iteratorError2;
2531
+ }
2532
+ }
2533
+ return true;
2534
+ }
2535
+ }
2536
+ if (typeof value === "string") return contributeStyleString(state, property, value, merge, originalValue, contextOnly);
2537
+ if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !isVariable(value) && contributeStyleObject(state, property, value, merge, contextOnly)) return true;
2538
+ if (value != null) {
2539
+ emitAtParentCondition(state, property, value, merge, originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
2540
+ return true;
2541
+ }
2542
+ return false;
2543
+ }
2544
+ function clearDirectStyle(state, property) {
2545
+ var direct = state;
2546
+ var atomicKey = property.startsWith("transition") ? "transition" : webShadowParts[property] ? "boxShadow" : webTextShadowParts.has(property) ? "textShadow" : legacyTransformParts.has(property) ? "transform" : property;
2547
+ clearFrameAtomic(state, atomicKey);
2548
+ var used = direct.flatUsed;
2549
+ if (used) delete used[atomicKey];
2550
+ if (atomicKey === "transform") state.transformAccumulator = void 0;
2551
+ if (state.style) delete state.style[atomicKey];
2552
+ delete state.classNames[atomicKey];
2553
+ }
2554
+ var conditionTransports = /* @__PURE__ */ new WeakSet();
2555
+ function isConditionTransport(value) {
2556
+ return (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && value !== null && conditionTransports.has(value);
2557
+ }
2558
+ var transportEntryWidth = 2;
2559
+ function appendConditionEntry(entries, cursor, value) {
2560
+ entries.push(value, conditionTexts[cursor + conditionKeyOffset] || "");
2561
+ }
2562
+ function acquireTransportCursor(state, entries, offset, parent) {
2563
+ var cursor = acquireConditionCursor(parent);
2564
+ var key = entries[offset + 1];
2565
+ if (key) resolveConditionText(state, cursor, key);
2566
+ commitConditionCursor(state, cursor);
2567
+ return cursor;
2568
+ }
2569
+ function mergeConditionTransport(state, prev, cursor, value) {
2570
+ var transport;
2571
+ if (isConditionTransport(prev)) transport = prev;
2572
+ else {
2573
+ transport = {
2574
+ hasBase: false,
2575
+ base: void 0,
2576
+ entries: []
2577
+ };
2578
+ conditionTransports.add(transport);
2579
+ if (prev != null) {
2580
+ var isObjectValue = (typeof prev === "undefined" ? "undefined" : _type_of(prev)) === "object" && !Array.isArray(prev) && !isVariable(prev);
2581
+ var objectHasDefault = isObjectValue && Object.prototype.hasOwnProperty.call(prev, "default");
2582
+ var authoredWatermark = conditionCursorTop;
2583
+ try {
2584
+ var firstCursor = isObjectValue && !objectHasDefault ? acquireConditionCursor() : null;
2585
+ if (isObjectValue && classifyConditionalObject(prev, state, void 0, firstCursor || void 0)) {
2586
+ var useFirstCursor = firstCursor !== null;
2587
+ for (var key in prev) {
2588
+ var payload = prev[key];
2589
+ if (payload == null) continue;
2590
+ if (key === "default") {
2591
+ transport.hasBase = true;
2592
+ transport.base = payload;
2593
+ continue;
2594
+ }
2595
+ var watermark = conditionCursorTop;
2596
+ var keyCursor = useFirstCursor ? firstCursor : acquireConditionCursor();
2597
+ if (useFirstCursor) useFirstCursor = false;
2598
+ else {
2599
+ resolveConditionText(state, keyCursor, key);
2600
+ commitConditionCursor(state, keyCursor);
2601
+ }
2602
+ appendConditionEntry(transport.entries, keyCursor, payload);
2603
+ if (keyCursor !== firstCursor) releaseConditionCursors(watermark);
2604
+ }
2605
+ } else {
2606
+ transport.hasBase = true;
2607
+ transport.base = prev;
2608
+ }
2609
+ } finally {
2610
+ releaseConditionCursors(authoredWatermark);
2611
+ }
2612
+ }
2613
+ }
2614
+ var cursorKey = conditionTexts[cursor + conditionKeyOffset] || "";
2615
+ for (var offset = 0; offset < transport.entries.length; offset += transportEntryWidth) if (transport.entries[offset + 1] === cursorKey) {
2616
+ transport.entries.splice(offset, transportEntryWidth);
2617
+ break;
2618
+ }
2619
+ appendConditionEntry(transport.entries, cursor, value);
2620
+ return transport;
2621
+ }
2622
+ var variantValueHandler = {
2623
+ segment(ctx, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {
2624
+ var _directState_flatPass;
2625
+ var state = ctx[0];
2626
+ var directState = state;
2627
+ if (start === end) return;
2628
+ if (isBase) {
2629
+ feedCompoundSegment(directState, source, start, end, true, valid, "");
2630
+ if (!valid) return;
2631
+ emitResolvedVariant(ctx[1], source.slice(start, end), state, ctx[2], null);
2632
+ return;
2633
+ }
2634
+ if (!valid || !chainValid) return;
2635
+ var cursor = directState.flatScanCursor;
2636
+ var condition = cursor && conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag ? conditionNumbers[cursor + conditionValueOffset] : 0;
2637
+ feedCompoundSegment(directState, source, start, end, false, Boolean(condition), condition && ((_directState_flatPass = directState.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passCompoundIndexes]) ? conditionTexts[cursor + conditionKeyOffset] || "" : "");
2638
+ if (!condition) return;
2639
+ emitResolvedVariant(ctx[1], source.slice(start, end), state, ctx[2], cursor);
2640
+ },
2641
+ modifier(ctx, start, end, valid, first, source) {
2642
+ var directState = ctx[0];
2643
+ var cursor = directState.flatScanCursor;
2644
+ if (!cursor) cursor = directState.flatScanCursor = acquireConditionCursor();
2645
+ else if (first) resetConditionCursor(cursor, 0);
2646
+ if (!valid) {
2647
+ setConditionUnresolved(cursor);
2648
+ return;
2649
+ }
2650
+ if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) resolveConditionModifier(ctx[0], cursor, source.slice(start, end));
2651
+ },
2652
+ chain(ctx, _start, _end, valid) {
2653
+ var cursor = ctx[0].flatScanCursor;
2654
+ if (cursor) {
2655
+ if (!valid) setConditionUnresolved(cursor);
2656
+ if (conditionNumbers[cursor + conditionFlagsOffset] & conditionResolvedFlag) commitConditionCursor(ctx[0], cursor);
2657
+ }
2658
+ return true;
2659
+ }
2660
+ };
2661
+ var contextPropSets = /* @__PURE__ */ new WeakMap();
2662
+ function getContextPropSet(staticConfig) {
2663
+ var _staticConfig_parentStaticConfig, _staticConfig_parentStaticConfig1, _staticConfig_parentStaticConfig2, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig3;
2664
+ var cached = contextPropSets.get(staticConfig);
2665
+ if (cached !== void 0) return cached;
2666
+ var contextConfig = staticConfig.context || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : _staticConfig_parentStaticConfig.context);
2667
+ var inheritedContextPropKeys = !staticConfig.context || staticConfig.context === ((_staticConfig_parentStaticConfig1 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig1 === void 0 ? void 0 : _staticConfig_parentStaticConfig1.context) ? (_staticConfig_parentStaticConfig2 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig2 === void 0 ? void 0 : _staticConfig_parentStaticConfig2.contextProps : void 0;
2668
+ var contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;
2669
+ var set = null;
2670
+ if (contextConfig === null || contextConfig === void 0 ? void 0 : contextConfig.props) {
2671
+ set || (set = /* @__PURE__ */ new Set());
2672
+ for (var key in contextConfig.props) set.add(key);
2673
+ }
2674
+ if (contextPropKeys) {
2675
+ set || (set = /* @__PURE__ */ new Set());
2676
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
2677
+ try {
2678
+ for (var _iterator2 = contextPropKeys[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
2679
+ var key1 = _step2.value;
2680
+ set.add(key1);
2681
+ }
2682
+ } catch (err) {
2683
+ _didIteratorError2 = true;
2684
+ _iteratorError2 = err;
2685
+ } finally {
2686
+ try {
2687
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
2688
+ } finally {
2689
+ if (_didIteratorError2) throw _iteratorError2;
2690
+ }
2691
+ }
2692
+ }
2693
+ if (contextConfig === null || contextConfig === void 0 ? void 0 : contextConfig.propKeys) {
2694
+ set || (set = /* @__PURE__ */ new Set());
2695
+ var _iteratorNormalCompletion12 = true, _didIteratorError12 = false, _iteratorError12 = void 0;
2696
+ try {
2697
+ for (var _iterator12 = contextConfig.propKeys[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
2698
+ var key2 = _step12.value;
2699
+ set.add(key2);
2700
+ }
2701
+ } catch (err) {
2702
+ _didIteratorError12 = true;
2703
+ _iteratorError12 = err;
2704
+ } finally {
2705
+ try {
2706
+ if (!_iteratorNormalCompletion12 && _iterator12.return != null) _iterator12.return();
2707
+ } finally {
2708
+ if (_didIteratorError12) throw _iteratorError12;
2709
+ }
2710
+ }
2711
+ }
2712
+ var parentPropKeys = (_staticConfig_parentStaticConfig3 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig3 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig3.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.propKeys;
2713
+ if (parentPropKeys) {
2714
+ set || (set = /* @__PURE__ */ new Set());
2715
+ var _iteratorNormalCompletion22 = true, _didIteratorError22 = false, _iteratorError22 = void 0;
2716
+ try {
2717
+ for (var _iterator22 = parentPropKeys[Symbol.iterator](), _step22; !(_iteratorNormalCompletion22 = (_step22 = _iterator22.next()).done); _iteratorNormalCompletion22 = true) {
2718
+ var key3 = _step22.value;
2719
+ set.add(key3);
2720
+ }
2721
+ } catch (err) {
2722
+ _didIteratorError22 = true;
2723
+ _iteratorError22 = err;
2724
+ } finally {
2725
+ try {
2726
+ if (!_iteratorNormalCompletion22 && _iterator22.return != null) _iterator22.return();
2727
+ } finally {
2728
+ if (_didIteratorError22) throw _iteratorError22;
2729
+ }
2730
+ }
2731
+ }
2732
+ contextPropSets.set(staticConfig, set);
2733
+ return set;
2734
+ }
2735
+ function emitMappedValue(styleState, key, value, originalValue, nestedCondition, parentCondition, fallbackOriginal) {
2736
+ var nested = nestedCondition;
2737
+ var parent = parentCondition;
2738
+ var resolvedCondition = nested !== null && nested !== void 0 ? nested : parent;
2739
+ var watermark = conditionCursorTop;
2740
+ if (nested && parent) {
2741
+ var composed = acquireConditionCursor(parent);
2742
+ var nestedKey = conditionTexts[nested + conditionKeyOffset] || "";
2743
+ if (nestedKey) resolveConditionText(styleState, composed, nestedKey);
2744
+ if (!(conditionNumbers[nested + conditionFlagsOffset] & conditionResolvedFlag)) setConditionUnresolved(composed);
2745
+ commitConditionCursor(styleState, composed);
2746
+ resolvedCondition = composed;
2747
+ }
2748
+ var conf = styleState.conf;
2749
+ if (key === "fontFamily" || key === conf.inverseShorthands.fontFamily) styleState.fontFamily = getFontFamilyFromNameOrVariable(value, conf);
2750
+ mapContributedProp(styleState, key, value, originalValue !== null && originalValue !== void 0 ? originalValue : fallbackOriginal, resolvedCondition);
2751
+ releaseConditionCursors(watermark);
2752
+ }
2753
+ var contributeMappedValue = function(key, value, styleState, disabled, parentCondition, fallbackOriginal) {
2754
+ if (disabled) return emitMappedValue(styleState, key, value, void 0, void 0, parentCondition, fallbackOriginal);
2755
+ var { conf, styleProps, staticConfig } = styleState;
2756
+ var { variants } = staticConfig;
2757
+ var { disableExpandShorthands, noExpand, resolveValues } = styleProps;
2758
+ var shorthands = conf.shorthands;
2759
+ if (value === "unset") {
2760
+ var expandedKey = !disableExpandShorthands && shorthands[key] || key;
2761
+ var expanded = noExpand ? null : expandStyle(expandedKey, value, conf.settings.styleCompat || "web");
2762
+ var used = styleState.flatUsed;
2763
+ if (expanded) {
2764
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
2765
+ try {
2766
+ for (var _iterator2 = expanded[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
2767
+ var [nkey] = _step2.value;
2768
+ if (used) delete used[nkey];
2769
+ if (styleState.style) delete styleState.style[nkey];
2770
+ }
2771
+ } catch (err) {
2772
+ _didIteratorError2 = true;
2773
+ _iteratorError2 = err;
2774
+ } finally {
2775
+ try {
2776
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
2777
+ } finally {
2778
+ if (_didIteratorError2) throw _iteratorError2;
2779
+ }
2780
+ }
2781
+ } else {
2782
+ if (used) delete used[expandedKey];
2783
+ if (styleState.style) delete styleState.style[expandedKey];
2784
+ }
2785
+ return;
2786
+ }
2787
+ if (!noExpand) {
2788
+ if (variants && key in variants) {
2789
+ resolveVariants(key, value, styleProps, styleState, key);
2790
+ return;
2791
+ }
2792
+ }
2793
+ if (!disableExpandShorthands) {
2794
+ if (key in shorthands) key = shorthands[key];
2795
+ }
2796
+ var originalValue = value;
2797
+ if (value === "safe" && isSafeAreaKey(key)) {
2798
+ var expanded1 = expandSafeAreaValue(key);
2799
+ if (expanded1) {
2800
+ for (var i = 0; i < expanded1.length; i++) {
2801
+ var [nkey1, nvalue] = expanded1[i];
2802
+ emitMappedValue(styleState, nkey1, nvalue, originalValue, void 0, parentCondition, fallbackOriginal);
2803
+ }
2804
+ return;
2805
+ }
2806
+ }
2807
+ if (value != null) {
2808
+ if (typeof value === "string") value = isRemValue(value) ? resolveRem(value) : value;
2809
+ else if (isVariable(value)) value = resolveVariableValue(key, value, resolveValues);
2810
+ else if (isRemValue(value)) value = resolveRem(value);
2811
+ }
2812
+ if (value != null) {
2813
+ if (key === "fontFamily" && typeof originalValue === "string") {
2814
+ if (originalValue in conf.fontsParsed) styleState.fontFamily = originalValue;
2815
+ }
2816
+ var expanded2 = noExpand || typeof value === "string" ? null : expandStyle(key, value, conf.settings.styleCompat || "web");
2817
+ if (expanded2) {
2818
+ var max = expanded2.length;
2819
+ for (var i1 = 0; i1 < max; i1++) {
2820
+ var [nkey2, nvalue1, noriginalValue] = expanded2[i1];
2821
+ emitMappedValue(styleState, nkey2, nvalue1, noriginalValue !== null && noriginalValue !== void 0 ? noriginalValue : originalValue, void 0, parentCondition, fallbackOriginal);
2822
+ }
2823
+ } else emitMappedValue(styleState, key, value, originalValue, void 0, parentCondition, fallbackOriginal);
2824
+ }
2825
+ };
2826
+ function resolveVariants(key, value, styleProps, styleState, parentVariantKey) {
2827
+ var _styleState_staticConfig_variants;
2828
+ var variantDefinition = (_styleState_staticConfig_variants = styleState.staticConfig.variants) === null || _styleState_staticConfig_variants === void 0 ? void 0 : _styleState_staticConfig_variants[key];
2829
+ if (isConditionTransport(value)) {
2830
+ if (value.hasBase) emitResolvedVariant(key, value.base, styleState, parentVariantKey, null);
2831
+ for (var offset = 0; offset < value.entries.length;) {
2832
+ var entryValue = value.entries[offset];
2833
+ var watermark = conditionCursorTop;
2834
+ try {
2835
+ emitResolvedVariant(key, entryValue, styleState, parentVariantKey, acquireTransportCursor(styleState, value.entries, offset, null));
2836
+ } finally {
2837
+ releaseConditionCursors(watermark);
2838
+ }
2839
+ offset += transportEntryWidth;
2840
+ }
2841
+ return;
2842
+ }
2843
+ if (typeof value === "string" && !(variantDefinition && (typeof variantDefinition === "undefined" ? "undefined" : _type_of(variantDefinition)) === "object" && value in variantDefinition)) {
2844
+ var directState = styleState;
2845
+ var watermark1 = conditionCursorTop;
2846
+ var previousCursor = directState.flatScanCursor;
2847
+ directState.flatScanCursor = null;
2848
+ try {
2849
+ scanFlatValue(value, variantValueHandler, [
2850
+ styleState,
2851
+ key,
2852
+ parentVariantKey
2853
+ ]);
2854
+ } finally {
2855
+ directState.flatScanCursor = previousCursor;
2856
+ releaseConditionCursors(watermark1);
2857
+ }
2858
+ return;
2859
+ }
2860
+ var isObjectValue = value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !isVariable(value);
2861
+ var objectHasDefault = isObjectValue && Object.prototype.hasOwnProperty.call(value, "default");
2862
+ var objectWatermark = conditionCursorTop;
2863
+ try {
2864
+ var firstCursor = isObjectValue && !objectHasDefault ? acquireConditionCursor() : null;
2865
+ if (isObjectValue && classifyConditionalObject(value, styleState, void 0, firstCursor || void 0)) {
2866
+ var useFirstCursor = firstCursor !== null;
2867
+ for (var objKey in value) {
2868
+ var _directState_flatPass;
2869
+ var payload = value[objKey];
2870
+ if (payload == null) continue;
2871
+ var directState1 = styleState;
2872
+ var payloadString = String(payload);
2873
+ if (objKey === "default") {
2874
+ feedCompoundSegment(directState1, payloadString, 0, payloadString.length, true, true, "");
2875
+ emitResolvedVariant(key, payload, styleState, parentVariantKey, null);
2876
+ continue;
2877
+ }
2878
+ var watermark2 = conditionCursorTop;
2879
+ var cursor1 = useFirstCursor ? firstCursor : acquireConditionCursor();
2880
+ var condition = conditionNumbers[cursor1 + conditionValueOffset];
2881
+ if (useFirstCursor) useFirstCursor = false;
2882
+ else {
2883
+ resolveConditionText(styleState, cursor1, objKey);
2884
+ condition = commitConditionCursor(styleState, cursor1);
2885
+ }
2886
+ if ((_directState_flatPass = directState1.flatPass) === null || _directState_flatPass === void 0 ? void 0 : _directState_flatPass[passCompoundIndexes]) feedCompoundSegment(directState1, payloadString, 0, payloadString.length, false, Boolean(condition), condition ? conditionTexts[cursor1 + conditionKeyOffset] || "" : "");
2887
+ emitResolvedVariant(key, payload, styleState, parentVariantKey, cursor1);
2888
+ if (cursor1 !== firstCursor) releaseConditionCursors(watermark2);
2889
+ }
2890
+ return;
2891
+ }
2892
+ } finally {
2893
+ releaseConditionCursors(objectWatermark);
2894
+ }
2895
+ emitResolvedVariant(key, value, styleState, parentVariantKey, null);
2896
+ }
2897
+ function emitResolvedVariant(key, value, styleState, parentVariantKey, conditionCursor) {
2898
+ var { staticConfig, conf, debug } = styleState;
2899
+ var styleProps = styleState.styleProps;
2900
+ var { variants } = staticConfig;
2901
+ if (!variants) return;
2902
+ var variant = variants[key];
2903
+ var variantValue = getVariantDefinition(variant, value, conf, styleState);
2904
+ if (process.env.NODE_ENV === "development" && debug === "verbose") {
2905
+ console.groupCollapsed(`\u2666\uFE0F\u2666\uFE0F\u2666\uFE0F resolve variant ${key}`);
2906
+ console.info({
2907
+ key,
2908
+ value,
2909
+ variantValue,
2910
+ variants
2911
+ });
2912
+ console.groupEnd();
2913
+ }
2914
+ if (!variantValue) {
2915
+ if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1") {
2916
+ if (typeof value !== "boolean") {
2917
+ var name = styleState.styleProps.displayName || "[UnnamedComponent]";
2918
+ console.warn(`No variant found: ${name} has variant "${key}", but no matching value "${value}"`);
2919
+ }
2920
+ }
2921
+ return;
2922
+ }
2923
+ if (typeof variantValue === "function") {
2924
+ variantValue = variantValue(value, getVariantExtras(styleState));
2925
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && false);
2926
+ }
2927
+ if (!isObj(variantValue)) return;
2928
+ if (process.env.NODE_ENV === "development" && debug === "verbose") console.info(` expanding styles from `, variantValue);
2929
+ var { noSkip } = styleProps;
2930
+ var originals = styleOriginalValues.get(variantValue);
2931
+ var directState = styleState;
2932
+ directState.flatCompoundOutputDepth = (directState.flatCompoundOutputDepth || 0) + 1;
2933
+ try {
2934
+ for (var outputKey in variantValue) {
2935
+ if (!noSkip && outputKey in skipProps) continue;
2936
+ var rawOutputValue = variantValue[outputKey];
2937
+ var outputValue = styleProps.noNormalize ? rawOutputValue : normalizeValueWithProperty(rawOutputValue, conf.shorthands[outputKey] || outputKey);
2938
+ var _originals_outputKey;
2939
+ var originalValue = (_originals_outputKey = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _originals_outputKey !== void 0 ? _originals_outputKey : rawOutputValue;
2940
+ var contextPropSet = getContextPropSet(staticConfig);
2941
+ if (contextPropSet === null || contextPropSet === void 0 ? void 0 : contextPropSet.has(outputKey)) {
2942
+ var _styleState, _styleState1;
2943
+ (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});
2944
+ styleState.overriddenContextProps[outputKey] = originalValue;
2945
+ (_styleState1 = styleState).originalContextPropValues || (_styleState1.originalContextPropValues = {});
2946
+ styleState.originalContextPropValues[outputKey] = originalValue;
2947
+ }
2948
+ contributeMappedValue(outputKey, outputValue, styleState, parentVariantKey === key && outputKey === key, conditionCursor || void 0, originalValue);
2949
+ }
2950
+ } finally {
2951
+ directState.flatCompoundOutputDepth--;
2952
+ }
2953
+ }
2954
+ function getFontFamilyFromNameOrVariable(input, conf) {
2955
+ if (isVariable(input)) {
2956
+ var val = variableToFontNameCache.get(input);
2957
+ if (val) return val;
2958
+ for (var key in conf.fontsParsed) {
2959
+ var familyVariable = conf.fontsParsed[key].family;
2960
+ if (isVariable(familyVariable)) {
2961
+ variableToFontNameCache.set(familyVariable, key);
2962
+ if (familyVariable === input) return key;
2963
+ }
2964
+ }
2965
+ } else if (typeof input === "string" && input in conf.fontsParsed) return input;
2966
+ }
2967
+ var variableToFontNameCache = /* @__PURE__ */ new WeakMap();
2968
+ function getVariantDefinition(variant, value, conf, param) {
2969
+ var { theme } = param;
2970
+ if (!variant) return;
2971
+ if (value === void 0) return;
2972
+ if (typeof variant === "function") return variant;
2973
+ if (Object.prototype.hasOwnProperty.call(variant, value)) return variant[value];
2974
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
2975
+ try {
2976
+ for (var _iterator2 = getCompiledVariantResolvers(variant)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
2977
+ var { key, parts } = _step2.value;
2978
+ var _iteratorNormalCompletion12 = true, _didIteratorError12 = false, _iteratorError12 = void 0;
2979
+ try {
2980
+ for (var _iterator12 = parts[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
2981
+ var part3 = _step12.value;
2982
+ if (matchesVariantResolver(part3, value, conf, theme)) return variant[key];
2983
+ }
2984
+ } catch (err) {
2985
+ _didIteratorError12 = true;
2986
+ _iteratorError12 = err;
2987
+ } finally {
2988
+ try {
2989
+ if (!_iteratorNormalCompletion12 && _iterator12.return != null) _iterator12.return();
2990
+ } finally {
2991
+ if (_didIteratorError12) throw _iteratorError12;
2992
+ }
2993
+ }
2994
+ }
2995
+ } catch (err) {
2996
+ _didIteratorError2 = true;
2997
+ _iteratorError2 = err;
2998
+ } finally {
2999
+ try {
3000
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
3001
+ } finally {
3002
+ if (_didIteratorError2) throw _iteratorError2;
3003
+ }
3004
+ }
3005
+ }
3006
+ var variantResolverNameSet = new Set(variantResolverNames);
3007
+ var variantResolverCache = /* @__PURE__ */ new WeakMap();
3008
+ var preparedStyleStaticConfigs = /* @__PURE__ */ new WeakSet();
3009
+ function prepareStyleStaticConfig(staticConfig) {
3010
+ if (preparedStyleStaticConfigs.has(staticConfig)) return staticConfig;
3011
+ preparedStyleStaticConfigs.add(staticConfig);
3012
+ getContextPropSet(staticConfig);
3013
+ prepareStaticConfigCompounds(staticConfig);
3014
+ var variants = staticConfig.variants;
3015
+ if (variants) for (var key in variants) {
3016
+ var variant = variants[key];
3017
+ if (variant && (typeof variant === "undefined" ? "undefined" : _type_of(variant)) === "object") getCompiledVariantResolvers(variant);
3018
+ }
3019
+ return staticConfig;
3020
+ }
3021
+ function getCompiledVariantResolvers(variant) {
3022
+ var cached = variantResolverCache.get(variant);
3023
+ if (cached) return cached;
3024
+ var compiled = [];
3025
+ for (var key in variant) {
3026
+ var parts = parseVariantResolverKey(key);
3027
+ if (parts) compiled.push({
3028
+ key,
3029
+ parts
3030
+ });
3031
+ }
3032
+ variantResolverCache.set(variant, compiled);
3033
+ return compiled;
3034
+ }
3035
+ function parseVariantResolverKey(key) {
3036
+ if (!key) return null;
3037
+ var parts = [];
3038
+ var start = 0;
3039
+ for (var index = 0; index <= key.length; index++) {
3040
+ if (index !== key.length && key.charCodeAt(index) !== 124) continue;
3041
+ var partStart = start;
3042
+ var partEnd = index;
3043
+ while (partStart < partEnd && key.charCodeAt(partStart) <= 32) partStart++;
3044
+ while (partEnd > partStart && key.charCodeAt(partEnd - 1) <= 32) partEnd--;
3045
+ if (partStart === partEnd) return null;
3046
+ var part3 = key.slice(partStart, partEnd);
3047
+ if (!variantResolverNameSet.has(part3)) return null;
3048
+ parts.push(part3);
3049
+ start = index + 1;
3050
+ }
3051
+ return parts;
3052
+ }
3053
+ function hasNumericPrefix(value, suffixLength) {
3054
+ if (value.length <= suffixLength) return false;
3055
+ return Number.isFinite(Number(value.slice(0, value.length - suffixLength)));
3056
+ }
3057
+ function matchesVariantResolver(resolverName, value, conf, theme) {
3058
+ var string = typeof value === "string";
3059
+ var number = typeof value === "number";
3060
+ var rem = string && value.endsWith("rem") && hasNumericPrefix(value, 3);
3061
+ switch (resolverName) {
3062
+ case "Size":
3063
+ case "Space":
3064
+ case "Radius":
3065
+ case "ZIndex": return value === true || number || string || resolverName !== "Size" && isVariable(value);
3066
+ case "Color": return value != null && value in conf.tokensParsed.color || string;
3067
+ case "Theme": return string && !!theme && value in theme;
3068
+ case "FontSize":
3069
+ var _conf_fontsParsed_body_size, _conf_fontsParsed_body;
3070
+ return value === true || !!((_conf_fontsParsed_body = conf.fontsParsed.body) === null || _conf_fontsParsed_body === void 0 ? void 0 : (_conf_fontsParsed_body_size = _conf_fontsParsed_body.size) === null || _conf_fontsParsed_body_size === void 0 ? void 0 : _conf_fontsParsed_body_size[value]) || number || rem;
3071
+ case "FontStyle":
3072
+ var _conf_fontsParsed_body_style, _conf_fontsParsed_body1;
3073
+ return !!((_conf_fontsParsed_body1 = conf.fontsParsed.body) === null || _conf_fontsParsed_body1 === void 0 ? void 0 : (_conf_fontsParsed_body_style = _conf_fontsParsed_body1.style) === null || _conf_fontsParsed_body_style === void 0 ? void 0 : _conf_fontsParsed_body_style[value]) || value === "normal" || value === "italic";
3074
+ case "FontTransform":
3075
+ var _conf_fontsParsed_body_transform, _conf_fontsParsed_body2;
3076
+ return !!((_conf_fontsParsed_body2 = conf.fontsParsed.body) === null || _conf_fontsParsed_body2 === void 0 ? void 0 : (_conf_fontsParsed_body_transform = _conf_fontsParsed_body2.transform) === null || _conf_fontsParsed_body_transform === void 0 ? void 0 : _conf_fontsParsed_body_transform[value]) || value === "none" || value === "capitalize" || value === "uppercase" || value === "lowercase";
3077
+ case "FontLineHeight":
3078
+ var _conf_fontsParsed_body_lineHeight, _conf_fontsParsed_body3;
3079
+ return !!((_conf_fontsParsed_body3 = conf.fontsParsed.body) === null || _conf_fontsParsed_body3 === void 0 ? void 0 : (_conf_fontsParsed_body_lineHeight = _conf_fontsParsed_body3.lineHeight) === null || _conf_fontsParsed_body_lineHeight === void 0 ? void 0 : _conf_fontsParsed_body_lineHeight[value]) || number || rem;
3080
+ case "FontLetterSpacing":
3081
+ var _conf_fontsParsed_body_letterSpacing, _conf_fontsParsed_body4;
3082
+ return !!((_conf_fontsParsed_body4 = conf.fontsParsed.body) === null || _conf_fontsParsed_body4 === void 0 ? void 0 : (_conf_fontsParsed_body_letterSpacing = _conf_fontsParsed_body4.letterSpacing) === null || _conf_fontsParsed_body_letterSpacing === void 0 ? void 0 : _conf_fontsParsed_body_letterSpacing[value]) || number || rem;
3083
+ case "number":
3084
+ case "string":
3085
+ case "boolean": return (typeof value === "undefined" ? "undefined" : _type_of(value)) === resolverName;
3086
+ case "any": return true;
951
3087
  }
952
- if (isWeb && Array.isArray(out.transform)) out.transform = transformsToString(out.transform);
953
- fixStyles(out);
954
- return out;
955
3088
  }
956
3089
 
957
- export { STYLE_TOKEN_PROVENANCE_KEY, getSplitStyles, getStyleTokenProvenance, getSubStyle, isValidStyleKey, styleOriginalValues, useSplitStyles };
3090
+ export { STYLE_TOKEN_PROVENANCE_KEY, clearDirectStyle, contributeStyleString, directStyleSignature, flushDirectStyles2 as flushDirectStyles, getContextPropSet, getDirectDynamicThemeAccess, getFontFamilyFromNameOrVariable, getSplitStyles, getStyleTokenProvenance, isValidStyleKey, prepareStyleStaticConfig, styleOriginalValues };
958
3091
  //# sourceMappingURL=getSplitStyles.native.js.map