one 1.1.319 → 1.1.321

Sign up to get free protection for your applications and to get access to all the features.
Files changed (332) 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/{getURL.native.cjs → cli/patch.cjs} +11 -15
  7. package/dist/cjs/cli/patch.js +34 -0
  8. package/dist/cjs/cli/patch.js.map +6 -0
  9. package/dist/cjs/cli/patch.native.js +39 -0
  10. package/dist/cjs/cli/patch.native.js.map +6 -0
  11. package/dist/cjs/cli/prebuild.js +34 -0
  12. package/dist/cjs/cli/run.js +52 -0
  13. package/dist/cjs/cli/runAndroid.js +34 -0
  14. package/dist/cjs/cli/runIos.js +34 -0
  15. package/dist/cjs/cli.cjs +17 -0
  16. package/dist/cjs/cli.js +220 -0
  17. package/dist/cjs/{cli.cjs.map → cli.js.map} +1 -1
  18. package/dist/cjs/cli.native.js +12 -0
  19. package/dist/cjs/cli.native.js.map +2 -2
  20. package/dist/cjs/clientLoaderResolver.js +32 -0
  21. package/dist/cjs/config.js +27 -0
  22. package/dist/cjs/constants.js +28 -0
  23. package/dist/cjs/createApp.js +46 -0
  24. package/dist/cjs/createHandleRequest.js +138 -0
  25. package/dist/cjs/createRoute.js +37 -0
  26. package/dist/cjs/fallbackViews/Sitemap.js +82 -0
  27. package/dist/cjs/fallbackViews/Unmatched.js +58 -0
  28. package/dist/cjs/fork/NavigationContainer.js +85 -0
  29. package/dist/cjs/fork/createMemoryHistory.js +100 -0
  30. package/dist/cjs/fork/extractPathFromURL.js +62 -0
  31. package/dist/cjs/fork/findFocusedRoute.js +26 -0
  32. package/dist/cjs/fork/getPathFromState.js +265 -0
  33. package/dist/cjs/fork/getStateFromPath.js +381 -0
  34. package/dist/cjs/fork/useLinking.js +182 -0
  35. package/dist/cjs/fork/validatePathConfig.js +46 -0
  36. package/dist/cjs/getLinkingConfig.js +59 -0
  37. package/dist/cjs/getReactNavigationConfig.js +69 -0
  38. package/dist/cjs/getRoutes.js +294 -0
  39. package/dist/cjs/getURL.js +24 -0
  40. package/dist/cjs/head/Head.js +23 -0
  41. package/dist/cjs/head/HeadModule.js +22 -0
  42. package/dist/cjs/head/index.js +15 -0
  43. package/dist/cjs/head/types.js +14 -0
  44. package/dist/cjs/head/url.js +52 -0
  45. package/dist/cjs/hooks.js +99 -0
  46. package/dist/cjs/imperative-api.js +45 -0
  47. package/dist/cjs/import-mode/index.js +21 -0
  48. package/dist/cjs/import-mode/index.web.js +21 -0
  49. package/dist/cjs/index.js +65 -0
  50. package/dist/cjs/interfaces/router.js +23 -0
  51. package/dist/cjs/layouts/Drawer.js +24 -0
  52. package/dist/cjs/layouts/Stack.js +24 -0
  53. package/dist/cjs/layouts/Tabs.js +52 -0
  54. package/dist/cjs/layouts/withLayoutContext.js +77 -0
  55. package/dist/cjs/link/Link.js +98 -0
  56. package/dist/cjs/link/Redirect.js +31 -0
  57. package/dist/cjs/link/href.js +50 -0
  58. package/dist/cjs/link/linking.js +82 -0
  59. package/dist/cjs/link/path.js +65 -0
  60. package/dist/cjs/link/useLinkTo.js +42 -0
  61. package/dist/cjs/link/useLoadedNavigation.js +50 -0
  62. package/dist/cjs/matchers.js +68 -0
  63. package/dist/cjs/platform.js +21 -0
  64. package/dist/cjs/polyfills-mobile.js +26 -0
  65. package/dist/cjs/polyfills-server.js +23 -0
  66. package/dist/cjs/render.js +44 -0
  67. package/dist/cjs/router/RouterStore.js +14 -0
  68. package/dist/cjs/router/getNormalizedStatePath.js +50 -0
  69. package/dist/cjs/router/lastAction.js +25 -0
  70. package/dist/cjs/router/router.js +345 -0
  71. package/dist/cjs/router/serverLocationContext.js +22 -0
  72. package/dist/cjs/router/useInitializeOneRouter.js +43 -0
  73. package/dist/cjs/serve.js +184 -0
  74. package/dist/cjs/server/createRoutesManifest.js +40 -0
  75. package/dist/cjs/server/getServerManifest.js +109 -0
  76. package/dist/cjs/server-render.js +42 -0
  77. package/dist/cjs/sortRoutes.js +64 -0
  78. package/dist/cjs/typed-routes/generateRouteTypes.js +33 -0
  79. package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.js +83 -0
  80. package/dist/cjs/types.js +14 -0
  81. package/dist/cjs/useFocusEffect.js +79 -0
  82. package/dist/cjs/useLoader.js +97 -0
  83. package/dist/cjs/useNavigation.js +60 -0
  84. package/dist/cjs/useScreens.js +176 -0
  85. package/dist/cjs/useViteRoutes.js +77 -0
  86. package/dist/cjs/utils/assertIsReady.js +26 -0
  87. package/dist/cjs/utils/dynamicImport.js +24 -0
  88. package/dist/cjs/utils/existsAsync.js +28 -0
  89. package/dist/cjs/utils/getPageExport.js +38 -0
  90. package/dist/cjs/utils/globDir.js +37 -0
  91. package/dist/cjs/utils/hashString.js +32 -0
  92. package/dist/cjs/utils/isResponse.js +23 -0
  93. package/dist/cjs/utils/isStatus.js +23 -0
  94. package/dist/cjs/utils/promiseWithResolvers.js +26 -0
  95. package/dist/cjs/utils/rand.js +21 -0
  96. package/dist/cjs/utils/redirect.js +28 -0
  97. package/dist/cjs/utils/removeSearch.js +23 -0
  98. package/dist/cjs/utils/removeUndefined.js +26 -0
  99. package/dist/cjs/utils/url.js +31 -0
  100. package/dist/cjs/utils/weakKey.js +24 -0
  101. package/dist/cjs/utils/weakMemo.js +30 -0
  102. package/dist/cjs/views/EmptyRoute.js +25 -0
  103. package/dist/cjs/views/ErrorBoundary.js +33 -0
  104. package/dist/cjs/views/LoadProgressBar.js +83 -0
  105. package/dist/cjs/views/Navigator.js +101 -0
  106. package/dist/cjs/views/PreloadLinks.js +42 -0
  107. package/dist/cjs/views/RootErrorBoundary.js +47 -0
  108. package/dist/cjs/views/Screen.js +29 -0
  109. package/dist/cjs/views/ScrollRestoration.js +70 -0
  110. package/dist/cjs/views/Try.js +44 -0
  111. package/dist/cjs/vite/build.js +377 -0
  112. package/dist/cjs/vite/clientTreeShakePlugin.js +76 -0
  113. package/dist/cjs/vite/constants.js +22 -0
  114. package/dist/cjs/vite/createFileSystemRouter.cjs +2 -1
  115. package/dist/cjs/vite/createFileSystemRouter.js +244 -0
  116. package/dist/cjs/vite/createFileSystemRouter.js.map +6 -0
  117. package/dist/cjs/vite/createFileSystemRouter.native.js +2 -1
  118. package/dist/cjs/vite/createFileSystemRouter.native.js.map +2 -2
  119. package/dist/cjs/vite/customNodeExternals.js +52 -0
  120. package/dist/cjs/vite/ensureTsConfig.js +66 -0
  121. package/dist/cjs/vite/findDepsToOptimize.js +66 -0
  122. package/dist/cjs/vite/fixDependenciesPlugin.js +43 -0
  123. package/dist/cjs/vite/generateTypesForRoutes.js +36 -0
  124. package/dist/cjs/vite/getManifest.js +27 -0
  125. package/dist/cjs/vite/headers.js +39 -0
  126. package/dist/cjs/vite/makePluginWebOnly.js +27 -0
  127. package/dist/cjs/vite/one.js +290 -0
  128. package/dist/cjs/vite/removeReactNativeWebAnimatedPlugin.js +50 -0
  129. package/dist/cjs/vite/replaceLoader.js +34 -0
  130. package/dist/cjs/vite/resolveAPIRequest.js +71 -0
  131. package/dist/cjs/vite/server.js +16 -0
  132. package/dist/cjs/vite/types.js +14 -0
  133. package/dist/cjs/vite/virtualEntryPlugin.js +67 -0
  134. package/dist/cjs/vite/vitePluginSsrCss.js +130 -0
  135. package/dist/cjs/vite.cjs +2 -0
  136. package/dist/cjs/vite.js +29 -0
  137. package/dist/cjs/vite.js.map +6 -0
  138. package/dist/cjs/vite.native.js +3 -1
  139. package/dist/cjs/vite.native.js.map +1 -1
  140. package/dist/cjs/zero/getQueryKey.js +24 -0
  141. package/dist/cjs/zero/isZeroQuery.js +23 -0
  142. package/dist/cjs/zero/resolveQuery.js +38 -0
  143. package/dist/cjs/zero/subscribeToQuery.js +28 -0
  144. package/dist/cjs/zero/types.js +14 -0
  145. package/dist/cjs/zero/useQuery.js +47 -0
  146. package/dist/cjs/zero/useQueryZero.js +38 -0
  147. package/dist/cjs/zero.js +23 -0
  148. package/dist/esm/cli/patch.js +10 -0
  149. package/dist/esm/cli/patch.js.map +6 -0
  150. package/dist/esm/cli/patch.mjs +10 -0
  151. package/dist/esm/cli/patch.mjs.map +1 -0
  152. package/dist/esm/cli/patch.native.js +10 -0
  153. package/dist/esm/cli/patch.native.js.map +6 -0
  154. package/dist/esm/cli.js +12 -0
  155. package/dist/esm/cli.js.map +1 -1
  156. package/dist/esm/cli.mjs +17 -0
  157. package/dist/esm/cli.mjs.map +1 -1
  158. package/dist/esm/cli.native.js +12 -0
  159. package/dist/esm/cli.native.js.map +2 -2
  160. package/dist/esm/vite/createFileSystemRouter.js +2 -1
  161. package/dist/esm/vite/createFileSystemRouter.js.map +1 -1
  162. package/dist/esm/vite/createFileSystemRouter.mjs +2 -1
  163. package/dist/esm/vite/createFileSystemRouter.mjs.map +1 -1
  164. package/dist/esm/vite/createFileSystemRouter.native.js +2 -1
  165. package/dist/esm/vite/createFileSystemRouter.native.js.map +2 -2
  166. package/dist/esm/vite.js +2 -0
  167. package/dist/esm/vite.js.map +1 -1
  168. package/dist/esm/vite.mjs +2 -1
  169. package/dist/esm/vite.mjs.map +1 -1
  170. package/dist/esm/vite.native.js +2 -0
  171. package/dist/esm/vite.native.js.map +2 -2
  172. package/package.json +8 -8
  173. package/src/cli/patch.ts +6 -0
  174. package/src/cli.ts +14 -0
  175. package/src/vite/createFileSystemRouter.tsx +1 -1
  176. package/src/vite.ts +1 -0
  177. package/types/cli/patch.d.ts +2 -0
  178. package/types/cli/patch.d.ts.map +1 -0
  179. package/types/vite.d.ts +1 -0
  180. package/types/vite.d.ts.map +1 -1
  181. package/dist/cjs/createApp.native.cjs +0 -38
  182. package/dist/cjs/createApp.native.cjs.map +0 -6
  183. package/dist/cjs/fork/NavigationContainer.native.cjs +0 -103
  184. package/dist/cjs/fork/NavigationContainer.native.cjs.map +0 -6
  185. package/dist/cjs/fork/useLinking.native.cjs +0 -126
  186. package/dist/cjs/fork/useLinking.native.cjs.map +0 -6
  187. package/dist/cjs/getURL.native.cjs.map +0 -6
  188. package/dist/cjs/head/Head.android.cjs +0 -28
  189. package/dist/cjs/head/Head.android.cjs.map +0 -6
  190. package/dist/cjs/head/Head.ios.cjs +0 -210
  191. package/dist/cjs/head/Head.ios.cjs.map +0 -6
  192. package/dist/cjs/import-mode/index.android.cjs +0 -26
  193. package/dist/cjs/import-mode/index.android.cjs.map +0 -6
  194. package/dist/cjs/import-mode/index.ios.cjs +0 -26
  195. package/dist/cjs/import-mode/index.ios.cjs.map +0 -6
  196. package/dist/cjs/import-mode/index.native.cjs +0 -26
  197. package/dist/cjs/import-mode/index.native.cjs.map +0 -6
  198. package/dist/cjs/render.native.cjs +0 -28
  199. package/dist/cjs/render.native.cjs.map +0 -6
  200. package/dist/cjs/views/PreloadLinks.native.cjs +0 -28
  201. package/dist/cjs/views/PreloadLinks.native.cjs.map +0 -6
  202. package/dist/cjs/vite/createFileSystemRouter.cjs.map +0 -6
  203. package/dist/cjs/vite/headers.native.cjs +0 -32
  204. package/dist/cjs/vite/headers.native.cjs.map +0 -6
  205. package/dist/cjs/vite.cjs.map +0 -6
  206. /package/dist/cjs/{Root.cjs.map → Root.js.map} +0 -0
  207. /package/dist/cjs/{Route.cjs.map → Route.js.map} +0 -0
  208. /package/dist/cjs/{cleanUrl.cjs.map → cleanUrl.js.map} +0 -0
  209. /package/dist/cjs/cli/{label-process.cjs.map → label-process.js.map} +0 -0
  210. /package/dist/cjs/cli/{main.cjs.map → main.js.map} +0 -0
  211. /package/dist/cjs/cli/{prebuild.cjs.map → prebuild.js.map} +0 -0
  212. /package/dist/cjs/cli/{run.cjs.map → run.js.map} +0 -0
  213. /package/dist/cjs/cli/{runAndroid.cjs.map → runAndroid.js.map} +0 -0
  214. /package/dist/cjs/cli/{runIos.cjs.map → runIos.js.map} +0 -0
  215. /package/dist/cjs/{clientLoaderResolver.cjs.map → clientLoaderResolver.js.map} +0 -0
  216. /package/dist/cjs/{config.cjs.map → config.js.map} +0 -0
  217. /package/dist/cjs/{constants.cjs.map → constants.js.map} +0 -0
  218. /package/dist/cjs/{createApp.cjs.map → createApp.js.map} +0 -0
  219. /package/dist/cjs/{createHandleRequest.cjs.map → createHandleRequest.js.map} +0 -0
  220. /package/dist/cjs/{createRoute.cjs.map → createRoute.js.map} +0 -0
  221. /package/dist/cjs/fallbackViews/{Sitemap.cjs.map → Sitemap.js.map} +0 -0
  222. /package/dist/cjs/fallbackViews/{Unmatched.cjs.map → Unmatched.js.map} +0 -0
  223. /package/dist/cjs/fork/{NavigationContainer.cjs.map → NavigationContainer.js.map} +0 -0
  224. /package/dist/cjs/fork/{createMemoryHistory.cjs.map → createMemoryHistory.js.map} +0 -0
  225. /package/dist/cjs/fork/{extractPathFromURL.cjs.map → extractPathFromURL.js.map} +0 -0
  226. /package/dist/cjs/fork/{findFocusedRoute.cjs.map → findFocusedRoute.js.map} +0 -0
  227. /package/dist/cjs/fork/{getPathFromState.cjs.map → getPathFromState.js.map} +0 -0
  228. /package/dist/cjs/fork/{getStateFromPath.cjs.map → getStateFromPath.js.map} +0 -0
  229. /package/dist/cjs/fork/{useLinking.cjs.map → useLinking.js.map} +0 -0
  230. /package/dist/cjs/fork/{validatePathConfig.cjs.map → validatePathConfig.js.map} +0 -0
  231. /package/dist/cjs/{getLinkingConfig.cjs.map → getLinkingConfig.js.map} +0 -0
  232. /package/dist/cjs/{getReactNavigationConfig.cjs.map → getReactNavigationConfig.js.map} +0 -0
  233. /package/dist/cjs/{getRoutes.cjs.map → getRoutes.js.map} +0 -0
  234. /package/dist/cjs/{getURL.cjs.map → getURL.js.map} +0 -0
  235. /package/dist/cjs/head/{Head.cjs.map → Head.js.map} +0 -0
  236. /package/dist/cjs/head/{HeadModule.cjs.map → HeadModule.js.map} +0 -0
  237. /package/dist/cjs/head/{index.cjs.map → index.js.map} +0 -0
  238. /package/dist/cjs/head/{types.cjs.map → types.js.map} +0 -0
  239. /package/dist/cjs/head/{url.cjs.map → url.js.map} +0 -0
  240. /package/dist/cjs/{hooks.cjs.map → hooks.js.map} +0 -0
  241. /package/dist/cjs/{imperative-api.cjs.map → imperative-api.js.map} +0 -0
  242. /package/dist/cjs/import-mode/{index.cjs.map → index.js.map} +0 -0
  243. /package/dist/cjs/import-mode/{index.web.cjs.map → index.web.js.map} +0 -0
  244. /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
  245. /package/dist/cjs/interfaces/{router.cjs.map → router.js.map} +0 -0
  246. /package/dist/cjs/layouts/{Drawer.cjs.map → Drawer.js.map} +0 -0
  247. /package/dist/cjs/layouts/{Stack.cjs.map → Stack.js.map} +0 -0
  248. /package/dist/cjs/layouts/{Tabs.cjs.map → Tabs.js.map} +0 -0
  249. /package/dist/cjs/layouts/{withLayoutContext.cjs.map → withLayoutContext.js.map} +0 -0
  250. /package/dist/cjs/link/{Link.cjs.map → Link.js.map} +0 -0
  251. /package/dist/cjs/link/{Redirect.cjs.map → Redirect.js.map} +0 -0
  252. /package/dist/cjs/link/{href.cjs.map → href.js.map} +0 -0
  253. /package/dist/cjs/link/{linking.cjs.map → linking.js.map} +0 -0
  254. /package/dist/cjs/link/{path.cjs.map → path.js.map} +0 -0
  255. /package/dist/cjs/link/{useLinkTo.cjs.map → useLinkTo.js.map} +0 -0
  256. /package/dist/cjs/link/{useLoadedNavigation.cjs.map → useLoadedNavigation.js.map} +0 -0
  257. /package/dist/cjs/{matchers.cjs.map → matchers.js.map} +0 -0
  258. /package/dist/cjs/{platform.cjs.map → platform.js.map} +0 -0
  259. /package/dist/cjs/{polyfills-mobile.cjs.map → polyfills-mobile.js.map} +0 -0
  260. /package/dist/cjs/{polyfills-server.cjs.map → polyfills-server.js.map} +0 -0
  261. /package/dist/cjs/{render.cjs.map → render.js.map} +0 -0
  262. /package/dist/cjs/router/{RouterStore.cjs.map → RouterStore.js.map} +0 -0
  263. /package/dist/cjs/router/{getNormalizedStatePath.cjs.map → getNormalizedStatePath.js.map} +0 -0
  264. /package/dist/cjs/router/{lastAction.cjs.map → lastAction.js.map} +0 -0
  265. /package/dist/cjs/router/{router.cjs.map → router.js.map} +0 -0
  266. /package/dist/cjs/router/{serverLocationContext.cjs.map → serverLocationContext.js.map} +0 -0
  267. /package/dist/cjs/router/{useInitializeOneRouter.cjs.map → useInitializeOneRouter.js.map} +0 -0
  268. /package/dist/cjs/{serve.cjs.map → serve.js.map} +0 -0
  269. /package/dist/cjs/server/{createRoutesManifest.cjs.map → createRoutesManifest.js.map} +0 -0
  270. /package/dist/cjs/server/{getServerManifest.cjs.map → getServerManifest.js.map} +0 -0
  271. /package/dist/cjs/{server-render.cjs.map → server-render.js.map} +0 -0
  272. /package/dist/cjs/{sortRoutes.cjs.map → sortRoutes.js.map} +0 -0
  273. /package/dist/cjs/typed-routes/{generateRouteTypes.cjs.map → generateRouteTypes.js.map} +0 -0
  274. /package/dist/cjs/typed-routes/{getTypedRoutesDeclarationFile.cjs.map → getTypedRoutesDeclarationFile.js.map} +0 -0
  275. /package/dist/cjs/{types.cjs.map → types.js.map} +0 -0
  276. /package/dist/cjs/{useFocusEffect.cjs.map → useFocusEffect.js.map} +0 -0
  277. /package/dist/cjs/{useLoader.cjs.map → useLoader.js.map} +0 -0
  278. /package/dist/cjs/{useNavigation.cjs.map → useNavigation.js.map} +0 -0
  279. /package/dist/cjs/{useScreens.cjs.map → useScreens.js.map} +0 -0
  280. /package/dist/cjs/{useViteRoutes.cjs.map → useViteRoutes.js.map} +0 -0
  281. /package/dist/cjs/utils/{assertIsReady.cjs.map → assertIsReady.js.map} +0 -0
  282. /package/dist/cjs/utils/{dynamicImport.cjs.map → dynamicImport.js.map} +0 -0
  283. /package/dist/cjs/utils/{existsAsync.cjs.map → existsAsync.js.map} +0 -0
  284. /package/dist/cjs/utils/{getPageExport.cjs.map → getPageExport.js.map} +0 -0
  285. /package/dist/cjs/utils/{globDir.cjs.map → globDir.js.map} +0 -0
  286. /package/dist/cjs/utils/{hashString.cjs.map → hashString.js.map} +0 -0
  287. /package/dist/cjs/utils/{isResponse.cjs.map → isResponse.js.map} +0 -0
  288. /package/dist/cjs/utils/{isStatus.cjs.map → isStatus.js.map} +0 -0
  289. /package/dist/cjs/utils/{promiseWithResolvers.cjs.map → promiseWithResolvers.js.map} +0 -0
  290. /package/dist/cjs/utils/{rand.cjs.map → rand.js.map} +0 -0
  291. /package/dist/cjs/utils/{redirect.cjs.map → redirect.js.map} +0 -0
  292. /package/dist/cjs/utils/{removeSearch.cjs.map → removeSearch.js.map} +0 -0
  293. /package/dist/cjs/utils/{removeUndefined.cjs.map → removeUndefined.js.map} +0 -0
  294. /package/dist/cjs/utils/{url.cjs.map → url.js.map} +0 -0
  295. /package/dist/cjs/utils/{weakKey.cjs.map → weakKey.js.map} +0 -0
  296. /package/dist/cjs/utils/{weakMemo.cjs.map → weakMemo.js.map} +0 -0
  297. /package/dist/cjs/views/{EmptyRoute.cjs.map → EmptyRoute.js.map} +0 -0
  298. /package/dist/cjs/views/{ErrorBoundary.cjs.map → ErrorBoundary.js.map} +0 -0
  299. /package/dist/cjs/views/{LoadProgressBar.cjs.map → LoadProgressBar.js.map} +0 -0
  300. /package/dist/cjs/views/{Navigator.cjs.map → Navigator.js.map} +0 -0
  301. /package/dist/cjs/views/{PreloadLinks.cjs.map → PreloadLinks.js.map} +0 -0
  302. /package/dist/cjs/views/{RootErrorBoundary.cjs.map → RootErrorBoundary.js.map} +0 -0
  303. /package/dist/cjs/views/{Screen.cjs.map → Screen.js.map} +0 -0
  304. /package/dist/cjs/views/{ScrollRestoration.cjs.map → ScrollRestoration.js.map} +0 -0
  305. /package/dist/cjs/views/{Try.cjs.map → Try.js.map} +0 -0
  306. /package/dist/cjs/vite/{build.cjs.map → build.js.map} +0 -0
  307. /package/dist/cjs/vite/{clientTreeShakePlugin.cjs.map → clientTreeShakePlugin.js.map} +0 -0
  308. /package/dist/cjs/vite/{constants.cjs.map → constants.js.map} +0 -0
  309. /package/dist/cjs/vite/{customNodeExternals.cjs.map → customNodeExternals.js.map} +0 -0
  310. /package/dist/cjs/vite/{ensureTsConfig.cjs.map → ensureTsConfig.js.map} +0 -0
  311. /package/dist/cjs/vite/{findDepsToOptimize.cjs.map → findDepsToOptimize.js.map} +0 -0
  312. /package/dist/cjs/vite/{fixDependenciesPlugin.cjs.map → fixDependenciesPlugin.js.map} +0 -0
  313. /package/dist/cjs/vite/{generateTypesForRoutes.cjs.map → generateTypesForRoutes.js.map} +0 -0
  314. /package/dist/cjs/vite/{getManifest.cjs.map → getManifest.js.map} +0 -0
  315. /package/dist/cjs/vite/{headers.cjs.map → headers.js.map} +0 -0
  316. /package/dist/cjs/vite/{makePluginWebOnly.cjs.map → makePluginWebOnly.js.map} +0 -0
  317. /package/dist/cjs/vite/{one.cjs.map → one.js.map} +0 -0
  318. /package/dist/cjs/vite/{removeReactNativeWebAnimatedPlugin.cjs.map → removeReactNativeWebAnimatedPlugin.js.map} +0 -0
  319. /package/dist/cjs/vite/{replaceLoader.cjs.map → replaceLoader.js.map} +0 -0
  320. /package/dist/cjs/vite/{resolveAPIRequest.cjs.map → resolveAPIRequest.js.map} +0 -0
  321. /package/dist/cjs/vite/{server.cjs.map → server.js.map} +0 -0
  322. /package/dist/cjs/vite/{types.cjs.map → types.js.map} +0 -0
  323. /package/dist/cjs/vite/{virtualEntryPlugin.cjs.map → virtualEntryPlugin.js.map} +0 -0
  324. /package/dist/cjs/vite/{vitePluginSsrCss.cjs.map → vitePluginSsrCss.js.map} +0 -0
  325. /package/dist/cjs/zero/{getQueryKey.cjs.map → getQueryKey.js.map} +0 -0
  326. /package/dist/cjs/zero/{isZeroQuery.cjs.map → isZeroQuery.js.map} +0 -0
  327. /package/dist/cjs/zero/{resolveQuery.cjs.map → resolveQuery.js.map} +0 -0
  328. /package/dist/cjs/zero/{subscribeToQuery.cjs.map → subscribeToQuery.js.map} +0 -0
  329. /package/dist/cjs/zero/{types.cjs.map → types.js.map} +0 -0
  330. /package/dist/cjs/zero/{useQuery.cjs.map → useQuery.js.map} +0 -0
  331. /package/dist/cjs/zero/{useQueryZero.cjs.map → useQueryZero.js.map} +0 -0
  332. /package/dist/cjs/{zero.cjs.map → zero.js.map} +0 -0
@@ -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 weakKey_exports = {};
16
+ __export(weakKey_exports, {
17
+ weakKey: () => weakKey
18
+ });
19
+ module.exports = __toCommonJS(weakKey_exports);
20
+ const w = /* @__PURE__ */ new WeakMap(), weakKey = (item) => w.get(item) ?? (() => {
21
+ const k = `${Math.random()}`;
22
+ return w.set(item, k), k;
23
+ })();
24
+ //# sourceMappingURL=weakKey.js.map
@@ -0,0 +1,30 @@
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 weakMemo_exports = {};
16
+ __export(weakMemo_exports, {
17
+ weakMemoObject: () => weakMemoObject
18
+ });
19
+ module.exports = __toCommonJS(weakMemo_exports);
20
+ const cache = /* @__PURE__ */ new WeakMap();
21
+ function weakMemoObject(obj) {
22
+ if (!cache.has(obj)) {
23
+ const memoizedObj = {};
24
+ for (const key of Object.keys(obj))
25
+ cache.has(obj[key]) || cache.set(obj[key], obj[key]), memoizedObj[key] = cache.get(obj[key]);
26
+ cache.set(obj, memoizedObj);
27
+ }
28
+ return cache.get(obj);
29
+ }
30
+ //# sourceMappingURL=weakMemo.js.map
@@ -0,0 +1,25 @@
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 EmptyRoute_exports = {};
16
+ __export(EmptyRoute_exports, {
17
+ EmptyRoute: () => EmptyRoute
18
+ });
19
+ module.exports = __toCommonJS(EmptyRoute_exports);
20
+ var import_Route = require("../Route");
21
+ function EmptyRoute() {
22
+ const route = (0, import_Route.useRouteNode)();
23
+ return null;
24
+ }
25
+ //# sourceMappingURL=EmptyRoute.js.map
@@ -0,0 +1,33 @@
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 ErrorBoundary_exports = {};
24
+ __export(ErrorBoundary_exports, {
25
+ ErrorBoundary: () => ErrorBoundary
26
+ });
27
+ module.exports = __toCommonJS(ErrorBoundary_exports);
28
+ var import_bottom_tabs = require("@react-navigation/bottom-tabs"), import_react = __toESM(require("react"), 1), import_react_native = require("react-native-web"), import_react_native_safe_area_context = require("react-native-safe-area-context");
29
+ function ErrorBoundary({ error, retry }) {
30
+ const Wrapper = import_react.default.useContext(import_bottom_tabs.BottomTabBarHeightContext) ? import_react_native.View : import_react_native_safe_area_context.SafeAreaView;
31
+ return console.error("error", error), null;
32
+ }
33
+ //# sourceMappingURL=ErrorBoundary.js.map
@@ -0,0 +1,83 @@
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 LoadProgressBar_exports = {};
16
+ __export(LoadProgressBar_exports, {
17
+ LoadProgressBar: () => LoadProgressBar
18
+ });
19
+ module.exports = __toCommonJS(LoadProgressBar_exports);
20
+ var import_react = require("react"), import_react_native = require("react-native-web"), import_imperative_api = require("../imperative-api"), import_jsx_runtime = require("react/jsx-runtime");
21
+ const LoadProgressBar = ({
22
+ startDelay = 500,
23
+ finishDelay = 50,
24
+ initialPercent = 20,
25
+ updateInterval = 300,
26
+ sporadicness = 3,
27
+ ...props
28
+ }) => {
29
+ const [loaded, setLoaded] = (0, import_react.useState)(0), [width, setWidth] = (0, import_react.useState)(0);
30
+ return (0, import_react.useEffect)(() => {
31
+ let loadInterval;
32
+ const dispose = import_imperative_api.router.onLoadState((state) => {
33
+ switch (clearTimeout(loadInterval), state) {
34
+ case "loading": {
35
+ loadInterval = setTimeout(() => {
36
+ setLoaded(initialPercent);
37
+ let intervalCount = 0;
38
+ loadInterval = setInterval(() => {
39
+ intervalCount++, intervalCount % sporadicness !== 0 && setLoaded((prev) => {
40
+ const increment = (100 - prev) * (prev > 80 ? 0.05 : 0.1) * Math.random();
41
+ return Math.min(prev + increment, 100);
42
+ });
43
+ }, updateInterval);
44
+ }, startDelay);
45
+ break;
46
+ }
47
+ case "loaded": {
48
+ setLoaded(100), clearInterval(loadInterval), setTimeout(() => {
49
+ setLoaded(0);
50
+ }, finishDelay);
51
+ break;
52
+ }
53
+ }
54
+ });
55
+ return () => {
56
+ dispose(), clearInterval(loadInterval);
57
+ };
58
+ }, [finishDelay, initialPercent, sporadicness, startDelay, updateInterval]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
+ import_react_native.View,
60
+ {
61
+ ...props,
62
+ onLayout: (e) => {
63
+ setWidth(e.nativeEvent.layout.width), props.onLayout?.(e);
64
+ },
65
+ style: [
66
+ {
67
+ display: loaded === 0 ? "none" : "flex",
68
+ height: 1,
69
+ position: "absolute",
70
+ top: 0,
71
+ left: 0,
72
+ right: 0,
73
+ backgroundColor: "rgba(60, 100, 200, 0.65)",
74
+ width: "100%",
75
+ transform: [{ translateX: -(1 - loaded * 0.01) * width }],
76
+ zIndex: Number.MAX_SAFE_INTEGER
77
+ },
78
+ props.style
79
+ ]
80
+ }
81
+ );
82
+ };
83
+ //# sourceMappingURL=LoadProgressBar.js.map
@@ -0,0 +1,101 @@
1
+ "use client";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: !0 });
10
+ }, __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from == "object" || typeof from == "function")
12
+ for (let key of __getOwnPropNames(from))
13
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
+ mod
23
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
+ var Navigator_exports = {};
25
+ __export(Navigator_exports, {
26
+ DefaultNavigator: () => DefaultNavigator,
27
+ Navigator: () => Navigator,
28
+ NavigatorContext: () => NavigatorContext,
29
+ QualifiedSlot: () => QualifiedSlot,
30
+ Slot: () => Slot,
31
+ useNavigatorContext: () => useNavigatorContext,
32
+ useSlot: () => useSlot
33
+ });
34
+ module.exports = __toCommonJS(Navigator_exports);
35
+ var import_native = require("@react-navigation/native"), React = __toESM(require("react"), 1), import_Route = require("../Route"), import_withLayoutContext = require("../layouts/withLayoutContext"), import_useScreens = require("../useScreens"), import_Screen = require("./Screen"), import_react_native_safe_area_context = require("react-native-safe-area-context"), import_jsx_runtime = require("react/jsx-runtime");
36
+ const NavigatorContext = React.createContext(null);
37
+ process.env.NODE_ENV !== "production" && (NavigatorContext.displayName = "NavigatorContext");
38
+ function Navigator({ initialRouteName, screenOptions, children, router }) {
39
+ const contextKey = (0, import_Route.useContextKey)(), { screens, children: otherSlot } = (0, import_withLayoutContext.useFilterScreenChildren)(children, {
40
+ isCustomNavigator: !0,
41
+ contextKey
42
+ }), sorted = (0, import_useScreens.useSortedScreens)(screens ?? []);
43
+ return sorted.length ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ QualifiedNavigator,
45
+ {
46
+ initialRouteName,
47
+ screenOptions,
48
+ screens: sorted,
49
+ contextKey,
50
+ router,
51
+ children: otherSlot
52
+ }
53
+ ) : (console.warn(`Navigator at "${contextKey}" has no children.`), null);
54
+ }
55
+ function QualifiedNavigator({
56
+ initialRouteName,
57
+ screenOptions,
58
+ children,
59
+ screens,
60
+ contextKey,
61
+ router = import_native.StackRouter
62
+ }) {
63
+ const { state, navigation, descriptors, NavigationContent } = (0, import_native.useNavigationBuilder)(router, {
64
+ // Used for getting the parent with navigation.getParent('/normalized/path')
65
+ id: contextKey,
66
+ children: screens,
67
+ screenOptions,
68
+ initialRouteName
69
+ }), value = React.useMemo(() => ({
70
+ contextKey,
71
+ state,
72
+ navigation,
73
+ descriptors,
74
+ router
75
+ }), [contextKey, state, navigation, descriptors, router]);
76
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavigatorContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavigationContent, { children }) });
77
+ }
78
+ function useNavigatorContext() {
79
+ const context = React.useContext(NavigatorContext);
80
+ if (!context)
81
+ throw new Error("useNavigatorContext must be used within a <Navigator />");
82
+ return context;
83
+ }
84
+ function useSlot() {
85
+ const context = useNavigatorContext(), { state, descriptors } = context, current = state.routes.find((route, i) => state.index === i);
86
+ return current ? descriptors[current.key]?.render() ?? null : null;
87
+ }
88
+ const Slot = React.memo(function(props) {
89
+ const contextKey = (0, import_Route.useContextKey)();
90
+ return React.useContext(NavigatorContext)?.contextKey !== contextKey ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Navigator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QualifiedSlot, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QualifiedSlot, {});
91
+ });
92
+ function QualifiedSlot() {
93
+ return useSlot();
94
+ }
95
+ function DefaultNavigator() {
96
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native_safe_area_context.SafeAreaView, { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Navigator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QualifiedSlot, {}) }) });
97
+ }
98
+ Navigator.Slot = Slot;
99
+ Navigator.useContext = useNavigatorContext;
100
+ Navigator.Screen = import_Screen.Screen;
101
+ //# sourceMappingURL=Navigator.js.map
@@ -0,0 +1,42 @@
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 PreloadLinks_exports = {};
16
+ __export(PreloadLinks_exports, {
17
+ PreloadLinks: () => PreloadLinks
18
+ });
19
+ module.exports = __toCommonJS(PreloadLinks_exports);
20
+ var import_react = require("react"), import_router = require("../router/router"), import_getURL = require("../getURL");
21
+ const import_meta = {};
22
+ function PreloadLinks() {
23
+ return typeof window < "u" && import_meta.env.PROD && (0, import_react.useEffect)(() => {
24
+ const url = (0, import_getURL.getURL)(), controller = new AbortController();
25
+ return document.addEventListener(
26
+ "mouseover",
27
+ (e) => {
28
+ let target = e.target;
29
+ if (!(target instanceof HTMLElement) || (target = target instanceof HTMLAnchorElement ? target : target.closest("a"), !(target instanceof HTMLAnchorElement))) return;
30
+ const href = target.getAttribute("href");
31
+ (href?.[0] === "/" || href?.[0].startsWith(url)) && (0, import_router.preloadRoute)(href.replace(url, ""));
32
+ },
33
+ {
34
+ passive: !0,
35
+ signal: controller.signal
36
+ }
37
+ ), () => {
38
+ controller.abort();
39
+ };
40
+ }, []), null;
41
+ }
42
+ //# sourceMappingURL=PreloadLinks.js.map
@@ -0,0 +1,47 @@
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 RootErrorBoundary_exports = {};
24
+ __export(RootErrorBoundary_exports, {
25
+ RootErrorBoundary: () => RootErrorBoundary
26
+ });
27
+ module.exports = __toCommonJS(RootErrorBoundary_exports);
28
+ var import_react = __toESM(require("react"), 1);
29
+ class RootErrorBoundary extends import_react.default.Component {
30
+ state = { hasError: !1 };
31
+ static getDerivedStateFromError(error) {
32
+ return console.error("RootErrorBoundary.error", error), { hasError: !0 };
33
+ }
34
+ componentDidCatch(error, info) {
35
+ console.error(`RootErrorBoundary.error:
36
+ ${printError(error)}
37
+ ${info.componentStack}`);
38
+ }
39
+ render() {
40
+ return this.state.hasError ? null : this.props.children;
41
+ }
42
+ }
43
+ function printError(err) {
44
+ return `${err instanceof Error ? `${err.message}
45
+ ${err.stack}` : err}`;
46
+ }
47
+ //# sourceMappingURL=RootErrorBoundary.js.map
@@ -0,0 +1,29 @@
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 Screen_exports = {};
16
+ __export(Screen_exports, {
17
+ Screen: () => Screen
18
+ });
19
+ module.exports = __toCommonJS(Screen_exports);
20
+ var import_use_isomorphic_layout_effect = require("@vxrn/use-isomorphic-layout-effect"), import_useNavigation = require("../useNavigation");
21
+ function Screen({ name, options }) {
22
+ const navigation = (0, import_useNavigation.useNavigation)(name);
23
+ return (0, import_use_isomorphic_layout_effect.useIsomorphicLayoutEffect)(() => {
24
+ options && // React Navigation will infinitely loop in some cases if an empty object is passed to setOptions.
25
+ // https://github.com/expo/router/issues/452
26
+ Object.keys(options).length && navigation.setOptions(options);
27
+ }, [navigation, options]), null;
28
+ }
29
+ //# sourceMappingURL=Screen.js.map
@@ -0,0 +1,70 @@
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 ScrollRestoration_exports = {};
16
+ __export(ScrollRestoration_exports, {
17
+ ScrollRestoration: () => ScrollRestoration
18
+ });
19
+ module.exports = __toCommonJS(ScrollRestoration_exports);
20
+ var import_react = require("react"), import_lastAction = require("../router/lastAction"), import_router = require("../router/router");
21
+ const KEY = "one-sr", getState = () => JSON.parse(sessionStorage.getItem(KEY) || "{}");
22
+ let isFirstLoad = !0;
23
+ function restorePosition() {
24
+ try {
25
+ const saved = getState()[window.location.pathname];
26
+ typeof saved == "number" && setTimeout(() => {
27
+ window.scrollTo(0, saved);
28
+ });
29
+ } catch (error) {
30
+ console.error("Error restoring scroll position", error), sessionStorage.removeItem(KEY);
31
+ }
32
+ }
33
+ let didPop = !1;
34
+ function rememberScrollPosition() {
35
+ didPop = !1;
36
+ const state = getState();
37
+ state[window.location.pathname] = window.scrollY, sessionStorage.setItem(KEY, JSON.stringify(state));
38
+ }
39
+ let disable = null;
40
+ function configure(props) {
41
+ if (typeof window > "u" || !window.addEventListener)
42
+ return;
43
+ disable?.();
44
+ const popStateController = new AbortController();
45
+ window.addEventListener(
46
+ "popstate",
47
+ () => {
48
+ didPop = !0, (0, import_lastAction.setLastAction)();
49
+ },
50
+ {
51
+ signal: popStateController.signal
52
+ }
53
+ );
54
+ const disposeOnLoadState = (0, import_router.subscribeToLoadingState)((state) => {
55
+ state === "loading" && rememberScrollPosition();
56
+ }), disposeOnRootState = (0, import_router.subscribeToRootState)((state) => {
57
+ if (isFirstLoad) {
58
+ isFirstLoad = !1;
59
+ return;
60
+ }
61
+ state.linkOptions?.scroll !== !1 && (didPop ? props.disable !== "restore" && restorePosition() : window.scrollTo(0, 0));
62
+ });
63
+ return disable = () => {
64
+ popStateController.abort(), disposeOnLoadState(), disposeOnRootState();
65
+ }, disable;
66
+ }
67
+ function ScrollRestoration(props) {
68
+ return (0, import_react.useEffect)(() => configure(props), [props.disable]), null;
69
+ }
70
+ //# sourceMappingURL=ScrollRestoration.js.map
@@ -0,0 +1,44 @@
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 Try_exports = {};
24
+ __export(Try_exports, {
25
+ Try: () => Try
26
+ });
27
+ module.exports = __toCommonJS(Try_exports);
28
+ var import_react = __toESM(require("react"), 1), import_jsx_runtime = require("react/jsx-runtime");
29
+ class Try extends import_react.default.Component {
30
+ state = { error: void 0 };
31
+ static getDerivedStateFromError(error) {
32
+ return { error };
33
+ }
34
+ retry = () => new Promise((resolve) => {
35
+ this.setState({ error: void 0 }, () => {
36
+ resolve();
37
+ });
38
+ });
39
+ render() {
40
+ const { error } = this.state, { catch: ErrorBoundary, children } = this.props;
41
+ return error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorBoundary, { error, retry: this.retry }) : children;
42
+ }
43
+ }
44
+ //# sourceMappingURL=Try.js.map