@tamagui/web 1.22.6 → 1.22.8
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 +3 -3
- package/dist/cjs/createComponent.js +35 -60
- package/dist/cjs/createComponent.js.map +1 -1
- package/dist/cjs/createTamagui.js +9 -9
- package/dist/cjs/createTokens.js +1 -1
- package/dist/cjs/createVariable.js +1 -1
- package/dist/cjs/createVariables.js +1 -1
- package/dist/cjs/helpers/ThemeManager.js +3 -3
- package/dist/cjs/helpers/createMediaStyle.js +1 -1
- package/dist/cjs/helpers/createPropMapper.js +18 -12
- package/dist/cjs/helpers/createPropMapper.js.map +1 -1
- package/dist/cjs/helpers/expandStyles.js +4 -4
- package/dist/cjs/helpers/extendStaticConfig.js +2 -2
- package/dist/cjs/helpers/getAnimationDriver.js +1 -1
- package/dist/cjs/helpers/getExpandedShorthands.js +1 -1
- package/dist/cjs/helpers/getSplitStyles.js +11 -10
- package/dist/cjs/helpers/getSplitStyles.js.map +1 -1
- package/dist/cjs/helpers/getStylesAtomic.js +4 -4
- package/dist/cjs/helpers/getThemeCSSRules.js +3 -3
- package/dist/cjs/helpers/getVariantExtras.js +2 -2
- package/dist/cjs/helpers/isTamaguiElement.js +1 -1
- package/dist/cjs/helpers/memoizeFunctionByArgumentsReference.js +31 -0
- package/dist/cjs/helpers/memoizeFunctionByArgumentsReference.js.map +6 -0
- package/dist/cjs/helpers/normalizeShadow.js +2 -2
- package/dist/cjs/helpers/normalizeShadow.native.js +3 -3
- package/dist/cjs/helpers/normalizeValueWithProperty.js +2 -2
- package/dist/cjs/helpers/proxyThemeVariables.js +1 -1
- package/dist/cjs/helpers/registerCSSVariable.js +1 -1
- package/dist/cjs/helpers/themeable.js +2 -2
- package/dist/cjs/helpers/themeable.js.map +1 -1
- package/dist/cjs/helpers/themes.js +2 -2
- package/dist/cjs/hooks/useAnimationDriver.js +2 -2
- package/dist/cjs/hooks/useMedia.js +3 -3
- package/dist/cjs/hooks/useProps.js +1 -1
- package/dist/cjs/hooks/useStyle.js +5 -5
- package/dist/cjs/hooks/useTheme.js +7 -7
- package/dist/cjs/hooks/useThemeName.js +2 -2
- package/dist/cjs/index.js +96 -96
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/insertFont.js +4 -4
- package/dist/cjs/styled.js +12 -5
- package/dist/cjs/styled.js.map +1 -1
- package/dist/cjs/views/FontLanguage.native.js +1 -1
- package/dist/cjs/views/Stack.js +2 -2
- package/dist/cjs/views/TamaguiProvider.js +5 -5
- package/dist/cjs/views/Text.js +1 -1
- package/dist/cjs/views/Theme.js +4 -4
- package/dist/cjs/views/ThemeDebug.js +1 -1
- package/dist/cjs/views/ThemeDebug.js.map +1 -1
- package/dist/cjs/views/ThemeProvider.js +2 -2
- package/dist/esm/Tamagui.js +3 -3
- package/dist/esm/Tamagui.mjs +3 -3
- package/dist/esm/createComponent.js +36 -61
- package/dist/esm/createComponent.js.map +1 -1
- package/dist/esm/createComponent.mjs +36 -61
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createTamagui.js +9 -9
- package/dist/esm/createTamagui.mjs +9 -9
- package/dist/esm/createTokens.js +1 -1
- package/dist/esm/createTokens.mjs +1 -1
- package/dist/esm/createVariable.js +1 -1
- package/dist/esm/createVariable.mjs +1 -1
- package/dist/esm/createVariables.js +1 -1
- package/dist/esm/createVariables.mjs +1 -1
- package/dist/esm/helpers/ThemeManager.js +3 -3
- package/dist/esm/helpers/ThemeManager.mjs +3 -3
- package/dist/esm/helpers/createMediaStyle.js +1 -1
- package/dist/esm/helpers/createMediaStyle.mjs +1 -1
- package/dist/esm/helpers/createPropMapper.js +18 -12
- package/dist/esm/helpers/createPropMapper.js.map +1 -1
- package/dist/esm/helpers/createPropMapper.mjs +18 -12
- package/dist/esm/helpers/createPropMapper.mjs.map +1 -1
- package/dist/esm/helpers/expandStyles.js +4 -4
- package/dist/esm/helpers/expandStyles.mjs +4 -4
- package/dist/esm/helpers/extendStaticConfig.js +2 -2
- package/dist/esm/helpers/extendStaticConfig.mjs +2 -2
- package/dist/esm/helpers/getAnimationDriver.js +1 -1
- package/dist/esm/helpers/getAnimationDriver.mjs +1 -1
- package/dist/esm/helpers/getExpandedShorthands.js +1 -1
- package/dist/esm/helpers/getExpandedShorthands.mjs +1 -1
- package/dist/esm/helpers/getSplitStyles.js +11 -10
- package/dist/esm/helpers/getSplitStyles.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +11 -10
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getStylesAtomic.js +4 -4
- package/dist/esm/helpers/getStylesAtomic.mjs +4 -4
- package/dist/esm/helpers/getThemeCSSRules.js +3 -3
- package/dist/esm/helpers/getThemeCSSRules.mjs +3 -3
- package/dist/esm/helpers/getVariantExtras.js +2 -2
- package/dist/esm/helpers/getVariantExtras.mjs +2 -2
- package/dist/esm/helpers/isTamaguiElement.js +1 -1
- package/dist/esm/helpers/isTamaguiElement.mjs +1 -1
- package/dist/esm/helpers/memoizeFunctionByArgumentsReference.js +30 -0
- package/dist/esm/helpers/memoizeFunctionByArgumentsReference.js.map +6 -0
- package/dist/esm/helpers/memoizeFunctionByArgumentsReference.mjs +30 -0
- package/dist/esm/helpers/memoizeFunctionByArgumentsReference.mjs.map +6 -0
- package/dist/esm/helpers/normalizeShadow.js +2 -2
- package/dist/esm/helpers/normalizeShadow.mjs +2 -2
- package/dist/esm/helpers/normalizeShadow.native.js +3 -3
- package/dist/esm/helpers/normalizeShadow.native.mjs +3 -3
- package/dist/esm/helpers/normalizeValueWithProperty.js +2 -2
- package/dist/esm/helpers/normalizeValueWithProperty.mjs +2 -2
- package/dist/esm/helpers/proxyThemeVariables.js +1 -1
- package/dist/esm/helpers/proxyThemeVariables.mjs +1 -1
- package/dist/esm/helpers/registerCSSVariable.js +1 -1
- package/dist/esm/helpers/registerCSSVariable.mjs +1 -1
- package/dist/esm/helpers/themeable.js +2 -2
- package/dist/esm/helpers/themeable.js.map +1 -1
- package/dist/esm/helpers/themeable.mjs +2 -2
- package/dist/esm/helpers/themeable.mjs.map +1 -1
- package/dist/esm/helpers/themes.js +2 -2
- package/dist/esm/helpers/themes.mjs +2 -2
- package/dist/esm/hooks/useAnimationDriver.js +2 -2
- package/dist/esm/hooks/useAnimationDriver.mjs +2 -2
- package/dist/esm/hooks/useMedia.js +3 -3
- package/dist/esm/hooks/useMedia.mjs +3 -3
- package/dist/esm/hooks/useProps.js +1 -1
- package/dist/esm/hooks/useProps.mjs +1 -1
- package/dist/esm/hooks/useStyle.js +5 -5
- package/dist/esm/hooks/useStyle.mjs +5 -5
- package/dist/esm/hooks/useTheme.js +7 -7
- package/dist/esm/hooks/useTheme.mjs +7 -7
- package/dist/esm/hooks/useThemeName.js +2 -2
- package/dist/esm/hooks/useThemeName.mjs +2 -2
- package/dist/esm/index.js +49 -49
- package/dist/esm/index.mjs +49 -49
- package/dist/esm/insertFont.js +4 -4
- package/dist/esm/insertFont.mjs +4 -4
- package/dist/esm/styled.js +12 -5
- package/dist/esm/styled.js.map +1 -1
- package/dist/esm/styled.mjs +12 -5
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/views/FontLanguage.native.js +1 -1
- package/dist/esm/views/FontLanguage.native.mjs +1 -1
- package/dist/esm/views/Stack.js +2 -2
- package/dist/esm/views/Stack.mjs +2 -2
- package/dist/esm/views/TamaguiProvider.js +5 -5
- package/dist/esm/views/TamaguiProvider.mjs +5 -5
- package/dist/esm/views/Text.js +1 -1
- package/dist/esm/views/Text.mjs +1 -1
- package/dist/esm/views/Theme.js +4 -4
- package/dist/esm/views/Theme.mjs +4 -4
- package/dist/esm/views/ThemeDebug.js +1 -1
- package/dist/esm/views/ThemeDebug.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +1 -1
- package/dist/esm/views/ThemeDebug.mjs.map +1 -1
- package/dist/esm/views/ThemeProvider.js +2 -2
- package/dist/esm/views/ThemeProvider.mjs +2 -2
- package/package.json +9 -9
- package/src/Tamagui.ts +3 -3
- package/src/config.ts +1 -1
- package/src/contexts/FontLanguageContext.tsx +1 -1
- package/src/createComponent.tsx +36 -69
- package/src/createFont.ts +1 -1
- package/src/createShorthands.ts +1 -1
- package/src/createTamagui.ts +10 -10
- package/src/createTheme.ts +1 -1
- package/src/createTokens.ts +3 -3
- package/src/createVariable.ts +1 -1
- package/src/createVariables.ts +1 -1
- package/src/helpers/ThemeManager.tsx +4 -4
- package/src/helpers/ThemeManagerContext.tsx +1 -1
- package/src/helpers/createMediaStyle.ts +2 -2
- package/src/helpers/createPropMapper.ts +25 -16
- package/src/helpers/expandStyles.ts +4 -4
- package/src/helpers/extendStaticConfig.ts +3 -3
- package/src/helpers/getAnimationDriver.tsx +1 -1
- package/src/helpers/getExpandedShorthands.ts +2 -2
- package/src/helpers/getSplitStyles.tsx +12 -11
- package/src/helpers/getStylesAtomic.ts +5 -5
- package/src/helpers/getThemeCSSRules.ts +4 -4
- package/src/helpers/getVariantExtras.tsx +4 -4
- package/src/helpers/insertStyleRule.tsx +1 -1
- package/src/helpers/isTamaguiComponent.tsx +1 -1
- package/src/helpers/isTamaguiElement.tsx +2 -2
- package/src/helpers/matchMedia.native.ts +1 -1
- package/src/helpers/matchMedia.ts +1 -1
- package/src/helpers/memoizeFunctionByArgumentsReference.ts +38 -0
- package/src/helpers/normalizeShadow.native.ts +3 -3
- package/src/helpers/normalizeShadow.ts +2 -2
- package/src/helpers/normalizeValueWithProperty.ts +2 -2
- package/src/helpers/proxyThemeVariables.tsx +1 -1
- package/src/helpers/registerCSSVariable.ts +1 -1
- package/src/helpers/themeable.tsx +4 -3
- package/src/helpers/themes.ts +3 -3
- package/src/helpers/useShallowSetState.tsx +1 -1
- package/src/hooks/useAnimationDriver.tsx +2 -2
- package/src/hooks/useMedia.tsx +4 -4
- package/src/hooks/useProps.tsx +1 -1
- package/src/hooks/useStyle.tsx +5 -5
- package/src/hooks/useTheme.tsx +8 -8
- package/src/hooks/useThemeName.tsx +3 -3
- package/src/index.ts +49 -49
- package/src/insertFont.ts +6 -6
- package/src/setupReactNative.ts +1 -1
- package/src/styled.tsx +13 -16
- package/src/types.tsx +5 -5
- package/src/views/FontLanguage.native.tsx +2 -2
- package/src/views/FontLanguage.tsx +1 -1
- package/src/views/Stack.tsx +3 -3
- package/src/views/TamaguiProvider.tsx +6 -6
- package/src/views/Text.tsx +2 -2
- package/src/views/Theme.tsx +5 -5
- package/src/views/ThemeDebug.tsx +3 -3
- package/src/views/ThemeProvider.tsx +2 -2
- package/types/Tamagui.d.ts +1 -1
- package/types/Tamagui.d.ts.map +1 -1
- package/types/config.d.ts +19 -19
- package/types/config.d.ts.map +1 -1
- package/types/contexts/FontLanguageContext.d.ts +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createFont.d.ts +1 -1
- package/types/createFont.d.ts.map +1 -1
- package/types/createShorthands.d.ts +1 -1
- package/types/createShorthands.d.ts.map +1 -1
- package/types/createTamagui.d.ts +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/createTheme.d.ts +1 -1
- package/types/createTheme.d.ts.map +1 -1
- package/types/createTokens.d.ts +2 -2
- package/types/createTokens.d.ts.map +1 -1
- package/types/createVariables.d.ts +1 -1
- package/types/createVariables.d.ts.map +1 -1
- package/types/helpers/ThemeManager.d.ts +2 -2
- package/types/helpers/ThemeManager.d.ts.map +1 -1
- package/types/helpers/ThemeManagerContext.d.ts +1 -1
- package/types/helpers/ThemeManagerContext.d.ts.map +1 -1
- package/types/helpers/createMediaStyle.d.ts +1 -1
- package/types/helpers/createMediaStyle.d.ts.map +1 -1
- package/types/helpers/createPropMapper.d.ts +1 -1
- package/types/helpers/createPropMapper.d.ts.map +1 -1
- package/types/helpers/expandStyles.d.ts +1 -1
- package/types/helpers/expandStyles.d.ts.map +1 -1
- package/types/helpers/extendStaticConfig.d.ts +1 -1
- package/types/helpers/extendStaticConfig.d.ts.map +1 -1
- package/types/helpers/getAnimationDriver.d.ts +1 -1
- package/types/helpers/getExpandedShorthands.d.ts +1 -1
- package/types/helpers/getExpandedShorthands.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +2 -2
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getStylesAtomic.d.ts +2 -2
- package/types/helpers/getStylesAtomic.d.ts.map +1 -1
- package/types/helpers/getThemeCSSRules.d.ts +1 -1
- package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
- package/types/helpers/getVariantExtras.d.ts +2 -2
- package/types/helpers/getVariantExtras.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts +1 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/isTamaguiComponent.d.ts +1 -1
- package/types/helpers/isTamaguiComponent.d.ts.map +1 -1
- package/types/helpers/isTamaguiElement.d.ts +1 -1
- package/types/helpers/isTamaguiElement.d.ts.map +1 -1
- package/types/helpers/matchMedia.d.ts +1 -1
- package/types/helpers/matchMedia.d.ts.map +1 -1
- package/types/helpers/matchMedia.native.d.ts +1 -1
- package/types/helpers/matchMedia.native.d.ts.map +1 -1
- package/types/helpers/memoizeFunctionByArgumentsReference.d.ts +11 -0
- package/types/helpers/memoizeFunctionByArgumentsReference.d.ts.map +1 -0
- package/types/helpers/registerCSSVariable.d.ts +1 -1
- package/types/helpers/registerCSSVariable.d.ts.map +1 -1
- package/types/helpers/themeable.d.ts +1 -1
- package/types/helpers/themeable.d.ts.map +1 -1
- package/types/helpers/themes.d.ts +1 -1
- package/types/helpers/themes.d.ts.map +1 -1
- package/types/helpers/useShallowSetState.d.ts +1 -1
- package/types/helpers/useShallowSetState.d.ts.map +1 -1
- package/types/hooks/useAnimationDriver.d.ts +1 -1
- package/types/hooks/useAnimationDriver.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts +1 -1
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useStyle.d.ts +1 -1
- package/types/hooks/useTheme.d.ts +2 -2
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/hooks/useThemeName.d.ts +1 -1
- package/types/hooks/useThemeName.d.ts.map +1 -1
- package/types/index.d.ts +49 -49
- package/types/index.d.ts.map +1 -1
- package/types/insertFont.d.ts +2 -2
- package/types/insertFont.d.ts.map +1 -1
- package/types/setupReactNative.d.ts +1 -1
- package/types/setupReactNative.d.ts.map +1 -1
- package/types/styled.d.ts +1 -1
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +4 -4
- package/types/types.d.ts.map +1 -1
- package/types/views/FontLanguage.d.ts +1 -1
- package/types/views/FontLanguage.d.ts.map +1 -1
- package/types/views/FontLanguage.native.d.ts +1 -1
- package/types/views/FontLanguage.native.d.ts.map +1 -1
- package/types/views/Stack.d.ts +2 -2
- package/types/views/Stack.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
- package/types/views/Text.d.ts +2 -2
- package/types/views/Text.d.ts.map +1 -1
- package/types/views/Theme.d.ts +2 -2
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeDebug.d.ts +2 -2
- package/types/views/ThemeDebug.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
import { Theme } from "../views/Theme
|
|
3
|
+
import { Theme } from "../views/Theme";
|
|
4
4
|
function themeable(component, staticConfig) {
|
|
5
5
|
const withThemeComponent = forwardRef(function WithTheme(props, ref) {
|
|
6
6
|
const { themeInverse, theme, componentName, themeReset, ...rest } = props;
|
|
@@ -13,7 +13,7 @@ function themeable(component, staticConfig) {
|
|
|
13
13
|
name: theme || null,
|
|
14
14
|
"disable-child-theme": true,
|
|
15
15
|
debug: props.debug,
|
|
16
|
-
reset:
|
|
16
|
+
reset: themeReset,
|
|
17
17
|
children: element
|
|
18
18
|
}
|
|
19
19
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/themeable.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAuBM;AAvBN,OAAO,SAAS,kBAAkB;AAGlC,SAAS,aAAa;AAUf,SAAS,UACd,WACA,cACA;AACA,QAAM,qBAAqB,WAAW,SAAS,UAAU,OAAuB,KAAK;AACnF,UAAM,EAAE,cAAc,OAAO,eAAe,YAAY,GAAG,KAAK,IAAI;AAEpE,UAAM,UAAU,MAAM,cAAc,WAAW,EAAE,GAAG,MAAM,IAAI,CAAQ;AAEtE,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,eAAe,kBAAiB,6CAAc;AAAA,QAC9C,MAAO,SAAiB;AAAA,QACxB,uBAAmB;AAAA,QACnB,OAAO,MAAM;AAAA,QACb,OAAO;AAAA,QAEN;AAAA;AAAA,IACH;AAAA,EAEJ,CAAC;AAED,QAAM,YAAiB;AACvB,YAAU,cAAc,WACrB,uCAAmB,iBAAgB,uCAAmB,SAAQ;AAGjE,SAAO;AAGT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
import { Theme } from "../views/Theme
|
|
3
|
+
import { Theme } from "../views/Theme";
|
|
4
4
|
function themeable(component, staticConfig) {
|
|
5
5
|
const withThemeComponent = forwardRef(function WithTheme(props, ref) {
|
|
6
6
|
const { themeInverse, theme, componentName, themeReset, ...rest } = props;
|
|
@@ -13,7 +13,7 @@ function themeable(component, staticConfig) {
|
|
|
13
13
|
name: theme || null,
|
|
14
14
|
"disable-child-theme": true,
|
|
15
15
|
debug: props.debug,
|
|
16
|
-
reset:
|
|
16
|
+
reset: themeReset,
|
|
17
17
|
children: element
|
|
18
18
|
}
|
|
19
19
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/themeable.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAuBM;AAvBN,OAAO,SAAS,kBAAkB;AAGlC,SAAS,aAAa;AAUf,SAAS,UACd,WACA,cACA;AACA,QAAM,qBAAqB,WAAW,SAAS,UAAU,OAAuB,KAAK;AACnF,UAAM,EAAE,cAAc,OAAO,eAAe,YAAY,GAAG,KAAK,IAAI;AAEpE,UAAM,UAAU,MAAM,cAAc,WAAW,EAAE,GAAG,MAAM,IAAI,CAAQ;AAEtE,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,eAAe,kBAAiB,6CAAc;AAAA,QAC9C,MAAO,SAAiB;AAAA,QACxB,uBAAmB;AAAA,QACnB,OAAO,MAAM;AAAA,QACb,OAAO;AAAA,QAEN;AAAA;AAAA,IACH;AAAA,EAEJ,CAAC;AAED,QAAM,YAAiB;AACvB,YAAU,cAAc,WACrB,uCAAmB,iBAAgB,uCAAmB,SAAQ;AAGjE,SAAO;AAGT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createVariable, isVariable } from "../createVariable
|
|
2
|
-
import { GetThemeUnwrapped } from "../hooks/getThemeUnwrapped
|
|
1
|
+
import { createVariable, isVariable } from "../createVariable";
|
|
2
|
+
import { GetThemeUnwrapped } from "../hooks/getThemeUnwrapped";
|
|
3
3
|
function ensureThemeVariable(theme, key) {
|
|
4
4
|
const val = theme[key];
|
|
5
5
|
const themeKey = key;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createVariable, isVariable } from "../createVariable
|
|
2
|
-
import { GetThemeUnwrapped } from "../hooks/getThemeUnwrapped
|
|
1
|
+
import { createVariable, isVariable } from "../createVariable";
|
|
2
|
+
import { GetThemeUnwrapped } from "../hooks/getThemeUnwrapped";
|
|
3
3
|
function ensureThemeVariable(theme, key) {
|
|
4
4
|
const val = theme[key];
|
|
5
5
|
const themeKey = key;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { AnimationDriverContext } from "../contexts/AnimationDriverContext
|
|
3
|
-
import { getAnimationDriver } from "../helpers/getAnimationDriver
|
|
2
|
+
import { AnimationDriverContext } from "../contexts/AnimationDriverContext";
|
|
3
|
+
import { getAnimationDriver } from "../helpers/getAnimationDriver";
|
|
4
4
|
import { isRSC } from "@tamagui/constants";
|
|
5
5
|
const useAnimationDriver = () => {
|
|
6
6
|
if (isRSC)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { AnimationDriverContext } from "../contexts/AnimationDriverContext
|
|
3
|
-
import { getAnimationDriver } from "../helpers/getAnimationDriver
|
|
2
|
+
import { AnimationDriverContext } from "../contexts/AnimationDriverContext";
|
|
3
|
+
import { getAnimationDriver } from "../helpers/getAnimationDriver";
|
|
4
4
|
import { isRSC } from "@tamagui/constants";
|
|
5
5
|
const useAnimationDriver = () => {
|
|
6
6
|
if (isRSC)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useMemo, useSyncExternalStore } from "react";
|
|
2
|
-
import { getConfig } from "../config
|
|
3
|
-
import { createProxy } from "../helpers/createProxy
|
|
2
|
+
import { getConfig } from "../config";
|
|
3
|
+
import { createProxy } from "../helpers/createProxy";
|
|
4
4
|
import { matchMedia } from "../helpers/matchMedia";
|
|
5
|
-
import { useSafeRef } from "./useSafeRef
|
|
5
|
+
import { useSafeRef } from "./useSafeRef";
|
|
6
6
|
let mediaState = (
|
|
7
7
|
// development only safeguard
|
|
8
8
|
process.env.NODE_ENV === "development" ? createProxy(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useMemo, useSyncExternalStore } from "react";
|
|
2
|
-
import { getConfig } from "../config
|
|
3
|
-
import { createProxy } from "../helpers/createProxy
|
|
2
|
+
import { getConfig } from "../config";
|
|
3
|
+
import { createProxy } from "../helpers/createProxy";
|
|
4
4
|
import { matchMedia } from "../helpers/matchMedia";
|
|
5
|
-
import { useSafeRef } from "./useSafeRef
|
|
5
|
+
import { useSafeRef } from "./useSafeRef";
|
|
6
6
|
let mediaState = (
|
|
7
7
|
// development only safeguard
|
|
8
8
|
process.env.NODE_ENV === "development" ? createProxy(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isRSC, isWeb } from "@tamagui/constants";
|
|
2
2
|
import { useContext } from "react";
|
|
3
|
-
import { FontLanguageContext } from "../contexts/FontLanguageContext
|
|
4
|
-
import { TextAncestorContext } from "../contexts/TextAncestorContext
|
|
5
|
-
import { useSplitStyles } from "../helpers/getSplitStyles
|
|
6
|
-
import { useMedia } from "./useMedia
|
|
7
|
-
import { useTheme } from "./useTheme
|
|
3
|
+
import { FontLanguageContext } from "../contexts/FontLanguageContext";
|
|
4
|
+
import { TextAncestorContext } from "../contexts/TextAncestorContext";
|
|
5
|
+
import { useSplitStyles } from "../helpers/getSplitStyles";
|
|
6
|
+
import { useMedia } from "./useMedia";
|
|
7
|
+
import { useTheme } from "./useTheme";
|
|
8
8
|
function useStyle(base, style, options) {
|
|
9
9
|
const isText = base.staticConfig.isText;
|
|
10
10
|
const hasTextAncestor = !!(isWeb && isText ? useContext(TextAncestorContext) : false);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isRSC, isWeb } from "@tamagui/constants";
|
|
2
2
|
import { useContext } from "react";
|
|
3
|
-
import { FontLanguageContext } from "../contexts/FontLanguageContext
|
|
4
|
-
import { TextAncestorContext } from "../contexts/TextAncestorContext
|
|
5
|
-
import { useSplitStyles } from "../helpers/getSplitStyles
|
|
6
|
-
import { useMedia } from "./useMedia
|
|
7
|
-
import { useTheme } from "./useTheme
|
|
3
|
+
import { FontLanguageContext } from "../contexts/FontLanguageContext";
|
|
4
|
+
import { TextAncestorContext } from "../contexts/TextAncestorContext";
|
|
5
|
+
import { useSplitStyles } from "../helpers/getSplitStyles";
|
|
6
|
+
import { useMedia } from "./useMedia";
|
|
7
|
+
import { useTheme } from "./useTheme";
|
|
8
8
|
function useStyle(base, style, options) {
|
|
9
9
|
const isText = base.staticConfig.isText;
|
|
10
10
|
const hasTextAncestor = !!(isWeb && isText ? useContext(TextAncestorContext) : false);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { isClient, isRSC, isServer, isWeb } from "@tamagui/constants";
|
|
2
2
|
import { useContext, useEffect, useLayoutEffect, useMemo, useState } from "react";
|
|
3
|
-
import { getConfig } from "../config
|
|
4
|
-
import { isDevTools } from "../constants/isDevTools
|
|
5
|
-
import { createProxy } from "../helpers/createProxy
|
|
3
|
+
import { getConfig } from "../config";
|
|
4
|
+
import { isDevTools } from "../constants/isDevTools";
|
|
5
|
+
import { createProxy } from "../helpers/createProxy";
|
|
6
6
|
import {
|
|
7
7
|
ThemeManager,
|
|
8
8
|
getNonComponentParentManager
|
|
9
|
-
} from "../helpers/ThemeManager
|
|
10
|
-
import { ThemeManagerContext } from "../helpers/ThemeManagerContext
|
|
11
|
-
import { GetThemeUnwrapped } from "./getThemeUnwrapped
|
|
12
|
-
import { useServerRef } from "./useServerHooks
|
|
9
|
+
} from "../helpers/ThemeManager";
|
|
10
|
+
import { ThemeManagerContext } from "../helpers/ThemeManagerContext";
|
|
11
|
+
import { GetThemeUnwrapped } from "./getThemeUnwrapped";
|
|
12
|
+
import { useServerRef } from "./useServerHooks";
|
|
13
13
|
const emptyProps = { name: null };
|
|
14
14
|
function getDefaultThemeProxied() {
|
|
15
15
|
const config = getConfig();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { isClient, isRSC, isServer, isWeb } from "@tamagui/constants";
|
|
2
2
|
import { useContext, useEffect, useLayoutEffect, useMemo, useState } from "react";
|
|
3
|
-
import { getConfig } from "../config
|
|
4
|
-
import { isDevTools } from "../constants/isDevTools
|
|
5
|
-
import { createProxy } from "../helpers/createProxy
|
|
3
|
+
import { getConfig } from "../config";
|
|
4
|
+
import { isDevTools } from "../constants/isDevTools";
|
|
5
|
+
import { createProxy } from "../helpers/createProxy";
|
|
6
6
|
import {
|
|
7
7
|
ThemeManager,
|
|
8
8
|
getNonComponentParentManager
|
|
9
|
-
} from "../helpers/ThemeManager
|
|
10
|
-
import { ThemeManagerContext } from "../helpers/ThemeManagerContext
|
|
11
|
-
import { GetThemeUnwrapped } from "./getThemeUnwrapped
|
|
12
|
-
import { useServerRef } from "./useServerHooks
|
|
9
|
+
} from "../helpers/ThemeManager";
|
|
10
|
+
import { ThemeManagerContext } from "../helpers/ThemeManagerContext";
|
|
11
|
+
import { GetThemeUnwrapped } from "./getThemeUnwrapped";
|
|
12
|
+
import { useServerRef } from "./useServerHooks";
|
|
13
13
|
const emptyProps = { name: null };
|
|
14
14
|
function getDefaultThemeProxied() {
|
|
15
15
|
const config = getConfig();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isRSC, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
2
2
|
import { useContext, useState } from "react";
|
|
3
|
-
import { getConfig } from "../config
|
|
4
|
-
import { ThemeManagerContext } from "../helpers/ThemeManagerContext
|
|
3
|
+
import { getConfig } from "../config";
|
|
4
|
+
import { ThemeManagerContext } from "../helpers/ThemeManagerContext";
|
|
5
5
|
function useThemeName(opts) {
|
|
6
6
|
if (isRSC) {
|
|
7
7
|
const config = getConfig();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isRSC, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
2
2
|
import { useContext, useState } from "react";
|
|
3
|
-
import { getConfig } from "../config
|
|
4
|
-
import { ThemeManagerContext } from "../helpers/ThemeManagerContext
|
|
3
|
+
import { getConfig } from "../config";
|
|
4
|
+
import { ThemeManagerContext } from "../helpers/ThemeManagerContext";
|
|
5
5
|
function useThemeName(opts) {
|
|
6
6
|
if (isRSC) {
|
|
7
7
|
const config = getConfig();
|
package/dist/esm/index.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
export * from "./Tamagui
|
|
2
|
-
export * from "./createComponent
|
|
3
|
-
export * from "./createShorthands
|
|
4
|
-
export * from "./createTheme
|
|
5
|
-
export * from "./createTamagui
|
|
6
|
-
export * from "./createFont
|
|
7
|
-
export * from "./createTokens
|
|
8
|
-
export * from "./createVariable
|
|
9
|
-
export * from "./createVariables
|
|
10
|
-
export * from "./insertFont
|
|
11
|
-
export * from "./styled
|
|
12
|
-
export * from "./types
|
|
13
|
-
export * from "./setupReactNative
|
|
1
|
+
export * from "./Tamagui";
|
|
2
|
+
export * from "./createComponent";
|
|
3
|
+
export * from "./createShorthands";
|
|
4
|
+
export * from "./createTheme";
|
|
5
|
+
export * from "./createTamagui";
|
|
6
|
+
export * from "./createFont";
|
|
7
|
+
export * from "./createTokens";
|
|
8
|
+
export * from "./createVariable";
|
|
9
|
+
export * from "./createVariables";
|
|
10
|
+
export * from "./insertFont";
|
|
11
|
+
export * from "./styled";
|
|
12
|
+
export * from "./types";
|
|
13
|
+
export * from "./setupReactNative";
|
|
14
14
|
import {
|
|
15
15
|
getConfig,
|
|
16
16
|
getThemes,
|
|
17
17
|
getTokens,
|
|
18
18
|
onConfiguredOnce,
|
|
19
19
|
updateConfig
|
|
20
|
-
} from "./config
|
|
21
|
-
export * from "./constants/constants
|
|
22
|
-
export * from "./helpers/useShallowSetState
|
|
23
|
-
export * from "./helpers/getVariantExtras
|
|
24
|
-
export * from "./helpers/getAnimationDriver
|
|
25
|
-
export * from "./helpers/getExpandedShorthands
|
|
26
|
-
export * from "./helpers/getSplitStyles
|
|
20
|
+
} from "./config";
|
|
21
|
+
export * from "./constants/constants";
|
|
22
|
+
export * from "./helpers/useShallowSetState";
|
|
23
|
+
export * from "./helpers/getVariantExtras";
|
|
24
|
+
export * from "./helpers/getAnimationDriver";
|
|
25
|
+
export * from "./helpers/getExpandedShorthands";
|
|
26
|
+
export * from "./helpers/getSplitStyles";
|
|
27
27
|
export * from "./helpers/getStylesAtomic";
|
|
28
|
-
export * from "./helpers/pseudoDescriptors
|
|
29
|
-
export * from "./helpers/mergeProps
|
|
30
|
-
export * from "./helpers/expandStyles
|
|
31
|
-
export * from "./helpers/isTamaguiElement
|
|
32
|
-
export * from "./helpers/isTamaguiComponent
|
|
28
|
+
export * from "./helpers/pseudoDescriptors";
|
|
29
|
+
export * from "./helpers/mergeProps";
|
|
30
|
+
export * from "./helpers/expandStyles";
|
|
31
|
+
export * from "./helpers/isTamaguiElement";
|
|
32
|
+
export * from "./helpers/isTamaguiComponent";
|
|
33
33
|
export * from "./helpers/matchMedia";
|
|
34
|
-
export * from "./helpers/themes
|
|
35
|
-
export * from "./helpers/getThemeCSSRules
|
|
36
|
-
export * from "./helpers/proxyThemeVariables
|
|
37
|
-
export * from "./helpers/themeable
|
|
38
|
-
export * from "./helpers/withStaticProperties
|
|
39
|
-
export * from "./helpers/normalizeColor
|
|
40
|
-
export * from "./contexts/ButtonNestingContext
|
|
34
|
+
export * from "./helpers/themes";
|
|
35
|
+
export * from "./helpers/getThemeCSSRules";
|
|
36
|
+
export * from "./helpers/proxyThemeVariables";
|
|
37
|
+
export * from "./helpers/themeable";
|
|
38
|
+
export * from "./helpers/withStaticProperties";
|
|
39
|
+
export * from "./helpers/normalizeColor";
|
|
40
|
+
export * from "./contexts/ButtonNestingContext";
|
|
41
41
|
import {
|
|
42
42
|
configureMedia,
|
|
43
43
|
getMedia,
|
|
@@ -46,30 +46,30 @@ import {
|
|
|
46
46
|
useMediaPropsActive,
|
|
47
47
|
mediaObjectToString,
|
|
48
48
|
mediaQueryConfig
|
|
49
|
-
} from "./hooks/useMedia
|
|
50
|
-
export * from "./hooks/useTheme
|
|
51
|
-
export * from "./hooks/useThemeName
|
|
52
|
-
export * from "./hooks/useSafeRef
|
|
53
|
-
export * from "./hooks/useStyle
|
|
54
|
-
export * from "./hooks/useAnimationDriver
|
|
55
|
-
export * from "./hooks/useIsTouchDevice
|
|
56
|
-
export * from "./hooks/useProps
|
|
57
|
-
export * from "./views/Slot
|
|
58
|
-
export * from "./views/Stack
|
|
59
|
-
export * from "./views/Text
|
|
60
|
-
export * from "./contexts/TextAncestorContext
|
|
61
|
-
export * from "./views/Theme
|
|
62
|
-
export * from "./views/ThemeProvider
|
|
49
|
+
} from "./hooks/useMedia";
|
|
50
|
+
export * from "./hooks/useTheme";
|
|
51
|
+
export * from "./hooks/useThemeName";
|
|
52
|
+
export * from "./hooks/useSafeRef";
|
|
53
|
+
export * from "./hooks/useStyle";
|
|
54
|
+
export * from "./hooks/useAnimationDriver";
|
|
55
|
+
export * from "./hooks/useIsTouchDevice";
|
|
56
|
+
export * from "./hooks/useProps";
|
|
57
|
+
export * from "./views/Slot";
|
|
58
|
+
export * from "./views/Stack";
|
|
59
|
+
export * from "./views/Text";
|
|
60
|
+
export * from "./contexts/TextAncestorContext";
|
|
61
|
+
export * from "./views/Theme";
|
|
62
|
+
export * from "./views/ThemeProvider";
|
|
63
63
|
export * from "./views/FontLanguage";
|
|
64
|
-
export * from "./views/TamaguiProvider
|
|
65
|
-
export * from "./views/AnimationDriverProvider
|
|
64
|
+
export * from "./views/TamaguiProvider";
|
|
65
|
+
export * from "./views/AnimationDriverProvider";
|
|
66
66
|
export * from "@tamagui/use-force-update";
|
|
67
67
|
export * from "@tamagui/use-did-finish-ssr";
|
|
68
68
|
export * from "@tamagui/use-event";
|
|
69
69
|
export * from "@tamagui/compose-refs";
|
|
70
70
|
export * from "@tamagui/helpers";
|
|
71
71
|
export * from "@tamagui/constants";
|
|
72
|
-
export * from "./setupHooks
|
|
72
|
+
export * from "./setupHooks";
|
|
73
73
|
export {
|
|
74
74
|
configureMedia,
|
|
75
75
|
getConfig,
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
export * from "./Tamagui
|
|
2
|
-
export * from "./createComponent
|
|
3
|
-
export * from "./createShorthands
|
|
4
|
-
export * from "./createTheme
|
|
5
|
-
export * from "./createTamagui
|
|
6
|
-
export * from "./createFont
|
|
7
|
-
export * from "./createTokens
|
|
8
|
-
export * from "./createVariable
|
|
9
|
-
export * from "./createVariables
|
|
10
|
-
export * from "./insertFont
|
|
11
|
-
export * from "./styled
|
|
12
|
-
export * from "./types
|
|
13
|
-
export * from "./setupReactNative
|
|
1
|
+
export * from "./Tamagui";
|
|
2
|
+
export * from "./createComponent";
|
|
3
|
+
export * from "./createShorthands";
|
|
4
|
+
export * from "./createTheme";
|
|
5
|
+
export * from "./createTamagui";
|
|
6
|
+
export * from "./createFont";
|
|
7
|
+
export * from "./createTokens";
|
|
8
|
+
export * from "./createVariable";
|
|
9
|
+
export * from "./createVariables";
|
|
10
|
+
export * from "./insertFont";
|
|
11
|
+
export * from "./styled";
|
|
12
|
+
export * from "./types";
|
|
13
|
+
export * from "./setupReactNative";
|
|
14
14
|
import {
|
|
15
15
|
getConfig,
|
|
16
16
|
getThemes,
|
|
17
17
|
getTokens,
|
|
18
18
|
onConfiguredOnce,
|
|
19
19
|
updateConfig
|
|
20
|
-
} from "./config
|
|
21
|
-
export * from "./constants/constants
|
|
22
|
-
export * from "./helpers/useShallowSetState
|
|
23
|
-
export * from "./helpers/getVariantExtras
|
|
24
|
-
export * from "./helpers/getAnimationDriver
|
|
25
|
-
export * from "./helpers/getExpandedShorthands
|
|
26
|
-
export * from "./helpers/getSplitStyles
|
|
20
|
+
} from "./config";
|
|
21
|
+
export * from "./constants/constants";
|
|
22
|
+
export * from "./helpers/useShallowSetState";
|
|
23
|
+
export * from "./helpers/getVariantExtras";
|
|
24
|
+
export * from "./helpers/getAnimationDriver";
|
|
25
|
+
export * from "./helpers/getExpandedShorthands";
|
|
26
|
+
export * from "./helpers/getSplitStyles";
|
|
27
27
|
export * from "./helpers/getStylesAtomic";
|
|
28
|
-
export * from "./helpers/pseudoDescriptors
|
|
29
|
-
export * from "./helpers/mergeProps
|
|
30
|
-
export * from "./helpers/expandStyles
|
|
31
|
-
export * from "./helpers/isTamaguiElement
|
|
32
|
-
export * from "./helpers/isTamaguiComponent
|
|
28
|
+
export * from "./helpers/pseudoDescriptors";
|
|
29
|
+
export * from "./helpers/mergeProps";
|
|
30
|
+
export * from "./helpers/expandStyles";
|
|
31
|
+
export * from "./helpers/isTamaguiElement";
|
|
32
|
+
export * from "./helpers/isTamaguiComponent";
|
|
33
33
|
export * from "./helpers/matchMedia";
|
|
34
|
-
export * from "./helpers/themes
|
|
35
|
-
export * from "./helpers/getThemeCSSRules
|
|
36
|
-
export * from "./helpers/proxyThemeVariables
|
|
37
|
-
export * from "./helpers/themeable
|
|
38
|
-
export * from "./helpers/withStaticProperties
|
|
39
|
-
export * from "./helpers/normalizeColor
|
|
40
|
-
export * from "./contexts/ButtonNestingContext
|
|
34
|
+
export * from "./helpers/themes";
|
|
35
|
+
export * from "./helpers/getThemeCSSRules";
|
|
36
|
+
export * from "./helpers/proxyThemeVariables";
|
|
37
|
+
export * from "./helpers/themeable";
|
|
38
|
+
export * from "./helpers/withStaticProperties";
|
|
39
|
+
export * from "./helpers/normalizeColor";
|
|
40
|
+
export * from "./contexts/ButtonNestingContext";
|
|
41
41
|
import {
|
|
42
42
|
configureMedia,
|
|
43
43
|
getMedia,
|
|
@@ -46,30 +46,30 @@ import {
|
|
|
46
46
|
useMediaPropsActive,
|
|
47
47
|
mediaObjectToString,
|
|
48
48
|
mediaQueryConfig
|
|
49
|
-
} from "./hooks/useMedia
|
|
50
|
-
export * from "./hooks/useTheme
|
|
51
|
-
export * from "./hooks/useThemeName
|
|
52
|
-
export * from "./hooks/useSafeRef
|
|
53
|
-
export * from "./hooks/useStyle
|
|
54
|
-
export * from "./hooks/useAnimationDriver
|
|
55
|
-
export * from "./hooks/useIsTouchDevice
|
|
56
|
-
export * from "./hooks/useProps
|
|
57
|
-
export * from "./views/Slot
|
|
58
|
-
export * from "./views/Stack
|
|
59
|
-
export * from "./views/Text
|
|
60
|
-
export * from "./contexts/TextAncestorContext
|
|
61
|
-
export * from "./views/Theme
|
|
62
|
-
export * from "./views/ThemeProvider
|
|
49
|
+
} from "./hooks/useMedia";
|
|
50
|
+
export * from "./hooks/useTheme";
|
|
51
|
+
export * from "./hooks/useThemeName";
|
|
52
|
+
export * from "./hooks/useSafeRef";
|
|
53
|
+
export * from "./hooks/useStyle";
|
|
54
|
+
export * from "./hooks/useAnimationDriver";
|
|
55
|
+
export * from "./hooks/useIsTouchDevice";
|
|
56
|
+
export * from "./hooks/useProps";
|
|
57
|
+
export * from "./views/Slot";
|
|
58
|
+
export * from "./views/Stack";
|
|
59
|
+
export * from "./views/Text";
|
|
60
|
+
export * from "./contexts/TextAncestorContext";
|
|
61
|
+
export * from "./views/Theme";
|
|
62
|
+
export * from "./views/ThemeProvider";
|
|
63
63
|
export * from "./views/FontLanguage";
|
|
64
|
-
export * from "./views/TamaguiProvider
|
|
65
|
-
export * from "./views/AnimationDriverProvider
|
|
64
|
+
export * from "./views/TamaguiProvider";
|
|
65
|
+
export * from "./views/AnimationDriverProvider";
|
|
66
66
|
export * from "@tamagui/use-force-update";
|
|
67
67
|
export * from "@tamagui/use-did-finish-ssr";
|
|
68
68
|
export * from "@tamagui/use-event";
|
|
69
69
|
export * from "@tamagui/compose-refs";
|
|
70
70
|
export * from "@tamagui/helpers";
|
|
71
71
|
export * from "@tamagui/constants";
|
|
72
|
-
export * from "./setupHooks
|
|
72
|
+
export * from "./setupHooks";
|
|
73
73
|
export {
|
|
74
74
|
configureMedia,
|
|
75
75
|
getConfig,
|
package/dist/esm/insertFont.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { setConfigFont } from "./config
|
|
2
|
-
import { createFont } from "./createFont
|
|
3
|
-
import { createVariables } from "./createVariables
|
|
4
|
-
import { registerCSSVariable, variableToCSS } from "./helpers/registerCSSVariable
|
|
1
|
+
import { setConfigFont } from "./config";
|
|
2
|
+
import { createFont } from "./createFont";
|
|
3
|
+
import { createVariables } from "./createVariables";
|
|
4
|
+
import { registerCSSVariable, variableToCSS } from "./helpers/registerCSSVariable";
|
|
5
5
|
function insertFont(name, fontIn) {
|
|
6
6
|
const font = createFont(fontIn);
|
|
7
7
|
const tokened = createVariables(font, name);
|
package/dist/esm/insertFont.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { setConfigFont } from "./config
|
|
2
|
-
import { createFont } from "./createFont
|
|
3
|
-
import { createVariables } from "./createVariables
|
|
4
|
-
import { registerCSSVariable, variableToCSS } from "./helpers/registerCSSVariable
|
|
1
|
+
import { setConfigFont } from "./config";
|
|
2
|
+
import { createFont } from "./createFont";
|
|
3
|
+
import { createVariables } from "./createVariables";
|
|
4
|
+
import { registerCSSVariable, variableToCSS } from "./helpers/registerCSSVariable";
|
|
5
5
|
function insertFont(name, fontIn) {
|
|
6
6
|
const font = createFont(fontIn);
|
|
7
7
|
const tokened = createVariables(font, name);
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stylePropsAll } from "@tamagui/helpers";
|
|
2
|
-
import { createComponent } from "./createComponent
|
|
3
|
-
import { mergeVariants } from "./helpers/extendStaticConfig
|
|
4
|
-
import { ReactNativeStaticConfigs } from "./setupReactNative
|
|
2
|
+
import { createComponent } from "./createComponent";
|
|
3
|
+
import { mergeVariants } from "./helpers/extendStaticConfig";
|
|
4
|
+
import { ReactNativeStaticConfigs } from "./setupReactNative";
|
|
5
5
|
function styled(ComponentIn, options, staticExtractionOptions) {
|
|
6
6
|
if (process.env.NODE_ENV !== "production") {
|
|
7
7
|
if (!ComponentIn) {
|
|
@@ -32,10 +32,17 @@ function styled(ComponentIn, options, staticExtractionOptions) {
|
|
|
32
32
|
acceptsClassName: acceptsClassNameProp,
|
|
33
33
|
...defaultProps
|
|
34
34
|
} = options;
|
|
35
|
+
if (parentStaticConfig) {
|
|
36
|
+
defaultProps = {
|
|
37
|
+
...parentStaticConfig.defaultProps,
|
|
38
|
+
...defaultProps,
|
|
39
|
+
...defaultVariants
|
|
40
|
+
};
|
|
41
|
+
}
|
|
35
42
|
if (defaultVariants) {
|
|
36
43
|
defaultProps = {
|
|
37
|
-
...
|
|
38
|
-
...
|
|
44
|
+
...defaultProps,
|
|
45
|
+
...defaultVariants
|
|
39
46
|
};
|
|
40
47
|
}
|
|
41
48
|
if (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) {
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,qBAAqB;AAE9B,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAuClC,SAAS,OAId,aAEA,SAMA,yBACA;AAEA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,QAAI,CAAC,aAAa;AAChB,YAAM,IAAI,MAAM,gCAAgC;AAAA,IAClD;AACA,QAAI,mCAAS,UAAU;AACrB,iBAAW,OAAO,QAAQ,UAAU;AAClC,YAAI,OAAO,eAAe;AACxB,kBAAQ;AAAA,YACN,gDAAgD;AAAA,UAClD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,qBACJ,kBAAkB,cAAe,YAAY,eAAgC;AAE/E,QAAM,yBACJ,CAAC,CAAC,sBACF,EAAE,mBAAmB,iBAAiB,mBAAmB;AAE3D,MAAI,YAAiB,yBACjB,eACA,yDAAoB,cAAa;AAErC,QAAM,gBAAgB;AAAA,IACpB,yBAAyB,IAAI,SAAS,MACpC,mEAAyB,kBACzB,yBAAyB,IAAI,yDAAoB,SAAS,MAC1D,yDAAoB;AAAA,EACxB;AAEA,QAAM,qBAAqB,MAAM;AAC/B,QAAI,SAAS;AACX,UAAI;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA,QACA,kBAAkB;AAAA,QAClB,GAAG;AAAA,MACL,IAAI;
|
|
4
|
+
"mappings": "AAAA,SAAS,qBAAqB;AAE9B,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAuClC,SAAS,OAId,aAEA,SAMA,yBACA;AAEA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,QAAI,CAAC,aAAa;AAChB,YAAM,IAAI,MAAM,gCAAgC;AAAA,IAClD;AACA,QAAI,mCAAS,UAAU;AACrB,iBAAW,OAAO,QAAQ,UAAU;AAClC,YAAI,OAAO,eAAe;AACxB,kBAAQ;AAAA,YACN,gDAAgD;AAAA,UAClD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,qBACJ,kBAAkB,cAAe,YAAY,eAAgC;AAE/E,QAAM,yBACJ,CAAC,CAAC,sBACF,EAAE,mBAAmB,iBAAiB,mBAAmB;AAE3D,MAAI,YAAiB,yBACjB,eACA,yDAAoB,cAAa;AAErC,QAAM,gBAAgB;AAAA,IACpB,yBAAyB,IAAI,SAAS,MACpC,mEAAyB,kBACzB,yBAAyB,IAAI,yDAAoB,SAAS,MAC1D,yDAAoB;AAAA,EACxB;AAEA,QAAM,qBAAqB,MAAM;AAC/B,QAAI,SAAS;AACX,UAAI;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA,QACA,kBAAkB;AAAA,QAClB,GAAG;AAAA,MACL,IAAI;AAEJ,UAAI,oBAAoB;AACtB,uBAAe;AAAA,UACb,GAAG,mBAAmB;AAAA,UACtB,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,MACF;AAEA,UAAI,iBAAiB;AACnB,uBAAe;AAAA,UACb,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,MACF;AAEA,UAAI,yDAAoB,OAAO;AAC7B,mBAAW,cAAc,mBAAmB,UAAU,QAAQ;AAAA,MAChE;AAEA,YAAM,aACH,iBAAiB,yBAAyB,IAAI,SAAS,KAAM;AAEhE,YAAM,SAAS;AAAA,SACb,mEAAyB,YAAU,yDAAoB;AAAA,MACzD;AACA,YAAM,mBACJ,yBACC,0BACC,kBACC,yDAAoB,WAAS,yDAAoB;AAEtD,YAAM,OAA8B;AAAA,QAClC,GAAG;AAAA,QACH,GAAI,CAAC,0BAA0B;AAAA,UAC7B;AAAA,QACF;AAAA;AAAA;AAAA,QAGA;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe,SAAQ,yDAAoB;AAAA,QAC3C;AAAA,QACA;AAAA,QACA;AAAA,QACA,GAAG;AAAA,MACL;AAGA,UAAI,aAAa,YAAY,CAAC,kBAAkB;AAC9C,aAAK,eAAe;AAAA,MACtB;AAEA,aAAO;AAAA,IACT;AAAA,EACF,GAAG;AAEH,QAAM,YAAY,gBAAgB,qBAAqB,CAAC,GAAG,SAAS;AAyCpE,aAAW,OAAO,aAAa;AAC7B,QAAI,OAAO;AAAW;AAEtB,cAAU,GAAG,IAAI,YAAY,GAAG;AAAA,EAClC;AAEA,SAAO;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/styled.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stylePropsAll } from "@tamagui/helpers";
|
|
2
|
-
import { createComponent } from "./createComponent
|
|
3
|
-
import { mergeVariants } from "./helpers/extendStaticConfig
|
|
4
|
-
import { ReactNativeStaticConfigs } from "./setupReactNative
|
|
2
|
+
import { createComponent } from "./createComponent";
|
|
3
|
+
import { mergeVariants } from "./helpers/extendStaticConfig";
|
|
4
|
+
import { ReactNativeStaticConfigs } from "./setupReactNative";
|
|
5
5
|
function styled(ComponentIn, options, staticExtractionOptions) {
|
|
6
6
|
if (process.env.NODE_ENV !== "production") {
|
|
7
7
|
if (!ComponentIn) {
|
|
@@ -32,10 +32,17 @@ function styled(ComponentIn, options, staticExtractionOptions) {
|
|
|
32
32
|
acceptsClassName: acceptsClassNameProp,
|
|
33
33
|
...defaultProps
|
|
34
34
|
} = options;
|
|
35
|
+
if (parentStaticConfig) {
|
|
36
|
+
defaultProps = {
|
|
37
|
+
...parentStaticConfig.defaultProps,
|
|
38
|
+
...defaultProps,
|
|
39
|
+
...defaultVariants
|
|
40
|
+
};
|
|
41
|
+
}
|
|
35
42
|
if (defaultVariants) {
|
|
36
43
|
defaultProps = {
|
|
37
|
-
...
|
|
38
|
-
...
|
|
44
|
+
...defaultProps,
|
|
45
|
+
...defaultVariants
|
|
39
46
|
};
|
|
40
47
|
}
|
|
41
48
|
if (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) {
|
package/dist/esm/styled.mjs.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,qBAAqB;AAE9B,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAuClC,SAAS,OAId,aAEA,SAMA,yBACA;AAEA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,QAAI,CAAC,aAAa;AAChB,YAAM,IAAI,MAAM,gCAAgC;AAAA,IAClD;AACA,QAAI,mCAAS,UAAU;AACrB,iBAAW,OAAO,QAAQ,UAAU;AAClC,YAAI,OAAO,eAAe;AACxB,kBAAQ;AAAA,YACN,gDAAgD;AAAA,UAClD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,qBACJ,kBAAkB,cAAe,YAAY,eAAgC;AAE/E,QAAM,yBACJ,CAAC,CAAC,sBACF,EAAE,mBAAmB,iBAAiB,mBAAmB;AAE3D,MAAI,YAAiB,yBACjB,eACA,yDAAoB,cAAa;AAErC,QAAM,gBAAgB;AAAA,IACpB,yBAAyB,IAAI,SAAS,MACpC,mEAAyB,kBACzB,yBAAyB,IAAI,yDAAoB,SAAS,MAC1D,yDAAoB;AAAA,EACxB;AAEA,QAAM,qBAAqB,MAAM;AAC/B,QAAI,SAAS;AACX,UAAI;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA,QACA,kBAAkB;AAAA,QAClB,GAAG;AAAA,MACL,IAAI;
|
|
4
|
+
"mappings": "AAAA,SAAS,qBAAqB;AAE9B,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AAuClC,SAAS,OAId,aAEA,SAMA,yBACA;AAEA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,QAAI,CAAC,aAAa;AAChB,YAAM,IAAI,MAAM,gCAAgC;AAAA,IAClD;AACA,QAAI,mCAAS,UAAU;AACrB,iBAAW,OAAO,QAAQ,UAAU;AAClC,YAAI,OAAO,eAAe;AACxB,kBAAQ;AAAA,YACN,gDAAgD;AAAA,UAClD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,qBACJ,kBAAkB,cAAe,YAAY,eAAgC;AAE/E,QAAM,yBACJ,CAAC,CAAC,sBACF,EAAE,mBAAmB,iBAAiB,mBAAmB;AAE3D,MAAI,YAAiB,yBACjB,eACA,yDAAoB,cAAa;AAErC,QAAM,gBAAgB;AAAA,IACpB,yBAAyB,IAAI,SAAS,MACpC,mEAAyB,kBACzB,yBAAyB,IAAI,yDAAoB,SAAS,MAC1D,yDAAoB;AAAA,EACxB;AAEA,QAAM,qBAAqB,MAAM;AAC/B,QAAI,SAAS;AACX,UAAI;AAAA,QACF;AAAA,QACA;AAAA,QACA;AAAA,QACA,kBAAkB;AAAA,QAClB,GAAG;AAAA,MACL,IAAI;AAEJ,UAAI,oBAAoB;AACtB,uBAAe;AAAA,UACb,GAAG,mBAAmB;AAAA,UACtB,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,MACF;AAEA,UAAI,iBAAiB;AACnB,uBAAe;AAAA,UACb,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,MACF;AAEA,UAAI,yDAAoB,OAAO;AAC7B,mBAAW,cAAc,mBAAmB,UAAU,QAAQ;AAAA,MAChE;AAEA,YAAM,aACH,iBAAiB,yBAAyB,IAAI,SAAS,KAAM;AAEhE,YAAM,SAAS;AAAA,SACb,mEAAyB,YAAU,yDAAoB;AAAA,MACzD;AACA,YAAM,mBACJ,yBACC,0BACC,kBACC,yDAAoB,WAAS,yDAAoB;AAEtD,YAAM,OAA8B;AAAA,QAClC,GAAG;AAAA,QACH,GAAI,CAAC,0BAA0B;AAAA,UAC7B;AAAA,QACF;AAAA;AAAA;AAAA,QAGA;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe,SAAQ,yDAAoB;AAAA,QAC3C;AAAA,QACA;AAAA,QACA;AAAA,QACA,GAAG;AAAA,MACL;AAGA,UAAI,aAAa,YAAY,CAAC,kBAAkB;AAC9C,aAAK,eAAe;AAAA,MACtB;AAEA,aAAO;AAAA,IACT;AAAA,EACF,GAAG;AAEH,QAAM,YAAY,gBAAgB,qBAAqB,CAAC,GAAG,SAAS;AAyCpE,aAAW,OAAO,aAAa;AAC7B,QAAI,OAAO;AAAW;AAEtB,cAAU,GAAG,IAAI,YAAY,GAAG;AAAA,EAClC;AAEA,SAAO;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { FontLanguageContext } from "../contexts/FontLanguageContext
|
|
3
|
+
import { FontLanguageContext } from "../contexts/FontLanguageContext";
|
|
4
4
|
const FontLanguage = ({ children, ...props }) => {
|
|
5
5
|
const value = useMemo(() => props, [JSON.stringify(props)]);
|
|
6
6
|
return /* @__PURE__ */ jsx(FontLanguageContext.Provider, { value, children });
|