vinext 0.0.50 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build/google-fonts/fallback-metrics-data.js +14031 -0
- package/dist/build/google-fonts/fallback-metrics-data.js.map +1 -0
- package/dist/build/google-fonts/fallback-metrics.d.ts +13 -0
- package/dist/build/google-fonts/fallback-metrics.js +46 -0
- package/dist/build/google-fonts/fallback-metrics.js.map +1 -0
- package/dist/build/precompress.d.ts +13 -2
- package/dist/build/precompress.js +23 -13
- package/dist/build/precompress.js.map +1 -1
- package/dist/build/prerender.d.ts +4 -15
- package/dist/build/prerender.js +83 -53
- package/dist/build/prerender.js.map +1 -1
- package/dist/build/report.d.ts +5 -4
- package/dist/build/report.js +196 -348
- package/dist/build/report.js.map +1 -1
- package/dist/check.js +5 -0
- package/dist/check.js.map +1 -1
- package/dist/cli-args.d.ts +1 -0
- package/dist/cli-args.js +5 -0
- package/dist/cli-args.js.map +1 -1
- package/dist/cli.js +99 -3
- package/dist/cli.js.map +1 -1
- package/dist/client/navigation-runtime.d.ts +47 -0
- package/dist/client/navigation-runtime.js +156 -0
- package/dist/client/navigation-runtime.js.map +1 -0
- package/dist/client/pages-router-link-navigation.d.ts +26 -0
- package/dist/client/pages-router-link-navigation.js +14 -0
- package/dist/client/pages-router-link-navigation.js.map +1 -0
- package/dist/client/vinext-next-data.d.ts +12 -2
- package/dist/client/vinext-next-data.js +50 -1
- package/dist/client/vinext-next-data.js.map +1 -0
- package/dist/client/window-next.d.ts +3 -1
- package/dist/client/window-next.js.map +1 -1
- package/dist/cloudflare/kv-cache-handler.js +2 -1
- package/dist/cloudflare/kv-cache-handler.js.map +1 -1
- package/dist/config/config-matchers.d.ts +63 -16
- package/dist/config/config-matchers.js +143 -8
- package/dist/config/config-matchers.js.map +1 -1
- package/dist/config/dotenv.d.ts +11 -1
- package/dist/config/dotenv.js.map +1 -1
- package/dist/config/next-config.d.ts +107 -5
- package/dist/config/next-config.js +233 -7
- package/dist/config/next-config.js.map +1 -1
- package/dist/config/tsconfig-paths.d.ts +13 -0
- package/dist/config/tsconfig-paths.js +117 -0
- package/dist/config/tsconfig-paths.js.map +1 -0
- package/dist/deploy.js +104 -41
- package/dist/deploy.js.map +1 -1
- package/dist/entries/app-browser-entry.d.ts +2 -2
- package/dist/entries/app-browser-entry.js +34 -3
- package/dist/entries/app-browser-entry.js.map +1 -1
- package/dist/entries/app-rsc-entry.d.ts +19 -1
- package/dist/entries/app-rsc-entry.js +89 -23
- package/dist/entries/app-rsc-entry.js.map +1 -1
- package/dist/entries/app-rsc-manifest.d.ts +10 -0
- package/dist/entries/app-rsc-manifest.js +57 -7
- package/dist/entries/app-rsc-manifest.js.map +1 -1
- package/dist/entries/app-ssr-entry.d.ts +3 -3
- package/dist/entries/app-ssr-entry.js +4 -4
- package/dist/entries/app-ssr-entry.js.map +1 -1
- package/dist/entries/pages-client-entry.js +21 -7
- package/dist/entries/pages-client-entry.js.map +1 -1
- package/dist/entries/pages-server-entry.js +77 -9
- package/dist/entries/pages-server-entry.js.map +1 -1
- package/dist/entries/runtime-entry-module.d.ts +2 -1
- package/dist/entries/runtime-entry-module.js +9 -3
- package/dist/entries/runtime-entry-module.js.map +1 -1
- package/dist/index.js +260 -75
- package/dist/index.js.map +1 -1
- package/dist/plugins/client-reference-dedup.d.ts +15 -2
- package/dist/plugins/client-reference-dedup.js +138 -16
- package/dist/plugins/client-reference-dedup.js.map +1 -1
- package/dist/plugins/css-data-url.d.ts +7 -0
- package/dist/plugins/css-data-url.js +81 -0
- package/dist/plugins/css-data-url.js.map +1 -0
- package/dist/plugins/fonts.d.ts +2 -2
- package/dist/plugins/fonts.js +20 -9
- package/dist/plugins/fonts.js.map +1 -1
- package/dist/plugins/middleware-server-only.d.ts +54 -0
- package/dist/plugins/middleware-server-only.js +91 -0
- package/dist/plugins/middleware-server-only.js.map +1 -0
- package/dist/plugins/optimize-imports.js +4 -4
- package/dist/plugins/optimize-imports.js.map +1 -1
- package/dist/plugins/sass.d.ts +34 -0
- package/dist/plugins/sass.js +22 -0
- package/dist/plugins/sass.js.map +1 -0
- package/dist/plugins/strip-server-exports.js +5 -8
- package/dist/plugins/strip-server-exports.js.map +1 -1
- package/dist/routing/app-route-graph.d.ts +50 -2
- package/dist/routing/app-route-graph.js +140 -16
- package/dist/routing/app-route-graph.js.map +1 -1
- package/dist/routing/app-router.d.ts +2 -2
- package/dist/routing/app-router.js +2 -2
- package/dist/routing/app-router.js.map +1 -1
- package/dist/routing/route-pattern.d.ts +56 -1
- package/dist/routing/route-pattern.js +60 -1
- package/dist/routing/route-pattern.js.map +1 -1
- package/dist/routing/utils.d.ts +2 -1
- package/dist/routing/utils.js +4 -1
- package/dist/routing/utils.js.map +1 -1
- package/dist/server/api-handler.js +139 -37
- package/dist/server/api-handler.js.map +1 -1
- package/dist/server/app-browser-action-result.d.ts +27 -2
- package/dist/server/app-browser-action-result.js +63 -2
- package/dist/server/app-browser-action-result.js.map +1 -1
- package/dist/server/app-browser-entry.js +493 -195
- package/dist/server/app-browser-entry.js.map +1 -1
- package/dist/server/app-browser-hydration.d.ts +13 -1
- package/dist/server/app-browser-hydration.js +9 -1
- package/dist/server/app-browser-hydration.js.map +1 -1
- package/dist/server/app-browser-interception-context.d.ts +24 -0
- package/dist/server/app-browser-interception-context.js +32 -0
- package/dist/server/app-browser-interception-context.js.map +1 -0
- package/dist/server/app-browser-navigation-controller.d.ts +17 -2
- package/dist/server/app-browser-navigation-controller.js +33 -10
- package/dist/server/app-browser-navigation-controller.js.map +1 -1
- package/dist/server/app-browser-popstate.d.ts +16 -0
- package/dist/server/app-browser-popstate.js +17 -0
- package/dist/server/app-browser-popstate.js.map +1 -0
- package/dist/server/app-browser-rsc-redirect.d.ts +29 -0
- package/dist/server/app-browser-rsc-redirect.js +37 -0
- package/dist/server/app-browser-rsc-redirect.js.map +1 -0
- package/dist/server/app-browser-state.d.ts +28 -7
- package/dist/server/app-browser-state.js +63 -27
- package/dist/server/app-browser-state.js.map +1 -1
- package/dist/server/app-browser-stream.d.ts +9 -17
- package/dist/server/app-browser-stream.js +18 -13
- package/dist/server/app-browser-stream.js.map +1 -1
- package/dist/server/app-browser-visible-commit.d.ts +7 -1
- package/dist/server/app-browser-visible-commit.js +39 -5
- package/dist/server/app-browser-visible-commit.js.map +1 -1
- package/dist/server/app-elements-wire.d.ts +43 -6
- package/dist/server/app-elements-wire.js +189 -7
- package/dist/server/app-elements-wire.js.map +1 -1
- package/dist/server/app-elements.d.ts +3 -2
- package/dist/server/app-elements.js +3 -2
- package/dist/server/app-elements.js.map +1 -1
- package/dist/server/app-fallback-renderer.d.ts +10 -1
- package/dist/server/app-fallback-renderer.js +41 -3
- package/dist/server/app-fallback-renderer.js.map +1 -1
- package/dist/server/app-history-state.d.ts +26 -0
- package/dist/server/app-history-state.js +53 -0
- package/dist/server/app-history-state.js.map +1 -0
- package/dist/server/app-middleware.d.ts +13 -0
- package/dist/server/app-middleware.js +3 -1
- package/dist/server/app-middleware.js.map +1 -1
- package/dist/server/app-optimistic-routing.d.ts +54 -0
- package/dist/server/app-optimistic-routing.js +200 -0
- package/dist/server/app-optimistic-routing.js.map +1 -0
- package/dist/server/app-page-boundary-render.d.ts +10 -1
- package/dist/server/app-page-boundary-render.js +13 -6
- package/dist/server/app-page-boundary-render.js.map +1 -1
- package/dist/server/app-page-boundary.js +3 -2
- package/dist/server/app-page-boundary.js.map +1 -1
- package/dist/server/app-page-cache.d.ts +26 -1
- package/dist/server/app-page-cache.js +86 -14
- package/dist/server/app-page-cache.js.map +1 -1
- package/dist/server/app-page-dispatch.d.ts +7 -0
- package/dist/server/app-page-dispatch.js +96 -12
- package/dist/server/app-page-dispatch.js.map +1 -1
- package/dist/server/app-page-element-builder.d.ts +7 -0
- package/dist/server/app-page-element-builder.js +34 -5
- package/dist/server/app-page-element-builder.js.map +1 -1
- package/dist/server/app-page-execution.d.ts +28 -1
- package/dist/server/app-page-execution.js +91 -7
- package/dist/server/app-page-execution.js.map +1 -1
- package/dist/server/app-page-head.d.ts +7 -0
- package/dist/server/app-page-head.js +23 -3
- package/dist/server/app-page-head.js.map +1 -1
- package/dist/server/app-page-probe.d.ts +23 -1
- package/dist/server/app-page-probe.js +29 -1
- package/dist/server/app-page-probe.js.map +1 -1
- package/dist/server/app-page-render-observation.d.ts +35 -0
- package/dist/server/app-page-render-observation.js +68 -0
- package/dist/server/app-page-render-observation.js.map +1 -0
- package/dist/server/app-page-render.d.ts +7 -1
- package/dist/server/app-page-render.js +81 -4
- package/dist/server/app-page-render.js.map +1 -1
- package/dist/server/app-page-request.d.ts +1 -0
- package/dist/server/app-page-request.js.map +1 -1
- package/dist/server/app-page-response.js +7 -5
- package/dist/server/app-page-response.js.map +1 -1
- package/dist/server/app-page-route-wiring.d.ts +3 -1
- package/dist/server/app-page-route-wiring.js +59 -24
- package/dist/server/app-page-route-wiring.js.map +1 -1
- package/dist/server/app-page-stream.d.ts +5 -0
- package/dist/server/app-page-stream.js +2 -0
- package/dist/server/app-page-stream.js.map +1 -1
- package/dist/server/app-prerender-static-params.d.ts +2 -1
- package/dist/server/app-prerender-static-params.js +44 -8
- package/dist/server/app-prerender-static-params.js.map +1 -1
- package/dist/server/app-route-handler-cache.d.ts +2 -2
- package/dist/server/app-route-handler-cache.js +3 -2
- package/dist/server/app-route-handler-cache.js.map +1 -1
- package/dist/server/app-route-handler-dispatch.d.ts +6 -1
- package/dist/server/app-route-handler-dispatch.js +1 -1
- package/dist/server/app-route-handler-dispatch.js.map +1 -1
- package/dist/server/app-route-handler-execution.d.ts +17 -2
- package/dist/server/app-route-handler-execution.js.map +1 -1
- package/dist/server/app-route-handler-response.js +5 -4
- package/dist/server/app-route-handler-response.js.map +1 -1
- package/dist/server/app-router-entry.js +7 -15
- package/dist/server/app-router-entry.js.map +1 -1
- package/dist/server/app-rsc-cache-busting.d.ts +19 -1
- package/dist/server/app-rsc-cache-busting.js +36 -1
- package/dist/server/app-rsc-cache-busting.js.map +1 -1
- package/dist/server/app-rsc-embedded-chunks.d.ts +9 -0
- package/dist/server/app-rsc-embedded-chunks.js +34 -0
- package/dist/server/app-rsc-embedded-chunks.js.map +1 -0
- package/dist/server/app-rsc-errors.d.ts +4 -1
- package/dist/server/app-rsc-errors.js +1 -1
- package/dist/server/app-rsc-errors.js.map +1 -1
- package/dist/server/app-rsc-handler.d.ts +21 -5
- package/dist/server/app-rsc-handler.js +38 -15
- package/dist/server/app-rsc-handler.js.map +1 -1
- package/dist/server/app-rsc-render-mode.d.ts +4 -3
- package/dist/server/app-rsc-render-mode.js +7 -1
- package/dist/server/app-rsc-render-mode.js.map +1 -1
- package/dist/server/app-rsc-request-normalization.d.ts +4 -1
- package/dist/server/app-rsc-request-normalization.js +4 -1
- package/dist/server/app-rsc-request-normalization.js.map +1 -1
- package/dist/server/app-rsc-response-finalizer.d.ts +8 -1
- package/dist/server/app-rsc-response-finalizer.js +10 -3
- package/dist/server/app-rsc-response-finalizer.js.map +1 -1
- package/dist/server/app-rsc-route-matching.d.ts +23 -0
- package/dist/server/app-rsc-route-matching.js +47 -25
- package/dist/server/app-rsc-route-matching.js.map +1 -1
- package/dist/server/app-server-action-execution.d.ts +35 -3
- package/dist/server/app-server-action-execution.js +87 -33
- package/dist/server/app-server-action-execution.js.map +1 -1
- package/dist/server/app-ssr-entry.d.ts +3 -0
- package/dist/server/app-ssr-entry.js +83 -58
- package/dist/server/app-ssr-entry.js.map +1 -1
- package/dist/server/app-ssr-error-meta.d.ts +14 -0
- package/dist/server/app-ssr-error-meta.js +50 -0
- package/dist/server/app-ssr-error-meta.js.map +1 -0
- package/dist/server/app-ssr-stream.d.ts +7 -2
- package/dist/server/app-ssr-stream.js +26 -15
- package/dist/server/app-ssr-stream.js.map +1 -1
- package/dist/server/artifact-compatibility.d.ts +13 -3
- package/dist/server/artifact-compatibility.js +12 -8
- package/dist/server/artifact-compatibility.js.map +1 -1
- package/dist/server/cache-headers.d.ts +7 -0
- package/dist/server/cache-headers.js +19 -0
- package/dist/server/cache-headers.js.map +1 -0
- package/dist/server/cache-proof.d.ts +170 -5
- package/dist/server/cache-proof.js +472 -18
- package/dist/server/cache-proof.js.map +1 -1
- package/dist/server/client-reuse-manifest.d.ts +99 -0
- package/dist/server/client-reuse-manifest.js +212 -0
- package/dist/server/client-reuse-manifest.js.map +1 -0
- package/dist/server/default-global-error-module.d.ts +20 -0
- package/dist/server/default-global-error-module.js +20 -0
- package/dist/server/default-global-error-module.js.map +1 -0
- package/dist/server/dev-lockfile.d.ts +110 -0
- package/dist/server/dev-lockfile.js +180 -0
- package/dist/server/dev-lockfile.js.map +1 -0
- package/dist/server/dev-server.d.ts +9 -1
- package/dist/server/dev-server.js +76 -19
- package/dist/server/dev-server.js.map +1 -1
- package/dist/server/edge-api-runtime.d.ts +5 -0
- package/dist/server/edge-api-runtime.js +8 -0
- package/dist/server/edge-api-runtime.js.map +1 -0
- package/dist/server/file-based-metadata.d.ts +13 -0
- package/dist/server/file-based-metadata.js +49 -2
- package/dist/server/file-based-metadata.js.map +1 -1
- package/dist/server/headers.d.ts +20 -1
- package/dist/server/headers.js +22 -2
- package/dist/server/headers.js.map +1 -1
- package/dist/server/html.js +1 -1
- package/dist/server/html.js.map +1 -1
- package/dist/server/http-error-responses.d.ts +26 -1
- package/dist/server/http-error-responses.js +32 -2
- package/dist/server/http-error-responses.js.map +1 -1
- package/dist/server/isr-cache.d.ts +8 -3
- package/dist/server/isr-cache.js +24 -6
- package/dist/server/isr-cache.js.map +1 -1
- package/dist/server/metadata-route-response.js +22 -5
- package/dist/server/metadata-route-response.js.map +1 -1
- package/dist/server/metadata-routes.js +27 -8
- package/dist/server/metadata-routes.js.map +1 -1
- package/dist/server/middleware-runtime.d.ts +15 -0
- package/dist/server/middleware-runtime.js +60 -7
- package/dist/server/middleware-runtime.js.map +1 -1
- package/dist/server/middleware.d.ts +13 -1
- package/dist/server/middleware.js +16 -2
- package/dist/server/middleware.js.map +1 -1
- package/dist/server/navigation-planner.d.ts +26 -6
- package/dist/server/navigation-planner.js +358 -24
- package/dist/server/navigation-planner.js.map +1 -1
- package/dist/server/navigation-trace.d.ts +9 -1
- package/dist/server/navigation-trace.js +8 -0
- package/dist/server/navigation-trace.js.map +1 -1
- package/dist/server/normalize-path.d.ts +2 -1
- package/dist/server/normalize-path.js +4 -1
- package/dist/server/normalize-path.js.map +1 -1
- package/dist/server/pages-api-route.d.ts +27 -1
- package/dist/server/pages-api-route.js +25 -3
- package/dist/server/pages-api-route.js.map +1 -1
- package/dist/server/pages-data-route.d.ts +77 -0
- package/dist/server/pages-data-route.js +97 -0
- package/dist/server/pages-data-route.js.map +1 -0
- package/dist/server/pages-i18n.d.ts +51 -1
- package/dist/server/pages-i18n.js +61 -1
- package/dist/server/pages-i18n.js.map +1 -1
- package/dist/server/pages-page-data.d.ts +32 -4
- package/dist/server/pages-page-data.js +52 -19
- package/dist/server/pages-page-data.js.map +1 -1
- package/dist/server/pages-page-response.d.ts +11 -1
- package/dist/server/pages-page-response.js +6 -4
- package/dist/server/pages-page-response.js.map +1 -1
- package/dist/server/prod-server.d.ts +26 -1
- package/dist/server/prod-server.js +150 -44
- package/dist/server/prod-server.js.map +1 -1
- package/dist/server/request-pipeline.d.ts +11 -2
- package/dist/server/request-pipeline.js +28 -11
- package/dist/server/request-pipeline.js.map +1 -1
- package/dist/server/seed-cache.d.ts +12 -31
- package/dist/server/seed-cache.js +22 -35
- package/dist/server/seed-cache.js.map +1 -1
- package/dist/server/server-action-not-found.d.ts +16 -3
- package/dist/server/server-action-not-found.js +27 -4
- package/dist/server/server-action-not-found.js.map +1 -1
- package/dist/server/server-globals.d.ts +5 -0
- package/dist/server/server-globals.js +37 -0
- package/dist/server/server-globals.js.map +1 -0
- package/dist/server/skip-cache-proof.d.ts +41 -0
- package/dist/server/skip-cache-proof.js +101 -0
- package/dist/server/skip-cache-proof.js.map +1 -0
- package/dist/server/static-file-cache.d.ts +1 -1
- package/dist/server/static-file-cache.js +7 -6
- package/dist/server/static-file-cache.js.map +1 -1
- package/dist/shims/cache-runtime.d.ts +19 -2
- package/dist/shims/cache-runtime.js +67 -11
- package/dist/shims/cache-runtime.js.map +1 -1
- package/dist/shims/cache.d.ts +5 -18
- package/dist/shims/cache.js +2 -0
- package/dist/shims/cache.js.map +1 -1
- package/dist/shims/client-locale.d.ts +15 -0
- package/dist/shims/client-locale.js +13 -0
- package/dist/shims/client-locale.js.map +1 -0
- package/dist/shims/default-global-error.d.ts +32 -0
- package/dist/shims/default-global-error.js +181 -0
- package/dist/shims/default-global-error.js.map +1 -0
- package/dist/shims/document.d.ts +59 -3
- package/dist/shims/document.js +36 -5
- package/dist/shims/document.js.map +1 -1
- package/dist/shims/error-boundary.d.ts +2 -2
- package/dist/shims/error-boundary.js +6 -8
- package/dist/shims/error-boundary.js.map +1 -1
- package/dist/shims/error.d.ts +18 -1
- package/dist/shims/error.js +56 -1
- package/dist/shims/error.js.map +1 -1
- package/dist/shims/fetch-cache.d.ts +4 -1
- package/dist/shims/fetch-cache.js +40 -5
- package/dist/shims/fetch-cache.js.map +1 -1
- package/dist/shims/font-google-base.d.ts +22 -8
- package/dist/shims/font-google-base.js +41 -71
- package/dist/shims/font-google-base.js.map +1 -1
- package/dist/shims/font-local.d.ts +3 -20
- package/dist/shims/font-local.js +23 -75
- package/dist/shims/font-local.js.map +1 -1
- package/dist/shims/font-utils.d.ts +51 -0
- package/dist/shims/font-utils.js +97 -0
- package/dist/shims/font-utils.js.map +1 -0
- package/dist/shims/form.js +13 -6
- package/dist/shims/form.js.map +1 -1
- package/dist/shims/hash-scroll.d.ts +7 -0
- package/dist/shims/hash-scroll.js +30 -0
- package/dist/shims/hash-scroll.js.map +1 -0
- package/dist/shims/headers.d.ts +8 -11
- package/dist/shims/headers.js +22 -2
- package/dist/shims/headers.js.map +1 -1
- package/dist/shims/image.d.ts +1 -0
- package/dist/shims/image.js +144 -78
- package/dist/shims/image.js.map +1 -1
- package/dist/shims/internal/app-router-context.d.ts +6 -6
- package/dist/shims/internal/app-router-context.js +17 -6
- package/dist/shims/internal/app-router-context.js.map +1 -1
- package/dist/shims/link-prefetch.d.ts +9 -1
- package/dist/shims/link-prefetch.js +11 -6
- package/dist/shims/link-prefetch.js.map +1 -1
- package/dist/shims/link.d.ts +33 -5
- package/dist/shims/link.js +205 -50
- package/dist/shims/link.js.map +1 -1
- package/dist/shims/metadata.d.ts +16 -30
- package/dist/shims/metadata.js +91 -32
- package/dist/shims/metadata.js.map +1 -1
- package/dist/shims/navigation.d.ts +164 -17
- package/dist/shims/navigation.js +355 -84
- package/dist/shims/navigation.js.map +1 -1
- package/dist/shims/navigation.react-server.d.ts +3 -2
- package/dist/shims/navigation.react-server.js +5 -2
- package/dist/shims/navigation.react-server.js.map +1 -1
- package/dist/shims/og.d.ts +18 -2
- package/dist/shims/og.js +49 -1
- package/dist/shims/og.js.map +1 -0
- package/dist/shims/pages-router-runtime.d.ts +7 -0
- package/dist/shims/pages-router-runtime.js +16 -0
- package/dist/shims/pages-router-runtime.js.map +1 -0
- package/dist/shims/request-state-types.d.ts +1 -1
- package/dist/shims/root-params.d.ts +3 -1
- package/dist/shims/root-params.js +11 -3
- package/dist/shims/root-params.js.map +1 -1
- package/dist/shims/router-state.d.ts +1 -0
- package/dist/shims/router-state.js.map +1 -1
- package/dist/shims/router.d.ts +40 -7
- package/dist/shims/router.js +355 -250
- package/dist/shims/router.js.map +1 -1
- package/dist/shims/script.js +110 -32
- package/dist/shims/script.js.map +1 -1
- package/dist/shims/server.d.ts +21 -4
- package/dist/shims/server.js +31 -10
- package/dist/shims/server.js.map +1 -1
- package/dist/shims/slot.d.ts +1 -0
- package/dist/shims/slot.js +45 -1
- package/dist/shims/slot.js.map +1 -1
- package/dist/shims/unified-request-context.d.ts +1 -1
- package/dist/shims/unified-request-context.js +2 -0
- package/dist/shims/unified-request-context.js.map +1 -1
- package/dist/shims/unrecognized-action-error.d.ts +35 -0
- package/dist/shims/unrecognized-action-error.js +41 -0
- package/dist/shims/unrecognized-action-error.js.map +1 -0
- package/dist/shims/url-safety.d.ts +23 -1
- package/dist/shims/url-safety.js +29 -2
- package/dist/shims/url-safety.js.map +1 -1
- package/dist/shims/url-utils.d.ts +21 -1
- package/dist/shims/url-utils.js +67 -3
- package/dist/shims/url-utils.js.map +1 -1
- package/dist/typegen.d.ts +10 -0
- package/dist/typegen.js +242 -0
- package/dist/typegen.js.map +1 -0
- package/dist/utils/asset-prefix.d.ts +97 -0
- package/dist/utils/asset-prefix.js +124 -0
- package/dist/utils/asset-prefix.js.map +1 -0
- package/dist/utils/base-path.d.ts +7 -1
- package/dist/utils/base-path.js +10 -1
- package/dist/utils/base-path.js.map +1 -1
- package/dist/utils/cache-control-metadata.d.ts +2 -1
- package/dist/utils/cache-control-metadata.js +1 -3
- package/dist/utils/cache-control-metadata.js.map +1 -1
- package/dist/utils/domain-locale.d.ts +2 -1
- package/dist/utils/domain-locale.js +9 -1
- package/dist/utils/domain-locale.js.map +1 -1
- package/dist/utils/lazy-chunks.d.ts +1 -1
- package/dist/utils/lazy-chunks.js +1 -1
- package/dist/utils/lazy-chunks.js.map +1 -1
- package/dist/utils/navigation-signal.d.ts +1 -2
- package/dist/utils/navigation-signal.js +1 -1
- package/dist/utils/navigation-signal.js.map +1 -1
- package/dist/utils/prerender-output-paths.d.ts +15 -0
- package/dist/utils/prerender-output-paths.js +24 -0
- package/dist/utils/prerender-output-paths.js.map +1 -0
- package/dist/utils/query.d.ts +17 -1
- package/dist/utils/query.js +36 -1
- package/dist/utils/query.js.map +1 -1
- package/dist/utils/record.d.ts +5 -0
- package/dist/utils/record.js +8 -0
- package/dist/utils/record.js.map +1 -0
- package/dist/utils/sorted-array.d.ts +9 -0
- package/dist/utils/sorted-array.js +22 -0
- package/dist/utils/sorted-array.js.map +1 -0
- package/package.json +13 -5
package/dist/shims/navigation.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { stripBasePath } from "../utils/base-path.js";
|
|
2
2
|
import { VINEXT_MOUNTED_SLOTS_HEADER, VINEXT_PARAMS_HEADER } from "../server/headers.js";
|
|
3
3
|
import { assertSafeNavigationUrl } from "./url-safety.js";
|
|
4
|
-
import { isHashOnlyBrowserUrlChange, toBrowserNavigationHref, toSameOriginAppPath } from "./url-utils.js";
|
|
4
|
+
import { isAbsoluteOrProtocolRelativeUrl, isHashOnlyBrowserUrlChange, toBrowserNavigationHref, toSameOriginAppPath } from "./url-utils.js";
|
|
5
|
+
import { scrollToHashTarget } from "./hash-scroll.js";
|
|
6
|
+
import { getNavigationRuntime, hasAppNavigationRuntime } from "../client/navigation-runtime.js";
|
|
5
7
|
import { notifyAppRouterTransitionStart } from "../client/instrumentation-client-state.js";
|
|
6
8
|
import { AppElementsWire } from "../server/app-elements-wire.js";
|
|
7
9
|
import "../server/app-elements.js";
|
|
8
|
-
import {
|
|
10
|
+
import { resolveManifestNavigationInterceptionContext } from "../server/app-browser-interception-context.js";
|
|
11
|
+
import { createExternalHistoryStatePreservingMetadata } from "../server/app-history-state.js";
|
|
12
|
+
import { VINEXT_RSC_COMPATIBILITY_ID_HEADER, createRscRequestHeaders, createRscRequestUrl } from "../server/app-rsc-cache-busting.js";
|
|
9
13
|
import { ReadonlyURLSearchParams } from "./readonly-url-search-params.js";
|
|
14
|
+
import { AppRouterContext } from "./internal/app-router-context.js";
|
|
15
|
+
import { UnrecognizedActionError, unstable_isUnrecognizedActionError } from "./unrecognized-action-error.js";
|
|
10
16
|
import * as React$1 from "react";
|
|
11
17
|
//#region src/shims/navigation.ts
|
|
12
18
|
/**
|
|
@@ -103,6 +109,16 @@ function _registerStateAccessors(accessors) {
|
|
|
103
109
|
_getInsertedHTMLCallbacks = accessors.getInsertedHTMLCallbacks;
|
|
104
110
|
_clearInsertedHTMLCallbacks = accessors.clearInsertedHTMLCallbacks;
|
|
105
111
|
}
|
|
112
|
+
const PAGES_NAVIGATION_ACCESSOR_KEY = Symbol.for("vinext.navigation.pagesNavigationContextAccessor");
|
|
113
|
+
function _getPagesNavigationContext() {
|
|
114
|
+
const accessor = globalThis[PAGES_NAVIGATION_ACCESSOR_KEY];
|
|
115
|
+
if (!accessor) return null;
|
|
116
|
+
try {
|
|
117
|
+
return accessor();
|
|
118
|
+
} catch {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
106
122
|
/**
|
|
107
123
|
* Get the navigation context for the current SSR/RSC render.
|
|
108
124
|
* Reads from AsyncLocalStorage when available (concurrent-safe),
|
|
@@ -129,6 +145,21 @@ function getCurrentInterceptionContext() {
|
|
|
129
145
|
if (isServer) return null;
|
|
130
146
|
return stripBasePath(window.location.pathname, __basePath);
|
|
131
147
|
}
|
|
148
|
+
function getPrefetchInterceptionContext(targetHref) {
|
|
149
|
+
if (isServer) return null;
|
|
150
|
+
let targetUrl;
|
|
151
|
+
try {
|
|
152
|
+
targetUrl = new URL(targetHref, window.location.href);
|
|
153
|
+
} catch {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
return resolveManifestNavigationInterceptionContext({
|
|
157
|
+
basePath: __basePath,
|
|
158
|
+
currentPathname: window.location.pathname,
|
|
159
|
+
routeManifest: getNavigationRuntime()?.bootstrap.routeManifest ?? null,
|
|
160
|
+
targetPathname: targetUrl.pathname
|
|
161
|
+
});
|
|
162
|
+
}
|
|
132
163
|
function getCurrentNextUrl() {
|
|
133
164
|
if (isServer) return "/";
|
|
134
165
|
return window.location.pathname + window.location.search;
|
|
@@ -157,18 +188,80 @@ function evictPrefetchCacheIfNeeded() {
|
|
|
157
188
|
if (cache.size < 50) return;
|
|
158
189
|
const now = Date.now();
|
|
159
190
|
const prefetched = getPrefetchedUrls();
|
|
160
|
-
for (const [key, entry] of cache) if (now - entry.timestamp >= 3e4)
|
|
161
|
-
cache.delete(key);
|
|
162
|
-
prefetched.delete(key);
|
|
163
|
-
}
|
|
191
|
+
for (const [key, entry] of cache) if (now - entry.timestamp >= 3e4) deletePrefetchCacheEntry(cache, prefetched, key, entry, true);
|
|
164
192
|
while (cache.size >= 50) {
|
|
165
193
|
const oldest = cache.keys().next().value;
|
|
166
194
|
if (oldest !== void 0) {
|
|
167
|
-
cache.
|
|
168
|
-
prefetched
|
|
195
|
+
const entry = cache.get(oldest);
|
|
196
|
+
if (entry) deletePrefetchCacheEntry(cache, prefetched, oldest, entry, true);
|
|
197
|
+
else {
|
|
198
|
+
cache.delete(oldest);
|
|
199
|
+
prefetched.delete(oldest);
|
|
200
|
+
}
|
|
169
201
|
} else break;
|
|
170
202
|
}
|
|
171
203
|
}
|
|
204
|
+
function clearPrefetchInvalidation(entry) {
|
|
205
|
+
if (entry.invalidationTimer !== void 0) {
|
|
206
|
+
clearTimeout(entry.invalidationTimer);
|
|
207
|
+
entry.invalidationTimer = void 0;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function notifyPrefetchInvalidated(entry) {
|
|
211
|
+
clearPrefetchInvalidation(entry);
|
|
212
|
+
const callbacks = entry.onInvalidateCallbacks;
|
|
213
|
+
entry.onInvalidateCallbacks = void 0;
|
|
214
|
+
if (callbacks === void 0) return;
|
|
215
|
+
for (const onInvalidate of callbacks) try {
|
|
216
|
+
onInvalidate();
|
|
217
|
+
} catch (error) {
|
|
218
|
+
if (typeof reportError === "function") reportError(error);
|
|
219
|
+
else console.error(error);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function deletePrefetchCacheEntry(cache, prefetched, cacheKey, entry, notify) {
|
|
223
|
+
cache.delete(cacheKey);
|
|
224
|
+
prefetched.delete(cacheKey);
|
|
225
|
+
if (notify) notifyPrefetchInvalidated(entry);
|
|
226
|
+
else {
|
|
227
|
+
clearPrefetchInvalidation(entry);
|
|
228
|
+
entry.onInvalidateCallbacks = void 0;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
function invalidatePrefetchCacheEntry(cacheKey) {
|
|
232
|
+
const cache = getPrefetchCache();
|
|
233
|
+
const entry = cache.get(cacheKey);
|
|
234
|
+
if (!entry) return;
|
|
235
|
+
deletePrefetchCacheEntry(cache, getPrefetchedUrls(), cacheKey, entry, true);
|
|
236
|
+
}
|
|
237
|
+
function schedulePrefetchInvalidation(cacheKey, entry) {
|
|
238
|
+
if (entry.onInvalidateCallbacks === void 0 || entry.onInvalidateCallbacks.size === 0) return;
|
|
239
|
+
clearPrefetchInvalidation(entry);
|
|
240
|
+
const elapsed = Date.now() - entry.timestamp;
|
|
241
|
+
const delay = Math.max(0, PREFETCH_CACHE_TTL - elapsed);
|
|
242
|
+
entry.invalidationTimer = setTimeout(() => {
|
|
243
|
+
invalidatePrefetchCacheEntry(cacheKey);
|
|
244
|
+
}, delay);
|
|
245
|
+
}
|
|
246
|
+
function addPrefetchInvalidationCallback(entry, onInvalidate) {
|
|
247
|
+
if (onInvalidate === void 0) return;
|
|
248
|
+
if (entry.onInvalidateCallbacks === void 0) entry.onInvalidateCallbacks = /* @__PURE__ */ new Set();
|
|
249
|
+
entry.onInvalidateCallbacks.add(onInvalidate);
|
|
250
|
+
}
|
|
251
|
+
function attachPrefetchInvalidationCallback(cacheKey, onInvalidate) {
|
|
252
|
+
if (onInvalidate === void 0) return;
|
|
253
|
+
const entry = getPrefetchCache().get(cacheKey);
|
|
254
|
+
if (!entry) return;
|
|
255
|
+
addPrefetchInvalidationCallback(entry, onInvalidate);
|
|
256
|
+
if (entry.outcome === "cache-seeded") schedulePrefetchInvalidation(cacheKey, entry);
|
|
257
|
+
}
|
|
258
|
+
function invalidatePrefetchCache() {
|
|
259
|
+
const cache = getPrefetchCache();
|
|
260
|
+
const prefetched = getPrefetchedUrls();
|
|
261
|
+
for (const [cacheKey, entry] of cache) deletePrefetchCacheEntry(cache, prefetched, cacheKey, entry, true);
|
|
262
|
+
prefetched.clear();
|
|
263
|
+
if (!isServer) getNavigationRuntime()?.functions.pingVisibleLinks?.();
|
|
264
|
+
}
|
|
172
265
|
/**
|
|
173
266
|
* Store a prefetched RSC response in the cache by snapshotting it to an
|
|
174
267
|
* ArrayBuffer. The snapshot completes asynchronously; during that window
|
|
@@ -185,37 +278,45 @@ function evictPrefetchCacheIfNeeded() {
|
|
|
185
278
|
* NB: Caller is responsible for managing getPrefetchedUrls() — this
|
|
186
279
|
* function only stores the response in the prefetch cache.
|
|
187
280
|
*/
|
|
188
|
-
function storePrefetchResponse(rscUrl, response, interceptionContext = null) {
|
|
281
|
+
function storePrefetchResponse(rscUrl, response, interceptionContext = null, options) {
|
|
189
282
|
const cacheKey = AppElementsWire.encodeCacheKey(rscUrl, interceptionContext);
|
|
190
283
|
evictPrefetchCacheIfNeeded();
|
|
191
284
|
const entry = {
|
|
192
285
|
outcome: "pending",
|
|
193
286
|
timestamp: Date.now()
|
|
194
287
|
};
|
|
288
|
+
addPrefetchInvalidationCallback(entry, options?.onInvalidate);
|
|
195
289
|
entry.pending = snapshotRscResponse(response).then((snapshot) => {
|
|
196
290
|
entry.snapshot = snapshot;
|
|
197
291
|
}).catch(() => {
|
|
198
|
-
getPrefetchCache()
|
|
292
|
+
deletePrefetchCacheEntry(getPrefetchCache(), getPrefetchedUrls(), cacheKey, entry, false);
|
|
199
293
|
}).finally(() => {
|
|
200
294
|
entry.pending = void 0;
|
|
201
|
-
if (entry.snapshot)
|
|
295
|
+
if (entry.snapshot) {
|
|
296
|
+
entry.outcome = "cache-seeded";
|
|
297
|
+
schedulePrefetchInvalidation(cacheKey, entry);
|
|
298
|
+
}
|
|
202
299
|
});
|
|
203
300
|
getPrefetchCache().set(cacheKey, entry);
|
|
204
301
|
}
|
|
205
|
-
|
|
206
|
-
* Snapshot an RSC response to an ArrayBuffer for caching and replay.
|
|
207
|
-
* Consumes the response body and stores it with content-type and URL metadata.
|
|
208
|
-
*/
|
|
209
|
-
async function snapshotRscResponse(response) {
|
|
302
|
+
function createCachedRscResponseSnapshot(response, buffer, responseUrl = null) {
|
|
210
303
|
return {
|
|
211
|
-
|
|
304
|
+
compatibilityIdHeader: response.headers.get(VINEXT_RSC_COMPATIBILITY_ID_HEADER),
|
|
305
|
+
buffer,
|
|
212
306
|
contentType: response.headers.get("content-type") ?? "text/x-component",
|
|
213
307
|
mountedSlotsHeader: response.headers.get(VINEXT_MOUNTED_SLOTS_HEADER),
|
|
214
308
|
paramsHeader: response.headers.get(VINEXT_PARAMS_HEADER),
|
|
215
|
-
url: response.url
|
|
309
|
+
url: responseUrl ?? response.url
|
|
216
310
|
};
|
|
217
311
|
}
|
|
218
312
|
/**
|
|
313
|
+
* Snapshot an RSC response to an ArrayBuffer for caching and replay.
|
|
314
|
+
* Consumes the response body and stores it with content-type and URL metadata.
|
|
315
|
+
*/
|
|
316
|
+
async function snapshotRscResponse(response) {
|
|
317
|
+
return createCachedRscResponseSnapshot(response, await response.arrayBuffer());
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
219
320
|
* Reconstruct a Response from a cached RSC snapshot.
|
|
220
321
|
* Creates a new Response with the original ArrayBuffer so createFromFetch
|
|
221
322
|
* can consume the stream from scratch.
|
|
@@ -233,6 +334,7 @@ async function snapshotRscResponse(response) {
|
|
|
233
334
|
function restoreRscResponse(cached, copy = true) {
|
|
234
335
|
const headers = new Headers({ "content-type": cached.contentType });
|
|
235
336
|
if (cached.mountedSlotsHeader != null) headers.set(VINEXT_MOUNTED_SLOTS_HEADER, cached.mountedSlotsHeader);
|
|
337
|
+
if (cached.compatibilityIdHeader != null) headers.set(VINEXT_RSC_COMPATIBILITY_ID_HEADER, cached.compatibilityIdHeader);
|
|
236
338
|
if (cached.paramsHeader != null) headers.set(VINEXT_PARAMS_HEADER, cached.paramsHeader);
|
|
237
339
|
return new Response(copy ? cached.buffer.slice(0) : cached.buffer, {
|
|
238
340
|
status: 200,
|
|
@@ -246,29 +348,32 @@ function restoreRscResponse(cached, copy = true) {
|
|
|
246
348
|
* Enforces a maximum cache size to prevent unbounded memory growth on
|
|
247
349
|
* link-heavy pages.
|
|
248
350
|
*/
|
|
249
|
-
function prefetchRscResponse(rscUrl, fetchPromise, interceptionContext = null, mountedSlotsHeader = null) {
|
|
351
|
+
function prefetchRscResponse(rscUrl, fetchPromise, interceptionContext = null, mountedSlotsHeader = null, options, behavior = {}) {
|
|
250
352
|
const cacheKey = AppElementsWire.encodeCacheKey(rscUrl, interceptionContext);
|
|
251
353
|
const cache = getPrefetchCache();
|
|
252
354
|
const prefetched = getPrefetchedUrls();
|
|
355
|
+
const now = Date.now();
|
|
253
356
|
const entry = {
|
|
357
|
+
cacheForNavigation: behavior.cacheForNavigation ?? true,
|
|
358
|
+
optimisticRouteShell: behavior.optimisticRouteShell === true,
|
|
254
359
|
outcome: "pending",
|
|
255
|
-
timestamp:
|
|
360
|
+
timestamp: now
|
|
256
361
|
};
|
|
362
|
+
addPrefetchInvalidationCallback(entry, options?.onInvalidate);
|
|
257
363
|
entry.pending = fetchPromise.then(async (response) => {
|
|
258
364
|
if (response.ok) entry.snapshot = {
|
|
259
365
|
...await snapshotRscResponse(response),
|
|
260
366
|
mountedSlotsHeader
|
|
261
367
|
};
|
|
262
|
-
else
|
|
263
|
-
prefetched.delete(cacheKey);
|
|
264
|
-
cache.delete(cacheKey);
|
|
265
|
-
}
|
|
368
|
+
else deletePrefetchCacheEntry(cache, prefetched, cacheKey, entry, false);
|
|
266
369
|
}).catch(() => {
|
|
267
|
-
prefetched
|
|
268
|
-
cache.delete(cacheKey);
|
|
370
|
+
deletePrefetchCacheEntry(cache, prefetched, cacheKey, entry, false);
|
|
269
371
|
}).finally(() => {
|
|
270
372
|
entry.pending = void 0;
|
|
271
|
-
if (entry.snapshot)
|
|
373
|
+
if (entry.snapshot) {
|
|
374
|
+
entry.outcome = "cache-seeded";
|
|
375
|
+
schedulePrefetchInvalidation(cacheKey, entry);
|
|
376
|
+
}
|
|
272
377
|
});
|
|
273
378
|
cache.set(cacheKey, entry);
|
|
274
379
|
evictPrefetchCacheIfNeeded();
|
|
@@ -284,8 +389,8 @@ function consumePrefetchResponse(rscUrl, interceptionContext = null, mountedSlot
|
|
|
284
389
|
const entry = cache.get(cacheKey);
|
|
285
390
|
if (!entry) return null;
|
|
286
391
|
if (entry.pending || entry.outcome !== "cache-seeded") return null;
|
|
287
|
-
|
|
288
|
-
getPrefetchedUrls()
|
|
392
|
+
if (entry.cacheForNavigation === false) return null;
|
|
393
|
+
deletePrefetchCacheEntry(cache, getPrefetchedUrls(), cacheKey, entry, false);
|
|
289
394
|
if (entry.snapshot) {
|
|
290
395
|
if ((entry.snapshot.mountedSlotsHeader ?? null) !== mountedSlotsHeader) return null;
|
|
291
396
|
if (Date.now() - entry.timestamp >= 3e4) return null;
|
|
@@ -379,6 +484,8 @@ function syncCommittedUrlStateFromLocation() {
|
|
|
379
484
|
function getServerSearchParamsSnapshot() {
|
|
380
485
|
const ctx = _getServerContext();
|
|
381
486
|
if (!ctx) {
|
|
487
|
+
const pagesCtx = _getPagesNavigationContext();
|
|
488
|
+
if (pagesCtx) return new ReadonlyURLSearchParams(pagesCtx.searchParams);
|
|
382
489
|
if (_cachedEmptyServerSearchParams === null) _cachedEmptyServerSearchParams = new ReadonlyURLSearchParams();
|
|
383
490
|
return _cachedEmptyServerSearchParams;
|
|
384
491
|
}
|
|
@@ -488,10 +595,16 @@ function clearPendingPathname(navId) {
|
|
|
488
595
|
}
|
|
489
596
|
}
|
|
490
597
|
function getClientParamsSnapshot() {
|
|
491
|
-
|
|
598
|
+
const state = getClientNavigationState();
|
|
599
|
+
if (state && Object.keys(state.clientParams).length > 0) return state.clientParams;
|
|
600
|
+
const pagesCtx = _getPagesNavigationContext();
|
|
601
|
+
if (pagesCtx) return pagesCtx.params;
|
|
602
|
+
return state?.clientParams ?? _EMPTY_PARAMS;
|
|
492
603
|
}
|
|
493
604
|
function getServerParamsSnapshot() {
|
|
494
|
-
|
|
605
|
+
const ctx = _getServerContext();
|
|
606
|
+
if (ctx) return ctx.params;
|
|
607
|
+
return _getPagesNavigationContext()?.params ?? _EMPTY_PARAMS;
|
|
495
608
|
}
|
|
496
609
|
function subscribeToNavigation(cb) {
|
|
497
610
|
const state = getClientNavigationState();
|
|
@@ -506,9 +619,13 @@ function subscribeToNavigation(cb) {
|
|
|
506
619
|
* Server: from request context. Client: from window.location.
|
|
507
620
|
*/
|
|
508
621
|
function usePathname() {
|
|
509
|
-
if (isServer)
|
|
622
|
+
if (isServer) {
|
|
623
|
+
const ctx = _getServerContext();
|
|
624
|
+
if (ctx) return ctx.pathname;
|
|
625
|
+
return _getPagesNavigationContext()?.pathname ?? "/";
|
|
626
|
+
}
|
|
510
627
|
const renderSnapshot = useClientNavigationRenderSnapshot();
|
|
511
|
-
const pathname = React$1.useSyncExternalStore(subscribeToNavigation, getPathnameSnapshot, () => _getServerContext()?.pathname ?? "/");
|
|
628
|
+
const pathname = React$1.useSyncExternalStore(subscribeToNavigation, getPathnameSnapshot, () => _getServerContext()?.pathname ?? _getPagesNavigationContext()?.pathname ?? "/");
|
|
512
629
|
if (renderSnapshot && (getClientNavigationState()?.navigationSnapshotActiveCount ?? 0) > 0) return renderSnapshot.pathname;
|
|
513
630
|
return pathname;
|
|
514
631
|
}
|
|
@@ -526,7 +643,7 @@ function useSearchParams() {
|
|
|
526
643
|
* Returns the dynamic params for the current route.
|
|
527
644
|
*/
|
|
528
645
|
function useParams() {
|
|
529
|
-
if (isServer) return
|
|
646
|
+
if (isServer) return getServerParamsSnapshot();
|
|
530
647
|
const renderSnapshot = useClientNavigationRenderSnapshot();
|
|
531
648
|
const params = React$1.useSyncExternalStore(subscribeToNavigation, getClientParamsSnapshot, getServerParamsSnapshot);
|
|
532
649
|
if (renderSnapshot && (getClientNavigationState()?.navigationSnapshotActiveCount ?? 0) > 0) return renderSnapshot.params;
|
|
@@ -536,7 +653,7 @@ function useParams() {
|
|
|
536
653
|
* Check if a href is an external URL (any URL scheme per RFC 3986, or protocol-relative).
|
|
537
654
|
*/
|
|
538
655
|
function isExternalUrl(href) {
|
|
539
|
-
return
|
|
656
|
+
return isAbsoluteOrProtocolRelativeUrl(href);
|
|
540
657
|
}
|
|
541
658
|
/**
|
|
542
659
|
* Check if a href is only a hash change relative to the current URL.
|
|
@@ -546,18 +663,6 @@ function isHashOnlyChange(href) {
|
|
|
546
663
|
if (href.startsWith("#")) return true;
|
|
547
664
|
return isHashOnlyBrowserUrlChange(href, window.location.href, __basePath);
|
|
548
665
|
}
|
|
549
|
-
/**
|
|
550
|
-
* Scroll to a hash target element, or to the top if no hash.
|
|
551
|
-
*/
|
|
552
|
-
function scrollToHash(hash) {
|
|
553
|
-
if (!hash || hash === "#") {
|
|
554
|
-
window.scrollTo(0, 0);
|
|
555
|
-
return;
|
|
556
|
-
}
|
|
557
|
-
const id = hash.slice(1);
|
|
558
|
-
const element = document.getElementById(id);
|
|
559
|
-
if (element) element.scrollIntoView({ behavior: "auto" });
|
|
560
|
-
}
|
|
561
666
|
function withSuppressedUrlNotifications(fn) {
|
|
562
667
|
const state = getClientNavigationState();
|
|
563
668
|
if (!state) return fn();
|
|
@@ -594,7 +699,10 @@ function commitClientNavigationState(navId, options) {
|
|
|
594
699
|
}
|
|
595
700
|
const shouldNotify = urlChanged || state.hasPendingNavigationUpdate;
|
|
596
701
|
state.hasPendingNavigationUpdate = false;
|
|
597
|
-
if (shouldNotify)
|
|
702
|
+
if (shouldNotify) {
|
|
703
|
+
notifyNavigationListeners();
|
|
704
|
+
getNavigationRuntime()?.functions.pingVisibleLinks?.();
|
|
705
|
+
}
|
|
598
706
|
}
|
|
599
707
|
function pushHistoryStateWithoutNotify(data, unused, url) {
|
|
600
708
|
withSuppressedUrlNotifications(() => {
|
|
@@ -620,12 +728,21 @@ function saveScrollPosition() {
|
|
|
620
728
|
__vinext_scrollY: window.scrollY
|
|
621
729
|
}, "");
|
|
622
730
|
}
|
|
731
|
+
function commitHashOnlyHistoryState(href, mode, scroll) {
|
|
732
|
+
const commitAppRouterHashNavigation = getNavigationRuntime()?.functions.commitHashNavigation;
|
|
733
|
+
if (commitAppRouterHashNavigation) {
|
|
734
|
+
commitAppRouterHashNavigation(href, mode, scroll);
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
if (mode === "replace") replaceHistoryStateWithoutNotify(null, "", href);
|
|
738
|
+
else pushHistoryStateWithoutNotify(null, "", href);
|
|
739
|
+
}
|
|
623
740
|
/**
|
|
624
741
|
* Restore scroll position from a history state object (used on popstate).
|
|
625
742
|
*
|
|
626
743
|
* When an RSC navigation is in flight (back/forward triggers both this
|
|
627
|
-
* handler and the browser entry's popstate handler which calls
|
|
628
|
-
*
|
|
744
|
+
* handler and the browser entry's popstate handler which calls the registered
|
|
745
|
+
* navigation runtime), we must wait for the new content to render
|
|
629
746
|
* before scrolling. Otherwise the user sees old content flash at the
|
|
630
747
|
* restored scroll position.
|
|
631
748
|
*
|
|
@@ -670,33 +787,31 @@ async function navigateClientSide(href, mode, scroll, programmaticTransition = f
|
|
|
670
787
|
if (mode === "push") saveScrollPosition();
|
|
671
788
|
if (isHashOnlyChange(fullHref)) {
|
|
672
789
|
const hash = fullHref.includes("#") ? fullHref.slice(fullHref.indexOf("#")) : "";
|
|
673
|
-
|
|
674
|
-
else pushHistoryStateWithoutNotify(null, "", fullHref);
|
|
790
|
+
commitHashOnlyHistoryState(fullHref, mode, scroll);
|
|
675
791
|
commitClientNavigationState();
|
|
676
|
-
if (scroll)
|
|
792
|
+
if (scroll) scrollToHashTarget(hash);
|
|
677
793
|
return;
|
|
678
794
|
}
|
|
679
795
|
const hashIdx = fullHref.indexOf("#");
|
|
680
796
|
const hash = hashIdx !== -1 ? fullHref.slice(hashIdx) : "";
|
|
681
|
-
|
|
797
|
+
const appNavigate = getNavigationRuntime()?.functions.navigate;
|
|
798
|
+
if (appNavigate) await appNavigate(fullHref, 0, "navigate", mode, void 0, programmaticTransition);
|
|
682
799
|
else {
|
|
683
800
|
if (mode === "replace") replaceHistoryStateWithoutNotify(null, "", fullHref);
|
|
684
801
|
else pushHistoryStateWithoutNotify(null, "", fullHref);
|
|
685
802
|
commitClientNavigationState();
|
|
686
803
|
}
|
|
687
|
-
if (scroll) if (hash)
|
|
804
|
+
if (scroll) if (hash) scrollToHashTarget(hash);
|
|
688
805
|
else window.scrollTo(0, 0);
|
|
689
806
|
}
|
|
690
807
|
/**
|
|
691
|
-
* App Router
|
|
692
|
-
* `
|
|
693
|
-
* `packages/next/src/client/components/app-router-instance.ts`.
|
|
808
|
+
* Public App Router instance, exposed for the browser entry so it can wire
|
|
809
|
+
* `window.next.router` to the same singleton returned from `useRouter()`.
|
|
694
810
|
*
|
|
695
|
-
*
|
|
696
|
-
* `
|
|
697
|
-
* Internal callers in this file continue to use `_appRouter` for brevity.
|
|
811
|
+
* Mirrors `publicAppRouterInstance` from Next.js's
|
|
812
|
+
* `packages/next/src/client/components/app-router-instance.ts` (line 392).
|
|
698
813
|
*/
|
|
699
|
-
const
|
|
814
|
+
const appRouterInstance = {
|
|
700
815
|
bfcacheId: "0",
|
|
701
816
|
push(href, options) {
|
|
702
817
|
assertSafeNavigationUrl(href);
|
|
@@ -722,55 +837,49 @@ const _appRouter = {
|
|
|
722
837
|
},
|
|
723
838
|
refresh() {
|
|
724
839
|
if (isServer) return;
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
if (typeof rscNavigate === "function") {
|
|
840
|
+
getNavigationRuntime()?.functions.clearNavigationCaches?.();
|
|
841
|
+
const rscNavigate = getNavigationRuntime()?.functions.navigate;
|
|
842
|
+
if (rscNavigate) {
|
|
729
843
|
const navigate = () => {
|
|
730
844
|
rscNavigate(window.location.href, 0, "refresh", void 0, void 0, true);
|
|
731
845
|
};
|
|
732
846
|
React$1.startTransition(navigate);
|
|
733
847
|
}
|
|
734
848
|
},
|
|
735
|
-
prefetch(href) {
|
|
849
|
+
prefetch(href, options) {
|
|
736
850
|
assertSafeNavigationUrl(href);
|
|
737
851
|
if (isServer) return;
|
|
738
852
|
(async () => {
|
|
739
853
|
let prefetchHref = href;
|
|
740
|
-
if (
|
|
854
|
+
if (isAbsoluteOrProtocolRelativeUrl(href)) {
|
|
741
855
|
const localPath = toSameOriginAppPath(href, __basePath);
|
|
742
856
|
if (localPath == null) return;
|
|
743
857
|
prefetchHref = localPath;
|
|
744
858
|
}
|
|
745
859
|
const fullHref = toBrowserNavigationHref(prefetchHref, window.location.href, __basePath);
|
|
746
|
-
const interceptionContext =
|
|
860
|
+
const interceptionContext = getPrefetchInterceptionContext(fullHref);
|
|
747
861
|
const mountedSlotsHeader = getMountedSlotsHeader();
|
|
748
862
|
const headers = createRscRequestHeaders({ interceptionContext });
|
|
749
863
|
if (mountedSlotsHeader) headers.set(VINEXT_MOUNTED_SLOTS_HEADER, mountedSlotsHeader);
|
|
750
864
|
const rscUrl = await createRscRequestUrl(fullHref, headers);
|
|
751
865
|
const cacheKey = AppElementsWire.encodeCacheKey(rscUrl, interceptionContext);
|
|
752
866
|
const prefetched = getPrefetchedUrls();
|
|
753
|
-
if (prefetched.has(cacheKey))
|
|
867
|
+
if (prefetched.has(cacheKey)) {
|
|
868
|
+
attachPrefetchInvalidationCallback(cacheKey, options?.onInvalidate);
|
|
869
|
+
return;
|
|
870
|
+
}
|
|
754
871
|
prefetched.add(cacheKey);
|
|
755
872
|
prefetchRscResponse(rscUrl, fetch(rscUrl, {
|
|
756
873
|
headers,
|
|
757
874
|
credentials: "include",
|
|
758
875
|
priority: "low"
|
|
759
|
-
}), interceptionContext, mountedSlotsHeader);
|
|
876
|
+
}), interceptionContext, mountedSlotsHeader, options);
|
|
760
877
|
})().catch((error) => {
|
|
761
878
|
console.error("[vinext] RSC prefetch setup error:", error);
|
|
762
879
|
});
|
|
763
880
|
}
|
|
764
881
|
};
|
|
765
882
|
/**
|
|
766
|
-
* Public App Router instance, exposed for the browser entry so it can wire
|
|
767
|
-
* `window.next.router` to the same singleton returned from `useRouter()`.
|
|
768
|
-
*
|
|
769
|
-
* Mirrors `publicAppRouterInstance` from Next.js's
|
|
770
|
-
* `packages/next/src/client/components/app-router-instance.ts` (line 392).
|
|
771
|
-
*/
|
|
772
|
-
const appRouterInstance = _appRouter;
|
|
773
|
-
/**
|
|
774
883
|
* App Router's useRouter — returns push/replace/back/forward/refresh.
|
|
775
884
|
* Different from Pages Router's useRouter (next/router).
|
|
776
885
|
*
|
|
@@ -779,7 +888,10 @@ const appRouterInstance = _appRouter;
|
|
|
779
888
|
* (e.g. useMemo / useEffect deps, React.memo) don't re-render unnecessarily.
|
|
780
889
|
*/
|
|
781
890
|
function useRouter() {
|
|
782
|
-
|
|
891
|
+
if (!AppRouterContext || typeof React$1.useContext !== "function") throw new Error("invariant expected app router to be mounted");
|
|
892
|
+
const router = React$1.useContext(AppRouterContext);
|
|
893
|
+
if (router === null) throw new Error("invariant expected app router to be mounted");
|
|
894
|
+
return router;
|
|
783
895
|
}
|
|
784
896
|
/**
|
|
785
897
|
* Returns the active child segment one level below the layout where it's called.
|
|
@@ -964,27 +1076,186 @@ function forbidden() {
|
|
|
964
1076
|
function unauthorized() {
|
|
965
1077
|
throw new VinextNavigationError("NEXT_UNAUTHORIZED", `${HTTP_ERROR_FALLBACK_ERROR_CODE};401`);
|
|
966
1078
|
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Check whether an error was produced by `redirect()` or `permanentRedirect()`.
|
|
1081
|
+
*
|
|
1082
|
+
* **Note on vinext public surface:** Next.js does NOT expose `isRedirectError`
|
|
1083
|
+
* from `next/navigation` — it's an internal predicate. vinext exposes it for
|
|
1084
|
+
* symmetry with the already-public `isHTTPAccessFallbackError` and because
|
|
1085
|
+
* `unstable_rethrow` consumers benefit from being able to narrow types.
|
|
1086
|
+
* Treat it as a vinext-only extension.
|
|
1087
|
+
*
|
|
1088
|
+
* **Divergence from Next.js:** Next.js's internal `isRedirectError` performs
|
|
1089
|
+
* full 4-segment validation — it splits the digest on `;`, checks `type` ∈
|
|
1090
|
+
* {push, replace}, requires a non-empty destination, and validates the
|
|
1091
|
+
* status code (303, 307, 308). See:
|
|
1092
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/redirect-error.ts
|
|
1093
|
+
*
|
|
1094
|
+
* vinext instead uses a simple prefix check (`startsWith("NEXT_REDIRECT;")`).
|
|
1095
|
+
* Reasons:
|
|
1096
|
+
* 1. vinext emits two digest shapes — 3-part for `redirect()`
|
|
1097
|
+
* (`NEXT_REDIRECT;{type};{encoded-url}`) and 4-part for
|
|
1098
|
+
* `permanentRedirect()` (`NEXT_REDIRECT;{type};{encoded-url};308`).
|
|
1099
|
+
* Strict validation would have to special-case both, and Next.js's
|
|
1100
|
+
* validator (tuned to its 5-part canary digests) rejects them.
|
|
1101
|
+
* 2. The `type` field is sometimes empty in vinext's redirect digests
|
|
1102
|
+
* (context-dependent resolution; see `redirect()` above), which the
|
|
1103
|
+
* strict check disallows.
|
|
1104
|
+
*
|
|
1105
|
+
* **Consequence:** A malformed digest such as `"NEXT_REDIRECT;garbage"`
|
|
1106
|
+
* returns `true` here, whereas Next.js would return `false`. In practice,
|
|
1107
|
+
* the only callers of this predicate are vinext-internal code paths
|
|
1108
|
+
* (`unstable_rethrow`, `unstable_catchError`, the redirect error boundary)
|
|
1109
|
+
* that see digests vinext itself emits — so the divergence does not surface
|
|
1110
|
+
* in normal use. Maintainers extending the prefix logic should keep this
|
|
1111
|
+
* predicate in lockstep with the corresponding `decode*` helpers in
|
|
1112
|
+
* `shims/error-boundary.tsx`.
|
|
1113
|
+
*/
|
|
1114
|
+
function isRedirectError(error) {
|
|
1115
|
+
if (!error || typeof error !== "object" || !("digest" in error) || typeof error.digest !== "string") return false;
|
|
1116
|
+
return error.digest.startsWith("NEXT_REDIRECT;");
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Returns true if the error is a Next.js navigation signal — either a redirect
|
|
1120
|
+
* or an HTTP access fallback (notFound / forbidden / unauthorized).
|
|
1121
|
+
*
|
|
1122
|
+
* **Note on vinext public surface:** Like `isRedirectError`, Next.js does NOT
|
|
1123
|
+
* expose this from `next/navigation`. vinext exposes it for symmetry — treat
|
|
1124
|
+
* it as a vinext-only extension.
|
|
1125
|
+
*
|
|
1126
|
+
* Ported from Next.js:
|
|
1127
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/is-next-router-error.ts
|
|
1128
|
+
*/
|
|
1129
|
+
function isNextRouterError(error) {
|
|
1130
|
+
return isRedirectError(error) || isHTTPAccessFallbackError(error);
|
|
1131
|
+
}
|
|
1132
|
+
const _BAILOUT_TO_CSR_DIGEST = "BAILOUT_TO_CLIENT_SIDE_RENDERING";
|
|
1133
|
+
/**
|
|
1134
|
+
* Error thrown to bail out of server rendering and fall back to client-side
|
|
1135
|
+
* rendering. Used by `next/dynamic` with `ssr: false`.
|
|
1136
|
+
*
|
|
1137
|
+
* vinext does not yet emit this error itself — it's exposed so user code and
|
|
1138
|
+
* third-party libraries that mimic `next/dynamic`'s bailout semantics can
|
|
1139
|
+
* construct an error with the canonical digest that `unstable_rethrow`
|
|
1140
|
+
* recognises.
|
|
1141
|
+
*
|
|
1142
|
+
* Ported 1:1 from Next.js:
|
|
1143
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/lazy-dynamic/bailout-to-csr.ts
|
|
1144
|
+
*/
|
|
1145
|
+
var BailoutToCSRError = class extends Error {
|
|
1146
|
+
digest = _BAILOUT_TO_CSR_DIGEST;
|
|
1147
|
+
reason;
|
|
1148
|
+
constructor(reason) {
|
|
1149
|
+
super(`Bail out to client-side rendering: ${reason}`);
|
|
1150
|
+
this.reason = reason;
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1153
|
+
/**
|
|
1154
|
+
* Returns true if the error is a `BailoutToCSRError`. Matches Next.js's
|
|
1155
|
+
* digest-based predicate, so any error from a foreign module instance of
|
|
1156
|
+
* the class (or constructed manually with the canonical digest) is also
|
|
1157
|
+
* detected.
|
|
1158
|
+
*
|
|
1159
|
+
* **Note on vinext public surface:** Next.js does NOT expose this from
|
|
1160
|
+
* `next/navigation`. vinext exposes it for symmetry with `isRedirectError`
|
|
1161
|
+
* — treat it as a vinext-only extension. The matching producer
|
|
1162
|
+
* (`BailoutToCSRError`) is the public detection contract; Next.js exposes
|
|
1163
|
+
* neither.
|
|
1164
|
+
*
|
|
1165
|
+
* Ported from Next.js:
|
|
1166
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/lazy-dynamic/bailout-to-csr.ts
|
|
1167
|
+
*/
|
|
1168
|
+
function isBailoutToCSRError(error) {
|
|
1169
|
+
if (!error || typeof error !== "object" || !("digest" in error)) return false;
|
|
1170
|
+
return error.digest === _BAILOUT_TO_CSR_DIGEST;
|
|
1171
|
+
}
|
|
1172
|
+
const _DYNAMIC_SERVER_USAGE_DIGEST = "DYNAMIC_SERVER_USAGE";
|
|
1173
|
+
/**
|
|
1174
|
+
* Error thrown when dynamic server APIs (`cookies()`, `headers()`, etc.) are
|
|
1175
|
+
* used inside a static/prerender context. Carries the `DYNAMIC_SERVER_USAGE`
|
|
1176
|
+
* digest so `unstable_rethrow` can recognise and propagate it.
|
|
1177
|
+
*
|
|
1178
|
+
* vinext does not construct this error itself — exposed for the same
|
|
1179
|
+
* "stable detection contract" reason as `BailoutToCSRError` above.
|
|
1180
|
+
*
|
|
1181
|
+
* Ported 1:1 from Next.js:
|
|
1182
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/hooks-server-context.ts
|
|
1183
|
+
*/
|
|
1184
|
+
var DynamicServerError = class extends Error {
|
|
1185
|
+
digest = _DYNAMIC_SERVER_USAGE_DIGEST;
|
|
1186
|
+
description;
|
|
1187
|
+
constructor(description) {
|
|
1188
|
+
super(`Dynamic server usage: ${description}`);
|
|
1189
|
+
this.description = description;
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
/**
|
|
1193
|
+
* Returns true if the error is a `DynamicServerError` (or any error with the
|
|
1194
|
+
* canonical `DYNAMIC_SERVER_USAGE` digest).
|
|
1195
|
+
*
|
|
1196
|
+
* **Note on vinext public surface:** Next.js does NOT expose this from
|
|
1197
|
+
* `next/navigation`. vinext exposes it for symmetry — treat it as a
|
|
1198
|
+
* vinext-only extension.
|
|
1199
|
+
*
|
|
1200
|
+
* Ported from Next.js:
|
|
1201
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/hooks-server-context.ts
|
|
1202
|
+
*/
|
|
1203
|
+
function isDynamicServerError(error) {
|
|
1204
|
+
if (!error || typeof error !== "object" || !("digest" in error)) return false;
|
|
1205
|
+
return error.digest === _DYNAMIC_SERVER_USAGE_DIGEST;
|
|
1206
|
+
}
|
|
1207
|
+
/**
|
|
1208
|
+
* Rethrow internal Next.js errors so they're handled by the framework.
|
|
1209
|
+
*
|
|
1210
|
+
* When wrapping an API that uses errors for control flow (redirect, notFound,
|
|
1211
|
+
* cookies in static render, `next/dynamic` SSR bailout, etc.), call this
|
|
1212
|
+
* inside `catch` blocks before doing your own error handling. If the error
|
|
1213
|
+
* is a Next.js internal error, it's rethrown; otherwise this is a no-op
|
|
1214
|
+
* (apart from recursing through `error.cause`).
|
|
1215
|
+
*
|
|
1216
|
+
* Recognises (matches Next.js's browser build + the subset of the server
|
|
1217
|
+
* build that vinext can realistically encounter):
|
|
1218
|
+
* - `isNextRouterError`: redirect / notFound / forbidden / unauthorized
|
|
1219
|
+
* - `isBailoutToCSRError`: `next/dynamic` `ssr: false` bailout
|
|
1220
|
+
* - `isDynamicServerError`: dynamic API used in static render
|
|
1221
|
+
*
|
|
1222
|
+
* vinext does not yet recognise four additional server-only Next.js
|
|
1223
|
+
* categories — `isDynamicPostpone`, `isPostpone`,
|
|
1224
|
+
* `isHangingPromiseRejectionError`, `isPrerenderInterruptedError` — because
|
|
1225
|
+
* they signal PPR / prerender-controller events that vinext's render
|
|
1226
|
+
* pipeline does not generate. User code cannot construct these in normal
|
|
1227
|
+
* use; they will be added if/when vinext grows PPR support.
|
|
1228
|
+
*
|
|
1229
|
+
* Ported from Next.js:
|
|
1230
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/unstable-rethrow.ts
|
|
1231
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/unstable-rethrow.server.ts
|
|
1232
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/unstable-rethrow.browser.ts
|
|
1233
|
+
*/
|
|
1234
|
+
function unstable_rethrow(error) {
|
|
1235
|
+
if (isNextRouterError(error) || isBailoutToCSRError(error) || isDynamicServerError(error)) throw error;
|
|
1236
|
+
if (error instanceof Error && "cause" in error) unstable_rethrow(error.cause);
|
|
1237
|
+
}
|
|
967
1238
|
if (!isServer) {
|
|
968
1239
|
const state = getClientNavigationState();
|
|
969
1240
|
if (state && !state.patchInstalled) {
|
|
970
1241
|
state.patchInstalled = true;
|
|
971
1242
|
window.addEventListener("popstate", (event) => {
|
|
972
|
-
if (
|
|
1243
|
+
if (!hasAppNavigationRuntime()) {
|
|
973
1244
|
commitClientNavigationState();
|
|
974
1245
|
restoreScrollPosition(event.state);
|
|
975
1246
|
}
|
|
976
1247
|
});
|
|
977
1248
|
window.history.pushState = function patchedPushState(data, unused, url) {
|
|
978
|
-
state.originalPushState.call(window.history, data, unused, url);
|
|
1249
|
+
state.originalPushState.call(window.history, createExternalHistoryStatePreservingMetadata(data, window.history.state), unused, url);
|
|
979
1250
|
if (state.suppressUrlNotifyCount === 0) commitClientNavigationState();
|
|
980
1251
|
};
|
|
981
1252
|
window.history.replaceState = function patchedReplaceState(data, unused, url) {
|
|
982
|
-
state.originalReplaceState.call(window.history, data, unused, url);
|
|
1253
|
+
state.originalReplaceState.call(window.history, createExternalHistoryStatePreservingMetadata(data, window.history.state), unused, url);
|
|
983
1254
|
if (state.suppressUrlNotifyCount === 0) commitClientNavigationState();
|
|
984
1255
|
};
|
|
985
1256
|
}
|
|
986
1257
|
}
|
|
987
1258
|
//#endregion
|
|
988
|
-
export { GLOBAL_ACCESSORS_KEY, HTTP_ERROR_FALLBACK_ERROR_CODE, MAX_PREFETCH_CACHE_SIZE, PREFETCH_CACHE_TTL, ReadonlyURLSearchParams, RedirectType, ServerInsertedHTMLContext, __basePath, _registerStateAccessors, activateNavigationSnapshot, appRouterInstance, clearPendingPathname, clearServerInsertedHTML, commitClientNavigationState, consumePrefetchResponse, createClientNavigationRenderSnapshot, flushServerInsertedHTML, forbidden, getAccessFallbackHTTPStatus, getClientNavigationRenderContext, getClientNavigationState, getClientParams, getCurrentInterceptionContext, getCurrentNextUrl, getLayoutSegmentContext, getMountedSlotsHeader, getNavigationContext, getPrefetchCache, getPrefetchedUrls, isHTTPAccessFallbackError, navigateClientSide, notFound, permanentRedirect, prefetchRscResponse, pushHistoryStateWithoutNotify, redirect, renderServerInsertedHTML, replaceClientParamsWithoutNotify, replaceHistoryStateWithoutNotify, restoreRscResponse, setClientParams, setMountedSlotsHeader, setNavigationContext, setPendingPathname, snapshotRscResponse, storePrefetchResponse, unauthorized, useParams, usePathname, useRouter, useSearchParams, useSelectedLayoutSegment, useSelectedLayoutSegments, useServerInsertedHTML };
|
|
1259
|
+
export { BailoutToCSRError, DynamicServerError, GLOBAL_ACCESSORS_KEY, HTTP_ERROR_FALLBACK_ERROR_CODE, MAX_PREFETCH_CACHE_SIZE, PREFETCH_CACHE_TTL, ReadonlyURLSearchParams, RedirectType, ServerInsertedHTMLContext, UnrecognizedActionError, __basePath, _registerStateAccessors, activateNavigationSnapshot, appRouterInstance, clearPendingPathname, clearServerInsertedHTML, commitClientNavigationState, consumePrefetchResponse, createCachedRscResponseSnapshot, createClientNavigationRenderSnapshot, flushServerInsertedHTML, forbidden, getAccessFallbackHTTPStatus, getClientNavigationRenderContext, getClientNavigationState, getClientParams, getCurrentInterceptionContext, getCurrentNextUrl, getLayoutSegmentContext, getMountedSlotsHeader, getNavigationContext, getPrefetchCache, getPrefetchInterceptionContext, getPrefetchedUrls, invalidatePrefetchCache, isBailoutToCSRError, isDynamicServerError, isHTTPAccessFallbackError, isNextRouterError, isRedirectError, navigateClientSide, notFound, permanentRedirect, prefetchRscResponse, pushHistoryStateWithoutNotify, redirect, renderServerInsertedHTML, replaceClientParamsWithoutNotify, replaceHistoryStateWithoutNotify, restoreRscResponse, setClientParams, setMountedSlotsHeader, setNavigationContext, setPendingPathname, snapshotRscResponse, storePrefetchResponse, unauthorized, unstable_isUnrecognizedActionError, unstable_rethrow, useParams, usePathname, useRouter, useSearchParams, useSelectedLayoutSegment, useSelectedLayoutSegments, useServerInsertedHTML };
|
|
989
1260
|
|
|
990
1261
|
//# sourceMappingURL=navigation.js.map
|