one 1.1.320 → 1.1.322

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) hide show
  1. package/dist/cjs/Root.js +182 -0
  2. package/dist/cjs/Route.js +45 -0
  3. package/dist/cjs/cleanUrl.js +41 -0
  4. package/dist/cjs/cli/label-process.js +25 -0
  5. package/dist/cjs/cli/main.js +46 -0
  6. package/dist/cjs/cli/patch.js +34 -0
  7. package/dist/cjs/cli/prebuild.js +34 -0
  8. package/dist/cjs/cli/run.js +52 -0
  9. package/dist/cjs/cli/runAndroid.js +34 -0
  10. package/dist/cjs/cli/runIos.js +34 -0
  11. package/dist/cjs/cli.js +220 -0
  12. package/dist/cjs/clientLoaderResolver.js +32 -0
  13. package/dist/cjs/config.js +27 -0
  14. package/dist/cjs/constants.js +28 -0
  15. package/dist/cjs/createApp.js +46 -0
  16. package/dist/cjs/createHandleRequest.js +138 -0
  17. package/dist/cjs/createRoute.js +37 -0
  18. package/dist/cjs/fallbackViews/Sitemap.js +82 -0
  19. package/dist/cjs/fallbackViews/Unmatched.js +58 -0
  20. package/dist/cjs/fork/NavigationContainer.js +85 -0
  21. package/dist/cjs/fork/createMemoryHistory.js +100 -0
  22. package/dist/cjs/fork/extractPathFromURL.js +62 -0
  23. package/dist/cjs/fork/findFocusedRoute.js +26 -0
  24. package/dist/cjs/fork/getPathFromState.js +265 -0
  25. package/dist/cjs/fork/getStateFromPath.js +381 -0
  26. package/dist/cjs/fork/useLinking.js +182 -0
  27. package/dist/cjs/fork/validatePathConfig.js +46 -0
  28. package/dist/cjs/getLinkingConfig.js +59 -0
  29. package/dist/cjs/getReactNavigationConfig.js +69 -0
  30. package/dist/cjs/getRoutes.js +294 -0
  31. package/dist/cjs/getURL.js +24 -0
  32. package/dist/cjs/head/Head.js +23 -0
  33. package/dist/cjs/head/HeadModule.js +22 -0
  34. package/dist/cjs/head/index.js +15 -0
  35. package/dist/cjs/head/types.js +14 -0
  36. package/dist/cjs/head/url.js +52 -0
  37. package/dist/cjs/hooks.js +99 -0
  38. package/dist/cjs/imperative-api.js +45 -0
  39. package/dist/cjs/import-mode/index.js +21 -0
  40. package/dist/cjs/import-mode/index.web.js +21 -0
  41. package/dist/cjs/index.js +65 -0
  42. package/dist/cjs/interfaces/router.js +23 -0
  43. package/dist/cjs/layouts/Drawer.js +24 -0
  44. package/dist/cjs/layouts/Stack.js +24 -0
  45. package/dist/cjs/layouts/Tabs.js +52 -0
  46. package/dist/cjs/layouts/withLayoutContext.js +77 -0
  47. package/dist/cjs/link/Link.js +98 -0
  48. package/dist/cjs/link/Redirect.js +31 -0
  49. package/dist/cjs/link/href.js +50 -0
  50. package/dist/cjs/link/linking.js +82 -0
  51. package/dist/cjs/link/path.js +65 -0
  52. package/dist/cjs/link/useLinkTo.js +42 -0
  53. package/dist/cjs/link/useLoadedNavigation.js +50 -0
  54. package/dist/cjs/matchers.js +68 -0
  55. package/dist/cjs/platform.js +21 -0
  56. package/dist/cjs/polyfills-mobile.js +26 -0
  57. package/dist/cjs/polyfills-server.js +23 -0
  58. package/dist/cjs/render.js +44 -0
  59. package/dist/cjs/router/RouterStore.js +14 -0
  60. package/dist/cjs/router/getNormalizedStatePath.js +50 -0
  61. package/dist/cjs/router/lastAction.js +25 -0
  62. package/dist/cjs/router/router.js +345 -0
  63. package/dist/cjs/router/serverLocationContext.js +22 -0
  64. package/dist/cjs/router/useInitializeOneRouter.js +43 -0
  65. package/dist/cjs/serve.js +184 -0
  66. package/dist/cjs/server/createRoutesManifest.js +40 -0
  67. package/dist/cjs/server/getServerManifest.js +109 -0
  68. package/dist/cjs/server-render.js +42 -0
  69. package/dist/cjs/sortRoutes.js +64 -0
  70. package/dist/cjs/typed-routes/generateRouteTypes.js +33 -0
  71. package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.js +83 -0
  72. package/dist/cjs/types.js +14 -0
  73. package/dist/cjs/useFocusEffect.js +79 -0
  74. package/dist/cjs/useLoader.js +97 -0
  75. package/dist/cjs/useNavigation.js +60 -0
  76. package/dist/cjs/useScreens.js +176 -0
  77. package/dist/cjs/useViteRoutes.js +77 -0
  78. package/dist/cjs/utils/assertIsReady.js +26 -0
  79. package/dist/cjs/utils/dynamicImport.js +24 -0
  80. package/dist/cjs/utils/existsAsync.js +28 -0
  81. package/dist/cjs/utils/getPageExport.js +38 -0
  82. package/dist/cjs/utils/globDir.js +37 -0
  83. package/dist/cjs/utils/hashString.js +32 -0
  84. package/dist/cjs/utils/isResponse.js +23 -0
  85. package/dist/cjs/utils/isStatus.js +23 -0
  86. package/dist/cjs/utils/promiseWithResolvers.js +26 -0
  87. package/dist/cjs/utils/rand.js +21 -0
  88. package/dist/cjs/utils/redirect.js +28 -0
  89. package/dist/cjs/utils/removeSearch.js +23 -0
  90. package/dist/cjs/utils/removeUndefined.js +26 -0
  91. package/dist/cjs/utils/url.js +31 -0
  92. package/dist/cjs/utils/weakKey.js +24 -0
  93. package/dist/cjs/utils/weakMemo.js +30 -0
  94. package/dist/cjs/views/EmptyRoute.js +25 -0
  95. package/dist/cjs/views/ErrorBoundary.js +33 -0
  96. package/dist/cjs/views/LoadProgressBar.js +83 -0
  97. package/dist/cjs/views/Navigator.js +101 -0
  98. package/dist/cjs/views/PreloadLinks.js +42 -0
  99. package/dist/cjs/views/RootErrorBoundary.js +47 -0
  100. package/dist/cjs/views/Screen.js +29 -0
  101. package/dist/cjs/views/ScrollRestoration.js +70 -0
  102. package/dist/cjs/views/Try.js +44 -0
  103. package/dist/cjs/vite/build.js +377 -0
  104. package/dist/cjs/vite/clientTreeShakePlugin.js +76 -0
  105. package/dist/cjs/vite/constants.js +22 -0
  106. package/dist/cjs/vite/createFileSystemRouter.cjs +2 -1
  107. package/dist/cjs/vite/createFileSystemRouter.js +244 -0
  108. package/dist/cjs/vite/createFileSystemRouter.js.map +6 -0
  109. package/dist/cjs/vite/createFileSystemRouter.native.js +2 -1
  110. package/dist/cjs/vite/createFileSystemRouter.native.js.map +2 -2
  111. package/dist/cjs/vite/customNodeExternals.js +52 -0
  112. package/dist/cjs/vite/ensureTsConfig.js +66 -0
  113. package/dist/cjs/vite/findDepsToOptimize.js +66 -0
  114. package/dist/cjs/vite/fixDependenciesPlugin.js +43 -0
  115. package/dist/cjs/vite/generateTypesForRoutes.js +36 -0
  116. package/dist/cjs/vite/getManifest.js +27 -0
  117. package/dist/cjs/vite/headers.js +39 -0
  118. package/dist/cjs/vite/makePluginWebOnly.js +27 -0
  119. package/dist/cjs/vite/one.js +290 -0
  120. package/dist/cjs/vite/removeReactNativeWebAnimatedPlugin.js +50 -0
  121. package/dist/cjs/vite/replaceLoader.js +34 -0
  122. package/dist/cjs/vite/resolveAPIRequest.js +71 -0
  123. package/dist/cjs/vite/server.js +16 -0
  124. package/dist/cjs/vite/types.js +14 -0
  125. package/dist/cjs/vite/virtualEntryPlugin.js +67 -0
  126. package/dist/cjs/vite/vitePluginSsrCss.js +130 -0
  127. package/dist/cjs/vite.cjs +2 -0
  128. package/dist/cjs/vite.js +29 -0
  129. package/dist/cjs/vite.js.map +6 -0
  130. package/dist/cjs/vite.native.js +3 -1
  131. package/dist/cjs/vite.native.js.map +1 -1
  132. package/dist/cjs/zero/getQueryKey.js +24 -0
  133. package/dist/cjs/zero/isZeroQuery.js +23 -0
  134. package/dist/cjs/zero/resolveQuery.js +38 -0
  135. package/dist/cjs/zero/subscribeToQuery.js +28 -0
  136. package/dist/cjs/zero/types.js +14 -0
  137. package/dist/cjs/zero/useQuery.js +47 -0
  138. package/dist/cjs/zero/useQueryZero.js +38 -0
  139. package/dist/cjs/zero.js +23 -0
  140. package/dist/esm/vite/createFileSystemRouter.js +2 -1
  141. package/dist/esm/vite/createFileSystemRouter.js.map +1 -1
  142. package/dist/esm/vite/createFileSystemRouter.mjs +2 -1
  143. package/dist/esm/vite/createFileSystemRouter.mjs.map +1 -1
  144. package/dist/esm/vite/createFileSystemRouter.native.js +2 -1
  145. package/dist/esm/vite/createFileSystemRouter.native.js.map +2 -2
  146. package/dist/esm/vite.js +2 -0
  147. package/dist/esm/vite.js.map +1 -1
  148. package/dist/esm/vite.mjs +2 -1
  149. package/dist/esm/vite.mjs.map +1 -1
  150. package/dist/esm/vite.native.js +2 -0
  151. package/dist/esm/vite.native.js.map +2 -2
  152. package/package.json +8 -8
  153. package/src/vite/createFileSystemRouter.tsx +1 -1
  154. package/src/vite.ts +1 -0
  155. package/types/vite.d.ts +1 -0
  156. package/types/vite.d.ts.map +1 -1
  157. package/dist/cjs/createApp.native.cjs +0 -38
  158. package/dist/cjs/createApp.native.cjs.map +0 -6
  159. package/dist/cjs/fork/NavigationContainer.native.cjs +0 -103
  160. package/dist/cjs/fork/NavigationContainer.native.cjs.map +0 -6
  161. package/dist/cjs/fork/useLinking.native.cjs +0 -126
  162. package/dist/cjs/fork/useLinking.native.cjs.map +0 -6
  163. package/dist/cjs/getURL.native.cjs +0 -48
  164. package/dist/cjs/getURL.native.cjs.map +0 -6
  165. package/dist/cjs/head/Head.android.cjs +0 -28
  166. package/dist/cjs/head/Head.android.cjs.map +0 -6
  167. package/dist/cjs/head/Head.ios.cjs +0 -210
  168. package/dist/cjs/head/Head.ios.cjs.map +0 -6
  169. package/dist/cjs/import-mode/index.android.cjs +0 -26
  170. package/dist/cjs/import-mode/index.android.cjs.map +0 -6
  171. package/dist/cjs/import-mode/index.ios.cjs +0 -26
  172. package/dist/cjs/import-mode/index.ios.cjs.map +0 -6
  173. package/dist/cjs/import-mode/index.native.cjs +0 -26
  174. package/dist/cjs/import-mode/index.native.cjs.map +0 -6
  175. package/dist/cjs/render.native.cjs +0 -28
  176. package/dist/cjs/render.native.cjs.map +0 -6
  177. package/dist/cjs/views/PreloadLinks.native.cjs +0 -28
  178. package/dist/cjs/views/PreloadLinks.native.cjs.map +0 -6
  179. package/dist/cjs/vite/createFileSystemRouter.cjs.map +0 -6
  180. package/dist/cjs/vite/headers.native.cjs +0 -32
  181. package/dist/cjs/vite/headers.native.cjs.map +0 -6
  182. package/dist/cjs/vite.cjs.map +0 -6
  183. /package/dist/cjs/{Root.cjs.map → Root.js.map} +0 -0
  184. /package/dist/cjs/{Route.cjs.map → Route.js.map} +0 -0
  185. /package/dist/cjs/{cleanUrl.cjs.map → cleanUrl.js.map} +0 -0
  186. /package/dist/cjs/cli/{label-process.cjs.map → label-process.js.map} +0 -0
  187. /package/dist/cjs/cli/{main.cjs.map → main.js.map} +0 -0
  188. /package/dist/cjs/cli/{patch.cjs.map → patch.js.map} +0 -0
  189. /package/dist/cjs/cli/{prebuild.cjs.map → prebuild.js.map} +0 -0
  190. /package/dist/cjs/cli/{run.cjs.map → run.js.map} +0 -0
  191. /package/dist/cjs/cli/{runAndroid.cjs.map → runAndroid.js.map} +0 -0
  192. /package/dist/cjs/cli/{runIos.cjs.map → runIos.js.map} +0 -0
  193. /package/dist/cjs/{cli.cjs.map → cli.js.map} +0 -0
  194. /package/dist/cjs/{clientLoaderResolver.cjs.map → clientLoaderResolver.js.map} +0 -0
  195. /package/dist/cjs/{config.cjs.map → config.js.map} +0 -0
  196. /package/dist/cjs/{constants.cjs.map → constants.js.map} +0 -0
  197. /package/dist/cjs/{createApp.cjs.map → createApp.js.map} +0 -0
  198. /package/dist/cjs/{createHandleRequest.cjs.map → createHandleRequest.js.map} +0 -0
  199. /package/dist/cjs/{createRoute.cjs.map → createRoute.js.map} +0 -0
  200. /package/dist/cjs/fallbackViews/{Sitemap.cjs.map → Sitemap.js.map} +0 -0
  201. /package/dist/cjs/fallbackViews/{Unmatched.cjs.map → Unmatched.js.map} +0 -0
  202. /package/dist/cjs/fork/{NavigationContainer.cjs.map → NavigationContainer.js.map} +0 -0
  203. /package/dist/cjs/fork/{createMemoryHistory.cjs.map → createMemoryHistory.js.map} +0 -0
  204. /package/dist/cjs/fork/{extractPathFromURL.cjs.map → extractPathFromURL.js.map} +0 -0
  205. /package/dist/cjs/fork/{findFocusedRoute.cjs.map → findFocusedRoute.js.map} +0 -0
  206. /package/dist/cjs/fork/{getPathFromState.cjs.map → getPathFromState.js.map} +0 -0
  207. /package/dist/cjs/fork/{getStateFromPath.cjs.map → getStateFromPath.js.map} +0 -0
  208. /package/dist/cjs/fork/{useLinking.cjs.map → useLinking.js.map} +0 -0
  209. /package/dist/cjs/fork/{validatePathConfig.cjs.map → validatePathConfig.js.map} +0 -0
  210. /package/dist/cjs/{getLinkingConfig.cjs.map → getLinkingConfig.js.map} +0 -0
  211. /package/dist/cjs/{getReactNavigationConfig.cjs.map → getReactNavigationConfig.js.map} +0 -0
  212. /package/dist/cjs/{getRoutes.cjs.map → getRoutes.js.map} +0 -0
  213. /package/dist/cjs/{getURL.cjs.map → getURL.js.map} +0 -0
  214. /package/dist/cjs/head/{Head.cjs.map → Head.js.map} +0 -0
  215. /package/dist/cjs/head/{HeadModule.cjs.map → HeadModule.js.map} +0 -0
  216. /package/dist/cjs/head/{index.cjs.map → index.js.map} +0 -0
  217. /package/dist/cjs/head/{types.cjs.map → types.js.map} +0 -0
  218. /package/dist/cjs/head/{url.cjs.map → url.js.map} +0 -0
  219. /package/dist/cjs/{hooks.cjs.map → hooks.js.map} +0 -0
  220. /package/dist/cjs/{imperative-api.cjs.map → imperative-api.js.map} +0 -0
  221. /package/dist/cjs/import-mode/{index.cjs.map → index.js.map} +0 -0
  222. /package/dist/cjs/import-mode/{index.web.cjs.map → index.web.js.map} +0 -0
  223. /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
  224. /package/dist/cjs/interfaces/{router.cjs.map → router.js.map} +0 -0
  225. /package/dist/cjs/layouts/{Drawer.cjs.map → Drawer.js.map} +0 -0
  226. /package/dist/cjs/layouts/{Stack.cjs.map → Stack.js.map} +0 -0
  227. /package/dist/cjs/layouts/{Tabs.cjs.map → Tabs.js.map} +0 -0
  228. /package/dist/cjs/layouts/{withLayoutContext.cjs.map → withLayoutContext.js.map} +0 -0
  229. /package/dist/cjs/link/{Link.cjs.map → Link.js.map} +0 -0
  230. /package/dist/cjs/link/{Redirect.cjs.map → Redirect.js.map} +0 -0
  231. /package/dist/cjs/link/{href.cjs.map → href.js.map} +0 -0
  232. /package/dist/cjs/link/{linking.cjs.map → linking.js.map} +0 -0
  233. /package/dist/cjs/link/{path.cjs.map → path.js.map} +0 -0
  234. /package/dist/cjs/link/{useLinkTo.cjs.map → useLinkTo.js.map} +0 -0
  235. /package/dist/cjs/link/{useLoadedNavigation.cjs.map → useLoadedNavigation.js.map} +0 -0
  236. /package/dist/cjs/{matchers.cjs.map → matchers.js.map} +0 -0
  237. /package/dist/cjs/{platform.cjs.map → platform.js.map} +0 -0
  238. /package/dist/cjs/{polyfills-mobile.cjs.map → polyfills-mobile.js.map} +0 -0
  239. /package/dist/cjs/{polyfills-server.cjs.map → polyfills-server.js.map} +0 -0
  240. /package/dist/cjs/{render.cjs.map → render.js.map} +0 -0
  241. /package/dist/cjs/router/{RouterStore.cjs.map → RouterStore.js.map} +0 -0
  242. /package/dist/cjs/router/{getNormalizedStatePath.cjs.map → getNormalizedStatePath.js.map} +0 -0
  243. /package/dist/cjs/router/{lastAction.cjs.map → lastAction.js.map} +0 -0
  244. /package/dist/cjs/router/{router.cjs.map → router.js.map} +0 -0
  245. /package/dist/cjs/router/{serverLocationContext.cjs.map → serverLocationContext.js.map} +0 -0
  246. /package/dist/cjs/router/{useInitializeOneRouter.cjs.map → useInitializeOneRouter.js.map} +0 -0
  247. /package/dist/cjs/{serve.cjs.map → serve.js.map} +0 -0
  248. /package/dist/cjs/server/{createRoutesManifest.cjs.map → createRoutesManifest.js.map} +0 -0
  249. /package/dist/cjs/server/{getServerManifest.cjs.map → getServerManifest.js.map} +0 -0
  250. /package/dist/cjs/{server-render.cjs.map → server-render.js.map} +0 -0
  251. /package/dist/cjs/{sortRoutes.cjs.map → sortRoutes.js.map} +0 -0
  252. /package/dist/cjs/typed-routes/{generateRouteTypes.cjs.map → generateRouteTypes.js.map} +0 -0
  253. /package/dist/cjs/typed-routes/{getTypedRoutesDeclarationFile.cjs.map → getTypedRoutesDeclarationFile.js.map} +0 -0
  254. /package/dist/cjs/{types.cjs.map → types.js.map} +0 -0
  255. /package/dist/cjs/{useFocusEffect.cjs.map → useFocusEffect.js.map} +0 -0
  256. /package/dist/cjs/{useLoader.cjs.map → useLoader.js.map} +0 -0
  257. /package/dist/cjs/{useNavigation.cjs.map → useNavigation.js.map} +0 -0
  258. /package/dist/cjs/{useScreens.cjs.map → useScreens.js.map} +0 -0
  259. /package/dist/cjs/{useViteRoutes.cjs.map → useViteRoutes.js.map} +0 -0
  260. /package/dist/cjs/utils/{assertIsReady.cjs.map → assertIsReady.js.map} +0 -0
  261. /package/dist/cjs/utils/{dynamicImport.cjs.map → dynamicImport.js.map} +0 -0
  262. /package/dist/cjs/utils/{existsAsync.cjs.map → existsAsync.js.map} +0 -0
  263. /package/dist/cjs/utils/{getPageExport.cjs.map → getPageExport.js.map} +0 -0
  264. /package/dist/cjs/utils/{globDir.cjs.map → globDir.js.map} +0 -0
  265. /package/dist/cjs/utils/{hashString.cjs.map → hashString.js.map} +0 -0
  266. /package/dist/cjs/utils/{isResponse.cjs.map → isResponse.js.map} +0 -0
  267. /package/dist/cjs/utils/{isStatus.cjs.map → isStatus.js.map} +0 -0
  268. /package/dist/cjs/utils/{promiseWithResolvers.cjs.map → promiseWithResolvers.js.map} +0 -0
  269. /package/dist/cjs/utils/{rand.cjs.map → rand.js.map} +0 -0
  270. /package/dist/cjs/utils/{redirect.cjs.map → redirect.js.map} +0 -0
  271. /package/dist/cjs/utils/{removeSearch.cjs.map → removeSearch.js.map} +0 -0
  272. /package/dist/cjs/utils/{removeUndefined.cjs.map → removeUndefined.js.map} +0 -0
  273. /package/dist/cjs/utils/{url.cjs.map → url.js.map} +0 -0
  274. /package/dist/cjs/utils/{weakKey.cjs.map → weakKey.js.map} +0 -0
  275. /package/dist/cjs/utils/{weakMemo.cjs.map → weakMemo.js.map} +0 -0
  276. /package/dist/cjs/views/{EmptyRoute.cjs.map → EmptyRoute.js.map} +0 -0
  277. /package/dist/cjs/views/{ErrorBoundary.cjs.map → ErrorBoundary.js.map} +0 -0
  278. /package/dist/cjs/views/{LoadProgressBar.cjs.map → LoadProgressBar.js.map} +0 -0
  279. /package/dist/cjs/views/{Navigator.cjs.map → Navigator.js.map} +0 -0
  280. /package/dist/cjs/views/{PreloadLinks.cjs.map → PreloadLinks.js.map} +0 -0
  281. /package/dist/cjs/views/{RootErrorBoundary.cjs.map → RootErrorBoundary.js.map} +0 -0
  282. /package/dist/cjs/views/{Screen.cjs.map → Screen.js.map} +0 -0
  283. /package/dist/cjs/views/{ScrollRestoration.cjs.map → ScrollRestoration.js.map} +0 -0
  284. /package/dist/cjs/views/{Try.cjs.map → Try.js.map} +0 -0
  285. /package/dist/cjs/vite/{build.cjs.map → build.js.map} +0 -0
  286. /package/dist/cjs/vite/{clientTreeShakePlugin.cjs.map → clientTreeShakePlugin.js.map} +0 -0
  287. /package/dist/cjs/vite/{constants.cjs.map → constants.js.map} +0 -0
  288. /package/dist/cjs/vite/{customNodeExternals.cjs.map → customNodeExternals.js.map} +0 -0
  289. /package/dist/cjs/vite/{ensureTsConfig.cjs.map → ensureTsConfig.js.map} +0 -0
  290. /package/dist/cjs/vite/{findDepsToOptimize.cjs.map → findDepsToOptimize.js.map} +0 -0
  291. /package/dist/cjs/vite/{fixDependenciesPlugin.cjs.map → fixDependenciesPlugin.js.map} +0 -0
  292. /package/dist/cjs/vite/{generateTypesForRoutes.cjs.map → generateTypesForRoutes.js.map} +0 -0
  293. /package/dist/cjs/vite/{getManifest.cjs.map → getManifest.js.map} +0 -0
  294. /package/dist/cjs/vite/{headers.cjs.map → headers.js.map} +0 -0
  295. /package/dist/cjs/vite/{makePluginWebOnly.cjs.map → makePluginWebOnly.js.map} +0 -0
  296. /package/dist/cjs/vite/{one.cjs.map → one.js.map} +0 -0
  297. /package/dist/cjs/vite/{removeReactNativeWebAnimatedPlugin.cjs.map → removeReactNativeWebAnimatedPlugin.js.map} +0 -0
  298. /package/dist/cjs/vite/{replaceLoader.cjs.map → replaceLoader.js.map} +0 -0
  299. /package/dist/cjs/vite/{resolveAPIRequest.cjs.map → resolveAPIRequest.js.map} +0 -0
  300. /package/dist/cjs/vite/{server.cjs.map → server.js.map} +0 -0
  301. /package/dist/cjs/vite/{types.cjs.map → types.js.map} +0 -0
  302. /package/dist/cjs/vite/{virtualEntryPlugin.cjs.map → virtualEntryPlugin.js.map} +0 -0
  303. /package/dist/cjs/vite/{vitePluginSsrCss.cjs.map → vitePluginSsrCss.js.map} +0 -0
  304. /package/dist/cjs/zero/{getQueryKey.cjs.map → getQueryKey.js.map} +0 -0
  305. /package/dist/cjs/zero/{isZeroQuery.cjs.map → isZeroQuery.js.map} +0 -0
  306. /package/dist/cjs/zero/{resolveQuery.cjs.map → resolveQuery.js.map} +0 -0
  307. /package/dist/cjs/zero/{subscribeToQuery.cjs.map → subscribeToQuery.js.map} +0 -0
  308. /package/dist/cjs/zero/{types.cjs.map → types.js.map} +0 -0
  309. /package/dist/cjs/zero/{useQuery.cjs.map → useQuery.js.map} +0 -0
  310. /package/dist/cjs/zero/{useQueryZero.cjs.map → useQueryZero.js.map} +0 -0
  311. /package/dist/cjs/{zero.cjs.map → zero.js.map} +0 -0
@@ -0,0 +1,21 @@
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 import_mode_exports = {};
16
+ __export(import_mode_exports, {
17
+ default: () => import_mode_default
18
+ });
19
+ module.exports = __toCommonJS(import_mode_exports);
20
+ var import_mode_default = "sync";
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,21 @@
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 index_web_exports = {};
16
+ __export(index_web_exports, {
17
+ default: () => index_web_default
18
+ });
19
+ module.exports = __toCommonJS(index_web_exports);
20
+ var index_web_default = process.env.One_ROUTER_IMPORT_MODE_WEB;
21
+ //# sourceMappingURL=index.web.js.map
@@ -0,0 +1,65 @@
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
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")), __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
15
+ // If the importer is in node compatibility mode or this is not an ESM
16
+ // file that has been converted to a CommonJS file using a Babel-
17
+ // compatible transform (i.e. "__esModule" has not been set), then set
18
+ // "default" to the CommonJS "module.exports" for node compatibility.
19
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
20
+ mod
21
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ ErrorBoundary: () => import_ErrorBoundary.ErrorBoundary,
25
+ Head: () => import_head.Head,
26
+ Link: () => import_Link.Link,
27
+ LoadProgressBar: () => import_LoadProgressBar.LoadProgressBar,
28
+ Navigator: () => import_Navigator.Navigator,
29
+ Redirect: () => import_Redirect.Redirect,
30
+ Root: () => import_Root.Root,
31
+ SafeAreaView: () => import_react_native_safe_area_context.SafeAreaView,
32
+ ScrollRestoration: () => import_ScrollRestoration.ScrollRestoration,
33
+ Slot: () => import_Navigator.Slot,
34
+ Stack: () => import_Stack.Stack,
35
+ Tabs: () => import_Tabs.Tabs,
36
+ createApp: () => import_createApp.createApp,
37
+ createRoute: () => import_createRoute.createRoute,
38
+ getURL: () => import_getURL.getURL,
39
+ isResponse: () => import_isResponse.isResponse,
40
+ onClientLoaderResolve: () => import_clientLoaderResolver.onClientLoaderResolve,
41
+ redirect: () => import_redirect.redirect,
42
+ render: () => import_render.render,
43
+ route: () => import_createRoute.route,
44
+ router: () => import_imperative_api.router,
45
+ routerStore: () => routerStore,
46
+ useActiveParams: () => import_hooks.useActiveParams,
47
+ useFocusEffect: () => import_useFocusEffect.useFocusEffect,
48
+ useGlobalSearchParams: () => import_hooks2.useGlobalSearchParams,
49
+ useLinkTo: () => import_useLinkTo.useLinkTo,
50
+ useLoader: () => import_useLoader.useLoader,
51
+ useLocalSearchParams: () => import_hooks2.useLocalSearchParams,
52
+ useNavigation: () => import_useNavigation.useNavigation,
53
+ useNavigationContainerRef: () => import_hooks.useNavigationContainerRef,
54
+ useParams: () => import_hooks.useParams,
55
+ usePathname: () => import_hooks.usePathname,
56
+ useRootNavigationState: () => import_hooks.useRootNavigationState,
57
+ useRouter: () => import_hooks.useRouter,
58
+ useSegments: () => import_hooks.useSegments,
59
+ useUnstableGlobalHref: () => import_hooks.useUnstableGlobalHref,
60
+ withLayoutContext: () => import_withLayoutContext.withLayoutContext
61
+ });
62
+ module.exports = __toCommonJS(src_exports);
63
+ __reExport(src_exports, require("@vxrn/universal-color-scheme"), module.exports);
64
+ var import_Root = require("./Root"), import_render = require("./render"), import_Stack = require("./layouts/Stack"), import_Tabs = require("./layouts/Tabs"), import_react_native_safe_area_context = require("react-native-safe-area-context"), import_Navigator = require("./views/Navigator"), import_ErrorBoundary = require("./views/ErrorBoundary"), import_ScrollRestoration = require("./views/ScrollRestoration"), import_LoadProgressBar = require("./views/LoadProgressBar"), import_createApp = require("./createApp"), import_createRoute = require("./createRoute"), import_clientLoaderResolver = require("./clientLoaderResolver"), import_isResponse = require("./utils/isResponse"), import_getURL = require("./getURL"), import_redirect = require("./utils/redirect"), import_useLinkTo = require("./link/useLinkTo"), import_hooks = require("./hooks"), import_hooks2 = require("./hooks"), routerStore = __toESM(require("./router/router"), 1), import_imperative_api = require("./imperative-api"), import_Link = require("./link/Link"), import_Redirect = require("./link/Redirect"), import_head = require("./head"), import_withLayoutContext = require("./layouts/withLayoutContext"), import_useFocusEffect = require("./useFocusEffect"), import_useNavigation = require("./useNavigation"), import_useLoader = require("./useLoader");
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,23 @@
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 router_exports = {};
16
+ __export(router_exports, {
17
+ OneRouter: () => OneRouter
18
+ });
19
+ module.exports = __toCommonJS(router_exports);
20
+ var OneRouter;
21
+ ((OneRouter2) => {
22
+ })(OneRouter ||= {});
23
+ //# sourceMappingURL=router.js.map
@@ -0,0 +1,24 @@
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 Drawer_exports = {};
16
+ __export(Drawer_exports, {
17
+ Drawer: () => Drawer,
18
+ default: () => Drawer_default
19
+ });
20
+ module.exports = __toCommonJS(Drawer_exports);
21
+ var import_drawer = require("@react-navigation/drawer"), import_withLayoutContext = require("./withLayoutContext");
22
+ const DrawerNavigator = (0, import_drawer.createDrawerNavigator)().Navigator, Drawer = (0, import_withLayoutContext.withLayoutContext)(DrawerNavigator);
23
+ var Drawer_default = Drawer;
24
+ //# sourceMappingURL=Drawer.js.map
@@ -0,0 +1,24 @@
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 Stack_exports = {};
16
+ __export(Stack_exports, {
17
+ Stack: () => Stack,
18
+ default: () => Stack_default
19
+ });
20
+ module.exports = __toCommonJS(Stack_exports);
21
+ var import_native_stack = require("@react-navigation/native-stack"), import_withLayoutContext = require("./withLayoutContext");
22
+ const NativeStackNavigator = (0, import_native_stack.createNativeStackNavigator)().Navigator, Stack = (0, import_withLayoutContext.withLayoutContext)(NativeStackNavigator);
23
+ var Stack_default = Stack;
24
+ //# sourceMappingURL=Stack.js.map
@@ -0,0 +1,52 @@
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 Tabs_exports = {};
16
+ __export(Tabs_exports, {
17
+ Tabs: () => Tabs,
18
+ default: () => Tabs_default
19
+ });
20
+ module.exports = __toCommonJS(Tabs_exports);
21
+ var import_bottom_tabs = require("@react-navigation/bottom-tabs"), import_react_native = require("react-native-web"), import_Link = require("../link/Link"), import_withLayoutContext = require("./withLayoutContext"), import_jsx_runtime = require("react/jsx-runtime");
22
+ const BottomTabNavigator = (0, import_bottom_tabs.createBottomTabNavigator)().Navigator, Tabs = (0, import_withLayoutContext.withLayoutContext)(BottomTabNavigator, (screens) => screens.map((screen) => {
23
+ if (typeof screen.options != "function" && screen.options?.href !== void 0) {
24
+ const { href, ...options } = screen.options;
25
+ if (options.tabBarButton)
26
+ throw new Error("Cannot use `href` and `tabBarButton` together.");
27
+ return {
28
+ ...screen,
29
+ options: {
30
+ ...options,
31
+ tabBarButton: (props) => {
32
+ if (href == null)
33
+ return null;
34
+ const children = import_react_native.Platform.OS === "web" ? props.children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Pressable, { children: props.children });
35
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
36
+ import_Link.Link,
37
+ {
38
+ ...props,
39
+ style: [{ display: "flex" }, props.style],
40
+ href,
41
+ asChild: import_react_native.Platform.OS !== "web",
42
+ children
43
+ }
44
+ );
45
+ }
46
+ }
47
+ };
48
+ }
49
+ return screen;
50
+ }));
51
+ var Tabs_default = Tabs;
52
+ //# sourceMappingURL=Tabs.js.map
@@ -0,0 +1,77 @@
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 withLayoutContext_exports = {};
24
+ __export(withLayoutContext_exports, {
25
+ useFilterScreenChildren: () => useFilterScreenChildren,
26
+ withLayoutContext: () => withLayoutContext
27
+ });
28
+ module.exports = __toCommonJS(withLayoutContext_exports);
29
+ var import_react = __toESM(require("react"), 1), import_Route = require("../Route"), import_useScreens = require("../useScreens"), import_Screen = require("../views/Screen"), import_jsx_runtime = (
30
+ // @ts-expect-error
31
+ // biome-ignore lint/correctness/noChildrenProp: <explanation>
32
+ require("react/jsx-runtime")
33
+ );
34
+ function useFilterScreenChildren(children, {
35
+ isCustomNavigator,
36
+ contextKey
37
+ } = {}) {
38
+ return import_react.default.useMemo(() => {
39
+ const customChildren = [], screens = import_react.default.Children.map(children, (child) => {
40
+ if (import_react.default.isValidElement(child) && child && child.type === import_Screen.Screen) {
41
+ if (!child.props.name)
42
+ throw new Error(
43
+ `<Screen /> component in \`default export\` at \`app${contextKey}/_layout\` must have a \`name\` prop when used as a child of a Layout Route.`
44
+ );
45
+ if (process.env.NODE_ENV !== "production" && ["children", "component", "getComponent"].some((key) => key in child.props))
46
+ throw new Error(
47
+ `<Screen /> component in \`default export\` at \`app${contextKey}/_layout\` must not have a \`children\`, \`component\`, or \`getComponent\` prop when used as a child of a Layout Route`
48
+ );
49
+ return child.props;
50
+ }
51
+ isCustomNavigator ? customChildren.push(child) : console.warn(
52
+ `Layout children must be of type Screen, all other children are ignored. To use custom children, create a custom <Layout />. Update Layout Route at: "app${contextKey}/_layout"`
53
+ );
54
+ });
55
+ if (process.env.NODE_ENV !== "production") {
56
+ const names = screens?.map((screen) => screen.name);
57
+ if (names && new Set(names).size !== names.length)
58
+ throw new Error("Screen names must be unique: " + names);
59
+ }
60
+ return {
61
+ screens,
62
+ children: customChildren
63
+ };
64
+ }, [children, contextKey, isCustomNavigator]);
65
+ }
66
+ function withLayoutContext(Nav, processor) {
67
+ const Navigator = import_react.default.forwardRef(
68
+ ({ children: userDefinedChildren, ...props }, ref) => {
69
+ const contextKey = (0, import_Route.useContextKey)(), { screens } = useFilterScreenChildren(userDefinedChildren, {
70
+ contextKey
71
+ }), processed = processor ? processor(screens ?? []) : screens, sorted = (0, import_useScreens.useSortedScreens)(processed ?? []);
72
+ return sorted.length ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Nav, { ...props, id: contextKey, ref, children: sorted }) : null;
73
+ }
74
+ );
75
+ return Navigator.Screen = import_Screen.Screen, Navigator;
76
+ }
77
+ //# sourceMappingURL=withLayoutContext.js.map
@@ -0,0 +1,98 @@
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 Link_exports = {};
24
+ __export(Link_exports, {
25
+ Link: () => Link
26
+ });
27
+ module.exports = __toCommonJS(Link_exports);
28
+ var import_react_slot = require("@radix-ui/react-slot"), React = __toESM(require("react"), 1), import_react_native = require("react-native-web"), import_href = require("./href"), import_useLinkTo = require("./useLinkTo"), import_jsx_runtime = require("react/jsx-runtime");
29
+ const Link = React.forwardRef(function({
30
+ href,
31
+ replace,
32
+ push,
33
+ // TODO: This does not prevent default on the anchor tag.
34
+ asChild,
35
+ rel,
36
+ target,
37
+ download,
38
+ ...rest
39
+ }, ref) {
40
+ const style = useInteropClassName(rest), hrefAttrs = useHrefAttrs({ asChild, rel, target, download }), resolvedHref = React.useMemo(() => {
41
+ if (href == null)
42
+ throw new Error("Link: href is required");
43
+ return (0, import_href.resolveHref)(href);
44
+ }, [href]), props = (0, import_useLinkTo.useLinkTo)({ href: resolvedHref, replace }), onPress = (e) => {
45
+ "onPress" in rest && rest.onPress?.(e), props.onPress(e);
46
+ };
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
+ asChild ? import_react_slot.Slot : import_react_native.Text,
49
+ {
50
+ ref,
51
+ ...props,
52
+ ...hrefAttrs,
53
+ ...rest,
54
+ style: asChild ? null : style,
55
+ ...import_react_native.Platform.select({
56
+ web: {
57
+ onClick: onPress
58
+ },
59
+ default: { onPress }
60
+ })
61
+ }
62
+ );
63
+ });
64
+ Link.resolveHref = import_href.resolveHref;
65
+ function useInteropClassName(props) {
66
+ return import_react_native.Platform.OS !== "web" ? props.style : React.useMemo(() => {
67
+ if (props.className == null)
68
+ return props.style;
69
+ const cssStyle = {
70
+ $$css: !0,
71
+ __routerLinkClassName: props.className
72
+ };
73
+ return Array.isArray(props.style) ? [...props.style, cssStyle] : [props.style, cssStyle];
74
+ }, [props.style, props.className]);
75
+ }
76
+ const useHrefAttrs = import_react_native.Platform.select({
77
+ web: function({
78
+ asChild,
79
+ rel,
80
+ target,
81
+ download
82
+ }) {
83
+ return React.useMemo(() => {
84
+ const hrefAttrs = {
85
+ rel,
86
+ target,
87
+ download
88
+ };
89
+ return asChild ? hrefAttrs : {
90
+ hrefAttrs
91
+ };
92
+ }, [asChild, rel, target, download]);
93
+ },
94
+ default: function() {
95
+ return {};
96
+ }
97
+ });
98
+ //# sourceMappingURL=Link.js.map
@@ -0,0 +1,31 @@
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 Redirect_exports = {};
16
+ __export(Redirect_exports, {
17
+ Redirect: () => Redirect
18
+ });
19
+ module.exports = __toCommonJS(Redirect_exports);
20
+ var import_hooks = require("../hooks"), import_useFocusEffect = require("../useFocusEffect");
21
+ function Redirect({ href }) {
22
+ const router = (0, import_hooks.useRouter)();
23
+ return (0, import_useFocusEffect.useFocusEffect)(() => {
24
+ try {
25
+ router.replace(href);
26
+ } catch (error) {
27
+ console.error(error);
28
+ }
29
+ }), null;
30
+ }
31
+ //# sourceMappingURL=Redirect.js.map
@@ -0,0 +1,50 @@
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 href_exports = {};
16
+ __export(href_exports, {
17
+ resolveHref: () => resolveHref
18
+ });
19
+ module.exports = __toCommonJS(href_exports);
20
+ const resolveHref = (href) => {
21
+ if (typeof href == "string")
22
+ return resolveHref({ pathname: href });
23
+ const path = href.pathname ?? "";
24
+ if (!href?.params)
25
+ return path;
26
+ const { pathname, params } = createQualifiedPathname(path, {
27
+ ...href.params
28
+ }), paramsString = createQueryParams(params);
29
+ return pathname + (paramsString ? `?${paramsString}` : "");
30
+ };
31
+ function createQualifiedPathname(pathname, params) {
32
+ for (const [key, value = ""] of Object.entries(params)) {
33
+ const dynamicKey = `[${key}]`, deepDynamicKey = `[...${key}]`;
34
+ if (pathname.includes(dynamicKey))
35
+ pathname = pathname.replace(dynamicKey, encodeParam(value));
36
+ else if (pathname.includes(deepDynamicKey))
37
+ pathname = pathname.replace(deepDynamicKey, encodeParam(value));
38
+ else
39
+ continue;
40
+ delete params[key];
41
+ }
42
+ return { pathname, params };
43
+ }
44
+ function encodeParam(param) {
45
+ return Array.isArray(param) ? param.map((p) => encodeParam(p)).join("/") : encodeURIComponent(`${param}`);
46
+ }
47
+ function createQueryParams(params) {
48
+ return Object.entries(params).filter(([, value]) => value != null).map(([key, value]) => `${key}=${encodeURIComponent(value.toString())}`).join("&");
49
+ }
50
+ //# sourceMappingURL=href.js.map
@@ -0,0 +1,82 @@
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 linking_exports = {};
24
+ __export(linking_exports, {
25
+ addEventListener: () => addEventListener,
26
+ getInitialURL: () => getInitialURL,
27
+ getPathFromState: () => import_getPathFromState.default,
28
+ getRootURL: () => getRootURL,
29
+ getStateFromPath: () => import_getStateFromPath.default
30
+ });
31
+ module.exports = __toCommonJS(linking_exports);
32
+ var Linking = __toESM(require("expo-linking"), 1), import_react_native = require("react-native-web"), import_extractPathFromURL = require("../fork/extractPathFromURL"), import_getPathFromState = __toESM(require("../fork/getPathFromState"), 1), import_getStateFromPath = __toESM(require("../fork/getStateFromPath"), 1);
33
+ const isExpoGo = typeof expo < "u" && globalThis.expo?.modules?.ExpoGo;
34
+ function getInitialURL() {
35
+ if (process.env.NODE_ENV === "test")
36
+ return Linking.getInitialURL() ?? getRootURL();
37
+ if (import_react_native.Platform.OS === "web") {
38
+ if (typeof window > "u")
39
+ return "";
40
+ if (window.location?.href)
41
+ return window.location.href;
42
+ }
43
+ return Promise.race([
44
+ (async () => {
45
+ const url = await Linking.getInitialURL();
46
+ if (url && isExpoGo) {
47
+ const parsed = Linking.parse(url);
48
+ if (parsed.path === null || ["", "/"].includes(
49
+ (0, import_extractPathFromURL.adjustPathname)({
50
+ hostname: parsed.hostname,
51
+ pathname: parsed.path
52
+ })
53
+ ))
54
+ return getRootURL();
55
+ }
56
+ return url ?? getRootURL();
57
+ })(),
58
+ new Promise(
59
+ (resolve) => (
60
+ // Timeout in 150ms if `getInitialState` doesn't resolve
61
+ // Workaround for https://github.com/facebook/react-native/issues/25675
62
+ setTimeout(() => resolve(getRootURL()), 150)
63
+ )
64
+ )
65
+ ]);
66
+ }
67
+ let _rootURL;
68
+ function getRootURL() {
69
+ return _rootURL === void 0 && (_rootURL = Linking.createURL("/")), _rootURL;
70
+ }
71
+ function addEventListener(listener) {
72
+ let callback;
73
+ isExpoGo ? callback = ({ url }) => {
74
+ const parsed = Linking.parse(url);
75
+ parsed.path === null || ["", "/"].includes((0, import_extractPathFromURL.adjustPathname)({ hostname: parsed.hostname, pathname: parsed.path })) ? listener(getRootURL()) : listener(url);
76
+ } : callback = ({ url }) => listener(url);
77
+ const subscription = Linking.addEventListener("url", callback);
78
+ return () => {
79
+ subscription?.remove?.();
80
+ };
81
+ }
82
+ //# sourceMappingURL=linking.js.map
@@ -0,0 +1,65 @@
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 path_exports = {};
16
+ __export(path_exports, {
17
+ resolve: () => resolve
18
+ });
19
+ module.exports = __toCommonJS(path_exports);
20
+ function assertPath(path) {
21
+ if (typeof path != "string")
22
+ throw new TypeError("Path must be a string. Received " + JSON.stringify(path));
23
+ }
24
+ function normalizeStringPosix(path, allowAboveRoot) {
25
+ let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, code;
26
+ for (let i = 0; i <= path.length; ++i) {
27
+ if (i < path.length)
28
+ code = path.charCodeAt(i);
29
+ else {
30
+ if (code === 47)
31
+ break;
32
+ code = 47;
33
+ }
34
+ if (code === 47) {
35
+ if (!(lastSlash === i - 1 || dots === 1))
36
+ if (lastSlash !== i - 1 && dots === 2) {
37
+ if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
38
+ if (res.length > 2) {
39
+ const lastSlashIndex = res.lastIndexOf("/");
40
+ if (lastSlashIndex !== res.length - 1) {
41
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = i, dots = 0;
42
+ continue;
43
+ }
44
+ } else if (res.length === 2 || res.length === 1) {
45
+ res = "", lastSegmentLength = 0, lastSlash = i, dots = 0;
46
+ continue;
47
+ }
48
+ }
49
+ allowAboveRoot && (res.length > 0 ? res += "/.." : res = "..", lastSegmentLength = 2);
50
+ } else
51
+ res.length > 0 ? res += "/" + path.slice(lastSlash + 1, i) : res = path.slice(lastSlash + 1, i), lastSegmentLength = i - lastSlash - 1;
52
+ lastSlash = i, dots = 0;
53
+ } else code === 46 && dots !== -1 ? ++dots : dots = -1;
54
+ }
55
+ return res;
56
+ }
57
+ function resolve(...segments) {
58
+ let resolvedPath = "", resolvedAbsolute = !1;
59
+ for (let i = segments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
60
+ let path;
61
+ i >= 0 ? path = segments[i] : path = "/", assertPath(path), path.length !== 0 && (resolvedPath = path + "/" + resolvedPath, resolvedAbsolute = path.charCodeAt(0) === 47);
62
+ }
63
+ return resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute), resolvedAbsolute ? resolvedPath.length > 0 ? "/" + resolvedPath : "/" : resolvedPath.length > 0 ? resolvedPath : ".";
64
+ }
65
+ //# sourceMappingURL=path.js.map