@tamagui/core 1.96.0 → 1.97.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.
@@ -7891,16 +7891,19 @@ var require_Theme_native = __commonJS({
7891
7891
  });
7892
7892
  } catch {
7893
7893
  }
7894
- return getThemedChildren(themeState, finalChildren, props, isRoot);
7894
+ var stateRef = (0, import_react3.useRef)({
7895
+ hasEverThemed: !1
7896
+ });
7897
+ return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef);
7895
7898
  });
7896
7899
  Theme.displayName = "Theme";
7897
7900
  Theme.avoidForwardRef = !0;
7898
7901
  function getThemedChildren(themeState, children, props) {
7899
- var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, themeManager = themeState.themeManager, isNewTheme = themeState.isNewTheme;
7902
+ var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, themeManager = themeState.themeManager, isNewTheme = themeState.isNewTheme;
7900
7903
  if (!themeManager)
7901
7904
  throw new Error("\u274C 005");
7902
- var shallow = props.shallow, forceClassName = props.forceClassName, hasEverThemed = (0, import_react3.useRef)(!1), shouldRenderChildrenWithTheme = isNewTheme || props.inverse || hasEverThemed.current || forceClassName || isRoot;
7903
- if (shouldRenderChildrenWithTheme && (hasEverThemed.current = !0), !shouldRenderChildrenWithTheme)
7905
+ var shallow = props.shallow, forceClassName = props.forceClassName, shouldRenderChildrenWithTheme = isNewTheme || "inverse" in props || "theme" in props || stateRef.current.hasEverThemed || forceClassName || isRoot;
7906
+ if (shouldRenderChildrenWithTheme && (stateRef.current.hasEverThemed = !0), !shouldRenderChildrenWithTheme)
7904
7907
  return children;
7905
7908
  var next = children;
7906
7909
  shallow && (next = import_react3.Children.toArray(children).map(function(child) {
@@ -8906,7 +8909,7 @@ var require_createComponent_native = __commonJS({
8906
8909
  if (groupName && subGroupContext && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, _object_spread_props(_object_spread2({}, componentContext), {
8907
8910
  groups: subGroupContext,
8908
8911
  children: content
8909
- }))), content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1), staticConfig.context) {
8912
+ }))), content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), staticConfig.context) {
8910
8913
  var contextProps = staticConfig.context.props;
8911
8914
  for (var key1 in contextProps)
8912
8915
  if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {