one 1.1.308 → 1.1.310

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 (375) hide show
  1. package/dist/cjs/Root.cjs +212 -0
  2. package/dist/cjs/{Route.js → Route.cjs} +34 -19
  3. package/dist/cjs/{cleanUrl.js → cleanUrl.cjs} +27 -18
  4. package/dist/cjs/cli/label-process.cjs +31 -0
  5. package/dist/cjs/cli/{main.js → main.cjs} +28 -16
  6. package/dist/cjs/cli/{prebuild.js → prebuild.cjs} +25 -15
  7. package/dist/cjs/cli/run.cjs +70 -0
  8. package/dist/cjs/cli/{runAndroid.js → runAndroid.cjs} +25 -15
  9. package/dist/cjs/cli/{runIos.js → runIos.cjs} +25 -15
  10. package/dist/cjs/cli.cjs +258 -0
  11. package/dist/cjs/clientLoaderResolver.cjs +35 -0
  12. package/dist/cjs/config.cjs +32 -0
  13. package/dist/cjs/constants.cjs +30 -0
  14. package/dist/cjs/{createApp.js → createApp.cjs} +33 -17
  15. package/dist/cjs/createApp.native.cjs +38 -0
  16. package/dist/cjs/createApp.native.cjs.map +6 -0
  17. package/dist/cjs/{createHandleRequest.js → createHandleRequest.cjs} +60 -49
  18. package/dist/cjs/createRoute.cjs +42 -0
  19. package/dist/cjs/fallbackViews/{Sitemap.js → Sitemap.cjs} +35 -16
  20. package/dist/cjs/fallbackViews/{Unmatched.js → Unmatched.cjs} +32 -17
  21. package/dist/cjs/fork/NavigationContainer.cjs +105 -0
  22. package/dist/cjs/fork/NavigationContainer.native.cjs +103 -0
  23. package/dist/cjs/fork/NavigationContainer.native.cjs.map +6 -0
  24. package/dist/cjs/fork/createMemoryHistory.cjs +136 -0
  25. package/dist/cjs/fork/{extractPathFromURL.js → extractPathFromURL.cjs} +30 -21
  26. package/dist/cjs/fork/findFocusedRoute.cjs +30 -0
  27. package/dist/cjs/fork/{getPathFromState.js → getPathFromState.cjs} +120 -113
  28. package/dist/cjs/fork/getStateFromPath.cjs +366 -0
  29. package/dist/cjs/fork/useLinking.cjs +215 -0
  30. package/dist/cjs/fork/useLinking.native.cjs +126 -0
  31. package/dist/cjs/fork/useLinking.native.cjs.map +6 -0
  32. package/dist/cjs/fork/validatePathConfig.cjs +44 -0
  33. package/dist/cjs/{getLinkingConfig.js → getLinkingConfig.cjs} +21 -15
  34. package/dist/cjs/{getReactNavigationConfig.js → getReactNavigationConfig.cjs} +33 -32
  35. package/dist/cjs/getRoutes.cjs +276 -0
  36. package/dist/cjs/{getURL.js → getURL.cjs} +16 -11
  37. package/dist/cjs/getURL.native.cjs +48 -0
  38. package/dist/cjs/getURL.native.cjs.map +6 -0
  39. package/dist/cjs/head/Head.android.cjs +28 -0
  40. package/dist/cjs/head/Head.android.cjs.map +6 -0
  41. package/dist/cjs/head/Head.cjs +30 -0
  42. package/dist/cjs/head/Head.ios.cjs +210 -0
  43. package/dist/cjs/head/Head.ios.cjs.map +6 -0
  44. package/dist/cjs/head/HeadModule.cjs +27 -0
  45. package/dist/cjs/head/index.cjs +18 -0
  46. package/dist/cjs/head/types.cjs +16 -0
  47. package/dist/cjs/head/url.cjs +50 -0
  48. package/dist/cjs/{hooks.js → hooks.cjs} +52 -40
  49. package/dist/cjs/{imperative-api.js → imperative-api.cjs} +26 -19
  50. package/dist/cjs/import-mode/index.android.cjs +26 -0
  51. package/dist/cjs/import-mode/index.android.cjs.map +6 -0
  52. package/dist/cjs/import-mode/index.cjs +26 -0
  53. package/dist/cjs/import-mode/index.ios.cjs +26 -0
  54. package/dist/cjs/import-mode/index.ios.cjs.map +6 -0
  55. package/dist/cjs/import-mode/index.native.cjs +26 -0
  56. package/dist/cjs/import-mode/index.native.cjs.map +6 -0
  57. package/dist/cjs/import-mode/index.web.cjs +26 -0
  58. package/dist/cjs/{index.js → index.cjs} +50 -14
  59. package/dist/cjs/interfaces/router.cjs +27 -0
  60. package/dist/cjs/layouts/Drawer.cjs +31 -0
  61. package/dist/cjs/layouts/Stack.cjs +31 -0
  62. package/dist/cjs/layouts/Tabs.cjs +64 -0
  63. package/dist/cjs/layouts/withLayoutContext.cjs +91 -0
  64. package/dist/cjs/link/Link.cjs +120 -0
  65. package/dist/cjs/link/Redirect.cjs +39 -0
  66. package/dist/cjs/link/href.cjs +58 -0
  67. package/dist/cjs/link/linking.cjs +89 -0
  68. package/dist/cjs/link/path.cjs +69 -0
  69. package/dist/cjs/link/useLinkTo.cjs +54 -0
  70. package/dist/cjs/link/useLoadedNavigation.cjs +60 -0
  71. package/dist/cjs/{matchers.js → matchers.cjs} +16 -11
  72. package/dist/cjs/platform.cjs +26 -0
  73. package/dist/cjs/polyfills-mobile.cjs +33 -0
  74. package/dist/cjs/polyfills-server.cjs +25 -0
  75. package/dist/cjs/render.cjs +47 -0
  76. package/dist/cjs/render.native.cjs +28 -0
  77. package/dist/cjs/render.native.cjs.map +6 -0
  78. package/dist/cjs/router/RouterStore.cjs +16 -0
  79. package/dist/cjs/router/constants.cjs +26 -0
  80. package/dist/cjs/router/{getNormalizedStatePath.js → getNormalizedStatePath.cjs} +25 -23
  81. package/dist/cjs/router/lastAction.cjs +31 -0
  82. package/dist/cjs/router/{router.js → router.cjs} +104 -78
  83. package/dist/cjs/router/serverLocationContext.cjs +27 -0
  84. package/dist/cjs/router/{useInitializeOneRouter.js → useInitializeOneRouter.cjs} +26 -16
  85. package/dist/cjs/serve.cjs +185 -0
  86. package/dist/cjs/server/{createRoutesManifest.js → createRoutesManifest.cjs} +22 -16
  87. package/dist/cjs/server/{getServerManifest.js → getServerManifest.cjs} +58 -31
  88. package/dist/cjs/{server-render.js → server-render.cjs} +28 -17
  89. package/dist/cjs/sortRoutes.cjs +62 -0
  90. package/dist/cjs/typed-routes/generateRouteTypes.cjs +48 -0
  91. package/dist/cjs/typed-routes/{getTypedRoutesDeclarationFile.js → getTypedRoutesDeclarationFile.cjs} +37 -40
  92. package/dist/cjs/types.cjs +16 -0
  93. package/dist/cjs/{useFocusEffect.js → useFocusEffect.cjs} +33 -24
  94. package/dist/cjs/useLoader.cjs +114 -0
  95. package/dist/cjs/useNavigation.cjs +68 -0
  96. package/dist/cjs/useScreens.cjs +233 -0
  97. package/dist/cjs/{useViteRoutes.js → useViteRoutes.cjs} +36 -24
  98. package/dist/cjs/utils/assertIsReady.cjs +28 -0
  99. package/dist/cjs/utils/dynamicImport.cjs +27 -0
  100. package/dist/cjs/utils/existsAsync.cjs +33 -0
  101. package/dist/cjs/utils/getPageExport.cjs +32 -0
  102. package/dist/cjs/utils/{globDir.js → globDir.cjs} +23 -15
  103. package/dist/cjs/utils/{hashString.js → hashString.cjs} +22 -14
  104. package/dist/cjs/utils/isResponse.cjs +28 -0
  105. package/dist/cjs/utils/isStatus.cjs +28 -0
  106. package/dist/cjs/utils/promiseWithResolvers.cjs +37 -0
  107. package/dist/cjs/utils/rand.cjs +26 -0
  108. package/dist/cjs/utils/redirect.cjs +34 -0
  109. package/dist/cjs/utils/removeSearch.cjs +28 -0
  110. package/dist/cjs/utils/removeUndefined.cjs +30 -0
  111. package/dist/cjs/utils/{url.js → url.cjs} +16 -11
  112. package/dist/cjs/utils/weakKey.cjs +30 -0
  113. package/dist/cjs/utils/weakMemo.cjs +34 -0
  114. package/dist/cjs/views/EmptyRoute.cjs +30 -0
  115. package/dist/cjs/views/{ErrorBoundary.js → ErrorBoundary.cjs} +30 -16
  116. package/dist/cjs/views/LoadProgressBar.cjs +90 -0
  117. package/dist/cjs/views/Navigator.cjs +149 -0
  118. package/dist/cjs/views/{PreloadLinks.js → PreloadLinks.cjs} +20 -13
  119. package/dist/cjs/views/PreloadLinks.native.cjs +28 -0
  120. package/dist/cjs/views/PreloadLinks.native.cjs.map +6 -0
  121. package/dist/cjs/views/{RootErrorBoundary.js → RootErrorBoundary.cjs} +28 -16
  122. package/dist/cjs/views/Screen.cjs +39 -0
  123. package/dist/cjs/views/ScrollRestoration.cjs +74 -0
  124. package/dist/cjs/views/Try.cjs +68 -0
  125. package/dist/cjs/vite/build.cjs +425 -0
  126. package/dist/cjs/vite/{clientTreeShakePlugin.js → clientTreeShakePlugin.cjs} +53 -35
  127. package/dist/cjs/vite/constants.cjs +28 -0
  128. package/dist/cjs/vite/{createFileSystemRouter.js → createFileSystemRouter.cjs} +117 -84
  129. package/dist/cjs/vite/{customNodeExternals.js → customNodeExternals.cjs} +32 -20
  130. package/dist/cjs/vite/ensureTsConfig.cjs +68 -0
  131. package/dist/cjs/vite/findDepsToOptimize.cjs +74 -0
  132. package/dist/cjs/vite/{fixDependenciesPlugin.js → fixDependenciesPlugin.cjs} +17 -12
  133. package/dist/cjs/vite/generateTypesForRoutes.cjs +45 -0
  134. package/dist/cjs/vite/{getManifest.js → getManifest.cjs} +18 -12
  135. package/dist/cjs/vite/{headers.js → headers.cjs} +19 -14
  136. package/dist/cjs/vite/headers.native.cjs +32 -0
  137. package/dist/cjs/vite/headers.native.cjs.map +6 -0
  138. package/dist/cjs/vite/{loadEnv.js → loadEnv.cjs} +27 -16
  139. package/dist/cjs/vite/makePluginWebOnly.cjs +31 -0
  140. package/dist/cjs/vite/one.cjs +256 -0
  141. package/dist/cjs/vite/{removeReactNativeWebAnimatedPlugin.js → removeReactNativeWebAnimatedPlugin.cjs} +32 -25
  142. package/dist/cjs/vite/replaceLoader.cjs +37 -0
  143. package/dist/cjs/vite/resolveAPIRequest.cjs +90 -0
  144. package/dist/cjs/vite/server.cjs +13 -0
  145. package/dist/cjs/vite/types.cjs +16 -0
  146. package/dist/cjs/vite/{virtualEntryPlugin.js → virtualEntryPlugin.cjs} +28 -20
  147. package/dist/cjs/vite/{vitePluginSsrCss.js → vitePluginSsrCss.cjs} +56 -50
  148. package/dist/cjs/vite.cjs +40 -0
  149. package/dist/cjs/zero/getQueryKey.cjs +29 -0
  150. package/dist/cjs/zero/isZeroQuery.cjs +28 -0
  151. package/dist/cjs/zero/resolveQuery.cjs +41 -0
  152. package/dist/cjs/zero/{subscribeToQuery.js → subscribeToQuery.cjs} +16 -11
  153. package/dist/cjs/zero/types.cjs +16 -0
  154. package/dist/cjs/zero/useQuery.cjs +58 -0
  155. package/dist/cjs/zero/{useQueryZero.js → useQueryZero.cjs} +21 -15
  156. package/dist/cjs/zero.cjs +30 -0
  157. package/package.json +10 -10
  158. package/dist/cjs/Root.js +0 -182
  159. package/dist/cjs/cli/label-process.js +0 -25
  160. package/dist/cjs/cli/run.js +0 -52
  161. package/dist/cjs/cli.js +0 -209
  162. package/dist/cjs/clientLoaderResolver.js +0 -32
  163. package/dist/cjs/config.js +0 -27
  164. package/dist/cjs/constants.js +0 -23
  165. package/dist/cjs/createRoute.js +0 -37
  166. package/dist/cjs/fork/NavigationContainer.js +0 -85
  167. package/dist/cjs/fork/createMemoryHistory.js +0 -100
  168. package/dist/cjs/fork/findFocusedRoute.js +0 -26
  169. package/dist/cjs/fork/getStateFromPath.js +0 -381
  170. package/dist/cjs/fork/useLinking.js +0 -182
  171. package/dist/cjs/fork/validatePathConfig.js +0 -46
  172. package/dist/cjs/getRoutes.js +0 -294
  173. package/dist/cjs/head/Head.js +0 -23
  174. package/dist/cjs/head/HeadModule.js +0 -22
  175. package/dist/cjs/head/index.js +0 -15
  176. package/dist/cjs/head/types.js +0 -14
  177. package/dist/cjs/head/url.js +0 -52
  178. package/dist/cjs/import-mode/index.js +0 -21
  179. package/dist/cjs/import-mode/index.web.js +0 -21
  180. package/dist/cjs/interfaces/router.js +0 -23
  181. package/dist/cjs/layouts/Drawer.js +0 -24
  182. package/dist/cjs/layouts/Stack.js +0 -24
  183. package/dist/cjs/layouts/Tabs.js +0 -52
  184. package/dist/cjs/layouts/withLayoutContext.js +0 -77
  185. package/dist/cjs/link/Link.js +0 -98
  186. package/dist/cjs/link/Redirect.js +0 -31
  187. package/dist/cjs/link/href.js +0 -50
  188. package/dist/cjs/link/linking.js +0 -82
  189. package/dist/cjs/link/path.js +0 -65
  190. package/dist/cjs/link/useLinkTo.js +0 -42
  191. package/dist/cjs/link/useLoadedNavigation.js +0 -50
  192. package/dist/cjs/platform.js +0 -21
  193. package/dist/cjs/polyfills-mobile.js +0 -26
  194. package/dist/cjs/polyfills-server.js +0 -23
  195. package/dist/cjs/render.js +0 -44
  196. package/dist/cjs/router/RouterStore.js +0 -14
  197. package/dist/cjs/router/constants.js +0 -21
  198. package/dist/cjs/router/lastAction.js +0 -25
  199. package/dist/cjs/router/serverLocationContext.js +0 -22
  200. package/dist/cjs/serve.js +0 -175
  201. package/dist/cjs/sortRoutes.js +0 -64
  202. package/dist/cjs/typed-routes/generateRouteTypes.js +0 -33
  203. package/dist/cjs/types.js +0 -14
  204. package/dist/cjs/useLoader.js +0 -97
  205. package/dist/cjs/useNavigation.js +0 -60
  206. package/dist/cjs/useScreens.js +0 -176
  207. package/dist/cjs/utils/assertIsReady.js +0 -26
  208. package/dist/cjs/utils/dynamicImport.js +0 -24
  209. package/dist/cjs/utils/existsAsync.js +0 -28
  210. package/dist/cjs/utils/getPageExport.js +0 -27
  211. package/dist/cjs/utils/isResponse.js +0 -23
  212. package/dist/cjs/utils/isStatus.js +0 -23
  213. package/dist/cjs/utils/promiseWithResolvers.js +0 -26
  214. package/dist/cjs/utils/rand.js +0 -21
  215. package/dist/cjs/utils/redirect.js +0 -28
  216. package/dist/cjs/utils/removeSearch.js +0 -23
  217. package/dist/cjs/utils/removeUndefined.js +0 -26
  218. package/dist/cjs/utils/weakKey.js +0 -24
  219. package/dist/cjs/utils/weakMemo.js +0 -30
  220. package/dist/cjs/views/EmptyRoute.js +0 -25
  221. package/dist/cjs/views/LoadProgressBar.js +0 -83
  222. package/dist/cjs/views/Navigator.js +0 -101
  223. package/dist/cjs/views/Screen.js +0 -29
  224. package/dist/cjs/views/ScrollRestoration.js +0 -70
  225. package/dist/cjs/views/Try.js +0 -44
  226. package/dist/cjs/vite/build.js +0 -376
  227. package/dist/cjs/vite/constants.js +0 -22
  228. package/dist/cjs/vite/ensureTsConfig.js +0 -66
  229. package/dist/cjs/vite/findDepsToOptimize.js +0 -66
  230. package/dist/cjs/vite/generateTypesForRoutes.js +0 -36
  231. package/dist/cjs/vite/makePluginWebOnly.js +0 -27
  232. package/dist/cjs/vite/one.js +0 -255
  233. package/dist/cjs/vite/replaceLoader.js +0 -34
  234. package/dist/cjs/vite/resolveAPIRequest.js +0 -71
  235. package/dist/cjs/vite/server.js +0 -16
  236. package/dist/cjs/vite/types.js +0 -14
  237. package/dist/cjs/vite.js +0 -28
  238. package/dist/cjs/zero/getQueryKey.js +0 -24
  239. package/dist/cjs/zero/isZeroQuery.js +0 -23
  240. package/dist/cjs/zero/resolveQuery.js +0 -38
  241. package/dist/cjs/zero/types.js +0 -14
  242. package/dist/cjs/zero/useQuery.js +0 -47
  243. package/dist/cjs/zero.js +0 -23
  244. /package/dist/cjs/{Root.js.map → Root.cjs.map} +0 -0
  245. /package/dist/cjs/{Route.js.map → Route.cjs.map} +0 -0
  246. /package/dist/cjs/{cleanUrl.js.map → cleanUrl.cjs.map} +0 -0
  247. /package/dist/cjs/cli/{label-process.js.map → label-process.cjs.map} +0 -0
  248. /package/dist/cjs/cli/{main.js.map → main.cjs.map} +0 -0
  249. /package/dist/cjs/cli/{prebuild.js.map → prebuild.cjs.map} +0 -0
  250. /package/dist/cjs/cli/{run.js.map → run.cjs.map} +0 -0
  251. /package/dist/cjs/cli/{runAndroid.js.map → runAndroid.cjs.map} +0 -0
  252. /package/dist/cjs/cli/{runIos.js.map → runIos.cjs.map} +0 -0
  253. /package/dist/cjs/{cli.js.map → cli.cjs.map} +0 -0
  254. /package/dist/cjs/{clientLoaderResolver.js.map → clientLoaderResolver.cjs.map} +0 -0
  255. /package/dist/cjs/{config.js.map → config.cjs.map} +0 -0
  256. /package/dist/cjs/{constants.js.map → constants.cjs.map} +0 -0
  257. /package/dist/cjs/{createApp.js.map → createApp.cjs.map} +0 -0
  258. /package/dist/cjs/{createHandleRequest.js.map → createHandleRequest.cjs.map} +0 -0
  259. /package/dist/cjs/{createRoute.js.map → createRoute.cjs.map} +0 -0
  260. /package/dist/cjs/fallbackViews/{Sitemap.js.map → Sitemap.cjs.map} +0 -0
  261. /package/dist/cjs/fallbackViews/{Unmatched.js.map → Unmatched.cjs.map} +0 -0
  262. /package/dist/cjs/fork/{NavigationContainer.js.map → NavigationContainer.cjs.map} +0 -0
  263. /package/dist/cjs/fork/{createMemoryHistory.js.map → createMemoryHistory.cjs.map} +0 -0
  264. /package/dist/cjs/fork/{extractPathFromURL.js.map → extractPathFromURL.cjs.map} +0 -0
  265. /package/dist/cjs/fork/{findFocusedRoute.js.map → findFocusedRoute.cjs.map} +0 -0
  266. /package/dist/cjs/fork/{getPathFromState.js.map → getPathFromState.cjs.map} +0 -0
  267. /package/dist/cjs/fork/{getStateFromPath.js.map → getStateFromPath.cjs.map} +0 -0
  268. /package/dist/cjs/fork/{useLinking.js.map → useLinking.cjs.map} +0 -0
  269. /package/dist/cjs/fork/{validatePathConfig.js.map → validatePathConfig.cjs.map} +0 -0
  270. /package/dist/cjs/{getLinkingConfig.js.map → getLinkingConfig.cjs.map} +0 -0
  271. /package/dist/cjs/{getReactNavigationConfig.js.map → getReactNavigationConfig.cjs.map} +0 -0
  272. /package/dist/cjs/{getRoutes.js.map → getRoutes.cjs.map} +0 -0
  273. /package/dist/cjs/{getURL.js.map → getURL.cjs.map} +0 -0
  274. /package/dist/cjs/head/{Head.js.map → Head.cjs.map} +0 -0
  275. /package/dist/cjs/head/{HeadModule.js.map → HeadModule.cjs.map} +0 -0
  276. /package/dist/cjs/head/{index.js.map → index.cjs.map} +0 -0
  277. /package/dist/cjs/head/{types.js.map → types.cjs.map} +0 -0
  278. /package/dist/cjs/head/{url.js.map → url.cjs.map} +0 -0
  279. /package/dist/cjs/{hooks.js.map → hooks.cjs.map} +0 -0
  280. /package/dist/cjs/{imperative-api.js.map → imperative-api.cjs.map} +0 -0
  281. /package/dist/cjs/import-mode/{index.js.map → index.cjs.map} +0 -0
  282. /package/dist/cjs/import-mode/{index.web.js.map → index.web.cjs.map} +0 -0
  283. /package/dist/cjs/{index.js.map → index.cjs.map} +0 -0
  284. /package/dist/cjs/interfaces/{router.js.map → router.cjs.map} +0 -0
  285. /package/dist/cjs/layouts/{Drawer.js.map → Drawer.cjs.map} +0 -0
  286. /package/dist/cjs/layouts/{Stack.js.map → Stack.cjs.map} +0 -0
  287. /package/dist/cjs/layouts/{Tabs.js.map → Tabs.cjs.map} +0 -0
  288. /package/dist/cjs/layouts/{withLayoutContext.js.map → withLayoutContext.cjs.map} +0 -0
  289. /package/dist/cjs/link/{Link.js.map → Link.cjs.map} +0 -0
  290. /package/dist/cjs/link/{Redirect.js.map → Redirect.cjs.map} +0 -0
  291. /package/dist/cjs/link/{href.js.map → href.cjs.map} +0 -0
  292. /package/dist/cjs/link/{linking.js.map → linking.cjs.map} +0 -0
  293. /package/dist/cjs/link/{path.js.map → path.cjs.map} +0 -0
  294. /package/dist/cjs/link/{useLinkTo.js.map → useLinkTo.cjs.map} +0 -0
  295. /package/dist/cjs/link/{useLoadedNavigation.js.map → useLoadedNavigation.cjs.map} +0 -0
  296. /package/dist/cjs/{matchers.js.map → matchers.cjs.map} +0 -0
  297. /package/dist/cjs/{platform.js.map → platform.cjs.map} +0 -0
  298. /package/dist/cjs/{polyfills-mobile.js.map → polyfills-mobile.cjs.map} +0 -0
  299. /package/dist/cjs/{polyfills-server.js.map → polyfills-server.cjs.map} +0 -0
  300. /package/dist/cjs/{render.js.map → render.cjs.map} +0 -0
  301. /package/dist/cjs/router/{RouterStore.js.map → RouterStore.cjs.map} +0 -0
  302. /package/dist/cjs/router/{constants.js.map → constants.cjs.map} +0 -0
  303. /package/dist/cjs/router/{getNormalizedStatePath.js.map → getNormalizedStatePath.cjs.map} +0 -0
  304. /package/dist/cjs/router/{lastAction.js.map → lastAction.cjs.map} +0 -0
  305. /package/dist/cjs/router/{router.js.map → router.cjs.map} +0 -0
  306. /package/dist/cjs/router/{serverLocationContext.js.map → serverLocationContext.cjs.map} +0 -0
  307. /package/dist/cjs/router/{useInitializeOneRouter.js.map → useInitializeOneRouter.cjs.map} +0 -0
  308. /package/dist/cjs/{serve.js.map → serve.cjs.map} +0 -0
  309. /package/dist/cjs/server/{createRoutesManifest.js.map → createRoutesManifest.cjs.map} +0 -0
  310. /package/dist/cjs/server/{getServerManifest.js.map → getServerManifest.cjs.map} +0 -0
  311. /package/dist/cjs/{server-render.js.map → server-render.cjs.map} +0 -0
  312. /package/dist/cjs/{sortRoutes.js.map → sortRoutes.cjs.map} +0 -0
  313. /package/dist/cjs/typed-routes/{generateRouteTypes.js.map → generateRouteTypes.cjs.map} +0 -0
  314. /package/dist/cjs/typed-routes/{getTypedRoutesDeclarationFile.js.map → getTypedRoutesDeclarationFile.cjs.map} +0 -0
  315. /package/dist/cjs/{types.js.map → types.cjs.map} +0 -0
  316. /package/dist/cjs/{useFocusEffect.js.map → useFocusEffect.cjs.map} +0 -0
  317. /package/dist/cjs/{useLoader.js.map → useLoader.cjs.map} +0 -0
  318. /package/dist/cjs/{useNavigation.js.map → useNavigation.cjs.map} +0 -0
  319. /package/dist/cjs/{useScreens.js.map → useScreens.cjs.map} +0 -0
  320. /package/dist/cjs/{useViteRoutes.js.map → useViteRoutes.cjs.map} +0 -0
  321. /package/dist/cjs/utils/{assertIsReady.js.map → assertIsReady.cjs.map} +0 -0
  322. /package/dist/cjs/utils/{dynamicImport.js.map → dynamicImport.cjs.map} +0 -0
  323. /package/dist/cjs/utils/{existsAsync.js.map → existsAsync.cjs.map} +0 -0
  324. /package/dist/cjs/utils/{getPageExport.js.map → getPageExport.cjs.map} +0 -0
  325. /package/dist/cjs/utils/{globDir.js.map → globDir.cjs.map} +0 -0
  326. /package/dist/cjs/utils/{hashString.js.map → hashString.cjs.map} +0 -0
  327. /package/dist/cjs/utils/{isResponse.js.map → isResponse.cjs.map} +0 -0
  328. /package/dist/cjs/utils/{isStatus.js.map → isStatus.cjs.map} +0 -0
  329. /package/dist/cjs/utils/{promiseWithResolvers.js.map → promiseWithResolvers.cjs.map} +0 -0
  330. /package/dist/cjs/utils/{rand.js.map → rand.cjs.map} +0 -0
  331. /package/dist/cjs/utils/{redirect.js.map → redirect.cjs.map} +0 -0
  332. /package/dist/cjs/utils/{removeSearch.js.map → removeSearch.cjs.map} +0 -0
  333. /package/dist/cjs/utils/{removeUndefined.js.map → removeUndefined.cjs.map} +0 -0
  334. /package/dist/cjs/utils/{url.js.map → url.cjs.map} +0 -0
  335. /package/dist/cjs/utils/{weakKey.js.map → weakKey.cjs.map} +0 -0
  336. /package/dist/cjs/utils/{weakMemo.js.map → weakMemo.cjs.map} +0 -0
  337. /package/dist/cjs/views/{EmptyRoute.js.map → EmptyRoute.cjs.map} +0 -0
  338. /package/dist/cjs/views/{ErrorBoundary.js.map → ErrorBoundary.cjs.map} +0 -0
  339. /package/dist/cjs/views/{LoadProgressBar.js.map → LoadProgressBar.cjs.map} +0 -0
  340. /package/dist/cjs/views/{Navigator.js.map → Navigator.cjs.map} +0 -0
  341. /package/dist/cjs/views/{PreloadLinks.js.map → PreloadLinks.cjs.map} +0 -0
  342. /package/dist/cjs/views/{RootErrorBoundary.js.map → RootErrorBoundary.cjs.map} +0 -0
  343. /package/dist/cjs/views/{Screen.js.map → Screen.cjs.map} +0 -0
  344. /package/dist/cjs/views/{ScrollRestoration.js.map → ScrollRestoration.cjs.map} +0 -0
  345. /package/dist/cjs/views/{Try.js.map → Try.cjs.map} +0 -0
  346. /package/dist/cjs/vite/{build.js.map → build.cjs.map} +0 -0
  347. /package/dist/cjs/vite/{clientTreeShakePlugin.js.map → clientTreeShakePlugin.cjs.map} +0 -0
  348. /package/dist/cjs/vite/{constants.js.map → constants.cjs.map} +0 -0
  349. /package/dist/cjs/vite/{createFileSystemRouter.js.map → createFileSystemRouter.cjs.map} +0 -0
  350. /package/dist/cjs/vite/{customNodeExternals.js.map → customNodeExternals.cjs.map} +0 -0
  351. /package/dist/cjs/vite/{ensureTsConfig.js.map → ensureTsConfig.cjs.map} +0 -0
  352. /package/dist/cjs/vite/{findDepsToOptimize.js.map → findDepsToOptimize.cjs.map} +0 -0
  353. /package/dist/cjs/vite/{fixDependenciesPlugin.js.map → fixDependenciesPlugin.cjs.map} +0 -0
  354. /package/dist/cjs/vite/{generateTypesForRoutes.js.map → generateTypesForRoutes.cjs.map} +0 -0
  355. /package/dist/cjs/vite/{getManifest.js.map → getManifest.cjs.map} +0 -0
  356. /package/dist/cjs/vite/{headers.js.map → headers.cjs.map} +0 -0
  357. /package/dist/cjs/vite/{loadEnv.js.map → loadEnv.cjs.map} +0 -0
  358. /package/dist/cjs/vite/{makePluginWebOnly.js.map → makePluginWebOnly.cjs.map} +0 -0
  359. /package/dist/cjs/vite/{one.js.map → one.cjs.map} +0 -0
  360. /package/dist/cjs/vite/{removeReactNativeWebAnimatedPlugin.js.map → removeReactNativeWebAnimatedPlugin.cjs.map} +0 -0
  361. /package/dist/cjs/vite/{replaceLoader.js.map → replaceLoader.cjs.map} +0 -0
  362. /package/dist/cjs/vite/{resolveAPIRequest.js.map → resolveAPIRequest.cjs.map} +0 -0
  363. /package/dist/cjs/vite/{server.js.map → server.cjs.map} +0 -0
  364. /package/dist/cjs/vite/{types.js.map → types.cjs.map} +0 -0
  365. /package/dist/cjs/vite/{virtualEntryPlugin.js.map → virtualEntryPlugin.cjs.map} +0 -0
  366. /package/dist/cjs/vite/{vitePluginSsrCss.js.map → vitePluginSsrCss.cjs.map} +0 -0
  367. /package/dist/cjs/{vite.js.map → vite.cjs.map} +0 -0
  368. /package/dist/cjs/zero/{getQueryKey.js.map → getQueryKey.cjs.map} +0 -0
  369. /package/dist/cjs/zero/{isZeroQuery.js.map → isZeroQuery.cjs.map} +0 -0
  370. /package/dist/cjs/zero/{resolveQuery.js.map → resolveQuery.cjs.map} +0 -0
  371. /package/dist/cjs/zero/{subscribeToQuery.js.map → subscribeToQuery.cjs.map} +0 -0
  372. /package/dist/cjs/zero/{types.js.map → types.cjs.map} +0 -0
  373. /package/dist/cjs/zero/{useQuery.js.map → useQuery.cjs.map} +0 -0
  374. /package/dist/cjs/zero/{useQueryZero.js.map → useQueryZero.cjs.map} +0 -0
  375. /package/dist/cjs/{zero.js.map → zero.cjs.map} +0 -0
@@ -1,182 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var useLinking_exports = {};
24
- __export(useLinking_exports, {
25
- default: () => useLinking,
26
- series: () => series
27
- });
28
- module.exports = __toCommonJS(useLinking_exports);
29
- var import_core = require("@react-navigation/core"), import_fast_deep_equal = __toESM(require("fast-deep-equal"), 1), React = __toESM(require("react"), 1), import_createMemoryHistory = __toESM(require("./createMemoryHistory"), 1), import_serverLocationContext = require("../router/serverLocationContext"), import_getPathFromState = require("./getPathFromState");
30
- const historyGlobal = (0, import_createMemoryHistory.default)();
31
- typeof window < "u" && historyGlobal.listen(() => {
32
- globalThis.__vxrntodopath = window.location.pathname;
33
- });
34
- const findMatchingState = (a, b) => {
35
- if (a === void 0 || b === void 0 || a.key !== b.key)
36
- return [void 0, void 0];
37
- const aHistoryLength = a.history ? a.history.length : a.routes.length, bHistoryLength = b.history ? b.history.length : b.routes.length, aRoute = a.routes[a.index], bRoute = b.routes[b.index], aChildState = aRoute.state, bChildState = bRoute.state;
38
- return aHistoryLength !== bHistoryLength || aRoute.key !== bRoute.key || aChildState === void 0 || bChildState === void 0 || aChildState.key !== bChildState.key ? [a, b] : findMatchingState(aChildState, bChildState);
39
- }, series = (cb) => {
40
- let queue = Promise.resolve();
41
- return () => {
42
- queue = queue.then(cb);
43
- };
44
- };
45
- let linkingHandlers = [];
46
- function useLinking(ref, {
47
- independent,
48
- enabled = !0,
49
- config,
50
- getStateFromPath = import_core.getStateFromPath,
51
- getPathFromState = import_core.getPathFromState,
52
- getActionFromState = import_core.getActionFromState
53
- }) {
54
- React.useEffect(() => {
55
- if (process.env.NODE_ENV === "production" || independent)
56
- return;
57
- enabled !== !1 && linkingHandlers.length && console.error(
58
- [
59
- "Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:",
60
- "- You don't have multiple NavigationContainers in the app each with 'linking' enabled",
61
- "- Only a single instance of the root component is rendered"
62
- ].join(`
63
- `).trim()
64
- );
65
- const handler = Symbol();
66
- return enabled !== !1 && linkingHandlers.push(handler), () => {
67
- const index = linkingHandlers.indexOf(handler);
68
- index > -1 && linkingHandlers.splice(index, 1);
69
- };
70
- }, [enabled, independent]);
71
- const [history] = React.useState(historyGlobal), enabledRef = React.useRef(enabled), configRef = React.useRef(config), getStateFromPathRef = React.useRef(getStateFromPath), getPathFromStateRef = React.useRef(getPathFromState), getActionFromStateRef = React.useRef(getActionFromState);
72
- React.useEffect(() => {
73
- enabledRef.current = enabled, configRef.current = config, getStateFromPathRef.current = getStateFromPath, getPathFromStateRef.current = getPathFromState, getActionFromStateRef.current = getActionFromState;
74
- });
75
- const server = { location: React.useContext(import_serverLocationContext.ServerLocationContext) }, getInitialState = React.useCallback(() => {
76
- let value;
77
- if (enabledRef.current) {
78
- const location2 = server?.location ?? (typeof window < "u" ? window.location : void 0), path = location2 ? location2.pathname + location2.search : void 0;
79
- path && (value = getStateFromPathRef.current(path, configRef.current));
80
- }
81
- const thenable = {
82
- // biome-ignore lint/suspicious/noThenProperty: <explanation>
83
- then(onfulfilled) {
84
- return Promise.resolve(onfulfilled ? onfulfilled(value) : value);
85
- },
86
- catch() {
87
- return thenable;
88
- }
89
- };
90
- return thenable;
91
- }, []), previousIndexRef = React.useRef(void 0), previousStateRef = React.useRef(void 0), pendingPopStatePathRef = React.useRef(void 0);
92
- return React.useEffect(() => (previousIndexRef.current = history.index, history.listen(() => {
93
- const navigation = ref.current;
94
- if (!navigation || !enabled)
95
- return;
96
- const { location: location2 } = window, path = location2.pathname + location2.search, index = history.index, previousIndex = previousIndexRef.current ?? 0;
97
- previousIndexRef.current = index, pendingPopStatePathRef.current = path;
98
- const record = history.get(index);
99
- if (record?.path === path && record?.state) {
100
- navigation.resetRoot(record.state);
101
- return;
102
- }
103
- const state = getStateFromPathRef.current(path, configRef.current);
104
- if (state) {
105
- const rootState = navigation.getRootState();
106
- if (state.routes.some((r) => !rootState?.routeNames.includes(r.name))) {
107
- console.warn(
108
- "The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration."
109
- );
110
- return;
111
- }
112
- if (index > previousIndex) {
113
- const action = getActionFromStateRef.current(state, configRef.current);
114
- if (action !== void 0)
115
- try {
116
- navigation.dispatch(action);
117
- } catch (e) {
118
- console.warn(
119
- `An error occurred when trying to handle the link '${path}': ${typeof e == "object" && e != null && "message" in e ? e.message : e}`
120
- );
121
- }
122
- else
123
- navigation.resetRoot(state);
124
- } else
125
- navigation.resetRoot(state);
126
- } else
127
- navigation.resetRoot(state);
128
- })), [enabled, history, ref]), React.useEffect(() => {
129
- if (!enabled)
130
- return;
131
- const getPathForRoute = (route, state) => {
132
- if (route?.path) {
133
- const stateForPath = getStateFromPathRef.current(route.path, configRef.current);
134
- if (stateForPath) {
135
- const focusedRoute = (0, import_core.findFocusedRoute)(stateForPath);
136
- if (focusedRoute && focusedRoute.name === route.name && (0, import_fast_deep_equal.default)(focusedRoute.params, route.params))
137
- return (0, import_getPathFromState.appendBaseUrl)(route.path);
138
- }
139
- }
140
- return getPathFromStateRef.current(state, configRef.current);
141
- };
142
- if (ref.current) {
143
- const state = ref.current.getRootState();
144
- if (state) {
145
- const route = (0, import_core.findFocusedRoute)(state), path = getPathForRoute(route, state);
146
- previousStateRef.current === void 0 && (previousStateRef.current = state), history.replace({ path, state });
147
- }
148
- }
149
- const onStateChange = async () => {
150
- const navigation = ref.current;
151
- if (!navigation || !enabled)
152
- return;
153
- const previousState = previousStateRef.current, state = navigation.getRootState();
154
- if (!state)
155
- return;
156
- const pendingPath = pendingPopStatePathRef.current, route = (0, import_core.findFocusedRoute)(state), path = getPathForRoute(route, state);
157
- previousStateRef.current = state, pendingPopStatePathRef.current = void 0;
158
- const [previousFocusedState, focusedState] = findMatchingState(previousState, state);
159
- if (previousFocusedState && focusedState && // We should only handle push/pop if path changed from what was in last `popstate`
160
- // Otherwise it's likely a change triggered by `popstate`
161
- path !== pendingPath) {
162
- const historyDelta = (focusedState.history ? focusedState.history.length : focusedState.routes.length) - (previousFocusedState.history ? previousFocusedState.history.length : previousFocusedState.routes.length);
163
- if (historyDelta > 0)
164
- history.push({ path, state });
165
- else if (historyDelta < 0) {
166
- const nextIndex = history.backIndex({ path }), currentIndex = history.index;
167
- try {
168
- nextIndex !== -1 && nextIndex < currentIndex && // We should only go back if the entry exists and it's less than current index
169
- history.get(nextIndex - currentIndex) ? await history.go(nextIndex - currentIndex) : await history.go(historyDelta), history.replace({ path, state });
170
- } catch {
171
- }
172
- } else
173
- history.replace({ path, state });
174
- } else
175
- history.replace({ path, state });
176
- };
177
- return ref.current?.addListener("state", series(onStateChange));
178
- }, [enabled, history, ref]), {
179
- getInitialState
180
- };
181
- }
182
- //# sourceMappingURL=useLinking.js.map
@@ -1,46 +0,0 @@
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)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var validatePathConfig_exports = {};
16
- __export(validatePathConfig_exports, {
17
- default: () => validatePathConfig
18
- });
19
- module.exports = __toCommonJS(validatePathConfig_exports);
20
- const formatToList = (items) => items.map((key) => `- ${key}`).join(`
21
- `);
22
- function validatePathConfig(config, root = !0) {
23
- const validKeys = ["initialRouteName", "screens", "_route"];
24
- root || validKeys.push("path", "exact", "stringify", "parse");
25
- const invalidKeys = Object.keys(config).filter((key) => !validKeys.includes(key));
26
- if (invalidKeys.length)
27
- throw new Error(
28
- `Found invalid properties in the configuration:
29
- ${formatToList(
30
- invalidKeys
31
- )}
32
-
33
- Did you forget to specify them under a 'screens' property?
34
-
35
- You can only specify the following properties:
36
- ${formatToList(
37
- validKeys
38
- )}
39
-
40
- See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.`
41
- );
42
- config.screens && Object.entries(config.screens).forEach(([_, value]) => {
43
- typeof value != "string" && validatePathConfig(value, !1);
44
- });
45
- }
46
- //# sourceMappingURL=validatePathConfig.js.map
@@ -1,294 +0,0 @@
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)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var getRoutes_exports = {};
16
- __export(getRoutes_exports, {
17
- extrapolateGroups: () => extrapolateGroups,
18
- generateDynamic: () => generateDynamic,
19
- getExactRoutes: () => getExactRoutes,
20
- getIgnoreList: () => getIgnoreList,
21
- getRoutes: () => getRoutes
22
- });
23
- module.exports = __toCommonJS(getRoutes_exports);
24
- var import_config = require("./config"), import_matchers = require("./matchers"), import_getPageExport = require("./utils/getPageExport");
25
- const validPlatforms = /* @__PURE__ */ new Set(["android", "ios", "native", "web"]);
26
- function getRoutes(contextModule, options = {}) {
27
- const directoryTree = getDirectoryTree(contextModule, options);
28
- if (!directoryTree)
29
- return null;
30
- const rootNode = flattenDirectoryTreeToRoutes(directoryTree, options);
31
- return options.ignoreEntryPoints || crawlAndAppendInitialRoutesAndEntryFiles(rootNode, options), rootNode;
32
- }
33
- function getExactRoutes(contextModule, options = {}) {
34
- return getRoutes(contextModule, {
35
- ...options,
36
- skipGenerated: !0
37
- });
38
- }
39
- function getDirectoryTree(contextModule, options) {
40
- const importMode = options.importMode || process.env.One_ROUTER_IMPORT_MODE, ignoreList = [/^\.\/\+html\.[tj]sx?$/];
41
- options.ignore && ignoreList.push(...options.ignore), options.preserveApiRoutes || ignoreList.push(/\+api\.[tj]sx?$/);
42
- const rootDirectory = {
43
- files: /* @__PURE__ */ new Map(),
44
- subdirectories: /* @__PURE__ */ new Map()
45
- };
46
- let hasRoutes = !1, isValid = !1;
47
- for (const filePath of contextModule.keys()) {
48
- if (ignoreList.some((regex) => regex.test(filePath)))
49
- continue;
50
- isValid = !0;
51
- const meta = getFileMeta(filePath, options);
52
- if (meta.specificity < 0)
53
- continue;
54
- const type = meta.isLayout ? "layout" : meta.renderMode || (0, import_config.getDefaultRenderMode)();
55
- let node = {
56
- type,
57
- loadRoute() {
58
- if (options.ignoreRequireErrors)
59
- try {
60
- return contextModule(filePath);
61
- } catch {
62
- return {};
63
- }
64
- else
65
- return contextModule(filePath);
66
- },
67
- contextKey: filePath,
68
- route: "",
69
- // This is overwritten during hoisting based upon the _layout
70
- dynamic: null,
71
- children: []
72
- // While we are building the directory tree, we don't know the node's children just yet. This is added during hoisting
73
- };
74
- if (!(process.env.NODE_ENV === "development" && node.type !== "api" && importMode === "sync" && !(0, import_getPageExport.getPageExport)(node.loadRoute())))
75
- for (const route of extrapolateGroups(meta.route)) {
76
- const subdirectoryParts = route.split("/").slice(0, -1);
77
- let directory = rootDirectory;
78
- for (const part of subdirectoryParts) {
79
- let subDirectory = directory.subdirectories.get(part);
80
- subDirectory || (subDirectory = {
81
- files: /* @__PURE__ */ new Map(),
82
- subdirectories: /* @__PURE__ */ new Map()
83
- }, directory.subdirectories.set(part, subDirectory)), directory = subDirectory;
84
- }
85
- if (node = { ...node, route }, meta.isLayout) {
86
- directory.layout ??= [];
87
- const existing = directory.layout[meta.specificity];
88
- if (existing) {
89
- if (process.env.NODE_ENV !== "production")
90
- throw new Error(
91
- `The layouts "${filePath}" and "${existing.contextKey}" conflict on the route "/${route}". Please remove or rename one of these files.`
92
- );
93
- } else
94
- node = getLayoutNode(node, options), directory.layout[meta.specificity] = node;
95
- } else if (type === "api") {
96
- const fileKey = `${route}+api`;
97
- let nodes = directory.files.get(fileKey);
98
- nodes || (nodes = [], directory.files.set(fileKey, nodes));
99
- const existing = nodes[0];
100
- if (existing) {
101
- if (process.env.NODE_ENV !== "production")
102
- throw new Error(
103
- `The API route file "${filePath}" and "${existing.contextKey}" conflict on the route "/${route}". Please remove or rename one of these files.`
104
- );
105
- } else
106
- nodes[0] = node;
107
- } else {
108
- let nodes = directory.files.get(route);
109
- nodes || (nodes = [], directory.files.set(route, nodes));
110
- const existing = nodes[meta.specificity];
111
- if (existing) {
112
- if (process.env.NODE_ENV !== "production")
113
- throw new Error(
114
- `The route files "${filePath}" and "${existing.contextKey}" conflict on the route "/${route}". Please remove or rename one of these files.`
115
- );
116
- } else
117
- hasRoutes ||= !0, nodes[meta.specificity] = node;
118
- }
119
- }
120
- }
121
- return isValid ? (rootDirectory.layout || (rootDirectory.layout = [
122
- {
123
- type: "layout",
124
- loadRoute: () => ({
125
- default: require("./views/Navigator").DefaultNavigator
126
- }),
127
- // Generate a fake file name for the directory
128
- contextKey: "router/build/views/Navigator.js",
129
- route: "",
130
- generated: !0,
131
- dynamic: null,
132
- children: []
133
- }
134
- ]), options.skipGenerated || (hasRoutes && appendSitemapRoute(rootDirectory), appendNotFoundRoute(rootDirectory)), rootDirectory) : null;
135
- }
136
- function flattenDirectoryTreeToRoutes(directory, options, layout, pathToRemove = "") {
137
- if (directory.layout) {
138
- const previousLayout = layout;
139
- layout = getMostSpecific(directory.layout), previousLayout && previousLayout.children.push(layout), options.internal_stripLoadRoute && delete layout.loadRoute;
140
- const newRoute = layout.route.replace(pathToRemove, "");
141
- pathToRemove = layout.route ? `${layout.route}/` : "", layout.route = newRoute, layout.dynamic = generateDynamic(layout.route);
142
- }
143
- if (!layout) throw new Error("One Internal Error: No nearest layout");
144
- for (const routes of directory.files.values()) {
145
- const routeNode = getMostSpecific(routes);
146
- routeNode.route = routeNode.route.replace(pathToRemove, ""), routeNode.dynamic = generateDynamic(routeNode.route), options.internal_stripLoadRoute && delete routeNode.loadRoute, layout.children.push(routeNode);
147
- }
148
- for (const child of directory.subdirectories.values())
149
- flattenDirectoryTreeToRoutes(child, options, layout, pathToRemove);
150
- return layout;
151
- }
152
- function getFileMeta(key, options) {
153
- key = key.replace(/^\.\//, "");
154
- const parts = key.split("/");
155
- let route = (0, import_matchers.removeSupportedExtensions)(key);
156
- const filename = parts[parts.length - 1], filenameWithoutExtensions = (0, import_matchers.removeSupportedExtensions)(filename), isLayout = filenameWithoutExtensions.startsWith("_layout"), [_fullname, renderModeFound] = filename.match(/\+(api|ssg|ssr|spa)\.(\w+\.)?[jt]sx?$/) || [], renderMode = renderModeFound;
157
- if (filenameWithoutExtensions.startsWith("(") && filenameWithoutExtensions.endsWith(")"))
158
- throw new Error(`Invalid route ./${key}. Routes cannot end with '(group)' syntax`);
159
- if (renderMode !== "api" && filename.startsWith("+") && filenameWithoutExtensions !== "+not-found") {
160
- const renamedRoute = [...parts.slice(0, -1), filename.slice(1)].join("/");
161
- throw new Error(
162
- `Invalid route ./${key}. Route nodes cannot start with the '+' character. "Please rename to ${renamedRoute}"`
163
- );
164
- }
165
- let specificity = 0;
166
- const platformExtension = filenameWithoutExtensions.split(".")[1], hasPlatformExtension = validPlatforms.has(platformExtension), usePlatformRoutes = options.platformRoutes ?? !0;
167
- if (hasPlatformExtension) {
168
- if (usePlatformRoutes && options.platform ? platformExtension === options.platform ? specificity = 2 : platformExtension === "native" && options.platform !== "web" ? specificity = 1 : platformExtension !== options.platform && (specificity = -1) : specificity = -1, renderMode === "api" && specificity !== 0)
169
- throw new Error(
170
- `Api routes cannot have platform extensions. Please remove '.${platformExtension}' from './${key}'`
171
- );
172
- route = route.replace(new RegExp(`.${platformExtension}$`), "");
173
- }
174
- return {
175
- route,
176
- specificity,
177
- isLayout,
178
- renderMode
179
- };
180
- }
181
- function getMostSpecific(routes) {
182
- const route = routes[routes.length - 1];
183
- if (!routes[0])
184
- throw new Error(
185
- ` [one] The file ${route.contextKey} does not have a fallback sibling file without a platform extension in routes (${routes[0]}, ${routes.length}):
186
- ${routes.map((r) => r.contextKey || "NONE").join(`
187
- `)}.`
188
- );
189
- return routes[routes.length - 1];
190
- }
191
- function getIgnoreList(options) {
192
- const ignore = [/^\.\/\+html\.[tj]sx?$/, ...options?.ignore ?? []];
193
- return options?.preserveApiRoutes !== !0 && ignore.push(/\+api\.[tj]sx?$/), ignore;
194
- }
195
- function extrapolateGroups(key, keys = /* @__PURE__ */ new Set()) {
196
- const match = (0, import_matchers.matchArrayGroupName)(key);
197
- if (!match)
198
- return keys.add(key), keys;
199
- const groups = match.split(",");
200
- if (new Set(groups).size !== groups.length)
201
- throw new Error(`Array syntax cannot contain duplicate group name "${groups}" in "${key}".`);
202
- if (groups.length === 1)
203
- return keys.add(key), keys;
204
- for (const group of groups)
205
- extrapolateGroups(key.replace(match, group.trim()), keys);
206
- return keys;
207
- }
208
- function generateDynamic(path) {
209
- const dynamic = path.split("/").map((part) => {
210
- if (part === "+not-found")
211
- return {
212
- name: "+not-found",
213
- deep: !0,
214
- notFound: !0
215
- };
216
- const deepDynamicName = (0, import_matchers.matchDeepDynamicRouteName)(part), dynamicName = deepDynamicName ?? (0, import_matchers.matchDynamicName)(part);
217
- return dynamicName ? { name: dynamicName, deep: !!deepDynamicName } : null;
218
- }).filter((part) => !!part);
219
- return dynamic.length === 0 ? null : dynamic;
220
- }
221
- function appendSitemapRoute(directory) {
222
- directory.files.has("_sitemap") || directory.files.set("_sitemap", [
223
- {
224
- loadRoute() {
225
- return { default: () => null, getNavOptions: () => {
226
- } };
227
- },
228
- route: "_sitemap",
229
- type: "ssg",
230
- contextKey: "",
231
- generated: !0,
232
- internal: !0,
233
- dynamic: null,
234
- children: []
235
- }
236
- ]);
237
- }
238
- function appendNotFoundRoute(directory) {
239
- directory.files.has("+not-found") || directory.files.set("+not-found", [
240
- {
241
- loadRoute() {
242
- return { default: () => null };
243
- },
244
- type: "spa",
245
- route: "+not-found",
246
- contextKey: "",
247
- generated: !0,
248
- internal: !0,
249
- dynamic: [{ name: "+not-found", deep: !0, notFound: !0 }],
250
- children: []
251
- }
252
- ]);
253
- }
254
- function getLayoutNode(node, options) {
255
- const groupName = (0, import_matchers.matchGroupName)(node.route);
256
- let initialRouteName = node.children.find((child) => child.route.replace(/\/index$/, "") === groupName)?.route;
257
- return {
258
- ...node,
259
- route: node.route.replace(/\/?_layout$/, ""),
260
- children: [],
261
- // Each layout should have its own children
262
- initialRouteName
263
- };
264
- }
265
- function crawlAndAppendInitialRoutesAndEntryFiles(node, options, entryPoints = []) {
266
- if (node.type === "spa" || node.type === "ssg" || node.type === "ssr")
267
- node.entryPoints = [.../* @__PURE__ */ new Set([...entryPoints, node.contextKey])];
268
- else if (node.type === "layout") {
269
- if (!node.children)
270
- throw new Error(`Layout "${node.contextKey}" does not contain any child routes`);
271
- entryPoints = [...entryPoints, node.contextKey];
272
- const groupName = (0, import_matchers.matchGroupName)(node.route);
273
- let initialRouteName = node.children.find((child) => child.route.replace(/\/index$/, "") === groupName)?.route;
274
- if (!options.internal_stripLoadRoute) {
275
- const loaded = node.loadRoute();
276
- loaded?.unstable_settings && (initialRouteName = loaded.unstable_settings.initialRouteName ?? initialRouteName, groupName && (initialRouteName = loaded.unstable_settings?.[groupName]?.initialRouteName ?? initialRouteName));
277
- }
278
- if (initialRouteName) {
279
- const initialRoute = node.children.find((child) => child.route === initialRouteName);
280
- if (!initialRoute) {
281
- const validInitialRoutes = node.children.filter((child) => !child.generated).map((child) => `'${child.route}'`).join(", ");
282
- throw groupName ? new Error(
283
- `Layout ${node.contextKey} has invalid initialRouteName '${initialRouteName}' for group '(${groupName})'. Valid options are: ${validInitialRoutes}`
284
- ) : new Error(
285
- `Layout ${node.contextKey} has invalid initialRouteName '${initialRouteName}'. Valid options are: ${validInitialRoutes}`
286
- );
287
- }
288
- node.initialRouteName = initialRouteName, entryPoints.push(initialRoute.contextKey);
289
- }
290
- for (const child of node.children)
291
- crawlAndAppendInitialRoutesAndEntryFiles(child, options, entryPoints);
292
- }
293
- }
294
- //# sourceMappingURL=getRoutes.js.map
@@ -1,23 +0,0 @@
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)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var Head_exports = {};
16
- __export(Head_exports, {
17
- Head: () => Head
18
- });
19
- module.exports = __toCommonJS(Head_exports);
20
- var import_HeadModule = require("./HeadModule");
21
- const Head = ({ children }) => children;
22
- Object.assign(Head, import_HeadModule.HeadModule);
23
- //# sourceMappingURL=Head.js.map
@@ -1,22 +0,0 @@
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)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var HeadModule_exports = {};
16
- __export(HeadModule_exports, {
17
- HeadModule: () => HeadModule
18
- });
19
- module.exports = __toCommonJS(HeadModule_exports);
20
- let HeadModule = null;
21
- typeof expo < "u" && globalThis.expo?.modules?.ExpoGo && (HeadModule = globalThis.expo?.modules?.HeadModule);
22
- //# sourceMappingURL=HeadModule.js.map
@@ -1,15 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var head_exports = {};
13
- module.exports = __toCommonJS(head_exports);
14
- __reExport(head_exports, require("./Head"), module.exports);
15
- //# sourceMappingURL=index.js.map
@@ -1,14 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- };
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var types_exports = {};
13
- module.exports = __toCommonJS(types_exports);
14
- //# sourceMappingURL=types.js.map
@@ -1,52 +0,0 @@
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)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var url_exports = {};
16
- __export(url_exports, {
17
- getStaticUrlFromOneRouter: () => getStaticUrlFromOneRouter
18
- });
19
- module.exports = __toCommonJS(url_exports);
20
- const protocolWarningString = '{ plugins: [["router", { origin: "...<URL>..." }]] }';
21
- function memoize(fn) {
22
- const cache = {};
23
- return (...args) => {
24
- const key = JSON.stringify(args);
25
- if (cache[key])
26
- return cache[key];
27
- const result = fn(...args);
28
- return cache[key] = result, result;
29
- };
30
- }
31
- function sanitizeUrl(url) {
32
- const parsed = new URL(url);
33
- return !parsed.protocol || parsed.protocol === "http:" || parsed.protocol === "https:" || throwOrAlert(
34
- `One Head: Native origin has invalid protocol "${parsed.protocol}" for URL in Config: ${protocolWarningString}.`
35
- ), parsed.pathname = "", parsed.search = "", parsed.hash = "", parsed.protocol ??= "https:", parsed.toString().replace(/\/$/, "");
36
- }
37
- const memoSanitizeUrl = memoize(sanitizeUrl);
38
- function getUrlFromConstants() {
39
- const origin = process.env.One_ORIGIN;
40
- return origin ? (origin.match(/^http(s)?:\/\//) || console.warn(
41
- `One Head: origin "${origin}" is missing a \`https://\` protocol. ${protocolWarningString}.`
42
- ), memoSanitizeUrl(origin)) : (throwOrAlert(
43
- `One Head: Add the handoff origin to the Config (requires rebuild). Add the Config Plugin ${protocolWarningString}, where \`origin\` is the hosted URL.`
44
- ), "https://expo.dev");
45
- }
46
- function throwOrAlert(msg) {
47
- console.warn(`TODO FIX: ${msg}`);
48
- }
49
- function getStaticUrlFromOneRouter(pathname) {
50
- return getUrlFromConstants() + pathname;
51
- }
52
- //# sourceMappingURL=url.js.map