one 2.0.0-beta.65.1 → 2.0.0-beta.82.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/cjs/cli/prebuild.cjs +14 -0
- package/dist/cjs/cli/prebuild.native.cjs +18 -0
- package/dist/cjs/cli/prebuild.native.js +18 -0
- package/dist/cjs/cli/prebuild.native.js.map +1 -1
- package/dist/cjs/layouts/Stack.cjs +14 -11
- package/dist/cjs/layouts/Stack.native.cjs +31 -11
- package/dist/cjs/layouts/Stack.native.js +31 -11
- package/dist/cjs/layouts/Stack.native.js.map +1 -1
- package/dist/cjs/layouts/stack-utils/StackToolbar.cjs +57 -14
- package/dist/cjs/layouts/stack-utils/StackToolbar.native.cjs +61 -14
- package/dist/cjs/layouts/stack-utils/StackToolbar.native.js +61 -14
- package/dist/cjs/layouts/stack-utils/StackToolbar.native.js.map +1 -1
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.cjs +82 -23
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.native.cjs +86 -25
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.native.js +86 -25
- package/dist/cjs/layouts/stack-utils/StackToolbarBottomHost.native.js.map +1 -1
- package/dist/cjs/layouts/stack-utils/index.cjs +9 -3
- package/dist/cjs/layouts/stack-utils/index.native.cjs +9 -3
- package/dist/cjs/layouts/stack-utils/index.native.js +9 -3
- package/dist/cjs/layouts/stack-utils/index.native.js.map +1 -1
- package/dist/cjs/layouts/stack-utils/stackToolbarDescriptors.cjs +354 -160
- package/dist/cjs/layouts/stack-utils/stackToolbarDescriptors.native.cjs +374 -169
- package/dist/cjs/layouts/stack-utils/stackToolbarDescriptors.native.js +374 -169
- package/dist/cjs/layouts/stack-utils/stackToolbarDescriptors.native.js.map +1 -1
- package/dist/cjs/metro-config/getViteMetroPluginOptions.cjs +7 -0
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.cjs +7 -0
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js +7 -0
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
- package/dist/cjs/one.cjs +8 -1
- package/dist/cjs/one.native.cjs +8 -1
- package/dist/cjs/one.native.js +8 -1
- package/dist/cjs/one.native.js.map +1 -1
- package/dist/cjs/router/web/WebStackNavigator.cjs +32 -0
- package/dist/cjs/router/web/WebStackNavigator.native.cjs +37 -0
- package/dist/cjs/router/web/WebStackNavigator.native.js +37 -0
- package/dist/cjs/router/web/WebStackNavigator.native.js.map +1 -1
- package/dist/cjs/vite/one.cjs +25 -12
- package/dist/cjs/vite/one.native.cjs +27 -12
- package/dist/cjs/vite/one.native.js +27 -12
- package/dist/cjs/vite/one.native.js.map +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.cjs +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.native.cjs +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.native.js +1 -1
- package/dist/cjs/vite/plugins/clientTreeShakePlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/swiftPackagePlugin.cjs +46 -0
- package/dist/cjs/vite/plugins/swiftPackagePlugin.native.cjs +48 -0
- package/dist/cjs/vite/plugins/swiftPackagePlugin.native.js +50 -0
- package/dist/cjs/vite/plugins/swiftPackagePlugin.native.js.map +1 -0
- package/dist/esm/cli/prebuild.mjs +15 -1
- package/dist/esm/cli/prebuild.mjs.map +1 -1
- package/dist/esm/cli/prebuild.native.js +19 -1
- package/dist/esm/cli/prebuild.native.js.map +1 -1
- package/dist/esm/layouts/Stack.mjs +15 -12
- package/dist/esm/layouts/Stack.mjs.map +1 -1
- package/dist/esm/layouts/Stack.native.js +32 -12
- package/dist/esm/layouts/Stack.native.js.map +1 -1
- package/dist/esm/layouts/stack-utils/StackToolbar.mjs +50 -12
- package/dist/esm/layouts/stack-utils/StackToolbar.mjs.map +1 -1
- package/dist/esm/layouts/stack-utils/StackToolbar.native.js +54 -12
- package/dist/esm/layouts/stack-utils/StackToolbar.native.js.map +1 -1
- package/dist/esm/layouts/stack-utils/StackToolbarBottomHost.mjs +83 -24
- package/dist/esm/layouts/stack-utils/StackToolbarBottomHost.mjs.map +1 -1
- package/dist/esm/layouts/stack-utils/StackToolbarBottomHost.native.js +87 -26
- package/dist/esm/layouts/stack-utils/StackToolbarBottomHost.native.js.map +1 -1
- package/dist/esm/layouts/stack-utils/index.mjs +3 -2
- package/dist/esm/layouts/stack-utils/index.mjs.map +1 -1
- package/dist/esm/layouts/stack-utils/index.native.js +3 -2
- package/dist/esm/layouts/stack-utils/index.native.js.map +1 -1
- package/dist/esm/layouts/stack-utils/stackToolbarDescriptors.mjs +352 -156
- package/dist/esm/layouts/stack-utils/stackToolbarDescriptors.mjs.map +1 -1
- package/dist/esm/layouts/stack-utils/stackToolbarDescriptors.native.js +372 -165
- package/dist/esm/layouts/stack-utils/stackToolbarDescriptors.native.js.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.mjs +7 -0
- package/dist/esm/metro-config/getViteMetroPluginOptions.mjs.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.native.js +7 -0
- package/dist/esm/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
- package/dist/esm/one.mjs +9 -2
- package/dist/esm/one.mjs.map +1 -1
- package/dist/esm/one.native.js +9 -2
- package/dist/esm/one.native.js.map +1 -1
- package/dist/esm/router/web/WebStackNavigator.mjs +33 -1
- package/dist/esm/router/web/WebStackNavigator.mjs.map +1 -1
- package/dist/esm/router/web/WebStackNavigator.native.js +38 -1
- package/dist/esm/router/web/WebStackNavigator.native.js.map +1 -1
- package/dist/esm/vite/one.mjs +26 -13
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +28 -13
- package/dist/esm/vite/one.native.js.map +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.mjs +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.native.js +1 -1
- package/dist/esm/vite/plugins/clientTreeShakePlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/swiftPackagePlugin.mjs +27 -0
- package/dist/esm/vite/plugins/swiftPackagePlugin.mjs.map +1 -0
- package/dist/esm/vite/plugins/swiftPackagePlugin.native.js +27 -0
- package/dist/esm/vite/plugins/swiftPackagePlugin.native.js.map +1 -0
- package/package.json +12 -12
- package/react-native-config.cjs +14 -1
- package/src/cli/prebuild.test.ts +59 -1
- package/src/cli/prebuild.ts +30 -1
- package/src/index.ts +14 -4
- package/src/layouts/Stack.tsx +31 -26
- package/src/layouts/stack-utils/StackToolbar.tsx +97 -32
- package/src/layouts/stack-utils/StackToolbarBottomHost.tsx +124 -35
- package/src/layouts/stack-utils/__tests__/toolbar.test.tsx +434 -187
- package/src/layouts/stack-utils/index.tsx +24 -7
- package/src/layouts/stack-utils/stackToolbarDescriptors.ts +752 -305
- package/src/metro-config/getViteMetroPluginOptions.integration.test.ts +15 -0
- package/src/metro-config/getViteMetroPluginOptions.ts +10 -0
- package/src/native/packedClosure.test.ts +19 -1
- package/src/one.ts +17 -1
- package/src/router/web/WebStackNavigator.tsx +32 -0
- package/src/router/web/stackStateUtils.ts +4 -2
- package/src/vite/one.ts +30 -7
- package/src/vite/plugins/clientTreeShakePlugin.ts +4 -1
- package/src/vite/plugins/swiftPackagePlugin.ts +30 -0
- package/types/cli/prebuild.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/layouts/Stack.d.ts +8 -10
- package/types/layouts/Stack.d.ts.map +1 -1
- package/types/layouts/stack-utils/StackToolbar.d.ts +26 -21
- package/types/layouts/stack-utils/StackToolbar.d.ts.map +1 -1
- package/types/layouts/stack-utils/StackToolbarBottomHost.d.ts +10 -6
- package/types/layouts/stack-utils/StackToolbarBottomHost.d.ts.map +1 -1
- package/types/layouts/stack-utils/index.d.ts +2 -1
- package/types/layouts/stack-utils/index.d.ts.map +1 -1
- package/types/layouts/stack-utils/stackToolbarDescriptors.d.ts +199 -95
- package/types/layouts/stack-utils/stackToolbarDescriptors.d.ts.map +1 -1
- package/types/metro-config/getViteMetroPluginOptions.d.ts.map +1 -1
- package/types/one.d.ts +8 -2
- package/types/one.d.ts.map +1 -1
- package/types/router/web/WebStackNavigator.d.ts.map +1 -1
- package/types/router/web/stackStateUtils.d.ts +2 -2
- package/types/router/web/stackStateUtils.d.ts.map +1 -1
- package/types/vite/one.d.ts.map +1 -1
- package/types/vite/plugins/clientTreeShakePlugin.d.ts.map +1 -1
- package/types/vite/plugins/swiftPackagePlugin.d.ts +3 -0
- package/types/vite/plugins/swiftPackagePlugin.d.ts.map +1 -0
|
@@ -22,16 +22,26 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
22
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
23
|
var StackToolbar_exports = {};
|
|
24
24
|
__export(StackToolbar_exports, {
|
|
25
|
+
StackToolbarBadge: () => StackToolbarBadge,
|
|
26
|
+
StackToolbarButton: () => StackToolbarButton,
|
|
25
27
|
StackToolbarComponent: () => StackToolbarComponent,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
StackToolbarIcon: () => StackToolbarIcon,
|
|
29
|
+
StackToolbarLabel: () => StackToolbarLabel,
|
|
28
30
|
StackToolbarMenu: () => StackToolbarMenu,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
StackToolbarMenuAction: () => StackToolbarMenuAction,
|
|
32
|
+
StackToolbarSearchBarSlot: () => StackToolbarSearchBarSlot,
|
|
33
|
+
StackToolbarSpacer: () => StackToolbarSpacer,
|
|
34
|
+
appendStackToolbarPropsToOptions: () => import_stackToolbarDescriptors2.appendStackToolbarPropsToOptions,
|
|
35
|
+
isToolbarKind: () => import_stackToolbarDescriptors.isToolbarKind
|
|
31
36
|
});
|
|
32
37
|
module.exports = __toCommonJS(StackToolbar_exports);
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
+
var import_react = require("react");
|
|
40
|
+
var import_native = require("@react-navigation/native");
|
|
33
41
|
var import_children = require("../../headless/children.native.js");
|
|
42
|
+
var import_platform = require("../../utils/platform.native.js");
|
|
34
43
|
var import_stackToolbarDescriptors = require("./stackToolbarDescriptors.native.js");
|
|
44
|
+
var import_StackToolbarBottomHost = require("./StackToolbarBottomHost.native.js");
|
|
35
45
|
var import_stackToolbarDescriptors2 = require("./stackToolbarDescriptors.native.js");
|
|
36
46
|
function mark(component, kind) {
|
|
37
47
|
return Object.assign(component, {
|
|
@@ -39,25 +49,62 @@ function mark(component, kind) {
|
|
|
39
49
|
[import_stackToolbarDescriptors.TOOLBAR_KIND]: kind
|
|
40
50
|
});
|
|
41
51
|
}
|
|
42
|
-
function StackToolbarComponent(
|
|
43
|
-
|
|
52
|
+
function StackToolbarComponent(props) {
|
|
53
|
+
var _props_placement;
|
|
54
|
+
var placement = (_props_placement = props.placement) !== null && _props_placement !== void 0 ? _props_placement : "bottom";
|
|
55
|
+
if (placement === "bottom") {
|
|
56
|
+
if (import_platform.PLATFORM !== "ios") return null;
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StackToolbarBottomHost.BottomToolbarHost, { children: props.children });
|
|
58
|
+
}
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StackToolbarHeaderOptions, { props });
|
|
44
60
|
}
|
|
45
61
|
mark(StackToolbarComponent, "toolbar");
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
function StackToolbarHeaderOptions(param) {
|
|
63
|
+
var { props } = param;
|
|
64
|
+
var navigation = (0, import_native.useNavigation)();
|
|
65
|
+
var options = (0, import_react.useMemo)(function() {
|
|
66
|
+
return (0, import_stackToolbarDescriptors.appendStackToolbarPropsToOptions)({}, props);
|
|
67
|
+
}, [
|
|
68
|
+
props.children,
|
|
69
|
+
props.placement,
|
|
70
|
+
props.asChild
|
|
71
|
+
]);
|
|
72
|
+
(0, import_react.useEffect)(function() {
|
|
73
|
+
navigation.setOptions(options);
|
|
74
|
+
}, [navigation, options]);
|
|
51
75
|
return null;
|
|
52
76
|
}
|
|
53
|
-
|
|
54
|
-
function StackToolbarItem(_props) {
|
|
77
|
+
function StackToolbarButton(_props) {
|
|
55
78
|
return null;
|
|
56
79
|
}
|
|
57
|
-
mark(
|
|
80
|
+
mark(StackToolbarButton, "button");
|
|
58
81
|
function StackToolbarMenu(_props) {
|
|
59
82
|
return null;
|
|
60
83
|
}
|
|
61
84
|
mark(StackToolbarMenu, "menu");
|
|
85
|
+
function StackToolbarMenuAction(_props) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
mark(StackToolbarMenuAction, "menuAction");
|
|
89
|
+
function StackToolbarSpacer(_props) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
mark(StackToolbarSpacer, "spacer");
|
|
93
|
+
function StackToolbarSearchBarSlot(_props) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
mark(StackToolbarSearchBarSlot, "searchBarSlot");
|
|
97
|
+
function StackToolbarLabel(_props) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
mark(StackToolbarLabel, "label");
|
|
101
|
+
function StackToolbarIcon(_props) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
mark(StackToolbarIcon, "icon");
|
|
105
|
+
function StackToolbarBadge(_props) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
mark(StackToolbarBadge, "badge");
|
|
62
109
|
|
|
63
110
|
//# sourceMappingURL=StackToolbar.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackToolbar.native.js","names":[],"sources":["cjs/layouts/stack-utils/StackToolbar.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar StackToolbar_exports = {};\n__export(StackToolbar_exports, {\n StackToolbarComponent: () => StackToolbarComponent,\n
|
|
1
|
+
{"version":3,"file":"StackToolbar.native.js","names":[],"sources":["cjs/layouts/stack-utils/StackToolbar.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar StackToolbar_exports = {};\n__export(StackToolbar_exports, {\n StackToolbarBadge: () => StackToolbarBadge,\n StackToolbarButton: () => StackToolbarButton,\n StackToolbarComponent: () => StackToolbarComponent,\n StackToolbarIcon: () => StackToolbarIcon,\n StackToolbarLabel: () => StackToolbarLabel,\n StackToolbarMenu: () => StackToolbarMenu,\n StackToolbarMenuAction: () => StackToolbarMenuAction,\n StackToolbarSearchBarSlot: () => StackToolbarSearchBarSlot,\n StackToolbarSpacer: () => StackToolbarSpacer,\n appendStackToolbarPropsToOptions: () => import_stackToolbarDescriptors2.appendStackToolbarPropsToOptions,\n isToolbarKind: () => import_stackToolbarDescriptors.isToolbarKind\n});\nmodule.exports = __toCommonJS(StackToolbar_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = require(\"react\");\nvar import_native = require(\"@react-navigation/native\");\nvar import_children = require(\"../../headless/children\");\nvar import_platform = require(\"../../utils/platform\");\nvar import_stackToolbarDescriptors = require(\"./stackToolbarDescriptors\");\nvar import_StackToolbarBottomHost = require(\"./StackToolbarBottomHost\");\nvar import_stackToolbarDescriptors2 = require(\"./stackToolbarDescriptors\");\nfunction mark(component, kind) {\n return Object.assign(component, {\n [import_children.NAVIGATOR_CONFIG]: true,\n [import_stackToolbarDescriptors.TOOLBAR_KIND]: kind\n });\n}\nfunction StackToolbarComponent(props) {\n var _props_placement;\n var placement = (_props_placement = props.placement) !== null && _props_placement !== void 0 ? _props_placement : \"bottom\";\n if (placement === \"bottom\") {\n if (import_platform.PLATFORM !== \"ios\") return null;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StackToolbarBottomHost.BottomToolbarHost, {\n children: props.children\n });\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StackToolbarHeaderOptions, {\n props\n });\n}\nmark(StackToolbarComponent, \"toolbar\");\nfunction StackToolbarHeaderOptions(param) {\n var { props } = param;\n var navigation = (0, import_native.useNavigation)();\n var options = (0, import_react.useMemo)(\n function() {\n return (0, import_stackToolbarDescriptors.appendStackToolbarPropsToOptions)({}, props);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n props.children,\n props.placement,\n props.asChild\n ]\n );\n (0, import_react.useEffect)(function() {\n navigation.setOptions(options);\n }, [\n navigation,\n options\n ]);\n return null;\n}\nfunction StackToolbarButton(_props) {\n return null;\n}\nmark(StackToolbarButton, \"button\");\nfunction StackToolbarMenu(_props) {\n return null;\n}\nmark(StackToolbarMenu, \"menu\");\nfunction StackToolbarMenuAction(_props) {\n return null;\n}\nmark(StackToolbarMenuAction, \"menuAction\");\nfunction StackToolbarSpacer(_props) {\n return null;\n}\nmark(StackToolbarSpacer, \"spacer\");\nfunction StackToolbarSearchBarSlot(_props) {\n return null;\n}\nmark(StackToolbarSearchBarSlot, \"searchBarSlot\");\nfunction StackToolbarLabel(_props) {\n return null;\n}\nmark(StackToolbarLabel, \"label\");\nfunction StackToolbarIcon(_props) {\n return null;\n}\nmark(StackToolbarIcon, \"icon\");\nfunction StackToolbarBadge(_props) {\n return null;\n}\nmark(StackToolbarBadge, \"badge\");\n//# sourceMappingURL=StackToolbar.js.map\n"],"mappings":"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"}
|
|
@@ -19,73 +19,132 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
};
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
var StackToolbarBottomHost_exports = {};
|
|
22
|
-
__export(StackToolbarBottomHost_exports, {
|
|
22
|
+
__export(StackToolbarBottomHost_exports, { BottomToolbarHost: () => BottomToolbarHost });
|
|
23
23
|
module.exports = __toCommonJS(StackToolbarBottomHost_exports);
|
|
24
24
|
var import_native = require("@vxrn/native");
|
|
25
|
-
var import_children = require("../../headless/children.cjs");
|
|
26
|
-
var import_platform = require("../../utils/platform.cjs");
|
|
27
25
|
var import_stackToolbarDescriptors = require("./stackToolbarDescriptors.cjs");
|
|
28
26
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function
|
|
27
|
+
function BottomButtonElement({ data }) {
|
|
30
28
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
|
|
31
29
|
identifier: data.identifier,
|
|
32
30
|
title: data.title,
|
|
33
31
|
systemImageName: data.systemImageName,
|
|
32
|
+
xcassetName: data.xcassetName,
|
|
33
|
+
image: data.image,
|
|
34
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
34
35
|
tintColor: data.tintColor,
|
|
35
|
-
|
|
36
|
+
barButtonItemStyle: data.barButtonItemStyle,
|
|
36
37
|
sharesBackground: data.sharesBackground,
|
|
37
38
|
hidesSharedBackground: data.hidesSharedBackground,
|
|
38
39
|
hidden: data.hidden,
|
|
39
40
|
selected: data.selected,
|
|
41
|
+
disabled: data.disabled,
|
|
42
|
+
badgeConfiguration: data.badgeConfiguration,
|
|
43
|
+
titleStyle: data.titleStyle,
|
|
40
44
|
accessibilityLabel: data.accessibilityLabel,
|
|
41
45
|
accessibilityHint: data.accessibilityHint,
|
|
42
46
|
onSelected: data.handler
|
|
43
47
|
});
|
|
44
48
|
}
|
|
45
|
-
function
|
|
46
|
-
if (data.kind === "menu") {
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuElement, { data });
|
|
48
|
-
}
|
|
49
|
+
function BottomMenuActionElement({ data }) {
|
|
49
50
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.MenuAction, {
|
|
50
51
|
identifier: data.identifier,
|
|
51
|
-
title: data.title
|
|
52
|
-
icon: data.
|
|
52
|
+
title: data.title,
|
|
53
|
+
icon: data.icon,
|
|
54
|
+
xcassetName: data.xcassetName,
|
|
55
|
+
image: data.image,
|
|
56
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
53
57
|
disabled: data.disabled,
|
|
54
58
|
destructive: data.destructive,
|
|
55
59
|
hidden: data.hidden,
|
|
56
|
-
isOn: data.
|
|
60
|
+
isOn: data.isOn,
|
|
61
|
+
keepPresented: data.keepPresented,
|
|
62
|
+
discoverabilityLabel: data.discoverabilityLabel,
|
|
63
|
+
subtitle: data.subtitle,
|
|
57
64
|
accessibilityLabel: data.accessibilityLabel,
|
|
58
65
|
accessibilityHint: data.accessibilityHint,
|
|
59
66
|
onSelected: data.handler
|
|
60
67
|
});
|
|
61
68
|
}
|
|
62
|
-
function
|
|
69
|
+
function BottomMenuChild({ data }) {
|
|
70
|
+
if (data.kind === "submenu") {
|
|
71
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomSubmenuElement, { data });
|
|
72
|
+
}
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuActionElement, { data });
|
|
74
|
+
}
|
|
75
|
+
function BottomSubmenuElement({ data }) {
|
|
63
76
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.MenuAction, {
|
|
64
77
|
identifier: data.identifier,
|
|
65
78
|
title: data.title,
|
|
66
|
-
label: data.label ?? data.title,
|
|
67
79
|
icon: data.icon,
|
|
80
|
+
xcassetName: data.xcassetName,
|
|
81
|
+
image: data.image,
|
|
82
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
83
|
+
destructive: data.destructive,
|
|
84
|
+
hidden: data.hidden,
|
|
85
|
+
displayInline: data.inline,
|
|
86
|
+
displayAsPalette: data.palette,
|
|
87
|
+
accessibilityLabel: data.accessibilityLabel,
|
|
88
|
+
accessibilityHint: data.accessibilityHint,
|
|
89
|
+
children: data.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuChild, { data: child }, child.identifier))
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function BottomMenuElement({ data }) {
|
|
93
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.MenuAction, {
|
|
94
|
+
identifier: data.identifier,
|
|
95
|
+
title: data.title,
|
|
96
|
+
label: data.label,
|
|
97
|
+
icon: data.systemImageName,
|
|
98
|
+
xcassetName: data.xcassetName,
|
|
99
|
+
image: data.image,
|
|
100
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
68
101
|
tintColor: data.tintColor,
|
|
69
|
-
|
|
102
|
+
barButtonItemStyle: data.barButtonItemStyle,
|
|
70
103
|
sharesBackground: data.sharesBackground,
|
|
71
104
|
hidesSharedBackground: data.hidesSharedBackground,
|
|
105
|
+
disabled: data.disabled,
|
|
106
|
+
destructive: data.destructive,
|
|
72
107
|
hidden: data.hidden,
|
|
108
|
+
displayInline: data.inline,
|
|
109
|
+
displayAsPalette: data.palette,
|
|
110
|
+
preferredElementSize: data.elementSize,
|
|
73
111
|
accessibilityLabel: data.accessibilityLabel,
|
|
74
112
|
accessibilityHint: data.accessibilityHint,
|
|
75
113
|
children: data.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuChild, { data: child }, child.identifier))
|
|
76
114
|
});
|
|
77
115
|
}
|
|
78
|
-
function
|
|
79
|
-
|
|
80
|
-
|
|
116
|
+
function BottomSpacerElement({ data }) {
|
|
117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
|
|
118
|
+
identifier: data.identifier,
|
|
119
|
+
type: data.width === void 0 ? "fluidSpacer" : "fixedSpacer",
|
|
120
|
+
width: data.width,
|
|
121
|
+
sharesBackground: data.sharesBackground,
|
|
122
|
+
hidden: data.hidden
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function BottomSearchBarSlotElement({ data }) {
|
|
126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
|
|
127
|
+
identifier: data.identifier,
|
|
128
|
+
type: "searchBar",
|
|
129
|
+
sharesBackground: data.sharesBackground,
|
|
130
|
+
hidesSharedBackground: data.hidesSharedBackground,
|
|
131
|
+
hidden: data.hidden
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function BottomToolbarHost({ children, hidden, animated = true }) {
|
|
135
|
+
const data = (0, import_stackToolbarDescriptors.toolbarChildrenToBottomData)(children);
|
|
81
136
|
if (!data.length) return null;
|
|
82
137
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarHost, {
|
|
83
138
|
hidden,
|
|
84
139
|
animated,
|
|
85
|
-
children: data.map((entry) =>
|
|
140
|
+
children: data.map((entry) => {
|
|
141
|
+
switch (entry.kind) {
|
|
142
|
+
case "button": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomButtonElement, { data: entry }, entry.identifier);
|
|
143
|
+
case "menu": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuElement, { data: entry }, entry.identifier);
|
|
144
|
+
case "spacer": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomSpacerElement, { data: entry }, entry.identifier);
|
|
145
|
+
case "searchBar": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomSearchBarSlotElement, { data: entry }, entry.identifier);
|
|
146
|
+
default: return null;
|
|
147
|
+
}
|
|
148
|
+
})
|
|
86
149
|
});
|
|
87
150
|
}
|
|
88
|
-
Object.assign(StackToolbarBottom, {
|
|
89
|
-
[import_children.NAVIGATOR_CONFIG]: true,
|
|
90
|
-
[import_stackToolbarDescriptors.TOOLBAR_KIND]: "bottom"
|
|
91
|
-
});
|
|
@@ -21,62 +21,102 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
21
|
};
|
|
22
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
23
|
var StackToolbarBottomHost_exports = {};
|
|
24
|
-
__export(StackToolbarBottomHost_exports, {
|
|
24
|
+
__export(StackToolbarBottomHost_exports, { BottomToolbarHost: () => BottomToolbarHost });
|
|
25
25
|
module.exports = __toCommonJS(StackToolbarBottomHost_exports);
|
|
26
26
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
27
|
var import_native = require("@vxrn/native");
|
|
28
|
-
var import_children = require("../../headless/children.native.js");
|
|
29
|
-
var import_platform = require("../../utils/platform.native.js");
|
|
30
28
|
var import_stackToolbarDescriptors = require("./stackToolbarDescriptors.native.js");
|
|
31
|
-
function
|
|
29
|
+
function BottomButtonElement(param) {
|
|
32
30
|
var { data } = param;
|
|
33
31
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
|
|
34
32
|
identifier: data.identifier,
|
|
35
33
|
title: data.title,
|
|
36
34
|
systemImageName: data.systemImageName,
|
|
35
|
+
xcassetName: data.xcassetName,
|
|
36
|
+
image: data.image,
|
|
37
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
37
38
|
tintColor: data.tintColor,
|
|
38
|
-
|
|
39
|
+
barButtonItemStyle: data.barButtonItemStyle,
|
|
39
40
|
sharesBackground: data.sharesBackground,
|
|
40
41
|
hidesSharedBackground: data.hidesSharedBackground,
|
|
41
42
|
hidden: data.hidden,
|
|
42
43
|
selected: data.selected,
|
|
44
|
+
disabled: data.disabled,
|
|
45
|
+
badgeConfiguration: data.badgeConfiguration,
|
|
46
|
+
titleStyle: data.titleStyle,
|
|
43
47
|
accessibilityLabel: data.accessibilityLabel,
|
|
44
48
|
accessibilityHint: data.accessibilityHint,
|
|
45
49
|
onSelected: data.handler
|
|
46
50
|
});
|
|
47
51
|
}
|
|
48
|
-
function
|
|
52
|
+
function BottomMenuActionElement(param) {
|
|
49
53
|
var { data } = param;
|
|
50
|
-
var _ref, _data_title;
|
|
51
|
-
if (data.kind === "menu") {
|
|
52
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuElement, { data });
|
|
53
|
-
}
|
|
54
54
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.MenuAction, {
|
|
55
55
|
identifier: data.identifier,
|
|
56
|
-
title:
|
|
57
|
-
icon: data.
|
|
56
|
+
title: data.title,
|
|
57
|
+
icon: data.icon,
|
|
58
|
+
xcassetName: data.xcassetName,
|
|
59
|
+
image: data.image,
|
|
60
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
58
61
|
disabled: data.disabled,
|
|
59
62
|
destructive: data.destructive,
|
|
60
63
|
hidden: data.hidden,
|
|
61
|
-
isOn: data.
|
|
64
|
+
isOn: data.isOn,
|
|
65
|
+
keepPresented: data.keepPresented,
|
|
66
|
+
discoverabilityLabel: data.discoverabilityLabel,
|
|
67
|
+
subtitle: data.subtitle,
|
|
62
68
|
accessibilityLabel: data.accessibilityLabel,
|
|
63
69
|
accessibilityHint: data.accessibilityHint,
|
|
64
70
|
onSelected: data.handler
|
|
65
71
|
});
|
|
66
72
|
}
|
|
67
|
-
function
|
|
73
|
+
function BottomMenuChild(param) {
|
|
74
|
+
var { data } = param;
|
|
75
|
+
if (data.kind === "submenu") {
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomSubmenuElement, { data });
|
|
77
|
+
}
|
|
78
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuActionElement, { data });
|
|
79
|
+
}
|
|
80
|
+
function BottomSubmenuElement(param) {
|
|
68
81
|
var { data } = param;
|
|
69
|
-
var _data_label;
|
|
70
82
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.MenuAction, {
|
|
71
83
|
identifier: data.identifier,
|
|
72
84
|
title: data.title,
|
|
73
|
-
label: (_data_label = data.label) !== null && _data_label !== void 0 ? _data_label : data.title,
|
|
74
85
|
icon: data.icon,
|
|
86
|
+
xcassetName: data.xcassetName,
|
|
87
|
+
image: data.image,
|
|
88
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
89
|
+
destructive: data.destructive,
|
|
90
|
+
hidden: data.hidden,
|
|
91
|
+
displayInline: data.inline,
|
|
92
|
+
displayAsPalette: data.palette,
|
|
93
|
+
accessibilityLabel: data.accessibilityLabel,
|
|
94
|
+
accessibilityHint: data.accessibilityHint,
|
|
95
|
+
children: data.children.map(function(child) {
|
|
96
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuChild, { data: child }, child.identifier);
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function BottomMenuElement(param) {
|
|
101
|
+
var { data } = param;
|
|
102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.MenuAction, {
|
|
103
|
+
identifier: data.identifier,
|
|
104
|
+
title: data.title,
|
|
105
|
+
label: data.label,
|
|
106
|
+
icon: data.systemImageName,
|
|
107
|
+
xcassetName: data.xcassetName,
|
|
108
|
+
image: data.image,
|
|
109
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
75
110
|
tintColor: data.tintColor,
|
|
76
|
-
|
|
111
|
+
barButtonItemStyle: data.barButtonItemStyle,
|
|
77
112
|
sharesBackground: data.sharesBackground,
|
|
78
113
|
hidesSharedBackground: data.hidesSharedBackground,
|
|
114
|
+
disabled: data.disabled,
|
|
115
|
+
destructive: data.destructive,
|
|
79
116
|
hidden: data.hidden,
|
|
117
|
+
displayInline: data.inline,
|
|
118
|
+
displayAsPalette: data.palette,
|
|
119
|
+
preferredElementSize: data.elementSize,
|
|
80
120
|
accessibilityLabel: data.accessibilityLabel,
|
|
81
121
|
accessibilityHint: data.accessibilityHint,
|
|
82
122
|
children: data.children.map(function(child) {
|
|
@@ -84,20 +124,41 @@ function BottomMenuElement(param) {
|
|
|
84
124
|
})
|
|
85
125
|
});
|
|
86
126
|
}
|
|
87
|
-
function
|
|
127
|
+
function BottomSpacerElement(param) {
|
|
128
|
+
var { data } = param;
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
|
|
130
|
+
identifier: data.identifier,
|
|
131
|
+
type: data.width === void 0 ? "fluidSpacer" : "fixedSpacer",
|
|
132
|
+
width: data.width,
|
|
133
|
+
sharesBackground: data.sharesBackground,
|
|
134
|
+
hidden: data.hidden
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function BottomSearchBarSlotElement(param) {
|
|
138
|
+
var { data } = param;
|
|
139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
|
|
140
|
+
identifier: data.identifier,
|
|
141
|
+
type: "searchBar",
|
|
142
|
+
sharesBackground: data.sharesBackground,
|
|
143
|
+
hidesSharedBackground: data.hidesSharedBackground,
|
|
144
|
+
hidden: data.hidden
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function BottomToolbarHost(param) {
|
|
88
148
|
var { children, hidden, animated = true } = param;
|
|
89
|
-
|
|
90
|
-
var data = (0, import_stackToolbarDescriptors.slotChildrenToBottomData)(children);
|
|
149
|
+
var data = (0, import_stackToolbarDescriptors.toolbarChildrenToBottomData)(children);
|
|
91
150
|
if (!data.length) return null;
|
|
92
151
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarHost, {
|
|
93
152
|
hidden,
|
|
94
153
|
animated,
|
|
95
154
|
children: data.map(function(entry) {
|
|
96
|
-
|
|
155
|
+
switch (entry.kind) {
|
|
156
|
+
case "button": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomButtonElement, { data: entry }, entry.identifier);
|
|
157
|
+
case "menu": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuElement, { data: entry }, entry.identifier);
|
|
158
|
+
case "spacer": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomSpacerElement, { data: entry }, entry.identifier);
|
|
159
|
+
case "searchBar": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomSearchBarSlotElement, { data: entry }, entry.identifier);
|
|
160
|
+
default: return null;
|
|
161
|
+
}
|
|
97
162
|
})
|
|
98
163
|
});
|
|
99
164
|
}
|
|
100
|
-
Object.assign(StackToolbarBottom, {
|
|
101
|
-
[import_children.NAVIGATOR_CONFIG]: true,
|
|
102
|
-
[import_stackToolbarDescriptors.TOOLBAR_KIND]: "bottom"
|
|
103
|
-
});
|
|
@@ -21,62 +21,102 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
21
21
|
};
|
|
22
22
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
23
|
var StackToolbarBottomHost_exports = {};
|
|
24
|
-
__export(StackToolbarBottomHost_exports, {
|
|
24
|
+
__export(StackToolbarBottomHost_exports, { BottomToolbarHost: () => BottomToolbarHost });
|
|
25
25
|
module.exports = __toCommonJS(StackToolbarBottomHost_exports);
|
|
26
26
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
27
|
var import_native = require("@vxrn/native");
|
|
28
|
-
var import_children = require("../../headless/children.native.js");
|
|
29
|
-
var import_platform = require("../../utils/platform.native.js");
|
|
30
28
|
var import_stackToolbarDescriptors = require("./stackToolbarDescriptors.native.js");
|
|
31
|
-
function
|
|
29
|
+
function BottomButtonElement(param) {
|
|
32
30
|
var { data } = param;
|
|
33
31
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
|
|
34
32
|
identifier: data.identifier,
|
|
35
33
|
title: data.title,
|
|
36
34
|
systemImageName: data.systemImageName,
|
|
35
|
+
xcassetName: data.xcassetName,
|
|
36
|
+
image: data.image,
|
|
37
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
37
38
|
tintColor: data.tintColor,
|
|
38
|
-
|
|
39
|
+
barButtonItemStyle: data.barButtonItemStyle,
|
|
39
40
|
sharesBackground: data.sharesBackground,
|
|
40
41
|
hidesSharedBackground: data.hidesSharedBackground,
|
|
41
42
|
hidden: data.hidden,
|
|
42
43
|
selected: data.selected,
|
|
44
|
+
disabled: data.disabled,
|
|
45
|
+
badgeConfiguration: data.badgeConfiguration,
|
|
46
|
+
titleStyle: data.titleStyle,
|
|
43
47
|
accessibilityLabel: data.accessibilityLabel,
|
|
44
48
|
accessibilityHint: data.accessibilityHint,
|
|
45
49
|
onSelected: data.handler
|
|
46
50
|
});
|
|
47
51
|
}
|
|
48
|
-
function
|
|
52
|
+
function BottomMenuActionElement(param) {
|
|
49
53
|
var { data } = param;
|
|
50
|
-
var _ref, _data_title;
|
|
51
|
-
if (data.kind === "menu") {
|
|
52
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuElement, { data });
|
|
53
|
-
}
|
|
54
54
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.MenuAction, {
|
|
55
55
|
identifier: data.identifier,
|
|
56
|
-
title:
|
|
57
|
-
icon: data.
|
|
56
|
+
title: data.title,
|
|
57
|
+
icon: data.icon,
|
|
58
|
+
xcassetName: data.xcassetName,
|
|
59
|
+
image: data.image,
|
|
60
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
58
61
|
disabled: data.disabled,
|
|
59
62
|
destructive: data.destructive,
|
|
60
63
|
hidden: data.hidden,
|
|
61
|
-
isOn: data.
|
|
64
|
+
isOn: data.isOn,
|
|
65
|
+
keepPresented: data.keepPresented,
|
|
66
|
+
discoverabilityLabel: data.discoverabilityLabel,
|
|
67
|
+
subtitle: data.subtitle,
|
|
62
68
|
accessibilityLabel: data.accessibilityLabel,
|
|
63
69
|
accessibilityHint: data.accessibilityHint,
|
|
64
70
|
onSelected: data.handler
|
|
65
71
|
});
|
|
66
72
|
}
|
|
67
|
-
function
|
|
73
|
+
function BottomMenuChild(param) {
|
|
74
|
+
var { data } = param;
|
|
75
|
+
if (data.kind === "submenu") {
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomSubmenuElement, { data });
|
|
77
|
+
}
|
|
78
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuActionElement, { data });
|
|
79
|
+
}
|
|
80
|
+
function BottomSubmenuElement(param) {
|
|
68
81
|
var { data } = param;
|
|
69
|
-
var _data_label;
|
|
70
82
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.MenuAction, {
|
|
71
83
|
identifier: data.identifier,
|
|
72
84
|
title: data.title,
|
|
73
|
-
label: (_data_label = data.label) !== null && _data_label !== void 0 ? _data_label : data.title,
|
|
74
85
|
icon: data.icon,
|
|
86
|
+
xcassetName: data.xcassetName,
|
|
87
|
+
image: data.image,
|
|
88
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
89
|
+
destructive: data.destructive,
|
|
90
|
+
hidden: data.hidden,
|
|
91
|
+
displayInline: data.inline,
|
|
92
|
+
displayAsPalette: data.palette,
|
|
93
|
+
accessibilityLabel: data.accessibilityLabel,
|
|
94
|
+
accessibilityHint: data.accessibilityHint,
|
|
95
|
+
children: data.children.map(function(child) {
|
|
96
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuChild, { data: child }, child.identifier);
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function BottomMenuElement(param) {
|
|
101
|
+
var { data } = param;
|
|
102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.MenuAction, {
|
|
103
|
+
identifier: data.identifier,
|
|
104
|
+
title: data.title,
|
|
105
|
+
label: data.label,
|
|
106
|
+
icon: data.systemImageName,
|
|
107
|
+
xcassetName: data.xcassetName,
|
|
108
|
+
image: data.image,
|
|
109
|
+
imageRenderingMode: data.imageRenderingMode,
|
|
75
110
|
tintColor: data.tintColor,
|
|
76
|
-
|
|
111
|
+
barButtonItemStyle: data.barButtonItemStyle,
|
|
77
112
|
sharesBackground: data.sharesBackground,
|
|
78
113
|
hidesSharedBackground: data.hidesSharedBackground,
|
|
114
|
+
disabled: data.disabled,
|
|
115
|
+
destructive: data.destructive,
|
|
79
116
|
hidden: data.hidden,
|
|
117
|
+
displayInline: data.inline,
|
|
118
|
+
displayAsPalette: data.palette,
|
|
119
|
+
preferredElementSize: data.elementSize,
|
|
80
120
|
accessibilityLabel: data.accessibilityLabel,
|
|
81
121
|
accessibilityHint: data.accessibilityHint,
|
|
82
122
|
children: data.children.map(function(child) {
|
|
@@ -84,22 +124,43 @@ function BottomMenuElement(param) {
|
|
|
84
124
|
})
|
|
85
125
|
});
|
|
86
126
|
}
|
|
87
|
-
function
|
|
127
|
+
function BottomSpacerElement(param) {
|
|
128
|
+
var { data } = param;
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
|
|
130
|
+
identifier: data.identifier,
|
|
131
|
+
type: data.width === void 0 ? "fluidSpacer" : "fixedSpacer",
|
|
132
|
+
width: data.width,
|
|
133
|
+
sharesBackground: data.sharesBackground,
|
|
134
|
+
hidden: data.hidden
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function BottomSearchBarSlotElement(param) {
|
|
138
|
+
var { data } = param;
|
|
139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarItem, {
|
|
140
|
+
identifier: data.identifier,
|
|
141
|
+
type: "searchBar",
|
|
142
|
+
sharesBackground: data.sharesBackground,
|
|
143
|
+
hidesSharedBackground: data.hidesSharedBackground,
|
|
144
|
+
hidden: data.hidden
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function BottomToolbarHost(param) {
|
|
88
148
|
var { children, hidden, animated = true } = param;
|
|
89
|
-
|
|
90
|
-
var data = (0, import_stackToolbarDescriptors.slotChildrenToBottomData)(children);
|
|
149
|
+
var data = (0, import_stackToolbarDescriptors.toolbarChildrenToBottomData)(children);
|
|
91
150
|
if (!data.length) return null;
|
|
92
151
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_native.ToolbarHost, {
|
|
93
152
|
hidden,
|
|
94
153
|
animated,
|
|
95
154
|
children: data.map(function(entry) {
|
|
96
|
-
|
|
155
|
+
switch (entry.kind) {
|
|
156
|
+
case "button": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomButtonElement, { data: entry }, entry.identifier);
|
|
157
|
+
case "menu": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomMenuElement, { data: entry }, entry.identifier);
|
|
158
|
+
case "spacer": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomSpacerElement, { data: entry }, entry.identifier);
|
|
159
|
+
case "searchBar": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomSearchBarSlotElement, { data: entry }, entry.identifier);
|
|
160
|
+
default: return null;
|
|
161
|
+
}
|
|
97
162
|
})
|
|
98
163
|
});
|
|
99
164
|
}
|
|
100
|
-
Object.assign(StackToolbarBottom, {
|
|
101
|
-
[import_children.NAVIGATOR_CONFIG]: true,
|
|
102
|
-
[import_stackToolbarDescriptors.TOOLBAR_KIND]: "bottom"
|
|
103
|
-
});
|
|
104
165
|
|
|
105
166
|
//# sourceMappingURL=StackToolbarBottomHost.native.js.map
|