@tamagui/core 1.0.1-beta.139 → 1.0.1-beta.140
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/helpers/createTamaguiProvider.js +3 -1
- package/dist/cjs/helpers/createTamaguiProvider.js.map +2 -2
- package/dist/esm/helpers/createTamaguiProvider.js +4 -2
- package/dist/esm/helpers/createTamaguiProvider.js.map +2 -2
- package/package.json +8 -8
- package/types/Tamagui.d.ts +0 -0
- package/types/addTheme.d.ts +0 -0
- package/types/conf.d.ts +0 -0
- package/types/constants/constants.d.ts +0 -0
- package/types/constants/platform.d.ts +2 -2
- package/types/contexts/ButtonInsideButtonContext.d.ts +0 -0
- package/types/contexts/FontLanguageContext.d.ts +0 -0
- package/types/contexts/TextAncestorContext.d.ts +0 -0
- package/types/contexts/ThemeContext.d.ts +0 -0
- package/types/createComponent.d.ts +0 -0
- package/types/createFont.d.ts +0 -0
- package/types/createShorthands.d.ts +0 -0
- package/types/createTamagui.d.ts +0 -0
- package/types/createTheme.d.ts +0 -0
- package/types/createTokens.d.ts +0 -0
- package/types/createVariable.d.ts +0 -0
- package/types/createVariables.d.ts +0 -0
- package/types/helpers/RNComponents.d.ts +0 -0
- package/types/helpers/ThemeManager.d.ts +0 -0
- package/types/helpers/areEqualSets.d.ts +0 -0
- package/types/helpers/assignNativePropsToWeb.d.ts +0 -0
- package/types/helpers/assignNativePropsToWeb.native.d.ts +0 -0
- package/types/helpers/calc.d.ts +0 -0
- package/types/helpers/createMediaStyle.d.ts +0 -0
- package/types/helpers/createPropMapper.d.ts +0 -0
- package/types/helpers/createShallowUpdate.d.ts +0 -0
- package/types/helpers/createTamaguiProvider.d.ts +0 -1
- package/types/helpers/cssHash.d.ts +0 -0
- package/types/helpers/expandStyle.d.ts +0 -0
- package/types/helpers/expandStyles.d.ts +0 -0
- package/types/helpers/extendStaticConfig.d.ts +0 -0
- package/types/helpers/fixNativeShadow.d.ts +0 -0
- package/types/helpers/getExpandedShorthands.d.ts +0 -0
- package/types/helpers/getFont.d.ts +0 -0
- package/types/helpers/getFontLanguage.d.ts +0 -0
- package/types/helpers/getSize.d.ts +0 -0
- package/types/helpers/getSplitStyles.d.ts +0 -0
- package/types/helpers/getStackSize.d.ts +0 -0
- package/types/helpers/getStylesAtomic.d.ts +0 -0
- package/types/helpers/getStylesAtomic.native.d.ts +0 -0
- package/types/helpers/getThemeCSSRules.d.ts +0 -0
- package/types/helpers/getThemeCSSRules.native.d.ts +0 -0
- package/types/helpers/getVariantExtras.d.ts +0 -0
- package/types/helpers/insertStyleRule.d.ts +0 -0
- package/types/helpers/isObj.d.ts +0 -0
- package/types/helpers/isTamaguiComponent.d.ts +0 -0
- package/types/helpers/isTamaguiElement.d.ts +0 -0
- package/types/helpers/matchMedia.d.ts +0 -0
- package/types/helpers/matchMedia.native.d.ts +0 -0
- package/types/helpers/mergeProps.d.ts +0 -0
- package/types/helpers/mergeTransform.d.ts +0 -0
- package/types/helpers/normalizeColor.d.ts +0 -0
- package/types/helpers/normalizeValueWithProperty.d.ts +0 -0
- package/types/helpers/proxyThemeVariables.d.ts +0 -0
- package/types/helpers/pseudoDescriptors.d.ts +0 -0
- package/types/helpers/registerCSSVariable.d.ts +0 -0
- package/types/helpers/startTransition.d.ts +0 -0
- package/types/helpers/themeable.d.ts +0 -0
- package/types/helpers/themes.d.ts +0 -0
- package/types/helpers/validate.d.ts +0 -0
- package/types/helpers/withStaticProperties.d.ts +0 -0
- package/types/hooks/getThemeUnwrapped.d.ts +0 -0
- package/types/hooks/useConstant.d.ts +0 -0
- package/types/hooks/useFeatures.d.ts +0 -0
- package/types/hooks/useId.d.ts +0 -0
- package/types/hooks/useIsMounted.d.ts +0 -0
- package/types/hooks/useIsSSR.d.ts +0 -0
- package/types/hooks/useIsTouchDevice.d.ts +0 -0
- package/types/hooks/useMedia.d.ts +0 -0
- package/types/hooks/usePressable.d.ts +0 -0
- package/types/hooks/useSafeRef.d.ts +0 -0
- package/types/hooks/useTheme.d.ts +0 -0
- package/types/hooks/useUnmountEffect.d.ts +0 -0
- package/types/index.d.ts +0 -0
- package/types/insertFont.d.ts +0 -0
- package/types/static.d.ts +0 -0
- package/types/styled.d.ts +0 -0
- package/types/types-rnw.d.ts +0 -0
- package/types/types.d.ts +0 -0
- package/types/updateTheme.d.ts +0 -0
- package/types/vendor/Pressability.d.ts +0 -0
- package/types/vendor/Pressability.native.d.ts +0 -0
- package/types/views/FontLanguage.d.ts +0 -0
- package/types/views/FontLanguage.native.d.ts +0 -0
- package/types/views/FontLanguage.types.d.ts +0 -0
- package/types/views/Slot.d.ts +0 -0
- package/types/views/Stack.d.ts +0 -0
- package/types/views/Text.d.ts +0 -0
- package/types/views/Theme.d.ts +0 -0
- package/types/views/ThemeInverse.d.ts +0 -0
- package/types/views/ThemeProvider.d.ts +0 -0
- package/types/views/ThemeReset.d.ts +0 -0
|
@@ -36,8 +36,10 @@ function createTamaguiProvider(config) {
|
|
|
36
36
|
children,
|
|
37
37
|
...themePropsProvider
|
|
38
38
|
}) {
|
|
39
|
-
if (import_platform.
|
|
39
|
+
if (!import_platform.isSSR) {
|
|
40
40
|
(0, import_useMedia.useMediaQueryListeners)();
|
|
41
|
+
}
|
|
42
|
+
if (import_platform.isClient) {
|
|
41
43
|
React.useLayoutEffect(() => {
|
|
42
44
|
if (disableInjectCSS)
|
|
43
45
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/createTamaguiProvider.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\n\nimport { isClient } from '../constants/platform'\nimport { ButtonInsideButtonContext } from '../contexts/ButtonInsideButtonContext'\nimport { TextAncestorProvider } from '../contexts/TextAncestorContext'\nimport { useMediaQueryListeners } from '../hooks/useMedia'\nimport { TamaguiInternalConfig, TamaguiProviderProps } from '../types'\nimport { ThemeProvider } from '../views/ThemeProvider'\n\nexport function createTamaguiProvider(config: TamaguiInternalConfig) {\n return function TamaguiProvider({\n disableInjectCSS,\n children,\n ...themePropsProvider\n }: TamaguiProviderProps) {\n if (
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AAEvB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\n\nimport { isClient, isSSR } from '../constants/platform'\nimport { ButtonInsideButtonContext } from '../contexts/ButtonInsideButtonContext'\nimport { TextAncestorProvider } from '../contexts/TextAncestorContext'\nimport { useMediaQueryListeners } from '../hooks/useMedia'\nimport { TamaguiInternalConfig, TamaguiProviderProps } from '../types'\nimport { ThemeProvider } from '../views/ThemeProvider'\n\nexport function createTamaguiProvider(config: TamaguiInternalConfig) {\n return function TamaguiProvider({\n disableInjectCSS,\n children,\n ...themePropsProvider\n }: TamaguiProviderProps) {\n if (!isSSR) {\n useMediaQueryListeners()\n }\n\n if (isClient) {\n // inject CSS if asked to (not SSR compliant)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n if (disableInjectCSS) return\n const style = document.createElement('style')\n style.appendChild(document.createTextNode(config.getCSS()))\n document.head.appendChild(style)\n return () => {\n document.head.removeChild(style)\n }\n }, [disableInjectCSS])\n }\n\n return (\n <ButtonInsideButtonContext.Provider value={false}>\n <TextAncestorProvider>\n <ThemeProvider\n themes={config.themes}\n defaultTheme={config.defaultTheme || 'light'}\n themeClassNameOnRoot={config.themeClassNameOnRoot}\n disableRootThemeClass={config.disableRootThemeClass}\n {...themePropsProvider}\n >\n {children}\n </ThemeProvider>\n </TextAncestorProvider>\n </ButtonInsideButtonContext.Provider>\n )\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AAEvB,sBAAgC;AAChC,uCAA0C;AAC1C,iCAAqC;AACrC,sBAAuC;AAEvC,2BAA8B;AAEvB,+BAA+B,QAA+B;AACnE,SAAO,yBAAyB;AAAA,IAC9B;AAAA,IACA;AAAA,OACG;AAAA,KACoB;AACvB,QAAI,CAAC,uBAAO;AACV,kDAAuB;AAAA,IACzB;AAEA,QAAI,0BAAU;AAGZ,YAAM,gBAAgB,MAAM;AAC1B,YAAI;AAAkB;AACtB,cAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,cAAM,YAAY,SAAS,eAAe,OAAO,OAAO,CAAC,CAAC;AAC1D,iBAAS,KAAK,YAAY,KAAK;AAC/B,eAAO,MAAM;AACX,mBAAS,KAAK,YAAY,KAAK;AAAA,QACjC;AAAA,MACF,GAAG,CAAC,gBAAgB,CAAC;AAAA,IACvB;AAEA,WACE,oCAAC,2DAA0B,UAA1B;AAAA,MAAmC,OAAO;AAAA,OACzC,oCAAC,uDACC,oCAAC;AAAA,MACC,QAAQ,OAAO;AAAA,MACf,cAAc,OAAO,gBAAgB;AAAA,MACrC,sBAAsB,OAAO;AAAA,MAC7B,uBAAuB,OAAO;AAAA,MAC7B,GAAG;AAAA,OAEH,QACH,CACF,CACF;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { isClient } from "../constants/platform";
|
|
2
|
+
import { isClient, isSSR } from "../constants/platform";
|
|
3
3
|
import { ButtonInsideButtonContext } from "../contexts/ButtonInsideButtonContext";
|
|
4
4
|
import { TextAncestorProvider } from "../contexts/TextAncestorContext";
|
|
5
5
|
import { useMediaQueryListeners } from "../hooks/useMedia";
|
|
@@ -10,8 +10,10 @@ function createTamaguiProvider(config) {
|
|
|
10
10
|
children,
|
|
11
11
|
...themePropsProvider
|
|
12
12
|
}) {
|
|
13
|
-
if (
|
|
13
|
+
if (!isSSR) {
|
|
14
14
|
useMediaQueryListeners();
|
|
15
|
+
}
|
|
16
|
+
if (isClient) {
|
|
15
17
|
React.useLayoutEffect(() => {
|
|
16
18
|
if (disableInjectCSS)
|
|
17
19
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/createTamaguiProvider.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\n\nimport { isClient } from '../constants/platform'\nimport { ButtonInsideButtonContext } from '../contexts/ButtonInsideButtonContext'\nimport { TextAncestorProvider } from '../contexts/TextAncestorContext'\nimport { useMediaQueryListeners } from '../hooks/useMedia'\nimport { TamaguiInternalConfig, TamaguiProviderProps } from '../types'\nimport { ThemeProvider } from '../views/ThemeProvider'\n\nexport function createTamaguiProvider(config: TamaguiInternalConfig) {\n return function TamaguiProvider({\n disableInjectCSS,\n children,\n ...themePropsProvider\n }: TamaguiProviderProps) {\n if (
|
|
5
|
-
"mappings": "AAAA;AAEA;AACA;AACA;AACA;AAEA;AAEO,+BAA+B,QAA+B;AACnE,SAAO,yBAAyB;AAAA,IAC9B;AAAA,IACA;AAAA,OACG;AAAA,KACoB;AACvB,QAAI,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\n\nimport { isClient, isSSR } from '../constants/platform'\nimport { ButtonInsideButtonContext } from '../contexts/ButtonInsideButtonContext'\nimport { TextAncestorProvider } from '../contexts/TextAncestorContext'\nimport { useMediaQueryListeners } from '../hooks/useMedia'\nimport { TamaguiInternalConfig, TamaguiProviderProps } from '../types'\nimport { ThemeProvider } from '../views/ThemeProvider'\n\nexport function createTamaguiProvider(config: TamaguiInternalConfig) {\n return function TamaguiProvider({\n disableInjectCSS,\n children,\n ...themePropsProvider\n }: TamaguiProviderProps) {\n if (!isSSR) {\n useMediaQueryListeners()\n }\n\n if (isClient) {\n // inject CSS if asked to (not SSR compliant)\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n if (disableInjectCSS) return\n const style = document.createElement('style')\n style.appendChild(document.createTextNode(config.getCSS()))\n document.head.appendChild(style)\n return () => {\n document.head.removeChild(style)\n }\n }, [disableInjectCSS])\n }\n\n return (\n <ButtonInsideButtonContext.Provider value={false}>\n <TextAncestorProvider>\n <ThemeProvider\n themes={config.themes}\n defaultTheme={config.defaultTheme || 'light'}\n themeClassNameOnRoot={config.themeClassNameOnRoot}\n disableRootThemeClass={config.disableRootThemeClass}\n {...themePropsProvider}\n >\n {children}\n </ThemeProvider>\n </TextAncestorProvider>\n </ButtonInsideButtonContext.Provider>\n )\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA;AAEA;AACA;AACA;AACA;AAEA;AAEO,+BAA+B,QAA+B;AACnE,SAAO,yBAAyB;AAAA,IAC9B;AAAA,IACA;AAAA,OACG;AAAA,KACoB;AACvB,QAAI,CAAC,OAAO;AACV,6BAAuB;AAAA,IACzB;AAEA,QAAI,UAAU;AAGZ,YAAM,gBAAgB,MAAM;AAC1B,YAAI;AAAkB;AACtB,cAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,cAAM,YAAY,SAAS,eAAe,OAAO,OAAO,CAAC,CAAC;AAC1D,iBAAS,KAAK,YAAY,KAAK;AAC/B,eAAO,MAAM;AACX,mBAAS,KAAK,YAAY,KAAK;AAAA,QACjC;AAAA,MACF,GAAG,CAAC,gBAAgB,CAAC;AAAA,IACvB;AAEA,WACE,oCAAC,0BAA0B,UAA1B;AAAA,MAAmC,OAAO;AAAA,OACzC,oCAAC,4BACC,oCAAC;AAAA,MACC,QAAQ,OAAO;AAAA,MACf,cAAc,OAAO,gBAAgB;AAAA,MACrC,sBAAsB,OAAO;AAAA,MAC7B,uBAAuB,OAAO;AAAA,MAC7B,GAAG;AAAA,OAEH,QACH,CACF,CACF;AAAA,EAEJ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.140",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@expo/match-media": "^0.3.0",
|
|
25
|
-
"@tamagui/compose-refs": "^1.0.1-beta.
|
|
26
|
-
"@tamagui/helpers": "^1.0.1-beta.
|
|
27
|
-
"@tamagui/rnw": "^1.0.1-beta.
|
|
28
|
-
"@tamagui/use-debounce": "^1.0.1-beta.
|
|
29
|
-
"@tamagui/use-event": "^1.0.1-beta.
|
|
30
|
-
"@tamagui/use-force-update": "^1.0.1-beta.
|
|
25
|
+
"@tamagui/compose-refs": "^1.0.1-beta.140",
|
|
26
|
+
"@tamagui/helpers": "^1.0.1-beta.140",
|
|
27
|
+
"@tamagui/rnw": "^1.0.1-beta.140",
|
|
28
|
+
"@tamagui/use-debounce": "^1.0.1-beta.140",
|
|
29
|
+
"@tamagui/use-event": "^1.0.1-beta.140",
|
|
30
|
+
"@tamagui/use-force-update": "^1.0.1-beta.140",
|
|
31
31
|
"expo-screen-orientation": "^4.3.0",
|
|
32
32
|
"hyphenate-style-name": "^1.0.4",
|
|
33
33
|
"normalize-css-color": "^1.0.2",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-native-web": "*"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
41
|
+
"@tamagui/build": "^1.0.1-beta.140",
|
|
42
42
|
"@types/react": "^18.0.15",
|
|
43
43
|
"csstype": "^3.0.10",
|
|
44
44
|
"esbuild": "^0.14.49",
|
package/types/Tamagui.d.ts
CHANGED
|
File without changes
|
package/types/addTheme.d.ts
CHANGED
|
File without changes
|
package/types/conf.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +1,11 @@
|
|
|
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;
|
|
5
5
|
export declare const isWindowDefined: boolean;
|
|
6
6
|
export declare const isSSR: boolean;
|
|
7
7
|
export declare const isClient: boolean;
|
|
8
|
-
export declare const useIsomorphicLayoutEffect: typeof
|
|
8
|
+
export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
9
9
|
export declare const isChrome: boolean;
|
|
10
10
|
export declare const isWebTouchable: boolean;
|
|
11
11
|
export declare const isTouchable: boolean;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/createFont.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/types/createTamagui.d.ts
CHANGED
|
File without changes
|
package/types/createTheme.d.ts
CHANGED
|
File without changes
|
package/types/createTokens.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/helpers/calc.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TamaguiInternalConfig, TamaguiProviderProps } from '../types';
|
|
3
2
|
export declare function createTamaguiProvider(config: TamaguiInternalConfig): ({ disableInjectCSS, children, ...themePropsProvider }: TamaguiProviderProps) => JSX.Element;
|
|
4
3
|
//# sourceMappingURL=createTamaguiProvider.d.ts.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/helpers/isObj.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/hooks/useId.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/index.d.ts
CHANGED
|
File without changes
|
package/types/insertFont.d.ts
CHANGED
|
File without changes
|
package/types/static.d.ts
CHANGED
|
File without changes
|
package/types/styled.d.ts
CHANGED
|
File without changes
|
package/types/types-rnw.d.ts
CHANGED
|
File without changes
|
package/types/types.d.ts
CHANGED
|
File without changes
|
package/types/updateTheme.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/views/Slot.d.ts
CHANGED
|
File without changes
|
package/types/views/Stack.d.ts
CHANGED
|
File without changes
|
package/types/views/Text.d.ts
CHANGED
|
File without changes
|
package/types/views/Theme.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|