@rangojs/router 0.0.0-experimental.debug-cache-2383ca26 → 0.0.0-experimental.df7974ff
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/README.md +188 -35
- package/dist/__internal.d.ts +83 -0
- package/dist/__internal.d.ts.map +1 -0
- package/dist/__internal.js +19 -0
- package/dist/__internal.js.map +1 -0
- package/dist/__mocks__/version.d.ts +7 -0
- package/dist/__mocks__/version.d.ts.map +1 -0
- package/dist/__mocks__/version.js +7 -0
- package/dist/__mocks__/version.js.map +1 -0
- package/dist/__tests__/client-href.test.d.ts +2 -0
- package/dist/__tests__/client-href.test.d.ts.map +1 -0
- package/dist/__tests__/client-href.test.js +74 -0
- package/dist/__tests__/client-href.test.js.map +1 -0
- package/dist/__tests__/component-utils.test.d.ts +2 -0
- package/dist/__tests__/component-utils.test.d.ts.map +1 -0
- package/dist/__tests__/component-utils.test.js +51 -0
- package/dist/__tests__/component-utils.test.js.map +1 -0
- package/dist/__tests__/event-controller.test.d.ts +2 -0
- package/dist/__tests__/event-controller.test.d.ts.map +1 -0
- package/dist/__tests__/event-controller.test.js +538 -0
- package/dist/__tests__/event-controller.test.js.map +1 -0
- package/dist/__tests__/helpers/route-tree.d.ts +118 -0
- package/dist/__tests__/helpers/route-tree.d.ts.map +1 -0
- package/dist/__tests__/helpers/route-tree.js +374 -0
- package/dist/__tests__/helpers/route-tree.js.map +1 -0
- package/dist/__tests__/match-result.test.d.ts +2 -0
- package/dist/__tests__/match-result.test.d.ts.map +1 -0
- package/dist/__tests__/match-result.test.js +154 -0
- package/dist/__tests__/match-result.test.js.map +1 -0
- package/dist/__tests__/navigation-store.test.d.ts +2 -0
- package/dist/__tests__/navigation-store.test.d.ts.map +1 -0
- package/dist/__tests__/navigation-store.test.js +440 -0
- package/dist/__tests__/navigation-store.test.js.map +1 -0
- package/dist/__tests__/partial-update.test.d.ts +2 -0
- package/dist/__tests__/partial-update.test.d.ts.map +1 -0
- package/dist/__tests__/partial-update.test.js +1009 -0
- package/dist/__tests__/partial-update.test.js.map +1 -0
- package/dist/__tests__/reverse-types.test.d.ts +8 -0
- package/dist/__tests__/reverse-types.test.d.ts.map +1 -0
- package/dist/__tests__/reverse-types.test.js +656 -0
- package/dist/__tests__/reverse-types.test.js.map +1 -0
- package/dist/__tests__/route-definition.test.d.ts +2 -0
- package/dist/__tests__/route-definition.test.d.ts.map +1 -0
- package/dist/__tests__/route-definition.test.js +55 -0
- package/dist/__tests__/route-definition.test.js.map +1 -0
- package/dist/__tests__/router-helpers.test.d.ts +2 -0
- package/dist/__tests__/router-helpers.test.d.ts.map +1 -0
- package/dist/__tests__/router-helpers.test.js +377 -0
- package/dist/__tests__/router-helpers.test.js.map +1 -0
- package/dist/__tests__/router-integration-2.test.d.ts +2 -0
- package/dist/__tests__/router-integration-2.test.d.ts.map +1 -0
- package/dist/__tests__/router-integration-2.test.js +426 -0
- package/dist/__tests__/router-integration-2.test.js.map +1 -0
- package/dist/__tests__/router-integration.test.d.ts +2 -0
- package/dist/__tests__/router-integration.test.d.ts.map +1 -0
- package/dist/__tests__/router-integration.test.js +1051 -0
- package/dist/__tests__/router-integration.test.js.map +1 -0
- package/dist/__tests__/search-params.test.d.ts +5 -0
- package/dist/__tests__/search-params.test.d.ts.map +1 -0
- package/dist/__tests__/search-params.test.js +306 -0
- package/dist/__tests__/search-params.test.js.map +1 -0
- package/dist/__tests__/segment-system.test.d.ts +2 -0
- package/dist/__tests__/segment-system.test.d.ts.map +1 -0
- package/dist/__tests__/segment-system.test.js +627 -0
- package/dist/__tests__/segment-system.test.js.map +1 -0
- package/dist/__tests__/static-handler-types.test.d.ts +8 -0
- package/dist/__tests__/static-handler-types.test.d.ts.map +1 -0
- package/dist/__tests__/static-handler-types.test.js +63 -0
- package/dist/__tests__/static-handler-types.test.js.map +1 -0
- package/dist/__tests__/urls.test.d.ts +2 -0
- package/dist/__tests__/urls.test.d.ts.map +1 -0
- package/dist/__tests__/urls.test.js +421 -0
- package/dist/__tests__/urls.test.js.map +1 -0
- package/dist/__tests__/use-mount.test.d.ts +2 -0
- package/dist/__tests__/use-mount.test.d.ts.map +1 -0
- package/dist/__tests__/use-mount.test.js +35 -0
- package/dist/__tests__/use-mount.test.js.map +1 -0
- package/dist/bin/rango.d.ts +2 -0
- package/dist/bin/rango.d.ts.map +1 -0
- package/dist/bin/rango.js +130 -47
- package/dist/bin/rango.js.map +1 -0
- package/dist/browser/event-controller.d.ts +191 -0
- package/dist/browser/event-controller.d.ts.map +1 -0
- package/dist/browser/event-controller.js +559 -0
- package/dist/browser/event-controller.js.map +1 -0
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +14 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/link-interceptor.d.ts +38 -0
- package/dist/browser/link-interceptor.d.ts.map +1 -0
- package/dist/browser/link-interceptor.js +99 -0
- package/dist/browser/link-interceptor.js.map +1 -0
- package/dist/browser/logging.d.ts +10 -0
- package/dist/browser/logging.d.ts.map +1 -0
- package/dist/browser/logging.js +29 -0
- package/dist/browser/logging.js.map +1 -0
- package/dist/browser/lru-cache.d.ts +17 -0
- package/dist/browser/lru-cache.d.ts.map +1 -0
- package/dist/browser/lru-cache.js +50 -0
- package/dist/browser/lru-cache.js.map +1 -0
- package/dist/browser/merge-segment-loaders.d.ts +39 -0
- package/dist/browser/merge-segment-loaders.d.ts.map +1 -0
- package/dist/browser/merge-segment-loaders.js +102 -0
- package/dist/browser/merge-segment-loaders.js.map +1 -0
- package/dist/browser/navigation-bridge.d.ts +102 -0
- package/dist/browser/navigation-bridge.d.ts.map +1 -0
- package/dist/browser/navigation-bridge.js +708 -0
- package/dist/browser/navigation-bridge.js.map +1 -0
- package/dist/browser/navigation-client.d.ts +25 -0
- package/dist/browser/navigation-client.d.ts.map +1 -0
- package/dist/browser/navigation-client.js +157 -0
- package/dist/browser/navigation-client.js.map +1 -0
- package/dist/browser/navigation-store.d.ts +101 -0
- package/dist/browser/navigation-store.d.ts.map +1 -0
- package/dist/browser/navigation-store.js +625 -0
- package/dist/browser/navigation-store.js.map +1 -0
- package/dist/browser/partial-update.d.ts +75 -0
- package/dist/browser/partial-update.d.ts.map +1 -0
- package/dist/browser/partial-update.js +426 -0
- package/dist/browser/partial-update.js.map +1 -0
- package/dist/browser/react/Link.d.ts +86 -0
- package/dist/browser/react/Link.d.ts.map +1 -0
- package/dist/browser/react/Link.js +128 -0
- package/dist/browser/react/Link.js.map +1 -0
- package/dist/browser/react/NavigationProvider.d.ts +63 -0
- package/dist/browser/react/NavigationProvider.d.ts.map +1 -0
- package/dist/browser/react/NavigationProvider.js +216 -0
- package/dist/browser/react/NavigationProvider.js.map +1 -0
- package/dist/browser/react/ScrollRestoration.d.ts +75 -0
- package/dist/browser/react/ScrollRestoration.d.ts.map +1 -0
- package/dist/browser/react/ScrollRestoration.js +57 -0
- package/dist/browser/react/ScrollRestoration.js.map +1 -0
- package/dist/browser/react/context.d.ts +46 -0
- package/dist/browser/react/context.d.ts.map +1 -0
- package/dist/browser/react/context.js +10 -0
- package/dist/browser/react/context.js.map +1 -0
- package/dist/browser/react/index.d.ts +11 -0
- package/dist/browser/react/index.d.ts.map +1 -0
- package/dist/browser/react/index.js +22 -0
- package/dist/browser/react/index.js.map +1 -0
- package/dist/browser/react/location-state-shared.d.ts +63 -0
- package/dist/browser/react/location-state-shared.d.ts.map +1 -0
- package/dist/browser/react/location-state-shared.js +81 -0
- package/dist/browser/react/location-state-shared.js.map +1 -0
- package/dist/browser/react/location-state.d.ts +23 -0
- package/dist/browser/react/location-state.d.ts.map +1 -0
- package/dist/browser/react/location-state.js +29 -0
- package/dist/browser/react/location-state.js.map +1 -0
- package/dist/browser/react/mount-context.d.ts +24 -0
- package/dist/browser/react/mount-context.d.ts.map +1 -0
- package/dist/browser/react/mount-context.js +24 -0
- package/dist/browser/react/mount-context.js.map +1 -0
- package/dist/browser/react/use-action.d.ts +64 -0
- package/dist/browser/react/use-action.d.ts.map +1 -0
- package/dist/browser/react/use-action.js +134 -0
- package/dist/browser/react/use-action.js.map +1 -0
- package/dist/browser/react/use-client-cache.d.ts +41 -0
- package/dist/browser/react/use-client-cache.d.ts.map +1 -0
- package/dist/browser/react/use-client-cache.js +39 -0
- package/dist/browser/react/use-client-cache.js.map +1 -0
- package/dist/browser/react/use-handle.d.ts +31 -0
- package/dist/browser/react/use-handle.d.ts.map +1 -0
- package/dist/browser/react/use-handle.js +144 -0
- package/dist/browser/react/use-handle.js.map +1 -0
- package/dist/browser/react/use-href.d.ts +33 -0
- package/dist/browser/react/use-href.d.ts.map +1 -0
- package/dist/browser/react/use-href.js +39 -0
- package/dist/browser/react/use-href.js.map +1 -0
- package/dist/browser/react/use-link-status.d.ts +37 -0
- package/dist/browser/react/use-link-status.d.ts.map +1 -0
- package/dist/browser/react/use-link-status.js +99 -0
- package/dist/browser/react/use-link-status.js.map +1 -0
- package/dist/browser/react/use-mount.d.ts +25 -0
- package/dist/browser/react/use-mount.d.ts.map +1 -0
- package/dist/browser/react/use-mount.js +30 -0
- package/dist/browser/react/use-mount.js.map +1 -0
- package/dist/browser/react/use-navigation.d.ts +27 -0
- package/dist/browser/react/use-navigation.d.ts.map +1 -0
- package/dist/browser/react/use-navigation.js +87 -0
- package/dist/browser/react/use-navigation.js.map +1 -0
- package/dist/browser/react/use-segments.d.ts +38 -0
- package/dist/browser/react/use-segments.d.ts.map +1 -0
- package/dist/browser/react/use-segments.js +130 -0
- package/dist/browser/react/use-segments.js.map +1 -0
- package/dist/browser/request-controller.d.ts +26 -0
- package/dist/browser/request-controller.d.ts.map +1 -0
- package/dist/browser/request-controller.js +147 -0
- package/dist/browser/request-controller.js.map +1 -0
- package/dist/browser/rsc-router.d.ts +129 -0
- package/dist/browser/rsc-router.d.ts.map +1 -0
- package/dist/browser/rsc-router.js +195 -0
- package/dist/browser/rsc-router.js.map +1 -0
- package/dist/browser/scroll-restoration.d.ts +93 -0
- package/dist/browser/scroll-restoration.d.ts.map +1 -0
- package/dist/browser/scroll-restoration.js +321 -0
- package/dist/browser/scroll-restoration.js.map +1 -0
- package/dist/browser/segment-structure-assert.d.ts +17 -0
- package/dist/browser/segment-structure-assert.d.ts.map +1 -0
- package/dist/browser/segment-structure-assert.js +59 -0
- package/dist/browser/segment-structure-assert.js.map +1 -0
- package/dist/browser/server-action-bridge.d.ts +26 -0
- package/dist/browser/server-action-bridge.d.ts.map +1 -0
- package/dist/browser/server-action-bridge.js +668 -0
- package/dist/browser/server-action-bridge.js.map +1 -0
- package/dist/browser/shallow.d.ts +12 -0
- package/dist/browser/shallow.d.ts.map +1 -0
- package/dist/browser/shallow.js +34 -0
- package/dist/browser/shallow.js.map +1 -0
- package/dist/browser/types.d.ts +369 -0
- package/dist/browser/types.d.ts.map +1 -0
- package/dist/browser/types.js +2 -0
- package/dist/browser/types.js.map +1 -0
- package/dist/build/__tests__/generate-cli.test.d.ts +2 -0
- package/dist/build/__tests__/generate-cli.test.d.ts.map +1 -0
- package/dist/build/__tests__/generate-cli.test.js +237 -0
- package/dist/build/__tests__/generate-cli.test.js.map +1 -0
- package/dist/build/__tests__/generate-manifest.test.d.ts +2 -0
- package/dist/build/__tests__/generate-manifest.test.d.ts.map +1 -0
- package/dist/build/__tests__/generate-manifest.test.js +119 -0
- package/dist/build/__tests__/generate-manifest.test.js.map +1 -0
- package/dist/build/__tests__/generate-route-types.test.d.ts +2 -0
- package/dist/build/__tests__/generate-route-types.test.d.ts.map +1 -0
- package/dist/build/__tests__/generate-route-types.test.js +620 -0
- package/dist/build/__tests__/generate-route-types.test.js.map +1 -0
- package/dist/build/__tests__/per-router-manifest.test.d.ts +2 -0
- package/dist/build/__tests__/per-router-manifest.test.d.ts.map +1 -0
- package/dist/build/__tests__/per-router-manifest.test.js +308 -0
- package/dist/build/__tests__/per-router-manifest.test.js.map +1 -0
- package/dist/build/generate-manifest.d.ts +81 -0
- package/dist/build/generate-manifest.d.ts.map +1 -0
- package/dist/build/generate-manifest.js +276 -0
- package/dist/build/generate-manifest.js.map +1 -0
- package/dist/build/generate-route-types.d.ts +115 -0
- package/dist/build/generate-route-types.d.ts.map +1 -0
- package/dist/build/generate-route-types.js +740 -0
- package/dist/build/generate-route-types.js.map +1 -0
- package/dist/build/index.d.ts +21 -0
- package/dist/build/index.d.ts.map +1 -0
- package/dist/build/index.js +21 -0
- package/dist/build/index.js.map +1 -0
- package/dist/build/route-trie.d.ts +71 -0
- package/dist/build/route-trie.d.ts.map +1 -0
- package/dist/build/route-trie.js +175 -0
- package/dist/build/route-trie.js.map +1 -0
- package/dist/cache/__tests__/cache-scope.test.d.ts +2 -0
- package/dist/cache/__tests__/cache-scope.test.d.ts.map +1 -0
- package/dist/cache/__tests__/cache-scope.test.js +208 -0
- package/dist/cache/__tests__/cache-scope.test.js.map +1 -0
- package/dist/cache/__tests__/document-cache.test.d.ts +2 -0
- package/dist/cache/__tests__/document-cache.test.d.ts.map +1 -0
- package/dist/cache/__tests__/document-cache.test.js +345 -0
- package/dist/cache/__tests__/document-cache.test.js.map +1 -0
- package/dist/cache/__tests__/memory-segment-store.test.d.ts +2 -0
- package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +1 -0
- package/dist/cache/__tests__/memory-segment-store.test.js +425 -0
- package/dist/cache/__tests__/memory-segment-store.test.js.map +1 -0
- package/dist/cache/__tests__/memory-store.test.d.ts +2 -0
- package/dist/cache/__tests__/memory-store.test.d.ts.map +1 -0
- package/dist/cache/__tests__/memory-store.test.js +367 -0
- package/dist/cache/__tests__/memory-store.test.js.map +1 -0
- package/dist/cache/cache-scope.d.ts +102 -0
- package/dist/cache/cache-scope.d.ts.map +1 -0
- package/dist/cache/cache-scope.js +440 -0
- package/dist/cache/cache-scope.js.map +1 -0
- package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +2 -0
- package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +1 -0
- package/dist/cache/cf/__tests__/cf-cache-store.test.js +330 -0
- package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +1 -0
- package/dist/cache/cf/cf-cache-store.d.ts +165 -0
- package/dist/cache/cf/cf-cache-store.d.ts.map +1 -0
- package/dist/cache/cf/cf-cache-store.js +242 -0
- package/dist/cache/cf/cf-cache-store.js.map +1 -0
- package/dist/cache/cf/index.d.ts +14 -0
- package/dist/cache/cf/index.d.ts.map +1 -0
- package/dist/cache/cf/index.js +17 -0
- package/dist/cache/cf/index.js.map +1 -0
- package/dist/cache/document-cache.d.ts +64 -0
- package/dist/cache/document-cache.d.ts.map +1 -0
- package/dist/cache/document-cache.js +228 -0
- package/dist/cache/document-cache.js.map +1 -0
- package/dist/cache/index.d.ts +19 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +21 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/memory-segment-store.d.ts +110 -0
- package/dist/cache/memory-segment-store.d.ts.map +1 -0
- package/dist/cache/memory-segment-store.js +117 -0
- package/dist/cache/memory-segment-store.js.map +1 -0
- package/dist/cache/memory-store.d.ts +41 -0
- package/dist/cache/memory-store.d.ts.map +1 -0
- package/dist/cache/memory-store.js +191 -0
- package/dist/cache/memory-store.js.map +1 -0
- package/dist/cache/types.d.ts +317 -0
- package/dist/cache/types.d.ts.map +1 -0
- package/dist/cache/types.js +12 -0
- package/dist/cache/types.js.map +1 -0
- package/dist/client.d.ts +248 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +367 -0
- package/dist/client.js.map +1 -0
- package/dist/client.rsc.d.ts +26 -0
- package/dist/client.rsc.d.ts.map +1 -0
- package/dist/client.rsc.js +46 -0
- package/dist/client.rsc.js.map +1 -0
- package/dist/component-utils.d.ts +36 -0
- package/dist/component-utils.d.ts.map +1 -0
- package/dist/component-utils.js +61 -0
- package/dist/component-utils.js.map +1 -0
- package/dist/components/DefaultDocument.d.ts +13 -0
- package/dist/components/DefaultDocument.d.ts.map +1 -0
- package/dist/components/DefaultDocument.js +15 -0
- package/dist/components/DefaultDocument.js.map +1 -0
- package/dist/debug.d.ts +58 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/debug.js +157 -0
- package/dist/debug.js.map +1 -0
- package/dist/default-error-boundary.d.ts +11 -0
- package/dist/default-error-boundary.d.ts.map +1 -0
- package/dist/default-error-boundary.js +45 -0
- package/dist/default-error-boundary.js.map +1 -0
- package/dist/deps/browser.d.ts +2 -0
- package/dist/deps/browser.d.ts.map +1 -0
- package/dist/deps/browser.js +3 -0
- package/dist/deps/browser.js.map +1 -0
- package/dist/deps/html-stream-client.d.ts +2 -0
- package/dist/deps/html-stream-client.d.ts.map +1 -0
- package/dist/deps/html-stream-client.js +3 -0
- package/dist/deps/html-stream-client.js.map +1 -0
- package/dist/deps/html-stream-server.d.ts +2 -0
- package/dist/deps/html-stream-server.d.ts.map +1 -0
- package/dist/deps/html-stream-server.js +3 -0
- package/dist/deps/html-stream-server.js.map +1 -0
- package/dist/deps/rsc.d.ts +2 -0
- package/dist/deps/rsc.d.ts.map +1 -0
- package/dist/deps/rsc.js +4 -0
- package/dist/deps/rsc.js.map +1 -0
- package/dist/deps/ssr.d.ts +2 -0
- package/dist/deps/ssr.d.ts.map +1 -0
- package/dist/deps/ssr.js +3 -0
- package/dist/deps/ssr.js.map +1 -0
- package/dist/errors.d.ts +174 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +241 -0
- package/dist/errors.js.map +1 -0
- package/dist/handle.d.ts +78 -0
- package/dist/handle.d.ts.map +1 -0
- package/dist/handle.js +82 -0
- package/dist/handle.js.map +1 -0
- package/dist/handles/MetaTags.d.ts +14 -0
- package/dist/handles/MetaTags.d.ts.map +1 -0
- package/dist/handles/MetaTags.js +136 -0
- package/dist/handles/MetaTags.js.map +1 -0
- package/dist/handles/index.d.ts +6 -0
- package/dist/handles/index.d.ts.map +1 -0
- package/dist/handles/index.js +6 -0
- package/dist/handles/index.js.map +1 -0
- package/dist/handles/meta.d.ts +39 -0
- package/dist/handles/meta.d.ts.map +1 -0
- package/dist/handles/meta.js +202 -0
- package/dist/handles/meta.js.map +1 -0
- package/dist/host/__tests__/errors.test.d.ts +2 -0
- package/dist/host/__tests__/errors.test.d.ts.map +1 -0
- package/dist/host/__tests__/errors.test.js +76 -0
- package/dist/host/__tests__/errors.test.js.map +1 -0
- package/dist/host/__tests__/pattern-comprehensive.test.d.ts +2 -0
- package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +1 -0
- package/dist/host/__tests__/pattern-comprehensive.test.js +732 -0
- package/dist/host/__tests__/pattern-comprehensive.test.js.map +1 -0
- package/dist/host/__tests__/pattern-matcher.test.d.ts +2 -0
- package/dist/host/__tests__/pattern-matcher.test.d.ts.map +1 -0
- package/dist/host/__tests__/pattern-matcher.test.js +251 -0
- package/dist/host/__tests__/pattern-matcher.test.js.map +1 -0
- package/dist/host/__tests__/router.test.d.ts +2 -0
- package/dist/host/__tests__/router.test.d.ts.map +1 -0
- package/dist/host/__tests__/router.test.js +241 -0
- package/dist/host/__tests__/router.test.js.map +1 -0
- package/dist/host/__tests__/testing.test.d.ts +2 -0
- package/dist/host/__tests__/testing.test.d.ts.map +1 -0
- package/dist/host/__tests__/testing.test.js +64 -0
- package/dist/host/__tests__/testing.test.js.map +1 -0
- package/dist/host/__tests__/utils.test.d.ts +2 -0
- package/dist/host/__tests__/utils.test.d.ts.map +1 -0
- package/dist/host/__tests__/utils.test.js +29 -0
- package/dist/host/__tests__/utils.test.js.map +1 -0
- package/dist/host/cookie-handler.d.ts +34 -0
- package/dist/host/cookie-handler.d.ts.map +1 -0
- package/dist/host/cookie-handler.js +124 -0
- package/dist/host/cookie-handler.js.map +1 -0
- package/dist/host/errors.d.ts +56 -0
- package/dist/host/errors.d.ts.map +1 -0
- package/dist/host/errors.js +79 -0
- package/dist/host/errors.js.map +1 -0
- package/dist/host/index.d.ts +29 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js +32 -0
- package/dist/host/index.js.map +1 -0
- package/dist/host/pattern-matcher.d.ts +36 -0
- package/dist/host/pattern-matcher.d.ts.map +1 -0
- package/dist/host/pattern-matcher.js +172 -0
- package/dist/host/pattern-matcher.js.map +1 -0
- package/dist/host/router.d.ts +26 -0
- package/dist/host/router.d.ts.map +1 -0
- package/dist/host/router.js +218 -0
- package/dist/host/router.js.map +1 -0
- package/dist/host/testing.d.ts +36 -0
- package/dist/host/testing.d.ts.map +1 -0
- package/dist/host/testing.js +55 -0
- package/dist/host/testing.js.map +1 -0
- package/dist/host/types.d.ts +115 -0
- package/dist/host/types.d.ts.map +1 -0
- package/dist/host/types.js +7 -0
- package/dist/host/types.js.map +1 -0
- package/dist/host/utils.d.ts +21 -0
- package/dist/host/utils.d.ts.map +1 -0
- package/dist/host/utils.js +23 -0
- package/dist/host/utils.js.map +1 -0
- package/dist/href-client.d.ts +131 -0
- package/dist/href-client.d.ts.map +1 -0
- package/dist/href-client.js +64 -0
- package/dist/href-client.js.map +1 -0
- package/dist/href-context.d.ts +29 -0
- package/dist/href-context.d.ts.map +1 -0
- package/dist/href-context.js +21 -0
- package/dist/href-context.js.map +1 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +91 -0
- package/dist/index.js.map +1 -0
- package/dist/index.rsc.d.ts +32 -0
- package/dist/index.rsc.d.ts.map +1 -0
- package/dist/index.rsc.js +40 -0
- package/dist/index.rsc.js.map +1 -0
- package/dist/internal-debug.d.ts +2 -0
- package/dist/internal-debug.d.ts.map +1 -0
- package/dist/internal-debug.js +5 -0
- package/dist/internal-debug.js.map +1 -0
- package/dist/loader.d.ts +14 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +20 -0
- package/dist/loader.js.map +1 -0
- package/dist/loader.rsc.d.ts +19 -0
- package/dist/loader.rsc.d.ts.map +1 -0
- package/dist/loader.rsc.js +99 -0
- package/dist/loader.rsc.js.map +1 -0
- package/dist/network-error-thrower.d.ts +17 -0
- package/dist/network-error-thrower.d.ts.map +1 -0
- package/dist/network-error-thrower.js +14 -0
- package/dist/network-error-thrower.js.map +1 -0
- package/dist/outlet-context.d.ts +13 -0
- package/dist/outlet-context.d.ts.map +1 -0
- package/dist/outlet-context.js +3 -0
- package/dist/outlet-context.js.map +1 -0
- package/dist/prerender/__tests__/param-hash.test.d.ts +2 -0
- package/dist/prerender/__tests__/param-hash.test.d.ts.map +1 -0
- package/dist/prerender/__tests__/param-hash.test.js +148 -0
- package/dist/prerender/__tests__/param-hash.test.js.map +1 -0
- package/dist/prerender/param-hash.d.ts +16 -0
- package/dist/prerender/param-hash.d.ts.map +1 -0
- package/dist/prerender/param-hash.js +36 -0
- package/dist/prerender/param-hash.js.map +1 -0
- package/dist/prerender/store.d.ts +38 -0
- package/dist/prerender/store.d.ts.map +1 -0
- package/dist/prerender/store.js +61 -0
- package/dist/prerender/store.js.map +1 -0
- package/dist/prerender.d.ts +66 -0
- package/dist/prerender.d.ts.map +1 -0
- package/dist/prerender.js +57 -0
- package/dist/prerender.js.map +1 -0
- package/dist/reverse.d.ts +196 -0
- package/dist/reverse.d.ts.map +1 -0
- package/dist/reverse.js +78 -0
- package/dist/reverse.js.map +1 -0
- package/dist/root-error-boundary.d.ts +33 -0
- package/dist/root-error-boundary.d.ts.map +1 -0
- package/dist/root-error-boundary.js +165 -0
- package/dist/root-error-boundary.js.map +1 -0
- package/dist/route-content-wrapper.d.ts +46 -0
- package/dist/route-content-wrapper.d.ts.map +1 -0
- package/dist/route-content-wrapper.js +77 -0
- package/dist/route-content-wrapper.js.map +1 -0
- package/dist/route-definition.d.ts +421 -0
- package/dist/route-definition.d.ts.map +1 -0
- package/dist/route-definition.js +868 -0
- package/dist/route-definition.js.map +1 -0
- package/dist/route-map-builder.d.ts +155 -0
- package/dist/route-map-builder.d.ts.map +1 -0
- package/dist/route-map-builder.js +237 -0
- package/dist/route-map-builder.js.map +1 -0
- package/dist/route-types.d.ts +165 -0
- package/dist/route-types.d.ts.map +1 -0
- package/dist/route-types.js +7 -0
- package/dist/route-types.js.map +1 -0
- package/dist/router/__tests__/handler-context.test.d.ts +2 -0
- package/dist/router/__tests__/handler-context.test.d.ts.map +1 -0
- package/dist/router/__tests__/handler-context.test.js +65 -0
- package/dist/router/__tests__/handler-context.test.js.map +1 -0
- package/dist/router/__tests__/loader-cycle-detection.test.d.ts +2 -0
- package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +1 -0
- package/dist/router/__tests__/loader-cycle-detection.test.js +221 -0
- package/dist/router/__tests__/loader-cycle-detection.test.js.map +1 -0
- package/dist/router/__tests__/match-context.test.d.ts +2 -0
- package/dist/router/__tests__/match-context.test.d.ts.map +1 -0
- package/dist/router/__tests__/match-context.test.js +92 -0
- package/dist/router/__tests__/match-context.test.js.map +1 -0
- package/dist/router/__tests__/match-pipelines.test.d.ts +2 -0
- package/dist/router/__tests__/match-pipelines.test.d.ts.map +1 -0
- package/dist/router/__tests__/match-pipelines.test.js +417 -0
- package/dist/router/__tests__/match-pipelines.test.js.map +1 -0
- package/dist/router/__tests__/match-result.test.d.ts +2 -0
- package/dist/router/__tests__/match-result.test.d.ts.map +1 -0
- package/dist/router/__tests__/match-result.test.js +457 -0
- package/dist/router/__tests__/match-result.test.js.map +1 -0
- package/dist/router/__tests__/on-error.test.d.ts +2 -0
- package/dist/router/__tests__/on-error.test.d.ts.map +1 -0
- package/dist/router/__tests__/on-error.test.js +678 -0
- package/dist/router/__tests__/on-error.test.js.map +1 -0
- package/dist/router/__tests__/pattern-matching.test.d.ts +2 -0
- package/dist/router/__tests__/pattern-matching.test.d.ts.map +1 -0
- package/dist/router/__tests__/pattern-matching.test.js +629 -0
- package/dist/router/__tests__/pattern-matching.test.js.map +1 -0
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +2 -0
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +1 -0
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +155 -0
- package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +1 -0
- package/dist/router/error-handling.d.ts +77 -0
- package/dist/router/error-handling.d.ts.map +1 -0
- package/dist/router/error-handling.js +202 -0
- package/dist/router/error-handling.js.map +1 -0
- package/dist/router/handler-context.d.ts +20 -0
- package/dist/router/handler-context.d.ts.map +1 -0
- package/dist/router/handler-context.js +198 -0
- package/dist/router/handler-context.js.map +1 -0
- package/dist/router/intercept-resolution.d.ts +66 -0
- package/dist/router/intercept-resolution.d.ts.map +1 -0
- package/dist/router/intercept-resolution.js +246 -0
- package/dist/router/intercept-resolution.js.map +1 -0
- package/dist/router/loader-resolution.d.ts +64 -0
- package/dist/router/loader-resolution.d.ts.map +1 -0
- package/dist/router/loader-resolution.js +284 -0
- package/dist/router/loader-resolution.js.map +1 -0
- package/dist/router/logging.d.ts +15 -0
- package/dist/router/logging.d.ts.map +1 -0
- package/dist/router/logging.js +99 -0
- package/dist/router/logging.js.map +1 -0
- package/dist/router/manifest.d.ts +22 -0
- package/dist/router/manifest.d.ts.map +1 -0
- package/dist/router/manifest.js +181 -0
- package/dist/router/manifest.js.map +1 -0
- package/dist/router/match-api.d.ts +35 -0
- package/dist/router/match-api.d.ts.map +1 -0
- package/dist/router/match-api.js +406 -0
- package/dist/router/match-api.js.map +1 -0
- package/dist/router/match-context.d.ts +206 -0
- package/dist/router/match-context.d.ts.map +1 -0
- package/dist/router/match-context.js +17 -0
- package/dist/router/match-context.js.map +1 -0
- package/dist/router/match-middleware/background-revalidation.d.ts +127 -0
- package/dist/router/match-middleware/background-revalidation.d.ts.map +1 -0
- package/dist/router/match-middleware/background-revalidation.js +75 -0
- package/dist/router/match-middleware/background-revalidation.js.map +1 -0
- package/dist/router/match-middleware/cache-lookup.d.ts +112 -0
- package/dist/router/match-middleware/cache-lookup.d.ts.map +1 -0
- package/dist/router/match-middleware/cache-lookup.js +257 -0
- package/dist/router/match-middleware/cache-lookup.js.map +1 -0
- package/dist/router/match-middleware/cache-store.d.ts +113 -0
- package/dist/router/match-middleware/cache-store.d.ts.map +1 -0
- package/dist/router/match-middleware/cache-store.js +108 -0
- package/dist/router/match-middleware/cache-store.js.map +1 -0
- package/dist/router/match-middleware/index.d.ts +81 -0
- package/dist/router/match-middleware/index.d.ts.map +1 -0
- package/dist/router/match-middleware/index.js +80 -0
- package/dist/router/match-middleware/index.js.map +1 -0
- package/dist/router/match-middleware/intercept-resolution.d.ts +117 -0
- package/dist/router/match-middleware/intercept-resolution.d.ts.map +1 -0
- package/dist/router/match-middleware/intercept-resolution.js +134 -0
- package/dist/router/match-middleware/intercept-resolution.js.map +1 -0
- package/dist/router/match-middleware/segment-resolution.d.ts +99 -0
- package/dist/router/match-middleware/segment-resolution.d.ts.map +1 -0
- package/dist/router/match-middleware/segment-resolution.js +53 -0
- package/dist/router/match-middleware/segment-resolution.js.map +1 -0
- package/dist/router/match-pipelines.d.ts +147 -0
- package/dist/router/match-pipelines.d.ts.map +1 -0
- package/dist/router/match-pipelines.js +82 -0
- package/dist/router/match-pipelines.js.map +1 -0
- package/dist/router/match-result.d.ts +126 -0
- package/dist/router/match-result.d.ts.map +1 -0
- package/dist/router/match-result.js +93 -0
- package/dist/router/match-result.js.map +1 -0
- package/dist/router/metrics.d.ts +20 -0
- package/dist/router/metrics.d.ts.map +1 -0
- package/dist/router/metrics.js +47 -0
- package/dist/router/metrics.js.map +1 -0
- package/dist/router/middleware.d.ts +249 -0
- package/dist/router/middleware.d.ts.map +1 -0
- package/dist/router/middleware.js +434 -0
- package/dist/router/middleware.js.map +1 -0
- package/dist/router/middleware.test.d.ts +2 -0
- package/dist/router/middleware.test.d.ts.map +1 -0
- package/dist/router/middleware.test.js +816 -0
- package/dist/router/middleware.test.js.map +1 -0
- package/dist/router/pattern-matching.d.ts +149 -0
- package/dist/router/pattern-matching.d.ts.map +1 -0
- package/dist/router/pattern-matching.js +349 -0
- package/dist/router/pattern-matching.js.map +1 -0
- package/dist/router/revalidation.d.ts +44 -0
- package/dist/router/revalidation.d.ts.map +1 -0
- package/dist/router/revalidation.js +147 -0
- package/dist/router/revalidation.js.map +1 -0
- package/dist/router/router-context.d.ts +135 -0
- package/dist/router/router-context.d.ts.map +1 -0
- package/dist/router/router-context.js +36 -0
- package/dist/router/router-context.js.map +1 -0
- package/dist/router/segment-resolution.d.ts +127 -0
- package/dist/router/segment-resolution.d.ts.map +1 -0
- package/dist/router/segment-resolution.js +919 -0
- package/dist/router/segment-resolution.js.map +1 -0
- package/dist/router/trie-matching.d.ts +40 -0
- package/dist/router/trie-matching.d.ts.map +1 -0
- package/dist/router/trie-matching.js +127 -0
- package/dist/router/trie-matching.js.map +1 -0
- package/dist/router/types.d.ts +136 -0
- package/dist/router/types.d.ts.map +1 -0
- package/dist/router/types.js +7 -0
- package/dist/router/types.js.map +1 -0
- package/dist/router.d.ts +753 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.gen.d.ts +6 -0
- package/dist/router.gen.d.ts.map +1 -0
- package/dist/router.gen.js +6 -0
- package/dist/router.gen.js.map +1 -0
- package/dist/router.js +1304 -0
- package/dist/router.js.map +1 -0
- package/dist/rsc/__tests__/helpers.test.d.ts +2 -0
- package/dist/rsc/__tests__/helpers.test.d.ts.map +1 -0
- package/dist/rsc/__tests__/helpers.test.js +140 -0
- package/dist/rsc/__tests__/helpers.test.js.map +1 -0
- package/dist/rsc/handler.d.ts +45 -0
- package/dist/rsc/handler.d.ts.map +1 -0
- package/dist/rsc/handler.js +1172 -0
- package/dist/rsc/handler.js.map +1 -0
- package/dist/rsc/helpers.d.ts +16 -0
- package/dist/rsc/helpers.d.ts.map +1 -0
- package/dist/rsc/helpers.js +55 -0
- package/dist/rsc/helpers.js.map +1 -0
- package/dist/rsc/index.d.ts +22 -0
- package/dist/rsc/index.d.ts.map +1 -0
- package/dist/rsc/index.js +23 -0
- package/dist/rsc/index.js.map +1 -0
- package/dist/rsc/nonce.d.ts +9 -0
- package/dist/rsc/nonce.d.ts.map +1 -0
- package/dist/rsc/nonce.js +18 -0
- package/dist/rsc/nonce.js.map +1 -0
- package/dist/rsc/types.d.ts +206 -0
- package/dist/rsc/types.d.ts.map +1 -0
- package/dist/rsc/types.js +8 -0
- package/dist/rsc/types.js.map +1 -0
- package/dist/search-params.d.ts +103 -0
- package/dist/search-params.d.ts.map +1 -0
- package/dist/search-params.js +74 -0
- package/dist/search-params.js.map +1 -0
- package/dist/segment-system.d.ts +75 -0
- package/dist/segment-system.d.ts.map +1 -0
- package/dist/segment-system.js +336 -0
- package/dist/segment-system.js.map +1 -0
- package/dist/server/context.d.ts +245 -0
- package/dist/server/context.d.ts.map +1 -0
- package/dist/server/context.js +197 -0
- package/dist/server/context.js.map +1 -0
- package/dist/server/fetchable-loader-store.d.ts +18 -0
- package/dist/server/fetchable-loader-store.d.ts.map +1 -0
- package/dist/server/fetchable-loader-store.js +18 -0
- package/dist/server/fetchable-loader-store.js.map +1 -0
- package/dist/server/handle-store.d.ts +85 -0
- package/dist/server/handle-store.d.ts.map +1 -0
- package/dist/server/handle-store.js +142 -0
- package/dist/server/handle-store.js.map +1 -0
- package/dist/server/loader-registry.d.ts +55 -0
- package/dist/server/loader-registry.d.ts.map +1 -0
- package/dist/server/loader-registry.js +132 -0
- package/dist/server/loader-registry.js.map +1 -0
- package/dist/server/request-context.d.ts +226 -0
- package/dist/server/request-context.d.ts.map +1 -0
- package/dist/server/request-context.js +290 -0
- package/dist/server/request-context.js.map +1 -0
- package/dist/server/root-layout.d.ts +4 -0
- package/dist/server/root-layout.d.ts.map +1 -0
- package/dist/server/root-layout.js +5 -0
- package/dist/server/root-layout.js.map +1 -0
- package/dist/server.d.ts +15 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +20 -0
- package/dist/server.js.map +1 -0
- package/dist/ssr/__tests__/ssr-handler.test.d.ts +2 -0
- package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +1 -0
- package/dist/ssr/__tests__/ssr-handler.test.js +132 -0
- package/dist/ssr/__tests__/ssr-handler.test.js.map +1 -0
- package/dist/ssr/index.d.ts +98 -0
- package/dist/ssr/index.d.ts.map +1 -0
- package/dist/ssr/index.js +158 -0
- package/dist/ssr/index.js.map +1 -0
- package/dist/static-handler.d.ts +50 -0
- package/dist/static-handler.d.ts.map +1 -0
- package/dist/static-handler.gen.d.ts +5 -0
- package/dist/static-handler.gen.d.ts.map +1 -0
- package/dist/static-handler.gen.js +5 -0
- package/dist/static-handler.gen.js.map +1 -0
- package/dist/static-handler.js +29 -0
- package/dist/static-handler.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +20 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.js +240 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/ThemeScript.d.ts +48 -0
- package/dist/theme/ThemeScript.d.ts.map +1 -0
- package/dist/theme/ThemeScript.js +13 -0
- package/dist/theme/ThemeScript.js.map +1 -0
- package/dist/theme/__tests__/theme.test.d.ts +2 -0
- package/dist/theme/__tests__/theme.test.d.ts.map +1 -0
- package/dist/theme/__tests__/theme.test.js +103 -0
- package/dist/theme/__tests__/theme.test.js.map +1 -0
- package/dist/theme/constants.d.ts +29 -0
- package/dist/theme/constants.d.ts.map +1 -0
- package/dist/theme/constants.js +48 -0
- package/dist/theme/constants.js.map +1 -0
- package/dist/theme/index.d.ts +31 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +36 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/theme-context.d.ts +40 -0
- package/dist/theme/theme-context.d.ts.map +1 -0
- package/dist/theme/theme-context.js +60 -0
- package/dist/theme/theme-context.js.map +1 -0
- package/dist/theme/theme-script.d.ts +27 -0
- package/dist/theme/theme-script.d.ts.map +1 -0
- package/dist/theme/theme-script.js +147 -0
- package/dist/theme/theme-script.js.map +1 -0
- package/dist/theme/types.d.ts +163 -0
- package/dist/theme/types.d.ts.map +1 -0
- package/dist/theme/types.js +11 -0
- package/dist/theme/types.js.map +1 -0
- package/dist/theme/use-theme.d.ts +12 -0
- package/dist/theme/use-theme.d.ts.map +1 -0
- package/dist/theme/use-theme.js +40 -0
- package/dist/theme/use-theme.js.map +1 -0
- package/dist/types.d.ts +1479 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/dist/urls.d.ts +441 -0
- package/dist/urls.d.ts.map +1 -0
- package/dist/urls.gen.d.ts +8 -0
- package/dist/urls.gen.d.ts.map +1 -0
- package/dist/urls.gen.js +8 -0
- package/dist/urls.gen.js.map +1 -0
- package/dist/urls.js +443 -0
- package/dist/urls.js.map +1 -0
- package/dist/use-loader.d.ts +127 -0
- package/dist/use-loader.d.ts.map +1 -0
- package/dist/use-loader.js +237 -0
- package/dist/use-loader.js.map +1 -0
- package/dist/vite/__tests__/ast-handler-extract.test.d.ts +2 -0
- package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +1 -0
- package/dist/vite/__tests__/ast-handler-extract.test.js +294 -0
- package/dist/vite/__tests__/ast-handler-extract.test.js.map +1 -0
- package/dist/vite/__tests__/expose-id-utils.test.d.ts +2 -0
- package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +1 -0
- package/dist/vite/__tests__/expose-id-utils.test.js +224 -0
- package/dist/vite/__tests__/expose-id-utils.test.js.map +1 -0
- package/dist/vite/__tests__/expose-internal-ids.test.d.ts +2 -0
- package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +1 -0
- package/dist/vite/__tests__/expose-internal-ids.test.js +647 -0
- package/dist/vite/__tests__/expose-internal-ids.test.js.map +1 -0
- package/dist/vite/__tests__/expose-router-id.test.d.ts +2 -0
- package/dist/vite/__tests__/expose-router-id.test.d.ts.map +1 -0
- package/dist/vite/__tests__/expose-router-id.test.js +39 -0
- package/dist/vite/__tests__/expose-router-id.test.js.map +1 -0
- package/dist/vite/ast-handler-extract.d.ts +49 -0
- package/dist/vite/ast-handler-extract.d.ts.map +1 -0
- package/dist/vite/ast-handler-extract.js +249 -0
- package/dist/vite/ast-handler-extract.js.map +1 -0
- package/dist/vite/expose-action-id.d.ts +19 -0
- package/dist/vite/expose-action-id.d.ts.map +1 -0
- package/dist/vite/expose-action-id.js +250 -0
- package/dist/vite/expose-action-id.js.map +1 -0
- package/dist/vite/expose-id-utils.d.ts +69 -0
- package/dist/vite/expose-id-utils.d.ts.map +1 -0
- package/dist/vite/expose-id-utils.js +289 -0
- package/dist/vite/expose-id-utils.js.map +1 -0
- package/dist/vite/expose-internal-ids.d.ts +22 -0
- package/dist/vite/expose-internal-ids.d.ts.map +1 -0
- package/dist/vite/expose-internal-ids.js +886 -0
- package/dist/vite/expose-internal-ids.js.map +1 -0
- package/dist/vite/index.d.ts +149 -0
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/index.js +1884 -537
- package/dist/vite/index.js.bak +5448 -0
- package/dist/vite/index.js.map +1 -0
- package/dist/vite/index.named-routes.gen.ts +103 -0
- package/dist/vite/package-resolution.d.ts +43 -0
- package/dist/vite/package-resolution.d.ts.map +1 -0
- package/dist/vite/package-resolution.js +112 -0
- package/dist/vite/package-resolution.js.map +1 -0
- package/dist/vite/plugins/cloudflare-protocol-loader-hook.mjs +76 -0
- package/dist/vite/virtual-entries.d.ts +25 -0
- package/dist/vite/virtual-entries.d.ts.map +1 -0
- package/dist/vite/virtual-entries.js +110 -0
- package/dist/vite/virtual-entries.js.map +1 -0
- package/package.json +7 -5
- package/skills/breadcrumbs/SKILL.md +3 -1
- package/skills/cache-guide/SKILL.md +32 -0
- package/skills/caching/SKILL.md +8 -0
- package/skills/handler-use/SKILL.md +364 -0
- package/skills/hooks/SKILL.md +54 -20
- package/skills/i18n/SKILL.md +276 -0
- package/skills/intercept/SKILL.md +45 -0
- package/skills/layout/SKILL.md +24 -0
- package/skills/links/SKILL.md +237 -17
- package/skills/loader/SKILL.md +123 -46
- package/skills/middleware/SKILL.md +36 -3
- package/skills/migrate-nextjs/SKILL.md +562 -0
- package/skills/migrate-react-router/SKILL.md +769 -0
- package/skills/parallel/SKILL.md +68 -0
- package/skills/prerender/SKILL.md +110 -68
- package/skills/rango/SKILL.md +26 -22
- package/skills/response-routes/SKILL.md +8 -0
- package/skills/route/SKILL.md +79 -0
- package/skills/router-setup/SKILL.md +87 -2
- package/skills/server-actions/SKILL.md +739 -0
- package/skills/streams-and-websockets/SKILL.md +283 -0
- package/skills/typesafety/SKILL.md +19 -1
- package/skills/view-transitions/SKILL.md +212 -0
- package/src/__internal.ts +1 -1
- package/src/browser/app-shell.ts +52 -0
- package/src/browser/app-version.ts +14 -0
- package/src/browser/event-controller.ts +44 -4
- package/src/browser/navigation-bridge.ts +156 -10
- package/src/browser/navigation-client.ts +128 -53
- package/src/browser/navigation-store.ts +68 -9
- package/src/browser/partial-update.ts +84 -16
- package/src/browser/prefetch/cache.ts +129 -21
- package/src/browser/prefetch/fetch.ts +156 -18
- package/src/browser/prefetch/queue.ts +92 -29
- package/src/browser/prefetch/resource-ready.ts +77 -0
- package/src/browser/rango-state.ts +53 -13
- package/src/browser/react/Link.tsx +72 -8
- package/src/browser/react/NavigationProvider.tsx +82 -21
- package/src/browser/react/context.ts +7 -2
- package/src/browser/react/filter-segment-order.ts +51 -7
- package/src/browser/react/index.ts +3 -0
- package/src/browser/react/use-handle.ts +9 -58
- package/src/browser/react/use-navigation.ts +22 -2
- package/src/browser/react/use-params.ts +17 -4
- package/src/browser/react/use-reverse.ts +99 -0
- package/src/browser/react/use-router.ts +29 -9
- package/src/browser/react/use-segments.ts +11 -8
- package/src/browser/rsc-router.tsx +60 -9
- package/src/browser/scroll-restoration.ts +38 -33
- package/src/browser/segment-reconciler.ts +36 -14
- package/src/browser/server-action-bridge.ts +8 -6
- package/src/browser/types.ts +46 -5
- package/src/build/generate-manifest.ts +6 -6
- package/src/build/generate-route-types.ts +3 -0
- package/src/build/route-trie.ts +52 -25
- package/src/build/route-types/include-resolution.ts +8 -1
- package/src/build/route-types/router-processing.ts +211 -72
- package/src/build/route-types/scan-filter.ts +8 -1
- package/src/cache/cache-scope.ts +20 -19
- package/src/cache/cf/cf-cache-store.ts +5 -7
- package/src/cache/taint.ts +55 -0
- package/src/client.rsc.tsx +3 -0
- package/src/client.tsx +89 -231
- package/src/context-var.ts +72 -2
- package/src/handle.ts +40 -0
- package/src/href-client.ts +4 -1
- package/src/index.rsc.ts +6 -1
- package/src/index.ts +49 -6
- package/src/outlet-context.ts +1 -1
- package/src/prerender/store.ts +5 -4
- package/src/prerender.ts +138 -77
- package/src/response-utils.ts +28 -0
- package/src/reverse.ts +62 -15
- package/src/route-definition/dsl-helpers.ts +210 -35
- package/src/route-definition/helpers-types.ts +73 -20
- package/src/route-definition/index.ts +3 -0
- package/src/route-definition/redirect.ts +9 -1
- package/src/route-definition/resolve-handler-use.ts +155 -0
- package/src/route-types.ts +18 -0
- package/src/router/content-negotiation.ts +100 -1
- package/src/router/handler-context.ts +77 -38
- package/src/router/intercept-resolution.ts +9 -4
- package/src/router/lazy-includes.ts +6 -6
- package/src/router/loader-resolution.ts +159 -21
- package/src/router/manifest.ts +22 -13
- package/src/router/match-api.ts +128 -192
- package/src/router/match-handlers.ts +1 -0
- package/src/router/match-middleware/cache-lookup.ts +28 -8
- package/src/router/match-middleware/segment-resolution.ts +53 -0
- package/src/router/match-result.ts +101 -4
- package/src/router/middleware-types.ts +20 -33
- package/src/router/middleware.ts +56 -12
- package/src/router/navigation-snapshot.ts +182 -0
- package/src/router/pattern-matching.ts +101 -17
- package/src/router/prerender-match.ts +110 -10
- package/src/router/preview-match.ts +30 -102
- package/src/router/request-classification.ts +310 -0
- package/src/router/revalidation.ts +15 -1
- package/src/router/route-snapshot.ts +245 -0
- package/src/router/router-interfaces.ts +36 -4
- package/src/router/router-options.ts +37 -11
- package/src/router/segment-resolution/fresh.ts +88 -9
- package/src/router/segment-resolution/helpers.ts +29 -24
- package/src/router/segment-resolution/revalidation.ts +219 -108
- package/src/router/substitute-pattern-params.ts +56 -0
- package/src/router/trie-matching.ts +18 -13
- package/src/router/types.ts +1 -0
- package/src/router/url-params.ts +49 -0
- package/src/router.ts +55 -7
- package/src/rsc/handler.ts +478 -374
- package/src/rsc/helpers.ts +69 -41
- package/src/rsc/loader-fetch.ts +23 -3
- package/src/rsc/manifest-init.ts +5 -1
- package/src/rsc/progressive-enhancement.ts +18 -2
- package/src/rsc/response-route-handler.ts +14 -1
- package/src/rsc/rsc-rendering.ts +20 -1
- package/src/rsc/server-action.ts +12 -0
- package/src/rsc/ssr-setup.ts +2 -2
- package/src/rsc/types.ts +15 -1
- package/src/segment-content-promise.ts +67 -0
- package/src/segment-loader-promise.ts +122 -0
- package/src/segment-system.tsx +71 -70
- package/src/server/context.ts +76 -4
- package/src/server/handle-store.ts +19 -0
- package/src/server/loader-registry.ts +9 -8
- package/src/server/request-context.ts +185 -57
- package/src/ssr/index.tsx +8 -1
- package/src/static-handler.ts +18 -6
- package/src/types/cache-types.ts +4 -4
- package/src/types/handler-context.ts +47 -56
- package/src/types/loader-types.ts +41 -15
- package/src/types/request-scope.ts +126 -0
- package/src/types/route-entry.ts +12 -1
- package/src/types/segments.ts +18 -1
- package/src/urls/include-helper.ts +24 -14
- package/src/urls/path-helper-types.ts +39 -6
- package/src/urls/path-helper.ts +47 -12
- package/src/urls/pattern-types.ts +12 -0
- package/src/urls/response-types.ts +18 -16
- package/src/use-loader.tsx +77 -5
- package/src/vite/debug.ts +184 -0
- package/src/vite/discovery/bundle-postprocess.ts +30 -33
- package/src/vite/discovery/discover-routers.ts +36 -4
- package/src/vite/discovery/gate-state.ts +171 -0
- package/src/vite/discovery/prerender-collection.ts +175 -74
- package/src/vite/discovery/self-gen-tracking.ts +27 -1
- package/src/vite/discovery/state.ts +13 -4
- package/src/vite/index.ts +4 -0
- package/src/vite/plugin-types.ts +60 -5
- package/src/vite/plugins/cjs-to-esm.ts +5 -0
- package/src/vite/plugins/client-ref-dedup.ts +16 -0
- package/src/vite/plugins/client-ref-hashing.ts +16 -4
- package/src/vite/plugins/cloudflare-protocol-loader-hook.d.mts +23 -0
- package/src/vite/plugins/cloudflare-protocol-loader-hook.mjs +76 -0
- package/src/vite/plugins/cloudflare-protocol-stub.ts +214 -0
- package/src/vite/plugins/expose-action-id.ts +52 -28
- package/src/vite/plugins/expose-id-utils.ts +12 -0
- package/src/vite/plugins/expose-ids/handler-transform.ts +30 -0
- package/src/vite/plugins/expose-ids/router-transform.ts +20 -3
- package/src/vite/plugins/expose-internal-ids.ts +563 -316
- package/src/vite/plugins/performance-tracks.ts +96 -0
- package/src/vite/plugins/refresh-cmd.ts +88 -26
- package/src/vite/plugins/use-cache-transform.ts +56 -43
- package/src/vite/plugins/version-injector.ts +37 -11
- package/src/vite/rango.ts +63 -11
- package/src/vite/router-discovery.ts +732 -86
- package/src/vite/utils/banner.ts +1 -1
- package/src/vite/utils/package-resolution.ts +41 -1
- package/src/vite/utils/prerender-utils.ts +38 -5
- package/src/vite/utils/shared-utils.ts +3 -2
package/skills/parallel/SKILL.md
CHANGED
|
@@ -206,6 +206,67 @@ parallel(
|
|
|
206
206
|
)
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
+
## Composable Slots via `handler.use`
|
|
210
|
+
|
|
211
|
+
Slot handlers can carry their own loader, loading, error/notFound boundaries, revalidation, and transition defaults via `.use`. The mount site then declares **just the slot names** — no per-call data wiring.
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
const CartSummary: Handler = async (ctx) => {
|
|
215
|
+
const cart = await ctx.use(CartLoader);
|
|
216
|
+
return <CartSummaryView cart={cart} />;
|
|
217
|
+
};
|
|
218
|
+
CartSummary.use = () => [
|
|
219
|
+
loader(CartLoader),
|
|
220
|
+
loading(<CartSkeleton />),
|
|
221
|
+
revalidate(revalidateCartData),
|
|
222
|
+
];
|
|
223
|
+
|
|
224
|
+
// Same slot, no copy-pasted plumbing across layouts.
|
|
225
|
+
layout(<DashboardLayout />, () => [
|
|
226
|
+
parallel({ "@cart": CartSummary }),
|
|
227
|
+
path("/dashboard", DashboardIndex, { name: "dashboard.index" }),
|
|
228
|
+
]);
|
|
229
|
+
|
|
230
|
+
layout(<AccountLayout />, () => [
|
|
231
|
+
parallel({ "@cart": CartSummary }),
|
|
232
|
+
path("/account", AccountIndex, { name: "account.index" }),
|
|
233
|
+
]);
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
A slot's `loading()` (whether from `handler.use` or explicit) makes that slot an independent streaming unit, exactly as in the **Streaming Behavior** section above.
|
|
237
|
+
|
|
238
|
+
The `parallel` mount site has the narrowest allow-list for `handler.use` items — slots cannot bring their own middleware or layout, only `revalidate`, `loader`, `loading`, `errorBoundary`, `notFoundBoundary`, and `transition`. See [skills/handler-use](../handler-use/SKILL.md) for the full table and merge rules.
|
|
239
|
+
|
|
240
|
+
`transition` is allowed in the slot allow-list, but slot-level rendering does **not** currently apply a `<ViewTransition>` wrapper — only the layout/route wraps take effect at render time. For a modal-only morph today, use an element-level React `<ViewTransition>` inside the slot's component. The reverse direction is the useful guarantee: a layout-level `transition()` fires when the layout's default outlet content changes but **not** when a `<ParallelOutlet />` mounts new content (modal opens are not subtree updates of the layout VT). See [skills/view-transitions](../view-transitions/SKILL.md) for the wrap rules and the intercept caveat.
|
|
241
|
+
|
|
242
|
+
### Two scopes for explicit `use`: shared (broadcast) and slot-local
|
|
243
|
+
|
|
244
|
+
`parallel({...slots}, () => [...use])` runs the shared `use()` callback **once per slot** ([dsl-helpers.ts](../../src/route-definition/dsl-helpers.ts)) — items in that callback land on every slot's entry. That's the right behavior for the items the parallel allow-list permits and that accumulate (`loader`, `revalidate`, `errorBoundary`, `notFoundBoundary`, `transition`). (Slots cannot bring `middleware` or `layout` — see the allowed-types note above.)
|
|
245
|
+
|
|
246
|
+
For single-assignment items like `loading()`, broadcasting overwrites every slot's `handler.use` default. Pass a **slot descriptor** `{ handler, use }` instead — items in the descriptor's `use` apply only to that slot:
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
// @cart gets a custom skeleton; @notifs keeps its handler.use default.
|
|
250
|
+
parallel({
|
|
251
|
+
"@cart": {
|
|
252
|
+
handler: Cart,
|
|
253
|
+
use: () => [loading(<CustomCartSkeleton />)],
|
|
254
|
+
},
|
|
255
|
+
"@notifs": Notifs,
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
// Opt one slot out of streaming while siblings still stream the broadcast.
|
|
259
|
+
parallel(
|
|
260
|
+
{
|
|
261
|
+
"@cart": { handler: Cart, use: () => [loading(false)] },
|
|
262
|
+
"@notifs": Notifs,
|
|
263
|
+
},
|
|
264
|
+
() => [loading(<BroadcastSkeleton />)],
|
|
265
|
+
);
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
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.
|
|
269
|
+
|
|
209
270
|
## Slot Override Semantics
|
|
210
271
|
|
|
211
272
|
When multiple `parallel()` calls define the same slot name, **the last
|
|
@@ -288,6 +349,13 @@ Revalidating only the parallel does not re-run outer handlers/layouts.
|
|
|
288
349
|
If the slot reads `ctx.get()` data established above it, opt the outer
|
|
289
350
|
segment into revalidation as well.
|
|
290
351
|
|
|
352
|
+
A `revalidate()` callback may return a hard `boolean`, a soft
|
|
353
|
+
`{ defaultShouldRevalidate }` object, or nothing (`void` / `null` /
|
|
354
|
+
`undefined`) to defer to the next revalidator. See
|
|
355
|
+
[loader/SKILL.md#revalidate-return-shapes](../loader/SKILL.md#revalidate-return-shapes)
|
|
356
|
+
for the full contract — it's the same across `loader()`, `path()`,
|
|
357
|
+
`layout()`, `parallel()`, and `intercept()`.
|
|
358
|
+
|
|
291
359
|
### Revalidation Contracts for Parallel Dependencies
|
|
292
360
|
|
|
293
361
|
Prefer named revalidation contracts shared by both the upstream producer and
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prerender
|
|
3
|
-
description: Pre-render route segments at build time with Prerender and
|
|
3
|
+
description: Pre-render route segments at build time with Prerender and Passthrough live fallback
|
|
4
4
|
argument-hint: [passthrough]
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -54,8 +54,14 @@ path("/blog/:slug", BlogPost, { name: "blog.post" })
|
|
|
54
54
|
|
|
55
55
|
### With Passthrough (live fallback for unknown params)
|
|
56
56
|
|
|
57
|
+
Wrap a `Prerender` definition with `Passthrough()` to add a separate live handler
|
|
58
|
+
for unknown params at runtime. The build handler runs at build time, the live
|
|
59
|
+
handler runs at request time.
|
|
60
|
+
|
|
57
61
|
```typescript
|
|
58
|
-
|
|
62
|
+
import { Prerender, Passthrough } from "@rangojs/router";
|
|
63
|
+
|
|
64
|
+
export const ProductPageDef = Prerender(
|
|
59
65
|
async () => {
|
|
60
66
|
const top = await db.query("SELECT id FROM products WHERE featured");
|
|
61
67
|
return top.map(p => ({ id: p.id }));
|
|
@@ -64,32 +70,41 @@ export const ProductPage = Prerender(
|
|
|
64
70
|
const product = await db.query("SELECT * FROM products WHERE id = ?", ctx.params.id);
|
|
65
71
|
return <Product data={product} />;
|
|
66
72
|
},
|
|
67
|
-
{
|
|
73
|
+
{ concurrency: 4 }
|
|
68
74
|
);
|
|
75
|
+
|
|
76
|
+
// In route definition:
|
|
77
|
+
path("/products/:id", Passthrough(ProductPageDef, async (ctx) => {
|
|
78
|
+
const product = await ctx.env.DB.query("SELECT * FROM products WHERE id = ?", ctx.params.id);
|
|
79
|
+
return <Product data={product} />;
|
|
80
|
+
}), { name: "product" })
|
|
69
81
|
```
|
|
70
82
|
|
|
71
|
-
## Passthrough
|
|
83
|
+
## Passthrough Wrapper
|
|
72
84
|
|
|
73
|
-
|
|
85
|
+
`Passthrough(prerenderDef, liveHandler)` wraps a `Prerender` definition with a
|
|
86
|
+
separate handler for runtime fallback. The build and live handlers are separate
|
|
87
|
+
functions — no `ctx.build` branching needed.
|
|
74
88
|
|
|
75
|
-
| |
|
|
76
|
-
| ------------------- | --------------------------------------- |
|
|
77
|
-
| Known params | Served from pre-rendered Flight payload | Served from pre-rendered Flight payload
|
|
78
|
-
| Unknown params | Handler evicted, no live fallback |
|
|
79
|
-
| `ctx.passthrough()` | Throws (not
|
|
80
|
-
| Bundle size |
|
|
81
|
-
| `revalidate()` | Not allowed (handler gone) | Allowed (handler can re-render)
|
|
82
|
-
| `loading()` | Ignored (segments fully resolved) | Works for live fallback renders
|
|
89
|
+
| | Plain `Prerender` (no wrapper) | `Passthrough(def, liveHandler)` |
|
|
90
|
+
| ------------------- | --------------------------------------- | ---------------------------------------- |
|
|
91
|
+
| Known params | Served from pre-rendered Flight payload | Served from pre-rendered Flight payload |
|
|
92
|
+
| Unknown params | Handler evicted, no live fallback | Live handler runs at request time |
|
|
93
|
+
| `ctx.passthrough()` | Throws (not on Passthrough route) | Skips artifact, defers to live handler |
|
|
94
|
+
| Bundle size | Build handler code + imports removed | Build handler evicted, live handler kept |
|
|
95
|
+
| `revalidate()` | Not allowed (handler gone) | Allowed (live handler can re-render) |
|
|
96
|
+
| `loading()` | Ignored (segments fully resolved) | Works for live fallback renders |
|
|
83
97
|
|
|
84
|
-
### When to use
|
|
98
|
+
### When to use Passthrough
|
|
85
99
|
|
|
86
|
-
Use `
|
|
100
|
+
Use `Passthrough()` when:
|
|
87
101
|
|
|
88
102
|
- The route has a large or open-ended param space (e.g., user profiles, product pages)
|
|
89
103
|
- You want to pre-render popular/known params for speed but still serve unknown params live
|
|
90
104
|
- You need `revalidate()` on the route
|
|
105
|
+
- The live handler needs runtime bindings (e.g., `ctx.env.DB`)
|
|
91
106
|
|
|
92
|
-
Use
|
|
107
|
+
Use plain `Prerender` (no wrapper) when:
|
|
93
108
|
|
|
94
109
|
- All possible params are known at build time (e.g., markdown files, config-driven pages)
|
|
95
110
|
- You want maximum bundle size reduction (handler code + node:fs imports removed)
|
|
@@ -103,6 +118,7 @@ Handlers receive `BuildContext` at build time, a subset of the runtime `HandlerC
|
|
|
103
118
|
interface BuildContext<TParams> {
|
|
104
119
|
params: TParams; // From getParams
|
|
105
120
|
build: true; // Always true at build time
|
|
121
|
+
dev: boolean; // true in Vite dev mode, false during production build
|
|
106
122
|
use: <T>(handle: Handle<T>) => (data: T) => void; // Push handle data
|
|
107
123
|
url: URL; // Synthetic URL from pattern + params
|
|
108
124
|
pathname: string; // Pathname from synthetic URL
|
|
@@ -115,8 +131,9 @@ interface BuildContext<TParams> {
|
|
|
115
131
|
params?: Record<string, string>,
|
|
116
132
|
search?: Record<string, unknown>,
|
|
117
133
|
): string; // URL generation
|
|
118
|
-
passthrough(): PrerenderPassthroughResult; // Skip local artifact (
|
|
119
|
-
//
|
|
134
|
+
passthrough(): PrerenderPassthroughResult; // Skip local artifact (Passthrough routes only)
|
|
135
|
+
env: DefaultEnv; // Available when buildEnv is configured in rango() (throws otherwise)
|
|
136
|
+
// NOT available: request, headers, cookies (always throw)
|
|
120
137
|
}
|
|
121
138
|
```
|
|
122
139
|
|
|
@@ -183,18 +200,17 @@ In production builds, `Prerender` exports are replaced with stubs:
|
|
|
183
200
|
// Original
|
|
184
201
|
export const BlogPost = Prerender(getParams, handler);
|
|
185
202
|
|
|
186
|
-
// Stubbed (
|
|
203
|
+
// Stubbed (all Prerender handlers are evicted)
|
|
187
204
|
export const BlogPost = {
|
|
188
205
|
__brand: "prerenderHandler",
|
|
189
206
|
$$id: "abc123#BlogPost",
|
|
190
207
|
};
|
|
191
208
|
```
|
|
192
209
|
|
|
193
|
-
|
|
194
|
-
|
|
210
|
+
All Prerender handlers are evicted in production. The live handler for
|
|
211
|
+
`Passthrough()` routes lives in the urls module and is not evicted.
|
|
195
212
|
|
|
196
|
-
In client and SSR environments, ALL prerender handlers are always stubbed
|
|
197
|
-
(passthrough only affects the RSC server bundle).
|
|
213
|
+
In client and SSR environments, ALL prerender handlers are always stubbed.
|
|
198
214
|
|
|
199
215
|
## Sub-use Semantics
|
|
200
216
|
|
|
@@ -231,15 +247,15 @@ path("/blog/:slug", BlogPost, { name: "blog.post" }, () => [
|
|
|
231
247
|
| DSL item | Behavior with Prerender |
|
|
232
248
|
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
233
249
|
| `loader()` | Live at runtime, bundled normally. Use `cache()` for caching. |
|
|
234
|
-
| `revalidate()` | Not allowed without
|
|
250
|
+
| `revalidate()` | Not allowed without Passthrough. Allowed with Passthrough. |
|
|
235
251
|
| `cache()` | Orthogonal -- use on parent layouts and loaders. |
|
|
236
252
|
| `layout()` | Child layouts inside path are pre-rendered. Parent layouts are live. |
|
|
237
253
|
| `parallel()` | Parallel slots inside path are pre-rendered. |
|
|
238
254
|
| `middleware()` | Skipped during pre-render (no request). Runs at request time for loaders. |
|
|
239
|
-
| `loading()` | Ignored without
|
|
255
|
+
| `loading()` | Ignored without Passthrough. Works for live fallback with Passthrough. |
|
|
240
256
|
| `intercept()` | Pre-rendered at build time. Intercept variant stored under `/i` key alongside main segments. At runtime, the correct variant is served based on `ctx.isIntercept`. `when()` conditions are skipped at build time (all intercepts are pre-rendered unconditionally). |
|
|
241
257
|
|
|
242
|
-
When
|
|
258
|
+
When Passthrough revalidation is enabled, remember that revalidation is
|
|
243
259
|
still partial: opting a child segment into revalidation does not
|
|
244
260
|
implicitly re-run outer prerender-derived handlers/layouts.
|
|
245
261
|
|
|
@@ -304,12 +320,19 @@ export const BlogPost = Prerender(
|
|
|
304
320
|
}
|
|
305
321
|
return <PostPage slug={ctx.params.slug} />;
|
|
306
322
|
},
|
|
307
|
-
{ passthrough: true },
|
|
308
323
|
);
|
|
324
|
+
|
|
325
|
+
// Wrap with Passthrough to serve skipped params live at runtime
|
|
326
|
+
export const BlogPost = Passthrough(BlogPostDef, async (ctx) => {
|
|
327
|
+
if (ctx.params.slug === "draft") {
|
|
328
|
+
throw new Skip("Draft articles are not pre-rendered");
|
|
329
|
+
}
|
|
330
|
+
return <PostPage slug={ctx.params.slug} />;
|
|
331
|
+
});
|
|
309
332
|
```
|
|
310
333
|
|
|
311
|
-
Skipped entries are excluded from the build output. With `
|
|
312
|
-
the handler
|
|
334
|
+
Skipped entries are excluded from the build output. With `Passthrough()`,
|
|
335
|
+
the live handler serves skipped params at request time.
|
|
313
336
|
|
|
314
337
|
`Skip` also works in `Static` handlers:
|
|
315
338
|
|
|
@@ -326,7 +349,7 @@ export const TocSidebar = Static(() => {
|
|
|
326
349
|
| Handler outcome | Effect |
|
|
327
350
|
| --------------------------- | ----------------------------------------------------- |
|
|
328
351
|
| JSX / `null` | Normal prerender entry, log OK |
|
|
329
|
-
| `return ctx.passthrough()` | Skip entry, log PASS, continue (
|
|
352
|
+
| `return ctx.passthrough()` | Skip entry, log PASS, continue (Passthrough routes) |
|
|
330
353
|
| `throw new Skip("reason")` | Skip entry, log SKIP, continue with remaining entries |
|
|
331
354
|
| `throw new Error("reason")` | Log FAIL, stop ALL pre-rendering, fail the build |
|
|
332
355
|
|
|
@@ -366,56 +389,59 @@ falls back according to normal dev/runtime behavior.
|
|
|
366
389
|
|
|
367
390
|
## Per-Param Passthrough with ctx.passthrough()
|
|
368
391
|
|
|
369
|
-
On
|
|
370
|
-
to skip writing a local prerender artifact for a specific
|
|
371
|
-
runtime, the missing entry falls through to the live handler.
|
|
392
|
+
On routes wrapped with `Passthrough()`, the build handler can return
|
|
393
|
+
`ctx.passthrough()` to skip writing a local prerender artifact for a specific
|
|
394
|
+
param set. At runtime, the missing entry falls through to the live handler.
|
|
372
395
|
|
|
373
396
|
```typescript
|
|
374
|
-
export const
|
|
397
|
+
export const BlogPostDef = Prerender(
|
|
375
398
|
async () => [{ slug: "a" }, { slug: "b" }, { slug: "c" }],
|
|
376
399
|
async (ctx) => {
|
|
377
400
|
const post = await getPost(ctx.params.slug);
|
|
378
401
|
if (!post) return ctx.passthrough();
|
|
379
402
|
return <article>{post.content}</article>;
|
|
380
403
|
},
|
|
381
|
-
{ passthrough: true },
|
|
382
404
|
);
|
|
405
|
+
|
|
406
|
+
export const BlogPost = Passthrough(BlogPostDef, async (ctx) => {
|
|
407
|
+
const post = await getPost(ctx.params.slug);
|
|
408
|
+
return <article>{post.content}</article>;
|
|
409
|
+
});
|
|
383
410
|
```
|
|
384
411
|
|
|
385
412
|
### Semantics
|
|
386
413
|
|
|
387
|
-
- JSX or `null` from the handler produces a normal prerender entry.
|
|
414
|
+
- JSX or `null` from the build handler produces a normal prerender entry.
|
|
388
415
|
- `ctx.passthrough()` returns a sentinel that signals "no local artifact".
|
|
389
416
|
The build skips the manifest entry for that param set.
|
|
390
|
-
- `ctx.passthrough()` on a
|
|
417
|
+
- `ctx.passthrough()` on a route not wrapped with `Passthrough()` throws.
|
|
391
418
|
- `ctx.passthrough()` at runtime (`ctx.build === false`) also throws.
|
|
392
419
|
It is a build-time-only control flow.
|
|
393
|
-
- `getParams()` still enumerates the param set; the handler decides
|
|
394
|
-
whether to produce an artifact or defer to
|
|
420
|
+
- `getParams()` still enumerates the param set; the build handler decides
|
|
421
|
+
per-param whether to produce an artifact or defer to the live handler.
|
|
395
422
|
|
|
396
423
|
### Difference from Skip
|
|
397
424
|
|
|
398
|
-
| Mechanism | Effect on build | Runtime behavior
|
|
399
|
-
| ------------------- | ---------------------- |
|
|
400
|
-
| `throw new Skip()` | Skips entry, logs SKIP | No artifact, no live fallback unless
|
|
401
|
-
| `ctx.passthrough()` | Skips entry, logs PASS | Always defers to live handler (requires
|
|
425
|
+
| Mechanism | Effect on build | Runtime behavior |
|
|
426
|
+
| ------------------- | ---------------------- | ------------------------------------------------------ |
|
|
427
|
+
| `throw new Skip()` | Skips entry, logs SKIP | No artifact, no live fallback unless Passthrough route |
|
|
428
|
+
| `ctx.passthrough()` | Skips entry, logs PASS | Always defers to live handler (requires Passthrough) |
|
|
402
429
|
|
|
403
|
-
Use `ctx.passthrough()` when you want the handler to run
|
|
430
|
+
Use `ctx.passthrough()` when you want the live handler to run at request time
|
|
404
431
|
for specific params. Use `Skip` when you want to exclude params entirely.
|
|
405
432
|
|
|
406
433
|
### Use case: Remote storage
|
|
407
434
|
|
|
408
435
|
`ctx.passthrough()` enables a pattern where build-time data is stored in a
|
|
409
|
-
remote KV store instead of the local prerender manifest. The handler
|
|
436
|
+
remote KV store instead of the local prerender manifest. The build handler
|
|
410
437
|
pre-computes data during `getParams`, pushes it to KV, then calls
|
|
411
438
|
`ctx.passthrough()` so the local build skips the artifact. At runtime,
|
|
412
|
-
the live handler reads from KV:
|
|
439
|
+
the Passthrough live handler reads from KV:
|
|
413
440
|
|
|
414
441
|
```typescript
|
|
415
|
-
export const
|
|
442
|
+
export const ProductDef = Prerender(
|
|
416
443
|
async () => {
|
|
417
444
|
const products = await db.getFeaturedProducts();
|
|
418
|
-
// Pre-compute and store in remote KV during build
|
|
419
445
|
for (const p of products) {
|
|
420
446
|
await kv.put(`product:${p.id}`, await renderProduct(p));
|
|
421
447
|
}
|
|
@@ -423,14 +449,16 @@ export const Product = Prerender(
|
|
|
423
449
|
},
|
|
424
450
|
async (ctx) => {
|
|
425
451
|
// At build time: skip local artifact, data is in KV
|
|
426
|
-
|
|
427
|
-
// At runtime: read from KV
|
|
428
|
-
const cached = await kv.get(`product:${ctx.params.id}`);
|
|
429
|
-
if (cached) return cached;
|
|
430
|
-
return <Product data={await db.getProduct(ctx.params.id)} />;
|
|
452
|
+
return ctx.passthrough();
|
|
431
453
|
},
|
|
432
|
-
{ passthrough: true },
|
|
433
454
|
);
|
|
455
|
+
|
|
456
|
+
export const Product = Passthrough(ProductDef, async (ctx) => {
|
|
457
|
+
// At runtime: read from KV, fall back to DB
|
|
458
|
+
const cached = await kv.get(`product:${ctx.params.id}`);
|
|
459
|
+
if (cached) return cached;
|
|
460
|
+
return <Product data={await ctx.env.DB.getProduct(ctx.params.id)} />;
|
|
461
|
+
});
|
|
434
462
|
```
|
|
435
463
|
|
|
436
464
|
### Build logs
|
|
@@ -458,8 +486,8 @@ Flight payload. They do not update at request time.
|
|
|
458
486
|
### Server actions work normally
|
|
459
487
|
|
|
460
488
|
Actions do not re-render the B segment. The pre-rendered handler output stays
|
|
461
|
-
frozen. Loaders are live and can be revalidated by actions. With `
|
|
462
|
-
and `revalidate()`, the handler
|
|
489
|
+
frozen. Loaders are live and can be revalidated by actions. With `Passthrough()`
|
|
490
|
+
and `revalidate()`, the live handler can re-render.
|
|
463
491
|
|
|
464
492
|
### Empty getParams
|
|
465
493
|
|
|
@@ -470,21 +498,21 @@ If `getParams` returns an empty array, no Flight payloads are written. No error.
|
|
|
470
498
|
Routes using `Prerender` must have a `name` in path options.
|
|
471
499
|
The name is used as the storage key for Flight payloads.
|
|
472
500
|
|
|
473
|
-
### No revalidate without
|
|
501
|
+
### No revalidate without Passthrough
|
|
474
502
|
|
|
475
|
-
Using `revalidate()`
|
|
503
|
+
Using `revalidate()` without `Passthrough()` produces a build-time warning.
|
|
476
504
|
The handler is evicted -- there is nothing to re-render.
|
|
477
505
|
|
|
478
|
-
### loading() is ignored without
|
|
506
|
+
### loading() is ignored without Passthrough
|
|
479
507
|
|
|
480
508
|
Pre-rendered segments are fully resolved at build time and never suspend.
|
|
481
|
-
With `
|
|
509
|
+
With `Passthrough()`, `loading()` works for live fallback renders.
|
|
482
510
|
|
|
483
511
|
## Complete Example
|
|
484
512
|
|
|
485
513
|
```typescript
|
|
486
514
|
// pages/guides-handler.tsx
|
|
487
|
-
import { Prerender } from "@rangojs/router";
|
|
515
|
+
import { Prerender, Passthrough } from "@rangojs/router";
|
|
488
516
|
import { Link } from "@rangojs/router/client";
|
|
489
517
|
import { href } from "../router.js";
|
|
490
518
|
|
|
@@ -493,7 +521,7 @@ const knownGuides: Record<string, string> = {
|
|
|
493
521
|
caching: "Caching Guide",
|
|
494
522
|
};
|
|
495
523
|
|
|
496
|
-
export const
|
|
524
|
+
export const GuidesDetailDef = Prerender<{ slug: string }>(
|
|
497
525
|
async () => Object.keys(knownGuides).map((slug) => ({ slug })),
|
|
498
526
|
async (ctx) => {
|
|
499
527
|
const title = knownGuides[ctx.params.slug] ?? `Guide: ${ctx.params.slug}`;
|
|
@@ -509,9 +537,23 @@ export const GuidesDetail = Prerender<{ slug: string }>(
|
|
|
509
537
|
</div>
|
|
510
538
|
);
|
|
511
539
|
},
|
|
512
|
-
{ passthrough: true },
|
|
513
540
|
);
|
|
514
541
|
|
|
542
|
+
export const GuidesDetail = Passthrough(GuidesDetailDef, async (ctx) => {
|
|
543
|
+
const title = knownGuides[ctx.params.slug] ?? `Guide: ${ctx.params.slug}`;
|
|
544
|
+
return (
|
|
545
|
+
<div>
|
|
546
|
+
<h1>{title}</h1>
|
|
547
|
+
<p>Slug: {ctx.params.slug}</p>
|
|
548
|
+
<nav>
|
|
549
|
+
<Link to={href("guides.detail", { slug: "routing" })}>Routing</Link>
|
|
550
|
+
{" | "}
|
|
551
|
+
<Link to={href("guides.detail", { slug: "dynamic-test" })}>Dynamic</Link>
|
|
552
|
+
</nav>
|
|
553
|
+
</div>
|
|
554
|
+
);
|
|
555
|
+
});
|
|
556
|
+
|
|
515
557
|
// pages/guides.tsx
|
|
516
558
|
import { urls } from "@rangojs/router";
|
|
517
559
|
import { GuidesDetail } from "./guides-handler.js";
|
|
@@ -588,12 +630,12 @@ Loaders run fresh at request time for both variants.
|
|
|
588
630
|
Pre-rendered routes set flags on the route trie leaf at build time:
|
|
589
631
|
|
|
590
632
|
- `pr: true` -- route has pre-rendered B segment data
|
|
591
|
-
- `pt: true` --
|
|
633
|
+
- `pt: true` -- route wrapped with `Passthrough()` (live handler available)
|
|
592
634
|
|
|
593
635
|
At runtime, the cache-lookup middleware uses these flags:
|
|
594
636
|
|
|
595
637
|
- `pr + hit` -- serve pre-rendered Flight payload
|
|
596
|
-
- `pr + pt + miss` -- fall through to live handler
|
|
638
|
+
- `pr + pt + miss` -- fall through to Passthrough live handler
|
|
597
639
|
- `pr + miss` (no pt) -- fall through (handler stubbed, no live render)
|
|
598
640
|
|
|
599
641
|
## Contributor Checklist
|
|
@@ -603,7 +645,7 @@ Before changing prerender behavior, read these docs and run these tests.
|
|
|
603
645
|
### Docs to re-read
|
|
604
646
|
|
|
605
647
|
- [Prerender API design](../../docs/prerender-api-design.md) -- canonical
|
|
606
|
-
architecture: build-time flow, runtime flow, storage,
|
|
648
|
+
architecture: build-time flow, runtime flow, storage, Passthrough, intercept
|
|
607
649
|
- [Execution model](../../docs/internal/execution-model.md) -- handler-first
|
|
608
650
|
ordering, middleware scope, context visibility rules
|
|
609
651
|
- [Semantic change checklist](../../docs/internal/semantic-change-checklist.md)
|
|
@@ -612,7 +654,7 @@ Before changing prerender behavior, read these docs and run these tests.
|
|
|
612
654
|
### Tests to run
|
|
613
655
|
|
|
614
656
|
```bash
|
|
615
|
-
# Core prerender e2e (
|
|
657
|
+
# Core prerender e2e (Passthrough, eviction, loaders, sub-use, intercept)
|
|
616
658
|
pnpm --filter @rangojs/router exec playwright test prerender
|
|
617
659
|
|
|
618
660
|
# Prerender-specific unit test
|
|
@@ -632,7 +674,7 @@ pnpm --filter @rangojs/router exec playwright test handler-first
|
|
|
632
674
|
`/__rsc_prerender` endpoint tests and node.js dev-server fallback.
|
|
633
675
|
- Log-based assertions (build output lines, debug cache logs) are inherently
|
|
634
676
|
dev/build-only and do not need a production counterpart.
|
|
635
|
-
- Behavioral assertions (rendered content, loader freshness,
|
|
677
|
+
- Behavioral assertions (rendered content, loader freshness, Passthrough
|
|
636
678
|
fallback, intercept variant selection) must work in the production build.
|
|
637
679
|
|
|
638
680
|
## Maintenance References
|
package/skills/rango/SKILL.md
CHANGED
|
@@ -10,28 +10,32 @@ Django-inspired RSC router with composable URL patterns, type-safe href, and ser
|
|
|
10
10
|
|
|
11
11
|
## Skills
|
|
12
12
|
|
|
13
|
-
| Skill
|
|
14
|
-
|
|
|
15
|
-
| `/router-setup`
|
|
16
|
-
| `/route`
|
|
17
|
-
| `/layout`
|
|
18
|
-
| `/loader`
|
|
19
|
-
| `/
|
|
20
|
-
| `/
|
|
21
|
-
| `/
|
|
22
|
-
| `/
|
|
23
|
-
| `/
|
|
24
|
-
| `/
|
|
25
|
-
| `/
|
|
26
|
-
| `/
|
|
27
|
-
| `/
|
|
28
|
-
| `/
|
|
29
|
-
| `/
|
|
30
|
-
| `/
|
|
31
|
-
| `/
|
|
32
|
-
| `/
|
|
33
|
-
| `/
|
|
34
|
-
| `/
|
|
13
|
+
| Skill | Description |
|
|
14
|
+
| ----------------------- | -------------------------------------------------------------------------- |
|
|
15
|
+
| `/router-setup` | Create and configure the RSC router |
|
|
16
|
+
| `/route` | Define routes with `urls()` and `path()` |
|
|
17
|
+
| `/layout` | Layouts that wrap child routes |
|
|
18
|
+
| `/loader` | Data loaders with `createLoader()` |
|
|
19
|
+
| `/server-actions` | Mutations with `"use server"`, useActionState, validation, revalidation |
|
|
20
|
+
| `/i18n` | Locale routing with `:locale?`, resolution chains, react-intl integration |
|
|
21
|
+
| `/middleware` | Request processing and authentication |
|
|
22
|
+
| `/intercept` | Modal/slide-over patterns for soft navigation |
|
|
23
|
+
| `/parallel` | Multi-column layouts and sidebars |
|
|
24
|
+
| `/caching` | Segment caching with memory or KV stores |
|
|
25
|
+
| `/use-cache` | Function-level caching with `"use cache"` directive |
|
|
26
|
+
| `/cache-guide` | When to use `cache()` vs `"use cache"` — differences and decision guide |
|
|
27
|
+
| `/document-cache` | Edge caching with Cache-Control headers |
|
|
28
|
+
| `/theme` | Light/dark mode with FOUC prevention |
|
|
29
|
+
| `/links` | URL generation: ctx.reverse, href, useHref, useMount, scopedReverse |
|
|
30
|
+
| `/hooks` | Client-side React hooks |
|
|
31
|
+
| `/typesafety` | Type-safe routes, params, href, and environment |
|
|
32
|
+
| `/host-router` | Multi-app host routing with domain/subdomain patterns |
|
|
33
|
+
| `/tailwind` | Set up Tailwind CSS v4 with `?url` imports |
|
|
34
|
+
| `/response-routes` | JSON/text/HTML/XML/stream endpoints with `path.json()`, `path.text()` |
|
|
35
|
+
| `/mime-routes` | Content negotiation — same URL, different response types via Accept header |
|
|
36
|
+
| `/fonts` | Load web fonts with preload hints |
|
|
37
|
+
| `/migrate-nextjs` | Migrate a Next.js App Router project to Rango |
|
|
38
|
+
| `/migrate-react-router` | Migrate a React Router / Remix project to Rango |
|
|
35
39
|
|
|
36
40
|
## Quick Start
|
|
37
41
|
|
|
@@ -400,6 +400,14 @@ path(
|
|
|
400
400
|
Multiple response types can share the same URL pattern. See `/mime-routes` for the
|
|
401
401
|
full content negotiation API (Accept header matching, Vary: Accept, multi-variant routes).
|
|
402
402
|
|
|
403
|
+
## Long-Lived Responses (SSE / WebSocket)
|
|
404
|
+
|
|
405
|
+
For Server-Sent Events (`path.stream`) and WebSocket upgrades (`path.any`
|
|
406
|
+
returning a 101 / `webSocket` Response), see `/streams-and-websockets`.
|
|
407
|
+
Upgrade responses flow through without reconstruction; `Vary` and
|
|
408
|
+
`Server-Timing` are skipped, and stub headers are applied in place on a
|
|
409
|
+
best-effort basis.
|
|
410
|
+
|
|
403
411
|
## How It Works
|
|
404
412
|
|
|
405
413
|
1. `path.json()` tags the route at the trie level with a MIME type
|
package/skills/route/SKILL.md
CHANGED
|
@@ -33,6 +33,26 @@ urls(({ path }) => [
|
|
|
33
33
|
]);
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
### Optional URL params at runtime
|
|
37
|
+
|
|
38
|
+
Absent optional params are **omitted from `ctx.params`** — `ctx.params.<name>`
|
|
39
|
+
reads as `undefined`, matching the `RouteParams<"name">` type
|
|
40
|
+
(`{ query?: string }`). Use `??` to default and `=== undefined` to check
|
|
41
|
+
absence:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
path("/search/:query?", (ctx) => {
|
|
45
|
+
const query = ctx.params.query ?? ""; // works — undefined coalesces
|
|
46
|
+
if (ctx.params.query === undefined) return <EmptySearch />;
|
|
47
|
+
return <Results query={ctx.params.query} />;
|
|
48
|
+
}, { name: "search" });
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
For the common pattern of an optional locale prefix
|
|
52
|
+
(`include("/:locale?", routes)`) and the wider react-intl integration —
|
|
53
|
+
locale detection, fallback chains, URL generation with absent locale —
|
|
54
|
+
see `/i18n`.
|
|
55
|
+
|
|
36
56
|
## Route Handler Patterns
|
|
37
57
|
|
|
38
58
|
### Component Function
|
|
@@ -181,6 +201,37 @@ String keys still work (`ctx.set("key", value)` / `ctx.get("key")`), but
|
|
|
181
201
|
Only route handlers and middleware can call `ctx.set()`. Layouts, parallels,
|
|
182
202
|
and intercepts can only read via `ctx.get()`.
|
|
183
203
|
|
|
204
|
+
#### Non-cacheable context variables
|
|
205
|
+
|
|
206
|
+
Mark a var as non-cacheable when it holds inherently request-specific data
|
|
207
|
+
(sessions, auth tokens, per-request IDs). There are two ways:
|
|
208
|
+
|
|
209
|
+
```typescript
|
|
210
|
+
// Var-level: every value written to this var is non-cacheable
|
|
211
|
+
const Session = createVar<SessionData>({ cache: false });
|
|
212
|
+
|
|
213
|
+
// Write-level: escalate a normally-cacheable var for this specific write
|
|
214
|
+
const Theme = createVar<string>();
|
|
215
|
+
ctx.set(Theme, userTheme, { cache: false });
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
"Least cacheable wins" — if either the var definition or the write site says
|
|
219
|
+
`cache: false`, the value is non-cacheable.
|
|
220
|
+
|
|
221
|
+
Reading a non-cacheable var inside `cache()` or `"use cache"` throws at
|
|
222
|
+
runtime. This prevents request-specific data from leaking into cached output:
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
// This throws — Session is non-cacheable
|
|
226
|
+
async function CachedWidget(ctx) {
|
|
227
|
+
"use cache";
|
|
228
|
+
const session = ctx.get(Session); // Error: non-cacheable var read inside cache scope
|
|
229
|
+
return <Widget />;
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Cacheable vars (the default) can be read freely inside cache scopes.
|
|
234
|
+
|
|
184
235
|
### Revalidation Contracts for Handler Data
|
|
185
236
|
|
|
186
237
|
Handler-first guarantees apply within a single full render pass. For partial
|
|
@@ -352,6 +403,34 @@ urls(({ path, layout }) => [
|
|
|
352
403
|
])
|
|
353
404
|
```
|
|
354
405
|
|
|
406
|
+
## View Transitions
|
|
407
|
+
|
|
408
|
+
A route can configure its own `transition()` — the wrap goes around the route's component itself (routes are leaves; they have no separate default outlet channel). If the route component renders a `<ParallelOutlet />` directly, that slot remains inside the route's VT subtree, so prefer mounting parallel slots in a layout when combining intercept modals with route-level transitions. See [skills/view-transitions](../view-transitions/SKILL.md) for examples and the wrap-location rules across layouts, routes, and slots.
|
|
409
|
+
|
|
410
|
+
## Handler-attached `.use`
|
|
411
|
+
|
|
412
|
+
Page handlers can carry their own loader, middleware, error boundaries, parallels, and other defaults via a `.use` callback — so the page is self-contained and reusable across mount sites without re-wiring the same items.
|
|
413
|
+
|
|
414
|
+
```typescript
|
|
415
|
+
const ProductPage: Handler<"/product/:slug"> = async (ctx) => {
|
|
416
|
+
const product = await ctx.use(ProductLoader);
|
|
417
|
+
return <ProductView product={product} />;
|
|
418
|
+
};
|
|
419
|
+
ProductPage.use = () => [
|
|
420
|
+
loader(ProductLoader),
|
|
421
|
+
loading(<ProductSkeleton />),
|
|
422
|
+
middleware(async (ctx, next) => {
|
|
423
|
+
await next();
|
|
424
|
+
ctx.header("Cache-Control", "private, max-age=60");
|
|
425
|
+
}),
|
|
426
|
+
];
|
|
427
|
+
|
|
428
|
+
// Mount site has no per-page wiring — defaults travel with the handler.
|
|
429
|
+
path("/product/:slug", ProductPage, { name: "product" });
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
Explicit `use()` at the mount site merges with `handler.use` (handler defaults first, explicit second). See [skills/handler-use](../handler-use/SKILL.md) for the merge order, allowed item types per mount site, and override semantics.
|
|
433
|
+
|
|
355
434
|
## Complete Example
|
|
356
435
|
|
|
357
436
|
```typescript
|