@rangojs/router 0.4.2 → 0.5.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 (848) hide show
  1. package/dist/types/browser/prefetch/cache.d.ts +11 -8
  2. package/dist/types/cache/cf/cf-cache-store.d.ts +2 -0
  3. package/dist/types/cache/read-through-swr.d.ts +7 -6
  4. package/dist/types/cache/types.d.ts +39 -6
  5. package/dist/types/cloudflare/tracing.d.ts +16 -12
  6. package/dist/types/router/instrument.d.ts +45 -15
  7. package/dist/types/router/telemetry-otel.d.ts +4 -4
  8. package/dist/types/router/timeout.d.ts +12 -1
  9. package/dist/types/router/tracing.d.ts +31 -17
  10. package/dist/types/rsc/capture-queue.d.ts +41 -4
  11. package/dist/types/rsc/shell-build-manifest.d.ts +2 -2
  12. package/dist/types/rsc/shell-capture.d.ts +28 -2
  13. package/dist/types/rsc/shell-serve.d.ts +18 -12
  14. package/dist/types/rsc/stream-idle.d.ts +60 -0
  15. package/dist/types/server/request-context.d.ts +7 -1
  16. package/dist/types/vercel/tracing.d.ts +9 -8
  17. package/dist/vite/index.js +1 -1
  18. package/package.json +1 -1
  19. package/skills/observability/SKILL.md +33 -4
  20. package/skills/ppr/SKILL.md +44 -3
  21. package/src/browser/prefetch/cache.ts +22 -10
  22. package/src/cache/cache-runtime.ts +39 -25
  23. package/src/cache/cf/cf-cache-store.ts +27 -8
  24. package/src/cache/document-cache.ts +39 -23
  25. package/src/cache/read-through-swr.ts +22 -16
  26. package/src/cache/types.ts +41 -6
  27. package/src/cache/vercel/vercel-cache-store.ts +24 -10
  28. package/src/cloudflare/tracing.ts +16 -12
  29. package/src/router/instrument.ts +61 -15
  30. package/src/router/segment-resolution/loader-cache.ts +12 -1
  31. package/src/router/segment-resolution/revalidation.ts +16 -1
  32. package/src/router/telemetry-otel.ts +4 -4
  33. package/src/router/timeout.ts +12 -1
  34. package/src/router/tracing.ts +37 -17
  35. package/src/rsc/capture-queue.ts +150 -22
  36. package/src/rsc/handler.ts +171 -73
  37. package/src/rsc/rsc-rendering.ts +11 -3
  38. package/src/rsc/shell-build-manifest.ts +20 -7
  39. package/src/rsc/shell-capture.ts +222 -18
  40. package/src/rsc/shell-serve.ts +27 -12
  41. package/src/rsc/stream-idle.ts +137 -0
  42. package/src/server/request-context.ts +8 -0
  43. package/src/testing/dispatch.ts +55 -1
  44. package/src/vercel/tracing.ts +9 -8
  45. package/dist/__internal.d.ts +0 -83
  46. package/dist/__internal.d.ts.map +0 -1
  47. package/dist/__internal.js +0 -19
  48. package/dist/__internal.js.map +0 -1
  49. package/dist/__mocks__/version.d.ts +0 -7
  50. package/dist/__mocks__/version.d.ts.map +0 -1
  51. package/dist/__mocks__/version.js +0 -7
  52. package/dist/__mocks__/version.js.map +0 -1
  53. package/dist/__tests__/client-href.test.d.ts +0 -2
  54. package/dist/__tests__/client-href.test.d.ts.map +0 -1
  55. package/dist/__tests__/client-href.test.js +0 -74
  56. package/dist/__tests__/client-href.test.js.map +0 -1
  57. package/dist/__tests__/component-utils.test.d.ts +0 -2
  58. package/dist/__tests__/component-utils.test.d.ts.map +0 -1
  59. package/dist/__tests__/component-utils.test.js +0 -51
  60. package/dist/__tests__/component-utils.test.js.map +0 -1
  61. package/dist/__tests__/event-controller.test.d.ts +0 -2
  62. package/dist/__tests__/event-controller.test.d.ts.map +0 -1
  63. package/dist/__tests__/event-controller.test.js +0 -538
  64. package/dist/__tests__/event-controller.test.js.map +0 -1
  65. package/dist/__tests__/helpers/route-tree.d.ts +0 -118
  66. package/dist/__tests__/helpers/route-tree.d.ts.map +0 -1
  67. package/dist/__tests__/helpers/route-tree.js +0 -374
  68. package/dist/__tests__/helpers/route-tree.js.map +0 -1
  69. package/dist/__tests__/match-result.test.d.ts +0 -2
  70. package/dist/__tests__/match-result.test.d.ts.map +0 -1
  71. package/dist/__tests__/match-result.test.js +0 -154
  72. package/dist/__tests__/match-result.test.js.map +0 -1
  73. package/dist/__tests__/navigation-store.test.d.ts +0 -2
  74. package/dist/__tests__/navigation-store.test.d.ts.map +0 -1
  75. package/dist/__tests__/navigation-store.test.js +0 -440
  76. package/dist/__tests__/navigation-store.test.js.map +0 -1
  77. package/dist/__tests__/partial-update.test.d.ts +0 -2
  78. package/dist/__tests__/partial-update.test.d.ts.map +0 -1
  79. package/dist/__tests__/partial-update.test.js +0 -1009
  80. package/dist/__tests__/partial-update.test.js.map +0 -1
  81. package/dist/__tests__/reverse-types.test.d.ts +0 -8
  82. package/dist/__tests__/reverse-types.test.d.ts.map +0 -1
  83. package/dist/__tests__/reverse-types.test.js +0 -656
  84. package/dist/__tests__/reverse-types.test.js.map +0 -1
  85. package/dist/__tests__/route-definition.test.d.ts +0 -2
  86. package/dist/__tests__/route-definition.test.d.ts.map +0 -1
  87. package/dist/__tests__/route-definition.test.js +0 -55
  88. package/dist/__tests__/route-definition.test.js.map +0 -1
  89. package/dist/__tests__/router-helpers.test.d.ts +0 -2
  90. package/dist/__tests__/router-helpers.test.d.ts.map +0 -1
  91. package/dist/__tests__/router-helpers.test.js +0 -377
  92. package/dist/__tests__/router-helpers.test.js.map +0 -1
  93. package/dist/__tests__/router-integration-2.test.d.ts +0 -2
  94. package/dist/__tests__/router-integration-2.test.d.ts.map +0 -1
  95. package/dist/__tests__/router-integration-2.test.js +0 -426
  96. package/dist/__tests__/router-integration-2.test.js.map +0 -1
  97. package/dist/__tests__/router-integration.test.d.ts +0 -2
  98. package/dist/__tests__/router-integration.test.d.ts.map +0 -1
  99. package/dist/__tests__/router-integration.test.js +0 -1051
  100. package/dist/__tests__/router-integration.test.js.map +0 -1
  101. package/dist/__tests__/search-params.test.d.ts +0 -5
  102. package/dist/__tests__/search-params.test.d.ts.map +0 -1
  103. package/dist/__tests__/search-params.test.js +0 -306
  104. package/dist/__tests__/search-params.test.js.map +0 -1
  105. package/dist/__tests__/segment-system.test.d.ts +0 -2
  106. package/dist/__tests__/segment-system.test.d.ts.map +0 -1
  107. package/dist/__tests__/segment-system.test.js +0 -627
  108. package/dist/__tests__/segment-system.test.js.map +0 -1
  109. package/dist/__tests__/static-handler-types.test.d.ts +0 -8
  110. package/dist/__tests__/static-handler-types.test.d.ts.map +0 -1
  111. package/dist/__tests__/static-handler-types.test.js +0 -63
  112. package/dist/__tests__/static-handler-types.test.js.map +0 -1
  113. package/dist/__tests__/urls.test.d.ts +0 -2
  114. package/dist/__tests__/urls.test.d.ts.map +0 -1
  115. package/dist/__tests__/urls.test.js +0 -421
  116. package/dist/__tests__/urls.test.js.map +0 -1
  117. package/dist/__tests__/use-mount.test.d.ts +0 -2
  118. package/dist/__tests__/use-mount.test.d.ts.map +0 -1
  119. package/dist/__tests__/use-mount.test.js +0 -35
  120. package/dist/__tests__/use-mount.test.js.map +0 -1
  121. package/dist/bin/rango.d.ts +0 -2
  122. package/dist/bin/rango.d.ts.map +0 -1
  123. package/dist/bin/rango.js.map +0 -1
  124. package/dist/browser/event-controller.d.ts +0 -191
  125. package/dist/browser/event-controller.d.ts.map +0 -1
  126. package/dist/browser/event-controller.js +0 -559
  127. package/dist/browser/event-controller.js.map +0 -1
  128. package/dist/browser/index.d.ts +0 -2
  129. package/dist/browser/index.d.ts.map +0 -1
  130. package/dist/browser/index.js +0 -14
  131. package/dist/browser/index.js.map +0 -1
  132. package/dist/browser/link-interceptor.d.ts +0 -38
  133. package/dist/browser/link-interceptor.d.ts.map +0 -1
  134. package/dist/browser/link-interceptor.js +0 -99
  135. package/dist/browser/link-interceptor.js.map +0 -1
  136. package/dist/browser/logging.d.ts +0 -10
  137. package/dist/browser/logging.d.ts.map +0 -1
  138. package/dist/browser/logging.js +0 -29
  139. package/dist/browser/logging.js.map +0 -1
  140. package/dist/browser/lru-cache.d.ts +0 -17
  141. package/dist/browser/lru-cache.d.ts.map +0 -1
  142. package/dist/browser/lru-cache.js +0 -50
  143. package/dist/browser/lru-cache.js.map +0 -1
  144. package/dist/browser/merge-segment-loaders.d.ts +0 -39
  145. package/dist/browser/merge-segment-loaders.d.ts.map +0 -1
  146. package/dist/browser/merge-segment-loaders.js +0 -102
  147. package/dist/browser/merge-segment-loaders.js.map +0 -1
  148. package/dist/browser/navigation-bridge.d.ts +0 -102
  149. package/dist/browser/navigation-bridge.d.ts.map +0 -1
  150. package/dist/browser/navigation-bridge.js +0 -708
  151. package/dist/browser/navigation-bridge.js.map +0 -1
  152. package/dist/browser/navigation-client.d.ts +0 -25
  153. package/dist/browser/navigation-client.d.ts.map +0 -1
  154. package/dist/browser/navigation-client.js +0 -157
  155. package/dist/browser/navigation-client.js.map +0 -1
  156. package/dist/browser/navigation-store.d.ts +0 -101
  157. package/dist/browser/navigation-store.d.ts.map +0 -1
  158. package/dist/browser/navigation-store.js +0 -625
  159. package/dist/browser/navigation-store.js.map +0 -1
  160. package/dist/browser/partial-update.d.ts +0 -75
  161. package/dist/browser/partial-update.d.ts.map +0 -1
  162. package/dist/browser/partial-update.js +0 -426
  163. package/dist/browser/partial-update.js.map +0 -1
  164. package/dist/browser/react/Link.d.ts +0 -86
  165. package/dist/browser/react/Link.d.ts.map +0 -1
  166. package/dist/browser/react/Link.js +0 -128
  167. package/dist/browser/react/Link.js.map +0 -1
  168. package/dist/browser/react/NavigationProvider.d.ts +0 -63
  169. package/dist/browser/react/NavigationProvider.d.ts.map +0 -1
  170. package/dist/browser/react/NavigationProvider.js +0 -216
  171. package/dist/browser/react/NavigationProvider.js.map +0 -1
  172. package/dist/browser/react/ScrollRestoration.d.ts +0 -75
  173. package/dist/browser/react/ScrollRestoration.d.ts.map +0 -1
  174. package/dist/browser/react/ScrollRestoration.js +0 -57
  175. package/dist/browser/react/ScrollRestoration.js.map +0 -1
  176. package/dist/browser/react/context.d.ts +0 -46
  177. package/dist/browser/react/context.d.ts.map +0 -1
  178. package/dist/browser/react/context.js +0 -10
  179. package/dist/browser/react/context.js.map +0 -1
  180. package/dist/browser/react/index.d.ts +0 -11
  181. package/dist/browser/react/index.d.ts.map +0 -1
  182. package/dist/browser/react/index.js +0 -22
  183. package/dist/browser/react/index.js.map +0 -1
  184. package/dist/browser/react/location-state-shared.d.ts +0 -63
  185. package/dist/browser/react/location-state-shared.d.ts.map +0 -1
  186. package/dist/browser/react/location-state-shared.js +0 -81
  187. package/dist/browser/react/location-state-shared.js.map +0 -1
  188. package/dist/browser/react/location-state.d.ts +0 -23
  189. package/dist/browser/react/location-state.d.ts.map +0 -1
  190. package/dist/browser/react/location-state.js +0 -29
  191. package/dist/browser/react/location-state.js.map +0 -1
  192. package/dist/browser/react/mount-context.d.ts +0 -24
  193. package/dist/browser/react/mount-context.d.ts.map +0 -1
  194. package/dist/browser/react/mount-context.js +0 -24
  195. package/dist/browser/react/mount-context.js.map +0 -1
  196. package/dist/browser/react/use-action.d.ts +0 -64
  197. package/dist/browser/react/use-action.d.ts.map +0 -1
  198. package/dist/browser/react/use-action.js +0 -134
  199. package/dist/browser/react/use-action.js.map +0 -1
  200. package/dist/browser/react/use-client-cache.d.ts +0 -41
  201. package/dist/browser/react/use-client-cache.d.ts.map +0 -1
  202. package/dist/browser/react/use-client-cache.js +0 -39
  203. package/dist/browser/react/use-client-cache.js.map +0 -1
  204. package/dist/browser/react/use-handle.d.ts +0 -31
  205. package/dist/browser/react/use-handle.d.ts.map +0 -1
  206. package/dist/browser/react/use-handle.js +0 -144
  207. package/dist/browser/react/use-handle.js.map +0 -1
  208. package/dist/browser/react/use-href.d.ts +0 -33
  209. package/dist/browser/react/use-href.d.ts.map +0 -1
  210. package/dist/browser/react/use-href.js +0 -39
  211. package/dist/browser/react/use-href.js.map +0 -1
  212. package/dist/browser/react/use-link-status.d.ts +0 -37
  213. package/dist/browser/react/use-link-status.d.ts.map +0 -1
  214. package/dist/browser/react/use-link-status.js +0 -99
  215. package/dist/browser/react/use-link-status.js.map +0 -1
  216. package/dist/browser/react/use-mount.d.ts +0 -25
  217. package/dist/browser/react/use-mount.d.ts.map +0 -1
  218. package/dist/browser/react/use-mount.js +0 -30
  219. package/dist/browser/react/use-mount.js.map +0 -1
  220. package/dist/browser/react/use-navigation.d.ts +0 -27
  221. package/dist/browser/react/use-navigation.d.ts.map +0 -1
  222. package/dist/browser/react/use-navigation.js +0 -87
  223. package/dist/browser/react/use-navigation.js.map +0 -1
  224. package/dist/browser/react/use-segments.d.ts +0 -38
  225. package/dist/browser/react/use-segments.d.ts.map +0 -1
  226. package/dist/browser/react/use-segments.js +0 -130
  227. package/dist/browser/react/use-segments.js.map +0 -1
  228. package/dist/browser/request-controller.d.ts +0 -26
  229. package/dist/browser/request-controller.d.ts.map +0 -1
  230. package/dist/browser/request-controller.js +0 -147
  231. package/dist/browser/request-controller.js.map +0 -1
  232. package/dist/browser/rsc-router.d.ts +0 -129
  233. package/dist/browser/rsc-router.d.ts.map +0 -1
  234. package/dist/browser/rsc-router.js +0 -195
  235. package/dist/browser/rsc-router.js.map +0 -1
  236. package/dist/browser/scroll-restoration.d.ts +0 -93
  237. package/dist/browser/scroll-restoration.d.ts.map +0 -1
  238. package/dist/browser/scroll-restoration.js +0 -321
  239. package/dist/browser/scroll-restoration.js.map +0 -1
  240. package/dist/browser/segment-structure-assert.d.ts +0 -17
  241. package/dist/browser/segment-structure-assert.d.ts.map +0 -1
  242. package/dist/browser/segment-structure-assert.js +0 -59
  243. package/dist/browser/segment-structure-assert.js.map +0 -1
  244. package/dist/browser/server-action-bridge.d.ts +0 -26
  245. package/dist/browser/server-action-bridge.d.ts.map +0 -1
  246. package/dist/browser/server-action-bridge.js +0 -668
  247. package/dist/browser/server-action-bridge.js.map +0 -1
  248. package/dist/browser/shallow.d.ts +0 -12
  249. package/dist/browser/shallow.d.ts.map +0 -1
  250. package/dist/browser/shallow.js +0 -34
  251. package/dist/browser/shallow.js.map +0 -1
  252. package/dist/browser/types.d.ts +0 -369
  253. package/dist/browser/types.d.ts.map +0 -1
  254. package/dist/browser/types.js +0 -2
  255. package/dist/browser/types.js.map +0 -1
  256. package/dist/build/__tests__/generate-cli.test.d.ts +0 -2
  257. package/dist/build/__tests__/generate-cli.test.d.ts.map +0 -1
  258. package/dist/build/__tests__/generate-cli.test.js +0 -237
  259. package/dist/build/__tests__/generate-cli.test.js.map +0 -1
  260. package/dist/build/__tests__/generate-manifest.test.d.ts +0 -2
  261. package/dist/build/__tests__/generate-manifest.test.d.ts.map +0 -1
  262. package/dist/build/__tests__/generate-manifest.test.js +0 -119
  263. package/dist/build/__tests__/generate-manifest.test.js.map +0 -1
  264. package/dist/build/__tests__/generate-route-types.test.d.ts +0 -2
  265. package/dist/build/__tests__/generate-route-types.test.d.ts.map +0 -1
  266. package/dist/build/__tests__/generate-route-types.test.js +0 -620
  267. package/dist/build/__tests__/generate-route-types.test.js.map +0 -1
  268. package/dist/build/__tests__/per-router-manifest.test.d.ts +0 -2
  269. package/dist/build/__tests__/per-router-manifest.test.d.ts.map +0 -1
  270. package/dist/build/__tests__/per-router-manifest.test.js +0 -308
  271. package/dist/build/__tests__/per-router-manifest.test.js.map +0 -1
  272. package/dist/build/generate-manifest.d.ts +0 -81
  273. package/dist/build/generate-manifest.d.ts.map +0 -1
  274. package/dist/build/generate-manifest.js +0 -276
  275. package/dist/build/generate-manifest.js.map +0 -1
  276. package/dist/build/generate-route-types.d.ts +0 -115
  277. package/dist/build/generate-route-types.d.ts.map +0 -1
  278. package/dist/build/generate-route-types.js +0 -740
  279. package/dist/build/generate-route-types.js.map +0 -1
  280. package/dist/build/index.d.ts +0 -21
  281. package/dist/build/index.d.ts.map +0 -1
  282. package/dist/build/index.js +0 -21
  283. package/dist/build/index.js.map +0 -1
  284. package/dist/build/route-trie.d.ts +0 -71
  285. package/dist/build/route-trie.d.ts.map +0 -1
  286. package/dist/build/route-trie.js +0 -175
  287. package/dist/build/route-trie.js.map +0 -1
  288. package/dist/cache/__tests__/cache-scope.test.d.ts +0 -2
  289. package/dist/cache/__tests__/cache-scope.test.d.ts.map +0 -1
  290. package/dist/cache/__tests__/cache-scope.test.js +0 -208
  291. package/dist/cache/__tests__/cache-scope.test.js.map +0 -1
  292. package/dist/cache/__tests__/document-cache.test.d.ts +0 -2
  293. package/dist/cache/__tests__/document-cache.test.d.ts.map +0 -1
  294. package/dist/cache/__tests__/document-cache.test.js +0 -345
  295. package/dist/cache/__tests__/document-cache.test.js.map +0 -1
  296. package/dist/cache/__tests__/memory-segment-store.test.d.ts +0 -2
  297. package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +0 -1
  298. package/dist/cache/__tests__/memory-segment-store.test.js +0 -425
  299. package/dist/cache/__tests__/memory-segment-store.test.js.map +0 -1
  300. package/dist/cache/__tests__/memory-store.test.d.ts +0 -2
  301. package/dist/cache/__tests__/memory-store.test.d.ts.map +0 -1
  302. package/dist/cache/__tests__/memory-store.test.js +0 -367
  303. package/dist/cache/__tests__/memory-store.test.js.map +0 -1
  304. package/dist/cache/cache-scope.d.ts +0 -102
  305. package/dist/cache/cache-scope.d.ts.map +0 -1
  306. package/dist/cache/cache-scope.js +0 -440
  307. package/dist/cache/cache-scope.js.map +0 -1
  308. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +0 -2
  309. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +0 -1
  310. package/dist/cache/cf/__tests__/cf-cache-store.test.js +0 -330
  311. package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +0 -1
  312. package/dist/cache/cf/cf-cache-store.d.ts +0 -165
  313. package/dist/cache/cf/cf-cache-store.d.ts.map +0 -1
  314. package/dist/cache/cf/cf-cache-store.js +0 -242
  315. package/dist/cache/cf/cf-cache-store.js.map +0 -1
  316. package/dist/cache/cf/index.d.ts +0 -14
  317. package/dist/cache/cf/index.d.ts.map +0 -1
  318. package/dist/cache/cf/index.js +0 -17
  319. package/dist/cache/cf/index.js.map +0 -1
  320. package/dist/cache/document-cache.d.ts +0 -64
  321. package/dist/cache/document-cache.d.ts.map +0 -1
  322. package/dist/cache/document-cache.js +0 -228
  323. package/dist/cache/document-cache.js.map +0 -1
  324. package/dist/cache/index.d.ts +0 -19
  325. package/dist/cache/index.d.ts.map +0 -1
  326. package/dist/cache/index.js +0 -21
  327. package/dist/cache/index.js.map +0 -1
  328. package/dist/cache/memory-segment-store.d.ts +0 -110
  329. package/dist/cache/memory-segment-store.d.ts.map +0 -1
  330. package/dist/cache/memory-segment-store.js +0 -117
  331. package/dist/cache/memory-segment-store.js.map +0 -1
  332. package/dist/cache/memory-store.d.ts +0 -41
  333. package/dist/cache/memory-store.d.ts.map +0 -1
  334. package/dist/cache/memory-store.js +0 -191
  335. package/dist/cache/memory-store.js.map +0 -1
  336. package/dist/cache/types.d.ts +0 -317
  337. package/dist/cache/types.d.ts.map +0 -1
  338. package/dist/cache/types.js +0 -12
  339. package/dist/cache/types.js.map +0 -1
  340. package/dist/client.d.ts +0 -248
  341. package/dist/client.d.ts.map +0 -1
  342. package/dist/client.js +0 -367
  343. package/dist/client.js.map +0 -1
  344. package/dist/client.rsc.d.ts +0 -26
  345. package/dist/client.rsc.d.ts.map +0 -1
  346. package/dist/client.rsc.js +0 -46
  347. package/dist/client.rsc.js.map +0 -1
  348. package/dist/component-utils.d.ts +0 -36
  349. package/dist/component-utils.d.ts.map +0 -1
  350. package/dist/component-utils.js +0 -61
  351. package/dist/component-utils.js.map +0 -1
  352. package/dist/components/DefaultDocument.d.ts +0 -13
  353. package/dist/components/DefaultDocument.d.ts.map +0 -1
  354. package/dist/components/DefaultDocument.js +0 -15
  355. package/dist/components/DefaultDocument.js.map +0 -1
  356. package/dist/debug.d.ts +0 -58
  357. package/dist/debug.d.ts.map +0 -1
  358. package/dist/debug.js +0 -157
  359. package/dist/debug.js.map +0 -1
  360. package/dist/default-error-boundary.d.ts +0 -11
  361. package/dist/default-error-boundary.d.ts.map +0 -1
  362. package/dist/default-error-boundary.js +0 -45
  363. package/dist/default-error-boundary.js.map +0 -1
  364. package/dist/deps/browser.d.ts +0 -2
  365. package/dist/deps/browser.d.ts.map +0 -1
  366. package/dist/deps/browser.js +0 -3
  367. package/dist/deps/browser.js.map +0 -1
  368. package/dist/deps/html-stream-client.d.ts +0 -2
  369. package/dist/deps/html-stream-client.d.ts.map +0 -1
  370. package/dist/deps/html-stream-client.js +0 -3
  371. package/dist/deps/html-stream-client.js.map +0 -1
  372. package/dist/deps/html-stream-server.d.ts +0 -2
  373. package/dist/deps/html-stream-server.d.ts.map +0 -1
  374. package/dist/deps/html-stream-server.js +0 -3
  375. package/dist/deps/html-stream-server.js.map +0 -1
  376. package/dist/deps/rsc.d.ts +0 -2
  377. package/dist/deps/rsc.d.ts.map +0 -1
  378. package/dist/deps/rsc.js +0 -4
  379. package/dist/deps/rsc.js.map +0 -1
  380. package/dist/deps/ssr.d.ts +0 -2
  381. package/dist/deps/ssr.d.ts.map +0 -1
  382. package/dist/deps/ssr.js +0 -3
  383. package/dist/deps/ssr.js.map +0 -1
  384. package/dist/errors.d.ts +0 -174
  385. package/dist/errors.d.ts.map +0 -1
  386. package/dist/errors.js +0 -241
  387. package/dist/errors.js.map +0 -1
  388. package/dist/handle.d.ts +0 -78
  389. package/dist/handle.d.ts.map +0 -1
  390. package/dist/handle.js +0 -82
  391. package/dist/handle.js.map +0 -1
  392. package/dist/handles/MetaTags.d.ts +0 -14
  393. package/dist/handles/MetaTags.d.ts.map +0 -1
  394. package/dist/handles/MetaTags.js +0 -136
  395. package/dist/handles/MetaTags.js.map +0 -1
  396. package/dist/handles/index.d.ts +0 -6
  397. package/dist/handles/index.d.ts.map +0 -1
  398. package/dist/handles/index.js +0 -6
  399. package/dist/handles/index.js.map +0 -1
  400. package/dist/handles/meta.d.ts +0 -39
  401. package/dist/handles/meta.d.ts.map +0 -1
  402. package/dist/handles/meta.js +0 -202
  403. package/dist/handles/meta.js.map +0 -1
  404. package/dist/host/__tests__/errors.test.d.ts +0 -2
  405. package/dist/host/__tests__/errors.test.d.ts.map +0 -1
  406. package/dist/host/__tests__/errors.test.js +0 -76
  407. package/dist/host/__tests__/errors.test.js.map +0 -1
  408. package/dist/host/__tests__/pattern-comprehensive.test.d.ts +0 -2
  409. package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +0 -1
  410. package/dist/host/__tests__/pattern-comprehensive.test.js +0 -732
  411. package/dist/host/__tests__/pattern-comprehensive.test.js.map +0 -1
  412. package/dist/host/__tests__/pattern-matcher.test.d.ts +0 -2
  413. package/dist/host/__tests__/pattern-matcher.test.d.ts.map +0 -1
  414. package/dist/host/__tests__/pattern-matcher.test.js +0 -251
  415. package/dist/host/__tests__/pattern-matcher.test.js.map +0 -1
  416. package/dist/host/__tests__/router.test.d.ts +0 -2
  417. package/dist/host/__tests__/router.test.d.ts.map +0 -1
  418. package/dist/host/__tests__/router.test.js +0 -241
  419. package/dist/host/__tests__/router.test.js.map +0 -1
  420. package/dist/host/__tests__/testing.test.d.ts +0 -2
  421. package/dist/host/__tests__/testing.test.d.ts.map +0 -1
  422. package/dist/host/__tests__/testing.test.js +0 -64
  423. package/dist/host/__tests__/testing.test.js.map +0 -1
  424. package/dist/host/__tests__/utils.test.d.ts +0 -2
  425. package/dist/host/__tests__/utils.test.d.ts.map +0 -1
  426. package/dist/host/__tests__/utils.test.js +0 -29
  427. package/dist/host/__tests__/utils.test.js.map +0 -1
  428. package/dist/host/cookie-handler.d.ts +0 -34
  429. package/dist/host/cookie-handler.d.ts.map +0 -1
  430. package/dist/host/cookie-handler.js +0 -124
  431. package/dist/host/cookie-handler.js.map +0 -1
  432. package/dist/host/errors.d.ts +0 -56
  433. package/dist/host/errors.d.ts.map +0 -1
  434. package/dist/host/errors.js +0 -79
  435. package/dist/host/errors.js.map +0 -1
  436. package/dist/host/index.d.ts +0 -29
  437. package/dist/host/index.d.ts.map +0 -1
  438. package/dist/host/index.js +0 -32
  439. package/dist/host/index.js.map +0 -1
  440. package/dist/host/pattern-matcher.d.ts +0 -36
  441. package/dist/host/pattern-matcher.d.ts.map +0 -1
  442. package/dist/host/pattern-matcher.js +0 -172
  443. package/dist/host/pattern-matcher.js.map +0 -1
  444. package/dist/host/router.d.ts +0 -26
  445. package/dist/host/router.d.ts.map +0 -1
  446. package/dist/host/router.js +0 -218
  447. package/dist/host/router.js.map +0 -1
  448. package/dist/host/testing.d.ts +0 -36
  449. package/dist/host/testing.d.ts.map +0 -1
  450. package/dist/host/testing.js +0 -55
  451. package/dist/host/testing.js.map +0 -1
  452. package/dist/host/types.d.ts +0 -115
  453. package/dist/host/types.d.ts.map +0 -1
  454. package/dist/host/types.js +0 -7
  455. package/dist/host/types.js.map +0 -1
  456. package/dist/host/utils.d.ts +0 -21
  457. package/dist/host/utils.d.ts.map +0 -1
  458. package/dist/host/utils.js +0 -23
  459. package/dist/host/utils.js.map +0 -1
  460. package/dist/href-client.d.ts +0 -131
  461. package/dist/href-client.d.ts.map +0 -1
  462. package/dist/href-client.js +0 -64
  463. package/dist/href-client.js.map +0 -1
  464. package/dist/href-context.d.ts +0 -29
  465. package/dist/href-context.d.ts.map +0 -1
  466. package/dist/href-context.js +0 -21
  467. package/dist/href-context.js.map +0 -1
  468. package/dist/index.d.ts +0 -73
  469. package/dist/index.d.ts.map +0 -1
  470. package/dist/index.js +0 -91
  471. package/dist/index.js.map +0 -1
  472. package/dist/index.rsc.d.ts +0 -32
  473. package/dist/index.rsc.d.ts.map +0 -1
  474. package/dist/index.rsc.js +0 -40
  475. package/dist/index.rsc.js.map +0 -1
  476. package/dist/internal-debug.d.ts +0 -2
  477. package/dist/internal-debug.d.ts.map +0 -1
  478. package/dist/internal-debug.js +0 -5
  479. package/dist/internal-debug.js.map +0 -1
  480. package/dist/loader.d.ts +0 -14
  481. package/dist/loader.d.ts.map +0 -1
  482. package/dist/loader.js +0 -20
  483. package/dist/loader.js.map +0 -1
  484. package/dist/loader.rsc.d.ts +0 -19
  485. package/dist/loader.rsc.d.ts.map +0 -1
  486. package/dist/loader.rsc.js +0 -99
  487. package/dist/loader.rsc.js.map +0 -1
  488. package/dist/network-error-thrower.d.ts +0 -17
  489. package/dist/network-error-thrower.d.ts.map +0 -1
  490. package/dist/network-error-thrower.js +0 -14
  491. package/dist/network-error-thrower.js.map +0 -1
  492. package/dist/outlet-context.d.ts +0 -13
  493. package/dist/outlet-context.d.ts.map +0 -1
  494. package/dist/outlet-context.js +0 -3
  495. package/dist/outlet-context.js.map +0 -1
  496. package/dist/prerender/__tests__/param-hash.test.d.ts +0 -2
  497. package/dist/prerender/__tests__/param-hash.test.d.ts.map +0 -1
  498. package/dist/prerender/__tests__/param-hash.test.js +0 -148
  499. package/dist/prerender/__tests__/param-hash.test.js.map +0 -1
  500. package/dist/prerender/param-hash.d.ts +0 -16
  501. package/dist/prerender/param-hash.d.ts.map +0 -1
  502. package/dist/prerender/param-hash.js +0 -36
  503. package/dist/prerender/param-hash.js.map +0 -1
  504. package/dist/prerender/store.d.ts +0 -38
  505. package/dist/prerender/store.d.ts.map +0 -1
  506. package/dist/prerender/store.js +0 -61
  507. package/dist/prerender/store.js.map +0 -1
  508. package/dist/prerender.d.ts +0 -66
  509. package/dist/prerender.d.ts.map +0 -1
  510. package/dist/prerender.js +0 -57
  511. package/dist/prerender.js.map +0 -1
  512. package/dist/reverse.d.ts +0 -196
  513. package/dist/reverse.d.ts.map +0 -1
  514. package/dist/reverse.js +0 -78
  515. package/dist/reverse.js.map +0 -1
  516. package/dist/root-error-boundary.d.ts +0 -33
  517. package/dist/root-error-boundary.d.ts.map +0 -1
  518. package/dist/root-error-boundary.js +0 -165
  519. package/dist/root-error-boundary.js.map +0 -1
  520. package/dist/route-content-wrapper.d.ts +0 -46
  521. package/dist/route-content-wrapper.d.ts.map +0 -1
  522. package/dist/route-content-wrapper.js +0 -77
  523. package/dist/route-content-wrapper.js.map +0 -1
  524. package/dist/route-definition.d.ts +0 -421
  525. package/dist/route-definition.d.ts.map +0 -1
  526. package/dist/route-definition.js +0 -868
  527. package/dist/route-definition.js.map +0 -1
  528. package/dist/route-map-builder.d.ts +0 -155
  529. package/dist/route-map-builder.d.ts.map +0 -1
  530. package/dist/route-map-builder.js +0 -237
  531. package/dist/route-map-builder.js.map +0 -1
  532. package/dist/route-types.d.ts +0 -165
  533. package/dist/route-types.d.ts.map +0 -1
  534. package/dist/route-types.js +0 -7
  535. package/dist/route-types.js.map +0 -1
  536. package/dist/router/__tests__/handler-context.test.d.ts +0 -2
  537. package/dist/router/__tests__/handler-context.test.d.ts.map +0 -1
  538. package/dist/router/__tests__/handler-context.test.js +0 -65
  539. package/dist/router/__tests__/handler-context.test.js.map +0 -1
  540. package/dist/router/__tests__/loader-cycle-detection.test.d.ts +0 -2
  541. package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +0 -1
  542. package/dist/router/__tests__/loader-cycle-detection.test.js +0 -221
  543. package/dist/router/__tests__/loader-cycle-detection.test.js.map +0 -1
  544. package/dist/router/__tests__/match-context.test.d.ts +0 -2
  545. package/dist/router/__tests__/match-context.test.d.ts.map +0 -1
  546. package/dist/router/__tests__/match-context.test.js +0 -92
  547. package/dist/router/__tests__/match-context.test.js.map +0 -1
  548. package/dist/router/__tests__/match-pipelines.test.d.ts +0 -2
  549. package/dist/router/__tests__/match-pipelines.test.d.ts.map +0 -1
  550. package/dist/router/__tests__/match-pipelines.test.js +0 -417
  551. package/dist/router/__tests__/match-pipelines.test.js.map +0 -1
  552. package/dist/router/__tests__/match-result.test.d.ts +0 -2
  553. package/dist/router/__tests__/match-result.test.d.ts.map +0 -1
  554. package/dist/router/__tests__/match-result.test.js +0 -457
  555. package/dist/router/__tests__/match-result.test.js.map +0 -1
  556. package/dist/router/__tests__/on-error.test.d.ts +0 -2
  557. package/dist/router/__tests__/on-error.test.d.ts.map +0 -1
  558. package/dist/router/__tests__/on-error.test.js +0 -678
  559. package/dist/router/__tests__/on-error.test.js.map +0 -1
  560. package/dist/router/__tests__/pattern-matching.test.d.ts +0 -2
  561. package/dist/router/__tests__/pattern-matching.test.d.ts.map +0 -1
  562. package/dist/router/__tests__/pattern-matching.test.js +0 -629
  563. package/dist/router/__tests__/pattern-matching.test.js.map +0 -1
  564. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +0 -2
  565. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +0 -1
  566. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +0 -155
  567. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +0 -1
  568. package/dist/router/error-handling.d.ts +0 -77
  569. package/dist/router/error-handling.d.ts.map +0 -1
  570. package/dist/router/error-handling.js +0 -202
  571. package/dist/router/error-handling.js.map +0 -1
  572. package/dist/router/handler-context.d.ts +0 -20
  573. package/dist/router/handler-context.d.ts.map +0 -1
  574. package/dist/router/handler-context.js +0 -198
  575. package/dist/router/handler-context.js.map +0 -1
  576. package/dist/router/intercept-resolution.d.ts +0 -66
  577. package/dist/router/intercept-resolution.d.ts.map +0 -1
  578. package/dist/router/intercept-resolution.js +0 -246
  579. package/dist/router/intercept-resolution.js.map +0 -1
  580. package/dist/router/loader-resolution.d.ts +0 -64
  581. package/dist/router/loader-resolution.d.ts.map +0 -1
  582. package/dist/router/loader-resolution.js +0 -284
  583. package/dist/router/loader-resolution.js.map +0 -1
  584. package/dist/router/logging.d.ts +0 -15
  585. package/dist/router/logging.d.ts.map +0 -1
  586. package/dist/router/logging.js +0 -99
  587. package/dist/router/logging.js.map +0 -1
  588. package/dist/router/manifest.d.ts +0 -22
  589. package/dist/router/manifest.d.ts.map +0 -1
  590. package/dist/router/manifest.js +0 -181
  591. package/dist/router/manifest.js.map +0 -1
  592. package/dist/router/match-api.d.ts +0 -35
  593. package/dist/router/match-api.d.ts.map +0 -1
  594. package/dist/router/match-api.js +0 -406
  595. package/dist/router/match-api.js.map +0 -1
  596. package/dist/router/match-context.d.ts +0 -206
  597. package/dist/router/match-context.d.ts.map +0 -1
  598. package/dist/router/match-context.js +0 -17
  599. package/dist/router/match-context.js.map +0 -1
  600. package/dist/router/match-middleware/background-revalidation.d.ts +0 -127
  601. package/dist/router/match-middleware/background-revalidation.d.ts.map +0 -1
  602. package/dist/router/match-middleware/background-revalidation.js +0 -75
  603. package/dist/router/match-middleware/background-revalidation.js.map +0 -1
  604. package/dist/router/match-middleware/cache-lookup.d.ts +0 -112
  605. package/dist/router/match-middleware/cache-lookup.d.ts.map +0 -1
  606. package/dist/router/match-middleware/cache-lookup.js +0 -257
  607. package/dist/router/match-middleware/cache-lookup.js.map +0 -1
  608. package/dist/router/match-middleware/cache-store.d.ts +0 -113
  609. package/dist/router/match-middleware/cache-store.d.ts.map +0 -1
  610. package/dist/router/match-middleware/cache-store.js +0 -108
  611. package/dist/router/match-middleware/cache-store.js.map +0 -1
  612. package/dist/router/match-middleware/index.d.ts +0 -81
  613. package/dist/router/match-middleware/index.d.ts.map +0 -1
  614. package/dist/router/match-middleware/index.js +0 -80
  615. package/dist/router/match-middleware/index.js.map +0 -1
  616. package/dist/router/match-middleware/intercept-resolution.d.ts +0 -117
  617. package/dist/router/match-middleware/intercept-resolution.d.ts.map +0 -1
  618. package/dist/router/match-middleware/intercept-resolution.js +0 -134
  619. package/dist/router/match-middleware/intercept-resolution.js.map +0 -1
  620. package/dist/router/match-middleware/segment-resolution.d.ts +0 -99
  621. package/dist/router/match-middleware/segment-resolution.d.ts.map +0 -1
  622. package/dist/router/match-middleware/segment-resolution.js +0 -53
  623. package/dist/router/match-middleware/segment-resolution.js.map +0 -1
  624. package/dist/router/match-pipelines.d.ts +0 -147
  625. package/dist/router/match-pipelines.d.ts.map +0 -1
  626. package/dist/router/match-pipelines.js +0 -82
  627. package/dist/router/match-pipelines.js.map +0 -1
  628. package/dist/router/match-result.d.ts +0 -126
  629. package/dist/router/match-result.d.ts.map +0 -1
  630. package/dist/router/match-result.js +0 -93
  631. package/dist/router/match-result.js.map +0 -1
  632. package/dist/router/metrics.d.ts +0 -20
  633. package/dist/router/metrics.d.ts.map +0 -1
  634. package/dist/router/metrics.js +0 -47
  635. package/dist/router/metrics.js.map +0 -1
  636. package/dist/router/middleware.d.ts +0 -249
  637. package/dist/router/middleware.d.ts.map +0 -1
  638. package/dist/router/middleware.js +0 -434
  639. package/dist/router/middleware.js.map +0 -1
  640. package/dist/router/middleware.test.d.ts +0 -2
  641. package/dist/router/middleware.test.d.ts.map +0 -1
  642. package/dist/router/middleware.test.js +0 -816
  643. package/dist/router/middleware.test.js.map +0 -1
  644. package/dist/router/pattern-matching.d.ts +0 -149
  645. package/dist/router/pattern-matching.d.ts.map +0 -1
  646. package/dist/router/pattern-matching.js +0 -349
  647. package/dist/router/pattern-matching.js.map +0 -1
  648. package/dist/router/revalidation.d.ts +0 -44
  649. package/dist/router/revalidation.d.ts.map +0 -1
  650. package/dist/router/revalidation.js +0 -147
  651. package/dist/router/revalidation.js.map +0 -1
  652. package/dist/router/router-context.d.ts +0 -135
  653. package/dist/router/router-context.d.ts.map +0 -1
  654. package/dist/router/router-context.js +0 -36
  655. package/dist/router/router-context.js.map +0 -1
  656. package/dist/router/segment-resolution.d.ts +0 -127
  657. package/dist/router/segment-resolution.d.ts.map +0 -1
  658. package/dist/router/segment-resolution.js +0 -919
  659. package/dist/router/segment-resolution.js.map +0 -1
  660. package/dist/router/trie-matching.d.ts +0 -40
  661. package/dist/router/trie-matching.d.ts.map +0 -1
  662. package/dist/router/trie-matching.js +0 -127
  663. package/dist/router/trie-matching.js.map +0 -1
  664. package/dist/router/types.d.ts +0 -136
  665. package/dist/router/types.d.ts.map +0 -1
  666. package/dist/router/types.js +0 -7
  667. package/dist/router/types.js.map +0 -1
  668. package/dist/router.d.ts +0 -753
  669. package/dist/router.d.ts.map +0 -1
  670. package/dist/router.gen.d.ts +0 -6
  671. package/dist/router.gen.d.ts.map +0 -1
  672. package/dist/router.gen.js +0 -6
  673. package/dist/router.gen.js.map +0 -1
  674. package/dist/router.js +0 -1304
  675. package/dist/router.js.map +0 -1
  676. package/dist/rsc/__tests__/helpers.test.d.ts +0 -2
  677. package/dist/rsc/__tests__/helpers.test.d.ts.map +0 -1
  678. package/dist/rsc/__tests__/helpers.test.js +0 -140
  679. package/dist/rsc/__tests__/helpers.test.js.map +0 -1
  680. package/dist/rsc/handler.d.ts +0 -45
  681. package/dist/rsc/handler.d.ts.map +0 -1
  682. package/dist/rsc/handler.js +0 -1172
  683. package/dist/rsc/handler.js.map +0 -1
  684. package/dist/rsc/helpers.d.ts +0 -16
  685. package/dist/rsc/helpers.d.ts.map +0 -1
  686. package/dist/rsc/helpers.js +0 -55
  687. package/dist/rsc/helpers.js.map +0 -1
  688. package/dist/rsc/index.d.ts +0 -22
  689. package/dist/rsc/index.d.ts.map +0 -1
  690. package/dist/rsc/index.js +0 -23
  691. package/dist/rsc/index.js.map +0 -1
  692. package/dist/rsc/nonce.d.ts +0 -9
  693. package/dist/rsc/nonce.d.ts.map +0 -1
  694. package/dist/rsc/nonce.js +0 -18
  695. package/dist/rsc/nonce.js.map +0 -1
  696. package/dist/rsc/types.d.ts +0 -206
  697. package/dist/rsc/types.d.ts.map +0 -1
  698. package/dist/rsc/types.js +0 -8
  699. package/dist/rsc/types.js.map +0 -1
  700. package/dist/search-params.d.ts +0 -103
  701. package/dist/search-params.d.ts.map +0 -1
  702. package/dist/search-params.js +0 -74
  703. package/dist/search-params.js.map +0 -1
  704. package/dist/segment-system.d.ts +0 -75
  705. package/dist/segment-system.d.ts.map +0 -1
  706. package/dist/segment-system.js +0 -336
  707. package/dist/segment-system.js.map +0 -1
  708. package/dist/server/context.d.ts +0 -245
  709. package/dist/server/context.d.ts.map +0 -1
  710. package/dist/server/context.js +0 -197
  711. package/dist/server/context.js.map +0 -1
  712. package/dist/server/fetchable-loader-store.d.ts +0 -18
  713. package/dist/server/fetchable-loader-store.d.ts.map +0 -1
  714. package/dist/server/fetchable-loader-store.js +0 -18
  715. package/dist/server/fetchable-loader-store.js.map +0 -1
  716. package/dist/server/handle-store.d.ts +0 -85
  717. package/dist/server/handle-store.d.ts.map +0 -1
  718. package/dist/server/handle-store.js +0 -142
  719. package/dist/server/handle-store.js.map +0 -1
  720. package/dist/server/loader-registry.d.ts +0 -55
  721. package/dist/server/loader-registry.d.ts.map +0 -1
  722. package/dist/server/loader-registry.js +0 -132
  723. package/dist/server/loader-registry.js.map +0 -1
  724. package/dist/server/request-context.d.ts +0 -226
  725. package/dist/server/request-context.d.ts.map +0 -1
  726. package/dist/server/request-context.js +0 -290
  727. package/dist/server/request-context.js.map +0 -1
  728. package/dist/server/root-layout.d.ts +0 -4
  729. package/dist/server/root-layout.d.ts.map +0 -1
  730. package/dist/server/root-layout.js +0 -5
  731. package/dist/server/root-layout.js.map +0 -1
  732. package/dist/server.d.ts +0 -15
  733. package/dist/server.d.ts.map +0 -1
  734. package/dist/server.js +0 -20
  735. package/dist/server.js.map +0 -1
  736. package/dist/ssr/__tests__/ssr-handler.test.d.ts +0 -2
  737. package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +0 -1
  738. package/dist/ssr/__tests__/ssr-handler.test.js +0 -132
  739. package/dist/ssr/__tests__/ssr-handler.test.js.map +0 -1
  740. package/dist/ssr/index.d.ts +0 -98
  741. package/dist/ssr/index.d.ts.map +0 -1
  742. package/dist/ssr/index.js +0 -158
  743. package/dist/ssr/index.js.map +0 -1
  744. package/dist/static-handler.d.ts +0 -50
  745. package/dist/static-handler.d.ts.map +0 -1
  746. package/dist/static-handler.gen.d.ts +0 -5
  747. package/dist/static-handler.gen.d.ts.map +0 -1
  748. package/dist/static-handler.gen.js +0 -5
  749. package/dist/static-handler.gen.js.map +0 -1
  750. package/dist/static-handler.js +0 -29
  751. package/dist/static-handler.js.map +0 -1
  752. package/dist/theme/ThemeProvider.d.ts +0 -20
  753. package/dist/theme/ThemeProvider.d.ts.map +0 -1
  754. package/dist/theme/ThemeProvider.js +0 -240
  755. package/dist/theme/ThemeProvider.js.map +0 -1
  756. package/dist/theme/ThemeScript.d.ts +0 -48
  757. package/dist/theme/ThemeScript.d.ts.map +0 -1
  758. package/dist/theme/ThemeScript.js +0 -13
  759. package/dist/theme/ThemeScript.js.map +0 -1
  760. package/dist/theme/__tests__/theme.test.d.ts +0 -2
  761. package/dist/theme/__tests__/theme.test.d.ts.map +0 -1
  762. package/dist/theme/__tests__/theme.test.js +0 -103
  763. package/dist/theme/__tests__/theme.test.js.map +0 -1
  764. package/dist/theme/constants.d.ts +0 -29
  765. package/dist/theme/constants.d.ts.map +0 -1
  766. package/dist/theme/constants.js +0 -48
  767. package/dist/theme/constants.js.map +0 -1
  768. package/dist/theme/index.d.ts +0 -31
  769. package/dist/theme/index.d.ts.map +0 -1
  770. package/dist/theme/index.js +0 -36
  771. package/dist/theme/index.js.map +0 -1
  772. package/dist/theme/theme-context.d.ts +0 -40
  773. package/dist/theme/theme-context.d.ts.map +0 -1
  774. package/dist/theme/theme-context.js +0 -60
  775. package/dist/theme/theme-context.js.map +0 -1
  776. package/dist/theme/theme-script.d.ts +0 -27
  777. package/dist/theme/theme-script.d.ts.map +0 -1
  778. package/dist/theme/theme-script.js +0 -147
  779. package/dist/theme/theme-script.js.map +0 -1
  780. package/dist/theme/types.d.ts +0 -163
  781. package/dist/theme/types.d.ts.map +0 -1
  782. package/dist/theme/types.js +0 -11
  783. package/dist/theme/types.js.map +0 -1
  784. package/dist/theme/use-theme.d.ts +0 -12
  785. package/dist/theme/use-theme.d.ts.map +0 -1
  786. package/dist/theme/use-theme.js +0 -40
  787. package/dist/theme/use-theme.js.map +0 -1
  788. package/dist/types.d.ts +0 -1479
  789. package/dist/types.d.ts.map +0 -1
  790. package/dist/types.js +0 -10
  791. package/dist/types.js.map +0 -1
  792. package/dist/urls.d.ts +0 -441
  793. package/dist/urls.d.ts.map +0 -1
  794. package/dist/urls.gen.d.ts +0 -8
  795. package/dist/urls.gen.d.ts.map +0 -1
  796. package/dist/urls.gen.js +0 -8
  797. package/dist/urls.gen.js.map +0 -1
  798. package/dist/urls.js +0 -443
  799. package/dist/urls.js.map +0 -1
  800. package/dist/use-loader.d.ts +0 -127
  801. package/dist/use-loader.d.ts.map +0 -1
  802. package/dist/use-loader.js +0 -237
  803. package/dist/use-loader.js.map +0 -1
  804. package/dist/vite/__tests__/ast-handler-extract.test.d.ts +0 -2
  805. package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +0 -1
  806. package/dist/vite/__tests__/ast-handler-extract.test.js +0 -294
  807. package/dist/vite/__tests__/ast-handler-extract.test.js.map +0 -1
  808. package/dist/vite/__tests__/expose-id-utils.test.d.ts +0 -2
  809. package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +0 -1
  810. package/dist/vite/__tests__/expose-id-utils.test.js +0 -224
  811. package/dist/vite/__tests__/expose-id-utils.test.js.map +0 -1
  812. package/dist/vite/__tests__/expose-internal-ids.test.d.ts +0 -2
  813. package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +0 -1
  814. package/dist/vite/__tests__/expose-internal-ids.test.js +0 -647
  815. package/dist/vite/__tests__/expose-internal-ids.test.js.map +0 -1
  816. package/dist/vite/__tests__/expose-router-id.test.d.ts +0 -2
  817. package/dist/vite/__tests__/expose-router-id.test.d.ts.map +0 -1
  818. package/dist/vite/__tests__/expose-router-id.test.js +0 -39
  819. package/dist/vite/__tests__/expose-router-id.test.js.map +0 -1
  820. package/dist/vite/ast-handler-extract.d.ts +0 -49
  821. package/dist/vite/ast-handler-extract.d.ts.map +0 -1
  822. package/dist/vite/ast-handler-extract.js +0 -249
  823. package/dist/vite/ast-handler-extract.js.map +0 -1
  824. package/dist/vite/expose-action-id.d.ts +0 -19
  825. package/dist/vite/expose-action-id.d.ts.map +0 -1
  826. package/dist/vite/expose-action-id.js +0 -250
  827. package/dist/vite/expose-action-id.js.map +0 -1
  828. package/dist/vite/expose-id-utils.d.ts +0 -69
  829. package/dist/vite/expose-id-utils.d.ts.map +0 -1
  830. package/dist/vite/expose-id-utils.js +0 -289
  831. package/dist/vite/expose-id-utils.js.map +0 -1
  832. package/dist/vite/expose-internal-ids.d.ts +0 -22
  833. package/dist/vite/expose-internal-ids.d.ts.map +0 -1
  834. package/dist/vite/expose-internal-ids.js +0 -886
  835. package/dist/vite/expose-internal-ids.js.map +0 -1
  836. package/dist/vite/index.d.ts +0 -149
  837. package/dist/vite/index.d.ts.map +0 -1
  838. package/dist/vite/index.js.bak +0 -5448
  839. package/dist/vite/index.js.map +0 -1
  840. package/dist/vite/index.named-routes.gen.ts +0 -103
  841. package/dist/vite/package-resolution.d.ts +0 -43
  842. package/dist/vite/package-resolution.d.ts.map +0 -1
  843. package/dist/vite/package-resolution.js +0 -112
  844. package/dist/vite/package-resolution.js.map +0 -1
  845. package/dist/vite/virtual-entries.d.ts +0 -25
  846. package/dist/vite/virtual-entries.d.ts.map +0 -1
  847. package/dist/vite/virtual-entries.js +0 -110
  848. package/dist/vite/virtual-entries.js.map +0 -1
@@ -10,12 +10,12 @@
10
10
  * scopes are in play:
11
11
  * - Wildcard (default): built by `buildPrefetchKey(rangoState, target)` —
12
12
  * shape `rangoState\0/target?...`. Shared across all source pages and
13
- * invalidated automatically when Rango state bumps (deploy or
14
- * server-action invalidation).
13
+ * source segment trees; `_rsc_segments` is omitted from this key. Invalidated
14
+ * automatically when Rango state bumps (deploy or server-action invalidation).
15
15
  * - Source-scoped: built by `buildSourceKey(rangoState, sourceHref, target)`
16
16
  * — shape `rangoState\0sourceHref\0/target?...`. Embeds the Rango state
17
- * (so rotation invalidates source-scoped entries too) plus the source
18
- * href (so each originating page gets its own slot). Populated when the
17
+ * (so rotation invalidates source-scoped entries too), the source href, and
18
+ * the exact source segment tree. Populated when the
19
19
  * server tags a response with `X-RSC-Prefetch-Scope: source` (intercept
20
20
  * modals etc.), OR when a Link opts in with `prefetchKey=":source"` — in
21
21
  * both cases so source-sensitive responses cannot bleed into navigations
@@ -91,7 +91,9 @@ export declare function isPrefetchCacheDisabled(): boolean;
91
91
  * - Wildcard (source-agnostic): prefix is the Rango state value from
92
92
  * `getRangoState()`. Shared across all source pages. Invalidated
93
93
  * automatically when Rango state bumps (deploy or server-action).
94
- * Key shape: `rangoState\0/target?...`.
94
+ * `_rsc_segments` is omitted so sibling payloads prefetched from one page
95
+ * remain reusable after another prefetched navigation commits. Key shape:
96
+ * `rangoState\0/target?...`.
95
97
  * - Source-scoped: use `buildSourceKey()`. Key shape:
96
98
  * `rangoState\0sourceHref\0/target?...` — embeds the Rango state so
97
99
  * rotation invalidates source-scoped entries alongside wildcard ones,
@@ -100,9 +102,10 @@ export declare function isPrefetchCacheDisabled(): boolean;
100
102
  * `X-RSC-Prefetch-Scope: source` (intercept modals, etc.) or when a
101
103
  * Link opts in via `prefetchKey=":source"`.
102
104
  *
103
- * The `_rsc_segments` query param that travels in the target URL means
104
- * clients with different mounted segment trees naturally get different
105
- * keys so segment-level diffs remain consistent across both scopes.
105
+ * Source-scoped keys retain `_rsc_segments` because their exact source tree is
106
+ * part of the opt-in contract. Wildcard responses are source-agnostic by
107
+ * contract; callers use source scope when a custom revalidation decision makes
108
+ * the response depend on the current URL or segment tree.
106
109
  */
107
110
  export declare function buildPrefetchKey(prefix: string, targetUrl: URL): string;
108
111
  /**
@@ -30,6 +30,8 @@ import type { KVNamespace, CFCacheReadDebugEvent, CFCacheDebug, CFCacheStoreOpti
30
30
  export type { KVNamespace, CFCacheReadDebugEvent, CFCacheDebug, CFCacheStoreOptions, };
31
31
  export declare class CFCacheStore<TEnv = unknown> implements SegmentCacheStore<TEnv> {
32
32
  readonly supportsPassiveShellReads: true;
33
+ /** True when constructed without KV: the shell family no-ops (see ctor). */
34
+ readonly shellFamilyInert?: boolean;
33
35
  readonly defaults?: CacheDefaults;
34
36
  readonly keyGenerator?: (ctx: RequestContext<TEnv>, defaultKey: string) => string | Promise<string>;
35
37
  private readonly namespace?;
@@ -25,13 +25,14 @@ export interface ReadThroughItemConfig<T> {
25
25
  /** Execute the underlying function/loader on miss or revalidation */
26
26
  execute: () => Promise<T>;
27
27
  /**
28
- * Optional wrapper applied to execute() ONLY on the background
29
- * stale-revalidation path (not the foreground miss, where the caller's context
30
- * is already established). Used to re-establish the request-context ALS, which
31
- * a detached waitUntil task loses on workerd. Defaults to calling execute()
32
- * directly.
28
+ * Optional wrapper applied to the WHOLE background stale-revalidation task
29
+ * (execute + serialize + setItem) — not the foreground miss, where the
30
+ * caller's context is already established. Used to re-establish the
31
+ * request-context ALS, which a detached waitUntil task loses on workerd,
32
+ * and to open the rango.background span so the write is covered too.
33
+ * Defaults to running the task directly.
33
34
  */
34
- wrapBackground?: (run: () => Promise<T>) => Promise<T>;
35
+ wrapBackground?: (run: () => Promise<void>) => Promise<void>;
35
36
  /** Serialize result for storage. Return null to skip caching. */
36
37
  serialize: (data: T) => Promise<string | null>;
37
38
  /** Deserialize cached value back to the original type */
@@ -164,6 +164,15 @@ export interface SegmentCacheStore<TEnv = unknown> {
164
164
  * `stored` when acknowledged, or void for stores without acknowledgements.
165
165
  */
166
166
  putShell?(key: string, entry: ShellCacheEntry, ttlSeconds?: number, swrSeconds?: number, tags?: string[]): Promise<"stored" | "invalidated" | void>;
167
+ /**
168
+ * Declares the shell family present-but-inert: getShell/putShell exist but
169
+ * no-op (CFCacheStore without a KV namespace). scheduleShellCapture skips
170
+ * captures whose only write target is inert — the background render would be
171
+ * dead work that still occupies the per-isolate serialized capture queue
172
+ * (a promise-heavy route bakes for seconds per MISS with nothing stored).
173
+ * Absent/false means the family, when present, actually stores.
174
+ */
175
+ shellFamilyInert?: boolean;
167
176
  /**
168
177
  * Get a cached function result by key.
169
178
  * Returns the serialized value, optional handle data, and staleness flag.
@@ -221,8 +230,8 @@ export interface CacheItemResult {
221
230
  /**
222
231
  * A cached PPR (Partial Pre-rendering) shell entry.
223
232
  *
224
- * One entry carries BOTH artifacts a resume needs — the rendered HTML prelude
225
- * and React's postponed state — because the pair is version- and
233
+ * A DOCUMENT entry carries BOTH artifacts a resume needs — the rendered HTML
234
+ * prelude and React's postponed state — because the pair is version- and
226
235
  * generation-coupled and must never be mixed across a React upgrade or a build
227
236
  * change. The reactVersion and buildVersion fields are the read-time gates that
228
237
  * enforce both halves: isValidShellHit (rsc/shell-serve.ts) treats an entry
@@ -231,15 +240,28 @@ export interface CacheItemResult {
231
240
  * positions against one exact tree; resuming it against a different React or a
232
241
  * different app build tree-mismatches inside resume(), AFTER the 200 + prelude
233
242
  * are committed — an unrecoverable broken serve).
243
+ *
244
+ * A `navigationOnly` entry stores NEITHER half: nothing ever serves its HTML
245
+ * (document serving skips navigationOnly entries at the read gate, and partial
246
+ * replay consumes only `snapshot`/`docKey`), so the prelude would ride every
247
+ * store write and read as dead weight at KV-value scale. The capture still runs
248
+ * the full fizz prerender — it is the completeness arbiter and sanity gate —
249
+ * but its output is dropped before putShell. hasIntactShellPayload is the
250
+ * document-half gate; navigationOnly entries never satisfy it.
234
251
  */
235
252
  export interface ShellCacheEntry {
236
- /** Rendered HTML prelude bytes, base64-encoded (stores are JSON-serializing). */
237
- prelude: string;
253
+ /**
254
+ * Rendered HTML prelude bytes, base64-encoded (stores are JSON-serializing).
255
+ * Absent on `navigationOnly` entries (no document half is stored — see the
256
+ * interface doc); present on every document-servable entry.
257
+ */
258
+ prelude?: string;
238
259
  /**
239
260
  * JSON.stringify of React's postponed state, or null when the shell settled
240
- * with no holes (the DATA variant — served without a fizz resume).
261
+ * with no holes (the DATA variant — served without a fizz resume). Absent
262
+ * exactly when `prelude` is (navigationOnly entries).
241
263
  */
242
- postponed: string | null;
264
+ postponed?: string | null;
243
265
  /** React.version captured at prerender time; the read-time invalidation gate. */
244
266
  reactVersion: string;
245
267
  /**
@@ -322,6 +344,17 @@ export interface ShellCacheEntry {
322
344
  /** Capture-generation start time; tag invalidations at or after it win. */
323
345
  createdAt: number;
324
346
  }
347
+ /**
348
+ * A shell entry whose document half is present — what the document HIT path
349
+ * (serveShellHit / lookupBuildShell) consumes. hasIntactShellPayload
350
+ * (rsc/shell-serve.ts) is the runtime gate AND the type narrowing to this
351
+ * shape; navigationOnly entries never pass it (their document half is not
352
+ * stored).
353
+ */
354
+ export type DocumentShellCacheEntry = ShellCacheEntry & {
355
+ prelude: string;
356
+ postponed: string | null;
357
+ };
325
358
  /**
326
359
  * The families a shell snapshot pins. The item/segment/response families are
327
360
  * cache-store reads/writes (recorded by RecordingShellStore); the loader family
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * Cloudflare custom-spans integration.
3
3
  *
4
- * Bridges the router's performance phases (request, middleware, action,
5
- * loaders, handler, render, ssr) onto Cloudflare Workers custom spans so they show
6
- * up in the trace waterfall and OpenTelemetry exports next to the platform's
7
- * automatic spans (KV reads, D1 queries, fetch calls), with correct nesting.
4
+ * Bridges the router's observable phases (request, middleware, action, loaders,
5
+ * handler, render, ssr, response, background) onto Cloudflare Workers custom
6
+ * spans so they show up in the trace waterfall and OpenTelemetry exports next
7
+ * to the platform's automatic spans (KV reads, D1 queries, fetch calls), with
8
+ * correct nesting.
8
9
  *
9
10
  * Usage (Cloudflare preset only):
10
11
  *
@@ -27,12 +28,15 @@
27
28
  *
28
29
  * Span duration note: enterSpan ends a span when its callback's returned value
29
30
  * (or promise) settles. For the streaming phases (request/render/ssr) that is at
30
- * stream CONSTRUCTION, not body-drain. Instrumentation is best-effort and never
31
- * wraps or buffers the response body, so it cannot regress streaming or latency.
32
- * A loader/Suspense child that resolves mid-stream therefore keeps a rango.loader
33
- * span that can extend past its render parent overlapping spans are valid. Uses
34
- * only the typed enterSpan API; spans bound work up to stream-handoff, matching
35
- * the co-emitted perf metric.
31
+ * stream CONSTRUCTION, not body-drain; rango.response marks that handoff
32
+ * boundary explicitly (it wraps only response finalization, never the body).
33
+ * Instrumentation is best-effort and never wraps or buffers the response body,
34
+ * so it cannot regress streaming or latency. A loader/Suspense child that
35
+ * resolves mid-stream therefore keeps a rango.loader span that can extend past
36
+ * its render parent — overlapping spans are valid. Uses only the typed enterSpan
37
+ * API; spans bound work up to stream-handoff, matching the co-emitted perf
38
+ * metric. On deployed Workers a rango.response span may report 0 ms (non-I/O
39
+ * timers are frozen); its position and attributes are the value.
36
40
  */
37
41
  import { type RouterTracingConfig, type TracingToggleOptions } from "../router/tracing.js";
38
42
  /**
@@ -44,8 +48,8 @@ export type CloudflareTracingOptions = TracingToggleOptions;
44
48
  /**
45
49
  * Create the tracing config for a Cloudflare router. Pass the result to
46
50
  * `createRouter({ tracing })`. Spans are emitted for the request, middleware,
47
- * action, loaders, handler, render, and ssr phases; pass `spans` to turn
48
- * individual phases off.
51
+ * action, loaders, handler, render, ssr, response, and background phases; pass
52
+ * `spans` to turn individual phases off.
49
53
  *
50
54
  * @see createOTelTracing (`@rangojs/router`) for the same slot on any platform
51
55
  * with an OpenTelemetry SDK.
@@ -5,13 +5,11 @@
5
5
  * The router exposes the same work on three surfaces, and the rule is: each
6
6
  * surface has exactly one owner here, so they cannot drift.
7
7
  *
8
- * - observePhase(): a span of work. Co-emits the `debugPerformance` perf
9
- * metric (metrics store -> [RSC Perf] timeline + Server-Timing) AND the
10
- * platform span (tracing runner -> Cloudflare custom spans / OTel). From one
11
- * wrap site, so the span set is always a subset of the perf phases and the
12
- * two can't disagree. Phases that meter their own perf metric with a finer
13
- * decomposition (request, middleware) pass `metric: false` and get the span
14
- * only — still co-located, still one owner per surface.
8
+ * - observePhase(): a span of work. From one wrap site, emits the platform
9
+ * span (tracing runner -> Cloudflare custom spans / OTel) and, when the
10
+ * phase has one, its `debugPerformance` metric (metrics store -> [RSC Perf]
11
+ * timeline + Server-Timing). Phases that meter their own perf metric with a
12
+ * finer decomposition, or are deliberately span-only, pass `metric: false`.
15
13
  * - observeEvent(): a discrete fact (TelemetrySink): cache decisions,
16
14
  * revalidation decisions, handler errors, timeouts, origin rejections.
17
15
  * Event-shaped, not phase-shaped — derived from the same call sites but a
@@ -59,6 +57,11 @@ export interface PhaseSpec {
59
57
  */
60
58
  lazyAttributes?: () => Record<string, string | number | boolean> | undefined;
61
59
  }
60
+ /**
61
+ * The detached background lanes wrapped by the rango.background span (the
62
+ * `rango.background.kind` attribute). One name per task execution boundary.
63
+ */
64
+ export type BackgroundTaskKind = "shell-capture" | "document-revalidation" | "loader-revalidation" | "use-cache-revalidation";
62
65
  /**
63
66
  * The router's observable phases. One definition per phase keeps the `rango.*`
64
67
  * span names, perf-metric labels, and identifying attributes from spreading
@@ -99,6 +102,32 @@ export declare const PHASES: {
99
102
  /** SSR HTML render from the RSC stream. Colon-delimited like the other ssr:*
100
103
  * setup metrics (ssr:module-load / ssr:stream-mode). */
101
104
  readonly ssr: PhaseSpec;
105
+ /**
106
+ * One detached background task (waitUntil work that outlives the response):
107
+ * a PPR shell capture or an SWR background revalidation. The wrapper is the
108
+ * explanatory parent for everything the task does — the platform's automatic
109
+ * KV/fetch/cache spans, and (for the revalidation lanes) the re-run's own
110
+ * rango.* phase spans — so post-handoff work never appears as orphan spans
111
+ * dangling under an ended foreground phase. `kind` identifies the lane.
112
+ * Span only (metric:false): the perf timeline is finalized with the
113
+ * response, so a background metric could never reach it. The shell-capture
114
+ * lane keeps its INNER phase spans suppressed (derived context strips
115
+ * _tracing — a capture re-render duplicating the foreground's span set was
116
+ * the original #670 leak); the revalidation lanes keep theirs, nested here.
117
+ */
118
+ readonly background: (kind: BackgroundTaskKind) => PhaseSpec;
119
+ /** Final response construction + host handoff: opened AFTER downstream
120
+ * middleware/core execution returns a Response, wrapping only finalization
121
+ * (redirect interception/guarding, Server-Timing mutation, final response
122
+ * selection) and ending immediately before the router handler returns the
123
+ * response to the host. Handoff-bound, never drain-bound — it must never
124
+ * read, tee, buffer, or await response.body, so it cannot regress streaming.
125
+ * At most one per traced request; absent when the request throws before a
126
+ * response exists. Span only (metric:false) — a co-emitted metric would
127
+ * circularly mutate the Server-Timing header this phase itself finalizes.
128
+ * On Cloudflare it may report 0 ms (non-I/O timers are frozen); its position
129
+ * and attributes (status/mode/body kind, set by the handler) are the value. */
130
+ readonly response: PhaseSpec;
102
131
  };
103
132
  /**
104
133
  * Instrument one unit of work: open its span AND (unless `metric: false`) record
@@ -108,14 +137,15 @@ export declare const PHASES: {
108
137
  * returns a promise both the metric duration and the span end when it settles.
109
138
  *
110
139
  * This is the ONLY phase primitive: every phase (request/middleware/action/
111
- * loader/handler/render/ssr) is construction-bound the span and metric settle
112
- * when fn's own work completes (for the streaming phases, when the RSC/HTML
113
- * stream is constructed, NOT when the body drains). Instrumentation is strictly
114
- * best-effort: it never wraps or buffers the response and adds no work on the
115
- * streaming path, so it cannot regress response latency or streaming. A loader
116
- * that resolves while the body streams therefore keeps a rango.loader span that
117
- * may extend past its render parent overlapping spans are valid; the loader
118
- * really did take that long.
140
+ * loader/handler/render/ssr/response/background) settles when fn's own work
141
+ * completes. For streaming phases that means when the RSC/HTML stream is
142
+ * constructed, NOT when the body drains; for response, when finalization hands
143
+ * the stream to the host. Instrumentation is strictly best-effort: it never
144
+ * wraps or buffers the response and adds no work on the streaming path, so it
145
+ * cannot regress response latency or streaming. A loader that resolves while
146
+ * the body streams therefore keeps a rango.loader span that may extend past its
147
+ * render parent — overlapping spans are valid; the loader really did take that
148
+ * long.
119
149
  *
120
150
  * Reads the metrics store + tracing off the RequestContext ALS, which is active
121
151
  * for the WHOLE request — contrast observeEvent, which reads the RouterContext
@@ -6,10 +6,10 @@
6
6
  * - createOTelTracing(tracer): the OTel adapter for the `tracing` SLOT — the
7
7
  * canonical phase-span layer. It bridges observePhase's callback boundary
8
8
  * onto OTel's callback-bound `startActiveSpan`, so the router's phase spans
9
- * (rango.request/middleware/loader/render/ssr) nest by async context and the
10
- * loader's own OTel spans (db/fetch) land under rango.loader. This is the
11
- * OTel equivalent of createCloudflareTracing pass it to
12
- * `createRouter({ tracing })`.
9
+ * (rango.request/middleware/action/loader/handler/render/ssr/response/
10
+ * background) nest by async context and the loader's own OTel spans
11
+ * (db/fetch) land under rango.loader. This is the OTel equivalent of
12
+ * createCloudflareTracing — pass it to `createRouter({ tracing })`.
13
13
  *
14
14
  * - createOTelSink(tracer): the OTel adapter for the `telemetry` SLOT — a
15
15
  * TelemetrySink for the EVENT-shaped facts (handler errors, cache decisions,
@@ -10,7 +10,18 @@ export interface RouterTimeouts {
10
10
  actionMs?: number;
11
11
  /** Timeout for initial render/response production (ms). */
12
12
  renderStartMs?: number;
13
- /** Timeout for idle streaming after render starts (ms). Reserved for PR 2. */
13
+ /**
14
+ * Timeout for idle streaming after the response is handed off (ms): when no
15
+ * chunk flows to the client for this long, the body stream is errored with a
16
+ * RouterTimeoutError ("stream-idle") and the source render is canceled —
17
+ * bounding hangs from never-settling promises embedded in the payload.
18
+ * END-TO-END semantics: a stalled slow client counts as idle the same as a
19
+ * wedged producer, so pick generous budgets (seconds). Opt-in (unset =
20
+ * unbounded, and the `timeout` shorthand deliberately does not apply);
21
+ * onTimeout does NOT fire — no replacement Response can be served
22
+ * mid-stream — the trip reports via onError + the request.timeout event.
23
+ * Enforcement: rsc/stream-idle.ts, wired at the handler's response tail.
24
+ */
14
25
  streamIdleMs?: number;
15
26
  }
16
27
  export type TimeoutPhase = "action" | "render-start" | "stream-idle";
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * Span tracing hook (platform-agnostic).
3
3
  *
4
- * The core router emits its existing performance phases (request, middleware, action,
5
- * loaders, render, ssr) as spans by calling traceSpan() at a small set of
6
- * execution boundaries. When no tracing is configured the call is a direct
7
- * pass-through: fn is invoked with a no-op span, with no wrapper and no
8
- * allocation, so a non-traced request behaves exactly as before.
4
+ * The core router emits its observable phases (request, middleware, action,
5
+ * loaders, handler, render, ssr, response, background) as spans by calling
6
+ * traceSpan() at a small set of execution boundaries. When no tracing is
7
+ * configured the call is a direct pass-through: fn is invoked with a no-op
8
+ * span, with no wrapper and no allocation, so a non-traced request behaves
9
+ * exactly as before.
9
10
  *
10
11
  * A platform integration supplies a SpanRunner that wraps fn in a real span.
11
12
  * Two runners ship: the Cloudflare one (createCloudflareTracing in
@@ -29,7 +30,10 @@
29
30
  * useLoader, plus the fetchable path), rango.handler (span-only, one per segment
30
31
  * route/layout handler execution; the handler:<id> perf metric is owned by the
31
32
  * track() at the call site), rango.render (render:total:<route>; normal AND
32
- * action-revalidation renders), rango.ssr (ssr:render-html).
33
+ * action-revalidation renders), rango.ssr (ssr:render-html), rango.response
34
+ * (span-only; final response construction + host handoff — the explicit
35
+ * stream-handoff marker), and rango.background (span-only; detached work, see
36
+ * below).
33
37
  *
34
38
  * Span-duration caveat (best-effort, never buffers): a span ends when its
35
39
  * callback's value (or promise) settles. For the streaming phases (request,
@@ -40,6 +44,19 @@
40
44
  * rango.loader span that can extend past its render parent; overlapping spans are
41
45
  * valid (the loader really did take that long). Phase spans bound the work up to
42
46
  * stream-handoff, which is also what the co-emitted perf metric measures.
47
+ * rango.response makes that handoff boundary explicit: it wraps only response
48
+ * finalization (redirect interception/guarding, Server-Timing mutation, final
49
+ * response selection) after downstream execution returns, ending immediately
50
+ * before the handler returns the Response to the host. It is handoff-bound,
51
+ * never drain-bound — it never reads, tees, or awaits response.body, and it is
52
+ * absent when the request throws before a response exists.
53
+ *
54
+ * rango.background wraps DETACHED work (waitUntil tasks that outlive the
55
+ * response): PPR shell captures and SWR background revalidations. It is the
56
+ * explanatory parent for spans those tasks produce after the foreground
57
+ * phases ended — without it, post-handoff work reads as orphan spans dangling
58
+ * under an ended parent. See PHASES.background (instrument.ts) for the lane
59
+ * kinds and per-lane inner-span policy.
43
60
  *
44
61
  * Both shipped runners (Cloudflare, OTel) keep the core agnostic: the
45
62
  * platform-specific bridge lives at the edge behind the SpanRunner contract.
@@ -58,17 +75,14 @@ export interface TraceSpan {
58
75
  */
59
76
  export type SpanRunner = <T>(name: string, fn: (span: TraceSpan) => T) => T;
60
77
  /** The router phases that can be wrapped in a span. */
61
- export type TracePhase = "request" | "middleware" | "action" | "loader" | "handler" | "render" | "ssr";
62
- /** Per-phase span toggles. Omitted phases default to enabled. */
63
- export interface TracePhaseToggles {
64
- request?: boolean;
65
- middleware?: boolean;
66
- action?: boolean;
67
- loader?: boolean;
68
- handler?: boolean;
69
- render?: boolean;
70
- ssr?: boolean;
71
- }
78
+ export type TracePhase = "request" | "middleware" | "action" | "loader" | "handler" | "render" | "ssr" | "response" | "background";
79
+ /**
80
+ * Per-phase span toggles. Omitted phases default to enabled. Derived from
81
+ * TracePhase so a new phase cannot be silently missing here — the other phase
82
+ * lists in this file (ALL_PHASES_ON, resolveTracing) are exhaustiveness-checked
83
+ * by their Record<TracePhase, boolean> annotations.
84
+ */
85
+ export type TracePhaseToggles = Partial<Record<TracePhase, boolean>>;
72
86
  /**
73
87
  * The option pair shared by every tracing factory (enabled master switch +
74
88
  * per-phase span toggles). Extended by OTelTracingOptions,
@@ -1,12 +1,49 @@
1
1
  /** Bound queued/running capture closures retained by one isolate. */
2
2
  export declare const MAX_ADMITTED_CAPTURES: number;
3
+ /** Point-in-time queue occupancy, for capture-scheduling telemetry. */
4
+ export interface CaptureQueueDepths {
5
+ /** A capture is currently executing (never preempted). */
6
+ running: boolean;
7
+ /** Waiting document-priority captures (run before every navigation capture). */
8
+ document: number;
9
+ /** Waiting navigation-priority captures. */
10
+ navigation: number;
11
+ }
12
+ /**
13
+ * Snapshot the queue's waiting/running state. Wait-timed-out entries still
14
+ * sitting in the arrays (pruned lazily by takeNextCapture) are excluded — they
15
+ * will never run, so counting them would overstate the backlog.
16
+ */
17
+ export declare function captureQueueDepths(): CaptureQueueDepths;
3
18
  /** The caller may drop this best-effort capture and retry on a later request. */
4
19
  export declare class CaptureQueueFullError extends Error {
5
20
  constructor();
6
21
  }
7
22
  /**
8
- * Run `task` after every previously enqueued capture has settled. Returns a
9
- * promise for THIS task's completion (rejections propagate to the caller
10
- * the queue itself is insulated).
23
+ * Budget on how long a capture may WAIT in the queue before it is dropped
24
+ * instead of run. On workerd a queued capture rides the scheduling request's
25
+ * waitUntil, whose post-response lifetime is bounded (~30s): a capture that
26
+ * already burned 15s+ parked behind a slow predecessor would start its own
27
+ * up-to-15s attempt (captureTimeout) with no budget left and risk being
28
+ * killed mid-store-write. Dropping at the budget is safe — captures are
29
+ * best-effort by contract, and a later request re-probes the key (the drop
30
+ * does NOT mark backoff: the route is not doomed, the isolate was busy).
31
+ * Matches one attempt's SHELL_CAPTURE_MAX_WAIT_MS so wait + attempt fits the
32
+ * platform budget. Field-observed: a navigation-shell capture parked ~24s
33
+ * behind a predecessor's two-attempt cycle.
34
+ */
35
+ export declare const CAPTURE_QUEUE_WAIT_BUDGET_MS: number;
36
+ /** Thrown (async) when the queue wait exceeded the budget; the task never ran. */
37
+ export declare class CaptureQueueWaitTimeoutError extends Error {
38
+ readonly waitedMs: number;
39
+ constructor(waitedMs: number);
40
+ }
41
+ /**
42
+ * Run `task` after the active capture and every higher/equal-priority capture
43
+ * ahead of it have settled. Returns a promise for THIS task's completion
44
+ * (rejections propagate to the caller — the queue itself is insulated).
11
45
  */
12
- export declare function enqueueSerializedCapture(task: () => Promise<void>): Promise<void>;
46
+ export declare function enqueueSerializedCapture(task: () => Promise<void>, opts?: {
47
+ maxQueueWaitMs?: number;
48
+ priority?: "document" | "navigation";
49
+ }): Promise<void>;
@@ -24,7 +24,7 @@
24
24
  * as the reference instant. No tombstones — the manifest is immutable; the
25
25
  * markers say whether it is still current.
26
26
  */
27
- import type { SegmentCacheStore, ShellCacheEntry } from "../cache/types.js";
27
+ import type { DocumentShellCacheEntry, SegmentCacheStore, ShellCacheEntry } from "../cache/types.js";
28
28
  import type { SearchParamsFilter } from "../cache/search-params-filter.js";
29
29
  /** One baked manifest record (the __ps asset module's default export). */
30
30
  export interface BuildShellEntry {
@@ -49,7 +49,7 @@ declare global {
49
49
  /** Reset the memoized manifest (unit tests swap the global loader). */
50
50
  export declare function resetBuildShellManifestForTests(): void;
51
51
  export interface BuildShellHit {
52
- entry: ShellCacheEntry;
52
+ entry: DocumentShellCacheEntry;
53
53
  /** Past createdAt + ttl: serve, but schedule the runtime recapture. */
54
54
  stale: boolean;
55
55
  }
@@ -125,10 +125,18 @@ export interface ShellCaptureDebugEvent {
125
125
  * - skip-backoff: the key is inside its refused-capture backoff window and
126
126
  * the capture was not attempted
127
127
  * - skip-capacity: the isolate capture queue is full; a later request may retry
128
+ * - skip-inert-store: the resolved store's shell family is missing or
129
+ * declared inert (SegmentCacheStore.shellFamilyInert — a CFCacheStore
130
+ * without a KV namespace); nothing could store the result, so the
131
+ * background render was not scheduled at all
132
+ * - skip-queue-timeout: the capture waited past CAPTURE_QUEUE_WAIT_BUDGET_MS
133
+ * behind other captures and was dropped unrun (no backoff — the route is
134
+ * not doomed, the isolate was busy; a later request re-probes). Carries
135
+ * queueWaitMs.
128
136
  * - backoff: the key entered (or escalated) backoff after a terminal
129
137
  * no-shell — carries the new backoff state
130
138
  */
131
- outcome: "stored" | "redirect" | "no-shell" | "refused" | "error" | "skip-in-flight" | "skip-backoff" | "skip-capacity" | "backoff";
139
+ outcome: "stored" | "redirect" | "no-shell" | "refused" | "error" | "skip-in-flight" | "skip-backoff" | "skip-capacity" | "skip-inert-store" | "skip-queue-timeout" | "backoff";
132
140
  /** Attempt number (1 = first, 2 = in-place retry). Absent on skips. */
133
141
  attempt?: number;
134
142
  /** Wall-clock ms of the whole attempt (barrier + render + drain + put). */
@@ -157,6 +165,24 @@ export interface ShellCaptureDebugEvent {
157
165
  backoffFailures?: number;
158
166
  /** Ms remaining in the key's backoff window, when one exists. */
159
167
  backoffRemainingMs?: number;
168
+ /** Ms the capture waited in the serialized queue (skip-queue-timeout). */
169
+ queueWaitMs?: number;
170
+ /** Queue priority class at enqueue: document outranks queued navigation. */
171
+ queuePriority?: "document" | "navigation";
172
+ /**
173
+ * Captures ahead at enqueue: the active one plus every waiting capture of
174
+ * same-or-higher priority. 0 = this capture starts immediately.
175
+ */
176
+ queueAhead?: number;
177
+ /**
178
+ * Ms the capture gate was HELD waiting for the slowest bake source — a
179
+ * top-level pushed handle promise or a bake-lane loader container — to
180
+ * settle, measured from capture start. Bake time is by-design shell latency
181
+ * (the hole doctrine: top-level promises bake), but it recurs on EVERY
182
+ * capture of the route and occupies the serialized queue; this field makes
183
+ * it attributable. Absent when nothing held the gate.
184
+ */
185
+ bakeWaitMs?: number;
160
186
  }
161
187
  /**
162
188
  * Debug sink for the capture pipeline, mirroring {@link CFCacheDebug}: `true`
@@ -316,7 +342,7 @@ type CaptureAttemptOutcome = "stored" | "redirect" | "no-shell" | "refused";
316
342
  * bag, not a return value: captureAndStoreShell's outcome type stays a string
317
343
  * union its existing callers (producer B, tests) consume unchanged.
318
344
  */
319
- type CaptureAttemptStats = Pick<ShellCaptureDebugEvent, "barrierWaitMs" | "writeSettleMs" | "preludeBytes" | "snapshotBytes" | "snapshotSkipped" | "untaggedBake" | "storeWrite">;
345
+ type CaptureAttemptStats = Pick<ShellCaptureDebugEvent, "barrierWaitMs" | "writeSettleMs" | "preludeBytes" | "snapshotBytes" | "snapshotSkipped" | "untaggedBake" | "storeWrite" | "bakeWaitMs">;
320
346
  /**
321
347
  * Run the shell capture with a single in-place retry, then store the result.
322
348
  *
@@ -17,7 +17,7 @@
17
17
  */
18
18
  import { type EntryData } from "../server/context.js";
19
19
  import type { SearchParamsFilter } from "../cache/search-params-filter.js";
20
- import type { ShellCacheEntry, SegmentCacheStore } from "../cache/types.js";
20
+ import type { DocumentShellCacheEntry, ShellCacheEntry, SegmentCacheStore } from "../cache/types.js";
21
21
  /** Debug/status header the browser (and e2e assertions) can read: HIT | MISS. */
22
22
  export declare const SHELL_STATUS_HEADER = "x-rango-shell";
23
23
  /** Partial-navigation status header set only after captured PPR segments are consumed. */
@@ -106,18 +106,24 @@ export declare function buildShellKey(url: URL, filter?: SearchParamsFilter): st
106
106
  */
107
107
  export declare function isValidShellHit(entry: ShellCacheEntry, buildVersion: string): boolean;
108
108
  /**
109
- * Payload integrity gate, run BEFORE the HIT response commits: a stored entry
110
- * whose prelude is not decodable base64 or whose postponed blob is not
111
- * parseable JSON would otherwise throw AFTER the 200 + full static prelude
112
- * flushed (`serveShellHit` decodes at stream construction, `resumeShellHTML`
113
- * parses in the tail) — the client gets a visually complete page that never
114
- * hydrates, re-served on every request until the entry ages out (no eviction
115
- * path exists; failure schedules no recapture by itself). Checking here turns
116
- * a corrupt entry (store-layer fault) into a plain MISS the recapture
117
- * overwrites. Cost: one duplicate decode/parse per HIT, sub-ms against a
118
- * prelude flush that dominates the path.
109
+ * DOCUMENT-half integrity gate and type narrowing, run BEFORE the HIT response
110
+ * commits: a stored entry whose prelude is not decodable base64 or whose
111
+ * postponed blob is not parseable JSON would otherwise throw AFTER the 200 +
112
+ * full static prelude flushed (`serveShellHit` decodes at stream construction,
113
+ * `resumeShellHTML` parses in the tail) — the client gets a visually complete
114
+ * page that never hydrates, re-served on every request until the entry ages
115
+ * out (no eviction path exists; failure schedules no recapture by itself).
116
+ * Checking here turns a corrupt entry (store-layer fault) into a plain MISS
117
+ * the recapture overwrites. Cost: one duplicate decode/parse per HIT, sub-ms
118
+ * against a prelude flush that dominates the path.
119
+ *
120
+ * navigationOnly entries store no document half (prelude/postponed absent) and
121
+ * therefore never pass. The partial-replay path skips this gate for them
122
+ * (replayableShellSnapshot) — snapshot fragment corruption is caught by the
123
+ * consumer-side Flight decoders instead (SegmentFragmentDecodeError → healing
124
+ * capture).
119
125
  */
120
- export declare function hasIntactShellPayload(entry: ShellCacheEntry): boolean;
126
+ export declare function hasIntactShellPayload(entry: ShellCacheEntry): entry is DocumentShellCacheEntry;
121
127
  /** Decode a base64 prelude back into bytes for stream composition. */
122
128
  export declare function base64ToBytes(b64: string): Uint8Array;
123
129
  /** True when the store implements the shell entry family. */