one 1.21.8 → 1.21.9

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 (77) hide show
  1. package/dist/cjs/index.native.js.map +1 -1
  2. package/dist/cjs/layouts/Stack.cjs +1 -2
  3. package/dist/cjs/layouts/Stack.native.js +1 -2
  4. package/dist/cjs/layouts/Stack.native.js.map +1 -1
  5. package/dist/cjs/layouts/stack-utils/StackScreen.cjs +0 -3
  6. package/dist/cjs/layouts/stack-utils/StackScreen.native.js +0 -3
  7. package/dist/cjs/layouts/stack-utils/StackScreen.native.js.map +1 -1
  8. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.cjs +0 -205
  9. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.native.js +0 -220
  10. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.native.js.map +1 -1
  11. package/dist/cjs/layouts/stack-utils/index.cjs +0 -2
  12. package/dist/cjs/layouts/stack-utils/index.native.js +0 -2
  13. package/dist/cjs/layouts/stack-utils/index.native.js.map +1 -1
  14. package/dist/esm/image/getImageData.mjs.map +1 -1
  15. package/dist/esm/image/getImageData.native.js.map +1 -1
  16. package/dist/esm/index.js.map +1 -1
  17. package/dist/esm/index.mjs.map +1 -1
  18. package/dist/esm/index.native.js.map +1 -1
  19. package/dist/esm/layouts/Stack.mjs +2 -3
  20. package/dist/esm/layouts/Stack.mjs.map +1 -1
  21. package/dist/esm/layouts/Stack.native.js +2 -3
  22. package/dist/esm/layouts/Stack.native.js.map +1 -1
  23. package/dist/esm/layouts/stack-utils/StackScreen.mjs +0 -3
  24. package/dist/esm/layouts/stack-utils/StackScreen.mjs.map +1 -1
  25. package/dist/esm/layouts/stack-utils/StackScreen.native.js +0 -3
  26. package/dist/esm/layouts/stack-utils/StackScreen.native.js.map +1 -1
  27. package/dist/esm/layouts/stack-utils/__tests__/composition.test.mjs +0 -205
  28. package/dist/esm/layouts/stack-utils/__tests__/composition.test.mjs.map +1 -1
  29. package/dist/esm/layouts/stack-utils/__tests__/composition.test.native.js +0 -220
  30. package/dist/esm/layouts/stack-utils/__tests__/composition.test.native.js.map +1 -1
  31. package/dist/esm/layouts/stack-utils/index.mjs +1 -2
  32. package/dist/esm/layouts/stack-utils/index.mjs.map +1 -1
  33. package/dist/esm/layouts/stack-utils/index.native.js +1 -2
  34. package/dist/esm/layouts/stack-utils/index.native.js.map +1 -1
  35. package/package.json +9 -10
  36. package/src/index.ts +0 -11
  37. package/src/layouts/Stack.tsx +0 -2
  38. package/src/layouts/stack-utils/README.md +0 -1
  39. package/src/layouts/stack-utils/StackScreen.tsx +0 -7
  40. package/src/layouts/stack-utils/__tests__/composition.test.tsx +0 -176
  41. package/src/layouts/stack-utils/index.tsx +0 -16
  42. package/types/image/getImageData.d.ts.map +1 -1
  43. package/types/index.d.ts +1 -1
  44. package/types/index.d.ts.map +1 -1
  45. package/types/layouts/Stack.d.ts +0 -11
  46. package/types/layouts/Stack.d.ts.map +1 -1
  47. package/types/layouts/stack-utils/StackScreen.d.ts.map +1 -1
  48. package/types/layouts/stack-utils/index.d.ts +1 -3
  49. package/types/layouts/stack-utils/index.d.ts.map +1 -1
  50. package/dist/cjs/layouts/stack-utils/StackToolbar.cjs +0 -419
  51. package/dist/cjs/layouts/stack-utils/StackToolbar.native.js +0 -453
  52. package/dist/cjs/layouts/stack-utils/StackToolbar.native.js.map +0 -1
  53. package/dist/cjs/layouts/stack-utils/StackToolbar.types.cjs +0 -18
  54. package/dist/cjs/layouts/stack-utils/StackToolbar.types.native.js +0 -21
  55. package/dist/cjs/layouts/stack-utils/StackToolbar.types.native.js.map +0 -1
  56. package/dist/cjs/layouts/stack-utils/__tests__/StackToolbar.runtime.test.cjs +0 -63
  57. package/dist/cjs/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js +0 -73
  58. package/dist/cjs/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js.map +0 -1
  59. package/dist/esm/layouts/stack-utils/StackToolbar.mjs +0 -384
  60. package/dist/esm/layouts/stack-utils/StackToolbar.mjs.map +0 -1
  61. package/dist/esm/layouts/stack-utils/StackToolbar.native.js +0 -416
  62. package/dist/esm/layouts/stack-utils/StackToolbar.native.js.map +0 -1
  63. package/dist/esm/layouts/stack-utils/StackToolbar.types.mjs +0 -2
  64. package/dist/esm/layouts/stack-utils/StackToolbar.types.mjs.map +0 -1
  65. package/dist/esm/layouts/stack-utils/StackToolbar.types.native.js +0 -2
  66. package/dist/esm/layouts/stack-utils/StackToolbar.types.native.js.map +0 -1
  67. package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.mjs +0 -40
  68. package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.mjs.map +0 -1
  69. package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js +0 -47
  70. package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js.map +0 -1
  71. package/src/layouts/stack-utils/StackToolbar.tsx +0 -550
  72. package/src/layouts/stack-utils/StackToolbar.types.ts +0 -98
  73. package/src/layouts/stack-utils/__tests__/StackToolbar.runtime.test.tsx +0 -46
  74. package/types/layouts/stack-utils/StackToolbar.d.ts +0 -26
  75. package/types/layouts/stack-utils/StackToolbar.d.ts.map +0 -1
  76. package/types/layouts/stack-utils/StackToolbar.types.d.ts +0 -82
  77. package/types/layouts/stack-utils/StackToolbar.types.d.ts.map +0 -1
@@ -1,416 +0,0 @@
1
- "use client";
2
-
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { MenuAction, ToolbarHost, ToolbarItem } from "@vxrn/native";
5
- import { Children, createContext, Fragment, useContext, useId, useMemo } from "react";
6
- import { Platform, StyleSheet } from "react-native";
7
- import { useIsomorphicLayoutEffect } from "@vxrn/use-isomorphic-layout-effect";
8
- import { useNavigation } from "../../router/useNavigation.native.js";
9
- import { isChildOfType } from "../../utils/children.native.js";
10
- var StackToolbarPlacementContext = /* @__PURE__ */createContext(null);
11
- function StackToolbarLabel(_props) {
12
- return null;
13
- }
14
- function StackToolbarIcon(_props) {
15
- return null;
16
- }
17
- function StackToolbarBadge(_props) {
18
- return null;
19
- }
20
- function getToolbarContent(children, icon, iconRenderingMode) {
21
- var label = "";
22
- var iconProps = typeof icon === "string" ? {
23
- sf: icon
24
- } : icon ? {
25
- src: icon,
26
- renderingMode: iconRenderingMode
27
- } : void 0;
28
- var badge;
29
- Children.forEach(children, function (child) {
30
- if (typeof child === "string" || typeof child === "number") {
31
- label += String(child);
32
- } else if (isChildOfType(child, StackToolbarLabel)) {
33
- var _child_props_children;
34
- label = (_child_props_children = child.props.children) !== null && _child_props_children !== void 0 ? _child_props_children : "";
35
- } else if (isChildOfType(child, StackToolbarIcon)) {
36
- iconProps = child.props;
37
- } else if (isChildOfType(child, StackToolbarBadge)) {
38
- badge = child.props;
39
- }
40
- });
41
- return {
42
- label,
43
- icon: iconProps,
44
- badge
45
- };
46
- }
47
- function getHeaderIcon(content, tintColor) {
48
- var _content_icon, _content_icon1, _content_icon2;
49
- if ((_content_icon = content.icon) === null || _content_icon === void 0 ? void 0 : _content_icon.sf) {
50
- return {
51
- type: "sfSymbol",
52
- name: content.icon.sf
53
- };
54
- }
55
- if ((_content_icon1 = content.icon) === null || _content_icon1 === void 0 ? void 0 : _content_icon1.src) {
56
- var _content_icon_renderingMode;
57
- return {
58
- type: "image",
59
- source: content.icon.src,
60
- tinted: ((_content_icon_renderingMode = content.icon.renderingMode) !== null && _content_icon_renderingMode !== void 0 ? _content_icon_renderingMode : tintColor ? "template" : "original") === "template"
61
- };
62
- }
63
- if ((_content_icon2 = content.icon) === null || _content_icon2 === void 0 ? void 0 : _content_icon2.xcasset) {
64
- var _content_icon_renderingMode1;
65
- return {
66
- type: "image",
67
- source: {
68
- uri: content.icon.xcasset
69
- },
70
- tinted: ((_content_icon_renderingMode1 = content.icon.renderingMode) !== null && _content_icon_renderingMode1 !== void 0 ? _content_icon_renderingMode1 : tintColor ? "template" : "original") === "template"
71
- };
72
- }
73
- return void 0;
74
- }
75
- function getHeaderItemSharedProps(props, content) {
76
- var _props_accessibilityLabel, _content_badge_children;
77
- var _content_badge;
78
- var labelStyle = StyleSheet.flatten(props.style);
79
- var badgeStyle = StyleSheet.flatten((_content_badge = content.badge) === null || _content_badge === void 0 ? void 0 : _content_badge.style);
80
- return {
81
- label: content.label,
82
- labelStyle,
83
- icon: getHeaderIcon(content, props.tintColor),
84
- variant: props.variant,
85
- tintColor: props.tintColor,
86
- disabled: props.disabled,
87
- hidesSharedBackground: props.hidesSharedBackground,
88
- sharesBackground: !props.separateBackground,
89
- accessibilityLabel: (_props_accessibilityLabel = props.accessibilityLabel) !== null && _props_accessibilityLabel !== void 0 ? _props_accessibilityLabel : content.label,
90
- accessibilityHint: props.accessibilityHint,
91
- badge: content.badge ? {
92
- value: (_content_badge_children = content.badge.children) !== null && _content_badge_children !== void 0 ? _content_badge_children : "",
93
- style: badgeStyle
94
- } : void 0
95
- };
96
- }
97
- function getMenuItems(children) {
98
- return Children.toArray(children).map(function (child) {
99
- if (isChildOfType(child, StackToolbarMenuAction)) {
100
- var _child_props_onPress;
101
- var content = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
102
- return {
103
- type: "action",
104
- label: content.label,
105
- description: child.props.subtitle,
106
- icon: getHeaderIcon(content, child.props.tintColor),
107
- onPress: (_child_props_onPress = child.props.onPress) !== null && _child_props_onPress !== void 0 ? _child_props_onPress : function () {},
108
- state: child.props.isOn ? "on" : "off",
109
- disabled: child.props.disabled,
110
- destructive: child.props.destructive,
111
- hidden: child.props.hidden,
112
- keepsMenuPresented: child.props.unstable_keepPresented,
113
- discoverabilityLabel: child.props.discoverabilityLabel
114
- };
115
- }
116
- if (isChildOfType(child, StackToolbarMenu)) {
117
- var content1 = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
118
- return {
119
- type: "submenu",
120
- label: content1.label || child.props.title || "",
121
- icon: getHeaderIcon(content1, child.props.tintColor),
122
- inline: child.props.inline,
123
- layout: child.props.palette ? "palette" : "default",
124
- destructive: child.props.destructive,
125
- multiselectable: child.props.singleSelection === false,
126
- items: getMenuItems(child.props.children)
127
- };
128
- }
129
- return null;
130
- }).filter(function (item) {
131
- return Boolean(item);
132
- });
133
- }
134
- function convertToolbarChildToHeaderItem(child) {
135
- if (isChildOfType(child, StackToolbarButton)) {
136
- var _child_props_onPress;
137
- if (child.props.hidden) return null;
138
- var content = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
139
- return {
140
- ...getHeaderItemSharedProps(child.props, content),
141
- type: "button",
142
- onPress: (_child_props_onPress = child.props.onPress) !== null && _child_props_onPress !== void 0 ? _child_props_onPress : function () {},
143
- selected: child.props.selected
144
- };
145
- }
146
- if (isChildOfType(child, StackToolbarMenu)) {
147
- if (child.props.hidden) return null;
148
- var content1 = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
149
- var contentWithTitle = {
150
- ...content1,
151
- label: content1.label || child.props.title || ""
152
- };
153
- return {
154
- ...getHeaderItemSharedProps(child.props, contentWithTitle),
155
- type: "menu",
156
- menu: {
157
- title: child.props.title,
158
- multiselectable: child.props.singleSelection === false,
159
- layout: child.props.palette ? "palette" : "default",
160
- items: getMenuItems(child.props.children)
161
- }
162
- };
163
- }
164
- if (isChildOfType(child, StackToolbarSpacer)) {
165
- if (child.props.hidden) return null;
166
- if (child.props.width === void 0) {
167
- if (process.env.NODE_ENV !== "production") {
168
- console.warn("Stack.Toolbar.Spacer requires a width in header placements.");
169
- }
170
- return null;
171
- }
172
- return {
173
- type: "spacing",
174
- spacing: child.props.width
175
- };
176
- }
177
- if (isChildOfType(child, StackToolbarView)) {
178
- if (child.props.hidden) return null;
179
- return {
180
- type: "custom",
181
- element: /* @__PURE__ */_jsx(Fragment, {
182
- children: child.props.children
183
- }),
184
- hidesSharedBackground: child.props.hidesSharedBackground
185
- };
186
- }
187
- return null;
188
- }
189
- function appendStackToolbarPropsToOptions(options, props) {
190
- var _props_placement;
191
- if (Platform.OS !== "ios") return options;
192
- var placement = (_props_placement = props.placement) !== null && _props_placement !== void 0 ? _props_placement : "bottom";
193
- if (placement === "bottom") {
194
- if (process.env.NODE_ENV !== "production") {
195
- console.warn("Stack.Toolbar with bottom placement must be rendered in a page component, not inside Stack.Screen.");
196
- }
197
- return options;
198
- }
199
- if (placement !== "left" && placement !== "right") {
200
- throw new Error(`Invalid placement "${placement}" for Stack.Toolbar. Expected "left", "right", or "bottom".`);
201
- }
202
- if (props.asChild) {
203
- return placement === "left" ? {
204
- ...options,
205
- headerShown: true,
206
- headerLeft: function () {
207
- return props.children;
208
- }
209
- } : {
210
- ...options,
211
- headerShown: true,
212
- headerRight: function () {
213
- return props.children;
214
- }
215
- };
216
- }
217
- var allChildren = Children.toArray(props.children);
218
- var items = allChildren.map(convertToolbarChildToHeaderItem).filter(function (item) {
219
- return Boolean(item);
220
- });
221
- if (process.env.NODE_ENV !== "production" && items.length !== allChildren.length) {
222
- var invalidChildren = allChildren.filter(function (child) {
223
- return !isChildOfType(child, StackToolbarButton) && !isChildOfType(child, StackToolbarMenu) && !isChildOfType(child, StackToolbarSpacer) && !isChildOfType(child, StackToolbarView);
224
- });
225
- if (invalidChildren.length) {
226
- console.warn(`Stack.Toolbar with placement="${placement}" only accepts Stack.Toolbar.Button, Menu, Spacer, and View children.`);
227
- }
228
- }
229
- var getItems = function () {
230
- return items;
231
- };
232
- return placement === "left" ? {
233
- ...options,
234
- headerShown: true,
235
- unstable_headerLeftItems: getItems
236
- } : {
237
- ...options,
238
- headerShown: true,
239
- unstable_headerRightItems: getItems
240
- };
241
- }
242
- function StackToolbarComponent(props) {
243
- var _props_placement;
244
- var parentPlacement = useContext(StackToolbarPlacementContext);
245
- var navigation = useNavigation();
246
- var placement = (_props_placement = props.placement) !== null && _props_placement !== void 0 ? _props_placement : "bottom";
247
- var options = useMemo(function () {
248
- return placement === "bottom" ? {} : appendStackToolbarPropsToOptions({}, props);
249
- }, [placement, props.asChild, props.children]);
250
- if (parentPlacement) {
251
- throw new Error("Stack.Toolbar cannot be nested inside another Stack.Toolbar.");
252
- }
253
- useIsomorphicLayoutEffect(function () {
254
- if (Platform.OS !== "ios" || placement === "bottom") return;
255
- navigation.setOptions(options);
256
- }, [navigation, options, placement]);
257
- if (Platform.OS !== "ios" || placement !== "bottom") return null;
258
- return /* @__PURE__ */_jsx(StackToolbarPlacementContext.Provider, {
259
- value: "bottom",
260
- children: /* @__PURE__ */_jsx(ToolbarHost, {
261
- children: props.children
262
- })
263
- });
264
- }
265
- function StackToolbarButton(props) {
266
- var _props_image, _ref, _ref1, _props_accessibilityLabel;
267
- var _content_badge, _content_icon, _content_icon1, _content_icon2, _content_icon3;
268
- var placement = useContext(StackToolbarPlacementContext);
269
- var identifier = useId();
270
- if (Platform.OS !== "ios") return null;
271
- if (!placement) throw new Error("Stack.Toolbar.Button must be used inside Stack.Toolbar.");
272
- var content = getToolbarContent(props.children, props.icon, props.iconRenderingMode);
273
- var badgeStyle = StyleSheet.flatten((_content_badge = content.badge) === null || _content_badge === void 0 ? void 0 : _content_badge.style);
274
- return /* @__PURE__ */_jsx(ToolbarItem, {
275
- identifier,
276
- title: content.label,
277
- systemImageName: (_content_icon = content.icon) === null || _content_icon === void 0 ? void 0 : _content_icon.sf,
278
- xcassetName: (_content_icon1 = content.icon) === null || _content_icon1 === void 0 ? void 0 : _content_icon1.xcasset,
279
- 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,
280
- 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",
281
- tintColor: props.tintColor,
282
- hidesSharedBackground: props.hidesSharedBackground,
283
- sharesBackground: !props.separateBackground,
284
- barButtonItemStyle: props.variant === "done" ? "prominent" : props.variant,
285
- hidden: props.hidden,
286
- selected: props.selected,
287
- badgeConfiguration: content.badge ? {
288
- value: content.badge.children,
289
- backgroundColor: badgeStyle === null || badgeStyle === void 0 ? void 0 : badgeStyle.backgroundColor,
290
- color: badgeStyle === null || badgeStyle === void 0 ? void 0 : badgeStyle.color,
291
- fontFamily: badgeStyle === null || badgeStyle === void 0 ? void 0 : badgeStyle.fontFamily,
292
- fontSize: badgeStyle === null || badgeStyle === void 0 ? void 0 : badgeStyle.fontSize,
293
- fontWeight: badgeStyle === null || badgeStyle === void 0 ? void 0 : badgeStyle.fontWeight
294
- } : void 0,
295
- titleStyle: StyleSheet.flatten(props.style),
296
- accessibilityLabel: (_props_accessibilityLabel = props.accessibilityLabel) !== null && _props_accessibilityLabel !== void 0 ? _props_accessibilityLabel : content.label,
297
- accessibilityHint: props.accessibilityHint,
298
- disabled: props.disabled,
299
- onSelected: props.onPress
300
- });
301
- }
302
- function StackToolbarMenu(props) {
303
- var _props_title, _props_image, _ref, _ref1, _props_accessibilityLabel;
304
- var _content_icon, _content_icon1, _content_icon2, _content_icon3;
305
- var placement = useContext(StackToolbarPlacementContext);
306
- var identifier = useId();
307
- if (Platform.OS !== "ios") return null;
308
- if (!placement) throw new Error("Stack.Toolbar.Menu must be used inside Stack.Toolbar.");
309
- var content = getToolbarContent(props.children, props.icon, props.iconRenderingMode);
310
- var actions = Children.toArray(props.children).filter(function (child) {
311
- return isChildOfType(child, StackToolbarMenu) || isChildOfType(child, StackToolbarMenuAction);
312
- });
313
- return /* @__PURE__ */_jsx(MenuAction, {
314
- identifier,
315
- title: (_props_title = props.title) !== null && _props_title !== void 0 ? _props_title : "",
316
- label: content.label || props.title,
317
- icon: (_content_icon = content.icon) === null || _content_icon === void 0 ? void 0 : _content_icon.sf,
318
- xcassetName: (_content_icon1 = content.icon) === null || _content_icon1 === void 0 ? void 0 : _content_icon1.xcasset,
319
- 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,
320
- 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",
321
- disabled: props.disabled,
322
- destructive: props.destructive,
323
- hidden: props.hidden,
324
- accessibilityLabel: (_props_accessibilityLabel = props.accessibilityLabel) !== null && _props_accessibilityLabel !== void 0 ? _props_accessibilityLabel : content.label || props.title,
325
- accessibilityHint: props.accessibilityHint,
326
- displayInline: props.inline,
327
- displayAsPalette: props.palette,
328
- singleSelection: props.singleSelection,
329
- preferredElementSize: props.elementSize,
330
- tintColor: props.tintColor,
331
- barButtonItemStyle: props.variant === "done" ? "prominent" : props.variant,
332
- sharesBackground: !props.separateBackground,
333
- hidesSharedBackground: props.hidesSharedBackground,
334
- titleStyle: StyleSheet.flatten(props.style),
335
- children: actions
336
- });
337
- }
338
- function StackToolbarMenuAction(props) {
339
- var _props_image, _ref, _ref1, _props_accessibilityLabel;
340
- var _content_icon, _content_icon1, _content_icon2, _content_icon3;
341
- var placement = useContext(StackToolbarPlacementContext);
342
- var identifier = useId();
343
- if (Platform.OS !== "ios") return null;
344
- if (!placement) throw new Error("Stack.Toolbar.MenuAction must be used inside Stack.Toolbar.Menu.");
345
- var content = getToolbarContent(props.children, props.icon, props.iconRenderingMode);
346
- return /* @__PURE__ */_jsx(MenuAction, {
347
- identifier,
348
- title: content.label,
349
- icon: (_content_icon = content.icon) === null || _content_icon === void 0 ? void 0 : _content_icon.sf,
350
- xcassetName: (_content_icon1 = content.icon) === null || _content_icon1 === void 0 ? void 0 : _content_icon1.xcasset,
351
- 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,
352
- 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",
353
- disabled: props.disabled,
354
- destructive: props.destructive,
355
- discoverabilityLabel: props.discoverabilityLabel,
356
- subtitle: props.subtitle,
357
- accessibilityLabel: (_props_accessibilityLabel = props.accessibilityLabel) !== null && _props_accessibilityLabel !== void 0 ? _props_accessibilityLabel : content.label,
358
- accessibilityHint: props.accessibilityHint,
359
- isOn: props.isOn,
360
- keepPresented: props.unstable_keepPresented,
361
- hidden: props.hidden,
362
- onSelected: props.onPress
363
- });
364
- }
365
- function StackToolbarSpacer(props) {
366
- var placement = useContext(StackToolbarPlacementContext);
367
- var identifier = useId();
368
- if (Platform.OS !== "ios") return null;
369
- if (!placement) throw new Error("Stack.Toolbar.Spacer must be used inside Stack.Toolbar.");
370
- return /* @__PURE__ */_jsx(ToolbarItem, {
371
- identifier,
372
- type: props.width === void 0 ? "fluidSpacer" : "fixedSpacer",
373
- width: props.width,
374
- hidden: props.hidden,
375
- sharesBackground: props.sharesBackground
376
- });
377
- }
378
- function StackToolbarSearchBarSlot(props) {
379
- var placement = useContext(StackToolbarPlacementContext);
380
- var identifier = useId();
381
- if (Platform.OS !== "ios") return null;
382
- if (!placement) throw new Error("Stack.Toolbar.SearchBarSlot must be used inside Stack.Toolbar.");
383
- return /* @__PURE__ */_jsx(ToolbarItem, {
384
- identifier,
385
- type: "searchBar",
386
- hidden: props.hidden,
387
- hidesSharedBackground: props.hidesSharedBackground,
388
- sharesBackground: !props.separateBackground
389
- });
390
- }
391
- function StackToolbarView(props) {
392
- var placement = useContext(StackToolbarPlacementContext);
393
- var identifier = useId();
394
- if (Platform.OS !== "ios") return null;
395
- if (!placement) throw new Error("Stack.Toolbar.View must be used inside Stack.Toolbar.");
396
- if (props.hidden) return null;
397
- return /* @__PURE__ */_jsx(ToolbarItem, {
398
- identifier,
399
- hidesSharedBackground: props.hidesSharedBackground,
400
- sharesBackground: !props.separateBackground,
401
- children: props.children
402
- });
403
- }
404
- var StackToolbar = Object.assign(StackToolbarComponent, {
405
- Button: StackToolbarButton,
406
- Menu: StackToolbarMenu,
407
- MenuAction: StackToolbarMenuAction,
408
- Spacer: StackToolbarSpacer,
409
- SearchBarSlot: StackToolbarSearchBarSlot,
410
- View: StackToolbarView,
411
- Label: StackToolbarLabel,
412
- Icon: StackToolbarIcon,
413
- Badge: StackToolbarBadge
414
- });
415
- export { StackToolbar, StackToolbarBadge, StackToolbarButton, StackToolbarIcon, StackToolbarLabel, StackToolbarMenu, StackToolbarMenuAction, StackToolbarSearchBarSlot, StackToolbarSpacer, StackToolbarView, appendStackToolbarPropsToOptions };
416
- //# sourceMappingURL=StackToolbar.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["jsx","_jsx","MenuAction","ToolbarHost","ToolbarItem","Children","createContext","Fragment","useContext","useId","useMemo","Platform","StyleSheet","useIsomorphicLayoutEffect","useNavigation","isChildOfType","StackToolbarPlacementContext","StackToolbarLabel","_props","StackToolbarIcon","StackToolbarBadge","getToolbarContent","children","icon","iconRenderingMode","label","iconProps","sf","src","renderingMode","badge","forEach","child","String","_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","flatten","style","badgeStyle","variant","disabled","hidesSharedBackground","sharesBackground","separateBackground","accessibilityLabel","accessibilityHint","value","getMenuItems","toArray","map","StackToolbarMenuAction","_child_props_onPress","description","subtitle","onPress","state","isOn","destructive","hidden","keepsMenuPresented","unstable_keepPresented","discoverabilityLabel","StackToolbarMenu","content1","title","inline","layout","palette","multiselectable","singleSelection","items","filter","item","Boolean","convertToolbarChildToHeaderItem","StackToolbarButton","selected","contentWithTitle","menu","StackToolbarSpacer","width","process","env","NODE_ENV","console","warn","spacing","StackToolbarView","element","appendStackToolbarPropsToOptions","options","_props_placement","OS","placement","Error","asChild","headerShown","headerLeft","headerRight","allChildren","length","invalidChildren","getItems","unstable_headerLeftItems","unstable_headerRightItems","StackToolbarComponent","parentPlacement","navigation","setOptions","Provider","_props_image","_ref","_ref1","_content_icon3","identifier","systemImageName","xcassetName","image","imageRenderingMode","barButtonItemStyle","badgeConfiguration","backgroundColor","color","fontFamily","fontSize","fontWeight","titleStyle","onSelected","_props_title","actions","displayInline","displayAsPalette","preferredElementSize","elementSize","keepPresented","StackToolbarSearchBarSlot"],"sources":["../../../../src/layouts/stack-utils/StackToolbar.tsx"],"sourcesContent":[null],"mappings":";;AAUA,SAASA,GAAA,IAAAC,IAAA,QAAY,mBAAa;AAClC,SAAAC,UAAA,EAAAC,WAAA,EAAAC,WAAA;AAAA,SACEC,QAAA,EAAAC,aAAA,EAAAC,QAAA,EAAAC,UAAA,EAAAC,KAAA,EAAAC,OAAA;AAAA,SACAC,QAAA,EAAAC,UAAA;AAAA,SACAC,yBAAA;AAAA,SACAC,aAAA;AAAA,SACAC,aAAA;AAAA,IACAC,4BAAA,kBAAAV,aAAA;AAAA,SAEKW,kBAAAC,MAAA;EACP,OAAS;AAgBT;AACA,SAASC,iBAAAD,MAAqB;EAC9B,OAAS;AAwNM;AAtNf,SAAME,kBAAAF,MAAA;EAEC,OAAS;AACd;AACF,SAAAG,kBAAAC,QAAA,EAAAC,IAAA,EAAAC,iBAAA;EAEO,IAAAC,KAAS;EACd,IAAAC,SAAO,UAAAH,IAAA;IACTI,EAAA,EAAAJ;EAEO,IAAAA,IAAS;IACdK,GAAA,EAAOL,IAAA;IACTM,aAAA,EAAAL;EAQA,SAAS;EAKP,IAAIM,KAAA;EACJzB,QAAI,CAAA0B,OACF,CAAAT,QAAO,YAASU,KAAA,EACZ;IAIN,IAAI,OAAAA,KAAA,wBAAAA,KAAA;MAEJP,KAAS,IAAAQ,MAAQ,CAAAD,KAAA;IACf,OAAI,IAAOjB,a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G,EAAA;EACN,KAAAC,SAAO,YAAAC,KAAA;EACR,IAAA9E,KAAA,CAAA0C,MAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=StackToolbar.types.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=StackToolbar.types.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -1,40 +0,0 @@
1
- import TestRenderer, { act } from "react-test-renderer";
2
- import { Platform } from "react-native-web";
3
- import { afterEach, describe, expect, it, vi } from "vitest";
4
- import { StackToolbar } from "../StackToolbar.mjs";
5
- import { jsx } from "react/jsx-runtime";
6
- const setOptions = vi.fn();
7
- vi.mock("../../../router/useNavigation", () => ({
8
- useNavigation: () => ({
9
- setOptions
10
- })
11
- }));
12
- describe("StackToolbar runtime options", () => {
13
- const originalOS = Platform.OS;
14
- afterEach(() => {
15
- ;
16
- Platform.OS = originalOS;
17
- setOptions.mockClear();
18
- });
19
- it("does not write undefined header overrides when the toolbar unmounts", () => {
20
- ;
21
- Platform.OS = "ios";
22
- let renderer;
23
- act(() => {
24
- renderer = TestRenderer.create(/* @__PURE__ */jsx(StackToolbar, {
25
- placement: "right",
26
- children: /* @__PURE__ */jsx(StackToolbar.Button, {
27
- icon: "bell"
28
- })
29
- }));
30
- });
31
- expect(setOptions).toHaveBeenCalledTimes(1);
32
- expect(setOptions).toHaveBeenLastCalledWith(expect.objectContaining({
33
- headerShown: true,
34
- unstable_headerRightItems: expect.any(Function)
35
- }));
36
- act(() => renderer.unmount());
37
- expect(setOptions).toHaveBeenCalledTimes(1);
38
- });
39
- });
40
- //# sourceMappingURL=StackToolbar.runtime.test.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["TestRenderer","act","Platform","afterEach","describe","expect","it","vi","StackToolbar","jsx","setOptions","fn","mock","useNavigation","originalOS","OS","mockClear","renderer","create","placement","children","Button","icon","toHaveBeenCalledTimes","toHaveBeenLastCalledWith","objectContaining","headerShown","unstable_headerRightItems","any","Function","unmount"],"sources":["../../../../../src/layouts/stack-utils/__tests__/StackToolbar.runtime.test.tsx"],"sourcesContent":[null],"mappings":"AACA,OAAOA,YAAA,IAAgBC,GAAA,QAAW;AAClC,SAASC,QAAA,QAAgB;AACzB,SAASC,SAAA,EAAWC,QAAA,EAAUC,MAAA,EAAQC,EAAA,EAAIC,EAAA,QAAU;AAQpD,SAASC,YAAA,QAAoB;AAiBnB,SAAAC,GAAA;AAvBV,MAAMC,UAAA,GAAaH,EAAA,CAAGI,EAAA,CAAG;AAEzBJ,EAAA,CAAGK,IAAA,CAAK,iCAAiC,OAAO;EAC9CC,aAAA,EAAeA,CAAA,MAAO;IAAEH;EAAW;AACrC,EAAE;AAIFN,QAAA,CAAS,gCAAgC,MAAM;EAC7C,MAAMU,UAAA,GAAaZ,QAAA,CAASa,EAAA;EAE5BZ,SAAA,CAAU,MAAM;IACd;IAAED,QAAA,CAAiBa,EAAA,GAAKD,UAAA;IACxBJ,UAAA,CAAWM,SAAA,CAAU;EACvB,CAAC;EAEDV,EAAA,CAAG,uEAAuE,MAAM;IAC9E;IAAEJ,QAAA,CAAiBa,EAAA,GAAK;IACxB,IAAIE,QAAA;IAEJhB,GAAA,CAAI,MAAM;MACRgB,QAAA,GAAWjB,YAAA,CAAakB,MAAA,CACtB,eAAAT,GAAA,CAACD,YAAA;QAAaW,SAAA,EAAU;QACtBC,QAAA,iBAAAX,GAAA,CAACD,YAAA,CAAaa,MAAA,EAAb;UAAoBC,IAAA,EAAK;QAAA,CAAO;MAAA,CACnC,CACF;IACF,CAAC;IAEDjB,MAAA,CAAOK,UAAU,EAAEa,qBAAA,CAAsB,CAAC;IAC1ClB,MAAA,CAAOK,UAAU,EAAEc,wBAAA,CACjBnB,MAAA,CAAOoB,gBAAA,CAAiB;MACtBC,WAAA,EAAa;MACbC,yBAAA,EAA2BtB,MAAA,CAAOuB,GAAA,CAAIC,QAAQ;IAChD,CAAC,CACH;IAEA5B,GAAA,CAAI,MAAMgB,QAAA,CAAUa,OAAA,CAAQ,CAAC;IAE7BzB,MAAA,CAAOK,UAAU,EAAEa,qBAAA,CAAsB,CAAC;EAC5C,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,47 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from "react";
3
- import TestRenderer, { act } from "react-test-renderer";
4
- import { Platform } from "react-native";
5
- import { afterEach, describe, expect, it, vi } from "vitest";
6
- import { StackToolbar } from "../StackToolbar.native.js";
7
- var setOptions = vi.fn();
8
- vi.mock("../../../router/useNavigation", function () {
9
- return {
10
- useNavigation: function () {
11
- return {
12
- setOptions
13
- };
14
- }
15
- };
16
- });
17
- describe("StackToolbar runtime options", function () {
18
- var originalOS = Platform.OS;
19
- afterEach(function () {
20
- ;
21
- Platform.OS = originalOS;
22
- setOptions.mockClear();
23
- });
24
- it("does not write undefined header overrides when the toolbar unmounts", function () {
25
- ;
26
- Platform.OS = "ios";
27
- var renderer;
28
- act(function () {
29
- renderer = TestRenderer.create(/* @__PURE__ */_jsx(StackToolbar, {
30
- placement: "right",
31
- children: /* @__PURE__ */_jsx(StackToolbar.Button, {
32
- icon: "bell"
33
- })
34
- }));
35
- });
36
- expect(setOptions).toHaveBeenCalledTimes(1);
37
- expect(setOptions).toHaveBeenLastCalledWith(expect.objectContaining({
38
- headerShown: true,
39
- unstable_headerRightItems: expect.any(Function)
40
- }));
41
- act(function () {
42
- return renderer.unmount();
43
- });
44
- expect(setOptions).toHaveBeenCalledTimes(1);
45
- });
46
- });
47
- //# sourceMappingURL=StackToolbar.runtime.test.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["jsx","_jsx","React","TestRenderer","act","Platform","afterEach","describe","expect","it","vi","StackToolbar","setOptions","fn","mock","useNavigation","originalOS","OS","mockClear","renderer","create","placement","children","Button","icon","toHaveBeenCalledTimes"],"sources":["../../../../../src/layouts/stack-utils/__tests__/StackToolbar.runtime.test.tsx"],"sourcesContent":[null],"mappings":"AACA,SAAOA,GAAA,IAAAC,IAAA,QAAgB,mBAAW;AAClC,OAAAC,KAAS,aAAgB;AACzB,OAAAC,YAAS,IAAWC,GAAA,QAAU,qBAAsB;AAQpD,SAASC,QAAA,sBAAoB;AAiBnB,SAAAC,SAAA,EAAAC,QAAA,EAAAC,MAAA,EAAAC,EAAA,EAAAC,EAAA;AAvBV,SAAMC,YAAa,QAAM;AAEzB,IAAGC,UAAK,GAAAF,EAAA,CAAAG,EAAA;AAAwCH,EAC9C,CAAAI,IAAA,gCAAmC;EACnC;IAIFC,aAAS,WAAAA,CAAA;MACP,OAAM;QAENH;MACE;IAAE;EACF;AAAqB,EACvB;AAEAL,QAAG;EACD,IAAAS,UAAA,GAAAX,QAAA,CAAAY,EAAA;EAACX,SAAC,aAAsB;IACxB;IAEAD,QAAI,CAAAY,EAAM,GAAAD,UAAA;IACRJ,UAAA,CAAAM,SAAW;EAAa;EAGtBT,EAAA,sEACF;IACF;IAEAJ,QAAO,CAAAY,EAAA,QAAY;IACnB,IAAAE,QAAO;IAAYf,GACjB,aAAO;MAAiBe,QACtB,GAAAhB,YAAa,CAAAiB,MAAA,gBAAAnB,IAAA,CAAAU,YAAA;QACbU,SAAA;QACDC,QAAA,iBAAArB,IAAA,CAAAU,YAAA,CAAAY,MAAA;UACHC,IAAA;QAEI;MAEJ;IACD;IACFhB,MAAA,CAAAI,UAAA,EAAAa,qBAAA","ignoreList":[]}