vinext 0.0.49 → 0.0.51
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/client-build-config.js.map +1 -1
- package/dist/build/google-fonts/build-url.js.map +1 -1
- 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/google-fonts/get-axes.js.map +1 -1
- package/dist/build/google-fonts/sort-variants.js.map +1 -1
- package/dist/build/google-fonts/validate.js.map +1 -1
- package/dist/build/layout-classification.js.map +1 -1
- package/dist/build/nitro-route-rules.js.map +1 -1
- package/dist/build/precompress.d.ts +13 -2
- package/dist/build/precompress.js +12 -3
- package/dist/build/precompress.js.map +1 -1
- package/dist/build/prerender.d.ts +17 -1
- package/dist/build/prerender.js +114 -23
- 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/build/route-classification-injector.js.map +1 -1
- package/dist/build/route-classification-manifest.js.map +1 -1
- package/dist/build/run-prerender.js.map +1 -1
- package/dist/build/server-manifest.js.map +1 -1
- package/dist/build/ssr-manifest.js.map +1 -1
- package/dist/build/standalone.js.map +1 -1
- package/dist/build/static-export.js.map +1 -1
- package/dist/check.js +2 -1
- package/dist/check.js.map +1 -1
- package/dist/cli-args.js.map +1 -1
- package/dist/cli.js +68 -7
- package/dist/cli.js.map +1 -1
- package/dist/client/instrumentation-client-state.js.map +1 -1
- package/dist/client/validate-module-path.js.map +1 -1
- package/dist/client/vinext-next-data.d.ts +5 -1
- package/dist/client/window-next.d.ts +151 -0
- package/dist/client/window-next.js +48 -0
- package/dist/client/window-next.js.map +1 -0
- package/dist/cloudflare/kv-cache-handler.js.map +1 -1
- package/dist/cloudflare/tpr.js +2 -1
- package/dist/cloudflare/tpr.js.map +1 -1
- package/dist/config/config-matchers.d.ts +3 -1
- package/dist/config/config-matchers.js +5 -4
- 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 +93 -6
- package/dist/config/next-config.js +233 -6
- 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 +16 -7
- package/dist/deploy.js.map +1 -1
- package/dist/entries/app-browser-entry.d.ts +3 -1
- package/dist/entries/app-browser-entry.js +36 -2
- 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 +49 -12
- package/dist/entries/app-rsc-entry.js.map +1 -1
- package/dist/entries/app-rsc-manifest.d.ts +9 -0
- package/dist/entries/app-rsc-manifest.js +8 -1
- package/dist/entries/app-rsc-manifest.js.map +1 -1
- package/dist/entries/app-ssr-entry.js.map +1 -1
- package/dist/entries/pages-client-entry.js +3 -5
- package/dist/entries/pages-client-entry.js.map +1 -1
- package/dist/entries/pages-entry-helpers.js.map +1 -1
- package/dist/entries/pages-server-entry.js +34 -1
- package/dist/entries/pages-server-entry.js.map +1 -1
- package/dist/entries/runtime-entry-module.js.map +1 -1
- package/dist/index.js +204 -53
- package/dist/index.js.map +1 -1
- package/dist/init.js.map +1 -1
- package/dist/plugins/async-hooks-stub.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/fonts.d.ts +2 -2
- package/dist/plugins/fonts.js +15 -6
- package/dist/plugins/fonts.js.map +1 -1
- package/dist/plugins/instrumentation-client.js.map +1 -1
- package/dist/plugins/og-assets.js.map +1 -1
- package/dist/plugins/optimize-imports.js.map +1 -1
- package/dist/plugins/postcss.js.map +1 -1
- package/dist/plugins/rsc-client-reference-loaders.d.ts +7 -0
- package/dist/plugins/rsc-client-reference-loaders.js +48 -0
- package/dist/plugins/rsc-client-reference-loaders.js.map +1 -0
- package/dist/plugins/rsc-client-shim-excludes.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/server-externals-manifest.js.map +1 -1
- package/dist/plugins/strip-server-exports.js.map +1 -1
- package/dist/routing/app-route-graph.d.ts +78 -6
- package/dist/routing/app-route-graph.js +241 -25
- package/dist/routing/app-route-graph.js.map +1 -1
- package/dist/routing/app-router.js.map +1 -1
- package/dist/routing/file-matcher.js.map +1 -1
- package/dist/routing/pages-router.js.map +1 -1
- package/dist/routing/route-matching.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/route-trie.js.map +1 -1
- package/dist/routing/route-validation.js.map +1 -1
- package/dist/routing/utils.js.map +1 -1
- package/dist/server/api-handler.js.map +1 -1
- package/dist/server/app-browser-action-result.d.ts +44 -0
- package/dist/server/app-browser-action-result.js +79 -0
- package/dist/server/app-browser-action-result.js.map +1 -0
- package/dist/server/app-browser-entry.js +330 -133
- package/dist/server/app-browser-entry.js.map +1 -1
- package/dist/server/app-browser-error.js.map +1 -1
- package/dist/server/app-browser-hydration.d.ts +31 -0
- package/dist/server/app-browser-hydration.js +30 -0
- package/dist/server/app-browser-hydration.js.map +1 -0
- package/dist/server/app-browser-navigation-controller.d.ts +20 -4
- package/dist/server/app-browser-navigation-controller.js +90 -23
- 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 +28 -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 +27 -23
- package/dist/server/app-browser-state.js +158 -54
- package/dist/server/app-browser-state.js.map +1 -1
- package/dist/server/app-browser-stream.d.ts +9 -4
- package/dist/server/app-browser-stream.js +29 -8
- package/dist/server/app-browser-stream.js.map +1 -1
- package/dist/server/app-browser-visible-commit.d.ts +11 -1
- package/dist/server/app-browser-visible-commit.js +69 -21
- package/dist/server/app-browser-visible-commit.js.map +1 -1
- package/dist/server/app-client-reference-preloader.js.map +1 -1
- package/dist/server/app-elements-wire.d.ts +43 -6
- package/dist/server/app-elements-wire.js +121 -5
- package/dist/server/app-elements-wire.js.map +1 -1
- package/dist/server/app-elements.d.ts +2 -2
- package/dist/server/app-elements.js +2 -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 +37 -1
- 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-hook-warning-suppression.js.map +1 -1
- package/dist/server/app-middleware.d.ts +1 -1
- package/dist/server/app-middleware.js +4 -9
- package/dist/server/app-middleware.js.map +1 -1
- package/dist/server/app-mounted-slots-header.js.map +1 -1
- package/dist/server/app-page-boundary-render.d.ts +11 -1
- package/dist/server/app-page-boundary-render.js +27 -19
- package/dist/server/app-page-boundary-render.js.map +1 -1
- package/dist/server/app-page-boundary.d.ts +1 -0
- package/dist/server/app-page-boundary.js +10 -7
- package/dist/server/app-page-boundary.js.map +1 -1
- package/dist/server/app-page-cache.d.ts +23 -3
- package/dist/server/app-page-cache.js +63 -27
- package/dist/server/app-page-cache.js.map +1 -1
- package/dist/server/app-page-dispatch.d.ts +11 -1
- package/dist/server/app-page-dispatch.js +85 -14
- package/dist/server/app-page-dispatch.js.map +1 -1
- package/dist/server/app-page-element-builder.d.ts +10 -1
- package/dist/server/app-page-element-builder.js +38 -6
- package/dist/server/app-page-element-builder.js.map +1 -1
- package/dist/server/app-page-execution.js +2 -3
- 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 +6 -1
- package/dist/server/app-page-head.js.map +1 -1
- package/dist/server/app-page-method.js.map +1 -1
- package/dist/server/app-page-params.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 +12 -2
- package/dist/server/app-page-render.js +90 -7
- 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 +2 -1
- package/dist/server/app-page-request.js.map +1 -1
- package/dist/server/app-page-response.d.ts +2 -0
- package/dist/server/app-page-response.js +18 -7
- package/dist/server/app-page-response.js.map +1 -1
- package/dist/server/app-page-route-wiring.d.ts +9 -3
- package/dist/server/app-page-route-wiring.js +91 -62
- package/dist/server/app-page-route-wiring.js.map +1 -1
- package/dist/server/app-page-segment-state.d.ts +10 -0
- package/dist/server/app-page-segment-state.js +87 -0
- package/dist/server/app-page-segment-state.js.map +1 -0
- package/dist/server/app-page-stream.d.ts +9 -2
- package/dist/server/app-page-stream.js +4 -1
- package/dist/server/app-page-stream.js.map +1 -1
- package/dist/server/app-post-middleware-context.js.map +1 -1
- package/dist/server/app-prerender-endpoints.js.map +1 -1
- package/dist/server/app-prerender-static-params.js.map +1 -1
- package/dist/server/app-render-dependency.js.map +1 -1
- package/dist/server/app-request-context.js.map +1 -1
- package/dist/server/app-route-handler-cache.js.map +1 -1
- package/dist/server/app-route-handler-dispatch.js +3 -1
- package/dist/server/app-route-handler-dispatch.js.map +1 -1
- package/dist/server/app-route-handler-execution.js.map +1 -1
- package/dist/server/app-route-handler-policy.js +1 -0
- package/dist/server/app-route-handler-policy.js.map +1 -1
- package/dist/server/app-route-handler-response.js +4 -3
- package/dist/server/app-route-handler-response.js.map +1 -1
- package/dist/server/app-route-handler-runtime.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 +23 -2
- package/dist/server/app-rsc-cache-busting.js +75 -19
- 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-error-handler.js.map +1 -1
- 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 +18 -1
- package/dist/server/app-rsc-handler.js +55 -16
- package/dist/server/app-rsc-handler.js.map +1 -1
- package/dist/server/app-rsc-render-mode.d.ts +11 -0
- package/dist/server/app-rsc-render-mode.js +21 -0
- package/dist/server/app-rsc-render-mode.js.map +1 -0
- package/dist/server/app-rsc-request-normalization.d.ts +4 -1
- package/dist/server/app-rsc-request-normalization.js +7 -2
- package/dist/server/app-rsc-request-normalization.js.map +1 -1
- package/dist/server/app-rsc-response-finalizer.d.ts +2 -1
- package/dist/server/app-rsc-response-finalizer.js +6 -1
- 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 +45 -23
- package/dist/server/app-rsc-route-matching.js.map +1 -1
- package/dist/server/app-segment-config.js.map +1 -1
- package/dist/server/app-server-action-execution.d.ts +51 -5
- package/dist/server/app-server-action-execution.js +161 -51
- package/dist/server/app-server-action-execution.js.map +1 -1
- package/dist/server/app-ssr-entry.d.ts +7 -0
- package/dist/server/app-ssr-entry.js +44 -14
- 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 +1 -1
- package/dist/server/app-ssr-stream.js +9 -12
- package/dist/server/app-ssr-stream.js.map +1 -1
- package/dist/server/app-static-generation.js.map +1 -1
- package/dist/server/artifact-compatibility.d.ts +12 -2
- package/dist/server/artifact-compatibility.js +12 -8
- package/dist/server/artifact-compatibility.js.map +1 -1
- package/dist/server/cache-control.js +1 -0
- package/dist/server/cache-control.js.map +1 -1
- package/dist/server/cache-proof.d.ts +124 -5
- package/dist/server/cache-proof.js +416 -18
- package/dist/server/cache-proof.js.map +1 -1
- package/dist/server/csp.js.map +1 -1
- package/dist/server/dev-error-overlay-store.js.map +1 -1
- package/dist/server/dev-error-overlay.js +5 -0
- package/dist/server/dev-error-overlay.js.map +1 -1
- 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-module-runner.js.map +1 -1
- package/dist/server/dev-origin-check.js.map +1 -1
- package/dist/server/dev-route-files.js.map +1 -1
- package/dist/server/dev-server.js +23 -10
- package/dist/server/dev-server.js.map +1 -1
- 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 +81 -0
- package/dist/server/headers.js +104 -0
- package/dist/server/headers.js.map +1 -0
- package/dist/server/html.js +1 -1
- package/dist/server/html.js.map +1 -1
- package/dist/server/http-error-responses.d.ts +10 -0
- package/dist/server/http-error-responses.js +11 -1
- package/dist/server/http-error-responses.js.map +1 -1
- package/dist/server/image-optimization.d.ts +11 -1
- package/dist/server/image-optimization.js.map +1 -1
- package/dist/server/implicit-tags.js +2 -1
- package/dist/server/implicit-tags.js.map +1 -1
- package/dist/server/instrumentation-runtime.js.map +1 -1
- package/dist/server/instrumentation.js.map +1 -1
- package/dist/server/isr-cache.d.ts +12 -2
- package/dist/server/isr-cache.js +16 -5
- package/dist/server/isr-cache.js.map +1 -1
- package/dist/server/metadata-route-build-data.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-matcher.js.map +1 -1
- package/dist/server/middleware-request-headers.d.ts +4 -1
- package/dist/server/middleware-request-headers.js +15 -8
- package/dist/server/middleware-request-headers.js.map +1 -1
- package/dist/server/middleware-response-headers.d.ts +2 -1
- package/dist/server/middleware-response-headers.js +1 -1
- package/dist/server/middleware-response-headers.js.map +1 -1
- package/dist/server/middleware-runtime.d.ts +1 -0
- package/dist/server/middleware-runtime.js +7 -3
- package/dist/server/middleware-runtime.js.map +1 -1
- package/dist/server/middleware.d.ts +12 -0
- package/dist/server/middleware.js +12 -0
- package/dist/server/middleware.js.map +1 -1
- package/dist/server/navigation-planner.d.ts +133 -0
- package/dist/server/navigation-planner.js +432 -0
- package/dist/server/navigation-planner.js.map +1 -0
- package/dist/server/navigation-trace.d.ts +19 -2
- package/dist/server/navigation-trace.js +20 -1
- package/dist/server/navigation-trace.js.map +1 -1
- package/dist/server/next-error-digest.d.ts +3 -2
- package/dist/server/next-error-digest.js +4 -2
- package/dist/server/next-error-digest.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.js +1 -0
- package/dist/server/pages-api-route.js.map +1 -1
- package/dist/server/pages-i18n.js.map +1 -1
- package/dist/server/pages-media-type.js.map +1 -1
- package/dist/server/pages-node-compat.js.map +1 -1
- package/dist/server/pages-page-data.d.ts +3 -2
- package/dist/server/pages-page-data.js +27 -5
- package/dist/server/pages-page-data.js.map +1 -1
- package/dist/server/pages-page-response.js +2 -1
- package/dist/server/pages-page-response.js.map +1 -1
- package/dist/server/prerender-work-unit-setup.js +1 -1
- package/dist/server/prerender-work-unit-setup.js.map +1 -1
- package/dist/server/prod-server.d.ts +28 -1
- package/dist/server/prod-server.js +97 -22
- package/dist/server/prod-server.js.map +1 -1
- package/dist/server/request-log.js.map +1 -1
- package/dist/server/request-pipeline.d.ts +1 -13
- package/dist/server/request-pipeline.js +3 -25
- package/dist/server/request-pipeline.js.map +1 -1
- package/dist/server/rsc-stream-hints.js.map +1 -1
- 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 +22 -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/socket-error-backstop.js.map +1 -1
- package/dist/server/static-file-cache.js +1 -1
- package/dist/server/static-file-cache.js.map +1 -1
- package/dist/server/worker-utils.d.ts +0 -7
- package/dist/server/worker-utils.js +3 -2
- package/dist/server/worker-utils.js.map +1 -1
- package/dist/shims/amp.js.map +1 -1
- package/dist/shims/app.d.ts +37 -4
- package/dist/shims/app.js +50 -1
- package/dist/shims/app.js.map +1 -0
- package/dist/shims/cache-for-request.js.map +1 -1
- package/dist/shims/cache-runtime.d.ts +19 -2
- package/dist/shims/cache-runtime.js +87 -19
- package/dist/shims/cache-runtime.js.map +1 -1
- package/dist/shims/cache.d.ts +20 -21
- package/dist/shims/cache.js +101 -15
- package/dist/shims/cache.js.map +1 -1
- package/dist/shims/client-hook-error.js.map +1 -1
- package/dist/shims/compat-router.js.map +1 -1
- package/dist/shims/config.js.map +1 -1
- package/dist/shims/constants.js.map +1 -1
- package/dist/shims/document.js.map +1 -1
- package/dist/shims/dynamic.d.ts +18 -10
- package/dist/shims/dynamic.js +107 -51
- package/dist/shims/dynamic.js.map +1 -1
- package/dist/shims/error-boundary.d.ts +35 -6
- package/dist/shims/error-boundary.js +116 -33
- 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 +25 -1
- package/dist/shims/fetch-cache.js +159 -13
- 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 +3 -1
- 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/head-state.js.map +1 -1
- package/dist/shims/head.d.ts +3 -1
- package/dist/shims/head.js +28 -16
- package/dist/shims/head.js.map +1 -1
- package/dist/shims/headers.d.ts +11 -12
- package/dist/shims/headers.js +45 -8
- package/dist/shims/headers.js.map +1 -1
- package/dist/shims/i18n-context.js.map +1 -1
- package/dist/shims/i18n-state.js.map +1 -1
- package/dist/shims/image-config.d.ts +14 -1
- package/dist/shims/image-config.js +24 -1
- package/dist/shims/image-config.js.map +1 -1
- package/dist/shims/image.d.ts +1 -0
- package/dist/shims/image.js +159 -80
- package/dist/shims/image.js.map +1 -1
- package/dist/shims/internal/als-registry.js.map +1 -1
- package/dist/shims/internal/app-router-context.d.ts +7 -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/internal/cookie-serialize.js.map +1 -1
- package/dist/shims/internal/make-hanging-promise.d.ts +1 -1
- package/dist/shims/internal/make-hanging-promise.js +1 -1
- package/dist/shims/internal/make-hanging-promise.js.map +1 -1
- package/dist/shims/internal/parse-cookie-header.js.map +1 -1
- package/dist/shims/internal/utils.js.map +1 -1
- package/dist/shims/internal/work-unit-async-storage.js +2 -2
- package/dist/shims/internal/work-unit-async-storage.js.map +1 -1
- package/dist/shims/layout-segment-context.js.map +1 -1
- package/dist/shims/legacy-image.js.map +1 -1
- package/dist/shims/link-prefetch.d.ts +42 -0
- package/dist/shims/link-prefetch.js +45 -0
- package/dist/shims/link-prefetch.js.map +1 -0
- package/dist/shims/link.d.ts +37 -4
- package/dist/shims/link.js +156 -46
- package/dist/shims/link.js.map +1 -1
- package/dist/shims/metadata.d.ts +16 -30
- package/dist/shims/metadata.js +87 -28
- package/dist/shims/metadata.js.map +1 -1
- package/dist/shims/navigation-state.js.map +1 -1
- package/dist/shims/navigation.d.ts +172 -10
- package/dist/shims/navigation.js +335 -70
- 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/offline.js.map +1 -1
- 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/readonly-url-search-params.js.map +1 -1
- package/dist/shims/request-context.js.map +1 -1
- package/dist/shims/root-params.js.map +1 -1
- package/dist/shims/router-state.js.map +1 -1
- package/dist/shims/router.d.ts +69 -7
- package/dist/shims/router.js +232 -249
- package/dist/shims/router.js.map +1 -1
- package/dist/shims/script-nonce-context.js.map +1 -1
- package/dist/shims/script.js +110 -32
- package/dist/shims/script.js.map +1 -1
- package/dist/shims/server.js +12 -15
- package/dist/shims/server.js.map +1 -1
- package/dist/shims/slot.d.ts +7 -1
- package/dist/shims/slot.js +60 -7
- package/dist/shims/slot.js.map +1 -1
- package/dist/shims/thenable-params.js.map +1 -1
- package/dist/shims/unified-request-context.js +5 -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.js.map +1 -1
- package/dist/shims/url-utils.d.ts +22 -1
- package/dist/shims/url-utils.js +76 -3
- package/dist/shims/url-utils.js.map +1 -1
- package/dist/shims/use-merged-ref.js.map +1 -1
- package/dist/shims/web-vitals.d.ts +4 -21
- package/dist/shims/web-vitals.js +19 -6
- package/dist/shims/web-vitals.js.map +1 -1
- package/dist/utils/asset-prefix.d.ts +69 -0
- package/dist/utils/asset-prefix.js +91 -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.js.map +1 -1
- package/dist/utils/domain-locale.js.map +1 -1
- package/dist/utils/encode-cache-tag.d.ts +31 -0
- package/dist/utils/encode-cache-tag.js +38 -0
- package/dist/utils/encode-cache-tag.js.map +1 -0
- package/dist/utils/error-cause.js.map +1 -1
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/lazy-chunks.js.map +1 -1
- package/dist/utils/manifest-paths.js.map +1 -1
- package/dist/utils/mdx-scan.js.map +1 -1
- package/dist/utils/navigation-signal.d.ts +5 -0
- package/dist/utils/navigation-signal.js +14 -0
- package/dist/utils/navigation-signal.js.map +1 -0
- package/dist/utils/project.js.map +1 -1
- package/dist/utils/public-routes.js.map +1 -1
- package/dist/utils/query.js.map +1 -1
- package/dist/utils/safe-json-file.js.map +1 -1
- 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/dist/utils/text-stream.js.map +1 -1
- package/dist/utils/vinext-root.js.map +1 -1
- package/package.json +8 -6
package/dist/shims/navigation.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { stripBasePath } from "../utils/base-path.js";
|
|
2
|
+
import { VINEXT_MOUNTED_SLOTS_HEADER, VINEXT_PARAMS_HEADER } from "../server/headers.js";
|
|
2
3
|
import { assertSafeNavigationUrl } from "./url-safety.js";
|
|
3
|
-
import { toBrowserNavigationHref, toSameOriginAppPath } from "./url-utils.js";
|
|
4
|
+
import { isAbsoluteOrProtocolRelativeUrl, isHashOnlyBrowserUrlChange, toBrowserNavigationHref, toSameOriginAppPath } from "./url-utils.js";
|
|
5
|
+
import { scrollToHashTarget } from "./hash-scroll.js";
|
|
4
6
|
import { notifyAppRouterTransitionStart } from "../client/instrumentation-client-state.js";
|
|
5
7
|
import { AppElementsWire } from "../server/app-elements-wire.js";
|
|
6
8
|
import "../server/app-elements.js";
|
|
7
|
-
import {
|
|
9
|
+
import { createExternalHistoryStatePreservingMetadata } from "../server/app-history-state.js";
|
|
10
|
+
import { VINEXT_RSC_COMPATIBILITY_ID_HEADER, createRscRequestHeaders, createRscRequestUrl } from "../server/app-rsc-cache-busting.js";
|
|
8
11
|
import { ReadonlyURLSearchParams } from "./readonly-url-search-params.js";
|
|
12
|
+
import { AppRouterContext } from "./internal/app-router-context.js";
|
|
13
|
+
import { UnrecognizedActionError, unstable_isUnrecognizedActionError } from "./unrecognized-action-error.js";
|
|
9
14
|
import * as React$1 from "react";
|
|
10
15
|
//#region src/shims/navigation.ts
|
|
11
16
|
/**
|
|
@@ -102,6 +107,16 @@ function _registerStateAccessors(accessors) {
|
|
|
102
107
|
_getInsertedHTMLCallbacks = accessors.getInsertedHTMLCallbacks;
|
|
103
108
|
_clearInsertedHTMLCallbacks = accessors.clearInsertedHTMLCallbacks;
|
|
104
109
|
}
|
|
110
|
+
const PAGES_NAVIGATION_ACCESSOR_KEY = Symbol.for("vinext.navigation.pagesNavigationContextAccessor");
|
|
111
|
+
function _getPagesNavigationContext() {
|
|
112
|
+
const accessor = globalThis[PAGES_NAVIGATION_ACCESSOR_KEY];
|
|
113
|
+
if (!accessor) return null;
|
|
114
|
+
try {
|
|
115
|
+
return accessor();
|
|
116
|
+
} catch {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
105
120
|
/**
|
|
106
121
|
* Get the navigation context for the current SSR/RSC render.
|
|
107
122
|
* Reads from AsyncLocalStorage when available (concurrent-safe),
|
|
@@ -156,18 +171,80 @@ function evictPrefetchCacheIfNeeded() {
|
|
|
156
171
|
if (cache.size < 50) return;
|
|
157
172
|
const now = Date.now();
|
|
158
173
|
const prefetched = getPrefetchedUrls();
|
|
159
|
-
for (const [key, entry] of cache) if (now - entry.timestamp >= 3e4)
|
|
160
|
-
cache.delete(key);
|
|
161
|
-
prefetched.delete(key);
|
|
162
|
-
}
|
|
174
|
+
for (const [key, entry] of cache) if (now - entry.timestamp >= 3e4) deletePrefetchCacheEntry(cache, prefetched, key, entry, true);
|
|
163
175
|
while (cache.size >= 50) {
|
|
164
176
|
const oldest = cache.keys().next().value;
|
|
165
177
|
if (oldest !== void 0) {
|
|
166
|
-
cache.
|
|
167
|
-
prefetched
|
|
178
|
+
const entry = cache.get(oldest);
|
|
179
|
+
if (entry) deletePrefetchCacheEntry(cache, prefetched, oldest, entry, true);
|
|
180
|
+
else {
|
|
181
|
+
cache.delete(oldest);
|
|
182
|
+
prefetched.delete(oldest);
|
|
183
|
+
}
|
|
168
184
|
} else break;
|
|
169
185
|
}
|
|
170
186
|
}
|
|
187
|
+
function clearPrefetchInvalidation(entry) {
|
|
188
|
+
if (entry.invalidationTimer !== void 0) {
|
|
189
|
+
clearTimeout(entry.invalidationTimer);
|
|
190
|
+
entry.invalidationTimer = void 0;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function notifyPrefetchInvalidated(entry) {
|
|
194
|
+
clearPrefetchInvalidation(entry);
|
|
195
|
+
const callbacks = entry.onInvalidateCallbacks;
|
|
196
|
+
entry.onInvalidateCallbacks = void 0;
|
|
197
|
+
if (callbacks === void 0) return;
|
|
198
|
+
for (const onInvalidate of callbacks) try {
|
|
199
|
+
onInvalidate();
|
|
200
|
+
} catch (error) {
|
|
201
|
+
if (typeof reportError === "function") reportError(error);
|
|
202
|
+
else console.error(error);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
function deletePrefetchCacheEntry(cache, prefetched, cacheKey, entry, notify) {
|
|
206
|
+
cache.delete(cacheKey);
|
|
207
|
+
prefetched.delete(cacheKey);
|
|
208
|
+
if (notify) notifyPrefetchInvalidated(entry);
|
|
209
|
+
else {
|
|
210
|
+
clearPrefetchInvalidation(entry);
|
|
211
|
+
entry.onInvalidateCallbacks = void 0;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function invalidatePrefetchCacheEntry(cacheKey) {
|
|
215
|
+
const cache = getPrefetchCache();
|
|
216
|
+
const entry = cache.get(cacheKey);
|
|
217
|
+
if (!entry) return;
|
|
218
|
+
deletePrefetchCacheEntry(cache, getPrefetchedUrls(), cacheKey, entry, true);
|
|
219
|
+
}
|
|
220
|
+
function schedulePrefetchInvalidation(cacheKey, entry) {
|
|
221
|
+
if (entry.onInvalidateCallbacks === void 0 || entry.onInvalidateCallbacks.size === 0) return;
|
|
222
|
+
clearPrefetchInvalidation(entry);
|
|
223
|
+
const elapsed = Date.now() - entry.timestamp;
|
|
224
|
+
const delay = Math.max(0, PREFETCH_CACHE_TTL - elapsed);
|
|
225
|
+
entry.invalidationTimer = setTimeout(() => {
|
|
226
|
+
invalidatePrefetchCacheEntry(cacheKey);
|
|
227
|
+
}, delay);
|
|
228
|
+
}
|
|
229
|
+
function addPrefetchInvalidationCallback(entry, onInvalidate) {
|
|
230
|
+
if (onInvalidate === void 0) return;
|
|
231
|
+
if (entry.onInvalidateCallbacks === void 0) entry.onInvalidateCallbacks = /* @__PURE__ */ new Set();
|
|
232
|
+
entry.onInvalidateCallbacks.add(onInvalidate);
|
|
233
|
+
}
|
|
234
|
+
function attachPrefetchInvalidationCallback(cacheKey, onInvalidate) {
|
|
235
|
+
if (onInvalidate === void 0) return;
|
|
236
|
+
const entry = getPrefetchCache().get(cacheKey);
|
|
237
|
+
if (!entry) return;
|
|
238
|
+
addPrefetchInvalidationCallback(entry, onInvalidate);
|
|
239
|
+
if (entry.outcome === "cache-seeded") schedulePrefetchInvalidation(cacheKey, entry);
|
|
240
|
+
}
|
|
241
|
+
function invalidatePrefetchCache() {
|
|
242
|
+
const cache = getPrefetchCache();
|
|
243
|
+
const prefetched = getPrefetchedUrls();
|
|
244
|
+
for (const [cacheKey, entry] of cache) deletePrefetchCacheEntry(cache, prefetched, cacheKey, entry, true);
|
|
245
|
+
prefetched.clear();
|
|
246
|
+
if (!isServer) window.__VINEXT_PING_VISIBLE_LINKS__?.();
|
|
247
|
+
}
|
|
171
248
|
/**
|
|
172
249
|
* Store a prefetched RSC response in the cache by snapshotting it to an
|
|
173
250
|
* ArrayBuffer. The snapshot completes asynchronously; during that window
|
|
@@ -184,35 +261,43 @@ function evictPrefetchCacheIfNeeded() {
|
|
|
184
261
|
* NB: Caller is responsible for managing getPrefetchedUrls() — this
|
|
185
262
|
* function only stores the response in the prefetch cache.
|
|
186
263
|
*/
|
|
187
|
-
function storePrefetchResponse(rscUrl, response, interceptionContext = null) {
|
|
264
|
+
function storePrefetchResponse(rscUrl, response, interceptionContext = null, options) {
|
|
188
265
|
const cacheKey = AppElementsWire.encodeCacheKey(rscUrl, interceptionContext);
|
|
189
266
|
evictPrefetchCacheIfNeeded();
|
|
190
267
|
const entry = {
|
|
191
268
|
outcome: "pending",
|
|
192
269
|
timestamp: Date.now()
|
|
193
270
|
};
|
|
271
|
+
addPrefetchInvalidationCallback(entry, options?.onInvalidate);
|
|
194
272
|
entry.pending = snapshotRscResponse(response).then((snapshot) => {
|
|
195
273
|
entry.snapshot = snapshot;
|
|
196
274
|
}).catch(() => {
|
|
197
|
-
getPrefetchCache()
|
|
275
|
+
deletePrefetchCacheEntry(getPrefetchCache(), getPrefetchedUrls(), cacheKey, entry, false);
|
|
198
276
|
}).finally(() => {
|
|
199
277
|
entry.pending = void 0;
|
|
200
|
-
if (entry.snapshot)
|
|
278
|
+
if (entry.snapshot) {
|
|
279
|
+
entry.outcome = "cache-seeded";
|
|
280
|
+
schedulePrefetchInvalidation(cacheKey, entry);
|
|
281
|
+
}
|
|
201
282
|
});
|
|
202
283
|
getPrefetchCache().set(cacheKey, entry);
|
|
203
284
|
}
|
|
285
|
+
function createCachedRscResponseSnapshot(response, buffer, responseUrl = null) {
|
|
286
|
+
return {
|
|
287
|
+
compatibilityIdHeader: response.headers.get(VINEXT_RSC_COMPATIBILITY_ID_HEADER),
|
|
288
|
+
buffer,
|
|
289
|
+
contentType: response.headers.get("content-type") ?? "text/x-component",
|
|
290
|
+
mountedSlotsHeader: response.headers.get(VINEXT_MOUNTED_SLOTS_HEADER),
|
|
291
|
+
paramsHeader: response.headers.get(VINEXT_PARAMS_HEADER),
|
|
292
|
+
url: responseUrl ?? response.url
|
|
293
|
+
};
|
|
294
|
+
}
|
|
204
295
|
/**
|
|
205
296
|
* Snapshot an RSC response to an ArrayBuffer for caching and replay.
|
|
206
297
|
* Consumes the response body and stores it with content-type and URL metadata.
|
|
207
298
|
*/
|
|
208
299
|
async function snapshotRscResponse(response) {
|
|
209
|
-
return
|
|
210
|
-
buffer: await response.arrayBuffer(),
|
|
211
|
-
contentType: response.headers.get("content-type") ?? "text/x-component",
|
|
212
|
-
mountedSlotsHeader: response.headers.get("X-Vinext-Mounted-Slots"),
|
|
213
|
-
paramsHeader: response.headers.get("X-Vinext-Params"),
|
|
214
|
-
url: response.url
|
|
215
|
-
};
|
|
300
|
+
return createCachedRscResponseSnapshot(response, await response.arrayBuffer());
|
|
216
301
|
}
|
|
217
302
|
/**
|
|
218
303
|
* Reconstruct a Response from a cached RSC snapshot.
|
|
@@ -231,8 +316,9 @@ async function snapshotRscResponse(response) {
|
|
|
231
316
|
*/
|
|
232
317
|
function restoreRscResponse(cached, copy = true) {
|
|
233
318
|
const headers = new Headers({ "content-type": cached.contentType });
|
|
234
|
-
if (cached.mountedSlotsHeader != null) headers.set(
|
|
235
|
-
if (cached.
|
|
319
|
+
if (cached.mountedSlotsHeader != null) headers.set(VINEXT_MOUNTED_SLOTS_HEADER, cached.mountedSlotsHeader);
|
|
320
|
+
if (cached.compatibilityIdHeader != null) headers.set(VINEXT_RSC_COMPATIBILITY_ID_HEADER, cached.compatibilityIdHeader);
|
|
321
|
+
if (cached.paramsHeader != null) headers.set(VINEXT_PARAMS_HEADER, cached.paramsHeader);
|
|
236
322
|
return new Response(copy ? cached.buffer.slice(0) : cached.buffer, {
|
|
237
323
|
status: 200,
|
|
238
324
|
headers
|
|
@@ -245,7 +331,7 @@ function restoreRscResponse(cached, copy = true) {
|
|
|
245
331
|
* Enforces a maximum cache size to prevent unbounded memory growth on
|
|
246
332
|
* link-heavy pages.
|
|
247
333
|
*/
|
|
248
|
-
function prefetchRscResponse(rscUrl, fetchPromise, interceptionContext = null, mountedSlotsHeader = null) {
|
|
334
|
+
function prefetchRscResponse(rscUrl, fetchPromise, interceptionContext = null, mountedSlotsHeader = null, options) {
|
|
249
335
|
const cacheKey = AppElementsWire.encodeCacheKey(rscUrl, interceptionContext);
|
|
250
336
|
const cache = getPrefetchCache();
|
|
251
337
|
const prefetched = getPrefetchedUrls();
|
|
@@ -253,21 +339,21 @@ function prefetchRscResponse(rscUrl, fetchPromise, interceptionContext = null, m
|
|
|
253
339
|
outcome: "pending",
|
|
254
340
|
timestamp: Date.now()
|
|
255
341
|
};
|
|
342
|
+
addPrefetchInvalidationCallback(entry, options?.onInvalidate);
|
|
256
343
|
entry.pending = fetchPromise.then(async (response) => {
|
|
257
344
|
if (response.ok) entry.snapshot = {
|
|
258
345
|
...await snapshotRscResponse(response),
|
|
259
346
|
mountedSlotsHeader
|
|
260
347
|
};
|
|
261
|
-
else
|
|
262
|
-
prefetched.delete(cacheKey);
|
|
263
|
-
cache.delete(cacheKey);
|
|
264
|
-
}
|
|
348
|
+
else deletePrefetchCacheEntry(cache, prefetched, cacheKey, entry, false);
|
|
265
349
|
}).catch(() => {
|
|
266
|
-
prefetched
|
|
267
|
-
cache.delete(cacheKey);
|
|
350
|
+
deletePrefetchCacheEntry(cache, prefetched, cacheKey, entry, false);
|
|
268
351
|
}).finally(() => {
|
|
269
352
|
entry.pending = void 0;
|
|
270
|
-
if (entry.snapshot)
|
|
353
|
+
if (entry.snapshot) {
|
|
354
|
+
entry.outcome = "cache-seeded";
|
|
355
|
+
schedulePrefetchInvalidation(cacheKey, entry);
|
|
356
|
+
}
|
|
271
357
|
});
|
|
272
358
|
cache.set(cacheKey, entry);
|
|
273
359
|
evictPrefetchCacheIfNeeded();
|
|
@@ -283,8 +369,7 @@ function consumePrefetchResponse(rscUrl, interceptionContext = null, mountedSlot
|
|
|
283
369
|
const entry = cache.get(cacheKey);
|
|
284
370
|
if (!entry) return null;
|
|
285
371
|
if (entry.pending || entry.outcome !== "cache-seeded") return null;
|
|
286
|
-
cache
|
|
287
|
-
getPrefetchedUrls().delete(cacheKey);
|
|
372
|
+
deletePrefetchCacheEntry(cache, getPrefetchedUrls(), cacheKey, entry, false);
|
|
288
373
|
if (entry.snapshot) {
|
|
289
374
|
if ((entry.snapshot.mountedSlotsHeader ?? null) !== mountedSlotsHeader) return null;
|
|
290
375
|
if (Date.now() - entry.timestamp >= 3e4) return null;
|
|
@@ -378,6 +463,8 @@ function syncCommittedUrlStateFromLocation() {
|
|
|
378
463
|
function getServerSearchParamsSnapshot() {
|
|
379
464
|
const ctx = _getServerContext();
|
|
380
465
|
if (!ctx) {
|
|
466
|
+
const pagesCtx = _getPagesNavigationContext();
|
|
467
|
+
if (pagesCtx) return new ReadonlyURLSearchParams(pagesCtx.searchParams);
|
|
381
468
|
if (_cachedEmptyServerSearchParams === null) _cachedEmptyServerSearchParams = new ReadonlyURLSearchParams();
|
|
382
469
|
return _cachedEmptyServerSearchParams;
|
|
383
470
|
}
|
|
@@ -487,10 +574,16 @@ function clearPendingPathname(navId) {
|
|
|
487
574
|
}
|
|
488
575
|
}
|
|
489
576
|
function getClientParamsSnapshot() {
|
|
490
|
-
|
|
577
|
+
const state = getClientNavigationState();
|
|
578
|
+
if (state && Object.keys(state.clientParams).length > 0) return state.clientParams;
|
|
579
|
+
const pagesCtx = _getPagesNavigationContext();
|
|
580
|
+
if (pagesCtx) return pagesCtx.params;
|
|
581
|
+
return state?.clientParams ?? _EMPTY_PARAMS;
|
|
491
582
|
}
|
|
492
583
|
function getServerParamsSnapshot() {
|
|
493
|
-
|
|
584
|
+
const ctx = _getServerContext();
|
|
585
|
+
if (ctx) return ctx.params;
|
|
586
|
+
return _getPagesNavigationContext()?.params ?? _EMPTY_PARAMS;
|
|
494
587
|
}
|
|
495
588
|
function subscribeToNavigation(cb) {
|
|
496
589
|
const state = getClientNavigationState();
|
|
@@ -505,9 +598,13 @@ function subscribeToNavigation(cb) {
|
|
|
505
598
|
* Server: from request context. Client: from window.location.
|
|
506
599
|
*/
|
|
507
600
|
function usePathname() {
|
|
508
|
-
if (isServer)
|
|
601
|
+
if (isServer) {
|
|
602
|
+
const ctx = _getServerContext();
|
|
603
|
+
if (ctx) return ctx.pathname;
|
|
604
|
+
return _getPagesNavigationContext()?.pathname ?? "/";
|
|
605
|
+
}
|
|
509
606
|
const renderSnapshot = useClientNavigationRenderSnapshot();
|
|
510
|
-
const pathname = React$1.useSyncExternalStore(subscribeToNavigation, getPathnameSnapshot, () => _getServerContext()?.pathname ?? "/");
|
|
607
|
+
const pathname = React$1.useSyncExternalStore(subscribeToNavigation, getPathnameSnapshot, () => _getServerContext()?.pathname ?? _getPagesNavigationContext()?.pathname ?? "/");
|
|
511
608
|
if (renderSnapshot && (getClientNavigationState()?.navigationSnapshotActiveCount ?? 0) > 0) return renderSnapshot.pathname;
|
|
512
609
|
return pathname;
|
|
513
610
|
}
|
|
@@ -525,7 +622,7 @@ function useSearchParams() {
|
|
|
525
622
|
* Returns the dynamic params for the current route.
|
|
526
623
|
*/
|
|
527
624
|
function useParams() {
|
|
528
|
-
if (isServer) return
|
|
625
|
+
if (isServer) return getServerParamsSnapshot();
|
|
529
626
|
const renderSnapshot = useClientNavigationRenderSnapshot();
|
|
530
627
|
const params = React$1.useSyncExternalStore(subscribeToNavigation, getClientParamsSnapshot, getServerParamsSnapshot);
|
|
531
628
|
if (renderSnapshot && (getClientNavigationState()?.navigationSnapshotActiveCount ?? 0) > 0) return renderSnapshot.params;
|
|
@@ -535,7 +632,7 @@ function useParams() {
|
|
|
535
632
|
* Check if a href is an external URL (any URL scheme per RFC 3986, or protocol-relative).
|
|
536
633
|
*/
|
|
537
634
|
function isExternalUrl(href) {
|
|
538
|
-
return
|
|
635
|
+
return isAbsoluteOrProtocolRelativeUrl(href);
|
|
539
636
|
}
|
|
540
637
|
/**
|
|
541
638
|
* Check if a href is only a hash change relative to the current URL.
|
|
@@ -543,25 +640,7 @@ function isExternalUrl(href) {
|
|
|
543
640
|
function isHashOnlyChange(href) {
|
|
544
641
|
if (typeof window === "undefined") return false;
|
|
545
642
|
if (href.startsWith("#")) return true;
|
|
546
|
-
|
|
547
|
-
const current = new URL(window.location.href);
|
|
548
|
-
const next = new URL(href, window.location.href);
|
|
549
|
-
return stripBasePath(current.pathname, __basePath) === stripBasePath(next.pathname, __basePath) && current.search === next.search && next.hash !== "";
|
|
550
|
-
} catch {
|
|
551
|
-
return false;
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* Scroll to a hash target element, or to the top if no hash.
|
|
556
|
-
*/
|
|
557
|
-
function scrollToHash(hash) {
|
|
558
|
-
if (!hash || hash === "#") {
|
|
559
|
-
window.scrollTo(0, 0);
|
|
560
|
-
return;
|
|
561
|
-
}
|
|
562
|
-
const id = hash.slice(1);
|
|
563
|
-
const element = document.getElementById(id);
|
|
564
|
-
if (element) element.scrollIntoView({ behavior: "auto" });
|
|
643
|
+
return isHashOnlyBrowserUrlChange(href, window.location.href, __basePath);
|
|
565
644
|
}
|
|
566
645
|
function withSuppressedUrlNotifications(fn) {
|
|
567
646
|
const state = getClientNavigationState();
|
|
@@ -599,7 +678,10 @@ function commitClientNavigationState(navId, options) {
|
|
|
599
678
|
}
|
|
600
679
|
const shouldNotify = urlChanged || state.hasPendingNavigationUpdate;
|
|
601
680
|
state.hasPendingNavigationUpdate = false;
|
|
602
|
-
if (shouldNotify)
|
|
681
|
+
if (shouldNotify) {
|
|
682
|
+
notifyNavigationListeners();
|
|
683
|
+
window.__VINEXT_PING_VISIBLE_LINKS__?.();
|
|
684
|
+
}
|
|
603
685
|
}
|
|
604
686
|
function pushHistoryStateWithoutNotify(data, unused, url) {
|
|
605
687
|
withSuppressedUrlNotifications(() => {
|
|
@@ -625,6 +707,15 @@ function saveScrollPosition() {
|
|
|
625
707
|
__vinext_scrollY: window.scrollY
|
|
626
708
|
}, "");
|
|
627
709
|
}
|
|
710
|
+
function commitHashOnlyHistoryState(href, mode, scroll) {
|
|
711
|
+
const commitAppRouterHashNavigation = window.__VINEXT_RSC_COMMIT_HASH_NAVIGATION__;
|
|
712
|
+
if (commitAppRouterHashNavigation) {
|
|
713
|
+
commitAppRouterHashNavigation(href, mode, scroll);
|
|
714
|
+
return;
|
|
715
|
+
}
|
|
716
|
+
if (mode === "replace") replaceHistoryStateWithoutNotify(null, "", href);
|
|
717
|
+
else pushHistoryStateWithoutNotify(null, "", href);
|
|
718
|
+
}
|
|
628
719
|
/**
|
|
629
720
|
* Restore scroll position from a history state object (used on popstate).
|
|
630
721
|
*
|
|
@@ -675,10 +766,9 @@ async function navigateClientSide(href, mode, scroll, programmaticTransition = f
|
|
|
675
766
|
if (mode === "push") saveScrollPosition();
|
|
676
767
|
if (isHashOnlyChange(fullHref)) {
|
|
677
768
|
const hash = fullHref.includes("#") ? fullHref.slice(fullHref.indexOf("#")) : "";
|
|
678
|
-
|
|
679
|
-
else pushHistoryStateWithoutNotify(null, "", fullHref);
|
|
769
|
+
commitHashOnlyHistoryState(fullHref, mode, scroll);
|
|
680
770
|
commitClientNavigationState();
|
|
681
|
-
if (scroll)
|
|
771
|
+
if (scroll) scrollToHashTarget(hash);
|
|
682
772
|
return;
|
|
683
773
|
}
|
|
684
774
|
const hashIdx = fullHref.indexOf("#");
|
|
@@ -689,10 +779,18 @@ async function navigateClientSide(href, mode, scroll, programmaticTransition = f
|
|
|
689
779
|
else pushHistoryStateWithoutNotify(null, "", fullHref);
|
|
690
780
|
commitClientNavigationState();
|
|
691
781
|
}
|
|
692
|
-
if (scroll) if (hash)
|
|
782
|
+
if (scroll) if (hash) scrollToHashTarget(hash);
|
|
693
783
|
else window.scrollTo(0, 0);
|
|
694
784
|
}
|
|
695
|
-
|
|
785
|
+
/**
|
|
786
|
+
* Public App Router instance, exposed for the browser entry so it can wire
|
|
787
|
+
* `window.next.router` to the same singleton returned from `useRouter()`.
|
|
788
|
+
*
|
|
789
|
+
* Mirrors `publicAppRouterInstance` from Next.js's
|
|
790
|
+
* `packages/next/src/client/components/app-router-instance.ts` (line 392).
|
|
791
|
+
*/
|
|
792
|
+
const appRouterInstance = {
|
|
793
|
+
bfcacheId: "0",
|
|
696
794
|
push(href, options) {
|
|
697
795
|
assertSafeNavigationUrl(href);
|
|
698
796
|
if (isServer) return;
|
|
@@ -717,6 +815,8 @@ const _appRouter = {
|
|
|
717
815
|
},
|
|
718
816
|
refresh() {
|
|
719
817
|
if (isServer) return;
|
|
818
|
+
const clearCaches = window.__VINEXT_CLEAR_NAV_CACHES__;
|
|
819
|
+
if (typeof clearCaches === "function") clearCaches();
|
|
720
820
|
const rscNavigate = window.__VINEXT_RSC_NAVIGATE__;
|
|
721
821
|
if (typeof rscNavigate === "function") {
|
|
722
822
|
const navigate = () => {
|
|
@@ -725,12 +825,12 @@ const _appRouter = {
|
|
|
725
825
|
React$1.startTransition(navigate);
|
|
726
826
|
}
|
|
727
827
|
},
|
|
728
|
-
prefetch(href) {
|
|
828
|
+
prefetch(href, options) {
|
|
729
829
|
assertSafeNavigationUrl(href);
|
|
730
830
|
if (isServer) return;
|
|
731
831
|
(async () => {
|
|
732
832
|
let prefetchHref = href;
|
|
733
|
-
if (
|
|
833
|
+
if (isAbsoluteOrProtocolRelativeUrl(href)) {
|
|
734
834
|
const localPath = toSameOriginAppPath(href, __basePath);
|
|
735
835
|
if (localPath == null) return;
|
|
736
836
|
prefetchHref = localPath;
|
|
@@ -739,17 +839,20 @@ const _appRouter = {
|
|
|
739
839
|
const interceptionContext = getCurrentInterceptionContext();
|
|
740
840
|
const mountedSlotsHeader = getMountedSlotsHeader();
|
|
741
841
|
const headers = createRscRequestHeaders({ interceptionContext });
|
|
742
|
-
if (mountedSlotsHeader) headers.set(
|
|
842
|
+
if (mountedSlotsHeader) headers.set(VINEXT_MOUNTED_SLOTS_HEADER, mountedSlotsHeader);
|
|
743
843
|
const rscUrl = await createRscRequestUrl(fullHref, headers);
|
|
744
844
|
const cacheKey = AppElementsWire.encodeCacheKey(rscUrl, interceptionContext);
|
|
745
845
|
const prefetched = getPrefetchedUrls();
|
|
746
|
-
if (prefetched.has(cacheKey))
|
|
846
|
+
if (prefetched.has(cacheKey)) {
|
|
847
|
+
attachPrefetchInvalidationCallback(cacheKey, options?.onInvalidate);
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
747
850
|
prefetched.add(cacheKey);
|
|
748
851
|
prefetchRscResponse(rscUrl, fetch(rscUrl, {
|
|
749
852
|
headers,
|
|
750
853
|
credentials: "include",
|
|
751
854
|
priority: "low"
|
|
752
|
-
}), interceptionContext, mountedSlotsHeader);
|
|
855
|
+
}), interceptionContext, mountedSlotsHeader, options);
|
|
753
856
|
})().catch((error) => {
|
|
754
857
|
console.error("[vinext] RSC prefetch setup error:", error);
|
|
755
858
|
});
|
|
@@ -764,7 +867,10 @@ const _appRouter = {
|
|
|
764
867
|
* (e.g. useMemo / useEffect deps, React.memo) don't re-render unnecessarily.
|
|
765
868
|
*/
|
|
766
869
|
function useRouter() {
|
|
767
|
-
|
|
870
|
+
if (!AppRouterContext || typeof React$1.useContext !== "function") throw new Error("invariant expected app router to be mounted");
|
|
871
|
+
const router = React$1.useContext(AppRouterContext);
|
|
872
|
+
if (router === null) throw new Error("invariant expected app router to be mounted");
|
|
873
|
+
return router;
|
|
768
874
|
}
|
|
769
875
|
/**
|
|
770
876
|
* Returns the active child segment one level below the layout where it's called.
|
|
@@ -949,6 +1055,165 @@ function forbidden() {
|
|
|
949
1055
|
function unauthorized() {
|
|
950
1056
|
throw new VinextNavigationError("NEXT_UNAUTHORIZED", `${HTTP_ERROR_FALLBACK_ERROR_CODE};401`);
|
|
951
1057
|
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Check whether an error was produced by `redirect()` or `permanentRedirect()`.
|
|
1060
|
+
*
|
|
1061
|
+
* **Note on vinext public surface:** Next.js does NOT expose `isRedirectError`
|
|
1062
|
+
* from `next/navigation` — it's an internal predicate. vinext exposes it for
|
|
1063
|
+
* symmetry with the already-public `isHTTPAccessFallbackError` and because
|
|
1064
|
+
* `unstable_rethrow` consumers benefit from being able to narrow types.
|
|
1065
|
+
* Treat it as a vinext-only extension.
|
|
1066
|
+
*
|
|
1067
|
+
* **Divergence from Next.js:** Next.js's internal `isRedirectError` performs
|
|
1068
|
+
* full 4-segment validation — it splits the digest on `;`, checks `type` ∈
|
|
1069
|
+
* {push, replace}, requires a non-empty destination, and validates the
|
|
1070
|
+
* status code (303, 307, 308). See:
|
|
1071
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/redirect-error.ts
|
|
1072
|
+
*
|
|
1073
|
+
* vinext instead uses a simple prefix check (`startsWith("NEXT_REDIRECT;")`).
|
|
1074
|
+
* Reasons:
|
|
1075
|
+
* 1. vinext emits two digest shapes — 3-part for `redirect()`
|
|
1076
|
+
* (`NEXT_REDIRECT;{type};{encoded-url}`) and 4-part for
|
|
1077
|
+
* `permanentRedirect()` (`NEXT_REDIRECT;{type};{encoded-url};308`).
|
|
1078
|
+
* Strict validation would have to special-case both, and Next.js's
|
|
1079
|
+
* validator (tuned to its 5-part canary digests) rejects them.
|
|
1080
|
+
* 2. The `type` field is sometimes empty in vinext's redirect digests
|
|
1081
|
+
* (context-dependent resolution; see `redirect()` above), which the
|
|
1082
|
+
* strict check disallows.
|
|
1083
|
+
*
|
|
1084
|
+
* **Consequence:** A malformed digest such as `"NEXT_REDIRECT;garbage"`
|
|
1085
|
+
* returns `true` here, whereas Next.js would return `false`. In practice,
|
|
1086
|
+
* the only callers of this predicate are vinext-internal code paths
|
|
1087
|
+
* (`unstable_rethrow`, `unstable_catchError`, the redirect error boundary)
|
|
1088
|
+
* that see digests vinext itself emits — so the divergence does not surface
|
|
1089
|
+
* in normal use. Maintainers extending the prefix logic should keep this
|
|
1090
|
+
* predicate in lockstep with the corresponding `decode*` helpers in
|
|
1091
|
+
* `shims/error-boundary.tsx`.
|
|
1092
|
+
*/
|
|
1093
|
+
function isRedirectError(error) {
|
|
1094
|
+
if (!error || typeof error !== "object" || !("digest" in error) || typeof error.digest !== "string") return false;
|
|
1095
|
+
return error.digest.startsWith("NEXT_REDIRECT;");
|
|
1096
|
+
}
|
|
1097
|
+
/**
|
|
1098
|
+
* Returns true if the error is a Next.js navigation signal — either a redirect
|
|
1099
|
+
* or an HTTP access fallback (notFound / forbidden / unauthorized).
|
|
1100
|
+
*
|
|
1101
|
+
* **Note on vinext public surface:** Like `isRedirectError`, Next.js does NOT
|
|
1102
|
+
* expose this from `next/navigation`. vinext exposes it for symmetry — treat
|
|
1103
|
+
* it as a vinext-only extension.
|
|
1104
|
+
*
|
|
1105
|
+
* Ported from Next.js:
|
|
1106
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/is-next-router-error.ts
|
|
1107
|
+
*/
|
|
1108
|
+
function isNextRouterError(error) {
|
|
1109
|
+
return isRedirectError(error) || isHTTPAccessFallbackError(error);
|
|
1110
|
+
}
|
|
1111
|
+
const _BAILOUT_TO_CSR_DIGEST = "BAILOUT_TO_CLIENT_SIDE_RENDERING";
|
|
1112
|
+
/**
|
|
1113
|
+
* Error thrown to bail out of server rendering and fall back to client-side
|
|
1114
|
+
* rendering. Used by `next/dynamic` with `ssr: false`.
|
|
1115
|
+
*
|
|
1116
|
+
* vinext does not yet emit this error itself — it's exposed so user code and
|
|
1117
|
+
* third-party libraries that mimic `next/dynamic`'s bailout semantics can
|
|
1118
|
+
* construct an error with the canonical digest that `unstable_rethrow`
|
|
1119
|
+
* recognises.
|
|
1120
|
+
*
|
|
1121
|
+
* Ported 1:1 from Next.js:
|
|
1122
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/lazy-dynamic/bailout-to-csr.ts
|
|
1123
|
+
*/
|
|
1124
|
+
var BailoutToCSRError = class extends Error {
|
|
1125
|
+
digest = _BAILOUT_TO_CSR_DIGEST;
|
|
1126
|
+
reason;
|
|
1127
|
+
constructor(reason) {
|
|
1128
|
+
super(`Bail out to client-side rendering: ${reason}`);
|
|
1129
|
+
this.reason = reason;
|
|
1130
|
+
}
|
|
1131
|
+
};
|
|
1132
|
+
/**
|
|
1133
|
+
* Returns true if the error is a `BailoutToCSRError`. Matches Next.js's
|
|
1134
|
+
* digest-based predicate, so any error from a foreign module instance of
|
|
1135
|
+
* the class (or constructed manually with the canonical digest) is also
|
|
1136
|
+
* detected.
|
|
1137
|
+
*
|
|
1138
|
+
* **Note on vinext public surface:** Next.js does NOT expose this from
|
|
1139
|
+
* `next/navigation`. vinext exposes it for symmetry with `isRedirectError`
|
|
1140
|
+
* — treat it as a vinext-only extension. The matching producer
|
|
1141
|
+
* (`BailoutToCSRError`) is the public detection contract; Next.js exposes
|
|
1142
|
+
* neither.
|
|
1143
|
+
*
|
|
1144
|
+
* Ported from Next.js:
|
|
1145
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/lazy-dynamic/bailout-to-csr.ts
|
|
1146
|
+
*/
|
|
1147
|
+
function isBailoutToCSRError(error) {
|
|
1148
|
+
if (!error || typeof error !== "object" || !("digest" in error)) return false;
|
|
1149
|
+
return error.digest === _BAILOUT_TO_CSR_DIGEST;
|
|
1150
|
+
}
|
|
1151
|
+
const _DYNAMIC_SERVER_USAGE_DIGEST = "DYNAMIC_SERVER_USAGE";
|
|
1152
|
+
/**
|
|
1153
|
+
* Error thrown when dynamic server APIs (`cookies()`, `headers()`, etc.) are
|
|
1154
|
+
* used inside a static/prerender context. Carries the `DYNAMIC_SERVER_USAGE`
|
|
1155
|
+
* digest so `unstable_rethrow` can recognise and propagate it.
|
|
1156
|
+
*
|
|
1157
|
+
* vinext does not construct this error itself — exposed for the same
|
|
1158
|
+
* "stable detection contract" reason as `BailoutToCSRError` above.
|
|
1159
|
+
*
|
|
1160
|
+
* Ported 1:1 from Next.js:
|
|
1161
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/hooks-server-context.ts
|
|
1162
|
+
*/
|
|
1163
|
+
var DynamicServerError = class extends Error {
|
|
1164
|
+
digest = _DYNAMIC_SERVER_USAGE_DIGEST;
|
|
1165
|
+
description;
|
|
1166
|
+
constructor(description) {
|
|
1167
|
+
super(`Dynamic server usage: ${description}`);
|
|
1168
|
+
this.description = description;
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1171
|
+
/**
|
|
1172
|
+
* Returns true if the error is a `DynamicServerError` (or any error with the
|
|
1173
|
+
* canonical `DYNAMIC_SERVER_USAGE` digest).
|
|
1174
|
+
*
|
|
1175
|
+
* **Note on vinext public surface:** Next.js does NOT expose this from
|
|
1176
|
+
* `next/navigation`. vinext exposes it for symmetry — treat it as a
|
|
1177
|
+
* vinext-only extension.
|
|
1178
|
+
*
|
|
1179
|
+
* Ported from Next.js:
|
|
1180
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/hooks-server-context.ts
|
|
1181
|
+
*/
|
|
1182
|
+
function isDynamicServerError(error) {
|
|
1183
|
+
if (!error || typeof error !== "object" || !("digest" in error)) return false;
|
|
1184
|
+
return error.digest === _DYNAMIC_SERVER_USAGE_DIGEST;
|
|
1185
|
+
}
|
|
1186
|
+
/**
|
|
1187
|
+
* Rethrow internal Next.js errors so they're handled by the framework.
|
|
1188
|
+
*
|
|
1189
|
+
* When wrapping an API that uses errors for control flow (redirect, notFound,
|
|
1190
|
+
* cookies in static render, `next/dynamic` SSR bailout, etc.), call this
|
|
1191
|
+
* inside `catch` blocks before doing your own error handling. If the error
|
|
1192
|
+
* is a Next.js internal error, it's rethrown; otherwise this is a no-op
|
|
1193
|
+
* (apart from recursing through `error.cause`).
|
|
1194
|
+
*
|
|
1195
|
+
* Recognises (matches Next.js's browser build + the subset of the server
|
|
1196
|
+
* build that vinext can realistically encounter):
|
|
1197
|
+
* - `isNextRouterError`: redirect / notFound / forbidden / unauthorized
|
|
1198
|
+
* - `isBailoutToCSRError`: `next/dynamic` `ssr: false` bailout
|
|
1199
|
+
* - `isDynamicServerError`: dynamic API used in static render
|
|
1200
|
+
*
|
|
1201
|
+
* vinext does not yet recognise four additional server-only Next.js
|
|
1202
|
+
* categories — `isDynamicPostpone`, `isPostpone`,
|
|
1203
|
+
* `isHangingPromiseRejectionError`, `isPrerenderInterruptedError` — because
|
|
1204
|
+
* they signal PPR / prerender-controller events that vinext's render
|
|
1205
|
+
* pipeline does not generate. User code cannot construct these in normal
|
|
1206
|
+
* use; they will be added if/when vinext grows PPR support.
|
|
1207
|
+
*
|
|
1208
|
+
* Ported from Next.js:
|
|
1209
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/unstable-rethrow.ts
|
|
1210
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/unstable-rethrow.server.ts
|
|
1211
|
+
* https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/unstable-rethrow.browser.ts
|
|
1212
|
+
*/
|
|
1213
|
+
function unstable_rethrow(error) {
|
|
1214
|
+
if (isNextRouterError(error) || isBailoutToCSRError(error) || isDynamicServerError(error)) throw error;
|
|
1215
|
+
if (error instanceof Error && "cause" in error) unstable_rethrow(error.cause);
|
|
1216
|
+
}
|
|
952
1217
|
if (!isServer) {
|
|
953
1218
|
const state = getClientNavigationState();
|
|
954
1219
|
if (state && !state.patchInstalled) {
|
|
@@ -960,16 +1225,16 @@ if (!isServer) {
|
|
|
960
1225
|
}
|
|
961
1226
|
});
|
|
962
1227
|
window.history.pushState = function patchedPushState(data, unused, url) {
|
|
963
|
-
state.originalPushState.call(window.history, data, unused, url);
|
|
1228
|
+
state.originalPushState.call(window.history, createExternalHistoryStatePreservingMetadata(data, window.history.state), unused, url);
|
|
964
1229
|
if (state.suppressUrlNotifyCount === 0) commitClientNavigationState();
|
|
965
1230
|
};
|
|
966
1231
|
window.history.replaceState = function patchedReplaceState(data, unused, url) {
|
|
967
|
-
state.originalReplaceState.call(window.history, data, unused, url);
|
|
1232
|
+
state.originalReplaceState.call(window.history, createExternalHistoryStatePreservingMetadata(data, window.history.state), unused, url);
|
|
968
1233
|
if (state.suppressUrlNotifyCount === 0) commitClientNavigationState();
|
|
969
1234
|
};
|
|
970
1235
|
}
|
|
971
1236
|
}
|
|
972
1237
|
//#endregion
|
|
973
|
-
export { GLOBAL_ACCESSORS_KEY, HTTP_ERROR_FALLBACK_ERROR_CODE, MAX_PREFETCH_CACHE_SIZE, PREFETCH_CACHE_TTL, ReadonlyURLSearchParams, RedirectType, ServerInsertedHTMLContext, __basePath, _registerStateAccessors, activateNavigationSnapshot, 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 };
|
|
1238
|
+
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, 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 };
|
|
974
1239
|
|
|
975
1240
|
//# sourceMappingURL=navigation.js.map
|