@tamagui/core 1.113.0 → 1.113.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.js +23 -18
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +9 -3
- package/dist/test.native.js.map +2 -2
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -3653,12 +3653,7 @@ var require_useTheme_native = __commonJS({
|
|
|
3653
3653
|
var _props_shouldUpdate, _props_shouldUpdate1, next = (_props_shouldUpdate1 = (_props_shouldUpdate = props.shouldUpdate) === null || _props_shouldUpdate === void 0 ? void 0 : _props_shouldUpdate.call(props)) !== null && _props_shouldUpdate1 !== void 0 ? _props_shouldUpdate1 : keys.current.length > 0 ? !0 : void 0;
|
|
3654
3654
|
if (process.env.NODE_ENV === "development" && typeof props.debug == "string" && props.debug !== "profile") {
|
|
3655
3655
|
var _props_shouldUpdate2;
|
|
3656
|
-
console.info(
|
|
3657
|
-
shouldUpdateProp: (_props_shouldUpdate2 = props.shouldUpdate) === null || _props_shouldUpdate2 === void 0 ? void 0 : _props_shouldUpdate2.call(props),
|
|
3658
|
-
keys: [
|
|
3659
|
-
...keys.current
|
|
3660
|
-
]
|
|
3661
|
-
} : "");
|
|
3656
|
+
console.info(` \u{1F3A8} useTheme() shouldUpdate? tracking keys ${keys.current.length} ${(_props_shouldUpdate2 = props.shouldUpdate) === null || _props_shouldUpdate2 === void 0 ? void 0 : _props_shouldUpdate2.call(props)}`, next);
|
|
3662
3657
|
}
|
|
3663
3658
|
return next;
|
|
3664
3659
|
}), { themeManager, state } = changedThemeState;
|
|
@@ -3666,7 +3661,7 @@ var require_useTheme_native = __commonJS({
|
|
|
3666
3661
|
|
|
3667
3662
|
If this is intended and you are using Tamagui without any themes, you can disable this warning by setting the environment variable TAMAGUI_DISABLE_NO_THEME_WARNING=1`));
|
|
3668
3663
|
var themeProxied = import_react3.default.useMemo(function() {
|
|
3669
|
-
return !themeManager || !(state != null && state.theme) ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug);
|
|
3664
|
+
return keys.current = [], !themeManager || !(state != null && state.theme) ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug);
|
|
3670
3665
|
}, [
|
|
3671
3666
|
state == null ? void 0 : state.theme,
|
|
3672
3667
|
themeManager,
|
|
@@ -3703,7 +3698,7 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
3703
3698
|
// when they touch the actual value we only track it
|
|
3704
3699
|
// if its a variable (web), its ignored!
|
|
3705
3700
|
get(_2, subkey) {
|
|
3706
|
-
if (subkey === "val") track(keyString);
|
|
3701
|
+
if (subkey === "val") globalThis.tamaguiAvoidTracking || (process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" \u{1F3A8} useTheme() tracking new key because of .val access", new Error().stack), track(keyString));
|
|
3707
3702
|
else if (subkey === "get") return function(platform) {
|
|
3708
3703
|
var outVal = (0, import_createVariable.getVariable)(val);
|
|
3709
3704
|
if (platform !== "web" && import_constants2.isIos && !deopt && (0, import_config.getSetting)("fastSchemeChange") && !someParentIsInversed(themeManager) && scheme) {
|
|
@@ -3718,6 +3713,16 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
3718
3713
|
return dynamicVal;
|
|
3719
3714
|
}
|
|
3720
3715
|
}
|
|
3716
|
+
if (process.env.NODE_ENV === "development" && debug && (console.info(` \u{1F3A8} useTheme() tracking new key because of:
|
|
3717
|
+
not web: ${platform !== "web"}
|
|
3718
|
+
isIOS: ${import_constants2.isIos}
|
|
3719
|
+
deopt: ${deopt}
|
|
3720
|
+
fastScheme: ${(0, import_config.getSetting)("fastSchemeChange")}
|
|
3721
|
+
parent inversed: ${someParentIsInversed(themeManager)}
|
|
3722
|
+
`), someParentIsInversed(themeManager))) {
|
|
3723
|
+
var _themeManager_parentManager;
|
|
3724
|
+
console.info(` some parent is inversed: ${themeManager == null ? void 0 : themeManager.state.name} => ${themeManager == null || (_themeManager_parentManager = themeManager.parentManager) === null || _themeManager_parentManager === void 0 ? void 0 : _themeManager_parentManager.state.name}`);
|
|
3725
|
+
}
|
|
3721
3726
|
return track(keyString), outVal;
|
|
3722
3727
|
};
|
|
3723
3728
|
return Reflect.get(val, subkey);
|
|
@@ -6455,11 +6460,7 @@ var require_propMapper_native = __commonJS({
|
|
|
6455
6460
|
}
|
|
6456
6461
|
if (typeof variantValue == "function") {
|
|
6457
6462
|
var fn = variantValue, extras = (0, import_getVariantExtras.getVariantExtras)(styleState);
|
|
6458
|
-
variantValue = fn(value, extras), process.env.NODE_ENV
|
|
6459
|
-
fn,
|
|
6460
|
-
variantValue,
|
|
6461
|
-
extras
|
|
6462
|
-
}), console.groupEnd());
|
|
6463
|
+
variantValue = fn(value, extras), process.env.NODE_ENV;
|
|
6463
6464
|
}
|
|
6464
6465
|
var fontFamilyResult;
|
|
6465
6466
|
if ((0, import_isObj.isObj)(variantValue)) {
|
|
@@ -6594,7 +6595,7 @@ var require_propMapper_native = __commonJS({
|
|
|
6594
6595
|
var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
|
|
6595
6596
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
6596
6597
|
}
|
|
6597
|
-
if (theme && value in theme) valOrVar = theme[value], process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info(` - resolving ${key} to theme value ${value}`, valOrVar), hasSet = !0;
|
|
6598
|
+
if (theme && value in theme) valOrVar = theme[value], process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info(` - resolving ${key} to theme value ${value} resolveAs ${resolveAs}`, valOrVar), globalThis.tamaguiAvoidTracking = !1), hasSet = !0;
|
|
6598
6599
|
else {
|
|
6599
6600
|
if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
6600
6601
|
else {
|
|
@@ -6628,7 +6629,7 @@ var require_propMapper_native = __commonJS({
|
|
|
6628
6629
|
}
|
|
6629
6630
|
if (hasSet) {
|
|
6630
6631
|
var out = resolveVariableValue(key, valOrVar, resolveAs);
|
|
6631
|
-
return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info("resolved", resolveAs, valOrVar, out), out;
|
|
6632
|
+
return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info("resolved", resolveAs, valOrVar, out), globalThis.tamaguiAvoidTracking = !1), out;
|
|
6632
6633
|
}
|
|
6633
6634
|
process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.warn(`Warning: no token found for ${key}, omitting`);
|
|
6634
6635
|
};
|
|
@@ -6637,7 +6638,11 @@ var require_propMapper_native = __commonJS({
|
|
|
6637
6638
|
if ((0, import_createVariable.isVariable)(valOrVar)) {
|
|
6638
6639
|
if (resolveValues === "value") return valOrVar.val;
|
|
6639
6640
|
var get = valOrVar == null ? void 0 : valOrVar.get;
|
|
6640
|
-
|
|
6641
|
+
if (key !== "shadowColor" && typeof get == "function") {
|
|
6642
|
+
var resolveDynamicFor = resolveValues === "web" ? "web" : void 0;
|
|
6643
|
+
return get(resolveDynamicFor);
|
|
6644
|
+
}
|
|
6645
|
+
return valOrVar.val;
|
|
6641
6646
|
}
|
|
6642
6647
|
return valOrVar;
|
|
6643
6648
|
}
|
|
@@ -7170,13 +7175,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7170
7175
|
usedKeys: {
|
|
7171
7176
|
...usedKeys
|
|
7172
7177
|
}
|
|
7173
|
-
}), (0, import_log.log)("expanded", expanded, `
|
|
7178
|
+
}), globalThis.tamaguiAvoidTracking = !0, (0, import_log.log)("expanded", expanded, `
|
|
7174
7179
|
usedKeys`, {
|
|
7175
7180
|
...usedKeys
|
|
7176
7181
|
}, `
|
|
7177
7182
|
current`, {
|
|
7178
7183
|
...styleState.style
|
|
7179
|
-
}));
|
|
7184
|
+
}), globalThis.tamaguiAvoidTracking = !1);
|
|
7180
7185
|
} catch {
|
|
7181
7186
|
}
|
|
7182
7187
|
console.groupEnd();
|