@tamagui/core 1.0.0-beta.8 → 1.0.1-beta.100

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 (559) hide show
  1. package/dist/cjs/Pressability.js +28 -0
  2. package/dist/cjs/Pressability.js.map +7 -0
  3. package/dist/cjs/Pressability.native.js +28 -0
  4. package/dist/cjs/Pressability.native.js.map +7 -0
  5. package/dist/cjs/Tamagui.js +6 -8
  6. package/dist/cjs/Tamagui.js.map +2 -2
  7. package/dist/cjs/ThemeManager.js +25 -32
  8. package/dist/cjs/ThemeManager.js.map +2 -2
  9. package/dist/cjs/conf.js +20 -15
  10. package/dist/cjs/conf.js.map +2 -2
  11. package/dist/cjs/constants/constants.js +1 -1
  12. package/dist/cjs/constants/constants.js.map +1 -1
  13. package/dist/cjs/constants/platform.js +8 -8
  14. package/dist/cjs/constants/platform.js.map +2 -2
  15. package/dist/cjs/constants/rnw.js +5 -19
  16. package/dist/cjs/constants/rnw.js.map +2 -2
  17. package/dist/cjs/constants/rnw.native.js +28 -0
  18. package/dist/cjs/constants/rnw.native.js.map +7 -0
  19. package/dist/cjs/createComponent.js +612 -295
  20. package/dist/cjs/createComponent.js.map +2 -2
  21. package/dist/cjs/createFont.js +2 -3
  22. package/dist/cjs/createFont.js.map +2 -2
  23. package/dist/cjs/createShorthands.js +0 -2
  24. package/dist/cjs/createShorthands.js.map +1 -1
  25. package/dist/cjs/createTamagui.js +147 -100
  26. package/dist/cjs/createTamagui.js.map +2 -2
  27. package/dist/cjs/createTheme.js +3 -2
  28. package/dist/cjs/createTheme.js.map +2 -2
  29. package/dist/cjs/createTokens.js +4 -21
  30. package/dist/cjs/createTokens.js.map +2 -2
  31. package/dist/cjs/createVariable.js +39 -14
  32. package/dist/cjs/createVariable.js.map +2 -2
  33. package/dist/cjs/createVariables.js +55 -0
  34. package/dist/cjs/createVariables.js.map +7 -0
  35. package/dist/cjs/helpers/areEqualSets.js +2 -3
  36. package/dist/cjs/helpers/areEqualSets.js.map +1 -1
  37. package/dist/cjs/helpers/assignNativePropsToWeb.js +187 -0
  38. package/dist/cjs/helpers/assignNativePropsToWeb.js.map +7 -0
  39. package/dist/cjs/helpers/assignNativePropsToWeb.native.js +29 -0
  40. package/dist/cjs/helpers/assignNativePropsToWeb.native.js.map +7 -0
  41. package/dist/cjs/helpers/calc.js +70 -0
  42. package/dist/cjs/helpers/calc.js.map +7 -0
  43. package/dist/cjs/helpers/createMediaStyle.js +4 -4
  44. package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
  45. package/dist/cjs/helpers/createPropMapper.js +133 -113
  46. package/dist/cjs/helpers/createPropMapper.js.map +2 -2
  47. package/dist/cjs/helpers/createShallowUpdate.js +3 -4
  48. package/dist/cjs/helpers/createShallowUpdate.js.map +2 -2
  49. package/dist/cjs/helpers/createTamaguiProvider.js +16 -18
  50. package/dist/cjs/helpers/createTamaguiProvider.js.map +2 -2
  51. package/dist/cjs/helpers/cssHash.js +50 -0
  52. package/dist/cjs/helpers/cssHash.js.map +7 -0
  53. package/dist/cjs/helpers/expandStyle.js +111 -0
  54. package/dist/cjs/helpers/expandStyle.js.map +7 -0
  55. package/dist/cjs/helpers/expandStyles.js +126 -0
  56. package/dist/cjs/helpers/expandStyles.js.map +7 -0
  57. package/dist/cjs/helpers/extendStaticConfig.js +25 -17
  58. package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
  59. package/dist/cjs/helpers/fixNativeShadow.js +2 -3
  60. package/dist/cjs/helpers/fixNativeShadow.js.map +1 -1
  61. package/dist/cjs/helpers/getExpandedShorthands.js +0 -2
  62. package/dist/cjs/helpers/getExpandedShorthands.js.map +1 -1
  63. package/dist/cjs/helpers/getFont.js +61 -0
  64. package/dist/cjs/helpers/getFont.js.map +7 -0
  65. package/dist/cjs/helpers/getSize.js +17 -9
  66. package/dist/cjs/helpers/getSize.js.map +2 -2
  67. package/dist/cjs/helpers/getSplitStyles.js +268 -168
  68. package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
  69. package/dist/cjs/helpers/getStackSize.js +45 -0
  70. package/dist/cjs/helpers/getStackSize.js.map +7 -0
  71. package/dist/cjs/helpers/getStylesAtomic.js +178 -118
  72. package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
  73. package/dist/cjs/helpers/getStylesAtomic.native.js +0 -2
  74. package/dist/cjs/helpers/getStylesAtomic.native.js.map +1 -1
  75. package/dist/cjs/helpers/getTextSize.js +3 -4
  76. package/dist/cjs/helpers/getTextSize.js.map +2 -2
  77. package/dist/cjs/helpers/getVariantExtras.js +46 -0
  78. package/dist/cjs/helpers/getVariantExtras.js.map +7 -0
  79. package/dist/cjs/helpers/insertStyleRule.js +55 -37
  80. package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
  81. package/dist/cjs/helpers/isObj.js +1 -2
  82. package/dist/cjs/helpers/isObj.js.map +1 -1
  83. package/dist/cjs/helpers/isTamaguiComponent.js +36 -0
  84. package/dist/cjs/helpers/isTamaguiComponent.js.map +7 -0
  85. package/dist/cjs/helpers/isTamaguiElement.js +4 -5
  86. package/dist/cjs/helpers/isTamaguiElement.js.map +2 -2
  87. package/dist/cjs/helpers/matchMedia.js +2 -3
  88. package/dist/cjs/helpers/matchMedia.js.map +1 -1
  89. package/dist/cjs/helpers/matchMedia.native.js +1 -2
  90. package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
  91. package/dist/cjs/helpers/mergeProps.js +49 -0
  92. package/dist/cjs/helpers/mergeProps.js.map +7 -0
  93. package/dist/cjs/helpers/mergeTransform.js +41 -0
  94. package/dist/cjs/helpers/mergeTransform.js.map +7 -0
  95. package/dist/cjs/helpers/nativeGestureHandler.native.js +18 -0
  96. package/dist/cjs/helpers/nativeGestureHandler.native.js.map +7 -0
  97. package/dist/cjs/helpers/normalizeColor.js +76 -0
  98. package/dist/cjs/helpers/normalizeColor.js.map +7 -0
  99. package/dist/cjs/helpers/normalizeValueWithProperty.js +90 -0
  100. package/dist/cjs/helpers/normalizeValueWithProperty.js.map +7 -0
  101. package/dist/cjs/helpers/proxyThemeVariables.js +1 -3
  102. package/dist/cjs/helpers/proxyThemeVariables.js.map +1 -1
  103. package/dist/cjs/helpers/pseudoDescriptors.js +41 -0
  104. package/dist/cjs/helpers/pseudoDescriptors.js.map +7 -0
  105. package/dist/cjs/helpers/registerCSSVariable.js +40 -0
  106. package/dist/cjs/helpers/registerCSSVariable.js.map +7 -0
  107. package/dist/cjs/helpers/themeable.js +3 -5
  108. package/dist/cjs/helpers/themeable.js.map +2 -2
  109. package/dist/cjs/helpers/validate.js +39 -37
  110. package/dist/cjs/helpers/validate.js.map +2 -2
  111. package/dist/cjs/helpers/withStaticProperties.js +2 -3
  112. package/dist/cjs/helpers/withStaticProperties.js.map +1 -1
  113. package/dist/cjs/helpers/wrapThemeManagerContext.js +0 -2
  114. package/dist/cjs/helpers/wrapThemeManagerContext.js.map +2 -2
  115. package/dist/cjs/hooks/useConstant.js +0 -2
  116. package/dist/cjs/hooks/useConstant.js.map +1 -1
  117. package/dist/cjs/hooks/useFeatures.js +22 -20
  118. package/dist/cjs/hooks/useFeatures.js.map +2 -2
  119. package/dist/cjs/hooks/useId.js +5 -6
  120. package/dist/cjs/hooks/useId.js.map +2 -2
  121. package/dist/cjs/hooks/useIsMounted.js +2 -4
  122. package/dist/cjs/hooks/useIsMounted.js.map +2 -2
  123. package/dist/cjs/hooks/useIsTouchDevice.js +3 -4
  124. package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
  125. package/dist/cjs/hooks/useMedia.js +11 -15
  126. package/dist/cjs/hooks/useMedia.js.map +1 -1
  127. package/dist/cjs/hooks/usePressable.js +2 -3
  128. package/dist/cjs/hooks/usePressable.js.map +1 -1
  129. package/dist/cjs/hooks/usePrevious.js +1 -0
  130. package/dist/cjs/hooks/usePrevious.js.map +7 -0
  131. package/dist/cjs/hooks/useTheme.js +21 -33
  132. package/dist/cjs/hooks/useTheme.js.map +2 -2
  133. package/dist/cjs/hooks/useUnmountEffect.js +0 -2
  134. package/dist/cjs/hooks/useUnmountEffect.js.map +1 -1
  135. package/dist/cjs/index.js +21 -12
  136. package/dist/cjs/index.js.map +2 -2
  137. package/dist/cjs/insertFont.js +89 -0
  138. package/dist/cjs/insertFont.js.map +7 -0
  139. package/dist/cjs/static.js +3 -1
  140. package/dist/cjs/static.js.map +2 -2
  141. package/dist/cjs/styled.js +0 -3
  142. package/dist/cjs/styled.js.map +2 -2
  143. package/dist/cjs/types-rnw.js.map +1 -1
  144. package/dist/cjs/types.js.map +1 -1
  145. package/dist/cjs/views/Slot.js +40 -26
  146. package/dist/cjs/views/Slot.js.map +2 -2
  147. package/dist/cjs/views/Text.js +11 -15
  148. package/dist/cjs/views/Text.js.map +2 -2
  149. package/dist/cjs/views/TextAncestorContext.js +4 -6
  150. package/dist/cjs/views/TextAncestorContext.js.map +2 -2
  151. package/dist/cjs/views/Theme.js +6 -9
  152. package/dist/cjs/views/Theme.js.map +2 -2
  153. package/dist/cjs/views/ThemeInverse.js +7 -5
  154. package/dist/cjs/views/ThemeInverse.js.map +2 -2
  155. package/dist/cjs/views/ThemeProvider.js +6 -6
  156. package/dist/cjs/views/ThemeProvider.js.map +2 -2
  157. package/dist/cjs/views/ThemeReset.js +3 -3
  158. package/dist/cjs/views/ThemeReset.js.map +2 -2
  159. package/dist/esm/Pressability.js +5 -0
  160. package/dist/esm/Pressability.js.map +7 -0
  161. package/dist/esm/Pressability.native.js +5 -0
  162. package/dist/esm/Pressability.native.js.map +7 -0
  163. package/dist/esm/Tamagui.js +5 -8
  164. package/dist/esm/Tamagui.js.map +2 -2
  165. package/dist/esm/ThemeManager.js +25 -33
  166. package/dist/esm/ThemeManager.js.map +2 -2
  167. package/dist/esm/conf.js +18 -15
  168. package/dist/esm/conf.js.map +2 -2
  169. package/dist/esm/constants/constants.js +24 -9
  170. package/dist/esm/constants/constants.js.map +2 -2
  171. package/dist/esm/constants/platform.js +6 -6
  172. package/dist/esm/constants/platform.js.map +2 -2
  173. package/dist/esm/constants/rnw.js +2 -20
  174. package/dist/esm/constants/rnw.js.map +2 -2
  175. package/dist/esm/constants/rnw.native.js +5 -0
  176. package/dist/esm/constants/rnw.native.js.map +7 -0
  177. package/dist/esm/createComponent.js +705 -331
  178. package/dist/esm/createComponent.js.map +2 -2
  179. package/dist/esm/createFont.js +2 -4
  180. package/dist/esm/createFont.js.map +2 -2
  181. package/dist/esm/createShorthands.js +0 -3
  182. package/dist/esm/createShorthands.js.map +1 -1
  183. package/dist/esm/createTamagui.js +172 -105
  184. package/dist/esm/createTamagui.js.map +2 -2
  185. package/dist/esm/createTheme.js +3 -3
  186. package/dist/esm/createTheme.js.map +2 -2
  187. package/dist/esm/createTokens.js +3 -20
  188. package/dist/esm/createTokens.js.map +2 -2
  189. package/dist/esm/createVariable.js +38 -14
  190. package/dist/esm/createVariable.js.map +2 -2
  191. package/dist/esm/createVariables.js +32 -0
  192. package/dist/esm/createVariables.js.map +7 -0
  193. package/dist/esm/helpers/areEqualSets.js +2 -4
  194. package/dist/esm/helpers/areEqualSets.js.map +1 -1
  195. package/dist/esm/helpers/assignNativePropsToWeb.js +164 -0
  196. package/dist/esm/helpers/assignNativePropsToWeb.js.map +7 -0
  197. package/dist/esm/helpers/assignNativePropsToWeb.native.js +6 -0
  198. package/dist/esm/helpers/assignNativePropsToWeb.native.js.map +7 -0
  199. package/dist/esm/helpers/calc.js +47 -0
  200. package/dist/esm/helpers/calc.js.map +7 -0
  201. package/dist/esm/helpers/createMediaStyle.js +4 -5
  202. package/dist/esm/helpers/createMediaStyle.js.map +2 -2
  203. package/dist/esm/helpers/createPropMapper.js +131 -114
  204. package/dist/esm/helpers/createPropMapper.js.map +2 -2
  205. package/dist/esm/helpers/createShallowUpdate.js +19 -5
  206. package/dist/esm/helpers/createShallowUpdate.js.map +2 -2
  207. package/dist/esm/helpers/createTamaguiProvider.js +46 -19
  208. package/dist/esm/helpers/createTamaguiProvider.js.map +2 -2
  209. package/dist/esm/helpers/cssHash.js +27 -0
  210. package/dist/esm/helpers/cssHash.js.map +7 -0
  211. package/dist/esm/helpers/expandStyle.js +90 -0
  212. package/dist/esm/helpers/expandStyle.js.map +7 -0
  213. package/dist/esm/helpers/expandStyles.js +103 -0
  214. package/dist/esm/helpers/expandStyles.js.map +7 -0
  215. package/dist/esm/helpers/extendStaticConfig.js +46 -40
  216. package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
  217. package/dist/esm/helpers/fixNativeShadow.js +2 -4
  218. package/dist/esm/helpers/fixNativeShadow.js.map +1 -1
  219. package/dist/esm/helpers/getExpandedShorthands.js +0 -3
  220. package/dist/esm/helpers/getExpandedShorthands.js.map +1 -1
  221. package/dist/{jsx/helpers/getTextSize.js → esm/helpers/getFont.js} +12 -7
  222. package/dist/esm/helpers/getFont.js.map +7 -0
  223. package/dist/esm/helpers/getSize.js +15 -9
  224. package/dist/esm/helpers/getSize.js.map +2 -2
  225. package/dist/esm/helpers/getSplitStyles.js +282 -176
  226. package/dist/esm/helpers/getSplitStyles.js.map +2 -2
  227. package/dist/esm/helpers/getStackSize.js +22 -0
  228. package/dist/esm/helpers/getStackSize.js.map +7 -0
  229. package/dist/esm/helpers/getStylesAtomic.js +188 -110
  230. package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
  231. package/dist/esm/helpers/getStylesAtomic.native.js +0 -3
  232. package/dist/esm/helpers/getStylesAtomic.native.js.map +1 -1
  233. package/dist/esm/helpers/getTextSize.js +3 -5
  234. package/dist/esm/helpers/getTextSize.js.map +2 -2
  235. package/dist/esm/helpers/getVariantExtras.js +23 -0
  236. package/dist/esm/helpers/getVariantExtras.js.map +7 -0
  237. package/dist/esm/helpers/insertStyleRule.js +55 -38
  238. package/dist/esm/helpers/insertStyleRule.js.map +2 -2
  239. package/dist/esm/helpers/isObj.js +1 -3
  240. package/dist/esm/helpers/isObj.js.map +1 -1
  241. package/dist/esm/helpers/isTamaguiComponent.js +13 -0
  242. package/dist/esm/helpers/isTamaguiComponent.js.map +7 -0
  243. package/dist/esm/helpers/isTamaguiElement.js +4 -6
  244. package/dist/esm/helpers/isTamaguiElement.js.map +2 -2
  245. package/dist/esm/helpers/matchMedia.js +2 -4
  246. package/dist/esm/helpers/matchMedia.js.map +1 -1
  247. package/dist/esm/helpers/matchMedia.native.js +1 -3
  248. package/dist/esm/helpers/matchMedia.native.js.map +1 -1
  249. package/dist/esm/helpers/mergeProps.js +26 -0
  250. package/dist/esm/helpers/mergeProps.js.map +7 -0
  251. package/dist/esm/helpers/mergeTransform.js +17 -0
  252. package/dist/esm/helpers/mergeTransform.js.map +7 -0
  253. package/dist/esm/helpers/nativeGestureHandler.native.js +2 -0
  254. package/dist/esm/helpers/nativeGestureHandler.native.js.map +7 -0
  255. package/dist/esm/helpers/normalizeColor.js +49 -0
  256. package/dist/esm/helpers/normalizeColor.js.map +7 -0
  257. package/dist/esm/helpers/normalizeValueWithProperty.js +67 -0
  258. package/dist/esm/helpers/normalizeValueWithProperty.js.map +7 -0
  259. package/dist/esm/helpers/proxyThemeVariables.js +1 -4
  260. package/dist/esm/helpers/proxyThemeVariables.js.map +1 -1
  261. package/dist/esm/helpers/pseudoDescriptors.js +18 -0
  262. package/dist/esm/helpers/pseudoDescriptors.js.map +7 -0
  263. package/dist/esm/helpers/registerCSSVariable.js +15 -0
  264. package/dist/esm/helpers/registerCSSVariable.js.map +7 -0
  265. package/dist/esm/helpers/themeable.js +34 -5
  266. package/dist/esm/helpers/themeable.js.map +2 -2
  267. package/dist/esm/helpers/validate.js +42 -19
  268. package/dist/esm/helpers/validate.js.map +2 -2
  269. package/dist/esm/helpers/withStaticProperties.js +2 -4
  270. package/dist/esm/helpers/withStaticProperties.js.map +1 -1
  271. package/dist/esm/helpers/wrapThemeManagerContext.js +0 -3
  272. package/dist/esm/helpers/wrapThemeManagerContext.js.map +2 -2
  273. package/dist/esm/hooks/useConstant.js +0 -3
  274. package/dist/esm/hooks/useConstant.js.map +1 -1
  275. package/dist/esm/hooks/useFeatures.js +59 -26
  276. package/dist/esm/hooks/useFeatures.js.map +2 -2
  277. package/dist/esm/hooks/useId.js +8 -11
  278. package/dist/esm/hooks/useId.js.map +2 -2
  279. package/dist/esm/hooks/useIsMounted.js +1 -4
  280. package/dist/esm/hooks/useIsMounted.js.map +2 -2
  281. package/dist/esm/hooks/useIsTouchDevice.js +4 -6
  282. package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
  283. package/dist/esm/hooks/useMedia.js +28 -21
  284. package/dist/esm/hooks/useMedia.js.map +1 -1
  285. package/dist/esm/hooks/usePressable.js +18 -5
  286. package/dist/esm/hooks/usePressable.js.map +1 -1
  287. package/dist/esm/hooks/usePrevious.js +1 -0
  288. package/dist/esm/hooks/usePrevious.js.map +7 -0
  289. package/dist/esm/hooks/useTheme.js +45 -41
  290. package/dist/esm/hooks/useTheme.js.map +2 -2
  291. package/dist/esm/hooks/useUnmountEffect.js +0 -3
  292. package/dist/esm/hooks/useUnmountEffect.js.map +1 -1
  293. package/dist/esm/index.js +18 -9
  294. package/dist/esm/index.js.map +2 -2
  295. package/dist/esm/insertFont.js +64 -0
  296. package/dist/esm/insertFont.js.map +7 -0
  297. package/dist/esm/static.js +3 -1
  298. package/dist/esm/static.js.map +2 -2
  299. package/dist/esm/styled.js +37 -12
  300. package/dist/esm/styled.js.map +2 -2
  301. package/dist/esm/views/Slot.js +74 -34
  302. package/dist/esm/views/Slot.js.map +2 -2
  303. package/dist/esm/views/Stack.js +21 -3
  304. package/dist/esm/views/Stack.js.map +1 -1
  305. package/dist/esm/views/Text.js +27 -19
  306. package/dist/esm/views/Text.js.map +2 -2
  307. package/dist/esm/views/TextAncestorContext.js +4 -7
  308. package/dist/esm/views/TextAncestorContext.js.map +2 -2
  309. package/dist/esm/views/Theme.js +6 -10
  310. package/dist/esm/views/Theme.js.map +2 -2
  311. package/dist/esm/views/ThemeInverse.js +8 -7
  312. package/dist/esm/views/ThemeInverse.js.map +2 -2
  313. package/dist/esm/views/ThemeProvider.js +6 -7
  314. package/dist/esm/views/ThemeProvider.js.map +2 -2
  315. package/dist/esm/views/ThemeReset.js +3 -4
  316. package/dist/esm/views/ThemeReset.js.map +2 -2
  317. package/package.json +18 -11
  318. package/reset.css +41 -0
  319. package/types/Pressability.d.ts +2 -0
  320. package/types/Pressability.native.d.ts +2 -0
  321. package/types/Tamagui.d.ts +4 -6
  322. package/types/Tamagui.d.ts.map +1 -1
  323. package/types/ThemeContext.d.ts +0 -0
  324. package/types/ThemeContext.d.ts.map +0 -0
  325. package/types/ThemeManager.d.ts +10 -7
  326. package/types/ThemeManager.d.ts.map +1 -1
  327. package/types/conf.d.ts +3 -4
  328. package/types/conf.d.ts.map +1 -1
  329. package/types/constants/constants.d.ts +1 -1
  330. package/types/constants/platform.d.ts +2 -2
  331. package/types/constants/rnw.d.ts +1 -1
  332. package/types/constants/rnw.d.ts.map +1 -1
  333. package/types/constants/rnw.native.d.ts +2 -0
  334. package/types/contexts/ButtonInsideButtonContext.d.ts +0 -0
  335. package/types/createComponent.d.ts +40 -15
  336. package/types/createComponent.d.ts.map +1 -1
  337. package/types/createFont.d.ts +0 -0
  338. package/types/createFont.d.ts.map +0 -0
  339. package/types/createShorthands.d.ts +0 -0
  340. package/types/createTamagui.d.ts +10 -2
  341. package/types/createTamagui.d.ts.map +1 -1
  342. package/types/createTheme.d.ts +1 -1
  343. package/types/createTokens.d.ts +0 -1
  344. package/types/createTokens.d.ts.map +1 -1
  345. package/types/createVariable.d.ts +16 -11
  346. package/types/createVariables.d.ts +10 -0
  347. package/types/defaultComponentState.d.ts +0 -0
  348. package/types/helpers/RNComponents.d.ts +0 -0
  349. package/types/helpers/areEqualSets.d.ts +0 -0
  350. package/types/helpers/assignNativePropsToWeb.d.ts +2 -0
  351. package/types/helpers/assignNativePropsToWeb.d.ts.map +1 -0
  352. package/types/helpers/assignNativePropsToWeb.native.d.ts +2 -0
  353. package/types/helpers/calc.d.ts +12 -0
  354. package/types/helpers/calc.d.ts.map +1 -0
  355. package/types/helpers/createMediaStyle.d.ts +1 -1
  356. package/types/helpers/createMediaStyle.d.ts.map +1 -1
  357. package/types/helpers/createPropMapper.d.ts +4 -3
  358. package/types/helpers/createPropMapper.d.ts.map +1 -1
  359. package/types/helpers/createShallowUpdate.d.ts +1 -2
  360. package/types/helpers/createTamaguiProvider.d.ts +2 -6
  361. package/types/helpers/createTamaguiProvider.d.ts.map +1 -1
  362. package/types/helpers/cssHash.d.ts +2 -0
  363. package/types/helpers/cssHash.d.ts.map +1 -0
  364. package/types/helpers/expandStyle.d.ts +2 -0
  365. package/types/helpers/expandStyle.d.ts.map +1 -0
  366. package/types/helpers/expandStyles.d.ts +7 -0
  367. package/types/helpers/expandStyles.d.ts.map +1 -0
  368. package/types/helpers/extendStaticConfig.d.ts +0 -0
  369. package/types/helpers/extendStaticConfig.d.ts.map +1 -1
  370. package/types/helpers/fixNativeShadow.d.ts +0 -0
  371. package/types/helpers/getExpandedShorthands.d.ts +0 -0
  372. package/types/helpers/getExpandedShorthands.d.ts.map +0 -0
  373. package/types/helpers/getFont.d.ts +3 -0
  374. package/types/helpers/getFont.d.ts.map +1 -0
  375. package/types/helpers/getSize.d.ts +3 -2
  376. package/types/helpers/getSize.d.ts.map +1 -1
  377. package/types/helpers/getSplitStyles.d.ts +10 -7
  378. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  379. package/types/helpers/getStackSize.d.ts +8 -0
  380. package/types/helpers/getStackSize.d.ts.map +1 -0
  381. package/types/helpers/getStylesAtomic.d.ts +7 -17
  382. package/types/helpers/getStylesAtomic.d.ts.map +1 -1
  383. package/types/helpers/getStylesAtomic.native.d.ts +0 -0
  384. package/types/helpers/getVariantExtras.d.ts +7 -0
  385. package/types/helpers/getVariantExtras.d.ts.map +1 -0
  386. package/types/helpers/insertStyleRule.d.ts +1 -1
  387. package/types/helpers/isObj.d.ts +0 -0
  388. package/types/helpers/isTamaguiComponent.d.ts +5 -0
  389. package/types/helpers/isTamaguiComponent.d.ts.map +1 -0
  390. package/types/helpers/isTamaguiElement.d.ts +1 -1
  391. package/types/helpers/isTamaguiElement.d.ts.map +1 -1
  392. package/types/helpers/matchMedia.d.ts +0 -0
  393. package/types/helpers/matchMedia.native.d.ts +0 -0
  394. package/types/helpers/mergeProps.d.ts +2 -0
  395. package/types/helpers/mergeTransform.d.ts +7 -0
  396. package/types/helpers/nativeGestureHandler.native.d.ts +2 -0
  397. package/types/helpers/normalizeColor.d.ts +3 -0
  398. package/types/helpers/normalizeColor.d.ts.map +1 -0
  399. package/types/helpers/normalizeValueWithProperty.d.ts +2 -0
  400. package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -0
  401. package/types/helpers/proxyThemeVariables.d.ts +0 -0
  402. package/types/helpers/pseudoDescriptors.d.ts +16 -0
  403. package/types/helpers/registerCSSVariable.d.ts +5 -0
  404. package/types/helpers/themeable.d.ts +0 -0
  405. package/types/helpers/themeable.d.ts.map +1 -1
  406. package/types/helpers/validate.d.ts +0 -0
  407. package/types/helpers/withStaticProperties.d.ts +0 -0
  408. package/types/helpers/wrapThemeManagerContext.d.ts +0 -0
  409. package/types/helpers/wrapThemeManagerContext.d.ts.map +0 -0
  410. package/types/hooks/useConstant.d.ts +0 -0
  411. package/types/hooks/useFeatures.d.ts +11 -5
  412. package/types/hooks/useFeatures.d.ts.map +1 -1
  413. package/types/hooks/useId.d.ts +0 -0
  414. package/types/hooks/useIsMounted.d.ts +0 -0
  415. package/types/hooks/useIsTouchDevice.d.ts +0 -0
  416. package/types/hooks/useMedia.d.ts +0 -0
  417. package/types/hooks/useMedia.d.ts.map +0 -0
  418. package/types/hooks/usePressable.d.ts +0 -0
  419. package/types/hooks/usePrevious.d.ts +1 -0
  420. package/types/hooks/useTheme.d.ts +15 -6
  421. package/types/hooks/useTheme.d.ts.map +1 -1
  422. package/types/hooks/useUnmountEffect.d.ts +0 -0
  423. package/types/index.d.ts +16 -6
  424. package/types/index.d.ts.map +1 -1
  425. package/types/insertFont.d.ts +6 -0
  426. package/types/insertFont.d.ts.map +1 -0
  427. package/types/static.d.ts +3 -1
  428. package/types/static.d.ts.map +1 -1
  429. package/types/styled.d.ts +2 -2
  430. package/types/styled.d.ts.map +1 -1
  431. package/types/types-rnw.d.ts +0 -0
  432. package/types/types.d.ts +71 -51
  433. package/types/types.d.ts.map +1 -1
  434. package/types/views/Slot.d.ts +1 -0
  435. package/types/views/Stack.d.ts +0 -0
  436. package/types/views/Stack.d.ts.map +0 -0
  437. package/types/views/Text.d.ts +0 -0
  438. package/types/views/Text.d.ts.map +1 -1
  439. package/types/views/TextAncestorContext.d.ts +0 -0
  440. package/types/views/TextAncestorContext.d.ts.map +1 -1
  441. package/types/views/Theme.d.ts +1 -9
  442. package/types/views/Theme.d.ts.map +1 -1
  443. package/types/views/ThemeInverse.d.ts +0 -0
  444. package/types/views/ThemeInverse.d.ts.map +1 -1
  445. package/types/views/ThemeProvider.d.ts +2 -0
  446. package/types/views/ThemeProvider.d.ts.map +1 -1
  447. package/types/views/ThemeReset.d.ts +0 -0
  448. package/types/views/ThemeReset.d.ts.map +0 -0
  449. package/dist/cjs/helpers/addStylesUsingClassname.js +0 -87
  450. package/dist/cjs/helpers/addStylesUsingClassname.js.map +0 -7
  451. package/dist/cjs/helpers/fixNativeShadow.native.js +0 -63
  452. package/dist/cjs/helpers/fixNativeShadow.native.js.map +0 -7
  453. package/dist/cjs/helpers/getButtonSize.js +0 -45
  454. package/dist/cjs/helpers/getButtonSize.js.map +0 -7
  455. package/dist/esm/helpers/addStylesUsingClassname.js +0 -64
  456. package/dist/esm/helpers/addStylesUsingClassname.js.map +0 -7
  457. package/dist/esm/helpers/fixNativeShadow.native.js +0 -41
  458. package/dist/esm/helpers/fixNativeShadow.native.js.map +0 -7
  459. package/dist/esm/helpers/getButtonSize.js +0 -24
  460. package/dist/esm/helpers/getButtonSize.js.map +0 -7
  461. package/dist/jsx/Tamagui.js +0 -41
  462. package/dist/jsx/ThemeContext.js +0 -5
  463. package/dist/jsx/ThemeManager.js +0 -186
  464. package/dist/jsx/conf.js +0 -35
  465. package/dist/jsx/constants/constants.js +0 -17
  466. package/dist/jsx/constants/platform.js +0 -25
  467. package/dist/jsx/constants/rnw.js +0 -23
  468. package/dist/jsx/contexts/ButtonInsideButtonContext.js +0 -5
  469. package/dist/jsx/createComponent.js +0 -617
  470. package/dist/jsx/createFont.js +0 -27
  471. package/dist/jsx/createShorthands.js +0 -9
  472. package/dist/jsx/createTamagui.js +0 -201
  473. package/dist/jsx/createTheme.js +0 -6
  474. package/dist/jsx/createTokens.js +0 -28
  475. package/dist/jsx/createVariable.js +0 -48
  476. package/dist/jsx/defaultComponentState.js +0 -0
  477. package/dist/jsx/helpers/RNComponents.js +0 -11
  478. package/dist/jsx/helpers/addStylesUsingClassname.js +0 -63
  479. package/dist/jsx/helpers/areEqualSets.js +0 -15
  480. package/dist/jsx/helpers/createMediaStyle.js +0 -30
  481. package/dist/jsx/helpers/createPropMapper.js +0 -237
  482. package/dist/jsx/helpers/createShallowUpdate.js +0 -18
  483. package/dist/jsx/helpers/createTamaguiProvider.js +0 -34
  484. package/dist/jsx/helpers/extendStaticConfig.js +0 -61
  485. package/dist/jsx/helpers/fixNativeShadow.js +0 -7
  486. package/dist/jsx/helpers/fixNativeShadow.native.js +0 -40
  487. package/dist/jsx/helpers/getButtonSize.js +0 -23
  488. package/dist/jsx/helpers/getExpandedShorthands.js +0 -18
  489. package/dist/jsx/helpers/getSize.js +0 -12
  490. package/dist/jsx/helpers/getSplitStyles.js +0 -302
  491. package/dist/jsx/helpers/getStylesAtomic.js +0 -130
  492. package/dist/jsx/helpers/getStylesAtomic.native.js +0 -9
  493. package/dist/jsx/helpers/insertStyleRule.js +0 -94
  494. package/dist/jsx/helpers/isObj.js +0 -6
  495. package/dist/jsx/helpers/isTamaguiElement.js +0 -10
  496. package/dist/jsx/helpers/matchMedia.js +0 -17
  497. package/dist/jsx/helpers/matchMedia.native.js +0 -8
  498. package/dist/jsx/helpers/proxyThemeVariables.js +0 -17
  499. package/dist/jsx/helpers/themeable.js +0 -24
  500. package/dist/jsx/helpers/validate.js +0 -75
  501. package/dist/jsx/helpers/withStaticProperties.js +0 -9
  502. package/dist/jsx/helpers/wrapThemeManagerContext.js +0 -10
  503. package/dist/jsx/hooks/useConstant.js +0 -14
  504. package/dist/jsx/hooks/useFeatures.js +0 -167
  505. package/dist/jsx/hooks/useId.js +0 -34
  506. package/dist/jsx/hooks/useIsMounted.js +0 -18
  507. package/dist/jsx/hooks/useIsTouchDevice.js +0 -16
  508. package/dist/jsx/hooks/useMedia.js +0 -158
  509. package/dist/jsx/hooks/usePressable.js +0 -13
  510. package/dist/jsx/hooks/useTheme.js +0 -177
  511. package/dist/jsx/hooks/useUnmountEffect.js +0 -10
  512. package/dist/jsx/index.js +0 -54
  513. package/dist/jsx/static.js +0 -16
  514. package/dist/jsx/styled.js +0 -48
  515. package/dist/jsx/types-rnw.js +0 -0
  516. package/dist/jsx/types.js +0 -0
  517. package/dist/jsx/views/Slot.js +0 -56
  518. package/dist/jsx/views/Stack.js +0 -12
  519. package/dist/jsx/views/Text.js +0 -61
  520. package/dist/jsx/views/TextAncestorContext.js +0 -15
  521. package/dist/jsx/views/Theme.js +0 -31
  522. package/dist/jsx/views/ThemeInverse.js +0 -22
  523. package/dist/jsx/views/ThemeProvider.js +0 -35
  524. package/dist/jsx/views/ThemeReset.js +0 -34
  525. package/types/constants/constants.d.ts.map +0 -1
  526. package/types/constants/platform.d.ts.map +0 -1
  527. package/types/contexts/ButtonInsideButtonContext.d.ts.map +0 -1
  528. package/types/createShorthands.d.ts.map +0 -1
  529. package/types/createTheme.d.ts.map +0 -1
  530. package/types/createVariable.d.ts.map +0 -1
  531. package/types/defaultComponentState.d.ts.map +0 -1
  532. package/types/helpers/RNComponents.d.ts.map +0 -1
  533. package/types/helpers/addStylesUsingClassname.d.ts +0 -3
  534. package/types/helpers/addStylesUsingClassname.d.ts.map +0 -1
  535. package/types/helpers/areEqualSets.d.ts.map +0 -1
  536. package/types/helpers/createShallowUpdate.d.ts.map +0 -1
  537. package/types/helpers/fixNativeShadow.d.ts.map +0 -1
  538. package/types/helpers/fixNativeShadow.native.d.ts +0 -2
  539. package/types/helpers/fixNativeShadow.native.d.ts.map +0 -1
  540. package/types/helpers/getButtonSize.d.ts +0 -8
  541. package/types/helpers/getButtonSize.d.ts.map +0 -1
  542. package/types/helpers/getStylesAtomic.native.d.ts.map +0 -1
  543. package/types/helpers/getTextSize.d.ts +0 -3
  544. package/types/helpers/getTextSize.d.ts.map +0 -1
  545. package/types/helpers/insertStyleRule.d.ts.map +0 -1
  546. package/types/helpers/isObj.d.ts.map +0 -1
  547. package/types/helpers/matchMedia.d.ts.map +0 -1
  548. package/types/helpers/matchMedia.native.d.ts.map +0 -1
  549. package/types/helpers/proxyThemeVariables.d.ts.map +0 -1
  550. package/types/helpers/validate.d.ts.map +0 -1
  551. package/types/helpers/withStaticProperties.d.ts.map +0 -1
  552. package/types/hooks/useConstant.d.ts.map +0 -1
  553. package/types/hooks/useId.d.ts.map +0 -1
  554. package/types/hooks/useIsMounted.d.ts.map +0 -1
  555. package/types/hooks/useIsTouchDevice.d.ts.map +0 -1
  556. package/types/hooks/usePressable.d.ts.map +0 -1
  557. package/types/hooks/useUnmountEffect.d.ts.map +0 -1
  558. package/types/types-rnw.d.ts.map +0 -1
  559. package/types/views/Slot.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useId.tsx"],
4
- "sourcesContent": ["/*\n * Welcome to @reach/auto-id!\n\n * Let's see if we can make sense of why this hook exists and its\n * implementation.\n *\n * Some background:\n * 1. Accessibility APIs rely heavily on element IDs\n * 2. Requiring developers to put IDs on every element in Reach UI is both\n * cumbersome and error-prone\n * 3. With a component model, we can generate IDs for them!\n *\n * Solution 1: Generate random IDs.\n *\n * This works great as long as you don't server render your app. When React (in\n * the client) tries to reuse the markup from the server, the IDs won't match\n * and React will then recreate the entire DOM tree.\n *\n * Solution 2: Increment an integer\n *\n * This sounds great. Since we're rendering the exact same tree on the server\n * and client, we can increment a counter and get a deterministic result between\n * client and server. Also, JS integers can go up to nine-quadrillion. I'm\n * pretty sure the tab will be closed before an app never needs\n * 10 quadrillion IDs!\n *\n * Problem solved, right?\n *\n * Ah, but there's a catch! React's concurrent rendering makes this approach\n * non-deterministic. While the client and server will end up with the same\n * elements in the end, depending on suspense boundaries (and possibly some user\n * input during the initial render) the incrementing integers won't always match\n * up.\n *\n * Solution 3: Don't use IDs at all on the server; patch after first render.\n *\n * What we've done here is solution 2 with some tricks. With this approach, the\n * ID returned is an empty string on the first render. This way the server and\n * client have the same markup no matter how wild the concurrent rendering may\n * have gotten.\n *\n * After the render, we patch up the components with an incremented ID. This\n * causes a double render on any components with `useId`. Shouldn't be a problem\n * since the components using this hook should be small, and we're only updating\n * the ID attribute on the DOM, nothing big is happening.\n *\n * It doesn't have to be an incremented number, though--we could do generate\n * random strings instead, but incrementing a number is probably the cheapest\n * thing we can do.\n *\n * Additionally, we only do this patchup on the very first client render ever.\n * Any calls to `useId` that happen dynamically in the client will be\n * populated immediately with a value. So, we only get the double render after\n * server hydration and never again, SO BACK OFF ALRIGHT?\n */\n\nimport * as React from 'react'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\n\nlet serverHandoffComplete = false\nlet id = 0\nfunction genId() {\n return ++id\n}\n\n/* eslint-disable react-hooks/rules-of-hooks */\n\n/**\n * useId\n *\n * Autogenerate IDs to facilitate WAI-ARIA and server rendering.\n *\n * Note: The returned ID will initially be `null` and will update after a\n * component mounts. Users may need to supply their own ID if they need\n * consistent values for SSR.\n *\n * @see Docs https://reach.tech/auto-id\n */\nfunction useId(idFromProps: string): string\nfunction useId(idFromProps: number): number\nfunction useId(idFromProps: string | number): string | number\nfunction useId(idFromProps: string | undefined | null): string | undefined\nfunction useId(idFromProps: number | undefined | null): number | undefined\nfunction useId(idFromProps: string | number | undefined | null): string | number | undefined\nfunction useId(): string | undefined\n\nfunction useId(providedId?: number | string | undefined | null) {\n // TODO: Remove error flag when updating internal deps to React 18. None of\n // our tricks will play well with concurrent rendering anyway.\n // @ts-expect-error\n if (typeof React.useId === 'function') {\n // @ts-expect-error\n let id = React.useId(providedId)\n return providedId != null ? providedId : id\n }\n\n // If this instance isn't part of the initial render, we don't have to do the\n // double render/patch-up dance. We can just generate the ID and return it.\n let initialId = providedId ?? (serverHandoffComplete ? genId() : null)\n let [id, setId] = React.useState(initialId)\n\n useIsomorphicLayoutEffect(() => {\n if (id === null) {\n // Patch the ID after render. We do this in `useLayoutEffect` to avoid any\n // rendering flicker, though it'll make the first render slower (unlikely\n // to matter, but you're welcome to measure your app and let us know if\n // it's a problem).\n setId(genId())\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n React.useEffect(() => {\n if (serverHandoffComplete === false) {\n // Flag all future uses of `useId` to skip the update dance. This is in\n // `useEffect` because it goes after `useLayoutEffect`, ensuring we don't\n // accidentally bail out of the patch-up dance prematurely.\n serverHandoffComplete = true\n }\n }, [])\n\n return providedId ?? id ?? undefined\n}\n\nexport { useId }\n"],
5
- "mappings": ";;AAwDA;AAEA;AAEA,IAAI,wBAAwB;AAC5B,IAAI,KAAK;AACT,iBAAiB;AACf,SAAO,EAAE;AACX;AAFS;AAyBT,eAAe,YAAiD;AAvFhE;AA2FE,MAAI,OAAO,MAAM,UAAU,YAAY;AAErC,QAAI,MAAK,MAAM,MAAM,UAAU;AAC/B,WAAO,cAAc,OAAO,aAAa;AAAA,EAC3C;AAIA,MAAI,YAAY,kCAAe,wBAAwB,MAAM,IAAI;AACjE,MAAI,CAAC,KAAI,SAAS,MAAM,SAAS,SAAS;AAE1C,4BAA0B,MAAM;AAC9B,QAAI,QAAO,MAAM;AAKf,YAAM,MAAM,CAAC;AAAA,IACf;AAAA,EAEF,GAAG,CAAC,CAAC;AAEL,QAAM,UAAU,MAAM;AACpB,QAAI,0BAA0B,OAAO;AAInC,8BAAwB;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO,wCAAc,QAAd,YAAoB;AAC7B;AApCS;",
4
+ "sourcesContent": ["/*\n * Welcome to @reach/auto-id!\n\n * Let's see if we can make sense of why this hook exists and its\n * implementation.\n *\n * Some background:\n * 1. Accessibility APIs rely heavily on element IDs\n * 2. Requiring developers to put IDs on every element in Reach UI is both\n * cumbersome and error-prone\n * 3. With a component model, we can generate IDs for them!\n *\n * Solution 1: Generate random IDs.\n *\n * This works great as long as you don't server render your app. When React (in\n * the client) tries to reuse the markup from the server, the IDs won't match\n * and React will then recreate the entire DOM tree.\n *\n * Solution 2: Increment an integer\n *\n * This sounds great. Since we're rendering the exact same tree on the server\n * and client, we can increment a counter and get a deterministic result between\n * client and server. Also, JS integers can go up to nine-quadrillion. I'm\n * pretty sure the tab will be closed before an app never needs\n * 10 quadrillion IDs!\n *\n * Problem solved, right?\n *\n * Ah, but there's a catch! React's concurrent rendering makes this approach\n * non-deterministic. While the client and server will end up with the same\n * elements in the end, depending on suspense boundaries (and possibly some user\n * input during the initial render) the incrementing integers won't always match\n * up.\n *\n * Solution 3: Don't use IDs at all on the server; patch after first render.\n *\n * What we've done here is solution 2 with some tricks. With this approach, the\n * ID returned is an empty string on the first render. This way the server and\n * client have the same markup no matter how wild the concurrent rendering may\n * have gotten.\n *\n * After the render, we patch up the components with an incremented ID. This\n * causes a double render on any components with `useId`. Shouldn't be a problem\n * since the components using this hook should be small, and we're only updating\n * the ID attribute on the DOM, nothing big is happening.\n *\n * It doesn't have to be an incremented number, though--we could do generate\n * random strings instead, but incrementing a number is probably the cheapest\n * thing we can do.\n *\n * Additionally, we only do this patchup on the very first client render ever.\n * Any calls to `useId` that happen dynamically in the client will be\n * populated immediately with a value. So, we only get the double render after\n * server hydration and never again, SO BACK OFF ALRIGHT?\n */\n\nimport * as React from 'react'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '../constants/platform'\n\nlet serverHandoffComplete = false\nlet id = 0\nfunction genId() {\n return ++id\n}\n\n/* eslint-disable react-hooks/rules-of-hooks */\n\n/**\n * useId\n *\n * Autogenerate IDs to facilitate WAI-ARIA and server rendering.\n *\n * Note: The returned ID will initially be `null` and will update after a\n * component mounts. Users may need to supply their own ID if they need\n * consistent values for SSR.\n *\n * @see Docs https://reach.tech/auto-id\n */\nfunction useId(idFromProps: string): string\nfunction useId(idFromProps: number): number\nfunction useId(idFromProps: string | number): string | number\nfunction useId(idFromProps: string | undefined | null): string | undefined\nfunction useId(idFromProps: number | undefined | null): number | undefined\nfunction useId(idFromProps: string | number | undefined | null): string | number | undefined\nfunction useId(): string | undefined\n\nfunction useId(providedId?: number | string | undefined | null) {\n // TODO: Remove error flag when updating internal deps to React 18. None of\n // our tricks will play well with concurrent rendering anyway.\n\n // native doesn't support until next react-native version, need to remove eventually\n if (isWeb) {\n if (typeof React.useId === 'function') {\n let id = React.useId()\n return providedId != null ? providedId : id\n }\n }\n\n // If this instance isn't part of the initial render, we don't have to do the\n // double render/patch-up dance. We can just generate the ID and return it.\n let initialId = providedId ?? (serverHandoffComplete ? genId() : null)\n let [id, setId] = React.useState(initialId)\n\n useIsomorphicLayoutEffect(() => {\n if (id === null) {\n // Patch the ID after render. We do this in `useLayoutEffect` to avoid any\n // rendering flicker, though it'll make the first render slower (unlikely\n // to matter, but you're welcome to measure your app and let us know if\n // it's a problem).\n setId(genId())\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n React.useEffect(() => {\n if (serverHandoffComplete === false) {\n // Flag all future uses of `useId` to skip the update dance. This is in\n // `useEffect` because it goes after `useLayoutEffect`, ensuring we don't\n // accidentally bail out of the patch-up dance prematurely.\n serverHandoffComplete = true\n }\n }, [])\n\n return providedId ?? id ?? undefined\n}\n\nexport { useId }\n"],
5
+ "mappings": "AAwDA;AAEA;AAEA,IAAI,wBAAwB;AAC5B,IAAI,KAAK;AACT,iBAAiB;AACf,SAAO,EAAE;AACX;AAuBA,eAAe,YAAiD;AAK9D,MAAI,OAAO;AACT,QAAI,OAAO,MAAM,UAAU,YAAY;AACrC,UAAI,MAAK,MAAM,MAAM;AACrB,aAAO,cAAc,OAAO,aAAa;AAAA,IAC3C;AAAA,EACF;AAIA,MAAI,YAAY,cAAe,yBAAwB,MAAM,IAAI;AACjE,MAAI,CAAC,KAAI,SAAS,MAAM,SAAS,SAAS;AAE1C,4BAA0B,MAAM;AAC9B,QAAI,QAAO,MAAM;AAKf,YAAM,MAAM,CAAC;AAAA,IACf;AAAA,EAEF,GAAG,CAAC,CAAC;AAEL,QAAM,UAAU,MAAM;AACpB,QAAI,0BAA0B,OAAO;AAInC,8BAAwB;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO,cAAc,OAAM;AAC7B;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,5 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { useIsomorphicLayoutEffect } from "@tamagui/core";
4
1
  import { useRef } from "react";
2
+ import { useIsomorphicLayoutEffect } from "../constants/platform";
5
3
  function useIsMounted() {
6
4
  const isMounted = useRef(false);
7
5
  useIsomorphicLayoutEffect(() => {
@@ -12,7 +10,6 @@ function useIsMounted() {
12
10
  }, []);
13
11
  return isMounted;
14
12
  }
15
- __name(useIsMounted, "useIsMounted");
16
13
  export {
17
14
  useIsMounted
18
15
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useIsMounted.ts"],
4
- "sourcesContent": ["import { useIsomorphicLayoutEffect } from '@tamagui/core'\nimport { useRef } from 'react'\n\nexport function useIsMounted() {\n const isMounted = useRef(false)\n\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true\n\n return () => {\n isMounted.current = false\n }\n }, [])\n\n return isMounted\n}\n"],
5
- "mappings": ";;AAAA;AACA;AAEO,wBAAwB;AAC7B,QAAM,YAAY,OAAO,KAAK;AAE9B,4BAA0B,MAAM;AAC9B,cAAU,UAAU;AAEpB,WAAO,MAAM;AACX,gBAAU,UAAU;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;AAZgB;",
4
+ "sourcesContent": ["import { useRef } from 'react'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\n\nexport function useIsMounted() {\n const isMounted = useRef(false)\n\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true\n\n return () => {\n isMounted.current = false\n }\n }, [])\n\n return isMounted\n}\n"],
5
+ "mappings": "AAAA;AAEA;AAEO,wBAAwB;AAC7B,QAAM,YAAY,OAAO,KAAK;AAE9B,4BAA0B,MAAM;AAC9B,cAAU,UAAU;AAEpB,WAAO,MAAM;AACX,gBAAU,UAAU;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,16 +1,14 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
1
  import { useState } from "react";
4
- import { isTouchDevice, useIsomorphicLayoutEffect } from "../constants/platform";
5
- const useIsTouchDevice = /* @__PURE__ */ __name(() => {
2
+ import { isTouchable, useIsomorphicLayoutEffect } from "../constants/platform";
3
+ const useIsTouchDevice = () => {
6
4
  const [touchOnly, setTouchOnly] = useState(false);
7
5
  useIsomorphicLayoutEffect(() => {
8
- if (isTouchDevice) {
6
+ if (isTouchable) {
9
7
  setTouchOnly(true);
10
8
  }
11
9
  }, []);
12
10
  return touchOnly;
13
- }, "useIsTouchDevice");
11
+ };
14
12
  export {
15
13
  useIsTouchDevice
16
14
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useIsTouchDevice.tsx"],
4
- "sourcesContent": ["import { useState } from 'react'\n\nimport { isTouchDevice, useIsomorphicLayoutEffect } from '../constants/platform'\n\n// ssr friendly\n\nexport const useIsTouchDevice = () => {\n const [touchOnly, setTouchOnly] = useState(false)\n\n useIsomorphicLayoutEffect(() => {\n if (isTouchDevice) {\n setTouchOnly(true)\n }\n }, [])\n\n return touchOnly\n}\n"],
5
- "mappings": ";;AAAA;AAEA;AAIO,MAAM,mBAAmB,6BAAM;AACpC,QAAM,CAAC,WAAW,gBAAgB,SAAS,KAAK;AAEhD,4BAA0B,MAAM;AAC9B,QAAI,eAAe;AACjB,mBAAa,IAAI;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO;AACT,GAVgC;",
4
+ "sourcesContent": ["import { useState } from 'react'\n\nimport { isTouchable, useIsomorphicLayoutEffect } from '../constants/platform'\n\n// ssr friendly\n\nexport const useIsTouchDevice = () => {\n const [touchOnly, setTouchOnly] = useState(false)\n\n useIsomorphicLayoutEffect(() => {\n if (isTouchable) {\n setTouchOnly(true)\n }\n }, [])\n\n return touchOnly\n}\n"],
5
+ "mappings": "AAAA;AAEA;AAIO,MAAM,mBAAmB,MAAM;AACpC,QAAM,CAAC,WAAW,gBAAgB,SAAS,KAAK;AAEhD,4BAA0B,MAAM;AAC9B,QAAI,aAAa;AACf,mBAAa,IAAI;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,19 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
3
17
  import { useForceUpdate } from "@tamagui/use-force-update";
4
18
  import { useRef } from "react";
5
19
  import { useIsomorphicLayoutEffect } from "../constants/platform";
@@ -7,24 +21,23 @@ import { matchMedia } from "../helpers/matchMedia";
7
21
  import { useConstant } from "./useConstant";
8
22
  const mediaState = {};
9
23
  const mediaQueryListeners = {};
10
- const addMediaQueryListener = /* @__PURE__ */ __name((key, cb) => {
24
+ const addMediaQueryListener = (key, cb) => {
11
25
  mediaQueryListeners[key] = mediaQueryListeners[key] || /* @__PURE__ */ new Set();
12
26
  mediaQueryListeners[key].add(cb);
13
- }, "addMediaQueryListener");
14
- const removeMediaQueryListener = /* @__PURE__ */ __name((key, cb) => {
27
+ };
28
+ const removeMediaQueryListener = (key, cb) => {
15
29
  var _a;
16
30
  (_a = mediaQueryListeners[key]) == null ? void 0 : _a.delete(cb);
17
- }, "removeMediaQueryListener");
31
+ };
18
32
  let hasConfigured = false;
19
33
  const mediaQueryConfig = {};
20
- const getMedia = /* @__PURE__ */ __name(() => {
34
+ const getMedia = () => {
21
35
  return mediaState;
22
- }, "getMedia");
23
- const configureMedia = /* @__PURE__ */ __name(({
36
+ };
37
+ const configureMedia = ({
24
38
  queries,
25
39
  defaultActive = ["sm", "xs"]
26
40
  } = {}) => {
27
- var _a;
28
41
  if (hasConfigured) {
29
42
  console.warn(`Already configured mediaQueries once (you may have called getMedia() before configureMedia())`);
30
43
  }
@@ -48,8 +61,7 @@ const configureMedia = /* @__PURE__ */ __name(({
48
61
  }
49
62
  }
50
63
  };
51
- __name(update, "update");
52
- const getMatch = /* @__PURE__ */ __name(() => matchMedia(str), "getMatch");
64
+ const getMatch = () => matchMedia(str);
53
65
  const match = getMatch();
54
66
  if (!match || typeof match.addListener !== "function") {
55
67
  throw new Error("\u26A0\uFE0F No match (seeing this in RN sometimes)");
@@ -59,12 +71,12 @@ const configureMedia = /* @__PURE__ */ __name(({
59
71
  update();
60
72
  } catch (err) {
61
73
  console.error("Error running media query", str, err.message, err.stack);
62
- const isDefaultActive = (_a = defaultActive == null ? void 0 : defaultActive.includes(key)) != null ? _a : true;
74
+ const isDefaultActive = (defaultActive == null ? void 0 : defaultActive.includes(key)) ?? true;
63
75
  mediaState[propKey] = isDefaultActive;
64
76
  }
65
77
  }
66
- }, "configureMedia");
67
- const useMedia = /* @__PURE__ */ __name(() => {
78
+ };
79
+ const useMedia = () => {
68
80
  const forceUpdate = useForceUpdate();
69
81
  const state = useRef();
70
82
  if (!state.current) {
@@ -94,10 +106,7 @@ const useMedia = /* @__PURE__ */ __name(() => {
94
106
  return () => {
95
107
  const st = state.current;
96
108
  st.isUnmounted = true;
97
- const allKeys = {
98
- ...st.selections,
99
- ...st.nextSelections
100
- };
109
+ const allKeys = __spreadValues(__spreadValues({}, st.selections), st.nextSelections);
101
110
  for (const key in allKeys) {
102
111
  removeMediaQueryListener(key, forceUpdate);
103
112
  }
@@ -125,11 +134,10 @@ const useMedia = /* @__PURE__ */ __name(() => {
125
134
  }
126
135
  });
127
136
  });
128
- }, "useMedia");
137
+ };
129
138
  function camelToHyphen(str) {
130
139
  return str.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`).toLowerCase();
131
140
  }
132
- __name(camelToHyphen, "camelToHyphen");
133
141
  function mediaObjectToString(query) {
134
142
  if (typeof query === "string") {
135
143
  return query;
@@ -145,7 +153,6 @@ function mediaObjectToString(query) {
145
153
  return `(${feature}: ${value})`;
146
154
  }).join(" and ");
147
155
  }
148
- __name(mediaObjectToString, "mediaObjectToString");
149
156
  export {
150
157
  addMediaQueryListener,
151
158
  configureMedia,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useMedia.tsx"],
4
4
  "sourcesContent": ["import { useForceUpdate } from '@tamagui/use-force-update'\nimport { useRef } from 'react'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { matchMedia } from '../helpers/matchMedia'\nimport {\n ConfigureMediaQueryOptions,\n MediaQueries,\n MediaQueryKey,\n MediaQueryObject,\n MediaQueryState,\n} from '../types'\nimport { useConstant } from './useConstant'\n\nexport const mediaState: MediaQueryState = {} as any\nconst mediaQueryListeners: { [key: string]: Set<Function> } = {}\n\nexport const addMediaQueryListener = (key: string, cb: any) => {\n mediaQueryListeners[key] = mediaQueryListeners[key] || new Set()\n mediaQueryListeners[key].add(cb)\n}\n\nexport const removeMediaQueryListener = (key: string, cb: any) => {\n mediaQueryListeners[key]?.delete(cb)\n}\n\nlet hasConfigured = false\nexport const mediaQueryConfig: MediaQueries = {}\n\nexport const getMedia = () => {\n return mediaState\n}\n\nexport const configureMedia = ({\n queries,\n defaultActive = ['sm', 'xs'],\n}: ConfigureMediaQueryOptions = {}) => {\n if (hasConfigured) {\n console.warn(\n `Already configured mediaQueries once (you may have called getMedia() before configureMedia())`\n )\n }\n\n if (queries) {\n Object.assign(mediaQueryConfig, queries)\n hasConfigured = true\n }\n\n // setup\n for (const key in queries) {\n const str = mediaObjectToString(queries[key])\n const propKey = `$${key}`\n try {\n const getMatch = () => matchMedia(str)\n const match = getMatch()\n if (!match || typeof match.addListener !== 'function') {\n // caught below\n throw new Error('\u26A0\uFE0F No match (seeing this in RN sometimes)')\n }\n mediaState[propKey] = !!match.matches\n match.addListener(update)\n\n function update() {\n const next = !!getMatch().matches\n if (next === mediaState[propKey]) return\n mediaState[propKey] = next\n const listeners = mediaQueryListeners[propKey]\n if (listeners?.size) {\n for (const cb of [...listeners]) {\n cb()\n }\n }\n }\n\n update()\n } catch (err: any) {\n console.error('Error running media query', str, err.message, err.stack)\n const isDefaultActive = defaultActive?.includes(key as any) ?? true\n mediaState[propKey] = isDefaultActive\n }\n }\n}\n\ntype UseMediaState = {\n selections: { [key: string]: boolean }\n nextSelections: { [key: string]: boolean }\n isRendering: boolean\n isUnmounted: boolean\n}\n\nexport const useMedia = () => {\n const forceUpdate = useForceUpdate()\n const state = useRef() as React.MutableRefObject<UseMediaState>\n if (!state.current) {\n state.current = {\n selections: {},\n nextSelections: {},\n isUnmounted: false,\n isRendering: true,\n }\n }\n state.current.isRendering = true\n\n // track usage\n useIsomorphicLayoutEffect(() => {\n const st = state.current\n st.isRendering = false\n // delete old\n for (const key in st.selections) {\n if (!(key in st.nextSelections)) {\n removeMediaQueryListener(key, forceUpdate)\n }\n }\n // add new\n for (const key in st.nextSelections) {\n if (!(key in st.selections)) {\n addMediaQueryListener(key, forceUpdate)\n }\n }\n })\n\n // unmount\n useIsomorphicLayoutEffect(() => {\n return () => {\n const st = state.current\n st.isUnmounted = true\n const allKeys = {\n ...st.selections,\n ...st.nextSelections,\n }\n for (const key in allKeys) {\n removeMediaQueryListener(key, forceUpdate)\n }\n }\n }, [])\n\n return useConstant(() => {\n const st = state.current\n return new Proxy(\n mediaState as {\n [key in MediaQueryKey]: boolean\n },\n {\n get(target, key: string) {\n if (key[0] !== '$') {\n key = `$${key}`\n }\n if (!(key in mediaState)) {\n return Reflect.get(target, key)\n }\n if (!st.isUnmounted) {\n if (st.isRendering) {\n st.nextSelections[key] = true\n }\n }\n if (key in mediaState) {\n return mediaState[key]\n }\n return Reflect.get(mediaState, key)\n },\n }\n )\n })\n}\n\nfunction camelToHyphen(str: string) {\n return str.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`).toLowerCase()\n}\n\nexport function mediaObjectToString(query: string | MediaQueryObject) {\n if (typeof query === 'string') {\n return query\n }\n return Object.entries(query)\n .map(([feature, value]) => {\n feature = camelToHyphen(feature)\n if (typeof value === 'string') {\n return `(${feature}: ${value})`\n }\n if (typeof value === 'number' && /[height|width]$/.test(feature)) {\n value = `${value}px`\n }\n return `(${feature}: ${value})`\n })\n .join(' and ')\n}\n"],
5
- "mappings": ";;AAAA;AACA;AAEA;AACA;AAQA;AAEO,MAAM,aAA8B,CAAC;AAC5C,MAAM,sBAAwD,CAAC;AAExD,MAAM,wBAAwB,wBAAC,KAAa,OAAY;AAC7D,sBAAoB,OAAO,oBAAoB,QAAQ,oBAAI,IAAI;AAC/D,sBAAoB,K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AAK,OAAO,GAAG;AAChE,cAAQ,GAAG;AAAA,IACb;AACA,WAAO,IAAI,YAAY;AAAA,EACzB,CAAC,EACA,KAAK,OAAO;AACjB;",
6
6
  "names": []
7
7
  }
@@ -1,13 +1,26 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
1
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
3
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
4
+ var __objRest = (source, exclude) => {
5
+ var target = {};
6
+ for (var prop in source)
7
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
8
+ target[prop] = source[prop];
9
+ if (source != null && __getOwnPropSymbols)
10
+ for (var prop of __getOwnPropSymbols(source)) {
11
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
12
+ target[prop] = source[prop];
13
+ }
14
+ return target;
15
+ };
3
16
  var _a, _b;
4
17
  import { Pressable } from "react-native";
5
18
  const getPressable = (_b = (_a = Pressable) == null ? void 0 : _a["type"]) == null ? void 0 : _b["render"];
6
- const usePressable = /* @__PURE__ */ __name((props) => {
19
+ const usePressable = (props) => {
7
20
  const out = getPressable(props);
8
- const { children, style, ...pressableProps } = out.props;
21
+ const _a2 = out.props, { children, style } = _a2, pressableProps = __objRest(_a2, ["children", "style"]);
9
22
  return [pressableProps, style];
10
- }, "usePressable");
23
+ };
11
24
  export {
12
25
  usePressable
13
26
  };
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/usePressable.tsx"],
4
4
  "sourcesContent": ["import { Pressable, PressableProps } from 'react-native'\n\nconst getPressable = Pressable?.['type']?.['render']\n\nexport const usePressable = (props: PressableProps) => {\n const out = getPressable(props)\n const { children, style, ...pressableProps } = out.props\n return [pressableProps, style] as const\n}\n"],
5
- "mappings": ";;AAAA;AAAA;AAEA,MAAM,eAAe,6CAAY,YAAZ,mBAAsB;AAEpC,MAAM,eAAe,wBAAC,UAA0B;AACrD,QAAM,MAAM,aAAa,KAAK;AAC9B,QAAM,EAAE,UAAU,UAAU,mBAAmB,IAAI;AACnD,SAAO,CAAC,gBAAgB,KAAK;AAC/B,GAJ4B;",
5
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAEA,MAAM,eAAe,6CAAY,YAAZ,mBAAsB;AAEpC,MAAM,eAAe,CAAC,UAA0B;AACrD,QAAM,MAAM,aAAa,KAAK;AAC9B,QAA+C,UAAI,OAA3C,YAAU,UAA6B,KAAnB,2BAAmB,KAAnB,CAApB,YAAU;AAClB,SAAO,CAAC,gBAAgB,KAAK;AAC/B;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=usePrevious.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,17 +1,34 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3
20
  import { useForceUpdate } from "@tamagui/use-force-update";
4
21
  import { useContext, useLayoutEffect, useMemo, useRef, useState } from "react";
5
22
  import { getConfig } from "../conf";
6
- import { useIsomorphicLayoutEffect } from "../constants/platform";
23
+ import { isWeb, useIsomorphicLayoutEffect } from "../constants/platform";
7
24
  import { areEqualSets } from "../helpers/areEqualSets";
8
25
  import { ThemeContext } from "../ThemeContext";
9
26
  import { ThemeManager, ThemeManagerContext, emptyManager } from "../ThemeManager";
10
27
  import { useConstant } from "./useConstant";
11
- const useTheme = /* @__PURE__ */ __name((themeName, componentName, props, forceUpdate) => {
28
+ const useTheme = (themeName, componentName, props, forceUpdate) => {
12
29
  const { name, theme, themes, themeManager, className, didChangeTheme } = useChangeThemeEffect(themeName, componentName, props, forceUpdate);
13
30
  if (process.env.NODE_ENV === "development") {
14
- if ((props == null ? void 0 : props["debug"]) === "verbose") {
31
+ if ((props == null ? void 0 : props.debug) === "verbose") {
15
32
  console.log(" \xBB useTheme", { themeName, componentName, name, className });
16
33
  }
17
34
  }
@@ -51,14 +68,11 @@ const useTheme = /* @__PURE__ */ __name((themeName, componentName, props, forceU
51
68
  get(_, key) {
52
69
  if (!name || key === "__proto__" || typeof key === "symbol") {
53
70
  if (key === GetThemeManager) {
54
- if (process.env.NODE_ENV === "development") {
55
- if (props["debug"]) {
56
- console.log("did change", { themeName, didChangeTheme, name, componentName }, themeManager == null ? void 0 : themeManager.parentName);
57
- }
71
+ if (process.env.NODE_ENV === "development" && (props == null ? void 0 : props.debug) && typeof window !== "undefined") {
72
+ console.log(">>", { themeName, didChangeTheme, name, componentName }, themeManager);
58
73
  }
59
- if (!didChangeTheme) {
74
+ if (!didChangeTheme)
60
75
  return null;
61
- }
62
76
  return themeManager;
63
77
  }
64
78
  return Reflect.get(_, key);
@@ -66,11 +80,6 @@ const useTheme = /* @__PURE__ */ __name((themeName, componentName, props, forceU
66
80
  if (typeof key !== "string" || key === "$typeof") {
67
81
  return Reflect.get(_, key);
68
82
  }
69
- if (process.env.NODE_ENV === "development") {
70
- if (key === "__state") {
71
- return state.current;
72
- }
73
- }
74
83
  if (key === "name") {
75
84
  return name;
76
85
  }
@@ -96,19 +105,15 @@ const useTheme = /* @__PURE__ */ __name((themeName, componentName, props, forceU
96
105
  }
97
106
  return val;
98
107
  }
99
- if (process.env.NODE_ENV === "development") {
100
- console.log(`No theme value "${String(key)}" in ${name}`);
101
- }
102
- return Reflect.get(_, key);
103
108
  }
104
109
  });
105
110
  }, [name, theme, className, didChangeTheme]);
106
- }, "useTheme");
111
+ };
107
112
  const GetThemeManager = Symbol("GetThemeManager");
108
- const getThemeManagerIfChanged = /* @__PURE__ */ __name((theme) => {
113
+ const getThemeManagerIfChanged = (theme) => {
109
114
  return theme == null ? void 0 : theme[GetThemeManager];
110
- }, "getThemeManagerIfChanged");
111
- const useThemeName = /* @__PURE__ */ __name((opts) => {
115
+ };
116
+ const useThemeName = (opts) => {
112
117
  const parent = useContext(ThemeManagerContext);
113
118
  const [name, setName] = useState((parent == null ? void 0 : parent.name) || "");
114
119
  useIsomorphicLayoutEffect(() => {
@@ -122,24 +127,25 @@ const useThemeName = /* @__PURE__ */ __name((opts) => {
122
127
  });
123
128
  }, [parent]);
124
129
  return name;
125
- }, "useThemeName");
126
- const useDefaultThemeName = /* @__PURE__ */ __name(() => {
130
+ };
131
+ const useDefaultThemeName = () => {
127
132
  var _a;
128
133
  return (_a = useContext(ThemeContext)) == null ? void 0 : _a.defaultTheme;
129
- }, "useDefaultThemeName");
130
- const useChangeThemeEffect = /* @__PURE__ */ __name((name, componentName, props, forceUpdateProp) => {
134
+ };
135
+ const useChangeThemeEffect = (name, componentName, props, forceUpdateProp) => {
131
136
  const debug = props && props["debug"];
132
137
  const parentManager = useContext(ThemeManagerContext) || emptyManager;
133
138
  const { themes } = useContext(ThemeContext);
134
- const next = parentManager.getNextTheme({ name, componentName, themes }, props);
139
+ const reset = (props == null ? void 0 : props.reset) || false;
140
+ const getThemeProps = { name, componentName, themes, reset };
141
+ const next = parentManager.getNextTheme(getThemeProps, debug);
135
142
  const forceUpdate = forceUpdateProp || useForceUpdate();
136
143
  const themeManager = useConstant(() => {
137
- if (!next) {
144
+ if (!next)
138
145
  return null;
139
- }
140
- return new ThemeManager(next.name, next.theme, parentManager);
146
+ return new ThemeManager(next.name, next.theme, parentManager, reset);
141
147
  });
142
- if (typeof document !== "undefined") {
148
+ if (!isWeb || typeof document !== "undefined") {
143
149
  useLayoutEffect(() => {
144
150
  if (!themeManager)
145
151
  return;
@@ -147,7 +153,7 @@ const useChangeThemeEffect = /* @__PURE__ */ __name((name, componentName, props,
147
153
  themeManager.update(next);
148
154
  }
149
155
  return parentManager.onChangeTheme(() => {
150
- const next2 = parentManager.getNextTheme({ name, componentName, themes }, debug);
156
+ const next2 = parentManager.getNextTheme(getThemeProps, debug);
151
157
  if (!next2)
152
158
  return;
153
159
  if (themeManager.update(next2)) {
@@ -157,17 +163,15 @@ const useChangeThemeEffect = /* @__PURE__ */ __name((name, componentName, props,
157
163
  }, [themes, name, componentName, debug, next == null ? void 0 : next.name]);
158
164
  }
159
165
  const didChangeTheme = next && parentManager && next.name !== parentManager.fullName;
160
- return {
161
- ...parentManager && {
162
- name: parentManager.name,
163
- theme: parentManager.theme
164
- },
165
- ...next,
166
+ return __spreadProps(__spreadValues(__spreadValues({}, parentManager && {
167
+ name: parentManager.name,
168
+ theme: parentManager.theme
169
+ }), next), {
166
170
  didChangeTheme,
167
171
  themes,
168
172
  themeManager
169
- };
170
- }, "useChangeThemeEffect");
173
+ });
174
+ };
171
175
  export {
172
176
  getThemeManagerIfChanged,
173
177
  useChangeThemeEffect,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useTheme.tsx"],
4
- "sourcesContent": ["import { useForceUpdate } from '@tamagui/use-force-update'\nimport React, { useContext, useLayoutEffect, useMemo, useRef, useState } from 'react'\n\nimport { getConfig } from '../conf'\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { areEqualSets } from '../helpers/areEqualSets'\nimport { ThemeContext } from '../ThemeContext'\nimport { ThemeManager, ThemeManagerContext, emptyManager } from '../ThemeManager'\nimport { ThemeObject } from '../types'\nimport { useConstant } from './useConstant'\n\ntype UseThemeState = {\n uuid: Object\n keys: Set<string>\n isRendering: boolean\n}\n\nexport const useTheme = (\n themeName?: string | null,\n componentName?: string,\n props?: any,\n forceUpdate?: any\n): ThemeObject => {\n const { name, theme, themes, themeManager, className, didChangeTheme } = useChangeThemeEffect(\n themeName,\n componentName,\n props,\n forceUpdate\n )\n\n if (process.env.NODE_ENV === 'development') {\n if (props?.['debug'] === 'verbose') {\n console.log(' \u00BB useTheme', { themeName, componentName, name, className })\n }\n }\n\n const state = useRef() as React.MutableRefObject<UseThemeState>\n if (!state.current) {\n state.current = {\n uuid: {},\n keys: new Set(),\n isRendering: true,\n }\n }\n state.current.isRendering = true\n\n // track usage\n useIsomorphicLayoutEffect(() => {\n const st = state.current\n st.isRendering = false\n const cur = themeManager?.keys.get(st.uuid)\n if (!cur || !areEqualSets(st.keys, cur)) {\n themeManager?.track(st.uuid, st.keys)\n }\n })\n\n return useMemo(() => {\n if (!theme) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('No theme', { themeName, theme, componentName, className })\n }\n return themes[getConfig().defaultTheme || 'light' || Object.keys(themes)[0]]\n }\n return new Proxy(theme, {\n has(_, key) {\n if (typeof key === 'string') {\n if (key[0] === '$') {\n key = key.slice(1)\n }\n }\n return Reflect.has(theme, key)\n },\n get(_, key) {\n if (!name || key === '__proto__' || typeof key === 'symbol') {\n // TODO make this pattern better\n if (key === GetThemeManager) {\n if (process.env.NODE_ENV === 'development') {\n if (props['debug']) {\n // prettier-ignore\n console.log('did change', { themeName, didChangeTheme, name, componentName }, themeManager?.parentName)\n }\n }\n if (!didChangeTheme) {\n return null\n }\n return themeManager\n }\n return Reflect.get(_, key)\n }\n if (typeof key !== 'string' || key === '$typeof') {\n return Reflect.get(_, key)\n }\n if (process.env.NODE_ENV === 'development') {\n if (key === '__state') {\n return state.current\n }\n }\n if (key === 'name') {\n return name\n }\n if (key === 'className') {\n return className\n }\n if (!themeManager) {\n console.error('No themeManager')\n return\n }\n // auto convert variables to plain\n if (key[0] === '$') {\n key = key.slice(1)\n }\n const val = themeManager.getValue(key)\n if (val) {\n if (state.current.isRendering) {\n state.current.keys.add(key)\n if (process.env.NODE_ENV === 'development') {\n if (props?.['debug'] === 'verbose') {\n console.log(' \u00BB tracking theme key', key)\n }\n }\n }\n return val\n }\n // react native debuger uses toJSON\n if (process.env.NODE_ENV === 'development') {\n console.log(`No theme value \"${String(key)}\" in ${name}`)\n }\n return Reflect.get(_, key)\n },\n })\n }, [name, theme, className, didChangeTheme])\n}\n\nconst GetThemeManager = Symbol('GetThemeManager')\n\nexport const getThemeManagerIfChanged = (theme: any) => {\n return theme?.[GetThemeManager]\n}\n\nexport const useThemeName = (opts?: { parent?: true }) => {\n const parent = useContext(ThemeManagerContext)\n const [name, setName] = useState(parent?.name || '')\n\n useIsomorphicLayoutEffect(() => {\n if (!parent) return\n return parent.onChangeTheme((next, manager) => {\n const name = opts?.parent ? manager.parentName || next : next\n if (!name) return\n setName(name)\n })\n }, [parent])\n\n return name\n}\n\nexport const useDefaultThemeName = () => {\n return useContext(ThemeContext)?.defaultTheme\n}\n\nexport const useChangeThemeEffect = (\n name?: string | null,\n componentName?: string,\n props?: any,\n forceUpdateProp?: any\n) => {\n const debug = props && props['debug']\n const parentManager = useContext(ThemeManagerContext) || emptyManager\n const { themes } = useContext(ThemeContext)!\n const next = parentManager.getNextTheme({ name, componentName, themes }, props)\n const forceUpdate = forceUpdateProp || useForceUpdate()\n const themeManager = useConstant<ThemeManager | null>(() => {\n if (!next) {\n return null\n }\n return new ThemeManager(next.name, next.theme, parentManager)\n })\n\n if (typeof document !== 'undefined') {\n useLayoutEffect(() => {\n if (!themeManager) return\n if (next?.name) {\n themeManager.update(next)\n }\n return parentManager.onChangeTheme(() => {\n const next = parentManager.getNextTheme({ name, componentName, themes }, debug)\n if (!next) return\n if (themeManager.update(next)) {\n forceUpdate()\n }\n })\n }, [themes, name, componentName, debug, next?.name])\n }\n\n const didChangeTheme = next && parentManager && next.name !== parentManager.fullName\n\n return {\n ...(parentManager && {\n name: parentManager.name,\n theme: parentManager.theme,\n }),\n ...next,\n didChangeTheme,\n themes,\n themeManager,\n }\n}\n"],
5
- "mappings": ";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAQO,MAAM,WAAW,wBACtB,WACA,eACA,OACA,gBACgB;AAChB,QAAM,EAAE,MAAM,OAAO,QAAQ,cAAc,WAAW,mBAAmB,qBACvE,WACA,eACA,OACA,WACF;AAEA,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,QAAI,gCAAQ,cAAa,WAAW;AAClC,cAAQ,IAAI,mBAAgB,EAAE,WAAW,eAAe,MAAM,UAAU,CAAC;AAAA,IAC3E;AAAA,EACF;AAEA,QAAM,QAAQ,OAAO;AACrB,MAAI,CAAC,MAAM,SAAS;AAClB,UAAM,UAAU;AAAA,MACd,MAAM,CAAC;AAAA,MACP,MAAM,oBAAI,IAAI;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AACA,QAAM,QAAQ,cAAc;AAG5B,4BAA0B,MAAM;AAC9B,UAAM,KAAK,MAAM;AACjB,OAAG,cAAc;AACjB,UAAM,MAAM,6CAAc,KAAK,IAAI,GAAG;AACtC,QAAI,CAAC,OAAO,CAAC,aAAa,GAAG,MAAM,GAAG,GAAG;AACvC,mDAAc,MAAM,GAAG,MAAM,GAAG;AAAA,IAClC;AAAA,EACF,CAAC;AAED,SAAO,QAAQ,MAAM;AACnB,QAAI,CAAC,OAAO;AACV,UAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,gBAAQ,KAAK,YAAY,EAAE,WAAW,OAAO,eAAe,UAAU,CAAC;AAAA,MACzE;AACA,aAAO,OAAO,UAAU,EAAE,gBAAgB;AAAA,IAC5C;AACA,W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;AAC1D,QAAI,CAAC,MAAM;AACT,aAAO;AAAA,IACT;AACA,WAAO,IAAI,aAAa,KAAK,MAAM,KAAK,OAAO,aAAa;AAAA,EAC9D,CAAC;AAED,MAAI,OAAO,aAAa,aAAa;AACnC,oBAAgB,MAAM;AACpB,UAAI,CAAC;AAAc;AACnB,UAAI,6BAAM,MAAM;AACd,qBAAa,OAAO,IAAI;AAAA,MAC1B;AACA,aAAO,cAAc,cAAc,MAAM;AACvC,cAAM,QAAO,cAAc,aAAa,EAAE,MAAM,eAAe,OAAO,GAAG,KAAK;AAC9E,YAAI,CAAC;AAAM;AACX,YAAI,aAAa,OAAO,KAAI,GAAG;AAC7B,sBAAY;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH,GAAG,CAAC,QAAQ,MAAM,eAAe,OAAO,6BAAM,IAAI,CAAC;AAAA,EACrD;AAEA,QAAM,iBAAiB,QAAQ,iBAAiB,KAAK,SAAS,cAAc;AAE5E,SAAO;AAAA,OACD,iBAAiB;AAAA,MACnB,MAAM,cAAc;AAAA,MACpB,OAAO,cAAc;AAAA,IACvB;AAAA,OACG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF,GA9CoC;",
4
+ "sourcesContent": ["import { useForceUpdate } from '@tamagui/use-force-update'\nimport React, { useContext, useLayoutEffect, useMemo, useRef, useState } from 'react'\n\nimport { getConfig } from '../conf'\nimport { isWeb, useIsomorphicLayoutEffect } from '../constants/platform'\nimport { areEqualSets } from '../helpers/areEqualSets'\nimport { ThemeContext } from '../ThemeContext'\nimport { GetNextThemeProps, ThemeManager, ThemeManagerContext, emptyManager } from '../ThemeManager'\nimport { ThemeName, ThemeObject } from '../types'\nimport { useConstant } from './useConstant'\n\nexport type ThemeProps = {\n className?: string\n disableThemeClass?: boolean\n name: Exclude<ThemeName, number> | null\n componentName?: string\n children?: any\n reset?: boolean\n debug?: boolean | 'verbose'\n}\n\ntype UseThemeState = {\n uuid: Object\n keys: Set<string>\n isRendering: boolean\n}\n\nexport const useTheme = (\n themeName?: string | null,\n componentName?: string,\n props?: ThemeProps,\n forceUpdate?: any\n): ThemeObject => {\n const { name, theme, themes, themeManager, className, didChangeTheme } = useChangeThemeEffect(\n themeName,\n componentName,\n props,\n forceUpdate\n )\n\n if (process.env.NODE_ENV === 'development') {\n if (props?.debug === 'verbose') {\n console.log(' \u00BB useTheme', { themeName, componentName, name, className })\n }\n }\n\n const state = useRef() as React.MutableRefObject<UseThemeState>\n if (!state.current) {\n state.current = {\n uuid: {},\n keys: new Set(),\n isRendering: true,\n }\n }\n state.current.isRendering = true\n\n // track usage\n useIsomorphicLayoutEffect(() => {\n const st = state.current\n st.isRendering = false\n const cur = themeManager?.keys.get(st.uuid)\n if (!cur || !areEqualSets(st.keys, cur)) {\n themeManager?.track(st.uuid, st.keys)\n }\n })\n\n return useMemo(() => {\n if (!theme) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('No theme', { themeName, theme, componentName, className })\n }\n return themes[getConfig().defaultTheme || 'light' || Object.keys(themes)[0]]\n }\n return new Proxy(theme, {\n has(_, key) {\n if (typeof key === 'string') {\n if (key[0] === '$') {\n key = key.slice(1)\n }\n }\n return Reflect.has(theme, key)\n },\n get(_, key) {\n if (!name || key === '__proto__' || typeof key === 'symbol') {\n // TODO make this pattern better\n if (key === GetThemeManager) {\n if (\n process.env.NODE_ENV === 'development' &&\n props?.debug &&\n typeof window !== 'undefined'\n ) {\n console.log('>>', { themeName, didChangeTheme, name, componentName }, themeManager)\n }\n if (!didChangeTheme) return null\n return themeManager\n }\n return Reflect.get(_, key)\n }\n if (typeof key !== 'string' || key === '$typeof') {\n return Reflect.get(_, key)\n }\n if (key === 'name') {\n return name\n }\n if (key === 'className') {\n return className\n }\n if (!themeManager) {\n console.error('No themeManager')\n return\n }\n // auto convert variables to plain\n if (key[0] === '$') {\n key = key.slice(1)\n }\n const val = themeManager.getValue(key)\n if (val) {\n if (state.current.isRendering) {\n state.current.keys.add(key)\n if (process.env.NODE_ENV === 'development') {\n if (props?.['debug'] === 'verbose') {\n console.log(' \u00BB tracking theme key', key)\n }\n }\n }\n return val\n }\n },\n })\n }, [name, theme, className, didChangeTheme])\n}\n\nconst GetThemeManager = Symbol('GetThemeManager')\n\nexport const getThemeManagerIfChanged = (theme: any) => {\n return theme?.[GetThemeManager]\n}\n\nexport const useThemeName = (opts?: { parent?: true }) => {\n const parent = useContext(ThemeManagerContext)\n const [name, setName] = useState(parent?.name || '')\n\n useIsomorphicLayoutEffect(() => {\n if (!parent) return\n return parent.onChangeTheme((next, manager) => {\n const name = opts?.parent ? manager.parentName || next : next\n if (!name) return\n setName(name)\n })\n }, [parent])\n\n return name\n}\n\nexport const useDefaultThemeName = () => {\n return useContext(ThemeContext)?.defaultTheme\n}\n\nexport const useChangeThemeEffect = (\n name?: string | null,\n componentName?: string,\n props?: ThemeProps,\n forceUpdateProp?: any\n) => {\n const debug = props && props['debug']\n const parentManager = useContext(ThemeManagerContext) || emptyManager\n const { themes } = useContext(ThemeContext)!\n const reset = props?.reset || false\n const getThemeProps: GetNextThemeProps = { name, componentName, themes, reset }\n const next = parentManager.getNextTheme(getThemeProps, debug)\n const forceUpdate = forceUpdateProp || useForceUpdate()\n const themeManager = useConstant<ThemeManager | null>(() => {\n if (!next) return null\n return new ThemeManager(next.name, next.theme, parentManager, reset)\n })\n\n if (!isWeb || typeof document !== 'undefined') {\n useLayoutEffect(() => {\n if (!themeManager) return\n if (next?.name) {\n themeManager.update(next)\n }\n return parentManager.onChangeTheme(() => {\n const next = parentManager.getNextTheme(getThemeProps, debug)\n if (!next) return\n if (themeManager.update(next)) {\n forceUpdate()\n }\n })\n }, [themes, name, componentName, debug, next?.name])\n }\n\n const didChangeTheme = next && parentManager && next.name !== parentManager.fullName\n\n return {\n ...(parentManager && {\n name: parentManager.name,\n theme: parentManager.theme,\n }),\n ...next,\n didChangeTheme,\n themes,\n themeManager,\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AACA;AA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B,QAAQ,iBAAiB,KAAK,SAAS,cAAc;AAE5E,SAAO,gDACD,iBAAiB;AAAA,IACnB,MAAM,cAAc;AAAA,IACpB,OAAO,cAAc;AAAA,EACvB,IACG,OALE;AAAA,IAML;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,10 +1,7 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
1
  import { useEffect } from "react";
4
2
  function useUnmountEffect(callback) {
5
3
  return useEffect(() => () => callback(), []);
6
4
  }
7
- __name(useUnmountEffect, "useUnmountEffect");
8
5
  export {
9
6
  useUnmountEffect
10
7
  };
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useUnmountEffect.ts"],
4
4
  "sourcesContent": ["import { useEffect } from 'react'\n\nexport function useUnmountEffect(callback: () => void) {\n return useEffect(() => () => callback(), [])\n}\n"],
5
- "mappings": ";;AAAA;AAEO,0BAA0B,UAAsB;AACrD,SAAO,UAAU,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC;AAC7C;AAFgB;",
5
+ "mappings": "AAAA;AAEO,0BAA0B,UAAsB;AACrD,SAAO,UAAU,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC;AAC7C;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -4,23 +4,31 @@ export * from "./createShorthands";
4
4
  export * from "./createTheme";
5
5
  export * from "./createTamagui";
6
6
  export * from "./createFont";
7
- import { createTokens } from "./createTokens";
7
+ export * from "./createTokens";
8
8
  export * from "./createVariable";
9
+ export * from "./createVariables";
10
+ export * from "./insertFont";
9
11
  export * from "./styled";
10
12
  export * from "./types";
11
- import { RNWTextProps, RNWViewProps } from "./types-rnw";
12
13
  import { getHasConfigured, getConfig, getThemes, getTokens, onConfiguredOnce } from "./conf";
13
14
  export * from "./constants/constants";
14
15
  export * from "./constants/platform";
15
- export * from "./constants/rnw";
16
- export * from "./helpers/getButtonSize";
16
+ import { createDOMProps } from "@tamagui/rnw";
17
+ export * from "./helpers/calc";
18
+ export * from "./helpers/createShallowUpdate";
19
+ export * from "./helpers/getStackSize";
20
+ export * from "./helpers/getVariantExtras";
17
21
  export * from "./helpers/getExpandedShorthands";
18
22
  export * from "./helpers/getSize";
19
23
  export * from "./helpers/getSplitStyles";
20
24
  export * from "./helpers/getStylesAtomic";
21
- export * from "./helpers/getTextSize";
25
+ export * from "./helpers/pseudoDescriptors";
26
+ export * from "./helpers/mergeProps";
27
+ export * from "./helpers/expandStyles";
28
+ export * from "./helpers/getFont";
22
29
  export * from "./helpers/isObj";
23
30
  export * from "./helpers/isTamaguiElement";
31
+ export * from "./helpers/isTamaguiComponent";
24
32
  export * from "./helpers/matchMedia";
25
33
  export * from "./helpers/themeable";
26
34
  export * from "./helpers/withStaticProperties";
@@ -33,9 +41,10 @@ export * from "./hooks/useMedia";
33
41
  export * from "./hooks/usePressable";
34
42
  export * from "./hooks/useTheme";
35
43
  export * from "./hooks/useUnmountEffect";
44
+ export * from "./views/Slot";
36
45
  export * from "./views/Stack";
37
46
  export * from "./views/Text";
38
- export * from "./views/TextAncestorContext";
47
+ import { TextAncestorProvider, TextAncestorContext } from "./views/TextAncestorContext";
39
48
  export * from "./views/Theme";
40
49
  export * from "./views/ThemeInverse";
41
50
  export * from "./views/ThemeProvider";
@@ -43,9 +52,9 @@ export * from "./views/ThemeReset";
43
52
  export * from "@tamagui/use-force-update";
44
53
  export * from "@tamagui/helpers";
45
54
  export {
46
- RNWTextProps,
47
- RNWViewProps,
48
- createTokens,
55
+ TextAncestorContext,
56
+ TextAncestorProvider,
57
+ createDOMProps,
49
58
  getConfig,
50
59
  getHasConfigured,
51
60
  getThemes,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export * from './Tamagui'\nexport * from './createComponent'\nexport * from './createShorthands'\nexport * from './createTheme'\nexport * from './createTamagui'\nexport * from './createFont'\nexport { createTokens } from './createTokens'\nexport * from './createVariable'\nexport * from './styled'\nexport * from './types'\n// for type portability\nexport { RNWTextProps, RNWViewProps } from './types-rnw'\nexport { getHasConfigured, getConfig, getThemes, getTokens, onConfiguredOnce } from './conf'\n\nexport * from './constants/constants'\nexport * from './constants/platform'\nexport * from './constants/rnw'\n\nexport * from './helpers/getButtonSize'\nexport * from './helpers/getExpandedShorthands'\nexport * from './helpers/getSize'\nexport * from './helpers/getSplitStyles'\nexport * from './helpers/getStylesAtomic'\nexport * from './helpers/getTextSize'\nexport * from './helpers/isObj'\nexport * from './helpers/isTamaguiElement'\nexport * from './helpers/matchMedia'\nexport * from './helpers/themeable'\nexport * from './helpers/withStaticProperties'\n\nexport * from './contexts/ButtonInsideButtonContext'\n\nexport * from './hooks/useConstant'\nexport * from './hooks/useId'\nexport * from './hooks/useIsMounted'\nexport * from './hooks/useIsTouchDevice'\nexport * from './hooks/useMedia'\nexport * from './hooks/usePressable'\nexport * from './hooks/useTheme'\nexport * from './hooks/useUnmountEffect'\n\nexport * from './views/Stack'\nexport * from './views/Text'\nexport * from './views/TextAncestorContext'\nexport * from './views/Theme'\nexport * from './views/ThemeInverse'\nexport * from './views/ThemeProvider'\nexport * from './views/ThemeReset'\n\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/helpers'\n"],
5
- "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;",
4
+ "sourcesContent": ["export * from './Tamagui'\nexport * from './createComponent'\nexport * from './createShorthands'\nexport * from './createTheme'\nexport * from './createTamagui'\nexport * from './createFont'\nexport * from './createTokens'\nexport * from './createVariable'\nexport * from './createVariables'\nexport * from './insertFont'\nexport * from './styled'\nexport * from './types'\n// for type portability\nexport type { RNWTextProps, RNWViewProps } from './types-rnw'\nexport { getHasConfigured, getConfig, getThemes, getTokens, onConfiguredOnce } from './conf'\n\nexport * from './constants/constants'\nexport * from './constants/platform'\nexport { createDOMProps } from '@tamagui/rnw'\n\nexport * from './helpers/calc'\nexport * from './helpers/createShallowUpdate'\nexport * from './helpers/getStackSize'\nexport * from './helpers/getVariantExtras'\nexport * from './helpers/getExpandedShorthands'\nexport * from './helpers/getSize'\nexport * from './helpers/getSplitStyles'\nexport * from './helpers/getStylesAtomic'\nexport * from './helpers/pseudoDescriptors'\nexport * from './helpers/mergeProps'\nexport * from './helpers/expandStyles'\nexport * from './helpers/getFont'\nexport * from './helpers/isObj'\nexport * from './helpers/isTamaguiElement'\nexport * from './helpers/isTamaguiComponent'\nexport * from './helpers/matchMedia'\nexport * from './helpers/themeable'\nexport * from './helpers/withStaticProperties'\n\nexport * from './contexts/ButtonInsideButtonContext'\n\nexport * from './hooks/useConstant'\nexport * from './hooks/useId'\nexport * from './hooks/useIsMounted'\nexport * from './hooks/useIsTouchDevice'\nexport * from './hooks/useMedia'\nexport * from './hooks/usePressable'\nexport * from './hooks/useTheme'\nexport * from './hooks/useUnmountEffect'\n\nexport * from './views/Slot'\nexport * from './views/Stack'\nexport * from './views/Text'\nexport { TextAncestorProvider, TextAncestorContext } from './views/TextAncestorContext'\nexport * from './views/Theme'\nexport * from './views/ThemeInverse'\nexport * from './views/ThemeProvider'\nexport * from './views/ThemeReset'\n\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/helpers'\n"],
5
+ "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;",
6
6
  "names": []
7
7
  }