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.
@@ -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,
@@ -6122,7 +6121,7 @@ var require_getSplitStyles_native = __commonJS({
6122
6121
  function isValidStyleKey(key, validStyles, accept) {
6123
6122
  return key in validStyles ? !0 : accept && key in accept;
6124
6123
  }
6125
- var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, startedUnhydrated, debug) {
6124
+ var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, elementType, startedUnhydrated, debug) {
6126
6125
  var _loop = function(keyOg2) {
6127
6126
  var keyInit = keyOg2, valInit = props[keyInit];
6128
6127
  if (keyInit === "children") return viewProps[keyInit] = valInit, "continue";
@@ -6156,7 +6155,7 @@ var require_getSplitStyles_native = __commonJS({
6156
6155
  parts.length === 2 || parts.length === 3 && import_pseudoDescriptors.pseudoPriorities[parts[parts.length - 1]]
6157
6156
  ) {
6158
6157
  var name2 = parts[1];
6159
- context != null && context.groups.subscribe && !(context != null && context.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
6158
+ componentContext != null && componentContext.groups.subscribe && !(componentContext != null && componentContext.groups.state[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
6160
6159
  }
6161
6160
  }
6162
6161
  var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
@@ -6299,7 +6298,7 @@ var require_getSplitStyles_native = __commonJS({
6299
6298
  }
6300
6299
  } else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
6301
6300
  } else if (isGroupMedia) {
6302
- var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
6301
+ var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = componentContext == null ? void 0 : componentContext.groups.state[groupName];
6303
6302
  if (!groupContext)
6304
6303
  return;
6305
6304
  var groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
@@ -6315,7 +6314,7 @@ var require_getSplitStyles_native = __commonJS({
6315
6314
  if (groupPseudoKey) {
6316
6315
  pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
6317
6316
  var componentGroupPseudoState = (componentGroupState || // fallback to context initially
6318
- context.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
6317
+ componentContext.groups.state[groupName]).pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
6319
6318
  if (!isActive1) {
6320
6319
  for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
6321
6320
  return;
@@ -6343,7 +6342,9 @@ var require_getSplitStyles_native = __commonJS({
6343
6342
  }
6344
6343
  });
6345
6344
  };
6346
- conf = conf || (0, import_config.getConfig)(), import_constants4.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
6345
+ conf = conf || (0, import_config.getConfig)();
6346
+ var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
6347
+ import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
6347
6348
  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), styleState = {
6348
6349
  classNames,
6349
6350
  conf,
@@ -6355,7 +6356,7 @@ var require_getSplitStyles_native = __commonJS({
6355
6356
  theme,
6356
6357
  usedKeys,
6357
6358
  viewProps,
6358
- context,
6359
+ context: componentContext,
6359
6360
  debug
6360
6361
  };
6361
6362
  if (process.env.IS_STATIC === "is_static") {
@@ -6434,7 +6435,7 @@ var require_getSplitStyles_native = __commonJS({
6434
6435
  var style2 = styleState.style;
6435
6436
  if (0) {
6436
6437
  var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
6437
- if (!(styleProps.isAnimated && !conf.animations.supportsCSSVars && isReactNative) && isReactNative) {
6438
+ if (!(styleProps.isAnimated && !animationDriver.supportsCSSVars && isReactNative) && isReactNative) {
6438
6439
  var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
6439
6440
  try {
6440
6441
  for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
@@ -7793,8 +7794,12 @@ var require_useComponentState_native = __commonJS({
7793
7794
  });
7794
7795
  },
7795
7796
  subscribe(cb) {
7796
- return listeners.add(cb), function() {
7797
- listeners.delete(cb);
7797
+ return listeners.add(cb), setStateShallow({
7798
+ hasDynGroupChildren: !0
7799
+ }), function() {
7800
+ listeners.delete(cb), listeners.size === 0 && setStateShallow({
7801
+ hasDynGroupChildren: !1
7802
+ });
7798
7803
  };
7799
7804
  }
7800
7805
  };
@@ -8209,7 +8214,7 @@ var require_createComponent_native = __commonJS({
8209
8214
  return stateRef.current.host = x;
8210
8215
  }, forwardedRef, import_setElementProps.setElementProps)), viewProps.ref = curStateRef.composedRef;
8211
8216
  var { pseudoGroups, mediaGroups } = splitStyles, unPress = function() {
8212
- return setStateShallow({
8217
+ setStateShallow({
8213
8218
  press: !1,
8214
8219
  pressIn: !1
8215
8220
  });
@@ -8275,7 +8280,7 @@ var require_createComponent_native = __commonJS({
8275
8280
  groupName,
8276
8281
  state
8277
8282
  ]);
8278
- 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), events = shouldAttach ? {
8283
+ 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), events = shouldAttach ? {
8279
8284
  onPressOut: attachPress ? function(e) {
8280
8285
  unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
8281
8286
  } : void 0,
@@ -8290,7 +8295,7 @@ var require_createComponent_native = __commonJS({
8290
8295
  }
8291
8296
  },
8292
8297
  onPressIn: attachPress ? function(e) {
8293
- (runtimePressStyle || groupName) && setStateShallow({
8298
+ needsPressState && setStateShallow({
8294
8299
  press: !0,
8295
8300
  pressIn: !0
8296
8301
  }), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants4.isWeb && componentSetStates.add(setState);
@@ -14511,22 +14516,36 @@ var require_index_native23 = __commonJS({
14511
14516
  }), mod);
14512
14517
  }, index_exports2 = {};
14513
14518
  __export2(index_exports2, {
14519
+ SizableText: function() {
14520
+ return SizableText2;
14521
+ },
14514
14522
  getFontSized: function() {
14515
14523
  return getFontSized2;
14516
14524
  }
14517
14525
  });
14518
14526
  module2.exports = __toCommonJS2(index_exports2);
14519
- var import_constants4 = require_index_native6(), import_core12 = require_index_native18(), getFontSized2 = function() {
14527
+ var import_constants4 = require_index_native6(), import_web = require_index_native14(), getFontSized2 = function() {
14520
14528
  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;
14521
14529
  if (!font) return {
14522
14530
  fontSize: sizeTokenIn
14523
14531
  };
14524
14532
  var sizeToken = sizeTokenIn === "$true" ? getDefaultSizeToken(font) : sizeTokenIn, style = {}, fontSize = font.size[sizeToken], lineHeight = (_font_lineHeight = font.lineHeight) === null || _font_lineHeight === void 0 ? void 0 : _font_lineHeight[sizeToken], fontWeight = (_font_weight = font.weight) === null || _font_weight === void 0 ? void 0 : _font_weight[sizeToken], letterSpacing = (_font_letterSpacing = font.letterSpacing) === null || _font_letterSpacing === void 0 ? void 0 : _font_letterSpacing[sizeToken], textTransform = (_font_transform = font.transform) === null || _font_transform === void 0 ? void 0 : _font_transform[sizeToken], _props_fontStyle, fontStyle = (_props_fontStyle = props.fontStyle) !== null && _props_fontStyle !== void 0 ? _props_fontStyle : (_font_style = font.style) === null || _font_style === void 0 ? void 0 : _font_style[sizeToken], _props_color, color = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : (_font_color = font.color) === null || _font_color === void 0 ? void 0 : _font_color[sizeToken];
14525
14533
  return fontStyle && (style.fontStyle = fontStyle), textTransform && (style.textTransform = textTransform), fontFamily && (style.fontFamily = fontFamily), fontWeight && (style.fontWeight = fontWeight), letterSpacing && (style.letterSpacing = letterSpacing), fontSize && (style.fontSize = fontSize), lineHeight && (style.lineHeight = lineHeight), color && (style.color = color), style;
14526
- }, cache = /* @__PURE__ */ new WeakMap();
14534
+ }, SizableText2 = (0, import_web.styled)(import_web.Text, {
14535
+ name: "SizableText",
14536
+ fontFamily: "$body",
14537
+ variants: {
14538
+ size: {
14539
+ "...fontSize": getFontSized2
14540
+ }
14541
+ },
14542
+ defaultVariants: {
14543
+ size: "$true"
14544
+ }
14545
+ }), cache = /* @__PURE__ */ new WeakMap();
14527
14546
  function getDefaultSizeToken(font) {
14528
14547
  if (typeof font == "object" && cache.has(font)) return cache.get(font);
14529
- var sizeTokens = "$true" in font.size ? font.size : (0, import_core12.getTokens)().size, sizeDefault = sizeTokens.$true, sizeDefaultSpecific = sizeDefault ? Object.keys(sizeTokens).find(function(x) {
14548
+ var sizeTokens = "$true" in font.size ? font.size : (0, import_web.getTokens)().size, sizeDefault = sizeTokens.$true, sizeDefaultSpecific = sizeDefault ? Object.keys(sizeTokens).find(function(x) {
14530
14549
  return x !== "$true" && sizeTokens[x].val === sizeDefault.val;
14531
14550
  }) : null;
14532
14551
  return !sizeDefault || !sizeDefaultSpecific ? Object.keys(font.size)[3] : (cache.set(font, sizeDefaultSpecific), sizeDefaultSpecific);
@@ -17869,6 +17888,7 @@ var require_SheetImplementationCustom_native = __commonJS({
17869
17888
  }, previouslyScrolling = !1, onMoveShouldSet = function(e, param) {
17870
17889
  var { dy } = param;
17871
17890
  if (e.target === providerProps.handleRef.current || !scrollEnabled.current) return !0;
17891
+ if (scrollBridge.scrollLock) return !1;
17872
17892
  var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
17873
17893
  return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && scrollEnabled.current && hasScrollView.current && isDraggingUp ? !1 : Math.abs(dy) > 10;
17874
17894
  }, grant = function() {
@@ -18216,8 +18236,16 @@ var require_SheetScrollView_native = __commonJS({
18216
18236
  }
18217
18237
  });
18218
18238
  module2.exports = __toCommonJS2(SheetScrollView_exports);
18219
- 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) {
18220
- 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({
18239
+ 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) {
18240
+ 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)({
18241
+ prop: scrollEnabledProp,
18242
+ defaultProp: !0
18243
+ }), scrollRef = import_react3.default.useRef(null), setScrollEnabled = function(next) {
18244
+ var _scrollRef_current_setNativeProps, _scrollRef_current;
18245
+ (_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, {
18246
+ scrollEnabled: next
18247
+ }), setScrollEnabled_(next);
18248
+ }, state = import_react3.default.useRef({
18221
18249
  lastPageY: 0,
18222
18250
  dragAt: 0,
18223
18251
  dys: [],
@@ -18232,7 +18260,7 @@ var require_SheetScrollView_native = __commonJS({
18232
18260
  }, []);
18233
18261
  var release = function() {
18234
18262
  if (state.current.isDragging) {
18235
- state.current.isDragging = !1, scrollBridge.scrollStartY = -1, state.current.isScrolling = !1;
18263
+ state.current.isDragging = !1, scrollBridge.scrollStartY = -1, state.current.isScrolling = !1, setScrollEnabled(!0);
18236
18264
  var vy = 0;
18237
18265
  if (state.current.dys.length) {
18238
18266
  var recentDys = state.current.dys.slice(-10), dist = recentDys.length ? recentDys.reduce(function(a, b) {
@@ -18258,7 +18286,7 @@ var require_SheetScrollView_native = __commonJS({
18258
18286
  // })}
18259
18287
  onScroll: function(e) {
18260
18288
  var { y } = e.nativeEvent.contentOffset;
18261
- scrollBridge.y = y, y > 0 && (scrollBridge.scrollStartY = -1), onScroll == null || onScroll(e);
18289
+ scrollBridge.y = y, import_core12.isWeb && (scrollBridge.scrollLock = y > 0), y > 0 && (scrollBridge.scrollStartY = -1), onScroll == null || onScroll(e);
18262
18290
  },
18263
18291
  // This assures that we do not skip the "scrollBridge" values processing
18264
18292
  // when passing this prop into a <Sheet.ScrollView /> overriding it here
@@ -18270,38 +18298,30 @@ var require_SheetScrollView_native = __commonJS({
18270
18298
  return scrollBridge.scrollStartY = -1, state.current.isDragging = !0, scrollable;
18271
18299
  },
18272
18300
  // setting to false while onResponderMove is disabled
18273
- onMoveShouldSetResponder: function() {
18301
+ onMoveShouldSetResponder: function(e) {
18274
18302
  return scrollable;
18275
18303
  },
18276
- // somehow disabling works better, regression, no more nice drag continue scroll
18277
- // onResponderMove={(e) => {
18278
- // const { pageY } = e.nativeEvent
18279
- // if (state.current.isScrolling) {
18280
- // return
18281
- // }
18282
- // if (scrollBridge.scrollStartY === -1) {
18283
- // scrollBridge.scrollStartY = pageY
18284
- // state.current.lastPageY = pageY
18285
- // }
18286
- // const dragAt = pageY - scrollBridge.scrollStartY
18287
- // const dy = pageY - state.current.lastPageY
18288
- // state.current.lastPageY = pageY // after dy
18289
- // const isDraggingUp = dy < 0
18290
- // const isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY
18291
- // if ((dy === 0 || isDraggingUp) && isPaneAtTop) {
18292
- // state.current.isScrolling = true
18293
- // setScrollEnabled(true)
18294
- // return
18295
- // }
18296
- // setScrollEnabled(false)
18297
- // scrollBridge.drag(dragAt)
18298
- // state.current.dragAt = dragAt
18299
- // state.current.dys.push(dy)
18300
- // // only do every so often, cut down to 10 again
18301
- // if (state.current.dys.length > 100) {
18302
- // state.current.dys = state.current.dys.slice(-10)
18303
- // }
18304
- // }}
18304
+ contentContainerStyle: {
18305
+ minHeight: "100%"
18306
+ },
18307
+ onResponderMove: function(e) {
18308
+ if (import_core12.isWeb) {
18309
+ var { pageY } = e.nativeEvent;
18310
+ if (state.current.isScrolling) {
18311
+ e.stopPropagation();
18312
+ return;
18313
+ }
18314
+ scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
18315
+ var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
18316
+ state.current.lastPageY = pageY;
18317
+ var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY;
18318
+ if ((dy === 0 || isDraggingUp) && isPaneAtTop) {
18319
+ state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
18320
+ return;
18321
+ }
18322
+ 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));
18323
+ }
18324
+ },
18305
18325
  ...props,
18306
18326
  children
18307
18327
  });
@@ -25076,7 +25096,7 @@ var require_Popover_native = __commonJS({
25076
25096
  }
25077
25097
  });
25078
25098
  module2.exports = __toCommonJS2(Popover_exports);
25079
- 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) {
25099
+ 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) {
25080
25100
  var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
25081
25101
  return React4.useEffect(function() {
25082
25102
  return onCustomAnchorAdd(), function() {
@@ -25233,19 +25253,13 @@ var require_Popover_native = __commonJS({
25233
25253
  ]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
25234
25254
  children
25235
25255
  });
25236
- if (context.breakpointActive) {
25237
- var childrenWithoutScrollView = React4.Children.toArray(children).map(function(child) {
25238
- return /* @__PURE__ */ React4.isValidElement(child) && child.type === import_react_native4.ScrollView ? child.props.children : child;
25239
- });
25240
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
25241
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
25242
- scope: __scopePopover || POPOVER_SCOPE,
25243
- ...popperContext,
25244
- children: childrenWithoutScrollView
25245
- })
25246
- });
25247
- }
25248
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
25256
+ return context.breakpointActive ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
25257
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
25258
+ scope: __scopePopover || POPOVER_SCOPE,
25259
+ ...popperContext,
25260
+ children
25261
+ })
25262
+ }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
25249
25263
  type: "presence",
25250
25264
  present: !!open,
25251
25265
  keepChildrenMounted,
@@ -25278,6 +25292,15 @@ var require_Popover_native = __commonJS({
25278
25292
  ...rest,
25279
25293
  ref: forwardedRef
25280
25294
  });
25295
+ }), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(props, ref) {
25296
+ var context = usePopoverContext(POPOVER_SCOPE);
25297
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
25298
+ ref,
25299
+ // when adapted, no pointer events!
25300
+ pointerEvents: context.breakpointActive ? "none" : void 0,
25301
+ scrollEnabled: !context.breakpointActive,
25302
+ ...props
25303
+ });
25281
25304
  }), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
25282
25305
  var id = React4.useId();
25283
25306
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
@@ -25296,7 +25319,7 @@ var require_Popover_native = __commonJS({
25296
25319
  Content: PopoverContent,
25297
25320
  Close: PopoverClose,
25298
25321
  Adapt: import_adapt.Adapt,
25299
- ScrollView: import_react_native4.ScrollView,
25322
+ ScrollView: PopoverScrollView,
25300
25323
  Sheet: import_sheet.Sheet.Controlled
25301
25324
  }), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
25302
25325
  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)({