@tamagui/core 1.129.18 → 1.130.0

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.
@@ -5340,6 +5340,7 @@ var require_getSplitStyles_native = __commonJS({
5340
5340
  };
5341
5341
  conf = conf || (0, import_config.getConfig)();
5342
5342
  var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
5343
+ if (props.passThrough) return null;
5343
5344
  import_constants.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
5344
5345
  var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles2 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers2.stylePropsText : import_helpers2.validStyles), styleState = {
5345
5346
  classNames,
@@ -5620,20 +5621,29 @@ var require_mergeProps_native = __commonJS({
5620
5621
  var out = {};
5621
5622
  for (var key in a) mergeProp(out, a, b, key, inverseShorthands);
5622
5623
  if (b) for (var key1 in b) mergeProp(out, b, void 0, key1, inverseShorthands);
5624
+ if (b && Object.keys(b).length > 0) {
5625
+ var hasPropsNeedingReorder = Object.keys(b).some(function(key4) {
5626
+ return (key4 in import_pseudoDescriptors.pseudoDescriptors || key4 === "variant") && key4 in a && key4 in out;
5627
+ });
5628
+ if (hasPropsNeedingReorder) {
5629
+ var reordered = {};
5630
+ for (var key2 in b) (key2 in import_pseudoDescriptors.pseudoDescriptors || key2 === "variant") && key2 in out && (reordered[key2] = out[key2]);
5631
+ for (var key3 in out) key3 in reordered || (reordered[key3] = out[key3]);
5632
+ return reordered;
5633
+ }
5634
+ }
5623
5635
  return out;
5624
5636
  };
5625
5637
  function mergeProp(out, a, b, key, inverseShorthands) {
5626
5638
  var longhand = (inverseShorthands == null ? void 0 : inverseShorthands[key]) || null, val = a[key];
5627
- if (!(b && (key in b || longhand && longhand in b))) {
5628
- if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
5629
- out[key] = {
5630
- ...out[key],
5631
- ...val
5632
- };
5633
- return;
5634
- }
5635
- out[longhand || key] = val;
5639
+ if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
5640
+ out[key] = {
5641
+ ...out[key],
5642
+ ...val
5643
+ };
5644
+ return;
5636
5645
  }
5646
+ b && (key in b || longhand && longhand in b) || (out[longhand || key] = val);
5637
5647
  }
5638
5648
  }
5639
5649
  });
@@ -5873,7 +5883,7 @@ var require_useThemeState_native = __commonJS({
5873
5883
  id,
5874
5884
  parentId
5875
5885
  ]), propsKey = getPropsKey(props), getSnapshot = function() {
5876
- var _keys_current, _props_needsUpdate, local = localStates.get(id), needsUpdate = isRoot || props.name === "light" || props.name === "dark" || props.name === null ? !0 : HasRenderedOnce.get(keys) ? !(keys == null || (_keys_current = keys.current) === null || _keys_current === void 0) && _keys_current.size ? !0 : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props) : !0, [rerender, next] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
5886
+ var _keys_current, _props_needsUpdate, local = localStates.get(id), needsUpdate = props.passThrough ? !1 : isRoot || props.name === "light" || props.name === "dark" || props.name === null ? !0 : HasRenderedOnce.get(keys) ? !(keys == null || (_keys_current = keys.current) === null || _keys_current === void 0) && _keys_current.size ? !0 : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props) : !0, [rerender, next] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
5877
5887
  return PendingUpdate.delete(id), (!local || rerender) && (local = {
5878
5888
  ...next
5879
5889
  }, localStates.set(id, local)), Object.assign(local, next), local.id = id, states.set(id, next), local;
@@ -5896,6 +5906,10 @@ var require_useThemeState_native = __commonJS({
5896
5906
  ]), state;
5897
5907
  }, getNextState = function(lastState, props, propsKey) {
5898
5908
  var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, id = arguments.length > 4 ? arguments[4] : void 0, parentId = arguments.length > 5 ? arguments[5] : void 0, needsUpdate = arguments.length > 6 ? arguments[6] : void 0, pendingUpdate = arguments.length > 7 ? arguments[7] : void 0, { debug } = props, parentState = states.get(parentId);
5909
+ if (props.passThrough) return [
5910
+ !1,
5911
+ lastState ?? parentState
5912
+ ];
5899
5913
  themes || (themes = (0, import_config.getConfig)().themes);
5900
5914
  var name = !propsKey && (!lastState || !(lastState != null && lastState.isNew)) ? null : getNewThemeName(parentState == null ? void 0 : parentState.name, props, pendingUpdate === "force" ? !0 : !!needsUpdate), isSameAsParent = parentState && (!name || name === parentState.name), shouldRerender = !!(needsUpdate && (pendingUpdate || (lastState == null ? void 0 : lastState.name) !== (parentState == null ? void 0 : parentState.name)));
5901
5915
  if (0)
@@ -6351,8 +6365,8 @@ var require_Theme_native = __commonJS({
6351
6365
  style: {}
6352
6366
  }, Theme = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
6353
6367
  if (props.disable) return props.children;
6354
- var isRoot = !!props._isRoot, [_, themeState] = (0, import_useTheme.useThemeWithState)(props, isRoot), disableDirectChildTheme = props["disable-child-theme"], finalChildren = disableDirectChildTheme ? import_react3.Children.map(props.children, function(child) {
6355
- return /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
6368
+ var { passThrough } = props, isRoot = !!props._isRoot, [_, themeState] = (0, import_useTheme.useThemeWithState)(props, isRoot), disableDirectChildTheme = props["disable-child-theme"], finalChildren = disableDirectChildTheme ? import_react3.Children.map(props.children, function(child) {
6369
+ return passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
6356
6370
  "data-disable-theme": !0
6357
6371
  });
6358
6372
  }) : props.children;
@@ -6365,11 +6379,11 @@ var require_Theme_native = __commonJS({
6365
6379
  var stateRef = (0, import_react3.useRef)({
6366
6380
  hasEverThemed: !1
6367
6381
  });
6368
- return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef);
6382
+ return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);
6369
6383
  });
6370
6384
  Theme.avoidForwardRef = !0;
6371
6385
  function getThemedChildren(themeState, children, props) {
6372
- var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, { shallow, forceClassName } = props, state = stateRef.current, hasEverThemed = state.hasEverThemed, shouldRenderChildrenWithTheme = hasEverThemed || themeState.isNew || isRoot || (0, import_useThemeState.hasThemeUpdatingProps)(props);
6386
+ var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, passThrough = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, { shallow, forceClassName } = props, state = stateRef.current, hasEverThemed = state.hasEverThemed, shouldRenderChildrenWithTheme = hasEverThemed || themeState.isNew || isRoot || (0, import_useThemeState.hasThemeUpdatingProps)(props);
6373
6387
  if (!shouldRenderChildrenWithTheme) return children;
6374
6388
  children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_useThemeState.ThemeStateContext.Provider, {
6375
6389
  value: themeState.id,
@@ -6382,7 +6396,7 @@ var require_Theme_native = __commonJS({
6382
6396
  var parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
6383
6397
  if (!parentState) throw new Error("\u203C\uFE0F010");
6384
6398
  children = import_react3.Children.toArray(children).map(function(child) {
6385
- return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Theme, {
6399
+ return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Theme, {
6386
6400
  name: parentState.name,
6387
6401
  children: child.props.children
6388
6402
  })) : child;
@@ -6393,10 +6407,10 @@ var require_Theme_native = __commonJS({
6393
6407
  var { className, style } = getThemeClassNameAndStyle(themeState, props, isRoot);
6394
6408
  if (children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
6395
6409
  className: `${className} _dsp_contents is_Theme`,
6396
- style,
6410
+ style: passThrough ? void 0 : style,
6397
6411
  children
6398
6412
  }), state.hasEverThemed === "wrapped") {
6399
- var className1 = requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
6413
+ var className1 = !passThrough && requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
6400
6414
  children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
6401
6415
  className: className1,
6402
6416
  children
@@ -6816,7 +6830,7 @@ var require_useComponentState_native = __commonJS({
6816
6830
  }
6817
6831
  var isDisabled = function(props) {
6818
6832
  var _props_accessibilityState;
6819
- return props.disabled || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
6833
+ return props.disabled || props.passThrough || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
6820
6834
  };
6821
6835
  }
6822
6836
  });
@@ -7105,7 +7119,7 @@ var require_createComponent_native = __commonJS({
7105
7119
  });
7106
7120
  var allGroupContexts = (0, import_react3.useMemo)(function() {
7107
7121
  var _stateRef_current_group;
7108
- if (!groupName) return groupContextParent;
7122
+ if (!groupName || props.passThrough) return groupContextParent;
7109
7123
  (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
7110
7124
  var listeners = /* @__PURE__ */ new Set();
7111
7125
  return stateRef.current.group = {
@@ -7178,7 +7192,7 @@ var require_createComponent_native = __commonJS({
7178
7192
  willBeAnimated,
7179
7193
  styledContextProps
7180
7194
  }, 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;
7181
- if (groupContext) {
7195
+ if (splitStyles && groupContext) {
7182
7196
  var groupState = groupContext == null ? void 0 : groupContext.state;
7183
7197
  if (groupState && groupState.layout === void 0) {
7184
7198
  var _splitStyles_style, _splitStyles_style1;
@@ -7188,8 +7202,8 @@ var require_createComponent_native = __commonJS({
7188
7202
  });
7189
7203
  }
7190
7204
  }
7191
- if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
7192
- var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
7205
+ if (splitStyles && (!hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
7206
+ var useStyleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
7193
7207
  stateRef.current.setStateShallow = function(nextOrGetNext) {
7194
7208
  var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
7195
7209
  if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
@@ -7203,9 +7217,9 @@ var require_createComponent_native = __commonJS({
7203
7217
  };
7204
7218
  NextState.set(stateRef, updatedState);
7205
7219
  var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
7206
- if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !styleListener) return;
7220
+ if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !useStyleListener) return;
7207
7221
  var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
7208
- styleListener(nextStyles.style);
7222
+ useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
7209
7223
  } else ogSetStateShallow(next);
7210
7224
  }
7211
7225
  }, setStateShallow = function(state2) {
@@ -7213,14 +7227,16 @@ var require_createComponent_native = __commonJS({
7213
7227
  (_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
7214
7228
  };
7215
7229
  }
7216
- if (props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
7217
- var _splitStyles;
7218
- (_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
7230
+ if (splitStyles) {
7231
+ if (props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
7232
+ var _splitStyles;
7233
+ (_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
7234
+ }
7235
+ splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
7219
7236
  }
7220
- splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
7221
- var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
7237
+ var hasRuntimeMediaKeys = (splitStyles == null ? void 0 : splitStyles.hasMedia) && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && (splitStyles == null ? void 0 : splitStyles.hasMedia) === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
7222
7238
  (0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
7223
- var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
7239
+ var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space, pseudoGroups, mediaGroups } = splitStyles || {}, propsWithAnimation = props, {
7224
7240
  asChild,
7225
7241
  children,
7226
7242
  themeShallow,
@@ -7244,7 +7260,7 @@ var require_createComponent_native = __commonJS({
7244
7260
  onClick,
7245
7261
  theme: _themeProp,
7246
7262
  ...nonTamaguiProps
7247
- } = viewPropsIn, viewProps = nonTamaguiProps;
7263
+ } = viewPropsIn || {}, viewProps = nonTamaguiProps;
7248
7264
  !isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
7249
7265
  var animationStyles, shouldUseAnimation = (
7250
7266
  // if it supports css vars we run it on server too to get matching initial style
@@ -7268,9 +7284,9 @@ var require_createComponent_native = __commonJS({
7268
7284
  staticConfig,
7269
7285
  stateRef
7270
7286
  });
7271
- isHydrated && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`), animations.ref && (animatedRef = animations.ref));
7287
+ 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}`)));
7272
7288
  }
7273
- groupContext && (nonTamaguiProps.onLayout = (0, import_helpers2.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
7289
+ splitStyles && groupContext && (nonTamaguiProps.onLayout = (0, import_helpers2.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
7274
7290
  var _stateRef_current_group, layout = e.nativeEvent.layout;
7275
7291
  groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
7276
7292
  layout
@@ -7282,7 +7298,7 @@ var require_createComponent_native = __commonJS({
7282
7298
  })), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, stateRef.current.willHydrate)) || nonTamaguiProps, stateRef.current.composedRef || (stateRef.current.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
7283
7299
  return stateRef.current.host = x;
7284
7300
  }, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref = stateRef.current.composedRef;
7285
- var { pseudoGroups, mediaGroups } = splitStyles, unPress = function() {
7301
+ var unPress = function() {
7286
7302
  setStateShallow({
7287
7303
  press: !1,
7288
7304
  pressIn: !1
@@ -7398,7 +7414,7 @@ var require_createComponent_native = __commonJS({
7398
7414
  });
7399
7415
  }
7400
7416
  (_hooks_useEvents = import_setupHooks.hooks.useEvents) === null || _hooks_useEvents === void 0 || _hooks_useEvents.call(import_setupHooks.hooks, viewProps, events, splitStyles, setStateShallow, staticConfig);
7401
- var direction = props.spaceDirection || "both", content = !children || asChild ? children : spacedChildren({
7417
+ var direction = props.spaceDirection || "both", content = !children || asChild || !splitStyles ? children : spacedChildren({
7402
7418
  separator,
7403
7419
  children,
7404
7420
  space,
@@ -7412,9 +7428,19 @@ var require_createComponent_native = __commonJS({
7412
7428
  onLongPress
7413
7429
  });
7414
7430
  var useChildrenResult;
7415
- import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
7416
- var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
7417
- if (ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
7431
+ import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), splitStyles || (elementType = "span", content = propsIn.children, viewProps = {
7432
+ style: {
7433
+ display: "contents"
7434
+ }
7435
+ }), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
7436
+ var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence, needsReset = !!// not when passing down to child
7437
+ (!asChild && // not when passThrough
7438
+ splitStyles && // not when HOC
7439
+ !isHOC && ResetPresence && willBeAnimated && (hasEnterStyle || presenceState)), hasEverReset = stateRef.current.hasEverResetPresence;
7440
+ needsReset && !hasEverReset && (stateRef.current.hasEverResetPresence = !0);
7441
+ var renderReset = needsReset || hasEverReset;
7442
+ if (renderReset && ResetPresence && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
7443
+ disabled: !needsReset,
7418
7444
  children: content
7419
7445
  })), "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
7420
7446
  ...componentContext,
@@ -7423,7 +7449,7 @@ var require_createComponent_native = __commonJS({
7423
7449
  })), "group" in props && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_GroupContext.GroupContext.Provider, {
7424
7450
  value: allGroupContexts,
7425
7451
  children: content
7426
- })), content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), staticConfig.context) {
7452
+ })), content = disableTheme || !splitStyles ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), staticConfig.context) {
7427
7453
  var contextProps = staticConfig.context.props;
7428
7454
  for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
7429
7455
  var _viewProps_style;
@@ -7474,7 +7500,7 @@ var require_createComponent_native = __commonJS({
7474
7500
  }
7475
7501
  function styleable(Component2, options) {
7476
7502
  var _Component_render, skipForwardRef = import_constants.IS_REACT_19 && typeof Component2 == "function" && Component2.length === 1 || ((_Component_render = Component2.render) === null || _Component_render === void 0 ? void 0 : _Component_render.length) === 2, out = skipForwardRef ? Component2 : /* @__PURE__ */ import_react3.default.forwardRef(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
7477
- return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig, !0), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ import_react3.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
7503
+ return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig, !0), (extendedConfig.memo || process.env.TAMAGUI_MEMOIZE_STYLEABLE) && (out = /* @__PURE__ */ import_react3.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
7478
7504
  }
7479
7505
  return res.extractable = extractable, res.styleable = styleable, res;
7480
7506
  }
@@ -9429,7 +9455,7 @@ var require_useProps_native = __commonJS({
9429
9455
  noClass: !0,
9430
9456
  resolveValues: "auto",
9431
9457
  ...opts
9432
- }, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
9458
+ }, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles || {};
9433
9459
  return (0, import_constants.useIsomorphicLayoutEffect)(function() {
9434
9460
  if (!disabled) {
9435
9461
  if (state.unmounted) {
@@ -9455,8 +9481,8 @@ var require_useProps_native = __commonJS({
9455
9481
  ...mediaGroups
9456
9482
  ]).join("") : 0
9457
9483
  ]), [
9458
- splitStyles.viewProps,
9459
- splitStyles.style || {},
9484
+ (splitStyles == null ? void 0 : splitStyles.viewProps) || {},
9485
+ (splitStyles == null ? void 0 : splitStyles.style) || {},
9460
9486
  theme,
9461
9487
  import_useMedia.mediaState
9462
9488
  ];
@@ -11722,7 +11748,7 @@ var require_index_native12 = __commonJS({
11722
11748
  getBoundingClientRectAsync(node),
11723
11749
  getBoundingClientRectAsync(parentNode)
11724
11750
  ]);
11725
- if (frameId !== lastFrameAt) return;
11751
+ if (nr === !1 || pr === !1 || frameId !== lastFrameAt) return;
11726
11752
  nodeRect = nr, parentRect = pr;
11727
11753
  } else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
11728
11754
  var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
@@ -11825,7 +11851,7 @@ var require_index_native12 = __commonJS({
11825
11851
  return new Promise(function(res) {
11826
11852
  if (!(!node || node.nodeType !== 1)) {
11827
11853
  var io = new IntersectionObserver(function(entries) {
11828
- return io.disconnect(), res(entries[0].boundingClientRect);
11854
+ return entries[0].isIntersecting ? (io.disconnect(), res(entries[0].boundingClientRect)) : res(!1);
11829
11855
  }, {
11830
11856
  threshold: 0
11831
11857
  });
@@ -12145,8 +12171,7 @@ var TamaguiProvider = function(props) {
12145
12171
  var download, rel, target;
12146
12172
  }
12147
12173
  },
12148
- useEvents(viewProps, events, param, setStateShallow, staticConfig) {
12149
- var { pseudos } = param;
12174
+ useEvents(viewProps, events, splitStyles, setStateShallow, staticConfig) {
12150
12175
  if (events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur)), staticConfig.isInput) {
12151
12176
  if (events) {
12152
12177
  var { onPressIn, onPressOut, onPress } = events, inputEvents = {