tamagui 1.115.4 → 1.116.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/native.js CHANGED
@@ -3000,8 +3000,8 @@ var require_useMedia_native = __commonJS({
3000
3000
  }), mod);
3001
3001
  }, useMedia_exports = {};
3002
3002
  __export2(useMedia_exports, {
3003
- _dmt: function() {
3004
- return _dmt;
3003
+ _disableMediaTouch: function() {
3004
+ return _disableMediaTouch2;
3005
3005
  },
3006
3006
  configureMedia: function() {
3007
3007
  return configureMedia2;
@@ -3050,7 +3050,7 @@ var require_useMedia_native = __commonJS({
3050
3050
  }
3051
3051
  });
3052
3052
  module2.exports = __toCommonJS2(useMedia_exports);
3053
- var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDisableSSR = require_useDisableSSR_native(), mediaState3 = (
3053
+ var import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDisableSSR = require_useDisableSSR_native(), mediaState3 = (
3054
3054
  // development only safeguard
3055
3055
  process.env.NODE_ENV === "development" ? new Proxy({}, {
3056
3056
  get(target, key) {
@@ -3079,7 +3079,7 @@ var require_useMedia_native = __commonJS({
3079
3079
  for (var key in media) mediaState3[key] = (mediaQueryDefaultActive == null ? void 0 : mediaQueryDefaultActive[key]) || !1, mediaKeys.add(`$${key}`);
3080
3080
  Object.assign(mediaQueryConfig3, media), initState = {
3081
3081
  ...mediaState3
3082
- }, mediaKeysOrdered = Object.keys(media), config.disableSSR ? setupMediaListeners() : updateCurrentState();
3082
+ }, mediaKeysOrdered = Object.keys(media), setupMediaListeners();
3083
3083
  }
3084
3084
  };
3085
3085
  function unlisten() {
@@ -3132,48 +3132,64 @@ var require_useMedia_native = __commonJS({
3132
3132
  listeners.delete(subscriber);
3133
3133
  };
3134
3134
  }
3135
- function useMedia3(uidIn, componentContext, debug) {
3136
- var uid = uidIn ?? import_react3.default.useRef(), disableSSR = (0, import_useDisableSSR.getDisableSSR)(componentContext), initialState = (disableSSR || !import_constants4.isWeb ? mediaState3 : initState) || {}, componentState = States.get(uid);
3137
- componentState || (componentState = {
3138
- prev: initialState
3139
- }, States.set(uid, componentState));
3140
- var getSnapshot = function() {
3141
- if (!componentState) return initialState;
3142
- var { enabled, keys, prev = initialState } = componentState;
3143
- if (enabled === !1) return prev;
3144
- var _ref, testKeys = (_ref = (keys != null || enabled) && keys) !== null && _ref !== void 0 ? _ref : null, hasntUpdated = !testKeys || Object.keys(testKeys).every(function(key) {
3145
- return mediaState3[key] === prev[key];
3146
- });
3147
- return hasntUpdated ? prev : (componentState.prev = mediaState3, mediaState3);
3148
- }, state;
3149
- if (process.env.TAMAGUI_SYNC_MEDIA_QUERY) state = import_react3.default.useSyncExternalStore(subscribe, getSnapshot, function() {
3150
- return initialState;
3151
- });
3152
- else {
3153
- var [_state, setState] = import_react3.default.useState(initialState);
3154
- state = _state, (0, import_constants4.useIsomorphicLayoutEffect)(function() {
3155
- function update() {
3156
- setState(getSnapshot);
3135
+ function useMedia3(cc, debug) {
3136
+ var disableSSR = (0, import_config.getSetting)("disableSSR") || (0, import_useDisableSSR.getDisableSSR)(cc), initialState = disableSSR || !import_constants4.isWeb ? mediaState3 : initState, [state, setState] = import_react3.default.useState(initialState), currentKeys, getCurrentKeys = function() {
3137
+ return currentKeys;
3138
+ };
3139
+ function getSnapshot(cur) {
3140
+ var keys = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : cur.lastKeys;
3141
+ if (!keys) return cur;
3142
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
3143
+ try {
3144
+ for (var _iterator = keys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
3145
+ var key = _step.value;
3146
+ if (mediaState3[key] !== cur[key]) return process.env.NODE_ENV === "development" && debug && console.warn("useMedia()\u270D\uFE0F", key, cur[key], ">", mediaState3[key]), {
3147
+ ...mediaState3,
3148
+ lastKeys: new Set(keys)
3149
+ };
3157
3150
  }
3158
- return update(), disableSSR || Promise.resolve().then(function() {
3159
- update();
3160
- }), subscribe(update);
3161
- }, []);
3151
+ } catch (err) {
3152
+ _didIteratorError = !0, _iteratorError = err;
3153
+ } finally {
3154
+ try {
3155
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
3156
+ } finally {
3157
+ if (_didIteratorError) throw _iteratorError;
3158
+ }
3159
+ }
3160
+ return cur;
3162
3161
  }
3163
- return new Proxy(state, {
3162
+ var isRendering = !0, isInitialState = state === initialState;
3163
+ return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
3164
+ isRendering = !1;
3165
+ }), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
3166
+ var update = function() {
3167
+ return setState(function(prev) {
3168
+ return getSnapshot(
3169
+ prev,
3170
+ // because the !didHydrateOnce logic we can't update as we render
3171
+ // we need to get the current keys in case we added
3172
+ // these only ever add keys so likely ok?
3173
+ getCurrentKeys()
3174
+ );
3175
+ });
3176
+ };
3177
+ return update(), subscribe(update);
3178
+ }, []), new Proxy(state, {
3164
3179
  get(_, key) {
3165
- if (!disableMediaTouch) {
3166
- if (typeof key == "string") {
3167
- var _componentState;
3168
- (_componentState = componentState).keys || (_componentState.keys = {}), componentState.keys[key] = !0, process.env.NODE_ENV === "development" && debug && console.info("useMedia() TOUCH", key);
3180
+ if (isRendering && !disableMediaTouch && typeof key == "string") {
3181
+ var needsUpdateKeys = !state.lastKeys || !state.lastKeys.has(key);
3182
+ if ((needsUpdateKeys || state[key] !== mediaState3[key]) && (process.env.NODE_ENV === "development" && debug && console.info("useMedia() TOUCH", key), currentKeys || (currentKeys = /* @__PURE__ */ new Set()), currentKeys.add(key), !isInitialState)) {
3183
+ var next = getSnapshot(state, currentKeys);
3184
+ next !== state && setState(next);
3169
3185
  }
3170
- return Reflect.get(state, key);
3171
3186
  }
3187
+ return Reflect.get(state, key);
3172
3188
  }
3173
3189
  });
3174
3190
  }
3175
3191
  var disableMediaTouch = !1;
3176
- function _dmt(val) {
3192
+ function _disableMediaTouch2(val) {
3177
3193
  disableMediaTouch = val;
3178
3194
  }
3179
3195
  function getMediaState(mediaGroups, layout) {
@@ -4605,9 +4621,6 @@ var require_defaultComponentState_native = __commonJS({
4605
4621
  },
4606
4622
  defaultComponentStateMounted: function() {
4607
4623
  return defaultComponentStateMounted;
4608
- },
4609
- defaultComponentStateShouldEnter: function() {
4610
- return defaultComponentStateShouldEnter;
4611
4624
  }
4612
4625
  });
4613
4626
  module2.exports = __toCommonJS2(defaultComponentState_exports);
@@ -4622,9 +4635,6 @@ var require_defaultComponentState_native = __commonJS({
4622
4635
  }, defaultComponentStateMounted = {
4623
4636
  ...defaultComponentState,
4624
4637
  unmounted: !1
4625
- }, defaultComponentStateShouldEnter = {
4626
- ...defaultComponentState,
4627
- unmounted: "should-enter"
4628
4638
  };
4629
4639
  }
4630
4640
  });
@@ -5665,6 +5675,111 @@ var require_getStylesAtomic_native = __commonJS({
5665
5675
  }
5666
5676
  });
5667
5677
 
5678
+ // ../../core/web/dist/cjs/helpers/isActivePlatform.native.js
5679
+ var require_isActivePlatform_native = __commonJS({
5680
+ "../../core/web/dist/cjs/helpers/isActivePlatform.native.js"(exports2, module2) {
5681
+ "use strict";
5682
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
5683
+ for (var name in all) __defProp2(target, name, {
5684
+ get: all[name],
5685
+ enumerable: !0
5686
+ });
5687
+ }, __copyProps2 = function(to, from, except, desc) {
5688
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
5689
+ if (from && typeof from == "object" || typeof from == "function") try {
5690
+ for (var _loop = function() {
5691
+ var key = _step.value;
5692
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
5693
+ get: function() {
5694
+ return from[key];
5695
+ },
5696
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
5697
+ });
5698
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
5699
+ } catch (err) {
5700
+ _didIteratorError = !0, _iteratorError = err;
5701
+ } finally {
5702
+ try {
5703
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
5704
+ } finally {
5705
+ if (_didIteratorError)
5706
+ throw _iteratorError;
5707
+ }
5708
+ }
5709
+ return to;
5710
+ }, __toCommonJS2 = function(mod) {
5711
+ return __copyProps2(__defProp2({}, "__esModule", {
5712
+ value: !0
5713
+ }), mod);
5714
+ }, isActivePlatform_exports = {};
5715
+ __export2(isActivePlatform_exports, {
5716
+ isActivePlatform: function() {
5717
+ return isActivePlatform;
5718
+ }
5719
+ });
5720
+ module2.exports = __toCommonJS2(isActivePlatform_exports);
5721
+ var import_constants4 = require_index_native6();
5722
+ function isActivePlatform(key) {
5723
+ if (!key.startsWith("$platform")) return !0;
5724
+ var platform2 = key.slice(10);
5725
+ return (
5726
+ // web, ios, android
5727
+ platform2 === import_constants4.currentPlatform || // web, native
5728
+ platform2 === "native"
5729
+ );
5730
+ }
5731
+ }
5732
+ });
5733
+
5734
+ // ../../core/web/dist/cjs/helpers/isActiveTheme.native.js
5735
+ var require_isActiveTheme_native = __commonJS({
5736
+ "../../core/web/dist/cjs/helpers/isActiveTheme.native.js"(exports2, module2) {
5737
+ "use strict";
5738
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
5739
+ for (var name in all) __defProp2(target, name, {
5740
+ get: all[name],
5741
+ enumerable: !0
5742
+ });
5743
+ }, __copyProps2 = function(to, from, except, desc) {
5744
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
5745
+ if (from && typeof from == "object" || typeof from == "function") try {
5746
+ for (var _loop = function() {
5747
+ var key = _step.value;
5748
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
5749
+ get: function() {
5750
+ return from[key];
5751
+ },
5752
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
5753
+ });
5754
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
5755
+ } catch (err) {
5756
+ _didIteratorError = !0, _iteratorError = err;
5757
+ } finally {
5758
+ try {
5759
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
5760
+ } finally {
5761
+ if (_didIteratorError)
5762
+ throw _iteratorError;
5763
+ }
5764
+ }
5765
+ return to;
5766
+ }, __toCommonJS2 = function(mod) {
5767
+ return __copyProps2(__defProp2({}, "__esModule", {
5768
+ value: !0
5769
+ }), mod);
5770
+ }, isActiveTheme_exports = {};
5771
+ __export2(isActiveTheme_exports, {
5772
+ isActiveTheme: function() {
5773
+ return isActiveTheme;
5774
+ }
5775
+ });
5776
+ module2.exports = __toCommonJS2(isActiveTheme_exports);
5777
+ function isActiveTheme(key, activeThemeName) {
5778
+ if (key.startsWith("$theme-")) return key.slice(7).startsWith(activeThemeName);
5779
+ }
5780
+ }
5781
+ });
5782
+
5668
5783
  // ../../core/web/dist/cjs/helpers/log.native.js
5669
5784
  var require_log_native = __commonJS({
5670
5785
  "../../core/web/dist/cjs/helpers/log.native.js"(exports2, module2) {
@@ -5712,11 +5827,11 @@ var require_log_native = __commonJS({
5712
5827
  function log() {
5713
5828
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
5714
5829
  if (process.env.NODE_ENV !== "production") {
5715
- (0, import_useMedia._dmt)(!0);
5830
+ (0, import_useMedia._disableMediaTouch)(!0);
5716
5831
  try {
5717
5832
  return console.log(...args);
5718
5833
  } finally {
5719
- (0, import_useMedia._dmt)(!1);
5834
+ (0, import_useMedia._disableMediaTouch)(!1);
5720
5835
  }
5721
5836
  }
5722
5837
  }
@@ -6779,9 +6894,9 @@ var require_propMapper_native = __commonJS({
6779
6894
  }
6780
6895
  });
6781
6896
 
6782
- // ../../core/web/dist/cjs/helpers/transformsToString.native.js
6783
- var require_transformsToString_native = __commonJS({
6784
- "../../core/web/dist/cjs/helpers/transformsToString.native.js"(exports2, module2) {
6897
+ // ../../core/web/dist/cjs/helpers/sortString.native.js
6898
+ var require_sortString_native = __commonJS({
6899
+ "../../core/web/dist/cjs/helpers/sortString.native.js"(exports2, module2) {
6785
6900
  "use strict";
6786
6901
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
6787
6902
  for (var name in all) __defProp2(target, name, {
@@ -6815,31 +6930,22 @@ var require_transformsToString_native = __commonJS({
6815
6930
  return __copyProps2(__defProp2({}, "__esModule", {
6816
6931
  value: !0
6817
6932
  }), mod);
6818
- }, transformsToString_exports = {};
6819
- __export2(transformsToString_exports, {
6820
- transformsToString: function() {
6821
- return transformsToString;
6933
+ }, sortString_exports = {};
6934
+ __export2(sortString_exports, {
6935
+ sortString: function() {
6936
+ return sortString;
6822
6937
  }
6823
6938
  });
6824
- module2.exports = __toCommonJS2(transformsToString_exports);
6825
- var import_normalizeValueWithProperty = require_normalizeValueWithProperty_native();
6826
- function transformsToString(transforms) {
6827
- return transforms.map(
6828
- // { scale: 2 } => 'scale(2)'
6829
- // { translateX: 20 } => 'translateX(20px)'
6830
- // { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
6831
- function(transform) {
6832
- var type = Object.keys(transform)[0], value = transform[type];
6833
- return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
6834
- }
6835
- ).join(" ");
6836
- }
6939
+ module2.exports = __toCommonJS2(sortString_exports);
6940
+ var sortString = function(a, b) {
6941
+ return a < b ? -1 : a > b ? 1 : 0;
6942
+ };
6837
6943
  }
6838
6944
  });
6839
6945
 
6840
- // ../../core/web/dist/cjs/helpers/isActivePlatform.native.js
6841
- var require_isActivePlatform_native = __commonJS({
6842
- "../../core/web/dist/cjs/helpers/isActivePlatform.native.js"(exports2, module2) {
6946
+ // ../../core/web/dist/cjs/helpers/transformsToString.native.js
6947
+ var require_transformsToString_native = __commonJS({
6948
+ "../../core/web/dist/cjs/helpers/transformsToString.native.js"(exports2, module2) {
6843
6949
  "use strict";
6844
6950
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
6845
6951
  for (var name in all) __defProp2(target, name, {
@@ -6873,71 +6979,25 @@ var require_isActivePlatform_native = __commonJS({
6873
6979
  return __copyProps2(__defProp2({}, "__esModule", {
6874
6980
  value: !0
6875
6981
  }), mod);
6876
- }, isActivePlatform_exports = {};
6877
- __export2(isActivePlatform_exports, {
6878
- isActivePlatform: function() {
6879
- return isActivePlatform;
6982
+ }, transformsToString_exports = {};
6983
+ __export2(transformsToString_exports, {
6984
+ transformsToString: function() {
6985
+ return transformsToString;
6880
6986
  }
6881
6987
  });
6882
- module2.exports = __toCommonJS2(isActivePlatform_exports);
6883
- var import_constants4 = require_index_native6();
6884
- function isActivePlatform(key) {
6885
- var platform2 = key.slice(10);
6886
- return (
6887
- // web, ios, android
6888
- platform2 === import_constants4.currentPlatform || // web, native
6889
- platform2 === "native"
6890
- );
6891
- }
6892
- }
6893
- });
6894
-
6895
- // ../../core/web/dist/cjs/helpers/sortString.native.js
6896
- var require_sortString_native = __commonJS({
6897
- "../../core/web/dist/cjs/helpers/sortString.native.js"(exports2, module2) {
6898
- "use strict";
6899
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
6900
- for (var name in all) __defProp2(target, name, {
6901
- get: all[name],
6902
- enumerable: !0
6903
- });
6904
- }, __copyProps2 = function(to, from, except, desc) {
6905
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
6906
- if (from && typeof from == "object" || typeof from == "function") try {
6907
- for (var _loop = function() {
6908
- var key = _step.value;
6909
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
6910
- get: function() {
6911
- return from[key];
6912
- },
6913
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
6914
- });
6915
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
6916
- } catch (err) {
6917
- _didIteratorError = !0, _iteratorError = err;
6918
- } finally {
6919
- try {
6920
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
6921
- } finally {
6922
- if (_didIteratorError)
6923
- throw _iteratorError;
6988
+ module2.exports = __toCommonJS2(transformsToString_exports);
6989
+ var import_normalizeValueWithProperty = require_normalizeValueWithProperty_native();
6990
+ function transformsToString(transforms) {
6991
+ return transforms.map(
6992
+ // { scale: 2 } => 'scale(2)'
6993
+ // { translateX: 20 } => 'translateX(20px)'
6994
+ // { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
6995
+ function(transform) {
6996
+ var type = Object.keys(transform)[0], value = transform[type];
6997
+ return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
6924
6998
  }
6925
- }
6926
- return to;
6927
- }, __toCommonJS2 = function(mod) {
6928
- return __copyProps2(__defProp2({}, "__esModule", {
6929
- value: !0
6930
- }), mod);
6931
- }, sortString_exports = {};
6932
- __export2(sortString_exports, {
6933
- sortString: function() {
6934
- return sortString;
6935
- }
6936
- });
6937
- module2.exports = __toCommonJS2(sortString_exports);
6938
- var sortString = function(a, b) {
6939
- return a < b ? -1 : a > b ? 1 : 0;
6940
- };
6999
+ ).join(" ");
7000
+ }
6941
7001
  }
6942
7002
  });
6943
7003
 
@@ -7005,14 +7065,14 @@ var require_getSplitStyles_native = __commonJS({
7005
7065
  }
7006
7066
  });
7007
7067
  module2.exports = __toCommonJS2(getSplitStyles_exports);
7008
- var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_transformsToString = require_transformsToString_native(), import_isActivePlatform = require_isActivePlatform_native(), import_sortString = require_sortString_native(), consoleGroupCollapsed = import_constants4.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
7068
+ var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_isActivePlatform = require_isActivePlatform_native(), import_isActiveTheme = require_isActiveTheme_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_sortString = require_sortString_native(), import_transformsToString = require_transformsToString_native(), consoleGroupCollapsed = import_constants4.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
7009
7069
  function isValidStyleKey(key, staticConfig) {
7010
7070
  var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
7011
7071
  return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
7012
7072
  }
7013
7073
  var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) {
7014
7074
  conf = conf || (0, import_config.getConfig)(), import_constants4.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
7015
- var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, styleState = {
7075
+ var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, styleState = {
7016
7076
  classNames,
7017
7077
  conf,
7018
7078
  props,
@@ -7060,7 +7120,7 @@ var require_getSplitStyles_native = __commonJS({
7060
7120
  }), console.groupEnd()), "continue";
7061
7121
  if (isPseudo) {
7062
7122
  if (!val) return "continue";
7063
- var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClassNames), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
7123
+ var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClass), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
7064
7124
  if (!descriptor) return "continue";
7065
7125
  if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
7066
7126
  var _pseudos, _key;
@@ -7147,7 +7207,7 @@ var require_getSplitStyles_native = __commonJS({
7147
7207
  try {
7148
7208
  for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
7149
7209
  var style3 = _step12.value, property = style3[0];
7150
- if (!(property[0] === "$" && property.startsWith("$platform") && !(0, import_isActivePlatform.isActivePlatform)(property))) {
7210
+ if (!(property[0] === "$" && !(0, import_isActivePlatform.isActivePlatform)(property))) {
7151
7211
  var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
7152
7212
  process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
7153
7213
  var fullKey1 = `${style3[import_helpers.StyleObjectProperty]}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers.StyleObjectPseudo] || ""}`;
@@ -7176,9 +7236,7 @@ var require_getSplitStyles_native = __commonJS({
7176
7236
  }
7177
7237
  var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
7178
7238
  if (isThemeMedia) {
7179
- dynamicThemeAccess = !0;
7180
- var mediaThemeName = mediaKeyShort.slice(6);
7181
- if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName))) return "continue";
7239
+ if (dynamicThemeAccess = !0, !(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return "continue";
7182
7240
  } else if (isGroupMedia) {
7183
7241
  var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
7184
7242
  if (!groupContext) return process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`), "continue";
@@ -7209,7 +7267,7 @@ var require_getSplitStyles_native = __commonJS({
7209
7267
  continue;
7210
7268
  }
7211
7269
  if (subKey[0] === "$") {
7212
- if (!(0, import_isActivePlatform.isActivePlatform)(subKey)) continue;
7270
+ if (!(0, import_isActivePlatform.isActivePlatform)(subKey) || !(0, import_isActiveTheme.isActiveTheme)(subKey, themeName)) continue;
7213
7271
  for (var subSubKey in mediaStyle1[subKey]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey][subSubKey]);
7214
7272
  } else mergeMediaStyle2(subKey, mediaStyle1[subKey]);
7215
7273
  }
@@ -7230,7 +7288,7 @@ var require_getSplitStyles_native = __commonJS({
7230
7288
  if (accept) {
7231
7289
  var accepted = accept[keyInit];
7232
7290
  if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") {
7233
- viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames);
7291
+ viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass);
7234
7292
  continue;
7235
7293
  }
7236
7294
  }
@@ -7891,7 +7949,7 @@ var require_Theme_native = __commonJS({
7891
7949
  function getThemedChildren(themeState, children, props) {
7892
7950
  var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, { themeManager, isNewTheme } = themeState;
7893
7951
  if (!themeManager) return children;
7894
- var { shallow, forceClassName } = props, shouldRenderChildrenWithTheme = isNewTheme || isRoot || stateRef.current.hasEverThemed || typeof props.inverse == "boolean";
7952
+ var { shallow, forceClassName } = props, shouldRenderChildrenWithTheme = isNewTheme || isRoot || "inverse" in props || "name" in props || "reset" in props || "forceClassName" in props || stateRef.current.hasEverThemed;
7895
7953
  if (shouldRenderChildrenWithTheme && (stateRef.current.hasEverThemed = !0), !shouldRenderChildrenWithTheme) return children;
7896
7954
  process.env.NODE_ENV === "development" && shouldRenderChildrenWithTheme && props.debug === "verbose" && (0, import_log.log)(`adding theme: isRoot ${isRoot}, inverse ${"inverse" in props}, isNewTheme ${isNewTheme}, hasEver ${stateRef.current.hasEverThemed}`, props);
7897
7955
  var next = children;
@@ -7915,7 +7973,7 @@ var require_Theme_native = __commonJS({
7915
7973
  function wrapThemeElements(param) {
7916
7974
  var { children, themeState, forceClassName, isRoot } = param;
7917
7975
  if (isRoot && forceClassName === !1) return children;
7918
- var inverse = themeState.inversed, requiresExtraWrapper = inverse != null || forceClassName, { className, style } = getThemeClassNameAndStyle(themeState, isRoot), themedChildren = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
7976
+ var inverse = themeState.inversed, requiresExtraWrapper = typeof inverse == "boolean" || forceClassName, { className, style } = getThemeClassNameAndStyle(themeState, isRoot), themedChildren = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
7919
7977
  className: `${className} _dsp_contents is_Theme`,
7920
7978
  style,
7921
7979
  children
@@ -8017,13 +8075,13 @@ var require_themeable_native = __commonJS({
8017
8075
  ...rest,
8018
8076
  "data-disable-theme": !0
8019
8077
  })
8020
- ), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Theme.Theme, {
8021
- componentName: componentName || (staticConfig == null ? void 0 : staticConfig.componentName),
8022
- name: theme,
8078
+ ), filteredProps = {
8079
+ componentName: componentName || (staticConfig == null ? void 0 : staticConfig.componentName)
8080
+ };
8081
+ "debug" in props && (filteredProps.debug = props.debug), "theme" in props && (filteredProps.name = props.theme), "themeInverse" in props && (filteredProps.inverse = props.themeInverse), "themeReset" in props && (filteredProps.reset = themeReset);
8082
+ var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Theme.Theme, {
8023
8083
  "disable-child-theme": !0,
8024
- debug: props.debug,
8025
- inverse: themeInverse,
8026
- reset: themeReset,
8084
+ ...filteredProps,
8027
8085
  children: element
8028
8086
  });
8029
8087
  if (context) {
@@ -8091,11 +8149,11 @@ var require_wrapStyleTags_native = __commonJS({
8091
8149
  }
8092
8150
  });
8093
8151
 
8094
- // ../../core/web/dist/cjs/hooks/useDidHydrateOnce.native.js
8095
- var require_useDidHydrateOnce_native = __commonJS({
8096
- "../../core/web/dist/cjs/hooks/useDidHydrateOnce.native.js"(exports2, module2) {
8152
+ // ../../core/web/dist/cjs/hooks/useComponentState.native.js
8153
+ var require_useComponentState_native = __commonJS({
8154
+ "../../core/web/dist/cjs/hooks/useComponentState.native.js"(exports2, module2) {
8097
8155
  "use strict";
8098
- var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
8156
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
8099
8157
  for (var name in all) __defProp2(target, name, {
8100
8158
  get: all[name],
8101
8159
  enumerable: !0
@@ -8123,87 +8181,18 @@ var require_useDidHydrateOnce_native = __commonJS({
8123
8181
  }
8124
8182
  }
8125
8183
  return to;
8126
- }, __toESM2 = function(mod, isNodeMode, target) {
8127
- return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
8128
- // If the importer is in node compatibility mode or this is not an ESM
8129
- // file that has been converted to a CommonJS file using a Babel-
8130
- // compatible transform (i.e. "__esModule" has not been set), then set
8131
- // "default" to the CommonJS "module.exports" for node compatibility.
8132
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
8133
- value: mod,
8134
- enumerable: !0
8135
- }) : target,
8136
- mod
8137
- );
8138
8184
  }, __toCommonJS2 = function(mod) {
8139
8185
  return __copyProps2(__defProp2({}, "__esModule", {
8140
8186
  value: !0
8141
8187
  }), mod);
8142
- }, useDidHydrateOnce_exports = {};
8143
- __export2(useDidHydrateOnce_exports, {
8144
- useDidHydrateOnce: function() {
8145
- return useDidHydrateOnce;
8146
- },
8147
- useDidHydrateOnceRoot: function() {
8148
- return useDidHydrateOnceRoot;
8149
- }
8150
- });
8151
- module2.exports = __toCommonJS2(useDidHydrateOnce_exports);
8152
- var import_react3 = __toESM2(require("react")), import_config = require_config_native();
8153
- function useDidHydrateOnceRoot() {
8154
- return !0;
8155
- }
8156
- var last = Date.now();
8157
- function useDidHydrateOnce() {
8158
- return !0;
8159
- }
8160
- }
8161
- });
8162
-
8163
- // ../../core/web/dist/cjs/hooks/useComponentState.native.js
8164
- var require_useComponentState_native = __commonJS({
8165
- "../../core/web/dist/cjs/hooks/useComponentState.native.js"(exports2, module2) {
8166
- "use strict";
8167
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
8168
- for (var name in all) __defProp2(target, name, {
8169
- get: all[name],
8170
- enumerable: !0
8171
- });
8172
- }, __copyProps2 = function(to, from, except, desc) {
8173
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
8174
- if (from && typeof from == "object" || typeof from == "function") try {
8175
- for (var _loop = function() {
8176
- var key = _step.value;
8177
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
8178
- get: function() {
8179
- return from[key];
8180
- },
8181
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
8182
- });
8183
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
8184
- } catch (err) {
8185
- _didIteratorError = !0, _iteratorError = err;
8186
- } finally {
8187
- try {
8188
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
8189
- } finally {
8190
- if (_didIteratorError)
8191
- throw _iteratorError;
8192
- }
8193
- }
8194
- return to;
8195
- }, __toCommonJS2 = function(mod) {
8196
- return __copyProps2(__defProp2({}, "__esModule", {
8197
- value: !0
8198
- }), mod);
8199
- }, useComponentState_exports = {};
8200
- __export2(useComponentState_exports, {
8201
- useComponentState: function() {
8202
- return useComponentState;
8188
+ }, useComponentState_exports = {};
8189
+ __export2(useComponentState_exports, {
8190
+ useComponentState: function() {
8191
+ return useComponentState;
8203
8192
  }
8204
8193
  });
8205
8194
  module2.exports = __toCommonJS2(useComponentState_exports);
8206
- var import_defaultComponentState = require_defaultComponentState_native(), import_useDidHydrateOnce = require_useDidHydrateOnce_native(), import_react3 = require("react"), import_constants4 = require_index_native6(), import_createShallowSetState = require_createShallowSetState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, param, staticConfig, config) {
8195
+ var import_constants4 = require_index_native6(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, param, staticConfig, config) {
8207
8196
  var { animationDriver, groups } = param, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
8208
8197
  stateRef.current || (stateRef.current = {});
8209
8198
  var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
@@ -8211,20 +8200,22 @@ var require_useComponentState_native = __commonJS({
8211
8200
  return !!(next || curStateRef.hasAnimated);
8212
8201
  }(), willBeAnimated = !import_constants4.isServer && willBeAnimatedClient;
8213
8202
  willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
8214
- var presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationDriver == null ? void 0 : animationDriver.isReactNative), hasEnterState = hasEnterStyle || isEntering, didHydrateOnce = willBeAnimated ? (0, import_useDidHydrateOnce.useDidHydrateOnce)() : !0, shouldEnter = hasEnterState || !didHydrateOnce && hasRNAnimation, shouldEnterFromUnhydrated = import_constants4.isWeb && !didHydrateOnce, initialState = shouldEnter ? (
8203
+ var { disableClassName } = props, presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasAnimationThatNeedsHydrate = hasAnimationProp && ((animationDriver == null ? void 0 : animationDriver.isReactNative) || !supportsCSSVars), hasEnterState = hasEnterStyle || isEntering, shouldEnter = hasEnterState || hasAnimationThatNeedsHydrate || // disableClassName doesnt work server side, only client, so needs hydrate
8204
+ // this is just for a better ux, supports css variables for light/dark, media queries, etc
8205
+ disableClassName, initialState = shouldEnter ? (
8215
8206
  // on the very first render we switch all spring animation drivers to css rendering
8216
8207
  // this is because we need to use css variables, which they don't support to do proper SSR
8217
8208
  // without flickers of the wrong colors.
8218
8209
  // but once we do that initial hydration and we are in client side rendering mode,
8219
8210
  // we can avoid the extra re-render on mount
8220
- shouldEnterFromUnhydrated ? import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateShouldEnter
8211
+ import_defaultComponentState.defaultComponentState
8221
8212
  ) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
8222
8213
  disabled != null && (initialState.disabled = disabled);
8223
8214
  var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
8224
8215
  ...states[0],
8225
8216
  [props.forceStyle]: !0
8226
- } : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
8227
- import_constants4.isWeb && hasRNAnimation && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState({
8217
+ } : states[0], setState = states[1], isHydrated = state.unmounted === !1, isAnimated = willBeAnimated;
8218
+ import_constants4.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState({
8228
8219
  ...state
8229
8220
  }));
8230
8221
  var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, !1, props.debug);
@@ -8235,10 +8226,10 @@ var require_useComponentState_native = __commonJS({
8235
8226
  var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
8236
8227
  state.unmounted && env && staticConfig.variants[env] ? (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence ENTER "${env}"`), props[env] = !0) : isExiting && exv && (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence EXIT "${exv}"`), props[exv] = exitVariant !== enterExitVariant);
8237
8228
  }
8238
- var shouldAvoidClasses = !import_constants4.isWeb;
8239
- if (import_constants4.isWeb) {
8240
- var { disableClassName } = props, isAnimatedAndHydrated = isAnimated && !supportsCSSVars && didHydrateOnce && !import_constants4.isServer, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || didHydrateOnce), isDisabledManually = disableClassName && !import_constants4.isServer && didHydrateOnce && state.unmounted === !0;
8241
- (isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (shouldAvoidClasses = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
8229
+ var noClass = !import_constants4.isWeb || !!props.forceStyle;
8230
+ if (import_constants4.isWeb && (!import_constants4.isServer || isHydrated)) {
8231
+ var isAnimatedAndHydrated = isAnimated && !supportsCSSVars, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
8232
+ (isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
8242
8233
  isAnimatedAndHydrated,
8243
8234
  isDisabledManually,
8244
8235
  isClassNameDisabled
@@ -8287,7 +8278,7 @@ var require_useComponentState_native = __commonJS({
8287
8278
  presenceState,
8288
8279
  setState,
8289
8280
  setStateShallow,
8290
- shouldAvoidClasses,
8281
+ noClass,
8291
8282
  state,
8292
8283
  stateRef,
8293
8284
  supportsCSSVars,
@@ -8634,7 +8625,7 @@ var require_createComponent_native = __commonJS({
8634
8625
  ]), !1)
8635
8626
  var timer;
8636
8627
  process.env.NODE_ENV === "development" && time && time`start (ignore)`, process.env.NODE_ENV === "development" && time && time`did-finish-ssr`, process.env.NODE_ENV === "development" && time && time`stateref`;
8637
- var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow, shouldAvoidClasses, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config), shouldForcePseudo = !!propsIn.forceStyle, noClassNames = shouldAvoidClasses || shouldForcePseudo;
8628
+ var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow, noClass, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config);
8638
8629
  process.env.NODE_ENV === "development" && time && time`use-state`;
8639
8630
  var hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText);
8640
8631
  process.env.NODE_ENV === "development" && time && time`use-context`;
@@ -8651,11 +8642,10 @@ var require_createComponent_native = __commonJS({
8651
8642
  if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof curStateRef.isListeningToTheme == "boolean" && (themeStateProps.shouldUpdate = function() {
8652
8643
  return stateRef.current.isListeningToTheme;
8653
8644
  }), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
8654
- var name = `${componentName2 || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (shouldAvoidClasses ? "(shouldAvoidClasses)" : " ") + (state.press || state.pressIn ? "(PRESSED)" : " ") + (state.hover ? "(HOVERED)" : " ") + (state.focus ? "(FOCUSED)" : " ") + ((presenceState == null ? void 0 : presenceState.isPresent) === !1 ? "(EXIT)" : ""), dataIs = propsIn["data-is"] || "", banner = `${internalID} ${name}${dataIs ? ` ${dataIs}` : ""} ${type}`;
8645
+ var name = `${componentName2 || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (noClass ? "(noClass)" : " ") + (state.press || state.pressIn ? "(PRESSED)" : " ") + (state.hover ? "(HOVERED)" : " ") + (state.focus ? "(FOCUSED)" : " ") + ((presenceState == null ? void 0 : presenceState.isPresent) === !1 ? "(EXIT)" : ""), dataIs = propsIn["data-is"] || "", banner = `${internalID} ${name}${dataIs ? ` ${dataIs}` : ""} ${type}`;
8655
8646
  if (console.info(`%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`, "background: green; color: white;"), import_constants4.isServer) (0, import_log.log)({
8656
- noClassNames,
8647
+ noClass,
8657
8648
  isAnimated,
8658
- shouldAvoidClasses,
8659
8649
  isWeb: import_constants4.isWeb,
8660
8650
  supportsCSSVars
8661
8651
  });
@@ -8684,14 +8674,14 @@ var require_createComponent_native = __commonJS({
8684
8674
  elementType = Component || elementType;
8685
8675
  var isStringElement = typeof elementType == "string";
8686
8676
  process.env.NODE_ENV === "development" && time && time`theme`;
8687
- var mediaState3 = (0, import_useMedia.useMedia)(stateRef, componentContext, debugProp);
8677
+ var mediaState3 = (0, import_useMedia.useMedia)(componentContext, debugProp);
8688
8678
  (0, import_createVariable.setDidGetVariableValue)(!1), process.env.NODE_ENV === "development" && time && time`media`;
8689
8679
  var resolveValues = (
8690
8680
  // if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
8691
8681
  isAnimated && !supportsCSSVars || isHOC && state.unmounted == !1 && hasAnimationProp ? "value" : "auto"
8692
8682
  ), styleProps = {
8693
8683
  mediaState: mediaState3,
8694
- noClassNames,
8684
+ noClass,
8695
8685
  resolveValues,
8696
8686
  isExiting,
8697
8687
  isAnimated,
@@ -8703,7 +8693,7 @@ var require_createComponent_native = __commonJS({
8703
8693
  (_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
8704
8694
  }
8705
8695
  process.env.NODE_ENV === "development" && time && time`split-styles`, curStateRef.isListeningToTheme = splitStyles.dynamicThemeAccess;
8706
- var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClassNames && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
8696
+ var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
8707
8697
  process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(stateRef, shouldListenForMedia, mediaListeningKeys);
8708
8698
  var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
8709
8699
  asChild,
@@ -8785,23 +8775,20 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8785
8775
  }
8786
8776
  }), import_react3.default.useEffect(function() {
8787
8777
  if (!disabled) {
8778
+ var tm;
8788
8779
  if (state.unmounted === !0 && hasEnterStyle) {
8789
8780
  setStateShallow({
8790
8781
  unmounted: "should-enter"
8791
8782
  });
8792
8783
  return;
8793
8784
  }
8794
- var tm;
8795
- if (state.unmounted) {
8796
- animationDriver != null && animationDriver.supportsCSSVars ? tm = setTimeout(function() {
8797
- setStateShallow({
8798
- unmounted: !1
8799
- });
8800
- }) : setStateShallow({
8785
+ if (state.unmounted) return tm = setTimeout(function() {
8786
+ setStateShallow({
8801
8787
  unmounted: !1
8802
8788
  });
8803
- return;
8804
- }
8789
+ }), function() {
8790
+ return clearTimeout(tm);
8791
+ };
8805
8792
  var dispose = (0, import_subscribeToContextGroup.subscribeToContextGroup)({
8806
8793
  disabled,
8807
8794
  componentContext,
@@ -8824,7 +8811,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8824
8811
  ...mediaGroups
8825
8812
  ]).join("") : 0
8826
8813
  ]);
8827
- var runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants4.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimePressStyle);
8814
+ var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants4.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimePressStyle);
8828
8815
  process.env.NODE_ENV === "development" && time && time`events-setup`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("\u{1FAA9} events()", {
8829
8816
  runtimeFocusStyle,
8830
8817
  runtimePressStyle,
@@ -8993,8 +8980,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8993
8980
  mediaListeningKeys,
8994
8981
  pseudos,
8995
8982
  shouldAttach,
8996
- shouldAvoidClasses,
8997
- shouldForcePseudo,
8983
+ noClass,
8998
8984
  shouldListenForMedia,
8999
8985
  splitStyles,
9000
8986
  splitStylesStyle,
@@ -10863,22 +10849,14 @@ var require_index_native13 = __commonJS({
10863
10849
  },
10864
10850
  useDidFinishSSR: function() {
10865
10851
  return useDidFinishSSR2;
10866
- },
10867
- useDidFinishSSRSync: function() {
10868
- return useDidFinishSSRSync;
10869
10852
  }
10870
10853
  });
10871
10854
  module2.exports = __toCommonJS2(src_exports2);
10872
10855
  var React4 = __toESM2(require("react"));
10873
- function useDidFinishSSR2(value, options) {
10856
+ function useDidFinishSSR2(value) {
10874
10857
  return value ?? !0;
10875
10858
  var cur, setCur;
10876
10859
  }
10877
- function useDidFinishSSRSync(value) {
10878
- return useDidFinishSSR2(value, {
10879
- sync: !0
10880
- });
10881
- }
10882
10860
  function useClientValue(value) {
10883
10861
  var done = useDidFinishSSR2();
10884
10862
  return done ? typeof value == "function" ? value() : value : void 0;
@@ -11074,7 +11052,7 @@ var require_useProps_native = __commonJS({
11074
11052
  mediaState: mediaState3,
11075
11053
  noSkip: !0,
11076
11054
  noMergeStyle: !0,
11077
- noClassNames: !0,
11055
+ noClass: !0,
11078
11056
  resolveValues: "auto",
11079
11057
  ...opts
11080
11058
  }, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
@@ -11445,10 +11423,10 @@ var require_TamaguiProvider_native = __commonJS({
11445
11423
  }
11446
11424
  });
11447
11425
  module2.exports = __toCommonJS2(TamaguiProvider_exports);
11448
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native();
11426
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_ThemeProvider = require_ThemeProvider_native();
11449
11427
  function TamaguiProvider2(param) {
11450
11428
  var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
11451
- return (0, import_useMedia.setupMediaListeners)(), process.env.TAMAGUI_REACT_19 || import_constants4.isClient && (0, import_constants4.useIsomorphicLayoutEffect)(function() {
11429
+ return process.env.TAMAGUI_REACT_19 || import_constants4.isClient && (0, import_constants4.useIsomorphicLayoutEffect)(function() {
11452
11430
  if (config && !disableInjectCSS) {
11453
11431
  var style = document.createElement("style");
11454
11432
  return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
@@ -11606,6 +11584,9 @@ var require_index_native14 = __commonJS({
11606
11584
  }), mod);
11607
11585
  }, src_exports2 = {};
11608
11586
  __export2(src_exports2, {
11587
+ _disableMediaTouch: function() {
11588
+ return import_useMedia._disableMediaTouch;
11589
+ },
11609
11590
  configureMedia: function() {
11610
11591
  return import_useMedia.configureMedia;
11611
11592
  },
@@ -15479,19 +15460,13 @@ var require_Accordion_native = __commonJS({
15479
15460
  ref: forwardedRef
15480
15461
  });
15481
15462
  }), HeightAnimator = import_web.View.styleable(function(props, ref) {
15482
- var itemContext = useAccordionItemContext(), { children, ...rest } = props, [height, setHeight] = React4.useState(0);
15483
- React4.useEffect(function() {
15484
- itemContext.open || setHeight(0);
15485
- }, [
15486
- itemContext.open
15487
- ]);
15488
- var onLayout = (0, import_web.useEvent)(function(param) {
15463
+ var itemContext = useAccordionItemContext(), { children, ...rest } = props, [height, setHeight] = React4.useState(0), onLayout = (0, import_web.useEvent)(function(param) {
15489
15464
  var { nativeEvent } = param;
15490
15465
  nativeEvent.layout.height && setHeight(nativeEvent.layout.height);
15491
15466
  });
15492
15467
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.View, {
15493
15468
  ref,
15494
- height,
15469
+ height: itemContext.open ? height : 0,
15495
15470
  ...rest,
15496
15471
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.View, {
15497
15472
  position: "absolute",
@@ -15554,9 +15529,9 @@ var require_index_native25 = __commonJS({
15554
15529
  }
15555
15530
  });
15556
15531
 
15557
- // ../adapt/dist/cjs/Adapt.native.js
15558
- var require_Adapt_native = __commonJS({
15559
- "../adapt/dist/cjs/Adapt.native.js"(exports2, module2) {
15532
+ // ../portal/dist/cjs/GorhomPortal.native.js
15533
+ var require_GorhomPortal_native = __commonJS({
15534
+ "../portal/dist/cjs/GorhomPortal.native.js"(exports2, module2) {
15560
15535
  "use strict";
15561
15536
  var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
15562
15537
  for (var name in all) __defProp2(target, name, {
@@ -15602,112 +15577,277 @@ var require_Adapt_native = __commonJS({
15602
15577
  return __copyProps2(__defProp2({}, "__esModule", {
15603
15578
  value: !0
15604
15579
  }), mod);
15605
- }, Adapt_exports = {};
15606
- __export2(Adapt_exports, {
15607
- Adapt: function() {
15608
- return Adapt;
15580
+ }, GorhomPortal_exports = {};
15581
+ __export2(GorhomPortal_exports, {
15582
+ ACTIONS: function() {
15583
+ return ACTIONS;
15609
15584
  },
15610
- AdaptContents: function() {
15611
- return AdaptContents;
15585
+ INITIAL_STATE: function() {
15586
+ return INITIAL_STATE;
15587
+ },
15588
+ PortalHost: function() {
15589
+ return PortalHost;
15612
15590
  },
15613
- AdaptParentContext: function() {
15614
- return AdaptParentContext;
15591
+ PortalItem: function() {
15592
+ return PortalItem;
15593
+ },
15594
+ PortalProvider: function() {
15595
+ return PortalProvider2;
15615
15596
  },
15616
- useAdaptParent: function() {
15617
- return useAdaptParent;
15597
+ usePortal: function() {
15598
+ return usePortal;
15618
15599
  }
15619
15600
  });
15620
- module2.exports = __toCommonJS2(Adapt_exports);
15621
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_helpers = require_index_native7(), AdaptParentContext = /* @__PURE__ */ import_react3.default.createContext(null), AdaptContents = function(props) {
15622
- var context = import_react3.default.useContext(AdaptParentContext);
15623
- if (!(context != null && context.Contents)) throw new Error(process.env.NODE_ENV === "production" ? "tamagui.dev/docs/intro/errors#warning-002" : "You're rendering a Tamagui <Adapt /> component without nesting it inside a parent that is able to adapt.");
15624
- return /* @__PURE__ */ import_react3.default.createElement(context.Contents, props);
15625
- };
15626
- AdaptContents.shouldForwardSpace = !0;
15627
- var useAdaptParent = function(param) {
15628
- var { Contents } = param, [when, setWhen] = import_react3.default.useState(null), AdaptProvider = import_react3.default.useMemo(function() {
15629
- var context = {
15630
- Contents,
15631
- setWhen
15632
- };
15633
- function AdaptProviderView(props) {
15634
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptParentContext.Provider, {
15635
- value: context,
15636
- children: props.children
15637
- });
15638
- }
15639
- return AdaptProviderView;
15640
- }, [
15641
- Contents
15642
- ]);
15601
+ module2.exports = __toCommonJS2(GorhomPortal_exports);
15602
+ 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) {
15603
+ 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;
15604
+ }(ACTIONS || {}), INITIAL_STATE = {}, registerHost = function(state, hostName) {
15605
+ return hostName in state || (state[hostName] = []), state;
15606
+ }, deregisterHost = function(state, hostName) {
15607
+ return delete state[hostName], state;
15608
+ }, addUpdatePortal = function(state, hostName, portalName, node) {
15609
+ hostName in state || (state = registerHost(state, hostName));
15610
+ var index = state[hostName].findIndex(function(item) {
15611
+ return item.name === portalName;
15612
+ });
15613
+ return index !== -1 ? state[hostName][index].node = node : state[hostName].push({
15614
+ name: portalName,
15615
+ node
15616
+ }), state;
15617
+ }, removePortal = function(state, hostName, portalName) {
15618
+ if (!(hostName in state)) return console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`), state;
15619
+ var index = state[hostName].findIndex(function(item) {
15620
+ return item.name === portalName;
15621
+ });
15622
+ return index !== -1 && state[hostName].splice(index, 1), state;
15623
+ }, reducer = function(state, action) {
15624
+ var { type } = action;
15625
+ switch (type) {
15626
+ case 0:
15627
+ return registerHost({
15628
+ ...state
15629
+ }, action.hostName);
15630
+ case 1:
15631
+ return deregisterHost({
15632
+ ...state
15633
+ }, action.hostName);
15634
+ case 2:
15635
+ return addUpdatePortal({
15636
+ ...state
15637
+ }, action.hostName, action.portalName, action.node);
15638
+ case 3:
15639
+ return removePortal({
15640
+ ...state
15641
+ }, action.hostName, action.portalName);
15642
+ default:
15643
+ return state;
15644
+ }
15645
+ }, PortalStateContext = /* @__PURE__ */ (0, import_react3.createContext)(null), PortalDispatchContext = /* @__PURE__ */ (0, import_react3.createContext)(null), usePortalState = function(hostName) {
15646
+ var state = (0, import_react3.useContext)(PortalStateContext);
15647
+ if (state === null) throw new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
15648
+ return state[hostName] || [];
15649
+ }, usePortal = function() {
15650
+ var hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "root", dispatch = (0, import_react3.useContext)(PortalDispatchContext);
15651
+ if (dispatch === null) throw new Error("'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.");
15652
+ var registerHost2 = (0, import_react3.useCallback)(function() {
15653
+ dispatch({
15654
+ type: 0,
15655
+ hostName
15656
+ });
15657
+ }, []), deregisterHost2 = (0, import_react3.useCallback)(function() {
15658
+ dispatch({
15659
+ type: 1,
15660
+ hostName
15661
+ });
15662
+ }, []), addUpdatePortal2 = (0, import_react3.useCallback)(function(name, node) {
15663
+ dispatch({
15664
+ type: 2,
15665
+ hostName,
15666
+ portalName: name,
15667
+ node
15668
+ });
15669
+ }, []), removePortal2 = (0, import_react3.useCallback)(function(name) {
15670
+ dispatch({
15671
+ type: 3,
15672
+ hostName,
15673
+ portalName: name
15674
+ });
15675
+ }, []);
15643
15676
  return {
15644
- AdaptProvider,
15645
- when
15677
+ registerHost: registerHost2,
15678
+ deregisterHost: deregisterHost2,
15679
+ addPortal: addUpdatePortal2,
15680
+ updatePortal: addUpdatePortal2,
15681
+ removePortal: removePortal2
15646
15682
  };
15647
- }, Adapt = (0, import_helpers.withStaticProperties)(function(param) {
15648
- var { platform: platform2, when, children } = param, context = import_react3.default.useContext(AdaptParentContext), media = (0, import_core12.useMedia)(), enabled = !1;
15649
- return typeof when == "function" ? enabled = when({
15650
- media
15651
- }) : (enabled = !platform2, 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), when && !media[when] && (enabled = !1)), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
15652
- if (enabled) return context == null || context.setWhen(when || enabled), function() {
15653
- context == null || context.setWhen(null);
15683
+ }, PortalProviderComponent = function(param) {
15684
+ var { rootHostName = "root", shouldAddRootHost = !0, children } = param, [state, dispatch] = (0, import_react3.useReducer)(reducer, INITIAL_STATE), transitionDispatch = (0, import_react3.useMemo)(function() {
15685
+ var next = function(value) {
15686
+ (0, import_start_transition.startTransition)(function() {
15687
+ dispatch(value);
15688
+ });
15654
15689
  };
15690
+ return next;
15655
15691
  }, [
15656
- when,
15657
- context,
15658
- enabled
15659
- ]), enabled ? typeof children == "function" ? children({
15660
- enabled,
15661
- media
15662
- }) : children : null;
15663
- }, {
15664
- Contents: AdaptContents
15665
- });
15666
- }
15667
- });
15668
-
15669
- // ../adapt/dist/cjs/index.native.js
15670
- var require_index_native26 = __commonJS({
15671
- "../adapt/dist/cjs/index.native.js"(exports2, module2) {
15672
- "use strict";
15673
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
15674
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
15675
- if (from && typeof from == "object" || typeof from == "function") try {
15676
- for (var _loop = function() {
15677
- var key = _step.value;
15678
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
15679
- get: function() {
15680
- return from[key];
15681
- },
15682
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
15683
- });
15684
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
15685
- } catch (err) {
15686
- _didIteratorError = !0, _iteratorError = err;
15687
- } finally {
15688
- try {
15689
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
15690
- } finally {
15691
- if (_didIteratorError)
15692
- throw _iteratorError;
15692
+ dispatch
15693
+ ]);
15694
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalDispatchContext.Provider, {
15695
+ value: transitionDispatch,
15696
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(PortalStateContext.Provider, {
15697
+ value: state,
15698
+ children: [
15699
+ children,
15700
+ shouldAddRootHost && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHost, {
15701
+ name: rootHostName
15702
+ })
15703
+ ]
15704
+ })
15705
+ });
15706
+ }, PortalProvider2 = /* @__PURE__ */ (0, import_react3.memo)(PortalProviderComponent);
15707
+ PortalProvider2.displayName = "PortalProvider";
15708
+ var defaultRenderer = function(children) {
15709
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
15710
+ children
15711
+ });
15712
+ }, PortalHost = /* @__PURE__ */ (0, import_react3.memo)(function(props) {
15713
+ return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHostWeb, {
15714
+ ...props
15715
+ }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHostNonNative, {
15716
+ ...props
15717
+ });
15718
+ }), allPortalHosts = /* @__PURE__ */ new Map();
15719
+ function PortalHostWeb(props) {
15720
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
15721
+ style: {
15722
+ display: "contents"
15723
+ },
15724
+ ref: function(node) {
15725
+ node ? allPortalHosts.set(props.name, node) : allPortalHosts.delete(props.name);
15693
15726
  }
15694
- }
15695
- return to;
15696
- }, __reExport2 = function(target, mod, secondTarget) {
15697
- return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
15698
- }, __toCommonJS2 = function(mod) {
15699
- return __copyProps2(__defProp2({}, "__esModule", {
15700
- value: !0
15701
- }), mod);
15702
- }, src_exports2 = {};
15703
- module2.exports = __toCommonJS2(src_exports2);
15704
- __reExport2(src_exports2, require_Adapt_native(), module2.exports);
15727
+ });
15728
+ }
15729
+ function PortalHostNonNative(props) {
15730
+ var { name, forwardProps, render = defaultRenderer } = props, state = usePortalState(name), { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
15731
+ return (0, import_react3.useEffect)(function() {
15732
+ if (!(typeof window > "u")) return registerHost2(), function() {
15733
+ deregisterHost2();
15734
+ };
15735
+ }, []), render(forwardProps ? state.map(function(item) {
15736
+ var next = item.node, { children, ...restForwardProps } = forwardProps;
15737
+ return forwardProps ? import_react3.default.Children.map(next, function(child) {
15738
+ return /* @__PURE__ */ import_react3.default.isValidElement(child) ? /* @__PURE__ */ import_react3.default.cloneElement(child, {
15739
+ key: child.key,
15740
+ ...restForwardProps
15741
+ }) : child;
15742
+ }) : next;
15743
+ }) : state.map(function(item) {
15744
+ return item.node;
15745
+ }));
15746
+ }
15747
+ var PortalItem = /* @__PURE__ */ (0, import_react3.memo)(function(props) {
15748
+ return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalItemWeb, {
15749
+ ...props
15750
+ }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NonNativePortalComponent, {
15751
+ ...props
15752
+ });
15753
+ }), PortalItemWeb = function(props) {
15754
+ if (!props.hostName) throw new Error("No name");
15755
+ var hostNode = allPortalHosts.get(props.hostName);
15756
+ return hostNode ? /* @__PURE__ */ (0, import_react_dom.createPortal)(props.children, hostNode) : null;
15757
+ }, NonNativePortalComponent = function(props) {
15758
+ 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() {
15759
+ _providedHandleOnMount ? _providedHandleOnMount(function() {
15760
+ return addUpdatePortal2(name, children);
15761
+ }) : addUpdatePortal2(name, children);
15762
+ }), handleOnUnmount = (0, import_core12.useEvent)(function() {
15763
+ _providedHandleOnUnmount ? _providedHandleOnUnmount(function() {
15764
+ return removePortal2(name);
15765
+ }) : removePortal2(name);
15766
+ }), handleOnUpdate = (0, import_core12.useEvent)(function() {
15767
+ _providedHandleOnUpdate ? _providedHandleOnUpdate(function() {
15768
+ return addUpdatePortal2(name, children);
15769
+ }) : addUpdatePortal2(name, children);
15770
+ });
15771
+ return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
15772
+ if (!passthrough) return handleOnMount(), function() {
15773
+ handleOnUnmount();
15774
+ };
15775
+ }, []), (0, import_react3.useEffect)(function() {
15776
+ passthrough || handleOnUpdate();
15777
+ }, [
15778
+ children
15779
+ ]), passthrough ? children : null;
15780
+ };
15705
15781
  }
15706
15782
  });
15707
15783
 
15708
- // ../../core/create-context/dist/cjs/create-context.native.js
15709
- var require_create_context_native = __commonJS({
15710
- "../../core/create-context/dist/cjs/create-context.native.js"(exports2, module2) {
15784
+ // ../portal/dist/cjs/useStackedZIndex.native.js
15785
+ var require_useStackedZIndex_native = __commonJS({
15786
+ "../portal/dist/cjs/useStackedZIndex.native.js"(exports2, module2) {
15787
+ "use strict";
15788
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
15789
+ for (var name in all) __defProp2(target, name, {
15790
+ get: all[name],
15791
+ enumerable: !0
15792
+ });
15793
+ }, __copyProps2 = function(to, from, except, desc) {
15794
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
15795
+ if (from && typeof from == "object" || typeof from == "function") try {
15796
+ for (var _loop = function() {
15797
+ var key = _step.value;
15798
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
15799
+ get: function() {
15800
+ return from[key];
15801
+ },
15802
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
15803
+ });
15804
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
15805
+ } catch (err) {
15806
+ _didIteratorError = !0, _iteratorError = err;
15807
+ } finally {
15808
+ try {
15809
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
15810
+ } finally {
15811
+ if (_didIteratorError)
15812
+ throw _iteratorError;
15813
+ }
15814
+ }
15815
+ return to;
15816
+ }, __toCommonJS2 = function(mod) {
15817
+ return __copyProps2(__defProp2({}, "__esModule", {
15818
+ value: !0
15819
+ }), mod);
15820
+ }, useStackedZIndex_exports = {};
15821
+ __export2(useStackedZIndex_exports, {
15822
+ useStackedZIndex: function() {
15823
+ return useStackedZIndex;
15824
+ }
15825
+ });
15826
+ module2.exports = __toCommonJS2(useStackedZIndex_exports);
15827
+ var import_react3 = require("react"), CurrentPortalZIndices = {}, useStackedZIndex = function(props) {
15828
+ var { stackZIndex, zIndex: zIndexProp = 1e3 } = props, zIndex = function() {
15829
+ if (stackZIndex) {
15830
+ var highest = Object.values(CurrentPortalZIndices).reduce(function(acc, cur) {
15831
+ return Math.max(acc, cur);
15832
+ }, 0);
15833
+ return Math.max(stackZIndex, highest + 1);
15834
+ }
15835
+ if (zIndexProp) return zIndexProp;
15836
+ }(), id = (0, import_react3.useId)();
15837
+ return (0, import_react3.useEffect)(function() {
15838
+ if (typeof zIndex == "number") return CurrentPortalZIndices[id] = zIndex, function() {
15839
+ delete CurrentPortalZIndices[id];
15840
+ };
15841
+ }, [
15842
+ zIndex
15843
+ ]), zIndex;
15844
+ };
15845
+ }
15846
+ });
15847
+
15848
+ // ../portal/dist/cjs/Portal.native.js
15849
+ var require_Portal_native = __commonJS({
15850
+ "../portal/dist/cjs/Portal.native.js"(exports2, module2) {
15711
15851
  "use strict";
15712
15852
  var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
15713
15853
  for (var name in all) __defProp2(target, name, {
@@ -15753,129 +15893,71 @@ var require_create_context_native = __commonJS({
15753
15893
  return __copyProps2(__defProp2({}, "__esModule", {
15754
15894
  value: !0
15755
15895
  }), mod);
15756
- }, create_context_exports = {};
15757
- __export2(create_context_exports, {
15758
- createContext: function() {
15759
- return createContext;
15760
- },
15761
- createContextScope: function() {
15762
- return createContextScope;
15896
+ }, Portal_native_exports = {};
15897
+ __export2(Portal_native_exports, {
15898
+ Portal: function() {
15899
+ return Portal;
15763
15900
  }
15764
15901
  });
15765
- module2.exports = __toCommonJS2(create_context_exports);
15766
- var import_jsx_runtime6 = require("react/jsx-runtime"), React4 = __toESM2(require("react"));
15767
- function createContext(rootComponentName, defaultContext) {
15768
- var Context = /* @__PURE__ */ React4.createContext(defaultContext);
15769
- function Provider(props) {
15770
- var { children, ...context } = props, value = React4.useMemo(function() {
15771
- return context;
15772
- }, Object.values(context));
15773
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
15774
- value,
15775
- children
15776
- });
15777
- }
15778
- function useContext(consumerName) {
15779
- var context = React4.useContext(Context);
15780
- if (context) return context;
15781
- if (defaultContext !== void 0) return defaultContext;
15782
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
15783
- }
15784
- return Provider.displayName = `${rootComponentName}Provider`, [
15785
- Provider,
15786
- useContext
15787
- ];
15788
- }
15789
- function createContextScope(scopeName) {
15790
- var createContextScopeDeps = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], defaultContexts = [];
15791
- function createContext2(rootComponentName, defaultContext) {
15792
- var BaseContext = /* @__PURE__ */ React4.createContext(defaultContext), index = defaultContexts.length;
15793
- defaultContexts = [
15794
- ...defaultContexts,
15795
- defaultContext
15796
- ];
15797
- function Provider(props) {
15798
- var _scope_scopeName, { scope, children, ...context } = props, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext, value = React4.useMemo(function() {
15799
- return context;
15800
- }, Object.values(context));
15801
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
15802
- value,
15803
- children
15902
+ module2.exports = __toCommonJS2(Portal_native_exports);
15903
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_stacks3 = require_index_native21(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_GorhomPortal = require_GorhomPortal_native(), import_useStackedZIndex = require_useStackedZIndex_native(), _global, isFabric = (_global = global) === null || _global === void 0 ? void 0 : _global.nativeFabricUIManager, createPortal;
15904
+ isFabric ? createPortal = require("react-native/Libraries/Renderer/shims/ReactFabric").createPortal : createPortal = require("react-native/Libraries/Renderer/shims/ReactNative").createPortal;
15905
+ var Portal = function(propsIn) {
15906
+ 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, {
15907
+ pointerEvents: "box-none",
15908
+ fullscreen: !0,
15909
+ position: "absolute",
15910
+ maxWidth: "100%",
15911
+ ...props,
15912
+ zIndex
15913
+ });
15914
+ return process.env.TAMAGUI_USE_NATIVE_PORTAL === "false" || import_react_native4.Platform.OS === "android" || !rootTag ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GorhomPortal.PortalItem, {
15915
+ hostName: "root",
15916
+ children: contents
15917
+ }) : createPortal(contents, rootTag);
15918
+ };
15919
+ }
15920
+ });
15921
+
15922
+ // ../portal/dist/cjs/PortalProps.native.js
15923
+ var require_PortalProps_native = __commonJS({
15924
+ "../portal/dist/cjs/PortalProps.native.js"(exports2, module2) {
15925
+ "use strict";
15926
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
15927
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
15928
+ if (from && typeof from == "object" || typeof from == "function") try {
15929
+ for (var _loop = function() {
15930
+ var key = _step.value;
15931
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
15932
+ get: function() {
15933
+ return from[key];
15934
+ },
15935
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
15804
15936
  });
15937
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
15938
+ } catch (err) {
15939
+ _didIteratorError = !0, _iteratorError = err;
15940
+ } finally {
15941
+ try {
15942
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
15943
+ } finally {
15944
+ if (_didIteratorError)
15945
+ throw _iteratorError;
15805
15946
  }
15806
- function useContext(consumerName, scope, options) {
15807
- var _scope_scopeName, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext, context = React4.useContext(Context);
15808
- if (context) return context;
15809
- if (defaultContext !== void 0) return defaultContext;
15810
- var missingContextMessage = `\`${consumerName}\` must be used within \`${rootComponentName}\``;
15811
- if (options != null && options.fallback) return (options == null ? void 0 : options.warn) !== !1 && console.warn(missingContextMessage), options.fallback;
15812
- throw new Error(missingContextMessage);
15813
- }
15814
- return Provider.displayName = `${rootComponentName}Provider`, [
15815
- Provider,
15816
- useContext
15817
- ];
15818
15947
  }
15819
- var createScope = function() {
15820
- var scopeContexts = defaultContexts.map(function(defaultContext) {
15821
- return /* @__PURE__ */ React4.createContext(defaultContext);
15822
- });
15823
- return function(scope) {
15824
- var contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
15825
- return React4.useMemo(function() {
15826
- return {
15827
- [`__scope${scopeName}`]: {
15828
- ...scope,
15829
- [scopeName]: contexts
15830
- }
15831
- };
15832
- }, [
15833
- scope,
15834
- contexts
15835
- ]);
15836
- };
15837
- };
15838
- return createScope.scopeName = scopeName, [
15839
- createContext2,
15840
- composeContextScopes(createScope, ...createContextScopeDeps)
15841
- ];
15842
- }
15843
- function composeContextScopes() {
15844
- for (var _len = arguments.length, scopes = new Array(_len), _key = 0; _key < _len; _key++) scopes[_key] = arguments[_key];
15845
- var baseScope = scopes[0];
15846
- if (scopes.length === 1) return baseScope;
15847
- var createScope = function() {
15848
- var scopeHooks = scopes.map(function(createScope22) {
15849
- return {
15850
- useScope: createScope22(),
15851
- scopeName: createScope22.scopeName
15852
- };
15853
- });
15854
- return function(overrideScopes) {
15855
- var nextScopes = scopeHooks.reduce(function(nextScopes2, param) {
15856
- var { useScope, scopeName } = param, scopeProps = useScope(overrideScopes), currentScope = scopeProps[`__scope${scopeName}`];
15857
- return {
15858
- ...nextScopes2,
15859
- ...currentScope
15860
- };
15861
- }, {});
15862
- return React4.useMemo(function() {
15863
- return {
15864
- [`__scope${baseScope.scopeName}`]: nextScopes
15865
- };
15866
- }, [
15867
- nextScopes
15868
- ]);
15869
- };
15870
- };
15871
- return createScope.scopeName = baseScope.scopeName, createScope;
15872
- }
15948
+ return to;
15949
+ }, __toCommonJS2 = function(mod) {
15950
+ return __copyProps2(__defProp2({}, "__esModule", {
15951
+ value: !0
15952
+ }), mod);
15953
+ }, PortalProps_exports = {};
15954
+ module2.exports = __toCommonJS2(PortalProps_exports);
15873
15955
  }
15874
15956
  });
15875
15957
 
15876
- // ../../core/create-context/dist/cjs/index.native.js
15877
- var require_index_native27 = __commonJS({
15878
- "../../core/create-context/dist/cjs/index.native.js"(exports2, module2) {
15958
+ // ../portal/dist/cjs/index.native.js
15959
+ var require_index_native26 = __commonJS({
15960
+ "../portal/dist/cjs/index.native.js"(exports2, module2) {
15879
15961
  "use strict";
15880
15962
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
15881
15963
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
@@ -15908,15 +15990,17 @@ var require_index_native27 = __commonJS({
15908
15990
  }), mod);
15909
15991
  }, src_exports2 = {};
15910
15992
  module2.exports = __toCommonJS2(src_exports2);
15911
- __reExport2(src_exports2, require_create_context_native(), module2.exports);
15993
+ __reExport2(src_exports2, require_Portal_native(), module2.exports);
15994
+ __reExport2(src_exports2, require_PortalProps_native(), module2.exports);
15995
+ __reExport2(src_exports2, require_GorhomPortal_native(), module2.exports);
15912
15996
  }
15913
15997
  });
15914
15998
 
15915
- // ../../core/aria-hidden/dist/cjs/AriaHidden.native.js
15916
- var require_AriaHidden_native = __commonJS({
15917
- "../../core/aria-hidden/dist/cjs/AriaHidden.native.js"(exports2, module2) {
15999
+ // ../adapt/dist/cjs/Adapt.native.js
16000
+ var require_Adapt_native = __commonJS({
16001
+ "../adapt/dist/cjs/Adapt.native.js"(exports2, module2) {
15918
16002
  "use strict";
15919
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
16003
+ var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
15920
16004
  for (var name in all) __defProp2(target, name, {
15921
16005
  get: all[name],
15922
16006
  enumerable: !0
@@ -15944,25 +16028,151 @@ var require_AriaHidden_native = __commonJS({
15944
16028
  }
15945
16029
  }
15946
16030
  return to;
16031
+ }, __toESM2 = function(mod, isNodeMode, target) {
16032
+ return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
16033
+ // If the importer is in node compatibility mode or this is not an ESM
16034
+ // file that has been converted to a CommonJS file using a Babel-
16035
+ // compatible transform (i.e. "__esModule" has not been set), then set
16036
+ // "default" to the CommonJS "module.exports" for node compatibility.
16037
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
16038
+ value: mod,
16039
+ enumerable: !0
16040
+ }) : target,
16041
+ mod
16042
+ );
15947
16043
  }, __toCommonJS2 = function(mod) {
15948
16044
  return __copyProps2(__defProp2({}, "__esModule", {
15949
16045
  value: !0
15950
16046
  }), mod);
15951
- }, AriaHidden_native_exports = {};
15952
- __export2(AriaHidden_native_exports, {
15953
- hideOthers: function() {
15954
- return hideOthers;
16047
+ }, Adapt_exports = {};
16048
+ __export2(Adapt_exports, {
16049
+ Adapt: function() {
16050
+ return Adapt;
16051
+ },
16052
+ AdaptContents: function() {
16053
+ return AdaptContents;
16054
+ },
16055
+ AdaptContext: function() {
16056
+ return AdaptContext;
16057
+ },
16058
+ AdaptParent: function() {
16059
+ return AdaptParent;
16060
+ },
16061
+ AdaptPortalContents: function() {
16062
+ return AdaptPortalContents;
16063
+ },
16064
+ useAdaptContext: function() {
16065
+ return useAdaptContext;
16066
+ },
16067
+ useAdaptIsActive: function() {
16068
+ return useAdaptIsActive;
15955
16069
  }
15956
16070
  });
15957
- module2.exports = __toCommonJS2(AriaHidden_native_exports);
15958
- var hideOthers = function() {
16071
+ module2.exports = __toCommonJS2(Adapt_exports);
16072
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_helpers = require_index_native7(), import_portal2 = require_index_native26(), import_react3 = __toESM2(require("react")), CurrentAdaptContextScope = /* @__PURE__ */ (0, import_react3.createContext)(""), AdaptContext = (0, import_core12.createStyledContext)({
16073
+ Contents: null,
16074
+ scopeName: "",
16075
+ portalName: "",
16076
+ platform: null,
16077
+ setPlatform: null,
16078
+ when: null,
16079
+ setChildren: null,
16080
+ setWhen: null
16081
+ }), ProvideAdaptContext = function(param) {
16082
+ var { children, ...context } = param, scope = context.scopeName || "";
16083
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CurrentAdaptContextScope.Provider, {
16084
+ value: scope,
16085
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptContext.Provider, {
16086
+ scope,
16087
+ ...context,
16088
+ children
16089
+ })
16090
+ });
16091
+ }, useAdaptContext = function() {
16092
+ var scope = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", contextScope = (0, import_react3.useContext)(CurrentAdaptContextScope), context = AdaptContext.useStyledContext(scope === "" && contextScope || scope);
16093
+ return context;
16094
+ }, AdaptPortals = /* @__PURE__ */ new Map(), AdaptParent = function(param) {
16095
+ var { children, Contents, scope, portal } = param, portalName = `AdaptPortal${scope}`, id = (0, import_react3.useId)(), FinalContents = Contents || AdaptPortals.get(id);
16096
+ FinalContents || (FinalContents = function() {
16097
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
16098
+ name: portalName,
16099
+ forwardProps: typeof portal == "boolean" || portal == null ? void 0 : portal.forwardProps
16100
+ });
16101
+ }, AdaptPortals.set(id, FinalContents)), (0, import_react3.useEffect)(function() {
16102
+ return function() {
16103
+ AdaptPortals.delete(id);
16104
+ };
16105
+ }, []);
16106
+ var [when, setWhen] = import_react3.default.useState(null), [platform2, setPlatform] = import_react3.default.useState(null), [children2, setChildren] = import_react3.default.useState(null);
16107
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProvideAdaptContext, {
16108
+ Contents: FinalContents,
16109
+ when,
16110
+ platform: platform2,
16111
+ setPlatform,
16112
+ setWhen,
16113
+ setChildren,
16114
+ portalName,
16115
+ scopeName: scope,
16116
+ children
16117
+ });
16118
+ }, AdaptContents = function(param) {
16119
+ var { scope, ...rest } = param, context = useAdaptContext(scope);
16120
+ if (!(context != null && context.Contents)) throw new Error(process.env.NODE_ENV === "production" ? "tamagui.dev/docs/intro/errors#warning-002" : "You're rendering a Tamagui <Adapt /> component without nesting it inside a parent that is able to adapt.");
16121
+ return /* @__PURE__ */ import_react3.default.createElement(context.Contents, {
16122
+ ...rest,
16123
+ key: "stable"
16124
+ });
16125
+ };
16126
+ AdaptContents.shouldForwardSpace = !0;
16127
+ var Adapt = (0, import_helpers.withStaticProperties)(function(props) {
16128
+ var { platform: platform2, when, children, scope } = props, context = useAdaptContext(scope), scopeName = scope ?? context.scopeName, enabled = useAdaptIsActiveGiven(props);
16129
+ (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16130
+ context == null || context.setWhen(when || enabled), context == null || context.setPlatform(platform2 || null);
16131
+ }, [
16132
+ when,
16133
+ platform2,
16134
+ context,
16135
+ enabled
16136
+ ]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16137
+ return function() {
16138
+ context == null || context.setWhen(null);
16139
+ };
16140
+ }, []);
16141
+ var output;
16142
+ if (typeof children == "function") {
16143
+ var Component = context == null ? void 0 : context.Contents;
16144
+ output = children(Component ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Component, {}) : null);
16145
+ } else output = children;
16146
+ return (0, import_react3.useEffect)(function() {
16147
+ typeof children == "function" && output !== void 0 && (context == null || context.setChildren(output));
16148
+ }, [
16149
+ output
16150
+ ]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CurrentAdaptContextScope.Provider, {
16151
+ value: scopeName,
16152
+ children: enabled ? output : null
16153
+ });
16154
+ }, {
16155
+ Contents: AdaptContents
16156
+ }), AdaptPortalContents = function(props) {
16157
+ var { portalName } = useAdaptContext(props.scope);
16158
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
16159
+ // passthrough={!isWeb && !isActive}
16160
+ hostName: portalName,
16161
+ children: props.children
16162
+ });
16163
+ }, useAdaptIsActiveGiven = function(param) {
16164
+ var { when, platform: platform2 } = param, media = (0, import_core12.useMedia)(), enabled = !1;
16165
+ 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), when && typeof when == "string" && !media[when] && (enabled = !1), enabled;
16166
+ }, useAdaptIsActive = function(scope) {
16167
+ var props = useAdaptContext(scope);
16168
+ return useAdaptIsActiveGiven(props);
15959
16169
  };
15960
16170
  }
15961
16171
  });
15962
16172
 
15963
- // ../../core/aria-hidden/dist/cjs/index.native.js
15964
- var require_index_native28 = __commonJS({
15965
- "../../core/aria-hidden/dist/cjs/index.native.js"(exports2, module2) {
16173
+ // ../adapt/dist/cjs/index.native.js
16174
+ var require_index_native27 = __commonJS({
16175
+ "../adapt/dist/cjs/index.native.js"(exports2, module2) {
15966
16176
  "use strict";
15967
16177
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
15968
16178
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
@@ -15995,13 +16205,13 @@ var require_index_native28 = __commonJS({
15995
16205
  }), mod);
15996
16206
  }, src_exports2 = {};
15997
16207
  module2.exports = __toCommonJS2(src_exports2);
15998
- __reExport2(src_exports2, require_AriaHidden_native(), module2.exports);
16208
+ __reExport2(src_exports2, require_Adapt_native(), module2.exports);
15999
16209
  }
16000
16210
  });
16001
16211
 
16002
- // ../dismissable/dist/cjs/Dismissable.native.js
16003
- var require_Dismissable_native = __commonJS({
16004
- "../dismissable/dist/cjs/Dismissable.native.js"(exports2, module2) {
16212
+ // ../../core/create-context/dist/cjs/create-context.native.js
16213
+ var require_create_context_native = __commonJS({
16214
+ "../../core/create-context/dist/cjs/create-context.native.js"(exports2, module2) {
16005
16215
  "use strict";
16006
16216
  var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
16007
16217
  for (var name in all) __defProp2(target, name, {
@@ -16047,27 +16257,129 @@ var require_Dismissable_native = __commonJS({
16047
16257
  return __copyProps2(__defProp2({}, "__esModule", {
16048
16258
  value: !0
16049
16259
  }), mod);
16050
- }, Dismissable_native_exports = {};
16051
- __export2(Dismissable_native_exports, {
16052
- Dismissable: function() {
16053
- return Dismissable;
16260
+ }, create_context_exports = {};
16261
+ __export2(create_context_exports, {
16262
+ createContext: function() {
16263
+ return createContext;
16054
16264
  },
16055
- DismissableBranch: function() {
16056
- return DismissableBranch;
16265
+ createContextScope: function() {
16266
+ return createContextScope;
16057
16267
  }
16058
16268
  });
16059
- module2.exports = __toCommonJS2(Dismissable_native_exports);
16060
- var import_react3 = __toESM2(require("react")), Dismissable = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
16061
- return props.children;
16062
- }), DismissableBranch = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
16063
- return props.children;
16064
- });
16269
+ module2.exports = __toCommonJS2(create_context_exports);
16270
+ var import_jsx_runtime6 = require("react/jsx-runtime"), React4 = __toESM2(require("react"));
16271
+ function createContext(rootComponentName, defaultContext) {
16272
+ var Context = /* @__PURE__ */ React4.createContext(defaultContext);
16273
+ function Provider(props) {
16274
+ var { children, ...context } = props, value = React4.useMemo(function() {
16275
+ return context;
16276
+ }, Object.values(context));
16277
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
16278
+ value,
16279
+ children
16280
+ });
16281
+ }
16282
+ function useContext(consumerName) {
16283
+ var context = React4.useContext(Context);
16284
+ if (context) return context;
16285
+ if (defaultContext !== void 0) return defaultContext;
16286
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
16287
+ }
16288
+ return Provider.displayName = `${rootComponentName}Provider`, [
16289
+ Provider,
16290
+ useContext
16291
+ ];
16292
+ }
16293
+ function createContextScope(scopeName) {
16294
+ var createContextScopeDeps = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], defaultContexts = [];
16295
+ function createContext2(rootComponentName, defaultContext) {
16296
+ var BaseContext = /* @__PURE__ */ React4.createContext(defaultContext), index = defaultContexts.length;
16297
+ defaultContexts = [
16298
+ ...defaultContexts,
16299
+ defaultContext
16300
+ ];
16301
+ function Provider(props) {
16302
+ var _scope_scopeName, { scope, children, ...context } = props, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext, value = React4.useMemo(function() {
16303
+ return context;
16304
+ }, Object.values(context));
16305
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
16306
+ value,
16307
+ children
16308
+ });
16309
+ }
16310
+ function useContext(consumerName, scope, options) {
16311
+ var _scope_scopeName, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext, context = React4.useContext(Context);
16312
+ if (context) return context;
16313
+ if (defaultContext !== void 0) return defaultContext;
16314
+ var missingContextMessage = `\`${consumerName}\` must be used within \`${rootComponentName}\``;
16315
+ if (options != null && options.fallback) return (options == null ? void 0 : options.warn) !== !1 && console.warn(missingContextMessage), options.fallback;
16316
+ throw new Error(missingContextMessage);
16317
+ }
16318
+ return Provider.displayName = `${rootComponentName}Provider`, [
16319
+ Provider,
16320
+ useContext
16321
+ ];
16322
+ }
16323
+ var createScope = function() {
16324
+ var scopeContexts = defaultContexts.map(function(defaultContext) {
16325
+ return /* @__PURE__ */ React4.createContext(defaultContext);
16326
+ });
16327
+ return function(scope) {
16328
+ var contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
16329
+ return React4.useMemo(function() {
16330
+ return {
16331
+ [`__scope${scopeName}`]: {
16332
+ ...scope,
16333
+ [scopeName]: contexts
16334
+ }
16335
+ };
16336
+ }, [
16337
+ scope,
16338
+ contexts
16339
+ ]);
16340
+ };
16341
+ };
16342
+ return createScope.scopeName = scopeName, [
16343
+ createContext2,
16344
+ composeContextScopes(createScope, ...createContextScopeDeps)
16345
+ ];
16346
+ }
16347
+ function composeContextScopes() {
16348
+ for (var _len = arguments.length, scopes = new Array(_len), _key = 0; _key < _len; _key++) scopes[_key] = arguments[_key];
16349
+ var baseScope = scopes[0];
16350
+ if (scopes.length === 1) return baseScope;
16351
+ var createScope = function() {
16352
+ var scopeHooks = scopes.map(function(createScope22) {
16353
+ return {
16354
+ useScope: createScope22(),
16355
+ scopeName: createScope22.scopeName
16356
+ };
16357
+ });
16358
+ return function(overrideScopes) {
16359
+ var nextScopes = scopeHooks.reduce(function(nextScopes2, param) {
16360
+ var { useScope, scopeName } = param, scopeProps = useScope(overrideScopes), currentScope = scopeProps[`__scope${scopeName}`];
16361
+ return {
16362
+ ...nextScopes2,
16363
+ ...currentScope
16364
+ };
16365
+ }, {});
16366
+ return React4.useMemo(function() {
16367
+ return {
16368
+ [`__scope${baseScope.scopeName}`]: nextScopes
16369
+ };
16370
+ }, [
16371
+ nextScopes
16372
+ ]);
16373
+ };
16374
+ };
16375
+ return createScope.scopeName = baseScope.scopeName, createScope;
16376
+ }
16065
16377
  }
16066
16378
  });
16067
16379
 
16068
- // ../dismissable/dist/cjs/index.native.js
16069
- var require_index_native29 = __commonJS({
16070
- "../dismissable/dist/cjs/index.native.js"(exports2, module2) {
16380
+ // ../../core/create-context/dist/cjs/index.native.js
16381
+ var require_index_native28 = __commonJS({
16382
+ "../../core/create-context/dist/cjs/index.native.js"(exports2, module2) {
16071
16383
  "use strict";
16072
16384
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
16073
16385
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
@@ -16100,15 +16412,15 @@ var require_index_native29 = __commonJS({
16100
16412
  }), mod);
16101
16413
  }, src_exports2 = {};
16102
16414
  module2.exports = __toCommonJS2(src_exports2);
16103
- __reExport2(src_exports2, require_Dismissable_native(), module2.exports);
16415
+ __reExport2(src_exports2, require_create_context_native(), module2.exports);
16104
16416
  }
16105
16417
  });
16106
16418
 
16107
- // ../focus-scope/dist/cjs/FocusScope.native.js
16108
- var require_FocusScope_native = __commonJS({
16109
- "../focus-scope/dist/cjs/FocusScope.native.js"(exports2, module2) {
16419
+ // ../../core/aria-hidden/dist/cjs/AriaHidden.native.js
16420
+ var require_AriaHidden_native = __commonJS({
16421
+ "../../core/aria-hidden/dist/cjs/AriaHidden.native.js"(exports2, module2) {
16110
16422
  "use strict";
16111
- var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
16423
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
16112
16424
  for (var name in all) __defProp2(target, name, {
16113
16425
  get: all[name],
16114
16426
  enumerable: !0
@@ -16136,38 +16448,25 @@ var require_FocusScope_native = __commonJS({
16136
16448
  }
16137
16449
  }
16138
16450
  return to;
16139
- }, __toESM2 = function(mod, isNodeMode, target) {
16140
- return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
16141
- // If the importer is in node compatibility mode or this is not an ESM
16142
- // file that has been converted to a CommonJS file using a Babel-
16143
- // compatible transform (i.e. "__esModule" has not been set), then set
16144
- // "default" to the CommonJS "module.exports" for node compatibility.
16145
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
16146
- value: mod,
16147
- enumerable: !0
16148
- }) : target,
16149
- mod
16150
- );
16151
16451
  }, __toCommonJS2 = function(mod) {
16152
16452
  return __copyProps2(__defProp2({}, "__esModule", {
16153
16453
  value: !0
16154
16454
  }), mod);
16155
- }, FocusScope_native_exports = {};
16156
- __export2(FocusScope_native_exports, {
16157
- FocusScope: function() {
16158
- return FocusScope;
16455
+ }, AriaHidden_native_exports = {};
16456
+ __export2(AriaHidden_native_exports, {
16457
+ hideOthers: function() {
16458
+ return hideOthers;
16159
16459
  }
16160
16460
  });
16161
- module2.exports = __toCommonJS2(FocusScope_native_exports);
16162
- var import_react3 = __toESM2(require("react")), FocusScope = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
16163
- return props.children;
16164
- });
16461
+ module2.exports = __toCommonJS2(AriaHidden_native_exports);
16462
+ var hideOthers = function() {
16463
+ };
16165
16464
  }
16166
16465
  });
16167
16466
 
16168
- // ../focus-scope/dist/cjs/index.native.js
16169
- var require_index_native30 = __commonJS({
16170
- "../focus-scope/dist/cjs/index.native.js"(exports2, module2) {
16467
+ // ../../core/aria-hidden/dist/cjs/index.native.js
16468
+ var require_index_native29 = __commonJS({
16469
+ "../../core/aria-hidden/dist/cjs/index.native.js"(exports2, module2) {
16171
16470
  "use strict";
16172
16471
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
16173
16472
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
@@ -16200,13 +16499,13 @@ var require_index_native30 = __commonJS({
16200
16499
  }), mod);
16201
16500
  }, src_exports2 = {};
16202
16501
  module2.exports = __toCommonJS2(src_exports2);
16203
- __reExport2(src_exports2, require_FocusScope_native(), module2.exports);
16502
+ __reExport2(src_exports2, require_AriaHidden_native(), module2.exports);
16204
16503
  }
16205
16504
  });
16206
16505
 
16207
- // ../portal/dist/cjs/GorhomPortal.native.js
16208
- var require_GorhomPortal_native = __commonJS({
16209
- "../portal/dist/cjs/GorhomPortal.native.js"(exports2, module2) {
16506
+ // ../dismissable/dist/cjs/Dismissable.native.js
16507
+ var require_Dismissable_native = __commonJS({
16508
+ "../dismissable/dist/cjs/Dismissable.native.js"(exports2, module2) {
16210
16509
  "use strict";
16211
16510
  var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
16212
16511
  for (var name in all) __defProp2(target, name, {
@@ -16252,197 +16551,29 @@ var require_GorhomPortal_native = __commonJS({
16252
16551
  return __copyProps2(__defProp2({}, "__esModule", {
16253
16552
  value: !0
16254
16553
  }), mod);
16255
- }, GorhomPortal_exports = {};
16256
- __export2(GorhomPortal_exports, {
16257
- ACTIONS: function() {
16258
- return ACTIONS;
16259
- },
16260
- INITIAL_STATE: function() {
16261
- return INITIAL_STATE;
16262
- },
16263
- PortalHost: function() {
16264
- return PortalHost;
16265
- },
16266
- PortalItem: function() {
16267
- return PortalItem;
16268
- },
16269
- PortalProvider: function() {
16270
- return PortalProvider2;
16554
+ }, Dismissable_native_exports = {};
16555
+ __export2(Dismissable_native_exports, {
16556
+ Dismissable: function() {
16557
+ return Dismissable;
16271
16558
  },
16272
- usePortal: function() {
16273
- return usePortal;
16559
+ DismissableBranch: function() {
16560
+ return DismissableBranch;
16274
16561
  }
16275
16562
  });
16276
- module2.exports = __toCommonJS2(GorhomPortal_exports);
16277
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_react3 = __toESM2(require("react")), import_start_transition = require_index_native9(), ACTIONS;
16278
- (function(ACTIONS2) {
16279
- 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";
16280
- })(ACTIONS || (ACTIONS = {}));
16281
- var INITIAL_STATE = {}, registerHost = function(state, hostName) {
16282
- return hostName in state || (state[hostName] = []), state;
16283
- }, deregisterHost = function(state, hostName) {
16284
- return delete state[hostName], state;
16285
- }, addUpdatePortal = function(state, hostName, portalName, node) {
16286
- hostName in state || (state = registerHost(state, hostName));
16287
- var index = state[hostName].findIndex(function(item) {
16288
- return item.name === portalName;
16289
- });
16290
- return index !== -1 ? state[hostName][index].node = node : state[hostName].push({
16291
- name: portalName,
16292
- node
16293
- }), state;
16294
- }, removePortal = function(state, hostName, portalName) {
16295
- if (!(hostName in state)) return console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`), state;
16296
- var index = state[hostName].findIndex(function(item) {
16297
- return item.name === portalName;
16298
- });
16299
- return index !== -1 && state[hostName].splice(index, 1), state;
16300
- }, reducer = function(state, action) {
16301
- var { type } = action;
16302
- switch (type) {
16303
- case 0:
16304
- return registerHost({
16305
- ...state
16306
- }, action.hostName);
16307
- case 1:
16308
- return deregisterHost({
16309
- ...state
16310
- }, action.hostName);
16311
- case 2:
16312
- return addUpdatePortal({
16313
- ...state
16314
- }, action.hostName, action.portalName, action.node);
16315
- case 3:
16316
- return removePortal({
16317
- ...state
16318
- }, action.hostName, action.portalName);
16319
- default:
16320
- return state;
16321
- }
16322
- }, PortalStateContext = /* @__PURE__ */ (0, import_react3.createContext)(null), PortalDispatchContext = /* @__PURE__ */ (0, import_react3.createContext)(null), usePortalState = function(hostName) {
16323
- var state = (0, import_react3.useContext)(PortalStateContext);
16324
- if (state === null) throw new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
16325
- return state[hostName] || [];
16326
- }, usePortal = function() {
16327
- var hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "root", dispatch = (0, import_react3.useContext)(PortalDispatchContext);
16328
- if (dispatch === null) throw new Error("'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.");
16329
- var registerHost2 = (0, import_react3.useCallback)(function() {
16330
- dispatch({
16331
- type: 0,
16332
- hostName
16333
- });
16334
- }, []), deregisterHost2 = (0, import_react3.useCallback)(function() {
16335
- dispatch({
16336
- type: 1,
16337
- hostName
16338
- });
16339
- }, []), addUpdatePortal2 = (0, import_react3.useCallback)(function(name, node) {
16340
- dispatch({
16341
- type: 2,
16342
- hostName,
16343
- portalName: name,
16344
- node
16345
- });
16346
- }, []), removePortal2 = (0, import_react3.useCallback)(function(name) {
16347
- dispatch({
16348
- type: 3,
16349
- hostName,
16350
- portalName: name
16351
- });
16352
- }, []);
16353
- return {
16354
- registerHost: registerHost2,
16355
- deregisterHost: deregisterHost2,
16356
- addPortal: addUpdatePortal2,
16357
- updatePortal: addUpdatePortal2,
16358
- removePortal: removePortal2
16359
- };
16360
- }, PortalProviderComponent = function(param) {
16361
- var { rootHostName = "root", shouldAddRootHost = !0, children } = param, [state, dispatch] = (0, import_react3.useReducer)(reducer, INITIAL_STATE), transitionDispatch = (0, import_react3.useMemo)(function() {
16362
- var next = function(value) {
16363
- (0, import_start_transition.startTransition)(function() {
16364
- dispatch(value);
16365
- });
16366
- };
16367
- return next;
16368
- }, [
16369
- dispatch
16370
- ]);
16371
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalDispatchContext.Provider, {
16372
- value: transitionDispatch,
16373
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(PortalStateContext.Provider, {
16374
- value: state,
16375
- children: [
16376
- children,
16377
- shouldAddRootHost && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHost, {
16378
- name: rootHostName
16379
- })
16380
- ]
16381
- })
16382
- });
16383
- }, PortalProvider2 = /* @__PURE__ */ (0, import_react3.memo)(PortalProviderComponent);
16384
- PortalProvider2.displayName = "PortalProvider";
16385
- var defaultRenderer = function(children) {
16386
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
16387
- children
16388
- });
16389
- }, PortalHostComponent = function(props) {
16390
- var { name, forwardProps, render = defaultRenderer } = props, state = usePortalState(name), { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
16391
- return (0, import_react3.useEffect)(function() {
16392
- if (!(typeof window > "u")) return registerHost2(), function() {
16393
- deregisterHost2();
16394
- };
16395
- }, []), render(forwardProps ? state.map(function(item) {
16396
- var next = item.node;
16397
- return forwardProps ? import_react3.default.Children.map(next, function(child) {
16398
- return /* @__PURE__ */ import_react3.default.isValidElement(child) ? /* @__PURE__ */ import_react3.default.cloneElement(child, {
16399
- key: child.key,
16400
- ...forwardProps
16401
- }) : child;
16402
- }) : next;
16403
- }) : state.map(function(item) {
16404
- return item.node;
16405
- }));
16406
- }, PortalHost = /* @__PURE__ */ (0, import_react3.memo)(PortalHostComponent);
16407
- PortalHost.displayName = "PortalHost";
16408
- var PortalComponent = function(props) {
16409
- var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children } = props, { addPortal: addUpdatePortal2, removePortal: removePortal2 } = usePortal(hostName), id = (0, import_react3.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(function() {
16410
- _providedHandleOnMount ? _providedHandleOnMount(function() {
16411
- return addUpdatePortal2(name, children);
16412
- }) : addUpdatePortal2(name, children);
16413
- }), handleOnUnmount = (0, import_core12.useEvent)(function() {
16414
- _providedHandleOnUnmount ? _providedHandleOnUnmount(function() {
16415
- return removePortal2(name);
16416
- }) : removePortal2(name);
16417
- }), handleOnUpdate = (0, import_core12.useEvent)(function() {
16418
- _providedHandleOnUpdate ? _providedHandleOnUpdate(function() {
16419
- return addUpdatePortal2(name, children);
16420
- }) : addUpdatePortal2(name, children);
16421
- });
16422
- return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16423
- return handleOnMount(), function() {
16424
- handleOnUnmount();
16425
- };
16426
- }, []), (0, import_react3.useEffect)(function() {
16427
- handleOnUpdate();
16428
- }, [
16429
- children
16430
- ]), null;
16431
- }, PortalItem = /* @__PURE__ */ (0, import_react3.memo)(PortalComponent);
16432
- PortalItem.displayName = "Portal";
16563
+ module2.exports = __toCommonJS2(Dismissable_native_exports);
16564
+ var import_react3 = __toESM2(require("react")), Dismissable = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
16565
+ return props.children;
16566
+ }), DismissableBranch = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
16567
+ return props.children;
16568
+ });
16433
16569
  }
16434
16570
  });
16435
16571
 
16436
- // ../portal/dist/cjs/Portal.native.js
16437
- var require_Portal_native = __commonJS({
16438
- "../portal/dist/cjs/Portal.native.js"(exports2, module2) {
16572
+ // ../dismissable/dist/cjs/index.native.js
16573
+ var require_index_native30 = __commonJS({
16574
+ "../dismissable/dist/cjs/index.native.js"(exports2, module2) {
16439
16575
  "use strict";
16440
- var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
16441
- for (var name in all) __defProp2(target, name, {
16442
- get: all[name],
16443
- enumerable: !0
16444
- });
16445
- }, __copyProps2 = function(to, from, except, desc) {
16576
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
16446
16577
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
16447
16578
  if (from && typeof from == "object" || typeof from == "function") try {
16448
16579
  for (var _loop = function() {
@@ -16465,53 +16596,28 @@ var require_Portal_native = __commonJS({
16465
16596
  }
16466
16597
  }
16467
16598
  return to;
16468
- }, __toESM2 = function(mod, isNodeMode, target) {
16469
- return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
16470
- // If the importer is in node compatibility mode or this is not an ESM
16471
- // file that has been converted to a CommonJS file using a Babel-
16472
- // compatible transform (i.e. "__esModule" has not been set), then set
16473
- // "default" to the CommonJS "module.exports" for node compatibility.
16474
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
16475
- value: mod,
16476
- enumerable: !0
16477
- }) : target,
16478
- mod
16479
- );
16599
+ }, __reExport2 = function(target, mod, secondTarget) {
16600
+ return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
16480
16601
  }, __toCommonJS2 = function(mod) {
16481
16602
  return __copyProps2(__defProp2({}, "__esModule", {
16482
16603
  value: !0
16483
16604
  }), mod);
16484
- }, Portal_native_exports = {};
16485
- __export2(Portal_native_exports, {
16486
- Portal: function() {
16487
- return Portal;
16488
- }
16489
- });
16490
- module2.exports = __toCommonJS2(Portal_native_exports);
16491
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_stacks3 = require_index_native21(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_GorhomPortal = require_GorhomPortal_native(), _global, isFabric = (_global = global) === null || _global === void 0 ? void 0 : _global.nativeFabricUIManager, createPortal;
16492
- isFabric ? createPortal = require("react-native/Libraries/Renderer/shims/ReactFabric").createPortal : createPortal = require("react-native/Libraries/Renderer/shims/ReactNative").createPortal;
16493
- var Portal = function(props) {
16494
- var rootTag = React4.useContext(import_react_native4.RootTagContext), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
16495
- pointerEvents: "box-none",
16496
- fullscreen: !0,
16497
- position: "absolute",
16498
- maxWidth: "100%",
16499
- zIndex: 1e5,
16500
- ...props
16501
- });
16502
- return process.env.TAMAGUI_USE_NATIVE_PORTAL === "false" || import_react_native4.Platform.OS === "android" || !rootTag ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GorhomPortal.PortalItem, {
16503
- hostName: "root",
16504
- children: contents
16505
- }) : createPortal(contents, rootTag);
16506
- };
16605
+ }, src_exports2 = {};
16606
+ module2.exports = __toCommonJS2(src_exports2);
16607
+ __reExport2(src_exports2, require_Dismissable_native(), module2.exports);
16507
16608
  }
16508
16609
  });
16509
16610
 
16510
- // ../portal/dist/cjs/PortalProps.native.js
16511
- var require_PortalProps_native = __commonJS({
16512
- "../portal/dist/cjs/PortalProps.native.js"(exports2, module2) {
16611
+ // ../focus-scope/dist/cjs/FocusScope.native.js
16612
+ var require_FocusScope_native = __commonJS({
16613
+ "../focus-scope/dist/cjs/FocusScope.native.js"(exports2, module2) {
16513
16614
  "use strict";
16514
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
16615
+ var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
16616
+ for (var name in all) __defProp2(target, name, {
16617
+ get: all[name],
16618
+ enumerable: !0
16619
+ });
16620
+ }, __copyProps2 = function(to, from, except, desc) {
16515
16621
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
16516
16622
  if (from && typeof from == "object" || typeof from == "function") try {
16517
16623
  for (var _loop = function() {
@@ -16534,18 +16640,38 @@ var require_PortalProps_native = __commonJS({
16534
16640
  }
16535
16641
  }
16536
16642
  return to;
16643
+ }, __toESM2 = function(mod, isNodeMode, target) {
16644
+ return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
16645
+ // If the importer is in node compatibility mode or this is not an ESM
16646
+ // file that has been converted to a CommonJS file using a Babel-
16647
+ // compatible transform (i.e. "__esModule" has not been set), then set
16648
+ // "default" to the CommonJS "module.exports" for node compatibility.
16649
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
16650
+ value: mod,
16651
+ enumerable: !0
16652
+ }) : target,
16653
+ mod
16654
+ );
16537
16655
  }, __toCommonJS2 = function(mod) {
16538
16656
  return __copyProps2(__defProp2({}, "__esModule", {
16539
16657
  value: !0
16540
16658
  }), mod);
16541
- }, PortalProps_exports = {};
16542
- module2.exports = __toCommonJS2(PortalProps_exports);
16659
+ }, FocusScope_native_exports = {};
16660
+ __export2(FocusScope_native_exports, {
16661
+ FocusScope: function() {
16662
+ return FocusScope;
16663
+ }
16664
+ });
16665
+ module2.exports = __toCommonJS2(FocusScope_native_exports);
16666
+ var import_react3 = __toESM2(require("react")), FocusScope = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
16667
+ return props.children;
16668
+ });
16543
16669
  }
16544
16670
  });
16545
16671
 
16546
- // ../portal/dist/cjs/index.native.js
16672
+ // ../focus-scope/dist/cjs/index.native.js
16547
16673
  var require_index_native31 = __commonJS({
16548
- "../portal/dist/cjs/index.native.js"(exports2, module2) {
16674
+ "../focus-scope/dist/cjs/index.native.js"(exports2, module2) {
16549
16675
  "use strict";
16550
16676
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
16551
16677
  var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
@@ -16578,9 +16704,7 @@ var require_index_native31 = __commonJS({
16578
16704
  }), mod);
16579
16705
  }, src_exports2 = {};
16580
16706
  module2.exports = __toCommonJS2(src_exports2);
16581
- __reExport2(src_exports2, require_Portal_native(), module2.exports);
16582
- __reExport2(src_exports2, require_PortalProps_native(), module2.exports);
16583
- __reExport2(src_exports2, require_GorhomPortal_native(), module2.exports);
16707
+ __reExport2(src_exports2, require_FocusScope_native(), module2.exports);
16584
16708
  }
16585
16709
  });
16586
16710
 
@@ -16780,7 +16904,7 @@ var require_SheetContext_native = __commonJS({
16780
16904
  }
16781
16905
  });
16782
16906
  module2.exports = __toCommonJS2(SheetContext_exports);
16783
- var import_create_context = require_index_native27(), import_constants4 = require_constants_native3(), [createSheetContext, createSheetScope2] = (0, import_create_context.createContextScope)(import_constants4.SHEET_NAME), [SheetProvider, useSheetContext] = createSheetContext(import_constants4.SHEET_NAME, {});
16907
+ var import_create_context = require_index_native28(), import_constants4 = require_constants_native3(), [createSheetContext, createSheetScope2] = (0, import_create_context.createContextScope)(import_constants4.SHEET_NAME), [SheetProvider, useSheetContext] = createSheetContext(import_constants4.SHEET_NAME, {});
16784
16908
  }
16785
16909
  });
16786
16910
 
@@ -17123,29 +17247,42 @@ var require_nativeSheet_native = __commonJS({
17123
17247
  function getNativeSheet(platform2) {
17124
17248
  return nativeSheets[platform2];
17125
17249
  }
17126
- function setupNativeSheet(platform2, Implementation) {
17250
+ function setupNativeSheet(platform2, RNIOSModal) {
17251
+ var { ModalSheetView, ModalSheetViewMainContent } = RNIOSModal;
17127
17252
  platform2 === "ios" && (nativeSheets[platform2] = function(props) {
17128
17253
  var state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0, import_react3.useRef)();
17129
- return (0, import_react3.useEffect)(function() {
17130
- var _ref_current;
17131
- (_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.setVisibility(open);
17254
+ (0, import_react3.useEffect)(function() {
17255
+ if (open) {
17256
+ var _ref_current;
17257
+ (_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.presentModal();
17258
+ } else {
17259
+ var _ref_current1;
17260
+ (_ref_current1 = ref.current) === null || _ref_current1 === void 0 || _ref_current1.dismissModal();
17261
+ }
17132
17262
  }, [
17133
17263
  open
17134
- ]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
17264
+ ]);
17265
+ function setOpenInternal(next) {
17266
+ var _props_onOpenChange;
17267
+ (_props_onOpenChange = props.onOpenChange) === null || _props_onOpenChange === void 0 || _props_onOpenChange.call(props, open), setOpen(next);
17268
+ }
17269
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
17135
17270
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_SheetContext.SheetProvider, {
17136
17271
  ...providerProps,
17137
17272
  onlyShowFrame: !0,
17138
17273
  children: [
17139
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Implementation, {
17274
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ModalSheetView, {
17140
17275
  ref,
17141
- onModalDismiss: function() {
17142
- return setOpen(!1);
17276
+ onModalDidDismiss: function() {
17277
+ return setOpenInternal(!1);
17143
17278
  },
17144
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native4.View, {
17145
- style: {
17146
- flex: 1
17147
- },
17148
- children: props.children
17279
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ModalSheetViewMainContent, {
17280
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native4.View, {
17281
+ style: {
17282
+ flex: 1
17283
+ },
17284
+ children: props.children
17285
+ })
17149
17286
  })
17150
17287
  }),
17151
17288
  /* for some reason select triggers wont show on native if this isn't inside the actual tree not inside implementation... */
@@ -17339,10 +17476,10 @@ var require_SheetImplementationCustom_native = __commonJS({
17339
17476
  }
17340
17477
  });
17341
17478
  module2.exports = __toCommonJS2(SheetImplementationCustom_exports);
17342
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native26(), import_animate_presence = require_index_native4(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_portal2 = require_index_native31(), import_react3 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_contexts = require_contexts_native(), import_helpers = require_helpers_native(), import_SheetContext = require_SheetContext_native(), import_useSheetOpenState = require_useSheetOpenState_native(), import_useSheetProviderProps = require_useSheetProviderProps_native(), hiddenSize = 10000.1, sheetHiddenStyleSheet = null, relativeDimensionTo = import_constants4.isWeb ? "window" : "screen", SheetImplementationCustom = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
17479
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_animate_presence = require_index_native4(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_portal2 = require_index_native26(), import_react3 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_contexts = require_contexts_native(), import_helpers = require_helpers_native(), import_SheetContext = require_SheetContext_native(), import_useSheetOpenState = require_useSheetOpenState_native(), import_useSheetProviderProps = require_useSheetProviderProps_native(), hiddenSize = 10000.1, sheetHiddenStyleSheet = null, relativeDimensionTo = import_constants4.isWeb ? "window" : "screen", SheetImplementationCustom = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
17343
17480
  var parentSheet = import_react3.default.useContext(import_contexts.ParentSheetContext), { animation, animationConfig: animationConfigProp, modal = !1, zIndex = parentSheet.zIndex + 1, moveOnKeyboardChange = !1, unmountChildrenWhenHidden = !1, portalProps, containerComponent: ContainerComponent = import_react3.default.Fragment } = props, state = (0, import_useSheetOpenState.useSheetOpenState)(props), [overlayComponent, setOverlayComponent] = import_react3.default.useState(null), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state, {
17344
17481
  onOverlayComponent: setOverlayComponent
17345
- }), { frameSize, setFrameSize, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps, { open, controller, isHidden } = state, sheetRef = import_react3.default.useRef(null), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef), animationConfig = function() {
17482
+ }), { frameSize, setFrameSize, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps, { open, controller, isHidden } = state, sheetRef = import_react3.default.useRef(null), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef, providerProps.contentRef), animationConfig = function() {
17346
17483
  var [animationProp, animationPropConfig] = animation ? Array.isArray(animation) ? animation : [
17347
17484
  animation
17348
17485
  ] : [];
@@ -17350,7 +17487,8 @@ var require_SheetImplementationCustom_native = __commonJS({
17350
17487
  ...(0, import_core12.getConfig)().animations.animations[animationProp],
17351
17488
  ...animationPropConfig
17352
17489
  } : null);
17353
- }(), [isShowingInnerSheet, setIsShowingInnerSheet] = import_react3.default.useState(!1), shouldHideParentSheet = !import_constants4.isWeb && modal && isShowingInnerSheet, parentSheetContext = import_react3.default.useContext(import_contexts.SheetInsideSheetContext), onInnerSheet = import_react3.default.useCallback(function(hasChild) {
17490
+ }(), [isShowingInnerSheet, setIsShowingInnerSheet] = import_react3.default.useState(!1), shouldHideParentSheet = !import_constants4.isWeb && modal && isShowingInnerSheet && // if not using weird portal limitation we dont need to hide parent sheet
17491
+ process.env.TAMAGUI_USE_NATIVE_PORTAL !== "false", sheetInsideSheet = import_react3.default.useContext(import_contexts.SheetInsideSheetContext), onInnerSheet = import_react3.default.useCallback(function(hasChild) {
17354
17492
  setIsShowingInnerSheet(hasChild);
17355
17493
  }, []), positions = import_react3.default.useMemo(function() {
17356
17494
  return snapPoints.map(function(point) {
@@ -17363,11 +17501,11 @@ var require_SheetImplementationCustom_native = __commonJS({
17363
17501
  snapPointsMode
17364
17502
  ]), { animationDriver } = (0, import_core12.useConfiguration)(), { useAnimatedNumber, useAnimatedNumberStyle, useAnimatedNumberReaction } = animationDriver, _animationDriver_View, AnimatedView = (_animationDriver_View = animationDriver.View) !== null && _animationDriver_View !== void 0 ? _animationDriver_View : import_core12.Stack;
17365
17503
  (0, import_constants4.useIsomorphicLayoutEffect)(function() {
17366
- if (parentSheetContext && open) return parentSheetContext(!0), function() {
17367
- parentSheetContext(!1);
17504
+ if (sheetInsideSheet && open) return sheetInsideSheet(!0), function() {
17505
+ sheetInsideSheet(!1);
17368
17506
  };
17369
17507
  }, [
17370
- parentSheetContext,
17508
+ sheetInsideSheet,
17371
17509
  open
17372
17510
  ]);
17373
17511
  var nextParentContext = import_react3.default.useMemo(function() {
@@ -17536,7 +17674,7 @@ var require_SheetImplementationCustom_native = __commonJS({
17536
17674
  }, [
17537
17675
  open
17538
17676
  ]);
17539
- var forcedContentHeight = hasFit ? void 0 : snapPointsMode === "percent" ? `${maxSnapPoint}${import_constants4.isWeb ? "dvh" : "%"}` : maxSnapPoint, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_contexts.ParentSheetContext.Provider, {
17677
+ var forcedContentHeight = hasFit ? void 0 : snapPointsMode === "percent" ? `${maxSnapPoint}${import_constants4.isWeb ? "dvh" : "%"}` : maxSnapPoint, id = (0, import_react3.useId)(), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_contexts.ParentSheetContext.Provider, {
17540
17678
  value: nextParentContext,
17541
17679
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_SheetContext.SheetProvider, {
17542
17680
  ...providerProps,
@@ -17576,30 +17714,30 @@ var require_SheetImplementationCustom_native = __commonJS({
17576
17714
  width: "100%",
17577
17715
  height: forcedContentHeight,
17578
17716
  minHeight: forcedContentHeight,
17579
- opacity,
17717
+ opacity: shouldHideParentSheet ? 0 : opacity,
17580
17718
  ...(shouldHideParentSheet || !open) && {
17581
17719
  pointerEvents: "none"
17582
17720
  }
17583
17721
  },
17584
17722
  animatedStyle
17585
17723
  ],
17586
- children: props.children
17724
+ children: (
17725
+ /* <AdaptProvider>{props.children}</AdaptProvider> */
17726
+ props.children
17727
+ )
17587
17728
  })
17588
17729
  ]
17589
17730
  })
17590
- }), adaptContext = import_react3.default.useContext(import_adapt.AdaptParentContext), shouldMountChildren = !!(opacity || !unmountChildrenWhenHidden);
17731
+ }), shouldMountChildren = unmountChildrenWhenHidden ? !opacity : !0;
17591
17732
  if (modal) {
17592
17733
  var modalContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
17593
- zIndex,
17734
+ stackZIndex: zIndex,
17594
17735
  ...portalProps,
17595
17736
  children: shouldMountChildren && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ContainerComponent, {
17596
17737
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
17597
17738
  forceClassName: !0,
17598
17739
  name: themeName,
17599
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParentContext.Provider, {
17600
- value: adaptContext,
17601
- children: contents
17602
- })
17740
+ children: contents
17603
17741
  })
17604
17742
  })
17605
17743
  });
@@ -17812,6 +17950,8 @@ var require_SheetScrollView_native = __commonJS({
17812
17950
  ref: (0, import_compose_refs.composeRefs)(scrollRef, ref),
17813
17951
  flex: 1,
17814
17952
  scrollEventThrottle: 8,
17953
+ onResponderRelease: release,
17954
+ className: "_ovs-contain",
17815
17955
  // scrollEnabled={scrollEnabled}
17816
17956
  onScroll: function(e) {
17817
17957
  var { y } = e.nativeEvent.contentOffset;
@@ -17859,14 +17999,8 @@ var require_SheetScrollView_native = __commonJS({
17859
17999
  // state.current.dys = state.current.dys.slice(-10)
17860
18000
  // }
17861
18001
  // }}
17862
- onResponderRelease: release,
17863
- className: "_ovs-contain",
17864
18002
  ...props,
17865
- children: import_react3.default.useMemo(function() {
17866
- return children;
17867
- }, [
17868
- children
17869
- ])
18003
+ children
17870
18004
  });
17871
18005
  });
17872
18006
  }
@@ -18530,9 +18664,6 @@ var require_Dialog_native = __commonJS({
18530
18664
  DialogPortalFrame: function() {
18531
18665
  return DialogPortalFrame;
18532
18666
  },
18533
- DialogSheetContents: function() {
18534
- return DialogSheetContents;
18535
- },
18536
18667
  DialogTitle: function() {
18537
18668
  return DialogTitle;
18538
18669
  },
@@ -18547,7 +18678,7 @@ var require_Dialog_native = __commonJS({
18547
18678
  }
18548
18679
  });
18549
18680
  module2.exports = __toCommonJS2(Dialog_exports);
18550
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native26(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native28(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_create_context = require_index_native27(), import_dismissable = require_index_native29(), import_focus_scope = require_index_native30(), import_helpers = require_index_native7(), import_portal2 = require_index_native31(), import_remove_scroll = require_index_native32(), import_sheet = require_index_native34(), import_stacks3 = require_index_native21(), import_text2 = require_index_native23(), import_use_controllable_state = require_index_native10(), 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, {
18681
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native27(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native29(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_dismissable = require_index_native30(), import_focus_scope = require_index_native31(), import_helpers = require_index_native7(), import_portal2 = require_index_native26(), import_remove_scroll = require_index_native32(), import_sheet = require_index_native34(), import_stacks3 = require_index_native21(), import_text2 = require_index_native23(), import_use_controllable_state = require_index_native10(), 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, {
18551
18682
  name: TRIGGER_NAME
18552
18683
  }), DialogTrigger = DialogTriggerFrame.styleable(function(props, forwardedRef) {
18553
18684
  var { __scopeDialog, ...triggerProps } = props, isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext), context = useDialogContext(TRIGGER_NAME, __scopeDialog), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
@@ -18586,33 +18717,23 @@ var require_Dialog_native = __commonJS({
18586
18717
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
18587
18718
  }
18588
18719
  }), DialogPortalItem = function(props) {
18589
- var themeName = (0, import_core12.useThemeName)(), context = useDialogContext(PORTAL_NAME, props.__scopeDialog);
18590
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
18591
- hostName: props.hostName,
18592
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItemContent, {
18593
- ...props,
18594
- themeName,
18595
- context
18596
- })
18597
- });
18598
- };
18599
- function DialogPortalItemContent(props) {
18600
- var { __scopeDialog, children, context, themeName, space, spaceDirection, separator } = props, childrenSpaced = children;
18720
+ var { __scopeDialog, children, space, spaceDirection, separator } = props, themeName = (0, import_core12.useThemeName)(), context = useDialogContext(PORTAL_NAME, props.__scopeDialog), childrenSpaced = children;
18601
18721
  return (space || separator) && (childrenSpaced = (0, import_core12.spacedChildren)({
18602
18722
  children,
18603
18723
  separator,
18604
18724
  space,
18605
18725
  direction: spaceDirection
18606
- })), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
18607
- scope: __scopeDialog,
18608
- ...context,
18609
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
18610
- name: themeName,
18611
- children: childrenSpaced
18726
+ })), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
18727
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
18728
+ scope: __scopeDialog,
18729
+ ...context,
18730
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
18731
+ name: themeName,
18732
+ children: childrenSpaced
18733
+ })
18612
18734
  })
18613
18735
  });
18614
- }
18615
- var DialogPortal = function(props) {
18736
+ }, DialogPortal = function(props) {
18616
18737
  var { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React4.useState(!isShowing);
18617
18738
  isShowing && isFullyHidden && setIsFullyHidden(!1);
18618
18739
  var handleExitComplete = React4.useCallback(function() {
@@ -18620,8 +18741,8 @@ var require_Dialog_native = __commonJS({
18620
18741
  }, []), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
18621
18742
  onExitComplete: handleExitComplete,
18622
18743
  children: isShowing ? children : null
18623
- }), isSheet = useShowDialogSheet(context);
18624
- if (isSheet) return children;
18744
+ }), isAdapted = (0, import_adapt.useAdaptIsActive)();
18745
+ if (isAdapted) return children;
18625
18746
  if (context.modal) {
18626
18747
  if (isFullyHidden) return null;
18627
18748
  var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalProvider2, {
@@ -18642,10 +18763,7 @@ var require_Dialog_native = __commonJS({
18642
18763
  })
18643
18764
  });
18644
18765
  }
18645
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
18646
- __scopeDialog,
18647
- children: framedContents
18648
- });
18766
+ return framedContents;
18649
18767
  }
18650
18768
  return contents;
18651
18769
  }, PassthroughTheme = function(param) {
@@ -18658,8 +18776,8 @@ var require_Dialog_native = __commonJS({
18658
18776
  }, OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
18659
18777
  name: OVERLAY_NAME
18660
18778
  }), DialogOverlay = DialogOverlayFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
18661
- var { __scopeDialog, ...props } = param, portalContext = usePortalContext(OVERLAY_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...overlayProps } = props, context = useDialogContext(OVERLAY_NAME, __scopeDialog), showSheet = useShowDialogSheet(context);
18662
- return !forceMount && (!context.modal || showSheet) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayFrame, {
18779
+ var { __scopeDialog, ...props } = param, portalContext = usePortalContext(OVERLAY_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...overlayProps } = props, context = useDialogContext(OVERLAY_NAME, __scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
18780
+ return !forceMount && (!context.modal || isAdapted) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayFrame, {
18663
18781
  "data-state": getState(context.open),
18664
18782
  // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
18665
18783
  pointerEvents: context.open ? "auto" : "none",
@@ -18779,17 +18897,18 @@ var require_Dialog_native = __commonJS({
18779
18897
  }
18780
18898
  });
18781
18899
  }), DialogContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
18782
- var { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), showSheet = useShowDialogSheet(context), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentFrame, {
18900
+ var { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)();
18901
+ if (isAdapted) return !import_constants4.isWeb && !context.open ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
18902
+ children: contentProps.children
18903
+ });
18904
+ var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentFrame, {
18783
18905
  id: context.contentId,
18784
18906
  "aria-describedby": context.descriptionId,
18785
18907
  "aria-labelledby": context.titleId,
18786
18908
  "data-state": getState(context.open),
18787
18909
  ...contentProps
18788
18910
  });
18789
- return showSheet ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
18790
- hostName: getSheetContentsName(context),
18791
- children: contentProps.children
18792
- }) : import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, {
18911
+ return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, {
18793
18912
  children: [
18794
18913
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dismissable.Dismissable, {
18795
18914
  disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,
@@ -18851,8 +18970,8 @@ var require_Dialog_native = __commonJS({
18851
18970
  var { __scopeDialog, displayWhenAdapted, ...closeProps } = props, context = useDialogContext(CLOSE_NAME, __scopeDialog, {
18852
18971
  warn: !1,
18853
18972
  fallback: {}
18854
- }), isSheet = useShowDialogSheet(context), isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext);
18855
- return isSheet && !displayWhenAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogCloseFrame, {
18973
+ }), isAdapted = (0, import_adapt.useAdaptIsActive)(), isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext);
18974
+ return isAdapted && !displayWhenAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogCloseFrame, {
18856
18975
  accessibilityLabel: "Dialog Close",
18857
18976
  tag: isInsideButton ? "span" : "button",
18858
18977
  ...closeProps,
@@ -18909,7 +19028,7 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
18909
19028
  }
18910
19029
  return null;
18911
19030
  }, Dialog = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
18912
- var { __scopeDialog, children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0, allowPinchZoom = !1, disableRemoveScroll = !1 } = props, baseId = React4.useId(), scopeId = `scope-${baseId}`, contentId = `content-${baseId}`, titleId = `title-${baseId}`, descriptionId = `description-${baseId}`, scopeKey = __scopeDialog ? Object.keys(__scopeDialog)[0] : scopeId, sheetContentsName = getSheetContentsName({
19031
+ var { __scopeDialog, children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0, allowPinchZoom = !1, disableRemoveScroll = !1 } = props, baseId = React4.useId(), scopeId = `scope-${baseId}`, contentId = `content-${baseId}`, titleId = `title-${baseId}`, descriptionId = `description-${baseId}`, scopeKey = __scopeDialog ? Object.keys(__scopeDialog)[0] : scopeId, adaptName = getAdaptName({
18913
19032
  scopeKey,
18914
19033
  contentId
18915
19034
  }), triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
@@ -18934,28 +19053,22 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
18934
19053
  onOpenChange: setOpen,
18935
19054
  onOpenToggle,
18936
19055
  modal,
18937
- allowPinchZoom
18938
- }, { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
18939
- Contents: React4.useCallback(function(props2) {
18940
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
18941
- forwardProps: props2,
18942
- name: sheetContentsName
18943
- });
18944
- }, [
18945
- sheetContentsName
18946
- ])
18947
- });
19056
+ allowPinchZoom,
19057
+ disableRemoveScroll
19058
+ };
18948
19059
  return React4.useImperativeHandle(ref, function() {
18949
19060
  return {
18950
19061
  open: setOpen
18951
19062
  };
18952
19063
  }, [
18953
19064
  setOpen
18954
- ]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptProvider, {
19065
+ ]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
19066
+ scope: adaptName,
19067
+ portal: {
19068
+ forwardProps: props
19069
+ },
18955
19070
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
18956
19071
  ...context,
18957
- sheetBreakpoint: when,
18958
- disableRemoveScroll,
18959
19072
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogSheetController, {
18960
19073
  onOpenChange: setOpen,
18961
19074
  __scopeDialog,
@@ -18973,34 +19086,22 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
18973
19086
  Close: DialogClose,
18974
19087
  Sheet: import_sheet.Sheet.Controlled,
18975
19088
  Adapt: import_adapt.Adapt
18976
- }), DialogSheetContents = function(param) {
18977
- var { name, ...props } = param;
18978
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
18979
- forwardProps: props,
18980
- name
18981
- });
18982
- }, getSheetContentsName = function(param) {
19089
+ }), getAdaptName = function(param) {
18983
19090
  var { scopeKey, contentId } = param;
18984
- return `${scopeKey || contentId}SheetContents`;
19091
+ return `${scopeKey || contentId}DialogAdapt`;
18985
19092
  }, DialogSheetController = function(props) {
18986
- var context = useDialogContext("DialogSheetController", props.__scopeDialog), showSheet = useShowDialogSheet(context), breakpointActive = useSheetBreakpointActive(context), getShowSheet = (0, import_core12.useGet)(showSheet);
19093
+ var context = useDialogContext("DialogSheetController", props.__scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
18987
19094
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
18988
19095
  onOpenChange: function(val) {
18989
- if (getShowSheet()) {
19096
+ if (isAdapted) {
18990
19097
  var _props_onOpenChange;
18991
19098
  (_props_onOpenChange = props.onOpenChange) === null || _props_onOpenChange === void 0 || _props_onOpenChange.call(props, val);
18992
19099
  }
18993
19100
  },
18994
19101
  open: context.open,
18995
- hidden: breakpointActive === !1,
19102
+ hidden: !isAdapted,
18996
19103
  children: props.children
18997
19104
  });
18998
- }, useSheetBreakpointActive = function(context) {
18999
- var media = (0, import_core12.useMedia)();
19000
- return context.sheetBreakpoint ? context.sheetBreakpoint === !0 ? !0 : media[context.sheetBreakpoint] : !1;
19001
- }, useShowDialogSheet = function(context) {
19002
- var breakpointActive = useSheetBreakpointActive(context);
19003
- return context.open === !1 ? !1 : breakpointActive;
19004
19105
  };
19005
19106
  }
19006
19107
  });
@@ -19126,7 +19227,7 @@ var require_AlertDialog_native = __commonJS({
19126
19227
  }
19127
19228
  });
19128
19229
  module2.exports = __toCommonJS2(AlertDialog_exports);
19129
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_create_context = require_index_native27(), import_dialog = require_index_native35(), import_helpers = require_index_native7(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = (0, import_create_context.createContextScope)(ROOT_NAME, [
19230
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_dialog = require_index_native35(), import_helpers = require_index_native7(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = (0, import_create_context.createContextScope)(ROOT_NAME, [
19130
19231
  import_dialog.createDialogScope
19131
19232
  ]), useDialogScope = (0, import_dialog.createDialogScope)(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
19132
19233
  name: TRIGGER_NAME
@@ -19816,7 +19917,7 @@ var require_Avatar_native = __commonJS({
19816
19917
  }
19817
19918
  });
19818
19919
  module2.exports = __toCommonJS2(Avatar_exports);
19819
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native27(), import_helpers = require_index_native7(), import_image = require_index_native37(), import_shapes = require_index_native38(), import_stacks3 = require_index_native21(), 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) {
19920
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_helpers = require_index_native7(), import_image = require_index_native37(), import_shapes = require_index_native38(), import_stacks3 = require_index_native21(), 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) {
19820
19921
  var _getShapeSize, { __scopeAvatar, src, onLoadingStatusChange = function() {
19821
19922
  }, ...imageProps } = props, context = useAvatarContext(IMAGE_NAME, __scopeAvatar), [status, setStatus] = React4.useState("idle"), shapeSize = (0, import_core12.getVariableValue)((_getShapeSize = (0, import_shapes.getShapeSize)(
19822
19923
  context.size,
@@ -21209,7 +21310,7 @@ var require_Label_native = __commonJS({
21209
21310
  }
21210
21311
  });
21211
21312
  module2.exports = __toCommonJS2(Label_exports);
21212
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_create_context = require_index_native27(), import_focusable2 = require_index_native44(), import_get_button_sized2 = require_index_native20(), import_get_font_sized2 = require_index_native22(), import_text2 = require_index_native23(), import_web = require_index_native14(), React4 = __toESM2(require("react")), NAME = "Label", [LabelProvider, useLabelContextImpl] = (0, import_create_context.createContext)(NAME, {
21313
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_create_context = require_index_native28(), import_focusable2 = require_index_native44(), import_get_button_sized2 = require_index_native20(), import_get_font_sized2 = require_index_native22(), import_text2 = require_index_native23(), import_web = require_index_native14(), React4 = __toESM2(require("react")), NAME = "Label", [LabelProvider, useLabelContextImpl] = (0, import_create_context.createContext)(NAME, {
21213
21314
  id: void 0,
21214
21315
  controlRef: {
21215
21316
  current: null
@@ -21995,7 +22096,7 @@ var require_Form_native = __commonJS({
21995
22096
  }
21996
22097
  });
21997
22098
  module2.exports = __toCommonJS2(Form_exports);
21998
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native27(), import_helpers = require_index_native7(), FORM_NAME = "Form", FormFrame = (0, import_core12.styled)(import_core12.Stack, {
22099
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_helpers = require_index_native7(), FORM_NAME = "Form", FormFrame = (0, import_core12.styled)(import_core12.Stack, {
21999
22100
  name: FORM_NAME,
22000
22101
  tag: "form"
22001
22102
  }), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.View, {
@@ -22237,7 +22338,7 @@ var require_Group_native = __commonJS({
22237
22338
  }
22238
22339
  });
22239
22340
  module2.exports = __toCommonJS2(Group_exports);
22240
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native27(), import_helpers = require_index_native7(), import_stacks3 = require_index_native21(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_react_native4 = require("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, {
22341
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_helpers = require_index_native7(), import_stacks3 = require_index_native21(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_react_native4 = require("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, {
22241
22342
  name: "GroupFrame",
22242
22343
  variants: {
22243
22344
  unstyled: {
@@ -25185,7 +25286,7 @@ var require_Popover_native = __commonJS({
25185
25286
  }
25186
25287
  });
25187
25288
  module2.exports = __toCommonJS2(Popover_exports);
25188
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native26(), import_animate = require_index_native54(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native28(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_floating = require_index_native55(), import_focus_scope = require_index_native30(), import_helpers = require_index_native7(), import_popper = require_index_native56(), import_portal2 = require_index_native31(), import_remove_scroll = require_index_native32(), import_sheet = require_index_native34(), import_stacks3 = require_index_native21(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_useFloatingContext = require_useFloatingContext_native(), POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
25289
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native27(), import_animate = require_index_native54(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native29(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_floating = require_index_native55(), import_focus_scope = require_index_native31(), import_helpers = require_index_native7(), import_popper = require_index_native56(), import_portal2 = require_index_native26(), import_remove_scroll = require_index_native32(), import_sheet = require_index_native34(), import_stacks3 = require_index_native21(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_useFloatingContext = require_useFloatingContext_native(), POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
25189
25290
  var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
25190
25291
  return React4.useEffect(function() {
25191
25292
  return onCustomAnchorAdd(), function() {
@@ -25336,8 +25437,7 @@ var require_Popover_native = __commonJS({
25336
25437
  scope: __scopePopover || POPOVER_SCOPE,
25337
25438
  ...popperContext,
25338
25439
  children: childrenWithoutScrollView
25339
- })), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
25340
- hostName: `${context.id}PopoverContents`,
25440
+ })), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
25341
25441
  children: content
25342
25442
  });
25343
25443
  }
@@ -25387,21 +25487,35 @@ var require_Popover_native = __commonJS({
25387
25487
  })
25388
25488
  });
25389
25489
  }), PopoverArrow = import_popper.PopperArrow.styleable(function(props, forwardedRef) {
25390
- var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), sheetActive = useSheetBreakpointActive(context.sheetBreakpoint);
25391
- return sheetActive ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperArrow, {
25490
+ var { __scopePopover, ...rest } = props, isAdapted = (0, import_adapt.useAdaptIsActive)();
25491
+ return isAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperArrow, {
25392
25492
  __scopePopper: __scopePopover || POPOVER_SCOPE,
25393
25493
  componentName: "PopoverArrow",
25394
25494
  ...rest,
25395
25495
  ref: forwardedRef
25396
25496
  });
25397
- }), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
25398
- var { children, open: openProp, defaultOpen, onOpenChange, __scopePopover, keepChildrenMounted, hoverable, disableFocus, ...restProps } = props, id = React4.useId(), { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
25399
- Contents: React4.useCallback(function() {
25400
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
25401
- name: `${id}PopoverContents`
25402
- });
25403
- }, [])
25404
- }), sheetBreakpoint = when, triggerRef = React4.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React4.useState(!1), viaRef = React4.useRef(), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
25497
+ }), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
25498
+ var id = React4.useId();
25499
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
25500
+ scope: `${id}PopoverContents`,
25501
+ portal: !0,
25502
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverInner, {
25503
+ ref,
25504
+ id,
25505
+ ...props
25506
+ })
25507
+ });
25508
+ }), {
25509
+ Anchor: PopoverAnchor,
25510
+ Arrow: PopoverArrow,
25511
+ Trigger: PopoverTrigger,
25512
+ Content: PopoverContent,
25513
+ Close: PopoverClose,
25514
+ Adapt: import_adapt.Adapt,
25515
+ ScrollView: import_react_native4.ScrollView,
25516
+ Sheet: import_sheet.Sheet.Controlled
25517
+ }), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
25518
+ var { children, open: openProp, defaultOpen, onOpenChange, __scopePopover, keepChildrenMounted, hoverable, disableFocus, id, ...restProps } = props, triggerRef = React4.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React4.useState(!1), viaRef = React4.useRef(), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
25405
25519
  prop: openProp,
25406
25520
  defaultProp: defaultOpen || !1,
25407
25521
  onChange: function(val) {
@@ -25409,10 +25523,10 @@ var require_Popover_native = __commonJS({
25409
25523
  }
25410
25524
  }), handleOpenChange = (0, import_core12.useEvent)(function(val, via) {
25411
25525
  viaRef.current = via, setOpen(val);
25412
- }), sheetActive = useSheetBreakpointActive(sheetBreakpoint), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
25526
+ }), isAdapted = (0, import_adapt.useAdaptIsActive)(), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
25413
25527
  open,
25414
25528
  setOpen: handleOpenChange,
25415
- disable: sheetActive,
25529
+ disable: isAdapted,
25416
25530
  hoverable,
25417
25531
  disableFocus
25418
25532
  }), [anchorTo, setAnchorToRaw] = React4.useState(), setAnchorTo = (0, import_core12.createShallowSetState)(setAnchorToRaw);
@@ -25435,14 +25549,13 @@ var require_Popover_native = __commonJS({
25435
25549
  });
25436
25550
  var popoverContext = {
25437
25551
  id,
25438
- sheetBreakpoint,
25439
25552
  contentId: React4.useId(),
25440
25553
  triggerRef,
25441
25554
  open,
25442
- breakpointActive: sheetActive,
25555
+ breakpointActive: isAdapted,
25443
25556
  onOpenChange: handleOpenChange,
25444
25557
  onOpenToggle: (0, import_core12.useEvent)(function() {
25445
- open && sheetActive || setOpen(!open);
25558
+ open && isAdapted || setOpen(!open);
25446
25559
  }),
25447
25560
  hasCustomAnchor,
25448
25561
  anchorTo,
@@ -25466,21 +25579,12 @@ var require_Popover_native = __commonJS({
25466
25579
  })
25467
25580
  })
25468
25581
  });
25469
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptProvider, {
25582
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
25470
25583
  children: import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_floating.FloatingOverrideContext.Provider, {
25471
25584
  value: floatingContext,
25472
25585
  children: contents
25473
25586
  }) : contents
25474
25587
  });
25475
- }), {
25476
- Anchor: PopoverAnchor,
25477
- Arrow: PopoverArrow,
25478
- Trigger: PopoverTrigger,
25479
- Content: PopoverContent,
25480
- Close: PopoverClose,
25481
- Adapt: import_adapt.Adapt,
25482
- ScrollView: import_react_native4.ScrollView,
25483
- Sheet: import_sheet.Sheet.Controlled
25484
25588
  });
25485
25589
  function getState(open) {
25486
25590
  return open ? "open" : "closed";
@@ -25498,12 +25602,9 @@ var require_Popover_native = __commonJS({
25498
25602
  hidden: breakpointActive === !1,
25499
25603
  children: props.children
25500
25604
  });
25501
- }, useSheetBreakpointActive = function(breakpoint) {
25502
- var media = (0, import_core12.useMedia)();
25503
- return typeof breakpoint == "boolean" || !breakpoint ? !!breakpoint : media[breakpoint];
25504
25605
  }, useShowPopoverSheet = function(context) {
25505
- var breakpointActive = useSheetBreakpointActive(context.sheetBreakpoint);
25506
- return context.open === !1 ? !1 : breakpointActive;
25606
+ var isAdapted = (0, import_adapt.useAdaptIsActive)();
25607
+ return context.open === !1 ? !1 : isAdapted;
25507
25608
  };
25508
25609
  }
25509
25610
  });
@@ -25615,7 +25716,7 @@ var require_Progress_native = __commonJS({
25615
25716
  }
25616
25717
  });
25617
25718
  module2.exports = __toCommonJS2(Progress_exports);
25618
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native27(), import_get_token2 = require_index_native19(), import_helpers = require_index_native7(), import_stacks3 = require_index_native21(), 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, {
25719
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_get_token2 = require_index_native19(), import_helpers = require_index_native7(), import_stacks3 = require_index_native21(), 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, {
25619
25720
  name: INDICATOR_NAME,
25620
25721
  variants: {
25621
25722
  unstyled: {
@@ -27012,7 +27113,7 @@ var require_context_native = __commonJS({
27012
27113
  }
27013
27114
  });
27014
27115
  module2.exports = __toCommonJS2(context_exports);
27015
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context = require_index_native27(), import_constants4 = require_constants_native4(), [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) {
27116
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context = require_index_native28(), import_constants4 = require_constants_native4(), [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) {
27016
27117
  var { __scopeSelect, context, itemContext, children } = param;
27017
27118
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectProvider, {
27018
27119
  isInSheet: !0,
@@ -27545,7 +27646,7 @@ var require_SelectTrigger_native = __commonJS({
27545
27646
  var require_SelectViewport_native = __commonJS({
27546
27647
  "../select/dist/cjs/SelectViewport.native.js"(exports2, module2) {
27547
27648
  "use strict";
27548
- var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
27649
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
27549
27650
  for (var name in all) __defProp2(target, name, {
27550
27651
  get: all[name],
27551
27652
  enumerable: !0
@@ -27573,18 +27674,6 @@ var require_SelectViewport_native = __commonJS({
27573
27674
  }
27574
27675
  }
27575
27676
  return to;
27576
- }, __toESM2 = function(mod, isNodeMode, target) {
27577
- return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
27578
- // If the importer is in node compatibility mode or this is not an ESM
27579
- // file that has been converted to a CommonJS file using a Babel-
27580
- // compatible transform (i.e. "__esModule" has not been set), then set
27581
- // "default" to the CommonJS "module.exports" for node compatibility.
27582
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
27583
- value: mod,
27584
- enumerable: !0
27585
- }) : target,
27586
- mod
27587
- );
27588
27677
  }, __toCommonJS2 = function(mod) {
27589
27678
  return __copyProps2(__defProp2({}, "__esModule", {
27590
27679
  value: !0
@@ -27596,18 +27685,17 @@ var require_SelectViewport_native = __commonJS({
27596
27685
  }
27597
27686
  });
27598
27687
  module2.exports = __toCommonJS2(SelectViewport_native_exports);
27599
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native26(), import_core12 = require_index_native17(), import_portal2 = require_index_native31(), React4 = __toESM2(require("react")), import_constants4 = require_constants_native4(), import_context = require_context_native(), SelectViewport = function(props) {
27600
- 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 = React4.useContext(import_adapt.AdaptParentContext);
27601
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
27602
- hostName: `${context.scopeKey}SheetContents`,
27688
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native27(), import_core12 = require_index_native17(), import_constants4 = require_constants_native4(), import_context = require_context_native(), SelectViewport = function(props) {
27689
+ 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)();
27690
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
27603
27691
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
27604
27692
  name: themeName,
27605
27693
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.ForwardSelectContext, {
27606
27694
  __scopeSelect,
27607
27695
  itemContext: itemParentContext,
27608
27696
  context,
27609
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParentContext.Provider, {
27610
- value: adaptContext,
27697
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptContext.Provider, {
27698
+ ...adaptContext,
27611
27699
  children
27612
27700
  })
27613
27701
  })
@@ -27656,19 +27744,13 @@ var require_useSelectBreakpointActive_native = __commonJS({
27656
27744
  }), mod);
27657
27745
  }, useSelectBreakpointActive_exports = {};
27658
27746
  __export2(useSelectBreakpointActive_exports, {
27659
- useSelectBreakpointActive: function() {
27660
- return useSelectBreakpointActive;
27661
- },
27662
27747
  useShowSelectSheet: function() {
27663
27748
  return useShowSelectSheet;
27664
27749
  }
27665
27750
  });
27666
27751
  module2.exports = __toCommonJS2(useSelectBreakpointActive_exports);
27667
- var import_core12 = require_index_native17(), useSelectBreakpointActive = function(sheetBreakpoint) {
27668
- var media = (0, import_core12.useMedia)();
27669
- return sheetBreakpoint ? sheetBreakpoint === !0 ? !0 : sheetBreakpoint ? media[sheetBreakpoint] : !1 : !1;
27670
- }, useShowSelectSheet = function(context) {
27671
- var breakpointActive = useSelectBreakpointActive(context.sheetBreakpoint);
27752
+ var import_adapt = require_index_native27(), useShowSelectSheet = function(context) {
27753
+ var breakpointActive = (0, import_adapt.useAdaptIsActive)();
27672
27754
  return context.open === !1 ? !1 : breakpointActive;
27673
27755
  };
27674
27756
  }
@@ -27738,7 +27820,7 @@ var require_Select_native = __commonJS({
27738
27820
  }
27739
27821
  });
27740
27822
  module2.exports = __toCommonJS2(Select_exports);
27741
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native26(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_get_token2 = require_index_native19(), import_helpers = require_index_native7(), import_list_item = require_index_native53(), import_portal2 = require_index_native31(), import_separator = require_index_native62(), import_focusable2 = require_index_native44(), import_sheet = require_index_native34(), import_stacks3 = require_index_native21(), import_text2 = require_index_native23(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_use_debounce = require_index_native63(), import_constants22 = require_constants_native4(), import_context = require_context_native(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectItemText = require_SelectItemText_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native(), VALUE_NAME = "SelectValue", SelectValueFrame = (0, import_core12.styled)(import_text2.SizableText, {
27823
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native27(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_focusable2 = require_index_native44(), import_get_token2 = require_index_native19(), import_helpers = require_index_native7(), import_list_item = require_index_native53(), import_separator = require_index_native62(), import_sheet = require_index_native34(), import_stacks3 = require_index_native21(), import_text2 = require_index_native23(), import_use_controllable_state = require_index_native10(), import_use_debounce = require_index_native63(), React4 = __toESM2(require("react")), import_context = require_context_native(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectItemText = require_SelectItemText_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native(), VALUE_NAME = "SelectValue", SelectValueFrame = (0, import_core12.styled)(import_text2.SizableText, {
27742
27824
  name: VALUE_NAME,
27743
27825
  userSelect: "none"
27744
27826
  }), SelectValue = SelectValueFrame.styleable(function(param, forwardedRef) {
@@ -27872,13 +27954,13 @@ var require_Select_native = __commonJS({
27872
27954
  var SelectSeparator = (0, import_core12.styled)(import_separator.Separator, {
27873
27955
  name: "SelectSeparator"
27874
27956
  }), SelectSheetController = function(props) {
27875
- var context = (0, import_context.useSelectContext)("SelectSheetController", props.__scopeSelect), showSheet = (0, import_useSelectBreakpointActive.useShowSelectSheet)(context), breakpointActive = (0, import_useSelectBreakpointActive.useSelectBreakpointActive)(context.sheetBreakpoint), getShowSheet = (0, import_core12.useGet)(showSheet);
27957
+ 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);
27876
27958
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
27877
27959
  onOpenChange: function(val) {
27878
27960
  getShowSheet() && props.onOpenChange(val);
27879
27961
  },
27880
27962
  open: context.open,
27881
- hidden: breakpointActive === !1,
27963
+ hidden: isAdapted === !1,
27882
27964
  children: props.children
27883
27965
  });
27884
27966
  }, SelectSheetImpl = function(props) {
@@ -27886,15 +27968,50 @@ var require_Select_native = __commonJS({
27886
27968
  children: props.children
27887
27969
  });
27888
27970
  }, Select = (0, import_helpers.withStaticProperties)(function(props) {
27889
- var { __scopeSelect, native, children, open: openProp, defaultOpen, onOpenChange, value: valueProp, defaultValue, onValueChange, disablePreventBodyScroll, size: sizeProp = "$true", onActiveChange, dir, id } = props, internalId = React4.useId(), _Object_keys_, scopeKey = __scopeSelect && (_Object_keys_ = Object.keys(__scopeSelect)[0]) !== null && _Object_keys_ !== void 0 ? _Object_keys_ : internalId, { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
27890
- Contents: React4.useCallback(function() {
27891
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
27892
- name: `${scopeKey}SheetContents`
27893
- });
27894
- }, [
27895
- scopeKey
27896
- ])
27897
- }), sheetBreakpoint = when, isSheet = (0, import_useSelectBreakpointActive.useSelectBreakpointActive)(sheetBreakpoint), SelectImpl = isSheet || !import_constants4.isWeb ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl, forceUpdate = React4.useReducer(function() {
27971
+ var internalId = React4.useId(), _Object_keys_, scopeKey = props.__scopeSelect && (_Object_keys_ = Object.keys(props.__scopeSelect)[0]) !== null && _Object_keys_ !== void 0 ? _Object_keys_ : internalId;
27972
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
27973
+ scope: `${scopeKey}SheetContents`,
27974
+ portal: !0,
27975
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectInner, {
27976
+ scopeKey,
27977
+ ...props
27978
+ })
27979
+ });
27980
+ }, {
27981
+ Adapt: import_adapt.Adapt,
27982
+ Content: import_SelectContent.SelectContent,
27983
+ Group: SelectGroup,
27984
+ Icon: SelectIcon,
27985
+ Item: import_SelectItem.SelectItem,
27986
+ ItemIndicator: SelectItemIndicator,
27987
+ ItemText: import_SelectItemText.SelectItemText,
27988
+ Label: SelectLabel,
27989
+ ScrollDownButton: import_SelectScrollButton.SelectScrollDownButton,
27990
+ ScrollUpButton: import_SelectScrollButton.SelectScrollUpButton,
27991
+ Trigger: import_SelectTrigger.SelectTrigger,
27992
+ Value: SelectValue,
27993
+ Viewport: import_SelectViewport.SelectViewport,
27994
+ Sheet: import_sheet.Sheet.Controlled
27995
+ });
27996
+ function useEmitter() {
27997
+ var listeners = React4.useRef();
27998
+ listeners.current || (listeners.current = /* @__PURE__ */ new Set());
27999
+ var emit = function(value) {
28000
+ listeners.current.forEach(function(l) {
28001
+ return l(value);
28002
+ });
28003
+ }, subscribe = React4.useCallback(function(listener) {
28004
+ return listeners.current.add(listener), function() {
28005
+ listeners.current.delete(listener);
28006
+ };
28007
+ }, []);
28008
+ return [
28009
+ emit,
28010
+ subscribe
28011
+ ];
28012
+ }
28013
+ function SelectInner(props) {
28014
+ 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() {
27898
28015
  return {};
27899
28016
  }, {})[1], [selectedItem, setSelectedItem] = React4.useState(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
27900
28017
  prop: openProp,
@@ -27936,100 +28053,64 @@ var require_Select_native = __commonJS({
27936
28053
  return prev !== index ? (typeof index == "number" && emitActiveIndex(index), index) : prev;
27937
28054
  });
27938
28055
  }, 1, {}, []);
27939
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptProvider, {
27940
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectItemParentProvider, {
28056
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectItemParentProvider, {
28057
+ scope: __scopeSelect,
28058
+ initialValue: React4.useMemo(function() {
28059
+ return value;
28060
+ }, [
28061
+ open
28062
+ ]),
28063
+ size: sizeProp,
28064
+ activeIndexSubscribe,
28065
+ valueSubscribe,
28066
+ setOpen,
28067
+ id,
28068
+ onChange: React4.useCallback(function(val) {
28069
+ setValue(val), emitValue(val);
28070
+ }, []),
28071
+ onActiveChange: (0, import_core12.useEvent)(function() {
28072
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
28073
+ onActiveChange == null || onActiveChange(...args);
28074
+ }),
28075
+ setSelectedIndex,
28076
+ setValueAtIndex: React4.useCallback(function(index, value2) {
28077
+ listContentRef.current[index] = value2;
28078
+ }, []),
28079
+ shouldRenderWebNative,
28080
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectProvider, {
27941
28081
  scope: __scopeSelect,
27942
- initialValue: React4.useMemo(function() {
27943
- return value;
27944
- }, [
27945
- open
27946
- ]),
27947
- size: sizeProp,
27948
- activeIndexSubscribe,
27949
- valueSubscribe,
27950
- setOpen,
27951
- id,
27952
- onChange: React4.useCallback(function(val) {
27953
- setValue(val), emitValue(val);
27954
- }, []),
27955
- onActiveChange: (0, import_core12.useEvent)(function() {
27956
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
27957
- onActiveChange == null || onActiveChange(...args);
27958
- }),
27959
- setSelectedIndex,
27960
- setValueAtIndex: React4.useCallback(function(index, value2) {
27961
- listContentRef.current[index] = value2;
27962
- }, []),
27963
- shouldRenderWebNative,
27964
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectProvider, {
27965
- scope: __scopeSelect,
27966
- disablePreventBodyScroll,
27967
- dir,
27968
- blockSelection: !1,
27969
- fallback: !1,
27970
- selectedItem,
27971
- setSelectedItem,
27972
- forceUpdate,
27973
- valueNode,
27974
- onValueNodeChange: setValueNode,
27975
- scopeKey,
27976
- sheetBreakpoint,
27977
- activeIndex,
27978
- selectedIndex,
27979
- setActiveIndex: setActiveIndexDebounced,
27980
- value,
27981
- open,
27982
- native,
27983
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectSheetController, {
27984
- onOpenChange: setOpen,
27985
- __scopeSelect,
27986
- children: shouldRenderWebNative ? children : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectImpl, {
27987
- activeIndexRef,
27988
- listContentRef,
27989
- selectedIndexRef,
27990
- ...props,
27991
- open,
27992
- value,
27993
- children
27994
- })
28082
+ disablePreventBodyScroll,
28083
+ dir,
28084
+ blockSelection: !1,
28085
+ fallback: !1,
28086
+ selectedItem,
28087
+ setSelectedItem,
28088
+ forceUpdate,
28089
+ valueNode,
28090
+ onValueNodeChange: setValueNode,
28091
+ scopeKey: props.scopeKey,
28092
+ activeIndex,
28093
+ selectedIndex,
28094
+ setActiveIndex: setActiveIndexDebounced,
28095
+ value,
28096
+ open,
28097
+ native,
28098
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectSheetController, {
28099
+ onOpenChange: setOpen,
28100
+ __scopeSelect,
28101
+ children: shouldRenderWebNative ? children : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectImpl, {
28102
+ activeIndexRef,
28103
+ listContentRef,
28104
+ selectedIndexRef,
28105
+ ...props,
28106
+ open,
28107
+ value,
28108
+ children
27995
28109
  })
27996
28110
  })
27997
28111
  })
27998
28112
  });
27999
- }, {
28000
- Adapt: import_adapt.Adapt,
28001
- Content: import_SelectContent.SelectContent,
28002
- Group: SelectGroup,
28003
- Icon: SelectIcon,
28004
- Item: import_SelectItem.SelectItem,
28005
- ItemIndicator: SelectItemIndicator,
28006
- ItemText: import_SelectItemText.SelectItemText,
28007
- Label: SelectLabel,
28008
- ScrollDownButton: import_SelectScrollButton.SelectScrollDownButton,
28009
- ScrollUpButton: import_SelectScrollButton.SelectScrollUpButton,
28010
- Trigger: import_SelectTrigger.SelectTrigger,
28011
- Value: SelectValue,
28012
- Viewport: import_SelectViewport.SelectViewport,
28013
- Sheet: import_sheet.Sheet.Controlled
28014
- });
28015
- function useEmitter() {
28016
- var listeners = React4.useRef();
28017
- listeners.current || (listeners.current = /* @__PURE__ */ new Set());
28018
- var emit = function(value) {
28019
- listeners.current.forEach(function(l) {
28020
- return l(value);
28021
- });
28022
- }, subscribe = React4.useCallback(function(listener) {
28023
- return listeners.current.add(listener), function() {
28024
- listeners.current.delete(listener);
28025
- };
28026
- }, []);
28027
- return [
28028
- emit,
28029
- subscribe
28030
- ];
28031
28113
  }
28032
- Select.displayName = import_constants22.SELECT_NAME;
28033
28114
  }
28034
28115
  });
28035
28116
 
@@ -28143,7 +28224,7 @@ var require_constants_native5 = __commonJS({
28143
28224
  }
28144
28225
  });
28145
28226
  module2.exports = __toCommonJS2(constants_exports);
28146
- var import_create_context = require_index_native27(), SLIDER_NAME = "Slider", [createSliderContext, createSliderScope] = (0, import_create_context.createContextScope)(SLIDER_NAME), [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME), [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, {
28227
+ var import_create_context = require_index_native28(), SLIDER_NAME = "Slider", [createSliderContext, createSliderScope] = (0, import_create_context.createContextScope)(SLIDER_NAME), [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME), [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, {
28147
28228
  startEdge: "left",
28148
28229
  endEdge: "right",
28149
28230
  sizeProp: "width",
@@ -31133,7 +31214,7 @@ __export(src_exports, {
31133
31214
  });
31134
31215
  module.exports = __toCommonJS(src_exports);
31135
31216
  __reExport(src_exports, __toESM(require_index_native25()), module.exports);
31136
- __reExport(src_exports, __toESM(require_index_native26()), module.exports);
31217
+ __reExport(src_exports, __toESM(require_index_native27()), module.exports);
31137
31218
  __reExport(src_exports, __toESM(require_index_native36()), module.exports);
31138
31219
  __reExport(src_exports, __toESM(require_index_native4()), module.exports);
31139
31220
  __reExport(src_exports, __toESM(require_index_native39()), module.exports);
@@ -31141,7 +31222,7 @@ __reExport(src_exports, __toESM(require_index_native42()), module.exports);
31141
31222
  __reExport(src_exports, __toESM(require_index_native43()), module.exports);
31142
31223
  __reExport(src_exports, __toESM(require_index_native48()), module.exports);
31143
31224
  __reExport(src_exports, __toESM(require_index_native11()), module.exports);
31144
- __reExport(src_exports, __toESM(require_index_native27()), module.exports);
31225
+ __reExport(src_exports, __toESM(require_index_native28()), module.exports);
31145
31226
  __reExport(src_exports, __toESM(require_index_native35()), module.exports);
31146
31227
  __reExport(src_exports, __toESM(require_index_native40()), module.exports);
31147
31228
  __reExport(src_exports, __toESM(require_index_native49()), module.exports);
@@ -31154,7 +31235,7 @@ __reExport(src_exports, __toESM(require_index_native45()), module.exports);
31154
31235
  __reExport(src_exports, __toESM(require_index_native53()), module.exports);
31155
31236
  __reExport(src_exports, __toESM(require_index_native57()), module.exports);
31156
31237
  __reExport(src_exports, __toESM(require_index_native56()), module.exports);
31157
- __reExport(src_exports, __toESM(require_index_native31()), module.exports);
31238
+ __reExport(src_exports, __toESM(require_index_native26()), module.exports);
31158
31239
  __reExport(src_exports, __toESM(require_index_native58()), module.exports);
31159
31240
  __reExport(src_exports, __toESM(require_index_native61()), module.exports);
31160
31241
  __reExport(src_exports, __toESM(require_index_native33()), module.exports);
@@ -31234,7 +31315,7 @@ Expected a subset of: ${expected.join(", ")}
31234
31315
  };
31235
31316
 
31236
31317
  // src/views/TamaguiProvider.tsx
31237
- var import_jsx_runtime = require("react/jsx-runtime"), import_core2 = __toESM(require_index_native17()), import_portal = __toESM(require_index_native31()), TamaguiProvider = function(param) {
31318
+ var import_jsx_runtime = require("react/jsx-runtime"), import_core2 = __toESM(require_index_native17()), import_portal = __toESM(require_index_native26()), TamaguiProvider = function(param) {
31238
31319
  var { children, ...props } = param;
31239
31320
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.TamaguiProvider, {
31240
31321
  ...props,