tamagui 1.127.1 → 1.127.3

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
@@ -2148,7 +2148,6 @@ var require_constants_native2 = __commonJS({
2148
2148
  alignItems: "stretch",
2149
2149
  flexDirection: "column",
2150
2150
  flexBasis: "auto",
2151
- // @ts-expect-error
2152
2151
  boxSizing: "border-box",
2153
2152
  position: process.env.TAMAGUI_POSITION_STATIC === "1" ? "static" : "relative",
2154
2153
  minHeight: 0,
@@ -6405,7 +6404,7 @@ var require_getSplitStyles_native = __commonJS({
6405
6404
  function isValidStyleKey(key, validStyles, accept) {
6406
6405
  return key in validStyles ? !0 : accept && key in accept;
6407
6406
  }
6408
- var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, startedUnhydrated, debug) {
6407
+ var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, elementType, startedUnhydrated, debug) {
6409
6408
  var _loop = function(keyOg2) {
6410
6409
  var keyInit = keyOg2, valInit = props[keyInit];
6411
6410
  if (keyInit === "children") return viewProps[keyInit] = valInit, "continue";
@@ -6439,7 +6438,7 @@ var require_getSplitStyles_native = __commonJS({
6439
6438
  parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
6440
6439
  ) {
6441
6440
  var name2 = parts[1];
6442
- context != null && context.groups.subscribe && !(context != null && context.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
6441
+ componentContext != null && componentContext.groups.subscribe && !(componentContext != null && componentContext.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
6443
6442
  }
6444
6443
  }
6445
6444
  var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
@@ -6627,7 +6626,7 @@ var require_getSplitStyles_native = __commonJS({
6627
6626
  }
6628
6627
  } else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
6629
6628
  } else if (isGroupMedia) {
6630
- var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
6629
+ var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = componentContext == null ? void 0 : componentContext.groups.state[groupName];
6631
6630
  if (!groupContext) {
6632
6631
  process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`);
6633
6632
  return;
@@ -6645,7 +6644,7 @@ var require_getSplitStyles_native = __commonJS({
6645
6644
  if (groupPseudoKey) {
6646
6645
  pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
6647
6646
  var componentGroupPseudoState = (componentGroupState || // fallback to context initially
6648
- context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
6647
+ componentContext.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
6649
6648
  if (process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)(` \u{1F3D8}\uFE0F GROUP pseudo ${groupMediaKey} active? ${isActive1}, priority ${priority1}`), !isActive1) {
6650
6649
  for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
6651
6650
  return;
@@ -6683,7 +6682,9 @@ var require_getSplitStyles_native = __commonJS({
6683
6682
  (0, import_consoleLog.groupEnd)();
6684
6683
  }
6685
6684
  };
6686
- conf = conf || (0, import_config.getConfig)(), import_constants4.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
6685
+ conf = conf || (0, import_config.getConfig)();
6686
+ var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
6687
+ import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
6687
6688
  var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, 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);
6688
6689
  process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
6689
6690
  var styleState = {
@@ -6697,7 +6698,7 @@ var require_getSplitStyles_native = __commonJS({
6697
6698
  theme,
6698
6699
  usedKeys,
6699
6700
  viewProps,
6700
- context,
6701
+ context: componentContext,
6701
6702
  debug
6702
6703
  };
6703
6704
  if (process.env.IS_STATIC === "is_static") {
@@ -6791,7 +6792,7 @@ var require_getSplitStyles_native = __commonJS({
6791
6792
  var style2 = styleState.style;
6792
6793
  if (0) {
6793
6794
  var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
6794
- if (!(styleProps.isAnimated && !conf.animations.supportsCSSVars && isReactNative) && isReactNative) {
6795
+ if (!(styleProps.isAnimated && !animationDriver.supportsCSSVars && isReactNative) && isReactNative) {
6795
6796
  var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
6796
6797
  try {
6797
6798
  for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
@@ -8208,8 +8209,12 @@ var require_useComponentState_native = __commonJS({
8208
8209
  });
8209
8210
  },
8210
8211
  subscribe(cb) {
8211
- return listeners.add(cb), function() {
8212
- listeners.delete(cb);
8212
+ return listeners.add(cb), setStateShallow({
8213
+ hasDynGroupChildren: !0
8214
+ }), function() {
8215
+ listeners.delete(cb), listeners.size === 0 && setStateShallow({
8216
+ hasDynGroupChildren: !1
8217
+ });
8213
8218
  };
8214
8219
  }
8215
8220
  };
@@ -8541,7 +8546,7 @@ var require_createComponent_native = __commonJS({
8541
8546
  }
8542
8547
  var componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, { context, isReactNative } = staticConfig;
8543
8548
  if (context && (contextValue = import_react3.default.useContext(context), contextValue)) {
8544
- process.env.NODE_ENV === "development" && (defaultProps == null ? void 0 : defaultProps.debug) === "verbose" && (0, import_log.log)(" \u{1F447} contextValue", contextValue);
8549
+ process.env.NODE_ENV === "development" && (propsIn == null ? void 0 : propsIn.debug) === "verbose" && (0, import_log.log)(" \u{1F447} contextValue", contextValue);
8545
8550
  for (var key in context.props) {
8546
8551
  var propVal = (0, import_getShorthandValue.getShorthandValue)(propsIn, key);
8547
8552
  if (propVal === void 0) {
@@ -8708,7 +8713,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8708
8713
  ` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
8709
8714
  }), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
8710
8715
  var { pseudoGroups, mediaGroups } = splitStyles, unPress = function() {
8711
- return setStateShallow({
8716
+ setStateShallow({
8712
8717
  press: !1,
8713
8718
  pressIn: !1
8714
8719
  });
@@ -8785,7 +8790,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8785
8790
  groupName,
8786
8791
  state
8787
8792
  ]);
8788
- var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants4.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimePressStyle);
8793
+ var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState), hasDynamicGroupChildren = !!(groupName && state.hasDynGroupChildren), attachPress = !!(hasDynamicGroupChildren || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(hasDynamicGroupChildren || runtimeHoverStyle), attachHover = import_constants4.isWeb && !!(hasDynamicGroupChildren || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(hasDynamicGroupChildren || runtimePressStyle);
8789
8794
  process.env.NODE_ENV === "development" && time2 && time2`events-setup`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("\u{1FAA9} events()", {
8790
8795
  runtimeFocusStyle,
8791
8796
  runtimePressStyle,
@@ -8813,7 +8818,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8813
8818
  }
8814
8819
  },
8815
8820
  onPressIn: attachPress ? function(e) {
8816
- (runtimePressStyle || groupName) && setStateShallow({
8821
+ needsPressState && setStateShallow({
8817
8822
  press: !0,
8818
8823
  pressIn: !0
8819
8824
  }), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants4.isWeb && componentSetStates.add(setState);
@@ -15095,12 +15100,15 @@ var require_index_native23 = __commonJS({
15095
15100
  }), mod);
15096
15101
  }, index_exports2 = {};
15097
15102
  __export2(index_exports2, {
15103
+ SizableText: function() {
15104
+ return SizableText2;
15105
+ },
15098
15106
  getFontSized: function() {
15099
15107
  return getFontSized2;
15100
15108
  }
15101
15109
  });
15102
15110
  module2.exports = __toCommonJS2(index_exports2);
15103
- var import_constants4 = require_index_native6(), import_core12 = require_index_native18(), getFontSized2 = function() {
15111
+ var import_constants4 = require_index_native6(), import_web = require_index_native14(), getFontSized2 = function() {
15104
15112
  var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true", { font, fontFamily, props } = arguments.length > 1 ? arguments[1] : void 0, _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;
15105
15113
  if (!font) return {
15106
15114
  fontSize: sizeTokenIn
@@ -15111,10 +15119,21 @@ var require_index_native23 = __commonJS({
15111
15119
  props,
15112
15120
  font
15113
15121
  }), console.groupEnd()), style;
15114
- }, cache = /* @__PURE__ */ new WeakMap();
15122
+ }, SizableText2 = (0, import_web.styled)(import_web.Text, {
15123
+ name: "SizableText",
15124
+ fontFamily: "$body",
15125
+ variants: {
15126
+ size: {
15127
+ "...fontSize": getFontSized2
15128
+ }
15129
+ },
15130
+ defaultVariants: {
15131
+ size: "$true"
15132
+ }
15133
+ }), cache = /* @__PURE__ */ new WeakMap();
15115
15134
  function getDefaultSizeToken(font) {
15116
15135
  if (typeof font == "object" && cache.has(font)) return cache.get(font);
15117
- var sizeTokens = "$true" in font.size ? font.size : (0, import_core12.getTokens)().size, sizeDefault = sizeTokens.$true, sizeDefaultSpecific = sizeDefault ? Object.keys(sizeTokens).find(function(x) {
15136
+ var sizeTokens = "$true" in font.size ? font.size : (0, import_web.getTokens)().size, sizeDefault = sizeTokens.$true, sizeDefaultSpecific = sizeDefault ? Object.keys(sizeTokens).find(function(x) {
15118
15137
  return x !== "$true" && sizeTokens[x].val === sizeDefault.val;
15119
15138
  }) : null;
15120
15139
  return !sizeDefault || !sizeDefaultSpecific ? (process.env.NODE_ENV === "development" && console.warn(`No default size is set in your tokens for the "true" key, fonts will be inconsistent.
@@ -18474,6 +18493,7 @@ var require_SheetImplementationCustom_native = __commonJS({
18474
18493
  }, previouslyScrolling = !1, onMoveShouldSet = function(e, param) {
18475
18494
  var { dy } = param;
18476
18495
  if (e.target === providerProps.handleRef.current || !scrollEnabled.current) return !0;
18496
+ if (scrollBridge.scrollLock) return !1;
18477
18497
  var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
18478
18498
  return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && scrollEnabled.current && hasScrollView.current && isDraggingUp ? !1 : Math.abs(dy) > 10;
18479
18499
  }, grant = function() {
@@ -18821,8 +18841,16 @@ var require_SheetScrollView_native = __commonJS({
18821
18841
  }
18822
18842
  });
18823
18843
  module2.exports = __toCommonJS2(SheetScrollView_exports);
18824
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_compose_refs = require_index_native11(), import_scroll_view = require_index_native35(), import_SheetContext = require_SheetContext_native(), SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = /* @__PURE__ */ import_react3.default.forwardRef(function(param, ref) {
18825
- var { __scopeSheet, children, onScroll, scrollEnabled, ...props } = param, context = (0, import_SheetContext.useSheetContext)(SHEET_SCROLL_VIEW_NAME, __scopeSheet), { scrollBridge, scrollEnabled: scrollEnabled_, setHasScrollView } = context, scrollRef = import_react3.default.useRef(null), state = import_react3.default.useRef({
18844
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_core12 = require_index_native18(), import_scroll_view = require_index_native35(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_SheetContext = require_SheetContext_native(), SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = /* @__PURE__ */ import_react3.default.forwardRef(function(param, ref) {
18845
+ var { __scopeSheet, children, onScroll, scrollEnabled: scrollEnabledProp, ...props } = param, context = (0, import_SheetContext.useSheetContext)(SHEET_SCROLL_VIEW_NAME, __scopeSheet), { scrollBridge, scrollEnabled: scrollEnabled_, setHasScrollView } = context, [scrollEnabled, setScrollEnabled_] = (0, import_use_controllable_state.useControllableState)({
18846
+ prop: scrollEnabledProp,
18847
+ defaultProp: !0
18848
+ }), scrollRef = import_react3.default.useRef(null), setScrollEnabled = function(next) {
18849
+ var _scrollRef_current_setNativeProps, _scrollRef_current;
18850
+ (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 || (_scrollRef_current_setNativeProps = _scrollRef_current.setNativeProps) === null || _scrollRef_current_setNativeProps === void 0 || _scrollRef_current_setNativeProps.call(_scrollRef_current, {
18851
+ scrollEnabled: next
18852
+ }), setScrollEnabled_(next);
18853
+ }, state = import_react3.default.useRef({
18826
18854
  lastPageY: 0,
18827
18855
  dragAt: 0,
18828
18856
  dys: [],
@@ -18837,7 +18865,7 @@ var require_SheetScrollView_native = __commonJS({
18837
18865
  }, []);
18838
18866
  var release = function() {
18839
18867
  if (state.current.isDragging) {
18840
- state.current.isDragging = !1, scrollBridge.scrollStartY = -1, state.current.isScrolling = !1;
18868
+ state.current.isDragging = !1, scrollBridge.scrollStartY = -1, state.current.isScrolling = !1, setScrollEnabled(!0);
18841
18869
  var vy = 0;
18842
18870
  if (state.current.dys.length) {
18843
18871
  var recentDys = state.current.dys.slice(-10), dist = recentDys.length ? recentDys.reduce(function(a, b) {
@@ -18863,7 +18891,7 @@ var require_SheetScrollView_native = __commonJS({
18863
18891
  // })}
18864
18892
  onScroll: function(e) {
18865
18893
  var { y } = e.nativeEvent.contentOffset;
18866
- scrollBridge.y = y, y > 0 && (scrollBridge.scrollStartY = -1), onScroll == null || onScroll(e);
18894
+ scrollBridge.y = y, import_core12.isWeb && (scrollBridge.scrollLock = y > 0), y > 0 && (scrollBridge.scrollStartY = -1), onScroll == null || onScroll(e);
18867
18895
  },
18868
18896
  // This assures that we do not skip the "scrollBridge" values processing
18869
18897
  // when passing this prop into a <Sheet.ScrollView /> overriding it here
@@ -18875,38 +18903,30 @@ var require_SheetScrollView_native = __commonJS({
18875
18903
  return scrollBridge.scrollStartY = -1, state.current.isDragging = !0, scrollable;
18876
18904
  },
18877
18905
  // setting to false while onResponderMove is disabled
18878
- onMoveShouldSetResponder: function() {
18906
+ onMoveShouldSetResponder: function(e) {
18879
18907
  return scrollable;
18880
18908
  },
18881
- // somehow disabling works better, regression, no more nice drag continue scroll
18882
- // onResponderMove={(e) => {
18883
- // const { pageY } = e.nativeEvent
18884
- // if (state.current.isScrolling) {
18885
- // return
18886
- // }
18887
- // if (scrollBridge.scrollStartY === -1) {
18888
- // scrollBridge.scrollStartY = pageY
18889
- // state.current.lastPageY = pageY
18890
- // }
18891
- // const dragAt = pageY - scrollBridge.scrollStartY
18892
- // const dy = pageY - state.current.lastPageY
18893
- // state.current.lastPageY = pageY // after dy
18894
- // const isDraggingUp = dy < 0
18895
- // const isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY
18896
- // if ((dy === 0 || isDraggingUp) && isPaneAtTop) {
18897
- // state.current.isScrolling = true
18898
- // setScrollEnabled(true)
18899
- // return
18900
- // }
18901
- // setScrollEnabled(false)
18902
- // scrollBridge.drag(dragAt)
18903
- // state.current.dragAt = dragAt
18904
- // state.current.dys.push(dy)
18905
- // // only do every so often, cut down to 10 again
18906
- // if (state.current.dys.length > 100) {
18907
- // state.current.dys = state.current.dys.slice(-10)
18908
- // }
18909
- // }}
18909
+ contentContainerStyle: {
18910
+ minHeight: "100%"
18911
+ },
18912
+ onResponderMove: function(e) {
18913
+ if (import_core12.isWeb) {
18914
+ var { pageY } = e.nativeEvent;
18915
+ if (state.current.isScrolling) {
18916
+ e.stopPropagation();
18917
+ return;
18918
+ }
18919
+ scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
18920
+ var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
18921
+ state.current.lastPageY = pageY;
18922
+ var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY;
18923
+ if ((dy === 0 || isDraggingUp) && isPaneAtTop) {
18924
+ state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
18925
+ return;
18926
+ }
18927
+ setScrollEnabled(!1), scrollBridge.drag(dragAt), state.current.dragAt = dragAt, state.current.dys.push(dy), state.current.dys.length > 100 && (state.current.dys = state.current.dys.slice(-10));
18928
+ }
18929
+ },
18910
18930
  ...props,
18911
18931
  children
18912
18932
  });
@@ -25770,7 +25790,7 @@ var require_Popover_native = __commonJS({
25770
25790
  }
25771
25791
  });
25772
25792
  module2.exports = __toCommonJS2(Popover_exports);
25773
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native29(), import_animate = require_index_native55(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native31(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native18(), import_floating = require_index_native56(), import_focus_scope = require_index_native33(), import_helpers = require_index_native7(), import_popper = require_index_native57(), import_portal2 = require_index_native28(), import_remove_scroll = require_index_native34(), import_sheet = require_index_native36(), import_stacks3 = require_index_native22(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native27(), React4 = __toESM2(require("react")), import_react_native4 = require("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) {
25793
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native29(), import_animate = require_index_native55(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native31(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native18(), import_floating = require_index_native56(), import_focus_scope = require_index_native33(), import_helpers = require_index_native7(), import_popper = require_index_native57(), import_portal2 = require_index_native28(), import_remove_scroll = require_index_native34(), import_scroll_view = require_index_native35(), import_sheet = require_index_native36(), import_stacks3 = require_index_native22(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native27(), React4 = __toESM2(require("react")), import_react_native4 = require("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) {
25774
25794
  var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
25775
25795
  return React4.useEffect(function() {
25776
25796
  return onCustomAnchorAdd(), function() {
@@ -25927,19 +25947,13 @@ var require_Popover_native = __commonJS({
25927
25947
  ]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
25928
25948
  children
25929
25949
  });
25930
- if (context.breakpointActive) {
25931
- var childrenWithoutScrollView = React4.Children.toArray(children).map(function(child) {
25932
- return /* @__PURE__ */ React4.isValidElement(child) && child.type === import_react_native4.ScrollView ? child.props.children : child;
25933
- });
25934
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
25935
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
25936
- scope: __scopePopover || POPOVER_SCOPE,
25937
- ...popperContext,
25938
- children: childrenWithoutScrollView
25939
- })
25940
- });
25941
- }
25942
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
25950
+ return context.breakpointActive ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
25951
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
25952
+ scope: __scopePopover || POPOVER_SCOPE,
25953
+ ...popperContext,
25954
+ children
25955
+ })
25956
+ }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
25943
25957
  type: "presence",
25944
25958
  present: !!open,
25945
25959
  keepChildrenMounted,
@@ -25972,6 +25986,15 @@ var require_Popover_native = __commonJS({
25972
25986
  ...rest,
25973
25987
  ref: forwardedRef
25974
25988
  });
25989
+ }), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(props, ref) {
25990
+ var context = usePopoverContext(POPOVER_SCOPE);
25991
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
25992
+ ref,
25993
+ // when adapted, no pointer events!
25994
+ pointerEvents: context.breakpointActive ? "none" : void 0,
25995
+ scrollEnabled: !context.breakpointActive,
25996
+ ...props
25997
+ });
25975
25998
  }), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
25976
25999
  var id = React4.useId();
25977
26000
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
@@ -25990,7 +26013,7 @@ var require_Popover_native = __commonJS({
25990
26013
  Content: PopoverContent,
25991
26014
  Close: PopoverClose,
25992
26015
  Adapt: import_adapt.Adapt,
25993
- ScrollView: import_react_native4.ScrollView,
26016
+ ScrollView: PopoverScrollView,
25994
26017
  Sheet: import_sheet.Sheet.Controlled
25995
26018
  }), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
25996
26019
  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(), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({