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
package/dist/cjs/vite/one.js
DELETED
@@ -1,255 +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 one_exports = {};
|
24
|
-
__export(one_exports, {
|
25
|
-
loadUserOneOptions: () => loadUserOneOptions,
|
26
|
-
one: () => one
|
27
|
-
});
|
28
|
-
module.exports = __toCommonJS(one_exports);
|
29
|
-
var import_node_events = __toESM(require("node:events"), 1), import_node_path = __toESM(require("node:path"), 1), import_vite = require("vite"), import_vite_tsconfig_paths = __toESM(require("vite-tsconfig-paths"), 1), import_vxrn = require("vxrn"), import_polyfills_server = require("../polyfills-server"), import_existsAsync = require("../utils/existsAsync"), import_resolve = require("@vxrn/resolve"), import_clientTreeShakePlugin = require("./clientTreeShakePlugin"), import_createFileSystemRouter = require("./createFileSystemRouter"), import_ensureTsConfig = require("./ensureTsConfig"), import_fixDependenciesPlugin = require("./fixDependenciesPlugin"), import_generateTypesForRoutes = require("./generateTypesForRoutes"), import_loadEnv = require("./loadEnv"), import_virtualEntryPlugin = require("./virtualEntryPlugin"), import_vitePluginSsrCss = require("./vitePluginSsrCss");
|
30
|
-
import_node_events.default.setMaxListeners(1e3);
|
31
|
-
globalThis.__vxrnEnableNativeEnv = !0;
|
32
|
-
function one(options = {}) {
|
33
|
-
oneOptions = options, (0, import_loadEnv.loadEnv)(process.cwd()), options.config?.ensureTSConfig !== !1 && (0, import_ensureTsConfig.ensureTSConfig)(), globalThis.__vxrnPluginConfig__ = options;
|
34
|
-
const { optimizeDeps } = (0, import_vxrn.getOptimizeDeps)("build"), optimizeIds = optimizeDeps.include, optimizeIdRegex = new RegExp(
|
35
|
-
// santize ids for regex
|
36
|
-
// https://stackoverflow.com/questions/6300183/sanitize-string-of-regex-characters-before-regexp-build
|
37
|
-
`${optimizeIds.map((id) => id.replace(/[#-.]|[[-^]|[?|{}]/g, "\\$&")).join("|")}`
|
38
|
-
);
|
39
|
-
let tsConfigPathsPlugin = null;
|
40
|
-
const vxrnOptions = (0, import_vxrn.getOptionsFilled)(), devAndProdPlugins = [
|
41
|
-
// proxy because you cant add a plugin inside a plugin
|
42
|
-
new Proxy(
|
43
|
-
{
|
44
|
-
name: "one:tsconfig-paths",
|
45
|
-
config(configIncoming) {
|
46
|
-
const pathsConfig = options.config?.tsConfigPaths;
|
47
|
-
pathsConfig !== !1 && (configIncoming.plugins?.flat().some((p) => p && p.name === "vite-tsconfig-paths") || (tsConfigPathsPlugin = (0, import_vite_tsconfig_paths.default)(
|
48
|
-
pathsConfig && typeof pathsConfig == "object" ? pathsConfig : {}
|
49
|
-
)));
|
50
|
-
},
|
51
|
-
configResolved() {
|
52
|
-
},
|
53
|
-
resolveId() {
|
54
|
-
}
|
55
|
-
},
|
56
|
-
{
|
57
|
-
get(target, key, thisArg) {
|
58
|
-
if (key === "config" || key === "name")
|
59
|
-
return Reflect.get(target, key, thisArg);
|
60
|
-
if (tsConfigPathsPlugin)
|
61
|
-
return Reflect.get(tsConfigPathsPlugin, key, thisArg);
|
62
|
-
}
|
63
|
-
}
|
64
|
-
),
|
65
|
-
{
|
66
|
-
name: "one-slim-deps",
|
67
|
-
enforce: "pre",
|
68
|
-
config() {
|
69
|
-
return {
|
70
|
-
resolve: {
|
71
|
-
alias: {
|
72
|
-
tslib: (0, import_resolve.resolvePath)("@vxrn/tslib-lite")
|
73
|
-
}
|
74
|
-
// [
|
75
|
-
// {
|
76
|
-
// find: /tslib/,
|
77
|
-
// replacement: resolvePath('@vxrn/tslib-lite'),
|
78
|
-
// },
|
79
|
-
// // not working but would save ~30Kb stat
|
80
|
-
// // {
|
81
|
-
// // find: /@react-navigation\/core.*\/getStateFromPath/,
|
82
|
-
// // replacement: join(forkPath, 'fork', 'getStateFromPath.mjs'),
|
83
|
-
// // },
|
84
|
-
// // {
|
85
|
-
// // find: /@react-navigation\/core.*\/getPathFromState/,
|
86
|
-
// // replacement: join(forkPath, 'fork', 'getPathFromState.mjs'),
|
87
|
-
// // },
|
88
|
-
// ],
|
89
|
-
}
|
90
|
-
};
|
91
|
-
}
|
92
|
-
},
|
93
|
-
{
|
94
|
-
name: "one:init-config",
|
95
|
-
config() {
|
96
|
-
return {
|
97
|
-
define: {
|
98
|
-
...options.web?.defaultRenderMode && {
|
99
|
-
"process.env.One_DEFAULT_RENDER_MODE": JSON.stringify(options.web.defaultRenderMode)
|
100
|
-
},
|
101
|
-
...options.setupFile && {
|
102
|
-
"process.env.One_SETUP_FILE": JSON.stringify(options.setupFile)
|
103
|
-
},
|
104
|
-
...process.env.NODE_ENV !== "production" && vxrnOptions && {
|
105
|
-
"process.env.ONE_SERVER_URL": JSON.stringify(vxrnOptions.server.url)
|
106
|
-
}
|
107
|
-
},
|
108
|
-
environments: {
|
109
|
-
client: {
|
110
|
-
define: {
|
111
|
-
"process.env.VITE_ENVIRONMENT": '"client"'
|
112
|
-
}
|
113
|
-
},
|
114
|
-
ssr: {
|
115
|
-
define: {
|
116
|
-
"process.env.VITE_ENVIRONMENT": '"ssr"'
|
117
|
-
}
|
118
|
-
}
|
119
|
-
}
|
120
|
-
};
|
121
|
-
}
|
122
|
-
},
|
123
|
-
{
|
124
|
-
name: "one-zero",
|
125
|
-
config() {
|
126
|
-
if (options.zero)
|
127
|
-
return {
|
128
|
-
define: {
|
129
|
-
"process.env.ZERO_ENABLED": "true",
|
130
|
-
TESTING: "false",
|
131
|
-
REPLICACHE_VERSION: '"15.2.1"',
|
132
|
-
ZERO_VERSION: '"0.0.0"'
|
133
|
-
}
|
134
|
-
};
|
135
|
-
}
|
136
|
-
},
|
137
|
-
{
|
138
|
-
name: "tamagui-react-19",
|
139
|
-
config() {
|
140
|
-
return {
|
141
|
-
define: {
|
142
|
-
// safe to set because it only affects web in tamagui, and one is always react 19
|
143
|
-
"process.env.TAMAGUI_REACT_19": '"1"'
|
144
|
-
}
|
145
|
-
};
|
146
|
-
}
|
147
|
-
},
|
148
|
-
{
|
149
|
-
name: "route-module-hmr-fix",
|
150
|
-
hotUpdate({ server, modules }) {
|
151
|
-
return modules.map((m) => {
|
152
|
-
const { id } = m;
|
153
|
-
return id && import_node_path.default.relative(server.config.root, id).split(import_node_path.default.sep)[0] === "app" && (m.acceptedHmrExports = /* @__PURE__ */ new Set()), m;
|
154
|
-
});
|
155
|
-
}
|
156
|
-
}
|
157
|
-
];
|
158
|
-
return globalThis.__vxrnAddNativePlugins = [(0, import_clientTreeShakePlugin.clientTreeShakePlugin)()], globalThis.__vxrnAddWebPluginsProd = devAndProdPlugins, [
|
159
|
-
...devAndProdPlugins,
|
160
|
-
/**
|
161
|
-
* This is really the meat of one, where it handles requests:
|
162
|
-
*/
|
163
|
-
(0, import_createFileSystemRouter.createFileSystemRouter)(options),
|
164
|
-
(0, import_generateTypesForRoutes.generateTypesForRoutes)(options),
|
165
|
-
(0, import_clientTreeShakePlugin.clientTreeShakePlugin)(),
|
166
|
-
(0, import_fixDependenciesPlugin.fixDependenciesPlugin)(options.deps),
|
167
|
-
(0, import_virtualEntryPlugin.createVirtualEntry)({
|
168
|
-
...options,
|
169
|
-
root: "app"
|
170
|
-
}),
|
171
|
-
{
|
172
|
-
name: "define-app-key",
|
173
|
-
config() {
|
174
|
-
if (options.app?.key)
|
175
|
-
return {
|
176
|
-
define: {
|
177
|
-
"process.env.One_APP_NAME": JSON.stringify(options.app.key)
|
178
|
-
}
|
179
|
-
};
|
180
|
-
}
|
181
|
-
},
|
182
|
-
{
|
183
|
-
name: "use-react-18-for-native",
|
184
|
-
enforce: "pre",
|
185
|
-
async config() {
|
186
|
-
const sharedNativeConfig = {
|
187
|
-
resolve: {
|
188
|
-
alias: {
|
189
|
-
react: (0, import_resolve.resolvePath)("one/react-18"),
|
190
|
-
"react-dom": (0, import_resolve.resolvePath)("one/react-dom-18")
|
191
|
-
}
|
192
|
-
}
|
193
|
-
};
|
194
|
-
return {
|
195
|
-
environments: {
|
196
|
-
ios: {
|
197
|
-
...sharedNativeConfig
|
198
|
-
},
|
199
|
-
android: {
|
200
|
-
...sharedNativeConfig
|
201
|
-
}
|
202
|
-
// this started erroring for no reason..
|
203
|
-
}
|
204
|
-
};
|
205
|
-
}
|
206
|
-
},
|
207
|
-
{
|
208
|
-
name: "optimize-deps-load-web-extensions",
|
209
|
-
enforce: "pre",
|
210
|
-
applyToEnvironment(environment) {
|
211
|
-
return (0, import_vxrn.isWebEnvironment)(environment);
|
212
|
-
},
|
213
|
-
async resolveId(id, importer = "") {
|
214
|
-
if (optimizeIdRegex.test(importer)) {
|
215
|
-
const absolutePath = (0, import_node_path.resolve)((0, import_node_path.dirname)(importer), id), webPath = absolutePath.replace(/(.m?js)/, "") + ".web.js";
|
216
|
-
if (webPath === id) return;
|
217
|
-
try {
|
218
|
-
const directoryPath = absolutePath + "/index.web.js";
|
219
|
-
if (await (0, import_existsAsync.existsAsync)(directoryPath))
|
220
|
-
return directoryPath;
|
221
|
-
if (await (0, import_existsAsync.existsAsync)(webPath))
|
222
|
-
return webPath;
|
223
|
-
} catch (err) {
|
224
|
-
console.warn("error probably fine", err);
|
225
|
-
}
|
226
|
-
}
|
227
|
-
}
|
228
|
-
},
|
229
|
-
(0, import_vitePluginSsrCss.vitePluginSsrCss)({
|
230
|
-
entries: [import_virtualEntryPlugin.virtualEntryId]
|
231
|
-
})
|
232
|
-
];
|
233
|
-
}
|
234
|
-
let oneOptions = null;
|
235
|
-
async function getUserOneOptions(command) {
|
236
|
-
if (!oneOptions) {
|
237
|
-
if (!command) throw new Error("Options not loaded and no command given");
|
238
|
-
await loadUserOneOptions(command);
|
239
|
-
}
|
240
|
-
if (!oneOptions)
|
241
|
-
throw new Error("No One options were loaded");
|
242
|
-
return oneOptions;
|
243
|
-
}
|
244
|
-
async function loadUserOneOptions(command) {
|
245
|
-
if (!await (0, import_vite.loadConfigFromFile)({
|
246
|
-
mode: "prod",
|
247
|
-
command
|
248
|
-
}))
|
249
|
-
throw new Error(`No config found in ${process.cwd()}. Is this the correct directory?`);
|
250
|
-
const foundOptions = getUserOneOptions();
|
251
|
-
if (!foundOptions)
|
252
|
-
throw new Error("No One plugin found in this vite.config");
|
253
|
-
return foundOptions;
|
254
|
-
}
|
255
|
-
//# sourceMappingURL=one.js.map
|
@@ -1,34 +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 replaceLoader_exports = {};
|
16
|
-
__export(replaceLoader_exports, {
|
17
|
-
replaceLoader: () => replaceLoader
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(replaceLoader_exports);
|
20
|
-
function replaceLoader({
|
21
|
-
code,
|
22
|
-
loaderData
|
23
|
-
}) {
|
24
|
-
const stringifiedData = JSON.stringify(loaderData);
|
25
|
-
return code.includes("__vxrn__loader__") ? code.replace(
|
26
|
-
/["']__vxrn__loader__['"]/,
|
27
|
-
// make sure this ' ' is added in front,
|
28
|
-
// minifiers will do `return"something"
|
29
|
-
// but if its null then it becomes returnnull
|
30
|
-
" " + stringifiedData.replace(/\$/g, "$$$$")
|
31
|
-
) : code + `
|
32
|
-
export const loader = () => (${stringifiedData})`;
|
33
|
-
}
|
34
|
-
//# sourceMappingURL=replaceLoader.js.map
|
@@ -1,71 +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 resolveAPIRequest_exports = {};
|
16
|
-
__export(resolveAPIRequest_exports, {
|
17
|
-
resolveAPIRequest: () => resolveAPIRequest
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(resolveAPIRequest_exports);
|
20
|
-
var import_isResponse = require("../utils/isResponse"), import_headers = require("./headers");
|
21
|
-
function resolveAPIRequest(asyncImport, request, params) {
|
22
|
-
if (asyncImport)
|
23
|
-
return new Promise((res, rej) => {
|
24
|
-
const id = { _id: Math.random() };
|
25
|
-
import_headers.requestAsyncLocalStore.run(id, async () => {
|
26
|
-
try {
|
27
|
-
const imported = await asyncImport(), requestType = request.method || "GET", handler = imported[requestType] || imported.default;
|
28
|
-
if (!handler) {
|
29
|
-
console.warn(`No handler found for request ${requestType}`);
|
30
|
-
return;
|
31
|
-
}
|
32
|
-
let response = await handler(request, { params });
|
33
|
-
const asyncHeaders = import_headers.asyncHeadersCache.get(id);
|
34
|
-
if (asyncHeaders)
|
35
|
-
try {
|
36
|
-
response instanceof Response ? (0, import_headers.mergeHeaders)(response.headers, asyncHeaders) : response && typeof response == "object" ? response = Response.json(response, { headers: asyncHeaders }) : response = new Response(response, { headers: asyncHeaders });
|
37
|
-
} catch (err) {
|
38
|
-
if (`${err}`.includes("immutable")) {
|
39
|
-
const body = response.body ? await streamToString(response.body) : "";
|
40
|
-
response = new Response(body, {
|
41
|
-
headers: response.headers,
|
42
|
-
status: response.status,
|
43
|
-
statusText: response.statusText
|
44
|
-
}), (0, import_headers.mergeHeaders)(response.headers, asyncHeaders);
|
45
|
-
} else
|
46
|
-
console.error(` [one] error adding headers: ${err}`);
|
47
|
-
}
|
48
|
-
res(response);
|
49
|
-
} catch (err) {
|
50
|
-
(0, import_isResponse.isResponse)(err) ? res(err) : rej(err);
|
51
|
-
}
|
52
|
-
});
|
53
|
-
});
|
54
|
-
}
|
55
|
-
async function streamToString(stream) {
|
56
|
-
const reader = stream.getReader(), decoder = new TextDecoder();
|
57
|
-
let result = "";
|
58
|
-
try {
|
59
|
-
for (; ; ) {
|
60
|
-
const { done, value } = await reader.read();
|
61
|
-
if (done) break;
|
62
|
-
result += decoder.decode(value, { stream: !0 });
|
63
|
-
}
|
64
|
-
} catch (error) {
|
65
|
-
console.error("Error reading the stream:", error);
|
66
|
-
} finally {
|
67
|
-
reader.releaseLock();
|
68
|
-
}
|
69
|
-
return result;
|
70
|
-
}
|
71
|
-
//# sourceMappingURL=resolveAPIRequest.js.map
|
package/dist/cjs/vite/server.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
var import_node_worker_threads = require("node:worker_threads"), import_node_url = require("node:url"), import_module_runner = require("vite/module-runner");
|
2
|
-
const import_meta = {};
|
3
|
-
if (!import_node_worker_threads.parentPort)
|
4
|
-
throw new Error("No parent port");
|
5
|
-
const runner = new import_module_runner.ModuleRunner(
|
6
|
-
{
|
7
|
-
root: (0, import_node_url.fileURLToPath)(new URL("./", import_meta.url)),
|
8
|
-
transport: new import_module_runner.RemoteRunnerTransport({
|
9
|
-
send: (data) => import_node_worker_threads.parentPort.postMessage(data),
|
10
|
-
onMessage: (listener) => import_node_worker_threads.parentPort.on("message", listener),
|
11
|
-
timeout: 5e3
|
12
|
-
})
|
13
|
-
},
|
14
|
-
new import_module_runner.ESModulesEvaluator()
|
15
|
-
);
|
16
|
-
//# sourceMappingURL=server.js.map
|
package/dist/cjs/vite/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
|
package/dist/cjs/vite.js
DELETED
@@ -1,28 +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 vite_exports = {};
|
16
|
-
__export(vite_exports, {
|
17
|
-
build: () => import_build.build,
|
18
|
-
clientTreeShakePlugin: () => import_clientTreeShakePlugin.clientTreeShakePlugin,
|
19
|
-
createFileSystemRouter: () => import_createFileSystemRouter.createFileSystemRouter,
|
20
|
-
makePluginWebOnly: () => import_makePluginWebOnly.makePluginWebOnly,
|
21
|
-
one: () => import_one.one,
|
22
|
-
removeReactNativeWebAnimatedPlugin: () => import_removeReactNativeWebAnimatedPlugin.removeReactNativeWebAnimatedPlugin,
|
23
|
-
setCurrentRequestHeaders: () => import_headers.setCurrentRequestHeaders,
|
24
|
-
vitePluginSsrCss: () => import_vitePluginSsrCss.vitePluginSsrCss
|
25
|
-
});
|
26
|
-
module.exports = __toCommonJS(vite_exports);
|
27
|
-
var import_clientTreeShakePlugin = require("./vite/clientTreeShakePlugin"), import_createFileSystemRouter = require("./vite/createFileSystemRouter"), import_vitePluginSsrCss = require("./vite/vitePluginSsrCss"), import_removeReactNativeWebAnimatedPlugin = require("./vite/removeReactNativeWebAnimatedPlugin"), import_makePluginWebOnly = require("./vite/makePluginWebOnly"), import_headers = require("./vite/headers"), import_build = require("./vite/build"), import_one = require("./vite/one");
|
28
|
-
//# sourceMappingURL=vite.js.map
|
@@ -1,24 +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 getQueryKey_exports = {};
|
16
|
-
__export(getQueryKey_exports, {
|
17
|
-
getQueryKey: () => getQueryKey
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(getQueryKey_exports);
|
20
|
-
var import_hashString = require("../utils/hashString");
|
21
|
-
function getQueryKey(query) {
|
22
|
-
return (0, import_hashString.hashString)(JSON.stringify(query.ast));
|
23
|
-
}
|
24
|
-
//# sourceMappingURL=getQueryKey.js.map
|
@@ -1,23 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
10
|
-
for (let key of __getOwnPropNames(from))
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
-
return to;
|
13
|
-
};
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
-
var isZeroQuery_exports = {};
|
16
|
-
__export(isZeroQuery_exports, {
|
17
|
-
isZeroQuery: () => isZeroQuery
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(isZeroQuery_exports);
|
20
|
-
function isZeroQuery(obj) {
|
21
|
-
return !(!obj || typeof obj != "object" || !obj.ast || !obj.ast.table);
|
22
|
-
}
|
23
|
-
//# sourceMappingURL=isZeroQuery.js.map
|
@@ -1,38 +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 resolveQuery_exports = {};
|
16
|
-
__export(resolveQuery_exports, {
|
17
|
-
resolveZeroQuery: () => resolveZeroQuery
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(resolveQuery_exports);
|
20
|
-
async function resolveZeroQuery(query) {
|
21
|
-
const view = query.materialize(), tm = setTimeout(() => {
|
22
|
-
console.warn(
|
23
|
-
" Warning: query slow to resolve, ensure Zero server is running",
|
24
|
-
JSON.stringify(query.ast, null, 2)
|
25
|
-
);
|
26
|
-
}, 2e3);
|
27
|
-
return new Promise((res, rej) => {
|
28
|
-
try {
|
29
|
-
const unsubscribe = view.addListener((snapshot) => {
|
30
|
-
unsubscribe(), clearTimeout(tm), res(snapshot);
|
31
|
-
});
|
32
|
-
view.hydrate();
|
33
|
-
} catch (err) {
|
34
|
-
clearTimeout(tm), rej(err);
|
35
|
-
}
|
36
|
-
});
|
37
|
-
}
|
38
|
-
//# sourceMappingURL=resolveQuery.js.map
|
package/dist/cjs/zero/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
|
@@ -1,47 +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 useQuery_exports = {};
|
16
|
-
__export(useQuery_exports, {
|
17
|
-
useQuery: () => useQuery
|
18
|
-
});
|
19
|
-
module.exports = __toCommonJS(useQuery_exports);
|
20
|
-
var import_react = require("react"), import_getQueryKey = require("./getQueryKey"), import_resolveQuery = require("./resolveQuery"), import_useQueryZero = require("./useQueryZero");
|
21
|
-
let clientInitialData = globalThis.__vxrnPostRenderData__;
|
22
|
-
const serverQueryData = {};
|
23
|
-
globalThis.__vxrnServerData__ = serverQueryData;
|
24
|
-
const promises = /* @__PURE__ */ new WeakMap(), useQuery = (query, enable = !0) => {
|
25
|
-
const snapshot = (0, import_useQueryZero.useQuery)(query, enable), queryIdRef = (0, import_react.useRef)();
|
26
|
-
query && !queryIdRef.current && (queryIdRef.current = (0, import_getQueryKey.getQueryKey)(query));
|
27
|
-
const queryId = queryIdRef.current || "";
|
28
|
-
if (typeof window > "u") {
|
29
|
-
if (!query) return [];
|
30
|
-
const promise = promises.get(query), value = serverQueryData[queryId];
|
31
|
-
if (value) return value;
|
32
|
-
if (!promise) {
|
33
|
-
const promise2 = new Promise((res, rej) => {
|
34
|
-
(0, import_resolveQuery.resolveZeroQuery)(query).then((val) => {
|
35
|
-
serverQueryData[queryId] = val, res();
|
36
|
-
}).catch((err) => {
|
37
|
-
promises.set(query, null), rej(err);
|
38
|
-
});
|
39
|
-
});
|
40
|
-
throw promises.set(query, promise2), promise2;
|
41
|
-
}
|
42
|
-
if (promise) throw promise;
|
43
|
-
return [];
|
44
|
-
}
|
45
|
-
return clientInitialData && !snapshot ? clientInitialData[queryId] || [] : snapshot || [];
|
46
|
-
};
|
47
|
-
//# sourceMappingURL=useQuery.js.map
|
package/dist/cjs/zero.js
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
10
|
-
for (let key of __getOwnPropNames(from))
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
12
|
-
return to;
|
13
|
-
};
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
15
|
-
var zero_exports = {};
|
16
|
-
__export(zero_exports, {
|
17
|
-
isZeroQuery: () => import_isZeroQuery.isZeroQuery,
|
18
|
-
resolveZeroQuery: () => import_resolveQuery.resolveZeroQuery,
|
19
|
-
useQuery: () => import_useQuery.useQuery
|
20
|
-
});
|
21
|
-
module.exports = __toCommonJS(zero_exports);
|
22
|
-
var import_useQuery = require("./zero/useQuery"), import_resolveQuery = require("./zero/resolveQuery"), import_isZeroQuery = require("./zero/isZeroQuery");
|
23
|
-
//# sourceMappingURL=zero.js.map
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|