tamagui 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 +24 -19
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +10 -4
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -3795,12 +3795,7 @@ var require_useTheme_native = __commonJS({
|
|
|
3795
3795
|
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;
|
|
3796
3796
|
if (process.env.NODE_ENV === "development" && typeof props.debug == "string" && props.debug !== "profile") {
|
|
3797
3797
|
var _props_shouldUpdate2;
|
|
3798
|
-
console.info(
|
|
3799
|
-
shouldUpdateProp: (_props_shouldUpdate2 = props.shouldUpdate) === null || _props_shouldUpdate2 === void 0 ? void 0 : _props_shouldUpdate2.call(props),
|
|
3800
|
-
keys: [
|
|
3801
|
-
...keys.current
|
|
3802
|
-
]
|
|
3803
|
-
} : "");
|
|
3798
|
+
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);
|
|
3804
3799
|
}
|
|
3805
3800
|
return next;
|
|
3806
3801
|
}), { themeManager, state } = changedThemeState;
|
|
@@ -3808,7 +3803,7 @@ var require_useTheme_native = __commonJS({
|
|
|
3808
3803
|
|
|
3809
3804
|
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`));
|
|
3810
3805
|
var themeProxied = import_react3.default.useMemo(function() {
|
|
3811
|
-
return !themeManager || !(state != null && state.theme) ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug);
|
|
3806
|
+
return keys.current = [], !themeManager || !(state != null && state.theme) ? {} : getThemeProxied(state, props.deopt, themeManager, keys.current, props.debug);
|
|
3812
3807
|
}, [
|
|
3813
3808
|
state == null ? void 0 : state.theme,
|
|
3814
3809
|
themeManager,
|
|
@@ -3845,7 +3840,7 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
3845
3840
|
// when they touch the actual value we only track it
|
|
3846
3841
|
// if its a variable (web), its ignored!
|
|
3847
3842
|
get(_2, subkey) {
|
|
3848
|
-
if (subkey === "val") track(keyString);
|
|
3843
|
+
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));
|
|
3849
3844
|
else if (subkey === "get") return function(platform2) {
|
|
3850
3845
|
var outVal = (0, import_createVariable.getVariable)(val);
|
|
3851
3846
|
if (platform2 !== "web" && import_constants4.isIos && !deopt && (0, import_config.getSetting)("fastSchemeChange") && !someParentIsInversed(themeManager) && scheme) {
|
|
@@ -3860,6 +3855,16 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
3860
3855
|
return dynamicVal;
|
|
3861
3856
|
}
|
|
3862
3857
|
}
|
|
3858
|
+
if (process.env.NODE_ENV === "development" && debug && (console.info(` \u{1F3A8} useTheme() tracking new key because of:
|
|
3859
|
+
not web: ${platform2 !== "web"}
|
|
3860
|
+
isIOS: ${import_constants4.isIos}
|
|
3861
|
+
deopt: ${deopt}
|
|
3862
|
+
fastScheme: ${(0, import_config.getSetting)("fastSchemeChange")}
|
|
3863
|
+
parent inversed: ${someParentIsInversed(themeManager)}
|
|
3864
|
+
`), someParentIsInversed(themeManager))) {
|
|
3865
|
+
var _themeManager_parentManager;
|
|
3866
|
+
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}`);
|
|
3867
|
+
}
|
|
3863
3868
|
return track(keyString), outVal;
|
|
3864
3869
|
};
|
|
3865
3870
|
return Reflect.get(val, subkey);
|
|
@@ -6597,11 +6602,7 @@ var require_propMapper_native = __commonJS({
|
|
|
6597
6602
|
}
|
|
6598
6603
|
if (typeof variantValue == "function") {
|
|
6599
6604
|
var fn = variantValue, extras = (0, import_getVariantExtras.getVariantExtras)(styleState);
|
|
6600
|
-
variantValue = fn(value, extras), process.env.NODE_ENV
|
|
6601
|
-
fn,
|
|
6602
|
-
variantValue,
|
|
6603
|
-
extras
|
|
6604
|
-
}), console.groupEnd());
|
|
6605
|
+
variantValue = fn(value, extras), process.env.NODE_ENV;
|
|
6605
6606
|
}
|
|
6606
6607
|
var fontFamilyResult;
|
|
6607
6608
|
if ((0, import_isObj.isObj)(variantValue)) {
|
|
@@ -6736,7 +6737,7 @@ var require_propMapper_native = __commonJS({
|
|
|
6736
6737
|
var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
|
|
6737
6738
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
6738
6739
|
}
|
|
6739
|
-
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;
|
|
6740
|
+
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;
|
|
6740
6741
|
else {
|
|
6741
6742
|
if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
6742
6743
|
else {
|
|
@@ -6770,7 +6771,7 @@ var require_propMapper_native = __commonJS({
|
|
|
6770
6771
|
}
|
|
6771
6772
|
if (hasSet) {
|
|
6772
6773
|
var out = resolveVariableValue(key, valOrVar, resolveAs);
|
|
6773
|
-
return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info("resolved", resolveAs, valOrVar, out), out;
|
|
6774
|
+
return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info("resolved", resolveAs, valOrVar, out), globalThis.tamaguiAvoidTracking = !1), out;
|
|
6774
6775
|
}
|
|
6775
6776
|
process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.warn(`Warning: no token found for ${key}, omitting`);
|
|
6776
6777
|
};
|
|
@@ -6779,7 +6780,11 @@ var require_propMapper_native = __commonJS({
|
|
|
6779
6780
|
if ((0, import_createVariable.isVariable)(valOrVar)) {
|
|
6780
6781
|
if (resolveValues === "value") return valOrVar.val;
|
|
6781
6782
|
var get = valOrVar == null ? void 0 : valOrVar.get;
|
|
6782
|
-
|
|
6783
|
+
if (key !== "shadowColor" && typeof get == "function") {
|
|
6784
|
+
var resolveDynamicFor = resolveValues === "web" ? "web" : void 0;
|
|
6785
|
+
return get(resolveDynamicFor);
|
|
6786
|
+
}
|
|
6787
|
+
return valOrVar.val;
|
|
6783
6788
|
}
|
|
6784
6789
|
return valOrVar;
|
|
6785
6790
|
}
|
|
@@ -7312,13 +7317,13 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7312
7317
|
usedKeys: {
|
|
7313
7318
|
...usedKeys
|
|
7314
7319
|
}
|
|
7315
|
-
}), (0, import_log.log)("expanded", expanded, `
|
|
7320
|
+
}), globalThis.tamaguiAvoidTracking = !0, (0, import_log.log)("expanded", expanded, `
|
|
7316
7321
|
usedKeys`, {
|
|
7317
7322
|
...usedKeys
|
|
7318
7323
|
}, `
|
|
7319
7324
|
current`, {
|
|
7320
7325
|
...styleState.style
|
|
7321
|
-
}));
|
|
7326
|
+
}), globalThis.tamaguiAvoidTracking = !1);
|
|
7322
7327
|
} catch {
|
|
7323
7328
|
}
|
|
7324
7329
|
console.groupEnd();
|
|
@@ -15595,7 +15600,7 @@ var require_Adapt_native = __commonJS({
|
|
|
15595
15600
|
var { platform: platform2, when, children } = param, context = import_react3.default.useContext(AdaptParentContext), media = (0, import_core12.useMedia)(), enabled = !1;
|
|
15596
15601
|
return typeof when == "function" ? enabled = when({
|
|
15597
15602
|
media
|
|
15598
|
-
}) : (
|
|
15603
|
+
}) : (platform2 === "touch" ? enabled = import_constants4.isTouchable : platform2 === "native" ? enabled = !import_constants4.isWeb : platform2 === "web" ? enabled = import_constants4.isWeb : platform2 === "ios" ? enabled = import_constants4.isIos : platform2 === "android" && (enabled = import_constants4.isAndroid), when && !media[when] && (enabled = !1)), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
15599
15604
|
if (enabled) return context == null || context.setWhen(when || enabled), function() {
|
|
15600
15605
|
context == null || context.setWhen(null);
|
|
15601
15606
|
};
|