one 1.1.309 → 1.1.311
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/Root.cjs +213 -0
- package/dist/cjs/Root.cjs.map +6 -0
- package/dist/cjs/Root.native.js +2 -2
- package/dist/cjs/Root.native.js.map +2 -2
- package/dist/cjs/{Route.js → Route.cjs} +34 -19
- package/dist/cjs/{cleanUrl.js → cleanUrl.cjs} +27 -18
- package/dist/cjs/cli/label-process.cjs +31 -0
- package/dist/cjs/cli/{main.js → main.cjs} +28 -16
- package/dist/cjs/cli/{prebuild.js → prebuild.cjs} +25 -15
- package/dist/cjs/cli/run.cjs +70 -0
- package/dist/cjs/cli/{runAndroid.js → runAndroid.cjs} +25 -15
- package/dist/cjs/cli/{runIos.js → runIos.cjs} +25 -15
- package/dist/cjs/cli.cjs +258 -0
- package/dist/cjs/clientLoaderResolver.cjs +35 -0
- package/dist/cjs/config.cjs +32 -0
- package/dist/cjs/constants.cjs +30 -0
- package/dist/cjs/{createApp.js → createApp.cjs} +33 -17
- package/dist/cjs/createApp.native.cjs +38 -0
- package/dist/cjs/createApp.native.cjs.map +6 -0
- package/dist/cjs/{createHandleRequest.js → createHandleRequest.cjs} +61 -49
- package/dist/cjs/createHandleRequest.cjs.map +6 -0
- package/dist/cjs/createHandleRequest.native.js +1 -0
- package/dist/cjs/createHandleRequest.native.js.map +2 -2
- package/dist/cjs/createRoute.cjs +42 -0
- package/dist/cjs/fallbackViews/{Sitemap.js → Sitemap.cjs} +35 -16
- package/dist/cjs/fallbackViews/{Unmatched.js → Unmatched.cjs} +32 -17
- package/dist/cjs/fork/NavigationContainer.cjs +105 -0
- package/dist/cjs/fork/NavigationContainer.native.cjs +103 -0
- package/dist/cjs/fork/NavigationContainer.native.cjs.map +6 -0
- package/dist/cjs/fork/createMemoryHistory.cjs +136 -0
- package/dist/cjs/fork/{extractPathFromURL.js → extractPathFromURL.cjs} +30 -21
- package/dist/cjs/fork/findFocusedRoute.cjs +30 -0
- package/dist/cjs/fork/{getPathFromState.js → getPathFromState.cjs} +120 -113
- package/dist/cjs/fork/getStateFromPath.cjs +366 -0
- package/dist/cjs/fork/useLinking.cjs +215 -0
- package/dist/cjs/fork/useLinking.native.cjs +126 -0
- package/dist/cjs/fork/useLinking.native.cjs.map +6 -0
- package/dist/cjs/fork/validatePathConfig.cjs +44 -0
- package/dist/cjs/{getLinkingConfig.js → getLinkingConfig.cjs} +21 -15
- package/dist/cjs/{getReactNavigationConfig.js → getReactNavigationConfig.cjs} +33 -32
- package/dist/cjs/getRoutes.cjs +276 -0
- package/dist/cjs/getURL.cjs +29 -0
- package/dist/cjs/getURL.native.cjs +48 -0
- package/dist/cjs/getURL.native.cjs.map +6 -0
- package/dist/cjs/head/Head.android.cjs +28 -0
- package/dist/cjs/head/Head.android.cjs.map +6 -0
- package/dist/cjs/head/Head.cjs +30 -0
- package/dist/cjs/head/Head.ios.cjs +210 -0
- package/dist/cjs/head/Head.ios.cjs.map +6 -0
- package/dist/cjs/head/HeadModule.cjs +27 -0
- package/dist/cjs/head/index.cjs +18 -0
- package/dist/cjs/head/types.cjs +16 -0
- package/dist/cjs/head/url.cjs +50 -0
- package/dist/cjs/{hooks.js → hooks.cjs} +52 -40
- package/dist/cjs/{imperative-api.js → imperative-api.cjs} +26 -19
- package/dist/cjs/import-mode/index.android.cjs +26 -0
- package/dist/cjs/import-mode/index.android.cjs.map +6 -0
- package/dist/cjs/import-mode/index.cjs +26 -0
- package/dist/cjs/import-mode/index.ios.cjs +26 -0
- package/dist/cjs/import-mode/index.ios.cjs.map +6 -0
- package/dist/cjs/import-mode/index.native.cjs +26 -0
- package/dist/cjs/import-mode/index.native.cjs.map +6 -0
- package/dist/cjs/import-mode/index.web.cjs +26 -0
- package/dist/cjs/{index.js → index.cjs} +50 -14
- package/dist/cjs/interfaces/router.cjs +27 -0
- package/dist/cjs/layouts/Drawer.cjs +31 -0
- package/dist/cjs/layouts/Stack.cjs +31 -0
- package/dist/cjs/layouts/Tabs.cjs +64 -0
- package/dist/cjs/layouts/withLayoutContext.cjs +91 -0
- package/dist/cjs/link/Link.cjs +120 -0
- package/dist/cjs/link/Redirect.cjs +39 -0
- package/dist/cjs/link/href.cjs +58 -0
- package/dist/cjs/link/linking.cjs +89 -0
- package/dist/cjs/link/path.cjs +69 -0
- package/dist/cjs/link/useLinkTo.cjs +54 -0
- package/dist/cjs/link/useLoadedNavigation.cjs +60 -0
- package/dist/cjs/{matchers.js → matchers.cjs} +16 -11
- package/dist/cjs/platform.cjs +26 -0
- package/dist/cjs/polyfills-mobile.cjs +33 -0
- package/dist/cjs/polyfills-server.cjs +25 -0
- package/dist/cjs/render.cjs +47 -0
- package/dist/cjs/render.native.cjs +28 -0
- package/dist/cjs/render.native.cjs.map +6 -0
- package/dist/cjs/router/RouterStore.cjs +16 -0
- package/dist/cjs/router/constants.cjs +26 -0
- package/dist/cjs/router/{getNormalizedStatePath.js → getNormalizedStatePath.cjs} +25 -23
- package/dist/cjs/router/lastAction.cjs +31 -0
- package/dist/cjs/router/{router.js → router.cjs} +104 -78
- package/dist/cjs/router/serverLocationContext.cjs +27 -0
- package/dist/cjs/router/{useInitializeOneRouter.js → useInitializeOneRouter.cjs} +26 -16
- package/dist/cjs/serve.cjs +185 -0
- package/dist/cjs/server/{createRoutesManifest.js → createRoutesManifest.cjs} +22 -16
- package/dist/cjs/server/{getServerManifest.js → getServerManifest.cjs} +58 -31
- package/dist/cjs/{server-render.js → server-render.cjs} +28 -17
- package/dist/cjs/sortRoutes.cjs +62 -0
- package/dist/cjs/typed-routes/generateRouteTypes.cjs +48 -0
- package/dist/cjs/typed-routes/{getTypedRoutesDeclarationFile.js → getTypedRoutesDeclarationFile.cjs} +37 -40
- package/dist/cjs/types.cjs +16 -0
- package/dist/cjs/{useFocusEffect.js → useFocusEffect.cjs} +33 -24
- package/dist/cjs/useLoader.cjs +114 -0
- package/dist/cjs/useNavigation.cjs +68 -0
- package/dist/cjs/useScreens.cjs +233 -0
- package/dist/cjs/{useViteRoutes.js → useViteRoutes.cjs} +36 -24
- package/dist/cjs/utils/assertIsReady.cjs +28 -0
- package/dist/cjs/utils/dynamicImport.cjs +27 -0
- package/dist/cjs/utils/existsAsync.cjs +33 -0
- package/dist/cjs/utils/getPageExport.cjs +32 -0
- package/dist/cjs/utils/{globDir.js → globDir.cjs} +23 -15
- package/dist/cjs/utils/{hashString.js → hashString.cjs} +22 -14
- package/dist/cjs/utils/isResponse.cjs +28 -0
- package/dist/cjs/utils/isStatus.cjs +28 -0
- package/dist/cjs/utils/promiseWithResolvers.cjs +37 -0
- package/dist/cjs/utils/rand.cjs +26 -0
- package/dist/cjs/utils/redirect.cjs +34 -0
- package/dist/cjs/utils/removeSearch.cjs +28 -0
- package/dist/cjs/utils/removeUndefined.cjs +30 -0
- package/dist/cjs/utils/{url.js → url.cjs} +16 -11
- package/dist/cjs/utils/weakKey.cjs +30 -0
- package/dist/cjs/utils/weakMemo.cjs +34 -0
- package/dist/cjs/views/EmptyRoute.cjs +30 -0
- package/dist/cjs/views/{ErrorBoundary.js → ErrorBoundary.cjs} +30 -16
- package/dist/cjs/views/LoadProgressBar.cjs +90 -0
- package/dist/cjs/views/Navigator.cjs +149 -0
- package/dist/cjs/views/{PreloadLinks.js → PreloadLinks.cjs} +20 -13
- package/dist/cjs/views/PreloadLinks.native.cjs +28 -0
- package/dist/cjs/views/PreloadLinks.native.cjs.map +6 -0
- package/dist/cjs/views/{RootErrorBoundary.js → RootErrorBoundary.cjs} +28 -16
- package/dist/cjs/views/Screen.cjs +39 -0
- package/dist/cjs/views/ScrollRestoration.cjs +74 -0
- package/dist/cjs/views/Try.cjs +68 -0
- package/dist/cjs/vite/build.cjs +425 -0
- package/dist/cjs/vite/{clientTreeShakePlugin.js → clientTreeShakePlugin.cjs} +53 -35
- package/dist/cjs/vite/constants.cjs +28 -0
- package/dist/cjs/vite/{createFileSystemRouter.js → createFileSystemRouter.cjs} +117 -84
- package/dist/cjs/vite/{customNodeExternals.js → customNodeExternals.cjs} +32 -20
- package/dist/cjs/vite/ensureTsConfig.cjs +68 -0
- package/dist/cjs/vite/findDepsToOptimize.cjs +74 -0
- package/dist/cjs/vite/{fixDependenciesPlugin.js → fixDependenciesPlugin.cjs} +17 -12
- package/dist/cjs/vite/generateTypesForRoutes.cjs +45 -0
- package/dist/cjs/vite/{getManifest.js → getManifest.cjs} +18 -12
- package/dist/cjs/vite/{headers.js → headers.cjs} +19 -14
- package/dist/cjs/vite/headers.native.cjs +32 -0
- package/dist/cjs/vite/headers.native.cjs.map +6 -0
- package/dist/cjs/vite/{loadEnv.js → loadEnv.cjs} +27 -16
- package/dist/cjs/vite/makePluginWebOnly.cjs +31 -0
- package/dist/cjs/vite/one.cjs +256 -0
- package/dist/cjs/vite/{removeReactNativeWebAnimatedPlugin.js → removeReactNativeWebAnimatedPlugin.cjs} +32 -25
- package/dist/cjs/vite/replaceLoader.cjs +37 -0
- package/dist/cjs/vite/resolveAPIRequest.cjs +90 -0
- package/dist/cjs/vite/server.cjs +13 -0
- package/dist/cjs/vite/types.cjs +16 -0
- package/dist/cjs/vite/{virtualEntryPlugin.js → virtualEntryPlugin.cjs} +28 -20
- package/dist/cjs/vite/{vitePluginSsrCss.js → vitePluginSsrCss.cjs} +56 -50
- package/dist/cjs/vite.cjs +40 -0
- package/dist/cjs/zero/getQueryKey.cjs +29 -0
- package/dist/cjs/zero/isZeroQuery.cjs +28 -0
- package/dist/cjs/zero/resolveQuery.cjs +41 -0
- package/dist/cjs/zero/{subscribeToQuery.js → subscribeToQuery.cjs} +16 -11
- package/dist/cjs/zero/types.cjs +16 -0
- package/dist/cjs/zero/useQuery.cjs +58 -0
- package/dist/cjs/zero/{useQueryZero.js → useQueryZero.cjs} +21 -15
- package/dist/cjs/zero.cjs +30 -0
- package/dist/esm/Root.js +2 -1
- package/dist/esm/Root.js.map +1 -1
- package/dist/esm/Root.mjs +2 -1
- package/dist/esm/Root.mjs.map +1 -1
- package/dist/esm/Root.native.js +2 -1
- package/dist/esm/Root.native.js.map +2 -2
- package/dist/esm/createHandleRequest.js +1 -0
- package/dist/esm/createHandleRequest.js.map +1 -1
- package/dist/esm/createHandleRequest.mjs +1 -0
- package/dist/esm/createHandleRequest.mjs.map +1 -1
- package/dist/esm/createHandleRequest.native.js +1 -0
- package/dist/esm/createHandleRequest.native.js.map +2 -2
- package/dist/esm/getURL.js +1 -1
- package/dist/esm/getURL.mjs +1 -1
- package/package.json +10 -10
- package/src/Root.tsx +2 -1
- package/src/createHandleRequest.ts +5 -0
- package/src/getURL.ts +1 -1
- package/types/Root.d.ts.map +1 -1
- package/types/createHandleRequest.d.ts.map +1 -1
- package/dist/cjs/Root.js +0 -182
- package/dist/cjs/Root.js.map +0 -6
- package/dist/cjs/cli/label-process.js +0 -25
- package/dist/cjs/cli/run.js +0 -52
- package/dist/cjs/cli.js +0 -209
- package/dist/cjs/clientLoaderResolver.js +0 -32
- package/dist/cjs/config.js +0 -27
- package/dist/cjs/constants.js +0 -23
- package/dist/cjs/createHandleRequest.js.map +0 -6
- package/dist/cjs/createRoute.js +0 -37
- package/dist/cjs/fork/NavigationContainer.js +0 -85
- package/dist/cjs/fork/createMemoryHistory.js +0 -100
- package/dist/cjs/fork/findFocusedRoute.js +0 -26
- package/dist/cjs/fork/getStateFromPath.js +0 -381
- package/dist/cjs/fork/useLinking.js +0 -182
- package/dist/cjs/fork/validatePathConfig.js +0 -46
- package/dist/cjs/getRoutes.js +0 -294
- package/dist/cjs/getURL.js +0 -24
- package/dist/cjs/head/Head.js +0 -23
- package/dist/cjs/head/HeadModule.js +0 -22
- package/dist/cjs/head/index.js +0 -15
- package/dist/cjs/head/types.js +0 -14
- package/dist/cjs/head/url.js +0 -52
- package/dist/cjs/import-mode/index.js +0 -21
- package/dist/cjs/import-mode/index.web.js +0 -21
- package/dist/cjs/interfaces/router.js +0 -23
- package/dist/cjs/layouts/Drawer.js +0 -24
- package/dist/cjs/layouts/Stack.js +0 -24
- package/dist/cjs/layouts/Tabs.js +0 -52
- package/dist/cjs/layouts/withLayoutContext.js +0 -77
- package/dist/cjs/link/Link.js +0 -98
- package/dist/cjs/link/Redirect.js +0 -31
- package/dist/cjs/link/href.js +0 -50
- package/dist/cjs/link/linking.js +0 -82
- package/dist/cjs/link/path.js +0 -65
- package/dist/cjs/link/useLinkTo.js +0 -42
- package/dist/cjs/link/useLoadedNavigation.js +0 -50
- package/dist/cjs/platform.js +0 -21
- package/dist/cjs/polyfills-mobile.js +0 -26
- package/dist/cjs/polyfills-server.js +0 -23
- package/dist/cjs/render.js +0 -44
- package/dist/cjs/router/RouterStore.js +0 -14
- package/dist/cjs/router/constants.js +0 -21
- package/dist/cjs/router/lastAction.js +0 -25
- package/dist/cjs/router/serverLocationContext.js +0 -22
- package/dist/cjs/serve.js +0 -175
- package/dist/cjs/sortRoutes.js +0 -64
- package/dist/cjs/typed-routes/generateRouteTypes.js +0 -33
- package/dist/cjs/types.js +0 -14
- package/dist/cjs/useLoader.js +0 -97
- package/dist/cjs/useNavigation.js +0 -60
- package/dist/cjs/useScreens.js +0 -176
- package/dist/cjs/utils/assertIsReady.js +0 -26
- package/dist/cjs/utils/dynamicImport.js +0 -24
- package/dist/cjs/utils/existsAsync.js +0 -28
- package/dist/cjs/utils/getPageExport.js +0 -27
- package/dist/cjs/utils/isResponse.js +0 -23
- package/dist/cjs/utils/isStatus.js +0 -23
- package/dist/cjs/utils/promiseWithResolvers.js +0 -26
- package/dist/cjs/utils/rand.js +0 -21
- package/dist/cjs/utils/redirect.js +0 -28
- package/dist/cjs/utils/removeSearch.js +0 -23
- package/dist/cjs/utils/removeUndefined.js +0 -26
- package/dist/cjs/utils/weakKey.js +0 -24
- package/dist/cjs/utils/weakMemo.js +0 -30
- package/dist/cjs/views/EmptyRoute.js +0 -25
- package/dist/cjs/views/LoadProgressBar.js +0 -83
- package/dist/cjs/views/Navigator.js +0 -101
- package/dist/cjs/views/Screen.js +0 -29
- package/dist/cjs/views/ScrollRestoration.js +0 -70
- package/dist/cjs/views/Try.js +0 -44
- package/dist/cjs/vite/build.js +0 -376
- package/dist/cjs/vite/constants.js +0 -22
- package/dist/cjs/vite/ensureTsConfig.js +0 -66
- package/dist/cjs/vite/findDepsToOptimize.js +0 -66
- package/dist/cjs/vite/generateTypesForRoutes.js +0 -36
- package/dist/cjs/vite/makePluginWebOnly.js +0 -27
- package/dist/cjs/vite/one.js +0 -255
- package/dist/cjs/vite/replaceLoader.js +0 -34
- package/dist/cjs/vite/resolveAPIRequest.js +0 -71
- package/dist/cjs/vite/server.js +0 -16
- package/dist/cjs/vite/types.js +0 -14
- package/dist/cjs/vite.js +0 -28
- package/dist/cjs/zero/getQueryKey.js +0 -24
- package/dist/cjs/zero/isZeroQuery.js +0 -23
- package/dist/cjs/zero/resolveQuery.js +0 -38
- package/dist/cjs/zero/types.js +0 -14
- package/dist/cjs/zero/useQuery.js +0 -47
- package/dist/cjs/zero.js +0 -23
- /package/dist/cjs/{Route.js.map → Route.cjs.map} +0 -0
- /package/dist/cjs/{cleanUrl.js.map → cleanUrl.cjs.map} +0 -0
- /package/dist/cjs/cli/{label-process.js.map → label-process.cjs.map} +0 -0
- /package/dist/cjs/cli/{main.js.map → main.cjs.map} +0 -0
- /package/dist/cjs/cli/{prebuild.js.map → prebuild.cjs.map} +0 -0
- /package/dist/cjs/cli/{run.js.map → run.cjs.map} +0 -0
- /package/dist/cjs/cli/{runAndroid.js.map → runAndroid.cjs.map} +0 -0
- /package/dist/cjs/cli/{runIos.js.map → runIos.cjs.map} +0 -0
- /package/dist/cjs/{cli.js.map → cli.cjs.map} +0 -0
- /package/dist/cjs/{clientLoaderResolver.js.map → clientLoaderResolver.cjs.map} +0 -0
- /package/dist/cjs/{config.js.map → config.cjs.map} +0 -0
- /package/dist/cjs/{constants.js.map → constants.cjs.map} +0 -0
- /package/dist/cjs/{createApp.js.map → createApp.cjs.map} +0 -0
- /package/dist/cjs/{createRoute.js.map → createRoute.cjs.map} +0 -0
- /package/dist/cjs/fallbackViews/{Sitemap.js.map → Sitemap.cjs.map} +0 -0
- /package/dist/cjs/fallbackViews/{Unmatched.js.map → Unmatched.cjs.map} +0 -0
- /package/dist/cjs/fork/{NavigationContainer.js.map → NavigationContainer.cjs.map} +0 -0
- /package/dist/cjs/fork/{createMemoryHistory.js.map → createMemoryHistory.cjs.map} +0 -0
- /package/dist/cjs/fork/{extractPathFromURL.js.map → extractPathFromURL.cjs.map} +0 -0
- /package/dist/cjs/fork/{findFocusedRoute.js.map → findFocusedRoute.cjs.map} +0 -0
- /package/dist/cjs/fork/{getPathFromState.js.map → getPathFromState.cjs.map} +0 -0
- /package/dist/cjs/fork/{getStateFromPath.js.map → getStateFromPath.cjs.map} +0 -0
- /package/dist/cjs/fork/{useLinking.js.map → useLinking.cjs.map} +0 -0
- /package/dist/cjs/fork/{validatePathConfig.js.map → validatePathConfig.cjs.map} +0 -0
- /package/dist/cjs/{getLinkingConfig.js.map → getLinkingConfig.cjs.map} +0 -0
- /package/dist/cjs/{getReactNavigationConfig.js.map → getReactNavigationConfig.cjs.map} +0 -0
- /package/dist/cjs/{getRoutes.js.map → getRoutes.cjs.map} +0 -0
- /package/dist/cjs/{getURL.js.map → getURL.cjs.map} +0 -0
- /package/dist/cjs/head/{Head.js.map → Head.cjs.map} +0 -0
- /package/dist/cjs/head/{HeadModule.js.map → HeadModule.cjs.map} +0 -0
- /package/dist/cjs/head/{index.js.map → index.cjs.map} +0 -0
- /package/dist/cjs/head/{types.js.map → types.cjs.map} +0 -0
- /package/dist/cjs/head/{url.js.map → url.cjs.map} +0 -0
- /package/dist/cjs/{hooks.js.map → hooks.cjs.map} +0 -0
- /package/dist/cjs/{imperative-api.js.map → imperative-api.cjs.map} +0 -0
- /package/dist/cjs/import-mode/{index.js.map → index.cjs.map} +0 -0
- /package/dist/cjs/import-mode/{index.web.js.map → index.web.cjs.map} +0 -0
- /package/dist/cjs/{index.js.map → index.cjs.map} +0 -0
- /package/dist/cjs/interfaces/{router.js.map → router.cjs.map} +0 -0
- /package/dist/cjs/layouts/{Drawer.js.map → Drawer.cjs.map} +0 -0
- /package/dist/cjs/layouts/{Stack.js.map → Stack.cjs.map} +0 -0
- /package/dist/cjs/layouts/{Tabs.js.map → Tabs.cjs.map} +0 -0
- /package/dist/cjs/layouts/{withLayoutContext.js.map → withLayoutContext.cjs.map} +0 -0
- /package/dist/cjs/link/{Link.js.map → Link.cjs.map} +0 -0
- /package/dist/cjs/link/{Redirect.js.map → Redirect.cjs.map} +0 -0
- /package/dist/cjs/link/{href.js.map → href.cjs.map} +0 -0
- /package/dist/cjs/link/{linking.js.map → linking.cjs.map} +0 -0
- /package/dist/cjs/link/{path.js.map → path.cjs.map} +0 -0
- /package/dist/cjs/link/{useLinkTo.js.map → useLinkTo.cjs.map} +0 -0
- /package/dist/cjs/link/{useLoadedNavigation.js.map → useLoadedNavigation.cjs.map} +0 -0
- /package/dist/cjs/{matchers.js.map → matchers.cjs.map} +0 -0
- /package/dist/cjs/{platform.js.map → platform.cjs.map} +0 -0
- /package/dist/cjs/{polyfills-mobile.js.map → polyfills-mobile.cjs.map} +0 -0
- /package/dist/cjs/{polyfills-server.js.map → polyfills-server.cjs.map} +0 -0
- /package/dist/cjs/{render.js.map → render.cjs.map} +0 -0
- /package/dist/cjs/router/{RouterStore.js.map → RouterStore.cjs.map} +0 -0
- /package/dist/cjs/router/{constants.js.map → constants.cjs.map} +0 -0
- /package/dist/cjs/router/{getNormalizedStatePath.js.map → getNormalizedStatePath.cjs.map} +0 -0
- /package/dist/cjs/router/{lastAction.js.map → lastAction.cjs.map} +0 -0
- /package/dist/cjs/router/{router.js.map → router.cjs.map} +0 -0
- /package/dist/cjs/router/{serverLocationContext.js.map → serverLocationContext.cjs.map} +0 -0
- /package/dist/cjs/router/{useInitializeOneRouter.js.map → useInitializeOneRouter.cjs.map} +0 -0
- /package/dist/cjs/{serve.js.map → serve.cjs.map} +0 -0
- /package/dist/cjs/server/{createRoutesManifest.js.map → createRoutesManifest.cjs.map} +0 -0
- /package/dist/cjs/server/{getServerManifest.js.map → getServerManifest.cjs.map} +0 -0
- /package/dist/cjs/{server-render.js.map → server-render.cjs.map} +0 -0
- /package/dist/cjs/{sortRoutes.js.map → sortRoutes.cjs.map} +0 -0
- /package/dist/cjs/typed-routes/{generateRouteTypes.js.map → generateRouteTypes.cjs.map} +0 -0
- /package/dist/cjs/typed-routes/{getTypedRoutesDeclarationFile.js.map → getTypedRoutesDeclarationFile.cjs.map} +0 -0
- /package/dist/cjs/{types.js.map → types.cjs.map} +0 -0
- /package/dist/cjs/{useFocusEffect.js.map → useFocusEffect.cjs.map} +0 -0
- /package/dist/cjs/{useLoader.js.map → useLoader.cjs.map} +0 -0
- /package/dist/cjs/{useNavigation.js.map → useNavigation.cjs.map} +0 -0
- /package/dist/cjs/{useScreens.js.map → useScreens.cjs.map} +0 -0
- /package/dist/cjs/{useViteRoutes.js.map → useViteRoutes.cjs.map} +0 -0
- /package/dist/cjs/utils/{assertIsReady.js.map → assertIsReady.cjs.map} +0 -0
- /package/dist/cjs/utils/{dynamicImport.js.map → dynamicImport.cjs.map} +0 -0
- /package/dist/cjs/utils/{existsAsync.js.map → existsAsync.cjs.map} +0 -0
- /package/dist/cjs/utils/{getPageExport.js.map → getPageExport.cjs.map} +0 -0
- /package/dist/cjs/utils/{globDir.js.map → globDir.cjs.map} +0 -0
- /package/dist/cjs/utils/{hashString.js.map → hashString.cjs.map} +0 -0
- /package/dist/cjs/utils/{isResponse.js.map → isResponse.cjs.map} +0 -0
- /package/dist/cjs/utils/{isStatus.js.map → isStatus.cjs.map} +0 -0
- /package/dist/cjs/utils/{promiseWithResolvers.js.map → promiseWithResolvers.cjs.map} +0 -0
- /package/dist/cjs/utils/{rand.js.map → rand.cjs.map} +0 -0
- /package/dist/cjs/utils/{redirect.js.map → redirect.cjs.map} +0 -0
- /package/dist/cjs/utils/{removeSearch.js.map → removeSearch.cjs.map} +0 -0
- /package/dist/cjs/utils/{removeUndefined.js.map → removeUndefined.cjs.map} +0 -0
- /package/dist/cjs/utils/{url.js.map → url.cjs.map} +0 -0
- /package/dist/cjs/utils/{weakKey.js.map → weakKey.cjs.map} +0 -0
- /package/dist/cjs/utils/{weakMemo.js.map → weakMemo.cjs.map} +0 -0
- /package/dist/cjs/views/{EmptyRoute.js.map → EmptyRoute.cjs.map} +0 -0
- /package/dist/cjs/views/{ErrorBoundary.js.map → ErrorBoundary.cjs.map} +0 -0
- /package/dist/cjs/views/{LoadProgressBar.js.map → LoadProgressBar.cjs.map} +0 -0
- /package/dist/cjs/views/{Navigator.js.map → Navigator.cjs.map} +0 -0
- /package/dist/cjs/views/{PreloadLinks.js.map → PreloadLinks.cjs.map} +0 -0
- /package/dist/cjs/views/{RootErrorBoundary.js.map → RootErrorBoundary.cjs.map} +0 -0
- /package/dist/cjs/views/{Screen.js.map → Screen.cjs.map} +0 -0
- /package/dist/cjs/views/{ScrollRestoration.js.map → ScrollRestoration.cjs.map} +0 -0
- /package/dist/cjs/views/{Try.js.map → Try.cjs.map} +0 -0
- /package/dist/cjs/vite/{build.js.map → build.cjs.map} +0 -0
- /package/dist/cjs/vite/{clientTreeShakePlugin.js.map → clientTreeShakePlugin.cjs.map} +0 -0
- /package/dist/cjs/vite/{constants.js.map → constants.cjs.map} +0 -0
- /package/dist/cjs/vite/{createFileSystemRouter.js.map → createFileSystemRouter.cjs.map} +0 -0
- /package/dist/cjs/vite/{customNodeExternals.js.map → customNodeExternals.cjs.map} +0 -0
- /package/dist/cjs/vite/{ensureTsConfig.js.map → ensureTsConfig.cjs.map} +0 -0
- /package/dist/cjs/vite/{findDepsToOptimize.js.map → findDepsToOptimize.cjs.map} +0 -0
- /package/dist/cjs/vite/{fixDependenciesPlugin.js.map → fixDependenciesPlugin.cjs.map} +0 -0
- /package/dist/cjs/vite/{generateTypesForRoutes.js.map → generateTypesForRoutes.cjs.map} +0 -0
- /package/dist/cjs/vite/{getManifest.js.map → getManifest.cjs.map} +0 -0
- /package/dist/cjs/vite/{headers.js.map → headers.cjs.map} +0 -0
- /package/dist/cjs/vite/{loadEnv.js.map → loadEnv.cjs.map} +0 -0
- /package/dist/cjs/vite/{makePluginWebOnly.js.map → makePluginWebOnly.cjs.map} +0 -0
- /package/dist/cjs/vite/{one.js.map → one.cjs.map} +0 -0
- /package/dist/cjs/vite/{removeReactNativeWebAnimatedPlugin.js.map → removeReactNativeWebAnimatedPlugin.cjs.map} +0 -0
- /package/dist/cjs/vite/{replaceLoader.js.map → replaceLoader.cjs.map} +0 -0
- /package/dist/cjs/vite/{resolveAPIRequest.js.map → resolveAPIRequest.cjs.map} +0 -0
- /package/dist/cjs/vite/{server.js.map → server.cjs.map} +0 -0
- /package/dist/cjs/vite/{types.js.map → types.cjs.map} +0 -0
- /package/dist/cjs/vite/{virtualEntryPlugin.js.map → virtualEntryPlugin.cjs.map} +0 -0
- /package/dist/cjs/vite/{vitePluginSsrCss.js.map → vitePluginSsrCss.cjs.map} +0 -0
- /package/dist/cjs/{vite.js.map → vite.cjs.map} +0 -0
- /package/dist/cjs/zero/{getQueryKey.js.map → getQueryKey.cjs.map} +0 -0
- /package/dist/cjs/zero/{isZeroQuery.js.map → isZeroQuery.cjs.map} +0 -0
- /package/dist/cjs/zero/{resolveQuery.js.map → resolveQuery.cjs.map} +0 -0
- /package/dist/cjs/zero/{subscribeToQuery.js.map → subscribeToQuery.cjs.map} +0 -0
- /package/dist/cjs/zero/{types.js.map → types.cjs.map} +0 -0
- /package/dist/cjs/zero/{useQuery.js.map → useQuery.cjs.map} +0 -0
- /package/dist/cjs/zero/{useQueryZero.js.map → useQueryZero.cjs.map} +0 -0
- /package/dist/cjs/{zero.js.map → zero.cjs.map} +0 -0
@@ -1,42 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
10
|
-
for (let key of __getOwnPropNames(from))
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
-
return to;
|
13
|
-
};
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
-
var useLinkTo_exports = {};
|
16
|
-
__export(useLinkTo_exports, {
|
17
|
-
useLinkTo: () => useLinkTo
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(useLinkTo_exports);
|
20
|
-
var import_react_native = require("react-native-web"), import_getPathFromState = require("../fork/getPathFromState"), import_router = require("../router/router"), import_matchers = require("../matchers");
|
21
|
-
function eventShouldPreventDefault(e) {
|
22
|
-
return e?.defaultPrevented ? !1 : (
|
23
|
-
// Only check MouseEvents
|
24
|
-
!!("button" in e && // ignore clicks with modifier keys
|
25
|
-
!e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey && (e.button == null || e.button === 0) && // Only accept left clicks
|
26
|
-
[void 0, null, "", "self"].includes(e.currentTarget.target))
|
27
|
-
);
|
28
|
-
}
|
29
|
-
function useLinkTo(props) {
|
30
|
-
const { linkTo } = (0, import_router.useOneRouter)(), onPress = (e) => {
|
31
|
-
const event = props.replace ? "REPLACE" : "PUSH";
|
32
|
-
let shouldHandle = !1;
|
33
|
-
import_react_native.Platform.OS !== "web" || !e ? shouldHandle = e ? !e.defaultPrevented : !0 : eventShouldPreventDefault(e) && (e.preventDefault(), shouldHandle = !0), shouldHandle && linkTo(props.href, event);
|
34
|
-
};
|
35
|
-
return {
|
36
|
-
// Ensure there's always a value for href. Manually append the baseUrl to the href prop that shows in the static HTML.
|
37
|
-
href: (0, import_getPathFromState.appendBaseUrl)((0, import_matchers.stripGroupSegmentsFromPath)(props.href) || "/"),
|
38
|
-
role: "link",
|
39
|
-
onPress
|
40
|
-
};
|
41
|
-
}
|
42
|
-
//# sourceMappingURL=useLinkTo.js.map
|
@@ -1,50 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
10
|
-
for (let key of __getOwnPropNames(from))
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
-
return to;
|
13
|
-
};
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
-
var useLoadedNavigation_exports = {};
|
16
|
-
__export(useLoadedNavigation_exports, {
|
17
|
-
useLoadedNavigation: () => useLoadedNavigation,
|
18
|
-
useOptionalNavigation: () => useOptionalNavigation
|
19
|
-
});
|
20
|
-
module.exports = __toCommonJS(useLoadedNavigation_exports);
|
21
|
-
var import_native = require("@react-navigation/native"), import_react = require("react"), import_router = require("../router/router");
|
22
|
-
function useLoadedNavigation() {
|
23
|
-
const { navigationRef } = (0, import_router.useOneRouter)(), navigation = (0, import_native.useNavigation)(), isMounted = (0, import_react.useRef)(!0), pending = (0, import_react.useRef)([]);
|
24
|
-
(0, import_react.useEffect)(() => (isMounted.current = !0, () => {
|
25
|
-
isMounted.current = !1;
|
26
|
-
}), []);
|
27
|
-
const flush = (0, import_react.useCallback)(() => {
|
28
|
-
if (isMounted.current) {
|
29
|
-
const pendingCallbacks = pending.current;
|
30
|
-
pending.current = [], pendingCallbacks.forEach((callback) => {
|
31
|
-
callback(navigation);
|
32
|
-
});
|
33
|
-
}
|
34
|
-
}, [navigation]);
|
35
|
-
return (0, import_react.useEffect)(() => {
|
36
|
-
navigationRef.current && flush();
|
37
|
-
}, [flush, navigationRef]), (0, import_react.useCallback)(
|
38
|
-
(fn) => {
|
39
|
-
pending.current.push(fn), navigationRef.current && flush();
|
40
|
-
},
|
41
|
-
[flush, navigationRef]
|
42
|
-
);
|
43
|
-
}
|
44
|
-
function useOptionalNavigation() {
|
45
|
-
const [navigation, setNavigation] = (0, import_react.useState)(null), loadNavigation = useLoadedNavigation();
|
46
|
-
return (0, import_react.useEffect)(() => {
|
47
|
-
loadNavigation((nav) => setNavigation(nav));
|
48
|
-
}, [loadNavigation]), navigation;
|
49
|
-
}
|
50
|
-
//# sourceMappingURL=useLoadedNavigation.js.map
|
package/dist/cjs/platform.js
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
10
|
-
for (let key of __getOwnPropNames(from))
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
-
return to;
|
13
|
-
};
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
-
var platform_exports = {};
|
16
|
-
__export(platform_exports, {
|
17
|
-
isWeb: () => isWeb
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(platform_exports);
|
20
|
-
const isWeb = typeof window < "u" && typeof navigator < "u" && typeof document < "u";
|
21
|
-
//# sourceMappingURL=platform.js.map
|
@@ -1,26 +0,0 @@
|
|
1
|
-
var __create = Object.create;
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
8
|
-
for (let key of __getOwnPropNames(from))
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
10
|
-
return to;
|
11
|
-
};
|
12
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
13
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
14
|
-
// file that has been converted to a CommonJS file using a Babel-
|
15
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
16
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
17
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
18
|
-
mod
|
19
|
-
));
|
20
|
-
var import_structured_clone = __toESM(require("@ungap/structured-clone"), 1), import_core_asynciterator_polyfill = require("@azure/core-asynciterator-polyfill"), import_url = require("core-js/actual/url"), import_url_search_params = require("core-js/actual/url-search-params"), import_promiseWithResolvers = require("./utils/promiseWithResolvers");
|
21
|
-
globalThis.global = globalThis;
|
22
|
-
globalThis.structuredClone ||= import_structured_clone.default;
|
23
|
-
globalThis.requestAnimationFrame ||= setTimeout;
|
24
|
-
Promise.withResolvers || // @ts-ignore
|
25
|
-
(Promise.withResolvers = import_promiseWithResolvers.promiseWithResolvers);
|
26
|
-
//# sourceMappingURL=polyfills-mobile.js.map
|
@@ -1,23 +0,0 @@
|
|
1
|
-
var __create = Object.create;
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
8
|
-
for (let key of __getOwnPropNames(from))
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
10
|
-
return to;
|
11
|
-
};
|
12
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
13
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
14
|
-
// file that has been converted to a CommonJS file using a Babel-
|
15
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
16
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
17
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
18
|
-
mod
|
19
|
-
));
|
20
|
-
var import_ws = __toESM(require("ws"), 1);
|
21
|
-
globalThis.WebSocket ||= import_ws.default;
|
22
|
-
globalThis.requestAnimationFrame = setTimeout;
|
23
|
-
//# sourceMappingURL=polyfills-server.js.map
|
package/dist/cjs/render.js
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
10
|
-
for (let key of __getOwnPropNames(from))
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
-
return to;
|
13
|
-
};
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
-
var render_exports = {};
|
16
|
-
__export(render_exports, {
|
17
|
-
render: () => render
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(render_exports);
|
20
|
-
var import_react = require("react"), import_client = require("react-dom/client");
|
21
|
-
globalThis.__vxrnVersion ||= 0;
|
22
|
-
function render(element) {
|
23
|
-
typeof document > "u" || (globalThis.__vxrnRoot ? (globalThis.__vxrnVersion++, globalThis.__vxrnRoot.render(element)) : (0, import_react.startTransition)(() => {
|
24
|
-
if (globalThis.__vxrnIsSPA) {
|
25
|
-
const root = (0, import_client.createRoot)(document.body);
|
26
|
-
globalThis.__vxrnRoot = root, root.render(element);
|
27
|
-
} else
|
28
|
-
globalThis.__vxrnRoot = (0, import_client.hydrateRoot)(document.body, element, {
|
29
|
-
onRecoverableError(...args) {
|
30
|
-
console.groupCollapsed(
|
31
|
-
"[one] Non-critical recoverable React error occurred, expand group to see details"
|
32
|
-
), console.error(...args), console.groupEnd();
|
33
|
-
},
|
34
|
-
// @ts-expect-error
|
35
|
-
onUncaughtError(...args) {
|
36
|
-
console.error("[one] onUncaughtError", ...args);
|
37
|
-
},
|
38
|
-
onCaughtError(...args) {
|
39
|
-
console.error("[one] onCaughtError", ...args);
|
40
|
-
}
|
41
|
-
});
|
42
|
-
}));
|
43
|
-
}
|
44
|
-
//# sourceMappingURL=render.js.map
|
@@ -1,14 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
6
|
-
if (from && typeof from == "object" || typeof from == "function")
|
7
|
-
for (let key of __getOwnPropNames(from))
|
8
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
9
|
-
return to;
|
10
|
-
};
|
11
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
12
|
-
var RouterStore_exports = {};
|
13
|
-
module.exports = __toCommonJS(RouterStore_exports);
|
14
|
-
//# sourceMappingURL=RouterStore.js.map
|
@@ -1,21 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
10
|
-
for (let key of __getOwnPropNames(from))
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
-
return to;
|
13
|
-
};
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
-
var constants_exports = {};
|
16
|
-
__export(constants_exports, {
|
17
|
-
CACHE_KEY: () => CACHE_KEY
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(constants_exports);
|
20
|
-
const CACHE_KEY = `${Math.random()}`.slice(3);
|
21
|
-
//# sourceMappingURL=constants.js.map
|
@@ -1,25 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
10
|
-
for (let key of __getOwnPropNames(from))
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
-
return to;
|
13
|
-
};
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
-
var lastAction_exports = {};
|
16
|
-
__export(lastAction_exports, {
|
17
|
-
getLastAction: () => getLastAction,
|
18
|
-
setLastAction: () => setLastAction
|
19
|
-
});
|
20
|
-
module.exports = __toCommonJS(lastAction_exports);
|
21
|
-
let lastUserRouteAction = Date.now();
|
22
|
-
const getLastAction = () => lastUserRouteAction, setLastAction = () => {
|
23
|
-
lastUserRouteAction = Date.now();
|
24
|
-
};
|
25
|
-
//# sourceMappingURL=lastAction.js.map
|
@@ -1,22 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
10
|
-
for (let key of __getOwnPropNames(from))
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
-
return to;
|
13
|
-
};
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
-
var serverLocationContext_exports = {};
|
16
|
-
__export(serverLocationContext_exports, {
|
17
|
-
ServerLocationContext: () => ServerLocationContext
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(serverLocationContext_exports);
|
20
|
-
var import_react = require("react");
|
21
|
-
const ServerLocationContext = (0, import_react.createContext)(void 0);
|
22
|
-
//# sourceMappingURL=serverLocationContext.js.map
|
package/dist/cjs/serve.js
DELETED
@@ -1,175 +0,0 @@
|
|
1
|
-
var __create = Object.create;
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __export = (target, all) => {
|
7
|
-
for (var name in all)
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
11
|
-
for (let key of __getOwnPropNames(from))
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
13
|
-
return to;
|
14
|
-
};
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
21
|
-
mod
|
22
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
23
|
-
var serve_exports = {};
|
24
|
-
__export(serve_exports, {
|
25
|
-
serve: () => serve
|
26
|
-
});
|
27
|
-
module.exports = __toCommonJS(serve_exports);
|
28
|
-
var import_polyfills_server = require("./polyfills-server"), import_fs_extra = __toESM(require("fs-extra"), 1), import_node_path = __toESM(require("node:path"), 1), import_vxrn = require("vxrn"), import_createHandleRequest = require("./createHandleRequest"), import_isResponse = require("./utils/isResponse"), import_isStatus = require("./utils/isStatus"), import_removeUndefined = require("./utils/removeUndefined"), import_resolveAPIRequest = require("./vite/resolveAPIRequest"), import_one = require("./vite/one"), import_label_process = require("./cli/label-process");
|
29
|
-
process.on("uncaughtException", (err) => {
|
30
|
-
console.error("[one] Uncaught exception", err?.stack || err);
|
31
|
-
});
|
32
|
-
async function serve(args = {}) {
|
33
|
-
(0, import_label_process.labelProcess)("serve");
|
34
|
-
const oneOptions = await (0, import_one.loadUserOneOptions)("serve");
|
35
|
-
return process.env.VXRN_REACT_19 = "1", await (0, import_vxrn.serve)({
|
36
|
-
server: {
|
37
|
-
// fallback to one plugin
|
38
|
-
...oneOptions.server,
|
39
|
-
// override with any flags given to cli
|
40
|
-
...(0, import_removeUndefined.removeUndefined)({
|
41
|
-
port: args.port ? +args.port : void 0,
|
42
|
-
host: args.host,
|
43
|
-
compress: args.compress,
|
44
|
-
platform: args.platform,
|
45
|
-
cacheHeaders: args.cacheHeaders
|
46
|
-
}),
|
47
|
-
async beforeStart(options, app) {
|
48
|
-
await oneOptions.server?.beforeStart?.(options, app), await oneServe(oneOptions, options, app);
|
49
|
-
}
|
50
|
-
}
|
51
|
-
});
|
52
|
-
}
|
53
|
-
async function oneServe(options, vxrnOptions, app) {
|
54
|
-
const root = options.root || vxrnOptions.root || ".", isAPIRequest = /* @__PURE__ */ new WeakMap(), toAbsolute = (p) => import_node_path.default.resolve(root, p), redirects = options.web?.redirects;
|
55
|
-
if (redirects)
|
56
|
-
for (const redirect of redirects)
|
57
|
-
app.get(redirect.source, (context) => {
|
58
|
-
const destinationUrl = redirect.destination.replace(/:\w+/g, (param) => {
|
59
|
-
const paramName = param.substring(1);
|
60
|
-
return context.req.param(paramName) || "";
|
61
|
-
});
|
62
|
-
return context.redirect(destinationUrl, redirect.permanent ? 301 : 302);
|
63
|
-
});
|
64
|
-
const buildInfo = await import_fs_extra.default.readJSON(toAbsolute("dist/buildInfo.json"));
|
65
|
-
if (!buildInfo)
|
66
|
-
throw new Error("No build info found, have you run build?");
|
67
|
-
const { routeMap, builtRoutes } = buildInfo, routeToBuildInfo = {};
|
68
|
-
for (const route of builtRoutes)
|
69
|
-
routeToBuildInfo[route.cleanPath] = route;
|
70
|
-
const serverOptions = {
|
71
|
-
...options,
|
72
|
-
root
|
73
|
-
}, render = (await import((0, import_vxrn.getServerEntry)(serverOptions))).default.render, apiCJS = options.build?.api?.outputFormat === "cjs", handleRequest = (0, import_createHandleRequest.createHandleRequest)(
|
74
|
-
{},
|
75
|
-
{
|
76
|
-
async handleAPI({ route, request, loaderProps }) {
|
77
|
-
const apiFile = (0, import_node_path.join)(
|
78
|
-
process.cwd(),
|
79
|
-
"dist",
|
80
|
-
"api",
|
81
|
-
route.page.replace("[", "_").replace("]", "_") + (apiCJS ? ".cjs" : ".js")
|
82
|
-
);
|
83
|
-
return isAPIRequest.set(request, !0), (0, import_resolveAPIRequest.resolveAPIRequest)(
|
84
|
-
async () => {
|
85
|
-
try {
|
86
|
-
return await import(apiFile);
|
87
|
-
} catch (err) {
|
88
|
-
return console.error(`
|
89
|
-
[one] Error importing API route at ${apiFile}:
|
90
|
-
|
91
|
-
${err}
|
92
|
-
|
93
|
-
If this is an import error, you can likely fix this by adding this dependency to
|
94
|
-
the "optimizeDeps.include" array in your vite.config.ts.
|
95
|
-
|
96
|
-
\u{1F41E} For a better error message run "node" and enter:
|
97
|
-
|
98
|
-
import('${apiFile}')
|
99
|
-
|
100
|
-
`), {};
|
101
|
-
}
|
102
|
-
},
|
103
|
-
request,
|
104
|
-
loaderProps?.params || {}
|
105
|
-
);
|
106
|
-
},
|
107
|
-
async handleSSR({ route, url, loaderProps }) {
|
108
|
-
if (route.type === "ssr") {
|
109
|
-
const buildInfo2 = routeToBuildInfo[route.page];
|
110
|
-
if (!buildInfo2)
|
111
|
-
throw new Error(`No buildinfo found for ${url}, route: ${route.page}`);
|
112
|
-
try {
|
113
|
-
const loaderData = await (await import(buildInfo2.serverJsPath)).loader?.(loaderProps), preloads = buildInfo2.preloads, headers = new Headers();
|
114
|
-
return headers.set("content-type", "text/html"), new Response(
|
115
|
-
await render({
|
116
|
-
loaderData,
|
117
|
-
loaderProps,
|
118
|
-
path: loaderProps?.path || "/",
|
119
|
-
preloads
|
120
|
-
}),
|
121
|
-
{
|
122
|
-
headers
|
123
|
-
}
|
124
|
-
);
|
125
|
-
} catch (err) {
|
126
|
-
console.error(`[one] Error rendering SSR route ${route.page}
|
127
|
-
|
128
|
-
${err?.stack ?? err}
|
129
|
-
|
130
|
-
url: ${url}`);
|
131
|
-
}
|
132
|
-
}
|
133
|
-
}
|
134
|
-
}
|
135
|
-
), htmlFiles = {};
|
136
|
-
for (const key in routeMap)
|
137
|
-
routeToBuildInfo[key]?.type !== "ssr" && (htmlFiles[key] = await import_fs_extra.default.readFile((0, import_node_path.join)("dist/client", routeMap[key]), "utf-8"));
|
138
|
-
app.use(async (context, next) => {
|
139
|
-
const html = htmlFiles[context.req.path];
|
140
|
-
if (html)
|
141
|
-
return context.html(html);
|
142
|
-
try {
|
143
|
-
const request = context.req.raw, response = await handleRequest.handler(request);
|
144
|
-
if (response) {
|
145
|
-
if ((0, import_isResponse.isResponse)(response)) {
|
146
|
-
if ((0, import_isStatus.isStatusRedirect)(response.status)) {
|
147
|
-
const location = `${response.headers.get("location") || ""}`;
|
148
|
-
return context.redirect(location, response.status);
|
149
|
-
}
|
150
|
-
if (isAPIRequest.get(request))
|
151
|
-
try {
|
152
|
-
response.headers.set("Cache-Control", "no-store");
|
153
|
-
} catch (err) {
|
154
|
-
console.info(
|
155
|
-
`Error udpating cache header on api route "${context.req.path}" to no-store, it is ${response.headers.get("cache-control")}, continue`,
|
156
|
-
err
|
157
|
-
);
|
158
|
-
}
|
159
|
-
return response;
|
160
|
-
}
|
161
|
-
return context.json(
|
162
|
-
response,
|
163
|
-
200,
|
164
|
-
isAPIRequest.get(request) ? {
|
165
|
-
"Cache-Control": "no-store"
|
166
|
-
} : void 0
|
167
|
-
);
|
168
|
-
}
|
169
|
-
} catch (err) {
|
170
|
-
console.error(` [one] Error handling request: ${err.stack}`);
|
171
|
-
}
|
172
|
-
await next();
|
173
|
-
});
|
174
|
-
}
|
175
|
-
//# sourceMappingURL=serve.js.map
|
package/dist/cjs/sortRoutes.js
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
10
|
-
for (let key of __getOwnPropNames(from))
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
-
return to;
|
13
|
-
};
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
-
var sortRoutes_exports = {};
|
16
|
-
__export(sortRoutes_exports, {
|
17
|
-
sortRoutes: () => sortRoutes,
|
18
|
-
sortRoutesWithInitial: () => sortRoutesWithInitial
|
19
|
-
});
|
20
|
-
module.exports = __toCommonJS(sortRoutes_exports);
|
21
|
-
var import_matchers = require("./matchers");
|
22
|
-
function sortDynamicConvention(a, b) {
|
23
|
-
return a.deep && !b.deep ? 1 : !a.deep && b.deep ? -1 : 0;
|
24
|
-
}
|
25
|
-
function sortRoutes(a, b) {
|
26
|
-
if (a.dynamic && !b.dynamic)
|
27
|
-
return 1;
|
28
|
-
if (!a.dynamic && b.dynamic)
|
29
|
-
return -1;
|
30
|
-
if (a.dynamic && b.dynamic) {
|
31
|
-
if (a.dynamic.length !== b.dynamic.length)
|
32
|
-
return b.dynamic.length - a.dynamic.length;
|
33
|
-
for (let i = 0; i < a.dynamic.length; i++) {
|
34
|
-
const aDynamic = a.dynamic[i], bDynamic = b.dynamic[i];
|
35
|
-
if (aDynamic.notFound && bDynamic.notFound) {
|
36
|
-
const s2 = sortDynamicConvention(aDynamic, bDynamic);
|
37
|
-
if (s2)
|
38
|
-
return s2;
|
39
|
-
}
|
40
|
-
if (aDynamic.notFound && !bDynamic.notFound)
|
41
|
-
return 1;
|
42
|
-
if (!aDynamic.notFound && bDynamic.notFound)
|
43
|
-
return -1;
|
44
|
-
const s = sortDynamicConvention(aDynamic, bDynamic);
|
45
|
-
if (s)
|
46
|
-
return s;
|
47
|
-
}
|
48
|
-
return 0;
|
49
|
-
}
|
50
|
-
const aIndex = a.route === "index" || (0, import_matchers.matchGroupName)(a.route) != null, bIndex = b.route === "index" || (0, import_matchers.matchGroupName)(b.route) != null;
|
51
|
-
return aIndex && !bIndex ? -1 : !aIndex && bIndex ? 1 : a.route.length - b.route.length;
|
52
|
-
}
|
53
|
-
function sortRoutesWithInitial(initialRouteName) {
|
54
|
-
return (a, b) => {
|
55
|
-
if (initialRouteName) {
|
56
|
-
if (a.route === initialRouteName)
|
57
|
-
return -1;
|
58
|
-
if (b.route === initialRouteName)
|
59
|
-
return 1;
|
60
|
-
}
|
61
|
-
return sortRoutes(a, b);
|
62
|
-
};
|
63
|
-
}
|
64
|
-
//# sourceMappingURL=sortRoutes.js.map
|
@@ -1,33 +0,0 @@
|
|
1
|
-
var __create = Object.create;
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __export = (target, all) => {
|
7
|
-
for (var name in all)
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
11
|
-
for (let key of __getOwnPropNames(from))
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
13
|
-
return to;
|
14
|
-
};
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
21
|
-
mod
|
22
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
23
|
-
var generateRouteTypes_exports = {};
|
24
|
-
__export(generateRouteTypes_exports, {
|
25
|
-
generateRouteTypes: () => generateRouteTypes
|
26
|
-
});
|
27
|
-
module.exports = __toCommonJS(generateRouteTypes_exports);
|
28
|
-
var import_fs_extra = __toESM(require("fs-extra"), 1), import_promises = require("node:fs/promises"), import_node_path = require("node:path"), import_useViteRoutes = require("../useViteRoutes"), import_globDir = require("../utils/globDir"), import_getTypedRoutesDeclarationFile = require("./getTypedRoutesDeclarationFile");
|
29
|
-
async function generateRouteTypes(outFile) {
|
30
|
-
const routes = (0, import_globDir.globDir)("app").reduce((acc, cur) => (acc[cur] = {}, acc), {}), context = (0, import_useViteRoutes.globbedRoutesToRouteContext)(routes), declarations = (0, import_getTypedRoutesDeclarationFile.getTypedRoutesDeclarationFile)(context);
|
31
|
-
await import_fs_extra.default.ensureDir((0, import_node_path.dirname)(outFile)), await (0, import_promises.writeFile)(outFile, declarations);
|
32
|
-
}
|
33
|
-
//# sourceMappingURL=generateRouteTypes.js.map
|
package/dist/cjs/types.js
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
6
|
-
if (from && typeof from == "object" || typeof from == "function")
|
7
|
-
for (let key of __getOwnPropNames(from))
|
8
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
9
|
-
return to;
|
10
|
-
};
|
11
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
12
|
-
var types_exports = {};
|
13
|
-
module.exports = __toCommonJS(types_exports);
|
14
|
-
//# sourceMappingURL=types.js.map
|