@tamagui/web 3.0.0-beta.765.1 → 3.0.0-beta.804.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) hide show
  1. package/dist/cjs/createComponent.cjs +83 -86
  2. package/dist/cjs/createComponent.native.cjs +96 -103
  3. package/dist/cjs/createComponent.native.js +96 -103
  4. package/dist/cjs/createComponent.native.js.map +1 -1
  5. package/dist/cjs/createTamagui.cjs +9 -7
  6. package/dist/cjs/createTamagui.native.cjs +9 -7
  7. package/dist/cjs/createTamagui.native.js +9 -7
  8. package/dist/cjs/createTamagui.native.js.map +1 -1
  9. package/dist/cjs/helpers/defaultAnimationDriver.cjs +0 -1
  10. package/dist/cjs/helpers/defaultAnimationDriver.native.cjs +0 -1
  11. package/dist/cjs/helpers/defaultAnimationDriver.native.js +0 -1
  12. package/dist/cjs/helpers/defaultAnimationDriver.native.js.map +1 -1
  13. package/dist/cjs/helpers/directStyleCSS.cjs +348 -0
  14. package/dist/cjs/helpers/directStyleCSS.native.cjs +20 -0
  15. package/dist/cjs/helpers/directStyleCSS.native.js +22 -0
  16. package/dist/cjs/helpers/directStyleCSS.native.js.map +1 -0
  17. package/dist/cjs/helpers/directStyleCSSCompiled.cjs +40 -0
  18. package/dist/cjs/helpers/directStyleCSSCompiled.native.cjs +46 -0
  19. package/dist/cjs/helpers/directStyleCSSCompiled.native.js +48 -0
  20. package/dist/cjs/helpers/directStyleCSSCompiled.native.js.map +1 -0
  21. package/dist/cjs/helpers/getCSSStylesAtomic.cjs +92 -74
  22. package/dist/cjs/helpers/{getFontLanguage.native.cjs → getCSSStylesAtomicCompiled.cjs} +12 -8
  23. package/dist/cjs/helpers/{getFontLanguage.native.js → getCSSStylesAtomicCompiled.native.cjs} +12 -8
  24. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js +36 -0
  25. package/dist/cjs/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -0
  26. package/dist/cjs/helpers/getSplitStyles.cjs +2417 -548
  27. package/dist/cjs/helpers/getSplitStyles.native.cjs +2758 -621
  28. package/dist/cjs/helpers/getSplitStyles.native.js +2758 -621
  29. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  30. package/dist/cjs/helpers/getVariantExtras.cjs +8 -3
  31. package/dist/cjs/helpers/getVariantExtras.native.cjs +8 -3
  32. package/dist/cjs/helpers/getVariantExtras.native.js +8 -3
  33. package/dist/cjs/helpers/getVariantExtras.native.js.map +1 -1
  34. package/dist/cjs/helpers/insertStyleRule.cjs +2 -1
  35. package/dist/cjs/helpers/insertStyleRule.native.cjs +68 -5
  36. package/dist/cjs/helpers/insertStyleRule.native.js +68 -5
  37. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  38. package/dist/cjs/helpers/mediaState.cjs +12 -0
  39. package/dist/cjs/helpers/mediaState.native.cjs +12 -0
  40. package/dist/cjs/helpers/mediaState.native.js +12 -0
  41. package/dist/cjs/helpers/mediaState.native.js.map +1 -1
  42. package/dist/cjs/helpers/normalizeStyle.cjs +16 -2
  43. package/dist/cjs/helpers/normalizeStyle.native.cjs +16 -2
  44. package/dist/cjs/helpers/normalizeStyle.native.js +16 -2
  45. package/dist/cjs/helpers/normalizeStyle.native.js.map +1 -1
  46. package/dist/cjs/helpers/resolveRem.cjs +1 -1
  47. package/dist/cjs/helpers/skipProps.cjs +6 -1
  48. package/dist/cjs/helpers/skipProps.native.cjs +6 -1
  49. package/dist/cjs/helpers/skipProps.native.js +6 -1
  50. package/dist/cjs/helpers/skipProps.native.js.map +1 -1
  51. package/dist/cjs/helpers/styleFrontend.cjs +2 -8
  52. package/dist/cjs/helpers/styleFrontend.native.cjs +2 -10
  53. package/dist/cjs/helpers/styleFrontend.native.js +2 -10
  54. package/dist/cjs/helpers/styleFrontend.native.js.map +1 -1
  55. package/dist/cjs/helpers/styleToCSS.cjs +59 -0
  56. package/dist/cjs/helpers/{normalizeStylePropKeys.cjs → styleToCSS.native.cjs} +6 -4
  57. package/dist/cjs/helpers/{getFontLanguage.cjs → styleToCSS.native.js} +8 -4
  58. package/dist/cjs/helpers/styleToCSS.native.js.map +1 -0
  59. package/dist/cjs/helpers/subscribeToContextGroup.cjs +28 -1
  60. package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +45 -1
  61. package/dist/cjs/helpers/subscribeToContextGroup.native.js +45 -1
  62. package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
  63. package/dist/cjs/helpers/variables.cjs +3 -2
  64. package/dist/cjs/helpers/variables.native.cjs +3 -2
  65. package/dist/cjs/helpers/variables.native.js +3 -2
  66. package/dist/cjs/helpers/variables.native.js.map +1 -1
  67. package/dist/cjs/helpers/wrapStyleTags.cjs +5 -3
  68. package/dist/cjs/helpers/wrapStyleTags.native.cjs +3 -1
  69. package/dist/cjs/helpers/wrapStyleTags.native.js +3 -1
  70. package/dist/cjs/helpers/wrapStyleTags.native.js.map +1 -1
  71. package/dist/cjs/hooks/useComponentState.cjs +70 -89
  72. package/dist/cjs/hooks/useComponentState.native.cjs +70 -88
  73. package/dist/cjs/hooks/useComponentState.native.js +70 -88
  74. package/dist/cjs/hooks/useComponentState.native.js.map +1 -1
  75. package/dist/cjs/hooks/useMedia.cjs +3 -15
  76. package/dist/cjs/hooks/useMedia.native.cjs +3 -15
  77. package/dist/cjs/hooks/useMedia.native.js +3 -15
  78. package/dist/cjs/hooks/useMedia.native.js.map +1 -1
  79. package/dist/cjs/hooks/useProps.cjs +7 -5
  80. package/dist/cjs/hooks/useProps.native.cjs +7 -5
  81. package/dist/cjs/hooks/useProps.native.js +7 -5
  82. package/dist/cjs/hooks/useProps.native.js.map +1 -1
  83. package/dist/cjs/hooks/useSplitStyles.cjs +42 -0
  84. package/dist/cjs/hooks/useSplitStyles.native.cjs +42 -0
  85. package/dist/cjs/hooks/useSplitStyles.native.js +44 -0
  86. package/dist/cjs/hooks/useSplitStyles.native.js.map +1 -0
  87. package/dist/cjs/index.cjs +184 -70
  88. package/dist/cjs/index.native.cjs +184 -70
  89. package/dist/cjs/index.native.js +184 -70
  90. package/dist/cjs/index.native.js.map +1 -1
  91. package/dist/cjs/insertFont.cjs +1 -1
  92. package/dist/cjs/insertFont.native.cjs +1 -0
  93. package/dist/cjs/insertFont.native.js +1 -0
  94. package/dist/cjs/insertFont.native.js.map +1 -1
  95. package/dist/cjs/internal-runtime.cjs +33 -6
  96. package/dist/cjs/internal-runtime.native.cjs +33 -6
  97. package/dist/cjs/internal-runtime.native.js +33 -6
  98. package/dist/cjs/internal-runtime.native.js.map +1 -1
  99. package/dist/cjs/setupReactNative.cjs +1 -29
  100. package/dist/cjs/setupReactNative.native.cjs +1 -3
  101. package/dist/cjs/setupReactNative.native.js +1 -3
  102. package/dist/cjs/setupReactNative.native.js.map +1 -1
  103. package/dist/cjs/static-resolve.cjs +229 -0
  104. package/dist/cjs/static-resolve.native.cjs +242 -0
  105. package/dist/cjs/static-resolve.native.js +244 -0
  106. package/dist/cjs/static-resolve.native.js.map +1 -0
  107. package/dist/cjs/styled.cjs +23 -37
  108. package/dist/cjs/styled.native.cjs +22 -37
  109. package/dist/cjs/styled.native.js +22 -37
  110. package/dist/cjs/styled.native.js.map +1 -1
  111. package/dist/cjs/views/TamaguiProvider.cjs +4 -8
  112. package/dist/cjs/views/TamaguiProvider.native.cjs +4 -8
  113. package/dist/cjs/views/TamaguiProvider.native.js +4 -8
  114. package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
  115. package/dist/cjs/views/ThemeUpdate.cjs +1 -1
  116. package/dist/cjs/views/ThemeUpdate.native.cjs +1 -1
  117. package/dist/cjs/views/ThemeUpdate.native.js +1 -1
  118. package/dist/cjs/views/ThemeUpdate.native.js.map +1 -1
  119. package/dist/esm/createComponent.mjs +85 -88
  120. package/dist/esm/createComponent.mjs.map +1 -1
  121. package/dist/esm/createComponent.native.js +98 -105
  122. package/dist/esm/createComponent.native.js.map +1 -1
  123. package/dist/esm/createTamagui.mjs +9 -7
  124. package/dist/esm/createTamagui.mjs.map +1 -1
  125. package/dist/esm/createTamagui.native.js +9 -7
  126. package/dist/esm/createTamagui.native.js.map +1 -1
  127. package/dist/esm/helpers/defaultAnimationDriver.mjs +0 -1
  128. package/dist/esm/helpers/defaultAnimationDriver.mjs.map +1 -1
  129. package/dist/esm/helpers/defaultAnimationDriver.native.js +0 -1
  130. package/dist/esm/helpers/defaultAnimationDriver.native.js.map +1 -1
  131. package/dist/esm/helpers/directStyleCSS.mjs +320 -0
  132. package/dist/esm/helpers/directStyleCSS.mjs.map +1 -0
  133. package/dist/esm/helpers/directStyleCSS.native.js +1 -0
  134. package/dist/esm/helpers/directStyleCSSCompiled.mjs +11 -0
  135. package/dist/esm/helpers/directStyleCSSCompiled.mjs.map +1 -0
  136. package/dist/esm/helpers/directStyleCSSCompiled.native.js +15 -0
  137. package/dist/esm/helpers/directStyleCSSCompiled.native.js.map +1 -0
  138. package/dist/esm/helpers/getCSSStylesAtomic.mjs +86 -72
  139. package/dist/esm/helpers/getCSSStylesAtomic.mjs.map +1 -1
  140. package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs +9 -0
  141. package/dist/esm/helpers/getCSSStylesAtomicCompiled.mjs.map +1 -0
  142. package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js +9 -0
  143. package/dist/esm/helpers/getCSSStylesAtomicCompiled.native.js.map +1 -0
  144. package/dist/esm/helpers/getSplitStyles.mjs +2406 -545
  145. package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
  146. package/dist/esm/helpers/getSplitStyles.native.js +2751 -618
  147. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  148. package/dist/esm/helpers/getVariantExtras.mjs +8 -3
  149. package/dist/esm/helpers/getVariantExtras.mjs.map +1 -1
  150. package/dist/esm/helpers/getVariantExtras.native.js +8 -3
  151. package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
  152. package/dist/esm/helpers/insertStyleRule.mjs +2 -1
  153. package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
  154. package/dist/esm/helpers/insertStyleRule.native.js +69 -3
  155. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  156. package/dist/esm/helpers/mediaState.mjs +12 -1
  157. package/dist/esm/helpers/mediaState.mjs.map +1 -1
  158. package/dist/esm/helpers/mediaState.native.js +12 -1
  159. package/dist/esm/helpers/mediaState.native.js.map +1 -1
  160. package/dist/esm/helpers/normalizeStyle.mjs +16 -2
  161. package/dist/esm/helpers/normalizeStyle.mjs.map +1 -1
  162. package/dist/esm/helpers/normalizeStyle.native.js +16 -2
  163. package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
  164. package/dist/esm/helpers/resolveRem.mjs +1 -1
  165. package/dist/esm/helpers/resolveRem.mjs.map +1 -1
  166. package/dist/esm/helpers/skipProps.mjs +3 -1
  167. package/dist/esm/helpers/skipProps.mjs.map +1 -1
  168. package/dist/esm/helpers/skipProps.native.js +3 -1
  169. package/dist/esm/helpers/skipProps.native.js.map +1 -1
  170. package/dist/esm/helpers/styleFrontend.mjs +2 -4
  171. package/dist/esm/helpers/styleFrontend.mjs.map +1 -1
  172. package/dist/esm/helpers/styleFrontend.native.js +2 -6
  173. package/dist/esm/helpers/styleFrontend.native.js.map +1 -1
  174. package/dist/esm/helpers/styleToCSS.mjs +40 -0
  175. package/dist/esm/helpers/styleToCSS.mjs.map +1 -0
  176. package/dist/esm/helpers/styleToCSS.native.js +4 -0
  177. package/dist/esm/helpers/styleToCSS.native.js.map +1 -0
  178. package/dist/esm/helpers/subscribeToContextGroup.mjs +25 -1
  179. package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
  180. package/dist/esm/helpers/subscribeToContextGroup.native.js +42 -1
  181. package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
  182. package/dist/esm/helpers/variables.mjs +2 -1
  183. package/dist/esm/helpers/variables.mjs.map +1 -1
  184. package/dist/esm/helpers/variables.native.js +2 -1
  185. package/dist/esm/helpers/variables.native.js.map +1 -1
  186. package/dist/esm/helpers/wrapStyleTags.mjs +5 -3
  187. package/dist/esm/helpers/wrapStyleTags.mjs.map +1 -1
  188. package/dist/esm/helpers/wrapStyleTags.native.js +3 -1
  189. package/dist/esm/helpers/wrapStyleTags.native.js.map +1 -1
  190. package/dist/esm/hooks/useComponentState.mjs +71 -90
  191. package/dist/esm/hooks/useComponentState.mjs.map +1 -1
  192. package/dist/esm/hooks/useComponentState.native.js +71 -89
  193. package/dist/esm/hooks/useComponentState.native.js.map +1 -1
  194. package/dist/esm/hooks/useMedia.mjs +2 -15
  195. package/dist/esm/hooks/useMedia.mjs.map +1 -1
  196. package/dist/esm/hooks/useMedia.native.js +2 -15
  197. package/dist/esm/hooks/useMedia.native.js.map +1 -1
  198. package/dist/esm/hooks/useProps.mjs +7 -5
  199. package/dist/esm/hooks/useProps.mjs.map +1 -1
  200. package/dist/esm/hooks/useProps.native.js +7 -5
  201. package/dist/esm/hooks/useProps.native.js.map +1 -1
  202. package/dist/esm/hooks/useSplitStyles.mjs +17 -0
  203. package/dist/esm/hooks/useSplitStyles.mjs.map +1 -0
  204. package/dist/esm/hooks/useSplitStyles.native.js +14 -0
  205. package/dist/esm/hooks/useSplitStyles.native.js.map +1 -0
  206. package/dist/esm/index.js +57 -137
  207. package/dist/esm/index.mjs +57 -137
  208. package/dist/esm/index.native.js +57 -137
  209. package/dist/esm/insertFont.mjs +1 -1
  210. package/dist/esm/insertFont.mjs.map +1 -1
  211. package/dist/esm/insertFont.native.js +1 -0
  212. package/dist/esm/insertFont.native.js.map +1 -1
  213. package/dist/esm/internal-runtime.mjs +23 -4
  214. package/dist/esm/internal-runtime.mjs.map +1 -1
  215. package/dist/esm/internal-runtime.native.js +23 -4
  216. package/dist/esm/internal-runtime.native.js.map +1 -1
  217. package/dist/esm/setupReactNative.mjs +1 -29
  218. package/dist/esm/setupReactNative.mjs.map +1 -1
  219. package/dist/esm/setupReactNative.native.js +1 -3
  220. package/dist/esm/setupReactNative.native.js.map +1 -1
  221. package/dist/esm/static-resolve.mjs +194 -0
  222. package/dist/esm/static-resolve.mjs.map +1 -0
  223. package/dist/esm/static-resolve.native.js +205 -0
  224. package/dist/esm/static-resolve.native.js.map +1 -0
  225. package/dist/esm/styled.mjs +24 -40
  226. package/dist/esm/styled.mjs.map +1 -1
  227. package/dist/esm/styled.native.js +23 -40
  228. package/dist/esm/styled.native.js.map +1 -1
  229. package/dist/esm/views/TamaguiProvider.mjs +4 -8
  230. package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
  231. package/dist/esm/views/TamaguiProvider.native.js +4 -8
  232. package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
  233. package/dist/esm/views/ThemeUpdate.mjs +1 -1
  234. package/dist/esm/views/ThemeUpdate.mjs.map +1 -1
  235. package/dist/esm/views/ThemeUpdate.native.js +1 -1
  236. package/dist/esm/views/ThemeUpdate.native.js.map +1 -1
  237. package/package.json +25 -15
  238. package/reset.css +3 -3
  239. package/src/createComponent.tsx +175 -192
  240. package/src/createTamagui.ts +10 -9
  241. package/src/helpers/defaultAnimationDriver.tsx +0 -1
  242. package/src/helpers/directStyleCSS.native.ts +1 -0
  243. package/src/helpers/directStyleCSS.ts +534 -0
  244. package/src/helpers/directStyleCSSCompiled.ts +32 -0
  245. package/src/helpers/getCSSStylesAtomic.ts +168 -88
  246. package/src/helpers/getCSSStylesAtomicCompiled.ts +9 -0
  247. package/src/helpers/getSplitStyles.tsx +4653 -1003
  248. package/src/helpers/getVariantExtras.tsx +15 -3
  249. package/src/helpers/insertStyleRule.tsx +4 -2
  250. package/src/helpers/mediaState.ts +15 -0
  251. package/src/helpers/normalizeStyle.ts +27 -2
  252. package/src/helpers/resolveRem.ts +1 -1
  253. package/src/helpers/skipProps.ts +3 -0
  254. package/src/helpers/styleFrontend.ts +20 -27
  255. package/src/helpers/styleToCSS.native.ts +1 -0
  256. package/src/helpers/styleToCSS.ts +43 -0
  257. package/src/helpers/subscribeToContextGroup.tsx +30 -0
  258. package/src/helpers/variables.ts +2 -1
  259. package/src/helpers/warnOnce.ts +3 -4
  260. package/src/helpers/wrapStyleTags.tsx +1 -1
  261. package/src/hooks/useComponentState.ts +118 -158
  262. package/src/hooks/useMedia.tsx +2 -18
  263. package/src/hooks/useProps.tsx +19 -15
  264. package/src/hooks/useSplitStyles.tsx +26 -0
  265. package/src/index.ts +298 -73
  266. package/src/insertFont.ts +5 -1
  267. package/src/internal-runtime.ts +49 -24
  268. package/src/internalRuntimeTypes.ts +2 -7
  269. package/src/setupReactNative.ts +7 -30
  270. package/src/static-resolve.ts +396 -0
  271. package/src/styled.tsx +34 -11
  272. package/src/types.tsx +40 -30
  273. package/src/views/TamaguiProvider.tsx +23 -22
  274. package/src/views/ThemeUpdate.tsx +3 -1
  275. package/types/createComponent.d.ts.map +1 -1
  276. package/types/createTamagui.d.ts.map +1 -1
  277. package/types/helpers/defaultAnimationDriver.d.ts.map +1 -1
  278. package/types/helpers/directStyleCSS.d.ts +28 -0
  279. package/types/helpers/directStyleCSS.d.ts.map +1 -0
  280. package/types/helpers/directStyleCSS.native.d.ts +2 -0
  281. package/types/helpers/directStyleCSS.native.d.ts.map +1 -0
  282. package/types/helpers/directStyleCSSCompiled.d.ts +10 -0
  283. package/types/helpers/directStyleCSSCompiled.d.ts.map +1 -0
  284. package/types/helpers/getCSSStylesAtomic.d.ts +22 -1
  285. package/types/helpers/getCSSStylesAtomic.d.ts.map +1 -1
  286. package/types/helpers/getCSSStylesAtomicCompiled.d.ts +4 -0
  287. package/types/helpers/getCSSStylesAtomicCompiled.d.ts.map +1 -0
  288. package/types/helpers/getSplitStyles.d.ts +11 -4
  289. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  290. package/types/helpers/getVariantExtras.d.ts.map +1 -1
  291. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  292. package/types/helpers/mediaState.d.ts +4 -0
  293. package/types/helpers/mediaState.d.ts.map +1 -1
  294. package/types/helpers/normalizeStyle.d.ts +1 -1
  295. package/types/helpers/normalizeStyle.d.ts.map +1 -1
  296. package/types/helpers/skipProps.d.ts +2 -0
  297. package/types/helpers/skipProps.d.ts.map +1 -1
  298. package/types/helpers/styleFrontend.d.ts +13 -17
  299. package/types/helpers/styleFrontend.d.ts.map +1 -1
  300. package/types/helpers/styleToCSS.d.ts +2 -0
  301. package/types/helpers/styleToCSS.d.ts.map +1 -0
  302. package/types/helpers/styleToCSS.native.d.ts +2 -0
  303. package/types/helpers/styleToCSS.native.d.ts.map +1 -0
  304. package/types/helpers/subscribeToContextGroup.d.ts +1 -0
  305. package/types/helpers/subscribeToContextGroup.d.ts.map +1 -1
  306. package/types/helpers/variables.d.ts.map +1 -1
  307. package/types/helpers/warnOnce.d.ts.map +1 -1
  308. package/types/helpers/webPropsToSkip.native.d.ts +5 -0
  309. package/types/helpers/webPropsToSkip.native.d.ts.map +1 -1
  310. package/types/hooks/useComponentState.d.ts +3 -2
  311. package/types/hooks/useComponentState.d.ts.map +1 -1
  312. package/types/hooks/useMedia.d.ts +1 -5
  313. package/types/hooks/useMedia.d.ts.map +1 -1
  314. package/types/hooks/useProps.d.ts.map +1 -1
  315. package/types/hooks/useSplitStyles.d.ts +3 -0
  316. package/types/hooks/useSplitStyles.d.ts.map +1 -0
  317. package/types/index.d.ts +58 -72
  318. package/types/index.d.ts.map +1 -1
  319. package/types/insertFont.d.ts.map +1 -1
  320. package/types/internal-runtime.d.ts +24 -11
  321. package/types/internal-runtime.d.ts.map +1 -1
  322. package/types/internalRuntimeTypes.d.ts +1 -6
  323. package/types/internalRuntimeTypes.d.ts.map +1 -1
  324. package/types/setupReactNative.d.ts +2 -3
  325. package/types/setupReactNative.d.ts.map +1 -1
  326. package/types/static-resolve.d.ts +79 -0
  327. package/types/static-resolve.d.ts.map +1 -0
  328. package/types/styled.d.ts.map +1 -1
  329. package/types/types.d.ts +29 -22
  330. package/types/types.d.ts.map +1 -1
  331. package/types/views/TamaguiProvider.d.ts.map +1 -1
  332. package/types/views/ThemeUpdate.d.ts.map +1 -1
  333. package/dist/cjs/constants/accessibilityDirectMap.cjs +0 -34
  334. package/dist/cjs/constants/accessibilityDirectMap.native.cjs +0 -36
  335. package/dist/cjs/constants/accessibilityDirectMap.native.js +0 -38
  336. package/dist/cjs/constants/accessibilityDirectMap.native.js.map +0 -1
  337. package/dist/cjs/helpers/directStyle.cjs +0 -962
  338. package/dist/cjs/helpers/directStyle.native.cjs +0 -1165
  339. package/dist/cjs/helpers/directStyle.native.js +0 -1167
  340. package/dist/cjs/helpers/directStyle.native.js.map +0 -1
  341. package/dist/cjs/helpers/frontendProgram.cjs +0 -43
  342. package/dist/cjs/helpers/frontendProgram.native.cjs +0 -49
  343. package/dist/cjs/helpers/frontendProgram.native.js +0 -51
  344. package/dist/cjs/helpers/frontendProgram.native.js.map +0 -1
  345. package/dist/cjs/helpers/getFontLanguage.native.js.map +0 -1
  346. package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs +0 -37
  347. package/dist/cjs/helpers/normalizeStylePropKeys.native.js +0 -39
  348. package/dist/cjs/helpers/normalizeStylePropKeys.native.js.map +0 -1
  349. package/dist/cjs/helpers/propMapper.cjs +0 -384
  350. package/dist/cjs/helpers/propMapper.native.cjs +0 -536
  351. package/dist/cjs/helpers/propMapper.native.js +0 -538
  352. package/dist/cjs/helpers/propMapper.native.js.map +0 -1
  353. package/dist/cjs/helpers/useRenderElement.cjs +0 -47
  354. package/dist/cjs/helpers/useRenderElement.native.cjs +0 -53
  355. package/dist/cjs/helpers/useRenderElement.native.js +0 -55
  356. package/dist/cjs/helpers/useRenderElement.native.js.map +0 -1
  357. package/dist/esm/constants/accessibilityDirectMap.mjs +0 -8
  358. package/dist/esm/constants/accessibilityDirectMap.mjs.map +0 -1
  359. package/dist/esm/constants/accessibilityDirectMap.native.js +0 -8
  360. package/dist/esm/constants/accessibilityDirectMap.native.js.map +0 -1
  361. package/dist/esm/helpers/directStyle.mjs +0 -929
  362. package/dist/esm/helpers/directStyle.mjs.map +0 -1
  363. package/dist/esm/helpers/directStyle.native.js +0 -1132
  364. package/dist/esm/helpers/directStyle.native.js.map +0 -1
  365. package/dist/esm/helpers/frontendProgram.mjs +0 -20
  366. package/dist/esm/helpers/frontendProgram.mjs.map +0 -1
  367. package/dist/esm/helpers/frontendProgram.native.js +0 -24
  368. package/dist/esm/helpers/frontendProgram.native.js.map +0 -1
  369. package/dist/esm/helpers/getFontLanguage.mjs +0 -4
  370. package/dist/esm/helpers/getFontLanguage.mjs.map +0 -1
  371. package/dist/esm/helpers/getFontLanguage.native.js +0 -6
  372. package/dist/esm/helpers/getFontLanguage.native.js.map +0 -1
  373. package/dist/esm/helpers/normalizeStylePropKeys.mjs +0 -4
  374. package/dist/esm/helpers/normalizeStylePropKeys.mjs.map +0 -1
  375. package/dist/esm/helpers/normalizeStylePropKeys.native.js +0 -15
  376. package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +0 -1
  377. package/dist/esm/helpers/propMapper.mjs +0 -360
  378. package/dist/esm/helpers/propMapper.mjs.map +0 -1
  379. package/dist/esm/helpers/propMapper.native.js +0 -511
  380. package/dist/esm/helpers/propMapper.native.js.map +0 -1
  381. package/dist/esm/helpers/useRenderElement.mjs +0 -26
  382. package/dist/esm/helpers/useRenderElement.mjs.map +0 -1
  383. package/dist/esm/helpers/useRenderElement.native.js +0 -31
  384. package/dist/esm/helpers/useRenderElement.native.js.map +0 -1
  385. package/src/constants/accessibilityDirectMap.native.tsx +0 -10
  386. package/src/constants/accessibilityDirectMap.tsx +0 -11
  387. package/src/helpers/directStyle.ts +0 -2294
  388. package/src/helpers/frontendProgram.ts +0 -48
  389. package/src/helpers/getFontLanguage.ts +0 -2
  390. package/src/helpers/normalizeStylePropKeys.native.ts +0 -12
  391. package/src/helpers/normalizeStylePropKeys.ts +0 -3
  392. package/src/helpers/propMapper.ts +0 -721
  393. package/src/helpers/useRenderElement.tsx +0 -73
  394. package/types/constants/accessibilityDirectMap.d.ts +0 -6
  395. package/types/constants/accessibilityDirectMap.d.ts.map +0 -1
  396. package/types/constants/accessibilityDirectMap.native.d.ts +0 -6
  397. package/types/constants/accessibilityDirectMap.native.d.ts.map +0 -1
  398. package/types/helpers/directStyle.d.ts +0 -15
  399. package/types/helpers/directStyle.d.ts.map +0 -1
  400. package/types/helpers/frontendProgram.d.ts +0 -10
  401. package/types/helpers/frontendProgram.d.ts.map +0 -1
  402. package/types/helpers/getFontLanguage.d.ts +0 -2
  403. package/types/helpers/getFontLanguage.d.ts.map +0 -1
  404. package/types/helpers/normalizeStylePropKeys.d.ts +0 -2
  405. package/types/helpers/normalizeStylePropKeys.d.ts.map +0 -1
  406. package/types/helpers/normalizeStylePropKeys.native.d.ts +0 -13
  407. package/types/helpers/normalizeStylePropKeys.native.d.ts.map +0 -1
  408. package/types/helpers/propMapper.d.ts +0 -6
  409. package/types/helpers/propMapper.d.ts.map +0 -1
  410. package/types/helpers/useRenderElement.d.ts +0 -13
  411. package/types/helpers/useRenderElement.d.ts.map +0 -1
@@ -1,511 +0,0 @@
1
- import { isAndroid } from "@tamagui/constants";
2
- import { scanFlatValue } from "@tamagui/style-grammar/runtime";
3
- import { isVariable } from "../createVariable.native.js";
4
- import { variantResolverNames } from "../types.native.js";
5
- import { isConditionalStyleObject, resolveClauseChain } from "./directStyle.native.js";
6
- import { expandStyle } from "./expandStyle.native.js";
7
- import { resolveVariableValue } from "./resolveVariableValue.native.js";
8
- import { getVariantExtras } from "./getVariantExtras.native.js";
9
- import { isObj } from "./isObj.native.js";
10
- import { normalizeStyle } from "./normalizeStyle.native.js";
11
- import { isRemValue, resolveRem } from "./resolveRem.native.js";
12
- import { expandSafeAreaValue, isSafeAreaKey } from "./resolveSafeArea.native.js";
13
- import { skipProps } from "./skipProps.native.js";
14
- import { styleOriginalValues } from "./styleOriginalValues.native.js";
15
-
16
- export * from "./tokenCategories.native.js"
17
-
18
- function _type_of(obj) {
19
- "@swc/helpers - typeof";
20
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
21
- }
22
- function appendFlatClause(state, prev, conditionSource, value) {
23
- if (typeof value === "string" || typeof value === "number") {
24
- if (prev == null) return `${conditionSource}:${value}`;
25
- if (typeof prev === "string" || typeof prev === "number") return `${prev} ${conditionSource}:${value}`;
26
- }
27
- if (prev == null) return { [conditionSource]: value };
28
- if (typeof prev === "string" && prev.includes(":")) return;
29
- if ((typeof prev === "undefined" ? "undefined" : _type_of(prev)) === "object" && !Array.isArray(prev) && !isVariable(prev) && isConditionalStyleObject(state, prev)) return {
30
- ...prev,
31
- [conditionSource]: value
32
- };
33
- return {
34
- default: prev,
35
- [conditionSource]: value
36
- };
37
- }
38
- var propMapperHandler = {
39
- segment(ctx, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {
40
- if (isBase) {
41
- if (valid && start < end) ctx.push(start, end, -1, -1);
42
- return;
43
- }
44
- if (!chainValid) return;
45
- if (resolveClauseChain(ctx[0], source, chainStart, chainEnd) && valid && start < end) ctx.push(start, end, chainStart, chainEnd);
46
- },
47
- chain(ctx) {
48
- ctx[2] = true;
49
- return true;
50
- },
51
- error(ctx) {
52
- ctx[2] = true;
53
- }
54
- };
55
- var propMapper = function(key, value, styleState, disabled, map) {
56
- if (disabled) return map(key, value);
57
- if (!isAndroid) {
58
- if (key === "elevationAndroid") return;
59
- }
60
- var { conf, styleProps, staticConfig } = styleState;
61
- var { variants } = staticConfig;
62
- if (value === "unset") {
63
- var expandedKey = !styleProps.disableExpandShorthands && conf.shorthands[key] || key;
64
- var expanded = styleProps.noExpand ? null : expandStyle(expandedKey, value, conf.settings.styleCompat || "web");
65
- if (styleState.style) if (expanded) {
66
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
67
- try {
68
- for (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
69
- var [nkey] = _step.value;
70
- delete styleState.style[nkey];
71
- }
72
- } catch (err) {
73
- _didIteratorError = true;
74
- _iteratorError = err;
75
- } finally {
76
- try {
77
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
78
- } finally {
79
- if (_didIteratorError) throw _iteratorError;
80
- }
81
- }
82
- } else delete styleState.style[expandedKey];
83
- return;
84
- }
85
- if (!styleProps.noExpand) {
86
- if (variants && key in variants) {
87
- var variantValue = resolveVariants(key, value, styleProps, styleState, "");
88
- if (variantValue) {
89
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
90
- try {
91
- for (var _iterator1 = variantValue[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
92
- var entry = _step1.value;
93
- map(entry[0], entry[1], entry[2], entry[3]);
94
- }
95
- } catch (err) {
96
- _didIteratorError1 = true;
97
- _iteratorError1 = err;
98
- } finally {
99
- try {
100
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
101
- } finally {
102
- if (_didIteratorError1) throw _iteratorError1;
103
- }
104
- }
105
- return;
106
- }
107
- }
108
- }
109
- if (!styleProps.disableExpandShorthands) {
110
- if (key in conf.shorthands) key = conf.shorthands[key];
111
- }
112
- var originalValue = value;
113
- if (value === "safe" && isSafeAreaKey(key)) {
114
- var expanded1 = expandSafeAreaValue(key);
115
- if (expanded1) {
116
- for (var i = 0; i < expanded1.length; i++) {
117
- var [nkey1, nvalue] = expanded1[i];
118
- map(nkey1, nvalue, originalValue);
119
- }
120
- return;
121
- }
122
- }
123
- if (value != null) {
124
- if (typeof value === "string") value = isRemValue(value) ? resolveRem(value) : value;
125
- else if (isVariable(value)) value = resolveVariableValue(key, value, styleProps.resolveValues);
126
- else if (isRemValue(value)) value = resolveRem(value);
127
- }
128
- if (value != null) {
129
- if (key === "fontFamily" && typeof originalValue === "string") {
130
- if (originalValue in conf.fontsParsed) styleState.fontFamily = originalValue;
131
- }
132
- var expanded2 = styleProps.noExpand || typeof value === "string" ? null : expandStyle(key, value, conf.settings.styleCompat || "web");
133
- if (expanded2) {
134
- var max = expanded2.length;
135
- for (var i1 = 0; i1 < max; i1++) {
136
- var [nkey2, nvalue1, noriginalValue] = expanded2[i1];
137
- map(nkey2, nvalue1, noriginalValue !== null && noriginalValue !== void 0 ? noriginalValue : originalValue);
138
- }
139
- } else map(key, value, originalValue);
140
- }
141
- };
142
- var resolveVariants = function(key, value, styleProps, styleState, parentVariantKey) {
143
- var _styleState_staticConfig_variants;
144
- var variantDefinition = (_styleState_staticConfig_variants = styleState.staticConfig.variants) === null || _styleState_staticConfig_variants === void 0 ? void 0 : _styleState_staticConfig_variants[key];
145
- if (typeof value === "string" && value.indexOf(":") !== -1 && !(variantDefinition && (typeof variantDefinition === "undefined" ? "undefined" : _type_of(variantDefinition)) === "object" && value in variantDefinition)) {
146
- var scan = [
147
- styleState,
148
- value,
149
- false
150
- ];
151
- scanFlatValue(value, propMapperHandler, scan);
152
- if (scan[2]) {
153
- var entries;
154
- for (var index = 3; index < scan.length; index += 4) {
155
- var resolved = resolveVariantValue(key, value.slice(scan[index], scan[index + 1]), styleProps, styleState, parentVariantKey);
156
- if (!resolved) continue;
157
- entries || (entries = []);
158
- var chainStart = scan[index + 2];
159
- var modifier = chainStart === -1 ? void 0 : value.slice(chainStart, scan[index + 3]);
160
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
161
- try {
162
- for (var _iterator = resolved[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
163
- var entry = _step.value;
164
- if (modifier !== void 0) entry[3] = modifier;
165
- entries.push(entry);
166
- }
167
- } catch (err) {
168
- _didIteratorError = true;
169
- _iteratorError = err;
170
- } finally {
171
- try {
172
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
173
- } finally {
174
- if (_didIteratorError) throw _iteratorError;
175
- }
176
- }
177
- }
178
- return entries || [];
179
- }
180
- }
181
- if (value && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && !Array.isArray(value) && !isVariable(value) && isConditionalStyleObject(styleState, value)) {
182
- var entries1;
183
- for (var objKey in value) {
184
- var payload = value[objKey];
185
- if (payload == null) continue;
186
- var resolved1 = resolveVariantValue(key, payload, styleProps, styleState, parentVariantKey);
187
- if (!resolved1) continue;
188
- entries1 || (entries1 = []);
189
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
190
- try {
191
- for (var _iterator1 = resolved1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
192
- var entry1 = _step1.value;
193
- if (objKey !== "default") entry1[3] = objKey;
194
- entries1.push(entry1);
195
- }
196
- } catch (err) {
197
- _didIteratorError1 = true;
198
- _iteratorError1 = err;
199
- } finally {
200
- try {
201
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
202
- } finally {
203
- if (_didIteratorError1) throw _iteratorError1;
204
- }
205
- }
206
- }
207
- return entries1 || [];
208
- }
209
- return resolveVariantValue(key, value, styleProps, styleState, parentVariantKey);
210
- };
211
- var resolveVariantValue = function(key, value, styleProps, styleState, parentVariantKey) {
212
- var { staticConfig, conf, debug } = styleState;
213
- var { variants } = staticConfig;
214
- if (!variants) return;
215
- var variant = variants[key];
216
- var variantValue = getVariantDefinition(variant, value, conf, styleState);
217
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
218
- console.groupCollapsed(`\u2666\uFE0F\u2666\uFE0F\u2666\uFE0F resolve variant ${key}`);
219
- console.info({
220
- key,
221
- value,
222
- variantValue,
223
- variants
224
- });
225
- console.groupEnd();
226
- }
227
- if (!variantValue) {
228
- if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1") {
229
- if (typeof value !== "boolean") {
230
- var name = styleState.styleProps.displayName || "[UnnamedComponent]";
231
- console.warn(`No variant found: ${name} has variant "${key}", but no matching value "${value}"`);
232
- }
233
- }
234
- return;
235
- }
236
- if (typeof variantValue === "function") {
237
- variantValue = variantValue(value, getVariantExtras(styleState));
238
- if (process.env.NODE_ENV === "development" && debug === "verbose" && false);
239
- }
240
- var fontFamilyResult;
241
- if (isObj(variantValue)) {
242
- var fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];
243
- if (fontFamilyUpdate) {
244
- fontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf);
245
- styleState.fontFamily = fontFamilyResult;
246
- if (process.env.NODE_ENV === "development" && debug === "verbose") console.info(` updating font family`, fontFamilyResult);
247
- }
248
- variantValue = resolveTokensAndVariants(key, variantValue, styleProps, styleState, parentVariantKey);
249
- }
250
- if (variantValue) {
251
- var expanded = normalizeStyle(variantValue, !!styleProps.noNormalize);
252
- if (process.env.NODE_ENV === "development" && debug === "verbose") console.info(` expanding styles from `, variantValue, `to`, expanded);
253
- var originalValues = styleOriginalValues.get(expanded);
254
- var next = [];
255
- for (var _$key in expanded) next.push([
256
- _$key,
257
- expanded[_$key],
258
- originalValues === null || originalValues === void 0 ? void 0 : originalValues[_$key]
259
- ]);
260
- return next;
261
- }
262
- };
263
- function getFontFamilyFromNameOrVariable(input, conf) {
264
- if (isVariable(input)) {
265
- var val = variableToFontNameCache.get(input);
266
- if (val) return val;
267
- for (var key in conf.fontsParsed) {
268
- var familyVariable = conf.fontsParsed[key].family;
269
- if (isVariable(familyVariable)) {
270
- variableToFontNameCache.set(familyVariable, key);
271
- if (familyVariable === input) return key;
272
- }
273
- }
274
- } else if (typeof input === "string" && input in conf.fontsParsed) return input;
275
- }
276
- var variableToFontNameCache = /* @__PURE__ */ new WeakMap();
277
- var resolveTokensAndVariants = function(key, value, styleProps, styleState, parentVariantKey) {
278
- var { conf, staticConfig, debug } = styleState;
279
- var { variants } = staticConfig;
280
- var res = {};
281
- var originalValues;
282
- if (process.env.NODE_ENV === "development" && debug === "verbose") console.info(` - resolveTokensAndVariants`, key, value);
283
- for (var _key in value) {
284
- var subKey = conf.shorthands[_key] || _key;
285
- var val = value[_key];
286
- if (!styleProps.noSkip && subKey in skipProps) continue;
287
- originalValues || (originalValues = {});
288
- originalValues[subKey] = val;
289
- if (staticConfig) {
290
- var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, _staticConfig_parentStaticConfig1, _staticConfig_parentStaticConfig2, _staticConfig_context_propKeys, _staticConfig_context1, _staticConfig_parentStaticConfig_context_propKeys, _staticConfig_parentStaticConfig_context1, _staticConfig_parentStaticConfig3;
291
- var contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
292
- var inheritedContextPropKeys = !staticConfig.context || staticConfig.context === ((_staticConfig_parentStaticConfig1 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig1 === void 0 ? void 0 : _staticConfig_parentStaticConfig1.context) ? (_staticConfig_parentStaticConfig2 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig2 === void 0 ? void 0 : _staticConfig_parentStaticConfig2.contextProps : void 0;
293
- var contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;
294
- if (contextProps && subKey in contextProps || (contextPropKeys === null || contextPropKeys === void 0 ? void 0 : contextPropKeys.includes(subKey)) || ((_staticConfig_context1 = staticConfig.context) === null || _staticConfig_context1 === void 0 ? void 0 : (_staticConfig_context_propKeys = _staticConfig_context1.propKeys) === null || _staticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_context_propKeys.includes(subKey)) || ((_staticConfig_parentStaticConfig3 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig3 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context1 = _staticConfig_parentStaticConfig3.context) === null || _staticConfig_parentStaticConfig_context1 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context_propKeys = _staticConfig_parentStaticConfig_context1.propKeys) === null || _staticConfig_parentStaticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_parentStaticConfig_context_propKeys.includes(subKey))) {
295
- var _styleState, _styleState1;
296
- (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});
297
- styleState.overriddenContextProps[subKey] = val;
298
- (_styleState1 = styleState).originalContextPropValues || (_styleState1.originalContextPropValues = {});
299
- styleState.originalContextPropValues[subKey] = val;
300
- }
301
- }
302
- if (styleProps.noExpand) res[subKey] = val;
303
- else if (variants && subKey in variants) {
304
- if (parentVariantKey && parentVariantKey === key) res[subKey] = val;
305
- else {
306
- var variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
307
- if (variantOut) {
308
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
309
- try {
310
- for (var _iterator = variantOut[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
311
- var [_$key, val1, originalVal, conditionSource] = _step.value;
312
- if (val1 == null) continue;
313
- if (conditionSource !== void 0) {
314
- var appended = appendFlatClause(styleState, res[_$key], conditionSource, val1);
315
- if (appended === void 0) {
316
- if (process.env.NODE_ENV === "development") console.warn(`[tamagui] conditional variant value for "${_$key}" cannot join the existing clause string; dropping the clause`);
317
- continue;
318
- }
319
- res[_$key] = appended;
320
- continue;
321
- }
322
- res[_$key] = val1;
323
- if (originalVal !== void 0) {
324
- originalValues || (originalValues = {});
325
- originalValues[_$key] = originalVal;
326
- }
327
- }
328
- } catch (err) {
329
- _didIteratorError = true;
330
- _iteratorError = err;
331
- } finally {
332
- try {
333
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
334
- } finally {
335
- if (_didIteratorError) throw _iteratorError;
336
- }
337
- }
338
- }
339
- }
340
- continue;
341
- }
342
- if (isVariable(val)) {
343
- res[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);
344
- if (process.env.NODE_ENV === "development" && debug === "verbose") console.info(`variable`, subKey, res[subKey]);
345
- continue;
346
- }
347
- if (typeof val === "string") {
348
- res[subKey] = isRemValue(val) ? resolveRem(val) : val;
349
- continue;
350
- }
351
- if (isObj(val)) {
352
- var _res, _subKey;
353
- var subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
354
- if (process.env.NODE_ENV === "development" && debug === "verbose") console.info(`object`, subKey, subObject);
355
- var _;
356
- (_ = (_res = res)[_subKey = subKey]) !== null && _ !== void 0 || (_res[_subKey] = {});
357
- Object.assign(res[subKey], subObject);
358
- var subOriginalValues = styleOriginalValues.get(subObject);
359
- if (subOriginalValues) {
360
- var existing = styleOriginalValues.get(res[subKey]);
361
- if (existing) Object.assign(existing, subOriginalValues);
362
- else styleOriginalValues.set(res[subKey], { ...subOriginalValues });
363
- }
364
- } else res[subKey] = val;
365
- }
366
- if (originalValues) styleOriginalValues.set(res, originalValues);
367
- return res;
368
- };
369
- function getVariantDefinition(variant, value, conf, param) {
370
- var { theme } = param;
371
- if (!variant) return;
372
- if (value === void 0) return;
373
- if (typeof variant === "function") return variant;
374
- if (Object.prototype.hasOwnProperty.call(variant, value)) return variant[value];
375
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
376
- try {
377
- for (var _iterator = getCompiledVariantResolvers(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
378
- var { key, parts } = _step.value;
379
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
380
- try {
381
- for (var _iterator1 = parts[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
382
- var part = _step1.value;
383
- if (matchesVariantResolver(part, value, conf, theme)) return variant[key];
384
- }
385
- } catch (err) {
386
- _didIteratorError1 = true;
387
- _iteratorError1 = err;
388
- } finally {
389
- try {
390
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();
391
- } finally {
392
- if (_didIteratorError1) throw _iteratorError1;
393
- }
394
- }
395
- }
396
- } catch (err) {
397
- _didIteratorError = true;
398
- _iteratorError = err;
399
- } finally {
400
- try {
401
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
402
- } finally {
403
- if (_didIteratorError) throw _iteratorError;
404
- }
405
- }
406
- }
407
- var variantResolverNameSet = new Set(variantResolverNames);
408
- var variantResolverCache = /* @__PURE__ */ new WeakMap();
409
- function getCompiledVariantResolvers(variant) {
410
- var cached = variantResolverCache.get(variant);
411
- if (cached) return cached;
412
- var compiled = [];
413
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
414
- try {
415
- for (var _iterator = Object.keys(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
416
- var key = _step.value;
417
- var parts = parseVariantResolverKey(key);
418
- if (parts) compiled.push({
419
- key,
420
- parts
421
- });
422
- }
423
- } catch (err) {
424
- _didIteratorError = true;
425
- _iteratorError = err;
426
- } finally {
427
- try {
428
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
429
- } finally {
430
- if (_didIteratorError) throw _iteratorError;
431
- }
432
- }
433
- variantResolverCache.set(variant, compiled);
434
- return compiled;
435
- }
436
- function parseVariantResolverKey(key) {
437
- if (!key) return null;
438
- var parts = key.split("|").map(function(part2) {
439
- return part2.trim();
440
- });
441
- if (!parts.length) return null;
442
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
443
- try {
444
- for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
445
- var part = _step.value;
446
- if (!variantResolverNameSet.has(part)) return null;
447
- }
448
- } catch (err) {
449
- _didIteratorError = true;
450
- _iteratorError = err;
451
- } finally {
452
- try {
453
- if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
454
- } finally {
455
- if (_didIteratorError) throw _iteratorError;
456
- }
457
- }
458
- return parts;
459
- }
460
- var numberStringPattern = /[+-]?(?:(?:\d+\.?\d*)|(?:\.\d+))(?:[eE][+-]?\d+)?|[+-]?0[xX][\da-fA-F]+|[+-]?0[bB][01]+|[+-]?0[oO][0-7]+/;
461
- var remStringPattern = new RegExp(`^(?:${numberStringPattern.source})rem$`);
462
- var viewportValuePattern = new RegExp(`^(?:${numberStringPattern.source})(vw|dvw|lvw|svw|vh|dvh|lvh|svh)$`);
463
- function isAllowedStyleValue(category, value, conf, string, number, rem) {
464
- var hasSetting = Object.prototype.hasOwnProperty.call(conf.settings, "allowedStyleValues");
465
- var configured = conf.settings.allowedStyleValues;
466
- var setting = configured && (typeof configured === "undefined" ? "undefined" : _type_of(configured)) === "object" ? configured[category] : configured;
467
- var web = value === "unset" || value === "inherit" || string && /^var\(.*\)$/.test(value) || (category === "size" || category === "space") && (value === "max-content" || value === "min-content" || string && (viewportValuePattern.test(value) || /^(calc|min|max)\(.*\)$/.test(value)));
468
- var somewhat = category === "size" || category === "space" ? value === "auto" || number || rem || string && value.endsWith("%") : number;
469
- if (setting === "strict") return false;
470
- if (setting === "strict-web") return web;
471
- if (setting === "somewhat-strict") return somewhat;
472
- if (setting === "somewhat-strict-web") return somewhat || web;
473
- return number || string && (category === "size" || category === "space" || !hasSetting);
474
- }
475
- function matchesVariantResolver(resolverName, value, conf, theme) {
476
- var string = typeof value === "string";
477
- var number = typeof value === "number";
478
- var rem = string && remStringPattern.test(value);
479
- switch (resolverName) {
480
- case "Size":
481
- case "Space":
482
- case "Radius":
483
- case "ZIndex":
484
- var category = resolverName === "ZIndex" ? "zIndex" : resolverName.toLowerCase();
485
- return value === true || value != null && value in conf.tokensParsed[category] || (resolverName === "Space" || resolverName === "Radius" || resolverName === "ZIndex") && isVariable(value) || (resolverName === "Radius" || resolverName === "ZIndex") && (number || rem) || isAllowedStyleValue(category, value, conf, string, number, rem);
486
- case "Color": return value != null && value in conf.tokensParsed.color || string;
487
- case "Theme": return string && !!theme && value in theme;
488
- case "FontSize":
489
- var _conf_fontsParsed_body_size, _conf_fontsParsed_body;
490
- return value === true || !!((_conf_fontsParsed_body = conf.fontsParsed.body) === null || _conf_fontsParsed_body === void 0 ? void 0 : (_conf_fontsParsed_body_size = _conf_fontsParsed_body.size) === null || _conf_fontsParsed_body_size === void 0 ? void 0 : _conf_fontsParsed_body_size[value]) || number || rem;
491
- case "FontStyle":
492
- var _conf_fontsParsed_body_style, _conf_fontsParsed_body1;
493
- return !!((_conf_fontsParsed_body1 = conf.fontsParsed.body) === null || _conf_fontsParsed_body1 === void 0 ? void 0 : (_conf_fontsParsed_body_style = _conf_fontsParsed_body1.style) === null || _conf_fontsParsed_body_style === void 0 ? void 0 : _conf_fontsParsed_body_style[value]) || value === "normal" || value === "italic";
494
- case "FontTransform":
495
- var _conf_fontsParsed_body_transform, _conf_fontsParsed_body2;
496
- return !!((_conf_fontsParsed_body2 = conf.fontsParsed.body) === null || _conf_fontsParsed_body2 === void 0 ? void 0 : (_conf_fontsParsed_body_transform = _conf_fontsParsed_body2.transform) === null || _conf_fontsParsed_body_transform === void 0 ? void 0 : _conf_fontsParsed_body_transform[value]) || value === "none" || value === "capitalize" || value === "uppercase" || value === "lowercase";
497
- case "FontLineHeight":
498
- var _conf_fontsParsed_body_lineHeight, _conf_fontsParsed_body3;
499
- return !!((_conf_fontsParsed_body3 = conf.fontsParsed.body) === null || _conf_fontsParsed_body3 === void 0 ? void 0 : (_conf_fontsParsed_body_lineHeight = _conf_fontsParsed_body3.lineHeight) === null || _conf_fontsParsed_body_lineHeight === void 0 ? void 0 : _conf_fontsParsed_body_lineHeight[value]) || number || rem;
500
- case "FontLetterSpacing":
501
- var _conf_fontsParsed_body_letterSpacing, _conf_fontsParsed_body4;
502
- return !!((_conf_fontsParsed_body4 = conf.fontsParsed.body) === null || _conf_fontsParsed_body4 === void 0 ? void 0 : (_conf_fontsParsed_body_letterSpacing = _conf_fontsParsed_body4.letterSpacing) === null || _conf_fontsParsed_body_letterSpacing === void 0 ? void 0 : _conf_fontsParsed_body_letterSpacing[value]) || number || rem;
503
- case "number":
504
- case "string":
505
- case "boolean": return (typeof value === "undefined" ? "undefined" : _type_of(value)) === resolverName;
506
- case "any": return true;
507
- }
508
- }
509
-
510
- export { appendFlatClause, getFontFamilyFromNameOrVariable, propMapper };
511
- //# sourceMappingURL=propMapper.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"propMapper.native.js","names":[],"sources":["esm/helpers/propMapper.native.js"],"sourcesContent":["import { isAndroid } from \"@tamagui/constants\";\nimport { scanFlatValue } from \"@tamagui/style-grammar/runtime\";\nimport { isVariable } from \"../createVariable\";\nimport { variantResolverNames } from \"../types\";\nimport { isConditionalStyleObject, resolveClauseChain } from \"./directStyle\";\nimport { expandStyle } from \"./expandStyle\";\nimport { resolveVariableValue } from \"./resolveVariableValue\";\nimport { getVariantExtras } from \"./getVariantExtras\";\nimport { isObj } from \"./isObj\";\nimport { normalizeStyle } from \"./normalizeStyle\";\nimport { isRemValue, resolveRem } from \"./resolveRem\";\nimport { expandSafeAreaValue, isSafeAreaKey } from \"./resolveSafeArea\";\nimport { skipProps } from \"./skipProps\";\nimport { styleOriginalValues } from \"./styleOriginalValues\";\n\nexport * from \"./tokenCategories\"\n\nfunction _type_of(obj) {\n\t\"@swc/helpers - typeof\";\n\treturn obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction appendFlatClause(state, prev, conditionSource, value) {\n\tif (typeof value === \"string\" || typeof value === \"number\") {\n\t\tif (prev == null) return `${conditionSource}:${value}`;\n\t\tif (typeof prev === \"string\" || typeof prev === \"number\") return `${prev} ${conditionSource}:${value}`;\n\t}\n\tif (prev == null) return { [conditionSource]: value };\n\tif (typeof prev === \"string\" && prev.includes(\":\")) return;\n\tif ((typeof prev === \"undefined\" ? \"undefined\" : _type_of(prev)) === \"object\" && !Array.isArray(prev) && !isVariable(prev) && isConditionalStyleObject(state, prev)) return {\n\t\t...prev,\n\t\t[conditionSource]: value\n\t};\n\treturn {\n\t\tdefault: prev,\n\t\t[conditionSource]: value\n\t};\n}\nvar propMapperHandler = {\n\tsegment(ctx, start, end, isBase, valid, source, chainStart, chainEnd, chainValid) {\n\t\tif (isBase) {\n\t\t\tif (valid && start < end) ctx.push(start, end, -1, -1);\n\t\t\treturn;\n\t\t}\n\t\tif (!chainValid) return;\n\t\tif (resolveClauseChain(ctx[0], source, chainStart, chainEnd) && valid && start < end) ctx.push(start, end, chainStart, chainEnd);\n\t},\n\tchain(ctx) {\n\t\tctx[2] = true;\n\t\treturn true;\n\t},\n\terror(ctx) {\n\t\tctx[2] = true;\n\t}\n};\nvar propMapper = function(key, value, styleState, disabled, map) {\n\tif (disabled) return map(key, value);\n\tif (!isAndroid) {\n\t\tif (key === \"elevationAndroid\") return;\n\t}\n\tvar { conf, styleProps, staticConfig } = styleState;\n\tvar { variants } = staticConfig;\n\tif (value === \"unset\") {\n\t\tvar expandedKey = !styleProps.disableExpandShorthands && conf.shorthands[key] || key;\n\t\tvar expanded = styleProps.noExpand ? null : expandStyle(expandedKey, value, conf.settings.styleCompat || \"web\");\n\t\tif (styleState.style) if (expanded) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = expanded[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar [nkey] = _step.value;\n\t\t\t\t\tdelete styleState.style[nkey];\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t} else delete styleState.style[expandedKey];\n\t\treturn;\n\t}\n\tif (!styleProps.noExpand) {\n\t\tif (variants && key in variants) {\n\t\t\tvar variantValue = resolveVariants(key, value, styleProps, styleState, \"\");\n\t\t\tif (variantValue) {\n\t\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator1 = variantValue[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\t\tvar entry = _step1.value;\n\t\t\t\t\t\tmap(entry[0], entry[1], entry[2], entry[3]);\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t\t_iteratorError1 = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\tif (!styleProps.disableExpandShorthands) {\n\t\tif (key in conf.shorthands) key = conf.shorthands[key];\n\t}\n\tvar originalValue = value;\n\tif (value === \"safe\" && isSafeAreaKey(key)) {\n\t\tvar expanded1 = expandSafeAreaValue(key);\n\t\tif (expanded1) {\n\t\t\tfor (var i = 0; i < expanded1.length; i++) {\n\t\t\t\tvar [nkey1, nvalue] = expanded1[i];\n\t\t\t\tmap(nkey1, nvalue, originalValue);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}\n\tif (value != null) {\n\t\tif (typeof value === \"string\") value = isRemValue(value) ? resolveRem(value) : value;\n\t\telse if (isVariable(value)) value = resolveVariableValue(key, value, styleProps.resolveValues);\n\t\telse if (isRemValue(value)) value = resolveRem(value);\n\t}\n\tif (value != null) {\n\t\tif (key === \"fontFamily\" && typeof originalValue === \"string\") {\n\t\t\tif (originalValue in conf.fontsParsed) styleState.fontFamily = originalValue;\n\t\t}\n\t\tvar expanded2 = styleProps.noExpand || typeof value === \"string\" ? null : expandStyle(key, value, conf.settings.styleCompat || \"web\");\n\t\tif (expanded2) {\n\t\t\tvar max = expanded2.length;\n\t\t\tfor (var i1 = 0; i1 < max; i1++) {\n\t\t\t\tvar [nkey2, nvalue1, noriginalValue] = expanded2[i1];\n\t\t\t\tmap(nkey2, nvalue1, noriginalValue !== null && noriginalValue !== void 0 ? noriginalValue : originalValue);\n\t\t\t}\n\t\t} else map(key, value, originalValue);\n\t}\n};\nvar resolveVariants = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar _styleState_staticConfig_variants;\n\tvar variantDefinition = (_styleState_staticConfig_variants = styleState.staticConfig.variants) === null || _styleState_staticConfig_variants === void 0 ? void 0 : _styleState_staticConfig_variants[key];\n\tif (typeof value === \"string\" && value.indexOf(\":\") !== -1 && !(variantDefinition && (typeof variantDefinition === \"undefined\" ? \"undefined\" : _type_of(variantDefinition)) === \"object\" && value in variantDefinition)) {\n\t\tvar scan = [\n\t\t\tstyleState,\n\t\t\tvalue,\n\t\t\tfalse\n\t\t];\n\t\tscanFlatValue(value, propMapperHandler, scan);\n\t\tif (scan[2]) {\n\t\t\tvar entries;\n\t\t\tfor (var index = 3; index < scan.length; index += 4) {\n\t\t\t\tvar resolved = resolveVariantValue(key, value.slice(scan[index], scan[index + 1]), styleProps, styleState, parentVariantKey);\n\t\t\t\tif (!resolved) continue;\n\t\t\t\tentries || (entries = []);\n\t\t\t\tvar chainStart = scan[index + 2];\n\t\t\t\tvar modifier = chainStart === -1 ? void 0 : value.slice(chainStart, scan[index + 3]);\n\t\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator = resolved[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar entry = _step.value;\n\t\t\t\t\t\tif (modifier !== void 0) entry[3] = modifier;\n\t\t\t\t\t\tentries.push(entry);\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t_iteratorError = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn entries || [];\n\t\t}\n\t}\n\tif (value && (typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === \"object\" && !Array.isArray(value) && !isVariable(value) && isConditionalStyleObject(styleState, value)) {\n\t\tvar entries1;\n\t\tfor (var objKey in value) {\n\t\t\tvar payload = value[objKey];\n\t\t\tif (payload == null) continue;\n\t\t\tvar resolved1 = resolveVariantValue(key, payload, styleProps, styleState, parentVariantKey);\n\t\t\tif (!resolved1) continue;\n\t\t\tentries1 || (entries1 = []);\n\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator1 = resolved1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\tvar entry1 = _step1.value;\n\t\t\t\t\tif (objKey !== \"default\") entry1[3] = objKey;\n\t\t\t\t\tentries1.push(entry1);\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t_iteratorError1 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn entries1 || [];\n\t}\n\treturn resolveVariantValue(key, value, styleProps, styleState, parentVariantKey);\n};\nvar resolveVariantValue = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar { staticConfig, conf, debug } = styleState;\n\tvar { variants } = staticConfig;\n\tif (!variants) return;\n\tvar variant = variants[key];\n\tvar variantValue = getVariantDefinition(variant, value, conf, styleState);\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") {\n\t\tconsole.groupCollapsed(`\\u2666\\uFE0F\\u2666\\uFE0F\\u2666\\uFE0F resolve variant ${key}`);\n\t\tconsole.info({\n\t\t\tkey,\n\t\t\tvalue,\n\t\t\tvariantValue,\n\t\t\tvariants\n\t\t});\n\t\tconsole.groupEnd();\n\t}\n\tif (!variantValue) {\n\t\tif (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === \"1\") {\n\t\t\tif (typeof value !== \"boolean\") {\n\t\t\t\tvar name = styleState.styleProps.displayName || \"[UnnamedComponent]\";\n\t\t\t\tconsole.warn(`No variant found: ${name} has variant \"${key}\", but no matching value \"${value}\"`);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tif (typeof variantValue === \"function\") {\n\t\tvariantValue = variantValue(value, getVariantExtras(styleState));\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\" && false);\n\t}\n\tvar fontFamilyResult;\n\tif (isObj(variantValue)) {\n\t\tvar fontFamilyUpdate = variantValue.fontFamily || variantValue[conf.inverseShorthands.fontFamily];\n\t\tif (fontFamilyUpdate) {\n\t\t\tfontFamilyResult = getFontFamilyFromNameOrVariable(fontFamilyUpdate, conf);\n\t\t\tstyleState.fontFamily = fontFamilyResult;\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` updating font family`, fontFamilyResult);\n\t\t}\n\t\tvariantValue = resolveTokensAndVariants(key, variantValue, styleProps, styleState, parentVariantKey);\n\t}\n\tif (variantValue) {\n\t\tvar expanded = normalizeStyle(variantValue, !!styleProps.noNormalize);\n\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` expanding styles from `, variantValue, `to`, expanded);\n\t\tvar originalValues = styleOriginalValues.get(expanded);\n\t\tvar next = [];\n\t\tfor (var _$key in expanded) next.push([\n\t\t\t_$key,\n\t\t\texpanded[_$key],\n\t\t\toriginalValues === null || originalValues === void 0 ? void 0 : originalValues[_$key]\n\t\t]);\n\t\treturn next;\n\t}\n};\nfunction getFontFamilyFromNameOrVariable(input, conf) {\n\tif (isVariable(input)) {\n\t\tvar val = variableToFontNameCache.get(input);\n\t\tif (val) return val;\n\t\tfor (var key in conf.fontsParsed) {\n\t\t\tvar familyVariable = conf.fontsParsed[key].family;\n\t\t\tif (isVariable(familyVariable)) {\n\t\t\t\tvariableToFontNameCache.set(familyVariable, key);\n\t\t\t\tif (familyVariable === input) return key;\n\t\t\t}\n\t\t}\n\t} else if (typeof input === \"string\" && input in conf.fontsParsed) return input;\n}\nvar variableToFontNameCache = /* @__PURE__ */ new WeakMap();\nvar resolveTokensAndVariants = function(key, value, styleProps, styleState, parentVariantKey) {\n\tvar { conf, staticConfig, debug } = styleState;\n\tvar { variants } = staticConfig;\n\tvar res = {};\n\tvar originalValues;\n\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(` - resolveTokensAndVariants`, key, value);\n\tfor (var _key in value) {\n\t\tvar subKey = conf.shorthands[_key] || _key;\n\t\tvar val = value[_key];\n\t\tif (!styleProps.noSkip && subKey in skipProps) continue;\n\t\toriginalValues || (originalValues = {});\n\t\toriginalValues[subKey] = val;\n\t\tif (staticConfig) {\n\t\t\tvar _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, _staticConfig_parentStaticConfig1, _staticConfig_parentStaticConfig2, _staticConfig_context_propKeys, _staticConfig_context1, _staticConfig_parentStaticConfig_context_propKeys, _staticConfig_parentStaticConfig_context1, _staticConfig_parentStaticConfig3;\n\t\t\tvar contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);\n\t\t\tvar inheritedContextPropKeys = !staticConfig.context || staticConfig.context === ((_staticConfig_parentStaticConfig1 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig1 === void 0 ? void 0 : _staticConfig_parentStaticConfig1.context) ? (_staticConfig_parentStaticConfig2 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig2 === void 0 ? void 0 : _staticConfig_parentStaticConfig2.contextProps : void 0;\n\t\t\tvar contextPropKeys = staticConfig.contextProps || inheritedContextPropKeys;\n\t\t\tif (contextProps && subKey in contextProps || (contextPropKeys === null || contextPropKeys === void 0 ? void 0 : contextPropKeys.includes(subKey)) || ((_staticConfig_context1 = staticConfig.context) === null || _staticConfig_context1 === void 0 ? void 0 : (_staticConfig_context_propKeys = _staticConfig_context1.propKeys) === null || _staticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_context_propKeys.includes(subKey)) || ((_staticConfig_parentStaticConfig3 = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig3 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context1 = _staticConfig_parentStaticConfig3.context) === null || _staticConfig_parentStaticConfig_context1 === void 0 ? void 0 : (_staticConfig_parentStaticConfig_context_propKeys = _staticConfig_parentStaticConfig_context1.propKeys) === null || _staticConfig_parentStaticConfig_context_propKeys === void 0 ? void 0 : _staticConfig_parentStaticConfig_context_propKeys.includes(subKey))) {\n\t\t\t\tvar _styleState, _styleState1;\n\t\t\t\t(_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});\n\t\t\t\tstyleState.overriddenContextProps[subKey] = val;\n\t\t\t\t(_styleState1 = styleState).originalContextPropValues || (_styleState1.originalContextPropValues = {});\n\t\t\t\tstyleState.originalContextPropValues[subKey] = val;\n\t\t\t}\n\t\t}\n\t\tif (styleProps.noExpand) res[subKey] = val;\n\t\telse if (variants && subKey in variants) {\n\t\t\tif (parentVariantKey && parentVariantKey === key) res[subKey] = val;\n\t\t\telse {\n\t\t\t\tvar variantOut = resolveVariants(subKey, val, styleProps, styleState, key);\n\t\t\t\tif (variantOut) {\n\t\t\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator = variantOut[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\t\tvar [_$key, val1, originalVal, conditionSource] = _step.value;\n\t\t\t\t\t\t\tif (val1 == null) continue;\n\t\t\t\t\t\t\tif (conditionSource !== void 0) {\n\t\t\t\t\t\t\t\tvar appended = appendFlatClause(styleState, res[_$key], conditionSource, val1);\n\t\t\t\t\t\t\t\tif (appended === void 0) {\n\t\t\t\t\t\t\t\t\tif (process.env.NODE_ENV === \"development\") console.warn(`[tamagui] conditional variant value for \"${_$key}\" cannot join the existing clause string; dropping the clause`);\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tres[_$key] = appended;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tres[_$key] = val1;\n\t\t\t\t\t\t\tif (originalVal !== void 0) {\n\t\t\t\t\t\t\t\toriginalValues || (originalValues = {});\n\t\t\t\t\t\t\t\toriginalValues[_$key] = originalVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t\t_iteratorError = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (isVariable(val)) {\n\t\t\tres[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`variable`, subKey, res[subKey]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof val === \"string\") {\n\t\t\tres[subKey] = isRemValue(val) ? resolveRem(val) : val;\n\t\t\tcontinue;\n\t\t}\n\t\tif (isObj(val)) {\n\t\t\tvar _res, _subKey;\n\t\t\tvar subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);\n\t\t\tif (process.env.NODE_ENV === \"development\" && debug === \"verbose\") console.info(`object`, subKey, subObject);\n\t\t\tvar _;\n\t\t\t(_ = (_res = res)[_subKey = subKey]) !== null && _ !== void 0 || (_res[_subKey] = {});\n\t\t\tObject.assign(res[subKey], subObject);\n\t\t\tvar subOriginalValues = styleOriginalValues.get(subObject);\n\t\t\tif (subOriginalValues) {\n\t\t\t\tvar existing = styleOriginalValues.get(res[subKey]);\n\t\t\t\tif (existing) Object.assign(existing, subOriginalValues);\n\t\t\t\telse styleOriginalValues.set(res[subKey], { ...subOriginalValues });\n\t\t\t}\n\t\t} else res[subKey] = val;\n\t}\n\tif (originalValues) styleOriginalValues.set(res, originalValues);\n\treturn res;\n};\nfunction getVariantDefinition(variant, value, conf, param) {\n\tvar { theme } = param;\n\tif (!variant) return;\n\tif (value === void 0) return;\n\tif (typeof variant === \"function\") return variant;\n\tif (Object.prototype.hasOwnProperty.call(variant, value)) return variant[value];\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = getCompiledVariantResolvers(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar { key, parts } = _step.value;\n\t\t\tvar _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator1 = parts[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n\t\t\t\t\tvar part = _step1.value;\n\t\t\t\t\tif (matchesVariantResolver(part, value, conf, theme)) return variant[key];\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError1 = true;\n\t\t\t\t_iteratorError1 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion1 && _iterator1.return != null) _iterator1.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError1) throw _iteratorError1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n}\nvar variantResolverNameSet = new Set(variantResolverNames);\nvar variantResolverCache = /* @__PURE__ */ new WeakMap();\nfunction getCompiledVariantResolvers(variant) {\n\tvar cached = variantResolverCache.get(variant);\n\tif (cached) return cached;\n\tvar compiled = [];\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = Object.keys(variant)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar key = _step.value;\n\t\t\tvar parts = parseVariantResolverKey(key);\n\t\t\tif (parts) compiled.push({\n\t\t\t\tkey,\n\t\t\t\tparts\n\t\t\t});\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\tvariantResolverCache.set(variant, compiled);\n\treturn compiled;\n}\nfunction parseVariantResolverKey(key) {\n\tif (!key) return null;\n\tvar parts = key.split(\"|\").map(function(part2) {\n\t\treturn part2.trim();\n\t});\n\tif (!parts.length) return null;\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar part = _step.value;\n\t\t\tif (!variantResolverNameSet.has(part)) return null;\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\treturn parts;\n}\nvar numberStringPattern = /[+-]?(?:(?:\\d+\\.?\\d*)|(?:\\.\\d+))(?:[eE][+-]?\\d+)?|[+-]?0[xX][\\da-fA-F]+|[+-]?0[bB][01]+|[+-]?0[oO][0-7]+/;\nvar remStringPattern = new RegExp(`^(?:${numberStringPattern.source})rem$`);\nvar viewportValuePattern = new RegExp(`^(?:${numberStringPattern.source})(vw|dvw|lvw|svw|vh|dvh|lvh|svh)$`);\nfunction isAllowedStyleValue(category, value, conf, string, number, rem) {\n\tvar hasSetting = Object.prototype.hasOwnProperty.call(conf.settings, \"allowedStyleValues\");\n\tvar configured = conf.settings.allowedStyleValues;\n\tvar setting = configured && (typeof configured === \"undefined\" ? \"undefined\" : _type_of(configured)) === \"object\" ? configured[category] : configured;\n\tvar web = value === \"unset\" || value === \"inherit\" || string && /^var\\(.*\\)$/.test(value) || (category === \"size\" || category === \"space\") && (value === \"max-content\" || value === \"min-content\" || string && (viewportValuePattern.test(value) || /^(calc|min|max)\\(.*\\)$/.test(value)));\n\tvar somewhat = category === \"size\" || category === \"space\" ? value === \"auto\" || number || rem || string && value.endsWith(\"%\") : number;\n\tif (setting === \"strict\") return false;\n\tif (setting === \"strict-web\") return web;\n\tif (setting === \"somewhat-strict\") return somewhat;\n\tif (setting === \"somewhat-strict-web\") return somewhat || web;\n\treturn number || string && (category === \"size\" || category === \"space\" || !hasSetting);\n}\nfunction matchesVariantResolver(resolverName, value, conf, theme) {\n\tvar string = typeof value === \"string\";\n\tvar number = typeof value === \"number\";\n\tvar rem = string && remStringPattern.test(value);\n\tswitch (resolverName) {\n\t\tcase \"Size\":\n\t\tcase \"Space\":\n\t\tcase \"Radius\":\n\t\tcase \"ZIndex\":\n\t\t\tvar category = resolverName === \"ZIndex\" ? \"zIndex\" : resolverName.toLowerCase();\n\t\t\treturn value === true || value != null && value in conf.tokensParsed[category] || (resolverName === \"Space\" || resolverName === \"Radius\" || resolverName === \"ZIndex\") && isVariable(value) || (resolverName === \"Radius\" || resolverName === \"ZIndex\") && (number || rem) || isAllowedStyleValue(category, value, conf, string, number, rem);\n\t\tcase \"Color\": return value != null && value in conf.tokensParsed.color || string;\n\t\tcase \"Theme\": return string && !!theme && value in theme;\n\t\tcase \"FontSize\":\n\t\t\tvar _conf_fontsParsed_body_size, _conf_fontsParsed_body;\n\t\t\treturn value === true || !!((_conf_fontsParsed_body = conf.fontsParsed.body) === null || _conf_fontsParsed_body === void 0 ? void 0 : (_conf_fontsParsed_body_size = _conf_fontsParsed_body.size) === null || _conf_fontsParsed_body_size === void 0 ? void 0 : _conf_fontsParsed_body_size[value]) || number || rem;\n\t\tcase \"FontStyle\":\n\t\t\tvar _conf_fontsParsed_body_style, _conf_fontsParsed_body1;\n\t\t\treturn !!((_conf_fontsParsed_body1 = conf.fontsParsed.body) === null || _conf_fontsParsed_body1 === void 0 ? void 0 : (_conf_fontsParsed_body_style = _conf_fontsParsed_body1.style) === null || _conf_fontsParsed_body_style === void 0 ? void 0 : _conf_fontsParsed_body_style[value]) || value === \"normal\" || value === \"italic\";\n\t\tcase \"FontTransform\":\n\t\t\tvar _conf_fontsParsed_body_transform, _conf_fontsParsed_body2;\n\t\t\treturn !!((_conf_fontsParsed_body2 = conf.fontsParsed.body) === null || _conf_fontsParsed_body2 === void 0 ? void 0 : (_conf_fontsParsed_body_transform = _conf_fontsParsed_body2.transform) === null || _conf_fontsParsed_body_transform === void 0 ? void 0 : _conf_fontsParsed_body_transform[value]) || value === \"none\" || value === \"capitalize\" || value === \"uppercase\" || value === \"lowercase\";\n\t\tcase \"FontLineHeight\":\n\t\t\tvar _conf_fontsParsed_body_lineHeight, _conf_fontsParsed_body3;\n\t\t\treturn !!((_conf_fontsParsed_body3 = conf.fontsParsed.body) === null || _conf_fontsParsed_body3 === void 0 ? void 0 : (_conf_fontsParsed_body_lineHeight = _conf_fontsParsed_body3.lineHeight) === null || _conf_fontsParsed_body_lineHeight === void 0 ? void 0 : _conf_fontsParsed_body_lineHeight[value]) || number || rem;\n\t\tcase \"FontLetterSpacing\":\n\t\t\tvar _conf_fontsParsed_body_letterSpacing, _conf_fontsParsed_body4;\n\t\t\treturn !!((_conf_fontsParsed_body4 = conf.fontsParsed.body) === null || _conf_fontsParsed_body4 === void 0 ? void 0 : (_conf_fontsParsed_body_letterSpacing = _conf_fontsParsed_body4.letterSpacing) === null || _conf_fontsParsed_body_letterSpacing === void 0 ? void 0 : _conf_fontsParsed_body_letterSpacing[value]) || number || rem;\n\t\tcase \"number\":\n\t\tcase \"string\":\n\t\tcase \"boolean\": return (typeof value === \"undefined\" ? \"undefined\" : _type_of(value)) === resolverName;\n\t\tcase \"any\": return true;\n\t}\n}\n\nexport { appendFlatClause, getFontFamilyFromNameOrVariable, propMapper };"],"mappings":";;;;;;;;;;;;;;;;;;AAi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AoC,wBAAwB,gBAAgB,QAAQ,sCAAsC,KAAK,IAAI,KAAK,IAAI,kCAAkC,WAAW,UAAU;EAC3T,KAAK;GACJ,IAAI,sCAAsC;GAC1C,OAAO,CAAC,GAAG,0BAA0B,KAAK,YAAY,UAAU,QAAQ,4BAA4B,KAAK,IAAI,KAAK,KAAK,uCAAuC,wBAAwB,mBAAmB,QAAQ,yCAAyC,KAAK,IAAI,KAAK,IAAI,qCAAqC,WAAW,UAAU;EACvU,KAAK;EACL,KAAK;EACL,KAAK,WAAW,QAAQ,OAAO,UAAU,cAAc,cAAc,SAAS,KAAK,OAAO;EAC1F,KAAK,OAAO,OAAO;CACpB;AACD"}
@@ -1,26 +0,0 @@
1
- import { cloneElement, createElement, isValidElement } from "react";
2
- import { composeRefs } from "@tamagui/compose-refs";
3
- import { mergeSlotStyleProps } from "./mergeSlotStyleProps.mjs";
4
-
5
- function evaluateRenderProp(render, props, state, defaultElement) {
6
- if (!render) return defaultElement;
7
- const defaultChildren = defaultElement.props.children;
8
- if (typeof render === "string") return createElement(render, props, defaultChildren);
9
- if (typeof render === "function") return render(props, state);
10
- if (isValidElement(render)) {
11
- const renderProps = render.props;
12
- const renderRef = renderProps?.ref;
13
- if (!renderProps || Object.keys(renderProps).length === 0) {
14
- if (renderRef) return cloneElement(render, {
15
- ...props,
16
- ref: composeRefs(props.ref, renderRef)
17
- }, defaultChildren);
18
- return cloneElement(render, props, defaultChildren);
19
- }
20
- return cloneElement(render, mergeSlotStyleProps({ ...props }, renderProps), renderProps.children ?? defaultChildren);
21
- }
22
- return defaultElement;
23
- }
24
-
25
- export { evaluateRenderProp };
26
- //# sourceMappingURL=useRenderElement.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRenderElement.js","names":[],"sources":["esm/helpers/useRenderElement.js"],"sourcesContent":["import { cloneElement, createElement, isValidElement } from \"react\";\nimport { composeRefs } from \"@tamagui/compose-refs\";\nimport { mergeSlotStyleProps } from \"./mergeSlotStyleProps\";\n\nfunction evaluateRenderProp(render, props, state, defaultElement) {\n\tif (!render) return defaultElement;\n\tconst defaultChildren = defaultElement.props.children;\n\tif (typeof render === \"string\") return createElement(render, props, defaultChildren);\n\tif (typeof render === \"function\") return render(props, state);\n\tif (isValidElement(render)) {\n\t\tconst renderProps = render.props;\n\t\tconst renderRef = renderProps?.ref;\n\t\tif (!renderProps || Object.keys(renderProps).length === 0) {\n\t\t\tif (renderRef) return cloneElement(render, {\n\t\t\t\t...props,\n\t\t\t\tref: composeRefs(props.ref, renderRef)\n\t\t\t}, defaultChildren);\n\t\t\treturn cloneElement(render, props, defaultChildren);\n\t\t}\n\t\treturn cloneElement(render, mergeSlotStyleProps({ ...props }, renderProps), renderProps.children ?? defaultChildren);\n\t}\n\treturn defaultElement;\n}\n\nexport { evaluateRenderProp };"],"mappings":";;;;;AAIA,SAAS,mBAAmB,QAAQ,OAAO,OAAO,gBAAgB;CACjE,IAAI,CAAC,QAAQ,OAAO;CACpB,MAAM,kBAAkB,eAAe,MAAM;CAC7C,IAAI,OAAO,WAAW,UAAU,OAAO,cAAc,QAAQ,OAAO,eAAe;CACnF,IAAI,OAAO,WAAW,YAAY,OAAO,OAAO,OAAO,KAAK;CAC5D,IAAI,eAAe,MAAM,GAAG;EAC3B,MAAM,cAAc,OAAO;EAC3B,MAAM,YAAY,aAAa;EAC/B,IAAI,CAAC,eAAe,OAAO,KAAK,WAAW,CAAC,CAAC,WAAW,GAAG;GAC1D,IAAI,WAAW,OAAO,aAAa,QAAQ;IAC1C,GAAG;IACH,KAAK,YAAY,MAAM,KAAK,SAAS;GACtC,GAAG,eAAe;GAClB,OAAO,aAAa,QAAQ,OAAO,eAAe;EACnD;EACA,OAAO,aAAa,QAAQ,oBAAoB,EAAE,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,YAAY,eAAe;CACpH;CACA,OAAO;AACR"}