tamagui 1.119.0 → 1.119.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/native.js CHANGED
@@ -7312,108 +7312,110 @@ var require_getSplitStyles_native = __commonJS({
7312
7312
  viewProps[key] = val;
7313
7313
  }
7314
7314
  }, keyInit = keyOg, valInit = props[keyInit];
7315
- if (process.env.NODE_ENV === "development" && debug === "profile" && time`prop-${keyInit}`, accept) {
7316
- var accepted = accept[keyInit];
7317
- if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") {
7318
- viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass);
7319
- continue;
7320
- }
7321
- }
7322
- if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
7323
- if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
7324
- if (keyInit === "group" && !1) var identifier, containerType, containerCSS;
7325
- continue;
7326
- }
7327
- var valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
7328
- if (0) {
7329
- if (staticConfig.isReactNative && keyInit.startsWith("data-")) var _viewProps, _dataSet;
7330
- if (isValidStyleKeyInit && valInitType === "string" && valInit[0] === "_") {
7331
- var isValidClassName, isMediaOrPseudo;
7332
- if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses) var _styleState;
7315
+ if (!(process.env.NODE_ENV === "test" && keyInit === "jestAnimatedStyle")) {
7316
+ if (process.env.NODE_ENV === "development" && debug === "profile" && time`prop-${keyInit}`, accept) {
7317
+ var accepted = accept[keyInit];
7318
+ if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") {
7319
+ viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass);
7320
+ continue;
7333
7321
  }
7334
7322
  }
7335
- if (!isValidStyleKeyInit) {
7336
- if (!import_constants4.isAndroid && keyInit === "elevationAndroid") continue;
7337
- if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
7338
- else if (keyInit.startsWith("data-")) continue;
7339
- }
7340
- if (keyInit === "dataSet") {
7341
- for (var keyInit1 in valInit) viewProps[`data-${hyphenate(keyInit1)}`] = valInit[keyInit1];
7342
- continue;
7343
- }
7344
- if (0) var didUseKeyInit;
7345
- var isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo1 = !!(isMedia || isPseudo);
7346
- if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
7347
- var name = keyInit.split("-")[1];
7348
- context != null && context.groups.subscribe && !(context != null && context.groups.state[name]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
7349
- }
7350
- var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
7351
- if (!(isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))) {
7352
- var shouldPassProp = !isStyleProp && isHOC || // is in parent variants
7353
- isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
7354
- if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`), (0, import_log.log)({
7355
- isVariant,
7356
- valInit,
7357
- shouldPassProp
7358
- }), import_constants4.isClient && (0, import_log.log)({
7359
- variants,
7360
- variant: variants == null ? void 0 : variants[keyInit],
7361
- isVariant,
7362
- isHOCShouldPassThrough,
7363
- parentStaticConfig
7364
- })), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant)) {
7365
- process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
7323
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
7324
+ if (keyInit in import_skipProps.skipProps && !noSkip && !isHOC) {
7325
+ if (keyInit === "group" && !1) var identifier, containerType, containerCSS;
7366
7326
  continue;
7367
7327
  }
7368
- if (!noSkip && keyInit in import_skipProps.skipProps) {
7369
- process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
7328
+ var valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
7329
+ if (0) {
7330
+ if (staticConfig.isReactNative && keyInit.startsWith("data-")) var _viewProps, _dataSet;
7331
+ if (isValidStyleKeyInit && valInitType === "string" && valInit[0] === "_") {
7332
+ var isValidClassName, isMediaOrPseudo;
7333
+ if ((isValidClassName || isMediaOrPseudo) && !shouldDoClasses) var _styleState;
7334
+ }
7335
+ }
7336
+ if (!isValidStyleKeyInit) {
7337
+ if (!import_constants4.isAndroid && keyInit === "elevationAndroid") continue;
7338
+ if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
7339
+ else if (keyInit.startsWith("data-")) continue;
7340
+ }
7341
+ if (keyInit === "dataSet") {
7342
+ for (var keyInit1 in valInit) viewProps[`data-${hyphenate(keyInit1)}`] = valInit[keyInit1];
7370
7343
  continue;
7371
7344
  }
7372
- (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
7373
- var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
7374
- if (!avoidPropMap) {
7375
- if (!expanded) continue;
7376
- var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
7377
- next && (styleState.fontFamily = next);
7345
+ if (0) var didUseKeyInit;
7346
+ var isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo1 = !!(isMedia || isPseudo);
7347
+ if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
7348
+ var name = keyInit.split("-")[1];
7349
+ context != null && context.groups.subscribe && !(context != null && context.groups.state[name]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
7378
7350
  }
7379
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
7380
- consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
7381
- try {
7382
- !import_constants4.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
7383
- expanded,
7384
- styleProps,
7385
- componentState,
7386
- isVariant,
7387
- variant: variants == null ? void 0 : variants[keyInit],
7388
- shouldPassProp,
7389
- isHOCShouldPassThrough,
7390
- usedKeys: {
7391
- ...usedKeys
7392
- }
7393
- }), globalThis.tamaguiAvoidTracking = !0, (0, import_log.log)("expanded", expanded, `
7351
+ var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !noExpand || isShorthand;
7352
+ if (!(isStyleProp && (asChild === "except-style" || asChild === "except-style-web"))) {
7353
+ var shouldPassProp = !isStyleProp && isHOC || // is in parent variants
7354
+ isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
7355
+ if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), consoleGroupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`), (0, import_log.log)({
7356
+ isVariant,
7357
+ valInit,
7358
+ shouldPassProp
7359
+ }), import_constants4.isClient && (0, import_log.log)({
7360
+ variants,
7361
+ variant: variants == null ? void 0 : variants[keyInit],
7362
+ isVariant,
7363
+ isHOCShouldPassThrough,
7364
+ parentStaticConfig
7365
+ })), shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo1), !isVariant)) {
7366
+ process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
7367
+ continue;
7368
+ }
7369
+ if (!noSkip && keyInit in import_skipProps.skipProps) {
7370
+ process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd();
7371
+ continue;
7372
+ }
7373
+ (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
7374
+ var avoidPropMap = isMediaOrPseudo1 || !isVariant && !isValidStyleKeyInit, expanded = avoidPropMap ? null : (0, import_propMapper.propMapper)(keyInit, valInit, styleState);
7375
+ if (!avoidPropMap) {
7376
+ if (!expanded) continue;
7377
+ var next = (0, import_propMapper.getPropMappedFontFamily)(expanded);
7378
+ next && (styleState.fontFamily = next);
7379
+ }
7380
+ if (process.env.NODE_ENV === "development" && debug === "verbose") {
7381
+ consoleGroupCollapsed(" \u{1F4A0} expanded", keyInit, valInit);
7382
+ try {
7383
+ !import_constants4.isServer && import_isDevTools.isDevTools && ((0, import_log.log)({
7384
+ expanded,
7385
+ styleProps,
7386
+ componentState,
7387
+ isVariant,
7388
+ variant: variants == null ? void 0 : variants[keyInit],
7389
+ shouldPassProp,
7390
+ isHOCShouldPassThrough,
7391
+ usedKeys: {
7392
+ ...usedKeys
7393
+ }
7394
+ }), globalThis.tamaguiAvoidTracking = !0, (0, import_log.log)("expanded", expanded, `
7394
7395
  usedKeys`, {
7395
- ...usedKeys
7396
- }, `
7396
+ ...usedKeys
7397
+ }, `
7397
7398
  current`, {
7398
- ...styleState.style
7399
- }), globalThis.tamaguiAvoidTracking = !1);
7400
- } catch {
7399
+ ...styleState.style
7400
+ }), globalThis.tamaguiAvoidTracking = !1);
7401
+ } catch {
7402
+ }
7403
+ console.groupEnd();
7401
7404
  }
7402
- console.groupEnd();
7403
- }
7404
- for (var key = keyInit, val = valInit, max2 = expanded ? expanded.length : 1, i = 0; i < max2; i++) _loop(i);
7405
- if (process.env.NODE_ENV === "development" && debug === "verbose") {
7406
- try {
7407
- (0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", {
7408
- ...styleState.style
7409
- }), (0, import_log.log)("transforms", {
7410
- ...transforms
7411
- }), (0, import_log.log)("viewProps", {
7412
- ...viewProps
7413
- });
7414
- } catch {
7405
+ for (var key = keyInit, val = valInit, max2 = expanded ? expanded.length : 1, i = 0; i < max2; i++) _loop(i);
7406
+ if (process.env.NODE_ENV === "development" && debug === "verbose") {
7407
+ try {
7408
+ (0, import_log.log)(" \u2714\uFE0F expand complete", keyInit), (0, import_log.log)("style", {
7409
+ ...styleState.style
7410
+ }), (0, import_log.log)("transforms", {
7411
+ ...transforms
7412
+ }), (0, import_log.log)("viewProps", {
7413
+ ...viewProps
7414
+ });
7415
+ } catch {
7416
+ }
7417
+ console.groupEnd();
7415
7418
  }
7416
- console.groupEnd();
7417
7419
  }
7418
7420
  }
7419
7421
  }
@@ -15596,10 +15598,80 @@ var require_constants_native3 = __commonJS({
15596
15598
  },
15597
15599
  USE_NATIVE_PORTAL: function() {
15598
15600
  return USE_NATIVE_PORTAL;
15601
+ },
15602
+ allPortalHosts: function() {
15603
+ return allPortalHosts;
15604
+ },
15605
+ portalListeners: function() {
15606
+ return portalListeners;
15599
15607
  }
15600
15608
  });
15601
15609
  module2.exports = __toCommonJS2(constants_exports);
15602
- var import_constants4 = require_index_native6(), _global__IS_FABRIC, IS_FABRIC = typeof global < "u" && !!((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager), USE_NATIVE_PORTAL = !import_constants4.isAndroid && process.env.TAMAGUI_USE_NATIVE_PORTAL !== "false" && !IS_FABRIC;
15610
+ var import_constants4 = require_index_native6(), _global__IS_FABRIC, IS_FABRIC = typeof global < "u" && !!((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager), USE_NATIVE_PORTAL = !import_constants4.isAndroid && process.env.TAMAGUI_USE_NATIVE_PORTAL !== "false" && !IS_FABRIC, allPortalHosts = /* @__PURE__ */ new Map(), portalListeners = {};
15611
+ }
15612
+ });
15613
+
15614
+ // ../portal/dist/cjs/useStackedZIndex.native.js
15615
+ var require_useStackedZIndex_native = __commonJS({
15616
+ "../portal/dist/cjs/useStackedZIndex.native.js"(exports2, module2) {
15617
+ "use strict";
15618
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
15619
+ for (var name in all) __defProp2(target, name, {
15620
+ get: all[name],
15621
+ enumerable: !0
15622
+ });
15623
+ }, __copyProps2 = function(to, from, except, desc) {
15624
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
15625
+ if (from && typeof from == "object" || typeof from == "function") try {
15626
+ for (var _loop = function() {
15627
+ var key = _step.value;
15628
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
15629
+ get: function() {
15630
+ return from[key];
15631
+ },
15632
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
15633
+ });
15634
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
15635
+ } catch (err) {
15636
+ _didIteratorError = !0, _iteratorError = err;
15637
+ } finally {
15638
+ try {
15639
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
15640
+ } finally {
15641
+ if (_didIteratorError)
15642
+ throw _iteratorError;
15643
+ }
15644
+ }
15645
+ return to;
15646
+ }, __toCommonJS2 = function(mod) {
15647
+ return __copyProps2(__defProp2({}, "__esModule", {
15648
+ value: !0
15649
+ }), mod);
15650
+ }, useStackedZIndex_exports = {};
15651
+ __export2(useStackedZIndex_exports, {
15652
+ useStackedZIndex: function() {
15653
+ return useStackedZIndex;
15654
+ }
15655
+ });
15656
+ module2.exports = __toCommonJS2(useStackedZIndex_exports);
15657
+ var import_react3 = require("react"), CurrentPortalZIndices = {}, useStackedZIndex = function(props) {
15658
+ var { stackZIndex, zIndex: zIndexProp = 1e3 } = props, zIndex = function() {
15659
+ if (stackZIndex) {
15660
+ var highest = Object.values(CurrentPortalZIndices).reduce(function(acc, cur) {
15661
+ return Math.max(acc, cur);
15662
+ }, 0);
15663
+ return Math.max(stackZIndex, highest + 1);
15664
+ }
15665
+ if (zIndexProp) return zIndexProp;
15666
+ }(), id = (0, import_react3.useId)();
15667
+ return (0, import_react3.useEffect)(function() {
15668
+ if (typeof zIndex == "number") return CurrentPortalZIndices[id] = zIndex, function() {
15669
+ delete CurrentPortalZIndices[id];
15670
+ };
15671
+ }, [
15672
+ zIndex
15673
+ ]), zIndex;
15674
+ };
15603
15675
  }
15604
15676
  });
15605
15677
 
@@ -15662,9 +15734,6 @@ var require_GorhomPortal_native = __commonJS({
15662
15734
  PortalHost: function() {
15663
15735
  return PortalHost;
15664
15736
  },
15665
- PortalItem: function() {
15666
- return PortalItem;
15667
- },
15668
15737
  PortalProvider: function() {
15669
15738
  return PortalProvider2;
15670
15739
  },
@@ -15673,7 +15742,7 @@ var require_GorhomPortal_native = __commonJS({
15673
15742
  }
15674
15743
  });
15675
15744
  module2.exports = __toCommonJS2(GorhomPortal_exports);
15676
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_start_transition = require_index_native9(), import_react3 = __toESM2(require("react")), import_react_dom = require("react-dom"), ACTIONS = /* @__PURE__ */ function(ACTIONS2) {
15745
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_start_transition = require_index_native9(), import_react3 = __toESM2(require("react")), import_constants22 = require_constants_native3(), ACTIONS = /* @__PURE__ */ function(ACTIONS2) {
15677
15746
  return ACTIONS2[ACTIONS2.REGISTER_HOST = 0] = "REGISTER_HOST", ACTIONS2[ACTIONS2.DEREGISTER_HOST = 1] = "DEREGISTER_HOST", ACTIONS2[ACTIONS2.ADD_UPDATE_PORTAL = 2] = "ADD_UPDATE_PORTAL", ACTIONS2[ACTIONS2.REMOVE_PORTAL = 3] = "REMOVE_PORTAL", ACTIONS2;
15678
15747
  }(ACTIONS || {}), INITIAL_STATE = {}, registerHost = function(state, hostName) {
15679
15748
  return hostName in state || (state[hostName] = []), state;
@@ -15789,7 +15858,7 @@ var require_GorhomPortal_native = __commonJS({
15789
15858
  }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHostNonNative, {
15790
15859
  ...props
15791
15860
  });
15792
- }), allPortalHosts = /* @__PURE__ */ new Map(), listeners = {};
15861
+ });
15793
15862
  function PortalHostWeb(props) {
15794
15863
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
15795
15864
  style: {
@@ -15797,11 +15866,11 @@ var require_GorhomPortal_native = __commonJS({
15797
15866
  },
15798
15867
  ref: function(node) {
15799
15868
  if (node) {
15800
- var _listeners_props_name;
15801
- allPortalHosts.set(props.name, node), (_listeners_props_name = listeners[props.name]) === null || _listeners_props_name === void 0 || _listeners_props_name.forEach(function(x) {
15869
+ var _portalListeners_props_name;
15870
+ import_constants22.allPortalHosts.set(props.name, node), (_portalListeners_props_name = import_constants22.portalListeners[props.name]) === null || _portalListeners_props_name === void 0 || _portalListeners_props_name.forEach(function(x) {
15802
15871
  return x(node);
15803
15872
  });
15804
- } else allPortalHosts.delete(props.name);
15873
+ } else import_constants22.allPortalHosts.delete(props.name);
15805
15874
  }
15806
15875
  });
15807
15876
  }
@@ -15823,59 +15892,12 @@ var require_GorhomPortal_native = __commonJS({
15823
15892
  return item.node;
15824
15893
  }));
15825
15894
  }
15826
- var PortalItem = /* @__PURE__ */ (0, import_react3.memo)(function(props) {
15827
- return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalItemWeb, {
15828
- ...props
15829
- }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NonNativePortalComponent, {
15830
- ...props
15831
- });
15832
- }), PortalItemWeb = function(props) {
15833
- if (!props.hostName) throw new Error("No name");
15834
- var cur = allPortalHosts.get(props.hostName), [node, setNode] = (0, import_react3.useState)(cur);
15835
- return cur && !node && setNode(cur), (0, import_react3.useEffect)(function() {
15836
- var _listeners, _props_hostName;
15837
- if (props.hostName && !node) {
15838
- var listener = function(node2) {
15839
- setNode(node2);
15840
- };
15841
- return (_listeners = listeners)[_props_hostName = props.hostName] || (_listeners[_props_hostName] = /* @__PURE__ */ new Set()), listeners[props.hostName].add(listener), function() {
15842
- var _listeners_props_hostName;
15843
- (_listeners_props_hostName = listeners[props.hostName]) === null || _listeners_props_hostName === void 0 || _listeners_props_hostName.delete(listener);
15844
- };
15845
- }
15846
- }, [
15847
- node
15848
- ]), node ? /* @__PURE__ */ (0, import_react_dom.createPortal)(props.children, node) : null;
15849
- }, NonNativePortalComponent = function(props) {
15850
- var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passthrough } = props, { addPortal: addUpdatePortal2, removePortal: removePortal2 } = usePortal(hostName), id = (0, import_react3.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(function() {
15851
- _providedHandleOnMount ? _providedHandleOnMount(function() {
15852
- return addUpdatePortal2(name, children);
15853
- }) : addUpdatePortal2(name, children);
15854
- }), handleOnUnmount = (0, import_core12.useEvent)(function() {
15855
- _providedHandleOnUnmount ? _providedHandleOnUnmount(function() {
15856
- return removePortal2(name);
15857
- }) : removePortal2(name);
15858
- }), handleOnUpdate = (0, import_core12.useEvent)(function() {
15859
- _providedHandleOnUpdate ? _providedHandleOnUpdate(function() {
15860
- return addUpdatePortal2(name, children);
15861
- }) : addUpdatePortal2(name, children);
15862
- });
15863
- return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
15864
- if (!passthrough) return handleOnMount(), function() {
15865
- handleOnUnmount();
15866
- };
15867
- }, []), (0, import_react3.useEffect)(function() {
15868
- passthrough || handleOnUpdate();
15869
- }, [
15870
- children
15871
- ]), passthrough ? children : null;
15872
- };
15873
15895
  }
15874
15896
  });
15875
15897
 
15876
- // ../portal/dist/cjs/useStackedZIndex.native.js
15877
- var require_useStackedZIndex_native = __commonJS({
15878
- "../portal/dist/cjs/useStackedZIndex.native.js"(exports2, module2) {
15898
+ // ../portal/dist/cjs/GorhomPortalItem.native.js
15899
+ var require_GorhomPortalItem_native = __commonJS({
15900
+ "../portal/dist/cjs/GorhomPortalItem.native.js"(exports2, module2) {
15879
15901
  "use strict";
15880
15902
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
15881
15903
  for (var name in all) __defProp2(target, name, {
@@ -15909,30 +15931,36 @@ var require_useStackedZIndex_native = __commonJS({
15909
15931
  return __copyProps2(__defProp2({}, "__esModule", {
15910
15932
  value: !0
15911
15933
  }), mod);
15912
- }, useStackedZIndex_exports = {};
15913
- __export2(useStackedZIndex_exports, {
15914
- useStackedZIndex: function() {
15915
- return useStackedZIndex;
15934
+ }, GorhomPortalItem_native_exports = {};
15935
+ __export2(GorhomPortalItem_native_exports, {
15936
+ GorhomPortalItem: function() {
15937
+ return GorhomPortalItem;
15916
15938
  }
15917
15939
  });
15918
- module2.exports = __toCommonJS2(useStackedZIndex_exports);
15919
- var import_react3 = require("react"), CurrentPortalZIndices = {}, useStackedZIndex = function(props) {
15920
- var { stackZIndex, zIndex: zIndexProp = 1e3 } = props, zIndex = function() {
15921
- if (stackZIndex) {
15922
- var highest = Object.values(CurrentPortalZIndices).reduce(function(acc, cur) {
15923
- return Math.max(acc, cur);
15924
- }, 0);
15925
- return Math.max(stackZIndex, highest + 1);
15926
- }
15927
- if (zIndexProp) return zIndexProp;
15928
- }(), id = (0, import_react3.useId)();
15929
- return (0, import_react3.useEffect)(function() {
15930
- if (typeof zIndex == "number") return CurrentPortalZIndices[id] = zIndex, function() {
15931
- delete CurrentPortalZIndices[id];
15940
+ module2.exports = __toCommonJS2(GorhomPortalItem_native_exports);
15941
+ var import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_react3 = require("react"), import_GorhomPortal = require_GorhomPortal_native(), GorhomPortalItem = function(props) {
15942
+ var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passthrough } = props, { addPortal: addUpdatePortal, removePortal } = (0, import_GorhomPortal.usePortal)(hostName), id = (0, import_react3.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(function() {
15943
+ _providedHandleOnMount ? _providedHandleOnMount(function() {
15944
+ return addUpdatePortal(name, children);
15945
+ }) : addUpdatePortal(name, children);
15946
+ }), handleOnUnmount = (0, import_core12.useEvent)(function() {
15947
+ _providedHandleOnUnmount ? _providedHandleOnUnmount(function() {
15948
+ return removePortal(name);
15949
+ }) : removePortal(name);
15950
+ }), handleOnUpdate = (0, import_core12.useEvent)(function() {
15951
+ _providedHandleOnUpdate ? _providedHandleOnUpdate(function() {
15952
+ return addUpdatePortal(name, children);
15953
+ }) : addUpdatePortal(name, children);
15954
+ });
15955
+ return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
15956
+ if (!passthrough) return handleOnMount(), function() {
15957
+ handleOnUnmount();
15932
15958
  };
15959
+ }, []), (0, import_react3.useEffect)(function() {
15960
+ passthrough || handleOnUpdate();
15933
15961
  }, [
15934
- zIndex
15935
- ]), zIndex;
15962
+ children
15963
+ ]), passthrough ? children : null;
15936
15964
  };
15937
15965
  }
15938
15966
  });
@@ -15992,7 +16020,7 @@ var require_Portal_native = __commonJS({
15992
16020
  }
15993
16021
  });
15994
16022
  module2.exports = __toCommonJS2(Portal_native_exports);
15995
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_stacks3 = require_index_native21(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_constants4 = require_constants_native3(), import_GorhomPortal = require_GorhomPortal_native(), import_useStackedZIndex = require_useStackedZIndex_native(), createPortal = function() {
16023
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_stacks3 = require_index_native21(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_constants4 = require_constants_native3(), import_useStackedZIndex = require_useStackedZIndex_native(), import_GorhomPortalItem = require_GorhomPortalItem_native(), createPortal = function() {
15996
16024
  return import_constants4.IS_FABRIC ? require("react-native/Libraries/Renderer/shims/ReactFabric").createPortal : require("react-native/Libraries/Renderer/shims/ReactNative").createPortal;
15997
16025
  }(), Portal = function(propsIn) {
15998
16026
  var { stackZIndex, ...props } = propsIn, rootTag = React4.useContext(import_react_native4.RootTagContext), zIndex = (0, import_useStackedZIndex.useStackedZIndex)(propsIn), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
@@ -16003,7 +16031,7 @@ var require_Portal_native = __commonJS({
16003
16031
  ...props,
16004
16032
  zIndex
16005
16033
  });
16006
- return !import_constants4.USE_NATIVE_PORTAL || !rootTag ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GorhomPortal.PortalItem, {
16034
+ return !import_constants4.USE_NATIVE_PORTAL || !rootTag ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GorhomPortalItem.GorhomPortalItem, {
16007
16035
  hostName: "root",
16008
16036
  children: contents
16009
16037
  }) : createPortal(contents, rootTag);
@@ -16051,7 +16079,12 @@ var require_PortalProps_native = __commonJS({
16051
16079
  var require_index_native26 = __commonJS({
16052
16080
  "../portal/dist/cjs/index.native.js"(exports2, module2) {
16053
16081
  "use strict";
16054
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
16082
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
16083
+ for (var name in all) __defProp2(target, name, {
16084
+ get: all[name],
16085
+ enumerable: !0
16086
+ });
16087
+ }, __copyProps2 = function(to, from, except, desc) {
16055
16088
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
16056
16089
  if (from && typeof from == "object" || typeof from == "function") try {
16057
16090
  for (var _loop = function() {
@@ -16081,10 +16114,16 @@ var require_index_native26 = __commonJS({
16081
16114
  value: !0
16082
16115
  }), mod);
16083
16116
  }, src_exports2 = {};
16117
+ __export2(src_exports2, {
16118
+ PortalItem: function() {
16119
+ return import_GorhomPortalItem.GorhomPortalItem;
16120
+ }
16121
+ });
16084
16122
  module2.exports = __toCommonJS2(src_exports2);
16085
16123
  __reExport2(src_exports2, require_Portal_native(), module2.exports);
16086
16124
  __reExport2(src_exports2, require_PortalProps_native(), module2.exports);
16087
16125
  __reExport2(src_exports2, require_GorhomPortal_native(), module2.exports);
16126
+ var import_GorhomPortalItem = require_GorhomPortalItem_native();
16088
16127
  __reExport2(src_exports2, require_constants_native3(), module2.exports);
16089
16128
  }
16090
16129
  });