one 2.0.0-beta.96.1 → 2.0.0-beta.98.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/layouts/stack-utils/stackToolbarDescriptors.cjs +4 -4
- package/dist/cjs/layouts/stack-utils/stackToolbarDescriptors.native.cjs +4 -4
- package/dist/cjs/layouts/stack-utils/stackToolbarDescriptors.native.js +4 -4
- package/dist/cjs/layouts/stack-utils/stackToolbarDescriptors.native.js.map +1 -1
- package/dist/cjs/one.cjs +1 -0
- package/dist/cjs/one.native.cjs +1 -0
- package/dist/cjs/one.native.js +1 -0
- package/dist/cjs/one.native.js.map +1 -1
- package/dist/cjs/vite/one.cjs +56 -55
- package/dist/cjs/vite/one.native.cjs +90 -87
- package/dist/cjs/vite/one.native.js +90 -87
- package/dist/cjs/vite/one.native.js.map +1 -1
- package/dist/esm/layouts/stack-utils/stackToolbarDescriptors.mjs +4 -4
- package/dist/esm/layouts/stack-utils/stackToolbarDescriptors.mjs.map +1 -1
- package/dist/esm/layouts/stack-utils/stackToolbarDescriptors.native.js +4 -4
- package/dist/esm/layouts/stack-utils/stackToolbarDescriptors.native.js.map +1 -1
- package/dist/esm/one.mjs +2 -1
- package/dist/esm/one.mjs.map +1 -1
- package/dist/esm/one.native.js +2 -1
- package/dist/esm/one.native.js.map +1 -1
- package/dist/esm/vite/one.mjs +56 -55
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +90 -87
- package/dist/esm/vite/one.native.js.map +1 -1
- package/package.json +12 -12
- package/src/layouts/stack-utils/__tests__/toolbar.test.tsx +7 -1
- package/src/layouts/stack-utils/stackToolbarDescriptors.ts +15 -5
- package/src/one.ts +3 -0
- package/src/polyfills-mobile.ts +1 -1
- package/src/vite/one.ts +78 -78
- package/types/layouts/stack-utils/stackToolbarDescriptors.d.ts.map +1 -1
- package/types/one.d.ts +2 -1
- package/types/one.d.ts.map +1 -1
|
@@ -196,13 +196,13 @@ function menuLabelAndTitle(children, title) {
|
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
function menuActionPropsToHeaderAction(props) {
|
|
199
|
-
const { isOn, unstable_keepPresented, icon, image, iconRenderingMode, ...rest } = props;
|
|
199
|
+
const { children, subtitle, isOn, unstable_keepPresented, icon, image, iconRenderingMode, ...rest } = props;
|
|
200
200
|
void image;
|
|
201
|
-
const shared = labelFromChildren(
|
|
202
|
-
const iconResolution = resolveIcon(icon,
|
|
201
|
+
const shared = labelFromChildren(children);
|
|
202
|
+
const iconResolution = resolveIcon(icon, children);
|
|
203
203
|
const item = {
|
|
204
204
|
...rest,
|
|
205
|
-
description:
|
|
205
|
+
description: subtitle,
|
|
206
206
|
type: "action",
|
|
207
207
|
label: shared,
|
|
208
208
|
state: isOn ? "on" : "off",
|
|
@@ -213,13 +213,13 @@ function menuLabelAndTitle(children, title) {
|
|
|
213
213
|
}
|
|
214
214
|
function menuActionPropsToHeaderAction(props) {
|
|
215
215
|
var _props_onPress;
|
|
216
|
-
var { isOn, unstable_keepPresented, icon, image, iconRenderingMode, ...rest } = props;
|
|
216
|
+
var { children, subtitle, isOn, unstable_keepPresented, icon, image, iconRenderingMode, ...rest } = props;
|
|
217
217
|
void image;
|
|
218
|
-
var shared = labelFromChildren(
|
|
219
|
-
var iconResolution = resolveIcon(icon,
|
|
218
|
+
var shared = labelFromChildren(children);
|
|
219
|
+
var iconResolution = resolveIcon(icon, children);
|
|
220
220
|
var item = {
|
|
221
221
|
...rest,
|
|
222
|
-
description:
|
|
222
|
+
description: subtitle,
|
|
223
223
|
type: "action",
|
|
224
224
|
label: shared,
|
|
225
225
|
state: isOn ? "on" : "off",
|
|
@@ -213,13 +213,13 @@ function menuLabelAndTitle(children, title) {
|
|
|
213
213
|
}
|
|
214
214
|
function menuActionPropsToHeaderAction(props) {
|
|
215
215
|
var _props_onPress;
|
|
216
|
-
var { isOn, unstable_keepPresented, icon, image, iconRenderingMode, ...rest } = props;
|
|
216
|
+
var { children, subtitle, isOn, unstable_keepPresented, icon, image, iconRenderingMode, ...rest } = props;
|
|
217
217
|
void image;
|
|
218
|
-
var shared = labelFromChildren(
|
|
219
|
-
var iconResolution = resolveIcon(icon,
|
|
218
|
+
var shared = labelFromChildren(children);
|
|
219
|
+
var iconResolution = resolveIcon(icon, children);
|
|
220
220
|
var item = {
|
|
221
221
|
...rest,
|
|
222
|
-
description:
|
|
222
|
+
description: subtitle,
|
|
223
223
|
type: "action",
|
|
224
224
|
label: shared,
|
|
225
225
|
state: isOn ? "on" : "off",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stackToolbarDescriptors.native.js","names":[],"sources":["cjs/layouts/stack-utils/stackToolbarDescriptors.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 stackToolbarDescriptors_exports = {};\n__export(stackToolbarDescriptors_exports, {\n TOOLBAR_KIND: () => TOOLBAR_KIND,\n appendStackToolbarPropsToOptions: () => appendStackToolbarPropsToOptions,\n isToolbarKind: () => isKind,\n toolbarChildrenToBottomData: () => toolbarChildrenToBottomData,\n toolbarChildrenToHeaderItems: () => toolbarChildrenToHeaderItems,\n toolbarChildrenToString: () => toolbarChildrenToString\n});\nmodule.exports = __toCommonJS(stackToolbarDescriptors_exports);\nvar import_react = require(\"react\");\nvar TOOLBAR_KIND = \"__oneStackToolbarKind\";\nfunction kindOf(element) {\n var _element_type;\n if (!(0, import_react.isValidElement)(element)) return void 0;\n return (_element_type = element.type) === null || _element_type === void 0 ? void 0 : _element_type[TOOLBAR_KIND];\n}\nfunction isKind(element, kind) {\n return kindOf(element) === kind;\n}\nfunction warn(message) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(message);\n }\n}\nfunction childName(child) {\n var _ref;\n if (!(0, import_react.isValidElement)(child)) return \"unknown\";\n var type = child.type;\n if (typeof type === \"string\") return type;\n if (typeof type === \"symbol\") return \"Fragment\";\n return (_ref = type === null || type === void 0 ? void 0 : type.name) !== null && _ref !== void 0 ? _ref : \"unknown\";\n}\nfunction fallbackIdentifier(slot, index, title) {\n var slug = (title !== null && title !== void 0 ? title : \"item\").toLowerCase().replace(/[^a-z0-9]+/g, \"-\").slice(0, 24) || \"item\";\n return `stack-toolbar-${slot}-${slug}-${index}`;\n}\nfunction firstChildOfKind(children, kind) {\n var found = null;\n import_react.Children.forEach(children, function(child) {\n if (found || !(0, import_react.isValidElement)(child)) return;\n if (isKind(child, kind)) found = child;\n });\n return found;\n}\nfunction toolbarChildrenToString(children) {\n return import_react.Children.toArray(children).filter(function(child) {\n return typeof child === \"string\" || typeof child === \"number\";\n }).join(\"\");\n}\nfunction resolveIcon(iconProp, children) {\n var iconChild = firstChildOfKind(children, \"icon\");\n if (iconChild) {\n var props = iconChild.props;\n if (\"sf\" in props) return {\n form: \"sf\",\n name: props.sf\n };\n if (\"xcasset\" in props) return {\n form: \"xcasset\",\n name: props.xcasset,\n renderingMode: props.renderingMode\n };\n return {\n form: \"src\",\n source: props.src,\n renderingMode: props.renderingMode\n };\n }\n if (typeof iconProp === \"string\") return {\n form: \"sf\",\n name: iconProp\n };\n if (iconProp) return {\n form: \"src\",\n source: iconProp\n };\n return void 0;\n}\nfunction checkButtonChildren(children) {\n if (process.env.NODE_ENV === \"production\" || typeof children === \"string\") return;\n var all = import_react.Children.toArray(children);\n var valid = all.filter(function(child) {\n return typeof child === \"string\" || typeof child === \"number\" || (0, import_react.isValidElement)(child) && (isKind(child, \"label\") || isKind(child, \"icon\") || isKind(child, \"badge\"));\n });\n if (all.length !== valid.length) {\n throw new Error(\"Stack.Toolbar.Button only accepts a single string or Stack.Toolbar.Label, Stack.Toolbar.Icon, and Stack.Toolbar.Badge as its children.\");\n }\n}\nfunction checkMenuChildren(children) {\n if (process.env.NODE_ENV === \"production\") return;\n var all = import_react.Children.toArray(children);\n var valid = all.filter(function(child) {\n return (0, import_react.isValidElement)(child) && (isKind(child, \"menu\") || isKind(child, \"menuAction\") || isKind(child, \"label\") || isKind(child, \"icon\") || isKind(child, \"badge\"));\n });\n if (all.length !== valid.length) {\n throw new Error(\"Stack.Toolbar.Menu only accepts Stack.Toolbar.Menu, Stack.Toolbar.MenuAction, Stack.Toolbar.Label, Stack.Toolbar.Icon, and Stack.Toolbar.Badge as its children.\");\n }\n}\nfunction labelFromChildren(children) {\n var _labelChild_props_children;\n var labelChild = firstChildOfKind(children, \"label\");\n if (labelChild) return (_labelChild_props_children = labelChild.props.children) !== null && _labelChild_props_children !== void 0 ? _labelChild_props_children : \"\";\n return toolbarChildrenToString(children);\n}\nfunction badgeFromChildren(children) {\n var _props_children;\n var badgeChild = firstChildOfKind(children, \"badge\");\n if (!badgeChild) return void 0;\n var props = badgeChild.props;\n var style = props.style;\n return {\n value: (_props_children = props.children) !== null && _props_children !== void 0 ? _props_children : \"\",\n ...(style === null || style === void 0 ? void 0 : style.backgroundColor) !== void 0 && {\n backgroundColor: style.backgroundColor\n },\n ...(style === null || style === void 0 ? void 0 : style.color) !== void 0 && {\n color: style.color\n },\n ...(style === null || style === void 0 ? void 0 : style.fontFamily) !== void 0 && {\n fontFamily: style.fontFamily\n },\n ...(style === null || style === void 0 ? void 0 : style.fontSize) !== void 0 && {\n fontSize: style.fontSize\n },\n ...(style === null || style === void 0 ? void 0 : style.fontWeight) !== void 0 && {\n fontWeight: style.fontWeight\n }\n };\n}\nfunction labelStyleFromStyle(style) {\n if (!style) return void 0;\n var flat = style;\n var picked = {\n ...flat.fontFamily !== void 0 && {\n fontFamily: flat.fontFamily\n },\n ...flat.fontSize !== void 0 && {\n fontSize: flat.fontSize\n },\n ...flat.fontWeight !== void 0 && {\n fontWeight: flat.fontWeight\n },\n ...flat.color !== void 0 && {\n color: flat.color\n }\n };\n return Object.keys(picked).length ? picked : void 0;\n}\nfunction headerIconFromResolution(resolution, iconRenderingMode, tintColor) {\n var _ref, _resolution_renderingMode;\n if (!resolution) return void 0;\n if (resolution.form === \"sf\") {\n return {\n type: \"sfSymbol\",\n name: resolution.name\n };\n }\n var source = resolution.form === \"src\" ? resolution.source : {\n uri: resolution.name\n };\n var effectiveMode = (_ref = (_resolution_renderingMode = resolution.renderingMode) !== null && _resolution_renderingMode !== void 0 ? _resolution_renderingMode : iconRenderingMode) !== null && _ref !== void 0 ? _ref : tintColor ? \"template\" : \"original\";\n return {\n type: \"image\",\n source,\n tinted: effectiveMode === \"template\"\n };\n}\nfunction buttonPropsToHeaderButton(props) {\n var _props_onPress;\n if (props.hidden) return null;\n checkButtonChildren(props.children);\n var label = labelFromChildren(props.children);\n var icon = headerIconFromResolution(resolveIcon(props.icon, props.children), props.iconRenderingMode, props.tintColor);\n var badge = badgeFromChildren(props.children);\n return {\n type: \"button\",\n label,\n ...icon && {\n icon\n },\n ...props.variant !== void 0 && {\n variant: props.variant\n },\n ...props.tintColor !== void 0 && {\n tintColor: props.tintColor\n },\n ...props.disabled !== void 0 && {\n disabled: props.disabled\n },\n sharesBackground: !props.separateBackground,\n ...props.hidesSharedBackground !== void 0 && {\n hidesSharedBackground: props.hidesSharedBackground\n },\n ...badge && {\n badge: {\n value: badge.value,\n ...(badge.color !== void 0 || badge.backgroundColor !== void 0 || badge.fontFamily !== void 0 || badge.fontSize !== void 0 || badge.fontWeight !== void 0) && {\n style: {\n ...badge.color !== void 0 && {\n color: badge.color\n },\n ...badge.backgroundColor !== void 0 && {\n backgroundColor: badge.backgroundColor\n },\n ...badge.fontFamily !== void 0 && {\n fontFamily: badge.fontFamily\n },\n ...badge.fontSize !== void 0 && {\n fontSize: badge.fontSize\n },\n ...badge.fontWeight !== void 0 && {\n fontWeight: badge.fontWeight\n }\n }\n }\n }\n },\n ...labelStyleFromStyle(props.style) && {\n labelStyle: labelStyleFromStyle(props.style)\n },\n ...props.accessibilityLabel !== void 0 && {\n accessibilityLabel: props.accessibilityLabel\n },\n ...props.accessibilityHint !== void 0 && {\n accessibilityHint: props.accessibilityHint\n },\n onPress: (_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : function() {\n },\n selected: !!props.selected\n };\n}\nfunction menuLabelAndTitle(children, title) {\n var _ref;\n var _labelChild_props;\n var labelChild = firstChildOfKind(children, \"label\");\n var labelFromChild = labelChild === null || labelChild === void 0 ? void 0 : (_labelChild_props = labelChild.props) === null || _labelChild_props === void 0 ? void 0 : _labelChild_props.children;\n return {\n label: (_ref = labelFromChild !== null && labelFromChild !== void 0 ? labelFromChild : title) !== null && _ref !== void 0 ? _ref : \"\",\n menuTitle: title !== null && title !== void 0 ? title : \"\"\n };\n}\nfunction menuActionPropsToHeaderAction(props) {\n var _props_onPress;\n var { isOn, unstable_keepPresented, icon, image, iconRenderingMode, ...rest } = props;\n void image;\n var shared = labelFromChildren(props.children);\n var iconResolution = resolveIcon(icon, props.children);\n var item = {\n ...rest,\n description: props.subtitle,\n type: \"action\",\n label: shared,\n state: isOn ? \"on\" : \"off\",\n onPress: (_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : function() {\n }\n };\n if (unstable_keepPresented !== void 0) {\n item.keepsMenuPresented = unstable_keepPresented;\n }\n var headerIcon = headerIconFromResolution(iconResolution, iconRenderingMode, void 0);\n if (headerIcon) item.icon = headerIcon;\n return item;\n}\nfunction menuElementToHeaderSubmenu(element, placement) {\n var props = element.props;\n if (props.hidden) return null;\n checkMenuChildren(props.children);\n var items = menuChildrenToHeaderMenuItems(props.children, placement);\n return {\n type: \"submenu\",\n label: labelFromChildren(props.children) || props.title || \"\",\n multiselectable: true,\n ...props.inline !== void 0 && {\n inline: props.inline\n },\n ...props.palette !== void 0 && {\n layout: props.palette ? \"palette\" : \"default\"\n },\n ...props.destructive !== void 0 && {\n destructive: props.destructive\n },\n ...headerIconFromResolution(resolveIcon(props.icon, props.children), props.iconRenderingMode, props.tintColor) && {\n icon: headerIconFromResolution(resolveIcon(props.icon, props.children), props.iconRenderingMode, props.tintColor)\n },\n items\n };\n}\nfunction menuChildrenToHeaderMenuItems(children, placement) {\n var items = [];\n import_react.Children.forEach(children, function(child) {\n if (!(0, import_react.isValidElement)(child)) return;\n if (isKind(child, \"menuAction\")) {\n items.push(menuActionPropsToHeaderAction(child.props));\n } else if (isKind(child, \"menu\")) {\n var submenu = menuElementToHeaderSubmenu(child, placement);\n if (submenu) items.push(submenu);\n }\n });\n return items;\n}\nfunction menuPropsToHeaderMenu(element, placement) {\n var props = element.props;\n if (props.hidden) return null;\n checkMenuChildren(props.children);\n var { label, menuTitle } = menuLabelAndTitle(props.children, props.title);\n var icon = headerIconFromResolution(resolveIcon(props.icon, props.children), props.iconRenderingMode, props.tintColor);\n var badge = badgeFromChildren(props.children);\n return {\n type: \"menu\",\n label,\n ...icon && {\n icon\n },\n ...props.variant !== void 0 && {\n variant: props.variant\n },\n ...props.tintColor !== void 0 && {\n tintColor: props.tintColor\n },\n ...props.disabled !== void 0 && {\n disabled: props.disabled\n },\n sharesBackground: !props.separateBackground,\n ...props.hidesSharedBackground !== void 0 && {\n hidesSharedBackground: props.hidesSharedBackground\n },\n ...badge && {\n badge: {\n value: badge.value\n }\n },\n ...props.accessibilityLabel !== void 0 && {\n accessibilityLabel: props.accessibilityLabel\n },\n ...props.accessibilityHint !== void 0 && {\n accessibilityHint: props.accessibilityHint\n },\n menu: {\n ...menuTitle ? {\n title: menuTitle\n } : null,\n multiselectable: true,\n ...props.palette !== void 0 && {\n layout: props.palette ? \"palette\" : \"default\"\n },\n items: menuChildrenToHeaderMenuItems(props.children, placement)\n }\n };\n}\nfunction spacerPropsToHeaderSpacing(props, placement) {\n if (props.hidden) return null;\n if (props.width === void 0) {\n warn(`Warning: Stack.Toolbar.Spacer requires \\`width\\` when used in ${placement} placement. Flexible spacers are only supported in bottom placement.`);\n return null;\n }\n return {\n type: \"spacing\",\n spacing: props.width\n };\n}\nfunction toolbarChildrenToHeaderItems(children, placement) {\n var items = [];\n import_react.Children.forEach(children, function(child) {\n if (!(0, import_react.isValidElement)(child)) return;\n if (isKind(child, \"button\")) {\n var item = buttonPropsToHeaderButton(child.props);\n if (item) items.push(item);\n } else if (isKind(child, \"menu\")) {\n var menu = menuPropsToHeaderMenu(child, placement);\n if (menu) items.push(menu);\n } else if (isKind(child, \"spacer\")) {\n var spacing = spacerPropsToHeaderSpacing(child.props, placement);\n if (spacing) items.push(spacing);\n } else {\n warn(`Warning: Stack.Toolbar with placement=\"${placement}\" only accepts <Stack.Toolbar.Button>, <Stack.Toolbar.Menu>, and <Stack.Toolbar.Spacer> as children. Found invalid child: ${childName(child)}`);\n }\n });\n return items;\n}\nfunction bottomIconFields(iconProp, imageProp, iconRenderingMode, tintColor, children, component) {\n var resolution = resolveIcon(iconProp, children);\n if (!resolution) {\n return {\n ...imageProp !== void 0 && {\n image: imageProp,\n imageRenderingMode: iconRenderingMode !== null && iconRenderingMode !== void 0 ? iconRenderingMode : tintColor !== void 0 ? \"template\" : \"original\"\n }\n };\n }\n if (resolution.form === \"sf\") return {\n sfName: resolution.name\n };\n if (resolution.form === \"xcasset\") {\n var _resolution_renderingMode;\n return {\n xcassetName: resolution.name,\n imageRenderingMode: (_resolution_renderingMode = resolution.renderingMode) !== null && _resolution_renderingMode !== void 0 ? _resolution_renderingMode : iconRenderingMode\n };\n }\n warn(`Warning: Stack.Toolbar.${component} in bottom placement does not support image icons via the \\`icon\\` prop or <Stack.Toolbar.Icon src={...} />; the image will not render. Use the \\`icon\\` prop with an SF Symbol name, the \\`image\\` prop, or <Stack.Toolbar.Icon xcasset=\"...\" />.`);\n return {};\n}\nfunction bottomButtonData(props, index) {\n var _props_onPress;\n checkButtonChildren(props.children);\n var title = labelFromChildren(props.children) || void 0;\n var { sfName, ...iconRest } = bottomIconFields(props.icon, props.image, props.iconRenderingMode, props.tintColor, props.children, \"Button\");\n return {\n kind: \"button\",\n identifier: fallbackIdentifier(\"bottom\", index, title),\n ...title !== void 0 && {\n title\n },\n ...sfName !== void 0 && {\n systemImageName: sfName\n },\n ...iconRest,\n tintColor: props.tintColor,\n ...props.variant !== void 0 && {\n barButtonItemStyle: props.variant\n },\n sharesBackground: !props.separateBackground,\n hidesSharedBackground: props.hidesSharedBackground,\n hidden: props.hidden,\n selected: props.selected,\n disabled: props.disabled,\n // Badges render on bottom toolbarItems items (proven on the iOS 27\n // simulator by the B2 probe), so One passes them through. Intentional\n // divergence from Expo, which calls bottom badges an iOS limitation.\n badgeConfiguration: badgeFromChildren(props.children),\n ...labelStyleFromStyle(props.style) && {\n titleStyle: labelStyleFromStyle(props.style)\n },\n accessibilityLabel: props.accessibilityLabel,\n accessibilityHint: props.accessibilityHint,\n handler: (_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : function() {\n }\n };\n}\nfunction bottomMenuActionData(props, index, path) {\n var _props_onPress;\n var title = labelFromChildren(props.children);\n var { sfName, ...iconRest } = bottomIconFields(props.icon, props.image, props.iconRenderingMode, void 0, props.children, \"MenuAction\");\n return {\n kind: \"action\",\n identifier: fallbackIdentifier(path, index, title),\n title,\n ...sfName !== void 0 && {\n icon: sfName\n },\n ...iconRest,\n disabled: props.disabled,\n destructive: props.destructive,\n hidden: props.hidden,\n isOn: props.isOn,\n keepPresented: props.unstable_keepPresented,\n discoverabilityLabel: props.discoverabilityLabel,\n subtitle: props.subtitle,\n accessibilityLabel: props.accessibilityLabel,\n accessibilityHint: props.accessibilityHint,\n handler: (_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : function() {\n }\n };\n}\nfunction bottomMenuChildren(children, path) {\n var data = [];\n import_react.Children.forEach(children, function(child, index) {\n if (!(0, import_react.isValidElement)(child)) return;\n if (isKind(child, \"menuAction\")) {\n data.push(bottomMenuActionData(child.props, index, path));\n } else if (isKind(child, \"menu\")) {\n data.push(bottomSubmenuData(child, index, path));\n }\n });\n return data;\n}\nfunction bottomSubmenuData(element, index, path) {\n var props = element.props;\n checkMenuChildren(props.children);\n var title = labelFromChildren(props.children) || props.title || \"\";\n var { sfName, ...iconRest } = bottomIconFields(props.icon, props.image, props.iconRenderingMode, props.tintColor, props.children, \"Menu\");\n return {\n kind: \"submenu\",\n identifier: fallbackIdentifier(path, index, title),\n title,\n ...sfName !== void 0 && {\n icon: sfName\n },\n ...iconRest,\n destructive: props.destructive,\n hidden: props.hidden,\n inline: props.inline,\n palette: props.palette,\n accessibilityLabel: props.accessibilityLabel,\n accessibilityHint: props.accessibilityHint,\n children: bottomMenuChildren(props.children, `${path}-submenu-${index}`)\n };\n}\nfunction bottomMenuData(props, index) {\n checkMenuChildren(props.children);\n var { label, menuTitle } = menuLabelAndTitle(props.children, props.title);\n var { sfName, ...iconRest } = bottomIconFields(props.icon, props.image, props.iconRenderingMode, props.tintColor, props.children, \"Menu\");\n return {\n kind: \"menu\",\n identifier: fallbackIdentifier(\"bottom\", index, label || menuTitle),\n title: menuTitle,\n label,\n ...sfName !== void 0 && {\n systemImageName: sfName\n },\n ...iconRest,\n tintColor: props.tintColor,\n ...props.variant !== void 0 && {\n barButtonItemStyle: props.variant\n },\n sharesBackground: !props.separateBackground,\n hidesSharedBackground: props.hidesSharedBackground,\n disabled: props.disabled,\n destructive: props.destructive,\n hidden: props.hidden,\n inline: props.inline,\n palette: props.palette,\n elementSize: props.elementSize,\n accessibilityLabel: props.accessibilityLabel,\n accessibilityHint: props.accessibilityHint,\n children: bottomMenuChildren(props.children, `bottom-menu-${index}`)\n };\n}\nfunction toolbarChildrenToBottomData(children) {\n var data = [];\n import_react.Children.forEach(children, function(child, index) {\n if (!(0, import_react.isValidElement)(child)) return;\n if (isKind(child, \"button\")) {\n data.push(bottomButtonData(child.props, index));\n } else if (isKind(child, \"menu\")) {\n data.push(bottomMenuData(child.props, index));\n } else if (isKind(child, \"spacer\")) {\n var props = child.props;\n data.push({\n kind: \"spacer\",\n identifier: fallbackIdentifier(\"bottom\", index, \"spacer\"),\n ...props.width !== void 0 && {\n width: props.width\n },\n // omitted unless explicit: the native spacer keeps the UIKit default.\n ...props.sharesBackground !== void 0 && {\n sharesBackground: props.sharesBackground\n },\n ...props.hidden !== void 0 && {\n hidden: props.hidden\n }\n });\n } else if (isKind(child, \"searchBarSlot\")) {\n var props1 = child.props;\n data.push({\n kind: \"searchBar\",\n identifier: fallbackIdentifier(\"bottom\", index, \"search\"),\n sharesBackground: !props1.separateBackground,\n hidesSharedBackground: props1.hidesSharedBackground,\n hidden: props1.hidden\n });\n } else {\n warn(`Warning: Stack.Toolbar with bottom placement only accepts <Stack.Toolbar.Button>, <Stack.Toolbar.Menu>, <Stack.Toolbar.Spacer>, and <Stack.Toolbar.SearchBarSlot> as children. Found invalid child: ${childName(child)}`);\n }\n });\n return data;\n}\nfunction appendStackToolbarPropsToOptions(options, 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 (process.env.NODE_ENV !== \"production\") {\n warn(\"Warning: Stack.Toolbar with bottom placement in layout config has no effect. Mount it in screen content so the toolbar host sits inside the screen view controller.\");\n }\n return options;\n }\n if (props.asChild) {\n var key = placement === \"left\" ? \"headerLeft\" : \"headerRight\";\n return {\n ...options,\n headerShown: true,\n [key]: function() {\n return props.children;\n }\n };\n }\n var items = toolbarChildrenToHeaderItems(props.children, placement);\n var key1 = placement === \"left\" ? \"unstable_headerLeftItems\" : \"unstable_headerRightItems\";\n return {\n ...options,\n headerShown: true,\n [key1]: function() {\n return items;\n }\n };\n}\n//# sourceMappingURL=stackTo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M,iBAC1B;IACA,GAAG,MAAM,WAAW,KAAK,KAAK,EAC5B,QAAQ,MAAM,OAChB;GACF,CAAC;EACH,OAAO,IAAI,OAAO,OAAO,eAAe,GAAG;GACzC,IAAI,SAAS,MAAM;GACnB,KAAK,KAAK;IACR,MAAM;IACN,YAAY,mBAAmB,UAAU,OAAO,QAAQ;IACxD,kBAAkB,CAAC,OAAO;IAC1B,uBAAuB,OAAO;IAC9B,QAAQ,OAAO;GACjB,CAAC;EACH,OAAO;GACL,KAAK,uMAAuM,UAAU,KAAK,GAAG;EAChO;CACF,CAAC;CACD,OAAO;AACT;AACA,SAAS,iCAAiC,SAAS,OAAO;CACxD,IAAI;CACJ,IAAI,aAAa,mBAAmB,MAAM,eAAe,QAAQ,qBAAqB,KAAK,IAAI,mBAAmB;CAClH,IAAI,cAAc,UAAU;EAC1B,IAAI,QAAQ,IAAI,aAAa,cAAc;GACzC,KAAK,qKAAqK;EAC5K;EACA,OAAO;CACT;CACA,IAAI,MAAM,SAAS;EACjB,IAAI,MAAM,cAAc,SAAS,eAAe;EAChD,OAAO;GACL,GAAG;GACH,aAAa;GACb,CAAC,MAAM,WAAW;IAChB,OAAO,MAAM;GACf;EACF;CACF;CACA,IAAI,QAAQ,6BAA6B,MAAM,UAAU,SAAS;CAClE,IAAI,OAAO,cAAc,SAAS,6BAA6B;CAC/D,OAAO;EACL,GAAG;EACH,aAAa;EACb,CAAC,OAAO,WAAW;GACjB,OAAO;EACT;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"stackToolbarDescriptors.native.js","names":[],"sources":["cjs/layouts/stack-utils/stackToolbarDescriptors.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 stackToolbarDescriptors_exports = {};\n__export(stackToolbarDescriptors_exports, {\n TOOLBAR_KIND: () => TOOLBAR_KIND,\n appendStackToolbarPropsToOptions: () => appendStackToolbarPropsToOptions,\n isToolbarKind: () => isKind,\n toolbarChildrenToBottomData: () => toolbarChildrenToBottomData,\n toolbarChildrenToHeaderItems: () => toolbarChildrenToHeaderItems,\n toolbarChildrenToString: () => toolbarChildrenToString\n});\nmodule.exports = __toCommonJS(stackToolbarDescriptors_exports);\nvar import_react = require(\"react\");\nvar TOOLBAR_KIND = \"__oneStackToolbarKind\";\nfunction kindOf(element) {\n var _element_type;\n if (!(0, import_react.isValidElement)(element)) return void 0;\n return (_element_type = element.type) === null || _element_type === void 0 ? void 0 : _element_type[TOOLBAR_KIND];\n}\nfunction isKind(element, kind) {\n return kindOf(element) === kind;\n}\nfunction warn(message) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(message);\n }\n}\nfunction childName(child) {\n var _ref;\n if (!(0, import_react.isValidElement)(child)) return \"unknown\";\n var type = child.type;\n if (typeof type === \"string\") return type;\n if (typeof type === \"symbol\") return \"Fragment\";\n return (_ref = type === null || type === void 0 ? void 0 : type.name) !== null && _ref !== void 0 ? _ref : \"unknown\";\n}\nfunction fallbackIdentifier(slot, index, title) {\n var slug = (title !== null && title !== void 0 ? title : \"item\").toLowerCase().replace(/[^a-z0-9]+/g, \"-\").slice(0, 24) || \"item\";\n return `stack-toolbar-${slot}-${slug}-${index}`;\n}\nfunction firstChildOfKind(children, kind) {\n var found = null;\n import_react.Children.forEach(children, function(child) {\n if (found || !(0, import_react.isValidElement)(child)) return;\n if (isKind(child, kind)) found = child;\n });\n return found;\n}\nfunction toolbarChildrenToString(children) {\n return import_react.Children.toArray(children).filter(function(child) {\n return typeof child === \"string\" || typeof child === \"number\";\n }).join(\"\");\n}\nfunction resolveIcon(iconProp, children) {\n var iconChild = firstChildOfKind(children, \"icon\");\n if (iconChild) {\n var props = iconChild.props;\n if (\"sf\" in props) return {\n form: \"sf\",\n name: props.sf\n };\n if (\"xcasset\" in props) return {\n form: \"xcasset\",\n name: props.xcasset,\n renderingMode: props.renderingMode\n };\n return {\n form: \"src\",\n source: props.src,\n renderingMode: props.renderingMode\n };\n }\n if (typeof iconProp === \"string\") return {\n form: \"sf\",\n name: iconProp\n };\n if (iconProp) return {\n form: \"src\",\n source: iconProp\n };\n return void 0;\n}\nfunction checkButtonChildren(children) {\n if (process.env.NODE_ENV === \"production\" || typeof children === \"string\") return;\n var all = import_react.Children.toArray(children);\n var valid = all.filter(function(child) {\n return typeof child === \"string\" || typeof child === \"number\" || (0, import_react.isValidElement)(child) && (isKind(child, \"label\") || isKind(child, \"icon\") || isKind(child, \"badge\"));\n });\n if (all.length !== valid.length) {\n throw new Error(\"Stack.Toolbar.Button only accepts a single string or Stack.Toolbar.Label, Stack.Toolbar.Icon, and Stack.Toolbar.Badge as its children.\");\n }\n}\nfunction checkMenuChildren(children) {\n if (process.env.NODE_ENV === \"production\") return;\n var all = import_react.Children.toArray(children);\n var valid = all.filter(function(child) {\n return (0, import_react.isValidElement)(child) && (isKind(child, \"menu\") || isKind(child, \"menuAction\") || isKind(child, \"label\") || isKind(child, \"icon\") || isKind(child, \"badge\"));\n });\n if (all.length !== valid.length) {\n throw new Error(\"Stack.Toolbar.Menu only accepts Stack.Toolbar.Menu, Stack.Toolbar.MenuAction, Stack.Toolbar.Label, Stack.Toolbar.Icon, and Stack.Toolbar.Badge as its children.\");\n }\n}\nfunction labelFromChildren(children) {\n var _labelChild_props_children;\n var labelChild = firstChildOfKind(children, \"label\");\n if (labelChild) return (_labelChild_props_children = labelChild.props.children) !== null && _labelChild_props_children !== void 0 ? _labelChild_props_children : \"\";\n return toolbarChildrenToString(children);\n}\nfunction badgeFromChildren(children) {\n var _props_children;\n var badgeChild = firstChildOfKind(children, \"badge\");\n if (!badgeChild) return void 0;\n var props = badgeChild.props;\n var style = props.style;\n return {\n value: (_props_children = props.children) !== null && _props_children !== void 0 ? _props_children : \"\",\n ...(style === null || style === void 0 ? void 0 : style.backgroundColor) !== void 0 && {\n backgroundColor: style.backgroundColor\n },\n ...(style === null || style === void 0 ? void 0 : style.color) !== void 0 && {\n color: style.color\n },\n ...(style === null || style === void 0 ? void 0 : style.fontFamily) !== void 0 && {\n fontFamily: style.fontFamily\n },\n ...(style === null || style === void 0 ? void 0 : style.fontSize) !== void 0 && {\n fontSize: style.fontSize\n },\n ...(style === null || style === void 0 ? void 0 : style.fontWeight) !== void 0 && {\n fontWeight: style.fontWeight\n }\n };\n}\nfunction labelStyleFromStyle(style) {\n if (!style) return void 0;\n var flat = style;\n var picked = {\n ...flat.fontFamily !== void 0 && {\n fontFamily: flat.fontFamily\n },\n ...flat.fontSize !== void 0 && {\n fontSize: flat.fontSize\n },\n ...flat.fontWeight !== void 0 && {\n fontWeight: flat.fontWeight\n },\n ...flat.color !== void 0 && {\n color: flat.color\n }\n };\n return Object.keys(picked).length ? picked : void 0;\n}\nfunction headerIconFromResolution(resolution, iconRenderingMode, tintColor) {\n var _ref, _resolution_renderingMode;\n if (!resolution) return void 0;\n if (resolution.form === \"sf\") {\n return {\n type: \"sfSymbol\",\n name: resolution.name\n };\n }\n var source = resolution.form === \"src\" ? resolution.source : {\n uri: resolution.name\n };\n var effectiveMode = (_ref = (_resolution_renderingMode = resolution.renderingMode) !== null && _resolution_renderingMode !== void 0 ? _resolution_renderingMode : iconRenderingMode) !== null && _ref !== void 0 ? _ref : tintColor ? \"template\" : \"original\";\n return {\n type: \"image\",\n source,\n tinted: effectiveMode === \"template\"\n };\n}\nfunction buttonPropsToHeaderButton(props) {\n var _props_onPress;\n if (props.hidden) return null;\n checkButtonChildren(props.children);\n var label = labelFromChildren(props.children);\n var icon = headerIconFromResolution(resolveIcon(props.icon, props.children), props.iconRenderingMode, props.tintColor);\n var badge = badgeFromChildren(props.children);\n return {\n type: \"button\",\n label,\n ...icon && {\n icon\n },\n ...props.variant !== void 0 && {\n variant: props.variant\n },\n ...props.tintColor !== void 0 && {\n tintColor: props.tintColor\n },\n ...props.disabled !== void 0 && {\n disabled: props.disabled\n },\n sharesBackground: !props.separateBackground,\n ...props.hidesSharedBackground !== void 0 && {\n hidesSharedBackground: props.hidesSharedBackground\n },\n ...badge && {\n badge: {\n value: badge.value,\n ...(badge.color !== void 0 || badge.backgroundColor !== void 0 || badge.fontFamily !== void 0 || badge.fontSize !== void 0 || badge.fontWeight !== void 0) && {\n style: {\n ...badge.color !== void 0 && {\n color: badge.color\n },\n ...badge.backgroundColor !== void 0 && {\n backgroundColor: badge.backgroundColor\n },\n ...badge.fontFamily !== void 0 && {\n fontFamily: badge.fontFamily\n },\n ...badge.fontSize !== void 0 && {\n fontSize: badge.fontSize\n },\n ...badge.fontWeight !== void 0 && {\n fontWeight: badge.fontWeight\n }\n }\n }\n }\n },\n ...labelStyleFromStyle(props.style) && {\n labelStyle: labelStyleFromStyle(props.style)\n },\n ...props.accessibilityLabel !== void 0 && {\n accessibilityLabel: props.accessibilityLabel\n },\n ...props.accessibilityHint !== void 0 && {\n accessibilityHint: props.accessibilityHint\n },\n onPress: (_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : function() {\n },\n selected: !!props.selected\n };\n}\nfunction menuLabelAndTitle(children, title) {\n var _ref;\n var _labelChild_props;\n var labelChild = firstChildOfKind(children, \"label\");\n var labelFromChild = labelChild === null || labelChild === void 0 ? void 0 : (_labelChild_props = labelChild.props) === null || _labelChild_props === void 0 ? void 0 : _labelChild_props.children;\n return {\n label: (_ref = labelFromChild !== null && labelFromChild !== void 0 ? labelFromChild : title) !== null && _ref !== void 0 ? _ref : \"\",\n menuTitle: title !== null && title !== void 0 ? title : \"\"\n };\n}\nfunction menuActionPropsToHeaderAction(props) {\n var _props_onPress;\n var { children, subtitle, isOn, unstable_keepPresented, icon, image, iconRenderingMode, ...rest } = props;\n void image;\n var shared = labelFromChildren(children);\n var iconResolution = resolveIcon(icon, children);\n var item = {\n ...rest,\n description: subtitle,\n type: \"action\",\n label: shared,\n state: isOn ? \"on\" : \"off\",\n onPress: (_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : function() {\n }\n };\n if (unstable_keepPresented !== void 0) {\n item.keepsMenuPresented = unstable_keepPresented;\n }\n var headerIcon = headerIconFromResolution(iconResolution, iconRenderingMode, void 0);\n if (headerIcon) item.icon = headerIcon;\n return item;\n}\nfunction menuElementToHeaderSubmenu(element, placement) {\n var props = element.props;\n if (props.hidden) return null;\n checkMenuChildren(props.children);\n var items = menuChildrenToHeaderMenuItems(props.children, placement);\n return {\n type: \"submenu\",\n label: labelFromChildren(props.children) || props.title || \"\",\n multiselectable: true,\n ...props.inline !== void 0 && {\n inline: props.inline\n },\n ...props.palette !== void 0 && {\n layout: props.palette ? \"palette\" : \"default\"\n },\n ...props.destructive !== void 0 && {\n destructive: props.destructive\n },\n ...headerIconFromResolution(resolveIcon(props.icon, props.children), props.iconRenderingMode, props.tintColor) && {\n icon: headerIconFromResolution(resolveIcon(props.icon, props.children), props.iconRenderingMode, props.tintColor)\n },\n items\n };\n}\nfunction menuChildrenToHeaderMenuItems(children, placement) {\n var items = [];\n import_react.Children.forEach(children, function(child) {\n if (!(0, import_react.isValidElement)(child)) return;\n if (isKind(child, \"menuAction\")) {\n items.push(menuActionPropsToHeaderAction(child.props));\n } else if (isKind(child, \"menu\")) {\n var submenu = menuElementToHeaderSubmenu(child, placement);\n if (submenu) items.push(submenu);\n }\n });\n return items;\n}\nfunction menuPropsToHeaderMenu(element, placement) {\n var props = element.props;\n if (props.hidden) return null;\n checkMenuChildren(props.children);\n var { label, menuTitle } = menuLabelAndTitle(props.children, props.title);\n var icon = headerIconFromResolution(resolveIcon(props.icon, props.children), props.iconRenderingMode, props.tintColor);\n var badge = badgeFromChildren(props.children);\n return {\n type: \"menu\",\n label,\n ...icon && {\n icon\n },\n ...props.variant !== void 0 && {\n variant: props.variant\n },\n ...props.tintColor !== void 0 && {\n tintColor: props.tintColor\n },\n ...props.disabled !== void 0 && {\n disabled: props.disabled\n },\n sharesBackground: !props.separateBackground,\n ...props.hidesSharedBackground !== void 0 && {\n hidesSharedBackground: props.hidesSharedBackground\n },\n ...badge && {\n badge: {\n value: badge.value\n }\n },\n ...props.accessibilityLabel !== void 0 && {\n accessibilityLabel: props.accessibilityLabel\n },\n ...props.accessibilityHint !== void 0 && {\n accessibilityHint: props.accessibilityHint\n },\n menu: {\n ...menuTitle ? {\n title: menuTitle\n } : null,\n multiselectable: true,\n ...props.palette !== void 0 && {\n layout: props.palette ? \"palette\" : \"default\"\n },\n items: menuChildrenToHeaderMenuItems(props.children, placement)\n }\n };\n}\nfunction spacerPropsToHeaderSpacing(props, placement) {\n if (props.hidden) return null;\n if (props.width === void 0) {\n warn(`Warning: Stack.Toolbar.Spacer requires \\`width\\` when used in ${placement} placement. Flexible spacers are only supported in bottom placement.`);\n return null;\n }\n return {\n type: \"spacing\",\n spacing: props.width\n };\n}\nfunction toolbarChildrenToHeaderItems(children, placement) {\n var items = [];\n import_react.Children.forEach(children, function(child) {\n if (!(0, import_react.isValidElement)(child)) return;\n if (isKind(child, \"button\")) {\n var item = buttonPropsToHeaderButton(child.props);\n if (item) items.push(item);\n } else if (isKind(child, \"menu\")) {\n var menu = menuPropsToHeaderMenu(child, placement);\n if (menu) items.push(menu);\n } else if (isKind(child, \"spacer\")) {\n var spacing = spacerPropsToHeaderSpacing(child.props, placement);\n if (spacing) items.push(spacing);\n } else {\n warn(`Warning: Stack.Toolbar with placement=\"${placement}\" only accepts <Stack.Toolbar.Button>, <Stack.Toolbar.Menu>, and <Stack.Toolbar.Spacer> as children. Found invalid child: ${childName(child)}`);\n }\n });\n return items;\n}\nfunction bottomIconFields(iconProp, imageProp, iconRenderingMode, tintColor, children, component) {\n var resolution = resolveIcon(iconProp, children);\n if (!resolution) {\n return {\n ...imageProp !== void 0 && {\n image: imageProp,\n imageRenderingMode: iconRenderingMode !== null && iconRenderingMode !== void 0 ? iconRenderingMode : tintColor !== void 0 ? \"template\" : \"original\"\n }\n };\n }\n if (resolution.form === \"sf\") return {\n sfName: resolution.name\n };\n if (resolution.form === \"xcasset\") {\n var _resolution_renderingMode;\n return {\n xcassetName: resolution.name,\n imageRenderingMode: (_resolution_renderingMode = resolution.renderingMode) !== null && _resolution_renderingMode !== void 0 ? _resolution_renderingMode : iconRenderingMode\n };\n }\n warn(`Warning: Stack.Toolbar.${component} in bottom placement does not support image icons via the \\`icon\\` prop or <Stack.Toolbar.Icon src={...} />; the image will not render. Use the \\`icon\\` prop with an SF Symbol name, the \\`image\\` prop, or <Stack.Toolbar.Icon xcasset=\"...\" />.`);\n return {};\n}\nfunction bottomButtonData(props, index) {\n var _props_onPress;\n checkButtonChildren(props.children);\n var title = labelFromChildren(props.children) || void 0;\n var { sfName, ...iconRest } = bottomIconFields(props.icon, props.image, props.iconRenderingMode, props.tintColor, props.children, \"Button\");\n return {\n kind: \"button\",\n identifier: fallbackIdentifier(\"bottom\", index, title),\n ...title !== void 0 && {\n title\n },\n ...sfName !== void 0 && {\n systemImageName: sfName\n },\n ...iconRest,\n tintColor: props.tintColor,\n ...props.variant !== void 0 && {\n barButtonItemStyle: props.variant\n },\n sharesBackground: !props.separateBackground,\n hidesSharedBackground: props.hidesSharedBackground,\n hidden: props.hidden,\n selected: props.selected,\n disabled: props.disabled,\n // Badges render on bottom toolbarItems items (proven on the iOS 27\n // simulator by the B2 probe), so One passes them through. Intentional\n // divergence from Expo, which calls bottom badges an iOS limitation.\n badgeConfiguration: badgeFromChildren(props.children),\n ...labelStyleFromStyle(props.style) && {\n titleStyle: labelStyleFromStyle(props.style)\n },\n accessibilityLabel: props.accessibilityLabel,\n accessibilityHint: props.accessibilityHint,\n handler: (_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : function() {\n }\n };\n}\nfunction bottomMenuActionData(props, index, path) {\n var _props_onPress;\n var title = labelFromChildren(props.children);\n var { sfName, ...iconRest } = bottomIconFields(props.icon, props.image, props.iconRenderingMode, void 0, props.children, \"MenuAction\");\n return {\n kind: \"action\",\n identifier: fallbackIdentifier(path, index, title),\n title,\n ...sfName !== void 0 && {\n icon: sfName\n },\n ...iconRest,\n disabled: props.disabled,\n destructive: props.destructive,\n hidden: props.hidden,\n isOn: props.isOn,\n keepPresented: props.unstable_keepPresented,\n discoverabilityLabel: props.discoverabilityLabel,\n subtitle: props.subtitle,\n accessibilityLabel: props.accessibilityLabel,\n accessibilityHint: props.accessibilityHint,\n handler: (_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : function() {\n }\n };\n}\nfunction bottomMenuChildren(children, path) {\n var data = [];\n import_react.Children.forEach(children, function(child, index) {\n if (!(0, import_react.isValidElement)(child)) return;\n if (isKind(child, \"menuAction\")) {\n data.push(bottomMenuActionData(child.props, index, path));\n } else if (isKind(child, \"menu\")) {\n data.push(bottomSubmenuData(child, index, path));\n }\n });\n return data;\n}\nfunction bottomSubmenuData(element, index, path) {\n var props = element.props;\n checkMenuChildren(props.children);\n var title = labelFromChildren(props.children) || props.title || \"\";\n var { sfName, ...iconRest } = bottomIconFields(props.icon, props.image, props.iconRenderingMode, props.tintColor, props.children, \"Menu\");\n return {\n kind: \"submenu\",\n identifier: fallbackIdentifier(path, index, title),\n title,\n ...sfName !== void 0 && {\n icon: sfName\n },\n ...iconRest,\n destructive: props.destructive,\n hidden: props.hidden,\n inline: props.inline,\n palette: props.palette,\n accessibilityLabel: props.accessibilityLabel,\n accessibilityHint: props.accessibilityHint,\n children: bottomMenuChildren(props.children, `${path}-submenu-${index}`)\n };\n}\nfunction bottomMenuData(props, index) {\n checkMenuChildren(props.children);\n var { label, menuTitle } = menuLabelAndTitle(props.children, props.title);\n var { sfName, ...iconRest } = bottomIconFields(props.icon, props.image, props.iconRenderingMode, props.tintColor, props.children, \"Menu\");\n return {\n kind: \"menu\",\n identifier: fallbackIdentifier(\"bottom\", index, label || menuTitle),\n title: menuTitle,\n label,\n ...sfName !== void 0 && {\n systemImageName: sfName\n },\n ...iconRest,\n tintColor: props.tintColor,\n ...props.variant !== void 0 && {\n barButtonItemStyle: props.variant\n },\n sharesBackground: !props.separateBackground,\n hidesSharedBackground: props.hidesSharedBackground,\n disabled: props.disabled,\n destructive: props.destructive,\n hidden: props.hidden,\n inline: props.inline,\n palette: props.palette,\n elementSize: props.elementSize,\n accessibilityLabel: props.accessibilityLabel,\n accessibilityHint: props.accessibilityHint,\n children: bottomMenuChildren(props.children, `bottom-menu-${index}`)\n };\n}\nfunction toolbarChildrenToBottomData(children) {\n var data = [];\n import_react.Children.forEach(children, function(child, index) {\n if (!(0, import_react.isValidElement)(child)) return;\n if (isKind(child, \"button\")) {\n data.push(bottomButtonData(child.props, index));\n } else if (isKind(child, \"menu\")) {\n data.push(bottomMenuData(child.props, index));\n } else if (isKind(child, \"spacer\")) {\n var props = child.props;\n data.push({\n kind: \"spacer\",\n identifier: fallbackIdentifier(\"bottom\", index, \"spacer\"),\n ...props.width !== void 0 && {\n width: props.width\n },\n // omitted unless explicit: the native spacer keeps the UIKit default.\n ...props.sharesBackground !== void 0 && {\n sharesBackground: props.sharesBackground\n },\n ...props.hidden !== void 0 && {\n hidden: props.hidden\n }\n });\n } else if (isKind(child, \"searchBarSlot\")) {\n var props1 = child.props;\n data.push({\n kind: \"searchBar\",\n identifier: fallbackIdentifier(\"bottom\", index, \"search\"),\n sharesBackground: !props1.separateBackground,\n hidesSharedBackground: props1.hidesSharedBackground,\n hidden: props1.hidden\n });\n } else {\n warn(`Warning: Stack.Toolbar with bottom placement only accepts <Stack.Toolbar.Button>, <Stack.Toolbar.Menu>, <Stack.Toolbar.Spacer>, and <Stack.Toolbar.SearchBarSlot> as children. Found invalid child: ${childName(child)}`);\n }\n });\n return data;\n}\nfunction appendStackToolbarPropsToOptions(options, 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 (process.env.NODE_ENV !== \"production\") {\n warn(\"Warning: Stack.Toolbar with bottom placement in layout config has no effect. Mount it in screen content so the toolbar host sits inside the screen view controller.\");\n }\n return options;\n }\n if (props.asChild) {\n var key = placement === \"left\" ? \"headerLeft\" : \"headerRight\";\n return {\n ...options,\n headerShown: true,\n [key]: function() {\n return props.children;\n }\n };\n }\n var items = toolbarChildrenToHeaderItems(props.children, placement);\n var key1 = placement === \"left\" ? \"unstable_headerLeftItems\" : \"unstable_headerRightItems\";\n return {\n ...options,\n headerShown: true,\n [key1]: function() {\n return items;\n }\n };\n}\n//# sourceMappingURL=stackToolbarDescriptors.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,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aAAa;GACb,CAAC,MAAM,WAAW;IAChB,OAAO,MAAM;GACf;EACF;CACF;CACA,IAAI,QAAQ,6BAA6B,MAAM,UAAU,SAAS;CAClE,IAAI,OAAO,cAAc,SAAS,6BAA6B;CAC/D,OAAO;EACL,GAAG;EACH,aAAa;EACb,CAAC,OAAO,WAAW;GACjB,OAAO;EACT;CACF;AACF"}
|
package/dist/cjs/one.cjs
CHANGED
|
@@ -31,6 +31,7 @@ const iOS = Object.freeze({
|
|
|
31
31
|
...import_native.Swift,
|
|
32
32
|
Widgets: import_native.Widgets,
|
|
33
33
|
LiveActivities: import_native.LiveActivities,
|
|
34
|
+
WidgetUI: import_native.WidgetUI,
|
|
34
35
|
Color: import_native.Color.ios,
|
|
35
36
|
MenuAction: import_native.MenuAction,
|
|
36
37
|
SplitView: import_native.SplitView,
|
package/dist/cjs/one.native.cjs
CHANGED
|
@@ -34,6 +34,7 @@ var iOS = Object.freeze({
|
|
|
34
34
|
...import_native.Swift,
|
|
35
35
|
Widgets: import_native.Widgets,
|
|
36
36
|
LiveActivities: import_native.LiveActivities,
|
|
37
|
+
WidgetUI: import_native.WidgetUI,
|
|
37
38
|
Color: import_native.Color.ios,
|
|
38
39
|
MenuAction: import_native.MenuAction,
|
|
39
40
|
SplitView: import_native.SplitView,
|
package/dist/cjs/one.native.js
CHANGED
|
@@ -34,6 +34,7 @@ var iOS = Object.freeze({
|
|
|
34
34
|
...import_native.Swift,
|
|
35
35
|
Widgets: import_native.Widgets,
|
|
36
36
|
LiveActivities: import_native.LiveActivities,
|
|
37
|
+
WidgetUI: import_native.WidgetUI,
|
|
37
38
|
Color: import_native.Color.ios,
|
|
38
39
|
MenuAction: import_native.MenuAction,
|
|
39
40
|
SplitView: import_native.SplitView,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"one.native.js","names":[],"sources":["cjs/one.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 one_exports = {};\n__export(one_exports, {\n One: () => One\n});\nmodule.exports = __toCommonJS(one_exports);\nvar import_native = require(\"@vxrn/native\");\nvar import_safe_area = require(\"@vxrn/safe-area\");\nfunction currentPlatform() {\n var _Reflect_get;\n var defined = (_Reflect_get = Reflect.get(globalThis, \"__ONE_PLATFORM__\")) !== null && _Reflect_get !== void 0 ? _Reflect_get : typeof process !== \"undefined\" ? process.env.ONE_PLATFORM : void 0;\n return defined === \"ios\" || defined === \"android\" || defined === \"rnx\" ? defined : \"web\";\n}\nvar iOS = Object.freeze({\n ...import_native.Swift,\n Widgets: import_native.Widgets,\n LiveActivities: import_native.LiveActivities,\n Color: import_native.Color.ios,\n MenuAction: import_native.MenuAction,\n SplitView: import_native.SplitView,\n ToolbarHost: import_native.ToolbarHost,\n ToolbarItem: import_native.ToolbarItem,\n ZoomTransitionAlignmentRectDetector: import_native.ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler: import_native.ZoomTransitionEnabler,\n ZoomTransitionSource: import_native.ZoomTransitionSource\n});\nvar Android = Object.freeze({\n ...import_native.Compose,\n Menu: import_native.Menu,\n ContextMenu: import_native.ContextMenu\n});\nvar SafeArea = Object.freeze({\n Provider: import_safe_area.SafeAreaProvider,\n View: import_safe_area.SafeAreaView,\n initialMetrics: import_safe_area.initialWindowMetrics,\n useFrame: import_safe_area.useSafeAreaFrame,\n useInsets: import_safe_area.useSafeAreaInsets\n});\nvar UI = Object.freeze({\n ...import_native.UI,\n Fonts: import_native.Fonts,\n SafeArea,\n Haptics: import_native.Haptics,\n TextInput: import_native.TextInput,\n useFonts: import_native.useFonts,\n useNativeState: import_native.useNativeState,\n useSizeClass: import_native.useSizeClass,\n getSizeClass: import_native.getSizeClass,\n useHinge: import_native.useHinge,\n getHinge: import_native.getHinge,\n onHingeChange: import_native.onHingeChange,\n ReservedRegions: import_native.ReservedRegions\n});\nvar One = Object.freeze({\n get platform() {\n return currentPlatform();\n },\n AppInfo: import_native.AppInfo,\n Database: import_native.Database,\n iOS,\n Android,\n UI,\n Notifications: import_native.Notifications,\n Clipboard: import_native.Clipboard,\n Network: import_native.Network,\n Browser: import_native.Browser,\n ImagePicker: import_native.ImagePicker,\n useNetworkState: import_native.useNetworkState\n});\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AAC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AAgB;CACzB;CACA,SAAS,cAAc;CACvB,UAAU,cAAc;CACxB;CACA;CACA;CACA,eAAe,cAAc;CAC7B,WAAW,cAAc;CACzB,SAAS,cAAc;CACvB,SAAS,cAAc;CACvB,aAAa,cAAc;CAC3B,iBAAiB,cAAc;AACjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"one.native.js","names":[],"sources":["cjs/one.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 one_exports = {};\n__export(one_exports, {\n One: () => One\n});\nmodule.exports = __toCommonJS(one_exports);\nvar import_native = require(\"@vxrn/native\");\nvar import_safe_area = require(\"@vxrn/safe-area\");\nfunction currentPlatform() {\n var _Reflect_get;\n var defined = (_Reflect_get = Reflect.get(globalThis, \"__ONE_PLATFORM__\")) !== null && _Reflect_get !== void 0 ? _Reflect_get : typeof process !== \"undefined\" ? process.env.ONE_PLATFORM : void 0;\n return defined === \"ios\" || defined === \"android\" || defined === \"rnx\" ? defined : \"web\";\n}\nvar iOS = Object.freeze({\n ...import_native.Swift,\n Widgets: import_native.Widgets,\n LiveActivities: import_native.LiveActivities,\n WidgetUI: import_native.WidgetUI,\n Color: import_native.Color.ios,\n MenuAction: import_native.MenuAction,\n SplitView: import_native.SplitView,\n ToolbarHost: import_native.ToolbarHost,\n ToolbarItem: import_native.ToolbarItem,\n ZoomTransitionAlignmentRectDetector: import_native.ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler: import_native.ZoomTransitionEnabler,\n ZoomTransitionSource: import_native.ZoomTransitionSource\n});\nvar Android = Object.freeze({\n ...import_native.Compose,\n Menu: import_native.Menu,\n ContextMenu: import_native.ContextMenu\n});\nvar SafeArea = Object.freeze({\n Provider: import_safe_area.SafeAreaProvider,\n View: import_safe_area.SafeAreaView,\n initialMetrics: import_safe_area.initialWindowMetrics,\n useFrame: import_safe_area.useSafeAreaFrame,\n useInsets: import_safe_area.useSafeAreaInsets\n});\nvar UI = Object.freeze({\n ...import_native.UI,\n Fonts: import_native.Fonts,\n SafeArea,\n Haptics: import_native.Haptics,\n TextInput: import_native.TextInput,\n useFonts: import_native.useFonts,\n useNativeState: import_native.useNativeState,\n useSizeClass: import_native.useSizeClass,\n getSizeClass: import_native.getSizeClass,\n useHinge: import_native.useHinge,\n getHinge: import_native.getHinge,\n onHingeChange: import_native.onHingeChange,\n ReservedRegions: import_native.ReservedRegions\n});\nvar One = Object.freeze({\n get platform() {\n return currentPlatform();\n },\n AppInfo: import_native.AppInfo,\n Database: import_native.Database,\n iOS,\n Android,\n UI,\n Notifications: import_native.Notifications,\n Clipboard: import_native.Clipboard,\n Network: import_native.Network,\n Browser: import_native.Browser,\n ImagePicker: import_native.ImagePicker,\n useNetworkState: import_native.useNetworkState\n});\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAA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WAAW,iBAAiB;AAC9B,CAAC;AACD,IAAI,KAAK,OAAO,OAAO;CACrB,GAAG,cAAc;CACjB,OAAO,cAAc;CACrB;CACA,SAAS,cAAc;CACvB,WAAW,cAAc;CACzB,UAAU,cAAc;CACxB,gBAAgB,cAAc;CAC9B,cAAc,cAAc;CAC5B,cAAc,cAAc;CAC5B,UAAU,cAAc;CACxB,UAAU,cAAc;CACxB,eAAe,cAAc;CAC7B,iBAAiB,cAAc;AACjC,CAAC;AACD,IAAI,MAAM,OAAO,OAAO;CACtB,IAAI,WAAW;EACb,OAAO,gBAAgB;CACzB;CACA,SAAS,cAAc;CACvB,UAAU,cAAc;CACxB;CACA;CACA;CACA,eAAe,cAAc;CAC7B,WAAW,cAAc;CACzB,SAAS,cAAc;CACvB,SAAS,cAAc;CACvB,aAAa,cAAc;CAC3B,iBAAiB,cAAc;AACjC,CAAC"}
|
package/dist/cjs/vite/one.cjs
CHANGED
|
@@ -222,6 +222,59 @@ function one(options = {}) {
|
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
|
+
const createAliasPlugin = (alias, nativePlatform) => {
|
|
226
|
+
const resolveMap = (map) => {
|
|
227
|
+
if (!map) return null;
|
|
228
|
+
const out = {};
|
|
229
|
+
for (const [key, value] of Object.entries(map)) {
|
|
230
|
+
try {
|
|
231
|
+
out[key] = import_node_path.default.isAbsolute(value) ? value : (0, import_resolve.resolvePath)(value);
|
|
232
|
+
} catch {
|
|
233
|
+
out[key] = value;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return out;
|
|
237
|
+
};
|
|
238
|
+
const resolved = {
|
|
239
|
+
web: resolveMap(alias.web),
|
|
240
|
+
native: resolveMap(alias.native),
|
|
241
|
+
client: resolveMap(alias.client),
|
|
242
|
+
ssr: resolveMap(alias.ssr),
|
|
243
|
+
ios: resolveMap(alias.ios),
|
|
244
|
+
android: resolveMap(alias.android)
|
|
245
|
+
};
|
|
246
|
+
const aliasKeys = [...new Set(Object.values(resolved).flatMap((m) => m ? Object.keys(m) : []))];
|
|
247
|
+
const aliasFilter = aliasKeys.length ? new RegExp(`^(?:${aliasKeys.map((k) => k.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})$`) : /(?!)/;
|
|
248
|
+
return {
|
|
249
|
+
name: "one:alias",
|
|
250
|
+
enforce: "pre",
|
|
251
|
+
resolveId: {
|
|
252
|
+
filter: { id: aliasFilter },
|
|
253
|
+
handler(source) {
|
|
254
|
+
const env = nativePlatform ?? this.environment?.name;
|
|
255
|
+
const specific = env ? resolved[env] : null;
|
|
256
|
+
if (specific && source in specific) {
|
|
257
|
+
const id = specific[source];
|
|
258
|
+
return {
|
|
259
|
+
id,
|
|
260
|
+
external: false,
|
|
261
|
+
packageJsonPath: (0, import_vxrn.nearestPackageJson)(id)
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
const isWeb = !env || env === "client" || env === "ssr";
|
|
265
|
+
const general = isWeb ? resolved.web : resolved.native;
|
|
266
|
+
if (general && source in general) {
|
|
267
|
+
const id = general[source];
|
|
268
|
+
return {
|
|
269
|
+
id,
|
|
270
|
+
external: false,
|
|
271
|
+
packageJsonPath: (0, import_vxrn.nearestPackageJson)(id)
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
};
|
|
225
278
|
const devAndProdPlugins = [
|
|
226
279
|
{
|
|
227
280
|
name: "one:config",
|
|
@@ -349,60 +402,7 @@ function one(options = {}) {
|
|
|
349
402
|
}
|
|
350
403
|
};
|
|
351
404
|
})()],
|
|
352
|
-
...options.alias ? [(
|
|
353
|
-
const resolveMap = (map) => {
|
|
354
|
-
if (!map) return null;
|
|
355
|
-
const out = {};
|
|
356
|
-
for (const [key, value] of Object.entries(map)) {
|
|
357
|
-
try {
|
|
358
|
-
out[key] = import_node_path.default.isAbsolute(value) ? value : (0, import_resolve.resolvePath)(value);
|
|
359
|
-
} catch {
|
|
360
|
-
out[key] = value;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
return out;
|
|
364
|
-
};
|
|
365
|
-
const a = options.alias;
|
|
366
|
-
const resolved = {
|
|
367
|
-
web: resolveMap(a.web),
|
|
368
|
-
native: resolveMap(a.native),
|
|
369
|
-
client: resolveMap(a.client),
|
|
370
|
-
ssr: resolveMap(a.ssr),
|
|
371
|
-
ios: resolveMap(a.ios),
|
|
372
|
-
android: resolveMap(a.android)
|
|
373
|
-
};
|
|
374
|
-
const aliasKeys = [...new Set(Object.values(resolved).flatMap((m) => m ? Object.keys(m) : []))];
|
|
375
|
-
const aliasFilter = aliasKeys.length ? new RegExp(`^(?:${aliasKeys.map((k) => k.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})$`) : /(?!)/;
|
|
376
|
-
return {
|
|
377
|
-
name: "one:alias",
|
|
378
|
-
enforce: "pre",
|
|
379
|
-
resolveId: {
|
|
380
|
-
filter: { id: aliasFilter },
|
|
381
|
-
handler(source) {
|
|
382
|
-
const env = this.environment?.name;
|
|
383
|
-
const specific = env ? resolved[env] : null;
|
|
384
|
-
if (specific && source in specific) {
|
|
385
|
-
const id = specific[source];
|
|
386
|
-
return {
|
|
387
|
-
id,
|
|
388
|
-
external: false,
|
|
389
|
-
packageJsonPath: (0, import_vxrn.nearestPackageJson)(id)
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
const isWeb = !env || env === "client" || env === "ssr";
|
|
393
|
-
const general = isWeb ? resolved.web : resolved.native;
|
|
394
|
-
if (general && source in general) {
|
|
395
|
-
const id = general[source];
|
|
396
|
-
return {
|
|
397
|
-
id,
|
|
398
|
-
external: false,
|
|
399
|
-
packageJsonPath: (0, import_vxrn.nearestPackageJson)(id)
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
};
|
|
405
|
-
})()] : [],
|
|
405
|
+
...options.alias ? [createAliasPlugin(options.alias)] : [],
|
|
406
406
|
{
|
|
407
407
|
name: "one:redirect-rn-deep-imports",
|
|
408
408
|
enforce: "pre",
|
|
@@ -555,7 +555,8 @@ function one(options = {}) {
|
|
|
555
555
|
const nativeWebDevAndProdPlugsin = [(0, import_clientTreeShakePlugin.clientTreeShakePlugin)({ routerRoot })];
|
|
556
556
|
if (!nativeDisabled) {
|
|
557
557
|
const viteBundlerOptions = nativeOptions?.bundler === "metro" ? void 0 : nativeOptions?.bundlerOptions;
|
|
558
|
-
globalThis.__vxrnAddNativePlugins = [
|
|
558
|
+
globalThis.__vxrnAddNativePlugins = (platform) => [
|
|
559
|
+
...options.alias ? [createAliasPlugin(options.alias, platform)] : [],
|
|
559
560
|
(0, import_clientTreeShakePlugin.clientTreeShakePlugin)({
|
|
560
561
|
runtime: "rolldown",
|
|
561
562
|
routerRoot
|
|
@@ -247,6 +247,81 @@ function one() {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
+
var createAliasPlugin = function(alias, nativePlatform) {
|
|
251
|
+
var resolveMap = function(map) {
|
|
252
|
+
if (!map) return null;
|
|
253
|
+
var out = {};
|
|
254
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
255
|
+
try {
|
|
256
|
+
for (var _iterator = Object.entries(map)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
257
|
+
var [key, value] = _step.value;
|
|
258
|
+
try {
|
|
259
|
+
out[key] = import_path.default.isAbsolute(value) ? value : (0, import_resolve.resolvePath)(value);
|
|
260
|
+
} catch (unused) {
|
|
261
|
+
out[key] = value;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
} catch (err) {
|
|
265
|
+
_didIteratorError = true;
|
|
266
|
+
_iteratorError = err;
|
|
267
|
+
} finally {
|
|
268
|
+
try {
|
|
269
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
270
|
+
_iterator.return();
|
|
271
|
+
}
|
|
272
|
+
} finally {
|
|
273
|
+
if (_didIteratorError) {
|
|
274
|
+
throw _iteratorError;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return out;
|
|
279
|
+
};
|
|
280
|
+
var resolved = {
|
|
281
|
+
web: resolveMap(alias.web),
|
|
282
|
+
native: resolveMap(alias.native),
|
|
283
|
+
client: resolveMap(alias.client),
|
|
284
|
+
ssr: resolveMap(alias.ssr),
|
|
285
|
+
ios: resolveMap(alias.ios),
|
|
286
|
+
android: resolveMap(alias.android)
|
|
287
|
+
};
|
|
288
|
+
var aliasKeys = [...new Set(Object.values(resolved).flatMap(function(m) {
|
|
289
|
+
return m ? Object.keys(m) : [];
|
|
290
|
+
}))];
|
|
291
|
+
var aliasFilter = aliasKeys.length ? new RegExp(`^(?:${aliasKeys.map(function(k) {
|
|
292
|
+
return k.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
293
|
+
}).join("|")})$`) : /(?!)/;
|
|
294
|
+
return {
|
|
295
|
+
name: "one:alias",
|
|
296
|
+
enforce: "pre",
|
|
297
|
+
resolveId: {
|
|
298
|
+
filter: { id: aliasFilter },
|
|
299
|
+
handler(source) {
|
|
300
|
+
var _this_environment;
|
|
301
|
+
var env = nativePlatform !== null && nativePlatform !== void 0 ? nativePlatform : (_this_environment = this.environment) === null || _this_environment === void 0 ? void 0 : _this_environment.name;
|
|
302
|
+
var specific = env ? resolved[env] : null;
|
|
303
|
+
if (specific && source in specific) {
|
|
304
|
+
var id = specific[source];
|
|
305
|
+
return {
|
|
306
|
+
id,
|
|
307
|
+
external: false,
|
|
308
|
+
packageJsonPath: (0, import_vxrn.nearestPackageJson)(id)
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
var isWeb = !env || env === "client" || env === "ssr";
|
|
312
|
+
var general = isWeb ? resolved.web : resolved.native;
|
|
313
|
+
if (general && source in general) {
|
|
314
|
+
var id1 = general[source];
|
|
315
|
+
return {
|
|
316
|
+
id: id1,
|
|
317
|
+
external: false,
|
|
318
|
+
packageJsonPath: (0, import_vxrn.nearestPackageJson)(id1)
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
};
|
|
250
325
|
var devAndProdPlugins = [
|
|
251
326
|
{
|
|
252
327
|
name: "one:config",
|
|
@@ -270,8 +345,8 @@ function one() {
|
|
|
270
345
|
{
|
|
271
346
|
name: "one-define-client-env",
|
|
272
347
|
async config(userConfig, env) {
|
|
273
|
-
var _ref2,
|
|
274
|
-
var clientEnvDefine = options.skipEnv ? {} : (await (0, import_vxrn.loadEnv)((_ref2 = (
|
|
348
|
+
var _ref2, _ref1, _ref22;
|
|
349
|
+
var clientEnvDefine = options.skipEnv ? {} : (await (0, import_vxrn.loadEnv)((_ref2 = (_ref1 = (_ref22 = vxrnOptions === null || vxrnOptions === void 0 ? void 0 : vxrnOptions.mode) !== null && _ref22 !== void 0 ? _ref22 : userConfig === null || userConfig === void 0 ? void 0 : userConfig.mode) !== null && _ref1 !== void 0 ? _ref1 : env === null || env === void 0 ? void 0 : env.mode) !== null && _ref2 !== void 0 ? _ref2 : "development", process.cwd(), userConfig === null || userConfig === void 0 ? void 0 : userConfig.envPrefix)).clientEnvDefine;
|
|
275
350
|
return { define: {
|
|
276
351
|
...clientEnvDefine,
|
|
277
352
|
...process.env.ONE_DEBUG_ROUTER && { "process.env.ONE_DEBUG_ROUTER": JSON.stringify(process.env.ONE_DEBUG_ROUTER) }
|
|
@@ -452,82 +527,7 @@ function one() {
|
|
|
452
527
|
}
|
|
453
528
|
};
|
|
454
529
|
})()],
|
|
455
|
-
...options.alias ? [(
|
|
456
|
-
var resolveMap = function(map) {
|
|
457
|
-
if (!map) return null;
|
|
458
|
-
var out = {};
|
|
459
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
460
|
-
try {
|
|
461
|
-
for (var _iterator = Object.entries(map)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
462
|
-
var [key, value] = _step.value;
|
|
463
|
-
try {
|
|
464
|
-
out[key] = import_path.default.isAbsolute(value) ? value : (0, import_resolve.resolvePath)(value);
|
|
465
|
-
} catch (unused) {
|
|
466
|
-
out[key] = value;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
} catch (err) {
|
|
470
|
-
_didIteratorError = true;
|
|
471
|
-
_iteratorError = err;
|
|
472
|
-
} finally {
|
|
473
|
-
try {
|
|
474
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
475
|
-
_iterator.return();
|
|
476
|
-
}
|
|
477
|
-
} finally {
|
|
478
|
-
if (_didIteratorError) {
|
|
479
|
-
throw _iteratorError;
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
return out;
|
|
484
|
-
};
|
|
485
|
-
var a = options.alias;
|
|
486
|
-
var resolved = {
|
|
487
|
-
web: resolveMap(a.web),
|
|
488
|
-
native: resolveMap(a.native),
|
|
489
|
-
client: resolveMap(a.client),
|
|
490
|
-
ssr: resolveMap(a.ssr),
|
|
491
|
-
ios: resolveMap(a.ios),
|
|
492
|
-
android: resolveMap(a.android)
|
|
493
|
-
};
|
|
494
|
-
var aliasKeys = [...new Set(Object.values(resolved).flatMap(function(m) {
|
|
495
|
-
return m ? Object.keys(m) : [];
|
|
496
|
-
}))];
|
|
497
|
-
var aliasFilter = aliasKeys.length ? new RegExp(`^(?:${aliasKeys.map(function(k) {
|
|
498
|
-
return k.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
499
|
-
}).join("|")})$`) : /(?!)/;
|
|
500
|
-
return {
|
|
501
|
-
name: "one:alias",
|
|
502
|
-
enforce: "pre",
|
|
503
|
-
resolveId: {
|
|
504
|
-
filter: { id: aliasFilter },
|
|
505
|
-
handler(source) {
|
|
506
|
-
var _this_environment;
|
|
507
|
-
var env = (_this_environment = this.environment) === null || _this_environment === void 0 ? void 0 : _this_environment.name;
|
|
508
|
-
var specific = env ? resolved[env] : null;
|
|
509
|
-
if (specific && source in specific) {
|
|
510
|
-
var id = specific[source];
|
|
511
|
-
return {
|
|
512
|
-
id,
|
|
513
|
-
external: false,
|
|
514
|
-
packageJsonPath: (0, import_vxrn.nearestPackageJson)(id)
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
var isWeb = !env || env === "client" || env === "ssr";
|
|
518
|
-
var general = isWeb ? resolved.web : resolved.native;
|
|
519
|
-
if (general && source in general) {
|
|
520
|
-
var id1 = general[source];
|
|
521
|
-
return {
|
|
522
|
-
id: id1,
|
|
523
|
-
external: false,
|
|
524
|
-
packageJsonPath: (0, import_vxrn.nearestPackageJson)(id1)
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
};
|
|
530
|
-
})()] : [],
|
|
530
|
+
...options.alias ? [createAliasPlugin(options.alias)] : [],
|
|
531
531
|
{
|
|
532
532
|
name: "one:redirect-rn-deep-imports",
|
|
533
533
|
enforce: "pre",
|
|
@@ -682,16 +682,19 @@ function one() {
|
|
|
682
682
|
];
|
|
683
683
|
var nativeWebDevAndProdPlugsin = [(0, import_clientTreeShakePlugin.clientTreeShakePlugin)({ routerRoot })];
|
|
684
684
|
if (!nativeDisabled) {
|
|
685
|
-
var _ref1;
|
|
686
685
|
var viteBundlerOptions = (nativeOptions === null || nativeOptions === void 0 ? void 0 : nativeOptions.bundler) === "metro" ? void 0 : nativeOptions === null || nativeOptions === void 0 ? void 0 : nativeOptions.bundlerOptions;
|
|
687
|
-
globalThis.__vxrnAddNativePlugins =
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
686
|
+
globalThis.__vxrnAddNativePlugins = function(platform) {
|
|
687
|
+
var _ref2;
|
|
688
|
+
return [
|
|
689
|
+
...options.alias ? [createAliasPlugin(options.alias, platform)] : [],
|
|
690
|
+
(0, import_clientTreeShakePlugin.clientTreeShakePlugin)({
|
|
691
|
+
runtime: "rolldown",
|
|
692
|
+
routerRoot
|
|
693
|
+
}),
|
|
694
|
+
...(_ref2 = viteBundlerOptions === null || viteBundlerOptions === void 0 ? void 0 : viteBundlerOptions.plugins) !== null && _ref2 !== void 0 ? _ref2 : [],
|
|
695
|
+
(0, import_swiftPackagePlugin.swiftPackagePlugin)()
|
|
696
|
+
];
|
|
697
|
+
};
|
|
695
698
|
globalThis.__vxrnNativeUserDefine = {
|
|
696
699
|
...viteBundlerOptions === null || viteBundlerOptions === void 0 ? void 0 : viteBundlerOptions.define,
|
|
697
700
|
...nativeAppName && {
|