@tamagui/core 1.0.1-beta.185 → 1.0.1-beta.187

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 (129) hide show
  1. package/dist/cjs/addTheme.js +2 -2
  2. package/dist/cjs/addTheme.js.map +2 -2
  3. package/dist/cjs/constants/constants.js +2 -2
  4. package/dist/cjs/constants/constants.js.map +2 -2
  5. package/dist/cjs/createComponent.js +25 -25
  6. package/dist/cjs/createComponent.js.map +3 -3
  7. package/dist/cjs/createTamagui.js +3 -3
  8. package/dist/cjs/createTamagui.js.map +2 -2
  9. package/dist/cjs/createVariable.js +3 -3
  10. package/dist/cjs/createVariable.js.map +2 -2
  11. package/dist/cjs/helpers/calc.js +2 -2
  12. package/dist/cjs/helpers/calc.js.map +2 -2
  13. package/dist/cjs/helpers/createPropMapper.js +5 -5
  14. package/dist/cjs/helpers/createPropMapper.js.map +2 -2
  15. package/dist/cjs/helpers/expandStyle.js +2 -2
  16. package/dist/cjs/helpers/expandStyle.js.map +2 -2
  17. package/dist/cjs/helpers/expandStyles.js +2 -2
  18. package/dist/cjs/helpers/expandStyles.js.map +2 -2
  19. package/dist/cjs/helpers/getSplitStyles.js +11 -11
  20. package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
  21. package/dist/cjs/hooks/useDidFinishSSR.js +60 -0
  22. package/dist/cjs/hooks/useDidFinishSSR.js.map +7 -0
  23. package/dist/cjs/hooks/useIsMounted.js +2 -2
  24. package/dist/cjs/hooks/useIsMounted.js.map +2 -2
  25. package/dist/cjs/hooks/useIsSSR.js +3 -3
  26. package/dist/cjs/hooks/useIsSSR.js.map +2 -2
  27. package/dist/cjs/hooks/useIsTouchDevice.js +4 -4
  28. package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
  29. package/dist/cjs/hooks/useMedia.js +18 -5
  30. package/dist/cjs/hooks/useMedia.js.map +2 -2
  31. package/dist/cjs/hooks/useSafeRef.js +2 -2
  32. package/dist/cjs/hooks/useSafeRef.js.map +2 -2
  33. package/dist/cjs/hooks/useServerHooks.js +3 -3
  34. package/dist/cjs/hooks/useServerHooks.js.map +2 -2
  35. package/dist/cjs/hooks/useTheme.js +7 -7
  36. package/dist/cjs/hooks/useTheme.js.map +2 -2
  37. package/dist/cjs/index.js +1 -1
  38. package/dist/cjs/index.js.map +2 -2
  39. package/dist/cjs/views/Slot.js +2 -2
  40. package/dist/cjs/views/Slot.js.map +2 -2
  41. package/dist/cjs/views/TamaguiProvider.js +6 -4
  42. package/dist/cjs/views/TamaguiProvider.js.map +2 -2
  43. package/dist/cjs/views/Text.js +5 -5
  44. package/dist/cjs/views/Text.js.map +2 -2
  45. package/dist/cjs/views/Theme.js +2 -2
  46. package/dist/cjs/views/Theme.js.map +2 -2
  47. package/dist/cjs/views/ThemeInverse.js +2 -2
  48. package/dist/cjs/views/ThemeInverse.js.map +2 -2
  49. package/dist/cjs/views/ThemeReset.js +2 -2
  50. package/dist/cjs/views/ThemeReset.js.map +2 -2
  51. package/dist/esm/addTheme.js +1 -1
  52. package/dist/esm/addTheme.js.map +2 -2
  53. package/dist/esm/constants/constants.js +1 -1
  54. package/dist/esm/constants/constants.js.map +1 -1
  55. package/dist/esm/createComponent.js +1 -1
  56. package/dist/esm/createComponent.js.map +2 -2
  57. package/dist/esm/createTamagui.js +1 -1
  58. package/dist/esm/createTamagui.js.map +2 -2
  59. package/dist/esm/createVariable.js +1 -1
  60. package/dist/esm/createVariable.js.map +2 -2
  61. package/dist/esm/helpers/calc.js +1 -1
  62. package/dist/esm/helpers/calc.js.map +2 -2
  63. package/dist/esm/helpers/createPropMapper.js +1 -1
  64. package/dist/esm/helpers/createPropMapper.js.map +2 -2
  65. package/dist/esm/helpers/expandStyle.js +1 -1
  66. package/dist/esm/helpers/expandStyle.js.map +1 -1
  67. package/dist/esm/helpers/expandStyles.js +1 -1
  68. package/dist/esm/helpers/expandStyles.js.map +2 -2
  69. package/dist/esm/helpers/getSplitStyles.js +1 -1
  70. package/dist/esm/helpers/getSplitStyles.js.map +2 -2
  71. package/dist/esm/hooks/useDidFinishSSR.js +35 -0
  72. package/dist/esm/hooks/useDidFinishSSR.js.map +7 -0
  73. package/dist/esm/hooks/useIsMounted.js +1 -1
  74. package/dist/esm/hooks/useIsMounted.js.map +2 -2
  75. package/dist/esm/hooks/useIsSSR.js +1 -1
  76. package/dist/esm/hooks/useIsSSR.js.map +2 -2
  77. package/dist/esm/hooks/useIsTouchDevice.js +1 -1
  78. package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
  79. package/dist/esm/hooks/useMedia.js +17 -4
  80. package/dist/esm/hooks/useMedia.js.map +2 -2
  81. package/dist/esm/hooks/useSafeRef.js +1 -1
  82. package/dist/esm/hooks/useSafeRef.js.map +2 -2
  83. package/dist/esm/hooks/useServerHooks.js +1 -1
  84. package/dist/esm/hooks/useServerHooks.js.map +2 -2
  85. package/dist/esm/hooks/useTheme.js +1 -1
  86. package/dist/esm/hooks/useTheme.js.map +2 -2
  87. package/dist/esm/index.js +1 -1
  88. package/dist/esm/index.js.map +2 -2
  89. package/dist/esm/views/Slot.js +1 -1
  90. package/dist/esm/views/Slot.js.map +2 -2
  91. package/dist/esm/views/TamaguiProvider.js +3 -1
  92. package/dist/esm/views/TamaguiProvider.js.map +2 -2
  93. package/dist/esm/views/Text.js +1 -1
  94. package/dist/esm/views/Text.js.map +2 -2
  95. package/dist/esm/views/Theme.js +1 -1
  96. package/dist/esm/views/Theme.js.map +2 -2
  97. package/dist/esm/views/ThemeInverse.js +1 -1
  98. package/dist/esm/views/ThemeInverse.js.map +2 -2
  99. package/dist/esm/views/ThemeReset.js +1 -1
  100. package/dist/esm/views/ThemeReset.js.map +2 -2
  101. package/package.json +11 -10
  102. package/src/addTheme.ts +2 -1
  103. package/src/constants/constants.ts +1 -1
  104. package/src/createComponent.tsx +1 -1
  105. package/src/createTamagui.ts +2 -1
  106. package/src/createVariable.ts +1 -1
  107. package/src/helpers/calc.ts +2 -1
  108. package/src/helpers/createPropMapper.ts +2 -1
  109. package/src/helpers/expandStyle.ts +1 -1
  110. package/src/helpers/expandStyles.ts +2 -1
  111. package/src/helpers/getSplitStyles.tsx +1 -1
  112. package/src/hooks/useIsMounted.ts +1 -2
  113. package/src/hooks/useIsSSR.tsx +1 -1
  114. package/src/hooks/useIsTouchDevice.tsx +1 -2
  115. package/src/hooks/useMedia.tsx +24 -6
  116. package/src/hooks/useSafeRef.ts +1 -2
  117. package/src/hooks/useServerHooks.tsx +1 -2
  118. package/src/hooks/useTheme.tsx +1 -1
  119. package/src/index.ts +2 -1
  120. package/src/views/Slot.tsx +1 -2
  121. package/src/views/TamaguiProvider.tsx +3 -1
  122. package/src/views/Text.tsx +1 -1
  123. package/src/views/Theme.tsx +1 -1
  124. package/src/views/ThemeInverse.tsx +1 -1
  125. package/src/views/ThemeReset.tsx +1 -1
  126. package/types/constants/platform.d.ts +2 -2
  127. package/types/hooks/useDidFinishSSR.d.ts +3 -0
  128. package/types/hooks/useMedia.d.ts +1 -1
  129. package/types/index.d.ts +1 -1
package/src/addTheme.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import { isWeb } from '@tamagui/constants'
2
+
1
3
  import { getConfig, updateConfig } from './config'
2
- import { isWeb } from './constants/platform'
3
4
  import { getThemeCSSRules } from './helpers/getThemeCSSRules'
4
5
  import { ensureThemeVariable, proxyThemeToParents } from './helpers/themes'
5
6
  import { ThemeDefinition, ThemeParsed } from './types'
@@ -1,4 +1,4 @@
1
- import { isWeb } from './platform'
1
+ import { isWeb } from '@tamagui/constants'
2
2
 
3
3
  export const THEME_NAME_SEPARATOR = '_'
4
4
  export const THEME_CLASSNAME_PREFIX = `t_`
@@ -1,3 +1,4 @@
1
+ import { isClient, isRSC, isWeb, useIsomorphicLayoutEffect } from '@tamagui/constants'
1
2
  /* eslint-disable react-hooks/rules-of-hooks */
2
3
  import {
3
4
  composeEventHandlers,
@@ -26,7 +27,6 @@ import { Text, View, ViewStyle } from 'react-native'
26
27
 
27
28
  import { getConfig, onConfiguredOnce } from './config'
28
29
  import { stackDefaultStyles } from './constants/constants'
29
- import { isClient, isRSC, isWeb, useIsomorphicLayoutEffect } from './constants/platform'
30
30
  import { FontLanguageContext } from './contexts/FontLanguageContext'
31
31
  import { TextAncestorContext } from './contexts/TextAncestorContext'
32
32
  import { assignNativePropsToWeb } from './helpers/assignNativePropsToWeb'
@@ -1,5 +1,6 @@
1
+ import { isRSC, isWeb } from '@tamagui/constants'
2
+
1
3
  import { configListeners, setConfig } from './config'
2
- import { isRSC, isWeb } from './constants/platform'
3
4
  import { createVariables } from './createVariables'
4
5
  import { getThemeCSSRules } from './helpers/getThemeCSSRules'
5
6
  import { getAllRules } from './helpers/insertStyleRule'
@@ -1,7 +1,7 @@
1
+ import { isWeb } from '@tamagui/constants'
1
2
  import { simpleHash } from '@tamagui/helpers'
2
3
 
3
4
  import { getConfig } from './config'
4
- import { isWeb } from './constants/platform'
5
5
 
6
6
  /**
7
7
  * Should rename this to Token
@@ -1,4 +1,5 @@
1
- import { isWeb } from '../constants/platform'
1
+ import { isWeb } from '@tamagui/constants'
2
+
2
3
  import { getVariableVariable } from '../createVariable'
3
4
  import { FontLineHeightTokens, FontSizeTokens, SizeTokens, SpaceTokens } from '../types'
4
5
 
@@ -1,6 +1,7 @@
1
+ import { isWeb } from '@tamagui/constants'
2
+
1
3
  import { getConfig } from '../config'
2
4
  import { isDevTools } from '../constants/isDevTools'
3
- import { isWeb } from '../constants/platform'
4
5
  import { Variable, getVariableValue, isVariable } from '../createVariable'
5
6
  import {
6
7
  DebugProp,
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) Nicolas Gallagher licensed under the MIT license.
4
4
  */
5
5
 
6
- import { isWeb } from '../constants/platform'
6
+ import { isWeb } from '@tamagui/constants'
7
7
 
8
8
  export function expandStyle(key: string, value: any) {
9
9
  if (process.env.TAMAGUI_TARGET === 'web') {
@@ -1,5 +1,6 @@
1
+ import { isWeb } from '@tamagui/constants'
2
+
1
3
  import { getConfig } from '../config'
2
- import { isWeb } from '../constants/platform'
3
4
  import { expandStyle } from './expandStyle'
4
5
  import { colorToRGBA, normalizeColor } from './normalizeColor'
5
6
  import { normalizeValueWithProperty } from './normalizeValueWithProperty.js'
@@ -1,10 +1,10 @@
1
+ import { isClient, isRSC, isWeb, useIsomorphicLayoutEffect } from '@tamagui/constants'
1
2
  import { stylePropsText, stylePropsTransform, validPseudoKeys, validStyles } from '@tamagui/helpers'
2
3
  import { useInsertionEffect } from 'react'
3
4
  import type { ViewStyle } from 'react-native'
4
5
 
5
6
  import { getConfig } from '../config'
6
7
  import { isDevTools } from '../constants/isDevTools'
7
- import { isClient, isRSC, isWeb, useIsomorphicLayoutEffect } from '../constants/platform'
8
8
  import { mediaState as globalMediaState, mediaQueryConfig } from '../hooks/useMedia'
9
9
  import type {
10
10
  DebugProp,
@@ -1,7 +1,6 @@
1
+ import { useIsomorphicLayoutEffect } from '@tamagui/constants'
1
2
  import { useRef } from 'react'
2
3
 
3
- import { useIsomorphicLayoutEffect } from '../constants/platform'
4
-
5
4
  export function useIsMounted() {
6
5
  const isMounted = useRef(false)
7
6
 
@@ -1,6 +1,6 @@
1
+ import { isServer, isWeb, useIsomorphicLayoutEffect } from '@tamagui/constants'
1
2
  import { useState } from 'react'
2
3
 
3
- import { isServer, isWeb, useIsomorphicLayoutEffect } from '../constants/platform'
4
4
  import { startTransition } from '../helpers/startTransition'
5
5
 
6
6
  // because any change before first useEffect causes hydration / mismatch issues
@@ -1,7 +1,6 @@
1
+ import { isServer, isTouchable, isWeb, useIsomorphicLayoutEffect } from '@tamagui/constants'
1
2
  import { useState } from 'react'
2
3
 
3
- import { isServer, isTouchable, isWeb, useIsomorphicLayoutEffect } from '../constants/platform'
4
-
5
4
  // ssr friendly
6
5
 
7
6
  export const useIsTouchDevice = () => {
@@ -1,6 +1,6 @@
1
+ import { useIsomorphicLayoutEffect } from '@tamagui/constants'
1
2
  import { startTransition, useEffect, useMemo, useState } from 'react'
2
3
 
3
- import { useIsomorphicLayoutEffect } from '../constants/platform'
4
4
  import { matchMedia } from '../helpers/matchMedia'
5
5
  import {
6
6
  MediaQueries,
@@ -10,6 +10,7 @@ import {
10
10
  TamaguiInternalConfig,
11
11
  } from '../types'
12
12
  import { useSafeRef } from './useSafeRef'
13
+ import { getConfig } from '..'
13
14
 
14
15
  export const mediaState: MediaQueryState =
15
16
  // development time safeguard
@@ -51,6 +52,18 @@ export const getMedia = () => {
51
52
  return mediaState
52
53
  }
53
54
 
55
+ // for SSR capture it at time of startup
56
+ let currentMediaState: MediaQueryState | null
57
+ let initialMediaState: MediaQueryState | null
58
+ // fairly concurrent mode sketchy but such an edge case ok for now
59
+ let hasFinishedInitialRender = false
60
+ export const getCurrentMediaState = () => {
61
+ if (getConfig().disableSSR || hasFinishedInitialRender) {
62
+ return currentMediaState || {}
63
+ }
64
+ return initialMediaState || {}
65
+ }
66
+
54
67
  const dispose = new Set<Function>()
55
68
 
56
69
  export const configureMedia = (config: TamaguiInternalConfig) => {
@@ -61,15 +74,12 @@ export const configureMedia = (config: TamaguiInternalConfig) => {
61
74
  }
62
75
  Object.assign(mediaQueryConfig, media)
63
76
  currentMediaState = { ...mediaState }
77
+ initialMediaState = currentMediaState
64
78
  if (config.disableSSR) {
65
79
  setupMediaListeners()
66
80
  }
67
81
  }
68
82
 
69
- // for SSR capture it at time of startup
70
- let currentMediaState: MediaQueryState | null
71
- export const getCurrentMediaState = () => currentMediaState
72
-
73
83
  function unlisten() {
74
84
  dispose.forEach((cb) => cb())
75
85
  dispose.clear()
@@ -122,6 +132,9 @@ function setupMediaListeners() {
122
132
  })
123
133
  }
124
134
 
135
+ const onIdle =
136
+ typeof requestIdleCallback === 'undefined' ? (cb) => setTimeout(cb, 100) : requestIdleCallback
137
+
125
138
  export function useMediaQueryListeners(config: TamaguiInternalConfig) {
126
139
  if (config.disableSSR) {
127
140
  return
@@ -129,6 +142,11 @@ export function useMediaQueryListeners(config: TamaguiInternalConfig) {
129
142
 
130
143
  useEffect(() => {
131
144
  setupMediaListeners()
145
+
146
+ onIdle(() => {
147
+ hasFinishedInitialRender = true
148
+ })
149
+
132
150
  return unlisten
133
151
  }, [])
134
152
  }
@@ -136,7 +154,7 @@ export function useMediaQueryListeners(config: TamaguiInternalConfig) {
136
154
  export function useMedia(): {
137
155
  [key in MediaQueryKey]: boolean
138
156
  } {
139
- const [state, setState] = useState(currentMediaState || {})
157
+ const [state, setState] = useState(getCurrentMediaState())
140
158
  const keys = useSafeRef({} as Record<string, boolean>)
141
159
 
142
160
  function updateState() {
@@ -1,7 +1,6 @@
1
+ import { useIsomorphicLayoutEffect } from '@tamagui/constants'
1
2
  import { useRef } from 'react'
2
3
 
3
- import { useIsomorphicLayoutEffect } from '../constants/platform'
4
-
5
4
  // dai-shi 🙏
6
5
  // https://dev.to/uhyo_/a-concurrent-mode-safe-version-of-useref-1325
7
6
 
@@ -1,7 +1,6 @@
1
+ import { isRSC } from '@tamagui/constants'
1
2
  import { useRef, useState } from 'react'
2
3
 
3
- import { isRSC } from '../constants/platform'
4
-
5
4
  export const useServerState = isRSC
6
5
  ? (((val: any) => [val, idFn]) as unknown as typeof useState)
7
6
  : useState
@@ -1,9 +1,9 @@
1
+ import { isRSC, isServer, useIsomorphicLayoutEffect } from '@tamagui/constants'
1
2
  import { useForceUpdate } from '@tamagui/use-force-update'
2
3
  import React, { useContext, useLayoutEffect, useMemo, useRef, useState } from 'react'
3
4
 
4
5
  import { getConfig } from '../config'
5
6
  import { isDevTools } from '../constants/isDevTools'
6
- import { isRSC, isServer, useIsomorphicLayoutEffect } from '../constants/platform'
7
7
  import { ThemeContext } from '../contexts/ThemeContext'
8
8
  import { areEqualSets } from '../helpers/areEqualSets'
9
9
  import {
package/src/index.ts CHANGED
@@ -18,7 +18,7 @@ export type { RNWTextProps, RNWViewProps } from './types-rnw'
18
18
  export { getHasConfigured, getConfig, getThemes, getTokens, onConfiguredOnce } from './config'
19
19
 
20
20
  export * from './constants/constants'
21
- export * from './constants/platform'
21
+ export * from '@tamagui/constants'
22
22
  export { createDOMProps } from '@tamagui/rnw'
23
23
 
24
24
  export * from './helpers/calc'
@@ -48,6 +48,7 @@ export * from './hooks/useConstant'
48
48
  export * from './hooks/useId'
49
49
  export * from './hooks/useIsMounted'
50
50
  export * from './hooks/useIsTouchDevice'
51
+
51
52
  export {
52
53
  configureMedia,
53
54
  getMedia,
@@ -1,10 +1,9 @@
1
1
  // via radix
2
2
 
3
3
  import { composeRefs } from '@tamagui/compose-refs'
4
+ import { isWeb } from '@tamagui/constants'
4
5
  import * as React from 'react'
5
6
 
6
- import { isWeb } from '../constants/platform'
7
-
8
7
  /* -------------------------------------------------------------------------------------------------
9
8
  * Slot
10
9
  * -----------------------------------------------------------------------------------------------*/
@@ -1,6 +1,7 @@
1
+ import { isClient, isRSC, isServer } from '@tamagui/constants'
2
+ import { useSetupHasSSRRendered } from '@tamagui/use-did-finish-ssr'
1
3
  import * as React from 'react'
2
4
 
3
- import { isClient, isRSC, isServer } from '../constants/platform'
4
5
  import { ButtonInsideButtonContext } from '../contexts/ButtonInsideButtonContext'
5
6
  import { TextAncestorProvider } from '../contexts/TextAncestorContext'
6
7
  import { useMediaQueryListeners } from '../hooks/useMedia'
@@ -22,6 +23,7 @@ export function TamaguiProvider({
22
23
  }
23
24
 
24
25
  if (!isServer) {
26
+ useSetupHasSSRRendered()
25
27
  useMediaQueryListeners(config)
26
28
  }
27
29
 
@@ -1,7 +1,7 @@
1
+ import { isWeb } from '@tamagui/constants'
1
2
  import { stylePropsTextOnly, validStyles } from '@tamagui/helpers'
2
3
  import { Text as TextView } from 'react-native'
3
4
 
4
- import { isWeb } from '../constants/platform'
5
5
  import { createComponent } from '../createComponent'
6
6
  import { TextProps, TextPropsBase } from '../types'
7
7
 
@@ -1,6 +1,6 @@
1
+ import { isWeb } from '@tamagui/constants'
1
2
  import React, { memo, useMemo } from 'react'
2
3
 
3
- import { isWeb } from '../constants/platform'
4
4
  import { variableToString } from '../createVariable'
5
5
  import { ThemeManager, ThemeManagerContext } from '../helpers/ThemeManager'
6
6
  import { ThemeProps, useChangeThemeEffect } from '../hooks/useTheme'
@@ -1,6 +1,6 @@
1
+ import { useIsomorphicLayoutEffect } from '@tamagui/constants'
1
2
  import React, { useState } from 'react'
2
3
 
3
- import { useIsomorphicLayoutEffect } from '../constants/platform'
4
4
  import { useDefaultThemeName, useThemeName } from '../hooks/useTheme'
5
5
  import { Theme } from './Theme'
6
6
 
@@ -1,6 +1,6 @@
1
+ import { isWeb } from '@tamagui/constants'
1
2
  import React, { useContext, useLayoutEffect, useState } from 'react'
2
3
 
3
- import { isWeb } from '../constants/platform'
4
4
  import { ThemeManagerContext } from '../helpers/ThemeManager'
5
5
  import { Theme } from './Theme'
6
6
 
@@ -1,4 +1,4 @@
1
- import { useEffect } from 'react';
1
+ import { useLayoutEffect } from 'react';
2
2
  export declare const isAndroid: boolean;
3
3
  export declare const isIOS: boolean;
4
4
  export declare const isWeb: boolean;
@@ -6,7 +6,7 @@ export declare const isWindowDefined: boolean;
6
6
  export declare const isServer: boolean;
7
7
  export declare const isClient: boolean;
8
8
  export declare const isRSC: any;
9
- export declare const useIsomorphicLayoutEffect: typeof useEffect;
9
+ export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
10
10
  export declare const isChrome: boolean;
11
11
  export declare const isWebTouchable: boolean;
12
12
  export declare const isTouchable: boolean;
@@ -0,0 +1,3 @@
1
+ export declare function useSetupHasSSRRendered(): void;
2
+ export declare function useDidFinishSSR(): boolean;
3
+ //# sourceMappingURL=useDidFinishSSR.d.ts.map
@@ -5,8 +5,8 @@ export declare function addMediaQueryListener(key: MediaQueryKey, cb: MediaListe
5
5
  export declare function removeMediaQueryListener(key: MediaQueryKey, cb: MediaListener): void;
6
6
  export declare const mediaQueryConfig: MediaQueries;
7
7
  export declare const getMedia: () => MediaQueryState;
8
+ export declare const getCurrentMediaState: () => MediaQueryState;
8
9
  export declare const configureMedia: (config: TamaguiInternalConfig) => void;
9
- export declare const getCurrentMediaState: () => MediaQueryState | null;
10
10
  export declare function useMediaQueryListeners(config: TamaguiInternalConfig): void;
11
11
  export declare function useMedia(): {
12
12
  [key in MediaQueryKey]: boolean;
package/types/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export * from './types';
15
15
  export type { RNWTextProps, RNWViewProps } from './types-rnw';
16
16
  export { getHasConfigured, getConfig, getThemes, getTokens, onConfiguredOnce } from './config';
17
17
  export * from './constants/constants';
18
- export * from './constants/platform';
18
+ export * from '@tamagui/constants';
19
19
  export { createDOMProps } from '@tamagui/rnw';
20
20
  export * from './helpers/calc';
21
21
  export * from './helpers/useShallowSetState';