@tamagui/web 3.0.18 → 3.1.0
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.cjs +2 -1
- package/dist/cjs/Tamagui.native.cjs +2 -1
- package/dist/cjs/Tamagui.native.js +2 -1
- package/dist/cjs/Tamagui.native.js.map +1 -1
- package/dist/cjs/_withStableStyle.cjs +2 -1
- package/dist/cjs/_withStableStyle.native.cjs +2 -1
- package/dist/cjs/_withStableStyle.native.js +2 -1
- package/dist/cjs/_withStableStyle.native.js.map +1 -1
- package/dist/cjs/config.cjs +8 -7
- package/dist/cjs/config.native.cjs +8 -7
- package/dist/cjs/config.native.js +8 -7
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/constants/constants.cjs +2 -1
- package/dist/cjs/constants/constants.native.cjs +2 -1
- package/dist/cjs/constants/constants.native.js +2 -1
- package/dist/cjs/constants/constants.native.js.map +1 -1
- package/dist/cjs/constants/isDevTools.cjs +2 -1
- package/dist/cjs/constants/isDevTools.native.cjs +2 -1
- package/dist/cjs/constants/isDevTools.native.js +2 -1
- package/dist/cjs/constants/isDevTools.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +40 -39
- package/dist/cjs/createComponent.native.cjs +39 -38
- package/dist/cjs/createComponent.native.js +39 -38
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +2 -1
- package/dist/cjs/createTamagui.native.cjs +2 -1
- package/dist/cjs/createTamagui.native.js +2 -1
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/createTokens.cjs +2 -1
- package/dist/cjs/createTokens.native.cjs +2 -1
- package/dist/cjs/createTokens.native.js +2 -1
- package/dist/cjs/createTokens.native.js.map +1 -1
- package/dist/cjs/createVariable.cjs +2 -1
- package/dist/cjs/createVariable.native.cjs +2 -1
- package/dist/cjs/createVariable.native.js +2 -1
- package/dist/cjs/createVariable.native.js.map +1 -1
- package/dist/cjs/helpers/createDesignSystem.cjs +3 -2
- package/dist/cjs/helpers/createDesignSystem.native.cjs +2 -1
- package/dist/cjs/helpers/createDesignSystem.native.js +2 -1
- package/dist/cjs/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/cjs/helpers/formatDiagnostic.cjs +2 -1
- package/dist/cjs/helpers/formatDiagnostic.native.cjs +2 -1
- package/dist/cjs/helpers/formatDiagnostic.native.js +2 -1
- package/dist/cjs/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +37 -36
- package/dist/cjs/helpers/getSplitStyles.native.cjs +40 -39
- package/dist/cjs/helpers/getSplitStyles.native.js +40 -39
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.cjs +4 -3
- package/dist/cjs/helpers/insertStyleRule.cjs +4 -3
- package/dist/cjs/helpers/insertStyleRule.native.cjs +4 -3
- package/dist/cjs/helpers/insertStyleRule.native.js +4 -3
- package/dist/cjs/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/cjs/helpers/log.cjs +2 -1
- package/dist/cjs/helpers/log.native.cjs +2 -1
- package/dist/cjs/helpers/log.native.js +2 -1
- package/dist/cjs/helpers/log.native.js.map +1 -1
- package/dist/cjs/helpers/matchMedia.native.cjs +3 -2
- package/dist/cjs/helpers/matchMedia.native.js +3 -2
- package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
- package/dist/cjs/helpers/noteOnce.cjs +2 -1
- package/dist/cjs/helpers/noteOnce.native.cjs +2 -1
- package/dist/cjs/helpers/noteOnce.native.js +2 -1
- package/dist/cjs/helpers/noteOnce.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.cjs +2 -1
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.js +2 -1
- package/dist/cjs/helpers/resolveSafeAreaVariable.native.js.map +1 -1
- package/dist/cjs/helpers/resolveSizing.cjs +2 -1
- package/dist/cjs/helpers/resolveSizing.native.cjs +2 -1
- package/dist/cjs/helpers/resolveSizing.native.js +2 -1
- package/dist/cjs/helpers/resolveSizing.native.js.map +1 -1
- package/dist/cjs/helpers/skipProps.cjs +3 -2
- package/dist/cjs/helpers/skipProps.native.cjs +3 -2
- package/dist/cjs/helpers/skipProps.native.js +3 -2
- package/dist/cjs/helpers/skipProps.native.js.map +1 -1
- package/dist/cjs/helpers/styledDynamic.cjs +2 -1
- package/dist/cjs/helpers/styledDynamic.native.cjs +2 -1
- package/dist/cjs/helpers/styledDynamic.native.js +2 -1
- package/dist/cjs/helpers/styledDynamic.native.js.map +1 -1
- package/dist/cjs/helpers/subscribeToContextGroup.cjs +2 -1
- package/dist/cjs/helpers/subscribeToContextGroup.native.cjs +2 -1
- package/dist/cjs/helpers/subscribeToContextGroup.native.js +2 -1
- package/dist/cjs/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/cjs/helpers/variableValue.cjs +2 -1
- package/dist/cjs/helpers/variableValue.native.cjs +2 -1
- package/dist/cjs/helpers/variableValue.native.js +2 -1
- package/dist/cjs/helpers/variableValue.native.js.map +1 -1
- package/dist/cjs/helpers/variables.cjs +5 -4
- package/dist/cjs/helpers/variables.native.cjs +5 -4
- package/dist/cjs/helpers/variables.native.js +5 -4
- package/dist/cjs/helpers/variables.native.js.map +1 -1
- package/dist/cjs/helpers/warnOnce.cjs +4 -3
- package/dist/cjs/helpers/warnOnce.native.cjs +4 -3
- package/dist/cjs/helpers/warnOnce.native.js +4 -3
- package/dist/cjs/helpers/warnOnce.native.js.map +1 -1
- package/dist/cjs/hooks/getThemeProxied.cjs +2 -1
- package/dist/cjs/hooks/getThemeProxied.native.cjs +5 -4
- package/dist/cjs/hooks/getThemeProxied.native.js +5 -4
- package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/cjs/hooks/useAnimationDriver.cjs +3 -2
- package/dist/cjs/hooks/useAnimationDriver.native.cjs +3 -2
- package/dist/cjs/hooks/useAnimationDriver.native.js +3 -2
- package/dist/cjs/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/cjs/hooks/useMedia.cjs +3 -2
- package/dist/cjs/hooks/useMedia.native.cjs +3 -2
- package/dist/cjs/hooks/useMedia.native.js +3 -2
- package/dist/cjs/hooks/useMedia.native.js.map +1 -1
- package/dist/cjs/hooks/useTheme.cjs +2 -1
- package/dist/cjs/hooks/useTheme.native.cjs +2 -1
- package/dist/cjs/hooks/useTheme.native.js +2 -1
- package/dist/cjs/hooks/useTheme.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeState.cjs +2 -1
- package/dist/cjs/hooks/useThemeState.native.cjs +2 -1
- package/dist/cjs/hooks/useThemeState.native.js +2 -1
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/style.cjs +2 -1
- package/dist/cjs/style.native.cjs +2 -1
- package/dist/cjs/style.native.js +2 -1
- package/dist/cjs/style.native.js.map +1 -1
- package/dist/cjs/styled.cjs +3 -2
- package/dist/cjs/styled.native.cjs +2 -1
- package/dist/cjs/styled.native.js +2 -1
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.cjs +2 -1
- package/dist/cjs/views/TamaguiProvider.native.cjs +2 -1
- package/dist/cjs/views/TamaguiProvider.native.js +2 -1
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/Theme.cjs +5 -4
- package/dist/cjs/views/Theme.native.cjs +5 -4
- package/dist/cjs/views/Theme.native.js +5 -4
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/cjs/views/ThemeDebug.cjs +3 -2
- package/dist/esm/Tamagui.mjs +2 -1
- package/dist/esm/Tamagui.mjs.map +1 -1
- package/dist/esm/Tamagui.native.js +2 -1
- package/dist/esm/Tamagui.native.js.map +1 -1
- package/dist/esm/_withStableStyle.mjs +2 -1
- package/dist/esm/_withStableStyle.mjs.map +1 -1
- package/dist/esm/_withStableStyle.native.js +2 -1
- package/dist/esm/_withStableStyle.native.js.map +1 -1
- package/dist/esm/config.mjs +8 -7
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +8 -7
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/constants/constants.mjs +2 -1
- package/dist/esm/constants/constants.mjs.map +1 -1
- package/dist/esm/constants/constants.native.js +2 -1
- package/dist/esm/constants/constants.native.js.map +1 -1
- package/dist/esm/constants/isDevTools.mjs +2 -1
- package/dist/esm/constants/isDevTools.mjs.map +1 -1
- package/dist/esm/constants/isDevTools.native.js +2 -1
- package/dist/esm/constants/isDevTools.native.js.map +1 -1
- package/dist/esm/createComponent.mjs +40 -39
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +39 -38
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createTamagui.mjs +2 -1
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +2 -1
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/createTokens.mjs +2 -1
- package/dist/esm/createTokens.mjs.map +1 -1
- package/dist/esm/createTokens.native.js +2 -1
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.mjs +2 -1
- package/dist/esm/createVariable.mjs.map +1 -1
- package/dist/esm/createVariable.native.js +2 -1
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/helpers/createDesignSystem.mjs +3 -2
- package/dist/esm/helpers/createDesignSystem.mjs.map +1 -1
- package/dist/esm/helpers/createDesignSystem.native.js +2 -1
- package/dist/esm/helpers/createDesignSystem.native.js.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.mjs +2 -1
- package/dist/esm/helpers/formatDiagnostic.mjs.map +1 -1
- package/dist/esm/helpers/formatDiagnostic.native.js +2 -1
- package/dist/esm/helpers/formatDiagnostic.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +37 -36
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +40 -39
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs +4 -3
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.mjs +4 -3
- package/dist/esm/helpers/insertStyleRule.mjs.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +4 -3
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/log.mjs +2 -1
- package/dist/esm/helpers/log.mjs.map +1 -1
- package/dist/esm/helpers/log.native.js +2 -1
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/matchMedia.native.js +3 -2
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/noteOnce.mjs +2 -1
- package/dist/esm/helpers/noteOnce.mjs.map +1 -1
- package/dist/esm/helpers/noteOnce.native.js +2 -1
- package/dist/esm/helpers/noteOnce.native.js.map +1 -1
- package/dist/esm/helpers/resolveSafeAreaVariable.native.js +2 -1
- package/dist/esm/helpers/resolveSafeAreaVariable.native.js.map +1 -1
- package/dist/esm/helpers/resolveSizing.mjs +2 -1
- package/dist/esm/helpers/resolveSizing.mjs.map +1 -1
- package/dist/esm/helpers/resolveSizing.native.js +2 -1
- package/dist/esm/helpers/resolveSizing.native.js.map +1 -1
- package/dist/esm/helpers/skipProps.mjs +3 -2
- package/dist/esm/helpers/skipProps.mjs.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +3 -2
- package/dist/esm/helpers/skipProps.native.js.map +1 -1
- package/dist/esm/helpers/styledDynamic.mjs +2 -1
- package/dist/esm/helpers/styledDynamic.mjs.map +1 -1
- package/dist/esm/helpers/styledDynamic.native.js +2 -1
- package/dist/esm/helpers/styledDynamic.native.js.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.mjs +2 -1
- package/dist/esm/helpers/subscribeToContextGroup.mjs.map +1 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js +2 -1
- package/dist/esm/helpers/subscribeToContextGroup.native.js.map +1 -1
- package/dist/esm/helpers/variableValue.mjs +2 -1
- package/dist/esm/helpers/variableValue.mjs.map +1 -1
- package/dist/esm/helpers/variableValue.native.js +2 -1
- package/dist/esm/helpers/variableValue.native.js.map +1 -1
- package/dist/esm/helpers/variables.mjs +5 -4
- package/dist/esm/helpers/variables.mjs.map +1 -1
- package/dist/esm/helpers/variables.native.js +5 -4
- package/dist/esm/helpers/variables.native.js.map +1 -1
- package/dist/esm/helpers/warnOnce.mjs +4 -3
- package/dist/esm/helpers/warnOnce.mjs.map +1 -1
- package/dist/esm/helpers/warnOnce.native.js +4 -3
- package/dist/esm/helpers/warnOnce.native.js.map +1 -1
- package/dist/esm/hooks/getThemeProxied.mjs +2 -1
- package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
- package/dist/esm/hooks/getThemeProxied.native.js +5 -4
- package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.mjs +3 -2
- package/dist/esm/hooks/useAnimationDriver.mjs.map +1 -1
- package/dist/esm/hooks/useAnimationDriver.native.js +3 -2
- package/dist/esm/hooks/useAnimationDriver.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +3 -2
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +3 -2
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useTheme.mjs +2 -1
- package/dist/esm/hooks/useTheme.mjs.map +1 -1
- package/dist/esm/hooks/useTheme.native.js +2 -1
- package/dist/esm/hooks/useTheme.native.js.map +1 -1
- package/dist/esm/hooks/useThemeState.mjs +2 -1
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +2 -1
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/style.mjs +2 -1
- package/dist/esm/style.mjs.map +1 -1
- package/dist/esm/style.native.js +2 -1
- package/dist/esm/style.native.js.map +1 -1
- package/dist/esm/styled.mjs +3 -2
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js +2 -1
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs +2 -1
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +2 -1
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/Theme.mjs +5 -4
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js +5 -4
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +3 -2
- package/dist/esm/views/ThemeDebug.mjs.map +1 -1
- package/package.json +20 -20
- package/src/Tamagui.ts +3 -1
- package/src/_withStableStyle.tsx +3 -1
- package/src/config.ts +9 -6
- package/src/constants/constants.ts +3 -1
- package/src/constants/isDevTools.ts +2 -1
- package/src/createComponent.tsx +55 -37
- package/src/createTamagui.ts +3 -1
- package/src/createTokens.ts +3 -1
- package/src/createVariable.ts +3 -1
- package/src/helpers/createDesignSystem.ts +4 -2
- package/src/helpers/formatDiagnostic.ts +2 -1
- package/src/helpers/getSplitStyles.tsx +56 -29
- package/src/helpers/getThemeCSSRules.ts +5 -3
- package/src/helpers/insertStyleRule.tsx +5 -3
- package/src/helpers/log.ts +3 -1
- package/src/helpers/matchMedia.native.ts +4 -2
- package/src/helpers/noteOnce.ts +2 -1
- package/src/helpers/resolveSafeAreaVariable.native.ts +3 -1
- package/src/helpers/resolveSizing.ts +3 -1
- package/src/helpers/skipProps.ts +4 -2
- package/src/helpers/styledDynamic.ts +3 -1
- package/src/helpers/subscribeToContextGroup.tsx +3 -1
- package/src/helpers/variableValue.ts +3 -1
- package/src/helpers/variables.ts +6 -4
- package/src/helpers/warnOnce.ts +4 -3
- package/src/hooks/getThemeProxied.ts +14 -4
- package/src/hooks/useAnimationDriver.ts +4 -2
- package/src/hooks/useMedia.tsx +4 -2
- package/src/hooks/useTheme.tsx +3 -1
- package/src/hooks/useThemeState.ts +3 -1
- package/src/index.ts +1 -0
- package/src/style.ts +3 -1
- package/src/styled.tsx +14 -26
- package/src/views/TamaguiProvider.tsx +4 -1
- package/src/views/Theme.tsx +6 -4
- package/src/views/ThemeDebug.tsx +8 -2
- package/types/Tamagui.d.ts.map +1 -1
- package/types/_withStableStyle.d.ts.map +1 -1
- package/types/config.d.ts.map +1 -1
- package/types/constants/constants.d.ts.map +1 -1
- package/types/constants/isDevTools.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/createTokens.d.ts.map +1 -1
- package/types/createVariable.d.ts.map +1 -1
- package/types/helpers/createDesignSystem.d.ts.map +1 -1
- package/types/helpers/formatDiagnostic.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/log.d.ts.map +1 -1
- package/types/helpers/matchMedia.native.d.ts.map +1 -1
- package/types/helpers/noteOnce.d.ts.map +1 -1
- package/types/helpers/resolveSafeAreaVariable.native.d.ts.map +1 -1
- package/types/helpers/resolveSizing.d.ts.map +1 -1
- package/types/helpers/skipProps.d.ts.map +1 -1
- package/types/helpers/styledDynamic.d.ts.map +1 -1
- package/types/helpers/subscribeToContextGroup.d.ts.map +1 -1
- package/types/helpers/variableValue.d.ts.map +1 -1
- package/types/helpers/variables.d.ts.map +1 -1
- package/types/helpers/warnOnce.d.ts.map +1 -1
- package/types/hooks/getThemeProxied.d.ts.map +1 -1
- package/types/hooks/useAnimationDriver.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/style.d.ts.map +1 -1
- package/types/styled.d.ts +1 -2
- package/types/styled.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeDebug.d.ts.map +1 -1
|
@@ -30,7 +30,8 @@ import { isStylePiece, isStylePieceCacheable, setStylePieceCompiler, setStylePie
|
|
|
30
30
|
|
|
31
31
|
export * from "./tokenCategories.mjs"
|
|
32
32
|
|
|
33
|
-
const
|
|
33
|
+
const isProd = process.env.NODE_ENV === "production";
|
|
34
|
+
const shouldTrackStyleTokenProvenance = !isProd && process.env.NODE_ENV === "development" && process.env.TAMAGUI_ENABLE_STYLE_TOKEN_PROVENANCE === "1";
|
|
34
35
|
const conditionValue = 0;
|
|
35
36
|
const conditionPlatform = 1;
|
|
36
37
|
const conditionKey = 2;
|
|
@@ -64,7 +65,7 @@ function createCondition(parent) {
|
|
|
64
65
|
}
|
|
65
66
|
function setConditionUnresolved(condition, name = "") {
|
|
66
67
|
condition[conditionValue] &= -17;
|
|
67
|
-
if (process.env.NODE_ENV !== "production") condition.problem ||= name;
|
|
68
|
+
if (!isProd && process.env.NODE_ENV !== "production") condition.problem ||= name;
|
|
68
69
|
}
|
|
69
70
|
function appendConditionWrapper(condition, wrapper) {
|
|
70
71
|
const wrappers = condition[conditionWrappers];
|
|
@@ -118,7 +119,7 @@ function resolveConditionModifier(state, condition, authored) {
|
|
|
118
119
|
}
|
|
119
120
|
const component = state.componentState.group?.[groupName];
|
|
120
121
|
const context = state.flatGroupContext?.[groupName];
|
|
121
|
-
if (process.env.NODE_ENV === "development" && containerName && !component && !context && state.flatGroupContext?.[containerName]) warnOnce(`group-container:${containerName}`, `@${size}/${containerName}: targets group="${containerName}", but groups no longer establish query containers. Add container="${containerName}" to that group.`);
|
|
122
|
+
if (!isProd && process.env.NODE_ENV === "development" && containerName && !component && !context && state.flatGroupContext?.[containerName]) warnOnce(`group-container:${containerName}`, `@${size}/${containerName}: targets group="${containerName}", but groups no longer establish query containers. Add container="${containerName}" to that group.`);
|
|
122
123
|
if (!(component?.media?.[size] ?? (context?.state.layout && mediaKeyMatch(size, context.state.layout)))) condition[conditionValue] &= -2;
|
|
123
124
|
(state.flatGroupKeys ||= /* @__PURE__ */ new Set()).add(groupName);
|
|
124
125
|
(state.flatGroupMedia ||= /* @__PURE__ */ new Set()).add(size);
|
|
@@ -165,7 +166,7 @@ function commitCondition(condition) {
|
|
|
165
166
|
const ranks = condition[conditionRanks];
|
|
166
167
|
const depth = ranks.length;
|
|
167
168
|
if (depth > 5) {
|
|
168
|
-
if (process.env.NODE_ENV !== "production") throw new Error(`a flat value clause supports at most 5 non-platform conditions; received ${depth} in "${condition[conditionKey]}:"`);
|
|
169
|
+
if (!isProd && process.env.NODE_ENV !== "production") throw new Error(`a flat value clause supports at most 5 non-platform conditions; received ${depth} in "${condition[conditionKey]}:"`);
|
|
169
170
|
return 0;
|
|
170
171
|
}
|
|
171
172
|
let precedence = condition[conditionPlatform] * 6 + depth;
|
|
@@ -266,8 +267,8 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
266
267
|
return;
|
|
267
268
|
}
|
|
268
269
|
if (keyInit === "ref") return;
|
|
269
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
270
|
-
if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return;
|
|
270
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
271
|
+
if (!isProd && process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return;
|
|
271
272
|
if (!disableExpandShorthands) {
|
|
272
273
|
if (keyInit in shorthands) keyInit = shorthands[keyInit];
|
|
273
274
|
}
|
|
@@ -293,7 +294,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
293
294
|
}
|
|
294
295
|
if (condition2 !== void 0) {
|
|
295
296
|
if (isValidStyleKey(property, validStyles)) contributeValue(styleState, property, entry[1], void 0, false, condition2);
|
|
296
|
-
else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property}" is not a valid style on this component; the frontend value is dropped.`);
|
|
297
|
+
else if (!isProd && process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property}" is not a valid style on this component; the frontend value is dropped.`);
|
|
297
298
|
return;
|
|
298
299
|
}
|
|
299
300
|
if (property === "group") pass[passFrontendGroup] = entry[1];
|
|
@@ -311,7 +312,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
311
312
|
const candidate = valInit.slice(start, index);
|
|
312
313
|
const preserveRaw = resolveClassName ? resolveClassName(candidate, conf, sink) : true;
|
|
313
314
|
if (preserveRaw === null) {
|
|
314
|
-
if (process.env.NODE_ENV === "development") warnOnce(`[tamagui] frontend candidate "${candidate}" is unavailable on this platform and was dropped.`);
|
|
315
|
+
if (!isProd && process.env.NODE_ENV === "development") warnOnce(`[tamagui] frontend candidate "${candidate}" is unavailable on this platform and was dropped.`);
|
|
315
316
|
} else if (preserveRaw) {
|
|
316
317
|
pass[passClassName] = pass[passClassName] ? `${pass[passClassName]} ${candidate}` : candidate;
|
|
317
318
|
if (resolveClassName) {
|
|
@@ -417,7 +418,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
417
418
|
const defaultVal = defaultProps[keyOg] ?? defaultProps[keyInit];
|
|
418
419
|
if (defaultVal !== void 0 && valInit === defaultVal) return;
|
|
419
420
|
}
|
|
420
|
-
if (process.env.NODE_ENV === "development") {
|
|
421
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
421
422
|
if (!isValidStyleKey(keyInit, validStyles) && (keyInit === "animation" || !(keyInit in stylePropsAll)) && (!variants || !(keyInit in variants))) {
|
|
422
423
|
let replacement;
|
|
423
424
|
if (keyInit === "animation") replacement = "transition=";
|
|
@@ -445,7 +446,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
445
446
|
return;
|
|
446
447
|
}
|
|
447
448
|
if (pass[passVariantOutput] && !isValidStyleKeyInit && !keyInit.startsWith("aria-") && !(keyInit in stylePropsAll) && !(keyInit in skipProps) && !(variants && keyInit in variants) && !(parentVariants && keyInit in parentVariants) && !styledContextKeys?.has(keyInit) && !(styledContext && keyInit in styledContext)) {
|
|
448
|
-
if (process.env.NODE_ENV === "development") warnOnce(`variant-non-style:${keyInit}`, `a variant set "${keyInit}", which is not a style. Variants hold styles and aria/data attributes only: set "${keyInit}" on the component one level up.`);
|
|
449
|
+
if (!isProd && process.env.NODE_ENV === "development") warnOnce(`variant-non-style:${keyInit}`, `a variant set "${keyInit}", which is not a style. Variants hold styles and aria/data attributes only: set "${keyInit}" on the component one level up.`);
|
|
449
450
|
return;
|
|
450
451
|
}
|
|
451
452
|
if (!noExpand) {
|
|
@@ -474,7 +475,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
474
475
|
const shouldPassProp = !isStyleProp && isHOC || isHOC && keyInit === "disabled" || parentVariants && keyInit in parentVariants || inlineProps?.has(keyInit);
|
|
475
476
|
const isHOCShouldPassThrough = isHOC && keyInit in skipProps;
|
|
476
477
|
const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
477
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
478
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
478
479
|
console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
|
|
479
480
|
log({
|
|
480
481
|
isVariant,
|
|
@@ -492,12 +493,12 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
492
493
|
if (shouldPassThrough) {
|
|
493
494
|
if (keyInit in viewProps) delete viewProps[keyInit];
|
|
494
495
|
viewProps[keyInit] = valInit;
|
|
495
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
496
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
496
497
|
if (!isVariant) return;
|
|
497
498
|
}
|
|
498
499
|
if (shouldCheckSkipProps && !neverSkipProps?.[keyInit]) {
|
|
499
500
|
if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit === "string" && !getTransitionResolver()?.resolve(valInit, { animations: driverAnimations }).fused)) {
|
|
500
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
501
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
501
502
|
return;
|
|
502
503
|
}
|
|
503
504
|
}
|
|
@@ -534,15 +535,15 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
534
535
|
const transport = previous && typeof previous === "object" && !Array.isArray(previous) && "default" in previous ? previous : { default: previous };
|
|
535
536
|
transport[condition[conditionKey]] = valInit;
|
|
536
537
|
viewProps[keyInit] = transport;
|
|
537
|
-
} else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${keyInit}" is not a valid style on this component; the conditional variant value is dropped.`);
|
|
538
|
+
} else if (!isProd && process.env.NODE_ENV === "development") console.warn(`[tamagui] "${keyInit}" is not a valid style on this component; the conditional variant value is dropped.`);
|
|
538
539
|
return;
|
|
539
540
|
}
|
|
540
541
|
if (keyInit in stylePropsAll || isRemovedVendorStyleProp(keyInit)) {
|
|
541
|
-
if (process.env.NODE_ENV === "development" && true) console.warn(`[tamagui] "${keyInit}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
|
|
542
|
+
if (!isProd && process.env.NODE_ENV === "development" && true) console.warn(`[tamagui] "${keyInit}" is a text style prop and this component is not text \u2014 it would render on neither platform. Use a Text-based component, or html.* for raw web elements.`);
|
|
542
543
|
return;
|
|
543
544
|
}
|
|
544
545
|
viewProps[keyInit] = valInit;
|
|
545
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
546
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
546
547
|
try {
|
|
547
548
|
log(` \u2714\uFE0F expand complete`, keyInit);
|
|
548
549
|
log("style", { ...styleState.style });
|
|
@@ -576,7 +577,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
576
577
|
let className = staticPassthroughClassName;
|
|
577
578
|
if (staticPassthroughClassName) shouldDoClasses = false;
|
|
578
579
|
const validStyles$1 = staticConfig.validStyles || (staticConfig.isInput ? stylePropsInput : staticConfig.isText ? stylePropsText : validStyles);
|
|
579
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
|
|
580
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
|
|
580
581
|
const styleState = {
|
|
581
582
|
classNames,
|
|
582
583
|
conf,
|
|
@@ -597,8 +598,8 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
597
598
|
animationDriver: resolvedDriver
|
|
598
599
|
};
|
|
599
600
|
styleState.flatStyleStaticConfig = styleStaticConfig;
|
|
600
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
601
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && isClient) {
|
|
601
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
602
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose" && isClient) {
|
|
602
603
|
if (isDevTools) {
|
|
603
604
|
console.groupCollapsed("🔹 getSplitStyles 👇");
|
|
604
605
|
log({
|
|
@@ -646,7 +647,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
646
647
|
styledContextKeys,
|
|
647
648
|
(noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0),
|
|
648
649
|
debug,
|
|
649
|
-
process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
|
|
650
|
+
!isProd && process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
|
|
650
651
|
defaultProps,
|
|
651
652
|
driverAnimations,
|
|
652
653
|
driverOutputStyle,
|
|
@@ -721,7 +722,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
721
722
|
containerType ??= "inline-size";
|
|
722
723
|
contributeValue(styleState, containerName ? "container" : "containerType", containerName ? `${containerName} / ${containerType}` : containerType);
|
|
723
724
|
}
|
|
724
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
|
|
725
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
|
|
725
726
|
conditionalStates = styleState.flatStateKeys || null;
|
|
726
727
|
usesSafeArea = !!styleState.flatUsesSafeArea;
|
|
727
728
|
hasMedia = styleState.flatMediaKeys?.size ? styleState.flatMediaKeys : false;
|
|
@@ -776,7 +777,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
776
777
|
}
|
|
777
778
|
if (!noNormalize && !isHOC && (!isAnimated || driverInputStyle === "css") && Array.isArray(styleState.style?.transform)) styleState.style.transform = transformsToString(styleState.style.transform);
|
|
778
779
|
flushDirectStyles(styleState);
|
|
779
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
780
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
780
781
|
if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
|
|
781
782
|
const provenance = {};
|
|
782
783
|
let hasProvenance = false;
|
|
@@ -836,7 +837,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
836
837
|
}
|
|
837
838
|
}
|
|
838
839
|
}
|
|
839
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
840
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
840
841
|
if (isClient && isDevTools) {
|
|
841
842
|
console.groupEnd();
|
|
842
843
|
console.groupCollapsed("🔹 getSplitStyles ===>");
|
|
@@ -855,7 +856,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
855
856
|
console.groupEnd();
|
|
856
857
|
}
|
|
857
858
|
}
|
|
858
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
|
|
859
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
|
|
859
860
|
return result;
|
|
860
861
|
};
|
|
861
862
|
const stylePieceStaticConfig = {
|
|
@@ -1229,7 +1230,7 @@ function emitAtParentCondition(state, property, value, originalValue, contextOnl
|
|
|
1229
1230
|
function emitUnderCondition(state, property, value, cursor, originalValue, contextOnly, warnMode, warnSource) {
|
|
1230
1231
|
const condition = cursor[conditionValue];
|
|
1231
1232
|
if (!(condition & conditionResolvedFlag)) {
|
|
1232
|
-
if (warnMode && process.env.NODE_ENV !== "production") warnRefusedValue(property, warnSource, `unknown modifier "${cursor.problem}"`);
|
|
1233
|
+
if (warnMode && !isProd && process.env.NODE_ENV !== "production") warnRefusedValue(property, warnSource, `unknown modifier "${cursor.problem}"`);
|
|
1233
1234
|
return 0;
|
|
1234
1235
|
}
|
|
1235
1236
|
emitValue(state, property, value, cursor, warnMode === 2 ? originalValue : originalValue ?? value, contextOnly);
|
|
@@ -1241,7 +1242,7 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
|
|
|
1241
1242
|
}
|
|
1242
1243
|
const formatScanFailure = (failure, source, failureIndex) => failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : failure === "over-deep-clause" ? `a clause with more than ${grammarMaxNonPlatformDepth} non-platform conditions` : "an unterminated \"(\"";
|
|
1243
1244
|
const warnScanFailure = (property, source, failure, failureIndex) => {
|
|
1244
|
-
if (process.env.NODE_ENV === "development") warnRefusedValue(property, source, formatScanFailure(failure, source, failureIndex));
|
|
1245
|
+
if (!isProd && process.env.NODE_ENV === "development") warnRefusedValue(property, source, formatScanFailure(failure, source, failureIndex));
|
|
1245
1246
|
};
|
|
1246
1247
|
let valueCacheConf;
|
|
1247
1248
|
let valueCacheRevision = -1;
|
|
@@ -1336,7 +1337,7 @@ function configuredValue(state, property, raw, embedded = false, nativeColors) {
|
|
|
1336
1337
|
}
|
|
1337
1338
|
}
|
|
1338
1339
|
}
|
|
1339
|
-
if (process.env.NODE_ENV === "development") {
|
|
1340
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
1340
1341
|
const category = grammar.tokenCategory(property) || grammar.tokenCategory(state.conf.shorthands[property] || property);
|
|
1341
1342
|
if (category && category !== "color" && category !== "boxShadow" && category !== "textShadow" && state.conf.tokensParsed.color?.[name]) warnOnce(`"${name}" contributes to "color", not "${property}"`);
|
|
1342
1343
|
if (!value && !fontProperty) {
|
|
@@ -1461,7 +1462,7 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
|
|
|
1461
1462
|
return;
|
|
1462
1463
|
}
|
|
1463
1464
|
if (canGenerateCSS && state.flatShouldDoClasses && !condition && property === "transform") {
|
|
1464
|
-
if (process.env.NODE_ENV === "development" && state.transformAccumulator) for (const part of getTransformPartKeys(state.transformAccumulator)) warnOnce(`legacy transform part "${part}" is dropped because "transform" owns the property`);
|
|
1465
|
+
if (!isProd && process.env.NODE_ENV === "development" && state.transformAccumulator) for (const part of getTransformPartKeys(state.transformAccumulator)) warnOnce(`legacy transform part "${part}" is dropped because "transform" owns the property`);
|
|
1465
1466
|
state.transformAccumulator ||= createTransformAccumulator();
|
|
1466
1467
|
addTransformValue(state.transformAccumulator, property, value);
|
|
1467
1468
|
return;
|
|
@@ -1572,7 +1573,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1572
1573
|
let value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
|
|
1573
1574
|
if (!state.flatShouldDoClasses && typeof value2 === "string" && !value2.startsWith(THEME_REF_PREFIX)) {
|
|
1574
1575
|
if (property === "rotate" && !isFinite(numericUnitValue(value2, "deg", "rad")) && !startsValueFunction(value2)) {
|
|
1575
|
-
if (process.env.NODE_ENV === "development") warnOnce(`native transform "${property}" cannot represent "${value2}"; dropping it`);
|
|
1576
|
+
if (!isProd && process.env.NODE_ENV === "development") warnOnce(`native transform "${property}" cannot represent "${value2}"; dropping it`);
|
|
1576
1577
|
if (condition & 1) {
|
|
1577
1578
|
removeTransformValue(state.transformAccumulator, property);
|
|
1578
1579
|
writeStyleRecord(state, property, void 0, cursor, void 0, recordRetract);
|
|
@@ -1627,7 +1628,7 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
|
|
|
1627
1628
|
if (typeof value === "string") {
|
|
1628
1629
|
const parsed = getConfigRevisionState(state.conf).parseFlatValue(value);
|
|
1629
1630
|
const [segments, failure, failureIndex] = parsed;
|
|
1630
|
-
if (process.env.NODE_ENV === "development") {
|
|
1631
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
1631
1632
|
if (getSetting("styleValueSyntax") === "object") {
|
|
1632
1633
|
if (segments.length > 5 || segments.length >= 5 && segments[2] !== -1 || value.includes(":")) warnOnce(`syntax:string:${property}=${value}`, `string syntax is disabled by config (styleValueSyntax: 'object'); received "${property}=${value}"`);
|
|
1633
1634
|
}
|
|
@@ -1650,7 +1651,7 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
|
|
|
1650
1651
|
const payload = slices[index] ??= value.slice(start, end);
|
|
1651
1652
|
emitConditionalValue(state, property, payload, parentCondition, payload, sink, warnMode, contextOnly);
|
|
1652
1653
|
hasBase = true;
|
|
1653
|
-
} else if (process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
|
|
1654
|
+
} else if (!isProd && process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
|
|
1654
1655
|
emitConditionalValue(state, property, value, parentCondition, value, sink, warnMode, contextOnly);
|
|
1655
1656
|
hasBase = true;
|
|
1656
1657
|
} else if (warnMode) warnScanFailure(property, value, failure, failureIndex);
|
|
@@ -1667,17 +1668,17 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
|
|
|
1667
1668
|
}
|
|
1668
1669
|
lastPayloadStart = start;
|
|
1669
1670
|
if (start === end) {
|
|
1670
|
-
if (warnMode && process.env.NODE_ENV === "development") warnRefusedValue(property, value, "a conditional clause has no value");
|
|
1671
|
+
if (warnMode && !isProd && process.env.NODE_ENV === "development") warnRefusedValue(property, value, "a conditional clause has no value");
|
|
1671
1672
|
continue;
|
|
1672
1673
|
}
|
|
1673
1674
|
const cursor = conditionFromKey(state, slices[index + 2] ??= value.slice(segments[index + 2], segments[index + 3]), parentCondition);
|
|
1674
1675
|
conditions |= cursor[conditionValue];
|
|
1675
1676
|
if (cursor[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, slices[index] ??= value.slice(start, end), cursor, value, sink, warnMode, contextOnly);
|
|
1676
1677
|
}
|
|
1677
|
-
if (process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
|
|
1678
|
+
if (!isProd && process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
|
|
1678
1679
|
} else {
|
|
1679
1680
|
if (!value || typeof value !== "object" || Array.isArray(value) || isVariable(value) || !classifyConditionalObject(value, state)) return false;
|
|
1680
|
-
if (process.env.NODE_ENV === "development") {
|
|
1681
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
1681
1682
|
if (getSetting("styleValueSyntax") === "string") warnOnce(`syntax:object:${property}=${JSON.stringify(value)}`, `object-form conditional syntax is disabled by config (styleValueSyntax: 'string'); received "${property}"`);
|
|
1682
1683
|
}
|
|
1683
1684
|
if (value.default != null) {
|
|
@@ -1691,7 +1692,7 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
|
|
|
1691
1692
|
if (cursor[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, value[key], cursor, value[key], sink, warnMode, contextOnly);
|
|
1692
1693
|
}
|
|
1693
1694
|
}
|
|
1694
|
-
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && getConfigRevisionState(state.conf).tokenCategory(property) && getConfigRevisionState(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && splitComponents(lastPayload).length > 1) warnOnce(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1695
|
+
if (warnMode && !isProd && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && getConfigRevisionState(state.conf).tokenCategory(property) && getConfigRevisionState(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && splitComponents(lastPayload).length > 1) warnOnce(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1695
1696
|
if (warnMode === 1 && conditions & 12 && !hasBase) {
|
|
1696
1697
|
const resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
|
|
1697
1698
|
const layers = state.flatPropertyLayers;
|
|
@@ -1717,7 +1718,7 @@ function contributeValue(state, property, value, originalValue, contextOnly = fa
|
|
|
1717
1718
|
}
|
|
1718
1719
|
const compositeKind = getConfigRevisionState(state.conf).propertyKind(property);
|
|
1719
1720
|
if (compositeKind > 0 && compositeKind < 6 && (typeof value === "string" && value.indexOf(":") !== -1 || value && typeof value === "object" && !Array.isArray(value) && !isVariable(value) && classifyConditionalObject(value, state))) {
|
|
1720
|
-
if (process.env.NODE_ENV === "development") warnOnce(`conditional "${property}" needs its composite property; dropping it`);
|
|
1721
|
+
if (!isProd && process.env.NODE_ENV === "development") warnOnce(`conditional "${property}" needs its composite property; dropping it`);
|
|
1721
1722
|
return true;
|
|
1722
1723
|
}
|
|
1723
1724
|
if (value === "safe") {
|