@tamagui/core 1.0.0-beta.1 → 1.0.0-beta.12

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 (357) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/Tamagui.js +0 -0
  3. package/dist/cjs/Tamagui.js.map +0 -0
  4. package/dist/cjs/ThemeContext.js +0 -0
  5. package/dist/cjs/ThemeContext.js.map +0 -0
  6. package/dist/cjs/ThemeManager.js +0 -0
  7. package/dist/cjs/ThemeManager.js.map +0 -0
  8. package/dist/cjs/conf.js +0 -0
  9. package/dist/cjs/conf.js.map +0 -0
  10. package/dist/cjs/constants/constants.js +0 -0
  11. package/dist/cjs/constants/constants.js.map +0 -0
  12. package/dist/cjs/constants/platform.js +0 -0
  13. package/dist/cjs/constants/platform.js.map +0 -0
  14. package/dist/cjs/constants/rnw.js +0 -0
  15. package/dist/cjs/constants/rnw.js.map +0 -0
  16. package/dist/cjs/contexts/ButtonInsideButtonContext.js +0 -0
  17. package/dist/cjs/contexts/ButtonInsideButtonContext.js.map +0 -0
  18. package/dist/cjs/createComponent.js +46 -15
  19. package/dist/cjs/createComponent.js.map +2 -2
  20. package/dist/cjs/createFont.js +0 -0
  21. package/dist/cjs/createFont.js.map +0 -0
  22. package/dist/cjs/createShorthands.js +0 -0
  23. package/dist/cjs/createShorthands.js.map +0 -0
  24. package/dist/cjs/createTamagui.js +0 -0
  25. package/dist/cjs/createTamagui.js.map +0 -0
  26. package/dist/cjs/createTheme.js +0 -0
  27. package/dist/cjs/createTheme.js.map +0 -0
  28. package/dist/cjs/createTokens.js +0 -0
  29. package/dist/cjs/createTokens.js.map +0 -0
  30. package/dist/cjs/createVariable.js +0 -0
  31. package/dist/cjs/createVariable.js.map +0 -0
  32. package/dist/cjs/defaultComponentState.js +0 -0
  33. package/dist/cjs/defaultComponentState.js.map +0 -0
  34. package/dist/cjs/helpers/RNComponents.js +0 -0
  35. package/dist/cjs/helpers/RNComponents.js.map +0 -0
  36. package/dist/cjs/helpers/addStylesUsingClassname.js +17 -12
  37. package/dist/cjs/helpers/addStylesUsingClassname.js.map +2 -2
  38. package/dist/cjs/helpers/areEqualSets.js +0 -0
  39. package/dist/cjs/helpers/areEqualSets.js.map +0 -0
  40. package/dist/cjs/helpers/createMediaStyle.js +0 -0
  41. package/dist/cjs/helpers/createMediaStyle.js.map +0 -0
  42. package/dist/cjs/helpers/createPropMapper.js +34 -3
  43. package/dist/cjs/helpers/createPropMapper.js.map +2 -2
  44. package/dist/cjs/helpers/createShallowUpdate.js +0 -0
  45. package/dist/cjs/helpers/createShallowUpdate.js.map +0 -0
  46. package/dist/cjs/helpers/createTamaguiProvider.js +0 -0
  47. package/dist/cjs/helpers/createTamaguiProvider.js.map +0 -0
  48. package/dist/cjs/helpers/extendStaticConfig.js +0 -0
  49. package/dist/cjs/helpers/extendStaticConfig.js.map +0 -0
  50. package/dist/cjs/helpers/fixNativeShadow.js +0 -0
  51. package/dist/cjs/helpers/fixNativeShadow.js.map +0 -0
  52. package/dist/cjs/helpers/fixNativeShadow.native.js +4 -7
  53. package/dist/cjs/helpers/fixNativeShadow.native.js.map +2 -2
  54. package/dist/cjs/helpers/getButtonSize.js +45 -0
  55. package/dist/cjs/helpers/getButtonSize.js.map +7 -0
  56. package/dist/cjs/helpers/getExpandedShorthands.js +0 -0
  57. package/dist/cjs/helpers/getExpandedShorthands.js.map +0 -0
  58. package/dist/cjs/helpers/getSize.js +0 -0
  59. package/dist/cjs/helpers/getSize.js.map +0 -0
  60. package/dist/cjs/helpers/getSplitStyles.js +0 -6
  61. package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
  62. package/dist/cjs/helpers/getStylesAtomic.js +0 -0
  63. package/dist/cjs/helpers/getStylesAtomic.js.map +0 -0
  64. package/dist/cjs/helpers/getStylesAtomic.native.js +0 -0
  65. package/dist/cjs/helpers/getStylesAtomic.native.js.map +0 -0
  66. package/dist/cjs/helpers/getTextSize.js +56 -0
  67. package/dist/cjs/helpers/getTextSize.js.map +7 -0
  68. package/dist/cjs/helpers/insertStyleRule.js +1 -0
  69. package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
  70. package/dist/cjs/helpers/isObj.js +0 -0
  71. package/dist/cjs/helpers/isObj.js.map +0 -0
  72. package/dist/cjs/helpers/isTamaguiElement.js +0 -0
  73. package/dist/cjs/helpers/isTamaguiElement.js.map +0 -0
  74. package/dist/cjs/helpers/matchMedia.js +0 -0
  75. package/dist/cjs/helpers/matchMedia.js.map +0 -0
  76. package/dist/cjs/helpers/matchMedia.native.js +0 -0
  77. package/dist/cjs/helpers/matchMedia.native.js.map +0 -0
  78. package/dist/cjs/helpers/proxyThemeVariables.js +0 -0
  79. package/dist/cjs/helpers/proxyThemeVariables.js.map +0 -0
  80. package/dist/cjs/helpers/themeable.js +0 -0
  81. package/dist/cjs/helpers/themeable.js.map +0 -0
  82. package/dist/cjs/helpers/validate.js +0 -0
  83. package/dist/cjs/helpers/validate.js.map +0 -0
  84. package/dist/cjs/helpers/withStaticProperties.js +0 -0
  85. package/dist/cjs/helpers/withStaticProperties.js.map +0 -0
  86. package/dist/cjs/helpers/wrapThemeManagerContext.js +0 -0
  87. package/dist/cjs/helpers/wrapThemeManagerContext.js.map +0 -0
  88. package/dist/cjs/hooks/useConstant.js +0 -0
  89. package/dist/cjs/hooks/useConstant.js.map +0 -0
  90. package/dist/cjs/hooks/useFeatures.js +0 -0
  91. package/dist/cjs/hooks/useFeatures.js.map +0 -0
  92. package/dist/cjs/hooks/useId.js +59 -0
  93. package/dist/cjs/hooks/useId.js.map +7 -0
  94. package/dist/cjs/hooks/useIsMounted.js +0 -0
  95. package/dist/cjs/hooks/useIsMounted.js.map +0 -0
  96. package/dist/cjs/hooks/useIsTouchDevice.js +4 -4
  97. package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
  98. package/dist/cjs/hooks/useMedia.js +0 -1
  99. package/dist/cjs/hooks/useMedia.js.map +2 -2
  100. package/dist/cjs/hooks/usePressable.js +0 -0
  101. package/dist/cjs/hooks/usePressable.js.map +0 -0
  102. package/dist/cjs/hooks/usePrevious.js +1 -0
  103. package/dist/cjs/hooks/usePrevious.js.map +7 -0
  104. package/dist/cjs/hooks/useTheme.js +0 -0
  105. package/dist/cjs/hooks/useTheme.js.map +2 -2
  106. package/dist/cjs/hooks/useUnmountEffect.js +0 -0
  107. package/dist/cjs/hooks/useUnmountEffect.js.map +0 -0
  108. package/dist/cjs/index.js +9 -6
  109. package/dist/cjs/index.js.map +2 -2
  110. package/dist/cjs/static.js +0 -0
  111. package/dist/cjs/static.js.map +0 -0
  112. package/dist/cjs/styled.js +4 -1
  113. package/dist/cjs/styled.js.map +2 -2
  114. package/dist/cjs/types-rnw.js +0 -0
  115. package/dist/cjs/types-rnw.js.map +0 -0
  116. package/dist/cjs/types.js +0 -0
  117. package/dist/cjs/types.js.map +1 -1
  118. package/dist/cjs/views/Slot.js +115 -0
  119. package/dist/cjs/views/Slot.js.map +7 -0
  120. package/dist/cjs/views/Stack.js +0 -0
  121. package/dist/cjs/views/Stack.js.map +0 -0
  122. package/dist/cjs/views/Text.js +0 -0
  123. package/dist/cjs/views/Text.js.map +0 -0
  124. package/dist/cjs/views/TextAncestorContext.js +0 -0
  125. package/dist/cjs/views/TextAncestorContext.js.map +0 -0
  126. package/dist/cjs/views/Theme.js +0 -0
  127. package/dist/cjs/views/Theme.js.map +0 -0
  128. package/dist/cjs/views/ThemeInverse.js +0 -0
  129. package/dist/cjs/views/ThemeInverse.js.map +0 -0
  130. package/dist/cjs/views/ThemeProvider.js +0 -0
  131. package/dist/cjs/views/ThemeProvider.js.map +0 -0
  132. package/dist/cjs/views/ThemeReset.js +0 -0
  133. package/dist/cjs/views/ThemeReset.js.map +0 -0
  134. package/dist/esm/Tamagui.js +0 -0
  135. package/dist/esm/Tamagui.js.map +0 -0
  136. package/dist/esm/ThemeContext.js +0 -0
  137. package/dist/esm/ThemeContext.js.map +0 -0
  138. package/dist/esm/ThemeManager.js +0 -0
  139. package/dist/esm/ThemeManager.js.map +0 -0
  140. package/dist/esm/conf.js +0 -0
  141. package/dist/esm/conf.js.map +0 -0
  142. package/dist/esm/constants/constants.js +0 -0
  143. package/dist/esm/constants/constants.js.map +0 -0
  144. package/dist/esm/constants/platform.js +0 -0
  145. package/dist/esm/constants/platform.js.map +0 -0
  146. package/dist/esm/constants/rnw.js +0 -0
  147. package/dist/esm/constants/rnw.js.map +0 -0
  148. package/dist/esm/contexts/ButtonInsideButtonContext.js +0 -0
  149. package/dist/esm/contexts/ButtonInsideButtonContext.js.map +0 -0
  150. package/dist/esm/createComponent.js +50 -23
  151. package/dist/esm/createComponent.js.map +2 -2
  152. package/dist/esm/createFont.js +0 -0
  153. package/dist/esm/createFont.js.map +0 -0
  154. package/dist/esm/createShorthands.js +0 -0
  155. package/dist/esm/createShorthands.js.map +0 -0
  156. package/dist/esm/createTamagui.js +0 -0
  157. package/dist/esm/createTamagui.js.map +0 -0
  158. package/dist/esm/createTheme.js +0 -0
  159. package/dist/esm/createTheme.js.map +0 -0
  160. package/dist/esm/createTokens.js +0 -0
  161. package/dist/esm/createTokens.js.map +0 -0
  162. package/dist/esm/createVariable.js +0 -0
  163. package/dist/esm/createVariable.js.map +0 -0
  164. package/dist/esm/defaultComponentState.js +0 -0
  165. package/dist/esm/defaultComponentState.js.map +0 -0
  166. package/dist/esm/helpers/RNComponents.js +0 -0
  167. package/dist/esm/helpers/RNComponents.js.map +0 -0
  168. package/dist/esm/helpers/addStylesUsingClassname.js +18 -13
  169. package/dist/esm/helpers/addStylesUsingClassname.js.map +2 -2
  170. package/dist/esm/helpers/areEqualSets.js +0 -0
  171. package/dist/esm/helpers/areEqualSets.js.map +0 -0
  172. package/dist/esm/helpers/createMediaStyle.js +0 -0
  173. package/dist/esm/helpers/createMediaStyle.js.map +0 -0
  174. package/dist/esm/helpers/createPropMapper.js +35 -3
  175. package/dist/esm/helpers/createPropMapper.js.map +2 -2
  176. package/dist/esm/helpers/createShallowUpdate.js +0 -0
  177. package/dist/esm/helpers/createShallowUpdate.js.map +0 -0
  178. package/dist/esm/helpers/createTamaguiProvider.js +0 -0
  179. package/dist/esm/helpers/createTamaguiProvider.js.map +0 -0
  180. package/dist/esm/helpers/extendStaticConfig.js +0 -0
  181. package/dist/esm/helpers/extendStaticConfig.js.map +0 -0
  182. package/dist/esm/helpers/fixNativeShadow.js +0 -0
  183. package/dist/esm/helpers/fixNativeShadow.js.map +0 -0
  184. package/dist/esm/helpers/fixNativeShadow.native.js +5 -7
  185. package/dist/esm/helpers/fixNativeShadow.native.js.map +2 -2
  186. package/dist/esm/helpers/getButtonSize.js +24 -0
  187. package/dist/esm/helpers/getButtonSize.js.map +7 -0
  188. package/dist/esm/helpers/getExpandedShorthands.js +0 -0
  189. package/dist/esm/helpers/getExpandedShorthands.js.map +0 -0
  190. package/dist/esm/helpers/getSize.js +0 -0
  191. package/dist/esm/helpers/getSize.js.map +0 -0
  192. package/dist/esm/helpers/getSplitStyles.js +0 -7
  193. package/dist/esm/helpers/getSplitStyles.js.map +2 -2
  194. package/dist/esm/helpers/getStylesAtomic.js +0 -0
  195. package/dist/esm/helpers/getStylesAtomic.js.map +0 -0
  196. package/dist/esm/helpers/getStylesAtomic.native.js +0 -0
  197. package/dist/esm/helpers/getStylesAtomic.native.js.map +0 -0
  198. package/dist/esm/helpers/getTextSize.js +34 -0
  199. package/dist/esm/helpers/getTextSize.js.map +7 -0
  200. package/dist/esm/helpers/insertStyleRule.js +1 -0
  201. package/dist/esm/helpers/insertStyleRule.js.map +2 -2
  202. package/dist/esm/helpers/isObj.js +0 -0
  203. package/dist/esm/helpers/isObj.js.map +0 -0
  204. package/dist/esm/helpers/isTamaguiElement.js +0 -0
  205. package/dist/esm/helpers/isTamaguiElement.js.map +0 -0
  206. package/dist/esm/helpers/matchMedia.js +0 -0
  207. package/dist/esm/helpers/matchMedia.js.map +0 -0
  208. package/dist/esm/helpers/matchMedia.native.js +0 -0
  209. package/dist/esm/helpers/matchMedia.native.js.map +0 -0
  210. package/dist/esm/helpers/proxyThemeVariables.js +0 -0
  211. package/dist/esm/helpers/proxyThemeVariables.js.map +0 -0
  212. package/dist/esm/helpers/themeable.js +0 -0
  213. package/dist/esm/helpers/themeable.js.map +0 -0
  214. package/dist/esm/helpers/validate.js +0 -0
  215. package/dist/esm/helpers/validate.js.map +0 -0
  216. package/dist/esm/helpers/withStaticProperties.js +0 -0
  217. package/dist/esm/helpers/withStaticProperties.js.map +0 -0
  218. package/dist/esm/helpers/wrapThemeManagerContext.js +0 -0
  219. package/dist/esm/helpers/wrapThemeManagerContext.js.map +0 -0
  220. package/dist/esm/hooks/useConstant.js +0 -0
  221. package/dist/esm/hooks/useConstant.js.map +0 -0
  222. package/dist/esm/hooks/useFeatures.js +0 -0
  223. package/dist/esm/hooks/useFeatures.js.map +0 -0
  224. package/dist/esm/hooks/useId.js +35 -0
  225. package/dist/esm/hooks/useId.js.map +7 -0
  226. package/dist/esm/hooks/useIsMounted.js +0 -0
  227. package/dist/esm/hooks/useIsMounted.js.map +0 -0
  228. package/dist/esm/hooks/useIsTouchDevice.js +6 -6
  229. package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
  230. package/dist/esm/hooks/useMedia.js +0 -1
  231. package/dist/esm/hooks/useMedia.js.map +2 -2
  232. package/dist/esm/hooks/usePressable.js +0 -0
  233. package/dist/esm/hooks/usePressable.js.map +0 -0
  234. package/dist/esm/hooks/usePrevious.js +1 -0
  235. package/dist/esm/hooks/usePrevious.js.map +7 -0
  236. package/dist/esm/hooks/useTheme.js +0 -0
  237. package/dist/esm/hooks/useTheme.js.map +2 -2
  238. package/dist/esm/hooks/useUnmountEffect.js +0 -0
  239. package/dist/esm/hooks/useUnmountEffect.js.map +0 -0
  240. package/dist/esm/index.js +9 -6
  241. package/dist/esm/index.js.map +2 -2
  242. package/dist/esm/static.js +0 -0
  243. package/dist/esm/static.js.map +0 -0
  244. package/dist/esm/styled.js +4 -1
  245. package/dist/esm/styled.js.map +2 -2
  246. package/dist/esm/types-rnw.js +0 -0
  247. package/dist/esm/types-rnw.js.map +0 -0
  248. package/dist/esm/types.js +0 -0
  249. package/dist/esm/types.js.map +0 -0
  250. package/dist/esm/views/Slot.js +63 -0
  251. package/dist/esm/views/Slot.js.map +7 -0
  252. package/dist/esm/views/Stack.js +0 -0
  253. package/dist/esm/views/Stack.js.map +0 -0
  254. package/dist/esm/views/Text.js +0 -0
  255. package/dist/esm/views/Text.js.map +0 -0
  256. package/dist/esm/views/TextAncestorContext.js +0 -0
  257. package/dist/esm/views/TextAncestorContext.js.map +0 -0
  258. package/dist/esm/views/Theme.js +0 -0
  259. package/dist/esm/views/Theme.js.map +0 -0
  260. package/dist/esm/views/ThemeInverse.js +0 -0
  261. package/dist/esm/views/ThemeInverse.js.map +0 -0
  262. package/dist/esm/views/ThemeProvider.js +0 -0
  263. package/dist/esm/views/ThemeProvider.js.map +0 -0
  264. package/dist/esm/views/ThemeReset.js +0 -0
  265. package/dist/esm/views/ThemeReset.js.map +0 -0
  266. package/dist/jsx/Tamagui.js +0 -0
  267. package/dist/jsx/ThemeContext.js +0 -0
  268. package/dist/jsx/ThemeManager.js +0 -0
  269. package/dist/jsx/conf.js +0 -0
  270. package/dist/jsx/constants/constants.js +0 -0
  271. package/dist/jsx/constants/platform.js +0 -0
  272. package/dist/jsx/constants/rnw.js +0 -0
  273. package/dist/jsx/contexts/ButtonInsideButtonContext.js +0 -0
  274. package/dist/jsx/createComponent.js +50 -23
  275. package/dist/jsx/createFont.js +0 -0
  276. package/dist/jsx/createShorthands.js +0 -0
  277. package/dist/jsx/createTamagui.js +0 -0
  278. package/dist/jsx/createTheme.js +0 -0
  279. package/dist/jsx/createTokens.js +0 -0
  280. package/dist/jsx/createVariable.js +0 -0
  281. package/dist/jsx/defaultComponentState.js +0 -0
  282. package/dist/jsx/helpers/RNComponents.js +0 -0
  283. package/dist/jsx/helpers/addStylesUsingClassname.js +18 -13
  284. package/dist/jsx/helpers/areEqualSets.js +0 -0
  285. package/dist/jsx/helpers/createMediaStyle.js +0 -0
  286. package/dist/jsx/helpers/createPropMapper.js +35 -3
  287. package/dist/jsx/helpers/createShallowUpdate.js +0 -0
  288. package/dist/jsx/helpers/createTamaguiProvider.js +0 -0
  289. package/dist/jsx/helpers/extendStaticConfig.js +0 -0
  290. package/dist/jsx/helpers/fixNativeShadow.js +0 -0
  291. package/dist/jsx/helpers/fixNativeShadow.native.js +5 -7
  292. package/dist/jsx/helpers/getButtonSize.js +23 -0
  293. package/dist/jsx/helpers/getExpandedShorthands.js +0 -0
  294. package/dist/jsx/helpers/getSize.js +0 -0
  295. package/dist/jsx/helpers/getSplitStyles.js +0 -7
  296. package/dist/jsx/helpers/getStylesAtomic.js +0 -0
  297. package/dist/jsx/helpers/getStylesAtomic.native.js +0 -0
  298. package/dist/jsx/helpers/getTextSize.js +33 -0
  299. package/dist/jsx/helpers/insertStyleRule.js +1 -0
  300. package/dist/jsx/helpers/isObj.js +0 -0
  301. package/dist/jsx/helpers/isTamaguiElement.js +0 -0
  302. package/dist/jsx/helpers/matchMedia.js +0 -0
  303. package/dist/jsx/helpers/matchMedia.native.js +0 -0
  304. package/dist/jsx/helpers/proxyThemeVariables.js +0 -0
  305. package/dist/jsx/helpers/themeable.js +0 -0
  306. package/dist/jsx/helpers/validate.js +0 -0
  307. package/dist/jsx/helpers/withStaticProperties.js +0 -0
  308. package/dist/jsx/helpers/wrapThemeManagerContext.js +0 -0
  309. package/dist/jsx/hooks/useConstant.js +0 -0
  310. package/dist/jsx/hooks/useFeatures.js +0 -0
  311. package/dist/jsx/hooks/useId.js +34 -0
  312. package/dist/jsx/hooks/useIsMounted.js +0 -0
  313. package/dist/jsx/hooks/useIsTouchDevice.js +6 -6
  314. package/dist/jsx/hooks/useMedia.js +0 -1
  315. package/dist/jsx/hooks/usePressable.js +0 -0
  316. package/dist/jsx/hooks/usePrevious.js +0 -0
  317. package/dist/jsx/hooks/useTheme.js +0 -0
  318. package/dist/jsx/hooks/useUnmountEffect.js +0 -0
  319. package/dist/jsx/index.js +9 -6
  320. package/dist/jsx/static.js +0 -0
  321. package/dist/jsx/styled.js +4 -1
  322. package/dist/jsx/types-rnw.js +0 -0
  323. package/dist/jsx/types.js +0 -0
  324. package/dist/jsx/views/Slot.js +56 -0
  325. package/dist/jsx/views/Stack.js +0 -0
  326. package/dist/jsx/views/Text.js +0 -0
  327. package/dist/jsx/views/TextAncestorContext.js +0 -0
  328. package/dist/jsx/views/Theme.js +0 -0
  329. package/dist/jsx/views/ThemeInverse.js +0 -0
  330. package/dist/jsx/views/ThemeProvider.js +0 -0
  331. package/dist/jsx/views/ThemeReset.js +0 -0
  332. package/package.json +7 -5
  333. package/types/createComponent.d.ts.map +1 -1
  334. package/types/helpers/addStylesUsingClassname.d.ts.map +1 -1
  335. package/types/helpers/createPropMapper.d.ts +1 -1
  336. package/types/helpers/createPropMapper.d.ts.map +1 -1
  337. package/types/helpers/fixNativeShadow.native.d.ts +2 -1
  338. package/types/helpers/fixNativeShadow.native.d.ts.map +1 -1
  339. package/types/helpers/getButtonSize.d.ts +8 -0
  340. package/types/helpers/getButtonSize.d.ts.map +1 -0
  341. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  342. package/types/helpers/getTextSize.d.ts +3 -0
  343. package/types/helpers/getTextSize.d.ts.map +1 -0
  344. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  345. package/types/hooks/useId.d.ts +9 -0
  346. package/types/hooks/useId.d.ts.map +1 -0
  347. package/types/hooks/useMedia.d.ts.map +1 -1
  348. package/types/hooks/usePrevious.d.ts +1 -0
  349. package/types/hooks/usePrevious.d.ts.map +1 -0
  350. package/types/hooks/useTheme.d.ts.map +1 -1
  351. package/types/index.d.ts +9 -6
  352. package/types/index.d.ts.map +1 -1
  353. package/types/styled.d.ts.map +1 -1
  354. package/types/types.d.ts +20 -5
  355. package/types/types.d.ts.map +1 -1
  356. package/types/views/Slot.d.ts +9 -0
  357. package/types/views/Slot.d.ts.map +1 -0
@@ -16,21 +16,19 @@ import React, {
16
16
  import { StyleSheet, Text, View } from "react-native";
17
17
  import { onConfiguredOnce } from "./conf";
18
18
  import { stackDefaultStyles } from "./constants/constants";
19
- import { isAndroid, isTouchDevice, isWeb, useIsomorphicLayoutEffect } from "./constants/platform";
19
+ import { isAndroid, isWeb, useIsomorphicLayoutEffect } from "./constants/platform";
20
20
  import { rnw } from "./constants/rnw";
21
- import { isVariable } from "./createVariable";
22
21
  import { createShallowUpdate } from "./helpers/createShallowUpdate";
23
22
  import { extendStaticConfig, parseStaticConfig } from "./helpers/extendStaticConfig";
24
- import {
25
- insertSplitStyles,
26
- useSplitStyles
27
- } from "./helpers/getSplitStyles";
23
+ import { insertSplitStyles, useSplitStyles } from "./helpers/getSplitStyles";
28
24
  import { getAllSelectors } from "./helpers/insertStyleRule";
29
25
  import { proxyThemeVariables } from "./helpers/proxyThemeVariables";
30
26
  import { wrapThemeManagerContext } from "./helpers/wrapThemeManagerContext";
31
27
  import { useFeatures } from "./hooks/useFeatures";
28
+ import { useIsTouchDevice } from "./hooks/useIsTouchDevice";
32
29
  import { usePressable } from "./hooks/usePressable";
33
30
  import { getThemeManagerIfChanged, useTheme } from "./hooks/useTheme";
31
+ import { Slot } from "./views/Slot";
34
32
  import { TextAncestorContext } from "./views/TextAncestorContext";
35
33
  React["keep"];
36
34
  const defaultComponentState = {
@@ -47,6 +45,14 @@ if (typeof document !== "undefined") {
47
45
  mouseUps.forEach((x) => x());
48
46
  mouseUps.clear();
49
47
  });
48
+ document.addEventListener("touchend", () => {
49
+ mouseUps.forEach((x) => x());
50
+ mouseUps.clear();
51
+ });
52
+ document.addEventListener("touchcancel", () => {
53
+ mouseUps.forEach((x) => x());
54
+ mouseUps.clear();
55
+ });
50
56
  }
51
57
  function mergeShorthands({ defaultProps }, { shorthands }) {
52
58
  for (const key in defaultProps) {
@@ -71,6 +77,7 @@ function createComponent(configIn, ParentComponent) {
71
77
  let avoidClasses = true;
72
78
  let defaultNativeStyle;
73
79
  let defaultNativeStyleSheet;
80
+ let tamaguiDefaultProps;
74
81
  let initialSplitStyles;
75
82
  function addPseudoToStyles(styles, name, pseudos) {
76
83
  const pseudoStyle = pseudos[name];
@@ -86,11 +93,12 @@ function createComponent(configIn, ParentComponent) {
86
93
  __name(addPseudoToStyles, "addPseudoToStyles");
87
94
  const component = forwardRef((props, forwardedRef) => {
88
95
  var _a, _b, _c, _d;
96
+ props = tamaguiDefaultProps && !props.asChild ? { ...tamaguiDefaultProps, ...props } : props;
89
97
  const { Component, componentName, isText, isZStack } = staticConfig;
90
98
  if (process.env.NODE_ENV === "development") {
91
99
  if (props["debug"]) {
92
- console.warn(staticConfig.componentName || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]", "debug on");
93
- console.log("props in:", props);
100
+ console.log("\u26A0\uFE0F", staticConfig.componentName || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]", "debug on");
101
+ console.log("props in:", props, Object.keys(props));
94
102
  if (props["debug"] === "break")
95
103
  debugger;
96
104
  }
@@ -100,7 +108,7 @@ function createComponent(configIn, ParentComponent) {
100
108
  const [state, set_] = useState(defaultComponentState);
101
109
  const setStateShallow = createShallowUpdate(set_);
102
110
  const shouldAvoidClasses = !!(props.animation && avoidClasses);
103
- const splitStyles = useSplitStyles(props, staticConfig, theme, shouldAvoidClasses ? { ...state, noClassNames: true, resolveVariablesAs: "value" } : state, shouldAvoidClasses ? null : initialSplitStyles.classNames);
111
+ const splitStyles = useSplitStyles(props, staticConfig, theme, shouldAvoidClasses ? { ...state, noClassNames: true, resolveVariablesAs: "value" } : state, shouldAvoidClasses || props.asChild ? null : initialSplitStyles.classNames);
104
112
  const { viewProps: viewPropsIn, pseudos, medias, style, classNames } = splitStyles;
105
113
  const useAnimations = (_a = tamaguiConfig.animations) == null ? void 0 : _a.useAnimations;
106
114
  const isAnimated = !!(useAnimations && props.animation);
@@ -119,6 +127,7 @@ function createComponent(configIn, ParentComponent) {
119
127
  const {
120
128
  tag,
121
129
  hitSlop,
130
+ asChild,
122
131
  children,
123
132
  pointerEvents,
124
133
  onPress,
@@ -202,7 +211,7 @@ function createComponent(configIn, ParentComponent) {
202
211
  if (accessibilityRole)
203
212
  viewProps.accessibilityRole = accessibilityRole;
204
213
  }
205
- if (isWeb) {
214
+ if (isWeb && !asChild) {
206
215
  rnw.useResponderEvents(hostRef, {
207
216
  onMoveShouldSetResponder,
208
217
  onMoveShouldSetResponderCapture,
@@ -306,10 +315,11 @@ function createComponent(configIn, ParentComponent) {
306
315
  }
307
316
  const initialPseudos = initialSplitStyles.pseudos;
308
317
  const attachPress = !!(pseudos && pseudos.pressStyle || initialPseudos && initialPseudos.pressStyle || onPress || onPressOut || onPressIn || onClick);
309
- const isHoverable = isWeb && !isTouchDevice;
318
+ const isTouch = useIsTouchDevice();
319
+ const isHoverable = isWeb && !isTouch;
310
320
  const attachHover = isHoverable && !!(pseudos && pseudos.hoverStyle || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave);
311
321
  const pressEventKey = isStringElement ? "onClick" : "onPress";
312
- const shouldAttach = attachPress || attachHover || "pressStyle" in props || "onPress" in props || "onPressIn" in props || "onPressOut" in props || isWeb && ("hoverStyle" in props || "onHoverIn" in props || "onHoverOut" in props || "onMouseEnter" in props || "onMouseLeave" in props);
322
+ const shouldAttach = !asChild && (attachPress || attachHover || "pressStyle" in props || "onPress" in props || "onPressIn" in props || "onPressOut" in props || isWeb && ("hoverStyle" in props || "onHoverIn" in props || "onHoverOut" in props || "onMouseEnter" in props || "onMouseLeave" in props));
313
323
  const unPress = useCallback(() => {
314
324
  if (!internal.current.isMounted)
315
325
  return;
@@ -364,15 +374,18 @@ function createComponent(configIn, ParentComponent) {
364
374
  });
365
375
  onPressIn == null ? void 0 : onPressIn(e);
366
376
  onMouseDown == null ? void 0 : onMouseDown(e);
377
+ if (isWeb) {
378
+ mouseUps.add(unPress);
379
+ }
367
380
  } : null,
368
381
  [pressEventKey]: attachPress ? (e) => {
382
+ onClick == null ? void 0 : onClick(e);
369
383
  onPress == null ? void 0 : onPress(e);
370
384
  unPress();
371
385
  onPressOut == null ? void 0 : onPressOut(e);
372
- onClick == null ? void 0 : onClick(e);
373
386
  } : null
374
387
  } : null;
375
- let childEls = !children ? children : wrapThemeManagerContext(spacedChildren({
388
+ const childEls = !children || asChild ? children : wrapThemeManagerContext(spacedChildren({
376
389
  children,
377
390
  space,
378
391
  flexDirection: props.flexDirection || ((_b = staticConfig.defaultProps) == null ? void 0 : _b.flexDirection),
@@ -412,6 +425,11 @@ function createComponent(configIn, ParentComponent) {
412
425
  Object.assign(viewProps, events);
413
426
  }
414
427
  }
428
+ if (asChild) {
429
+ ViewComponent = Slot;
430
+ const onlyChild = React.Children.only(children);
431
+ Object.assign(viewProps, onlyChild.props);
432
+ }
415
433
  content = createElement(ViewComponent, viewProps, childEls);
416
434
  if (isWeb && events && attachHover) {
417
435
  content = <span className="tui_Hoverable" style={{
@@ -453,24 +471,33 @@ function createComponent(configIn, ParentComponent) {
453
471
  resolveVariablesAs: "both",
454
472
  keepVariantsAsProps: true
455
473
  });
456
- const { style, viewProps } = initialSplitStyles;
474
+ const defaults = {
475
+ ...component.defaultProps,
476
+ ...initialSplitStyles.viewProps
477
+ };
457
478
  defaultNativeStyle = {};
458
- for (const key in style) {
459
- const v = style[key];
460
- defaultNativeStyle[key] = isVariable(v) ? v.val : v;
479
+ for (const key in staticConfig.defaultProps) {
480
+ const val = staticConfig.defaultProps[key];
481
+ if (typeof val === "string" && val[0] === "$") {
482
+ defaults[key] = val;
483
+ } else {
484
+ defaultNativeStyle[key] = val;
485
+ }
461
486
  }
462
487
  defaultNativeStyleSheet = StyleSheet.create({
463
488
  base: defaultNativeStyle
464
489
  });
465
- component.defaultProps = {
466
- ...viewProps,
467
- ...component.defaultProps
468
- };
490
+ if (Object.keys(defaults).length) {
491
+ tamaguiDefaultProps = defaults;
492
+ }
469
493
  if (process.env.NODE_ENV === "development" && ((_d = staticConfig.defaultProps) == null ? void 0 : _d.debug)) {
470
494
  if (process.env.IS_STATIC !== "is_static") {
471
495
  console.log(`\u{1F41B} [${staticConfig.componentName || "Component"}]`, {
472
496
  staticConfig,
473
- initialSplitStyles
497
+ initialSplitStyles,
498
+ tamaguiDefaultProps,
499
+ defaultNativeStyle,
500
+ defaults
474
501
  });
475
502
  }
476
503
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,24 +1,29 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { useInsertionEffect, useLayoutEffect } from "react";
3
+ import { useInsertionEffect } from "react";
4
4
  import { getStylesAtomic } from "./getStylesAtomic";
5
5
  import { insertStyleRule, updateInsertedCache } from "./insertStyleRule";
6
6
  let added = /* @__PURE__ */ new Set();
7
- const effect = useInsertionEffect || useLayoutEffect;
8
7
  function useStylesAsClassname(styles, disable = false, debug = false) {
9
- const insertions = [];
10
- const className = addStylesUsingClassname(disable ? [] : styles, debug, (identifier, rules) => {
11
- for (const rule of rules) {
12
- insertions.push({ identifier, rule });
13
- updateInsertedCache(identifier, rule);
14
- }
15
- });
16
- effect(() => {
8
+ if (!useInsertionEffect) {
9
+ return addStylesUsingClassname(disable ? styles : [], debug);
10
+ } else {
11
+ const insertions = [];
12
+ const className = addStylesUsingClassname(disable ? [] : styles, debug, (identifier, rules) => {
13
+ for (const rule of rules) {
14
+ insertions.push({ identifier, rule });
15
+ }
16
+ });
17
17
  for (const { identifier, rule } of insertions) {
18
- insertStyleRule(identifier, rule);
18
+ updateInsertedCache(identifier, rule);
19
19
  }
20
- }, [className]);
21
- return className;
20
+ useInsertionEffect(() => {
21
+ for (const { identifier, rule } of insertions) {
22
+ insertStyleRule(identifier, rule);
23
+ }
24
+ });
25
+ return className;
26
+ }
22
27
  }
23
28
  __name(useStylesAsClassname, "useStylesAsClassname");
24
29
  function addStylesUsingClassname(styles, debug = false, onAdd) {
File without changes
File without changes
@@ -63,7 +63,7 @@ const createPropMapper = /* @__PURE__ */ __name((staticConfig) => {
63
63
  if (isObj(variantValue)) {
64
64
  variantValue = resolveTokens(variantValue, conf, theme, fontFamily, returnVariablesAs);
65
65
  }
66
- return variantValue;
66
+ return expansions(variantValue);
67
67
  }
68
68
  }
69
69
  let shouldReturn = false;
@@ -80,9 +80,9 @@ const createPropMapper = /* @__PURE__ */ __name((staticConfig) => {
80
80
  }
81
81
  }
82
82
  if (shouldReturn) {
83
- return {
83
+ return expansions({
84
84
  [key]: value
85
- };
85
+ });
86
86
  }
87
87
  };
88
88
  }, "createPropMapper");
@@ -200,6 +200,38 @@ const tokenCategories = {
200
200
  borderRightColor: true
201
201
  }
202
202
  };
203
+ const sidesX = ["Left", "Right"];
204
+ const sidesY = ["Top", "Bottom"];
205
+ const sidesXY = [...sidesX, ...sidesY];
206
+ const expand = {
207
+ padding: sidesXY.map((x) => `padding${x}`),
208
+ paddingHorizontal: sidesX.map((x) => `padding${x}`),
209
+ paddingVertical: sidesY.map((x) => `padding${x}`),
210
+ margin: sidesXY.map((x) => `margin${x}`),
211
+ marginHorizontal: sidesX.map((x) => `margin${x}`),
212
+ marginVertical: sidesY.map((x) => `margin${x}`),
213
+ borderWidth: sidesXY.map((x) => `border${x}Width`)
214
+ };
215
+ function expansions(styleObj) {
216
+ var _a, _b;
217
+ for (const key in expand) {
218
+ if (key in styleObj) {
219
+ for (const expandKey of expand[key]) {
220
+ styleObj[expandKey] = styleObj[key];
221
+ }
222
+ delete styleObj[key];
223
+ }
224
+ }
225
+ if ("flex" in styleObj) {
226
+ if (typeof styleObj.flex === "number") {
227
+ styleObj.flexGrow = (_a = styleObj.flexGrow) != null ? _a : styleObj.flex;
228
+ styleObj.flexShrink = (_b = styleObj.flexShrink) != null ? _b : 1;
229
+ delete styleObj.flex;
230
+ }
231
+ }
232
+ return styleObj;
233
+ }
234
+ __name(expansions, "expansions");
203
235
  export {
204
236
  createPropMapper
205
237
  };
File without changes
File without changes
File without changes
File without changes
@@ -2,7 +2,8 @@ var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
  const matchRgbaHsla = /(rgba|hsla)\(\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,})\s*\)$/;
4
4
  function fixNativeShadow(props) {
5
- if (!props.shadowColor) {
5
+ var _a, _b;
6
+ if (!props.shadowColor || props.shadowColor === "transparent") {
6
7
  return;
7
8
  }
8
9
  if (!props.shadowOffset) {
@@ -11,10 +12,7 @@ function fixNativeShadow(props) {
11
12
  height: 0
12
13
  };
13
14
  }
14
- if ("shadowOpacity" in props) {
15
- return;
16
- }
17
- const c = `${props.shadowColor}`;
15
+ const c = String(props.shadowColor);
18
16
  if ((c[0] === "r" || c[0] === "h") && c[3] === "a") {
19
17
  const [_, type, _1, _2, _3, a] = c.match(matchRgbaHsla) || [];
20
18
  if (typeof a !== "string") {
@@ -22,9 +20,9 @@ function fixNativeShadow(props) {
22
20
  throw new Error(`invalid style`);
23
21
  }
24
22
  props.shadowColor = `${type.replace("a", "")}(${_1},${_2},${_3})`;
25
- props.shadowOpacity = +a;
23
+ props.shadowOpacity = (_a = props.shadowOpacity) != null ? _a : +a;
26
24
  } else {
27
- props.shadowOpacity = 1;
25
+ props.shadowOpacity = (_b = props.shadowOpacity) != null ? _b : 1;
28
26
  }
29
27
  }
30
28
  __name(fixNativeShadow, "fixNativeShadow");
@@ -0,0 +1,23 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { getVariableValue, isVariable } from "@tamagui/core";
4
+ const getButtonSize = /* @__PURE__ */ __name((sizeX = 0.9, sizeY = 0.333) => (val, { tokens, props, fonts }) => {
5
+ var _a, _b, _c, _d, _e, _f, _g;
6
+ const size = (_c = (_b = (_a = tokens.size[val]) != null ? _a : tokens.size["$4"]) != null ? _b : val) != null ? _c : 14;
7
+ const radius = (_e = (_d = tokens.radius[val]) != null ? _d : tokens.radius["$4"]) != null ? _e : size;
8
+ const px = Math.round(+(isVariable(size) ? size.val : size) * sizeX);
9
+ const py = Math.round(+(isVariable(size) ? size.val : size) * sizeY);
10
+ const font = fonts[props.fontFamily] || fonts["$body"];
11
+ const lineHeights = font.lineHeight;
12
+ const lineHeight = (_f = lineHeights[val]) != null ? _f : lineHeights["$4"];
13
+ const minHeight = Math.round(getVariableValue(lineHeight) + py * 2);
14
+ return {
15
+ minHeight,
16
+ paddingHorizontal: props.circular ? 0 : px,
17
+ paddingVertical: props.circular ? 0 : py,
18
+ borderRadius: props.circular ? 1e5 : (_g = props.borderRadius) != null ? _g : radius
19
+ };
20
+ }, "getButtonSize");
21
+ export {
22
+ getButtonSize
23
+ };
File without changes
File without changes
@@ -288,13 +288,6 @@ const getSubStyle = /* @__PURE__ */ __name((styleIn, staticConfig, theme, props,
288
288
  return styleOut;
289
289
  }, "getSubStyle");
290
290
  function normalizeStyleObject(style) {
291
- var _a, _b;
292
- if (typeof style.flex === "number") {
293
- const val = style.flex;
294
- delete style.flex;
295
- style.flexGrow = (_a = style.flexGrow) != null ? _a : val;
296
- style.flexShrink = (_b = style.flexShrink) != null ? _b : 1;
297
- }
298
291
  if (!isWeb) {
299
292
  fixNativeShadow(style);
300
293
  }
File without changes
File without changes
@@ -0,0 +1,33 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { getVariableValue } from "../createVariable";
4
+ const getTextSize = /* @__PURE__ */ __name((val = "$4", { fonts, theme, props }) => {
5
+ var _a, _b, _c;
6
+ const family = getVariableValue(props.fontFamily) || "$body";
7
+ const font = fonts[family] || fonts["$body"];
8
+ if (!font) {
9
+ console.warn("\u26A0\uFE0F no font found", { family, fontTokens: Object.keys(fonts), val });
10
+ return;
11
+ }
12
+ const fontFamily = font.family;
13
+ const fontSize = props.fontSize || font.size[val];
14
+ const lineHeight = props.lineHeight || font.lineHeight[val];
15
+ const fontWeight = props.fontWeight || font.weight[val];
16
+ const letterSpacing = props.letterSpacing || font.letterSpacing[val];
17
+ const fontStyle = props.fontStyle || ((_a = font.style) == null ? void 0 : _a[val]);
18
+ const textTransform = props.textTransform || ((_b = font.transform) == null ? void 0 : _b[val]);
19
+ const color = props.color || ((_c = font.color) == null ? void 0 : _c[val]) || theme.color;
20
+ return {
21
+ color,
22
+ fontStyle,
23
+ textTransform,
24
+ fontFamily,
25
+ fontWeight,
26
+ letterSpacing,
27
+ fontSize,
28
+ lineHeight
29
+ };
30
+ }, "getTextSize");
31
+ export {
32
+ getTextSize
33
+ };
@@ -79,6 +79,7 @@ function insertStyleRule(identifier, rule) {
79
79
  return;
80
80
  hasInsertedSinceUpdate = true;
81
81
  updateInsertedCache(identifier, rule);
82
+ allSelectors[identifier] = process.env.NODE_ENV === "development" ? rule : true;
82
83
  sheet == null ? void 0 : sheet.insertRule(rule, sheet.cssRules.length);
83
84
  }
84
85
  __name(insertStyleRule, "insertStyleRule");
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,34 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import * as React from "react";
4
+ import { useIsomorphicLayoutEffect } from "../constants/platform";
5
+ let serverHandoffComplete = false;
6
+ let id = 0;
7
+ function genId() {
8
+ return ++id;
9
+ }
10
+ __name(genId, "genId");
11
+ function useId(providedId) {
12
+ var _a;
13
+ if (typeof React.useId === "function") {
14
+ let id3 = React.useId(providedId);
15
+ return providedId != null ? providedId : id3;
16
+ }
17
+ let initialId = providedId != null ? providedId : serverHandoffComplete ? genId() : null;
18
+ let [id2, setId] = React.useState(initialId);
19
+ useIsomorphicLayoutEffect(() => {
20
+ if (id2 === null) {
21
+ setId(genId());
22
+ }
23
+ }, []);
24
+ React.useEffect(() => {
25
+ if (serverHandoffComplete === false) {
26
+ serverHandoffComplete = true;
27
+ }
28
+ }, []);
29
+ return (_a = providedId != null ? providedId : id2) != null ? _a : void 0;
30
+ }
31
+ __name(useId, "useId");
32
+ export {
33
+ useId
34
+ };
File without changes
@@ -1,14 +1,14 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { useEffect, useState } from "react";
4
- import { isTouchDevice } from "../constants/platform";
3
+ import { useState } from "react";
4
+ import { isTouchDevice, useIsomorphicLayoutEffect } from "../constants/platform";
5
5
  const useIsTouchDevice = /* @__PURE__ */ __name(() => {
6
6
  const [touchOnly, setTouchOnly] = useState(false);
7
- if (isTouchDevice) {
8
- useEffect(() => {
7
+ useIsomorphicLayoutEffect(() => {
8
+ if (isTouchDevice) {
9
9
  setTouchOnly(true);
10
- }, []);
11
- }
10
+ }
11
+ }, []);
12
12
  return touchOnly;
13
13
  }, "useIsTouchDevice");
14
14
  export {
@@ -86,7 +86,6 @@ const useMedia = /* @__PURE__ */ __name(() => {
86
86
  }
87
87
  for (const key in st.nextSelections) {
88
88
  if (!(key in st.selections)) {
89
- console.log("lsiten", key);
90
89
  addMediaQueryListener(key, forceUpdate);
91
90
  }
92
91
  }
File without changes
File without changes
File without changes
File without changes
package/dist/jsx/index.js CHANGED
@@ -13,31 +13,34 @@ import { getHasConfigured, getConfig, getThemes, getTokens, onConfiguredOnce } f
13
13
  export * from "./constants/constants";
14
14
  export * from "./constants/platform";
15
15
  export * from "./constants/rnw";
16
+ export * from "./helpers/getButtonSize";
16
17
  export * from "./helpers/getExpandedShorthands";
17
18
  export * from "./helpers/getSize";
18
19
  export * from "./helpers/getSplitStyles";
19
20
  export * from "./helpers/getStylesAtomic";
21
+ export * from "./helpers/getTextSize";
20
22
  export * from "./helpers/isObj";
21
23
  export * from "./helpers/isTamaguiElement";
22
24
  export * from "./helpers/matchMedia";
23
25
  export * from "./helpers/themeable";
24
26
  export * from "./helpers/withStaticProperties";
25
27
  export * from "./contexts/ButtonInsideButtonContext";
26
- export * from "./hooks/useIsTouchDevice";
27
28
  export * from "./hooks/useConstant";
28
- export * from "./hooks/usePressable";
29
+ export * from "./hooks/useId";
30
+ export * from "./hooks/useIsMounted";
31
+ export * from "./hooks/useIsTouchDevice";
29
32
  export * from "./hooks/useMedia";
33
+ export * from "./hooks/usePressable";
30
34
  export * from "./hooks/useTheme";
31
- export * from "./hooks/useIsMounted";
32
35
  export * from "./hooks/useUnmountEffect";
33
- export * from "@tamagui/use-force-update";
34
36
  export * from "./views/Stack";
35
37
  export * from "./views/Text";
38
+ export * from "./views/TextAncestorContext";
36
39
  export * from "./views/Theme";
37
- export * from "./views/ThemeReset";
38
40
  export * from "./views/ThemeInverse";
39
41
  export * from "./views/ThemeProvider";
40
- export * from "./views/TextAncestorContext";
42
+ export * from "./views/ThemeReset";
43
+ export * from "@tamagui/use-force-update";
41
44
  export * from "@tamagui/helpers";
42
45
  export {
43
46
  RNWTextProps,
File without changes
@@ -5,14 +5,16 @@ import { createComponent } from "./createComponent";
5
5
  import { RNComponents } from "./helpers/RNComponents";
6
6
  function styled(Component, options, staticExtractionOptions) {
7
7
  const staticConfigProps = (() => {
8
+ var _a;
8
9
  if (options) {
9
10
  const { variants, name, defaultVariants, ...defaultProps } = options;
10
11
  if (defaultVariants) {
11
12
  Object.assign(defaultProps, defaultVariants);
12
13
  }
13
14
  const isReactNativeWeb = "staticConfig" in Component ? Component.staticConfig.isReactNativeWeb : RNComponents.has(Component);
15
+ const reactNativeWebComponent = isReactNativeWeb ? ((_a = Component["staticConfig"]) == null ? void 0 : _a.reactNativeWebComponent) || Component : null;
14
16
  const isTamagui = !isReactNativeWeb && "staticConfig" in Component;
15
- const Comp = Component;
17
+ const Comp = reactNativeWebComponent || Component;
16
18
  const isImage = !!(defaultProps.isImage || (!isTamagui ? Comp === Image : false));
17
19
  const isInput = !!(defaultProps.isInput || (!isTamagui ? Comp === TextInput : false));
18
20
  const isText = !!(defaultProps.isText || (!isTamagui ? isInput || Comp === Text : false));
@@ -27,6 +29,7 @@ function styled(Component, options, staticExtractionOptions) {
27
29
  defaultVariants,
28
30
  componentName: name,
29
31
  isReactNativeWeb,
32
+ reactNativeWebComponent,
30
33
  isInput,
31
34
  isText,
32
35
  isImage
File without changes
package/dist/jsx/types.js CHANGED
File without changes