one 2.14.1 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/cjs/Root.cjs +6 -1
  2. package/dist/cjs/Root.native.cjs +6 -1
  3. package/dist/cjs/Root.native.js +6 -1
  4. package/dist/cjs/Root.native.js.map +1 -1
  5. package/dist/cjs/cli/prebuild.cjs +8 -4
  6. package/dist/cjs/cli/prebuild.native.cjs +8 -4
  7. package/dist/cjs/cli/prebuild.native.js +8 -4
  8. package/dist/cjs/cli/prebuild.native.js.map +1 -1
  9. package/dist/cjs/platform/launchScreen/index.native.cjs +15 -1
  10. package/dist/cjs/platform/launchScreen/index.native.js +15 -1
  11. package/dist/cjs/platform/launchScreen/index.native.js.map +1 -1
  12. package/dist/cjs/router/LaunchScreenRelease.cjs +26 -0
  13. package/dist/cjs/router/LaunchScreenRelease.native.cjs +35 -0
  14. package/dist/cjs/router/LaunchScreenRelease.native.js +37 -0
  15. package/dist/cjs/router/LaunchScreenRelease.native.js.map +1 -0
  16. package/dist/esm/Root.mjs +6 -1
  17. package/dist/esm/Root.mjs.map +1 -1
  18. package/dist/esm/Root.native.js +6 -1
  19. package/dist/esm/Root.native.js.map +1 -1
  20. package/dist/esm/cli/prebuild.mjs +8 -4
  21. package/dist/esm/cli/prebuild.mjs.map +1 -1
  22. package/dist/esm/cli/prebuild.native.js +8 -4
  23. package/dist/esm/cli/prebuild.native.js.map +1 -1
  24. package/dist/esm/platform/launchScreen/index.native.js +11 -1
  25. package/dist/esm/platform/launchScreen/index.native.js.map +1 -1
  26. package/dist/esm/router/LaunchScreenRelease.mjs +6 -0
  27. package/dist/esm/router/LaunchScreenRelease.mjs.map +1 -0
  28. package/dist/esm/router/LaunchScreenRelease.native.js +14 -0
  29. package/dist/esm/router/LaunchScreenRelease.native.js.map +1 -0
  30. package/native-core/host/OneHostRuntime.cpp +0 -13
  31. package/package.json +16 -16
  32. package/src/Root.tsx +2 -0
  33. package/src/cli/prebuild.ts +4 -4
  34. package/src/native/appManifest.ts +1 -0
  35. package/src/native/index.ts +1 -0
  36. package/src/platform/launchScreen/index.native.ts +13 -0
  37. package/src/router/LaunchScreenRelease.native.tsx +20 -0
  38. package/src/router/LaunchScreenRelease.tsx +4 -0
  39. package/types/Root.d.ts.map +1 -1
  40. package/types/native/appManifest.d.ts +1 -1
  41. package/types/native/appManifest.d.ts.map +1 -1
  42. package/types/native/index.d.ts +1 -1
  43. package/types/native/index.d.ts.map +1 -1
  44. package/types/platform/launchScreen/index.native.d.ts +2 -0
  45. package/types/platform/launchScreen/index.native.d.ts.map +1 -1
  46. package/types/router/LaunchScreenRelease.d.ts +2 -0
  47. package/types/router/LaunchScreenRelease.d.ts.map +1 -0
  48. package/types/router/LaunchScreenRelease.native.d.ts +2 -0
  49. package/types/router/LaunchScreenRelease.native.d.ts.map +1 -0
package/dist/cjs/Root.cjs CHANGED
@@ -33,6 +33,7 @@ var import_FlagsContext = require("./router/FlagsContext.cjs");
33
33
  var import_linkingConfig = require("./router/linkingConfig.cjs");
34
34
  var import_router = require("./router/router.cjs");
35
35
  var import_serverLocationContext = require("./router/serverLocationContext.cjs");
36
+ var import_LaunchScreenRelease = require("./router/LaunchScreenRelease.cjs");
36
37
  var import_useInitializeOneRouter = require("./router/useInitializeOneRouter.cjs");
37
38
  var import_useViteRoutes = require("./router/useViteRoutes.cjs");
38
39
  var import_evictOldest = require("./utils/evictOldest.cjs");
@@ -93,7 +94,11 @@ function Root(props) {
93
94
  ...navigationContainerProps,
94
95
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_serverLocationContext.ServerLocationContext.Provider, {
95
96
  value: location,
96
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehavior, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RootErrorBoundary.RootErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {}) })] })
97
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
98
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehavior, {}),
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RootErrorBoundary.RootErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {}) }),
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LaunchScreenRelease.LaunchScreenRelease, {})
101
+ ] })
97
102
  })
98
103
  })
99
104
  }),
@@ -36,6 +36,7 @@ var import_FlagsContext = require("./router/FlagsContext.native.js");
36
36
  var import_linkingConfig = require("./router/linkingConfig.native.js");
37
37
  var import_router = require("./router/router.native.js");
38
38
  var import_serverLocationContext = require("./router/serverLocationContext.native.js");
39
+ var import_LaunchScreenRelease = require("./router/LaunchScreenRelease.native.js");
39
40
  var import_useInitializeOneRouter = require("./router/useInitializeOneRouter.native.js");
40
41
  var import_useViteRoutes = require("./router/useViteRoutes.native.js");
41
42
  var import_evictOldest = require("./utils/evictOldest.native.js");
@@ -100,7 +101,11 @@ function Root(props) {
100
101
  ...navigationContainerProps,
101
102
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_serverLocationContext.ServerLocationContext.Provider, {
102
103
  value: location,
103
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehavior, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RootErrorBoundary.RootErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {}) })] })
104
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehavior, {}),
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RootErrorBoundary.RootErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {}) }),
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LaunchScreenRelease.LaunchScreenRelease, {})
108
+ ] })
104
109
  })
105
110
  })
106
111
  }),
@@ -36,6 +36,7 @@ var import_FlagsContext = require("./router/FlagsContext.native.js");
36
36
  var import_linkingConfig = require("./router/linkingConfig.native.js");
37
37
  var import_router = require("./router/router.native.js");
38
38
  var import_serverLocationContext = require("./router/serverLocationContext.native.js");
39
+ var import_LaunchScreenRelease = require("./router/LaunchScreenRelease.native.js");
39
40
  var import_useInitializeOneRouter = require("./router/useInitializeOneRouter.native.js");
40
41
  var import_useViteRoutes = require("./router/useViteRoutes.native.js");
41
42
  var import_evictOldest = require("./utils/evictOldest.native.js");
@@ -100,7 +101,11 @@ function Root(props) {
100
101
  ...navigationContainerProps,
101
102
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_serverLocationContext.ServerLocationContext.Provider, {
102
103
  value: location,
103
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehavior, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RootErrorBoundary.RootErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {}) })] })
104
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehavior, {}),
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RootErrorBoundary.RootErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {}) }),
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LaunchScreenRelease.LaunchScreenRelease, {})
108
+ ] })
104
109
  })
105
110
  })
106
111
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"Root.native.js","names":[],"sources":["cjs/Root.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 Root_exports = {};\n__export(Root_exports, {\n Root: () => Root\n});\nmodule.exports = __toCommonJS(Root_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_theme = require(\"./fork/theme\");\nvar import_color_scheme = require(\"@vxrn/color-scheme\");\nvar import_react = require(\"react\");\nvar import_constants = require(\"./constants\");\nvar import_screensFeatureFlags = require(\"./screensFeatureFlags\");\nvar import_SpaShellContext = require(\"./router/SpaShellContext\");\nvar import_NavigationContainer = require(\"./fork/NavigationContainer\");\nvar import_getURL = require(\"./getURL\");\nvar import_FlagsContext = require(\"./router/FlagsContext\");\nvar import_linkingConfig = require(\"./router/linkingConfig\");\nvar import_router = require(\"./router/router\");\nvar import_serverLocationContext = require(\"./router/serverLocationContext\");\nvar import_useInitializeOneRouter = require(\"./router/useInitializeOneRouter\");\nvar import_useViteRoutes = require(\"./router/useViteRoutes\");\nvar import_evictOldest = require(\"./utils/evictOldest\");\nvar import_useServerHeadInsertion = require(\"./useServerHeadInsertion\");\nvar import_PreloadLinks = require(\"./views/PreloadLinks\");\nvar import_safe_area_context = require(\"./safe-area-context\");\nvar import_RootErrorBoundary = require(\"./views/RootErrorBoundary\");\nvar import_ScrollBehavior = require(\"./views/ScrollBehavior\");\nvar ssrLocationCache = /* @__PURE__ */ new Map();\nfunction getCachedSSRLocation(path) {\n var url = ssrLocationCache.get(path);\n if (url) return url;\n url = new URL(path, (0, import_getURL.getURL)());\n (0, import_evictOldest.evictOldest)(ssrLocationCache, 5e3, 1e3);\n ssrLocationCache.set(path, url);\n return url;\n}\nvar ServerAsyncLocalIDContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nfunction Root(props) {\n var _globalThis___vxrnrequestAsyncLocalStore;\n globalThis[\"__vxrnGetContextFromReactContext\"] = function() {\n return (0, import_react.useContext)(ServerAsyncLocalIDContext);\n };\n if (import_constants.isNative) {\n (0, import_screensFeatureFlags.initScreensFeatureFlags)();\n }\n var { path, routes, routeOptions, isClient, navigationContainerProps, onRenderId, linking } = props;\n var context = (0, import_useViteRoutes.useViteRoutes)(routes, props.routerRoot, routeOptions, globalThis[\"__vxrnVersion\"]);\n var location = import_constants.isNative ? void 0 : typeof window !== \"undefined\" && window.location ? new URL(path || window.location.href || \"/\", window.location.href) : getCachedSSRLocation(path || \"/\");\n var store = (0, import_useInitializeOneRouter.useInitializeOneRouter)(context, location, linking);\n var userScheme = (0, import_color_scheme.useUserScheme)();\n var Component = store.rootComponent;\n if (!Component) {\n throw new Error(`No root component found`);\n }\n var id = (0, import_react.useId)();\n onRenderId === null || onRenderId === void 0 ? void 0 : onRenderId(id);\n var value = process.env.VERCEL ? globalThis[\"__oneGlobalContextId\"] : ((_globalThis___vxrnrequestAsyncLocalStore = globalThis[\"__vxrnrequestAsyncLocalStore\"]) === null || _globalThis___vxrnrequestAsyncLocalStore === void 0 ? void 0 : _globalThis___vxrnrequestAsyncLocalStore.getStore()) || null;\n var deferredPreloads = props.deferredPreloads;\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ServerAsyncLocalIDContext.Provider, {\n value,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_useServerHeadInsertion.ServerRenderID.Provider, {\n value: id,\n children: [\n typeof window === \"undefined\" && (deferredPreloads === null || deferredPreloads === void 0 ? void 0 : deferredPreloads.map(function(src) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"link\", {\n rel: \"modulepreload\",\n fetchPriority: \"low\",\n href: src\n }, src);\n })),\n /* one owns the safe area provider on every platform: apps read it\n through One.UI.SafeArea and never mount their own */\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_safe_area_context.SafeAreaProvider, {\n initialMetrics: import_safe_area_context.initialWindowMetrics,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NavigationContainer.NavigationContainer, {\n ref: store.navigationRef,\n initialState: store.initialState,\n linking: (0, import_linkingConfig.getResolvedLinking)(),\n onUnhandledAction,\n onStateChange: import_router.handleNavigationContainerStateChange,\n theme: userScheme.value === \"dark\" ? import_theme.DarkTheme : import_theme.DefaultTheme,\n documentTitle: {\n enabled: false\n },\n ...navigationContainerProps,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_serverLocationContext.ServerLocationContext.Provider, {\n value: location,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehavior, {}),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RootErrorBoundary.RootErrorBoundary, {\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {})\n })\n ]\n })\n })\n })\n }),\n typeof window !== \"undefined\" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PreloadLinks.PreloadLinks, {}, \"preload-links\")\n ]\n })\n });\n if (props.flags) {\n contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_FlagsContext.FlagsContext.Provider, {\n value: props.flags,\n children: contents\n });\n }\n if (!process.env.ONE_DISABLE_STRICT_MODE) {\n contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.StrictMode, {\n children: contents\n });\n }\n if (isClient) {\n var _globalThis_SERVER_CONTEXT_KEY;\n var serverMode = (_globalThis_SERVER_CONTEXT_KEY = globalThis[import_constants.SERVER_CONTEXT_KEY]) === null || _globalThis_SERVER_CONTEXT_KEY === void 0 ? void 0 : _globalThis_SERVER_CONTEXT_KEY.mode;\n if (serverMode === \"spa\") {\n var [show, setShow] = (0, import_react.useState)(false);\n (0, import_react.useLayoutEffect)(function() {\n setShow(true);\n }, []);\n return show ? contents : null;\n }\n if (serverMode === \"spa-shell\") {\n var [isSpaShell, setIsSpaShell] = (0, import_react.useState)(true);\n (0, import_react.useLayoutEffect)(function() {\n setIsSpaShell(false);\n }, []);\n (0, import_react.useLayoutEffect)(function() {\n if (!isSpaShell) {\n var initialPath = window.location.pathname + window.location.search;\n requestAnimationFrame(function() {\n var _store_navigationRef;\n if (window.location.pathname + window.location.search !== initialPath) return;\n if (store.lastIntendedPathname !== void 0) return;\n var nav = (_store_navigationRef = store.navigationRef) === null || _store_navigationRef === void 0 ? void 0 : _store_navigationRef.current;\n if (!nav) return;\n var linking2 = (0, import_linkingConfig.getResolvedLinking)();\n if (linking2 === null || linking2 === void 0 ? void 0 : linking2.getStateFromPath) {\n var freshState = linking2.getStateFromPath(initialPath, linking2.config);\n if (freshState) {\n nav.resetRoot(freshState);\n }\n }\n });\n }\n }, [\n isSpaShell\n ]);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SpaShellContext.SpaShellContext.Provider, {\n value: isSpaShell,\n children: contents\n });\n }\n return contents;\n }\n if (props.mode === \"spa-shell\") {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SpaShellContext.SpaShellContext.Provider, {\n value: true,\n children: contents\n });\n }\n return contents;\n}\nvar onUnhandledAction;\nif (process.env.NODE_ENV !== \"production\") {\n onUnhandledAction = function onUnhandledAction2(action) {\n var payload = action.payload;\n var message = `The action '${action.type}'${payload ? ` with payload ${JSON.stringify(action.payload)}` : \"\"} was not handled by any navigator.`;\n switch (action.type) {\n case \"NAVIGATE\":\n case \"PUSH\":\n case \"REPLACE\":\n case \"JUMP_TO\":\n if (payload === null || payload === void 0 ? void 0 : payload.name) {\n message += `\n\nDo you have a route named '${payload.name}'?`;\n } else {\n message += `\n\nYou need to pass the name of the screen to navigate to. This may be a bug.`;\n }\n break;\n case \"GO_BACK\":\n case \"POP\":\n case \"POP_TO_TOP\":\n message += `\n\nIs there any screen to go back to?`;\n break;\n case \"OPEN_DRAWER\":\n case \"CLOSE_DRAWER\":\n case \"TOGGLE_DRAWER\":\n message += `\n\nIs your screen inside a Drawer navigator?`;\n break;\n }\n message += `\n\nThis is a development-only warning and won't be shown in production.`;\n if (process.env.NODE_ENV === \"test\") {\n throw new Error(message);\n }\n console.error(message);\n };\n} else {\n onUnhandledAction = function onUnhandledAction2() {\n };\n}\n//# sourceMappingURL=Root.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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U;IAClG,OAAO;IACP,UAAU;GACZ,CAAC;EACH;EACA,OAAO;CACT;CACA,IAAI,MAAM,SAAS,aAAa;EAC9B,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,uBAAuB,gBAAgB,UAAU;GAClG,OAAO;GACP,UAAU;EACZ,CAAC;CACH;CACA,OAAO;AACT;AACA,IAAI;AACJ,IAAI,QAAQ,IAAI,aAAa,cAAc;CACzC,oBAAoB,SAAS,mBAAmB,QAAQ;EACtD,IAAI,UAAU,OAAO;EACrB,IAAI,UAAU,eAAe,OAAO,KAAK,GAAG,UAAU,iBAAiB,KAAK,UAAU,OAAO,OAAO,MAAM,GAAG;EAC7G,QAAQ,OAAO,MAAf;GACE,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;IACH,IAAI,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,MAAM;KAClE,WAAW;;6BAEQ,QAAQ,KAAK;IAClC,OAAO;KACL,WAAW;;;IAGb;IACA;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;EACJ;EACA,WAAW;;;EAGX,IAAI,QAAQ,IAAI,aAAa,QAAQ;GACnC,MAAM,IAAI,MAAM,OAAO;EACzB;EACA,QAAQ,MAAM,OAAO;CACvB;AACF,OAAO;CACL,oBAAoB,SAAS,qBAAqB,CAClD;AACF"}
1
+ {"version":3,"file":"Root.native.js","names":[],"sources":["cjs/Root.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 Root_exports = {};\n__export(Root_exports, {\n Root: () => Root\n});\nmodule.exports = __toCommonJS(Root_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_theme = require(\"./fork/theme\");\nvar import_color_scheme = require(\"@vxrn/color-scheme\");\nvar import_react = require(\"react\");\nvar import_constants = require(\"./constants\");\nvar import_screensFeatureFlags = require(\"./screensFeatureFlags\");\nvar import_SpaShellContext = require(\"./router/SpaShellContext\");\nvar import_NavigationContainer = require(\"./fork/NavigationContainer\");\nvar import_getURL = require(\"./getURL\");\nvar import_FlagsContext = require(\"./router/FlagsContext\");\nvar import_linkingConfig = require(\"./router/linkingConfig\");\nvar import_router = require(\"./router/router\");\nvar import_serverLocationContext = require(\"./router/serverLocationContext\");\nvar import_LaunchScreenRelease = require(\"./router/LaunchScreenRelease\");\nvar import_useInitializeOneRouter = require(\"./router/useInitializeOneRouter\");\nvar import_useViteRoutes = require(\"./router/useViteRoutes\");\nvar import_evictOldest = require(\"./utils/evictOldest\");\nvar import_useServerHeadInsertion = require(\"./useServerHeadInsertion\");\nvar import_PreloadLinks = require(\"./views/PreloadLinks\");\nvar import_safe_area_context = require(\"./safe-area-context\");\nvar import_RootErrorBoundary = require(\"./views/RootErrorBoundary\");\nvar import_ScrollBehavior = require(\"./views/ScrollBehavior\");\nvar ssrLocationCache = /* @__PURE__ */ new Map();\nfunction getCachedSSRLocation(path) {\n var url = ssrLocationCache.get(path);\n if (url) return url;\n url = new URL(path, (0, import_getURL.getURL)());\n (0, import_evictOldest.evictOldest)(ssrLocationCache, 5e3, 1e3);\n ssrLocationCache.set(path, url);\n return url;\n}\nvar ServerAsyncLocalIDContext = /* @__PURE__ */ (0, import_react.createContext)(null);\nfunction Root(props) {\n var _globalThis___vxrnrequestAsyncLocalStore;\n globalThis[\"__vxrnGetContextFromReactContext\"] = function() {\n return (0, import_react.useContext)(ServerAsyncLocalIDContext);\n };\n if (import_constants.isNative) {\n (0, import_screensFeatureFlags.initScreensFeatureFlags)();\n }\n var { path, routes, routeOptions, isClient, navigationContainerProps, onRenderId, linking } = props;\n var context = (0, import_useViteRoutes.useViteRoutes)(routes, props.routerRoot, routeOptions, globalThis[\"__vxrnVersion\"]);\n var location = import_constants.isNative ? void 0 : typeof window !== \"undefined\" && window.location ? new URL(path || window.location.href || \"/\", window.location.href) : getCachedSSRLocation(path || \"/\");\n var store = (0, import_useInitializeOneRouter.useInitializeOneRouter)(context, location, linking);\n var userScheme = (0, import_color_scheme.useUserScheme)();\n var Component = store.rootComponent;\n if (!Component) {\n throw new Error(`No root component found`);\n }\n var id = (0, import_react.useId)();\n onRenderId === null || onRenderId === void 0 ? void 0 : onRenderId(id);\n var value = process.env.VERCEL ? globalThis[\"__oneGlobalContextId\"] : ((_globalThis___vxrnrequestAsyncLocalStore = globalThis[\"__vxrnrequestAsyncLocalStore\"]) === null || _globalThis___vxrnrequestAsyncLocalStore === void 0 ? void 0 : _globalThis___vxrnrequestAsyncLocalStore.getStore()) || null;\n var deferredPreloads = props.deferredPreloads;\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ServerAsyncLocalIDContext.Provider, {\n value,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_useServerHeadInsertion.ServerRenderID.Provider, {\n value: id,\n children: [\n typeof window === \"undefined\" && (deferredPreloads === null || deferredPreloads === void 0 ? void 0 : deferredPreloads.map(function(src) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"link\", {\n rel: \"modulepreload\",\n fetchPriority: \"low\",\n href: src\n }, src);\n })),\n /* one owns the safe area provider on every platform: apps read it\n through One.UI.SafeArea and never mount their own */\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_safe_area_context.SafeAreaProvider, {\n initialMetrics: import_safe_area_context.initialWindowMetrics,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NavigationContainer.NavigationContainer, {\n ref: store.navigationRef,\n initialState: store.initialState,\n linking: (0, import_linkingConfig.getResolvedLinking)(),\n onUnhandledAction,\n onStateChange: import_router.handleNavigationContainerStateChange,\n theme: userScheme.value === \"dark\" ? import_theme.DarkTheme : import_theme.DefaultTheme,\n documentTitle: {\n enabled: false\n },\n ...navigationContainerProps,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_serverLocationContext.ServerLocationContext.Provider, {\n value: location,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollBehavior.ScrollBehavior, {}),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RootErrorBoundary.RootErrorBoundary, {\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {})\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LaunchScreenRelease.LaunchScreenRelease, {})\n ]\n })\n })\n })\n }),\n typeof window !== \"undefined\" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PreloadLinks.PreloadLinks, {}, \"preload-links\")\n ]\n })\n });\n if (props.flags) {\n contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_FlagsContext.FlagsContext.Provider, {\n value: props.flags,\n children: contents\n });\n }\n if (!process.env.ONE_DISABLE_STRICT_MODE) {\n contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.StrictMode, {\n children: contents\n });\n }\n if (isClient) {\n var _globalThis_SERVER_CONTEXT_KEY;\n var serverMode = (_globalThis_SERVER_CONTEXT_KEY = globalThis[import_constants.SERVER_CONTEXT_KEY]) === null || _globalThis_SERVER_CONTEXT_KEY === void 0 ? void 0 : _globalThis_SERVER_CONTEXT_KEY.mode;\n if (serverMode === \"spa\") {\n var [show, setShow] = (0, import_react.useState)(false);\n (0, import_react.useLayoutEffect)(function() {\n setShow(true);\n }, []);\n return show ? contents : null;\n }\n if (serverMode === \"spa-shell\") {\n var [isSpaShell, setIsSpaShell] = (0, import_react.useState)(true);\n (0, import_react.useLayoutEffect)(function() {\n setIsSpaShell(false);\n }, []);\n (0, import_react.useLayoutEffect)(function() {\n if (!isSpaShell) {\n var initialPath = window.location.pathname + window.location.search;\n requestAnimationFrame(function() {\n var _store_navigationRef;\n if (window.location.pathname + window.location.search !== initialPath) return;\n if (store.lastIntendedPathname !== void 0) return;\n var nav = (_store_navigationRef = store.navigationRef) === null || _store_navigationRef === void 0 ? void 0 : _store_navigationRef.current;\n if (!nav) return;\n var linking2 = (0, import_linkingConfig.getResolvedLinking)();\n if (linking2 === null || linking2 === void 0 ? void 0 : linking2.getStateFromPath) {\n var freshState = linking2.getStateFromPath(initialPath, linking2.config);\n if (freshState) {\n nav.resetRoot(freshState);\n }\n }\n });\n }\n }, [\n isSpaShell\n ]);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SpaShellContext.SpaShellContext.Provider, {\n value: isSpaShell,\n children: contents\n });\n }\n return contents;\n }\n if (props.mode === \"spa-shell\") {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SpaShellContext.SpaShellContext.Provider, {\n value: true,\n children: contents\n });\n }\n return contents;\n}\nvar onUnhandledAction;\nif (process.env.NODE_ENV !== \"production\") {\n onUnhandledAction = function onUnhandledAction2(action) {\n var payload = action.payload;\n var message = `The action '${action.type}'${payload ? ` with payload ${JSON.stringify(action.payload)}` : \"\"} was not handled by any navigator.`;\n switch (action.type) {\n case \"NAVIGATE\":\n case \"PUSH\":\n case \"REPLACE\":\n case \"JUMP_TO\":\n if (payload === null || payload === void 0 ? void 0 : payload.name) {\n message += `\n\nDo you have a route named '${payload.name}'?`;\n } else {\n message += `\n\nYou need to pass the name of the screen to navigate to. This may be a bug.`;\n }\n break;\n case \"GO_BACK\":\n case \"POP\":\n case \"POP_TO_TOP\":\n message += `\n\nIs there any screen to go back to?`;\n break;\n case \"OPEN_DRAWER\":\n case \"CLOSE_DRAWER\":\n case \"TOGGLE_DRAWER\":\n message += `\n\nIs your screen inside a Drawer navigator?`;\n break;\n }\n message += `\n\nThis is a development-only warning and won't be shown in production.`;\n if (process.env.NODE_ENV === \"test\") {\n throw new Error(message);\n }\n console.error(message);\n };\n} else {\n onUnhandledAction = function onUnhandledAction2() {\n };\n}\n//# sourceMappingURL=Root.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,eAAe,CAAC;AACpB,SAAS,cAAc,EACrB,YAAY,KACd,CAAC;AACD,OAAO,UAAU,aAAa,YAAY;AAC1C,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,eAAe,QAAQ,wBAAc;AACzC,IAAI,sBAAsB,QAAQ,oBAAoB;AACtD,IAAI,eAAe,QAAQ,OAAO;AAClC,I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AACT;AACA,IAAI;AACJ,IAAI,QAAQ,IAAI,aAAa,cAAc;CACzC,oBAAoB,SAAS,mBAAmB,QAAQ;EACtD,IAAI,UAAU,OAAO;EACrB,IAAI,UAAU,eAAe,OAAO,KAAK,GAAG,UAAU,iBAAiB,KAAK,UAAU,OAAO,OAAO,MAAM,GAAG;EAC7G,QAAQ,OAAO,MAAf;GACE,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;IACH,IAAI,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,MAAM;KAClE,WAAW;;6BAEQ,QAAQ,KAAK;IAClC,OAAO;KACL,WAAW;;;IAGb;IACA;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;EACJ;EACA,WAAW;;;EAGX,IAAI,QAAQ,IAAI,aAAa,QAAQ;GACnC,MAAM,IAAI,MAAM,OAAO;EACzB;EACA,QAAQ,MAAM,OAAO;CACvB;AACF,OAAO;CACL,oBAAoB,SAAS,qBAAqB,CAClD;AACF"}
@@ -77,7 +77,7 @@ async function run(args) {
77
77
  app,
78
78
  beforeInstall: args.platform === "android" ? void 0 : async () => {
79
79
  if (args.platform !== "ios" && !xcrunAvailable()) {
80
- console.warn("[one] xcrun is not available, so iOS SDK generation was skipped");
80
+ console.warn("[one] the iOS SDK is not available (xcrun found no iphonesimulator SDK), so iOS SDK generation was skipped");
81
81
  return;
82
82
  }
83
83
  await writeIosSdk(root);
@@ -87,10 +87,14 @@ async function run(args) {
87
87
  }
88
88
  function xcrunAvailable() {
89
89
  try {
90
- (0, import_node_child_process.execFileSync)("xcrun", ["--version"], { stdio: "ignore" });
90
+ (0, import_node_child_process.execFileSync)("xcrun", [
91
+ "--sdk",
92
+ "iphonesimulator",
93
+ "--show-sdk-path"
94
+ ], { stdio: "ignore" });
91
95
  return true;
92
- } catch (error) {
93
- return !(error instanceof Error && "code" in error && error.code === "ENOENT");
96
+ } catch {
97
+ return false;
94
98
  }
95
99
  }
96
100
  const sdkDirectory = typeof __dirname === "string" ? (0, import_node_path.join)(__dirname, "..", "..", "sdk") : (0, import_node_path.join)((0, import_node_path.dirname)((0, import_node_url.fileURLToPath)(import_meta.url)), "..", "..", "sdk");
@@ -86,7 +86,7 @@ async function run(args) {
86
86
  app,
87
87
  beforeInstall: args.platform === "android" ? void 0 : async function() {
88
88
  if (args.platform !== "ios" && !xcrunAvailable()) {
89
- console.warn("[one] xcrun is not available, so iOS SDK generation was skipped");
89
+ console.warn("[one] the iOS SDK is not available (xcrun found no iphonesimulator SDK), so iOS SDK generation was skipped");
90
90
  return;
91
91
  }
92
92
  await writeIosSdk(root);
@@ -96,10 +96,14 @@ async function run(args) {
96
96
  }
97
97
  function xcrunAvailable() {
98
98
  try {
99
- (0, import_child_process.execFileSync)("xcrun", ["--version"], { stdio: "ignore" });
99
+ (0, import_child_process.execFileSync)("xcrun", [
100
+ "--sdk",
101
+ "iphonesimulator",
102
+ "--show-sdk-path"
103
+ ], { stdio: "ignore" });
100
104
  return true;
101
- } catch (error) {
102
- return !(error instanceof Error && "code" in error && error.code === "ENOENT");
105
+ } catch (unused) {
106
+ return false;
103
107
  }
104
108
  }
105
109
  var sdkDirectory = typeof __dirname === "string" ? (0, import_path.join)(__dirname, "..", "..", "sdk") : (0, import_path.join)((0, import_path.dirname)((0, import_url.fileURLToPath)(import_meta.url)), "..", "..", "sdk");
@@ -86,7 +86,7 @@ async function run(args) {
86
86
  app,
87
87
  beforeInstall: args.platform === "android" ? void 0 : async function() {
88
88
  if (args.platform !== "ios" && !xcrunAvailable()) {
89
- console.warn("[one] xcrun is not available, so iOS SDK generation was skipped");
89
+ console.warn("[one] the iOS SDK is not available (xcrun found no iphonesimulator SDK), so iOS SDK generation was skipped");
90
90
  return;
91
91
  }
92
92
  await writeIosSdk(root);
@@ -96,10 +96,14 @@ async function run(args) {
96
96
  }
97
97
  function xcrunAvailable() {
98
98
  try {
99
- (0, import_child_process.execFileSync)("xcrun", ["--version"], { stdio: "ignore" });
99
+ (0, import_child_process.execFileSync)("xcrun", [
100
+ "--sdk",
101
+ "iphonesimulator",
102
+ "--show-sdk-path"
103
+ ], { stdio: "ignore" });
100
104
  return true;
101
- } catch (error) {
102
- return !(error instanceof Error && "code" in error && error.code === "ENOENT");
105
+ } catch (unused) {
106
+ return false;
103
107
  }
104
108
  }
105
109
  var sdkDirectory = typeof __dirname === "string" ? (0, import_path.join)(__dirname, "..", "..", "sdk") : (0, import_path.join)((0, import_path.dirname)((0, import_url.fileURLToPath)(import_meta.url)), "..", "..", "sdk");
@@ -1 +1 @@
1
- {"version":3,"file":"prebuild.native.js","names":[],"sources":["cjs/cli/prebuild.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 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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar prebuild_exports = {};\n__export(prebuild_exports, {\n run: () => run\n});\nmodule.exports = __toCommonJS(prebuild_exports);\nvar import_child_process = require(\"child_process\");\nvar import_fs = require(\"fs\");\nvar import_path = require(\"path\");\nvar import_url = require(\"url\");\nvar import_appManifest = require(\"../native/appManifest\");\nvar import_iosLinkSet = require(\"./iosLinkSet\");\nvar import_loadConfig = require(\"../vite/loadConfig\");\nconst import_meta = {};\nvar REACT_NATIVE_CONFIG = `module.exports = require('one/react-native-config')\n`;\nvar REACT_NATIVE_CONFIG_NAMES = [\n \"react-native.config.js\",\n \"react-native.config.cjs\",\n \"react-native.config.mjs\",\n \"react-native.config.ts\"\n];\nasync function run(args) {\n var _packageJson_dependencies, _packageJson_devDependencies;\n var _app_ios, _app_ios1;\n var root = process.cwd();\n var packageJson = JSON.parse((0, import_fs.readFileSync)((0, import_path.join)(root, \"package.json\"), \"utf8\"));\n var hasExpo = Object.hasOwn((_packageJson_dependencies = packageJson.dependencies) !== null && _packageJson_dependencies !== void 0 ? _packageJson_dependencies : {}, \"expo\") || Object.hasOwn((_packageJson_devDependencies = packageJson.devDependencies) !== null && _packageJson_devDependencies !== void 0 ? _packageJson_devDependencies : {}, \"expo\");\n if (hasExpo) {\n throw new Error('[one] one prebuild only generates Expo-free projects. This app declares expo; run Expo prebuild and list \"vxrn/expo-plugin\" in the Expo config.');\n }\n var { oneOptions } = await (0, import_loadConfig.loadUserOneOptions)(\"build\", true);\n var native = oneOptions === null || oneOptions === void 0 ? void 0 : oneOptions.native;\n var app = typeof native === \"object\" ? native.app : void 0;\n if (!app) {\n throw new Error(\"[one] native.app is required: configure one({ native: { app } }) with name, ios.bundleId, and android.applicationId\");\n }\n (0, import_appManifest.validateNativeApp)(app, args.platform);\n if ((((_app_ios = app.ios) === null || _app_ios === void 0 ? void 0 : _app_ios.backgroundTasks) || ((_app_ios1 = app.ios) === null || _app_ios1 === void 0 ? void 0 : _app_ios1.appIntents)) && args.platform !== \"android\") {\n var configured = oneOptions === null || oneOptions === void 0 ? void 0 : oneOptions.setupFile;\n var setupFile = typeof configured === \"string\" ? configured : configured && \"native\" in configured ? configured.native : configured && \"ios\" in configured ? configured.ios : void 0;\n if (!setupFile || !(0, import_fs.existsSync)((0, import_path.resolve)(root, setupFile))) {\n var _app_ios2;\n throw new Error(((_app_ios2 = app.ios) === null || _app_ios2 === void 0 ? void 0 : _app_ios2.backgroundTasks) ? \"[one] native.app.ios.backgroundTasks requires an existing iOS native setupFile that defines every task handler before the app renders\" : \"[one] native.app.ios.appIntents requires an existing iOS native setupFile that defines every action handler before the app renders\");\n }\n }\n var present = REACT_NATIVE_CONFIG_NAMES.filter(function(name) {\n return (0, import_fs.existsSync)((0, import_path.join)(root, name));\n });\n if (present.length === 0) {\n (0, import_fs.writeFileSync)((0, import_path.join)(root, \"react-native.config.cjs\"), REACT_NATIVE_CONFIG);\n } else if (!present.some(function(name) {\n return (0, import_fs.readFileSync)((0, import_path.join)(root, name), \"utf8\").includes(\"one/react-native-config\");\n })) {\n throw new Error(`[one] ${present.join(\", \")} does not load one/react-native-config, so Release builds would run the stock React Native bundler instead of One's. Set it to \\`module.exports = require('one/react-native-config')\\` or spread that into your config, then re-run one prebuild.`);\n }\n var { prebuild } = await import(\"vxrn\");\n await prebuild({\n root: process.cwd(),\n ...args,\n app,\n beforeInstall: args.platform === \"android\" ? void 0 : async function() {\n if (args.platform !== \"ios\" && !xcrunAvailable()) {\n console.warn(\"[one] xcrun is not available, so iOS SDK generation was skipped\");\n return;\n }\n await writeIosSdk(root);\n (0, import_iosLinkSet.writeIosLinkSet)(root);\n }\n });\n}\nfunction xcrunAvailable() {\n try {\n (0, import_child_process.execFileSync)(\"xcrun\", [\n \"--version\"\n ], {\n stdio: \"ignore\"\n });\n return true;\n } catch (error) {\n return !(error instanceof Error && \"code\" in error && error.code === \"ENOENT\");\n }\n}\nvar sdkDirectory = typeof __dirname === \"string\" ? (0, import_path.join)(__dirname, \"..\", \"..\", \"sdk\") : (0, import_path.join)((0, import_path.dirname)((0, import_url.fileURLToPath)(import_meta.url)), \"..\", \"..\", \"sdk\");\nasync function writeIosSdk(root) {\n var { writeAppSdkPod } = await import((0, import_url.pathToFileURL)((0, import_path.join)(sdkDirectory, \"app.mjs\")).href);\n await writeAppSdkPod(root);\n}\n//# sourceMappingURL=prebuild.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;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,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,mBAAmB,CAAC;AACxB,SAAS,kBAAkB,EACzB,WAAW,IACb,CAAC;AACD,OAAO,UAAU,aAAa,gBAAgB;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GAAG,kBAAkB,gBAAe,CAAE,IAAI;EAC7C;CACF,CAAC;AACH;AACA,SAAS,iBAAiB;CACxB,IAAI;EACF,CAAC,GAAG,qBAAqB,aAAY,CAAE,SAAS,CAC9C,WACF,GAAG,EACD,OAAO,SACT,CAAC;EACD,OAAO;CACT,SAAS,OAAO;EACd,OAAO,EAAE,iBAAiB,SAAS,UAAU,SAAS,MAAM,SAAS;CACvE;AACF;AACA,IAAI,eAAe,OAAO,cAAc,YAAY,GAAG,YAAY,KAAI,CAAE,WAAW,MAAM,MAAM,KAAK,KAAK,GAAG,YAAY,KAAI,EAAG,GAAG,YAAY,QAAO,EAAG,GAAG,WAAW,cAAa,CAAE,YAAY,GAAG,CAAC,GAAG,MAAM,MAAM,KAAK;AAC1N,eAAe,YAAY,MAAM;CAC/B,IAAI,EAAE,mBAAmB,MAAM,QAAQ,GAAG,WAAW,cAAa,EAAG,GAAG,YAAY,KAAI,CAAE,cAAc,SAAS,CAAC,CAAC,CAAC;CACpH,MAAM,eAAe,IAAI;AAC3B"}
1
+ {"version":3,"file":"prebuild.native.js","names":[],"sources":["cjs/cli/prebuild.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 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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar prebuild_exports = {};\n__export(prebuild_exports, {\n run: () => run\n});\nmodule.exports = __toCommonJS(prebuild_exports);\nvar import_child_process = require(\"child_process\");\nvar import_fs = require(\"fs\");\nvar import_path = require(\"path\");\nvar import_url = require(\"url\");\nvar import_appManifest = require(\"../native/appManifest\");\nvar import_iosLinkSet = require(\"./iosLinkSet\");\nvar import_loadConfig = require(\"../vite/loadConfig\");\nconst import_meta = {};\nvar REACT_NATIVE_CONFIG = `module.exports = require('one/react-native-config')\n`;\nvar REACT_NATIVE_CONFIG_NAMES = [\n \"react-native.config.js\",\n \"react-native.config.cjs\",\n \"react-native.config.mjs\",\n \"react-native.config.ts\"\n];\nasync function run(args) {\n var _packageJson_dependencies, _packageJson_devDependencies;\n var _app_ios, _app_ios1;\n var root = process.cwd();\n var packageJson = JSON.parse((0, import_fs.readFileSync)((0, import_path.join)(root, \"package.json\"), \"utf8\"));\n var hasExpo = Object.hasOwn((_packageJson_dependencies = packageJson.dependencies) !== null && _packageJson_dependencies !== void 0 ? _packageJson_dependencies : {}, \"expo\") || Object.hasOwn((_packageJson_devDependencies = packageJson.devDependencies) !== null && _packageJson_devDependencies !== void 0 ? _packageJson_devDependencies : {}, \"expo\");\n if (hasExpo) {\n throw new Error('[one] one prebuild only generates Expo-free projects. This app declares expo; run Expo prebuild and list \"vxrn/expo-plugin\" in the Expo config.');\n }\n var { oneOptions } = await (0, import_loadConfig.loadUserOneOptions)(\"build\", true);\n var native = oneOptions === null || oneOptions === void 0 ? void 0 : oneOptions.native;\n var app = typeof native === \"object\" ? native.app : void 0;\n if (!app) {\n throw new Error(\"[one] native.app is required: configure one({ native: { app } }) with name, ios.bundleId, and android.applicationId\");\n }\n (0, import_appManifest.validateNativeApp)(app, args.platform);\n if ((((_app_ios = app.ios) === null || _app_ios === void 0 ? void 0 : _app_ios.backgroundTasks) || ((_app_ios1 = app.ios) === null || _app_ios1 === void 0 ? void 0 : _app_ios1.appIntents)) && args.platform !== \"android\") {\n var configured = oneOptions === null || oneOptions === void 0 ? void 0 : oneOptions.setupFile;\n var setupFile = typeof configured === \"string\" ? configured : configured && \"native\" in configured ? configured.native : configured && \"ios\" in configured ? configured.ios : void 0;\n if (!setupFile || !(0, import_fs.existsSync)((0, import_path.resolve)(root, setupFile))) {\n var _app_ios2;\n throw new Error(((_app_ios2 = app.ios) === null || _app_ios2 === void 0 ? void 0 : _app_ios2.backgroundTasks) ? \"[one] native.app.ios.backgroundTasks requires an existing iOS native setupFile that defines every task handler before the app renders\" : \"[one] native.app.ios.appIntents requires an existing iOS native setupFile that defines every action handler before the app renders\");\n }\n }\n var present = REACT_NATIVE_CONFIG_NAMES.filter(function(name) {\n return (0, import_fs.existsSync)((0, import_path.join)(root, name));\n });\n if (present.length === 0) {\n (0, import_fs.writeFileSync)((0, import_path.join)(root, \"react-native.config.cjs\"), REACT_NATIVE_CONFIG);\n } else if (!present.some(function(name) {\n return (0, import_fs.readFileSync)((0, import_path.join)(root, name), \"utf8\").includes(\"one/react-native-config\");\n })) {\n throw new Error(`[one] ${present.join(\", \")} does not load one/react-native-config, so Release builds would run the stock React Native bundler instead of One's. Set it to \\`module.exports = require('one/react-native-config')\\` or spread that into your config, then re-run one prebuild.`);\n }\n var { prebuild } = await import(\"vxrn\");\n await prebuild({\n root: process.cwd(),\n ...args,\n app,\n beforeInstall: args.platform === \"android\" ? void 0 : async function() {\n if (args.platform !== \"ios\" && !xcrunAvailable()) {\n console.warn(\"[one] the iOS SDK is not available (xcrun found no iphonesimulator SDK), so iOS SDK generation was skipped\");\n return;\n }\n await writeIosSdk(root);\n (0, import_iosLinkSet.writeIosLinkSet)(root);\n }\n });\n}\nfunction xcrunAvailable() {\n try {\n (0, import_child_process.execFileSync)(\"xcrun\", [\n \"--sdk\",\n \"iphonesimulator\",\n \"--show-sdk-path\"\n ], {\n stdio: \"ignore\"\n });\n return true;\n } catch (unused) {\n return false;\n }\n}\nvar sdkDirectory = typeof __dirname === \"string\" ? (0, import_path.join)(__dirname, \"..\", \"..\", \"sdk\") : (0, import_path.join)((0, import_path.dirname)((0, import_url.fileURLToPath)(import_meta.url)), \"..\", \"..\", \"sdk\");\nasync function writeIosSdk(root) {\n var { writeAppSdkPod } = await import((0, import_url.pathToFileURL)((0, import_path.join)(sdkDirectory, \"app.mjs\")).href);\n await writeAppSdkPod(root);\n}\n//# sourceMappingURL=prebuild.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;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,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAA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S;CACA,IAAI,EAAE,aAAa,MAAM,OAAO;CAChC,MAAM,SAAS;EACb,MAAM,QAAQ,IAAI;EAClB,GAAG;EACH;EACA,eAAe,KAAK,aAAa,YAAY,KAAK,IAAI,iBAAiB;GACrE,IAAI,KAAK,aAAa,SAAS,CAAC,eAAe,GAAG;IAChD,QAAQ,KAAK,4GAA4G;IACzH;GACF;GACA,MAAM,YAAY,IAAI;GACtB,CAAC,GAAG,kBAAkB,gBAAe,CAAE,IAAI;EAC7C;CACF,CAAC;AACH;AACA,SAAS,iBAAiB;CACxB,IAAI;EACF,CAAC,GAAG,qBAAqB,aAAY,CAAE,SAAS;GAC9C;GACA;GACA;EACF,GAAG,EACD,OAAO,SACT,CAAC;EACD,OAAO;CACT,SAAS,QAAQ;EACf,OAAO;CACT;AACF;AACA,IAAI,eAAe,OAAO,cAAc,YAAY,GAAG,YAAY,KAAI,CAAE,WAAW,MAAM,MAAM,KAAK,KAAK,GAAG,YAAY,KAAI,EAAG,GAAG,YAAY,QAAO,EAAG,GAAG,WAAW,cAAa,CAAE,YAAY,GAAG,CAAC,GAAG,MAAM,MAAM,KAAK;AAC1N,eAAe,YAAY,MAAM;CAC/B,IAAI,EAAE,mBAAmB,MAAM,QAAQ,GAAG,WAAW,cAAa,EAAG,GAAG,YAAY,KAAI,CAAE,cAAc,SAAS,CAAC,CAAC,CAAC;CACpH,MAAM,eAAe,IAAI;AAC3B"}
@@ -21,7 +21,11 @@ var __copyProps = (to, from, except, desc) => {
21
21
  };
22
22
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
23
  var index_native_exports = {};
24
- __export(index_native_exports, { LaunchScreen: () => LaunchScreen });
24
+ __export(index_native_exports, {
25
+ LaunchScreen: () => LaunchScreen,
26
+ holdLaunchScreenForRouter: () => holdLaunchScreenForRouter,
27
+ releaseLaunchScreenForRouter: () => releaseLaunchScreenForRouter
28
+ });
25
29
  module.exports = __toCommonJS(index_native_exports);
26
30
  var import_react_native_nitro_modules = require("react-native-nitro-modules");
27
31
  var import_Cover = require("./Cover.native.js");
@@ -29,12 +33,14 @@ var import_config = require("./config.native.js");
29
33
  var _ref;
30
34
  var _readLaunchScreenConfig;
31
35
  var hybrid;
36
+ var appHolds = false;
32
37
  function native() {
33
38
  hybrid !== null && hybrid !== void 0 ? hybrid : hybrid = import_react_native_nitro_modules.NitroModules.createHybridObject("OneLaunchScreen");
34
39
  return hybrid;
35
40
  }
36
41
  var LaunchScreen = Object.freeze({
37
42
  preventAutoHide() {
43
+ appHolds = true;
38
44
  native().preventAutoHide();
39
45
  },
40
46
  hide(options) {
@@ -44,3 +50,11 @@ var LaunchScreen = Object.freeze({
44
50
  Cover: import_Cover.Cover,
45
51
  artworkWidth: (_ref = (_readLaunchScreenConfig = (0, import_config.readLaunchScreenConfig)()) === null || _readLaunchScreenConfig === void 0 ? void 0 : _readLaunchScreenConfig.width) !== null && _ref !== void 0 ? _ref : null
46
52
  });
53
+ function holdLaunchScreenForRouter() {
54
+ if (!import_react_native_nitro_modules.NitroModules.hasHybridObject("OneLaunchScreen")) return false;
55
+ native().preventAutoHide();
56
+ return true;
57
+ }
58
+ function releaseLaunchScreenForRouter() {
59
+ if (!appHolds) native().hide(false);
60
+ }
@@ -21,7 +21,11 @@ var __copyProps = (to, from, except, desc) => {
21
21
  };
22
22
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
23
  var index_native_exports = {};
24
- __export(index_native_exports, { LaunchScreen: () => LaunchScreen });
24
+ __export(index_native_exports, {
25
+ LaunchScreen: () => LaunchScreen,
26
+ holdLaunchScreenForRouter: () => holdLaunchScreenForRouter,
27
+ releaseLaunchScreenForRouter: () => releaseLaunchScreenForRouter
28
+ });
25
29
  module.exports = __toCommonJS(index_native_exports);
26
30
  var import_react_native_nitro_modules = require("react-native-nitro-modules");
27
31
  var import_Cover = require("./Cover.native.js");
@@ -29,12 +33,14 @@ var import_config = require("./config.native.js");
29
33
  var _ref;
30
34
  var _readLaunchScreenConfig;
31
35
  var hybrid;
36
+ var appHolds = false;
32
37
  function native() {
33
38
  hybrid !== null && hybrid !== void 0 ? hybrid : hybrid = import_react_native_nitro_modules.NitroModules.createHybridObject("OneLaunchScreen");
34
39
  return hybrid;
35
40
  }
36
41
  var LaunchScreen = Object.freeze({
37
42
  preventAutoHide() {
43
+ appHolds = true;
38
44
  native().preventAutoHide();
39
45
  },
40
46
  hide(options) {
@@ -44,5 +50,13 @@ var LaunchScreen = Object.freeze({
44
50
  Cover: import_Cover.Cover,
45
51
  artworkWidth: (_ref = (_readLaunchScreenConfig = (0, import_config.readLaunchScreenConfig)()) === null || _readLaunchScreenConfig === void 0 ? void 0 : _readLaunchScreenConfig.width) !== null && _ref !== void 0 ? _ref : null
46
52
  });
53
+ function holdLaunchScreenForRouter() {
54
+ if (!import_react_native_nitro_modules.NitroModules.hasHybridObject("OneLaunchScreen")) return false;
55
+ native().preventAutoHide();
56
+ return true;
57
+ }
58
+ function releaseLaunchScreenForRouter() {
59
+ if (!appHolds) native().hide(false);
60
+ }
47
61
 
48
62
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["cjs/platform/launchScreen/index.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 index_native_exports = {};\n__export(index_native_exports, {\n LaunchScreen: () => LaunchScreen\n});\nmodule.exports = __toCommonJS(index_native_exports);\nvar import_react_native_nitro_modules = require(\"react-native-nitro-modules\");\nvar import_Cover = require(\"./Cover.native\");\nvar import_config = require(\"./config\");\nvar _ref;\nvar _readLaunchScreenConfig;\nvar hybrid;\nfunction native() {\n hybrid !== null && hybrid !== void 0 ? hybrid : hybrid = import_react_native_nitro_modules.NitroModules.createHybridObject(\"OneLaunchScreen\");\n return hybrid;\n}\nvar LaunchScreen = Object.freeze({\n preventAutoHide() {\n native().preventAutoHide();\n },\n hide(options) {\n var _ref2;\n native().hide((_ref2 = options === null || options === void 0 ? void 0 : options.fade) !== null && _ref2 !== void 0 ? _ref2 : false);\n },\n Cover: import_Cover.Cover,\n artworkWidth: (_ref = (_readLaunchScreenConfig = (0, import_config.readLaunchScreenConfig)()) === null || _readLaunchScreenConfig === void 0 ? void 0 : _readLaunchScreenConfig.width) !== null && _ref !== void 0 ? _ref : null\n});\n//# sourceMappingURL=index.native.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,uBAAuB,CAAC;AAC5B,SAAS,sBAAsB,EAC7B,oBAAoB,aACtB,CAAC;AACD,OAAO,UAAU,aAAa,oBAAoB;AAClD,IAAI,oCAAoC,QAAQ,4BAA4B;AAC5E,IAAI,eAAe,QAAQ,mBAAgB;AAC3C,IAAI,gBAAgB,QAAQ,oBAAU;AACtC,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,SAAS,SAAS;CAChB,WAAW,QAAQ,WAAW,KAAK,IAAI,SAAS,SAAS,kCAAkC,aAAa,mBAAmB,iBAAiB;CAC5I,OAAO;AACT;AACA,IAAI,eAAe,OAAO,OAAO;CAC/B,kBAAkB;EAChB,OAAO,CAAC,CAAC,gBAAgB;CAC3B;CACA,KAAK,SAAS;EACZ,IAAI;EACJ,OAAO,CAAC,CAAC,MAAM,QAAQ,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,UAAU,QAAQ,UAAU,KAAK,IAAI,QAAQ,KAAK;CACrI;CACA,OAAO,aAAa;CACpB,eAAe,QAAQ,2BAA2B,GAAG,cAAc,uBAAsB,CAAE,OAAO,QAAQ,4BAA4B,KAAK,IAAI,KAAK,IAAI,wBAAwB,WAAW,QAAQ,SAAS,KAAK,IAAI,OAAO;AAC9N,CAAC"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/platform/launchScreen/index.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 index_native_exports = {};\n__export(index_native_exports, {\n LaunchScreen: () => LaunchScreen,\n holdLaunchScreenForRouter: () => holdLaunchScreenForRouter,\n releaseLaunchScreenForRouter: () => releaseLaunchScreenForRouter\n});\nmodule.exports = __toCommonJS(index_native_exports);\nvar import_react_native_nitro_modules = require(\"react-native-nitro-modules\");\nvar import_Cover = require(\"./Cover.native\");\nvar import_config = require(\"./config\");\nvar _ref;\nvar _readLaunchScreenConfig;\nvar hybrid;\nvar appHolds = false;\nfunction native() {\n hybrid !== null && hybrid !== void 0 ? hybrid : hybrid = import_react_native_nitro_modules.NitroModules.createHybridObject(\"OneLaunchScreen\");\n return hybrid;\n}\nvar LaunchScreen = Object.freeze({\n preventAutoHide() {\n appHolds = true;\n native().preventAutoHide();\n },\n hide(options) {\n var _ref2;\n native().hide((_ref2 = options === null || options === void 0 ? void 0 : options.fade) !== null && _ref2 !== void 0 ? _ref2 : false);\n },\n Cover: import_Cover.Cover,\n artworkWidth: (_ref = (_readLaunchScreenConfig = (0, import_config.readLaunchScreenConfig)()) === null || _readLaunchScreenConfig === void 0 ? void 0 : _readLaunchScreenConfig.width) !== null && _ref !== void 0 ? _ref : null\n});\nfunction holdLaunchScreenForRouter() {\n if (!import_react_native_nitro_modules.NitroModules.hasHybridObject(\"OneLaunchScreen\")) return false;\n native().preventAutoHide();\n return true;\n}\nfunction releaseLaunchScreenForRouter() {\n if (!appHolds) native().hide(false);\n}\n//# sourceMappingURL=index.native.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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AA2B,GAAG,cAAc,uBAAsB,CAAE,OAAO,QAAQ,4BAA4B,KAAK,IAAI,KAAK,IAAI,wBAAwB,WAAW,QAAQ,SAAS,KAAK,IAAI,OAAO;AAC9N,CAAC;AACD,SAAS,4BAA4B;CACnC,IAAI,CAAC,kCAAkC,aAAa,gBAAgB,iBAAiB,GAAG,OAAO;CAC/F,OAAO,CAAC,CAAC,gBAAgB;CACzB,OAAO;AACT;AACA,SAAS,+BAA+B;CACtC,IAAI,CAAC,UAAU,OAAO,CAAC,CAAC,KAAK,KAAK;AACpC"}
@@ -0,0 +1,26 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+ var LaunchScreenRelease_exports = {};
22
+ __export(LaunchScreenRelease_exports, { LaunchScreenRelease: () => LaunchScreenRelease });
23
+ module.exports = __toCommonJS(LaunchScreenRelease_exports);
24
+ function LaunchScreenRelease() {
25
+ return null;
26
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var LaunchScreenRelease_native_exports = {};
24
+ __export(LaunchScreenRelease_native_exports, { LaunchScreenRelease: () => LaunchScreenRelease });
25
+ module.exports = __toCommonJS(LaunchScreenRelease_native_exports);
26
+ var import_react = require("react");
27
+ var import_react_native = require("react-native");
28
+ var import_launchScreen = require("../platform/launchScreen/index.native.js");
29
+ var holds = import_react_native.Platform.OS === "ios" && (0, import_launchScreen.holdLaunchScreenForRouter)();
30
+ function LaunchScreenRelease() {
31
+ (0, import_react.useLayoutEffect)(function() {
32
+ if (holds) (0, import_launchScreen.releaseLaunchScreenForRouter)();
33
+ }, []);
34
+ return null;
35
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var LaunchScreenRelease_native_exports = {};
24
+ __export(LaunchScreenRelease_native_exports, { LaunchScreenRelease: () => LaunchScreenRelease });
25
+ module.exports = __toCommonJS(LaunchScreenRelease_native_exports);
26
+ var import_react = require("react");
27
+ var import_react_native = require("react-native");
28
+ var import_launchScreen = require("../platform/launchScreen/index.native.js");
29
+ var holds = import_react_native.Platform.OS === "ios" && (0, import_launchScreen.holdLaunchScreenForRouter)();
30
+ function LaunchScreenRelease() {
31
+ (0, import_react.useLayoutEffect)(function() {
32
+ if (holds) (0, import_launchScreen.releaseLaunchScreenForRouter)();
33
+ }, []);
34
+ return null;
35
+ }
36
+
37
+ //# sourceMappingURL=LaunchScreenRelease.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LaunchScreenRelease.native.js","names":[],"sources":["cjs/router/LaunchScreenRelease.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 LaunchScreenRelease_native_exports = {};\n__export(LaunchScreenRelease_native_exports, {\n LaunchScreenRelease: () => LaunchScreenRelease\n});\nmodule.exports = __toCommonJS(LaunchScreenRelease_native_exports);\nvar import_react = require(\"react\");\nvar import_react_native = require(\"react-native\");\nvar import_launchScreen = require(\"../platform/launchScreen/index.native\");\nvar holds = import_react_native.Platform.OS === \"ios\" && (0, import_launchScreen.holdLaunchScreenForRouter)();\nfunction LaunchScreenRelease() {\n (0, import_react.useLayoutEffect)(function() {\n if (holds) (0, import_launchScreen.releaseLaunchScreenForRouter)();\n }, []);\n return null;\n}\n//# sourceMappingURL=LaunchScreenRelease.native.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,qCAAqC,CAAC;AAC1C,SAAS,oCAAoC,EAC3C,2BAA2B,oBAC7B,CAAC;AACD,OAAO,UAAU,aAAa,kCAAkC;AAChE,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,sBAAsB,QAAQ,cAAc;AAChD,IAAI,sBAAsB,QAAQ,0CAAuC;AACzE,IAAI,QAAQ,oBAAoB,SAAS,OAAO,UAAU,GAAG,oBAAoB,0BAAyB,CAAE;AAC5G,SAAS,sBAAsB;CAC7B,CAAC,GAAG,aAAa,gBAAe,CAAE,WAAW;EAC3C,IAAI,OAAO,CAAC,GAAG,oBAAoB,6BAA4B,CAAE;CACnE,GAAG,CAAC,CAAC;CACL,OAAO;AACT"}
package/dist/esm/Root.mjs CHANGED
@@ -10,6 +10,7 @@ import { FlagsContext } from "./router/FlagsContext.mjs";
10
10
  import { getResolvedLinking } from "./router/linkingConfig.mjs";
11
11
  import { handleNavigationContainerStateChange } from "./router/router.mjs";
12
12
  import { ServerLocationContext } from "./router/serverLocationContext.mjs";
13
+ import { LaunchScreenRelease } from "./router/LaunchScreenRelease.mjs";
13
14
  import { useInitializeOneRouter } from "./router/useInitializeOneRouter.mjs";
14
15
  import { useViteRoutes } from "./router/useViteRoutes.mjs";
15
16
  import { evictOldest } from "./utils/evictOldest.mjs";
@@ -71,7 +72,11 @@ function Root(props) {
71
72
  ...navigationContainerProps,
72
73
  children: /* @__PURE__ */ jsx(ServerLocationContext.Provider, {
73
74
  value: location,
74
- children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ScrollBehavior, {}), /* @__PURE__ */ jsx(RootErrorBoundary, { children: /* @__PURE__ */ jsx(Component, {}) })] })
75
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
76
+ /* @__PURE__ */ jsx(ScrollBehavior, {}),
77
+ /* @__PURE__ */ jsx(RootErrorBoundary, { children: /* @__PURE__ */ jsx(Component, {}) }),
78
+ /* @__PURE__ */ jsx(LaunchScreenRelease, {})
79
+ ] })
75
80
  })
76
81
  })
77
82
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"Root.js","names":["UpstreamNavigationContainer"],"sources":["esm/Root.js"],"sourcesContent":["import { DarkTheme, DefaultTheme } from \"./fork/theme\";\nimport { useUserScheme } from \"@vxrn/color-scheme\";\nimport {\n createContext,\n StrictMode,\n useContext,\n useId,\n useLayoutEffect,\n useState\n} from \"react\";\nimport { SERVER_CONTEXT_KEY, isNative } from \"./constants\";\nimport { initScreensFeatureFlags } from \"./screensFeatureFlags\";\nimport { SpaShellContext } from \"./router/SpaShellContext\";\nimport { NavigationContainer as UpstreamNavigationContainer } from \"./fork/NavigationContainer\";\nimport { getURL } from \"./getURL\";\nimport { FlagsContext } from \"./router/FlagsContext\";\nimport { getResolvedLinking } from \"./router/linkingConfig\";\nimport { handleNavigationContainerStateChange } from \"./router/router\";\nimport { ServerLocationContext } from \"./router/serverLocationContext\";\nimport { useInitializeOneRouter } from \"./router/useInitializeOneRouter\";\nimport { useViteRoutes } from \"./router/useViteRoutes\";\nimport { evictOldest } from \"./utils/evictOldest\";\nimport { ServerRenderID } from \"./useServerHeadInsertion\";\nimport { PreloadLinks } from \"./views/PreloadLinks\";\nimport { SafeAreaProvider, initialWindowMetrics } from \"./safe-area-context\";\nimport { RootErrorBoundary } from \"./views/RootErrorBoundary\";\nimport { ScrollBehavior } from \"./views/ScrollBehavior\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nconst ssrLocationCache = /* @__PURE__ */ new Map();\nfunction getCachedSSRLocation(path) {\n let url = ssrLocationCache.get(path);\n if (url) return url;\n url = new URL(path, getURL());\n evictOldest(ssrLocationCache, 5e3, 1e3);\n ssrLocationCache.set(path, url);\n return url;\n}\nconst ServerAsyncLocalIDContext = createContext(null);\nfunction Root(props) {\n globalThis[\"__vxrnGetContextFromReactContext\"] = () => useContext(ServerAsyncLocalIDContext);\n if (isNative) {\n initScreensFeatureFlags();\n }\n const {\n path,\n routes,\n routeOptions,\n isClient,\n navigationContainerProps,\n onRenderId,\n linking\n } = props;\n const context = useViteRoutes(\n routes,\n props.routerRoot,\n routeOptions,\n globalThis[\"__vxrnVersion\"]\n );\n const location = isNative ? void 0 : typeof window !== \"undefined\" && window.location ? new URL(path || window.location.href || \"/\", window.location.href) : getCachedSSRLocation(path || \"/\");\n const store = useInitializeOneRouter(context, location, linking);\n const userScheme = useUserScheme();\n const Component = store.rootComponent;\n if (!Component) {\n throw new Error(`No root component found`);\n }\n const id = useId();\n onRenderId?.(id);\n const value = process.env.VERCEL ? globalThis[\"__oneGlobalContextId\"] : globalThis[\"__vxrnrequestAsyncLocalStore\"]?.getStore() || null;\n const deferredPreloads = props.deferredPreloads;\n let contents = /* @__PURE__ */ jsx(ServerAsyncLocalIDContext.Provider, { value, children: /* @__PURE__ */ jsxs(ServerRenderID.Provider, { value: id, children: [\n typeof window === \"undefined\" && deferredPreloads?.map((src) => /* @__PURE__ */ jsx(\"link\", { rel: \"modulepreload\", fetchPriority: \"low\", href: src }, src)),\n /* @__PURE__ */ jsx(SafeAreaProvider, { initialMetrics: initialWindowMetrics, children: /* @__PURE__ */ jsx(\n UpstreamNavigationContainer,\n {\n ref: store.navigationRef,\n initialState: store.initialState,\n linking: getResolvedLinking(),\n onUnhandledAction,\n onStateChange: handleNavigationContainerStateChange,\n theme: userScheme.value === \"dark\" ? DarkTheme : DefaultTheme,\n documentTitle: {\n enabled: false\n },\n ...navigationContainerProps,\n children: /* @__PURE__ */ jsx(ServerLocationContext.Provider, { value: location, children: /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(ScrollBehavior, {}),\n /* @__PURE__ */ jsx(RootErrorBoundary, { children: /* @__PURE__ */ jsx(Component, {}) })\n ] }) })\n }\n ) }),\n typeof window !== \"undefined\" && /* @__PURE__ */ jsx(PreloadLinks, {}, \"preload-links\")\n ] }) });\n if (props.flags) {\n contents = /* @__PURE__ */ jsx(FlagsContext.Provider, { value: props.flags, children: contents });\n }\n if (!process.env.ONE_DISABLE_STRICT_MODE) {\n contents = /* @__PURE__ */ jsx(StrictMode, { children: contents });\n }\n if (isClient) {\n const serverMode = globalThis[SERVER_CONTEXT_KEY]?.mode;\n if (serverMode === \"spa\") {\n const [show, setShow] = useState(false);\n useLayoutEffect(() => {\n setShow(true);\n }, []);\n return show ? contents : null;\n }\n if (serverMode === \"spa-shell\") {\n const [isSpaShell, setIsSpaShell] = useState(true);\n useLayoutEffect(() => {\n setIsSpaShell(false);\n }, []);\n useLayoutEffect(() => {\n if (!isSpaShell) {\n const initialPath = window.location.pathname + window.location.search;\n requestAnimationFrame(() => {\n if (window.location.pathname + window.location.search !== initialPath) return;\n if (store.lastIntendedPathname !== void 0) return;\n const nav = store.navigationRef?.current;\n if (!nav) return;\n const linking2 = getResolvedLinking();\n if (linking2?.getStateFromPath) {\n const freshState = linking2.getStateFromPath(initialPath, linking2.config);\n if (freshState) {\n nav.resetRoot(freshState);\n }\n }\n });\n }\n }, [isSpaShell]);\n return /* @__PURE__ */ jsx(SpaShellContext.Provider, { value: isSpaShell, children: contents });\n }\n return contents;\n }\n if (props.mode === \"spa-shell\") {\n return /* @__PURE__ */ jsx(SpaShellContext.Provider, { value: true, children: contents });\n }\n return contents;\n}\nlet onUnhandledAction;\nif (process.env.NODE_ENV !== \"production\") {\n onUnhandledAction = (action) => {\n const payload = action.payload;\n let message = `The action '${action.type}'${payload ? ` with payload ${JSON.stringify(action.payload)}` : \"\"} was not handled by any navigator.`;\n switch (action.type) {\n case \"NAVIGATE\":\n case \"PUSH\":\n case \"REPLACE\":\n case \"JUMP_TO\":\n if (payload?.name) {\n message += `\n\nDo you have a route named '${payload.name}'?`;\n } else {\n message += `\n\nYou need to pass the name of the screen to navigate to. This may be a bug.`;\n }\n break;\n case \"GO_BACK\":\n case \"POP\":\n case \"POP_TO_TOP\":\n message += `\n\nIs there any screen to go back to?`;\n break;\n case \"OPEN_DRAWER\":\n case \"CLOSE_DRAWER\":\n case \"TOGGLE_DRAWER\":\n message += `\n\nIs your screen inside a Drawer navigator?`;\n break;\n }\n message += `\n\nThis is a development-only warning and won't be shown in production.`;\n if (process.env.NODE_ENV === \"test\") {\n throw new Error(message);\n }\n console.error(message);\n };\n} else {\n onUnhandledAction = () => {\n };\n}\nexport {\n Root\n};\n//# sourceMappingURL=Root.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,mCAAmC,IAAI,IAAI;AACjD,SAAS,qBAAqB,MAAM;CAClC,IAAI,MAAM,iBAAiB,IAAI,IAAI;CACnC,IAAI,KAA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AAiB,aAAa,SAAS,MAAM;OACzE,IAAI,YAAY;QACd,IAAI,UAAU,UAAU;OAC1B;MACF;KACF,CAAC;IACH;GACF,GAAG,CAAC,UAAU,CAAC;GACf,OAAuB,oBAAI,gBAAgB,UAAU;IAAE,OAAO;IAAY,UAAU;GAAS,CAAC;EAChG;EACA,OAAO;CACT;CACA,IAAI,MAAM,SAAS,aAAa;EAC9B,OAAuB,oBAAI,gBAAgB,UAAU;GAAE,OAAO;GAAM,UAAU;EAAS,CAAC;CAC1F;CACA,OAAO;AACT;AACA,IAAI;AACJ,IAAI,QAAQ,IAAI,aAAa,cAAc;CACzC,qBAAqB,WAAW;EAC9B,MAAM,UAAU,OAAO;EACvB,IAAI,UAAU,eAAe,OAAO,KAAK,GAAG,UAAU,iBAAiB,KAAK,UAAU,OAAO,OAAO,MAAM,GAAG;EAC7G,QAAQ,OAAO,MAAf;GACE,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;IACH,IAAI,SAAS,MAAM;KACjB,WAAW;;6BAEQ,QAAQ,KAAK;IAClC,OAAO;KACL,WAAW;;;IAGb;IACA;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;EACJ;EACA,WAAW;;;EAGX,IAAI,QAAQ,IAAI,aAAa,QAAQ;GACnC,MAAM,IAAI,MAAM,OAAO;EACzB;EACA,QAAQ,MAAM,OAAO;CACvB;AACF,OAAO;CACL,0BAA0B,CAC1B;AACF"}
1
+ {"version":3,"file":"Root.js","names":["UpstreamNavigationContainer"],"sources":["esm/Root.js"],"sourcesContent":["import { DarkTheme, DefaultTheme } from \"./fork/theme\";\nimport { useUserScheme } from \"@vxrn/color-scheme\";\nimport {\n createContext,\n StrictMode,\n useContext,\n useId,\n useLayoutEffect,\n useState\n} from \"react\";\nimport { SERVER_CONTEXT_KEY, isNative } from \"./constants\";\nimport { initScreensFeatureFlags } from \"./screensFeatureFlags\";\nimport { SpaShellContext } from \"./router/SpaShellContext\";\nimport { NavigationContainer as UpstreamNavigationContainer } from \"./fork/NavigationContainer\";\nimport { getURL } from \"./getURL\";\nimport { FlagsContext } from \"./router/FlagsContext\";\nimport { getResolvedLinking } from \"./router/linkingConfig\";\nimport { handleNavigationContainerStateChange } from \"./router/router\";\nimport { ServerLocationContext } from \"./router/serverLocationContext\";\nimport { LaunchScreenRelease } from \"./router/LaunchScreenRelease\";\nimport { useInitializeOneRouter } from \"./router/useInitializeOneRouter\";\nimport { useViteRoutes } from \"./router/useViteRoutes\";\nimport { evictOldest } from \"./utils/evictOldest\";\nimport { ServerRenderID } from \"./useServerHeadInsertion\";\nimport { PreloadLinks } from \"./views/PreloadLinks\";\nimport { SafeAreaProvider, initialWindowMetrics } from \"./safe-area-context\";\nimport { RootErrorBoundary } from \"./views/RootErrorBoundary\";\nimport { ScrollBehavior } from \"./views/ScrollBehavior\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nconst ssrLocationCache = /* @__PURE__ */ new Map();\nfunction getCachedSSRLocation(path) {\n let url = ssrLocationCache.get(path);\n if (url) return url;\n url = new URL(path, getURL());\n evictOldest(ssrLocationCache, 5e3, 1e3);\n ssrLocationCache.set(path, url);\n return url;\n}\nconst ServerAsyncLocalIDContext = createContext(null);\nfunction Root(props) {\n globalThis[\"__vxrnGetContextFromReactContext\"] = () => useContext(ServerAsyncLocalIDContext);\n if (isNative) {\n initScreensFeatureFlags();\n }\n const {\n path,\n routes,\n routeOptions,\n isClient,\n navigationContainerProps,\n onRenderId,\n linking\n } = props;\n const context = useViteRoutes(\n routes,\n props.routerRoot,\n routeOptions,\n globalThis[\"__vxrnVersion\"]\n );\n const location = isNative ? void 0 : typeof window !== \"undefined\" && window.location ? new URL(path || window.location.href || \"/\", window.location.href) : getCachedSSRLocation(path || \"/\");\n const store = useInitializeOneRouter(context, location, linking);\n const userScheme = useUserScheme();\n const Component = store.rootComponent;\n if (!Component) {\n throw new Error(`No root component found`);\n }\n const id = useId();\n onRenderId?.(id);\n const value = process.env.VERCEL ? globalThis[\"__oneGlobalContextId\"] : globalThis[\"__vxrnrequestAsyncLocalStore\"]?.getStore() || null;\n const deferredPreloads = props.deferredPreloads;\n let contents = /* @__PURE__ */ jsx(ServerAsyncLocalIDContext.Provider, { value, children: /* @__PURE__ */ jsxs(ServerRenderID.Provider, { value: id, children: [\n typeof window === \"undefined\" && deferredPreloads?.map((src) => /* @__PURE__ */ jsx(\"link\", { rel: \"modulepreload\", fetchPriority: \"low\", href: src }, src)),\n /* @__PURE__ */ jsx(SafeAreaProvider, { initialMetrics: initialWindowMetrics, children: /* @__PURE__ */ jsx(\n UpstreamNavigationContainer,\n {\n ref: store.navigationRef,\n initialState: store.initialState,\n linking: getResolvedLinking(),\n onUnhandledAction,\n onStateChange: handleNavigationContainerStateChange,\n theme: userScheme.value === \"dark\" ? DarkTheme : DefaultTheme,\n documentTitle: {\n enabled: false\n },\n ...navigationContainerProps,\n children: /* @__PURE__ */ jsx(ServerLocationContext.Provider, { value: location, children: /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(ScrollBehavior, {}),\n /* @__PURE__ */ jsx(RootErrorBoundary, { children: /* @__PURE__ */ jsx(Component, {}) }),\n /* @__PURE__ */ jsx(LaunchScreenRelease, {})\n ] }) })\n }\n ) }),\n typeof window !== \"undefined\" && /* @__PURE__ */ jsx(PreloadLinks, {}, \"preload-links\")\n ] }) });\n if (props.flags) {\n contents = /* @__PURE__ */ jsx(FlagsContext.Provider, { value: props.flags, children: contents });\n }\n if (!process.env.ONE_DISABLE_STRICT_MODE) {\n contents = /* @__PURE__ */ jsx(StrictMode, { children: contents });\n }\n if (isClient) {\n const serverMode = globalThis[SERVER_CONTEXT_KEY]?.mode;\n if (serverMode === \"spa\") {\n const [show, setShow] = useState(false);\n useLayoutEffect(() => {\n setShow(true);\n }, []);\n return show ? contents : null;\n }\n if (serverMode === \"spa-shell\") {\n const [isSpaShell, setIsSpaShell] = useState(true);\n useLayoutEffect(() => {\n setIsSpaShell(false);\n }, []);\n useLayoutEffect(() => {\n if (!isSpaShell) {\n const initialPath = window.location.pathname + window.location.search;\n requestAnimationFrame(() => {\n if (window.location.pathname + window.location.search !== initialPath) return;\n if (store.lastIntendedPathname !== void 0) return;\n const nav = store.navigationRef?.current;\n if (!nav) return;\n const linking2 = getResolvedLinking();\n if (linking2?.getStateFromPath) {\n const freshState = linking2.getStateFromPath(initialPath, linking2.config);\n if (freshState) {\n nav.resetRoot(freshState);\n }\n }\n });\n }\n }, [isSpaShell]);\n return /* @__PURE__ */ jsx(SpaShellContext.Provider, { value: isSpaShell, children: contents });\n }\n return contents;\n }\n if (props.mode === \"spa-shell\") {\n return /* @__PURE__ */ jsx(SpaShellContext.Provider, { value: true, children: contents });\n }\n return contents;\n}\nlet onUnhandledAction;\nif (process.env.NODE_ENV !== \"production\") {\n onUnhandledAction = (action) => {\n const payload = action.payload;\n let message = `The action '${action.type}'${payload ? ` with payload ${JSON.stringify(action.payload)}` : \"\"} was not handled by any navigator.`;\n switch (action.type) {\n case \"NAVIGATE\":\n case \"PUSH\":\n case \"REPLACE\":\n case \"JUMP_TO\":\n if (payload?.name) {\n message += `\n\nDo you have a route named '${payload.name}'?`;\n } else {\n message += `\n\nYou need to pass the name of the screen to navigate to. This may be a bug.`;\n }\n break;\n case \"GO_BACK\":\n case \"POP\":\n case \"POP_TO_TOP\":\n message += `\n\nIs there any screen to go back to?`;\n break;\n case \"OPEN_DRAWER\":\n case \"CLOSE_DRAWER\":\n case \"TOGGLE_DRAWER\":\n message += `\n\nIs your screen inside a Drawer navigator?`;\n break;\n }\n message += `\n\nThis is a development-only warning and won't be shown in production.`;\n if (process.env.NODE_ENV === \"test\") {\n throw new Error(message);\n }\n console.error(message);\n };\n} else {\n onUnhandledAction = () => {\n };\n}\nexport {\n Root\n};\n//# sourceMappingURL=Root.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM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G;MAC3C,MAAM,MAAM,MAAM,eAAe;MACjC,IAAI,CAAC,KAAK;MACV,MAAM,WAAW,mBAAmB;MACpC,IAAI,UAAU,kBAAkB;OAC9B,MAAM,aAAa,SAAS,iBAAiB,aAAa,SAAS,MAAM;OACzE,IAAI,YAAY;QACd,IAAI,UAAU,UAAU;OAC1B;MACF;KACF,CAAC;IACH;GACF,GAAG,CAAC,UAAU,CAAC;GACf,OAAuB,oBAAI,gBAAgB,UAAU;IAAE,OAAO;IAAY,UAAU;GAAS,CAAC;EAChG;EACA,OAAO;CACT;CACA,IAAI,MAAM,SAAS,aAAa;EAC9B,OAAuB,oBAAI,gBAAgB,UAAU;GAAE,OAAO;GAAM,UAAU;EAAS,CAAC;CAC1F;CACA,OAAO;AACT;AACA,IAAI;AACJ,IAAI,QAAQ,IAAI,aAAa,cAAc;CACzC,qBAAqB,WAAW;EAC9B,MAAM,UAAU,OAAO;EACvB,IAAI,UAAU,eAAe,OAAO,KAAK,GAAG,UAAU,iBAAiB,KAAK,UAAU,OAAO,OAAO,MAAM,GAAG;EAC7G,QAAQ,OAAO,MAAf;GACE,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;IACH,IAAI,SAAS,MAAM;KACjB,WAAW;;6BAEQ,QAAQ,KAAK;IAClC,OAAO;KACL,WAAW;;;IAGb;IACA;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,WAAW;;;IAGX;EACJ;EACA,WAAW;;;EAGX,IAAI,QAAQ,IAAI,aAAa,QAAQ;GACnC,MAAM,IAAI,MAAM,OAAO;EACzB;EACA,QAAQ,MAAM,OAAO;CACvB;AACF,OAAO;CACL,0BAA0B,CAC1B;AACF"}
@@ -11,6 +11,7 @@ import { FlagsContext } from "./router/FlagsContext.native.js";
11
11
  import { getResolvedLinking } from "./router/linkingConfig.native.js";
12
12
  import { handleNavigationContainerStateChange } from "./router/router.native.js";
13
13
  import { ServerLocationContext } from "./router/serverLocationContext.native.js";
14
+ import { LaunchScreenRelease } from "./router/LaunchScreenRelease.native.js";
14
15
  import { useInitializeOneRouter } from "./router/useInitializeOneRouter.native.js";
15
16
  import { useViteRoutes } from "./router/useViteRoutes.native.js";
16
17
  import { evictOldest } from "./utils/evictOldest.native.js";
@@ -76,7 +77,11 @@ function Root(props) {
76
77
  ...navigationContainerProps,
77
78
  children: /* @__PURE__ */ jsx(ServerLocationContext.Provider, {
78
79
  value: location,
79
- children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ScrollBehavior, {}), /* @__PURE__ */ jsx(RootErrorBoundary, { children: /* @__PURE__ */ jsx(Component, {}) })] })
80
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
81
+ /* @__PURE__ */ jsx(ScrollBehavior, {}),
82
+ /* @__PURE__ */ jsx(RootErrorBoundary, { children: /* @__PURE__ */ jsx(Component, {}) }),
83
+ /* @__PURE__ */ jsx(LaunchScreenRelease, {})
84
+ ] })
80
85
  })
81
86
  })
82
87
  }),