@tamagui/core 1.132.5 → 1.132.7

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.
@@ -6695,9 +6695,9 @@ var require_ClientOnly_native = __commonJS({
6695
6695
  });
6696
6696
  module2.exports = __toCommonJS2(ClientOnly_exports);
6697
6697
  var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = require("react"), ClientOnlyContext2 = /* @__PURE__ */ (0, import_react3.createContext)(!1), ClientOnly2 = function(param) {
6698
- var { children } = param;
6698
+ var { children, value = !0 } = param;
6699
6699
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ClientOnlyContext2.Provider, {
6700
- value: !0,
6700
+ value,
6701
6701
  children
6702
6702
  });
6703
6703
  };
@@ -7190,8 +7190,7 @@ var require_createComponent_native = __commonJS({
7190
7190
  }
7191
7191
  var allGroupContexts = (0, import_react3.useMemo)(function() {
7192
7192
  var _stateRef_current_group;
7193
- if (!groupName || props.passThrough || // avoids onLayout
7194
- props.containerType === "normal") return groupContextParent;
7193
+ if (!groupName || props.passThrough) return groupContextParent;
7195
7194
  (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
7196
7195
  var listeners = /* @__PURE__ */ new Set();
7197
7196
  return stateRef.current.group = {
@@ -7264,7 +7263,8 @@ var require_createComponent_native = __commonJS({
7264
7263
  willBeAnimated,
7265
7264
  styledContextProps
7266
7265
  }, themeName = (themeState == null ? void 0 : themeState.name) || "", splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
7267
- if (splitStyles && groupContext) {
7266
+ if (splitStyles && groupContext && // avoids onLayout if we don't need it
7267
+ props.containerType !== "normal") {
7268
7268
  var groupState = groupContext == null ? void 0 : groupContext.state;
7269
7269
  if (groupState && groupState.layout === void 0) {
7270
7270
  var _splitStyles_style, _splitStyles_style1;
@@ -7366,7 +7366,8 @@ var require_createComponent_native = __commonJS({
7366
7366
  });
7367
7367
  animations && (animations.ref && (animatedRef = animations.ref), isHydrated && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`)));
7368
7368
  }
7369
- splitStyles && groupContext && (nonTamaguiProps.onLayout = (0, import_helpers2.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
7369
+ splitStyles && groupContext && // avoids onLayout if we don't need it
7370
+ props.containerType !== "normal" && (nonTamaguiProps.onLayout = (0, import_helpers2.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
7370
7371
  var _stateRef_current_group, layout = e.nativeEvent.layout;
7371
7372
  groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
7372
7373
  layout
@@ -9891,7 +9892,7 @@ var require_TamaguiProvider_native = __commonJS({
9891
9892
  }
9892
9893
  });
9893
9894
  module2.exports = __toCommonJS2(TamaguiProvider_exports);
9894
- var import_jsx_runtime2 = require("react/jsx-runtime"), import_constants = require_index_native2(), import_use_did_finish_ssr = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native(), import_insertStyleRule = require_insertStyleRule_native();
9895
+ var import_jsx_runtime2 = require("react/jsx-runtime"), import_constants = require_index_native2(), import_use_did_finish_ssr = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_insertStyleRule = require_insertStyleRule_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native();
9895
9896
  function TamaguiProvider2(param) {
9896
9897
  var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
9897
9898
  import_constants.IS_REACT_19 || import_constants.isClient && (0, import_constants.useIsomorphicLayoutEffect)(function() {
@@ -10001,13 +10002,14 @@ var require_Configuration_native = __commonJS({
10001
10002
  });
10002
10003
  module2.exports = __toCommonJS2(Configuration_exports);
10003
10004
  var import_jsx_runtime2 = require("react/jsx-runtime"), import_use_did_finish_ssr = require_index_native7(), import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), Configuration = function(props) {
10004
- var current = import_react3.default.useContext(import_ComponentContext.ComponentContext), clientOnly = (0, import_react3.useContext)(import_use_did_finish_ssr.ClientOnlyContext), children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
10005
- ...current,
10006
- ...props
10005
+ var current = import_react3.default.useContext(import_ComponentContext.ComponentContext);
10006
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_use_did_finish_ssr.ClientOnly, {
10007
+ value: typeof props.disableSSR == "boolean" && props.disableSSR !== current.disableSSR ? props.disableSSR : current.disableSSR,
10008
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
10009
+ ...current,
10010
+ ...props
10011
+ })
10007
10012
  });
10008
- return clientOnly ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_use_did_finish_ssr.ClientOnly, {
10009
- children
10010
- }) : children;
10011
10013
  };
10012
10014
  Configuration.displayName = "Configuration";
10013
10015
  }