@tamagui/web 3.0.0-beta.922.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (636) hide show
  1. package/dist/cjs/_withNativeStyle.cjs +3 -0
  2. package/dist/cjs/_withNativeStyle.native.cjs +3 -0
  3. package/dist/cjs/_withNativeStyle.native.js +3 -0
  4. package/dist/cjs/_withNativeStyle.native.js.map +1 -1
  5. package/dist/cjs/_withStableStyle.native.cjs +1 -5
  6. package/dist/cjs/_withStableStyle.native.js +1 -5
  7. package/dist/cjs/_withStableStyle.native.js.map +1 -1
  8. package/dist/cjs/config.cjs +6 -3
  9. package/dist/cjs/config.native.cjs +7 -5
  10. package/dist/cjs/config.native.js +7 -5
  11. package/dist/cjs/config.native.js.map +1 -1
  12. package/dist/cjs/contexts/ComponentContext.cjs +1 -0
  13. package/dist/cjs/contexts/ComponentContext.native.cjs +8 -0
  14. package/dist/cjs/contexts/ComponentContext.native.js +8 -0
  15. package/dist/cjs/contexts/ComponentContext.native.js.map +1 -1
  16. package/dist/cjs/createComponent.cjs +46 -32
  17. package/dist/cjs/createComponent.native.cjs +92 -72
  18. package/dist/cjs/createComponent.native.js +92 -72
  19. package/dist/cjs/createComponent.native.js.map +1 -1
  20. package/dist/cjs/createTamagui.cjs +32 -14
  21. package/dist/cjs/createTamagui.native.cjs +33 -19
  22. package/dist/cjs/createTamagui.native.js +33 -19
  23. package/dist/cjs/createTamagui.native.js.map +1 -1
  24. package/dist/cjs/createTokens.native.cjs +1 -5
  25. package/dist/cjs/createTokens.native.js +1 -5
  26. package/dist/cjs/createTokens.native.js.map +1 -1
  27. package/dist/cjs/createVariable.native.cjs +1 -5
  28. package/dist/cjs/createVariable.native.js +1 -5
  29. package/dist/cjs/createVariable.native.js.map +1 -1
  30. package/dist/cjs/createVariables.native.cjs +2 -6
  31. package/dist/cjs/createVariables.native.js +2 -6
  32. package/dist/cjs/createVariables.native.js.map +1 -1
  33. package/dist/cjs/dom/html.cjs +87 -329
  34. package/dist/cjs/dom/html.native.cjs +53 -2
  35. package/dist/cjs/dom/html.native.js +53 -2
  36. package/dist/cjs/dom/html.native.js.map +1 -1
  37. package/dist/cjs/{helpers/timer.native.js → dom/htmlReset.cjs} +6 -12
  38. package/dist/cjs/{helpers/timer.native.cjs → dom/htmlReset.native.cjs} +6 -8
  39. package/dist/cjs/dom/htmlReset.native.js +30 -0
  40. package/dist/cjs/dom/htmlReset.native.js.map +1 -0
  41. package/dist/cjs/dom/htmlRuntime.native.cjs +4 -0
  42. package/dist/cjs/dom/htmlRuntime.native.js +4 -0
  43. package/dist/cjs/dom/htmlRuntime.native.js.map +1 -1
  44. package/dist/cjs/dom/htmlStaticConfig.cjs +44 -0
  45. package/dist/cjs/dom/htmlStaticConfig.native.cjs +46 -0
  46. package/dist/cjs/dom/htmlStaticConfig.native.js +48 -0
  47. package/dist/cjs/dom/htmlStaticConfig.native.js.map +1 -0
  48. package/dist/cjs/dom/primitives.native.cjs +81 -34
  49. package/dist/cjs/dom/primitives.native.js +81 -34
  50. package/dist/cjs/dom/primitives.native.js.map +1 -1
  51. package/dist/cjs/eventHandling.cjs +10 -4
  52. package/dist/cjs/eventHandling.native.cjs +52 -16
  53. package/dist/cjs/eventHandling.native.js +52 -16
  54. package/dist/cjs/eventHandling.native.js.map +1 -1
  55. package/dist/cjs/helpers/NativeTextBinding.cjs +36 -0
  56. package/dist/cjs/helpers/NativeTextBinding.native.cjs +39 -0
  57. package/dist/cjs/helpers/NativeTextBinding.native.js +41 -0
  58. package/dist/cjs/helpers/NativeTextBinding.native.js.map +1 -0
  59. package/dist/cjs/helpers/configVariables.native.cjs +2 -6
  60. package/dist/cjs/helpers/configVariables.native.js +2 -6
  61. package/dist/cjs/helpers/configVariables.native.js.map +1 -1
  62. package/dist/cjs/helpers/createDesignSystem.cjs +14 -10
  63. package/dist/cjs/helpers/createDesignSystem.native.cjs +5 -4
  64. package/dist/cjs/helpers/createDesignSystem.native.js +5 -4
  65. package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
  66. package/dist/cjs/helpers/createStyledContext.native.cjs +1 -5
  67. package/dist/cjs/helpers/createStyledContext.native.js +1 -5
  68. package/dist/cjs/helpers/createStyledContext.native.js.map +1 -1
  69. package/dist/cjs/helpers/expandStyle.cjs +45 -1
  70. package/dist/cjs/helpers/expandStyle.native.cjs +38 -2
  71. package/dist/cjs/helpers/expandStyle.native.js +38 -2
  72. package/dist/cjs/helpers/expandStyle.native.js.map +1 -1
  73. package/dist/cjs/helpers/expandStyles.cjs +15 -3
  74. package/dist/cjs/helpers/expandStyles.native.cjs +14 -8
  75. package/dist/cjs/helpers/expandStyles.native.js +14 -8
  76. package/dist/cjs/helpers/expandStyles.native.js.map +1 -1
  77. package/dist/cjs/helpers/fluid.cjs +56 -0
  78. package/dist/cjs/helpers/fluid.native.cjs +58 -0
  79. package/dist/cjs/helpers/fluid.native.js +60 -0
  80. package/dist/cjs/helpers/fluid.native.js.map +1 -0
  81. package/dist/cjs/helpers/formatDiagnostic.native.cjs +2 -6
  82. package/dist/cjs/helpers/formatDiagnostic.native.js +2 -6
  83. package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
  84. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +6 -6
  85. package/dist/cjs/helpers/getSplitStyles.cjs +366 -150
  86. package/dist/cjs/helpers/getSplitStyles.native.cjs +584 -184
  87. package/dist/cjs/helpers/getSplitStyles.native.js +584 -184
  88. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  89. package/dist/cjs/helpers/getThemeCSSRules.cjs +37 -25
  90. package/dist/cjs/helpers/grammarConfig.cjs +6 -14
  91. package/dist/cjs/helpers/grammarConfig.native.cjs +32 -22
  92. package/dist/cjs/helpers/grammarConfig.native.js +32 -22
  93. package/dist/cjs/helpers/grammarConfig.native.js.map +1 -1
  94. package/dist/cjs/helpers/insertStyleRule.cjs +11 -4
  95. package/dist/cjs/helpers/insertStyleRule.native.cjs +8 -11
  96. package/dist/cjs/helpers/insertStyleRule.native.js +8 -11
  97. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  98. package/dist/cjs/helpers/isObj.native.cjs +1 -5
  99. package/dist/cjs/helpers/isObj.native.js +1 -5
  100. package/dist/cjs/helpers/isObj.native.js.map +1 -1
  101. package/dist/cjs/helpers/mainThreadPressEvents.native.cjs +48 -100
  102. package/dist/cjs/helpers/mainThreadPressEvents.native.js +48 -100
  103. package/dist/cjs/helpers/mainThreadPressEvents.native.js.map +1 -1
  104. package/dist/cjs/helpers/mergeProps.cjs +18 -21
  105. package/dist/cjs/helpers/mergeProps.native.cjs +20 -23
  106. package/dist/cjs/helpers/mergeProps.native.js +20 -23
  107. package/dist/cjs/helpers/mergeProps.native.js.map +1 -1
  108. package/dist/cjs/helpers/nativeOnlyProps.cjs +0 -1
  109. package/dist/cjs/helpers/nativeOnlyProps.native.cjs +0 -1
  110. package/dist/cjs/helpers/nativeOnlyProps.native.js +0 -1
  111. package/dist/cjs/helpers/nativeOnlyProps.native.js.map +1 -1
  112. package/dist/cjs/helpers/nativeTextMetrics.cjs +74 -0
  113. package/dist/cjs/helpers/nativeTextMetrics.native.cjs +77 -0
  114. package/dist/cjs/helpers/nativeTextMetrics.native.js +79 -0
  115. package/dist/cjs/helpers/nativeTextMetrics.native.js.map +1 -0
  116. package/dist/cjs/helpers/normalizeColor.native.cjs +17 -2
  117. package/dist/cjs/helpers/normalizeColor.native.js +17 -2
  118. package/dist/cjs/helpers/normalizeColor.native.js.map +1 -1
  119. package/dist/cjs/helpers/normalizeValueWithProperty.cjs +2 -1
  120. package/dist/cjs/helpers/normalizeValueWithProperty.native.cjs +3 -6
  121. package/dist/cjs/helpers/normalizeValueWithProperty.native.js +3 -6
  122. package/dist/cjs/helpers/normalizeValueWithProperty.native.js.map +1 -1
  123. package/dist/cjs/helpers/objectIdentityKey.native.cjs +1 -5
  124. package/dist/cjs/helpers/objectIdentityKey.native.js +1 -5
  125. package/dist/cjs/helpers/objectIdentityKey.native.js.map +1 -1
  126. package/dist/cjs/helpers/parseNativeStyle.cjs +187 -0
  127. package/dist/cjs/helpers/parseNativeStyle.native.cjs +6 -4
  128. package/dist/cjs/helpers/parseNativeStyle.native.js +6 -4
  129. package/dist/cjs/helpers/parseNativeStyle.native.js.map +1 -1
  130. package/dist/cjs/helpers/proxyThemeToParents.cjs +9 -2
  131. package/dist/cjs/helpers/proxyThemeToParents.native.cjs +28 -2
  132. package/dist/cjs/helpers/proxyThemeToParents.native.js +28 -2
  133. package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
  134. package/dist/cjs/helpers/resolveAnimationDriver.native.cjs +1 -5
  135. package/dist/cjs/helpers/resolveAnimationDriver.native.js +1 -5
  136. package/dist/cjs/helpers/resolveAnimationDriver.native.js.map +1 -1
  137. package/dist/cjs/helpers/{timer.cjs → resolveNativeUnits.cjs} +12 -8
  138. package/dist/cjs/helpers/resolveNativeUnits.native.cjs +205 -0
  139. package/dist/cjs/helpers/resolveNativeUnits.native.js +207 -0
  140. package/dist/cjs/helpers/resolveNativeUnits.native.js.map +1 -0
  141. package/dist/cjs/helpers/resolveRem.native.cjs +18 -21
  142. package/dist/cjs/helpers/resolveRem.native.js +18 -21
  143. package/dist/cjs/helpers/resolveRem.native.js.map +1 -1
  144. package/dist/cjs/helpers/resolveSizing.cjs +124 -0
  145. package/dist/cjs/helpers/resolveSizing.native.cjs +133 -0
  146. package/dist/cjs/helpers/resolveSizing.native.js +135 -0
  147. package/dist/cjs/helpers/resolveSizing.native.js.map +1 -0
  148. package/dist/cjs/helpers/resolveVariableValue.cjs +7 -7
  149. package/dist/cjs/helpers/resolveVariableValue.native.cjs +7 -9
  150. package/dist/cjs/helpers/resolveVariableValue.native.js +7 -9
  151. package/dist/cjs/helpers/resolveVariableValue.native.js.map +1 -1
  152. package/dist/cjs/helpers/resolveVariantStyle.native.cjs +2 -6
  153. package/dist/cjs/helpers/resolveVariantStyle.native.js +2 -6
  154. package/dist/cjs/helpers/resolveVariantStyle.native.js.map +1 -1
  155. package/dist/cjs/helpers/skipProps.cjs +0 -1
  156. package/dist/cjs/helpers/skipProps.native.cjs +0 -1
  157. package/dist/cjs/helpers/skipProps.native.js +0 -1
  158. package/dist/cjs/helpers/skipProps.native.js.map +1 -1
  159. package/dist/cjs/helpers/styleFrontend.cjs +23 -1
  160. package/dist/cjs/helpers/styleFrontend.native.cjs +23 -1
  161. package/dist/cjs/helpers/styleFrontend.native.js +23 -1
  162. package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
  163. package/dist/cjs/helpers/styleStaticConfigCore.cjs +5 -4
  164. package/dist/cjs/helpers/styleStaticConfigCore.native.cjs +7 -4
  165. package/dist/cjs/helpers/styleStaticConfigCore.native.js +7 -4
  166. package/dist/cjs/helpers/styleStaticConfigCore.native.js.map +1 -1
  167. package/dist/cjs/helpers/styledDynamic.cjs +5 -0
  168. package/dist/cjs/helpers/styledDynamic.native.cjs +8 -7
  169. package/dist/cjs/helpers/styledDynamic.native.js +8 -7
  170. package/dist/cjs/helpers/styledDynamic.native.js.map +1 -1
  171. package/dist/cjs/helpers/subscribeToContextGroup.cjs +16 -7
  172. package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +18 -8
  173. package/dist/cjs/helpers/subscribeToContextGroup.native.js +18 -8
  174. package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
  175. package/dist/cjs/helpers/themeRef.native.cjs +1 -5
  176. package/dist/cjs/helpers/themeRef.native.js +1 -5
  177. package/dist/cjs/helpers/themeRef.native.js.map +1 -1
  178. package/dist/cjs/helpers/themes.cjs +26 -11
  179. package/dist/cjs/helpers/themes.native.cjs +26 -11
  180. package/dist/cjs/helpers/themes.native.js +26 -11
  181. package/dist/cjs/helpers/themes.native.js.map +1 -1
  182. package/dist/cjs/helpers/tokenCategories.cjs +2 -2
  183. package/dist/cjs/helpers/tokenCategories.native.cjs +2 -2
  184. package/dist/cjs/helpers/tokenCategories.native.js +2 -2
  185. package/dist/cjs/helpers/tokenCategories.native.js.map +1 -1
  186. package/dist/cjs/helpers/variables.cjs +1 -1
  187. package/dist/cjs/helpers/variables.native.cjs +4 -8
  188. package/dist/cjs/helpers/variables.native.js +4 -8
  189. package/dist/cjs/helpers/variables.native.js.map +1 -1
  190. package/dist/cjs/helpers/warnOnce.cjs +6 -0
  191. package/dist/cjs/helpers/warnOnce.native.cjs +6 -0
  192. package/dist/cjs/helpers/warnOnce.native.js +6 -0
  193. package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
  194. package/dist/cjs/helpers/webPropsToSkip.native.cjs +3 -3
  195. package/dist/cjs/helpers/webPropsToSkip.native.js +3 -3
  196. package/dist/cjs/helpers/webPropsToSkip.native.js.map +1 -1
  197. package/dist/cjs/helpers/wrapStyleTags.cjs +1 -1
  198. package/dist/cjs/helpers/wrapStyleTags.native.cjs +1 -1
  199. package/dist/cjs/helpers/wrapStyleTags.native.js +1 -1
  200. package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
  201. package/dist/cjs/hooks/useComponentState.native.cjs +1 -5
  202. package/dist/cjs/hooks/useComponentState.native.js +1 -5
  203. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  204. package/dist/cjs/hooks/useMedia.cjs +27 -34
  205. package/dist/cjs/hooks/useMedia.native.cjs +45 -51
  206. package/dist/cjs/hooks/useMedia.native.js +45 -51
  207. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  208. package/dist/cjs/hooks/useSplitStyles.cjs +1 -1
  209. package/dist/cjs/hooks/useSplitStyles.native.cjs +1 -1
  210. package/dist/cjs/hooks/useSplitStyles.native.js +1 -1
  211. package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -1
  212. package/dist/cjs/hooks/useThemeState.cjs +37 -47
  213. package/dist/cjs/hooks/useThemeState.native.cjs +44 -50
  214. package/dist/cjs/hooks/useThemeState.native.js +44 -50
  215. package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
  216. package/dist/cjs/index.cjs +7 -0
  217. package/dist/cjs/index.native.cjs +7 -0
  218. package/dist/cjs/index.native.js +7 -0
  219. package/dist/cjs/index.native.js.map +1 -1
  220. package/dist/cjs/internal-runtime.cjs +22 -0
  221. package/dist/cjs/internal-runtime.native.cjs +22 -0
  222. package/dist/cjs/internal-runtime.native.js +22 -0
  223. package/dist/cjs/internal-runtime.native.js.map +1 -1
  224. package/dist/cjs/static-resolve.native.cjs +2 -9
  225. package/dist/cjs/static-resolve.native.js +2 -9
  226. package/dist/cjs/static-resolve.native.js.map +1 -1
  227. package/dist/cjs/style.cjs +1 -1
  228. package/dist/cjs/style.native.cjs +4 -7
  229. package/dist/cjs/style.native.js +4 -7
  230. package/dist/cjs/style.native.js.map +1 -1
  231. package/dist/cjs/views/Theme.cjs +10 -17
  232. package/dist/cjs/views/Theme.native.cjs +9 -11
  233. package/dist/cjs/views/Theme.native.js +9 -11
  234. package/dist/cjs/views/Theme.native.js.map +1 -1
  235. package/dist/cjs/views/ThemeDebug.cjs +1 -1
  236. package/dist/cjs/views/ThemeUpdate.cjs +1 -1
  237. package/dist/cjs/views/ThemeUpdate.native.cjs +1 -1
  238. package/dist/cjs/views/ThemeUpdate.native.js +1 -1
  239. package/dist/cjs/views/ThemeUpdate.native.js.map +1 -1
  240. package/dist/esm/_withNativeStyle.mjs +4 -1
  241. package/dist/esm/_withNativeStyle.mjs.map +1 -1
  242. package/dist/esm/_withNativeStyle.native.js +4 -1
  243. package/dist/esm/_withNativeStyle.native.js.map +1 -1
  244. package/dist/esm/_withStableStyle.native.js +1 -5
  245. package/dist/esm/_withStableStyle.native.js.map +1 -1
  246. package/dist/esm/config.mjs +6 -3
  247. package/dist/esm/config.mjs.map +1 -1
  248. package/dist/esm/config.native.js +7 -5
  249. package/dist/esm/config.native.js.map +1 -1
  250. package/dist/esm/contexts/ComponentContext.mjs +9 -9
  251. package/dist/esm/contexts/ComponentContext.mjs.map +1 -1
  252. package/dist/esm/contexts/ComponentContext.native.js +16 -9
  253. package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
  254. package/dist/esm/createComponent.mjs +45 -42
  255. package/dist/esm/createComponent.mjs.map +1 -1
  256. package/dist/esm/createComponent.native.js +93 -82
  257. package/dist/esm/createComponent.native.js.map +1 -1
  258. package/dist/esm/createTamagui.mjs +33 -15
  259. package/dist/esm/createTamagui.mjs.map +1 -1
  260. package/dist/esm/createTamagui.native.js +34 -20
  261. package/dist/esm/createTamagui.native.js.map +1 -1
  262. package/dist/esm/createTokens.native.js +1 -5
  263. package/dist/esm/createTokens.native.js.map +1 -1
  264. package/dist/esm/createVariable.native.js +1 -5
  265. package/dist/esm/createVariable.native.js.map +1 -1
  266. package/dist/esm/createVariables.native.js +2 -6
  267. package/dist/esm/createVariables.native.js.map +1 -1
  268. package/dist/esm/dom/html.mjs +87 -329
  269. package/dist/esm/dom/html.mjs.map +1 -1
  270. package/dist/esm/dom/html.native.js +53 -2
  271. package/dist/esm/dom/html.native.js.map +1 -1
  272. package/dist/esm/dom/htmlReset.mjs +6 -0
  273. package/dist/esm/dom/htmlReset.mjs.map +1 -0
  274. package/dist/esm/dom/htmlReset.native.js +6 -0
  275. package/dist/esm/dom/htmlReset.native.js.map +1 -0
  276. package/dist/esm/dom/htmlRuntime.native.js +4 -0
  277. package/dist/esm/dom/htmlRuntime.native.js.map +1 -1
  278. package/dist/esm/dom/htmlStaticConfig.mjs +22 -0
  279. package/dist/esm/dom/htmlStaticConfig.mjs.map +1 -0
  280. package/dist/esm/dom/htmlStaticConfig.native.js +22 -0
  281. package/dist/esm/dom/htmlStaticConfig.native.js.map +1 -0
  282. package/dist/esm/dom/primitives.native.js +81 -34
  283. package/dist/esm/dom/primitives.native.js.map +1 -1
  284. package/dist/esm/eventHandling.mjs +10 -4
  285. package/dist/esm/eventHandling.mjs.map +1 -1
  286. package/dist/esm/eventHandling.native.js +52 -16
  287. package/dist/esm/eventHandling.native.js.map +1 -1
  288. package/dist/esm/helpers/NativeTextBinding.mjs +17 -0
  289. package/dist/esm/helpers/NativeTextBinding.mjs.map +1 -0
  290. package/dist/esm/helpers/NativeTextBinding.native.js +18 -0
  291. package/dist/esm/helpers/NativeTextBinding.native.js.map +1 -0
  292. package/dist/esm/helpers/configVariables.native.js +2 -6
  293. package/dist/esm/helpers/configVariables.native.js.map +1 -1
  294. package/dist/esm/helpers/createDesignSystem.mjs +14 -10
  295. package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
  296. package/dist/esm/helpers/createDesignSystem.native.js +4 -4
  297. package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
  298. package/dist/esm/helpers/createStyledContext.native.js +1 -5
  299. package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
  300. package/dist/esm/helpers/expandStyle.mjs +41 -1
  301. package/dist/esm/helpers/expandStyle.mjs.map +1 -1
  302. package/dist/esm/helpers/expandStyle.native.js +36 -3
  303. package/dist/esm/helpers/expandStyle.native.js.map +1 -1
  304. package/dist/esm/helpers/expandStyles.mjs +15 -3
  305. package/dist/esm/helpers/expandStyles.mjs.map +1 -1
  306. package/dist/esm/helpers/expandStyles.native.js +14 -8
  307. package/dist/esm/helpers/expandStyles.native.js.map +1 -1
  308. package/dist/esm/helpers/fluid.mjs +36 -0
  309. package/dist/esm/helpers/fluid.mjs.map +1 -0
  310. package/dist/esm/helpers/fluid.native.js +36 -0
  311. package/dist/esm/helpers/fluid.native.js.map +1 -0
  312. package/dist/esm/helpers/formatDiagnostic.native.js +2 -6
  313. package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
  314. package/dist/esm/helpers/getCSSStylesAtomic.mjs +6 -6
  315. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  316. package/dist/esm/helpers/getSplitStyles.mjs +364 -150
  317. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  318. package/dist/esm/helpers/getSplitStyles.native.js +588 -188
  319. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  320. package/dist/esm/helpers/getThemeCSSRules.mjs +37 -25
  321. package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
  322. package/dist/esm/helpers/grammarConfig.mjs +6 -14
  323. package/dist/esm/helpers/grammarConfig.mjs.map +1 -1
  324. package/dist/esm/helpers/grammarConfig.native.js +32 -22
  325. package/dist/esm/helpers/grammarConfig.native.js.map +1 -1
  326. package/dist/esm/helpers/insertStyleRule.mjs +11 -4
  327. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  328. package/dist/esm/helpers/insertStyleRule.native.js +4 -4
  329. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  330. package/dist/esm/helpers/isObj.native.js +1 -5
  331. package/dist/esm/helpers/isObj.native.js.map +1 -1
  332. package/dist/esm/helpers/mainThreadPressEvents.native.js +48 -100
  333. package/dist/esm/helpers/mainThreadPressEvents.native.js.map +1 -1
  334. package/dist/esm/helpers/mergeProps.mjs +18 -21
  335. package/dist/esm/helpers/mergeProps.mjs.map +1 -1
  336. package/dist/esm/helpers/mergeProps.native.js +20 -23
  337. package/dist/esm/helpers/mergeProps.native.js.map +1 -1
  338. package/dist/esm/helpers/nativeOnlyProps.mjs +0 -1
  339. package/dist/esm/helpers/nativeOnlyProps.mjs.map +1 -1
  340. package/dist/esm/helpers/nativeOnlyProps.native.js +0 -1
  341. package/dist/esm/helpers/nativeOnlyProps.native.js.map +1 -1
  342. package/dist/esm/helpers/nativeTextMetrics.mjs +55 -0
  343. package/dist/esm/helpers/nativeTextMetrics.mjs.map +1 -0
  344. package/dist/esm/helpers/nativeTextMetrics.native.js +56 -0
  345. package/dist/esm/helpers/nativeTextMetrics.native.js.map +1 -0
  346. package/dist/esm/helpers/normalizeColor.native.js +17 -2
  347. package/dist/esm/helpers/normalizeColor.native.js.map +1 -1
  348. package/dist/esm/helpers/normalizeValueWithProperty.mjs +2 -1
  349. package/dist/esm/helpers/normalizeValueWithProperty.mjs.map +1 -1
  350. package/dist/esm/helpers/normalizeValueWithProperty.native.js +3 -6
  351. package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
  352. package/dist/esm/helpers/objectIdentityKey.native.js +1 -5
  353. package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -1
  354. package/dist/esm/helpers/parseNativeStyle.mjs +168 -0
  355. package/dist/esm/helpers/parseNativeStyle.mjs.map +1 -0
  356. package/dist/esm/helpers/parseNativeStyle.native.js +4 -1
  357. package/dist/esm/helpers/parseNativeStyle.native.js.map +1 -1
  358. package/dist/esm/helpers/proxyThemeToParents.mjs +10 -2
  359. package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
  360. package/dist/esm/helpers/proxyThemeToParents.native.js +29 -2
  361. package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
  362. package/dist/esm/helpers/resolveAnimationDriver.native.js +1 -5
  363. package/dist/esm/helpers/resolveAnimationDriver.native.js.map +1 -1
  364. package/dist/esm/helpers/resolveNativeUnits.mjs +9 -0
  365. package/dist/esm/helpers/resolveNativeUnits.mjs.map +1 -0
  366. package/dist/esm/helpers/resolveNativeUnits.native.js +178 -0
  367. package/dist/esm/helpers/resolveNativeUnits.native.js.map +1 -0
  368. package/dist/esm/helpers/resolveRem.native.js +18 -21
  369. package/dist/esm/helpers/resolveRem.native.js.map +1 -1
  370. package/dist/esm/helpers/resolveSizing.mjs +102 -0
  371. package/dist/esm/helpers/resolveSizing.mjs.map +1 -0
  372. package/dist/esm/helpers/resolveSizing.native.js +109 -0
  373. package/dist/esm/helpers/resolveSizing.native.js.map +1 -0
  374. package/dist/esm/helpers/resolveVariableValue.mjs +7 -7
  375. package/dist/esm/helpers/resolveVariableValue.mjs.map +1 -1
  376. package/dist/esm/helpers/resolveVariableValue.native.js +7 -9
  377. package/dist/esm/helpers/resolveVariableValue.native.js.map +1 -1
  378. package/dist/esm/helpers/resolveVariantStyle.native.js +2 -6
  379. package/dist/esm/helpers/resolveVariantStyle.native.js.map +1 -1
  380. package/dist/esm/helpers/skipProps.mjs +0 -1
  381. package/dist/esm/helpers/skipProps.mjs.map +1 -1
  382. package/dist/esm/helpers/skipProps.native.js +0 -1
  383. package/dist/esm/helpers/skipProps.native.js.map +1 -1
  384. package/dist/esm/helpers/styleFrontend.mjs +20 -1
  385. package/dist/esm/helpers/styleFrontend.mjs.map +1 -1
  386. package/dist/esm/helpers/styleFrontend.native.js +20 -1
  387. package/dist/esm/helpers/styleFrontend.native.js.map +1 -1
  388. package/dist/esm/helpers/styleStaticConfigCore.mjs +5 -4
  389. package/dist/esm/helpers/styleStaticConfigCore.mjs.map +1 -1
  390. package/dist/esm/helpers/styleStaticConfigCore.native.js +7 -4
  391. package/dist/esm/helpers/styleStaticConfigCore.native.js.map +1 -1
  392. package/dist/esm/helpers/styledDynamic.mjs +5 -0
  393. package/dist/esm/helpers/styledDynamic.mjs.map +1 -1
  394. package/dist/esm/helpers/styledDynamic.native.js +8 -7
  395. package/dist/esm/helpers/styledDynamic.native.js.map +1 -1
  396. package/dist/esm/helpers/subscribeToContextGroup.mjs +16 -7
  397. package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
  398. package/dist/esm/helpers/subscribeToContextGroup.native.js +18 -8
  399. package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
  400. package/dist/esm/helpers/themeRef.native.js +1 -5
  401. package/dist/esm/helpers/themeRef.native.js.map +1 -1
  402. package/dist/esm/helpers/themes.mjs +20 -11
  403. package/dist/esm/helpers/themes.mjs.map +1 -1
  404. package/dist/esm/helpers/themes.native.js +20 -11
  405. package/dist/esm/helpers/themes.native.js.map +1 -1
  406. package/dist/esm/helpers/tokenCategories.mjs +2 -2
  407. package/dist/esm/helpers/tokenCategories.mjs.map +1 -1
  408. package/dist/esm/helpers/tokenCategories.native.js +2 -2
  409. package/dist/esm/helpers/tokenCategories.native.js.map +1 -1
  410. package/dist/esm/helpers/variables.mjs +1 -1
  411. package/dist/esm/helpers/variables.mjs.map +1 -1
  412. package/dist/esm/helpers/variables.native.js +4 -8
  413. package/dist/esm/helpers/variables.native.js.map +1 -1
  414. package/dist/esm/helpers/warnOnce.mjs +6 -1
  415. package/dist/esm/helpers/warnOnce.mjs.map +1 -1
  416. package/dist/esm/helpers/warnOnce.native.js +6 -1
  417. package/dist/esm/helpers/warnOnce.native.js.map +1 -1
  418. package/dist/esm/helpers/webPropsToSkip.native.js +3 -3
  419. package/dist/esm/helpers/webPropsToSkip.native.js.map +1 -1
  420. package/dist/esm/helpers/wrapStyleTags.mjs +1 -1
  421. package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
  422. package/dist/esm/helpers/wrapStyleTags.native.js +1 -1
  423. package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
  424. package/dist/esm/hooks/useComponentState.native.js +1 -5
  425. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  426. package/dist/esm/hooks/useMedia.mjs +27 -34
  427. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  428. package/dist/esm/hooks/useMedia.native.js +45 -51
  429. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  430. package/dist/esm/hooks/useSplitStyles.mjs +1 -1
  431. package/dist/esm/hooks/useSplitStyles.mjs.map +1 -1
  432. package/dist/esm/hooks/useSplitStyles.native.js +1 -1
  433. package/dist/esm/hooks/useSplitStyles.native.js.map +1 -1
  434. package/dist/esm/hooks/useThemeState.mjs +36 -48
  435. package/dist/esm/hooks/useThemeState.mjs.map +1 -1
  436. package/dist/esm/hooks/useThemeState.native.js +44 -50
  437. package/dist/esm/hooks/useThemeState.native.js.map +1 -1
  438. package/dist/esm/index.js +4 -1
  439. package/dist/esm/index.mjs +4 -1
  440. package/dist/esm/index.native.js +4 -1
  441. package/dist/esm/internal-runtime.mjs +22 -3
  442. package/dist/esm/internal-runtime.mjs.map +1 -1
  443. package/dist/esm/internal-runtime.native.js +22 -3
  444. package/dist/esm/internal-runtime.native.js.map +1 -1
  445. package/dist/esm/static-resolve.native.js +2 -9
  446. package/dist/esm/static-resolve.native.js.map +1 -1
  447. package/dist/esm/style.mjs +1 -1
  448. package/dist/esm/style.mjs.map +1 -1
  449. package/dist/esm/style.native.js +4 -7
  450. package/dist/esm/style.native.js.map +1 -1
  451. package/dist/esm/views/Theme.mjs +15 -14
  452. package/dist/esm/views/Theme.mjs.map +1 -1
  453. package/dist/esm/views/Theme.native.js +15 -15
  454. package/dist/esm/views/Theme.native.js.map +1 -1
  455. package/dist/esm/views/ThemeDebug.mjs +1 -1
  456. package/dist/esm/views/ThemeDebug.mjs.map +1 -1
  457. package/dist/esm/views/ThemeUpdate.mjs +1 -1
  458. package/dist/esm/views/ThemeUpdate.mjs.map +1 -1
  459. package/dist/esm/views/ThemeUpdate.native.js +1 -1
  460. package/dist/esm/views/ThemeUpdate.native.js.map +1 -1
  461. package/package.json +20 -18
  462. package/reset.css +11 -0
  463. package/src/_withNativeStyle.tsx +6 -1
  464. package/src/config.ts +6 -6
  465. package/src/contexts/ComponentContext.tsx +8 -0
  466. package/src/createComponent.tsx +177 -57
  467. package/src/createStyledHOC.tsx +25 -26
  468. package/src/createTamagui.ts +47 -28
  469. package/src/dom/contract.ts +4 -1
  470. package/src/dom/html.native.tsx +55 -2
  471. package/src/dom/html.tsx +189 -388
  472. package/src/dom/htmlReset.ts +15 -0
  473. package/src/dom/htmlRuntime.native.tsx +5 -0
  474. package/src/dom/htmlStaticConfig.ts +40 -0
  475. package/src/dom/primitives.native.tsx +138 -33
  476. package/src/dom/standalone.ts +2 -1
  477. package/src/dom/styleTypes.ts +82 -92
  478. package/src/eventHandling.native.ts +61 -11
  479. package/src/eventHandling.ts +19 -4
  480. package/src/helpers/NativeTextBinding.tsx +26 -0
  481. package/src/helpers/createDesignSystem.ts +24 -8
  482. package/src/helpers/expandStyle.ts +88 -4
  483. package/src/helpers/expandStyles.ts +6 -11
  484. package/src/helpers/fluid.ts +66 -0
  485. package/src/helpers/getCSSStylesAtomic.ts +11 -6
  486. package/src/helpers/getSplitStyles.tsx +1032 -296
  487. package/src/helpers/getThemeCSSRules.ts +73 -35
  488. package/src/helpers/grammarConfig.ts +23 -8
  489. package/src/helpers/insertStyleRule.tsx +14 -8
  490. package/src/helpers/mainThreadPressEvents.native.ts +65 -141
  491. package/src/helpers/mergeProps.ts +29 -62
  492. package/src/helpers/nativeOnlyProps.ts +0 -1
  493. package/src/helpers/nativeTextMetrics.ts +77 -0
  494. package/src/helpers/normalizeColor.native.ts +29 -4
  495. package/src/helpers/normalizeValueWithProperty.ts +2 -1
  496. package/src/helpers/{parseNativeStyle.native.ts → parseNativeStyle.ts} +8 -1
  497. package/src/helpers/proxyThemeToParents.ts +13 -2
  498. package/src/helpers/resolveNativeUnits.native.ts +247 -0
  499. package/src/helpers/resolveNativeUnits.ts +10 -0
  500. package/src/helpers/resolveRem.native.ts +25 -26
  501. package/src/helpers/resolveSizing.ts +167 -0
  502. package/src/helpers/resolveVariableValue.ts +21 -17
  503. package/src/helpers/skipProps.ts +0 -1
  504. package/src/helpers/styleFrontend.ts +39 -0
  505. package/src/helpers/styleProvenance.ts +1 -1
  506. package/src/helpers/styleStaticConfigCore.ts +15 -4
  507. package/src/helpers/styledDynamic.ts +3 -1
  508. package/src/helpers/subscribeToContextGroup.tsx +16 -7
  509. package/src/helpers/themes.ts +27 -11
  510. package/src/helpers/tokenCategories.ts +15 -3
  511. package/src/helpers/variables.ts +2 -2
  512. package/src/helpers/warnOnce.ts +6 -0
  513. package/src/helpers/webPropsToSkip.native.ts +9 -3
  514. package/src/helpers/wrapStyleTags.tsx +4 -1
  515. package/src/hooks/useMedia.tsx +36 -47
  516. package/src/hooks/useSplitStyles.tsx +4 -1
  517. package/src/hooks/useThemeState.ts +69 -74
  518. package/src/index.ts +13 -0
  519. package/src/interfaces/RNExclusiveTypes.ts +1 -3
  520. package/src/internal-runtime.ts +43 -2
  521. package/src/style.ts +4 -1
  522. package/src/styled.tsx +34 -3
  523. package/src/types.tsx +412 -132
  524. package/src/views/Theme.tsx +18 -21
  525. package/src/views/ThemeDebug.tsx +1 -1
  526. package/src/views/ThemeUpdate.tsx +1 -1
  527. package/types/_withNativeStyle.d.ts.map +1 -1
  528. package/types/config.d.ts.map +1 -1
  529. package/types/contexts/ComponentContext.d.ts +1 -1
  530. package/types/contexts/ComponentContext.d.ts.map +1 -1
  531. package/types/createComponent.d.ts.map +1 -1
  532. package/types/createStyledHOC.d.ts +5 -2
  533. package/types/createStyledHOC.d.ts.map +1 -1
  534. package/types/createTamagui.d.ts.map +1 -1
  535. package/types/dom/contract.d.ts +4 -1
  536. package/types/dom/contract.d.ts.map +1 -1
  537. package/types/dom/html.d.ts +60 -51
  538. package/types/dom/html.d.ts.map +1 -1
  539. package/types/dom/html.native.d.ts.map +1 -1
  540. package/types/dom/htmlReset.d.ts +10 -0
  541. package/types/dom/htmlReset.d.ts.map +1 -0
  542. package/types/dom/htmlRuntime.native.d.ts.map +1 -1
  543. package/types/dom/htmlStaticConfig.d.ts +22 -0
  544. package/types/dom/htmlStaticConfig.d.ts.map +1 -0
  545. package/types/dom/primitives.native.d.ts.map +1 -1
  546. package/types/dom/standalone.d.ts +2 -1
  547. package/types/dom/standalone.d.ts.map +1 -1
  548. package/types/dom/styleTypes.d.ts +63 -84
  549. package/types/dom/styleTypes.d.ts.map +1 -1
  550. package/types/eventHandling.d.ts +12 -4
  551. package/types/eventHandling.d.ts.map +1 -1
  552. package/types/eventHandling.native.d.ts.map +1 -1
  553. package/types/helpers/NativeTextBinding.d.ts +11 -0
  554. package/types/helpers/NativeTextBinding.d.ts.map +1 -0
  555. package/types/helpers/createDesignSystem.d.ts.map +1 -1
  556. package/types/helpers/expandStyle.d.ts +1 -0
  557. package/types/helpers/expandStyle.d.ts.map +1 -1
  558. package/types/helpers/expandStyles.d.ts.map +1 -1
  559. package/types/helpers/fluid.d.ts +21 -0
  560. package/types/helpers/fluid.d.ts.map +1 -0
  561. package/types/helpers/getCSSStylesAtomic.d.ts +3 -1
  562. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  563. package/types/helpers/getSplitStyles.d.ts +2 -1
  564. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  565. package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
  566. package/types/helpers/grammarConfig.d.ts.map +1 -1
  567. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  568. package/types/helpers/mainThreadPressEvents.native.d.ts +0 -7
  569. package/types/helpers/mainThreadPressEvents.native.d.ts.map +1 -1
  570. package/types/helpers/mergeProps.d.ts +1 -15
  571. package/types/helpers/mergeProps.d.ts.map +1 -1
  572. package/types/helpers/nativeOnlyProps.d.ts +0 -1
  573. package/types/helpers/nativeOnlyProps.d.ts.map +1 -1
  574. package/types/helpers/nativeTextMetrics.d.ts +16 -0
  575. package/types/helpers/nativeTextMetrics.d.ts.map +1 -0
  576. package/types/helpers/normalizeColor.native.d.ts +4 -1
  577. package/types/helpers/normalizeColor.native.d.ts.map +1 -1
  578. package/types/helpers/normalizeShadow.native.d.ts +3 -1
  579. package/types/helpers/normalizeShadow.native.d.ts.map +1 -1
  580. package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -1
  581. package/types/helpers/{parseNativeStyle.native.d.ts → parseNativeStyle.d.ts} +1 -1
  582. package/types/helpers/parseNativeStyle.d.ts.map +1 -0
  583. package/types/helpers/proxyThemeToParents.d.ts +1 -1
  584. package/types/helpers/proxyThemeToParents.d.ts.map +1 -1
  585. package/types/helpers/resolveNativeUnits.d.ts +6 -0
  586. package/types/helpers/resolveNativeUnits.d.ts.map +1 -0
  587. package/types/helpers/resolveNativeUnits.native.d.ts +16 -0
  588. package/types/helpers/resolveNativeUnits.native.d.ts.map +1 -0
  589. package/types/helpers/resolveRem.native.d.ts +6 -4
  590. package/types/helpers/resolveRem.native.d.ts.map +1 -1
  591. package/types/helpers/resolveSizing.d.ts +90 -0
  592. package/types/helpers/resolveSizing.d.ts.map +1 -0
  593. package/types/helpers/resolveVariableValue.d.ts.map +1 -1
  594. package/types/helpers/skipProps.d.ts +0 -1
  595. package/types/helpers/skipProps.d.ts.map +1 -1
  596. package/types/helpers/styleFrontend.d.ts +21 -0
  597. package/types/helpers/styleFrontend.d.ts.map +1 -1
  598. package/types/helpers/styleProvenance.d.ts +1 -1
  599. package/types/helpers/styleProvenance.d.ts.map +1 -1
  600. package/types/helpers/styleStaticConfigCore.d.ts.map +1 -1
  601. package/types/helpers/styledDynamic.d.ts +1 -1
  602. package/types/helpers/styledDynamic.d.ts.map +1 -1
  603. package/types/helpers/themes.d.ts +4 -0
  604. package/types/helpers/themes.d.ts.map +1 -1
  605. package/types/helpers/tokenCategories.d.ts +1 -1
  606. package/types/helpers/tokenCategories.d.ts.map +1 -1
  607. package/types/helpers/warnOnce.d.ts +1 -0
  608. package/types/helpers/warnOnce.d.ts.map +1 -1
  609. package/types/helpers/webPropsToSkip.native.d.ts +6 -2
  610. package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
  611. package/types/helpers/wrapStyleTags.d.ts.map +1 -1
  612. package/types/hooks/useMedia.d.ts +5 -2
  613. package/types/hooks/useMedia.d.ts.map +1 -1
  614. package/types/hooks/useSplitStyles.d.ts.map +1 -1
  615. package/types/hooks/useThemeState.d.ts.map +1 -1
  616. package/types/index.d.ts +4 -1
  617. package/types/index.d.ts.map +1 -1
  618. package/types/interfaces/RNExclusiveTypes.d.ts +2 -3
  619. package/types/interfaces/RNExclusiveTypes.d.ts.map +1 -1
  620. package/types/internal-runtime.d.ts +12 -1
  621. package/types/internal-runtime.d.ts.map +1 -1
  622. package/types/style.d.ts.map +1 -1
  623. package/types/styled.d.ts +7 -4
  624. package/types/styled.d.ts.map +1 -1
  625. package/types/types.d.ts +258 -102
  626. package/types/types.d.ts.map +1 -1
  627. package/types/views/Theme.d.ts.map +1 -1
  628. package/dist/cjs/helpers/timer.native.js.map +0 -1
  629. package/dist/esm/helpers/timer.mjs +0 -13
  630. package/dist/esm/helpers/timer.mjs.map +0 -1
  631. package/dist/esm/helpers/timer.native.js +0 -13
  632. package/dist/esm/helpers/timer.native.js.map +0 -1
  633. package/src/helpers/timer.ts +0 -9
  634. package/types/helpers/parseNativeStyle.native.d.ts.map +0 -1
  635. package/types/helpers/timer.d.ts +0 -2
  636. package/types/helpers/timer.d.ts.map +0 -1
@@ -19,6 +19,28 @@ var __copyProps = (to, from, except, desc) => {
19
19
  };
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
  var styleFrontend_exports = {};
22
- __export(styleFrontend_exports, { regularStyleFrontend: () => regularStyleFrontend });
22
+ __export(styleFrontend_exports, {
23
+ mergeFrontendCondition: () => mergeFrontendCondition,
24
+ regularStyleFrontend: () => regularStyleFrontend
25
+ });
23
26
  module.exports = __toCommonJS(styleFrontend_exports);
27
+ function mergeFrontendCondition(previous, value, condition) {
28
+ const merged = previous !== null && typeof previous === "object" && !Array.isArray(previous);
29
+ if (condition === void 0) {
30
+ return merged ? {
31
+ ...previous,
32
+ default: value
33
+ } : value;
34
+ }
35
+ if (merged) {
36
+ return {
37
+ ...previous,
38
+ [condition]: value
39
+ };
40
+ }
41
+ return previous === void 0 ? { [condition]: value } : {
42
+ default: previous,
43
+ [condition]: value
44
+ };
45
+ }
24
46
  const regularStyleFrontend = {};
@@ -21,6 +21,28 @@ var __copyProps = (to, from, except, desc) => {
21
21
  };
22
22
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
23
  var styleFrontend_exports = {};
24
- __export(styleFrontend_exports, { regularStyleFrontend: () => regularStyleFrontend });
24
+ __export(styleFrontend_exports, {
25
+ mergeFrontendCondition: () => mergeFrontendCondition,
26
+ regularStyleFrontend: () => regularStyleFrontend
27
+ });
25
28
  module.exports = __toCommonJS(styleFrontend_exports);
29
+ function mergeFrontendCondition(previous, value, condition) {
30
+ var merged = previous !== null && typeof previous === "object" && !Array.isArray(previous);
31
+ if (condition === void 0) {
32
+ return merged ? {
33
+ ...previous,
34
+ default: value
35
+ } : value;
36
+ }
37
+ if (merged) {
38
+ return {
39
+ ...previous,
40
+ [condition]: value
41
+ };
42
+ }
43
+ return previous === void 0 ? { [condition]: value } : {
44
+ default: previous,
45
+ [condition]: value
46
+ };
47
+ }
26
48
  var regularStyleFrontend = {};
@@ -21,8 +21,30 @@ var __copyProps = (to, from, except, desc) => {
21
21
  };
22
22
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
23
  var styleFrontend_exports = {};
24
- __export(styleFrontend_exports, { regularStyleFrontend: () => regularStyleFrontend });
24
+ __export(styleFrontend_exports, {
25
+ mergeFrontendCondition: () => mergeFrontendCondition,
26
+ regularStyleFrontend: () => regularStyleFrontend
27
+ });
25
28
  module.exports = __toCommonJS(styleFrontend_exports);
29
+ function mergeFrontendCondition(previous, value, condition) {
30
+ var merged = previous !== null && typeof previous === "object" && !Array.isArray(previous);
31
+ if (condition === void 0) {
32
+ return merged ? {
33
+ ...previous,
34
+ default: value
35
+ } : value;
36
+ }
37
+ if (merged) {
38
+ return {
39
+ ...previous,
40
+ [condition]: value
41
+ };
42
+ }
43
+ return previous === void 0 ? { [condition]: value } : {
44
+ default: previous,
45
+ [condition]: value
46
+ };
47
+ }
26
48
  var regularStyleFrontend = {};
27
49
 
28
50
  //# sourceMappingURL=styleFrontend.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styleFrontend.native.js","names":[],"sources":["cjs/helpers/styleFrontend.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styleFrontend_exports = {};\n__export(styleFrontend_exports, {\n regularStyleFrontend: () => regularStyleFrontend\n});\nmodule.exports = __toCommonJS(styleFrontend_exports);\nvar regularStyleFrontend = {};\n//# sourceMappingURL=styleFrontend.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,wBAAwB,CAAC;AAC7B,SAAS,uBAAuB,EAC9B,4BAA4B,qBAC9B,CAAC;AACD,OAAO,UAAU,aAAa,qBAAqB;AACnD,IAAI,uBAAuB,CAAC"}
1
+ {"version":3,"file":"styleFrontend.native.js","names":[],"sources":["cjs/helpers/styleFrontend.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styleFrontend_exports = {};\n__export(styleFrontend_exports, {\n mergeFrontendCondition: () => mergeFrontendCondition,\n regularStyleFrontend: () => regularStyleFrontend\n});\nmodule.exports = __toCommonJS(styleFrontend_exports);\nfunction mergeFrontendCondition(previous, value, condition) {\n var merged = previous !== null && typeof previous === \"object\" && !Array.isArray(previous);\n if (condition === void 0) {\n return merged ? {\n ...previous,\n default: value\n } : value;\n }\n if (merged) {\n return {\n ...previous,\n [condition]: value\n };\n }\n return previous === void 0 ? {\n [condition]: value\n } : {\n default: previous,\n [condition]: value\n };\n}\nvar regularStyleFrontend = {};\n//# sourceMappingURL=styleFrontend.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,wBAAwB,CAAC;AAC7B,SAAS,uBAAuB;CAC9B,8BAA8B;CAC9B,4BAA4B;AAC9B,CAAC;AACD,OAAO,UAAU,aAAa,qBAAqB;AACnD,SAAS,uBAAuB,UAAU,OAAO,WAAW;CAC1D,IAAI,SAAS,aAAa,QAAQ,OAAO,aAAa,YAAY,CAAC,MAAM,QAAQ,QAAQ;CACzF,IAAI,cAAc,KAAK,GAAG;EACxB,OAAO,SAAS;GACd,GAAG;GACH,SAAS;EACX,IAAI;CACN;CACA,IAAI,QAAQ;EACV,OAAO;GACL,GAAG;IACF,YAAY;EACf;CACF;CACA,OAAO,aAAa,KAAK,IAAI,GAC1B,YAAY,MACf,IAAI;EACF,SAAS;GACR,YAAY;CACf;AACF;AACA,IAAI,uBAAuB,CAAC"}
@@ -32,6 +32,8 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
32
32
  const variants = normalized ? normalized.variants : staticConfig.variants;
33
33
  const authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
34
34
  const authoredDefaultProps = staticConfig.defaultProps;
35
+ const keys = staticConfig.contextProps || staticConfig.context?.propKeys;
36
+ const styledContextKeys = keys ? new Set(keys) : null;
35
37
  let baseStyle;
36
38
  let baseVariantProps;
37
39
  let defaultProps;
@@ -44,7 +46,7 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
44
46
  ;
45
47
  (baseStyle ||= authoredBaseStyle ? { ...authoredBaseStyle } : {})[key] = authoredDefaultProps[key];
46
48
  }
47
- if (isVariant || !isStyle) {
49
+ if (isVariant || !isStyle || staticConfig.inlineProps?.has(key) || styledContextKeys?.has(key)) {
48
50
  ;
49
51
  (defaultProps ||= {})[key] = authoredDefaultProps[key];
50
52
  }
@@ -73,7 +75,7 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
73
75
  };
74
76
  for (const key in resolvedBaseStyle) {
75
77
  const expanded = conf.shorthands[key] || key;
76
- if (key !== "transition" && !variants?.[key] && expanded in validStyles) {
78
+ if (key !== "transition" && !variants?.[key] && !staticConfig.inlineProps?.has(expanded) && expanded in validStyles) {
77
79
  ;
78
80
  (directBaseStyle ||= {})[key] = resolvedBaseStyle[key];
79
81
  (directBaseKeys ||= []).push(key);
@@ -83,14 +85,13 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
83
85
  }
84
86
  flushDirectBaseStyle();
85
87
  }
86
- const keys = staticConfig.contextProps || staticConfig.context?.propKeys;
87
88
  const value = {
88
89
  baseStyle: resolvedBaseStyle,
89
90
  baseVariantProps,
90
91
  baseStylePiece,
91
92
  baseStylePieces,
92
93
  defaultProps,
93
- styledContextKeys: keys ? new Set(keys) : null,
94
+ styledContextKeys,
94
95
  variants,
95
96
  variantStyleResolver: staticConfig.variantStyleResolver,
96
97
  passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
@@ -35,19 +35,22 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
35
35
  var variants = normalized ? normalized.variants : staticConfig.variants;
36
36
  var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
37
37
  var authoredDefaultProps = staticConfig.defaultProps;
38
+ var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
39
+ var styledContextKeys = keys ? new Set(keys) : null;
38
40
  var baseStyle;
39
41
  var baseVariantProps;
40
42
  var defaultProps;
41
43
  var validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);
42
44
  if (authoredDefaultProps) {
43
45
  for (var key in authoredDefaultProps) {
46
+ var _staticConfig_inlineProps;
44
47
  var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
45
48
  var isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
46
49
  if (isVariant || isStyle) {
47
50
  ;
48
51
  (baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
49
52
  }
50
- if (isVariant || !isStyle) {
53
+ if (isVariant || !isStyle || ((_staticConfig_inlineProps = staticConfig.inlineProps) === null || _staticConfig_inlineProps === void 0 ? void 0 : _staticConfig_inlineProps.has(key)) || (styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(key))) {
51
54
  ;
52
55
  (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
53
56
  }
@@ -92,8 +95,9 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
92
95
  directBaseKeys = void 0;
93
96
  };
94
97
  for (var key1 in resolvedBaseStyle) {
98
+ var _staticConfig_inlineProps1;
95
99
  var expanded = conf.shorthands[key1] || key1;
96
- if (key1 !== "transition" && !(variants === null || variants === void 0 ? void 0 : variants[key1]) && expanded in validStyles) {
100
+ if (key1 !== "transition" && !(variants === null || variants === void 0 ? void 0 : variants[key1]) && !((_staticConfig_inlineProps1 = staticConfig.inlineProps) === null || _staticConfig_inlineProps1 === void 0 ? void 0 : _staticConfig_inlineProps1.has(expanded)) && expanded in validStyles) {
97
101
  ;
98
102
  (directBaseStyle || (directBaseStyle = {}))[key1] = resolvedBaseStyle[key1];
99
103
  (directBaseKeys || (directBaseKeys = [])).push(key1);
@@ -103,14 +107,13 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
103
107
  }
104
108
  flushDirectBaseStyle();
105
109
  }
106
- var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
107
110
  var value = {
108
111
  baseStyle: resolvedBaseStyle,
109
112
  baseVariantProps,
110
113
  baseStylePiece,
111
114
  baseStylePieces,
112
115
  defaultProps,
113
- styledContextKeys: keys ? new Set(keys) : null,
116
+ styledContextKeys,
114
117
  variants,
115
118
  variantStyleResolver: staticConfig.variantStyleResolver,
116
119
  passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
@@ -35,19 +35,22 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
35
35
  var variants = normalized ? normalized.variants : staticConfig.variants;
36
36
  var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;
37
37
  var authoredDefaultProps = staticConfig.defaultProps;
38
+ var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
39
+ var styledContextKeys = keys ? new Set(keys) : null;
38
40
  var baseStyle;
39
41
  var baseVariantProps;
40
42
  var defaultProps;
41
43
  var validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);
42
44
  if (authoredDefaultProps) {
43
45
  for (var key in authoredDefaultProps) {
46
+ var _staticConfig_inlineProps;
44
47
  var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);
45
48
  var isStyle = key !== "transition" && (key in validStyles || key in conf.shorthands);
46
49
  if (isVariant || isStyle) {
47
50
  ;
48
51
  (baseStyle || (baseStyle = authoredBaseStyle ? { ...authoredBaseStyle } : {}))[key] = authoredDefaultProps[key];
49
52
  }
50
- if (isVariant || !isStyle) {
53
+ if (isVariant || !isStyle || ((_staticConfig_inlineProps = staticConfig.inlineProps) === null || _staticConfig_inlineProps === void 0 ? void 0 : _staticConfig_inlineProps.has(key)) || (styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(key))) {
51
54
  ;
52
55
  (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];
53
56
  }
@@ -92,8 +95,9 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
92
95
  directBaseKeys = void 0;
93
96
  };
94
97
  for (var key1 in resolvedBaseStyle) {
98
+ var _staticConfig_inlineProps1;
95
99
  var expanded = conf.shorthands[key1] || key1;
96
- if (key1 !== "transition" && !(variants === null || variants === void 0 ? void 0 : variants[key1]) && expanded in validStyles) {
100
+ if (key1 !== "transition" && !(variants === null || variants === void 0 ? void 0 : variants[key1]) && !((_staticConfig_inlineProps1 = staticConfig.inlineProps) === null || _staticConfig_inlineProps1 === void 0 ? void 0 : _staticConfig_inlineProps1.has(expanded)) && expanded in validStyles) {
97
101
  ;
98
102
  (directBaseStyle || (directBaseStyle = {}))[key1] = resolvedBaseStyle[key1];
99
103
  (directBaseKeys || (directBaseKeys = [])).push(key1);
@@ -103,14 +107,13 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
103
107
  }
104
108
  flushDirectBaseStyle();
105
109
  }
106
- var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);
107
110
  var value = {
108
111
  baseStyle: resolvedBaseStyle,
109
112
  baseVariantProps,
110
113
  baseStylePiece,
111
114
  baseStylePieces,
112
115
  defaultProps,
113
- styledContextKeys: keys ? new Set(keys) : null,
116
+ styledContextKeys,
114
117
  variants,
115
118
  variantStyleResolver: staticConfig.variantStyleResolver,
116
119
  passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName
@@ -1 +1 @@
1
- {"version":3,"file":"styleStaticConfigCore.native.js","names":[],"sources":["cjs/helpers/styleStaticConfigCore.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styleStaticConfigCore_exports = {};\n__export(styleStaticConfigCore_exports, {\n resolveStyleStaticConfig: () => resolveStyleStaticConfig\n});\nmodule.exports = __toCommonJS(styleStaticConfigCore_exports);\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_style = require(\"../style\");\nvar styleStaticConfigCache = /* @__PURE__ */ new WeakMap();\nfunction resolveStyleStaticConfig(staticConfig, conf, revision) {\n var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;\n var configCache = styleStaticConfigCache.get(staticConfig);\n var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);\n if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;\n var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);\n var variants = normalized ? normalized.variants : staticConfig.variants;\n var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;\n var authoredDefaultProps = staticConfig.defaultProps;\n var baseStyle;\n var baseVariantProps;\n var defaultProps;\n var validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);\n if (authoredDefaultProps) {\n for (var key in authoredDefaultProps) {\n var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);\n var isStyle = key !== \"transition\" && (key in validStyles || key in conf.shorthands);\n if (isVariant || isStyle) {\n ;\n (baseStyle || (baseStyle = authoredBaseStyle ? {\n ...authoredBaseStyle\n } : {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant || !isStyle) {\n ;\n (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant) {\n ;\n (baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];\n }\n }\n }\n var resolvedBaseStyle = baseStyle || authoredBaseStyle;\n var baseStylePiece;\n var baseStylePieces;\n if (resolvedBaseStyle && !staticConfig.disableBaseStylePiece) {\n var directBaseStyle;\n var directBaseKeys;\n var flushDirectBaseStyle = function() {\n if (!directBaseStyle || !directBaseKeys) return;\n var piece = (0, import_style.createStylePiece)(directBaseStyle, \"base\");\n baseStylePiece || (baseStylePiece = piece);\n baseStylePieces || (baseStylePieces = {});\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = directBaseKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key2 = _step.value;\n baseStylePieces[key2] = piece;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n directBaseStyle = void 0;\n directBaseKeys = void 0;\n };\n for (var key1 in resolvedBaseStyle) {\n var expanded = conf.shorthands[key1] || key1;\n if (key1 !== \"transition\" && !(variants === null || variants === void 0 ? void 0 : variants[key1]) && expanded in validStyles) {\n ;\n (directBaseStyle || (directBaseStyle = {}))[key1] = resolvedBaseStyle[key1];\n (directBaseKeys || (directBaseKeys = [])).push(key1);\n } else {\n flushDirectBaseStyle();\n }\n }\n flushDirectBaseStyle();\n }\n var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);\n var value = {\n baseStyle: resolvedBaseStyle,\n baseVariantProps,\n baseStylePiece,\n baseStylePieces,\n defaultProps,\n styledContextKeys: keys ? new Set(keys) : null,\n variants,\n variantStyleResolver: staticConfig.variantStyleResolver,\n passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName\n };\n if (!configCache) {\n configCache = /* @__PURE__ */ new WeakMap();\n styleStaticConfigCache.set(staticConfig, configCache);\n }\n configCache.set(conf, {\n revision,\n value\n });\n return value;\n}\n//# sourceMappingURL=styleStaticConfigCore.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gCAAgC,CAAC;AACrC,SAAS,+BAA+B,EACtC,gCAAgC,yBAClC,CAAC;AACD,OAAO,UAAU,aAAa,6BAA6B;AAC3D,IAAI,iBAAiB,QAAQ,kBAAkB;AAC/C,IAAI,eAAe,QAAQ,oBAAU;AACrC,IAAI,yCAAyC,IAAI,QAAQ;AACzD,SAAS,yBAAyB,cAAc,MAAM,UAAU;CAC9D,IAAI,mDAAmD,6BAA6B;CACpF,IAAI,c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;EACA,sBAAsB,aAAa;EACnC,sBAAsB,aAAa,WAAW,uBAAuB,aAAa;CACpF;CACA,IAAI,CAAC,aAAa;EAChB,8BAA8B,IAAI,QAAQ;EAC1C,uBAAuB,IAAI,cAAc,WAAW;CACtD;CACA,YAAY,IAAI,MAAM;EACpB;EACA;CACF,CAAC;CACD,OAAO;AACT"}
1
+ {"version":3,"file":"styleStaticConfigCore.native.js","names":[],"sources":["cjs/helpers/styleStaticConfigCore.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styleStaticConfigCore_exports = {};\n__export(styleStaticConfigCore_exports, {\n resolveStyleStaticConfig: () => resolveStyleStaticConfig\n});\nmodule.exports = __toCommonJS(styleStaticConfigCore_exports);\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_style = require(\"../style\");\nvar styleStaticConfigCache = /* @__PURE__ */ new WeakMap();\nfunction resolveStyleStaticConfig(staticConfig, conf, revision) {\n var _staticConfig_styleFrontend_normalizeStaticConfig, _staticConfig_styleFrontend, _staticConfig_context;\n var configCache = styleStaticConfigCache.get(staticConfig);\n var cached = configCache === null || configCache === void 0 ? void 0 : configCache.get(conf);\n if ((cached === null || cached === void 0 ? void 0 : cached.revision) === revision) return cached.value;\n var normalized = (_staticConfig_styleFrontend = staticConfig.styleFrontend) === null || _staticConfig_styleFrontend === void 0 ? void 0 : (_staticConfig_styleFrontend_normalizeStaticConfig = _staticConfig_styleFrontend.normalizeStaticConfig) === null || _staticConfig_styleFrontend_normalizeStaticConfig === void 0 ? void 0 : _staticConfig_styleFrontend_normalizeStaticConfig.call(_staticConfig_styleFrontend, staticConfig, conf);\n var variants = normalized ? normalized.variants : staticConfig.variants;\n var authoredBaseStyle = normalized ? normalized.baseStyle : staticConfig.baseStyle;\n var authoredDefaultProps = staticConfig.defaultProps;\n var keys = staticConfig.contextProps || ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.propKeys);\n var styledContextKeys = keys ? new Set(keys) : null;\n var baseStyle;\n var baseVariantProps;\n var defaultProps;\n var validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);\n if (authoredDefaultProps) {\n for (var key in authoredDefaultProps) {\n var _staticConfig_inlineProps;\n var isVariant = Boolean(variants === null || variants === void 0 ? void 0 : variants[key]);\n var isStyle = key !== \"transition\" && (key in validStyles || key in conf.shorthands);\n if (isVariant || isStyle) {\n ;\n (baseStyle || (baseStyle = authoredBaseStyle ? {\n ...authoredBaseStyle\n } : {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant || !isStyle || ((_staticConfig_inlineProps = staticConfig.inlineProps) === null || _staticConfig_inlineProps === void 0 ? void 0 : _staticConfig_inlineProps.has(key)) || (styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(key))) {\n ;\n (defaultProps || (defaultProps = {}))[key] = authoredDefaultProps[key];\n }\n if (isVariant) {\n ;\n (baseVariantProps || (baseVariantProps = {}))[key] = authoredDefaultProps[key];\n }\n }\n }\n var resolvedBaseStyle = baseStyle || authoredBaseStyle;\n var baseStylePiece;\n var baseStylePieces;\n if (resolvedBaseStyle && !staticConfig.disableBaseStylePiece) {\n var directBaseStyle;\n var directBaseKeys;\n var flushDirectBaseStyle = function() {\n if (!directBaseStyle || !directBaseKeys) return;\n var piece = (0, import_style.createStylePiece)(directBaseStyle, \"base\");\n baseStylePiece || (baseStylePiece = piece);\n baseStylePieces || (baseStylePieces = {});\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = directBaseKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key2 = _step.value;\n baseStylePieces[key2] = piece;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n directBaseStyle = void 0;\n directBaseKeys = void 0;\n };\n for (var key1 in resolvedBaseStyle) {\n var _staticConfig_inlineProps1;\n var expanded = conf.shorthands[key1] || key1;\n if (key1 !== \"transition\" && !(variants === null || variants === void 0 ? void 0 : variants[key1]) && !((_staticConfig_inlineProps1 = staticConfig.inlineProps) === null || _staticConfig_inlineProps1 === void 0 ? void 0 : _staticConfig_inlineProps1.has(expanded)) && expanded in validStyles) {\n ;\n (directBaseStyle || (directBaseStyle = {}))[key1] = resolvedBaseStyle[key1];\n (directBaseKeys || (directBaseKeys = [])).push(key1);\n } else {\n flushDirectBaseStyle();\n }\n }\n flushDirectBaseStyle();\n }\n var value = {\n baseStyle: resolvedBaseStyle,\n baseVariantProps,\n baseStylePiece,\n baseStylePieces,\n defaultProps,\n styledContextKeys,\n variants,\n variantStyleResolver: staticConfig.variantStyleResolver,\n passthroughClassName: normalized ? normalized.passthroughClassName : staticConfig.passthroughClassName\n };\n if (!configCache) {\n configCache = /* @__PURE__ */ new WeakMap();\n styleStaticConfigCache.set(staticConfig, configCache);\n }\n configCache.set(conf, {\n revision,\n value\n });\n return value;\n}\n//# sourceMappingURL=styleStaticConfigCore.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO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AsB,aAAa;EACnC,sBAAsB,aAAa,WAAW,uBAAuB,aAAa;CACpF;CACA,IAAI,CAAC,aAAa;EAChB,8BAA8B,IAAI,QAAQ;EAC1C,uBAAuB,IAAI,cAAc,WAAW;CACtD;CACA,YAAY,IAAI,MAAM;EACpB;EACA;CACF,CAAC;CACD,OAAO;AACT"}
@@ -28,6 +28,7 @@ __export(styledDynamic_exports, {
28
28
  module.exports = __toCommonJS(styledDynamic_exports);
29
29
  var import_config = require("../config.cjs");
30
30
  var import_createVariable = require("../createVariable.cjs");
31
+ var import_resolveSizing = require("./resolveSizing.cjs");
31
32
  var import_types = require("../types.cjs");
32
33
  const fontLanguageCache = /* @__PURE__ */ new WeakMap();
33
34
  function getFontsForLanguage(fonts, language) {
@@ -142,6 +143,10 @@ function getDynamicEnv(styleState) {
142
143
  fonts,
143
144
  tokens: conf.tokensParsed,
144
145
  theme,
146
+ sizing: {
147
+ ...import_resolveSizing.defaultSizing,
148
+ ...conf.sizing
149
+ },
145
150
  get fontFamily() {
146
151
  return (0, import_createVariable.getVariableValue)(styleState.fontFamily || props.fontFamily) || props.fontFamily || (0, import_createVariable.getVariableValue)((0, import_config.getSetting)("defaultFont"));
147
152
  },
@@ -30,11 +30,8 @@ __export(styledDynamic_exports, {
30
30
  module.exports = __toCommonJS(styledDynamic_exports);
31
31
  var import_config = require("../config.native.js");
32
32
  var import_createVariable = require("../createVariable.native.js");
33
+ var import_resolveSizing = require("./resolveSizing.native.js");
33
34
  var import_types = require("../types.native.js");
34
- function _type_of(obj) {
35
- "@swc/helpers - typeof";
36
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
37
- }
38
35
  var fontLanguageCache = /* @__PURE__ */ new WeakMap();
39
36
  function getFontsForLanguage(fonts, language) {
40
37
  if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);
@@ -47,7 +44,7 @@ function getFontsForLanguage(fonts, language) {
47
44
  return next;
48
45
  }
49
46
  function isStyledDynamic(value) {
50
- return !!value && (typeof value === "function" || (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object") && import_types.styledDynamicSymbol in value;
47
+ return !!value && (typeof value === "function" || typeof value === "object") && import_types.styledDynamicSymbol in value;
51
48
  }
52
49
  var bareStyledDynamic = { [import_types.styledDynamicSymbol]: true };
53
50
  var dynamicSpreadProbe = /* @__PURE__ */ Symbol("tamagui.dynamicSpreadProbe");
@@ -93,7 +90,7 @@ function createDynamicShapeProbe() {
93
90
  return probe;
94
91
  }
95
92
  function findDynamicShapeViolation(value) {
96
- if (!value || (typeof value === "undefined" ? "undefined" : _type_of(value)) !== "object" && typeof value !== "function") return;
93
+ if (!value || typeof value !== "object" && typeof value !== "function") return;
97
94
  var seen = /* @__PURE__ */ new WeakSet();
98
95
  var spread = false;
99
96
  var computed = false;
@@ -116,7 +113,7 @@ function findDynamicShapeViolation(value) {
116
113
  computed = true;
117
114
  }
118
115
  var nested = (_descriptors_key = descriptors[key]) === null || _descriptors_key === void 0 ? void 0 : _descriptors_key.value;
119
- if (nested && ((typeof nested === "undefined" ? "undefined" : _type_of(nested)) === "object" || typeof nested === "function")) {
116
+ if (nested && (typeof nested === "object" || typeof nested === "function")) {
120
117
  visit(nested);
121
118
  }
122
119
  }
@@ -176,6 +173,10 @@ function getDynamicEnv(styleState) {
176
173
  fonts,
177
174
  tokens: conf.tokensParsed,
178
175
  theme,
176
+ sizing: {
177
+ ...import_resolveSizing.defaultSizing,
178
+ ...conf.sizing
179
+ },
179
180
  get fontFamily() {
180
181
  return (0, import_createVariable.getVariableValue)(styleState.fontFamily || props.fontFamily) || props.fontFamily || (0, import_createVariable.getVariableValue)((0, import_config.getSetting)("defaultFont"));
181
182
  },
@@ -30,11 +30,8 @@ __export(styledDynamic_exports, {
30
30
  module.exports = __toCommonJS(styledDynamic_exports);
31
31
  var import_config = require("../config.native.js");
32
32
  var import_createVariable = require("../createVariable.native.js");
33
+ var import_resolveSizing = require("./resolveSizing.native.js");
33
34
  var import_types = require("../types.native.js");
34
- function _type_of(obj) {
35
- "@swc/helpers - typeof";
36
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
37
- }
38
35
  var fontLanguageCache = /* @__PURE__ */ new WeakMap();
39
36
  function getFontsForLanguage(fonts, language) {
40
37
  if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);
@@ -47,7 +44,7 @@ function getFontsForLanguage(fonts, language) {
47
44
  return next;
48
45
  }
49
46
  function isStyledDynamic(value) {
50
- return !!value && (typeof value === "function" || (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object") && import_types.styledDynamicSymbol in value;
47
+ return !!value && (typeof value === "function" || typeof value === "object") && import_types.styledDynamicSymbol in value;
51
48
  }
52
49
  var bareStyledDynamic = { [import_types.styledDynamicSymbol]: true };
53
50
  var dynamicSpreadProbe = /* @__PURE__ */ Symbol("tamagui.dynamicSpreadProbe");
@@ -93,7 +90,7 @@ function createDynamicShapeProbe() {
93
90
  return probe;
94
91
  }
95
92
  function findDynamicShapeViolation(value) {
96
- if (!value || (typeof value === "undefined" ? "undefined" : _type_of(value)) !== "object" && typeof value !== "function") return;
93
+ if (!value || typeof value !== "object" && typeof value !== "function") return;
97
94
  var seen = /* @__PURE__ */ new WeakSet();
98
95
  var spread = false;
99
96
  var computed = false;
@@ -116,7 +113,7 @@ function findDynamicShapeViolation(value) {
116
113
  computed = true;
117
114
  }
118
115
  var nested = (_descriptors_key = descriptors[key]) === null || _descriptors_key === void 0 ? void 0 : _descriptors_key.value;
119
- if (nested && ((typeof nested === "undefined" ? "undefined" : _type_of(nested)) === "object" || typeof nested === "function")) {
116
+ if (nested && (typeof nested === "object" || typeof nested === "function")) {
120
117
  visit(nested);
121
118
  }
122
119
  }
@@ -176,6 +173,10 @@ function getDynamicEnv(styleState) {
176
173
  fonts,
177
174
  tokens: conf.tokensParsed,
178
175
  theme,
176
+ sizing: {
177
+ ...import_resolveSizing.defaultSizing,
178
+ ...conf.sizing
179
+ },
179
180
  get fontFamily() {
180
181
  return (0, import_createVariable.getVariableValue)(styleState.fontFamily || props.fontFamily) || props.fontFamily || (0, import_createVariable.getVariableValue)((0, import_config.getSetting)("defaultFont"));
181
182
  },
@@ -1 +1 @@
1
- {"version":3,"file":"styledDynamic.native.js","names":[],"sources":["cjs/helpers/styledDynamic.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styledDynamic_exports = {};\n__export(styledDynamic_exports, {\n getDynamicEnv: () => getDynamicEnv,\n getFontsForLanguage: () => getFontsForLanguage,\n isStyledDynamic: () => isStyledDynamic,\n styledDynamic: () => styledDynamic\n});\nmodule.exports = __toCommonJS(styledDynamic_exports);\nvar import_config = require(\"../config\");\nvar import_createVariable = require(\"../createVariable\");\nvar import_types = require(\"../types\");\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar fontLanguageCache = /* @__PURE__ */ new WeakMap();\nfunction getFontsForLanguage(fonts, language) {\n if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);\n var next = {\n ...fonts\n };\n for (var name in language) {\n var lang = language[name];\n if (lang !== \"default\") next[name] = fonts[`${name}_${lang}`];\n }\n fontLanguageCache.set(language, next);\n return next;\n}\nfunction isStyledDynamic(value) {\n return !!value && (typeof value === \"function\" || (typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === \"object\") && import_types.styledDynamicSymbol in value;\n}\nvar bareStyledDynamic = {\n [import_types.styledDynamicSymbol]: true\n};\nvar dynamicSpreadProbe = /* @__PURE__ */ Symbol(\"tamagui.dynamicSpreadProbe\");\nvar dynamicComputedProbe = \"__tamagui_dynamic_computed_key__\";\nvar dynamicComputedNumberProbe = 712367821;\nvar dynamicShapeProbeValues = /* @__PURE__ */ new WeakSet();\nfunction createDynamicShapeProbe() {\n var target = function target2() {\n };\n var probe;\n probe = new Proxy(target, {\n apply: function() {\n return probe;\n },\n construct: function() {\n return probe;\n },\n get: function(_target, key) {\n if (key === Symbol.toPrimitive) {\n return function(hint) {\n return hint === \"number\" ? dynamicComputedNumberProbe : dynamicComputedProbe;\n };\n }\n if (key === Symbol.iterator) {\n return function* () {\n yield dynamicComputedProbe;\n };\n }\n if (key === dynamicSpreadProbe) return true;\n return probe;\n },\n getOwnPropertyDescriptor: function(target2, key) {\n return key === dynamicSpreadProbe ? {\n configurable: true,\n enumerable: true,\n value: true\n } : Reflect.getOwnPropertyDescriptor(target2, key);\n },\n ownKeys: function(target2) {\n return [\n ...Reflect.ownKeys(target2),\n dynamicSpreadProbe\n ];\n }\n });\n dynamicShapeProbeValues.add(probe);\n return probe;\n}\nfunction findDynamicShapeViolation(value) {\n if (!value || (typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) !== \"object\" && typeof value !== \"function\") return;\n var seen = /* @__PURE__ */ new WeakSet();\n var spread = false;\n var computed = false;\n var visit = function(current) {\n if (dynamicShapeProbeValues.has(current) || seen.has(current)) return;\n seen.add(current);\n var descriptors;\n try {\n descriptors = Object.getOwnPropertyDescriptors(current);\n } catch (e) {\n return;\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Reflect.ownKeys(descriptors)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n var _descriptors_key;\n if (key === dynamicSpreadProbe) spread = true;\n if (typeof key === \"string\" && (key.includes(dynamicComputedProbe) || key === String(dynamicComputedNumberProbe))) {\n computed = true;\n }\n var nested = (_descriptors_key = descriptors[key]) === null || _descriptors_key === void 0 ? void 0 : _descriptors_key.value;\n if (nested && ((typeof nested === \"undefined\" ? \"undefined\" : _type_of(nested)) === \"object\" || typeof nested === \"function\")) {\n visit(nested);\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n };\n visit(value);\n if (spread || computed) return {\n spread,\n computed\n };\n}\nfunction validateDynamicShape(fn) {\n try {\n var probe = createDynamicShapeProbe();\n var warn = console.warn;\n var output;\n try {\n console.warn = function() {\n };\n output = fn(probe, probe);\n } finally {\n console.warn = warn;\n }\n var violation = findDynamicShapeViolation(output);\n if (!violation) return;\n var reasons = [\n violation.spread ? \"a spread from a dynamic input\" : \"\",\n violation.computed ? \"a computed key from a dynamic input\" : \"\"\n ].filter(Boolean);\n console.warn(`[tamagui] styled.dynamic${fn.name ? ` (${fn.name})` : \"\"} returned ${reasons.join(\" and \")} during its development shape check. Dynamic style bodies require static object keys for extraction; this definition will deopt instead.`);\n } catch (e) {\n }\n}\nfunction styledDynamic(fn) {\n if (!fn) return bareStyledDynamic;\n if (process.env.NODE_ENV === \"development\") validateDynamicShape(fn);\n fn[import_types.styledDynamicSymbol] = true;\n return fn;\n}\nfunction getDynamicEnv(styleState) {\n var cached = styleState.flatDynamicEnv;\n if (cached) return cached;\n var { props, conf, context, theme } = styleState;\n var fonts = conf.fontsParsed;\n if (context === null || context === void 0 ? void 0 : context.language) {\n fonts = getFontsForLanguage(conf.fontsParsed, context.language);\n }\n var next = {\n fonts,\n tokens: conf.tokensParsed,\n theme,\n get fontFamily() {\n return (0, import_createVariable.getVariableValue)(styleState.fontFamily || props.fontFamily) || props.fontFamily || (0, import_createVariable.getVariableValue)((0, import_config.getSetting)(\"defaultFont\"));\n },\n get font() {\n var found = fonts[this.fontFamily];\n if (found) return found;\n var className = props.className;\n if (typeof className === \"string\") {\n var _exec;\n var name = (_exec = /(?:^|\\s)font_(\\S+)/.exec(className)) === null || _exec === void 0 ? void 0 : _exec[1];\n if (name && fonts[name]) return fonts[name];\n }\n return fonts[conf.defaultFontToken];\n }\n };\n return styleState.flatDynamicEnv = next;\n}\n//# sourceMappingURL=styledDynamic.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,wBAAwB,CAAC;AAC7B,SAAS,uBAAuB;CAC9B,qBAAqB;CACrB,2BAA2B;CAC3B,uBAAuB;CACvB,qBAAqB;AACvB,CAAC;AACD,OAAO,UAAU,aAAa,qBAAqB;AACnD,IAAI,gBAAgB,QAAQ,qBAAW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QAAQ,KAAK;EACb;EACA,IAAI,aAAa;GACf,QAAQ,GAAG,sBAAsB,iBAAgB,CAAE,WAAW,cAAc,MAAM,UAAU,KAAK,MAAM,eAAe,GAAG,sBAAsB,iBAAgB,EAAG,GAAG,cAAc,WAAU,CAAE,aAAa,CAAC;EAC/M;EACA,IAAI,OAAO;GACT,IAAI,QAAQ,MAAM,KAAK;GACvB,IAAI,OAAO,OAAO;GAClB,IAAI,YAAY,MAAM;GACtB,IAAI,OAAO,cAAc,UAAU;IACjC,IAAI;IACJ,IAAI,QAAQ,QAAQ,qBAAqB,KAAK,SAAS,OAAO,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;IACxG,IAAI,QAAQ,MAAM,OAAO,OAAO,MAAM;GACxC;GACA,OAAO,MAAM,KAAK;EACpB;CACF;CACA,OAAO,WAAW,iBAAiB;AACrC"}
1
+ {"version":3,"file":"styledDynamic.native.js","names":[],"sources":["cjs/helpers/styledDynamic.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar styledDynamic_exports = {};\n__export(styledDynamic_exports, {\n getDynamicEnv: () => getDynamicEnv,\n getFontsForLanguage: () => getFontsForLanguage,\n isStyledDynamic: () => isStyledDynamic,\n styledDynamic: () => styledDynamic\n});\nmodule.exports = __toCommonJS(styledDynamic_exports);\nvar import_config = require(\"../config\");\nvar import_createVariable = require(\"../createVariable\");\nvar import_resolveSizing = require(\"./resolveSizing\");\nvar import_types = require(\"../types\");\nvar fontLanguageCache = /* @__PURE__ */ new WeakMap();\nfunction getFontsForLanguage(fonts, language) {\n if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);\n var next = {\n ...fonts\n };\n for (var name in language) {\n var lang = language[name];\n if (lang !== \"default\") next[name] = fonts[`${name}_${lang}`];\n }\n fontLanguageCache.set(language, next);\n return next;\n}\nfunction isStyledDynamic(value) {\n return !!value && (typeof value === \"function\" || typeof value === \"object\") && import_types.styledDynamicSymbol in value;\n}\nvar bareStyledDynamic = {\n [import_types.styledDynamicSymbol]: true\n};\nvar dynamicSpreadProbe = /* @__PURE__ */ Symbol(\"tamagui.dynamicSpreadProbe\");\nvar dynamicComputedProbe = \"__tamagui_dynamic_computed_key__\";\nvar dynamicComputedNumberProbe = 712367821;\nvar dynamicShapeProbeValues = /* @__PURE__ */ new WeakSet();\nfunction createDynamicShapeProbe() {\n var target = function target2() {\n };\n var probe;\n probe = new Proxy(target, {\n apply: function() {\n return probe;\n },\n construct: function() {\n return probe;\n },\n get: function(_target, key) {\n if (key === Symbol.toPrimitive) {\n return function(hint) {\n return hint === \"number\" ? dynamicComputedNumberProbe : dynamicComputedProbe;\n };\n }\n if (key === Symbol.iterator) {\n return function* () {\n yield dynamicComputedProbe;\n };\n }\n if (key === dynamicSpreadProbe) return true;\n return probe;\n },\n getOwnPropertyDescriptor: function(target2, key) {\n return key === dynamicSpreadProbe ? {\n configurable: true,\n enumerable: true,\n value: true\n } : Reflect.getOwnPropertyDescriptor(target2, key);\n },\n ownKeys: function(target2) {\n return [\n ...Reflect.ownKeys(target2),\n dynamicSpreadProbe\n ];\n }\n });\n dynamicShapeProbeValues.add(probe);\n return probe;\n}\nfunction findDynamicShapeViolation(value) {\n if (!value || typeof value !== \"object\" && typeof value !== \"function\") return;\n var seen = /* @__PURE__ */ new WeakSet();\n var spread = false;\n var computed = false;\n var visit = function(current) {\n if (dynamicShapeProbeValues.has(current) || seen.has(current)) return;\n seen.add(current);\n var descriptors;\n try {\n descriptors = Object.getOwnPropertyDescriptors(current);\n } catch (e) {\n return;\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Reflect.ownKeys(descriptors)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n var _descriptors_key;\n if (key === dynamicSpreadProbe) spread = true;\n if (typeof key === \"string\" && (key.includes(dynamicComputedProbe) || key === String(dynamicComputedNumberProbe))) {\n computed = true;\n }\n var nested = (_descriptors_key = descriptors[key]) === null || _descriptors_key === void 0 ? void 0 : _descriptors_key.value;\n if (nested && (typeof nested === \"object\" || typeof nested === \"function\")) {\n visit(nested);\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n };\n visit(value);\n if (spread || computed) return {\n spread,\n computed\n };\n}\nfunction validateDynamicShape(fn) {\n try {\n var probe = createDynamicShapeProbe();\n var warn = console.warn;\n var output;\n try {\n console.warn = function() {\n };\n output = fn(probe, probe);\n } finally {\n console.warn = warn;\n }\n var violation = findDynamicShapeViolation(output);\n if (!violation) return;\n var reasons = [\n violation.spread ? \"a spread from a dynamic input\" : \"\",\n violation.computed ? \"a computed key from a dynamic input\" : \"\"\n ].filter(Boolean);\n console.warn(`[tamagui] styled.dynamic${fn.name ? ` (${fn.name})` : \"\"} returned ${reasons.join(\" and \")} during its development shape check. Dynamic style bodies require static object keys for extraction; this definition will deopt instead.`);\n } catch (e) {\n }\n}\nfunction styledDynamic(fn) {\n if (!fn) return bareStyledDynamic;\n if (process.env.NODE_ENV === \"development\") validateDynamicShape(fn);\n fn[import_types.styledDynamicSymbol] = true;\n return fn;\n}\nfunction getDynamicEnv(styleState) {\n var cached = styleState.flatDynamicEnv;\n if (cached) return cached;\n var { props, conf, context, theme } = styleState;\n var fonts = conf.fontsParsed;\n if (context === null || context === void 0 ? void 0 : context.language) {\n fonts = getFontsForLanguage(conf.fontsParsed, context.language);\n }\n var next = {\n fonts,\n tokens: conf.tokensParsed,\n theme,\n sizing: {\n ...import_resolveSizing.defaultSizing,\n ...conf.sizing\n },\n get fontFamily() {\n return (0, import_createVariable.getVariableValue)(styleState.fontFamily || props.fontFamily) || props.fontFamily || (0, import_createVariable.getVariableValue)((0, import_config.getSetting)(\"defaultFont\"));\n },\n get font() {\n var found = fonts[this.fontFamily];\n if (found) return found;\n var className = props.className;\n if (typeof className === \"string\") {\n var _exec;\n var name = (_exec = /(?:^|\\s)font_(\\S+)/.exec(className)) === null || _exec === void 0 ? void 0 : _exec[1];\n if (name && fonts[name]) return fonts[name];\n }\n return fonts[conf.defaultFontToken];\n }\n };\n return styleState.flatDynamicEnv = next;\n}\n//# sourceMappingURL=styledDynamic.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,O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AAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,UAAU;EACtE,QAAQ,oBAAoB,KAAK,aAAa,QAAQ,QAAQ;CAChE;CACA,IAAI,OAAO;EACT;EACA,QAAQ,KAAK;EACb;EACA,QAAQ;GACN,GAAG,qBAAqB;GACxB,GAAG,KAAK;EACV;EACA,IAAI,aAAa;GACf,QAAQ,GAAG,sBAAsB,iBAAgB,CAAE,WAAW,cAAc,MAAM,UAAU,KAAK,MAAM,eAAe,GAAG,sBAAsB,iBAAgB,EAAG,GAAG,cAAc,WAAU,CAAE,aAAa,CAAC;EAC/M;EACA,IAAI,OAAO;GACT,IAAI,QAAQ,MAAM,KAAK;GACvB,IAAI,OAAO,OAAO;GAClB,IAAI,YAAY,MAAM;GACtB,IAAI,OAAO,cAAc,UAAU;IACjC,IAAI;IACJ,IAAI,QAAQ,QAAQ,qBAAqB,KAAK,SAAS,OAAO,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM;IACxG,IAAI,QAAQ,MAAM,OAAO,OAAO,MAAM;GACxC;GACA,OAAO,MAAM,KAAK;EACpB;CACF;CACA,OAAO,WAAW,iBAAiB;AACrC"}
@@ -91,13 +91,22 @@ const createGroupListener = (name, { setStateShallow, pseudoGroups, mediaGroups,
91
91
  Object.assign(group.pseudo, pseudo);
92
92
  didChange = true;
93
93
  }
94
- } else if (layout && mediaGroups) {
95
- group.media ||= {};
96
- const mediaState = (0, import_useMedia.getMediaState)(mediaGroups, layout);
97
- const next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState);
98
- if (next !== group.media) {
99
- Object.assign(group.media, next);
100
- didChange = true;
94
+ } else if (layout) {
95
+ if (mediaGroups) {
96
+ group.media ||= {};
97
+ const mediaState = (0, import_useMedia.getMediaState)(mediaGroups, layout);
98
+ const next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState);
99
+ if (next !== group.media) {
100
+ Object.assign(group.media, next);
101
+ didChange = true;
102
+ }
103
+ }
104
+ if (layout.width !== void 0) {
105
+ const prevWidth = group.layout?.width;
106
+ if (prevWidth === void 0 || Math.abs(prevWidth - layout.width) >= .5) {
107
+ group.layout = layout;
108
+ didChange = true;
109
+ }
101
110
  }
102
111
  }
103
112
  if (didChange) {
@@ -150,14 +150,24 @@ var createGroupListener = function(name, param) {
150
150
  Object.assign(group.pseudo, pseudo);
151
151
  didChange = true;
152
152
  }
153
- } else if (layout && mediaGroups) {
154
- var _group1;
155
- (_group1 = group).media || (_group1.media = {});
156
- var mediaState = (0, import_useMedia.getMediaState)(mediaGroups, layout);
157
- var next1 = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState);
158
- if (next1 !== group.media) {
159
- Object.assign(group.media, next1);
160
- didChange = true;
153
+ } else if (layout) {
154
+ if (mediaGroups) {
155
+ var _group1;
156
+ (_group1 = group).media || (_group1.media = {});
157
+ var mediaState = (0, import_useMedia.getMediaState)(mediaGroups, layout);
158
+ var next1 = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState);
159
+ if (next1 !== group.media) {
160
+ Object.assign(group.media, next1);
161
+ didChange = true;
162
+ }
163
+ }
164
+ if (layout.width !== void 0) {
165
+ var _group_layout;
166
+ var prevWidth = (_group_layout = group.layout) === null || _group_layout === void 0 ? void 0 : _group_layout.width;
167
+ if (prevWidth === void 0 || Math.abs(prevWidth - layout.width) >= .5) {
168
+ group.layout = layout;
169
+ didChange = true;
170
+ }
161
171
  }
162
172
  }
163
173
  if (didChange) {
@@ -150,14 +150,24 @@ var createGroupListener = function(name, param) {
150
150
  Object.assign(group.pseudo, pseudo);
151
151
  didChange = true;
152
152
  }
153
- } else if (layout && mediaGroups) {
154
- var _group1;
155
- (_group1 = group).media || (_group1.media = {});
156
- var mediaState = (0, import_useMedia.getMediaState)(mediaGroups, layout);
157
- var next1 = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState);
158
- if (next1 !== group.media) {
159
- Object.assign(group.media, next1);
160
- didChange = true;
153
+ } else if (layout) {
154
+ if (mediaGroups) {
155
+ var _group1;
156
+ (_group1 = group).media || (_group1.media = {});
157
+ var mediaState = (0, import_useMedia.getMediaState)(mediaGroups, layout);
158
+ var next1 = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(group.media, mediaState);
159
+ if (next1 !== group.media) {
160
+ Object.assign(group.media, next1);
161
+ didChange = true;
162
+ }
163
+ }
164
+ if (layout.width !== void 0) {
165
+ var _group_layout;
166
+ var prevWidth = (_group_layout = group.layout) === null || _group_layout === void 0 ? void 0 : _group_layout.width;
167
+ if (prevWidth === void 0 || Math.abs(prevWidth - layout.width) >= .5) {
168
+ group.layout = layout;
169
+ didChange = true;
170
+ }
161
171
  }
162
172
  }
163
173
  if (didChange) {