one 2.13.9 → 2.14.0
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/android/src/main/java/dev/onejs/one/OneKotlinHostView.kt +53 -14
- package/android/src/main/java/dev/onejs/one/OneNativeSourceKeyedState.kt +23 -0
- package/android/src/main/java/dev/onejs/one/OneNativeSourceViewDispatch.kt +16 -3
- package/dist/cjs/metro-config/getViteMetroPluginOptions.cjs +4 -10
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.cjs +4 -10
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js +4 -10
- package/dist/cjs/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
- package/dist/cjs/platform/native-source/view.native.cjs +4 -4
- package/dist/cjs/platform/native-source/view.native.js +4 -4
- package/dist/cjs/platform/native-source/view.native.js.map +1 -1
- package/dist/cjs/platform/native-source/wire.native.cjs +152 -49
- package/dist/cjs/platform/native-source/wire.native.js +152 -49
- package/dist/cjs/platform/native-source/wire.native.js.map +1 -1
- package/dist/cjs/platform/native-source/wireProps.native.cjs +138 -0
- package/dist/cjs/platform/native-source/wireProps.native.js +140 -0
- package/dist/cjs/platform/native-source/wireProps.native.js.map +1 -0
- package/dist/cjs/platform/swift/index.native.cjs +12 -8
- package/dist/cjs/platform/swift/index.native.js +12 -8
- package/dist/cjs/platform/swift/index.native.js.map +1 -1
- package/dist/cjs/router/useScreens.cjs +1 -1
- package/dist/cjs/router/useScreens.native.cjs +2 -1
- package/dist/cjs/router/useScreens.native.js +2 -1
- package/dist/cjs/router/useScreens.native.js.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.mjs +4 -10
- package/dist/esm/metro-config/getViteMetroPluginOptions.mjs.map +1 -1
- package/dist/esm/metro-config/getViteMetroPluginOptions.native.js +4 -10
- package/dist/esm/metro-config/getViteMetroPluginOptions.native.js.map +1 -1
- package/dist/esm/platform/native-source/view.native.js +5 -5
- package/dist/esm/platform/native-source/view.native.js.map +1 -1
- package/dist/esm/platform/native-source/wire.native.js +149 -49
- package/dist/esm/platform/native-source/wire.native.js.map +1 -1
- package/dist/esm/platform/native-source/wireProps.native.js +113 -0
- package/dist/esm/platform/native-source/wireProps.native.js.map +1 -0
- package/dist/esm/platform/swift/index.native.js +13 -9
- package/dist/esm/platform/swift/index.native.js.map +1 -1
- package/dist/esm/router/useScreens.mjs +1 -1
- package/dist/esm/router/useScreens.mjs.map +1 -1
- package/dist/esm/router/useScreens.native.js +2 -1
- package/dist/esm/router/useScreens.native.js.map +1 -1
- package/ios/Generated/OneNativeTabViewView.swift +2 -1
- package/ios/OneNativeComposition.swift +1 -0
- package/ios/OneNativeHostingController.swift +113 -0
- package/ios/OneSwiftHostComponentView.mm +28 -4
- package/ios/OneSwiftHostView.swift +63 -9
- package/ios/OneSwiftPackage.swift +6 -1
- package/package.json +13 -13
- package/src/metro-config/getViteMetroPluginOptions.integration.test.ts +33 -3
- package/src/metro-config/getViteMetroPluginOptions.ts +5 -11
- package/src/native/packedClosure.test.ts +59 -22
- package/src/platform/native-source/view.native.tsx +4 -5
- package/src/platform/native-source/wire.native.ts +108 -26
- package/src/platform/native-source/wireProps.native.test.ts +57 -0
- package/src/platform/native-source/wireProps.native.ts +124 -0
- package/src/platform/swift/index.native.tsx +9 -7
- package/src/platform/swift/types.ts +4 -2
- package/src/router/useScreens.tsx +1 -1
- package/types/metro-config/getViteMetroPluginOptions.d.ts +1 -1
- package/types/metro-config/getViteMetroPluginOptions.d.ts.map +1 -1
- package/types/platform/native-source/view.native.d.ts.map +1 -1
- package/types/platform/native-source/wire.native.d.ts +3 -0
- package/types/platform/native-source/wire.native.d.ts.map +1 -1
- package/types/platform/native-source/wireProps.native.d.ts +15 -0
- package/types/platform/native-source/wireProps.native.d.ts.map +1 -0
- package/types/platform/swift/index.native.d.ts.map +1 -1
- package/types/platform/swift/types.d.ts +4 -1
- package/types/platform/swift/types.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScreens.native.js","names":[],"sources":["cjs/router/useScreens.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useScreens_exports = {};\n__export(useScreens_exports, {\n\tGroup: () => Group,\n\tScreen: () => Screen,\n\tcreateGetIdForRoute: () => createGetIdForRoute,\n\tgetQualifiedRouteComponent: () => getQualifiedRouteComponent,\n\tuseSortedScreens: () => useSortedScreens\n});\nmodule.exports = __toCommonJS(useScreens_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = require(\"react\");\nvar import_core = require(\"@react-navigation/core\");\nvar import_react2 = __toESM(require(\"react\"), 1);\nrequire(\"../safe-area-context\");\nrequire(\"../server/ServerContextScript\");\nrequire(\"../skewProtection\");\nvar import_useMatches = require(\"../useMatches\");\nrequire(\"../utils/dynamicImport\");\nvar import_getPageExport = require(\"../utils/getPageExport\");\nvar import_EmptyRoute = require(\"../views/EmptyRoute\");\nvar import_Navigator = require(\"../views/Navigator\");\nvar import_RouteErrorView = require(\"../views/RouteErrorView\");\nvar import_Try = require(\"../views/Try\");\nvar import_ScrollBehavior = require(\"../views/ScrollBehavior\");\nrequire(\"../vite/DevHead\");\nvar import_one_server_only = require(\"../vite/one-server-only\");\nvar import_getReactNavigationConfig = require(\"../getReactNavigationConfig\");\nvar import_filterRootHTML = require(\"./filterRootHTML\");\nvar import_Route = require(\"./Route\");\nvar import_routeHmr = require(\"./routeHmr\");\nvar import_SpaShellContext = require(\"./SpaShellContext\");\nvar import_sortRoutes = require(\"./sortRoutes\");\nfunction _assert_this_initialized(self) {\n\tif (self === void 0) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\treturn self;\n}\nfunction _call_super(_this, derived, args) {\n\tderived = _get_prototype_of(derived);\n\treturn _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));\n}\nfunction _class_call_check(instance, Constructor) {\n\tif (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(target, props) {\n\tfor (var i = 0; i < props.length; i++) {\n\t\tvar descriptor = props[i];\n\t\tdescriptor.enumerable = descriptor.enumerable || false;\n\t\tdescriptor.configurable = true;\n\t\tif (\"value\" in descriptor) descriptor.writable = true;\n\t\tObject.defineProperty(target, descriptor.key, descriptor);\n\t}\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n\tif (protoProps) _defineProperties(Constructor.prototype, protoProps);\n\tif (staticProps) _defineProperties(Constructor, staticProps);\n\treturn Constructor;\n}\nfunction _get_prototype_of(o) {\n\t_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {\n\t\treturn o2.__proto__ || Object.getPrototypeOf(o2);\n\t};\n\treturn _get_prototype_of(o);\n}\nfunction _inherits(subClass, superClass) {\n\tif (typeof superClass !== \"function\" && superClass !== null) throw new TypeError(\"Super expression must either be null or a function\");\n\tsubClass.prototype = Object.create(superClass && superClass.prototype, { constructor: {\n\t\tvalue: subClass,\n\t\twritable: true,\n\t\tconfigurable: true\n\t} });\n\tif (superClass) _set_prototype_of(subClass, superClass);\n}\nfunction _is_native_reflect_construct() {\n\ttry {\n\t\tvar result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));\n\t} catch (_) {}\n\treturn (_is_native_reflect_construct = function() {\n\t\treturn !!result;\n\t})();\n}\nfunction _possible_constructor_return(self, call) {\n\tif (call && (_type_of(call) === \"object\" || typeof call === \"function\")) return call;\n\treturn _assert_this_initialized(self);\n}\nfunction _set_prototype_of(o, p) {\n\t_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {\n\t\to2.__proto__ = p2;\n\t\treturn o2;\n\t};\n\treturn _set_prototype_of(o, p);\n}\nfunction _type_of(obj) {\n\t\"@swc/helpers - typeof\";\n\treturn obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction hasMetaCharset(children) {\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!children) return false;\n\t\tvar checkElement = function checkElement2(child) {\n\t\t\tif (!/* @__PURE__ */ import_react2.default.isValidElement(child)) return false;\n\t\t\tif (child.type === \"meta\") {\n\t\t\t\tvar props = child.props;\n\t\t\t\tif (\"charSet\" in props || \"charset\" in props) return true;\n\t\t\t}\n\t\t\tvar childProps = child.props;\n\t\t\tif (childProps.children) return hasMetaCharset(childProps.children);\n\t\t\treturn false;\n\t\t};\n\t\tif (Array.isArray(children)) return children.some(checkElement);\n\t\treturn checkElement(children);\n\t}\n\treturn true;\n}\nvar { Screen, Group } = (0, import_core.createNavigatorFactory)({})();\n// require a real DOM query API, not just a (possibly polyfilled on\n// Expo/Hermes) `document` global — see getSafeWindowPathname in router.ts\ntypeof document !== \"undefined\" && typeof document.querySelectorAll === \"function\" && (function() {\n\tvar elements = [];\n\tdocument.querySelectorAll(\"style[id^=\\\"__one_css_\\\"], link[rel=\\\"stylesheet\\\"][data-one-css]\").forEach(function(el, i) {\n\t\tif (el.tagName === \"STYLE\") elements.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"style\", {\n\t\t\tid: el.id,\n\t\t\tdangerouslySetInnerHTML: { __html: el.innerHTML }\n\t\t}, `inline-css-${i}`));\n\t\telse {\n\t\t\tvar href = el.getAttribute(\"href\");\n\t\t\telements.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"link\", {\n\t\t\t\trel: \"stylesheet\",\n\t\t\t\thref,\n\t\t\t\t\"data-one-css\": \"\"\n\t\t\t}, href));\n\t\t}\n\t});\n\treturn elements;\n})();\nfunction RootLayoutRenderer(param) {\n\tvar { LayoutComponent, layoutProps, forwardedRef } = param;\n\tif (process.env.NODE_ENV === \"development\" && false);\n\tvar out = LayoutComponent(layoutProps, forwardedRef);\n\tvar { children, bodyProps, head, htmlProps } = (0, import_filterRootHTML.filterRootHTML)(out);\n\tvar { children: headChildren, ...headProps } = (head === null || head === void 0 ? void 0 : head.props) || {};\n\t(0, import_one_server_only.useServerContext)();\n\treturn children;\n}\nfunction getSortedChildren(children, order, initialRouteName, options) {\n\tvar _ref;\n\tif (!(order === null || order === void 0 ? void 0 : order.length)) return children.sort((0, import_sortRoutes.sortRoutesWithInitial)(initialRouteName)).map(function(route) {\n\t\treturn {\n\t\t\troute,\n\t\t\tprops: {}\n\t\t};\n\t});\n\tvar entries = [...children];\n\tvar ordered = order.map(function(param) {\n\t\tvar { name, redirect, initialParams, listeners, options: _$options, getId } = param;\n\t\tif (!entries.length) {\n\t\t\tconsole.warn(`[Layout children]: Too many screens defined. Route \"${name}\" is extraneous.`);\n\t\t\treturn null;\n\t\t}\n\t\tvar matchIndex = entries.findIndex(function(child) {\n\t\t\treturn child.route === name;\n\t\t});\n\t\tif (matchIndex === -1) {\n\t\t\tconsole.warn(`[Layout children]: No route named \"${name}\" exists in nested children:`, children.map(function(param2) {\n\t\t\t\tvar { route } = param2;\n\t\t\t\treturn route;\n\t\t\t}));\n\t\t\treturn null;\n\t\t}\n\t\tvar match = entries[matchIndex];\n\t\tentries.splice(matchIndex, 1);\n\t\tif (redirect) {\n\t\t\tif (typeof redirect === \"string\") throw new Error(`Redirecting to a specific route is not supported yet.`);\n\t\t\treturn null;\n\t\t}\n\t\treturn {\n\t\t\troute: match,\n\t\t\tprops: {\n\t\t\t\tinitialParams,\n\t\t\t\tlisteners,\n\t\t\t\toptions: _$options,\n\t\t\t\tgetId\n\t\t\t}\n\t\t};\n\t}).filter(Boolean);\n\tvar remaining = (_ref = options === null || options === void 0 ? void 0 : options.remaining) !== null && _ref !== void 0 ? _ref : \"all\";\n\tif (remaining !== \"none\") ordered.push(...entries.filter(function(route) {\n\t\treturn remaining === \"all\" || !route.generated;\n\t}).sort((0, import_sortRoutes.sortRoutesWithInitial)(initialRouteName)).map(function(route) {\n\t\treturn {\n\t\t\troute,\n\t\t\tprops: {}\n\t\t};\n\t}));\n\treturn ordered;\n}\nfunction useSortedScreens(order, options) {\n\tvar node = (0, import_Route.useRouteNode)();\n\treturn import_react2.default.useMemo(function() {\n\t\tvar _node_children;\n\t\treturn ((node === null || node === void 0 ? void 0 : (_node_children = node.children) === null || _node_children === void 0 ? void 0 : _node_children.length) ? getSortedChildren(node.children, order, node.initialRouteName, options) : []).filter(function(value) {\n\t\t\tvar _options_protectedScreens, _options_protectedScreens1;\n\t\t\tvar routeName = value.route.route;\n\t\t\tvar normalized = routeName.replace(/\\/index$/, \"\");\n\t\t\treturn !((options === null || options === void 0 ? void 0 : (_options_protectedScreens = options.protectedScreens) === null || _options_protectedScreens === void 0 ? void 0 : _options_protectedScreens.has(routeName)) || (options === null || options === void 0 ? void 0 : (_options_protectedScreens1 = options.protectedScreens) === null || _options_protectedScreens1 === void 0 ? void 0 : _options_protectedScreens1.has(normalized)));\n\t\t}).map(function(value) {\n\t\t\treturn routeToScreen(value.route, value.props);\n\t\t});\n\t}, [\n\t\tnode === null || node === void 0 ? void 0 : node.children,\n\t\tnode === null || node === void 0 ? void 0 : node.initialRouteName,\n\t\torder,\n\t\toptions === null || options === void 0 ? void 0 : options.protectedScreens\n\t]);\n}\nfunction fromImport(param) {\n\tvar { ErrorBoundary, SuspenseFallback, ...component } = param;\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tvar exported = (0, import_getPageExport.getPageExport)(component);\n\t\tif (exported && typeof exported === \"object\" && Object.keys(exported).length === 0) return {\n\t\t\tdefault: import_EmptyRoute.EmptyRoute,\n\t\t\tErrorBoundary,\n\t\t\tSuspenseFallback\n\t\t};\n\t}\n\treturn {\n\t\tdefault: (0, import_getPageExport.getPageExport)(component),\n\t\tErrorBoundary,\n\t\tSuspenseFallback\n\t};\n}\nfunction RouteSuspenseFallback(param) {\n\tvar { component: Component, route } = param;\n\tvar params = (0, import_react2.useContext)(import_Route.RouteParamsContext);\n\treturn Component ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {\n\t\troute,\n\t\tparams: params !== null && params !== void 0 ? params : {}\n\t}) : null;\n}\nvar qualifiedStore = /* @__PURE__ */ new WeakMap();\nfunction getRouteMatchesForProps() {\n\tvar _ref;\n\tvar _getServerContext;\n\tvar serverMatches = (_ref = (_getServerContext = (0, import_one_server_only.getServerContext)()) === null || _getServerContext === void 0 ? void 0 : _getServerContext.matches) !== null && _ref !== void 0 ? _ref : [];\n\tif (process.env.VITE_ENVIRONMENT === \"ssr\") return serverMatches;\n\tvar clientMatches = (0, import_useMatches.getClientMatchesSnapshot)();\n\treturn clientMatches.length ? clientMatches : serverMatches;\n}\nfunction getQualifiedRouteComponent(value) {\n\tif (value && qualifiedStore.has(value)) return qualifiedStore.get(value);\n\tvar ScreenComponent = /* @__PURE__ */ import_react2.default.forwardRef(function(props, ref) {\n\t\tvar _value_children;\n\t\tif (process.env.NODE_ENV === \"development\" && false);\n\t\tif (process.env.NODE_ENV === \"development\" && true) import_react2.default.useSyncExternalStore(import_routeHmr.subscribeRouteHmr, import_routeHmr.getRouteHmrEpoch, import_routeHmr.getRouteHmrEpoch);\n\t\tvar isSpaShell = (0, import_react2.useContext)(import_SpaShellContext.SpaShellContext);\n\t\tvar InheritedSuspenseFallback = (0, import_react2.useContext)(import_Route.SuspenseFallbackContext);\n\t\tvar matches = getRouteMatchesForProps();\n\t\tif (isSpaShell && props.segment !== \"\") {\n\t\t\tvar _value_children1;\n\t\t\tif (!(((_value_children1 = value.children) === null || _value_children1 === void 0 ? void 0 : _value_children1.length) && (value.layoutRenderMode === \"ssg\" || value.layoutRenderMode === \"ssr\"))) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", { \"data-one-spa-content\": \"\" });\n\t\t}\n\t\tvar res = fromImport(value.loadRoute());\n\t\tvar Component = res.default || import_EmptyRoute.EmptyRoute;\n\t\tvar CatchBoundary = res.ErrorBoundary;\n\t\tvar LayoutSuspenseFallback = value.type === \"layout\" ? res.SuspenseFallback : void 0;\n\t\tvar match = matches.find(function(match2) {\n\t\t\treturn match2.routeId === value.contextKey;\n\t\t}) || (!((_value_children = value.children) === null || _value_children === void 0 ? void 0 : _value_children.length) ? matches[matches.length - 1] : void 0);\n\t\tvar loaderDataProps = match && \"loaderData\" in match ? { loaderData: match.loaderData } : {};\n\t\tif (process.env.NODE_ENV === \"development\" && process.env.DEBUG === \"one\") {\n\t\t\tconsole.groupCollapsed(`Render ${props.key} ${props.segment}`);\n\t\t\tconsole.info(`value`, value);\n\t\t\tconsole.info(`Component`, Component);\n\t\t\tconsole.groupEnd();\n\t\t}\n\t\tvar slotProps = {};\n\t\tif (value.slots && value.slots.size > 0) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = value.slots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar [slotName] = _step.value;\n\t\t\t\t\tslotProps[slotName] = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Navigator.NamedSlot, {\n\t\t\t\t\t\tname: slotName,\n\t\t\t\t\t\tlayoutContextKey: value.contextKey\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar rendered;\n\t\tif (props.segment === \"\") rendered = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RootLayoutRenderer, {\n\t\t\tLayoutComponent: Component,\n\t\t\tlayoutProps: {\n\t\t\t\t...props,\n\t\t\t\t...slotProps,\n\t\t\t\t...loaderDataProps\n\t\t\t},\n\t\t\tforwardedRef: ref\n\t\t});\n\t\telse {\n\t\t\tvar page = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {\n\t\t\t\t...props,\n\t\t\t\t...slotProps,\n\t\t\t\t...loaderDataProps,\n\t\t\t\tref\n\t\t\t});\n\t\t\trendered = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RouteErrorBoundary, {\n\t\t\t\trouteName: value.route,\n\t\t\t\tchildren: CatchBoundary ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Try.Try, {\n\t\t\t\t\tcatch: CatchBoundary,\n\t\t\t\t\tchildren: page\n\t\t\t\t}) : page\n\t\t\t});\n\t\t}\n\t\tif (value.type !== \"layout\") return rendered;\n\t\tvar providedSuspenseFallback = LayoutSuspenseFallback !== null && LayoutSuspenseFallback !== void 0 ? LayoutSuspenseFallback : InheritedSuspenseFallback;\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Route.SuspenseFallbackContext.Provider, {\n\t\t\tvalue: providedSuspenseFallback,\n\t\t\tchildren: LayoutSuspenseFallback ? wrapSuspense(rendered, LayoutSuspenseFallback) : rendered\n\t\t});\n\t});\n\tvar wrapSuspense = function wrapSuspense2(children, SuspenseFallback) {\n\t\tvar fallback = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RouteSuspenseFallback, {\n\t\t\tcomponent: SuspenseFallback,\n\t\t\troute: value.contextKey\n\t\t});\n\t\tif (process.env.ONE_SUSPEND_ROUTES_NATIVE === \"0\" || globalThis.__ONE_DISABLE_SUSPENSE_ROUTES__ === true) return children;\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Suspense, {\n\t\t\tfallback,\n\t\t\tchildren\n\t\t});\n\t};\n\tvar QualifiedRoute = /* @__PURE__ */ import_react2.default.forwardRef(function(param, ref) {\n\t\tvar { route, navigation, ...props } = param;\n\t\tvar InheritedSuspenseFallback = (0, import_react2.useContext)(import_Route.SuspenseFallbackContext);\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Route.Route, {\n\t\t\troute,\n\t\t\tnode: value,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: wrapSuspense(/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScreenComponent, {\n\t\t\t\t...props,\n\t\t\t\tref,\n\t\t\t\tsegment: value.route\n\t\t\t}), process.env.VITE_ENVIRONMENT === \"client\" && value.type !== \"layout\" && navigation && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehaviorRouteCommit, {})] }), InheritedSuspenseFallback) })\n\t\t});\n\t});\n\tQualifiedRoute.displayName = `Route(${value.route})`;\n\tvar Memoized = /* @__PURE__ */ (0, import_react2.memo)(QualifiedRoute);\n\tqualifiedStore.set(value, Memoized);\n\treturn Memoized;\n}\nfunction createGetIdForRoute(route) {\n\tvar include = /* @__PURE__ */ new Map();\n\tif (route.dynamic) {\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = route.dynamic[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar segment = _step.value;\n\t\t\t\tinclude.set(segment.name, segment);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t}\n\treturn function() {\n\t\tvar { params = {} } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\tvar _segments_join;\n\t\tvar segments = [];\n\t\tvar _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator2 = include.values()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\tvar dynamic = _step2.value;\n\t\t\t\tvar value = params === null || params === void 0 ? void 0 : params[dynamic.name];\n\t\t\t\tif (Array.isArray(value) && value.length > 0) segments.push(value.join(\"/\"));\n\t\t\t\telse if (value && !Array.isArray(value)) segments.push(value);\n\t\t\t\telse if (dynamic.deep) segments.push(`[...${dynamic.name}]`);\n\t\t\t\telse segments.push(`[${dynamic.name}]`);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError2 = true;\n\t\t\t_iteratorError2 = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError2) throw _iteratorError2;\n\t\t\t}\n\t\t}\n\t\treturn (_segments_join = segments.join(\"/\")) !== null && _segments_join !== void 0 ? _segments_join : route.contextKey;\n\t};\n}\nfunction routeToScreen(route) {\n\tvar { options, ...props } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n\tvar navigationRouteName = (0, import_getReactNavigationConfig.getReactNavigationRouteName)(route);\n\treturn /* @__PURE__ */ (0, import_react.createElement)(Screen, {\n\t\tgetId: createGetIdForRoute(route),\n\t\t...props,\n\t\tname: navigationRouteName,\n\t\tkey: navigationRouteName,\n\t\toptions: function options1(args) {\n\t\t\tvar _route_loadRoute;\n\t\t\tvar staticOptions = route.generated ? (_route_loadRoute = route.loadRoute()) === null || _route_loadRoute === void 0 ? void 0 : _route_loadRoute.getNavOptions : null;\n\t\t\tvar staticResult = typeof staticOptions === \"function\" ? staticOptions(args) : staticOptions;\n\t\t\tvar dynamicResult = typeof options === \"function\" ? options === null || options === void 0 ? void 0 : options(args) : options;\n\t\t\tvar output = {\n\t\t\t\t...staticResult,\n\t\t\t\t...dynamicResult\n\t\t\t};\n\t\t\tif (route.generated) {\n\t\t\t\toutput.tabBarButton = function() {\n\t\t\t\t\treturn null;\n\t\t\t\t};\n\t\t\t\toutput.drawerItemStyle = {\n\t\t\t\t\theight: 0,\n\t\t\t\t\tdisplay: \"none\"\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn output;\n\t\t},\n\t\tgetComponent: function getComponent() {\n\t\t\treturn getQualifiedRouteComponent(route);\n\t\t}\n\t});\n}\nvar ROUTE_ERROR_BOUNDARY_INITIAL_STATE = {\n\thasError: false,\n\terror: null,\n\terrorInfo: null\n};\nvar RouteErrorBoundary = /* @__PURE__ */ (function(_React_Component) {\n\t\"use strict\";\n\t_inherits(RouteErrorBoundary2, _React_Component);\n\tfunction RouteErrorBoundary2(props) {\n\t\t_class_call_check(this, RouteErrorBoundary2);\n\t\tvar _this = _call_super(this, RouteErrorBoundary2, [props]);\n\t\t_this.state = ROUTE_ERROR_BOUNDARY_INITIAL_STATE;\n\t\treturn _this;\n\t}\n\t_create_class(RouteErrorBoundary2, [\n\t\t{\n\t\t\tkey: \"componentDidCatch\",\n\t\t\tvalue: function componentDidCatch(error, errorInfo) {\n\t\t\t\tconsole.error(`Error occurred while running route \"${this.props.routeName}\": ${error instanceof Error ? error.message : error}\n\n${error.stack}\n\nComponent Stack:\n${errorInfo.componentStack}`);\n\t\t\t\tthis.setState({ errorInfo });\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tkey: \"clearError\",\n\t\t\tvalue: function clearError() {\n\t\t\t\tthis.setState(ROUTE_ERROR_BOUNDARY_INITIAL_STATE);\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tkey: \"render\",\n\t\t\tvalue: function render() {\n\t\t\t\tif (this.state.hasError) {\n\t\t\t\t\tvar { error, errorInfo } = this.state;\n\t\t\t\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RouteErrorView.RouteErrorView, {\n\t\t\t\t\t\trouteName: this.props.routeName,\n\t\t\t\t\t\terror,\n\t\t\t\t\t\terrorInfo,\n\t\t\t\t\t\tonRetry: this.clearError.bind(this)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn this.props.children;\n\t\t\t}\n\t\t}\n\t], [{\n\t\tkey: \"getDerivedStateFromError\",\n\t\tvalue: function getDerivedStateFromError(error) {\n\t\t\treturn {\n\t\t\t\thasError: true,\n\t\t\t\terror\n\t\t\t};\n\t\t}\n\t}]);\n\treturn RouteErrorBoundary2;\n})(import_react2.default.Component);\n//# sourceMappingURL=useScreens.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,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,qBAAqB,gBAAgB;CAC/C,SAAS,oBAAoB,OAAO;EACnC,kBAAkB,MAAM,mBAAmB;EAC3C,IAAI,QAAQ,YAAY,MAAM,qBAAqB,CAAC,KAAK,CAAC;EAC1D,MAAM,QAAQ;EACd,OAAO;CACR;CACA,cAAc,qBAAqB;EAClC;GACC,KAAK;GACL,OAAO,SAAS,kBAAkB,OAAO,WAAW;IACnD,QAAQ,MAAM,uCAAuC,KAAK,MAAM,UAAU,KAAK,iBAAiB,QAAQ,MAAM,UAAU,MAAM;;EAEhI,MAAM,MAAM;;;EAGZ,UAAU,gBAAgB;IACxB,KAAK,SAAS,EAAE,UAAU,CAAC;GAC5B;EACD;EACA;GACC,KAAK;GACL,OAAO,SAAS,aAAa;IAC5B,KAAK,SAAS,kCAAkC;GACjD;EACD;EACA;GACC,KAAK;GACL,OAAO,SAAS,SAAS;IACxB,IAAI,KAAK,MAAM,UAAU;KACxB,IAAI,EAAE,OAAO,cAAc,KAAK;KAChC,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,sBAAsB,gBAAgB;MACxF,WAAW,KAAK,MAAM;MACtB;MACA;MACA,SAAS,KAAK,WAAW,KAAK,IAAI;KACnC,CAAC;IACF;IACA,OAAO,KAAK,MAAM;GACnB;EACD;CACD,GAAG,CAAC;EACH,KAAK;EACL,OAAO,SAAS,yBAAyB,OAAO;GAC/C,OAAO;IACN,UAAU;IACV;GACD;EACD;CACD,CAAC,CAAC;CACF,OAAO;AACR,EAAC,CAAE,cAAc,QAAQ,SAAS"}
|
|
1
|
+
{"version":3,"file":"useScreens.native.js","names":[],"sources":["cjs/router/useScreens.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useScreens_exports = {};\n__export(useScreens_exports, {\n\tGroup: () => Group,\n\tScreen: () => Screen,\n\tcreateGetIdForRoute: () => createGetIdForRoute,\n\tgetQualifiedRouteComponent: () => getQualifiedRouteComponent,\n\tuseSortedScreens: () => useSortedScreens\n});\nmodule.exports = __toCommonJS(useScreens_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = require(\"react\");\nvar import_core = require(\"@react-navigation/core\");\nvar import_react2 = __toESM(require(\"react\"), 1);\nrequire(\"../safe-area-context\");\nrequire(\"../server/ServerContextScript\");\nrequire(\"../skewProtection\");\nvar import_useMatches = require(\"../useMatches\");\nrequire(\"../utils/dynamicImport\");\nvar import_getPageExport = require(\"../utils/getPageExport\");\nvar import_EmptyRoute = require(\"../views/EmptyRoute\");\nvar import_Navigator = require(\"../views/Navigator\");\nvar import_RouteErrorView = require(\"../views/RouteErrorView\");\nvar import_Try = require(\"../views/Try\");\nvar import_ScrollBehavior = require(\"../views/ScrollBehavior\");\nrequire(\"../vite/DevHead\");\nvar import_one_server_only = require(\"../vite/one-server-only\");\nvar import_getReactNavigationConfig = require(\"../getReactNavigationConfig\");\nvar import_filterRootHTML = require(\"./filterRootHTML\");\nvar import_Route = require(\"./Route\");\nvar import_routeHmr = require(\"./routeHmr\");\nvar import_SpaShellContext = require(\"./SpaShellContext\");\nvar import_sortRoutes = require(\"./sortRoutes\");\nfunction _assert_this_initialized(self) {\n\tif (self === void 0) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\treturn self;\n}\nfunction _call_super(_this, derived, args) {\n\tderived = _get_prototype_of(derived);\n\treturn _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));\n}\nfunction _class_call_check(instance, Constructor) {\n\tif (!(instance instanceof Constructor)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(target, props) {\n\tfor (var i = 0; i < props.length; i++) {\n\t\tvar descriptor = props[i];\n\t\tdescriptor.enumerable = descriptor.enumerable || false;\n\t\tdescriptor.configurable = true;\n\t\tif (\"value\" in descriptor) descriptor.writable = true;\n\t\tObject.defineProperty(target, descriptor.key, descriptor);\n\t}\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n\tif (protoProps) _defineProperties(Constructor.prototype, protoProps);\n\tif (staticProps) _defineProperties(Constructor, staticProps);\n\treturn Constructor;\n}\nfunction _get_prototype_of(o) {\n\t_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {\n\t\treturn o2.__proto__ || Object.getPrototypeOf(o2);\n\t};\n\treturn _get_prototype_of(o);\n}\nfunction _inherits(subClass, superClass) {\n\tif (typeof superClass !== \"function\" && superClass !== null) throw new TypeError(\"Super expression must either be null or a function\");\n\tsubClass.prototype = Object.create(superClass && superClass.prototype, { constructor: {\n\t\tvalue: subClass,\n\t\twritable: true,\n\t\tconfigurable: true\n\t} });\n\tif (superClass) _set_prototype_of(subClass, superClass);\n}\nfunction _is_native_reflect_construct() {\n\ttry {\n\t\tvar result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));\n\t} catch (_) {}\n\treturn (_is_native_reflect_construct = function() {\n\t\treturn !!result;\n\t})();\n}\nfunction _possible_constructor_return(self, call) {\n\tif (call && (_type_of(call) === \"object\" || typeof call === \"function\")) return call;\n\treturn _assert_this_initialized(self);\n}\nfunction _set_prototype_of(o, p) {\n\t_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {\n\t\to2.__proto__ = p2;\n\t\treturn o2;\n\t};\n\treturn _set_prototype_of(o, p);\n}\nfunction _type_of(obj) {\n\t\"@swc/helpers - typeof\";\n\treturn obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction hasMetaCharset(children) {\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!children) return false;\n\t\tvar checkElement = function checkElement2(child) {\n\t\t\tif (!/* @__PURE__ */ import_react2.default.isValidElement(child)) return false;\n\t\t\tif (child.type === \"meta\") {\n\t\t\t\tvar props = child.props;\n\t\t\t\tif (\"charSet\" in props || \"charset\" in props) return true;\n\t\t\t}\n\t\t\tvar childProps = child.props;\n\t\t\tif (childProps.children) return hasMetaCharset(childProps.children);\n\t\t\treturn false;\n\t\t};\n\t\tif (Array.isArray(children)) return children.some(checkElement);\n\t\treturn checkElement(children);\n\t}\n\treturn true;\n}\nvar { Screen, Group } = (0, import_core.createNavigatorFactory)({})();\n// require a real DOM query API, not just a (possibly polyfilled on\n// Expo/Hermes) `document` global — see getSafeWindowPathname in router.ts\ntypeof document !== \"undefined\" && typeof document.querySelectorAll === \"function\" && (function() {\n\tvar elements = [];\n\tdocument.querySelectorAll(\"style[id^=\\\"__one_css_\\\"], link[rel=\\\"stylesheet\\\"][data-one-css]\").forEach(function(el, i) {\n\t\tif (el.tagName === \"STYLE\") elements.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"style\", {\n\t\t\tid: el.id,\n\t\t\tdangerouslySetInnerHTML: { __html: el.innerHTML }\n\t\t}, `inline-css-${i}`));\n\t\telse {\n\t\t\tvar href = el.getAttribute(\"href\");\n\t\t\telements.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"link\", {\n\t\t\t\trel: \"stylesheet\",\n\t\t\t\thref,\n\t\t\t\t\"data-one-css\": \"\"\n\t\t\t}, href));\n\t\t}\n\t});\n\treturn elements;\n})();\nfunction RootLayoutRenderer(param) {\n\tvar { LayoutComponent, layoutProps, forwardedRef } = param;\n\tif (process.env.NODE_ENV === \"development\" && false);\n\tvar out = LayoutComponent(layoutProps, forwardedRef);\n\tvar { children, bodyProps, head, htmlProps } = (0, import_filterRootHTML.filterRootHTML)(out);\n\tvar { children: headChildren, ...headProps } = (head === null || head === void 0 ? void 0 : head.props) || {};\n\t(0, import_one_server_only.useServerContext)();\n\treturn children;\n}\nfunction getSortedChildren(children, order, initialRouteName, options) {\n\tvar _ref;\n\tif (!(order === null || order === void 0 ? void 0 : order.length)) return children.sort((0, import_sortRoutes.sortRoutesWithInitial)(initialRouteName)).map(function(route) {\n\t\treturn {\n\t\t\troute,\n\t\t\tprops: {}\n\t\t};\n\t});\n\tvar entries = [...children];\n\tvar ordered = order.map(function(param) {\n\t\tvar { name, redirect, initialParams, listeners, options: _$options, getId } = param;\n\t\tif (!entries.length) {\n\t\t\tconsole.warn(`[Layout children]: Too many screens defined. Route \"${name}\" is extraneous.`);\n\t\t\treturn null;\n\t\t}\n\t\tvar matchIndex = entries.findIndex(function(child) {\n\t\t\treturn child.route === name;\n\t\t});\n\t\tif (matchIndex === -1) {\n\t\t\tconsole.warn(`[Layout children]: No route named \"${name}\" exists in nested children:`, children.map(function(param2) {\n\t\t\t\tvar { route } = param2;\n\t\t\t\treturn route;\n\t\t\t}));\n\t\t\treturn null;\n\t\t}\n\t\tvar match = entries[matchIndex];\n\t\tentries.splice(matchIndex, 1);\n\t\tif (redirect) {\n\t\t\tif (typeof redirect === \"string\") throw new Error(`Redirecting to a specific route is not supported yet.`);\n\t\t\treturn null;\n\t\t}\n\t\treturn {\n\t\t\troute: match,\n\t\t\tprops: {\n\t\t\t\tinitialParams,\n\t\t\t\tlisteners,\n\t\t\t\toptions: _$options,\n\t\t\t\tgetId\n\t\t\t}\n\t\t};\n\t}).filter(Boolean);\n\tvar remaining = (_ref = options === null || options === void 0 ? void 0 : options.remaining) !== null && _ref !== void 0 ? _ref : \"all\";\n\tif (remaining !== \"none\") ordered.push(...entries.filter(function(route) {\n\t\treturn remaining === \"all\" || !route.generated;\n\t}).sort((0, import_sortRoutes.sortRoutesWithInitial)(initialRouteName)).map(function(route) {\n\t\treturn {\n\t\t\troute,\n\t\t\tprops: {}\n\t\t};\n\t}));\n\treturn ordered;\n}\nfunction useSortedScreens(order, options) {\n\tvar node = (0, import_Route.useRouteNode)();\n\treturn import_react2.default.useMemo(function() {\n\t\tvar _node_children;\n\t\treturn ((node === null || node === void 0 ? void 0 : (_node_children = node.children) === null || _node_children === void 0 ? void 0 : _node_children.length) ? getSortedChildren(node.children, order, node.initialRouteName, options) : []).filter(function(value) {\n\t\t\tvar _options_protectedScreens, _options_protectedScreens1;\n\t\t\tvar routeName = value.route.route;\n\t\t\tvar normalized = routeName.replace(/\\/index$/, \"\");\n\t\t\treturn !((options === null || options === void 0 ? void 0 : (_options_protectedScreens = options.protectedScreens) === null || _options_protectedScreens === void 0 ? void 0 : _options_protectedScreens.has(routeName)) || (options === null || options === void 0 ? void 0 : (_options_protectedScreens1 = options.protectedScreens) === null || _options_protectedScreens1 === void 0 ? void 0 : _options_protectedScreens1.has(normalized)));\n\t\t}).map(function(value) {\n\t\t\treturn routeToScreen(value.route, value.props);\n\t\t});\n\t}, [\n\t\tnode === null || node === void 0 ? void 0 : node.children,\n\t\tnode === null || node === void 0 ? void 0 : node.initialRouteName,\n\t\torder,\n\t\toptions === null || options === void 0 ? void 0 : options.protectedScreens\n\t]);\n}\nfunction fromImport(param) {\n\tvar { ErrorBoundary, SuspenseFallback, ...component } = param;\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tvar exported = (0, import_getPageExport.getPageExport)(component);\n\t\tif (exported && typeof exported === \"object\" && Object.keys(exported).length === 0) return {\n\t\t\tdefault: import_EmptyRoute.EmptyRoute,\n\t\t\tErrorBoundary,\n\t\t\tSuspenseFallback\n\t\t};\n\t}\n\treturn {\n\t\tdefault: (0, import_getPageExport.getPageExport)(component),\n\t\tErrorBoundary,\n\t\tSuspenseFallback\n\t};\n}\nfunction RouteSuspenseFallback(param) {\n\tvar { component: Component, route } = param;\n\tvar params = (0, import_react2.useContext)(import_Route.RouteParamsContext);\n\treturn Component ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {\n\t\troute,\n\t\tparams: params !== null && params !== void 0 ? params : {}\n\t}) : null;\n}\nvar qualifiedStore = /* @__PURE__ */ new WeakMap();\nfunction getRouteMatchesForProps() {\n\tvar _ref;\n\tvar _getServerContext;\n\tvar serverMatches = (_ref = (_getServerContext = (0, import_one_server_only.getServerContext)()) === null || _getServerContext === void 0 ? void 0 : _getServerContext.matches) !== null && _ref !== void 0 ? _ref : [];\n\tif (process.env.VITE_ENVIRONMENT === \"ssr\") return serverMatches;\n\tvar clientMatches = (0, import_useMatches.getClientMatchesSnapshot)();\n\treturn clientMatches.length ? clientMatches : serverMatches;\n}\nfunction getQualifiedRouteComponent(value) {\n\tif (value && qualifiedStore.has(value)) return qualifiedStore.get(value);\n\tvar ScreenComponent = /* @__PURE__ */ import_react2.default.forwardRef(function(props, ref) {\n\t\tvar _value_children;\n\t\tif (process.env.NODE_ENV === \"development\" && false);\n\t\tif (process.env.NODE_ENV === \"development\" && true) import_react2.default.useSyncExternalStore(import_routeHmr.subscribeRouteHmr, import_routeHmr.getRouteHmrEpoch, import_routeHmr.getRouteHmrEpoch);\n\t\tvar isSpaShell = (0, import_react2.useContext)(import_SpaShellContext.SpaShellContext);\n\t\tvar InheritedSuspenseFallback = (0, import_react2.useContext)(import_Route.SuspenseFallbackContext);\n\t\tvar matches = getRouteMatchesForProps();\n\t\tif (isSpaShell && props.segment !== \"\") {\n\t\t\tvar _value_children1;\n\t\t\tif (!(((_value_children1 = value.children) === null || _value_children1 === void 0 ? void 0 : _value_children1.length) && (value.layoutRenderMode === \"ssg\" || value.layoutRenderMode === \"ssr\"))) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", { \"data-one-spa-content\": \"\" });\n\t\t}\n\t\tvar res = fromImport(value.loadRoute());\n\t\tvar Component = res.default || import_EmptyRoute.EmptyRoute;\n\t\tvar CatchBoundary = res.ErrorBoundary;\n\t\tvar LayoutSuspenseFallback = value.type === \"layout\" ? res.SuspenseFallback : void 0;\n\t\tvar match = matches.find(function(match2) {\n\t\t\treturn match2.routeId === value.contextKey;\n\t\t}) || (!((_value_children = value.children) === null || _value_children === void 0 ? void 0 : _value_children.length) ? matches[matches.length - 1] : void 0);\n\t\tvar loaderDataProps = match && \"loaderData\" in match ? { loaderData: match.loaderData } : {};\n\t\tif (process.env.NODE_ENV === \"development\" && process.env.DEBUG === \"one\") {\n\t\t\tconsole.groupCollapsed(`Render ${props.key} ${props.segment}`);\n\t\t\tconsole.info(`value`, value);\n\t\t\tconsole.info(`Component`, Component);\n\t\t\tconsole.groupEnd();\n\t\t}\n\t\tvar slotProps = {};\n\t\tif (value.slots && value.slots.size > 0) {\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = value.slots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar [slotName] = _step.value;\n\t\t\t\t\tslotProps[slotName] = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Navigator.NamedSlot, {\n\t\t\t\t\t\tname: slotName,\n\t\t\t\t\t\tlayoutContextKey: value.contextKey\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar rendered;\n\t\tif (props.segment === \"\") rendered = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RootLayoutRenderer, {\n\t\t\tLayoutComponent: Component,\n\t\t\tlayoutProps: {\n\t\t\t\t...props,\n\t\t\t\t...slotProps,\n\t\t\t\t...loaderDataProps\n\t\t\t},\n\t\t\tforwardedRef: ref\n\t\t});\n\t\telse {\n\t\t\tvar page = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {\n\t\t\t\t...props,\n\t\t\t\t...slotProps,\n\t\t\t\t...loaderDataProps,\n\t\t\t\tref\n\t\t\t});\n\t\t\trendered = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RouteErrorBoundary, {\n\t\t\t\trouteName: value.route,\n\t\t\t\tchildren: CatchBoundary ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Try.Try, {\n\t\t\t\t\tcatch: CatchBoundary,\n\t\t\t\t\tchildren: page\n\t\t\t\t}) : page\n\t\t\t});\n\t\t}\n\t\tif (value.type !== \"layout\") return rendered;\n\t\tvar providedSuspenseFallback = LayoutSuspenseFallback !== null && LayoutSuspenseFallback !== void 0 ? LayoutSuspenseFallback : InheritedSuspenseFallback;\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Route.SuspenseFallbackContext.Provider, {\n\t\t\tvalue: providedSuspenseFallback,\n\t\t\tchildren: LayoutSuspenseFallback ? wrapSuspense(rendered, LayoutSuspenseFallback) : rendered\n\t\t});\n\t});\n\tvar wrapSuspense = function wrapSuspense2(children, SuspenseFallback) {\n\t\tvar fallback = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RouteSuspenseFallback, {\n\t\t\tcomponent: SuspenseFallback,\n\t\t\troute: value.contextKey\n\t\t});\n\t\tif (process.env.ONE_SUSPEND_ROUTES_NATIVE === \"0\" || globalThis.__ONE_DISABLE_SUSPENSE_ROUTES__ === true) return children;\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Suspense, {\n\t\t\tfallback,\n\t\t\tchildren\n\t\t});\n\t};\n\tvar QualifiedRoute = /* @__PURE__ */ import_react2.default.forwardRef(function(param, ref) {\n\t\tvar { route, navigation, ...props } = param;\n\t\tvar InheritedSuspenseFallback = (0, import_react2.useContext)(import_Route.SuspenseFallbackContext);\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Route.Route, {\n\t\t\troute,\n\t\t\tnode: value,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: wrapSuspense(/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScreenComponent, {\n\t\t\t\t...props,\n\t\t\t\tref,\n\t\t\t\tsegment: value.route\n\t\t\t}), process.env.VITE_ENVIRONMENT === \"client\" && value.type !== \"layout\" && navigation && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehaviorRouteCommit, {})] }), InheritedSuspenseFallback) })\n\t\t});\n\t});\n\tQualifiedRoute.displayName = `Route(${value.route})`;\n\tvar Memoized = /* @__PURE__ */ (0, import_react2.memo)(QualifiedRoute);\n\tqualifiedStore.set(value, Memoized);\n\treturn Memoized;\n}\nfunction createGetIdForRoute(route) {\n\tvar include = /* @__PURE__ */ new Map();\n\tif (route.dynamic) {\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = route.dynamic[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar segment = _step.value;\n\t\t\t\tinclude.set(segment.name, segment);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t}\n\treturn function() {\n\t\tvar { params = {} } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\tvar _segments_join;\n\t\tvar segments = [];\n\t\tvar _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator2 = include.values()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\tvar dynamic = _step2.value;\n\t\t\t\tvar value = params === null || params === void 0 ? void 0 : params[dynamic.name];\n\t\t\t\tif (Array.isArray(value) && value.length > 0) segments.push(value.join(\"/\"));\n\t\t\t\telse if (value && !Array.isArray(value)) segments.push(value);\n\t\t\t\telse if (dynamic.deep) segments.push(`[...${dynamic.name}]`);\n\t\t\t\telse segments.push(`[${dynamic.name}]`);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError2 = true;\n\t\t\t_iteratorError2 = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError2) throw _iteratorError2;\n\t\t\t}\n\t\t}\n\t\treturn (_segments_join = segments.join(\"/\")) !== null && _segments_join !== void 0 ? _segments_join : route.contextKey;\n\t};\n}\nfunction routeToScreen(route) {\n\tvar { options, ...props } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n\tvar _props_getId;\n\tvar navigationRouteName = (0, import_getReactNavigationConfig.getReactNavigationRouteName)(route);\n\treturn /* @__PURE__ */ (0, import_react.createElement)(Screen, {\n\t\t...props,\n\t\tgetId: (_props_getId = props.getId) !== null && _props_getId !== void 0 ? _props_getId : createGetIdForRoute(route),\n\t\tname: navigationRouteName,\n\t\tkey: navigationRouteName,\n\t\toptions: function options1(args) {\n\t\t\tvar _route_loadRoute;\n\t\t\tvar staticOptions = route.generated ? (_route_loadRoute = route.loadRoute()) === null || _route_loadRoute === void 0 ? void 0 : _route_loadRoute.getNavOptions : null;\n\t\t\tvar staticResult = typeof staticOptions === \"function\" ? staticOptions(args) : staticOptions;\n\t\t\tvar dynamicResult = typeof options === \"function\" ? options === null || options === void 0 ? void 0 : options(args) : options;\n\t\t\tvar output = {\n\t\t\t\t...staticResult,\n\t\t\t\t...dynamicResult\n\t\t\t};\n\t\t\tif (route.generated) {\n\t\t\t\toutput.tabBarButton = function() {\n\t\t\t\t\treturn null;\n\t\t\t\t};\n\t\t\t\toutput.drawerItemStyle = {\n\t\t\t\t\theight: 0,\n\t\t\t\t\tdisplay: \"none\"\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn output;\n\t\t},\n\t\tgetComponent: function getComponent() {\n\t\t\treturn getQualifiedRouteComponent(route);\n\t\t}\n\t});\n}\nvar ROUTE_ERROR_BOUNDARY_INITIAL_STATE = {\n\thasError: false,\n\terror: null,\n\terrorInfo: null\n};\nvar RouteErrorBoundary = /* @__PURE__ */ (function(_React_Component) {\n\t\"use strict\";\n\t_inherits(RouteErrorBoundary2, _React_Component);\n\tfunction RouteErrorBoundary2(props) {\n\t\t_class_call_check(this, RouteErrorBoundary2);\n\t\tvar _this = _call_super(this, RouteErrorBoundary2, [props]);\n\t\t_this.state = ROUTE_ERROR_BOUNDARY_INITIAL_STATE;\n\t\treturn _this;\n\t}\n\t_create_class(RouteErrorBoundary2, [\n\t\t{\n\t\t\tkey: \"componentDidCatch\",\n\t\t\tvalue: function componentDidCatch(error, errorInfo) {\n\t\t\t\tconsole.error(`Error occurred while running route \"${this.props.routeName}\": ${error instanceof Error ? error.message : error}\n\n${error.stack}\n\nComponent Stack:\n${errorInfo.componentStack}`);\n\t\t\t\tthis.setState({ errorInfo });\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tkey: \"clearError\",\n\t\t\tvalue: function clearError() {\n\t\t\t\tthis.setState(ROUTE_ERROR_BOUNDARY_INITIAL_STATE);\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tkey: \"render\",\n\t\t\tvalue: function render() {\n\t\t\t\tif (this.state.hasError) {\n\t\t\t\t\tvar { error, errorInfo } = this.state;\n\t\t\t\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RouteErrorView.RouteErrorView, {\n\t\t\t\t\t\trouteName: this.props.routeName,\n\t\t\t\t\t\terror,\n\t\t\t\t\t\terrorInfo,\n\t\t\t\t\t\tonRetry: this.clearError.bind(this)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn this.props.children;\n\t\t\t}\n\t\t}\n\t], [{\n\t\tkey: \"getDerivedStateFromError\",\n\t\tvalue: function getDerivedStateFromError(error) {\n\t\t\treturn {\n\t\t\t\thasError: true,\n\t\t\t\terror\n\t\t\t};\n\t\t}\n\t}]);\n\treturn RouteErrorBoundary2;\n})(import_react2.default.Component);\n//# sourceMappingURL=useScreens.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7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AQ;EACd,OAAO;CACR;CACA,cAAc,qBAAqB;EAClC;GACC,KAAK;GACL,OAAO,SAAS,kBAAkB,OAAO,WAAW;IACnD,QAAQ,MAAM,uCAAuC,KAAK,MAAM,UAAU,KAAK,iBAAiB,QAAQ,MAAM,UAAU,MAAM;;EAEhI,MAAM,MAAM;;;EAGZ,UAAU,gBAAgB;IACxB,KAAK,SAAS,EAAE,UAAU,CAAC;GAC5B;EACD;EACA;GACC,KAAK;GACL,OAAO,SAAS,aAAa;IAC5B,KAAK,SAAS,kCAAkC;GACjD;EACD;EACA;GACC,KAAK;GACL,OAAO,SAAS,SAAS;IACxB,IAAI,KAAK,MAAM,UAAU;KACxB,IAAI,EAAE,OAAO,cAAc,KAAK;KAChC,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,sBAAsB,gBAAgB;MACxF,WAAW,KAAK,MAAM;MACtB;MACA;MACA,SAAS,KAAK,WAAW,KAAK,IAAI;KACnC,CAAC;IACF;IACA,OAAO,KAAK,MAAM;GACnB;EACD;CACD,GAAG,CAAC;EACH,KAAK;EACL,OAAO,SAAS,yBAAyB,OAAO;GAC/C,OAAO;IACN,UAAU;IACV;GACD;EACD;CACD,CAAC,CAAC;CACF,OAAO;AACR,EAAC,CAAE,cAAc,QAAQ,SAAS"}
|
|
@@ -4,16 +4,10 @@ import { buildOneMetroResolverOverrides } from "./buildOneMetroResolverOverrides
|
|
|
4
4
|
|
|
5
5
|
function getViteMetroPluginOptions({ projectRoot, relativeRouterRoot, ignoredRouteFiles, linking, userDefaultConfigOverrides, setupFile }) {
|
|
6
6
|
const require2 = createRequire(projectRoot + "/");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} catch {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
if (missing.length) {
|
|
16
|
-
throw new Error(`[one] Metro requires ${missing.join(" and ")} in the app at ${projectRoot}. Install with your package manager, or remove native.bundler: 'metro' to use One's default native bundler.`);
|
|
7
|
+
try {
|
|
8
|
+
require2.resolve("@vxrn/vite-plugin-metro");
|
|
9
|
+
} catch {
|
|
10
|
+
throw new Error(`[one] Metro requires @vxrn/vite-plugin-metro in the app at ${projectRoot}. Install with your package manager, or remove native.bundler: 'metro' to use One's default native bundler.`);
|
|
17
11
|
}
|
|
18
12
|
const applyOneResolverOverrides = buildOneMetroResolverOverrides({ projectRoot });
|
|
19
13
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getViteMetroPluginOptions.js","names":[],"sources":["esm/metro-config/getViteMetroPluginOptions.js"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { buildOneBabelPlugins } from \"../babel-preset\";\nimport { buildOneMetroResolverOverrides } from \"./buildOneMetroResolverOverrides\";\nfunction getViteMetroPluginOptions({\n projectRoot,\n relativeRouterRoot,\n ignoredRouteFiles,\n linking,\n userDefaultConfigOverrides,\n setupFile\n}) {\n const require2 = createRequire(projectRoot + \"/\");\n
|
|
1
|
+
{"version":3,"file":"getViteMetroPluginOptions.js","names":[],"sources":["esm/metro-config/getViteMetroPluginOptions.js"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { buildOneBabelPlugins } from \"../babel-preset\";\nimport { buildOneMetroResolverOverrides } from \"./buildOneMetroResolverOverrides\";\nfunction getViteMetroPluginOptions({\n projectRoot,\n relativeRouterRoot,\n ignoredRouteFiles,\n linking,\n userDefaultConfigOverrides,\n setupFile\n}) {\n const require2 = createRequire(projectRoot + \"/\");\n try {\n require2.resolve(\"@vxrn/vite-plugin-metro\");\n } catch {\n throw new Error(\n `[one] Metro requires @vxrn/vite-plugin-metro in the app at ${projectRoot}. Install with your package manager, or remove native.bundler: 'metro' to use One's default native bundler.`\n );\n }\n const applyOneResolverOverrides = buildOneMetroResolverOverrides({ projectRoot });\n return {\n oneViteMetroBabelConfig: true,\n defaultConfigOverrides: (defaultConfig) => {\n let config = applyOneResolverOverrides(defaultConfig);\n if (typeof userDefaultConfigOverrides === \"function\") {\n config = userDefaultConfigOverrides(config);\n }\n return config;\n },\n babelConfig: {\n plugins: buildOneBabelPlugins({\n projectRoot,\n relativeRouterRoot,\n ignoredRouteFiles,\n linking,\n setupFile,\n // vite path injects import-meta-env-plugin separately via the\n // metro server transformFile hook using the user's vite `define`.\n includeImportMetaEnv: false\n })\n }\n };\n}\nexport {\n getViteMetroPluginOptions\n};\n//# sourceMappingURL=getViteMetroPluginOptions.js.map\n"],"mappings":";;;;;AAGA,SAAS,0BAA0B,EACjC,aACA,oBACA,mBACA,SACA,4BACA,aACC;CACD,MAAM,WAAW,cAAc,cAAc,GAAG;CAChD,IAAI;EACF,SAAS,QAAQ,yBAAyB;CAC5C,QAAQ;EACN,MAAM,IAAI,MACR,8DAA8D,YAAY,4GAC5E;CACF;CACA,MAAM,4BAA4B,+BAA+B,EAAE,YAAY,CAAC;CAChF,OAAO;EACL,yBAAyB;EACzB,yBAAyB,kBAAkB;GACzC,IAAI,SAAS,0BAA0B,aAAa;GACpD,IAAI,OAAO,+BAA+B,YAAY;IACpD,SAAS,2BAA2B,MAAM;GAC5C;GACA,OAAO;EACT;EACA,aAAa,EACX,SAAS,qBAAqB;GAC5B;GACA;GACA;GACA;GACA;GAGA,sBAAsB;EACxB,CAAC,EACH;CACF;AACF"}
|
|
@@ -5,16 +5,10 @@ import { buildOneMetroResolverOverrides } from "./buildOneMetroResolverOverrides
|
|
|
5
5
|
function getViteMetroPluginOptions(param) {
|
|
6
6
|
var { projectRoot, relativeRouterRoot, ignoredRouteFiles, linking, userDefaultConfigOverrides, setupFile } = param;
|
|
7
7
|
var require2 = createRequire(projectRoot + "/");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} catch (unused) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
if (missing.length) {
|
|
17
|
-
throw new Error(`[one] Metro requires ${missing.join(" and ")} in the app at ${projectRoot}. Install with your package manager, or remove native.bundler: 'metro' to use One's default native bundler.`);
|
|
8
|
+
try {
|
|
9
|
+
require2.resolve("@vxrn/vite-plugin-metro");
|
|
10
|
+
} catch (unused) {
|
|
11
|
+
throw new Error(`[one] Metro requires @vxrn/vite-plugin-metro in the app at ${projectRoot}. Install with your package manager, or remove native.bundler: 'metro' to use One's default native bundler.`);
|
|
18
12
|
}
|
|
19
13
|
var applyOneResolverOverrides = buildOneMetroResolverOverrides({ projectRoot });
|
|
20
14
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getViteMetroPluginOptions.native.js","names":[],"sources":["esm/metro-config/getViteMetroPluginOptions.native.js"],"sourcesContent":["import { createRequire } from \"module\";\nimport { buildOneBabelPlugins } from \"../babel-preset\";\nimport { buildOneMetroResolverOverrides } from \"./buildOneMetroResolverOverrides\";\nfunction getViteMetroPluginOptions(param) {\n var { projectRoot, relativeRouterRoot, ignoredRouteFiles, linking, userDefaultConfigOverrides, setupFile } = param;\n var require2 = createRequire(projectRoot + \"/\");\n
|
|
1
|
+
{"version":3,"file":"getViteMetroPluginOptions.native.js","names":[],"sources":["esm/metro-config/getViteMetroPluginOptions.native.js"],"sourcesContent":["import { createRequire } from \"module\";\nimport { buildOneBabelPlugins } from \"../babel-preset\";\nimport { buildOneMetroResolverOverrides } from \"./buildOneMetroResolverOverrides\";\nfunction getViteMetroPluginOptions(param) {\n var { projectRoot, relativeRouterRoot, ignoredRouteFiles, linking, userDefaultConfigOverrides, setupFile } = param;\n var require2 = createRequire(projectRoot + \"/\");\n try {\n require2.resolve(\"@vxrn/vite-plugin-metro\");\n } catch (unused) {\n throw new Error(`[one] Metro requires @vxrn/vite-plugin-metro in the app at ${projectRoot}. Install with your package manager, or remove native.bundler: 'metro' to use One's default native bundler.`);\n }\n var applyOneResolverOverrides = buildOneMetroResolverOverrides({\n projectRoot\n });\n return {\n oneViteMetroBabelConfig: true,\n defaultConfigOverrides: function defaultConfigOverrides(defaultConfig) {\n var config = applyOneResolverOverrides(defaultConfig);\n if (typeof userDefaultConfigOverrides === \"function\") {\n config = userDefaultConfigOverrides(config);\n }\n return config;\n },\n babelConfig: {\n plugins: buildOneBabelPlugins({\n projectRoot,\n relativeRouterRoot,\n ignoredRouteFiles,\n linking,\n setupFile,\n // vite path injects import-meta-env-plugin separately via the\n // metro server transformFile hook using the user's vite `define`.\n includeImportMetaEnv: false\n })\n }\n };\n}\nexport {\n getViteMetroPluginOptions\n};\n//# sourceMappingURL=getViteMetroPluginOptions.js.map\n"],"mappings":";;;;;AAGA,SAAS,0BAA0B,OAAO;CACxC,IAAI,EAAE,aAAa,oBAAoB,mBAAmB,SAAS,4BAA4B,cAAc;CAC7G,IAAI,WAAW,cAAc,cAAc,GAAG;CAC9C,IAAI;EACF,SAAS,QAAQ,yBAAyB;CAC5C,SAAS,QAAQ;EACf,MAAM,IAAI,MAAM,8DAA8D,YAAY,4GAA4G;CACxM;CACA,IAAI,4BAA4B,+BAA+B,EAC7D,YACF,CAAC;CACD,OAAO;EACL,yBAAyB;EACzB,wBAAwB,SAAS,uBAAuB,eAAe;GACrE,IAAI,SAAS,0BAA0B,aAAa;GACpD,IAAI,OAAO,+BAA+B,YAAY;IACpD,SAAS,2BAA2B,MAAM;GAC5C;GACA,OAAO;EACT;EACA,aAAa,EACX,SAAS,qBAAqB;GAC5B;GACA;GACA;GACA;GACA;GAGA,sBAAsB;EACxB,CAAC,EACH;CACF;AACF"}
|
|
@@ -2,12 +2,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { StyleSheet, View } from "react-native";
|
|
4
4
|
import NativeKotlinHost from "../specs/OneKotlinHostNativeComponent.native.js";
|
|
5
|
-
import { decodeNativeSourceCallback
|
|
5
|
+
import { decodeNativeSourceCallback } from "./wire.native.js";
|
|
6
|
+
import { RESYNC_EVENT, useNativeSourceProps } from "./wireProps.native.js";
|
|
6
7
|
|
|
7
8
|
function KotlinSourceView(param) {
|
|
8
9
|
var { source, view, contractHash, props, wires } = param;
|
|
10
|
+
var keyed = useNativeSourceProps(props, wires, view !== "");
|
|
9
11
|
var [contentSize, setContentSize] = useState();
|
|
10
|
-
var encoded = wires ? encodeNativeSourceProps(props, wires.props, wires.structs) : props;
|
|
11
12
|
return /* @__PURE__ */ jsxs(View, {
|
|
12
13
|
style: props.style,
|
|
13
14
|
collapsable: false,
|
|
@@ -18,10 +19,9 @@ function KotlinSourceView(param) {
|
|
|
18
19
|
source,
|
|
19
20
|
view,
|
|
20
21
|
contractHash,
|
|
21
|
-
props:
|
|
22
|
-
return typeof value === "function" ? true : value;
|
|
23
|
-
}),
|
|
22
|
+
props: keyed.text,
|
|
24
23
|
onHostEvent: function onHostEvent(event) {
|
|
24
|
+
if (event.nativeEvent.name === RESYNC_EVENT) return keyed.resync();
|
|
25
25
|
var callback = props[event.nativeEvent.name];
|
|
26
26
|
if (typeof callback === "function") {
|
|
27
27
|
var _ref;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.native.js","names":[],"sources":["esm/platform/native-source/view.native.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState } from \"react\";\nimport { StyleSheet, View } from \"react-native\";\nimport NativeKotlinHost from \"../specs/OneKotlinHostNativeComponent\";\nimport { decodeNativeSourceCallback,
|
|
1
|
+
{"version":3,"file":"view.native.js","names":[],"sources":["esm/platform/native-source/view.native.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState } from \"react\";\nimport { StyleSheet, View } from \"react-native\";\nimport NativeKotlinHost from \"../specs/OneKotlinHostNativeComponent\";\nimport { decodeNativeSourceCallback } from \"./wire.native\";\nimport { RESYNC_EVENT, useNativeSourceProps } from \"./wireProps.native\";\nfunction KotlinSourceView(param) {\n var { source, view, contractHash, props, wires } = param;\n var keyed = useNativeSourceProps(props, wires, view !== \"\");\n var [contentSize, setContentSize] = useState();\n return /* @__PURE__ */ _jsxs(View, {\n style: props.style,\n collapsable: false,\n children: [\n /* yoga uses the natural child size while retaining parent flex and stretch. */\n /* @__PURE__ */ _jsx(View, {\n pointerEvents: \"none\",\n style: contentSize\n }),\n /* @__PURE__ */ _jsx(NativeKotlinHost, {\n source,\n view,\n contractHash,\n props: keyed.text,\n onHostEvent: function onHostEvent(event) {\n if (event.nativeEvent.name === RESYNC_EVENT) return keyed.resync();\n var callback = props[event.nativeEvent.name];\n if (typeof callback === \"function\") {\n var _ref;\n var args = JSON.parse(event.nativeEvent.args);\n var argWires = wires === null || wires === void 0 ? void 0 : wires.callbacks[event.nativeEvent.name];\n callback(...argWires ? decodeNativeSourceCallback(args, argWires, (_ref = wires === null || wires === void 0 ? void 0 : wires.structs) !== null && _ref !== void 0 ? _ref : {}, event.nativeEvent.name) : args);\n }\n },\n onHostSizeChange: function onHostSizeChange(event) {\n setContentSize({\n width: event.nativeEvent.width,\n height: event.nativeEvent.height\n });\n },\n style: StyleSheet.absoluteFill\n })\n ]\n });\n}\nexport {\n KotlinSourceView\n};\n//# sourceMappingURL=view.native.js.map\n"],"mappings":";;;;;;;;AAMA,SAAS,iBAAiB,OAAO;CAC/B,IAAI,EAAE,QAAQ,MAAM,cAAc,OAAO,UAAU;CACnD,IAAI,QAAQ,qBAAqB,OAAO,OAAO,SAAS,EAAE;CAC1D,IAAI,CAAC,aAAa,kBAAkB,SAAS;CAC7C,OAAuB,qBAAM,MAAM;EACjC,OAAO,MAAM;EACb,aAAa;EACb,UAAU,CAEQ,oBAAK,MAAM;GACzB,eAAe;GACf,OAAO;EACT,CAAC,GACe,oBAAK,kBAAkB;GACrC;GACA;GACA;GACA,OAAO,MAAM;GACb,aAAa,SAAS,YAAY,OAAO;IACvC,IAAI,MAAM,YAAY,SAAS,cAAc,OAAO,MAAM,OAAO;IACjE,IAAI,WAAW,MAAM,MAAM,YAAY;IACvC,IAAI,OAAO,aAAa,YAAY;KAClC,IAAI;KACJ,IAAI,OAAO,KAAK,MAAM,MAAM,YAAY,IAAI;KAC5C,IAAI,WAAW,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM,UAAU,MAAM,YAAY;KAC/F,SAAS,GAAG,WAAW,2BAA2B,MAAM,WAAW,OAAO,UAAU,QAAQ,UAAU,KAAK,IAAI,KAAK,IAAI,MAAM,aAAa,QAAQ,SAAS,KAAK,IAAI,OAAO,CAAC,GAAG,MAAM,YAAY,IAAI,IAAI,IAAI;IAChN;GACF;GACA,kBAAkB,SAAS,iBAAiB,OAAO;IACjD,eAAe;KACb,OAAO,MAAM,YAAY;KACzB,QAAQ,MAAM,YAAY;IAC5B,CAAC;GACH;GACA,OAAO,WAAW;EACpB,CAAC,CACH;CACF,CAAC;AACH"}
|
|
@@ -34,105 +34,165 @@ function base64Decode(text) {
|
|
|
34
34
|
function isRecord(value) {
|
|
35
35
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
var trail = [];
|
|
38
|
+
function trailText() {
|
|
39
|
+
var text = String(trail[0]);
|
|
40
|
+
for (var i = 1; i < trail.length; i++) {
|
|
41
|
+
text += typeof trail[i] === "number" ? `[${trail[i]}]` : `.${trail[i]}`;
|
|
42
|
+
}
|
|
43
|
+
return text;
|
|
44
|
+
}
|
|
45
|
+
var plainStructs = /* @__PURE__ */ new WeakMap();
|
|
46
|
+
function encodeValue(value, wire, structs) {
|
|
38
47
|
switch (wire.kind) {
|
|
39
48
|
case "date":
|
|
40
|
-
if (!(value instanceof Date)) throw new TypeError(`${
|
|
49
|
+
if (!(value instanceof Date)) throw new TypeError(`${trailText()}: expected Date`);
|
|
41
50
|
return value;
|
|
42
51
|
case "data":
|
|
43
|
-
if (!(value instanceof Uint8Array)) throw new TypeError(`${
|
|
52
|
+
if (!(value instanceof Uint8Array)) throw new TypeError(`${trailText()}: expected Uint8Array`);
|
|
44
53
|
return base64Encode(value);
|
|
45
54
|
case "enum":
|
|
46
55
|
if (typeof value !== "string" && typeof value !== "number") {
|
|
47
|
-
throw new TypeError(`${
|
|
56
|
+
throw new TypeError(`${trailText()}: expected an enum value`);
|
|
48
57
|
}
|
|
49
58
|
return value;
|
|
50
59
|
case "struct": {
|
|
51
|
-
if (!isRecord(value)) throw new TypeError(`${
|
|
60
|
+
if (!isRecord(value)) throw new TypeError(`${trailText()}: expected ${wire.name}`);
|
|
52
61
|
var table = structs[wire.name];
|
|
53
|
-
if (!table) throw new TypeError(`${
|
|
62
|
+
if (!table) throw new TypeError(`${trailText()}: unknown struct ${wire.name}`);
|
|
63
|
+
var plain = plainStructs.get(table);
|
|
64
|
+
if (plain === void 0) {
|
|
65
|
+
plain = table.fields.every(function(field2) {
|
|
66
|
+
return field2.wire === void 0;
|
|
67
|
+
});
|
|
68
|
+
plainStructs.set(table, plain);
|
|
69
|
+
}
|
|
70
|
+
if (plain) {
|
|
71
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
72
|
+
try {
|
|
73
|
+
for (var _iterator = table.fields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
74
|
+
var field = _step.value;
|
|
75
|
+
if (value[field.name] === void 0 && !field.optional) {
|
|
76
|
+
trail.push(field.name);
|
|
77
|
+
throw new TypeError(`${trailText()}: required`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
} catch (err) {
|
|
81
|
+
_didIteratorError = true;
|
|
82
|
+
_iteratorError = err;
|
|
83
|
+
} finally {
|
|
84
|
+
try {
|
|
85
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
86
|
+
_iterator.return();
|
|
87
|
+
}
|
|
88
|
+
} finally {
|
|
89
|
+
if (_didIteratorError) {
|
|
90
|
+
throw _iteratorError;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
54
96
|
var out = {};
|
|
55
|
-
var
|
|
97
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
56
98
|
try {
|
|
57
99
|
var _loop = function() {
|
|
58
|
-
var key2 =
|
|
100
|
+
var key2 = _step1.value;
|
|
59
101
|
if (!table.fields.some(function(field2) {
|
|
60
102
|
return field2.name === key2;
|
|
61
103
|
})) out[key2] = value[key2];
|
|
62
104
|
};
|
|
63
|
-
for (var
|
|
105
|
+
for (var _iterator1 = Object.keys(value)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) _loop();
|
|
64
106
|
} catch (err) {
|
|
65
|
-
|
|
66
|
-
|
|
107
|
+
_didIteratorError1 = true;
|
|
108
|
+
_iteratorError1 = err;
|
|
67
109
|
} finally {
|
|
68
110
|
try {
|
|
69
|
-
if (!
|
|
70
|
-
|
|
111
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
112
|
+
_iterator1.return();
|
|
71
113
|
}
|
|
72
114
|
} finally {
|
|
73
|
-
if (
|
|
74
|
-
throw
|
|
115
|
+
if (_didIteratorError1) {
|
|
116
|
+
throw _iteratorError1;
|
|
75
117
|
}
|
|
76
118
|
}
|
|
77
119
|
}
|
|
78
|
-
var
|
|
120
|
+
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
79
121
|
try {
|
|
80
|
-
for (var
|
|
81
|
-
var
|
|
82
|
-
var present = value[
|
|
122
|
+
for (var _iterator2 = table.fields[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
123
|
+
var field1 = _step2.value;
|
|
124
|
+
var present = value[field1.name] !== void 0;
|
|
83
125
|
if (!present) {
|
|
84
|
-
if (!
|
|
126
|
+
if (!field1.optional) {
|
|
127
|
+
trail.push(field1.name);
|
|
128
|
+
throw new TypeError(`${trailText()}: required`);
|
|
129
|
+
}
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (field1.wire === void 0) {
|
|
133
|
+
out[field1.name] = value[field1.name];
|
|
85
134
|
continue;
|
|
86
135
|
}
|
|
87
|
-
|
|
136
|
+
trail.push(field1.name);
|
|
137
|
+
out[field1.name] = encodeValue(value[field1.name], field1.wire, structs);
|
|
138
|
+
trail.pop();
|
|
88
139
|
}
|
|
89
140
|
} catch (err) {
|
|
90
|
-
|
|
91
|
-
|
|
141
|
+
_didIteratorError2 = true;
|
|
142
|
+
_iteratorError2 = err;
|
|
92
143
|
} finally {
|
|
93
144
|
try {
|
|
94
|
-
if (!
|
|
95
|
-
|
|
145
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
146
|
+
_iterator2.return();
|
|
96
147
|
}
|
|
97
148
|
} finally {
|
|
98
|
-
if (
|
|
99
|
-
throw
|
|
149
|
+
if (_didIteratorError2) {
|
|
150
|
+
throw _iteratorError2;
|
|
100
151
|
}
|
|
101
152
|
}
|
|
102
153
|
}
|
|
103
154
|
return out;
|
|
104
155
|
}
|
|
105
|
-
case "array":
|
|
106
|
-
if (!Array.isArray(value)) throw new TypeError(`${
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
156
|
+
case "array": {
|
|
157
|
+
if (!Array.isArray(value)) throw new TypeError(`${trailText()}: expected an array`);
|
|
158
|
+
var out1 = new Array(value.length);
|
|
159
|
+
trail.push(0);
|
|
160
|
+
var at = trail.length - 1;
|
|
161
|
+
for (var index = 0; index < value.length; index++) {
|
|
162
|
+
trail[at] = index;
|
|
163
|
+
out1[index] = encodeValue(value[index], wire.element, structs);
|
|
164
|
+
}
|
|
165
|
+
trail.pop();
|
|
166
|
+
return out1;
|
|
167
|
+
}
|
|
110
168
|
case "map": {
|
|
111
|
-
if (!isRecord(value)) throw new TypeError(`${
|
|
112
|
-
var
|
|
113
|
-
var
|
|
169
|
+
if (!isRecord(value)) throw new TypeError(`${trailText()}: expected an object`);
|
|
170
|
+
var out2 = {};
|
|
171
|
+
var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = void 0;
|
|
114
172
|
try {
|
|
115
|
-
for (var
|
|
116
|
-
var key =
|
|
117
|
-
|
|
173
|
+
for (var _iterator3 = Object.keys(value)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
174
|
+
var key = _step3.value;
|
|
175
|
+
trail.push(key);
|
|
176
|
+
out2[key] = encodeValue(value[key], wire.value, structs);
|
|
177
|
+
trail.pop();
|
|
118
178
|
}
|
|
119
179
|
} catch (err) {
|
|
120
|
-
|
|
121
|
-
|
|
180
|
+
_didIteratorError3 = true;
|
|
181
|
+
_iteratorError3 = err;
|
|
122
182
|
} finally {
|
|
123
183
|
try {
|
|
124
|
-
if (!
|
|
125
|
-
|
|
184
|
+
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
|
185
|
+
_iterator3.return();
|
|
126
186
|
}
|
|
127
187
|
} finally {
|
|
128
|
-
if (
|
|
129
|
-
throw
|
|
188
|
+
if (_didIteratorError3) {
|
|
189
|
+
throw _iteratorError3;
|
|
130
190
|
}
|
|
131
191
|
}
|
|
132
192
|
}
|
|
133
|
-
return
|
|
193
|
+
return out2;
|
|
134
194
|
}
|
|
135
|
-
case "nullable": return value === null || value === void 0 ? null : encodeValue(value, wire.inner, structs
|
|
195
|
+
case "nullable": return value === null || value === void 0 ? null : encodeValue(value, wire.inner, structs);
|
|
136
196
|
}
|
|
137
197
|
}
|
|
138
198
|
function decodeValue(value, wire, structs, path) {
|
|
@@ -249,10 +309,15 @@ function decodeValue(value, wire, structs, path) {
|
|
|
249
309
|
case "nullable": return value === null || value === void 0 ? null : decodeValue(value, wire.inner, structs, path);
|
|
250
310
|
}
|
|
251
311
|
}
|
|
312
|
+
function encodeAt(path, value, wire, structs) {
|
|
313
|
+
trail.length = 0;
|
|
314
|
+
trail.push(...path);
|
|
315
|
+
return encodeValue(value, wire, structs);
|
|
316
|
+
}
|
|
252
317
|
function encodeNativeSourceArgs(args, wires, structs) {
|
|
253
318
|
return args.map(function(arg, index) {
|
|
254
319
|
var wire = wires[index];
|
|
255
|
-
return wire === void 0 || wire === null ? arg :
|
|
320
|
+
return wire === void 0 || wire === null ? arg : encodeAt(["args", index], arg, wire, structs);
|
|
256
321
|
});
|
|
257
322
|
}
|
|
258
323
|
function decodeNativeSourceResult(value, wire, structs) {
|
|
@@ -265,7 +330,7 @@ function encodeNativeSourceProps(props, wires, structs) {
|
|
|
265
330
|
for (var _iterator = Object.keys(wires)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
266
331
|
var name = _step.value;
|
|
267
332
|
if (out[name] === void 0) continue;
|
|
268
|
-
out[name] =
|
|
333
|
+
out[name] = encodeAt(["props", name], out[name], wires[name], structs);
|
|
269
334
|
}
|
|
270
335
|
} catch (err) {
|
|
271
336
|
_didIteratorError = true;
|
|
@@ -283,6 +348,41 @@ function encodeNativeSourceProps(props, wires, structs) {
|
|
|
283
348
|
}
|
|
284
349
|
return out;
|
|
285
350
|
}
|
|
351
|
+
function encodeNativeSourceProp(name, value, wires) {
|
|
352
|
+
var wire = wires === null || wires === void 0 ? void 0 : wires.props[name];
|
|
353
|
+
return wire === void 0 ? value : encodeAt(["props", name], value, wire, wires.structs);
|
|
354
|
+
}
|
|
355
|
+
function encodeNativeSourceListItem(name, index, item, element, structs) {
|
|
356
|
+
return encodeAt([
|
|
357
|
+
"props",
|
|
358
|
+
name,
|
|
359
|
+
index
|
|
360
|
+
], item, element, structs);
|
|
361
|
+
}
|
|
362
|
+
function stringifyNativeSourceProps(props, wires) {
|
|
363
|
+
var out = wires ? encodeNativeSourceProps(props, wires.props, wires.structs) : { ...props };
|
|
364
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
365
|
+
try {
|
|
366
|
+
for (var _iterator = Object.keys(out)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
367
|
+
var key = _step.value;
|
|
368
|
+
if (typeof out[key] === "function") out[key] = true;
|
|
369
|
+
}
|
|
370
|
+
} catch (err) {
|
|
371
|
+
_didIteratorError = true;
|
|
372
|
+
_iteratorError = err;
|
|
373
|
+
} finally {
|
|
374
|
+
try {
|
|
375
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
376
|
+
_iterator.return();
|
|
377
|
+
}
|
|
378
|
+
} finally {
|
|
379
|
+
if (_didIteratorError) {
|
|
380
|
+
throw _iteratorError;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
return JSON.stringify(out);
|
|
385
|
+
}
|
|
286
386
|
function decodeNativeSourceCallback(args, wires, structs, event) {
|
|
287
387
|
return args.map(function(arg, index) {
|
|
288
388
|
var wire = wires[index];
|
|
@@ -290,5 +390,5 @@ function decodeNativeSourceCallback(args, wires, structs, event) {
|
|
|
290
390
|
});
|
|
291
391
|
}
|
|
292
392
|
|
|
293
|
-
export { base64Decode, base64Encode, decodeNativeSourceCallback, decodeNativeSourceResult, encodeNativeSourceArgs, encodeNativeSourceProps };
|
|
393
|
+
export { base64Decode, base64Encode, decodeNativeSourceCallback, decodeNativeSourceResult, encodeNativeSourceArgs, encodeNativeSourceListItem, encodeNativeSourceProp, encodeNativeSourceProps, stringifyNativeSourceProps };
|
|
294
394
|
//# sourceMappingURL=wire.native.js.map
|