@tamagui/core 1.0.1-beta.192 → 1.0.1-beta.194
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/Tamagui.js +4 -2
- package/dist/cjs/Tamagui.js.map +2 -2
- package/dist/cjs/config.js +1 -2
- package/dist/cjs/config.js.map +2 -2
- package/dist/cjs/constants/constants.js +13 -8
- package/dist/cjs/constants/constants.js.map +2 -2
- package/dist/cjs/contexts/TextAncestorContext.js +3 -16
- package/dist/cjs/contexts/TextAncestorContext.js.map +3 -3
- package/dist/cjs/createComponent.js +196 -284
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createTamagui.js +15 -16
- package/dist/cjs/createTamagui.js.map +3 -3
- package/dist/cjs/createVariable.js +1 -2
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/helpers/ThemeManager.js +7 -14
- package/dist/cjs/helpers/ThemeManager.js.map +2 -2
- package/dist/cjs/helpers/{createShallowUpdate.js → cache.js} +20 -21
- package/dist/cjs/helpers/cache.js.map +7 -0
- package/dist/cjs/helpers/createMediaStyle.js +14 -8
- package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
- package/dist/cjs/helpers/extendStaticConfig.js +0 -1
- package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +214 -94
- package/dist/cjs/helpers/getSplitStyles.js.map +3 -3
- package/dist/cjs/helpers/getStylesAtomic.js +16 -36
- package/dist/cjs/helpers/getStylesAtomic.js.map +3 -3
- package/dist/cjs/helpers/getVariantExtras.js +2 -1
- package/dist/cjs/helpers/getVariantExtras.js.map +2 -2
- package/dist/cjs/helpers/insertStyleRule.js +14 -6
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/helpers/matchMedia.js.map +2 -2
- package/dist/cjs/helpers/mergeTransform.js.map +1 -1
- package/dist/cjs/helpers/normalizeValueWithProperty.js +32 -2
- package/dist/cjs/helpers/normalizeValueWithProperty.js.map +2 -2
- package/dist/cjs/helpers/proxyThemeVariables.js +2 -7
- package/dist/cjs/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/cjs/helpers/useShallowSetState.js.map +2 -2
- package/dist/cjs/hooks/getThemeUnwrapped.js +1 -3
- package/dist/cjs/hooks/getThemeUnwrapped.js.map +2 -2
- package/dist/cjs/hooks/useElementLayout.js +92 -0
- package/dist/cjs/hooks/useElementLayout.js.map +7 -0
- package/dist/cjs/hooks/useIsTouchDevice.js +2 -10
- package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/cjs/hooks/useMedia.js +79 -85
- package/dist/cjs/hooks/useMedia.js.map +2 -2
- package/dist/cjs/hooks/useMedia.test.js +2 -0
- package/dist/cjs/{helpers/validate.js.map → hooks/useMedia.test.js.map} +0 -0
- package/dist/cjs/hooks/usePressablePressResponder.js +370 -0
- package/dist/cjs/hooks/usePressablePressResponder.js.map +7 -0
- package/dist/cjs/hooks/useSafeRef.js +13 -15
- package/dist/cjs/hooks/useSafeRef.js.map +2 -2
- package/dist/cjs/hooks/useTheme.js +5 -5
- package/dist/cjs/hooks/useTheme.js.map +2 -2
- package/dist/cjs/index.js +1 -17
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/static.js +0 -20
- package/dist/cjs/static.js.map +2 -2
- package/dist/cjs/styled.js +4 -22
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/{hooks/useIsSSR.js → views/AbsoluteFill.js} +18 -23
- package/dist/cjs/views/AbsoluteFill.js.map +7 -0
- package/dist/cjs/views/AbsoluteFill.native.js +45 -0
- package/dist/cjs/views/AbsoluteFill.native.js.map +7 -0
- package/dist/cjs/views/FontLanguage.native.js.map +2 -2
- package/dist/cjs/views/Stack.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.js +3 -2
- package/dist/cjs/views/TamaguiProvider.js.map +2 -2
- package/dist/cjs/views/Text.js.map +1 -1
- package/dist/cjs/views/ThemeReset.js +10 -10
- package/dist/cjs/views/ThemeReset.js.map +2 -2
- package/dist/esm/Tamagui.js +4 -2
- package/dist/esm/Tamagui.js.map +2 -2
- package/dist/esm/config.js +1 -2
- package/dist/esm/config.js.map +2 -2
- package/dist/esm/constants/constants.js +11 -7
- package/dist/esm/constants/constants.js.map +2 -2
- package/dist/esm/contexts/TextAncestorContext.js +2 -13
- package/dist/esm/contexts/TextAncestorContext.js.map +2 -2
- package/dist/esm/createComponent.js +195 -286
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createTamagui.js +15 -16
- package/dist/esm/createTamagui.js.map +3 -3
- package/dist/esm/createVariable.js +1 -2
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/helpers/ThemeManager.js +7 -14
- package/dist/esm/helpers/ThemeManager.js.map +2 -2
- package/dist/esm/helpers/cache.js +18 -0
- package/dist/esm/helpers/cache.js.map +7 -0
- package/dist/esm/helpers/createMediaStyle.js +14 -8
- package/dist/esm/helpers/createMediaStyle.js.map +2 -2
- package/dist/esm/helpers/extendStaticConfig.js +0 -1
- package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +223 -95
- package/dist/esm/helpers/getSplitStyles.js.map +3 -3
- package/dist/esm/helpers/getStylesAtomic.js +13 -26
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/getVariantExtras.js +2 -1
- package/dist/esm/helpers/getVariantExtras.js.map +2 -2
- package/dist/esm/helpers/insertStyleRule.js +14 -6
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/helpers/matchMedia.js.map +2 -2
- package/dist/esm/helpers/mergeTransform.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.js +30 -1
- package/dist/esm/helpers/normalizeValueWithProperty.js.map +2 -2
- package/dist/esm/helpers/proxyThemeVariables.js +2 -7
- package/dist/esm/helpers/proxyThemeVariables.js.map +2 -2
- package/dist/esm/helpers/useShallowSetState.js.map +2 -2
- package/dist/esm/hooks/getThemeUnwrapped.js +1 -3
- package/dist/esm/hooks/getThemeUnwrapped.js.map +2 -2
- package/dist/esm/hooks/useElementLayout.js +66 -0
- package/dist/esm/hooks/useElementLayout.js.map +7 -0
- package/dist/esm/hooks/useIsTouchDevice.js +3 -11
- package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/esm/hooks/useMedia.js +76 -84
- package/dist/esm/hooks/useMedia.js.map +2 -2
- package/dist/esm/hooks/useMedia.test.js +1 -0
- package/dist/esm/{helpers/validate.js.map → hooks/useMedia.test.js.map} +0 -0
- package/dist/esm/hooks/usePressablePressResponder.js +346 -0
- package/dist/esm/hooks/usePressablePressResponder.js.map +7 -0
- package/dist/esm/hooks/useSafeRef.js +13 -15
- package/dist/esm/hooks/useSafeRef.js.map +2 -2
- package/dist/esm/hooks/useTheme.js +5 -5
- package/dist/esm/hooks/useTheme.js.map +2 -2
- package/dist/esm/index.js +1 -14
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/static.js +0 -14
- package/dist/esm/static.js.map +2 -2
- package/dist/esm/styled.js +4 -22
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/views/AbsoluteFill.js +17 -0
- package/dist/esm/views/AbsoluteFill.js.map +7 -0
- package/dist/esm/views/AbsoluteFill.native.js +21 -0
- package/dist/esm/views/AbsoluteFill.native.js.map +7 -0
- package/dist/esm/views/FontLanguage.native.js.map +2 -2
- package/dist/esm/views/Stack.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.js +5 -4
- package/dist/esm/views/TamaguiProvider.js.map +2 -2
- package/dist/esm/views/Text.js.map +1 -1
- package/dist/esm/views/ThemeReset.js +10 -10
- package/dist/esm/views/ThemeReset.js.map +2 -2
- package/package.json +14 -14
- package/src/Tamagui.ts +7 -3
- package/src/config.ts +2 -3
- package/src/constants/constants.ts +10 -6
- package/src/contexts/TextAncestorContext.tsx +1 -8
- package/src/createComponent.tsx +250 -412
- package/src/createTamagui.ts +16 -19
- package/src/createVariable.ts +1 -3
- package/src/helpers/ThemeManager.tsx +7 -15
- package/src/helpers/cache.ts +18 -0
- package/src/helpers/createMediaStyle.ts +16 -9
- package/src/helpers/createProxy.ts +16 -0
- package/src/helpers/extendStaticConfig.ts +0 -1
- package/src/helpers/getSplitStyles.tsx +259 -152
- package/src/helpers/getStylesAtomic.ts +14 -34
- package/src/helpers/getVariantExtras.tsx +2 -1
- package/src/helpers/insertStyleRule.tsx +16 -8
- package/src/helpers/matchMedia.ts +1 -0
- package/src/helpers/mergeTransform.ts +1 -1
- package/src/helpers/normalizeValueWithProperty.ts +30 -0
- package/src/helpers/proxyThemeVariables.tsx +3 -8
- package/src/helpers/useShallowSetState.tsx +0 -1
- package/src/hooks/getThemeUnwrapped.tsx +1 -2
- package/src/hooks/useElementLayout.tsx +90 -0
- package/src/hooks/useIsTouchDevice.tsx +3 -17
- package/src/hooks/useMedia.tsx +82 -88
- package/src/hooks/useSafeRef.ts +17 -18
- package/src/hooks/useTheme.tsx +6 -5
- package/src/index.ts +1 -11
- package/src/static.ts +0 -10
- package/src/styled.tsx +15 -33
- package/src/types.tsx +58 -55
- package/src/views/FontLanguage.native.tsx +1 -0
- package/src/views/Stack.tsx +1 -1
- package/src/views/TamaguiProvider.tsx +5 -5
- package/src/views/Text.tsx +1 -1
- package/src/views/ThemeReset.tsx +11 -11
- package/types/Tamagui.d.ts +6 -4
- package/types/constants/constants.d.ts +14 -3
- package/types/contexts/TextAncestorContext.d.ts +1 -3
- package/types/createComponent.d.ts +0 -15
- package/types/helpers/ThemeManager.d.ts +2 -3
- package/types/helpers/cache.d.ts +12 -0
- package/types/helpers/calc.d.ts +0 -16
- package/types/helpers/createMediaStyle.d.ts +1 -1
- package/types/helpers/createProxy.d.ts +2 -0
- package/types/helpers/getSplitStyles.d.ts +6 -10
- package/types/helpers/getStylesAtomic.d.ts +1 -5
- package/types/helpers/insertStyleRule.d.ts +2 -2
- package/types/helpers/mergeTransform.d.ts +1 -1
- package/types/helpers/normalizeValueWithProperty.d.ts +1 -0
- package/types/hooks/useElementLayout.d.ts +27 -0
- package/types/hooks/useMedia.d.ts +3 -1
- package/types/hooks/useMedia.test.d.ts +1 -0
- package/types/hooks/usePressablePressResponder.d.ts +84 -0
- package/types/index.d.ts +1 -11
- package/types/static.d.ts +0 -1
- package/types/types.d.ts +42 -44
- package/types/views/AbsoluteFill.d.ts +5 -0
- package/types/views/AbsoluteFill.native.d.ts +3 -0
- package/types/views/Stack.d.ts +1 -1
- package/types/views/Text.d.ts +1 -1
- package/dist/cjs/constants/platform.js +0 -74
- package/dist/cjs/constants/platform.js.map +0 -7
- package/dist/cjs/constants/platform.native.js +0 -62
- package/dist/cjs/constants/platform.native.js.map +0 -7
- package/dist/cjs/helpers/createShallowUpdate.js.map +0 -7
- package/dist/cjs/helpers/validate.js +0 -2
- package/dist/cjs/hooks/useDidFinishSSR.js +0 -60
- package/dist/cjs/hooks/useDidFinishSSR.js.map +0 -7
- package/dist/cjs/hooks/useIsSSR.js.map +0 -7
- package/dist/esm/constants/platform.js +0 -39
- package/dist/esm/constants/platform.js.map +0 -7
- package/dist/esm/constants/platform.native.js +0 -28
- package/dist/esm/constants/platform.native.js.map +0 -7
- package/dist/esm/helpers/createShallowUpdate.js +0 -20
- package/dist/esm/helpers/createShallowUpdate.js.map +0 -7
- package/dist/esm/helpers/validate.js +0 -1
- package/dist/esm/hooks/useDidFinishSSR.js +0 -35
- package/dist/esm/hooks/useDidFinishSSR.js.map +0 -7
- package/dist/esm/hooks/useIsSSR.js +0 -22
- package/dist/esm/hooks/useIsSSR.js.map +0 -7
- package/src/helpers/assignNativePropsToWeb.tsx +0 -178
- package/src/helpers/calc.ts +0 -68
- package/src/helpers/getFont.tsx +0 -43
- package/src/helpers/getStackSize.ts +0 -22
- package/src/helpers/startTransition.ts +0 -4
- package/src/hooks/useConstant.tsx +0 -19
- package/src/hooks/useIsMounted.ts +0 -16
- package/src/hooks/usePressable.tsx +0 -9
- package/src/hooks/useUnmountEffect.ts +0 -5
package/src/hooks/useSafeRef.ts
CHANGED
|
@@ -3,11 +3,12 @@ import { useRef } from 'react'
|
|
|
3
3
|
|
|
4
4
|
// dai-shi 🙏
|
|
5
5
|
// https://dev.to/uhyo_/a-concurrent-mode-safe-version-of-useref-1325
|
|
6
|
+
// probably can live without it though to save a bit of b
|
|
6
7
|
|
|
7
8
|
type Raw<T> = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
hold: boolean
|
|
10
|
+
next: T
|
|
11
|
+
cur: T
|
|
11
12
|
ref: { current: T }
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -17,32 +18,30 @@ export const useSafeRef = <T>(initialValue: T) => {
|
|
|
17
18
|
const raw: Raw<T> =
|
|
18
19
|
rawRef.current ??
|
|
19
20
|
(rawRef.current = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
hold: true,
|
|
22
|
+
next: initialValue,
|
|
23
|
+
cur: initialValue,
|
|
23
24
|
ref: {
|
|
24
25
|
get current() {
|
|
25
|
-
|
|
26
|
-
return raw.currentValue
|
|
27
|
-
} else {
|
|
28
|
-
return raw.comittedValue
|
|
29
|
-
}
|
|
26
|
+
return raw.hold ? raw.cur : raw.next
|
|
30
27
|
},
|
|
31
28
|
set current(v) {
|
|
32
|
-
if (!raw.
|
|
33
|
-
raw.
|
|
29
|
+
if (!raw.hold) {
|
|
30
|
+
raw.next = v
|
|
34
31
|
}
|
|
35
|
-
raw.
|
|
32
|
+
raw.cur = v
|
|
36
33
|
},
|
|
37
34
|
},
|
|
38
35
|
})
|
|
39
36
|
|
|
40
|
-
raw.
|
|
41
|
-
Promise.resolve().then(() =>
|
|
42
|
-
|
|
37
|
+
raw.hold = true
|
|
38
|
+
Promise.resolve().then(() => {
|
|
39
|
+
raw.hold = false
|
|
40
|
+
})
|
|
41
|
+
raw.cur = raw.next
|
|
43
42
|
|
|
44
43
|
useIsomorphicLayoutEffect(() => {
|
|
45
|
-
raw.
|
|
44
|
+
raw.next = raw.cur
|
|
46
45
|
})
|
|
47
46
|
|
|
48
47
|
return raw.ref
|
package/src/hooks/useTheme.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import { getConfig } from '../config'
|
|
|
6
6
|
import { isDevTools } from '../constants/isDevTools'
|
|
7
7
|
import { ThemeContext } from '../contexts/ThemeContext'
|
|
8
8
|
import { areEqualSets } from '../helpers/areEqualSets'
|
|
9
|
+
import { createProxy } from '../helpers/createProxy'
|
|
9
10
|
import {
|
|
10
11
|
GetNextThemeProps,
|
|
11
12
|
ThemeManager,
|
|
@@ -14,7 +15,6 @@ import {
|
|
|
14
15
|
} from '../helpers/ThemeManager'
|
|
15
16
|
import { ThemeName, ThemeParsed } from '../types'
|
|
16
17
|
import { GetThemeUnwrapped } from './getThemeUnwrapped'
|
|
17
|
-
import { useConstant } from './useConstant'
|
|
18
18
|
import { useServerRef } from './useServerHooks'
|
|
19
19
|
|
|
20
20
|
export interface ThemeProps {
|
|
@@ -111,7 +111,7 @@ function getThemeProxied(
|
|
|
111
111
|
state?: React.MutableRefObject<UseThemeState>,
|
|
112
112
|
debugProp?: boolean | 'verbose'
|
|
113
113
|
) {
|
|
114
|
-
return
|
|
114
|
+
return createProxy(theme, {
|
|
115
115
|
has(_, key) {
|
|
116
116
|
if (typeof key === 'string' && key[0] === '$') {
|
|
117
117
|
key = key.slice(1)
|
|
@@ -206,7 +206,7 @@ export const useChangeThemeEffect = (
|
|
|
206
206
|
if (process.env.NODE_ENV === 'development') {
|
|
207
207
|
if (!config) {
|
|
208
208
|
throw new Error(
|
|
209
|
-
`Missing tamagui config, you either have a duplicate config, or haven't set it up. Be sure createTamagui is called before
|
|
209
|
+
`Missing tamagui config, you either have a duplicate config, or haven't set it up. Be sure createTamagui is called before rendering.`
|
|
210
210
|
)
|
|
211
211
|
}
|
|
212
212
|
}
|
|
@@ -242,9 +242,10 @@ export const useChangeThemeEffect = (
|
|
|
242
242
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
243
243
|
const forceUpdate = forceUpdateProp || useForceUpdate()
|
|
244
244
|
|
|
245
|
-
const themeManager =
|
|
245
|
+
const themeManager = useMemo(() => {
|
|
246
246
|
return new ThemeManager(next.name, next.className, next.theme, parentManager, reset)
|
|
247
|
-
|
|
247
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
248
|
+
}, [])
|
|
248
249
|
|
|
249
250
|
// not concurrent safe but fixes native (but breaks SSR and not needed on web (i think) so leave only on native)
|
|
250
251
|
let didChange = false
|
package/src/index.ts
CHANGED
|
@@ -18,11 +18,8 @@ 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 { createDOMProps } from '@tamagui/rnw'
|
|
22
21
|
|
|
23
|
-
export * from './helpers/calc'
|
|
24
22
|
export * from './helpers/useShallowSetState'
|
|
25
|
-
export * from './helpers/getStackSize'
|
|
26
23
|
export * from './helpers/getVariantExtras'
|
|
27
24
|
export * from './helpers/getAnimationDriver'
|
|
28
25
|
export * from './helpers/getExpandedShorthands'
|
|
@@ -32,20 +29,15 @@ export * from './helpers/getStylesAtomic'
|
|
|
32
29
|
export * from './helpers/pseudoDescriptors'
|
|
33
30
|
export * from './helpers/mergeProps'
|
|
34
31
|
export * from './helpers/expandStyles'
|
|
35
|
-
export * from './helpers/getFont'
|
|
36
|
-
export * from './helpers/isObj'
|
|
37
32
|
export * from './helpers/isTamaguiElement'
|
|
38
33
|
export * from './helpers/isTamaguiComponent'
|
|
39
34
|
export * from './helpers/matchMedia'
|
|
40
|
-
export * from './helpers/startTransition'
|
|
41
35
|
export * from './helpers/themeable'
|
|
42
36
|
export * from './helpers/withStaticProperties'
|
|
43
37
|
|
|
44
38
|
export * from './contexts/ButtonInsideButtonContext'
|
|
45
39
|
|
|
46
|
-
export * from './hooks/useConstant'
|
|
47
40
|
export * from './hooks/useId'
|
|
48
|
-
export * from './hooks/useIsMounted'
|
|
49
41
|
export * from './hooks/useIsTouchDevice'
|
|
50
42
|
|
|
51
43
|
export {
|
|
@@ -59,15 +51,13 @@ export {
|
|
|
59
51
|
removeMediaQueryListener,
|
|
60
52
|
mediaQueryConfig,
|
|
61
53
|
} from './hooks/useMedia'
|
|
62
|
-
export * from './hooks/usePressable'
|
|
63
54
|
export * from './hooks/useTheme'
|
|
64
|
-
export * from './hooks/useUnmountEffect'
|
|
65
55
|
export * from './hooks/useSafeRef'
|
|
66
56
|
|
|
67
57
|
export * from './views/Slot'
|
|
68
58
|
export * from './views/Stack'
|
|
69
59
|
export * from './views/Text'
|
|
70
|
-
export
|
|
60
|
+
export * from './contexts/TextAncestorContext'
|
|
71
61
|
export * from './views/Theme'
|
|
72
62
|
export * from './views/ThemeInverse'
|
|
73
63
|
export * from './views/ThemeProvider'
|
package/src/static.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
// only stuff that gets extracted or needed by tamagui-static
|
|
2
|
-
|
|
3
2
|
export * from './index'
|
|
4
3
|
|
|
5
4
|
// for static
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
createDOMProps,
|
|
9
|
-
useElementLayout,
|
|
10
|
-
useMergeRefs,
|
|
11
|
-
usePlatformMethods,
|
|
12
|
-
useResponderEvents,
|
|
13
|
-
} from '@tamagui/rnw'
|
|
14
|
-
|
|
15
5
|
export * from './helpers/proxyThemeVariables'
|
package/src/styled.tsx
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getConfig } from './config'
|
|
3
2
|
import { createComponent } from './createComponent'
|
|
4
|
-
import { TamaguiReactElement, isTamaguiElement } from './helpers/isTamaguiElement'
|
|
5
|
-
import { RNComponents } from './helpers/RNComponents'
|
|
6
3
|
import {
|
|
7
4
|
GetProps,
|
|
8
5
|
GetVariantValues,
|
|
@@ -52,12 +49,14 @@ export function styled<
|
|
|
52
49
|
},
|
|
53
50
|
staticExtractionOptions?: Partial<StaticConfig>
|
|
54
51
|
) {
|
|
55
|
-
//
|
|
56
|
-
//
|
|
52
|
+
// allows passing styled(<H1 bc="red" />)
|
|
53
|
+
// but to get types right would be tricky
|
|
54
|
+
// if (isValidElement(Component) && isTamaguiComponent(Component.type)) {
|
|
57
55
|
// const props = Component.props
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
//
|
|
56
|
+
// if (props && typeof props === 'object') {
|
|
57
|
+
// Component = Component.type as any
|
|
58
|
+
// options = options ? ({ ...props, ...options } as any) : props
|
|
59
|
+
// }
|
|
61
60
|
// }
|
|
62
61
|
|
|
63
62
|
const staticConfigProps = (() => {
|
|
@@ -84,31 +83,15 @@ export function styled<
|
|
|
84
83
|
if (defaultVariants) {
|
|
85
84
|
Object.assign(defaultProps, defaultVariants)
|
|
86
85
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (RNComponents.has(Component['displayName'])) {
|
|
91
|
-
RNComponents.add(Component)
|
|
92
|
-
isReactNativeWeb = true
|
|
93
|
-
} else {
|
|
94
|
-
// assuming some sort of non-tamagui non-rn view, will always use style={}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
86
|
+
const isReactNativeWeb = Boolean(
|
|
87
|
+
parentStaticConfig?.isReactNativeWeb || staticExtractionOptions?.isReactNativeWeb
|
|
88
|
+
)
|
|
97
89
|
const reactNativeWebComponent = isReactNativeWeb
|
|
98
90
|
? parentStaticConfig?.reactNativeWebComponent || Component
|
|
99
91
|
: null
|
|
100
92
|
const isTamagui = !isReactNativeWeb && !!parentStaticConfig
|
|
101
93
|
const Comp = reactNativeWebComponent || (Component as any)
|
|
102
|
-
const
|
|
103
|
-
staticExtractionOptions?.isImage || parentStaticConfig?.isImage || Comp === Image
|
|
104
|
-
)
|
|
105
|
-
const isInput = Boolean(
|
|
106
|
-
staticExtractionOptions?.isInput || parentStaticConfig?.isInput || Comp === TextInput
|
|
107
|
-
)
|
|
108
|
-
const isText = Boolean(
|
|
109
|
-
isInput || staticExtractionOptions?.isText || parentStaticConfig?.isText || Comp === Text
|
|
110
|
-
)
|
|
111
|
-
|
|
94
|
+
const isText = Boolean(staticExtractionOptions?.isText || parentStaticConfig?.isText)
|
|
112
95
|
const acceptsClassName = acceptsClassNameProp ?? (isTamagui || isReactNativeWeb)
|
|
113
96
|
|
|
114
97
|
const conf: Partial<StaticConfig> = {
|
|
@@ -116,7 +99,6 @@ export function styled<
|
|
|
116
99
|
...(!isTamagui && {
|
|
117
100
|
Component: Comp,
|
|
118
101
|
}),
|
|
119
|
-
isTamagui,
|
|
120
102
|
// this type gets messed up by options?: Partial<GetProps<ParentComponent>> above
|
|
121
103
|
// take away the Partial<> and it's fine
|
|
122
104
|
variants,
|
|
@@ -126,9 +108,7 @@ export function styled<
|
|
|
126
108
|
isReactNativeWeb,
|
|
127
109
|
// for nesting multiple levels of rnw styled() need keep use the OG component
|
|
128
110
|
reactNativeWebComponent,
|
|
129
|
-
isInput,
|
|
130
111
|
isText,
|
|
131
|
-
isImage,
|
|
132
112
|
acceptsClassName,
|
|
133
113
|
}
|
|
134
114
|
|
|
@@ -170,12 +150,14 @@ export function styled<
|
|
|
170
150
|
// add in pseudos
|
|
171
151
|
PseudoProps<Partial<OurPropsBase>>
|
|
172
152
|
|
|
173
|
-
|
|
153
|
+
type StyledComponent = TamaguiComponent<
|
|
174
154
|
Props,
|
|
175
155
|
TamaguiElement,
|
|
176
156
|
ParentPropsBase,
|
|
177
157
|
ParentVariants & OurVariants
|
|
178
158
|
>
|
|
159
|
+
|
|
160
|
+
return component as StyledComponent
|
|
179
161
|
}
|
|
180
162
|
|
|
181
163
|
// import { Stack } from './views/Stack'
|
package/src/types.tsx
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// TODO split this into own package @tamagui/types to share with animations packages
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import React, { RefObject } from 'react'
|
|
5
|
-
import {
|
|
3
|
+
import type {
|
|
6
4
|
GestureResponderEvent,
|
|
7
5
|
Image,
|
|
8
6
|
PressableProps,
|
|
@@ -13,14 +11,23 @@ import {
|
|
|
13
11
|
View,
|
|
14
12
|
ViewProps,
|
|
15
13
|
ViewStyle,
|
|
16
|
-
} from 'react-native'
|
|
17
|
-
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
} from '@tamagui/types-react-native'
|
|
15
|
+
import type { Properties } from 'csstype'
|
|
16
|
+
import type {
|
|
17
|
+
Component,
|
|
18
|
+
ForwardRefExoticComponent,
|
|
19
|
+
FunctionComponent,
|
|
20
|
+
ReactNode,
|
|
21
|
+
RefAttributes,
|
|
22
|
+
RefObject,
|
|
23
|
+
} from 'react'
|
|
24
|
+
|
|
25
|
+
import type { Variable } from './createVariable'
|
|
26
|
+
import type { ResolveVariableTypes } from './helpers/createPropMapper'
|
|
27
|
+
import type { TamaguiReactElement } from './static'
|
|
28
|
+
import type { RNWTextProps, RNWViewProps } from './types-rnw'
|
|
29
|
+
import type { FontLanguageProps } from './views/FontLanguage.types'
|
|
30
|
+
import type { ThemeProviderProps } from './views/ThemeProvider'
|
|
24
31
|
|
|
25
32
|
export type SpaceDirection = 'vertical' | 'horizontal' | 'both'
|
|
26
33
|
|
|
@@ -35,7 +42,7 @@ export type TamaguiComponentPropsBase = {
|
|
|
35
42
|
asChild?: boolean
|
|
36
43
|
space?: SpaceTokens | null
|
|
37
44
|
spaceDirection?: SpaceDirection
|
|
38
|
-
separator?:
|
|
45
|
+
separator?: ReactNode
|
|
39
46
|
dangerouslySetInnerHTML?: { __html: string }
|
|
40
47
|
animation?: AnimationProp
|
|
41
48
|
animateOnly?: string[]
|
|
@@ -63,8 +70,8 @@ export type TamaguiComponentPropsBase = {
|
|
|
63
70
|
onMouseDown?: (e: MouseEvent) => any
|
|
64
71
|
}
|
|
65
72
|
|
|
66
|
-
export type ReactComponentWithRef<Props, Ref> =
|
|
67
|
-
Props &
|
|
73
|
+
export type ReactComponentWithRef<Props, Ref> = ForwardRefExoticComponent<
|
|
74
|
+
Props & RefAttributes<Ref>
|
|
68
75
|
>
|
|
69
76
|
|
|
70
77
|
export type ConfigListener = (conf: TamaguiInternalConfig) => void
|
|
@@ -275,6 +282,7 @@ export type SpacerProps = Omit<StackProps, 'flex' | 'direction' | 'size'> &
|
|
|
275
282
|
SpacerOwnProps
|
|
276
283
|
|
|
277
284
|
export type CreateTamaguiProps = {
|
|
285
|
+
reactNative?: any
|
|
278
286
|
shorthands?: CreateShorthands
|
|
279
287
|
media?: GenericTamaguiConfig['media']
|
|
280
288
|
animations?: AnimationDriver<any>
|
|
@@ -357,6 +365,7 @@ export type TamaguiInternalConfig<
|
|
|
357
365
|
getCSS: () => string
|
|
358
366
|
parsed: boolean
|
|
359
367
|
inverseShorthands: Record<string, string>
|
|
368
|
+
reactNative?: any
|
|
360
369
|
}
|
|
361
370
|
|
|
362
371
|
export type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animations']
|
|
@@ -364,7 +373,7 @@ export type GetAnimationKeys<A extends GenericTamaguiConfig> = keyof A['animatio
|
|
|
364
373
|
// prevents const intersections from being clobbered into string, keeping the consts
|
|
365
374
|
export type UnionableString = string & {}
|
|
366
375
|
export type UnionableNumber = number & {}
|
|
367
|
-
export type PropTypes<A extends TamaguiComponent> = A extends
|
|
376
|
+
export type PropTypes<A extends TamaguiComponent> = A extends FunctionComponent<infer Props>
|
|
368
377
|
? Props
|
|
369
378
|
: unknown
|
|
370
379
|
|
|
@@ -671,7 +680,7 @@ type StaticComponentObject = {
|
|
|
671
680
|
export type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, 'children'>> & {
|
|
672
681
|
config: TamaguiInternalConfig
|
|
673
682
|
disableInjectCSS?: boolean
|
|
674
|
-
children?:
|
|
683
|
+
children?: ReactNode
|
|
675
684
|
}
|
|
676
685
|
|
|
677
686
|
export type PropMapper = (
|
|
@@ -705,16 +714,7 @@ export type GenericVariantDefinitions = {
|
|
|
705
714
|
}
|
|
706
715
|
}
|
|
707
716
|
|
|
708
|
-
export type
|
|
709
|
-
Component?: React.FunctionComponent<any> & StaticComponentObject
|
|
710
|
-
|
|
711
|
-
variants?: GenericVariantDefinitions
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
* Used for applying sub theme style
|
|
715
|
-
*/
|
|
716
|
-
componentName?: string
|
|
717
|
-
|
|
717
|
+
export type StaticConfigPublic = {
|
|
718
718
|
/**
|
|
719
719
|
* (compiler) If you need to pass context or something, prevents from ever
|
|
720
720
|
* flattening. The 'jsx' option means it will never flatten. if you
|
|
@@ -727,26 +727,11 @@ export type StaticConfig = {
|
|
|
727
727
|
*/
|
|
728
728
|
isText?: boolean
|
|
729
729
|
|
|
730
|
-
/**
|
|
731
|
-
* Attempts to attach focus styles at runtime (useful for native)
|
|
732
|
-
*/
|
|
733
|
-
isInput?: boolean
|
|
734
|
-
|
|
735
|
-
/**
|
|
736
|
-
* React native web images need special handling for className support
|
|
737
|
-
*/
|
|
738
|
-
isImage?: boolean
|
|
739
|
-
|
|
740
730
|
/**
|
|
741
731
|
* Which style keys are allowed to be extracted.
|
|
742
732
|
*/
|
|
743
733
|
validStyles?: { [key: string]: boolean }
|
|
744
734
|
|
|
745
|
-
/**
|
|
746
|
-
* Same as React.defaultProps, be sure to sync
|
|
747
|
-
*/
|
|
748
|
-
defaultProps: Record<string, any>
|
|
749
|
-
|
|
750
735
|
/**
|
|
751
736
|
* (compiler) If these props are encountered, bail on all optimization.
|
|
752
737
|
*/
|
|
@@ -777,14 +762,37 @@ export type StaticConfig = {
|
|
|
777
762
|
isZStack?: boolean
|
|
778
763
|
|
|
779
764
|
/**
|
|
780
|
-
*
|
|
765
|
+
* Auto-detect, but can override, passes styles properly to react-native-web
|
|
781
766
|
*/
|
|
782
|
-
|
|
767
|
+
isReactNativeWeb?: boolean
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* By default if styled() doesn't recognize a parent Tamagui compoent or specific react-native views,
|
|
771
|
+
* it will assume the passed in component only accepts style={} for react-native compatibility.
|
|
772
|
+
* Setting `acceptsClassName: true` indicates Tamagui can pass in className props.
|
|
773
|
+
*/
|
|
774
|
+
acceptsClassName?: boolean
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
export type StaticConfig = StaticConfigPublic & {
|
|
778
|
+
Component?: FunctionComponent<any> & StaticComponentObject
|
|
779
|
+
|
|
780
|
+
variants?: GenericVariantDefinitions
|
|
783
781
|
|
|
784
782
|
/**
|
|
785
|
-
*
|
|
783
|
+
* Used for applying sub theme style
|
|
786
784
|
*/
|
|
787
|
-
|
|
785
|
+
componentName?: string
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Same as React.defaultProps, be sure to sync
|
|
789
|
+
*/
|
|
790
|
+
defaultProps: Record<string, any>
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Merges into defaultProps later on, used internally yonly
|
|
794
|
+
*/
|
|
795
|
+
defaultVariants?: { [key: string]: any }
|
|
788
796
|
|
|
789
797
|
/**
|
|
790
798
|
* Used internally to keep reference to the original rnw component
|
|
@@ -796,11 +804,6 @@ export type StaticConfig = {
|
|
|
796
804
|
*/
|
|
797
805
|
memo?: boolean
|
|
798
806
|
|
|
799
|
-
/**
|
|
800
|
-
* Auto-detect, but can ovverride, passes styles properly to react-native-web
|
|
801
|
-
*/
|
|
802
|
-
isTamagui?: boolean
|
|
803
|
-
|
|
804
807
|
/**
|
|
805
808
|
* Used internally to handle extractable HoC separate
|
|
806
809
|
*/
|
|
@@ -829,8 +832,8 @@ export type StylableComponent =
|
|
|
829
832
|
| TamaguiComponent
|
|
830
833
|
// * excessively deep type instantiation
|
|
831
834
|
// | TamaguiReactElement
|
|
832
|
-
|
|
|
833
|
-
|
|
|
835
|
+
| Component
|
|
836
|
+
| ForwardRefExoticComponent<any>
|
|
834
837
|
| ReactComponentWithRef<any, any>
|
|
835
838
|
| (new (props: any) => any)
|
|
836
839
|
| typeof View
|
|
@@ -859,7 +862,7 @@ export type GetProps<A extends StylableComponent> = A extends TamaguiComponent<i
|
|
|
859
862
|
? Props
|
|
860
863
|
: A extends TamaguiReactElement<infer Props>
|
|
861
864
|
? Props
|
|
862
|
-
: A extends
|
|
865
|
+
: A extends Component<infer Props>
|
|
863
866
|
? GetGenericComponentTamaguiProps<Props>
|
|
864
867
|
: A extends new (props: infer Props) => any
|
|
865
868
|
? GetGenericComponentTamaguiProps<Props>
|
|
@@ -1275,13 +1278,13 @@ export type UniversalAnimatedNumber<A> = {
|
|
|
1275
1278
|
}
|
|
1276
1279
|
|
|
1277
1280
|
export type AnimationDriver<A extends AnimationConfig = AnimationConfig> = {
|
|
1278
|
-
|
|
1281
|
+
isReactNativeWeb?: boolean
|
|
1279
1282
|
useAnimations: UseAnimationHook
|
|
1280
1283
|
useAnimatedNumber: (initial: number) => UniversalAnimatedNumber<any>
|
|
1281
1284
|
useAnimatedNumberStyle: <V extends UniversalAnimatedNumber<any>>(
|
|
1282
1285
|
val: V,
|
|
1283
1286
|
getStyle: (current: any) => any
|
|
1284
|
-
) =>
|
|
1287
|
+
) => any
|
|
1285
1288
|
useAnimatedNumberReaction: (
|
|
1286
1289
|
val: UniversalAnimatedNumber<any>,
|
|
1287
1290
|
onValue: (current: number) => void
|
|
@@ -4,6 +4,7 @@ import { FontLanguageContext } from '../contexts/FontLanguageContext'
|
|
|
4
4
|
import { FontLanguageProps } from './FontLanguage.types'
|
|
5
5
|
|
|
6
6
|
export const FontLanguage = ({ children, ...props }: FontLanguageProps) => {
|
|
7
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7
8
|
const value = useMemo(() => props, [JSON.stringify(props)])
|
|
8
9
|
return <FontLanguageContext.Provider value={value}>{children}</FontLanguageContext.Provider>
|
|
9
10
|
}
|
package/src/views/Stack.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import { isClient, isRSC, isServer } from '@tamagui/constants'
|
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
4
|
import { ButtonInsideButtonContext } from '../contexts/ButtonInsideButtonContext'
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { TextAncestorContext } from '../contexts/TextAncestorContext'
|
|
6
|
+
import { useMediaListeners } from '../hooks/useMedia'
|
|
7
7
|
import type { TamaguiProviderProps } from '../types'
|
|
8
8
|
import { ThemeProvider } from './ThemeProvider'
|
|
9
9
|
|
|
@@ -22,7 +22,7 @@ export function TamaguiProvider({
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
if (!isServer) {
|
|
25
|
-
|
|
25
|
+
useMediaListeners(config)
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
if (isClient) {
|
|
@@ -41,7 +41,7 @@ export function TamaguiProvider({
|
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
43
|
<ButtonInsideButtonContext.Provider value={false}>
|
|
44
|
-
<
|
|
44
|
+
<TextAncestorContext.Provider value={false}>
|
|
45
45
|
<ThemeProvider
|
|
46
46
|
defaultTheme={config.defaultTheme || 'light'}
|
|
47
47
|
themeClassNameOnRoot={config.themeClassNameOnRoot}
|
|
@@ -50,7 +50,7 @@ export function TamaguiProvider({
|
|
|
50
50
|
>
|
|
51
51
|
{children}
|
|
52
52
|
</ThemeProvider>
|
|
53
|
-
</
|
|
53
|
+
</TextAncestorContext.Provider>
|
|
54
54
|
</ButtonInsideButtonContext.Provider>
|
|
55
55
|
)
|
|
56
56
|
}
|
package/src/views/Text.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isWeb } from '@tamagui/constants'
|
|
2
2
|
import { stylePropsTextOnly, validStyles } from '@tamagui/helpers'
|
|
3
|
-
import { Text as TextView } from 'react-native'
|
|
3
|
+
import type { Text as TextView } from '@tamagui/types-react-native'
|
|
4
4
|
|
|
5
5
|
import { createComponent } from '../createComponent'
|
|
6
6
|
import { TextProps, TextPropsBase } from '../types'
|
package/src/views/ThemeReset.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isClient
|
|
1
|
+
import { isClient } from '@tamagui/constants'
|
|
2
2
|
import React, { useContext, useLayoutEffect, useState } from 'react'
|
|
3
3
|
|
|
4
4
|
import { ThemeManagerContext } from '../helpers/ThemeManager'
|
|
@@ -9,7 +9,7 @@ React['createElement']
|
|
|
9
9
|
|
|
10
10
|
// resets the theme to the parent theme
|
|
11
11
|
export const ThemeReset = (props: { children?: any }) => {
|
|
12
|
-
const
|
|
12
|
+
const manager = useContext(ThemeManagerContext)
|
|
13
13
|
const [name, setName] = useState<string | null>(null)
|
|
14
14
|
|
|
15
15
|
// this component doesn't work with SSR, so must run only client side
|
|
@@ -17,21 +17,21 @@ export const ThemeReset = (props: { children?: any }) => {
|
|
|
17
17
|
// that changes to dark initially also go through and change all of these
|
|
18
18
|
if (isClient) {
|
|
19
19
|
useLayoutEffect(() => {
|
|
20
|
-
if (!
|
|
21
|
-
if (name !==
|
|
22
|
-
setName(
|
|
20
|
+
if (!manager) return
|
|
21
|
+
if (name !== manager.parentName) {
|
|
22
|
+
setName(manager.parentName)
|
|
23
23
|
}
|
|
24
|
-
}, [name,
|
|
24
|
+
}, [name, manager, manager?.parentName])
|
|
25
25
|
|
|
26
26
|
useLayoutEffect(() => {
|
|
27
|
-
if (!
|
|
28
|
-
return
|
|
29
|
-
setName(
|
|
27
|
+
if (!manager) return
|
|
28
|
+
return manager.onChangeTheme(() => {
|
|
29
|
+
setName(manager.parentName)
|
|
30
30
|
})
|
|
31
|
-
}, [
|
|
31
|
+
}, [manager])
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
if (!
|
|
34
|
+
if (!manager || !props.children) {
|
|
35
35
|
return props.children || null
|
|
36
36
|
}
|
|
37
37
|
|
package/types/Tamagui.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as Helpers from '@tamagui/helpers';
|
|
2
|
-
import * as rnw from '@tamagui/rnw';
|
|
3
2
|
declare class TamaguiManager {
|
|
4
|
-
rnw: typeof rnw;
|
|
5
3
|
Helpers: typeof Helpers;
|
|
4
|
+
get mediaState(): {
|
|
5
|
+
[x: `$${string}`]: boolean;
|
|
6
|
+
[x: `$${number}`]: boolean;
|
|
7
|
+
};
|
|
6
8
|
get config(): import("./types").TamaguiInternalConfig<import("./types").CreateTokens<import("./types").VariableVal>, {
|
|
7
9
|
[key: string]: Partial<import("./types").TamaguiBaseTheme> & {
|
|
8
10
|
[key: string]: import("./types").VariableVal;
|
|
@@ -16,8 +18,8 @@ declare class TamaguiManager {
|
|
|
16
18
|
[key: string]: any;
|
|
17
19
|
};
|
|
18
20
|
}, import("./types").GenericFonts>;
|
|
19
|
-
get insertedRules():
|
|
20
|
-
get allSelectors():
|
|
21
|
+
get insertedRules(): (boolean | string[])[];
|
|
22
|
+
get allSelectors(): Record<string, string>;
|
|
21
23
|
get allTransforms(): {};
|
|
22
24
|
get identifierToValue(): Map<string, any>;
|
|
23
25
|
}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
export declare const THEME_NAME_SEPARATOR = "_";
|
|
2
2
|
export declare const THEME_CLASSNAME_PREFIX = "t_";
|
|
3
|
+
export declare const webOnlyDefaultStyles: {
|
|
4
|
+
display: string;
|
|
5
|
+
flexBasis: string;
|
|
6
|
+
boxSizing: string;
|
|
7
|
+
position: string;
|
|
8
|
+
minHeight: number;
|
|
9
|
+
minWidth: number;
|
|
10
|
+
};
|
|
3
11
|
export declare const stackDefaultStyles: {
|
|
4
|
-
display
|
|
5
|
-
flexBasis
|
|
6
|
-
boxSizing
|
|
12
|
+
display: string;
|
|
13
|
+
flexBasis: string;
|
|
14
|
+
boxSizing: string;
|
|
15
|
+
position: string;
|
|
16
|
+
minHeight: number;
|
|
17
|
+
minWidth: number;
|
|
7
18
|
alignItems: string;
|
|
8
19
|
flexShrink: number;
|
|
9
20
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const TextAncestorContext: any;
|
|
4
|
-
export declare const TextAncestorProvider: (props: any) => JSX.Element;
|
|
2
|
+
export declare const TextAncestorContext: React.Context<boolean>;
|
|
5
3
|
//# sourceMappingURL=TextAncestorContext.d.ts.map
|