@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.
- package/dist/cjs/addTheme.js +2 -2
- package/dist/cjs/addTheme.js.map +2 -2
- package/dist/cjs/constants/constants.js +2 -2
- package/dist/cjs/constants/constants.js.map +2 -2
- package/dist/cjs/createComponent.js +25 -25
- package/dist/cjs/createComponent.js.map +3 -3
- package/dist/cjs/createTamagui.js +3 -3
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createVariable.js +3 -3
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/helpers/calc.js +2 -2
- package/dist/cjs/helpers/calc.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js +5 -5
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/expandStyle.js +2 -2
- package/dist/cjs/helpers/expandStyle.js.map +2 -2
- package/dist/cjs/helpers/expandStyles.js +2 -2
- package/dist/cjs/helpers/expandStyles.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +11 -11
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/hooks/useDidFinishSSR.js +60 -0
- package/dist/cjs/hooks/useDidFinishSSR.js.map +7 -0
- package/dist/cjs/hooks/useIsMounted.js +2 -2
- package/dist/cjs/hooks/useIsMounted.js.map +2 -2
- package/dist/cjs/hooks/useIsSSR.js +3 -3
- package/dist/cjs/hooks/useIsSSR.js.map +2 -2
- package/dist/cjs/hooks/useIsTouchDevice.js +4 -4
- package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/cjs/hooks/useMedia.js +18 -5
- package/dist/cjs/hooks/useMedia.js.map +2 -2
- package/dist/cjs/hooks/useSafeRef.js +2 -2
- package/dist/cjs/hooks/useSafeRef.js.map +2 -2
- package/dist/cjs/hooks/useServerHooks.js +3 -3
- package/dist/cjs/hooks/useServerHooks.js.map +2 -2
- package/dist/cjs/hooks/useTheme.js +7 -7
- package/dist/cjs/hooks/useTheme.js.map +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/views/Slot.js +2 -2
- package/dist/cjs/views/Slot.js.map +2 -2
- package/dist/cjs/views/TamaguiProvider.js +6 -4
- package/dist/cjs/views/TamaguiProvider.js.map +2 -2
- package/dist/cjs/views/Text.js +5 -5
- package/dist/cjs/views/Text.js.map +2 -2
- package/dist/cjs/views/Theme.js +2 -2
- package/dist/cjs/views/Theme.js.map +2 -2
- package/dist/cjs/views/ThemeInverse.js +2 -2
- package/dist/cjs/views/ThemeInverse.js.map +2 -2
- package/dist/cjs/views/ThemeReset.js +2 -2
- package/dist/cjs/views/ThemeReset.js.map +2 -2
- package/dist/esm/addTheme.js +1 -1
- package/dist/esm/addTheme.js.map +2 -2
- package/dist/esm/constants/constants.js +1 -1
- package/dist/esm/constants/constants.js.map +1 -1
- package/dist/esm/createComponent.js +1 -1
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createTamagui.js +1 -1
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createVariable.js +1 -1
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/helpers/calc.js +1 -1
- package/dist/esm/helpers/calc.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +1 -1
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/expandStyle.js +1 -1
- package/dist/esm/helpers/expandStyle.js.map +1 -1
- package/dist/esm/helpers/expandStyles.js +1 -1
- package/dist/esm/helpers/expandStyles.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +1 -1
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/hooks/useDidFinishSSR.js +35 -0
- package/dist/esm/hooks/useDidFinishSSR.js.map +7 -0
- package/dist/esm/hooks/useIsMounted.js +1 -1
- package/dist/esm/hooks/useIsMounted.js.map +2 -2
- package/dist/esm/hooks/useIsSSR.js +1 -1
- package/dist/esm/hooks/useIsSSR.js.map +2 -2
- package/dist/esm/hooks/useIsTouchDevice.js +1 -1
- package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/esm/hooks/useMedia.js +17 -4
- package/dist/esm/hooks/useMedia.js.map +2 -2
- package/dist/esm/hooks/useSafeRef.js +1 -1
- package/dist/esm/hooks/useSafeRef.js.map +2 -2
- package/dist/esm/hooks/useServerHooks.js +1 -1
- package/dist/esm/hooks/useServerHooks.js.map +2 -2
- package/dist/esm/hooks/useTheme.js +1 -1
- package/dist/esm/hooks/useTheme.js.map +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/views/Slot.js +1 -1
- package/dist/esm/views/Slot.js.map +2 -2
- package/dist/esm/views/TamaguiProvider.js +3 -1
- package/dist/esm/views/TamaguiProvider.js.map +2 -2
- package/dist/esm/views/Text.js +1 -1
- package/dist/esm/views/Text.js.map +2 -2
- package/dist/esm/views/Theme.js +1 -1
- package/dist/esm/views/Theme.js.map +2 -2
- package/dist/esm/views/ThemeInverse.js +1 -1
- package/dist/esm/views/ThemeInverse.js.map +2 -2
- package/dist/esm/views/ThemeReset.js +1 -1
- package/dist/esm/views/ThemeReset.js.map +2 -2
- package/package.json +11 -10
- package/src/addTheme.ts +2 -1
- package/src/constants/constants.ts +1 -1
- package/src/createComponent.tsx +1 -1
- package/src/createTamagui.ts +2 -1
- package/src/createVariable.ts +1 -1
- package/src/helpers/calc.ts +2 -1
- package/src/helpers/createPropMapper.ts +2 -1
- package/src/helpers/expandStyle.ts +1 -1
- package/src/helpers/expandStyles.ts +2 -1
- package/src/helpers/getSplitStyles.tsx +1 -1
- package/src/hooks/useIsMounted.ts +1 -2
- package/src/hooks/useIsSSR.tsx +1 -1
- package/src/hooks/useIsTouchDevice.tsx +1 -2
- package/src/hooks/useMedia.tsx +24 -6
- package/src/hooks/useSafeRef.ts +1 -2
- package/src/hooks/useServerHooks.tsx +1 -2
- package/src/hooks/useTheme.tsx +1 -1
- package/src/index.ts +2 -1
- package/src/views/Slot.tsx +1 -2
- package/src/views/TamaguiProvider.tsx +3 -1
- package/src/views/Text.tsx +1 -1
- package/src/views/Theme.tsx +1 -1
- package/src/views/ThemeInverse.tsx +1 -1
- package/src/views/ThemeReset.tsx +1 -1
- package/types/constants/platform.d.ts +2 -2
- package/types/hooks/useDidFinishSSR.d.ts +3 -0
- package/types/hooks/useMedia.d.ts +1 -1
- 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'
|
package/src/createComponent.tsx
CHANGED
|
@@ -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'
|
package/src/createTamagui.ts
CHANGED
|
@@ -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'
|
package/src/createVariable.ts
CHANGED
package/src/helpers/calc.ts
CHANGED
|
@@ -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 '
|
|
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,
|
package/src/hooks/useIsSSR.tsx
CHANGED
|
@@ -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 = () => {
|
package/src/hooks/useMedia.tsx
CHANGED
|
@@ -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(
|
|
157
|
+
const [state, setState] = useState(getCurrentMediaState())
|
|
140
158
|
const keys = useSafeRef({} as Record<string, boolean>)
|
|
141
159
|
|
|
142
160
|
function updateState() {
|
package/src/hooks/useSafeRef.ts
CHANGED
package/src/hooks/useTheme.tsx
CHANGED
|
@@ -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 '
|
|
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,
|
package/src/views/Slot.tsx
CHANGED
|
@@ -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
|
|
package/src/views/Text.tsx
CHANGED
|
@@ -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
|
|
package/src/views/Theme.tsx
CHANGED
|
@@ -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
|
|
package/src/views/ThemeReset.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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;
|
|
@@ -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 '
|
|
18
|
+
export * from '@tamagui/constants';
|
|
19
19
|
export { createDOMProps } from '@tamagui/rnw';
|
|
20
20
|
export * from './helpers/calc';
|
|
21
21
|
export * from './helpers/useShallowSetState';
|