@tamagui/web 1.114.4 → 1.115.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/dist/cjs/Tamagui.cjs +80 -0
  2. package/dist/cjs/_withStableStyle.cjs +51 -0
  3. package/dist/cjs/config.cjs +111 -0
  4. package/dist/cjs/constants/{accessibilityDirectMap.js → accessibilityDirectMap.cjs} +19 -11
  5. package/dist/cjs/constants/accessibilityDirectMap.native.cjs +34 -0
  6. package/dist/cjs/constants/accessibilityDirectMap.native.cjs.map +6 -0
  7. package/dist/cjs/constants/constants.cjs +45 -0
  8. package/dist/cjs/constants/isDevTools.cjs +31 -0
  9. package/dist/cjs/constants/webToNativeProps.cjs +28 -0
  10. package/dist/cjs/constants/webToNativeProps.native.cjs +102 -0
  11. package/dist/cjs/constants/webToNativeProps.native.cjs.map +6 -0
  12. package/dist/cjs/contexts/{ComponentContext.js → ComponentContext.cjs} +17 -12
  13. package/dist/cjs/{createComponent.js → createComponent.cjs} +407 -317
  14. package/dist/cjs/createFont.cjs +42 -0
  15. package/dist/cjs/createShorthands.cjs +28 -0
  16. package/dist/cjs/createTamagui.cjs +235 -0
  17. package/dist/cjs/createTheme.cjs +26 -0
  18. package/dist/cjs/createTokens.cjs +29 -0
  19. package/dist/cjs/{createVariable.js → createVariable.cjs} +31 -24
  20. package/dist/cjs/createVariables.cjs +58 -0
  21. package/dist/cjs/defaultComponentState.cjs +44 -0
  22. package/dist/cjs/helpers/ThemeManager.cjs +184 -0
  23. package/dist/cjs/helpers/{ThemeManagerContext.js → ThemeManagerContext.cjs} +22 -14
  24. package/dist/cjs/helpers/createMediaStyle.cjs +96 -0
  25. package/dist/cjs/helpers/{createShallowSetState.js → createShallowSetState.cjs} +29 -22
  26. package/dist/cjs/helpers/createStyledContext.cjs +70 -0
  27. package/dist/cjs/helpers/defaultOffset.cjs +29 -0
  28. package/dist/cjs/helpers/expandStyle.cjs +67 -0
  29. package/dist/cjs/helpers/expandStyles.cjs +40 -0
  30. package/dist/cjs/helpers/getExpandedShorthands.cjs +33 -0
  31. package/dist/cjs/helpers/getFontLanguage.cjs +26 -0
  32. package/dist/cjs/helpers/getGroupPropParts.cjs +37 -0
  33. package/dist/cjs/helpers/{getSplitStyles.js → getSplitStyles.cjs} +362 -335
  34. package/dist/cjs/helpers/getStylesAtomic.cjs +176 -0
  35. package/dist/cjs/helpers/getStylesAtomic.native.cjs +33 -0
  36. package/dist/cjs/helpers/getStylesAtomic.native.cjs.map +6 -0
  37. package/dist/cjs/helpers/getThemeCSSRules.cjs +119 -0
  38. package/dist/cjs/helpers/getThemeCSSRules.native.cjs +28 -0
  39. package/dist/cjs/helpers/getThemeCSSRules.native.cjs.map +6 -0
  40. package/dist/cjs/helpers/getVariantExtras.cjs +65 -0
  41. package/dist/cjs/helpers/{insertStyleRule.js → insertStyleRule.cjs} +93 -96
  42. package/dist/cjs/helpers/isActivePlatform.cjs +35 -0
  43. package/dist/cjs/helpers/isObj.cjs +26 -0
  44. package/dist/cjs/helpers/isTamaguiComponent.cjs +29 -0
  45. package/dist/cjs/helpers/{isTamaguiElement.js → isTamaguiElement.cjs} +24 -15
  46. package/dist/cjs/helpers/log.cjs +36 -0
  47. package/dist/cjs/helpers/matchMedia.cjs +36 -0
  48. package/dist/cjs/helpers/matchMedia.native.cjs +39 -0
  49. package/dist/cjs/helpers/matchMedia.native.cjs.map +6 -0
  50. package/dist/cjs/helpers/mergeProps.cjs +45 -0
  51. package/dist/cjs/helpers/{mergeVariants.js → mergeVariants.cjs} +19 -17
  52. package/dist/cjs/helpers/normalizeColor.cjs +48 -0
  53. package/dist/cjs/helpers/{normalizeShadow.js → normalizeShadow.cjs} +22 -13
  54. package/dist/cjs/helpers/normalizeStyle.cjs +47 -0
  55. package/dist/cjs/helpers/normalizeStylePropKeys.cjs +26 -0
  56. package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs +37 -0
  57. package/dist/cjs/helpers/normalizeStylePropKeys.native.cjs.map +6 -0
  58. package/dist/cjs/helpers/{normalizeValueWithProperty.js → normalizeValueWithProperty.cjs} +22 -19
  59. package/dist/cjs/helpers/objectIdentityKey.cjs +39 -0
  60. package/dist/cjs/helpers/propMapper.cjs +254 -0
  61. package/dist/cjs/helpers/proxyThemeToParents.cjs +61 -0
  62. package/dist/cjs/helpers/{proxyThemeVariables.js → proxyThemeVariables.cjs} +16 -11
  63. package/dist/cjs/helpers/pseudoDescriptors.cjs +72 -0
  64. package/dist/cjs/helpers/registerCSSVariable.cjs +33 -0
  65. package/dist/cjs/helpers/setElementProps.cjs +29 -0
  66. package/dist/cjs/helpers/setElementProps.native.cjs +30 -0
  67. package/dist/cjs/helpers/setElementProps.native.cjs.map +6 -0
  68. package/dist/cjs/helpers/{skipProps.js → skipProps.cjs} +17 -12
  69. package/dist/cjs/helpers/sortString.cjs +26 -0
  70. package/dist/cjs/helpers/{subscribeToContextGroup.js → subscribeToContextGroup.cjs} +25 -17
  71. package/dist/cjs/helpers/themeable.cjs +83 -0
  72. package/dist/cjs/helpers/{themes.js → themes.cjs} +17 -12
  73. package/dist/cjs/helpers/timer.cjs +32 -0
  74. package/dist/cjs/helpers/transformsToString.cjs +37 -0
  75. package/dist/cjs/helpers/webPropsToSkip.cjs +26 -0
  76. package/dist/cjs/helpers/webPropsToSkip.native.cjs +79 -0
  77. package/dist/cjs/helpers/webPropsToSkip.native.cjs.map +6 -0
  78. package/dist/cjs/helpers/wrapStyleTags.cjs +40 -0
  79. package/dist/cjs/hooks/{useComponentState.js → useComponentState.cjs} +75 -30
  80. package/dist/cjs/hooks/useConfiguration.cjs +55 -0
  81. package/dist/cjs/hooks/{useDidHydrateOnce.js → useDidHydrateOnce.cjs} +27 -16
  82. package/dist/cjs/hooks/useDisableSSR.cjs +29 -0
  83. package/dist/cjs/hooks/useIsTouchDevice.cjs +28 -0
  84. package/dist/cjs/hooks/useMedia.cjs +227 -0
  85. package/dist/cjs/hooks/useProps.cjs +108 -0
  86. package/dist/cjs/hooks/useTheme.cjs +277 -0
  87. package/dist/cjs/hooks/useThemeName.cjs +50 -0
  88. package/dist/cjs/index.cjs +106 -0
  89. package/dist/cjs/inject-styles.cjs +37 -0
  90. package/dist/cjs/insertFont.cjs +72 -0
  91. package/dist/cjs/interfaces/CSSColorNames.cjs +16 -0
  92. package/dist/cjs/interfaces/GetRef.cjs +16 -0
  93. package/dist/cjs/interfaces/KeyTypes.cjs +16 -0
  94. package/dist/cjs/interfaces/RNExclusiveTypes.cjs +16 -0
  95. package/dist/cjs/interfaces/Role.cjs +16 -0
  96. package/dist/cjs/interfaces/TamaguiComponentEvents.cjs +16 -0
  97. package/dist/cjs/interfaces/{TamaguiComponentPropsBaseBase.js → TamaguiComponentPropsBaseBase.cjs} +8 -6
  98. package/dist/cjs/interfaces/TamaguiComponentState.cjs +16 -0
  99. package/dist/cjs/interfaces/WebOnlyPressEvents.cjs +16 -0
  100. package/dist/cjs/setupHooks.cjs +30 -0
  101. package/dist/cjs/setupReactNative.cjs +49 -0
  102. package/dist/cjs/styled.cjs +87 -0
  103. package/dist/cjs/type-utils.cjs +16 -0
  104. package/dist/cjs/types.cjs +19 -0
  105. package/dist/cjs/views/Configuration.cjs +47 -0
  106. package/dist/cjs/views/FontLanguage.cjs +37 -0
  107. package/dist/cjs/views/FontLanguage.native.cjs +50 -0
  108. package/dist/cjs/views/FontLanguage.native.cjs.map +6 -0
  109. package/dist/cjs/views/FontLanguage.types.cjs +16 -0
  110. package/dist/cjs/views/Slot.cjs +78 -0
  111. package/dist/cjs/views/Stack.cjs +34 -0
  112. package/dist/cjs/views/TamaguiProvider.cjs +93 -0
  113. package/dist/cjs/views/Text.cjs +86 -0
  114. package/dist/cjs/views/Theme.cjs +145 -0
  115. package/dist/cjs/views/ThemeDebug.cjs +92 -0
  116. package/dist/cjs/views/ThemeDebug.native.cjs +33 -0
  117. package/dist/cjs/views/ThemeDebug.native.cjs.map +6 -0
  118. package/dist/cjs/views/ThemeProvider.cjs +56 -0
  119. package/dist/cjs/views/View.cjs +33 -0
  120. package/package.json +15 -14
  121. package/dist/cjs/Tamagui.js +0 -63
  122. package/dist/cjs/_withStableStyle.js +0 -33
  123. package/dist/cjs/config.js +0 -97
  124. package/dist/cjs/constants/constants.js +0 -36
  125. package/dist/cjs/constants/isDevTools.js +0 -28
  126. package/dist/cjs/constants/webToNativeProps.js +0 -22
  127. package/dist/cjs/createFont.js +0 -53
  128. package/dist/cjs/createShorthands.js +0 -23
  129. package/dist/cjs/createTamagui.js +0 -189
  130. package/dist/cjs/createTheme.js +0 -21
  131. package/dist/cjs/createTokens.js +0 -24
  132. package/dist/cjs/createVariables.js +0 -47
  133. package/dist/cjs/defaultComponentState.js +0 -37
  134. package/dist/cjs/helpers/ThemeManager.js +0 -166
  135. package/dist/cjs/helpers/createMediaStyle.js +0 -74
  136. package/dist/cjs/helpers/createStyledContext.js +0 -53
  137. package/dist/cjs/helpers/defaultOffset.js +0 -21
  138. package/dist/cjs/helpers/expandStyle.js +0 -73
  139. package/dist/cjs/helpers/expandStyles.js +0 -34
  140. package/dist/cjs/helpers/getExpandedShorthands.js +0 -29
  141. package/dist/cjs/helpers/getFontLanguage.js +0 -21
  142. package/dist/cjs/helpers/getGroupPropParts.js +0 -27
  143. package/dist/cjs/helpers/getStylesAtomic.js +0 -152
  144. package/dist/cjs/helpers/getThemeCSSRules.js +0 -89
  145. package/dist/cjs/helpers/getVariantExtras.js +0 -58
  146. package/dist/cjs/helpers/isActivePlatform.js +0 -29
  147. package/dist/cjs/helpers/isObj.js +0 -21
  148. package/dist/cjs/helpers/isTamaguiComponent.js +0 -24
  149. package/dist/cjs/helpers/log.js +0 -31
  150. package/dist/cjs/helpers/matchMedia.js +0 -34
  151. package/dist/cjs/helpers/mergeProps.js +0 -41
  152. package/dist/cjs/helpers/normalizeColor.js +0 -43
  153. package/dist/cjs/helpers/normalizeStyle.js +0 -36
  154. package/dist/cjs/helpers/normalizeStylePropKeys.js +0 -21
  155. package/dist/cjs/helpers/objectIdentityKey.js +0 -38
  156. package/dist/cjs/helpers/propMapper.js +0 -238
  157. package/dist/cjs/helpers/proxyThemeToParents.js +0 -52
  158. package/dist/cjs/helpers/pseudoDescriptors.js +0 -65
  159. package/dist/cjs/helpers/registerCSSVariable.js +0 -29
  160. package/dist/cjs/helpers/setElementProps.js +0 -24
  161. package/dist/cjs/helpers/sortString.js +0 -21
  162. package/dist/cjs/helpers/themeable.js +0 -63
  163. package/dist/cjs/helpers/timer.js +0 -27
  164. package/dist/cjs/helpers/transformsToString.js +0 -32
  165. package/dist/cjs/helpers/webPropsToSkip.js +0 -21
  166. package/dist/cjs/helpers/wrapStyleTags.js +0 -39
  167. package/dist/cjs/hooks/useConfiguration.js +0 -37
  168. package/dist/cjs/hooks/useDisableSSR.js +0 -24
  169. package/dist/cjs/hooks/useIsTouchDevice.js +0 -22
  170. package/dist/cjs/hooks/useMedia.js +0 -206
  171. package/dist/cjs/hooks/useProps.js +0 -95
  172. package/dist/cjs/hooks/useTheme.js +0 -263
  173. package/dist/cjs/hooks/useThemeName.js +0 -39
  174. package/dist/cjs/index.js +0 -99
  175. package/dist/cjs/inject-styles.js +0 -28
  176. package/dist/cjs/insertFont.js +0 -65
  177. package/dist/cjs/interfaces/CSSColorNames.js +0 -14
  178. package/dist/cjs/interfaces/GetRef.js +0 -14
  179. package/dist/cjs/interfaces/KeyTypes.js +0 -14
  180. package/dist/cjs/interfaces/RNExclusiveTypes.js +0 -14
  181. package/dist/cjs/interfaces/Role.js +0 -14
  182. package/dist/cjs/interfaces/TamaguiComponentEvents.js +0 -14
  183. package/dist/cjs/interfaces/TamaguiComponentState.js +0 -14
  184. package/dist/cjs/interfaces/WebOnlyPressEvents.js +0 -14
  185. package/dist/cjs/setupHooks.js +0 -25
  186. package/dist/cjs/setupReactNative.js +0 -46
  187. package/dist/cjs/styled.js +0 -74
  188. package/dist/cjs/type-utils.js +0 -14
  189. package/dist/cjs/types.js +0 -16
  190. package/dist/cjs/views/Configuration.js +0 -34
  191. package/dist/cjs/views/FontLanguage.js +0 -32
  192. package/dist/cjs/views/FontLanguage.types.js +0 -14
  193. package/dist/cjs/views/Slot.js +0 -59
  194. package/dist/cjs/views/Stack.js +0 -27
  195. package/dist/cjs/views/TamaguiProvider.js +0 -76
  196. package/dist/cjs/views/Text.js +0 -77
  197. package/dist/cjs/views/Theme.js +0 -103
  198. package/dist/cjs/views/ThemeDebug.js +0 -94
  199. package/dist/cjs/views/ThemeProvider.js +0 -45
  200. package/dist/cjs/views/View.js +0 -26
  201. /package/dist/cjs/{Tamagui.js.map → Tamagui.cjs.map} +0 -0
  202. /package/dist/cjs/{_withStableStyle.js.map → _withStableStyle.cjs.map} +0 -0
  203. /package/dist/cjs/{config.js.map → config.cjs.map} +0 -0
  204. /package/dist/cjs/constants/{accessibilityDirectMap.js.map → accessibilityDirectMap.cjs.map} +0 -0
  205. /package/dist/cjs/constants/{constants.js.map → constants.cjs.map} +0 -0
  206. /package/dist/cjs/constants/{isDevTools.js.map → isDevTools.cjs.map} +0 -0
  207. /package/dist/cjs/constants/{webToNativeProps.js.map → webToNativeProps.cjs.map} +0 -0
  208. /package/dist/cjs/contexts/{ComponentContext.js.map → ComponentContext.cjs.map} +0 -0
  209. /package/dist/cjs/{createComponent.js.map → createComponent.cjs.map} +0 -0
  210. /package/dist/cjs/{createFont.js.map → createFont.cjs.map} +0 -0
  211. /package/dist/cjs/{createShorthands.js.map → createShorthands.cjs.map} +0 -0
  212. /package/dist/cjs/{createTamagui.js.map → createTamagui.cjs.map} +0 -0
  213. /package/dist/cjs/{createTheme.js.map → createTheme.cjs.map} +0 -0
  214. /package/dist/cjs/{createTokens.js.map → createTokens.cjs.map} +0 -0
  215. /package/dist/cjs/{createVariable.js.map → createVariable.cjs.map} +0 -0
  216. /package/dist/cjs/{createVariables.js.map → createVariables.cjs.map} +0 -0
  217. /package/dist/cjs/{defaultComponentState.js.map → defaultComponentState.cjs.map} +0 -0
  218. /package/dist/cjs/helpers/{ThemeManager.js.map → ThemeManager.cjs.map} +0 -0
  219. /package/dist/cjs/helpers/{ThemeManagerContext.js.map → ThemeManagerContext.cjs.map} +0 -0
  220. /package/dist/cjs/helpers/{createMediaStyle.js.map → createMediaStyle.cjs.map} +0 -0
  221. /package/dist/cjs/helpers/{createShallowSetState.js.map → createShallowSetState.cjs.map} +0 -0
  222. /package/dist/cjs/helpers/{createStyledContext.js.map → createStyledContext.cjs.map} +0 -0
  223. /package/dist/cjs/helpers/{defaultOffset.js.map → defaultOffset.cjs.map} +0 -0
  224. /package/dist/cjs/helpers/{expandStyle.js.map → expandStyle.cjs.map} +0 -0
  225. /package/dist/cjs/helpers/{expandStyles.js.map → expandStyles.cjs.map} +0 -0
  226. /package/dist/cjs/helpers/{getExpandedShorthands.js.map → getExpandedShorthands.cjs.map} +0 -0
  227. /package/dist/cjs/helpers/{getFontLanguage.js.map → getFontLanguage.cjs.map} +0 -0
  228. /package/dist/cjs/helpers/{getGroupPropParts.js.map → getGroupPropParts.cjs.map} +0 -0
  229. /package/dist/cjs/helpers/{getSplitStyles.js.map → getSplitStyles.cjs.map} +0 -0
  230. /package/dist/cjs/helpers/{getStylesAtomic.js.map → getStylesAtomic.cjs.map} +0 -0
  231. /package/dist/cjs/helpers/{getThemeCSSRules.js.map → getThemeCSSRules.cjs.map} +0 -0
  232. /package/dist/cjs/helpers/{getVariantExtras.js.map → getVariantExtras.cjs.map} +0 -0
  233. /package/dist/cjs/helpers/{insertStyleRule.js.map → insertStyleRule.cjs.map} +0 -0
  234. /package/dist/cjs/helpers/{isActivePlatform.js.map → isActivePlatform.cjs.map} +0 -0
  235. /package/dist/cjs/helpers/{isObj.js.map → isObj.cjs.map} +0 -0
  236. /package/dist/cjs/helpers/{isTamaguiComponent.js.map → isTamaguiComponent.cjs.map} +0 -0
  237. /package/dist/cjs/helpers/{isTamaguiElement.js.map → isTamaguiElement.cjs.map} +0 -0
  238. /package/dist/cjs/helpers/{log.js.map → log.cjs.map} +0 -0
  239. /package/dist/cjs/helpers/{matchMedia.js.map → matchMedia.cjs.map} +0 -0
  240. /package/dist/cjs/helpers/{mergeProps.js.map → mergeProps.cjs.map} +0 -0
  241. /package/dist/cjs/helpers/{mergeVariants.js.map → mergeVariants.cjs.map} +0 -0
  242. /package/dist/cjs/helpers/{normalizeColor.js.map → normalizeColor.cjs.map} +0 -0
  243. /package/dist/cjs/helpers/{normalizeShadow.js.map → normalizeShadow.cjs.map} +0 -0
  244. /package/dist/cjs/helpers/{normalizeStyle.js.map → normalizeStyle.cjs.map} +0 -0
  245. /package/dist/cjs/helpers/{normalizeStylePropKeys.js.map → normalizeStylePropKeys.cjs.map} +0 -0
  246. /package/dist/cjs/helpers/{normalizeValueWithProperty.js.map → normalizeValueWithProperty.cjs.map} +0 -0
  247. /package/dist/cjs/helpers/{objectIdentityKey.js.map → objectIdentityKey.cjs.map} +0 -0
  248. /package/dist/cjs/helpers/{propMapper.js.map → propMapper.cjs.map} +0 -0
  249. /package/dist/cjs/helpers/{proxyThemeToParents.js.map → proxyThemeToParents.cjs.map} +0 -0
  250. /package/dist/cjs/helpers/{proxyThemeVariables.js.map → proxyThemeVariables.cjs.map} +0 -0
  251. /package/dist/cjs/helpers/{pseudoDescriptors.js.map → pseudoDescriptors.cjs.map} +0 -0
  252. /package/dist/cjs/helpers/{registerCSSVariable.js.map → registerCSSVariable.cjs.map} +0 -0
  253. /package/dist/cjs/helpers/{setElementProps.js.map → setElementProps.cjs.map} +0 -0
  254. /package/dist/cjs/helpers/{skipProps.js.map → skipProps.cjs.map} +0 -0
  255. /package/dist/cjs/helpers/{sortString.js.map → sortString.cjs.map} +0 -0
  256. /package/dist/cjs/helpers/{subscribeToContextGroup.js.map → subscribeToContextGroup.cjs.map} +0 -0
  257. /package/dist/cjs/helpers/{themeable.js.map → themeable.cjs.map} +0 -0
  258. /package/dist/cjs/helpers/{themes.js.map → themes.cjs.map} +0 -0
  259. /package/dist/cjs/helpers/{timer.js.map → timer.cjs.map} +0 -0
  260. /package/dist/cjs/helpers/{transformsToString.js.map → transformsToString.cjs.map} +0 -0
  261. /package/dist/cjs/helpers/{webPropsToSkip.js.map → webPropsToSkip.cjs.map} +0 -0
  262. /package/dist/cjs/helpers/{wrapStyleTags.js.map → wrapStyleTags.cjs.map} +0 -0
  263. /package/dist/cjs/hooks/{useComponentState.js.map → useComponentState.cjs.map} +0 -0
  264. /package/dist/cjs/hooks/{useConfiguration.js.map → useConfiguration.cjs.map} +0 -0
  265. /package/dist/cjs/hooks/{useDidHydrateOnce.js.map → useDidHydrateOnce.cjs.map} +0 -0
  266. /package/dist/cjs/hooks/{useDisableSSR.js.map → useDisableSSR.cjs.map} +0 -0
  267. /package/dist/cjs/hooks/{useIsTouchDevice.js.map → useIsTouchDevice.cjs.map} +0 -0
  268. /package/dist/cjs/hooks/{useMedia.js.map → useMedia.cjs.map} +0 -0
  269. /package/dist/cjs/hooks/{useProps.js.map → useProps.cjs.map} +0 -0
  270. /package/dist/cjs/hooks/{useTheme.js.map → useTheme.cjs.map} +0 -0
  271. /package/dist/cjs/hooks/{useThemeName.js.map → useThemeName.cjs.map} +0 -0
  272. /package/dist/cjs/{index.js.map → index.cjs.map} +0 -0
  273. /package/dist/cjs/{inject-styles.js.map → inject-styles.cjs.map} +0 -0
  274. /package/dist/cjs/{insertFont.js.map → insertFont.cjs.map} +0 -0
  275. /package/dist/cjs/interfaces/{CSSColorNames.js.map → CSSColorNames.cjs.map} +0 -0
  276. /package/dist/cjs/interfaces/{GetRef.js.map → GetRef.cjs.map} +0 -0
  277. /package/dist/cjs/interfaces/{KeyTypes.js.map → KeyTypes.cjs.map} +0 -0
  278. /package/dist/cjs/interfaces/{RNExclusiveTypes.js.map → RNExclusiveTypes.cjs.map} +0 -0
  279. /package/dist/cjs/interfaces/{Role.js.map → Role.cjs.map} +0 -0
  280. /package/dist/cjs/interfaces/{TamaguiComponentEvents.js.map → TamaguiComponentEvents.cjs.map} +0 -0
  281. /package/dist/cjs/interfaces/{TamaguiComponentPropsBaseBase.js.map → TamaguiComponentPropsBaseBase.cjs.map} +0 -0
  282. /package/dist/cjs/interfaces/{TamaguiComponentState.js.map → TamaguiComponentState.cjs.map} +0 -0
  283. /package/dist/cjs/interfaces/{WebOnlyPressEvents.js.map → WebOnlyPressEvents.cjs.map} +0 -0
  284. /package/dist/cjs/{setupHooks.js.map → setupHooks.cjs.map} +0 -0
  285. /package/dist/cjs/{setupReactNative.js.map → setupReactNative.cjs.map} +0 -0
  286. /package/dist/cjs/{styled.js.map → styled.cjs.map} +0 -0
  287. /package/dist/cjs/{type-utils.js.map → type-utils.cjs.map} +0 -0
  288. /package/dist/cjs/{types.js.map → types.cjs.map} +0 -0
  289. /package/dist/cjs/views/{Configuration.js.map → Configuration.cjs.map} +0 -0
  290. /package/dist/cjs/views/{FontLanguage.js.map → FontLanguage.cjs.map} +0 -0
  291. /package/dist/cjs/views/{FontLanguage.types.js.map → FontLanguage.types.cjs.map} +0 -0
  292. /package/dist/cjs/views/{Slot.js.map → Slot.cjs.map} +0 -0
  293. /package/dist/cjs/views/{Stack.js.map → Stack.cjs.map} +0 -0
  294. /package/dist/cjs/views/{TamaguiProvider.js.map → TamaguiProvider.cjs.map} +0 -0
  295. /package/dist/cjs/views/{Text.js.map → Text.cjs.map} +0 -0
  296. /package/dist/cjs/views/{Theme.js.map → Theme.cjs.map} +0 -0
  297. /package/dist/cjs/views/{ThemeDebug.js.map → ThemeDebug.cjs.map} +0 -0
  298. /package/dist/cjs/views/{ThemeProvider.js.map → ThemeProvider.cjs.map} +0 -0
  299. /package/dist/cjs/views/{View.js.map → View.cjs.map} +0 -0
@@ -2,24 +2,33 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf,
6
+ __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
15
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
21
  // If the importer is in node compatibility mode or this is not an ESM
17
22
  // file that has been converted to a CommonJS file using a Babel-
18
23
  // compatible transform (i.e. "__esModule" has not been set), then set
19
24
  // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: !0
28
+ }) : target, mod)),
29
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
+ value: !0
31
+ }), mod);
23
32
  var createComponent_exports = {};
24
33
  __export(createComponent_exports, {
25
34
  Spacer: () => Spacer,
@@ -29,43 +38,74 @@ __export(createComponent_exports, {
29
38
  spacedChildren: () => spacedChildren
30
39
  });
31
40
  module.exports = __toCommonJS(createComponent_exports);
32
- var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_react = __toESM(require("react")), import_config = require("./config"), import_constants2 = require("./constants/constants"), import_isDevTools = require("./constants/isDevTools"), import_ComponentContext = require("./contexts/ComponentContext"), import_createVariable = require("./createVariable"), import_defaultComponentState = require("./defaultComponentState"), import_getSplitStyles = require("./helpers/getSplitStyles"), import_log = require("./helpers/log"), import_mergeProps = require("./helpers/mergeProps"), import_setElementProps = require("./helpers/setElementProps"), import_subscribeToContextGroup = require("./helpers/subscribeToContextGroup"), import_themeable = require("./helpers/themeable"), import_wrapStyleTags = require("./helpers/wrapStyleTags"), import_useComponentState = require("./hooks/useComponentState"), import_useMedia = require("./hooks/useMedia"), import_useTheme = require("./hooks/useTheme"), import_setupHooks = require("./setupHooks"), import_Slot = require("./views/Slot"), import_Theme = require("./views/Theme"), import_ThemeDebug = require("./views/ThemeDebug"), import_jsx_runtime = require("react/jsx-runtime");
41
+ var import_compose_refs = require("@tamagui/compose-refs"),
42
+ import_constants = require("@tamagui/constants"),
43
+ import_helpers = require("@tamagui/helpers"),
44
+ import_react = __toESM(require("react")),
45
+ import_config = require("./config.cjs"),
46
+ import_constants2 = require("./constants/constants.cjs"),
47
+ import_isDevTools = require("./constants/isDevTools.cjs"),
48
+ import_ComponentContext = require("./contexts/ComponentContext.cjs"),
49
+ import_createVariable = require("./createVariable.cjs"),
50
+ import_defaultComponentState = require("./defaultComponentState.cjs"),
51
+ import_getSplitStyles = require("./helpers/getSplitStyles.cjs"),
52
+ import_log = require("./helpers/log.cjs"),
53
+ import_mergeProps = require("./helpers/mergeProps.cjs"),
54
+ import_setElementProps = require("./helpers/setElementProps.cjs"),
55
+ import_subscribeToContextGroup = require("./helpers/subscribeToContextGroup.cjs"),
56
+ import_themeable = require("./helpers/themeable.cjs"),
57
+ import_wrapStyleTags = require("./helpers/wrapStyleTags.cjs"),
58
+ import_useComponentState = require("./hooks/useComponentState.cjs"),
59
+ import_useMedia = require("./hooks/useMedia.cjs"),
60
+ import_useTheme = require("./hooks/useTheme.cjs"),
61
+ import_setupHooks = require("./setupHooks.cjs"),
62
+ import_Slot = require("./views/Slot.cjs"),
63
+ import_Theme = require("./views/Theme.cjs"),
64
+ import_ThemeDebug = require("./views/ThemeDebug.cjs"),
65
+ import_jsx_runtime = require("react/jsx-runtime");
33
66
  let tamaguiConfig, time, debugKeyListeners, startVisualizer;
34
- const componentSetStates = /* @__PURE__ */ new Set();
67
+ const componentSetStates = /* @__PURE__ */new Set();
35
68
  if (typeof document < "u") {
36
69
  const cancelTouches = () => {
37
- componentSetStates.forEach(
38
- (setState) => setState((prev) => prev.press || prev.pressIn ? {
39
- ...prev,
40
- press: !1,
41
- pressIn: !1
42
- } : prev)
43
- ), componentSetStates.clear();
70
+ componentSetStates.forEach(setState => setState(prev => prev.press || prev.pressIn ? {
71
+ ...prev,
72
+ press: !1,
73
+ pressIn: !1
74
+ } : prev)), componentSetStates.clear();
44
75
  };
45
76
  addEventListener("mouseup", cancelTouches), addEventListener("touchend", cancelTouches), addEventListener("touchcancel", cancelTouches), process.env.NODE_ENV === "development" && (startVisualizer = () => {
46
77
  const devVisualizerConfig = import_config.devConfig?.visualizer;
47
78
  if (devVisualizerConfig) {
48
- debugKeyListeners = /* @__PURE__ */ new Set();
49
- let tm, isShowing = !1;
79
+ debugKeyListeners = /* @__PURE__ */new Set();
80
+ let tm,
81
+ isShowing = !1;
50
82
  const options = {
51
83
  key: "Alt",
52
84
  delay: 800,
53
- ...typeof devVisualizerConfig == "object" ? devVisualizerConfig : {}
85
+ ...(typeof devVisualizerConfig == "object" ? devVisualizerConfig : {})
54
86
  };
55
87
  document.addEventListener("blur", () => {
56
88
  clearTimeout(tm);
57
- }), document.addEventListener("keydown", ({ key, defaultPrevented }) => {
89
+ }), document.addEventListener("keydown", ({
90
+ key,
91
+ defaultPrevented
92
+ }) => {
58
93
  defaultPrevented || (clearTimeout(tm), key === options.key && (tm = setTimeout(() => {
59
- isShowing = !0, debugKeyListeners?.forEach((l) => l(!0));
94
+ isShowing = !0, debugKeyListeners?.forEach(l => l(!0));
60
95
  }, options.delay)));
61
- }), document.addEventListener("keyup", ({ key, defaultPrevented }) => {
62
- defaultPrevented || key === options.key && (clearTimeout(tm), isShowing && debugKeyListeners?.forEach((l) => l(!1)));
96
+ }), document.addEventListener("keyup", ({
97
+ key,
98
+ defaultPrevented
99
+ }) => {
100
+ defaultPrevented || key === options.key && (clearTimeout(tm), isShowing && debugKeyListeners?.forEach(l => l(!1)));
63
101
  });
64
102
  }
65
103
  });
66
104
  }
67
105
  let BaseText, BaseView;
68
- const lastInteractionWasKeyboard = { value: !1 };
106
+ const lastInteractionWasKeyboard = {
107
+ value: !1
108
+ };
69
109
  import_constants.isWeb && globalThis.document && (document.addEventListener("keydown", () => {
70
110
  lastInteractionWasKeyboard.value = !0;
71
111
  }), document.addEventListener("mousedown", () => {
@@ -74,15 +114,26 @@ import_constants.isWeb && globalThis.document && (document.addEventListener("key
74
114
  lastInteractionWasKeyboard.value = !1;
75
115
  }));
76
116
  function createComponent(staticConfig) {
77
- const { componentName } = staticConfig;
78
- let config = null, defaultProps = staticConfig.defaultProps;
79
- (0, import_config.onConfiguredOnce)((conf) => {
117
+ const {
118
+ componentName
119
+ } = staticConfig;
120
+ let config = null,
121
+ defaultProps = staticConfig.defaultProps;
122
+ (0, import_config.onConfiguredOnce)(conf => {
80
123
  if (config = conf, componentName) {
81
124
  const defaultForComponent = conf.defaultProps?.[componentName];
82
- defaultForComponent && (defaultProps = { ...defaultForComponent, ...defaultProps });
125
+ defaultForComponent && (defaultProps = {
126
+ ...defaultForComponent,
127
+ ...defaultProps
128
+ });
83
129
  }
84
130
  });
85
- const { Component, isText, isZStack, isHOC } = staticConfig;
131
+ const {
132
+ Component,
133
+ isText,
134
+ isZStack,
135
+ isHOC
136
+ } = staticConfig;
86
137
  process.env.NODE_ENV === "development" && staticConfig.defaultProps?.debug && process.env.IS_STATIC !== "is_static" && (0, import_log.log)(`\u{1F41B} [${componentName || "Component"}]`, {
87
138
  staticConfig,
88
139
  defaultProps,
@@ -93,7 +144,10 @@ function createComponent(staticConfig) {
93
144
  process.env.NODE_ENV === "development" && startVisualizer && (startVisualizer(), startVisualizer = void 0), process.env.NODE_ENV === "test" && propsIn["data-test-renders"] && (propsIn["data-test-renders"].current ??= 0, propsIn["data-test-renders"].current += 1);
94
145
  const componentContext = import_react.default.useContext(import_ComponentContext.ComponentContext);
95
146
  let styledContextProps, overriddenContextProps, contextValue;
96
- const { context, isReactNative } = staticConfig;
147
+ const {
148
+ context,
149
+ isReactNative
150
+ } = staticConfig;
97
151
  if (context && (contextValue = import_react.default.useContext(context), contextValue)) {
98
152
  process.env.NODE_ENV === "development" && (propsIn.debug || defaultProps?.debug) && (0, import_log.log)(" \u{1F447} contextValue", contextValue);
99
153
  for (const key in context.props) {
@@ -106,50 +160,60 @@ function createComponent(staticConfig) {
106
160
  finalVal !== void 0 && (overriddenContextProps ||= {}, overriddenContextProps[key] = finalVal);
107
161
  }
108
162
  }
109
- const curDefaultProps = styledContextProps ? { ...defaultProps, ...styledContextProps } : defaultProps;
163
+ const curDefaultProps = styledContextProps ? {
164
+ ...defaultProps,
165
+ ...styledContextProps
166
+ } : defaultProps;
110
167
  let props = propsIn;
111
168
  curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
112
- const debugProp = props.debug, componentName2 = props.componentName || staticConfig.componentName;
169
+ const debugProp = props.debug,
170
+ componentName2 = props.componentName || staticConfig.componentName;
113
171
  process.env.NODE_ENV === "development" && import_constants.isClient && import_react.default.useEffect(() => {
114
172
  let overlay = null;
115
173
  const debugVisualizerHandler = (show = !1) => {
116
174
  const node = curStateRef.host;
117
- if (node)
118
- if (show) {
119
- overlay = document.createElement("span"), overlay.style.inset = "0px", overlay.style.zIndex = "1000000", overlay.style.position = "absolute", overlay.style.borderColor = "red", overlay.style.borderWidth = "1px", overlay.style.borderStyle = "dotted";
120
- const dataAt = node.getAttribute("data-at") || "", dataIn = node.getAttribute("data-in") || "", tooltip = document.createElement("span");
121
- tooltip.style.position = "absolute", tooltip.style.top = "0px", tooltip.style.left = "0px", tooltip.style.padding = "3px", tooltip.style.background = "rgba(0,0,0,0.75)", tooltip.style.color = "rgba(255,255,255,1)", tooltip.style.fontSize = "12px", tooltip.style.lineHeight = "12px", tooltip.style.fontFamily = "monospace", tooltip.style.webkitFontSmoothing = "none", tooltip.innerText = `${componentName2 || ""} ${dataAt} ${dataIn}`.trim(), overlay.appendChild(tooltip), node.appendChild(overlay);
122
- } else
123
- overlay && node.removeChild(overlay);
175
+ if (node) if (show) {
176
+ overlay = document.createElement("span"), overlay.style.inset = "0px", overlay.style.zIndex = "1000000", overlay.style.position = "absolute", overlay.style.borderColor = "red", overlay.style.borderWidth = "1px", overlay.style.borderStyle = "dotted";
177
+ const dataAt = node.getAttribute("data-at") || "",
178
+ dataIn = node.getAttribute("data-in") || "",
179
+ tooltip = document.createElement("span");
180
+ tooltip.style.position = "absolute", tooltip.style.top = "0px", tooltip.style.left = "0px", tooltip.style.padding = "3px", tooltip.style.background = "rgba(0,0,0,0.75)", tooltip.style.color = "rgba(255,255,255,1)", tooltip.style.fontSize = "12px", tooltip.style.lineHeight = "12px", tooltip.style.fontFamily = "monospace", tooltip.style.webkitFontSmoothing = "none", tooltip.innerText = `${componentName2 || ""} ${dataAt} ${dataIn}`.trim(), overlay.appendChild(tooltip), node.appendChild(overlay);
181
+ } else overlay && node.removeChild(overlay);
124
182
  };
125
- return debugKeyListeners ||= /* @__PURE__ */ new Set(), debugKeyListeners.add(debugVisualizerHandler), () => {
183
+ return debugKeyListeners ||= /* @__PURE__ */new Set(), debugKeyListeners.add(debugVisualizerHandler), () => {
126
184
  debugKeyListeners?.delete(debugVisualizerHandler);
127
185
  };
128
186
  }, [componentName2]), !process.env.TAMAGUI_IS_CORE_NODE && process.env.NODE_ENV === "development" && debugProp === "profile" && !time && (time = require("@tamagui/timer").timer().start()), process.env.NODE_ENV === "development" && time && time`start (ignore)`, process.env.NODE_ENV === "development" && time && time`did-finish-ssr`, process.env.NODE_ENV === "development" && time && time`stateref`;
129
- const animationDriver = componentContext.animationDriver, useAnimations = animationDriver?.useAnimations, {
130
- curStateRef,
131
- disabled,
132
- groupName,
133
- hasAnimationProp,
134
- hasEnterStyle,
135
- isAnimated,
136
- isExiting,
137
- isHydrated,
138
- presence,
139
- presenceState,
140
- setState,
141
- setStateShallow,
142
- shouldAvoidClasses,
143
- state,
144
- stateRef,
145
- supportsCSSVars,
146
- willBeAnimated,
147
- willBeAnimatedClient
148
- } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config), shouldForcePseudo = !!propsIn.forceStyle, noClassNames = shouldAvoidClasses || shouldForcePseudo;
187
+ const animationDriver = componentContext.animationDriver,
188
+ useAnimations = animationDriver?.useAnimations,
189
+ {
190
+ curStateRef,
191
+ disabled,
192
+ groupName,
193
+ hasAnimationProp,
194
+ hasEnterStyle,
195
+ isAnimated,
196
+ isExiting,
197
+ isHydrated,
198
+ presence,
199
+ presenceState,
200
+ setState,
201
+ setStateShallow,
202
+ shouldAvoidClasses,
203
+ state,
204
+ stateRef,
205
+ supportsCSSVars,
206
+ willBeAnimated,
207
+ willBeAnimatedClient
208
+ } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config),
209
+ shouldForcePseudo = !!propsIn.forceStyle,
210
+ noClassNames = shouldAvoidClasses || shouldForcePseudo;
149
211
  process.env.NODE_ENV === "development" && time && time`use-state`;
150
212
  const hasTextAncestor = !!(import_constants.isWeb && isText && componentContext.inText);
151
213
  process.env.NODE_ENV === "development" && time && time`use-context`;
152
- const isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants.isWeb && isTaggable && tagProp || Component;
214
+ const isTaggable = !Component || typeof Component == "string",
215
+ tagProp = props.tag,
216
+ element = import_constants.isWeb && isTaggable && tagProp || Component;
153
217
  let elementType = isText ? BaseText || element || "span" : BaseView || element || (hasTextAncestor ? "span" : "div");
154
218
  animationDriver && isAnimated && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
155
219
  const disableTheme = props["data-disable-theme"] || isHOC;
@@ -161,17 +225,35 @@ function createComponent(staticConfig) {
161
225
  debug: debugProp
162
226
  };
163
227
  if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof curStateRef.isListeningToTheme == "boolean" && (themeStateProps.shouldUpdate = () => stateRef.current.isListeningToTheme), process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
164
- const name = `${componentName2 || Component?.displayName || Component?.name || "[Unnamed Component]"}`, type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (shouldAvoidClasses ? "(shouldAvoidClasses)" : " ") + (state.press || state.pressIn ? "(PRESSED)" : " ") + (state.hover ? "(HOVERED)" : " ") + (state.focus ? "(FOCUSED)" : " ") + (presenceState?.isPresent === !1 ? "(EXIT)" : ""), dataIs = propsIn["data-is"] || "", banner = `${internalID} ${name}${dataIs ? ` ${dataIs}` : ""} ${type}`;
165
- if (console.info(
166
- `%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`,
167
- "background: green; color: white;"
168
- ), import_constants.isServer)
169
- (0, import_log.log)({ noClassNames, isAnimated, shouldAvoidClasses, isWeb: import_constants.isWeb, supportsCSSVars });
170
- else {
228
+ const name = `${componentName2 || Component?.displayName || Component?.name || "[Unnamed Component]"}`,
229
+ type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (shouldAvoidClasses ? "(shouldAvoidClasses)" : " ") + (state.press || state.pressIn ? "(PRESSED)" : " ") + (state.hover ? "(HOVERED)" : " ") + (state.focus ? "(FOCUSED)" : " ") + (presenceState?.isPresent === !1 ? "(EXIT)" : ""),
230
+ dataIs = propsIn["data-is"] || "",
231
+ banner = `${internalID} ${name}${dataIs ? ` ${dataIs}` : ""} ${type}`;
232
+ if (console.info(`%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`, "background: green; color: white;"), import_constants.isServer) (0, import_log.log)({
233
+ noClassNames,
234
+ isAnimated,
235
+ shouldAvoidClasses,
236
+ isWeb: import_constants.isWeb,
237
+ supportsCSSVars
238
+ });else {
171
239
  console.groupEnd();
172
240
  const ch = propsIn.children;
173
241
  let childLog = typeof ch == "string" ? ch.length > 4 ? ch.slice(0, 4) + "..." : ch : "";
174
- childLog.length && (childLog = `(children: ${childLog})`), console.groupCollapsed(`${childLog} Props:`), (0, import_log.log)("props in:", propsIn), (0, import_log.log)("final props:", props), (0, import_log.log)({ state, staticConfig, elementType, themeStateProps }), (0, import_log.log)({ contextProps: styledContextProps, overriddenContextProps }), (0, import_log.log)({ presence, isAnimated, isHOC, hasAnimationProp, useAnimations }), console.groupEnd();
242
+ childLog.length && (childLog = `(children: ${childLog})`), console.groupCollapsed(`${childLog} Props:`), (0, import_log.log)("props in:", propsIn), (0, import_log.log)("final props:", props), (0, import_log.log)({
243
+ state,
244
+ staticConfig,
245
+ elementType,
246
+ themeStateProps
247
+ }), (0, import_log.log)({
248
+ contextProps: styledContextProps,
249
+ overriddenContextProps
250
+ }), (0, import_log.log)({
251
+ presence,
252
+ isAnimated,
253
+ isHOC,
254
+ hasAnimationProp,
255
+ useAnimations
256
+ }), console.groupEnd();
175
257
  }
176
258
  }
177
259
  process.env.NODE_ENV === "development" && time && time`pre-theme-media`;
@@ -181,70 +263,63 @@ function createComponent(staticConfig) {
181
263
  process.env.NODE_ENV === "development" && time && time`theme`;
182
264
  const mediaState = (0, import_useMedia.useMedia)(stateRef, componentContext, debugProp);
183
265
  (0, import_createVariable.setDidGetVariableValue)(!1), process.env.NODE_ENV === "development" && time && time`media`;
184
- const resolveValues = (
266
+ const resolveValues =
185
267
  // if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
186
- isAnimated && !supportsCSSVars || isHOC && state.unmounted == !1 && hasAnimationProp ? "value" : "auto"
187
- ), styleProps = {
188
- mediaState,
189
- noClassNames,
190
- resolveValues,
191
- isExiting,
192
- isAnimated,
193
- willBeAnimated,
194
- styledContextProps
195
- }, splitStyles = (0, import_getSplitStyles.useSplitStyles)(
196
- props,
197
- staticConfig,
198
- theme,
199
- themeState?.state?.name || "",
200
- state,
201
- styleProps,
202
- null,
203
- componentContext,
204
- elementType,
205
- debugProp
206
- );
268
+ isAnimated && !supportsCSSVars || isHOC && state.unmounted == !1 && hasAnimationProp ? "value" : "auto",
269
+ styleProps = {
270
+ mediaState,
271
+ noClassNames,
272
+ resolveValues,
273
+ isExiting,
274
+ isAnimated,
275
+ willBeAnimated,
276
+ styledContextProps
277
+ },
278
+ splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeState?.state?.name || "", state, styleProps, null, componentContext, elementType, debugProp);
207
279
  props.group && props.untilMeasured === "hide" && !curStateRef.hasMeasured && (splitStyles.style ||= {}, splitStyles.style.opacity = 0), process.env.NODE_ENV === "development" && time && time`split-styles`, curStateRef.isListeningToTheme = splitStyles.dynamicThemeAccess;
208
- const hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClassNames && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
280
+ const hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0,
281
+ shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClassNames && splitStyles.hasMedia === !0,
282
+ mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
209
283
  process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(stateRef, shouldListenForMedia, mediaListeningKeys);
210
284
  const {
211
- viewProps: viewPropsIn,
212
- pseudos,
213
- style: splitStylesStyle,
214
- classNames,
215
- space
216
- } = splitStyles, propsWithAnimation = props, {
217
- asChild,
218
- children,
219
- themeShallow,
220
- spaceDirection: _spaceDirection,
221
- onPress,
222
- onLongPress,
223
- onPressIn,
224
- onPressOut,
225
- onHoverIn,
226
- onHoverOut,
227
- onMouseUp,
228
- onMouseDown,
229
- onMouseEnter,
230
- onMouseLeave,
231
- onFocus,
232
- onBlur,
233
- separator,
234
- // ignore from here on out
235
- forceStyle: _forceStyle,
236
- // @ts-ignore for next/link compat etc
237
- onClick,
238
- theme: _themeProp,
239
- ...nonTamaguiProps
240
- } = viewPropsIn;
285
+ viewProps: viewPropsIn,
286
+ pseudos,
287
+ style: splitStylesStyle,
288
+ classNames,
289
+ space
290
+ } = splitStyles,
291
+ propsWithAnimation = props,
292
+ {
293
+ asChild,
294
+ children,
295
+ themeShallow,
296
+ spaceDirection: _spaceDirection,
297
+ onPress,
298
+ onLongPress,
299
+ onPressIn,
300
+ onPressOut,
301
+ onHoverIn,
302
+ onHoverOut,
303
+ onMouseUp,
304
+ onMouseDown,
305
+ onMouseEnter,
306
+ onMouseLeave,
307
+ onFocus,
308
+ onBlur,
309
+ separator,
310
+ // ignore from here on out
311
+ forceStyle: _forceStyle,
312
+ // @ts-ignore for next/link compat etc
313
+ onClick,
314
+ theme: _themeProp,
315
+ ...nonTamaguiProps
316
+ } = viewPropsIn;
241
317
  let viewProps = nonTamaguiProps;
242
318
  !isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
243
319
  let animationStyles;
244
320
  if (
245
- // if it supports css vars we run it on server too to get matching initial style
246
- (supportsCSSVars ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC
247
- ) {
321
+ // if it supports css vars we run it on server too to get matching initial style
322
+ (supportsCSSVars ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC) {
248
323
  const animations = useAnimations({
249
324
  props: propsWithAnimation,
250
325
  // if hydrating, send empty style
@@ -259,59 +334,55 @@ function createComponent(staticConfig) {
259
334
  });
260
335
  (isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`)), process.env.NODE_ENV === "development" && time && time`animations`;
261
336
  }
262
- process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(
263
- `You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
337
+ process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
264
338
 
265
- If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`
266
- ), process.env.NODE_ENV === "development" && time && time`destructure`, groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(
267
- nonTamaguiProps.onLayout,
268
- (e) => {
269
- stateRef.current.group.emit(groupName, {
270
- layout: e.nativeEvent.layout
271
- }), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState((prev) => ({ ...prev })), stateRef.current.hasMeasured = !0;
272
- }
273
- )), viewProps = import_setupHooks.hooks.usePropsTransform?.(
274
- elementType,
275
- nonTamaguiProps,
276
- stateRef,
277
- curStateRef.willHydrate
278
- ) || nonTamaguiProps, curStateRef.composedRef || (curStateRef.composedRef = (0, import_compose_refs.composeRefs)(
279
- (x) => stateRef.current.host = x,
280
- forwardedRef,
281
- import_setElementProps.setElementProps
282
- )), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react.default.Children.toArray(props.children).forEach((item) => {
339
+ If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time && time`destructure`, groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, e => {
340
+ stateRef.current.group.emit(groupName, {
341
+ layout: e.nativeEvent.layout
342
+ }), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(prev => ({
343
+ ...prev
344
+ })), stateRef.current.hasMeasured = !0;
345
+ })), viewProps = import_setupHooks.hooks.usePropsTransform?.(elementType, nonTamaguiProps, stateRef, curStateRef.willHydrate) || nonTamaguiProps, curStateRef.composedRef || (curStateRef.composedRef = (0, import_compose_refs.composeRefs)(x => stateRef.current.host = x, forwardedRef, import_setElementProps.setElementProps)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react.default.Children.toArray(props.children).forEach(item => {
283
346
  typeof item == "string" && item !== `
284
- ` && console.error(
285
- `Unexpected text node: ${item}. A text node cannot be a child of a <View>.`
286
- );
347
+ ` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`);
287
348
  }), process.env.NODE_ENV === "development" && time && time`events-hooks`;
288
- const { pseudoGroups, mediaGroups } = splitStyles, unPress = () => setStateShallow({ press: !1, pressIn: !1 });
349
+ const {
350
+ pseudoGroups,
351
+ mediaGroups
352
+ } = splitStyles,
353
+ unPress = () => setStateShallow({
354
+ press: !1,
355
+ pressIn: !1
356
+ });
289
357
  process.env.NODE_ENV === "development" && import_constants.isWeb && (0, import_constants.useIsomorphicLayoutEffect)(() => {
290
358
  if (debugProp === "verbose") {
291
- const computed = function(style) {
359
+ const computed = function (style) {
292
360
  const styleObject = {};
293
361
  for (let i = 0; i < style.length; i++) {
294
362
  let prop = style[i];
295
363
  styleObject[prop] = style.getPropertyValue(prop);
296
364
  }
297
365
  return styleObject;
298
- }(
299
- getComputedStyle(stateRef.current.host)
300
- );
366
+ }(getComputedStyle(stateRef.current.host));
301
367
  console.groupCollapsed(`Rendered > (opacity: ${computed.opacity})`), console.warn(stateRef.current.host), console.warn(computed), console.groupEnd();
302
368
  }
303
369
  }), import_react.default.useEffect(() => {
304
- if (disabled)
305
- return;
370
+ if (disabled) return;
306
371
  if (state.unmounted === !0 && hasEnterStyle) {
307
- setStateShallow({ unmounted: "should-enter" });
372
+ setStateShallow({
373
+ unmounted: "should-enter"
374
+ });
308
375
  return;
309
376
  }
310
377
  let tm;
311
378
  if (state.unmounted) {
312
379
  animationDriver?.supportsCSSVars ? tm = setTimeout(() => {
313
- setStateShallow({ unmounted: !1 });
314
- }) : setStateShallow({ unmounted: !1 });
380
+ setStateShallow({
381
+ unmounted: !1
382
+ });
383
+ }) : setStateShallow({
384
+ unmounted: !1
385
+ });
315
386
  return;
316
387
  }
317
388
  const dispose = (0, import_subscribeToContextGroup.subscribeToContextGroup)({
@@ -325,13 +396,17 @@ If you meant to do this, you can disable this warning - either change untilMeasu
325
396
  return () => {
326
397
  clearTimeout(tm), dispose?.(), componentSetStates.delete(setState);
327
398
  };
328
- }, [
329
- state.unmounted,
330
- disabled,
331
- pseudoGroups ? Object.keys([...pseudoGroups]).join("") : 0,
332
- mediaGroups ? Object.keys([...mediaGroups]).join("") : 0
333
- ]);
334
- const runtimePressStyle = !disabled && noClassNames && pseudos?.pressStyle, runtimeFocusStyle = !disabled && noClassNames && pseudos?.focusStyle, runtimeFocusVisibleStyle = !disabled && noClassNames && pseudos?.focusVisibleStyle, attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos?.focusVisibleStyle), runtimeHoverStyle = !disabled && noClassNames && pseudos?.hoverStyle, needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimePressStyle);
399
+ }, [state.unmounted, disabled, pseudoGroups ? Object.keys([...pseudoGroups]).join("") : 0, mediaGroups ? Object.keys([...mediaGroups]).join("") : 0]);
400
+ const runtimePressStyle = !disabled && noClassNames && pseudos?.pressStyle,
401
+ runtimeFocusStyle = !disabled && noClassNames && pseudos?.focusStyle,
402
+ runtimeFocusVisibleStyle = !disabled && noClassNames && pseudos?.focusVisibleStyle,
403
+ attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur),
404
+ attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos?.focusVisibleStyle),
405
+ runtimeHoverStyle = !disabled && noClassNames && pseudos?.hoverStyle,
406
+ needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut),
407
+ attachHover = import_constants.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave),
408
+ shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle),
409
+ needsPressState = !!(groupName || runtimePressStyle);
335
410
  process.env.NODE_ENV === "development" && time && time`events-setup`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("\u{1FAA9} events()", {
336
411
  runtimeFocusStyle,
337
412
  runtimePressStyle,
@@ -344,30 +419,30 @@ If you meant to do this, you can disable this warning - either change untilMeasu
344
419
  needsHoverState
345
420
  });
346
421
  const events = shouldAttach ? {
347
- onPressOut: attachPress ? (e) => {
422
+ onPressOut: attachPress ? e => {
348
423
  unPress(), onPressOut?.(e), onMouseUp?.(e);
349
424
  } : void 0,
350
- ...(attachHover || attachPress) && {
351
- onMouseEnter: (e) => {
425
+ ...((attachHover || attachPress) && {
426
+ onMouseEnter: e => {
352
427
  const next = {};
353
428
  needsHoverState && (next.hover = !0), needsPressState && state.pressIn && (next.press = !0), setStateShallow(next), onHoverIn?.(e), onMouseEnter?.(e);
354
429
  },
355
- onMouseLeave: (e) => {
430
+ onMouseLeave: e => {
356
431
  const next = {};
357
432
  needsHoverState && (next.hover = !1), needsPressState && state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut?.(e), onMouseLeave?.(e);
358
433
  }
359
- },
360
- onPressIn: attachPress ? (e) => {
434
+ }),
435
+ onPressIn: attachPress ? e => {
361
436
  (runtimePressStyle || groupName) && setStateShallow({
362
437
  press: !0,
363
438
  pressIn: !0
364
439
  }), onPressIn?.(e), onMouseDown?.(e), import_constants.isWeb && componentSetStates.add(setState);
365
440
  } : void 0,
366
- onPress: attachPress ? (e) => {
441
+ onPress: attachPress ? e => {
367
442
  unPress(), import_constants.isWeb && onClick?.(e), onPress?.(e), onLongPress?.(e);
368
443
  } : void 0,
369
- ...attachFocus && {
370
- onFocus: (e) => {
444
+ ...(attachFocus && {
445
+ onFocus: e => {
371
446
  pseudos?.focusVisibleStyle ? setTimeout(() => {
372
447
  setStateShallow({
373
448
  focus: !0,
@@ -378,15 +453,19 @@ If you meant to do this, you can disable this warning - either change untilMeasu
378
453
  focusVisible: !1
379
454
  }), onFocus?.(e);
380
455
  },
381
- onBlur: (e) => {
456
+ onBlur: e => {
382
457
  setStateShallow({
383
458
  focus: !1,
384
459
  focusVisible: !1
385
460
  }), onBlur?.(e);
386
461
  }
387
- }
462
+ })
388
463
  } : null;
389
- events && !isReactNative && Object.assign(viewProps, getWebEvents(events)), process.env.NODE_ENV === "development" && time && time`events`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("events", { events, attachHover, attachPress }), import_setupHooks.hooks.useEvents?.(viewProps, events, splitStyles, setStateShallow, staticConfig);
464
+ events && !isReactNative && Object.assign(viewProps, getWebEvents(events)), process.env.NODE_ENV === "development" && time && time`events`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("events", {
465
+ events,
466
+ attachHover,
467
+ attachPress
468
+ }), import_setupHooks.hooks.useEvents?.(viewProps, events, splitStyles, setStateShallow, staticConfig);
390
469
  const direction = props.spaceDirection || "both";
391
470
  process.env.NODE_ENV === "development" && time && time`hooks`;
392
471
  let content = !children || asChild ? children : spacedChildren({
@@ -400,36 +479,29 @@ If you meant to do this, you can disable this warning - either change untilMeasu
400
479
  if (asChild) {
401
480
  elementType = import_Slot.Slot;
402
481
  {
403
- const passEvents = getWebEvents(
404
- {
405
- onPress,
406
- onLongPress,
407
- onPressIn,
408
- onPressOut,
409
- onMouseUp,
410
- onMouseDown,
411
- onMouseEnter,
412
- onMouseLeave
413
- },
414
- asChild === "web" || asChild === "except-style-web"
415
- );
482
+ const passEvents = getWebEvents({
483
+ onPress,
484
+ onLongPress,
485
+ onPressIn,
486
+ onPressOut,
487
+ onMouseUp,
488
+ onMouseDown,
489
+ onMouseEnter,
490
+ onMouseLeave
491
+ }, asChild === "web" || asChild === "except-style-web");
416
492
  Object.assign(viewProps, passEvents);
417
493
  }
418
494
  }
419
495
  process.env.NODE_ENV === "development" && time && time`spaced-as-child`;
420
496
  let useChildrenResult;
421
- import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(
422
- elementType,
423
- content,
424
- viewProps,
425
- events,
426
- staticConfig
427
- )), useChildrenResult ? content = useChildrenResult : content = import_react.default.createElement(elementType, viewProps, content);
497
+ import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps, events, staticConfig)), useChildrenResult ? content = useChildrenResult : content = import_react.default.createElement(elementType, viewProps, content);
428
498
  const ResetPresence = config?.animations?.ResetPresence;
429
- ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResetPresence, { children: content })), process.env.NODE_ENV === "development" && time && time`create-element`;
430
- const groupState = curStateRef.group, subGroupContext = import_react.default.useMemo(() => {
431
- if (!(!groupState || !groupName))
432
- return groupState.listeners.clear(), {
499
+ ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */(0, import_jsx_runtime.jsx)(ResetPresence, {
500
+ children: content
501
+ })), process.env.NODE_ENV === "development" && time && time`create-element`;
502
+ const groupState = curStateRef.group,
503
+ subGroupContext = import_react.default.useMemo(() => {
504
+ if (!(!groupState || !groupName)) return groupState.listeners.clear(), {
433
505
  ...componentContext.groups,
434
506
  // change reference so as we mutate it doesn't affect siblings etc
435
507
  state: {
@@ -447,24 +519,34 @@ If you meant to do this, you can disable this warning - either change untilMeasu
447
519
  emit: groupState.emit,
448
520
  subscribe: groupState.subscribe
449
521
  };
450
- }, [groupName]);
451
- if (groupName && subGroupContext && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, { ...componentContext, groups: subGroupContext, children: content })), process.env.NODE_ENV === "development" && time && time`group-context`, content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), process.env.NODE_ENV === "development" && time && time`themed-children`, process.env.NODE_ENV === "development" && props.debug === "visualize" && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeDebug.ThemeDebug, { themeState, themeProps: props, children: content })), isReactNative && !asChild && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
452
- "span",
453
- {
454
- className: "_dsp_contents",
455
- ...isHydrated && events && getWebEvents(events),
456
- children: content
457
- }
458
- )), staticConfig.context) {
522
+ }, [groupName]);
523
+ if (groupName && subGroupContext && (content = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {
524
+ ...componentContext,
525
+ groups: subGroupContext,
526
+ children: content
527
+ })), process.env.NODE_ENV === "development" && time && time`group-context`, content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), process.env.NODE_ENV === "development" && time && time`themed-children`, process.env.NODE_ENV === "development" && props.debug === "visualize" && (content = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_ThemeDebug.ThemeDebug, {
528
+ themeState,
529
+ themeProps: props,
530
+ children: content
531
+ })), isReactNative && !asChild && (content = /* @__PURE__ */(0, import_jsx_runtime.jsx)("span", {
532
+ className: "_dsp_contents",
533
+ ...(isHydrated && events && getWebEvents(events)),
534
+ children: content
535
+ })), staticConfig.context) {
459
536
  const contextProps = staticConfig.context.props;
460
- for (const key in contextProps)
461
- (viewProps.style && key in viewProps.style || key in viewProps) && (overriddenContextProps ||= {}, overriddenContextProps[key] = viewProps.style?.[key] ?? viewProps[key]);
537
+ for (const key in contextProps) (viewProps.style && key in viewProps.style || key in viewProps) && (overriddenContextProps ||= {}, overriddenContextProps[key] = viewProps.style?.[key] ?? viewProps[key]);
462
538
  }
463
539
  if (overriddenContextProps) {
464
540
  const Provider = staticConfig.context.Provider;
465
- content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Provider, { ...contextValue, ...overriddenContextProps, children: content });
541
+ content = /* @__PURE__ */(0, import_jsx_runtime.jsx)(Provider, {
542
+ ...contextValue,
543
+ ...overriddenContextProps,
544
+ children: content
545
+ });
466
546
  }
467
- const { rulesToInsert } = splitStyles;
547
+ const {
548
+ rulesToInsert
549
+ } = splitStyles;
468
550
  if (process.env.TAMAGUI_REACT_19 && (content = (0, import_wrapStyleTags.wrapStyleTags)(Object.values(rulesToInsert), content)), process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
469
551
  const title = `render <${typeof elementType == "string" ? elementType : "Component"} /> (${internalID}) with props`;
470
552
  if (import_constants.isWeb) {
@@ -499,17 +581,14 @@ If you meant to do this, you can disable this warning - either change untilMeasu
499
581
  viewProps,
500
582
  willBeAnimated
501
583
  });
502
- } catch {
503
- } finally {
584
+ } catch {} finally {
504
585
  console.groupEnd();
505
586
  }
506
587
  } else {
507
588
  (0, import_log.log)(title), (0, import_log.log)("state: ", state), import_isDevTools.isDevTools && (0, import_log.log)("viewProps", viewProps), (0, import_log.log)("final styles:");
508
- for (const key in splitStylesStyle)
509
- (0, import_log.log)(key, splitStylesStyle[key]);
589
+ for (const key in splitStylesStyle) (0, import_log.log)(key, splitStylesStyle[key]);
510
590
  }
511
- if (debugProp === "break")
512
- debugger;
591
+ if (debugProp === "break") debugger;
513
592
  }
514
593
  return process.env.NODE_ENV === "development" && time && (time`rest`, globalThis.willPrint || (globalThis.willPrint = !0, setTimeout(() => {
515
594
  delete globalThis.willPrint, time.print(), time = null;
@@ -554,56 +633,68 @@ function Unspaced(props) {
554
633
  return props.children;
555
634
  }
556
635
  Unspaced.isUnspaced = !0;
557
- const getSpacerSize = (size, { tokens }) => {
558
- size = size === !0 ? "$true" : size;
559
- const sizePx = tokens.space[size] ?? size;
560
- return {
561
- width: sizePx,
562
- height: sizePx,
563
- minWidth: sizePx,
564
- minHeight: sizePx
565
- };
566
- }, Spacer = createComponent({
567
- acceptsClassName: !0,
568
- memo: !0,
569
- componentName: "Spacer",
570
- validStyles: import_helpers.validStyles,
571
- defaultProps: {
572
- ...import_constants2.stackDefaultStyles,
573
- // avoid nesting issues
574
- tag: "span",
575
- size: !0,
576
- pointerEvents: "none"
636
+ const getSpacerSize = (size, {
637
+ tokens
638
+ }) => {
639
+ size = size === !0 ? "$true" : size;
640
+ const sizePx = tokens.space[size] ?? size;
641
+ return {
642
+ width: sizePx,
643
+ height: sizePx,
644
+ minWidth: sizePx,
645
+ minHeight: sizePx
646
+ };
577
647
  },
578
- variants: {
579
- size: {
580
- "...": getSpacerSize
581
- },
582
- flex: {
583
- true: {
584
- flexGrow: 1
585
- }
648
+ Spacer = createComponent({
649
+ acceptsClassName: !0,
650
+ memo: !0,
651
+ componentName: "Spacer",
652
+ validStyles: import_helpers.validStyles,
653
+ defaultProps: {
654
+ ...import_constants2.stackDefaultStyles,
655
+ // avoid nesting issues
656
+ tag: "span",
657
+ size: !0,
658
+ pointerEvents: "none"
586
659
  },
587
- direction: {
588
- horizontal: {
589
- height: 0,
590
- minHeight: 0
660
+ variants: {
661
+ size: {
662
+ "...": getSpacerSize
591
663
  },
592
- vertical: {
593
- width: 0,
594
- minWidth: 0
664
+ flex: {
665
+ true: {
666
+ flexGrow: 1
667
+ }
595
668
  },
596
- both: {}
669
+ direction: {
670
+ horizontal: {
671
+ height: 0,
672
+ minHeight: 0
673
+ },
674
+ vertical: {
675
+ width: 0,
676
+ minWidth: 0
677
+ },
678
+ both: {}
679
+ }
597
680
  }
598
- }
599
- });
681
+ });
600
682
  function spacedChildren(props) {
601
- const { isZStack, children, space, direction, spaceFlex, separator, ensureKeys } = props, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null, areChildrenArray = Array.isArray(children);
602
- if (!ensureKeys && !(hasSpace || hasSeparator || isZStack))
603
- return children;
683
+ const {
684
+ isZStack,
685
+ children,
686
+ space,
687
+ direction,
688
+ spaceFlex,
689
+ separator,
690
+ ensureKeys
691
+ } = props,
692
+ hasSpace = !!(space || spaceFlex),
693
+ hasSeparator = separator != null,
694
+ areChildrenArray = Array.isArray(children);
695
+ if (!ensureKeys && !(hasSpace || hasSeparator || isZStack)) return children;
604
696
  const childrenList = areChildrenArray ? children : import_react.default.Children.toArray(children);
605
- if (childrenList.length <= 1 && !isZStack && !childrenList[0]?.type?.shouldForwardSpace)
606
- return children;
697
+ if (childrenList.length <= 1 && !isZStack && !childrenList[0]?.type?.shouldForwardSpace) return children;
607
698
  const final = [];
608
699
  for (let [index, child] of childrenList.entries()) {
609
700
  const isEmpty = child == null || Array.isArray(child) && child.length === 0;
@@ -612,62 +703,61 @@ function spacedChildren(props) {
612
703
  spaceFlex,
613
704
  separator,
614
705
  key: child.key
615
- })), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(
616
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AbsoluteFill, { children: child }) : child }, `${index}0t`)
617
- ), isUnspaced(child) && index === 0 || isZStack) continue;
706
+ })), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.default.Fragment, {
707
+ children: isZStack ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(AbsoluteFill, {
708
+ children: child
709
+ }) : child
710
+ }, `${index}0t`)), isUnspaced(child) && index === 0 || isZStack) continue;
618
711
  const next = childrenList[index + 1];
619
- next && !isEmpty && !isUnspaced(next) && (separator ? (hasSpace && final.push(
620
- createSpacer({
621
- key: `_${index}_00t`,
622
- direction,
623
- space,
624
- spaceFlex
625
- })
626
- ), final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: separator }, `${index}03t`)), hasSpace && final.push(
627
- createSpacer({
628
- key: `_${index}01t`,
629
- direction,
630
- space,
631
- spaceFlex
632
- })
633
- )) : final.push(
634
- createSpacer({
635
- key: `_${index}02t`,
636
- direction,
637
- space,
638
- spaceFlex
639
- })
640
- ));
712
+ next && !isEmpty && !isUnspaced(next) && (separator ? (hasSpace && final.push(createSpacer({
713
+ key: `_${index}_00t`,
714
+ direction,
715
+ space,
716
+ spaceFlex
717
+ })), final.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.default.Fragment, {
718
+ children: separator
719
+ }, `${index}03t`)), hasSpace && final.push(createSpacer({
720
+ key: `_${index}01t`,
721
+ direction,
722
+ space,
723
+ spaceFlex
724
+ }))) : final.push(createSpacer({
725
+ key: `_${index}02t`,
726
+ direction,
727
+ space,
728
+ spaceFlex
729
+ })));
641
730
  }
642
731
  return process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)(" Spaced children", final, props), final;
643
732
  }
644
- function createSpacer({ key, direction, space, spaceFlex }) {
645
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
646
- Spacer,
647
- {
648
- size: space,
649
- direction,
650
- ...typeof spaceFlex < "u" && {
651
- flex: spaceFlex === !0 ? 1 : spaceFlex === !1 ? 0 : spaceFlex
652
- }
653
- },
654
- key
655
- );
733
+ function createSpacer({
734
+ key,
735
+ direction,
736
+ space,
737
+ spaceFlex
738
+ }) {
739
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Spacer, {
740
+ size: space,
741
+ direction,
742
+ ...(typeof spaceFlex < "u" && {
743
+ flex: spaceFlex === !0 ? 1 : spaceFlex === !1 ? 0 : spaceFlex
744
+ })
745
+ }, key);
656
746
  }
657
747
  function isUnspaced(child) {
658
748
  const t = child?.type;
659
749
  return t?.isVisuallyHidden || t?.isUnspaced;
660
750
  }
661
751
  const AbsoluteFill = createComponent({
662
- defaultProps: {
663
- ...import_constants2.stackDefaultStyles,
664
- flexDirection: "column",
665
- position: "absolute",
666
- top: 0,
667
- right: 0,
668
- bottom: 0,
669
- left: 0,
670
- pointerEvents: "box-none"
671
- }
672
- }), fromPx = (val) => typeof val != "string" ? val : +val.replace("px", "");
673
- //# sourceMappingURL=createComponent.js.map
752
+ defaultProps: {
753
+ ...import_constants2.stackDefaultStyles,
754
+ flexDirection: "column",
755
+ position: "absolute",
756
+ top: 0,
757
+ right: 0,
758
+ bottom: 0,
759
+ left: 0,
760
+ pointerEvents: "box-none"
761
+ }
762
+ }),
763
+ fromPx = val => typeof val != "string" ? val : +val.replace("px", "");