@tamagui/core 1.74.1 → 1.74.3
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 +8 -7
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +5 -4
- package/dist/test.native.js.map +1 -1
- 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,15 +4306,15 @@ 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"],
|
|
4309
|
+
let force = (shouldUpdate == null ? void 0 : shouldUpdate()) || props.deopt || props["disable-child-theme"], shouldTryUpdate = 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
|
+
shouldTryUpdate,
|
|
4312
4313
|
props,
|
|
4313
4314
|
name,
|
|
4314
4315
|
manager,
|
|
4315
4316
|
keys
|
|
4316
|
-
}),
|
|
4317
|
+
}), shouldTryUpdate && setThemeState(createState);
|
|
4317
4318
|
}, themeManager.id);
|
|
4318
4319
|
return () => {
|
|
4319
4320
|
selfListenerDispose(), disposeChangeListener == null || disposeChangeListener(), activeThemeManagers.delete(themeManager);
|
|
@@ -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)();
|
|
@@ -5055,7 +5056,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
5055
5056
|
isZStack,
|
|
5056
5057
|
debug: debugProp
|
|
5057
5058
|
});
|
|
5058
|
-
asChild && (elementType = import_Slot.Slot), process.env.NODE_ENV === "development" && time && time`spaced-as-child`, // in test mode disable perf unwrapping so react-testing-library finds Text properly
|
|
5059
|
+
asChild && (elementType = import_Slot.Slot, Object.assign(viewProps, { onPress, onLongPress })), process.env.NODE_ENV === "development" && time && time`spaced-as-child`, // in test mode disable perf unwrapping so react-testing-library finds Text properly
|
|
5059
5060
|
process.env.NODE_ENV !== "test" && (elementType === BaseText || elementType === BaseView) ? process.env.TAMAGUI_OPTIMIZE_NATIVE_VIEWS ? (viewProps.children = content, content = (0, import_react.createElement)(
|
|
5060
5061
|
elementType === BaseText ? "RCTText" : "RCTView",
|
|
5061
5062
|
viewProps
|