@rangojs/router 0.4.2 → 0.4.3

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 (837) hide show
  1. package/dist/types/browser/prefetch/cache.d.ts +11 -8
  2. package/dist/types/cache/read-through-swr.d.ts +7 -6
  3. package/dist/types/cloudflare/tracing.d.ts +16 -12
  4. package/dist/types/router/instrument.d.ts +45 -15
  5. package/dist/types/router/telemetry-otel.d.ts +4 -4
  6. package/dist/types/router/timeout.d.ts +12 -1
  7. package/dist/types/router/tracing.d.ts +31 -17
  8. package/dist/types/rsc/capture-queue.d.ts +22 -1
  9. package/dist/types/rsc/shell-capture.d.ts +7 -1
  10. package/dist/types/rsc/stream-idle.d.ts +60 -0
  11. package/dist/types/server/request-context.d.ts +7 -1
  12. package/dist/types/vercel/tracing.d.ts +9 -8
  13. package/dist/vite/index.js +1 -1
  14. package/package.json +1 -1
  15. package/skills/observability/SKILL.md +33 -4
  16. package/src/browser/prefetch/cache.ts +22 -10
  17. package/src/cache/cache-runtime.ts +39 -25
  18. package/src/cache/document-cache.ts +39 -23
  19. package/src/cache/read-through-swr.ts +22 -16
  20. package/src/cloudflare/tracing.ts +16 -12
  21. package/src/router/instrument.ts +61 -15
  22. package/src/router/segment-resolution/loader-cache.ts +12 -1
  23. package/src/router/segment-resolution/revalidation.ts +16 -1
  24. package/src/router/telemetry-otel.ts +4 -4
  25. package/src/router/timeout.ts +12 -1
  26. package/src/router/tracing.ts +37 -17
  27. package/src/rsc/capture-queue.ts +72 -17
  28. package/src/rsc/handler.ts +171 -73
  29. package/src/rsc/shell-capture.ts +64 -12
  30. package/src/rsc/stream-idle.ts +137 -0
  31. package/src/server/request-context.ts +8 -0
  32. package/src/testing/dispatch.ts +55 -1
  33. package/src/vercel/tracing.ts +9 -8
  34. package/dist/__internal.d.ts +0 -83
  35. package/dist/__internal.d.ts.map +0 -1
  36. package/dist/__internal.js +0 -19
  37. package/dist/__internal.js.map +0 -1
  38. package/dist/__mocks__/version.d.ts +0 -7
  39. package/dist/__mocks__/version.d.ts.map +0 -1
  40. package/dist/__mocks__/version.js +0 -7
  41. package/dist/__mocks__/version.js.map +0 -1
  42. package/dist/__tests__/client-href.test.d.ts +0 -2
  43. package/dist/__tests__/client-href.test.d.ts.map +0 -1
  44. package/dist/__tests__/client-href.test.js +0 -74
  45. package/dist/__tests__/client-href.test.js.map +0 -1
  46. package/dist/__tests__/component-utils.test.d.ts +0 -2
  47. package/dist/__tests__/component-utils.test.d.ts.map +0 -1
  48. package/dist/__tests__/component-utils.test.js +0 -51
  49. package/dist/__tests__/component-utils.test.js.map +0 -1
  50. package/dist/__tests__/event-controller.test.d.ts +0 -2
  51. package/dist/__tests__/event-controller.test.d.ts.map +0 -1
  52. package/dist/__tests__/event-controller.test.js +0 -538
  53. package/dist/__tests__/event-controller.test.js.map +0 -1
  54. package/dist/__tests__/helpers/route-tree.d.ts +0 -118
  55. package/dist/__tests__/helpers/route-tree.d.ts.map +0 -1
  56. package/dist/__tests__/helpers/route-tree.js +0 -374
  57. package/dist/__tests__/helpers/route-tree.js.map +0 -1
  58. package/dist/__tests__/match-result.test.d.ts +0 -2
  59. package/dist/__tests__/match-result.test.d.ts.map +0 -1
  60. package/dist/__tests__/match-result.test.js +0 -154
  61. package/dist/__tests__/match-result.test.js.map +0 -1
  62. package/dist/__tests__/navigation-store.test.d.ts +0 -2
  63. package/dist/__tests__/navigation-store.test.d.ts.map +0 -1
  64. package/dist/__tests__/navigation-store.test.js +0 -440
  65. package/dist/__tests__/navigation-store.test.js.map +0 -1
  66. package/dist/__tests__/partial-update.test.d.ts +0 -2
  67. package/dist/__tests__/partial-update.test.d.ts.map +0 -1
  68. package/dist/__tests__/partial-update.test.js +0 -1009
  69. package/dist/__tests__/partial-update.test.js.map +0 -1
  70. package/dist/__tests__/reverse-types.test.d.ts +0 -8
  71. package/dist/__tests__/reverse-types.test.d.ts.map +0 -1
  72. package/dist/__tests__/reverse-types.test.js +0 -656
  73. package/dist/__tests__/reverse-types.test.js.map +0 -1
  74. package/dist/__tests__/route-definition.test.d.ts +0 -2
  75. package/dist/__tests__/route-definition.test.d.ts.map +0 -1
  76. package/dist/__tests__/route-definition.test.js +0 -55
  77. package/dist/__tests__/route-definition.test.js.map +0 -1
  78. package/dist/__tests__/router-helpers.test.d.ts +0 -2
  79. package/dist/__tests__/router-helpers.test.d.ts.map +0 -1
  80. package/dist/__tests__/router-helpers.test.js +0 -377
  81. package/dist/__tests__/router-helpers.test.js.map +0 -1
  82. package/dist/__tests__/router-integration-2.test.d.ts +0 -2
  83. package/dist/__tests__/router-integration-2.test.d.ts.map +0 -1
  84. package/dist/__tests__/router-integration-2.test.js +0 -426
  85. package/dist/__tests__/router-integration-2.test.js.map +0 -1
  86. package/dist/__tests__/router-integration.test.d.ts +0 -2
  87. package/dist/__tests__/router-integration.test.d.ts.map +0 -1
  88. package/dist/__tests__/router-integration.test.js +0 -1051
  89. package/dist/__tests__/router-integration.test.js.map +0 -1
  90. package/dist/__tests__/search-params.test.d.ts +0 -5
  91. package/dist/__tests__/search-params.test.d.ts.map +0 -1
  92. package/dist/__tests__/search-params.test.js +0 -306
  93. package/dist/__tests__/search-params.test.js.map +0 -1
  94. package/dist/__tests__/segment-system.test.d.ts +0 -2
  95. package/dist/__tests__/segment-system.test.d.ts.map +0 -1
  96. package/dist/__tests__/segment-system.test.js +0 -627
  97. package/dist/__tests__/segment-system.test.js.map +0 -1
  98. package/dist/__tests__/static-handler-types.test.d.ts +0 -8
  99. package/dist/__tests__/static-handler-types.test.d.ts.map +0 -1
  100. package/dist/__tests__/static-handler-types.test.js +0 -63
  101. package/dist/__tests__/static-handler-types.test.js.map +0 -1
  102. package/dist/__tests__/urls.test.d.ts +0 -2
  103. package/dist/__tests__/urls.test.d.ts.map +0 -1
  104. package/dist/__tests__/urls.test.js +0 -421
  105. package/dist/__tests__/urls.test.js.map +0 -1
  106. package/dist/__tests__/use-mount.test.d.ts +0 -2
  107. package/dist/__tests__/use-mount.test.d.ts.map +0 -1
  108. package/dist/__tests__/use-mount.test.js +0 -35
  109. package/dist/__tests__/use-mount.test.js.map +0 -1
  110. package/dist/bin/rango.d.ts +0 -2
  111. package/dist/bin/rango.d.ts.map +0 -1
  112. package/dist/bin/rango.js.map +0 -1
  113. package/dist/browser/event-controller.d.ts +0 -191
  114. package/dist/browser/event-controller.d.ts.map +0 -1
  115. package/dist/browser/event-controller.js +0 -559
  116. package/dist/browser/event-controller.js.map +0 -1
  117. package/dist/browser/index.d.ts +0 -2
  118. package/dist/browser/index.d.ts.map +0 -1
  119. package/dist/browser/index.js +0 -14
  120. package/dist/browser/index.js.map +0 -1
  121. package/dist/browser/link-interceptor.d.ts +0 -38
  122. package/dist/browser/link-interceptor.d.ts.map +0 -1
  123. package/dist/browser/link-interceptor.js +0 -99
  124. package/dist/browser/link-interceptor.js.map +0 -1
  125. package/dist/browser/logging.d.ts +0 -10
  126. package/dist/browser/logging.d.ts.map +0 -1
  127. package/dist/browser/logging.js +0 -29
  128. package/dist/browser/logging.js.map +0 -1
  129. package/dist/browser/lru-cache.d.ts +0 -17
  130. package/dist/browser/lru-cache.d.ts.map +0 -1
  131. package/dist/browser/lru-cache.js +0 -50
  132. package/dist/browser/lru-cache.js.map +0 -1
  133. package/dist/browser/merge-segment-loaders.d.ts +0 -39
  134. package/dist/browser/merge-segment-loaders.d.ts.map +0 -1
  135. package/dist/browser/merge-segment-loaders.js +0 -102
  136. package/dist/browser/merge-segment-loaders.js.map +0 -1
  137. package/dist/browser/navigation-bridge.d.ts +0 -102
  138. package/dist/browser/navigation-bridge.d.ts.map +0 -1
  139. package/dist/browser/navigation-bridge.js +0 -708
  140. package/dist/browser/navigation-bridge.js.map +0 -1
  141. package/dist/browser/navigation-client.d.ts +0 -25
  142. package/dist/browser/navigation-client.d.ts.map +0 -1
  143. package/dist/browser/navigation-client.js +0 -157
  144. package/dist/browser/navigation-client.js.map +0 -1
  145. package/dist/browser/navigation-store.d.ts +0 -101
  146. package/dist/browser/navigation-store.d.ts.map +0 -1
  147. package/dist/browser/navigation-store.js +0 -625
  148. package/dist/browser/navigation-store.js.map +0 -1
  149. package/dist/browser/partial-update.d.ts +0 -75
  150. package/dist/browser/partial-update.d.ts.map +0 -1
  151. package/dist/browser/partial-update.js +0 -426
  152. package/dist/browser/partial-update.js.map +0 -1
  153. package/dist/browser/react/Link.d.ts +0 -86
  154. package/dist/browser/react/Link.d.ts.map +0 -1
  155. package/dist/browser/react/Link.js +0 -128
  156. package/dist/browser/react/Link.js.map +0 -1
  157. package/dist/browser/react/NavigationProvider.d.ts +0 -63
  158. package/dist/browser/react/NavigationProvider.d.ts.map +0 -1
  159. package/dist/browser/react/NavigationProvider.js +0 -216
  160. package/dist/browser/react/NavigationProvider.js.map +0 -1
  161. package/dist/browser/react/ScrollRestoration.d.ts +0 -75
  162. package/dist/browser/react/ScrollRestoration.d.ts.map +0 -1
  163. package/dist/browser/react/ScrollRestoration.js +0 -57
  164. package/dist/browser/react/ScrollRestoration.js.map +0 -1
  165. package/dist/browser/react/context.d.ts +0 -46
  166. package/dist/browser/react/context.d.ts.map +0 -1
  167. package/dist/browser/react/context.js +0 -10
  168. package/dist/browser/react/context.js.map +0 -1
  169. package/dist/browser/react/index.d.ts +0 -11
  170. package/dist/browser/react/index.d.ts.map +0 -1
  171. package/dist/browser/react/index.js +0 -22
  172. package/dist/browser/react/index.js.map +0 -1
  173. package/dist/browser/react/location-state-shared.d.ts +0 -63
  174. package/dist/browser/react/location-state-shared.d.ts.map +0 -1
  175. package/dist/browser/react/location-state-shared.js +0 -81
  176. package/dist/browser/react/location-state-shared.js.map +0 -1
  177. package/dist/browser/react/location-state.d.ts +0 -23
  178. package/dist/browser/react/location-state.d.ts.map +0 -1
  179. package/dist/browser/react/location-state.js +0 -29
  180. package/dist/browser/react/location-state.js.map +0 -1
  181. package/dist/browser/react/mount-context.d.ts +0 -24
  182. package/dist/browser/react/mount-context.d.ts.map +0 -1
  183. package/dist/browser/react/mount-context.js +0 -24
  184. package/dist/browser/react/mount-context.js.map +0 -1
  185. package/dist/browser/react/use-action.d.ts +0 -64
  186. package/dist/browser/react/use-action.d.ts.map +0 -1
  187. package/dist/browser/react/use-action.js +0 -134
  188. package/dist/browser/react/use-action.js.map +0 -1
  189. package/dist/browser/react/use-client-cache.d.ts +0 -41
  190. package/dist/browser/react/use-client-cache.d.ts.map +0 -1
  191. package/dist/browser/react/use-client-cache.js +0 -39
  192. package/dist/browser/react/use-client-cache.js.map +0 -1
  193. package/dist/browser/react/use-handle.d.ts +0 -31
  194. package/dist/browser/react/use-handle.d.ts.map +0 -1
  195. package/dist/browser/react/use-handle.js +0 -144
  196. package/dist/browser/react/use-handle.js.map +0 -1
  197. package/dist/browser/react/use-href.d.ts +0 -33
  198. package/dist/browser/react/use-href.d.ts.map +0 -1
  199. package/dist/browser/react/use-href.js +0 -39
  200. package/dist/browser/react/use-href.js.map +0 -1
  201. package/dist/browser/react/use-link-status.d.ts +0 -37
  202. package/dist/browser/react/use-link-status.d.ts.map +0 -1
  203. package/dist/browser/react/use-link-status.js +0 -99
  204. package/dist/browser/react/use-link-status.js.map +0 -1
  205. package/dist/browser/react/use-mount.d.ts +0 -25
  206. package/dist/browser/react/use-mount.d.ts.map +0 -1
  207. package/dist/browser/react/use-mount.js +0 -30
  208. package/dist/browser/react/use-mount.js.map +0 -1
  209. package/dist/browser/react/use-navigation.d.ts +0 -27
  210. package/dist/browser/react/use-navigation.d.ts.map +0 -1
  211. package/dist/browser/react/use-navigation.js +0 -87
  212. package/dist/browser/react/use-navigation.js.map +0 -1
  213. package/dist/browser/react/use-segments.d.ts +0 -38
  214. package/dist/browser/react/use-segments.d.ts.map +0 -1
  215. package/dist/browser/react/use-segments.js +0 -130
  216. package/dist/browser/react/use-segments.js.map +0 -1
  217. package/dist/browser/request-controller.d.ts +0 -26
  218. package/dist/browser/request-controller.d.ts.map +0 -1
  219. package/dist/browser/request-controller.js +0 -147
  220. package/dist/browser/request-controller.js.map +0 -1
  221. package/dist/browser/rsc-router.d.ts +0 -129
  222. package/dist/browser/rsc-router.d.ts.map +0 -1
  223. package/dist/browser/rsc-router.js +0 -195
  224. package/dist/browser/rsc-router.js.map +0 -1
  225. package/dist/browser/scroll-restoration.d.ts +0 -93
  226. package/dist/browser/scroll-restoration.d.ts.map +0 -1
  227. package/dist/browser/scroll-restoration.js +0 -321
  228. package/dist/browser/scroll-restoration.js.map +0 -1
  229. package/dist/browser/segment-structure-assert.d.ts +0 -17
  230. package/dist/browser/segment-structure-assert.d.ts.map +0 -1
  231. package/dist/browser/segment-structure-assert.js +0 -59
  232. package/dist/browser/segment-structure-assert.js.map +0 -1
  233. package/dist/browser/server-action-bridge.d.ts +0 -26
  234. package/dist/browser/server-action-bridge.d.ts.map +0 -1
  235. package/dist/browser/server-action-bridge.js +0 -668
  236. package/dist/browser/server-action-bridge.js.map +0 -1
  237. package/dist/browser/shallow.d.ts +0 -12
  238. package/dist/browser/shallow.d.ts.map +0 -1
  239. package/dist/browser/shallow.js +0 -34
  240. package/dist/browser/shallow.js.map +0 -1
  241. package/dist/browser/types.d.ts +0 -369
  242. package/dist/browser/types.d.ts.map +0 -1
  243. package/dist/browser/types.js +0 -2
  244. package/dist/browser/types.js.map +0 -1
  245. package/dist/build/__tests__/generate-cli.test.d.ts +0 -2
  246. package/dist/build/__tests__/generate-cli.test.d.ts.map +0 -1
  247. package/dist/build/__tests__/generate-cli.test.js +0 -237
  248. package/dist/build/__tests__/generate-cli.test.js.map +0 -1
  249. package/dist/build/__tests__/generate-manifest.test.d.ts +0 -2
  250. package/dist/build/__tests__/generate-manifest.test.d.ts.map +0 -1
  251. package/dist/build/__tests__/generate-manifest.test.js +0 -119
  252. package/dist/build/__tests__/generate-manifest.test.js.map +0 -1
  253. package/dist/build/__tests__/generate-route-types.test.d.ts +0 -2
  254. package/dist/build/__tests__/generate-route-types.test.d.ts.map +0 -1
  255. package/dist/build/__tests__/generate-route-types.test.js +0 -620
  256. package/dist/build/__tests__/generate-route-types.test.js.map +0 -1
  257. package/dist/build/__tests__/per-router-manifest.test.d.ts +0 -2
  258. package/dist/build/__tests__/per-router-manifest.test.d.ts.map +0 -1
  259. package/dist/build/__tests__/per-router-manifest.test.js +0 -308
  260. package/dist/build/__tests__/per-router-manifest.test.js.map +0 -1
  261. package/dist/build/generate-manifest.d.ts +0 -81
  262. package/dist/build/generate-manifest.d.ts.map +0 -1
  263. package/dist/build/generate-manifest.js +0 -276
  264. package/dist/build/generate-manifest.js.map +0 -1
  265. package/dist/build/generate-route-types.d.ts +0 -115
  266. package/dist/build/generate-route-types.d.ts.map +0 -1
  267. package/dist/build/generate-route-types.js +0 -740
  268. package/dist/build/generate-route-types.js.map +0 -1
  269. package/dist/build/index.d.ts +0 -21
  270. package/dist/build/index.d.ts.map +0 -1
  271. package/dist/build/index.js +0 -21
  272. package/dist/build/index.js.map +0 -1
  273. package/dist/build/route-trie.d.ts +0 -71
  274. package/dist/build/route-trie.d.ts.map +0 -1
  275. package/dist/build/route-trie.js +0 -175
  276. package/dist/build/route-trie.js.map +0 -1
  277. package/dist/cache/__tests__/cache-scope.test.d.ts +0 -2
  278. package/dist/cache/__tests__/cache-scope.test.d.ts.map +0 -1
  279. package/dist/cache/__tests__/cache-scope.test.js +0 -208
  280. package/dist/cache/__tests__/cache-scope.test.js.map +0 -1
  281. package/dist/cache/__tests__/document-cache.test.d.ts +0 -2
  282. package/dist/cache/__tests__/document-cache.test.d.ts.map +0 -1
  283. package/dist/cache/__tests__/document-cache.test.js +0 -345
  284. package/dist/cache/__tests__/document-cache.test.js.map +0 -1
  285. package/dist/cache/__tests__/memory-segment-store.test.d.ts +0 -2
  286. package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +0 -1
  287. package/dist/cache/__tests__/memory-segment-store.test.js +0 -425
  288. package/dist/cache/__tests__/memory-segment-store.test.js.map +0 -1
  289. package/dist/cache/__tests__/memory-store.test.d.ts +0 -2
  290. package/dist/cache/__tests__/memory-store.test.d.ts.map +0 -1
  291. package/dist/cache/__tests__/memory-store.test.js +0 -367
  292. package/dist/cache/__tests__/memory-store.test.js.map +0 -1
  293. package/dist/cache/cache-scope.d.ts +0 -102
  294. package/dist/cache/cache-scope.d.ts.map +0 -1
  295. package/dist/cache/cache-scope.js +0 -440
  296. package/dist/cache/cache-scope.js.map +0 -1
  297. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +0 -2
  298. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +0 -1
  299. package/dist/cache/cf/__tests__/cf-cache-store.test.js +0 -330
  300. package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +0 -1
  301. package/dist/cache/cf/cf-cache-store.d.ts +0 -165
  302. package/dist/cache/cf/cf-cache-store.d.ts.map +0 -1
  303. package/dist/cache/cf/cf-cache-store.js +0 -242
  304. package/dist/cache/cf/cf-cache-store.js.map +0 -1
  305. package/dist/cache/cf/index.d.ts +0 -14
  306. package/dist/cache/cf/index.d.ts.map +0 -1
  307. package/dist/cache/cf/index.js +0 -17
  308. package/dist/cache/cf/index.js.map +0 -1
  309. package/dist/cache/document-cache.d.ts +0 -64
  310. package/dist/cache/document-cache.d.ts.map +0 -1
  311. package/dist/cache/document-cache.js +0 -228
  312. package/dist/cache/document-cache.js.map +0 -1
  313. package/dist/cache/index.d.ts +0 -19
  314. package/dist/cache/index.d.ts.map +0 -1
  315. package/dist/cache/index.js +0 -21
  316. package/dist/cache/index.js.map +0 -1
  317. package/dist/cache/memory-segment-store.d.ts +0 -110
  318. package/dist/cache/memory-segment-store.d.ts.map +0 -1
  319. package/dist/cache/memory-segment-store.js +0 -117
  320. package/dist/cache/memory-segment-store.js.map +0 -1
  321. package/dist/cache/memory-store.d.ts +0 -41
  322. package/dist/cache/memory-store.d.ts.map +0 -1
  323. package/dist/cache/memory-store.js +0 -191
  324. package/dist/cache/memory-store.js.map +0 -1
  325. package/dist/cache/types.d.ts +0 -317
  326. package/dist/cache/types.d.ts.map +0 -1
  327. package/dist/cache/types.js +0 -12
  328. package/dist/cache/types.js.map +0 -1
  329. package/dist/client.d.ts +0 -248
  330. package/dist/client.d.ts.map +0 -1
  331. package/dist/client.js +0 -367
  332. package/dist/client.js.map +0 -1
  333. package/dist/client.rsc.d.ts +0 -26
  334. package/dist/client.rsc.d.ts.map +0 -1
  335. package/dist/client.rsc.js +0 -46
  336. package/dist/client.rsc.js.map +0 -1
  337. package/dist/component-utils.d.ts +0 -36
  338. package/dist/component-utils.d.ts.map +0 -1
  339. package/dist/component-utils.js +0 -61
  340. package/dist/component-utils.js.map +0 -1
  341. package/dist/components/DefaultDocument.d.ts +0 -13
  342. package/dist/components/DefaultDocument.d.ts.map +0 -1
  343. package/dist/components/DefaultDocument.js +0 -15
  344. package/dist/components/DefaultDocument.js.map +0 -1
  345. package/dist/debug.d.ts +0 -58
  346. package/dist/debug.d.ts.map +0 -1
  347. package/dist/debug.js +0 -157
  348. package/dist/debug.js.map +0 -1
  349. package/dist/default-error-boundary.d.ts +0 -11
  350. package/dist/default-error-boundary.d.ts.map +0 -1
  351. package/dist/default-error-boundary.js +0 -45
  352. package/dist/default-error-boundary.js.map +0 -1
  353. package/dist/deps/browser.d.ts +0 -2
  354. package/dist/deps/browser.d.ts.map +0 -1
  355. package/dist/deps/browser.js +0 -3
  356. package/dist/deps/browser.js.map +0 -1
  357. package/dist/deps/html-stream-client.d.ts +0 -2
  358. package/dist/deps/html-stream-client.d.ts.map +0 -1
  359. package/dist/deps/html-stream-client.js +0 -3
  360. package/dist/deps/html-stream-client.js.map +0 -1
  361. package/dist/deps/html-stream-server.d.ts +0 -2
  362. package/dist/deps/html-stream-server.d.ts.map +0 -1
  363. package/dist/deps/html-stream-server.js +0 -3
  364. package/dist/deps/html-stream-server.js.map +0 -1
  365. package/dist/deps/rsc.d.ts +0 -2
  366. package/dist/deps/rsc.d.ts.map +0 -1
  367. package/dist/deps/rsc.js +0 -4
  368. package/dist/deps/rsc.js.map +0 -1
  369. package/dist/deps/ssr.d.ts +0 -2
  370. package/dist/deps/ssr.d.ts.map +0 -1
  371. package/dist/deps/ssr.js +0 -3
  372. package/dist/deps/ssr.js.map +0 -1
  373. package/dist/errors.d.ts +0 -174
  374. package/dist/errors.d.ts.map +0 -1
  375. package/dist/errors.js +0 -241
  376. package/dist/errors.js.map +0 -1
  377. package/dist/handle.d.ts +0 -78
  378. package/dist/handle.d.ts.map +0 -1
  379. package/dist/handle.js +0 -82
  380. package/dist/handle.js.map +0 -1
  381. package/dist/handles/MetaTags.d.ts +0 -14
  382. package/dist/handles/MetaTags.d.ts.map +0 -1
  383. package/dist/handles/MetaTags.js +0 -136
  384. package/dist/handles/MetaTags.js.map +0 -1
  385. package/dist/handles/index.d.ts +0 -6
  386. package/dist/handles/index.d.ts.map +0 -1
  387. package/dist/handles/index.js +0 -6
  388. package/dist/handles/index.js.map +0 -1
  389. package/dist/handles/meta.d.ts +0 -39
  390. package/dist/handles/meta.d.ts.map +0 -1
  391. package/dist/handles/meta.js +0 -202
  392. package/dist/handles/meta.js.map +0 -1
  393. package/dist/host/__tests__/errors.test.d.ts +0 -2
  394. package/dist/host/__tests__/errors.test.d.ts.map +0 -1
  395. package/dist/host/__tests__/errors.test.js +0 -76
  396. package/dist/host/__tests__/errors.test.js.map +0 -1
  397. package/dist/host/__tests__/pattern-comprehensive.test.d.ts +0 -2
  398. package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +0 -1
  399. package/dist/host/__tests__/pattern-comprehensive.test.js +0 -732
  400. package/dist/host/__tests__/pattern-comprehensive.test.js.map +0 -1
  401. package/dist/host/__tests__/pattern-matcher.test.d.ts +0 -2
  402. package/dist/host/__tests__/pattern-matcher.test.d.ts.map +0 -1
  403. package/dist/host/__tests__/pattern-matcher.test.js +0 -251
  404. package/dist/host/__tests__/pattern-matcher.test.js.map +0 -1
  405. package/dist/host/__tests__/router.test.d.ts +0 -2
  406. package/dist/host/__tests__/router.test.d.ts.map +0 -1
  407. package/dist/host/__tests__/router.test.js +0 -241
  408. package/dist/host/__tests__/router.test.js.map +0 -1
  409. package/dist/host/__tests__/testing.test.d.ts +0 -2
  410. package/dist/host/__tests__/testing.test.d.ts.map +0 -1
  411. package/dist/host/__tests__/testing.test.js +0 -64
  412. package/dist/host/__tests__/testing.test.js.map +0 -1
  413. package/dist/host/__tests__/utils.test.d.ts +0 -2
  414. package/dist/host/__tests__/utils.test.d.ts.map +0 -1
  415. package/dist/host/__tests__/utils.test.js +0 -29
  416. package/dist/host/__tests__/utils.test.js.map +0 -1
  417. package/dist/host/cookie-handler.d.ts +0 -34
  418. package/dist/host/cookie-handler.d.ts.map +0 -1
  419. package/dist/host/cookie-handler.js +0 -124
  420. package/dist/host/cookie-handler.js.map +0 -1
  421. package/dist/host/errors.d.ts +0 -56
  422. package/dist/host/errors.d.ts.map +0 -1
  423. package/dist/host/errors.js +0 -79
  424. package/dist/host/errors.js.map +0 -1
  425. package/dist/host/index.d.ts +0 -29
  426. package/dist/host/index.d.ts.map +0 -1
  427. package/dist/host/index.js +0 -32
  428. package/dist/host/index.js.map +0 -1
  429. package/dist/host/pattern-matcher.d.ts +0 -36
  430. package/dist/host/pattern-matcher.d.ts.map +0 -1
  431. package/dist/host/pattern-matcher.js +0 -172
  432. package/dist/host/pattern-matcher.js.map +0 -1
  433. package/dist/host/router.d.ts +0 -26
  434. package/dist/host/router.d.ts.map +0 -1
  435. package/dist/host/router.js +0 -218
  436. package/dist/host/router.js.map +0 -1
  437. package/dist/host/testing.d.ts +0 -36
  438. package/dist/host/testing.d.ts.map +0 -1
  439. package/dist/host/testing.js +0 -55
  440. package/dist/host/testing.js.map +0 -1
  441. package/dist/host/types.d.ts +0 -115
  442. package/dist/host/types.d.ts.map +0 -1
  443. package/dist/host/types.js +0 -7
  444. package/dist/host/types.js.map +0 -1
  445. package/dist/host/utils.d.ts +0 -21
  446. package/dist/host/utils.d.ts.map +0 -1
  447. package/dist/host/utils.js +0 -23
  448. package/dist/host/utils.js.map +0 -1
  449. package/dist/href-client.d.ts +0 -131
  450. package/dist/href-client.d.ts.map +0 -1
  451. package/dist/href-client.js +0 -64
  452. package/dist/href-client.js.map +0 -1
  453. package/dist/href-context.d.ts +0 -29
  454. package/dist/href-context.d.ts.map +0 -1
  455. package/dist/href-context.js +0 -21
  456. package/dist/href-context.js.map +0 -1
  457. package/dist/index.d.ts +0 -73
  458. package/dist/index.d.ts.map +0 -1
  459. package/dist/index.js +0 -91
  460. package/dist/index.js.map +0 -1
  461. package/dist/index.rsc.d.ts +0 -32
  462. package/dist/index.rsc.d.ts.map +0 -1
  463. package/dist/index.rsc.js +0 -40
  464. package/dist/index.rsc.js.map +0 -1
  465. package/dist/internal-debug.d.ts +0 -2
  466. package/dist/internal-debug.d.ts.map +0 -1
  467. package/dist/internal-debug.js +0 -5
  468. package/dist/internal-debug.js.map +0 -1
  469. package/dist/loader.d.ts +0 -14
  470. package/dist/loader.d.ts.map +0 -1
  471. package/dist/loader.js +0 -20
  472. package/dist/loader.js.map +0 -1
  473. package/dist/loader.rsc.d.ts +0 -19
  474. package/dist/loader.rsc.d.ts.map +0 -1
  475. package/dist/loader.rsc.js +0 -99
  476. package/dist/loader.rsc.js.map +0 -1
  477. package/dist/network-error-thrower.d.ts +0 -17
  478. package/dist/network-error-thrower.d.ts.map +0 -1
  479. package/dist/network-error-thrower.js +0 -14
  480. package/dist/network-error-thrower.js.map +0 -1
  481. package/dist/outlet-context.d.ts +0 -13
  482. package/dist/outlet-context.d.ts.map +0 -1
  483. package/dist/outlet-context.js +0 -3
  484. package/dist/outlet-context.js.map +0 -1
  485. package/dist/prerender/__tests__/param-hash.test.d.ts +0 -2
  486. package/dist/prerender/__tests__/param-hash.test.d.ts.map +0 -1
  487. package/dist/prerender/__tests__/param-hash.test.js +0 -148
  488. package/dist/prerender/__tests__/param-hash.test.js.map +0 -1
  489. package/dist/prerender/param-hash.d.ts +0 -16
  490. package/dist/prerender/param-hash.d.ts.map +0 -1
  491. package/dist/prerender/param-hash.js +0 -36
  492. package/dist/prerender/param-hash.js.map +0 -1
  493. package/dist/prerender/store.d.ts +0 -38
  494. package/dist/prerender/store.d.ts.map +0 -1
  495. package/dist/prerender/store.js +0 -61
  496. package/dist/prerender/store.js.map +0 -1
  497. package/dist/prerender.d.ts +0 -66
  498. package/dist/prerender.d.ts.map +0 -1
  499. package/dist/prerender.js +0 -57
  500. package/dist/prerender.js.map +0 -1
  501. package/dist/reverse.d.ts +0 -196
  502. package/dist/reverse.d.ts.map +0 -1
  503. package/dist/reverse.js +0 -78
  504. package/dist/reverse.js.map +0 -1
  505. package/dist/root-error-boundary.d.ts +0 -33
  506. package/dist/root-error-boundary.d.ts.map +0 -1
  507. package/dist/root-error-boundary.js +0 -165
  508. package/dist/root-error-boundary.js.map +0 -1
  509. package/dist/route-content-wrapper.d.ts +0 -46
  510. package/dist/route-content-wrapper.d.ts.map +0 -1
  511. package/dist/route-content-wrapper.js +0 -77
  512. package/dist/route-content-wrapper.js.map +0 -1
  513. package/dist/route-definition.d.ts +0 -421
  514. package/dist/route-definition.d.ts.map +0 -1
  515. package/dist/route-definition.js +0 -868
  516. package/dist/route-definition.js.map +0 -1
  517. package/dist/route-map-builder.d.ts +0 -155
  518. package/dist/route-map-builder.d.ts.map +0 -1
  519. package/dist/route-map-builder.js +0 -237
  520. package/dist/route-map-builder.js.map +0 -1
  521. package/dist/route-types.d.ts +0 -165
  522. package/dist/route-types.d.ts.map +0 -1
  523. package/dist/route-types.js +0 -7
  524. package/dist/route-types.js.map +0 -1
  525. package/dist/router/__tests__/handler-context.test.d.ts +0 -2
  526. package/dist/router/__tests__/handler-context.test.d.ts.map +0 -1
  527. package/dist/router/__tests__/handler-context.test.js +0 -65
  528. package/dist/router/__tests__/handler-context.test.js.map +0 -1
  529. package/dist/router/__tests__/loader-cycle-detection.test.d.ts +0 -2
  530. package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +0 -1
  531. package/dist/router/__tests__/loader-cycle-detection.test.js +0 -221
  532. package/dist/router/__tests__/loader-cycle-detection.test.js.map +0 -1
  533. package/dist/router/__tests__/match-context.test.d.ts +0 -2
  534. package/dist/router/__tests__/match-context.test.d.ts.map +0 -1
  535. package/dist/router/__tests__/match-context.test.js +0 -92
  536. package/dist/router/__tests__/match-context.test.js.map +0 -1
  537. package/dist/router/__tests__/match-pipelines.test.d.ts +0 -2
  538. package/dist/router/__tests__/match-pipelines.test.d.ts.map +0 -1
  539. package/dist/router/__tests__/match-pipelines.test.js +0 -417
  540. package/dist/router/__tests__/match-pipelines.test.js.map +0 -1
  541. package/dist/router/__tests__/match-result.test.d.ts +0 -2
  542. package/dist/router/__tests__/match-result.test.d.ts.map +0 -1
  543. package/dist/router/__tests__/match-result.test.js +0 -457
  544. package/dist/router/__tests__/match-result.test.js.map +0 -1
  545. package/dist/router/__tests__/on-error.test.d.ts +0 -2
  546. package/dist/router/__tests__/on-error.test.d.ts.map +0 -1
  547. package/dist/router/__tests__/on-error.test.js +0 -678
  548. package/dist/router/__tests__/on-error.test.js.map +0 -1
  549. package/dist/router/__tests__/pattern-matching.test.d.ts +0 -2
  550. package/dist/router/__tests__/pattern-matching.test.d.ts.map +0 -1
  551. package/dist/router/__tests__/pattern-matching.test.js +0 -629
  552. package/dist/router/__tests__/pattern-matching.test.js.map +0 -1
  553. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +0 -2
  554. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +0 -1
  555. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +0 -155
  556. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +0 -1
  557. package/dist/router/error-handling.d.ts +0 -77
  558. package/dist/router/error-handling.d.ts.map +0 -1
  559. package/dist/router/error-handling.js +0 -202
  560. package/dist/router/error-handling.js.map +0 -1
  561. package/dist/router/handler-context.d.ts +0 -20
  562. package/dist/router/handler-context.d.ts.map +0 -1
  563. package/dist/router/handler-context.js +0 -198
  564. package/dist/router/handler-context.js.map +0 -1
  565. package/dist/router/intercept-resolution.d.ts +0 -66
  566. package/dist/router/intercept-resolution.d.ts.map +0 -1
  567. package/dist/router/intercept-resolution.js +0 -246
  568. package/dist/router/intercept-resolution.js.map +0 -1
  569. package/dist/router/loader-resolution.d.ts +0 -64
  570. package/dist/router/loader-resolution.d.ts.map +0 -1
  571. package/dist/router/loader-resolution.js +0 -284
  572. package/dist/router/loader-resolution.js.map +0 -1
  573. package/dist/router/logging.d.ts +0 -15
  574. package/dist/router/logging.d.ts.map +0 -1
  575. package/dist/router/logging.js +0 -99
  576. package/dist/router/logging.js.map +0 -1
  577. package/dist/router/manifest.d.ts +0 -22
  578. package/dist/router/manifest.d.ts.map +0 -1
  579. package/dist/router/manifest.js +0 -181
  580. package/dist/router/manifest.js.map +0 -1
  581. package/dist/router/match-api.d.ts +0 -35
  582. package/dist/router/match-api.d.ts.map +0 -1
  583. package/dist/router/match-api.js +0 -406
  584. package/dist/router/match-api.js.map +0 -1
  585. package/dist/router/match-context.d.ts +0 -206
  586. package/dist/router/match-context.d.ts.map +0 -1
  587. package/dist/router/match-context.js +0 -17
  588. package/dist/router/match-context.js.map +0 -1
  589. package/dist/router/match-middleware/background-revalidation.d.ts +0 -127
  590. package/dist/router/match-middleware/background-revalidation.d.ts.map +0 -1
  591. package/dist/router/match-middleware/background-revalidation.js +0 -75
  592. package/dist/router/match-middleware/background-revalidation.js.map +0 -1
  593. package/dist/router/match-middleware/cache-lookup.d.ts +0 -112
  594. package/dist/router/match-middleware/cache-lookup.d.ts.map +0 -1
  595. package/dist/router/match-middleware/cache-lookup.js +0 -257
  596. package/dist/router/match-middleware/cache-lookup.js.map +0 -1
  597. package/dist/router/match-middleware/cache-store.d.ts +0 -113
  598. package/dist/router/match-middleware/cache-store.d.ts.map +0 -1
  599. package/dist/router/match-middleware/cache-store.js +0 -108
  600. package/dist/router/match-middleware/cache-store.js.map +0 -1
  601. package/dist/router/match-middleware/index.d.ts +0 -81
  602. package/dist/router/match-middleware/index.d.ts.map +0 -1
  603. package/dist/router/match-middleware/index.js +0 -80
  604. package/dist/router/match-middleware/index.js.map +0 -1
  605. package/dist/router/match-middleware/intercept-resolution.d.ts +0 -117
  606. package/dist/router/match-middleware/intercept-resolution.d.ts.map +0 -1
  607. package/dist/router/match-middleware/intercept-resolution.js +0 -134
  608. package/dist/router/match-middleware/intercept-resolution.js.map +0 -1
  609. package/dist/router/match-middleware/segment-resolution.d.ts +0 -99
  610. package/dist/router/match-middleware/segment-resolution.d.ts.map +0 -1
  611. package/dist/router/match-middleware/segment-resolution.js +0 -53
  612. package/dist/router/match-middleware/segment-resolution.js.map +0 -1
  613. package/dist/router/match-pipelines.d.ts +0 -147
  614. package/dist/router/match-pipelines.d.ts.map +0 -1
  615. package/dist/router/match-pipelines.js +0 -82
  616. package/dist/router/match-pipelines.js.map +0 -1
  617. package/dist/router/match-result.d.ts +0 -126
  618. package/dist/router/match-result.d.ts.map +0 -1
  619. package/dist/router/match-result.js +0 -93
  620. package/dist/router/match-result.js.map +0 -1
  621. package/dist/router/metrics.d.ts +0 -20
  622. package/dist/router/metrics.d.ts.map +0 -1
  623. package/dist/router/metrics.js +0 -47
  624. package/dist/router/metrics.js.map +0 -1
  625. package/dist/router/middleware.d.ts +0 -249
  626. package/dist/router/middleware.d.ts.map +0 -1
  627. package/dist/router/middleware.js +0 -434
  628. package/dist/router/middleware.js.map +0 -1
  629. package/dist/router/middleware.test.d.ts +0 -2
  630. package/dist/router/middleware.test.d.ts.map +0 -1
  631. package/dist/router/middleware.test.js +0 -816
  632. package/dist/router/middleware.test.js.map +0 -1
  633. package/dist/router/pattern-matching.d.ts +0 -149
  634. package/dist/router/pattern-matching.d.ts.map +0 -1
  635. package/dist/router/pattern-matching.js +0 -349
  636. package/dist/router/pattern-matching.js.map +0 -1
  637. package/dist/router/revalidation.d.ts +0 -44
  638. package/dist/router/revalidation.d.ts.map +0 -1
  639. package/dist/router/revalidation.js +0 -147
  640. package/dist/router/revalidation.js.map +0 -1
  641. package/dist/router/router-context.d.ts +0 -135
  642. package/dist/router/router-context.d.ts.map +0 -1
  643. package/dist/router/router-context.js +0 -36
  644. package/dist/router/router-context.js.map +0 -1
  645. package/dist/router/segment-resolution.d.ts +0 -127
  646. package/dist/router/segment-resolution.d.ts.map +0 -1
  647. package/dist/router/segment-resolution.js +0 -919
  648. package/dist/router/segment-resolution.js.map +0 -1
  649. package/dist/router/trie-matching.d.ts +0 -40
  650. package/dist/router/trie-matching.d.ts.map +0 -1
  651. package/dist/router/trie-matching.js +0 -127
  652. package/dist/router/trie-matching.js.map +0 -1
  653. package/dist/router/types.d.ts +0 -136
  654. package/dist/router/types.d.ts.map +0 -1
  655. package/dist/router/types.js +0 -7
  656. package/dist/router/types.js.map +0 -1
  657. package/dist/router.d.ts +0 -753
  658. package/dist/router.d.ts.map +0 -1
  659. package/dist/router.gen.d.ts +0 -6
  660. package/dist/router.gen.d.ts.map +0 -1
  661. package/dist/router.gen.js +0 -6
  662. package/dist/router.gen.js.map +0 -1
  663. package/dist/router.js +0 -1304
  664. package/dist/router.js.map +0 -1
  665. package/dist/rsc/__tests__/helpers.test.d.ts +0 -2
  666. package/dist/rsc/__tests__/helpers.test.d.ts.map +0 -1
  667. package/dist/rsc/__tests__/helpers.test.js +0 -140
  668. package/dist/rsc/__tests__/helpers.test.js.map +0 -1
  669. package/dist/rsc/handler.d.ts +0 -45
  670. package/dist/rsc/handler.d.ts.map +0 -1
  671. package/dist/rsc/handler.js +0 -1172
  672. package/dist/rsc/handler.js.map +0 -1
  673. package/dist/rsc/helpers.d.ts +0 -16
  674. package/dist/rsc/helpers.d.ts.map +0 -1
  675. package/dist/rsc/helpers.js +0 -55
  676. package/dist/rsc/helpers.js.map +0 -1
  677. package/dist/rsc/index.d.ts +0 -22
  678. package/dist/rsc/index.d.ts.map +0 -1
  679. package/dist/rsc/index.js +0 -23
  680. package/dist/rsc/index.js.map +0 -1
  681. package/dist/rsc/nonce.d.ts +0 -9
  682. package/dist/rsc/nonce.d.ts.map +0 -1
  683. package/dist/rsc/nonce.js +0 -18
  684. package/dist/rsc/nonce.js.map +0 -1
  685. package/dist/rsc/types.d.ts +0 -206
  686. package/dist/rsc/types.d.ts.map +0 -1
  687. package/dist/rsc/types.js +0 -8
  688. package/dist/rsc/types.js.map +0 -1
  689. package/dist/search-params.d.ts +0 -103
  690. package/dist/search-params.d.ts.map +0 -1
  691. package/dist/search-params.js +0 -74
  692. package/dist/search-params.js.map +0 -1
  693. package/dist/segment-system.d.ts +0 -75
  694. package/dist/segment-system.d.ts.map +0 -1
  695. package/dist/segment-system.js +0 -336
  696. package/dist/segment-system.js.map +0 -1
  697. package/dist/server/context.d.ts +0 -245
  698. package/dist/server/context.d.ts.map +0 -1
  699. package/dist/server/context.js +0 -197
  700. package/dist/server/context.js.map +0 -1
  701. package/dist/server/fetchable-loader-store.d.ts +0 -18
  702. package/dist/server/fetchable-loader-store.d.ts.map +0 -1
  703. package/dist/server/fetchable-loader-store.js +0 -18
  704. package/dist/server/fetchable-loader-store.js.map +0 -1
  705. package/dist/server/handle-store.d.ts +0 -85
  706. package/dist/server/handle-store.d.ts.map +0 -1
  707. package/dist/server/handle-store.js +0 -142
  708. package/dist/server/handle-store.js.map +0 -1
  709. package/dist/server/loader-registry.d.ts +0 -55
  710. package/dist/server/loader-registry.d.ts.map +0 -1
  711. package/dist/server/loader-registry.js +0 -132
  712. package/dist/server/loader-registry.js.map +0 -1
  713. package/dist/server/request-context.d.ts +0 -226
  714. package/dist/server/request-context.d.ts.map +0 -1
  715. package/dist/server/request-context.js +0 -290
  716. package/dist/server/request-context.js.map +0 -1
  717. package/dist/server/root-layout.d.ts +0 -4
  718. package/dist/server/root-layout.d.ts.map +0 -1
  719. package/dist/server/root-layout.js +0 -5
  720. package/dist/server/root-layout.js.map +0 -1
  721. package/dist/server.d.ts +0 -15
  722. package/dist/server.d.ts.map +0 -1
  723. package/dist/server.js +0 -20
  724. package/dist/server.js.map +0 -1
  725. package/dist/ssr/__tests__/ssr-handler.test.d.ts +0 -2
  726. package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +0 -1
  727. package/dist/ssr/__tests__/ssr-handler.test.js +0 -132
  728. package/dist/ssr/__tests__/ssr-handler.test.js.map +0 -1
  729. package/dist/ssr/index.d.ts +0 -98
  730. package/dist/ssr/index.d.ts.map +0 -1
  731. package/dist/ssr/index.js +0 -158
  732. package/dist/ssr/index.js.map +0 -1
  733. package/dist/static-handler.d.ts +0 -50
  734. package/dist/static-handler.d.ts.map +0 -1
  735. package/dist/static-handler.gen.d.ts +0 -5
  736. package/dist/static-handler.gen.d.ts.map +0 -1
  737. package/dist/static-handler.gen.js +0 -5
  738. package/dist/static-handler.gen.js.map +0 -1
  739. package/dist/static-handler.js +0 -29
  740. package/dist/static-handler.js.map +0 -1
  741. package/dist/theme/ThemeProvider.d.ts +0 -20
  742. package/dist/theme/ThemeProvider.d.ts.map +0 -1
  743. package/dist/theme/ThemeProvider.js +0 -240
  744. package/dist/theme/ThemeProvider.js.map +0 -1
  745. package/dist/theme/ThemeScript.d.ts +0 -48
  746. package/dist/theme/ThemeScript.d.ts.map +0 -1
  747. package/dist/theme/ThemeScript.js +0 -13
  748. package/dist/theme/ThemeScript.js.map +0 -1
  749. package/dist/theme/__tests__/theme.test.d.ts +0 -2
  750. package/dist/theme/__tests__/theme.test.d.ts.map +0 -1
  751. package/dist/theme/__tests__/theme.test.js +0 -103
  752. package/dist/theme/__tests__/theme.test.js.map +0 -1
  753. package/dist/theme/constants.d.ts +0 -29
  754. package/dist/theme/constants.d.ts.map +0 -1
  755. package/dist/theme/constants.js +0 -48
  756. package/dist/theme/constants.js.map +0 -1
  757. package/dist/theme/index.d.ts +0 -31
  758. package/dist/theme/index.d.ts.map +0 -1
  759. package/dist/theme/index.js +0 -36
  760. package/dist/theme/index.js.map +0 -1
  761. package/dist/theme/theme-context.d.ts +0 -40
  762. package/dist/theme/theme-context.d.ts.map +0 -1
  763. package/dist/theme/theme-context.js +0 -60
  764. package/dist/theme/theme-context.js.map +0 -1
  765. package/dist/theme/theme-script.d.ts +0 -27
  766. package/dist/theme/theme-script.d.ts.map +0 -1
  767. package/dist/theme/theme-script.js +0 -147
  768. package/dist/theme/theme-script.js.map +0 -1
  769. package/dist/theme/types.d.ts +0 -163
  770. package/dist/theme/types.d.ts.map +0 -1
  771. package/dist/theme/types.js +0 -11
  772. package/dist/theme/types.js.map +0 -1
  773. package/dist/theme/use-theme.d.ts +0 -12
  774. package/dist/theme/use-theme.d.ts.map +0 -1
  775. package/dist/theme/use-theme.js +0 -40
  776. package/dist/theme/use-theme.js.map +0 -1
  777. package/dist/types.d.ts +0 -1479
  778. package/dist/types.d.ts.map +0 -1
  779. package/dist/types.js +0 -10
  780. package/dist/types.js.map +0 -1
  781. package/dist/urls.d.ts +0 -441
  782. package/dist/urls.d.ts.map +0 -1
  783. package/dist/urls.gen.d.ts +0 -8
  784. package/dist/urls.gen.d.ts.map +0 -1
  785. package/dist/urls.gen.js +0 -8
  786. package/dist/urls.gen.js.map +0 -1
  787. package/dist/urls.js +0 -443
  788. package/dist/urls.js.map +0 -1
  789. package/dist/use-loader.d.ts +0 -127
  790. package/dist/use-loader.d.ts.map +0 -1
  791. package/dist/use-loader.js +0 -237
  792. package/dist/use-loader.js.map +0 -1
  793. package/dist/vite/__tests__/ast-handler-extract.test.d.ts +0 -2
  794. package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +0 -1
  795. package/dist/vite/__tests__/ast-handler-extract.test.js +0 -294
  796. package/dist/vite/__tests__/ast-handler-extract.test.js.map +0 -1
  797. package/dist/vite/__tests__/expose-id-utils.test.d.ts +0 -2
  798. package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +0 -1
  799. package/dist/vite/__tests__/expose-id-utils.test.js +0 -224
  800. package/dist/vite/__tests__/expose-id-utils.test.js.map +0 -1
  801. package/dist/vite/__tests__/expose-internal-ids.test.d.ts +0 -2
  802. package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +0 -1
  803. package/dist/vite/__tests__/expose-internal-ids.test.js +0 -647
  804. package/dist/vite/__tests__/expose-internal-ids.test.js.map +0 -1
  805. package/dist/vite/__tests__/expose-router-id.test.d.ts +0 -2
  806. package/dist/vite/__tests__/expose-router-id.test.d.ts.map +0 -1
  807. package/dist/vite/__tests__/expose-router-id.test.js +0 -39
  808. package/dist/vite/__tests__/expose-router-id.test.js.map +0 -1
  809. package/dist/vite/ast-handler-extract.d.ts +0 -49
  810. package/dist/vite/ast-handler-extract.d.ts.map +0 -1
  811. package/dist/vite/ast-handler-extract.js +0 -249
  812. package/dist/vite/ast-handler-extract.js.map +0 -1
  813. package/dist/vite/expose-action-id.d.ts +0 -19
  814. package/dist/vite/expose-action-id.d.ts.map +0 -1
  815. package/dist/vite/expose-action-id.js +0 -250
  816. package/dist/vite/expose-action-id.js.map +0 -1
  817. package/dist/vite/expose-id-utils.d.ts +0 -69
  818. package/dist/vite/expose-id-utils.d.ts.map +0 -1
  819. package/dist/vite/expose-id-utils.js +0 -289
  820. package/dist/vite/expose-id-utils.js.map +0 -1
  821. package/dist/vite/expose-internal-ids.d.ts +0 -22
  822. package/dist/vite/expose-internal-ids.d.ts.map +0 -1
  823. package/dist/vite/expose-internal-ids.js +0 -886
  824. package/dist/vite/expose-internal-ids.js.map +0 -1
  825. package/dist/vite/index.d.ts +0 -149
  826. package/dist/vite/index.d.ts.map +0 -1
  827. package/dist/vite/index.js.bak +0 -5448
  828. package/dist/vite/index.js.map +0 -1
  829. package/dist/vite/index.named-routes.gen.ts +0 -103
  830. package/dist/vite/package-resolution.d.ts +0 -43
  831. package/dist/vite/package-resolution.d.ts.map +0 -1
  832. package/dist/vite/package-resolution.js +0 -112
  833. package/dist/vite/package-resolution.js.map +0 -1
  834. package/dist/vite/virtual-entries.d.ts +0 -25
  835. package/dist/vite/virtual-entries.d.ts.map +0 -1
  836. package/dist/vite/virtual-entries.js +0 -110
  837. 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
  /**
@@ -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 */
@@ -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,
@@ -4,9 +4,30 @@ export declare const MAX_ADMITTED_CAPTURES: number;
4
4
  export declare class CaptureQueueFullError extends Error {
5
5
  constructor();
6
6
  }
7
+ /**
8
+ * Budget on how long a capture may WAIT in the queue before it is dropped
9
+ * instead of run. On workerd a queued capture rides the scheduling request's
10
+ * waitUntil, whose post-response lifetime is bounded (~30s): a capture that
11
+ * already burned 15s+ parked behind a slow predecessor would start its own
12
+ * up-to-15s attempt (captureTimeout) with no budget left and risk being
13
+ * killed mid-store-write. Dropping at the budget is safe — captures are
14
+ * best-effort by contract, and a later request re-probes the key (the drop
15
+ * does NOT mark backoff: the route is not doomed, the isolate was busy).
16
+ * Matches one attempt's SHELL_CAPTURE_MAX_WAIT_MS so wait + attempt fits the
17
+ * platform budget. Field-observed: a navigation-shell capture parked ~24s
18
+ * behind a predecessor's two-attempt cycle.
19
+ */
20
+ export declare const CAPTURE_QUEUE_WAIT_BUDGET_MS: number;
21
+ /** Thrown (async) when the queue wait exceeded the budget; the task never ran. */
22
+ export declare class CaptureQueueWaitTimeoutError extends Error {
23
+ readonly waitedMs: number;
24
+ constructor(waitedMs: number);
25
+ }
7
26
  /**
8
27
  * Run `task` after every previously enqueued capture has settled. Returns a
9
28
  * promise for THIS task's completion (rejections propagate to the caller —
10
29
  * the queue itself is insulated).
11
30
  */
12
- export declare function enqueueSerializedCapture(task: () => Promise<void>): Promise<void>;
31
+ export declare function enqueueSerializedCapture(task: () => Promise<void>, opts?: {
32
+ maxQueueWaitMs?: number;
33
+ }): Promise<void>;
@@ -125,10 +125,14 @@ 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-queue-timeout: the capture waited past CAPTURE_QUEUE_WAIT_BUDGET_MS
129
+ * behind other captures and was dropped unrun (no backoff — the route is
130
+ * not doomed, the isolate was busy; a later request re-probes). Carries
131
+ * queueWaitMs.
128
132
  * - backoff: the key entered (or escalated) backoff after a terminal
129
133
  * no-shell — carries the new backoff state
130
134
  */
131
- outcome: "stored" | "redirect" | "no-shell" | "refused" | "error" | "skip-in-flight" | "skip-backoff" | "skip-capacity" | "backoff";
135
+ outcome: "stored" | "redirect" | "no-shell" | "refused" | "error" | "skip-in-flight" | "skip-backoff" | "skip-capacity" | "skip-queue-timeout" | "backoff";
132
136
  /** Attempt number (1 = first, 2 = in-place retry). Absent on skips. */
133
137
  attempt?: number;
134
138
  /** Wall-clock ms of the whole attempt (barrier + render + drain + put). */
@@ -157,6 +161,8 @@ export interface ShellCaptureDebugEvent {
157
161
  backoffFailures?: number;
158
162
  /** Ms remaining in the key's backoff window, when one exists. */
159
163
  backoffRemainingMs?: number;
164
+ /** Ms the capture waited in the serialized queue (skip-queue-timeout). */
165
+ queueWaitMs?: number;
160
166
  }
161
167
  /**
162
168
  * Debug sink for the capture pipeline, mirroring {@link CFCacheDebug}: `true`
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Stream-idle timeout — the enforcement for `timeouts.streamIdleMs` (the
3
+ * "stream-idle" TimeoutPhase, reserved since the timeout API landed).
4
+ *
5
+ * WHY: nothing else bounds a streaming response body's lifetime.
6
+ * `renderStartMs` only bounds time-to-Response-construction; once the body is
7
+ * streaming, a single never-settling promise embedded in the payload (a
8
+ * deferred loader that never resolves, an orphaned ctx.rendered() barrier)
9
+ * holds the Flight/HTML stream — and the client's connection — open forever.
10
+ * Deferred HANDLES have a 10s auto-resolve net (defer.ts); loader promises
11
+ * and everything else have none. Field-observed as multi-second dead
12
+ * connections only closed by client cancellation.
13
+ *
14
+ * SEMANTICS — end-to-end idle flow, deliberately: the watchdog re-arms on
15
+ * every chunk that flows THROUGH to the client, so "idle" means "no bytes
16
+ * reached the wire for N ms". A stalled slow client counts as idle the same
17
+ * as a wedged producer — the two are indistinguishable here without buffering,
18
+ * and buffering is banned on the streaming path. Pick budgets accordingly
19
+ * (generous, seconds not millis); the feature is OPT-IN (unset = today's
20
+ * unbounded behavior, and the `timeout` shorthand deliberately does not apply
21
+ * to streamIdleMs — see resolveTimeouts).
22
+ *
23
+ * ON TRIP: the client-facing stream is errored with a RouterTimeoutError
24
+ * ("stream-idle") — the host terminates the response visibly (truncated
25
+ * chunked encoding), which is debuggable, unlike a silent clean close that
26
+ * would present a half-document as complete. Erroring the transform makes the
27
+ * pipe cancel its SOURCE, which aborts React's fizz/flight render — but only
28
+ * when the watchdog's branch is the sole consumer. When an upstream layer
29
+ * teed or cloned the body first (the document-cache MISS drain,
30
+ * response-cache clones), the watchdog holds one tee branch: tee semantics
31
+ * cancel the underlying source only once EVERY branch cancels, so the cache
32
+ * branch keeps the wedged render alive, bounded only by the platform's
33
+ * waitUntil budget — exactly as it was before this feature. The client-facing
34
+ * bound is unconditional; source teardown is best-effort. `onTimeout` does
35
+ * NOT apply: the response already left the handler, so no replacement
36
+ * Response can be served — the trip is reported via onError + the
37
+ * request.timeout telemetry event instead.
38
+ *
39
+ * COST: one identity TransformStream hop per chunk, only when the timeout is
40
+ * enabled. Never buffers, never reads ahead, adds no work when disabled.
41
+ */
42
+ import { RouterTimeoutError } from "../router/timeout.js";
43
+ /** What the watchdog observed when it tripped. */
44
+ export interface StreamIdleTrip {
45
+ /** ms since the watchdog armed (response handoff) — the stream's lifetime. */
46
+ totalMs: number;
47
+ /** Chunks forwarded before the trip. */
48
+ chunks: number;
49
+ /** The error the client-facing stream was terminated with. */
50
+ error: RouterTimeoutError;
51
+ }
52
+ /**
53
+ * Wrap `response`'s body in an idle watchdog. Returns a NEW Response with the
54
+ * same status/headers whose body errors (and cancels the source) once no chunk
55
+ * has flowed for `idleMs`. Callers gate on isTimeoutEnabled + body presence +
56
+ * NOT a websocket upgrade (a 101/webSocket response must never be
57
+ * reconstructed); this function assumes those checks were made. `onTrip` fires
58
+ * at most once, after the client-facing stream has been errored.
59
+ */
60
+ export declare function applyStreamIdleTimeout(response: Response, idleMs: number, onTrip: (trip: StreamIdleTrip) => void): Response;
@@ -564,6 +564,12 @@ export interface RequestContext<TEnv = DefaultEnv, TParams = Record<string, stri
564
564
  * to avoid a second resolveRoute call. Cleared on HMR invalidation.
565
565
  */
566
566
  _classifiedRoute?: import("../router/route-snapshot.js").RouteSnapshot;
567
+ /**
568
+ * @internal Classified request mode from classifyRequest, read by the
569
+ * rango.response span tail (rsc/handler.ts) for the rango.response.mode
570
+ * attribute. Unset when middleware short-circuits before core execution.
571
+ */
572
+ _requestMode?: import("../router/request-classification.js").RequestPlan["mode"];
567
573
  /**
568
574
  * @internal Coarse route-level cache signal for the X-Rango-Cache debug
569
575
  * header. Populated by match/matchPartial only when the debug cache signal
@@ -579,7 +585,7 @@ export interface RequestContext<TEnv = DefaultEnv, TParams = Record<string, stri
579
585
  * This is the type exported to library consumers. Internal code should
580
586
  * use the full RequestContext interface directly.
581
587
  */
582
- export type PublicRequestContext<TEnv = DefaultEnv, TParams = Record<string, string>> = Omit<RequestContext<TEnv, TParams>, "cookie" | "cookies" | "setCookie" | "deleteCookie" | "_handleStore" | "_transitionWhen" | "_pprTransitionDecisions" | "_pprReplayPostMatchReason" | "_cacheStore" | "_searchParamsFilter" | "_shellCaptureRun" | "_shellImplicitCache" | "_shellLoaderSeed" | "_shellCaptureLoaderRecords" | "_shellCaptureHandleLiveness" | "_shellCaptureLoaderHandleValues" | "_shellFragmentPayload" | "_shellCaptureGuardTripped" | "_shellCaptureGuardTrippedLoaderId" | "_explicitTaggedStores" | "_requestTags" | "_cacheProfiles" | "_onResponseCallbacks" | "_pendingBackgroundTasks" | "_themeConfig" | "_locationState" | "_routeName" | "_prevRouteKey" | "_gateCurrentUrl" | "_gateCurrentParams" | "_gateActionId" | "_gateActionUrl" | "_gateActionResult" | "_gateFormData" | "_inActionRevalidation" | "_reportedErrors" | "_renderBarrier" | "_resolveRenderBarrier" | "_renderBarrierSegmentOrder" | "_treeHasStreaming" | "_renderBarrierWaiters" | "_handlerLoaderDeps" | "_renderBarrierHandleSnapshot" | "_renderBarrierGuardClosed" | "_reportBackgroundError" | "_debugPerformance" | "_metricsStore" | "_renderForeground" | "_renderDiagnosticsEnabled" | "_handlerStart" | "_tracing" | "_basename" | "_routerId" | "_setStatus" | "_rotateStateCookie" | "_setKeepCacheDirective" | "_variables" | "_classifiedRoute" | "_cacheSignal" | "_dynamic" | "res">;
588
+ export type PublicRequestContext<TEnv = DefaultEnv, TParams = Record<string, string>> = Omit<RequestContext<TEnv, TParams>, "cookie" | "cookies" | "setCookie" | "deleteCookie" | "_handleStore" | "_transitionWhen" | "_pprTransitionDecisions" | "_pprReplayPostMatchReason" | "_cacheStore" | "_searchParamsFilter" | "_shellCaptureRun" | "_shellImplicitCache" | "_shellLoaderSeed" | "_shellCaptureLoaderRecords" | "_shellCaptureHandleLiveness" | "_shellCaptureLoaderHandleValues" | "_shellFragmentPayload" | "_shellCaptureGuardTripped" | "_shellCaptureGuardTrippedLoaderId" | "_explicitTaggedStores" | "_requestTags" | "_cacheProfiles" | "_onResponseCallbacks" | "_pendingBackgroundTasks" | "_themeConfig" | "_locationState" | "_routeName" | "_prevRouteKey" | "_gateCurrentUrl" | "_gateCurrentParams" | "_gateActionId" | "_gateActionUrl" | "_gateActionResult" | "_gateFormData" | "_inActionRevalidation" | "_reportedErrors" | "_renderBarrier" | "_resolveRenderBarrier" | "_renderBarrierSegmentOrder" | "_treeHasStreaming" | "_renderBarrierWaiters" | "_handlerLoaderDeps" | "_renderBarrierHandleSnapshot" | "_renderBarrierGuardClosed" | "_reportBackgroundError" | "_debugPerformance" | "_metricsStore" | "_renderForeground" | "_renderDiagnosticsEnabled" | "_handlerStart" | "_tracing" | "_basename" | "_routerId" | "_setStatus" | "_rotateStateCookie" | "_setKeepCacheDirective" | "_variables" | "_classifiedRoute" | "_requestMode" | "_cacheSignal" | "_dynamic" | "res">;
583
589
  /**
584
590
  * Marker for a waitUntil-scheduled fn whose task promise must NOT enter
585
591
  * _pendingBackgroundTasks. Used by the PPR shell capture for its own task:
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * Vercel OpenTelemetry tracing integration.
3
3
  *
4
- * Bridges the router's performance phases (request, middleware, action,
5
- * loaders, handler, render, ssr) onto OpenTelemetry spans so they show up in
6
- * Vercel's trace waterfall next to the platform's automatic spans, with correct
7
- * nesting. Vercel exposes tracing through OpenTelemetry (not a native import-free
8
- * API like Cloudflare), so this is a thin convenience over `createOTelTracing`:
9
- * it reads the global OTel tracer that `@vercel/otel`'s `registerOTel()` installs.
4
+ * Bridges the router's observable phases (request, middleware, action, loaders,
5
+ * handler, render, ssr, response, background) onto OpenTelemetry spans so they
6
+ * show up in Vercel's trace waterfall next to the platform's automatic spans,
7
+ * with correct nesting. Vercel exposes tracing through OpenTelemetry (not a
8
+ * native import-free API like Cloudflare), so this is a thin convenience over
9
+ * `createOTelTracing`: it reads the global OTel tracer that `@vercel/otel`'s
10
+ * `registerOTel()` installs.
10
11
  *
11
12
  * Usage (vercel preset). A Rango/Vite app does NOT auto-load `instrumentation.ts`
12
13
  * the way Next.js does, so export the tracing config from there and import it —
@@ -59,8 +60,8 @@ export interface VercelTracingOptions extends TracingToggleOptions {
59
60
  /**
60
61
  * Create the tracing config for a Vercel router. Pass the result to
61
62
  * `createRouter({ tracing })`. Spans are emitted for the request, middleware,
62
- * action, loaders, handler, render, and ssr phases; pass `spans` to turn
63
- * individual phases off.
63
+ * action, loaders, handler, render, ssr, response, and background phases; pass
64
+ * `spans` to turn individual phases off.
64
65
  *
65
66
  * @see createOTelTracing (`@rangojs/router`) for the underlying adapter on any
66
67
  * platform with an OpenTelemetry SDK.
@@ -2530,7 +2530,7 @@ import { resolve } from "node:path";
2530
2530
  // package.json
2531
2531
  var package_default = {
2532
2532
  name: "@rangojs/router",
2533
- version: "0.4.2",
2533
+ version: "0.4.3",
2534
2534
  description: "Django-inspired RSC router with composable URL patterns",
2535
2535
  keywords: [
2536
2536
  "react",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rangojs/router",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Django-inspired RSC router with composable URL patterns",
5
5
  "keywords": [
6
6
  "react",
@@ -145,10 +145,39 @@ const router = createRouter({ document: Document, urls: urlpatterns, tracing });
145
145
  These factories return a `RouterTracingConfig` for the same `tracing` slot;
146
146
  `telemetry` stays independent (events only, no phase spans). Phase spans:
147
147
  `rango.request`, `rango.middleware`, `rango.action`, `rango.loader`,
148
- `rango.render`, `rango.ssr` — the same phases the `debugPerformance` timeline
149
- shows, co-emitted from one site. Off-platform (no Cloudflare tracing destination
150
- / no OTel SDK) every span call is a transparent pass-through, so the request
151
- behaves as if tracing were off.
148
+ `rango.handler`, `rango.render`, `rango.ssr`, `rango.response`,
149
+ `rango.background`. All share the `PHASES` registry and `observePhase`
150
+ execution boundary with `debugPerformance`; phases with `metric: false` either
151
+ use finer-grained perf rows or, for `response` and `background`, remain
152
+ span-only. Off-platform (no Cloudflare tracing destination / no OTel SDK) every
153
+ span call is a transparent pass-through, so the request behaves as if tracing
154
+ were off.
155
+
156
+ `rango.response` is the explicit handoff marker: at most one per traced
157
+ request, a direct child of `rango.request`, wrapping only response finalization
158
+ (redirect interception/guarding, `Server-Timing` mutation, final response
159
+ selection) and ending immediately before the handler returns the response to
160
+ the host. It is handoff-bound, never drain-bound — it never reads or awaits
161
+ `response.body`. Attributes: `http.response.status_code`,
162
+ `rango.response.mode` (classified request mode, or `middleware-short-circuit`),
163
+ `rango.response.body_kind` (`stream`/`empty`/`websocket`). For request modes
164
+ that render nothing (fetchable `_rsc_loader`, response routes, middleware
165
+ short-circuits) it shows the trace is complete rather than truncated — those
166
+ requests legitimately have no `rango.render`/`rango.ssr`/`rango.handler` spans.
167
+ On deployed Workers it may read 0 ms (frozen non-I/O timers); its position and
168
+ attributes are the value. Disable per-response billing overhead at volume with
169
+ `spans: { response: false }`.
170
+
171
+ `rango.background` wraps detached waitUntil work — PPR shell captures and SWR
172
+ background revalidations — that runs after the foreground spans ended. Without
173
+ it, a capture or revalidation shows up as an unexplained wave of orphan
174
+ KV/fetch spans minutes into a trace. `rango.background.kind` names the lane
175
+ (`shell-capture` / `document-revalidation` / `loader-revalidation` /
176
+ `use-cache-revalidation`); the shell-capture lane also carries
177
+ `rango.shell_key`, `rango.background.outcome`, and
178
+ `rango.background.queue_wait_ms` (a capture parked behind the per-isolate
179
+ capture queue reads as span duration, not dead air). Toggle with
180
+ `spans: { background: false }`.
152
181
 
153
182
  Custom sinks implement `emit(event)`:
154
183