one 1.1.320 → 1.1.322
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/Root.js +182 -0
- package/dist/cjs/Route.js +45 -0
- package/dist/cjs/cleanUrl.js +41 -0
- package/dist/cjs/cli/label-process.js +25 -0
- package/dist/cjs/cli/main.js +46 -0
- package/dist/cjs/cli/patch.js +34 -0
- package/dist/cjs/cli/prebuild.js +34 -0
- package/dist/cjs/cli/run.js +52 -0
- package/dist/cjs/cli/runAndroid.js +34 -0
- package/dist/cjs/cli/runIos.js +34 -0
- package/dist/cjs/cli.js +220 -0
- package/dist/cjs/clientLoaderResolver.js +32 -0
- package/dist/cjs/config.js +27 -0
- package/dist/cjs/constants.js +28 -0
- package/dist/cjs/createApp.js +46 -0
- package/dist/cjs/createHandleRequest.js +138 -0
- package/dist/cjs/createRoute.js +37 -0
- package/dist/cjs/fallbackViews/Sitemap.js +82 -0
- package/dist/cjs/fallbackViews/Unmatched.js +58 -0
- package/dist/cjs/fork/NavigationContainer.js +85 -0
- package/dist/cjs/fork/createMemoryHistory.js +100 -0
- package/dist/cjs/fork/extractPathFromURL.js +62 -0
- package/dist/cjs/fork/findFocusedRoute.js +26 -0
- package/dist/cjs/fork/getPathFromState.js +265 -0
- package/dist/cjs/fork/getStateFromPath.js +381 -0
- package/dist/cjs/fork/useLinking.js +182 -0
- package/dist/cjs/fork/validatePathConfig.js +46 -0
- package/dist/cjs/getLinkingConfig.js +59 -0
- package/dist/cjs/getReactNavigationConfig.js +69 -0
- package/dist/cjs/getRoutes.js +294 -0
- package/dist/cjs/getURL.js +24 -0
- package/dist/cjs/head/Head.js +23 -0
- package/dist/cjs/head/HeadModule.js +22 -0
- package/dist/cjs/head/index.js +15 -0
- package/dist/cjs/head/types.js +14 -0
- package/dist/cjs/head/url.js +52 -0
- package/dist/cjs/hooks.js +99 -0
- package/dist/cjs/imperative-api.js +45 -0
- package/dist/cjs/import-mode/index.js +21 -0
- package/dist/cjs/import-mode/index.web.js +21 -0
- package/dist/cjs/index.js +65 -0
- package/dist/cjs/interfaces/router.js +23 -0
- package/dist/cjs/layouts/Drawer.js +24 -0
- package/dist/cjs/layouts/Stack.js +24 -0
- package/dist/cjs/layouts/Tabs.js +52 -0
- package/dist/cjs/layouts/withLayoutContext.js +77 -0
- package/dist/cjs/link/Link.js +98 -0
- package/dist/cjs/link/Redirect.js +31 -0
- package/dist/cjs/link/href.js +50 -0
- package/dist/cjs/link/linking.js +82 -0
- package/dist/cjs/link/path.js +65 -0
- package/dist/cjs/link/useLinkTo.js +42 -0
- package/dist/cjs/link/useLoadedNavigation.js +50 -0
- package/dist/cjs/matchers.js +68 -0
- package/dist/cjs/platform.js +21 -0
- package/dist/cjs/polyfills-mobile.js +26 -0
- package/dist/cjs/polyfills-server.js +23 -0
- package/dist/cjs/render.js +44 -0
- package/dist/cjs/router/RouterStore.js +14 -0
- package/dist/cjs/router/getNormalizedStatePath.js +50 -0
- package/dist/cjs/router/lastAction.js +25 -0
- package/dist/cjs/router/router.js +345 -0
- package/dist/cjs/router/serverLocationContext.js +22 -0
- package/dist/cjs/router/useInitializeOneRouter.js +43 -0
- package/dist/cjs/serve.js +184 -0
- package/dist/cjs/server/createRoutesManifest.js +40 -0
- package/dist/cjs/server/getServerManifest.js +109 -0
- package/dist/cjs/server-render.js +42 -0
- package/dist/cjs/sortRoutes.js +64 -0
- package/dist/cjs/typed-routes/generateRouteTypes.js +33 -0
- package/dist/cjs/typed-routes/getTypedRoutesDeclarationFile.js +83 -0
- package/dist/cjs/types.js +14 -0
- package/dist/cjs/useFocusEffect.js +79 -0
- package/dist/cjs/useLoader.js +97 -0
- package/dist/cjs/useNavigation.js +60 -0
- package/dist/cjs/useScreens.js +176 -0
- package/dist/cjs/useViteRoutes.js +77 -0
- package/dist/cjs/utils/assertIsReady.js +26 -0
- package/dist/cjs/utils/dynamicImport.js +24 -0
- package/dist/cjs/utils/existsAsync.js +28 -0
- package/dist/cjs/utils/getPageExport.js +38 -0
- package/dist/cjs/utils/globDir.js +37 -0
- package/dist/cjs/utils/hashString.js +32 -0
- package/dist/cjs/utils/isResponse.js +23 -0
- package/dist/cjs/utils/isStatus.js +23 -0
- package/dist/cjs/utils/promiseWithResolvers.js +26 -0
- package/dist/cjs/utils/rand.js +21 -0
- package/dist/cjs/utils/redirect.js +28 -0
- package/dist/cjs/utils/removeSearch.js +23 -0
- package/dist/cjs/utils/removeUndefined.js +26 -0
- package/dist/cjs/utils/url.js +31 -0
- package/dist/cjs/utils/weakKey.js +24 -0
- package/dist/cjs/utils/weakMemo.js +30 -0
- package/dist/cjs/views/EmptyRoute.js +25 -0
- package/dist/cjs/views/ErrorBoundary.js +33 -0
- package/dist/cjs/views/LoadProgressBar.js +83 -0
- package/dist/cjs/views/Navigator.js +101 -0
- package/dist/cjs/views/PreloadLinks.js +42 -0
- package/dist/cjs/views/RootErrorBoundary.js +47 -0
- package/dist/cjs/views/Screen.js +29 -0
- package/dist/cjs/views/ScrollRestoration.js +70 -0
- package/dist/cjs/views/Try.js +44 -0
- package/dist/cjs/vite/build.js +377 -0
- package/dist/cjs/vite/clientTreeShakePlugin.js +76 -0
- package/dist/cjs/vite/constants.js +22 -0
- package/dist/cjs/vite/createFileSystemRouter.cjs +2 -1
- package/dist/cjs/vite/createFileSystemRouter.js +244 -0
- package/dist/cjs/vite/createFileSystemRouter.js.map +6 -0
- package/dist/cjs/vite/createFileSystemRouter.native.js +2 -1
- package/dist/cjs/vite/createFileSystemRouter.native.js.map +2 -2
- package/dist/cjs/vite/customNodeExternals.js +52 -0
- package/dist/cjs/vite/ensureTsConfig.js +66 -0
- package/dist/cjs/vite/findDepsToOptimize.js +66 -0
- package/dist/cjs/vite/fixDependenciesPlugin.js +43 -0
- package/dist/cjs/vite/generateTypesForRoutes.js +36 -0
- package/dist/cjs/vite/getManifest.js +27 -0
- package/dist/cjs/vite/headers.js +39 -0
- package/dist/cjs/vite/makePluginWebOnly.js +27 -0
- package/dist/cjs/vite/one.js +290 -0
- package/dist/cjs/vite/removeReactNativeWebAnimatedPlugin.js +50 -0
- package/dist/cjs/vite/replaceLoader.js +34 -0
- package/dist/cjs/vite/resolveAPIRequest.js +71 -0
- package/dist/cjs/vite/server.js +16 -0
- package/dist/cjs/vite/types.js +14 -0
- package/dist/cjs/vite/virtualEntryPlugin.js +67 -0
- package/dist/cjs/vite/vitePluginSsrCss.js +130 -0
- package/dist/cjs/vite.cjs +2 -0
- package/dist/cjs/vite.js +29 -0
- package/dist/cjs/vite.js.map +6 -0
- package/dist/cjs/vite.native.js +3 -1
- package/dist/cjs/vite.native.js.map +1 -1
- package/dist/cjs/zero/getQueryKey.js +24 -0
- package/dist/cjs/zero/isZeroQuery.js +23 -0
- package/dist/cjs/zero/resolveQuery.js +38 -0
- package/dist/cjs/zero/subscribeToQuery.js +28 -0
- package/dist/cjs/zero/types.js +14 -0
- package/dist/cjs/zero/useQuery.js +47 -0
- package/dist/cjs/zero/useQueryZero.js +38 -0
- package/dist/cjs/zero.js +23 -0
- package/dist/esm/vite/createFileSystemRouter.js +2 -1
- package/dist/esm/vite/createFileSystemRouter.js.map +1 -1
- package/dist/esm/vite/createFileSystemRouter.mjs +2 -1
- package/dist/esm/vite/createFileSystemRouter.mjs.map +1 -1
- package/dist/esm/vite/createFileSystemRouter.native.js +2 -1
- package/dist/esm/vite/createFileSystemRouter.native.js.map +2 -2
- package/dist/esm/vite.js +2 -0
- package/dist/esm/vite.js.map +1 -1
- package/dist/esm/vite.mjs +2 -1
- package/dist/esm/vite.mjs.map +1 -1
- package/dist/esm/vite.native.js +2 -0
- package/dist/esm/vite.native.js.map +2 -2
- package/package.json +8 -8
- package/src/vite/createFileSystemRouter.tsx +1 -1
- package/src/vite.ts +1 -0
- package/types/vite.d.ts +1 -0
- package/types/vite.d.ts.map +1 -1
- package/dist/cjs/createApp.native.cjs +0 -38
- package/dist/cjs/createApp.native.cjs.map +0 -6
- package/dist/cjs/fork/NavigationContainer.native.cjs +0 -103
- package/dist/cjs/fork/NavigationContainer.native.cjs.map +0 -6
- package/dist/cjs/fork/useLinking.native.cjs +0 -126
- package/dist/cjs/fork/useLinking.native.cjs.map +0 -6
- package/dist/cjs/getURL.native.cjs +0 -48
- package/dist/cjs/getURL.native.cjs.map +0 -6
- package/dist/cjs/head/Head.android.cjs +0 -28
- package/dist/cjs/head/Head.android.cjs.map +0 -6
- package/dist/cjs/head/Head.ios.cjs +0 -210
- package/dist/cjs/head/Head.ios.cjs.map +0 -6
- package/dist/cjs/import-mode/index.android.cjs +0 -26
- package/dist/cjs/import-mode/index.android.cjs.map +0 -6
- package/dist/cjs/import-mode/index.ios.cjs +0 -26
- package/dist/cjs/import-mode/index.ios.cjs.map +0 -6
- package/dist/cjs/import-mode/index.native.cjs +0 -26
- package/dist/cjs/import-mode/index.native.cjs.map +0 -6
- package/dist/cjs/render.native.cjs +0 -28
- package/dist/cjs/render.native.cjs.map +0 -6
- package/dist/cjs/views/PreloadLinks.native.cjs +0 -28
- package/dist/cjs/views/PreloadLinks.native.cjs.map +0 -6
- package/dist/cjs/vite/createFileSystemRouter.cjs.map +0 -6
- package/dist/cjs/vite/headers.native.cjs +0 -32
- package/dist/cjs/vite/headers.native.cjs.map +0 -6
- package/dist/cjs/vite.cjs.map +0 -6
- /package/dist/cjs/{Root.cjs.map → Root.js.map} +0 -0
- /package/dist/cjs/{Route.cjs.map → Route.js.map} +0 -0
- /package/dist/cjs/{cleanUrl.cjs.map → cleanUrl.js.map} +0 -0
- /package/dist/cjs/cli/{label-process.cjs.map → label-process.js.map} +0 -0
- /package/dist/cjs/cli/{main.cjs.map → main.js.map} +0 -0
- /package/dist/cjs/cli/{patch.cjs.map → patch.js.map} +0 -0
- /package/dist/cjs/cli/{prebuild.cjs.map → prebuild.js.map} +0 -0
- /package/dist/cjs/cli/{run.cjs.map → run.js.map} +0 -0
- /package/dist/cjs/cli/{runAndroid.cjs.map → runAndroid.js.map} +0 -0
- /package/dist/cjs/cli/{runIos.cjs.map → runIos.js.map} +0 -0
- /package/dist/cjs/{cli.cjs.map → cli.js.map} +0 -0
- /package/dist/cjs/{clientLoaderResolver.cjs.map → clientLoaderResolver.js.map} +0 -0
- /package/dist/cjs/{config.cjs.map → config.js.map} +0 -0
- /package/dist/cjs/{constants.cjs.map → constants.js.map} +0 -0
- /package/dist/cjs/{createApp.cjs.map → createApp.js.map} +0 -0
- /package/dist/cjs/{createHandleRequest.cjs.map → createHandleRequest.js.map} +0 -0
- /package/dist/cjs/{createRoute.cjs.map → createRoute.js.map} +0 -0
- /package/dist/cjs/fallbackViews/{Sitemap.cjs.map → Sitemap.js.map} +0 -0
- /package/dist/cjs/fallbackViews/{Unmatched.cjs.map → Unmatched.js.map} +0 -0
- /package/dist/cjs/fork/{NavigationContainer.cjs.map → NavigationContainer.js.map} +0 -0
- /package/dist/cjs/fork/{createMemoryHistory.cjs.map → createMemoryHistory.js.map} +0 -0
- /package/dist/cjs/fork/{extractPathFromURL.cjs.map → extractPathFromURL.js.map} +0 -0
- /package/dist/cjs/fork/{findFocusedRoute.cjs.map → findFocusedRoute.js.map} +0 -0
- /package/dist/cjs/fork/{getPathFromState.cjs.map → getPathFromState.js.map} +0 -0
- /package/dist/cjs/fork/{getStateFromPath.cjs.map → getStateFromPath.js.map} +0 -0
- /package/dist/cjs/fork/{useLinking.cjs.map → useLinking.js.map} +0 -0
- /package/dist/cjs/fork/{validatePathConfig.cjs.map → validatePathConfig.js.map} +0 -0
- /package/dist/cjs/{getLinkingConfig.cjs.map → getLinkingConfig.js.map} +0 -0
- /package/dist/cjs/{getReactNavigationConfig.cjs.map → getReactNavigationConfig.js.map} +0 -0
- /package/dist/cjs/{getRoutes.cjs.map → getRoutes.js.map} +0 -0
- /package/dist/cjs/{getURL.cjs.map → getURL.js.map} +0 -0
- /package/dist/cjs/head/{Head.cjs.map → Head.js.map} +0 -0
- /package/dist/cjs/head/{HeadModule.cjs.map → HeadModule.js.map} +0 -0
- /package/dist/cjs/head/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/head/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/head/{url.cjs.map → url.js.map} +0 -0
- /package/dist/cjs/{hooks.cjs.map → hooks.js.map} +0 -0
- /package/dist/cjs/{imperative-api.cjs.map → imperative-api.js.map} +0 -0
- /package/dist/cjs/import-mode/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/import-mode/{index.web.cjs.map → index.web.js.map} +0 -0
- /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/interfaces/{router.cjs.map → router.js.map} +0 -0
- /package/dist/cjs/layouts/{Drawer.cjs.map → Drawer.js.map} +0 -0
- /package/dist/cjs/layouts/{Stack.cjs.map → Stack.js.map} +0 -0
- /package/dist/cjs/layouts/{Tabs.cjs.map → Tabs.js.map} +0 -0
- /package/dist/cjs/layouts/{withLayoutContext.cjs.map → withLayoutContext.js.map} +0 -0
- /package/dist/cjs/link/{Link.cjs.map → Link.js.map} +0 -0
- /package/dist/cjs/link/{Redirect.cjs.map → Redirect.js.map} +0 -0
- /package/dist/cjs/link/{href.cjs.map → href.js.map} +0 -0
- /package/dist/cjs/link/{linking.cjs.map → linking.js.map} +0 -0
- /package/dist/cjs/link/{path.cjs.map → path.js.map} +0 -0
- /package/dist/cjs/link/{useLinkTo.cjs.map → useLinkTo.js.map} +0 -0
- /package/dist/cjs/link/{useLoadedNavigation.cjs.map → useLoadedNavigation.js.map} +0 -0
- /package/dist/cjs/{matchers.cjs.map → matchers.js.map} +0 -0
- /package/dist/cjs/{platform.cjs.map → platform.js.map} +0 -0
- /package/dist/cjs/{polyfills-mobile.cjs.map → polyfills-mobile.js.map} +0 -0
- /package/dist/cjs/{polyfills-server.cjs.map → polyfills-server.js.map} +0 -0
- /package/dist/cjs/{render.cjs.map → render.js.map} +0 -0
- /package/dist/cjs/router/{RouterStore.cjs.map → RouterStore.js.map} +0 -0
- /package/dist/cjs/router/{getNormalizedStatePath.cjs.map → getNormalizedStatePath.js.map} +0 -0
- /package/dist/cjs/router/{lastAction.cjs.map → lastAction.js.map} +0 -0
- /package/dist/cjs/router/{router.cjs.map → router.js.map} +0 -0
- /package/dist/cjs/router/{serverLocationContext.cjs.map → serverLocationContext.js.map} +0 -0
- /package/dist/cjs/router/{useInitializeOneRouter.cjs.map → useInitializeOneRouter.js.map} +0 -0
- /package/dist/cjs/{serve.cjs.map → serve.js.map} +0 -0
- /package/dist/cjs/server/{createRoutesManifest.cjs.map → createRoutesManifest.js.map} +0 -0
- /package/dist/cjs/server/{getServerManifest.cjs.map → getServerManifest.js.map} +0 -0
- /package/dist/cjs/{server-render.cjs.map → server-render.js.map} +0 -0
- /package/dist/cjs/{sortRoutes.cjs.map → sortRoutes.js.map} +0 -0
- /package/dist/cjs/typed-routes/{generateRouteTypes.cjs.map → generateRouteTypes.js.map} +0 -0
- /package/dist/cjs/typed-routes/{getTypedRoutesDeclarationFile.cjs.map → getTypedRoutesDeclarationFile.js.map} +0 -0
- /package/dist/cjs/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/{useFocusEffect.cjs.map → useFocusEffect.js.map} +0 -0
- /package/dist/cjs/{useLoader.cjs.map → useLoader.js.map} +0 -0
- /package/dist/cjs/{useNavigation.cjs.map → useNavigation.js.map} +0 -0
- /package/dist/cjs/{useScreens.cjs.map → useScreens.js.map} +0 -0
- /package/dist/cjs/{useViteRoutes.cjs.map → useViteRoutes.js.map} +0 -0
- /package/dist/cjs/utils/{assertIsReady.cjs.map → assertIsReady.js.map} +0 -0
- /package/dist/cjs/utils/{dynamicImport.cjs.map → dynamicImport.js.map} +0 -0
- /package/dist/cjs/utils/{existsAsync.cjs.map → existsAsync.js.map} +0 -0
- /package/dist/cjs/utils/{getPageExport.cjs.map → getPageExport.js.map} +0 -0
- /package/dist/cjs/utils/{globDir.cjs.map → globDir.js.map} +0 -0
- /package/dist/cjs/utils/{hashString.cjs.map → hashString.js.map} +0 -0
- /package/dist/cjs/utils/{isResponse.cjs.map → isResponse.js.map} +0 -0
- /package/dist/cjs/utils/{isStatus.cjs.map → isStatus.js.map} +0 -0
- /package/dist/cjs/utils/{promiseWithResolvers.cjs.map → promiseWithResolvers.js.map} +0 -0
- /package/dist/cjs/utils/{rand.cjs.map → rand.js.map} +0 -0
- /package/dist/cjs/utils/{redirect.cjs.map → redirect.js.map} +0 -0
- /package/dist/cjs/utils/{removeSearch.cjs.map → removeSearch.js.map} +0 -0
- /package/dist/cjs/utils/{removeUndefined.cjs.map → removeUndefined.js.map} +0 -0
- /package/dist/cjs/utils/{url.cjs.map → url.js.map} +0 -0
- /package/dist/cjs/utils/{weakKey.cjs.map → weakKey.js.map} +0 -0
- /package/dist/cjs/utils/{weakMemo.cjs.map → weakMemo.js.map} +0 -0
- /package/dist/cjs/views/{EmptyRoute.cjs.map → EmptyRoute.js.map} +0 -0
- /package/dist/cjs/views/{ErrorBoundary.cjs.map → ErrorBoundary.js.map} +0 -0
- /package/dist/cjs/views/{LoadProgressBar.cjs.map → LoadProgressBar.js.map} +0 -0
- /package/dist/cjs/views/{Navigator.cjs.map → Navigator.js.map} +0 -0
- /package/dist/cjs/views/{PreloadLinks.cjs.map → PreloadLinks.js.map} +0 -0
- /package/dist/cjs/views/{RootErrorBoundary.cjs.map → RootErrorBoundary.js.map} +0 -0
- /package/dist/cjs/views/{Screen.cjs.map → Screen.js.map} +0 -0
- /package/dist/cjs/views/{ScrollRestoration.cjs.map → ScrollRestoration.js.map} +0 -0
- /package/dist/cjs/views/{Try.cjs.map → Try.js.map} +0 -0
- /package/dist/cjs/vite/{build.cjs.map → build.js.map} +0 -0
- /package/dist/cjs/vite/{clientTreeShakePlugin.cjs.map → clientTreeShakePlugin.js.map} +0 -0
- /package/dist/cjs/vite/{constants.cjs.map → constants.js.map} +0 -0
- /package/dist/cjs/vite/{customNodeExternals.cjs.map → customNodeExternals.js.map} +0 -0
- /package/dist/cjs/vite/{ensureTsConfig.cjs.map → ensureTsConfig.js.map} +0 -0
- /package/dist/cjs/vite/{findDepsToOptimize.cjs.map → findDepsToOptimize.js.map} +0 -0
- /package/dist/cjs/vite/{fixDependenciesPlugin.cjs.map → fixDependenciesPlugin.js.map} +0 -0
- /package/dist/cjs/vite/{generateTypesForRoutes.cjs.map → generateTypesForRoutes.js.map} +0 -0
- /package/dist/cjs/vite/{getManifest.cjs.map → getManifest.js.map} +0 -0
- /package/dist/cjs/vite/{headers.cjs.map → headers.js.map} +0 -0
- /package/dist/cjs/vite/{makePluginWebOnly.cjs.map → makePluginWebOnly.js.map} +0 -0
- /package/dist/cjs/vite/{one.cjs.map → one.js.map} +0 -0
- /package/dist/cjs/vite/{removeReactNativeWebAnimatedPlugin.cjs.map → removeReactNativeWebAnimatedPlugin.js.map} +0 -0
- /package/dist/cjs/vite/{replaceLoader.cjs.map → replaceLoader.js.map} +0 -0
- /package/dist/cjs/vite/{resolveAPIRequest.cjs.map → resolveAPIRequest.js.map} +0 -0
- /package/dist/cjs/vite/{server.cjs.map → server.js.map} +0 -0
- /package/dist/cjs/vite/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/vite/{virtualEntryPlugin.cjs.map → virtualEntryPlugin.js.map} +0 -0
- /package/dist/cjs/vite/{vitePluginSsrCss.cjs.map → vitePluginSsrCss.js.map} +0 -0
- /package/dist/cjs/zero/{getQueryKey.cjs.map → getQueryKey.js.map} +0 -0
- /package/dist/cjs/zero/{isZeroQuery.cjs.map → isZeroQuery.js.map} +0 -0
- /package/dist/cjs/zero/{resolveQuery.cjs.map → resolveQuery.js.map} +0 -0
- /package/dist/cjs/zero/{subscribeToQuery.cjs.map → subscribeToQuery.js.map} +0 -0
- /package/dist/cjs/zero/{types.cjs.map → types.js.map} +0 -0
- /package/dist/cjs/zero/{useQuery.cjs.map → useQuery.js.map} +0 -0
- /package/dist/cjs/zero/{useQueryZero.cjs.map → useQueryZero.js.map} +0 -0
- /package/dist/cjs/{zero.cjs.map → zero.js.map} +0 -0
@@ -0,0 +1,69 @@
|
|
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 getReactNavigationConfig_exports = {};
|
16
|
+
__export(getReactNavigationConfig_exports, {
|
17
|
+
getReactNavigationConfig: () => getReactNavigationConfig,
|
18
|
+
getReactNavigationScreensConfig: () => getReactNavigationScreensConfig
|
19
|
+
});
|
20
|
+
module.exports = __toCommonJS(getReactNavigationConfig_exports);
|
21
|
+
var import_matchers = require("./matchers");
|
22
|
+
function convertDynamicRouteToReactNavigation(segment) {
|
23
|
+
if (segment === "index")
|
24
|
+
return "";
|
25
|
+
const rest = (0, import_matchers.matchDeepDynamicRouteName)(segment);
|
26
|
+
if (rest != null)
|
27
|
+
return "*" + rest;
|
28
|
+
const dynamicName = (0, import_matchers.matchDynamicName)(segment);
|
29
|
+
return dynamicName != null ? `:${dynamicName}` : segment;
|
30
|
+
}
|
31
|
+
function parseRouteSegments(segments) {
|
32
|
+
return (
|
33
|
+
// NOTE: When there are nested routes without layouts
|
34
|
+
// the node.route will be something like `app/home/index`
|
35
|
+
// this needs to be split to ensure each segment is parsed correctly.
|
36
|
+
segments.split("/").map(convertDynamicRouteToReactNavigation).filter(Boolean).join("/")
|
37
|
+
);
|
38
|
+
}
|
39
|
+
function convertRouteNodeToScreen(node, metaOnly) {
|
40
|
+
const path = parseRouteSegments(node.route);
|
41
|
+
if (!node.children.length)
|
42
|
+
return metaOnly ? path : {
|
43
|
+
path,
|
44
|
+
screens: {},
|
45
|
+
_route: node
|
46
|
+
};
|
47
|
+
const screens = getReactNavigationScreensConfig(node.children, metaOnly), screen = {
|
48
|
+
path,
|
49
|
+
screens,
|
50
|
+
// NOTE: This is bad because it forces all Layout Routes
|
51
|
+
// to be loaded into memory. We should move towards a system where
|
52
|
+
// the initial route name is either loaded asynchronously in the Layout Route
|
53
|
+
// or defined via a file system convention.
|
54
|
+
initialRouteName: node.initialRouteName
|
55
|
+
};
|
56
|
+
return metaOnly || (screen._route = node), screen;
|
57
|
+
}
|
58
|
+
function getReactNavigationScreensConfig(nodes, metaOnly) {
|
59
|
+
return Object.fromEntries(
|
60
|
+
nodes.map((node) => [node.route, convertRouteNodeToScreen(node, metaOnly)])
|
61
|
+
);
|
62
|
+
}
|
63
|
+
function getReactNavigationConfig(routes, metaOnly) {
|
64
|
+
return {
|
65
|
+
initialRouteName: routes.initialRouteName,
|
66
|
+
screens: getReactNavigationScreensConfig(routes.children, metaOnly)
|
67
|
+
};
|
68
|
+
}
|
69
|
+
//# sourceMappingURL=getReactNavigationConfig.js.map
|
@@ -0,0 +1,294 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
10
|
+
for (let key of __getOwnPropNames(from))
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
+
return to;
|
13
|
+
};
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
+
var getRoutes_exports = {};
|
16
|
+
__export(getRoutes_exports, {
|
17
|
+
extrapolateGroups: () => extrapolateGroups,
|
18
|
+
generateDynamic: () => generateDynamic,
|
19
|
+
getExactRoutes: () => getExactRoutes,
|
20
|
+
getIgnoreList: () => getIgnoreList,
|
21
|
+
getRoutes: () => getRoutes
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(getRoutes_exports);
|
24
|
+
var import_config = require("./config"), import_matchers = require("./matchers"), import_getPageExport = require("./utils/getPageExport");
|
25
|
+
const validPlatforms = /* @__PURE__ */ new Set(["android", "ios", "native", "web"]);
|
26
|
+
function getRoutes(contextModule, options = {}) {
|
27
|
+
const directoryTree = getDirectoryTree(contextModule, options);
|
28
|
+
if (!directoryTree)
|
29
|
+
return null;
|
30
|
+
const rootNode = flattenDirectoryTreeToRoutes(directoryTree, options);
|
31
|
+
return options.ignoreEntryPoints || crawlAndAppendInitialRoutesAndEntryFiles(rootNode, options), rootNode;
|
32
|
+
}
|
33
|
+
function getExactRoutes(contextModule, options = {}) {
|
34
|
+
return getRoutes(contextModule, {
|
35
|
+
...options,
|
36
|
+
skipGenerated: !0
|
37
|
+
});
|
38
|
+
}
|
39
|
+
function getDirectoryTree(contextModule, options) {
|
40
|
+
const importMode = options.importMode || process.env.One_ROUTER_IMPORT_MODE, ignoreList = [/^\.\/\+html\.[tj]sx?$/];
|
41
|
+
options.ignore && ignoreList.push(...options.ignore), options.preserveApiRoutes || ignoreList.push(/\+api\.[tj]sx?$/);
|
42
|
+
const rootDirectory = {
|
43
|
+
files: /* @__PURE__ */ new Map(),
|
44
|
+
subdirectories: /* @__PURE__ */ new Map()
|
45
|
+
};
|
46
|
+
let hasRoutes = !1, isValid = !1;
|
47
|
+
for (const filePath of contextModule.keys()) {
|
48
|
+
if (ignoreList.some((regex) => regex.test(filePath)))
|
49
|
+
continue;
|
50
|
+
isValid = !0;
|
51
|
+
const meta = getFileMeta(filePath, options);
|
52
|
+
if (meta.specificity < 0)
|
53
|
+
continue;
|
54
|
+
const type = meta.isLayout ? "layout" : meta.renderMode || (0, import_config.getDefaultRenderMode)();
|
55
|
+
let node = {
|
56
|
+
type,
|
57
|
+
loadRoute() {
|
58
|
+
if (options.ignoreRequireErrors)
|
59
|
+
try {
|
60
|
+
return contextModule(filePath);
|
61
|
+
} catch {
|
62
|
+
return {};
|
63
|
+
}
|
64
|
+
else
|
65
|
+
return contextModule(filePath);
|
66
|
+
},
|
67
|
+
contextKey: filePath,
|
68
|
+
route: "",
|
69
|
+
// This is overwritten during hoisting based upon the _layout
|
70
|
+
dynamic: null,
|
71
|
+
children: []
|
72
|
+
// While we are building the directory tree, we don't know the node's children just yet. This is added during hoisting
|
73
|
+
};
|
74
|
+
if (!(process.env.NODE_ENV === "development" && node.type !== "api" && importMode === "sync" && !(0, import_getPageExport.getPageExport)(node.loadRoute())))
|
75
|
+
for (const route of extrapolateGroups(meta.route)) {
|
76
|
+
const subdirectoryParts = route.split("/").slice(0, -1);
|
77
|
+
let directory = rootDirectory;
|
78
|
+
for (const part of subdirectoryParts) {
|
79
|
+
let subDirectory = directory.subdirectories.get(part);
|
80
|
+
subDirectory || (subDirectory = {
|
81
|
+
files: /* @__PURE__ */ new Map(),
|
82
|
+
subdirectories: /* @__PURE__ */ new Map()
|
83
|
+
}, directory.subdirectories.set(part, subDirectory)), directory = subDirectory;
|
84
|
+
}
|
85
|
+
if (node = { ...node, route }, meta.isLayout) {
|
86
|
+
directory.layout ??= [];
|
87
|
+
const existing = directory.layout[meta.specificity];
|
88
|
+
if (existing) {
|
89
|
+
if (process.env.NODE_ENV !== "production")
|
90
|
+
throw new Error(
|
91
|
+
`The layouts "${filePath}" and "${existing.contextKey}" conflict on the route "/${route}". Please remove or rename one of these files.`
|
92
|
+
);
|
93
|
+
} else
|
94
|
+
node = getLayoutNode(node, options), directory.layout[meta.specificity] = node;
|
95
|
+
} else if (type === "api") {
|
96
|
+
const fileKey = `${route}+api`;
|
97
|
+
let nodes = directory.files.get(fileKey);
|
98
|
+
nodes || (nodes = [], directory.files.set(fileKey, nodes));
|
99
|
+
const existing = nodes[0];
|
100
|
+
if (existing) {
|
101
|
+
if (process.env.NODE_ENV !== "production")
|
102
|
+
throw new Error(
|
103
|
+
`The API route file "${filePath}" and "${existing.contextKey}" conflict on the route "/${route}". Please remove or rename one of these files.`
|
104
|
+
);
|
105
|
+
} else
|
106
|
+
nodes[0] = node;
|
107
|
+
} else {
|
108
|
+
let nodes = directory.files.get(route);
|
109
|
+
nodes || (nodes = [], directory.files.set(route, nodes));
|
110
|
+
const existing = nodes[meta.specificity];
|
111
|
+
if (existing) {
|
112
|
+
if (process.env.NODE_ENV !== "production")
|
113
|
+
throw new Error(
|
114
|
+
`The route files "${filePath}" and "${existing.contextKey}" conflict on the route "/${route}". Please remove or rename one of these files.`
|
115
|
+
);
|
116
|
+
} else
|
117
|
+
hasRoutes ||= !0, nodes[meta.specificity] = node;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
}
|
121
|
+
return isValid ? (rootDirectory.layout || (rootDirectory.layout = [
|
122
|
+
{
|
123
|
+
type: "layout",
|
124
|
+
loadRoute: () => ({
|
125
|
+
default: require("./views/Navigator").DefaultNavigator
|
126
|
+
}),
|
127
|
+
// Generate a fake file name for the directory
|
128
|
+
contextKey: "router/build/views/Navigator.js",
|
129
|
+
route: "",
|
130
|
+
generated: !0,
|
131
|
+
dynamic: null,
|
132
|
+
children: []
|
133
|
+
}
|
134
|
+
]), options.skipGenerated || (hasRoutes && appendSitemapRoute(rootDirectory), appendNotFoundRoute(rootDirectory)), rootDirectory) : null;
|
135
|
+
}
|
136
|
+
function flattenDirectoryTreeToRoutes(directory, options, layout, pathToRemove = "") {
|
137
|
+
if (directory.layout) {
|
138
|
+
const previousLayout = layout;
|
139
|
+
layout = getMostSpecific(directory.layout), previousLayout && previousLayout.children.push(layout), options.internal_stripLoadRoute && delete layout.loadRoute;
|
140
|
+
const newRoute = layout.route.replace(pathToRemove, "");
|
141
|
+
pathToRemove = layout.route ? `${layout.route}/` : "", layout.route = newRoute, layout.dynamic = generateDynamic(layout.route);
|
142
|
+
}
|
143
|
+
if (!layout) throw new Error("One Internal Error: No nearest layout");
|
144
|
+
for (const routes of directory.files.values()) {
|
145
|
+
const routeNode = getMostSpecific(routes);
|
146
|
+
routeNode.route = routeNode.route.replace(pathToRemove, ""), routeNode.dynamic = generateDynamic(routeNode.route), options.internal_stripLoadRoute && delete routeNode.loadRoute, layout.children.push(routeNode);
|
147
|
+
}
|
148
|
+
for (const child of directory.subdirectories.values())
|
149
|
+
flattenDirectoryTreeToRoutes(child, options, layout, pathToRemove);
|
150
|
+
return layout;
|
151
|
+
}
|
152
|
+
function getFileMeta(key, options) {
|
153
|
+
key = key.replace(/^\.\//, "");
|
154
|
+
const parts = key.split("/");
|
155
|
+
let route = (0, import_matchers.removeSupportedExtensions)(key);
|
156
|
+
const filename = parts[parts.length - 1], filenameWithoutExtensions = (0, import_matchers.removeSupportedExtensions)(filename), isLayout = filenameWithoutExtensions.startsWith("_layout"), [_fullname, renderModeFound] = filename.match(/\+(api|ssg|ssr|spa)\.(\w+\.)?[jt]sx?$/) || [], renderMode = renderModeFound;
|
157
|
+
if (filenameWithoutExtensions.startsWith("(") && filenameWithoutExtensions.endsWith(")"))
|
158
|
+
throw new Error(`Invalid route ./${key}. Routes cannot end with '(group)' syntax`);
|
159
|
+
if (renderMode !== "api" && filename.startsWith("+") && filenameWithoutExtensions !== "+not-found") {
|
160
|
+
const renamedRoute = [...parts.slice(0, -1), filename.slice(1)].join("/");
|
161
|
+
throw new Error(
|
162
|
+
`Invalid route ./${key}. Route nodes cannot start with the '+' character. "Please rename to ${renamedRoute}"`
|
163
|
+
);
|
164
|
+
}
|
165
|
+
let specificity = 0;
|
166
|
+
const platformExtension = filenameWithoutExtensions.split(".")[1], hasPlatformExtension = validPlatforms.has(platformExtension), usePlatformRoutes = options.platformRoutes ?? !0;
|
167
|
+
if (hasPlatformExtension) {
|
168
|
+
if (usePlatformRoutes && options.platform ? platformExtension === options.platform ? specificity = 2 : platformExtension === "native" && options.platform !== "web" ? specificity = 1 : platformExtension !== options.platform && (specificity = -1) : specificity = -1, renderMode === "api" && specificity !== 0)
|
169
|
+
throw new Error(
|
170
|
+
`Api routes cannot have platform extensions. Please remove '.${platformExtension}' from './${key}'`
|
171
|
+
);
|
172
|
+
route = route.replace(new RegExp(`.${platformExtension}$`), "");
|
173
|
+
}
|
174
|
+
return {
|
175
|
+
route,
|
176
|
+
specificity,
|
177
|
+
isLayout,
|
178
|
+
renderMode
|
179
|
+
};
|
180
|
+
}
|
181
|
+
function getMostSpecific(routes) {
|
182
|
+
const route = routes[routes.length - 1];
|
183
|
+
if (!routes[0])
|
184
|
+
throw new Error(
|
185
|
+
` [one] The file ${route.contextKey} does not have a fallback sibling file without a platform extension in routes (${routes[0]}, ${routes.length}):
|
186
|
+
${routes.map((r) => r.contextKey || "NONE").join(`
|
187
|
+
`)}.`
|
188
|
+
);
|
189
|
+
return routes[routes.length - 1];
|
190
|
+
}
|
191
|
+
function getIgnoreList(options) {
|
192
|
+
const ignore = [/^\.\/\+html\.[tj]sx?$/, ...options?.ignore ?? []];
|
193
|
+
return options?.preserveApiRoutes !== !0 && ignore.push(/\+api\.[tj]sx?$/), ignore;
|
194
|
+
}
|
195
|
+
function extrapolateGroups(key, keys = /* @__PURE__ */ new Set()) {
|
196
|
+
const match = (0, import_matchers.matchArrayGroupName)(key);
|
197
|
+
if (!match)
|
198
|
+
return keys.add(key), keys;
|
199
|
+
const groups = match.split(",");
|
200
|
+
if (new Set(groups).size !== groups.length)
|
201
|
+
throw new Error(`Array syntax cannot contain duplicate group name "${groups}" in "${key}".`);
|
202
|
+
if (groups.length === 1)
|
203
|
+
return keys.add(key), keys;
|
204
|
+
for (const group of groups)
|
205
|
+
extrapolateGroups(key.replace(match, group.trim()), keys);
|
206
|
+
return keys;
|
207
|
+
}
|
208
|
+
function generateDynamic(path) {
|
209
|
+
const dynamic = path.split("/").map((part) => {
|
210
|
+
if (part === "+not-found")
|
211
|
+
return {
|
212
|
+
name: "+not-found",
|
213
|
+
deep: !0,
|
214
|
+
notFound: !0
|
215
|
+
};
|
216
|
+
const deepDynamicName = (0, import_matchers.matchDeepDynamicRouteName)(part), dynamicName = deepDynamicName ?? (0, import_matchers.matchDynamicName)(part);
|
217
|
+
return dynamicName ? { name: dynamicName, deep: !!deepDynamicName } : null;
|
218
|
+
}).filter((part) => !!part);
|
219
|
+
return dynamic.length === 0 ? null : dynamic;
|
220
|
+
}
|
221
|
+
function appendSitemapRoute(directory) {
|
222
|
+
directory.files.has("_sitemap") || directory.files.set("_sitemap", [
|
223
|
+
{
|
224
|
+
loadRoute() {
|
225
|
+
return { default: () => null, getNavOptions: () => {
|
226
|
+
} };
|
227
|
+
},
|
228
|
+
route: "_sitemap",
|
229
|
+
type: "ssg",
|
230
|
+
contextKey: "",
|
231
|
+
generated: !0,
|
232
|
+
internal: !0,
|
233
|
+
dynamic: null,
|
234
|
+
children: []
|
235
|
+
}
|
236
|
+
]);
|
237
|
+
}
|
238
|
+
function appendNotFoundRoute(directory) {
|
239
|
+
directory.files.has("+not-found") || directory.files.set("+not-found", [
|
240
|
+
{
|
241
|
+
loadRoute() {
|
242
|
+
return { default: () => null };
|
243
|
+
},
|
244
|
+
type: "spa",
|
245
|
+
route: "+not-found",
|
246
|
+
contextKey: "",
|
247
|
+
generated: !0,
|
248
|
+
internal: !0,
|
249
|
+
dynamic: [{ name: "+not-found", deep: !0, notFound: !0 }],
|
250
|
+
children: []
|
251
|
+
}
|
252
|
+
]);
|
253
|
+
}
|
254
|
+
function getLayoutNode(node, options) {
|
255
|
+
const groupName = (0, import_matchers.matchGroupName)(node.route);
|
256
|
+
let initialRouteName = node.children.find((child) => child.route.replace(/\/index$/, "") === groupName)?.route;
|
257
|
+
return {
|
258
|
+
...node,
|
259
|
+
route: node.route.replace(/\/?_layout$/, ""),
|
260
|
+
children: [],
|
261
|
+
// Each layout should have its own children
|
262
|
+
initialRouteName
|
263
|
+
};
|
264
|
+
}
|
265
|
+
function crawlAndAppendInitialRoutesAndEntryFiles(node, options, entryPoints = []) {
|
266
|
+
if (node.type === "spa" || node.type === "ssg" || node.type === "ssr")
|
267
|
+
node.entryPoints = [.../* @__PURE__ */ new Set([...entryPoints, node.contextKey])];
|
268
|
+
else if (node.type === "layout") {
|
269
|
+
if (!node.children)
|
270
|
+
throw new Error(`Layout "${node.contextKey}" does not contain any child routes`);
|
271
|
+
entryPoints = [...entryPoints, node.contextKey];
|
272
|
+
const groupName = (0, import_matchers.matchGroupName)(node.route);
|
273
|
+
let initialRouteName = node.children.find((child) => child.route.replace(/\/index$/, "") === groupName)?.route;
|
274
|
+
if (!options.internal_stripLoadRoute) {
|
275
|
+
const loaded = node.loadRoute();
|
276
|
+
loaded?.unstable_settings && (initialRouteName = loaded.unstable_settings.initialRouteName ?? initialRouteName, groupName && (initialRouteName = loaded.unstable_settings?.[groupName]?.initialRouteName ?? initialRouteName));
|
277
|
+
}
|
278
|
+
if (initialRouteName) {
|
279
|
+
const initialRoute = node.children.find((child) => child.route === initialRouteName);
|
280
|
+
if (!initialRoute) {
|
281
|
+
const validInitialRoutes = node.children.filter((child) => !child.generated).map((child) => `'${child.route}'`).join(", ");
|
282
|
+
throw groupName ? new Error(
|
283
|
+
`Layout ${node.contextKey} has invalid initialRouteName '${initialRouteName}' for group '(${groupName})'. Valid options are: ${validInitialRoutes}`
|
284
|
+
) : new Error(
|
285
|
+
`Layout ${node.contextKey} has invalid initialRouteName '${initialRouteName}'. Valid options are: ${validInitialRoutes}`
|
286
|
+
);
|
287
|
+
}
|
288
|
+
node.initialRouteName = initialRouteName, entryPoints.push(initialRoute.contextKey);
|
289
|
+
}
|
290
|
+
for (const child of node.children)
|
291
|
+
crawlAndAppendInitialRoutesAndEntryFiles(child, options, entryPoints);
|
292
|
+
}
|
293
|
+
}
|
294
|
+
//# sourceMappingURL=getRoutes.js.map
|
@@ -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 getURL_exports = {};
|
16
|
+
__export(getURL_exports, {
|
17
|
+
getURL: () => getURL
|
18
|
+
});
|
19
|
+
module.exports = __toCommonJS(getURL_exports);
|
20
|
+
const CLIENT_BASE_URL = typeof window < "u" && window.location ? `${window.location.protocol}//${window.location.host}` : "";
|
21
|
+
function getURL() {
|
22
|
+
return CLIENT_BASE_URL || process.env.ONE_SERVER_URL || "http://localhost";
|
23
|
+
}
|
24
|
+
//# sourceMappingURL=getURL.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 Head_exports = {};
|
16
|
+
__export(Head_exports, {
|
17
|
+
Head: () => Head
|
18
|
+
});
|
19
|
+
module.exports = __toCommonJS(Head_exports);
|
20
|
+
var import_HeadModule = require("./HeadModule");
|
21
|
+
const Head = ({ children }) => children;
|
22
|
+
Object.assign(Head, import_HeadModule.HeadModule);
|
23
|
+
//# sourceMappingURL=Head.js.map
|
@@ -0,0 +1,22 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
10
|
+
for (let key of __getOwnPropNames(from))
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
+
return to;
|
13
|
+
};
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
+
var HeadModule_exports = {};
|
16
|
+
__export(HeadModule_exports, {
|
17
|
+
HeadModule: () => HeadModule
|
18
|
+
});
|
19
|
+
module.exports = __toCommonJS(HeadModule_exports);
|
20
|
+
let HeadModule = null;
|
21
|
+
typeof expo < "u" && globalThis.expo?.modules?.ExpoGo && (HeadModule = globalThis.expo?.modules?.HeadModule);
|
22
|
+
//# sourceMappingURL=HeadModule.js.map
|
@@ -0,0 +1,15 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
7
|
+
for (let key of __getOwnPropNames(from))
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
9
|
+
return to;
|
10
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
12
|
+
var head_exports = {};
|
13
|
+
module.exports = __toCommonJS(head_exports);
|
14
|
+
__reExport(head_exports, require("./Head"), module.exports);
|
15
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1,14 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
7
|
+
for (let key of __getOwnPropNames(from))
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
9
|
+
return to;
|
10
|
+
};
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
12
|
+
var types_exports = {};
|
13
|
+
module.exports = __toCommonJS(types_exports);
|
14
|
+
//# sourceMappingURL=types.js.map
|
@@ -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 url_exports = {};
|
16
|
+
__export(url_exports, {
|
17
|
+
getStaticUrlFromOneRouter: () => getStaticUrlFromOneRouter
|
18
|
+
});
|
19
|
+
module.exports = __toCommonJS(url_exports);
|
20
|
+
const protocolWarningString = '{ plugins: [["router", { origin: "...<URL>..." }]] }';
|
21
|
+
function memoize(fn) {
|
22
|
+
const cache = {};
|
23
|
+
return (...args) => {
|
24
|
+
const key = JSON.stringify(args);
|
25
|
+
if (cache[key])
|
26
|
+
return cache[key];
|
27
|
+
const result = fn(...args);
|
28
|
+
return cache[key] = result, result;
|
29
|
+
};
|
30
|
+
}
|
31
|
+
function sanitizeUrl(url) {
|
32
|
+
const parsed = new URL(url);
|
33
|
+
return !parsed.protocol || parsed.protocol === "http:" || parsed.protocol === "https:" || throwOrAlert(
|
34
|
+
`One Head: Native origin has invalid protocol "${parsed.protocol}" for URL in Config: ${protocolWarningString}.`
|
35
|
+
), parsed.pathname = "", parsed.search = "", parsed.hash = "", parsed.protocol ??= "https:", parsed.toString().replace(/\/$/, "");
|
36
|
+
}
|
37
|
+
const memoSanitizeUrl = memoize(sanitizeUrl);
|
38
|
+
function getUrlFromConstants() {
|
39
|
+
const origin = process.env.One_ORIGIN;
|
40
|
+
return origin ? (origin.match(/^http(s)?:\/\//) || console.warn(
|
41
|
+
`One Head: origin "${origin}" is missing a \`https://\` protocol. ${protocolWarningString}.`
|
42
|
+
), memoSanitizeUrl(origin)) : (throwOrAlert(
|
43
|
+
`One Head: Add the handoff origin to the Config (requires rebuild). Add the Config Plugin ${protocolWarningString}, where \`origin\` is the hosted URL.`
|
44
|
+
), "https://expo.dev");
|
45
|
+
}
|
46
|
+
function throwOrAlert(msg) {
|
47
|
+
console.warn(`TODO FIX: ${msg}`);
|
48
|
+
}
|
49
|
+
function getStaticUrlFromOneRouter(pathname) {
|
50
|
+
return getUrlFromConstants() + pathname;
|
51
|
+
}
|
52
|
+
//# sourceMappingURL=url.js.map
|
@@ -0,0 +1,99 @@
|
|
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 hooks_exports = {};
|
24
|
+
__export(hooks_exports, {
|
25
|
+
Frozen: () => Frozen,
|
26
|
+
useActiveParams: () => useActiveParams,
|
27
|
+
useGlobalSearchParams: () => useGlobalSearchParams,
|
28
|
+
useLocalSearchParams: () => useLocalSearchParams,
|
29
|
+
useNavigationContainerRef: () => useNavigationContainerRef,
|
30
|
+
useParams: () => useParams,
|
31
|
+
usePathname: () => usePathname,
|
32
|
+
useRootNavigationState: () => useRootNavigationState,
|
33
|
+
useRouteInfo: () => useRouteInfo,
|
34
|
+
useRouter: () => useRouter,
|
35
|
+
useSegments: () => useSegments,
|
36
|
+
useUnstableGlobalHref: () => useUnstableGlobalHref
|
37
|
+
});
|
38
|
+
module.exports = __toCommonJS(hooks_exports);
|
39
|
+
var import_native = require("@react-navigation/native"), import_react = __toESM(require("react"), 1), import_imperative_api = require("./imperative-api"), import_router = require("./router/router"), import_jsx_runtime = require("react/jsx-runtime");
|
40
|
+
function useRootNavigationState() {
|
41
|
+
return (0, import_router.useStoreRootState)();
|
42
|
+
}
|
43
|
+
function useRouteInfo() {
|
44
|
+
return (0, import_router.useStoreRouteInfo)();
|
45
|
+
}
|
46
|
+
function useNavigationContainerRef() {
|
47
|
+
return import_router.navigationRef;
|
48
|
+
}
|
49
|
+
const FrozeContext = (0, import_react.createContext)(!1);
|
50
|
+
function Frozen({ on = !1, children }) {
|
51
|
+
return typeof window > "u" ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FrozeContext.Provider, { value: on, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
52
|
+
"div",
|
53
|
+
{
|
54
|
+
inert: !0,
|
55
|
+
style: { display: "contents" },
|
56
|
+
children
|
57
|
+
}
|
58
|
+
) });
|
59
|
+
}
|
60
|
+
function useRouter() {
|
61
|
+
return import_imperative_api.router;
|
62
|
+
}
|
63
|
+
function useUnstableGlobalHref() {
|
64
|
+
return (0, import_router.useStoreRouteInfo)().unstable_globalHref;
|
65
|
+
}
|
66
|
+
function useSegments() {
|
67
|
+
return (0, import_router.useStoreRouteInfo)().segments;
|
68
|
+
}
|
69
|
+
function usePathname() {
|
70
|
+
return (0, import_router.useStoreRouteInfo)().pathname;
|
71
|
+
}
|
72
|
+
function useActiveParams() {
|
73
|
+
return (0, import_router.useStoreRouteInfo)().params;
|
74
|
+
}
|
75
|
+
const useLocalSearchParams = useParams, useGlobalSearchParams = useActiveParams;
|
76
|
+
function useParams() {
|
77
|
+
const params = import_react.default.useContext(import_native.NavigationRouteContext)?.params ?? {};
|
78
|
+
return Object.fromEntries(
|
79
|
+
Object.entries(params).map(([key, value]) => {
|
80
|
+
if (Array.isArray(value))
|
81
|
+
return [
|
82
|
+
key,
|
83
|
+
value.map((v) => {
|
84
|
+
try {
|
85
|
+
return decodeURIComponent(v);
|
86
|
+
} catch {
|
87
|
+
return v;
|
88
|
+
}
|
89
|
+
})
|
90
|
+
];
|
91
|
+
try {
|
92
|
+
return [key, decodeURIComponent(value)];
|
93
|
+
} catch {
|
94
|
+
return [key, value];
|
95
|
+
}
|
96
|
+
})
|
97
|
+
);
|
98
|
+
}
|
99
|
+
//# sourceMappingURL=hooks.js.map
|
@@ -0,0 +1,45 @@
|
|
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 imperative_api_exports = {};
|
24
|
+
__export(imperative_api_exports, {
|
25
|
+
router: () => router
|
26
|
+
});
|
27
|
+
module.exports = __toCommonJS(imperative_api_exports);
|
28
|
+
var store = __toESM(require("./router/router"), 1);
|
29
|
+
const router = {
|
30
|
+
navigate: store.navigate,
|
31
|
+
push: store.push,
|
32
|
+
dismiss: store.dismiss,
|
33
|
+
dismissAll: store.dismissAll,
|
34
|
+
canDismiss: store.canDismiss,
|
35
|
+
replace: store.replace,
|
36
|
+
back: store.goBack,
|
37
|
+
canGoBack: store.canGoBack,
|
38
|
+
setParams: (params) => store.setParams(
|
39
|
+
// TODO
|
40
|
+
params
|
41
|
+
),
|
42
|
+
subscribe: store.subscribeToRootState,
|
43
|
+
onLoadState: store.subscribeToLoadingState
|
44
|
+
};
|
45
|
+
//# sourceMappingURL=imperative-api.js.map
|