@tamagui/web 3.0.0-beta.661.1 → 3.0.0-beta.719.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (825) hide show
  1. package/dist/cjs/Tamagui.cjs +0 -1
  2. package/dist/cjs/Tamagui.native.cjs +0 -1
  3. package/dist/cjs/Tamagui.native.js +0 -1
  4. package/dist/cjs/Tamagui.native.js.map +1 -1
  5. package/dist/cjs/_withNativeStyle.cjs +0 -1
  6. package/dist/cjs/_withNativeStyle.native.cjs +0 -1
  7. package/dist/cjs/_withNativeStyle.native.js +0 -1
  8. package/dist/cjs/_withNativeStyle.native.js.map +1 -1
  9. package/dist/cjs/_withStableStyle.cjs +0 -1
  10. package/dist/cjs/_withStableStyle.native.cjs +0 -1
  11. package/dist/cjs/_withStableStyle.native.js +0 -1
  12. package/dist/cjs/_withStableStyle.native.js.map +1 -1
  13. package/dist/cjs/config.cjs +7 -1
  14. package/dist/cjs/config.native.cjs +7 -1
  15. package/dist/cjs/config.native.js +7 -1
  16. package/dist/cjs/config.native.js.map +1 -1
  17. package/dist/cjs/constants/accessibilityDirectMap.cjs +0 -1
  18. package/dist/cjs/constants/accessibilityDirectMap.native.cjs +0 -1
  19. package/dist/cjs/constants/accessibilityDirectMap.native.js +0 -1
  20. package/dist/cjs/constants/accessibilityDirectMap.native.js.map +1 -1
  21. package/dist/cjs/constants/constants.cjs +0 -1
  22. package/dist/cjs/constants/constants.native.cjs +0 -1
  23. package/dist/cjs/constants/constants.native.js +0 -1
  24. package/dist/cjs/constants/constants.native.js.map +1 -1
  25. package/dist/cjs/constants/isDevTools.cjs +0 -1
  26. package/dist/cjs/constants/isDevTools.native.cjs +0 -1
  27. package/dist/cjs/constants/isDevTools.native.js +0 -1
  28. package/dist/cjs/constants/isDevTools.native.js.map +1 -1
  29. package/dist/cjs/contexts/ComponentContext.cjs +0 -1
  30. package/dist/cjs/contexts/ComponentContext.native.cjs +0 -1
  31. package/dist/cjs/contexts/ComponentContext.native.js +0 -1
  32. package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
  33. package/dist/cjs/contexts/GroupContext.cjs +0 -1
  34. package/dist/cjs/contexts/GroupContext.native.cjs +0 -1
  35. package/dist/cjs/contexts/GroupContext.native.js +0 -1
  36. package/dist/cjs/contexts/GroupContext.native.js.map +1 -1
  37. package/dist/cjs/createComponent.cjs +0 -1
  38. package/dist/cjs/createComponent.native.cjs +0 -1
  39. package/dist/cjs/createComponent.native.js +0 -1
  40. package/dist/cjs/createComponent.native.js.map +1 -1
  41. package/dist/cjs/createFont.cjs +0 -1
  42. package/dist/cjs/createFont.native.cjs +0 -1
  43. package/dist/cjs/createFont.native.js +0 -1
  44. package/dist/cjs/createFont.native.js.map +1 -1
  45. package/dist/cjs/createShorthands.cjs +0 -1
  46. package/dist/cjs/createShorthands.native.cjs +0 -1
  47. package/dist/cjs/createShorthands.native.js +0 -1
  48. package/dist/cjs/createShorthands.native.js.map +1 -1
  49. package/dist/cjs/createStyledHOC.cjs +0 -1
  50. package/dist/cjs/createStyledHOC.native.cjs +0 -1
  51. package/dist/cjs/createStyledHOC.native.js +0 -1
  52. package/dist/cjs/createStyledHOC.native.js.map +1 -1
  53. package/dist/cjs/createTamagui.cjs +2 -3
  54. package/dist/cjs/createTamagui.native.cjs +2 -3
  55. package/dist/cjs/createTamagui.native.js +2 -3
  56. package/dist/cjs/createTamagui.native.js.map +1 -1
  57. package/dist/cjs/createTokens.cjs +0 -1
  58. package/dist/cjs/createTokens.native.cjs +0 -1
  59. package/dist/cjs/createTokens.native.js +0 -1
  60. package/dist/cjs/createTokens.native.js.map +1 -1
  61. package/dist/cjs/createVariable.cjs +0 -1
  62. package/dist/cjs/createVariable.native.cjs +0 -1
  63. package/dist/cjs/createVariable.native.js +0 -1
  64. package/dist/cjs/createVariable.native.js.map +1 -1
  65. package/dist/cjs/createVariables.cjs +0 -1
  66. package/dist/cjs/createVariables.native.cjs +0 -1
  67. package/dist/cjs/createVariables.native.js +0 -1
  68. package/dist/cjs/createVariables.native.js.map +1 -1
  69. package/dist/cjs/defaultComponentState.cjs +0 -1
  70. package/dist/cjs/defaultComponentState.native.cjs +0 -1
  71. package/dist/cjs/defaultComponentState.native.js +0 -1
  72. package/dist/cjs/defaultComponentState.native.js.map +1 -1
  73. package/dist/cjs/dom/adapters.cjs +0 -1
  74. package/dist/cjs/dom/adapters.native.cjs +0 -1
  75. package/dist/cjs/dom/adapters.native.js +0 -1
  76. package/dist/cjs/dom/adapters.native.js.map +1 -1
  77. package/dist/cjs/dom/contract.cjs +0 -1
  78. package/dist/cjs/dom/contract.native.cjs +0 -1
  79. package/dist/cjs/dom/contract.native.js +0 -1
  80. package/dist/cjs/dom/contract.native.js.map +1 -1
  81. package/dist/cjs/dom/domEventProps.native.cjs +0 -1
  82. package/dist/cjs/dom/domEventProps.native.js +0 -1
  83. package/dist/cjs/dom/domEventProps.native.js.map +1 -1
  84. package/dist/cjs/dom/html.cjs +0 -1
  85. package/dist/cjs/dom/html.native.cjs +0 -1
  86. package/dist/cjs/dom/html.native.js +0 -1
  87. package/dist/cjs/dom/html.native.js.map +1 -1
  88. package/dist/cjs/dom/htmlRuntime.native.cjs +0 -1
  89. package/dist/cjs/dom/htmlRuntime.native.js +0 -1
  90. package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
  91. package/dist/cjs/dom/index.cjs +0 -1
  92. package/dist/cjs/dom/index.native.cjs +0 -1
  93. package/dist/cjs/dom/index.native.js +0 -1
  94. package/dist/cjs/dom/index.native.js.map +1 -1
  95. package/dist/cjs/dom/primitives.native.cjs +2 -3
  96. package/dist/cjs/dom/primitives.native.js +2 -3
  97. package/dist/cjs/dom/primitives.native.js.map +1 -1
  98. package/dist/cjs/dom/standalone.cjs +0 -1
  99. package/dist/cjs/dom/standalone.native.cjs +0 -1
  100. package/dist/cjs/dom/standalone.native.js +0 -1
  101. package/dist/cjs/dom/standalone.native.js.map +1 -1
  102. package/dist/cjs/dom/standaloneHtml.cjs +0 -1
  103. package/dist/cjs/dom/standaloneHtml.native.cjs +0 -1
  104. package/dist/cjs/dom/standaloneHtml.native.js +0 -1
  105. package/dist/cjs/dom/standaloneHtml.native.js.map +1 -1
  106. package/dist/cjs/dom/styleTypes.cjs +0 -1
  107. package/dist/cjs/dom/styleTypes.native.cjs +0 -1
  108. package/dist/cjs/dom/styleTypes.native.js +0 -1
  109. package/dist/cjs/dom/styleTypes.native.js.map +1 -1
  110. package/dist/cjs/eventDetails.cjs +0 -1
  111. package/dist/cjs/eventDetails.native.cjs +0 -1
  112. package/dist/cjs/eventDetails.native.js +0 -1
  113. package/dist/cjs/eventDetails.native.js.map +1 -1
  114. package/dist/cjs/eventHandling.cjs +0 -1
  115. package/dist/cjs/eventHandling.native.cjs +0 -1
  116. package/dist/cjs/eventHandling.native.js +0 -1
  117. package/dist/cjs/eventHandling.native.js.map +1 -1
  118. package/dist/cjs/helpers/componentDisplayName.cjs +0 -1
  119. package/dist/cjs/helpers/componentDisplayName.native.cjs +0 -1
  120. package/dist/cjs/helpers/componentDisplayName.native.js +0 -1
  121. package/dist/cjs/helpers/componentDisplayName.native.js.map +1 -1
  122. package/dist/cjs/helpers/configVariables.cjs +79 -0
  123. package/dist/cjs/helpers/configVariables.native.cjs +86 -0
  124. package/dist/cjs/helpers/configVariables.native.js +88 -0
  125. package/dist/cjs/helpers/configVariables.native.js.map +1 -0
  126. package/dist/cjs/helpers/consoleLog.native.cjs +0 -1
  127. package/dist/cjs/helpers/consoleLog.native.js +0 -1
  128. package/dist/cjs/helpers/consoleLog.native.js.map +1 -1
  129. package/dist/cjs/helpers/createDesignSystem.cjs +0 -1
  130. package/dist/cjs/helpers/createDesignSystem.native.cjs +0 -1
  131. package/dist/cjs/helpers/createDesignSystem.native.js +0 -1
  132. package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
  133. package/dist/cjs/helpers/createStyledContext.cjs +0 -1
  134. package/dist/cjs/helpers/createStyledContext.native.cjs +0 -1
  135. package/dist/cjs/helpers/createStyledContext.native.js +0 -1
  136. package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
  137. package/dist/cjs/helpers/defaultAnimationDriver.cjs +1 -6
  138. package/dist/cjs/helpers/defaultAnimationDriver.native.cjs +0 -13
  139. package/dist/cjs/helpers/defaultAnimationDriver.native.js +0 -13
  140. package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -1
  141. package/dist/cjs/helpers/defaultOffset.cjs +0 -1
  142. package/dist/cjs/helpers/defaultOffset.native.cjs +0 -1
  143. package/dist/cjs/helpers/defaultOffset.native.js +0 -1
  144. package/dist/cjs/helpers/defaultOffset.native.js.map +1 -1
  145. package/dist/cjs/helpers/directStyle.cjs +257 -283
  146. package/dist/cjs/helpers/directStyle.native.cjs +273 -305
  147. package/dist/cjs/helpers/directStyle.native.js +273 -305
  148. package/dist/cjs/helpers/directStyle.native.js.map +1 -1
  149. package/dist/cjs/helpers/expandStyle.cjs +0 -1
  150. package/dist/cjs/helpers/expandStyle.native.cjs +0 -1
  151. package/dist/cjs/helpers/expandStyle.native.js +0 -1
  152. package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
  153. package/dist/cjs/helpers/expandStyles.cjs +0 -1
  154. package/dist/cjs/helpers/expandStyles.native.cjs +0 -1
  155. package/dist/cjs/helpers/expandStyles.native.js +0 -1
  156. package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
  157. package/dist/cjs/helpers/extractPseudoState.cjs +0 -1
  158. package/dist/cjs/helpers/extractPseudoState.native.cjs +0 -1
  159. package/dist/cjs/helpers/extractPseudoState.native.js +0 -1
  160. package/dist/cjs/helpers/extractPseudoState.native.js.map +1 -1
  161. package/dist/cjs/helpers/formatDiagnostic.cjs +3 -1
  162. package/dist/cjs/helpers/formatDiagnostic.native.cjs +3 -1
  163. package/dist/cjs/helpers/formatDiagnostic.native.js +3 -1
  164. package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
  165. package/dist/cjs/helpers/frontendProgram.cjs +0 -1
  166. package/dist/cjs/helpers/frontendProgram.native.cjs +0 -1
  167. package/dist/cjs/helpers/frontendProgram.native.js +0 -1
  168. package/dist/cjs/helpers/frontendProgram.native.js.map +1 -1
  169. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +5 -2
  170. package/dist/cjs/helpers/getCSSStylesAtomic.native.cjs +0 -1
  171. package/dist/cjs/helpers/getCSSStylesAtomic.native.js +0 -1
  172. package/dist/cjs/helpers/getCSSStylesAtomic.native.js.map +1 -1
  173. package/dist/cjs/helpers/getDefaultProps.cjs +0 -1
  174. package/dist/cjs/helpers/getDefaultProps.native.cjs +0 -1
  175. package/dist/cjs/helpers/getDefaultProps.native.js +0 -1
  176. package/dist/cjs/helpers/getDefaultProps.native.js.map +1 -1
  177. package/dist/cjs/helpers/getDynamicVal.cjs +0 -1
  178. package/dist/cjs/helpers/getDynamicVal.native.cjs +0 -1
  179. package/dist/cjs/helpers/getDynamicVal.native.js +0 -1
  180. package/dist/cjs/helpers/getDynamicVal.native.js.map +1 -1
  181. package/dist/cjs/helpers/getExpandedShorthands.cjs +0 -1
  182. package/dist/cjs/helpers/getExpandedShorthands.native.cjs +0 -1
  183. package/dist/cjs/helpers/getExpandedShorthands.native.js +0 -1
  184. package/dist/cjs/helpers/getExpandedShorthands.native.js.map +1 -1
  185. package/dist/cjs/helpers/getFontLanguage.cjs +0 -1
  186. package/dist/cjs/helpers/getFontLanguage.native.cjs +0 -1
  187. package/dist/cjs/helpers/getFontLanguage.native.js +0 -1
  188. package/dist/cjs/helpers/getFontLanguage.native.js.map +1 -1
  189. package/dist/cjs/helpers/getShorthandValue.cjs +0 -1
  190. package/dist/cjs/helpers/getShorthandValue.native.cjs +0 -1
  191. package/dist/cjs/helpers/getShorthandValue.native.js +0 -1
  192. package/dist/cjs/helpers/getShorthandValue.native.js.map +1 -1
  193. package/dist/cjs/helpers/getSplitStyles.cjs +0 -8
  194. package/dist/cjs/helpers/getSplitStyles.native.cjs +0 -8
  195. package/dist/cjs/helpers/getSplitStyles.native.js +0 -8
  196. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  197. package/dist/cjs/helpers/getThemeCSSRules.cjs +0 -1
  198. package/dist/cjs/helpers/getThemeCSSRules.native.cjs +0 -1
  199. package/dist/cjs/helpers/getThemeCSSRules.native.js +0 -1
  200. package/dist/cjs/helpers/getThemeCSSRules.native.js.map +1 -1
  201. package/dist/cjs/helpers/getVariantExtras.cjs +0 -1
  202. package/dist/cjs/helpers/getVariantExtras.native.cjs +0 -1
  203. package/dist/cjs/helpers/getVariantExtras.native.js +0 -1
  204. package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
  205. package/dist/cjs/helpers/grammarConfig.cjs +63 -14
  206. package/dist/cjs/helpers/grammarConfig.native.cjs +84 -18
  207. package/dist/cjs/helpers/grammarConfig.native.js +84 -18
  208. package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
  209. package/dist/cjs/helpers/insertStyleRule.cjs +0 -1
  210. package/dist/cjs/helpers/insertStyleRule.native.cjs +0 -1
  211. package/dist/cjs/helpers/insertStyleRule.native.js +0 -1
  212. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  213. package/dist/cjs/helpers/isObj.cjs +0 -1
  214. package/dist/cjs/helpers/isObj.native.cjs +0 -1
  215. package/dist/cjs/helpers/isObj.native.js +0 -1
  216. package/dist/cjs/helpers/isObj.native.js.map +1 -1
  217. package/dist/cjs/helpers/isTamaguiComponent.cjs +0 -1
  218. package/dist/cjs/helpers/isTamaguiComponent.native.cjs +0 -1
  219. package/dist/cjs/helpers/isTamaguiComponent.native.js +0 -1
  220. package/dist/cjs/helpers/isTamaguiComponent.native.js.map +1 -1
  221. package/dist/cjs/helpers/isTamaguiElement.cjs +0 -1
  222. package/dist/cjs/helpers/isTamaguiElement.native.cjs +0 -1
  223. package/dist/cjs/helpers/isTamaguiElement.native.js +0 -1
  224. package/dist/cjs/helpers/isTamaguiElement.native.js.map +1 -1
  225. package/dist/cjs/helpers/log.cjs +0 -1
  226. package/dist/cjs/helpers/log.native.cjs +0 -1
  227. package/dist/cjs/helpers/log.native.js +0 -1
  228. package/dist/cjs/helpers/log.native.js.map +1 -1
  229. package/dist/cjs/helpers/mainThreadPressEvents.cjs +0 -1
  230. package/dist/cjs/helpers/mainThreadPressEvents.native.cjs +0 -1
  231. package/dist/cjs/helpers/mainThreadPressEvents.native.js +0 -1
  232. package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
  233. package/dist/cjs/helpers/matchMedia.cjs +0 -1
  234. package/dist/cjs/helpers/matchMedia.native.cjs +0 -1
  235. package/dist/cjs/helpers/matchMedia.native.js +0 -1
  236. package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
  237. package/dist/cjs/helpers/mediaObjectToString.cjs +0 -1
  238. package/dist/cjs/helpers/mediaObjectToString.native.cjs +0 -1
  239. package/dist/cjs/helpers/mediaObjectToString.native.js +0 -1
  240. package/dist/cjs/helpers/mediaObjectToString.native.js.map +1 -1
  241. package/dist/cjs/helpers/mediaState.cjs +0 -1
  242. package/dist/cjs/helpers/mediaState.native.cjs +0 -1
  243. package/dist/cjs/helpers/mediaState.native.js +0 -1
  244. package/dist/cjs/helpers/mediaState.native.js.map +1 -1
  245. package/dist/cjs/helpers/mergeProps.cjs +0 -1
  246. package/dist/cjs/helpers/mergeProps.native.cjs +0 -1
  247. package/dist/cjs/helpers/mergeProps.native.js +0 -1
  248. package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
  249. package/dist/cjs/helpers/mergeRenderElementProps.cjs +0 -1
  250. package/dist/cjs/helpers/mergeRenderElementProps.native.cjs +0 -1
  251. package/dist/cjs/helpers/mergeRenderElementProps.native.js +0 -1
  252. package/dist/cjs/helpers/mergeRenderElementProps.native.js.map +1 -1
  253. package/dist/cjs/helpers/mergeSlotStyleProps.cjs +0 -1
  254. package/dist/cjs/helpers/mergeSlotStyleProps.native.cjs +0 -1
  255. package/dist/cjs/helpers/mergeSlotStyleProps.native.js +0 -1
  256. package/dist/cjs/helpers/mergeSlotStyleProps.native.js.map +1 -1
  257. package/dist/cjs/helpers/mergeVariants.cjs +0 -1
  258. package/dist/cjs/helpers/mergeVariants.native.cjs +0 -1
  259. package/dist/cjs/helpers/mergeVariants.native.js +0 -1
  260. package/dist/cjs/helpers/mergeVariants.native.js.map +1 -1
  261. package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
  262. package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
  263. package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
  264. package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
  265. package/dist/cjs/helpers/nativeStyleEngine.cjs +0 -1
  266. package/dist/cjs/helpers/nativeStyleEngine.native.cjs +0 -1
  267. package/dist/cjs/helpers/nativeStyleEngine.native.js +0 -1
  268. package/dist/cjs/helpers/nativeStyleEngine.native.js.map +1 -1
  269. package/dist/cjs/helpers/nativeTransitionTarget.cjs +0 -1
  270. package/dist/cjs/helpers/nativeTransitionTarget.native.cjs +0 -1
  271. package/dist/cjs/helpers/nativeTransitionTarget.native.js +0 -1
  272. package/dist/cjs/helpers/nativeTransitionTarget.native.js.map +1 -1
  273. package/dist/cjs/helpers/normalizeColor.cjs +0 -1
  274. package/dist/cjs/helpers/normalizeColor.native.cjs +0 -1
  275. package/dist/cjs/helpers/normalizeColor.native.js +0 -1
  276. package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
  277. package/dist/cjs/helpers/normalizeShadow.cjs +0 -1
  278. package/dist/cjs/helpers/normalizeShadow.native.cjs +0 -1
  279. package/dist/cjs/helpers/normalizeShadow.native.js +0 -1
  280. package/dist/cjs/helpers/normalizeShadow.native.js.map +1 -1
  281. package/dist/cjs/helpers/normalizeStyle.cjs +0 -1
  282. package/dist/cjs/helpers/normalizeStyle.native.cjs +0 -1
  283. package/dist/cjs/helpers/normalizeStyle.native.js +0 -1
  284. package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
  285. package/dist/cjs/helpers/normalizeStylePropKeys.cjs +0 -1
  286. package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs +0 -1
  287. package/dist/cjs/helpers/normalizeStylePropKeys.native.js +0 -1
  288. package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +1 -1
  289. package/dist/cjs/helpers/normalizeValueWithProperty.cjs +0 -1
  290. package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +0 -1
  291. package/dist/cjs/helpers/normalizeValueWithProperty.native.js +0 -1
  292. package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
  293. package/dist/cjs/helpers/noteOnce.cjs +0 -1
  294. package/dist/cjs/helpers/noteOnce.native.cjs +0 -1
  295. package/dist/cjs/helpers/noteOnce.native.js +0 -1
  296. package/dist/cjs/helpers/noteOnce.native.js.map +1 -1
  297. package/dist/cjs/helpers/objectIdentityKey.cjs +0 -1
  298. package/dist/cjs/helpers/objectIdentityKey.native.cjs +0 -1
  299. package/dist/cjs/helpers/objectIdentityKey.native.js +0 -1
  300. package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
  301. package/dist/cjs/helpers/parseBorderShorthand.cjs +0 -1
  302. package/dist/cjs/helpers/parseBorderShorthand.native.cjs +0 -1
  303. package/dist/cjs/helpers/parseBorderShorthand.native.js +0 -1
  304. package/dist/cjs/helpers/parseBorderShorthand.native.js.map +1 -1
  305. package/dist/cjs/helpers/parseNativeStyle.native.cjs +0 -1
  306. package/dist/cjs/helpers/parseNativeStyle.native.js +0 -1
  307. package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -1
  308. package/dist/cjs/helpers/parseNativeTransform.native.cjs +0 -1
  309. package/dist/cjs/helpers/parseNativeTransform.native.js +0 -1
  310. package/dist/cjs/helpers/parseNativeTransform.native.js.map +1 -1
  311. package/dist/cjs/helpers/parseOutlineShorthand.cjs +0 -1
  312. package/dist/cjs/helpers/parseOutlineShorthand.native.cjs +0 -1
  313. package/dist/cjs/helpers/parseOutlineShorthand.native.js +0 -1
  314. package/dist/cjs/helpers/parseOutlineShorthand.native.js.map +1 -1
  315. package/dist/cjs/helpers/pointerEvents.cjs +0 -1
  316. package/dist/cjs/helpers/pointerEvents.native.cjs +0 -1
  317. package/dist/cjs/helpers/pointerEvents.native.js +0 -1
  318. package/dist/cjs/helpers/pointerEvents.native.js.map +1 -1
  319. package/dist/cjs/helpers/propMapper.cjs +28 -37
  320. package/dist/cjs/helpers/propMapper.native.cjs +28 -37
  321. package/dist/cjs/helpers/propMapper.native.js +28 -37
  322. package/dist/cjs/helpers/propMapper.native.js.map +1 -1
  323. package/dist/cjs/helpers/proxyThemeToParents.cjs +0 -1
  324. package/dist/cjs/helpers/proxyThemeToParents.native.cjs +0 -1
  325. package/dist/cjs/helpers/proxyThemeToParents.native.js +0 -1
  326. package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
  327. package/dist/cjs/helpers/registerCSSVariable.cjs +0 -1
  328. package/dist/cjs/helpers/registerCSSVariable.native.cjs +0 -1
  329. package/dist/cjs/helpers/registerCSSVariable.native.js +0 -1
  330. package/dist/cjs/helpers/registerCSSVariable.native.js.map +1 -1
  331. package/dist/cjs/helpers/resolveAnimationDriver.cjs +0 -1
  332. package/dist/cjs/helpers/resolveAnimationDriver.native.cjs +0 -1
  333. package/dist/cjs/helpers/resolveAnimationDriver.native.js +0 -1
  334. package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
  335. package/dist/cjs/helpers/resolveRem.cjs +0 -1
  336. package/dist/cjs/helpers/resolveRem.native.cjs +0 -1
  337. package/dist/cjs/helpers/resolveRem.native.js +0 -1
  338. package/dist/cjs/helpers/resolveRem.native.js.map +1 -1
  339. package/dist/cjs/helpers/resolveSafeArea.cjs +0 -1
  340. package/dist/cjs/helpers/resolveSafeArea.native.cjs +0 -1
  341. package/dist/cjs/helpers/resolveSafeArea.native.js +0 -1
  342. package/dist/cjs/helpers/resolveSafeArea.native.js.map +1 -1
  343. package/dist/cjs/helpers/resolveSafeAreaVariable.cjs +0 -1
  344. package/dist/cjs/helpers/resolveSafeAreaVariable.native.cjs +0 -1
  345. package/dist/cjs/helpers/resolveSafeAreaVariable.native.js +0 -1
  346. package/dist/cjs/helpers/resolveSafeAreaVariable.native.js.map +1 -1
  347. package/dist/cjs/helpers/resolveVariableValue.cjs +0 -1
  348. package/dist/cjs/helpers/resolveVariableValue.native.cjs +0 -1
  349. package/dist/cjs/helpers/resolveVariableValue.native.js +0 -1
  350. package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -1
  351. package/dist/cjs/helpers/setElementProps.cjs +0 -1
  352. package/dist/cjs/helpers/setElementProps.native.cjs +0 -1
  353. package/dist/cjs/helpers/setElementProps.native.js +0 -1
  354. package/dist/cjs/helpers/setElementProps.native.js.map +1 -1
  355. package/dist/cjs/helpers/skipProps.cjs +0 -1
  356. package/dist/cjs/helpers/skipProps.native.cjs +0 -1
  357. package/dist/cjs/helpers/skipProps.native.js +0 -1
  358. package/dist/cjs/helpers/skipProps.native.js.map +1 -1
  359. package/dist/cjs/helpers/sortString.cjs +0 -1
  360. package/dist/cjs/helpers/sortString.native.cjs +0 -1
  361. package/dist/cjs/helpers/sortString.native.js +0 -1
  362. package/dist/cjs/helpers/sortString.native.js.map +1 -1
  363. package/dist/cjs/helpers/styleFrontend.cjs +0 -1
  364. package/dist/cjs/helpers/styleFrontend.native.cjs +0 -1
  365. package/dist/cjs/helpers/styleFrontend.native.js +0 -1
  366. package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
  367. package/dist/cjs/helpers/styleOriginalValues.cjs +0 -1
  368. package/dist/cjs/helpers/styleOriginalValues.native.cjs +0 -1
  369. package/dist/cjs/helpers/styleOriginalValues.native.js +0 -1
  370. package/dist/cjs/helpers/styleOriginalValues.native.js.map +1 -1
  371. package/dist/cjs/helpers/styleProvenance.cjs +0 -1
  372. package/dist/cjs/helpers/styleProvenance.native.cjs +0 -1
  373. package/dist/cjs/helpers/styleProvenance.native.js +0 -1
  374. package/dist/cjs/helpers/styleProvenance.native.js.map +1 -1
  375. package/dist/cjs/helpers/subscribeToContextGroup.cjs +0 -1
  376. package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +0 -1
  377. package/dist/cjs/helpers/subscribeToContextGroup.native.js +0 -1
  378. package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
  379. package/dist/cjs/helpers/themeRef.cjs +0 -1
  380. package/dist/cjs/helpers/themeRef.native.cjs +0 -1
  381. package/dist/cjs/helpers/themeRef.native.js +0 -1
  382. package/dist/cjs/helpers/themeRef.native.js.map +1 -1
  383. package/dist/cjs/helpers/themeUpdateState.cjs +24 -0
  384. package/dist/cjs/helpers/themeUpdateState.native.cjs +26 -0
  385. package/dist/cjs/helpers/themeUpdateState.native.js +28 -0
  386. package/dist/cjs/helpers/themeUpdateState.native.js.map +1 -0
  387. package/dist/cjs/helpers/themeable.cjs +0 -1
  388. package/dist/cjs/helpers/themeable.native.cjs +0 -1
  389. package/dist/cjs/helpers/themeable.native.js +0 -1
  390. package/dist/cjs/helpers/themeable.native.js.map +1 -1
  391. package/dist/cjs/helpers/themes.cjs +0 -1
  392. package/dist/cjs/helpers/themes.native.cjs +0 -1
  393. package/dist/cjs/helpers/themes.native.js +0 -1
  394. package/dist/cjs/helpers/themes.native.js.map +1 -1
  395. package/dist/cjs/helpers/timer.cjs +0 -1
  396. package/dist/cjs/helpers/timer.native.cjs +0 -1
  397. package/dist/cjs/helpers/timer.native.js +0 -1
  398. package/dist/cjs/helpers/timer.native.js.map +1 -1
  399. package/dist/cjs/helpers/tokenCategories.cjs +0 -1
  400. package/dist/cjs/helpers/tokenCategories.native.cjs +0 -1
  401. package/dist/cjs/helpers/tokenCategories.native.js +0 -1
  402. package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
  403. package/dist/cjs/helpers/transformsToString.cjs +0 -1
  404. package/dist/cjs/helpers/transformsToString.native.cjs +0 -1
  405. package/dist/cjs/helpers/transformsToString.native.js +0 -1
  406. package/dist/cjs/helpers/transformsToString.native.js.map +1 -1
  407. package/dist/cjs/helpers/useRenderElement.cjs +0 -1
  408. package/dist/cjs/helpers/useRenderElement.native.cjs +0 -1
  409. package/dist/cjs/helpers/useRenderElement.native.js +0 -1
  410. package/dist/cjs/helpers/useRenderElement.native.js.map +1 -1
  411. package/dist/cjs/helpers/variableValue.cjs +66 -0
  412. package/dist/cjs/helpers/variableValue.native.cjs +88 -0
  413. package/dist/cjs/helpers/variableValue.native.js +90 -0
  414. package/dist/cjs/helpers/variableValue.native.js.map +1 -0
  415. package/dist/cjs/helpers/variables.cjs +95 -139
  416. package/dist/cjs/helpers/variables.native.cjs +97 -161
  417. package/dist/cjs/helpers/variables.native.js +97 -161
  418. package/dist/cjs/helpers/variables.native.js.map +1 -1
  419. package/dist/cjs/helpers/warnOnce.cjs +1 -2
  420. package/dist/cjs/helpers/warnOnce.native.cjs +1 -2
  421. package/dist/cjs/helpers/warnOnce.native.js +1 -2
  422. package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
  423. package/dist/cjs/helpers/webPropsToSkip.cjs +0 -1
  424. package/dist/cjs/helpers/webPropsToSkip.native.cjs +0 -1
  425. package/dist/cjs/helpers/webPropsToSkip.native.js +0 -1
  426. package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
  427. package/dist/cjs/helpers/wrapStyleTags.cjs +0 -1
  428. package/dist/cjs/helpers/wrapStyleTags.native.cjs +0 -1
  429. package/dist/cjs/helpers/wrapStyleTags.native.js +0 -1
  430. package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
  431. package/dist/cjs/hooks/doesRootSchemeMatchSystem.cjs +0 -1
  432. package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.cjs +0 -1
  433. package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js +0 -1
  434. package/dist/cjs/hooks/doesRootSchemeMatchSystem.native.js.map +1 -1
  435. package/dist/cjs/hooks/getThemeProxied.cjs +1 -2
  436. package/dist/cjs/hooks/getThemeProxied.native.cjs +2 -3
  437. package/dist/cjs/hooks/getThemeProxied.native.js +2 -3
  438. package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
  439. package/dist/cjs/hooks/isOptimizedForFirstRender.cjs +0 -1
  440. package/dist/cjs/hooks/isOptimizedForFirstRender.native.cjs +0 -1
  441. package/dist/cjs/hooks/isOptimizedForFirstRender.native.js +0 -1
  442. package/dist/cjs/hooks/isOptimizedForFirstRender.native.js.map +1 -1
  443. package/dist/cjs/hooks/useAnimationDriver.cjs +14 -9
  444. package/dist/cjs/hooks/useAnimationDriver.native.cjs +14 -9
  445. package/dist/cjs/hooks/useAnimationDriver.native.js +14 -9
  446. package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
  447. package/dist/cjs/hooks/useComponentState.cjs +27 -25
  448. package/dist/cjs/hooks/useComponentState.native.cjs +28 -25
  449. package/dist/cjs/hooks/useComponentState.native.js +28 -25
  450. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  451. package/dist/cjs/hooks/useDisableSSR.cjs +0 -1
  452. package/dist/cjs/hooks/useDisableSSR.native.cjs +0 -1
  453. package/dist/cjs/hooks/useDisableSSR.native.js +0 -1
  454. package/dist/cjs/hooks/useDisableSSR.native.js.map +1 -1
  455. package/dist/cjs/hooks/useIsTouchDevice.cjs +0 -1
  456. package/dist/cjs/hooks/useIsTouchDevice.native.cjs +0 -1
  457. package/dist/cjs/hooks/useIsTouchDevice.native.js +0 -1
  458. package/dist/cjs/hooks/useIsTouchDevice.native.js.map +1 -1
  459. package/dist/cjs/hooks/useMedia.cjs +0 -1
  460. package/dist/cjs/hooks/useMedia.native.cjs +0 -1
  461. package/dist/cjs/hooks/useMedia.native.js +0 -1
  462. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  463. package/dist/cjs/hooks/usePortalThemeState.cjs +1 -2
  464. package/dist/cjs/hooks/usePortalThemeState.native.cjs +1 -2
  465. package/dist/cjs/hooks/usePortalThemeState.native.js +1 -2
  466. package/dist/cjs/hooks/usePortalThemeState.native.js.map +1 -1
  467. package/dist/cjs/hooks/useProps.cjs +0 -1
  468. package/dist/cjs/hooks/useProps.native.cjs +0 -1
  469. package/dist/cjs/hooks/useProps.native.js +0 -1
  470. package/dist/cjs/hooks/useProps.native.js.map +1 -1
  471. package/dist/cjs/hooks/useTheme.cjs +0 -1
  472. package/dist/cjs/hooks/useTheme.native.cjs +0 -1
  473. package/dist/cjs/hooks/useTheme.native.js +0 -1
  474. package/dist/cjs/hooks/useTheme.native.js.map +1 -1
  475. package/dist/cjs/hooks/useThemeName.cjs +0 -1
  476. package/dist/cjs/hooks/useThemeName.native.cjs +0 -1
  477. package/dist/cjs/hooks/useThemeName.native.js +0 -1
  478. package/dist/cjs/hooks/useThemeName.native.js.map +1 -1
  479. package/dist/cjs/hooks/useThemeState.cjs +11 -16
  480. package/dist/cjs/hooks/useThemeState.native.cjs +13 -18
  481. package/dist/cjs/hooks/useThemeState.native.js +13 -18
  482. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  483. package/dist/cjs/index.cjs +0 -2
  484. package/dist/cjs/index.native.cjs +0 -2
  485. package/dist/cjs/index.native.js +0 -2
  486. package/dist/cjs/index.native.js.map +1 -1
  487. package/dist/cjs/inject-styles.cjs +0 -1
  488. package/dist/cjs/inject-styles.native.cjs +0 -1
  489. package/dist/cjs/inject-styles.native.js +0 -1
  490. package/dist/cjs/inject-styles.native.js.map +1 -1
  491. package/dist/cjs/insertFont.cjs +0 -1
  492. package/dist/cjs/insertFont.native.cjs +0 -1
  493. package/dist/cjs/insertFont.native.js +0 -1
  494. package/dist/cjs/insertFont.native.js.map +1 -1
  495. package/dist/cjs/interfaces/CSSColorNames.cjs +0 -1
  496. package/dist/cjs/interfaces/CSSColorNames.native.cjs +0 -1
  497. package/dist/cjs/interfaces/CSSColorNames.native.js +0 -1
  498. package/dist/cjs/interfaces/CSSColorNames.native.js.map +1 -1
  499. package/dist/cjs/interfaces/GetRef.cjs +0 -1
  500. package/dist/cjs/interfaces/GetRef.native.cjs +0 -1
  501. package/dist/cjs/interfaces/GetRef.native.js +0 -1
  502. package/dist/cjs/interfaces/GetRef.native.js.map +1 -1
  503. package/dist/cjs/interfaces/RNExclusiveTypes.cjs +0 -1
  504. package/dist/cjs/interfaces/RNExclusiveTypes.native.cjs +0 -1
  505. package/dist/cjs/interfaces/RNExclusiveTypes.native.js +0 -1
  506. package/dist/cjs/interfaces/RNExclusiveTypes.native.js.map +1 -1
  507. package/dist/cjs/interfaces/TamaguiComponentEvents.cjs +0 -1
  508. package/dist/cjs/interfaces/TamaguiComponentEvents.native.cjs +0 -1
  509. package/dist/cjs/interfaces/TamaguiComponentEvents.native.js +0 -1
  510. package/dist/cjs/interfaces/TamaguiComponentEvents.native.js.map +1 -1
  511. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.cjs +0 -1
  512. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.cjs +0 -1
  513. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js +0 -1
  514. package/dist/cjs/interfaces/TamaguiComponentPropsBaseBase.native.js.map +1 -1
  515. package/dist/cjs/internal-runtime.cjs +0 -1
  516. package/dist/cjs/internal-runtime.native.cjs +0 -1
  517. package/dist/cjs/internal-runtime.native.js +0 -1
  518. package/dist/cjs/internal-runtime.native.js.map +1 -1
  519. package/dist/cjs/internalRuntimeTypes.cjs +0 -1
  520. package/dist/cjs/internalRuntimeTypes.native.cjs +0 -1
  521. package/dist/cjs/internalRuntimeTypes.native.js +0 -1
  522. package/dist/cjs/internalRuntimeTypes.native.js.map +1 -1
  523. package/dist/cjs/setupHooks.cjs +0 -1
  524. package/dist/cjs/setupHooks.native.cjs +0 -1
  525. package/dist/cjs/setupHooks.native.js +0 -1
  526. package/dist/cjs/setupHooks.native.js.map +1 -1
  527. package/dist/cjs/setupReactNative.cjs +0 -1
  528. package/dist/cjs/setupReactNative.native.cjs +0 -1
  529. package/dist/cjs/setupReactNative.native.js +0 -1
  530. package/dist/cjs/setupReactNative.native.js.map +1 -1
  531. package/dist/cjs/styled.cjs +0 -1
  532. package/dist/cjs/styled.native.cjs +0 -1
  533. package/dist/cjs/styled.native.js +0 -1
  534. package/dist/cjs/styled.native.js.map +1 -1
  535. package/dist/cjs/theme-update.cjs +19 -0
  536. package/dist/cjs/theme-update.native.cjs +21 -0
  537. package/dist/cjs/theme-update.native.js +23 -0
  538. package/dist/cjs/theme-update.native.js.map +1 -0
  539. package/dist/cjs/type-utils.cjs +0 -1
  540. package/dist/cjs/type-utils.native.cjs +0 -1
  541. package/dist/cjs/type-utils.native.js +0 -1
  542. package/dist/cjs/type-utils.native.js.map +1 -1
  543. package/dist/cjs/types.cjs +0 -1
  544. package/dist/cjs/types.native.cjs +0 -1
  545. package/dist/cjs/types.native.js +0 -1
  546. package/dist/cjs/types.native.js.map +1 -1
  547. package/dist/cjs/views/ConfigRevisionCheck.cjs +0 -1
  548. package/dist/cjs/views/ConfigRevisionCheck.native.cjs +0 -1
  549. package/dist/cjs/views/ConfigRevisionCheck.native.js +0 -1
  550. package/dist/cjs/views/ConfigRevisionCheck.native.js.map +1 -1
  551. package/dist/cjs/views/Configuration.cjs +0 -1
  552. package/dist/cjs/views/Configuration.native.cjs +0 -1
  553. package/dist/cjs/views/Configuration.native.js +0 -1
  554. package/dist/cjs/views/Configuration.native.js.map +1 -1
  555. package/dist/cjs/views/FontLanguage.cjs +0 -1
  556. package/dist/cjs/views/FontLanguage.native.cjs +0 -1
  557. package/dist/cjs/views/FontLanguage.native.js +0 -1
  558. package/dist/cjs/views/FontLanguage.native.js.map +1 -1
  559. package/dist/cjs/views/SafeAreaTracker.cjs +0 -1
  560. package/dist/cjs/views/SafeAreaTracker.native.cjs +0 -1
  561. package/dist/cjs/views/SafeAreaTracker.native.js +0 -1
  562. package/dist/cjs/views/SafeAreaTracker.native.js.map +1 -1
  563. package/dist/cjs/views/Slot.cjs +0 -1
  564. package/dist/cjs/views/Slot.native.cjs +0 -1
  565. package/dist/cjs/views/Slot.native.js +0 -1
  566. package/dist/cjs/views/Slot.native.js.map +1 -1
  567. package/dist/cjs/views/TamaguiProvider.cjs +0 -1
  568. package/dist/cjs/views/TamaguiProvider.native.cjs +0 -1
  569. package/dist/cjs/views/TamaguiProvider.native.js +0 -1
  570. package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
  571. package/dist/cjs/views/TamaguiRoot.cjs +0 -1
  572. package/dist/cjs/views/TamaguiRoot.native.cjs +0 -1
  573. package/dist/cjs/views/TamaguiRoot.native.js +0 -1
  574. package/dist/cjs/views/TamaguiRoot.native.js.map +1 -1
  575. package/dist/cjs/views/Text.cjs +0 -1
  576. package/dist/cjs/views/Text.native.cjs +0 -1
  577. package/dist/cjs/views/Text.native.js +0 -1
  578. package/dist/cjs/views/Text.native.js.map +1 -1
  579. package/dist/cjs/views/Theme.cjs +7 -33
  580. package/dist/cjs/views/Theme.native.cjs +8 -20
  581. package/dist/cjs/views/Theme.native.js +8 -20
  582. package/dist/cjs/views/Theme.native.js.map +1 -1
  583. package/dist/cjs/views/ThemeDebug.cjs +0 -1
  584. package/dist/cjs/views/ThemeDebug.native.cjs +0 -1
  585. package/dist/cjs/views/ThemeDebug.native.js +0 -1
  586. package/dist/cjs/views/ThemeDebug.native.js.map +1 -1
  587. package/dist/cjs/views/ThemeProvider.cjs +0 -1
  588. package/dist/cjs/views/ThemeProvider.native.cjs +0 -1
  589. package/dist/cjs/views/ThemeProvider.native.js +0 -1
  590. package/dist/cjs/views/ThemeProvider.native.js.map +1 -1
  591. package/dist/cjs/views/ThemeUpdate.cjs +82 -0
  592. package/dist/cjs/views/ThemeUpdate.native.cjs +84 -0
  593. package/dist/cjs/views/ThemeUpdate.native.js +86 -0
  594. package/dist/cjs/views/ThemeUpdate.native.js.map +1 -0
  595. package/dist/cjs/views/View.cjs +0 -1
  596. package/dist/cjs/views/View.native.cjs +0 -1
  597. package/dist/cjs/views/View.native.js +0 -1
  598. package/dist/cjs/views/View.native.js.map +1 -1
  599. package/dist/esm/Tamagui.mjs.map +1 -1
  600. package/dist/esm/Tamagui.native.js.map +1 -1
  601. package/dist/esm/_withNativeStyle.mjs.map +1 -1
  602. package/dist/esm/config.mjs +7 -0
  603. package/dist/esm/config.mjs.map +1 -1
  604. package/dist/esm/config.native.js +7 -0
  605. package/dist/esm/config.native.js.map +1 -1
  606. package/dist/esm/constants/isDevTools.mjs.map +1 -1
  607. package/dist/esm/constants/isDevTools.native.js.map +1 -1
  608. package/dist/esm/createComponent.mjs.map +1 -1
  609. package/dist/esm/createComponent.native.js.map +1 -1
  610. package/dist/esm/createFont.mjs.map +1 -1
  611. package/dist/esm/createFont.native.js.map +1 -1
  612. package/dist/esm/createTamagui.mjs +1 -1
  613. package/dist/esm/createTamagui.mjs.map +1 -1
  614. package/dist/esm/createTamagui.native.js +1 -1
  615. package/dist/esm/createTamagui.native.js.map +1 -1
  616. package/dist/esm/createVariable.mjs.map +1 -1
  617. package/dist/esm/createVariable.native.js.map +1 -1
  618. package/dist/esm/dom/primitives.native.js +1 -1
  619. package/dist/esm/dom/primitives.native.js.map +1 -1
  620. package/dist/esm/eventHandling.native.js.map +1 -1
  621. package/dist/esm/helpers/configVariables.mjs +60 -0
  622. package/dist/esm/helpers/configVariables.mjs.map +1 -0
  623. package/dist/esm/helpers/configVariables.native.js +65 -0
  624. package/dist/esm/helpers/configVariables.native.js.map +1 -0
  625. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  626. package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
  627. package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
  628. package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
  629. package/dist/esm/helpers/defaultAnimationDriver.mjs +1 -5
  630. package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
  631. package/dist/esm/helpers/defaultAnimationDriver.native.js +0 -12
  632. package/dist/esm/helpers/defaultAnimationDriver.native.js.map +1 -1
  633. package/dist/esm/helpers/directStyle.mjs +257 -282
  634. package/dist/esm/helpers/directStyle.mjs.map +1 -1
  635. package/dist/esm/helpers/directStyle.native.js +273 -304
  636. package/dist/esm/helpers/directStyle.native.js.map +1 -1
  637. package/dist/esm/helpers/expandStyle.mjs.map +1 -1
  638. package/dist/esm/helpers/expandStyle.native.js.map +1 -1
  639. package/dist/esm/helpers/expandStyles.native.js.map +1 -1
  640. package/dist/esm/helpers/extractPseudoState.mjs.map +1 -1
  641. package/dist/esm/helpers/formatDiagnostic.mjs +3 -0
  642. package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
  643. package/dist/esm/helpers/formatDiagnostic.native.js +3 -0
  644. package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
  645. package/dist/esm/helpers/getCSSStylesAtomic.mjs +5 -1
  646. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  647. package/dist/esm/helpers/getDynamicVal.mjs.map +1 -1
  648. package/dist/esm/helpers/getDynamicVal.native.js.map +1 -1
  649. package/dist/esm/helpers/getExpandedShorthands.mjs.map +1 -1
  650. package/dist/esm/helpers/getExpandedShorthands.native.js.map +1 -1
  651. package/dist/esm/helpers/getFontLanguage.mjs.map +1 -1
  652. package/dist/esm/helpers/getFontLanguage.native.js.map +1 -1
  653. package/dist/esm/helpers/getShorthandValue.mjs.map +1 -1
  654. package/dist/esm/helpers/getShorthandValue.native.js.map +1 -1
  655. package/dist/esm/helpers/getSplitStyles.mjs +0 -7
  656. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  657. package/dist/esm/helpers/getSplitStyles.native.js +0 -7
  658. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  659. package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
  660. package/dist/esm/helpers/getVariantExtras.mjs.map +1 -1
  661. package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
  662. package/dist/esm/helpers/grammarConfig.mjs +59 -13
  663. package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
  664. package/dist/esm/helpers/grammarConfig.native.js +80 -17
  665. package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
  666. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  667. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  668. package/dist/esm/helpers/matchMedia.native.js.map +1 -1
  669. package/dist/esm/helpers/mediaObjectToString.mjs.map +1 -1
  670. package/dist/esm/helpers/mediaObjectToString.native.js.map +1 -1
  671. package/dist/esm/helpers/nativeStyleEngine.mjs.map +1 -1
  672. package/dist/esm/helpers/nativeStyleEngine.native.js.map +1 -1
  673. package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
  674. package/dist/esm/helpers/parseBorderShorthand.native.js.map +1 -1
  675. package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -1
  676. package/dist/esm/helpers/parseNativeTransform.native.js.map +1 -1
  677. package/dist/esm/helpers/parseOutlineShorthand.native.js.map +1 -1
  678. package/dist/esm/helpers/propMapper.mjs +29 -37
  679. package/dist/esm/helpers/propMapper.mjs.map +1 -1
  680. package/dist/esm/helpers/propMapper.native.js +29 -37
  681. package/dist/esm/helpers/propMapper.native.js.map +1 -1
  682. package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
  683. package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
  684. package/dist/esm/helpers/registerCSSVariable.mjs.map +1 -1
  685. package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
  686. package/dist/esm/helpers/resolveSafeAreaVariable.native.js.map +1 -1
  687. package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
  688. package/dist/esm/helpers/themeRef.mjs.map +1 -1
  689. package/dist/esm/helpers/themeRef.native.js.map +1 -1
  690. package/dist/esm/helpers/themeUpdateState.mjs +4 -0
  691. package/dist/esm/helpers/themeUpdateState.mjs.map +1 -0
  692. package/dist/esm/helpers/themeUpdateState.native.js +4 -0
  693. package/dist/esm/helpers/themeUpdateState.native.js.map +1 -0
  694. package/dist/esm/helpers/timer.mjs.map +1 -1
  695. package/dist/esm/helpers/timer.native.js.map +1 -1
  696. package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
  697. package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
  698. package/dist/esm/helpers/transformsToString.native.js.map +1 -1
  699. package/dist/esm/helpers/useRenderElement.mjs.map +1 -1
  700. package/dist/esm/helpers/useRenderElement.native.js.map +1 -1
  701. package/dist/esm/helpers/variableValue.mjs +44 -0
  702. package/dist/esm/helpers/variableValue.mjs.map +1 -0
  703. package/dist/esm/helpers/variableValue.native.js +64 -0
  704. package/dist/esm/helpers/variableValue.native.js.map +1 -0
  705. package/dist/esm/helpers/variables.mjs +96 -136
  706. package/dist/esm/helpers/variables.mjs.map +1 -1
  707. package/dist/esm/helpers/variables.native.js +98 -158
  708. package/dist/esm/helpers/variables.native.js.map +1 -1
  709. package/dist/esm/helpers/warnOnce.mjs +1 -1
  710. package/dist/esm/helpers/warnOnce.mjs.map +1 -1
  711. package/dist/esm/helpers/warnOnce.native.js +1 -1
  712. package/dist/esm/helpers/warnOnce.native.js.map +1 -1
  713. package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
  714. package/dist/esm/hooks/getThemeProxied.native.js +2 -2
  715. package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
  716. package/dist/esm/hooks/useAnimationDriver.mjs +14 -8
  717. package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
  718. package/dist/esm/hooks/useAnimationDriver.native.js +14 -8
  719. package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
  720. package/dist/esm/hooks/useComponentState.mjs +27 -24
  721. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  722. package/dist/esm/hooks/useComponentState.native.js +28 -24
  723. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  724. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  725. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  726. package/dist/esm/hooks/usePortalThemeState.mjs +2 -2
  727. package/dist/esm/hooks/usePortalThemeState.mjs.map +1 -1
  728. package/dist/esm/hooks/usePortalThemeState.native.js +2 -2
  729. package/dist/esm/hooks/usePortalThemeState.native.js.map +1 -1
  730. package/dist/esm/hooks/useProps.mjs.map +1 -1
  731. package/dist/esm/hooks/useProps.native.js.map +1 -1
  732. package/dist/esm/hooks/useThemeName.mjs.map +1 -1
  733. package/dist/esm/hooks/useThemeState.mjs +12 -15
  734. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  735. package/dist/esm/hooks/useThemeState.native.js +14 -17
  736. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  737. package/dist/esm/index.js +0 -2
  738. package/dist/esm/index.mjs +0 -2
  739. package/dist/esm/index.native.js +0 -2
  740. package/dist/esm/insertFont.mjs.map +1 -1
  741. package/dist/esm/insertFont.native.js.map +1 -1
  742. package/dist/esm/styled.mjs.map +1 -1
  743. package/dist/esm/styled.native.js.map +1 -1
  744. package/dist/esm/theme-update.mjs +3 -0
  745. package/dist/esm/theme-update.native.js +3 -0
  746. package/dist/esm/views/FontLanguage.mjs.map +1 -1
  747. package/dist/esm/views/SafeAreaTracker.native.js.map +1 -1
  748. package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
  749. package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
  750. package/dist/esm/views/Theme.mjs +8 -33
  751. package/dist/esm/views/Theme.mjs.map +1 -1
  752. package/dist/esm/views/Theme.native.js +9 -19
  753. package/dist/esm/views/Theme.native.js.map +1 -1
  754. package/dist/esm/views/ThemeUpdate.mjs +54 -0
  755. package/dist/esm/views/ThemeUpdate.mjs.map +1 -0
  756. package/dist/esm/views/ThemeUpdate.native.js +53 -0
  757. package/dist/esm/views/ThemeUpdate.native.js.map +1 -0
  758. package/package.json +26 -17
  759. package/src/config.ts +7 -0
  760. package/src/createTamagui.ts +2 -2
  761. package/src/dom/primitives.native.tsx +1 -1
  762. package/src/helpers/configVariables.ts +64 -0
  763. package/src/helpers/defaultAnimationDriver.tsx +0 -4
  764. package/src/helpers/directStyle.ts +875 -465
  765. package/src/helpers/formatDiagnostic.ts +3 -0
  766. package/src/helpers/getCSSStylesAtomic.ts +5 -1
  767. package/src/helpers/getSplitStyles.tsx +0 -15
  768. package/src/helpers/grammarConfig.ts +82 -12
  769. package/src/helpers/nativeTransitionTarget.native.ts +1 -1
  770. package/src/helpers/nativeTransitionTarget.ts +1 -1
  771. package/src/helpers/propMapper.ts +41 -43
  772. package/src/helpers/themeUpdateState.ts +27 -0
  773. package/src/helpers/variableValue.ts +45 -0
  774. package/src/helpers/variables.ts +149 -195
  775. package/src/helpers/warnOnce.ts +2 -2
  776. package/src/hooks/getThemeProxied.ts +8 -5
  777. package/src/hooks/useAnimationDriver.ts +26 -11
  778. package/src/hooks/useComponentState.ts +44 -31
  779. package/src/hooks/usePortalThemeState.ts +8 -8
  780. package/src/hooks/useThemeState.ts +16 -31
  781. package/src/index.ts +0 -1
  782. package/src/theme-update.ts +2 -0
  783. package/src/types.tsx +13 -21
  784. package/src/views/Theme.tsx +18 -77
  785. package/src/views/ThemeUpdate.tsx +88 -0
  786. package/types/config.d.ts.map +1 -1
  787. package/types/helpers/configVariables.d.ts +3 -0
  788. package/types/helpers/configVariables.d.ts.map +1 -0
  789. package/types/helpers/defaultAnimationDriver.d.ts.map +1 -1
  790. package/types/helpers/directStyle.d.ts +2 -23
  791. package/types/helpers/directStyle.d.ts.map +1 -1
  792. package/types/helpers/formatDiagnostic.d.ts.map +1 -1
  793. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  794. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  795. package/types/helpers/grammarConfig.d.ts +9 -0
  796. package/types/helpers/grammarConfig.d.ts.map +1 -1
  797. package/types/helpers/nativeTransitionTarget.d.ts +1 -1
  798. package/types/helpers/nativeTransitionTarget.d.ts.map +1 -1
  799. package/types/helpers/nativeTransitionTarget.native.d.ts +1 -1
  800. package/types/helpers/nativeTransitionTarget.native.d.ts.map +1 -1
  801. package/types/helpers/propMapper.d.ts.map +1 -1
  802. package/types/helpers/themeUpdateState.d.ts +23 -0
  803. package/types/helpers/themeUpdateState.d.ts.map +1 -0
  804. package/types/helpers/variableValue.d.ts +4 -0
  805. package/types/helpers/variableValue.d.ts.map +1 -0
  806. package/types/helpers/variables.d.ts +7 -24
  807. package/types/helpers/variables.d.ts.map +1 -1
  808. package/types/helpers/warnOnce.d.ts +1 -1
  809. package/types/hooks/getThemeProxied.d.ts.map +1 -1
  810. package/types/hooks/useAnimationDriver.d.ts.map +1 -1
  811. package/types/hooks/useComponentState.d.ts.map +1 -1
  812. package/types/hooks/usePortalThemeState.d.ts +5 -5
  813. package/types/hooks/usePortalThemeState.d.ts.map +1 -1
  814. package/types/hooks/useThemeState.d.ts +2 -5
  815. package/types/hooks/useThemeState.d.ts.map +1 -1
  816. package/types/index.d.ts +0 -1
  817. package/types/index.d.ts.map +1 -1
  818. package/types/theme-update.d.ts +3 -0
  819. package/types/theme-update.d.ts.map +1 -0
  820. package/types/types.d.ts +6 -17
  821. package/types/types.d.ts.map +1 -1
  822. package/types/views/Theme.d.ts +2 -15
  823. package/types/views/Theme.d.ts.map +1 -1
  824. package/types/views/ThemeUpdate.d.ts +15 -0
  825. package/types/views/ThemeUpdate.d.ts.map +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"SafeAreaTracker.native.js","names":[],"sources":["esm/views/SafeAreaTracker.native.js"],"sourcesContent":["import { getSafeArea, hasSafeAreaSetup } from \"@tamagui/native\";\nfunction hasSafeAreaTracker() {\n return hasSafeAreaSetup();\n}\nfunction SafeAreaTracker() {\n getSafeArea().state.useSafeAreaInsets();\n return null;\n}\nexport {\n SafeAreaTracker,\n hasSafeAreaTracker\n};\n//# sourceMappingURL=SafeAreaTracker.native.js.map\n"],"mappings":";;;AACA,SAAS,qBAAqB;CAC5B,OAAO,iBAAiB;AAC1B;AACA,SAAS,kBAAkB;CACzB,YAAY,EAAE,MAAM,kBAAkB;CACtC,OAAO;AACT"}
1
+ {"version":3,"file":"SafeAreaTracker.native.js","names":[],"sources":["esm/views/SafeAreaTracker.native.js"],"sourcesContent":["import { getSafeArea, hasSafeAreaSetup } from \"@tamagui/native\";\nfunction hasSafeAreaTracker() {\n return hasSafeAreaSetup();\n}\nfunction SafeAreaTracker() {\n getSafeArea().state.useSafeAreaInsets();\n return null;\n}\nexport {\n SafeAreaTracker,\n hasSafeAreaTracker\n};\n//# sourceMappingURL=SafeAreaTracker.native.js.map\n"],"mappings":";;;AACA,SAAS,qBAAqB;CAC5B,OAAO,iBAAiB;AAC1B;AACA,SAAS,kBAAkB;CACzB,YAAY,CAAC,CAAC,MAAM,kBAAkB;CACtC,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"TamaguiProvider.js","names":[],"sources":["esm/views/TamaguiProvider.js"],"sourcesContent":["import { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { ClientOnly } from \"@tamagui/use-did-finish-ssr\";\nimport React, { useEffect } from \"react\";\nimport { getSetting } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { stopAccumulatingRules } from \"../helpers/insertStyleRule\";\nimport { updateMediaListeners } from \"../hooks/useMedia\";\nimport { resolveAnimationDriver } from \"../helpers/resolveAnimationDriver\";\nimport { ConfigRevisionCheck } from \"./ConfigRevisionCheck\";\nimport { SafeAreaTracker, hasSafeAreaTracker } from \"./SafeAreaTracker\";\nimport { TamaguiRoot } from \"./TamaguiRoot\";\nimport { ThemeProvider } from \"./ThemeProvider\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\n\nlet _cachedFirstKey;\nlet _cachedConfig;\nfunction firstThemeKey(config) {\n\tif (config !== _cachedConfig) {\n\t\t_cachedConfig = config;\n\t\t_cachedFirstKey = config?.themes ? Object.keys(config.themes)[0] : void 0;\n\t}\n\treturn _cachedFirstKey;\n}\nfunction TamaguiProvider({ children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp, reset, insets, isSubtreeRoot }) {\n\tconst defaultTheme = defaultThemeProp || firstThemeKey(config) || \"light\";\n\tuseIsomorphicLayoutEffect(() => {\n\t\tconst resumeAccumulatingRules = stopAccumulatingRules();\n\t\tupdateMediaListeners();\n\t\treturn resumeAccumulatingRules;\n\t}, []);\n\tconst memoizedInsets = React.useMemo(() => insets, [\n\t\tinsets?.top,\n\t\tinsets?.right,\n\t\tinsets?.bottom,\n\t\tinsets?.left\n\t]);\n\tconst defaultAnimationDriver = React.useMemo(() => {\n\t\tconst driver = resolveAnimationDriver(config?.animations);\n\t\treturn driver?.isStub ? null : driver;\n\t}, [config?.animations]);\n\tuseEffect(() => {\n\t\tdefaultAnimationDriver?.onMount?.();\n\t}, []);\n\tlet contents = /* @__PURE__ */ jsx(ComponentContext.Provider, {\n\t\tanimationDriver: defaultAnimationDriver,\n\t\tinsets: memoizedInsets,\n\t\tchildren: /* @__PURE__ */ jsx(ThemeProvider, {\n\t\t\tdefaultTheme,\n\t\t\treset,\n\t\t\tclassName,\n\t\t\tisSubtreeRoot,\n\t\t\tchildren: /* @__PURE__ */ jsx(TamaguiRoot, {\n\t\t\t\ttheme: defaultTheme,\n\t\t\t\tisRootRoot: true,\n\t\t\t\tchildren\n\t\t\t})\n\t\t})\n\t});\n\tif (getSetting(\"disableSSR\")) contents = /* @__PURE__ */ jsx(ClientOnly, {\n\t\tenabled: true,\n\t\tchildren: contents\n\t});\n\treturn /* @__PURE__ */ jsxs(Fragment, { children: [\n\t\tconfig && !disableInjectCSS && /* @__PURE__ */ jsx(\"style\", {\n\t\t\tprecedence: \"default\",\n\t\t\thref: \"tamagui-css\",\n\t\t\tchildren: config.getCSS()\n\t\t}, \"tamagui-css\"),\n\t\tprocess.env.NODE_ENV !== \"production\" && config && /* @__PURE__ */ jsx(ConfigRevisionCheck, { config }),\n\t\thasSafeAreaTracker() && /* @__PURE__ */ jsx(SafeAreaTracker, {}),\n\t\tcontents\n\t] });\n}\n\nexport { TamaguiProvider };"],"mappings":";;;;;;;;;;;;;;;AAcA,IAAI;AACJ,IAAI;AACJ,SAAS,cAAc,QA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CAAC;AACJ"}
1
+ {"version":3,"file":"TamaguiProvider.js","names":[],"sources":["esm/views/TamaguiProvider.js"],"sourcesContent":["import { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { ClientOnly } from \"@tamagui/use-did-finish-ssr\";\nimport React, { useEffect } from \"react\";\nimport { getSetting } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { stopAccumulatingRules } from \"../helpers/insertStyleRule\";\nimport { updateMediaListeners } from \"../hooks/useMedia\";\nimport { resolveAnimationDriver } from \"../helpers/resolveAnimationDriver\";\nimport { ConfigRevisionCheck } from \"./ConfigRevisionCheck\";\nimport { SafeAreaTracker, hasSafeAreaTracker } from \"./SafeAreaTracker\";\nimport { TamaguiRoot } from \"./TamaguiRoot\";\nimport { ThemeProvider } from \"./ThemeProvider\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\n\nlet _cachedFirstKey;\nlet _cachedConfig;\nfunction firstThemeKey(config) {\n\tif (config !== _cachedConfig) {\n\t\t_cachedConfig = config;\n\t\t_cachedFirstKey = config?.themes ? Object.keys(config.themes)[0] : void 0;\n\t}\n\treturn _cachedFirstKey;\n}\nfunction TamaguiProvider({ children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp, reset, insets, isSubtreeRoot }) {\n\tconst defaultTheme = defaultThemeProp || firstThemeKey(config) || \"light\";\n\tuseIsomorphicLayoutEffect(() => {\n\t\tconst resumeAccumulatingRules = stopAccumulatingRules();\n\t\tupdateMediaListeners();\n\t\treturn resumeAccumulatingRules;\n\t}, []);\n\tconst memoizedInsets = React.useMemo(() => insets, [\n\t\tinsets?.top,\n\t\tinsets?.right,\n\t\tinsets?.bottom,\n\t\tinsets?.left\n\t]);\n\tconst defaultAnimationDriver = React.useMemo(() => {\n\t\tconst driver = resolveAnimationDriver(config?.animations);\n\t\treturn driver?.isStub ? null : driver;\n\t}, [config?.animations]);\n\tuseEffect(() => {\n\t\tdefaultAnimationDriver?.onMount?.();\n\t}, []);\n\tlet contents = /* @__PURE__ */ jsx(ComponentContext.Provider, {\n\t\tanimationDriver: defaultAnimationDriver,\n\t\tinsets: memoizedInsets,\n\t\tchildren: /* @__PURE__ */ jsx(ThemeProvider, {\n\t\t\tdefaultTheme,\n\t\t\treset,\n\t\t\tclassName,\n\t\t\tisSubtreeRoot,\n\t\t\tchildren: /* @__PURE__ */ jsx(TamaguiRoot, {\n\t\t\t\ttheme: defaultTheme,\n\t\t\t\tisRootRoot: true,\n\t\t\t\tchildren\n\t\t\t})\n\t\t})\n\t});\n\tif (getSetting(\"disableSSR\")) contents = /* @__PURE__ */ jsx(ClientOnly, {\n\t\tenabled: true,\n\t\tchildren: contents\n\t});\n\treturn /* @__PURE__ */ jsxs(Fragment, { children: [\n\t\tconfig && !disableInjectCSS && /* @__PURE__ */ jsx(\"style\", {\n\t\t\tprecedence: \"default\",\n\t\t\thref: \"tamagui-css\",\n\t\t\tchildren: config.getCSS()\n\t\t}, \"tamagui-css\"),\n\t\tprocess.env.NODE_ENV !== \"production\" && config && /* @__PURE__ */ jsx(ConfigRevisionCheck, { config }),\n\t\thasSafeAreaTracker() && /* @__PURE__ */ jsx(SafeAreaTracker, {}),\n\t\tcontents\n\t] });\n}\n\nexport { TamaguiProvider };"],"mappings":";;;;;;;;;;;;;;;AAcA,IAAI;AACJ,IAAI;AACJ,SAAS,cAAc,QAAQ;CAC9B,IAAI,WAAW,eAAe;EAC7B,gBAAgB;EAChB,kBAAkB,QAAQ,SAAS,OAAO,KAAK,OAAO,MAAM,CAAC,CAAC,KAAK,KAAK;CACzE;CACA,OAAO;AACR;AACA,SAAS,gBAAgB,EAAE,UAAU,kBAAkB,QAAQ,WAAW,cAAc,kBAAkB,OAAO,QAAQ,iBAAiB;CACzI,MAAM,eAAe,oBAAoB,cAAc,MAAM,KAAK;CAClE,gCAAgC;EAC/B,MAAM,0BAA0B,sBAAsB;EACtD,qBAAqB;EACrB,OAAO;CACR,GAAG,CAAC,CAAC;CACL,MAAM,iBAAiB,MAAM,cAAc,QAAQ;EAClD,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;CACT,CAAC;CACD,MAAM,yBAAyB,MAAM,cAAc;EAClD,MAAM,SAAS,uBAAuB,QAAQ,UAAU;EACxD,OAAO,QAAQ,SAAS,OAAO;CAChC,GAAG,CAAC,QAAQ,UAAU,CAAC;CACvB,gBAAgB;EACf,wBAAwB,UAAU;CACnC,GAAG,CAAC,CAAC;CACL,IAAI,WAA2B,oBAAI,iBAAiB,UAAU;EAC7D,iBAAiB;EACjB,QAAQ;EACR,UAA0B,oBAAI,eAAe;GAC5C;GACA;GACA;GACA;GACA,UAA0B,oBAAI,aAAa;IAC1C,OAAO;IACP,YAAY;IACZ;GACD,CAAC;EACF,CAAC;CACF,CAAC;CACD,IAAI,WAAW,YAAY,GAAG,WAA2B,oBAAI,YAAY;EACxE,SAAS;EACT,UAAU;CACX,CAAC;CACD,OAAuB,qBAAK,UAAU,EAAE,UAAU;EACjD,UAAU,CAAC,oBAAoC,oBAAI,SAAS;GAC3D,YAAY;GACZ,MAAM;GACN,UAAU,OAAO,OAAO;EACzB,GAAG,aAAa;EAChB,QAAQ,IAAI,aAAa,gBAAgB,UAA0B,oBAAI,qBAAqB,EAAE,OAAO,CAAC;EACtG,mBAAmB,KAAqB,oBAAI,iBAAiB,CAAC,CAAC;EAC/D;CACD,EAAE,CAAC;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"TamaguiProvider.native.js","names":[],"sources":["esm/views/TamaguiProvider.native.js"],"sourcesContent":["import { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { ClientOnly } from \"@tamagui/use-did-finish-ssr\";\nimport React, { useEffect } from \"react\";\nimport { getSetting } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { stopAccumulatingRules } from \"../helpers/insertStyleRule\";\nimport { updateMediaListeners } from \"../hooks/useMedia\";\nimport { resolveAnimationDriver } from \"../helpers/resolveAnimationDriver\";\nimport { SafeAreaTracker, hasSafeAreaTracker } from \"./SafeAreaTracker\";\nimport { TamaguiRoot } from \"./TamaguiRoot\";\nimport { ThemeProvider } from \"./ThemeProvider\";\n\nvar _cachedFirstKey;\nvar _cachedConfig;\nfunction firstThemeKey(config) {\n\tif (config !== _cachedConfig) {\n\t\t_cachedConfig = config;\n\t\t_cachedFirstKey = (config === null || config === void 0 ? void 0 : config.themes) ? Object.keys(config.themes)[0] : void 0;\n\t}\n\treturn _cachedFirstKey;\n}\nfunction TamaguiProvider(param) {\n\tvar { children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp, reset, insets, isSubtreeRoot } = param;\n\tvar defaultTheme = defaultThemeProp || firstThemeKey(config) || \"light\";\n\tuseIsomorphicLayoutEffect(function() {\n\t\tvar resumeAccumulatingRules = stopAccumulatingRules();\n\t\tupdateMediaListeners();\n\t\treturn resumeAccumulatingRules;\n\t}, []);\n\tvar memoizedInsets = React.useMemo(function() {\n\t\treturn insets;\n\t}, [\n\t\tinsets === null || insets === void 0 ? void 0 : insets.top,\n\t\tinsets === null || insets === void 0 ? void 0 : insets.right,\n\t\tinsets === null || insets === void 0 ? void 0 : insets.bottom,\n\t\tinsets === null || insets === void 0 ? void 0 : insets.left\n\t]);\n\tvar defaultAnimationDriver = React.useMemo(function() {\n\t\tvar driver = resolveAnimationDriver(config === null || config === void 0 ? void 0 : config.animations);\n\t\treturn (driver === null || driver === void 0 ? void 0 : driver.isStub) ? null : driver;\n\t}, [config === null || config === void 0 ? void 0 : config.animations]);\n\tuseEffect(function() {\n\t\tvar _defaultAnimationDriver_onMount;\n\t\tdefaultAnimationDriver === null || defaultAnimationDriver === void 0 || (_defaultAnimationDriver_onMount = defaultAnimationDriver.onMount) == null || _defaultAnimationDriver_onMount.call(defaultAnimationDriver);\n\t}, []);\n\tvar contents = /* @__PURE__ */ jsx(ComponentContext.Provider, {\n\t\tanimationDriver: defaultAnimationDriver,\n\t\tinsets: memoizedInsets,\n\t\tchildren: /* @__PURE__ */ jsx(ThemeProvider, {\n\t\t\tdefaultTheme,\n\t\t\treset,\n\t\t\tclassName,\n\t\t\tisSubtreeRoot,\n\t\t\tchildren: /* @__PURE__ */ jsx(TamaguiRoot, {\n\t\t\t\ttheme: defaultTheme,\n\t\t\t\tisRootRoot: true,\n\t\t\t\tchildren\n\t\t\t})\n\t\t})\n\t});\n\tif (getSetting(\"disableSSR\")) contents = /* @__PURE__ */ jsx(ClientOnly, {\n\t\tenabled: true,\n\t\tchildren: contents\n\t});\n\treturn /* @__PURE__ */ jsxs(Fragment, { children: [\n\t\tfalse,\n\t\tprocess.env.NODE_ENV !== \"production\" && false,\n\t\thasSafeAreaTracker() && /* @__PURE__ */ jsx(SafeAreaTracker, {}),\n\t\tcontents\n\t] });\n}\n\nexport { TamaguiProvider };"],"mappings":";;;;;;;;;;;;;;AAaA,IAAI;AACJ,IAAI;AACJ,SAAS,cAAc,QAAQ;CAC9B,IAAI,WAAW,eAAe;EAC7B,gBAAgB;EAChB,mBAAmB,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,UAAU,OAAO,KAAK,OAAO,MAAM,EAAE,KAAK,KAAK;CAC1H;CACA,OAAO;AACR;AACA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,EAAE,UAAU,kBAAkB,QAAQ,WAAW,cAAc,kBAAkB,OAAO,QAAQ,kBAAkB;CACtH,IAAI,eAAe,oBAAoB,cAAc,MAAM,KAAK;CAChE,0BAA0B,WAAW;EACpC,IAAI,0BAA0B,sBAAsB;EACpD,qBAAqB;EACrB,OAAO;CACR,GAAG,CAAC,CAAC;CACL,IAAI,iBAAiB,MAAM,QAAQ,WAAW;EAC7C,OAAO;CACR,GAAG;EACF,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO;EACvD,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO;EACvD,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO;EACvD,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO;CACxD,CAAC;CACD,IAAI,yBAAyB,MAAM,QAAQ,WAAW;EACrD,IAAI,SAAS,uBAAuB,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,UAAU;EACrG,QAAQ,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,UAAU,OAAO;CACjF,GAAG,CAAC,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,UAAU,CAAC;CACtE,UAAU,WAAW;EACpB,IAAI;EACJ,2BAA2B,QAAQ,2BAA2B,KAAK,MAAM,kCAAkC,uBAAuB,YAAY,QAAQ,gCAAgC,KAAK,sBAAsB;CAClN,GAAG,CAAC,CAAC;CACL,IAAI,WAA2B,oBAAI,iBAAiB,UAAU;EAC7D,iBAAiB;EACjB,QAAQ;EACR,UAA0B,oBAAI,eAAe;GAC5C;GACA;GACA;GACA;GACA,UAA0B,oBAAI,aAAa;IAC1C,OAAO;IACP,YAAY;IACZ;GACD,CAAC;EACF,CAAC;CACF,CAAC;CACD,IAAI,WAAW,YAAY,GAAG,WAA2B,oBAAI,YAAY;EACxE,SAAS;EACT,UAAU;CACX,CAAC;CACD,OAAuB,qBAAK,UAAU,EAAE,UAAU;EACjD;EACA,QAAQ,IAAI,aAAa,gBAAgB;EACzC,mBAAmB,KAAqB,oBAAI,iBAAiB,CAAC,CAAC;EAC/D;CACD,EAAE,CAAC;AACJ"}
1
+ {"version":3,"file":"TamaguiProvider.native.js","names":[],"sources":["esm/views/TamaguiProvider.native.js"],"sourcesContent":["import { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { ClientOnly } from \"@tamagui/use-did-finish-ssr\";\nimport React, { useEffect } from \"react\";\nimport { getSetting } from \"../config\";\nimport { ComponentContext } from \"../contexts/ComponentContext\";\nimport { stopAccumulatingRules } from \"../helpers/insertStyleRule\";\nimport { updateMediaListeners } from \"../hooks/useMedia\";\nimport { resolveAnimationDriver } from \"../helpers/resolveAnimationDriver\";\nimport { SafeAreaTracker, hasSafeAreaTracker } from \"./SafeAreaTracker\";\nimport { TamaguiRoot } from \"./TamaguiRoot\";\nimport { ThemeProvider } from \"./ThemeProvider\";\n\nvar _cachedFirstKey;\nvar _cachedConfig;\nfunction firstThemeKey(config) {\n\tif (config !== _cachedConfig) {\n\t\t_cachedConfig = config;\n\t\t_cachedFirstKey = (config === null || config === void 0 ? void 0 : config.themes) ? Object.keys(config.themes)[0] : void 0;\n\t}\n\treturn _cachedFirstKey;\n}\nfunction TamaguiProvider(param) {\n\tvar { children, disableInjectCSS, config, className, defaultTheme: defaultThemeProp, reset, insets, isSubtreeRoot } = param;\n\tvar defaultTheme = defaultThemeProp || firstThemeKey(config) || \"light\";\n\tuseIsomorphicLayoutEffect(function() {\n\t\tvar resumeAccumulatingRules = stopAccumulatingRules();\n\t\tupdateMediaListeners();\n\t\treturn resumeAccumulatingRules;\n\t}, []);\n\tvar memoizedInsets = React.useMemo(function() {\n\t\treturn insets;\n\t}, [\n\t\tinsets === null || insets === void 0 ? void 0 : insets.top,\n\t\tinsets === null || insets === void 0 ? void 0 : insets.right,\n\t\tinsets === null || insets === void 0 ? void 0 : insets.bottom,\n\t\tinsets === null || insets === void 0 ? void 0 : insets.left\n\t]);\n\tvar defaultAnimationDriver = React.useMemo(function() {\n\t\tvar driver = resolveAnimationDriver(config === null || config === void 0 ? void 0 : config.animations);\n\t\treturn (driver === null || driver === void 0 ? void 0 : driver.isStub) ? null : driver;\n\t}, [config === null || config === void 0 ? void 0 : config.animations]);\n\tuseEffect(function() {\n\t\tvar _defaultAnimationDriver_onMount;\n\t\tdefaultAnimationDriver === null || defaultAnimationDriver === void 0 || (_defaultAnimationDriver_onMount = defaultAnimationDriver.onMount) == null || _defaultAnimationDriver_onMount.call(defaultAnimationDriver);\n\t}, []);\n\tvar contents = /* @__PURE__ */ jsx(ComponentContext.Provider, {\n\t\tanimationDriver: defaultAnimationDriver,\n\t\tinsets: memoizedInsets,\n\t\tchildren: /* @__PURE__ */ jsx(ThemeProvider, {\n\t\t\tdefaultTheme,\n\t\t\treset,\n\t\t\tclassName,\n\t\t\tisSubtreeRoot,\n\t\t\tchildren: /* @__PURE__ */ jsx(TamaguiRoot, {\n\t\t\t\ttheme: defaultTheme,\n\t\t\t\tisRootRoot: true,\n\t\t\t\tchildren\n\t\t\t})\n\t\t})\n\t});\n\tif (getSetting(\"disableSSR\")) contents = /* @__PURE__ */ jsx(ClientOnly, {\n\t\tenabled: true,\n\t\tchildren: contents\n\t});\n\treturn /* @__PURE__ */ jsxs(Fragment, { children: [\n\t\tfalse,\n\t\tprocess.env.NODE_ENV !== \"production\" && false,\n\t\thasSafeAreaTracker() && /* @__PURE__ */ jsx(SafeAreaTracker, {}),\n\t\tcontents\n\t] });\n}\n\nexport { TamaguiProvider };"],"mappings":";;;;;;;;;;;;;;AAaA,IAAI;AACJ,IAAI;AACJ,SAAS,cAAc,QAAQ;CAC9B,IAAI,WAAW,eAAe;EAC7B,gBAAgB;EAChB,mBAAmB,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,UAAU,OAAO,KAAK,OAAO,MAAM,CAAC,CAAC,KAAK,KAAK;CAC1H;CACA,OAAO;AACR;AACA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,EAAE,UAAU,kBAAkB,QAAQ,WAAW,cAAc,kBAAkB,OAAO,QAAQ,kBAAkB;CACtH,IAAI,eAAe,oBAAoB,cAAc,MAAM,KAAK;CAChE,0BAA0B,WAAW;EACpC,IAAI,0BAA0B,sBAAsB;EACpD,qBAAqB;EACrB,OAAO;CACR,GAAG,CAAC,CAAC;CACL,IAAI,iBAAiB,MAAM,QAAQ,WAAW;EAC7C,OAAO;CACR,GAAG;EACF,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO;EACvD,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO;EACvD,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO;EACvD,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO;CACxD,CAAC;CACD,IAAI,yBAAyB,MAAM,QAAQ,WAAW;EACrD,IAAI,SAAS,uBAAuB,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,UAAU;EACrG,QAAQ,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,UAAU,OAAO;CACjF,GAAG,CAAC,WAAW,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,UAAU,CAAC;CACtE,UAAU,WAAW;EACpB,IAAI;EACJ,2BAA2B,QAAQ,2BAA2B,KAAK,MAAM,kCAAkC,uBAAuB,YAAY,QAAQ,gCAAgC,KAAK,sBAAsB;CAClN,GAAG,CAAC,CAAC;CACL,IAAI,WAA2B,oBAAI,iBAAiB,UAAU;EAC7D,iBAAiB;EACjB,QAAQ;EACR,UAA0B,oBAAI,eAAe;GAC5C;GACA;GACA;GACA;GACA,UAA0B,oBAAI,aAAa;IAC1C,OAAO;IACP,YAAY;IACZ;GACD,CAAC;EACF,CAAC;CACF,CAAC;CACD,IAAI,WAAW,YAAY,GAAG,WAA2B,oBAAI,YAAY;EACxE,SAAS;EACT,UAAU;CACX,CAAC;CACD,OAAuB,qBAAK,UAAU,EAAE,UAAU;EACjD;EACA,QAAQ,IAAI,aAAa,gBAAgB;EACzC,mBAAmB,KAAqB,oBAAI,iBAAiB,CAAC,CAAC;EAC/D;CACD,EAAE,CAAC;AACJ"}
@@ -1,49 +1,24 @@
1
1
  import { createRefComponent } from "@tamagui/compose-refs";
2
2
  import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
3
- import { getThemeClassNames } from "@tamagui/helpers";
3
+ import { getThemeClassNames, reservedThemeProps } from "@tamagui/helpers";
4
4
  import React, { Children, cloneElement, isValidElement, useRef } from "react";
5
- import { getConfig } from "../config.mjs";
6
5
  import { variableToString } from "../createVariable.mjs";
7
6
  import { formatDiagnostic } from "../helpers/formatDiagnostic.mjs";
8
- import { insertStyleRules, shouldInsertStyleRules, updateRules } from "../helpers/insertStyleRule.mjs";
9
- import { getInlineValuesFromProps, getVariablesCSSRules } from "../helpers/variables.mjs";
7
+ import { warnOnce } from "../helpers/warnOnce.mjs";
10
8
  import { useThemeWithState } from "../hooks/useTheme.mjs";
11
9
  import { ThemeStateContext, getThemeState, hasThemeUpdatingProps } from "../hooks/useThemeState.mjs";
12
10
  import { ThemeDebug } from "./ThemeDebug.mjs";
13
11
  import { jsx } from "react/jsx-runtime";
14
12
 
15
- const useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : () => {};
16
13
  const Theme = createRefComponent(function Theme2(props, ref) {
17
14
  "use no memo";
18
15
  if (props.disable) return props.children;
16
+ if (process.env.NODE_ENV === "development") {
17
+ for (const key in props) if (!reservedThemeProps[key]) warnOnce(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);
18
+ }
19
19
  const { passThrough } = props;
20
20
  const isRoot = !!props["_isRoot"];
21
- const config = getConfig();
22
- const inlineValues = getInlineValuesFromProps(props, config);
23
- let inlineCSS = null;
24
- let rulesToInsert = null;
25
- if (inlineValues) {
26
- inlineCSS = getVariablesCSSRules(inlineValues, config);
27
- if (inlineCSS && shouldInsertStyleRules(inlineCSS.identifier)) {
28
- updateRules(inlineCSS.identifier, inlineCSS.rules);
29
- rulesToInsert = { [inlineCSS.identifier]: [
30
- "variables",
31
- "",
32
- inlineCSS.identifier,
33
- void 0,
34
- inlineCSS.rules
35
- ] };
36
- }
37
- }
38
- useInsertEffectCompat(() => {
39
- if (rulesToInsert) insertStyleRules(rulesToInsert);
40
- }, [inlineCSS?.identifier]);
41
- const themeProps = inlineValues ? {
42
- ...props,
43
- inlineValues,
44
- inlineClassName: inlineCSS?.identifier
45
- } : props;
46
- const [_, themeState] = useThemeWithState(themeProps, isRoot, true);
21
+ const [_, themeState] = useThemeWithState(props, isRoot, true);
47
22
  useIsomorphicLayoutEffect(() => {}, [
48
23
  themeState.id,
49
24
  themeState.name,
@@ -55,7 +30,7 @@ const Theme = createRefComponent(function Theme2(props, ref) {
55
30
  finalChildren = cloneElement(finalChildren, { ref });
56
31
  } catch {}
57
32
  const stateRef = useRef({ hasEverThemed: false });
58
- return getThemedChildren(themeState, finalChildren, themeProps, isRoot, stateRef, passThrough);
33
+ return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);
59
34
  });
60
35
  Theme["avoidForwardRef"] = true;
61
36
  function getThemedChildren(themeState, children, props, isRoot = false, stateRef, passThrough = false) {
@@ -102,7 +77,7 @@ function getThemedChildren(themeState, children, props, isRoot = false, stateRef
102
77
  if (isWeb) {
103
78
  const baseStyle = props.contain ? inertContainedStyle : inertStyle;
104
79
  const { className = "", color } = passThrough ? {} : getThemeClassNameAndColor(themeState, props, isRoot);
105
- const inlineClassName = passThrough ? void 0 : props.inlineClassName;
80
+ const inlineClassName = passThrough ? void 0 : props._themeUpdate?.className;
106
81
  children = /* @__PURE__ */ jsx("span", {
107
82
  className: `${className} is_Theme${inlineClassName ? ` ${inlineClassName}` : ""}`,
108
83
  style: passThrough ? baseStyle : {
@@ -1 +1 @@
1
- {"version":3,"file":"Theme.js","names":[],"sources":["esm/views/Theme.js"],"sourcesContent":["import { createRefComponent } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { getThemeClassNames } from \"@tamagui/helpers\";\nimport React, { Children, cloneElement, isValidElement, useRef } from \"react\";\nimport { getConfig } from \"../config\";\nimport { variableToString } from \"../createVariable\";\nimport { formatDiagnostic } from \"../helpers/formatDiagnostic\";\nimport { insertStyleRules, shouldInsertStyleRules, updateRules } from \"../helpers/insertStyleRule\";\nimport { getInlineValuesFromProps, getVariablesCSSRules } from \"../helpers/variables\";\nimport { useThemeWithState } from \"../hooks/useTheme\";\nimport { ThemeStateContext, getThemeState, hasThemeUpdatingProps } from \"../hooks/useThemeState\";\nimport { ThemeDebug } from \"./ThemeDebug\";\nimport { jsx } from \"react/jsx-runtime\";\n\nconst useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : () => {};\nconst Theme = createRefComponent(function Theme2(props, ref) {\n\t\"use no memo\";\n\tif (props.disable) return props.children;\n\tconst { passThrough } = props;\n\tconst isRoot = !!props[\"_isRoot\"];\n\tconst config = getConfig();\n\tconst inlineValues = getInlineValuesFromProps(props, config);\n\tlet inlineCSS = null;\n\tlet rulesToInsert = null;\n\tif (inlineValues) {\n\t\tinlineCSS = getVariablesCSSRules(inlineValues, config);\n\t\tif (inlineCSS && shouldInsertStyleRules(inlineCSS.identifier)) {\n\t\t\tupdateRules(inlineCSS.identifier, inlineCSS.rules);\n\t\t\trulesToInsert = { [inlineCSS.identifier]: [\n\t\t\t\t\"variables\",\n\t\t\t\t\"\",\n\t\t\t\tinlineCSS.identifier,\n\t\t\t\tvoid 0,\n\t\t\t\tinlineCSS.rules\n\t\t\t] };\n\t\t}\n\t}\n\tuseInsertEffectCompat(() => {\n\t\tif (rulesToInsert) insertStyleRules(rulesToInsert);\n\t}, [inlineCSS?.identifier]);\n\tconst themeProps = inlineValues ? {\n\t\t...props,\n\t\tinlineValues,\n\t\tinlineClassName: inlineCSS?.identifier\n\t} : props;\n\tconst [_, themeState] = useThemeWithState(themeProps, isRoot, true);\n\tuseIsomorphicLayoutEffect(() => {}, [\n\t\tthemeState.id,\n\t\tthemeState.name,\n\t\tthemeState.theme\n\t]);\n\tlet finalChildren = props[\"disable-child-theme\"] ? Children.map(props.children, (child) => passThrough || !isValidElement(child) ? child : cloneElement(child, { [\"data-disable-theme\"]: true })) : props.children;\n\tif (ref) try {\n\t\tReact.Children.only(finalChildren);\n\t\tfinalChildren = cloneElement(finalChildren, { ref });\n\t} catch {}\n\tconst stateRef = useRef({ hasEverThemed: false });\n\treturn getThemedChildren(themeState, finalChildren, themeProps, isRoot, stateRef, passThrough);\n});\nTheme[\"avoidForwardRef\"] = true;\nfunction getThemedChildren(themeState, children, props, isRoot = false, stateRef, passThrough = false) {\n\tconst { shallow, forceClassName } = props;\n\tconst state = stateRef.current;\n\tlet shouldRenderChildrenWithTheme = state.hasEverThemed || themeState.isNew || isRoot || hasThemeUpdatingProps(props);\n\tif (process.env.NODE_ENV === \"development\" && props.debug === \"visualize\") children = /* @__PURE__ */ jsx(ThemeDebug, {\n\t\tthemeState,\n\t\tthemeProps: props,\n\t\tchildren\n\t});\n\tif (!shouldRenderChildrenWithTheme) return children;\n\tchildren = /* @__PURE__ */ jsx(ThemeStateContext.Provider, {\n\t\tvalue: themeState.id,\n\t\tchildren\n\t});\n\tconst { isInverse, name } = themeState;\n\tconst requiresExtraWrapper = isInverse || forceClassName;\n\tif (!state.hasEverThemed) state.hasEverThemed = true;\n\tif (requiresExtraWrapper || themeState.name === \"dark\" || themeState.name === \"light\") state.hasEverThemed = \"wrapped\";\n\tif (shallow) if (!themeState.parentId) {} else {\n\t\tconst parentState = getThemeState(themeState.isNew ? themeState.id : themeState.parentId);\n\t\tif (!parentState) throw new Error(formatDiagnostic(\"‼️010\", \"Theme\", \"parent theme state is missing for shallow rendering\", \"Keep <Theme shallow> inside its mounted parent Theme\", \"name,parentId\", {\n\t\t\tname: themeState.name,\n\t\t\tparentId: themeState.parentId\n\t\t}));\n\t\tchildren = Children.toArray(children).map((child) => {\n\t\t\treturn isValidElement(child) ? passThrough ? child : cloneElement(child, void 0, /* @__PURE__ */ jsx(Theme, {\n\t\t\t\tname: parentState.name,\n\t\t\t\tchildren: child.props.children\n\t\t\t})) : child;\n\t\t});\n\t}\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!passThrough && props.debug) console.warn(` getThemedChildren`, {\n\t\t\trequiresExtraWrapper,\n\t\t\tforceClassName,\n\t\t\tthemeState,\n\t\t\tstate,\n\t\t\tthemeSpanProps: getThemeClassNameAndColor(themeState, props, isRoot)\n\t\t});\n\t}\n\tif (forceClassName === false) return children;\n\tif (isWeb) {\n\t\tconst baseStyle = props.contain ? inertContainedStyle : inertStyle;\n\t\tconst { className = \"\", color } = passThrough ? {} : getThemeClassNameAndColor(themeState, props, isRoot);\n\t\tconst inlineClassName = passThrough ? void 0 : props.inlineClassName;\n\t\tchildren = /* @__PURE__ */ jsx(\"span\", {\n\t\t\tclassName: `${className} is_Theme${inlineClassName ? ` ${inlineClassName}` : \"\"}`,\n\t\t\tstyle: passThrough ? baseStyle : {\n\t\t\t\tcolor,\n\t\t\t\t...baseStyle\n\t\t\t},\n\t\t\tchildren\n\t\t});\n\t\tif (state.hasEverThemed === \"wrapped\") children = /* @__PURE__ */ jsx(\"span\", {\n\t\t\tclassName: requiresExtraWrapper ? `${name.startsWith(\"light\") ? \"t_light\" : name.startsWith(\"dark\") ? \"t_dark\" : \"\"} _dsp_contents` : `_dsp_contents`,\n\t\t\tchildren\n\t\t});\n\t\treturn children;\n\t}\n\treturn children;\n}\nconst inertStyle = { display: \"contents\" };\nconst inertContainedStyle = {\n\tdisplay: \"contents\",\n\tcontain: \"strict\"\n};\nconst empty = {\n\tclassName: \"\",\n\tcolor: void 0\n};\nfunction getThemeClassNameAndColor(themeState, props, isRoot = false) {\n\tif (!themeState.isNew && !props.forceClassName) return empty;\n\treturn {\n\t\tcolor: themeState?.theme && themeState.isNew ? variableToString(themeState.theme.color) : \"\",\n\t\tclassName: getThemeClassNames(themeState.name, isRoot)\n\t};\n}\n\nexport { Theme, getThemedChildren };"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAM,wBAAwB,QAAQ,MAAM,sBAAsB,kCAAkC,CAAC;AACrG,MAAM,QAAQ,mBAAmB,SAAS,OAAO,OAAO,KAAK;CAC5D;CACA,IAAI,MAAM,SAAS,OAAO,MAAM;CAChC,MAAM,EAAE,gBAAgB;CACxB,MAAM,S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,kBAAkB,cAAc,KAAK,IAAI,MAAM;EACrD,WAA2B,oBAAI,QAAQ;GACtC,WAAW,GAAG,UAAU,WAAW,kBAAkB,IAAI,oBAAoB;GAC7E,OAAO,cAAc,YAAY;IAChC;IACA,GAAG;GACJ;GACA;EACD,CAAC;EACD,IAAI,MAAM,kBAAkB,WAAW,WAA2B,oBAAI,QAAQ;GAC7E,WAAW,uBAAuB,GAAG,KAAK,WAAW,OAAO,IAAI,YAAY,KAAK,WAAW,MAAM,IAAI,WAAW,GAAG,kBAAkB;GACtI;EACD,CAAC;EACD,OAAO;CACR;CACA,OAAO;AACR;AACA,MAAM,aAAa,EAAE,SAAS,WAAW;AACzC,MAAM,sBAAsB;CAC3B,SAAS;CACT,SAAS;AACV;AACA,MAAM,QAAQ;CACb,WAAW;CACX,OAAO,KAAK;AACb;AACA,SAAS,0BAA0B,YAAY,OAAO,SAAS,OAAO;CACrE,IAAI,CAAC,WAAW,SAAS,CAAC,MAAM,gBAAgB,OAAO;CACvD,OAAO;EACN,OAAO,YAAY,SAAS,WAAW,QAAQ,iBAAiB,WAAW,MAAM,KAAK,IAAI;EAC1F,WAAW,mBAAmB,WAAW,MAAM,MAAM;CACtD;AACD"}
1
+ {"version":3,"file":"Theme.js","names":[],"sources":["esm/views/Theme.js"],"sourcesContent":["import { createRefComponent } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { getThemeClassNames, reservedThemeProps } from \"@tamagui/helpers\";\nimport React, { Children, cloneElement, isValidElement, useRef } from \"react\";\nimport { variableToString } from \"../createVariable\";\nimport { formatDiagnostic } from \"../helpers/formatDiagnostic\";\nimport { warnOnce } from \"../helpers/warnOnce\";\nimport { useThemeWithState } from \"../hooks/useTheme\";\nimport { ThemeStateContext, getThemeState, hasThemeUpdatingProps } from \"../hooks/useThemeState\";\nimport { ThemeDebug } from \"./ThemeDebug\";\nimport { jsx } from \"react/jsx-runtime\";\n\nconst Theme = createRefComponent(function Theme2(props, ref) {\n\t\"use no memo\";\n\tif (props.disable) return props.children;\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tfor (const key in props) if (!reservedThemeProps[key]) warnOnce(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);\n\t}\n\tconst { passThrough } = props;\n\tconst isRoot = !!props[\"_isRoot\"];\n\tconst [_, themeState] = useThemeWithState(props, isRoot, true);\n\tuseIsomorphicLayoutEffect(() => {}, [\n\t\tthemeState.id,\n\t\tthemeState.name,\n\t\tthemeState.theme\n\t]);\n\tlet finalChildren = props[\"disable-child-theme\"] ? Children.map(props.children, (child) => passThrough || !isValidElement(child) ? child : cloneElement(child, { [\"data-disable-theme\"]: true })) : props.children;\n\tif (ref) try {\n\t\tReact.Children.only(finalChildren);\n\t\tfinalChildren = cloneElement(finalChildren, { ref });\n\t} catch {}\n\tconst stateRef = useRef({ hasEverThemed: false });\n\treturn getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);\n});\nTheme[\"avoidForwardRef\"] = true;\nfunction getThemedChildren(themeState, children, props, isRoot = false, stateRef, passThrough = false) {\n\tconst { shallow, forceClassName } = props;\n\tconst state = stateRef.current;\n\tlet shouldRenderChildrenWithTheme = state.hasEverThemed || themeState.isNew || isRoot || hasThemeUpdatingProps(props);\n\tif (process.env.NODE_ENV === \"development\" && props.debug === \"visualize\") children = /* @__PURE__ */ jsx(ThemeDebug, {\n\t\tthemeState,\n\t\tthemeProps: props,\n\t\tchildren\n\t});\n\tif (!shouldRenderChildrenWithTheme) return children;\n\tchildren = /* @__PURE__ */ jsx(ThemeStateContext.Provider, {\n\t\tvalue: themeState.id,\n\t\tchildren\n\t});\n\tconst { isInverse, name } = themeState;\n\tconst requiresExtraWrapper = isInverse || forceClassName;\n\tif (!state.hasEverThemed) state.hasEverThemed = true;\n\tif (requiresExtraWrapper || themeState.name === \"dark\" || themeState.name === \"light\") state.hasEverThemed = \"wrapped\";\n\tif (shallow) if (!themeState.parentId) {} else {\n\t\tconst parentState = getThemeState(themeState.isNew ? themeState.id : themeState.parentId);\n\t\tif (!parentState) throw new Error(formatDiagnostic(\"‼️010\", \"Theme\", \"parent theme state is missing for shallow rendering\", \"Keep <Theme shallow> inside its mounted parent Theme\", \"name,parentId\", {\n\t\t\tname: themeState.name,\n\t\t\tparentId: themeState.parentId\n\t\t}));\n\t\tchildren = Children.toArray(children).map((child) => {\n\t\t\treturn isValidElement(child) ? passThrough ? child : cloneElement(child, void 0, /* @__PURE__ */ jsx(Theme, {\n\t\t\t\tname: parentState.name,\n\t\t\t\tchildren: child.props.children\n\t\t\t})) : child;\n\t\t});\n\t}\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!passThrough && props.debug) console.warn(` getThemedChildren`, {\n\t\t\trequiresExtraWrapper,\n\t\t\tforceClassName,\n\t\t\tthemeState,\n\t\t\tstate,\n\t\t\tthemeSpanProps: getThemeClassNameAndColor(themeState, props, isRoot)\n\t\t});\n\t}\n\tif (forceClassName === false) return children;\n\tif (isWeb) {\n\t\tconst baseStyle = props.contain ? inertContainedStyle : inertStyle;\n\t\tconst { className = \"\", color } = passThrough ? {} : getThemeClassNameAndColor(themeState, props, isRoot);\n\t\tconst inlineClassName = passThrough ? void 0 : props._themeUpdate?.className;\n\t\tchildren = /* @__PURE__ */ jsx(\"span\", {\n\t\t\tclassName: `${className} is_Theme${inlineClassName ? ` ${inlineClassName}` : \"\"}`,\n\t\t\tstyle: passThrough ? baseStyle : {\n\t\t\t\tcolor,\n\t\t\t\t...baseStyle\n\t\t\t},\n\t\t\tchildren\n\t\t});\n\t\tif (state.hasEverThemed === \"wrapped\") children = /* @__PURE__ */ jsx(\"span\", {\n\t\t\tclassName: requiresExtraWrapper ? `${name.startsWith(\"light\") ? \"t_light\" : name.startsWith(\"dark\") ? \"t_dark\" : \"\"} _dsp_contents` : `_dsp_contents`,\n\t\t\tchildren\n\t\t});\n\t\treturn children;\n\t}\n\treturn children;\n}\nconst inertStyle = { display: \"contents\" };\nconst inertContainedStyle = {\n\tdisplay: \"contents\",\n\tcontain: \"strict\"\n};\nconst empty = {\n\tclassName: \"\",\n\tcolor: void 0\n};\nfunction getThemeClassNameAndColor(themeState, props, isRoot = false) {\n\tif (!themeState.isNew && !props.forceClassName) return empty;\n\treturn {\n\t\tcolor: themeState?.theme && themeState.isNew ? variableToString(themeState.theme.color) : \"\",\n\t\tclassName: getThemeClassNames(themeState.name, isRoot)\n\t};\n}\n\nexport { Theme, getThemedChildren };"],"mappings":";;;;;;;;;;;;;AAYA,MAAM,QAAQ,mBAAmB,SAAS,OAAO,OAAO,KAAK;CAC5D;CACA,IAAI,MAAM,SAAS,OAAO,MAAM;CAChC,IAAI,QAAQ,IAAI,aAAa,eAAe;EAC3C,KAAK,MAAM,OAAO,OAAO,IAAI,CAAC,mBAAmB,MAAM,SAAS,gBAAgB,OAAO,UAAU,IAAI,0EAA0E,IAAI,eAAe;CACnM;CACA,MAAM,EAAE,gBAAgB;CACxB,MAAM,SAAS,CAAC,CAAC,MAAM;CACvB,MAAM,CAAC,GAAG,cAAc,kBAAkB,OAAO,QAAQ,IAAI;CAC7D,gCAAgC,CAAC,GAAG;EACnC,WAAW;EACX,WAAW;EACX,WAAW;CACZ,CAAC;CACD,IAAI,gBAAgB,MAAM,yBAAyB,SAAS,IAAI,MAAM,WAAW,UAAU,eAAe,CAAC,eAAe,KAAK,IAAI,QAAQ,aAAa,OAAO,GAAG,uBAAuB,KAAK,CAAC,CAAC,IAAI,MAAM;CAC1M,IAAI,KAAK,IAAI;EACZ,MAAM,SAAS,KAAK,aAAa;EACjC,gBAAgB,aAAa,eAAe,EAAE,IAAI,CAAC;CACpD,QAAQ,CAAC;CACT,MAAM,WAAW,OAAO,EAAE,eAAe,MAAM,CAAC;CAChD,OAAO,kBAAkB,YAAY,eAAe,OAAO,QAAQ,UAAU,WAAW;AACzF,CAAC;AACD,MAAM,qBAAqB;AAC3B,SAAS,kBAAkB,YA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OAAO,OAAO;CACrC,IAAI,OAAO;EACV,MAAM,YAAY,MAAM,UAAU,sBAAsB;EACxD,MAAM,EAAE,YAAY,IAAI,UAAU,cAAc,CAAC,IAAI,0BAA0B,YAAY,OAAO,MAAM;EACxG,MAAM,kBAAkB,cAAc,KAAK,IAAI,MAAM,cAAc;EACnE,WAA2B,oBAAI,QAAQ;GACtC,WAAW,GAAG,UAAU,WAAW,kBAAkB,IAAI,oBAAoB;GAC7E,OAAO,cAAc,YAAY;IAChC;IACA,GAAG;GACJ;GACA;EACD,CAAC;EACD,IAAI,MAAM,kBAAkB,WAAW,WAA2B,oBAAI,QAAQ;GAC7E,WAAW,uBAAuB,GAAG,KAAK,WAAW,OAAO,IAAI,YAAY,KAAK,WAAW,MAAM,IAAI,WAAW,GAAG,kBAAkB;GACtI;EACD,CAAC;EACD,OAAO;CACR;CACA,OAAO;AACR;AACA,MAAM,aAAa,EAAE,SAAS,WAAW;AACzC,MAAM,sBAAsB;CAC3B,SAAS;CACT,SAAS;AACV;AACA,MAAM,QAAQ;CACb,WAAW;CACX,OAAO,KAAK;AACb;AACA,SAAS,0BAA0B,YAAY,OAAO,SAAS,OAAO;CACrE,IAAI,CAAC,WAAW,SAAS,CAAC,MAAM,gBAAgB,OAAO;CACvD,OAAO;EACN,OAAO,YAAY,SAAS,WAAW,QAAQ,iBAAiB,WAAW,MAAM,KAAK,IAAI;EAC1F,WAAW,mBAAmB,WAAW,MAAM,MAAM;CACtD;AACD"}
@@ -1,36 +1,25 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { createRefComponent } from "@tamagui/compose-refs";
3
3
  import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
4
- import { getThemeClassNames } from "@tamagui/helpers";
4
+ import { getThemeClassNames, reservedThemeProps } from "@tamagui/helpers";
5
5
  import React, { Children, cloneElement, isValidElement, useRef } from "react";
6
- import { getConfig } from "../config.native.js";
7
6
  import { variableToString } from "../createVariable.native.js";
8
7
  import { formatDiagnostic } from "../helpers/formatDiagnostic.native.js";
9
- import { insertStyleRules } from "../helpers/insertStyleRule.native.js";
10
8
  import { removeNativeStyleScope, updateNativeStyleScope } from "../helpers/nativeStyleEngine.native.js";
11
- import { getInlineValuesFromProps } from "../helpers/variables.native.js";
9
+ import { warnOnce } from "../helpers/warnOnce.native.js";
12
10
  import { useThemeWithState } from "../hooks/useTheme.native.js";
13
11
  import { ThemeStateContext, getThemeState, hasThemeUpdatingProps } from "../hooks/useThemeState.native.js";
14
12
  import { ThemeDebug } from "./ThemeDebug.native.js";
15
13
 
16
- var useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : function() {};
17
14
  var Theme = createRefComponent(function Theme2(props, ref) {
18
15
  "use no memo";
19
16
  if (props.disable) return props.children;
17
+ if (process.env.NODE_ENV === "development") {
18
+ for (var key in props) if (!reservedThemeProps[key]) warnOnce(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);
19
+ }
20
20
  var { passThrough } = props;
21
21
  var isRoot = !!props["_isRoot"];
22
- var inlineValues = getInlineValuesFromProps(props, getConfig());
23
- var inlineCSS = null;
24
- var rulesToInsert = null;
25
- useInsertEffectCompat(function() {
26
- if (rulesToInsert) insertStyleRules(rulesToInsert);
27
- }, [inlineCSS === null || inlineCSS === void 0 ? void 0 : inlineCSS.identifier]);
28
- var themeProps = inlineValues ? {
29
- ...props,
30
- inlineValues,
31
- inlineClassName: inlineCSS === null || inlineCSS === void 0 ? void 0 : inlineCSS.identifier
32
- } : props;
33
- var [_, themeState] = useThemeWithState(themeProps, isRoot, true);
22
+ var [_, themeState] = useThemeWithState(props, isRoot, true);
34
23
  useIsomorphicLayoutEffect(function() {
35
24
  updateNativeStyleScope(themeState.id, themeState.name, themeState.theme);
36
25
  return function() {
@@ -49,7 +38,7 @@ var Theme = createRefComponent(function Theme2(props, ref) {
49
38
  finalChildren = /* @__PURE__ */ cloneElement(finalChildren, { ref });
50
39
  } catch (e) {}
51
40
  var stateRef = useRef({ hasEverThemed: false });
52
- return getThemedChildren(themeState, finalChildren, themeProps, isRoot, stateRef, passThrough);
41
+ return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);
53
42
  });
54
43
  Theme["avoidForwardRef"] = true;
55
44
  function getThemedChildren(themeState, children, props) {
@@ -95,9 +84,10 @@ function getThemedChildren(themeState, children, props) {
95
84
  }
96
85
  if (forceClassName === false) return children;
97
86
  if (isWeb) {
87
+ var _props__themeUpdate;
98
88
  var baseStyle = props.contain ? inertContainedStyle : inertStyle;
99
89
  var { className = "", color } = passThrough ? {} : getThemeClassNameAndColor(themeState, props, isRoot);
100
- var inlineClassName = passThrough ? void 0 : props.inlineClassName;
90
+ var inlineClassName = passThrough ? void 0 : (_props__themeUpdate = props._themeUpdate) === null || _props__themeUpdate === void 0 ? void 0 : _props__themeUpdate.className;
101
91
  children = /* @__PURE__ */ jsx("span", {
102
92
  className: `${className} is_Theme${inlineClassName ? ` ${inlineClassName}` : ""}`,
103
93
  style: passThrough ? baseStyle : {
@@ -1 +1 @@
1
- {"version":3,"file":"Theme.native.js","names":[],"sources":["esm/views/Theme.native.js"],"sourcesContent":["import { jsx } from \"react/jsx-runtime\";\nimport { createRefComponent } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { getThemeClassNames } from \"@tamagui/helpers\";\nimport React, { Children, cloneElement, isValidElement, useRef } from \"react\";\nimport { getConfig } from \"../config\";\nimport { variableToString } from \"../createVariable\";\nimport { formatDiagnostic } from \"../helpers/formatDiagnostic\";\nimport { insertStyleRules } from \"../helpers/insertStyleRule\";\nimport { removeNativeStyleScope, updateNativeStyleScope } from \"../helpers/nativeStyleEngine\";\nimport { getInlineValuesFromProps } from \"../helpers/variables\";\nimport { useThemeWithState } from \"../hooks/useTheme\";\nimport { ThemeStateContext, getThemeState, hasThemeUpdatingProps } from \"../hooks/useThemeState\";\nimport { ThemeDebug } from \"./ThemeDebug\";\n\nvar useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : function() {};\nvar Theme = createRefComponent(function Theme2(props, ref) {\n\t\"use no memo\";\n\tif (props.disable) return props.children;\n\tvar { passThrough } = props;\n\tvar isRoot = !!props[\"_isRoot\"];\n\tvar inlineValues = getInlineValuesFromProps(props, getConfig());\n\tvar inlineCSS = null;\n\tvar rulesToInsert = null;\n\tuseInsertEffectCompat(function() {\n\t\tif (rulesToInsert) insertStyleRules(rulesToInsert);\n\t}, [inlineCSS === null || inlineCSS === void 0 ? void 0 : inlineCSS.identifier]);\n\tvar themeProps = inlineValues ? {\n\t\t...props,\n\t\tinlineValues,\n\t\tinlineClassName: inlineCSS === null || inlineCSS === void 0 ? void 0 : inlineCSS.identifier\n\t} : props;\n\tvar [_, themeState] = useThemeWithState(themeProps, isRoot, true);\n\tuseIsomorphicLayoutEffect(function() {\n\t\tupdateNativeStyleScope(themeState.id, themeState.name, themeState.theme);\n\t\treturn function() {\n\t\t\treturn removeNativeStyleScope(themeState.id);\n\t\t};\n\t}, [\n\t\tthemeState.id,\n\t\tthemeState.name,\n\t\tthemeState.theme\n\t]);\n\tvar finalChildren = props[\"disable-child-theme\"] ? Children.map(props.children, function(child) {\n\t\treturn passThrough || !/* @__PURE__ */ isValidElement(child) ? child : /* @__PURE__ */ cloneElement(child, { [\"data-disable-theme\"]: true });\n\t}) : props.children;\n\tif (ref) try {\n\t\tReact.Children.only(finalChildren);\n\t\tfinalChildren = /* @__PURE__ */ cloneElement(finalChildren, { ref });\n\t} catch (e) {}\n\tvar stateRef = useRef({ hasEverThemed: false });\n\treturn getThemedChildren(themeState, finalChildren, themeProps, isRoot, stateRef, passThrough);\n});\nTheme[\"avoidForwardRef\"] = true;\nfunction getThemedChildren(themeState, children, props) {\n\tvar isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, stateRef = arguments.length > 4 ? arguments[4] : void 0, passThrough = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;\n\tvar { shallow, forceClassName } = props;\n\tvar state = stateRef.current;\n\tvar shouldRenderChildrenWithTheme = state.hasEverThemed || themeState.isNew || isRoot || hasThemeUpdatingProps(props);\n\tif (process.env.NODE_ENV === \"development\" && props.debug === \"visualize\") children = /* @__PURE__ */ jsx(ThemeDebug, {\n\t\tthemeState,\n\t\tthemeProps: props,\n\t\tchildren\n\t});\n\tif (!shouldRenderChildrenWithTheme) return children;\n\tchildren = /* @__PURE__ */ jsx(ThemeStateContext.Provider, {\n\t\tvalue: themeState.id,\n\t\tchildren\n\t});\n\tvar { isInverse, name } = themeState;\n\tvar requiresExtraWrapper = isInverse || forceClassName;\n\tif (!state.hasEverThemed) state.hasEverThemed = true;\n\tif (requiresExtraWrapper || themeState.name === \"dark\" || themeState.name === \"light\") state.hasEverThemed = \"wrapped\";\n\tif (shallow) if (!themeState.parentId) {} else {\n\t\tvar parentState = getThemeState(themeState.isNew ? themeState.id : themeState.parentId);\n\t\tif (!parentState) throw new Error(formatDiagnostic(\"‼️010\", \"Theme\", \"parent theme state is missing for shallow rendering\", \"Keep <Theme shallow> inside its mounted parent Theme\", \"name,parentId\", {\n\t\t\tname: themeState.name,\n\t\t\tparentId: themeState.parentId\n\t\t}));\n\t\tchildren = Children.toArray(children).map(function(child) {\n\t\t\treturn /* @__PURE__ */ isValidElement(child) ? passThrough ? child : /* @__PURE__ */ cloneElement(child, void 0, /* @__PURE__ */ jsx(Theme, {\n\t\t\t\tname: parentState.name,\n\t\t\t\tchildren: child.props.children\n\t\t\t})) : child;\n\t\t});\n\t}\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!passThrough && props.debug) console.warn(` getThemedChildren`, {\n\t\t\trequiresExtraWrapper,\n\t\t\tforceClassName,\n\t\t\tthemeState,\n\t\t\tstate,\n\t\t\tthemeSpanProps: getThemeClassNameAndColor(themeState, props, isRoot)\n\t\t});\n\t}\n\tif (forceClassName === false) return children;\n\tif (isWeb) {\n\t\tvar baseStyle = props.contain ? inertContainedStyle : inertStyle;\n\t\tvar { className = \"\", color } = passThrough ? {} : getThemeClassNameAndColor(themeState, props, isRoot);\n\t\tvar inlineClassName = passThrough ? void 0 : props.inlineClassName;\n\t\tchildren = /* @__PURE__ */ jsx(\"span\", {\n\t\t\tclassName: `${className} is_Theme${inlineClassName ? ` ${inlineClassName}` : \"\"}`,\n\t\t\tstyle: passThrough ? baseStyle : {\n\t\t\t\tcolor,\n\t\t\t\t...baseStyle\n\t\t\t},\n\t\t\tchildren\n\t\t});\n\t\tif (state.hasEverThemed === \"wrapped\") children = /* @__PURE__ */ jsx(\"span\", {\n\t\t\tclassName: requiresExtraWrapper ? `${name.startsWith(\"light\") ? \"t_light\" : name.startsWith(\"dark\") ? \"t_dark\" : \"\"} _dsp_contents` : `_dsp_contents`,\n\t\t\tchildren\n\t\t});\n\t\treturn children;\n\t}\n\treturn children;\n}\nvar inertStyle = { display: \"contents\" };\nvar inertContainedStyle = {\n\tdisplay: \"contents\",\n\tcontain: \"strict\"\n};\nvar empty = {\n\tclassName: \"\",\n\tcolor: void 0\n};\nfunction getThemeClassNameAndColor(themeState, props) {\n\tvar isRoot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n\tif (!themeState.isNew && !props.forceClassName) return empty;\n\treturn {\n\t\tcolor: (themeState === null || themeState === void 0 ? void 0 : themeState.theme) && themeState.isNew ? variableToString(themeState.theme.color) : \"\",\n\t\tclassName: getThemeClassNames(themeState.name, isRoot)\n\t};\n}\n\nexport { Theme, getThemedChildren };"],"mappings":";;;;;;;;;;;;;;;;AAeA,IAAI,wBAAwB,QAAQ,MAAM,sBAAsB,4BAA4B,WAAW,CAAC;AACxG,IAAI,QAAQ,mBAAmB,SAAS,OAAO,OAAO,KAAK;CAC1D;CACA,IAAI,MAAM,SAAS,OAAO,MAAM;CAChC,IAAI,EAAE,gBAAgB;CACtB,IAAI,SAAS,CAAC,CAAC,MAAM;CACrB,IAAI,eAAe,y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AAY,MAAM,UAAU,sBAAsB;EACtD,IAAI,EAAE,YAAY,IAAI,UAAU,cAAc,CAAC,IAAI,0BAA0B,YAAY,OAAO,MAAM;EACtG,IAAI,kBAAkB,cAAc,KAAK,IAAI,MAAM;EACnD,WAA2B,oBAAI,QAAQ;GACtC,WAAW,GAAG,UAAU,WAAW,kBAAkB,IAAI,oBAAoB;GAC7E,OAAO,cAAc,YAAY;IAChC;IACA,GAAG;GACJ;GACA;EACD,CAAC;EACD,IAAI,MAAM,kBAAkB,WAAW,WAA2B,oBAAI,QAAQ;GAC7E,WAAW,uBAAuB,GAAG,KAAK,WAAW,OAAO,IAAI,YAAY,KAAK,WAAW,MAAM,IAAI,WAAW,GAAG,kBAAkB;GACtI;EACD,CAAC;EACD,OAAO;CACR;CACA,OAAO;AACR;AACA,IAAI,aAAa,EAAE,SAAS,WAAW;AACvC,IAAI,sBAAsB;CACzB,SAAS;CACT,SAAS;AACV;AACA,IAAI,QAAQ;CACX,WAAW;CACX,OAAO,KAAK;AACb;AACA,SAAS,0BAA0B,YAAY,OAAO;CACrD,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAC9E,IAAI,CAAC,WAAW,SAAS,CAAC,MAAM,gBAAgB,OAAO;CACvD,OAAO;EACN,QAAQ,eAAe,QAAQ,eAAe,KAAK,IAAI,KAAK,IAAI,WAAW,UAAU,WAAW,QAAQ,iBAAiB,WAAW,MAAM,KAAK,IAAI;EACnJ,WAAW,mBAAmB,WAAW,MAAM,MAAM;CACtD;AACD"}
1
+ {"version":3,"file":"Theme.native.js","names":[],"sources":["esm/views/Theme.native.js"],"sourcesContent":["import { jsx } from \"react/jsx-runtime\";\nimport { createRefComponent } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { getThemeClassNames, reservedThemeProps } from \"@tamagui/helpers\";\nimport React, { Children, cloneElement, isValidElement, useRef } from \"react\";\nimport { variableToString } from \"../createVariable\";\nimport { formatDiagnostic } from \"../helpers/formatDiagnostic\";\nimport { removeNativeStyleScope, updateNativeStyleScope } from \"../helpers/nativeStyleEngine\";\nimport { warnOnce } from \"../helpers/warnOnce\";\nimport { useThemeWithState } from \"../hooks/useTheme\";\nimport { ThemeStateContext, getThemeState, hasThemeUpdatingProps } from \"../hooks/useThemeState\";\nimport { ThemeDebug } from \"./ThemeDebug\";\n\nvar Theme = createRefComponent(function Theme2(props, ref) {\n\t\"use no memo\";\n\tif (props.disable) return props.children;\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tfor (var key in props) if (!reservedThemeProps[key]) warnOnce(`theme-update:${key}`, `<Theme ${key}=...> no longer accepts inline values. Wrap the subtree in <ThemeUpdate ${key}=...> instead.`);\n\t}\n\tvar { passThrough } = props;\n\tvar isRoot = !!props[\"_isRoot\"];\n\tvar [_, themeState] = useThemeWithState(props, isRoot, true);\n\tuseIsomorphicLayoutEffect(function() {\n\t\tupdateNativeStyleScope(themeState.id, themeState.name, themeState.theme);\n\t\treturn function() {\n\t\t\treturn removeNativeStyleScope(themeState.id);\n\t\t};\n\t}, [\n\t\tthemeState.id,\n\t\tthemeState.name,\n\t\tthemeState.theme\n\t]);\n\tvar finalChildren = props[\"disable-child-theme\"] ? Children.map(props.children, function(child) {\n\t\treturn passThrough || !/* @__PURE__ */ isValidElement(child) ? child : /* @__PURE__ */ cloneElement(child, { [\"data-disable-theme\"]: true });\n\t}) : props.children;\n\tif (ref) try {\n\t\tReact.Children.only(finalChildren);\n\t\tfinalChildren = /* @__PURE__ */ cloneElement(finalChildren, { ref });\n\t} catch (e) {}\n\tvar stateRef = useRef({ hasEverThemed: false });\n\treturn getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);\n});\nTheme[\"avoidForwardRef\"] = true;\nfunction getThemedChildren(themeState, children, props) {\n\tvar isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, stateRef = arguments.length > 4 ? arguments[4] : void 0, passThrough = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;\n\tvar { shallow, forceClassName } = props;\n\tvar state = stateRef.current;\n\tvar shouldRenderChildrenWithTheme = state.hasEverThemed || themeState.isNew || isRoot || hasThemeUpdatingProps(props);\n\tif (process.env.NODE_ENV === \"development\" && props.debug === \"visualize\") children = /* @__PURE__ */ jsx(ThemeDebug, {\n\t\tthemeState,\n\t\tthemeProps: props,\n\t\tchildren\n\t});\n\tif (!shouldRenderChildrenWithTheme) return children;\n\tchildren = /* @__PURE__ */ jsx(ThemeStateContext.Provider, {\n\t\tvalue: themeState.id,\n\t\tchildren\n\t});\n\tvar { isInverse, name } = themeState;\n\tvar requiresExtraWrapper = isInverse || forceClassName;\n\tif (!state.hasEverThemed) state.hasEverThemed = true;\n\tif (requiresExtraWrapper || themeState.name === \"dark\" || themeState.name === \"light\") state.hasEverThemed = \"wrapped\";\n\tif (shallow) if (!themeState.parentId) {} else {\n\t\tvar parentState = getThemeState(themeState.isNew ? themeState.id : themeState.parentId);\n\t\tif (!parentState) throw new Error(formatDiagnostic(\"‼️010\", \"Theme\", \"parent theme state is missing for shallow rendering\", \"Keep <Theme shallow> inside its mounted parent Theme\", \"name,parentId\", {\n\t\t\tname: themeState.name,\n\t\t\tparentId: themeState.parentId\n\t\t}));\n\t\tchildren = Children.toArray(children).map(function(child) {\n\t\t\treturn /* @__PURE__ */ isValidElement(child) ? passThrough ? child : /* @__PURE__ */ cloneElement(child, void 0, /* @__PURE__ */ jsx(Theme, {\n\t\t\t\tname: parentState.name,\n\t\t\t\tchildren: child.props.children\n\t\t\t})) : child;\n\t\t});\n\t}\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!passThrough && props.debug) console.warn(` getThemedChildren`, {\n\t\t\trequiresExtraWrapper,\n\t\t\tforceClassName,\n\t\t\tthemeState,\n\t\t\tstate,\n\t\t\tthemeSpanProps: getThemeClassNameAndColor(themeState, props, isRoot)\n\t\t});\n\t}\n\tif (forceClassName === false) return children;\n\tif (isWeb) {\n\t\tvar _props__themeUpdate;\n\t\tvar baseStyle = props.contain ? inertContainedStyle : inertStyle;\n\t\tvar { className = \"\", color } = passThrough ? {} : getThemeClassNameAndColor(themeState, props, isRoot);\n\t\tvar inlineClassName = passThrough ? void 0 : (_props__themeUpdate = props._themeUpdate) === null || _props__themeUpdate === void 0 ? void 0 : _props__themeUpdate.className;\n\t\tchildren = /* @__PURE__ */ jsx(\"span\", {\n\t\t\tclassName: `${className} is_Theme${inlineClassName ? ` ${inlineClassName}` : \"\"}`,\n\t\t\tstyle: passThrough ? baseStyle : {\n\t\t\t\tcolor,\n\t\t\t\t...baseStyle\n\t\t\t},\n\t\t\tchildren\n\t\t});\n\t\tif (state.hasEverThemed === \"wrapped\") children = /* @__PURE__ */ jsx(\"span\", {\n\t\t\tclassName: requiresExtraWrapper ? `${name.startsWith(\"light\") ? \"t_light\" : name.startsWith(\"dark\") ? \"t_dark\" : \"\"} _dsp_contents` : `_dsp_contents`,\n\t\t\tchildren\n\t\t});\n\t\treturn children;\n\t}\n\treturn children;\n}\nvar inertStyle = { display: \"contents\" };\nvar inertContainedStyle = {\n\tdisplay: \"contents\",\n\tcontain: \"strict\"\n};\nvar empty = {\n\tclassName: \"\",\n\tcolor: void 0\n};\nfunction getThemeClassNameAndColor(themeState, props) {\n\tvar isRoot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n\tif (!themeState.isNew && !props.forceClassName) return empty;\n\treturn {\n\t\tcolor: (themeState === null || themeState === void 0 ? void 0 : themeState.theme) && themeState.isNew ? variableToString(themeState.theme.color) : \"\",\n\t\tclassName: getThemeClassNames(themeState.name, isRoot)\n\t};\n}\n\nexport { Theme, getThemedChildren };"],"mappings":";;;;;;;;;;;;;;AAaA,IAAI,QAAQ,mBAAmB,SAAS,OAAO,OAAO,KAAK;CAC1D;CACA,IAAI,MAAM,SAAS,OAAO,MAAM;CAChC,IAAI,QAAQ,IAAI,aAAa,eAAe;EAC3C,KAAK,IAAI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,KAAK,sBAAsB,MAAM,kBAAkB,QAAQ,wBAAwB,KAAK,IAAI,KAAK,IAAI,oBAAoB;EAClK,WAA2B,oBAAI,QAAQ;GACtC,WAAW,GAAG,UAAU,WAAW,kBAAkB,IAAI,oBAAoB;GAC7E,OAAO,cAAc,YAAY;IAChC;IACA,GAAG;GACJ;GACA;EACD,CAAC;EACD,IAAI,MAAM,kBAAkB,WAAW,WAA2B,oBAAI,QAAQ;GAC7E,WAAW,uBAAuB,GAAG,KAAK,WAAW,OAAO,IAAI,YAAY,KAAK,WAAW,MAAM,IAAI,WAAW,GAAG,kBAAkB;GACtI;EACD,CAAC;EACD,OAAO;CACR;CACA,OAAO;AACR;AACA,IAAI,aAAa,EAAE,SAAS,WAAW;AACvC,IAAI,sBAAsB;CACzB,SAAS;CACT,SAAS;AACV;AACA,IAAI,QAAQ;CACX,WAAW;CACX,OAAO,KAAK;AACb;AACA,SAAS,0BAA0B,YAAY,OAAO;CACrD,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK;CAC9E,IAAI,CAAC,WAAW,SAAS,CAAC,MAAM,gBAAgB,OAAO;CACvD,OAAO;EACN,QAAQ,eAAe,QAAQ,eAAe,KAAK,IAAI,KAAK,IAAI,WAAW,UAAU,WAAW,QAAQ,iBAAiB,WAAW,MAAM,KAAK,IAAI;EACnJ,WAAW,mBAAmB,WAAW,MAAM,MAAM;CACtD;AACD"}
@@ -0,0 +1,54 @@
1
+ import { createRefComponent } from "@tamagui/compose-refs";
2
+ import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
3
+ import React from "react";
4
+ import { getConfig } from "../config.mjs";
5
+ import { insertStyleRules, shouldInsertStyleRules, updateRules } from "../helpers/insertStyleRule.mjs";
6
+ import { getInlineValuesFromProps, getInlineValuesKey, getMergedInlineTheme, getVariablesCSSRules } from "../helpers/variables.mjs";
7
+ import { Theme } from "./Theme.mjs";
8
+ import { jsx } from "react/jsx-runtime";
9
+
10
+ const useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : () => {};
11
+ const updateStates = /* @__PURE__ */ new WeakMap();
12
+ function createThemeUpdateState(values, className) {
13
+ const cached = updateStates.get(values);
14
+ if (cached) return cached;
15
+ const state = {
16
+ key: getInlineValuesKey(values),
17
+ className,
18
+ values,
19
+ getTheme(parentTheme, themeName, config) {
20
+ return getMergedInlineTheme(parentTheme, values, themeName, config);
21
+ }
22
+ };
23
+ updateStates.set(values, state);
24
+ return state;
25
+ }
26
+ const ThemeUpdate = createRefComponent(function ThemeUpdate2(props, ref) {
27
+ "use no memo";
28
+ const config = getConfig();
29
+ const values = getInlineValuesFromProps(props, config);
30
+ const css = !values ? null : getVariablesCSSRules(values, config);
31
+ let rulesToInsert = null;
32
+ if (css && shouldInsertStyleRules(css.identifier)) {
33
+ updateRules(css.identifier, css.rules);
34
+ rulesToInsert = { [css.identifier]: [
35
+ "variables",
36
+ "",
37
+ css.identifier,
38
+ void 0,
39
+ css.rules
40
+ ] };
41
+ }
42
+ useInsertEffectCompat(() => {
43
+ if (rulesToInsert) insertStyleRules(rulesToInsert);
44
+ }, [css?.identifier]);
45
+ if (!values) return props.children;
46
+ return /* @__PURE__ */ jsx(Theme, {
47
+ ref,
48
+ _themeUpdate: createThemeUpdateState(values, css?.identifier),
49
+ children: props.children
50
+ });
51
+ });
52
+
53
+ export { ThemeUpdate, createThemeUpdateState };
54
+ //# sourceMappingURL=ThemeUpdate.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeUpdate.js","names":[],"sources":["esm/views/ThemeUpdate.js"],"sourcesContent":["import { createRefComponent } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getConfig } from \"../config\";\nimport { insertStyleRules, shouldInsertStyleRules, updateRules } from \"../helpers/insertStyleRule\";\nimport { getInlineValuesFromProps, getInlineValuesKey, getMergedInlineTheme, getVariablesCSSRules } from \"../helpers/variables\";\nimport { Theme } from \"./Theme\";\nimport { jsx } from \"react/jsx-runtime\";\n\nconst useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : () => {};\nconst updateStates = /* @__PURE__ */ new WeakMap();\nfunction createThemeUpdateState(values, className) {\n\tconst cached = updateStates.get(values);\n\tif (cached) return cached;\n\tconst state = {\n\t\tkey: getInlineValuesKey(values),\n\t\tclassName,\n\t\tvalues,\n\t\tgetTheme(parentTheme, themeName, config) {\n\t\t\treturn getMergedInlineTheme(parentTheme, values, themeName, config);\n\t\t}\n\t};\n\tupdateStates.set(values, state);\n\treturn state;\n}\nconst ThemeUpdate = createRefComponent(function ThemeUpdate2(props, ref) {\n\t\"use no memo\";\n\tconst config = getConfig();\n\tconst values = getInlineValuesFromProps(props, config);\n\tconst css = !values ? null : getVariablesCSSRules(values, config);\n\tlet rulesToInsert = null;\n\tif (css && shouldInsertStyleRules(css.identifier)) {\n\t\tupdateRules(css.identifier, css.rules);\n\t\trulesToInsert = { [css.identifier]: [\n\t\t\t\"variables\",\n\t\t\t\"\",\n\t\t\tcss.identifier,\n\t\t\tvoid 0,\n\t\t\tcss.rules\n\t\t] };\n\t}\n\tuseInsertEffectCompat(() => {\n\t\tif (rulesToInsert) insertStyleRules(rulesToInsert);\n\t}, [css?.identifier]);\n\tif (!values) return props.children;\n\treturn /* @__PURE__ */ jsx(Theme, {\n\t\tref,\n\t\t_themeUpdate: createThemeUpdateState(values, css?.identifier),\n\t\tchildren: props.children\n\t});\n});\n\nexport { ThemeUpdate, createThemeUpdateState };"],"mappings":";;;;;;;;;;AASA,MAAM,wBAAwB,QAAQ,MAAM,sBAAsB,kCAAkC,CAAC;AACrG,MAAM,+BAA+B,IAAI,QAAQ;AACjD,SAAS,uBAAuB,QAAQ,WAAW;CAClD,MAAM,SAAS,aAAa,IAAI,MAAM;CACtC,IAAI,QAAQ,OAAO;CACnB,MAAM,QAAQ;EACb,KAAK,mBAAmB,MAAM;EAC9B;EACA;EACA,SAAS,aAAa,WAAW,QAAQ;GACxC,OAAO,qBAAqB,aAAa,QAAQ,WAAW,MAAM;EACnE;CACD;CACA,aAAa,IAAI,QAAQ,KAAK;CAC9B,OAAO;AACR;AACA,MAAM,cAAc,mBAAmB,SAAS,aAAa,OAAO,KAAK;CACxE;CACA,MAAM,SAAS,UAAU;CACzB,MAAM,SAAS,yBAAyB,OAAO,MAAM;CACrD,MAAM,MAAM,CAAC,SAAS,OAAO,qBAAqB,QAAQ,MAAM;CAChE,IAAI,gBAAgB;CACpB,IAAI,OAAO,uBAAuB,IAAI,UAAU,GAAG;EAClD,YAAY,IAAI,YAAY,IAAI,KAAK;EACrC,gBAAgB,GAAG,IAAI,aAAa;GACnC;GACA;GACA,IAAI;GACJ,KAAK;GACL,IAAI;EACL,EAAE;CACH;CACA,4BAA4B;EAC3B,IAAI,eAAe,iBAAiB,aAAa;CAClD,GAAG,CAAC,KAAK,UAAU,CAAC;CACpB,IAAI,CAAC,QAAQ,OAAO,MAAM;CAC1B,OAAuB,oBAAI,OAAO;EACjC;EACA,cAAc,uBAAuB,QAAQ,KAAK,UAAU;EAC5D,UAAU,MAAM;CACjB,CAAC;AACF,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { createRefComponent } from "@tamagui/compose-refs";
3
+ import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
4
+ import React from "react";
5
+ import { getConfig } from "../config.native.js";
6
+ import { insertStyleRules, shouldInsertStyleRules, updateRules } from "../helpers/insertStyleRule.native.js";
7
+ import { getInlineValuesFromProps, getInlineValuesKey, getMergedInlineTheme } from "../helpers/variables.native.js";
8
+ import { Theme } from "./Theme.native.js";
9
+
10
+ var useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : function() {};
11
+ var updateStates = /* @__PURE__ */ new WeakMap();
12
+ function createThemeUpdateState(values, className) {
13
+ var cached = updateStates.get(values);
14
+ if (cached) return cached;
15
+ var state = {
16
+ key: getInlineValuesKey(values),
17
+ className,
18
+ values,
19
+ getTheme(parentTheme, themeName, config) {
20
+ return getMergedInlineTheme(parentTheme, values, themeName, config);
21
+ }
22
+ };
23
+ updateStates.set(values, state);
24
+ return state;
25
+ }
26
+ var ThemeUpdate = createRefComponent(function ThemeUpdate2(props, ref) {
27
+ "use no memo";
28
+ var values = getInlineValuesFromProps(props, getConfig());
29
+ var css = null;
30
+ var rulesToInsert = null;
31
+ if (css && shouldInsertStyleRules(css.identifier)) {
32
+ updateRules(css.identifier, css.rules);
33
+ rulesToInsert = { [css.identifier]: [
34
+ "variables",
35
+ "",
36
+ css.identifier,
37
+ void 0,
38
+ css.rules
39
+ ] };
40
+ }
41
+ useInsertEffectCompat(function() {
42
+ if (rulesToInsert) insertStyleRules(rulesToInsert);
43
+ }, [css === null || css === void 0 ? void 0 : css.identifier]);
44
+ if (!values) return props.children;
45
+ return /* @__PURE__ */ jsx(Theme, {
46
+ ref,
47
+ _themeUpdate: createThemeUpdateState(values, css === null || css === void 0 ? void 0 : css.identifier),
48
+ children: props.children
49
+ });
50
+ });
51
+
52
+ export { ThemeUpdate, createThemeUpdateState };
53
+ //# sourceMappingURL=ThemeUpdate.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeUpdate.native.js","names":[],"sources":["esm/views/ThemeUpdate.native.js"],"sourcesContent":["import { jsx } from \"react/jsx-runtime\";\nimport { createRefComponent } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport React from \"react\";\nimport { getConfig } from \"../config\";\nimport { insertStyleRules, shouldInsertStyleRules, updateRules } from \"../helpers/insertStyleRule\";\nimport { getInlineValuesFromProps, getInlineValuesKey, getMergedInlineTheme } from \"../helpers/variables\";\nimport { Theme } from \"./Theme\";\n\nvar useInsertEffectCompat = isWeb ? React.useInsertionEffect || useIsomorphicLayoutEffect : function() {};\nvar updateStates = /* @__PURE__ */ new WeakMap();\nfunction createThemeUpdateState(values, className) {\n\tvar cached = updateStates.get(values);\n\tif (cached) return cached;\n\tvar state = {\n\t\tkey: getInlineValuesKey(values),\n\t\tclassName,\n\t\tvalues,\n\t\tgetTheme(parentTheme, themeName, config) {\n\t\t\treturn getMergedInlineTheme(parentTheme, values, themeName, config);\n\t\t}\n\t};\n\tupdateStates.set(values, state);\n\treturn state;\n}\nvar ThemeUpdate = createRefComponent(function ThemeUpdate2(props, ref) {\n\t\"use no memo\";\n\tvar values = getInlineValuesFromProps(props, getConfig());\n\tvar css = null;\n\tvar rulesToInsert = null;\n\tif (css && shouldInsertStyleRules(css.identifier)) {\n\t\tupdateRules(css.identifier, css.rules);\n\t\trulesToInsert = { [css.identifier]: [\n\t\t\t\"variables\",\n\t\t\t\"\",\n\t\t\tcss.identifier,\n\t\t\tvoid 0,\n\t\t\tcss.rules\n\t\t] };\n\t}\n\tuseInsertEffectCompat(function() {\n\t\tif (rulesToInsert) insertStyleRules(rulesToInsert);\n\t}, [css === null || css === void 0 ? void 0 : css.identifier]);\n\tif (!values) return props.children;\n\treturn /* @__PURE__ */ jsx(Theme, {\n\t\tref,\n\t\t_themeUpdate: createThemeUpdateState(values, css === null || css === void 0 ? void 0 : css.identifier),\n\t\tchildren: props.children\n\t});\n});\n\nexport { ThemeUpdate, createThemeUpdateState };"],"mappings":";;;;;;;;;;AASA,IAAI,wBAAwB,QAAQ,MAAM,sBAAsB,4BAA4B,WAAW,CAAC;AACxG,IAAI,+BAA+B,IAAI,QAAQ;AAC/C,SAAS,uBAAuB,QAAQ,WAAW;CAClD,IAAI,SAAS,aAAa,IAAI,MAAM;CACpC,IAAI,QAAQ,OAAO;CACnB,IAAI,QAAQ;EACX,KAAK,mBAAmB,MAAM;EAC9B;EACA;EACA,SAAS,aAAa,WAAW,QAAQ;GACxC,OAAO,qBAAqB,aAAa,QAAQ,WAAW,MAAM;EACnE;CACD;CACA,aAAa,IAAI,QAAQ,KAAK;CAC9B,OAAO;AACR;AACA,IAAI,cAAc,mBAAmB,SAAS,aAAa,OAAO,KAAK;CACtE;CACA,IAAI,SAAS,yBAAyB,OAAO,UAAU,CAAC;CACxD,IAAI,MAAM;CACV,IAAI,gBAAgB;CACpB,IAAI,OAAO,uBAAuB,IAAI,UAAU,GAAG;EAClD,YAAY,IAAI,YAAY,IAAI,KAAK;EACrC,gBAAgB,GAAG,IAAI,aAAa;GACnC;GACA;GACA,IAAI;GACJ,KAAK;GACL,IAAI;EACL,EAAE;CACH;CACA,sBAAsB,WAAW;EAChC,IAAI,eAAe,iBAAiB,aAAa;CAClD,GAAG,CAAC,QAAQ,QAAQ,QAAQ,KAAK,IAAI,KAAK,IAAI,IAAI,UAAU,CAAC;CAC7D,IAAI,CAAC,QAAQ,OAAO,MAAM;CAC1B,OAAuB,oBAAI,OAAO;EACjC;EACA,cAAc,uBAAuB,QAAQ,QAAQ,QAAQ,QAAQ,KAAK,IAAI,KAAK,IAAI,IAAI,UAAU;EACrG,UAAU,MAAM;CACjB,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/web",
3
- "version": "3.0.0-beta.661.1",
3
+ "version": "3.0.0-beta.719.1",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Nate Wienert"
@@ -39,6 +39,15 @@
39
39
  "require": "./dist/cjs/index.cjs",
40
40
  "default": "./dist/esm/index.mjs"
41
41
  },
42
+ "./theme-update": {
43
+ "types": "./types/theme-update.d.ts",
44
+ "react-native": "./dist/esm/theme-update.native.js",
45
+ "browser": "./dist/esm/theme-update.mjs",
46
+ "module": "./dist/esm/theme-update.mjs",
47
+ "import": "./dist/esm/theme-update.mjs",
48
+ "require": "./dist/cjs/theme-update.cjs",
49
+ "default": "./dist/esm/theme-update.mjs"
50
+ },
42
51
  "./dom": {
43
52
  "react-native": {
44
53
  "types": "./types/dom/index.native.d.ts",
@@ -81,26 +90,26 @@
81
90
  "test:web": "vitest --typecheck --run"
82
91
  },
83
92
  "dependencies": {
84
- "@tamagui/compose-refs": "3.0.0-beta.661.1",
85
- "@tamagui/constants": "3.0.0-beta.661.1",
86
- "@tamagui/dom": "3.0.0-beta.661.1",
87
- "@tamagui/helpers": "3.0.0-beta.661.1",
88
- "@tamagui/is-equal-shallow": "3.0.0-beta.661.1",
89
- "@tamagui/native": "3.0.0-beta.661.1",
90
- "@tamagui/normalize-css-color": "3.0.0-beta.661.1",
91
- "@tamagui/style-grammar": "3.0.0-beta.661.1",
92
- "@tamagui/timer": "3.0.0-beta.661.1",
93
- "@tamagui/types": "3.0.0-beta.661.1",
94
- "@tamagui/use-did-finish-ssr": "3.0.0-beta.661.1",
95
- "@tamagui/use-event": "3.0.0-beta.661.1",
96
- "@tamagui/use-force-update": "3.0.0-beta.661.1"
93
+ "@tamagui/compose-refs": "3.0.0-beta.719.1",
94
+ "@tamagui/constants": "3.0.0-beta.719.1",
95
+ "@tamagui/dom": "3.0.0-beta.719.1",
96
+ "@tamagui/helpers": "3.0.0-beta.719.1",
97
+ "@tamagui/is-equal-shallow": "3.0.0-beta.719.1",
98
+ "@tamagui/native": "3.0.0-beta.719.1",
99
+ "@tamagui/normalize-css-color": "3.0.0-beta.719.1",
100
+ "@tamagui/style-grammar": "3.0.0-beta.719.1",
101
+ "@tamagui/timer": "3.0.0-beta.719.1",
102
+ "@tamagui/types": "3.0.0-beta.719.1",
103
+ "@tamagui/use-did-finish-ssr": "3.0.0-beta.719.1",
104
+ "@tamagui/use-event": "3.0.0-beta.719.1",
105
+ "@tamagui/use-force-update": "3.0.0-beta.719.1"
97
106
  },
98
107
  "devDependencies": {
99
- "@tamagui/build": "3.0.0-beta.661.1",
108
+ "@tamagui/build": "3.0.0-beta.719.1",
100
109
  "@testing-library/react": "^16.1.0",
101
110
  "csstype": "^3.0.10",
102
- "react": ">=19",
103
- "react-dom": "*",
111
+ "react": "19.2.3",
112
+ "react-dom": "19.2.3",
104
113
  "react-native": "0.86.2",
105
114
  "typescript": "~6.0.3",
106
115
  "vitest": "4.0.4"
package/src/config.ts CHANGED
@@ -10,6 +10,7 @@ import type {
10
10
  TokensParsed,
11
11
  } from './types'
12
12
  import { formatDiagnostic } from './helpers/formatDiagnostic'
13
+ import { prepareConfigRevision } from './helpers/grammarConfig'
13
14
 
14
15
  export type StyleCompat = 'legacy' | 'react-native' | 'web'
15
16
 
@@ -84,6 +85,10 @@ export function getStyleCompat(): StyleCompat {
84
85
 
85
86
  export const setConfig = (next: TamaguiInternalConfig) => {
86
87
  setConfigCalledByThisInstance = true
88
+ const previous = conf
89
+ const previousGlobal = globalThis.__tamaguiConfig
90
+ prepareConfigRevision(next)
91
+ if (conf !== previous || globalThis.__tamaguiConfig !== previousGlobal) return
87
92
  conf = next
88
93
  globalThis.__tamaguiConfig = next
89
94
  }
@@ -95,6 +100,7 @@ export const setConfigFont = (name: string, font: any, fontParsed: any) => {
95
100
  }
96
101
  config!.fonts[name] = font
97
102
  config!.fontsParsed[name] = fontParsed
103
+ prepareConfigRevision(config!)
98
104
  }
99
105
 
100
106
  export const getConfig = () => {
@@ -167,6 +173,7 @@ export const updateConfig = (key: string, value: any) => {
167
173
  return
168
174
  }
169
175
  Object.assign(config[key], value)
176
+ prepareConfigRevision(config)
170
177
  }
171
178
 
172
179
  // searches by value name or token name
@@ -14,7 +14,7 @@ import {
14
14
  import { scanAllSheets } from './helpers/insertStyleRule'
15
15
  import { proxyThemesToParents } from './helpers/proxyThemeToParents'
16
16
  import { ensureThemeVariable } from './helpers/themes'
17
- import { mergeConfigVariablesIntoTheme } from './helpers/variables'
17
+ import { mergeConfigVariablesIntoTheme } from './helpers/configVariables'
18
18
  import { configureMedia } from './hooks/useMedia'
19
19
  import { parseFont, registerFontVariables } from './insertFont'
20
20
  import { Tamagui } from './Tamagui'
@@ -348,7 +348,7 @@ function getThemesDeduped(
348
348
 
349
349
  // custom variables merge into base themes only; sub-themes inherit them
350
350
  // via proxyThemesToParents (native) and the CSS cascade (web), so a
351
- // inline <Theme> patch survives sub-theme switches below it
351
+ // a ThemeUpdate patch survives sub-theme switches below it
352
352
  if (variables && variablesCtx && !themeName.includes('_')) {
353
353
  mergeConfigVariablesIntoTheme(
354
354
  theme as any,
@@ -15,7 +15,7 @@ import {
15
15
  type ReactNode,
16
16
  type Ref,
17
17
  } from 'react'
18
- import { unitlessNumberProperties } from '@tamagui/style-grammar'
18
+ import { unitlessNumberProperties } from '@tamagui/style-grammar/runtime'
19
19
 
20
20
  import {
21
21
  clickFromPress,
@@ -0,0 +1,64 @@
1
+ import { createVariable, isVariable } from '../createVariable'
2
+ import type { GenericVariables, TokensParsed, Variable } from '../types'
3
+ import { findVariableToken, isUnitlessVariableKey } from './variableValue'
4
+ import { warnOnce } from './warnOnce'
5
+
6
+ export function mergeConfigVariablesIntoTheme(
7
+ theme: Record<string, Variable>,
8
+ themeName: string,
9
+ variables: GenericVariables,
10
+ tokensParsed: TokensParsed
11
+ ) {
12
+ const scheme = themeName.startsWith('dark') ? 'dark' : 'light'
13
+ const resolving = new Set<string>()
14
+
15
+ const resolveRawValue = (key: string, value: unknown): unknown => {
16
+ if (typeof value === 'object' && value !== null) {
17
+ if (isVariable(value)) return value.val
18
+ if ('needsPx' in value) return value
19
+ if ('light' in value || 'dark' in value) {
20
+ return resolveRawValue(key, (value as any)[scheme] ?? (value as any).light)
21
+ }
22
+ return
23
+ }
24
+ if (typeof value === 'string') {
25
+ const name = value
26
+ if (name in variables && !(name in theme)) {
27
+ if (resolving.has(name)) {
28
+ warnOnce(
29
+ `config-cycle:${name}`,
30
+ `createTamagui variables: reference cycle at "${name}". Dropping.`
31
+ )
32
+ return
33
+ }
34
+ resolving.add(name)
35
+ const res = resolveRawValue(name, variables[name])
36
+ resolving.delete(name)
37
+ return res
38
+ }
39
+ const themeValue = theme[name]
40
+ if (themeValue !== undefined) {
41
+ return isVariable(themeValue) ? themeValue.val : themeValue
42
+ }
43
+ const token = findVariableToken(tokensParsed, name)
44
+ return token ? token.val : value
45
+ }
46
+ return value
47
+ }
48
+
49
+ for (const key in variables) {
50
+ if (key in theme) continue
51
+ let raw = resolveRawValue(key, variables[key])
52
+ if (raw === undefined) continue
53
+ let needsPx = typeof raw === 'number' && !isUnitlessVariableKey(key)
54
+ if (typeof raw === 'object' && raw !== null && 'needsPx' in raw) {
55
+ needsPx = true
56
+ raw = (raw as unknown as { val: number }).val
57
+ }
58
+ const variable = createVariable({ key, name: key, val: raw as any })
59
+ if (needsPx) {
60
+ variable.needsPx = true
61
+ }
62
+ theme[key] = variable
63
+ }
64
+ }