one 1.21.7 → 1.21.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.
Files changed (209) hide show
  1. package/dist/cjs/cli/dev.native.js.map +1 -1
  2. package/dist/cjs/cli.cjs +0 -3
  3. package/dist/cjs/cli.native.js +0 -3
  4. package/dist/cjs/cli.native.js.map +1 -1
  5. package/dist/cjs/image/getImageData.cjs +1 -1
  6. package/dist/cjs/image/getImageData.native.js +1 -1
  7. package/dist/cjs/image/getImageData.native.js.map +1 -1
  8. package/dist/cjs/index.native.js.map +1 -1
  9. package/dist/cjs/layouts/Stack.cjs +5 -5
  10. package/dist/cjs/layouts/Stack.native.js +5 -5
  11. package/dist/cjs/layouts/Stack.native.js.map +1 -1
  12. package/dist/cjs/layouts/stack-utils/StackScreen.cjs +3 -0
  13. package/dist/cjs/layouts/stack-utils/StackScreen.native.js +3 -0
  14. package/dist/cjs/layouts/stack-utils/StackScreen.native.js.map +1 -1
  15. package/dist/cjs/layouts/stack-utils/StackToolbar.cjs +419 -0
  16. package/dist/cjs/layouts/stack-utils/StackToolbar.native.js +453 -0
  17. package/dist/cjs/layouts/stack-utils/StackToolbar.native.js.map +1 -0
  18. package/dist/cjs/layouts/stack-utils/StackToolbar.types.cjs +18 -0
  19. package/dist/cjs/layouts/stack-utils/StackToolbar.types.native.js +21 -0
  20. package/dist/cjs/layouts/stack-utils/StackToolbar.types.native.js.map +1 -0
  21. package/dist/cjs/layouts/stack-utils/__tests__/StackToolbar.runtime.test.cjs +63 -0
  22. package/dist/cjs/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js +73 -0
  23. package/dist/cjs/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js.map +1 -0
  24. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.cjs +205 -0
  25. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.native.js +220 -0
  26. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.native.js.map +1 -1
  27. package/dist/cjs/layouts/stack-utils/index.cjs +2 -0
  28. package/dist/cjs/layouts/stack-utils/index.native.js +2 -0
  29. package/dist/cjs/layouts/stack-utils/index.native.js.map +1 -1
  30. package/dist/cjs/layouts/withLayoutContext.cjs +39 -8
  31. package/dist/cjs/layouts/withLayoutContext.native.js +43 -8
  32. package/dist/cjs/layouts/withLayoutContext.native.js.map +1 -1
  33. package/dist/cjs/layouts/withLayoutContext.test.cjs +96 -0
  34. package/dist/cjs/layouts/withLayoutContext.test.native.js +100 -0
  35. package/dist/cjs/layouts/withLayoutContext.test.native.js.map +1 -0
  36. package/dist/cjs/router/Route.cjs +3 -0
  37. package/dist/cjs/router/Route.native.js +3 -0
  38. package/dist/cjs/router/Route.native.js.map +1 -1
  39. package/dist/cjs/router/protectedRoutes.test.cjs +22 -0
  40. package/dist/cjs/router/protectedRoutes.test.native.js +25 -0
  41. package/dist/cjs/router/protectedRoutes.test.native.js.map +1 -0
  42. package/dist/cjs/router/router.cjs +26 -8
  43. package/dist/cjs/router/router.native.js +26 -8
  44. package/dist/cjs/router/router.native.js.map +1 -1
  45. package/dist/cjs/router/useScreens.cjs +38 -11
  46. package/dist/cjs/router/useScreens.native.js +39 -11
  47. package/dist/cjs/router/useScreens.native.js.map +1 -1
  48. package/dist/cjs/router/useScreens.test.cjs +134 -0
  49. package/dist/cjs/router/useScreens.test.native.js +163 -0
  50. package/dist/cjs/router/useScreens.test.native.js.map +1 -0
  51. package/dist/cjs/views/Navigator.cjs +14 -6
  52. package/dist/cjs/views/Navigator.native.js +14 -6
  53. package/dist/cjs/views/Navigator.native.js.map +1 -1
  54. package/dist/cjs/views/Protected.native.js.map +1 -1
  55. package/dist/cjs/views/SuspenseFallback.cjs +18 -0
  56. package/dist/cjs/views/SuspenseFallback.native.js +21 -0
  57. package/dist/cjs/views/SuspenseFallback.native.js.map +1 -0
  58. package/dist/cjs/vite/plugins/fileSystemRouterPlugin.cjs +47 -7
  59. package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js +47 -7
  60. package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js.map +1 -1
  61. package/dist/cjs/vite/plugins/fileSystemRouterPlugin.test.cjs +15 -6
  62. package/dist/cjs/vite/plugins/fileSystemRouterPlugin.test.native.js +15 -6
  63. package/dist/cjs/vite/plugins/fileSystemRouterPlugin.test.native.js.map +1 -1
  64. package/dist/esm/cli/dev.mjs.map +1 -1
  65. package/dist/esm/cli/dev.native.js.map +1 -1
  66. package/dist/esm/cli.mjs +0 -3
  67. package/dist/esm/cli.mjs.map +1 -1
  68. package/dist/esm/cli.native.js +0 -3
  69. package/dist/esm/cli.native.js.map +1 -1
  70. package/dist/esm/image/getImageData.mjs +1 -1
  71. package/dist/esm/image/getImageData.mjs.map +1 -1
  72. package/dist/esm/image/getImageData.native.js +1 -1
  73. package/dist/esm/image/getImageData.native.js.map +1 -1
  74. package/dist/esm/index.js.map +1 -1
  75. package/dist/esm/index.mjs.map +1 -1
  76. package/dist/esm/index.native.js.map +1 -1
  77. package/dist/esm/layouts/Stack.mjs +6 -6
  78. package/dist/esm/layouts/Stack.mjs.map +1 -1
  79. package/dist/esm/layouts/Stack.native.js +6 -6
  80. package/dist/esm/layouts/Stack.native.js.map +1 -1
  81. package/dist/esm/layouts/stack-utils/StackScreen.mjs +3 -0
  82. package/dist/esm/layouts/stack-utils/StackScreen.mjs.map +1 -1
  83. package/dist/esm/layouts/stack-utils/StackScreen.native.js +3 -0
  84. package/dist/esm/layouts/stack-utils/StackScreen.native.js.map +1 -1
  85. package/dist/esm/layouts/stack-utils/StackToolbar.mjs +384 -0
  86. package/dist/esm/layouts/stack-utils/StackToolbar.mjs.map +1 -0
  87. package/dist/esm/layouts/stack-utils/StackToolbar.native.js +416 -0
  88. package/dist/esm/layouts/stack-utils/StackToolbar.native.js.map +1 -0
  89. package/dist/esm/layouts/stack-utils/StackToolbar.types.mjs +2 -0
  90. package/dist/esm/layouts/stack-utils/StackToolbar.types.mjs.map +1 -0
  91. package/dist/esm/layouts/stack-utils/StackToolbar.types.native.js +2 -0
  92. package/dist/esm/layouts/stack-utils/StackToolbar.types.native.js.map +1 -0
  93. package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.mjs +40 -0
  94. package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.mjs.map +1 -0
  95. package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js +47 -0
  96. package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js.map +1 -0
  97. package/dist/esm/layouts/stack-utils/__tests__/composition.test.mjs +205 -0
  98. package/dist/esm/layouts/stack-utils/__tests__/composition.test.mjs.map +1 -1
  99. package/dist/esm/layouts/stack-utils/__tests__/composition.test.native.js +220 -0
  100. package/dist/esm/layouts/stack-utils/__tests__/composition.test.native.js.map +1 -1
  101. package/dist/esm/layouts/stack-utils/index.mjs +2 -1
  102. package/dist/esm/layouts/stack-utils/index.mjs.map +1 -1
  103. package/dist/esm/layouts/stack-utils/index.native.js +2 -1
  104. package/dist/esm/layouts/stack-utils/index.native.js.map +1 -1
  105. package/dist/esm/layouts/withLayoutContext.mjs +41 -11
  106. package/dist/esm/layouts/withLayoutContext.mjs.map +1 -1
  107. package/dist/esm/layouts/withLayoutContext.native.js +45 -11
  108. package/dist/esm/layouts/withLayoutContext.native.js.map +1 -1
  109. package/dist/esm/layouts/withLayoutContext.test.mjs +73 -0
  110. package/dist/esm/layouts/withLayoutContext.test.mjs.map +1 -0
  111. package/dist/esm/layouts/withLayoutContext.test.native.js +74 -0
  112. package/dist/esm/layouts/withLayoutContext.test.native.js.map +1 -0
  113. package/dist/esm/router/Route.mjs +3 -1
  114. package/dist/esm/router/Route.mjs.map +1 -1
  115. package/dist/esm/router/Route.native.js +3 -1
  116. package/dist/esm/router/Route.native.js.map +1 -1
  117. package/dist/esm/router/protectedRoutes.test.mjs +23 -0
  118. package/dist/esm/router/protectedRoutes.test.mjs.map +1 -0
  119. package/dist/esm/router/protectedRoutes.test.native.js +23 -0
  120. package/dist/esm/router/protectedRoutes.test.native.js.map +1 -0
  121. package/dist/esm/router/router.mjs +26 -9
  122. package/dist/esm/router/router.mjs.map +1 -1
  123. package/dist/esm/router/router.native.js +26 -9
  124. package/dist/esm/router/router.native.js.map +1 -1
  125. package/dist/esm/router/useScreens.mjs +39 -11
  126. package/dist/esm/router/useScreens.mjs.map +1 -1
  127. package/dist/esm/router/useScreens.native.js +40 -11
  128. package/dist/esm/router/useScreens.native.js.map +1 -1
  129. package/dist/esm/router/useScreens.test.mjs +105 -0
  130. package/dist/esm/router/useScreens.test.mjs.map +1 -0
  131. package/dist/esm/router/useScreens.test.native.js +130 -0
  132. package/dist/esm/router/useScreens.test.native.js.map +1 -0
  133. package/dist/esm/views/Navigator.mjs +15 -7
  134. package/dist/esm/views/Navigator.mjs.map +1 -1
  135. package/dist/esm/views/Navigator.native.js +15 -7
  136. package/dist/esm/views/Navigator.native.js.map +1 -1
  137. package/dist/esm/views/Protected.mjs.map +1 -1
  138. package/dist/esm/views/Protected.native.js.map +1 -1
  139. package/dist/esm/views/SuspenseFallback.mjs +2 -0
  140. package/dist/esm/views/SuspenseFallback.mjs.map +1 -0
  141. package/dist/esm/views/SuspenseFallback.native.js +2 -0
  142. package/dist/esm/views/SuspenseFallback.native.js.map +1 -0
  143. package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs +47 -7
  144. package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs.map +1 -1
  145. package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js +47 -7
  146. package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js.map +1 -1
  147. package/dist/esm/vite/plugins/fileSystemRouterPlugin.test.mjs +15 -6
  148. package/dist/esm/vite/plugins/fileSystemRouterPlugin.test.mjs.map +1 -1
  149. package/dist/esm/vite/plugins/fileSystemRouterPlugin.test.native.js +15 -6
  150. package/dist/esm/vite/plugins/fileSystemRouterPlugin.test.native.js.map +1 -1
  151. package/package.json +12 -11
  152. package/src/cli/dev.ts +0 -1
  153. package/src/cli.ts +0 -3
  154. package/src/image/getImageData.ts +2 -2
  155. package/src/index.ts +12 -0
  156. package/src/layouts/Stack.tsx +6 -4
  157. package/src/layouts/stack-utils/README.md +1 -0
  158. package/src/layouts/stack-utils/StackScreen.tsx +7 -0
  159. package/src/layouts/stack-utils/StackToolbar.tsx +550 -0
  160. package/src/layouts/stack-utils/StackToolbar.types.ts +98 -0
  161. package/src/layouts/stack-utils/__tests__/StackToolbar.runtime.test.tsx +46 -0
  162. package/src/layouts/stack-utils/__tests__/composition.test.tsx +176 -0
  163. package/src/layouts/stack-utils/index.tsx +16 -0
  164. package/src/layouts/withLayoutContext.test.tsx +74 -0
  165. package/src/layouts/withLayoutContext.tsx +71 -12
  166. package/src/router/Route.tsx +8 -0
  167. package/src/router/protectedRoutes.test.ts +35 -0
  168. package/src/router/router.ts +48 -20
  169. package/src/router/useScreens.test.tsx +139 -0
  170. package/src/router/useScreens.tsx +59 -13
  171. package/src/views/Navigator.tsx +25 -5
  172. package/src/views/Protected.tsx +3 -0
  173. package/src/views/SuspenseFallback.ts +7 -0
  174. package/src/vite/plugins/fileSystemRouterPlugin.test.ts +15 -6
  175. package/src/vite/plugins/fileSystemRouterPlugin.tsx +52 -7
  176. package/types/cli/dev.d.ts +0 -1
  177. package/types/cli/dev.d.ts.map +1 -1
  178. package/types/image/getImageData.d.ts +1 -1
  179. package/types/image/getImageData.d.ts.map +1 -1
  180. package/types/index.d.ts +2 -1
  181. package/types/index.d.ts.map +1 -1
  182. package/types/layouts/Stack.d.ts +11 -0
  183. package/types/layouts/Stack.d.ts.map +1 -1
  184. package/types/layouts/stack-utils/StackScreen.d.ts.map +1 -1
  185. package/types/layouts/stack-utils/StackToolbar.d.ts +26 -0
  186. package/types/layouts/stack-utils/StackToolbar.d.ts.map +1 -0
  187. package/types/layouts/stack-utils/StackToolbar.types.d.ts +82 -0
  188. package/types/layouts/stack-utils/StackToolbar.types.d.ts.map +1 -0
  189. package/types/layouts/stack-utils/index.d.ts +3 -1
  190. package/types/layouts/stack-utils/index.d.ts.map +1 -1
  191. package/types/layouts/withLayoutContext.d.ts +7 -0
  192. package/types/layouts/withLayoutContext.d.ts.map +1 -1
  193. package/types/layouts/withLayoutContext.test.d.ts +2 -0
  194. package/types/layouts/withLayoutContext.test.d.ts.map +1 -0
  195. package/types/router/Route.d.ts +4 -0
  196. package/types/router/Route.d.ts.map +1 -1
  197. package/types/router/protectedRoutes.test.d.ts +2 -0
  198. package/types/router/protectedRoutes.test.d.ts.map +1 -0
  199. package/types/router/router.d.ts +4 -6
  200. package/types/router/router.d.ts.map +1 -1
  201. package/types/router/useScreens.d.ts.map +1 -1
  202. package/types/router/useScreens.test.d.ts +2 -0
  203. package/types/router/useScreens.test.d.ts.map +1 -0
  204. package/types/views/Navigator.d.ts.map +1 -1
  205. package/types/views/Protected.d.ts +3 -0
  206. package/types/views/Protected.d.ts.map +1 -1
  207. package/types/views/SuspenseFallback.d.ts +8 -0
  208. package/types/views/SuspenseFallback.d.ts.map +1 -0
  209. package/types/vite/plugins/fileSystemRouterPlugin.d.ts.map +1 -1
@@ -0,0 +1,453 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
24
+ value: true
25
+ }), mod);
26
+ var StackToolbar_exports = {};
27
+ __export(StackToolbar_exports, {
28
+ StackToolbar: () => StackToolbar,
29
+ StackToolbarBadge: () => StackToolbarBadge,
30
+ StackToolbarButton: () => StackToolbarButton,
31
+ StackToolbarIcon: () => StackToolbarIcon,
32
+ StackToolbarLabel: () => StackToolbarLabel,
33
+ StackToolbarMenu: () => StackToolbarMenu,
34
+ StackToolbarMenuAction: () => StackToolbarMenuAction,
35
+ StackToolbarSearchBarSlot: () => StackToolbarSearchBarSlot,
36
+ StackToolbarSpacer: () => StackToolbarSpacer,
37
+ StackToolbarView: () => StackToolbarView,
38
+ appendStackToolbarPropsToOptions: () => appendStackToolbarPropsToOptions
39
+ });
40
+ module.exports = __toCommonJS(StackToolbar_exports);
41
+ var import_jsx_runtime = require("react/jsx-runtime");
42
+ var import_native = require("@vxrn/native");
43
+ var import_react = require("react");
44
+ var import_react_native = require("react-native");
45
+ var import_use_isomorphic_layout_effect = require("@vxrn/use-isomorphic-layout-effect");
46
+ var import_useNavigation = require("../../router/useNavigation.native.js");
47
+ var import_children = require("../../utils/children.native.js");
48
+ var StackToolbarPlacementContext = /* @__PURE__ */(0, import_react.createContext)(null);
49
+ function StackToolbarLabel(_props) {
50
+ return null;
51
+ }
52
+ function StackToolbarIcon(_props) {
53
+ return null;
54
+ }
55
+ function StackToolbarBadge(_props) {
56
+ return null;
57
+ }
58
+ function getToolbarContent(children, icon, iconRenderingMode) {
59
+ var label = "";
60
+ var iconProps = typeof icon === "string" ? {
61
+ sf: icon
62
+ } : icon ? {
63
+ src: icon,
64
+ renderingMode: iconRenderingMode
65
+ } : void 0;
66
+ var badge;
67
+ import_react.Children.forEach(children, function (child) {
68
+ if (typeof child === "string" || typeof child === "number") {
69
+ label += String(child);
70
+ } else if ((0, import_children.isChildOfType)(child, StackToolbarLabel)) {
71
+ var _child_props_children;
72
+ label = (_child_props_children = child.props.children) !== null && _child_props_children !== void 0 ? _child_props_children : "";
73
+ } else if ((0, import_children.isChildOfType)(child, StackToolbarIcon)) {
74
+ iconProps = child.props;
75
+ } else if ((0, import_children.isChildOfType)(child, StackToolbarBadge)) {
76
+ badge = child.props;
77
+ }
78
+ });
79
+ return {
80
+ label,
81
+ icon: iconProps,
82
+ badge
83
+ };
84
+ }
85
+ function getHeaderIcon(content, tintColor) {
86
+ var _content_icon, _content_icon1, _content_icon2;
87
+ if ((_content_icon = content.icon) === null || _content_icon === void 0 ? void 0 : _content_icon.sf) {
88
+ return {
89
+ type: "sfSymbol",
90
+ name: content.icon.sf
91
+ };
92
+ }
93
+ if ((_content_icon1 = content.icon) === null || _content_icon1 === void 0 ? void 0 : _content_icon1.src) {
94
+ var _content_icon_renderingMode;
95
+ return {
96
+ type: "image",
97
+ source: content.icon.src,
98
+ tinted: ((_content_icon_renderingMode = content.icon.renderingMode) !== null && _content_icon_renderingMode !== void 0 ? _content_icon_renderingMode : tintColor ? "template" : "original") === "template"
99
+ };
100
+ }
101
+ if ((_content_icon2 = content.icon) === null || _content_icon2 === void 0 ? void 0 : _content_icon2.xcasset) {
102
+ var _content_icon_renderingMode1;
103
+ return {
104
+ type: "image",
105
+ source: {
106
+ uri: content.icon.xcasset
107
+ },
108
+ tinted: ((_content_icon_renderingMode1 = content.icon.renderingMode) !== null && _content_icon_renderingMode1 !== void 0 ? _content_icon_renderingMode1 : tintColor ? "template" : "original") === "template"
109
+ };
110
+ }
111
+ return void 0;
112
+ }
113
+ function getHeaderItemSharedProps(props, content) {
114
+ var _props_accessibilityLabel, _content_badge_children;
115
+ var _content_badge;
116
+ var labelStyle = import_react_native.StyleSheet.flatten(props.style);
117
+ var badgeStyle = import_react_native.StyleSheet.flatten((_content_badge = content.badge) === null || _content_badge === void 0 ? void 0 : _content_badge.style);
118
+ return {
119
+ label: content.label,
120
+ labelStyle,
121
+ icon: getHeaderIcon(content, props.tintColor),
122
+ variant: props.variant,
123
+ tintColor: props.tintColor,
124
+ disabled: props.disabled,
125
+ hidesSharedBackground: props.hidesSharedBackground,
126
+ sharesBackground: !props.separateBackground,
127
+ accessibilityLabel: (_props_accessibilityLabel = props.accessibilityLabel) !== null && _props_accessibilityLabel !== void 0 ? _props_accessibilityLabel : content.label,
128
+ accessibilityHint: props.accessibilityHint,
129
+ badge: content.badge ? {
130
+ value: (_content_badge_children = content.badge.children) !== null && _content_badge_children !== void 0 ? _content_badge_children : "",
131
+ style: badgeStyle
132
+ } : void 0
133
+ };
134
+ }
135
+ function getMenuItems(children) {
136
+ return import_react.Children.toArray(children).map(function (child) {
137
+ if ((0, import_children.isChildOfType)(child, StackToolbarMenuAction)) {
138
+ var _child_props_onPress;
139
+ var content = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
140
+ return {
141
+ type: "action",
142
+ label: content.label,
143
+ description: child.props.subtitle,
144
+ icon: getHeaderIcon(content, child.props.tintColor),
145
+ onPress: (_child_props_onPress = child.props.onPress) !== null && _child_props_onPress !== void 0 ? _child_props_onPress : function () {},
146
+ state: child.props.isOn ? "on" : "off",
147
+ disabled: child.props.disabled,
148
+ destructive: child.props.destructive,
149
+ hidden: child.props.hidden,
150
+ keepsMenuPresented: child.props.unstable_keepPresented,
151
+ discoverabilityLabel: child.props.discoverabilityLabel
152
+ };
153
+ }
154
+ if ((0, import_children.isChildOfType)(child, StackToolbarMenu)) {
155
+ var content1 = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
156
+ return {
157
+ type: "submenu",
158
+ label: content1.label || child.props.title || "",
159
+ icon: getHeaderIcon(content1, child.props.tintColor),
160
+ inline: child.props.inline,
161
+ layout: child.props.palette ? "palette" : "default",
162
+ destructive: child.props.destructive,
163
+ multiselectable: child.props.singleSelection === false,
164
+ items: getMenuItems(child.props.children)
165
+ };
166
+ }
167
+ return null;
168
+ }).filter(function (item) {
169
+ return Boolean(item);
170
+ });
171
+ }
172
+ function convertToolbarChildToHeaderItem(child) {
173
+ if ((0, import_children.isChildOfType)(child, StackToolbarButton)) {
174
+ var _child_props_onPress;
175
+ if (child.props.hidden) return null;
176
+ var content = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
177
+ return {
178
+ ...getHeaderItemSharedProps(child.props, content),
179
+ type: "button",
180
+ onPress: (_child_props_onPress = child.props.onPress) !== null && _child_props_onPress !== void 0 ? _child_props_onPress : function () {},
181
+ selected: child.props.selected
182
+ };
183
+ }
184
+ if ((0, import_children.isChildOfType)(child, StackToolbarMenu)) {
185
+ if (child.props.hidden) return null;
186
+ var content1 = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
187
+ var contentWithTitle = {
188
+ ...content1,
189
+ label: content1.label || child.props.title || ""
190
+ };
191
+ return {
192
+ ...getHeaderItemSharedProps(child.props, contentWithTitle),
193
+ type: "menu",
194
+ menu: {
195
+ title: child.props.title,
196
+ multiselectable: child.props.singleSelection === false,
197
+ layout: child.props.palette ? "palette" : "default",
198
+ items: getMenuItems(child.props.children)
199
+ }
200
+ };
201
+ }
202
+ if ((0, import_children.isChildOfType)(child, StackToolbarSpacer)) {
203
+ if (child.props.hidden) return null;
204
+ if (child.props.width === void 0) {
205
+ if (process.env.NODE_ENV !== "production") {
206
+ console.warn("Stack.Toolbar.Spacer requires a width in header placements.");
207
+ }
208
+ return null;
209
+ }
210
+ return {
211
+ type: "spacing",
212
+ spacing: child.props.width
213
+ };
214
+ }
215
+ if ((0, import_children.isChildOfType)(child, StackToolbarView)) {
216
+ if (child.props.hidden) return null;
217
+ return {
218
+ type: "custom",
219
+ element: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.Fragment, {
220
+ children: child.props.children
221
+ }),
222
+ hidesSharedBackground: child.props.hidesSharedBackground
223
+ };
224
+ }
225
+ return null;
226
+ }
227
+ function appendStackToolbarPropsToOptions(options, props) {
228
+ var _props_placement;
229
+ if (import_react_native.Platform.OS !== "ios") return options;
230
+ var placement = (_props_placement = props.placement) !== null && _props_placement !== void 0 ? _props_placement : "bottom";
231
+ if (placement === "bottom") {
232
+ if (process.env.NODE_ENV !== "production") {
233
+ console.warn("Stack.Toolbar with bottom placement must be rendered in a page component, not inside Stack.Screen.");
234
+ }
235
+ return options;
236
+ }
237
+ if (placement !== "left" && placement !== "right") {
238
+ throw new Error(`Invalid placement "${placement}" for Stack.Toolbar. Expected "left", "right", or "bottom".`);
239
+ }
240
+ if (props.asChild) {
241
+ return placement === "left" ? {
242
+ ...options,
243
+ headerShown: true,
244
+ headerLeft: function () {
245
+ return props.children;
246
+ }
247
+ } : {
248
+ ...options,
249
+ headerShown: true,
250
+ headerRight: function () {
251
+ return props.children;
252
+ }
253
+ };
254
+ }
255
+ var allChildren = import_react.Children.toArray(props.children);
256
+ var items = allChildren.map(convertToolbarChildToHeaderItem).filter(function (item) {
257
+ return Boolean(item);
258
+ });
259
+ if (process.env.NODE_ENV !== "production" && items.length !== allChildren.length) {
260
+ var invalidChildren = allChildren.filter(function (child) {
261
+ return !(0, import_children.isChildOfType)(child, StackToolbarButton) && !(0, import_children.isChildOfType)(child, StackToolbarMenu) && !(0, import_children.isChildOfType)(child, StackToolbarSpacer) && !(0, import_children.isChildOfType)(child, StackToolbarView);
262
+ });
263
+ if (invalidChildren.length) {
264
+ console.warn(`Stack.Toolbar with placement="${placement}" only accepts Stack.Toolbar.Button, Menu, Spacer, and View children.`);
265
+ }
266
+ }
267
+ var getItems = function () {
268
+ return items;
269
+ };
270
+ return placement === "left" ? {
271
+ ...options,
272
+ headerShown: true,
273
+ unstable_headerLeftItems: getItems
274
+ } : {
275
+ ...options,
276
+ headerShown: true,
277
+ unstable_headerRightItems: getItems
278
+ };
279
+ }
280
+ function StackToolbarComponent(props) {
281
+ var _props_placement;
282
+ var parentPlacement = (0, import_react.useContext)(StackToolbarPlacementContext);
283
+ var navigation = (0, import_useNavigation.useNavigation)();
284
+ var placement = (_props_placement = props.placement) !== null && _props_placement !== void 0 ? _props_placement : "bottom";
285
+ var options = (0, import_react.useMemo)(function () {
286
+ return placement === "bottom" ? {} : appendStackToolbarPropsToOptions({}, props);
287
+ }, [placement, props.asChild, props.children]);
288
+ if (parentPlacement) {
289
+ throw new Error("Stack.Toolbar cannot be nested inside another Stack.Toolbar.");
290
+ }
291
+ (0, import_use_isomorphic_layout_effect.useIsomorphicLayoutEffect)(function () {
292
+ if (import_react_native.Platform.OS !== "ios" || placement === "bottom") return;
293
+ navigation.setOptions(options);
294
+ }, [navigation, options, placement]);
295
+ if (import_react_native.Platform.OS !== "ios" || placement !== "bottom") return null;
296
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(StackToolbarPlacementContext.Provider, {
297
+ value: "bottom",
298
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.ToolbarHost, {
299
+ children: props.children
300
+ })
301
+ });
302
+ }
303
+ function StackToolbarButton(props) {
304
+ var _props_image, _ref, _ref1, _props_accessibilityLabel;
305
+ var _content_badge, _content_icon, _content_icon1, _content_icon2, _content_icon3;
306
+ var placement = (0, import_react.useContext)(StackToolbarPlacementContext);
307
+ var identifier = (0, import_react.useId)();
308
+ if (import_react_native.Platform.OS !== "ios") return null;
309
+ if (!placement) throw new Error("Stack.Toolbar.Button must be used inside Stack.Toolbar.");
310
+ var content = getToolbarContent(props.children, props.icon, props.iconRenderingMode);
311
+ var badgeStyle = import_react_native.StyleSheet.flatten((_content_badge = content.badge) === null || _content_badge === void 0 ? void 0 : _content_badge.style);
312
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
313
+ identifier,
314
+ title: content.label,
315
+ systemImageName: (_content_icon = content.icon) === null || _content_icon === void 0 ? void 0 : _content_icon.sf,
316
+ xcassetName: (_content_icon1 = content.icon) === null || _content_icon1 === void 0 ? void 0 : _content_icon1.xcasset,
317
+ image: (_props_image = props.image) !== null && _props_image !== void 0 ? _props_image : (_content_icon2 = content.icon) === null || _content_icon2 === void 0 ? void 0 : _content_icon2.src,
318
+ imageRenderingMode: (_ref = (_ref1 = (_content_icon3 = content.icon) === null || _content_icon3 === void 0 ? void 0 : _content_icon3.renderingMode) !== null && _ref1 !== void 0 ? _ref1 : props.iconRenderingMode) !== null && _ref !== void 0 ? _ref : props.tintColor ? "template" : "original",
319
+ tintColor: props.tintColor,
320
+ hidesSharedBackground: props.hidesSharedBackground,
321
+ sharesBackground: !props.separateBackground,
322
+ barButtonItemStyle: props.variant === "done" ? "prominent" : props.variant,
323
+ hidden: props.hidden,
324
+ selected: props.selected,
325
+ badgeConfiguration: content.badge ? {
326
+ value: content.badge.children,
327
+ backgroundColor: badgeStyle === null || badgeStyle === void 0 ? void 0 : badgeStyle.backgroundColor,
328
+ color: badgeStyle === null || badgeStyle === void 0 ? void 0 : badgeStyle.color,
329
+ fontFamily: badgeStyle === null || badgeStyle === void 0 ? void 0 : badgeStyle.fontFamily,
330
+ fontSize: badgeStyle === null || badgeStyle === void 0 ? void 0 : badgeStyle.fontSize,
331
+ fontWeight: badgeStyle === null || badgeStyle === void 0 ? void 0 : badgeStyle.fontWeight
332
+ } : void 0,
333
+ titleStyle: import_react_native.StyleSheet.flatten(props.style),
334
+ accessibilityLabel: (_props_accessibilityLabel = props.accessibilityLabel) !== null && _props_accessibilityLabel !== void 0 ? _props_accessibilityLabel : content.label,
335
+ accessibilityHint: props.accessibilityHint,
336
+ disabled: props.disabled,
337
+ onSelected: props.onPress
338
+ });
339
+ }
340
+ function StackToolbarMenu(props) {
341
+ var _props_title, _props_image, _ref, _ref1, _props_accessibilityLabel;
342
+ var _content_icon, _content_icon1, _content_icon2, _content_icon3;
343
+ var placement = (0, import_react.useContext)(StackToolbarPlacementContext);
344
+ var identifier = (0, import_react.useId)();
345
+ if (import_react_native.Platform.OS !== "ios") return null;
346
+ if (!placement) throw new Error("Stack.Toolbar.Menu must be used inside Stack.Toolbar.");
347
+ var content = getToolbarContent(props.children, props.icon, props.iconRenderingMode);
348
+ var actions = import_react.Children.toArray(props.children).filter(function (child) {
349
+ return (0, import_children.isChildOfType)(child, StackToolbarMenu) || (0, import_children.isChildOfType)(child, StackToolbarMenuAction);
350
+ });
351
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.MenuAction, {
352
+ identifier,
353
+ title: (_props_title = props.title) !== null && _props_title !== void 0 ? _props_title : "",
354
+ label: content.label || props.title,
355
+ icon: (_content_icon = content.icon) === null || _content_icon === void 0 ? void 0 : _content_icon.sf,
356
+ xcassetName: (_content_icon1 = content.icon) === null || _content_icon1 === void 0 ? void 0 : _content_icon1.xcasset,
357
+ image: (_props_image = props.image) !== null && _props_image !== void 0 ? _props_image : (_content_icon2 = content.icon) === null || _content_icon2 === void 0 ? void 0 : _content_icon2.src,
358
+ imageRenderingMode: (_ref = (_ref1 = (_content_icon3 = content.icon) === null || _content_icon3 === void 0 ? void 0 : _content_icon3.renderingMode) !== null && _ref1 !== void 0 ? _ref1 : props.iconRenderingMode) !== null && _ref !== void 0 ? _ref : props.tintColor ? "template" : "original",
359
+ disabled: props.disabled,
360
+ destructive: props.destructive,
361
+ hidden: props.hidden,
362
+ accessibilityLabel: (_props_accessibilityLabel = props.accessibilityLabel) !== null && _props_accessibilityLabel !== void 0 ? _props_accessibilityLabel : content.label || props.title,
363
+ accessibilityHint: props.accessibilityHint,
364
+ displayInline: props.inline,
365
+ displayAsPalette: props.palette,
366
+ singleSelection: props.singleSelection,
367
+ preferredElementSize: props.elementSize,
368
+ tintColor: props.tintColor,
369
+ barButtonItemStyle: props.variant === "done" ? "prominent" : props.variant,
370
+ sharesBackground: !props.separateBackground,
371
+ hidesSharedBackground: props.hidesSharedBackground,
372
+ titleStyle: import_react_native.StyleSheet.flatten(props.style),
373
+ children: actions
374
+ });
375
+ }
376
+ function StackToolbarMenuAction(props) {
377
+ var _props_image, _ref, _ref1, _props_accessibilityLabel;
378
+ var _content_icon, _content_icon1, _content_icon2, _content_icon3;
379
+ var placement = (0, import_react.useContext)(StackToolbarPlacementContext);
380
+ var identifier = (0, import_react.useId)();
381
+ if (import_react_native.Platform.OS !== "ios") return null;
382
+ if (!placement) throw new Error("Stack.Toolbar.MenuAction must be used inside Stack.Toolbar.Menu.");
383
+ var content = getToolbarContent(props.children, props.icon, props.iconRenderingMode);
384
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.MenuAction, {
385
+ identifier,
386
+ title: content.label,
387
+ icon: (_content_icon = content.icon) === null || _content_icon === void 0 ? void 0 : _content_icon.sf,
388
+ xcassetName: (_content_icon1 = content.icon) === null || _content_icon1 === void 0 ? void 0 : _content_icon1.xcasset,
389
+ image: (_props_image = props.image) !== null && _props_image !== void 0 ? _props_image : (_content_icon2 = content.icon) === null || _content_icon2 === void 0 ? void 0 : _content_icon2.src,
390
+ imageRenderingMode: (_ref = (_ref1 = (_content_icon3 = content.icon) === null || _content_icon3 === void 0 ? void 0 : _content_icon3.renderingMode) !== null && _ref1 !== void 0 ? _ref1 : props.iconRenderingMode) !== null && _ref !== void 0 ? _ref : props.tintColor ? "template" : "original",
391
+ disabled: props.disabled,
392
+ destructive: props.destructive,
393
+ discoverabilityLabel: props.discoverabilityLabel,
394
+ subtitle: props.subtitle,
395
+ accessibilityLabel: (_props_accessibilityLabel = props.accessibilityLabel) !== null && _props_accessibilityLabel !== void 0 ? _props_accessibilityLabel : content.label,
396
+ accessibilityHint: props.accessibilityHint,
397
+ isOn: props.isOn,
398
+ keepPresented: props.unstable_keepPresented,
399
+ hidden: props.hidden,
400
+ onSelected: props.onPress
401
+ });
402
+ }
403
+ function StackToolbarSpacer(props) {
404
+ var placement = (0, import_react.useContext)(StackToolbarPlacementContext);
405
+ var identifier = (0, import_react.useId)();
406
+ if (import_react_native.Platform.OS !== "ios") return null;
407
+ if (!placement) throw new Error("Stack.Toolbar.Spacer must be used inside Stack.Toolbar.");
408
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
409
+ identifier,
410
+ type: props.width === void 0 ? "fluidSpacer" : "fixedSpacer",
411
+ width: props.width,
412
+ hidden: props.hidden,
413
+ sharesBackground: props.sharesBackground
414
+ });
415
+ }
416
+ function StackToolbarSearchBarSlot(props) {
417
+ var placement = (0, import_react.useContext)(StackToolbarPlacementContext);
418
+ var identifier = (0, import_react.useId)();
419
+ if (import_react_native.Platform.OS !== "ios") return null;
420
+ if (!placement) throw new Error("Stack.Toolbar.SearchBarSlot must be used inside Stack.Toolbar.");
421
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
422
+ identifier,
423
+ type: "searchBar",
424
+ hidden: props.hidden,
425
+ hidesSharedBackground: props.hidesSharedBackground,
426
+ sharesBackground: !props.separateBackground
427
+ });
428
+ }
429
+ function StackToolbarView(props) {
430
+ var placement = (0, import_react.useContext)(StackToolbarPlacementContext);
431
+ var identifier = (0, import_react.useId)();
432
+ if (import_react_native.Platform.OS !== "ios") return null;
433
+ if (!placement) throw new Error("Stack.Toolbar.View must be used inside Stack.Toolbar.");
434
+ if (props.hidden) return null;
435
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
436
+ identifier,
437
+ hidesSharedBackground: props.hidesSharedBackground,
438
+ sharesBackground: !props.separateBackground,
439
+ children: props.children
440
+ });
441
+ }
442
+ var StackToolbar = Object.assign(StackToolbarComponent, {
443
+ Button: StackToolbarButton,
444
+ Menu: StackToolbarMenu,
445
+ MenuAction: StackToolbarMenuAction,
446
+ Spacer: StackToolbarSpacer,
447
+ SearchBarSlot: StackToolbarSearchBarSlot,
448
+ View: StackToolbarView,
449
+ Label: StackToolbarLabel,
450
+ Icon: StackToolbarIcon,
451
+ Badge: StackToolbarBadge
452
+ });
453
+ //# sourceMappingURL=StackToolbar.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","StackToolbar_exports","__export","StackToolbar","StackToolbarBadge","StackToolbarButton","StackToolbarIcon","StackToolbarLabel","StackToolbarMenu","StackToolbarMenuAction","StackToolbarSearchBarSlot","StackToolbarSpacer","StackToolbarView","appendStackToolbarPropsToOptions","module","exports","import_jsx_runtime","require","import_native","import_react","import_react_native","import_use_isomorphic_layout_effect","import_useNavigation","import_children","StackToolbarPlacementContext","createContext","_props","getToolbarContent","children","icon","iconRenderingMode","label","iconProps","sf","src","renderingMode","badge","Children","forEach","child","String","isChildOfType","_child_props_children","props","getHeaderIcon","content","tintColor","_content_icon","_content_icon1","_content_icon2","type","name","_content_icon_renderingMode","source","tinted","xcasset","_content_icon_renderingMode1","uri","getHeaderItemSharedProps","_props_accessibilityLabel","_content_badge_children","_content_badge","labelStyle","StyleSheet","flatten","style","badgeStyle","variant","disabled","hidesSharedBackground","sharesBackground","separateBackground","accessibilityLabel","accessibilityHint","getMenuItems","toArray","map","_child_props_onPress","description","subtitle","onPress","state","isOn","destructive","hidden","keepsMenuPresented","unstable_keepPresented","discoverabilityLabel","content1","title","inline","layout","palette","multiselectable","singleSelection","items","filter","item","Boolean","convertToolbarChildToHeaderItem","selected","contentWithTitle","menu","width","process","env","NODE_ENV","console","warn","spacing","element","jsx","Fragment","options","_props_placement","Platform","OS","placement","Error","asChild","headerShown","headerLeft","headerRight","allChildren","length","invalidChildren","getItems","unstable_headerLeftItems","unstable_headerRightItems","StackToolbarComponent","parentPlacement","useContext","navigation","useNavigation","useMemo","useIsomorphicLayoutEffect","setOptions","Provider","ToolbarHost","_props_image","_ref","_ref1","_content_icon3","identifier","useId","ToolbarItem","systemImageName","xcassetName","image","imageRenderingMode","barButtonItemStyle","badgeConfiguration","backgroundColor","color","fontFamily","fontSize","fontWeight","titleStyle","onSelected","_props_title","actions","MenuAction","displayInline","displayAsPalette","preferredElementSize","elementSize","keepPresented"],"sources":["../../../../src/layouts/stack-utils/StackToolbar.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,YAAA,EAAAA,CAAA,KA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IAAC,CAAAC,SAAA,YAAAC,KAAA;EAAA,0BAAAtG,kBAAA,CAAA+F,GAAA,EAAA7F,aAAA,CAAA+H,WAAA;IAAAF,UACC;IAAA7F,IACA,EAAAP,KAAA,CAAA4D,KAAA,UAAuB,IAAM;IAAAA,KAC7B,EAAA5D,KAAA,CAAA4D,KAAA;IAAyBnB,MAExB,EAAAzC,KAAA,CAAAyC,MAAM;IAAAd,gBAAA,EAAA3B,KAAA,CAAA2B;EACT;AAEJ;AAEO,SAAM5D,yBAAsBA,CAAOiC,KAAA;EACxC,IAAA0E,SAAQ,OAAAlG,YAAA,CAAAgH,UAAA,EAAA3G,4BAAA;EACR,IAAAuH,UAAM,OAAA5H,YAAA,CAAA6H,KAAA;EACN,IAAA5H,mBAAY,CAAA+F,QAAA,CAAAC,EAAA;EACZ,KAAAC,SAAQ,YAAAC,KAAA;EACR,sBAAe,IAAAtG,kBAAA,CAAA+F,GAAA,EAAA7F,aAAA,CAAA+H,WAAA;IACfF,UAAM;IACN7F,IAAA,EAAO;IACPkC,MAAM,EAAAzC,KAAA,CAAAyC,MAAA;IACNf,qBAAO,EAAA1B,KAAA,CAAA0B,qBAAA;IACRC,gBAAA,GAAA3B,KAAA,CAAA4B","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
8
+ get: () => from[key],
9
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
+ });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
+ value: true
16
+ }), mod);
17
+ var StackToolbar_types_exports = {};
18
+ module.exports = __toCommonJS(StackToolbar_types_exports);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
14
+ return to;
15
+ };
16
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
17
+ value: true
18
+ }), mod);
19
+ var StackToolbar_types_exports = {};
20
+ module.exports = __toCommonJS(StackToolbar_types_exports);
21
+ //# sourceMappingURL=StackToolbar.types.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","StackToolbar_types_exports"],"sources":["../../../../src/layouts/stack-utils/StackToolbar.types.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,0BAAA","ignoreList":[]}
@@ -0,0 +1,63 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
22
+ value: mod,
23
+ enumerable: true
24
+ }) : target, mod));
25
+ var import_react_test_renderer = __toESM(require("react-test-renderer"), 1);
26
+ var import_react_native = require("react-native-web");
27
+ var import_vitest = require("vitest");
28
+ var import_StackToolbar = require("../StackToolbar.cjs");
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ const setOptions = import_vitest.vi.fn();
31
+ import_vitest.vi.mock("../../../router/useNavigation", () => ({
32
+ useNavigation: () => ({
33
+ setOptions
34
+ })
35
+ }));
36
+ (0, import_vitest.describe)("StackToolbar runtime options", () => {
37
+ const originalOS = import_react_native.Platform.OS;
38
+ (0, import_vitest.afterEach)(() => {
39
+ ;
40
+ import_react_native.Platform.OS = originalOS;
41
+ setOptions.mockClear();
42
+ });
43
+ (0, import_vitest.it)("does not write undefined header overrides when the toolbar unmounts", () => {
44
+ ;
45
+ import_react_native.Platform.OS = "ios";
46
+ let renderer;
47
+ (0, import_react_test_renderer.act)(() => {
48
+ renderer = import_react_test_renderer.default.create(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackToolbar.StackToolbar, {
49
+ placement: "right",
50
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackToolbar.StackToolbar.Button, {
51
+ icon: "bell"
52
+ })
53
+ }));
54
+ });
55
+ (0, import_vitest.expect)(setOptions).toHaveBeenCalledTimes(1);
56
+ (0, import_vitest.expect)(setOptions).toHaveBeenLastCalledWith(import_vitest.expect.objectContaining({
57
+ headerShown: true,
58
+ unstable_headerRightItems: import_vitest.expect.any(Function)
59
+ }));
60
+ (0, import_react_test_renderer.act)(() => renderer.unmount());
61
+ (0, import_vitest.expect)(setOptions).toHaveBeenCalledTimes(1);
62
+ });
63
+ });