one 2.13.9 → 2.13.10
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/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/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/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/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/router/useScreens.tsx +1 -1
- package/types/metro-config/getViteMetroPluginOptions.d.ts +1 -1
- package/types/metro-config/getViteMetroPluginOptions.d.ts.map +1 -1
|
@@ -26,16 +26,10 @@ var import_babel_preset = require("../babel-preset/index.cjs");
|
|
|
26
26
|
var import_buildOneMetroResolverOverrides = require("./buildOneMetroResolverOverrides.cjs");
|
|
27
27
|
function getViteMetroPluginOptions({ projectRoot, relativeRouterRoot, ignoredRouteFiles, linking, userDefaultConfigOverrides, setupFile }) {
|
|
28
28
|
const require2 = (0, import_node_module.createRequire)(projectRoot + "/");
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} catch {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
if (missing.length) {
|
|
38
|
-
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.`);
|
|
29
|
+
try {
|
|
30
|
+
require2.resolve("@vxrn/vite-plugin-metro");
|
|
31
|
+
} catch {
|
|
32
|
+
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.`);
|
|
39
33
|
}
|
|
40
34
|
const applyOneResolverOverrides = (0, import_buildOneMetroResolverOverrides.buildOneMetroResolverOverrides)({ projectRoot });
|
|
41
35
|
return {
|
|
@@ -29,16 +29,10 @@ var import_buildOneMetroResolverOverrides = require("./buildOneMetroResolverOver
|
|
|
29
29
|
function getViteMetroPluginOptions(param) {
|
|
30
30
|
var { projectRoot, relativeRouterRoot, ignoredRouteFiles, linking, userDefaultConfigOverrides, setupFile } = param;
|
|
31
31
|
var require2 = (0, import_module.createRequire)(projectRoot + "/");
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} catch (unused) {
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
if (missing.length) {
|
|
41
|
-
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.`);
|
|
32
|
+
try {
|
|
33
|
+
require2.resolve("@vxrn/vite-plugin-metro");
|
|
34
|
+
} catch (unused) {
|
|
35
|
+
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.`);
|
|
42
36
|
}
|
|
43
37
|
var applyOneResolverOverrides = (0, import_buildOneMetroResolverOverrides.buildOneMetroResolverOverrides)({ projectRoot });
|
|
44
38
|
return {
|
|
@@ -29,16 +29,10 @@ var import_buildOneMetroResolverOverrides = require("./buildOneMetroResolverOver
|
|
|
29
29
|
function getViteMetroPluginOptions(param) {
|
|
30
30
|
var { projectRoot, relativeRouterRoot, ignoredRouteFiles, linking, userDefaultConfigOverrides, setupFile } = param;
|
|
31
31
|
var require2 = (0, import_module.createRequire)(projectRoot + "/");
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} catch (unused) {
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
if (missing.length) {
|
|
41
|
-
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.`);
|
|
32
|
+
try {
|
|
33
|
+
require2.resolve("@vxrn/vite-plugin-metro");
|
|
34
|
+
} catch (unused) {
|
|
35
|
+
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.`);
|
|
42
36
|
}
|
|
43
37
|
var applyOneResolverOverrides = (0, import_buildOneMetroResolverOverrides.buildOneMetroResolverOverrides)({ projectRoot });
|
|
44
38
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getViteMetroPluginOptions.native.js","names":[],"sources":["cjs/metro-config/getViteMetroPluginOptions.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 getViteMetroPluginOptions_exports = {};\n__export(getViteMetroPluginOptions_exports, {\n getViteMetroPluginOptions: () => getViteMetroPluginOptions\n});\nmodule.exports = __toCommonJS(getViteMetroPluginOptions_exports);\nvar import_module = require(\"module\");\nvar import_babel_preset = require(\"../babel-preset\");\nvar import_buildOneMetroResolverOverrides = require(\"./buildOneMetroResolverOverrides\");\nfunction getViteMetroPluginOptions(param) {\n var { projectRoot, relativeRouterRoot, ignoredRouteFiles, linking, userDefaultConfigOverrides, setupFile } = param;\n var require2 = (0, import_module.createRequire)(projectRoot + \"/\");\n
|
|
1
|
+
{"version":3,"file":"getViteMetroPluginOptions.native.js","names":[],"sources":["cjs/metro-config/getViteMetroPluginOptions.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 getViteMetroPluginOptions_exports = {};\n__export(getViteMetroPluginOptions_exports, {\n getViteMetroPluginOptions: () => getViteMetroPluginOptions\n});\nmodule.exports = __toCommonJS(getViteMetroPluginOptions_exports);\nvar import_module = require(\"module\");\nvar import_babel_preset = require(\"../babel-preset\");\nvar import_buildOneMetroResolverOverrides = require(\"./buildOneMetroResolverOverrides\");\nfunction getViteMetroPluginOptions(param) {\n var { projectRoot, relativeRouterRoot, ignoredRouteFiles, linking, userDefaultConfigOverrides, setupFile } = param;\n var require2 = (0, import_module.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 = (0, import_buildOneMetroResolverOverrides.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: (0, import_babel_preset.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}\n//# sourceMappingURL=getViteMetroPluginOptions.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;AACzF,IAAI,oCAAoC,CAAC;AACzC,SAAS,mCAAmC,EAC1C,iCAAiC,0BACnC,CAAC;AACD,OAAO,UAAU,aAAa,iCAAiC;AAC/D,IAAI,gBAAgB,QAAQ,QAAQ;AACpC,IAAI,sBAAsB,QAAQ,iCAAiB;AACnD,IAAI,wCAAwC,QAAQ,4CAAkC;AACtF,SAAS,0BAA0B,OAAO;CACxC,IAAI,EAAE,aAAa,oBAAoB,mBAAmB,SAAS,4BAA4B,cAAc;CAC7G,IAAI,YAAY,GAAG,cAAc,cAAa,CAAE,cAAc,GAAG;CACjE,IAAI;EACF,SAAS,QAAQ,yBAAyB;CAC5C,SAAS,QAAQ;EACf,MAAM,IAAI,MAAM,8DAA8D,YAAY,4GAA4G;CACxM;CACA,IAAI,6BAA6B,GAAG,sCAAsC,+BAA8B,CAAE,EACxG,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,UAAU,GAAG,oBAAoB,qBAAoB,CAAE;GACrD;GACA;GACA;GACA;GACA;GAGA,sBAAsB;EACxB,CAAC,EACH;CACF;AACF"}
|
|
@@ -352,8 +352,8 @@ function createGetIdForRoute(route) {
|
|
|
352
352
|
function routeToScreen(route, { options, ...props } = {}) {
|
|
353
353
|
const navigationRouteName = (0, import_getReactNavigationConfig.getReactNavigationRouteName)(route);
|
|
354
354
|
return /* @__PURE__ */ (0, import_react2.createElement)(Screen, {
|
|
355
|
-
getId: createGetIdForRoute(route),
|
|
356
355
|
...props,
|
|
356
|
+
getId: props.getId ?? createGetIdForRoute(route),
|
|
357
357
|
name: navigationRouteName,
|
|
358
358
|
key: navigationRouteName,
|
|
359
359
|
options: (args) => {
|
|
@@ -430,10 +430,11 @@ function createGetIdForRoute(route) {
|
|
|
430
430
|
}
|
|
431
431
|
function routeToScreen(route) {
|
|
432
432
|
var { options, ...props } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
433
|
+
var _props_getId;
|
|
433
434
|
var navigationRouteName = (0, import_getReactNavigationConfig.getReactNavigationRouteName)(route);
|
|
434
435
|
return /* @__PURE__ */ (0, import_react.createElement)(Screen, {
|
|
435
|
-
getId: createGetIdForRoute(route),
|
|
436
436
|
...props,
|
|
437
|
+
getId: (_props_getId = props.getId) !== null && _props_getId !== void 0 ? _props_getId : createGetIdForRoute(route),
|
|
437
438
|
name: navigationRouteName,
|
|
438
439
|
key: navigationRouteName,
|
|
439
440
|
options: function options1(args) {
|
|
@@ -430,10 +430,11 @@ function createGetIdForRoute(route) {
|
|
|
430
430
|
}
|
|
431
431
|
function routeToScreen(route) {
|
|
432
432
|
var { options, ...props } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
433
|
+
var _props_getId;
|
|
433
434
|
var navigationRouteName = (0, import_getReactNavigationConfig.getReactNavigationRouteName)(route);
|
|
434
435
|
return /* @__PURE__ */ (0, import_react.createElement)(Screen, {
|
|
435
|
-
getId: createGetIdForRoute(route),
|
|
436
436
|
...props,
|
|
437
|
+
getId: (_props_getId = props.getId) !== null && _props_getId !== void 0 ? _props_getId : createGetIdForRoute(route),
|
|
437
438
|
name: navigationRouteName,
|
|
438
439
|
key: navigationRouteName,
|
|
439
440
|
options: function options1(args) {
|
|
@@ -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,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,Q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kB,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;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE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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"}
|
|
@@ -315,8 +315,8 @@ function createGetIdForRoute(route) {
|
|
|
315
315
|
function routeToScreen(route, { options, ...props } = {}) {
|
|
316
316
|
const navigationRouteName = getReactNavigationRouteName(route);
|
|
317
317
|
return /* @__PURE__ */ createElement(Screen, {
|
|
318
|
-
getId: createGetIdForRoute(route),
|
|
319
318
|
...props,
|
|
319
|
+
getId: props.getId ?? createGetIdForRoute(route),
|
|
320
320
|
name: navigationRouteName,
|
|
321
321
|
key: navigationRouteName,
|
|
322
322
|
options: (args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScreens.js","names":[],"sources":["esm/router/useScreens.js"],"sourcesContent":["import { createNavigatorFactory } from \"@react-navigation/core\";\nimport React, { Suspense, createElement, memo, useContext, useEffect, useState } from \"react\";\nimport { SafeAreaProvider } from \"../safe-area-context\";\nimport { ServerContextScript } from \"../server/ServerContextScript\";\nimport { checkSkewAndReload } from \"../skewProtection\";\nimport { getClientMatchesSnapshot } from \"../useMatches\";\nimport { handleSkewError, isChunkLoadError } from \"../utils/dynamicImport\";\nimport { getPageExport } from \"../utils/getPageExport\";\nimport { EmptyRoute } from \"../views/EmptyRoute\";\nimport { NamedSlot } from \"../views/Navigator\";\nimport { RouteErrorView } from \"../views/RouteErrorView\";\nimport { Try } from \"../views/Try\";\nimport { ScrollBehaviorRouteCommit } from \"../views/ScrollBehavior\";\nimport { DevHead } from \"../vite/DevHead\";\nimport { getServerContext, useServerContext } from \"../vite/one-server-only\";\nimport { getReactNavigationRouteName } from \"../getReactNavigationConfig\";\nimport { filterRootHTML } from \"./filterRootHTML\";\nimport { Route, RouteParamsContext, SuspenseFallbackContext, useRouteNode } from \"./Route\";\nimport { SpaShellContext } from \"./SpaShellContext\";\nimport { sortRoutesWithInitial } from \"./sortRoutes\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\n\nfunction hasMetaCharset(children) {\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!children) return false;\n\t\tconst checkElement = (child) => {\n\t\t\tif (!React.isValidElement(child)) return false;\n\t\t\tif (child.type === \"meta\") {\n\t\t\t\tconst props = child.props;\n\t\t\t\tif (\"charSet\" in props || \"charset\" in props) return true;\n\t\t\t}\n\t\t\tconst 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}\nconst { Screen, Group } = createNavigatorFactory({})();\nconst cachedInlineCSSElements = typeof document !== \"undefined\" && typeof document.querySelectorAll === \"function\" ? (() => {\n\tconst elements = [];\n\tdocument.querySelectorAll(\"style[id^=\\\"__one_css_\\\"], link[rel=\\\"stylesheet\\\"][data-one-css]\").forEach((el, i) => {\n\t\tif (el.tagName === \"STYLE\") elements.push(/* @__PURE__ */ 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\tconst href = el.getAttribute(\"href\");\n\t\t\telements.push(/* @__PURE__ */ 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})() : [];\nconst SSR_SAFE_METRICS = {\n\tframe: {\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth: 0,\n\t\theight: 0\n\t},\n\tinsets: {\n\t\ttop: 0,\n\t\tleft: 0,\n\t\tright: 0,\n\t\tbottom: 0\n\t}\n};\nfunction RootLayoutRenderer({ LayoutComponent, layoutProps, forwardedRef }) {\n\tif (process.env.NODE_ENV === \"development\" && true) {\n\t\tconst [, setHmrKey] = useState(0);\n\t\tuseEffect(() => {\n\t\t\tconst handler = () => setHmrKey((k) => k + 1);\n\t\t\twindow.addEventListener(\"one-hmr-update\", handler);\n\t\t\treturn () => window.removeEventListener(\"one-hmr-update\", handler);\n\t\t}, []);\n\t}\n\tconst { children, bodyProps, head, htmlProps } = filterRootHTML(LayoutComponent(layoutProps, forwardedRef));\n\tconst { children: headChildren, ...headProps } = head?.props || {};\n\tconst serverContext = useServerContext();\n\tlet finalChildren = children;\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!hasMetaCharset(headChildren)) console.warn(`[one] Missing <meta charSet=\"utf-8\" /> in your root _layout.tsx <head>. This can cause React hydration issues due to encoding mismatch. Add it as the first element in your <head> tag.`);\n\t}\n\tfinalChildren = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(\"head\", {\n\t\t...headProps,\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(DevHead, {}),\n\t\t\tserverContext?.cssContents?.length || serverContext?.cssInlineCount ? serverContext?.cssContents ? serverContext.cssContents.map((content, i) => content ? /* @__PURE__ */ jsx(\"style\", {\n\t\t\t\tid: `__one_css_${i}`,\n\t\t\t\tdangerouslySetInnerHTML: { __html: content }\n\t\t\t}, `inline-css-${i}`) : serverContext.css?.[i] ? /* @__PURE__ */ jsx(\"link\", {\n\t\t\t\trel: \"stylesheet\",\n\t\t\t\thref: serverContext.css[i]\n\t\t\t}, serverContext.css[i]) : null) : cachedInlineCSSElements : serverContext?.css?.map((file) => /* @__PURE__ */ jsx(\"link\", {\n\t\t\t\trel: \"stylesheet\",\n\t\t\t\thref: file\n\t\t\t}, file)),\n\t\t\t/* @__PURE__ */ jsx(ServerContextScript, {}),\n\t\t\theadChildren\n\t\t]\n\t}, \"head\"), /* @__PURE__ */ jsx(\"body\", {\n\t\tsuppressHydrationWarning: true,\n\t\t...bodyProps,\n\t\tchildren: /* @__PURE__ */ jsx(SafeAreaProvider, {\n\t\t\tinitialMetrics: SSR_SAFE_METRICS,\n\t\t\tchildren: finalChildren\n\t\t})\n\t}, \"body\")] });\n\treturn /* @__PURE__ */ jsx(\"html\", {\n\t\tsuppressHydrationWarning: true,\n\t\tlang: \"en-US\",\n\t\t...htmlProps,\n\t\tchildren: finalChildren\n\t});\n}\nfunction getSortedChildren(children, order, initialRouteName, options) {\n\tif (!order?.length) return children.sort(sortRoutesWithInitial(initialRouteName)).map((route) => ({\n\t\troute,\n\t\tprops: {}\n\t}));\n\tconst entries = [...children];\n\tconst ordered = order.map(({ name, redirect, initialParams, listeners, options: options2, getId }) => {\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\tconst matchIndex = entries.findIndex((child) => child.route === name);\n\t\tif (matchIndex === -1) {\n\t\t\tconsole.warn(`[Layout children]: No route named \"${name}\" exists in nested children:`, children.map(({ route }) => route));\n\t\t\treturn null;\n\t\t}\n\t\tconst 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: options2,\n\t\t\t\tgetId\n\t\t\t}\n\t\t};\n\t}).filter(Boolean);\n\tconst remaining = options?.remaining ?? \"all\";\n\tif (remaining !== \"none\") ordered.push(...entries.filter((route) => remaining === \"all\" || !route.generated).sort(sortRoutesWithInitial(initialRouteName)).map((route) => ({\n\t\troute,\n\t\tprops: {}\n\t})));\n\treturn ordered;\n}\nfunction useSortedScreens(order, options) {\n\tconst node = useRouteNode();\n\treturn React.useMemo(() => {\n\t\treturn (node?.children?.length ? getSortedChildren(node.children, order, node.initialRouteName, options) : []).filter((value) => {\n\t\t\tconst routeName = value.route.route;\n\t\t\tconst normalized = routeName.replace(/\\/index$/, \"\");\n\t\t\treturn !(options?.protectedScreens?.has(routeName) || options?.protectedScreens?.has(normalized));\n\t\t}).map((value) => routeToScreen(value.route, value.props));\n\t}, [\n\t\tnode?.children,\n\t\tnode?.initialRouteName,\n\t\torder,\n\t\toptions?.protectedScreens\n\t]);\n}\nfunction fromImport({ ErrorBoundary, SuspenseFallback, ...component }) {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst exported = getPageExport(component);\n\t\tif (exported && typeof exported === \"object\" && Object.keys(exported).length === 0) return {\n\t\t\tdefault: EmptyRoute,\n\t\t\tErrorBoundary,\n\t\t\tSuspenseFallback\n\t\t};\n\t}\n\treturn {\n\t\tdefault: getPageExport(component),\n\t\tErrorBoundary,\n\t\tSuspenseFallback\n\t};\n}\nfunction RouteSuspenseFallback({ component: Component, route }) {\n\tconst params = useContext(RouteParamsContext);\n\treturn Component ? /* @__PURE__ */ jsx(Component, {\n\t\troute,\n\t\tparams: params ?? {}\n\t}) : null;\n}\nconst qualifiedStore = /* @__PURE__ */ new WeakMap();\nfunction getRouteMatchesForProps() {\n\tconst serverMatches = getServerContext()?.matches ?? [];\n\tif (process.env.VITE_ENVIRONMENT === \"ssr\") return serverMatches;\n\tconst clientMatches = getClientMatchesSnapshot();\n\treturn clientMatches.length ? clientMatches : serverMatches;\n}\nfunction getQualifiedRouteComponent(value) {\n\tif (value && qualifiedStore.has(value)) return qualifiedStore.get(value);\n\tconst ScreenComponent = React.forwardRef((props, ref) => {\n\t\tif (process.env.NODE_ENV === \"development\" && true) {\n\t\t\tconst [, setHmrKey] = useState(0);\n\t\t\tuseEffect(() => {\n\t\t\t\tconst handler = () => setHmrKey((k) => k + 1);\n\t\t\t\twindow.addEventListener(\"one-hmr-update\", handler);\n\t\t\t\treturn () => window.removeEventListener(\"one-hmr-update\", handler);\n\t\t\t}, []);\n\t\t}\n\t\tif (process.env.NODE_ENV === \"development\" && false);\n\t\tconst isSpaShell = useContext(SpaShellContext);\n\t\tconst InheritedSuspenseFallback = useContext(SuspenseFallbackContext);\n\t\tconst matches = getRouteMatchesForProps();\n\t\tif (isSpaShell && props.segment !== \"\") {\n\t\t\tif (!(value.children?.length && (value.layoutRenderMode === \"ssg\" || value.layoutRenderMode === \"ssr\"))) return /* @__PURE__ */ jsx(\"div\", { \"data-one-spa-content\": \"\" });\n\t\t}\n\t\tconst res = fromImport(value.loadRoute());\n\t\tconst Component = res.default || EmptyRoute;\n\t\tconst CatchBoundary = res.ErrorBoundary;\n\t\tconst LayoutSuspenseFallback = value.type === \"layout\" ? res.SuspenseFallback : void 0;\n\t\tconst match = matches.find((match2) => match2.routeId === value.contextKey) || (!value.children?.length ? matches[matches.length - 1] : void 0);\n\t\tconst 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\tconst slotProps = {};\n\t\tif (value.slots && value.slots.size > 0) for (const [slotName] of value.slots) slotProps[slotName] = /* @__PURE__ */ jsx(NamedSlot, {\n\t\t\tname: slotName,\n\t\t\tlayoutContextKey: value.contextKey\n\t\t});\n\t\tlet rendered;\n\t\tif (props.segment === \"\") rendered = /* @__PURE__ */ 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\tconst page = /* @__PURE__ */ 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__ */ jsx(RouteErrorBoundary, {\n\t\t\t\trouteName: value.route,\n\t\t\t\tchildren: CatchBoundary ? /* @__PURE__ */ jsx(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\tconst providedSuspenseFallback = LayoutSuspenseFallback ?? InheritedSuspenseFallback;\n\t\treturn /* @__PURE__ */ jsx(SuspenseFallbackContext.Provider, {\n\t\t\tvalue: providedSuspenseFallback,\n\t\t\tchildren: LayoutSuspenseFallback ? wrapSuspense(rendered, LayoutSuspenseFallback) : rendered\n\t\t});\n\t});\n\tconst wrapSuspense = (children, SuspenseFallback) => {\n\t\tconst fallback = /* @__PURE__ */ jsx(RouteSuspenseFallback, {\n\t\t\tcomponent: SuspenseFallback,\n\t\t\troute: value.contextKey\n\t\t});\n\t\tif (process.env.ONE_SUSPEND_ROUTES === \"1\" && globalThis.__ONE_DISABLE_SUSPENSE_ROUTES__ !== true) return /* @__PURE__ */ jsx(Suspense, {\n\t\t\tfallback,\n\t\t\tchildren\n\t\t});\n\t\treturn children;\n\t};\n\tconst QualifiedRoute = React.forwardRef(({ route, navigation, ...props }, ref) => {\n\t\tconst InheritedSuspenseFallback = useContext(SuspenseFallbackContext);\n\t\treturn /* @__PURE__ */ jsx(Route, {\n\t\t\troute,\n\t\t\tnode: value,\n\t\t\tchildren: /* @__PURE__ */ jsx(Fragment, { children: wrapSuspense(/* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ 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__ */ jsx(ScrollBehaviorRouteCommit, {})] }), InheritedSuspenseFallback) })\n\t\t});\n\t});\n\tQualifiedRoute.displayName = `Route(${value.route})`;\n\tconst Memoized = memo(QualifiedRoute);\n\tqualifiedStore.set(value, Memoized);\n\treturn Memoized;\n}\nfunction createGetIdForRoute(route) {\n\tconst include = /* @__PURE__ */ new Map();\n\tif (route.dynamic) for (const segment of route.dynamic) include.set(segment.name, segment);\n\treturn ({ params = {} } = {}) => {\n\t\tconst segments = [];\n\t\tfor (const dynamic of include.values()) {\n\t\t\tconst value = params?.[dynamic.name];\n\t\t\tif (Array.isArray(value) && value.length > 0) segments.push(value.join(\"/\"));\n\t\t\telse if (value && !Array.isArray(value)) segments.push(value);\n\t\t\telse if (dynamic.deep) segments.push(`[...${dynamic.name}]`);\n\t\t\telse segments.push(`[${dynamic.name}]`);\n\t\t}\n\t\treturn segments.join(\"/\") ?? route.contextKey;\n\t};\n}\nfunction routeToScreen(route, { options, ...props } = {}) {\n\tconst navigationRouteName = getReactNavigationRouteName(route);\n\treturn /* @__PURE__ */ createElement(Screen, {\n\t\tgetId: createGetIdForRoute(route),\n\t\t...props,\n\t\tname: navigationRouteName,\n\t\tkey: navigationRouteName,\n\t\toptions: (args) => {\n\t\t\tconst staticOptions = route.generated ? route.loadRoute()?.getNavOptions : null;\n\t\t\tconst staticResult = typeof staticOptions === \"function\" ? staticOptions(args) : staticOptions;\n\t\t\tconst dynamicResult = typeof options === \"function\" ? options?.(args) : options;\n\t\t\tconst 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 = () => null;\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: () => {\n\t\t\treturn getQualifiedRouteComponent(route);\n\t\t}\n\t});\n}\nconst ROUTE_ERROR_BOUNDARY_INITIAL_STATE = {\n\thasError: false,\n\terror: null,\n\terrorInfo: null\n};\nvar RouteErrorBoundary = class extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = ROUTE_ERROR_BOUNDARY_INITIAL_STATE;\n\t}\n\tstatic getDerivedStateFromError(error) {\n\t\treturn {\n\t\t\thasError: true,\n\t\t\terror\n\t\t};\n\t}\n\tcomponentDidCatch(error, errorInfo) {\n\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\tthis.setState({ errorInfo });\n\t\tif (process.env.NODE_ENV === \"production\" && process.env.ONE_SKEW_PROTECTION !== \"false\") if (isChunkLoadError(error)) handleSkewError();\n\t\telse checkSkewAndReload();\n\t}\n\tclearError() {\n\t\tthis.setState(ROUTE_ERROR_BOUNDARY_INITIAL_STATE);\n\t}\n\trender() {\n\t\tif (this.state.hasError) {\n\t\t\tconst { error, errorInfo } = this.state;\n\t\t\treturn /* @__PURE__ */ jsx(RouteErrorView, {\n\t\t\t\trouteName: this.props.routeName,\n\t\t\t\terror,\n\t\t\t\terrorInfo,\n\t\t\t\tonRetry: this.clearError.bind(this)\n\t\t\t});\n\t\t}\n\t\treturn this.props.children;\n\t}\n};\n\nexport { Group, Screen, createGetIdForRoute, getQualifiedRouteComponent, useSortedScreens };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAS,eAAe,UAAU;CACjC,IAAI,QAAQ,IAAI,aAAa,eAAe;EAC3C,IAAI,CAAC,UAAU,OAAO;EACtB,MAAM,gBAAgB,UAAU;GAC/B,IAAI,CAAC,MAAM,eAAe,KAAK,GAAG,OAAO;GACzC,IAAI,MAAM,SAAS,QAAQ;IAC1B,MAAM,QAAQ,MAAM;IACpB,IAAI,aAAa,SAAS,aAAa,OAAO,OAAO;GACtD;GACA,MAAM,aAAa,MAAM;GACzB,IAAI,WAAW,UAAU,OAAO,eAAe,WAAW,QAAQ;GAClE,OAAO;EACR;EACA,IAAI,MAAM,QAAQ,QAAQ,GAAG,OAAO,SAAS,KAAK,YAAY;EAC9D,OAAO,aAAa,QAAQ;CAC7B;CACA,OAAO;AACR;AACA,MAAM,EAAE,QAAQ,UAAU,uBAAuB,CAAC,CAAC,CAAC,CAAC;AACrD,MAAM,0BAA0B,OAAO,aAAa,eAAe,OAAO,SAAS,qBAAqB,oBAAoB;CAC3H,MAAM,WAAW,CAAC;CAClB,SAAS,iBAAiB,mEAAmE,CAAC,CAAC,SAAS,IAAI,MAAM;EACjH,IAAI,GAAG,YAAY,SAAS,SAAS,KAAqB,oBAAI,SAAS;GACtE,IAAI,GAAG;GACP,yBAAyB,EAAE,QAAQ,GAAG,UAAU;EACjD,GAAG,cAAc,GAAG,CAAC;OAChB;GACJ,MAAM,OAAO,GAAG,aAAa,MAAM;GACnC,SAAS,KAAqB,oBAAI,QAAQ;IACzC,KAAK;IACL;IACA,gBAAgB;GACjB,GAAG,IAAI,CAAC;EACT;CACD,CAAC;CACD,OAAO;AACR,EAAC,CAAE,IAAI,CAAC;AACR,MAAM,m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["import { createNavigatorFactory } from \"@react-navigation/core\";\nimport React, { Suspense, createElement, memo, useContext, useEffect, useState } from \"react\";\nimport { SafeAreaProvider } from \"../safe-area-context\";\nimport { ServerContextScript } from \"../server/ServerContextScript\";\nimport { checkSkewAndReload } from \"../skewProtection\";\nimport { getClientMatchesSnapshot } from \"../useMatches\";\nimport { handleSkewError, isChunkLoadError } from \"../utils/dynamicImport\";\nimport { getPageExport } from \"../utils/getPageExport\";\nimport { EmptyRoute } from \"../views/EmptyRoute\";\nimport { NamedSlot } from \"../views/Navigator\";\nimport { RouteErrorView } from \"../views/RouteErrorView\";\nimport { Try } from \"../views/Try\";\nimport { ScrollBehaviorRouteCommit } from \"../views/ScrollBehavior\";\nimport { DevHead } from \"../vite/DevHead\";\nimport { getServerContext, useServerContext } from \"../vite/one-server-only\";\nimport { getReactNavigationRouteName } from \"../getReactNavigationConfig\";\nimport { filterRootHTML } from \"./filterRootHTML\";\nimport { Route, RouteParamsContext, SuspenseFallbackContext, useRouteNode } from \"./Route\";\nimport { SpaShellContext } from \"./SpaShellContext\";\nimport { sortRoutesWithInitial } from \"./sortRoutes\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\n\nfunction hasMetaCharset(children) {\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!children) return false;\n\t\tconst checkElement = (child) => {\n\t\t\tif (!React.isValidElement(child)) return false;\n\t\t\tif (child.type === \"meta\") {\n\t\t\t\tconst props = child.props;\n\t\t\t\tif (\"charSet\" in props || \"charset\" in props) return true;\n\t\t\t}\n\t\t\tconst 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}\nconst { Screen, Group } = createNavigatorFactory({})();\nconst cachedInlineCSSElements = typeof document !== \"undefined\" && typeof document.querySelectorAll === \"function\" ? (() => {\n\tconst elements = [];\n\tdocument.querySelectorAll(\"style[id^=\\\"__one_css_\\\"], link[rel=\\\"stylesheet\\\"][data-one-css]\").forEach((el, i) => {\n\t\tif (el.tagName === \"STYLE\") elements.push(/* @__PURE__ */ 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\tconst href = el.getAttribute(\"href\");\n\t\t\telements.push(/* @__PURE__ */ 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})() : [];\nconst SSR_SAFE_METRICS = {\n\tframe: {\n\t\tx: 0,\n\t\ty: 0,\n\t\twidth: 0,\n\t\theight: 0\n\t},\n\tinsets: {\n\t\ttop: 0,\n\t\tleft: 0,\n\t\tright: 0,\n\t\tbottom: 0\n\t}\n};\nfunction RootLayoutRenderer({ LayoutComponent, layoutProps, forwardedRef }) {\n\tif (process.env.NODE_ENV === \"development\" && true) {\n\t\tconst [, setHmrKey] = useState(0);\n\t\tuseEffect(() => {\n\t\t\tconst handler = () => setHmrKey((k) => k + 1);\n\t\t\twindow.addEventListener(\"one-hmr-update\", handler);\n\t\t\treturn () => window.removeEventListener(\"one-hmr-update\", handler);\n\t\t}, []);\n\t}\n\tconst { children, bodyProps, head, htmlProps } = filterRootHTML(LayoutComponent(layoutProps, forwardedRef));\n\tconst { children: headChildren, ...headProps } = head?.props || {};\n\tconst serverContext = useServerContext();\n\tlet finalChildren = children;\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!hasMetaCharset(headChildren)) console.warn(`[one] Missing <meta charSet=\"utf-8\" /> in your root _layout.tsx <head>. This can cause React hydration issues due to encoding mismatch. Add it as the first element in your <head> tag.`);\n\t}\n\tfinalChildren = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(\"head\", {\n\t\t...headProps,\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(DevHead, {}),\n\t\t\tserverContext?.cssContents?.length || serverContext?.cssInlineCount ? serverContext?.cssContents ? serverContext.cssContents.map((content, i) => content ? /* @__PURE__ */ jsx(\"style\", {\n\t\t\t\tid: `__one_css_${i}`,\n\t\t\t\tdangerouslySetInnerHTML: { __html: content }\n\t\t\t}, `inline-css-${i}`) : serverContext.css?.[i] ? /* @__PURE__ */ jsx(\"link\", {\n\t\t\t\trel: \"stylesheet\",\n\t\t\t\thref: serverContext.css[i]\n\t\t\t}, serverContext.css[i]) : null) : cachedInlineCSSElements : serverContext?.css?.map((file) => /* @__PURE__ */ jsx(\"link\", {\n\t\t\t\trel: \"stylesheet\",\n\t\t\t\thref: file\n\t\t\t}, file)),\n\t\t\t/* @__PURE__ */ jsx(ServerContextScript, {}),\n\t\t\theadChildren\n\t\t]\n\t}, \"head\"), /* @__PURE__ */ jsx(\"body\", {\n\t\tsuppressHydrationWarning: true,\n\t\t...bodyProps,\n\t\tchildren: /* @__PURE__ */ jsx(SafeAreaProvider, {\n\t\t\tinitialMetrics: SSR_SAFE_METRICS,\n\t\t\tchildren: finalChildren\n\t\t})\n\t}, \"body\")] });\n\treturn /* @__PURE__ */ jsx(\"html\", {\n\t\tsuppressHydrationWarning: true,\n\t\tlang: \"en-US\",\n\t\t...htmlProps,\n\t\tchildren: finalChildren\n\t});\n}\nfunction getSortedChildren(children, order, initialRouteName, options) {\n\tif (!order?.length) return children.sort(sortRoutesWithInitial(initialRouteName)).map((route) => ({\n\t\troute,\n\t\tprops: {}\n\t}));\n\tconst entries = [...children];\n\tconst ordered = order.map(({ name, redirect, initialParams, listeners, options: options2, getId }) => {\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\tconst matchIndex = entries.findIndex((child) => child.route === name);\n\t\tif (matchIndex === -1) {\n\t\t\tconsole.warn(`[Layout children]: No route named \"${name}\" exists in nested children:`, children.map(({ route }) => route));\n\t\t\treturn null;\n\t\t}\n\t\tconst 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: options2,\n\t\t\t\tgetId\n\t\t\t}\n\t\t};\n\t}).filter(Boolean);\n\tconst remaining = options?.remaining ?? \"all\";\n\tif (remaining !== \"none\") ordered.push(...entries.filter((route) => remaining === \"all\" || !route.generated).sort(sortRoutesWithInitial(initialRouteName)).map((route) => ({\n\t\troute,\n\t\tprops: {}\n\t})));\n\treturn ordered;\n}\nfunction useSortedScreens(order, options) {\n\tconst node = useRouteNode();\n\treturn React.useMemo(() => {\n\t\treturn (node?.children?.length ? getSortedChildren(node.children, order, node.initialRouteName, options) : []).filter((value) => {\n\t\t\tconst routeName = value.route.route;\n\t\t\tconst normalized = routeName.replace(/\\/index$/, \"\");\n\t\t\treturn !(options?.protectedScreens?.has(routeName) || options?.protectedScreens?.has(normalized));\n\t\t}).map((value) => routeToScreen(value.route, value.props));\n\t}, [\n\t\tnode?.children,\n\t\tnode?.initialRouteName,\n\t\torder,\n\t\toptions?.protectedScreens\n\t]);\n}\nfunction fromImport({ ErrorBoundary, SuspenseFallback, ...component }) {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst exported = getPageExport(component);\n\t\tif (exported && typeof exported === \"object\" && Object.keys(exported).length === 0) return {\n\t\t\tdefault: EmptyRoute,\n\t\t\tErrorBoundary,\n\t\t\tSuspenseFallback\n\t\t};\n\t}\n\treturn {\n\t\tdefault: getPageExport(component),\n\t\tErrorBoundary,\n\t\tSuspenseFallback\n\t};\n}\nfunction RouteSuspenseFallback({ component: Component, route }) {\n\tconst params = useContext(RouteParamsContext);\n\treturn Component ? /* @__PURE__ */ jsx(Component, {\n\t\troute,\n\t\tparams: params ?? {}\n\t}) : null;\n}\nconst qualifiedStore = /* @__PURE__ */ new WeakMap();\nfunction getRouteMatchesForProps() {\n\tconst serverMatches = getServerContext()?.matches ?? [];\n\tif (process.env.VITE_ENVIRONMENT === \"ssr\") return serverMatches;\n\tconst clientMatches = getClientMatchesSnapshot();\n\treturn clientMatches.length ? clientMatches : serverMatches;\n}\nfunction getQualifiedRouteComponent(value) {\n\tif (value && qualifiedStore.has(value)) return qualifiedStore.get(value);\n\tconst ScreenComponent = React.forwardRef((props, ref) => {\n\t\tif (process.env.NODE_ENV === \"development\" && true) {\n\t\t\tconst [, setHmrKey] = useState(0);\n\t\t\tuseEffect(() => {\n\t\t\t\tconst handler = () => setHmrKey((k) => k + 1);\n\t\t\t\twindow.addEventListener(\"one-hmr-update\", handler);\n\t\t\t\treturn () => window.removeEventListener(\"one-hmr-update\", handler);\n\t\t\t}, []);\n\t\t}\n\t\tif (process.env.NODE_ENV === \"development\" && false);\n\t\tconst isSpaShell = useContext(SpaShellContext);\n\t\tconst InheritedSuspenseFallback = useContext(SuspenseFallbackContext);\n\t\tconst matches = getRouteMatchesForProps();\n\t\tif (isSpaShell && props.segment !== \"\") {\n\t\t\tif (!(value.children?.length && (value.layoutRenderMode === \"ssg\" || value.layoutRenderMode === \"ssr\"))) return /* @__PURE__ */ jsx(\"div\", { \"data-one-spa-content\": \"\" });\n\t\t}\n\t\tconst res = fromImport(value.loadRoute());\n\t\tconst Component = res.default || EmptyRoute;\n\t\tconst CatchBoundary = res.ErrorBoundary;\n\t\tconst LayoutSuspenseFallback = value.type === \"layout\" ? res.SuspenseFallback : void 0;\n\t\tconst match = matches.find((match2) => match2.routeId === value.contextKey) || (!value.children?.length ? matches[matches.length - 1] : void 0);\n\t\tconst 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\tconst slotProps = {};\n\t\tif (value.slots && value.slots.size > 0) for (const [slotName] of value.slots) slotProps[slotName] = /* @__PURE__ */ jsx(NamedSlot, {\n\t\t\tname: slotName,\n\t\t\tlayoutContextKey: value.contextKey\n\t\t});\n\t\tlet rendered;\n\t\tif (props.segment === \"\") rendered = /* @__PURE__ */ 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\tconst page = /* @__PURE__ */ 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__ */ jsx(RouteErrorBoundary, {\n\t\t\t\trouteName: value.route,\n\t\t\t\tchildren: CatchBoundary ? /* @__PURE__ */ jsx(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\tconst providedSuspenseFallback = LayoutSuspenseFallback ?? InheritedSuspenseFallback;\n\t\treturn /* @__PURE__ */ jsx(SuspenseFallbackContext.Provider, {\n\t\t\tvalue: providedSuspenseFallback,\n\t\t\tchildren: LayoutSuspenseFallback ? wrapSuspense(rendered, LayoutSuspenseFallback) : rendered\n\t\t});\n\t});\n\tconst wrapSuspense = (children, SuspenseFallback) => {\n\t\tconst fallback = /* @__PURE__ */ jsx(RouteSuspenseFallback, {\n\t\t\tcomponent: SuspenseFallback,\n\t\t\troute: value.contextKey\n\t\t});\n\t\tif (process.env.ONE_SUSPEND_ROUTES === \"1\" && globalThis.__ONE_DISABLE_SUSPENSE_ROUTES__ !== true) return /* @__PURE__ */ jsx(Suspense, {\n\t\t\tfallback,\n\t\t\tchildren\n\t\t});\n\t\treturn children;\n\t};\n\tconst QualifiedRoute = React.forwardRef(({ route, navigation, ...props }, ref) => {\n\t\tconst InheritedSuspenseFallback = useContext(SuspenseFallbackContext);\n\t\treturn /* @__PURE__ */ jsx(Route, {\n\t\t\troute,\n\t\t\tnode: value,\n\t\t\tchildren: /* @__PURE__ */ jsx(Fragment, { children: wrapSuspense(/* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ 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__ */ jsx(ScrollBehaviorRouteCommit, {})] }), InheritedSuspenseFallback) })\n\t\t});\n\t});\n\tQualifiedRoute.displayName = `Route(${value.route})`;\n\tconst Memoized = memo(QualifiedRoute);\n\tqualifiedStore.set(value, Memoized);\n\treturn Memoized;\n}\nfunction createGetIdForRoute(route) {\n\tconst include = /* @__PURE__ */ new Map();\n\tif (route.dynamic) for (const segment of route.dynamic) include.set(segment.name, segment);\n\treturn ({ params = {} } = {}) => {\n\t\tconst segments = [];\n\t\tfor (const dynamic of include.values()) {\n\t\t\tconst value = params?.[dynamic.name];\n\t\t\tif (Array.isArray(value) && value.length > 0) segments.push(value.join(\"/\"));\n\t\t\telse if (value && !Array.isArray(value)) segments.push(value);\n\t\t\telse if (dynamic.deep) segments.push(`[...${dynamic.name}]`);\n\t\t\telse segments.push(`[${dynamic.name}]`);\n\t\t}\n\t\treturn segments.join(\"/\") ?? route.contextKey;\n\t};\n}\nfunction routeToScreen(route, { options, ...props } = {}) {\n\tconst navigationRouteName = getReactNavigationRouteName(route);\n\treturn /* @__PURE__ */ createElement(Screen, {\n\t\t...props,\n\t\tgetId: props.getId ?? createGetIdForRoute(route),\n\t\tname: navigationRouteName,\n\t\tkey: navigationRouteName,\n\t\toptions: (args) => {\n\t\t\tconst staticOptions = route.generated ? route.loadRoute()?.getNavOptions : null;\n\t\t\tconst staticResult = typeof staticOptions === \"function\" ? staticOptions(args) : staticOptions;\n\t\t\tconst dynamicResult = typeof options === \"function\" ? options?.(args) : options;\n\t\t\tconst 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 = () => null;\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: () => {\n\t\t\treturn getQualifiedRouteComponent(route);\n\t\t}\n\t});\n}\nconst ROUTE_ERROR_BOUNDARY_INITIAL_STATE = {\n\thasError: false,\n\terror: null,\n\terrorInfo: null\n};\nvar RouteErrorBoundary = class extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = ROUTE_ERROR_BOUNDARY_INITIAL_STATE;\n\t}\n\tstatic getDerivedStateFromError(error) {\n\t\treturn {\n\t\t\thasError: true,\n\t\t\terror\n\t\t};\n\t}\n\tcomponentDidCatch(error, errorInfo) {\n\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\tthis.setState({ errorInfo });\n\t\tif (process.env.NODE_ENV === \"production\" && process.env.ONE_SKEW_PROTECTION !== \"false\") if (isChunkLoadError(error)) handleSkewError();\n\t\telse checkSkewAndReload();\n\t}\n\tclearError() {\n\t\tthis.setState(ROUTE_ERROR_BOUNDARY_INITIAL_STATE);\n\t}\n\trender() {\n\t\tif (this.state.hasError) {\n\t\t\tconst { error, errorInfo } = this.state;\n\t\t\treturn /* @__PURE__ */ jsx(RouteErrorView, {\n\t\t\t\trouteName: this.props.routeName,\n\t\t\t\terror,\n\t\t\t\terrorInfo,\n\t\t\t\tonRetry: this.clearError.bind(this)\n\t\t\t});\n\t\t}\n\t\treturn this.props.children;\n\t}\n};\n\nexport { Group, Screen, createGetIdForRoute, getQualifiedRouteComponent, useSortedScreens };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAS,eAAe,UAAU;CACjC,IAAI,QAAQ,IAAI,aAAa,eAAe;EAC3C,IAAI,CAAC,UAAU,OAAO;EACtB,MAAM,gBAAgB,UAAU;GAC/B,IAAI,CAAC,MAAM,eAAe,KAAK,GAAG,OAAO;GACzC,IAAI,MAAM,SAAS,QAAQ;IAC1B,MAAM,QAAQ,MAAM;IACpB,IAAI,aAAa,SAAS,aAAa,OAAO,OAAO;GACtD;GACA,MAAM,aAAa,MAAM;GACzB,IAAI,WAAW,UAAU,OAAO,eAAe,WAAW,QAAQ;GAClE,OAAO;EACR;EACA,IAAI,MAAM,QAAQ,QAAQ,GAAG,OAAO,SAAS,KAAK,YAAY;EAC9D,OAAO,aAAa,QAAQ;CAC7B;CACA,OAAO;AACR;AACA,MAAM,EAAE,QAAQ,UAAU,uBAAuB,CAAC,CAAC,CAAC,CAAC;AACrD,MAAM,0BAA0B,OAAO,aAAa,eAAe,OAAO,SAAS,qBAAqB,oBAAoB;CAC3H,MAAM,WAAW,CAAC;CAClB,SAAS,iBAAiB,mEAAmE,CAAC,CAAC,SAAS,IAAI,MAAM;EACjH,IAAI,GAAG,YAAY,SAAS,SAAS,KAAqB,oBAAI,SAAS;GACtE,IAAI,GAAG;GACP,yBAAyB,EAAE,QAAQ,GAAG,UAAU;EACjD,GAAG,cAAc,GAAG,CAAC;OAChB;GACJ,MAAM,OAAO,GAAG,aAAa,MAAM;GACnC,SAAS,KAAqB,oBAAI,QAAQ;IACzC,KAAK;IACL;IACA,gBAAgB;GACjB,GAAG,IAAI,CAAC;EACT;CACD,CAAC;CACD,OAAO;AACR,EAAC,CAAE,IAAI,CAAC;AACR,MAAM,mBAAmB;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
370
370
|
function routeToScreen(route) {
|
|
371
371
|
var { options, ...props } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
372
|
+
var _props_getId;
|
|
372
373
|
var navigationRouteName = getReactNavigationRouteName(route);
|
|
373
374
|
return /* @__PURE__ */ createElement(Screen, {
|
|
374
|
-
getId: createGetIdForRoute(route),
|
|
375
375
|
...props,
|
|
376
|
+
getId: (_props_getId = props.getId) !== null && _props_getId !== void 0 ? _props_getId : createGetIdForRoute(route),
|
|
376
377
|
name: navigationRouteName,
|
|
377
378
|
key: navigationRouteName,
|
|
378
379
|
options: function options1(args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScreens.native.js","names":[],"sources":["esm/router/useScreens.native.js"],"sourcesContent":["import { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport React, { Suspense, createElement, memo, useContext } from \"react\";\nimport { createNavigatorFactory } from \"@react-navigation/core\";\nimport { getClientMatchesSnapshot } from \"../useMatches\";\nimport { getPageExport } from \"../utils/getPageExport\";\nimport { EmptyRoute } from \"../views/EmptyRoute\";\nimport { NamedSlot } from \"../views/Navigator\";\nimport { RouteErrorView } from \"../views/RouteErrorView\";\nimport { Try } from \"../views/Try\";\nimport { ScrollBehaviorRouteCommit } from \"../views/ScrollBehavior\";\nimport { getServerContext, useServerContext } from \"../vite/one-server-only\";\nimport { getReactNavigationRouteName } from \"../getReactNavigationConfig\";\nimport { filterRootHTML } from \"./filterRootHTML\";\nimport { Route, RouteParamsContext, SuspenseFallbackContext, useRouteNode } from \"./Route\";\nimport { getRouteHmrEpoch, subscribeRouteHmr } from \"./routeHmr\";\nimport { SpaShellContext } from \"./SpaShellContext\";\nimport { sortRoutesWithInitial } from \"./sortRoutes\";\n\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}\nvar { Screen, Group } = createNavigatorFactory({})();\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__ */ 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__ */ 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 { children, bodyProps, head, htmlProps } = filterRootHTML(LayoutComponent(layoutProps, forwardedRef));\n\tvar { children: headChildren, ...headProps } = (head === null || head === void 0 ? void 0 : head.props) || {};\n\tuseServerContext();\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(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(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 = useRouteNode();\n\treturn React.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 = getPageExport(component);\n\t\tif (exported && typeof exported === \"object\" && Object.keys(exported).length === 0) return {\n\t\t\tdefault: EmptyRoute,\n\t\t\tErrorBoundary,\n\t\t\tSuspenseFallback\n\t\t};\n\t}\n\treturn {\n\t\tdefault: getPageExport(component),\n\t\tErrorBoundary,\n\t\tSuspenseFallback\n\t};\n}\nfunction RouteSuspenseFallback(param) {\n\tvar { component: Component, route } = param;\n\tvar params = useContext(RouteParamsContext);\n\treturn Component ? /* @__PURE__ */ 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 = 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 = 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__ */ React.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) React.useSyncExternalStore(subscribeRouteHmr, getRouteHmrEpoch, getRouteHmrEpoch);\n\t\tvar isSpaShell = useContext(SpaShellContext);\n\t\tvar InheritedSuspenseFallback = useContext(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__ */ jsx(\"div\", { \"data-one-spa-content\": \"\" });\n\t\t}\n\t\tvar res = fromImport(value.loadRoute());\n\t\tvar Component = res.default || 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__ */ jsx(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__ */ 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__ */ 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__ */ jsx(RouteErrorBoundary, {\n\t\t\t\trouteName: value.route,\n\t\t\t\tchildren: CatchBoundary ? /* @__PURE__ */ jsx(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__ */ jsx(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__ */ 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__ */ jsx(Suspense, {\n\t\t\tfallback,\n\t\t\tchildren\n\t\t});\n\t};\n\tvar QualifiedRoute = /* @__PURE__ */ React.forwardRef(function(param, ref) {\n\t\tvar { route, navigation, ...props } = param;\n\t\tvar InheritedSuspenseFallback = useContext(SuspenseFallbackContext);\n\t\treturn /* @__PURE__ */ jsx(Route, {\n\t\t\troute,\n\t\t\tnode: value,\n\t\t\tchildren: /* @__PURE__ */ jsx(Fragment, { children: wrapSuspense(/* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ 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__ */ jsx(ScrollBehaviorRouteCommit, {})] }), InheritedSuspenseFallback) })\n\t\t});\n\t});\n\tQualifiedRoute.displayName = `Route(${value.route})`;\n\tvar Memoized = /* @__PURE__ */ 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 = getReactNavigationRouteName(route);\n\treturn /* @__PURE__ */ 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__ */ jsx(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})(React.Component);\n\nexport { Group, Screen, createGetIdForRoute, getQualifiedRouteComponent, useSortedScreens };"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,SAAS,yBAAyB,MAAM;CACvC,IAAI,SAAS,KAAK,GAAG,MAAM,IAAI,eAAe,2DAA2D;CACzG,OAAO;AACR;AACA,SAAS,YAAY,OAAO,SAAS,MAAM;CAC1C,UAAU,kBAAkB,OAAO;CACnC,OAAO,6BAA6B,OAAO,6BAA6B,IAAI,QAAQ,UAAU,SAAS,QAAQ,CAAC,GAAG,kBAAkB,KAAK,CAAC,CAAC,WAAW,IAAI,QAAQ,MAAM,OAAO,IAAI,CAAC;AACtL;AACA,SAAS,kBAAkB,UAAU,aAAa;CACjD,IAAI,EAAE,oBAAoB,cAAc,MAAM,IAAI,UAAU,mCAAmC;AAChG;AACA,SAAS,kBAAkB,QAAQ,OAAO;CACzC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;EACtC,IAAI,aAAa,MAAM;EACvB,WAAW,aAAa,WAAW,cAAc;EACjD,WAAW,eAAe;EAC1B,IAAI,WAAW,YAAY,WAAW,WAAW;EACjD,OAAO,eAAe,QAAQ,WAAW,KAAK,UAAU;CACzD;AACD;AACA,SAAS,cAAc,aAAa,YAAY,aAAa;CAC5D,IAAI,YAAY,kBAAkB,YAA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AkB,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,oBAAI,gBAAgB;MAC1C,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,MAAM,SAAS"}
|
|
1
|
+
{"version":3,"file":"useScreens.native.js","names":[],"sources":["esm/router/useScreens.native.js"],"sourcesContent":["import { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport React, { Suspense, createElement, memo, useContext } from \"react\";\nimport { createNavigatorFactory } from \"@react-navigation/core\";\nimport { getClientMatchesSnapshot } from \"../useMatches\";\nimport { getPageExport } from \"../utils/getPageExport\";\nimport { EmptyRoute } from \"../views/EmptyRoute\";\nimport { NamedSlot } from \"../views/Navigator\";\nimport { RouteErrorView } from \"../views/RouteErrorView\";\nimport { Try } from \"../views/Try\";\nimport { ScrollBehaviorRouteCommit } from \"../views/ScrollBehavior\";\nimport { getServerContext, useServerContext } from \"../vite/one-server-only\";\nimport { getReactNavigationRouteName } from \"../getReactNavigationConfig\";\nimport { filterRootHTML } from \"./filterRootHTML\";\nimport { Route, RouteParamsContext, SuspenseFallbackContext, useRouteNode } from \"./Route\";\nimport { getRouteHmrEpoch, subscribeRouteHmr } from \"./routeHmr\";\nimport { SpaShellContext } from \"./SpaShellContext\";\nimport { sortRoutesWithInitial } from \"./sortRoutes\";\n\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}\nvar { Screen, Group } = createNavigatorFactory({})();\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__ */ 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__ */ 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 { children, bodyProps, head, htmlProps } = filterRootHTML(LayoutComponent(layoutProps, forwardedRef));\n\tvar { children: headChildren, ...headProps } = (head === null || head === void 0 ? void 0 : head.props) || {};\n\tuseServerContext();\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(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(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 = useRouteNode();\n\treturn React.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 = getPageExport(component);\n\t\tif (exported && typeof exported === \"object\" && Object.keys(exported).length === 0) return {\n\t\t\tdefault: EmptyRoute,\n\t\t\tErrorBoundary,\n\t\t\tSuspenseFallback\n\t\t};\n\t}\n\treturn {\n\t\tdefault: getPageExport(component),\n\t\tErrorBoundary,\n\t\tSuspenseFallback\n\t};\n}\nfunction RouteSuspenseFallback(param) {\n\tvar { component: Component, route } = param;\n\tvar params = useContext(RouteParamsContext);\n\treturn Component ? /* @__PURE__ */ 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 = 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 = 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__ */ React.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) React.useSyncExternalStore(subscribeRouteHmr, getRouteHmrEpoch, getRouteHmrEpoch);\n\t\tvar isSpaShell = useContext(SpaShellContext);\n\t\tvar InheritedSuspenseFallback = useContext(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__ */ jsx(\"div\", { \"data-one-spa-content\": \"\" });\n\t\t}\n\t\tvar res = fromImport(value.loadRoute());\n\t\tvar Component = res.default || 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__ */ jsx(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__ */ 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__ */ 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__ */ jsx(RouteErrorBoundary, {\n\t\t\t\trouteName: value.route,\n\t\t\t\tchildren: CatchBoundary ? /* @__PURE__ */ jsx(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__ */ jsx(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__ */ 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__ */ jsx(Suspense, {\n\t\t\tfallback,\n\t\t\tchildren\n\t\t});\n\t};\n\tvar QualifiedRoute = /* @__PURE__ */ React.forwardRef(function(param, ref) {\n\t\tvar { route, navigation, ...props } = param;\n\t\tvar InheritedSuspenseFallback = useContext(SuspenseFallbackContext);\n\t\treturn /* @__PURE__ */ jsx(Route, {\n\t\t\troute,\n\t\t\tnode: value,\n\t\t\tchildren: /* @__PURE__ */ jsx(Fragment, { children: wrapSuspense(/* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ 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__ */ jsx(ScrollBehaviorRouteCommit, {})] }), InheritedSuspenseFallback) })\n\t\t});\n\t});\n\tQualifiedRoute.displayName = `Route(${value.route})`;\n\tvar Memoized = /* @__PURE__ */ 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 = getReactNavigationRouteName(route);\n\treturn /* @__PURE__ */ 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__ */ jsx(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})(React.Component);\n\nexport { Group, Screen, createGetIdForRoute, getQualifiedRouteComponent, useSortedScreens };"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,SAAS,yBAAyB,MAAM;CACvC,IAAI,SAAS,KAAK,GAAG,MAAM,IAAI,eAAe,2DAA2D;CACzG,OAAO;AACR;AACA,SAAS,YAAY,OAAO,SAAS,MAAM;CAC1C,UAAU,kBAAkB,OAAO;CACnC,OAAO,6BAA6B,OAAO,6BAA6B,IAAI,QAAQ,UAAU,SAAS,QAAQ,CAAC,GAAG,kBAAkB,KAAK,CAAC,CAAC,WAAW,IAAI,QAAQ,MAAM,OAAO,IAAI,CAAC;AACtL;AACA,SAAS,kBAAkB,UAAU,aAAa;CACjD,IAAI,EAAE,oBAAoB,cAAc,MAAM,IAAI,UAA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AS,eAAe;GACrC,OAAO,2BAA2B,KAAK;EACxC;CACD,CAAC;AACF;AACA,IAAI,qCAAqC;CACxC,UAAU;CACV,OAAO;CACP,WAAW;AACZ;AACA,IAAI,qBAAqC,iBAAC,SAAS,kBAAkB;CACpE;CACA,UAAU,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,oBAAI,gBAAgB;MAC1C,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,MAAM,SAAS"}
|
|
@@ -165,7 +165,7 @@ private struct ActionTabHook: UIViewRepresentable {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
//
|
|
168
|
+
// navigation and tab bars follow the scroll view named for their top and bottom edges.
|
|
169
169
|
// SwiftUI names the ScrollViews it draws itself, but a React Native ScrollView is a UIScrollView
|
|
170
170
|
// inside a representable it cannot see, so the page's first scroll view is named on every
|
|
171
171
|
// controller from the page's root up to the tab bar controller.
|
|
@@ -173,6 +173,7 @@ private func nameContentScrollView(of page: UIView, from controller: UIViewContr
|
|
|
173
173
|
guard let scrollView = firstScrollView(in: page) else { return }
|
|
174
174
|
var next: UIViewController? = controller
|
|
175
175
|
while let current = next, current !== tabBarController {
|
|
176
|
+
if current.contentScrollView(for: .top) !== scrollView { current.setContentScrollView(scrollView, for: .top) }
|
|
176
177
|
if current.contentScrollView(for: .bottom) !== scrollView { current.setContentScrollView(scrollView, for: .bottom) }
|
|
177
178
|
next = current.parent
|
|
178
179
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "one",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.10",
|
|
4
4
|
"description": "One is a React framework for web, iOS, and Android apps.",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"sideEffects": [
|
|
@@ -282,15 +282,15 @@
|
|
|
282
282
|
"@react-navigation/routers": "8.0.0-alpha.21",
|
|
283
283
|
"@rozenite/middleware": "^2.5.0",
|
|
284
284
|
"@ungap/structured-clone": "^1.2.0",
|
|
285
|
-
"@vxrn/color-scheme": "2.13.
|
|
286
|
-
"@vxrn/compiler": "2.13.
|
|
287
|
-
"@vxrn/resolve": "2.13.
|
|
288
|
-
"@vxrn/tslib-lite": "2.13.
|
|
289
|
-
"@vxrn/use-isomorphic-layout-effect": "2.13.
|
|
290
|
-
"@vxrn/utils": "2.13.
|
|
285
|
+
"@vxrn/color-scheme": "2.13.10",
|
|
286
|
+
"@vxrn/compiler": "2.13.10",
|
|
287
|
+
"@vxrn/resolve": "2.13.10",
|
|
288
|
+
"@vxrn/tslib-lite": "2.13.10",
|
|
289
|
+
"@vxrn/use-isomorphic-layout-effect": "2.13.10",
|
|
290
|
+
"@vxrn/utils": "2.13.10",
|
|
291
291
|
"citty": "^0.1.6",
|
|
292
292
|
"core-js": "^3.38.1",
|
|
293
|
-
"create-vxrn": "2.13.
|
|
293
|
+
"create-vxrn": "2.13.10",
|
|
294
294
|
"escape-string-regexp": "^5.0.0",
|
|
295
295
|
"fast-deep-equal": "^3.1.3",
|
|
296
296
|
"fast-glob": "^3.3.3",
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
"tsconfig-paths": "^4",
|
|
313
313
|
"use-latest-callback": "^0.3.5",
|
|
314
314
|
"vite": "^8.2.2",
|
|
315
|
-
"vxrn": "2.13.
|
|
315
|
+
"vxrn": "2.13.10",
|
|
316
316
|
"web-streams-polyfill": "^4.3.0",
|
|
317
317
|
"ws": "^8.21.0",
|
|
318
318
|
"xxhashjs": "^0.2.2"
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
"@babel/types": "^7.28.5",
|
|
343
343
|
"babel-dead-code-elimination": "1.0.10",
|
|
344
344
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
345
|
-
"@vxrn/vite-plugin-metro": "2.13.
|
|
345
|
+
"@vxrn/vite-plugin-metro": "2.13.10"
|
|
346
346
|
},
|
|
347
347
|
"peerDependenciesMeta": {
|
|
348
348
|
"@react-native/babel-preset": {
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
"@types/react-dom": "^19.3.0",
|
|
417
417
|
"@types/react-test-renderer": "^19.1.0",
|
|
418
418
|
"@types/xxhashjs": "^0.2.4",
|
|
419
|
-
"@vxrn/emitter": "2.13.
|
|
419
|
+
"@vxrn/emitter": "2.13.10",
|
|
420
420
|
"depcheck": "^1.4.7",
|
|
421
421
|
"esbuild": "^0.25.12",
|
|
422
422
|
"immer": "^10.1.1",
|
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
"@babel/types": "^7.28.5",
|
|
445
445
|
"babel-dead-code-elimination": "1.0.10",
|
|
446
446
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
447
|
-
"@vxrn/vite-plugin-metro": "2.13.
|
|
447
|
+
"@vxrn/vite-plugin-metro": "2.13.10"
|
|
448
448
|
},
|
|
449
449
|
"publishConfig": {
|
|
450
450
|
"access": "public"
|
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
},
|
|
615
|
-
"releaseSourceCommit": "
|
|
615
|
+
"releaseSourceCommit": "10ae059cc30ab9f70a12d9711ba8346d596d61d2",
|
|
616
616
|
"repository": {
|
|
617
617
|
"type": "git",
|
|
618
618
|
"url": "git+https://github.com/onejs/one.git",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs'
|
|
2
2
|
import os from 'node:os'
|
|
3
3
|
import path from 'node:path'
|
|
4
|
+
import { createRequire } from 'node:module'
|
|
4
5
|
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
5
6
|
import { getViteMetroPluginOptions } from './getViteMetroPluginOptions'
|
|
6
7
|
|
|
@@ -37,9 +38,7 @@ describe('getViteMetroPluginOptions babel-config coexistence', () => {
|
|
|
37
38
|
projectRoot: isolatedApp,
|
|
38
39
|
relativeRouterRoot: 'app',
|
|
39
40
|
})
|
|
40
|
-
).toThrow(
|
|
41
|
-
/Metro requires @vxrn\/vite-plugin-metro and babel-preset-expo in the app.*Install with/
|
|
42
|
-
)
|
|
41
|
+
).toThrow(/Metro requires @vxrn\/vite-plugin-metro in the app.*Install with/)
|
|
43
42
|
} finally {
|
|
44
43
|
fs.rmSync(isolatedApp, { recursive: true, force: true })
|
|
45
44
|
}
|
|
@@ -58,6 +57,37 @@ describe('getViteMetroPluginOptions babel-config coexistence', () => {
|
|
|
58
57
|
expect(opts?.babelConfig?.plugins?.length).toBe(5)
|
|
59
58
|
})
|
|
60
59
|
|
|
60
|
+
it('starts Metro without the unused Expo preset in an isolated app', () => {
|
|
61
|
+
const isolatedApp = fs.mkdtempSync(path.join(os.tmpdir(), 'one-metro-no-expo-'))
|
|
62
|
+
const workspaceRoot = path.resolve(__dirname, '../../../../')
|
|
63
|
+
try {
|
|
64
|
+
fs.writeFileSync(
|
|
65
|
+
path.join(isolatedApp, 'package.json'),
|
|
66
|
+
JSON.stringify({ name: 'tmp' })
|
|
67
|
+
)
|
|
68
|
+
fs.writeFileSync(
|
|
69
|
+
path.join(isolatedApp, 'tsconfig.json'),
|
|
70
|
+
JSON.stringify({ compilerOptions: { paths: {} } })
|
|
71
|
+
)
|
|
72
|
+
for (const name of ['one', '@vxrn/utils', '@vxrn/vite-plugin-metro']) {
|
|
73
|
+
const destination = path.join(isolatedApp, 'node_modules', name)
|
|
74
|
+
fs.mkdirSync(path.dirname(destination), { recursive: true })
|
|
75
|
+
fs.symlinkSync(path.join(workspaceRoot, 'node_modules', name), destination, 'dir')
|
|
76
|
+
}
|
|
77
|
+
expect(() =>
|
|
78
|
+
createRequire(isolatedApp + '/').resolve('babel-preset-expo')
|
|
79
|
+
).toThrow()
|
|
80
|
+
const opts = getViteMetroPluginOptions({
|
|
81
|
+
projectRoot: isolatedApp,
|
|
82
|
+
relativeRouterRoot: 'app',
|
|
83
|
+
})
|
|
84
|
+
expect(opts.oneViteMetroBabelConfig).toBe(true)
|
|
85
|
+
expect(opts.babelConfig?.plugins).toHaveLength(5)
|
|
86
|
+
} finally {
|
|
87
|
+
fs.rmSync(isolatedApp, { recursive: true, force: true })
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
|
|
61
91
|
it('still injects One plugins when the user has a babel.config.cjs', () => {
|
|
62
92
|
const cfgPath = path.join(tmpDir, 'babel.config.cjs')
|
|
63
93
|
fs.writeFileSync(cfgPath, "module.exports = require('one/babel-preset')\n")
|
|
@@ -19,19 +19,13 @@ export function getViteMetroPluginOptions({
|
|
|
19
19
|
Parameters<typeof metroPlugin>[0]
|
|
20
20
|
>['defaultConfigOverrides']
|
|
21
21
|
setupFile?: string | { native?: string; ios?: string; android?: string }
|
|
22
|
-
}): Parameters<typeof metroPlugin>[0] {
|
|
22
|
+
}): NonNullable<Parameters<typeof metroPlugin>[0]> {
|
|
23
23
|
const require = createRequire(projectRoot + '/')
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return false
|
|
28
|
-
} catch {
|
|
29
|
-
return true
|
|
30
|
-
}
|
|
31
|
-
})
|
|
32
|
-
if (missing.length) {
|
|
24
|
+
try {
|
|
25
|
+
require.resolve('@vxrn/vite-plugin-metro')
|
|
26
|
+
} catch {
|
|
33
27
|
throw new Error(
|
|
34
|
-
`[one] Metro requires
|
|
28
|
+
`[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.`
|
|
35
29
|
)
|
|
36
30
|
}
|
|
37
31
|
|
|
@@ -43,7 +43,9 @@ for (const name of readdirSync(tmpdir())) {
|
|
|
43
43
|
}
|
|
44
44
|
const scratchDirs: string[] = []
|
|
45
45
|
function makeScratch(name: string): string {
|
|
46
|
-
const dir = realpathSync(
|
|
46
|
+
const dir = realpathSync(
|
|
47
|
+
mkdtempSync(join(tmpdir(), `one-packed-${name}-${process.pid}-`))
|
|
48
|
+
)
|
|
47
49
|
scratchDirs.push(dir)
|
|
48
50
|
return dir
|
|
49
51
|
}
|
|
@@ -251,7 +253,7 @@ console.log('one/native ok ' + url);
|
|
|
251
253
|
expect(out).not.toContain(workspaceRoot)
|
|
252
254
|
})
|
|
253
255
|
|
|
254
|
-
it('keeps the
|
|
256
|
+
it('keeps the packed closure Expo-free and bundles Metro without an Expo preset', () => {
|
|
255
257
|
const tmp = makeScratch('metro')
|
|
256
258
|
const tarballs = join(tmp, 'tarballs')
|
|
257
259
|
mkdirSync(tarballs)
|
|
@@ -410,25 +412,17 @@ if (!config.dependencies['react-native-nitro-modules']) {
|
|
|
410
412
|
encoding: 'utf8',
|
|
411
413
|
})
|
|
412
414
|
|
|
413
|
-
expect(() =>
|
|
414
|
-
execFileSync(
|
|
415
|
-
process.execPath,
|
|
416
|
-
['-e', "require('./metro.config.cjs').catch((error) => { console.error(error.message); process.exitCode = 1 })"],
|
|
417
|
-
{ cwd: appDir, encoding: 'utf8' }
|
|
418
|
-
)
|
|
419
|
-
).toThrow(/Metro requires babel-preset-expo in the app.*Install with/)
|
|
420
|
-
|
|
421
|
-
const expoPresetVersion = JSON.parse(
|
|
422
|
-
readFileSync(join(workspaceRoot, '../node_modules/babel-preset-expo/package.json'), 'utf8')
|
|
423
|
-
).version
|
|
424
|
-
execFileSync('bun', ['add', '-d', `babel-preset-expo@${expoPresetVersion}`], {
|
|
425
|
-
cwd: appDir,
|
|
426
|
-
encoding: 'utf8',
|
|
427
|
-
timeout: 180_000,
|
|
428
|
-
})
|
|
429
415
|
expect(
|
|
430
416
|
existsSync(join(appDir, 'node_modules', 'babel-preset-expo', 'package.json'))
|
|
431
|
-
).toBe(
|
|
417
|
+
).toBe(false)
|
|
418
|
+
execFileSync(
|
|
419
|
+
process.execPath,
|
|
420
|
+
[
|
|
421
|
+
'-e',
|
|
422
|
+
"require('./metro.config.cjs').catch((error) => { console.error(error.message); process.exitCode = 1 })",
|
|
423
|
+
],
|
|
424
|
+
{ cwd: appDir, encoding: 'utf8' }
|
|
425
|
+
)
|
|
432
426
|
|
|
433
427
|
// the installed package supplies real runtime facades. an app with no local
|
|
434
428
|
// ios prebuild must bundle those same files, without fabricated SDK modules.
|
|
@@ -444,14 +438,21 @@ if (!config.dependencies['react-native-nitro-modules']) {
|
|
|
444
438
|
// keeps only phase lines.
|
|
445
439
|
writeFileSync(
|
|
446
440
|
join(appDir, 'metro-build.cjs'),
|
|
447
|
-
`
|
|
441
|
+
`process.env.ONE_METRO_NATIVE_TRANSFORMS = '1'
|
|
442
|
+
const { loadConfig } = require('metro-config')
|
|
448
443
|
const { runMetro } = require('metro')
|
|
449
444
|
const output = require('metro/private/shared/output/bundle')
|
|
450
445
|
const path = require('node:path')
|
|
446
|
+
const fs = require('node:fs')
|
|
447
|
+
const assert = require('node:assert/strict')
|
|
448
|
+
const formatBundlingError = require('metro/private/lib/formatBundlingError').default
|
|
449
|
+
const { patchMetroServerWithViteConfigAndMetroPluginOptions } = require('@vxrn/vite-plugin-metro')
|
|
450
|
+
const { buildOneBabelPlugins } = require('one/babel-preset')
|
|
451
451
|
const started = Date.now()
|
|
452
452
|
const stamp = () => '+' + ((Date.now() - started) / 1000).toFixed(1) + 's'
|
|
453
453
|
async function build() {
|
|
454
454
|
const config = await loadConfig({ config: 'metro.config.cjs', maxWorkers: 2 })
|
|
455
|
+
assert.equal(config.transformerPath, require.resolve('@vxrn/vite-plugin-metro/transformer/metroNativeWorker'))
|
|
455
456
|
config.reporter = {
|
|
456
457
|
update(event) {
|
|
457
458
|
if (event.type === 'initialize_done') console.log(stamp() + ' haste ready')
|
|
@@ -460,8 +461,43 @@ async function build() {
|
|
|
460
461
|
else if (event.type === 'bundle_build_failed' || event.type === 'initialize_failed') console.log(stamp() + ' failed ' + event.type)
|
|
461
462
|
},
|
|
462
463
|
}
|
|
464
|
+
const syntaxCases = [
|
|
465
|
+
['broken.tsx', '// ascii', '\\n'],
|
|
466
|
+
['broken-unicode.tsx', '// café🙂', '\\n'],
|
|
467
|
+
['broken-crlf.tsx', '// café🙂', '\\r\\n'],
|
|
468
|
+
]
|
|
469
|
+
for (const [filename, heading, newline] of syntaxCases) {
|
|
470
|
+
fs.writeFileSync(filename, [heading, '// second', '// third', 'const greeting = ;', ''].join(newline))
|
|
471
|
+
}
|
|
463
472
|
const server = await runMetro(config, { watch: false })
|
|
473
|
+
// use the same server patch as one's native bundle command.
|
|
474
|
+
patchMetroServerWithViteConfigAndMetroPluginOptions(
|
|
475
|
+
server,
|
|
476
|
+
{ root: process.cwd(), mode: 'development', base: '/', env: {} },
|
|
477
|
+
{
|
|
478
|
+
oneViteMetroBabelConfig: true,
|
|
479
|
+
babelConfig: { plugins: buildOneBabelPlugins({
|
|
480
|
+
projectRoot: process.cwd(), relativeRouterRoot: 'app', includeImportMetaEnv: false,
|
|
481
|
+
}) },
|
|
482
|
+
}
|
|
483
|
+
)
|
|
464
484
|
try {
|
|
485
|
+
for (const [filename] of syntaxCases) {
|
|
486
|
+
let response
|
|
487
|
+
try {
|
|
488
|
+
await output.build(server, {
|
|
489
|
+
entryFile: filename, platform: 'android', dev: true, minify: false,
|
|
490
|
+
})
|
|
491
|
+
} catch (error) {
|
|
492
|
+
response = JSON.parse(JSON.stringify(formatBundlingError(error)))
|
|
493
|
+
}
|
|
494
|
+
assert.equal(response?.type, 'TransformError', JSON.stringify(response))
|
|
495
|
+
assert.equal(response.filename, filename)
|
|
496
|
+
assert.equal(response.lineNumber, 4)
|
|
497
|
+
assert.equal(response.column, 17)
|
|
498
|
+
assert.match(response.message, /Unexpected token/)
|
|
499
|
+
console.log(stamp() + ' Android syntax error location: ' + filename + ':4:17')
|
|
500
|
+
}
|
|
465
501
|
for (const dev of [true, false]) {
|
|
466
502
|
const bundle = await output.build(server, {
|
|
467
503
|
entryFile: 'node_modules/one/metro-entry.js',
|
|
@@ -489,8 +525,9 @@ build().catch(error => { console.error(error); process.exitCode = 1 })
|
|
|
489
525
|
timeout: 180_000,
|
|
490
526
|
})
|
|
491
527
|
for (const dev of ['true', 'false']) {
|
|
492
|
-
expect(readFileSync(join(appDir, `bundle.${dev}.js`)).byteLength)
|
|
493
|
-
|
|
528
|
+
expect(readFileSync(join(appDir, `bundle.${dev}.js`)).byteLength).toBeGreaterThan(
|
|
529
|
+
1_000_000
|
|
530
|
+
)
|
|
494
531
|
}
|
|
495
532
|
})
|
|
496
533
|
|
|
@@ -642,8 +642,8 @@ function routeToScreen(
|
|
|
642
642
|
return (
|
|
643
643
|
<Screen
|
|
644
644
|
// Users can override the screen getId function.
|
|
645
|
-
getId={createGetIdForRoute(route)}
|
|
646
645
|
{...props}
|
|
646
|
+
getId={props.getId ?? createGetIdForRoute(route)}
|
|
647
647
|
name={navigationRouteName}
|
|
648
648
|
key={navigationRouteName}
|
|
649
649
|
options={(args) => {
|
|
@@ -10,5 +10,5 @@ export declare function getViteMetroPluginOptions({ projectRoot, relativeRouterR
|
|
|
10
10
|
ios?: string;
|
|
11
11
|
android?: string;
|
|
12
12
|
};
|
|
13
|
-
}): Parameters<typeof metroPlugin>[0]
|
|
13
|
+
}): NonNullable<Parameters<typeof metroPlugin>[0]>;
|
|
14
14
|
//# sourceMappingURL=getViteMetroPluginOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getViteMetroPluginOptions.d.ts","sourceRoot":"","sources":["../../src/metro-config/getViteMetroPluginOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK1D,wBAAgB,yBAAyB,CAAC,EACxC,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,0BAA0B,EAC1B,SAAS,GACV,EAAE;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,iBAAiB,CAAC,EAAE,KAAK,CAAC,OAAO,MAAM,EAAE,CAAC,CAAA;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,0BAA0B,CAAC,EAAE,WAAW,CACtC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAClC,CAAC,wBAAwB,CAAC,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACzE,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"getViteMetroPluginOptions.d.ts","sourceRoot":"","sources":["../../src/metro-config/getViteMetroPluginOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK1D,wBAAgB,yBAAyB,C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