one 1.1.298 → 1.1.299

Sign up to get free protection for your applications and to get access to all the features.
Files changed (279) hide show
  1. package/dist/cjs/vite/replaceLoader.js +7 -1
  2. package/dist/cjs/vite/replaceLoader.js.map +1 -1
  3. package/dist/cjs/vite/replaceLoader.native.js +7 -1
  4. package/dist/cjs/vite/replaceLoader.native.js.map +1 -1
  5. package/dist/esm/Root.native.js +110 -104
  6. package/dist/esm/Root.native.js.map +6 -1
  7. package/dist/esm/Route.native.js +12 -10
  8. package/dist/esm/Route.native.js.map +6 -1
  9. package/dist/esm/cleanUrl.native.js +12 -13
  10. package/dist/esm/cleanUrl.native.js.map +6 -1
  11. package/dist/esm/cli/label-process.native.js +5 -4
  12. package/dist/esm/cli/label-process.native.js.map +6 -1
  13. package/dist/esm/cli/main.native.js +8 -13
  14. package/dist/esm/cli/main.native.js.map +6 -1
  15. package/dist/esm/cli/prebuild.native.js +5 -5
  16. package/dist/esm/cli/prebuild.native.js.map +6 -1
  17. package/dist/esm/cli/run.native.js +21 -28
  18. package/dist/esm/cli/run.native.js.map +6 -1
  19. package/dist/esm/cli.native.js +119 -148
  20. package/dist/esm/cli.native.js.map +6 -1
  21. package/dist/esm/clientLoaderResolver.native.js +9 -6
  22. package/dist/esm/clientLoaderResolver.native.js.map +6 -1
  23. package/dist/esm/config.native.js +12 -11
  24. package/dist/esm/config.native.js.map +6 -1
  25. package/dist/esm/constants.native.js +7 -5
  26. package/dist/esm/constants.native.js.map +6 -1
  27. package/dist/esm/createApp.native.js +13 -9
  28. package/dist/esm/createApp.native.js.map +6 -1
  29. package/dist/esm/createHandleRequest.native.js +55 -64
  30. package/dist/esm/createHandleRequest.native.js.map +6 -1
  31. package/dist/esm/createRoute.native.js +16 -16
  32. package/dist/esm/createRoute.native.js.map +6 -1
  33. package/dist/esm/fallbackViews/Sitemap.native.js +6 -3
  34. package/dist/esm/fallbackViews/Sitemap.native.js.map +6 -1
  35. package/dist/esm/fallbackViews/Unmatched.native.js +5 -3
  36. package/dist/esm/fallbackViews/Unmatched.native.js.map +6 -1
  37. package/dist/esm/fork/NavigationContainer.native.js +24 -31
  38. package/dist/esm/fork/NavigationContainer.native.js.map +6 -1
  39. package/dist/esm/fork/createMemoryHistory.native.js +99 -115
  40. package/dist/esm/fork/createMemoryHistory.native.js.map +6 -1
  41. package/dist/esm/fork/extractPathFromURL.native.js +16 -15
  42. package/dist/esm/fork/extractPathFromURL.native.js.map +6 -1
  43. package/dist/esm/fork/findFocusedRoute.native.js +6 -5
  44. package/dist/esm/fork/findFocusedRoute.native.js.map +6 -1
  45. package/dist/esm/fork/getPathFromState.native.js +127 -140
  46. package/dist/esm/fork/getPathFromState.native.js.map +6 -1
  47. package/dist/esm/fork/getStateFromPath.native.js +292 -288
  48. package/dist/esm/fork/getStateFromPath.native.js.map +6 -1
  49. package/dist/esm/fork/useLinking.native.js +70 -61
  50. package/dist/esm/fork/useLinking.native.js.map +6 -1
  51. package/dist/esm/fork/validatePathConfig.native.js +15 -9
  52. package/dist/esm/fork/validatePathConfig.native.js.map +6 -1
  53. package/dist/esm/getLinkingConfig.native.js +11 -6
  54. package/dist/esm/getLinkingConfig.native.js.map +6 -1
  55. package/dist/esm/getReactNavigationConfig.native.js +28 -20
  56. package/dist/esm/getReactNavigationConfig.native.js.map +6 -1
  57. package/dist/esm/getRoutes.native.js +249 -229
  58. package/dist/esm/getRoutes.native.js.map +6 -1
  59. package/dist/esm/getURL.native.js +4 -4
  60. package/dist/esm/getURL.native.js.map +6 -1
  61. package/dist/esm/head/Head.android.js +5 -3
  62. package/dist/esm/head/Head.android.js.map +6 -1
  63. package/dist/esm/head/Head.ios.js +144 -132
  64. package/dist/esm/head/Head.ios.js.map +6 -1
  65. package/dist/esm/head/Head.native.js +7 -7
  66. package/dist/esm/head/Head.native.js.map +6 -1
  67. package/dist/esm/head/HeadModule.native.js +6 -6
  68. package/dist/esm/head/HeadModule.native.js.map +6 -1
  69. package/dist/esm/head/index.native.js +2 -2
  70. package/dist/esm/head/index.native.js.map +6 -1
  71. package/dist/esm/head/types.native.js +1 -2
  72. package/dist/esm/head/types.native.js.map +6 -1
  73. package/dist/esm/head/url.native.js +10 -8
  74. package/dist/esm/head/url.native.js.map +6 -1
  75. package/dist/esm/hooks.native.js +53 -34
  76. package/dist/esm/hooks.native.js.map +6 -1
  77. package/dist/esm/imperative-api.native.js +9 -6
  78. package/dist/esm/imperative-api.native.js.map +6 -1
  79. package/dist/esm/import-mode/index.android.js +4 -3
  80. package/dist/esm/import-mode/index.android.js.map +6 -1
  81. package/dist/esm/import-mode/index.ios.js +4 -3
  82. package/dist/esm/import-mode/index.ios.js.map +6 -1
  83. package/dist/esm/import-mode/index.native.js +3 -1
  84. package/dist/esm/import-mode/index.native.js.map +6 -1
  85. package/dist/esm/index.native.js +65 -27
  86. package/dist/esm/index.native.js.map +6 -1
  87. package/dist/esm/interfaces/router.native.js +4 -2
  88. package/dist/esm/interfaces/router.native.js.map +6 -1
  89. package/dist/esm/layouts/Drawer.native.js +7 -6
  90. package/dist/esm/layouts/Drawer.native.js.map +6 -1
  91. package/dist/esm/layouts/Stack.native.js +7 -6
  92. package/dist/esm/layouts/Stack.native.js.map +6 -1
  93. package/dist/esm/layouts/Tabs.native.js +42 -39
  94. package/dist/esm/layouts/Tabs.native.js.map +6 -1
  95. package/dist/esm/layouts/withLayoutContext.native.js +51 -48
  96. package/dist/esm/layouts/withLayoutContext.native.js.map +6 -1
  97. package/dist/esm/link/Link.native.js +62 -53
  98. package/dist/esm/link/Link.native.js.map +6 -1
  99. package/dist/esm/link/Redirect.native.js +8 -9
  100. package/dist/esm/link/Redirect.native.js.map +6 -1
  101. package/dist/esm/link/href.native.js +28 -27
  102. package/dist/esm/link/href.native.js.map +6 -1
  103. package/dist/esm/link/linking.native.js +51 -40
  104. package/dist/esm/link/linking.native.js.map +6 -1
  105. package/dist/esm/link/path.native.js +28 -19
  106. package/dist/esm/link/path.native.js.map +6 -1
  107. package/dist/esm/link/useLinkTo.native.js +22 -20
  108. package/dist/esm/link/useLinkTo.native.js.map +6 -1
  109. package/dist/esm/link/useLoadedNavigation.native.js +30 -23
  110. package/dist/esm/link/useLoadedNavigation.native.js.map +6 -1
  111. package/dist/esm/matchers.native.js +16 -3
  112. package/dist/esm/matchers.native.js.map +6 -1
  113. package/dist/esm/platform.native.js +4 -2
  114. package/dist/esm/platform.native.js.map +6 -1
  115. package/dist/esm/polyfills-mobile.native.js +4 -5
  116. package/dist/esm/polyfills-mobile.native.js.map +6 -1
  117. package/dist/esm/polyfills-server.native.js +1 -1
  118. package/dist/esm/polyfills-server.native.js.map +6 -1
  119. package/dist/esm/render.native.js +3 -1
  120. package/dist/esm/render.native.js.map +6 -1
  121. package/dist/esm/router/RouterStore.native.js +1 -2
  122. package/dist/esm/router/RouterStore.native.js.map +6 -1
  123. package/dist/esm/router/constants.native.js +4 -2
  124. package/dist/esm/router/constants.native.js.map +6 -1
  125. package/dist/esm/router/getNormalizedStatePath.native.js +18 -17
  126. package/dist/esm/router/getNormalizedStatePath.native.js.map +6 -1
  127. package/dist/esm/router/lastAction.native.js +10 -9
  128. package/dist/esm/router/lastAction.native.js.map +6 -1
  129. package/dist/esm/router/router.native.js +135 -114
  130. package/dist/esm/router/router.native.js.map +6 -1
  131. package/dist/esm/router/serverLocationContext.native.js +4 -2
  132. package/dist/esm/router/serverLocationContext.native.js.map +6 -1
  133. package/dist/esm/router/useInitializeOneRouter.native.js +8 -5
  134. package/dist/esm/router/useInitializeOneRouter.native.js.map +6 -1
  135. package/dist/esm/serve.native.js +77 -104
  136. package/dist/esm/serve.native.js.map +6 -1
  137. package/dist/esm/server/createRoutesManifest.native.js +14 -11
  138. package/dist/esm/server/createRoutesManifest.native.js.map +6 -1
  139. package/dist/esm/server/getServerManifest.native.js +61 -67
  140. package/dist/esm/server/getServerManifest.native.js.map +6 -1
  141. package/dist/esm/server-render.native.js +9 -10
  142. package/dist/esm/server-render.native.js.map +6 -1
  143. package/dist/esm/sortRoutes.native.js +27 -17
  144. package/dist/esm/sortRoutes.native.js.map +6 -1
  145. package/dist/esm/typed-routes/generateRouteTypes.native.js +10 -11
  146. package/dist/esm/typed-routes/generateRouteTypes.native.js.map +6 -1
  147. package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js +38 -37
  148. package/dist/esm/typed-routes/getTypedRoutesDeclarationFile.native.js.map +6 -1
  149. package/dist/esm/types.native.js +1 -2
  150. package/dist/esm/types.native.js.map +6 -1
  151. package/dist/esm/useFocusEffect.native.js +25 -22
  152. package/dist/esm/useFocusEffect.native.js.map +6 -1
  153. package/dist/esm/useLoader.native.js +50 -50
  154. package/dist/esm/useLoader.native.js.map +6 -1
  155. package/dist/esm/useNavigation.native.js +23 -19
  156. package/dist/esm/useNavigation.native.js.map +6 -1
  157. package/dist/esm/useScreens.native.js +143 -160
  158. package/dist/esm/useScreens.native.js.map +6 -1
  159. package/dist/esm/useViteRoutes.native.js +25 -28
  160. package/dist/esm/useViteRoutes.native.js.map +6 -1
  161. package/dist/esm/utils/assertIsReady.native.js +6 -3
  162. package/dist/esm/utils/assertIsReady.native.js.map +6 -1
  163. package/dist/esm/utils/dynamicImport.native.js +5 -3
  164. package/dist/esm/utils/dynamicImport.native.js.map +6 -1
  165. package/dist/esm/utils/existsAsync.native.js +6 -4
  166. package/dist/esm/utils/existsAsync.native.js.map +6 -1
  167. package/dist/esm/utils/getPageExport.native.js +12 -11
  168. package/dist/esm/utils/getPageExport.native.js.map +6 -1
  169. package/dist/esm/utils/globDir.native.js +5 -3
  170. package/dist/esm/utils/globDir.native.js.map +6 -1
  171. package/dist/esm/utils/hashString.native.js +4 -2
  172. package/dist/esm/utils/hashString.native.js.map +6 -1
  173. package/dist/esm/utils/isResponse.native.js +4 -2
  174. package/dist/esm/utils/isResponse.native.js.map +6 -1
  175. package/dist/esm/utils/isStatus.native.js +4 -2
  176. package/dist/esm/utils/isStatus.native.js.map +6 -1
  177. package/dist/esm/utils/promiseWithResolvers.native.js +7 -7
  178. package/dist/esm/utils/promiseWithResolvers.native.js.map +6 -1
  179. package/dist/esm/utils/rand.native.js +5 -3
  180. package/dist/esm/utils/rand.native.js.map +6 -1
  181. package/dist/esm/utils/redirect.native.js +7 -5
  182. package/dist/esm/utils/redirect.native.js.map +6 -1
  183. package/dist/esm/utils/removeSearch.native.js +4 -2
  184. package/dist/esm/utils/removeSearch.native.js.map +6 -1
  185. package/dist/esm/utils/removeUndefined.native.js +6 -3
  186. package/dist/esm/utils/removeUndefined.native.js.map +6 -1
  187. package/dist/esm/utils/requireResolve.native.js +4 -2
  188. package/dist/esm/utils/requireResolve.native.js.map +6 -1
  189. package/dist/esm/utils/url.native.js +6 -2
  190. package/dist/esm/utils/url.native.js.map +6 -1
  191. package/dist/esm/utils/weakKey.native.js +11 -10
  192. package/dist/esm/utils/weakKey.native.js.map +6 -1
  193. package/dist/esm/utils/weakMemo.native.js +8 -8
  194. package/dist/esm/utils/weakMemo.native.js.map +6 -1
  195. package/dist/esm/views/EmptyRoute.native.js +5 -3
  196. package/dist/esm/views/EmptyRoute.native.js.map +6 -1
  197. package/dist/esm/views/ErrorBoundary.native.js +5 -8
  198. package/dist/esm/views/ErrorBoundary.native.js.map +6 -1
  199. package/dist/esm/views/LoadProgressBar.native.js +58 -57
  200. package/dist/esm/views/LoadProgressBar.native.js.map +6 -1
  201. package/dist/esm/views/Navigator.native.js +54 -71
  202. package/dist/esm/views/Navigator.native.js.map +6 -1
  203. package/dist/esm/views/PreloadLinks.native.js +3 -1
  204. package/dist/esm/views/PreloadLinks.native.js.map +6 -1
  205. package/dist/esm/views/RootErrorBoundary.native.js +39 -29
  206. package/dist/esm/views/RootErrorBoundary.native.js.map +6 -1
  207. package/dist/esm/views/Screen.native.js +12 -12
  208. package/dist/esm/views/Screen.native.js.map +6 -1
  209. package/dist/esm/views/ScrollRestoration.native.js +27 -27
  210. package/dist/esm/views/ScrollRestoration.native.js.map +6 -1
  211. package/dist/esm/views/Try.native.js +40 -37
  212. package/dist/esm/views/Try.native.js.map +6 -1
  213. package/dist/esm/vite/build.native.js +260 -295
  214. package/dist/esm/vite/build.native.js.map +6 -1
  215. package/dist/esm/vite/clientTreeShakePlugin.native.js +34 -33
  216. package/dist/esm/vite/clientTreeShakePlugin.native.js.map +6 -1
  217. package/dist/esm/vite/constants.native.js +6 -4
  218. package/dist/esm/vite/constants.native.js.map +6 -1
  219. package/dist/esm/vite/createFileSystemRouter.native.js +99 -130
  220. package/dist/esm/vite/createFileSystemRouter.native.js.map +6 -1
  221. package/dist/esm/vite/customNodeExternals.native.js +9 -10
  222. package/dist/esm/vite/customNodeExternals.native.js.map +6 -1
  223. package/dist/esm/vite/ensureTsConfig.native.js +7 -5
  224. package/dist/esm/vite/ensureTsConfig.native.js.map +6 -1
  225. package/dist/esm/vite/findDepsToOptimize.native.js +27 -19
  226. package/dist/esm/vite/findDepsToOptimize.native.js.map +6 -1
  227. package/dist/esm/vite/fixDependenciesPlugin.native.js +5 -3
  228. package/dist/esm/vite/fixDependenciesPlugin.native.js.map +6 -1
  229. package/dist/esm/vite/generateTypesForRoutes.native.js +9 -9
  230. package/dist/esm/vite/generateTypesForRoutes.native.js.map +6 -1
  231. package/dist/esm/vite/getManifest.native.js +6 -4
  232. package/dist/esm/vite/getManifest.native.js.map +6 -1
  233. package/dist/esm/vite/headers.native.js +11 -5
  234. package/dist/esm/vite/headers.native.js.map +6 -1
  235. package/dist/esm/vite/loadEnv.native.js +7 -6
  236. package/dist/esm/vite/loadEnv.native.js.map +6 -1
  237. package/dist/esm/vite/makePluginWebOnly.native.js +9 -5
  238. package/dist/esm/vite/makePluginWebOnly.native.js.map +6 -1
  239. package/dist/esm/vite/one.native.js +142 -127
  240. package/dist/esm/vite/one.native.js.map +6 -1
  241. package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js +14 -11
  242. package/dist/esm/vite/removeReactNativeWebAnimatedPlugin.native.js.map +6 -1
  243. package/dist/esm/vite/replaceLoader.js +7 -1
  244. package/dist/esm/vite/replaceLoader.js.map +1 -1
  245. package/dist/esm/vite/replaceLoader.mjs +5 -1
  246. package/dist/esm/vite/replaceLoader.mjs.map +1 -1
  247. package/dist/esm/vite/replaceLoader.native.js +13 -10
  248. package/dist/esm/vite/replaceLoader.native.js.map +6 -1
  249. package/dist/esm/vite/resolveAPIRequest.native.js +44 -47
  250. package/dist/esm/vite/resolveAPIRequest.native.js.map +6 -1
  251. package/dist/esm/vite/server.native.js +5 -4
  252. package/dist/esm/vite/server.native.js.map +6 -1
  253. package/dist/esm/vite/types.native.js +1 -2
  254. package/dist/esm/vite/types.native.js.map +6 -1
  255. package/dist/esm/vite/virtualEntryPlugin.native.js +21 -16
  256. package/dist/esm/vite/virtualEntryPlugin.native.js.map +6 -1
  257. package/dist/esm/vite/vitePluginSsrCss.native.js +61 -50
  258. package/dist/esm/vite/vitePluginSsrCss.native.js.map +6 -1
  259. package/dist/esm/vite.native.js +19 -10
  260. package/dist/esm/vite.native.js.map +6 -1
  261. package/dist/esm/zero/getQueryKey.native.js +5 -3
  262. package/dist/esm/zero/getQueryKey.native.js.map +6 -1
  263. package/dist/esm/zero/isZeroQuery.native.js +4 -2
  264. package/dist/esm/zero/isZeroQuery.native.js.map +6 -1
  265. package/dist/esm/zero/resolveQuery.native.js +9 -8
  266. package/dist/esm/zero/resolveQuery.native.js.map +6 -1
  267. package/dist/esm/zero/subscribeToQuery.native.js +5 -3
  268. package/dist/esm/zero/subscribeToQuery.native.js.map +6 -1
  269. package/dist/esm/zero/types.native.js +1 -2
  270. package/dist/esm/zero/types.native.js.map +6 -1
  271. package/dist/esm/zero/useQuery.native.js +12 -12
  272. package/dist/esm/zero/useQuery.native.js.map +6 -1
  273. package/dist/esm/zero/useQueryZero.native.js +24 -20
  274. package/dist/esm/zero/useQueryZero.native.js.map +6 -1
  275. package/dist/esm/zero.native.js +9 -5
  276. package/dist/esm/zero.native.js.map +6 -1
  277. package/package.json +7 -7
  278. package/src/vite/replaceLoader.ts +7 -1
  279. package/types/vite/replaceLoader.d.ts.map +1 -1
@@ -2,60 +2,53 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { createElement as _createElement } from "react";
3
3
  import { createNavigatorFactory } from "@react-navigation/core";
4
4
  import React, { Suspense, useEffect, useState } from "react";
5
- import { Route, useRouteNode } from "./Route.native.js";
5
+ import { Route, useRouteNode } from "./Route";
6
6
  import One_ROUTER_IMPORT_MODE from "./import-mode";
7
- import { sortRoutesWithInitial } from "./sortRoutes.native.js";
8
- import { EmptyRoute } from "./views/EmptyRoute.native.js";
9
- import { RootErrorBoundary } from "./views/RootErrorBoundary.native.js";
10
- import { Try } from "./views/Try.native.js";
11
- import { getPageExport } from "./utils/getPageExport.native.js";
12
- var {
13
- Screen,
14
- Group
15
- } = createNavigatorFactory({})();
7
+ import { sortRoutesWithInitial } from "./sortRoutes";
8
+ import { EmptyRoute } from "./views/EmptyRoute";
9
+ import { RootErrorBoundary } from "./views/RootErrorBoundary";
10
+ import { Try } from "./views/Try";
11
+ import { getPageExport } from "./utils/getPageExport";
12
+ var { Screen, Group } = createNavigatorFactory({})();
16
13
  function getSortedChildren(children, order, initialRouteName) {
17
- if (!order?.length) return children.sort(sortRoutesWithInitial(initialRouteName)).map(function (route) {
14
+ if (!order?.length)
15
+ return children.sort(sortRoutesWithInitial(initialRouteName)).map(function(route) {
16
+ return {
17
+ route,
18
+ props: {}
19
+ };
20
+ });
21
+ var entries = [
22
+ ...children
23
+ ], ordered = order.map(function(param) {
24
+ var { name, redirect, initialParams, listeners, options, getId } = param;
25
+ if (!entries.length)
26
+ return console.warn(`[Layout children]: Too many screens defined. Route "${name}" is extraneous.`), null;
27
+ var matchIndex = entries.findIndex(function(child) {
28
+ return child.route === name;
29
+ });
30
+ if (matchIndex === -1)
31
+ return console.warn(`[Layout children]: No route named "${name}" exists in nested children:`, children.map(function(param2) {
32
+ var { route } = param2;
33
+ return route;
34
+ })), null;
35
+ var match = entries[matchIndex];
36
+ if (entries.splice(matchIndex, 1), redirect) {
37
+ if (typeof redirect == "string")
38
+ throw new Error("Redirecting to a specific route is not supported yet.");
39
+ return null;
40
+ }
18
41
  return {
19
- route,
20
- props: {}
21
- };
22
- });
23
- var entries = [...children],
24
- ordered = order.map(function (param) {
25
- var {
26
- name,
27
- redirect,
42
+ route: match,
43
+ props: {
28
44
  initialParams,
29
45
  listeners,
30
46
  options,
31
47
  getId
32
- } = param;
33
- if (!entries.length) return console.warn(`[Layout children]: Too many screens defined. Route "${name}" is extraneous.`), null;
34
- var matchIndex = entries.findIndex(function (child) {
35
- return child.route === name;
36
- });
37
- if (matchIndex === -1) return console.warn(`[Layout children]: No route named "${name}" exists in nested children:`, children.map(function (param2) {
38
- var {
39
- route
40
- } = param2;
41
- return route;
42
- })), null;
43
- var match = entries[matchIndex];
44
- if (entries.splice(matchIndex, 1), redirect) {
45
- if (typeof redirect == "string") throw new Error("Redirecting to a specific route is not supported yet.");
46
- return null;
47
48
  }
48
- return {
49
- route: match,
50
- props: {
51
- initialParams,
52
- listeners,
53
- options,
54
- getId
55
- }
56
- };
57
- }).filter(Boolean);
58
- return ordered.push(...entries.sort(sortRoutesWithInitial(initialRouteName)).map(function (route) {
49
+ };
50
+ }).filter(Boolean);
51
+ return ordered.push(...entries.sort(sortRoutesWithInitial(initialRouteName)).map(function(route) {
59
52
  return {
60
53
  route,
61
54
  props: {}
@@ -63,57 +56,59 @@ function getSortedChildren(children, order, initialRouteName) {
63
56
  })), ordered;
64
57
  }
65
58
  function useSortedScreens(order) {
66
- var node = useRouteNode(),
67
- sortedScreens = React.useMemo(function () {
68
- var _node_children,
69
- sorted = !(node == null || (_node_children = node.children) === null || _node_children === void 0) && _node_children.length ? getSortedChildren(node.children, order, node.initialRouteName) : [];
70
- return sorted.map(function (value) {
71
- return routeToScreen(value.route, value.props);
72
- });
73
- }, [node?.children, node?.initialRouteName, order]);
59
+ var node = useRouteNode(), sortedScreens = React.useMemo(function() {
60
+ var _node_children, sorted = !(node == null || (_node_children = node.children) === null || _node_children === void 0) && _node_children.length ? getSortedChildren(node.children, order, node.initialRouteName) : [];
61
+ return sorted.map(function(value) {
62
+ return routeToScreen(value.route, value.props);
63
+ });
64
+ }, [
65
+ node?.children,
66
+ node?.initialRouteName,
67
+ order
68
+ ]);
74
69
  return sortedScreens;
75
70
  }
76
71
  function fromImport(param) {
77
- var {
78
- ErrorBoundary,
79
- ...component
80
- } = param;
81
- if (ErrorBoundary) return {
82
- default: /* @__PURE__ */React.forwardRef(function (props, ref) {
83
- var children = /* @__PURE__ */React.createElement(getPageExport(component) || EmptyRoute, {
84
- ...props,
85
- ref
86
- });
87
- return /* @__PURE__ */_jsx(Try, {
88
- catch: ErrorBoundary,
89
- children
90
- });
91
- })
92
- };
72
+ var { ErrorBoundary, ...component } = param;
73
+ if (ErrorBoundary)
74
+ return {
75
+ default: /* @__PURE__ */ React.forwardRef(function(props, ref) {
76
+ var children = /* @__PURE__ */ React.createElement(getPageExport(component) || EmptyRoute, {
77
+ ...props,
78
+ ref
79
+ });
80
+ return /* @__PURE__ */ _jsx(Try, {
81
+ catch: ErrorBoundary,
82
+ children
83
+ });
84
+ })
85
+ };
93
86
  if (process.env.NODE_ENV !== "production") {
94
87
  var exported = getPageExport(component);
95
- if (exported && typeof exported == "object" && Object.keys(exported).length === 0) return {
96
- default: EmptyRoute
97
- };
88
+ if (exported && typeof exported == "object" && Object.keys(exported).length === 0)
89
+ return {
90
+ default: EmptyRoute
91
+ };
98
92
  }
99
93
  return {
100
94
  default: getPageExport(component)
101
95
  };
102
96
  }
103
- var qualifiedStore = /* @__PURE__ */new WeakMap();
97
+ var qualifiedStore = /* @__PURE__ */ new WeakMap();
104
98
  function getQualifiedRouteComponent(value) {
105
- if (value && qualifiedStore.has(value)) return qualifiedStore.get(value);
99
+ if (value && qualifiedStore.has(value))
100
+ return qualifiedStore.get(value);
106
101
  var ScreenComponent;
107
- One_ROUTER_IMPORT_MODE === "lazy" ? ScreenComponent = /* @__PURE__ */React.forwardRef(function (props, ref) {
102
+ One_ROUTER_IMPORT_MODE === "lazy" ? ScreenComponent = /* @__PURE__ */ React.forwardRef(function(props, ref) {
108
103
  var [loaded, setLoaded] = useState(null);
109
- if (useEffect(function () {
104
+ if (useEffect(function() {
110
105
  try {
111
106
  var found = value.loadRoute();
112
107
  found && setLoaded(found);
113
108
  } catch (err) {
114
- err instanceof Promise ? err.then(function (res) {
109
+ err instanceof Promise ? err.then(function(res) {
115
110
  setLoaded(res);
116
- }).catch(function (err2) {
111
+ }).catch(function(err2) {
117
112
  console.error("Error loading route", err2);
118
113
  }) : setLoaded(err);
119
114
  }
@@ -121,76 +116,70 @@ function getQualifiedRouteComponent(value) {
121
116
  var Component = getPageExport(fromImport(loaded));
122
117
  return (
123
118
  // <Suspense fallback={null}>
124
- /* @__PURE__ */
125
- _jsx(Component, {
119
+ /* @__PURE__ */ _jsx(Component, {
126
120
  ...props,
127
121
  ref
128
122
  })
129
123
  );
130
124
  }
131
125
  return null;
132
- }) : ScreenComponent = /* @__PURE__ */React.forwardRef(function (props, ref) {
133
- var res = value.loadRoute(),
134
- Component = getPageExport(fromImport(res));
126
+ }) : ScreenComponent = /* @__PURE__ */ React.forwardRef(function(props, ref) {
127
+ var res = value.loadRoute(), Component = getPageExport(fromImport(res));
135
128
  return (
136
129
  // <Suspense fallback={null}>
137
- /* @__PURE__ */
138
- _jsx(Component, {
130
+ /* @__PURE__ */ _jsx(Component, {
139
131
  ...props,
140
132
  ref
141
133
  })
142
134
  );
143
135
  });
144
- var wrapSuspense = function (children) {
145
- return /* @__PURE__ */_jsx(Suspense, {
146
- fallback: /* @__PURE__ */_jsx(SuspenseFallback, {
147
- route: value
148
- }),
149
- children
150
- });
151
- },
152
- getLoadable = function (props, ref) {
153
- return /* @__PURE__ */_jsx(RootErrorBoundary, {
154
- children: wrapSuspense(/* @__PURE__ */_jsx(ScreenComponent, {
155
- ...props,
156
- ref,
157
- // Expose the template segment path, e.g. `(home)`, `[foo]`, `index`
158
- // the intention is to make it possible to deduce shared routes.
159
- segment: value.route
160
- }))
161
- });
162
- },
163
- SuspenseFallback = function (param) {
164
- var {
165
- route
166
- } = param;
167
- return useEffect(function () {},
136
+ var wrapSuspense = function(children) {
137
+ return /* @__PURE__ */ _jsx(Suspense, {
138
+ fallback: /* @__PURE__ */ _jsx(SuspenseFallback, {
139
+ route: value
140
+ }),
141
+ children
142
+ });
143
+ }, getLoadable = function(props, ref) {
144
+ return /* @__PURE__ */ _jsx(RootErrorBoundary, {
145
+ children: wrapSuspense(/* @__PURE__ */ _jsx(ScreenComponent, {
146
+ ...props,
147
+ ref,
148
+ // Expose the template segment path, e.g. `(home)`, `[foo]`, `index`
149
+ // the intention is to make it possible to deduce shared routes.
150
+ segment: value.route
151
+ }))
152
+ });
153
+ }, SuspenseFallback = function(param) {
154
+ var { route } = param;
155
+ return useEffect(
156
+ function() {
157
+ },
168
158
  // console.info(`⚠️ Suspended:`, route)
169
- [route]), null;
170
- },
171
- QualifiedRoute = /* @__PURE__ */React.forwardRef(function (param, ref) {
172
- var {
173
- // Remove these React Navigation props to
174
- // enforce usage of router hooks (where the query params are correct).
175
- route,
176
- navigation,
177
- // Pass all other props to the component
178
- ...props
179
- } = param,
180
- loadable = getLoadable(props, ref);
181
- return /* @__PURE__ */_jsx(Route, {
182
- node: value,
183
- children: loadable
184
- });
159
+ [
160
+ route
161
+ ]
162
+ ), null;
163
+ }, QualifiedRoute = /* @__PURE__ */ React.forwardRef(function(param, ref) {
164
+ var {
165
+ // Remove these React Navigation props to
166
+ // enforce usage of router hooks (where the query params are correct).
167
+ route,
168
+ navigation,
169
+ // Pass all other props to the component
170
+ ...props
171
+ } = param, loadable = getLoadable(props, ref);
172
+ return /* @__PURE__ */ _jsx(Route, {
173
+ node: value,
174
+ children: loadable
185
175
  });
176
+ });
186
177
  return QualifiedRoute.displayName = `Route(${value.route})`, qualifiedStore.set(value, QualifiedRoute), QualifiedRoute;
187
178
  }
188
179
  function createGetIdForRoute(route) {
189
- var include = /* @__PURE__ */new Map();
180
+ var include = /* @__PURE__ */ new Map();
190
181
  if (route.dynamic) {
191
- var _iteratorNormalCompletion = !0,
192
- _didIteratorError = !1,
193
- _iteratorError = void 0;
182
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
194
183
  try {
195
184
  for (var _iterator = route.dynamic[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
196
185
  var segment = _step.value;
@@ -202,22 +191,16 @@ function createGetIdForRoute(route) {
202
191
  try {
203
192
  !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
204
193
  } finally {
205
- if (_didIteratorError) throw _iteratorError;
194
+ if (_didIteratorError)
195
+ throw _iteratorError;
206
196
  }
207
197
  }
208
198
  }
209
- return function () {
210
- var {
211
- params = {}
212
- } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
213
- segments = [],
214
- _iteratorNormalCompletion2 = !0,
215
- _didIteratorError2 = !1,
216
- _iteratorError2 = void 0;
199
+ return function() {
200
+ var { params = {} } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, segments = [], _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
217
201
  try {
218
202
  for (var _iterator2 = include.values()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
219
- var dynamic = _step2.value,
220
- value = params?.[dynamic.name];
203
+ var dynamic = _step2.value, value = params?.[dynamic.name];
221
204
  Array.isArray(value) && value.length > 0 ? segments.push(value.join("/")) : value && !Array.isArray(value) ? segments.push(value) : dynamic.deep ? segments.push(`[...${dynamic.name}]`) : segments.push(`[${dynamic.name}]`);
222
205
  }
223
206
  } catch (err) {
@@ -226,7 +209,8 @@ function createGetIdForRoute(route) {
226
209
  try {
227
210
  !_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
228
211
  } finally {
229
- if (_didIteratorError2) throw _iteratorError2;
212
+ if (_didIteratorError2)
213
+ throw _iteratorError2;
230
214
  }
231
215
  }
232
216
  var _segments_join;
@@ -234,36 +218,35 @@ function createGetIdForRoute(route) {
234
218
  };
235
219
  }
236
220
  function routeToScreen(route) {
237
- var {
238
- options,
239
- ...props
240
- } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
241
- return /* @__PURE__ */_createElement(Screen, {
221
+ var { options, ...props } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
222
+ return /* @__PURE__ */ _createElement(Screen, {
242
223
  // Users can override the screen getId function.
243
224
  getId: createGetIdForRoute(route),
244
225
  ...props,
245
226
  name: route.route,
246
227
  key: route.route,
247
- options: function (args) {
248
- var _route_loadRoute,
249
- staticOptions = route.generated ? (_route_loadRoute = route.loadRoute()) === null || _route_loadRoute === void 0 ? void 0 : _route_loadRoute.getNavOptions : null,
250
- staticResult = typeof staticOptions == "function" ? staticOptions(args) : staticOptions,
251
- dynamicResult = typeof options == "function" ? options?.(args) : options,
252
- output = {
253
- ...staticResult,
254
- ...dynamicResult
255
- };
256
- return route.generated && (output.tabBarButton = function () {
228
+ options: function(args) {
229
+ var _route_loadRoute, staticOptions = route.generated ? (_route_loadRoute = route.loadRoute()) === null || _route_loadRoute === void 0 ? void 0 : _route_loadRoute.getNavOptions : null, staticResult = typeof staticOptions == "function" ? staticOptions(args) : staticOptions, dynamicResult = typeof options == "function" ? options?.(args) : options, output = {
230
+ ...staticResult,
231
+ ...dynamicResult
232
+ };
233
+ return route.generated && (output.tabBarButton = function() {
257
234
  return null;
258
235
  }, output.drawerItemStyle = {
259
236
  height: 0,
260
237
  display: "none"
261
238
  }), output;
262
239
  },
263
- getComponent: function () {
240
+ getComponent: function() {
264
241
  return getQualifiedRouteComponent(route);
265
242
  }
266
243
  });
267
244
  }
268
- export { Group, Screen, createGetIdForRoute, getQualifiedRouteComponent, useSortedScreens };
269
- //# sourceMappingURL=useScreens.native.js.map
245
+ export {
246
+ Group,
247
+ Screen,
248
+ createGetIdForRoute,
249
+ getQualifiedRouteComponent,
250
+ useSortedScreens
251
+ };
252
+ //# sourceMappingURL=useScreens.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["jsx","_jsx","createElement","_createElement","createNavigatorFactory","React","Suspense","useEffect","useState","Route","useRouteNode","One_ROUTER_IMPORT_MODE","sortRoutesWithInitial","EmptyRoute","RootErrorBoundary","Try","getPageExport","Screen","Group","getSortedChildren","children","order","initialRouteName","length","sort","map","route","props","entries","ordered","param","name","redirect","initialParams","listeners","options","getId","console","warn","matchIndex","findIndex","child","param2","match","splice","Error","filter","Boolean","push","useSortedScreens","node","sortedScreens","useMemo","_node_children","sorted","value","routeToScreen","fromImport","ErrorBoundary","component","default","forwardRef","ref","catch","process","env","NODE_ENV","exported","Object","keys","qualifiedStore","WeakMap","getQualifiedRouteComponent","has","get","ScreenComponent","loaded","setLoaded","found","loadRoute","err","Promise","then","res","err2","error","Component","wrapSuspense","fallback","SuspenseFallback","getLoadable","segment"],"sources":["../../src/useScreens.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAA,IAAAC,IAAA,2BAA8B;AAQvC,SAAOC,aAAmB,IAAAC,cAAW,QAAgB;AACrD,SAAAC,sBAAA;AAAA,OACEC,KAAA,IAAAC,QAAA,EAAAC,SAAA,EAAAC,QAAA;AAAA,SACAC,KAAA,EAAAC,YAAA;AAAA,OAIKC,sBAAA;AACP,SAAOC,qBAAA,QAA4B;AACnC,SAASC,UAAA,sCAA6B;AACtC,SAASC,iBAAA,QAAkB;AAC3B,SAASC,GAAA;AACT,SAASC,aAAW;AACpB;EAAAC,MAAS;EAAAC;AAAA,IAAAd,sBAAqB;AAgHf,SAAAe,kBAAAC,QAAA,EAAAC,KAAA,EAAAC,gBAAA;EA2KX,KAAAD,KAAA,EAAAE,MAAA,EAvRG,OAAQH,QAAQ,CAAAI,IAAM,CAAAZ,qBAAI,CAAAU,gBAAkC,GAAAG,GAAA,WAAAC,KAAA;IA2BnE,OAAS;MAKFA,KAAA;MACHC,KAAO;IAIT;EAII;EACE,I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AS,OAAA,QAAfpD,qBAAAA,SAAAA,SAAAA,iBAAmB0F,gBAAgB,MACrEC,eACJ,OAAOH,iBAAkB,aAAaA,cAAcD,IAAAA,IAAQC,eACxDI,gBAAgB,OAAOpF,WAAY,aAAaA,UAAU+E,IAAAA,IAAQ/E,SAClEqF,SAAS;QACb,GAAGF;QACH,GAAGC;MACL;AAGA,aAAI5F,MAAMyF,cACRI,OAAOC,eAAe,WAAA;eAAM;SAE5BD,OAAOE,kBAAkB;QAAEC,QAAQ;QAAGC,SAAS;MAAO,IAGjDJ;IACT;IACAK,cAAc,WAAA;aAAMrD,2BAA2B7C,KAAAA;;;AAGrD;",
5
+ "names": ["createNavigatorFactory", "React", "Suspense", "useEffect", "useState", "Route", "useRouteNode", "One_ROUTER_IMPORT_MODE", "sortRoutesWithInitial", "EmptyRoute", "RootErrorBoundary", "Try", "getPageExport", "Screen", "Group", "getSortedChildren", "children", "order", "initialRouteName", "length", "sort", "map", "route", "props", "entries", "ordered", "name", "redirect", "initialParams", "listeners", "options", "getId", "console", "warn", "matchIndex", "findIndex", "child", "param", "match", "splice", "Error", "filter", "Boolean", "push", "useSortedScreens", "node", "sortedScreens", "useMemo", "sorted", "value", "routeToScreen", "fromImport", "ErrorBoundary", "component", "default", "forwardRef", "ref", "createElement", "catch", "process", "env", "NODE_ENV", "exported", "Object", "keys", "qualifiedStore", "WeakMap", "getQualifiedRouteComponent", "has", "get", "ScreenComponent", "loaded", "setLoaded", "found", "loadRoute", "err", "Promise", "then", "res", "error", "Component", "wrapSuspense", "fallback", "SuspenseFallback", "getLoadable", "segment", "QualifiedRoute", "navigation", "loadable", "displayName", "set", "createGetIdForRoute", "include", "Map", "dynamic", "params", "segments", "_iteratorNormalCompletion", "_didIteratorError", "_iteratorError", "_iterator", "values", "_step", "Array", "isArray", "join", "deep", "contextKey", "key", "args", "staticOptions", "generated", "getNavOptions", "staticResult", "dynamicResult", "output", "tabBarButton", "drawerItemStyle", "height", "display", "getComponent"]
6
+ }
@@ -1,7 +1,6 @@
1
- import { getLoaderPath } from "./cleanUrl.native.js";
2
- import { dynamicImport } from "./utils/dynamicImport.native.js";
3
- var lastVersion = 0,
4
- context;
1
+ import { getLoaderPath } from "./cleanUrl";
2
+ import { dynamicImport } from "./utils/dynamicImport";
3
+ var lastVersion = 0, context;
5
4
  function useViteRoutes(routes, options, version) {
6
5
  return version && version > lastVersion && (context = null, lastVersion = version), context || loadRoutes(routes, options), context;
7
6
  }
@@ -9,50 +8,48 @@ function loadRoutes(paths, options) {
9
8
  return context || (globalThis.__importMetaGlobbed = paths, context = globbedRoutesToRouteContext(paths, options), context);
10
9
  }
11
10
  function globbedRoutesToRouteContext(paths, options) {
12
- var routesSync = {},
13
- promises = {},
14
- loadedRoutes = {},
15
- clears = {};
16
- Object.keys(paths).map(function (path) {
11
+ var routesSync = {}, promises = {}, loadedRoutes = {}, clears = {};
12
+ Object.keys(paths).map(function(path) {
17
13
  var _options_routeModes;
18
14
  if (!paths[path]) {
19
15
  console.error(`Error: Missing route at path ${path}`);
20
16
  return;
21
17
  }
22
- var loadRouteFunction = paths[path],
23
- pathWithoutRelative = path.replace("/app/", "./"),
24
- shouldRewrite = typeof window < "u" && window.location && !import.meta.env.PROD,
25
- originalPath = pathWithoutRelative.slice(1).replace(/\.[jt]sx?$/, "");
26
- (options == null || (_options_routeModes = options.routeModes) === null || _options_routeModes === void 0 ? void 0 : _options_routeModes[originalPath]) === "spa" ? (console.info(`Spa mode: ${originalPath}`), loadedRoutes[pathWithoutRelative] = function () {
18
+ var loadRouteFunction = paths[path], pathWithoutRelative = path.replace("/app/", "./"), shouldRewrite = typeof window < "u" && window.location && !import.meta.env.PROD, originalPath = pathWithoutRelative.slice(1).replace(/\.[jt]sx?$/, "");
19
+ (options == null || (_options_routeModes = options.routeModes) === null || _options_routeModes === void 0 ? void 0 : _options_routeModes[originalPath]) === "spa" ? (console.info(`Spa mode: ${originalPath}`), loadedRoutes[pathWithoutRelative] = function() {
27
20
  return null;
28
- }) : shouldRewrite ? routesSync[pathWithoutRelative] = path.includes("_layout.") || path.includes("+spa") ? loadRouteFunction : function () {
29
- var _globalThis___vxrntodopath,
30
- realPath = ((_globalThis___vxrntodopath = globalThis.__vxrntodopath) !== null && _globalThis___vxrntodopath !== void 0 ? _globalThis___vxrntodopath : window.location.pathname).trim(),
31
- importUrl = getLoaderPath(realPath);
21
+ }) : shouldRewrite ? routesSync[pathWithoutRelative] = path.includes("_layout.") || path.includes("+spa") ? loadRouteFunction : function() {
22
+ var _globalThis___vxrntodopath, realPath = ((_globalThis___vxrntodopath = globalThis.__vxrntodopath) !== null && _globalThis___vxrntodopath !== void 0 ? _globalThis___vxrntodopath : window.location.pathname).trim(), importUrl = getLoaderPath(realPath);
32
23
  return dynamicImport(importUrl);
33
24
  } : routesSync[pathWithoutRelative] = loadRouteFunction;
34
25
  });
35
26
  var moduleKeys = Object.keys(routesSync);
36
27
  function resolve(id) {
37
- if (clearTimeout(clears[id]), loadedRoutes[id]) return loadedRoutes[id];
38
- if (typeof routesSync[id] != "function") return routesSync[id];
39
- throw promises[id] || (promises[id] = routesSync[id]().then(function (val) {
40
- return loadedRoutes[id] = val, delete promises[id], clears[id] = setTimeout(function () {
28
+ if (clearTimeout(clears[id]), loadedRoutes[id])
29
+ return loadedRoutes[id];
30
+ if (typeof routesSync[id] != "function")
31
+ return routesSync[id];
32
+ throw promises[id] || (promises[id] = routesSync[id]().then(function(val) {
33
+ return loadedRoutes[id] = val, delete promises[id], clears[id] = setTimeout(function() {
41
34
  delete loadedRoutes[id];
42
35
  }, 500), val;
43
- }).catch(function (err) {
36
+ }).catch(function(err) {
44
37
  console.error("Error loading route", id, err, new Error().stack), loadedRoutes[id] = {
45
- default: function () {
38
+ default: function() {
46
39
  return null;
47
40
  }
48
41
  }, delete promises[id];
49
42
  }), process.env.NODE_ENV === "development" && (promises[id].stack = new Error().stack)), promises[id];
50
43
  }
51
- return resolve.keys = function () {
44
+ return resolve.keys = function() {
52
45
  return moduleKeys;
53
- }, resolve.id = "", resolve.resolve = function (id) {
46
+ }, resolve.id = "", resolve.resolve = function(id) {
54
47
  return id;
55
48
  }, resolve;
56
49
  }
57
- export { globbedRoutesToRouteContext, loadRoutes, useViteRoutes };
58
- //# sourceMappingURL=useViteRoutes.native.js.map
50
+ export {
51
+ globbedRoutesToRouteContext,
52
+ loadRoutes,
53
+ useViteRoutes
54
+ };
55
+ //# sourceMappingURL=useViteRoutes.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["getLoaderPath","dynamicImport","lastVersion","context","useViteRoutes","routes","options","version","loadRoutes","paths","globalThis","__importMetaGlobbed","globbedRoutesToRouteContext","routesSync","promises","loadedRoutes","clears","Object","keys","map","path","_options_routeModes","console","error","loadRouteFunction","pathWithoutRelative","replace","shouldRewrite","window","location","import","meta","env","PROD","originalPath","slice","routeModes","info","includes","_globalThis___vxrntodopath","realPath","__vxrntodopath","pathname","trim","importUrl","moduleKeys","resolve","id","clearTimeout","then","val","setTimeout","catch","err","Error","stack","default","process","NODE_ENV"],"sources":["../../src/useViteRoutes.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,aAAA,QAAqB;AAE9B,SAASC,aAAA,QAAqB;AAK9B,IAAIC,WAAA,GAAc;EACdC,OAAA;AAGG,SAASC,cACdC,MAAA,EACAC,OAAA,EACAC,OAAA,EACA;EACA,OAAIA,OAAA,IAAWA,OAAA,GAAUL,WAAA,KAEvBC,OAAA,GAAU,MACVD,WAAA,GAAcK,OAAA,GAGXJ,OAAA,IACHK,UAAA,CAAWH,MAAA,EAAQC,OAAO,GAGrBH,OAAA;AACT;AAEO,SAASK,WAAWC,KAAA,EAA4BH,OAAA,EAA4B;EACjF,OAAIH,OAAA,KACJO,UAAA,CAAWC,mBAAA,GAAyBF,KAAA,EACpCN,OAAA,GAAUS,2BAAA,CAA4BH,KAAA,EAAOH,OAAO,GAC7CH,OAAA;AACT;AAEO,SAASS,4BACdH,KAAA,EACAH,OAAA,EACkB;EAElB,IAAAO,UAA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aAAOlC,cAAcqC,SAAAA;IACvB,IAEN1B,WAAWW,mBAAAA,IAAuBD;EAEtC,CAAA;AAEA,MAAMiB,aAAavB,OAAOC,KAAKL,UAAAA;AAE/B,WAAS4B,QAAQC,IAAU;AAEzB,QADAC,aAAa3B,OAAO0B,EAAAA,CAAG,GACnB3B,aAAa2B,EAAAA;AACf,aAAO3B,aAAa2B,EAAAA;AAEtB,QAAI,OAAO7B,WAAW6B,EAAAA,KAAQ;AAC5B,aAAO7B,WAAW6B,EAAAA;AAEpB,UAAK5B,SAAS4B,EAAAA,MACZ5B,SAAS4B,EAAAA,IAAM7B,WAAW6B,EAAAA,EAAG,EAC1BE,KAAK,SAACC,KAAAA;AACL9B,0BAAa2B,EAAAA,IAAMG,KACnB,OAAO/B,SAAS4B,EAAAA,GAGhB1B,OAAO0B,EAAAA,IAAMI,WAAW,WAAA;AACtB,eAAO/B,aAAa2B,EAAAA;MACtB,GAAG,GAAA,GAEIG;IACT,CAAA,EACCE,MAAM,SAACC,KAAAA;AACN3B,cAAQC,MAAM,uBAAuBoB,IAAIM,KAAK,IAAIC,MAAAA,EAAQC,KAAK,GAC/DnC,aAAa2B,EAAAA,IAAM;QACjBS,SAAS,WAAA;iBAAM;;MAkBjB,GACA,OAAOrC,SAAS4B,EAAAA;IAClB,CAAA,GAEEU,QAAQvB,IAAIwB,aAAa,kBAC3BvC,SAAS4B,EAAAA,EAAIQ,QAAQ,IAAID,MAAAA,EAAQC,SAO/BpC,SAAS4B,EAAAA;EACjB;AAEAD,iBAAQvB,OAAO,WAAA;WAAMsB;KACrBC,QAAQC,KAAK,IACbD,QAAQA,UAAU,SAACC,IAAAA;WAAeA;KAE3BD;AACT;",
5
+ "names": ["getLoaderPath", "dynamicImport", "lastVersion", "context", "useViteRoutes", "routes", "options", "version", "loadRoutes", "paths", "globalThis", "globbedRoutesToRouteContext", "routesSync", "promises", "loadedRoutes", "clears", "Object", "keys", "map", "path", "console", "error", "loadRouteFunction", "pathWithoutRelative", "replace", "shouldRewrite", "window", "location", "env", "PROD", "originalPath", "slice", "routeModes", "info", "includes", "realPath", "pathname", "trim", "importUrl", "moduleKeys", "resolve", "id", "clearTimeout", "then", "val", "setTimeout", "catch", "err", "Error", "stack", "default", "process", "NODE_ENV"]
6
+ }
@@ -1,5 +1,8 @@
1
1
  function assertIsReady(navigationRef) {
2
- if (!navigationRef.isReady()) throw new Error("Attempted to navigate before mounting the Root Layout component. Ensure the Root Layout component is rendering a Slot, or other navigator on the first render.");
2
+ if (!navigationRef.isReady())
3
+ throw new Error("Attempted to navigate before mounting the Root Layout component. Ensure the Root Layout component is rendering a Slot, or other navigator on the first render.");
3
4
  }
4
- export { assertIsReady };
5
- //# sourceMappingURL=assertIsReady.native.js.map
5
+ export {
6
+ assertIsReady
7
+ };
8
+ //# sourceMappingURL=assertIsReady.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["assertIsReady","navigationRef","isReady","Error"],"sources":["../../../src/utils/assertIsReady.ts"],"sourcesContent":[null],"mappings":"AAEO,SAASA,cAAcC,aAAA,EAAwC;EACpE,IAAI,CAACA,aAAA,CAAcC,OAAA,CAAQ,GACzB,MAAM,IAAIC,KAAA;AAAA;AACR,SAGNH,aAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utils/Users/n8/one/packages/one/src/utils/assertIsReady.ts"],
4
+ "mappings": "AAEO,SAASA,cAAcC,eAAsC;AAClE,MAAI,CAACA,cAAcC,QAAO;AACxB,UAAM,IAAIC,MACR,gKAAA;AAGN;",
5
+ "names": ["assertIsReady", "navigationRef", "isReady", "Error"]
6
+ }
@@ -1,5 +1,7 @@
1
- var dynamicImport = function (path) {
1
+ var dynamicImport = function(path) {
2
2
  return console.info("dynamicImport TODO", path), require(path);
3
3
  };
4
- export { dynamicImport };
5
- //# sourceMappingURL=dynamicImport.native.js.map
4
+ export {
5
+ dynamicImport
6
+ };
7
+ //# sourceMappingURL=dynamicImport.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["dynamicImport","path","console","info","require"],"sources":["../../../src/utils/dynamicImport.ts"],"sourcesContent":[null],"mappings":"AAEO,IAAAA,aAAM,YAAAA,CAAiBC,IASnB;EAAA,OAAAC,OAAA,CAAAC,IAAA,uBAAAF,IAAA,GAAAG,OAAA,CAAAH,IAAA;AAAA;AAEL,S","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utils/Users/n8/one/packages/one/src/utils/dynamicImport.ts"],
4
+ "mappings": "AAEO,IAAMA,gBAAgB,SAACC,MAAAA;AAI1BC,iBAAQC,KAAK,sBAAsBF,IAAAA,GAC5BG,QAAQH,IAAAA;AASnB;",
5
+ "names": ["dynamicImport", "path", "console", "info", "require"]
6
+ }
@@ -1,6 +1,6 @@
1
1
  import { exists } from "node:fs";
2
- var existsAsync = function (file) {
3
- return new Promise(function (res, rej) {
2
+ var existsAsync = function(file) {
3
+ return new Promise(function(res, rej) {
4
4
  try {
5
5
  exists(file, res);
6
6
  } catch {
@@ -8,5 +8,7 @@ var existsAsync = function (file) {
8
8
  }
9
9
  });
10
10
  };
11
- export { existsAsync };
12
- //# sourceMappingURL=existsAsync.native.js.map
11
+ export {
12
+ existsAsync
13
+ };
14
+ //# sourceMappingURL=existsAsync.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["exists","existsAsync","file","Promise","res","rej"],"sources":["../../../src/utils/existsAsync.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAA,QAAc;AAEhB,IAAAC,WAAM,YAAAA,CAAeC,IACnB;EACL,OAAI,IAAAC,OAAA,WAAAC,GAAA,EAAAC,GAAA;IACF;MACFL,MAAQ,CAAAE,IAAA,EAAAE,GAAA;IACN,QAAO;MACT;IACD","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utils/Users/n8/one/packages/one/src/utils/existsAsync.ts"],
4
+ "mappings": "AAAA,SAASA,cAAc;AAEhB,IAAMC,cAAc,SAACC,MAAAA;AAC1B,SAAO,IAAIC,QAAQ,SAACC,KAAKC,KAAAA;AACvB,QAAI;AACFL,aAAOE,MAAME,GAAAA;IACf,QAAQ;AACN,aAAO;IACT;EACF,CAAA;AACF;",
5
+ "names": ["exists", "existsAsync", "file", "Promise", "res", "rej"]
6
+ }