@rangojs/router 0.0.0-experimental.d20dd405 → 0.0.0-experimental.d5d3070a

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 (1186) hide show
  1. package/AGENTS.md +8 -0
  2. package/README.md +57 -14
  3. package/dist/bin/rango.js +312 -93
  4. package/dist/testing/vitest.js +82 -0
  5. package/dist/vite/index.js +1632 -705
  6. package/package.json +64 -12
  7. package/skills/api-client/SKILL.md +211 -0
  8. package/skills/breadcrumbs/SKILL.md +61 -1
  9. package/skills/bundle-analysis/SKILL.md +159 -0
  10. package/skills/cache-guide/SKILL.md +224 -32
  11. package/skills/caching/SKILL.md +279 -17
  12. package/skills/composability/SKILL.md +27 -2
  13. package/skills/css/SKILL.md +76 -0
  14. package/skills/debug-manifest/SKILL.md +4 -2
  15. package/skills/document-cache/SKILL.md +78 -55
  16. package/skills/handler-use/SKILL.md +2 -2
  17. package/skills/hooks/SKILL.md +217 -31
  18. package/skills/host-router/SKILL.md +83 -23
  19. package/skills/intercept/SKILL.md +5 -6
  20. package/skills/layout/SKILL.md +11 -9
  21. package/skills/links/SKILL.md +22 -10
  22. package/skills/loader/SKILL.md +172 -23
  23. package/skills/middleware/SKILL.md +16 -10
  24. package/skills/migrate-nextjs/SKILL.md +38 -16
  25. package/skills/migrate-react-router/SKILL.md +4 -2
  26. package/skills/mime-routes/SKILL.md +28 -1
  27. package/skills/observability/SKILL.md +172 -0
  28. package/skills/parallel/SKILL.md +9 -7
  29. package/skills/prerender/SKILL.md +45 -43
  30. package/skills/rango/SKILL.md +251 -26
  31. package/skills/react-compiler/SKILL.md +168 -0
  32. package/skills/response-routes/SKILL.md +115 -48
  33. package/skills/route/SKILL.md +22 -5
  34. package/skills/router-setup/SKILL.md +29 -6
  35. package/skills/scripts/SKILL.md +179 -0
  36. package/skills/server-actions/SKILL.md +78 -42
  37. package/skills/tailwind/SKILL.md +27 -3
  38. package/skills/testing/SKILL.md +129 -0
  39. package/skills/testing/bindings.md +103 -0
  40. package/skills/testing/cache-prerender.md +127 -0
  41. package/skills/testing/client-components.md +124 -0
  42. package/skills/testing/e2e-parity.md +125 -0
  43. package/skills/testing/flight.md +91 -0
  44. package/skills/testing/handles.md +129 -0
  45. package/skills/testing/loader.md +128 -0
  46. package/skills/testing/middleware.md +99 -0
  47. package/skills/testing/render-handler.md +121 -0
  48. package/skills/testing/response-routes.md +95 -0
  49. package/skills/testing/reverse-and-types.md +84 -0
  50. package/skills/testing/server-actions.md +107 -0
  51. package/skills/testing/server-tree.md +128 -0
  52. package/skills/testing/setup.md +123 -0
  53. package/skills/typesafety/SKILL.md +313 -28
  54. package/skills/use-cache/SKILL.md +46 -14
  55. package/skills/view-transitions/SKILL.md +85 -3
  56. package/src/__augment-tests__/augment.ts +81 -0
  57. package/src/__augment-tests__/augmented.check.ts +116 -0
  58. package/src/__internal.ts +0 -65
  59. package/src/browser/action-coordinator.ts +53 -36
  60. package/src/browser/action-fence.ts +47 -0
  61. package/src/browser/app-shell.ts +14 -27
  62. package/src/browser/connection-warmup.ts +134 -0
  63. package/src/browser/cookie-name.ts +140 -0
  64. package/src/browser/event-controller.ts +151 -149
  65. package/src/browser/history-state.ts +21 -0
  66. package/src/browser/index.ts +3 -3
  67. package/src/browser/invalidate-client-cache.ts +52 -0
  68. package/src/browser/navigation-bridge.ts +67 -126
  69. package/src/browser/navigation-client.ts +110 -84
  70. package/src/browser/navigation-store-handle.ts +38 -0
  71. package/src/browser/navigation-store.ts +32 -82
  72. package/src/browser/navigation-transaction.ts +9 -59
  73. package/src/browser/network-error-handler.ts +34 -7
  74. package/src/browser/partial-update.ts +108 -144
  75. package/src/browser/prefetch/cache.ts +107 -72
  76. package/src/browser/prefetch/fetch.ts +186 -34
  77. package/src/browser/prefetch/queue.ts +6 -3
  78. package/src/browser/rango-state.ts +157 -115
  79. package/src/browser/react/Link.tsx +30 -7
  80. package/src/browser/react/NavigationProvider.tsx +173 -160
  81. package/src/browser/react/ScrollRestoration.tsx +10 -6
  82. package/src/browser/react/filter-segment-order.ts +17 -2
  83. package/src/browser/react/index.ts +0 -51
  84. package/src/browser/react/location-state-shared.ts +178 -8
  85. package/src/browser/react/location-state.ts +39 -14
  86. package/src/browser/react/use-action.ts +6 -15
  87. package/src/browser/react/use-handle.ts +17 -14
  88. package/src/browser/react/use-href.tsx +8 -1
  89. package/src/browser/react/use-link-status.ts +33 -8
  90. package/src/browser/react/use-navigation.ts +10 -5
  91. package/src/browser/react/use-params.ts +3 -6
  92. package/src/browser/react/use-reverse.ts +19 -12
  93. package/src/browser/react/use-router.ts +20 -5
  94. package/src/browser/react/use-search-params.ts +0 -5
  95. package/src/browser/react/use-segments.ts +0 -13
  96. package/src/browser/response-adapter.ts +80 -5
  97. package/src/browser/rsc-router.tsx +73 -34
  98. package/src/browser/scroll-restoration.ts +38 -28
  99. package/src/browser/segment-structure-assert.ts +2 -2
  100. package/src/browser/server-action-bridge.ts +214 -55
  101. package/src/browser/types.ts +51 -21
  102. package/src/browser/validate-redirect-origin.ts +43 -16
  103. package/src/build/collect-fallback-refs.ts +107 -0
  104. package/src/build/generate-manifest.ts +60 -35
  105. package/src/build/generate-route-types.ts +2 -1
  106. package/src/build/index.ts +8 -2
  107. package/src/build/prefix-tree-utils.ts +123 -0
  108. package/src/build/route-trie.ts +117 -15
  109. package/src/build/route-types/ast-route-extraction.ts +15 -8
  110. package/src/build/route-types/codegen.ts +16 -5
  111. package/src/build/route-types/include-resolution.ts +117 -23
  112. package/src/build/route-types/param-extraction.ts +6 -3
  113. package/src/build/route-types/per-module-writer.ts +22 -6
  114. package/src/build/route-types/router-processing.ts +55 -28
  115. package/src/build/route-types/scan-filter.ts +1 -1
  116. package/src/build/route-types/source-scan.ts +216 -0
  117. package/src/build/runtime-discovery.ts +9 -20
  118. package/src/cache/cache-error.ts +104 -0
  119. package/src/cache/cache-key-utils.ts +29 -13
  120. package/src/cache/cache-policy.ts +108 -34
  121. package/src/cache/cache-runtime.ts +199 -37
  122. package/src/cache/cache-scope.ts +188 -82
  123. package/src/cache/cache-tag.ts +103 -0
  124. package/src/cache/cf/cf-base64.ts +33 -0
  125. package/src/cache/cf/cf-cache-constants.ts +127 -0
  126. package/src/cache/cf/cf-cache-store.ts +1990 -377
  127. package/src/cache/cf/cf-cache-types.ts +349 -0
  128. package/src/cache/cf/cf-kv-utils.ts +46 -0
  129. package/src/cache/cf/cf-tag-marker-memo.ts +105 -0
  130. package/src/cache/cf/index.ts +6 -16
  131. package/src/cache/document-cache.ts +72 -20
  132. package/src/cache/handle-snapshot.ts +70 -0
  133. package/src/cache/index.ts +10 -20
  134. package/src/cache/memory-segment-store.ts +136 -37
  135. package/src/cache/profile-registry.ts +31 -31
  136. package/src/cache/read-through-swr.ts +41 -11
  137. package/src/cache/segment-codec.ts +9 -17
  138. package/src/cache/tag-invalidation.ts +230 -0
  139. package/src/cache/types.ts +37 -100
  140. package/src/client.rsc.tsx +42 -22
  141. package/src/client.tsx +33 -62
  142. package/src/cloudflare/index.ts +11 -0
  143. package/src/cloudflare/tracing.ts +109 -0
  144. package/src/component-utils.ts +19 -0
  145. package/src/components/DefaultDocument.tsx +8 -2
  146. package/src/context-var.ts +18 -6
  147. package/src/decode-loader-results.ts +52 -0
  148. package/src/defer.ts +196 -0
  149. package/src/deps/ssr.ts +0 -1
  150. package/src/encode-kv.ts +49 -0
  151. package/src/errors.ts +30 -4
  152. package/src/escape-script.ts +52 -0
  153. package/src/handle.ts +31 -23
  154. package/src/handles/MetaTags.tsx +62 -19
  155. package/src/handles/Scripts.tsx +183 -0
  156. package/src/handles/breadcrumbs.ts +37 -8
  157. package/src/handles/is-thenable.ts +19 -0
  158. package/src/handles/meta.ts +51 -40
  159. package/src/handles/script.ts +244 -0
  160. package/src/host/cookie-handler.ts +9 -60
  161. package/src/host/errors.ts +0 -24
  162. package/src/host/index.ts +8 -2
  163. package/src/host/pattern-matcher.ts +23 -52
  164. package/src/host/router.ts +107 -99
  165. package/src/host/testing.ts +40 -27
  166. package/src/host/types.ts +37 -4
  167. package/src/host/utils.ts +1 -1
  168. package/src/href-client.ts +136 -24
  169. package/src/index.rsc.ts +87 -11
  170. package/src/index.ts +85 -10
  171. package/src/internal-debug.ts +11 -10
  172. package/src/loader-store.ts +500 -0
  173. package/src/loader.rsc.ts +20 -13
  174. package/src/loader.ts +12 -11
  175. package/src/missing-id-error.ts +68 -0
  176. package/src/outlet-provider.tsx +1 -5
  177. package/src/prerender/param-hash.ts +16 -16
  178. package/src/prerender/store.ts +32 -37
  179. package/src/prerender.ts +61 -6
  180. package/src/redirect-origin.ts +100 -0
  181. package/src/regex-escape.ts +8 -0
  182. package/src/render-error-thrower.tsx +20 -0
  183. package/src/response-utils.ts +34 -0
  184. package/src/reverse.ts +16 -13
  185. package/src/root-error-boundary.tsx +1 -19
  186. package/src/route-content-wrapper.tsx +7 -72
  187. package/src/route-definition/dsl-helpers.ts +276 -283
  188. package/src/route-definition/helper-factories.ts +29 -139
  189. package/src/route-definition/helpers-types.ts +40 -17
  190. package/src/route-definition/redirect.ts +44 -11
  191. package/src/route-definition/resolve-handler-use.ts +6 -0
  192. package/src/route-definition/use-item-types.ts +32 -0
  193. package/src/route-map-builder.ts +0 -16
  194. package/src/route-types.ts +19 -41
  195. package/src/router/basename.ts +14 -0
  196. package/src/router/content-negotiation.ts +73 -25
  197. package/src/router/error-handling.ts +45 -18
  198. package/src/router/find-match.ts +44 -23
  199. package/src/router/handler-context.ts +6 -1
  200. package/src/router/instrument.ts +350 -0
  201. package/src/router/intercept-resolution.ts +39 -20
  202. package/src/router/lazy-includes.ts +9 -46
  203. package/src/router/loader-resolution.ts +152 -72
  204. package/src/router/logging.ts +0 -6
  205. package/src/router/manifest.ts +18 -29
  206. package/src/router/match-api.ts +0 -20
  207. package/src/router/match-context.ts +0 -22
  208. package/src/router/match-handlers.ts +57 -58
  209. package/src/router/match-middleware/background-revalidation.ts +6 -7
  210. package/src/router/match-middleware/cache-lookup.ts +159 -285
  211. package/src/router/match-middleware/cache-store.ts +31 -34
  212. package/src/router/match-middleware/intercept-resolution.ts +0 -22
  213. package/src/router/match-middleware/segment-resolution.ts +0 -22
  214. package/src/router/match-pipelines.ts +1 -42
  215. package/src/router/match-result.ts +31 -80
  216. package/src/router/metrics.ts +0 -34
  217. package/src/router/middleware-types.ts +0 -116
  218. package/src/router/middleware.ts +216 -163
  219. package/src/router/navigation-snapshot.ts +0 -51
  220. package/src/router/params-util.ts +23 -0
  221. package/src/router/pattern-matching.ts +47 -89
  222. package/src/router/prefetch-cache-ttl.ts +51 -0
  223. package/src/router/prerender-match.ts +104 -65
  224. package/src/router/preview-match.ts +3 -1
  225. package/src/router/request-classification.ts +28 -62
  226. package/src/router/revalidation.ts +110 -74
  227. package/src/router/route-snapshot.ts +0 -1
  228. package/src/router/router-context.ts +3 -28
  229. package/src/router/router-interfaces.ts +83 -35
  230. package/src/router/router-options.ts +136 -5
  231. package/src/router/router-registry.ts +2 -5
  232. package/src/router/segment-resolution/fresh.ts +85 -84
  233. package/src/router/segment-resolution/helpers.ts +86 -6
  234. package/src/router/segment-resolution/loader-cache.ts +62 -37
  235. package/src/router/segment-resolution/revalidation.ts +227 -306
  236. package/src/router/segment-resolution/static-store.ts +19 -5
  237. package/src/router/segment-resolution/streamed-handler-telemetry.ts +52 -0
  238. package/src/router/segment-resolution/view-transition-default.ts +36 -0
  239. package/src/router/segment-resolution.ts +5 -1
  240. package/src/router/segment-wrappers.ts +6 -5
  241. package/src/router/state-cookie-name.ts +33 -0
  242. package/src/router/telemetry-otel.ts +161 -199
  243. package/src/router/telemetry.ts +96 -19
  244. package/src/router/timeout.ts +0 -20
  245. package/src/router/tracing.ts +206 -0
  246. package/src/router/trie-matching.ts +163 -64
  247. package/src/router/types.ts +9 -63
  248. package/src/router/url-params.ts +0 -5
  249. package/src/router.ts +109 -53
  250. package/src/rsc/handler-context.ts +3 -2
  251. package/src/rsc/handler.ts +262 -219
  252. package/src/rsc/helpers.ts +100 -6
  253. package/src/rsc/index.ts +2 -5
  254. package/src/rsc/json-route-result.ts +38 -0
  255. package/src/rsc/loader-fetch.ts +114 -38
  256. package/src/rsc/manifest-init.ts +28 -41
  257. package/src/rsc/origin-guard.ts +39 -25
  258. package/src/rsc/progressive-enhancement.ts +59 -9
  259. package/src/rsc/redirect-guard.ts +99 -0
  260. package/src/rsc/response-cache-serve.ts +238 -0
  261. package/src/rsc/response-error.ts +79 -12
  262. package/src/rsc/response-route-handler.ts +85 -188
  263. package/src/rsc/rsc-rendering.ts +91 -77
  264. package/src/rsc/runtime-warnings.ts +23 -10
  265. package/src/rsc/server-action.ts +256 -117
  266. package/src/rsc/ssr-setup.ts +16 -0
  267. package/src/rsc/types.ts +17 -5
  268. package/src/runtime-env.ts +18 -0
  269. package/src/search-params.ts +35 -30
  270. package/src/segment-loader-promise.ts +31 -4
  271. package/src/segment-system.tsx +151 -136
  272. package/src/serialize.ts +243 -0
  273. package/src/server/context.ts +150 -51
  274. package/src/server/cookie-parse.ts +32 -0
  275. package/src/server/cookie-store.ts +80 -5
  276. package/src/server/handle-store.ts +21 -38
  277. package/src/server/loader-registry.ts +21 -42
  278. package/src/server/request-context.ts +225 -133
  279. package/src/ssr/index.tsx +19 -18
  280. package/src/static-handler.ts +10 -13
  281. package/src/testing/cache-status.ts +162 -0
  282. package/src/testing/collect-handle.ts +40 -0
  283. package/src/testing/dispatch.ts +701 -0
  284. package/src/testing/dom.entry.ts +22 -0
  285. package/src/testing/e2e/fixture.ts +188 -0
  286. package/src/testing/e2e/index.ts +128 -0
  287. package/src/testing/e2e/matchers.ts +35 -0
  288. package/src/testing/e2e/page-helpers.ts +272 -0
  289. package/src/testing/e2e/parity.ts +387 -0
  290. package/src/testing/e2e/server.ts +195 -0
  291. package/src/testing/flight-matchers.ts +97 -0
  292. package/src/testing/flight-normalize.ts +11 -0
  293. package/src/testing/flight-runtime.d.ts +57 -0
  294. package/src/testing/flight-tree.ts +682 -0
  295. package/src/testing/flight.entry.ts +52 -0
  296. package/src/testing/flight.ts +257 -0
  297. package/src/testing/generated-routes.ts +183 -0
  298. package/src/testing/index.ts +99 -0
  299. package/src/testing/internal/context.ts +371 -0
  300. package/src/testing/internal/flight-client-globals.ts +30 -0
  301. package/src/testing/internal/seed-vars.ts +54 -0
  302. package/src/testing/render-handler.ts +343 -0
  303. package/src/testing/render-route.tsx +581 -0
  304. package/src/testing/run-loader.ts +385 -0
  305. package/src/testing/run-middleware.ts +205 -0
  306. package/src/testing/vitest-stubs/cloudflare-email.ts +9 -0
  307. package/src/testing/vitest-stubs/cloudflare-workers.ts +21 -0
  308. package/src/testing/vitest-stubs/plugin-rsc.ts +16 -0
  309. package/src/testing/vitest-stubs/version.ts +5 -0
  310. package/src/testing/vitest.ts +305 -0
  311. package/src/theme/ThemeProvider.tsx +20 -58
  312. package/src/theme/ThemeScript.tsx +7 -9
  313. package/src/theme/constants.ts +52 -13
  314. package/src/theme/index.ts +0 -7
  315. package/src/theme/theme-context.ts +1 -5
  316. package/src/theme/theme-script.ts +22 -21
  317. package/src/theme/use-theme.ts +0 -3
  318. package/src/types/boundaries.ts +0 -35
  319. package/src/types/cache-types.ts +13 -4
  320. package/src/types/error-types.ts +30 -90
  321. package/src/types/global-namespace.ts +54 -41
  322. package/src/types/handler-context.ts +97 -22
  323. package/src/types/index.ts +1 -10
  324. package/src/types/loader-types.ts +6 -3
  325. package/src/types/request-scope.ts +8 -22
  326. package/src/types/route-config.ts +6 -50
  327. package/src/types/route-entry.ts +0 -6
  328. package/src/types/segments.ts +18 -14
  329. package/src/urls/include-helper.ts +9 -56
  330. package/src/urls/index.ts +1 -11
  331. package/src/urls/path-helper-types.ts +19 -5
  332. package/src/urls/path-helper.ts +17 -106
  333. package/src/urls/pattern-types.ts +36 -19
  334. package/src/urls/response-types.ts +20 -19
  335. package/src/urls/type-extraction.ts +58 -139
  336. package/src/urls/urls-function.ts +1 -18
  337. package/src/use-loader.tsx +292 -107
  338. package/src/vite/debug.ts +1 -0
  339. package/src/vite/discovery/bundle-postprocess.ts +8 -7
  340. package/src/vite/discovery/discover-routers.ts +95 -82
  341. package/src/vite/discovery/discovery-errors.ts +194 -0
  342. package/src/vite/discovery/prerender-collection.ts +48 -67
  343. package/src/vite/discovery/route-types-writer.ts +40 -84
  344. package/src/vite/discovery/state.ts +44 -0
  345. package/src/vite/discovery/virtual-module-codegen.ts +14 -34
  346. package/src/vite/index.ts +2 -0
  347. package/src/vite/inject-client-debug.ts +36 -0
  348. package/src/vite/plugin-types.ts +126 -8
  349. package/src/vite/plugins/cjs-to-esm.ts +11 -19
  350. package/src/vite/plugins/client-ref-dedup.ts +0 -11
  351. package/src/vite/plugins/client-ref-hashing.ts +12 -11
  352. package/src/vite/plugins/cloudflare-protocol-stub.ts +1 -21
  353. package/src/vite/plugins/expose-action-id.ts +4 -75
  354. package/src/vite/plugins/expose-id-utils.ts +88 -55
  355. package/src/vite/plugins/expose-ids/export-analysis.ts +101 -34
  356. package/src/vite/plugins/expose-ids/handler-transform.ts +11 -90
  357. package/src/vite/plugins/expose-ids/loader-transform.ts +14 -24
  358. package/src/vite/plugins/expose-ids/router-transform.ts +98 -26
  359. package/src/vite/plugins/expose-internal-ids.ts +57 -68
  360. package/src/vite/plugins/performance-tracks.ts +9 -16
  361. package/src/vite/plugins/refresh-cmd.ts +1 -1
  362. package/src/vite/plugins/use-cache-transform.ts +26 -49
  363. package/src/vite/plugins/version-injector.ts +2 -32
  364. package/src/vite/plugins/version-plugin.ts +37 -40
  365. package/src/vite/plugins/virtual-entries.ts +13 -18
  366. package/src/vite/rango.ts +60 -104
  367. package/src/vite/router-discovery.ts +236 -83
  368. package/src/vite/utils/ast-handler-extract.ts +26 -35
  369. package/src/vite/utils/bundle-analysis.ts +10 -15
  370. package/src/vite/utils/client-chunks.ts +184 -0
  371. package/src/vite/utils/directive-prologue.ts +40 -0
  372. package/src/vite/utils/forward-user-plugins.ts +171 -0
  373. package/src/vite/utils/manifest-utils.ts +4 -59
  374. package/src/vite/utils/package-resolution.ts +1 -73
  375. package/src/vite/utils/prerender-utils.ts +54 -40
  376. package/src/vite/utils/shared-utils.ts +90 -41
  377. package/dist/__internal.d.ts +0 -83
  378. package/dist/__internal.d.ts.map +0 -1
  379. package/dist/__internal.js +0 -19
  380. package/dist/__internal.js.map +0 -1
  381. package/dist/__mocks__/version.d.ts +0 -7
  382. package/dist/__mocks__/version.d.ts.map +0 -1
  383. package/dist/__mocks__/version.js +0 -7
  384. package/dist/__mocks__/version.js.map +0 -1
  385. package/dist/__tests__/client-href.test.d.ts +0 -2
  386. package/dist/__tests__/client-href.test.d.ts.map +0 -1
  387. package/dist/__tests__/client-href.test.js +0 -74
  388. package/dist/__tests__/client-href.test.js.map +0 -1
  389. package/dist/__tests__/component-utils.test.d.ts +0 -2
  390. package/dist/__tests__/component-utils.test.d.ts.map +0 -1
  391. package/dist/__tests__/component-utils.test.js +0 -51
  392. package/dist/__tests__/component-utils.test.js.map +0 -1
  393. package/dist/__tests__/event-controller.test.d.ts +0 -2
  394. package/dist/__tests__/event-controller.test.d.ts.map +0 -1
  395. package/dist/__tests__/event-controller.test.js +0 -538
  396. package/dist/__tests__/event-controller.test.js.map +0 -1
  397. package/dist/__tests__/helpers/route-tree.d.ts +0 -118
  398. package/dist/__tests__/helpers/route-tree.d.ts.map +0 -1
  399. package/dist/__tests__/helpers/route-tree.js +0 -374
  400. package/dist/__tests__/helpers/route-tree.js.map +0 -1
  401. package/dist/__tests__/match-result.test.d.ts +0 -2
  402. package/dist/__tests__/match-result.test.d.ts.map +0 -1
  403. package/dist/__tests__/match-result.test.js +0 -154
  404. package/dist/__tests__/match-result.test.js.map +0 -1
  405. package/dist/__tests__/navigation-store.test.d.ts +0 -2
  406. package/dist/__tests__/navigation-store.test.d.ts.map +0 -1
  407. package/dist/__tests__/navigation-store.test.js +0 -440
  408. package/dist/__tests__/navigation-store.test.js.map +0 -1
  409. package/dist/__tests__/partial-update.test.d.ts +0 -2
  410. package/dist/__tests__/partial-update.test.d.ts.map +0 -1
  411. package/dist/__tests__/partial-update.test.js +0 -1009
  412. package/dist/__tests__/partial-update.test.js.map +0 -1
  413. package/dist/__tests__/reverse-types.test.d.ts +0 -8
  414. package/dist/__tests__/reverse-types.test.d.ts.map +0 -1
  415. package/dist/__tests__/reverse-types.test.js +0 -656
  416. package/dist/__tests__/reverse-types.test.js.map +0 -1
  417. package/dist/__tests__/route-definition.test.d.ts +0 -2
  418. package/dist/__tests__/route-definition.test.d.ts.map +0 -1
  419. package/dist/__tests__/route-definition.test.js +0 -55
  420. package/dist/__tests__/route-definition.test.js.map +0 -1
  421. package/dist/__tests__/router-helpers.test.d.ts +0 -2
  422. package/dist/__tests__/router-helpers.test.d.ts.map +0 -1
  423. package/dist/__tests__/router-helpers.test.js +0 -377
  424. package/dist/__tests__/router-helpers.test.js.map +0 -1
  425. package/dist/__tests__/router-integration-2.test.d.ts +0 -2
  426. package/dist/__tests__/router-integration-2.test.d.ts.map +0 -1
  427. package/dist/__tests__/router-integration-2.test.js +0 -426
  428. package/dist/__tests__/router-integration-2.test.js.map +0 -1
  429. package/dist/__tests__/router-integration.test.d.ts +0 -2
  430. package/dist/__tests__/router-integration.test.d.ts.map +0 -1
  431. package/dist/__tests__/router-integration.test.js +0 -1051
  432. package/dist/__tests__/router-integration.test.js.map +0 -1
  433. package/dist/__tests__/search-params.test.d.ts +0 -5
  434. package/dist/__tests__/search-params.test.d.ts.map +0 -1
  435. package/dist/__tests__/search-params.test.js +0 -306
  436. package/dist/__tests__/search-params.test.js.map +0 -1
  437. package/dist/__tests__/segment-system.test.d.ts +0 -2
  438. package/dist/__tests__/segment-system.test.d.ts.map +0 -1
  439. package/dist/__tests__/segment-system.test.js +0 -627
  440. package/dist/__tests__/segment-system.test.js.map +0 -1
  441. package/dist/__tests__/static-handler-types.test.d.ts +0 -8
  442. package/dist/__tests__/static-handler-types.test.d.ts.map +0 -1
  443. package/dist/__tests__/static-handler-types.test.js +0 -63
  444. package/dist/__tests__/static-handler-types.test.js.map +0 -1
  445. package/dist/__tests__/urls.test.d.ts +0 -2
  446. package/dist/__tests__/urls.test.d.ts.map +0 -1
  447. package/dist/__tests__/urls.test.js +0 -421
  448. package/dist/__tests__/urls.test.js.map +0 -1
  449. package/dist/__tests__/use-mount.test.d.ts +0 -2
  450. package/dist/__tests__/use-mount.test.d.ts.map +0 -1
  451. package/dist/__tests__/use-mount.test.js +0 -35
  452. package/dist/__tests__/use-mount.test.js.map +0 -1
  453. package/dist/bin/rango.d.ts +0 -2
  454. package/dist/bin/rango.d.ts.map +0 -1
  455. package/dist/bin/rango.js.map +0 -1
  456. package/dist/browser/event-controller.d.ts +0 -191
  457. package/dist/browser/event-controller.d.ts.map +0 -1
  458. package/dist/browser/event-controller.js +0 -559
  459. package/dist/browser/event-controller.js.map +0 -1
  460. package/dist/browser/index.d.ts +0 -2
  461. package/dist/browser/index.d.ts.map +0 -1
  462. package/dist/browser/index.js +0 -14
  463. package/dist/browser/index.js.map +0 -1
  464. package/dist/browser/link-interceptor.d.ts +0 -38
  465. package/dist/browser/link-interceptor.d.ts.map +0 -1
  466. package/dist/browser/link-interceptor.js +0 -99
  467. package/dist/browser/link-interceptor.js.map +0 -1
  468. package/dist/browser/logging.d.ts +0 -10
  469. package/dist/browser/logging.d.ts.map +0 -1
  470. package/dist/browser/logging.js +0 -29
  471. package/dist/browser/logging.js.map +0 -1
  472. package/dist/browser/lru-cache.d.ts +0 -17
  473. package/dist/browser/lru-cache.d.ts.map +0 -1
  474. package/dist/browser/lru-cache.js +0 -50
  475. package/dist/browser/lru-cache.js.map +0 -1
  476. package/dist/browser/merge-segment-loaders.d.ts +0 -39
  477. package/dist/browser/merge-segment-loaders.d.ts.map +0 -1
  478. package/dist/browser/merge-segment-loaders.js +0 -102
  479. package/dist/browser/merge-segment-loaders.js.map +0 -1
  480. package/dist/browser/navigation-bridge.d.ts +0 -102
  481. package/dist/browser/navigation-bridge.d.ts.map +0 -1
  482. package/dist/browser/navigation-bridge.js +0 -708
  483. package/dist/browser/navigation-bridge.js.map +0 -1
  484. package/dist/browser/navigation-client.d.ts +0 -25
  485. package/dist/browser/navigation-client.d.ts.map +0 -1
  486. package/dist/browser/navigation-client.js +0 -157
  487. package/dist/browser/navigation-client.js.map +0 -1
  488. package/dist/browser/navigation-store.d.ts +0 -101
  489. package/dist/browser/navigation-store.d.ts.map +0 -1
  490. package/dist/browser/navigation-store.js +0 -625
  491. package/dist/browser/navigation-store.js.map +0 -1
  492. package/dist/browser/partial-update.d.ts +0 -75
  493. package/dist/browser/partial-update.d.ts.map +0 -1
  494. package/dist/browser/partial-update.js +0 -426
  495. package/dist/browser/partial-update.js.map +0 -1
  496. package/dist/browser/react/Link.d.ts +0 -86
  497. package/dist/browser/react/Link.d.ts.map +0 -1
  498. package/dist/browser/react/Link.js +0 -128
  499. package/dist/browser/react/Link.js.map +0 -1
  500. package/dist/browser/react/NavigationProvider.d.ts +0 -63
  501. package/dist/browser/react/NavigationProvider.d.ts.map +0 -1
  502. package/dist/browser/react/NavigationProvider.js +0 -216
  503. package/dist/browser/react/NavigationProvider.js.map +0 -1
  504. package/dist/browser/react/ScrollRestoration.d.ts +0 -75
  505. package/dist/browser/react/ScrollRestoration.d.ts.map +0 -1
  506. package/dist/browser/react/ScrollRestoration.js +0 -57
  507. package/dist/browser/react/ScrollRestoration.js.map +0 -1
  508. package/dist/browser/react/context.d.ts +0 -46
  509. package/dist/browser/react/context.d.ts.map +0 -1
  510. package/dist/browser/react/context.js +0 -10
  511. package/dist/browser/react/context.js.map +0 -1
  512. package/dist/browser/react/index.d.ts +0 -11
  513. package/dist/browser/react/index.d.ts.map +0 -1
  514. package/dist/browser/react/index.js +0 -22
  515. package/dist/browser/react/index.js.map +0 -1
  516. package/dist/browser/react/location-state-shared.d.ts +0 -63
  517. package/dist/browser/react/location-state-shared.d.ts.map +0 -1
  518. package/dist/browser/react/location-state-shared.js +0 -81
  519. package/dist/browser/react/location-state-shared.js.map +0 -1
  520. package/dist/browser/react/location-state.d.ts +0 -23
  521. package/dist/browser/react/location-state.d.ts.map +0 -1
  522. package/dist/browser/react/location-state.js +0 -29
  523. package/dist/browser/react/location-state.js.map +0 -1
  524. package/dist/browser/react/mount-context.d.ts +0 -24
  525. package/dist/browser/react/mount-context.d.ts.map +0 -1
  526. package/dist/browser/react/mount-context.js +0 -24
  527. package/dist/browser/react/mount-context.js.map +0 -1
  528. package/dist/browser/react/use-action.d.ts +0 -64
  529. package/dist/browser/react/use-action.d.ts.map +0 -1
  530. package/dist/browser/react/use-action.js +0 -134
  531. package/dist/browser/react/use-action.js.map +0 -1
  532. package/dist/browser/react/use-client-cache.d.ts +0 -41
  533. package/dist/browser/react/use-client-cache.d.ts.map +0 -1
  534. package/dist/browser/react/use-client-cache.js +0 -39
  535. package/dist/browser/react/use-client-cache.js.map +0 -1
  536. package/dist/browser/react/use-handle.d.ts +0 -31
  537. package/dist/browser/react/use-handle.d.ts.map +0 -1
  538. package/dist/browser/react/use-handle.js +0 -144
  539. package/dist/browser/react/use-handle.js.map +0 -1
  540. package/dist/browser/react/use-href.d.ts +0 -33
  541. package/dist/browser/react/use-href.d.ts.map +0 -1
  542. package/dist/browser/react/use-href.js +0 -39
  543. package/dist/browser/react/use-href.js.map +0 -1
  544. package/dist/browser/react/use-link-status.d.ts +0 -37
  545. package/dist/browser/react/use-link-status.d.ts.map +0 -1
  546. package/dist/browser/react/use-link-status.js +0 -99
  547. package/dist/browser/react/use-link-status.js.map +0 -1
  548. package/dist/browser/react/use-mount.d.ts +0 -25
  549. package/dist/browser/react/use-mount.d.ts.map +0 -1
  550. package/dist/browser/react/use-mount.js +0 -30
  551. package/dist/browser/react/use-mount.js.map +0 -1
  552. package/dist/browser/react/use-navigation.d.ts +0 -27
  553. package/dist/browser/react/use-navigation.d.ts.map +0 -1
  554. package/dist/browser/react/use-navigation.js +0 -87
  555. package/dist/browser/react/use-navigation.js.map +0 -1
  556. package/dist/browser/react/use-segments.d.ts +0 -38
  557. package/dist/browser/react/use-segments.d.ts.map +0 -1
  558. package/dist/browser/react/use-segments.js +0 -130
  559. package/dist/browser/react/use-segments.js.map +0 -1
  560. package/dist/browser/request-controller.d.ts +0 -26
  561. package/dist/browser/request-controller.d.ts.map +0 -1
  562. package/dist/browser/request-controller.js +0 -147
  563. package/dist/browser/request-controller.js.map +0 -1
  564. package/dist/browser/rsc-router.d.ts +0 -129
  565. package/dist/browser/rsc-router.d.ts.map +0 -1
  566. package/dist/browser/rsc-router.js +0 -195
  567. package/dist/browser/rsc-router.js.map +0 -1
  568. package/dist/browser/scroll-restoration.d.ts +0 -93
  569. package/dist/browser/scroll-restoration.d.ts.map +0 -1
  570. package/dist/browser/scroll-restoration.js +0 -321
  571. package/dist/browser/scroll-restoration.js.map +0 -1
  572. package/dist/browser/segment-structure-assert.d.ts +0 -17
  573. package/dist/browser/segment-structure-assert.d.ts.map +0 -1
  574. package/dist/browser/segment-structure-assert.js +0 -59
  575. package/dist/browser/segment-structure-assert.js.map +0 -1
  576. package/dist/browser/server-action-bridge.d.ts +0 -26
  577. package/dist/browser/server-action-bridge.d.ts.map +0 -1
  578. package/dist/browser/server-action-bridge.js +0 -668
  579. package/dist/browser/server-action-bridge.js.map +0 -1
  580. package/dist/browser/shallow.d.ts +0 -12
  581. package/dist/browser/shallow.d.ts.map +0 -1
  582. package/dist/browser/shallow.js +0 -34
  583. package/dist/browser/shallow.js.map +0 -1
  584. package/dist/browser/types.d.ts +0 -369
  585. package/dist/browser/types.d.ts.map +0 -1
  586. package/dist/browser/types.js +0 -2
  587. package/dist/browser/types.js.map +0 -1
  588. package/dist/build/__tests__/generate-cli.test.d.ts +0 -2
  589. package/dist/build/__tests__/generate-cli.test.d.ts.map +0 -1
  590. package/dist/build/__tests__/generate-cli.test.js +0 -237
  591. package/dist/build/__tests__/generate-cli.test.js.map +0 -1
  592. package/dist/build/__tests__/generate-manifest.test.d.ts +0 -2
  593. package/dist/build/__tests__/generate-manifest.test.d.ts.map +0 -1
  594. package/dist/build/__tests__/generate-manifest.test.js +0 -119
  595. package/dist/build/__tests__/generate-manifest.test.js.map +0 -1
  596. package/dist/build/__tests__/generate-route-types.test.d.ts +0 -2
  597. package/dist/build/__tests__/generate-route-types.test.d.ts.map +0 -1
  598. package/dist/build/__tests__/generate-route-types.test.js +0 -620
  599. package/dist/build/__tests__/generate-route-types.test.js.map +0 -1
  600. package/dist/build/__tests__/per-router-manifest.test.d.ts +0 -2
  601. package/dist/build/__tests__/per-router-manifest.test.d.ts.map +0 -1
  602. package/dist/build/__tests__/per-router-manifest.test.js +0 -308
  603. package/dist/build/__tests__/per-router-manifest.test.js.map +0 -1
  604. package/dist/build/generate-manifest.d.ts +0 -81
  605. package/dist/build/generate-manifest.d.ts.map +0 -1
  606. package/dist/build/generate-manifest.js +0 -276
  607. package/dist/build/generate-manifest.js.map +0 -1
  608. package/dist/build/generate-route-types.d.ts +0 -115
  609. package/dist/build/generate-route-types.d.ts.map +0 -1
  610. package/dist/build/generate-route-types.js +0 -740
  611. package/dist/build/generate-route-types.js.map +0 -1
  612. package/dist/build/index.d.ts +0 -21
  613. package/dist/build/index.d.ts.map +0 -1
  614. package/dist/build/index.js +0 -21
  615. package/dist/build/index.js.map +0 -1
  616. package/dist/build/route-trie.d.ts +0 -71
  617. package/dist/build/route-trie.d.ts.map +0 -1
  618. package/dist/build/route-trie.js +0 -175
  619. package/dist/build/route-trie.js.map +0 -1
  620. package/dist/cache/__tests__/cache-scope.test.d.ts +0 -2
  621. package/dist/cache/__tests__/cache-scope.test.d.ts.map +0 -1
  622. package/dist/cache/__tests__/cache-scope.test.js +0 -208
  623. package/dist/cache/__tests__/cache-scope.test.js.map +0 -1
  624. package/dist/cache/__tests__/document-cache.test.d.ts +0 -2
  625. package/dist/cache/__tests__/document-cache.test.d.ts.map +0 -1
  626. package/dist/cache/__tests__/document-cache.test.js +0 -345
  627. package/dist/cache/__tests__/document-cache.test.js.map +0 -1
  628. package/dist/cache/__tests__/memory-segment-store.test.d.ts +0 -2
  629. package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +0 -1
  630. package/dist/cache/__tests__/memory-segment-store.test.js +0 -425
  631. package/dist/cache/__tests__/memory-segment-store.test.js.map +0 -1
  632. package/dist/cache/__tests__/memory-store.test.d.ts +0 -2
  633. package/dist/cache/__tests__/memory-store.test.d.ts.map +0 -1
  634. package/dist/cache/__tests__/memory-store.test.js +0 -367
  635. package/dist/cache/__tests__/memory-store.test.js.map +0 -1
  636. package/dist/cache/cache-scope.d.ts +0 -102
  637. package/dist/cache/cache-scope.d.ts.map +0 -1
  638. package/dist/cache/cache-scope.js +0 -440
  639. package/dist/cache/cache-scope.js.map +0 -1
  640. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +0 -2
  641. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +0 -1
  642. package/dist/cache/cf/__tests__/cf-cache-store.test.js +0 -330
  643. package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +0 -1
  644. package/dist/cache/cf/cf-cache-store.d.ts +0 -165
  645. package/dist/cache/cf/cf-cache-store.d.ts.map +0 -1
  646. package/dist/cache/cf/cf-cache-store.js +0 -242
  647. package/dist/cache/cf/cf-cache-store.js.map +0 -1
  648. package/dist/cache/cf/index.d.ts +0 -14
  649. package/dist/cache/cf/index.d.ts.map +0 -1
  650. package/dist/cache/cf/index.js +0 -17
  651. package/dist/cache/cf/index.js.map +0 -1
  652. package/dist/cache/document-cache.d.ts +0 -64
  653. package/dist/cache/document-cache.d.ts.map +0 -1
  654. package/dist/cache/document-cache.js +0 -228
  655. package/dist/cache/document-cache.js.map +0 -1
  656. package/dist/cache/index.d.ts +0 -19
  657. package/dist/cache/index.d.ts.map +0 -1
  658. package/dist/cache/index.js +0 -21
  659. package/dist/cache/index.js.map +0 -1
  660. package/dist/cache/memory-segment-store.d.ts +0 -110
  661. package/dist/cache/memory-segment-store.d.ts.map +0 -1
  662. package/dist/cache/memory-segment-store.js +0 -117
  663. package/dist/cache/memory-segment-store.js.map +0 -1
  664. package/dist/cache/memory-store.d.ts +0 -41
  665. package/dist/cache/memory-store.d.ts.map +0 -1
  666. package/dist/cache/memory-store.js +0 -191
  667. package/dist/cache/memory-store.js.map +0 -1
  668. package/dist/cache/types.d.ts +0 -317
  669. package/dist/cache/types.d.ts.map +0 -1
  670. package/dist/cache/types.js +0 -12
  671. package/dist/cache/types.js.map +0 -1
  672. package/dist/client.d.ts +0 -248
  673. package/dist/client.d.ts.map +0 -1
  674. package/dist/client.js +0 -367
  675. package/dist/client.js.map +0 -1
  676. package/dist/client.rsc.d.ts +0 -26
  677. package/dist/client.rsc.d.ts.map +0 -1
  678. package/dist/client.rsc.js +0 -46
  679. package/dist/client.rsc.js.map +0 -1
  680. package/dist/component-utils.d.ts +0 -36
  681. package/dist/component-utils.d.ts.map +0 -1
  682. package/dist/component-utils.js +0 -61
  683. package/dist/component-utils.js.map +0 -1
  684. package/dist/components/DefaultDocument.d.ts +0 -13
  685. package/dist/components/DefaultDocument.d.ts.map +0 -1
  686. package/dist/components/DefaultDocument.js +0 -15
  687. package/dist/components/DefaultDocument.js.map +0 -1
  688. package/dist/debug.d.ts +0 -58
  689. package/dist/debug.d.ts.map +0 -1
  690. package/dist/debug.js +0 -157
  691. package/dist/debug.js.map +0 -1
  692. package/dist/default-error-boundary.d.ts +0 -11
  693. package/dist/default-error-boundary.d.ts.map +0 -1
  694. package/dist/default-error-boundary.js +0 -45
  695. package/dist/default-error-boundary.js.map +0 -1
  696. package/dist/deps/browser.d.ts +0 -2
  697. package/dist/deps/browser.d.ts.map +0 -1
  698. package/dist/deps/browser.js +0 -3
  699. package/dist/deps/browser.js.map +0 -1
  700. package/dist/deps/html-stream-client.d.ts +0 -2
  701. package/dist/deps/html-stream-client.d.ts.map +0 -1
  702. package/dist/deps/html-stream-client.js +0 -3
  703. package/dist/deps/html-stream-client.js.map +0 -1
  704. package/dist/deps/html-stream-server.d.ts +0 -2
  705. package/dist/deps/html-stream-server.d.ts.map +0 -1
  706. package/dist/deps/html-stream-server.js +0 -3
  707. package/dist/deps/html-stream-server.js.map +0 -1
  708. package/dist/deps/rsc.d.ts +0 -2
  709. package/dist/deps/rsc.d.ts.map +0 -1
  710. package/dist/deps/rsc.js +0 -4
  711. package/dist/deps/rsc.js.map +0 -1
  712. package/dist/deps/ssr.d.ts +0 -2
  713. package/dist/deps/ssr.d.ts.map +0 -1
  714. package/dist/deps/ssr.js +0 -3
  715. package/dist/deps/ssr.js.map +0 -1
  716. package/dist/errors.d.ts +0 -174
  717. package/dist/errors.d.ts.map +0 -1
  718. package/dist/errors.js +0 -241
  719. package/dist/errors.js.map +0 -1
  720. package/dist/handle.d.ts +0 -78
  721. package/dist/handle.d.ts.map +0 -1
  722. package/dist/handle.js +0 -82
  723. package/dist/handle.js.map +0 -1
  724. package/dist/handles/MetaTags.d.ts +0 -14
  725. package/dist/handles/MetaTags.d.ts.map +0 -1
  726. package/dist/handles/MetaTags.js +0 -136
  727. package/dist/handles/MetaTags.js.map +0 -1
  728. package/dist/handles/index.d.ts +0 -6
  729. package/dist/handles/index.d.ts.map +0 -1
  730. package/dist/handles/index.js +0 -6
  731. package/dist/handles/index.js.map +0 -1
  732. package/dist/handles/meta.d.ts +0 -39
  733. package/dist/handles/meta.d.ts.map +0 -1
  734. package/dist/handles/meta.js +0 -202
  735. package/dist/handles/meta.js.map +0 -1
  736. package/dist/host/__tests__/errors.test.d.ts +0 -2
  737. package/dist/host/__tests__/errors.test.d.ts.map +0 -1
  738. package/dist/host/__tests__/errors.test.js +0 -76
  739. package/dist/host/__tests__/errors.test.js.map +0 -1
  740. package/dist/host/__tests__/pattern-comprehensive.test.d.ts +0 -2
  741. package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +0 -1
  742. package/dist/host/__tests__/pattern-comprehensive.test.js +0 -732
  743. package/dist/host/__tests__/pattern-comprehensive.test.js.map +0 -1
  744. package/dist/host/__tests__/pattern-matcher.test.d.ts +0 -2
  745. package/dist/host/__tests__/pattern-matcher.test.d.ts.map +0 -1
  746. package/dist/host/__tests__/pattern-matcher.test.js +0 -251
  747. package/dist/host/__tests__/pattern-matcher.test.js.map +0 -1
  748. package/dist/host/__tests__/router.test.d.ts +0 -2
  749. package/dist/host/__tests__/router.test.d.ts.map +0 -1
  750. package/dist/host/__tests__/router.test.js +0 -241
  751. package/dist/host/__tests__/router.test.js.map +0 -1
  752. package/dist/host/__tests__/testing.test.d.ts +0 -2
  753. package/dist/host/__tests__/testing.test.d.ts.map +0 -1
  754. package/dist/host/__tests__/testing.test.js +0 -64
  755. package/dist/host/__tests__/testing.test.js.map +0 -1
  756. package/dist/host/__tests__/utils.test.d.ts +0 -2
  757. package/dist/host/__tests__/utils.test.d.ts.map +0 -1
  758. package/dist/host/__tests__/utils.test.js +0 -29
  759. package/dist/host/__tests__/utils.test.js.map +0 -1
  760. package/dist/host/cookie-handler.d.ts +0 -34
  761. package/dist/host/cookie-handler.d.ts.map +0 -1
  762. package/dist/host/cookie-handler.js +0 -124
  763. package/dist/host/cookie-handler.js.map +0 -1
  764. package/dist/host/errors.d.ts +0 -56
  765. package/dist/host/errors.d.ts.map +0 -1
  766. package/dist/host/errors.js +0 -79
  767. package/dist/host/errors.js.map +0 -1
  768. package/dist/host/index.d.ts +0 -29
  769. package/dist/host/index.d.ts.map +0 -1
  770. package/dist/host/index.js +0 -32
  771. package/dist/host/index.js.map +0 -1
  772. package/dist/host/pattern-matcher.d.ts +0 -36
  773. package/dist/host/pattern-matcher.d.ts.map +0 -1
  774. package/dist/host/pattern-matcher.js +0 -172
  775. package/dist/host/pattern-matcher.js.map +0 -1
  776. package/dist/host/router.d.ts +0 -26
  777. package/dist/host/router.d.ts.map +0 -1
  778. package/dist/host/router.js +0 -218
  779. package/dist/host/router.js.map +0 -1
  780. package/dist/host/testing.d.ts +0 -36
  781. package/dist/host/testing.d.ts.map +0 -1
  782. package/dist/host/testing.js +0 -55
  783. package/dist/host/testing.js.map +0 -1
  784. package/dist/host/types.d.ts +0 -115
  785. package/dist/host/types.d.ts.map +0 -1
  786. package/dist/host/types.js +0 -7
  787. package/dist/host/types.js.map +0 -1
  788. package/dist/host/utils.d.ts +0 -21
  789. package/dist/host/utils.d.ts.map +0 -1
  790. package/dist/host/utils.js +0 -23
  791. package/dist/host/utils.js.map +0 -1
  792. package/dist/href-client.d.ts +0 -131
  793. package/dist/href-client.d.ts.map +0 -1
  794. package/dist/href-client.js +0 -64
  795. package/dist/href-client.js.map +0 -1
  796. package/dist/href-context.d.ts +0 -29
  797. package/dist/href-context.d.ts.map +0 -1
  798. package/dist/href-context.js +0 -21
  799. package/dist/href-context.js.map +0 -1
  800. package/dist/index.d.ts +0 -73
  801. package/dist/index.d.ts.map +0 -1
  802. package/dist/index.js +0 -91
  803. package/dist/index.js.map +0 -1
  804. package/dist/index.rsc.d.ts +0 -32
  805. package/dist/index.rsc.d.ts.map +0 -1
  806. package/dist/index.rsc.js +0 -40
  807. package/dist/index.rsc.js.map +0 -1
  808. package/dist/internal-debug.d.ts +0 -2
  809. package/dist/internal-debug.d.ts.map +0 -1
  810. package/dist/internal-debug.js +0 -5
  811. package/dist/internal-debug.js.map +0 -1
  812. package/dist/loader.d.ts +0 -14
  813. package/dist/loader.d.ts.map +0 -1
  814. package/dist/loader.js +0 -20
  815. package/dist/loader.js.map +0 -1
  816. package/dist/loader.rsc.d.ts +0 -19
  817. package/dist/loader.rsc.d.ts.map +0 -1
  818. package/dist/loader.rsc.js +0 -99
  819. package/dist/loader.rsc.js.map +0 -1
  820. package/dist/network-error-thrower.d.ts +0 -17
  821. package/dist/network-error-thrower.d.ts.map +0 -1
  822. package/dist/network-error-thrower.js +0 -14
  823. package/dist/network-error-thrower.js.map +0 -1
  824. package/dist/outlet-context.d.ts +0 -13
  825. package/dist/outlet-context.d.ts.map +0 -1
  826. package/dist/outlet-context.js +0 -3
  827. package/dist/outlet-context.js.map +0 -1
  828. package/dist/prerender/__tests__/param-hash.test.d.ts +0 -2
  829. package/dist/prerender/__tests__/param-hash.test.d.ts.map +0 -1
  830. package/dist/prerender/__tests__/param-hash.test.js +0 -148
  831. package/dist/prerender/__tests__/param-hash.test.js.map +0 -1
  832. package/dist/prerender/param-hash.d.ts +0 -16
  833. package/dist/prerender/param-hash.d.ts.map +0 -1
  834. package/dist/prerender/param-hash.js +0 -36
  835. package/dist/prerender/param-hash.js.map +0 -1
  836. package/dist/prerender/store.d.ts +0 -38
  837. package/dist/prerender/store.d.ts.map +0 -1
  838. package/dist/prerender/store.js +0 -61
  839. package/dist/prerender/store.js.map +0 -1
  840. package/dist/prerender.d.ts +0 -66
  841. package/dist/prerender.d.ts.map +0 -1
  842. package/dist/prerender.js +0 -57
  843. package/dist/prerender.js.map +0 -1
  844. package/dist/reverse.d.ts +0 -196
  845. package/dist/reverse.d.ts.map +0 -1
  846. package/dist/reverse.js +0 -78
  847. package/dist/reverse.js.map +0 -1
  848. package/dist/root-error-boundary.d.ts +0 -33
  849. package/dist/root-error-boundary.d.ts.map +0 -1
  850. package/dist/root-error-boundary.js +0 -165
  851. package/dist/root-error-boundary.js.map +0 -1
  852. package/dist/route-content-wrapper.d.ts +0 -46
  853. package/dist/route-content-wrapper.d.ts.map +0 -1
  854. package/dist/route-content-wrapper.js +0 -77
  855. package/dist/route-content-wrapper.js.map +0 -1
  856. package/dist/route-definition.d.ts +0 -421
  857. package/dist/route-definition.d.ts.map +0 -1
  858. package/dist/route-definition.js +0 -868
  859. package/dist/route-definition.js.map +0 -1
  860. package/dist/route-map-builder.d.ts +0 -155
  861. package/dist/route-map-builder.d.ts.map +0 -1
  862. package/dist/route-map-builder.js +0 -237
  863. package/dist/route-map-builder.js.map +0 -1
  864. package/dist/route-types.d.ts +0 -165
  865. package/dist/route-types.d.ts.map +0 -1
  866. package/dist/route-types.js +0 -7
  867. package/dist/route-types.js.map +0 -1
  868. package/dist/router/__tests__/handler-context.test.d.ts +0 -2
  869. package/dist/router/__tests__/handler-context.test.d.ts.map +0 -1
  870. package/dist/router/__tests__/handler-context.test.js +0 -65
  871. package/dist/router/__tests__/handler-context.test.js.map +0 -1
  872. package/dist/router/__tests__/loader-cycle-detection.test.d.ts +0 -2
  873. package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +0 -1
  874. package/dist/router/__tests__/loader-cycle-detection.test.js +0 -221
  875. package/dist/router/__tests__/loader-cycle-detection.test.js.map +0 -1
  876. package/dist/router/__tests__/match-context.test.d.ts +0 -2
  877. package/dist/router/__tests__/match-context.test.d.ts.map +0 -1
  878. package/dist/router/__tests__/match-context.test.js +0 -92
  879. package/dist/router/__tests__/match-context.test.js.map +0 -1
  880. package/dist/router/__tests__/match-pipelines.test.d.ts +0 -2
  881. package/dist/router/__tests__/match-pipelines.test.d.ts.map +0 -1
  882. package/dist/router/__tests__/match-pipelines.test.js +0 -417
  883. package/dist/router/__tests__/match-pipelines.test.js.map +0 -1
  884. package/dist/router/__tests__/match-result.test.d.ts +0 -2
  885. package/dist/router/__tests__/match-result.test.d.ts.map +0 -1
  886. package/dist/router/__tests__/match-result.test.js +0 -457
  887. package/dist/router/__tests__/match-result.test.js.map +0 -1
  888. package/dist/router/__tests__/on-error.test.d.ts +0 -2
  889. package/dist/router/__tests__/on-error.test.d.ts.map +0 -1
  890. package/dist/router/__tests__/on-error.test.js +0 -678
  891. package/dist/router/__tests__/on-error.test.js.map +0 -1
  892. package/dist/router/__tests__/pattern-matching.test.d.ts +0 -2
  893. package/dist/router/__tests__/pattern-matching.test.d.ts.map +0 -1
  894. package/dist/router/__tests__/pattern-matching.test.js +0 -629
  895. package/dist/router/__tests__/pattern-matching.test.js.map +0 -1
  896. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +0 -2
  897. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +0 -1
  898. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +0 -155
  899. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +0 -1
  900. package/dist/router/error-handling.d.ts +0 -77
  901. package/dist/router/error-handling.d.ts.map +0 -1
  902. package/dist/router/error-handling.js +0 -202
  903. package/dist/router/error-handling.js.map +0 -1
  904. package/dist/router/handler-context.d.ts +0 -20
  905. package/dist/router/handler-context.d.ts.map +0 -1
  906. package/dist/router/handler-context.js +0 -198
  907. package/dist/router/handler-context.js.map +0 -1
  908. package/dist/router/intercept-resolution.d.ts +0 -66
  909. package/dist/router/intercept-resolution.d.ts.map +0 -1
  910. package/dist/router/intercept-resolution.js +0 -246
  911. package/dist/router/intercept-resolution.js.map +0 -1
  912. package/dist/router/loader-resolution.d.ts +0 -64
  913. package/dist/router/loader-resolution.d.ts.map +0 -1
  914. package/dist/router/loader-resolution.js +0 -284
  915. package/dist/router/loader-resolution.js.map +0 -1
  916. package/dist/router/logging.d.ts +0 -15
  917. package/dist/router/logging.d.ts.map +0 -1
  918. package/dist/router/logging.js +0 -99
  919. package/dist/router/logging.js.map +0 -1
  920. package/dist/router/manifest.d.ts +0 -22
  921. package/dist/router/manifest.d.ts.map +0 -1
  922. package/dist/router/manifest.js +0 -181
  923. package/dist/router/manifest.js.map +0 -1
  924. package/dist/router/match-api.d.ts +0 -35
  925. package/dist/router/match-api.d.ts.map +0 -1
  926. package/dist/router/match-api.js +0 -406
  927. package/dist/router/match-api.js.map +0 -1
  928. package/dist/router/match-context.d.ts +0 -206
  929. package/dist/router/match-context.d.ts.map +0 -1
  930. package/dist/router/match-context.js +0 -17
  931. package/dist/router/match-context.js.map +0 -1
  932. package/dist/router/match-middleware/background-revalidation.d.ts +0 -127
  933. package/dist/router/match-middleware/background-revalidation.d.ts.map +0 -1
  934. package/dist/router/match-middleware/background-revalidation.js +0 -75
  935. package/dist/router/match-middleware/background-revalidation.js.map +0 -1
  936. package/dist/router/match-middleware/cache-lookup.d.ts +0 -112
  937. package/dist/router/match-middleware/cache-lookup.d.ts.map +0 -1
  938. package/dist/router/match-middleware/cache-lookup.js +0 -257
  939. package/dist/router/match-middleware/cache-lookup.js.map +0 -1
  940. package/dist/router/match-middleware/cache-store.d.ts +0 -113
  941. package/dist/router/match-middleware/cache-store.d.ts.map +0 -1
  942. package/dist/router/match-middleware/cache-store.js +0 -108
  943. package/dist/router/match-middleware/cache-store.js.map +0 -1
  944. package/dist/router/match-middleware/index.d.ts +0 -81
  945. package/dist/router/match-middleware/index.d.ts.map +0 -1
  946. package/dist/router/match-middleware/index.js +0 -80
  947. package/dist/router/match-middleware/index.js.map +0 -1
  948. package/dist/router/match-middleware/intercept-resolution.d.ts +0 -117
  949. package/dist/router/match-middleware/intercept-resolution.d.ts.map +0 -1
  950. package/dist/router/match-middleware/intercept-resolution.js +0 -134
  951. package/dist/router/match-middleware/intercept-resolution.js.map +0 -1
  952. package/dist/router/match-middleware/segment-resolution.d.ts +0 -99
  953. package/dist/router/match-middleware/segment-resolution.d.ts.map +0 -1
  954. package/dist/router/match-middleware/segment-resolution.js +0 -53
  955. package/dist/router/match-middleware/segment-resolution.js.map +0 -1
  956. package/dist/router/match-pipelines.d.ts +0 -147
  957. package/dist/router/match-pipelines.d.ts.map +0 -1
  958. package/dist/router/match-pipelines.js +0 -82
  959. package/dist/router/match-pipelines.js.map +0 -1
  960. package/dist/router/match-result.d.ts +0 -126
  961. package/dist/router/match-result.d.ts.map +0 -1
  962. package/dist/router/match-result.js +0 -93
  963. package/dist/router/match-result.js.map +0 -1
  964. package/dist/router/metrics.d.ts +0 -20
  965. package/dist/router/metrics.d.ts.map +0 -1
  966. package/dist/router/metrics.js +0 -47
  967. package/dist/router/metrics.js.map +0 -1
  968. package/dist/router/middleware.d.ts +0 -249
  969. package/dist/router/middleware.d.ts.map +0 -1
  970. package/dist/router/middleware.js +0 -434
  971. package/dist/router/middleware.js.map +0 -1
  972. package/dist/router/middleware.test.d.ts +0 -2
  973. package/dist/router/middleware.test.d.ts.map +0 -1
  974. package/dist/router/middleware.test.js +0 -816
  975. package/dist/router/middleware.test.js.map +0 -1
  976. package/dist/router/pattern-matching.d.ts +0 -149
  977. package/dist/router/pattern-matching.d.ts.map +0 -1
  978. package/dist/router/pattern-matching.js +0 -349
  979. package/dist/router/pattern-matching.js.map +0 -1
  980. package/dist/router/revalidation.d.ts +0 -44
  981. package/dist/router/revalidation.d.ts.map +0 -1
  982. package/dist/router/revalidation.js +0 -147
  983. package/dist/router/revalidation.js.map +0 -1
  984. package/dist/router/router-context.d.ts +0 -135
  985. package/dist/router/router-context.d.ts.map +0 -1
  986. package/dist/router/router-context.js +0 -36
  987. package/dist/router/router-context.js.map +0 -1
  988. package/dist/router/segment-resolution.d.ts +0 -127
  989. package/dist/router/segment-resolution.d.ts.map +0 -1
  990. package/dist/router/segment-resolution.js +0 -919
  991. package/dist/router/segment-resolution.js.map +0 -1
  992. package/dist/router/trie-matching.d.ts +0 -40
  993. package/dist/router/trie-matching.d.ts.map +0 -1
  994. package/dist/router/trie-matching.js +0 -127
  995. package/dist/router/trie-matching.js.map +0 -1
  996. package/dist/router/types.d.ts +0 -136
  997. package/dist/router/types.d.ts.map +0 -1
  998. package/dist/router/types.js +0 -7
  999. package/dist/router/types.js.map +0 -1
  1000. package/dist/router.d.ts +0 -753
  1001. package/dist/router.d.ts.map +0 -1
  1002. package/dist/router.gen.d.ts +0 -6
  1003. package/dist/router.gen.d.ts.map +0 -1
  1004. package/dist/router.gen.js +0 -6
  1005. package/dist/router.gen.js.map +0 -1
  1006. package/dist/router.js +0 -1304
  1007. package/dist/router.js.map +0 -1
  1008. package/dist/rsc/__tests__/helpers.test.d.ts +0 -2
  1009. package/dist/rsc/__tests__/helpers.test.d.ts.map +0 -1
  1010. package/dist/rsc/__tests__/helpers.test.js +0 -140
  1011. package/dist/rsc/__tests__/helpers.test.js.map +0 -1
  1012. package/dist/rsc/handler.d.ts +0 -45
  1013. package/dist/rsc/handler.d.ts.map +0 -1
  1014. package/dist/rsc/handler.js +0 -1172
  1015. package/dist/rsc/handler.js.map +0 -1
  1016. package/dist/rsc/helpers.d.ts +0 -16
  1017. package/dist/rsc/helpers.d.ts.map +0 -1
  1018. package/dist/rsc/helpers.js +0 -55
  1019. package/dist/rsc/helpers.js.map +0 -1
  1020. package/dist/rsc/index.d.ts +0 -22
  1021. package/dist/rsc/index.d.ts.map +0 -1
  1022. package/dist/rsc/index.js +0 -23
  1023. package/dist/rsc/index.js.map +0 -1
  1024. package/dist/rsc/nonce.d.ts +0 -9
  1025. package/dist/rsc/nonce.d.ts.map +0 -1
  1026. package/dist/rsc/nonce.js +0 -18
  1027. package/dist/rsc/nonce.js.map +0 -1
  1028. package/dist/rsc/types.d.ts +0 -206
  1029. package/dist/rsc/types.d.ts.map +0 -1
  1030. package/dist/rsc/types.js +0 -8
  1031. package/dist/rsc/types.js.map +0 -1
  1032. package/dist/search-params.d.ts +0 -103
  1033. package/dist/search-params.d.ts.map +0 -1
  1034. package/dist/search-params.js +0 -74
  1035. package/dist/search-params.js.map +0 -1
  1036. package/dist/segment-system.d.ts +0 -75
  1037. package/dist/segment-system.d.ts.map +0 -1
  1038. package/dist/segment-system.js +0 -336
  1039. package/dist/segment-system.js.map +0 -1
  1040. package/dist/server/context.d.ts +0 -245
  1041. package/dist/server/context.d.ts.map +0 -1
  1042. package/dist/server/context.js +0 -197
  1043. package/dist/server/context.js.map +0 -1
  1044. package/dist/server/fetchable-loader-store.d.ts +0 -18
  1045. package/dist/server/fetchable-loader-store.d.ts.map +0 -1
  1046. package/dist/server/fetchable-loader-store.js +0 -18
  1047. package/dist/server/fetchable-loader-store.js.map +0 -1
  1048. package/dist/server/handle-store.d.ts +0 -85
  1049. package/dist/server/handle-store.d.ts.map +0 -1
  1050. package/dist/server/handle-store.js +0 -142
  1051. package/dist/server/handle-store.js.map +0 -1
  1052. package/dist/server/loader-registry.d.ts +0 -55
  1053. package/dist/server/loader-registry.d.ts.map +0 -1
  1054. package/dist/server/loader-registry.js +0 -132
  1055. package/dist/server/loader-registry.js.map +0 -1
  1056. package/dist/server/request-context.d.ts +0 -226
  1057. package/dist/server/request-context.d.ts.map +0 -1
  1058. package/dist/server/request-context.js +0 -290
  1059. package/dist/server/request-context.js.map +0 -1
  1060. package/dist/server/root-layout.d.ts +0 -4
  1061. package/dist/server/root-layout.d.ts.map +0 -1
  1062. package/dist/server/root-layout.js +0 -5
  1063. package/dist/server/root-layout.js.map +0 -1
  1064. package/dist/server.d.ts +0 -15
  1065. package/dist/server.d.ts.map +0 -1
  1066. package/dist/server.js +0 -20
  1067. package/dist/server.js.map +0 -1
  1068. package/dist/ssr/__tests__/ssr-handler.test.d.ts +0 -2
  1069. package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +0 -1
  1070. package/dist/ssr/__tests__/ssr-handler.test.js +0 -132
  1071. package/dist/ssr/__tests__/ssr-handler.test.js.map +0 -1
  1072. package/dist/ssr/index.d.ts +0 -98
  1073. package/dist/ssr/index.d.ts.map +0 -1
  1074. package/dist/ssr/index.js +0 -158
  1075. package/dist/ssr/index.js.map +0 -1
  1076. package/dist/static-handler.d.ts +0 -50
  1077. package/dist/static-handler.d.ts.map +0 -1
  1078. package/dist/static-handler.gen.d.ts +0 -5
  1079. package/dist/static-handler.gen.d.ts.map +0 -1
  1080. package/dist/static-handler.gen.js +0 -5
  1081. package/dist/static-handler.gen.js.map +0 -1
  1082. package/dist/static-handler.js +0 -29
  1083. package/dist/static-handler.js.map +0 -1
  1084. package/dist/theme/ThemeProvider.d.ts +0 -20
  1085. package/dist/theme/ThemeProvider.d.ts.map +0 -1
  1086. package/dist/theme/ThemeProvider.js +0 -240
  1087. package/dist/theme/ThemeProvider.js.map +0 -1
  1088. package/dist/theme/ThemeScript.d.ts +0 -48
  1089. package/dist/theme/ThemeScript.d.ts.map +0 -1
  1090. package/dist/theme/ThemeScript.js +0 -13
  1091. package/dist/theme/ThemeScript.js.map +0 -1
  1092. package/dist/theme/__tests__/theme.test.d.ts +0 -2
  1093. package/dist/theme/__tests__/theme.test.d.ts.map +0 -1
  1094. package/dist/theme/__tests__/theme.test.js +0 -103
  1095. package/dist/theme/__tests__/theme.test.js.map +0 -1
  1096. package/dist/theme/constants.d.ts +0 -29
  1097. package/dist/theme/constants.d.ts.map +0 -1
  1098. package/dist/theme/constants.js +0 -48
  1099. package/dist/theme/constants.js.map +0 -1
  1100. package/dist/theme/index.d.ts +0 -31
  1101. package/dist/theme/index.d.ts.map +0 -1
  1102. package/dist/theme/index.js +0 -36
  1103. package/dist/theme/index.js.map +0 -1
  1104. package/dist/theme/theme-context.d.ts +0 -40
  1105. package/dist/theme/theme-context.d.ts.map +0 -1
  1106. package/dist/theme/theme-context.js +0 -60
  1107. package/dist/theme/theme-context.js.map +0 -1
  1108. package/dist/theme/theme-script.d.ts +0 -27
  1109. package/dist/theme/theme-script.d.ts.map +0 -1
  1110. package/dist/theme/theme-script.js +0 -147
  1111. package/dist/theme/theme-script.js.map +0 -1
  1112. package/dist/theme/types.d.ts +0 -163
  1113. package/dist/theme/types.d.ts.map +0 -1
  1114. package/dist/theme/types.js +0 -11
  1115. package/dist/theme/types.js.map +0 -1
  1116. package/dist/theme/use-theme.d.ts +0 -12
  1117. package/dist/theme/use-theme.d.ts.map +0 -1
  1118. package/dist/theme/use-theme.js +0 -40
  1119. package/dist/theme/use-theme.js.map +0 -1
  1120. package/dist/types.d.ts +0 -1479
  1121. package/dist/types.d.ts.map +0 -1
  1122. package/dist/types.js +0 -10
  1123. package/dist/types.js.map +0 -1
  1124. package/dist/urls.d.ts +0 -441
  1125. package/dist/urls.d.ts.map +0 -1
  1126. package/dist/urls.gen.d.ts +0 -8
  1127. package/dist/urls.gen.d.ts.map +0 -1
  1128. package/dist/urls.gen.js +0 -8
  1129. package/dist/urls.gen.js.map +0 -1
  1130. package/dist/urls.js +0 -443
  1131. package/dist/urls.js.map +0 -1
  1132. package/dist/use-loader.d.ts +0 -127
  1133. package/dist/use-loader.d.ts.map +0 -1
  1134. package/dist/use-loader.js +0 -237
  1135. package/dist/use-loader.js.map +0 -1
  1136. package/dist/vite/__tests__/ast-handler-extract.test.d.ts +0 -2
  1137. package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +0 -1
  1138. package/dist/vite/__tests__/ast-handler-extract.test.js +0 -294
  1139. package/dist/vite/__tests__/ast-handler-extract.test.js.map +0 -1
  1140. package/dist/vite/__tests__/expose-id-utils.test.d.ts +0 -2
  1141. package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +0 -1
  1142. package/dist/vite/__tests__/expose-id-utils.test.js +0 -224
  1143. package/dist/vite/__tests__/expose-id-utils.test.js.map +0 -1
  1144. package/dist/vite/__tests__/expose-internal-ids.test.d.ts +0 -2
  1145. package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +0 -1
  1146. package/dist/vite/__tests__/expose-internal-ids.test.js +0 -647
  1147. package/dist/vite/__tests__/expose-internal-ids.test.js.map +0 -1
  1148. package/dist/vite/__tests__/expose-router-id.test.d.ts +0 -2
  1149. package/dist/vite/__tests__/expose-router-id.test.d.ts.map +0 -1
  1150. package/dist/vite/__tests__/expose-router-id.test.js +0 -39
  1151. package/dist/vite/__tests__/expose-router-id.test.js.map +0 -1
  1152. package/dist/vite/ast-handler-extract.d.ts +0 -49
  1153. package/dist/vite/ast-handler-extract.d.ts.map +0 -1
  1154. package/dist/vite/ast-handler-extract.js +0 -249
  1155. package/dist/vite/ast-handler-extract.js.map +0 -1
  1156. package/dist/vite/expose-action-id.d.ts +0 -19
  1157. package/dist/vite/expose-action-id.d.ts.map +0 -1
  1158. package/dist/vite/expose-action-id.js +0 -250
  1159. package/dist/vite/expose-action-id.js.map +0 -1
  1160. package/dist/vite/expose-id-utils.d.ts +0 -69
  1161. package/dist/vite/expose-id-utils.d.ts.map +0 -1
  1162. package/dist/vite/expose-id-utils.js +0 -289
  1163. package/dist/vite/expose-id-utils.js.map +0 -1
  1164. package/dist/vite/expose-internal-ids.d.ts +0 -22
  1165. package/dist/vite/expose-internal-ids.d.ts.map +0 -1
  1166. package/dist/vite/expose-internal-ids.js +0 -886
  1167. package/dist/vite/expose-internal-ids.js.map +0 -1
  1168. package/dist/vite/index.d.ts +0 -149
  1169. package/dist/vite/index.d.ts.map +0 -1
  1170. package/dist/vite/index.js.bak +0 -5448
  1171. package/dist/vite/index.js.map +0 -1
  1172. package/dist/vite/index.named-routes.gen.ts +0 -103
  1173. package/dist/vite/package-resolution.d.ts +0 -43
  1174. package/dist/vite/package-resolution.d.ts.map +0 -1
  1175. package/dist/vite/package-resolution.js +0 -112
  1176. package/dist/vite/package-resolution.js.map +0 -1
  1177. package/dist/vite/virtual-entries.d.ts +0 -25
  1178. package/dist/vite/virtual-entries.d.ts.map +0 -1
  1179. package/dist/vite/virtual-entries.js +0 -110
  1180. package/dist/vite/virtual-entries.js.map +0 -1
  1181. package/src/browser/action-response-classifier.ts +0 -99
  1182. package/src/browser/react/use-client-cache.ts +0 -58
  1183. package/src/browser/shallow.ts +0 -40
  1184. package/src/handles/index.ts +0 -7
  1185. package/src/network-error-thrower.tsx +0 -23
  1186. package/src/router/middleware-cookies.ts +0 -55
@@ -0,0 +1,124 @@
1
+ # Testing a client component — renderRoute
2
+
3
+ **Layer:** unit (DOM) · **Import:** `@rangojs/router/testing/dom` · **DSL it tests:** a client component reading router context (see `/hooks`)
4
+
5
+ RTL-style stub (peer of React Router's `createRoutesStub` / Expo's `renderRouter`). It mounts the router's REAL `NavigationProvider` plus a synthetic segment tree built from the `routes` you pass, so client hooks resolve against production context — no server, no Vite build, no Flight round-trip. Loader data, location state, and handle output are SEEDED into client context; nothing is executed.
6
+
7
+ ## API
8
+
9
+ ### Options — `RenderRouteOptions`
10
+
11
+ | Field | Type | Meaning |
12
+ | --------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13
+ | `request` | `Request \| string` | Initial location. Only the URL is read (client render — headers/method ignored). Defaults to the leaf spec's static prefix or `"/"`. |
14
+ | `loaderData` | `Record<string, unknown>` | Loader data keyed by loader `$$id`. `useLoader(L)` reads `loaderData[L.$$id]`. |
15
+ | `loaders` | `ReadonlyArray<readonly [LoaderDefinition<any>, unknown]>` | Seed by REFERENCE: `[loader, data]` pairs. Robust for real `createLoader()` handles whose `$$id` is empty in a bare test. Prefer over `loaderData`. |
16
+ | `params` | `Record<string, string>` | Explicit params, merged over (and overriding) params extracted from the `request` URL. |
17
+ | `locationState` | `ReadonlyArray<readonly [LocationStateDefinition<any, any>, unknown]>` | Seed `useLocationState(def)` by REFERENCE: `[def, value]` pairs; written to `history.state`. |
18
+ | `handles` | `ReadonlyArray<readonly [Handle<any, any>, unknown[]]>` | Seed `useHandle(handle)` by REFERENCE: `[handle, pushedValues[]]`. Accumulated GLOBALLY (not segment-scoped). |
19
+ | `handle` | `HandleDataSeed` | Advanced: raw wire format `{ [handleId]: { [segmentId]: pushedValues[] } }`. Prefer `handles`. Merged with it. |
20
+ | `routeMap` | `Record<string, string>` | Name -> pattern map (informational; client `useReverse` takes its map as an argument, so this is not consumed). |
21
+ | `basename` | `string` | `createRouter({ basename })` value. Wired into `NavigationProvider` so `useRouter().basename`, `<Link>` prefixing, `useMount`/`useHref` resolve against the mount. Normalized like `createRouter`. Defaults to root. |
22
+ | `mount` | `string` | `include()` mount prefix. Wraps the segment chain in a `MountContext` so `useMount()` returns the prefix. Normalized like a path prefix. Defaults to `"/"`. |
23
+ | `theme` | `ThemeConfig \| true` | Theme config (`createRouter({ theme })` shape) to wrap the tree in a `ThemeProvider`. Defaults to no provider. A component calling `useTheme()` REQUIRES one. |
24
+ | `nonce` | `string` | CSP nonce to seed via `NonceContext`, so a component calling `useNonce()` (e.g. an analytics/GTM head script) sees it — mirroring SSR. Defaults to `undefined` (the browser default). |
25
+
26
+ `RenderRouteSpec = { path, Component, layout?, loaderIds?, name? }` — one node of the route definition. The array is the layout chain root-to-leaf; the LAST entry is the leaf route (its pattern is matched against `request` to extract params; layout patterns are informational). `loaderIds` attaches seeded loaders to THIS node's segment; `layout` on the leaf wraps it; `name` is informational.
27
+
28
+ ### Context — client hooks it makes resolve (what your code receives)
29
+
30
+ | Hook | Meaning |
31
+ | ------------------------------ | --------------------------------------------------------------------------------------------- |
32
+ | `useParams` | Params from the matched leaf pattern, with `options.params` merged over. |
33
+ | `useReverse` | Reverse a name->pattern map to a URL; merges `useParams()` and the `mount`/`basename` prefix. |
34
+ | `useHref` | Resolve an href against the mount/basename. |
35
+ | `useMount` | The `include()` mount prefix (`options.mount`), else `"/"`. |
36
+ | `useNavigation` | Navigation controller state — stays `idle` (see caveat). |
37
+ | `useRouter` | The router handle, including `.basename`. |
38
+ | `usePathname` | Current committed pathname. |
39
+ | `useSearchParams` | Search params from the `request` URL. |
40
+ | `useNonce` | SEEDED CSP nonce (`options.nonce`), else `undefined` (the browser default). |
41
+ | `useLoader` / `useFetchLoader` | SEEDED loader data (read path, not run path). |
42
+ | `useLocationState` | SEEDED `history.state` value. |
43
+ | `useHandle` | SEEDED handle output (globally accumulated). |
44
+ | `Outlet` | Renders the next segment in the chain (layout nesting). |
45
+ | `useTheme` | Theme; throws without `options.theme` (see caveat). |
46
+
47
+ ### Returns — `RenderRouteResult`
48
+
49
+ Extends RTL's `RenderResult` (`getByTestId`, `getByText`, `getByRole`, `container`, ...) with:
50
+
51
+ ```ts
52
+ type RenderRouteResult = RenderResult & {
53
+ router: {
54
+ navigate(url: string): Promise<void>; // client-only nav, re-resolves the same routes
55
+ pathname(): string;
56
+ params(): Record<string, string>;
57
+ store: NavigationStore; // advanced
58
+ eventController: EventController; // advanced
59
+ };
60
+ };
61
+ ```
62
+
63
+ ## Recipe
64
+
65
+ ```tsx
66
+ // @vitest-environment happy-dom
67
+ import { describe, it, expect, afterEach } from "vitest";
68
+ import { cleanup } from "@testing-library/react";
69
+ import { renderRoute } from "@rangojs/router/testing/dom";
70
+ import { Outlet, useParams, useReverse } from "@rangojs/router/client";
71
+
72
+ afterEach(cleanup);
73
+
74
+ function Layout() {
75
+ return (
76
+ <div>
77
+ <span data-testid="shell">shell</span>
78
+ <Outlet />
79
+ </div>
80
+ );
81
+ }
82
+ function Product() {
83
+ const { productId } = useParams<{ productId: string }>();
84
+ const reverse = useReverse({ product: "/products/:productId" });
85
+ return (
86
+ <a data-testid="link" href={reverse("product", { productId: "2" })}>
87
+ {productId}
88
+ </a>
89
+ );
90
+ }
91
+
92
+ it("resolves params + reverse + Outlet through the layout chain", async () => {
93
+ const { getByTestId, router } = await renderRoute(
94
+ [
95
+ { path: "/products", Component: Layout }, // layout (root)
96
+ { path: "/products/:productId", Component: Product }, // leaf (last)
97
+ ],
98
+ { request: "/products/1" },
99
+ );
100
+ expect(getByTestId("shell").textContent).toBe("shell");
101
+ expect(getByTestId("link").getAttribute("href")).toBe("/products/2");
102
+
103
+ await router.navigate("/products/2"); // client-only nav, re-resolves the same routes
104
+ expect(router.pathname()).toBe("/products/2");
105
+ });
106
+ ```
107
+
108
+ ## Caveats
109
+
110
+ - Client tree ONLY. Does NOT catch server/client boundary reference-identity remount bugs, real Flight serialization errors, loader execution, middleware, or handler ordering — those are `renderServerTree` / `renderHandler` / e2e territory. Loader data is SEEDED, never run.
111
+ - `router.navigate()` bypasses the navigation lifecycle, so the controller never leaves `idle`. `useNavigation()` / `useLinkStatus()` / `useAction()` non-idle states (loading/streaming/pending, action result/error) are NOT reachable — test those at e2e.
112
+ - CATCH — streaming `use(promise)` Suspense content (e.g. an async breadcrumb `content: Promise<ReactNode>`): a plain `Promise.resolve(node)` does NOT flush its Suspense retry in RTL/happy-dom, so the DOM stays on the fallback. Assert the PENDING fallback with `new Promise(() => {})`; for the ARRIVED state pass an already-settled promise so `use()` reads it synchronously: `const p = Promise.resolve(node) as any; p.status = "fulfilled"; p.value = node;`. The real pending->resolved transition is an e2e concern.
113
+ - ARIA gotcha — an explicit `role` on a `<Link>` (e.g. `<Link role="tab">` in a tablist) OVERRIDES the implicit `link` role, so `getByRole("link")` finds nothing. Query the explicit role (`getByRole("tab")`) or fall back to `getByText` / `getByTestId` and assert `getAttribute("href")`.
114
+ - `ctx.theme` is undefined unless `theme` is passed; the typed `ctx.search` defaults to `{}` (seed `searchData` on `runLoader`, not here).
115
+ - Use `mount` only for an `include()` prefix. An OPTIONAL param in the matched pattern (`/:locale?/c/:group` at `/en/c/wine`) auto-fills `locale` from the match — production parity, `useReverse` merges `useParams()` — so no `mount` is needed; a locale "dropping" from a reversed URL is usually a missing `mount` seed, not an auto-fill gap.
116
+ - Needs a DOM env (`// @vitest-environment happy-dom`, or jsdom) and `@testing-library/react` (optional peers).
117
+ - Don't hand-roll a `NavigationProvider`/router-context mock to test a client component — `renderRoute` mounts the REAL provider, so a hand-mock both duplicates effort and drifts from the production context shape.
118
+ - MULTI-APP `href` typing. When a `renderRoute` suite imports client components across apps, the global `Rango.GeneratedRouteMap` augmentations collide and `href()` stops typechecking (app A's route union rejects app B's name). Runtime is unaffected — it is purely the global `href` typing. Keep the suite single-app, or split tsconfig programs per app (see [`./reverse-and-types.md`](./reverse-and-types.md) and `/typesafety`).
119
+
120
+ ## See also
121
+
122
+ - `/hooks` — the DSL this tests
123
+ - Siblings: `./handles.md`, `./reverse-and-types.md`, `./render-handler.md`, `./e2e-parity.md`
124
+ - Long-form prose: [docs/testing.md](https://github.com/ivogt/vite-rsc/blob/main/packages/rangojs-router/docs/testing.md) — section "Reverse and components" (and the "Catch: streaming `use(promise)` Suspense content" subsection)
@@ -0,0 +1,125 @@
1
+ # E2E with dev/prod and PE parity — createRangoE2E
2
+
3
+ **Layer:** e2e (Playwright) · **Import:** `@rangojs/router/testing/e2e` · **DSL it tests:** navigation, hydration, server actions + revalidation, view transitions, PE parity (see `/hooks`, `/view-transitions`)
4
+
5
+ This is full-stack: the harness builds and serves your real app (`pnpm dev` or `pnpm build` + `pnpm preview`) and drives a real browser. Nothing is seeded — you SEED only the URL you navigate to and the form data you submit; everything else (SSR, hydration, the RSC stream, actions, revalidation) is the real machinery.
6
+
7
+ ## API
8
+
9
+ `createRangoE2E({ test, expect, defaultRoot })` takes your Playwright `test`/`expect` and returns `{ useFixture, parityDescribe, expectParity, rangoMatchers, testNoJs, ...pageHelpers }`. The factory never imports `@playwright/test` at runtime — the helpers run on the objects you pass, so this entry is loadable in a plain Playwright runner.
10
+
11
+ ### Factory options — `createRangoE2E({ ... })`
12
+
13
+ | Field | Type | Meaning |
14
+ | ------------- | ---------- | ------------------------------------------------------------------------ |
15
+ | `test` | `TestType` | Your Playwright `test` (drives `describe`/`beforeAll`/`afterAll`). |
16
+ | `expect` | `Expect` | Your Playwright `expect` (used by helpers + matchers). |
17
+ | `defaultRoot` | `string?` | Fallback app root for `parityDescribe` when a call omits `options.root`. |
18
+
19
+ ### Fixture options — `FixtureOptions` (`useFixture` / `parityDescribe` 3rd arg)
20
+
21
+ | Field | Type | Meaning |
22
+ | ---------------- | ------------------ | ------------------------------------------------------------------------------ |
23
+ | `root` | `string` | App path under test (abs or cwd-relative). Required here or via `defaultRoot`. |
24
+ | `mode` | `"dev" \| "build"` | Server mode. `parityDescribe` sets this for you (dev + build). |
25
+ | `command` | `string?` | Override server command (default `pnpm dev` / `pnpm preview`). |
26
+ | `buildCommand` | `string?` | Override build command (default `pnpm build`). |
27
+ | `cliOptions` | `SpawnOptions?` | Extra spawn options (`env`, etc.). |
28
+ | `isolatedServer` | `boolean?` | Per-suite server with an isolated Vite cache dir (warms dep optimizer; dev). |
29
+ | `readyPath` | `string?` | Readiness poll path (default `/`); use when a basename moves routes off `/`. |
30
+ | `skipBuild` | `boolean?` | Skip the production build (assumes an existing build). |
31
+
32
+ ### Parity intent — `ParityIntent` (what `expectParity` applies)
33
+
34
+ | Shape | Meaning |
35
+ | ------------------------------- | ----------------------------------------------------------------------------- |
36
+ | `{ navigate: string }` | Go to a URL (resolved against `opts.baseURL` if relative). |
37
+ | `{ submit: { testId, data? } }` | Fill `data` into named inputs under `[data-testid=testId]`, click its submit. |
38
+
39
+ ### expectParity options — `ExpectParityOptions`
40
+
41
+ | Field | Type | Meaning |
42
+ | --------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
43
+ | `observe` | `string[]` | data-testid values whose text must match across JS and no-JS. |
44
+ | `baseURL` | `string?` | Base URL for a relative `navigate` intent. |
45
+ | `waitFor` | `(page) => Promise<void>?` | Post-intent settle hook on BOTH transports; for `submit` it REPLACES the generic change/stability wait. |
46
+ | `ignoreCookies` | `ReadonlyArray<string \| RegExp>?` | Cookie names to exclude from the JS/no-JS jar comparison (exact string or RegExp). The rango state cookie (default prefix `rango-state`) is ALWAYS excluded — it is client-only; use this for a custom `stateCookiePrefix` or other volatile/JS-only cookies (analytics, CSRF). |
47
+
48
+ ### Returns
49
+
50
+ `createRangoE2E(...)` -> `RangoE2E`:
51
+
52
+ - `useFixture(options)` -> `Fixture` (`{ mode, root, url(url?), proc() }`). `url(path)` resolves against the running server.
53
+ - `parityDescribe(name, (f) => { ... }, options?)` -> registers a dev describe `name` AND a production describe `` `${name} (production)` ``. Body runs once per describe with that describe's `Fixture`.
54
+ - `expectParity(page, intent, opts) => Promise<void>` — runs `intent` over the JS page and a fresh no-JS context, asserts observed testids' text + pathname/search/hash + `document.cookie` are equal. `opts` is the required `observe` plus optional `baseURL`, `waitFor`, and `ignoreCookies` (the rango state cookie is excluded automatically).
55
+ - `rangoMatchers` — `{ toHaveRangoPathname }` only (pass to `expect.extend`).
56
+ - `testNoJs` — a `test` variant with JavaScript disabled.
57
+ - Page helpers: `waitForHydration`, `expectNoReload`, `expectNoPageError`, `testId`, `waitForNavigation`, `waitForElement`, `goBack`/`goForward`, `getHistoryState`, `waitForTextChange`/`waitForNumericChange`, timing helpers.
58
+
59
+ ## Recipe
60
+
61
+ ```ts
62
+ // helper.ts — wire the harness once around your Playwright test/expect.
63
+ import { test, expect } from "@playwright/test";
64
+ import { createRangoE2E } from "@rangojs/router/testing/e2e";
65
+
66
+ export const { parityDescribe, expectParity, rangoMatchers, useFixture } =
67
+ createRangoE2E({ test, expect, defaultRoot: "." });
68
+ export { test, expect };
69
+ ```
70
+
71
+ ```ts
72
+ // nav.test.ts — one body -> dev describe AND `(production)` describe.
73
+ import {
74
+ test,
75
+ expect,
76
+ parityDescribe,
77
+ expectParity,
78
+ rangoMatchers,
79
+ } from "./helper";
80
+ expect.extend(rangoMatchers);
81
+
82
+ parityDescribe("product navigation", (f) => {
83
+ test("client-navigates without a reload", async ({ page }) => {
84
+ await page.goto(f.url("/"));
85
+ await page.getByTestId("product-link").click();
86
+ await page.waitForURL("**/products/1");
87
+ await expect(page).toHaveRangoPathname("/products/1"); // typed via the shipped augmentation
88
+ });
89
+ });
90
+
91
+ parityDescribe("add to cart parity", (f) => {
92
+ test("JS and no-JS produce the same observable result", async ({ page }) => {
93
+ await page.goto(f.url("/products/1"));
94
+ await expectParity(
95
+ page,
96
+ { submit: { testId: "add-to-cart-form", data: { qty: "2" } } },
97
+ { observe: ["cart-count", "flash-message"] },
98
+ );
99
+ });
100
+ });
101
+ ```
102
+
103
+ This add-to-cart example only works because the cart is **session-scoped**. A `submit` intent runs against the one live server TWICE — once on the JS page, once in a fresh no-JS context — so `cart-count` lands on the same value on both transports only if each context has its own cart (two distinct sessions, each going 0 -> 2). If the cart were a single global counter shared across contexts, the no-JS pass would observe the JS pass's mutation too (2 then 4) and the snapshots would diverge. See the submit caveats below before reaching for a `submit` intent.
104
+
105
+ ## Caveats
106
+
107
+ - Every e2e covers BOTH dev and production — a dev-only e2e is not acceptable. `parityDescribe` enforces it structurally: one body registers the dev describe AND the `(production)` describe.
108
+ - Bucketing footgun: a `useFixture({ mode: "build" })` describe whose title omits `(production)` silently lands in the DEV bucket — prod coverage lost, no error. Never hand-title a build describe; the bucketing matches the literal `(production)`, so `(prod)`, `-build`, `-prod` do NOT count. Use `parityDescribe`.
109
+ - `expectParity` contract: PE parity only holds if the submit target is a real `<form>` (with JS off the browser does a native POST). Cookie observation is `document.cookie` — non-HttpOnly cookies only in v1; an HttpOnly (session/auth) divergence is NOT caught here.
110
+
111
+ ### `submit`-intent parity — two scar-tissue hazards
112
+
113
+ A `submit` intent does NOT replay against a snapshot of the server — it submits for real, twice, against the one running instance, and then compares two whole browser jars. Both of these have bitten before; read them before you write a `submit` parity test.
114
+
115
+ - **Double execution.** The JS path submits on the page you handed `expectParity`. The no-JS pass then reloads the SAME `originUrl` in a fresh, scripting-disabled context and submits AGAIN. So a non-idempotent action (anything that mutates server state) runs twice against one server, and the no-JS snapshot sees BOTH mutations — UNLESS the mutated state is per-session / per-context. The add-to-cart example above only passes because the cart is session-scoped: each context owns its own cart and independently goes 0 -> 2, so both snapshots read 2. A globally-shared counter would read 2 after the JS submit and 4 after the no-JS submit, and the equality assertion would fail with no obvious cause. Increment-shaped actions are the trap; make the observable state session-scoped, or assert the submit path outside `expectParity`.
116
+ - **Whole jar, not the delta.** The cookie assertion compares `document.cookie` of the JS context against `document.cookie` of the fresh no-JS context (`parity.ts`, the final `cookies` equality). The JS context carries every cookie it accumulated before the intent — consent banners, analytics, cookies set during earlier navigation in the same test. The no-JS context starts empty and only picks up what THIS submit sets. So a pre-existing, intent-unrelated cookie in the JS context false-mismatches: the helper is diffing two jars, not the per-submit cookie delta. Keep the JS context's pre-intent cookie state minimal (a fresh page goto, no prior cookie-setting steps), or assert the specific Set-Cookie in a dedicated test.
117
+ - `rangoMatchers` ships `toHaveRangoPathname` only. `toHaveSegments`/`toHaveParams` are a documented future addition — they need a client-emitted signal that does not exist yet; do not assume them.
118
+ - Subset run: add `--no-deps`. `--grep` does NOT filter dependency projects, so grepping one production test otherwise pulls in the whole dev suite. `--grep` is a regex: a pasted title containing `(production)` / `:locale?` / `[...]` mis-matches — grep a metacharacter-free fragment (or escape it). Example: `pnpm exec playwright test --project=production --no-deps --grep "add to cart parity"`.
119
+ - Import the harness from the `/e2e` entry — the unit barrel (`@rangojs/router/testing`) is not loadable in a plain Playwright runner (it pulls a build-only virtual). The helpers take your `test`/`expect`, so this entry never imports `@playwright/test` at runtime.
120
+
121
+ ## See also
122
+
123
+ - `/hooks`, `/view-transitions` — the DSL this tests
124
+ - Siblings: [`./cache-prerender.md`](./cache-prerender.md), [`./client-components.md`](./client-components.md)
125
+ - Long-form prose: [docs/testing.md](https://github.com/ivogt/vite-rsc/blob/main/packages/rangojs-router/docs/testing.md) — section "E2E with dev/prod and PE parity" (and "Running a subset locally")
@@ -0,0 +1,91 @@
1
+ # Pinning the Flight wire payload — renderToFlightString
2
+
3
+ **Layer:** RSC unit (react-server project) · **Import:** `@rangojs/router/testing/flight` + `@rangojs/router/testing/flight-matchers` · **DSL it tests:** an async Server Component / Flight output (see `/route`)
4
+
5
+ > **Prefer `renderServerTree` (see [`./server-tree.md`](./server-tree.md)) for assertions on a Flight render** — it deserializes to a traversable tree with TYPED boundary props (a `Date` is a `Date`, not the opaque `$D...` encoding). Reach for `renderToFlightString` + the wire matchers (`toMatchFlight`/`toMatchFlightSnapshot`) only to pin the raw wire payload SHAPE — a `toMatchFlightSnapshot` drift snapshot. That is the niche/escape-hatch case; for "testing an async Server Component (assert what it rendered)" start at `./server-tree.md`.
6
+
7
+ `renderToFlightString` runs the REAL react-server-dom serializer the router uses at runtime — your async Server Component genuinely renders to its Flight wire string in plain node, with a request context active for the render. What you SEED is the request, headers, env, params, routeName, and vars that context exposes.
8
+
9
+ ## API
10
+
11
+ ### Options — `RenderToFlightStringOptions`
12
+
13
+ | Field | Type | Meaning |
14
+ | ----------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15
+ | `request` | `Request \| string` | The request the render runs under: a `Request`, or a URL string (absolute or path). Defaults to `http://localhost/`. A component reading `getRequestContext()` sees this request's url/cookies. When a `Request` is passed, its headers are used and `headers` is ignored. |
16
+ | `headers` | `HeadersInit` | Request headers (e.g. Cookie) visible to the server tree, used only when `request` is a string. |
17
+ | `env` | `unknown` | Env / bindings exposed as `ctx.env`. Defaults to `{}`. |
18
+ | `params` | `Record<string, string>` | Route params exposed via `ctx.params` and loader contexts. |
19
+ | `routeName` | `string` | Matched route name (drives `ctx.routeName` and scoped reverse). |
20
+ | `routeMap` | `Record<string, string>` | Route name -> pattern map scoping `ctx.reverse()` (like `renderHandler`). Without it, a component that reverses resolves against the GLOBAL route map and is order-dependent on whatever router registered last. Pass the router-under-test's map for deterministic reverse. |
21
+ | `vars` | `VarsInit` | Variables a prior middleware would have set, visible via `ctx.get(...)`. Object form (`{ user }`) or `[key, value]` tuples (`[[userVar, u]]`). |
22
+
23
+ ### Context — `RequestContext` (what your component receives)
24
+
25
+ A request context is active for the whole render, so an async Server Component can read it via `getRequestContext()` / the router's server APIs. The notable surfaces seeded from the options above:
26
+
27
+ | Field | Type | Meaning |
28
+ | ----------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------- |
29
+ | `request` | `Request` | The backing request (from `request`/`headers`). |
30
+ | `url` | `URL` | The request URL. |
31
+ | `env` | `unknown` | Env / bindings (from `env`). |
32
+ | `params` | `Record<string, string>` | Route params (from `params`). |
33
+ | `routeName` | `string \| undefined` | Matched route name (from `routeName`). |
34
+ | `get` | `<T>(v: ContextVar<T>) => T \| undefined; <K extends string>(key: K): any` | Read a var seeded via `vars` (by `createVar()` handle or string key). |
35
+
36
+ ### Returns — `Promise<string>`
37
+
38
+ The Flight wire string for the rendered tree. Assert on it with the matchers (register via `expect.extend(flightMatchers)`):
39
+
40
+ ```ts
41
+ expect(await renderToFlightString(<C />)).toMatchFlight("substring"); // containment
42
+ expect(await renderToFlightString(<C />)).toMatchFlightSnapshot(); // normalized snapshot
43
+ ```
44
+
45
+ `toMatchFlight(substring)` is containment (not equality) on the normalized payload; `toMatchFlightSnapshot()` snapshots the normalized payload. Both matchers live at `@rangojs/router/testing/flight-matchers` and run ONLY under the react-server vitest project (see `./setup.md`).
46
+
47
+ ## Recipe
48
+
49
+ Name the file `*.rsc-test.{ts,tsx}` and run `pnpm test:unit:rsc`:
50
+
51
+ ```tsx
52
+ import { it, expect } from "vitest";
53
+ import { renderToFlightString } from "@rangojs/router/testing/flight";
54
+ import { flightMatchers } from "@rangojs/router/testing/flight-matchers";
55
+ expect.extend(flightMatchers);
56
+
57
+ // Pure leaf server components: data comes in as props, not getRequestContext.
58
+ async function Greeting({ name }: { name: string }) {
59
+ const who = await Promise.resolve(name);
60
+ return <h1>Hello {who}</h1>;
61
+ }
62
+
63
+ async function ItemView({ id }: { id: string }) {
64
+ const item = await Promise.resolve({ id, label: `Item ${id}` });
65
+ return <article>{item.label}</article>;
66
+ }
67
+
68
+ it("renders an async server component to Flight", async () => {
69
+ const flight = await renderToFlightString(<Greeting name="Ada" />);
70
+ expect(flight).toMatchFlight("Ada");
71
+ });
72
+
73
+ it("snapshots the normalized payload", async () => {
74
+ const flight = await renderToFlightString(<ItemView id="7" />);
75
+ expect(flight).toMatchFlightSnapshot();
76
+ });
77
+ ```
78
+
79
+ ## Caveats
80
+
81
+ - Leaf / server-only: a client island in the tree emits an un-hydratable `I[...]` import row against the empty client manifest. Keep Flight tests to leaf server components; test full pages at e2e.
82
+ - Requires the react-server vitest project (see `./setup.md`): `resolve.conditions` includes `react-server`, the `@rangojs/router -> index.rsc.ts` alias, `NODE_ENV=production`, and the worker `execArgv`. Name files `*.rsc-test.{ts,tsx}` and run `pnpm test:unit:rsc`. The main vitest project must NOT set `react-server` (it would flip React to the no-hooks server build).
83
+ - A component that imports a server API (`getRequestContext`, `cookies`) from the bare `@rangojs/router` barrel works ONLY with the `index.rsc.ts` alias wired (see `./setup.md`); without it the bare import resolves to the throwing out-of-react-server stub. `renderToFlightString` / `renderServerTree` self-diagnose this exact misconfiguration — they reject with an actionable message naming `rangoTestAliases`, rather than surfacing the opaque stub error. Pure-leaf components that take all data as props need no barrel import and are the simplest case.
84
+ - `toMatchFlight` is containment (substring), not equality — the row framing (prefixes/quoting) is an internal serializer detail, so pin the rendered text/shape, not the framing. `toMatchFlightSnapshot()` snapshots the normalized payload; run under `NODE_ENV=production` for the cleanest, most stable bytes.
85
+ - No hydration / no interaction here — that is the e2e tier. For typed assertions on a client boundary's props (a `Date` back as a `Date`), or to confirm an island actually crossed the boundary, use `renderServerTree` (see `./server-tree.md`).
86
+
87
+ ## See also
88
+
89
+ - `/route` — the DSL this tests
90
+ - Siblings: `./setup.md`, `./server-tree.md`, `./render-handler.md`
91
+ - Long-form prose: [docs/testing.md](https://github.com/ivogt/vite-rsc/blob/main/packages/rangojs-router/docs/testing.md) — section "renderToFlightString — real async Server Components"
@@ -0,0 +1,129 @@
1
+ # Testing a handle — collectHandle, plus the loader and client read paths
2
+
3
+ **Layer:** unit (node + DOM) · **Import:** `@rangojs/router/testing` (collectHandle), `@rangojs/router/testing/dom` (renderRoute) · **DSL it tests:** a handle e.g. Breadcrumbs/Meta (see `/handler-use`, `/breadcrumbs`)
4
+
5
+ A handle's `collect`/accumulator (the `createHandle(collect)` argument that maps per-segment pushed values into one accumulated result) is otherwise unreachable — `createHandle` keeps it in a private registry keyed by `$$id`. These three primitives test it from different angles: `collectHandle` runs the REAL registered collect on per-segment values you SEED; `runLoader` seeds the POST-collect accumulated value a loader reads after the barrier; `renderRoute` seeds the RAW pushed values for a client component reading `useHandle`. None of them run the real push -> accumulate -> barrier wiring (that stays e2e).
6
+
7
+ ## API
8
+
9
+ ### `collectHandle(handle, segments)` — `src/testing/collect-handle.ts`
10
+
11
+ | Param | Type | Meaning |
12
+ | ---------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13
+ | `handle` | `Handle<TData, TAccumulated>` | The handle whose registered collect to run. |
14
+ | `segments` | `ReadonlyArray<ReadonlyArray<TData>>` | Per-segment pushed values, one inner array per route segment, in **parent -> child** order. Empty inner arrays are filtered before the collect runs (matching production `collectHandleData` — a segment that pushed nothing is not passed through). |
15
+
16
+ **Returns** `TAccumulated` — exactly what the handle's collect produces (a default-flatten array, or a custom accumulator's value). If the handle's module was never imported (collect unregistered), it warns and falls back to `segments.flat()`.
17
+
18
+ ### runLoader option — `handles` — `src/testing/run-loader.ts`
19
+
20
+ | Field | Type | Meaning |
21
+ | ---------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22
+ | `handles` | `ReadonlyArray<readonly [Handle, unknown]>` | Seeds the value `ctx.use(SomeHandle)` returns — the POST-collect **ACCUMULATED** value (singular `unknown`), what a loader reads after `await ctx.rendered()`. Matched by handle reference. Pair with `rendered`. |
23
+ | `rendered` | `boolean \| (() => void \| Promise<void>)` | Mocks the `ctx.rendered()` barrier (throws by default). `true` resolves it immediately; a function controls timing/side effects. A `ctx.use(handle)` read before the barrier settles throws, exactly as in production. |
24
+
25
+ ### renderRoute option — `handles` — `src/testing/render-route.tsx`
26
+
27
+ | Field | Type | Meaning |
28
+ | --------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | `handles` | `ReadonlyArray<readonly [Handle, unknown[]]>` | Seeds the CLIENT read path for `useHandle(handle)` — the RAW **pushed values array** (`unknown[]`), the values a route's handlers would have pushed. Attached to the leaf route segment under the handle's `$$id`, so `useHandle` runs the handle's REAL collect on them. |
30
+
31
+ **Shape contrast:** `renderRoute` feeds the barrier INPUT (the pushes, `unknown[]`); `runLoader` feeds its OUTPUT (the single accumulated value, `unknown`).
32
+
33
+ **Across navigation:** seeded `handles` are applied once at the initial render and PERSIST across `router.navigate()` within the same test (like `loaderData`) — unlike a real navigation, which re-runs handlers. A layout/page reading `useHandle` still resolves the seeded values after `navigate()`.
34
+
35
+ ## Recipe
36
+
37
+ ```ts
38
+ // collectHandle.test.ts — the pure collect, no route match
39
+ import { describe, it, expect } from "vitest";
40
+ import { collectHandle } from "@rangojs/router/testing";
41
+ import { createHandle } from "@rangojs/router";
42
+
43
+ const Breadcrumbs = createHandle<{ label: string; href: string }>(); // default flatten
44
+
45
+ it("flattens per-segment crumbs in parent->child order", () => {
46
+ const home = { label: "Home", href: "/" };
47
+ const post = { label: "P", href: "/p" };
48
+ expect(collectHandle(Breadcrumbs, [[home], [post]])).toEqual([home, post]);
49
+ });
50
+
51
+ it("runs a custom 'last wins' collect", () => {
52
+ const PageTitle = createHandle<string, string>((s) => s.flat().at(-1) ?? "");
53
+ expect(collectHandle(PageTitle, [["Home"], ["Products"], ["Shoes"]])).toBe(
54
+ "Shoes",
55
+ );
56
+ });
57
+ ```
58
+
59
+ ```ts
60
+ // loader-reads-handle.test.ts — a loader reading accumulated handle data after the barrier
61
+ import { it, expect } from "vitest";
62
+ import { runLoader } from "@rangojs/router/testing";
63
+ import { RenderedProducts } from "../src/handles"; // a createHandle(...)
64
+
65
+ const livePricesBody = async (ctx) => {
66
+ await ctx.rendered(); // barrier: handle data is now readable
67
+ const ids = ctx.use(RenderedProducts) as string[];
68
+ return ids.map((id) => ({ id, price: 9.99 }));
69
+ };
70
+
71
+ it("reads the accumulated handle value (seed the OUTPUT, mock the barrier)", async () => {
72
+ const data = await runLoader(livePricesBody, {
73
+ rendered: true,
74
+ handles: [[RenderedProducts, ["widget-a", "widget-b"]]], // singular accumulated value
75
+ });
76
+ expect(data).toEqual([
77
+ { id: "widget-a", price: 9.99 },
78
+ { id: "widget-b", price: 9.99 },
79
+ ]);
80
+ });
81
+ ```
82
+
83
+ ```tsx
84
+ // breadcrumb-trail.test.tsx — a client component reading useHandle
85
+ // @vitest-environment happy-dom
86
+ import { it, expect, afterEach } from "vitest";
87
+ import { cleanup } from "@testing-library/react";
88
+ import { renderRoute } from "@rangojs/router/testing/dom";
89
+ import { useHandle } from "@rangojs/router/client";
90
+ import { Breadcrumbs } from "../src/handles";
91
+
92
+ afterEach(cleanup);
93
+
94
+ function BreadcrumbTrail() {
95
+ const crumbs = useHandle(Breadcrumbs); // accumulated client-side via the real collect
96
+ return <nav>{crumbs.map((c) => c.label).join(" / ")}</nav>;
97
+ }
98
+
99
+ it("renders the seeded trail (seed the INPUT pushes, the collect runs)", async () => {
100
+ const { getByText } = await renderRoute(
101
+ [{ path: "/p", Component: BreadcrumbTrail }],
102
+ {
103
+ handles: [
104
+ [
105
+ Breadcrumbs,
106
+ [
107
+ { label: "Home", href: "/" },
108
+ { label: "P", href: "/p" },
109
+ ],
110
+ ],
111
+ ], // raw pushes array
112
+ },
113
+ );
114
+ expect(getByText("Home / P")).toBeTruthy();
115
+ });
116
+ ```
117
+
118
+ ## Caveats
119
+
120
+ - `collectHandle` tests the pure collect/accumulator in ISOLATION (parent -> child segment order, empty arrays filtered to match production). It does NOT run the real push -> accumulate -> barrier wiring — that stays e2e.
121
+ - renderRoute `handles` seeds the CLIENT read path with the RAW pushed values array (`unknown[]`), attached to the leaf segment. Handle data accumulates GLOBALLY (not segment-scoped like loaders), so a LAYOUT reading the same handle sees the seeded values too, not just the leaf route.
122
+ - runLoader `handles` seeds the POST-collect ACCUMULATED value (singular `unknown`) a loader reads after `await ctx.rendered()`; pair with `{ rendered: true }`. Shape contrast: renderRoute feeds the barrier INPUT (pushes[]), runLoader feeds its OUTPUT (the accumulated value).
123
+ - The renderRoute path is the CLIENT tree only: it does NOT catch server/client boundary remount bugs, real Flight serialization errors, or loader execution.
124
+
125
+ ## See also
126
+
127
+ - `/handler-use`, `/breadcrumbs` — the DSL this tests
128
+ - Siblings: `./loader.md`, `./client-components.md`, `./render-handler.md`
129
+ - Long-form prose: [docs/testing.md](https://github.com/ivogt/vite-rsc/blob/main/packages/rangojs-router/docs/testing.md) — section "Testing a handle's collect/accumulator"