@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.
@@ -4022,6 +4022,7 @@ var require_useTheme_native = __commonJS({
4022
4022
  function getThemeProxied({ theme, name }, deopt = !1, themeManager, keys, debug) {
4023
4023
  if (!theme)
4024
4024
  return {};
4025
+ let config = (0, import_config.getConfig)();
4025
4026
  function track(key) {
4026
4027
  keys && !keys.includes(key) && keys.push(key);
4027
4028
  }
@@ -4051,13 +4052,13 @@ var require_useTheme_native = __commonJS({
4051
4052
  else if (subkey === "get")
4052
4053
  return () => {
4053
4054
  let outVal = (0, import_createVariable.getVariable)(val);
4054
- if (import_constants2.isIos && !deopt) {
4055
+ if (import_constants2.isIos && !deopt && config.settings.fastSchemeChange) {
4055
4056
  let isDark = name.startsWith("dark"), isLight = !isDark && name.startsWith("light");
4056
4057
  if (isDark || isLight) {
4057
4058
  let oppositeThemeName = name.replace(
4058
4059
  isDark ? "dark" : "light",
4059
4060
  isDark ? "light" : "dark"
4060
- ), oppositeTheme = (0, import_config.getConfig)().themes[oppositeThemeName], oppositeVal = (0, import_createVariable.getVariable)(oppositeTheme == null ? void 0 : oppositeTheme[keyString]);
4061
+ ), oppositeTheme = config.themes[oppositeThemeName], oppositeVal = (0, import_createVariable.getVariable)(oppositeTheme == null ? void 0 : oppositeTheme[keyString]);
4061
4062
  if (oppositeVal)
4062
4063
  return {
4063
4064
  dynamic: {
@@ -4105,7 +4106,7 @@ var require_useTheme_native = __commonJS({
4105
4106
  let selfListenerDispose = themeManager.onChangeTheme((_a, _b, forced) => {
4106
4107
  forced && setThemeState((prev) => createState(prev, !0));
4107
4108
  }), disposeChangeListener = parentManager == null ? void 0 : parentManager.onChangeTheme((name, manager) => {
4108
- (((shouldUpdate == null ? void 0 : shouldUpdate()) || props.deopt || props["disable-child-theme"]) ?? !!(keys != null && keys.length)) && setThemeState(createState);
4109
+ (((shouldUpdate == null ? void 0 : shouldUpdate()) || props.deopt || props["disable-child-theme"]) ?? !!(keys != null && keys.length || isNewTheme)) && setThemeState(createState);
4109
4110
  }, themeManager.id);
4110
4111
  return () => {
4111
4112
  selfListenerDispose(), disposeChangeListener == null || disposeChangeListener(), activeThemeManagers.delete(themeManager);
@@ -4535,7 +4536,7 @@ var require_createComponent_native = __commonJS({
4535
4536
  ),
4536
4537
  debug: debugProp
4537
4538
  };
4538
- themeStateProps.deopt = config != null && config.settings.fastSchemeChange ? willBeAnimated : !0;
4539
+ themeStateProps.deopt = willBeAnimated;
4539
4540
  let isExiting = !state.unmounted && (presence == null ? void 0 : presence[0]) === !1, [themeState, theme] = (0, import_useTheme.useThemeWithState)(themeStateProps);
4540
4541
  elementType = Component || elementType;
4541
4542
  let isStringElement = typeof elementType == "string", mediaState2 = (0, import_useMedia.useMedia)(stateRef, componentContext);