tamagui 1.130.7 → 1.131.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.
@@ -3041,7 +3041,7 @@ var require_useMedia_native = __commonJS({
3041
3041
  internalRef.current || (internalRef.current = {
3042
3042
  keys: /* @__PURE__ */ new Set()
3043
3043
  });
3044
- var { keys, lastState = (0, import_config.getSetting)("disableSSR") ? mediaState3 : initState } = internalRef.current;
3044
+ var { keys, lastState = mediaState3 } = internalRef.current;
3045
3045
  keys.size && keys.clear();
3046
3046
  var state = (0, import_react3.useSyncExternalStore)(subscribe, function() {
3047
3047
  if (componentState != null && componentState.enabled) return internalRef.current.lastState = mediaState3, mediaState3;
@@ -3557,13 +3557,15 @@ var require_createStyledContext_native = __commonJS({
3557
3557
  module2.exports = __toCommonJS2(createStyledContext_exports);
3558
3558
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_objectIdentityKey = require_objectIdentityKey_native(), createReactContext = import_react3.default[Math.random(), "createContext"];
3559
3559
  function createStyledContext2(defaultValues) {
3560
- var OGContext = createReactContext(defaultValues), OGProvider2 = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map();
3560
+ var namespace = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", OGContext = createReactContext(defaultValues), OGProvider2 = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), LastScopeInNamespace = createReactContext(namespace);
3561
3561
  function getOrCreateScopedContext(scope) {
3562
3562
  var ScopedContext = scopedContexts.get(scope);
3563
3563
  return ScopedContext || (ScopedContext = createReactContext(defaultValues), scopedContexts.set(scope, ScopedContext)), ScopedContext;
3564
3564
  }
3565
- var Provider = function(param) {
3566
- var { children, scope, ...values } = param, next = import_react3.default.useMemo(function() {
3565
+ var getNamespacedScope = function(scope) {
3566
+ return namespace ? `${namespace}--${scope}` : scope;
3567
+ }, Provider = function(param) {
3568
+ var { children, scope: scopeIn, ...values } = param, scope = getNamespacedScope(scopeIn), next = import_react3.default.useMemo(function() {
3567
3569
  return {
3568
3570
  // this ! is a workaround for ts error
3569
3571
  ...defaultValues,
@@ -3572,13 +3574,16 @@ var require_createStyledContext_native = __commonJS({
3572
3574
  }, [
3573
3575
  (0, import_objectIdentityKey.objectIdentityKey)(values)
3574
3576
  ]), Provider22 = OGProvider2;
3575
- return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Provider22, {
3576
- value: next,
3577
- children
3577
+ return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastScopeInNamespace.Provider, {
3578
+ value: scope,
3579
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Provider22, {
3580
+ value: next,
3581
+ children
3582
+ })
3578
3583
  });
3579
- }, useStyledContext = function(scope) {
3580
- var context = scope ? getOrCreateScopedContext(scope) : OGContext;
3581
- return import_react3.default.useContext(context);
3584
+ }, useStyledContext = function() {
3585
+ var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", lastScopeInNamespace = (0, import_react3.useContext)(LastScopeInNamespace), scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn, context = scope ? getOrCreateScopedContext(scope) : OGContext, value = import_react3.default.useContext(context);
3586
+ return value;
3582
3587
  };
3583
3588
  return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
3584
3589
  }
@@ -8422,13 +8427,14 @@ var require_createComponent_native = __commonJS({
8422
8427
  onBlur,
8423
8428
  separator,
8424
8429
  // ignore from here on out
8430
+ passThrough,
8425
8431
  forceStyle: _forceStyle,
8426
8432
  // @ts-ignore for next/link compat etc
8427
8433
  onClick,
8428
8434
  theme: _themeProp,
8429
8435
  ...nonTamaguiProps
8430
8436
  } = viewPropsIn || {}, viewProps = nonTamaguiProps;
8431
- !isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
8437
+ !isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && (typeof _themeProp < "u" && (viewProps.theme = _themeProp), typeof passThrough < "u" && (viewProps.passThrough = passThrough)), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
8432
8438
  var animationStyles, shouldUseAnimation = (
8433
8439
  // if it supports css vars we run it on server too to get matching initial style
8434
8440
  (supportsCSS ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC
@@ -12873,23 +12879,35 @@ var require_index_native19 = __commonJS({
12873
12879
  }), mod);
12874
12880
  }, index_exports2 = {};
12875
12881
  __export2(index_exports2, {
12882
+ createMeasure: function() {
12883
+ return createMeasure;
12884
+ },
12885
+ createMeasureInWindow: function() {
12886
+ return createMeasureInWindow;
12887
+ },
12888
+ createMeasureLayout: function() {
12889
+ return createMeasureLayout;
12890
+ },
12876
12891
  enable: function() {
12877
12892
  return enable;
12878
12893
  },
12894
+ getBoundingClientRectAsync: function() {
12895
+ return getBoundingClientRectAsync;
12896
+ },
12879
12897
  getElementLayoutEvent: function() {
12880
12898
  return getElementLayoutEvent;
12881
12899
  },
12882
- getElementLayoutEventAsync: function() {
12883
- return getElementLayoutEventAsync;
12900
+ measure: function() {
12901
+ return measure;
12884
12902
  },
12885
- getRect: function() {
12886
- return getRect;
12903
+ measureInWindow: function() {
12904
+ return measureInWindow;
12887
12905
  },
12888
12906
  measureLayout: function() {
12889
12907
  return measureLayout;
12890
12908
  },
12891
- measureLayoutAsync: function() {
12892
- return measureLayoutAsync;
12909
+ measureNode: function() {
12910
+ return measureNode;
12893
12911
  },
12894
12912
  setOnLayoutStrategy: function() {
12895
12913
  return setOnLayoutStrategy3;
@@ -12909,7 +12927,7 @@ var require_index_native19 = __commonJS({
12909
12927
  return cb();
12910
12928
  }), queuedUpdates.clear()));
12911
12929
  }
12912
- function startGlobalIntersectionObserver() {
12930
+ function startGlobalObservers() {
12913
12931
  !import_constants4.isClient || globalIntersectionObserver || (globalIntersectionObserver = new IntersectionObserver(function(entries) {
12914
12932
  entries.forEach(function(entry) {
12915
12933
  var node = entry.target;
@@ -12962,9 +12980,9 @@ var require_index_native19 = __commonJS({
12962
12980
  }
12963
12981
  }
12964
12982
  }
12965
- rAF(layoutOnAnimationFrame), frameCount = 0, RUN_EVERY_X_FRAMES = 8;
12983
+ rAF(layoutOnAnimationFrame), frameCount = 0, userSkipVal = process.env.TAMAGUI_LAYOUT_FRAME_SKIP, RUN_EVERY_X_FRAMES = userSkipVal ? +userSkipVal : 10;
12966
12984
  }
12967
- var layoutOnAnimationFrame, layoutOnAnimationFrame2, supportsCheckVisibility, frameCount, RUN_EVERY_X_FRAMES, getElementLayoutEvent = function(nodeRect, parentRect) {
12985
+ var layoutOnAnimationFrame, layoutOnAnimationFrame2, supportsCheckVisibility, frameCount, userSkipVal, RUN_EVERY_X_FRAMES, getElementLayoutEvent = function(nodeRect, parentRect) {
12968
12986
  return {
12969
12987
  nativeEvent: {
12970
12988
  layout: getRelativeDimensions(nodeRect, parentRect),
@@ -12972,45 +12990,6 @@ var require_index_native19 = __commonJS({
12972
12990
  },
12973
12991
  timeStamp: Date.now()
12974
12992
  };
12975
- }, measureLayout = function(node, relativeTo, callback) {
12976
- var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
12977
- if (relativeNode instanceof HTMLElement) {
12978
- var nodeDim = node.getBoundingClientRect(), relativeNodeDim = relativeNode.getBoundingClientRect();
12979
- if (relativeNodeDim && nodeDim) {
12980
- var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
12981
- callback(x, y, width, height, left, top);
12982
- }
12983
- }
12984
- }, getElementLayoutEventAsync = async function(target) {
12985
- var layout = await measureLayoutAsync(target);
12986
- if (!layout) throw new Error("\u203C\uFE0F");
12987
- return {
12988
- nativeEvent: {
12989
- layout,
12990
- target
12991
- },
12992
- timeStamp: Date.now()
12993
- };
12994
- }, measureLayoutAsync = async function(node, relativeTo) {
12995
- var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
12996
- if (relativeNode instanceof HTMLElement) {
12997
- var [nodeDim, relativeNodeDim] = await Promise.all([
12998
- getBoundingClientRectAsync(node),
12999
- getBoundingClientRectAsync(relativeNode)
13000
- ]);
13001
- if (relativeNodeDim && nodeDim) {
13002
- var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
13003
- return {
13004
- x,
13005
- y,
13006
- width,
13007
- height,
13008
- left,
13009
- top
13010
- };
13011
- }
13012
- }
13013
- return null;
13014
12993
  }, getRelativeDimensions = function(a, b) {
13015
12994
  var { height, left, top, width } = a, x = left - b.left, y = top - b.top;
13016
12995
  return {
@@ -13018,8 +12997,8 @@ var require_index_native19 = __commonJS({
13018
12997
  y,
13019
12998
  width,
13020
12999
  height,
13021
- left,
13022
- top
13000
+ pageX: a.left,
13001
+ pageY: a.top
13023
13002
  };
13024
13003
  };
13025
13004
  function useElementLayout(ref, onLayout) {
@@ -13029,7 +13008,7 @@ var require_index_native19 = __commonJS({
13029
13008
  if (onLayout) {
13030
13009
  var node2 = (_ref_current2 = ref.current) === null || _ref_current2 === void 0 ? void 0 : _ref_current2.host;
13031
13010
  if (node2) {
13032
- Nodes.add(node2), startGlobalIntersectionObserver(), globalIntersectionObserver && (globalIntersectionObserver.observe(node2), IntersectionState.set(node2, !0));
13011
+ Nodes.add(node2), startGlobalObservers(), globalIntersectionObserver && (globalIntersectionObserver.observe(node2), IntersectionState.set(node2, !0));
13033
13012
  var parentNode = node2.parentNode;
13034
13013
  return parentNode && onLayout(getElementLayoutEvent(node2.getBoundingClientRect(), parentNode.getBoundingClientRect())), function() {
13035
13014
  Nodes.delete(node2), LayoutHandlers.delete(node2), NodeRectCache.delete(node2), LastChangeTime.delete(node2), IntersectionState.delete(node2), globalIntersectionObserver && globalIntersectionObserver.unobserve(node2);
@@ -13054,23 +13033,41 @@ var require_index_native19 = __commonJS({
13054
13033
  });
13055
13034
  io.observe(node);
13056
13035
  });
13057
- }, getBoundingClientRect = function(node) {
13058
- var _node_getBoundingClientRect;
13059
- if (!(!node || node.nodeType !== 1)) return (_node_getBoundingClientRect = node.getBoundingClientRect) === null || _node_getBoundingClientRect === void 0 ? void 0 : _node_getBoundingClientRect.call(node);
13060
- }, getRect = function(node) {
13061
- var rect = getBoundingClientRect(node);
13062
- if (rect) {
13063
- var { x, y, top, left } = rect;
13064
- return {
13065
- x,
13066
- y,
13067
- width: node.offsetWidth,
13068
- height: node.offsetHeight,
13069
- top,
13070
- left
13071
- };
13036
+ }, measureNode = async function(node, relativeTo) {
13037
+ var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
13038
+ if (relativeNode instanceof HTMLElement) {
13039
+ var [nodeDim, relativeNodeDim] = await Promise.all([
13040
+ getBoundingClientRectAsync(node),
13041
+ getBoundingClientRectAsync(relativeNode)
13042
+ ]);
13043
+ if (relativeNodeDim && nodeDim) return getRelativeDimensions(nodeDim, relativeNodeDim);
13072
13044
  }
13045
+ return null;
13046
+ }, measure = async function(node, callback) {
13047
+ var out = await measureNode(node, node.parentNode instanceof HTMLElement ? node.parentNode : null);
13048
+ return out && (callback == null || callback(out.x, out.y, out.width, out.height, out.pageX, out.pageY)), out;
13049
+ };
13050
+ function createMeasure(node) {
13051
+ return function(callback) {
13052
+ return measure(node, callback);
13053
+ };
13054
+ }
13055
+ var measureInWindow = async function(node, callback) {
13056
+ var out = await measureNode(node, null);
13057
+ return out && (callback == null || callback(out.pageX, out.pageY, out.width, out.height)), out;
13058
+ }, createMeasureInWindow = function(node) {
13059
+ return function(callback) {
13060
+ return measureInWindow(node, callback);
13061
+ };
13062
+ }, measureLayout = async function(node, relativeNode, callback) {
13063
+ var out = await measureNode(node, relativeNode);
13064
+ return out && (callback == null || callback(out.x, out.y, out.width, out.height, out.pageX, out.pageY)), out;
13073
13065
  };
13066
+ function createMeasureLayout(node) {
13067
+ return function(relativeTo, callback) {
13068
+ return measureLayout(node, relativeTo, callback);
13069
+ };
13070
+ }
13074
13071
  }
13075
13072
  });
13076
13073
 
@@ -13633,19 +13630,7 @@ var require_index_native20 = __commonJS({
13633
13630
  (0, import_web.setupHooks)({
13634
13631
  getBaseViews: import_getBaseViews.getBaseViews,
13635
13632
  setElementProps: function(node) {
13636
- if (node && !node.measure) {
13637
- var _node, _node1, _node2;
13638
- (_node = node).measure || (_node.measure = function(callback) {
13639
- return (0, import_use_element_layout.measureLayout)(node, null, callback);
13640
- }), (_node1 = node).measureLayout || (_node1.measureLayout = function(relativeToNode, success) {
13641
- return (0, import_use_element_layout.measureLayout)(node, relativeToNode, success);
13642
- }), (_node2 = node).measureInWindow || (_node2.measureInWindow = function(callback) {
13643
- setTimeout(function() {
13644
- var { height, left, top, width } = (0, import_use_element_layout.getRect)(node);
13645
- callback(left, top, width, height);
13646
- }, 0);
13647
- });
13648
- }
13633
+ if (0) var _node, _node1, _node2;
13649
13634
  },
13650
13635
  usePropsTransform(elementType, propsIn, stateRef, willHydrate) {
13651
13636
  if (0) {
@@ -13742,10 +13727,10 @@ var require_Collection_native = __commonJS({
13742
13727
  current: void 0
13743
13728
  },
13744
13729
  itemMap: /* @__PURE__ */ new Map()
13745
- }), CollectionProvider = function(props) {
13746
- var { __scopeCollection, children } = props, ref = import_react3.default.useRef(void 0), itemMap = import_react3.default.useRef(/* @__PURE__ */ new Map()).current;
13730
+ }, "Toast"), CollectionProvider = function(props) {
13731
+ var { scope, children } = props, ref = import_react3.default.useRef(void 0), itemMap = import_react3.default.useRef(/* @__PURE__ */ new Map()).current;
13747
13732
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CollectionProviderImpl, {
13748
- scope: __scopeCollection,
13733
+ scope,
13749
13734
  itemMap,
13750
13735
  collectionRef: ref,
13751
13736
  children
@@ -13753,7 +13738,7 @@ var require_Collection_native = __commonJS({
13753
13738
  };
13754
13739
  CollectionProvider.displayName = "CollectionProvider";
13755
13740
  var COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
13756
- var { __scopeCollection, children } = props, context = useCollectionContext(__scopeCollection), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
13741
+ var { scope, children } = props, context = useCollectionContext(scope), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
13757
13742
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Slot, {
13758
13743
  ref: composedRefs,
13759
13744
  children
@@ -13761,7 +13746,7 @@ var require_Collection_native = __commonJS({
13761
13746
  });
13762
13747
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
13763
13748
  var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
13764
- var { __scopeCollection, children, ...itemData } = props, ref = import_react3.default.useRef(void 0), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
13749
+ var { scope, children, ...itemData } = props, ref = import_react3.default.useRef(void 0), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(scope);
13765
13750
  return import_react3.default.useEffect(function() {
13766
13751
  return context.itemMap.set(ref, {
13767
13752
  ref,
@@ -13776,8 +13761,8 @@ var require_Collection_native = __commonJS({
13776
13761
  });
13777
13762
  });
13778
13763
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
13779
- function useCollection(__scopeCollection) {
13780
- var context = useCollectionContext(__scopeCollection), getItems = import_react3.default.useCallback(function() {
13764
+ function useCollection(scope) {
13765
+ var context = useCollectionContext(scope), getItems = import_react3.default.useCallback(function() {
13781
13766
  if (!import_constants4.isWeb) return [];
13782
13767
  var collectionNode = context.collectionRef.current;
13783
13768
  if (!collectionNode) return [];
@@ -15287,7 +15272,7 @@ var require_Accordion_native = __commonJS({
15287
15272
  ], [Collection, useCollection] = (0, import_collection.createCollection)(ACCORDION_NAME), ACCORDION_CONTEXT = "Accordion", AccordionComponent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
15288
15273
  var { type, ...accordionProps } = props, singleProps = accordionProps, multipleProps = accordionProps;
15289
15274
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Provider, {
15290
- __scopeCollection: props.__scopeAccordion || ACCORDION_CONTEXT,
15275
+ scope: props.__scopeAccordion || ACCORDION_CONTEXT,
15291
15276
  children: type === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionImplMultiple, {
15292
15277
  ...multipleProps,
15293
15278
  ref: forwardedRef
@@ -15423,7 +15408,7 @@ var require_Accordion_native = __commonJS({
15423
15408
  direction: dir,
15424
15409
  orientation,
15425
15410
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Slot, {
15426
- __scopeCollection: __scopeAccordion || ACCORDION_CONTEXT,
15411
+ scope: __scopeAccordion || ACCORDION_CONTEXT,
15427
15412
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
15428
15413
  "data-orientation": orientation,
15429
15414
  ref: composedRef,
@@ -15494,7 +15479,7 @@ var require_Accordion_native = __commonJS({
15494
15479
  }), AccordionTrigger = AccordionTriggerFrame.styleable(function(props, forwardedRef) {
15495
15480
  var { __scopeAccordion, ...triggerProps } = props, accordionContext = useAccordionContext(__scopeAccordion), itemContext = useAccordionItemContext(__scopeAccordion), collapsibleContext = useAccordionCollapsibleContext(__scopeAccordion);
15496
15481
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.ItemSlot, {
15497
- __scopeCollection: __scopeAccordion || ACCORDION_CONTEXT,
15482
+ scope: __scopeAccordion || ACCORDION_CONTEXT,
15498
15483
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionTriggerFrame, {
15499
15484
  // @ts-ignore
15500
15485
  __scopeCollapsible: __scopeAccordion || ACCORDION_CONTEXT,
@@ -16078,7 +16063,7 @@ var require_GorhomPortal_native = __commonJS({
16078
16063
  });
16079
16064
  });
16080
16065
  function PortalHostWeb(props) {
16081
- return (0, import_react3.useEffect)(function() {
16066
+ return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16082
16067
  return function() {
16083
16068
  import_constants22.allPortalHosts.delete(props.name);
16084
16069
  };
@@ -16100,7 +16085,7 @@ var require_GorhomPortal_native = __commonJS({
16100
16085
  }
16101
16086
  function PortalHostNonNative(props) {
16102
16087
  var { name, forwardProps, render = defaultRenderer } = props, state = usePortalState(name), { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
16103
- return (0, import_react3.useEffect)(function() {
16088
+ return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16104
16089
  if (!(typeof window > "u")) return registerHost2(), function() {
16105
16090
  deregisterHost2();
16106
16091
  };
@@ -16502,7 +16487,7 @@ var require_Adapt_native = __commonJS({
16502
16487
  }
16503
16488
  });
16504
16489
  module2.exports = __toCommonJS2(Adapt_exports);
16505
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_z_index_stack2 = require_index_native29(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_helpers = require_index_native7(), import_portal2 = require_index_native30(), import_react3 = __toESM2(require("react")), CurrentAdaptContextScope = /* @__PURE__ */ (0, import_react3.createContext)(""), AdaptContext = (0, import_core12.createStyledContext)({
16490
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_helpers = require_index_native7(), import_portal2 = require_index_native30(), import_z_index_stack2 = require_index_native29(), import_react3 = __toESM2(require("react")), AdaptContext = (0, import_core12.createStyledContext)({
16506
16491
  Contents: null,
16507
16492
  scopeName: "",
16508
16493
  portalName: "",
@@ -16513,42 +16498,56 @@ var require_Adapt_native = __commonJS({
16513
16498
  setChildren: null,
16514
16499
  setWhen: function() {
16515
16500
  }
16516
- }), ProvideAdaptContext = function(param) {
16517
- var { children, ...context } = param, scope = context.scopeName || "";
16518
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CurrentAdaptContextScope.Provider, {
16519
- value: scope,
16501
+ }), LastAdaptContextScope = /* @__PURE__ */ (0, import_react3.createContext)(""), ProvideAdaptContext = function(param) {
16502
+ var { children, ...context } = param, scope = context.scopeName || "", lastScope = (0, import_react3.useContext)(LastAdaptContextScope);
16503
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastAdaptContextScope.Provider, {
16504
+ value: lastScope || context.lastScope || "",
16520
16505
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptContext.Provider, {
16521
16506
  scope,
16507
+ lastScope: lastScope || context.lastScope,
16522
16508
  ...context,
16523
16509
  children
16524
16510
  })
16525
16511
  });
16526
- }, useAdaptContext = function() {
16527
- var scope = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", contextScope = (0, import_react3.useContext)(CurrentAdaptContextScope), context = AdaptContext.useStyledContext(scope === "" && contextScope || scope);
16528
- return context;
16512
+ }, useAdaptContext = function(scope) {
16513
+ var lastScope = (0, import_react3.useContext)(LastAdaptContextScope), adaptScope = scope ?? lastScope;
16514
+ return AdaptContext.useStyledContext(adaptScope);
16529
16515
  }, AdaptPortals = /* @__PURE__ */ new Map(), AdaptParent = function(param) {
16530
- var { children, Contents, scope, portal } = param, portalName = `AdaptPortal${scope}`, id = (0, import_react3.useId)(), FinalContents = Contents || AdaptPortals.get(id);
16531
- FinalContents || (FinalContents = function() {
16532
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
16533
- name: portalName,
16534
- forwardProps: typeof portal == "boolean" || portal == null ? void 0 : portal.forwardProps
16535
- });
16536
- }, AdaptPortals.set(id, FinalContents)), (0, import_react3.useEffect)(function() {
16537
- return function() {
16538
- AdaptPortals.delete(id);
16516
+ var { children, Contents, scope, portal } = param, id = (0, import_react3.useId)(), portalName = `AdaptPortal${scope}${id}`, FinalContents = (0, import_react3.useMemo)(function() {
16517
+ if (Contents) return Contents;
16518
+ if (AdaptPortals.has(portalName)) return AdaptPortals.get(portalName);
16519
+ var element = function() {
16520
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
16521
+ name: portalName,
16522
+ forwardProps: typeof portal == "boolean" || portal == null ? void 0 : portal.forwardProps
16523
+ }, id);
16539
16524
  };
16540
- }, []);
16541
- var [when, setWhen] = import_react3.default.useState(null), [platform2, setPlatform] = import_react3.default.useState(null), [children2, setChildren] = import_react3.default.useState(null);
16542
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProvideAdaptContext, {
16543
- Contents: FinalContents,
16544
- when,
16545
- platform: platform2,
16546
- setPlatform,
16547
- setWhen,
16548
- setChildren,
16525
+ return AdaptPortals.set(portalName, element), element;
16526
+ }, [
16549
16527
  portalName,
16550
- scopeName: scope,
16551
- children
16528
+ Contents
16529
+ ]);
16530
+ (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16531
+ return AdaptPortals.set(portalName, FinalContents), function() {
16532
+ AdaptPortals.delete(portalName);
16533
+ };
16534
+ }, [
16535
+ portalName
16536
+ ]);
16537
+ var [when, setWhen] = import_react3.default.useState(null), [platform2, setPlatform] = import_react3.default.useState(null), [children2, setChildren] = import_react3.default.useState(null);
16538
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastAdaptContextScope, {
16539
+ value: scope,
16540
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProvideAdaptContext, {
16541
+ Contents: FinalContents,
16542
+ when,
16543
+ platform: platform2,
16544
+ setPlatform,
16545
+ setWhen,
16546
+ setChildren,
16547
+ portalName,
16548
+ scopeName: scope,
16549
+ children
16550
+ })
16552
16551
  });
16553
16552
  }, AdaptContents = function(param) {
16554
16553
  var { scope, ...rest } = param, context = useAdaptContext(scope);
@@ -16560,7 +16559,7 @@ var require_Adapt_native = __commonJS({
16560
16559
  };
16561
16560
  AdaptContents.shouldForwardSpace = !0;
16562
16561
  var Adapt = (0, import_helpers.withStaticProperties)(function(props) {
16563
- var { platform: platform2, when, children, scope } = props, context = useAdaptContext(scope), scopeName = scope ?? context.scopeName, enabled = useAdaptIsActiveGiven(props);
16562
+ var { platform: platform2, when, children, scope } = props, context = useAdaptContext(scope), enabled = useAdaptIsActiveGiven(props);
16564
16563
  (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16565
16564
  var _context_setWhen, _context_setPlatform;
16566
16565
  context == null || (_context_setWhen = context.setWhen) === null || _context_setWhen === void 0 || _context_setWhen.call(context, when || enabled), context == null || (_context_setPlatform = context.setPlatform) === null || _context_setPlatform === void 0 || _context_setPlatform.call(context, platform2 || null);
@@ -16586,10 +16585,7 @@ var require_Adapt_native = __commonJS({
16586
16585
  }, [
16587
16586
  output
16588
16587
  ]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
16589
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CurrentAdaptContextScope.Provider, {
16590
- value: scopeName,
16591
- children: enabled ? output : null
16592
- })
16588
+ children: enabled ? output : null
16593
16589
  });
16594
16590
  }, {
16595
16591
  Contents: AdaptContents
@@ -16603,6 +16599,7 @@ var require_Adapt_native = __commonJS({
16603
16599
  }, useAdaptIsActiveGiven = function(param) {
16604
16600
  var { when, platform: platform2 } = param, media = (0, import_core12.useMedia)();
16605
16601
  if (when == null && platform2 == null) return !1;
16602
+ if (when === !0) return !0;
16606
16603
  var enabled = !1;
16607
16604
  return platform2 === "touch" ? enabled = import_constants4.isTouchable : platform2 === "native" ? enabled = !import_constants4.isWeb : platform2 === "web" ? enabled = import_constants4.isWeb : platform2 === "ios" ? enabled = import_constants4.isIos : platform2 === "android" && (enabled = import_constants4.isAndroid), platform2 && enabled == !1 ? !1 : (when && typeof when == "string" && (enabled = media[when]), enabled);
16608
16605
  }, useAdaptIsActive = function(scope) {
@@ -16651,6 +16648,93 @@ var require_index_native31 = __commonJS({
16651
16648
  }
16652
16649
  });
16653
16650
 
16651
+ // ../../core/aria-hidden/dist/cjs/AriaHidden.native.js
16652
+ var require_AriaHidden_native = __commonJS({
16653
+ "../../core/aria-hidden/dist/cjs/AriaHidden.native.js"(exports2, module2) {
16654
+ "use strict";
16655
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
16656
+ for (var name in all) __defProp2(target, name, {
16657
+ get: all[name],
16658
+ enumerable: !0
16659
+ });
16660
+ }, __copyProps2 = function(to, from, except, desc) {
16661
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
16662
+ if (from && typeof from == "object" || typeof from == "function") try {
16663
+ for (var _loop = function() {
16664
+ var key = _step.value;
16665
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
16666
+ get: function() {
16667
+ return from[key];
16668
+ },
16669
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
16670
+ });
16671
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
16672
+ } catch (err) {
16673
+ _didIteratorError = !0, _iteratorError = err;
16674
+ } finally {
16675
+ try {
16676
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
16677
+ } finally {
16678
+ if (_didIteratorError)
16679
+ throw _iteratorError;
16680
+ }
16681
+ }
16682
+ return to;
16683
+ }, __toCommonJS2 = function(mod) {
16684
+ return __copyProps2(__defProp2({}, "__esModule", {
16685
+ value: !0
16686
+ }), mod);
16687
+ }, AriaHidden_native_exports = {};
16688
+ __export2(AriaHidden_native_exports, {
16689
+ hideOthers: function() {
16690
+ return hideOthers;
16691
+ }
16692
+ });
16693
+ module2.exports = __toCommonJS2(AriaHidden_native_exports);
16694
+ var hideOthers = function() {
16695
+ };
16696
+ }
16697
+ });
16698
+
16699
+ // ../../core/aria-hidden/dist/cjs/index.native.js
16700
+ var require_index_native32 = __commonJS({
16701
+ "../../core/aria-hidden/dist/cjs/index.native.js"(exports2, module2) {
16702
+ "use strict";
16703
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
16704
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
16705
+ if (from && typeof from == "object" || typeof from == "function") try {
16706
+ for (var _loop = function() {
16707
+ var key = _step.value;
16708
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
16709
+ get: function() {
16710
+ return from[key];
16711
+ },
16712
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
16713
+ });
16714
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
16715
+ } catch (err) {
16716
+ _didIteratorError = !0, _iteratorError = err;
16717
+ } finally {
16718
+ try {
16719
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
16720
+ } finally {
16721
+ if (_didIteratorError)
16722
+ throw _iteratorError;
16723
+ }
16724
+ }
16725
+ return to;
16726
+ }, __reExport2 = function(target, mod, secondTarget) {
16727
+ return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
16728
+ }, __toCommonJS2 = function(mod) {
16729
+ return __copyProps2(__defProp2({}, "__esModule", {
16730
+ value: !0
16731
+ }), mod);
16732
+ }, index_exports2 = {};
16733
+ module2.exports = __toCommonJS2(index_exports2);
16734
+ __reExport2(index_exports2, require_AriaHidden_native(), module2.exports);
16735
+ }
16736
+ });
16737
+
16654
16738
  // ../../core/create-context/dist/cjs/create-context.native.js
16655
16739
  var require_create_context_native = __commonJS({
16656
16740
  "../../core/create-context/dist/cjs/create-context.native.js"(exports2, module2) {
@@ -16820,7 +16904,7 @@ var require_create_context_native = __commonJS({
16820
16904
  });
16821
16905
 
16822
16906
  // ../../core/create-context/dist/cjs/index.native.js
16823
- var require_index_native32 = __commonJS({
16907
+ var require_index_native33 = __commonJS({
16824
16908
  "../../core/create-context/dist/cjs/index.native.js"(exports2, module2) {
16825
16909
  "use strict";
16826
16910
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
@@ -16858,93 +16942,6 @@ var require_index_native32 = __commonJS({
16858
16942
  }
16859
16943
  });
16860
16944
 
16861
- // ../../core/aria-hidden/dist/cjs/AriaHidden.native.js
16862
- var require_AriaHidden_native = __commonJS({
16863
- "../../core/aria-hidden/dist/cjs/AriaHidden.native.js"(exports2, module2) {
16864
- "use strict";
16865
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
16866
- for (var name in all) __defProp2(target, name, {
16867
- get: all[name],
16868
- enumerable: !0
16869
- });
16870
- }, __copyProps2 = function(to, from, except, desc) {
16871
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
16872
- if (from && typeof from == "object" || typeof from == "function") try {
16873
- for (var _loop = function() {
16874
- var key = _step.value;
16875
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
16876
- get: function() {
16877
- return from[key];
16878
- },
16879
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
16880
- });
16881
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
16882
- } catch (err) {
16883
- _didIteratorError = !0, _iteratorError = err;
16884
- } finally {
16885
- try {
16886
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
16887
- } finally {
16888
- if (_didIteratorError)
16889
- throw _iteratorError;
16890
- }
16891
- }
16892
- return to;
16893
- }, __toCommonJS2 = function(mod) {
16894
- return __copyProps2(__defProp2({}, "__esModule", {
16895
- value: !0
16896
- }), mod);
16897
- }, AriaHidden_native_exports = {};
16898
- __export2(AriaHidden_native_exports, {
16899
- hideOthers: function() {
16900
- return hideOthers;
16901
- }
16902
- });
16903
- module2.exports = __toCommonJS2(AriaHidden_native_exports);
16904
- var hideOthers = function() {
16905
- };
16906
- }
16907
- });
16908
-
16909
- // ../../core/aria-hidden/dist/cjs/index.native.js
16910
- var require_index_native33 = __commonJS({
16911
- "../../core/aria-hidden/dist/cjs/index.native.js"(exports2, module2) {
16912
- "use strict";
16913
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
16914
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
16915
- if (from && typeof from == "object" || typeof from == "function") try {
16916
- for (var _loop = function() {
16917
- var key = _step.value;
16918
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
16919
- get: function() {
16920
- return from[key];
16921
- },
16922
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
16923
- });
16924
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
16925
- } catch (err) {
16926
- _didIteratorError = !0, _iteratorError = err;
16927
- } finally {
16928
- try {
16929
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
16930
- } finally {
16931
- if (_didIteratorError)
16932
- throw _iteratorError;
16933
- }
16934
- }
16935
- return to;
16936
- }, __reExport2 = function(target, mod, secondTarget) {
16937
- return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
16938
- }, __toCommonJS2 = function(mod) {
16939
- return __copyProps2(__defProp2({}, "__esModule", {
16940
- value: !0
16941
- }), mod);
16942
- }, index_exports2 = {};
16943
- module2.exports = __toCommonJS2(index_exports2);
16944
- __reExport2(index_exports2, require_AriaHidden_native(), module2.exports);
16945
- }
16946
- });
16947
-
16948
16945
  // ../dismissable/dist/cjs/Dismissable.native.js
16949
16946
  var require_Dismissable_native = __commonJS({
16950
16947
  "../dismissable/dist/cjs/Dismissable.native.js"(exports2, module2) {
@@ -17175,7 +17172,7 @@ var require_FocusScopeController_native = __commonJS({
17175
17172
  }
17176
17173
  });
17177
17174
  module2.exports = __toCommonJS2(FocusScopeController_exports);
17178
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context = require_index_native32(), import_use_event = require_index_native8(), React4 = __toESM2(require("react")), FOCUS_SCOPE_CONTROLLER_NAME = "FocusScopeController", [createFocusScopeControllerContext, createFocusScopeControllerScope] = (0, import_create_context.createContextScope)(FOCUS_SCOPE_CONTROLLER_NAME), [FocusScopeControllerProvider, useFocusScopeControllerContext] = createFocusScopeControllerContext(FOCUS_SCOPE_CONTROLLER_NAME);
17175
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context = require_index_native33(), import_use_event = require_index_native8(), React4 = __toESM2(require("react")), FOCUS_SCOPE_CONTROLLER_NAME = "FocusScopeController", [createFocusScopeControllerContext, createFocusScopeControllerScope] = (0, import_create_context.createContextScope)(FOCUS_SCOPE_CONTROLLER_NAME), [FocusScopeControllerProvider, useFocusScopeControllerContext] = createFocusScopeControllerContext(FOCUS_SCOPE_CONTROLLER_NAME);
17179
17176
  function FocusScopeController(props) {
17180
17177
  var { __scopeFocusScope, children, enabled, loop, trapped, onMountAutoFocus, onUnmountAutoFocus, forceUnmount, focusOnIdle } = props, stableOnMountAutoFocus = (0, import_use_event.useEvent)(onMountAutoFocus), stableOnUnmountAutoFocus = (0, import_use_event.useEvent)(onUnmountAutoFocus), contextValue = React4.useMemo(function() {
17181
17178
  return {
@@ -17446,7 +17443,7 @@ var require_SheetContext_native = __commonJS({
17446
17443
  }
17447
17444
  });
17448
17445
  module2.exports = __toCommonJS2(SheetContext_exports);
17449
- var import_create_context = require_index_native32(), import_constants4 = require_constants_native4(), [createSheetContext, createSheetScope2] = (0, import_create_context.createContextScope)(import_constants4.SHEET_NAME), [SheetProvider, useSheetContext] = createSheetContext(import_constants4.SHEET_NAME, {});
17446
+ var import_create_context = require_index_native33(), import_constants4 = require_constants_native4(), [createSheetContext, createSheetScope2] = (0, import_create_context.createContextScope)(import_constants4.SHEET_NAME), [SheetProvider, useSheetContext] = createSheetContext(import_constants4.SHEET_NAME, {});
17450
17447
  }
17451
17448
  });
17452
17449
 
@@ -18132,7 +18129,7 @@ var require_SheetImplementationCustom_native = __commonJS({
18132
18129
  if (isScrolled) return previouslyScrolling = !0, !1;
18133
18130
  if (isNearTop && hasScrollView.current && isDraggingUp) return !1;
18134
18131
  }
18135
- return Math.abs(dy) > 5;
18132
+ return Math.abs(dy) > 10;
18136
18133
  }
18137
18134
  var granted = getShouldSet();
18138
18135
  return granted && scrollBridge.setParentDragging(!0), granted;
@@ -18601,7 +18598,8 @@ var require_SheetScrollView_native = __commonJS({
18601
18598
  state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
18602
18599
  return;
18603
18600
  }
18604
- if (scrollBridge.y >= 0) return;
18601
+ var isDraggingUpFromTopOnFirstScroll = !state.current.isScrolling && dy > 0 && scrollBridge.y === 0;
18602
+ if (!isDraggingUpFromTopOnFirstScroll && scrollBridge.y >= 0) return;
18605
18603
  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));
18606
18604
  }
18607
18605
  },
@@ -18809,6 +18807,7 @@ var require_createSheet_native = __commonJS({
18809
18807
  !disableHideBottomOverflow && // @ts-ignore
18810
18808
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Frame, {
18811
18809
  ...props,
18810
+ "data-testid": "ensure-sheet-cover-not-overlapping",
18812
18811
  componentName: "SheetCover",
18813
18812
  // biome-ignore lint/correctness/noChildrenProp: <explanation>
18814
18813
  children: null,
@@ -19266,6 +19265,9 @@ var require_Dialog_native = __commonJS({
19266
19265
  DialogContent: function() {
19267
19266
  return DialogContent;
19268
19267
  },
19268
+ DialogContext: function() {
19269
+ return DialogContext;
19270
+ },
19269
19271
  DialogDescription: function() {
19270
19272
  return DialogDescription;
19271
19273
  },
@@ -19281,6 +19283,9 @@ var require_Dialog_native = __commonJS({
19281
19283
  DialogPortalFrame: function() {
19282
19284
  return DialogPortalFrame;
19283
19285
  },
19286
+ DialogProvider: function() {
19287
+ return DialogProvider;
19288
+ },
19284
19289
  DialogTitle: function() {
19285
19290
  return DialogTitle;
19286
19291
  },
@@ -19290,15 +19295,19 @@ var require_Dialog_native = __commonJS({
19290
19295
  DialogWarningProvider: function() {
19291
19296
  return DialogWarningProvider;
19292
19297
  },
19293
- createDialogScope: function() {
19294
- return createDialogScope;
19298
+ useDialogContext: function() {
19299
+ return useDialogContext;
19295
19300
  }
19296
19301
  });
19297
19302
  module2.exports = __toCommonJS2(Dialog_exports);
19298
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), 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_create_context = require_index_native32(), import_dismissable = require_index_native34(), import_focus_scope = require_index_native35(), import_helpers = require_index_native7(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native36(), import_sheet = require_index_native38(), import_stacks3 = require_index_native24(), import_text2 = require_index_native26(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), DIALOG_NAME = "Dialog", [createDialogContext, createDialogScope] = (0, import_create_context.createContextScope)(DIALOG_NAME), [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME), TRIGGER_NAME = "DialogTrigger", DialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
19299
- name: TRIGGER_NAME
19303
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native32(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_create_context = require_index_native33(), import_dismissable = require_index_native34(), import_focus_scope = require_index_native35(), import_helpers = require_index_native7(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native36(), import_sheet = require_index_native38(), import_stacks3 = require_index_native24(), import_text2 = require_index_native26(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), DialogContext = (0, import_core12.createStyledContext)(
19304
+ // since we always provide this we can avoid setting here
19305
+ {},
19306
+ "Dialog__"
19307
+ ), { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext, DialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
19308
+ name: "DialogTrigger"
19300
19309
  }), DialogTrigger = DialogTriggerFrame.styleable(function(props, forwardedRef) {
19301
- var { __scopeDialog, ...triggerProps } = props, isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext), context = useDialogContext(TRIGGER_NAME, __scopeDialog), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
19310
+ var { scope, ...triggerProps } = props, isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext), context = useDialogContext(scope), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
19302
19311
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.ButtonNestingContext.Provider, {
19303
19312
  value: !0,
19304
19313
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogTriggerFrame, {
@@ -19312,8 +19321,6 @@ var require_Dialog_native = __commonJS({
19312
19321
  onPress: (0, import_helpers.composeEventHandlers)(props.onPress, context.onOpenToggle)
19313
19322
  })
19314
19323
  });
19315
- }), PORTAL_NAME = "DialogPortal", [PortalProvider2, usePortalContext] = createDialogContext(PORTAL_NAME, {
19316
- forceMount: void 0
19317
19324
  }), DialogPortalFrame = (0, import_core12.styled)(import_stacks3.YStack, {
19318
19325
  pointerEvents: "none",
19319
19326
  variants: {
@@ -19332,73 +19339,70 @@ var require_Dialog_native = __commonJS({
19332
19339
  defaultVariants: {
19333
19340
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
19334
19341
  }
19335
- }), DialogPortalItem = function(props) {
19336
- var { __scopeDialog, children, space, spaceDirection, separator } = props, themeName = (0, import_core12.useThemeName)(), context = useDialogContext(PORTAL_NAME, props.__scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)(), childrenSpaced = children;
19337
- (space || separator) && (childrenSpaced = (0, import_core12.spacedChildren)({
19338
- children,
19339
- separator,
19340
- space,
19341
- direction: spaceDirection
19342
- }));
19343
- var content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
19344
- scope: __scopeDialog,
19345
- ...context,
19346
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
19347
- name: themeName,
19348
- children: childrenSpaced
19349
- })
19342
+ }), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, DialogPortalItem = function(param) {
19343
+ var { context, children } = param, themeName = (0, import_core12.useThemeName)(), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope), adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope), content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
19344
+ name: themeName,
19345
+ children
19350
19346
  });
19351
- return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
19347
+ return needsRepropagation && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
19348
+ ...adaptContext,
19349
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
19350
+ ...context,
19351
+ children: content
19352
+ })
19353
+ })), isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
19354
+ scope: context.adaptScope,
19352
19355
  children: content
19353
19356
  }) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
19354
- hostName: context.modal ? "root" : context.adaptName,
19357
+ hostName: context.modal ? "root" : context.adaptScope,
19355
19358
  children: content
19356
19359
  }) : content;
19357
19360
  }, DialogPortal = function(props) {
19358
- var { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React4.useState(!isShowing), isAdapted = (0, import_adapt.useAdaptIsActive)();
19361
+ var { scope, forceMount, children, ...frameProps } = props, context = useDialogContext(scope), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React4.useState(!isShowing), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
19359
19362
  isShowing && isFullyHidden && setIsFullyHidden(!1);
19360
19363
  var handleExitComplete = React4.useCallback(function() {
19361
19364
  setIsFullyHidden(!0);
19362
19365
  }, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
19363
19366
  zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
19364
19367
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
19368
+ passThrough: isAdapted,
19365
19369
  onExitComplete: handleExitComplete,
19366
19370
  children: isShowing || isAdapted ? children : null
19367
19371
  })
19368
19372
  });
19369
19373
  if (isFullyHidden && !isAdapted) return null;
19370
- var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalProvider2, {
19371
- scope: __scopeDialog,
19372
- forceMount,
19373
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, {
19374
- pointerEvents: isShowing ? "auto" : "none",
19375
- ...frameProps,
19376
- children: contents
19377
- })
19374
+ var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, {
19375
+ // passThrough={isAdapted}
19376
+ pointerEvents: isShowing ? "auto" : "none",
19377
+ ...frameProps,
19378
+ children: contents
19378
19379
  });
19379
19380
  return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
19380
19381
  zIndex,
19381
19382
  // set to 1000 which "boosts" it 1000 above baseline for current context
19382
19383
  // this makes sure its above (this first 1k) popovers on the same layer
19383
19384
  stackZIndex: 1e3,
19385
+ passThrough: isAdapted,
19384
19386
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
19387
+ passThrough: isAdapted,
19385
19388
  children: framedContents
19386
19389
  })
19387
19390
  }) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
19388
- __scopeDialog,
19391
+ context,
19389
19392
  children: framedContents
19390
19393
  });
19391
19394
  }, PassthroughTheme = function(param) {
19392
- var { children } = param, themeName = (0, import_core12.useThemeName)();
19395
+ var { children, passThrough } = param, themeName = (0, import_core12.useThemeName)();
19393
19396
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
19397
+ passThrough,
19394
19398
  name: themeName,
19395
19399
  forceClassName: !0,
19396
19400
  children
19397
19401
  });
19398
19402
  }, OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
19399
19403
  name: OVERLAY_NAME
19400
- }), DialogOverlay = DialogOverlayFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
19401
- var { __scopeDialog, ...props } = param, portalContext = usePortalContext(OVERLAY_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...overlayProps } = props, context = useDialogContext(OVERLAY_NAME, __scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
19404
+ }), DialogOverlay = DialogOverlayFrame.styleable(function(param, forwardedRef) {
19405
+ var { scope, ...props } = param, context = useDialogContext(scope), { forceMount = context.forceMount, ...overlayProps } = props, isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
19402
19406
  return !forceMount && (!context.modal || isAdapted) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayFrame, {
19403
19407
  "data-state": getState(context.open),
19404
19408
  // TODO: this will be apply for v2
@@ -19411,7 +19415,7 @@ var require_Dialog_native = __commonJS({
19411
19415
  ...overlayProps,
19412
19416
  ref: forwardedRef
19413
19417
  });
19414
- })), CONTENT_NAME = "DialogContent", DialogContentFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
19418
+ }), CONTENT_NAME = "DialogContent", DialogContentFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
19415
19419
  name: CONTENT_NAME,
19416
19420
  tag: "dialog",
19417
19421
  variants: {
@@ -19435,8 +19439,8 @@ var require_Dialog_native = __commonJS({
19435
19439
  size: "$true",
19436
19440
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
19437
19441
  }
19438
- }), DialogContent = DialogContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
19439
- var { __scopeDialog, ...props } = param, portalContext = usePortalContext(CONTENT_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...contentProps } = props, context = useDialogContext(CONTENT_NAME, __scopeDialog), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
19442
+ }), DialogContent = DialogContentFrame.styleable(function(param, forwardedRef) {
19443
+ var { scope, ...props } = param, context = useDialogContext(scope), { forceMount = context.forceMount, ...contentProps } = props, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
19440
19444
  children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentModal, {
19441
19445
  context,
19442
19446
  ...contentProps,
@@ -19455,7 +19459,7 @@ var require_Dialog_native = __commonJS({
19455
19459
  children: contents
19456
19460
  })
19457
19461
  });
19458
- })), DialogContentModal = /* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
19462
+ }), DialogContentModal = /* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
19459
19463
  var { children, context, ...props } = param, contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
19460
19464
  return React4.useEffect(function() {
19461
19465
  if (import_constants4.isWeb && context.open) {
@@ -19519,11 +19523,12 @@ var require_Dialog_native = __commonJS({
19519
19523
  }
19520
19524
  });
19521
19525
  }), DialogContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19522
- var { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(
19526
+ var { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(
19523
19527
  // TODO react 19 type workaround
19524
19528
  void 0
19525
- ), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)();
19529
+ ), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
19526
19530
  if (isAdapted) return !import_constants4.isWeb && !context.open ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
19531
+ context,
19527
19532
  children: contentProps.children
19528
19533
  });
19529
19534
  var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentFrame, {
@@ -19564,7 +19569,7 @@ var require_Dialog_native = __commonJS({
19564
19569
  }), DialogTitleFrame = (0, import_core12.styled)(import_text2.H2, {
19565
19570
  name: "DialogTitle"
19566
19571
  }), DialogTitle = DialogTitleFrame.styleable(function(props, forwardedRef) {
19567
- var { __scopeDialog, ...titleProps } = props, context = useDialogContext("DialogTitle", __scopeDialog);
19572
+ var { scope, ...titleProps } = props, context = useDialogContext(scope);
19568
19573
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogTitleFrame, {
19569
19574
  id: context.titleId,
19570
19575
  ...titleProps,
@@ -19572,8 +19577,8 @@ var require_Dialog_native = __commonJS({
19572
19577
  });
19573
19578
  }), DialogDescriptionFrame = (0, import_core12.styled)(import_text2.Paragraph, {
19574
19579
  name: "DialogDescription"
19575
- }), DESCRIPTION_NAME = "DialogDescription", DialogDescription = DialogDescriptionFrame.styleable(function(props, forwardedRef) {
19576
- var { __scopeDialog, ...descriptionProps } = props, context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
19580
+ }), DialogDescription = DialogDescriptionFrame.styleable(function(props, forwardedRef) {
19581
+ var { scope, ...descriptionProps } = props, context = useDialogContext(scope);
19577
19582
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogDescriptionFrame, {
19578
19583
  id: context.descriptionId,
19579
19584
  ...descriptionProps,
@@ -19583,10 +19588,7 @@ var require_Dialog_native = __commonJS({
19583
19588
  name: CLOSE_NAME,
19584
19589
  tag: "button"
19585
19590
  }), DialogClose = DialogCloseFrame.styleable(function(props, forwardedRef) {
19586
- var { __scopeDialog, displayWhenAdapted, ...closeProps } = props, context = useDialogContext(CLOSE_NAME, __scopeDialog, {
19587
- warn: !1,
19588
- fallback: {}
19589
- }), isAdapted = (0, import_adapt.useAdaptIsActive)(), isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext);
19591
+ var { scope, displayWhenAdapted, ...closeProps } = props, context = useDialogContext(scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope), isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext);
19590
19592
  return isAdapted && !displayWhenAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogCloseFrame, {
19591
19593
  accessibilityLabel: "Dialog Close",
19592
19594
  tag: isInsideButton ? "span" : "button",
@@ -19605,10 +19607,7 @@ var require_Dialog_native = __commonJS({
19605
19607
  titleName: "DialogTitle",
19606
19608
  docsSlug: "dialog"
19607
19609
  }), Dialog = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
19608
- 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({
19609
- scopeKey,
19610
- contentId
19611
- }), triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
19610
+ var { scope = "", children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0, disableRemoveScroll = !1 } = props, baseId = React4.useId(), dialogId = `Dialog-${scope}-${baseId}`, contentId = `${dialogId}-content`, titleId = `${dialogId}-title`, descriptionId = `${dialogId}-description`, triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
19612
19611
  prop: openProp,
19613
19612
  defaultProp: defaultOpen,
19614
19613
  onChange: onOpenChange
@@ -19618,9 +19617,9 @@ var require_Dialog_native = __commonJS({
19618
19617
  });
19619
19618
  }, [
19620
19619
  setOpen
19621
- ]), context = {
19622
- scope: __scopeDialog,
19623
- scopeKey,
19620
+ ]), adaptScope = `DialogAdapt${scope}`, context = {
19621
+ dialogScope: scope,
19622
+ adaptScope,
19624
19623
  triggerRef,
19625
19624
  contentRef,
19626
19625
  contentId,
@@ -19630,8 +19629,7 @@ var require_Dialog_native = __commonJS({
19630
19629
  onOpenChange: setOpen,
19631
19630
  onOpenToggle,
19632
19631
  modal,
19633
- disableRemoveScroll,
19634
- adaptName
19632
+ disableRemoveScroll
19635
19633
  };
19636
19634
  return React4.useImperativeHandle(ref, function() {
19637
19635
  return {
@@ -19640,15 +19638,16 @@ var require_Dialog_native = __commonJS({
19640
19638
  }, [
19641
19639
  setOpen
19642
19640
  ]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
19643
- scope: adaptName,
19641
+ scope: adaptScope,
19644
19642
  portal: {
19645
19643
  forwardProps: props
19646
19644
  },
19647
19645
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
19646
+ scope,
19648
19647
  ...context,
19649
19648
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogSheetController, {
19650
19649
  onOpenChange: setOpen,
19651
- __scopeDialog,
19650
+ scope,
19652
19651
  children
19653
19652
  })
19654
19653
  })
@@ -19664,11 +19663,8 @@ var require_Dialog_native = __commonJS({
19664
19663
  Sheet: import_sheet.Sheet.Controlled,
19665
19664
  FocusScope: import_focus_scope.FocusScopeController,
19666
19665
  Adapt: import_adapt.Adapt
19667
- }), getAdaptName = function(param) {
19668
- var { scopeKey, contentId } = param;
19669
- return `${scopeKey || contentId}DialogAdapt`;
19670
- }, DialogSheetController = function(props) {
19671
- var context = useDialogContext("DialogSheetController", props.__scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
19666
+ }), DialogSheetController = function(props) {
19667
+ var context = useDialogContext(props.scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
19672
19668
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
19673
19669
  onOpenChange: function(val) {
19674
19670
  if (isAdapted) {
@@ -19799,15 +19795,12 @@ var require_AlertDialog_native = __commonJS({
19799
19795
  },
19800
19796
  AlertDialogTrigger: function() {
19801
19797
  return AlertDialogTrigger;
19802
- },
19803
- createAlertDialogScope: function() {
19804
- return createAlertDialogScope;
19805
19798
  }
19806
19799
  });
19807
19800
  module2.exports = __toCommonJS2(AlertDialog_exports);
19808
- 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_create_context = require_index_native32(), import_dialog = require_index_native39(), import_helpers = require_index_native7(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = (0, import_create_context.createContextScope)(ROOT_NAME, [
19809
- import_dialog.createDialogScope
19810
- ]), useDialogScope = (0, import_dialog.createDialogScope)(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
19801
+ 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_dialog = require_index_native39(), import_helpers = require_index_native7(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), AlertScopePrefix = "Alert__", getAlertDialogScope = function(scope) {
19802
+ return AlertScopePrefix + scope;
19803
+ }, ROOT_NAME = "AlertDialog", TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
19811
19804
  name: TRIGGER_NAME
19812
19805
  }), AlertDialogTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19813
19806
  if (props.__native) {
@@ -19817,46 +19810,40 @@ var require_AlertDialog_native = __commonJS({
19817
19810
  onPress: (0, import_helpers.composeEventHandlers)(onPress, __onPress)
19818
19811
  });
19819
19812
  }
19820
- var { __scopeAlertDialog, ...triggerProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
19813
+ var { scope, ...triggerProps } = props;
19821
19814
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogTrigger, {
19822
- ...dialogScope,
19815
+ scope: getAlertDialogScope(scope),
19823
19816
  ...triggerProps,
19824
19817
  ref: forwardedRef
19825
19818
  });
19826
- });
19827
- AlertDialogTrigger.displayName = TRIGGER_NAME;
19828
- var PORTAL_NAME = "AlertDialogPortal", AlertDialogPortal = function(props) {
19829
- var { __scopeAlertDialog, ...portalProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
19819
+ }), AlertDialogPortal = function(props) {
19820
+ var { scope, ...portalProps } = props;
19830
19821
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogPortal, {
19831
- ...dialogScope,
19822
+ scope: getAlertDialogScope(scope),
19832
19823
  ...portalProps
19833
19824
  });
19834
- };
19835
- AlertDialogPortal.displayName = PORTAL_NAME;
19836
- var OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = (0, import_core12.styled)(import_dialog.DialogOverlayFrame, {
19825
+ }, OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = (0, import_core12.styled)(import_dialog.DialogOverlayFrame, {
19837
19826
  name: OVERLAY_NAME
19838
19827
  }), AlertDialogOverlay = AlertDialogOverlayFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19839
- var { __scopeAlertDialog, ...overlayProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
19828
+ var { scope, ...overlayProps } = props;
19840
19829
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogOverlay, {
19841
- ...dialogScope,
19830
+ scope: getAlertDialogScope(scope),
19842
19831
  ...overlayProps,
19843
19832
  ref: forwardedRef
19844
19833
  });
19845
- }));
19846
- AlertDialogOverlay.displayName = OVERLAY_NAME;
19847
- var CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19848
- var { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), cancelRef = React4.useRef(null);
19834
+ })), CONTENT_NAME = "AlertDialogContent", { Provider: AlertDialogContextProvider, useStyledContext: useAlertDialogContentContext } = (0, import_core12.createStyledContext)({}, "AlertDialogContext"), AlertDialogContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19835
+ var { scope, children, ...contentProps } = props, dialogScope = getAlertDialogScope(scope), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), cancelRef = React4.useRef(null);
19849
19836
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogWarningProvider, {
19850
19837
  contentName: CONTENT_NAME,
19851
19838
  titleName: TITLE_NAME,
19852
19839
  docsSlug: "alert-dialog",
19853
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AlertDialogContentProvider, {
19854
- scope: __scopeAlertDialog,
19840
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AlertDialogContextProvider, {
19841
+ scope,
19855
19842
  cancelRef,
19856
19843
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_dialog.DialogContent, {
19857
19844
  // @ts-ignore
19858
19845
  role: "alertdialog",
19859
- ...dialogScope,
19846
+ scope: dialogScope,
19860
19847
  ...contentProps,
19861
19848
  ref: composedRefs,
19862
19849
  onOpenAutoFocus: (0, import_helpers.composeEventHandlers)(contentProps.onOpenAutoFocus, function(event) {
@@ -19888,46 +19875,36 @@ var require_AlertDialog_native = __commonJS({
19888
19875
  })
19889
19876
  })
19890
19877
  });
19891
- });
19892
- AlertDialogContent.displayName = CONTENT_NAME;
19893
- var TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19894
- var { __scopeAlertDialog, ...titleProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
19878
+ }), TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19879
+ var { scope, ...titleProps } = props;
19895
19880
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogTitle, {
19896
- ...dialogScope,
19881
+ scope: getAlertDialogScope(scope),
19897
19882
  ...titleProps,
19898
19883
  ref: forwardedRef
19899
19884
  });
19900
- });
19901
- AlertDialogTitle.displayName = TITLE_NAME;
19902
- var DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19903
- var { __scopeAlertDialog, ...descriptionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
19885
+ }), DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19886
+ var { scope, ...descriptionProps } = props;
19904
19887
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogDescription, {
19905
- ...dialogScope,
19888
+ scope: getAlertDialogScope(scope),
19906
19889
  ...descriptionProps,
19907
19890
  ref: forwardedRef
19908
19891
  });
19909
- });
19910
- AlertDialogDescription.displayName = DESCRIPTION_NAME;
19911
- var ACTION_NAME = "AlertDialogAction", AlertDialogAction = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19912
- var { __scopeAlertDialog, ...actionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
19892
+ }), ACTION_NAME = "AlertDialogAction", AlertDialogAction = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19893
+ var { scope, ...actionProps } = props;
19913
19894
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, {
19914
- ...dialogScope,
19895
+ scope: getAlertDialogScope(scope),
19915
19896
  ...actionProps,
19916
19897
  ref: forwardedRef
19917
19898
  });
19918
- });
19919
- AlertDialogAction.displayName = ACTION_NAME;
19920
- var CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19921
- var { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
19899
+ }), CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
19900
+ var { scope, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(scope), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
19922
19901
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, {
19923
- ...dialogScope,
19902
+ scope: getAlertDialogScope(scope),
19924
19903
  ...cancelProps,
19925
19904
  ref
19926
19905
  });
19927
- });
19928
- AlertDialogCancel.displayName = CANCEL_NAME;
19929
- var AlertDialogInner = function(props) {
19930
- var { __scopeAlertDialog, native, ...alertDialogProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
19906
+ }), AlertDialogInner = function(props) {
19907
+ var { scope, native, ...alertDialogProps } = props, dialogScope = getAlertDialogScope(scope), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
19931
19908
  prop: props.open,
19932
19909
  defaultProp: props.defaultOpen || !1,
19933
19910
  onChange: props.onOpenChange,
@@ -19973,7 +19950,7 @@ var require_AlertDialog_native = __commonJS({
19973
19950
  setOpen(!0);
19974
19951
  }
19975
19952
  }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog, {
19976
- ...dialogScope,
19953
+ scope: dialogScope,
19977
19954
  ...alertDialogProps,
19978
19955
  modal: !0
19979
19956
  });
@@ -20464,7 +20441,7 @@ var require_Avatar_native = __commonJS({
20464
20441
  }
20465
20442
  });
20466
20443
  module2.exports = __toCommonJS2(Avatar_exports);
20467
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native32(), import_helpers = require_index_native7(), import_image = require_index_native41(), import_shapes = require_index_native42(), import_stacks3 = require_index_native24(), React4 = __toESM2(require("react")), AVATAR_NAME = "Avatar", [createAvatarContext, createAvatarScope] = (0, import_create_context.createContextScope)(AVATAR_NAME), [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME), IMAGE_NAME = "AvatarImage", AvatarImage = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
20444
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native33(), import_helpers = require_index_native7(), import_image = require_index_native41(), import_shapes = require_index_native42(), import_stacks3 = require_index_native24(), React4 = __toESM2(require("react")), AVATAR_NAME = "Avatar", [createAvatarContext, createAvatarScope] = (0, import_create_context.createContextScope)(AVATAR_NAME), [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME), IMAGE_NAME = "AvatarImage", AvatarImage = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
20468
20445
  var _getShapeSize, { __scopeAvatar, src, onLoadingStatusChange = function() {
20469
20446
  }, ...imageProps } = props, context = useAvatarContext(IMAGE_NAME, __scopeAvatar), [status, setStatus] = React4.useState("idle"), shapeSize = (0, import_core12.getVariableValue)((_getShapeSize = (0, import_shapes.getShapeSize)(
20470
20447
  context.size,
@@ -21846,7 +21823,7 @@ var require_Label_native = __commonJS({
21846
21823
  }
21847
21824
  });
21848
21825
  module2.exports = __toCommonJS2(Label_exports);
21849
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_create_context = require_index_native32(), import_focusable2 = require_index_native48(), import_get_button_sized2 = require_index_native23(), import_get_font_sized2 = require_index_native25(), import_text2 = require_index_native26(), import_web = require_index_native15(), React4 = __toESM2(require("react")), NAME = "Label", [LabelProvider, useLabelContextImpl] = (0, import_create_context.createContext)(NAME, {
21826
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_create_context = require_index_native33(), import_focusable2 = require_index_native48(), import_get_button_sized2 = require_index_native23(), import_get_font_sized2 = require_index_native25(), import_text2 = require_index_native26(), import_web = require_index_native15(), React4 = __toESM2(require("react")), NAME = "Label", [LabelProvider, useLabelContextImpl] = (0, import_create_context.createContext)(NAME, {
21850
21827
  id: void 0,
21851
21828
  controlRef: {
21852
21829
  current: null
@@ -22645,7 +22622,7 @@ var require_Form_native = __commonJS({
22645
22622
  }
22646
22623
  });
22647
22624
  module2.exports = __toCommonJS2(Form_exports);
22648
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native32(), import_helpers = require_index_native7(), FORM_NAME = "Form", FormFrame = (0, import_core12.styled)(import_core12.Stack, {
22625
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native33(), import_helpers = require_index_native7(), FORM_NAME = "Form", FormFrame = (0, import_core12.styled)(import_core12.Stack, {
22649
22626
  name: FORM_NAME,
22650
22627
  tag: "form"
22651
22628
  }), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.View, {
@@ -22887,7 +22864,7 @@ var require_Group_native = __commonJS({
22887
22864
  }
22888
22865
  });
22889
22866
  module2.exports = __toCommonJS2(Group_exports);
22890
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native32(), import_helpers = require_index_native7(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_useIndexedChildren = require_useIndexedChildren_native(), GROUP_NAME = "Group", [createGroupContext, createGroupScope] = (0, import_create_context.createContextScope)(GROUP_NAME), [GroupProvider, useGroupContext] = createGroupContext(GROUP_NAME), GroupFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
22867
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native33(), import_helpers = require_index_native7(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_useIndexedChildren = require_useIndexedChildren_native(), GROUP_NAME = "Group", [createGroupContext, createGroupScope] = (0, import_create_context.createContextScope)(GROUP_NAME), [GroupProvider, useGroupContext] = createGroupContext(GROUP_NAME), GroupFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
22891
22868
  name: "GroupFrame",
22892
22869
  variants: {
22893
22870
  unstyled: {
@@ -23835,17 +23812,20 @@ var require_Popper_native = __commonJS({
23835
23812
  PopperArrow: function() {
23836
23813
  return PopperArrow;
23837
23814
  },
23815
+ PopperArrowFrame: function() {
23816
+ return PopperArrowFrame;
23817
+ },
23838
23818
  PopperContent: function() {
23839
23819
  return PopperContent;
23840
23820
  },
23841
23821
  PopperContentFrame: function() {
23842
23822
  return PopperContentFrame;
23843
23823
  },
23844
- PopperContext: function() {
23845
- return PopperContext;
23824
+ PopperContextFast: function() {
23825
+ return PopperContextFast;
23846
23826
  },
23847
- PopperInfrequentContext: function() {
23848
- return PopperInfrequentContext;
23827
+ PopperContextSlow: function() {
23828
+ return PopperContextSlow;
23849
23829
  },
23850
23830
  PopperPositionContext: function() {
23851
23831
  return PopperPositionContext;
@@ -23853,20 +23833,59 @@ var require_Popper_native = __commonJS({
23853
23833
  PopperProvider: function() {
23854
23834
  return PopperProvider;
23855
23835
  },
23836
+ PopperProviderFast: function() {
23837
+ return PopperProviderFast;
23838
+ },
23839
+ PopperProviderSlow: function() {
23840
+ return PopperProviderSlow;
23841
+ },
23856
23842
  setupPopper: function() {
23857
23843
  return setupPopper;
23858
23844
  },
23859
23845
  usePopperContext: function() {
23860
23846
  return usePopperContext;
23861
23847
  },
23862
- usePopperInfrequentContext: function() {
23863
- return usePopperInfrequentContext;
23848
+ usePopperContextSlow: function() {
23849
+ return usePopperContextSlow;
23864
23850
  }
23865
23851
  });
23866
23852
  module2.exports = __toCommonJS2(Popper_exports);
23867
- 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)({
23868
- size: void 0
23869
- }), usePopperInfrequentContext = PopperInfrequentContext.useStyledContext, checkFloating = {
23853
+ 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(), PopperContextFast = (0, import_core12.createStyledContext)(
23854
+ // since we always provide this we can avoid setting here
23855
+ {},
23856
+ "Popper__"
23857
+ ), PopperPositionContext = import_core12.createStyledContext, { useStyledContext: usePopperContext, Provider: PopperProviderFast } = PopperContextFast, PopperContextSlow = (0, import_core12.createStyledContext)(
23858
+ // since we always provide this we can avoid setting here
23859
+ {},
23860
+ "PopperSlow__"
23861
+ ), { useStyledContext: usePopperContextSlow, Provider: PopperProviderSlow } = PopperContextSlow, PopperProvider = function(param) {
23862
+ var { scope, children, ...context } = param, slowContext = getContextSlow(context);
23863
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProviderFast, {
23864
+ scope,
23865
+ ...context,
23866
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProviderSlow, {
23867
+ scope,
23868
+ ...slowContext,
23869
+ children
23870
+ })
23871
+ });
23872
+ };
23873
+ function getContextSlow(context) {
23874
+ return {
23875
+ refs: context.refs,
23876
+ size: context.size,
23877
+ arrowRef: context.arrowRef,
23878
+ arrowStyle: context.arrowStyle,
23879
+ onArrowSize: context.onArrowSize,
23880
+ hasFloating: context.hasFloating,
23881
+ strategy: context.strategy,
23882
+ update: context.update,
23883
+ context: context.context,
23884
+ getFloatingProps: context.getFloatingProps,
23885
+ getReferenceProps: context.getFloatingProps
23886
+ };
23887
+ }
23888
+ var checkFloating = {
23870
23889
  name: "checkFloating",
23871
23890
  fn(data) {
23872
23891
  return {
@@ -23880,7 +23899,7 @@ var require_Popper_native = __commonJS({
23880
23899
  Object.assign(setupOptions, options);
23881
23900
  }
23882
23901
  function Popper(props) {
23883
- var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, passThrough, open, __scopePopper } = props, [arrowEl, setArrow] = React4.useState(null), [arrowSize, setArrowSize] = React4.useState(0), offsetOptions = offset2 ?? arrowSize, floatingStyle = React4.useRef({}), floating = (0, import_floating.useFloating)({
23902
+ var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, passThrough, open, scope } = props, [arrowEl, setArrow] = React4.useState(null), [arrowSize, setArrowSize] = React4.useState(0), offsetOptions = offset2 ?? arrowSize, floatingStyle = React4.useRef({}), floating = (0, import_floating.useFloating)({
23884
23903
  open: passThrough ? !1 : open || !0,
23885
23904
  strategy,
23886
23905
  placement,
@@ -23929,31 +23948,39 @@ var require_Popper_native = __commonJS({
23929
23948
  arrowRef: setArrow,
23930
23949
  arrowStyle: middlewareData.arrow,
23931
23950
  onArrowSize: setArrowSize,
23932
- scope: __scopePopper,
23933
23951
  hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
23934
23952
  ...floating
23935
23953
  };
23936
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperInfrequentContext.Provider, {
23937
- size: size2,
23938
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
23939
- ...popperContext,
23940
- children
23941
- })
23954
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
23955
+ scope,
23956
+ ...popperContext,
23957
+ children
23942
23958
  });
23943
23959
  }
23944
23960
  var PopperAnchor = import_stacks3.YStack.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
23945
- var { virtualRef, __scopePopper, ...anchorProps } = props, { getReferenceProps, refs } = usePopperContext(__scopePopper), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref, refs.setReference);
23961
+ var { virtualRef, scope, ...anchorProps } = props, { getReferenceProps, refs, update } = usePopperContextSlow(scope), ref = React4.useRef(null);
23946
23962
  React4.useEffect(function() {
23947
23963
  virtualRef && refs.setReference(virtualRef.current);
23948
23964
  }, [
23949
23965
  virtualRef
23950
23966
  ]);
23951
- var stackProps = {
23952
- ref: composedRefs,
23953
- ...anchorProps
23954
- };
23967
+ var stackProps = anchorProps, refProps = getReferenceProps ? getReferenceProps(stackProps) : null, composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
23955
23968
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
23956
- ...getReferenceProps ? getReferenceProps(stackProps) : stackProps
23969
+ ...refProps,
23970
+ ref: composedRefs,
23971
+ // this helps us with handling scoped poppers with many different targets
23972
+ // basically we wait for mouseEnter to ever set a reference and remove it on leave
23973
+ // otherwise floating ui gets confused by having >1 reference
23974
+ onMouseEnter: function(e) {
23975
+ ref.current instanceof HTMLElement && (refs.setReference(ref.current), setTimeout(function() {
23976
+ var _refProps_onPointerEnter;
23977
+ (_refProps_onPointerEnter = refProps.onPointerEnter) === null || _refProps_onPointerEnter === void 0 || _refProps_onPointerEnter.call(refProps, e), update();
23978
+ }));
23979
+ },
23980
+ onMouseLeave: function(e) {
23981
+ var _refProps_onMouseLeave;
23982
+ refProps == null || (_refProps_onMouseLeave = refProps.onMouseLeave) === null || _refProps_onMouseLeave === void 0 || _refProps_onMouseLeave.call(refProps, e), refs.setReference(null);
23983
+ }
23957
23984
  });
23958
23985
  })), PopperContentFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
23959
23986
  name: "PopperContent",
@@ -23980,7 +24007,7 @@ var require_Popper_native = __commonJS({
23980
24007
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
23981
24008
  }
23982
24009
  }), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
23983
- 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);
24010
+ var { scope, enableAnimationForPositionChange, children, passThrough, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size2 } = usePopperContext(scope), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), [needsMeasure, setNeedsMeasure] = React4.useState(enableAnimationForPositionChange);
23984
24011
  (0, import_constants4.useIsomorphicLayoutEffect)(function() {
23985
24012
  needsMeasure && x && y && setNeedsMeasure(!1);
23986
24013
  }, [
@@ -23998,9 +24025,9 @@ var require_Popper_native = __commonJS({
23998
24025
  position: strategy,
23999
24026
  opacity: 1,
24000
24027
  ...enableAnimationForPositionChange && {
24001
- // apply animation but disable it on initial render to avoid animating from 0 to the first position
24002
24028
  animation: rest.animation,
24003
24029
  animateOnly: needsMeasure ? [] : rest.animateOnly,
24030
+ // apply animation but disable it on initial render to avoid animating from 0 to the first position
24004
24031
  animatePresence: !1
24005
24032
  },
24006
24033
  ...hide2 && {
@@ -24008,7 +24035,7 @@ var require_Popper_native = __commonJS({
24008
24035
  animateOnly: []
24009
24036
  }
24010
24037
  }, { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;
24011
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
24038
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
24012
24039
  passThrough,
24013
24040
  ref: contentRefs,
24014
24041
  ...passThrough ? null : floatingProps,
@@ -24061,8 +24088,8 @@ var require_Popper_native = __commonJS({
24061
24088
  right: "left",
24062
24089
  bottom: "top",
24063
24090
  left: "right"
24064
- }, PopperArrow = PopperArrowFrame.styleable(function(propsIn, forwardedRef) {
24065
- var _context_arrowStyle, _context_arrowStyle1, { __scopePopper, ...rest } = propsIn, props = (0, import_core12.useProps)(rest), { offset: offset2, size: sizeProp, borderWidth = 0, ...arrowProps } = props, context = usePopperContext(__scopePopper), sizeVal = typeof sizeProp == "number" ? sizeProp : (0, import_core12.getVariableValue)((0, import_get_token2.getSpace)(sizeProp ?? context.size, {
24091
+ }, PopperArrow = /* @__PURE__ */ React4.forwardRef(function(propsIn, forwardedRef) {
24092
+ var _context_arrowStyle, _context_arrowStyle1, { scope, ...rest } = propsIn, props = (0, import_core12.useProps)(rest), { offset: offset2, size: sizeProp, borderWidth = 0, ...arrowProps } = props, context = usePopperContext(scope), sizeVal = typeof sizeProp == "number" ? sizeProp : (0, import_core12.getVariableValue)((0, import_get_token2.getSpace)(sizeProp ?? context.size, {
24066
24093
  shift: -2,
24067
24094
  bounds: [
24068
24095
  2
@@ -24292,8 +24319,12 @@ var require_Popover_native = __commonJS({
24292
24319
  }
24293
24320
  });
24294
24321
  module2.exports = __toCommonJS2(Popover_exports);
24295
- 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_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) {
24296
- var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
24322
+ 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_native32(), 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_useFloatingContext = require_useFloatingContext_native(), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, PopoverContext = (0, import_core12.createStyledContext)(
24323
+ // since we always provide this we can avoid setting here
24324
+ {},
24325
+ "Popover__"
24326
+ ), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24327
+ var { scope, ...rest } = props, context = usePopoverContext(scope), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
24297
24328
  return React4.useEffect(function() {
24298
24329
  return onCustomAnchorAdd(), function() {
24299
24330
  return onCustomAnchorRemove();
@@ -24302,12 +24333,12 @@ var require_Popover_native = __commonJS({
24302
24333
  onCustomAnchorAdd,
24303
24334
  onCustomAnchorRemove
24304
24335
  ]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperAnchor, {
24305
- __scopePopper: __scopePopover || POPOVER_SCOPE,
24336
+ scope,
24306
24337
  ...rest,
24307
24338
  ref: forwardedRef
24308
24339
  });
24309
24340
  }), PopoverTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24310
- var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
24341
+ var { scope, ...rest } = props, context = usePopoverContext(scope), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
24311
24342
  if (!props.children) return null;
24312
24343
  var trigger = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
24313
24344
  "aria-expanded": context.open,
@@ -24346,12 +24377,14 @@ var require_Popover_native = __commonJS({
24346
24377
  ...virtualRef && {
24347
24378
  virtualRef
24348
24379
  },
24349
- __scopePopper: __scopePopover || POPOVER_SCOPE,
24380
+ scope,
24350
24381
  asChild: rest.asChild,
24351
24382
  children: trigger
24352
24383
  });
24353
- }), PopoverContent = import_popper.PopperContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24354
- var { trapFocus, enableRemoveScroll = !1, zIndex, __scopePopover, ...contentImplProps } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React4.useRef(!1), [isFullyHidden, setIsFullyHidden] = React4.useState(!context.open);
24384
+ }), PopoverContentFrame = (0, import_core12.styled)(import_popper.PopperContentFrame, {
24385
+ name: "Popover"
24386
+ }), PopoverContent = PopoverContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24387
+ var { trapFocus, enableRemoveScroll = !1, zIndex, scope, ...contentImplProps } = props, context = usePopoverContext(scope), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React4.useRef(!1), [isFullyHidden, setIsFullyHidden] = React4.useState(!context.open);
24355
24388
  if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
24356
24389
  if (context.open) {
24357
24390
  var content = contentRef.current;
@@ -24363,17 +24396,18 @@ var require_Popover_native = __commonJS({
24363
24396
  var _contentImplProps_pointerEvents;
24364
24397
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverPortal, {
24365
24398
  passThrough: context.breakpointActive,
24366
- __scopePopover: __scopePopover || POPOVER_SCOPE,
24399
+ context,
24367
24400
  zIndex,
24368
24401
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
24369
24402
  passThrough: context.breakpointActive,
24370
24403
  pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
24371
24404
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
24372
24405
  ...contentImplProps,
24406
+ context,
24373
24407
  enableRemoveScroll,
24374
24408
  ref: composedRefs,
24375
24409
  setIsFullyHidden,
24376
- __scopePopover: __scopePopover || POPOVER_SCOPE,
24410
+ scope,
24377
24411
  // we make sure we're not trapping once it's been closed
24378
24412
  // (closed !== unmounted when animating out)
24379
24413
  trapFocus: trapFocus ?? context.open,
@@ -24399,7 +24433,7 @@ var require_Popover_native = __commonJS({
24399
24433
  })
24400
24434
  });
24401
24435
  })), useParentContexts = function(scope) {
24402
- var popperContext = (0, import_popper.usePopperContext)(scope || POPOVER_SCOPE), adaptContext = (0, import_adapt.useAdaptContext)(), context = usePopoverContext(scope || POPOVER_SCOPE);
24436
+ var context = usePopoverContext(scope), popperContext = (0, import_popper.usePopperContext)(scope), adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);
24403
24437
  return {
24404
24438
  popperContext,
24405
24439
  adaptContext,
@@ -24407,9 +24441,9 @@ var require_Popover_native = __commonJS({
24407
24441
  };
24408
24442
  };
24409
24443
  function RepropagateParentContexts(param) {
24410
- var { adaptContext, children, context, popperContext, scope } = param;
24411
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
24412
- scope,
24444
+ var { adaptContext, children, context, popperContext } = param;
24445
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperProvider, {
24446
+ scope: context.popoverScope,
24413
24447
  ...popperContext,
24414
24448
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
24415
24449
  ...context,
@@ -24421,40 +24455,40 @@ var require_Popover_native = __commonJS({
24421
24455
  });
24422
24456
  }
24423
24457
  var PortalAdaptSafe = function(param) {
24424
- var { children, __scopePopover } = param;
24458
+ var { children, context } = param;
24425
24459
  if (needsRepropagation) {
24426
- var scope = __scopePopover || POPOVER_SCOPE, parentContexts = useParentContexts(scope);
24460
+ var parentContexts = useParentContexts(context.popoverScope);
24427
24461
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
24462
+ scope: context.adaptScope,
24428
24463
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
24429
- scope,
24430
24464
  ...parentContexts,
24431
24465
  children
24432
24466
  })
24433
24467
  });
24434
24468
  }
24435
24469
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
24470
+ scope: context.adaptScope,
24436
24471
  children
24437
24472
  });
24438
24473
  };
24439
- function PopoverPortal(props) {
24440
- var scope = props.__scopePopover || POPOVER_SCOPE, zIndex = props.zIndex, themeName = (0, import_core12.useThemeName)(), content = props.children;
24474
+ function PopoverPortal(param) {
24475
+ var { context, zIndex, passThrough, children } = param, themeName = (0, import_core12.useThemeName)(), content = children;
24441
24476
  if (needsRepropagation) {
24442
- var parentContexts = useParentContexts(scope);
24477
+ var parentContexts = useParentContexts(context.popoverScope);
24443
24478
  content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
24444
- scope,
24445
24479
  ...parentContexts,
24446
24480
  children: content
24447
24481
  });
24448
24482
  }
24449
24483
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
24450
- passThrough: props.passThrough,
24484
+ passThrough,
24451
24485
  stackZIndex: !0,
24452
24486
  zIndex,
24453
24487
  children: (
24454
24488
  /* forceClassName avoids forced re-mount renders for some reason... see the HeadMenu as you change tints a few times */
24455
24489
  /* without this you'll see the site menu re-rendering. It must be something in wrapping children in Theme */
24456
24490
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
24457
- passThrough: props.passThrough,
24491
+ passThrough,
24458
24492
  contain: !0,
24459
24493
  forceClassName: !0,
24460
24494
  name: themeName,
@@ -24467,7 +24501,7 @@ var require_Popover_native = __commonJS({
24467
24501
  });
24468
24502
  }
24469
24503
  var PopoverContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24470
- var { trapFocus, __scopePopover, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, ...contentProps } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), { open, keepChildrenMounted } = context, handleExitComplete = React4.useCallback(function() {
24504
+ var { trapFocus, scope, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, context, ...contentProps } = props, { open, keepChildrenMounted } = context, handleExitComplete = React4.useCallback(function() {
24471
24505
  setIsFullyHidden == null || setIsFullyHidden(!0);
24472
24506
  }, [
24473
24507
  setIsFullyHidden
@@ -24483,19 +24517,20 @@ var require_Popover_native = __commonJS({
24483
24517
  lazyMount,
24484
24518
  passThrough: context.breakpointActive,
24485
24519
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
24486
- __scopePopper: __scopePopover || POPOVER_SCOPE,
24520
+ scope,
24487
24521
  "data-state": getState(open),
24488
24522
  id: context.contentId,
24489
24523
  ref: forwardedRef,
24490
24524
  passThrough: context.breakpointActive,
24491
24525
  ...contentProps,
24492
24526
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalAdaptSafe, {
24527
+ context,
24493
24528
  children: contents
24494
24529
  })
24495
24530
  }, context.contentId)
24496
24531
  });
24497
24532
  }), PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24498
- var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE);
24533
+ var { scope, ...rest } = props, context = usePopoverContext(scope);
24499
24534
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
24500
24535
  ...rest,
24501
24536
  ref: forwardedRef,
@@ -24505,16 +24540,16 @@ var require_Popover_native = __commonJS({
24505
24540
  return context == null || (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, !1, "press");
24506
24541
  })
24507
24542
  });
24508
- }), PopoverArrow = import_popper.PopperArrow.styleable(function(props, forwardedRef) {
24509
- var { __scopePopover, ...rest } = props, isAdapted = (0, import_adapt.useAdaptIsActive)();
24543
+ }), PopoverArrow = import_popper.PopperArrowFrame.styleable(function(props, forwardedRef) {
24544
+ var { scope, ...rest } = props, context = usePopoverContext(scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
24510
24545
  return isAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperArrow, {
24511
- __scopePopper: __scopePopover || POPOVER_SCOPE,
24546
+ scope,
24512
24547
  componentName: "PopoverArrow",
24513
24548
  ...rest,
24514
24549
  ref: forwardedRef
24515
24550
  });
24516
- }), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(props, ref) {
24517
- var context = usePopoverContext(POPOVER_SCOPE);
24551
+ }), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(param, ref) {
24552
+ var { scope, ...props } = param, context = usePopoverContext(scope);
24518
24553
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
24519
24554
  ref,
24520
24555
  // when adapted, no pointer events!
@@ -24523,14 +24558,16 @@ var require_Popover_native = __commonJS({
24523
24558
  passThrough: context.breakpointActive,
24524
24559
  ...props
24525
24560
  });
24526
- }), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
24527
- var id = React4.useId();
24561
+ }), DEFAULT_SCOPE = "", Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(param, ref) {
24562
+ var { scope = DEFAULT_SCOPE, ...props } = param, id = React4.useId(), adaptScope = `PopoverAdapt${scope}`;
24528
24563
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
24529
- scope: `${id}PopoverContents`,
24564
+ scope: adaptScope,
24530
24565
  portal: !0,
24531
24566
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverInner, {
24567
+ adaptScope,
24532
24568
  ref,
24533
24569
  id,
24570
+ scope,
24534
24571
  ...props
24535
24572
  })
24536
24573
  });
@@ -24545,7 +24582,7 @@ var require_Popover_native = __commonJS({
24545
24582
  Sheet: import_sheet.Sheet.Controlled,
24546
24583
  FocusScope: import_focus_scope.FocusScopeController
24547
24584
  }), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24548
- 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)({
24585
+ var { children, open: openProp, defaultOpen, onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus, id, adaptScope, ...restProps } = props, triggerRef = React4.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React4.useState(!1), viaRef = React4.useRef(void 0), [keepChildrenMounted] = (0, import_use_controllable_state.useControllableState)({
24549
24586
  prop: keepChildrenMountedProp,
24550
24587
  defaultProp: !1,
24551
24588
  transition: keepChildrenMountedProp === "lazy"
@@ -24557,7 +24594,7 @@ var require_Popover_native = __commonJS({
24557
24594
  }
24558
24595
  }), handleOpenChange = (0, import_core12.useEvent)(function(val, via) {
24559
24596
  viaRef.current = via, setOpen(val);
24560
- }), isAdapted = (0, import_adapt.useAdaptIsActive)(), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
24597
+ }), isAdapted = (0, import_adapt.useAdaptIsActive)(adaptScope), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
24561
24598
  open,
24562
24599
  setOpen: handleOpenChange,
24563
24600
  disable: isAdapted,
@@ -24582,6 +24619,8 @@ var require_Popover_native = __commonJS({
24582
24619
  };
24583
24620
  });
24584
24621
  var popoverContext = {
24622
+ popoverScope: scope,
24623
+ adaptScope,
24585
24624
  id,
24586
24625
  contentId: React4.useId(),
24587
24626
  triggerRef,
@@ -24602,22 +24641,23 @@ var require_Popover_native = __commonJS({
24602
24641
  keepChildrenMounted
24603
24642
  }, memoizedChildren = React4.useMemo(function() {
24604
24643
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
24605
- scope: __scopePopover || POPOVER_SCOPE,
24644
+ scope,
24606
24645
  ...popoverContext,
24607
24646
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
24647
+ context: popoverContext,
24608
24648
  onOpenChange: setOpen,
24609
24649
  children
24610
24650
  })
24611
24651
  });
24612
24652
  }, [
24613
- __scopePopover,
24653
+ scope,
24614
24654
  setOpen,
24615
24655
  children,
24616
24656
  ...Object.values(popoverContext)
24617
24657
  ]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.Popper, {
24618
24658
  open,
24619
24659
  passThrough: isAdapted,
24620
- __scopePopper: __scopePopover || POPOVER_SCOPE,
24660
+ scope,
24621
24661
  stayInFrame: !0,
24622
24662
  ...restProps,
24623
24663
  children: memoizedChildren
@@ -24633,7 +24673,7 @@ var require_Popover_native = __commonJS({
24633
24673
  return open ? "open" : "closed";
24634
24674
  }
24635
24675
  var PopoverSheetController = function(param) {
24636
- var { __scopePopover, ...props } = param, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
24676
+ var { context, ...props } = param, showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
24637
24677
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
24638
24678
  onOpenChange: function(val) {
24639
24679
  if (getShowSheet()) {
@@ -24646,7 +24686,7 @@ var require_Popover_native = __commonJS({
24646
24686
  children: props.children
24647
24687
  });
24648
24688
  }, useShowPopoverSheet = function(context) {
24649
- var isAdapted = (0, import_adapt.useAdaptIsActive)();
24689
+ var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
24650
24690
  return context.open === !1 ? !1 : isAdapted;
24651
24691
  };
24652
24692
  }
@@ -24759,7 +24799,7 @@ var require_Progress_native = __commonJS({
24759
24799
  }
24760
24800
  });
24761
24801
  module2.exports = __toCommonJS2(Progress_exports);
24762
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native32(), import_get_token2 = require_index_native22(), import_helpers = require_index_native7(), import_stacks3 = require_index_native24(), React4 = __toESM2(require("react")), PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] = (0, import_create_context.createContextScope)(PROGRESS_NAME), [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME), INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
24802
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native33(), import_get_token2 = require_index_native22(), import_helpers = require_index_native7(), import_stacks3 = require_index_native24(), React4 = __toESM2(require("react")), PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] = (0, import_create_context.createContextScope)(PROGRESS_NAME), [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME), INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
24763
24803
  name: INDICATOR_NAME,
24764
24804
  variants: {
24765
24805
  unstyled: {
@@ -25737,7 +25777,7 @@ var require_RadioGroupStyledContext_native = __commonJS({
25737
25777
  var import_core12 = require_index_native20(), RadioGroupStyledContext = (0, import_core12.createStyledContext)({
25738
25778
  size: "$true",
25739
25779
  scaleIcon: 1
25740
- });
25780
+ }, "RadioGroup");
25741
25781
  }
25742
25782
  });
25743
25783
 
@@ -26024,71 +26064,6 @@ var require_index_native66 = __commonJS({
26024
26064
  }
26025
26065
  });
26026
26066
 
26027
- // ../select/dist/cjs/constants.native.js
26028
- var require_constants_native5 = __commonJS({
26029
- "../select/dist/cjs/constants.native.js"(exports2, module2) {
26030
- "use strict";
26031
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
26032
- for (var name in all) __defProp2(target, name, {
26033
- get: all[name],
26034
- enumerable: !0
26035
- });
26036
- }, __copyProps2 = function(to, from, except, desc) {
26037
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
26038
- if (from && typeof from == "object" || typeof from == "function") try {
26039
- for (var _loop = function() {
26040
- var key = _step.value;
26041
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
26042
- get: function() {
26043
- return from[key];
26044
- },
26045
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
26046
- });
26047
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
26048
- } catch (err) {
26049
- _didIteratorError = !0, _iteratorError = err;
26050
- } finally {
26051
- try {
26052
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
26053
- } finally {
26054
- if (_didIteratorError)
26055
- throw _iteratorError;
26056
- }
26057
- }
26058
- return to;
26059
- }, __toCommonJS2 = function(mod) {
26060
- return __copyProps2(__defProp2({}, "__esModule", {
26061
- value: !0
26062
- }), mod);
26063
- }, constants_exports = {};
26064
- __export2(constants_exports, {
26065
- FALLBACK_THRESHOLD: function() {
26066
- return FALLBACK_THRESHOLD;
26067
- },
26068
- MIN_HEIGHT: function() {
26069
- return MIN_HEIGHT;
26070
- },
26071
- SCROLL_ARROW_THRESHOLD: function() {
26072
- return SCROLL_ARROW_THRESHOLD;
26073
- },
26074
- SCROLL_ARROW_VELOCITY: function() {
26075
- return SCROLL_ARROW_VELOCITY;
26076
- },
26077
- SELECT_NAME: function() {
26078
- return SELECT_NAME;
26079
- },
26080
- VIEWPORT_NAME: function() {
26081
- return VIEWPORT_NAME;
26082
- },
26083
- WINDOW_PADDING: function() {
26084
- return WINDOW_PADDING;
26085
- }
26086
- });
26087
- module2.exports = __toCommonJS2(constants_exports);
26088
- var SELECT_NAME = "Select", WINDOW_PADDING = 8, SCROLL_ARROW_VELOCITY = 8, SCROLL_ARROW_THRESHOLD = 8, MIN_HEIGHT = 80, FALLBACK_THRESHOLD = 16, VIEWPORT_NAME = "SelectViewport";
26089
- }
26090
- });
26091
-
26092
26067
  // ../select/dist/cjs/context.native.js
26093
26068
  var require_context_native2 = __commonJS({
26094
26069
  "../select/dist/cjs/context.native.js"(exports2, module2) {
@@ -26136,18 +26111,6 @@ var require_context_native2 = __commonJS({
26136
26111
  SelectProvider: function() {
26137
26112
  return SelectProvider;
26138
26113
  },
26139
- createSelectContext: function() {
26140
- return createSelectContext;
26141
- },
26142
- createSelectItemParentContext: function() {
26143
- return createSelectItemParentContext;
26144
- },
26145
- createSelectItemParentScope: function() {
26146
- return createSelectItemParentScope;
26147
- },
26148
- createSelectScope: function() {
26149
- return createSelectScope;
26150
- },
26151
26114
  useSelectContext: function() {
26152
26115
  return useSelectContext;
26153
26116
  },
@@ -26156,14 +26119,14 @@ var require_context_native2 = __commonJS({
26156
26119
  }
26157
26120
  });
26158
26121
  module2.exports = __toCommonJS2(context_exports);
26159
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context = require_index_native32(), import_constants4 = require_constants_native5(), [createSelectContext, createSelectScope] = (0, import_create_context.createContextScope)(import_constants4.SELECT_NAME), [SelectProvider, useSelectContext] = createSelectContext(import_constants4.SELECT_NAME), [createSelectItemParentContext, createSelectItemParentScope] = (0, import_create_context.createContextScope)(import_constants4.SELECT_NAME), [SelectItemParentProvider, useSelectItemParentContext] = createSelectContext(import_constants4.SELECT_NAME), ForwardSelectContext = function(param) {
26160
- var { __scopeSelect, context, itemContext, children } = param;
26122
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core12.createStyledContext)(null, "Select"), { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core12.createStyledContext)(null, "SelectItem"), ForwardSelectContext = function(param) {
26123
+ var { context, itemContext, children } = param;
26161
26124
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectProvider, {
26162
26125
  isInSheet: !0,
26163
- scope: __scopeSelect,
26126
+ scope: context.scopeName,
26164
26127
  ...context,
26165
26128
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemParentProvider, {
26166
- scope: __scopeSelect,
26129
+ scope: context.scopeName,
26167
26130
  ...itemContext,
26168
26131
  children
26169
26132
  })
@@ -26334,13 +26297,13 @@ var require_SelectItem_native = __commonJS({
26334
26297
  }
26335
26298
  });
26336
26299
  module2.exports = __toCommonJS2(SelectItem_exports);
26337
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_list_item = require_index_native56(), React4 = __toESM2(require("react")), import_context = require_context_native2(), ITEM_NAME = "SelectItem", [SelectItemContextProvider, useSelectItemContext] = (0, import_context.createSelectContext)(ITEM_NAME), SelectItem = import_list_item.ListItemFrame.styleable(function(props, forwardedRef) {
26338
- var { __scopeSelect, value, disabled = !1, textValue: textValueProp, index, ...restProps } = props, { props: listItemProps } = (0, import_list_item.useListItem)({
26300
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_list_item = require_index_native56(), import_core12 = require_index_native20(), React4 = __toESM2(require("react")), import_context = require_context_native2(), ITEM_NAME = "SelectItem", { Provider: SelectItemContextProvider, useStyledContext: useSelectItemContext } = (0, import_core12.createStyledContext)(null, ITEM_NAME), SelectItem = import_list_item.ListItemFrame.styleable(function(props, forwardedRef) {
26301
+ var { scope, value, disabled = !1, textValue: textValueProp, index, ...restProps } = props, { props: listItemProps } = (0, import_list_item.useListItem)({
26339
26302
  ...!props.unstyled && {
26340
26303
  ellipse: !0
26341
26304
  },
26342
26305
  ...restProps
26343
- }), context = (0, import_context.useSelectItemParentContext)(ITEM_NAME, __scopeSelect), { setSelectedIndex, listRef, setOpen, onChange, activeIndexSubscribe, valueSubscribe, allowMouseUpRef, allowSelectRef, setValueAtIndex, selectTimeoutRef, dataRef, interactions, shouldRenderWebNative, size: size2, onActiveChange, initialValue } = context, [isSelected, setSelected] = React4.useState(initialValue === value);
26306
+ }), context = (0, import_context.useSelectItemParentContext)(scope), { setSelectedIndex, listRef, setOpen, onChange, activeIndexSubscribe, valueSubscribe, allowMouseUpRef, allowSelectRef, setValueAtIndex, selectTimeoutRef, dataRef, interactions, shouldRenderWebNative, size: size2, onActiveChange, initialValue } = context, [isSelected, setSelected] = React4.useState(initialValue === value);
26344
26307
  React4.useEffect(function() {
26345
26308
  return activeIndexSubscribe(function(i) {
26346
26309
  var isActive = index === i;
@@ -26397,7 +26360,7 @@ var require_SelectItem_native = __commonJS({
26397
26360
  handleSelect
26398
26361
  ]);
26399
26362
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemContextProvider, {
26400
- scope: __scopeSelect,
26363
+ scope,
26401
26364
  value,
26402
26365
  textId: textId || "",
26403
26366
  isSelected,
@@ -26514,16 +26477,16 @@ var require_SelectItemText_native = __commonJS({
26514
26477
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
26515
26478
  }
26516
26479
  }), SelectItemText = SelectItemTextFrame.styleable(function(props, forwardedRef) {
26517
- var { __scopeSelect, className, ...itemTextProps } = props, context = (0, import_context.useSelectContext)(ITEM_TEXT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(ITEM_TEXT_NAME, __scopeSelect), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_TEXT_NAME, __scopeSelect), contents = React4.useRef(null);
26480
+ var { scope, className, ...itemTextProps } = props, context = (0, import_context.useSelectContext)(scope), itemParentContext = (0, import_context.useSelectItemParentContext)(scope), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), itemContext = (0, import_SelectItem.useSelectItemContext)(scope), contents = React4.useRef(null);
26518
26481
  return contents.current = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemTextFrame, {
26519
26482
  className,
26520
26483
  size: itemParentContext.size,
26521
26484
  id: itemContext.textId,
26522
26485
  ...itemTextProps,
26523
26486
  ref: composedRefs
26524
- }), React4.useEffect(function() {
26487
+ }), (0, import_core12.useIsomorphicLayoutEffect)(function() {
26525
26488
  itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents.current);
26526
- }, []), React4.useEffect(function() {
26489
+ }, []), (0, import_core12.useIsomorphicLayoutEffect)(function() {
26527
26490
  return itemParentContext.valueSubscribe(function(val) {
26528
26491
  val === itemContext.value && context.setSelectedItem(contents.current);
26529
26492
  });
@@ -26648,7 +26611,7 @@ var require_SelectTrigger_native = __commonJS({
26648
26611
  });
26649
26612
  module2.exports = __toCommonJS2(SelectTrigger_exports);
26650
26613
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_core12 = require_index_native20(), import_list_item = require_index_native56(), React4 = __toESM2(require("react")), import_context = require_context_native2(), TRIGGER_NAME = "SelectTrigger", isPointerCoarse = import_core12.isWeb && import_core12.isClient ? window.matchMedia("(pointer:coarse)").matches : !0, SelectTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
26651
- var _context_floatingContext, { __scopeSelect, disabled = !1, unstyled = !1, ...triggerProps } = props, context = (0, import_context.useSelectContext)(TRIGGER_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(TRIGGER_NAME, __scopeSelect), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (_context_floatingContext = context.floatingContext) === null || _context_floatingContext === void 0 ? void 0 : _context_floatingContext.refs.setReference);
26614
+ var _context_floatingContext, { scope, disabled = !1, unstyled = !1, ...triggerProps } = props, context = (0, import_context.useSelectContext)(scope), itemParentContext = (0, import_context.useSelectItemParentContext)(scope), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (_context_floatingContext = context.floatingContext) === null || _context_floatingContext === void 0 ? void 0 : _context_floatingContext.refs.setReference);
26652
26615
  return itemParentContext.shouldRenderWebNative ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_list_item.ListItem, {
26653
26616
  componentName: TRIGGER_NAME,
26654
26617
  unstyled,
@@ -26685,6 +26648,71 @@ var require_SelectTrigger_native = __commonJS({
26685
26648
  }
26686
26649
  });
26687
26650
 
26651
+ // ../select/dist/cjs/constants.native.js
26652
+ var require_constants_native5 = __commonJS({
26653
+ "../select/dist/cjs/constants.native.js"(exports2, module2) {
26654
+ "use strict";
26655
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
26656
+ for (var name in all) __defProp2(target, name, {
26657
+ get: all[name],
26658
+ enumerable: !0
26659
+ });
26660
+ }, __copyProps2 = function(to, from, except, desc) {
26661
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
26662
+ if (from && typeof from == "object" || typeof from == "function") try {
26663
+ for (var _loop = function() {
26664
+ var key = _step.value;
26665
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
26666
+ get: function() {
26667
+ return from[key];
26668
+ },
26669
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
26670
+ });
26671
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
26672
+ } catch (err) {
26673
+ _didIteratorError = !0, _iteratorError = err;
26674
+ } finally {
26675
+ try {
26676
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
26677
+ } finally {
26678
+ if (_didIteratorError)
26679
+ throw _iteratorError;
26680
+ }
26681
+ }
26682
+ return to;
26683
+ }, __toCommonJS2 = function(mod) {
26684
+ return __copyProps2(__defProp2({}, "__esModule", {
26685
+ value: !0
26686
+ }), mod);
26687
+ }, constants_exports = {};
26688
+ __export2(constants_exports, {
26689
+ FALLBACK_THRESHOLD: function() {
26690
+ return FALLBACK_THRESHOLD;
26691
+ },
26692
+ MIN_HEIGHT: function() {
26693
+ return MIN_HEIGHT;
26694
+ },
26695
+ SCROLL_ARROW_THRESHOLD: function() {
26696
+ return SCROLL_ARROW_THRESHOLD;
26697
+ },
26698
+ SCROLL_ARROW_VELOCITY: function() {
26699
+ return SCROLL_ARROW_VELOCITY;
26700
+ },
26701
+ SELECT_NAME: function() {
26702
+ return SELECT_NAME;
26703
+ },
26704
+ VIEWPORT_NAME: function() {
26705
+ return VIEWPORT_NAME;
26706
+ },
26707
+ WINDOW_PADDING: function() {
26708
+ return WINDOW_PADDING;
26709
+ }
26710
+ });
26711
+ module2.exports = __toCommonJS2(constants_exports);
26712
+ var SELECT_NAME = "Select", WINDOW_PADDING = 8, SCROLL_ARROW_VELOCITY = 8, SCROLL_ARROW_THRESHOLD = 8, MIN_HEIGHT = 80, FALLBACK_THRESHOLD = 16, VIEWPORT_NAME = "SelectViewport";
26713
+ }
26714
+ });
26715
+
26688
26716
  // ../select/dist/cjs/SelectViewport.native.js
26689
26717
  var require_SelectViewport_native = __commonJS({
26690
26718
  "../select/dist/cjs/SelectViewport.native.js"(exports2, module2) {
@@ -26729,12 +26757,12 @@ var require_SelectViewport_native = __commonJS({
26729
26757
  });
26730
26758
  module2.exports = __toCommonJS2(SelectViewport_native_exports);
26731
26759
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_core12 = require_index_native20(), import_constants4 = require_constants_native5(), import_context = require_context_native2(), SelectViewport = function(props) {
26732
- var { __scopeSelect, children } = props, context = (0, import_context.useSelectContext)(import_constants4.VIEWPORT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(import_constants4.VIEWPORT_NAME, __scopeSelect), themeName = (0, import_core12.useThemeName)(), adaptContext = (0, import_adapt.useAdaptContext)();
26760
+ var { scope, children } = props, context = (0, import_context.useSelectContext)(scope), itemParentContext = (0, import_context.useSelectItemParentContext)(scope), themeName = (0, import_core12.useThemeName)(), adaptContext = (0, import_adapt.useAdaptContext)();
26733
26761
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
26762
+ scope: context.adaptScope,
26734
26763
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
26735
26764
  name: themeName,
26736
26765
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.ForwardSelectContext, {
26737
- __scopeSelect,
26738
26766
  itemContext: itemParentContext,
26739
26767
  context,
26740
26768
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptContext.Provider, {
@@ -26793,7 +26821,7 @@ var require_useSelectBreakpointActive_native = __commonJS({
26793
26821
  });
26794
26822
  module2.exports = __toCommonJS2(useSelectBreakpointActive_exports);
26795
26823
  var import_adapt = require_index_native31(), useShowSelectSheet = function(context) {
26796
- var breakpointActive = (0, import_adapt.useAdaptIsActive)();
26824
+ var breakpointActive = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
26797
26825
  return context.open === !1 ? !1 : breakpointActive;
26798
26826
  };
26799
26827
  }
@@ -26867,7 +26895,7 @@ var require_Select_native = __commonJS({
26867
26895
  name: VALUE_NAME,
26868
26896
  userSelect: "none"
26869
26897
  }), SelectValue = SelectValueFrame.styleable(function(param, forwardedRef) {
26870
- var { __scopeSelect, children: childrenProp, placeholder, ...props } = param, context = (0, import_context.useSelectContext)(VALUE_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(VALUE_NAME, __scopeSelect), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.onValueNodeChange), children = childrenProp ?? context.selectedItem, isEmptyValue = context.value == null || context.value === "", selectValueChildren = isEmptyValue ? placeholder ?? children : children;
26898
+ var { scope, children: childrenProp, placeholder, ...props } = param, context = (0, import_context.useSelectContext)(scope), itemParentContext = (0, import_context.useSelectItemParentContext)(scope), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.onValueNodeChange), children = childrenProp ?? context.selectedItem, isEmptyValue = context.value == null || context.value === "", selectValueChildren = isEmptyValue ? placeholder ?? children : children;
26871
26899
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectValueFrame, {
26872
26900
  ...!props.unstyled && {
26873
26901
  size: itemParentContext.size,
@@ -26898,18 +26926,18 @@ var require_Select_native = __commonJS({
26898
26926
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_text2.Paragraph, {
26899
26927
  children: "\u25BC"
26900
26928
  })
26901
- }), ITEM_INDICATOR_NAME = "SelectItemIndicator", SelectItemIndicatorFrame = (0, import_core12.styled)(import_stacks3.XStack, {
26902
- name: import_SelectItemText.ITEM_TEXT_NAME
26929
+ }), SelectItemIndicatorFrame = (0, import_core12.styled)(import_stacks3.XStack, {
26930
+ name: "SelectItemIndicator"
26903
26931
  }), SelectItemIndicator = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
26904
- var { __scopeSelect, ...itemIndicatorProps } = props, context = (0, import_context.useSelectItemParentContext)(ITEM_INDICATOR_NAME, __scopeSelect), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_INDICATOR_NAME, __scopeSelect);
26932
+ var { scope, ...itemIndicatorProps } = props, context = (0, import_context.useSelectItemParentContext)(scope), itemContext = (0, import_SelectItem.useSelectItemContext)(scope);
26905
26933
  return context.shouldRenderWebNative ? null : itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemIndicatorFrame, {
26906
26934
  "aria-hidden": !0,
26907
26935
  ...itemIndicatorProps,
26908
26936
  ref: forwardedRef
26909
26937
  }) : null;
26910
- });
26911
- SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
26912
- var GROUP_NAME = "SelectGroup", [SelectGroupContextProvider, useSelectGroupContext] = (0, import_context.createSelectContext)(GROUP_NAME), SelectGroupFrame = (0, import_core12.styled)(import_stacks3.YStack, {
26938
+ }), GROUP_NAME = "SelectGroup", { Provider: SelectGroupContextProvider, useStyledContext: useSelectGroupContext } = (0, import_core12.createStyledContext)({
26939
+ id: ""
26940
+ }, "SelectGroup"), SelectGroupFrame = (0, import_core12.styled)(import_stacks3.YStack, {
26913
26941
  name: GROUP_NAME,
26914
26942
  width: "100%"
26915
26943
  }), NativeSelectTextFrame = (0, import_core12.styled)(import_text2.SizableText, {
@@ -26945,7 +26973,7 @@ var require_Select_native = __commonJS({
26945
26973
  size: "$2"
26946
26974
  }
26947
26975
  }), SelectGroup = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
26948
- var { __scopeSelect, ...groupProps } = props, groupId = React4.useId(), context = (0, import_context.useSelectContext)(GROUP_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(GROUP_NAME, __scopeSelect), _itemParentContext_size, size2 = (_itemParentContext_size = itemParentContext.size) !== null && _itemParentContext_size !== void 0 ? _itemParentContext_size : "$true", nativeSelectRef = React4.useRef(null), content = function() {
26976
+ var { scope, ...groupProps } = props, groupId = React4.useId(), context = (0, import_context.useSelectContext)(scope), itemParentContext = (0, import_context.useSelectItemParentContext)(scope), _itemParentContext_size, size2 = (_itemParentContext_size = itemParentContext.size) !== null && _itemParentContext_size !== void 0 ? _itemParentContext_size : "$true", nativeSelectRef = React4.useRef(null), content = function() {
26949
26977
  return itemParentContext.shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NativeSelectFrame, {
26950
26978
  asChild: !0,
26951
26979
  size: size2,
@@ -26975,14 +27003,14 @@ var require_Select_native = __commonJS({
26975
27003
  });
26976
27004
  }();
26977
27005
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectGroupContextProvider, {
26978
- scope: __scopeSelect,
27006
+ scope,
26979
27007
  id: groupId || "",
26980
27008
  children: content
26981
27009
  });
26982
27010
  });
26983
27011
  SelectGroup.displayName = GROUP_NAME;
26984
27012
  var LABEL_NAME = "SelectLabel", SelectLabel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
26985
- var { __scopeSelect, ...labelProps } = props, context = (0, import_context.useSelectItemParentContext)(LABEL_NAME, __scopeSelect), groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
27013
+ var { scope, ...labelProps } = props, context = (0, import_context.useSelectItemParentContext)(scope), groupContext = useSelectGroupContext(scope);
26986
27014
  return context.shouldRenderWebNative ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_list_item.ListItem, {
26987
27015
  tag: "div",
26988
27016
  componentName: LABEL_NAME,
@@ -26997,7 +27025,7 @@ var require_Select_native = __commonJS({
26997
27025
  var SelectSeparator = (0, import_core12.styled)(import_separator.Separator, {
26998
27026
  name: "SelectSeparator"
26999
27027
  }), SelectSheetController = function(props) {
27000
- var context = (0, import_context.useSelectContext)("SelectSheetController", props.__scopeSelect), showSheet = (0, import_useSelectBreakpointActive.useShowSelectSheet)(context), isAdapted = (0, import_adapt.useAdaptIsActive)(), getShowSheet = (0, import_core12.useGet)(showSheet);
27028
+ var context = (0, import_context.useSelectContext)(props.scope), showSheet = (0, import_useSelectBreakpointActive.useShowSelectSheet)(context), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope), getShowSheet = (0, import_core12.useGet)(showSheet);
27001
27029
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
27002
27030
  onOpenChange: function(val) {
27003
27031
  getShowSheet() && props.onOpenChange(val);
@@ -27011,12 +27039,13 @@ var require_Select_native = __commonJS({
27011
27039
  children: props.children
27012
27040
  });
27013
27041
  }, Select = (0, import_helpers.withStaticProperties)(function(props) {
27014
- var internalId = React4.useId(), _Object_keys_, scopeKey = props.__scopeSelect && (_Object_keys_ = Object.keys(props.__scopeSelect)[0]) !== null && _Object_keys_ !== void 0 ? _Object_keys_ : internalId;
27042
+ var adaptScope = `AdaptSelect${props.scope || ""}`;
27015
27043
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
27016
- scope: `${scopeKey}SheetContents`,
27044
+ scope: adaptScope,
27017
27045
  portal: !0,
27018
27046
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectInner, {
27019
- scopeKey,
27047
+ scope: props.scope,
27048
+ adaptScope,
27020
27049
  ...props
27021
27050
  })
27022
27051
  });
@@ -27055,7 +27084,7 @@ var require_Select_native = __commonJS({
27055
27084
  ];
27056
27085
  }
27057
27086
  function SelectInner(props) {
27058
- var { __scopeSelect, native, children, open: openProp, defaultOpen, onOpenChange, value: valueProp, defaultValue, onValueChange, disablePreventBodyScroll, size: sizeProp = "$true", onActiveChange, dir, id } = props, isAdapted = (0, import_adapt.useAdaptIsActive)(), SelectImpl = isAdapted || !import_constants4.isWeb ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl, forceUpdate = React4.useReducer(function() {
27087
+ var { scope = "", adaptScope, native, children, open: openProp, defaultOpen, onOpenChange, value: valueProp, defaultValue, onValueChange, disablePreventBodyScroll, size: sizeProp = "$true", onActiveChange, dir, id } = props, isAdapted = (0, import_adapt.useAdaptIsActive)(adaptScope), SelectImpl = isAdapted || !import_constants4.isWeb ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl, forceUpdate = React4.useReducer(function() {
27059
27088
  return {};
27060
27089
  }, {})[1], [selectedItem, setSelectedItem] = React4.useState(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
27061
27090
  prop: openProp,
@@ -27098,7 +27127,9 @@ var require_Select_native = __commonJS({
27098
27127
  });
27099
27128
  }, 1, {}, []);
27100
27129
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectItemParentProvider, {
27101
- scope: __scopeSelect,
27130
+ scopeName: scope,
27131
+ scope,
27132
+ adaptScope,
27102
27133
  initialValue: React4.useMemo(function() {
27103
27134
  return value;
27104
27135
  }, [
@@ -27112,9 +27143,8 @@ var require_Select_native = __commonJS({
27112
27143
  onChange: React4.useCallback(function(val) {
27113
27144
  setValue(val), emitValue(val);
27114
27145
  }, []),
27115
- onActiveChange: (0, import_core12.useEvent)(function() {
27116
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
27117
- onActiveChange == null || onActiveChange(...args);
27146
+ onActiveChange: (0, import_core12.useEvent)(function(value2, index) {
27147
+ onActiveChange == null || onActiveChange(value2, index);
27118
27148
  }),
27119
27149
  setSelectedIndex,
27120
27150
  setValueAtIndex: React4.useCallback(function(index, value2) {
@@ -27122,7 +27152,9 @@ var require_Select_native = __commonJS({
27122
27152
  }, []),
27123
27153
  shouldRenderWebNative,
27124
27154
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectProvider, {
27125
- scope: __scopeSelect,
27155
+ scope,
27156
+ scopeName: scope,
27157
+ adaptScope,
27126
27158
  disablePreventBodyScroll,
27127
27159
  dir,
27128
27160
  blockSelection: !1,
@@ -27132,7 +27164,6 @@ var require_Select_native = __commonJS({
27132
27164
  forceUpdate,
27133
27165
  valueNode,
27134
27166
  onValueNodeChange: setValueNode,
27135
- scopeKey: props.scopeKey,
27136
27167
  activeIndex,
27137
27168
  selectedIndex,
27138
27169
  setActiveIndex: setActiveIndexDebounced,
@@ -27141,7 +27172,7 @@ var require_Select_native = __commonJS({
27141
27172
  native,
27142
27173
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectSheetController, {
27143
27174
  onOpenChange: setOpen,
27144
- __scopeSelect,
27175
+ scope,
27145
27176
  children: shouldRenderWebNative ? children : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectImpl, {
27146
27177
  activeIndexRef,
27147
27178
  listContentRef,
@@ -30077,6 +30108,71 @@ var require_index_native74 = __commonJS({
30077
30108
  }
30078
30109
  });
30079
30110
 
30111
+ // ../../core/use-window-dimensions/dist/cjs/helpers.native.js
30112
+ var require_helpers_native4 = __commonJS({
30113
+ "../../core/use-window-dimensions/dist/cjs/helpers.native.js"(exports2, module2) {
30114
+ "use strict";
30115
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
30116
+ for (var name in all) __defProp2(target, name, {
30117
+ get: all[name],
30118
+ enumerable: !0
30119
+ });
30120
+ }, __copyProps2 = function(to, from, except, desc) {
30121
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
30122
+ if (from && typeof from == "object" || typeof from == "function") try {
30123
+ for (var _loop = function() {
30124
+ var key = _step.value;
30125
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
30126
+ get: function() {
30127
+ return from[key];
30128
+ },
30129
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
30130
+ });
30131
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
30132
+ } catch (err) {
30133
+ _didIteratorError = !0, _iteratorError = err;
30134
+ } finally {
30135
+ try {
30136
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
30137
+ } finally {
30138
+ if (_didIteratorError)
30139
+ throw _iteratorError;
30140
+ }
30141
+ }
30142
+ return to;
30143
+ }, __toCommonJS2 = function(mod) {
30144
+ return __copyProps2(__defProp2({}, "__esModule", {
30145
+ value: !0
30146
+ }), mod);
30147
+ }, helpers_native_exports = {};
30148
+ __export2(helpers_native_exports, {
30149
+ getWindowSize: function() {
30150
+ return getWindowSize;
30151
+ },
30152
+ subscribe: function() {
30153
+ return subscribe;
30154
+ }
30155
+ });
30156
+ module2.exports = __toCommonJS2(helpers_native_exports);
30157
+ var import_react_native4 = require_fake_react_native();
30158
+ function getWindowSize() {
30159
+ return import_react_native4.Dimensions.get("window");
30160
+ }
30161
+ var cbs = /* @__PURE__ */ new Set();
30162
+ import_react_native4.Dimensions.addEventListener("change", function(param) {
30163
+ var { window: window2 } = param;
30164
+ cbs.forEach(function(cb) {
30165
+ return cb(window2);
30166
+ });
30167
+ });
30168
+ function subscribe(cb) {
30169
+ return cbs.add(cb), function() {
30170
+ return cbs.delete(cb);
30171
+ };
30172
+ }
30173
+ }
30174
+ });
30175
+
30080
30176
  // ../../core/use-window-dimensions/dist/cjs/index.native.js
30081
30177
  var require_index_native75 = __commonJS({
30082
30178
  "../../core/use-window-dimensions/dist/cjs/index.native.js"(exports2, module2) {
@@ -30135,30 +30231,19 @@ var require_index_native75 = __commonJS({
30135
30231
  }
30136
30232
  });
30137
30233
  module2.exports = __toCommonJS2(index_exports2);
30138
- var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_react_native4 = require_fake_react_native(), initialValue = {
30139
- height: 800,
30140
- width: 600
30234
+ var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_helpers = require_helpers_native4(), initialValue = {
30235
+ width: 800,
30236
+ height: 600,
30237
+ scale: 1,
30238
+ fontScale: 1
30141
30239
  };
30142
30240
  function configureInitialWindowDimensions(next) {
30143
30241
  Object.assign(initialValue, next);
30144
30242
  }
30145
- import_react_native4.Dimensions.addEventListener("change", function() {
30146
- cbs.forEach(function(cb) {
30147
- return cb(window);
30148
- });
30149
- });
30150
- var cbs = /* @__PURE__ */ new Set();
30151
- function subscribe(cb) {
30152
- return cbs.add(cb), function() {
30153
- return cbs.delete(cb);
30154
- };
30155
- }
30156
30243
  function useWindowDimensions() {
30157
30244
  var { serverValue = initialValue } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
30158
- return import_react3.default.useSyncExternalStore(subscribe, function() {
30159
- return import_react_native4.Dimensions.get("window");
30160
- }, function() {
30161
- return import_constants4.isWeb ? serverValue : import_react_native4.Dimensions.get("window");
30245
+ return import_react3.default.useSyncExternalStore(import_helpers.subscribe, import_helpers.getWindowSize, function() {
30246
+ return import_constants4.isWeb ? serverValue : (0, import_helpers.getWindowSize)();
30162
30247
  });
30163
30248
  }
30164
30249
  }
@@ -30369,7 +30454,7 @@ __reExport(index_exports, __toESM(require_index_native46()), module.exports);
30369
30454
  __reExport(index_exports, __toESM(require_index_native47()), module.exports);
30370
30455
  __reExport(index_exports, __toESM(require_index_native52()), module.exports);
30371
30456
  __reExport(index_exports, __toESM(require_index_native11()), module.exports);
30372
- __reExport(index_exports, __toESM(require_index_native32()), module.exports);
30457
+ __reExport(index_exports, __toESM(require_index_native33()), module.exports);
30373
30458
  __reExport(index_exports, __toESM(require_index_native39()), module.exports);
30374
30459
  __reExport(index_exports, __toESM(require_index_native44()), module.exports);
30375
30460
  __reExport(index_exports, __toESM(require_index_native53()), module.exports);