@rangojs/router 0.0.0-experimental.124 → 0.0.0-experimental.125
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/bin/rango.js +3 -4
- package/dist/vite/index.js +9 -43
- package/package.json +1 -1
- package/skills/hooks/SKILL.md +2 -2
- package/skills/route/SKILL.md +6 -0
- package/src/__internal.ts +0 -65
- package/src/browser/action-coordinator.ts +1 -1
- package/src/browser/action-fence.ts +10 -0
- package/src/browser/event-controller.ts +1 -83
- package/src/browser/navigation-store-handle.ts +3 -4
- package/src/browser/navigation-store.ts +0 -39
- package/src/browser/navigation-transaction.ts +0 -32
- package/src/browser/partial-update.ts +1 -83
- package/src/browser/prefetch/cache.ts +6 -45
- package/src/browser/prefetch/queue.ts +6 -3
- package/src/browser/rango-state.ts +2 -23
- package/src/browser/react/Link.tsx +0 -2
- package/src/browser/react/NavigationProvider.tsx +2 -1
- package/src/browser/react/ScrollRestoration.tsx +10 -6
- package/src/browser/react/filter-segment-order.ts +0 -2
- package/src/browser/react/index.ts +0 -45
- package/src/browser/react/location-state-shared.ts +0 -13
- package/src/browser/react/location-state.ts +0 -1
- package/src/browser/react/use-action.ts +6 -15
- package/src/browser/react/use-handle.ts +0 -5
- package/src/browser/react/use-link-status.ts +0 -4
- package/src/browser/react/use-navigation.ts +0 -3
- package/src/browser/react/use-params.ts +0 -2
- package/src/browser/react/use-search-params.ts +0 -5
- package/src/browser/react/use-segments.ts +0 -13
- package/src/browser/rsc-router.tsx +2 -2
- package/src/browser/types.ts +0 -1
- package/src/browser/validate-redirect-origin.ts +4 -5
- package/src/build/route-trie.ts +3 -0
- package/src/build/route-types/param-extraction.ts +6 -3
- package/src/build/route-types/router-processing.ts +0 -8
- package/src/cache/cache-policy.ts +0 -54
- package/src/cache/cache-runtime.ts +27 -24
- package/src/cache/cache-scope.ts +0 -27
- package/src/cache/cache-tag.ts +0 -37
- package/src/cache/cf/cf-cache-store.ts +72 -45
- package/src/cache/cf/index.ts +0 -24
- package/src/cache/document-cache.ts +0 -36
- package/src/cache/handle-snapshot.ts +0 -40
- package/src/cache/index.ts +0 -27
- package/src/cache/memory-segment-store.ts +0 -52
- package/src/cache/profile-registry.ts +7 -3
- package/src/cache/read-through-swr.ts +41 -11
- package/src/cache/segment-codec.ts +0 -16
- package/src/cache/types.ts +0 -98
- package/src/client.rsc.tsx +1 -22
- package/src/client.tsx +14 -32
- package/src/deps/ssr.ts +0 -1
- package/src/handle.ts +2 -12
- package/src/handles/MetaTags.tsx +0 -14
- package/src/handles/meta.ts +0 -39
- package/src/host/cookie-handler.ts +0 -36
- package/src/host/errors.ts +0 -24
- package/src/host/index.ts +6 -0
- package/src/host/pattern-matcher.ts +7 -50
- package/src/host/router.ts +1 -65
- package/src/host/testing.ts +0 -16
- package/src/host/types.ts +6 -2
- package/src/href-client.ts +0 -4
- package/src/index.rsc.ts +20 -2
- package/src/internal-debug.ts +2 -4
- package/src/loader.rsc.ts +4 -15
- package/src/loader.ts +3 -9
- package/src/network-error-thrower.tsx +1 -6
- package/src/outlet-provider.tsx +1 -5
- package/src/prerender/param-hash.ts +10 -11
- package/src/prerender/store.ts +23 -30
- package/src/prerender.ts +34 -0
- package/src/root-error-boundary.tsx +1 -19
- package/src/route-content-wrapper.tsx +1 -44
- package/src/route-definition/dsl-helpers.ts +7 -19
- package/src/route-definition/helpers-types.ts +3 -3
- package/src/route-definition/redirect.ts +11 -1
- package/src/route-map-builder.ts +0 -16
- package/src/router/content-negotiation.ts +0 -13
- package/src/router/error-handling.ts +12 -16
- package/src/router/find-match.ts +4 -30
- package/src/router/intercept-resolution.ts +10 -1
- package/src/router/lazy-includes.ts +1 -57
- package/src/router/loader-resolution.ts +3 -2
- package/src/router/logging.ts +0 -6
- package/src/router/manifest.ts +1 -25
- package/src/router/match-api.ts +0 -20
- package/src/router/match-context.ts +0 -22
- package/src/router/match-handlers.ts +0 -43
- package/src/router/match-middleware/background-revalidation.ts +0 -7
- package/src/router/match-middleware/cache-lookup.ts +1 -54
- package/src/router/match-middleware/cache-store.ts +0 -31
- package/src/router/match-middleware/intercept-resolution.ts +0 -22
- package/src/router/match-middleware/segment-resolution.ts +0 -21
- package/src/router/match-pipelines.ts +1 -42
- package/src/router/match-result.ts +1 -52
- package/src/router/metrics.ts +0 -34
- package/src/router/middleware-cookies.ts +0 -13
- package/src/router/middleware-types.ts +0 -115
- package/src/router/middleware.ts +7 -30
- package/src/router/navigation-snapshot.ts +0 -51
- package/src/router/params-util.ts +23 -0
- package/src/router/pattern-matching.ts +1 -33
- package/src/router/prerender-match.ts +29 -45
- package/src/router/request-classification.ts +1 -38
- package/src/router/revalidation.ts +5 -58
- package/src/router/router-context.ts +0 -26
- package/src/router/segment-resolution/fresh.ts +25 -57
- package/src/router/segment-resolution/helpers.ts +34 -0
- package/src/router/segment-resolution/loader-cache.ts +10 -13
- package/src/router/segment-resolution/revalidation.ts +5 -42
- package/src/router/segment-resolution/streamed-handler-telemetry.ts +52 -0
- package/src/router/segment-resolution.ts +4 -1
- package/src/router/telemetry-otel.ts +0 -20
- package/src/router/telemetry.ts +0 -22
- package/src/router/timeout.ts +0 -20
- package/src/router/trie-matching.ts +63 -40
- package/src/router/types.ts +1 -63
- package/src/router/url-params.ts +0 -5
- package/src/router.ts +4 -2
- package/src/rsc/handler.ts +11 -2
- package/src/rsc/helpers.ts +15 -0
- package/src/rsc/origin-guard.ts +0 -12
- package/src/rsc/progressive-enhancement.ts +2 -1
- package/src/rsc/rsc-rendering.ts +2 -7
- package/src/rsc/runtime-warnings.ts +14 -0
- package/src/rsc/server-action.ts +30 -28
- package/src/rsc/types.ts +0 -1
- package/src/search-params.ts +0 -16
- package/src/segment-loader-promise.ts +14 -2
- package/src/segment-system.tsx +79 -88
- package/src/server/handle-store.ts +7 -24
- package/src/server/loader-registry.ts +5 -24
- package/src/server/request-context.ts +6 -78
- package/src/ssr/index.tsx +14 -14
- package/src/static-handler.ts +2 -27
- package/src/testing/cache-status.ts +0 -47
- package/src/testing/collect-handle.ts +1 -24
- package/src/testing/e2e/index.ts +0 -22
- package/src/testing/e2e/matchers.ts +0 -16
- package/src/testing/flight-matchers.ts +0 -13
- package/src/testing/flight-normalize.ts +3 -30
- package/src/testing/flight.ts +0 -48
- package/src/testing/generated-routes.ts +1 -41
- package/src/testing/index.ts +0 -21
- package/src/testing/internal/context.ts +3 -45
- package/src/testing/internal/seed-vars.ts +0 -26
- package/src/testing/render-handler.ts +0 -49
- package/src/testing/render-route.tsx +0 -90
- package/src/testing/run-loader.ts +0 -96
- package/src/testing/run-middleware.ts +0 -26
- package/src/theme/ThemeProvider.tsx +0 -52
- package/src/theme/ThemeScript.tsx +0 -6
- package/src/theme/constants.ts +0 -12
- package/src/theme/index.ts +0 -7
- package/src/theme/theme-context.ts +1 -5
- package/src/theme/theme-script.ts +0 -14
- package/src/theme/use-theme.ts +0 -3
- package/src/types/boundaries.ts +0 -35
- package/src/types/error-types.ts +25 -89
- package/src/types/global-namespace.ts +4 -14
- package/src/types/handler-context.ts +0 -8
- package/src/types/index.ts +0 -10
- package/src/types/request-scope.ts +0 -19
- package/src/types/route-config.ts +6 -50
- package/src/types/route-entry.ts +0 -6
- package/src/types/segments.ts +0 -13
- package/src/urls/include-helper.ts +0 -4
- package/src/urls/index.ts +0 -6
- package/src/urls/path-helper-types.ts +2 -2
- package/src/urls/path-helper.ts +0 -54
- package/src/urls/urls-function.ts +0 -13
- package/src/use-loader.tsx +0 -186
- package/src/vite/discovery/bundle-postprocess.ts +2 -1
- package/src/vite/discovery/discover-routers.ts +6 -7
- package/src/vite/discovery/virtual-module-codegen.ts +1 -11
- package/src/vite/plugin-types.ts +3 -1
- package/src/vite/plugins/cjs-to-esm.ts +0 -11
- package/src/vite/plugins/client-ref-dedup.ts +0 -11
- package/src/vite/plugins/client-ref-hashing.ts +0 -10
- package/src/vite/plugins/cloudflare-protocol-stub.ts +0 -20
- package/src/vite/plugins/expose-action-id.ts +2 -73
- package/src/vite/plugins/expose-id-utils.ts +0 -55
- package/src/vite/plugins/expose-ids/export-analysis.ts +0 -38
- package/src/vite/plugins/expose-ids/handler-transform.ts +0 -15
- package/src/vite/plugins/expose-ids/loader-transform.ts +0 -15
- package/src/vite/plugins/expose-ids/router-transform.ts +0 -13
- package/src/vite/plugins/expose-internal-ids.ts +10 -0
- package/src/vite/plugins/performance-tracks.ts +0 -3
- package/src/vite/plugins/use-cache-transform.ts +0 -36
- package/src/vite/plugins/version-injector.ts +0 -20
- package/src/vite/plugins/version-plugin.ts +1 -49
- package/src/vite/plugins/virtual-entries.ts +0 -15
- package/src/vite/rango.ts +1 -108
- package/src/vite/router-discovery.ts +2 -1
- package/src/vite/utils/ast-handler-extract.ts +0 -16
- package/src/vite/utils/bundle-analysis.ts +6 -13
- package/src/vite/utils/client-chunks.ts +0 -6
- package/src/vite/utils/forward-user-plugins.ts +0 -22
- package/src/vite/utils/manifest-utils.ts +0 -4
- package/src/vite/utils/package-resolution.ts +1 -73
- package/src/vite/utils/prerender-utils.ts +0 -35
- package/src/vite/utils/shared-utils.ts +3 -35
- package/dist/__internal.d.ts +0 -83
- package/dist/__internal.d.ts.map +0 -1
- package/dist/__internal.js +0 -19
- package/dist/__internal.js.map +0 -1
- package/dist/__mocks__/version.d.ts +0 -7
- package/dist/__mocks__/version.d.ts.map +0 -1
- package/dist/__mocks__/version.js +0 -7
- package/dist/__mocks__/version.js.map +0 -1
- package/dist/__tests__/client-href.test.d.ts +0 -2
- package/dist/__tests__/client-href.test.d.ts.map +0 -1
- package/dist/__tests__/client-href.test.js +0 -74
- package/dist/__tests__/client-href.test.js.map +0 -1
- package/dist/__tests__/component-utils.test.d.ts +0 -2
- package/dist/__tests__/component-utils.test.d.ts.map +0 -1
- package/dist/__tests__/component-utils.test.js +0 -51
- package/dist/__tests__/component-utils.test.js.map +0 -1
- package/dist/__tests__/event-controller.test.d.ts +0 -2
- package/dist/__tests__/event-controller.test.d.ts.map +0 -1
- package/dist/__tests__/event-controller.test.js +0 -538
- package/dist/__tests__/event-controller.test.js.map +0 -1
- package/dist/__tests__/helpers/route-tree.d.ts +0 -118
- package/dist/__tests__/helpers/route-tree.d.ts.map +0 -1
- package/dist/__tests__/helpers/route-tree.js +0 -374
- package/dist/__tests__/helpers/route-tree.js.map +0 -1
- package/dist/__tests__/match-result.test.d.ts +0 -2
- package/dist/__tests__/match-result.test.d.ts.map +0 -1
- package/dist/__tests__/match-result.test.js +0 -154
- package/dist/__tests__/match-result.test.js.map +0 -1
- package/dist/__tests__/navigation-store.test.d.ts +0 -2
- package/dist/__tests__/navigation-store.test.d.ts.map +0 -1
- package/dist/__tests__/navigation-store.test.js +0 -440
- package/dist/__tests__/navigation-store.test.js.map +0 -1
- package/dist/__tests__/partial-update.test.d.ts +0 -2
- package/dist/__tests__/partial-update.test.d.ts.map +0 -1
- package/dist/__tests__/partial-update.test.js +0 -1009
- package/dist/__tests__/partial-update.test.js.map +0 -1
- package/dist/__tests__/reverse-types.test.d.ts +0 -8
- package/dist/__tests__/reverse-types.test.d.ts.map +0 -1
- package/dist/__tests__/reverse-types.test.js +0 -656
- package/dist/__tests__/reverse-types.test.js.map +0 -1
- package/dist/__tests__/route-definition.test.d.ts +0 -2
- package/dist/__tests__/route-definition.test.d.ts.map +0 -1
- package/dist/__tests__/route-definition.test.js +0 -55
- package/dist/__tests__/route-definition.test.js.map +0 -1
- package/dist/__tests__/router-helpers.test.d.ts +0 -2
- package/dist/__tests__/router-helpers.test.d.ts.map +0 -1
- package/dist/__tests__/router-helpers.test.js +0 -377
- package/dist/__tests__/router-helpers.test.js.map +0 -1
- package/dist/__tests__/router-integration-2.test.d.ts +0 -2
- package/dist/__tests__/router-integration-2.test.d.ts.map +0 -1
- package/dist/__tests__/router-integration-2.test.js +0 -426
- package/dist/__tests__/router-integration-2.test.js.map +0 -1
- package/dist/__tests__/router-integration.test.d.ts +0 -2
- package/dist/__tests__/router-integration.test.d.ts.map +0 -1
- package/dist/__tests__/router-integration.test.js +0 -1051
- package/dist/__tests__/router-integration.test.js.map +0 -1
- package/dist/__tests__/search-params.test.d.ts +0 -5
- package/dist/__tests__/search-params.test.d.ts.map +0 -1
- package/dist/__tests__/search-params.test.js +0 -306
- package/dist/__tests__/search-params.test.js.map +0 -1
- package/dist/__tests__/segment-system.test.d.ts +0 -2
- package/dist/__tests__/segment-system.test.d.ts.map +0 -1
- package/dist/__tests__/segment-system.test.js +0 -627
- package/dist/__tests__/segment-system.test.js.map +0 -1
- package/dist/__tests__/static-handler-types.test.d.ts +0 -8
- package/dist/__tests__/static-handler-types.test.d.ts.map +0 -1
- package/dist/__tests__/static-handler-types.test.js +0 -63
- package/dist/__tests__/static-handler-types.test.js.map +0 -1
- package/dist/__tests__/urls.test.d.ts +0 -2
- package/dist/__tests__/urls.test.d.ts.map +0 -1
- package/dist/__tests__/urls.test.js +0 -421
- package/dist/__tests__/urls.test.js.map +0 -1
- package/dist/__tests__/use-mount.test.d.ts +0 -2
- package/dist/__tests__/use-mount.test.d.ts.map +0 -1
- package/dist/__tests__/use-mount.test.js +0 -35
- package/dist/__tests__/use-mount.test.js.map +0 -1
- package/dist/bin/rango.d.ts +0 -2
- package/dist/bin/rango.d.ts.map +0 -1
- package/dist/bin/rango.js.map +0 -1
- package/dist/browser/event-controller.d.ts +0 -191
- package/dist/browser/event-controller.d.ts.map +0 -1
- package/dist/browser/event-controller.js +0 -559
- package/dist/browser/event-controller.js.map +0 -1
- package/dist/browser/index.d.ts +0 -2
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -14
- package/dist/browser/index.js.map +0 -1
- package/dist/browser/link-interceptor.d.ts +0 -38
- package/dist/browser/link-interceptor.d.ts.map +0 -1
- package/dist/browser/link-interceptor.js +0 -99
- package/dist/browser/link-interceptor.js.map +0 -1
- package/dist/browser/logging.d.ts +0 -10
- package/dist/browser/logging.d.ts.map +0 -1
- package/dist/browser/logging.js +0 -29
- package/dist/browser/logging.js.map +0 -1
- package/dist/browser/lru-cache.d.ts +0 -17
- package/dist/browser/lru-cache.d.ts.map +0 -1
- package/dist/browser/lru-cache.js +0 -50
- package/dist/browser/lru-cache.js.map +0 -1
- package/dist/browser/merge-segment-loaders.d.ts +0 -39
- package/dist/browser/merge-segment-loaders.d.ts.map +0 -1
- package/dist/browser/merge-segment-loaders.js +0 -102
- package/dist/browser/merge-segment-loaders.js.map +0 -1
- package/dist/browser/navigation-bridge.d.ts +0 -102
- package/dist/browser/navigation-bridge.d.ts.map +0 -1
- package/dist/browser/navigation-bridge.js +0 -708
- package/dist/browser/navigation-bridge.js.map +0 -1
- package/dist/browser/navigation-client.d.ts +0 -25
- package/dist/browser/navigation-client.d.ts.map +0 -1
- package/dist/browser/navigation-client.js +0 -157
- package/dist/browser/navigation-client.js.map +0 -1
- package/dist/browser/navigation-store.d.ts +0 -101
- package/dist/browser/navigation-store.d.ts.map +0 -1
- package/dist/browser/navigation-store.js +0 -625
- package/dist/browser/navigation-store.js.map +0 -1
- package/dist/browser/partial-update.d.ts +0 -75
- package/dist/browser/partial-update.d.ts.map +0 -1
- package/dist/browser/partial-update.js +0 -426
- package/dist/browser/partial-update.js.map +0 -1
- package/dist/browser/react/Link.d.ts +0 -86
- package/dist/browser/react/Link.d.ts.map +0 -1
- package/dist/browser/react/Link.js +0 -128
- package/dist/browser/react/Link.js.map +0 -1
- package/dist/browser/react/NavigationProvider.d.ts +0 -63
- package/dist/browser/react/NavigationProvider.d.ts.map +0 -1
- package/dist/browser/react/NavigationProvider.js +0 -216
- package/dist/browser/react/NavigationProvider.js.map +0 -1
- package/dist/browser/react/ScrollRestoration.d.ts +0 -75
- package/dist/browser/react/ScrollRestoration.d.ts.map +0 -1
- package/dist/browser/react/ScrollRestoration.js +0 -57
- package/dist/browser/react/ScrollRestoration.js.map +0 -1
- package/dist/browser/react/context.d.ts +0 -46
- package/dist/browser/react/context.d.ts.map +0 -1
- package/dist/browser/react/context.js +0 -10
- package/dist/browser/react/context.js.map +0 -1
- package/dist/browser/react/index.d.ts +0 -11
- package/dist/browser/react/index.d.ts.map +0 -1
- package/dist/browser/react/index.js +0 -22
- package/dist/browser/react/index.js.map +0 -1
- package/dist/browser/react/location-state-shared.d.ts +0 -63
- package/dist/browser/react/location-state-shared.d.ts.map +0 -1
- package/dist/browser/react/location-state-shared.js +0 -81
- package/dist/browser/react/location-state-shared.js.map +0 -1
- package/dist/browser/react/location-state.d.ts +0 -23
- package/dist/browser/react/location-state.d.ts.map +0 -1
- package/dist/browser/react/location-state.js +0 -29
- package/dist/browser/react/location-state.js.map +0 -1
- package/dist/browser/react/mount-context.d.ts +0 -24
- package/dist/browser/react/mount-context.d.ts.map +0 -1
- package/dist/browser/react/mount-context.js +0 -24
- package/dist/browser/react/mount-context.js.map +0 -1
- package/dist/browser/react/use-action.d.ts +0 -64
- package/dist/browser/react/use-action.d.ts.map +0 -1
- package/dist/browser/react/use-action.js +0 -134
- package/dist/browser/react/use-action.js.map +0 -1
- package/dist/browser/react/use-client-cache.d.ts +0 -41
- package/dist/browser/react/use-client-cache.d.ts.map +0 -1
- package/dist/browser/react/use-client-cache.js +0 -39
- package/dist/browser/react/use-client-cache.js.map +0 -1
- package/dist/browser/react/use-handle.d.ts +0 -31
- package/dist/browser/react/use-handle.d.ts.map +0 -1
- package/dist/browser/react/use-handle.js +0 -144
- package/dist/browser/react/use-handle.js.map +0 -1
- package/dist/browser/react/use-href.d.ts +0 -33
- package/dist/browser/react/use-href.d.ts.map +0 -1
- package/dist/browser/react/use-href.js +0 -39
- package/dist/browser/react/use-href.js.map +0 -1
- package/dist/browser/react/use-link-status.d.ts +0 -37
- package/dist/browser/react/use-link-status.d.ts.map +0 -1
- package/dist/browser/react/use-link-status.js +0 -99
- package/dist/browser/react/use-link-status.js.map +0 -1
- package/dist/browser/react/use-mount.d.ts +0 -25
- package/dist/browser/react/use-mount.d.ts.map +0 -1
- package/dist/browser/react/use-mount.js +0 -30
- package/dist/browser/react/use-mount.js.map +0 -1
- package/dist/browser/react/use-navigation.d.ts +0 -27
- package/dist/browser/react/use-navigation.d.ts.map +0 -1
- package/dist/browser/react/use-navigation.js +0 -87
- package/dist/browser/react/use-navigation.js.map +0 -1
- package/dist/browser/react/use-segments.d.ts +0 -38
- package/dist/browser/react/use-segments.d.ts.map +0 -1
- package/dist/browser/react/use-segments.js +0 -130
- package/dist/browser/react/use-segments.js.map +0 -1
- package/dist/browser/request-controller.d.ts +0 -26
- package/dist/browser/request-controller.d.ts.map +0 -1
- package/dist/browser/request-controller.js +0 -147
- package/dist/browser/request-controller.js.map +0 -1
- package/dist/browser/rsc-router.d.ts +0 -129
- package/dist/browser/rsc-router.d.ts.map +0 -1
- package/dist/browser/rsc-router.js +0 -195
- package/dist/browser/rsc-router.js.map +0 -1
- package/dist/browser/scroll-restoration.d.ts +0 -93
- package/dist/browser/scroll-restoration.d.ts.map +0 -1
- package/dist/browser/scroll-restoration.js +0 -321
- package/dist/browser/scroll-restoration.js.map +0 -1
- package/dist/browser/segment-structure-assert.d.ts +0 -17
- package/dist/browser/segment-structure-assert.d.ts.map +0 -1
- package/dist/browser/segment-structure-assert.js +0 -59
- package/dist/browser/segment-structure-assert.js.map +0 -1
- package/dist/browser/server-action-bridge.d.ts +0 -26
- package/dist/browser/server-action-bridge.d.ts.map +0 -1
- package/dist/browser/server-action-bridge.js +0 -668
- package/dist/browser/server-action-bridge.js.map +0 -1
- package/dist/browser/shallow.d.ts +0 -12
- package/dist/browser/shallow.d.ts.map +0 -1
- package/dist/browser/shallow.js +0 -34
- package/dist/browser/shallow.js.map +0 -1
- package/dist/browser/types.d.ts +0 -369
- package/dist/browser/types.d.ts.map +0 -1
- package/dist/browser/types.js +0 -2
- package/dist/browser/types.js.map +0 -1
- package/dist/build/__tests__/generate-cli.test.d.ts +0 -2
- package/dist/build/__tests__/generate-cli.test.d.ts.map +0 -1
- package/dist/build/__tests__/generate-cli.test.js +0 -237
- package/dist/build/__tests__/generate-cli.test.js.map +0 -1
- package/dist/build/__tests__/generate-manifest.test.d.ts +0 -2
- package/dist/build/__tests__/generate-manifest.test.d.ts.map +0 -1
- package/dist/build/__tests__/generate-manifest.test.js +0 -119
- package/dist/build/__tests__/generate-manifest.test.js.map +0 -1
- package/dist/build/__tests__/generate-route-types.test.d.ts +0 -2
- package/dist/build/__tests__/generate-route-types.test.d.ts.map +0 -1
- package/dist/build/__tests__/generate-route-types.test.js +0 -620
- package/dist/build/__tests__/generate-route-types.test.js.map +0 -1
- package/dist/build/__tests__/per-router-manifest.test.d.ts +0 -2
- package/dist/build/__tests__/per-router-manifest.test.d.ts.map +0 -1
- package/dist/build/__tests__/per-router-manifest.test.js +0 -308
- package/dist/build/__tests__/per-router-manifest.test.js.map +0 -1
- package/dist/build/generate-manifest.d.ts +0 -81
- package/dist/build/generate-manifest.d.ts.map +0 -1
- package/dist/build/generate-manifest.js +0 -276
- package/dist/build/generate-manifest.js.map +0 -1
- package/dist/build/generate-route-types.d.ts +0 -115
- package/dist/build/generate-route-types.d.ts.map +0 -1
- package/dist/build/generate-route-types.js +0 -740
- package/dist/build/generate-route-types.js.map +0 -1
- package/dist/build/index.d.ts +0 -21
- package/dist/build/index.d.ts.map +0 -1
- package/dist/build/index.js +0 -21
- package/dist/build/index.js.map +0 -1
- package/dist/build/route-trie.d.ts +0 -71
- package/dist/build/route-trie.d.ts.map +0 -1
- package/dist/build/route-trie.js +0 -175
- package/dist/build/route-trie.js.map +0 -1
- package/dist/cache/__tests__/cache-scope.test.d.ts +0 -2
- package/dist/cache/__tests__/cache-scope.test.d.ts.map +0 -1
- package/dist/cache/__tests__/cache-scope.test.js +0 -208
- package/dist/cache/__tests__/cache-scope.test.js.map +0 -1
- package/dist/cache/__tests__/document-cache.test.d.ts +0 -2
- package/dist/cache/__tests__/document-cache.test.d.ts.map +0 -1
- package/dist/cache/__tests__/document-cache.test.js +0 -345
- package/dist/cache/__tests__/document-cache.test.js.map +0 -1
- package/dist/cache/__tests__/memory-segment-store.test.d.ts +0 -2
- package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +0 -1
- package/dist/cache/__tests__/memory-segment-store.test.js +0 -425
- package/dist/cache/__tests__/memory-segment-store.test.js.map +0 -1
- package/dist/cache/__tests__/memory-store.test.d.ts +0 -2
- package/dist/cache/__tests__/memory-store.test.d.ts.map +0 -1
- package/dist/cache/__tests__/memory-store.test.js +0 -367
- package/dist/cache/__tests__/memory-store.test.js.map +0 -1
- package/dist/cache/cache-scope.d.ts +0 -102
- package/dist/cache/cache-scope.d.ts.map +0 -1
- package/dist/cache/cache-scope.js +0 -440
- package/dist/cache/cache-scope.js.map +0 -1
- package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +0 -2
- package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +0 -1
- package/dist/cache/cf/__tests__/cf-cache-store.test.js +0 -330
- package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +0 -1
- package/dist/cache/cf/cf-cache-store.d.ts +0 -165
- package/dist/cache/cf/cf-cache-store.d.ts.map +0 -1
- package/dist/cache/cf/cf-cache-store.js +0 -242
- package/dist/cache/cf/cf-cache-store.js.map +0 -1
- package/dist/cache/cf/index.d.ts +0 -14
- package/dist/cache/cf/index.d.ts.map +0 -1
- package/dist/cache/cf/index.js +0 -17
- package/dist/cache/cf/index.js.map +0 -1
- package/dist/cache/document-cache.d.ts +0 -64
- package/dist/cache/document-cache.d.ts.map +0 -1
- package/dist/cache/document-cache.js +0 -228
- package/dist/cache/document-cache.js.map +0 -1
- package/dist/cache/index.d.ts +0 -19
- package/dist/cache/index.d.ts.map +0 -1
- package/dist/cache/index.js +0 -21
- package/dist/cache/index.js.map +0 -1
- package/dist/cache/memory-segment-store.d.ts +0 -110
- package/dist/cache/memory-segment-store.d.ts.map +0 -1
- package/dist/cache/memory-segment-store.js +0 -117
- package/dist/cache/memory-segment-store.js.map +0 -1
- package/dist/cache/memory-store.d.ts +0 -41
- package/dist/cache/memory-store.d.ts.map +0 -1
- package/dist/cache/memory-store.js +0 -191
- package/dist/cache/memory-store.js.map +0 -1
- package/dist/cache/types.d.ts +0 -317
- package/dist/cache/types.d.ts.map +0 -1
- package/dist/cache/types.js +0 -12
- package/dist/cache/types.js.map +0 -1
- package/dist/client.d.ts +0 -248
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -367
- package/dist/client.js.map +0 -1
- package/dist/client.rsc.d.ts +0 -26
- package/dist/client.rsc.d.ts.map +0 -1
- package/dist/client.rsc.js +0 -46
- package/dist/client.rsc.js.map +0 -1
- package/dist/component-utils.d.ts +0 -36
- package/dist/component-utils.d.ts.map +0 -1
- package/dist/component-utils.js +0 -61
- package/dist/component-utils.js.map +0 -1
- package/dist/components/DefaultDocument.d.ts +0 -13
- package/dist/components/DefaultDocument.d.ts.map +0 -1
- package/dist/components/DefaultDocument.js +0 -15
- package/dist/components/DefaultDocument.js.map +0 -1
- package/dist/debug.d.ts +0 -58
- package/dist/debug.d.ts.map +0 -1
- package/dist/debug.js +0 -157
- package/dist/debug.js.map +0 -1
- package/dist/default-error-boundary.d.ts +0 -11
- package/dist/default-error-boundary.d.ts.map +0 -1
- package/dist/default-error-boundary.js +0 -45
- package/dist/default-error-boundary.js.map +0 -1
- package/dist/deps/browser.d.ts +0 -2
- package/dist/deps/browser.d.ts.map +0 -1
- package/dist/deps/browser.js +0 -3
- package/dist/deps/browser.js.map +0 -1
- package/dist/deps/html-stream-client.d.ts +0 -2
- package/dist/deps/html-stream-client.d.ts.map +0 -1
- package/dist/deps/html-stream-client.js +0 -3
- package/dist/deps/html-stream-client.js.map +0 -1
- package/dist/deps/html-stream-server.d.ts +0 -2
- package/dist/deps/html-stream-server.d.ts.map +0 -1
- package/dist/deps/html-stream-server.js +0 -3
- package/dist/deps/html-stream-server.js.map +0 -1
- package/dist/deps/rsc.d.ts +0 -2
- package/dist/deps/rsc.d.ts.map +0 -1
- package/dist/deps/rsc.js +0 -4
- package/dist/deps/rsc.js.map +0 -1
- package/dist/deps/ssr.d.ts +0 -2
- package/dist/deps/ssr.d.ts.map +0 -1
- package/dist/deps/ssr.js +0 -3
- package/dist/deps/ssr.js.map +0 -1
- package/dist/errors.d.ts +0 -174
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -241
- package/dist/errors.js.map +0 -1
- package/dist/handle.d.ts +0 -78
- package/dist/handle.d.ts.map +0 -1
- package/dist/handle.js +0 -82
- package/dist/handle.js.map +0 -1
- package/dist/handles/MetaTags.d.ts +0 -14
- package/dist/handles/MetaTags.d.ts.map +0 -1
- package/dist/handles/MetaTags.js +0 -136
- package/dist/handles/MetaTags.js.map +0 -1
- package/dist/handles/index.d.ts +0 -6
- package/dist/handles/index.d.ts.map +0 -1
- package/dist/handles/index.js +0 -6
- package/dist/handles/index.js.map +0 -1
- package/dist/handles/meta.d.ts +0 -39
- package/dist/handles/meta.d.ts.map +0 -1
- package/dist/handles/meta.js +0 -202
- package/dist/handles/meta.js.map +0 -1
- package/dist/host/__tests__/errors.test.d.ts +0 -2
- package/dist/host/__tests__/errors.test.d.ts.map +0 -1
- package/dist/host/__tests__/errors.test.js +0 -76
- package/dist/host/__tests__/errors.test.js.map +0 -1
- package/dist/host/__tests__/pattern-comprehensive.test.d.ts +0 -2
- package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +0 -1
- package/dist/host/__tests__/pattern-comprehensive.test.js +0 -732
- package/dist/host/__tests__/pattern-comprehensive.test.js.map +0 -1
- package/dist/host/__tests__/pattern-matcher.test.d.ts +0 -2
- package/dist/host/__tests__/pattern-matcher.test.d.ts.map +0 -1
- package/dist/host/__tests__/pattern-matcher.test.js +0 -251
- package/dist/host/__tests__/pattern-matcher.test.js.map +0 -1
- package/dist/host/__tests__/router.test.d.ts +0 -2
- package/dist/host/__tests__/router.test.d.ts.map +0 -1
- package/dist/host/__tests__/router.test.js +0 -241
- package/dist/host/__tests__/router.test.js.map +0 -1
- package/dist/host/__tests__/testing.test.d.ts +0 -2
- package/dist/host/__tests__/testing.test.d.ts.map +0 -1
- package/dist/host/__tests__/testing.test.js +0 -64
- package/dist/host/__tests__/testing.test.js.map +0 -1
- package/dist/host/__tests__/utils.test.d.ts +0 -2
- package/dist/host/__tests__/utils.test.d.ts.map +0 -1
- package/dist/host/__tests__/utils.test.js +0 -29
- package/dist/host/__tests__/utils.test.js.map +0 -1
- package/dist/host/cookie-handler.d.ts +0 -34
- package/dist/host/cookie-handler.d.ts.map +0 -1
- package/dist/host/cookie-handler.js +0 -124
- package/dist/host/cookie-handler.js.map +0 -1
- package/dist/host/errors.d.ts +0 -56
- package/dist/host/errors.d.ts.map +0 -1
- package/dist/host/errors.js +0 -79
- package/dist/host/errors.js.map +0 -1
- package/dist/host/index.d.ts +0 -29
- package/dist/host/index.d.ts.map +0 -1
- package/dist/host/index.js +0 -32
- package/dist/host/index.js.map +0 -1
- package/dist/host/pattern-matcher.d.ts +0 -36
- package/dist/host/pattern-matcher.d.ts.map +0 -1
- package/dist/host/pattern-matcher.js +0 -172
- package/dist/host/pattern-matcher.js.map +0 -1
- package/dist/host/router.d.ts +0 -26
- package/dist/host/router.d.ts.map +0 -1
- package/dist/host/router.js +0 -218
- package/dist/host/router.js.map +0 -1
- package/dist/host/testing.d.ts +0 -36
- package/dist/host/testing.d.ts.map +0 -1
- package/dist/host/testing.js +0 -55
- package/dist/host/testing.js.map +0 -1
- package/dist/host/types.d.ts +0 -115
- package/dist/host/types.d.ts.map +0 -1
- package/dist/host/types.js +0 -7
- package/dist/host/types.js.map +0 -1
- package/dist/host/utils.d.ts +0 -21
- package/dist/host/utils.d.ts.map +0 -1
- package/dist/host/utils.js +0 -23
- package/dist/host/utils.js.map +0 -1
- package/dist/href-client.d.ts +0 -131
- package/dist/href-client.d.ts.map +0 -1
- package/dist/href-client.js +0 -64
- package/dist/href-client.js.map +0 -1
- package/dist/href-context.d.ts +0 -29
- package/dist/href-context.d.ts.map +0 -1
- package/dist/href-context.js +0 -21
- package/dist/href-context.js.map +0 -1
- package/dist/index.d.ts +0 -73
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -91
- package/dist/index.js.map +0 -1
- package/dist/index.rsc.d.ts +0 -32
- package/dist/index.rsc.d.ts.map +0 -1
- package/dist/index.rsc.js +0 -40
- package/dist/index.rsc.js.map +0 -1
- package/dist/internal-debug.d.ts +0 -2
- package/dist/internal-debug.d.ts.map +0 -1
- package/dist/internal-debug.js +0 -5
- package/dist/internal-debug.js.map +0 -1
- package/dist/loader.d.ts +0 -14
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -20
- package/dist/loader.js.map +0 -1
- package/dist/loader.rsc.d.ts +0 -19
- package/dist/loader.rsc.d.ts.map +0 -1
- package/dist/loader.rsc.js +0 -99
- package/dist/loader.rsc.js.map +0 -1
- package/dist/network-error-thrower.d.ts +0 -17
- package/dist/network-error-thrower.d.ts.map +0 -1
- package/dist/network-error-thrower.js +0 -14
- package/dist/network-error-thrower.js.map +0 -1
- package/dist/outlet-context.d.ts +0 -13
- package/dist/outlet-context.d.ts.map +0 -1
- package/dist/outlet-context.js +0 -3
- package/dist/outlet-context.js.map +0 -1
- package/dist/prerender/__tests__/param-hash.test.d.ts +0 -2
- package/dist/prerender/__tests__/param-hash.test.d.ts.map +0 -1
- package/dist/prerender/__tests__/param-hash.test.js +0 -148
- package/dist/prerender/__tests__/param-hash.test.js.map +0 -1
- package/dist/prerender/param-hash.d.ts +0 -16
- package/dist/prerender/param-hash.d.ts.map +0 -1
- package/dist/prerender/param-hash.js +0 -36
- package/dist/prerender/param-hash.js.map +0 -1
- package/dist/prerender/store.d.ts +0 -38
- package/dist/prerender/store.d.ts.map +0 -1
- package/dist/prerender/store.js +0 -61
- package/dist/prerender/store.js.map +0 -1
- package/dist/prerender.d.ts +0 -66
- package/dist/prerender.d.ts.map +0 -1
- package/dist/prerender.js +0 -57
- package/dist/prerender.js.map +0 -1
- package/dist/reverse.d.ts +0 -196
- package/dist/reverse.d.ts.map +0 -1
- package/dist/reverse.js +0 -78
- package/dist/reverse.js.map +0 -1
- package/dist/root-error-boundary.d.ts +0 -33
- package/dist/root-error-boundary.d.ts.map +0 -1
- package/dist/root-error-boundary.js +0 -165
- package/dist/root-error-boundary.js.map +0 -1
- package/dist/route-content-wrapper.d.ts +0 -46
- package/dist/route-content-wrapper.d.ts.map +0 -1
- package/dist/route-content-wrapper.js +0 -77
- package/dist/route-content-wrapper.js.map +0 -1
- package/dist/route-definition.d.ts +0 -421
- package/dist/route-definition.d.ts.map +0 -1
- package/dist/route-definition.js +0 -868
- package/dist/route-definition.js.map +0 -1
- package/dist/route-map-builder.d.ts +0 -155
- package/dist/route-map-builder.d.ts.map +0 -1
- package/dist/route-map-builder.js +0 -237
- package/dist/route-map-builder.js.map +0 -1
- package/dist/route-types.d.ts +0 -165
- package/dist/route-types.d.ts.map +0 -1
- package/dist/route-types.js +0 -7
- package/dist/route-types.js.map +0 -1
- package/dist/router/__tests__/handler-context.test.d.ts +0 -2
- package/dist/router/__tests__/handler-context.test.d.ts.map +0 -1
- package/dist/router/__tests__/handler-context.test.js +0 -65
- package/dist/router/__tests__/handler-context.test.js.map +0 -1
- package/dist/router/__tests__/loader-cycle-detection.test.d.ts +0 -2
- package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +0 -1
- package/dist/router/__tests__/loader-cycle-detection.test.js +0 -221
- package/dist/router/__tests__/loader-cycle-detection.test.js.map +0 -1
- package/dist/router/__tests__/match-context.test.d.ts +0 -2
- package/dist/router/__tests__/match-context.test.d.ts.map +0 -1
- package/dist/router/__tests__/match-context.test.js +0 -92
- package/dist/router/__tests__/match-context.test.js.map +0 -1
- package/dist/router/__tests__/match-pipelines.test.d.ts +0 -2
- package/dist/router/__tests__/match-pipelines.test.d.ts.map +0 -1
- package/dist/router/__tests__/match-pipelines.test.js +0 -417
- package/dist/router/__tests__/match-pipelines.test.js.map +0 -1
- package/dist/router/__tests__/match-result.test.d.ts +0 -2
- package/dist/router/__tests__/match-result.test.d.ts.map +0 -1
- package/dist/router/__tests__/match-result.test.js +0 -457
- package/dist/router/__tests__/match-result.test.js.map +0 -1
- package/dist/router/__tests__/on-error.test.d.ts +0 -2
- package/dist/router/__tests__/on-error.test.d.ts.map +0 -1
- package/dist/router/__tests__/on-error.test.js +0 -678
- package/dist/router/__tests__/on-error.test.js.map +0 -1
- package/dist/router/__tests__/pattern-matching.test.d.ts +0 -2
- package/dist/router/__tests__/pattern-matching.test.d.ts.map +0 -1
- package/dist/router/__tests__/pattern-matching.test.js +0 -629
- package/dist/router/__tests__/pattern-matching.test.js.map +0 -1
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +0 -2
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +0 -1
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +0 -155
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +0 -1
- package/dist/router/error-handling.d.ts +0 -77
- package/dist/router/error-handling.d.ts.map +0 -1
- package/dist/router/error-handling.js +0 -202
- package/dist/router/error-handling.js.map +0 -1
- package/dist/router/handler-context.d.ts +0 -20
- package/dist/router/handler-context.d.ts.map +0 -1
- package/dist/router/handler-context.js +0 -198
- package/dist/router/handler-context.js.map +0 -1
- package/dist/router/intercept-resolution.d.ts +0 -66
- package/dist/router/intercept-resolution.d.ts.map +0 -1
- package/dist/router/intercept-resolution.js +0 -246
- package/dist/router/intercept-resolution.js.map +0 -1
- package/dist/router/loader-resolution.d.ts +0 -64
- package/dist/router/loader-resolution.d.ts.map +0 -1
- package/dist/router/loader-resolution.js +0 -284
- package/dist/router/loader-resolution.js.map +0 -1
- package/dist/router/logging.d.ts +0 -15
- package/dist/router/logging.d.ts.map +0 -1
- package/dist/router/logging.js +0 -99
- package/dist/router/logging.js.map +0 -1
- package/dist/router/manifest.d.ts +0 -22
- package/dist/router/manifest.d.ts.map +0 -1
- package/dist/router/manifest.js +0 -181
- package/dist/router/manifest.js.map +0 -1
- package/dist/router/match-api.d.ts +0 -35
- package/dist/router/match-api.d.ts.map +0 -1
- package/dist/router/match-api.js +0 -406
- package/dist/router/match-api.js.map +0 -1
- package/dist/router/match-context.d.ts +0 -206
- package/dist/router/match-context.d.ts.map +0 -1
- package/dist/router/match-context.js +0 -17
- package/dist/router/match-context.js.map +0 -1
- package/dist/router/match-middleware/background-revalidation.d.ts +0 -127
- package/dist/router/match-middleware/background-revalidation.d.ts.map +0 -1
- package/dist/router/match-middleware/background-revalidation.js +0 -75
- package/dist/router/match-middleware/background-revalidation.js.map +0 -1
- package/dist/router/match-middleware/cache-lookup.d.ts +0 -112
- package/dist/router/match-middleware/cache-lookup.d.ts.map +0 -1
- package/dist/router/match-middleware/cache-lookup.js +0 -257
- package/dist/router/match-middleware/cache-lookup.js.map +0 -1
- package/dist/router/match-middleware/cache-store.d.ts +0 -113
- package/dist/router/match-middleware/cache-store.d.ts.map +0 -1
- package/dist/router/match-middleware/cache-store.js +0 -108
- package/dist/router/match-middleware/cache-store.js.map +0 -1
- package/dist/router/match-middleware/index.d.ts +0 -81
- package/dist/router/match-middleware/index.d.ts.map +0 -1
- package/dist/router/match-middleware/index.js +0 -80
- package/dist/router/match-middleware/index.js.map +0 -1
- package/dist/router/match-middleware/intercept-resolution.d.ts +0 -117
- package/dist/router/match-middleware/intercept-resolution.d.ts.map +0 -1
- package/dist/router/match-middleware/intercept-resolution.js +0 -134
- package/dist/router/match-middleware/intercept-resolution.js.map +0 -1
- package/dist/router/match-middleware/segment-resolution.d.ts +0 -99
- package/dist/router/match-middleware/segment-resolution.d.ts.map +0 -1
- package/dist/router/match-middleware/segment-resolution.js +0 -53
- package/dist/router/match-middleware/segment-resolution.js.map +0 -1
- package/dist/router/match-pipelines.d.ts +0 -147
- package/dist/router/match-pipelines.d.ts.map +0 -1
- package/dist/router/match-pipelines.js +0 -82
- package/dist/router/match-pipelines.js.map +0 -1
- package/dist/router/match-result.d.ts +0 -126
- package/dist/router/match-result.d.ts.map +0 -1
- package/dist/router/match-result.js +0 -93
- package/dist/router/match-result.js.map +0 -1
- package/dist/router/metrics.d.ts +0 -20
- package/dist/router/metrics.d.ts.map +0 -1
- package/dist/router/metrics.js +0 -47
- package/dist/router/metrics.js.map +0 -1
- package/dist/router/middleware.d.ts +0 -249
- package/dist/router/middleware.d.ts.map +0 -1
- package/dist/router/middleware.js +0 -434
- package/dist/router/middleware.js.map +0 -1
- package/dist/router/middleware.test.d.ts +0 -2
- package/dist/router/middleware.test.d.ts.map +0 -1
- package/dist/router/middleware.test.js +0 -816
- package/dist/router/middleware.test.js.map +0 -1
- package/dist/router/pattern-matching.d.ts +0 -149
- package/dist/router/pattern-matching.d.ts.map +0 -1
- package/dist/router/pattern-matching.js +0 -349
- package/dist/router/pattern-matching.js.map +0 -1
- package/dist/router/revalidation.d.ts +0 -44
- package/dist/router/revalidation.d.ts.map +0 -1
- package/dist/router/revalidation.js +0 -147
- package/dist/router/revalidation.js.map +0 -1
- package/dist/router/router-context.d.ts +0 -135
- package/dist/router/router-context.d.ts.map +0 -1
- package/dist/router/router-context.js +0 -36
- package/dist/router/router-context.js.map +0 -1
- package/dist/router/segment-resolution.d.ts +0 -127
- package/dist/router/segment-resolution.d.ts.map +0 -1
- package/dist/router/segment-resolution.js +0 -919
- package/dist/router/segment-resolution.js.map +0 -1
- package/dist/router/trie-matching.d.ts +0 -40
- package/dist/router/trie-matching.d.ts.map +0 -1
- package/dist/router/trie-matching.js +0 -127
- package/dist/router/trie-matching.js.map +0 -1
- package/dist/router/types.d.ts +0 -136
- package/dist/router/types.d.ts.map +0 -1
- package/dist/router/types.js +0 -7
- package/dist/router/types.js.map +0 -1
- package/dist/router.d.ts +0 -753
- package/dist/router.d.ts.map +0 -1
- package/dist/router.gen.d.ts +0 -6
- package/dist/router.gen.d.ts.map +0 -1
- package/dist/router.gen.js +0 -6
- package/dist/router.gen.js.map +0 -1
- package/dist/router.js +0 -1304
- package/dist/router.js.map +0 -1
- package/dist/rsc/__tests__/helpers.test.d.ts +0 -2
- package/dist/rsc/__tests__/helpers.test.d.ts.map +0 -1
- package/dist/rsc/__tests__/helpers.test.js +0 -140
- package/dist/rsc/__tests__/helpers.test.js.map +0 -1
- package/dist/rsc/handler.d.ts +0 -45
- package/dist/rsc/handler.d.ts.map +0 -1
- package/dist/rsc/handler.js +0 -1172
- package/dist/rsc/handler.js.map +0 -1
- package/dist/rsc/helpers.d.ts +0 -16
- package/dist/rsc/helpers.d.ts.map +0 -1
- package/dist/rsc/helpers.js +0 -55
- package/dist/rsc/helpers.js.map +0 -1
- package/dist/rsc/index.d.ts +0 -22
- package/dist/rsc/index.d.ts.map +0 -1
- package/dist/rsc/index.js +0 -23
- package/dist/rsc/index.js.map +0 -1
- package/dist/rsc/nonce.d.ts +0 -9
- package/dist/rsc/nonce.d.ts.map +0 -1
- package/dist/rsc/nonce.js +0 -18
- package/dist/rsc/nonce.js.map +0 -1
- package/dist/rsc/types.d.ts +0 -206
- package/dist/rsc/types.d.ts.map +0 -1
- package/dist/rsc/types.js +0 -8
- package/dist/rsc/types.js.map +0 -1
- package/dist/search-params.d.ts +0 -103
- package/dist/search-params.d.ts.map +0 -1
- package/dist/search-params.js +0 -74
- package/dist/search-params.js.map +0 -1
- package/dist/segment-system.d.ts +0 -75
- package/dist/segment-system.d.ts.map +0 -1
- package/dist/segment-system.js +0 -336
- package/dist/segment-system.js.map +0 -1
- package/dist/server/context.d.ts +0 -245
- package/dist/server/context.d.ts.map +0 -1
- package/dist/server/context.js +0 -197
- package/dist/server/context.js.map +0 -1
- package/dist/server/fetchable-loader-store.d.ts +0 -18
- package/dist/server/fetchable-loader-store.d.ts.map +0 -1
- package/dist/server/fetchable-loader-store.js +0 -18
- package/dist/server/fetchable-loader-store.js.map +0 -1
- package/dist/server/handle-store.d.ts +0 -85
- package/dist/server/handle-store.d.ts.map +0 -1
- package/dist/server/handle-store.js +0 -142
- package/dist/server/handle-store.js.map +0 -1
- package/dist/server/loader-registry.d.ts +0 -55
- package/dist/server/loader-registry.d.ts.map +0 -1
- package/dist/server/loader-registry.js +0 -132
- package/dist/server/loader-registry.js.map +0 -1
- package/dist/server/request-context.d.ts +0 -226
- package/dist/server/request-context.d.ts.map +0 -1
- package/dist/server/request-context.js +0 -290
- package/dist/server/request-context.js.map +0 -1
- package/dist/server/root-layout.d.ts +0 -4
- package/dist/server/root-layout.d.ts.map +0 -1
- package/dist/server/root-layout.js +0 -5
- package/dist/server/root-layout.js.map +0 -1
- package/dist/server.d.ts +0 -15
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -20
- package/dist/server.js.map +0 -1
- package/dist/ssr/__tests__/ssr-handler.test.d.ts +0 -2
- package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +0 -1
- package/dist/ssr/__tests__/ssr-handler.test.js +0 -132
- package/dist/ssr/__tests__/ssr-handler.test.js.map +0 -1
- package/dist/ssr/index.d.ts +0 -98
- package/dist/ssr/index.d.ts.map +0 -1
- package/dist/ssr/index.js +0 -158
- package/dist/ssr/index.js.map +0 -1
- package/dist/static-handler.d.ts +0 -50
- package/dist/static-handler.d.ts.map +0 -1
- package/dist/static-handler.gen.d.ts +0 -5
- package/dist/static-handler.gen.d.ts.map +0 -1
- package/dist/static-handler.gen.js +0 -5
- package/dist/static-handler.gen.js.map +0 -1
- package/dist/static-handler.js +0 -29
- package/dist/static-handler.js.map +0 -1
- package/dist/theme/ThemeProvider.d.ts +0 -20
- package/dist/theme/ThemeProvider.d.ts.map +0 -1
- package/dist/theme/ThemeProvider.js +0 -240
- package/dist/theme/ThemeProvider.js.map +0 -1
- package/dist/theme/ThemeScript.d.ts +0 -48
- package/dist/theme/ThemeScript.d.ts.map +0 -1
- package/dist/theme/ThemeScript.js +0 -13
- package/dist/theme/ThemeScript.js.map +0 -1
- package/dist/theme/__tests__/theme.test.d.ts +0 -2
- package/dist/theme/__tests__/theme.test.d.ts.map +0 -1
- package/dist/theme/__tests__/theme.test.js +0 -103
- package/dist/theme/__tests__/theme.test.js.map +0 -1
- package/dist/theme/constants.d.ts +0 -29
- package/dist/theme/constants.d.ts.map +0 -1
- package/dist/theme/constants.js +0 -48
- package/dist/theme/constants.js.map +0 -1
- package/dist/theme/index.d.ts +0 -31
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/index.js +0 -36
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/theme-context.d.ts +0 -40
- package/dist/theme/theme-context.d.ts.map +0 -1
- package/dist/theme/theme-context.js +0 -60
- package/dist/theme/theme-context.js.map +0 -1
- package/dist/theme/theme-script.d.ts +0 -27
- package/dist/theme/theme-script.d.ts.map +0 -1
- package/dist/theme/theme-script.js +0 -147
- package/dist/theme/theme-script.js.map +0 -1
- package/dist/theme/types.d.ts +0 -163
- package/dist/theme/types.d.ts.map +0 -1
- package/dist/theme/types.js +0 -11
- package/dist/theme/types.js.map +0 -1
- package/dist/theme/use-theme.d.ts +0 -12
- package/dist/theme/use-theme.d.ts.map +0 -1
- package/dist/theme/use-theme.js +0 -40
- package/dist/theme/use-theme.js.map +0 -1
- package/dist/types.d.ts +0 -1479
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -10
- package/dist/types.js.map +0 -1
- package/dist/urls.d.ts +0 -441
- package/dist/urls.d.ts.map +0 -1
- package/dist/urls.gen.d.ts +0 -8
- package/dist/urls.gen.d.ts.map +0 -1
- package/dist/urls.gen.js +0 -8
- package/dist/urls.gen.js.map +0 -1
- package/dist/urls.js +0 -443
- package/dist/urls.js.map +0 -1
- package/dist/use-loader.d.ts +0 -127
- package/dist/use-loader.d.ts.map +0 -1
- package/dist/use-loader.js +0 -237
- package/dist/use-loader.js.map +0 -1
- package/dist/vite/__tests__/ast-handler-extract.test.d.ts +0 -2
- package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +0 -1
- package/dist/vite/__tests__/ast-handler-extract.test.js +0 -294
- package/dist/vite/__tests__/ast-handler-extract.test.js.map +0 -1
- package/dist/vite/__tests__/expose-id-utils.test.d.ts +0 -2
- package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +0 -1
- package/dist/vite/__tests__/expose-id-utils.test.js +0 -224
- package/dist/vite/__tests__/expose-id-utils.test.js.map +0 -1
- package/dist/vite/__tests__/expose-internal-ids.test.d.ts +0 -2
- package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +0 -1
- package/dist/vite/__tests__/expose-internal-ids.test.js +0 -647
- package/dist/vite/__tests__/expose-internal-ids.test.js.map +0 -1
- package/dist/vite/__tests__/expose-router-id.test.d.ts +0 -2
- package/dist/vite/__tests__/expose-router-id.test.d.ts.map +0 -1
- package/dist/vite/__tests__/expose-router-id.test.js +0 -39
- package/dist/vite/__tests__/expose-router-id.test.js.map +0 -1
- package/dist/vite/ast-handler-extract.d.ts +0 -49
- package/dist/vite/ast-handler-extract.d.ts.map +0 -1
- package/dist/vite/ast-handler-extract.js +0 -249
- package/dist/vite/ast-handler-extract.js.map +0 -1
- package/dist/vite/expose-action-id.d.ts +0 -19
- package/dist/vite/expose-action-id.d.ts.map +0 -1
- package/dist/vite/expose-action-id.js +0 -250
- package/dist/vite/expose-action-id.js.map +0 -1
- package/dist/vite/expose-id-utils.d.ts +0 -69
- package/dist/vite/expose-id-utils.d.ts.map +0 -1
- package/dist/vite/expose-id-utils.js +0 -289
- package/dist/vite/expose-id-utils.js.map +0 -1
- package/dist/vite/expose-internal-ids.d.ts +0 -22
- package/dist/vite/expose-internal-ids.d.ts.map +0 -1
- package/dist/vite/expose-internal-ids.js +0 -886
- package/dist/vite/expose-internal-ids.js.map +0 -1
- package/dist/vite/index.d.ts +0 -149
- package/dist/vite/index.d.ts.map +0 -1
- package/dist/vite/index.js.bak +0 -5448
- package/dist/vite/index.js.map +0 -1
- package/dist/vite/index.named-routes.gen.ts +0 -103
- package/dist/vite/package-resolution.d.ts +0 -43
- package/dist/vite/package-resolution.d.ts.map +0 -1
- package/dist/vite/package-resolution.js +0 -112
- package/dist/vite/package-resolution.js.map +0 -1
- package/dist/vite/virtual-entries.d.ts +0 -25
- package/dist/vite/virtual-entries.d.ts.map +0 -1
- package/dist/vite/virtual-entries.js +0 -110
- package/dist/vite/virtual-entries.js.map +0 -1
- package/src/browser/shallow.ts +0 -40
|
@@ -33,13 +33,6 @@ export interface ParsedSegment {
|
|
|
33
33
|
*/
|
|
34
34
|
export function parsePattern(pattern: string): ParsedSegment[] {
|
|
35
35
|
const segments: ParsedSegment[] = [];
|
|
36
|
-
// Match: /segment where segment can be:
|
|
37
|
-
// - static text
|
|
38
|
-
// - :param
|
|
39
|
-
// - :param?
|
|
40
|
-
// - :param(a|b)
|
|
41
|
-
// - :param(a|b)?
|
|
42
|
-
// - *
|
|
43
36
|
const segmentRegex =
|
|
44
37
|
/\/(:([a-zA-Z_][a-zA-Z0-9_]*)(\(([^)]+)\))?(\?)?([^/]*)|(\*)|([^/]+))/g;
|
|
45
38
|
|
|
@@ -183,7 +176,6 @@ export function compilePattern(pattern: string): CompiledPattern {
|
|
|
183
176
|
}
|
|
184
177
|
}
|
|
185
178
|
|
|
186
|
-
// Handle root path
|
|
187
179
|
if (regexPattern === "") {
|
|
188
180
|
regexPattern = "/";
|
|
189
181
|
}
|
|
@@ -285,7 +277,6 @@ function buildParamsFromMatch(
|
|
|
285
277
|
export function extractStaticPrefix(pattern: string): string {
|
|
286
278
|
if (!pattern || pattern === "/") return "";
|
|
287
279
|
|
|
288
|
-
// Find the first occurrence of : or *
|
|
289
280
|
const paramIndex = pattern.indexOf(":");
|
|
290
281
|
const wildcardIndex = pattern.indexOf("*");
|
|
291
282
|
|
|
@@ -299,16 +290,13 @@ export function extractStaticPrefix(pattern: string): string {
|
|
|
299
290
|
}
|
|
300
291
|
|
|
301
292
|
if (cutIndex === -1) {
|
|
302
|
-
// No params or wildcards - entire pattern is static
|
|
303
293
|
return pattern;
|
|
304
294
|
}
|
|
305
295
|
|
|
306
296
|
if (cutIndex === 0) {
|
|
307
|
-
// Pattern starts with : or * - no static prefix
|
|
308
297
|
return "";
|
|
309
298
|
}
|
|
310
299
|
|
|
311
|
-
// Find the last / before the param
|
|
312
300
|
const lastSlash = pattern.lastIndexOf("/", cutIndex - 1);
|
|
313
301
|
if (lastSlash === -1 || lastSlash === 0) {
|
|
314
302
|
return "";
|
|
@@ -435,8 +423,6 @@ export function findMatch<TEnv>(
|
|
|
435
423
|
: pathname + "/";
|
|
436
424
|
|
|
437
425
|
for (const entry of routesEntries) {
|
|
438
|
-
// Short-circuit: skip entry if pathname doesn't start with static prefix
|
|
439
|
-
// staticPrefix is pre-computed at registration time, so this is O(1)
|
|
440
426
|
if (entry.staticPrefix && !pathname.startsWith(entry.staticPrefix)) {
|
|
441
427
|
if (effectiveDebug) {
|
|
442
428
|
debugStats.entriesSkipped++;
|
|
@@ -448,8 +434,6 @@ export function findMatch<TEnv>(
|
|
|
448
434
|
continue;
|
|
449
435
|
}
|
|
450
436
|
|
|
451
|
-
// Check if this is a lazy entry that needs evaluation
|
|
452
|
-
// When staticPrefix matches but routes are not yet populated, signal caller to evaluate
|
|
453
437
|
if (entry.lazy && !entry.lazyEvaluated) {
|
|
454
438
|
if (effectiveDebug) {
|
|
455
439
|
debugLog("findMatch", "lazy entry requires evaluation", {
|
|
@@ -470,7 +454,6 @@ export function findMatch<TEnv>(
|
|
|
470
454
|
debugStats.routesChecked++;
|
|
471
455
|
}
|
|
472
456
|
|
|
473
|
-
// Join prefix and pattern, handling edge cases
|
|
474
457
|
let fullPattern: string;
|
|
475
458
|
if (entry.prefix === "" || entry.prefix === "/") {
|
|
476
459
|
fullPattern = pattern;
|
|
@@ -488,11 +471,9 @@ export function findMatch<TEnv>(
|
|
|
488
471
|
constraints,
|
|
489
472
|
} = getCompiledPattern(fullPattern);
|
|
490
473
|
|
|
491
|
-
// Get trailing slash mode for this route (per-route config or pattern-based)
|
|
492
474
|
const trailingSlashMode: TrailingSlashMode | undefined =
|
|
493
475
|
entry.trailingSlash?.[routeKey];
|
|
494
476
|
|
|
495
|
-
// Prerender flag from entry metadata (set by urls() for prerender handlers)
|
|
496
477
|
const prFlag = entry.prerenderRouteKeys?.has(routeKey)
|
|
497
478
|
? { pr: true as const }
|
|
498
479
|
: {};
|
|
@@ -500,13 +481,10 @@ export function findMatch<TEnv>(
|
|
|
500
481
|
? { pt: true as const }
|
|
501
482
|
: {};
|
|
502
483
|
|
|
503
|
-
// Try exact match first
|
|
504
484
|
const match = regex.exec(pathname);
|
|
505
485
|
if (match) {
|
|
506
486
|
const params = buildParamsFromMatch(match, paramNames);
|
|
507
487
|
|
|
508
|
-
// Validate constraints against decoded values; a failure falls
|
|
509
|
-
// through to the next route so other patterns can still match.
|
|
510
488
|
if (!satisfiesConstraints(params, constraints)) {
|
|
511
489
|
continue;
|
|
512
490
|
}
|
|
@@ -519,13 +497,11 @@ export function findMatch<TEnv>(
|
|
|
519
497
|
});
|
|
520
498
|
}
|
|
521
499
|
|
|
522
|
-
// Check if trailing slash mode requires redirect even on exact match
|
|
523
500
|
if (
|
|
524
501
|
trailingSlashMode === "always" &&
|
|
525
502
|
!pathnameHasTrailingSlash &&
|
|
526
503
|
pathname !== "/"
|
|
527
504
|
) {
|
|
528
|
-
// Mode says always have trailing slash, but pathname doesn't have it
|
|
529
505
|
return {
|
|
530
506
|
entry,
|
|
531
507
|
routeKey,
|
|
@@ -536,7 +512,6 @@ export function findMatch<TEnv>(
|
|
|
536
512
|
...ptFlag,
|
|
537
513
|
};
|
|
538
514
|
} else if (trailingSlashMode === "never" && pathnameHasTrailingSlash) {
|
|
539
|
-
// Mode says never have trailing slash, but pathname has it
|
|
540
515
|
return {
|
|
541
516
|
entry,
|
|
542
517
|
routeKey,
|
|
@@ -558,7 +533,6 @@ export function findMatch<TEnv>(
|
|
|
558
533
|
};
|
|
559
534
|
}
|
|
560
535
|
|
|
561
|
-
// Try alternate pathname (opposite trailing slash)
|
|
562
536
|
const altMatch = regex.exec(alternatePathname);
|
|
563
537
|
if (altMatch) {
|
|
564
538
|
const params = buildParamsFromMatch(altMatch, paramNames);
|
|
@@ -567,9 +541,7 @@ export function findMatch<TEnv>(
|
|
|
567
541
|
continue;
|
|
568
542
|
}
|
|
569
543
|
|
|
570
|
-
// Determine redirect behavior based on mode
|
|
571
544
|
if (trailingSlashMode === "ignore") {
|
|
572
|
-
// Match without redirect
|
|
573
545
|
return {
|
|
574
546
|
entry,
|
|
575
547
|
routeKey,
|
|
@@ -579,7 +551,6 @@ export function findMatch<TEnv>(
|
|
|
579
551
|
...ptFlag,
|
|
580
552
|
};
|
|
581
553
|
} else if (trailingSlashMode === "never") {
|
|
582
|
-
// Redirect to no trailing slash
|
|
583
554
|
if (pathnameHasTrailingSlash) {
|
|
584
555
|
return {
|
|
585
556
|
entry,
|
|
@@ -600,7 +571,6 @@ export function findMatch<TEnv>(
|
|
|
600
571
|
...ptFlag,
|
|
601
572
|
};
|
|
602
573
|
} else if (trailingSlashMode === "always") {
|
|
603
|
-
// Redirect to with trailing slash
|
|
604
574
|
if (!pathnameHasTrailingSlash) {
|
|
605
575
|
return {
|
|
606
576
|
entry,
|
|
@@ -621,8 +591,6 @@ export function findMatch<TEnv>(
|
|
|
621
591
|
...ptFlag,
|
|
622
592
|
};
|
|
623
593
|
} else {
|
|
624
|
-
// No explicit mode - use pattern-based detection
|
|
625
|
-
// Redirect to canonical form (what the pattern defines)
|
|
626
594
|
const canonicalPath = hasTrailingSlash
|
|
627
595
|
? alternatePathname
|
|
628
596
|
: pathname.slice(0, -1);
|
|
@@ -651,7 +619,7 @@ export function* traverseBack(entry: EntryData): Generator<EntryData> {
|
|
|
651
619
|
let current: EntryData | null = entry;
|
|
652
620
|
const items = [] as EntryData[];
|
|
653
621
|
while (current !== null) {
|
|
654
|
-
items.push(current);
|
|
622
|
+
items.push(current);
|
|
655
623
|
current = current.parent;
|
|
656
624
|
}
|
|
657
625
|
for (let i = items.length - 1; i >= 0; i--) {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
createStaticContext,
|
|
12
12
|
createReverseFunction,
|
|
13
13
|
} from "./handler-context.js";
|
|
14
|
-
import {
|
|
14
|
+
import { detectPrerenderPassthrough } from "../prerender.js";
|
|
15
15
|
import { isRouteRootScoped } from "../route-map-builder.js";
|
|
16
16
|
import { setupBuildUse } from "./loader-resolution.js";
|
|
17
17
|
import { loadManifest } from "./manifest.js";
|
|
@@ -82,6 +82,17 @@ export async function matchForPrerender<TEnv = any>(
|
|
|
82
82
|
// Build RouterContext for loadManifest/traverseBack
|
|
83
83
|
const routerCtx = deps.buildRouterContext();
|
|
84
84
|
|
|
85
|
+
// Passthrough sentinel result: an unknown-param Passthrough route falls
|
|
86
|
+
// through to the live handler at runtime, so no artifact is baked. A fresh
|
|
87
|
+
// object is returned per call (no site mutates or identity-compares it).
|
|
88
|
+
const passthroughResult = () => ({
|
|
89
|
+
segments: [],
|
|
90
|
+
handles: "",
|
|
91
|
+
routeName: matched.routeKey,
|
|
92
|
+
params: matchedParams,
|
|
93
|
+
passthrough: true as const,
|
|
94
|
+
});
|
|
95
|
+
|
|
85
96
|
return runWithRouterContext(routerCtx, async () => {
|
|
86
97
|
// 2. Load the manifest entry tree
|
|
87
98
|
const manifestEntry = await loadManifest(
|
|
@@ -145,13 +156,7 @@ export async function matchForPrerender<TEnv = any>(
|
|
|
145
156
|
);
|
|
146
157
|
});
|
|
147
158
|
if (!isKnown) {
|
|
148
|
-
return
|
|
149
|
-
segments: [],
|
|
150
|
-
handles: "",
|
|
151
|
-
routeName: matched.routeKey,
|
|
152
|
-
params: matchedParams,
|
|
153
|
-
passthrough: true as const,
|
|
154
|
-
};
|
|
159
|
+
return passthroughResult();
|
|
155
160
|
}
|
|
156
161
|
// Preserve vars set by getParams() for the render context
|
|
157
162
|
if (
|
|
@@ -165,13 +170,7 @@ export async function matchForPrerender<TEnv = any>(
|
|
|
165
170
|
// Skip errors are intentional — treat as passthrough.
|
|
166
171
|
// All other errors propagate so dev surfaces them.
|
|
167
172
|
if (err?.name === "Skip") {
|
|
168
|
-
return
|
|
169
|
-
segments: [],
|
|
170
|
-
handles: "",
|
|
171
|
-
routeName: matched.routeKey,
|
|
172
|
-
params: matchedParams,
|
|
173
|
-
passthrough: true as const,
|
|
174
|
-
};
|
|
173
|
+
return passthroughResult();
|
|
175
174
|
}
|
|
176
175
|
throw err;
|
|
177
176
|
}
|
|
@@ -264,17 +263,13 @@ export async function matchForPrerender<TEnv = any>(
|
|
|
264
263
|
{ skipLoaders: true },
|
|
265
264
|
);
|
|
266
265
|
|
|
267
|
-
// 9. Detect passthrough sentinel: handler returned ctx.passthrough()
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
params: matchedParams,
|
|
275
|
-
passthrough: true as const,
|
|
276
|
-
};
|
|
277
|
-
}
|
|
266
|
+
// 9. Detect passthrough sentinel: handler returned ctx.passthrough().
|
|
267
|
+
// When the route declares loading(), the handler result is deferred so the
|
|
268
|
+
// component is a thenable resolving to the sentinel — detectPrerenderPassthrough
|
|
269
|
+
// resolves thenables before testing (a sync check would miss it and bake a
|
|
270
|
+
// corrupt artifact).
|
|
271
|
+
if (await detectPrerenderPassthrough(allSegments)) {
|
|
272
|
+
return passthroughResult();
|
|
278
273
|
}
|
|
279
274
|
|
|
280
275
|
// 10. Filter out any loader segments (belt-and-suspenders)
|
|
@@ -319,24 +314,14 @@ export async function matchForPrerender<TEnv = any>(
|
|
|
319
314
|
}[] = [];
|
|
320
315
|
let current: EntryData | null = manifestEntry;
|
|
321
316
|
while (current) {
|
|
322
|
-
|
|
323
|
-
|
|
317
|
+
// Flatten the entry and its sibling layouts into one source list, the
|
|
318
|
+
// same traversal findInterceptForRoute uses; the build keeps ALL matches
|
|
319
|
+
// (not just the innermost) and skips when(). intercept/layout are
|
|
320
|
+
// non-optional arrays, so empty ones are a no-op here.
|
|
321
|
+
for (const source of [current, ...current.layout]) {
|
|
322
|
+
for (const ic of source.intercept) {
|
|
324
323
|
if (ic.routeName === matched.routeKey) {
|
|
325
|
-
foundIntercepts.push({ intercept: ic, entry:
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
if (current.layout && current.layout.length > 0) {
|
|
330
|
-
for (const siblingLayout of current.layout) {
|
|
331
|
-
if (siblingLayout.intercept && siblingLayout.intercept.length > 0) {
|
|
332
|
-
for (const ic of siblingLayout.intercept) {
|
|
333
|
-
if (ic.routeName === matched.routeKey) {
|
|
334
|
-
foundIntercepts.push({
|
|
335
|
-
intercept: ic,
|
|
336
|
-
entry: siblingLayout,
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
}
|
|
324
|
+
foundIntercepts.push({ intercept: ic, entry: source });
|
|
340
325
|
}
|
|
341
326
|
}
|
|
342
327
|
}
|
|
@@ -503,14 +488,13 @@ export async function renderStaticSegment<TEnv = any>(
|
|
|
503
488
|
setupBuildUse(buildCtx);
|
|
504
489
|
|
|
505
490
|
const raw = await handler(buildCtx);
|
|
506
|
-
const component = raw?.type ? raw : raw;
|
|
507
491
|
|
|
508
492
|
const segment: ResolvedSegment = {
|
|
509
493
|
id: handlerId,
|
|
510
494
|
namespace: handlerId,
|
|
511
495
|
type: "layout",
|
|
512
496
|
index: 0,
|
|
513
|
-
component,
|
|
497
|
+
component: raw,
|
|
514
498
|
params: {},
|
|
515
499
|
belongsToRoute: false,
|
|
516
500
|
};
|
|
@@ -23,10 +23,6 @@ import { negotiateRoute } from "./content-negotiation.js";
|
|
|
23
23
|
import { stripInternalParams } from "./handler-context.js";
|
|
24
24
|
import { resolveRoute, type RouteSnapshot } from "./route-snapshot.js";
|
|
25
25
|
|
|
26
|
-
// ---------------------------------------------------------------------------
|
|
27
|
-
// RequestPlan — discriminated union
|
|
28
|
-
// ---------------------------------------------------------------------------
|
|
29
|
-
|
|
30
26
|
interface RedirectPlan<TEnv = any> {
|
|
31
27
|
mode: "redirect";
|
|
32
28
|
route: RouteSnapshot<TEnv>;
|
|
@@ -124,10 +120,6 @@ export type {
|
|
|
124
120
|
PartialRenderPlan,
|
|
125
121
|
};
|
|
126
122
|
|
|
127
|
-
// ---------------------------------------------------------------------------
|
|
128
|
-
// classifyRequest — the single authoritative classification step
|
|
129
|
-
// ---------------------------------------------------------------------------
|
|
130
|
-
|
|
131
123
|
export interface ClassifyRequestDeps<TEnv = any> {
|
|
132
124
|
findMatch: (pathname: string) => RouteMatchResult<TEnv> | null;
|
|
133
125
|
routerVersion: string;
|
|
@@ -157,15 +149,12 @@ export async function classifyRequest<TEnv = any>(
|
|
|
157
149
|
const isAction =
|
|
158
150
|
request.headers.has("rsc-action") || url.searchParams.has("_rsc_action");
|
|
159
151
|
|
|
160
|
-
// Version mismatch — runs BEFORE route resolution so stale clients
|
|
161
|
-
// requesting removed routes get a reload, not a 404.
|
|
162
152
|
const clientVersion = url.searchParams.get("_rsc_v");
|
|
163
153
|
if (
|
|
164
154
|
deps.routerVersion &&
|
|
165
155
|
clientVersion &&
|
|
166
156
|
clientVersion !== deps.routerVersion
|
|
167
157
|
) {
|
|
168
|
-
// Strip internal _rsc_* params so the browser reloads to a clean URL
|
|
169
158
|
let reloadUrl = stripInternalParams(url).toString();
|
|
170
159
|
if (isAction) {
|
|
171
160
|
const referer = request.headers.get("referer");
|
|
@@ -175,9 +164,7 @@ export async function classifyRequest<TEnv = any>(
|
|
|
175
164
|
if (refererUrl.origin === url.origin) {
|
|
176
165
|
reloadUrl = referer;
|
|
177
166
|
}
|
|
178
|
-
} catch {
|
|
179
|
-
// Malformed referer, fall back to stripped url
|
|
180
|
-
}
|
|
167
|
+
} catch {}
|
|
181
168
|
}
|
|
182
169
|
}
|
|
183
170
|
|
|
@@ -187,18 +174,6 @@ export async function classifyRequest<TEnv = any>(
|
|
|
187
174
|
};
|
|
188
175
|
}
|
|
189
176
|
|
|
190
|
-
// App switch — also runs BEFORE route resolution (like version-mismatch
|
|
191
|
-
// above), and for the same reason: a cross-app SPA navigation must reload
|
|
192
|
-
// even when the target route does NOT exist in the target app. If we resolved
|
|
193
|
-
// first, a missing route would throw RouteNotFoundError and the 404 would
|
|
194
|
-
// render in-place under the SOURCE app's document — violating the invariant
|
|
195
|
-
// that crossing a host-router app boundary is always a full document load.
|
|
196
|
-
// A mismatched routerId (_rsc_rid) means the navigation crossed an app
|
|
197
|
-
// boundary; force a real document navigation. A soft swap can't faithfully
|
|
198
|
-
// re-establish the target app's document (stylesheets shared across apps are
|
|
199
|
-
// dropped by React 19's by-href dedup; theme/warmup/prefetch-TTL are
|
|
200
|
-
// document-lifetime — see browser/app-shell.ts). Only SPA (`_rsc_partial`)
|
|
201
|
-
// requests need this; a direct full load already IS the document navigation.
|
|
202
177
|
const clientRouterId = url.searchParams.get("_rsc_rid");
|
|
203
178
|
if (
|
|
204
179
|
clientRouterId &&
|
|
@@ -211,9 +186,6 @@ export async function classifyRequest<TEnv = any>(
|
|
|
211
186
|
};
|
|
212
187
|
}
|
|
213
188
|
|
|
214
|
-
// No metricsStore — classification is a lightweight gating step.
|
|
215
|
-
// Route-matching and manifest-loading metrics belong in the match path
|
|
216
|
-
// (createMatchContextForFull/Partial) which runs the authoritative resolution.
|
|
217
189
|
const result = await resolveRoute<TEnv>(pathname, {
|
|
218
190
|
findMatch: deps.findMatch,
|
|
219
191
|
lite: true,
|
|
@@ -225,7 +197,6 @@ export async function classifyRequest<TEnv = any>(
|
|
|
225
197
|
});
|
|
226
198
|
}
|
|
227
199
|
|
|
228
|
-
// Redirect
|
|
229
200
|
if (result.type === "redirect") {
|
|
230
201
|
const snapshot: RouteSnapshot<TEnv> = {
|
|
231
202
|
matched: result as any,
|
|
@@ -247,7 +218,6 @@ export async function classifyRequest<TEnv = any>(
|
|
|
247
218
|
|
|
248
219
|
const snapshot = result.snapshot;
|
|
249
220
|
|
|
250
|
-
// Response route — non-RSC short-circuit (JSON, streaming, etc.)
|
|
251
221
|
const responseResult = await classifyResponseRoute(
|
|
252
222
|
request,
|
|
253
223
|
pathname,
|
|
@@ -257,7 +227,6 @@ export async function classifyRequest<TEnv = any>(
|
|
|
257
227
|
return responseResult;
|
|
258
228
|
}
|
|
259
229
|
|
|
260
|
-
// Mode detection from request signals
|
|
261
230
|
const actionId =
|
|
262
231
|
request.headers.get("rsc-action") || url.searchParams.get("_rsc_action");
|
|
263
232
|
const isLoaderFetch = url.searchParams.has("_rsc_loader");
|
|
@@ -275,7 +244,6 @@ export async function classifyRequest<TEnv = any>(
|
|
|
275
244
|
return { mode: "loader", route: snapshot };
|
|
276
245
|
}
|
|
277
246
|
|
|
278
|
-
// PE detection: POST with form content-type, but not a server action
|
|
279
247
|
const contentType = request.headers.get("content-type") || "";
|
|
280
248
|
const isFormSubmission =
|
|
281
249
|
contentType.includes("multipart/form-data") ||
|
|
@@ -291,10 +259,6 @@ export async function classifyRequest<TEnv = any>(
|
|
|
291
259
|
return { mode: "full-render", route: snapshot, negotiated };
|
|
292
260
|
}
|
|
293
261
|
|
|
294
|
-
// ---------------------------------------------------------------------------
|
|
295
|
-
// Content negotiation for response routes
|
|
296
|
-
// ---------------------------------------------------------------------------
|
|
297
|
-
|
|
298
262
|
/**
|
|
299
263
|
* Check if the route is a response route and perform content negotiation
|
|
300
264
|
* if negotiate variants exist. Returns a ResponseRoutePlan if the route
|
|
@@ -305,7 +269,6 @@ async function classifyResponseRoute<TEnv>(
|
|
|
305
269
|
pathname: string,
|
|
306
270
|
snapshot: RouteSnapshot<TEnv>,
|
|
307
271
|
): Promise<ResponseRoutePlan<TEnv> | null> {
|
|
308
|
-
// negotiateRoute returns the response plan (variant or plain) or null for RSC.
|
|
309
272
|
const negotiation = await negotiateRoute(request, pathname, snapshot);
|
|
310
273
|
return negotiation
|
|
311
274
|
? { mode: "response", route: snapshot, ...negotiation }
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import type { RevalidationTraceEntry } from "./logging.js";
|
|
15
15
|
import { _getRequestContext } from "../server/request-context.js";
|
|
16
16
|
import { isAutoGeneratedRouteName } from "../route-name.js";
|
|
17
|
+
import { paramsEqual } from "./params-util.js";
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* Resolve a server-action reference's stable id, mirroring how the action
|
|
@@ -56,22 +57,6 @@ function makeIsAction(
|
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
function paramsEqual(
|
|
60
|
-
a: Record<string, string>,
|
|
61
|
-
b: Record<string, string>,
|
|
62
|
-
): boolean {
|
|
63
|
-
if (a === b) return true;
|
|
64
|
-
|
|
65
|
-
const keysA = Object.keys(a);
|
|
66
|
-
if (keysA.length !== Object.keys(b).length) return false;
|
|
67
|
-
|
|
68
|
-
for (const key of keysA) {
|
|
69
|
-
if (a[key] !== b[key]) return false;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
60
|
/**
|
|
76
61
|
* Options for revalidation evaluation
|
|
77
62
|
*/
|
|
@@ -136,8 +121,6 @@ export async function evaluateRevalidation<TEnv>(
|
|
|
136
121
|
const paramsChanged = !paramsEqual(nextParams, prevParams);
|
|
137
122
|
const searchChanged = prevUrl.search !== nextUrl.search;
|
|
138
123
|
|
|
139
|
-
// Trace helper: push a structured entry to the request-scoped trace buffer.
|
|
140
|
-
// Guarded by isTraceActive() so object construction is skipped in production.
|
|
141
124
|
function pushTrace(
|
|
142
125
|
defaultVal: boolean,
|
|
143
126
|
finalVal: boolean,
|
|
@@ -156,43 +139,28 @@ export async function evaluateRevalidation<TEnv>(
|
|
|
156
139
|
});
|
|
157
140
|
}
|
|
158
141
|
|
|
159
|
-
// Calculate default revalidation based on segment type and request method
|
|
160
142
|
let defaultShouldRevalidate: boolean;
|
|
161
143
|
let defaultReason: string;
|
|
162
144
|
|
|
163
145
|
if (defaultOverride) {
|
|
164
|
-
// Caller injected the seed (e.g. parallel slot not in clientSegmentIds).
|
|
165
|
-
// Skip the type-derived heuristic — caller knows better in this context.
|
|
166
146
|
defaultShouldRevalidate = defaultOverride.value;
|
|
167
147
|
defaultReason = defaultOverride.reason;
|
|
168
148
|
} else if (request.method === "POST") {
|
|
169
|
-
// Actions: revalidate segments that belong to the route, skip parent chain
|
|
170
149
|
if (segment.type === "route") {
|
|
171
|
-
// Route segment always revalidates on actions
|
|
172
150
|
defaultShouldRevalidate = true;
|
|
173
151
|
defaultReason = "action:route-segment";
|
|
174
152
|
} else if (segment.type === "loader") {
|
|
175
|
-
// Loaders always revalidate on actions - they often contain action-sensitive data
|
|
176
|
-
// (e.g., cart count after add-to-cart action)
|
|
177
153
|
defaultShouldRevalidate = true;
|
|
178
154
|
defaultReason = "action:loader-segment";
|
|
179
155
|
} else if (segment.belongsToRoute) {
|
|
180
|
-
// Segment belongs to route (orphan layouts/parallels) - revalidate
|
|
181
156
|
defaultShouldRevalidate = true;
|
|
182
157
|
defaultReason = "action:belongs-to-route";
|
|
183
158
|
} else {
|
|
184
|
-
// Parent chain segment (shared layouts/parallels) - don't revalidate
|
|
185
159
|
defaultShouldRevalidate = false;
|
|
186
160
|
defaultReason = "action:parent-chain-skip";
|
|
187
161
|
}
|
|
188
162
|
} else {
|
|
189
|
-
// Navigation (GET): Conservative defaults to minimize unnecessary revalidations
|
|
190
|
-
// Only the route segment revalidates by default - all others require explicit opt-in
|
|
191
|
-
|
|
192
163
|
if (segment.type === "route") {
|
|
193
|
-
// Route segments revalidate when path params OR search params change.
|
|
194
|
-
// Search params (e.g., ?page=2&sort=price) are server-parsed via ctx.search,
|
|
195
|
-
// so the handler must re-execute to produce updated content.
|
|
196
164
|
const routeChanged = paramsChanged || searchChanged;
|
|
197
165
|
defaultShouldRevalidate = routeChanged;
|
|
198
166
|
defaultReason = paramsChanged
|
|
@@ -208,8 +176,6 @@ export async function evaluateRevalidation<TEnv>(
|
|
|
208
176
|
});
|
|
209
177
|
}
|
|
210
178
|
} else if (segment.belongsToRoute && (paramsChanged || searchChanged)) {
|
|
211
|
-
// Children of the route path (loaders, orphan layouts/parallels)
|
|
212
|
-
// revalidate when path params or search params change
|
|
213
179
|
defaultShouldRevalidate = true;
|
|
214
180
|
defaultReason = paramsChanged
|
|
215
181
|
? "nav:route-child-params-changed"
|
|
@@ -221,9 +187,6 @@ export async function evaluateRevalidation<TEnv>(
|
|
|
221
187
|
searchChanged,
|
|
222
188
|
});
|
|
223
189
|
} else {
|
|
224
|
-
// Parent layouts and parallels default to no revalidation
|
|
225
|
-
// Cannot assume these segments depend on params without explicit declaration
|
|
226
|
-
// Use custom revalidation functions to opt-in when needed
|
|
227
190
|
defaultShouldRevalidate = false;
|
|
228
191
|
defaultReason = "nav:non-route-skip";
|
|
229
192
|
debugLog("revalidation", "non-route segment skipped by default", {
|
|
@@ -233,7 +196,6 @@ export async function evaluateRevalidation<TEnv>(
|
|
|
233
196
|
}
|
|
234
197
|
}
|
|
235
198
|
|
|
236
|
-
// No custom revalidations defined - return default behavior without prev segment
|
|
237
199
|
if (revalidations.length === 0) {
|
|
238
200
|
if (defaultShouldRevalidate) {
|
|
239
201
|
debugLog("revalidation", "default revalidate=true", {
|
|
@@ -250,14 +212,10 @@ export async function evaluateRevalidation<TEnv>(
|
|
|
250
212
|
return defaultShouldRevalidate;
|
|
251
213
|
}
|
|
252
214
|
|
|
253
|
-
// Custom revalidations exist - may need full prev segment
|
|
254
|
-
// Lazy load prev segment only if getPrevSegment provided
|
|
255
215
|
const prevSegment = getPrevSegment ? await getPrevSegment() : null;
|
|
256
216
|
|
|
257
|
-
// Execute revalidation functions with soft/hard decision pattern
|
|
258
217
|
let currentSuggestion = defaultShouldRevalidate;
|
|
259
218
|
|
|
260
|
-
// Compute public route names (filtered: undefined for auto-generated routes)
|
|
261
219
|
const toRouteName =
|
|
262
220
|
routeKey && !isAutoGeneratedRouteName(routeKey) ? routeKey : undefined;
|
|
263
221
|
const reqCtx = _getRequestContext();
|
|
@@ -285,20 +243,14 @@ export async function evaluateRevalidation<TEnv>(
|
|
|
285
243
|
actionUrl: actionContext?.actionUrl,
|
|
286
244
|
actionResult: actionContext?.actionResult,
|
|
287
245
|
formData: actionContext?.formData,
|
|
288
|
-
method: request.method,
|
|
289
|
-
routeName: toRouteName,
|
|
290
|
-
fromRouteName,
|
|
291
|
-
toRouteName,
|
|
292
|
-
// Stale cache context (only true for background revalidation after stale cache render)
|
|
246
|
+
method: request.method,
|
|
247
|
+
routeName: toRouteName,
|
|
248
|
+
fromRouteName,
|
|
249
|
+
toRouteName,
|
|
293
250
|
stale,
|
|
294
251
|
});
|
|
295
252
|
|
|
296
|
-
// Check return type:
|
|
297
|
-
// - boolean: hard decision, short-circuit immediately
|
|
298
|
-
// - { defaultShouldRevalidate: boolean }: soft decision, update suggestion and continue
|
|
299
|
-
// - null/undefined: use default behavior (equivalent to returning { defaultShouldRevalidate })
|
|
300
253
|
if (typeof result === "boolean") {
|
|
301
|
-
// Hard decision - short-circuit
|
|
302
254
|
debugLog("revalidation", "hard decision", {
|
|
303
255
|
segmentId: segment.id,
|
|
304
256
|
revalidator: name,
|
|
@@ -311,7 +263,6 @@ export async function evaluateRevalidation<TEnv>(
|
|
|
311
263
|
typeof result === "object" &&
|
|
312
264
|
"defaultShouldRevalidate" in result
|
|
313
265
|
) {
|
|
314
|
-
// Soft decision - update suggestion and continue
|
|
315
266
|
currentSuggestion = result.defaultShouldRevalidate;
|
|
316
267
|
debugLog("revalidation", "soft decision", {
|
|
317
268
|
segmentId: segment.id,
|
|
@@ -319,18 +270,14 @@ export async function evaluateRevalidation<TEnv>(
|
|
|
319
270
|
revalidate: currentSuggestion,
|
|
320
271
|
});
|
|
321
272
|
} else if (result === null || result === undefined) {
|
|
322
|
-
// Defer to default - equivalent to { defaultShouldRevalidate: currentSuggestion }
|
|
323
|
-
// This means "I don't care, use whatever the default is"
|
|
324
273
|
debugLog("revalidation", "deferred to current default", {
|
|
325
274
|
segmentId: segment.id,
|
|
326
275
|
revalidator: name,
|
|
327
276
|
revalidate: currentSuggestion,
|
|
328
277
|
});
|
|
329
|
-
// currentSuggestion stays the same, continue to next function
|
|
330
278
|
}
|
|
331
279
|
}
|
|
332
280
|
|
|
333
|
-
// All revalidators completed - use final suggestion
|
|
334
281
|
debugLog("revalidation", "final decision", {
|
|
335
282
|
segmentId: segment.id,
|
|
336
283
|
revalidate: currentSuggestion,
|