@tamagui/portal 3.0.7 → 3.0.8

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.
@@ -49,15 +49,15 @@ var ACTIONS = /* @__PURE__ */ (function(ACTIONS2) {
49
49
  return ACTIONS2;
50
50
  })(ACTIONS || {});
51
51
  var INITIAL_STATE = {};
52
- var registerHost = function(state, hostName) {
52
+ var registerHost = function registerHost2(state, hostName) {
53
53
  if (!(hostName in state)) state[hostName] = [];
54
54
  return state;
55
55
  };
56
- var deregisterHost = function(state, hostName) {
56
+ var deregisterHost = function deregisterHost2(state, hostName) {
57
57
  delete state[hostName];
58
58
  return state;
59
59
  };
60
- var addUpdatePortal = function(state, hostName, portalName, node) {
60
+ var addUpdatePortal = function addUpdatePortal2(state, hostName, portalName, node) {
61
61
  if (!(hostName in state)) state = registerHost(state, hostName);
62
62
  var index = state[hostName].findIndex(function(item) {
63
63
  return item.name === portalName;
@@ -69,7 +69,7 @@ var addUpdatePortal = function(state, hostName, portalName, node) {
69
69
  });
70
70
  return state;
71
71
  };
72
- var removePortal = function(state, hostName, portalName) {
72
+ var removePortal = function removePortal2(state, hostName, portalName) {
73
73
  if (!(hostName in state)) {
74
74
  if (process.env.NODE_ENV === "development") console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`);
75
75
  return state;
@@ -80,7 +80,7 @@ var removePortal = function(state, hostName, portalName) {
80
80
  if (index !== -1) state[hostName].splice(index, 1);
81
81
  return state;
82
82
  };
83
- var reducer = function(state, action) {
83
+ var reducer = function reducer2(state, action) {
84
84
  var { type } = action;
85
85
  switch (type) {
86
86
  case 0: return registerHost({ ...state }, action.hostName);
@@ -93,28 +93,28 @@ var reducer = function(state, action) {
93
93
  var PortalStateContext = /* @__PURE__ */ (0, import_react.createContext)(null);
94
94
  var PortalDispatchContext = /* @__PURE__ */ (0, import_react.createContext)(null);
95
95
  var PortalProviderActiveContext = /* @__PURE__ */ (0, import_react.createContext)(false);
96
- var usePortalState = function(hostName) {
96
+ var usePortalState = function usePortalState2(hostName) {
97
97
  var state = (0, import_react.useContext)(PortalStateContext);
98
98
  if (state === null) throw new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
99
99
  return state[hostName] || [];
100
100
  };
101
- var usePortal = function() {
101
+ var usePortal = function usePortal2() {
102
102
  var hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "root";
103
103
  var dispatch = (0, import_react.useContext)(PortalDispatchContext);
104
104
  if (dispatch === null) throw new Error("'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.");
105
- var registerHost2 = (0, import_react.useCallback)(function() {
105
+ var registerHost3 = (0, import_react.useCallback)(function() {
106
106
  dispatch({
107
107
  type: 0,
108
108
  hostName
109
109
  });
110
110
  }, []);
111
- var deregisterHost2 = (0, import_react.useCallback)(function() {
111
+ var deregisterHost3 = (0, import_react.useCallback)(function() {
112
112
  dispatch({
113
113
  type: 1,
114
114
  hostName
115
115
  });
116
116
  }, []);
117
- var addUpdatePortal2 = (0, import_react.useCallback)(function(name, node) {
117
+ var addUpdatePortal3 = (0, import_react.useCallback)(function(name, node) {
118
118
  dispatch({
119
119
  type: 2,
120
120
  hostName,
@@ -123,10 +123,10 @@ var usePortal = function() {
123
123
  });
124
124
  }, []);
125
125
  return {
126
- registerHost: registerHost2,
127
- deregisterHost: deregisterHost2,
128
- addPortal: addUpdatePortal2,
129
- updatePortal: addUpdatePortal2,
126
+ registerHost: registerHost3,
127
+ deregisterHost: deregisterHost3,
128
+ addPortal: addUpdatePortal3,
129
+ updatePortal: addUpdatePortal3,
130
130
  removePortal: (0, import_react.useCallback)(function(name) {
131
131
  dispatch({
132
132
  type: 3,
@@ -136,7 +136,7 @@ var usePortal = function() {
136
136
  }, [])
137
137
  };
138
138
  };
139
- var PortalProviderComponent = function(param) {
139
+ var PortalProvider = /* @__PURE__ */ (0, import_react.memo)(function PortalProviderComponent2(param) {
140
140
  var { rootHostName = "root", shouldAddRootHost = true, children } = param;
141
141
  var isAlreadyInProvider = (0, import_react.useContext)(PortalProviderActiveContext);
142
142
  if (process.env.NODE_ENV === "development") {
@@ -144,12 +144,11 @@ var PortalProviderComponent = function(param) {
144
144
  }
145
145
  var [state, dispatch] = (0, import_react.useReducer)(reducer, INITIAL_STATE);
146
146
  var transitionDispatch = (0, import_react.useMemo)(function() {
147
- var next = function(value) {
147
+ return function next2(value) {
148
148
  (0, import_start_transition.startTransition)(function() {
149
149
  dispatch(value);
150
150
  });
151
151
  };
152
- return next;
153
152
  }, [dispatch]);
154
153
  var portalState = (0, import_native.getPortal)().state;
155
154
  var content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProviderActiveContext.Provider, {
@@ -164,10 +163,9 @@ var PortalProviderComponent = function(param) {
164
163
  });
165
164
  if (portalState.type === "teleport") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.NativePortalProvider, { children: content });
166
165
  return content;
167
- };
168
- var PortalProvider = /* @__PURE__ */ (0, import_react.memo)(PortalProviderComponent);
166
+ });
169
167
  PortalProvider.displayName = "PortalProvider";
170
- var defaultRenderer = function(children) {
168
+ var defaultRenderer = function defaultRenderer2(children) {
171
169
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
172
170
  };
173
171
  var PortalHost = /* @__PURE__ */ (0, import_react.memo)(function PortalHost2(props) {
@@ -177,11 +175,11 @@ var PortalHost = /* @__PURE__ */ (0, import_react.memo)(function PortalHost2(pro
177
175
  function PortalHostNonNative(props) {
178
176
  var { name, forwardProps, render = defaultRenderer } = props;
179
177
  var state = usePortalState(name);
180
- var { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
178
+ var { registerHost: registerHost3, deregisterHost: deregisterHost3 } = usePortal(props.name);
181
179
  (0, import_constants.useIsomorphicLayoutEffect)(function() {
182
- registerHost2();
180
+ registerHost3();
183
181
  return function() {
184
- deregisterHost2();
182
+ deregisterHost3();
185
183
  };
186
184
  }, []);
187
185
  if (forwardProps) return render(state.map(function(item) {
@@ -49,15 +49,15 @@ var ACTIONS = /* @__PURE__ */ (function(ACTIONS2) {
49
49
  return ACTIONS2;
50
50
  })(ACTIONS || {});
51
51
  var INITIAL_STATE = {};
52
- var registerHost = function(state, hostName) {
52
+ var registerHost = function registerHost2(state, hostName) {
53
53
  if (!(hostName in state)) state[hostName] = [];
54
54
  return state;
55
55
  };
56
- var deregisterHost = function(state, hostName) {
56
+ var deregisterHost = function deregisterHost2(state, hostName) {
57
57
  delete state[hostName];
58
58
  return state;
59
59
  };
60
- var addUpdatePortal = function(state, hostName, portalName, node) {
60
+ var addUpdatePortal = function addUpdatePortal2(state, hostName, portalName, node) {
61
61
  if (!(hostName in state)) state = registerHost(state, hostName);
62
62
  var index = state[hostName].findIndex(function(item) {
63
63
  return item.name === portalName;
@@ -69,7 +69,7 @@ var addUpdatePortal = function(state, hostName, portalName, node) {
69
69
  });
70
70
  return state;
71
71
  };
72
- var removePortal = function(state, hostName, portalName) {
72
+ var removePortal = function removePortal2(state, hostName, portalName) {
73
73
  if (!(hostName in state)) {
74
74
  if (process.env.NODE_ENV === "development") console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`);
75
75
  return state;
@@ -80,7 +80,7 @@ var removePortal = function(state, hostName, portalName) {
80
80
  if (index !== -1) state[hostName].splice(index, 1);
81
81
  return state;
82
82
  };
83
- var reducer = function(state, action) {
83
+ var reducer = function reducer2(state, action) {
84
84
  var { type } = action;
85
85
  switch (type) {
86
86
  case 0: return registerHost({ ...state }, action.hostName);
@@ -93,28 +93,28 @@ var reducer = function(state, action) {
93
93
  var PortalStateContext = /* @__PURE__ */ (0, import_react.createContext)(null);
94
94
  var PortalDispatchContext = /* @__PURE__ */ (0, import_react.createContext)(null);
95
95
  var PortalProviderActiveContext = /* @__PURE__ */ (0, import_react.createContext)(false);
96
- var usePortalState = function(hostName) {
96
+ var usePortalState = function usePortalState2(hostName) {
97
97
  var state = (0, import_react.useContext)(PortalStateContext);
98
98
  if (state === null) throw new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
99
99
  return state[hostName] || [];
100
100
  };
101
- var usePortal = function() {
101
+ var usePortal = function usePortal2() {
102
102
  var hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "root";
103
103
  var dispatch = (0, import_react.useContext)(PortalDispatchContext);
104
104
  if (dispatch === null) throw new Error("'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.");
105
- var registerHost2 = (0, import_react.useCallback)(function() {
105
+ var registerHost3 = (0, import_react.useCallback)(function() {
106
106
  dispatch({
107
107
  type: 0,
108
108
  hostName
109
109
  });
110
110
  }, []);
111
- var deregisterHost2 = (0, import_react.useCallback)(function() {
111
+ var deregisterHost3 = (0, import_react.useCallback)(function() {
112
112
  dispatch({
113
113
  type: 1,
114
114
  hostName
115
115
  });
116
116
  }, []);
117
- var addUpdatePortal2 = (0, import_react.useCallback)(function(name, node) {
117
+ var addUpdatePortal3 = (0, import_react.useCallback)(function(name, node) {
118
118
  dispatch({
119
119
  type: 2,
120
120
  hostName,
@@ -123,10 +123,10 @@ var usePortal = function() {
123
123
  });
124
124
  }, []);
125
125
  return {
126
- registerHost: registerHost2,
127
- deregisterHost: deregisterHost2,
128
- addPortal: addUpdatePortal2,
129
- updatePortal: addUpdatePortal2,
126
+ registerHost: registerHost3,
127
+ deregisterHost: deregisterHost3,
128
+ addPortal: addUpdatePortal3,
129
+ updatePortal: addUpdatePortal3,
130
130
  removePortal: (0, import_react.useCallback)(function(name) {
131
131
  dispatch({
132
132
  type: 3,
@@ -136,7 +136,7 @@ var usePortal = function() {
136
136
  }, [])
137
137
  };
138
138
  };
139
- var PortalProviderComponent = function(param) {
139
+ var PortalProvider = /* @__PURE__ */ (0, import_react.memo)(function PortalProviderComponent2(param) {
140
140
  var { rootHostName = "root", shouldAddRootHost = true, children } = param;
141
141
  var isAlreadyInProvider = (0, import_react.useContext)(PortalProviderActiveContext);
142
142
  if (process.env.NODE_ENV === "development") {
@@ -144,12 +144,11 @@ var PortalProviderComponent = function(param) {
144
144
  }
145
145
  var [state, dispatch] = (0, import_react.useReducer)(reducer, INITIAL_STATE);
146
146
  var transitionDispatch = (0, import_react.useMemo)(function() {
147
- var next = function(value) {
147
+ return function next2(value) {
148
148
  (0, import_start_transition.startTransition)(function() {
149
149
  dispatch(value);
150
150
  });
151
151
  };
152
- return next;
153
152
  }, [dispatch]);
154
153
  var portalState = (0, import_native.getPortal)().state;
155
154
  var content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProviderActiveContext.Provider, {
@@ -164,10 +163,9 @@ var PortalProviderComponent = function(param) {
164
163
  });
165
164
  if (portalState.type === "teleport") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.NativePortalProvider, { children: content });
166
165
  return content;
167
- };
168
- var PortalProvider = /* @__PURE__ */ (0, import_react.memo)(PortalProviderComponent);
166
+ });
169
167
  PortalProvider.displayName = "PortalProvider";
170
- var defaultRenderer = function(children) {
168
+ var defaultRenderer = function defaultRenderer2(children) {
171
169
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
172
170
  };
173
171
  var PortalHost = /* @__PURE__ */ (0, import_react.memo)(function PortalHost2(props) {
@@ -177,11 +175,11 @@ var PortalHost = /* @__PURE__ */ (0, import_react.memo)(function PortalHost2(pro
177
175
  function PortalHostNonNative(props) {
178
176
  var { name, forwardProps, render = defaultRenderer } = props;
179
177
  var state = usePortalState(name);
180
- var { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
178
+ var { registerHost: registerHost3, deregisterHost: deregisterHost3 } = usePortal(props.name);
181
179
  (0, import_constants.useIsomorphicLayoutEffect)(function() {
182
- registerHost2();
180
+ registerHost3();
183
181
  return function() {
184
- deregisterHost2();
182
+ deregisterHost3();
185
183
  };
186
184
  }, []);
187
185
  if (forwardProps) return render(state.map(function(item) {
@@ -1 +1 @@
1
- {"version":3,"file":"GorhomPortal.native.js","names":[],"sources":["cjs/GorhomPortal.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar GorhomPortal_exports = {};\n__export(GorhomPortal_exports, {\n\tACTIONS: () => ACTIONS,\n\tINITIAL_STATE: () => INITIAL_STATE,\n\tPortalHost: () => PortalHost,\n\tPortalProvider: () => PortalProvider,\n\tusePortal: () => usePortal\n});\nmodule.exports = __toCommonJS(GorhomPortal_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_native = require(\"@tamagui/native\");\nvar import_start_transition = require(\"@tamagui/start-transition\");\nvar import_react = __toESM(require(\"react\"), 1);\nrequire(\"./constants\");\nvar ACTIONS = /* @__PURE__ */ (function(ACTIONS2) {\n\tACTIONS2[ACTIONS2[\"REGISTER_HOST\"] = 0] = \"REGISTER_HOST\";\n\tACTIONS2[ACTIONS2[\"DEREGISTER_HOST\"] = 1] = \"DEREGISTER_HOST\";\n\tACTIONS2[ACTIONS2[\"ADD_UPDATE_PORTAL\"] = 2] = \"ADD_UPDATE_PORTAL\";\n\tACTIONS2[ACTIONS2[\"REMOVE_PORTAL\"] = 3] = \"REMOVE_PORTAL\";\n\treturn ACTIONS2;\n})(ACTIONS || {});\nvar INITIAL_STATE = {};\nvar registerHost = function(state, hostName) {\n\tif (!(hostName in state)) state[hostName] = [];\n\treturn state;\n};\nvar deregisterHost = function(state, hostName) {\n\tdelete state[hostName];\n\treturn state;\n};\nvar addUpdatePortal = function(state, hostName, portalName, node) {\n\tif (!(hostName in state)) state = registerHost(state, hostName);\n\tvar index = state[hostName].findIndex(function(item) {\n\t\treturn item.name === portalName;\n\t});\n\tif (index !== -1) state[hostName][index].node = node;\n\telse state[hostName].push({\n\t\tname: portalName,\n\t\tnode\n\t});\n\treturn state;\n};\nvar removePortal = function(state, hostName, portalName) {\n\tif (!(hostName in state)) {\n\t\tif (process.env.NODE_ENV === \"development\") console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`);\n\t\treturn state;\n\t}\n\tvar index = state[hostName].findIndex(function(item) {\n\t\treturn item.name === portalName;\n\t});\n\tif (index !== -1) state[hostName].splice(index, 1);\n\treturn state;\n};\nvar reducer = function(state, action) {\n\tvar { type } = action;\n\tswitch (type) {\n\t\tcase 0: return registerHost({ ...state }, action.hostName);\n\t\tcase 1: return deregisterHost({ ...state }, action.hostName);\n\t\tcase 2: return addUpdatePortal({ ...state }, action.hostName, action.portalName, action.node);\n\t\tcase 3: return removePortal({ ...state }, action.hostName, action.portalName);\n\t\tdefault: return state;\n\t}\n};\nvar PortalStateContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nvar PortalDispatchContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nvar PortalProviderActiveContext = /* @__PURE__ */ (0, import_react.createContext)(false);\nvar usePortalState = function(hostName) {\n\tvar state = (0, import_react.useContext)(PortalStateContext);\n\tif (state === null) throw new Error(\"'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.\");\n\treturn state[hostName] || [];\n};\nvar usePortal = function() {\n\tvar hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"root\";\n\tvar dispatch = (0, import_react.useContext)(PortalDispatchContext);\n\tif (dispatch === null) throw new Error(\"'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.\");\n\tvar registerHost2 = (0, import_react.useCallback)(function() {\n\t\tdispatch({\n\t\t\ttype: 0,\n\t\t\thostName\n\t\t});\n\t}, []);\n\tvar deregisterHost2 = (0, import_react.useCallback)(function() {\n\t\tdispatch({\n\t\t\ttype: 1,\n\t\t\thostName\n\t\t});\n\t}, []);\n\tvar addUpdatePortal2 = (0, import_react.useCallback)(function(name, node) {\n\t\tdispatch({\n\t\t\ttype: 2,\n\t\t\thostName,\n\t\t\tportalName: name,\n\t\t\tnode\n\t\t});\n\t}, []);\n\treturn {\n\t\tregisterHost: registerHost2,\n\t\tderegisterHost: deregisterHost2,\n\t\taddPortal: addUpdatePortal2,\n\t\tupdatePortal: addUpdatePortal2,\n\t\tremovePortal: (0, import_react.useCallback)(function(name) {\n\t\t\tdispatch({\n\t\t\t\ttype: 3,\n\t\t\t\thostName,\n\t\t\t\tportalName: name\n\t\t\t});\n\t\t}, [])\n\t};\n};\nvar PortalProviderComponent = function(param) {\n\tvar { rootHostName = \"root\", shouldAddRootHost = true, children } = param;\n\tvar isAlreadyInProvider = (0, import_react.useContext)(PortalProviderActiveContext);\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (isAlreadyInProvider && shouldAddRootHost) console.warn(`[tamagui] Nested PortalProvider with shouldAddRootHost detected. This causes hydration mismatches. TamaguiProvider from 'tamagui' already includes PortalProvider - remove the explicit PortalProvider wrapper or set shouldAddRootHost={false}.`);\n\t}\n\tvar [state, dispatch] = (0, import_react.useReducer)(reducer, INITIAL_STATE);\n\tvar transitionDispatch = (0, import_react.useMemo)(function() {\n\t\tvar next = function(value) {\n\t\t\t(0, import_start_transition.startTransition)(function() {\n\t\t\t\tdispatch(value);\n\t\t\t});\n\t\t};\n\t\treturn next;\n\t}, [dispatch]);\n\tvar portalState = (0, import_native.getPortal)().state;\n\tvar content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProviderActiveContext.Provider, {\n\t\tvalue: true,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalDispatchContext.Provider, {\n\t\t\tvalue: transitionDispatch,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PortalStateContext.Provider, {\n\t\t\t\tvalue: state,\n\t\t\t\tchildren: [children, shouldAddRootHost && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalHost, { name: rootHostName })]\n\t\t\t})\n\t\t})\n\t});\n\tif (portalState.type === \"teleport\") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.NativePortalProvider, { children: content });\n\treturn content;\n};\nvar PortalProvider = /* @__PURE__ */ (0, import_react.memo)(PortalProviderComponent);\nPortalProvider.displayName = \"PortalProvider\";\nvar defaultRenderer = function(children) {\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });\n};\nvar PortalHost = /* @__PURE__ */ (0, import_react.memo)(function PortalHost2(props) {\n\tif ((0, import_native.getPortal)().state.type === \"teleport\") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.NativePortalHost, { name: props.name });\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalHostNonNative, { ...props });\n});\nfunction PortalHostNonNative(props) {\n\tvar { name, forwardProps, render = defaultRenderer } = props;\n\tvar state = usePortalState(name);\n\tvar { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\tregisterHost2();\n\t\treturn function() {\n\t\t\tderegisterHost2();\n\t\t};\n\t}, []);\n\tif (forwardProps) return render(state.map(function(item) {\n\t\tvar next = item.node;\n\t\tvar { children, ...restForwardProps } = forwardProps;\n\t\tif (forwardProps) return import_react.default.Children.map(next, function(child) {\n\t\t\treturn /* @__PURE__ */ import_react.default.isValidElement(child) ? /* @__PURE__ */ import_react.default.cloneElement(child, {\n\t\t\t\tkey: child.key,\n\t\t\t\t...restForwardProps\n\t\t\t}) : child;\n\t\t});\n\t\treturn next;\n\t}));\n\treturn render(state.map(function(item) {\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: item.node }, item.name);\n\t}));\n}\n//# sourceMappingURL=GorhomPortal.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO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Ae,gBAAgB,oBAAoB,UAAU,MAAM,IAAI;CAC3F,CAAC,GAAG,iBAAiB,0BAAyB,CAAE,WAAW;EAC1D,cAAc;EACd,OAAO,WAAW;GACjB,gBAAgB;EACjB;CACD,GAAG,CAAC,CAAC;CACL,IAAI,cAAc,OAAO,OAAO,MAAM,IAAI,SAAS,MAAM;EACxD,IAAI,OAAO,KAAK;EAChB,IAAI,EAAE,UAAU,GAAG,qBAAqB;EACxC,IAAI,cAAc,OAAO,aAAa,QAAQ,SAAS,IAAI,MAAM,SAAS,OAAO;GAChF,OAAuB,6BAAa,QAAQ,eAAe,KAAK,IAAoB,6BAAa,QAAQ,aAAa,OAAO;IAC5H,KAAK,MAAM;IACX,GAAG;GACJ,CAAC,IAAI;EACN,CAAC;EACD,OAAO;CACR,CAAC,CAAC;CACF,OAAO,OAAO,MAAM,IAAI,SAAS,MAAM;EACtC,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa,QAAQ,UAAU,EAAE,UAAU,KAAK,KAAK,GAAG,KAAK,IAAI;CACrH,CAAC,CAAC;AACH"}
1
+ {"version":3,"file":"GorhomPortal.native.js","names":[],"sources":["cjs/GorhomPortal.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar GorhomPortal_exports = {};\n__export(GorhomPortal_exports, {\n\tACTIONS: () => ACTIONS,\n\tINITIAL_STATE: () => INITIAL_STATE,\n\tPortalHost: () => PortalHost,\n\tPortalProvider: () => PortalProvider,\n\tusePortal: () => usePortal\n});\nmodule.exports = __toCommonJS(GorhomPortal_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_native = require(\"@tamagui/native\");\nvar import_start_transition = require(\"@tamagui/start-transition\");\nvar import_react = __toESM(require(\"react\"), 1);\nrequire(\"./constants\");\nvar ACTIONS = /* @__PURE__ */ (function(ACTIONS2) {\n\tACTIONS2[ACTIONS2[\"REGISTER_HOST\"] = 0] = \"REGISTER_HOST\";\n\tACTIONS2[ACTIONS2[\"DEREGISTER_HOST\"] = 1] = \"DEREGISTER_HOST\";\n\tACTIONS2[ACTIONS2[\"ADD_UPDATE_PORTAL\"] = 2] = \"ADD_UPDATE_PORTAL\";\n\tACTIONS2[ACTIONS2[\"REMOVE_PORTAL\"] = 3] = \"REMOVE_PORTAL\";\n\treturn ACTIONS2;\n})(ACTIONS || {});\nvar INITIAL_STATE = {};\nvar registerHost = function registerHost2(state, hostName) {\n\tif (!(hostName in state)) state[hostName] = [];\n\treturn state;\n};\nvar deregisterHost = function deregisterHost2(state, hostName) {\n\tdelete state[hostName];\n\treturn state;\n};\nvar addUpdatePortal = function addUpdatePortal2(state, hostName, portalName, node) {\n\tif (!(hostName in state)) state = registerHost(state, hostName);\n\tvar index = state[hostName].findIndex(function(item) {\n\t\treturn item.name === portalName;\n\t});\n\tif (index !== -1) state[hostName][index].node = node;\n\telse state[hostName].push({\n\t\tname: portalName,\n\t\tnode\n\t});\n\treturn state;\n};\nvar removePortal = function removePortal2(state, hostName, portalName) {\n\tif (!(hostName in state)) {\n\t\tif (process.env.NODE_ENV === \"development\") console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`);\n\t\treturn state;\n\t}\n\tvar index = state[hostName].findIndex(function(item) {\n\t\treturn item.name === portalName;\n\t});\n\tif (index !== -1) state[hostName].splice(index, 1);\n\treturn state;\n};\nvar reducer = function reducer2(state, action) {\n\tvar { type } = action;\n\tswitch (type) {\n\t\tcase 0: return registerHost({ ...state }, action.hostName);\n\t\tcase 1: return deregisterHost({ ...state }, action.hostName);\n\t\tcase 2: return addUpdatePortal({ ...state }, action.hostName, action.portalName, action.node);\n\t\tcase 3: return removePortal({ ...state }, action.hostName, action.portalName);\n\t\tdefault: return state;\n\t}\n};\nvar PortalStateContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nvar PortalDispatchContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nvar PortalProviderActiveContext = /* @__PURE__ */ (0, import_react.createContext)(false);\nvar usePortalState = function usePortalState2(hostName) {\n\tvar state = (0, import_react.useContext)(PortalStateContext);\n\tif (state === null) throw new Error(\"'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.\");\n\treturn state[hostName] || [];\n};\nvar usePortal = function usePortal2() {\n\tvar hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"root\";\n\tvar dispatch = (0, import_react.useContext)(PortalDispatchContext);\n\tif (dispatch === null) throw new Error(\"'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.\");\n\tvar registerHost3 = (0, import_react.useCallback)(function() {\n\t\tdispatch({\n\t\t\ttype: 0,\n\t\t\thostName\n\t\t});\n\t}, []);\n\tvar deregisterHost3 = (0, import_react.useCallback)(function() {\n\t\tdispatch({\n\t\t\ttype: 1,\n\t\t\thostName\n\t\t});\n\t}, []);\n\tvar addUpdatePortal3 = (0, import_react.useCallback)(function(name, node) {\n\t\tdispatch({\n\t\t\ttype: 2,\n\t\t\thostName,\n\t\t\tportalName: name,\n\t\t\tnode\n\t\t});\n\t}, []);\n\treturn {\n\t\tregisterHost: registerHost3,\n\t\tderegisterHost: deregisterHost3,\n\t\taddPortal: addUpdatePortal3,\n\t\tupdatePortal: addUpdatePortal3,\n\t\tremovePortal: (0, import_react.useCallback)(function(name) {\n\t\t\tdispatch({\n\t\t\t\ttype: 3,\n\t\t\t\thostName,\n\t\t\t\tportalName: name\n\t\t\t});\n\t\t}, [])\n\t};\n};\nvar PortalProvider = /* @__PURE__ */ (0, import_react.memo)(function PortalProviderComponent2(param) {\n\tvar { rootHostName = \"root\", shouldAddRootHost = true, children } = param;\n\tvar isAlreadyInProvider = (0, import_react.useContext)(PortalProviderActiveContext);\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (isAlreadyInProvider && shouldAddRootHost) console.warn(`[tamagui] Nested PortalProvider with shouldAddRootHost detected. This causes hydration mismatches. TamaguiProvider from 'tamagui' already includes PortalProvider - remove the explicit PortalProvider wrapper or set shouldAddRootHost={false}.`);\n\t}\n\tvar [state, dispatch] = (0, import_react.useReducer)(reducer, INITIAL_STATE);\n\tvar transitionDispatch = (0, import_react.useMemo)(function() {\n\t\treturn function next2(value) {\n\t\t\t(0, import_start_transition.startTransition)(function() {\n\t\t\t\tdispatch(value);\n\t\t\t});\n\t\t};\n\t}, [dispatch]);\n\tvar portalState = (0, import_native.getPortal)().state;\n\tvar content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProviderActiveContext.Provider, {\n\t\tvalue: true,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalDispatchContext.Provider, {\n\t\t\tvalue: transitionDispatch,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PortalStateContext.Provider, {\n\t\t\t\tvalue: state,\n\t\t\t\tchildren: [children, shouldAddRootHost && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalHost, { name: rootHostName })]\n\t\t\t})\n\t\t})\n\t});\n\tif (portalState.type === \"teleport\") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.NativePortalProvider, { children: content });\n\treturn content;\n});\nPortalProvider.displayName = \"PortalProvider\";\nvar defaultRenderer = function defaultRenderer2(children) {\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });\n};\nvar PortalHost = /* @__PURE__ */ (0, import_react.memo)(function PortalHost2(props) {\n\tif ((0, import_native.getPortal)().state.type === \"teleport\") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.NativePortalHost, { name: props.name });\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalHostNonNative, { ...props });\n});\nfunction PortalHostNonNative(props) {\n\tvar { name, forwardProps, render = defaultRenderer } = props;\n\tvar state = usePortalState(name);\n\tvar { registerHost: registerHost3, deregisterHost: deregisterHost3 } = usePortal(props.name);\n\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\tregisterHost3();\n\t\treturn function() {\n\t\t\tderegisterHost3();\n\t\t};\n\t}, []);\n\tif (forwardProps) return render(state.map(function(item) {\n\t\tvar next = item.node;\n\t\tvar { children, ...restForwardProps } = forwardProps;\n\t\tif (forwardProps) return import_react.default.Children.map(next, function(child) {\n\t\t\treturn /* @__PURE__ */ import_react.default.isValidElement(child) ? /* @__PURE__ */ import_react.default.cloneElement(child, {\n\t\t\t\tkey: child.key,\n\t\t\t\t...restForwardProps\n\t\t\t}) : child;\n\t\t});\n\t\treturn next;\n\t}));\n\treturn render(state.map(function(item) {\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: item.node }, item.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D,OAAO;CACR,CAAC,CAAC;CACF,OAAO,OAAO,MAAM,IAAI,SAAS,MAAM;EACtC,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa,QAAQ,UAAU,EAAE,UAAU,KAAK,KAAK,GAAG,KAAK,IAAI;CACrH,CAAC,CAAC;AACH"}
@@ -30,7 +30,7 @@ var import_native = require("@tamagui/native");
30
30
  var import_web = require("@tamagui/web");
31
31
  var import_react = require("react");
32
32
  var import_GorhomPortal = require("./GorhomPortal.native.js");
33
- var GorhomPortalItem = function(props) {
33
+ var GorhomPortalItem = function GorhomPortalItem2(props) {
34
34
  var { name: _providedName, hostName = "root", handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;
35
35
  var portalState = (0, import_native.getPortal)().state;
36
36
  if (portalState.type === "teleport") {
@@ -52,7 +52,7 @@ var GorhomPortalItem = function(props) {
52
52
  children
53
53
  });
54
54
  };
55
- var GorhomPortalItemFallback = function(props) {
55
+ var GorhomPortalItemFallback = function GorhomPortalItemFallback2(props) {
56
56
  var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;
57
57
  var { addPortal: addUpdatePortal, removePortal } = (0, import_GorhomPortal.usePortal)(hostName);
58
58
  var id = (0, import_react.useId)();
@@ -30,7 +30,7 @@ var import_native = require("@tamagui/native");
30
30
  var import_web = require("@tamagui/web");
31
31
  var import_react = require("react");
32
32
  var import_GorhomPortal = require("./GorhomPortal.native.js");
33
- var GorhomPortalItem = function(props) {
33
+ var GorhomPortalItem = function GorhomPortalItem2(props) {
34
34
  var { name: _providedName, hostName = "root", handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;
35
35
  var portalState = (0, import_native.getPortal)().state;
36
36
  if (portalState.type === "teleport") {
@@ -52,7 +52,7 @@ var GorhomPortalItem = function(props) {
52
52
  children
53
53
  });
54
54
  };
55
- var GorhomPortalItemFallback = function(props) {
55
+ var GorhomPortalItemFallback = function GorhomPortalItemFallback2(props) {
56
56
  var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;
57
57
  var { addPortal: addUpdatePortal, removePortal } = (0, import_GorhomPortal.usePortal)(hostName);
58
58
  var id = (0, import_react.useId)();
@@ -1 +1 @@
1
- {"version":3,"file":"GorhomPortalItem.native.js","names":[],"sources":["cjs/GorhomPortalItem.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar GorhomPortalItem_native_exports = {};\n__export(GorhomPortalItem_native_exports, {\n GorhomPortalItem: () => GorhomPortalItem\n});\nmodule.exports = __toCommonJS(GorhomPortalItem_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_native = require(\"@tamagui/native\");\nvar import_web = require(\"@tamagui/web\");\nvar import_react = require(\"react\");\nvar import_GorhomPortal = require(\"./GorhomPortal\");\nvar GorhomPortalItem = function(props) {\n var { name: _providedName, hostName = \"root\", handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;\n var portalState = (0, import_native.getPortal)().state;\n if (portalState.type === \"teleport\") {\n if (passThrough) {\n return children;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.NativePortal, {\n hostName,\n children\n });\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GorhomPortalItemFallback, {\n name: _providedName,\n hostName,\n handleOnMount: _providedHandleOnMount,\n handleOnUnmount: _providedHandleOnUnmount,\n handleOnUpdate: _providedHandleOnUpdate,\n passThrough,\n children\n });\n};\nvar GorhomPortalItemFallback = function(props) {\n var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;\n var { addPortal: addUpdatePortal, removePortal } = (0, import_GorhomPortal.usePortal)(hostName);\n var id = (0, import_react.useId)();\n var name = _providedName || id;\n var themeName = (0, import_web.useThemeName)();\n var themedChildren = passThrough ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web.Theme, {\n name: themeName,\n children\n });\n var handleOnMount = (0, import_core.useEvent)(function() {\n if (_providedHandleOnMount) {\n _providedHandleOnMount(function() {\n return addUpdatePortal(name, themedChildren);\n });\n } else {\n addUpdatePortal(name, themedChildren);\n }\n });\n var handleOnUnmount = (0, import_core.useEvent)(function() {\n if (_providedHandleOnUnmount) {\n _providedHandleOnUnmount(function() {\n return removePortal(name);\n });\n } else {\n removePortal(name);\n }\n });\n var handleOnUpdate = (0, import_core.useEvent)(function() {\n if (_providedHandleOnUpdate) {\n _providedHandleOnUpdate(function() {\n return addUpdatePortal(name, themedChildren);\n });\n } else {\n addUpdatePortal(name, themedChildren);\n }\n });\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n if (passThrough) return;\n handleOnMount();\n return function() {\n handleOnUnmount();\n };\n }, []);\n (0, import_react.useEffect)(function() {\n if (passThrough) return;\n handleOnUpdate();\n }, [\n children,\n themeName\n ]);\n return passThrough ? children : null;\n};\n//# sourceMappingURL=GorhomPortalItem.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,kCAAkC,CAAC;AACvC,SAAS,iCAAiC,EACxC,wBAAwB,iBAC1B,CAAC;AACD,OAAO,UAAU,aAAa,+BAA+B;AAC7D,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,sBAAsB,QAAQ,0BAAgB;AAClD,IAAI,mBAAmB,SAAS,OAAO;CACrC,IAAI,EAAE,MAAM,eAAe,WAAW,QAAQ,eAAe,wBAAwB,iBAAiB,0BAA0B,gBAA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;GAC3B,wBAAwB,WAAW;IACjC,OAAO,gBAAgB,MAAM,cAAc;GAC7C,CAAC;EACH,OAAO;GACL,gBAAgB,MAAM,cAAc;EACtC;CACF,CAAC;CACD,CAAC,GAAG,iBAAiB,0BAAyB,CAAE,WAAW;EACzD,IAAI,aAAa;EACjB,cAAc;EACd,OAAO,WAAW;GAChB,gBAAgB;EAClB;CACF,GAAG,CAAC,CAAC;CACL,CAAC,GAAG,aAAa,UAAS,CAAE,WAAW;EACrC,IAAI,aAAa;EACjB,eAAe;CACjB,GAAG,CACD,UACA,SACF,CAAC;CACD,OAAO,cAAc,WAAW;AAClC"}
1
+ {"version":3,"file":"GorhomPortalItem.native.js","names":[],"sources":["cjs/GorhomPortalItem.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar GorhomPortalItem_native_exports = {};\n__export(GorhomPortalItem_native_exports, {\n GorhomPortalItem: () => GorhomPortalItem\n});\nmodule.exports = __toCommonJS(GorhomPortalItem_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_native = require(\"@tamagui/native\");\nvar import_web = require(\"@tamagui/web\");\nvar import_react = require(\"react\");\nvar import_GorhomPortal = require(\"./GorhomPortal\");\nvar GorhomPortalItem = function GorhomPortalItem2(props) {\n var { name: _providedName, hostName = \"root\", handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;\n var portalState = (0, import_native.getPortal)().state;\n if (portalState.type === \"teleport\") {\n if (passThrough) {\n return children;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.NativePortal, {\n hostName,\n children\n });\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GorhomPortalItemFallback, {\n name: _providedName,\n hostName,\n handleOnMount: _providedHandleOnMount,\n handleOnUnmount: _providedHandleOnUnmount,\n handleOnUpdate: _providedHandleOnUpdate,\n passThrough,\n children\n });\n};\nvar GorhomPortalItemFallback = function GorhomPortalItemFallback2(props) {\n var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;\n var { addPortal: addUpdatePortal, removePortal } = (0, import_GorhomPortal.usePortal)(hostName);\n var id = (0, import_react.useId)();\n var name = _providedName || id;\n var themeName = (0, import_web.useThemeName)();\n var themedChildren = passThrough ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web.Theme, {\n name: themeName,\n children\n });\n var handleOnMount = (0, import_core.useEvent)(function() {\n if (_providedHandleOnMount) {\n _providedHandleOnMount(function() {\n return addUpdatePortal(name, themedChildren);\n });\n } else {\n addUpdatePortal(name, themedChildren);\n }\n });\n var handleOnUnmount = (0, import_core.useEvent)(function() {\n if (_providedHandleOnUnmount) {\n _providedHandleOnUnmount(function() {\n return removePortal(name);\n });\n } else {\n removePortal(name);\n }\n });\n var handleOnUpdate = (0, import_core.useEvent)(function() {\n if (_providedHandleOnUpdate) {\n _providedHandleOnUpdate(function() {\n return addUpdatePortal(name, themedChildren);\n });\n } else {\n addUpdatePortal(name, themedChildren);\n }\n });\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n if (passThrough) return;\n handleOnMount();\n return function() {\n handleOnUnmount();\n };\n }, []);\n (0, import_react.useEffect)(function() {\n if (passThrough) return;\n handleOnUpdate();\n }, [\n children,\n themeName\n ]);\n return passThrough ? children : null;\n};\n//# sourceMappingURL=GorhomPortalItem.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,kCAAkC,CAAC;AACvC,SAAS,iCAAiC,EACxC,wBAAwB,iBAC1B,CAAC;AACD,OAAO,UAAU,aAAa,+BAA+B;AAC7D,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,sBAAsB,QAAQ,0BAAgB;AAClD,IAAI,mBAAmB,SAAS,kBAAkB,OA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AI;EACnB;CACF,CAAC;CACD,IAAI,kBAAkB,GAAG,YAAY,SAAQ,CAAE,WAAW;EACxD,IAAI,yBAAyB;GAC3B,wBAAwB,WAAW;IACjC,OAAO,gBAAgB,MAAM,cAAc;GAC7C,CAAC;EACH,OAAO;GACL,gBAAgB,MAAM,cAAc;EACtC;CACF,CAAC;CACD,CAAC,GAAG,iBAAiB,0BAAyB,CAAE,WAAW;EACzD,IAAI,aAAa;EACjB,cAAc;EACd,OAAO,WAAW;GAChB,gBAAgB;EAClB;CACF,GAAG,CAAC,CAAC;CACL,CAAC,GAAG,aAAa,UAAS,CAAE,WAAW;EACrC,IAAI,aAAa;EACjB,eAAe;CACjB,GAAG,CACD,UACA,SACF,CAAC;CACD,OAAO,cAAc,WAAW;AAClC"}
@@ -30,7 +30,7 @@ var import_z_index_stack = require("@tamagui/z-index-stack");
30
30
  var import_GorhomPortalItem = require("./GorhomPortalItem.native.js");
31
31
  var import_helpers = require("./helpers.native.js");
32
32
  var MAX_INT32_Z_INDEX = 2147483647;
33
- var Portal = function(propsIn) {
33
+ var Portal = function Portal2(propsIn) {
34
34
  var stackedZIndex = (0, import_z_index_stack.useStackedZIndex)((0, import_helpers.getStackedZIndexProps)(propsIn));
35
35
  var zIndex = Math.min(stackedZIndex, MAX_INT32_Z_INDEX);
36
36
  var { children, passThrough } = propsIn;
@@ -30,7 +30,7 @@ var import_z_index_stack = require("@tamagui/z-index-stack");
30
30
  var import_GorhomPortalItem = require("./GorhomPortalItem.native.js");
31
31
  var import_helpers = require("./helpers.native.js");
32
32
  var MAX_INT32_Z_INDEX = 2147483647;
33
- var Portal = function(propsIn) {
33
+ var Portal = function Portal2(propsIn) {
34
34
  var stackedZIndex = (0, import_z_index_stack.useStackedZIndex)((0, import_helpers.getStackedZIndexProps)(propsIn));
35
35
  var zIndex = Math.min(stackedZIndex, MAX_INT32_Z_INDEX);
36
36
  var { children, passThrough } = propsIn;
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.native.js","names":[],"sources":["cjs/Portal.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Portal_native_exports = {};\n__export(Portal_native_exports, {\n Portal: () => Portal\n});\nmodule.exports = __toCommonJS(Portal_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_native = require(\"@tamagui/native\");\nvar import_z_index_stack = require(\"@tamagui/z-index-stack\");\nvar import_GorhomPortalItem = require(\"./GorhomPortalItem\");\nvar import_helpers = require(\"./helpers\");\nvar MAX_INT32_Z_INDEX = 2147483647;\nvar Portal = function(propsIn) {\n var stackedZIndex = (0, import_z_index_stack.useStackedZIndex)((0, import_helpers.getStackedZIndexProps)(propsIn));\n var zIndex = Math.min(stackedZIndex, MAX_INT32_Z_INDEX);\n var { children, passThrough } = propsIn;\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.View, {\n pointerEvents: \"box-none\",\n position: \"absolute\",\n inset: 0,\n maxWidth: \"100%\",\n zIndex,\n passThrough,\n children\n });\n var portalState = (0, import_native.getPortal)().state;\n if (portalState.type === \"teleport\") {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.NativePortal, {\n hostName: \"root\",\n children: contents\n });\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.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IAAI,SAAS,KAAK,IAAI,eAAe,iBAAiB;CACtD,IAAI,EAAE,UAAU,gBAAgB;CAChC,IAAI,WAA2B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,YAAY,MAAM;EAC3E,eAAe;EACf,UAAU;EACV,OAAO;EACP,UAAU;EACV;EACA;EACA;CACF,CAAC;CACD,IAAI,eAAe,GAAG,cAAc,UAAS,CAAE,CAAC,CAAC;CACjD,IAAI,YAAY,SAAS,YAAY;EACnC,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,cAAc,cAAc;GAC7E,UAAU;GACV,UAAU;EACZ,CAAC;CACH;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,wBAAwB,kBAAkB;EAC3F;EACA,UAAU;EACV,UAAU;CACZ,CAAC;AACH"}
1
+ {"version":3,"file":"Portal.native.js","names":[],"sources":["cjs/Portal.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Portal_native_exports = {};\n__export(Portal_native_exports, {\n Portal: () => Portal\n});\nmodule.exports = __toCommonJS(Portal_native_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_native = require(\"@tamagui/native\");\nvar import_z_index_stack = require(\"@tamagui/z-index-stack\");\nvar import_GorhomPortalItem = require(\"./GorhomPortalItem\");\nvar import_helpers = require(\"./helpers\");\nvar MAX_INT32_Z_INDEX = 2147483647;\nvar Portal = function Portal2(propsIn) {\n var stackedZIndex = (0, import_z_index_stack.useStackedZIndex)((0, import_helpers.getStackedZIndexProps)(propsIn));\n var zIndex = Math.min(stackedZIndex, MAX_INT32_Z_INDEX);\n var { children, passThrough } = propsIn;\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.View, {\n pointerEvents: \"box-none\",\n position: \"absolute\",\n inset: 0,\n maxWidth: \"100%\",\n zIndex,\n passThrough,\n children\n });\n var portalState = (0, import_native.getPortal)().state;\n if (portalState.type === \"teleport\") {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.NativePortal, {\n hostName: \"root\",\n children: contents\n });\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GorhomPortalItem.GorhomPortalItem, {\n passThrough,\n hostName: \"root\",\n children: contents\n });\n};\n//# sourceMappingURL=Portal.native.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,wBAAwB,CAAC;AAC7B,SAAS,uBAAuB,EAC9B,cAAc,OAChB,CAAC;AACD,OAAO,UAAU,aAAa,qBAAqB;AACnD,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,uBAAuB,QAAQ,wBAAwB;AAC3D,IAAI,0BAA0B,QAAQ,8BAAoB;AAC1D,IAAI,iBAAiB,QAAQ,qBAAW;AACxC,IAAI,oBAAoB;AACxB,IAAI,SAAS,SAAS,QAAQ,SAAS;CACrC,IAAI,iBAAiB,GAAG,qBAAqB,iBAAgB,EAAG,GAAG,eAAe,sBAAqB,CAAE,OAAO,CAAC;CACjH,IAAI,SAAS,KAAK,IAAI,eAAe,iBAAiB;CACtD,IAAI,EAAE,UAAU,gBAAgB;CAChC,IAAI,WAA2B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,YAAY,MAAM;EAC3E,eAAe;EACf,UAAU;EACV,OAAO;EACP,UAAU;EACV;EACA;EACA;CACF,CAAC;CACD,IAAI,eAAe,GAAG,cAAc,UAAS,CAAE,CAAC,CAAC;CACjD,IAAI,YAAY,SAAS,YAAY;EACnC,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,cAAc,cAAc;GAC7E,UAAU;GACV,UAAU;EACZ,CAAC;CACH;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,wBAAwB,kBAAkB;EAC3F;EACA,UAAU;EACV,UAAU;CACZ,CAAC;AACH"}
@@ -30,11 +30,11 @@ __export(constants_exports, {
30
30
  module.exports = __toCommonJS(constants_exports);
31
31
  var import_constants = require("@tamagui/constants");
32
32
  var import_native = require("@tamagui/native");
33
- var isTeleportEnabled = function() {
33
+ var isTeleportEnabled = function isTeleportEnabled2() {
34
34
  var state = (0, import_native.getPortal)().state;
35
35
  return state.enabled && state.type === "teleport";
36
36
  };
37
- var needsPortalRepropagation = function() {
37
+ var needsPortalRepropagation = function needsPortalRepropagation2() {
38
38
  if (import_constants.isWeb) return false;
39
39
  if (isTeleportEnabled()) return false;
40
40
  return import_constants.isAndroid || import_constants.isIos;
@@ -30,11 +30,11 @@ __export(constants_exports, {
30
30
  module.exports = __toCommonJS(constants_exports);
31
31
  var import_constants = require("@tamagui/constants");
32
32
  var import_native = require("@tamagui/native");
33
- var isTeleportEnabled = function() {
33
+ var isTeleportEnabled = function isTeleportEnabled2() {
34
34
  var state = (0, import_native.getPortal)().state;
35
35
  return state.enabled && state.type === "teleport";
36
36
  };
37
- var needsPortalRepropagation = function() {
37
+ var needsPortalRepropagation = function needsPortalRepropagation2() {
38
38
  if (import_constants.isWeb) return false;
39
39
  if (isTeleportEnabled()) return false;
40
40
  return import_constants.isAndroid || import_constants.isIos;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.native.js","names":[],"sources":["cjs/constants.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar constants_exports = {};\n__export(constants_exports, {\n allPortalHosts: () => allPortalHosts,\n isTeleportEnabled: () => isTeleportEnabled,\n needsPortalRepropagation: () => needsPortalRepropagation,\n portalListeners: () => portalListeners\n});\nmodule.exports = __toCommonJS(constants_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_native = require(\"@tamagui/native\");\nvar isTeleportEnabled = function() {\n var state = (0, import_native.getPortal)().state;\n return state.enabled && state.type === \"teleport\";\n};\nvar needsPortalRepropagation = function() {\n if (import_constants.isWeb) return false;\n if (isTeleportEnabled()) return false;\n return import_constants.isAndroid || import_constants.isIos;\n};\nvar allPortalHosts = /* @__PURE__ */ new Map();\nvar portalListeners = {};\n//# sourceMappingURL=constants.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oBAAoB,CAAC;AACzB,SAAS,mBAAmB;CAC1B,sBAAsB;CACtB,yBAAyB;CACzB,gCAAgC;CAChC,uBAAuB;AACzB,CAAC;AACD,OAAO,UAAU,aAAa,iBAAiB;AAC/C,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,oBAAoB,WAAW;CACjC,IAAI,SAAS,GAAG,cAAc,UAAS,CAAE,CAAC,CAAC;CAC3C,OAAO,MAAM,WAAW,MAAM,SAAS;AACzC;AACA,IAAI,2BAA2B,WAAW;CACxC,IAAI,iBAAiB,OAAO,OAAO;CACnC,IAAI,kBAAkB,GAAG,OAAO;CAChC,OAAO,iBAAiB,aAAa,iBAAiB;AACxD;AACA,IAAI,iCAAiC,IAAI,IAAI;AAC7C,IAAI,kBAAkB,CAAC"}
1
+ {"version":3,"file":"constants.native.js","names":[],"sources":["cjs/constants.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar constants_exports = {};\n__export(constants_exports, {\n allPortalHosts: () => allPortalHosts,\n isTeleportEnabled: () => isTeleportEnabled,\n needsPortalRepropagation: () => needsPortalRepropagation,\n portalListeners: () => portalListeners\n});\nmodule.exports = __toCommonJS(constants_exports);\nvar import_constants = require(\"@tamagui/constants\");\nvar import_native = require(\"@tamagui/native\");\nvar isTeleportEnabled = function isTeleportEnabled2() {\n var state = (0, import_native.getPortal)().state;\n return state.enabled && state.type === \"teleport\";\n};\nvar needsPortalRepropagation = function needsPortalRepropagation2() {\n if (import_constants.isWeb) return false;\n if (isTeleportEnabled()) return false;\n return import_constants.isAndroid || import_constants.isIos;\n};\nvar allPortalHosts = /* @__PUR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C,IAAI,IAAI;AAC7C,IAAI,kBAAkB,CAAC"}
@@ -27,12 +27,12 @@ __export(helpers_exports, {
27
27
  });
28
28
  module.exports = __toCommonJS(helpers_exports);
29
29
  var import_web = require("@tamagui/web");
30
- var getStackedZIndexProps = function(propsIn) {
30
+ var getStackedZIndexProps = function getStackedZIndexProps2(propsIn) {
31
31
  return {
32
32
  stackZIndex: propsIn.stackZIndex,
33
33
  zIndex: resolveViewZIndex(propsIn.zIndex)
34
34
  };
35
35
  };
36
- var resolveViewZIndex = function(zIndex) {
36
+ var resolveViewZIndex = function resolveViewZIndex2(zIndex) {
37
37
  return typeof zIndex === "undefined" ? void 0 : typeof zIndex === "number" ? zIndex : (0, import_web.getTokenValue)(zIndex, "zIndex");
38
38
  };
@@ -27,13 +27,13 @@ __export(helpers_exports, {
27
27
  });
28
28
  module.exports = __toCommonJS(helpers_exports);
29
29
  var import_web = require("@tamagui/web");
30
- var getStackedZIndexProps = function(propsIn) {
30
+ var getStackedZIndexProps = function getStackedZIndexProps2(propsIn) {
31
31
  return {
32
32
  stackZIndex: propsIn.stackZIndex,
33
33
  zIndex: resolveViewZIndex(propsIn.zIndex)
34
34
  };
35
35
  };
36
- var resolveViewZIndex = function(zIndex) {
36
+ var resolveViewZIndex = function resolveViewZIndex2(zIndex) {
37
37
  return typeof zIndex === "undefined" ? void 0 : typeof zIndex === "number" ? zIndex : (0, import_web.getTokenValue)(zIndex, "zIndex");
38
38
  };
39
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.native.js","names":[],"sources":["cjs/helpers.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar helpers_exports = {};\n__export(helpers_exports, {\n getStackedZIndexProps: () => getStackedZIndexProps,\n resolveViewZIndex: () => resolveViewZIndex\n});\nmodule.exports = __toCommonJS(helpers_exports);\nvar import_web = require(\"@tamagui/web\");\nvar getStackedZIndexProps = function(propsIn) {\n return {\n stackZIndex: propsIn.stackZIndex,\n zIndex: resolveViewZIndex(propsIn.zIndex)\n };\n};\nvar resolveViewZIndex = function(zIndex) {\n return typeof zIndex === \"undefined\" ? void 0 : typeof zIndex === \"number\" ? zIndex : (0, import_web.getTokenValue)(zIndex, \"zIndex\");\n};\n//# sourceMappingURL=helpers.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,kBAAkB,CAAC;AACvB,SAAS,iBAAiB;CACxB,6BAA6B;CAC7B,yBAAyB;AAC3B,CAAC;AACD,OAAO,UAAU,aAAa,eAAe;AAC7C,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,wBAAwB,SAAS,SAAS;CAC5C,OAAO;EACL,aAAa,QAAQ;EACrB,QAAQ,kBAAkB,QAAQ,MAAM;CAC1C;AACF;AACA,IAAI,oBAAoB,SAAS,QAAQ;CACvC,OAAO,OAAO,WAAW,cAAc,KAAK,IAAI,OAAO,WAAW,WAAW,UAAU,GAAG,WAAW,cAAa,CAAE,QAAQ,QAAQ;AACtI"}
1
+ {"version":3,"file":"helpers.native.js","names":[],"sources":["cjs/helpers.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar helpers_exports = {};\n__export(helpers_exports, {\n getStackedZIndexProps: () => getStackedZIndexProps,\n resolveViewZIndex: () => resolveViewZIndex\n});\nmodule.exports = __toCommonJS(helpers_exports);\nvar import_web = require(\"@tamagui/web\");\nvar getStackedZIndexProps = function getStackedZIndexProps2(propsIn) {\n return {\n stackZIndex: propsIn.stackZIndex,\n zIndex: resolveViewZIndex(propsIn.zIndex)\n };\n};\nvar resolveViewZIndex = function resolveViewZIndex2(zIndex) {\n return typeof zIndex === \"undefined\" ? void 0 : typeof zIndex === \"number\" ? zIndex : (0, import_web.getTokenValue)(zIndex, \"zIndex\");\n};\n//# sourceMappingURL=helpers.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,kBAAkB,CAAC;AACvB,SAAS,iBAAiB;CACxB,6BAA6B;CAC7B,yBAAyB;AAC3B,CAAC;AACD,OAAO,UAAU,aAAa,eAAe;AAC7C,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,wBAAwB,SAAS,uBAAuB,SAAS;CACnE,OAAO;EACL,aAAa,QAAQ;EACrB,QAAQ,kBAAkB,QAAQ,MAAM;CAC1C;AACF;AACA,IAAI,oBAAoB,SAAS,mBAAmB,QAAQ;CAC1D,OAAO,OAAO,WAAW,cAAc,KAAK,IAAI,OAAO,WAAW,WAAW,UAAU,GAAG,WAAW,cAAa,CAAE,QAAQ,QAAQ;AACtI"}
@@ -25,25 +25,25 @@ __export(native_portal_exports, { setupNativePortal: () => setupNativePortal });
25
25
  module.exports = __toCommonJS(native_portal_exports);
26
26
  var _global__IS_FABRIC;
27
27
  var IS_FABRIC = typeof global !== "undefined" && Boolean((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager);
28
- var setupNativePortal = function() {
28
+ var setupNativePortal = function setupNativePortal2() {
29
29
  var g = globalThis;
30
30
  if (g.__tamagui_portal_create) return;
31
31
  if (IS_FABRIC) {
32
32
  try {
33
+ var _ref;
33
34
  var _mod_default;
34
35
  var mod = require("react-native/Libraries/Renderer/shims/ReactFabric");
35
- var _mod_default_createPortal;
36
- g.__tamagui_portal_create = (_mod_default_createPortal = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _mod_default_createPortal !== void 0 ? _mod_default_createPortal : mod.createPortal;
36
+ g.__tamagui_portal_create = (_ref = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _ref !== void 0 ? _ref : mod.createPortal;
37
37
  } catch (err) {
38
38
  console.info(`Note: error importing fabric portal, native portals disabled`, err);
39
39
  }
40
40
  return;
41
41
  }
42
42
  try {
43
+ var _ref1;
43
44
  var _mod_default1;
44
45
  var mod1 = require("react-native/Libraries/Renderer/shims/ReactNative");
45
- var _mod_default_createPortal1;
46
- g.__tamagui_portal_create = (_mod_default_createPortal1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _mod_default_createPortal1 !== void 0 ? _mod_default_createPortal1 : mod1.createPortal;
46
+ g.__tamagui_portal_create = (_ref1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _ref1 !== void 0 ? _ref1 : mod1.createPortal;
47
47
  } catch (err) {
48
48
  console.info(`Note: error importing native portal, native portals disabled`, err);
49
49
  }
@@ -25,25 +25,25 @@ __export(native_portal_exports, { setupNativePortal: () => setupNativePortal });
25
25
  module.exports = __toCommonJS(native_portal_exports);
26
26
  var _global__IS_FABRIC;
27
27
  var IS_FABRIC = typeof global !== "undefined" && Boolean((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager);
28
- var setupNativePortal = function() {
28
+ var setupNativePortal = function setupNativePortal2() {
29
29
  var g = globalThis;
30
30
  if (g.__tamagui_portal_create) return;
31
31
  if (IS_FABRIC) {
32
32
  try {
33
+ var _ref;
33
34
  var _mod_default;
34
35
  var mod = require("react-native/Libraries/Renderer/shims/ReactFabric");
35
- var _mod_default_createPortal;
36
- g.__tamagui_portal_create = (_mod_default_createPortal = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _mod_default_createPortal !== void 0 ? _mod_default_createPortal : mod.createPortal;
36
+ g.__tamagui_portal_create = (_ref = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _ref !== void 0 ? _ref : mod.createPortal;
37
37
  } catch (err) {
38
38
  console.info(`Note: error importing fabric portal, native portals disabled`, err);
39
39
  }
40
40
  return;
41
41
  }
42
42
  try {
43
+ var _ref1;
43
44
  var _mod_default1;
44
45
  var mod1 = require("react-native/Libraries/Renderer/shims/ReactNative");
45
- var _mod_default_createPortal1;
46
- g.__tamagui_portal_create = (_mod_default_createPortal1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _mod_default_createPortal1 !== void 0 ? _mod_default_createPortal1 : mod1.createPortal;
46
+ g.__tamagui_portal_create = (_ref1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _ref1 !== void 0 ? _ref1 : mod1.createPortal;
47
47
  } catch (err) {
48
48
  console.info(`Note: error importing native portal, native portals disabled`, err);
49
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"native-portal.native.js","names":[],"sources":["cjs/native-portal.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar native_portal_exports = {};\n__export(native_portal_exports, {\n setupNativePortal: () => setupNativePortal\n});\nmodule.exports = __toCommonJS(native_portal_exports);\nvar _global__IS_FABRIC;\nvar IS_FABRIC = typeof global !== \"undefined\" && Boolean((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager);\nvar setupNativePortal = function() {\n var g = globalThis;\n if (g.__tamagui_portal_create) return;\n if (IS_FABRIC) {\n try {\n var _mod_default;\n var mod = require(\"react-native/Libraries/Renderer/shims/ReactFabric\");\n var _mod_default_createPortal;\n g.__tamagui_portal_create = (_mod_default_createPortal = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _mod_default_createPortal !== void 0 ? _mod_default_createPortal : mod.createPortal;\n } catch (err) {\n console.info(`Note: error importing fabric portal, native portals disabled`, err);\n }\n return;\n }\n try {\n var _mod_default1;\n var mod1 = require(\"react-native/Libraries/Renderer/shims/ReactNative\");\n var _mod_default_createPortal1;\n g.__tamagui_portal_create = (_mod_default_createPortal1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _mod_default_createPortal1 !== void 0 ? _mod_default_createPortal1 : mod1.createPortal;\n } catch (err) {\n console.info(`Note: error importing native portal, native portals disabled`, err);\n }\n};\n//# sourceMappingURL=native-portal.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,wBAAwB,CAAC;AAC7B,SAAS,uBAAuB,EAC9B,yBAAyB,kBAC3B,CAAC;AACD,OAAO,UAAU,aAAa,qBAAqB;AACnD,IAAI;AACJ,IAAI,YAAY,OAAO,WAAW,eAAe,SAAS,qBAAqB,OAAO,gBAAgB,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB,OAAO,qBAAqB;AAC/L,IAAI,oBAAoB,WAAW;CACjC,IAAI,IAAI;CACR,IAAI,EAAE,yBAAyB;CAC/B,IAAI,WAAW;EACb,IAAI;GACF,IAAI;GACJ,IAAI,MAAM,QAAQ,mDAAmD;GACrE,IAAI;GACJ,EAAE,2BAA2B,4BAA4B,QAAQ,QAAQ,QAAQ,KAAK,IAAI,KAAK,KAAK,eAAe,IAAI,aAAa,QAAQ,iBAAiB,KAAK,IAAI,KAAK,IAAI,aAAa,kBAAkB,QAAQ,8BAA8B,KAAK,IAAI,4BAA4B,IAAI;EAC/R,SAAS,KAAK;GACZ,QAAQ,KAAK,gEAAgE,GAAG;EAClF;EACA;CACF;CACA,IAAI;EACF,IAAI;EACJ,IAAI,OAAO,QAAQ,mDAAmD;EACtE,IAAI;EACJ,EAAE,2BAA2B,6BAA6B,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,KAAK,gBAAgB,KAAK,aAAa,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,cAAc,kBAAkB,QAAQ,+BAA+B,KAAK,IAAI,6BAA6B,KAAK;CACzS,SAAS,KAAK;EACZ,QAAQ,KAAK,gEAAgE,GAAG;CAClF;AACF"}
1
+ {"version":3,"file":"native-portal.native.js","names":[],"sources":["cjs/native-portal.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar native_portal_exports = {};\n__export(native_portal_exports, {\n setupNativePortal: () => setupNativePortal\n});\nmodule.exports = __toCommonJS(native_portal_exports);\nvar _global__IS_FABRIC;\nvar IS_FABRIC = typeof global !== \"undefined\" && Boolean((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager);\nvar setupNativePortal = function setupNativePortal2() {\n var g = globalThis;\n if (g.__tamagui_portal_create) return;\n if (IS_FABRIC) {\n try {\n var _ref;\n var _mod_default;\n var mod = require(\"react-native/Libraries/Renderer/shims/ReactFabric\");\n g.__tamagui_portal_create = (_ref = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _ref !== void 0 ? _ref : mod.createPortal;\n } catch (err) {\n console.info(`Note: error importing fabric portal, native portals disabled`, err);\n }\n return;\n }\n try {\n var _ref1;\n var _mod_default1;\n var mod1 = require(\"react-native/Libraries/Renderer/shims/ReactNative\");\n g.__tamagui_portal_create = (_ref1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _ref1 !== void 0 ? _ref1 : mod1.createPortal;\n } catch (err) {\n console.info(`Note: error importing native portal, native portals disabled`, err);\n }\n};\n//# sourceMappingURL=native-portal.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAA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AK,IAAI,KAAK,IAAI,cAAc,kBAAkB,QAAQ,UAAU,KAAK,IAAI,QAAQ,KAAK;CAC1O,SAAS,KAAK;EACZ,QAAQ,KAAK,gEAAgE,GAAG;CAClF;AACF"}
@@ -12,15 +12,15 @@ var ACTIONS = /* @__PURE__ */ (function(ACTIONS2) {
12
12
  return ACTIONS2;
13
13
  })(ACTIONS || {});
14
14
  var INITIAL_STATE = {};
15
- var registerHost = function(state, hostName) {
15
+ var registerHost = function registerHost2(state, hostName) {
16
16
  if (!(hostName in state)) state[hostName] = [];
17
17
  return state;
18
18
  };
19
- var deregisterHost = function(state, hostName) {
19
+ var deregisterHost = function deregisterHost2(state, hostName) {
20
20
  delete state[hostName];
21
21
  return state;
22
22
  };
23
- var addUpdatePortal = function(state, hostName, portalName, node) {
23
+ var addUpdatePortal = function addUpdatePortal2(state, hostName, portalName, node) {
24
24
  if (!(hostName in state)) state = registerHost(state, hostName);
25
25
  var index = state[hostName].findIndex(function(item) {
26
26
  return item.name === portalName;
@@ -32,7 +32,7 @@ var addUpdatePortal = function(state, hostName, portalName, node) {
32
32
  });
33
33
  return state;
34
34
  };
35
- var removePortal = function(state, hostName, portalName) {
35
+ var removePortal = function removePortal2(state, hostName, portalName) {
36
36
  if (!(hostName in state)) {
37
37
  if (process.env.NODE_ENV === "development") console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`);
38
38
  return state;
@@ -43,7 +43,7 @@ var removePortal = function(state, hostName, portalName) {
43
43
  if (index !== -1) state[hostName].splice(index, 1);
44
44
  return state;
45
45
  };
46
- var reducer = function(state, action) {
46
+ var reducer = function reducer2(state, action) {
47
47
  var { type } = action;
48
48
  switch (type) {
49
49
  case 0: return registerHost({ ...state }, action.hostName);
@@ -56,28 +56,28 @@ var reducer = function(state, action) {
56
56
  var PortalStateContext = /* @__PURE__ */ createContext(null);
57
57
  var PortalDispatchContext = /* @__PURE__ */ createContext(null);
58
58
  var PortalProviderActiveContext = /* @__PURE__ */ createContext(false);
59
- var usePortalState = function(hostName) {
59
+ var usePortalState = function usePortalState2(hostName) {
60
60
  var state = useContext(PortalStateContext);
61
61
  if (state === null) throw new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
62
62
  return state[hostName] || [];
63
63
  };
64
- var usePortal = function() {
64
+ var usePortal = function usePortal2() {
65
65
  var hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "root";
66
66
  var dispatch = useContext(PortalDispatchContext);
67
67
  if (dispatch === null) throw new Error("'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.");
68
- var registerHost2 = useCallback(function() {
68
+ var registerHost3 = useCallback(function() {
69
69
  dispatch({
70
70
  type: 0,
71
71
  hostName
72
72
  });
73
73
  }, []);
74
- var deregisterHost2 = useCallback(function() {
74
+ var deregisterHost3 = useCallback(function() {
75
75
  dispatch({
76
76
  type: 1,
77
77
  hostName
78
78
  });
79
79
  }, []);
80
- var addUpdatePortal2 = useCallback(function(name, node) {
80
+ var addUpdatePortal3 = useCallback(function(name, node) {
81
81
  dispatch({
82
82
  type: 2,
83
83
  hostName,
@@ -86,10 +86,10 @@ var usePortal = function() {
86
86
  });
87
87
  }, []);
88
88
  return {
89
- registerHost: registerHost2,
90
- deregisterHost: deregisterHost2,
91
- addPortal: addUpdatePortal2,
92
- updatePortal: addUpdatePortal2,
89
+ registerHost: registerHost3,
90
+ deregisterHost: deregisterHost3,
91
+ addPortal: addUpdatePortal3,
92
+ updatePortal: addUpdatePortal3,
93
93
  removePortal: useCallback(function(name) {
94
94
  dispatch({
95
95
  type: 3,
@@ -99,7 +99,7 @@ var usePortal = function() {
99
99
  }, [])
100
100
  };
101
101
  };
102
- var PortalProviderComponent = function(param) {
102
+ var PortalProvider = /* @__PURE__ */ memo(function PortalProviderComponent2(param) {
103
103
  var { rootHostName = "root", shouldAddRootHost = true, children } = param;
104
104
  var isAlreadyInProvider = useContext(PortalProviderActiveContext);
105
105
  if (process.env.NODE_ENV === "development") {
@@ -107,12 +107,11 @@ var PortalProviderComponent = function(param) {
107
107
  }
108
108
  var [state, dispatch] = useReducer(reducer, INITIAL_STATE);
109
109
  var transitionDispatch = useMemo(function() {
110
- var next = function(value) {
110
+ return function next2(value) {
111
111
  startTransition(function() {
112
112
  dispatch(value);
113
113
  });
114
114
  };
115
- return next;
116
115
  }, [dispatch]);
117
116
  var portalState = getPortal().state;
118
117
  var content = /* @__PURE__ */ jsx(PortalProviderActiveContext.Provider, {
@@ -127,10 +126,9 @@ var PortalProviderComponent = function(param) {
127
126
  });
128
127
  if (portalState.type === "teleport") return /* @__PURE__ */ jsx(NativePortalProvider, { children: content });
129
128
  return content;
130
- };
131
- var PortalProvider = /* @__PURE__ */ memo(PortalProviderComponent);
129
+ });
132
130
  PortalProvider.displayName = "PortalProvider";
133
- var defaultRenderer = function(children) {
131
+ var defaultRenderer = function defaultRenderer2(children) {
134
132
  return /* @__PURE__ */ jsx(Fragment, { children });
135
133
  };
136
134
  var PortalHost = /* @__PURE__ */ memo(function PortalHost2(props) {
@@ -140,11 +138,11 @@ var PortalHost = /* @__PURE__ */ memo(function PortalHost2(props) {
140
138
  function PortalHostNonNative(props) {
141
139
  var { name, forwardProps, render = defaultRenderer } = props;
142
140
  var state = usePortalState(name);
143
- var { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
141
+ var { registerHost: registerHost3, deregisterHost: deregisterHost3 } = usePortal(props.name);
144
142
  useIsomorphicLayoutEffect(function() {
145
- registerHost2();
143
+ registerHost3();
146
144
  return function() {
147
- deregisterHost2();
145
+ deregisterHost3();
148
146
  };
149
147
  }, []);
150
148
  if (forwardProps) return render(state.map(function(item) {
@@ -1 +1 @@
1
- {"version":3,"file":"GorhomPortal.native.js","names":[],"sources":["esm/GorhomPortal.native.js"],"sourcesContent":["import { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { NativePortalHost, NativePortalProvider, getPortal } from \"@tamagui/native\";\nimport { startTransition } from \"@tamagui/start-transition\";\nimport React, { createContext, memo, useCallback, useContext, useMemo, useReducer } from \"react\";\n\nvar ACTIONS = /* @__PURE__ */ (function(ACTIONS2) {\n\tACTIONS2[ACTIONS2[\"REGISTER_HOST\"] = 0] = \"REGISTER_HOST\";\n\tACTIONS2[ACTIONS2[\"DEREGISTER_HOST\"] = 1] = \"DEREGISTER_HOST\";\n\tACTIONS2[ACTIONS2[\"ADD_UPDATE_PORTAL\"] = 2] = \"ADD_UPDATE_PORTAL\";\n\tACTIONS2[ACTIONS2[\"REMOVE_PORTAL\"] = 3] = \"REMOVE_PORTAL\";\n\treturn ACTIONS2;\n})(ACTIONS || {});\nvar INITIAL_STATE = {};\nvar registerHost = function(state, hostName) {\n\tif (!(hostName in state)) state[hostName] = [];\n\treturn state;\n};\nvar deregisterHost = function(state, hostName) {\n\tdelete state[hostName];\n\treturn state;\n};\nvar addUpdatePortal = function(state, hostName, portalName, node) {\n\tif (!(hostName in state)) state = registerHost(state, hostName);\n\tvar index = state[hostName].findIndex(function(item) {\n\t\treturn item.name === portalName;\n\t});\n\tif (index !== -1) state[hostName][index].node = node;\n\telse state[hostName].push({\n\t\tname: portalName,\n\t\tnode\n\t});\n\treturn state;\n};\nvar removePortal = function(state, hostName, portalName) {\n\tif (!(hostName in state)) {\n\t\tif (process.env.NODE_ENV === \"development\") console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`);\n\t\treturn state;\n\t}\n\tvar index = state[hostName].findIndex(function(item) {\n\t\treturn item.name === portalName;\n\t});\n\tif (index !== -1) state[hostName].splice(index, 1);\n\treturn state;\n};\nvar reducer = function(state, action) {\n\tvar { type } = action;\n\tswitch (type) {\n\t\tcase 0: return registerHost({ ...state }, action.hostName);\n\t\tcase 1: return deregisterHost({ ...state }, action.hostName);\n\t\tcase 2: return addUpdatePortal({ ...state }, action.hostName, action.portalName, action.node);\n\t\tcase 3: return removePortal({ ...state }, action.hostName, action.portalName);\n\t\tdefault: return state;\n\t}\n};\nvar PortalStateContext = /* @__PURE__ */ createContext(null);\nvar PortalDispatchContext = /* @__PURE__ */ createContext(null);\nvar PortalProviderActiveContext = /* @__PURE__ */ createContext(false);\nvar usePortalState = function(hostName) {\n\tvar state = useContext(PortalStateContext);\n\tif (state === null) throw new Error(\"'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.\");\n\treturn state[hostName] || [];\n};\nvar usePortal = function() {\n\tvar hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"root\";\n\tvar dispatch = useContext(PortalDispatchContext);\n\tif (dispatch === null) throw new Error(\"'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.\");\n\tvar registerHost2 = useCallback(function() {\n\t\tdispatch({\n\t\t\ttype: 0,\n\t\t\thostName\n\t\t});\n\t}, []);\n\tvar deregisterHost2 = useCallback(function() {\n\t\tdispatch({\n\t\t\ttype: 1,\n\t\t\thostName\n\t\t});\n\t}, []);\n\tvar addUpdatePortal2 = useCallback(function(name, node) {\n\t\tdispatch({\n\t\t\ttype: 2,\n\t\t\thostName,\n\t\t\tportalName: name,\n\t\t\tnode\n\t\t});\n\t}, []);\n\treturn {\n\t\tregisterHost: registerHost2,\n\t\tderegisterHost: deregisterHost2,\n\t\taddPortal: addUpdatePortal2,\n\t\tupdatePortal: addUpdatePortal2,\n\t\tremovePortal: useCallback(function(name) {\n\t\t\tdispatch({\n\t\t\t\ttype: 3,\n\t\t\t\thostName,\n\t\t\t\tportalName: name\n\t\t\t});\n\t\t}, [])\n\t};\n};\nvar PortalProviderComponent = function(param) {\n\tvar { rootHostName = \"root\", shouldAddRootHost = true, children } = param;\n\tvar isAlreadyInProvider = useContext(PortalProviderActiveContext);\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (isAlreadyInProvider && shouldAddRootHost) console.warn(`[tamagui] Nested PortalProvider with shouldAddRootHost detected. This causes hydration mismatches. TamaguiProvider from 'tamagui' already includes PortalProvider - remove the explicit PortalProvider wrapper or set shouldAddRootHost={false}.`);\n\t}\n\tvar [state, dispatch] = useReducer(reducer, INITIAL_STATE);\n\tvar transitionDispatch = useMemo(function() {\n\t\tvar next = function(value) {\n\t\t\tstartTransition(function() {\n\t\t\t\tdispatch(value);\n\t\t\t});\n\t\t};\n\t\treturn next;\n\t}, [dispatch]);\n\tvar portalState = getPortal().state;\n\tvar content = /* @__PURE__ */ jsx(PortalProviderActiveContext.Provider, {\n\t\tvalue: true,\n\t\tchildren: /* @__PURE__ */ jsx(PortalDispatchContext.Provider, {\n\t\t\tvalue: transitionDispatch,\n\t\t\tchildren: /* @__PURE__ */ jsxs(PortalStateContext.Provider, {\n\t\t\t\tvalue: state,\n\t\t\t\tchildren: [children, shouldAddRootHost && /* @__PURE__ */ jsx(PortalHost, { name: rootHostName })]\n\t\t\t})\n\t\t})\n\t});\n\tif (portalState.type === \"teleport\") return /* @__PURE__ */ jsx(NativePortalProvider, { children: content });\n\treturn content;\n};\nvar PortalProvider = /* @__PURE__ */ memo(PortalProviderComponent);\nPortalProvider.displayName = \"PortalProvider\";\nvar defaultRenderer = function(children) {\n\treturn /* @__PURE__ */ jsx(Fragment, { children });\n};\nvar PortalHost = /* @__PURE__ */ memo(function PortalHost2(props) {\n\tif (getPortal().state.type === \"teleport\") return /* @__PURE__ */ jsx(NativePortalHost, { name: props.name });\n\treturn /* @__PURE__ */ jsx(PortalHostNonNative, { ...props });\n});\nfunction PortalHostNonNative(props) {\n\tvar { name, forwardProps, render = defaultRenderer } = props;\n\tvar state = usePortalState(name);\n\tvar { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);\n\tuseIsomorphicLayoutEffect(function() {\n\t\tregisterHost2();\n\t\treturn function() {\n\t\t\tderegisterHost2();\n\t\t};\n\t}, []);\n\tif (forwardProps) return render(state.map(function(item) {\n\t\tvar next = item.node;\n\t\tvar { children, ...restForwardProps } = forwardProps;\n\t\tif (forwardProps) return React.Children.map(next, function(child) {\n\t\t\treturn /* @__PURE__ */ React.isValidElement(child) ? /* @__PURE__ */ React.cloneElement(child, {\n\t\t\t\tkey: child.key,\n\t\t\t\t...restForwardProps\n\t\t\t}) : child;\n\t\t});\n\t\treturn next;\n\t}));\n\treturn render(state.map(function(item) {\n\t\treturn /* @__PURE__ */ jsx(React.Fragment, { children: item.node }, item.name);\n\t}));\n}\n\nexport { ACTIONS, INITIAL_STATE, PortalHost, PortalProvider, usePortal };"],"mappings":";;;;;;;AAMA,IAAI,UAA0B,iBAAC,SAAS,UAAU;CACjD,SAAS,SAAS,mBAAmB,KAAK;CAC1C,SAAS,SAAS,qBAAqB,KAAK;CAC5C,SAAS,SAAS,uBAAuB,KAAK;CAC9C,SAAS,SAAS,mBAAmB,KAAK;CAC1C,OAAO;AACR,EAAC,CAAE,WAAW,CAAC,CAAC;AAChB,IAAI,gBAAgB,CAAC;AACrB,IAAI,eAAe,SAAS,OAAO,UAAU;CAC5C,IAAI,EAAE,YAAY,QAAQ,MAAM,YAAY,CAAC;CAC7C,OAAO;AACR;AACA,IAAI,iBAAiB,SAAS,OAAO,UAAU;CAC9C,OAAO,MAAM;CACb,OAAO;AACR;AACA,IAAI,kBAAkB,SAAS,OAAO,UAAU,YAAY,MAAM;CACjE,IAAI,EAAE,YAAY,QAAQ,QAAQ,aAAa,OAAO,QAAQ;CAC9D,IAAI,QAAQ,MAAM,SAAS,CAAC,UAAU,SAAS,MAAM;EACpD,OAAO,KAAK,SAAS;CACtB,CAAC;CACD,IAAI,UAAU,CAAC,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,OAAO;MAC3C,MAAM,SAAS,CAAC,KAAK;EACzB,MAAM;EACN;CACD,CAAC;CACD,OAAO;AACR;AACA,IAAI,eAAe,SAAS,OAAO,UAAU,YAAY;CACxD,IAAI,EAAE,YAAY,QAAQ;EACzB,IAAI,QAAQ,IAAI,aAAa,eAAe,QAAQ,KAAK,4BAA4B,WAAW,MAAM,SAAS,sBAAsB;EACrI,OAAO;CACR;CACA,IAAI,QAAQ,MAAM,SAAS,CAAC,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,IAAI,UAAU,CAAC,CAAC,MAAM,SAAS,YAAY,OAAuB,oBAAI,kBAAkB,EAAE,MAAM,MAAM,KAAK,CAAC;CAC5G,OAAuB,oBAAI,qBAAqB,EAAE,GAAG,MAAM,CAAC;AAC7D,CAAC;AACD,SAAS,oBAAoB,OAAO;CACnC,IAAI,EAAE,MAAM,cAAc,SAAS,oBAAoB;CACvD,IAAI,QAAQ,eAAe,IAAI;CAC/B,IAAI,EAAE,cAAc,eAAe,gBAAgB,oBAAoB,UAAU,MAAM,IAAI;CAC3F,0BAA0B,WAAW;EACpC,cAAc;EACd,OAAO,WAAW;GACjB,gBAAgB;EACjB;CACD,GAAG,CAAC,CAAC;CACL,IAAI,cAAc,OAAO,OAAO,MAAM,IAAI,SAAS,MAAM;EACxD,IAAI,OAAO,KAAK;EAChB,IAAI,EAAE,UAAU,GAAG,qBAAqB;EACxC,IAAI,cAAc,OAAO,MAAM,SAAS,IAAI,MAAM,SAAS,OAAO;GACjE,OAAuB,sBAAM,eAAe,KAAK,IAAoB,sBAAM,aAAa,OAAO;IAC9F,KAAK,MAAM;IACX,GAAG;GACJ,CAAC,IAAI;EACN,CAAC;EACD,OAAO;CACR,CAAC,CAAC;CACF,OAAO,OAAO,MAAM,IAAI,SAAS,MAAM;EACtC,OAAuB,oBAAI,MAAM,UAAU,EAAE,UAAU,KAAK,KAAK,GAAG,KAAK,IAAI;CAC9E,CAAC,CAAC;AACH"}
1
+ {"version":3,"file":"GorhomPortal.native.js","names":[],"sources":["esm/GorhomPortal.native.js"],"sourcesContent":["import { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { NativePortalHost, NativePortalProvider, getPortal } from \"@tamagui/native\";\nimport { startTransition } from \"@tamagui/start-transition\";\nimport React, { createContext, memo, useCallback, useContext, useMemo, useReducer } from \"react\";\n\nvar ACTIONS = /* @__PURE__ */ (function(ACTIONS2) {\n\tACTIONS2[ACTIONS2[\"REGISTER_HOST\"] = 0] = \"REGISTER_HOST\";\n\tACTIONS2[ACTIONS2[\"DEREGISTER_HOST\"] = 1] = \"DEREGISTER_HOST\";\n\tACTIONS2[ACTIONS2[\"ADD_UPDATE_PORTAL\"] = 2] = \"ADD_UPDATE_PORTAL\";\n\tACTIONS2[ACTIONS2[\"REMOVE_PORTAL\"] = 3] = \"REMOVE_PORTAL\";\n\treturn ACTIONS2;\n})(ACTIONS || {});\nvar INITIAL_STATE = {};\nvar registerHost = function registerHost2(state, hostName) {\n\tif (!(hostName in state)) state[hostName] = [];\n\treturn state;\n};\nvar deregisterHost = function deregisterHost2(state, hostName) {\n\tdelete state[hostName];\n\treturn state;\n};\nvar addUpdatePortal = function addUpdatePortal2(state, hostName, portalName, node) {\n\tif (!(hostName in state)) state = registerHost(state, hostName);\n\tvar index = state[hostName].findIndex(function(item) {\n\t\treturn item.name === portalName;\n\t});\n\tif (index !== -1) state[hostName][index].node = node;\n\telse state[hostName].push({\n\t\tname: portalName,\n\t\tnode\n\t});\n\treturn state;\n};\nvar removePortal = function removePortal2(state, hostName, portalName) {\n\tif (!(hostName in state)) {\n\t\tif (process.env.NODE_ENV === \"development\") console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`);\n\t\treturn state;\n\t}\n\tvar index = state[hostName].findIndex(function(item) {\n\t\treturn item.name === portalName;\n\t});\n\tif (index !== -1) state[hostName].splice(index, 1);\n\treturn state;\n};\nvar reducer = function reducer2(state, action) {\n\tvar { type } = action;\n\tswitch (type) {\n\t\tcase 0: return registerHost({ ...state }, action.hostName);\n\t\tcase 1: return deregisterHost({ ...state }, action.hostName);\n\t\tcase 2: return addUpdatePortal({ ...state }, action.hostName, action.portalName, action.node);\n\t\tcase 3: return removePortal({ ...state }, action.hostName, action.portalName);\n\t\tdefault: return state;\n\t}\n};\nvar PortalStateContext = /* @__PURE__ */ createContext(null);\nvar PortalDispatchContext = /* @__PURE__ */ createContext(null);\nvar PortalProviderActiveContext = /* @__PURE__ */ createContext(false);\nvar usePortalState = function usePortalState2(hostName) {\n\tvar state = useContext(PortalStateContext);\n\tif (state === null) throw new Error(\"'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.\");\n\treturn state[hostName] || [];\n};\nvar usePortal = function usePortal2() {\n\tvar hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"root\";\n\tvar dispatch = useContext(PortalDispatchContext);\n\tif (dispatch === null) throw new Error(\"'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.\");\n\tvar registerHost3 = useCallback(function() {\n\t\tdispatch({\n\t\t\ttype: 0,\n\t\t\thostName\n\t\t});\n\t}, []);\n\tvar deregisterHost3 = useCallback(function() {\n\t\tdispatch({\n\t\t\ttype: 1,\n\t\t\thostName\n\t\t});\n\t}, []);\n\tvar addUpdatePortal3 = useCallback(function(name, node) {\n\t\tdispatch({\n\t\t\ttype: 2,\n\t\t\thostName,\n\t\t\tportalName: name,\n\t\t\tnode\n\t\t});\n\t}, []);\n\treturn {\n\t\tregisterHost: registerHost3,\n\t\tderegisterHost: deregisterHost3,\n\t\taddPortal: addUpdatePortal3,\n\t\tupdatePortal: addUpdatePortal3,\n\t\tremovePortal: useCallback(function(name) {\n\t\t\tdispatch({\n\t\t\t\ttype: 3,\n\t\t\t\thostName,\n\t\t\t\tportalName: name\n\t\t\t});\n\t\t}, [])\n\t};\n};\nvar PortalProvider = /* @__PURE__ */ memo(function PortalProviderComponent2(param) {\n\tvar { rootHostName = \"root\", shouldAddRootHost = true, children } = param;\n\tvar isAlreadyInProvider = useContext(PortalProviderActiveContext);\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (isAlreadyInProvider && shouldAddRootHost) console.warn(`[tamagui] Nested PortalProvider with shouldAddRootHost detected. This causes hydration mismatches. TamaguiProvider from 'tamagui' already includes PortalProvider - remove the explicit PortalProvider wrapper or set shouldAddRootHost={false}.`);\n\t}\n\tvar [state, dispatch] = useReducer(reducer, INITIAL_STATE);\n\tvar transitionDispatch = useMemo(function() {\n\t\treturn function next2(value) {\n\t\t\tstartTransition(function() {\n\t\t\t\tdispatch(value);\n\t\t\t});\n\t\t};\n\t}, [dispatch]);\n\tvar portalState = getPortal().state;\n\tvar content = /* @__PURE__ */ jsx(PortalProviderActiveContext.Provider, {\n\t\tvalue: true,\n\t\tchildren: /* @__PURE__ */ jsx(PortalDispatchContext.Provider, {\n\t\t\tvalue: transitionDispatch,\n\t\t\tchildren: /* @__PURE__ */ jsxs(PortalStateContext.Provider, {\n\t\t\t\tvalue: state,\n\t\t\t\tchildren: [children, shouldAddRootHost && /* @__PURE__ */ jsx(PortalHost, { name: rootHostName })]\n\t\t\t})\n\t\t})\n\t});\n\tif (portalState.type === \"teleport\") return /* @__PURE__ */ jsx(NativePortalProvider, { children: content });\n\treturn content;\n});\nPortalProvider.displayName = \"PortalProvider\";\nvar defaultRenderer = function defaultRenderer2(children) {\n\treturn /* @__PURE__ */ jsx(Fragment, { children });\n};\nvar PortalHost = /* @__PURE__ */ memo(function PortalHost2(props) {\n\tif (getPortal().state.type === \"teleport\") return /* @__PURE__ */ jsx(NativePortalHost, { name: props.name });\n\treturn /* @__PURE__ */ jsx(PortalHostNonNative, { ...props });\n});\nfunction PortalHostNonNative(props) {\n\tvar { name, forwardProps, render = defaultRenderer } = props;\n\tvar state = usePortalState(name);\n\tvar { registerHost: registerHost3, deregisterHost: deregisterHost3 } = usePortal(props.name);\n\tuseIsomorphicLayoutEffect(function() {\n\t\tregisterHost3();\n\t\treturn function() {\n\t\t\tderegisterHost3();\n\t\t};\n\t}, []);\n\tif (forwardProps) return render(state.map(function(item) {\n\t\tvar next = item.node;\n\t\tvar { children, ...restForwardProps } = forwardProps;\n\t\tif (forwardProps) return React.Children.map(next, function(child) {\n\t\t\treturn /* @__PURE__ */ React.isValidElement(child) ? /* @__PURE__ */ React.cloneElement(child, {\n\t\t\t\tkey: child.key,\n\t\t\t\t...restForwardProps\n\t\t\t}) : child;\n\t\t});\n\t\treturn next;\n\t}));\n\treturn render(state.map(function(item) {\n\t\treturn /* @__PURE__ */ jsx(React.Fragment, { children: item.node }, item.name);\n\t}));\n}\n\nexport { ACTIONS, INITIAL_STATE, PortalHost, PortalProvider, usePortal };"],"mappings":";;;;;;;AAMA,IAAI,UAA0B,iBAAC,SAAS,UAAU;CACjD,SAAS,SAAS,mBAAmB,KAAK;CAC1C,SAAS,SAAS,qBAAqB,KAAK;CAC5C,SAAS,SAAS,uBAAuB,KAAK;CAC9C,SAAS,SAAS,mBAAmB,KAAK;CAC1C,OAAO;AACR,EAAC,CAAE,WAAW,CAAC,CAAC;AAChB,IAAI,gBAAgB,CAAC;AACrB,IAAI,eAAe,SAAS,cAAc,OAAO,UAAU;CAC1D,IAAI,EAAE,YAAY,QAAQ,MAAM,YAAY,CAAC;CAC7C,OAAO;AACR;AACA,IAAI,iBAAiB,SAAS,gBAAgB,OAAO,UAAU;CAC9D,OAAO,MAAM;CACb,OAAO;AACR;AACA,IAAI,kBAAkB,SAAS,iBAAiB,OAAO,UAAU,YAAY,MAAM;CAClF,IAAI,EAAE,YAAY,QAAQ,QAAQ,aAAa,OAAO,QAAQ;CAC9D,IAAI,QAAQ,MAAM,SAAS,CAAC,UAAU,SAAS,MAAM;EACpD,OAAO,KAAK,SAAS;CACtB,CAAC;CACD,IAAI,UAAU,CAAC,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,OAAO;MAC3C,MAAM,SAAS,CAAC,KAAK;EACzB,MAAM;EACN;CACD,CAAC;CACD,OAAO;AACR;AACA,IAAI,eAAe,SAAS,cAAc,OAAO,UAAU,YAAY;CACtE,IAAI,EAAE,YAAY,QAAQ;EACzB,IAAI,QAAQ,IAAI,aAAa,eAAe,QAAQ,KAAK,4BAA4B,WAAW,MAAM,SAAS,sBAAsB;EACrI,OAAO;CACR;CACA,IAAI,QAAQ,MAAM,SAAS,CAAC,UAAU,SAAS,MAAM;EACpD,OAAO,KAAK,SAAS;CACtB,CAAC;CACD,IAAI,UAAU,CAAC,GAAG,MAA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KAAK,CAAC;CAC5G,OAAuB,oBAAI,qBAAqB,EAAE,GAAG,MAAM,CAAC;AAC7D,CAAC;AACD,SAAS,oBAAoB,OAAO;CACnC,IAAI,EAAE,MAAM,cAAc,SAAS,oBAAoB;CACvD,IAAI,QAAQ,eAAe,IAAI;CAC/B,IAAI,EAAE,cAAc,eAAe,gBAAgB,oBAAoB,UAAU,MAAM,IAAI;CAC3F,0BAA0B,WAAW;EACpC,cAAc;EACd,OAAO,WAAW;GACjB,gBAAgB;EACjB;CACD,GAAG,CAAC,CAAC;CACL,IAAI,cAAc,OAAO,OAAO,MAAM,IAAI,SAAS,MAAM;EACxD,IAAI,OAAO,KAAK;EAChB,IAAI,EAAE,UAAU,GAAG,qBAAqB;EACxC,IAAI,cAAc,OAAO,MAAM,SAAS,IAAI,MAAM,SAAS,OAAO;GACjE,OAAuB,sBAAM,eAAe,KAAK,IAAoB,sBAAM,aAAa,OAAO;IAC9F,KAAK,MAAM;IACX,GAAG;GACJ,CAAC,IAAI;EACN,CAAC;EACD,OAAO;CACR,CAAC,CAAC;CACF,OAAO,OAAO,MAAM,IAAI,SAAS,MAAM;EACtC,OAAuB,oBAAI,MAAM,UAAU,EAAE,UAAU,KAAK,KAAK,GAAG,KAAK,IAAI;CAC9E,CAAC,CAAC;AACH"}
@@ -6,7 +6,7 @@ import { Theme, useThemeName } from "@tamagui/web";
6
6
  import { useEffect, useId } from "react";
7
7
  import { usePortal } from "./GorhomPortal.native.js";
8
8
 
9
- var GorhomPortalItem = function(props) {
9
+ var GorhomPortalItem = function GorhomPortalItem2(props) {
10
10
  var { name: _providedName, hostName = "root", handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;
11
11
  var portalState = getPortal().state;
12
12
  if (portalState.type === "teleport") {
@@ -28,7 +28,7 @@ var GorhomPortalItem = function(props) {
28
28
  children
29
29
  });
30
30
  };
31
- var GorhomPortalItemFallback = function(props) {
31
+ var GorhomPortalItemFallback = function GorhomPortalItemFallback2(props) {
32
32
  var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;
33
33
  var { addPortal: addUpdatePortal, removePortal } = usePortal(hostName);
34
34
  var id = useId();
@@ -1 +1 @@
1
- {"version":3,"file":"GorhomPortalItem.native.js","names":[],"sources":["esm/GorhomPortalItem.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { useEvent } from \"@tamagui/core\";\nimport { getPortal, NativePortal } from \"@tamagui/native\";\nimport { Theme, useThemeName } from \"@tamagui/web\";\nimport { useEffect, useId } from \"react\";\nimport { usePortal } from \"./GorhomPortal\";\nvar GorhomPortalItem = function(props) {\n var { name: _providedName, hostName = \"root\", handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;\n var portalState = getPortal().state;\n if (portalState.type === \"teleport\") {\n if (passThrough) {\n return children;\n }\n return /* @__PURE__ */ _jsx(NativePortal, {\n hostName,\n children\n });\n }\n return /* @__PURE__ */ _jsx(GorhomPortalItemFallback, {\n name: _providedName,\n hostName,\n handleOnMount: _providedHandleOnMount,\n handleOnUnmount: _providedHandleOnUnmount,\n handleOnUpdate: _providedHandleOnUpdate,\n passThrough,\n children\n });\n};\nvar GorhomPortalItemFallback = function(props) {\n var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;\n var { addPortal: addUpdatePortal, removePortal } = usePortal(hostName);\n var id = useId();\n var name = _providedName || id;\n var themeName = useThemeName();\n var themedChildren = passThrough ? children : /* @__PURE__ */ _jsx(Theme, {\n name: themeName,\n children\n });\n var handleOnMount = useEvent(function() {\n if (_providedHandleOnMount) {\n _providedHandleOnMount(function() {\n return addUpdatePortal(name, themedChildren);\n });\n } else {\n addUpdatePortal(name, themedChildren);\n }\n });\n var handleOnUnmount = useEvent(function() {\n if (_providedHandleOnUnmount) {\n _providedHandleOnUnmount(function() {\n return removePortal(name);\n });\n } else {\n removePortal(name);\n }\n });\n var handleOnUpdate = useEvent(function() {\n if (_providedHandleOnUpdate) {\n _providedHandleOnUpdate(function() {\n return addUpdatePortal(name, themedChildren);\n });\n } else {\n addUpdatePortal(name, themedChildren);\n }\n });\n useIsomorphicLayoutEffect(function() {\n if (passThrough) return;\n handleOnMount();\n return function() {\n handleOnUnmount();\n };\n }, []);\n useEffect(function() {\n if (passThrough) return;\n handleOnUpdate();\n }, [\n children,\n themeName\n ]);\n return passThrough ? children : null;\n};\nexport {\n GorhomPortalItem\n};\n//# sourceMappingURL=GorhomPortalItem.native.js.map\n"],"mappings":";;;;;;;;;AAOA,IAAI,mBAAmB,SAAS,OAAO;CACrC,IAAI,EAAE,MAAM,eAAe,WAAW,QAAQ,eAAe,wBAAwB,iBAAiB,0BAA0B,gBAAgB,yBAAyB,UAAU,gBAAgB;CACnM,IAAI,cAAc,UAAU,CAAC,CAAC;CAC9B,IAAI,YAAY,SAAS,YAAY;EACnC,IAAI,aAAa;GACf,OAAO;EACT;EACA,OAAuB,oBAAK,cAAc;GACxC;GACA;EACF,CAAC;CACH;CACA,OAAuB,oBAAK,0BAA0B;EACpD,MAAM;EACN;EACA,eAAe;EACf,iBAAiB;EACjB,gBAAgB;EAChB;EACA;CACF,CAAC;AACH;AACA,IAAI,2BAA2B,SAAS,OAAO;CAC7C,IAAI,EAAE,MAAM,eAAe,UAAU,eAAe,wBAAwB,iBAAiB,0BAA0B,gBAAgB,yBAAyB,UAAU,gBAAgB;CAC1L,IAAI,EAAE,WAAW,iBAAiB,iBAAiB,UAAU,QAAQ;CACrE,IAAI,KAAK,MAAM;CACf,IAAI,OAAO,iBAAiB;CAC5B,IAAI,YAAY,aAAa;CAC7B,IAAI,iBAAiB,cAAc,WAA2B,oBAAK,OAAO;EACxE,MAAM;EACN;CACF,CAAC;CACD,IAAI,gBAAgB,SAAS,WAAW;EACtC,IAAI,wBAAwB;GAC1B,uBAAuB,WAAW;IAChC,OAAO,gBAAgB,MAAM,cAAc;GAC7C,CAAC;EACH,OAAO;GACL,gBAAgB,MAAM,cAAc;EACtC;CACF,CAAC;CACD,IAAI,kBAAkB,SAAS,WAAW;EACxC,IAAI,0BAA0B;GAC5B,yBAAyB,WAAW;IAClC,OAAO,aAAa,IAAI;GAC1B,CAAC;EACH,OAAO;GACL,aAAa,IAAI;EACnB;CACF,CAAC;CACD,IAAI,iBAAiB,SAAS,WAAW;EACvC,IAAI,yBAAyB;GAC3B,wBAAwB,WAAW;IACjC,OAAO,gBAAgB,MAAM,cAAc;GAC7C,CAAC;EACH,OAAO;GACL,gBAAgB,MAAM,cAAc;EACtC;CACF,CAAC;CACD,0BAA0B,WAAW;EACnC,IAAI,aAAa;EACjB,cAAc;EACd,OAAO,WAAW;GAChB,gBAAgB;EAClB;CACF,GAAG,CAAC,CAAC;CACL,UAAU,WAAW;EACnB,IAAI,aAAa;EACjB,eAAe;CACjB,GAAG,CACD,UACA,SACF,CAAC;CACD,OAAO,cAAc,WAAW;AAClC"}
1
+ {"version":3,"file":"GorhomPortalItem.native.js","names":[],"sources":["esm/GorhomPortalItem.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { useEvent } from \"@tamagui/core\";\nimport { getPortal, NativePortal } from \"@tamagui/native\";\nimport { Theme, useThemeName } from \"@tamagui/web\";\nimport { useEffect, useId } from \"react\";\nimport { usePortal } from \"./GorhomPortal\";\nvar GorhomPortalItem = function GorhomPortalItem2(props) {\n var { name: _providedName, hostName = \"root\", handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;\n var portalState = getPortal().state;\n if (portalState.type === \"teleport\") {\n if (passThrough) {\n return children;\n }\n return /* @__PURE__ */ _jsx(NativePortal, {\n hostName,\n children\n });\n }\n return /* @__PURE__ */ _jsx(GorhomPortalItemFallback, {\n name: _providedName,\n hostName,\n handleOnMount: _providedHandleOnMount,\n handleOnUnmount: _providedHandleOnUnmount,\n handleOnUpdate: _providedHandleOnUpdate,\n passThrough,\n children\n });\n};\nvar GorhomPortalItemFallback = function GorhomPortalItemFallback2(props) {\n var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props;\n var { addPortal: addUpdatePortal, removePortal } = usePortal(hostName);\n var id = useId();\n var name = _providedName || id;\n var themeName = useThemeName();\n var themedChildren = passThrough ? children : /* @__PURE__ */ _jsx(Theme, {\n name: themeName,\n children\n });\n var handleOnMount = useEvent(function() {\n if (_providedHandleOnMount) {\n _providedHandleOnMount(function() {\n return addUpdatePortal(name, themedChildren);\n });\n } else {\n addUpdatePortal(name, themedChildren);\n }\n });\n var handleOnUnmount = useEvent(function() {\n if (_providedHandleOnUnmount) {\n _providedHandleOnUnmount(function() {\n return removePortal(name);\n });\n } else {\n removePortal(name);\n }\n });\n var handleOnUpdate = useEvent(function() {\n if (_providedHandleOnUpdate) {\n _providedHandleOnUpdate(function() {\n return addUpdatePortal(name, themedChildren);\n });\n } else {\n addUpdatePortal(name, themedChildren);\n }\n });\n useIsomorphicLayoutEffect(function() {\n if (passThrough) return;\n handleOnMount();\n return function() {\n handleOnUnmount();\n };\n }, []);\n useEffect(function() {\n if (passThrough) return;\n handleOnUpdate();\n }, [\n children,\n themeName\n ]);\n return passThrough ? children : null;\n};\nexport {\n GorhomPortalItem\n};\n//# sourceMappingURL=GorhomPortalItem.native.js.map\n"],"mappings":";;;;;;;;;AAOA,IAAI,mBAAmB,SAAS,kBAAkB,OAAO;CACvD,IAAI,EAAE,MAAM,eAAe,WAAW,QAAQ,eAAe,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B,gBAAgB;EAClB;CACF,GAAG,CAAC,CAAC;CACL,UAAU,WAAW;EACnB,IAAI,aAAa;EACjB,eAAe;CACjB,GAAG,CACD,UACA,SACF,CAAC;CACD,OAAO,cAAc,WAAW;AAClC"}
@@ -6,7 +6,7 @@ import { GorhomPortalItem } from "./GorhomPortalItem.native.js";
6
6
  import { getStackedZIndexProps } from "./helpers.native.js";
7
7
 
8
8
  var MAX_INT32_Z_INDEX = 2147483647;
9
- var Portal = function(propsIn) {
9
+ var Portal = function Portal2(propsIn) {
10
10
  var stackedZIndex = useStackedZIndex(getStackedZIndexProps(propsIn));
11
11
  var zIndex = Math.min(stackedZIndex, MAX_INT32_Z_INDEX);
12
12
  var { children, passThrough } = propsIn;
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.native.js","names":[],"sources":["esm/Portal.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { View } from \"@tamagui/core\";\nimport { getPortal, NativePortal } from \"@tamagui/native\";\nimport { useStackedZIndex } from \"@tamagui/z-index-stack\";\nimport { GorhomPortalItem } from \"./GorhomPortalItem\";\nimport { getStackedZIndexProps } from \"./helpers\";\nvar MAX_INT32_Z_INDEX = 2147483647;\nvar Portal = function(propsIn) {\n var stackedZIndex = useStackedZIndex(getStackedZIndexProps(propsIn));\n var zIndex = Math.min(stackedZIndex, MAX_INT32_Z_INDEX);\n var { children, passThrough } = propsIn;\n var contents = /* @__PURE__ */ _jsx(View, {\n pointerEvents: \"box-none\",\n position: \"absolute\",\n inset: 0,\n maxWidth: \"100%\",\n zIndex,\n passThrough,\n children\n });\n var portalState = getPortal().state;\n if (portalState.type === \"teleport\") {\n return /* @__PURE__ */ _jsx(NativePortal, {\n hostName: \"root\",\n children: contents\n });\n }\n return /* @__PURE__ */ _jsx(GorhomPortalItem, {\n passThrough,\n hostName: \"root\",\n children: contents\n });\n};\nexport {\n Portal\n};\n//# sourceMappingURL=Portal.native.js.map\n"],"mappings":";;;;;;;;AAMA,IAAI,oBAAoB;AACxB,IAAI,SAAS,SAAS,SAAS;CAC7B,IAAI,gBAAgB,iBAAiB,sBAAsB,OAAO,CAAC;CACnE,IAAI,SAAS,KAAK,IAAI,eAAe,iBAAiB;CACtD,IAAI,EAAE,UAAU,gBAAgB;CAChC,IAAI,WAA2B,oBAAK,MAAM;EACxC,eAAe;EACf,UAAU;EACV,OAAO;EACP,UAAU;EACV;EACA;EACA;CACF,CAAC;CACD,IAAI,cAAc,UAAU,CAAC,CAAC;CAC9B,IAAI,YAAY,SAAS,YAAY;EACnC,OAAuB,oBAAK,cAAc;GACxC,UAAU;GACV,UAAU;EACZ,CAAC;CACH;CACA,OAAuB,oBAAK,kBAAkB;EAC5C;EACA,UAAU;EACV,UAAU;CACZ,CAAC;AACH"}
1
+ {"version":3,"file":"Portal.native.js","names":[],"sources":["esm/Portal.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { View } from \"@tamagui/core\";\nimport { getPortal, NativePortal } from \"@tamagui/native\";\nimport { useStackedZIndex } from \"@tamagui/z-index-stack\";\nimport { GorhomPortalItem } from \"./GorhomPortalItem\";\nimport { getStackedZIndexProps } from \"./helpers\";\nvar MAX_INT32_Z_INDEX = 2147483647;\nvar Portal = function Portal2(propsIn) {\n var stackedZIndex = useStackedZIndex(getStackedZIndexProps(propsIn));\n var zIndex = Math.min(stackedZIndex, MAX_INT32_Z_INDEX);\n var { children, passThrough } = propsIn;\n var contents = /* @__PURE__ */ _jsx(View, {\n pointerEvents: \"box-none\",\n position: \"absolute\",\n inset: 0,\n maxWidth: \"100%\",\n zIndex,\n passThrough,\n children\n });\n var portalState = getPortal().state;\n if (portalState.type === \"teleport\") {\n return /* @__PURE__ */ _jsx(NativePortal, {\n hostName: \"root\",\n children: contents\n });\n }\n return /* @__PURE__ */ _jsx(GorhomPortalItem, {\n passThrough,\n hostName: \"root\",\n children: contents\n });\n};\nexport {\n Portal\n};\n//# sourceMappingURL=Portal.native.js.map\n"],"mappings":";;;;;;;;AAMA,IAAI,oBAAoB;AACxB,IAAI,SAAS,SAAS,QAAQ,SAAS;CACrC,IAAI,gBAAgB,iBAAiB,sBAAsB,OAAO,CAAC;CACnE,IAAI,SAAS,KAAK,IAAI,eAAe,iBAAiB;CACtD,IAAI,EAAE,UAAU,gBAAgB;CAChC,IAAI,WAA2B,oBAAK,MAAM;EACxC,eAAe;EACf,UAAU;EACV,OAAO;EACP,UAAU;EACV;EACA;EACA;CACF,CAAC;CACD,IAAI,cAAc,UAAU,CAAC,CAAC;CAC9B,IAAI,YAAY,SAAS,YAAY;EACnC,OAAuB,oBAAK,cAAc;GACxC,UAAU;GACV,UAAU;EACZ,CAAC;CACH;CACA,OAAuB,oBAAK,kBAAkB;EAC5C;EACA,UAAU;EACV,UAAU;CACZ,CAAC;AACH"}
@@ -1,11 +1,11 @@
1
1
  import { isAndroid, isIos, isWeb } from "@tamagui/constants";
2
2
  import { getPortal } from "@tamagui/native";
3
3
 
4
- var isTeleportEnabled = function() {
4
+ var isTeleportEnabled = function isTeleportEnabled2() {
5
5
  var state = getPortal().state;
6
6
  return state.enabled && state.type === "teleport";
7
7
  };
8
- var needsPortalRepropagation = function() {
8
+ var needsPortalRepropagation = function needsPortalRepropagation2() {
9
9
  if (isWeb) return false;
10
10
  if (isTeleportEnabled()) return false;
11
11
  return isAndroid || isIos;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.native.js","names":[],"sources":["esm/constants.native.js"],"sourcesContent":["import { isAndroid, isIos, isWeb } from \"@tamagui/constants\";\nimport { getPortal } from \"@tamagui/native\";\nvar isTeleportEnabled = function() {\n var state = getPortal().state;\n return state.enabled && state.type === \"teleport\";\n};\nvar needsPortalRepropagation = function() {\n if (isWeb) return false;\n if (isTeleportEnabled()) return false;\n return isAndroid || isIos;\n};\nvar allPortalHosts = /* @__PURE__ */ new Map();\nvar portalListeners = {};\nexport {\n allPortalHosts,\n isTeleportEnabled,\n needsPortalRepropagation,\n portalListeners\n};\n//# sourceMappingURL=constants.js.map\n"],"mappings":";;;;AAEA,IAAI,oBAAoB,WAAW;CACjC,IAAI,QAAQ,UAAU,CAAC,CAAC;CACxB,OAAO,MAAM,WAAW,MAAM,SAAS;AACzC;AACA,IAAI,2BAA2B,WAAW;CACxC,IAAI,OAAO,OAAO;CAClB,IAAI,kBAAkB,GAAG,OAAO;CAChC,OAAO,aAAa;AACtB;AACA,IAAI,iCAAiC,IAAI,IAAI;AAC7C,IAAI,kBAAkB,CAAC"}
1
+ {"version":3,"file":"constants.native.js","names":[],"sources":["esm/constants.native.js"],"sourcesContent":["import { isAndroid, isIos, isWeb } from \"@tamagui/constants\";\nimport { getPortal } from \"@tamagui/native\";\nvar isTeleportEnabled = function isTeleportEnabled2() {\n var state = getPortal().state;\n return state.enabled && state.type === \"teleport\";\n};\nvar needsPortalRepropagation = function needsPortalRepropagation2() {\n if (isWeb) return false;\n if (isTeleportEnabled()) return false;\n return isAndroid || isIos;\n};\nvar allPortalHosts = /* @__PURE__ */ new Map();\nvar portalListeners = {};\nexport {\n allPortalHosts,\n isTeleportEnabled,\n needsPortalRepropagation,\n portalListeners\n};\n//# sourceMappingURL=constants.js.map\n"],"mappings":";;;;AAEA,IAAI,oBAAoB,SAAS,qBAAqB;CACpD,IAAI,QAAQ,UAAU,CAAC,CAAC;CACxB,OAAO,MAAM,WAAW,MAAM,SAAS;AACzC;AACA,IAAI,2BAA2B,SAAS,4BAA4B;CAClE,IAAI,OAAO,OAAO;CAClB,IAAI,kBAAkB,GAAG,OAAO;CAChC,OAAO,aAAa;AACtB;AACA,IAAI,iCAAiC,IAAI,IAAI;AAC7C,IAAI,kBAAkB,CAAC"}
@@ -1,12 +1,12 @@
1
1
  import { getTokenValue } from "@tamagui/web";
2
2
 
3
- var getStackedZIndexProps = function(propsIn) {
3
+ var getStackedZIndexProps = function getStackedZIndexProps2(propsIn) {
4
4
  return {
5
5
  stackZIndex: propsIn.stackZIndex,
6
6
  zIndex: resolveViewZIndex(propsIn.zIndex)
7
7
  };
8
8
  };
9
- var resolveViewZIndex = function(zIndex) {
9
+ var resolveViewZIndex = function resolveViewZIndex2(zIndex) {
10
10
  return typeof zIndex === "undefined" ? void 0 : typeof zIndex === "number" ? zIndex : getTokenValue(zIndex, "zIndex");
11
11
  };
12
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.native.js","names":[],"sources":["esm/helpers.native.js"],"sourcesContent":["import { getTokenValue } from \"@tamagui/web\";\nvar getStackedZIndexProps = function(propsIn) {\n return {\n stackZIndex: propsIn.stackZIndex,\n zIndex: resolveViewZIndex(propsIn.zIndex)\n };\n};\nvar resolveViewZIndex = function(zIndex) {\n return typeof zIndex === \"undefined\" ? void 0 : typeof zIndex === \"number\" ? zIndex : getTokenValue(zIndex, \"zIndex\");\n};\nexport {\n getStackedZIndexProps,\n resolveViewZIndex\n};\n//# sourceMappingURL=helpers.js.map\n"],"mappings":";;;AACA,IAAI,wBAAwB,SAAS,SAAS;CAC5C,OAAO;EACL,aAAa,QAAQ;EACrB,QAAQ,kBAAkB,QAAQ,MAAM;CAC1C;AACF;AACA,IAAI,oBAAoB,SAAS,QAAQ;CACvC,OAAO,OAAO,WAAW,cAAc,KAAK,IAAI,OAAO,WAAW,WAAW,SAAS,cAAc,QAAQ,QAAQ;AACtH"}
1
+ {"version":3,"file":"helpers.native.js","names":[],"sources":["esm/helpers.native.js"],"sourcesContent":["import { getTokenValue } from \"@tamagui/web\";\nvar getStackedZIndexProps = function getStackedZIndexProps2(propsIn) {\n return {\n stackZIndex: propsIn.stackZIndex,\n zIndex: resolveViewZIndex(propsIn.zIndex)\n };\n};\nvar resolveViewZIndex = function resolveViewZIndex2(zIndex) {\n return typeof zIndex === \"undefined\" ? void 0 : typeof zIndex === \"number\" ? zIndex : getTokenValue(zIndex, \"zIndex\");\n};\nexport {\n getStackedZIndexProps,\n resolveViewZIndex\n};\n//# sourceMappingURL=helpers.js.map\n"],"mappings":";;;AACA,IAAI,wBAAwB,SAAS,uBAAuB,SAAS;CACnE,OAAO;EACL,aAAa,QAAQ;EACrB,QAAQ,kBAAkB,QAAQ,MAAM;CAC1C;AACF;AACA,IAAI,oBAAoB,SAAS,mBAAmB,QAAQ;CAC1D,OAAO,OAAO,WAAW,cAAc,KAAK,IAAI,OAAO,WAAW,WAAW,SAAS,cAAc,QAAQ,QAAQ;AACtH"}
@@ -1,24 +1,24 @@
1
1
  var _global__IS_FABRIC;
2
2
  var IS_FABRIC = typeof global !== "undefined" && Boolean((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager);
3
- var setupNativePortal = function() {
3
+ var setupNativePortal = function setupNativePortal2() {
4
4
  var g = globalThis;
5
5
  if (g.__tamagui_portal_create) return;
6
6
  if (IS_FABRIC) {
7
7
  try {
8
+ var _ref;
8
9
  var _mod_default;
9
10
  var mod = require("react-native/Libraries/Renderer/shims/ReactFabric");
10
- var _mod_default_createPortal;
11
- g.__tamagui_portal_create = (_mod_default_createPortal = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _mod_default_createPortal !== void 0 ? _mod_default_createPortal : mod.createPortal;
11
+ g.__tamagui_portal_create = (_ref = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _ref !== void 0 ? _ref : mod.createPortal;
12
12
  } catch (err) {
13
13
  console.info(`Note: error importing fabric portal, native portals disabled`, err);
14
14
  }
15
15
  return;
16
16
  }
17
17
  try {
18
+ var _ref1;
18
19
  var _mod_default1;
19
20
  var mod1 = require("react-native/Libraries/Renderer/shims/ReactNative");
20
- var _mod_default_createPortal1;
21
- g.__tamagui_portal_create = (_mod_default_createPortal1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _mod_default_createPortal1 !== void 0 ? _mod_default_createPortal1 : mod1.createPortal;
21
+ g.__tamagui_portal_create = (_ref1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _ref1 !== void 0 ? _ref1 : mod1.createPortal;
22
22
  } catch (err) {
23
23
  console.info(`Note: error importing native portal, native portals disabled`, err);
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"native-portal.native.js","names":[],"sources":["esm/native-portal.native.js"],"sourcesContent":["var _global__IS_FABRIC;\nvar IS_FABRIC = typeof global !== \"undefined\" && Boolean((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager);\nvar setupNativePortal = function() {\n var g = globalThis;\n if (g.__tamagui_portal_create) return;\n if (IS_FABRIC) {\n try {\n var _mod_default;\n var mod = require(\"react-native/Libraries/Renderer/shims/ReactFabric\");\n var _mod_default_createPortal;\n g.__tamagui_portal_create = (_mod_default_createPortal = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _mod_default_createPortal !== void 0 ? _mod_default_createPortal : mod.createPortal;\n } catch (err) {\n console.info(`Note: error importing fabric portal, native portals disabled`, err);\n }\n return;\n }\n try {\n var _mod_default1;\n var mod1 = require(\"react-native/Libraries/Renderer/shims/ReactNative\");\n var _mod_default_createPortal1;\n g.__tamagui_portal_create = (_mod_default_createPortal1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _mod_default_createPortal1 !== void 0 ? _mod_default_createPortal1 : mod1.createPortal;\n } catch (err) {\n console.info(`Note: error importing native portal, native portals disabled`, err);\n }\n};\nexport {\n setupNativePortal\n};\n//# sourceMappingURL=native-portal.js.map\n"],"mappings":";;;;;;;;AAAA,IAAI;AACJ,IAAI,YAAY,OAAO,WAAW,eAAe,SAAS,qBAAqB,OAAO,gBAAgB,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB,OAAO,qBAAqB;AAC/L,IAAI,oBAAoB,WAAW;CACjC,IAAI,IAAI;CACR,IAAI,EAAE,yBAAyB;CAC/B,IAAI,WAAW;EACb,IAAI;GACF,IAAI;GACJ,IAAI,gBAAc,mDAAmD;GACrE,IAAI;GACJ,EAAE,2BAA2B,4BAA4B,QAAQ,QAAQ,QAAQ,KAAK,IAAI,KAAK,KAAK,eAAe,IAAI,aAAa,QAAQ,iBAAiB,KAAK,IAAI,KAAK,IAAI,aAAa,kBAAkB,QAAQ,8BAA8B,KAAK,IAAI,4BAA4B,IAAI;EAC/R,SAAS,KAAK;GACZ,QAAQ,KAAK,gEAAgE,GAAG;EAClF;EACA;CACF;CACA,IAAI;EACF,IAAI;EACJ,IAAI,iBAAe,mDAAmD;EACtE,IAAI;EACJ,EAAE,2BAA2B,6BAA6B,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,KAAK,gBAAgB,KAAK,aAAa,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,cAAc,kBAAkB,QAAQ,+BAA+B,KAAK,IAAI,6BAA6B,KAAK;CACzS,SAAS,KAAK;EACZ,QAAQ,KAAK,gEAAgE,GAAG;CAClF;AACF"}
1
+ {"version":3,"file":"native-portal.native.js","names":[],"sources":["esm/native-portal.native.js"],"sourcesContent":["var _global__IS_FABRIC;\nvar IS_FABRIC = typeof global !== \"undefined\" && Boolean((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager);\nvar setupNativePortal = function setupNativePortal2() {\n var g = globalThis;\n if (g.__tamagui_portal_create) return;\n if (IS_FABRIC) {\n try {\n var _ref;\n var _mod_default;\n var mod = require(\"react-native/Libraries/Renderer/shims/ReactFabric\");\n g.__tamagui_portal_create = (_ref = mod === null || mod === void 0 ? void 0 : (_mod_default = mod.default) === null || _mod_default === void 0 ? void 0 : _mod_default.createPortal) !== null && _ref !== void 0 ? _ref : mod.createPortal;\n } catch (err) {\n console.info(`Note: error importing fabric portal, native portals disabled`, err);\n }\n return;\n }\n try {\n var _ref1;\n var _mod_default1;\n var mod1 = require(\"react-native/Libraries/Renderer/shims/ReactNative\");\n g.__tamagui_portal_create = (_ref1 = mod1 === null || mod1 === void 0 ? void 0 : (_mod_default1 = mod1.default) === null || _mod_default1 === void 0 ? void 0 : _mod_default1.createPortal) !== null && _ref1 !== void 0 ? _ref1 : mod1.createPortal;\n } catch (err) {\n console.info(`Note: error importing native portal, native portals disabled`, err);\n }\n};\nexport {\n setupNativePortal\n};\n//# sourceMappingURL=native-portal.js.map\n"],"mappings":";;;;;;;;AAAA,IAAI;AACJ,IAAI,YAAY,OAAO,WAAW,eAAe,SAAS,qBAAqB,OAAO,gBAAgB,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB,OAAO,qBAAqB;AAC/L,IAAI,oBAAoB,SAAS,qBAAqB;CACpD,IAAI,IAAI;CACR,IAAI,EAAE,yBAAyB;CAC/B,IAAI,WAAW;EACb,IAAI;GACF,IAAI;GACJ,IAAI;GACJ,IAAI,gBAAc,mDAAmD;GACrE,EAAE,2BAA2B,OAAO,QAAQ,QAAQ,QAAQ,KAAK,IAAI,KAAK,KAAK,eAAe,IAAI,aAAa,QAAQ,iBAAiB,KAAK,IAAI,KAAK,IAAI,aAAa,kBAAkB,QAAQ,SAAS,KAAK,IAAI,OAAO,IAAI;EAChO,SAAS,KAAK;GACZ,QAAQ,KAAK,gEAAgE,GAAG;EAClF;EACA;CACF;CACA,IAAI;EACF,IAAI;EACJ,IAAI;EACJ,IAAI,iBAAe,mDAAmD;EACtE,EAAE,2BAA2B,QAAQ,SAAS,QAAQ,SAAS,KAAK,IAAI,KAAK,KAAK,gBAAgB,KAAK,aAAa,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,cAAc,kBAAkB,QAAQ,UAAU,KAAK,IAAI,QAAQ,KAAK;CAC1O,SAAS,KAAK;EACZ,QAAQ,KAAK,gEAAgE,GAAG;CAClF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/portal",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "license": "MIT",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -35,17 +35,17 @@
35
35
  "clean:build": "tamagui-build clean:build"
36
36
  },
37
37
  "dependencies": {
38
- "@tamagui/constants": "3.0.7",
39
- "@tamagui/core": "3.0.7",
40
- "@tamagui/native": "3.0.7",
41
- "@tamagui/polyfill-dev": "3.0.7",
42
- "@tamagui/start-transition": "3.0.7",
43
- "@tamagui/use-event": "3.0.7",
44
- "@tamagui/web": "3.0.7",
45
- "@tamagui/z-index-stack": "3.0.7"
38
+ "@tamagui/constants": "3.0.8",
39
+ "@tamagui/core": "3.0.8",
40
+ "@tamagui/native": "3.0.8",
41
+ "@tamagui/polyfill-dev": "3.0.8",
42
+ "@tamagui/start-transition": "3.0.8",
43
+ "@tamagui/use-event": "3.0.8",
44
+ "@tamagui/web": "3.0.8",
45
+ "@tamagui/z-index-stack": "3.0.8"
46
46
  },
47
47
  "devDependencies": {
48
- "@tamagui/build": "3.0.7",
48
+ "@tamagui/build": "3.0.8",
49
49
  "react": "19.2.3",
50
50
  "react-dom": "19.2.3",
51
51
  "react-native": "0.87.1"
@@ -59,5 +59,5 @@
59
59
  "url": "git+https://github.com/tamagui/tamagui.git",
60
60
  "directory": "code/ui/portal"
61
61
  },
62
- "releaseSourceCommit": "96f8bc1f222af0381729a2e2202370aa4a9808ef"
62
+ "releaseSourceCommit": "b723356193510591d9ad15877b8937e8e6a31910"
63
63
  }