@rangojs/router 0.5.0 → 0.5.1
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/types/browser/prefetch/cache.d.ts +31 -2
- package/dist/types/route-definition/helpers-types.d.ts +5 -4
- package/dist/types/static-handler.d.ts +15 -1
- package/dist/types/urls/path-helper-types.d.ts +6 -7
- package/dist/types.backup/__internal.d.ts +127 -0
- package/dist/types.backup/bin/rango.d.ts +1 -0
- package/dist/types.backup/browser/action-coordinator.d.ts +57 -0
- package/dist/types.backup/browser/action-fence.d.ts +33 -0
- package/dist/types.backup/browser/app-shell.d.ts +34 -0
- package/dist/types.backup/browser/app-version.d.ts +6 -0
- package/dist/types.backup/browser/connection-warmup.d.ts +31 -0
- package/dist/types.backup/browser/cookie-name.d.ts +66 -0
- package/dist/types.backup/browser/event-controller.d.ts +221 -0
- package/dist/types.backup/browser/history-state.d.ts +26 -0
- package/dist/types.backup/browser/index.d.ts +1 -0
- package/dist/types.backup/browser/intercept-utils.d.ts +30 -0
- package/dist/types.backup/browser/invalidate-client-cache.d.ts +17 -0
- package/dist/types.backup/browser/link-interceptor.d.ts +43 -0
- package/dist/types.backup/browser/logging.d.ts +33 -0
- package/dist/types.backup/browser/merge-segment-loaders.d.ts +38 -0
- package/dist/types.backup/browser/navigation-bridge.d.ts +27 -0
- package/dist/types.backup/browser/navigation-client.d.ts +17 -0
- package/dist/types.backup/browser/navigation-store-handle.d.ts +25 -0
- package/dist/types.backup/browser/navigation-store.d.ts +95 -0
- package/dist/types.backup/browser/navigation-transaction.d.ts +75 -0
- package/dist/types.backup/browser/network-error-handler.d.ts +35 -0
- package/dist/types.backup/browser/partial-update.d.ts +61 -0
- package/dist/types.backup/browser/prefetch/cache.d.ts +183 -0
- package/dist/types.backup/browser/prefetch/fetch.d.ts +52 -0
- package/dist/types.backup/browser/prefetch/observer.d.ts +27 -0
- package/dist/types.backup/browser/prefetch/policy.d.ts +13 -0
- package/dist/types.backup/browser/prefetch/queue.d.ts +48 -0
- package/dist/types.backup/browser/prefetch/resource-ready.d.ts +28 -0
- package/dist/types.backup/browser/rango-state.d.ts +52 -0
- package/dist/types.backup/browser/react/Link.d.ts +140 -0
- package/dist/types.backup/browser/react/NavigationProvider.d.ts +88 -0
- package/dist/types.backup/browser/react/ScrollRestoration.d.ts +78 -0
- package/dist/types.backup/browser/react/context.d.ts +54 -0
- package/dist/types.backup/browser/react/filter-segment-order.d.ts +35 -0
- package/dist/types.backup/browser/react/index.d.ts +1 -0
- package/dist/types.backup/browser/react/location-state-shared.d.ts +162 -0
- package/dist/types.backup/browser/react/location-state.d.ts +29 -0
- package/dist/types.backup/browser/react/mount-context.d.ts +23 -0
- package/dist/types.backup/browser/react/nonce-context.d.ts +14 -0
- package/dist/types.backup/browser/react/shallow-equal.d.ts +5 -0
- package/dist/types.backup/browser/react/use-action.d.ts +61 -0
- package/dist/types.backup/browser/react/use-handle.d.ts +21 -0
- package/dist/types.backup/browser/react/use-href.d.ts +32 -0
- package/dist/types.backup/browser/react/use-link-status.d.ts +36 -0
- package/dist/types.backup/browser/react/use-mount.d.ts +24 -0
- package/dist/types.backup/browser/react/use-navigation.d.ts +15 -0
- package/dist/types.backup/browser/react/use-params.d.ts +21 -0
- package/dist/types.backup/browser/react/use-pathname.d.ts +13 -0
- package/dist/types.backup/browser/react/use-reverse.d.ts +40 -0
- package/dist/types.backup/browser/react/use-router.d.ts +23 -0
- package/dist/types.backup/browser/react/use-search-params.d.ts +19 -0
- package/dist/types.backup/browser/react/use-segments.d.ts +29 -0
- package/dist/types.backup/browser/response-adapter.d.ts +58 -0
- package/dist/types.backup/browser/rsc-router.d.ts +141 -0
- package/dist/types.backup/browser/scroll-restoration.d.ts +103 -0
- package/dist/types.backup/browser/segment-reconciler.d.ts +74 -0
- package/dist/types.backup/browser/segment-structure-assert.d.ts +16 -0
- package/dist/types.backup/browser/server-action-bridge.d.ts +29 -0
- package/dist/types.backup/browser/types.d.ts +530 -0
- package/dist/types.backup/browser/validate-redirect-origin.d.ts +28 -0
- package/dist/types.backup/build/collect-fallback-refs.d.ts +5 -0
- package/dist/types.backup/build/generate-manifest.d.ts +100 -0
- package/dist/types.backup/build/generate-route-types.d.ts +8 -0
- package/dist/types.backup/build/index.d.ts +21 -0
- package/dist/types.backup/build/prefix-tree-utils.d.ts +56 -0
- package/dist/types.backup/build/route-trie.d.ts +89 -0
- package/dist/types.backup/build/route-types/ast-helpers.d.ts +3 -0
- package/dist/types.backup/build/route-types/ast-route-extraction.d.ts +13 -0
- package/dist/types.backup/build/route-types/codegen.d.ts +16 -0
- package/dist/types.backup/build/route-types/include-resolution.d.ts +74 -0
- package/dist/types.backup/build/route-types/param-extraction.d.ts +13 -0
- package/dist/types.backup/build/route-types/per-module-writer.d.ts +18 -0
- package/dist/types.backup/build/route-types/router-processing.d.ts +82 -0
- package/dist/types.backup/build/route-types/scan-filter.d.ts +17 -0
- package/dist/types.backup/build/route-types/source-scan.d.ts +13 -0
- package/dist/types.backup/build/runtime-discovery.d.ts +24 -0
- package/dist/types.backup/cache/background-task.d.ts +21 -0
- package/dist/types.backup/cache/cache-error.d.ts +71 -0
- package/dist/types.backup/cache/cache-key-utils.d.ts +35 -0
- package/dist/types.backup/cache/cache-policy.d.ts +59 -0
- package/dist/types.backup/cache/cache-runtime.d.ts +51 -0
- package/dist/types.backup/cache/cache-scope.d.ts +134 -0
- package/dist/types.backup/cache/cache-tag.d.ts +79 -0
- package/dist/types.backup/cache/cf/cf-base64.d.ts +4 -0
- package/dist/types.backup/cache/cf/cf-cache-constants.d.ts +105 -0
- package/dist/types.backup/cache/cf/cf-cache-store.d.ts +481 -0
- package/dist/types.backup/cache/cf/cf-cache-types.d.ts +300 -0
- package/dist/types.backup/cache/cf/cf-kv-utils.d.ts +22 -0
- package/dist/types.backup/cache/cf/cf-tag-marker-memo.d.ts +15 -0
- package/dist/types.backup/cache/cf/index.d.ts +3 -0
- package/dist/types.backup/cache/document-cache.d.ts +69 -0
- package/dist/types.backup/cache/handle-capture.d.ts +23 -0
- package/dist/types.backup/cache/handle-snapshot.d.ts +39 -0
- package/dist/types.backup/cache/index.d.ts +7 -0
- package/dist/types.backup/cache/memory-segment-store.d.ts +163 -0
- package/dist/types.backup/cache/profile-registry.d.ts +40 -0
- package/dist/types.backup/cache/read-through-swr.d.ts +60 -0
- package/dist/types.backup/cache/segment-codec.d.ts +78 -0
- package/dist/types.backup/cache/shell-snapshot.d.ts +162 -0
- package/dist/types.backup/cache/tag-invalidation.d.ts +74 -0
- package/dist/types.backup/cache/taint.d.ts +71 -0
- package/dist/types.backup/cache/types.d.ts +407 -0
- package/dist/types.backup/cache/vercel/index.d.ts +1 -0
- package/dist/types.backup/cache/vercel/vercel-cache-store.d.ts +267 -0
- package/dist/types.backup/client.d.ts +184 -0
- package/dist/types.backup/client.rsc.d.ts +39 -0
- package/dist/types.backup/cloudflare/index.d.ts +7 -0
- package/dist/types.backup/cloudflare/tracing.d.ts +53 -0
- package/dist/types.backup/component-utils.d.ts +46 -0
- package/dist/types.backup/components/DefaultDocument.d.ts +13 -0
- package/dist/types.backup/context-var.d.ts +84 -0
- package/dist/types.backup/debug.d.ts +57 -0
- package/dist/types.backup/decode-loader-results.d.ts +5 -0
- package/dist/types.backup/default-error-boundary.d.ts +10 -0
- package/dist/types.backup/defer.d.ts +89 -0
- package/dist/types.backup/deps/browser.d.ts +1 -0
- package/dist/types.backup/deps/html-stream-client.d.ts +1 -0
- package/dist/types.backup/deps/html-stream-server.d.ts +1 -0
- package/dist/types.backup/deps/rsc.d.ts +1 -0
- package/dist/types.backup/deps/ssr.d.ts +1 -0
- package/dist/types.backup/encode-kv.d.ts +35 -0
- package/dist/types.backup/errors.d.ts +226 -0
- package/dist/types.backup/escape-script.d.ts +44 -0
- package/dist/types.backup/handle.d.ts +93 -0
- package/dist/types.backup/handles/MetaTags.d.ts +17 -0
- package/dist/types.backup/handles/Scripts.d.ts +38 -0
- package/dist/types.backup/handles/breadcrumbs.d.ts +43 -0
- package/dist/types.backup/handles/deferred-resolution.d.ts +53 -0
- package/dist/types.backup/handles/is-thenable.d.ts +12 -0
- package/dist/types.backup/handles/meta.d.ts +43 -0
- package/dist/types.backup/handles/script.d.ts +139 -0
- package/dist/types.backup/host/cookie-handler.d.ts +8 -0
- package/dist/types.backup/host/errors.d.ts +40 -0
- package/dist/types.backup/host/index.d.ts +33 -0
- package/dist/types.backup/host/pattern-matcher.d.ts +30 -0
- package/dist/types.backup/host/router.d.ts +12 -0
- package/dist/types.backup/host/testing.d.ts +41 -0
- package/dist/types.backup/host/types.d.ts +148 -0
- package/dist/types.backup/host/utils.d.ts +20 -0
- package/dist/types.backup/href-client.d.ts +214 -0
- package/dist/types.backup/index.d.ts +112 -0
- package/dist/types.backup/index.rsc.d.ts +51 -0
- package/dist/types.backup/internal-debug.d.ts +1 -0
- package/dist/types.backup/loader-store.d.ts +193 -0
- package/dist/types.backup/loader.d.ts +18 -0
- package/dist/types.backup/loader.rsc.d.ts +18 -0
- package/dist/types.backup/missing-id-error.d.ts +1 -0
- package/dist/types.backup/outlet-context.d.ts +12 -0
- package/dist/types.backup/outlet-provider.d.ts +12 -0
- package/dist/types.backup/prerender/build-shell-capture.d.ts +104 -0
- package/dist/types.backup/prerender/param-hash.d.ts +6 -0
- package/dist/types.backup/prerender/shell-manifest-key.d.ts +18 -0
- package/dist/types.backup/prerender/store.d.ts +62 -0
- package/dist/types.backup/prerender.d.ts +292 -0
- package/dist/types.backup/redirect-origin.d.ts +55 -0
- package/dist/types.backup/regex-escape.d.ts +6 -0
- package/dist/types.backup/render-error-thrower.d.ts +13 -0
- package/dist/types.backup/response-utils.d.ts +35 -0
- package/dist/types.backup/reverse.d.ts +206 -0
- package/dist/types.backup/root-error-boundary.d.ts +32 -0
- package/dist/types.backup/route-content-wrapper.d.ts +40 -0
- package/dist/types.backup/route-definition/dsl-helpers.d.ts +130 -0
- package/dist/types.backup/route-definition/helper-factories.d.ts +22 -0
- package/dist/types.backup/route-definition/helpers-types.d.ts +392 -0
- package/dist/types.backup/route-definition/index.d.ts +7 -0
- package/dist/types.backup/route-definition/redirect.d.ts +48 -0
- package/dist/types.backup/route-definition/resolve-handler-use.d.ts +19 -0
- package/dist/types.backup/route-definition/use-item-types.d.ts +1 -0
- package/dist/types.backup/route-definition.d.ts +1 -0
- package/dist/types.backup/route-map-builder.d.ts +127 -0
- package/dist/types.backup/route-name.d.ts +27 -0
- package/dist/types.backup/route-types.d.ts +172 -0
- package/dist/types.backup/router/basename.d.ts +10 -0
- package/dist/types.backup/router/content-negotiation.d.ts +91 -0
- package/dist/types.backup/router/debug-manifest.d.ts +7 -0
- package/dist/types.backup/router/error-handling.d.ts +76 -0
- package/dist/types.backup/router/find-match.d.ts +19 -0
- package/dist/types.backup/router/handler-context.d.ts +41 -0
- package/dist/types.backup/router/instrument.d.ts +161 -0
- package/dist/types.backup/router/intercept-resolution.d.ts +79 -0
- package/dist/types.backup/router/lazy-includes.d.ts +26 -0
- package/dist/types.backup/router/loader-resolution.d.ts +63 -0
- package/dist/types.backup/router/logging.d.ts +41 -0
- package/dist/types.backup/router/manifest.d.ts +8 -0
- package/dist/types.backup/router/match-api.d.ts +19 -0
- package/dist/types.backup/router/match-context.d.ts +184 -0
- package/dist/types.backup/router/match-handlers.d.ts +49 -0
- package/dist/types.backup/router/match-middleware/background-revalidation.d.ts +113 -0
- package/dist/types.backup/router/match-middleware/cache-lookup.d.ts +113 -0
- package/dist/types.backup/router/match-middleware/cache-store.d.ts +112 -0
- package/dist/types.backup/router/match-middleware/index.d.ts +80 -0
- package/dist/types.backup/router/match-middleware/intercept-resolution.d.ts +116 -0
- package/dist/types.backup/router/match-middleware/segment-resolution.d.ts +94 -0
- package/dist/types.backup/router/match-pipelines.d.ts +103 -0
- package/dist/types.backup/router/match-result.d.ts +114 -0
- package/dist/types.backup/router/metrics.d.ts +6 -0
- package/dist/types.backup/router/middleware-types.d.ts +74 -0
- package/dist/types.backup/router/middleware.d.ts +116 -0
- package/dist/types.backup/router/navigation-snapshot.d.ts +22 -0
- package/dist/types.backup/router/params-util.d.ts +8 -0
- package/dist/types.backup/router/parse-pattern.d.ts +38 -0
- package/dist/types.backup/router/pattern-matching.d.ts +169 -0
- package/dist/types.backup/router/prefetch-cache-ttl.d.ts +27 -0
- package/dist/types.backup/router/prefetch-limits.d.ts +20 -0
- package/dist/types.backup/router/prerender-match.d.ts +50 -0
- package/dist/types.backup/router/preview-match.d.ts +22 -0
- package/dist/types.backup/router/request-classification.d.ts +104 -0
- package/dist/types.backup/router/revalidation.d.ts +57 -0
- package/dist/types.backup/router/route-snapshot.d.ts +112 -0
- package/dist/types.backup/router/router-context.d.ts +137 -0
- package/dist/types.backup/router/router-interfaces.d.ts +432 -0
- package/dist/types.backup/router/router-options.d.ts +738 -0
- package/dist/types.backup/router/router-registry.d.ts +15 -0
- package/dist/types.backup/router/segment-resolution/fresh.d.ts +55 -0
- package/dist/types.backup/router/segment-resolution/helpers.d.ts +93 -0
- package/dist/types.backup/router/segment-resolution/loader-cache.d.ts +33 -0
- package/dist/types.backup/router/segment-resolution/loader-mask.d.ts +44 -0
- package/dist/types.backup/router/segment-resolution/loader-snapshot.d.ts +90 -0
- package/dist/types.backup/router/segment-resolution/mask-nested.d.ts +53 -0
- package/dist/types.backup/router/segment-resolution/revalidation.d.ts +85 -0
- package/dist/types.backup/router/segment-resolution/static-store.d.ts +17 -0
- package/dist/types.backup/router/segment-resolution/streamed-handler-telemetry.d.ts +16 -0
- package/dist/types.backup/router/segment-resolution/view-transition-default.d.ts +28 -0
- package/dist/types.backup/router/segment-resolution.d.ts +3 -0
- package/dist/types.backup/router/segment-wrappers.d.ts +53 -0
- package/dist/types.backup/router/state-cookie-name.d.ts +1 -0
- package/dist/types.backup/router/substitute-pattern-params.d.ts +23 -0
- package/dist/types.backup/router/telemetry-otel.d.ts +113 -0
- package/dist/types.backup/router/telemetry.d.ts +215 -0
- package/dist/types.backup/router/timeout.d.ts +68 -0
- package/dist/types.backup/router/tracing.d.ts +125 -0
- package/dist/types.backup/router/trie-matching.d.ts +32 -0
- package/dist/types.backup/router/types.d.ts +98 -0
- package/dist/types.backup/router/url-params.d.ts +26 -0
- package/dist/types.backup/router.d.ts +7 -0
- package/dist/types.backup/rsc/capture-queue.d.ts +6 -0
- package/dist/types.backup/rsc/full-payload.d.ts +22 -0
- package/dist/types.backup/rsc/handler-context.d.ts +31 -0
- package/dist/types.backup/rsc/handler.d.ts +9 -0
- package/dist/types.backup/rsc/helpers.d.ts +213 -0
- package/dist/types.backup/rsc/index.d.ts +17 -0
- package/dist/types.backup/rsc/json-route-result.d.ts +20 -0
- package/dist/types.backup/rsc/loader-fetch.d.ts +14 -0
- package/dist/types.backup/rsc/manifest-init.d.ts +18 -0
- package/dist/types.backup/rsc/nonce.d.ts +28 -0
- package/dist/types.backup/rsc/origin-guard.d.ts +50 -0
- package/dist/types.backup/rsc/progressive-enhancement.d.ts +19 -0
- package/dist/types.backup/rsc/redirect-guard.d.ts +35 -0
- package/dist/types.backup/rsc/response-cache-serve.d.ts +46 -0
- package/dist/types.backup/rsc/response-error.d.ts +19 -0
- package/dist/types.backup/rsc/response-route-handler.d.ts +29 -0
- package/dist/types.backup/rsc/rsc-rendering.d.ts +23 -0
- package/dist/types.backup/rsc/runtime-warnings.d.ts +22 -0
- package/dist/types.backup/rsc/server-action.d.ts +68 -0
- package/dist/types.backup/rsc/shell-build-manifest.d.ts +84 -0
- package/dist/types.backup/rsc/shell-capture-constants.d.ts +27 -0
- package/dist/types.backup/rsc/shell-capture.d.ts +374 -0
- package/dist/types.backup/rsc/shell-serve.d.ts +136 -0
- package/dist/types.backup/rsc/ssr-setup.d.ts +48 -0
- package/dist/types.backup/rsc/transition-gate.d.ts +27 -0
- package/dist/types.backup/rsc/types.d.ts +290 -0
- package/dist/types.backup/runtime-env.d.ts +1 -0
- package/dist/types.backup/search-params.d.ts +125 -0
- package/dist/types.backup/segment-content-promise.d.ts +13 -0
- package/dist/types.backup/segment-fragments.d.ts +56 -0
- package/dist/types.backup/segment-loader-promise.d.ts +22 -0
- package/dist/types.backup/segment-system.d.ts +84 -0
- package/dist/types.backup/serialize.d.ts +164 -0
- package/dist/types.backup/server/context.d.ts +494 -0
- package/dist/types.backup/server/cookie-parse.d.ts +10 -0
- package/dist/types.backup/server/cookie-store.d.ts +107 -0
- package/dist/types.backup/server/fetchable-loader-store.d.ts +20 -0
- package/dist/types.backup/server/handle-store.d.ts +100 -0
- package/dist/types.backup/server/loader-registry.d.ts +32 -0
- package/dist/types.backup/server/request-context.d.ts +596 -0
- package/dist/types.backup/server/root-layout.d.ts +3 -0
- package/dist/types.backup/server.d.ts +15 -0
- package/dist/types.backup/ssr/index.d.ts +233 -0
- package/dist/types.backup/ssr/inject-rsc-eager.d.ts +3 -0
- package/dist/types.backup/ssr/preinit-client-references.d.ts +71 -0
- package/dist/types.backup/ssr/ssr-root.d.ts +69 -0
- package/dist/types.backup/static-handler.d.ts +57 -0
- package/dist/types.backup/testing/cache-status.d.ts +63 -0
- package/dist/types.backup/testing/collect-handle.d.ts +20 -0
- package/dist/types.backup/testing/dispatch.d.ts +123 -0
- package/dist/types.backup/testing/dom.entry.d.ts +15 -0
- package/dist/types.backup/testing/e2e/fixture.d.ts +37 -0
- package/dist/types.backup/testing/e2e/index.d.ts +30 -0
- package/dist/types.backup/testing/e2e/matchers.d.ts +17 -0
- package/dist/types.backup/testing/e2e/page-helpers.d.ts +62 -0
- package/dist/types.backup/testing/e2e/parity.d.ts +111 -0
- package/dist/types.backup/testing/e2e/server.d.ts +35 -0
- package/dist/types.backup/testing/flight-matchers.d.ts +55 -0
- package/dist/types.backup/testing/flight-normalize.d.ts +1 -0
- package/dist/types.backup/testing/flight-tree.d.ts +192 -0
- package/dist/types.backup/testing/flight.d.ts +115 -0
- package/dist/types.backup/testing/flight.entry.d.ts +27 -0
- package/dist/types.backup/testing/generated-routes.d.ts +66 -0
- package/dist/types.backup/testing/index.d.ts +52 -0
- package/dist/types.backup/testing/internal/context.d.ts +225 -0
- package/dist/types.backup/testing/internal/flight-client-globals.d.ts +1 -0
- package/dist/types.backup/testing/internal/seed-vars.d.ts +30 -0
- package/dist/types.backup/testing/render-handler.d.ts +160 -0
- package/dist/types.backup/testing/render-route.d.ts +246 -0
- package/dist/types.backup/testing/run-loader.d.ts +186 -0
- package/dist/types.backup/testing/run-middleware.d.ts +132 -0
- package/dist/types.backup/testing/run-transition-when.d.ts +77 -0
- package/dist/types.backup/testing/vitest-stubs/cloudflare-email.d.ts +6 -0
- package/dist/types.backup/testing/vitest-stubs/cloudflare-workers.d.ts +13 -0
- package/dist/types.backup/testing/vitest-stubs/plugin-rsc.d.ts +7 -0
- package/dist/types.backup/testing/vitest-stubs/version.d.ts +1 -0
- package/dist/types.backup/testing/vitest.d.ts +205 -0
- package/dist/types.backup/theme/ThemeProvider.d.ts +13 -0
- package/dist/types.backup/theme/ThemeScript.d.ts +45 -0
- package/dist/types.backup/theme/constants.d.ts +39 -0
- package/dist/types.backup/theme/index.d.ts +29 -0
- package/dist/types.backup/theme/theme-context.d.ts +21 -0
- package/dist/types.backup/theme/theme-script.d.ts +26 -0
- package/dist/types.backup/theme/types.d.ts +162 -0
- package/dist/types.backup/theme/use-theme.d.ts +8 -0
- package/dist/types.backup/types/boundaries.d.ts +93 -0
- package/dist/types.backup/types/cache-types.d.ts +191 -0
- package/dist/types.backup/types/error-types.d.ts +114 -0
- package/dist/types.backup/types/global-namespace.d.ts +90 -0
- package/dist/types.backup/types/handler-context.d.ts +658 -0
- package/dist/types.backup/types/index.d.ts +11 -0
- package/dist/types.backup/types/loader-types.d.ts +182 -0
- package/dist/types.backup/types/request-scope.d.ts +93 -0
- package/dist/types.backup/types/route-config.d.ts +105 -0
- package/dist/types.backup/types/route-entry.d.ts +95 -0
- package/dist/types.backup/types/segments.d.ts +234 -0
- package/dist/types.backup/types.d.ts +1 -0
- package/dist/types.backup/urls/include-helper.d.ts +17 -0
- package/dist/types.backup/urls/include-provider.d.ts +27 -0
- package/dist/types.backup/urls/index.d.ts +6 -0
- package/dist/types.backup/urls/path-helper-types.d.ts +197 -0
- package/dist/types.backup/urls/path-helper.d.ts +12 -0
- package/dist/types.backup/urls/pattern-types.d.ts +166 -0
- package/dist/types.backup/urls/response-types.d.ts +67 -0
- package/dist/types.backup/urls/type-extraction.d.ts +157 -0
- package/dist/types.backup/urls/urls-function.d.ts +24 -0
- package/dist/types.backup/urls.d.ts +1 -0
- package/dist/types.backup/use-loader.d.ts +150 -0
- package/dist/types.backup/vercel/index.d.ts +10 -0
- package/dist/types.backup/vercel/tracing.d.ts +70 -0
- package/dist/types.backup/vite/debug.d.ts +80 -0
- package/dist/types.backup/vite/discovery/bundle-postprocess.d.ts +12 -0
- package/dist/types.backup/vite/discovery/dev-prerender-cache.d.ts +65 -0
- package/dist/types.backup/vite/discovery/discover-routers.d.ts +17 -0
- package/dist/types.backup/vite/discovery/discovery-errors.d.ts +113 -0
- package/dist/types.backup/vite/discovery/gate-state.d.ts +79 -0
- package/dist/types.backup/vite/discovery/prerender-collection.d.ts +24 -0
- package/dist/types.backup/vite/discovery/route-types-writer.d.ts +32 -0
- package/dist/types.backup/vite/discovery/self-gen-tracking.d.ts +22 -0
- package/dist/types.backup/vite/discovery/shell-prerender-phase.d.ts +40 -0
- package/dist/types.backup/vite/discovery/state.d.ts +162 -0
- package/dist/types.backup/vite/discovery/virtual-module-codegen.d.ts +15 -0
- package/dist/types.backup/vite/index.d.ts +11 -0
- package/dist/types.backup/vite/inject-client-debug.d.ts +56 -0
- package/dist/types.backup/vite/plugin-types.d.ts +298 -0
- package/dist/types.backup/vite/plugins/cjs-to-esm.d.ts +6 -0
- package/dist/types.backup/vite/plugins/client-ref-dedup.d.ts +40 -0
- package/dist/types.backup/vite/plugins/client-ref-hashing.d.ts +35 -0
- package/dist/types.backup/vite/plugins/cloudflare-protocol-stub.d.ts +64 -0
- package/dist/types.backup/vite/plugins/expose-action-id.d.ts +18 -0
- package/dist/types.backup/vite/plugins/expose-id-utils.d.ts +37 -0
- package/dist/types.backup/vite/plugins/expose-ids/export-analysis.d.ts +19 -0
- package/dist/types.backup/vite/plugins/expose-ids/handler-transform.d.ts +10 -0
- package/dist/types.backup/vite/plugins/expose-ids/loader-transform.d.ts +8 -0
- package/dist/types.backup/vite/plugins/expose-ids/router-transform.d.ts +13 -0
- package/dist/types.backup/vite/plugins/expose-ids/types.d.ts +29 -0
- package/dist/types.backup/vite/plugins/expose-internal-ids.d.ts +6 -0
- package/dist/types.backup/vite/plugins/performance-tracks.d.ts +25 -0
- package/dist/types.backup/vite/plugins/refresh-cmd.d.ts +20 -0
- package/dist/types.backup/vite/plugins/use-cache-transform.d.ts +20 -0
- package/dist/types.backup/vite/plugins/vercel-output.d.ts +85 -0
- package/dist/types.backup/vite/plugins/version-injector.d.ts +21 -0
- package/dist/types.backup/vite/plugins/version-plugin.d.ts +19 -0
- package/dist/types.backup/vite/plugins/virtual-entries.d.ts +36 -0
- package/dist/types.backup/vite/plugins/virtual-stub-plugin.d.ts +7 -0
- package/dist/types.backup/vite/rango.d.ts +29 -0
- package/dist/types.backup/vite/router-discovery.d.ts +23 -0
- package/dist/types.backup/vite/utils/ast-handler-extract.d.ts +64 -0
- package/dist/types.backup/vite/utils/banner.d.ts +2 -0
- package/dist/types.backup/vite/utils/bundle-analysis.d.ts +28 -0
- package/dist/types.backup/vite/utils/client-chunks.d.ts +55 -0
- package/dist/types.backup/vite/utils/directive-prologue.d.ts +16 -0
- package/dist/types.backup/vite/utils/forward-user-plugins.d.ts +37 -0
- package/dist/types.backup/vite/utils/manifest-utils.d.ts +7 -0
- package/dist/types.backup/vite/utils/package-resolution.d.ts +6 -0
- package/dist/types.backup/vite/utils/prerender-utils.d.ts +32 -0
- package/dist/types.backup/vite/utils/shared-utils.d.ts +55 -0
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/skills/parallel/SKILL.md +1 -1
- package/src/browser/prefetch/cache.ts +53 -9
- package/src/browser/prefetch/fetch.ts +83 -2
- package/src/route-definition/helpers-types.ts +5 -3
- package/src/static-handler.ts +18 -2
- package/src/urls/path-helper-types.ts +9 -10
package/skills/parallel/SKILL.md
CHANGED
|
@@ -273,7 +273,7 @@ parallel(
|
|
|
273
273
|
|
|
274
274
|
Per-slot merge order is **handler.use → shared use → slot-local use**. Slot-local is the narrowest scope, so it wins for last-write-wins items. See [skills/handler-use § `loading()` is a single-assignment item — scope it correctly](../handler-use/SKILL.md#loading-is-a-single-assignment-item--scope-it-correctly) for the full reasoning.
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
Both a bare arrow slot handler (`"@cart": (ctx) => ...`) and an arrow inside a descriptor (`handler: (ctx) => ...`) infer their `ctx`; no explicit annotation is needed.
|
|
277
277
|
|
|
278
278
|
## Slot Override Semantics
|
|
279
279
|
|
|
@@ -72,8 +72,31 @@ export interface DecodedPrefetch {
|
|
|
72
72
|
* tell a FULLY warmed prefetch (payload commits without suspending → safe to
|
|
73
73
|
* commit in a startTransition, no fallback flash) from a partially-warmed one
|
|
74
74
|
* (still streaming → stream its fallbacks like a cold load). Starts false.
|
|
75
|
+
*
|
|
76
|
+
* On a respawned entry (see `respawn`) this starts true: the buffered bytes
|
|
77
|
+
* are a complete stream by construction.
|
|
75
78
|
*/
|
|
76
79
|
complete: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Re-create this entry from its buffered raw Flight bytes. Attached (by
|
|
82
|
+
* `executePrefetchFetch`) only after the stream ended cleanly AND the eager
|
|
83
|
+
* decode succeeded — a truncated or failed prefetch must stay one-shot.
|
|
84
|
+
*
|
|
85
|
+
* Why bytes and not the decoded payload: the revived payload is a live graph
|
|
86
|
+
* with one-shot stream edges (the handle stream is an async generator drained
|
|
87
|
+
* during commit; userland payloads may embed serialized ReadableStreams).
|
|
88
|
+
* Re-decoding from the wire bytes manufactures fresh instances of every
|
|
89
|
+
* stream, which no amount of cloning the revived graph can do. Each call tees
|
|
90
|
+
* the reserve branch, so the replacement entry carries its own `respawn` —
|
|
91
|
+
* one prefetch serves unlimited adoptions within TTL/state validity.
|
|
92
|
+
*/
|
|
93
|
+
respawn?: () => DecodedPrefetch;
|
|
94
|
+
/**
|
|
95
|
+
* Release the buffered reserve bytes. Called when the entry is evicted
|
|
96
|
+
* without being consumed (expiry, FIFO, sweep, cache clear) so the tee
|
|
97
|
+
* buffer is dropped promptly instead of waiting for GC.
|
|
98
|
+
*/
|
|
99
|
+
dispose?: () => void;
|
|
77
100
|
}
|
|
78
101
|
|
|
79
102
|
let cacheTTL = 300_000;
|
|
@@ -208,6 +231,7 @@ export function hasPrefetch(key: string): boolean {
|
|
|
208
231
|
const entry = cache.get(key);
|
|
209
232
|
if (!entry) return false;
|
|
210
233
|
if (Date.now() - entry.timestamp > cacheTTL) {
|
|
234
|
+
entry.entry.dispose?.();
|
|
211
235
|
cache.delete(key);
|
|
212
236
|
return false;
|
|
213
237
|
}
|
|
@@ -216,22 +240,34 @@ export function hasPrefetch(key: string): boolean {
|
|
|
216
240
|
|
|
217
241
|
/**
|
|
218
242
|
* Consume a cached, eagerly-decoded prefetch. Returns null if not found or
|
|
219
|
-
* expired.
|
|
220
|
-
*
|
|
243
|
+
* expired. Returns null when caching is disabled (TTL <= 0).
|
|
244
|
+
*
|
|
245
|
+
* A decoded payload is single-render (its handle stream is drained during the
|
|
246
|
+
* commit), so the returned entry is never served twice. When the entry carries
|
|
247
|
+
* `respawn` (clean-EOF prefetch with buffered bytes), the slot is re-armed in
|
|
248
|
+
* place with a fresh decode of those bytes — the ORIGINAL timestamp is kept so
|
|
249
|
+
* TTL bounds the age of the data, not of the latest adoption. Without
|
|
250
|
+
* `respawn` the entry is deleted (legacy one-shot behavior).
|
|
221
251
|
*
|
|
222
252
|
* Does NOT check in-flight prefetches — use consumeInflightPrefetch()
|
|
223
253
|
* for that (returns a Promise instead of a resolved entry).
|
|
224
254
|
*/
|
|
225
255
|
export function consumePrefetch(key: string): DecodedPrefetch | null {
|
|
226
256
|
if (cacheTTL <= 0) return null;
|
|
227
|
-
const
|
|
228
|
-
if (!
|
|
229
|
-
if (Date.now() -
|
|
257
|
+
const cached = cache.get(key);
|
|
258
|
+
if (!cached) return null;
|
|
259
|
+
if (Date.now() - cached.timestamp > cacheTTL) {
|
|
260
|
+
cached.entry.dispose?.();
|
|
230
261
|
cache.delete(key);
|
|
231
262
|
return null;
|
|
232
263
|
}
|
|
233
|
-
|
|
234
|
-
|
|
264
|
+
const entry = cached.entry;
|
|
265
|
+
if (entry.respawn) {
|
|
266
|
+
cached.entry = entry.respawn();
|
|
267
|
+
} else {
|
|
268
|
+
cache.delete(key);
|
|
269
|
+
}
|
|
270
|
+
return entry;
|
|
235
271
|
}
|
|
236
272
|
|
|
237
273
|
/**
|
|
@@ -301,6 +337,7 @@ export function storePrefetch(
|
|
|
301
337
|
let min = Infinity;
|
|
302
338
|
for (const [k, cached] of cache) {
|
|
303
339
|
if (now - cached.timestamp > cacheTTL) {
|
|
340
|
+
cached.entry.dispose?.();
|
|
304
341
|
cache.delete(k);
|
|
305
342
|
} else if (cached.timestamp < min) {
|
|
306
343
|
min = cached.timestamp;
|
|
@@ -312,7 +349,10 @@ export function storePrefetch(
|
|
|
312
349
|
// FIFO eviction if at capacity
|
|
313
350
|
if (cache.size >= maxPrefetchCacheSize) {
|
|
314
351
|
const oldest = cache.keys().next().value;
|
|
315
|
-
if (oldest)
|
|
352
|
+
if (oldest) {
|
|
353
|
+
cache.get(oldest)?.entry.dispose?.();
|
|
354
|
+
cache.delete(oldest);
|
|
355
|
+
}
|
|
316
356
|
}
|
|
317
357
|
|
|
318
358
|
cache.set(key, { entry, timestamp: now });
|
|
@@ -335,7 +375,10 @@ export function storePrefetch(
|
|
|
335
375
|
* entry.
|
|
336
376
|
*/
|
|
337
377
|
export function removePrefetch(key: string, entry: DecodedPrefetch): void {
|
|
338
|
-
if (cache.get(key)?.entry === entry)
|
|
378
|
+
if (cache.get(key)?.entry === entry) {
|
|
379
|
+
entry.dispose?.();
|
|
380
|
+
cache.delete(key);
|
|
381
|
+
}
|
|
339
382
|
}
|
|
340
383
|
|
|
341
384
|
/**
|
|
@@ -405,6 +448,7 @@ export function clearPrefetchCache(rotateRangoState = true): void {
|
|
|
405
448
|
inflightPromises.clear();
|
|
406
449
|
inflightAliases.clear();
|
|
407
450
|
adoptedKeys.clear();
|
|
451
|
+
for (const cached of cache.values()) cached.entry.dispose?.();
|
|
408
452
|
cache.clear();
|
|
409
453
|
earliestTimestamp = Infinity;
|
|
410
454
|
abortAllPrefetches();
|
|
@@ -70,6 +70,49 @@ export function setPrefetchDecoder(fn: PrefetchDecoder): void {
|
|
|
70
70
|
decoder = fn;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Build the respawn closure for a cleanly-completed prefetch entry. Each call
|
|
75
|
+
* tees the reserve byte branch: one side feeds a fresh decode — a fresh handle
|
|
76
|
+
* stream and fresh serialized-stream instances, which no cloning of the
|
|
77
|
+
* revived payload graph could produce — and the other becomes the next
|
|
78
|
+
* reserve, so the replacement entry can respawn again. `streamComplete`
|
|
79
|
+
* resolves immediately and `complete` starts true: the buffered bytes are a
|
|
80
|
+
* finished stream by construction. The chunk imports the decode triggers are
|
|
81
|
+
* already in the module cache from the original eager decode, so a respawn
|
|
82
|
+
* costs ~ms with no network.
|
|
83
|
+
*/
|
|
84
|
+
function makeRespawn(
|
|
85
|
+
storageKey: string,
|
|
86
|
+
reserve: ReadableStream<Uint8Array>,
|
|
87
|
+
scope: "source" | "wildcard",
|
|
88
|
+
): () => DecodedPrefetch {
|
|
89
|
+
return () => {
|
|
90
|
+
const [body, nextReserve] = reserve.tee();
|
|
91
|
+
// decoder is non-null here: respawn is only armed after a successful
|
|
92
|
+
// eager decode, which requires the decoder to have been set.
|
|
93
|
+
const payload = decoder!(Promise.resolve(new Response(body)));
|
|
94
|
+
payload.catch(() => {});
|
|
95
|
+
const entry: DecodedPrefetch = {
|
|
96
|
+
payload,
|
|
97
|
+
streamComplete: Promise.resolve(),
|
|
98
|
+
scope,
|
|
99
|
+
complete: true,
|
|
100
|
+
dispose: () => {
|
|
101
|
+
// Rejects (caught) instead of throwing if the branch is already
|
|
102
|
+
// locked by a later respawn — cache eviction never races adoption on
|
|
103
|
+
// the same entry object, so this is belt-and-braces.
|
|
104
|
+
nextReserve.cancel().catch(() => {});
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
entry.respawn = makeRespawn(storageKey, nextReserve, scope);
|
|
108
|
+
// Parity with the original path: a rejected decode must not stay
|
|
109
|
+
// consumable. Clean bytes should never fail to decode, but if they do,
|
|
110
|
+
// evict (identity-guarded) so navigation refetches instead.
|
|
111
|
+
payload.catch(() => removePrefetch(storageKey, entry));
|
|
112
|
+
return entry;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
73
116
|
/**
|
|
74
117
|
* Check if a URL resolves to the current page (same pathname + search).
|
|
75
118
|
* Used to prevent same-page prefetching, which produces a trivial diff
|
|
@@ -271,9 +314,23 @@ function executePrefetchFetch(
|
|
|
271
314
|
true,
|
|
272
315
|
);
|
|
273
316
|
|
|
317
|
+
// Split the decode branch: one side feeds the eager decoder (unchanged —
|
|
318
|
+
// client chunks still import at prefetch time), the other stays unread as
|
|
319
|
+
// a reserve of the raw Flight bytes. A decoded payload is single-render
|
|
320
|
+
// (its handle stream drains during commit), so adoption would otherwise
|
|
321
|
+
// spend the entry; the reserve lets a cleanly-completed entry respawn a
|
|
322
|
+
// fresh decode per adoption instead (see makeRespawn).
|
|
323
|
+
let decodeSource: Response = tracked;
|
|
324
|
+
let reserve: ReadableStream<Uint8Array> | undefined;
|
|
325
|
+
if (tracked.body) {
|
|
326
|
+
const [decodeBody, reserveBody] = tracked.body.tee();
|
|
327
|
+
decodeSource = new Response(decodeBody, { headers: tracked.headers });
|
|
328
|
+
reserve = reserveBody;
|
|
329
|
+
}
|
|
330
|
+
|
|
274
331
|
// Eager decode: parsing the Flight stream imports the route's client
|
|
275
332
|
// chunks now, not on click.
|
|
276
|
-
const payload = decoder(Promise.resolve(
|
|
333
|
+
const payload = decoder(Promise.resolve(decodeSource));
|
|
277
334
|
// Mark handled so an unconsumed prefetch decode error stays quiet; the
|
|
278
335
|
// error is still surfaced to navigation if it consumes the entry.
|
|
279
336
|
payload.catch(() => {});
|
|
@@ -283,6 +340,11 @@ function executePrefetchFetch(
|
|
|
283
340
|
streamComplete,
|
|
284
341
|
scope,
|
|
285
342
|
complete: false,
|
|
343
|
+
...(reserve && {
|
|
344
|
+
dispose: () => {
|
|
345
|
+
reserve.cancel().catch(() => {});
|
|
346
|
+
},
|
|
347
|
+
}),
|
|
286
348
|
};
|
|
287
349
|
storePrefetch(storageKey, entry, gen);
|
|
288
350
|
// The stall timeout now owns the body stream: arm eviction (publishedKey)
|
|
@@ -301,10 +363,29 @@ function executePrefetchFetch(
|
|
|
301
363
|
streamComplete.then(() => {
|
|
302
364
|
if (!endedCleanly) removePrefetch(storageKey, entry);
|
|
303
365
|
});
|
|
304
|
-
// Mark complete ONLY on a fully-healthy prefetch (decode resolved AND
|
|
366
|
+
// Mark complete ONLY on a fully-healthy prefetch (decode resolved AND
|
|
367
|
+
// clean EOF) — and only then arm respawn: a truncated or failed stream's
|
|
368
|
+
// reserve would replay broken bytes, so it stays one-shot (and its
|
|
369
|
+
// buffered reserve is released via the removePrefetch dispose above).
|
|
305
370
|
Promise.allSettled([payload, streamComplete]).then(([decode]) => {
|
|
306
371
|
if (decode.status === "fulfilled" && endedCleanly) {
|
|
307
372
|
entry.complete = true;
|
|
373
|
+
if (reserve) {
|
|
374
|
+
entry.respawn = makeRespawn(storageKey, reserve, scope);
|
|
375
|
+
// Refill after an early adoption. A click that lands before this
|
|
376
|
+
// point adopts the entry with respawn unarmed and leaves the slot
|
|
377
|
+
// empty — via either path: pre-headers inflight adoption makes
|
|
378
|
+
// storePrefetch skip publication (adoptedKeys), and a mid-stream
|
|
379
|
+
// cache adoption deletes the incomplete entry. Now that the bytes
|
|
380
|
+
// proved themselves complete, publish a respawned sibling so the
|
|
381
|
+
// revisit is warm. Guards: hasPrefetch skips when the slot is
|
|
382
|
+
// live again (our own un-adopted entry, a fresh entry, or a new
|
|
383
|
+
// in-flight prefetch), and storePrefetch's generation check drops
|
|
384
|
+
// the sibling if the cache was invalidated since the fetch began.
|
|
385
|
+
if (!hasPrefetch(storageKey)) {
|
|
386
|
+
storePrefetch(storageKey, entry.respawn(), gen);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
308
389
|
}
|
|
309
390
|
clearTimeout(timeoutId);
|
|
310
391
|
});
|
|
@@ -33,6 +33,7 @@ import type {
|
|
|
33
33
|
TransitionItem,
|
|
34
34
|
UseItems,
|
|
35
35
|
} from "../route-types.js";
|
|
36
|
+
import type { StaticHandlerRef } from "../static-handler.js";
|
|
36
37
|
|
|
37
38
|
// Re-export route item types for backward compatibility
|
|
38
39
|
export type {
|
|
@@ -140,8 +141,8 @@ export type RouteHelpers<T extends RouteDefinition, TEnv> = {
|
|
|
140
141
|
* },
|
|
141
142
|
* })
|
|
142
143
|
* ```
|
|
143
|
-
* @param slots - Object with slot names (prefixed with @) mapped to handlers
|
|
144
|
-
* or `{ handler, use? }`
|
|
144
|
+
* @param slots - Object with slot names (prefixed with @) mapped to handlers,
|
|
145
|
+
* Static() definitions, or `{ handler, use? }` descriptors.
|
|
145
146
|
* @param use - Optional callback for loaders, loading, revalidate, etc.
|
|
146
147
|
* Items here apply to every slot in the call (broadcast).
|
|
147
148
|
* For per-slot single-assignment items, use the slot descriptor's
|
|
@@ -157,8 +158,9 @@ export type RouteHelpers<T extends RouteDefinition, TEnv> = {
|
|
|
157
158
|
`@${string}`,
|
|
158
159
|
| Handler<any, any, TEnv>
|
|
159
160
|
| ReactNode
|
|
161
|
+
| StaticHandlerRef
|
|
160
162
|
| {
|
|
161
|
-
handler: Handler<any, any, TEnv> | ReactNode;
|
|
163
|
+
handler: Handler<any, any, TEnv> | ReactNode | StaticHandlerRef;
|
|
162
164
|
use?: () => UseItems<ParallelUseItem>;
|
|
163
165
|
}
|
|
164
166
|
>,
|
package/src/static-handler.ts
CHANGED
|
@@ -46,9 +46,24 @@ export interface StaticHandlerOptions {
|
|
|
46
46
|
passthrough?: boolean;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
declare const STATIC_HANDLER_REF: unique symbol;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Opaque identity used by DSL type seams that accept Static() values.
|
|
53
|
+
*
|
|
54
|
+
* The brand is required, never optional: an optional brand makes this a weak
|
|
55
|
+
* type, and weak-type checking lets `{}` through — `parallel({ "@x": {} })`
|
|
56
|
+
* would typecheck and then die at render as an invalid React child. The
|
|
57
|
+
* symbol never exists at runtime; Static() casts its return instead.
|
|
58
|
+
*/
|
|
59
|
+
export interface StaticHandlerRef {
|
|
60
|
+
/** @internal Type-only brand; see interface doc. */
|
|
61
|
+
readonly [STATIC_HANDLER_REF]: true;
|
|
62
|
+
}
|
|
63
|
+
|
|
49
64
|
export interface StaticHandlerDefinition<
|
|
50
65
|
TParams extends Record<string, any> = any,
|
|
51
|
-
> {
|
|
66
|
+
> extends StaticHandlerRef {
|
|
52
67
|
readonly __brand: "staticHandler";
|
|
53
68
|
/** Auto-generated unique ID (injected by Vite plugin). */
|
|
54
69
|
$$id: string;
|
|
@@ -103,12 +118,13 @@ export function Static<TParams extends Record<string, any>>(
|
|
|
103
118
|
id = `__rango_runtime_static_${runtimeStaticIdCounter++}`;
|
|
104
119
|
}
|
|
105
120
|
|
|
121
|
+
// Cast: STATIC_HANDLER_REF is a type-only brand with no runtime field.
|
|
106
122
|
return {
|
|
107
123
|
__brand: "staticHandler" as const,
|
|
108
124
|
$$id: id,
|
|
109
125
|
handler: handler as Handler<TParams>,
|
|
110
126
|
...(options ? { options } : {}),
|
|
111
|
-
}
|
|
127
|
+
} as StaticHandlerDefinition<TParams>;
|
|
112
128
|
}
|
|
113
129
|
|
|
114
130
|
export function isStaticHandler(
|
|
@@ -40,7 +40,10 @@ import type {
|
|
|
40
40
|
PrerenderHandlerDefinition,
|
|
41
41
|
PassthroughHandlerDefinition,
|
|
42
42
|
} from "../prerender.js";
|
|
43
|
-
import type {
|
|
43
|
+
import type {
|
|
44
|
+
StaticHandlerDefinition,
|
|
45
|
+
StaticHandlerRef,
|
|
46
|
+
} from "../static-handler.js";
|
|
44
47
|
import type {
|
|
45
48
|
ResponseHandler,
|
|
46
49
|
ResponseHandlerContext,
|
|
@@ -271,22 +274,18 @@ export type PathHelpers<TEnv> = {
|
|
|
271
274
|
*
|
|
272
275
|
* Not generic over the slots record: an inferred type parameter makes the
|
|
273
276
|
* object literal an inference site, which suppresses contextual typing of
|
|
274
|
-
* arrow slot handlers (`(ctx) => ...` was implicit any).
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
* (two callables — see parallel-slot-handler-types.test.ts).
|
|
277
|
+
* arrow slot handlers (`(ctx) => ...` was implicit any). Static() values use
|
|
278
|
+
* an opaque handler-less reference here so their own `.handler` cannot
|
|
279
|
+
* contribute a second call signature or expose internal fields in completion.
|
|
278
280
|
*/
|
|
279
281
|
parallel: (
|
|
280
282
|
slots: Record<
|
|
281
283
|
`@${string}`,
|
|
282
284
|
| Handler<any, any, TEnv>
|
|
283
285
|
| ReactNode
|
|
284
|
-
|
|
|
286
|
+
| StaticHandlerRef
|
|
285
287
|
| {
|
|
286
|
-
handler:
|
|
287
|
-
| Handler<any, any, TEnv>
|
|
288
|
-
| ReactNode
|
|
289
|
-
| StaticHandlerDefinition;
|
|
288
|
+
handler: Handler<any, any, TEnv> | ReactNode | StaticHandlerRef;
|
|
290
289
|
use?: () => ParallelUseItem[];
|
|
291
290
|
}
|
|
292
291
|
>,
|