@tamagui/core 1.74.0 → 1.74.2
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 +5 -4
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +5 -4
- package/dist/test.native.js.map +2 -2
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -4222,6 +4222,7 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
4222
4222
|
function getThemeProxied({ theme, name }, deopt = !1, themeManager, keys, debug) {
|
|
4223
4223
|
if (!theme)
|
|
4224
4224
|
return {};
|
|
4225
|
+
let config = (0, import_config.getConfig)();
|
|
4225
4226
|
function track(key) {
|
|
4226
4227
|
keys && !keys.includes(key) && (keys.push(key), process.env.NODE_ENV === "development" && debug && console.log(` \u{1F3A8} useTheme() tracking new key: ${key}`));
|
|
4227
4228
|
}
|
|
@@ -4251,13 +4252,13 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
4251
4252
|
else if (subkey === "get")
|
|
4252
4253
|
return () => {
|
|
4253
4254
|
let outVal = (0, import_createVariable.getVariable)(val);
|
|
4254
|
-
if (import_constants2.isIos && !deopt) {
|
|
4255
|
+
if (import_constants2.isIos && !deopt && config.settings.fastSchemeChange) {
|
|
4255
4256
|
let isDark = name.startsWith("dark"), isLight = !isDark && name.startsWith("light");
|
|
4256
4257
|
if (isDark || isLight) {
|
|
4257
4258
|
let oppositeThemeName = name.replace(
|
|
4258
4259
|
isDark ? "dark" : "light",
|
|
4259
4260
|
isDark ? "light" : "dark"
|
|
4260
|
-
), oppositeTheme =
|
|
4261
|
+
), oppositeTheme = config.themes[oppositeThemeName], oppositeVal = (0, import_createVariable.getVariable)(oppositeTheme == null ? void 0 : oppositeTheme[keyString]);
|
|
4261
4262
|
if (oppositeVal)
|
|
4262
4263
|
return {
|
|
4263
4264
|
dynamic: {
|
|
@@ -4305,7 +4306,7 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
4305
4306
|
let selfListenerDispose = themeManager.onChangeTheme((_a, _b, forced) => {
|
|
4306
4307
|
forced && setThemeState((prev) => createState(prev, !0));
|
|
4307
4308
|
}), disposeChangeListener = parentManager == null ? void 0 : parentManager.onChangeTheme((name, manager) => {
|
|
4308
|
-
let force = (shouldUpdate == null ? void 0 : shouldUpdate()) || props.deopt || props["disable-child-theme"], doUpdate = force ?? !!(keys != null && keys.length);
|
|
4309
|
+
let force = (shouldUpdate == null ? void 0 : shouldUpdate()) || props.deopt || props["disable-child-theme"], doUpdate = force ?? !!(keys != null && keys.length || isNewTheme);
|
|
4309
4310
|
process.env.NODE_ENV === "development" && props.debug && console.log(" \u{1F538} onChange", themeManager.id, {
|
|
4310
4311
|
force,
|
|
4311
4312
|
doUpdate,
|
|
@@ -4810,7 +4811,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4810
4811
|
),
|
|
4811
4812
|
debug: debugProp
|
|
4812
4813
|
};
|
|
4813
|
-
themeStateProps.deopt =
|
|
4814
|
+
themeStateProps.deopt = willBeAnimated;
|
|
4814
4815
|
let isExiting = !state.unmounted && (presence == null ? void 0 : presence[0]) === !1;
|
|
4815
4816
|
if (process.env.NODE_ENV === "development") {
|
|
4816
4817
|
let id = (0, import_react.useId)();
|