tamagui 2.6.4 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/native.cjs CHANGED
@@ -178,15 +178,15 @@ var init_pseudoDescriptors_native = __esmMin((() => {
178
178
  }));
179
179
  //#endregion
180
180
  //#region ../../core/web/dist/esm/helpers/mergeProps.native.js
181
- function _type_of$16(obj) {
181
+ function _type_of$17(obj) {
182
182
  "@swc/helpers - typeof";
183
183
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
184
184
  }
185
185
  function mergeProp(out, defaultProps, props, key) {
186
186
  var val = props[key];
187
- if (defaultProps && key in defaultProps && (key in pseudoDescriptors || key[0] === "$") && val && (typeof val === "undefined" ? "undefined" : _type_of$16(val)) === "object") {
187
+ if (defaultProps && key in defaultProps && (key in pseudoDescriptors || key[0] === "$") && val && (typeof val === "undefined" ? "undefined" : _type_of$17(val)) === "object") {
188
188
  var defaultVal = defaultProps[key];
189
- if (defaultVal && (typeof defaultVal === "undefined" ? "undefined" : _type_of$16(defaultVal)) === "object") val = mergeProps(defaultVal, val);
189
+ if (defaultVal && (typeof defaultVal === "undefined" ? "undefined" : _type_of$17(defaultVal)) === "object") val = mergeProps(defaultVal, val);
190
190
  }
191
191
  out[key] = val;
192
192
  }
@@ -228,7 +228,7 @@ var init_mergeProps_native = __esmMin((() => {
228
228
  }));
229
229
  //#endregion
230
230
  //#region ../../core/web/dist/esm/helpers/objectIdentityKey.native.js
231
- function _type_of$15(obj) {
231
+ function _type_of$16(obj) {
232
232
  "@swc/helpers - typeof";
233
233
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
234
234
  }
@@ -237,7 +237,7 @@ function objectIdentityKey(obj) {
237
237
  for (var key in obj) {
238
238
  k += key;
239
239
  var arg = obj[key];
240
- var type = typeof arg === "undefined" ? "undefined" : _type_of$15(arg);
240
+ var type = typeof arg === "undefined" ? "undefined" : _type_of$16(arg);
241
241
  if (!arg || type !== "object" && type !== "function") k += type + arg;
242
242
  else if (cache$7.has(arg)) k += cache$7.get(arg);
243
243
  else {
@@ -11618,7 +11618,7 @@ var init_useWindowDimensions = __esmMin((() => {
11618
11618
  * LICENSE file in the root directory of this source tree.
11619
11619
  */
11620
11620
  var require_react_dom_production = /* @__PURE__ */ __commonJSMin(((exports) => {
11621
- var React$45 = require("react");
11621
+ var React$46 = require("react");
11622
11622
  function formatProdErrorMessage(code) {
11623
11623
  var url = "https://react.dev/errors/" + code;
11624
11624
  if (1 < arguments.length) {
@@ -11645,7 +11645,7 @@ var require_react_dom_production = /* @__PURE__ */ __commonJSMin(((exports) => {
11645
11645
  p: 0,
11646
11646
  findDOMNode: null
11647
11647
  };
11648
- var ReactSharedInternals = React$45.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
11648
+ var ReactSharedInternals = React$46.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
11649
11649
  exports.flushSync = function(fn) {
11650
11650
  var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
11651
11651
  try {
@@ -12461,7 +12461,7 @@ function clamp(value, param) {
12461
12461
  var init_clamp_native = __esmMin((() => {}));
12462
12462
  //#endregion
12463
12463
  //#region ../../core/helpers/dist/esm/composeEventHandlers.native.js
12464
- function _type_of$14(obj) {
12464
+ function _type_of$15(obj) {
12465
12465
  "@swc/helpers - typeof";
12466
12466
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
12467
12467
  }
@@ -12470,7 +12470,7 @@ function composeEventHandlers(og, next) {
12470
12470
  if (!og || !next) return next || og || void 0;
12471
12471
  return function(event) {
12472
12472
  og === null || og === void 0 || og(event);
12473
- if (!event || !(checkDefaultPrevented && (typeof event === "undefined" ? "undefined" : _type_of$14(event)) === "object" && "defaultPrevented" in event) || "defaultPrevented" in event && !event.defaultPrevented) return next === null || next === void 0 ? void 0 : next(event);
12473
+ if (!event || !(checkDefaultPrevented && (typeof event === "undefined" ? "undefined" : _type_of$15(event)) === "object" && "defaultPrevented" in event) || "defaultPrevented" in event && !event.defaultPrevented) return next === null || next === void 0 ? void 0 : next(event);
12474
12474
  };
12475
12475
  }
12476
12476
  var init_composeEventHandlers_native = __esmMin((() => {}));
@@ -12907,7 +12907,7 @@ var init_index_native$5 = __esmMin((() => {
12907
12907
  }));
12908
12908
  //#endregion
12909
12909
  //#region ../../core/web/dist/esm/createVariable.native.js
12910
- function _type_of$13(obj) {
12910
+ function _type_of$14(obj) {
12911
12911
  "@swc/helpers - typeof";
12912
12912
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
12913
12913
  }
@@ -12920,7 +12920,7 @@ function variableToString(vrble) {
12920
12920
  return `${vrble || ""}`;
12921
12921
  }
12922
12922
  function isVariable(v) {
12923
- return v && (typeof v === "undefined" ? "undefined" : _type_of$13(v)) === "object" && "isVar" in v;
12923
+ return v && (typeof v === "undefined" ? "undefined" : _type_of$14(v)) === "object" && "isVar" in v;
12924
12924
  }
12925
12925
  function getVariable(nameOrVariable) {
12926
12926
  var group = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "size";
@@ -13972,30 +13972,275 @@ var init_keyboardControllerState_native = __esmMin((() => {
13972
13972
  });
13973
13973
  }));
13974
13974
  //#endregion
13975
- //#region ../../core/native/dist/esm/zeegoState.native.js
13976
- function getZeego() {
13977
- return {
13978
- get isEnabled() {
13979
- return state$1.get().enabled;
13980
- },
13981
- get state() {
13982
- return state$1.get();
13983
- },
13984
- set(newState) {
13985
- state$1.set(newState);
13986
- }
13987
- };
13975
+ //#region ../../core/native/dist/esm/nativeMenuState.native.js
13976
+ function registerNativeMenuAdapter(adapter) {
13977
+ var current = state$1.get().adapter;
13978
+ if (current && current.name !== adapter.name) throw new Error(`A native menu adapter named "${current.name}" is already registered. Register exactly one adapter before rendering Tamagui menus.`);
13979
+ state$1.set({
13980
+ enabled: true,
13981
+ adapter
13982
+ });
13983
+ }
13984
+ function getNativeMenuAdapter() {
13985
+ return state$1.get().adapter;
13988
13986
  }
13989
13987
  var state$1;
13990
- var init_zeegoState_native = __esmMin((() => {
13988
+ var init_nativeMenuState_native = __esmMin((() => {
13991
13989
  init_globalState_native();
13992
- state$1 = createGlobalState(`zeego`, {
13990
+ state$1 = createGlobalState("native-menu-adapter", {
13993
13991
  enabled: false,
13994
- DropdownMenu: null,
13995
- ContextMenu: null
13992
+ adapter: null
13996
13993
  });
13997
13994
  }));
13998
13995
  //#endregion
13996
+ //#region ../../core/native/dist/esm/expoUIMenuAdapter.native.js
13997
+ function _type_of$13(obj) {
13998
+ "@swc/helpers - typeof";
13999
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
14000
+ }
14001
+ function marker(name) {
14002
+ var Marker = function() {
14003
+ return null;
14004
+ };
14005
+ Marker.displayName = `ExpoUI${name}`;
14006
+ return Marker;
14007
+ }
14008
+ function isMarkerType(candidate, type) {
14009
+ if (candidate === type) return true;
14010
+ var wanted = type.displayName;
14011
+ if (!wanted) return false;
14012
+ return typeof candidate === "function" && candidate.displayName === wanted;
14013
+ }
14014
+ function elementOfType(children, type) {
14015
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
14016
+ try {
14017
+ for (var _iterator = react$1.default.Children.toArray(children)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
14018
+ var child = _step.value;
14019
+ if (/* @__PURE__ */ react$1.default.isValidElement(child) && isMarkerType(child.type, type)) return child;
14020
+ }
14021
+ } catch (err) {
14022
+ _didIteratorError = true;
14023
+ _iteratorError = err;
14024
+ } finally {
14025
+ try {
14026
+ if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
14027
+ } finally {
14028
+ if (_didIteratorError) throw _iteratorError;
14029
+ }
14030
+ }
14031
+ return null;
14032
+ }
14033
+ function textFromNode(node) {
14034
+ if (typeof node === "string" || typeof node === "number") return String(node);
14035
+ if (!/* @__PURE__ */ react$1.default.isValidElement(node)) return "";
14036
+ return react$1.default.Children.toArray(node.props.children).map(textFromNode).join("");
14037
+ }
14038
+ function createExpoUIMenuAdapter(param) {
14039
+ var { MenuView } = param;
14040
+ var NativeMenuView = MenuView;
14041
+ function createModule(isContextMenu) {
14042
+ var Trigger = marker("Trigger");
14043
+ var Content = marker("Content");
14044
+ var Item = marker("Item");
14045
+ var ItemTitle = marker("ItemTitle");
14046
+ var ItemSubtitle = marker("ItemSubtitle");
14047
+ var ItemIcon = marker("ItemIcon");
14048
+ var ItemImage = marker("ItemImage");
14049
+ var ItemIndicator = marker("ItemIndicator");
14050
+ var Group = marker("Group");
14051
+ var Label = marker("Label");
14052
+ var Separator = marker("Separator");
14053
+ var Sub = marker("Sub");
14054
+ var SubTrigger = marker("SubTrigger");
14055
+ var SubContent = marker("SubContent");
14056
+ var CheckboxItem = marker("CheckboxItem");
14057
+ var Preview = marker("Preview");
14058
+ var Auxiliary = marker("Auxiliary");
14059
+ function Root(param2) {
14060
+ var { children, onOpenChange, onOpenWillChange } = param2;
14061
+ var trigger = elementOfType(children, Trigger);
14062
+ var content = elementOfType(children, Content);
14063
+ var preview = elementOfType(children, Preview);
14064
+ var auxiliary = elementOfType(children, Auxiliary);
14065
+ if (preview || auxiliary) throw new Error("@expo/ui/community/menu does not support Tamagui context-menu previews or auxiliary views");
14066
+ if (!trigger || !content) throw new Error("Tamagui native menus require one Trigger and one Content");
14067
+ var nextId = 0;
14068
+ var handlers = /* @__PURE__ */ new Map();
14069
+ function actionId(element) {
14070
+ return element.key == null ? `tamagui-menu-${nextId++}` : String(element.key).replace(/^\.\$/, "");
14071
+ }
14072
+ function itemTitle(element) {
14073
+ if (typeof element.props.textValue === "string") return element.props.textValue;
14074
+ var title = elementOfType(element.props.children, ItemTitle);
14075
+ return title ? textFromNode(title.props.children) : "";
14076
+ }
14077
+ function actionImage(element) {
14078
+ var image = elementOfType(element.props.children, ItemImage);
14079
+ if (image === null || image === void 0 ? void 0 : image.props.source) return image.props.source;
14080
+ var icon = elementOfType(element.props.children, ItemIcon);
14081
+ if (!icon) return void 0;
14082
+ var ios = icon.props.ios;
14083
+ if ((typeof ios === "undefined" ? "undefined" : _type_of$13(ios)) === "object" && ios && "name" in ios && typeof ios.name === "string") return ios.name;
14084
+ return typeof icon.props.iosIconName === "string" ? icon.props.iosIconName : void 0;
14085
+ }
14086
+ function attributes(element) {
14087
+ var destructive = element.props.destructive === true;
14088
+ var disabled = element.props.disabled === true;
14089
+ var hidden = element.props.hidden === true;
14090
+ return destructive || disabled || hidden ? {
14091
+ destructive,
14092
+ disabled,
14093
+ hidden
14094
+ } : void 0;
14095
+ }
14096
+ function actionsFrom(childrenToParse) {
14097
+ var actions = [];
14098
+ var section = null;
14099
+ function append(action) {
14100
+ if (section) section.push(action);
14101
+ else actions.push(action);
14102
+ }
14103
+ function flushSection() {
14104
+ if (!(section === null || section === void 0 ? void 0 : section.length)) {
14105
+ section = [];
14106
+ return;
14107
+ }
14108
+ actions.push({
14109
+ id: `tamagui-menu-section-${nextId++}`,
14110
+ title: "",
14111
+ subactions: section,
14112
+ displayInline: true
14113
+ });
14114
+ section = [];
14115
+ }
14116
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
14117
+ try {
14118
+ var _loop = function() {
14119
+ var child = _step.value;
14120
+ if (!/* @__PURE__ */ react$1.default.isValidElement(child)) return "continue";
14121
+ if (isMarkerType(child.type, Separator)) {
14122
+ if (!section) section = actions.splice(0);
14123
+ flushSection();
14124
+ return "continue";
14125
+ }
14126
+ if (isMarkerType(child.type, Group)) {
14127
+ var label2 = elementOfType(child.props.children, Label);
14128
+ append({
14129
+ id: actionId(child),
14130
+ title: label2 ? textFromNode(label2.props.children) : "",
14131
+ subactions: actionsFrom(child.props.children),
14132
+ displayInline: true
14133
+ });
14134
+ return "continue";
14135
+ }
14136
+ if (isMarkerType(child.type, Sub)) {
14137
+ var subTrigger = elementOfType(child.props.children, SubTrigger);
14138
+ var subContent = elementOfType(child.props.children, SubContent);
14139
+ if (!subTrigger || !subContent) throw new Error("Tamagui native submenus require one SubTrigger and SubContent");
14140
+ append({
14141
+ id: actionId(child),
14142
+ title: itemTitle(subTrigger),
14143
+ image: actionImage(subTrigger),
14144
+ attributes: attributes(subTrigger),
14145
+ subactions: actionsFrom(subContent.props.children)
14146
+ });
14147
+ return "continue";
14148
+ }
14149
+ if (!isMarkerType(child.type, Item) && !isMarkerType(child.type, CheckboxItem)) return "continue";
14150
+ if (elementOfType(child.props.children, ItemSubtitle)) throw new Error("@expo/ui/community/menu does not support menu item subtitles");
14151
+ var id = actionId(child);
14152
+ if (isMarkerType(child.type, CheckboxItem)) {
14153
+ var current = child.props.value === true || child.props.value === "on" || child.props.checked === true;
14154
+ var onValueChange = child.props.onValueChange;
14155
+ var onCheckedChange = child.props.onCheckedChange;
14156
+ handlers.set(id, function() {
14157
+ if (typeof onValueChange === "function") onValueChange(current ? "off" : "on", current ? "on" : "off");
14158
+ else if (typeof onCheckedChange === "function") onCheckedChange(!current);
14159
+ });
14160
+ append({
14161
+ id,
14162
+ title: itemTitle(child),
14163
+ image: actionImage(child),
14164
+ state: current ? "on" : "off",
14165
+ attributes: attributes(child)
14166
+ });
14167
+ return "continue";
14168
+ }
14169
+ var onSelect = child.props.onSelect;
14170
+ if (typeof onSelect === "function") handlers.set(id, function() {
14171
+ return onSelect();
14172
+ });
14173
+ append({
14174
+ id,
14175
+ title: itemTitle(child),
14176
+ image: actionImage(child),
14177
+ attributes: attributes(child)
14178
+ });
14179
+ };
14180
+ for (var _iterator = react$1.default.Children.toArray(childrenToParse)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop();
14181
+ } catch (err) {
14182
+ _didIteratorError = true;
14183
+ _iteratorError = err;
14184
+ } finally {
14185
+ try {
14186
+ if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
14187
+ } finally {
14188
+ if (_didIteratorError) throw _iteratorError;
14189
+ }
14190
+ }
14191
+ if (section) flushSection();
14192
+ return actions;
14193
+ }
14194
+ var label = elementOfType(content.props.children, Label);
14195
+ var triggerAction = trigger.props.action;
14196
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NativeMenuView, {
14197
+ actions: actionsFrom(content.props.children),
14198
+ title: label ? textFromNode(label.props.children) : void 0,
14199
+ shouldOpenOnLongPress: triggerAction === "longPress" || triggerAction !== "press" && isContextMenu,
14200
+ onPressAction: function(event) {
14201
+ var _handlers_get;
14202
+ return (_handlers_get = handlers.get(event.nativeEvent.event)) === null || _handlers_get === void 0 ? void 0 : _handlers_get();
14203
+ },
14204
+ onOpenMenu: function() {
14205
+ onOpenWillChange === null || onOpenWillChange === void 0 || onOpenWillChange(true);
14206
+ onOpenChange === null || onOpenChange === void 0 || onOpenChange(true);
14207
+ },
14208
+ onCloseMenu: function() {
14209
+ onOpenWillChange === null || onOpenWillChange === void 0 || onOpenWillChange(false);
14210
+ onOpenChange === null || onOpenChange === void 0 || onOpenChange(false);
14211
+ },
14212
+ children: trigger.props.children
14213
+ });
14214
+ }
14215
+ return {
14216
+ Root,
14217
+ Trigger,
14218
+ Content,
14219
+ Item,
14220
+ ItemTitle,
14221
+ ItemSubtitle,
14222
+ ItemIcon,
14223
+ ItemImage,
14224
+ ItemIndicator,
14225
+ Group,
14226
+ Label,
14227
+ Separator,
14228
+ Sub,
14229
+ SubTrigger,
14230
+ SubContent,
14231
+ CheckboxItem,
14232
+ Preview,
14233
+ Auxiliary
14234
+ };
14235
+ }
14236
+ return {
14237
+ name: "expo-ui",
14238
+ Menu: createModule(false),
14239
+ ContextMenu: createModule(true)
14240
+ };
14241
+ }
14242
+ var init_expoUIMenuAdapter_native = __esmMin((() => {}));
14243
+ //#endregion
13999
14244
  //#region ../../core/native/dist/esm/nativeMenuContext.native.js
14000
14245
  var NativeMenuContext;
14001
14246
  var init_nativeMenuContext_native = __esmMin((() => {
@@ -14058,15 +14303,17 @@ var index_native_exports = /* @__PURE__ */ __exportAll({
14058
14303
  NativePortal: () => NativePortal,
14059
14304
  NativePortalHost: () => NativePortalHost,
14060
14305
  NativePortalProvider: () => NativePortalProvider,
14306
+ createExpoUIMenuAdapter: () => createExpoUIMenuAdapter,
14061
14307
  getBurnt: () => getBurnt,
14062
14308
  getGestureHandler: () => getGestureHandler,
14063
14309
  getKeyboardControllerState: () => getKeyboardControllerState$1,
14064
14310
  getLinearGradient: () => getLinearGradient,
14311
+ getNativeMenuAdapter: () => getNativeMenuAdapter,
14065
14312
  getPortal: () => getPortal,
14066
14313
  getSafeArea: () => getSafeArea,
14067
14314
  getWorklets: () => getWorklets,
14068
- getZeego: () => getZeego,
14069
14315
  isKeyboardControllerEnabled: () => isKeyboardControllerEnabled$1,
14316
+ registerNativeMenuAdapter: () => registerNativeMenuAdapter,
14070
14317
  setKeyboardControllerState: () => setKeyboardControllerState,
14071
14318
  unstable_claimExternalPressOwnership: () => claimExternalPressOwnership,
14072
14319
  unstable_hasExternalPressOwnership: () => hasExternalPressOwnership,
@@ -14079,7 +14326,8 @@ var init_index_native$3 = __esmMin((() => {
14079
14326
  init_safeAreaState_native();
14080
14327
  init_linearGradientState_native();
14081
14328
  init_keyboardControllerState_native();
14082
- init_zeegoState_native();
14329
+ init_nativeMenuState_native();
14330
+ init_expoUIMenuAdapter_native();
14083
14331
  init_nativeMenuContext_native();
14084
14332
  init_burntState_native();
14085
14333
  init_components_native();
@@ -20334,7 +20582,7 @@ var _excluded$48 = ["type"], _excluded2$26 = [
20334
20582
  "disabled",
20335
20583
  "dir",
20336
20584
  "orientation"
20337
- ], _excluded5$12 = ["__scopeAccordion", "value"], _excluded6$8 = ["__scopeAccordion"], _excluded7$5 = ["__scopeAccordion"], _excluded8$5 = ["__scopeAccordion", "forceMount"], _excluded9$5 = ["children", "transition"];
20585
+ ], _excluded5$12 = ["__scopeAccordion", "value"], _excluded6$9 = ["__scopeAccordion"], _excluded7$5 = ["__scopeAccordion"], _excluded8$5 = ["__scopeAccordion", "forceMount"], _excluded9$5 = ["children", "transition"];
20338
20586
  var ACCORDION_NAME = "Accordion";
20339
20587
  var ACCORDION_KEYS = [
20340
20588
  "Home",
@@ -20518,7 +20766,7 @@ var AccordionItem = /* @__PURE__ */ react$1.forwardRef(function(props, forwarded
20518
20766
  AccordionItem.displayName = ITEM_NAME$1;
20519
20767
  var HEADER_NAME = "AccordionHeader";
20520
20768
  var AccordionHeader = /* @__PURE__ */ react$1.forwardRef(function(props, forwardedRef) {
20521
- var { __scopeAccordion } = props, headerProps = _objectWithoutProperties(props, _excluded6$8);
20769
+ var { __scopeAccordion } = props, headerProps = _objectWithoutProperties(props, _excluded6$9);
20522
20770
  var accordionContext = useAccordionContext(__scopeAccordion);
20523
20771
  var itemContext = useAccordionItemContext(__scopeAccordion);
20524
20772
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(H1, _objectSpread2(_objectSpread2({
@@ -21488,7 +21736,7 @@ var _excluded$43 = ["scope"], _excluded2$23 = [
21488
21736
  "scope",
21489
21737
  "forceMount",
21490
21738
  "children"
21491
- ], _excluded3$16 = ["scope"], _excluded4$13 = ["forceMount"], _excluded5$11 = ["scope"], _excluded6$7 = ["children", "context"], _excluded7$4 = [
21739
+ ], _excluded3$16 = ["scope"], _excluded4$13 = ["forceMount"], _excluded5$11 = ["scope"], _excluded6$8 = ["children", "context"], _excluded7$4 = [
21492
21740
  "trapFocus",
21493
21741
  "onOpenAutoFocus",
21494
21742
  "onCloseAutoFocus",
@@ -21678,7 +21926,7 @@ var DialogContent = DialogContentFrame.styleable(function DialogContent2(param,
21678
21926
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: context.modal ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogContentModal, _objectSpread2(_objectSpread2({ context }, props), {}, { ref: forwardedRef })) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogContentNonModal, _objectSpread2(_objectSpread2({ context }, props), {}, { ref: forwardedRef })) });
21679
21927
  });
21680
21928
  var DialogContentModal = /* @__PURE__ */ react$1.forwardRef(function(param, forwardedRef) {
21681
- var { children, context } = param, props = _objectWithoutProperties(param, _excluded6$7);
21929
+ var { children, context } = param, props = _objectWithoutProperties(param, _excluded6$8);
21682
21930
  var contentRef = react$1.useRef(null);
21683
21931
  var composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
21684
21932
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogContentImpl, _objectSpread2(_objectSpread2(_objectSpread2({}, props), {}, {
@@ -21885,7 +22133,7 @@ var _excluded$42 = [
21885
22133
  "__native",
21886
22134
  "onPress",
21887
22135
  "__onPress"
21888
- ], _excluded2$22 = ["scope"], _excluded3$15 = ["scope"], _excluded4$12 = ["scope"], _excluded5$10 = ["scope", "children"], _excluded6$6 = ["scope"], _excluded7$3 = ["scope"], _excluded8$3 = ["scope"], _excluded9$3 = ["scope"], _excluded10$3 = ["scope"], _excluded11$2 = ["scope", "native"];
22136
+ ], _excluded2$22 = ["scope"], _excluded3$15 = ["scope"], _excluded4$12 = ["scope"], _excluded5$10 = ["scope", "children"], _excluded6$7 = ["scope"], _excluded7$3 = ["scope"], _excluded8$3 = ["scope"], _excluded9$3 = ["scope"], _excluded10$3 = ["scope"], _excluded11$2 = ["scope", "native"];
21889
22137
  var getAlertDialogScope = function(scope) {
21890
22138
  return scope;
21891
22139
  };
@@ -21945,7 +22193,7 @@ var AlertDialogContent = /* @__PURE__ */ react$1.forwardRef(function AlertDialog
21945
22193
  });
21946
22194
  var TITLE_NAME = "AlertDialogTitle";
21947
22195
  var AlertDialogTitle = styledExport(View, { name: TITLE_NAME }).styleable(function AlertDialogTitle2(props, forwardedRef) {
21948
- var { scope } = props, titleProps = _objectWithoutProperties(props, _excluded6$6);
22196
+ var { scope } = props, titleProps = _objectWithoutProperties(props, _excluded6$7);
21949
22197
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogTitle, _objectSpread2(_objectSpread2({ scope: getAlertDialogScope(scope) }, titleProps), {}, { ref: forwardedRef }));
21950
22198
  });
21951
22199
  var DESCRIPTION_NAME = "AlertDialogDescription";
@@ -24344,7 +24592,7 @@ var _excluded$30 = ["scope", "children"], _excluded2$16 = ["virtualRef", "scope"
24344
24592
  "scope",
24345
24593
  "animatePosition",
24346
24594
  "transition"
24347
- ], _excluded6$5 = [
24595
+ ], _excluded6$6 = [
24348
24596
  "offset",
24349
24597
  "size",
24350
24598
  "borderWidth"
@@ -24741,7 +24989,7 @@ var PopperArrow = /* @__PURE__ */ react$1.forwardRef(function PopperArrow2(props
24741
24989
  var _context_arrowStyle, _context_arrowStyle1;
24742
24990
  var isAnimatePosControlled = "animatePosition" in propsIn;
24743
24991
  var { scope, animatePosition, transition } = propsIn, rest = _objectWithoutProperties(propsIn, _excluded5$8);
24744
- var { offset, size: sizeProp, borderWidth = 0 } = rest, arrowProps = _objectWithoutProperties(rest, _excluded6$5);
24992
+ var { offset, size: sizeProp, borderWidth = 0 } = rest, arrowProps = _objectWithoutProperties(rest, _excluded6$6);
24745
24993
  var context = usePopperContext(scope);
24746
24994
  var sizeVal = typeof sizeProp === "number" ? sizeProp : getVariableValue(getSpace(sizeProp !== null && sizeProp !== void 0 ? sizeProp : context.size, {
24747
24995
  shift: -2,
@@ -24965,7 +25213,7 @@ var _excluded$29 = [
24965
25213
  "disabled",
24966
25214
  "textValue",
24967
25215
  "unstyled"
24968
- ], _excluded6$4 = [
25216
+ ], _excluded6$5 = [
24969
25217
  "ios",
24970
25218
  "androidIconName",
24971
25219
  "iosIconName"
@@ -25377,7 +25625,7 @@ function createBaseMenu(param) {
25377
25625
  var ITEM_IMAGE = "MenuItemImage";
25378
25626
  var MenuItemImage = /* @__PURE__ */ react$1.forwardRef(function(props, forwardedRef) {
25379
25627
  var { ios, androidIconName, iosIconName } = props;
25380
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_Image, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(props, _excluded6$4)), {}, { ref: forwardedRef }));
25628
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_Image, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(props, _excluded6$5)), {}, { ref: forwardedRef }));
25381
25629
  });
25382
25630
  MenuItemImage.displayName = ITEM_IMAGE;
25383
25631
  var ITEM_ICON = "MenuItemIcon";
@@ -25767,37 +26015,49 @@ init_index_native$3();
25767
26015
  init_index_native();
25768
26016
  init_objectWithoutProperties();
25769
26017
  init_objectSpread2();
25770
- var _excluded$28 = [
26018
+ var _excluded$28 = ["children"], _excluded2$14 = [
25771
26019
  "value",
25772
26020
  "onValueChange",
25773
26021
  "children"
25774
- ], _excluded2$14 = ["value", "children"], _excluded3$10 = [
26022
+ ], _excluded3$10 = ["value", "children"], _excluded4$8 = [
25775
26023
  "checked",
25776
26024
  "onCheckedChange",
25777
26025
  "value",
25778
26026
  "onValueChange",
25779
26027
  "children"
25780
- ], _excluded4$8 = ["children"], _excluded5$6 = ["children"];
26028
+ ], _excluded5$6 = ["children"], _excluded6$4 = ["children"];
25781
26029
  var MAPPED_TYPES = [
25782
26030
  "SubContent",
25783
26031
  "SubTrigger",
25784
26032
  "Content",
25785
26033
  "Sub",
25786
26034
  "Group",
25787
- "CheckboxItem"
26035
+ "Item",
26036
+ "ItemTitle",
26037
+ "ItemSubtitle",
26038
+ "ItemIcon",
26039
+ "ItemImage",
26040
+ "ItemIndicator",
26041
+ "Label",
26042
+ "Separator",
26043
+ "CheckboxItem",
26044
+ "Preview",
26045
+ "Auxiliary"
25788
26046
  ];
25789
26047
  var CONTAINER_TYPES = [
25790
26048
  "SubContent",
26049
+ "SubTrigger",
25791
26050
  "Content",
25792
26051
  "Sub",
25793
- "Group"
26052
+ "Group",
26053
+ "Item"
25794
26054
  ];
25795
26055
  function getComponentType(displayName) {
25796
26056
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
25797
26057
  try {
25798
26058
  for (var _iterator = MAPPED_TYPES[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
25799
26059
  var type = _step.value;
25800
- if (displayName === type || displayName.includes(`(${type})`)) return type;
26060
+ if (displayName === type || displayName === `Menu${type}` || displayName === `ContextMenu${type}` || displayName.includes(`(${type})`)) return type;
25801
26061
  }
25802
26062
  } catch (err) {
25803
26063
  _didIteratorError = true;
@@ -25841,23 +26101,34 @@ var createNativeMenu = function(MenuType) {
25841
26101
  var warned = false;
25842
26102
  function resolve() {
25843
26103
  if (resolved) return resolved;
25844
- var zeego = getZeego();
25845
- if (!zeego.isEnabled) {
26104
+ var adapter = getNativeMenuAdapter();
26105
+ if (!adapter) {
25846
26106
  if (!warned) {
25847
26107
  warned = true;
25848
- console.warn(`Warning: Must call import '@tamagui/native/setup-zeego' at your app entry point to use native menus`);
26108
+ console.warn(`Warning: Register a native menu adapter before rendering Tamagui native menus`);
25849
26109
  }
25850
26110
  return null;
25851
26111
  }
25852
- var menu = isContextMenu ? zeego.state.ContextMenu : zeego.state.DropdownMenu;
26112
+ var menu = isContextMenu ? adapter.ContextMenu : adapter.Menu;
25853
26113
  resolved = {
25854
26114
  menu,
25855
26115
  componentMap: {
25856
26116
  SubContent: menu.SubContent,
26117
+ SubTrigger: menu.SubTrigger,
25857
26118
  Content: menu.Content,
25858
26119
  Sub: menu.Sub,
25859
26120
  Group: menu.Group,
25860
- SubTrigger: menu.SubTrigger
26121
+ Item: menu.Item,
26122
+ ItemTitle: menu.ItemTitle,
26123
+ ItemSubtitle: menu.ItemSubtitle,
26124
+ ItemIcon: menu.ItemIcon,
26125
+ ItemImage: menu.ItemImage,
26126
+ ItemIndicator: menu.ItemIndicator,
26127
+ Label: menu.Label,
26128
+ Separator: menu.Separator,
26129
+ CheckboxItem: menu.CheckboxItem,
26130
+ Preview: menu.Preview,
26131
+ Auxiliary: menu.Auxiliary
25861
26132
  }
25862
26133
  };
25863
26134
  return resolved;
@@ -25895,7 +26166,9 @@ var createNativeMenu = function(MenuType) {
25895
26166
  var release = function() {
25896
26167
  return triggerBoundaryHandlers === null || triggerBoundaryHandlers === void 0 ? void 0 : triggerBoundaryHandlers.release(debugName);
25897
26168
  };
25898
- result.push(/* @__PURE__ */ react$1.default.cloneElement(child, {
26169
+ var { children: triggerChildren } = props, triggerProps = _objectWithoutProperties(props, _excluded$28);
26170
+ result.push(/* @__PURE__ */ react$1.default.createElement(menu.Trigger, _objectSpread2(_objectSpread2({}, triggerProps), {}, {
26171
+ key: child.key,
25899
26172
  onTouchStart: composeHandlers(claim, props.onTouchStart),
25900
26173
  onTouchEnd: composeHandlers(props.onTouchEnd, release),
25901
26174
  onTouchCancel: composeHandlers(props.onTouchCancel, release),
@@ -25904,11 +26177,11 @@ var createNativeMenu = function(MenuType) {
25904
26177
  onResponderTerminate: composeHandlers(props.onResponderTerminate, release),
25905
26178
  onPressIn: composeHandlers(claim, props.onPressIn),
25906
26179
  onPressOut: composeHandlers(props.onPressOut, release)
25907
- }));
26180
+ }), triggerChildren));
25908
26181
  return;
25909
26182
  }
25910
26183
  if (displayName.includes("RadioGroup")) {
25911
- var { value: rgValue, onValueChange: rgOnValueChange, children: rgChildren } = props, rest = _objectWithoutProperties(props, _excluded$28);
26184
+ var { value: rgValue, onValueChange: rgOnValueChange, children: rgChildren } = props, rest = _objectWithoutProperties(props, _excluded2$14);
25912
26185
  result.push(/* @__PURE__ */ react$1.default.createElement(menu.Group, _objectSpread2(_objectSpread2({}, rest), {}, { key: child.key }), transformChildren(menu, map, rgChildren, false, triggerBoundaryHandlers, {
25913
26186
  value: rgValue,
25914
26187
  onValueChange: rgOnValueChange
@@ -25916,7 +26189,7 @@ var createNativeMenu = function(MenuType) {
25916
26189
  return;
25917
26190
  }
25918
26191
  if (displayName.includes("RadioItem") && radioContext) {
25919
- var { value: itemValue, children: rChildren } = props, rest1 = _objectWithoutProperties(props, _excluded2$14);
26192
+ var { value: itemValue, children: rChildren } = props, rest1 = _objectWithoutProperties(props, _excluded3$10);
25920
26193
  var cleanChildren = react$1.default.Children.map(rChildren, function(c) {
25921
26194
  var _c_type;
25922
26195
  if (!/* @__PURE__ */ react$1.default.isValidElement(c)) return c;
@@ -25930,12 +26203,12 @@ var createNativeMenu = function(MenuType) {
25930
26203
  var _radioContext_onValueChange;
25931
26204
  return (_radioContext_onValueChange = radioContext.onValueChange) === null || _radioContext_onValueChange === void 0 ? void 0 : _radioContext_onValueChange.call(radioContext, itemValue);
25932
26205
  }
25933
- }), cleanChildren));
26206
+ }), transformChildren(menu, map, cleanChildren, false, triggerBoundaryHandlers, radioContext)));
25934
26207
  return;
25935
26208
  }
25936
26209
  var componentType = getComponentType(displayName);
25937
26210
  if (componentType === "CheckboxItem") {
25938
- var { checked, onCheckedChange, value, onValueChange, children: cbChildren } = props, rest2 = _objectWithoutProperties(props, _excluded3$10);
26211
+ var { checked, onCheckedChange, value, onValueChange, children: cbChildren } = props, rest2 = _objectWithoutProperties(props, _excluded4$8);
25939
26212
  var finalValue = value !== null && value !== void 0 ? value : checked ? "on" : "off";
25940
26213
  var finalOnValueChange = onValueChange !== null && onValueChange !== void 0 ? onValueChange : onCheckedChange && function(v) {
25941
26214
  return onCheckedChange(v === "on");
@@ -25950,19 +26223,20 @@ var createNativeMenu = function(MenuType) {
25950
26223
  key: child.key,
25951
26224
  value: finalValue,
25952
26225
  onValueChange: finalOnValueChange
25953
- }), cleanChildren1));
26226
+ }), transformChildren(menu, map, cleanChildren1, false, triggerBoundaryHandlers, radioContext)));
25954
26227
  return;
25955
26228
  }
25956
26229
  if (componentType) {
25957
- var { children: childChildren } = props, restProps = _objectWithoutProperties(props, _excluded4$8);
26230
+ var { children: childChildren } = props, restProps = _objectWithoutProperties(props, _excluded5$6);
26231
+ var AdapterComponent = map[componentType];
25958
26232
  var isContainer = CONTAINER_TYPES.includes(componentType);
25959
26233
  var shouldReverse = componentType === "Content" || componentType === "SubContent";
25960
- result.push(/* @__PURE__ */ react$1.default.createElement(map[componentType], _objectSpread2(_objectSpread2({}, restProps), {}, { key: child.key }), isContainer ? transformChildren(menu, map, childChildren, shouldReverse, triggerBoundaryHandlers, radioContext) : childChildren));
26234
+ result.push(/* @__PURE__ */ react$1.default.createElement(AdapterComponent, _objectSpread2(_objectSpread2({}, restProps), {}, { key: child.key }), isContainer ? transformChildren(menu, map, childChildren, shouldReverse, triggerBoundaryHandlers, radioContext) : childChildren));
25961
26235
  return;
25962
26236
  }
25963
26237
  if (isItemLike(props, displayName)) {
25964
- var { children: itemChildren } = props, itemProps = _objectWithoutProperties(props, _excluded5$6);
25965
- result.push(/* @__PURE__ */ react$1.default.createElement(menu.Item, _objectSpread2(_objectSpread2({}, itemProps), {}, { key: child.key }), itemChildren));
26238
+ var { children: itemChildren } = props, itemProps = _objectWithoutProperties(props, _excluded6$4);
26239
+ result.push(/* @__PURE__ */ react$1.default.createElement(menu.Item, _objectSpread2(_objectSpread2({}, itemProps), {}, { key: child.key }), transformChildren(menu, map, itemChildren, false, triggerBoundaryHandlers, radioContext)));
25966
26240
  return;
25967
26241
  }
25968
26242
  result.push(child);
@@ -25970,7 +26244,7 @@ var createNativeMenu = function(MenuType) {
25970
26244
  if (isIos && shouldReverseOnIos && !isContextMenu) result.reverse();
25971
26245
  return result;
25972
26246
  }
25973
- function lazyZeego(name, displayName) {
26247
+ function lazyAdapter(name, displayName) {
25974
26248
  var Comp = function(props) {
25975
26249
  var z = resolve();
25976
26250
  if (!z) return null;
@@ -25979,20 +26253,20 @@ var createNativeMenu = function(MenuType) {
25979
26253
  Comp.displayName = displayName || name;
25980
26254
  return Comp;
25981
26255
  }
25982
- var Trigger = lazyZeego("Trigger");
25983
- var Content = lazyZeego("Content");
25984
- var Item = lazyZeego("Item");
25985
- var ItemTitle = lazyZeego("ItemTitle");
25986
- var ItemSubtitle = lazyZeego("ItemSubtitle");
25987
- var ItemIcon = lazyZeego("ItemIcon");
25988
- var ItemImage = lazyZeego("ItemImage");
25989
- var ItemIndicator = lazyZeego("ItemIndicator");
25990
- var Group = lazyZeego("Group");
25991
- var Label = lazyZeego("Label");
25992
- var Separator = lazyZeego("Separator");
25993
- var Sub = lazyZeego("Sub");
25994
- var SubTrigger = lazyZeego("SubTrigger");
25995
- var SubContent = lazyZeego("SubContent");
26256
+ var Trigger = lazyAdapter("Trigger");
26257
+ var Content = lazyAdapter("Content");
26258
+ var Item = lazyAdapter("Item");
26259
+ var ItemTitle = lazyAdapter("ItemTitle");
26260
+ var ItemSubtitle = lazyAdapter("ItemSubtitle");
26261
+ var ItemIcon = lazyAdapter("ItemIcon");
26262
+ var ItemImage = lazyAdapter("ItemImage");
26263
+ var ItemIndicator = lazyAdapter("ItemIndicator");
26264
+ var Group = lazyAdapter("Group");
26265
+ var Label = lazyAdapter("Label");
26266
+ var Separator = lazyAdapter("Separator");
26267
+ var Sub = lazyAdapter("Sub");
26268
+ var SubTrigger = lazyAdapter("SubTrigger");
26269
+ var SubContent = lazyAdapter("SubContent");
25996
26270
  var Portal = function(param) {
25997
26271
  var { children } = param;
25998
26272
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children });
@@ -26016,11 +26290,11 @@ var createNativeMenu = function(MenuType) {
26016
26290
  return null;
26017
26291
  };
26018
26292
  CheckboxItem.displayName = "CheckboxItem";
26019
- var Preview = isContextMenu ? lazyZeego("Preview", `${MenuType}Preview`) : function() {
26293
+ var Preview = isContextMenu ? lazyAdapter("Preview", `${MenuType}Preview`) : function() {
26020
26294
  return null;
26021
26295
  };
26022
26296
  Preview.displayName = `${MenuType}Preview`;
26023
- var Auxiliary = isContextMenu ? lazyZeego("Auxiliary", `${MenuType}Auxiliary`) : function() {
26297
+ var Auxiliary = isContextMenu ? lazyAdapter("Auxiliary", `${MenuType}Auxiliary`) : function() {
26024
26298
  return null;
26025
26299
  };
26026
26300
  Auxiliary.displayName = `${MenuType}Auxiliary`;