@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
|
@@ -71,7 +71,8 @@ var import_transformsToString = require("./transformsToString.cjs");
|
|
|
71
71
|
var import_style = require("../style.cjs");
|
|
72
72
|
var import_styleProvenance2 = require("./styleProvenance.cjs");
|
|
73
73
|
__reExport(getSplitStyles_exports, require("./tokenCategories.cjs"), module.exports);
|
|
74
|
-
const
|
|
74
|
+
const isProd = process.env.NODE_ENV === "production";
|
|
75
|
+
const shouldTrackStyleTokenProvenance = !isProd && process.env.NODE_ENV === "development" && process.env.TAMAGUI_ENABLE_STYLE_TOKEN_PROVENANCE === "1";
|
|
75
76
|
const conditionValue = 0;
|
|
76
77
|
const conditionPlatform = 1;
|
|
77
78
|
const conditionKey = 2;
|
|
@@ -105,7 +106,7 @@ function createCondition(parent) {
|
|
|
105
106
|
}
|
|
106
107
|
function setConditionUnresolved(condition, name = "") {
|
|
107
108
|
condition[conditionValue] &= ~conditionResolvedFlag;
|
|
108
|
-
if (process.env.NODE_ENV !== "production") condition.problem ||= name;
|
|
109
|
+
if (!isProd && process.env.NODE_ENV !== "production") condition.problem ||= name;
|
|
109
110
|
}
|
|
110
111
|
function appendConditionWrapper(condition, wrapper) {
|
|
111
112
|
const wrappers = condition[conditionWrappers];
|
|
@@ -159,7 +160,7 @@ function resolveConditionModifier(state, condition, authored) {
|
|
|
159
160
|
}
|
|
160
161
|
const component = state.componentState.group?.[groupName];
|
|
161
162
|
const context = state.flatGroupContext?.[groupName];
|
|
162
|
-
if (process.env.NODE_ENV === "development" && containerName && !component && !context && state.flatGroupContext?.[containerName]) (0, import_warnOnce.warnOnce)(`group-container:${containerName}`, `@${size}/${containerName}: targets group="${containerName}", but groups no longer establish query containers. Add container="${containerName}" to that group.`);
|
|
163
|
+
if (!isProd && process.env.NODE_ENV === "development" && containerName && !component && !context && state.flatGroupContext?.[containerName]) (0, import_warnOnce.warnOnce)(`group-container:${containerName}`, `@${size}/${containerName}: targets group="${containerName}", but groups no longer establish query containers. Add container="${containerName}" to that group.`);
|
|
163
164
|
if (!(component?.media?.[size] ?? (context?.state.layout && (0, import_mediaState.mediaKeyMatch)(size, context.state.layout)))) condition[conditionValue] &= -2;
|
|
164
165
|
(state.flatGroupKeys ||= /* @__PURE__ */ new Set()).add(groupName);
|
|
165
166
|
(state.flatGroupMedia ||= /* @__PURE__ */ new Set()).add(size);
|
|
@@ -206,7 +207,7 @@ function commitCondition(condition) {
|
|
|
206
207
|
const ranks = condition[conditionRanks];
|
|
207
208
|
const depth = ranks.length;
|
|
208
209
|
if (depth > 5) {
|
|
209
|
-
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]}:"`);
|
|
210
|
+
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]}:"`);
|
|
210
211
|
return 0;
|
|
211
212
|
}
|
|
212
213
|
let precedence = condition[conditionPlatform] * 6 + depth;
|
|
@@ -307,8 +308,8 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
307
308
|
return;
|
|
308
309
|
}
|
|
309
310
|
if (keyInit === "ref") return;
|
|
310
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
311
|
-
if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return;
|
|
311
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
312
|
+
if (!isProd && process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return;
|
|
312
313
|
if (!disableExpandShorthands) {
|
|
313
314
|
if (keyInit in shorthands) keyInit = shorthands[keyInit];
|
|
314
315
|
}
|
|
@@ -334,7 +335,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
334
335
|
}
|
|
335
336
|
if (condition2 !== void 0) {
|
|
336
337
|
if (isValidStyleKey(property, validStyles)) contributeValue(styleState, property, entry[1], void 0, false, condition2);
|
|
337
|
-
else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property}" is not a valid style on this component; the frontend value is dropped.`);
|
|
338
|
+
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.`);
|
|
338
339
|
return;
|
|
339
340
|
}
|
|
340
341
|
if (property === "group") pass[passFrontendGroup] = entry[1];
|
|
@@ -352,7 +353,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
352
353
|
const candidate = valInit.slice(start, index);
|
|
353
354
|
const preserveRaw = resolveClassName ? resolveClassName(candidate, conf, sink) : true;
|
|
354
355
|
if (preserveRaw === null) {
|
|
355
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`[tamagui] frontend candidate "${candidate}" is unavailable on this platform and was dropped.`);
|
|
356
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`[tamagui] frontend candidate "${candidate}" is unavailable on this platform and was dropped.`);
|
|
356
357
|
} else if (preserveRaw) {
|
|
357
358
|
pass[passClassName] = pass[passClassName] ? `${pass[passClassName]} ${candidate}` : candidate;
|
|
358
359
|
if (resolveClassName) {
|
|
@@ -458,7 +459,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
458
459
|
const defaultVal = defaultProps[keyOg] ?? defaultProps[keyInit];
|
|
459
460
|
if (defaultVal !== void 0 && valInit === defaultVal) return;
|
|
460
461
|
}
|
|
461
|
-
if (process.env.NODE_ENV === "development") {
|
|
462
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
462
463
|
if (!isValidStyleKey(keyInit, validStyles) && (keyInit === "animation" || !(keyInit in import_helpers.stylePropsAll)) && (!variants || !(keyInit in variants))) {
|
|
463
464
|
let replacement;
|
|
464
465
|
if (keyInit === "animation") replacement = "transition=";
|
|
@@ -486,7 +487,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
486
487
|
return;
|
|
487
488
|
}
|
|
488
489
|
if (pass[passVariantOutput] && !isValidStyleKeyInit && !keyInit.startsWith("aria-") && !(keyInit in import_helpers.stylePropsAll) && !(keyInit in import_skipProps.skipProps) && !(variants && keyInit in variants) && !(parentVariants && keyInit in parentVariants) && !styledContextKeys?.has(keyInit) && !(styledContext && keyInit in styledContext)) {
|
|
489
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.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.`);
|
|
490
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.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.`);
|
|
490
491
|
return;
|
|
491
492
|
}
|
|
492
493
|
if (!noExpand) {
|
|
@@ -515,7 +516,7 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
515
516
|
const shouldPassProp = !isStyleProp && isHOC || isHOC && keyInit === "disabled" || parentVariants && keyInit in parentVariants || inlineProps?.has(keyInit);
|
|
516
517
|
const isHOCShouldPassThrough = isHOC && keyInit in import_skipProps.skipProps;
|
|
517
518
|
const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
518
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
519
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
519
520
|
console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
|
|
520
521
|
(0, import_log.log)({
|
|
521
522
|
isVariant,
|
|
@@ -533,12 +534,12 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
533
534
|
if (shouldPassThrough) {
|
|
534
535
|
if (keyInit in viewProps) delete viewProps[keyInit];
|
|
535
536
|
viewProps[keyInit] = valInit;
|
|
536
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
537
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
537
538
|
if (!isVariant) return;
|
|
538
539
|
}
|
|
539
540
|
if (shouldCheckSkipProps && !neverSkipProps?.[keyInit]) {
|
|
540
541
|
if (keyInit in import_skipProps.skipProps && !(keyInit === "transition" && typeof valInit === "string" && !(0, import_transitionResolver.getTransitionResolver)()?.resolve(valInit, { animations: driverAnimations }).fused)) {
|
|
541
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
542
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
542
543
|
return;
|
|
543
544
|
}
|
|
544
545
|
}
|
|
@@ -575,15 +576,15 @@ function contributeProp(pass, keyOg, valOg, originalOg = valOg, disabled = false
|
|
|
575
576
|
const transport = previous && typeof previous === "object" && !Array.isArray(previous) && "default" in previous ? previous : { default: previous };
|
|
576
577
|
transport[condition[conditionKey]] = valInit;
|
|
577
578
|
viewProps[keyInit] = transport;
|
|
578
|
-
} 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.`);
|
|
579
|
+
} 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.`);
|
|
579
580
|
return;
|
|
580
581
|
}
|
|
581
582
|
if (keyInit in import_helpers.stylePropsAll || isRemovedVendorStyleProp(keyInit)) {
|
|
582
|
-
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.`);
|
|
583
|
+
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.`);
|
|
583
584
|
return;
|
|
584
585
|
}
|
|
585
586
|
viewProps[keyInit] = valInit;
|
|
586
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
587
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
587
588
|
try {
|
|
588
589
|
(0, import_log.log)(` \u2714\uFE0F expand complete`, keyInit);
|
|
589
590
|
(0, import_log.log)("style", { ...styleState.style });
|
|
@@ -617,7 +618,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
617
618
|
let className = staticPassthroughClassName;
|
|
618
619
|
if (staticPassthroughClassName) shouldDoClasses = false;
|
|
619
620
|
const validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
620
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
|
|
621
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
|
|
621
622
|
const styleState = {
|
|
622
623
|
classNames,
|
|
623
624
|
conf,
|
|
@@ -638,8 +639,8 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
638
639
|
animationDriver: resolvedDriver
|
|
639
640
|
};
|
|
640
641
|
styleState.flatStyleStaticConfig = styleStaticConfig;
|
|
641
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
642
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && import_constants.isClient) {
|
|
642
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
643
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose" && import_constants.isClient) {
|
|
643
644
|
if (import_isDevTools.isDevTools) {
|
|
644
645
|
console.groupCollapsed("🔹 getSplitStyles 👇");
|
|
645
646
|
(0, import_log.log)({
|
|
@@ -687,7 +688,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
687
688
|
styledContextKeys,
|
|
688
689
|
(noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0),
|
|
689
690
|
debug,
|
|
690
|
-
process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
|
|
691
|
+
!isProd && process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
|
|
691
692
|
defaultProps,
|
|
692
693
|
driverAnimations,
|
|
693
694
|
driverOutputStyle,
|
|
@@ -762,7 +763,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
762
763
|
containerType ??= "inline-size";
|
|
763
764
|
contributeValue(styleState, containerName ? "container" : "containerType", containerName ? `${containerName} / ${containerType}` : containerType);
|
|
764
765
|
}
|
|
765
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
|
|
766
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
|
|
766
767
|
conditionalStates = styleState.flatStateKeys || null;
|
|
767
768
|
usesSafeArea = !!styleState.flatUsesSafeArea;
|
|
768
769
|
hasMedia = styleState.flatMediaKeys?.size ? styleState.flatMediaKeys : false;
|
|
@@ -817,7 +818,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
817
818
|
}
|
|
818
819
|
if (!noNormalize && !isHOC && (!isAnimated || driverInputStyle === "css") && Array.isArray(styleState.style?.transform)) styleState.style.transform = (0, import_transformsToString.transformsToString)(styleState.style.transform);
|
|
819
820
|
(0, import_getCSSStylesAtomic.flushDirectStyles)(styleState);
|
|
820
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
821
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
821
822
|
if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
|
|
822
823
|
const provenance = {};
|
|
823
824
|
let hasProvenance = false;
|
|
@@ -877,7 +878,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
877
878
|
}
|
|
878
879
|
}
|
|
879
880
|
}
|
|
880
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
881
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
881
882
|
if (import_constants.isClient && import_isDevTools.isDevTools) {
|
|
882
883
|
console.groupEnd();
|
|
883
884
|
console.groupCollapsed("🔹 getSplitStyles ===>");
|
|
@@ -896,7 +897,7 @@ const getSplitStyles = (props, staticConfig, theme, themeName, componentState, s
|
|
|
896
897
|
console.groupEnd();
|
|
897
898
|
}
|
|
898
899
|
}
|
|
899
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
|
|
900
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
|
|
900
901
|
return result;
|
|
901
902
|
};
|
|
902
903
|
const stylePieceStaticConfig = {
|
|
@@ -1270,7 +1271,7 @@ function emitAtParentCondition(state, property, value, originalValue, contextOnl
|
|
|
1270
1271
|
function emitUnderCondition(state, property, value, cursor, originalValue, contextOnly, warnMode, warnSource) {
|
|
1271
1272
|
const condition = cursor[conditionValue];
|
|
1272
1273
|
if (!(condition & conditionResolvedFlag)) {
|
|
1273
|
-
if (warnMode && process.env.NODE_ENV !== "production") (0, import_warnOnce.warnRefusedValue)(property, warnSource, `unknown modifier "${cursor.problem}"`);
|
|
1274
|
+
if (warnMode && !isProd && process.env.NODE_ENV !== "production") (0, import_warnOnce.warnRefusedValue)(property, warnSource, `unknown modifier "${cursor.problem}"`);
|
|
1274
1275
|
return 0;
|
|
1275
1276
|
}
|
|
1276
1277
|
emitValue(state, property, value, cursor, warnMode === 2 ? originalValue : originalValue ?? value, contextOnly);
|
|
@@ -1282,7 +1283,7 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
|
|
|
1282
1283
|
}
|
|
1283
1284
|
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 ${import_runtime.grammarMaxNonPlatformDepth} non-platform conditions` : "an unterminated \"(\"";
|
|
1284
1285
|
const warnScanFailure = (property, source, failure, failureIndex) => {
|
|
1285
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, formatScanFailure(failure, source, failureIndex));
|
|
1286
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, formatScanFailure(failure, source, failureIndex));
|
|
1286
1287
|
};
|
|
1287
1288
|
let valueCacheConf;
|
|
1288
1289
|
let valueCacheRevision = -1;
|
|
@@ -1377,7 +1378,7 @@ function configuredValue(state, property, raw, embedded = false, nativeColors) {
|
|
|
1377
1378
|
}
|
|
1378
1379
|
}
|
|
1379
1380
|
}
|
|
1380
|
-
if (process.env.NODE_ENV === "development") {
|
|
1381
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
1381
1382
|
const category = grammar.tokenCategory(property) || grammar.tokenCategory(state.conf.shorthands[property] || property);
|
|
1382
1383
|
if (category && category !== "color" && category !== "boxShadow" && category !== "textShadow" && state.conf.tokensParsed.color?.[name]) (0, import_warnOnce.warnOnce)(`"${name}" contributes to "color", not "${property}"`);
|
|
1383
1384
|
if (!value && !fontProperty) {
|
|
@@ -1502,7 +1503,7 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
|
|
|
1502
1503
|
return;
|
|
1503
1504
|
}
|
|
1504
1505
|
if (import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses && !condition && property === "transform") {
|
|
1505
|
-
if (process.env.NODE_ENV === "development" && state.transformAccumulator) for (const part of (0, import_runtime.getTransformPartKeys)(state.transformAccumulator)) (0, import_warnOnce.warnOnce)(`legacy transform part "${part}" is dropped because "transform" owns the property`);
|
|
1506
|
+
if (!isProd && process.env.NODE_ENV === "development" && state.transformAccumulator) for (const part of (0, import_runtime.getTransformPartKeys)(state.transformAccumulator)) (0, import_warnOnce.warnOnce)(`legacy transform part "${part}" is dropped because "transform" owns the property`);
|
|
1506
1507
|
state.transformAccumulator ||= (0, import_runtime.createTransformAccumulator)();
|
|
1507
1508
|
(0, import_runtime.addTransformValue)(state.transformAccumulator, property, value);
|
|
1508
1509
|
return;
|
|
@@ -1613,7 +1614,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1613
1614
|
let value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
|
|
1614
1615
|
if (!state.flatShouldDoClasses && typeof value2 === "string" && !value2.startsWith(import_themeRef.THEME_REF_PREFIX)) {
|
|
1615
1616
|
if (property === "rotate" && !isFinite(numericUnitValue(value2, "deg", "rad")) && !(0, import_borderComponents.startsValueFunction)(value2)) {
|
|
1616
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native transform "${property}" cannot represent "${value2}"; dropping it`);
|
|
1617
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native transform "${property}" cannot represent "${value2}"; dropping it`);
|
|
1617
1618
|
if (condition & 1) {
|
|
1618
1619
|
(0, import_runtime.removeTransformValue)(state.transformAccumulator, property);
|
|
1619
1620
|
writeStyleRecord(state, property, void 0, cursor, void 0, recordRetract);
|
|
@@ -1668,7 +1669,7 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
|
|
|
1668
1669
|
if (typeof value === "string") {
|
|
1669
1670
|
const parsed = (0, import_grammarConfig.getConfigRevisionState)(state.conf).parseFlatValue(value);
|
|
1670
1671
|
const [segments, failure, failureIndex] = parsed;
|
|
1671
|
-
if (process.env.NODE_ENV === "development") {
|
|
1672
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
1672
1673
|
if ((0, import_config.getSetting)("styleValueSyntax") === "object") {
|
|
1673
1674
|
if (segments.length > 5 || segments.length >= 5 && segments[2] !== -1 || value.includes(":")) (0, import_warnOnce.warnOnce)(`syntax:string:${property}=${value}`, `string syntax is disabled by config (styleValueSyntax: 'object'); received "${property}=${value}"`);
|
|
1674
1675
|
}
|
|
@@ -1691,7 +1692,7 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
|
|
|
1691
1692
|
const payload = slices[index] ??= value.slice(start, end);
|
|
1692
1693
|
emitConditionalValue(state, property, payload, parentCondition, payload, sink, warnMode, contextOnly);
|
|
1693
1694
|
hasBase = true;
|
|
1694
|
-
} else if (process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
|
|
1695
|
+
} else if (!isProd && process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
|
|
1695
1696
|
emitConditionalValue(state, property, value, parentCondition, value, sink, warnMode, contextOnly);
|
|
1696
1697
|
hasBase = true;
|
|
1697
1698
|
} else if (warnMode) warnScanFailure(property, value, failure, failureIndex);
|
|
@@ -1708,17 +1709,17 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
|
|
|
1708
1709
|
}
|
|
1709
1710
|
lastPayloadStart = start;
|
|
1710
1711
|
if (start === end) {
|
|
1711
|
-
if (warnMode && process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, value, "a conditional clause has no value");
|
|
1712
|
+
if (warnMode && !isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, value, "a conditional clause has no value");
|
|
1712
1713
|
continue;
|
|
1713
1714
|
}
|
|
1714
1715
|
const cursor = conditionFromKey(state, slices[index + 2] ??= value.slice(segments[index + 2], segments[index + 3]), parentCondition);
|
|
1715
1716
|
conditions |= cursor[conditionValue];
|
|
1716
1717
|
if (cursor[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, slices[index] ??= value.slice(start, end), cursor, value, sink, warnMode, contextOnly);
|
|
1717
1718
|
}
|
|
1718
|
-
if (process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
|
|
1719
|
+
if (!isProd && process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
|
|
1719
1720
|
} else {
|
|
1720
1721
|
if (!value || typeof value !== "object" || Array.isArray(value) || (0, import_createVariable.isVariable)(value) || !classifyConditionalObject(value, state)) return false;
|
|
1721
|
-
if (process.env.NODE_ENV === "development") {
|
|
1722
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
1722
1723
|
if ((0, import_config.getSetting)("styleValueSyntax") === "string") (0, import_warnOnce.warnOnce)(`syntax:object:${property}=${JSON.stringify(value)}`, `object-form conditional syntax is disabled by config (styleValueSyntax: 'string'); received "${property}"`);
|
|
1723
1724
|
}
|
|
1724
1725
|
if (value.default != null) {
|
|
@@ -1732,7 +1733,7 @@ function walkConditionalValue(state, property, value, parent, sink, warnMode = 0
|
|
|
1732
1733
|
if (cursor[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, value[key], cursor, value[key], sink, warnMode, contextOnly);
|
|
1733
1734
|
}
|
|
1734
1735
|
}
|
|
1735
|
-
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1736
|
+
if (warnMode && !isProd && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
1736
1737
|
if (warnMode === 1 && conditions & 12 && !hasBase) {
|
|
1737
1738
|
const resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
|
|
1738
1739
|
const layers = state.flatPropertyLayers;
|
|
@@ -1758,7 +1759,7 @@ function contributeValue(state, property, value, originalValue, contextOnly = fa
|
|
|
1758
1759
|
}
|
|
1759
1760
|
const compositeKind = (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property);
|
|
1760
1761
|
if (compositeKind > 0 && compositeKind < 6 && (typeof value === "string" && value.indexOf(":") !== -1 || value && typeof value === "object" && !Array.isArray(value) && !(0, import_createVariable.isVariable)(value) && classifyConditionalObject(value, state))) {
|
|
1761
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`conditional "${property}" needs its composite property; dropping it`);
|
|
1762
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`conditional "${property}" needs its composite property; dropping it`);
|
|
1762
1763
|
return true;
|
|
1763
1764
|
}
|
|
1764
1765
|
if (value === "safe") {
|
|
@@ -73,7 +73,8 @@ var import_transformsToString = require("./transformsToString.native.js");
|
|
|
73
73
|
var import_style = require("../style.native.js");
|
|
74
74
|
var import_styleProvenance2 = require("./styleProvenance.native.js");
|
|
75
75
|
__reExport(getSplitStyles_exports, require("./tokenCategories.native.js"), module.exports);
|
|
76
|
-
var
|
|
76
|
+
var isProd = process.env.NODE_ENV === "production";
|
|
77
|
+
var shouldTrackStyleTokenProvenance = !isProd && process.env.NODE_ENV === "development" && process.env.TAMAGUI_ENABLE_STYLE_TOKEN_PROVENANCE === "1";
|
|
77
78
|
var conditionValue = 0;
|
|
78
79
|
var conditionPlatform = 1;
|
|
79
80
|
var conditionKey = 2;
|
|
@@ -109,7 +110,7 @@ function setConditionUnresolved(condition) {
|
|
|
109
110
|
var name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
110
111
|
var _condition;
|
|
111
112
|
condition[conditionValue] &= ~conditionResolvedFlag;
|
|
112
|
-
if (process.env.NODE_ENV !== "production") (_condition = condition).problem || (_condition.problem = name);
|
|
113
|
+
if (!isProd && process.env.NODE_ENV !== "production") (_condition = condition).problem || (_condition.problem = name);
|
|
113
114
|
}
|
|
114
115
|
function appendConditionWrapper(condition, wrapper) {
|
|
115
116
|
var wrappers = condition[conditionWrappers];
|
|
@@ -169,7 +170,7 @@ function resolveConditionModifier(state, condition, authored) {
|
|
|
169
170
|
}
|
|
170
171
|
var component = (_state_componentState_group = state.componentState.group) === null || _state_componentState_group === void 0 ? void 0 : _state_componentState_group[groupName];
|
|
171
172
|
var context = (_state_flatGroupContext = state.flatGroupContext) === null || _state_flatGroupContext === void 0 ? void 0 : _state_flatGroupContext[groupName];
|
|
172
|
-
if (process.env.NODE_ENV === "development" && containerName && !component && !context && ((_state_flatGroupContext1 = state.flatGroupContext) === null || _state_flatGroupContext1 === void 0 ? void 0 : _state_flatGroupContext1[containerName])) (0, import_warnOnce.warnOnce)(`group-container:${containerName}`, `@${size}/${containerName}: targets group="${containerName}", but groups no longer establish query containers. Add container="${containerName}" to that group.`);
|
|
173
|
+
if (!isProd && process.env.NODE_ENV === "development" && containerName && !component && !context && ((_state_flatGroupContext1 = state.flatGroupContext) === null || _state_flatGroupContext1 === void 0 ? void 0 : _state_flatGroupContext1[containerName])) (0, import_warnOnce.warnOnce)(`group-container:${containerName}`, `@${size}/${containerName}: targets group="${containerName}", but groups no longer establish query containers. Add container="${containerName}" to that group.`);
|
|
173
174
|
var match = component === null || component === void 0 ? void 0 : (_component_media = component.media) === null || _component_media === void 0 ? void 0 : _component_media[size];
|
|
174
175
|
if (!(match !== null && match !== void 0 ? match : (context === null || context === void 0 ? void 0 : context.state.layout) && (0, import_mediaState.mediaKeyMatch)(size, context.state.layout))) condition[conditionValue] &= -2;
|
|
175
176
|
((_state1 = state).flatGroupKeys || (_state1.flatGroupKeys = /* @__PURE__ */ new Set())).add(groupName);
|
|
@@ -220,7 +221,7 @@ function commitCondition(condition) {
|
|
|
220
221
|
var ranks = condition[conditionRanks];
|
|
221
222
|
var depth = ranks.length;
|
|
222
223
|
if (depth > 5) {
|
|
223
|
-
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]}:"`);
|
|
224
|
+
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]}:"`);
|
|
224
225
|
return 0;
|
|
225
226
|
}
|
|
226
227
|
var precedence = condition[conditionPlatform] * 6 + depth;
|
|
@@ -338,8 +339,8 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
338
339
|
}
|
|
339
340
|
if (keyInit === "ref") return;
|
|
340
341
|
if (keyInit[0] === "d" && keyInit.startsWith("data-")) return;
|
|
341
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
342
|
-
if (process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return;
|
|
342
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`before-prop-${keyInit}`;
|
|
343
|
+
if (!isProd && process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle") return;
|
|
343
344
|
if (!disableExpandShorthands) {
|
|
344
345
|
if (keyInit in shorthands) keyInit = shorthands[keyInit];
|
|
345
346
|
}
|
|
@@ -362,7 +363,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
362
363
|
}
|
|
363
364
|
if (condition2 !== void 0) {
|
|
364
365
|
if (isValidStyleKey(property3, validStyles)) contributeValue(styleState, property3, entry2[1], void 0, false, condition2);
|
|
365
|
-
else if (process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property3}" is not a valid style on this component; the frontend value is dropped.`);
|
|
366
|
+
else if (!isProd && process.env.NODE_ENV === "development") console.warn(`[tamagui] "${property3}" is not a valid style on this component; the frontend value is dropped.`);
|
|
366
367
|
return;
|
|
367
368
|
}
|
|
368
369
|
if (property3 === "group") pass[passFrontendGroup] = entry2[1];
|
|
@@ -380,7 +381,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
380
381
|
var candidate = valInit.slice(start, index);
|
|
381
382
|
var preserveRaw = resolveClassName ? resolveClassName(candidate, conf, sink) : true;
|
|
382
383
|
if (preserveRaw === null) {
|
|
383
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`[tamagui] frontend candidate "${candidate}" is unavailable on this platform and was dropped.`);
|
|
384
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`[tamagui] frontend candidate "${candidate}" is unavailable on this platform and was dropped.`);
|
|
384
385
|
} else if (preserveRaw) {
|
|
385
386
|
pass[passClassName] = pass[passClassName] ? `${pass[passClassName]} ${candidate}` : candidate;
|
|
386
387
|
if (resolveClassName) {
|
|
@@ -511,7 +512,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
511
512
|
var defaultVal = (_defaultProps_keyOg = defaultProps[keyOg]) !== null && _defaultProps_keyOg !== void 0 ? _defaultProps_keyOg : defaultProps[keyInit];
|
|
512
513
|
if (defaultVal !== void 0 && valInit === defaultVal) return;
|
|
513
514
|
}
|
|
514
|
-
if (process.env.NODE_ENV === "development") {
|
|
515
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
515
516
|
if (!isValidStyleKey(keyInit, validStyles) && (keyInit === "animation" || !(keyInit in import_helpers.stylePropsAll)) && (!variants || !(keyInit in variants))) {
|
|
516
517
|
var replacement;
|
|
517
518
|
if (keyInit === "animation") replacement = "transition=";
|
|
@@ -543,7 +544,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
543
544
|
} else if (keyInit.startsWith("data-")) return;
|
|
544
545
|
}
|
|
545
546
|
if (pass[passVariantOutput] && !isValidStyleKeyInit && !keyInit.startsWith("aria-") && !(keyInit in import_helpers.stylePropsAll) && !(keyInit in import_skipProps.skipProps) && !(variants && keyInit in variants) && !(parentVariants && keyInit in parentVariants) && !(styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(keyInit)) && !(styledContext && keyInit in styledContext)) {
|
|
546
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.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.`);
|
|
547
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.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.`);
|
|
547
548
|
return;
|
|
548
549
|
}
|
|
549
550
|
var isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
|
|
@@ -552,7 +553,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
552
553
|
var shouldPassProp = !isStyleProp && isHOC || isHOC && keyInit === "disabled" || parentVariants && keyInit in parentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
|
|
553
554
|
var isHOCShouldPassThrough = isHOC && keyInit in import_skipProps.skipProps;
|
|
554
555
|
var shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
555
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
556
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
556
557
|
console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
|
|
557
558
|
(0, import_log.log)({
|
|
558
559
|
isVariant,
|
|
@@ -570,13 +571,13 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
570
571
|
if (shouldPassThrough) {
|
|
571
572
|
if (keyInit in viewProps) delete viewProps[keyInit];
|
|
572
573
|
viewProps[keyInit] = valInit;
|
|
573
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
574
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
574
575
|
if (!isVariant) return;
|
|
575
576
|
}
|
|
576
577
|
if (!isNativeInputColor && shouldCheckSkipProps && !(neverSkipProps === null || neverSkipProps === void 0 ? void 0 : neverSkipProps[keyInit])) {
|
|
577
578
|
var _getTransitionResolver;
|
|
578
579
|
if (keyInit in import_skipProps.skipProps && !(keyInit === "transition" && typeof valInit === "string" && !((_getTransitionResolver = (0, import_transitionResolver.getTransitionResolver)()) === null || _getTransitionResolver === void 0 ? void 0 : _getTransitionResolver.resolve(valInit, { animations: driverAnimations }).fused))) {
|
|
579
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
580
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") console.groupEnd();
|
|
580
581
|
return;
|
|
581
582
|
}
|
|
582
583
|
}
|
|
@@ -619,15 +620,15 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
619
620
|
var transport = previous && typeof previous === "object" && !Array.isArray(previous) && "default" in previous ? previous : { default: previous };
|
|
620
621
|
transport[condition[conditionKey]] = valInit;
|
|
621
622
|
viewProps[keyInit] = transport;
|
|
622
|
-
} 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.`);
|
|
623
|
+
} 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.`);
|
|
623
624
|
return;
|
|
624
625
|
}
|
|
625
626
|
if (keyInit in import_helpers.stylePropsAll || isRemovedVendorStyleProp(keyInit)) {
|
|
626
|
-
if (process.env.NODE_ENV === "development" && false);
|
|
627
|
+
if (!isProd && process.env.NODE_ENV === "development" && false);
|
|
627
628
|
return;
|
|
628
629
|
}
|
|
629
630
|
viewProps[keyInit] = valInit;
|
|
630
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
631
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
631
632
|
try {
|
|
632
633
|
(0, import_log.log)(` \u2714\uFE0F expand complete`, keyInit);
|
|
633
634
|
(0, import_log.log)("style", { ...styleState.style });
|
|
@@ -662,7 +663,7 @@ var getSplitStyles = function getSplitStyles2(props, staticConfig, theme, themeN
|
|
|
662
663
|
var className = staticPassthroughClassName;
|
|
663
664
|
if (staticPassthroughClassName) shouldDoClasses = false;
|
|
664
665
|
var validStyles = staticConfig.validStyles || (staticConfig.isInput ? import_helpers.stylePropsInput : staticConfig.isText ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
665
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
|
|
666
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-setup`;
|
|
666
667
|
var styleState = {
|
|
667
668
|
classNames,
|
|
668
669
|
conf,
|
|
@@ -689,8 +690,8 @@ var getSplitStyles = function getSplitStyles2(props, staticConfig, theme, themeN
|
|
|
689
690
|
styleState.flatStyleChanged = false;
|
|
690
691
|
styleState.flatStyleKeyCount = 0;
|
|
691
692
|
}
|
|
692
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
693
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && import_constants.isClient) {
|
|
693
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`style-state`;
|
|
694
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose" && import_constants.isClient) {
|
|
694
695
|
if (import_isDevTools.isDevTools) {
|
|
695
696
|
console.groupCollapsed("🔹 getSplitStyles 👇");
|
|
696
697
|
(0, import_log.log)({
|
|
@@ -736,7 +737,7 @@ var getSplitStyles = function getSplitStyles2(props, staticConfig, theme, themeN
|
|
|
736
737
|
styledContextKeys,
|
|
737
738
|
(noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0),
|
|
738
739
|
debug,
|
|
739
|
-
process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
|
|
740
|
+
!isProd && process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
|
|
740
741
|
defaultProps,
|
|
741
742
|
driverAnimations,
|
|
742
743
|
driverOutputStyle,
|
|
@@ -800,7 +801,7 @@ var getSplitStyles = function getSplitStyles2(props, staticConfig, theme, themeN
|
|
|
800
801
|
frontendGroup = pass[passFrontendGroup];
|
|
801
802
|
frontendContainer = pass[passFrontendContainer];
|
|
802
803
|
frontendContainerType = pass[passFrontendContainerType];
|
|
803
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
|
|
804
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-propsend`;
|
|
804
805
|
conditionalStates = styleState.flatStateKeys || null;
|
|
805
806
|
usesSafeArea = !!styleState.flatUsesSafeArea;
|
|
806
807
|
hasMedia = ((_styleState_flatMediaKeys = styleState.flatMediaKeys) === null || _styleState_flatMediaKeys === void 0 ? void 0 : _styleState_flatMediaKeys.size) ? styleState.flatMediaKeys : false;
|
|
@@ -910,10 +911,10 @@ var getSplitStyles = function getSplitStyles2(props, staticConfig, theme, themeN
|
|
|
910
911
|
delete style1.fontStyle;
|
|
911
912
|
}
|
|
912
913
|
}
|
|
913
|
-
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") (0, import_log.log)(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
|
|
914
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug && debug !== "profile") (0, import_log.log)(`Found fontFamily native: ${style1.fontFamily}`, faceInfo);
|
|
914
915
|
}
|
|
915
916
|
if (styleState.style) styleState.style = (0, import_nativeStyleEngine.normalizeNativeStyle)(styleState.style);
|
|
916
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
917
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-pre-result`;
|
|
917
918
|
if (shouldTrackStyleTokenProvenance && styleState.style && styleState.tokenProvenance) {
|
|
918
919
|
var provenance = {};
|
|
919
920
|
var hasProvenance = false;
|
|
@@ -1007,7 +1008,7 @@ var getSplitStyles = function getSplitStyles2(props, staticConfig, theme, themeN
|
|
|
1007
1008
|
if (style2) viewProps.style = style2;
|
|
1008
1009
|
}
|
|
1009
1010
|
}
|
|
1010
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
1011
|
+
if (!isProd && process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
1011
1012
|
if (import_constants.isClient && import_isDevTools.isDevTools) {
|
|
1012
1013
|
console.groupEnd();
|
|
1013
1014
|
console.groupCollapsed("🔹 getSplitStyles ===>");
|
|
@@ -1026,7 +1027,7 @@ var getSplitStyles = function getSplitStyles2(props, staticConfig, theme, themeN
|
|
|
1026
1027
|
console.groupEnd();
|
|
1027
1028
|
}
|
|
1028
1029
|
}
|
|
1029
|
-
if (process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
|
|
1030
|
+
if (!isProd && process.env.NODE_ENV === "development" && (debug === "profile" || globalThis.time)) time`split-styles-done`;
|
|
1030
1031
|
return result;
|
|
1031
1032
|
};
|
|
1032
1033
|
var stylePieceStaticConfig = {
|
|
@@ -1347,7 +1348,7 @@ function emitAtParentCondition(state, property, value, originalValue, contextOnl
|
|
|
1347
1348
|
function emitUnderCondition(state, property, value, cursor, originalValue, contextOnly, warnMode, warnSource) {
|
|
1348
1349
|
var condition = cursor[conditionValue];
|
|
1349
1350
|
if (!(condition & conditionResolvedFlag)) {
|
|
1350
|
-
if (warnMode && process.env.NODE_ENV !== "production") (0, import_warnOnce.warnRefusedValue)(property, warnSource, `unknown modifier "${cursor.problem}"`);
|
|
1351
|
+
if (warnMode && !isProd && process.env.NODE_ENV !== "production") (0, import_warnOnce.warnRefusedValue)(property, warnSource, `unknown modifier "${cursor.problem}"`);
|
|
1351
1352
|
return 0;
|
|
1352
1353
|
}
|
|
1353
1354
|
emitValue(state, property, value, cursor, warnMode === 2 ? originalValue : originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
|
|
@@ -1361,7 +1362,7 @@ var formatScanFailure = function formatScanFailure2(failure, source, failureInde
|
|
|
1361
1362
|
return 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 ${import_runtime.grammarMaxNonPlatformDepth} non-platform conditions` : "an unterminated \"(\"";
|
|
1362
1363
|
};
|
|
1363
1364
|
var warnScanFailure = function warnScanFailure2(property, source, failure, failureIndex) {
|
|
1364
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, formatScanFailure(failure, source, failureIndex));
|
|
1365
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, source, formatScanFailure(failure, source, failureIndex));
|
|
1365
1366
|
};
|
|
1366
1367
|
var borderTargets = {
|
|
1367
1368
|
border: [
|
|
@@ -1484,7 +1485,7 @@ function configuredValue(state, property, raw) {
|
|
|
1484
1485
|
}
|
|
1485
1486
|
}
|
|
1486
1487
|
}
|
|
1487
|
-
if (process.env.NODE_ENV === "development") {
|
|
1488
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
1488
1489
|
var _state_conf_tokensParsed_color1;
|
|
1489
1490
|
var category1 = grammar.tokenCategory(property) || grammar.tokenCategory(state.conf.shorthands[property] || property);
|
|
1490
1491
|
if (category1 && category1 !== "color" && category1 !== "boxShadow" && category1 !== "textShadow" && ((_state_conf_tokensParsed_color1 = state.conf.tokensParsed.color) === null || _state_conf_tokensParsed_color1 === void 0 ? void 0 : _state_conf_tokensParsed_color1[name])) (0, import_warnOnce.warnOnce)(`"${name}" contributes to "color", not "${property}"`);
|
|
@@ -1658,7 +1659,7 @@ function emitProperty(state, property, value, cursor, originalValue, contextOnly
|
|
|
1658
1659
|
}
|
|
1659
1660
|
if (import_getCSSStylesAtomic.canGenerateCSS && state.flatShouldDoClasses && !condition && property === "transform") {
|
|
1660
1661
|
var _state4;
|
|
1661
|
-
if (process.env.NODE_ENV === "development" && state.transformAccumulator) {
|
|
1662
|
+
if (!isProd && process.env.NODE_ENV === "development" && state.transformAccumulator) {
|
|
1662
1663
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
1663
1664
|
try {
|
|
1664
1665
|
for (var _iterator = (0, import_runtime.getTransformPartKeys)(state.transformAccumulator)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
@@ -1700,7 +1701,7 @@ function resolveNumericValue(value) {
|
|
|
1700
1701
|
}
|
|
1701
1702
|
function emitBorder(state, property, raw, cursor, originalValue, contextOnly) {
|
|
1702
1703
|
if (property === "borderBlock" || property === "borderInline") {
|
|
1703
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`RN has no logical border shorthand "${property}"; dropping it`);
|
|
1704
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`RN has no logical border shorthand "${property}"; dropping it`);
|
|
1704
1705
|
return;
|
|
1705
1706
|
}
|
|
1706
1707
|
var { width, style, color } = (0, import_borderComponents.classifyBorderComponents)(raw, property === "outline");
|
|
@@ -1807,14 +1808,14 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1807
1808
|
emitResolved(state, "backgroundColor", parts[0], cursor, originalValue, contextOnly);
|
|
1808
1809
|
return;
|
|
1809
1810
|
}
|
|
1810
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native background cannot represent "${raw}"; dropping it`);
|
|
1811
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native background cannot represent "${raw}"; dropping it`);
|
|
1811
1812
|
return;
|
|
1812
1813
|
}
|
|
1813
1814
|
if (property === "x" || property === "y" || property === "scale" || property === "scaleX" || property === "scaleY" || property === "rotate") {
|
|
1814
1815
|
var value2 = typeof raw === "string" ? configuredValue(state, property, raw) : raw;
|
|
1815
1816
|
if (typeof value2 === "string" && !value2.startsWith(import_themeRef.THEME_REF_PREFIX)) {
|
|
1816
1817
|
if (property === "rotate" && !isFinite(numericUnitValue(value2, "deg", "rad")) && true) {
|
|
1817
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native transform "${property}" cannot represent "${value2}"; dropping it`);
|
|
1818
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`native transform "${property}" cannot represent "${value2}"; dropping it`);
|
|
1818
1819
|
if (condition & 1) {
|
|
1819
1820
|
(0, import_runtime.removeTransformValue)(state.transformAccumulator, property);
|
|
1820
1821
|
writeStyleRecord(state, property, void 0, cursor, void 0, recordRetract);
|
|
@@ -1938,7 +1939,7 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1938
1939
|
if (typeof value === "string") {
|
|
1939
1940
|
var parsed = (0, import_grammarConfig.getConfigRevisionState)(state.conf).parseFlatValue(value);
|
|
1940
1941
|
var [segments, failure, failureIndex] = parsed;
|
|
1941
|
-
if (process.env.NODE_ENV === "development") {
|
|
1942
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
1942
1943
|
if ((0, import_config.getSetting)("styleValueSyntax") === "object") {
|
|
1943
1944
|
if (segments.length > 5 || segments.length >= 5 && segments[2] !== -1 || value.includes(":")) (0, import_warnOnce.warnOnce)(`syntax:string:${property}=${value}`, `string syntax is disabled by config (styleValueSyntax: 'object'); received "${property}=${value}"`);
|
|
1944
1945
|
}
|
|
@@ -1962,7 +1963,7 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1962
1963
|
var payload = (_ = (_slices = slices)[_index = index]) !== null && _ !== void 0 ? _ : _slices[_index] = value.slice(start, end);
|
|
1963
1964
|
emitConditionalValue(state, property, payload, parentCondition, payload, sink, warnMode, contextOnly);
|
|
1964
1965
|
hasBase = true;
|
|
1965
|
-
} else if (process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
|
|
1966
|
+
} else if (!isProd && process.env.NODE_ENV !== "production" && warnMode && !chainCount && (failure === "invalid-character" || failure === "stray-comment-close")) {
|
|
1966
1967
|
emitConditionalValue(state, property, value, parentCondition, value, sink, warnMode, contextOnly);
|
|
1967
1968
|
hasBase = true;
|
|
1968
1969
|
} else if (warnMode) warnScanFailure(property, value, failure, failureIndex);
|
|
@@ -1980,7 +1981,7 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1980
1981
|
}
|
|
1981
1982
|
lastPayloadStart = start1;
|
|
1982
1983
|
if (start1 === end1) {
|
|
1983
|
-
if (warnMode && process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, value, "a conditional clause has no value");
|
|
1984
|
+
if (warnMode && !isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnRefusedValue)(property, value, "a conditional clause has no value");
|
|
1984
1985
|
continue;
|
|
1985
1986
|
}
|
|
1986
1987
|
var cursor = conditionFromKey(state, (_1 = (_slices1 = slices)[_ref = index1 + 2]) !== null && _1 !== void 0 ? _1 : _slices1[_ref] = value.slice(segments[index1 + 2], segments[index1 + 3]), parentCondition);
|
|
@@ -1990,10 +1991,10 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
1990
1991
|
emitConditionalValue(state, property, (_2 = (_slices2 = slices)[_index1 = index1]) !== null && _2 !== void 0 ? _2 : _slices2[_index1] = value.slice(start1, end1), cursor, value, sink, warnMode, contextOnly);
|
|
1991
1992
|
}
|
|
1992
1993
|
}
|
|
1993
|
-
if (process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
|
|
1994
|
+
if (!isProd && process.env.NODE_ENV !== "production") lastPayload = value.slice(lastPayloadStart);
|
|
1994
1995
|
} else {
|
|
1995
1996
|
if (!value || typeof value !== "object" || Array.isArray(value) || (0, import_createVariable.isVariable)(value) || !classifyConditionalObject(value, state)) return false;
|
|
1996
|
-
if (process.env.NODE_ENV === "development") {
|
|
1997
|
+
if (!isProd && process.env.NODE_ENV === "development") {
|
|
1997
1998
|
if ((0, import_config.getSetting)("styleValueSyntax") === "string") (0, import_warnOnce.warnOnce)(`syntax:object:${property}=${JSON.stringify(value)}`, `object-form conditional syntax is disabled by config (styleValueSyntax: 'string'); received "${property}"`);
|
|
1998
1999
|
}
|
|
1999
2000
|
if (value.default != null) {
|
|
@@ -2007,7 +2008,7 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
2007
2008
|
if (cursor1[conditionValue] & conditionResolvedFlag || warnMode) emitConditionalValue(state, property, value[key], cursor1, value[key], sink, warnMode, contextOnly);
|
|
2008
2009
|
}
|
|
2009
2010
|
}
|
|
2010
|
-
if (warnMode && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
2011
|
+
if (warnMode && !isProd && process.env.NODE_ENV === "development" && typeof value === "string" && !hasBase && conditions && (0, import_grammarConfig.getConfigRevisionState)(state.conf).tokenCategory(property) && (0, import_grammarConfig.getConfigRevisionState)(state.conf).propertyKind(property) !== 8 && property !== "boxShadow" && property !== "textShadow" && property !== "fontFamily" && property !== "gap" && (0, import_borderComponents.splitComponents)(lastPayload).length > 1) (0, import_warnOnce.warnOnce)(`${property}="${value}" has multiple values after its first conditional. Write the base value before the first conditional.`);
|
|
2011
2012
|
if (warnMode === 1 && conditions & 12 && !hasBase) {
|
|
2012
2013
|
var resting = property === "opacity" || property.startsWith("scale") ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
|
|
2013
2014
|
var layers = state.flatPropertyLayers;
|
|
@@ -2037,7 +2038,7 @@ function contributeValue(state, property, value, originalValue) {
|
|
|
2037
2038
|
}
|
|
2038
2039
|
var compositeKind = 0;
|
|
2039
2040
|
if (compositeKind > 0 && compositeKind < 6 && (typeof value === "string" && value.indexOf(":") !== -1 || value && typeof value === "object" && !Array.isArray(value) && !(0, import_createVariable.isVariable)(value) && classifyConditionalObject(value, state))) {
|
|
2040
|
-
if (process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`conditional "${property}" needs its composite property; dropping it`);
|
|
2041
|
+
if (!isProd && process.env.NODE_ENV === "development") (0, import_warnOnce.warnOnce)(`conditional "${property}" needs its composite property; dropping it`);
|
|
2041
2042
|
return true;
|
|
2042
2043
|
}
|
|
2043
2044
|
if (value === "safe") {
|