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
@@ -3,42 +3,56 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
5
|
var __export = (target, all) => {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
for (var name in all) __defProp(target, name, {
|
7
|
+
get: all[name],
|
8
|
+
enumerable: !0
|
9
|
+
});
|
10
|
+
},
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
13
|
+
get: () => from[key],
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
15
|
+
});
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
19
|
+
value: !0
|
20
|
+
}), mod);
|
15
21
|
var createHandleRequest_exports = {};
|
16
22
|
__export(createHandleRequest_exports, {
|
17
23
|
createHandleRequest: () => createHandleRequest
|
18
24
|
});
|
19
25
|
module.exports = __toCommonJS(createHandleRequest_exports);
|
20
|
-
var import_cleanUrl = require("./cleanUrl"),
|
26
|
+
var import_cleanUrl = require("./cleanUrl.cjs"),
|
27
|
+
import_isResponse = require("./utils/isResponse.cjs"),
|
28
|
+
import_promiseWithResolvers = require("./utils/promiseWithResolvers.cjs"),
|
29
|
+
import_getManifest = require("./vite/getManifest.cjs");
|
21
30
|
function createHandleRequest(options, handlers) {
|
22
31
|
const manifest = (0, import_getManifest.getManifest)();
|
23
|
-
if (!manifest)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
32
|
+
if (!manifest) throw new Error("No routes manifest");
|
33
|
+
const apiRoutesMap = manifest.apiRoutes.reduce((acc, cur) => (acc[cur.page] = {
|
34
|
+
...cur,
|
35
|
+
compiledRegex: new RegExp(cur.namedRegex)
|
36
|
+
}, acc), {}),
|
37
|
+
apiRoutesList = Object.values(apiRoutesMap),
|
38
|
+
activeRequests = {},
|
39
|
+
pageRoutes = manifest.pageRoutes.map(route => ({
|
40
|
+
...route,
|
41
|
+
workingRegex: new RegExp(route.namedRegex)
|
42
|
+
}));
|
29
43
|
return {
|
30
44
|
manifest,
|
31
|
-
handler: async function(request) {
|
32
|
-
const urlString = request.url || "",
|
33
|
-
urlString || "",
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
if (
|
39
|
-
|
45
|
+
handler: async function (request) {
|
46
|
+
const urlString = request.url || "",
|
47
|
+
url = new URL(urlString || "", request.headers.get("host") ? `http://${request.headers.get("host")}` : ""),
|
48
|
+
{
|
49
|
+
pathname,
|
50
|
+
search
|
51
|
+
} = url;
|
52
|
+
if (process.env.NODE_ENV !== "production" && activeRequests[pathname]) return await activeRequests[pathname];
|
53
|
+
if (pathname === "/__vxrnhmr" || pathname.startsWith("/@")) return null;
|
40
54
|
if (handlers.handleAPI) {
|
41
|
-
const apiRoute = apiRoutesList.find(
|
55
|
+
const apiRoute = apiRoutesList.find(route => route.compiledRegex.test(pathname));
|
42
56
|
if (apiRoute) {
|
43
57
|
const params = getRouteParams(pathname, apiRoute);
|
44
58
|
try {
|
@@ -52,19 +66,18 @@ function createHandleRequest(options, handlers) {
|
|
52
66
|
}
|
53
67
|
});
|
54
68
|
} catch (err) {
|
55
|
-
if ((0, import_isResponse.isResponse)(err))
|
56
|
-
return err;
|
69
|
+
if ((0, import_isResponse.isResponse)(err)) return err;
|
57
70
|
throw err;
|
58
71
|
}
|
59
72
|
}
|
60
73
|
}
|
61
|
-
if (request.method !== "GET")
|
62
|
-
return null;
|
74
|
+
if (request.method !== "GET") return null;
|
63
75
|
if (handlers.handleLoader && pathname.endsWith("_vxrn_loader.js")) {
|
64
|
-
const originalUrl = (0, import_cleanUrl.getPathFromLoaderPath)(pathname),
|
76
|
+
const originalUrl = (0, import_cleanUrl.getPathFromLoaderPath)(pathname),
|
77
|
+
finalUrl = new URL(originalUrl, url.origin);
|
65
78
|
for (const route of pageRoutes) {
|
66
|
-
if (route.file === "" || !route.workingRegex.test(finalUrl.pathname))
|
67
|
-
|
79
|
+
if (route.file === "" || !route.workingRegex.test(finalUrl.pathname)) continue;
|
80
|
+
process.env.NODE_ENV === "development" && console.info(` \u2776 Running loader for route: ${finalUrl.pathname}`);
|
68
81
|
const headers = new Headers();
|
69
82
|
headers.set("Content-Type", "text/javascript");
|
70
83
|
try {
|
@@ -81,8 +94,7 @@ function createHandleRequest(options, handlers) {
|
|
81
94
|
headers
|
82
95
|
});
|
83
96
|
} catch (err) {
|
84
|
-
if ((0, import_isResponse.isResponse)(err))
|
85
|
-
return err;
|
97
|
+
if ((0, import_isResponse.isResponse)(err)) return err;
|
86
98
|
throw console.error(`Error running loader: ${err}`), err;
|
87
99
|
}
|
88
100
|
}
|
@@ -92,12 +104,15 @@ function createHandleRequest(options, handlers) {
|
|
92
104
|
}), Response.error();
|
93
105
|
}
|
94
106
|
if (handlers.handleSSR) {
|
95
|
-
const {
|
107
|
+
const {
|
108
|
+
promise,
|
109
|
+
reject,
|
110
|
+
resolve
|
111
|
+
} = (0, import_promiseWithResolvers.promiseWithResolvers)();
|
96
112
|
activeRequests[pathname] = promise;
|
97
113
|
try {
|
98
114
|
for (const route of pageRoutes) {
|
99
|
-
if (!route.workingRegex.test(pathname))
|
100
|
-
continue;
|
115
|
+
if (!route.workingRegex.test(pathname)) continue;
|
101
116
|
const ssrResponse = await handlers.handleSSR({
|
102
117
|
request,
|
103
118
|
route,
|
@@ -120,18 +135,15 @@ function createHandleRequest(options, handlers) {
|
|
120
135
|
};
|
121
136
|
}
|
122
137
|
function getLoaderParams(url, config) {
|
123
|
-
const params = {},
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
138
|
+
const params = {},
|
139
|
+
match = new RegExp(config.workingRegex).exec(url.pathname);
|
140
|
+
if (match?.groups) for (const [key, value] of Object.entries(match.groups)) {
|
141
|
+
const namedKey = config.routeKeys[key];
|
142
|
+
params[namedKey] = value;
|
143
|
+
}
|
129
144
|
return params;
|
130
145
|
}
|
131
146
|
function getRouteParams(pathname, route) {
|
132
147
|
const match = new RegExp(route.namedRegex).exec(pathname);
|
133
|
-
return match ? Object.fromEntries(
|
134
|
-
|
135
|
-
) : {};
|
136
|
-
}
|
137
|
-
//# sourceMappingURL=createHandleRequest.js.map
|
148
|
+
return match ? Object.fromEntries(Object.entries(route.routeKeys).map(([key, value]) => [value, match.groups?.[key]])) : {};
|
149
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../src/createHandleRequest.ts"],
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAsC,uBAEtC,oBAA2B,+BAC3B,8BAAqC,yCACrC,qBAA4B;AAYrB,SAAS,oBACd,SACA,UAKA;AACA,QAAM,eAAW,gCAAY;AAC7B,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,oBAAoB;AAGtC,QAAM,eACJ,SAAS,UAAU,OAAO,CAAC,KAAK,SAC9B,IAAI,IAAI,IAAI,IAAI,EAAE,GAAG,KAAK,eAAe,IAAI,OAAO,IAAI,UAAU,EAAE,GAC7D,MACN,CAAC,CAAC,GAED,gBAAgB,OAAO,OAAO,YAAY,GAK1C,iBAAiB,CAAC,GAGlB,aAAa,SAAS,WAAW,IAAI,CAAC,WAAW;AAAA,IACrD,GAAG;AAAA,IACH,cAAc,IAAI,OAAO,MAAM,UAAU;AAAA,EAC3C,EAAE;AAEF,SAAO;AAAA,IACL;AAAA,IACA,SAAS,eAA6B,SAAmD;AACvF,YAAM,YAAY,QAAQ,OAAO,IAC3B,MAAM,IAAI;AAAA,QACd,aAAa;AAAA,QACb,QAAQ,QAAQ,IAAI,MAAM,IAAI,UAAU,QAAQ,QAAQ,IAAI,MAAM,CAAC,KAAK;AAAA,MAC1E,GACM,EAAE,UAAU,OAAO,IAAI;AAE7B,UAAI,QAAQ,IAAI,aAAa,gBACvB,eAAe,QAAQ;AACzB,eAAO,MAAM,eAAe,QAAQ;AAIxC,UAAI,aAAa,gBAAgB,SAAS,WAAW,IAAI;AACvD,eAAO;AAGT,UAAI,SAA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F,IAHmB,CAAC;AAItB;",
|
5
|
+
"names": []
|
6
|
+
}
|
@@ -76,6 +76,7 @@ function createHandleRequest(options, handlers) {
|
|
76
76
|
for (var _iterator = pageRoutes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
77
77
|
var route = _step.value;
|
78
78
|
if (route.file !== "" && route.workingRegex.test(finalUrl.pathname)) {
|
79
|
+
process.env.NODE_ENV === "development" && console.info(` \u2776 Running loader for route: ${finalUrl.pathname}`);
|
79
80
|
var headers = new Headers();
|
80
81
|
headers.set("Content-Type", "text/javascript");
|
81
82
|
try {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/Users/n8/one/packages/one/src/createHandleRequest.ts"],
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;sBAAsC,uBAEtC,oBAA2B,+BAC3B,8BAAqC,yCACrC,qBAA4B;AAYrB,SAASA,oBACdC,SACAC,UAIC;AAED,MAAMC,eAAWC,gCAAAA;AACjB,MAAI,CAACD;AACH,UAAM,IAAIE,MAAM,oBAAoB;AAGtC,MAAMC,eACJH,SAASI,UAAUC,OAAO,SAACC,KAAKC,KAAAA;AAC9BD,eAAIC,IAAIC,IAAI,IAAI;MAAE,GAAGD;MAAKE,eAAe,IAAIC,OAAOH,IAAII,UAAU;IAAE,GAC7DL;EACT,GAAG,CAAC,CAAA,GAEAM,gBAAgBC,OAAOC,OAAOX,YAAAA,GAK9BY,iBAAiB,CAAC,GAGlBC,aAAahB,SAASgB,WAAWC,IAAI,SAACC,OAAAA;WAAW;MACrD,GAAGA;MACHC,cAAc,IAAIT,OAAOQ,MAAMP,UAAU;IAC3C;;AAEA,SAAO;IACLX;IACAoB,SAAS,eAA6BC,SAAgB;AACpD,UAAMC,YAAYD,QAAQE,OAAO,IAC3BA,MAAM,IAAIC,IACdF,aAAa,IACbD,QAAQI,QAAQC,IAAI,MAAA,IAAU,UAAUL,QAAQI,QAAQC,IAAI,MAAA,CAAA,KAAY,EAAA,GAEpE,EAAEC,UAAUC,OAAM,IAAKL;AAE7B,UAAIM,QAAQC,IAAIC,aAAa,gBACvBhB,eAAeY,QAAAA;AACjB,eAAO,MAAMZ,eAAeY,QAAAA;AAIhC,UAAIA,aAAa,gBAAgBA,SAASK,WAAW,IAAA;AACnD,eAAO;AAGT,UAAIjC,SAASkC,WAAW;AACtB,YAAMC,WAAWtB,cAAcuB,KAAK,SAACjB,QAAAA;AACnC,cAAMkB,QAAQlB,OAAMT;AACpB,iBAAO2B,MAAMC,KAAKV,QAAAA;QACpB,CAAA;AAEA,YAAIO,UAAU;AACZ,cAAMI,SAASC,eAAeZ,UAAUO,QAAAA;AAExC,cAAI;AACF,mBAAO,MAAMnC,SAASkC,UAAU;cAC9BZ;cACAH,OAAOgB;cACPX;cACAiB,aAAa;gBACXC,MAAMd;gBACNW;cACF;YACF,CAAA;UACF,SAASI,KAAK;AACZ,oBAAIC,8BAAWD,GAAAA;AACb,qBAAOA;AAET,kBAAMA;UACR;QACF;MACF;AAEA,UAAIrB,QAAQuB,WAAW;AACrB,eAAO;AAGT,UAAI7C,SAAS8C,cAAc;AACzB,YAAMC,6BAA6BnB,SAASoB,SAAS,iBAAA;AAErD,YAAID,4BAA4B;AAC9B,cAAME,kBAAcC,uCAAsBtB,QAAAA,GACpCuB,WAAW,IAAI1B,IAAIwB,aAAazB,IAAI4B,MAAM,GAE3C,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;AAAL,qBAAK,YAAenC,WAAAA,OAAAA,QAAAA,EAAAA,GAAf,OAAA,EAAA,6BAAA,QAAA,UAAA,KAAA,GAAA,OAAA,4BAAA,IAA2B;AAA3B,kBAAME,QAAN,MAAA;AACH,kBAAIA,MAAMkC,SAAS,
|
5
|
-
"names": ["createHandleRequest", "options", "handlers", "manifest", "getManifest", "Error", "apiRoutesMap", "apiRoutes", "reduce", "acc", "cur", "page", "compiledRegex", "RegExp", "namedRegex", "apiRoutesList", "Object", "values", "activeRequests", "pageRoutes", "map", "route", "workingRegex", "handler", "request", "urlString", "url", "URL", "headers", "get", "pathname", "search", "process", "env", "NODE_ENV", "startsWith", "handleAPI", "apiRoute", "find", "regex", "test", "params", "getRouteParams", "loaderProps", "path", "err", "isResponse", "method", "handleLoader", "isClientRequestingNewRoute", "endsWith", "originalUrl", "getPathFromLoaderPath", "finalUrl", "origin", "file", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;sBAAsC,uBAEtC,oBAA2B,+BAC3B,8BAAqC,yCACrC,qBAA4B;AAYrB,SAASA,oBACdC,SACAC,UAIC;AAED,MAAMC,eAAWC,gCAAAA;AACjB,MAAI,CAACD;AACH,UAAM,IAAIE,MAAM,oBAAoB;AAGtC,MAAMC,eACJH,SAASI,UAAUC,OAAO,SAACC,KAAKC,KAAAA;AAC9BD,eAAIC,IAAIC,IAAI,IAAI;MAAE,GAAGD;MAAKE,eAAe,IAAIC,OAAOH,IAAII,UAAU;IAAE,GAC7DL;EACT,GAAG,CAAC,CAAA,GAEAM,gBAAgBC,OAAOC,OAAOX,YAAAA,GAK9BY,iBAAiB,CAAC,GAGlBC,aAAahB,SAASgB,WAAWC,IAAI,SAACC,OAAAA;WAAW;MACrD,GAAGA;MACHC,cAAc,IAAIT,OAAOQ,MAAMP,UAAU;IAC3C;;AAEA,SAAO;IACLX;IACAoB,SAAS,eAA6BC,SAAgB;AACpD,UAAMC,YAAYD,QAAQE,OAAO,IAC3BA,MAAM,IAAIC,IACdF,aAAa,IACbD,QAAQI,QAAQC,IAAI,MAAA,IAAU,UAAUL,QAAQI,QAAQC,IAAI,MAAA,CAAA,KAAY,EAAA,GAEpE,EAAEC,UAAUC,OAAM,IAAKL;AAE7B,UAAIM,QAAQC,IAAIC,aAAa,gBACvBhB,eAAeY,QAAAA;AACjB,eAAO,MAAMZ,eAAeY,QAAAA;AAIhC,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UAAA;AACE,iBAAO3B,eAAeY,QAAAA;QACxB;MACF;AAEA,aAAO;IACT;EACF;AACF;AAEA,SAAS+B,gBACPnC,KACA6C,QAAmE;AAEnE,MAAM9B,SAAiC,CAAC,GAClC+B,QAAQ,IAAI3D,OAAO0D,OAAOjD,YAAY,EAAEmD,KAAK/C,IAAII,QAAQ;AAC/D,MAAI0C,SAAAA,QAAAA,MAAOE,QAAQ;QACZ,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;AAAL,eAAK,YAAsB1D,OAAO2D,QAAQH,MAAME,MAAM,EAAA,OAAA,QAAA,EAAA,GAAjD,OAAA,EAAA,6BAAA,QAAA,UAAA,KAAA,GAAA,OAAA,4BAAA,IAAoD;AAApD,YAAM,CAACE,KAAKC,KAAAA,IAAZ,MAAA,OACGC,WAAWP,OAAOQ,UAAUH,GAAAA;AAClCnC,eAAOqC,QAAAA,IAAYD;MACrB;;AAHK,0BAAA,IAAA,iBAAA;;;SAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;YAAA;gBAAA;;;EAIP;AACA,SAAOpC;AACT;AAGA,SAASC,eAAeZ,UAAkBT,OAAwB;AAChE,MAAMkB,QAAQ,IAAI1B,OAAOQ,MAAMP,UAAU,GACnC0D,QAAQjC,MAAMkC,KAAK3C,QAAAA;AACzB,SAAK0C,QACExD,OAAOgE,YACZhE,OAAO2D,QAAQtD,MAAM0D,SAAS,EAAE3D,IAAI,SAAA,OAAA;QAAC,CAACwD,KAAKC,KAAAA,IAAM,OAAaL;WAAR;MAACK;OAAOL,gBAAAA,MAAME,YAAM,QAAZF,kBAAAA,SAAAA,SAAAA,cAAeI,GAAAA;;QAF5D,CAAC;AAItB;",
|
5
|
+
"names": ["createHandleRequest", "options", "handlers", "manifest", "getManifest", "Error", "apiRoutesMap", "apiRoutes", "reduce", "acc", "cur", "page", "compiledRegex", "RegExp", "namedRegex", "apiRoutesList", "Object", "values", "activeRequests", "pageRoutes", "map", "route", "workingRegex", "handler", "request", "urlString", "url", "URL", "headers", "get", "pathname", "search", "process", "env", "NODE_ENV", "startsWith", "handleAPI", "apiRoute", "find", "regex", "test", "params", "getRouteParams", "loaderProps", "path", "err", "isResponse", "method", "handleLoader", "isClientRequestingNewRoute", "endsWith", "originalUrl", "getPathFromLoaderPath", "finalUrl", "origin", "file", "console", "info", "Headers", "set", "loaderResponse", "getLoaderParams", "Response", "error", "routes", "handleSSR", "promise", "reject", "resolve", "promiseWithResolvers", "ssrResponse", "config", "match", "exec", "groups", "entries", "key", "value", "namedKey", "routeKeys", "fromEntries"]
|
6
6
|
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all) __defProp(target, name, {
|
7
|
+
get: all[name],
|
8
|
+
enumerable: !0
|
9
|
+
});
|
10
|
+
},
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
13
|
+
get: () => from[key],
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
15
|
+
});
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
19
|
+
value: !0
|
20
|
+
}), mod);
|
21
|
+
var createRoute_exports = {};
|
22
|
+
__export(createRoute_exports, {
|
23
|
+
createRoute: () => createRoute,
|
24
|
+
route: () => route
|
25
|
+
});
|
26
|
+
module.exports = __toCommonJS(createRoute_exports);
|
27
|
+
var import_hooks = require("./hooks.cjs");
|
28
|
+
function createRoute() {
|
29
|
+
return {
|
30
|
+
useParams: () => (0, import_hooks.useParams)(),
|
31
|
+
useActiveParams: () => (0, import_hooks.useActiveParams)(),
|
32
|
+
createLoader: a => a
|
33
|
+
};
|
34
|
+
}
|
35
|
+
const defaults = createRoute(),
|
36
|
+
getProxy = () => new Proxy({}, {
|
37
|
+
get(target, key) {
|
38
|
+
return Reflect.has(defaults, key) ? Reflect.get(defaults, key) : getProxy();
|
39
|
+
}
|
40
|
+
}),
|
41
|
+
postIdRoute = createRoute(),
|
42
|
+
route = getProxy();
|
@@ -3,22 +3,29 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
5
|
var __export = (target, all) => {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
for (var name in all) __defProp(target, name, {
|
7
|
+
get: all[name],
|
8
|
+
enumerable: !0
|
9
|
+
});
|
10
|
+
},
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
13
|
+
get: () => from[key],
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
15
|
+
});
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
19
|
+
value: !0
|
20
|
+
}), mod);
|
15
21
|
var Sitemap_exports = {};
|
16
22
|
__export(Sitemap_exports, {
|
17
23
|
Sitemap: () => Sitemap,
|
18
24
|
getNavOptions: () => getNavOptions
|
19
25
|
});
|
20
26
|
module.exports = __toCommonJS(Sitemap_exports);
|
21
|
-
var import_react_native = require("react-native-web"),
|
27
|
+
var import_react_native = require("react-native-web"),
|
28
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
22
29
|
const INDENT = 24;
|
23
30
|
function getNavOptions() {
|
24
31
|
return {
|
@@ -42,7 +49,9 @@ function getNavOptions() {
|
|
42
49
|
};
|
43
50
|
}
|
44
51
|
function Sitemap() {
|
45
|
-
return /* @__PURE__ */
|
52
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Text, {
|
53
|
+
children: "sitemap!!!!!!!!!"
|
54
|
+
});
|
46
55
|
}
|
47
56
|
const styles = import_react_native.StyleSheet.create({
|
48
57
|
container: {
|
@@ -75,8 +84,18 @@ const styles = import_react_native.StyleSheet.create({
|
|
75
84
|
justifyContent: "space-between",
|
76
85
|
alignItems: "center"
|
77
86
|
},
|
78
|
-
filename: {
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
87
|
+
filename: {
|
88
|
+
color: "white",
|
89
|
+
fontSize: 20,
|
90
|
+
marginLeft: 12
|
91
|
+
},
|
92
|
+
virtual: {
|
93
|
+
textAlign: "right",
|
94
|
+
color: "white"
|
95
|
+
},
|
96
|
+
image: {
|
97
|
+
width: 24,
|
98
|
+
height: 24,
|
99
|
+
resizeMode: "contain"
|
100
|
+
}
|
101
|
+
});
|
@@ -2,32 +2,45 @@ var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __getProtoOf = Object.getPrototypeOf,
|
5
|
+
var __getProtoOf = Object.getPrototypeOf,
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
6
7
|
var __export = (target, all) => {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
for (var name in all) __defProp(target, name, {
|
9
|
+
get: all[name],
|
10
|
+
enumerable: !0
|
11
|
+
});
|
12
|
+
},
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
15
|
+
get: () => from[key],
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
17
|
+
});
|
18
|
+
return to;
|
19
|
+
};
|
15
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
16
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
17
22
|
// file that has been converted to a CommonJS file using a Babel-
|
18
23
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
19
24
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
21
|
-
|
22
|
-
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
26
|
+
value: mod,
|
27
|
+
enumerable: !0
|
28
|
+
}) : target, mod)),
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
30
|
+
value: !0
|
31
|
+
}), mod);
|
23
32
|
var Unmatched_exports = {};
|
24
33
|
__export(Unmatched_exports, {
|
25
34
|
Unmatched: () => Unmatched
|
26
35
|
});
|
27
36
|
module.exports = __toCommonJS(Unmatched_exports);
|
28
|
-
var import_react = __toESM(require("react"), 1),
|
37
|
+
var import_react = __toESM(require("react"), 1),
|
38
|
+
import_react_native = require("react-native-web"),
|
39
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
29
40
|
function Unmatched() {
|
30
|
-
return /* @__PURE__ */
|
41
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Text, {
|
42
|
+
children: "unmmatched!!!!!!!!!"
|
43
|
+
});
|
31
44
|
}
|
32
45
|
const styles = import_react_native.StyleSheet.create({
|
33
46
|
container: {
|
@@ -53,6 +66,8 @@ const styles = import_react_native.StyleSheet.create({
|
|
53
66
|
marginBottom: 12,
|
54
67
|
textAlign: "center"
|
55
68
|
},
|
56
|
-
link: {
|
57
|
-
|
58
|
-
|
69
|
+
link: {
|
70
|
+
color: "rgba(255,255,255,0.4)",
|
71
|
+
textAlign: "center"
|
72
|
+
}
|
73
|
+
});
|
@@ -0,0 +1,105 @@
|
|
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,
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all) __defProp(target, name, {
|
9
|
+
get: all[name],
|
10
|
+
enumerable: !0
|
11
|
+
});
|
12
|
+
},
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
15
|
+
get: () => from[key],
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
17
|
+
});
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
26
|
+
value: mod,
|
27
|
+
enumerable: !0
|
28
|
+
}) : target, mod)),
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
30
|
+
value: !0
|
31
|
+
}), mod);
|
32
|
+
var NavigationContainer_exports = {};
|
33
|
+
__export(NavigationContainer_exports, {
|
34
|
+
default: () => NavigationContainer_default
|
35
|
+
});
|
36
|
+
module.exports = __toCommonJS(NavigationContainer_exports);
|
37
|
+
var import_core = require("@react-navigation/core"),
|
38
|
+
import_native = require("@react-navigation/native"),
|
39
|
+
React = __toESM(require("react"), 1),
|
40
|
+
import_useLinking = __toESM(require("./useLinking.cjs"), 1),
|
41
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
42
|
+
global.REACT_NAVIGATION_DEVTOOLS = /* @__PURE__ */new WeakMap();
|
43
|
+
function NavigationContainerInner({
|
44
|
+
theme = import_native.DefaultTheme,
|
45
|
+
linking,
|
46
|
+
fallback = null,
|
47
|
+
documentTitle,
|
48
|
+
onReady,
|
49
|
+
...rest
|
50
|
+
}, ref) {
|
51
|
+
const isLinkingEnabled = linking ? linking.enabled !== !1 : !1;
|
52
|
+
linking?.config && (0, import_core.validatePathConfig)(linking.config);
|
53
|
+
const refContainer = React.useRef(null),
|
54
|
+
{
|
55
|
+
getInitialState
|
56
|
+
} = (0, import_useLinking.default)(refContainer, {
|
57
|
+
independent: rest.independent,
|
58
|
+
enabled: isLinkingEnabled,
|
59
|
+
prefixes: [],
|
60
|
+
...linking
|
61
|
+
});
|
62
|
+
if (React.useEffect(() => {
|
63
|
+
refContainer.current && REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, {
|
64
|
+
get linking() {
|
65
|
+
return {
|
66
|
+
...linking,
|
67
|
+
enabled: isLinkingEnabled,
|
68
|
+
prefixes: linking?.prefixes ?? [],
|
69
|
+
getStateFromPath: linking?.getStateFromPath ?? import_core.getStateFromPath,
|
70
|
+
getPathFromState: linking?.getPathFromState ?? import_core.getPathFromState,
|
71
|
+
getActionFromState: linking?.getActionFromState ?? import_core.getActionFromState
|
72
|
+
};
|
73
|
+
}
|
74
|
+
});
|
75
|
+
}), cache.val === 0 && (cache.promise = new Promise(res => {
|
76
|
+
getInitialState().then(val => {
|
77
|
+
cache.val = val, cache.done = !0, res();
|
78
|
+
});
|
79
|
+
})), !cache.done) throw cache.promise;
|
80
|
+
const initialState = cache.val;
|
81
|
+
React.useImperativeHandle(ref, () => refContainer.current);
|
82
|
+
const linkingContext = React.useMemo(() => ({
|
83
|
+
options: linking
|
84
|
+
}), [linking]);
|
85
|
+
return React.useEffect(() => {
|
86
|
+
onReady?.();
|
87
|
+
}, [onReady]), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.LinkingContext.Provider, {
|
88
|
+
value: linkingContext,
|
89
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.ThemeProvider, {
|
90
|
+
value: theme,
|
91
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.BaseNavigationContainer, {
|
92
|
+
...rest,
|
93
|
+
initialState: rest.initialState == null ? initialState : rest.initialState,
|
94
|
+
ref: refContainer
|
95
|
+
})
|
96
|
+
})
|
97
|
+
});
|
98
|
+
}
|
99
|
+
const cache = {
|
100
|
+
done: !1,
|
101
|
+
promise: null,
|
102
|
+
val: 0
|
103
|
+
},
|
104
|
+
NavigationContainer = React.forwardRef(NavigationContainerInner);
|
105
|
+
var NavigationContainer_default = NavigationContainer;
|
@@ -0,0 +1,103 @@
|
|
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,
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all) __defProp(target, name, {
|
9
|
+
get: all[name],
|
10
|
+
enumerable: !0
|
11
|
+
});
|
12
|
+
},
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
15
|
+
get: () => from[key],
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
17
|
+
});
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
26
|
+
value: mod,
|
27
|
+
enumerable: !0
|
28
|
+
}) : target, mod)),
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
30
|
+
value: !0
|
31
|
+
}), mod);
|
32
|
+
var NavigationContainer_native_exports = {};
|
33
|
+
__export(NavigationContainer_native_exports, {
|
34
|
+
default: () => NavigationContainer_native_default
|
35
|
+
});
|
36
|
+
module.exports = __toCommonJS(NavigationContainer_native_exports);
|
37
|
+
var import_core = require("@react-navigation/core"),
|
38
|
+
import_native = require("@react-navigation/native"),
|
39
|
+
import_useDocumentTitle_native = __toESM(require("@react-navigation/native/lib/module/useDocumentTitle.native.js"), 1),
|
40
|
+
import_useThenable = __toESM(require("@react-navigation/native/lib/module/useThenable.js"), 1),
|
41
|
+
React = __toESM(require("react"), 1),
|
42
|
+
import_useLinking = __toESM(require("./useLinking.cjs"), 1),
|
43
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
44
|
+
global.REACT_NAVIGATION_DEVTOOLS = /* @__PURE__ */new WeakMap();
|
45
|
+
function NavigationContainerInner({
|
46
|
+
theme = import_native.DefaultTheme,
|
47
|
+
linking,
|
48
|
+
fallback = null,
|
49
|
+
documentTitle,
|
50
|
+
onReady,
|
51
|
+
...rest
|
52
|
+
}, ref) {
|
53
|
+
const isLinkingEnabled = linking ? linking.enabled !== !1 : !1;
|
54
|
+
linking?.config && (0, import_core.validatePathConfig)(linking.config);
|
55
|
+
const refContainer = React.useRef(null);
|
56
|
+
(0, import_useDocumentTitle_native.default)(refContainer, documentTitle);
|
57
|
+
const {
|
58
|
+
getInitialState
|
59
|
+
} = (0, import_useLinking.default)(refContainer, {
|
60
|
+
// independent: rest.independent,
|
61
|
+
enabled: isLinkingEnabled,
|
62
|
+
prefixes: [],
|
63
|
+
...linking
|
64
|
+
});
|
65
|
+
React.useEffect(() => {
|
66
|
+
refContainer.current && global.REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, {
|
67
|
+
get linking() {
|
68
|
+
return {
|
69
|
+
...linking,
|
70
|
+
enabled: isLinkingEnabled,
|
71
|
+
prefixes: linking?.prefixes ?? [],
|
72
|
+
getStateFromPath: linking?.getStateFromPath ?? import_core.getStateFromPath,
|
73
|
+
getPathFromState: linking?.getPathFromState ?? import_core.getPathFromState,
|
74
|
+
getActionFromState: linking?.getActionFromState ?? import_core.getActionFromState
|
75
|
+
};
|
76
|
+
}
|
77
|
+
});
|
78
|
+
});
|
79
|
+
const [isResolved, initialState] = (0, import_useThenable.default)(getInitialState);
|
80
|
+
React.useImperativeHandle(ref, () => refContainer.current);
|
81
|
+
const linkingContext = React.useMemo(() => ({
|
82
|
+
options: linking
|
83
|
+
}), [linking]),
|
84
|
+
isReady = rest.initialState != null || !isLinkingEnabled || isResolved,
|
85
|
+
onReadyRef = React.useRef(onReady);
|
86
|
+
return React.useEffect(() => {
|
87
|
+
onReadyRef.current = onReady;
|
88
|
+
}), React.useEffect(() => {
|
89
|
+
isReady && onReadyRef.current?.();
|
90
|
+
}, [isReady]), isReady ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.LinkingContext.Provider, {
|
91
|
+
value: linkingContext,
|
92
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_native.ThemeProvider, {
|
93
|
+
value: theme,
|
94
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.BaseNavigationContainer, {
|
95
|
+
...rest,
|
96
|
+
initialState: rest.initialState == null ? initialState : rest.initialState,
|
97
|
+
ref: refContainer
|
98
|
+
})
|
99
|
+
})
|
100
|
+
}) : fallback;
|
101
|
+
}
|
102
|
+
const NavigationContainer = React.forwardRef(NavigationContainerInner);
|
103
|
+
var NavigationContainer_native_default = NavigationContainer;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/fork/NavigationContainer.native.tsx"],
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,kBASO,mCACP,gBAOO,qCAEP,iCAA6B,uFAC7B,qBAAwB,2EACxB,QAAuB,8BAEvB,oBAAuB,qCAuGf;AArGR,OAAO,4BAA4B,oBAAI,QAAQ;AAwB/C,SAAS,yBACP;AAAA,EACE,QAAQ;AAAA,EACR;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,mBAAmB,UAAU,QAAQ,YAAY,KAAQ;AAE/D,EAAI,SAAS,cACX,gCAAmB,QAAQ,MAAM;AAGnC,QAAM,eAAe,MAAM,OAA8C,IAAI;AAG7E,qCAAAA,SAAiB,cAAc,aAAa;AAE5C,QAAM,EAAE,gBAAgB,QAAI,kBAAAC,SAAW,cAAc;AAAA;AAAA,IAEnD,SAAS;AAAA,IACT,UAAU,CAAC;AAAA,IACX,GAAG;AAAA,EACL,CAAC;AAID,QAAM,UAAU,MAAM;AACpB,IAAI,aAAa,WACf,OAAO,0BAA0B,IAAI,aAAa,SAAS;AAAA,MACzD,IAAI,UAAU;AACZ,eAAO;AAAA,UACL,GAAG;AAAA,UACH,SAAS;AAAA,UACT,UAAU,SAAS,YAAY,CAAC;AAAA,UAChC,kBAAkB,SAAS,oBAAoB;AAAA,UAC/C,kBAAkB,SAAS,oBAAoB;AAAA,UAC/C,oBAAoB,SAAS,sBAAsB;AAAA,QACrD;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EAEL,CAAC;AAED,QAAM,CAAC,YAAY,YAAY,QAAI,mBAA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