@tamagui/web 1.88.13 → 1.88.15

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 (311) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/createComponent.js +2 -2
  3. package/dist/cjs/createComponent.js.map +1 -1
  4. package/dist/cjs/createComponent.native.js +1 -1
  5. package/dist/cjs/createComponent.native.js.map +1 -1
  6. package/dist/cjs/createTamagui.js.map +1 -1
  7. package/dist/cjs/createTamagui.native.js.map +1 -1
  8. package/dist/cjs/createVariables.js.map +1 -1
  9. package/dist/cjs/createVariables.native.js.map +1 -1
  10. package/dist/cjs/helpers/getSplitStyles.js +15 -19
  11. package/dist/cjs/helpers/getSplitStyles.js.map +1 -1
  12. package/dist/cjs/helpers/getSplitStyles.native.js +12 -18
  13. package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
  14. package/dist/cjs/helpers/getStylesAtomic.js.map +1 -1
  15. package/dist/cjs/helpers/getThemeCSSRules.js.map +1 -1
  16. package/dist/cjs/helpers/insertStyleRule.js +3 -3
  17. package/dist/cjs/helpers/insertStyleRule.js.map +1 -1
  18. package/dist/cjs/helpers/insertStyleRule.native.js +3 -3
  19. package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
  20. package/dist/cjs/helpers/propMapper.js.map +1 -1
  21. package/dist/cjs/helpers/propMapper.native.js.map +1 -1
  22. package/dist/cjs/helpers/registerCSSVariable.js.map +1 -1
  23. package/dist/cjs/helpers/registerCSSVariable.native.js.map +1 -1
  24. package/dist/cjs/hooks/getThemeProxied.js +66 -0
  25. package/dist/cjs/hooks/getThemeProxied.js.map +6 -0
  26. package/dist/cjs/hooks/getThemeProxied.native.js +100 -0
  27. package/dist/cjs/hooks/getThemeProxied.native.js.map +6 -0
  28. package/dist/cjs/hooks/useTheme.js.map +1 -1
  29. package/dist/cjs/hooks/useTheme.native.js.map +1 -1
  30. package/dist/cjs/insertFont.js.map +1 -1
  31. package/dist/cjs/insertFont.native.js.map +1 -1
  32. package/dist/cjs/setupHooks.js.map +1 -1
  33. package/dist/cjs/setupHooks.native.js.map +1 -1
  34. package/dist/cjs/views/FontLanguage.native.js.map +1 -1
  35. package/dist/cjs/views/Slot.js.map +1 -1
  36. package/dist/cjs/views/Slot.native.js.map +1 -1
  37. package/dist/cjs/views/TamaguiProvider.js +5 -5
  38. package/dist/cjs/views/TamaguiProvider.js.map +1 -1
  39. package/dist/cjs/views/TamaguiProvider.native.js +5 -5
  40. package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
  41. package/dist/cjs/views/Theme.js.map +1 -1
  42. package/dist/cjs/views/Theme.native.js.map +1 -1
  43. package/dist/esm/Tamagui.mjs +43 -0
  44. package/dist/esm/config.mjs +51 -0
  45. package/dist/esm/constants/accessibilityDirectMap.mjs +50 -0
  46. package/dist/esm/constants/constants.mjs +16 -0
  47. package/dist/esm/constants/isDevTools.mjs +7 -0
  48. package/dist/esm/contexts/ComponentContext.mjs +13 -0
  49. package/dist/esm/createComponent.js +2 -2
  50. package/dist/esm/createComponent.js.map +1 -1
  51. package/dist/esm/createComponent.mjs +771 -0
  52. package/dist/esm/createComponent.native.js +1 -1
  53. package/dist/esm/createComponent.native.js.map +1 -1
  54. package/dist/esm/createFont.mjs +18 -0
  55. package/dist/esm/createShorthands.mjs +4 -0
  56. package/dist/esm/createTamagui.js.map +1 -1
  57. package/dist/esm/createTamagui.mjs +206 -0
  58. package/dist/esm/createTamagui.native.js.map +1 -1
  59. package/dist/esm/createTheme.mjs +2 -0
  60. package/dist/esm/createTokens.mjs +5 -0
  61. package/dist/esm/createVariable.mjs +48 -0
  62. package/dist/esm/createVariables.js.map +1 -1
  63. package/dist/esm/createVariables.mjs +35 -0
  64. package/dist/esm/createVariables.native.js.map +1 -1
  65. package/dist/esm/defaultComponentState.mjs +16 -0
  66. package/dist/esm/helpers/ThemeManager.mjs +156 -0
  67. package/dist/esm/helpers/ThemeManagerContext.mjs +3 -0
  68. package/dist/esm/helpers/createMediaStyle.mjs +71 -0
  69. package/dist/esm/helpers/createShallowSetState.mjs +17 -0
  70. package/dist/esm/helpers/createStyledContext.mjs +35 -0
  71. package/dist/esm/helpers/defaultOffset.mjs +5 -0
  72. package/dist/esm/helpers/expandStyle.mjs +38 -0
  73. package/dist/esm/helpers/expandStyles.mjs +15 -0
  74. package/dist/esm/helpers/getExpandedShorthands.mjs +9 -0
  75. package/dist/esm/helpers/getFontLanguage.mjs +2 -0
  76. package/dist/esm/helpers/getGroupPropParts.mjs +13 -0
  77. package/dist/esm/helpers/getSplitStyles.js +15 -18
  78. package/dist/esm/helpers/getSplitStyles.js.map +1 -1
  79. package/dist/esm/helpers/getSplitStyles.mjs +638 -0
  80. package/dist/esm/helpers/getSplitStyles.native.js +12 -18
  81. package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
  82. package/dist/esm/helpers/getStylesAtomic.js +1 -4
  83. package/dist/esm/helpers/getStylesAtomic.js.map +1 -1
  84. package/dist/esm/helpers/getStylesAtomic.mjs +150 -0
  85. package/dist/esm/helpers/getThemeCSSRules.js.map +1 -1
  86. package/dist/esm/helpers/getThemeCSSRules.mjs +87 -0
  87. package/dist/esm/helpers/getVariantExtras.mjs +43 -0
  88. package/dist/esm/helpers/insertStyleRule.js +3 -3
  89. package/dist/esm/helpers/insertStyleRule.js.map +1 -1
  90. package/dist/esm/helpers/insertStyleRule.mjs +177 -0
  91. package/dist/esm/helpers/insertStyleRule.native.js +3 -3
  92. package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
  93. package/dist/esm/helpers/isObj.mjs +2 -0
  94. package/dist/esm/helpers/isTamaguiComponent.mjs +5 -0
  95. package/dist/esm/helpers/isTamaguiElement.mjs +4 -0
  96. package/dist/esm/helpers/log.mjs +4 -0
  97. package/dist/esm/helpers/matchMedia.mjs +11 -0
  98. package/dist/esm/helpers/mergeProps.mjs +21 -0
  99. package/dist/esm/helpers/mergeVariants.mjs +16 -0
  100. package/dist/esm/helpers/normalizeColor.mjs +17 -0
  101. package/dist/esm/helpers/normalizeShadow.mjs +23 -0
  102. package/dist/esm/helpers/normalizeStyle.mjs +23 -0
  103. package/dist/esm/helpers/normalizeStylePropKeys.mjs +2 -0
  104. package/dist/esm/helpers/normalizeValueWithProperty.mjs +32 -0
  105. package/dist/esm/helpers/objectIdentityKey.mjs +15 -0
  106. package/dist/esm/helpers/propMapper.js.map +1 -1
  107. package/dist/esm/helpers/propMapper.mjs +239 -0
  108. package/dist/esm/helpers/propMapper.native.js.map +1 -1
  109. package/dist/esm/helpers/proxyThemeToParents.mjs +36 -0
  110. package/dist/esm/helpers/proxyThemeVariables.mjs +12 -0
  111. package/dist/esm/helpers/pseudoDescriptors.mjs +34 -0
  112. package/dist/esm/helpers/registerCSSVariable.js.map +1 -1
  113. package/dist/esm/helpers/registerCSSVariable.mjs +7 -0
  114. package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
  115. package/dist/esm/helpers/themeable.mjs +33 -0
  116. package/dist/esm/helpers/themes.mjs +14 -0
  117. package/dist/esm/helpers/timer.mjs +8 -0
  118. package/dist/esm/hooks/getThemeProxied.js +52 -0
  119. package/dist/esm/hooks/getThemeProxied.js.map +6 -0
  120. package/dist/esm/hooks/getThemeProxied.mjs +41 -0
  121. package/dist/esm/hooks/getThemeProxied.native.js +100 -0
  122. package/dist/esm/hooks/getThemeProxied.native.js.map +6 -0
  123. package/dist/esm/hooks/useConfiguration.mjs +20 -0
  124. package/dist/esm/hooks/useDisableSSR.mjs +5 -0
  125. package/dist/esm/hooks/useIsTouchDevice.mjs +4 -0
  126. package/dist/esm/hooks/useMedia.mjs +146 -0
  127. package/dist/esm/hooks/useProps.mjs +40 -0
  128. package/dist/esm/hooks/useTheme.js +1 -4
  129. package/dist/esm/hooks/useTheme.js.map +1 -1
  130. package/dist/esm/hooks/useTheme.mjs +222 -0
  131. package/dist/esm/hooks/useTheme.native.js.map +1 -1
  132. package/dist/esm/hooks/useThemeName.mjs +15 -0
  133. package/dist/esm/index.mjs +61 -0
  134. package/dist/esm/inject-styles.mjs +13 -0
  135. package/dist/esm/insertFont.js.map +1 -1
  136. package/dist/esm/insertFont.mjs +44 -0
  137. package/dist/esm/insertFont.native.js.map +1 -1
  138. package/dist/esm/interfaces/CSSColorNames.mjs +0 -0
  139. package/dist/esm/interfaces/GetRef.mjs +0 -0
  140. package/dist/esm/interfaces/KeyTypes.mjs +0 -0
  141. package/dist/esm/interfaces/RNExclusiveTypes.mjs +0 -0
  142. package/dist/esm/interfaces/Role.mjs +0 -0
  143. package/dist/esm/interfaces/TamaguiComponentEvents.mjs +0 -0
  144. package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.mjs +0 -0
  145. package/dist/esm/interfaces/TamaguiComponentState.mjs +0 -0
  146. package/dist/esm/interfaces/WebOnlyPressEvents.mjs +0 -0
  147. package/dist/esm/internalWithTheme.mjs +14 -0
  148. package/dist/esm/setupHooks.js.map +1 -1
  149. package/dist/esm/setupHooks.mjs +5 -0
  150. package/dist/esm/setupHooks.native.js.map +1 -1
  151. package/dist/esm/setupReactNative.mjs +24 -0
  152. package/dist/esm/styled.mjs +56 -0
  153. package/dist/esm/type-utils.mjs +0 -0
  154. package/dist/esm/types.mjs +2 -0
  155. package/dist/esm/views/Configuration.mjs +12 -0
  156. package/dist/esm/views/FontLanguage.mjs +13 -0
  157. package/dist/esm/views/FontLanguage.native.js.map +1 -1
  158. package/dist/esm/views/FontLanguage.types.mjs +0 -0
  159. package/dist/esm/views/Slot.js.map +1 -1
  160. package/dist/esm/views/Slot.mjs +53 -0
  161. package/dist/esm/views/Slot.native.js.map +1 -1
  162. package/dist/esm/views/Stack.mjs +10 -0
  163. package/dist/esm/views/TamaguiProvider.js +5 -5
  164. package/dist/esm/views/TamaguiProvider.js.map +1 -1
  165. package/dist/esm/views/TamaguiProvider.mjs +32 -0
  166. package/dist/esm/views/TamaguiProvider.native.js +5 -5
  167. package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
  168. package/dist/esm/views/Text.mjs +64 -0
  169. package/dist/esm/views/Theme.js.map +1 -1
  170. package/dist/esm/views/Theme.mjs +104 -0
  171. package/dist/esm/views/Theme.native.js.map +1 -1
  172. package/dist/esm/views/ThemeDebug.mjs +57 -0
  173. package/dist/esm/views/ThemeProvider.mjs +20 -0
  174. package/dist/esm/views/View.mjs +9 -0
  175. package/package.json +11 -11
  176. package/src/config.ts +1 -1
  177. package/src/contexts/ComponentContext.tsx +1 -1
  178. package/src/createComponent.tsx +7 -5
  179. package/src/createFont.ts +1 -1
  180. package/src/createShorthands.ts +1 -1
  181. package/src/createTamagui.ts +4 -3
  182. package/src/createTokens.ts +2 -2
  183. package/src/createVariables.ts +2 -1
  184. package/src/defaultComponentState.tsx +1 -1
  185. package/src/helpers/ThemeManager.tsx +1 -1
  186. package/src/helpers/createShallowSetState.tsx +2 -2
  187. package/src/helpers/expandStyle.ts +1 -1
  188. package/src/helpers/getExpandedShorthands.ts +1 -1
  189. package/src/helpers/getSplitStyles.tsx +33 -26
  190. package/src/helpers/getStylesAtomic.ts +4 -6
  191. package/src/helpers/getThemeCSSRules.ts +2 -1
  192. package/src/helpers/getVariantExtras.tsx +2 -2
  193. package/src/helpers/insertStyleRule.tsx +8 -3
  194. package/src/helpers/isTamaguiComponent.tsx +1 -1
  195. package/src/helpers/isTamaguiElement.tsx +1 -1
  196. package/src/helpers/matchMedia.native.ts +1 -1
  197. package/src/helpers/matchMedia.ts +1 -1
  198. package/src/helpers/propMapper.ts +2 -1
  199. package/src/helpers/proxyThemeToParents.ts +1 -1
  200. package/src/helpers/registerCSSVariable.ts +3 -2
  201. package/src/helpers/themeable.tsx +1 -1
  202. package/src/hooks/useDisableSSR.tsx +1 -1
  203. package/src/hooks/useProps.tsx +1 -1
  204. package/src/hooks/useTheme.tsx +4 -6
  205. package/src/hooks/useThemeName.tsx +1 -1
  206. package/src/insertFont.ts +4 -3
  207. package/src/interfaces/GetRef.tsx +2 -2
  208. package/src/interfaces/TamaguiComponentPropsBaseBase.tsx +2 -2
  209. package/src/interfaces/TamaguiComponentState.tsx +1 -1
  210. package/src/interfaces/WebOnlyPressEvents.tsx +1 -1
  211. package/src/setupHooks.ts +4 -8
  212. package/src/setupReactNative.ts +1 -1
  213. package/src/styled.tsx +1 -1
  214. package/src/types.tsx +9 -9
  215. package/src/views/FontLanguage.native.tsx +0 -1
  216. package/src/views/FontLanguage.types.ts +2 -2
  217. package/src/views/Slot.tsx +2 -1
  218. package/src/views/TamaguiProvider.tsx +8 -5
  219. package/src/views/Text.tsx +1 -1
  220. package/src/views/Theme.tsx +2 -1
  221. package/src/views/ThemeDebug.native.tsx +2 -2
  222. package/src/views/ThemeDebug.tsx +2 -2
  223. package/types/config.d.ts +1 -1
  224. package/types/config.d.ts.map +1 -1
  225. package/types/contexts/ComponentContext.d.ts +1 -1
  226. package/types/contexts/ComponentContext.d.ts.map +1 -1
  227. package/types/createComponent.d.ts +1 -1
  228. package/types/createComponent.d.ts.map +1 -1
  229. package/types/createFont.d.ts +1 -1
  230. package/types/createFont.d.ts.map +1 -1
  231. package/types/createShorthands.d.ts +1 -1
  232. package/types/createShorthands.d.ts.map +1 -1
  233. package/types/createTamagui.d.ts +1 -1
  234. package/types/createTamagui.d.ts.map +1 -1
  235. package/types/createTokens.d.ts +2 -2
  236. package/types/createTokens.d.ts.map +1 -1
  237. package/types/createVariables.d.ts +1 -1
  238. package/types/createVariables.d.ts.map +1 -1
  239. package/types/defaultComponentState.d.ts +1 -1
  240. package/types/defaultComponentState.d.ts.map +1 -1
  241. package/types/helpers/ThemeManager.d.ts +1 -1
  242. package/types/helpers/ThemeManager.d.ts.map +1 -1
  243. package/types/helpers/createShallowSetState.d.ts +2 -2
  244. package/types/helpers/createShallowSetState.d.ts.map +1 -1
  245. package/types/helpers/expandStyle.d.ts +1 -1
  246. package/types/helpers/expandStyle.d.ts.map +1 -1
  247. package/types/helpers/getExpandedShorthands.d.ts +1 -1
  248. package/types/helpers/getExpandedShorthands.d.ts.map +1 -1
  249. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  250. package/types/helpers/getStylesAtomic.d.ts +2 -2
  251. package/types/helpers/getStylesAtomic.d.ts.map +1 -1
  252. package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
  253. package/types/helpers/getVariantExtras.d.ts +2 -2
  254. package/types/helpers/getVariantExtras.d.ts.map +1 -1
  255. package/types/helpers/insertStyleRule.d.ts.map +1 -1
  256. package/types/helpers/isTamaguiComponent.d.ts +1 -1
  257. package/types/helpers/isTamaguiComponent.d.ts.map +1 -1
  258. package/types/helpers/isTamaguiElement.d.ts +1 -1
  259. package/types/helpers/isTamaguiElement.d.ts.map +1 -1
  260. package/types/helpers/matchMedia.d.ts +1 -1
  261. package/types/helpers/matchMedia.d.ts.map +1 -1
  262. package/types/helpers/matchMedia.native.d.ts +1 -1
  263. package/types/helpers/matchMedia.native.d.ts.map +1 -1
  264. package/types/helpers/propMapper.d.ts.map +1 -1
  265. package/types/helpers/proxyThemeToParents.d.ts +1 -1
  266. package/types/helpers/proxyThemeToParents.d.ts.map +1 -1
  267. package/types/helpers/registerCSSVariable.d.ts +2 -2
  268. package/types/helpers/registerCSSVariable.d.ts.map +1 -1
  269. package/types/helpers/themeable.d.ts +1 -1
  270. package/types/helpers/themeable.d.ts.map +1 -1
  271. package/types/hooks/getThemeProxied.d.ts.map +1 -0
  272. package/types/hooks/useDisableSSR.d.ts +1 -1
  273. package/types/hooks/useDisableSSR.d.ts.map +1 -1
  274. package/types/hooks/useProps.d.ts +1 -1
  275. package/types/hooks/useProps.d.ts.map +1 -1
  276. package/types/hooks/useTheme.d.ts +3 -2
  277. package/types/hooks/useTheme.d.ts.map +1 -1
  278. package/types/hooks/useThemeName.d.ts +1 -1
  279. package/types/hooks/useThemeName.d.ts.map +1 -1
  280. package/types/insertFont.d.ts +2 -2
  281. package/types/insertFont.d.ts.map +1 -1
  282. package/types/interfaces/GetRef.d.ts +2 -2
  283. package/types/interfaces/GetRef.d.ts.map +1 -1
  284. package/types/interfaces/TamaguiComponentPropsBaseBase.d.ts +2 -2
  285. package/types/interfaces/TamaguiComponentPropsBaseBase.d.ts.map +1 -1
  286. package/types/interfaces/TamaguiComponentState.d.ts +1 -1
  287. package/types/interfaces/TamaguiComponentState.d.ts.map +1 -1
  288. package/types/interfaces/WebOnlyPressEvents.d.ts +1 -1
  289. package/types/interfaces/WebOnlyPressEvents.d.ts.map +1 -1
  290. package/types/setupHooks.d.ts +3 -3
  291. package/types/setupHooks.d.ts.map +1 -1
  292. package/types/setupReactNative.d.ts +1 -1
  293. package/types/setupReactNative.d.ts.map +1 -1
  294. package/types/styled.d.ts +1 -1
  295. package/types/styled.d.ts.map +1 -1
  296. package/types/types.d.ts +9 -9
  297. package/types/types.d.ts.map +1 -1
  298. package/types/views/FontLanguage.native.d.ts.map +1 -1
  299. package/types/views/FontLanguage.types.d.ts +2 -2
  300. package/types/views/FontLanguage.types.d.ts.map +1 -1
  301. package/types/views/Slot.d.ts +1 -1
  302. package/types/views/Slot.d.ts.map +1 -1
  303. package/types/views/TamaguiProvider.d.ts.map +1 -1
  304. package/types/views/Text.d.ts +1 -1
  305. package/types/views/Text.d.ts.map +1 -1
  306. package/types/views/Theme.d.ts +1 -1
  307. package/types/views/Theme.d.ts.map +1 -1
  308. package/types/views/ThemeDebug.d.ts +2 -2
  309. package/types/views/ThemeDebug.d.ts.map +1 -1
  310. package/types/views/ThemeDebug.native.d.ts +2 -2
  311. package/types/views/ThemeDebug.native.d.ts.map +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Theme.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAsB,+BACtB,eAAkF,2BAElF,wBAAiC,8BACjC,6BAAsC,2CACtC,kBAA2D,8BAE3D,oBAA2B,yBA8BnB;AA5BD,MAAM,YAAQ,yBAAW,SAAe,EAAE,UAAU,GAAG,MAAM,GAA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";
2
+ import { useForceUpdate } from "@tamagui/use-force-update";
3
+ import { useEffect, useId, useState } from "react";
4
+ import { createPortal } from "react-dom";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ let node;
7
+ function ThemeDebug({
8
+ themeState,
9
+ themeProps,
10
+ children
11
+ }) {
12
+ if (process.env.NODE_ENV === "development") {
13
+ const isHydrated = useDidFinishSSR(),
14
+ [onChangeCount, setOnChangeCount] = useState(0),
15
+ rerender = useForceUpdate(),
16
+ id = useId();
17
+ return process.env.NODE_ENV === "development" && typeof document < "u" && (node || (node = document.createElement("div"), node.style.height = "200px", node.style.overflowY = "scroll", node.style.position = "fixed", node.style.zIndex = 1e7, node.style.bottom = "30px", node.style.left = "30px", node.style.right = "30px", node.style.display = "flex", node.style.border = "1px solid #888", node.style.flexDirection = "row", node.style.background = "var(--background)", document.body.appendChild(node))), useEffect(() => {
18
+ themeState.themeManager?.parentManager?.onChangeTheme((name, manager) => {
19
+ setOnChangeCount(p => ++p), console.warn(`theme changed for ${themeState.themeManager?.id} from parent ${themeState.themeManager?.parentManager?.id} to new name`, name);
20
+ });
21
+ }, [themeState.themeManager]), useEffect(() => {
22
+ const tm = setInterval(rerender, 1e3);
23
+ return () => clearTimeout(tm);
24
+ }, []), themeProps["disable-child-theme"] || !isHydrated ? children : /* @__PURE__ */jsxs(Fragment, {
25
+ children: [createPortal( /* @__PURE__ */jsxs("code", {
26
+ style: {
27
+ whiteSpace: "pre",
28
+ maxWidth: 250,
29
+ overflow: "auto",
30
+ padding: 5
31
+ },
32
+ children: ["<Theme ", id, " />\xA0", JSON.stringify({
33
+ propsName: themeProps.name,
34
+ name: themeState?.state?.name,
35
+ className: themeState?.state?.className,
36
+ inverse: themeProps.inverse,
37
+ forceClassName: themeProps.forceClassName,
38
+ parent: themeState.themeManager?.state.parentName,
39
+ id: themeState.themeManager?.id,
40
+ parentId: themeState.themeManager?.parentManager?.id,
41
+ isNew: themeState.isNewTheme,
42
+ onChangeCount,
43
+ listening: [...(themeState.themeManager?._listeningIds || [])].join(","),
44
+ _numChangeEventsSent: themeState.themeManager?._numChangeEventsSent
45
+ }, null, 2)]
46
+ }), node), /* @__PURE__ */jsx("div", {
47
+ style: {
48
+ color: "red"
49
+ },
50
+ children: id
51
+ }), children]
52
+ });
53
+ }
54
+ return children;
55
+ }
56
+ ThemeDebug.displayName = "ThemeDebug";
57
+ export { ThemeDebug };
@@ -0,0 +1,20 @@
1
+ import { isClient } from "@tamagui/constants";
2
+ import { useLayoutEffect } from "react";
3
+ import { THEME_CLASSNAME_PREFIX } from "../constants/constants.mjs";
4
+ import { Theme } from "./Theme.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+ const ThemeProvider = props => (isClient && useLayoutEffect(() => {
7
+ if (props.disableRootThemeClass) return;
8
+ const cn = `${THEME_CLASSNAME_PREFIX}${props.defaultTheme}`,
9
+ target = props.themeClassNameOnRoot ? document.documentElement : document.body;
10
+ return target.classList.add(cn), () => {
11
+ target.classList.remove(cn);
12
+ };
13
+ }, [props.defaultTheme, props.disableRootThemeClass, props.themeClassNameOnRoot]), /* @__PURE__ */jsx(Theme, {
14
+ className: props.className,
15
+ name: props.defaultTheme,
16
+ forceClassName: !props.disableRootThemeClass,
17
+ _isRoot: !0,
18
+ children: props.children
19
+ }));
20
+ export { ThemeProvider };
@@ -0,0 +1,9 @@
1
+ import { validStyles } from "@tamagui/helpers";
2
+ import { stackDefaultStyles } from "../constants/constants.mjs";
3
+ import { createComponent } from "../createComponent.mjs";
4
+ const View = createComponent({
5
+ acceptsClassName: !0,
6
+ defaultProps: stackDefaultStyles,
7
+ validStyles
8
+ });
9
+ export { View };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/web",
3
- "version": "1.88.13",
3
+ "version": "1.88.15",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -27,19 +27,19 @@
27
27
  "reset.css"
28
28
  ],
29
29
  "dependencies": {
30
- "@tamagui/compose-refs": "1.88.13",
31
- "@tamagui/constants": "1.88.13",
32
- "@tamagui/helpers": "1.88.13",
33
- "@tamagui/normalize-css-color": "1.88.13",
34
- "@tamagui/timer": "1.88.13",
35
- "@tamagui/use-did-finish-ssr": "1.88.13",
36
- "@tamagui/use-event": "1.88.13",
37
- "@tamagui/use-force-update": "1.88.13",
30
+ "@tamagui/compose-refs": "1.88.15",
31
+ "@tamagui/constants": "1.88.15",
32
+ "@tamagui/helpers": "1.88.15",
33
+ "@tamagui/normalize-css-color": "1.88.15",
34
+ "@tamagui/timer": "1.88.15",
35
+ "@tamagui/use-did-finish-ssr": "1.88.15",
36
+ "@tamagui/use-event": "1.88.15",
37
+ "@tamagui/use-force-update": "1.88.15",
38
38
  "react": "^18.2.0",
39
39
  "react-dom": "^18.2.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@tamagui/build": "1.88.13",
42
+ "@tamagui/build": "1.88.15",
43
43
  "@testing-library/react": "^14.0.0",
44
44
  "csstype": "^3.0.10",
45
45
  "typescript": "^5.3.3",
@@ -57,7 +57,7 @@
57
57
  "./native": {
58
58
  "import": "./dist/esm/index.native.js",
59
59
  "require": "./dist/cjs/index.native.js",
60
- "react-native": "./dist/cjs/index.native.native.js"
60
+ "react-native": "./dist/cjs/index.native.js"
61
61
  },
62
62
  "./inject-styles": {
63
63
  "types": "./types/inject-styles.d.ts",
package/src/config.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isWeb } from '@tamagui/constants'
2
2
 
3
- import {
3
+ import type {
4
4
  ConfigListener,
5
5
  TamaguiInternalConfig,
6
6
  Token,
@@ -1,5 +1,5 @@
1
1
  import { createStyledContext } from '../helpers/createStyledContext'
2
- import { ComponentContextI, GroupStateListener } from '../types'
2
+ import type { ComponentContextI, GroupStateListener } from '../types'
3
3
 
4
4
  export const ComponentContext = createStyledContext<ComponentContextI>({
5
5
  disableSSR: undefined,
@@ -37,7 +37,7 @@ import { themeable } from './helpers/themeable'
37
37
  import { mediaKeyMatch, setMediaShouldUpdate, useMedia } from './hooks/useMedia'
38
38
  import { useThemeWithState } from './hooks/useTheme'
39
39
  import { hooks } from './setupHooks'
40
- import {
40
+ import type {
41
41
  ComponentContextI,
42
42
  DebugProp,
43
43
  DisposeFn,
@@ -62,9 +62,9 @@ import {
62
62
  UseAnimationProps,
63
63
  UseThemeWithStateProps,
64
64
  } from './types'
65
- import { WebOnlyPressEvents } from './interfaces/WebOnlyPressEvents'
66
- import { TamaguiComponentState } from './interfaces/TamaguiComponentState'
67
- import { TamaguiComponentEvents } from './interfaces/TamaguiComponentEvents'
65
+ import type { WebOnlyPressEvents } from './interfaces/WebOnlyPressEvents'
66
+ import type { TamaguiComponentState } from './interfaces/TamaguiComponentState'
67
+ import type { TamaguiComponentEvents } from './interfaces/TamaguiComponentEvents'
68
68
  import { Slot } from './views/Slot'
69
69
  import { getThemedChildren } from './views/Theme'
70
70
  import { ThemeDebug } from './views/ThemeDebug'
@@ -925,6 +925,8 @@ export function createComponent<
925
925
  onPress ||
926
926
  onPressOut ||
927
927
  onPressIn ||
928
+ onMouseDown ||
929
+ onMouseUp ||
928
930
  onLongPress ||
929
931
  onClick
930
932
  )
@@ -1192,7 +1194,7 @@ export function createComponent<
1192
1194
  }
1193
1195
 
1194
1196
  if (process.env.TAMAGUI_TARGET === 'web') {
1195
- if (isReactNative && !asChild && !isHOC) {
1197
+ if (isReactNative && !asChild) {
1196
1198
  content = (
1197
1199
  <span
1198
1200
  {...(!isHydrated
package/src/createFont.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FontWeightValues, GenericFont } from './types'
1
+ import type { FontWeightValues, GenericFont } from './types'
2
2
 
3
3
  const fontWeights: FontWeightValues[] = [
4
4
  '100',
@@ -1,4 +1,4 @@
1
- import { CreateShorthands } from './types'
1
+ import type { CreateShorthands } from './types'
2
2
 
3
3
  // just a type helper util
4
4
 
@@ -1,8 +1,9 @@
1
1
  import { isWeb } from '@tamagui/constants'
2
2
 
3
3
  import { configListeners, setConfig, setTokens } from './config'
4
- import { Variable } from './createVariable'
5
- import { DeepVariableObject, createVariables } from './createVariables'
4
+ import type { Variable } from './createVariable'
5
+ import type { DeepVariableObject } from './createVariables'
6
+ import { createVariables } from './createVariables'
6
7
  import { getThemeCSSRules } from './helpers/getThemeCSSRules'
7
8
  import {
8
9
  getAllRules,
@@ -15,7 +16,7 @@ import { ensureThemeVariable } from './helpers/themes'
15
16
  import { configureMedia } from './hooks/useMedia'
16
17
  import { parseFont, registerFontVariables } from './insertFont'
17
18
  import { Tamagui } from './Tamagui'
18
- import {
19
+ import type {
19
20
  CreateTamaguiProps,
20
21
  DedupedTheme,
21
22
  DedupedThemes,
@@ -1,6 +1,6 @@
1
- import { Variable } from './createVariable'
1
+ import type { Variable } from './createVariable'
2
2
  import { createVariables } from './createVariables'
3
- import { CreateTokens } from './types'
3
+ import type { CreateTokens } from './types'
4
4
 
5
5
  // tokens.color.dark.red ===> { var: `color-dark-red`, val: '' }
6
6
  export function createTokens<T extends CreateTokens>(tokens: T): MakeTokens<T> {
@@ -1,6 +1,7 @@
1
1
  import { simpleHash } from '@tamagui/helpers'
2
2
 
3
- import { Variable, createVariable, isVariable } from './createVariable'
3
+ import type { Variable } from './createVariable'
4
+ import { createVariable, isVariable } from './createVariable'
4
5
 
5
6
  type DeepTokenObject<Val extends string | number = any> = {
6
7
  [key: string]: Val | DeepTokenObject<Val>
@@ -1,4 +1,4 @@
1
- import { TamaguiComponentState } from './interfaces/TamaguiComponentState'
1
+ import type { TamaguiComponentState } from './interfaces/TamaguiComponentState'
2
2
 
3
3
  export const defaultComponentState: TamaguiComponentState = {
4
4
  hover: false,
@@ -2,7 +2,7 @@ import { isWeb } from '@tamagui/constants'
2
2
 
3
3
  import { getThemes } from '../config'
4
4
  import { THEME_CLASSNAME_PREFIX, THEME_NAME_SEPARATOR } from '../constants/constants'
5
- import { ColorScheme, ThemeParsed, ThemeProps } from '../types'
5
+ import type { ColorScheme, ThemeParsed, ThemeProps } from '../types'
6
6
 
7
7
  type ThemeListener = (
8
8
  name: string | null,
@@ -1,5 +1,5 @@
1
- import React from 'react'
2
- import { DebugProp } from '../types'
1
+ import type React from 'react'
2
+ import type { DebugProp } from '../types'
3
3
 
4
4
  export function createShallowSetState<State extends Object>(
5
5
  setter: React.Dispatch<React.SetStateAction<State>>,
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { isAndroid, isWeb } from '@tamagui/constants'
7
7
 
8
- import { PropMappedValue } from '../types'
8
+ import type { PropMappedValue } from '../types'
9
9
 
10
10
  export function expandStyle(key: string, value: any): PropMappedValue {
11
11
  if (process.env.TAMAGUI_TARGET === 'web') {
@@ -1,5 +1,5 @@
1
1
  import { getConfig } from '../config'
2
- import { Shorthands } from '../types'
2
+ import type { Shorthands } from '../types'
3
3
 
4
4
  /**
5
5
  * @deprecated use useProps instead
@@ -77,6 +77,7 @@ import {
77
77
  } from './normalizeValueWithProperty'
78
78
  import { getPropMappedFontFamily, propMapper } from './propMapper'
79
79
  import { pseudoDescriptors, pseudoPriorities } from './pseudoDescriptors'
80
+ import { isObj } from './isObj'
80
81
 
81
82
  // bugfix for some reason it gets reset
82
83
  const IS_STATIC = process.env.IS_STATIC === 'is_static'
@@ -363,8 +364,8 @@ export const getSplitStyles: StyleSplitter = (
363
364
  continue
364
365
  }
365
366
 
366
- if (keyInit[0] === '_' && keyInit.startsWith('_style')) {
367
- mergeStylePropIntoStyle(styleState, valInit)
367
+ if (keyInit.startsWith('_style') && isObj(valInit)) {
368
+ Object.assign(styleState.style, valInit)
368
369
  continue
369
370
  }
370
371
 
@@ -530,6 +531,11 @@ export const getSplitStyles: StyleSplitter = (
530
531
  const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough
531
532
 
532
533
  if (process.env.NODE_ENV === 'development' && debug === 'verbose') {
534
+ // fix native group nesting issues
535
+ console.groupEnd()
536
+ console.groupEnd()
537
+ // fix native group nesting issues
538
+
533
539
  console.groupCollapsed(
534
540
  ` 🔑 ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ''} ${
535
541
  shouldPassThrough ? '(pass)' : ''
@@ -1037,7 +1043,19 @@ export const getSplitStyles: StyleSplitter = (
1037
1043
  // also it makes sense that props.style is basically the last to apply,
1038
1044
  // at least more sense than "it applies at the position its defined in the prop loop"
1039
1045
  if (props.style) {
1040
- mergeStylePropIntoStyle(styleState, props.style)
1046
+ if (isHOC) {
1047
+ viewProps.style = props.style
1048
+ } else {
1049
+ for (const style of [].concat(props.style)) {
1050
+ if (style) {
1051
+ if (style['$$css']) {
1052
+ Object.assign(styleState.classNames, style)
1053
+ } else {
1054
+ Object.assign(styleState.style, style)
1055
+ }
1056
+ }
1057
+ }
1058
+ }
1041
1059
  }
1042
1060
 
1043
1061
  const avoidNormalize = styleProps.noNormalize === false
@@ -1069,16 +1087,17 @@ export const getSplitStyles: StyleSplitter = (
1069
1087
  .forEach(([key, val]) => {
1070
1088
  mergeTransform(style, key, val, true)
1071
1089
  })
1090
+ }
1072
1091
 
1073
- // Button for example uses disableClassName: true but renders to a 'button' element, so needs this
1074
- if (process.env.TAMAGUI_TARGET === 'web') {
1075
- if (
1076
- !staticConfig.isReactNative &&
1077
- !styleProps.isAnimated &&
1078
- Array.isArray(style.transform)
1079
- ) {
1080
- style.transform = transformsToString(style.transform) as any
1081
- }
1092
+ // Button for example uses disableClassName: true but renders to a 'button' element, so needs this
1093
+ if (process.env.TAMAGUI_TARGET === 'web') {
1094
+ if (
1095
+ !staticConfig.isReactNative &&
1096
+ !staticConfig.isHOC &&
1097
+ (styleProps.isAnimated && !conf.animations.supportsCSSVars ? false : true) &&
1098
+ Array.isArray(style.transform)
1099
+ ) {
1100
+ style.transform = transformsToString(style.transform) as any
1082
1101
  }
1083
1102
  }
1084
1103
 
@@ -1385,20 +1404,6 @@ export const getSubStyle = (
1385
1404
  return styleOut
1386
1405
  }
1387
1406
 
1388
- function mergeStylePropIntoStyle(styleState: GetStyleState, cur: Object[] | Object) {
1389
- if (!cur) return
1390
- const styles = Array.isArray(cur) ? cur : [cur]
1391
- for (const style of styles) {
1392
- if (!style) continue
1393
- const isRNW = style['$$css']
1394
- if (isRNW) {
1395
- Object.assign(styleState.classNames, style)
1396
- } else {
1397
- Object.assign(styleState.style, style)
1398
- }
1399
- }
1400
- }
1401
-
1402
1407
  // on native no need to insert any css
1403
1408
  const useInsertEffectCompat = isWeb
1404
1409
  ? useInsertionEffect || useIsomorphicLayoutEffect
@@ -1508,8 +1513,10 @@ if (process.env.TAMAGUI_TARGET === 'native') {
1508
1513
  dataDetectorType: 1,
1509
1514
  dynamicTypeRamp: 1,
1510
1515
  elevationAndroid: 1,
1516
+ hapticFeedback: 1,
1511
1517
  importantForAccessibility: 1,
1512
1518
  lineBreakStrategyIOS: 1,
1519
+ maxFontSizeMultiplier: 1,
1513
1520
  minimumFontScale: 1,
1514
1521
  needsOffscreenAlphaCompositing: 1,
1515
1522
  nextFocusDown: 1,
@@ -3,17 +3,15 @@
3
3
  * Copyright (c) Nicolas Gallagher licensed under the MIT license.
4
4
  */
5
5
 
6
- import { StyleObject, simpleHash } from '@tamagui/helpers'
6
+ import type { StyleObject } from '@tamagui/helpers'
7
+ import { simpleHash } from '@tamagui/helpers'
7
8
 
8
9
  import { getConfig } from '../config'
9
10
  import type { DebugProp, TamaguiInternalConfig, ViewStyleWithPseudos } from '../types'
10
11
  import { defaultOffset } from './defaultOffset'
11
12
  import { normalizeValueWithProperty } from './normalizeValueWithProperty'
12
- import {
13
- PseudoDescriptor,
14
- pseudoDescriptors,
15
- pseudoDescriptorsBase,
16
- } from './pseudoDescriptors'
13
+ import type { PseudoDescriptor } from './pseudoDescriptors'
14
+ import { pseudoDescriptors, pseudoDescriptorsBase } from './pseudoDescriptors'
17
15
  import { normalizeColor } from './normalizeColor'
18
16
 
19
17
  // refactor this file away next...
@@ -1,7 +1,8 @@
1
1
  import { simpleHash } from '@tamagui/helpers'
2
2
 
3
3
  import { THEME_CLASSNAME_PREFIX } from '../constants/constants'
4
- import { Variable, variableToString } from '../createVariable'
4
+ import type { Variable } from '../createVariable'
5
+ import { variableToString } from '../createVariable'
5
6
  import type { CreateTamaguiProps, ThemeParsed } from '../types'
6
7
  import { tokensValueToVariable } from './registerCSSVariable'
7
8
 
@@ -1,6 +1,6 @@
1
1
  import { getVariableValue } from '../createVariable'
2
- import { GenericFonts, GetStyleState } from '../types'
3
- import { LanguageContextType } from '../views/FontLanguage.types'
2
+ import type { GenericFonts, GetStyleState } from '../types'
3
+ import type { LanguageContextType } from '../views/FontLanguage.types'
4
4
 
5
5
  export function getVariantExtras(styleState: GetStyleState) {
6
6
  const { curProps, conf, context, theme } = styleState
@@ -186,7 +186,7 @@ function updateSheetStyles(
186
186
  delete allSelectors[identifier]
187
187
  }
188
188
  } else if (!(identifier in allSelectors)) {
189
- const isTransform = identifier.startsWith('_transform')
189
+ const isTransform = identifier.startsWith('_transform-')
190
190
  const shouldInsert = isTransform
191
191
  ? addTransform(identifier, cssRule.cssText, cssRule)
192
192
  : true
@@ -269,7 +269,12 @@ function addThemesFromCSS(cssStyleRule: CSSStyleRule, tokens?: TokensParsed) {
269
269
  const [_0, _1, scheme, _2, name] = matches
270
270
  const themeName =
271
271
  name && scheme && scheme !== name ? `${scheme}_${name}` : name || scheme
272
- if (dedupedEntry.names.includes(themeName) || themeName === 'light_dark') {
272
+ if (
273
+ !themeName ||
274
+ dedupedEntry.names.includes(themeName) ||
275
+ themeName === 'light_dark' ||
276
+ themeName === 'dark_light'
277
+ ) {
273
278
  continue
274
279
  }
275
280
  dedupedEntry.names.push(themeName)
@@ -322,7 +327,7 @@ export function updateRules(identifier: string, rules: string[]) {
322
327
  return false
323
328
  }
324
329
  allRules[identifier] = rules.join(' ')
325
- if (identifier.startsWith('_transform')) {
330
+ if (identifier.startsWith('_transform-')) {
326
331
  return addTransform(identifier, rules[0])
327
332
  }
328
333
  return true
@@ -1,4 +1,4 @@
1
- import { StaticConfig } from '../types'
1
+ import type { StaticConfig } from '../types'
2
2
 
3
3
  export function isTamaguiComponent<A>(
4
4
  comp: A,
@@ -1,6 +1,6 @@
1
1
  import { isValidElement } from 'react'
2
2
 
3
- import { StaticConfig } from '../types'
3
+ import type { StaticConfig } from '../types'
4
4
  import { isTamaguiComponent } from './isTamaguiComponent'
5
5
 
6
6
  export const isTamaguiElement = (
@@ -1,4 +1,4 @@
1
- import { MatchMedia, MediaQueryList } from '../types'
1
+ import type { MatchMedia, MediaQueryList } from '../types'
2
2
 
3
3
  let matchMediaImpl: MatchMedia = matchMediaFallback
4
4
 
@@ -1,4 +1,4 @@
1
- import { MatchMedia, MediaQueryList } from '../types'
1
+ import type { MatchMedia, MediaQueryList } from '../types'
2
2
 
3
3
  export const matchMedia =
4
4
  (typeof window !== 'undefined' && window.matchMedia) || matchMediaFallback
@@ -3,7 +3,8 @@ import { tokenCategories } from '@tamagui/helpers'
3
3
 
4
4
  import { getConfig } from '../config'
5
5
  import { isDevTools } from '../constants/isDevTools'
6
- import { Variable, getVariableValue, isVariable } from '../createVariable'
6
+ import type { Variable } from '../createVariable'
7
+ import { getVariableValue, isVariable } from '../createVariable'
7
8
  import type {
8
9
  GetStyleState,
9
10
  PropMapper,
@@ -1,5 +1,5 @@
1
1
  import { getTokenObject } from '../config'
2
- import { DedupedThemes, ThemeParsed } from '../types'
2
+ import type { DedupedThemes, ThemeParsed } from '../types'
3
3
 
4
4
  const themesRaw: Record<string, ThemeParsed> = {}
5
5
 
@@ -1,5 +1,6 @@
1
- import { Variable, createCSSVariable, getVariableValue } from '../createVariable'
2
- import { VariableVal } from '../types'
1
+ import type { Variable } from '../createVariable'
2
+ import { createCSSVariable, getVariableValue } from '../createVariable'
3
+ import type { VariableVal } from '../types'
3
4
 
4
5
  export const registerCSSVariable = (v: Variable | VariableVal) => {
5
6
  tokensValueToVariable.set(getVariableValue(v), v)
@@ -1,6 +1,6 @@
1
1
  import { forwardRef } from 'react'
2
2
 
3
- import { StaticConfig, ThemeableProps } from '../types'
3
+ import type { StaticConfig, ThemeableProps } from '../types'
4
4
  import { Theme } from '../views/Theme'
5
5
 
6
6
  export function themeable<ComponentType extends (props: any) => any>(
@@ -1,5 +1,5 @@
1
1
  import { getConfig } from '../config'
2
- import { ComponentContextI } from '../types'
2
+ import type { ComponentContextI } from '../types'
3
3
 
4
4
  export function getDisableSSR(componentContext?: ComponentContextI) {
5
5
  return componentContext?.disableSSR ?? getConfig().disableSSR
@@ -3,7 +3,7 @@ import { useContext } from 'react'
3
3
  import { ComponentContext } from '../contexts/ComponentContext'
4
4
  import { defaultComponentStateMounted } from '../defaultComponentState'
5
5
  import { useSplitStyles } from '../helpers/getSplitStyles'
6
- import {
6
+ import type {
7
7
  SplitStyleProps,
8
8
  StackStyle,
9
9
  StaticConfig,
@@ -2,13 +2,11 @@ import { isClient, isIos, isServer } from '@tamagui/constants'
2
2
  import { useContext, useEffect, useMemo, useRef, useState } from 'react'
3
3
 
4
4
  import { getConfig } from '../config'
5
- import { Variable, getVariable } from '../createVariable'
5
+ import type { Variable } from '../createVariable'
6
+ import { getVariable } from '../createVariable'
6
7
  import { isEqualShallow } from '../helpers/createShallowSetState'
7
- import {
8
- ThemeManager,
9
- ThemeManagerState,
10
- getHasThemeUpdatingProps,
11
- } from '../helpers/ThemeManager'
8
+ import type { ThemeManagerState } from '../helpers/ThemeManager'
9
+ import { ThemeManager, getHasThemeUpdatingProps } from '../helpers/ThemeManager'
12
10
  import { ThemeManagerIDContext } from '../helpers/ThemeManagerContext'
13
11
  import type {
14
12
  DebugProp,
@@ -2,7 +2,7 @@ import { useIsomorphicLayoutEffect } from '@tamagui/constants'
2
2
  import { useContext, useState } from 'react'
3
3
 
4
4
  import { ThemeManagerIDContext } from '../helpers/ThemeManagerContext'
5
- import { ThemeName } from '../types'
5
+ import type { ThemeName } from '../types'
6
6
  import { getThemeManager } from './useTheme'
7
7
 
8
8
  export function useThemeName(opts?: { parent?: true }): ThemeName {
package/src/insertFont.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import { setConfigFont } from './config'
2
2
  import { createFont } from './createFont'
3
- import { Variable } from './createVariable'
4
- import { DeepVariableObject, createVariables } from './createVariables'
3
+ import type { Variable } from './createVariable'
4
+ import type { DeepVariableObject } from './createVariables'
5
+ import { createVariables } from './createVariables'
5
6
  import { registerCSSVariable, variableToCSS } from './helpers/registerCSSVariable'
6
- import { GenericFont } from './types'
7
+ import type { GenericFont } from './types'
7
8
 
8
9
  /**
9
10
  * Runtime dynamic insert font
@@ -1,6 +1,6 @@
1
- import { Component, JSXElementConstructor, Ref } from 'react'
1
+ import type { Component, JSXElementConstructor, Ref } from 'react'
2
2
 
3
- import { TamaguiComponent } from '../types'
3
+ import type { TamaguiComponent } from '../types'
4
4
 
5
5
  // gets the ref type of any type of react component
6
6