@tamagui/core 1.0.1-beta.40 → 1.0.1-beta.43

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 (376) hide show
  1. package/dist/cjs/Tamagui.js +0 -0
  2. package/dist/cjs/Tamagui.js.map +0 -0
  3. package/dist/cjs/ThemeContext.js +0 -0
  4. package/dist/cjs/ThemeContext.js.map +0 -0
  5. package/dist/cjs/ThemeManager.js +0 -0
  6. package/dist/cjs/ThemeManager.js.map +0 -0
  7. package/dist/cjs/conf.js +0 -0
  8. package/dist/cjs/conf.js.map +0 -0
  9. package/dist/cjs/constants/constants.js +0 -0
  10. package/dist/cjs/constants/constants.js.map +0 -0
  11. package/dist/cjs/constants/platform.js +0 -0
  12. package/dist/cjs/constants/platform.js.map +0 -0
  13. package/dist/cjs/constants/rnw.js +0 -0
  14. package/dist/cjs/constants/rnw.js.map +0 -0
  15. package/dist/cjs/contexts/ButtonInsideButtonContext.js +0 -0
  16. package/dist/cjs/contexts/ButtonInsideButtonContext.js.map +0 -0
  17. package/dist/cjs/createComponent.js +71 -29
  18. package/dist/cjs/createComponent.js.map +2 -2
  19. package/dist/cjs/createFont.js +0 -0
  20. package/dist/cjs/createFont.js.map +0 -0
  21. package/dist/cjs/createShorthands.js +0 -0
  22. package/dist/cjs/createShorthands.js.map +0 -0
  23. package/dist/cjs/createTamagui.js +2 -0
  24. package/dist/cjs/createTamagui.js.map +2 -2
  25. package/dist/cjs/createTheme.js +0 -0
  26. package/dist/cjs/createTheme.js.map +0 -0
  27. package/dist/cjs/createTokens.js +1 -1
  28. package/dist/cjs/createTokens.js.map +2 -2
  29. package/dist/cjs/createVariable.js +2 -1
  30. package/dist/cjs/createVariable.js.map +2 -2
  31. package/dist/cjs/defaultComponentState.js +0 -0
  32. package/dist/cjs/defaultComponentState.js.map +0 -0
  33. package/dist/cjs/helpers/RNComponents.js +0 -0
  34. package/dist/cjs/helpers/RNComponents.js.map +0 -0
  35. package/dist/cjs/helpers/areEqualSets.js +0 -0
  36. package/dist/cjs/helpers/areEqualSets.js.map +0 -0
  37. package/dist/cjs/helpers/createMediaStyle.js +0 -0
  38. package/dist/cjs/helpers/createMediaStyle.js.map +0 -0
  39. package/dist/cjs/helpers/createPropMapper.js +0 -0
  40. package/dist/cjs/helpers/createPropMapper.js.map +0 -0
  41. package/dist/cjs/helpers/createShallowUpdate.js +0 -0
  42. package/dist/cjs/helpers/createShallowUpdate.js.map +0 -0
  43. package/dist/cjs/helpers/createTamaguiProvider.js +0 -0
  44. package/dist/cjs/helpers/createTamaguiProvider.js.map +0 -0
  45. package/dist/cjs/helpers/extendStaticConfig.js +0 -1
  46. package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
  47. package/dist/cjs/helpers/fixNativeShadow.js +0 -0
  48. package/dist/cjs/helpers/fixNativeShadow.js.map +0 -0
  49. package/dist/cjs/helpers/fixNativeShadow.native.js +0 -0
  50. package/dist/cjs/helpers/fixNativeShadow.native.js.map +0 -0
  51. package/dist/cjs/helpers/generateAtomicStyles.js +0 -0
  52. package/dist/cjs/helpers/generateAtomicStyles.js.map +0 -0
  53. package/dist/cjs/helpers/getExpandedShorthands.js +0 -0
  54. package/dist/cjs/helpers/getExpandedShorthands.js.map +0 -0
  55. package/dist/cjs/helpers/getSize.js +0 -0
  56. package/dist/cjs/helpers/getSize.js.map +2 -2
  57. package/dist/cjs/helpers/getSplitStyles.js +0 -0
  58. package/dist/cjs/helpers/getSplitStyles.js.map +0 -0
  59. package/dist/cjs/helpers/getStackSize.js +1 -1
  60. package/dist/cjs/helpers/getStackSize.js.map +2 -2
  61. package/dist/cjs/helpers/getStylesAtomic.js +0 -0
  62. package/dist/cjs/helpers/getStylesAtomic.js.map +0 -0
  63. package/dist/cjs/helpers/getStylesAtomic.native.js +0 -0
  64. package/dist/cjs/helpers/getStylesAtomic.native.js.map +0 -0
  65. package/dist/cjs/helpers/getTextSize.js +0 -0
  66. package/dist/cjs/helpers/getTextSize.js.map +0 -0
  67. package/dist/cjs/helpers/getVariantExtras.js +0 -0
  68. package/dist/cjs/helpers/getVariantExtras.js.map +0 -0
  69. package/dist/cjs/helpers/insertStyleRule.js +0 -0
  70. package/dist/cjs/helpers/insertStyleRule.js.map +0 -0
  71. package/dist/cjs/helpers/isObj.js +0 -0
  72. package/dist/cjs/helpers/isObj.js.map +0 -0
  73. package/dist/cjs/helpers/isTamaguiElement.js +0 -0
  74. package/dist/cjs/helpers/isTamaguiElement.js.map +0 -0
  75. package/dist/cjs/helpers/matchMedia.js +0 -0
  76. package/dist/cjs/helpers/matchMedia.js.map +0 -0
  77. package/dist/cjs/helpers/matchMedia.native.js +0 -0
  78. package/dist/cjs/helpers/matchMedia.native.js.map +0 -0
  79. package/dist/cjs/helpers/mergeTransform.js +0 -0
  80. package/dist/cjs/helpers/mergeTransform.js.map +0 -0
  81. package/dist/cjs/helpers/nativeGestureHandler.js +0 -0
  82. package/dist/cjs/helpers/nativeGestureHandler.js.map +0 -0
  83. package/dist/cjs/helpers/nativeGestureHandler.native.js +0 -0
  84. package/dist/cjs/helpers/nativeGestureHandler.native.js.map +0 -0
  85. package/dist/cjs/helpers/prefixStyles.js +0 -0
  86. package/dist/cjs/helpers/prefixStyles.js.map +0 -0
  87. package/dist/cjs/helpers/proxyThemeVariables.js +0 -0
  88. package/dist/cjs/helpers/proxyThemeVariables.js.map +0 -0
  89. package/dist/cjs/helpers/themeable.js +0 -0
  90. package/dist/cjs/helpers/themeable.js.map +0 -0
  91. package/dist/cjs/helpers/validate.js +0 -0
  92. package/dist/cjs/helpers/validate.js.map +0 -0
  93. package/dist/cjs/helpers/withStaticProperties.js +0 -0
  94. package/dist/cjs/helpers/withStaticProperties.js.map +0 -0
  95. package/dist/cjs/helpers/wrapThemeManagerContext.js +0 -0
  96. package/dist/cjs/helpers/wrapThemeManagerContext.js.map +0 -0
  97. package/dist/cjs/hooks/useConstant.js +0 -0
  98. package/dist/cjs/hooks/useConstant.js.map +0 -0
  99. package/dist/cjs/hooks/useFeatures.js +0 -0
  100. package/dist/cjs/hooks/useFeatures.js.map +0 -0
  101. package/dist/cjs/hooks/useId.js +0 -0
  102. package/dist/cjs/hooks/useId.js.map +0 -0
  103. package/dist/cjs/hooks/useIsMounted.js +0 -0
  104. package/dist/cjs/hooks/useIsMounted.js.map +0 -0
  105. package/dist/cjs/hooks/useIsTouchDevice.js +0 -0
  106. package/dist/cjs/hooks/useIsTouchDevice.js.map +0 -0
  107. package/dist/cjs/hooks/useMedia.js +0 -0
  108. package/dist/cjs/hooks/useMedia.js.map +0 -0
  109. package/dist/cjs/hooks/usePressable.js +0 -0
  110. package/dist/cjs/hooks/usePressable.js.map +0 -0
  111. package/dist/cjs/hooks/usePrevious.js +0 -0
  112. package/dist/cjs/hooks/usePrevious.js.map +0 -0
  113. package/dist/cjs/hooks/useTheme.js +0 -0
  114. package/dist/cjs/hooks/useTheme.js.map +0 -0
  115. package/dist/cjs/hooks/useUnmountEffect.js +0 -0
  116. package/dist/cjs/hooks/useUnmountEffect.js.map +0 -0
  117. package/dist/cjs/index.js +1 -0
  118. package/dist/cjs/index.js.map +2 -2
  119. package/dist/cjs/nativeGestureHandler.native.js +0 -0
  120. package/dist/cjs/nativeGestureHandler.native.js.map +0 -0
  121. package/dist/cjs/static.js +0 -0
  122. package/dist/cjs/static.js.map +0 -0
  123. package/dist/cjs/styled.js +0 -0
  124. package/dist/cjs/styled.js.map +2 -2
  125. package/dist/cjs/types-rnw.js +0 -0
  126. package/dist/cjs/types-rnw.js.map +0 -0
  127. package/dist/cjs/types.js +0 -0
  128. package/dist/cjs/types.js.map +1 -1
  129. package/dist/cjs/views/Slot.js +3 -9
  130. package/dist/cjs/views/Slot.js.map +2 -2
  131. package/dist/cjs/views/Stack.js +0 -0
  132. package/dist/cjs/views/Stack.js.map +0 -0
  133. package/dist/cjs/views/Text.js +0 -0
  134. package/dist/cjs/views/Text.js.map +0 -0
  135. package/dist/cjs/views/TextAncestorContext.js +0 -0
  136. package/dist/cjs/views/TextAncestorContext.js.map +0 -0
  137. package/dist/cjs/views/Theme.js +0 -0
  138. package/dist/cjs/views/Theme.js.map +0 -0
  139. package/dist/cjs/views/ThemeInverse.js +0 -0
  140. package/dist/cjs/views/ThemeInverse.js.map +0 -0
  141. package/dist/cjs/views/ThemeProvider.js +0 -0
  142. package/dist/cjs/views/ThemeProvider.js.map +0 -0
  143. package/dist/cjs/views/ThemeReset.js +0 -0
  144. package/dist/cjs/views/ThemeReset.js.map +0 -0
  145. package/dist/esm/Tamagui.js +0 -0
  146. package/dist/esm/Tamagui.js.map +0 -0
  147. package/dist/esm/ThemeContext.js +0 -0
  148. package/dist/esm/ThemeContext.js.map +0 -0
  149. package/dist/esm/ThemeManager.js +0 -0
  150. package/dist/esm/ThemeManager.js.map +0 -0
  151. package/dist/esm/conf.js +0 -0
  152. package/dist/esm/conf.js.map +0 -0
  153. package/dist/esm/constants/constants.js +0 -0
  154. package/dist/esm/constants/constants.js.map +0 -0
  155. package/dist/esm/constants/platform.js +0 -0
  156. package/dist/esm/constants/platform.js.map +0 -0
  157. package/dist/esm/constants/rnw.js +0 -0
  158. package/dist/esm/constants/rnw.js.map +0 -0
  159. package/dist/esm/contexts/ButtonInsideButtonContext.js +0 -0
  160. package/dist/esm/contexts/ButtonInsideButtonContext.js.map +0 -0
  161. package/dist/esm/createComponent.js +71 -30
  162. package/dist/esm/createComponent.js.map +2 -2
  163. package/dist/esm/createFont.js +0 -0
  164. package/dist/esm/createFont.js.map +0 -0
  165. package/dist/esm/createShorthands.js +0 -0
  166. package/dist/esm/createShorthands.js.map +0 -0
  167. package/dist/esm/createTamagui.js +2 -0
  168. package/dist/esm/createTamagui.js.map +2 -2
  169. package/dist/esm/createTheme.js +0 -0
  170. package/dist/esm/createTheme.js.map +0 -0
  171. package/dist/esm/createTokens.js +1 -1
  172. package/dist/esm/createTokens.js.map +2 -2
  173. package/dist/esm/createVariable.js +2 -1
  174. package/dist/esm/createVariable.js.map +2 -2
  175. package/dist/esm/defaultComponentState.js +0 -0
  176. package/dist/esm/defaultComponentState.js.map +0 -0
  177. package/dist/esm/helpers/RNComponents.js +0 -0
  178. package/dist/esm/helpers/RNComponents.js.map +0 -0
  179. package/dist/esm/helpers/areEqualSets.js +0 -0
  180. package/dist/esm/helpers/areEqualSets.js.map +0 -0
  181. package/dist/esm/helpers/createMediaStyle.js +0 -0
  182. package/dist/esm/helpers/createMediaStyle.js.map +0 -0
  183. package/dist/esm/helpers/createPropMapper.js +0 -0
  184. package/dist/esm/helpers/createPropMapper.js.map +0 -0
  185. package/dist/esm/helpers/createShallowUpdate.js +0 -0
  186. package/dist/esm/helpers/createShallowUpdate.js.map +0 -0
  187. package/dist/esm/helpers/createTamaguiProvider.js +0 -0
  188. package/dist/esm/helpers/createTamaguiProvider.js.map +0 -0
  189. package/dist/esm/helpers/extendStaticConfig.js +0 -4
  190. package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
  191. package/dist/esm/helpers/fixNativeShadow.js +0 -0
  192. package/dist/esm/helpers/fixNativeShadow.js.map +0 -0
  193. package/dist/esm/helpers/fixNativeShadow.native.js +0 -0
  194. package/dist/esm/helpers/fixNativeShadow.native.js.map +0 -0
  195. package/dist/esm/helpers/generateAtomicStyles.js +0 -0
  196. package/dist/esm/helpers/generateAtomicStyles.js.map +0 -0
  197. package/dist/esm/helpers/getExpandedShorthands.js +0 -0
  198. package/dist/esm/helpers/getExpandedShorthands.js.map +0 -0
  199. package/dist/esm/helpers/getSize.js +0 -0
  200. package/dist/esm/helpers/getSize.js.map +2 -2
  201. package/dist/esm/helpers/getSplitStyles.js +0 -0
  202. package/dist/esm/helpers/getSplitStyles.js.map +0 -0
  203. package/dist/esm/helpers/getStackSize.js +1 -1
  204. package/dist/esm/helpers/getStackSize.js.map +2 -2
  205. package/dist/esm/helpers/getStylesAtomic.js +0 -0
  206. package/dist/esm/helpers/getStylesAtomic.js.map +0 -0
  207. package/dist/esm/helpers/getStylesAtomic.native.js +0 -0
  208. package/dist/esm/helpers/getStylesAtomic.native.js.map +0 -0
  209. package/dist/esm/helpers/getTextSize.js +0 -0
  210. package/dist/esm/helpers/getTextSize.js.map +0 -0
  211. package/dist/esm/helpers/getVariantExtras.js +0 -0
  212. package/dist/esm/helpers/getVariantExtras.js.map +0 -0
  213. package/dist/esm/helpers/insertStyleRule.js +0 -0
  214. package/dist/esm/helpers/insertStyleRule.js.map +0 -0
  215. package/dist/esm/helpers/isObj.js +0 -0
  216. package/dist/esm/helpers/isObj.js.map +0 -0
  217. package/dist/esm/helpers/isTamaguiElement.js +0 -0
  218. package/dist/esm/helpers/isTamaguiElement.js.map +0 -0
  219. package/dist/esm/helpers/matchMedia.js +0 -0
  220. package/dist/esm/helpers/matchMedia.js.map +0 -0
  221. package/dist/esm/helpers/matchMedia.native.js +0 -0
  222. package/dist/esm/helpers/matchMedia.native.js.map +0 -0
  223. package/dist/esm/helpers/mergeTransform.js +0 -0
  224. package/dist/esm/helpers/mergeTransform.js.map +0 -0
  225. package/dist/esm/helpers/nativeGestureHandler.js +0 -0
  226. package/dist/esm/helpers/nativeGestureHandler.js.map +0 -0
  227. package/dist/esm/helpers/nativeGestureHandler.native.js +0 -0
  228. package/dist/esm/helpers/nativeGestureHandler.native.js.map +0 -0
  229. package/dist/esm/helpers/prefixStyles.js +0 -0
  230. package/dist/esm/helpers/prefixStyles.js.map +0 -0
  231. package/dist/esm/helpers/proxyThemeVariables.js +0 -0
  232. package/dist/esm/helpers/proxyThemeVariables.js.map +0 -0
  233. package/dist/esm/helpers/themeable.js +0 -0
  234. package/dist/esm/helpers/themeable.js.map +0 -0
  235. package/dist/esm/helpers/validate.js +0 -0
  236. package/dist/esm/helpers/validate.js.map +0 -0
  237. package/dist/esm/helpers/withStaticProperties.js +0 -0
  238. package/dist/esm/helpers/withStaticProperties.js.map +0 -0
  239. package/dist/esm/helpers/wrapThemeManagerContext.js +0 -0
  240. package/dist/esm/helpers/wrapThemeManagerContext.js.map +0 -0
  241. package/dist/esm/hooks/useConstant.js +0 -0
  242. package/dist/esm/hooks/useConstant.js.map +0 -0
  243. package/dist/esm/hooks/useFeatures.js +0 -0
  244. package/dist/esm/hooks/useFeatures.js.map +0 -0
  245. package/dist/esm/hooks/useId.js +0 -0
  246. package/dist/esm/hooks/useId.js.map +0 -0
  247. package/dist/esm/hooks/useIsMounted.js +0 -0
  248. package/dist/esm/hooks/useIsMounted.js.map +0 -0
  249. package/dist/esm/hooks/useIsTouchDevice.js +0 -0
  250. package/dist/esm/hooks/useIsTouchDevice.js.map +0 -0
  251. package/dist/esm/hooks/useMedia.js +0 -0
  252. package/dist/esm/hooks/useMedia.js.map +0 -0
  253. package/dist/esm/hooks/usePressable.js +0 -0
  254. package/dist/esm/hooks/usePressable.js.map +0 -0
  255. package/dist/esm/hooks/usePrevious.js +0 -0
  256. package/dist/esm/hooks/usePrevious.js.map +0 -0
  257. package/dist/esm/hooks/useTheme.js +0 -0
  258. package/dist/esm/hooks/useTheme.js.map +0 -0
  259. package/dist/esm/hooks/useUnmountEffect.js +0 -0
  260. package/dist/esm/hooks/useUnmountEffect.js.map +0 -0
  261. package/dist/esm/index.js +1 -0
  262. package/dist/esm/index.js.map +2 -2
  263. package/dist/esm/nativeGestureHandler.native.js +0 -0
  264. package/dist/esm/nativeGestureHandler.native.js.map +0 -0
  265. package/dist/esm/static.js +0 -0
  266. package/dist/esm/static.js.map +0 -0
  267. package/dist/esm/styled.js +0 -0
  268. package/dist/esm/styled.js.map +2 -2
  269. package/dist/esm/types-rnw.js +0 -0
  270. package/dist/esm/types-rnw.js.map +0 -0
  271. package/dist/esm/types.js +0 -0
  272. package/dist/esm/types.js.map +0 -0
  273. package/dist/esm/views/Slot.js +3 -10
  274. package/dist/esm/views/Slot.js.map +2 -2
  275. package/dist/esm/views/Stack.js +0 -0
  276. package/dist/esm/views/Stack.js.map +0 -0
  277. package/dist/esm/views/Text.js +0 -0
  278. package/dist/esm/views/Text.js.map +0 -0
  279. package/dist/esm/views/TextAncestorContext.js +0 -0
  280. package/dist/esm/views/TextAncestorContext.js.map +0 -0
  281. package/dist/esm/views/Theme.js +0 -0
  282. package/dist/esm/views/Theme.js.map +0 -0
  283. package/dist/esm/views/ThemeInverse.js +0 -0
  284. package/dist/esm/views/ThemeInverse.js.map +0 -0
  285. package/dist/esm/views/ThemeProvider.js +0 -0
  286. package/dist/esm/views/ThemeProvider.js.map +0 -0
  287. package/dist/esm/views/ThemeReset.js +0 -0
  288. package/dist/esm/views/ThemeReset.js.map +0 -0
  289. package/dist/jsx/Tamagui.js +0 -0
  290. package/dist/jsx/ThemeContext.js +0 -0
  291. package/dist/jsx/ThemeManager.js +0 -0
  292. package/dist/jsx/conf.js +0 -0
  293. package/dist/jsx/constants/constants.js +0 -0
  294. package/dist/jsx/constants/platform.js +0 -0
  295. package/dist/jsx/constants/rnw.js +0 -0
  296. package/dist/jsx/contexts/ButtonInsideButtonContext.js +0 -0
  297. package/dist/jsx/createComponent.js +67 -26
  298. package/dist/jsx/createFont.js +0 -0
  299. package/dist/jsx/createShorthands.js +0 -0
  300. package/dist/jsx/createTamagui.js +2 -0
  301. package/dist/jsx/createTheme.js +0 -0
  302. package/dist/jsx/createTokens.js +1 -1
  303. package/dist/jsx/createVariable.js +2 -1
  304. package/dist/jsx/defaultComponentState.js +0 -0
  305. package/dist/jsx/helpers/RNComponents.js +0 -0
  306. package/dist/jsx/helpers/areEqualSets.js +0 -0
  307. package/dist/jsx/helpers/createMediaStyle.js +0 -0
  308. package/dist/jsx/helpers/createPropMapper.js +0 -0
  309. package/dist/jsx/helpers/createShallowUpdate.js +0 -0
  310. package/dist/jsx/helpers/createTamaguiProvider.js +0 -0
  311. package/dist/jsx/helpers/extendStaticConfig.js +0 -4
  312. package/dist/jsx/helpers/fixNativeShadow.js +0 -0
  313. package/dist/jsx/helpers/fixNativeShadow.native.js +0 -0
  314. package/dist/jsx/helpers/generateAtomicStyles.js +0 -0
  315. package/dist/jsx/helpers/getExpandedShorthands.js +0 -0
  316. package/dist/jsx/helpers/getSize.js +0 -0
  317. package/dist/jsx/helpers/getSplitStyles.js +0 -0
  318. package/dist/jsx/helpers/getStackSize.js +1 -1
  319. package/dist/jsx/helpers/getStylesAtomic.js +0 -0
  320. package/dist/jsx/helpers/getStylesAtomic.native.js +0 -0
  321. package/dist/jsx/helpers/getTextSize.js +0 -0
  322. package/dist/jsx/helpers/getVariantExtras.js +0 -0
  323. package/dist/jsx/helpers/insertStyleRule.js +0 -0
  324. package/dist/jsx/helpers/isObj.js +0 -0
  325. package/dist/jsx/helpers/isTamaguiElement.js +0 -0
  326. package/dist/jsx/helpers/matchMedia.js +0 -0
  327. package/dist/jsx/helpers/matchMedia.native.js +0 -0
  328. package/dist/jsx/helpers/mergeTransform.js +0 -0
  329. package/dist/jsx/helpers/nativeGestureHandler.js +0 -0
  330. package/dist/jsx/helpers/nativeGestureHandler.native.js +0 -0
  331. package/dist/jsx/helpers/prefixStyles.js +0 -0
  332. package/dist/jsx/helpers/proxyThemeVariables.js +0 -0
  333. package/dist/jsx/helpers/themeable.js +0 -0
  334. package/dist/jsx/helpers/validate.js +0 -0
  335. package/dist/jsx/helpers/withStaticProperties.js +0 -0
  336. package/dist/jsx/helpers/wrapThemeManagerContext.js +0 -0
  337. package/dist/jsx/hooks/useConstant.js +0 -0
  338. package/dist/jsx/hooks/useFeatures.js +0 -0
  339. package/dist/jsx/hooks/useId.js +0 -0
  340. package/dist/jsx/hooks/useIsMounted.js +0 -0
  341. package/dist/jsx/hooks/useIsTouchDevice.js +0 -0
  342. package/dist/jsx/hooks/useMedia.js +0 -0
  343. package/dist/jsx/hooks/usePressable.js +0 -0
  344. package/dist/jsx/hooks/usePrevious.js +0 -0
  345. package/dist/jsx/hooks/useTheme.js +0 -0
  346. package/dist/jsx/hooks/useUnmountEffect.js +0 -0
  347. package/dist/jsx/index.js +1 -0
  348. package/dist/jsx/nativeGestureHandler.native.js +0 -0
  349. package/dist/jsx/static.js +0 -0
  350. package/dist/jsx/styled.js +0 -0
  351. package/dist/jsx/types-rnw.js +0 -0
  352. package/dist/jsx/types.js +0 -0
  353. package/dist/jsx/views/Slot.js +3 -7
  354. package/dist/jsx/views/Stack.js +0 -0
  355. package/dist/jsx/views/Text.js +0 -0
  356. package/dist/jsx/views/TextAncestorContext.js +0 -0
  357. package/dist/jsx/views/Theme.js +0 -0
  358. package/dist/jsx/views/ThemeInverse.js +0 -0
  359. package/dist/jsx/views/ThemeProvider.js +0 -0
  360. package/dist/jsx/views/ThemeReset.js +0 -0
  361. package/package.json +6 -6
  362. package/types/createComponent.d.ts +23 -13
  363. package/types/createComponent.d.ts.map +1 -1
  364. package/types/createVariable.d.ts +3 -1
  365. package/types/createVariable.d.ts.map +1 -1
  366. package/types/helpers/extendStaticConfig.d.ts.map +1 -1
  367. package/types/helpers/getSize.d.ts +1 -1
  368. package/types/helpers/getSize.d.ts.map +1 -1
  369. package/types/helpers/getStackSize.d.ts.map +1 -1
  370. package/types/index.d.ts +1 -0
  371. package/types/index.d.ts.map +1 -1
  372. package/types/styled.d.ts +2 -2
  373. package/types/styled.d.ts.map +1 -1
  374. package/types/types.d.ts +10 -8
  375. package/types/types.d.ts.map +1 -1
  376. package/types/views/Slot.d.ts.map +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/getStackSize.ts"],
4
- "sourcesContent": ["import { VariantSpreadExtras, getVariableValue, isVariable } from '@tamagui/core'\n\nimport { SizeTokens } from '../types'\n\n// for use in sizable things\n\ntype ScaleProps = { sizeX: number; sizeY: number }\n\nexport type ScaleVariantExtras = Pick<VariantSpreadExtras<any>, 'tokens' | 'props' | 'fonts'>\n\nexport const getSizeScaledToFont = (\n val: string | number,\n { sizeX = 1, sizeY = 1 }: ScaleProps,\n { tokens, props, fonts }: ScaleVariantExtras\n) => {\n const size = tokens.size[val] ?? val ?? tokens.size['$4'] ?? 14\n const radius = tokens.radius[val] ?? tokens.radius['$4'] ?? size\n const sizePx = +(isVariable(size) ? size.val : size)\n const scaleSize = isVariable(size) ? 2 : 1\n const px = Math.round(sizePx * sizeX)\n const py = Math.round(sizePx * sizeY)\n // keep buttons height aligned to the font used\n const font = fonts[props.fontFamily] || fonts['$body']\n const lineHeights = font.lineHeight\n const lineHeight = lineHeights[val] ?? lineHeights['$4']\n const minHeight = Math.round(getVariableValue(lineHeight) + py * scaleSize)\n return {\n px,\n py,\n radius,\n size,\n lineHeight,\n minHeight,\n }\n}\n\nexport const createGetStackSize =\n (scale: ScaleProps) => (val: SizeTokens | number, extras: VariantSpreadExtras<any>) => {\n const { props } = extras\n const { radius, minHeight, px, py } = getSizeScaledToFont(val, scale, extras)\n return {\n minHeight,\n borderRadius: props.circular ? 100_000 : props.borderRadius ?? radius,\n paddingHorizontal: props.circular ? 0 : px,\n paddingVertical: props.circular ? 0 : py,\n }\n }\n\nexport const buttonScaling = { sizeX: 0.9, sizeY: 0.333 }\nexport const getButtonSize = createGetStackSize(buttonScaling)\n"],
5
- "mappings": ";;AAAA;AAUO,MAAM,sBAAsB,wBACjC,KACA,EAAE,QAAQ,GAAG,QAAQ,KACrB,EAAE,QAAQ,OAAO,YACd;AAdL;AAeE,QAAM,OAAO,yBAAO,KAAK,SAAZ,YAAoB,QAApB,YAA2B,OAAO,KAAK,UAAvC,YAAgD;AAC7D,QAAM,SAAS,mBAAO,OAAO,SAAd,YAAsB,OAAO,OAAO,UAApC,YAA6C;AAC5D,QAAM,SAAS,CAAE,YAAW,IAAI,IAAI,KAAK,MAAM;AAC/C,QAAM,YAAY,WAAW,IAAI,IAAI,IAAI;AACzC,QAAM,KAAK,KAAK,MAAM,SAAS,KAAK;AACpC,QAAM,KAAK,KAAK,MAAM,SAAS,KAAK;AAEpC,QAAM,OAAO,MAAM,MAAM,eAAe,MAAM;AAC9C,QAAM,cAAc,KAAK;AACzB,QAAM,aAAa,kBAAY,SAAZ,YAAoB,YAAY;AACnD,QAAM,YAAY,KAAK,MAAM,iBAAiB,UAAU,IAAI,KAAK,SAAS;AAC1E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF,GAxBmC;AA0B5B,MAAM,qBACX,wBAAC,UAAsB,CAAC,KAA0B,WAAqC;AArCzF;AAsCI,QAAM,EAAE,UAAU;AAClB,QAAM,EAAE,QAAQ,WAAW,IAAI,OAAO,oBAAoB,KAAK,OAAO,MAAM;AAC5E,SAAO;AAAA,IACL;AAAA,IACA,cAAc,MAAM,WAAW,MAAU,YAAM,iBAAN,YAAsB;AAAA,IAC/D,mBAAmB,MAAM,WAAW,IAAI;AAAA,IACxC,iBAAiB,MAAM,WAAW,IAAI;AAAA,EACxC;AACF,GATA;AAWK,MAAM,gBAAgB,EAAE,OAAO,KAAK,OAAO,MAAM;AACjD,MAAM,gBAAgB,mBAAmB,aAAa;",
4
+ "sourcesContent": ["import { VariantSpreadExtras, getVariableValue, isVariable } from '@tamagui/core'\n\nimport { SizeTokens } from '../types'\n\n// for use in sizable things\n\ntype ScaleProps = { sizeX: number; sizeY: number }\n\nexport type ScaleVariantExtras = Pick<VariantSpreadExtras<any>, 'tokens' | 'props' | 'fonts'>\n\nexport const getSizeScaledToFont = (\n val: string | number,\n { sizeX = 1, sizeY = 1 }: ScaleProps,\n { tokens, props, fonts }: ScaleVariantExtras\n) => {\n const size = tokens.size[val] ?? val ?? tokens.size['$4'] ?? 14\n const radius = tokens.radius[val] ?? tokens.radius['$4'] ?? size\n const sizePx = +(isVariable(size) ? size.val : size)\n const scaleSize = isVariable(size) ? 2 : 1\n const px = Math.round(sizePx * sizeX)\n const py = Math.round(sizePx * sizeY)\n // keep buttons height aligned to the font used\n const font = fonts[props.fontFamily] || fonts['$body']\n const lineHeights = font.lineHeight\n const lineHeight = lineHeights[val] ?? lineHeights['$4']\n const minHeight = Math.round(getVariableValue(lineHeight) + py * scaleSize)\n return {\n px,\n py,\n radius,\n size,\n lineHeight,\n minHeight,\n }\n}\n\nexport const createGetStackSize =\n (scale: ScaleProps) => (val: SizeTokens | number, extras: VariantSpreadExtras<any>) => {\n const { props } = extras\n const { radius, minHeight, px, py } = getSizeScaledToFont(val, scale, extras)\n return {\n minHeight,\n borderRadius: props.circular ? 100_000 : props.borderRadius ?? radius,\n paddingHorizontal: props.circular ? 0 : px,\n paddingVertical: props.circular ? 0 : py,\n }\n }\n\nexport const buttonScaling = { sizeX: 0.75, sizeY: 0.333 }\nexport const getButtonSize = createGetStackSize(buttonScaling)\n"],
5
+ "mappings": ";;AAAA;AAUO,MAAM,sBAAsB,wBACjC,KACA,EAAE,QAAQ,GAAG,QAAQ,KACrB,EAAE,QAAQ,OAAO,YACd;AAdL;AAeE,QAAM,OAAO,yBAAO,KAAK,SAAZ,YAAoB,QAApB,YAA2B,OAAO,KAAK,UAAvC,YAAgD;AAC7D,QAAM,SAAS,mBAAO,OAAO,SAAd,YAAsB,OAAO,OAAO,UAApC,YAA6C;AAC5D,QAAM,SAAS,CAAE,YAAW,IAAI,IAAI,KAAK,MAAM;AAC/C,QAAM,YAAY,WAAW,IAAI,IAAI,IAAI;AACzC,QAAM,KAAK,KAAK,MAAM,SAAS,KAAK;AACpC,QAAM,KAAK,KAAK,MAAM,SAAS,KAAK;AAEpC,QAAM,OAAO,MAAM,MAAM,eAAe,MAAM;AAC9C,QAAM,cAAc,KAAK;AACzB,QAAM,aAAa,kBAAY,SAAZ,YAAoB,YAAY;AACnD,QAAM,YAAY,KAAK,MAAM,iBAAiB,UAAU,IAAI,KAAK,SAAS;AAC1E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF,GAxBmC;AA0B5B,MAAM,qBACX,wBAAC,UAAsB,CAAC,KAA0B,WAAqC;AArCzF;AAsCI,QAAM,EAAE,UAAU;AAClB,QAAM,EAAE,QAAQ,WAAW,IAAI,OAAO,oBAAoB,KAAK,OAAO,MAAM;AAC5E,SAAO;AAAA,IACL;AAAA,IACA,cAAc,MAAM,WAAW,MAAU,YAAM,iBAAN,YAAsB;AAAA,IAC/D,mBAAmB,MAAM,WAAW,IAAI;AAAA,IACxC,iBAAiB,MAAM,WAAW,IAAI;AAAA,EACxC;AACF,GATA;AAWK,MAAM,gBAAgB,EAAE,OAAO,MAAM,OAAO,MAAM;AAClD,MAAM,gBAAgB,mBAAmB,aAAa;",
6
6
  "names": []
7
7
  }
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
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
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
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
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
package/dist/esm/index.js CHANGED
@@ -35,6 +35,7 @@ export * from "./hooks/useMedia";
35
35
  export * from "./hooks/usePressable";
36
36
  export * from "./hooks/useTheme";
37
37
  export * from "./hooks/useUnmountEffect";
38
+ export * from "./views/Slot";
38
39
  export * from "./views/Stack";
39
40
  export * from "./views/Text";
40
41
  export * from "./views/TextAncestorContext";
@@ -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/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/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;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 { 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/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/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/Slot'\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;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
  }
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/styled.tsx"],
4
- "sourcesContent": ["import { Image, Text, TextInput } from 'react-native'\n\nimport { createComponent } from './createComponent'\nimport { RNComponents } from './helpers/RNComponents'\nimport {\n GetProps,\n GetVariantValues,\n MediaProps,\n PseudoProps,\n StaticConfig,\n StylableComponent,\n TamaguiComponent,\n VariantDefinitions,\n VariantSpreadFunction,\n} from './types'\n\n// TODO may be able to use this in the options?: arg below directly\nexport type StyledOptions<ParentComponent extends StylableComponent> = GetProps<ParentComponent> & {\n name?: string\n variants?: VariantDefinitions<ParentComponent> | undefined\n defaultVariants?: { [key: string]: any }\n}\n\nexport function styled<\n ParentComponent extends StylableComponent,\n Variants extends VariantDefinitions<ParentComponent> | symbol =\n | VariantDefinitions<ParentComponent>\n | symbol\n>(\n Component: ParentComponent,\n // this should be Partial<GetProps<ParentComponent>> but causes excessively deep type issues\n options?: GetProps<ParentComponent> & {\n name?: string\n variants?: Variants | undefined\n // thought i had this typed, but can't get it linked\n defaultVariants?: { [key: string]: any }\n },\n staticExtractionOptions?: Partial<StaticConfig>\n) {\n const staticConfigProps = (() => {\n if (options) {\n const { variants, name, defaultVariants, ...defaultProps } = options\n if (defaultVariants) {\n Object.assign(defaultProps, defaultVariants)\n }\n const isReactNativeWeb =\n 'staticConfig' in Component\n ? Component.staticConfig.isReactNativeWeb\n : RNComponents.has(Component)\n const reactNativeWebComponent = isReactNativeWeb\n ? Component['staticConfig']?.reactNativeWebComponent || Component\n : null\n const isTamagui = !isReactNativeWeb && 'staticConfig' in Component\n const Comp = reactNativeWebComponent || (Component as any)\n const isImage = !!(defaultProps.isImage || (!isTamagui ? Comp === Image : false))\n const isInput = !!(defaultProps.isInput || (!isTamagui ? Comp === TextInput : false))\n const isText = !!(defaultProps.isText || (!isTamagui ? isInput || Comp === Text : false))\n\n const conf: Partial<StaticConfig> = {\n ...staticExtractionOptions,\n ...(!isTamagui && {\n Component: Comp,\n }),\n isTamagui,\n // this type gets messed up by options?: Partial<GetProps<ParentComponent>> above\n // take away the Partial<> and it's fine\n variants,\n defaultProps,\n defaultVariants,\n componentName: name,\n isReactNativeWeb,\n // for nesting multiple levels of rnw styled() need keep use the OG component\n reactNativeWebComponent,\n isInput,\n isText,\n isImage,\n }\n\n return conf\n }\n return {}\n })()\n\n const component = createComponent(staticConfigProps, Component)\n\n // get parent props without pseudos and medias so we can rebuild both with new variants\n type ParentPropsBase = ParentComponent extends TamaguiComponent<any, any, infer P>\n ? P\n : GetProps<ParentComponent>\n type ParentVariants = ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : {}\n\n type OurVariants = Variants extends symbol\n ? {}\n : {\n [Key in keyof Variants]?: Variants[Key] extends VariantSpreadFunction<any, infer Val>\n ? Val\n : GetVariantValues<keyof Variants[Key]>\n }\n\n type VariantProps = Omit<ParentVariants, keyof OurVariants> & OurVariants\n type OurPropsBase = ParentPropsBase & VariantProps\n\n type Props = Variants extends void | symbol\n ? GetProps<ParentComponent>\n : // start with base props\n OurPropsBase &\n // add in media (+ pseudos nested)\n MediaProps<Partial<OurPropsBase>> &\n // add in pseudos\n PseudoProps<Partial<OurPropsBase>>\n\n return component as TamaguiComponent<\n Props,\n // TODO infer ref\n any,\n ParentPropsBase,\n ParentVariants & OurVariants\n >\n}\n\n// test types:\n// // variants\n// export const XStack = styled(Stack, {\n// flexDirection: 'row',\n// name: 'XStack',\n// variants: {\n// fullscreen: {\n// true: {},\n// },\n// elevation: {\n// '...size': (val) => ({}),\n// },\n// },\n// })\n// const InBetween = styled(XStack, {})\n// type INBVariants = typeof InBetween extends TamaguiComponent<any, any, any, infer Variants> ? Variants: never\n// const SwitchFrame = styled(InBetween, {\n// name: 'Switch',\n// tag: 'button',\n// borderRadius: 100,\n// borderWidth: 0,\n// variants: {\n// name: {\n// true: {\n// backgroundColor: 'aliceblue'\n// },\n// // 1: {\n\n// // },\n// // ':number': (val) => {\n// // return {}\n// // },\n// // \"...fontSize\": (val) => {\n// // return {}\n// // },\n// // \"...color\": (val) => {\n// // return {}\n// // }\n// }\n// },\n// defaultVariants: {\n// size: '$4',\n// },\n// })\n// const x = <XStack fullscreen />\n// const y = <XStack fullscreen />\n// const z = <SwitchFrame fullscreen name />\n\n// depth:\n// export const SizableText = styled(Stack, {\n// name: 'SizableText',\n// backgroundColor: 'red',\n// variants: {\n// size: {\n// '...fontSize': (val, { props }) => {\n// return {\n// backgroundColor: '',\n// }\n// },\n// },\n// },\n// })\n// export const Heading = styled(SizableText, {\n// tag: 'span',\n// name: 'Heading',\n// accessibilityRole: 'header',\n// size: '$8',\n// margin: 0,\n// })\n// export const Paragraph = styled(SizableText, {\n// tag: 'p',\n// margin: 10,\n// variants: {\n// another: {\n// true: {},\n// },\n// },\n// })\n// export const Paragraph2 = styled(Paragraph, {\n// tag: 'p',\n// variants: {\n// another: {\n// '...color': (val) => ({\n// backgroundColor: 'red',\n// }),\n// },\n// },\n// })\n// const a = <SizableText size=\"$10\" />\n// const b = <Paragraph size=\"$10\" another />\n// const c = <Paragraph2 size=\"$10\" another=\"aliceblue\" />\n// export const SizableText2 = styled(SizableText, {\n// })\n// const xx = <SizableText2 abc />\n// export const Paragraph = styled(SizableText, {\n// name: 'Paragraph',\n// })\n// export const Heading = styled(Paragraph, {\n// tag: 'span',\n// margin: 0,\n// })\n// export const H2 = styled(Heading, {\n// name: 'H2',\n// })\n// const x = <H2 color=\"red\" />\n"],
5
- "mappings": ";;AAAA;AAEA;AACA;AAoBO,gBAML,WAEA,SAMA,yBACA;AACA,QAAM,oBAAqB,OAAM;AAvCnC;AAwCI,QAAI,SAAS;AACX,YAAM,EAAE,UAAU,MAAM,oBAAoB,iBAAiB;AAC7D,UAAI,iBAAiB;AACnB,eAAO,OAAO,cAAc,eAAe;AAAA,MAC7C;AACA,YAAM,mBACJ,kBAAkB,YACd,UAAU,aAAa,mBACvB,aAAa,IAAI,SAAS;AAChC,YAAM,0BAA0B,mBAC5B,iBAAU,oBAAV,mBAA2B,4BAA2B,YACtD;AACJ,YAAM,YAAY,CAAC,oBAAoB,kBAAkB;AACzD,YAAM,OAAO,2BAA4B;AACzC,YAAM,UAAU,CAAC,CAAE,cAAa,WAAY,EAAC,YAAY,SAAS,QAAQ;AAC1E,YAAM,UAAU,CAAC,CAAE,cAAa,WAAY,EAAC,YAAY,SAAS,YAAY;AAC9E,YAAM,SAAS,CAAC,CAAE,cAAa,UAAW,EAAC,YAAY,WAAW,SAAS,OAAO;AAElF,YAAM,OAA8B;AAAA,WAC/B;AAAA,WACC,CAAC,aAAa;AAAA,UAChB,WAAW;AAAA,QACb;AAAA,QACA;AAAA,QAGA;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QAEA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AACA,WAAO,CAAC;AAAA,EACV,GAAG;AAEH,QAAM,YAAY,gBAAgB,mBAAmB,SAAS;AA4B9D,SAAO;AAOT;AA/FgB;",
4
+ "sourcesContent": ["import { Image, Text, TextInput } from 'react-native'\n\nimport { createComponent } from './createComponent'\nimport { RNComponents } from './helpers/RNComponents'\nimport {\n GetProps,\n GetVariantValues,\n MediaProps,\n PseudoProps,\n StaticConfig,\n StylableComponent,\n TamaguiComponent,\n VariantDefinitions,\n VariantSpreadFunction,\n} from './types'\nimport { Stack } from './views/Stack'\n\n// TODO may be able to use this in the options?: arg below directly\nexport type StyledOptions<ParentComponent extends StylableComponent> = GetProps<ParentComponent> & {\n name?: string\n variants?: VariantDefinitions<ParentComponent> | undefined\n defaultVariants?: { [key: string]: any }\n}\n\nexport function styled<\n ParentComponent extends StylableComponent,\n Variants extends VariantDefinitions<ParentComponent> | void = VariantDefinitions<ParentComponent> | void\n>(\n Component: ParentComponent,\n // this should be Partial<GetProps<ParentComponent>> but causes excessively deep type issues\n options?: GetProps<ParentComponent> & {\n name?: string\n variants?: Variants | undefined\n // thought i had this typed, but can't get it linked\n defaultVariants?: { [key: string]: any }\n },\n staticExtractionOptions?: Partial<StaticConfig>\n) {\n const staticConfigProps = (() => {\n if (options) {\n const { variants, name, defaultVariants, ...defaultProps } = options\n if (defaultVariants) {\n Object.assign(defaultProps, defaultVariants)\n }\n const isReactNativeWeb =\n 'staticConfig' in Component\n ? Component.staticConfig.isReactNativeWeb\n : RNComponents.has(Component)\n const reactNativeWebComponent = isReactNativeWeb\n ? Component['staticConfig']?.reactNativeWebComponent || Component\n : null\n const isTamagui = !isReactNativeWeb && 'staticConfig' in Component\n const Comp = reactNativeWebComponent || (Component as any)\n const isImage = !!(defaultProps.isImage || (!isTamagui ? Comp === Image : false))\n const isInput = !!(defaultProps.isInput || (!isTamagui ? Comp === TextInput : false))\n const isText = !!(defaultProps.isText || (!isTamagui ? isInput || Comp === Text : false))\n\n const conf: Partial<StaticConfig> = {\n ...staticExtractionOptions,\n ...(!isTamagui && {\n Component: Comp,\n }),\n isTamagui,\n // this type gets messed up by options?: Partial<GetProps<ParentComponent>> above\n // take away the Partial<> and it's fine\n variants,\n defaultProps,\n defaultVariants,\n componentName: name,\n isReactNativeWeb,\n // for nesting multiple levels of rnw styled() need keep use the OG component\n reactNativeWebComponent,\n isInput,\n isText,\n isImage,\n }\n\n return conf\n }\n return {}\n })()\n\n const component = createComponent(staticConfigProps, Component)\n\n // get parent props without pseudos and medias so we can rebuild both with new variants\n type ParentPropsBase = ParentComponent extends TamaguiComponent<any, any, infer P>\n ? P\n : GetProps<ParentComponent>\n type ParentVariants = ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : {}\n\n type OurVariants = Variants extends void\n ? {}\n : {\n [Key in keyof Variants]?: Variants[Key] extends VariantSpreadFunction<any, infer Val>\n ? Val\n : GetVariantValues<keyof Variants[Key]>\n }\n\n type VariantProps = Omit<ParentVariants, keyof OurVariants> & OurVariants\n type OurPropsBase = ParentPropsBase & VariantProps\n\n type Props = Variants extends void\n ? GetProps<ParentComponent>\n : // start with base props\n OurPropsBase &\n // add in media (+ pseudos nested)\n MediaProps<Partial<OurPropsBase>> &\n // add in pseudos\n PseudoProps<Partial<OurPropsBase>>\n\n return component as TamaguiComponent<\n Props,\n // TODO infer ref\n any,\n ParentPropsBase,\n ParentVariants & OurVariants\n >\n}\n\n// breaking...\n// TODO see core/types.ts bug\n\n// export const XStack = styled(Stack, {\n// variants: {\n// horizontal: {\n// true: {\n// // flexDirection: 'row',\n// width: 0,\n// },\n// },\n// },\n// })\n\n// const Separator = styled(Stack, {\n// variants: {\n// vertical: {\n// true: {\n// flexDirection: 'row',\n// },\n// },\n// },\n// <--- have to add as const to get working???\n// })\n\n// type props = GetProps<typeof XStack>\n// type variants = typeof XStack extends TamaguiComponent<any, infer Variants> ? Variants : never\n// type variants2 = typeof Separator extends TamaguiComponent<any, infer Variants> ? Variants : never\n\n// const x = <XStack horizontal />\n// const x2 = <Separator vertical />\n"],
5
+ "mappings": ";;AAAA;AAEA;AACA;AAqBO,gBAIL,WAEA,SAMA,yBACA;AACA,QAAM,oBAAqB,OAAM;AAtCnC;AAuCI,QAAI,SAAS;AACX,YAAM,EAAE,UAAU,MAAM,oBAAoB,iBAAiB;AAC7D,UAAI,iBAAiB;AACnB,eAAO,OAAO,cAAc,eAAe;AAAA,MAC7C;AACA,YAAM,mBACJ,kBAAkB,YACd,UAAU,aAAa,mBACvB,aAAa,IAAI,SAAS;AAChC,YAAM,0BAA0B,mBAC5B,iBAAU,oBAAV,mBAA2B,4BAA2B,YACtD;AACJ,YAAM,YAAY,CAAC,oBAAoB,kBAAkB;AACzD,YAAM,OAAO,2BAA4B;AACzC,YAAM,UAAU,CAAC,CAAE,cAAa,WAAY,EAAC,YAAY,SAAS,QAAQ;AAC1E,YAAM,UAAU,CAAC,CAAE,cAAa,WAAY,EAAC,YAAY,SAAS,YAAY;AAC9E,YAAM,SAAS,CAAC,CAAE,cAAa,UAAW,EAAC,YAAY,WAAW,SAAS,OAAO;AAElF,YAAM,OAA8B;AAAA,WAC/B;AAAA,WACC,CAAC,aAAa;AAAA,UAChB,WAAW;AAAA,QACb;AAAA,QACA;AAAA,QAGA;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QAEA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AACA,WAAO,CAAC;AAAA,EACV,GAAG;AAEH,QAAM,YAAY,gBAAgB,mBAAmB,SAAS;AA4B9D,SAAO;AAOT;AA7FgB;",
6
6
  "names": []
7
7
  }
File without changes
File without changes
package/dist/esm/types.js CHANGED
File without changes
File without changes
@@ -4,14 +4,6 @@ import { composeRefs } from "@tamagui/compose-refs";
4
4
  import * as React from "react";
5
5
  const Slot = React.forwardRef((props, forwardedRef) => {
6
6
  const { children, ...slotProps } = props;
7
- if (React.Children.toArray(children).some(isSlottable)) {
8
- return /* @__PURE__ */ React.createElement(React.Fragment, null, React.Children.map(children, (child) => {
9
- return isSlottable(child) ? /* @__PURE__ */ React.createElement(SlotClone, {
10
- ...slotProps,
11
- ref: forwardedRef
12
- }, child.props.children) : child;
13
- }));
14
- }
15
7
  return /* @__PURE__ */ React.createElement(SlotClone, {
16
8
  ...slotProps,
17
9
  ref: forwardedRef
@@ -21,10 +13,11 @@ Slot.displayName = "Slot";
21
13
  const SlotClone = React.forwardRef((props, forwardedRef) => {
22
14
  const { children, ...slotProps } = props;
23
15
  if (React.isValidElement(children)) {
24
- return React.cloneElement(children, {
16
+ const childProps = {
25
17
  ...mergeProps(children, slotProps),
26
18
  ref: composeRefs(forwardedRef, children.ref)
27
- });
19
+ };
20
+ return React.cloneElement(children, childProps);
28
21
  }
29
22
  return React.Children.count(children) > 1 ? React.Children.only(null) : null;
30
23
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Slot.tsx"],
4
- "sourcesContent": ["// via radix\n\nimport { composeRefs } from '@tamagui/compose-refs'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\nexport type SlotProps = {\n children?: React.ReactNode\n}\n\nexport const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n\n if (React.Children.toArray(children).some(isSlottable)) {\n return (\n <>\n {React.Children.map(children, (child) => {\n return isSlottable(child) ? (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {child.props.children}\n </SlotClone>\n ) : (\n child\n )\n })}\n </>\n )\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n )\n})\n\nSlot.displayName = 'Slot'\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode\n}\n\nconst SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n\n if (React.isValidElement(children)) {\n return React.cloneElement(children, {\n ...mergeProps(children, slotProps),\n ref: composeRefs(forwardedRef, (children as any).ref),\n })\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null\n})\n\nSlotClone.displayName = 'SlotClone'\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nexport const Slottable = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>\n\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n return React.isValidElement(child)\n}\n\nconst pressMap = {\n onPress: 'onClick',\n onPressOut: 'onMouseOut',\n onPressIn: 'onMouseIn',\n}\n\nfunction mergeProps(child: any, slotProps: AnyProps) {\n const childProps = child.props\n\n // all child props should override\n const overrideProps = { ...childProps }\n\n const isHTMLChild = typeof child.type === 'string'\n\n if (isHTMLChild) {\n for (const key in pressMap) {\n if (key in slotProps) {\n slotProps[pressMap[key]] = slotProps[key]\n delete slotProps[key]\n }\n }\n }\n\n for (let propName in childProps) {\n const slotPropValue = slotProps[propName]\n const childPropValue = childProps[propName]\n\n if (isHTMLChild && pressMap[propName]) {\n propName = pressMap[propName]\n delete overrideProps[propName]\n }\n\n const isHandler = /^on[A-Z]/.test(propName)\n // if it's a handler, modify the override by composing the base handler\n if (isHandler) {\n overrideProps[propName] = (...args: unknown[]) => {\n childPropValue?.(...args)\n slotPropValue?.(...args)\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue }\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ')\n }\n }\n\n return { ...slotProps, ...overrideProps }\n}\n"],
5
- "mappings": ";;AAEA;AACA;AAUO,MAAM,OAAO,MAAM,WAAmC,CAAC,OAAO,iBAAiB;AACpF,QAAM,EAAE,aAAa,cAAc;AAEnC,MAAI,MAAM,SAAS,QAAQ,QAAQ,EAAE,KAAK,WAAW,GAAG;AACtD,WACE,0DACG,MAAM,SAAS,IAAI,UAAU,CAAC,UAAU;AACvC,aAAO,YAAY,KAAK,IACtB,oCAAC;AAAA,WAAc;AAAA,QAAW,KAAK;AAAA,SAC5B,MAAM,MAAM,QACf,IAEA;AAAA,IAEJ,CAAC,CACH;AAAA,EAEJ;AAEA,SACE,oCAAC;AAAA,OAAc;AAAA,IAAW,KAAK;AAAA,KAC5B,QACH;AAEJ,CAAC;AAED,KAAK,cAAc;AAUnB,MAAM,YAAY,MAAM,WAAgC,CAAC,OAAO,iBAAiB;AAC/E,QAAM,EAAE,aAAa,cAAc;AAEnC,MAAI,MAAM,eAAe,QAAQ,GAAG;AAClC,WAAO,MAAM,aAAa,UAAU;AAAA,SAC/B,WAAW,UAAU,SAAS;AAAA,MACjC,KAAK,YAAY,cAAe,SAAiB,GAAG;AAAA,IACtD,CAAC;AAAA,EACH;AAEA,SAAO,MAAM,SAAS,MAAM,QAAQ,IAAI,IAAI,MAAM,SAAS,KAAK,IAAI,IAAI;AAC1E,CAAC;AAED,UAAU,cAAc;AAMjB,MAAM,YAAY,wBAAC,EAAE,eAA8C;AACxE,SAAO,0DAAG,QAAS;AACrB,GAFyB;AAQzB,qBAAqB,OAAqD;AACxE,SAAO,MAAM,eAAe,KAAK;AACnC;AAFS;AAIT,MAAM,WAAW;AAAA,EACf,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AACb;AAEA,oBAAoB,OAAY,WAAqB;AACnD,QAAM,aAAa,MAAM;AAGzB,QAAM,gBAAgB,KAAK,WAAW;AAEtC,QAAM,cAAc,OAAO,MAAM,SAAS;AAE1C,MAAI,aAAa;AACf,eAAW,OAAO,UAAU;AAC1B,UAAI,OAAO,WAAW;AACpB,kBAAU,SAAS,QAAQ,UAAU;AACrC,eAAO,UAAU;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AAEA,WAAS,YAAY,YAAY;AAC/B,UAAM,gBAAgB,UAAU;AAChC,UAAM,iBAAiB,WAAW;AAElC,QAAI,eAAe,SAAS,WAAW;AACrC,iBAAW,SAAS;AACpB,aAAO,cAAc;AAAA,IACvB;AAEA,UAAM,YAAY,WAAW,KAAK,QAAQ;AAE1C,QAAI,WAAW;AACb,oBAAc,YAAY,IAAI,SAAoB;AAChD,yDAAiB,GAAG;AACpB,uDAAgB,GAAG;AAAA,MACrB;AAAA,IACF,WAES,aAAa,SAAS;AAC7B,oBAAc,YAAY,KAAK,kBAAkB,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,YAAY,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,KAAK,cAAc,cAAc;AAC1C;AA3CS;",
4
+ "sourcesContent": ["// via radix\n\nimport { composeRefs } from '@tamagui/compose-refs'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\nexport type SlotProps = {\n children?: React.ReactNode\n}\n\nexport const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n )\n})\n\nSlot.displayName = 'Slot'\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode\n}\n\nconst SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n\n if (React.isValidElement(children)) {\n const childProps = {\n ...mergeProps(children, slotProps),\n ref: composeRefs(forwardedRef, (children as any).ref),\n }\n return React.cloneElement(children, childProps)\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null\n})\n\nSlotClone.displayName = 'SlotClone'\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nexport const Slottable = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>\n\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n return React.isValidElement(child)\n}\n\nconst pressMap = {\n onPress: 'onClick',\n onPressOut: 'onMouseOut',\n onPressIn: 'onMouseIn',\n}\n\nfunction mergeProps(child: any, slotProps: AnyProps) {\n const childProps = child.props\n\n // all child props should override\n const overrideProps = { ...childProps }\n\n const isHTMLChild = typeof child.type === 'string'\n\n if (isHTMLChild) {\n for (const key in pressMap) {\n if (key in slotProps) {\n slotProps[pressMap[key]] = slotProps[key]\n delete slotProps[key]\n }\n }\n }\n\n for (let propName in childProps) {\n const slotPropValue = slotProps[propName]\n const childPropValue = childProps[propName]\n\n if (isHTMLChild && pressMap[propName]) {\n propName = pressMap[propName]\n delete overrideProps[propName]\n }\n\n const isHandler = /^on[A-Z]/.test(propName)\n // if it's a handler, modify the override by composing the base handler\n if (isHandler) {\n overrideProps[propName] = (...args: unknown[]) => {\n childPropValue?.(...args)\n slotPropValue?.(...args)\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue }\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ')\n }\n }\n\n return { ...slotProps, ...overrideProps }\n}\n"],
5
+ "mappings": ";;AAEA;AACA;AAUO,MAAM,OAAO,MAAM,WAAmC,CAAC,OAAO,iBAAiB;AACpF,QAAM,EAAE,aAAa,cAAc;AACnC,SACE,oCAAC;AAAA,OAAc;AAAA,IAAW,KAAK;AAAA,KAC5B,QACH;AAEJ,CAAC;AAED,KAAK,cAAc;AAUnB,MAAM,YAAY,MAAM,WAAgC,CAAC,OAAO,iBAAiB;AAC/E,QAAM,EAAE,aAAa,cAAc;AAEnC,MAAI,MAAM,eAAe,QAAQ,GAAG;AAClC,UAAM,aAAa;AAAA,SACd,WAAW,UAAU,SAAS;AAAA,MACjC,KAAK,YAAY,cAAe,SAAiB,GAAG;AAAA,IACtD;AACA,WAAO,MAAM,aAAa,UAAU,UAAU;AAAA,EAChD;AAEA,SAAO,MAAM,SAAS,MAAM,QAAQ,IAAI,IAAI,MAAM,SAAS,KAAK,IAAI,IAAI;AAC1E,CAAC;AAED,UAAU,cAAc;AAMjB,MAAM,YAAY,wBAAC,EAAE,eAA8C;AACxE,SAAO,0DAAG,QAAS;AACrB,GAFyB;AAQzB,qBAAqB,OAAqD;AACxE,SAAO,MAAM,eAAe,KAAK;AACnC;AAFS;AAIT,MAAM,WAAW;AAAA,EACf,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AACb;AAEA,oBAAoB,OAAY,WAAqB;AACnD,QAAM,aAAa,MAAM;AAGzB,QAAM,gBAAgB,KAAK,WAAW;AAEtC,QAAM,cAAc,OAAO,MAAM,SAAS;AAE1C,MAAI,aAAa;AACf,eAAW,OAAO,UAAU;AAC1B,UAAI,OAAO,WAAW;AACpB,kBAAU,SAAS,QAAQ,UAAU;AACrC,eAAO,UAAU;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AAEA,WAAS,YAAY,YAAY;AAC/B,UAAM,gBAAgB,UAAU;AAChC,UAAM,iBAAiB,WAAW;AAElC,QAAI,eAAe,SAAS,WAAW;AACrC,iBAAW,SAAS;AACpB,aAAO,cAAc;AAAA,IACvB;AAEA,UAAM,YAAY,WAAW,KAAK,QAAQ;AAE1C,QAAI,WAAW;AACb,oBAAc,YAAY,IAAI,SAAoB;AAChD,yDAAiB,GAAG;AACpB,uDAAgB,GAAG;AAAA,MACrB;AAAA,IACF,WAES,aAAa,SAAS;AAC7B,oBAAc,YAAY,KAAK,kBAAkB,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,YAAY,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,KAAK,cAAc,cAAc;AAC1C;AA3CS;",
6
6
  "names": []
7
7
  }
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/jsx/conf.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -97,7 +97,7 @@ function createComponent(configIn, ParentComponent) {
97
97
  props = tamaguiDefaultProps && !props.asChild ? { ...tamaguiDefaultProps, ...props } : props;
98
98
  const { Component, isText, isZStack } = staticConfig;
99
99
  const componentName = props.componentName || staticConfig.componentName;
100
- const componentClassName = props.componentName ? `is_${props.componentName}` : defaultComponentClassName;
100
+ const componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName;
101
101
  if (process.env.NODE_ENV === "development") {
102
102
  if (props["debug"]) {
103
103
  console.log("\u26A0\uFE0F", componentName || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]", "debug on");
@@ -149,6 +149,7 @@ function createComponent(configIn, ParentComponent) {
149
149
  onMouseEnter,
150
150
  onMouseLeave,
151
151
  hrefAttrs,
152
+ separator,
152
153
  onClick,
153
154
  theme: _themeProp,
154
155
  defaultVariants,
@@ -526,7 +527,14 @@ function createComponent(configIn, ParentComponent) {
526
527
  if (process.env.NODE_ENV === "development" && props["debug"]) {
527
528
  console.log(" \xBB className", { splitStyles, style: style2, isStringElement, pseudos, state, classNames, propsClassName: props.className, classList, className: className.trim().split(" "), themeClassName: theme.className, values: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, getAllSelectors()[v]])) });
528
529
  }
529
- viewProps.className = className;
530
+ if (staticConfig.isReactNativeWeb) {
531
+ viewProps.dataSet = {
532
+ ...viewProps.dataSet,
533
+ className
534
+ };
535
+ } else {
536
+ viewProps.className = className;
537
+ }
530
538
  viewProps.style = style2;
531
539
  } else {
532
540
  viewProps.style = styles;
@@ -603,25 +611,22 @@ function createComponent(configIn, ParentComponent) {
603
611
  onPress == null ? void 0 : onPress(e);
604
612
  } : null
605
613
  } : null;
606
- const childEls = !children || asChild ? children : wrapThemeManagerContext(spacedChildren({
614
+ let childEls = !children || asChild ? children : wrapThemeManagerContext(spacedChildren({
615
+ separator,
607
616
  children,
608
617
  space,
609
618
  direction: props.spaceDirection || "both",
610
619
  isZStack
611
620
  }), getThemeManagerIfChanged(theme));
612
621
  let content;
613
- if (isWeb) {
614
- if (staticConfig.isReactNativeWeb) {
615
- viewProps.dataSet = {
616
- ...viewProps.dataSet,
617
- className: viewProps.className
618
- };
619
- }
620
- }
621
622
  if (asChild) {
622
623
  elementType = Slot;
623
- const onlyChild = React.Children.only(children);
624
- Object.assign(viewProps, onlyChild.props);
624
+ viewProps = {
625
+ ...viewProps,
626
+ onPress,
627
+ onPressIn,
628
+ onPressOut
629
+ };
625
630
  }
626
631
  if (isWeb) {
627
632
  const [pressableProps] = usePressable(events ? {
@@ -750,6 +755,10 @@ function createComponent(configIn, ParentComponent) {
750
755
  return res;
751
756
  }
752
757
  __name(createComponent, "createComponent");
758
+ const Unspaced = /* @__PURE__ */ __name((props) => {
759
+ return props.children;
760
+ }, "Unspaced");
761
+ Unspaced["isUnspaced"] = true;
753
762
  const Spacer = createComponent({
754
763
  memo: true,
755
764
  componentName: "Spacer",
@@ -796,14 +805,16 @@ function spacedChildren({
796
805
  children,
797
806
  space,
798
807
  direction,
799
- spaceFlex
808
+ spaceFlex,
809
+ separator
800
810
  }) {
801
- if (!space && !spaceFlex) {
811
+ const hasSpace = !!(space || spaceFlex);
812
+ const hasSeparator = !(separator === void 0 || separator === null);
813
+ if (!hasSpace && !hasSeparator) {
802
814
  return children;
803
815
  }
804
- const childrenList = Array.isArray(children) ? children : Children.toArray(children);
805
- const len = childrenList.length;
806
- if (len <= 1) {
816
+ const childrenList = Children.toArray(children);
817
+ if (childrenList.length <= 1) {
807
818
  return childrenList;
808
819
  }
809
820
  const final = [];
@@ -815,20 +826,49 @@ function spacedChildren({
815
826
  final.push(<Fragment key={index}>{isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}</Fragment>);
816
827
  }
817
828
  const next = childrenList[index + 1];
818
- if (next && !isVisuallyHidden(next)) {
819
- final.push(<Spacer key={`_${index}_spacer`} direction={direction === "both" ? void 0 : direction === "row" || direction === "row-reverse" ? "horizontal" : "vertical"} size={space} {...spaceFlex && {
820
- flex: spaceFlex
821
- }} />);
829
+ if (next && !isUnspaced(next)) {
830
+ if (separator) {
831
+ if (hasSpace) {
832
+ final.push(createSpacer({
833
+ key: `_${index}_before_sep_spacer`,
834
+ direction,
835
+ space,
836
+ spaceFlex
837
+ }));
838
+ }
839
+ final.push(React.isValidElement(separator) ? React.cloneElement(separator, { key: `sep_${index}` }) : separator);
840
+ if (hasSpace) {
841
+ final.push(createSpacer({
842
+ key: `_${index}_after_sep_spacer`,
843
+ direction,
844
+ space,
845
+ spaceFlex
846
+ }));
847
+ }
848
+ } else {
849
+ final.push(createSpacer({
850
+ key: `_${index}_spacer`,
851
+ direction,
852
+ space,
853
+ spaceFlex
854
+ }));
855
+ }
822
856
  }
823
857
  }
824
858
  return final;
825
859
  }
826
860
  __name(spacedChildren, "spacedChildren");
827
- function isVisuallyHidden(child) {
828
- var _a;
829
- return (_a = child == null ? void 0 : child["type"]) == null ? void 0 : _a["isVisuallyHidden"];
861
+ function createSpacer({ key, direction, space, spaceFlex }) {
862
+ return <Spacer key={key} direction={direction === "both" ? void 0 : direction === "row" || direction === "row-reverse" ? "horizontal" : "vertical"} size={space} {...spaceFlex && {
863
+ flex: spaceFlex
864
+ }} />;
865
+ }
866
+ __name(createSpacer, "createSpacer");
867
+ function isUnspaced(child) {
868
+ var _a, _b;
869
+ return ((_a = child == null ? void 0 : child["type"]) == null ? void 0 : _a["isVisuallyHidden"]) || ((_b = child == null ? void 0 : child["type"]) == null ? void 0 : _b["isUnspaced"]);
830
870
  }
831
- __name(isVisuallyHidden, "isVisuallyHidden");
871
+ __name(isUnspaced, "isUnspaced");
832
872
  function AbsoluteFill(props) {
833
873
  return isWeb ? <div style={{
834
874
  position: "absolute",
@@ -860,6 +900,7 @@ const accessibilityRoleToWebRole = {
860
900
  export {
861
901
  AbsoluteFill,
862
902
  Spacer,
903
+ Unspaced,
863
904
  createComponent,
864
905
  mouseUps,
865
906
  spacedChildren
File without changes
File without changes
@@ -189,12 +189,14 @@ function ensureThemeVariable(theme, key) {
189
189
  const val = theme[key];
190
190
  if (!isVariable(val)) {
191
191
  theme[key] = createVariable({
192
+ key,
192
193
  name: key,
193
194
  val
194
195
  });
195
196
  } else {
196
197
  if (val.name !== key) {
197
198
  theme[key] = createVariable({
199
+ key,
198
200
  name: key,
199
201
  val: val.val
200
202
  });
File without changes
@@ -17,7 +17,7 @@ const mapTokensToVariables = /* @__PURE__ */ __name((tokens, parentPath = "") =>
17
17
  if (val && typeof val === "object") {
18
18
  res[key] = mapTokensToVariables(tokens[key], name);
19
19
  } else {
20
- res[key] = createVariable({ val, name });
20
+ res[key] = createVariable({ val, name, key });
21
21
  }
22
22
  }
23
23
  return res;
@@ -4,10 +4,11 @@ var _a;
4
4
  import { isWeb } from "./constants/platform";
5
5
  const IS_VARIABLE_SYMBOL = "__isVariable__";
6
6
  class Variable {
7
- constructor({ val, name }) {
7
+ constructor({ val, name, key }) {
8
8
  this[_a] = true;
9
9
  this.val = isVariable(val) ? val.val : val;
10
10
  this.name = name;
11
+ this.key = key;
11
12
  this.variable = isWeb ? createCSSVariable(name) : this.val;
12
13
  }
13
14
  toString() {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes