@rangojs/router 0.27.0 → 0.28.0

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.
Files changed (212) hide show
  1. package/dist/bin/rango.js +1 -1
  2. package/dist/types/__internal.d.ts +7 -1
  3. package/dist/types/browser/event-controller.d.ts +2 -1
  4. package/dist/types/browser/history-state.d.ts +3 -9
  5. package/dist/types/browser/navigation-store.d.ts +8 -6
  6. package/dist/types/browser/react/filter-segment-order.d.ts +2 -2
  7. package/dist/types/browser/segment-reconciler.d.ts +6 -4
  8. package/dist/types/browser/types.d.ts +2 -1
  9. package/dist/types/browser/wire-protocol.d.ts +25 -0
  10. package/dist/types/cache/cache-key-utils.d.ts +11 -5
  11. package/dist/types/cache/cache-scope.d.ts +34 -22
  12. package/dist/types/cache/cf/cf-cache-constants.d.ts +2 -2
  13. package/dist/types/cache/cf/cf-cache-store.d.ts +47 -65
  14. package/dist/types/cache/cf/cf-kv-utils.d.ts +1 -1
  15. package/dist/types/cache/handle-snapshot.d.ts +9 -4
  16. package/dist/types/cache/segment-codec.d.ts +14 -0
  17. package/dist/types/cache/shell-snapshot.d.ts +1 -1
  18. package/dist/types/cache/tag-invalidation.d.ts +10 -0
  19. package/dist/types/cache/taint.d.ts +5 -3
  20. package/dist/types/cache/types.d.ts +7 -3
  21. package/dist/types/cache/vercel/vercel-cache-store.d.ts +8 -6
  22. package/dist/types/prefetch-markers.d.ts +5 -14
  23. package/dist/types/prerender/store.d.ts +31 -0
  24. package/dist/types/prerender/warm-request.d.ts +3 -3
  25. package/dist/types/prerender.d.ts +2 -2
  26. package/dist/types/route-name.d.ts +5 -0
  27. package/dist/types/router/error-handling.d.ts +4 -4
  28. package/dist/types/router/instrument.d.ts +4 -3
  29. package/dist/types/router/intercept-resolution.d.ts +25 -9
  30. package/dist/types/router/match-context.d.ts +4 -11
  31. package/dist/types/router/match-handlers.d.ts +2 -6
  32. package/dist/types/router/match-middleware/background-revalidation.d.ts +10 -20
  33. package/dist/types/router/match-middleware/cache-lookup.d.ts +34 -86
  34. package/dist/types/router/match-middleware/segment-resolution.d.ts +8 -6
  35. package/dist/types/router/prerender-match.d.ts +21 -6
  36. package/dist/types/router/preview-match.d.ts +2 -7
  37. package/dist/types/router/request-classification.d.ts +5 -0
  38. package/dist/types/router/router-context.d.ts +7 -46
  39. package/dist/types/router/router-interfaces.d.ts +8 -14
  40. package/dist/types/router/segment-resolution/loader-cache.d.ts +3 -3
  41. package/dist/types/router/segment-resolution/loader-mask.d.ts +4 -4
  42. package/dist/types/router/segment-resolution/prefetch-deferral.d.ts +20 -18
  43. package/dist/types/router/segment-resolution/resolution-pass.d.ts +93 -0
  44. package/dist/types/router/segment-resolution/revalidation.d.ts +82 -31
  45. package/dist/types/router/segment-resolution.d.ts +1 -2
  46. package/dist/types/router/segment-wrappers.d.ts +11 -48
  47. package/dist/types/router/telemetry.d.ts +2 -0
  48. package/dist/types/router/types.d.ts +10 -0
  49. package/dist/types/rsc/full-payload.d.ts +2 -2
  50. package/dist/types/rsc/handler-context.d.ts +6 -6
  51. package/dist/types/rsc/json-route-result.d.ts +5 -9
  52. package/dist/types/rsc/request-stages.d.ts +203 -0
  53. package/dist/types/rsc/response-cache-serve.d.ts +7 -12
  54. package/dist/types/rsc/response-route-handler.d.ts +2 -2
  55. package/dist/types/rsc/routine-plan.d.ts +1 -1
  56. package/dist/types/rsc/server-action.d.ts +2 -2
  57. package/dist/types/rsc/shell-capture-constants.d.ts +1 -1
  58. package/dist/types/rsc/shell-capture.d.ts +132 -15
  59. package/dist/types/rsc/shell-serve.d.ts +37 -12
  60. package/dist/types/server/context.d.ts +9 -8
  61. package/dist/types/server/handle-store.d.ts +16 -0
  62. package/dist/types/server/render-pass.d.ts +72 -0
  63. package/dist/types/server/request-context.d.ts +24 -104
  64. package/dist/types/server/rewrite-trail.d.ts +2 -2
  65. package/dist/types/testing/dispatch.d.ts +35 -18
  66. package/dist/types/types/cache-types.d.ts +6 -3
  67. package/dist/types/types/error-types.d.ts +9 -1
  68. package/dist/types/types/handler-context.d.ts +9 -1
  69. package/dist/types/types/segments.d.ts +1 -1
  70. package/dist/types/vite/discovery/build-discovery-phase.d.ts +40 -0
  71. package/dist/types/vite/discovery/build-env.d.ts +22 -0
  72. package/dist/types/vite/discovery/bundle-scan-phase.d.ts +12 -0
  73. package/dist/types/vite/discovery/dev-prerender-cache.d.ts +3 -2
  74. package/dist/types/vite/discovery/dev-server-phase.d.ts +26 -0
  75. package/dist/types/vite/discovery/discovery-errors.d.ts +1 -1
  76. package/dist/types/vite/discovery/state.d.ts +12 -0
  77. package/dist/types/vite/plugins/version-plugin.d.ts +1 -1
  78. package/dist/types/vite/plugins/virtual-entries.d.ts +1 -1
  79. package/dist/types/vite/router-discovery.d.ts +8 -47
  80. package/dist/types/vite/temp-rsc-server.d.ts +39 -0
  81. package/dist/types/vite/utils/prerender-utils.d.ts +9 -0
  82. package/dist/types/wire-params.d.ts +34 -0
  83. package/dist/vite/index.js +3809 -3710
  84. package/package.json +1 -1
  85. package/skills/cache-guide/SKILL.md +8 -5
  86. package/skills/caching/SKILL.md +37 -18
  87. package/skills/document-cache/SKILL.md +13 -1
  88. package/skills/handler-use/SKILL.md +1 -1
  89. package/skills/intercept/SKILL.md +17 -7
  90. package/skills/middleware/SKILL.md +18 -0
  91. package/skills/ppr/SKILL.md +18 -3
  92. package/skills/prerender/SKILL.md +39 -15
  93. package/skills/rango/SKILL.md +5 -1
  94. package/skills/server-actions/SKILL.md +8 -1
  95. package/skills/testing/response-routes.md +6 -4
  96. package/skills/use-cache/SKILL.md +46 -8
  97. package/src/__internal.ts +7 -1
  98. package/src/browser/connection-warmup.ts +3 -1
  99. package/src/browser/event-controller.ts +5 -3
  100. package/src/browser/history-state.ts +6 -12
  101. package/src/browser/navigation-bridge.ts +14 -13
  102. package/src/browser/navigation-client.ts +18 -25
  103. package/src/browser/navigation-store.ts +25 -27
  104. package/src/browser/navigation-transaction.ts +4 -1
  105. package/src/browser/prefetch/cache.ts +2 -1
  106. package/src/browser/prefetch/fetch.ts +8 -16
  107. package/src/browser/prefetch/queue.ts +4 -4
  108. package/src/browser/react/NavigationProvider.tsx +2 -1
  109. package/src/browser/react/filter-segment-order.ts +2 -2
  110. package/src/browser/rsc-router.tsx +1 -0
  111. package/src/browser/segment-reconciler.ts +66 -53
  112. package/src/browser/server-action-bridge.ts +50 -57
  113. package/src/browser/types.ts +2 -1
  114. package/src/browser/wire-protocol.ts +41 -0
  115. package/src/cache/cache-key-utils.ts +11 -5
  116. package/src/cache/cache-runtime.ts +110 -50
  117. package/src/cache/cache-scope.ts +110 -64
  118. package/src/cache/cf/cf-cache-constants.ts +2 -2
  119. package/src/cache/cf/cf-cache-store.ts +486 -874
  120. package/src/cache/cf/cf-kv-utils.ts +1 -1
  121. package/src/cache/document-cache.ts +34 -13
  122. package/src/cache/handle-snapshot.ts +19 -7
  123. package/src/cache/segment-codec.ts +55 -0
  124. package/src/cache/shell-snapshot.ts +2 -2
  125. package/src/cache/tag-invalidation.ts +21 -2
  126. package/src/cache/taint.ts +5 -3
  127. package/src/cache/types.ts +7 -3
  128. package/src/cache/vercel/vercel-cache-store.ts +243 -310
  129. package/src/handles/pushed-by.ts +1 -1
  130. package/src/prefetch-markers.ts +5 -16
  131. package/src/prerender/store.ts +76 -0
  132. package/src/prerender/warm-request.ts +8 -4
  133. package/src/prerender.ts +2 -2
  134. package/src/route-name.ts +8 -0
  135. package/src/router/error-handling.ts +4 -4
  136. package/src/router/instrument.ts +4 -3
  137. package/src/router/intercept-resolution.ts +77 -75
  138. package/src/router/loader-resolution.ts +5 -4
  139. package/src/router/match-api.ts +4 -5
  140. package/src/router/match-context.ts +20 -12
  141. package/src/router/match-handlers.ts +8 -20
  142. package/src/router/match-middleware/background-revalidation.ts +41 -53
  143. package/src/router/match-middleware/cache-lookup.ts +675 -726
  144. package/src/router/match-middleware/cache-store.ts +4 -8
  145. package/src/router/match-middleware/intercept-resolution.ts +3 -23
  146. package/src/router/match-middleware/segment-resolution.ts +34 -61
  147. package/src/router/middleware.ts +69 -11
  148. package/src/router/navigation-snapshot.ts +4 -4
  149. package/src/router/prerender-match.ts +100 -44
  150. package/src/router/preview-match.ts +6 -41
  151. package/src/router/request-classification.ts +13 -7
  152. package/src/router/route-snapshot.ts +2 -5
  153. package/src/router/router-context.ts +10 -95
  154. package/src/router/router-interfaces.ts +8 -14
  155. package/src/router/segment-resolution/loader-cache.ts +14 -9
  156. package/src/router/segment-resolution/loader-mask.ts +5 -5
  157. package/src/router/segment-resolution/prefetch-deferral.ts +30 -27
  158. package/src/router/segment-resolution/resolution-pass.ts +137 -0
  159. package/src/router/segment-resolution/revalidation.ts +897 -776
  160. package/src/router/segment-resolution.ts +4 -13
  161. package/src/router/segment-wrappers.ts +51 -269
  162. package/src/router/telemetry.ts +5 -0
  163. package/src/router/types.ts +10 -0
  164. package/src/router.ts +12 -13
  165. package/src/rsc/full-payload.ts +6 -5
  166. package/src/rsc/handler-context.ts +8 -14
  167. package/src/rsc/handler.ts +126 -507
  168. package/src/rsc/json-route-result.ts +5 -9
  169. package/src/rsc/loader-fetch.ts +6 -5
  170. package/src/rsc/progressive-enhancement.ts +5 -0
  171. package/src/rsc/request-stages.ts +757 -0
  172. package/src/rsc/response-cache-serve.ts +10 -14
  173. package/src/rsc/response-route-handler.ts +13 -5
  174. package/src/rsc/rewrite-passes.ts +2 -1
  175. package/src/rsc/routine-plan.ts +1 -1
  176. package/src/rsc/rsc-rendering.ts +164 -349
  177. package/src/rsc/server-action.ts +87 -113
  178. package/src/rsc/shell-capture-constants.ts +1 -1
  179. package/src/rsc/shell-capture.ts +212 -169
  180. package/src/rsc/shell-serve.ts +121 -18
  181. package/src/rsc/ssr-setup.ts +5 -4
  182. package/src/segment-system.tsx +3 -3
  183. package/src/server/context.ts +22 -25
  184. package/src/server/handle-store.ts +55 -0
  185. package/src/server/render-pass.ts +291 -0
  186. package/src/server/request-context.ts +26 -115
  187. package/src/server/rewrite-trail.ts +6 -4
  188. package/src/ssr/index.tsx +1 -1
  189. package/src/testing/dispatch.ts +223 -710
  190. package/src/testing/e2e/page-helpers.ts +2 -2
  191. package/src/testing/serve-shell-request.ts +23 -36
  192. package/src/types/cache-types.ts +6 -3
  193. package/src/types/error-types.ts +9 -1
  194. package/src/types/handler-context.ts +12 -1
  195. package/src/types/segments.ts +1 -1
  196. package/src/vite/discovery/build-discovery-phase.ts +204 -0
  197. package/src/vite/discovery/build-env.ts +148 -0
  198. package/src/vite/discovery/bundle-scan-phase.ts +128 -0
  199. package/src/vite/discovery/dev-prerender-cache.ts +8 -3
  200. package/src/vite/discovery/dev-server-phase.ts +1776 -0
  201. package/src/vite/discovery/discover-routers.ts +1 -1
  202. package/src/vite/discovery/discovery-errors.ts +1 -1
  203. package/src/vite/discovery/prerender-collection.ts +24 -39
  204. package/src/vite/discovery/state.ts +15 -0
  205. package/src/vite/plugins/version-plugin.ts +1 -1
  206. package/src/vite/plugins/virtual-entries.ts +1 -1
  207. package/src/vite/router-discovery.ts +29 -2428
  208. package/src/vite/temp-rsc-server.ts +223 -0
  209. package/src/vite/utils/prerender-utils.ts +47 -0
  210. package/src/wire-params.ts +35 -0
  211. package/dist/types/router/segment-resolution/fresh.d.ts +0 -72
  212. package/src/router/segment-resolution/fresh.ts +0 -945
@@ -1,22 +1,17 @@
1
- import type { EntryData } from "../server/context";
2
1
  import type { RouteMatchResult } from "./pattern-matching.js";
3
2
  import type { MiddlewareFn } from "./middleware.js";
4
3
  export interface PreviewMatchDeps<TEnv = any> {
5
4
  findMatch: (pathname: string) => RouteMatchResult<TEnv> | null | Promise<RouteMatchResult<TEnv> | null>;
6
5
  }
7
6
  /**
8
- * Preview match - returns route middleware without segment resolution.
9
- * Also returns responseType and handler for response routes (non-RSC short-circuit).
7
+ * Preview match - returns the route, its params and route middleware without
8
+ * segment resolution (a content-negotiated variant's, when one wins).
10
9
  */
11
10
  export declare function previewMatch<TEnv = any>(request: Request, _context: TEnv, deps: PreviewMatchDeps<TEnv>): Promise<{
12
11
  routeMiddleware?: Array<{
13
12
  handler: MiddlewareFn;
14
13
  params: Record<string, string>;
15
14
  }>;
16
- responseType?: string;
17
- handler?: Function;
18
15
  params?: Record<string, string>;
19
- negotiated?: boolean;
20
- manifestEntry?: EntryData;
21
16
  routeKey?: string;
22
17
  } | null>;
@@ -61,6 +61,11 @@ interface FullRenderPlan<TEnv = any> {
61
61
  mode: "full-render";
62
62
  route: RouteSnapshot<TEnv>;
63
63
  negotiated: boolean;
64
+ /**
65
+ * No route matched: the render path renders the 404 (match() re-throws
66
+ * RouteNotFoundError). Set by rsc/request-stages.ts classify.
67
+ */
68
+ unmatched?: true;
64
69
  }
65
70
  interface PartialRenderPlan<TEnv = any> {
66
71
  mode: "partial-render";
@@ -3,26 +3,9 @@ import type { EntryData, InterceptEntry, InterceptSelectorContext, MetricsStore
3
3
  import type { HandlerContext, ResolvedSegment, ShouldRevalidateFn } from "../types.js";
4
4
  import type { RouteMatchResult } from "./pattern-matching.js";
5
5
  import type { TelemetrySink } from "./telemetry.js";
6
- import type { ResolveSegmentOptions } from "./segment-resolution.js";
7
6
  import type { EvaluateRevalidationOptions } from "./revalidation.js";
8
- /**
9
- * Revalidation context passed to segment resolution
10
- */
11
- export interface RevalidationContext {
12
- clientSegmentIds: ReadonlySet<string>;
13
- prevParams: Record<string, string>;
14
- request: Request;
15
- prevUrl: URL;
16
- nextUrl: URL;
17
- routeKey: string;
18
- actionContext?: {
19
- actionId?: string;
20
- actionUrl?: URL;
21
- actionResult?: any;
22
- formData?: FormData;
23
- };
24
- stale?: boolean;
25
- }
7
+ import type { ResolutionPassInput } from "./segment-resolution/resolution-pass.js";
8
+ import type { RevalidatingWalkOptions } from "./segment-resolution/revalidation.js";
26
9
  /**
27
10
  * Result from intercept lookup
28
11
  */
@@ -51,43 +34,21 @@ export interface RouterContext<TEnv = any> {
51
34
  getMetricsStore: () => MetricsStore | undefined;
52
35
  createCacheScope: (cacheConfig: any, parent: CacheScope | null) => CacheScope | null;
53
36
  findInterceptForRoute: (routeKey: string, parentEntry: EntryData | null, selectorContext: InterceptSelectorContext, isAction: boolean) => InterceptResult | null;
54
- resolveAllSegmentsWithRevalidation: (entries: EntryData[], routeKey: string, params: Record<string, string>, handlerContext: HandlerContext<any, TEnv>, clientSegmentSet: Set<string>, prevParams: Record<string, string>, request: Request, prevUrl: URL, nextUrl: URL, actionContext: any | undefined, interceptResult: InterceptResult | null, localRouteName: string, pathname: string, stale?: boolean,
55
- /** The matched route's full chain when `entries` is part of it (ResolveSegmentOptions.chain). */
56
- chain?: readonly EntryData[]) => Promise<{
37
+ /** The segment walker; a full match passes freshPassInput (FRESH). */
38
+ resolveAllSegments: (pass: ResolutionPassInput<TEnv>, entries: EntryData[], walk: RevalidatingWalkOptions) => Promise<{
57
39
  segments: ResolvedSegment[];
58
40
  matchedIds: string[];
59
41
  }>;
60
- resolveAllSegmentsWithRevalidationGenerator?: (entries: EntryData[], routeKey: string, params: Record<string, string>, handlerContext: HandlerContext<any, TEnv>, clientSegmentSet: Set<string>, prevParams: Record<string, string>, request: Request, prevUrl: URL, nextUrl: URL, loaderPromises: Map<string, Promise<any>>, actionContext?: any) => AsyncGenerator<ResolvedSegment | {
61
- __type: "id";
62
- id: string;
63
- }>;
64
- resolveInterceptEntry: (intercept: InterceptEntry, entry: EntryData, params: Record<string, string>, handlerContext: HandlerContext<any, TEnv>, belongsToRoute: boolean, revalidationContext?: RevalidationContext, options?: {
42
+ resolveInterceptEntry: (pass: ResolutionPassInput<TEnv>, intercept: InterceptEntry, entry: EntryData, belongsToRoute: boolean, options?: {
65
43
  background?: boolean;
66
44
  }) => Promise<ResolvedSegment[]>;
67
- collectWithMarkers?: <T>(gen: AsyncGenerator<T | {
68
- __type: "id";
69
- id: string;
70
- }>) => Promise<{
71
- items: T[];
72
- matchedIds: string[];
73
- }>;
74
45
  evaluateRevalidation: (params: EvaluateRevalidationOptions<TEnv>) => Promise<boolean>;
75
46
  getRequestContext: () => {
76
47
  waitUntil: (fn: () => Promise<void>) => void;
77
48
  _handleStore?: any;
78
49
  } | undefined;
79
- resolveAllSegments: (entries: EntryData[], routeKey: string, params: Record<string, string>, handlerContext: HandlerContext<any, TEnv>, loaderPromises: Map<string, Promise<any>>, options?: ResolveSegmentOptions) => Promise<ResolvedSegment[]>;
80
- resolveAllSegmentsGenerator?: (entries: EntryData[], routeKey: string, params: Record<string, string>, handlerContext: HandlerContext<any, TEnv>, loaderPromises: Map<string, Promise<any>>) => AsyncGenerator<ResolvedSegment | {
81
- __type: "id";
82
- id: string;
83
- }>;
84
- collectSegmentsFromGenerator?: <T>(gen: AsyncGenerator<T | {
85
- __type: "id";
86
- id: string;
87
- }>) => Promise<T[]>;
88
50
  createHandleStore: () => any;
89
- resolveLoadersOnly?: (entries: EntryData[], handlerContext: HandlerContext<any, TEnv>) => Promise<ResolvedSegment[]>;
90
- resolveLoadersOnlyWithRevalidation?: (entries: EntryData[], handlerContext: HandlerContext<any, TEnv>, clientSegmentSet: Set<string>, prevParams: Record<string, string>, request: Request, prevUrl: URL, nextUrl: URL, routeKey: string, actionContext?: any, stale?: boolean) => Promise<{
51
+ resolveLoadersOnly?: (pass: ResolutionPassInput<TEnv>, entries: EntryData[], walk?: Pick<RevalidatingWalkOptions, "interceptResult">) => Promise<{
91
52
  segments: ResolvedSegment[];
92
53
  matchedIds: string[];
93
54
  }>;
@@ -96,7 +57,7 @@ export interface RouterContext<TEnv = any> {
96
57
  }>;
97
58
  telemetry?: TelemetrySink;
98
59
  requestId?: string;
99
- resolveInterceptLoadersOnly?: (intercept: InterceptEntry, entry: EntryData, handlerContext: HandlerContext<any, TEnv>, belongsToRoute: boolean, revalidationContext: RevalidationContext) => Promise<ResolvedSegment[]>;
60
+ resolveInterceptLoadersOnly?: (pass: ResolutionPassInput<TEnv>, intercept: InterceptEntry, entry: EntryData, belongsToRoute: boolean) => Promise<ResolvedSegment[]>;
100
61
  }
101
62
  /**
102
63
  * Get router dependencies from AsyncLocalStorage context
@@ -4,7 +4,6 @@ import type { ReverseFunction } from "../reverse.js";
4
4
  import type { UrlPatterns } from "../urls.js";
5
5
  import type { ClientUrlPatterns } from "../client-urls/types.js";
6
6
  import type { UrlBuilder, EnvCompatible } from "../urls/pattern-types.js";
7
- import type { EntryData } from "../server/context";
8
7
  import type { ErrorInfo, MatchResult } from "../types";
9
8
  import type { NonceProvider } from "../rsc/types.js";
10
9
  import type { ShellCaptureDebug } from "../rsc/shell-capture.js";
@@ -12,6 +11,7 @@ import type { ExecutionContext } from "../server/request-context.js";
12
11
  import type { SerializedSegmentData } from "../cache/types.js";
13
12
  import type { MiddlewareEntry, MiddlewareFn } from "./middleware.js";
14
13
  import type { RouteMatchResult } from "./pattern-matching.js";
14
+ import type { LiveIntercept } from "./prerender-match.js";
15
15
  import type { ExtractParams } from "../types/route-config.js";
16
16
  import { RSC_ROUTER_BRAND } from "./router-registry.js";
17
17
  import type { RangoOptions, RootLayoutProps } from "./router-options.js";
@@ -19,6 +19,7 @@ import type { DefaultVars } from "../types/global-namespace.js";
19
19
  import type { ResolvedTimeouts, OnTimeoutCallback } from "./timeout.js";
20
20
  import type { ResolvedTracing } from "./tracing.js";
21
21
  import type { TelemetrySink } from "./telemetry.js";
22
+ import type { ActionContext } from "./types.js";
22
23
  /**
23
24
  * Options passed to router.fetch(), router.match(), and other request entrypoints.
24
25
  * All entrypoints use this same shape for consistency.
@@ -425,8 +426,10 @@ export interface RangoInternal<TEnv = any, TRoutes extends Record<string, unknow
425
426
  routeName: string;
426
427
  params: Record<string, string>;
427
428
  interceptSegments?: SerializedSegmentData[];
428
- /** RSC-encoded MERGED (main + intercept) handle map for the intercept artifact. */
429
+ /** RSC-encoded handle map for the intercept artifact (see matchForPrerender). */
429
430
  interceptHandles?: string;
431
+ /** The intercepts the intercept artifact does not hold (see matchForPrerender). */
432
+ liveIntercepts?: LiveIntercept[];
430
433
  passthrough?: true;
431
434
  } | null>;
432
435
  /**
@@ -438,27 +441,18 @@ export interface RangoInternal<TEnv = any, TRoutes extends Record<string, unknow
438
441
  handles: string;
439
442
  } | null>;
440
443
  /**
441
- * Preview match - returns route middleware without segment resolution.
442
- * Also returns responseType and handler for response routes (non-RSC short-circuit).
444
+ * Preview match - returns the route, its params and route middleware
445
+ * without segment resolution.
443
446
  */
444
447
  previewMatch(request: Request, input?: RouterRequestInput<TEnv>): Promise<{
445
448
  routeMiddleware?: Array<{
446
449
  handler: import("./middleware.js").MiddlewareFn;
447
450
  params: Record<string, string>;
448
451
  }>;
449
- responseType?: string;
450
- handler?: Function;
451
452
  params?: Record<string, string>;
452
- negotiated?: boolean;
453
- manifestEntry?: EntryData;
454
453
  routeKey?: string;
455
454
  } | null>;
456
- matchPartial(request: Request, input?: RouterRequestInput<TEnv>, actionContext?: {
457
- actionId?: string;
458
- actionUrl?: URL;
459
- actionResult?: any;
460
- formData?: FormData;
461
- }): Promise<MatchResult | null>;
455
+ matchPartial(request: Request, input?: RouterRequestInput<TEnv>, actionContext?: ActionContext): Promise<MatchResult | null>;
462
456
  /**
463
457
  * Match an error to the nearest error boundary and return error segments
464
458
  *
@@ -94,8 +94,8 @@ export declare function loaderPins(entries: readonly EntryData[], reqCtx: Reques
94
94
  * PPR loader lane rule — the canonical source statement; other sites point
95
95
  * here (consumer docs: skills/ppr/SKILL.md "The loader lane rule";
96
96
  * docs/design/loader-container-bake.md). This is the single funnel every
97
- * loader segment path routes through (fresh resolveLoaders, cache-hit
98
- * resolveLoadersOnly, revalidation resolveLoadersOnlyWithRevalidation, and
97
+ * loader segment path routes through (resolveOwnerLoaders: the full match's
98
+ * FRESH pass, cache-hit and revalidation resolveLoadersOnly, and
99
99
  * intercept loaders in intercept-resolution.ts, which pass no bake key and
100
100
  * never run under a shell capture), so the lane is decided here, per LOADER,
101
101
  * never by the entry's loading():
@@ -109,7 +109,7 @@ export declare function loaderPins(entries: readonly EntryData[], reqCtx: Reques
109
109
  * plain objects, arrays and JSX props are masked (mask-nested.ts) and stay
110
110
  * live holes at the consumer's own Suspense — per-request material must be
111
111
  * promise-shaped (the #692 cross-session scar). The masked container
112
- * registers on `_shellCaptureLoaderRecords`: it holds the capture gate
112
+ * registers on `_shellCaptureState.loaderRecords`: it holds the capture gate
113
113
  * (bounded by `ppr.captureTimeout`) and pins into the snapshot's loader
114
114
  * family, and on a HIT the recorded container is overlaid onto the fresh
115
115
  * run (below) so the payload matches the frozen prelude outside the holes.
@@ -7,16 +7,16 @@
7
7
  * consuming Suspense subtree postpones as a hole, and the serve pass runs them
8
8
  * fresh into it.
9
9
  *
10
- * Capture mode is signalled by `requestCtx._shellCaptureRun`, set to true ONLY on
10
+ * Capture mode is signalled by `requestCtx._shellCaptureState.run`, set ONLY on
11
11
  * the derived request context of the background capture task (shell-capture.ts);
12
- * the foreground render never sets it. This module is the single home for the
12
+ * the foreground render never has it. This module is the single home for the
13
13
  * mask so every loader execution site gates the same way (loader-cache.ts
14
- * `resolveLoaderData`, fresh.ts `resolveLoaders`).
14
+ * `resolveLoaderData`, revalidation.ts `resolveOwnerLoaders`).
15
15
  */
16
16
  import { type RequestContext } from "../../server/request-context.js";
17
17
  /**
18
18
  * True when the current render is the active PPR shell capture and route loaders
19
- * must be masked rather than executed. Reads `_shellCaptureRun` off the ALS
19
+ * must be masked rather than executed. Reads `_shellCaptureState` off the ALS
20
20
  * request context (the capture task re-establishes its derived context via
21
21
  * runWithRequestContext), so it is accurate at the loader resolution sites, which
22
22
  * run synchronously inside the pipeline's context frame.
@@ -93,14 +93,6 @@ export interface PrefetchDeferral {
93
93
  * a navigation to the page lists.
94
94
  */
95
95
  below?: true;
96
- /**
97
- * The loaders this prefetch deferred, by `$$id` (registerDeferredLoader).
98
- * A deferred loader runs only if something reads it: a handler's or another
99
- * loader's ctx.use() starts it through its registration
100
- * (startDeferredLoader), and revalidation.ts deliverStartedLoaders delivers
101
- * what was started by the end of resolution.
102
- */
103
- deferredLoaders?: Map<string, DeferredLoader>;
104
96
  }
105
97
  /**
106
98
  * How a request may use the route's cache() record, decided once per match
@@ -126,7 +118,14 @@ export interface RecordUse {
126
118
  */
127
119
  readonly refresh: boolean;
128
120
  }
129
- /** A loader this prefetch deferred: PrefetchDeferral.deferredLoaders. */
121
+ /**
122
+ * A DSL loader registered and not started (InternalHandlerContext
123
+ * ._deferredLoaders): a prefetch deferred it, or a pass that skips loaders
124
+ * (`skipLoaders`) did not run it. It runs only if something reads it: a
125
+ * handler's or another loader's ctx.use() starts it through its registration
126
+ * (startDeferredLoader), and revalidation.ts deliverStartedLoaders delivers
127
+ * what a prefetch started by the end of resolution.
128
+ */
130
129
  export interface DeferredLoader {
131
130
  /**
132
131
  * The segment that registers it. Its run files its handle pushes there,
@@ -212,17 +211,20 @@ export declare function interceptFillSkips(match: {
212
211
  /** PrefetchDeferral.record, or all of it open when the match has no plan. */
213
212
  export declare function recordUse(ctx: HandlerContext<any, any> | undefined): RecordUse;
214
213
  /**
215
- * Register a loader this prefetch deferred, with the segment that registers
216
- * it and how to start it there (PrefetchDeferral.deferredLoaders). The first
214
+ * Register a loader resolution does not start, with the segment that
215
+ * registers it and how to start it there (DeferredLoader). The first
217
216
  * registration wins, as the loader's one run per request does.
218
217
  */
219
218
  export declare function registerDeferredLoader(ctx: HandlerContext<any, any>, loaderId: string, owner: string, start: () => Promise<unknown>): void;
220
219
  /**
221
- * A reader asks for a loader this prefetch deferred and nothing has started:
222
- * start it through its registration and return the run, or undefined when
223
- * the read takes the ordinary path. Without this the reader ran the loader
224
- * bare, without its cache() binding, and the segment delivered afterwards
225
- * read the binding: two values on one page and an extra run on a HIT.
220
+ * A reader asks for a registered loader (registerDeferredLoader) and nothing
221
+ * has started it: start it through its registration and return the run, or
222
+ * undefined when the read takes the ordinary path. Without this the reader
223
+ * ran the loader bare, as a handler-invoked loader: in a prefetch without its
224
+ * cache() binding, so the segment delivered afterwards read the binding (two
225
+ * values on one page, an extra run on a HIT); in a route record's background
226
+ * re-render outside its DSL scope, so the record kept its handle pushes and
227
+ * every HIT showed them twice.
226
228
  *
227
229
  * A started cache() binding of the loader (`_loaderCacheOverrides`) is never
228
230
  * redirected here: the read is that binding's own MISS execution, and
@@ -231,8 +233,8 @@ export declare function registerDeferredLoader(ctx: HandlerContext<any, any>, lo
231
233
  export declare function startDeferredLoader(ctx: HandlerContext<any, any>, loaderId: string): Promise<unknown> | undefined;
232
234
  /**
233
235
  * The segment a run of `loaderId` files its handle pushes under: the one
234
- * that registers it when this prefetch deferred it, else the segment being
235
- * resolved.
236
+ * that registers it when it is registered (registerDeferredLoader), else the
237
+ * segment being resolved.
236
238
  */
237
239
  export declare function loaderOwner(ctx: HandlerContext<any, any>, loaderId: string): string | undefined;
238
240
  /**
@@ -0,0 +1,93 @@
1
+ /**
2
+ * ResolutionPass: what one walk over a matched chain reads.
3
+ *
4
+ * Every function of the segment walker (revalidation.ts, intercept-resolution.ts)
5
+ * resolves against the same request: the handler context, the segments the
6
+ * client holds, the previous and next location, the action, the staleness and
7
+ * the router's deps. They take this one object instead of threading the same
8
+ * ten values through each signature in a fixed order, where two adjacent
9
+ * `URL`s or `Record<string, string>`s could swap without a type error.
10
+ *
11
+ * A full match (a document, the background re-render of a route record, a
12
+ * build-time prerender) is a FRESH pass: see FRESH below.
13
+ */
14
+ import type { HandlerContext } from "../../types.js";
15
+ import type { ActionContext, SegmentResolutionDeps } from "../types.js";
16
+ /**
17
+ * The segment ids the client holds, the set resolution works on (match-api.ts
18
+ * may delete a route's id from the listed set to force a render). Empty on a
19
+ * full refetch.
20
+ */
21
+ export type ClientHeld = ReadonlySet<string>;
22
+ /**
23
+ * The client of a full match: it holds nothing and asks for nothing to be
24
+ * kept. Compared by identity (`pass.client === FRESH`), never by size: a
25
+ * partial request whose client holds nothing (NOTHING_HELD, an empty
26
+ * `_rsc_segments`) still asks the revalidate() rules. On a FRESH pass every
27
+ * segment is new without a decision, trace entry or `revalidation.decision`
28
+ * event, and the walker takes the full match's branches (revalidation.ts,
29
+ * each marked FRESH).
30
+ */
31
+ export declare const FRESH: ClientHeld;
32
+ /**
33
+ * A pass without the router's deps: what match middleware knows about the
34
+ * request. createSegmentWrappers (segment-wrappers.ts) binds the deps.
35
+ */
36
+ export interface ResolutionPassInput<TEnv = any> {
37
+ readonly context: HandlerContext<any, TEnv>;
38
+ readonly client: ClientHeld;
39
+ /** The matched route's params, stamped on every segment the walk emits. */
40
+ readonly params: Record<string, string>;
41
+ readonly prevParams: Record<string, string>;
42
+ /** Undefined only on a build-time FRESH pass (freshPassInput). */
43
+ readonly request: Request | undefined;
44
+ readonly prevUrl: URL;
45
+ readonly nextUrl: URL;
46
+ readonly routeKey: string;
47
+ readonly actionContext?: ActionContext;
48
+ readonly stale?: boolean;
49
+ /**
50
+ * No loader is started and no loader segment is emitted: build time
51
+ * (prerender-match.ts) and the background re-render of a route record
52
+ * (background-revalidation.ts), whose records never hold loaders.
53
+ * resolveOwnerLoaders registers each loader instead: in the re-render a
54
+ * handler's read starts it as its declaration; at build time a read
55
+ * throws (setupBuildUse).
56
+ */
57
+ readonly skipLoaders?: boolean;
58
+ /**
59
+ * A render error rethrows instead of rendering the error boundary, and a
60
+ * streamed handler's rejection is not recovered. Build time only, so a
61
+ * failure (or `throw new Skip()`) reaches the build instead of being baked
62
+ * into a frozen 200 (issue #587).
63
+ */
64
+ readonly throwOnError?: boolean;
65
+ /**
66
+ * The request is a navigation, though the pass is FRESH: the background
67
+ * re-render of a record a navigation read stale or wrote
68
+ * (background-revalidation.ts). An entry's error reports isPartial, as the
69
+ * navigation's own pass does.
70
+ */
71
+ readonly partialRequest?: boolean;
72
+ }
73
+ export interface ResolutionPass<TEnv = any> extends ResolutionPassInput<TEnv> {
74
+ readonly deps: SegmentResolutionDeps<TEnv>;
75
+ }
76
+ /**
77
+ * The input of a full match's pass (FRESH). At build time the prerender
78
+ * context's `request` is a throwing getter (handler-context.ts
79
+ * createPrerenderContext): the pass carries undefined instead.
80
+ */
81
+ export declare function freshPassInput<TEnv>(context: HandlerContext<any, TEnv>, routeKey: string, params: Record<string, string>, options?: {
82
+ skipLoaders?: boolean;
83
+ throwOnError?: boolean;
84
+ partialRequest?: boolean;
85
+ }): ResolutionPassInput<TEnv>;
86
+ /**
87
+ * The input of a pass whose client holds nothing: every segment is new and
88
+ * renders. The background re-render of an intercept (background-revalidation.ts)
89
+ * resolves with it.
90
+ */
91
+ export declare function heldNothingPassInput<TEnv>(context: HandlerContext<any, TEnv>, routeKey: string, params: Record<string, string>, options?: {
92
+ skipLoaders?: boolean;
93
+ }): ResolutionPassInput<TEnv>;
@@ -1,13 +1,20 @@
1
1
  /**
2
- * Revalidation Path Segment Resolution
2
+ * The segment walker.
3
3
  *
4
- * Functions for resolving segments during partial (revalidation) requests.
5
- * Mirrors the fresh path but adds revalidation awareness: only re-resolves
6
- * segments whose revalidate() predicate returns true.
4
+ * Resolves a matched chain's segments (loaders, layouts, routes, parallels,
5
+ * orphan layouts, error boundaries) in handler-first order. A partial request
6
+ * re-resolves only what the client lacks and what a held segment's
7
+ * revalidate() rules ask for. A full match (a document, the background
8
+ * re-render of a route record, a build-time prerender) walks the same code
9
+ * with `pass.client === FRESH` (resolution-pass.ts): every segment is new,
10
+ * and the branches marked FRESH keep what the full match has always done
11
+ * differently.
7
12
  */
8
13
  import { type EntryData, type LoaderEntry } from "../../server/context";
9
14
  import type { HandlerContext, ResolvedSegment, ShouldRevalidateFn } from "../../types";
10
- import type { SegmentResolutionDeps, SegmentRevalidationResult, ActionContext } from "../types.js";
15
+ import type { SegmentRevalidationResult } from "../types.js";
16
+ import type { InterceptResult } from "../router-context.js";
17
+ import { type ResolutionPass } from "./resolution-pass.js";
11
18
  /**
12
19
  * A deferred loader something started in this request (a handler that awaits
13
20
  * it with ctx.use(), or another loader) ran in the prefetch whatever its flag
@@ -37,23 +44,37 @@ export interface LoaderOwner {
37
44
  * False for an intercept: never a document.
38
45
  */
39
46
  readonly bakeLane: boolean;
47
+ /**
48
+ * The owner declares loading(false). A FRESH pass then settles every loader
49
+ * before the handler runs (resolveOwnerLoaders). Unset for an intercept.
50
+ */
51
+ readonly loadingDisabled?: boolean;
40
52
  readonly traceSource: "loader" | "intercept-loader";
41
53
  }
42
54
  /** A route entry as a LoaderOwner, under `shortCodeOverride` when inherited. */
43
55
  export declare function ownerOf(entry: EntryData, shortCodeOverride?: string): LoaderOwner;
44
56
  /**
45
- * The partial lane's one loader funnel: each loader is a segment, run when
46
- * the client lacks it, asked its revalidate() when held, kept outright in a
47
- * fill (fillSends), deferred in a prefetch that defers it (defersLoader).
57
+ * The walker's one loader funnel: each loader is a segment, run when the
58
+ * client lacks it, asked its revalidate() when held, kept outright in a fill
59
+ * (fillSends), deferred in a prefetch that defers it (defersLoader).
60
+ *
61
+ * Loaders run lazily via ctx.use() and are memoized, so they run in
62
+ * parallel. A FRESH pass kicks every loader off without an await, in the
63
+ * tick the call starts: a reader's ctx.use(Loader) finds the binding only if
64
+ * it registered first (docs/design/handle-push-ownership.md).
48
65
  */
49
- export declare function resolveOwnerLoaders<TEnv>(owner: LoaderOwner, ctx: HandlerContext<any, TEnv>, belongsToRoute: boolean, clientSegmentIds: ReadonlySet<string>, prevParams: Record<string, string>, request: Request, prevUrl: URL, nextUrl: URL, routeKey: string, deps: SegmentResolutionDeps<TEnv>, actionContext?: ActionContext, stale?: boolean): Promise<{
66
+ export declare function resolveOwnerLoaders<TEnv>(pass: ResolutionPass<TEnv>, owner: LoaderOwner, belongsToRoute: boolean): Promise<{
50
67
  segments: ResolvedSegment[];
51
68
  matchedIds: string[];
52
69
  }>;
53
70
  /**
54
- * Resolve only loader segments for all entries with revalidation logic.
71
+ * Resolve only loader segments for all entries: a cache() or prerender HIT
72
+ * serves the cached non-loader segments, and loaders are never cached. Under
73
+ * an intercept the route's entry, and on an intercept's fill an entry the
74
+ * client lacks, are skipped as resolveAllSegments skips them, after the ppr
75
+ * header latch below has read the chain's leaf.
55
76
  */
56
- export declare function resolveLoadersOnlyWithRevalidation<TEnv>(entries: EntryData[], context: HandlerContext<any, TEnv>, clientSegmentIds: Set<string>, prevParams: Record<string, string>, request: Request, prevUrl: URL, nextUrl: URL, routeKey: string, deps: SegmentResolutionDeps<TEnv>, actionContext?: ActionContext, stale?: boolean): Promise<{
77
+ export declare function resolveLoadersOnly<TEnv>(pass: ResolutionPass<TEnv>, entries: EntryData[], walk?: Pick<RevalidatingWalkOptions, "interceptResult">): Promise<{
57
78
  segments: ResolvedSegment[];
58
79
  matchedIds: string[];
59
80
  }>;
@@ -65,9 +86,9 @@ export declare function buildEntryRevalidateMap(entries: EntryData[]): Map<strin
65
86
  revalidate: ShouldRevalidateFn<any, any>[];
66
87
  }>;
67
88
  /**
68
- * Resolve parallel segments with revalidation.
89
+ * Resolve an entry's parallel slots: each slot's segment and its loaders.
69
90
  */
70
- export declare function resolveParallelSegmentsWithRevalidation<TEnv>(entry: EntryData, params: Record<string, string>, context: HandlerContext<any, TEnv>, belongsToRoute: boolean, clientSegmentIds: Set<string>, prevParams: Record<string, string>, request: Request, prevUrl: URL, nextUrl: URL, routeKey: string, deps: SegmentResolutionDeps<TEnv>, actionContext?: ActionContext, stale?: boolean, options?: {
91
+ export declare function resolveParallelSegments<TEnv>(pass: ResolutionPass<TEnv>, entry: EntryData, belongsToRoute: boolean, options?: {
71
92
  /**
72
93
  * Seed for an unknown parent-chain slot (slot not in clientSegmentIds) when
73
94
  * there are no deciding revalidate fns. "type-derived" (default, main path):
@@ -85,43 +106,73 @@ export declare function resolveParallelSegmentsWithRevalidation<TEnv>(entry: Ent
85
106
  * to it: loader sub-ids are filtered out and slots are re-grouped by parent).
86
107
  */
87
108
  loaderOrder?: "after" | "before";
88
- /** Matched chain entry being resolved; see ResolveSegmentOptions.boundaryEntry. */
109
+ /**
110
+ * The matched chain entry being resolved: where the sync path catches a
111
+ * handler error, so a streamed slot handler (or a slot owned by a
112
+ * routeless layout) recovers into the same boundary. Defaults to `entry`.
113
+ */
89
114
  boundaryEntry?: EntryData;
90
115
  }): Promise<SegmentRevalidationResult>;
91
116
  /**
92
- * Resolve entry handler (layout, cache, or route) with revalidation.
117
+ * Resolve a chain entry's handler (layout, cache, or route) into its segment.
93
118
  */
94
- export declare function resolveEntryHandlerWithRevalidation<TEnv>(entry: Exclude<EntryData, {
119
+ export declare function resolveEntryHandler<TEnv>(pass: ResolutionPass<TEnv>, entry: Exclude<EntryData, {
95
120
  type: "parallel";
96
- }>, params: Record<string, string>, context: HandlerContext<any, TEnv>, belongsToRoute: boolean, clientSegmentIds: Set<string>, prevParams: Record<string, string>, request: Request, prevUrl: URL, nextUrl: URL, routeKey: string, deps: SegmentResolutionDeps<TEnv>, actionContext?: ActionContext, stale?: boolean): Promise<{
121
+ }>, belongsToRoute: boolean): Promise<{
97
122
  segment: ResolvedSegment;
98
123
  matchedId: string;
99
124
  }>;
100
125
  /**
101
- * Resolve segments with revalidation awareness (for partial rendering).
126
+ * Resolve one chain entry's segments: its loaders, its handler, its orphan
127
+ * layouts and its parallels, handler first.
102
128
  */
103
- export declare function resolveSegmentWithRevalidation<TEnv>(entry: Exclude<EntryData, {
129
+ export declare function resolveSegment<TEnv>(pass: ResolutionPass<TEnv>, entry: Exclude<EntryData, {
104
130
  type: "parallel";
105
- }>, routeKey: string, params: Record<string, string>, context: HandlerContext<any, TEnv>, clientSegmentIds: Set<string>, prevParams: Record<string, string>, request: Request, prevUrl: URL, nextUrl: URL, deps: SegmentResolutionDeps<TEnv>, actionContext?: ActionContext, stale?: boolean,
106
- /** The matched route's full chain; see ResolveSegmentOptions.chain (fresh.ts). */
131
+ }>,
132
+ /** The matched route's full chain; see RevalidatingWalkOptions.chain. */
107
133
  chain?: readonly EntryData[]): Promise<SegmentRevalidationResult>;
108
134
  /**
109
- * Resolve orphan layout with revalidation.
135
+ * Resolve an orphan layout: its loaders, its handler, its slots and the
136
+ * routeless entries nested in it.
110
137
  */
111
- export declare function resolveOrphanLayoutWithRevalidation<TEnv>(orphan: EntryData, params: Record<string, string>, context: HandlerContext<any, TEnv>, clientSegmentIds: Set<string>, prevParams: Record<string, string>, request: Request, prevUrl: URL, nextUrl: URL, routeKey: string, belongsToRoute: boolean, deps: SegmentResolutionDeps<TEnv>, actionContext?: ActionContext, stale?: boolean,
138
+ export declare function resolveOrphanLayout<TEnv>(pass: ResolutionPass<TEnv>, orphan: EntryData, belongsToRoute: boolean,
112
139
  /** Parent route entry — its loaders are inherited so parallel slots can access them. */
113
140
  parentRouteEntry?: EntryData,
114
- /** Matched chain entry being resolved (see ResolveSegmentOptions.boundaryEntry); defaults to parentRouteEntry. */
141
+ /**
142
+ * Matched chain entry being resolved (see
143
+ * resolveParallelSegments's boundaryEntry); defaults to
144
+ * parentRouteEntry.
145
+ */
115
146
  boundaryEntry?: EntryData | undefined): Promise<SegmentRevalidationResult>;
147
+ /** What resolveAllSegments needs beyond its pass. */
148
+ export interface RevalidatingWalkOptions {
149
+ /**
150
+ * The intercept the request resolves: the route's entry (its handler and
151
+ * loaders) is skipped and only its id is matched. None on a full match.
152
+ */
153
+ readonly interceptResult?: InterceptResult | null;
154
+ /** For the intercept skip's debug log. */
155
+ readonly localRouteName?: string;
156
+ /** Where an entry's error boundary reports (resolveWithErrorBoundary). */
157
+ readonly pathname: string;
158
+ /**
159
+ * The matched route's full entry chain. Defaults to `entries`;
160
+ * withCacheLookup passes it when it resolves only the entries above a
161
+ * cache() boundary. An orphan list can hold an entry of the chain: a bare
162
+ * cache() marker sits in its layout's layout[] (it wraps that layout's
163
+ * routes) and is the parent of the routes after it. For those routes it
164
+ * resolves once, as a chain entry, below the cache() header latch (issue
165
+ * #918: resolved twice on a MISS, once and discarded on a HIT).
166
+ */
167
+ readonly chain?: readonly EntryData[];
168
+ }
116
169
  /**
117
- * Resolve all segments for a route with revalidation logic (for matchPartial).
170
+ * Resolve all segments for a route: a partial match (matchPartial), a full
171
+ * match with a FRESH pass, or the FRESH pass of an intercept record's
172
+ * background re-render (rerenderAndCacheRoute). A thrown action's pass is cut
173
+ * at its error boundary (ActionContext.boundary).
118
174
  */
119
- export declare function resolveAllSegmentsWithRevalidation<TEnv>(entries: EntryData[], routeKey: string, params: Record<string, string>, context: HandlerContext<any, TEnv>, clientSegmentSet: Set<string>, prevParams: Record<string, string>, request: Request, prevUrl: URL, nextUrl: URL, actionContext: ActionContext | undefined, interceptResult: {
120
- intercept: any;
121
- entry: EntryData;
122
- } | null, localRouteName: string, pathname: string, deps: SegmentResolutionDeps<TEnv>, stale?: boolean,
123
- /** The matched route's full chain; see ResolveSegmentOptions.chain (fresh.ts). */
124
- chain?: readonly EntryData[]): Promise<{
175
+ export declare function resolveAllSegments<TEnv>(pass: ResolutionPass<TEnv>, entries: EntryData[], walk: RevalidatingWalkOptions): Promise<{
125
176
  segments: ResolvedSegment[];
126
177
  matchedIds: string[];
127
178
  }>;
@@ -1,3 +1,2 @@
1
1
  export { handleHandlerResult, warnOnStreamedResponse, buildLoaderErrorContext, } from "./segment-resolution/helpers.js";
2
- export { resolveLoaders, type ResolveSegmentOptions, resolveSegment, resolveOrphanLayout, resolveParallelEntry, resolveAllSegments, resolveLoadersOnly, } from "./segment-resolution/fresh.js";
3
- export { resolveLoadersOnlyWithRevalidation, buildEntryRevalidateMap, resolveParallelSegmentsWithRevalidation, resolveEntryHandlerWithRevalidation, resolveSegmentWithRevalidation, resolveOrphanLayoutWithRevalidation, resolveAllSegmentsWithRevalidation, } from "./segment-resolution/revalidation.js";
2
+ export { resolveLoadersOnly, buildEntryRevalidateMap, resolveParallelSegments, resolveEntryHandler, resolveSegment, resolveOrphanLayout, resolveAllSegments, } from "./segment-resolution/revalidation.js";