@tamagui/core 3.0.0-beta.661.1 → 3.0.0-beta.669.1
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/native.cjs +40 -80
- package/dist/test.native.cjs +37 -33
- package/package.json +13 -13
package/dist/native.cjs
CHANGED
|
@@ -10314,7 +10314,7 @@ function getThemeClassNames(name) {
|
|
|
10314
10314
|
}
|
|
10315
10315
|
//#endregion
|
|
10316
10316
|
//#region ../helpers/dist/esm/composeEventHandlers.native.js
|
|
10317
|
-
function _type_of$
|
|
10317
|
+
function _type_of$16(obj) {
|
|
10318
10318
|
"@swc/helpers - typeof";
|
|
10319
10319
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
10320
10320
|
}
|
|
@@ -10323,7 +10323,7 @@ function composeEventHandlers(og, next) {
|
|
|
10323
10323
|
if (!og || !next) return next || og || void 0;
|
|
10324
10324
|
return function(event) {
|
|
10325
10325
|
og === null || og === void 0 || og(event);
|
|
10326
|
-
var isPrevented = !!event && (typeof event === "undefined" ? "undefined" : _type_of$
|
|
10326
|
+
var isPrevented = !!event && (typeof event === "undefined" ? "undefined" : _type_of$16(event)) === "object" && ("defaultPrevented" in event && Boolean(event.defaultPrevented) || "isCanceled" in event && Boolean(event.isCanceled));
|
|
10327
10327
|
if (!event || !checkDefaultPrevented || !isPrevented) return next === null || next === void 0 ? void 0 : next(event);
|
|
10328
10328
|
};
|
|
10329
10329
|
}
|
|
@@ -10747,52 +10747,8 @@ var FONT_DATA_ATTRIBUTE_NAME = "data-tamagui-font";
|
|
|
10747
10747
|
var MISSING_THEME_MESSAGE = `Missing theme.`;
|
|
10748
10748
|
//#endregion
|
|
10749
10749
|
//#region ../web/dist/esm/helpers/formatDiagnostic.native.js
|
|
10750
|
-
function _type_of$16(obj) {
|
|
10751
|
-
"@swc/helpers - typeof";
|
|
10752
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
10753
|
-
}
|
|
10754
|
-
var maxDiagnosticValueLength = 160;
|
|
10755
|
-
function formatDiagnosticValue(value) {
|
|
10756
|
-
var depth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, seen = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : /* @__PURE__ */ new WeakSet();
|
|
10757
|
-
if (typeof value === "string") {
|
|
10758
|
-
var output = value.length > maxDiagnosticValueLength ? `${value.slice(0, maxDiagnosticValueLength - 1)}\u2026` : value;
|
|
10759
|
-
return JSON.stringify(output);
|
|
10760
|
-
}
|
|
10761
|
-
if (value == null || typeof value === "number" || typeof value === "boolean") return String(value);
|
|
10762
|
-
if ((typeof value === "undefined" ? "undefined" : _type_of$16(value)) === "bigint") return `${value}n`;
|
|
10763
|
-
if (typeof value === "function") return `[Function ${value.name || "anonymous"}]`;
|
|
10764
|
-
if ((typeof value === "undefined" ? "undefined" : _type_of$16(value)) !== "object") return String(value);
|
|
10765
|
-
if (seen.has(value)) return "[Circular]";
|
|
10766
|
-
if (depth === 2) return Array.isArray(value) ? "[Array]" : "[Object]";
|
|
10767
|
-
seen.add(value);
|
|
10768
|
-
if (Array.isArray(value)) {
|
|
10769
|
-
var items = value.slice(0, 5).map(function(item) {
|
|
10770
|
-
return formatDiagnosticValue(item, depth + 1, seen);
|
|
10771
|
-
});
|
|
10772
|
-
if (value.length > 5) items.push(`\u2026 ${value.length - 5} more`);
|
|
10773
|
-
return `[${items.join(", ")}]`;
|
|
10774
|
-
}
|
|
10775
|
-
var keys = [];
|
|
10776
|
-
for (var key in value) if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
10777
|
-
keys.push(key);
|
|
10778
|
-
if (keys.length === 6) break;
|
|
10779
|
-
}
|
|
10780
|
-
var hasMore = keys.length === 6;
|
|
10781
|
-
if (hasMore) keys.pop();
|
|
10782
|
-
var items1 = keys.map(function(key2) {
|
|
10783
|
-
try {
|
|
10784
|
-
return `${key2}: ${formatDiagnosticValue(value[key2], depth + 1, seen)}`;
|
|
10785
|
-
} catch (e) {
|
|
10786
|
-
return `${key2}: [Unavailable]`;
|
|
10787
|
-
}
|
|
10788
|
-
});
|
|
10789
|
-
if (hasMore) items1.push("… more");
|
|
10790
|
-
return `{ ${items1.join(", ")} }`;
|
|
10791
|
-
}
|
|
10792
10750
|
function formatDiagnostic(code, component, message, action, prop, received) {
|
|
10793
|
-
|
|
10794
|
-
var boundedValue = formattedValue.length > maxDiagnosticValueLength ? `${formattedValue.slice(0, maxDiagnosticValueLength - 1)}\u2026` : formattedValue;
|
|
10795
|
-
return `${code} ${component}: ${message}.${prop ? ` Received ${prop}=${boundedValue}.` : ""} ${action}`;
|
|
10751
|
+
return `${code}: ${message}`;
|
|
10796
10752
|
}
|
|
10797
10753
|
//#endregion
|
|
10798
10754
|
//#region ../web/dist/esm/config.native.js
|
|
@@ -11954,6 +11910,12 @@ function _instanceof(left, right) {
|
|
|
11954
11910
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) return !!right[Symbol.hasInstance](left);
|
|
11955
11911
|
else return left instanceof right;
|
|
11956
11912
|
}
|
|
11913
|
+
var categoryShift = 20;
|
|
11914
|
+
var depthShift = 23;
|
|
11915
|
+
var platformShift = 26;
|
|
11916
|
+
function packClausePrecedence(platformRank, depth, categoryRank, withinCategoryRank2) {
|
|
11917
|
+
return platformRank << platformShift | depth << depthShift | categoryRank << categoryShift | withinCategoryRank2;
|
|
11918
|
+
}
|
|
11957
11919
|
var categoryRanks = {
|
|
11958
11920
|
media: 0,
|
|
11959
11921
|
container: 1,
|
|
@@ -12066,22 +12028,12 @@ function getClausePrecedenceKeyFromKinds(modifiers, kinds, order) {
|
|
|
12066
12028
|
}
|
|
12067
12029
|
var depth = nonPlatform.size;
|
|
12068
12030
|
if (depth > 5) throw new Error(`a flat value clause supports at most 5 non-platform conditions; received ${depth} in "${modifiers.join(":")}:"`);
|
|
12069
|
-
return
|
|
12070
|
-
platformRank,
|
|
12071
|
-
depth,
|
|
12072
|
-
categoryRank,
|
|
12073
|
-
highestWithinCategoryRank
|
|
12074
|
-
];
|
|
12075
|
-
}
|
|
12076
|
-
function compareClausePrecedence(left, right) {
|
|
12077
|
-
for (var index = 0; index < 4; index++) {
|
|
12078
|
-
var difference = left[index] - right[index];
|
|
12079
|
-
if (difference) return difference;
|
|
12080
|
-
}
|
|
12081
|
-
return 0;
|
|
12031
|
+
return packClausePrecedence(platformRank, depth, categoryRank, highestWithinCategoryRank);
|
|
12082
12032
|
}
|
|
12083
12033
|
function clauseTargetClassSpecificity(key) {
|
|
12084
|
-
|
|
12034
|
+
var depth = key >>> depthShift & 7;
|
|
12035
|
+
var platformRank = key >>> platformShift;
|
|
12036
|
+
return 1 + depth + platformRank * 6;
|
|
12085
12037
|
}
|
|
12086
12038
|
function clauseSubjectClassRepetitions(key, selfStateSpecificity) {
|
|
12087
12039
|
return clauseTargetClassSpecificity(key) - selfStateSpecificity;
|
|
@@ -13494,6 +13446,8 @@ function transformsToString(transforms) {
|
|
|
13494
13446
|
}
|
|
13495
13447
|
return out;
|
|
13496
13448
|
}
|
|
13449
|
+
//#endregion
|
|
13450
|
+
//#region ../web/dist/esm/helpers/directStyle.native.js
|
|
13497
13451
|
var stateSelectors = {
|
|
13498
13452
|
hover: ":hover",
|
|
13499
13453
|
press: ":active",
|
|
@@ -13830,7 +13784,7 @@ function configuredValue(state, property, raw) {
|
|
|
13830
13784
|
opacity = amount;
|
|
13831
13785
|
}
|
|
13832
13786
|
}
|
|
13833
|
-
var safeArea = resolveSafeAreaVariable(name);
|
|
13787
|
+
var safeArea = process.env.TAMAGUI_RUNTIME_SAFE_AREA === "disabled" ? void 0 : resolveSafeAreaVariable(name);
|
|
13834
13788
|
if (safeArea !== void 0) {
|
|
13835
13789
|
state.flatUsesSafeArea = true;
|
|
13836
13790
|
return safeArea;
|
|
@@ -13950,7 +13904,7 @@ function emitProperty(state, property, value, condition, merge, originalValue, c
|
|
|
13950
13904
|
var _direct1, _state3;
|
|
13951
13905
|
if (!condition.active) return;
|
|
13952
13906
|
var previous = (_direct_flatPrecedence = direct.flatPrecedence) === null || _direct_flatPrecedence === void 0 ? void 0 : _direct_flatPrecedence[property];
|
|
13953
|
-
if (previous &&
|
|
13907
|
+
if (previous !== void 0 && condition.precedence < previous) return;
|
|
13954
13908
|
((_direct1 = direct).flatPrecedence || (_direct1.flatPrecedence = {}))[property] = condition.precedence;
|
|
13955
13909
|
((_state3 = state).flatActiveConditions || (_state3.flatActiveConditions = {}))[property] = true;
|
|
13956
13910
|
} else if ((_state_flatActiveConditions = state.flatActiveConditions) === null || _state_flatActiveConditions === void 0 ? void 0 : _state_flatActiveConditions[property]) return;
|
|
@@ -14200,6 +14154,10 @@ function emitSegment(state, property, source, start, end, condition, merge, orig
|
|
|
14200
14154
|
}
|
|
14201
14155
|
function contributeStyleString(state, property, source, merge, originalValue) {
|
|
14202
14156
|
var contextOnly = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
|
|
14157
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled") {
|
|
14158
|
+
emitValue(state, property, source, null, merge, originalValue !== null && originalValue !== void 0 ? originalValue : source, contextOnly);
|
|
14159
|
+
return true;
|
|
14160
|
+
}
|
|
14203
14161
|
if (source.indexOf(":") === -1) {
|
|
14204
14162
|
emitValue(state, property, source, null, merge, originalValue !== null && originalValue !== void 0 ? originalValue : source, contextOnly);
|
|
14205
14163
|
return true;
|
|
@@ -14258,6 +14216,7 @@ function contributeStyleString(state, property, source, merge, originalValue) {
|
|
|
14258
14216
|
}
|
|
14259
14217
|
function contributeFrontendValue(state, property, value, merge) {
|
|
14260
14218
|
var contextOnly = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
|
14219
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled") return false;
|
|
14261
14220
|
if (value.base !== null) emitValue(state, property, value.base, null, merge, value.base, contextOnly);
|
|
14262
14221
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
14263
14222
|
try {
|
|
@@ -14280,13 +14239,14 @@ function contributeFrontendValue(state, property, value, merge) {
|
|
|
14280
14239
|
}
|
|
14281
14240
|
function contributeVariantClauseValue(state, property, value, conditionSource, merge, originalValue) {
|
|
14282
14241
|
var contextOnly = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : false;
|
|
14242
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled") return;
|
|
14283
14243
|
var condition = getCondition(state, conditionSource);
|
|
14284
14244
|
if (!condition) return;
|
|
14285
14245
|
if (condition.emit && (condition.active || false)) emitValue(state, property, value, condition, merge, originalValue, contextOnly);
|
|
14286
14246
|
}
|
|
14287
14247
|
function contributeStyleValue(state, property, value, merge, originalValue) {
|
|
14288
14248
|
var contextOnly = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
|
|
14289
|
-
if (value === "safe" && isSafeAreaKey(property)) {
|
|
14249
|
+
if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && value === "safe" && isSafeAreaKey(property)) {
|
|
14290
14250
|
var expanded = expandSafeAreaValue(property);
|
|
14291
14251
|
if (expanded) {
|
|
14292
14252
|
state.flatUsesSafeArea = true;
|
|
@@ -15183,7 +15143,7 @@ var getSnapshotImpl = function(r) {
|
|
|
15183
15143
|
var needsUpdate = props.passThrough ? false : optimizeForFirstRender ? true : isRoot || props.name === "light" || props.name === "dark" || props.name === null ? true : !HasRenderedOnce.get(keys) ? true : canSkipForSchemeChange ? false : (keys === null || keys === void 0 ? void 0 : (_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) ? true : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props);
|
|
15184
15144
|
var [rerender, nextRaw] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
|
|
15185
15145
|
var next = nextRaw;
|
|
15186
|
-
if (props.inlineValues && (nextRaw === null || nextRaw === void 0 ? void 0 : nextRaw.theme)) {
|
|
15146
|
+
if (process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES !== "disabled" && props.inlineValues && (nextRaw === null || nextRaw === void 0 ? void 0 : nextRaw.theme)) {
|
|
15187
15147
|
var _states_get;
|
|
15188
15148
|
var merged = getMergedInlineTheme(((_states_get = states.get(parentId)) === null || _states_get === void 0 ? void 0 : _states_get.theme) || nextRaw.theme, props.inlineValues, nextRaw.name, getConfig());
|
|
15189
15149
|
if (merged !== nextRaw.theme) next = _objectSpread2(_objectSpread2({}, nextRaw), {}, { theme: merged });
|
|
@@ -15333,7 +15293,7 @@ function resolveThemeName(parentName, name, reset, themes2) {
|
|
|
15333
15293
|
}
|
|
15334
15294
|
var getPropsKey = function(param) {
|
|
15335
15295
|
var { name, reset, forceClassName, inlineValues } = param;
|
|
15336
|
-
return `${name || ""}${reset || ""}${forceClassName || ""}${inlineValues ? getInlineValuesKey(inlineValues) : ""}`;
|
|
15296
|
+
return `${name || ""}${reset || ""}${forceClassName || ""}${process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES !== "disabled" && inlineValues ? getInlineValuesKey(inlineValues) : ""}`;
|
|
15337
15297
|
};
|
|
15338
15298
|
var hasThemeUpdatingProps = function(props) {
|
|
15339
15299
|
return "name" in props || "reset" in props || "forceClassName" in props || "inlineValues" in props;
|
|
@@ -15560,7 +15520,7 @@ function getThemeProxied(_props, _state, _keys, _schemeKeys) {
|
|
|
15560
15520
|
var fastSchemeChange = getSetting("fastSchemeChange");
|
|
15561
15521
|
var rootMatchesSystem = doesRootSchemeMatchSystem();
|
|
15562
15522
|
var shouldOptimize = scheme && platform !== "web" && supportsDynamicColorIOS && !curProps.deopt && !curState.inverses && fastSchemeChange && rootMatchesSystem;
|
|
15563
|
-
var inlineLayer = (_curState_theme = curState.theme) === null || _curState_theme === void 0 ? void 0 : _curState_theme[inlineLayerKey];
|
|
15523
|
+
var inlineLayer = process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES === "disabled" ? void 0 : (_curState_theme = curState.theme) === null || _curState_theme === void 0 ? void 0 : _curState_theme[inlineLayerKey];
|
|
15564
15524
|
var inlineOverridden = !!(inlineLayer === null || inlineLayer === void 0 ? void 0 : inlineLayer.overridden.has(key));
|
|
15565
15525
|
if (shouldOptimize && inlineOverridden) {
|
|
15566
15526
|
var pair = inlineLayer.pairs[key];
|
|
@@ -16314,7 +16274,7 @@ var propMapper = function(key, value, styleState, disabled, map) {
|
|
|
16314
16274
|
if (key in conf.shorthands) key = conf.shorthands[key];
|
|
16315
16275
|
}
|
|
16316
16276
|
var originalValue = value;
|
|
16317
|
-
if (value === "safe" && isSafeAreaKey(key)) {
|
|
16277
|
+
if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && value === "safe" && isSafeAreaKey(key)) {
|
|
16318
16278
|
var expanded1 = expandSafeAreaValue(key);
|
|
16319
16279
|
if (expanded1) {
|
|
16320
16280
|
for (var i = 0; i < expanded1.length; i++) {
|
|
@@ -16346,7 +16306,7 @@ var propMapper = function(key, value, styleState, disabled, map) {
|
|
|
16346
16306
|
var resolveVariants = function(key, value, styleProps, styleState, parentVariantKey) {
|
|
16347
16307
|
var _styleState_staticConfig_variants;
|
|
16348
16308
|
var variantDefinition = (_styleState_staticConfig_variants = styleState.staticConfig.variants) === null || _styleState_staticConfig_variants === void 0 ? void 0 : _styleState_staticConfig_variants[key];
|
|
16349
|
-
if (typeof value === "string" && value.indexOf(":") !== -1 && !(variantDefinition && (typeof variantDefinition === "undefined" ? "undefined" : _type_of$7(variantDefinition)) === "object" && value in variantDefinition)) {
|
|
16309
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && typeof value === "string" && value.indexOf(":") !== -1 && !(variantDefinition && (typeof variantDefinition === "undefined" ? "undefined" : _type_of$7(variantDefinition)) === "object" && value in variantDefinition)) {
|
|
16350
16310
|
var starts = [];
|
|
16351
16311
|
var ends = [];
|
|
16352
16312
|
var modifiers = [];
|
|
@@ -16956,7 +16916,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
16956
16916
|
else if (animationConfig) return;
|
|
16957
16917
|
} else return;
|
|
16958
16918
|
}
|
|
16959
|
-
if (isFrontendProgram(valInit)) {
|
|
16919
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && isFrontendProgram(valInit)) {
|
|
16960
16920
|
if (isValidStyleKey(valInit.property, validStyles$1, accept)) contributeFrontendProgram(styleState, valInit, mergeStyle);
|
|
16961
16921
|
return;
|
|
16962
16922
|
}
|
|
@@ -17021,7 +16981,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
17021
16981
|
}
|
|
17022
16982
|
var isHostStyleKey = !isHOC && isValidStyleKey(key8, validStyles$1, accept) || isAndroid && key8 === "elevation";
|
|
17023
16983
|
var isContextProgramKey = !isHOC && Boolean(isStyledContextProp);
|
|
17024
|
-
if (conditionSource !== void 0) {
|
|
16984
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && conditionSource !== void 0) {
|
|
17025
16985
|
if (isHostStyleKey || isContextProgramKey) contributeVariantClauseValue(styleState, key8, val2, conditionSource, mergeStyle, originalVal, !isHostStyleKey);
|
|
17026
16986
|
else if (isHOC) {
|
|
17027
16987
|
var appended = appendFlatClause(viewProps[key8], conditionSource, val2);
|
|
@@ -17710,7 +17670,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
17710
17670
|
var outputStyle = (_animationDriver_outputStyle = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.outputStyle) !== null && _animationDriver_outputStyle !== void 0 ? _animationDriver_outputStyle : "css";
|
|
17711
17671
|
var curStateRef = stateRef.current;
|
|
17712
17672
|
if (!needsHydration && hasAnimationProp) curStateRef.hasAnimated = true;
|
|
17713
|
-
var platformPseudo = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) && hasFlatModifier(props, config, platformPseudoModifiers));
|
|
17673
|
+
var platformPseudo = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) && process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && hasFlatModifier(props, config, platformPseudoModifiers));
|
|
17714
17674
|
var willBeAnimatedClient = (function() {
|
|
17715
17675
|
return Boolean(!!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations) || curStateRef.hasAnimated);
|
|
17716
17676
|
})();
|
|
@@ -17721,7 +17681,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
17721
17681
|
var presenceState = presence === null || presence === void 0 ? void 0 : presence[2];
|
|
17722
17682
|
var isExiting = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === false;
|
|
17723
17683
|
var isEntering = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === true && presenceState.initial !== false;
|
|
17724
|
-
var hasEnterStyle = hasFlatModifier(props, config, enterModifier);
|
|
17684
|
+
var hasEnterStyle = process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && hasFlatModifier(props, config, enterModifier);
|
|
17725
17685
|
var hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isReactNative) || inputStyle !== "css");
|
|
17726
17686
|
var initialState = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || disableClassName) ? hasEnterStyle || isEntering ? defaultComponentStateShouldEnter : defaultComponentState : defaultComponentStateMounted;
|
|
17727
17687
|
var disabled = isDisabled(props);
|
|
@@ -17836,7 +17796,8 @@ var Theme = createRefComponent(function Theme2(props, ref) {
|
|
|
17836
17796
|
if (props.disable) return props.children;
|
|
17837
17797
|
var { passThrough } = props;
|
|
17838
17798
|
var isRoot = !!props["_isRoot"];
|
|
17839
|
-
var
|
|
17799
|
+
var config = getConfig();
|
|
17800
|
+
var inlineValues = process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES === "disabled" ? null : getInlineValuesFromProps(props, config);
|
|
17840
17801
|
var inlineCSS = null;
|
|
17841
17802
|
inlineCSS === null || inlineCSS === void 0 || inlineCSS.identifier;
|
|
17842
17803
|
var themeProps = inlineValues ? _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -18454,7 +18415,7 @@ function createComponent(staticConfig) {
|
|
|
18454
18415
|
}, []);
|
|
18455
18416
|
useIsomorphicLayoutEffect(function() {
|
|
18456
18417
|
var disposeSafeArea;
|
|
18457
|
-
if (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea) {
|
|
18418
|
+
if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea)) {
|
|
18458
18419
|
var updateSafeArea = function() {
|
|
18459
18420
|
setState(function(previous) {
|
|
18460
18421
|
return _objectSpread2({}, previous);
|
|
@@ -19390,7 +19351,7 @@ function getThemesDeduped(themes, colorTokens, variables, variablesCtx) {
|
|
|
19390
19351
|
}
|
|
19391
19352
|
var theme = _objectSpread2(_objectSpread2({}, colorTokens), rawTheme);
|
|
19392
19353
|
for (var key1 in theme) ensureThemeVariable(theme, key1);
|
|
19393
|
-
if (variables && variablesCtx && !themeName.includes("_")) mergeConfigVariablesIntoTheme(theme, themeName, variables, variablesCtx.tokensParsed);
|
|
19354
|
+
if (process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES !== "disabled" && variables && variablesCtx && !themeName.includes("_")) mergeConfigVariablesIntoTheme(theme, themeName, variables, variablesCtx.tokensParsed);
|
|
19394
19355
|
var deduped = {
|
|
19395
19356
|
names: [themeName],
|
|
19396
19357
|
theme
|
|
@@ -19497,7 +19458,7 @@ function mergeStyleBranch(parentBranch, ourBranch) {
|
|
|
19497
19458
|
if (key in ourBranch) continue;
|
|
19498
19459
|
out[key] = parentBranch[key];
|
|
19499
19460
|
}
|
|
19500
|
-
for (var key1 in ourBranch) out[key1] = key1 in parentBranch ? mergeFlatValues(parentBranch[key1], ourBranch[key1]) : ourBranch[key1];
|
|
19461
|
+
for (var key1 in ourBranch) out[key1] = key1 in parentBranch ? process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled" ? ourBranch[key1] : mergeFlatValues(parentBranch[key1], ourBranch[key1]) : ourBranch[key1];
|
|
19501
19462
|
return out;
|
|
19502
19463
|
}
|
|
19503
19464
|
var mergeVariants = function(parentVariants, ourVariants) {
|
|
@@ -19729,7 +19690,7 @@ function usePropsAndStyle(props, opts) {
|
|
|
19729
19690
|
var { mediaGroups, pseudoGroups } = splitStyles || {};
|
|
19730
19691
|
useIsomorphicLayoutEffect(function() {
|
|
19731
19692
|
var disposeSafeArea;
|
|
19732
|
-
if (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea) {
|
|
19693
|
+
if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea)) {
|
|
19733
19694
|
var updateSafeArea = function() {
|
|
19734
19695
|
setState(function(previous) {
|
|
19735
19696
|
return _objectSpread2({}, previous);
|
|
@@ -21391,8 +21352,7 @@ function useEvent(callback) {
|
|
|
21391
21352
|
var defaultValue = function() {
|
|
21392
21353
|
throw new Error("Cannot call an event handler while rendering.");
|
|
21393
21354
|
};
|
|
21394
|
-
|
|
21395
|
-
//#region ../web/dist/esm/internal-runtime.native.js
|
|
21355
|
+
process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR;
|
|
21396
21356
|
var createTamagui$1 = createTamagui$2;
|
|
21397
21357
|
var setupHooks$1 = setupHooks;
|
|
21398
21358
|
var TamaguiProvider$1 = TamaguiProvider$2;
|
package/dist/test.native.cjs
CHANGED
|
@@ -1869,6 +1869,12 @@ function _instanceof$1(left, right) {
|
|
|
1869
1869
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) return !!right[Symbol.hasInstance](left);
|
|
1870
1870
|
else return left instanceof right;
|
|
1871
1871
|
}
|
|
1872
|
+
var categoryShift = 20;
|
|
1873
|
+
var depthShift = 23;
|
|
1874
|
+
var platformShift = 26;
|
|
1875
|
+
function packClausePrecedence(platformRank, depth, categoryRank, withinCategoryRank2) {
|
|
1876
|
+
return platformRank << platformShift | depth << depthShift | categoryRank << categoryShift | withinCategoryRank2;
|
|
1877
|
+
}
|
|
1872
1878
|
var categoryRanks = {
|
|
1873
1879
|
media: 0,
|
|
1874
1880
|
container: 1,
|
|
@@ -1981,22 +1987,12 @@ function getClausePrecedenceKeyFromKinds(modifiers, kinds, order) {
|
|
|
1981
1987
|
}
|
|
1982
1988
|
var depth = nonPlatform.size;
|
|
1983
1989
|
if (depth > 5) throw new Error(`a flat value clause supports at most 5 non-platform conditions; received ${depth} in "${modifiers.join(":")}:"`);
|
|
1984
|
-
return
|
|
1985
|
-
platformRank,
|
|
1986
|
-
depth,
|
|
1987
|
-
categoryRank,
|
|
1988
|
-
highestWithinCategoryRank
|
|
1989
|
-
];
|
|
1990
|
-
}
|
|
1991
|
-
function compareClausePrecedence(left, right) {
|
|
1992
|
-
for (var index = 0; index < 4; index++) {
|
|
1993
|
-
var difference = left[index] - right[index];
|
|
1994
|
-
if (difference) return difference;
|
|
1995
|
-
}
|
|
1996
|
-
return 0;
|
|
1990
|
+
return packClausePrecedence(platformRank, depth, categoryRank, highestWithinCategoryRank);
|
|
1997
1991
|
}
|
|
1998
1992
|
function clauseTargetClassSpecificity(key) {
|
|
1999
|
-
|
|
1993
|
+
var depth = key >>> depthShift & 7;
|
|
1994
|
+
var platformRank = key >>> platformShift;
|
|
1995
|
+
return 1 + depth + platformRank * 6;
|
|
2000
1996
|
}
|
|
2001
1997
|
function clauseSubjectClassRepetitions(key, selfStateSpecificity) {
|
|
2002
1998
|
return clauseTargetClassSpecificity(key) - selfStateSpecificity;
|
|
@@ -3687,6 +3683,8 @@ function transformsToString(transforms) {
|
|
|
3687
3683
|
}
|
|
3688
3684
|
return out;
|
|
3689
3685
|
}
|
|
3686
|
+
//#endregion
|
|
3687
|
+
//#region ../web/dist/esm/helpers/directStyle.native.js
|
|
3690
3688
|
var stateSelectors = {
|
|
3691
3689
|
hover: ":hover",
|
|
3692
3690
|
press: ":active",
|
|
@@ -4023,7 +4021,7 @@ function configuredValue(state, property, raw) {
|
|
|
4023
4021
|
opacity = amount;
|
|
4024
4022
|
}
|
|
4025
4023
|
}
|
|
4026
|
-
var safeArea = resolveSafeAreaVariable(name);
|
|
4024
|
+
var safeArea = process.env.TAMAGUI_RUNTIME_SAFE_AREA === "disabled" ? void 0 : resolveSafeAreaVariable(name);
|
|
4027
4025
|
if (safeArea !== void 0) {
|
|
4028
4026
|
state.flatUsesSafeArea = true;
|
|
4029
4027
|
return safeArea;
|
|
@@ -4143,7 +4141,7 @@ function emitProperty(state, property, value, condition, merge, originalValue, c
|
|
|
4143
4141
|
var _direct1, _state3;
|
|
4144
4142
|
if (!condition.active) return;
|
|
4145
4143
|
var previous = (_direct_flatPrecedence = direct.flatPrecedence) === null || _direct_flatPrecedence === void 0 ? void 0 : _direct_flatPrecedence[property];
|
|
4146
|
-
if (previous &&
|
|
4144
|
+
if (previous !== void 0 && condition.precedence < previous) return;
|
|
4147
4145
|
((_direct1 = direct).flatPrecedence || (_direct1.flatPrecedence = {}))[property] = condition.precedence;
|
|
4148
4146
|
((_state3 = state).flatActiveConditions || (_state3.flatActiveConditions = {}))[property] = true;
|
|
4149
4147
|
} else if ((_state_flatActiveConditions = state.flatActiveConditions) === null || _state_flatActiveConditions === void 0 ? void 0 : _state_flatActiveConditions[property]) return;
|
|
@@ -4393,6 +4391,10 @@ function emitSegment(state, property, source, start, end, condition, merge, orig
|
|
|
4393
4391
|
}
|
|
4394
4392
|
function contributeStyleString(state, property, source, merge, originalValue) {
|
|
4395
4393
|
var contextOnly = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
|
|
4394
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled") {
|
|
4395
|
+
emitValue(state, property, source, null, merge, originalValue !== null && originalValue !== void 0 ? originalValue : source, contextOnly);
|
|
4396
|
+
return true;
|
|
4397
|
+
}
|
|
4396
4398
|
if (source.indexOf(":") === -1) {
|
|
4397
4399
|
emitValue(state, property, source, null, merge, originalValue !== null && originalValue !== void 0 ? originalValue : source, contextOnly);
|
|
4398
4400
|
return true;
|
|
@@ -4451,6 +4453,7 @@ function contributeStyleString(state, property, source, merge, originalValue) {
|
|
|
4451
4453
|
}
|
|
4452
4454
|
function contributeFrontendValue(state, property, value, merge) {
|
|
4453
4455
|
var contextOnly = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
|
4456
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled") return false;
|
|
4454
4457
|
if (value.base !== null) emitValue(state, property, value.base, null, merge, value.base, contextOnly);
|
|
4455
4458
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
4456
4459
|
try {
|
|
@@ -4473,13 +4476,14 @@ function contributeFrontendValue(state, property, value, merge) {
|
|
|
4473
4476
|
}
|
|
4474
4477
|
function contributeVariantClauseValue(state, property, value, conditionSource, merge, originalValue) {
|
|
4475
4478
|
var contextOnly = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : false;
|
|
4479
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled") return;
|
|
4476
4480
|
var condition = getCondition(state, conditionSource);
|
|
4477
4481
|
if (!condition) return;
|
|
4478
4482
|
if (condition.emit && (condition.active || false)) emitValue(state, property, value, condition, merge, originalValue, contextOnly);
|
|
4479
4483
|
}
|
|
4480
4484
|
function contributeStyleValue(state, property, value, merge, originalValue) {
|
|
4481
4485
|
var contextOnly = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
|
|
4482
|
-
if (value === "safe" && isSafeAreaKey(property)) {
|
|
4486
|
+
if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && value === "safe" && isSafeAreaKey(property)) {
|
|
4483
4487
|
var expanded = expandSafeAreaValue(property);
|
|
4484
4488
|
if (expanded) {
|
|
4485
4489
|
state.flatUsesSafeArea = true;
|
|
@@ -5376,7 +5380,7 @@ var getSnapshotImpl = function(r) {
|
|
|
5376
5380
|
var needsUpdate = props.passThrough ? false : optimizeForFirstRender ? true : isRoot || props.name === "light" || props.name === "dark" || props.name === null ? true : !HasRenderedOnce.get(keys) ? true : canSkipForSchemeChange ? false : (keys === null || keys === void 0 ? void 0 : (_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) ? true : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props);
|
|
5377
5381
|
var [rerender, nextRaw] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
|
|
5378
5382
|
var next = nextRaw;
|
|
5379
|
-
if (props.inlineValues && (nextRaw === null || nextRaw === void 0 ? void 0 : nextRaw.theme)) {
|
|
5383
|
+
if (process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES !== "disabled" && props.inlineValues && (nextRaw === null || nextRaw === void 0 ? void 0 : nextRaw.theme)) {
|
|
5380
5384
|
var _states_get;
|
|
5381
5385
|
var merged = getMergedInlineTheme(((_states_get = states.get(parentId)) === null || _states_get === void 0 ? void 0 : _states_get.theme) || nextRaw.theme, props.inlineValues, nextRaw.name, getConfig());
|
|
5382
5386
|
if (merged !== nextRaw.theme) next = _objectSpread2(_objectSpread2({}, nextRaw), {}, { theme: merged });
|
|
@@ -5526,7 +5530,7 @@ function resolveThemeName(parentName, name, reset, themes2) {
|
|
|
5526
5530
|
}
|
|
5527
5531
|
var getPropsKey = function(param) {
|
|
5528
5532
|
var { name, reset, forceClassName, inlineValues } = param;
|
|
5529
|
-
return `${name || ""}${reset || ""}${forceClassName || ""}${inlineValues ? getInlineValuesKey(inlineValues) : ""}`;
|
|
5533
|
+
return `${name || ""}${reset || ""}${forceClassName || ""}${process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES !== "disabled" && inlineValues ? getInlineValuesKey(inlineValues) : ""}`;
|
|
5530
5534
|
};
|
|
5531
5535
|
var hasThemeUpdatingProps = function(props) {
|
|
5532
5536
|
return "name" in props || "reset" in props || "forceClassName" in props || "inlineValues" in props;
|
|
@@ -5753,7 +5757,7 @@ function getThemeProxied(_props, _state, _keys, _schemeKeys) {
|
|
|
5753
5757
|
var fastSchemeChange = getSetting("fastSchemeChange");
|
|
5754
5758
|
var rootMatchesSystem = doesRootSchemeMatchSystem();
|
|
5755
5759
|
var shouldOptimize = scheme && platform !== "web" && supportsDynamicColorIOS && !curProps.deopt && !curState.inverses && fastSchemeChange && rootMatchesSystem;
|
|
5756
|
-
var inlineLayer = (_curState_theme = curState.theme) === null || _curState_theme === void 0 ? void 0 : _curState_theme[inlineLayerKey];
|
|
5760
|
+
var inlineLayer = process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES === "disabled" ? void 0 : (_curState_theme = curState.theme) === null || _curState_theme === void 0 ? void 0 : _curState_theme[inlineLayerKey];
|
|
5757
5761
|
var inlineOverridden = !!(inlineLayer === null || inlineLayer === void 0 ? void 0 : inlineLayer.overridden.has(key));
|
|
5758
5762
|
if (shouldOptimize && inlineOverridden) {
|
|
5759
5763
|
var pair = inlineLayer.pairs[key];
|
|
@@ -6508,7 +6512,7 @@ var propMapper = function(key, value, styleState, disabled, map) {
|
|
|
6508
6512
|
if (key in conf.shorthands) key = conf.shorthands[key];
|
|
6509
6513
|
}
|
|
6510
6514
|
var originalValue = value;
|
|
6511
|
-
if (value === "safe" && isSafeAreaKey(key)) {
|
|
6515
|
+
if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && value === "safe" && isSafeAreaKey(key)) {
|
|
6512
6516
|
var expanded1 = expandSafeAreaValue(key);
|
|
6513
6517
|
if (expanded1) {
|
|
6514
6518
|
for (var i = 0; i < expanded1.length; i++) {
|
|
@@ -6540,7 +6544,7 @@ var propMapper = function(key, value, styleState, disabled, map) {
|
|
|
6540
6544
|
var resolveVariants = function(key, value, styleProps, styleState, parentVariantKey) {
|
|
6541
6545
|
var _styleState_staticConfig_variants;
|
|
6542
6546
|
var variantDefinition = (_styleState_staticConfig_variants = styleState.staticConfig.variants) === null || _styleState_staticConfig_variants === void 0 ? void 0 : _styleState_staticConfig_variants[key];
|
|
6543
|
-
if (typeof value === "string" && value.indexOf(":") !== -1 && !(variantDefinition && (typeof variantDefinition === "undefined" ? "undefined" : _type_of$8(variantDefinition)) === "object" && value in variantDefinition)) {
|
|
6547
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && typeof value === "string" && value.indexOf(":") !== -1 && !(variantDefinition && (typeof variantDefinition === "undefined" ? "undefined" : _type_of$8(variantDefinition)) === "object" && value in variantDefinition)) {
|
|
6544
6548
|
var starts = [];
|
|
6545
6549
|
var ends = [];
|
|
6546
6550
|
var modifiers = [];
|
|
@@ -7151,7 +7155,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
7151
7155
|
else if (animationConfig) return;
|
|
7152
7156
|
} else return;
|
|
7153
7157
|
}
|
|
7154
|
-
if (isFrontendProgram(valInit)) {
|
|
7158
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && isFrontendProgram(valInit)) {
|
|
7155
7159
|
if (isValidStyleKey(valInit.property, validStyles$1, accept)) contributeFrontendProgram(styleState, valInit, mergeStyle);
|
|
7156
7160
|
return;
|
|
7157
7161
|
}
|
|
@@ -7216,7 +7220,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
7216
7220
|
}
|
|
7217
7221
|
var isHostStyleKey = !isHOC && isValidStyleKey(key8, validStyles$1, accept) || isAndroid && key8 === "elevation";
|
|
7218
7222
|
var isContextProgramKey = !isHOC && Boolean(isStyledContextProp);
|
|
7219
|
-
if (conditionSource !== void 0) {
|
|
7223
|
+
if (process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && conditionSource !== void 0) {
|
|
7220
7224
|
if (isHostStyleKey || isContextProgramKey) contributeVariantClauseValue(styleState, key8, val2, conditionSource, mergeStyle, originalVal, !isHostStyleKey);
|
|
7221
7225
|
else if (isHOC) {
|
|
7222
7226
|
var appended = appendFlatClause(viewProps[key8], conditionSource, val2);
|
|
@@ -7905,7 +7909,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
7905
7909
|
var outputStyle = (_animationDriver_outputStyle = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.outputStyle) !== null && _animationDriver_outputStyle !== void 0 ? _animationDriver_outputStyle : "css";
|
|
7906
7910
|
var curStateRef = stateRef.current;
|
|
7907
7911
|
if (!needsHydration && hasAnimationProp) curStateRef.hasAnimated = true;
|
|
7908
|
-
var platformPseudo = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) && hasFlatModifier(props, config, platformPseudoModifiers));
|
|
7912
|
+
var platformPseudo = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo) && process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && hasFlatModifier(props, config, platformPseudoModifiers));
|
|
7909
7913
|
var willBeAnimatedClient = (function() {
|
|
7910
7914
|
return Boolean(!!((hasAnimationProp || platformPseudo) && !isHOC && useAnimations) || curStateRef.hasAnimated);
|
|
7911
7915
|
})();
|
|
@@ -7916,7 +7920,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
7916
7920
|
var presenceState = presence === null || presence === void 0 ? void 0 : presence[2];
|
|
7917
7921
|
var isExiting = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === false;
|
|
7918
7922
|
var isEntering = (presenceState === null || presenceState === void 0 ? void 0 : presenceState.isPresent) === true && presenceState.initial !== false;
|
|
7919
|
-
var hasEnterStyle = hasFlatModifier(props, config, enterModifier);
|
|
7923
|
+
var hasEnterStyle = process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR !== "disabled" && hasFlatModifier(props, config, enterModifier);
|
|
7920
7924
|
var hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isReactNative) || inputStyle !== "css");
|
|
7921
7925
|
var initialState = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || disableClassName) ? hasEnterStyle || isEntering ? defaultComponentStateShouldEnter : defaultComponentState : defaultComponentStateMounted;
|
|
7922
7926
|
var disabled = isDisabled(props);
|
|
@@ -8031,7 +8035,8 @@ var Theme = createRefComponent(function Theme2(props, ref) {
|
|
|
8031
8035
|
if (props.disable) return props.children;
|
|
8032
8036
|
var { passThrough } = props;
|
|
8033
8037
|
var isRoot = !!props["_isRoot"];
|
|
8034
|
-
var
|
|
8038
|
+
var config = getConfig();
|
|
8039
|
+
var inlineValues = process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES === "disabled" ? null : getInlineValuesFromProps(props, config);
|
|
8035
8040
|
var inlineCSS = null;
|
|
8036
8041
|
inlineCSS === null || inlineCSS === void 0 || inlineCSS.identifier;
|
|
8037
8042
|
var themeProps = inlineValues ? _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -8655,7 +8660,7 @@ function createComponent(staticConfig) {
|
|
|
8655
8660
|
}, []);
|
|
8656
8661
|
useIsomorphicLayoutEffect(function() {
|
|
8657
8662
|
var disposeSafeArea;
|
|
8658
|
-
if (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea) {
|
|
8663
|
+
if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea)) {
|
|
8659
8664
|
var updateSafeArea = function() {
|
|
8660
8665
|
setState(function(previous) {
|
|
8661
8666
|
return _objectSpread2({}, previous);
|
|
@@ -9591,7 +9596,7 @@ function getThemesDeduped(themes, colorTokens, variables, variablesCtx) {
|
|
|
9591
9596
|
}
|
|
9592
9597
|
var theme = _objectSpread2(_objectSpread2({}, colorTokens), rawTheme);
|
|
9593
9598
|
for (var key1 in theme) ensureThemeVariable(theme, key1);
|
|
9594
|
-
if (variables && variablesCtx && !themeName.includes("_")) mergeConfigVariablesIntoTheme(theme, themeName, variables, variablesCtx.tokensParsed);
|
|
9599
|
+
if (process.env.TAMAGUI_RUNTIME_INLINE_THEME_VALUES !== "disabled" && variables && variablesCtx && !themeName.includes("_")) mergeConfigVariablesIntoTheme(theme, themeName, variables, variablesCtx.tokensParsed);
|
|
9595
9600
|
var deduped = {
|
|
9596
9601
|
names: [themeName],
|
|
9597
9602
|
theme
|
|
@@ -9710,7 +9715,7 @@ function mergeStyleBranch(parentBranch, ourBranch) {
|
|
|
9710
9715
|
if (key in ourBranch) continue;
|
|
9711
9716
|
out[key] = parentBranch[key];
|
|
9712
9717
|
}
|
|
9713
|
-
for (var key1 in ourBranch) out[key1] = key1 in parentBranch ? mergeFlatValues(parentBranch[key1], ourBranch[key1]) : ourBranch[key1];
|
|
9718
|
+
for (var key1 in ourBranch) out[key1] = key1 in parentBranch ? process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR === "disabled" ? ourBranch[key1] : mergeFlatValues(parentBranch[key1], ourBranch[key1]) : ourBranch[key1];
|
|
9714
9719
|
return out;
|
|
9715
9720
|
}
|
|
9716
9721
|
var mergeVariants = function(parentVariants, ourVariants) {
|
|
@@ -9943,7 +9948,7 @@ function usePropsAndStyle(props, opts) {
|
|
|
9943
9948
|
var { mediaGroups, pseudoGroups } = splitStyles || {};
|
|
9944
9949
|
useIsomorphicLayoutEffect(function() {
|
|
9945
9950
|
var disposeSafeArea;
|
|
9946
|
-
if (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea) {
|
|
9951
|
+
if (process.env.TAMAGUI_RUNTIME_SAFE_AREA !== "disabled" && (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea)) {
|
|
9947
9952
|
var updateSafeArea = function() {
|
|
9948
9953
|
setState(function(previous) {
|
|
9949
9954
|
return _objectSpread2({}, previous);
|
|
@@ -11897,8 +11902,7 @@ function cleanupNode(node) {
|
|
|
11897
11902
|
LayoutDisableKey.delete(node);
|
|
11898
11903
|
NodeRectCache.delete(node);
|
|
11899
11904
|
}
|
|
11900
|
-
|
|
11901
|
-
//#region ../web/dist/esm/internal-runtime.native.js
|
|
11905
|
+
process.env.TAMAGUI_RUNTIME_STYLE_VALUE_GRAMMAR;
|
|
11902
11906
|
var createTamagui$1 = createTamagui$2;
|
|
11903
11907
|
var setupHooks$1 = setupHooks;
|
|
11904
11908
|
var TamaguiProvider$1 = TamaguiProvider$2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.669.1",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -118,20 +118,20 @@
|
|
|
118
118
|
"clean:build": "tamagui-build clean:build"
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@tamagui/compose-refs": "3.0.0-beta.
|
|
122
|
-
"@tamagui/constants": "3.0.0-beta.
|
|
123
|
-
"@tamagui/helpers": "3.0.0-beta.
|
|
124
|
-
"@tamagui/react-native-media-driver": "3.0.0-beta.
|
|
125
|
-
"@tamagui/react-native-use-pressable": "3.0.0-beta.
|
|
126
|
-
"@tamagui/size": "3.0.0-beta.
|
|
127
|
-
"@tamagui/use-element-layout": "3.0.0-beta.
|
|
128
|
-
"@tamagui/use-event": "3.0.0-beta.
|
|
129
|
-
"@tamagui/web": "3.0.0-beta.
|
|
121
|
+
"@tamagui/compose-refs": "3.0.0-beta.669.1",
|
|
122
|
+
"@tamagui/constants": "3.0.0-beta.669.1",
|
|
123
|
+
"@tamagui/helpers": "3.0.0-beta.669.1",
|
|
124
|
+
"@tamagui/react-native-media-driver": "3.0.0-beta.669.1",
|
|
125
|
+
"@tamagui/react-native-use-pressable": "3.0.0-beta.669.1",
|
|
126
|
+
"@tamagui/size": "3.0.0-beta.669.1",
|
|
127
|
+
"@tamagui/use-element-layout": "3.0.0-beta.669.1",
|
|
128
|
+
"@tamagui/use-event": "3.0.0-beta.669.1",
|
|
129
|
+
"@tamagui/web": "3.0.0-beta.669.1"
|
|
130
130
|
},
|
|
131
131
|
"devDependencies": {
|
|
132
|
-
"@tamagui/build": "3.0.0-beta.
|
|
133
|
-
"@tamagui/native-bundle": "3.0.0-beta.
|
|
134
|
-
"@tamagui/react-native-web-lite": "3.0.0-beta.
|
|
132
|
+
"@tamagui/build": "3.0.0-beta.669.1",
|
|
133
|
+
"@tamagui/native-bundle": "3.0.0-beta.669.1",
|
|
134
|
+
"@tamagui/react-native-web-lite": "3.0.0-beta.669.1",
|
|
135
135
|
"@testing-library/react": "^16.1.0",
|
|
136
136
|
"csstype": "^3.0.10",
|
|
137
137
|
"react": ">=19",
|