tamagui 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.
package/dist/native.js CHANGED
@@ -289,8 +289,9 @@ var require_PresenceContext_native = __commonJS({
289
289
  });
290
290
  module2.exports = __toCommonJS2(PresenceContext_exports);
291
291
  var import_jsx_runtime6 = require("react/jsx-runtime"), React4 = __toESM2(require("react")), PresenceContext2 = /* @__PURE__ */ React4.createContext(null), ResetPresence2 = function(props) {
292
+ var parent = React4.useContext(PresenceContext2);
292
293
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PresenceContext2.Provider, {
293
- value: null,
294
+ value: props.disable ? parent : null,
294
295
  children: props.children
295
296
  });
296
297
  };
@@ -635,9 +636,12 @@ var require_AnimatePresence_native = __commonJS({
635
636
  }), filtered;
636
637
  }
637
638
  var AnimatePresence = function(param) {
638
- var { children, enterVariant, exitVariant, enterExitVariant, initial = !0, onExitComplete, exitBeforeEnter, presenceAffectsLayout = !0, custom } = param, _useContext_forceRender, forceRender = (_useContext_forceRender = (0, import_react3.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : (0, import_use_force_update.useForceUpdate)(), filteredChildren = onlyElements(children), presentChildren = (0, import_react3.useRef)(filteredChildren), allChildren = (0, import_react3.useRef)(/* @__PURE__ */ new Map()).current, exiting = (0, import_react3.useRef)(/* @__PURE__ */ new Set()).current;
639
+ var { children, enterVariant, exitVariant, enterExitVariant, initial = !0, onExitComplete, exitBeforeEnter, presenceAffectsLayout = !0, custom, passThrough } = param, _useContext_forceRender, forceRender = (_useContext_forceRender = (0, import_react3.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : (0, import_use_force_update.useForceUpdate)(), filteredChildren = onlyElements(children), presentChildren = (0, import_react3.useRef)(filteredChildren), allChildren = (0, import_react3.useRef)(/* @__PURE__ */ new Map()).current, exiting = (0, import_react3.useRef)(/* @__PURE__ */ new Set()).current;
639
640
  updateChildLookup(filteredChildren, allChildren);
640
641
  var isInitialRender = (0, import_react3.useRef)(!0);
642
+ if (passThrough) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
643
+ children
644
+ });
641
645
  if (isInitialRender.current) return isInitialRender.current = !1, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
642
646
  children: filteredChildren.map(function(child) {
643
647
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_PresenceChild.PresenceChild, {
@@ -6544,7 +6548,8 @@ var require_getSplitStyles_native = __commonJS({
6544
6548
  ...styleState.usedKeys
6545
6549
  },
6546
6550
  parentStaticConfig
6547
- })), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !noSkip && keyInit in import_skipProps.skipProps) return "continue";
6551
+ })), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), !isVariant)) return "continue";
6552
+ if (!noSkip && keyInit in import_skipProps.skipProps) return process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), "continue";
6548
6553
  (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
6549
6554
  var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
6550
6555
  if ((0, import_propMapper.propMapper)(keyInit, valInit, styleState, disablePropMap, function(key4, val2) {
@@ -6788,6 +6793,7 @@ var require_getSplitStyles_native = __commonJS({
6788
6793
  };
6789
6794
  conf = conf || (0, import_config.getConfig)();
6790
6795
  var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
6796
+ if (props.passThrough) return null;
6791
6797
  import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
6792
6798
  var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
6793
6799
  process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
@@ -7095,20 +7101,29 @@ var require_mergeProps_native = __commonJS({
7095
7101
  var out = {};
7096
7102
  for (var key in a) mergeProp(out, a, b, key, inverseShorthands);
7097
7103
  if (b) for (var key1 in b) mergeProp(out, b, void 0, key1, inverseShorthands);
7104
+ if (b && Object.keys(b).length > 0) {
7105
+ var hasPropsNeedingReorder = Object.keys(b).some(function(key4) {
7106
+ return (key4 in import_pseudoDescriptors.pseudoDescriptors || key4 === "variant") && key4 in a && key4 in out;
7107
+ });
7108
+ if (hasPropsNeedingReorder) {
7109
+ var reordered = {};
7110
+ for (var key2 in b) (key2 in import_pseudoDescriptors.pseudoDescriptors || key2 === "variant") && key2 in out && (reordered[key2] = out[key2]);
7111
+ for (var key3 in out) key3 in reordered || (reordered[key3] = out[key3]);
7112
+ return reordered;
7113
+ }
7114
+ }
7098
7115
  return out;
7099
7116
  };
7100
7117
  function mergeProp(out, a, b, key, inverseShorthands) {
7101
7118
  var longhand = (inverseShorthands == null ? void 0 : inverseShorthands[key]) || null, val = a[key];
7102
- if (!(b && (key in b || longhand && longhand in b))) {
7103
- if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
7104
- out[key] = {
7105
- ...out[key],
7106
- ...val
7107
- };
7108
- return;
7109
- }
7110
- out[longhand || key] = val;
7119
+ if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
7120
+ out[key] = {
7121
+ ...out[key],
7122
+ ...val
7123
+ };
7124
+ return;
7111
7125
  }
7126
+ b && (key in b || longhand && longhand in b) || (out[longhand || key] = val);
7112
7127
  }
7113
7128
  }
7114
7129
  });
@@ -7349,7 +7364,7 @@ var require_useThemeState_native = __commonJS({
7349
7364
  id,
7350
7365
  parentId
7351
7366
  ]), propsKey = getPropsKey(props), getSnapshot = function() {
7352
- 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));
7367
+ 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));
7353
7368
  return PendingUpdate.delete(id), (!local || rerender) && (local = {
7354
7369
  ...next
7355
7370
  }, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && (console.groupCollapsed(` ${id} getSnapshot ${rerender}`, local.name, ">", next.name), console.info({
@@ -7384,6 +7399,10 @@ var require_useThemeState_native = __commonJS({
7384
7399
  ]), state;
7385
7400
  }, getNextState = function(lastState, props, propsKey) {
7386
7401
  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);
7402
+ if (props.passThrough) return [
7403
+ !1,
7404
+ lastState ?? parentState
7405
+ ];
7387
7406
  themes || (themes = (0, import_config.getConfig)().themes);
7388
7407
  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)));
7389
7408
  if (process.env.NODE_ENV === "development" && debug && debug !== "profile") {
@@ -7855,8 +7874,8 @@ var require_Theme_native = __commonJS({
7855
7874
  style: {}
7856
7875
  }, Theme2 = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
7857
7876
  if (props.disable) return props.children;
7858
- 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) {
7859
- return /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
7877
+ 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) {
7878
+ return passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
7860
7879
  "data-disable-theme": !0
7861
7880
  });
7862
7881
  }) : props.children;
@@ -7869,11 +7888,11 @@ var require_Theme_native = __commonJS({
7869
7888
  var stateRef = (0, import_react3.useRef)({
7870
7889
  hasEverThemed: !1
7871
7890
  });
7872
- return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef);
7891
+ return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);
7873
7892
  });
7874
7893
  Theme2.avoidForwardRef = !0;
7875
7894
  function getThemedChildren(themeState, children, props) {
7876
- 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);
7895
+ 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);
7877
7896
  if (process.env.NODE_ENV === "development" && props.debug === "visualize" && (children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeDebug.ThemeDebug, {
7878
7897
  themeState,
7879
7898
  themeProps: props,
@@ -7890,7 +7909,7 @@ var require_Theme_native = __commonJS({
7890
7909
  var parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
7891
7910
  if (!parentState) throw new Error("\u203C\uFE0F010");
7892
7911
  children = import_react3.Children.toArray(children).map(function(child) {
7893
- return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, {
7912
+ return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, {
7894
7913
  name: parentState.name,
7895
7914
  children: child.props.children
7896
7915
  })) : child;
@@ -7907,10 +7926,10 @@ var require_Theme_native = __commonJS({
7907
7926
  var { className, style } = getThemeClassNameAndStyle(themeState, props, isRoot);
7908
7927
  if (children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
7909
7928
  className: `${className} _dsp_contents is_Theme`,
7910
- style,
7929
+ style: passThrough ? void 0 : style,
7911
7930
  children
7912
7931
  }), state.hasEverThemed === "wrapped") {
7913
- var className1 = requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
7932
+ var className1 = !passThrough && requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
7914
7933
  children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
7915
7934
  className: className1,
7916
7935
  children
@@ -8335,7 +8354,7 @@ var require_useComponentState_native = __commonJS({
8335
8354
  }
8336
8355
  var isDisabled = function(props) {
8337
8356
  var _props_accessibilityState;
8338
- return props.disabled || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
8357
+ 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;
8339
8358
  };
8340
8359
  }
8341
8360
  });
@@ -8628,16 +8647,22 @@ var require_createComponent_native = __commonJS({
8628
8647
  curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
8629
8648
  var componentName2 = props.componentName || staticConfig.componentName;
8630
8649
  process.env.NODE_ENV === "development" && import_constants4.isClient && import_react3.default.useEffect(function() {
8631
- var overlay = null, debugVisualizerHandler = function() {
8632
- var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = stateRef.current.host;
8633
- if (node) if (show) {
8634
- overlay = document.createElement("span"), overlay.style.inset = "0px", overlay.style.zIndex = "1000000", overlay.style.position = "absolute", overlay.style.borderColor = "red", overlay.style.borderWidth = "1px", overlay.style.borderStyle = "dotted";
8650
+ var node, overlay = null, remove = function() {
8651
+ if (overlay) try {
8652
+ var _overlay_parentNode;
8653
+ (_overlay_parentNode = overlay.parentNode) === null || _overlay_parentNode === void 0 || _overlay_parentNode.removeChild(overlay), overlay = null;
8654
+ } catch {
8655
+ }
8656
+ }, debugVisualizerHandler = function() {
8657
+ var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
8658
+ if (node = stateRef.current.host, !!node) if (show) {
8659
+ overlay || (overlay = document.createElement("span"), overlay.style.inset = "0px", overlay.style.zIndex = "1000000", overlay.style.position = "absolute", overlay.style.borderColor = "red", overlay.style.borderWidth = "1px", overlay.style.borderStyle = "dotted");
8635
8660
  var dataAt = node.getAttribute("data-at") || "", dataIn = node.getAttribute("data-in") || "", tooltip = document.createElement("span");
8636
- tooltip.style.position = "absolute", tooltip.style.top = "0px", tooltip.style.left = "0px", tooltip.style.padding = "3px", tooltip.style.background = "rgba(0,0,0,0.75)", tooltip.style.color = "rgba(255,255,255,1)", tooltip.style.fontSize = "12px", tooltip.style.lineHeight = "12px", tooltip.style.fontFamily = "monospace", tooltip.style.webkitFontSmoothing = "none", tooltip.innerText = `${componentName2 || ""} ${dataAt} ${dataIn}`.trim(), overlay.appendChild(tooltip), node.appendChild(overlay);
8637
- } else overlay && node.removeChild(overlay);
8661
+ tooltip.style.position = "absolute", tooltip.style.top = "0px", tooltip.style.left = "0px", tooltip.style.padding = "3px", tooltip.style.background = "rgba(0,0,0,0.75)", tooltip.style.color = "rgba(255,255,255,1)", tooltip.style.fontSize = "12px", tooltip.style.lineHeight = "12px", tooltip.style.fontFamily = "monospace", tooltip.innerText = `${componentName2 || ""} ${dataAt} ${dataIn}`.trim(), overlay.appendChild(tooltip), node.appendChild(overlay);
8662
+ } else remove();
8638
8663
  };
8639
8664
  return debugKeyListeners || (debugKeyListeners = /* @__PURE__ */ new Set()), debugKeyListeners.add(debugVisualizerHandler), function() {
8640
- debugKeyListeners == null || debugKeyListeners.delete(debugVisualizerHandler);
8665
+ remove(), debugKeyListeners == null || debugKeyListeners.delete(debugVisualizerHandler);
8641
8666
  };
8642
8667
  }, [
8643
8668
  componentName2
@@ -8649,7 +8674,7 @@ var require_createComponent_native = __commonJS({
8649
8674
  });
8650
8675
  var allGroupContexts = (0, import_react3.useMemo)(function() {
8651
8676
  var _stateRef_current_group;
8652
- if (!groupName) return groupContextParent;
8677
+ if (!groupName || props.passThrough) return groupContextParent;
8653
8678
  (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
8654
8679
  var listeners = /* @__PURE__ */ new Set();
8655
8680
  return stateRef.current.group = {
@@ -8752,7 +8777,7 @@ var require_createComponent_native = __commonJS({
8752
8777
  }, themeName = (themeState == null ? void 0 : themeState.name) || "";
8753
8778
  process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
8754
8779
  var 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;
8755
- if (groupContext) {
8780
+ if (splitStyles && groupContext) {
8756
8781
  var groupState = groupContext == null ? void 0 : groupContext.state;
8757
8782
  if (groupState && groupState.layout === void 0) {
8758
8783
  var _splitStyles_style, _splitStyles_style1;
@@ -8762,8 +8787,8 @@ var require_createComponent_native = __commonJS({
8762
8787
  });
8763
8788
  }
8764
8789
  }
8765
- if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
8766
- var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
8790
+ if (splitStyles && (!hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
8791
+ var useStyleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
8767
8792
  stateRef.current.setStateShallow = function(nextOrGetNext) {
8768
8793
  var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
8769
8794
  if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
@@ -8780,9 +8805,9 @@ var require_createComponent_native = __commonJS({
8780
8805
  props
8781
8806
  }), console.info(stateRef.current.host), console.groupEnd());
8782
8807
  var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
8783
- if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !styleListener) return;
8808
+ if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !useStyleListener) return;
8784
8809
  var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
8785
- styleListener(nextStyles.style);
8810
+ useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
8786
8811
  } else process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && console.info("[\u{1F40C}] re-render", {
8787
8812
  canAvoidReRender,
8788
8813
  next
@@ -8793,14 +8818,16 @@ var require_createComponent_native = __commonJS({
8793
8818
  (_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
8794
8819
  };
8795
8820
  }
8796
- if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
8797
- var _splitStyles;
8798
- (_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
8821
+ if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, splitStyles) {
8822
+ if (props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
8823
+ var _splitStyles;
8824
+ (_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
8825
+ }
8826
+ splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
8799
8827
  }
8800
- splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
8801
- var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
8828
+ 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;
8802
8829
  process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
8803
- var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
8830
+ var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space, pseudoGroups, mediaGroups } = splitStyles || {}, propsWithAnimation = props, {
8804
8831
  asChild,
8805
8832
  children,
8806
8833
  themeShallow,
@@ -8824,7 +8851,7 @@ var require_createComponent_native = __commonJS({
8824
8851
  onClick,
8825
8852
  theme: _themeProp,
8826
8853
  ...nonTamaguiProps
8827
- } = viewPropsIn, viewProps = nonTamaguiProps;
8854
+ } = viewPropsIn || {}, viewProps = nonTamaguiProps;
8828
8855
  !isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
8829
8856
  var animationStyles, shouldUseAnimation = (
8830
8857
  // if it supports css vars we run it on server too to get matching initial style
@@ -8848,11 +8875,11 @@ var require_createComponent_native = __commonJS({
8848
8875
  staticConfig,
8849
8876
  stateRef
8850
8877
  });
8851
- 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)), process.env.NODE_ENV === "development" && time2 && time2`animations`;
8878
+ 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}`))), process.env.NODE_ENV === "development" && time2 && time2`animations`;
8852
8879
  }
8853
8880
  process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
8854
8881
 
8855
- If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`, groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
8882
+ If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`, splitStyles && groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
8856
8883
  var _stateRef_current_group, layout = e.nativeEvent.layout;
8857
8884
  groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
8858
8885
  layout
@@ -8867,7 +8894,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8867
8894
  typeof item == "string" && item !== `
8868
8895
  ` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
8869
8896
  }), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
8870
- var { pseudoGroups, mediaGroups } = splitStyles, unPress = function() {
8897
+ var unPress = function() {
8871
8898
  setStateShallow({
8872
8899
  press: !1,
8873
8900
  pressIn: !1
@@ -8881,7 +8908,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8881
8908
  styleObject[prop] = style.getPropertyValue(prop);
8882
8909
  }
8883
8910
  return styleObject;
8884
- }, cssStyleDeclarationToObject = cssStyleDeclarationToObject2, computed = cssStyleDeclarationToObject2(getComputedStyle(stateRef.current.host));
8911
+ }, cssStyleDeclarationToObject = cssStyleDeclarationToObject2, computed = stateRef.current.host ? cssStyleDeclarationToObject2(getComputedStyle(stateRef.current.host)) : {};
8885
8912
  console.groupCollapsed(`Rendered > (opacity: ${computed.opacity})`), console.warn(stateRef.current.host), console.warn(computed), console.groupEnd();
8886
8913
  }
8887
8914
  }), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
@@ -9013,7 +9040,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9013
9040
  }), (_hooks_useEvents = import_setupHooks.hooks.useEvents) === null || _hooks_useEvents === void 0 || _hooks_useEvents.call(import_setupHooks.hooks, viewProps, events, splitStyles, setStateShallow, staticConfig);
9014
9041
  var direction = props.spaceDirection || "both";
9015
9042
  process.env.NODE_ENV === "development" && time2 && time2`hooks`;
9016
- var content = !children || asChild ? children : spacedChildren2({
9043
+ var content = !children || asChild || !splitStyles ? children : spacedChildren2({
9017
9044
  separator,
9018
9045
  children,
9019
9046
  space,
@@ -9028,9 +9055,19 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9028
9055
  });
9029
9056
  process.env.NODE_ENV === "development" && time2 && time2`spaced-as-child`;
9030
9057
  var useChildrenResult;
9031
- import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), process.env.NODE_ENV === "development" && time2 && time2`use-children`, useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
9032
- var ResetPresence2 = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
9033
- if (ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
9058
+ import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), process.env.NODE_ENV === "development" && time2 && time2`use-children`, splitStyles || (elementType = "span", content = propsIn.children, viewProps = {
9059
+ style: {
9060
+ display: "contents"
9061
+ }
9062
+ }), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
9063
+ var ResetPresence2 = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence, needsReset = !!// not when passing down to child
9064
+ (!asChild && // not when passThrough
9065
+ splitStyles && // not when HOC
9066
+ !isHOC && ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState)), hasEverReset = stateRef.current.hasEverResetPresence;
9067
+ needsReset && !hasEverReset && (stateRef.current.hasEverResetPresence = !0);
9068
+ var renderReset = needsReset || hasEverReset;
9069
+ if (renderReset && ResetPresence2 && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
9070
+ disabled: !needsReset,
9034
9071
  children: content
9035
9072
  })), process.env.NODE_ENV === "development" && time2 && time2`create-element`, "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
9036
9073
  ...componentContext,
@@ -9039,7 +9076,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9039
9076
  })), "group" in props && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GroupContext.GroupContext.Provider, {
9040
9077
  value: allGroupContexts,
9041
9078
  children: content
9042
- })), process.env.NODE_ENV === "development" && time2 && time2`group-context`, content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), process.env.NODE_ENV === "development" && time2 && time2`themed-children`, staticConfig.context) {
9079
+ })), process.env.NODE_ENV === "development" && time2 && time2`group-context`, content = disableTheme || !splitStyles ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), process.env.NODE_ENV === "development" && time2 && time2`themed-children`, staticConfig.context) {
9043
9080
  var contextProps = staticConfig.context.props;
9044
9081
  for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
9045
9082
  var _viewProps_style;
@@ -9130,7 +9167,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
9130
9167
  }
9131
9168
  function styleable(Component2, options) {
9132
9169
  var _Component_render, skipForwardRef = import_constants4.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);
9133
- 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;
9170
+ 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;
9134
9171
  }
9135
9172
  return res.extractable = extractable, res.styleable = styleable, res;
9136
9173
  }
@@ -11089,7 +11126,7 @@ var require_useProps_native = __commonJS({
11089
11126
  noClass: !0,
11090
11127
  resolveValues: "auto",
11091
11128
  ...opts
11092
- }, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
11129
+ }, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles || {};
11093
11130
  return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
11094
11131
  if (!disabled) {
11095
11132
  if (state.unmounted) {
@@ -11115,8 +11152,8 @@ var require_useProps_native = __commonJS({
11115
11152
  ...mediaGroups
11116
11153
  ]).join("") : 0
11117
11154
  ]), [
11118
- splitStyles.viewProps,
11119
- splitStyles.style || {},
11155
+ (splitStyles == null ? void 0 : splitStyles.viewProps) || {},
11156
+ (splitStyles == null ? void 0 : splitStyles.style) || {},
11120
11157
  theme,
11121
11158
  import_useMedia.mediaState
11122
11159
  ];
@@ -13407,7 +13444,7 @@ var require_index_native19 = __commonJS({
13407
13444
  getBoundingClientRectAsync(node),
13408
13445
  getBoundingClientRectAsync(parentNode)
13409
13446
  ]);
13410
- if (frameId !== lastFrameAt) return;
13447
+ if (nr === !1 || pr === !1 || frameId !== lastFrameAt) return;
13411
13448
  nodeRect = nr, parentRect = pr;
13412
13449
  } else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
13413
13450
  var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
@@ -13510,7 +13547,7 @@ var require_index_native19 = __commonJS({
13510
13547
  return new Promise(function(res) {
13511
13548
  if (!(!node || node.nodeType !== 1)) {
13512
13549
  var io = new IntersectionObserver(function(entries) {
13513
- return io.disconnect(), res(entries[0].boundingClientRect);
13550
+ return entries[0].isIntersecting ? (io.disconnect(), res(entries[0].boundingClientRect)) : res(!1);
13514
13551
  }, {
13515
13552
  threshold: 0
13516
13553
  });
@@ -14119,8 +14156,7 @@ var require_index_native20 = __commonJS({
14119
14156
  if (isDOM && plainDOMProps.href && hrefAttrs) var download, rel, target;
14120
14157
  }
14121
14158
  },
14122
- useEvents(viewProps, events, param, setStateShallow, staticConfig) {
14123
- var { pseudos } = param;
14159
+ useEvents(viewProps, events, splitStyles, setStateShallow, staticConfig) {
14124
14160
  if (events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur)), staticConfig.isInput) {
14125
14161
  if (events) {
14126
14162
  var { onPressIn, onPressOut, onPress } = events, inputEvents = {
@@ -16641,7 +16677,7 @@ var require_GorhomPortalItem_native = __commonJS({
16641
16677
  });
16642
16678
  module2.exports = __toCommonJS2(GorhomPortalItem_native_exports);
16643
16679
  var import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_react3 = require("react"), import_GorhomPortal = require_GorhomPortal_native(), GorhomPortalItem = function(props) {
16644
- var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passthrough } = props, { addPortal: addUpdatePortal, removePortal } = (0, import_GorhomPortal.usePortal)(hostName), id = (0, import_react3.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(function() {
16680
+ var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props, { addPortal: addUpdatePortal, removePortal } = (0, import_GorhomPortal.usePortal)(hostName), id = (0, import_react3.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(function() {
16645
16681
  _providedHandleOnMount ? _providedHandleOnMount(function() {
16646
16682
  return addUpdatePortal(name, children);
16647
16683
  }) : addUpdatePortal(name, children);
@@ -16655,14 +16691,14 @@ var require_GorhomPortalItem_native = __commonJS({
16655
16691
  }) : addUpdatePortal(name, children);
16656
16692
  });
16657
16693
  return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16658
- if (!passthrough) return handleOnMount(), function() {
16694
+ if (!passThrough) return handleOnMount(), function() {
16659
16695
  handleOnUnmount();
16660
16696
  };
16661
16697
  }, []), (0, import_react3.useEffect)(function() {
16662
- passthrough || handleOnUpdate();
16698
+ passThrough || handleOnUpdate();
16663
16699
  }, [
16664
16700
  children
16665
- ]), passthrough ? children : null;
16701
+ ]), passThrough ? children : null;
16666
16702
  };
16667
16703
  }
16668
16704
  });
@@ -17070,9 +17106,9 @@ var require_Adapt_native = __commonJS({
17070
17106
  }, {
17071
17107
  Contents: AdaptContents
17072
17108
  }), AdaptPortalContents = function(props) {
17073
- var { portalName } = useAdaptContext(props.scope);
17109
+ var isActive = useAdaptIsActive(props.scope), { portalName } = useAdaptContext(props.scope);
17074
17110
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
17075
- // passthrough={!isWeb && !isActive}
17111
+ passThrough: !isActive,
17076
17112
  hostName: portalName,
17077
17113
  children: props.children
17078
17114
  });
@@ -18039,12 +18075,11 @@ var require_useSheetOpenState_native = __commonJS({
18039
18075
  var { isHidden, controller } = (0, import_useSheetController.useSheetController)(), onOpenChangeInternal = function(val) {
18040
18076
  var _controller_onOpenChange, _props_onOpenChange;
18041
18077
  controller == null || (_controller_onOpenChange = controller.onOpenChange) === null || _controller_onOpenChange === void 0 || _controller_onOpenChange.call(controller, val), (_props_onOpenChange = props.onOpenChange) === null || _props_onOpenChange === void 0 || _props_onOpenChange.call(props, val);
18042
- }, _controller_open, _props_defaultOpen, [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
18043
- prop: (_controller_open = controller == null ? void 0 : controller.open) !== null && _controller_open !== void 0 ? _controller_open : props.open,
18078
+ }, _controller_open, propVal = (_controller_open = controller == null ? void 0 : controller.open) !== null && _controller_open !== void 0 ? _controller_open : props.open, _props_defaultOpen, [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
18079
+ prop: propVal,
18044
18080
  defaultProp: (_props_defaultOpen = props.defaultOpen) !== null && _props_defaultOpen !== void 0 ? _props_defaultOpen : !1,
18045
18081
  onChange: onOpenChangeInternal,
18046
- strategy: "most-recent-wins",
18047
- transition: !0
18082
+ strategy: "prop-wins"
18048
18083
  });
18049
18084
  return {
18050
18085
  open,
@@ -18131,8 +18166,7 @@ var require_useSheetProviderProps_native = __commonJS({
18131
18166
  prop: props.position,
18132
18167
  defaultProp: props.defaultPosition || (state.open ? 0 : -1),
18133
18168
  onChange: props.onPositionChange,
18134
- strategy: "most-recent-wins",
18135
- transition: !0
18169
+ strategy: "prop-wins"
18136
18170
  }), position = state.open === !1 ? -1 : position_, { open } = state, setPosition = import_react3.default.useCallback(function(next) {
18137
18171
  props.dismissOnSnapToBottom && next === snapPoints.length - 1 ? state.setOpen(!1) : setPositionImmediate(next);
18138
18172
  }, [
@@ -18553,27 +18587,26 @@ var require_SheetImplementationCustom_native = __commonJS({
18553
18587
  ...animationConfig
18554
18588
  }));
18555
18589
  }
18556
- });
18590
+ }), isAbleToPosition = /* @__PURE__ */ function() {
18591
+ return !(disableAnimation || !frameSize || !screenSize || isHidden || hasntMeasured && !open);
18592
+ }();
18557
18593
  (0, import_constants4.useIsomorphicLayoutEffect)(function() {
18558
- if (hasntMeasured && screenSize && frameSize) {
18559
- at.current = screenSize, animatedNumber.setValue(screenSize, {
18560
- type: "timing",
18561
- duration: 0
18562
- }, function() {
18563
- setTimeout(function() {
18564
- setDisableAnimation(!1);
18565
- }, 10);
18566
- });
18567
- return;
18568
- }
18569
- disableAnimation || !frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
18594
+ hasntMeasured && screenSize && frameSize && (at.current = screenSize, animatedNumber.setValue(screenSize, {
18595
+ type: "timing",
18596
+ duration: 0
18597
+ }, function() {
18598
+ setTimeout(function() {
18599
+ setDisableAnimation(!1);
18600
+ }, 10);
18601
+ }));
18570
18602
  }, [
18571
18603
  hasntMeasured,
18572
- disableAnimation,
18573
- isHidden,
18574
- frameSize,
18575
18604
  screenSize,
18576
- open,
18605
+ frameSize
18606
+ ]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
18607
+ isAbleToPosition && animateTo(position);
18608
+ }, [
18609
+ isAbleToPosition,
18577
18610
  position
18578
18611
  ]);
18579
18612
  var _props_disableDrag, disableDrag = (_props_disableDrag = props.disableDrag) !== null && _props_disableDrag !== void 0 ? _props_disableDrag : controller == null ? void 0 : controller.disableDrag, themeName = (0, import_core12.useThemeName)(), [isDragging, setIsDragging] = import_react3.default.useState(!1), scrollEnabled = (0, import_react3.useRef)(!0), setScrollEnabled = import_react3.default.useCallback(function(val) {
@@ -18588,12 +18621,14 @@ var require_SheetImplementationCustom_native = __commonJS({
18588
18621
  }
18589
18622
  var release = function(param) {
18590
18623
  var { vy, dragAt } = param;
18591
- isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
18592
- for (var at2 = dragAt + startY, end = at2 + frameSize * vy * 0.2, closestPoint = 0, dist = Number.POSITIVE_INFINITY, i = 0; i < positions.length; i++) {
18593
- var position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
18594
- curDist < dist && (dist = curDist, closestPoint = i);
18624
+ if (!scrollBridge.scrollLock) {
18625
+ isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
18626
+ for (var at2 = dragAt + startY, end = at2 + frameSize * vy * 0.2, closestPoint = 0, dist = Number.POSITIVE_INFINITY, i = 0; i < positions.length; i++) {
18627
+ var position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
18628
+ curDist < dist && (dist = curDist, closestPoint = i);
18629
+ }
18630
+ setPosition(closestPoint), animateTo(closestPoint), setScrollEnabled(closestPoint === 0);
18595
18631
  }
18596
- setPosition(closestPoint), animateTo(closestPoint), setScrollEnabled(closestPoint === 0 && dragAt <= 0);
18597
18632
  }, finish = function(_e, state2) {
18598
18633
  release({
18599
18634
  vy: state2.vy,
@@ -18601,10 +18636,13 @@ var require_SheetImplementationCustom_native = __commonJS({
18601
18636
  });
18602
18637
  }, previouslyScrolling = !1, onMoveShouldSet = function(e, param) {
18603
18638
  var { dy } = param;
18604
- if (e.target === providerProps.handleRef.current || !scrollEnabled.current) return !0;
18605
- if (scrollBridge.scrollLock) return !1;
18606
- var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
18607
- return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && scrollEnabled.current && hasScrollView.current && isDraggingUp ? !1 : Math.abs(dy) > 10;
18639
+ function getShouldSet() {
18640
+ if (e.target === providerProps.handleRef.current || !scrollEnabled.current) return !0;
18641
+ if (scrollBridge.scrollLock) return !1;
18642
+ var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
18643
+ return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && hasScrollView.current && isDraggingUp ? !1 : Math.abs(dy) > 10;
18644
+ }
18645
+ return getShouldSet();
18608
18646
  }, grant = function() {
18609
18647
  setScrollEnabled(!1), setPanning(!0), stopSpring(), startY = at.current;
18610
18648
  }, isExternalDrag = !1;
@@ -18973,7 +19011,7 @@ var require_SheetScrollView_native = __commonJS({
18973
19011
  }, []);
18974
19012
  var release = function() {
18975
19013
  if (state.current.isDragging) {
18976
- state.current.isDragging = !1, scrollBridge.scrollStartY = -1, state.current.isScrolling = !1, setScrollEnabled(!0);
19014
+ state.current.isDragging = !1, scrollBridge.scrollStartY = -1, scrollBridge.scrollLock = !1, state.current.isScrolling = !1, setScrollEnabled(!0);
18977
19015
  var vy = 0;
18978
19016
  if (state.current.dys.length) {
18979
19017
  var recentDys = state.current.dys.slice(-10), dist = recentDys.length ? recentDys.reduce(function(a, b) {
@@ -19020,15 +19058,12 @@ var require_SheetScrollView_native = __commonJS({
19020
19058
  onResponderMove: function(e) {
19021
19059
  if (import_core12.isWeb) {
19022
19060
  var { pageY } = e.nativeEvent;
19023
- if (state.current.isScrolling) {
19024
- e.stopPropagation();
19025
- return;
19026
- }
19061
+ if (state.current.isScrolling) return;
19027
19062
  scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
19028
19063
  var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
19029
19064
  state.current.lastPageY = pageY;
19030
- var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY;
19031
- if ((dy === 0 || isDraggingUp) && isPaneAtTop) {
19065
+ var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY, shouldScrollLock = (dy === 0 || isDraggingUp) && isPaneAtTop;
19066
+ if (shouldScrollLock) {
19032
19067
  state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
19033
19068
  return;
19034
19069
  }
@@ -19219,14 +19254,7 @@ var require_createSheet_native = __commonJS({
19219
19254
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, {
19220
19255
  children: [
19221
19256
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_remove_scroll.RemoveScroll, {
19222
- forwardProps: !0,
19223
- enabled: removeScrollEnabled,
19224
- allowPinchZoom: !0,
19225
- shards: [
19226
- contentRef
19227
- ],
19228
- // causes lots of bugs on touch web on site
19229
- removeScrollBar: !1,
19257
+ enabled: removeScrollEnabled && context.open,
19230
19258
  children: sheetContents
19231
19259
  }),
19232
19260
  /* below frame hide when bouncing past 100% */
@@ -19559,18 +19587,20 @@ var require_SheetController_native = __commonJS({
19559
19587
  });
19560
19588
  module2.exports = __toCommonJS2(SheetController_exports);
19561
19589
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_core12 = require_index_native20(), import_useSheetController = require_useSheetController_native(), SheetController = function(param) {
19562
- var { children, onOpenChange: onOpenChangeProp, ...value } = param, onOpenChange = (0, import_core12.useEvent)(onOpenChangeProp), memoValue = import_react3.default.useMemo(function() {
19590
+ var { children, onOpenChange: onOpenChangeProp, open, hidden, disableDrag } = param, onOpenChange = (0, import_core12.useEvent)(onOpenChangeProp), id = (0, import_react3.useId)(), memoValue = import_react3.default.useMemo(function() {
19563
19591
  return {
19564
- open: value.open,
19565
- hidden: value.hidden,
19566
- disableDrag: value.disableDrag,
19592
+ id,
19593
+ open,
19594
+ hidden,
19595
+ disableDrag,
19567
19596
  onOpenChange
19568
19597
  };
19569
19598
  }, [
19599
+ id,
19570
19600
  onOpenChange,
19571
- value.open,
19572
- value.hidden,
19573
- value.disableDrag
19601
+ open,
19602
+ hidden,
19603
+ disableDrag
19574
19604
  ]);
19575
19605
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_useSheetController.SheetControllerContext.Provider, {
19576
19606
  value: memoValue,
@@ -19870,14 +19900,7 @@ var require_Dialog_native = __commonJS({
19870
19900
  })
19871
19901
  });
19872
19902
  return !import_constants4.isWeb || context.disableRemoveScroll ? contents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_remove_scroll.RemoveScroll, {
19873
- forwardProps: !0,
19874
19903
  enabled: context.open,
19875
- allowPinchZoom: context.allowPinchZoom,
19876
- shards: [
19877
- context.contentRef
19878
- ],
19879
- // causes lots of bugs on touch web on site
19880
- removeScrollBar: !1,
19881
19904
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
19882
19905
  "data-remove-scroll-container": !0,
19883
19906
  className: "_dsp_contents",
@@ -20046,9 +20069,7 @@ var require_Dialog_native = __commonJS({
20046
20069
  }), TitleWarning = function(param) {
20047
20070
  var { titleId } = param;
20048
20071
  if (process.env.NODE_ENV === "development") {
20049
- var titleWarningContext = useWarningContext(TITLE_WARNING_NAME), MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
20050
-
20051
- If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.`;
20072
+ var titleWarningContext = useWarningContext(TITLE_WARNING_NAME), MESSAGE = `\`${titleWarningContext.contentName}\` wants a \`${titleWarningContext.titleName}\` to be accessible. If you want to hide the \`${titleWarningContext.titleName}\`, wrap it with <VisuallyHidden />.`;
20052
20073
  React4.useEffect(function() {
20053
20074
  if (import_constants4.isWeb && titleId) {
20054
20075
  var hasTitle = document.getElementById(titleId);
@@ -20083,7 +20104,7 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
20083
20104
  }
20084
20105
  return null;
20085
20106
  }, Dialog = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
20086
- var { __scopeDialog, children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0, allowPinchZoom = !1, disableRemoveScroll = !1 } = props, baseId = React4.useId(), scopeId = `scope-${baseId}`, contentId = `content-${baseId}`, titleId = `title-${baseId}`, descriptionId = `description-${baseId}`, scopeKey = __scopeDialog ? Object.keys(__scopeDialog)[0] : scopeId, adaptName = getAdaptName({
20107
+ var { __scopeDialog, children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0, disableRemoveScroll = !1 } = props, baseId = React4.useId(), scopeId = `scope-${baseId}`, contentId = `content-${baseId}`, titleId = `title-${baseId}`, descriptionId = `description-${baseId}`, scopeKey = __scopeDialog ? Object.keys(__scopeDialog)[0] : scopeId, adaptName = getAdaptName({
20087
20108
  scopeKey,
20088
20109
  contentId
20089
20110
  }), triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
@@ -20108,7 +20129,6 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
20108
20129
  onOpenChange: setOpen,
20109
20130
  onOpenToggle,
20110
20131
  modal,
20111
- allowPinchZoom,
20112
20132
  disableRemoveScroll,
20113
20133
  adaptName
20114
20134
  };
@@ -24015,9 +24035,9 @@ var require_Animate_native = __commonJS({
24015
24035
  module2.exports = __toCommonJS2(Animate_exports);
24016
24036
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_animate_presence = require_index_native4(), import_react3 = require("react");
24017
24037
  function Animate(param) {
24018
- var { children, lazyMount, type, present, ...props } = param, [lazyMounted, setLazyMounted] = (0, import_react3.useState)(lazyMount ? !1 : present);
24038
+ var { children, lazyMount, type, present, passThrough, ...props } = param, [lazyMounted, setLazyMounted] = (0, import_react3.useState)(lazyMount ? !1 : present);
24019
24039
  (0, import_react3.useEffect)(function() {
24020
- lazyMount && present && (0, import_react3.startTransition)(function() {
24040
+ passThrough || lazyMount && present && (0, import_react3.startTransition)(function() {
24021
24041
  setLazyMounted(present);
24022
24042
  });
24023
24043
  }, [
@@ -24026,20 +24046,23 @@ var require_Animate_native = __commonJS({
24026
24046
  ]);
24027
24047
  var mounted = present ? lazyMount ? lazyMounted : present : !1;
24028
24048
  return type === "presence" ? props.keepChildrenMounted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.PresenceChild, {
24029
- initial: props.initial ? void 0 : !1,
24030
- onExitComplete: props.onExitComplete,
24031
- enterVariant: props.enterVariant,
24032
- exitVariant: props.exitVariant,
24033
- enterExitVariant: props.enterExitVariant,
24034
- // BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu
24035
- // but since we always re-render this component on open changes this should be fine to leave off?
24036
- presenceAffectsLayout: !1,
24037
- isPresent: present,
24038
- custom: props.custom,
24049
+ isPresent: !0,
24050
+ ...!passThrough && {
24051
+ initial: props.initial ? void 0 : !1,
24052
+ onExitComplete: props.onExitComplete,
24053
+ enterVariant: props.enterVariant,
24054
+ exitVariant: props.exitVariant,
24055
+ enterExitVariant: props.enterExitVariant,
24056
+ // BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu
24057
+ // but since we always re-render this component on open changes this should be fine to leave off?
24058
+ presenceAffectsLayout: !1,
24059
+ isPresent: present,
24060
+ custom: props.custom
24061
+ },
24039
24062
  children
24040
24063
  }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
24041
24064
  ...props,
24042
- children: mounted ? children : null
24065
+ children: mounted || passThrough ? children : null
24043
24066
  }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
24044
24067
  children
24045
24068
  });
@@ -24359,6 +24382,12 @@ var require_Popper_native = __commonJS({
24359
24382
  PopperContext: function() {
24360
24383
  return PopperContext;
24361
24384
  },
24385
+ PopperInfrequentContext: function() {
24386
+ return PopperInfrequentContext;
24387
+ },
24388
+ PopperPositionContext: function() {
24389
+ return PopperPositionContext;
24390
+ },
24362
24391
  PopperProvider: function() {
24363
24392
  return PopperProvider;
24364
24393
  },
@@ -24367,10 +24396,15 @@ var require_Popper_native = __commonJS({
24367
24396
  },
24368
24397
  usePopperContext: function() {
24369
24398
  return usePopperContext;
24399
+ },
24400
+ usePopperInfrequentContext: function() {
24401
+ return usePopperInfrequentContext;
24370
24402
  }
24371
24403
  });
24372
24404
  module2.exports = __toCommonJS2(Popper_exports);
24373
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_get_token2 = require_index_native22(), import_stacks3 = require_index_native24(), import_start_transition = require_index_native9(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), PopperContext = (0, import_core12.createStyledContext)({}), { useStyledContext: usePopperContext, Provider: PopperProvider } = PopperContext, checkFloating = {
24405
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_get_token2 = require_index_native22(), import_stacks3 = require_index_native24(), import_start_transition = require_index_native9(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), PopperContext = (0, import_core12.createStyledContext)({}), PopperPositionContext = import_core12.createStyledContext, { useStyledContext: usePopperContext, Provider: PopperProvider } = PopperContext, PopperInfrequentContext = (0, import_core12.createStyledContext)({
24406
+ size: void 0
24407
+ }), usePopperInfrequentContext = PopperInfrequentContext.useStyledContext, checkFloating = {
24374
24408
  name: "checkFloating",
24375
24409
  fn(data) {
24376
24410
  return {
@@ -24384,12 +24418,15 @@ var require_Popper_native = __commonJS({
24384
24418
  Object.assign(setupOptions, options);
24385
24419
  }
24386
24420
  function Popper(props) {
24387
- var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, __scopePopper } = props, [arrowEl, setArrow] = React4.useState(null), [arrowSize, setArrowSize] = React4.useState(0), offsetOptions = offset2 ?? arrowSize, floatingStyle = React4.useRef({}), floating = (0, import_floating.useFloating)({
24421
+ var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, passThrough, __scopePopper } = props, [arrowEl, setArrow] = React4.useState(null), [arrowSize, setArrowSize] = React4.useState(0), offsetOptions = offset2 ?? arrowSize, floatingStyle = React4.useRef({}), floating = (0, import_floating.useFloating)({
24422
+ ...passThrough && {
24423
+ open: !1
24424
+ },
24388
24425
  strategy,
24389
24426
  placement,
24390
24427
  sameScrollView: !1,
24391
24428
  // this only takes effect on native
24392
- whileElementsMounted: import_floating.autoUpdate,
24429
+ whileElementsMounted: passThrough ? void 0 : import_floating.autoUpdate,
24393
24430
  platform: disableRTL ?? setupOptions.disableRTL ? {
24394
24431
  ...import_floating.platform,
24395
24432
  isRTL(element) {
@@ -24421,8 +24458,9 @@ var require_Popper_native = __commonJS({
24421
24458
  showSubscription.remove(), hideSubscription.remove();
24422
24459
  };
24423
24460
  }, []), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
24424
- floating.update();
24461
+ passThrough || floating.update();
24425
24462
  }, [
24463
+ passThrough,
24426
24464
  dimensions,
24427
24465
  keyboardOpen
24428
24466
  ]);
@@ -24435,9 +24473,12 @@ var require_Popper_native = __commonJS({
24435
24473
  hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
24436
24474
  ...floating
24437
24475
  };
24438
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
24439
- ...popperContext,
24440
- children
24476
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperInfrequentContext.Provider, {
24477
+ size: size2,
24478
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
24479
+ ...popperContext,
24480
+ children
24481
+ })
24441
24482
  });
24442
24483
  }
24443
24484
  var PopperAnchor = import_stacks3.YStack.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
@@ -24479,10 +24520,11 @@ var require_Popper_native = __commonJS({
24479
24520
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
24480
24521
  }
24481
24522
  }), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24482
- var { __scopePopper, enableAnimationForPositionChange, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size2 } = usePopperContext(__scopePopper), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), [needsMeasure, setNeedsMeasure] = React4.useState(enableAnimationForPositionChange);
24523
+ var { __scopePopper, enableAnimationForPositionChange, children, passThrough, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size2 } = usePopperContext(__scopePopper), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), [needsMeasure, setNeedsMeasure] = React4.useState(enableAnimationForPositionChange);
24483
24524
  (0, import_constants4.useIsomorphicLayoutEffect)(function() {
24484
- x && y && setNeedsMeasure(!1);
24525
+ needsMeasure && x && y && setNeedsMeasure(!1);
24485
24526
  }, [
24527
+ needsMeasure,
24486
24528
  enableAnimationForPositionChange,
24487
24529
  x,
24488
24530
  y
@@ -24507,14 +24549,20 @@ var require_Popper_native = __commonJS({
24507
24549
  }
24508
24550
  }, { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;
24509
24551
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
24510
- ...floatingProps,
24552
+ passThrough,
24553
+ ref: contentRefs,
24554
+ ...passThrough ? null : floatingProps,
24511
24555
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperContentFrame, {
24512
- "data-placement": placement,
24513
- "data-strategy": strategy,
24514
- contain: "layout",
24515
- size: size2,
24516
- ...style,
24517
- ...rest
24556
+ passThrough,
24557
+ ...!passThrough && {
24558
+ "data-placement": placement,
24559
+ "data-strategy": strategy,
24560
+ contain: "layout",
24561
+ size: size2,
24562
+ ...style,
24563
+ ...rest
24564
+ },
24565
+ children
24518
24566
  }, "popper-content-frame")
24519
24567
  });
24520
24568
  }), PopperArrowFrame = (0, import_core12.styled)(import_stacks3.YStack, {
@@ -24784,7 +24832,7 @@ var require_Popover_native = __commonJS({
24784
24832
  }
24785
24833
  });
24786
24834
  module2.exports = __toCommonJS2(Popover_exports);
24787
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native31(), import_animate = require_index_native57(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native33(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_focus_scope = require_index_native35(), import_helpers = require_index_native7(), import_popper = require_index_native59(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native36(), import_scroll_view = require_index_native37(), import_sheet = require_index_native38(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_useFloatingContext = require_useFloatingContext_native(), POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24835
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native31(), import_animate = require_index_native57(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native33(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_focus_scope = require_index_native35(), import_helpers = require_index_native7(), import_popper = require_index_native59(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native36(), import_sheet = require_index_native38(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), import_useFloatingContext = require_useFloatingContext_native(), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24788
24836
  var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
24789
24837
  return React4.useEffect(function() {
24790
24838
  return onCustomAnchorAdd(), function() {
@@ -24843,7 +24891,7 @@ var require_Popover_native = __commonJS({
24843
24891
  children: trigger
24844
24892
  });
24845
24893
  }), PopoverContent = import_popper.PopperContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24846
- var { allowPinchZoom, trapFocus, disableRemoveScroll = !0, zIndex, __scopePopover, ...contentImplProps } = props, context = usePopoverContext(__scopePopover), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React4.useRef(!1), [isFullyHidden, setIsFullyHidden] = React4.useState(!context.open);
24894
+ var { trapFocus, enableRemoveScroll = !1, zIndex, __scopePopover, ...contentImplProps } = props, context = usePopoverContext(__scopePopover), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React4.useRef(!1), [isFullyHidden, setIsFullyHidden] = React4.useState(!context.open);
24847
24895
  if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
24848
24896
  if (context.open) {
24849
24897
  var content = contentRef.current;
@@ -24860,7 +24908,7 @@ var require_Popover_native = __commonJS({
24860
24908
  pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
24861
24909
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
24862
24910
  ...contentImplProps,
24863
- disableRemoveScroll,
24911
+ enableRemoveScroll,
24864
24912
  ref: composedRefs,
24865
24913
  setIsFullyHidden,
24866
24914
  __scopePopover,
@@ -24890,25 +24938,29 @@ var require_Popover_native = __commonJS({
24890
24938
  });
24891
24939
  }));
24892
24940
  function PopoverRepropagateContext(props) {
24893
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
24894
- scope: props.scope,
24895
- ...props.popperContext,
24896
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
24897
- ...props.context,
24898
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
24899
- ...props.adaptContext,
24900
- children: props.children
24941
+ var popperContext = (0, import_popper.usePopperContext)(props.scope || POPOVER_SCOPE);
24942
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
24943
+ zIndex: props.zIndex,
24944
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
24945
+ scope: props.scope,
24946
+ ...popperContext,
24947
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
24948
+ ...props.context,
24949
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
24950
+ ...props.adaptContext,
24951
+ children: props.children
24952
+ })
24901
24953
  })
24902
24954
  })
24903
24955
  });
24904
24956
  }
24905
24957
  function PopoverContentPortal(props) {
24906
- var { __scopePopover } = props, zIndex = props.zIndex, context = usePopoverContext(__scopePopover), popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), themeName = (0, import_core12.useThemeName)(), adaptContext = (0, import_adapt.useAdaptContext)(), contents = props.children;
24907
- return (import_react_native4.Platform.OS === "android" || import_react_native4.Platform.OS === "ios") && (contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverRepropagateContext, {
24958
+ var { __scopePopover } = props, zIndex = props.zIndex, context = usePopoverContext(__scopePopover), themeName = (0, import_core12.useThemeName)(), adaptContext = (0, import_adapt.useAdaptContext)(), contents = props.children;
24959
+ return needsRepropagation && (contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverRepropagateContext, {
24908
24960
  scope: __scopePopover || POPOVER_SCOPE,
24909
- popperContext,
24910
24961
  context,
24911
24962
  adaptContext,
24963
+ zIndex,
24912
24964
  children: props.children
24913
24965
  })), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
24914
24966
  stackZIndex: !0,
@@ -24934,35 +24986,49 @@ var require_Popover_native = __commonJS({
24934
24986
  });
24935
24987
  }
24936
24988
  var PopoverContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24937
- var { trapFocus, __scopePopover, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, disableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, ...contentProps } = props, context = usePopoverContext(__scopePopover), { open, keepChildrenMounted } = context, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), handleExitComplete = React4.useCallback(function() {
24989
+ var { trapFocus, __scopePopover, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, ...contentProps } = props, context = usePopoverContext(__scopePopover), { open, keepChildrenMounted } = context, handleExitComplete = React4.useCallback(function() {
24938
24990
  setIsFullyHidden == null || setIsFullyHidden(!0);
24939
24991
  }, [
24940
24992
  setIsFullyHidden
24941
24993
  ]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
24994
+ disable: context.breakpointActive,
24942
24995
  children
24943
24996
  });
24944
- return context.breakpointActive ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
24945
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
24946
- scope: __scopePopover || POPOVER_SCOPE,
24947
- ...popperContext,
24948
- children
24997
+ return context.breakpointActive, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagatePopperAdapt, {
24998
+ __scopePopover: __scopePopover || POPOVER_SCOPE,
24999
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
25000
+ type: "presence",
25001
+ present: !!open,
25002
+ keepChildrenMounted: !!keepChildrenMounted,
25003
+ onExitComplete: handleExitComplete,
25004
+ lazyMount,
25005
+ passThrough: context.breakpointActive,
25006
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
25007
+ __scopePopper: __scopePopover || POPOVER_SCOPE,
25008
+ "data-state": getState(open),
25009
+ id: context.contentId,
25010
+ ref: forwardedRef,
25011
+ passThrough: context.breakpointActive,
25012
+ ...contentProps,
25013
+ children: contents
25014
+ }, context.contentId)
24949
25015
  })
24950
- }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
24951
- type: "presence",
24952
- present: !!open,
24953
- keepChildrenMounted,
24954
- onExitComplete: handleExitComplete,
24955
- lazyMount,
24956
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
24957
- __scopePopper: __scopePopover || POPOVER_SCOPE,
24958
- "data-state": getState(open),
24959
- id: context.contentId,
24960
- ref: forwardedRef,
24961
- ...contentProps,
24962
- children: contents
24963
- }, context.contentId)
24964
25016
  });
24965
- }), PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
25017
+ }), RepropagatePopperAdapt = function(param) {
25018
+ var { children, __scopePopover } = param;
25019
+ if (needsRepropagation) {
25020
+ var popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE);
25021
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
25022
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
25023
+ ...popperContext,
25024
+ children
25025
+ })
25026
+ });
25027
+ }
25028
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
25029
+ children
25030
+ });
25031
+ }, PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24966
25032
  var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
24967
25033
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
24968
25034
  ...rest,
@@ -24983,13 +25049,7 @@ var require_Popover_native = __commonJS({
24983
25049
  });
24984
25050
  }), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(props, ref) {
24985
25051
  var context = usePopoverContext(POPOVER_SCOPE);
24986
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
24987
- ref,
24988
- // when adapted, no pointer events!
24989
- pointerEvents: context.breakpointActive ? "none" : void 0,
24990
- scrollEnabled: !context.breakpointActive,
24991
- ...props
24992
- });
25052
+ return props.children;
24993
25053
  }), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
24994
25054
  var id = React4.useId();
24995
25055
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
@@ -25012,7 +25072,11 @@ var require_Popover_native = __commonJS({
25012
25072
  Sheet: import_sheet.Sheet.Controlled,
25013
25073
  FocusScope: import_focus_scope.FocusScopeController
25014
25074
  }), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
25015
- var { children, open: openProp, defaultOpen, onOpenChange, __scopePopover, keepChildrenMounted, hoverable, disableFocus, id, ...restProps } = props, triggerRef = React4.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React4.useState(!1), viaRef = React4.useRef(void 0), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
25075
+ var { children, open: openProp, defaultOpen, onOpenChange, __scopePopover, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus, id, ...restProps } = props, triggerRef = React4.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React4.useState(!1), viaRef = React4.useRef(void 0), [keepChildrenMounted] = (0, import_use_controllable_state.useControllableState)({
25076
+ prop: keepChildrenMountedProp,
25077
+ defaultProp: !1,
25078
+ transition: keepChildrenMountedProp === "lazy"
25079
+ }), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
25016
25080
  prop: openProp,
25017
25081
  defaultProp: defaultOpen || !1,
25018
25082
  onChange: function(val) {
@@ -25063,18 +25127,25 @@ var require_Popover_native = __commonJS({
25063
25127
  return setHasCustomAnchor(!1);
25064
25128
  }, []),
25065
25129
  keepChildrenMounted
25066
- }, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.Popper, {
25067
- __scopePopper: __scopePopover || POPOVER_SCOPE,
25068
- stayInFrame: !0,
25069
- ...restProps,
25070
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
25130
+ }, memoizedChildren = React4.useMemo(function() {
25131
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
25071
25132
  scope: __scopePopover,
25072
25133
  ...popoverContext,
25073
25134
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
25074
25135
  onOpenChange: setOpen,
25075
25136
  children
25076
25137
  })
25077
- })
25138
+ });
25139
+ }, [
25140
+ setOpen,
25141
+ children,
25142
+ ...Object.values(popoverContext)
25143
+ ]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.Popper, {
25144
+ passThrough: isAdapted,
25145
+ __scopePopper: __scopePopover || POPOVER_SCOPE,
25146
+ stayInFrame: !0,
25147
+ ...restProps,
25148
+ children: memoizedChildren
25078
25149
  });
25079
25150
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
25080
25151
  children: import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_floating.FloatingOverrideContext.Provider, {
@@ -25096,7 +25167,7 @@ var require_Popover_native = __commonJS({
25096
25167
  }
25097
25168
  },
25098
25169
  open: context.open,
25099
- hidden: breakpointActive === !1,
25170
+ hidden: !breakpointActive,
25100
25171
  children: props.children
25101
25172
  });
25102
25173
  }, useShowPopoverSheet = function(context) {
@@ -27457,7 +27528,7 @@ var require_Select_native = __commonJS({
27457
27528
  getShowSheet() && props.onOpenChange(val);
27458
27529
  },
27459
27530
  open: context.open,
27460
- hidden: isAdapted === !1,
27531
+ hidden: !isAdapted,
27461
27532
  children: props.children
27462
27533
  });
27463
27534
  }, SelectSheetImpl = function(props) {