@rangojs/router 0.0.0-experimental.tapabs2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1320) hide show
  1. package/dist/bin/rango.js +8 -40
  2. package/dist/types/__internal.d.ts +127 -0
  3. package/dist/types/bin/rango.d.ts +1 -0
  4. package/dist/types/browser/action-coordinator.d.ts +57 -0
  5. package/dist/types/browser/action-fence.d.ts +33 -0
  6. package/dist/types/browser/app-shell.d.ts +34 -0
  7. package/dist/types/browser/app-version.d.ts +6 -0
  8. package/dist/types/browser/connection-warmup.d.ts +31 -0
  9. package/dist/types/browser/cookie-name.d.ts +66 -0
  10. package/dist/types/browser/event-controller.d.ts +221 -0
  11. package/dist/types/browser/history-state.d.ts +26 -0
  12. package/dist/types/browser/index.d.ts +1 -0
  13. package/dist/types/browser/intercept-utils.d.ts +30 -0
  14. package/dist/types/browser/invalidate-client-cache.d.ts +17 -0
  15. package/dist/types/browser/link-interceptor.d.ts +43 -0
  16. package/dist/types/browser/logging.d.ts +33 -0
  17. package/dist/types/browser/merge-segment-loaders.d.ts +38 -0
  18. package/dist/types/browser/navigation-bridge.d.ts +27 -0
  19. package/dist/types/browser/navigation-client.d.ts +17 -0
  20. package/dist/types/browser/navigation-store-handle.d.ts +25 -0
  21. package/dist/types/browser/navigation-store.d.ts +95 -0
  22. package/dist/types/browser/navigation-transaction.d.ts +75 -0
  23. package/dist/types/browser/network-error-handler.d.ts +35 -0
  24. package/dist/types/browser/partial-update.d.ts +61 -0
  25. package/dist/types/browser/prefetch/cache.d.ts +183 -0
  26. package/dist/types/browser/prefetch/fetch.d.ts +52 -0
  27. package/dist/types/browser/prefetch/observer.d.ts +27 -0
  28. package/dist/types/browser/prefetch/policy.d.ts +13 -0
  29. package/dist/types/browser/prefetch/queue.d.ts +48 -0
  30. package/dist/types/browser/prefetch/resource-ready.d.ts +28 -0
  31. package/dist/types/browser/rango-state.d.ts +52 -0
  32. package/dist/types/browser/react/Link.d.ts +140 -0
  33. package/dist/types/browser/react/NavigationProvider.d.ts +88 -0
  34. package/dist/types/browser/react/ScrollRestoration.d.ts +78 -0
  35. package/dist/types/browser/react/context.d.ts +54 -0
  36. package/dist/types/browser/react/filter-segment-order.d.ts +35 -0
  37. package/dist/types/browser/react/index.d.ts +1 -0
  38. package/dist/types/browser/react/location-state-shared.d.ts +162 -0
  39. package/dist/types/browser/react/location-state.d.ts +29 -0
  40. package/dist/types/browser/react/mount-context.d.ts +23 -0
  41. package/dist/types/browser/react/nonce-context.d.ts +14 -0
  42. package/dist/types/browser/react/shallow-equal.d.ts +5 -0
  43. package/dist/types/browser/react/use-action.d.ts +61 -0
  44. package/dist/types/browser/react/use-handle.d.ts +21 -0
  45. package/dist/types/browser/react/use-href.d.ts +32 -0
  46. package/dist/types/browser/react/use-link-status.d.ts +36 -0
  47. package/dist/types/browser/react/use-mount.d.ts +24 -0
  48. package/dist/types/browser/react/use-navigation.d.ts +15 -0
  49. package/dist/types/browser/react/use-params.d.ts +21 -0
  50. package/dist/types/browser/react/use-pathname.d.ts +13 -0
  51. package/dist/types/browser/react/use-reverse.d.ts +40 -0
  52. package/dist/types/browser/react/use-router.d.ts +23 -0
  53. package/dist/types/browser/react/use-search-params.d.ts +19 -0
  54. package/dist/types/browser/react/use-segments.d.ts +29 -0
  55. package/dist/types/browser/response-adapter.d.ts +58 -0
  56. package/dist/types/browser/rsc-router.d.ts +141 -0
  57. package/dist/types/browser/scroll-restoration.d.ts +103 -0
  58. package/dist/types/browser/segment-reconciler.d.ts +74 -0
  59. package/dist/types/browser/segment-structure-assert.d.ts +16 -0
  60. package/dist/types/browser/server-action-bridge.d.ts +29 -0
  61. package/dist/types/browser/types.d.ts +530 -0
  62. package/dist/types/browser/validate-redirect-origin.d.ts +28 -0
  63. package/dist/types/build/collect-fallback-refs.d.ts +5 -0
  64. package/dist/types/build/generate-manifest.d.ts +100 -0
  65. package/dist/types/build/generate-route-types.d.ts +8 -0
  66. package/dist/types/build/index.d.ts +21 -0
  67. package/dist/types/build/prefix-tree-utils.d.ts +56 -0
  68. package/dist/types/build/route-trie.d.ts +89 -0
  69. package/dist/types/build/route-types/ast-helpers.d.ts +3 -0
  70. package/dist/types/build/route-types/ast-route-extraction.d.ts +13 -0
  71. package/dist/types/build/route-types/codegen.d.ts +16 -0
  72. package/dist/types/build/route-types/include-resolution.d.ts +74 -0
  73. package/dist/types/build/route-types/param-extraction.d.ts +13 -0
  74. package/dist/types/build/route-types/per-module-writer.d.ts +18 -0
  75. package/dist/types/build/route-types/router-processing.d.ts +82 -0
  76. package/dist/types/build/route-types/scan-filter.d.ts +17 -0
  77. package/dist/types/build/route-types/source-scan.d.ts +13 -0
  78. package/dist/types/build/runtime-discovery.d.ts +24 -0
  79. package/dist/types/cache/background-task.d.ts +21 -0
  80. package/dist/types/cache/cache-error.d.ts +71 -0
  81. package/dist/types/cache/cache-key-utils.d.ts +35 -0
  82. package/dist/types/cache/cache-policy.d.ts +59 -0
  83. package/dist/types/cache/cache-runtime.d.ts +51 -0
  84. package/dist/types/cache/cache-scope.d.ts +134 -0
  85. package/dist/types/cache/cache-tag.d.ts +79 -0
  86. package/dist/types/cache/cf/cf-base64.d.ts +4 -0
  87. package/dist/types/cache/cf/cf-cache-constants.d.ts +105 -0
  88. package/dist/types/cache/cf/cf-cache-store.d.ts +588 -0
  89. package/dist/types/cache/cf/cf-cache-types.d.ts +363 -0
  90. package/dist/types/cache/cf/cf-kv-utils.d.ts +22 -0
  91. package/dist/types/cache/cf/cf-tag-marker-memo.d.ts +15 -0
  92. package/dist/types/cache/cf/cf-zone-purge.d.ts +31 -0
  93. package/dist/types/cache/cf/index.d.ts +4 -0
  94. package/dist/types/cache/document-cache.d.ts +69 -0
  95. package/dist/types/cache/handle-capture.d.ts +23 -0
  96. package/dist/types/cache/handle-snapshot.d.ts +39 -0
  97. package/dist/types/cache/index.d.ts +7 -0
  98. package/dist/types/cache/memory-segment-store.d.ts +163 -0
  99. package/dist/types/cache/profile-registry.d.ts +40 -0
  100. package/dist/types/cache/read-through-swr.d.ts +60 -0
  101. package/dist/types/cache/segment-codec.d.ts +78 -0
  102. package/dist/types/cache/shell-snapshot.d.ts +173 -0
  103. package/dist/types/cache/tag-invalidation.d.ts +74 -0
  104. package/dist/types/cache/taint.d.ts +71 -0
  105. package/dist/types/cache/types.d.ts +418 -0
  106. package/dist/types/cache/vercel/index.d.ts +1 -0
  107. package/dist/types/cache/vercel/vercel-cache-store.d.ts +267 -0
  108. package/dist/types/client.d.ts +184 -0
  109. package/dist/types/client.rsc.d.ts +39 -0
  110. package/dist/types/cloudflare/index.d.ts +7 -0
  111. package/dist/types/cloudflare/tracing.d.ts +53 -0
  112. package/dist/types/component-utils.d.ts +46 -0
  113. package/dist/types/components/DefaultDocument.d.ts +13 -0
  114. package/dist/types/context-var.d.ts +84 -0
  115. package/dist/types/debug.d.ts +57 -0
  116. package/dist/types/decode-loader-results.d.ts +5 -0
  117. package/dist/types/default-error-boundary.d.ts +10 -0
  118. package/dist/types/defer.d.ts +89 -0
  119. package/dist/types/deps/browser.d.ts +1 -0
  120. package/dist/types/deps/html-stream-client.d.ts +1 -0
  121. package/dist/types/deps/html-stream-server.d.ts +1 -0
  122. package/dist/types/deps/rsc.d.ts +1 -0
  123. package/dist/types/deps/ssr.d.ts +1 -0
  124. package/dist/types/encode-kv.d.ts +35 -0
  125. package/dist/types/errors.d.ts +226 -0
  126. package/dist/types/escape-script.d.ts +44 -0
  127. package/dist/types/handle.d.ts +93 -0
  128. package/dist/types/handles/MetaTags.d.ts +17 -0
  129. package/dist/types/handles/Scripts.d.ts +38 -0
  130. package/dist/types/handles/breadcrumbs.d.ts +43 -0
  131. package/dist/types/handles/deferred-resolution.d.ts +53 -0
  132. package/dist/types/handles/is-thenable.d.ts +12 -0
  133. package/dist/types/handles/meta.d.ts +43 -0
  134. package/dist/types/handles/script.d.ts +139 -0
  135. package/dist/types/host/cookie-handler.d.ts +8 -0
  136. package/dist/types/host/errors.d.ts +40 -0
  137. package/dist/types/host/index.d.ts +33 -0
  138. package/dist/types/host/pattern-matcher.d.ts +30 -0
  139. package/dist/types/host/router.d.ts +12 -0
  140. package/dist/types/host/testing.d.ts +41 -0
  141. package/dist/types/host/types.d.ts +148 -0
  142. package/dist/types/host/utils.d.ts +20 -0
  143. package/dist/types/href-client.d.ts +214 -0
  144. package/dist/types/index.d.ts +112 -0
  145. package/dist/types/index.rsc.d.ts +51 -0
  146. package/dist/types/internal-debug.d.ts +1 -0
  147. package/dist/types/loader-store.d.ts +193 -0
  148. package/dist/types/loader.d.ts +18 -0
  149. package/dist/types/loader.rsc.d.ts +18 -0
  150. package/dist/types/missing-id-error.d.ts +1 -0
  151. package/dist/types/outlet-context.d.ts +12 -0
  152. package/dist/types/outlet-provider.d.ts +12 -0
  153. package/dist/types/prerender/build-shell-capture.d.ts +104 -0
  154. package/dist/types/prerender/param-hash.d.ts +6 -0
  155. package/dist/types/prerender/shell-manifest-key.d.ts +18 -0
  156. package/dist/types/prerender/store.d.ts +62 -0
  157. package/dist/types/prerender.d.ts +292 -0
  158. package/dist/types/redirect-origin.d.ts +67 -0
  159. package/dist/types/regex-escape.d.ts +6 -0
  160. package/dist/types/render-error-thrower.d.ts +13 -0
  161. package/dist/types/response-utils.d.ts +35 -0
  162. package/dist/types/reverse.d.ts +206 -0
  163. package/dist/types/root-error-boundary.d.ts +32 -0
  164. package/dist/types/route-content-wrapper.d.ts +40 -0
  165. package/dist/types/route-definition/dsl-helpers.d.ts +130 -0
  166. package/dist/types/route-definition/helper-factories.d.ts +22 -0
  167. package/dist/types/route-definition/helpers-types.d.ts +392 -0
  168. package/dist/types/route-definition/index.d.ts +7 -0
  169. package/dist/types/route-definition/redirect.d.ts +48 -0
  170. package/dist/types/route-definition/resolve-handler-use.d.ts +19 -0
  171. package/dist/types/route-definition/use-item-types.d.ts +1 -0
  172. package/dist/types/route-definition.d.ts +1 -0
  173. package/dist/types/route-map-builder.d.ts +127 -0
  174. package/dist/types/route-name.d.ts +27 -0
  175. package/dist/types/route-types.d.ts +172 -0
  176. package/dist/types/router/basename.d.ts +10 -0
  177. package/dist/types/router/content-negotiation.d.ts +91 -0
  178. package/dist/types/router/debug-manifest.d.ts +7 -0
  179. package/dist/types/router/error-handling.d.ts +76 -0
  180. package/dist/types/router/find-match.d.ts +19 -0
  181. package/dist/types/router/handler-context.d.ts +41 -0
  182. package/dist/types/router/instrument.d.ts +161 -0
  183. package/dist/types/router/intercept-resolution.d.ts +79 -0
  184. package/dist/types/router/lazy-includes.d.ts +26 -0
  185. package/dist/types/router/loader-resolution.d.ts +63 -0
  186. package/dist/types/router/logging.d.ts +41 -0
  187. package/dist/types/router/manifest.d.ts +8 -0
  188. package/dist/types/router/match-api.d.ts +19 -0
  189. package/dist/types/router/match-context.d.ts +184 -0
  190. package/dist/types/router/match-handlers.d.ts +49 -0
  191. package/dist/types/router/match-middleware/background-revalidation.d.ts +113 -0
  192. package/dist/types/router/match-middleware/cache-lookup.d.ts +113 -0
  193. package/dist/types/router/match-middleware/cache-store.d.ts +112 -0
  194. package/dist/types/router/match-middleware/index.d.ts +80 -0
  195. package/dist/types/router/match-middleware/intercept-resolution.d.ts +116 -0
  196. package/dist/types/router/match-middleware/segment-resolution.d.ts +94 -0
  197. package/dist/types/router/match-pipelines.d.ts +103 -0
  198. package/dist/types/router/match-result.d.ts +114 -0
  199. package/dist/types/router/metrics.d.ts +6 -0
  200. package/dist/types/router/middleware-types.d.ts +74 -0
  201. package/dist/types/router/middleware.d.ts +116 -0
  202. package/dist/types/router/navigation-snapshot.d.ts +22 -0
  203. package/dist/types/router/params-util.d.ts +8 -0
  204. package/dist/types/router/parse-pattern.d.ts +38 -0
  205. package/dist/types/router/pattern-matching.d.ts +169 -0
  206. package/dist/types/router/prefetch-cache-ttl.d.ts +27 -0
  207. package/dist/types/router/prefetch-limits.d.ts +20 -0
  208. package/dist/types/router/prerender-match.d.ts +50 -0
  209. package/dist/types/router/preview-match.d.ts +22 -0
  210. package/dist/types/router/request-classification.d.ts +104 -0
  211. package/dist/types/router/revalidation.d.ts +57 -0
  212. package/dist/types/router/route-snapshot.d.ts +112 -0
  213. package/dist/types/router/router-context.d.ts +137 -0
  214. package/dist/types/router/router-interfaces.d.ts +432 -0
  215. package/dist/types/router/router-options.d.ts +738 -0
  216. package/dist/types/router/router-registry.d.ts +15 -0
  217. package/dist/types/router/segment-resolution/fresh.d.ts +55 -0
  218. package/dist/types/router/segment-resolution/helpers.d.ts +93 -0
  219. package/dist/types/router/segment-resolution/loader-cache.d.ts +33 -0
  220. package/dist/types/router/segment-resolution/loader-mask.d.ts +44 -0
  221. package/dist/types/router/segment-resolution/loader-snapshot.d.ts +90 -0
  222. package/dist/types/router/segment-resolution/mask-nested.d.ts +53 -0
  223. package/dist/types/router/segment-resolution/revalidation.d.ts +85 -0
  224. package/dist/types/router/segment-resolution/static-store.d.ts +17 -0
  225. package/dist/types/router/segment-resolution/streamed-handler-telemetry.d.ts +16 -0
  226. package/dist/types/router/segment-resolution/view-transition-default.d.ts +28 -0
  227. package/dist/types/router/segment-resolution.d.ts +3 -0
  228. package/dist/types/router/segment-wrappers.d.ts +53 -0
  229. package/dist/types/router/state-cookie-name.d.ts +1 -0
  230. package/dist/types/router/substitute-pattern-params.d.ts +23 -0
  231. package/dist/types/router/telemetry-otel.d.ts +113 -0
  232. package/dist/types/router/telemetry.d.ts +216 -0
  233. package/dist/types/router/timeout.d.ts +96 -0
  234. package/dist/types/router/tracing.d.ts +125 -0
  235. package/dist/types/router/trie-matching.d.ts +32 -0
  236. package/dist/types/router/types.d.ts +98 -0
  237. package/dist/types/router/url-params.d.ts +26 -0
  238. package/dist/types/router.d.ts +7 -0
  239. package/dist/types/rsc/capture-queue.d.ts +6 -0
  240. package/dist/types/rsc/full-payload.d.ts +22 -0
  241. package/dist/types/rsc/handler-context.d.ts +31 -0
  242. package/dist/types/rsc/handler.d.ts +9 -0
  243. package/dist/types/rsc/helpers.d.ts +124 -0
  244. package/dist/types/rsc/index.d.ts +17 -0
  245. package/dist/types/rsc/json-route-result.d.ts +20 -0
  246. package/dist/types/rsc/loader-fetch.d.ts +14 -0
  247. package/dist/types/rsc/manifest-init.d.ts +18 -0
  248. package/dist/types/rsc/nonce.d.ts +28 -0
  249. package/dist/types/rsc/origin-guard.d.ts +50 -0
  250. package/dist/types/rsc/progressive-enhancement.d.ts +19 -0
  251. package/dist/types/rsc/redirect-guard.d.ts +37 -0
  252. package/dist/types/rsc/render-pipeline.d.ts +138 -0
  253. package/dist/types/rsc/response-cache-serve.d.ts +46 -0
  254. package/dist/types/rsc/response-error.d.ts +19 -0
  255. package/dist/types/rsc/response-route-handler.d.ts +29 -0
  256. package/dist/types/rsc/rsc-rendering.d.ts +23 -0
  257. package/dist/types/rsc/runtime-warnings.d.ts +22 -0
  258. package/dist/types/rsc/server-action.d.ts +68 -0
  259. package/dist/types/rsc/shell-build-manifest.d.ts +84 -0
  260. package/dist/types/rsc/shell-capture-constants.d.ts +27 -0
  261. package/dist/types/rsc/shell-capture.d.ts +374 -0
  262. package/dist/types/rsc/shell-serve.d.ts +174 -0
  263. package/dist/types/rsc/ssr-setup.d.ts +73 -0
  264. package/dist/types/rsc/transition-gate.d.ts +27 -0
  265. package/dist/types/rsc/types.d.ts +290 -0
  266. package/dist/types/runtime-env.d.ts +1 -0
  267. package/dist/types/search-params.d.ts +125 -0
  268. package/dist/types/segment-content-promise.d.ts +13 -0
  269. package/dist/types/segment-fragments.d.ts +56 -0
  270. package/dist/types/segment-loader-promise.d.ts +22 -0
  271. package/dist/types/segment-system.d.ts +84 -0
  272. package/dist/types/serialize.d.ts +164 -0
  273. package/dist/types/server/context.d.ts +494 -0
  274. package/dist/types/server/cookie-parse.d.ts +10 -0
  275. package/dist/types/server/cookie-store.d.ts +107 -0
  276. package/dist/types/server/fetchable-loader-store.d.ts +20 -0
  277. package/dist/types/server/handle-store.d.ts +100 -0
  278. package/dist/types/server/loader-registry.d.ts +32 -0
  279. package/dist/types/server/request-context.d.ts +618 -0
  280. package/dist/types/server/root-layout.d.ts +3 -0
  281. package/dist/types/server.d.ts +15 -0
  282. package/dist/types/ssr/index.d.ts +233 -0
  283. package/dist/types/ssr/inject-rsc-eager.d.ts +3 -0
  284. package/dist/types/ssr/preinit-client-references.d.ts +71 -0
  285. package/dist/types/ssr/ssr-root.d.ts +69 -0
  286. package/dist/types/static-handler.d.ts +57 -0
  287. package/dist/types/testing/cache-status.d.ts +63 -0
  288. package/dist/types/testing/collect-handle.d.ts +20 -0
  289. package/dist/types/testing/dispatch.d.ts +127 -0
  290. package/dist/types/testing/dom.entry.d.ts +15 -0
  291. package/dist/types/testing/e2e/fixture.d.ts +37 -0
  292. package/dist/types/testing/e2e/index.d.ts +31 -0
  293. package/dist/types/testing/e2e/matchers.d.ts +17 -0
  294. package/dist/types/testing/e2e/page-helpers.d.ts +62 -0
  295. package/dist/types/testing/e2e/parity.d.ts +111 -0
  296. package/dist/types/testing/e2e/server.d.ts +35 -0
  297. package/dist/types/testing/flight-matchers.d.ts +55 -0
  298. package/dist/types/testing/flight-normalize.d.ts +1 -0
  299. package/dist/types/testing/flight-tree.d.ts +192 -0
  300. package/dist/types/testing/flight.d.ts +115 -0
  301. package/dist/types/testing/flight.entry.d.ts +27 -0
  302. package/dist/types/testing/generated-routes.d.ts +66 -0
  303. package/dist/types/testing/index.d.ts +54 -0
  304. package/dist/types/testing/internal/context.d.ts +225 -0
  305. package/dist/types/testing/internal/flight-client-globals.d.ts +1 -0
  306. package/dist/types/testing/internal/seed-vars.d.ts +30 -0
  307. package/dist/types/testing/render-handler.d.ts +160 -0
  308. package/dist/types/testing/render-route.d.ts +246 -0
  309. package/dist/types/testing/run-loader.d.ts +186 -0
  310. package/dist/types/testing/run-middleware.d.ts +132 -0
  311. package/dist/types/testing/run-transition-when.d.ts +77 -0
  312. package/dist/types/testing/shell-status.d.ts +58 -0
  313. package/dist/types/testing/vitest-stubs/cloudflare-email.d.ts +6 -0
  314. package/dist/types/testing/vitest-stubs/cloudflare-workers.d.ts +13 -0
  315. package/dist/types/testing/vitest-stubs/plugin-rsc.d.ts +7 -0
  316. package/dist/types/testing/vitest-stubs/version.d.ts +1 -0
  317. package/dist/types/testing/vitest.d.ts +205 -0
  318. package/dist/types/theme/ThemeProvider.d.ts +13 -0
  319. package/dist/types/theme/ThemeScript.d.ts +45 -0
  320. package/dist/types/theme/constants.d.ts +39 -0
  321. package/dist/types/theme/index.d.ts +29 -0
  322. package/dist/types/theme/theme-context.d.ts +21 -0
  323. package/dist/types/theme/theme-script.d.ts +26 -0
  324. package/dist/types/theme/types.d.ts +162 -0
  325. package/dist/types/theme/use-theme.d.ts +8 -0
  326. package/dist/types/types/boundaries.d.ts +93 -0
  327. package/dist/types/types/cache-types.d.ts +191 -0
  328. package/dist/types/types/error-types.d.ts +114 -0
  329. package/dist/types/types/global-namespace.d.ts +90 -0
  330. package/dist/types/types/handler-context.d.ts +658 -0
  331. package/dist/types/types/index.d.ts +11 -0
  332. package/dist/types/types/loader-types.d.ts +182 -0
  333. package/dist/types/types/request-scope.d.ts +93 -0
  334. package/dist/types/types/route-config.d.ts +105 -0
  335. package/dist/types/types/route-entry.d.ts +95 -0
  336. package/dist/types/types/segments.d.ts +234 -0
  337. package/dist/types/types.d.ts +1 -0
  338. package/dist/types/urls/include-helper.d.ts +17 -0
  339. package/dist/types/urls/include-provider.d.ts +27 -0
  340. package/dist/types/urls/index.d.ts +6 -0
  341. package/dist/types/urls/path-helper-types.d.ts +197 -0
  342. package/dist/types/urls/path-helper.d.ts +12 -0
  343. package/dist/types/urls/pattern-types.d.ts +166 -0
  344. package/dist/types/urls/response-types.d.ts +67 -0
  345. package/dist/types/urls/type-extraction.d.ts +157 -0
  346. package/dist/types/urls/urls-function.d.ts +24 -0
  347. package/dist/types/urls.d.ts +1 -0
  348. package/dist/types/use-loader.d.ts +150 -0
  349. package/dist/types/vercel/index.d.ts +10 -0
  350. package/dist/types/vercel/tracing.d.ts +70 -0
  351. package/dist/types/vite/debug.d.ts +80 -0
  352. package/dist/types/vite/discovery/bundle-postprocess.d.ts +12 -0
  353. package/dist/types/vite/discovery/dev-prerender-cache.d.ts +65 -0
  354. package/dist/types/vite/discovery/discover-routers.d.ts +17 -0
  355. package/dist/types/vite/discovery/discovery-errors.d.ts +113 -0
  356. package/dist/types/vite/discovery/gate-state.d.ts +79 -0
  357. package/dist/types/vite/discovery/prerender-collection.d.ts +24 -0
  358. package/dist/types/vite/discovery/route-types-writer.d.ts +32 -0
  359. package/dist/types/vite/discovery/self-gen-tracking.d.ts +22 -0
  360. package/dist/types/vite/discovery/shell-prerender-phase.d.ts +40 -0
  361. package/dist/types/vite/discovery/state.d.ts +162 -0
  362. package/dist/types/vite/discovery/virtual-module-codegen.d.ts +15 -0
  363. package/dist/types/vite/index.d.ts +11 -0
  364. package/dist/types/vite/inject-client-debug.d.ts +56 -0
  365. package/dist/types/vite/plugin-types.d.ts +298 -0
  366. package/dist/types/vite/plugins/cjs-to-esm.d.ts +6 -0
  367. package/dist/types/vite/plugins/client-ref-dedup.d.ts +40 -0
  368. package/dist/types/vite/plugins/client-ref-hashing.d.ts +35 -0
  369. package/dist/types/vite/plugins/cloudflare-protocol-stub.d.ts +64 -0
  370. package/dist/types/vite/plugins/expose-action-id.d.ts +18 -0
  371. package/dist/types/vite/plugins/expose-id-utils.d.ts +37 -0
  372. package/dist/types/vite/plugins/expose-ids/export-analysis.d.ts +19 -0
  373. package/dist/types/vite/plugins/expose-ids/handler-transform.d.ts +10 -0
  374. package/dist/types/vite/plugins/expose-ids/loader-transform.d.ts +8 -0
  375. package/dist/types/vite/plugins/expose-ids/router-transform.d.ts +13 -0
  376. package/dist/types/vite/plugins/expose-ids/types.d.ts +29 -0
  377. package/dist/types/vite/plugins/expose-internal-ids.d.ts +6 -0
  378. package/dist/types/vite/plugins/performance-tracks.d.ts +25 -0
  379. package/dist/types/vite/plugins/refresh-cmd.d.ts +20 -0
  380. package/dist/types/vite/plugins/use-cache-transform.d.ts +20 -0
  381. package/dist/types/vite/plugins/vercel-output.d.ts +85 -0
  382. package/dist/types/vite/plugins/version-injector.d.ts +21 -0
  383. package/dist/types/vite/plugins/version-plugin.d.ts +19 -0
  384. package/dist/types/vite/plugins/virtual-entries.d.ts +36 -0
  385. package/dist/types/vite/plugins/virtual-stub-plugin.d.ts +7 -0
  386. package/dist/types/vite/rango.d.ts +29 -0
  387. package/dist/types/vite/router-discovery.d.ts +23 -0
  388. package/dist/types/vite/utils/ast-handler-extract.d.ts +64 -0
  389. package/dist/types/vite/utils/banner.d.ts +2 -0
  390. package/dist/types/vite/utils/bundle-analysis.d.ts +28 -0
  391. package/dist/types/vite/utils/client-chunks.d.ts +55 -0
  392. package/dist/types/vite/utils/directive-prologue.d.ts +16 -0
  393. package/dist/types/vite/utils/forward-user-plugins.d.ts +37 -0
  394. package/dist/types/vite/utils/manifest-utils.d.ts +7 -0
  395. package/dist/types/vite/utils/package-resolution.d.ts +6 -0
  396. package/dist/types/vite/utils/prerender-utils.d.ts +32 -0
  397. package/dist/types/vite/utils/shared-utils.d.ts +55 -0
  398. package/dist/vite/index.js +1051 -361
  399. package/package.json +39 -33
  400. package/skills/catalog.json +6 -0
  401. package/skills/cloudflare/SKILL.md +149 -0
  402. package/skills/cloudflare/agents/openai.yaml +4 -0
  403. package/skills/cloudflare/references/d1-and-local-dev.md +131 -0
  404. package/skills/cloudflare/references/streaming-and-deploy.md +107 -0
  405. package/skills/cloudflare/references/webhooks-and-crypto.md +147 -0
  406. package/skills/composability/SKILL.md +14 -0
  407. package/skills/debug-manifest/SKILL.md +2 -10
  408. package/skills/links/SKILL.md +12 -0
  409. package/skills/middleware/SKILL.md +33 -0
  410. package/skills/migrate-nextjs/SKILL.md +65 -16
  411. package/skills/migrate-nextjs/backend-host-swap.md +120 -0
  412. package/skills/migrate-react-router/SKILL.md +6 -6
  413. package/skills/mime-routes/SKILL.md +25 -17
  414. package/skills/ppr/SKILL.md +100 -15
  415. package/skills/prerender/SKILL.md +44 -1
  416. package/skills/rango/SKILL.md +10 -10
  417. package/skills/response-routes/SKILL.md +41 -4
  418. package/skills/route/SKILL.md +6 -0
  419. package/skills/testing/SKILL.md +1 -0
  420. package/skills/testing/cache-prerender.md +43 -2
  421. package/skills/testing/response-routes.md +2 -2
  422. package/src/browser/event-controller.ts +16 -2
  423. package/src/browser/rsc-router.tsx +11 -0
  424. package/src/build/generate-manifest.ts +5 -36
  425. package/src/build/route-trie.ts +5 -50
  426. package/src/cache/cache-key-utils.ts +0 -1
  427. package/src/cache/cache-scope.ts +41 -3
  428. package/src/cache/cf/cf-cache-store.ts +465 -56
  429. package/src/cache/cf/cf-cache-types.ts +66 -0
  430. package/src/cache/cf/cf-tag-marker-memo.ts +5 -2
  431. package/src/cache/cf/cf-zone-purge.ts +101 -0
  432. package/src/cache/cf/index.ts +5 -0
  433. package/src/cache/handle-snapshot.ts +22 -1
  434. package/src/cache/index.ts +2 -0
  435. package/src/cache/memory-segment-store.ts +32 -0
  436. package/src/cache/segment-codec.ts +47 -0
  437. package/src/cache/shell-snapshot.ts +79 -14
  438. package/src/cache/types.ts +38 -0
  439. package/src/cache/vercel/vercel-cache-store.ts +71 -2
  440. package/src/deps/ssr.ts +4 -1
  441. package/src/index.rsc.ts +7 -0
  442. package/src/index.ts +1 -0
  443. package/src/prerender/build-shell-capture.ts +447 -0
  444. package/src/prerender/shell-manifest-key.ts +20 -0
  445. package/src/prerender/store.ts +10 -1
  446. package/src/prerender.ts +3 -3
  447. package/src/redirect-origin.ts +37 -8
  448. package/src/route-map-builder.ts +8 -8
  449. package/src/router/content-negotiation.ts +47 -5
  450. package/src/router/handler-context.ts +18 -10
  451. package/src/router/intercept-resolution.ts +30 -1
  452. package/src/router/loader-resolution.ts +16 -0
  453. package/src/router/match-api.ts +9 -2
  454. package/src/router/match-handlers.ts +13 -0
  455. package/src/router/match-middleware/cache-lookup.ts +12 -1
  456. package/src/router/metrics.ts +17 -2
  457. package/src/router/middleware-types.ts +17 -0
  458. package/src/router/middleware.ts +4 -0
  459. package/src/router/prerender-match.ts +28 -0
  460. package/src/router/router-interfaces.ts +7 -6
  461. package/src/router/router-options.ts +13 -8
  462. package/src/router/segment-resolution/fresh.ts +21 -2
  463. package/src/router/segment-resolution/helpers.ts +1 -1
  464. package/src/router/segment-resolution/loader-cache.ts +38 -7
  465. package/src/router/segment-resolution/mask-nested.ts +19 -3
  466. package/src/router/segment-resolution/revalidation.ts +9 -0
  467. package/src/router/telemetry-otel.ts +11 -0
  468. package/src/router/telemetry.ts +1 -0
  469. package/src/router/timeout.ts +41 -1
  470. package/src/router.ts +5 -4
  471. package/src/rsc/capture-queue.ts +67 -0
  472. package/src/rsc/handler.ts +151 -77
  473. package/src/rsc/helpers.ts +67 -4
  474. package/src/rsc/progressive-enhancement.ts +66 -54
  475. package/src/rsc/redirect-guard.ts +3 -1
  476. package/src/rsc/render-pipeline.ts +559 -0
  477. package/src/rsc/response-cache-serve.ts +39 -18
  478. package/src/rsc/response-route-handler.ts +9 -45
  479. package/src/rsc/rsc-rendering.ts +303 -103
  480. package/src/rsc/server-action.ts +50 -42
  481. package/src/rsc/shell-build-manifest.ts +316 -0
  482. package/src/rsc/shell-capture-constants.ts +27 -0
  483. package/src/rsc/shell-capture.ts +595 -69
  484. package/src/rsc/shell-serve.ts +133 -3
  485. package/src/rsc/ssr-setup.ts +102 -23
  486. package/src/segment-fragments.ts +124 -0
  487. package/src/server/context.ts +184 -8
  488. package/src/server/request-context.ts +297 -45
  489. package/src/ssr/index.tsx +167 -32
  490. package/src/ssr/preinit-client-references.ts +106 -0
  491. package/src/ssr/ssr-root.tsx +35 -2
  492. package/src/testing/dispatch.ts +132 -67
  493. package/src/testing/e2e/index.ts +8 -0
  494. package/src/testing/index.ts +9 -1
  495. package/src/testing/internal/context.ts +9 -0
  496. package/src/testing/render-handler.ts +15 -1
  497. package/src/testing/run-middleware.ts +14 -0
  498. package/src/testing/shell-status.ts +100 -0
  499. package/src/types/handler-context.ts +13 -2
  500. package/src/urls/path-helper-types.ts +1 -1
  501. package/src/urls/pattern-types.ts +29 -0
  502. package/src/vite/discovery/discover-routers.ts +71 -52
  503. package/src/vite/discovery/prerender-collection.ts +16 -0
  504. package/src/vite/discovery/shell-prerender-phase.ts +397 -0
  505. package/src/vite/discovery/state.ts +44 -0
  506. package/src/vite/discovery/virtual-module-codegen.ts +126 -20
  507. package/src/vite/index.ts +1 -0
  508. package/src/vite/plugin-types.ts +33 -0
  509. package/src/vite/plugins/version-plugin.ts +8 -0
  510. package/src/vite/plugins/virtual-entries.ts +37 -4
  511. package/src/vite/rango.ts +42 -2
  512. package/src/vite/router-discovery.ts +432 -21
  513. package/src/vite/utils/package-resolution.ts +1 -0
  514. package/src/vite/utils/prerender-utils.ts +25 -6
  515. package/src/vite/utils/shared-utils.ts +4 -2
  516. package/dist/__internal.d.ts +0 -83
  517. package/dist/__internal.d.ts.map +0 -1
  518. package/dist/__internal.js +0 -19
  519. package/dist/__internal.js.map +0 -1
  520. package/dist/__mocks__/version.d.ts +0 -7
  521. package/dist/__mocks__/version.d.ts.map +0 -1
  522. package/dist/__mocks__/version.js +0 -7
  523. package/dist/__mocks__/version.js.map +0 -1
  524. package/dist/__tests__/client-href.test.d.ts +0 -2
  525. package/dist/__tests__/client-href.test.d.ts.map +0 -1
  526. package/dist/__tests__/client-href.test.js +0 -74
  527. package/dist/__tests__/client-href.test.js.map +0 -1
  528. package/dist/__tests__/component-utils.test.d.ts +0 -2
  529. package/dist/__tests__/component-utils.test.d.ts.map +0 -1
  530. package/dist/__tests__/component-utils.test.js +0 -51
  531. package/dist/__tests__/component-utils.test.js.map +0 -1
  532. package/dist/__tests__/event-controller.test.d.ts +0 -2
  533. package/dist/__tests__/event-controller.test.d.ts.map +0 -1
  534. package/dist/__tests__/event-controller.test.js +0 -538
  535. package/dist/__tests__/event-controller.test.js.map +0 -1
  536. package/dist/__tests__/helpers/route-tree.d.ts +0 -118
  537. package/dist/__tests__/helpers/route-tree.d.ts.map +0 -1
  538. package/dist/__tests__/helpers/route-tree.js +0 -374
  539. package/dist/__tests__/helpers/route-tree.js.map +0 -1
  540. package/dist/__tests__/match-result.test.d.ts +0 -2
  541. package/dist/__tests__/match-result.test.d.ts.map +0 -1
  542. package/dist/__tests__/match-result.test.js +0 -154
  543. package/dist/__tests__/match-result.test.js.map +0 -1
  544. package/dist/__tests__/navigation-store.test.d.ts +0 -2
  545. package/dist/__tests__/navigation-store.test.d.ts.map +0 -1
  546. package/dist/__tests__/navigation-store.test.js +0 -440
  547. package/dist/__tests__/navigation-store.test.js.map +0 -1
  548. package/dist/__tests__/partial-update.test.d.ts +0 -2
  549. package/dist/__tests__/partial-update.test.d.ts.map +0 -1
  550. package/dist/__tests__/partial-update.test.js +0 -1009
  551. package/dist/__tests__/partial-update.test.js.map +0 -1
  552. package/dist/__tests__/reverse-types.test.d.ts +0 -8
  553. package/dist/__tests__/reverse-types.test.d.ts.map +0 -1
  554. package/dist/__tests__/reverse-types.test.js +0 -656
  555. package/dist/__tests__/reverse-types.test.js.map +0 -1
  556. package/dist/__tests__/route-definition.test.d.ts +0 -2
  557. package/dist/__tests__/route-definition.test.d.ts.map +0 -1
  558. package/dist/__tests__/route-definition.test.js +0 -55
  559. package/dist/__tests__/route-definition.test.js.map +0 -1
  560. package/dist/__tests__/router-helpers.test.d.ts +0 -2
  561. package/dist/__tests__/router-helpers.test.d.ts.map +0 -1
  562. package/dist/__tests__/router-helpers.test.js +0 -377
  563. package/dist/__tests__/router-helpers.test.js.map +0 -1
  564. package/dist/__tests__/router-integration-2.test.d.ts +0 -2
  565. package/dist/__tests__/router-integration-2.test.d.ts.map +0 -1
  566. package/dist/__tests__/router-integration-2.test.js +0 -426
  567. package/dist/__tests__/router-integration-2.test.js.map +0 -1
  568. package/dist/__tests__/router-integration.test.d.ts +0 -2
  569. package/dist/__tests__/router-integration.test.d.ts.map +0 -1
  570. package/dist/__tests__/router-integration.test.js +0 -1051
  571. package/dist/__tests__/router-integration.test.js.map +0 -1
  572. package/dist/__tests__/search-params.test.d.ts +0 -5
  573. package/dist/__tests__/search-params.test.d.ts.map +0 -1
  574. package/dist/__tests__/search-params.test.js +0 -306
  575. package/dist/__tests__/search-params.test.js.map +0 -1
  576. package/dist/__tests__/segment-system.test.d.ts +0 -2
  577. package/dist/__tests__/segment-system.test.d.ts.map +0 -1
  578. package/dist/__tests__/segment-system.test.js +0 -627
  579. package/dist/__tests__/segment-system.test.js.map +0 -1
  580. package/dist/__tests__/static-handler-types.test.d.ts +0 -8
  581. package/dist/__tests__/static-handler-types.test.d.ts.map +0 -1
  582. package/dist/__tests__/static-handler-types.test.js +0 -63
  583. package/dist/__tests__/static-handler-types.test.js.map +0 -1
  584. package/dist/__tests__/urls.test.d.ts +0 -2
  585. package/dist/__tests__/urls.test.d.ts.map +0 -1
  586. package/dist/__tests__/urls.test.js +0 -421
  587. package/dist/__tests__/urls.test.js.map +0 -1
  588. package/dist/__tests__/use-mount.test.d.ts +0 -2
  589. package/dist/__tests__/use-mount.test.d.ts.map +0 -1
  590. package/dist/__tests__/use-mount.test.js +0 -35
  591. package/dist/__tests__/use-mount.test.js.map +0 -1
  592. package/dist/bin/rango.d.ts +0 -2
  593. package/dist/bin/rango.d.ts.map +0 -1
  594. package/dist/bin/rango.js.map +0 -1
  595. package/dist/browser/event-controller.d.ts +0 -191
  596. package/dist/browser/event-controller.d.ts.map +0 -1
  597. package/dist/browser/event-controller.js +0 -559
  598. package/dist/browser/event-controller.js.map +0 -1
  599. package/dist/browser/index.d.ts +0 -2
  600. package/dist/browser/index.d.ts.map +0 -1
  601. package/dist/browser/index.js +0 -14
  602. package/dist/browser/index.js.map +0 -1
  603. package/dist/browser/link-interceptor.d.ts +0 -38
  604. package/dist/browser/link-interceptor.d.ts.map +0 -1
  605. package/dist/browser/link-interceptor.js +0 -99
  606. package/dist/browser/link-interceptor.js.map +0 -1
  607. package/dist/browser/logging.d.ts +0 -10
  608. package/dist/browser/logging.d.ts.map +0 -1
  609. package/dist/browser/logging.js +0 -29
  610. package/dist/browser/logging.js.map +0 -1
  611. package/dist/browser/lru-cache.d.ts +0 -17
  612. package/dist/browser/lru-cache.d.ts.map +0 -1
  613. package/dist/browser/lru-cache.js +0 -50
  614. package/dist/browser/lru-cache.js.map +0 -1
  615. package/dist/browser/merge-segment-loaders.d.ts +0 -39
  616. package/dist/browser/merge-segment-loaders.d.ts.map +0 -1
  617. package/dist/browser/merge-segment-loaders.js +0 -102
  618. package/dist/browser/merge-segment-loaders.js.map +0 -1
  619. package/dist/browser/navigation-bridge.d.ts +0 -102
  620. package/dist/browser/navigation-bridge.d.ts.map +0 -1
  621. package/dist/browser/navigation-bridge.js +0 -708
  622. package/dist/browser/navigation-bridge.js.map +0 -1
  623. package/dist/browser/navigation-client.d.ts +0 -25
  624. package/dist/browser/navigation-client.d.ts.map +0 -1
  625. package/dist/browser/navigation-client.js +0 -157
  626. package/dist/browser/navigation-client.js.map +0 -1
  627. package/dist/browser/navigation-store.d.ts +0 -101
  628. package/dist/browser/navigation-store.d.ts.map +0 -1
  629. package/dist/browser/navigation-store.js +0 -625
  630. package/dist/browser/navigation-store.js.map +0 -1
  631. package/dist/browser/partial-update.d.ts +0 -75
  632. package/dist/browser/partial-update.d.ts.map +0 -1
  633. package/dist/browser/partial-update.js +0 -426
  634. package/dist/browser/partial-update.js.map +0 -1
  635. package/dist/browser/react/Link.d.ts +0 -86
  636. package/dist/browser/react/Link.d.ts.map +0 -1
  637. package/dist/browser/react/Link.js +0 -128
  638. package/dist/browser/react/Link.js.map +0 -1
  639. package/dist/browser/react/NavigationProvider.d.ts +0 -63
  640. package/dist/browser/react/NavigationProvider.d.ts.map +0 -1
  641. package/dist/browser/react/NavigationProvider.js +0 -216
  642. package/dist/browser/react/NavigationProvider.js.map +0 -1
  643. package/dist/browser/react/ScrollRestoration.d.ts +0 -75
  644. package/dist/browser/react/ScrollRestoration.d.ts.map +0 -1
  645. package/dist/browser/react/ScrollRestoration.js +0 -57
  646. package/dist/browser/react/ScrollRestoration.js.map +0 -1
  647. package/dist/browser/react/context.d.ts +0 -46
  648. package/dist/browser/react/context.d.ts.map +0 -1
  649. package/dist/browser/react/context.js +0 -10
  650. package/dist/browser/react/context.js.map +0 -1
  651. package/dist/browser/react/index.d.ts +0 -11
  652. package/dist/browser/react/index.d.ts.map +0 -1
  653. package/dist/browser/react/index.js +0 -22
  654. package/dist/browser/react/index.js.map +0 -1
  655. package/dist/browser/react/location-state-shared.d.ts +0 -63
  656. package/dist/browser/react/location-state-shared.d.ts.map +0 -1
  657. package/dist/browser/react/location-state-shared.js +0 -81
  658. package/dist/browser/react/location-state-shared.js.map +0 -1
  659. package/dist/browser/react/location-state.d.ts +0 -23
  660. package/dist/browser/react/location-state.d.ts.map +0 -1
  661. package/dist/browser/react/location-state.js +0 -29
  662. package/dist/browser/react/location-state.js.map +0 -1
  663. package/dist/browser/react/mount-context.d.ts +0 -24
  664. package/dist/browser/react/mount-context.d.ts.map +0 -1
  665. package/dist/browser/react/mount-context.js +0 -24
  666. package/dist/browser/react/mount-context.js.map +0 -1
  667. package/dist/browser/react/use-action.d.ts +0 -64
  668. package/dist/browser/react/use-action.d.ts.map +0 -1
  669. package/dist/browser/react/use-action.js +0 -134
  670. package/dist/browser/react/use-action.js.map +0 -1
  671. package/dist/browser/react/use-client-cache.d.ts +0 -41
  672. package/dist/browser/react/use-client-cache.d.ts.map +0 -1
  673. package/dist/browser/react/use-client-cache.js +0 -39
  674. package/dist/browser/react/use-client-cache.js.map +0 -1
  675. package/dist/browser/react/use-handle.d.ts +0 -31
  676. package/dist/browser/react/use-handle.d.ts.map +0 -1
  677. package/dist/browser/react/use-handle.js +0 -144
  678. package/dist/browser/react/use-handle.js.map +0 -1
  679. package/dist/browser/react/use-href.d.ts +0 -33
  680. package/dist/browser/react/use-href.d.ts.map +0 -1
  681. package/dist/browser/react/use-href.js +0 -39
  682. package/dist/browser/react/use-href.js.map +0 -1
  683. package/dist/browser/react/use-link-status.d.ts +0 -37
  684. package/dist/browser/react/use-link-status.d.ts.map +0 -1
  685. package/dist/browser/react/use-link-status.js +0 -99
  686. package/dist/browser/react/use-link-status.js.map +0 -1
  687. package/dist/browser/react/use-mount.d.ts +0 -25
  688. package/dist/browser/react/use-mount.d.ts.map +0 -1
  689. package/dist/browser/react/use-mount.js +0 -30
  690. package/dist/browser/react/use-mount.js.map +0 -1
  691. package/dist/browser/react/use-navigation.d.ts +0 -27
  692. package/dist/browser/react/use-navigation.d.ts.map +0 -1
  693. package/dist/browser/react/use-navigation.js +0 -87
  694. package/dist/browser/react/use-navigation.js.map +0 -1
  695. package/dist/browser/react/use-segments.d.ts +0 -38
  696. package/dist/browser/react/use-segments.d.ts.map +0 -1
  697. package/dist/browser/react/use-segments.js +0 -130
  698. package/dist/browser/react/use-segments.js.map +0 -1
  699. package/dist/browser/request-controller.d.ts +0 -26
  700. package/dist/browser/request-controller.d.ts.map +0 -1
  701. package/dist/browser/request-controller.js +0 -147
  702. package/dist/browser/request-controller.js.map +0 -1
  703. package/dist/browser/rsc-router.d.ts +0 -129
  704. package/dist/browser/rsc-router.d.ts.map +0 -1
  705. package/dist/browser/rsc-router.js +0 -195
  706. package/dist/browser/rsc-router.js.map +0 -1
  707. package/dist/browser/scroll-restoration.d.ts +0 -93
  708. package/dist/browser/scroll-restoration.d.ts.map +0 -1
  709. package/dist/browser/scroll-restoration.js +0 -321
  710. package/dist/browser/scroll-restoration.js.map +0 -1
  711. package/dist/browser/segment-structure-assert.d.ts +0 -17
  712. package/dist/browser/segment-structure-assert.d.ts.map +0 -1
  713. package/dist/browser/segment-structure-assert.js +0 -59
  714. package/dist/browser/segment-structure-assert.js.map +0 -1
  715. package/dist/browser/server-action-bridge.d.ts +0 -26
  716. package/dist/browser/server-action-bridge.d.ts.map +0 -1
  717. package/dist/browser/server-action-bridge.js +0 -668
  718. package/dist/browser/server-action-bridge.js.map +0 -1
  719. package/dist/browser/shallow.d.ts +0 -12
  720. package/dist/browser/shallow.d.ts.map +0 -1
  721. package/dist/browser/shallow.js +0 -34
  722. package/dist/browser/shallow.js.map +0 -1
  723. package/dist/browser/types.d.ts +0 -369
  724. package/dist/browser/types.d.ts.map +0 -1
  725. package/dist/browser/types.js +0 -2
  726. package/dist/browser/types.js.map +0 -1
  727. package/dist/build/__tests__/generate-cli.test.d.ts +0 -2
  728. package/dist/build/__tests__/generate-cli.test.d.ts.map +0 -1
  729. package/dist/build/__tests__/generate-cli.test.js +0 -237
  730. package/dist/build/__tests__/generate-cli.test.js.map +0 -1
  731. package/dist/build/__tests__/generate-manifest.test.d.ts +0 -2
  732. package/dist/build/__tests__/generate-manifest.test.d.ts.map +0 -1
  733. package/dist/build/__tests__/generate-manifest.test.js +0 -119
  734. package/dist/build/__tests__/generate-manifest.test.js.map +0 -1
  735. package/dist/build/__tests__/generate-route-types.test.d.ts +0 -2
  736. package/dist/build/__tests__/generate-route-types.test.d.ts.map +0 -1
  737. package/dist/build/__tests__/generate-route-types.test.js +0 -620
  738. package/dist/build/__tests__/generate-route-types.test.js.map +0 -1
  739. package/dist/build/__tests__/per-router-manifest.test.d.ts +0 -2
  740. package/dist/build/__tests__/per-router-manifest.test.d.ts.map +0 -1
  741. package/dist/build/__tests__/per-router-manifest.test.js +0 -308
  742. package/dist/build/__tests__/per-router-manifest.test.js.map +0 -1
  743. package/dist/build/generate-manifest.d.ts +0 -81
  744. package/dist/build/generate-manifest.d.ts.map +0 -1
  745. package/dist/build/generate-manifest.js +0 -276
  746. package/dist/build/generate-manifest.js.map +0 -1
  747. package/dist/build/generate-route-types.d.ts +0 -115
  748. package/dist/build/generate-route-types.d.ts.map +0 -1
  749. package/dist/build/generate-route-types.js +0 -740
  750. package/dist/build/generate-route-types.js.map +0 -1
  751. package/dist/build/index.d.ts +0 -21
  752. package/dist/build/index.d.ts.map +0 -1
  753. package/dist/build/index.js +0 -21
  754. package/dist/build/index.js.map +0 -1
  755. package/dist/build/route-trie.d.ts +0 -71
  756. package/dist/build/route-trie.d.ts.map +0 -1
  757. package/dist/build/route-trie.js +0 -175
  758. package/dist/build/route-trie.js.map +0 -1
  759. package/dist/cache/__tests__/cache-scope.test.d.ts +0 -2
  760. package/dist/cache/__tests__/cache-scope.test.d.ts.map +0 -1
  761. package/dist/cache/__tests__/cache-scope.test.js +0 -208
  762. package/dist/cache/__tests__/cache-scope.test.js.map +0 -1
  763. package/dist/cache/__tests__/document-cache.test.d.ts +0 -2
  764. package/dist/cache/__tests__/document-cache.test.d.ts.map +0 -1
  765. package/dist/cache/__tests__/document-cache.test.js +0 -345
  766. package/dist/cache/__tests__/document-cache.test.js.map +0 -1
  767. package/dist/cache/__tests__/memory-segment-store.test.d.ts +0 -2
  768. package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +0 -1
  769. package/dist/cache/__tests__/memory-segment-store.test.js +0 -425
  770. package/dist/cache/__tests__/memory-segment-store.test.js.map +0 -1
  771. package/dist/cache/__tests__/memory-store.test.d.ts +0 -2
  772. package/dist/cache/__tests__/memory-store.test.d.ts.map +0 -1
  773. package/dist/cache/__tests__/memory-store.test.js +0 -367
  774. package/dist/cache/__tests__/memory-store.test.js.map +0 -1
  775. package/dist/cache/cache-scope.d.ts +0 -102
  776. package/dist/cache/cache-scope.d.ts.map +0 -1
  777. package/dist/cache/cache-scope.js +0 -440
  778. package/dist/cache/cache-scope.js.map +0 -1
  779. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +0 -2
  780. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +0 -1
  781. package/dist/cache/cf/__tests__/cf-cache-store.test.js +0 -330
  782. package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +0 -1
  783. package/dist/cache/cf/cf-cache-store.d.ts +0 -165
  784. package/dist/cache/cf/cf-cache-store.d.ts.map +0 -1
  785. package/dist/cache/cf/cf-cache-store.js +0 -242
  786. package/dist/cache/cf/cf-cache-store.js.map +0 -1
  787. package/dist/cache/cf/index.d.ts +0 -14
  788. package/dist/cache/cf/index.d.ts.map +0 -1
  789. package/dist/cache/cf/index.js +0 -17
  790. package/dist/cache/cf/index.js.map +0 -1
  791. package/dist/cache/document-cache.d.ts +0 -64
  792. package/dist/cache/document-cache.d.ts.map +0 -1
  793. package/dist/cache/document-cache.js +0 -228
  794. package/dist/cache/document-cache.js.map +0 -1
  795. package/dist/cache/index.d.ts +0 -19
  796. package/dist/cache/index.d.ts.map +0 -1
  797. package/dist/cache/index.js +0 -21
  798. package/dist/cache/index.js.map +0 -1
  799. package/dist/cache/memory-segment-store.d.ts +0 -110
  800. package/dist/cache/memory-segment-store.d.ts.map +0 -1
  801. package/dist/cache/memory-segment-store.js +0 -117
  802. package/dist/cache/memory-segment-store.js.map +0 -1
  803. package/dist/cache/memory-store.d.ts +0 -41
  804. package/dist/cache/memory-store.d.ts.map +0 -1
  805. package/dist/cache/memory-store.js +0 -191
  806. package/dist/cache/memory-store.js.map +0 -1
  807. package/dist/cache/types.d.ts +0 -317
  808. package/dist/cache/types.d.ts.map +0 -1
  809. package/dist/cache/types.js +0 -12
  810. package/dist/cache/types.js.map +0 -1
  811. package/dist/client.d.ts +0 -248
  812. package/dist/client.d.ts.map +0 -1
  813. package/dist/client.js +0 -367
  814. package/dist/client.js.map +0 -1
  815. package/dist/client.rsc.d.ts +0 -26
  816. package/dist/client.rsc.d.ts.map +0 -1
  817. package/dist/client.rsc.js +0 -46
  818. package/dist/client.rsc.js.map +0 -1
  819. package/dist/component-utils.d.ts +0 -36
  820. package/dist/component-utils.d.ts.map +0 -1
  821. package/dist/component-utils.js +0 -61
  822. package/dist/component-utils.js.map +0 -1
  823. package/dist/components/DefaultDocument.d.ts +0 -13
  824. package/dist/components/DefaultDocument.d.ts.map +0 -1
  825. package/dist/components/DefaultDocument.js +0 -15
  826. package/dist/components/DefaultDocument.js.map +0 -1
  827. package/dist/debug.d.ts +0 -58
  828. package/dist/debug.d.ts.map +0 -1
  829. package/dist/debug.js +0 -157
  830. package/dist/debug.js.map +0 -1
  831. package/dist/default-error-boundary.d.ts +0 -11
  832. package/dist/default-error-boundary.d.ts.map +0 -1
  833. package/dist/default-error-boundary.js +0 -45
  834. package/dist/default-error-boundary.js.map +0 -1
  835. package/dist/deps/browser.d.ts +0 -2
  836. package/dist/deps/browser.d.ts.map +0 -1
  837. package/dist/deps/browser.js +0 -3
  838. package/dist/deps/browser.js.map +0 -1
  839. package/dist/deps/html-stream-client.d.ts +0 -2
  840. package/dist/deps/html-stream-client.d.ts.map +0 -1
  841. package/dist/deps/html-stream-client.js +0 -3
  842. package/dist/deps/html-stream-client.js.map +0 -1
  843. package/dist/deps/html-stream-server.d.ts +0 -2
  844. package/dist/deps/html-stream-server.d.ts.map +0 -1
  845. package/dist/deps/html-stream-server.js +0 -3
  846. package/dist/deps/html-stream-server.js.map +0 -1
  847. package/dist/deps/rsc.d.ts +0 -2
  848. package/dist/deps/rsc.d.ts.map +0 -1
  849. package/dist/deps/rsc.js +0 -4
  850. package/dist/deps/rsc.js.map +0 -1
  851. package/dist/deps/ssr.d.ts +0 -2
  852. package/dist/deps/ssr.d.ts.map +0 -1
  853. package/dist/deps/ssr.js +0 -3
  854. package/dist/deps/ssr.js.map +0 -1
  855. package/dist/errors.d.ts +0 -174
  856. package/dist/errors.d.ts.map +0 -1
  857. package/dist/errors.js +0 -241
  858. package/dist/errors.js.map +0 -1
  859. package/dist/handle.d.ts +0 -78
  860. package/dist/handle.d.ts.map +0 -1
  861. package/dist/handle.js +0 -82
  862. package/dist/handle.js.map +0 -1
  863. package/dist/handles/MetaTags.d.ts +0 -14
  864. package/dist/handles/MetaTags.d.ts.map +0 -1
  865. package/dist/handles/MetaTags.js +0 -136
  866. package/dist/handles/MetaTags.js.map +0 -1
  867. package/dist/handles/index.d.ts +0 -6
  868. package/dist/handles/index.d.ts.map +0 -1
  869. package/dist/handles/index.js +0 -6
  870. package/dist/handles/index.js.map +0 -1
  871. package/dist/handles/meta.d.ts +0 -39
  872. package/dist/handles/meta.d.ts.map +0 -1
  873. package/dist/handles/meta.js +0 -202
  874. package/dist/handles/meta.js.map +0 -1
  875. package/dist/host/__tests__/errors.test.d.ts +0 -2
  876. package/dist/host/__tests__/errors.test.d.ts.map +0 -1
  877. package/dist/host/__tests__/errors.test.js +0 -76
  878. package/dist/host/__tests__/errors.test.js.map +0 -1
  879. package/dist/host/__tests__/pattern-comprehensive.test.d.ts +0 -2
  880. package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +0 -1
  881. package/dist/host/__tests__/pattern-comprehensive.test.js +0 -732
  882. package/dist/host/__tests__/pattern-comprehensive.test.js.map +0 -1
  883. package/dist/host/__tests__/pattern-matcher.test.d.ts +0 -2
  884. package/dist/host/__tests__/pattern-matcher.test.d.ts.map +0 -1
  885. package/dist/host/__tests__/pattern-matcher.test.js +0 -251
  886. package/dist/host/__tests__/pattern-matcher.test.js.map +0 -1
  887. package/dist/host/__tests__/router.test.d.ts +0 -2
  888. package/dist/host/__tests__/router.test.d.ts.map +0 -1
  889. package/dist/host/__tests__/router.test.js +0 -241
  890. package/dist/host/__tests__/router.test.js.map +0 -1
  891. package/dist/host/__tests__/testing.test.d.ts +0 -2
  892. package/dist/host/__tests__/testing.test.d.ts.map +0 -1
  893. package/dist/host/__tests__/testing.test.js +0 -64
  894. package/dist/host/__tests__/testing.test.js.map +0 -1
  895. package/dist/host/__tests__/utils.test.d.ts +0 -2
  896. package/dist/host/__tests__/utils.test.d.ts.map +0 -1
  897. package/dist/host/__tests__/utils.test.js +0 -29
  898. package/dist/host/__tests__/utils.test.js.map +0 -1
  899. package/dist/host/cookie-handler.d.ts +0 -34
  900. package/dist/host/cookie-handler.d.ts.map +0 -1
  901. package/dist/host/cookie-handler.js +0 -124
  902. package/dist/host/cookie-handler.js.map +0 -1
  903. package/dist/host/errors.d.ts +0 -56
  904. package/dist/host/errors.d.ts.map +0 -1
  905. package/dist/host/errors.js +0 -79
  906. package/dist/host/errors.js.map +0 -1
  907. package/dist/host/index.d.ts +0 -29
  908. package/dist/host/index.d.ts.map +0 -1
  909. package/dist/host/index.js +0 -32
  910. package/dist/host/index.js.map +0 -1
  911. package/dist/host/pattern-matcher.d.ts +0 -36
  912. package/dist/host/pattern-matcher.d.ts.map +0 -1
  913. package/dist/host/pattern-matcher.js +0 -172
  914. package/dist/host/pattern-matcher.js.map +0 -1
  915. package/dist/host/router.d.ts +0 -26
  916. package/dist/host/router.d.ts.map +0 -1
  917. package/dist/host/router.js +0 -218
  918. package/dist/host/router.js.map +0 -1
  919. package/dist/host/testing.d.ts +0 -36
  920. package/dist/host/testing.d.ts.map +0 -1
  921. package/dist/host/testing.js +0 -55
  922. package/dist/host/testing.js.map +0 -1
  923. package/dist/host/types.d.ts +0 -115
  924. package/dist/host/types.d.ts.map +0 -1
  925. package/dist/host/types.js +0 -7
  926. package/dist/host/types.js.map +0 -1
  927. package/dist/host/utils.d.ts +0 -21
  928. package/dist/host/utils.d.ts.map +0 -1
  929. package/dist/host/utils.js +0 -23
  930. package/dist/host/utils.js.map +0 -1
  931. package/dist/href-client.d.ts +0 -131
  932. package/dist/href-client.d.ts.map +0 -1
  933. package/dist/href-client.js +0 -64
  934. package/dist/href-client.js.map +0 -1
  935. package/dist/href-context.d.ts +0 -29
  936. package/dist/href-context.d.ts.map +0 -1
  937. package/dist/href-context.js +0 -21
  938. package/dist/href-context.js.map +0 -1
  939. package/dist/index.d.ts +0 -73
  940. package/dist/index.d.ts.map +0 -1
  941. package/dist/index.js +0 -91
  942. package/dist/index.js.map +0 -1
  943. package/dist/index.rsc.d.ts +0 -32
  944. package/dist/index.rsc.d.ts.map +0 -1
  945. package/dist/index.rsc.js +0 -40
  946. package/dist/index.rsc.js.map +0 -1
  947. package/dist/internal-debug.d.ts +0 -2
  948. package/dist/internal-debug.d.ts.map +0 -1
  949. package/dist/internal-debug.js +0 -5
  950. package/dist/internal-debug.js.map +0 -1
  951. package/dist/loader.d.ts +0 -14
  952. package/dist/loader.d.ts.map +0 -1
  953. package/dist/loader.js +0 -20
  954. package/dist/loader.js.map +0 -1
  955. package/dist/loader.rsc.d.ts +0 -19
  956. package/dist/loader.rsc.d.ts.map +0 -1
  957. package/dist/loader.rsc.js +0 -99
  958. package/dist/loader.rsc.js.map +0 -1
  959. package/dist/network-error-thrower.d.ts +0 -17
  960. package/dist/network-error-thrower.d.ts.map +0 -1
  961. package/dist/network-error-thrower.js +0 -14
  962. package/dist/network-error-thrower.js.map +0 -1
  963. package/dist/outlet-context.d.ts +0 -13
  964. package/dist/outlet-context.d.ts.map +0 -1
  965. package/dist/outlet-context.js +0 -3
  966. package/dist/outlet-context.js.map +0 -1
  967. package/dist/prerender/__tests__/param-hash.test.d.ts +0 -2
  968. package/dist/prerender/__tests__/param-hash.test.d.ts.map +0 -1
  969. package/dist/prerender/__tests__/param-hash.test.js +0 -148
  970. package/dist/prerender/__tests__/param-hash.test.js.map +0 -1
  971. package/dist/prerender/param-hash.d.ts +0 -16
  972. package/dist/prerender/param-hash.d.ts.map +0 -1
  973. package/dist/prerender/param-hash.js +0 -36
  974. package/dist/prerender/param-hash.js.map +0 -1
  975. package/dist/prerender/store.d.ts +0 -38
  976. package/dist/prerender/store.d.ts.map +0 -1
  977. package/dist/prerender/store.js +0 -61
  978. package/dist/prerender/store.js.map +0 -1
  979. package/dist/prerender.d.ts +0 -66
  980. package/dist/prerender.d.ts.map +0 -1
  981. package/dist/prerender.js +0 -57
  982. package/dist/prerender.js.map +0 -1
  983. package/dist/reverse.d.ts +0 -196
  984. package/dist/reverse.d.ts.map +0 -1
  985. package/dist/reverse.js +0 -78
  986. package/dist/reverse.js.map +0 -1
  987. package/dist/root-error-boundary.d.ts +0 -33
  988. package/dist/root-error-boundary.d.ts.map +0 -1
  989. package/dist/root-error-boundary.js +0 -165
  990. package/dist/root-error-boundary.js.map +0 -1
  991. package/dist/route-content-wrapper.d.ts +0 -46
  992. package/dist/route-content-wrapper.d.ts.map +0 -1
  993. package/dist/route-content-wrapper.js +0 -77
  994. package/dist/route-content-wrapper.js.map +0 -1
  995. package/dist/route-definition.d.ts +0 -421
  996. package/dist/route-definition.d.ts.map +0 -1
  997. package/dist/route-definition.js +0 -868
  998. package/dist/route-definition.js.map +0 -1
  999. package/dist/route-map-builder.d.ts +0 -155
  1000. package/dist/route-map-builder.d.ts.map +0 -1
  1001. package/dist/route-map-builder.js +0 -237
  1002. package/dist/route-map-builder.js.map +0 -1
  1003. package/dist/route-types.d.ts +0 -165
  1004. package/dist/route-types.d.ts.map +0 -1
  1005. package/dist/route-types.js +0 -7
  1006. package/dist/route-types.js.map +0 -1
  1007. package/dist/router/__tests__/handler-context.test.d.ts +0 -2
  1008. package/dist/router/__tests__/handler-context.test.d.ts.map +0 -1
  1009. package/dist/router/__tests__/handler-context.test.js +0 -65
  1010. package/dist/router/__tests__/handler-context.test.js.map +0 -1
  1011. package/dist/router/__tests__/loader-cycle-detection.test.d.ts +0 -2
  1012. package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +0 -1
  1013. package/dist/router/__tests__/loader-cycle-detection.test.js +0 -221
  1014. package/dist/router/__tests__/loader-cycle-detection.test.js.map +0 -1
  1015. package/dist/router/__tests__/match-context.test.d.ts +0 -2
  1016. package/dist/router/__tests__/match-context.test.d.ts.map +0 -1
  1017. package/dist/router/__tests__/match-context.test.js +0 -92
  1018. package/dist/router/__tests__/match-context.test.js.map +0 -1
  1019. package/dist/router/__tests__/match-pipelines.test.d.ts +0 -2
  1020. package/dist/router/__tests__/match-pipelines.test.d.ts.map +0 -1
  1021. package/dist/router/__tests__/match-pipelines.test.js +0 -417
  1022. package/dist/router/__tests__/match-pipelines.test.js.map +0 -1
  1023. package/dist/router/__tests__/match-result.test.d.ts +0 -2
  1024. package/dist/router/__tests__/match-result.test.d.ts.map +0 -1
  1025. package/dist/router/__tests__/match-result.test.js +0 -457
  1026. package/dist/router/__tests__/match-result.test.js.map +0 -1
  1027. package/dist/router/__tests__/on-error.test.d.ts +0 -2
  1028. package/dist/router/__tests__/on-error.test.d.ts.map +0 -1
  1029. package/dist/router/__tests__/on-error.test.js +0 -678
  1030. package/dist/router/__tests__/on-error.test.js.map +0 -1
  1031. package/dist/router/__tests__/pattern-matching.test.d.ts +0 -2
  1032. package/dist/router/__tests__/pattern-matching.test.d.ts.map +0 -1
  1033. package/dist/router/__tests__/pattern-matching.test.js +0 -629
  1034. package/dist/router/__tests__/pattern-matching.test.js.map +0 -1
  1035. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +0 -2
  1036. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +0 -1
  1037. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +0 -155
  1038. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +0 -1
  1039. package/dist/router/error-handling.d.ts +0 -77
  1040. package/dist/router/error-handling.d.ts.map +0 -1
  1041. package/dist/router/error-handling.js +0 -202
  1042. package/dist/router/error-handling.js.map +0 -1
  1043. package/dist/router/handler-context.d.ts +0 -20
  1044. package/dist/router/handler-context.d.ts.map +0 -1
  1045. package/dist/router/handler-context.js +0 -198
  1046. package/dist/router/handler-context.js.map +0 -1
  1047. package/dist/router/intercept-resolution.d.ts +0 -66
  1048. package/dist/router/intercept-resolution.d.ts.map +0 -1
  1049. package/dist/router/intercept-resolution.js +0 -246
  1050. package/dist/router/intercept-resolution.js.map +0 -1
  1051. package/dist/router/loader-resolution.d.ts +0 -64
  1052. package/dist/router/loader-resolution.d.ts.map +0 -1
  1053. package/dist/router/loader-resolution.js +0 -284
  1054. package/dist/router/loader-resolution.js.map +0 -1
  1055. package/dist/router/logging.d.ts +0 -15
  1056. package/dist/router/logging.d.ts.map +0 -1
  1057. package/dist/router/logging.js +0 -99
  1058. package/dist/router/logging.js.map +0 -1
  1059. package/dist/router/manifest.d.ts +0 -22
  1060. package/dist/router/manifest.d.ts.map +0 -1
  1061. package/dist/router/manifest.js +0 -181
  1062. package/dist/router/manifest.js.map +0 -1
  1063. package/dist/router/match-api.d.ts +0 -35
  1064. package/dist/router/match-api.d.ts.map +0 -1
  1065. package/dist/router/match-api.js +0 -406
  1066. package/dist/router/match-api.js.map +0 -1
  1067. package/dist/router/match-context.d.ts +0 -206
  1068. package/dist/router/match-context.d.ts.map +0 -1
  1069. package/dist/router/match-context.js +0 -17
  1070. package/dist/router/match-context.js.map +0 -1
  1071. package/dist/router/match-middleware/background-revalidation.d.ts +0 -127
  1072. package/dist/router/match-middleware/background-revalidation.d.ts.map +0 -1
  1073. package/dist/router/match-middleware/background-revalidation.js +0 -75
  1074. package/dist/router/match-middleware/background-revalidation.js.map +0 -1
  1075. package/dist/router/match-middleware/cache-lookup.d.ts +0 -112
  1076. package/dist/router/match-middleware/cache-lookup.d.ts.map +0 -1
  1077. package/dist/router/match-middleware/cache-lookup.js +0 -257
  1078. package/dist/router/match-middleware/cache-lookup.js.map +0 -1
  1079. package/dist/router/match-middleware/cache-store.d.ts +0 -113
  1080. package/dist/router/match-middleware/cache-store.d.ts.map +0 -1
  1081. package/dist/router/match-middleware/cache-store.js +0 -108
  1082. package/dist/router/match-middleware/cache-store.js.map +0 -1
  1083. package/dist/router/match-middleware/index.d.ts +0 -81
  1084. package/dist/router/match-middleware/index.d.ts.map +0 -1
  1085. package/dist/router/match-middleware/index.js +0 -80
  1086. package/dist/router/match-middleware/index.js.map +0 -1
  1087. package/dist/router/match-middleware/intercept-resolution.d.ts +0 -117
  1088. package/dist/router/match-middleware/intercept-resolution.d.ts.map +0 -1
  1089. package/dist/router/match-middleware/intercept-resolution.js +0 -134
  1090. package/dist/router/match-middleware/intercept-resolution.js.map +0 -1
  1091. package/dist/router/match-middleware/segment-resolution.d.ts +0 -99
  1092. package/dist/router/match-middleware/segment-resolution.d.ts.map +0 -1
  1093. package/dist/router/match-middleware/segment-resolution.js +0 -53
  1094. package/dist/router/match-middleware/segment-resolution.js.map +0 -1
  1095. package/dist/router/match-pipelines.d.ts +0 -147
  1096. package/dist/router/match-pipelines.d.ts.map +0 -1
  1097. package/dist/router/match-pipelines.js +0 -82
  1098. package/dist/router/match-pipelines.js.map +0 -1
  1099. package/dist/router/match-result.d.ts +0 -126
  1100. package/dist/router/match-result.d.ts.map +0 -1
  1101. package/dist/router/match-result.js +0 -93
  1102. package/dist/router/match-result.js.map +0 -1
  1103. package/dist/router/metrics.d.ts +0 -20
  1104. package/dist/router/metrics.d.ts.map +0 -1
  1105. package/dist/router/metrics.js +0 -47
  1106. package/dist/router/metrics.js.map +0 -1
  1107. package/dist/router/middleware.d.ts +0 -249
  1108. package/dist/router/middleware.d.ts.map +0 -1
  1109. package/dist/router/middleware.js +0 -434
  1110. package/dist/router/middleware.js.map +0 -1
  1111. package/dist/router/middleware.test.d.ts +0 -2
  1112. package/dist/router/middleware.test.d.ts.map +0 -1
  1113. package/dist/router/middleware.test.js +0 -816
  1114. package/dist/router/middleware.test.js.map +0 -1
  1115. package/dist/router/pattern-matching.d.ts +0 -149
  1116. package/dist/router/pattern-matching.d.ts.map +0 -1
  1117. package/dist/router/pattern-matching.js +0 -349
  1118. package/dist/router/pattern-matching.js.map +0 -1
  1119. package/dist/router/revalidation.d.ts +0 -44
  1120. package/dist/router/revalidation.d.ts.map +0 -1
  1121. package/dist/router/revalidation.js +0 -147
  1122. package/dist/router/revalidation.js.map +0 -1
  1123. package/dist/router/router-context.d.ts +0 -135
  1124. package/dist/router/router-context.d.ts.map +0 -1
  1125. package/dist/router/router-context.js +0 -36
  1126. package/dist/router/router-context.js.map +0 -1
  1127. package/dist/router/segment-resolution.d.ts +0 -127
  1128. package/dist/router/segment-resolution.d.ts.map +0 -1
  1129. package/dist/router/segment-resolution.js +0 -919
  1130. package/dist/router/segment-resolution.js.map +0 -1
  1131. package/dist/router/trie-matching.d.ts +0 -40
  1132. package/dist/router/trie-matching.d.ts.map +0 -1
  1133. package/dist/router/trie-matching.js +0 -127
  1134. package/dist/router/trie-matching.js.map +0 -1
  1135. package/dist/router/types.d.ts +0 -136
  1136. package/dist/router/types.d.ts.map +0 -1
  1137. package/dist/router/types.js +0 -7
  1138. package/dist/router/types.js.map +0 -1
  1139. package/dist/router.d.ts +0 -753
  1140. package/dist/router.d.ts.map +0 -1
  1141. package/dist/router.gen.d.ts +0 -6
  1142. package/dist/router.gen.d.ts.map +0 -1
  1143. package/dist/router.gen.js +0 -6
  1144. package/dist/router.gen.js.map +0 -1
  1145. package/dist/router.js +0 -1304
  1146. package/dist/router.js.map +0 -1
  1147. package/dist/rsc/__tests__/helpers.test.d.ts +0 -2
  1148. package/dist/rsc/__tests__/helpers.test.d.ts.map +0 -1
  1149. package/dist/rsc/__tests__/helpers.test.js +0 -140
  1150. package/dist/rsc/__tests__/helpers.test.js.map +0 -1
  1151. package/dist/rsc/handler.d.ts +0 -45
  1152. package/dist/rsc/handler.d.ts.map +0 -1
  1153. package/dist/rsc/handler.js +0 -1172
  1154. package/dist/rsc/handler.js.map +0 -1
  1155. package/dist/rsc/helpers.d.ts +0 -16
  1156. package/dist/rsc/helpers.d.ts.map +0 -1
  1157. package/dist/rsc/helpers.js +0 -55
  1158. package/dist/rsc/helpers.js.map +0 -1
  1159. package/dist/rsc/index.d.ts +0 -22
  1160. package/dist/rsc/index.d.ts.map +0 -1
  1161. package/dist/rsc/index.js +0 -23
  1162. package/dist/rsc/index.js.map +0 -1
  1163. package/dist/rsc/nonce.d.ts +0 -9
  1164. package/dist/rsc/nonce.d.ts.map +0 -1
  1165. package/dist/rsc/nonce.js +0 -18
  1166. package/dist/rsc/nonce.js.map +0 -1
  1167. package/dist/rsc/types.d.ts +0 -206
  1168. package/dist/rsc/types.d.ts.map +0 -1
  1169. package/dist/rsc/types.js +0 -8
  1170. package/dist/rsc/types.js.map +0 -1
  1171. package/dist/search-params.d.ts +0 -103
  1172. package/dist/search-params.d.ts.map +0 -1
  1173. package/dist/search-params.js +0 -74
  1174. package/dist/search-params.js.map +0 -1
  1175. package/dist/segment-system.d.ts +0 -75
  1176. package/dist/segment-system.d.ts.map +0 -1
  1177. package/dist/segment-system.js +0 -336
  1178. package/dist/segment-system.js.map +0 -1
  1179. package/dist/server/context.d.ts +0 -245
  1180. package/dist/server/context.d.ts.map +0 -1
  1181. package/dist/server/context.js +0 -197
  1182. package/dist/server/context.js.map +0 -1
  1183. package/dist/server/fetchable-loader-store.d.ts +0 -18
  1184. package/dist/server/fetchable-loader-store.d.ts.map +0 -1
  1185. package/dist/server/fetchable-loader-store.js +0 -18
  1186. package/dist/server/fetchable-loader-store.js.map +0 -1
  1187. package/dist/server/handle-store.d.ts +0 -85
  1188. package/dist/server/handle-store.d.ts.map +0 -1
  1189. package/dist/server/handle-store.js +0 -142
  1190. package/dist/server/handle-store.js.map +0 -1
  1191. package/dist/server/loader-registry.d.ts +0 -55
  1192. package/dist/server/loader-registry.d.ts.map +0 -1
  1193. package/dist/server/loader-registry.js +0 -132
  1194. package/dist/server/loader-registry.js.map +0 -1
  1195. package/dist/server/request-context.d.ts +0 -226
  1196. package/dist/server/request-context.d.ts.map +0 -1
  1197. package/dist/server/request-context.js +0 -290
  1198. package/dist/server/request-context.js.map +0 -1
  1199. package/dist/server/root-layout.d.ts +0 -4
  1200. package/dist/server/root-layout.d.ts.map +0 -1
  1201. package/dist/server/root-layout.js +0 -5
  1202. package/dist/server/root-layout.js.map +0 -1
  1203. package/dist/server.d.ts +0 -15
  1204. package/dist/server.d.ts.map +0 -1
  1205. package/dist/server.js +0 -20
  1206. package/dist/server.js.map +0 -1
  1207. package/dist/ssr/__tests__/ssr-handler.test.d.ts +0 -2
  1208. package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +0 -1
  1209. package/dist/ssr/__tests__/ssr-handler.test.js +0 -132
  1210. package/dist/ssr/__tests__/ssr-handler.test.js.map +0 -1
  1211. package/dist/ssr/index.d.ts +0 -98
  1212. package/dist/ssr/index.d.ts.map +0 -1
  1213. package/dist/ssr/index.js +0 -158
  1214. package/dist/ssr/index.js.map +0 -1
  1215. package/dist/static-handler.d.ts +0 -50
  1216. package/dist/static-handler.d.ts.map +0 -1
  1217. package/dist/static-handler.gen.d.ts +0 -5
  1218. package/dist/static-handler.gen.d.ts.map +0 -1
  1219. package/dist/static-handler.gen.js +0 -5
  1220. package/dist/static-handler.gen.js.map +0 -1
  1221. package/dist/static-handler.js +0 -29
  1222. package/dist/static-handler.js.map +0 -1
  1223. package/dist/theme/ThemeProvider.d.ts +0 -20
  1224. package/dist/theme/ThemeProvider.d.ts.map +0 -1
  1225. package/dist/theme/ThemeProvider.js +0 -240
  1226. package/dist/theme/ThemeProvider.js.map +0 -1
  1227. package/dist/theme/ThemeScript.d.ts +0 -48
  1228. package/dist/theme/ThemeScript.d.ts.map +0 -1
  1229. package/dist/theme/ThemeScript.js +0 -13
  1230. package/dist/theme/ThemeScript.js.map +0 -1
  1231. package/dist/theme/__tests__/theme.test.d.ts +0 -2
  1232. package/dist/theme/__tests__/theme.test.d.ts.map +0 -1
  1233. package/dist/theme/__tests__/theme.test.js +0 -103
  1234. package/dist/theme/__tests__/theme.test.js.map +0 -1
  1235. package/dist/theme/constants.d.ts +0 -29
  1236. package/dist/theme/constants.d.ts.map +0 -1
  1237. package/dist/theme/constants.js +0 -48
  1238. package/dist/theme/constants.js.map +0 -1
  1239. package/dist/theme/index.d.ts +0 -31
  1240. package/dist/theme/index.d.ts.map +0 -1
  1241. package/dist/theme/index.js +0 -36
  1242. package/dist/theme/index.js.map +0 -1
  1243. package/dist/theme/theme-context.d.ts +0 -40
  1244. package/dist/theme/theme-context.d.ts.map +0 -1
  1245. package/dist/theme/theme-context.js +0 -60
  1246. package/dist/theme/theme-context.js.map +0 -1
  1247. package/dist/theme/theme-script.d.ts +0 -27
  1248. package/dist/theme/theme-script.d.ts.map +0 -1
  1249. package/dist/theme/theme-script.js +0 -147
  1250. package/dist/theme/theme-script.js.map +0 -1
  1251. package/dist/theme/types.d.ts +0 -163
  1252. package/dist/theme/types.d.ts.map +0 -1
  1253. package/dist/theme/types.js +0 -11
  1254. package/dist/theme/types.js.map +0 -1
  1255. package/dist/theme/use-theme.d.ts +0 -12
  1256. package/dist/theme/use-theme.d.ts.map +0 -1
  1257. package/dist/theme/use-theme.js +0 -40
  1258. package/dist/theme/use-theme.js.map +0 -1
  1259. package/dist/types.d.ts +0 -1479
  1260. package/dist/types.d.ts.map +0 -1
  1261. package/dist/types.js +0 -10
  1262. package/dist/types.js.map +0 -1
  1263. package/dist/urls.d.ts +0 -441
  1264. package/dist/urls.d.ts.map +0 -1
  1265. package/dist/urls.gen.d.ts +0 -8
  1266. package/dist/urls.gen.d.ts.map +0 -1
  1267. package/dist/urls.gen.js +0 -8
  1268. package/dist/urls.gen.js.map +0 -1
  1269. package/dist/urls.js +0 -443
  1270. package/dist/urls.js.map +0 -1
  1271. package/dist/use-loader.d.ts +0 -127
  1272. package/dist/use-loader.d.ts.map +0 -1
  1273. package/dist/use-loader.js +0 -237
  1274. package/dist/use-loader.js.map +0 -1
  1275. package/dist/vite/__tests__/ast-handler-extract.test.d.ts +0 -2
  1276. package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +0 -1
  1277. package/dist/vite/__tests__/ast-handler-extract.test.js +0 -294
  1278. package/dist/vite/__tests__/ast-handler-extract.test.js.map +0 -1
  1279. package/dist/vite/__tests__/expose-id-utils.test.d.ts +0 -2
  1280. package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +0 -1
  1281. package/dist/vite/__tests__/expose-id-utils.test.js +0 -224
  1282. package/dist/vite/__tests__/expose-id-utils.test.js.map +0 -1
  1283. package/dist/vite/__tests__/expose-internal-ids.test.d.ts +0 -2
  1284. package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +0 -1
  1285. package/dist/vite/__tests__/expose-internal-ids.test.js +0 -647
  1286. package/dist/vite/__tests__/expose-internal-ids.test.js.map +0 -1
  1287. package/dist/vite/__tests__/expose-router-id.test.d.ts +0 -2
  1288. package/dist/vite/__tests__/expose-router-id.test.d.ts.map +0 -1
  1289. package/dist/vite/__tests__/expose-router-id.test.js +0 -39
  1290. package/dist/vite/__tests__/expose-router-id.test.js.map +0 -1
  1291. package/dist/vite/ast-handler-extract.d.ts +0 -49
  1292. package/dist/vite/ast-handler-extract.d.ts.map +0 -1
  1293. package/dist/vite/ast-handler-extract.js +0 -249
  1294. package/dist/vite/ast-handler-extract.js.map +0 -1
  1295. package/dist/vite/expose-action-id.d.ts +0 -19
  1296. package/dist/vite/expose-action-id.d.ts.map +0 -1
  1297. package/dist/vite/expose-action-id.js +0 -250
  1298. package/dist/vite/expose-action-id.js.map +0 -1
  1299. package/dist/vite/expose-id-utils.d.ts +0 -69
  1300. package/dist/vite/expose-id-utils.d.ts.map +0 -1
  1301. package/dist/vite/expose-id-utils.js +0 -289
  1302. package/dist/vite/expose-id-utils.js.map +0 -1
  1303. package/dist/vite/expose-internal-ids.d.ts +0 -22
  1304. package/dist/vite/expose-internal-ids.d.ts.map +0 -1
  1305. package/dist/vite/expose-internal-ids.js +0 -886
  1306. package/dist/vite/expose-internal-ids.js.map +0 -1
  1307. package/dist/vite/index.d.ts +0 -149
  1308. package/dist/vite/index.d.ts.map +0 -1
  1309. package/dist/vite/index.js.bak +0 -5448
  1310. package/dist/vite/index.js.map +0 -1
  1311. package/dist/vite/index.named-routes.gen.ts +0 -103
  1312. package/dist/vite/package-resolution.d.ts +0 -43
  1313. package/dist/vite/package-resolution.d.ts.map +0 -1
  1314. package/dist/vite/package-resolution.js +0 -112
  1315. package/dist/vite/package-resolution.js.map +0 -1
  1316. package/dist/vite/virtual-entries.d.ts +0 -25
  1317. package/dist/vite/virtual-entries.d.ts.map +0 -1
  1318. package/dist/vite/virtual-entries.js +0 -110
  1319. package/dist/vite/virtual-entries.js.map +0 -1
  1320. package/skills/migrate-react-router/cloudflare-workers.md +0 -129
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Typed context variables for ctx.set() / ctx.get().
3
+ *
4
+ * createVar<T>() produces a typed token that handlers set and layouts/middleware
5
+ * read. The token carries a unique Symbol used as the property key on the
6
+ * per-request variables object — no build-time processing, no IDs.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { createVar } from "@rangojs/router";
11
+ *
12
+ * interface PaginationData { current: number; total: number }
13
+ * export const Pagination = createVar<PaginationData>();
14
+ *
15
+ * // Non-cacheable var — ctx.get(User) throws inside a cache() boundary
16
+ * export const User = createVar<UserData>({ cache: false });
17
+ *
18
+ * // handler
19
+ * ctx.set(Pagination, { current: 1, total: 4 });
20
+ *
21
+ * // layout
22
+ * const pg = ctx.get(Pagination); // PaginationData | undefined
23
+ * ```
24
+ */
25
+ export interface ContextVar<T> {
26
+ readonly __brand: "context-var";
27
+ readonly key: symbol;
28
+ /** When false, ctx.get(var) throws inside a cache() boundary. */
29
+ readonly cache: boolean;
30
+ /** Phantom field to carry the type parameter. Never set at runtime. */
31
+ readonly __type?: T;
32
+ }
33
+ export interface ContextVarOptions {
34
+ /**
35
+ * When false, marks this variable as non-cacheable.
36
+ * Reading this var with ctx.get() inside a cache() boundary throws. Use for
37
+ * inherently request-specific data (user sessions, auth tokens, etc.) that
38
+ * must never be baked into cached segments.
39
+ *
40
+ * @default true
41
+ */
42
+ cache?: boolean;
43
+ }
44
+ /**
45
+ * Create a typed context variable token.
46
+ *
47
+ * The returned object is used with ctx.set(token, value) and ctx.get(token)
48
+ * for compile-time-checked data flow between handlers, layouts, and middleware.
49
+ */
50
+ export declare function createVar<T>(options?: ContextVarOptions): ContextVar<T>;
51
+ /**
52
+ * Type guard: is the value a ContextVar token?
53
+ */
54
+ export declare function isContextVar(value: unknown): value is ContextVar<unknown>;
55
+ /**
56
+ * Does a variables object hold any entries? Counts both string keys and the
57
+ * symbol-keyed entries (context vars are stored under symbols), so an object
58
+ * carrying only symbol-keyed vars is still reported as non-empty.
59
+ */
60
+ export declare function hasContextVars(variables: object): boolean;
61
+ /**
62
+ * Check if a variable value is non-cacheable (either var-level or write-level).
63
+ */
64
+ export declare function isNonCacheable(variables: any, keyOrVar: string | ContextVar<any>): boolean;
65
+ /**
66
+ * Read a variable from the variables store.
67
+ * Accepts either a string key (legacy) or a ContextVar token (typed).
68
+ */
69
+ export declare function contextGet(variables: any, keyOrVar: string | ContextVar<any>): any;
70
+ export interface ContextSetOptions {
71
+ /**
72
+ * When false, marks this specific write as non-cacheable.
73
+ * "Least cacheable wins" — if either the var definition or this option
74
+ * says cache: false, the value is non-cacheable.
75
+ *
76
+ * @default true (inherits from createVar)
77
+ */
78
+ cache?: boolean;
79
+ }
80
+ /**
81
+ * Write a variable to the variables store.
82
+ * Accepts either a string key (legacy) or a ContextVar token (typed).
83
+ */
84
+ export declare function contextSet(variables: any, keyOrVar: string | ContextVar<any>, value: any, options?: ContextSetOptions): void;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Debug utilities for manifest inspection and comparison
3
+ */
4
+ import { type EntryData } from "./server/context";
5
+ /**
6
+ * Serialized entry for debug output
7
+ */
8
+ export interface SerializedEntry {
9
+ id: string;
10
+ shortCode: string;
11
+ type: string;
12
+ parentShortCode: string | null;
13
+ pattern?: string;
14
+ hasLoader: boolean;
15
+ hasMiddleware: boolean;
16
+ hasErrorBoundary: boolean;
17
+ parallelCount: number;
18
+ interceptCount: number;
19
+ }
20
+ /**
21
+ * Serialized manifest structure
22
+ */
23
+ export interface SerializedManifest {
24
+ routes: Record<string, SerializedEntry>;
25
+ layouts: Record<string, SerializedEntry>;
26
+ totalRoutes: number;
27
+ totalLayouts: number;
28
+ }
29
+ /**
30
+ * Serialize a manifest Map into a JSON-friendly structure
31
+ */
32
+ export declare function serializeManifest(manifest: Map<string, EntryData>): SerializedManifest;
33
+ /**
34
+ * Compare two manifests and return differences
35
+ */
36
+ export declare function compareManifests(oldManifest: SerializedManifest, newManifest: SerializedManifest): {
37
+ addedRoutes: string[];
38
+ removedRoutes: string[];
39
+ changedRoutes: Array<{
40
+ key: string;
41
+ field: string;
42
+ old: any;
43
+ new: any;
44
+ }>;
45
+ addedLayouts: string[];
46
+ removedLayouts: string[];
47
+ changedLayouts: Array<{
48
+ key: string;
49
+ field: string;
50
+ old: any;
51
+ new: any;
52
+ }>;
53
+ };
54
+ /**
55
+ * Format manifest diff as a human-readable string
56
+ */
57
+ export declare function formatManifestDiff(diff: ReturnType<typeof compareManifests>): string;
@@ -0,0 +1,5 @@
1
+ import type { ReactNode } from "react";
2
+ export declare function decodeLoaderResults(resolvedData: any[], loaderIds: string[]): {
3
+ loaderData: Record<string, any>;
4
+ errorFallback: ReactNode;
5
+ };
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from "react";
2
+ import type { ErrorBoundaryFallbackProps } from "./types.js";
3
+ /**
4
+ * Default error boundary fallback component
5
+ *
6
+ * This is rendered when an error occurs and no custom error boundary
7
+ * is defined in the route tree. Shows a simple "Internal Server Error"
8
+ * message with the error details in development.
9
+ */
10
+ export declare function DefaultErrorFallback({ error, }: ErrorBoundaryFallbackProps): ReactNode;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Deferred handle values — "decide synchronously, resolve late".
3
+ *
4
+ * A handle is pushed from code that holds `ctx` (a route/layout handler), so the
5
+ * decision to push lands before the handles stream seals. But the value often
6
+ * isn't known there — it may come from a deep async component far from the
7
+ * handler. `ctx.use(Handle).defer()` reserves the handle's slot now (synchronous,
8
+ * so ordering and the pre-seal timing hold) and returns a resolver with the SAME
9
+ * signature as the push: you call it later, anywhere in the render, with the same
10
+ * value you would have passed to the push.
11
+ *
12
+ * const breadcrumb = ctx.use(Breadcrumbs); // (item) => void & .defer()
13
+ * const resolve = breadcrumb.defer({ timeoutMs: 5000, else: null });
14
+ * // deep async component, far from ctx:
15
+ * resolve({ label, href, content }); // identical call, just deferred
16
+ *
17
+ * Under the hood the reserved slot is a Promise. Handle values are resolved
18
+ * before any consumer sees them (resolve-by-default: the full render resolves
19
+ * server-side, navigation resolves client-side before apply), so `useHandle`
20
+ * receives the resolved value, never the Promise. The hazard that guards against
21
+ * bugs: a deferred slot whose resolver is never called would keep the render —
22
+ * and the HTTP response — waiting forever. So a deferred auto-resolves to `else`
23
+ * after `timeoutMs` (default {@link DEFAULT_DEFER_TIMEOUT_MS}) if the resolver is
24
+ * never called, degrading gracefully (and warning in dev) instead of hanging.
25
+ */
26
+ /** Default auto-resolve window. Long enough for genuine deep async work, short
27
+ * enough that a forgotten resolve does not hang the response indefinitely. */
28
+ export declare const DEFAULT_DEFER_TIMEOUT_MS = 10000;
29
+ /** Options for `ctx.use(Handle).defer()`. */
30
+ export interface DeferOptions<TData> {
31
+ /**
32
+ * Auto-resolve to `else` after this many ms if the resolver is never called,
33
+ * so a forgotten resolve cannot hold the Flight stream — and thus the HTTP
34
+ * response — open. Defaults to {@link DEFAULT_DEFER_TIMEOUT_MS}. `0` or
35
+ * `Infinity` disable the timeout intentionally (not recommended on a request
36
+ * path). Any other non-finite or negative value is treated as a mistake and
37
+ * falls back to the default rather than silently disabling the safety net.
38
+ * Named `timeoutMs` to match the router's `*Ms` duration convention.
39
+ */
40
+ timeoutMs?: number;
41
+ /**
42
+ * Value the slot resolves to if the timeout fires before the resolver is
43
+ * called. Defaults to `undefined` (the deferred item is skipped/empty). For
44
+ * renderable handle content, `null` is the usual graceful fallback, so the
45
+ * type admits `null` even when `TData` does not.
46
+ */
47
+ else?: TData | null;
48
+ }
49
+ /**
50
+ * The call signature shared by a handle push and the resolver returned by
51
+ * `.defer()`: a concrete value, a `Promise` of the value (Flight streams it as a
52
+ * late row), or a thunk returning a `Promise` (called immediately).
53
+ */
54
+ export type HandlePushFn<TData> = (data: TData | Promise<TData> | (() => Promise<TData>)) => void;
55
+ /**
56
+ * The push function returned by `ctx.use(Handle)`. Call it to push a value now,
57
+ * or call `.defer()` to reserve the slot now and resolve the value later (e.g.
58
+ * from a deep async component) with a timeout safety net.
59
+ */
60
+ export type HandlePush<TData> = HandlePushFn<TData> & {
61
+ /**
62
+ * Reserve this handle's slot synchronously and return a resolver that is
63
+ * push-equal: it takes the same argument shapes as the push (value, Promise, or
64
+ * thunk) and behaves identically. Two things the resolver adds over a direct
65
+ * push: a timeout (if the resolver is never called, the slot auto-resolves to
66
+ * `options.else` after `options.timeoutMs`; calling the resolver cancels it),
67
+ * and — on the action/revalidation path only — a thunk it runs does NOT
68
+ * re-enter the deadlock-guard push-callback scope a direct push thunk gets,
69
+ * because a deferred resolver fires after the handler phase has closed.
70
+ *
71
+ * The reserved slot is resolved before any consumer reads it
72
+ * (resolve-by-default), so `useHandle` receives the resolved value (or the
73
+ * `else` fallback on timeout), never a Promise.
74
+ */
75
+ defer(options?: DeferOptions<TData>): HandlePushFn<TData>;
76
+ };
77
+ export declare function createDeferred<T>(options?: {
78
+ timeoutMs?: number;
79
+ fallback?: T | null;
80
+ }): {
81
+ promise: Promise<T | null | undefined>;
82
+ resolve: (value: T | null | undefined) => void;
83
+ };
84
+ /**
85
+ * Attach `.defer()` to a handle push function. The deferred slot is reserved by
86
+ * pushing the deferred promise through the same push (so ordering, sealing, and
87
+ * Flight streaming all reuse the existing path); the returned resolver settles it.
88
+ */
89
+ export declare function withDefer<TData>(push: HandlePushFn<TData>): HandlePush<TData>;
@@ -0,0 +1 @@
1
+ export { createFromReadableStream, createFromFetch, setServerCallback, encodeReply, createTemporaryReferenceSet, } from "@vitejs/plugin-rsc/browser";
@@ -0,0 +1 @@
1
+ export { rscStream } from "rsc-html-stream/client";
@@ -0,0 +1 @@
1
+ export { injectRSCPayload } from "rsc-html-stream/server";
@@ -0,0 +1 @@
1
+ export { renderToReadableStream, decodeReply, createTemporaryReferenceSet, loadServerAction, decodeAction, decodeFormState, } from "@vitejs/plugin-rsc/rsc";
@@ -0,0 +1 @@
1
+ export { createFromReadableStream, setOnClientReference, } from "@vitejs/plugin-rsc/ssr";
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Shared key=value serialization core.
3
+ *
4
+ * One encode+join rule shared by every deterministic query-string serializer
5
+ * in the codebase (cache keys, route-param strings, search-param strings,
6
+ * prerender param hashes). Each call site differs only in how it pre-filters
7
+ * and orders the pairs it hands in, plus whether it sorts; the encoding itself
8
+ * (`encodeURIComponent(k)=encodeURIComponent(v)` joined by `&`) is identical.
9
+ *
10
+ * Dependency-free leaf module so any layer (build-time prerender hashing,
11
+ * runtime cache keys, client search-param serialization) can import it without
12
+ * pulling in cache/router internals.
13
+ */
14
+ export interface EncodeKVOptions {
15
+ /**
16
+ * Sort pairs by key in codepoint (byte) order before joining. Byte order via
17
+ * the `<` operator, NOT localeCompare, so the result is identical across
18
+ * Node, Workers, and browsers regardless of runtime locale.
19
+ *
20
+ * Defaults to false (insertion order preserved).
21
+ */
22
+ sort?: boolean;
23
+ }
24
+ /**
25
+ * Serialize an array of [key, value] pairs to a deterministic query string
26
+ * (no leading `?`). Both key and value are passed through encodeURIComponent
27
+ * so a key/value containing `&` or `=` cannot collide with a structurally
28
+ * different pair set.
29
+ *
30
+ * Callers are responsible for any filtering (e.g. dropping reserved params) and
31
+ * any value coercion (e.g. String(v), skipping null/undefined) BEFORE calling.
32
+ * This function never inspects or skips values; it encodes exactly what it is
33
+ * given so each call site keeps its own existing output.
34
+ */
35
+ export declare function encodeKV(pairs: Iterable<readonly [string, string]>, options?: EncodeKVOptions): string;
@@ -0,0 +1,226 @@
1
+ /**
2
+ * Custom error classes for Rango
3
+ *
4
+ * All errors include:
5
+ * - Descriptive names for easy identification
6
+ * - Cause property for structured debugging data
7
+ */
8
+ /**
9
+ * Options for error construction
10
+ */
11
+ interface ErrorOptions {
12
+ cause?: unknown;
13
+ }
14
+ /**
15
+ * Thrown when no route matches the requested pathname
16
+ */
17
+ export declare class RouteNotFoundError extends Error {
18
+ name: "RouteNotFoundError";
19
+ cause?: unknown;
20
+ constructor(message: string, options?: ErrorOptions);
21
+ }
22
+ export declare function isRouteNotFoundError(error: unknown): error is RouteNotFoundError;
23
+ /**
24
+ * Thrown when data is not found (e.g., product with ID doesn't exist)
25
+ * Use this in handlers/loaders to trigger the nearest notFoundBoundary
26
+ *
27
+ * @example
28
+ * ```typescript
29
+ * route("products.detail", async (ctx) => {
30
+ * const product = await db.products.get(ctx.params.slug);
31
+ * if (!product) throw new DataNotFoundError("Product not found");
32
+ * return <ProductDetail product={product} />;
33
+ * });
34
+ * ```
35
+ */
36
+ export declare class DataNotFoundError extends Error {
37
+ name: "DataNotFoundError";
38
+ cause?: unknown;
39
+ constructor(message?: string, options?: ErrorOptions);
40
+ }
41
+ /**
42
+ * Convenience function to throw a DataNotFoundError
43
+ * Shorter syntax for common not-found scenarios
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * const product = await db.products.get(slug);
48
+ * if (!product) throw notFound("Product not found");
49
+ * // or simply:
50
+ * if (!product) throw notFound();
51
+ * ```
52
+ */
53
+ export declare function notFound(message?: string): never;
54
+ /**
55
+ * Thrown when middleware execution fails
56
+ */
57
+ export declare class MiddlewareError extends Error {
58
+ name: "MiddlewareError";
59
+ cause?: unknown;
60
+ constructor(message: string, options?: ErrorOptions);
61
+ }
62
+ /**
63
+ * Thrown when a route handler fails
64
+ */
65
+ export declare class HandlerError extends Error {
66
+ name: "HandlerError";
67
+ cause?: unknown;
68
+ constructor(message: string, options?: ErrorOptions);
69
+ }
70
+ /**
71
+ * Thrown when segment building fails
72
+ */
73
+ export declare class BuildError extends Error {
74
+ name: "BuildError";
75
+ cause?: unknown;
76
+ constructor(message: string, options?: ErrorOptions);
77
+ }
78
+ /**
79
+ * Thrown when a route-definition DSL helper (route/layout/loader/cache/…) is
80
+ * called outside an active urls()/map() builder, so there is no
81
+ * AsyncLocalStorage build context to attach to. The message names the specific
82
+ * helper and how to fix it; the `cause` records the mechanical reason so the
83
+ * failure mode is identifiable (not conflated with an unrelated throw).
84
+ */
85
+ export declare class DslContextError extends Error {
86
+ name: "DslContextError";
87
+ cause?: unknown;
88
+ constructor(message: string, options?: ErrorOptions);
89
+ }
90
+ /**
91
+ * Thrown when a network request fails (server unreachable, no internet, etc.)
92
+ * This error triggers the root error boundary with retry capability.
93
+ *
94
+ * @example
95
+ * ```typescript
96
+ * try {
97
+ * await fetch(url);
98
+ * } catch (error) {
99
+ * if (error instanceof TypeError) {
100
+ * throw new NetworkError("Unable to connect to server", { cause: error });
101
+ * }
102
+ * throw error;
103
+ * }
104
+ * ```
105
+ */
106
+ export declare class NetworkError extends Error {
107
+ name: "NetworkError";
108
+ cause?: unknown;
109
+ /** The URL that failed to fetch */
110
+ url?: string;
111
+ /** Whether this was during an action, navigation, or revalidation */
112
+ operation?: "action" | "navigation" | "revalidation";
113
+ constructor(message?: string, options?: ErrorOptions & {
114
+ url?: string;
115
+ operation?: "action" | "navigation" | "revalidation";
116
+ });
117
+ }
118
+ /**
119
+ * Check if an error is a network-level failure (server unreachable, no internet)
120
+ * These are typically TypeError from fetch when the network request itself fails.
121
+ */
122
+ export declare function isNetworkError(error: unknown): boolean;
123
+ /**
124
+ * Structured error for JSON response routes.
125
+ * Thrown by handlers to return a typed error envelope with a specific HTTP status.
126
+ *
127
+ * Unlike standard Error, RouterError messages are always exposed to the client
128
+ * (the developer intentionally crafted them for consumers).
129
+ *
130
+ * @example
131
+ * ```typescript
132
+ * path("/products/:id", (ctx) => {
133
+ * const product = products.find(p => p.id === ctx.params.id);
134
+ * if (!product) throw new RouterError("NOT_FOUND", "Product not found", { status: 404 });
135
+ * return product;
136
+ * }, { name: "productDetail" })
137
+ * ```
138
+ */
139
+ export declare class RouterError extends Error {
140
+ name: "RouterError";
141
+ code: string;
142
+ status: number;
143
+ cause?: unknown;
144
+ constructor(code: string, message: string, options?: {
145
+ status?: number;
146
+ cause?: unknown;
147
+ });
148
+ }
149
+ /**
150
+ * Thrown inside a Prerender or Static handler at build time to signal
151
+ * "skip this entry, log it, and continue with the rest."
152
+ *
153
+ * When thrown, the entry is excluded from the pre-render manifest
154
+ * but the build continues normally. Regular throws (non-Skip)
155
+ * stop all further pre-rendering and fail the build.
156
+ *
157
+ * @example
158
+ * ```typescript
159
+ * export const BlogPost = Prerender(
160
+ * async () => allPosts.map(p => ({ slug: p.slug })),
161
+ * async (ctx) => {
162
+ * const post = await getPost(ctx.params.slug);
163
+ * if (post.draft) throw new Skip(`"${ctx.params.slug}" is a draft`);
164
+ * return <PostPage post={post} />;
165
+ * },
166
+ * );
167
+ * ```
168
+ */
169
+ export declare class Skip extends Error {
170
+ name: "Skip";
171
+ cause?: unknown;
172
+ constructor(message?: string, options?: ErrorOptions);
173
+ }
174
+ /**
175
+ * Type guard to check if a thrown value is a Skip signal.
176
+ */
177
+ export declare function isSkip(value: unknown): value is Skip;
178
+ /**
179
+ * Thrown by the partial updater when the server responds with a redirect payload
180
+ * that carries location state. Caught by navigate() to re-navigate to the
181
+ * redirect target with the server-set state merged into history.pushState.
182
+ *
183
+ * Not an Error subclass -- this is a control flow signal, not a failure.
184
+ */
185
+ export declare class ServerRedirect {
186
+ readonly url: string;
187
+ readonly state: Record<string, unknown> | undefined;
188
+ readonly name = "ServerRedirect";
189
+ constructor(url: string, state: Record<string, unknown> | undefined);
190
+ }
191
+ /**
192
+ * Thrown when route handler returns invalid type
193
+ */
194
+ export declare class InvalidHandlerError extends Error {
195
+ name: "InvalidHandlerError";
196
+ cause?: unknown;
197
+ constructor(message: string, options?: ErrorOptions);
198
+ }
199
+ /**
200
+ * Internal invariant assertion for development-time checks
201
+ *
202
+ * @internal
203
+ * @param condition - Condition that must be true
204
+ * @param message - Error message to throw if condition is false
205
+ * @throws {Error} If condition is false
206
+ *
207
+ * @example
208
+ * ```typescript
209
+ * invariant(user !== null, 'User must be defined');
210
+ * invariant(node.type === 'layout', `Expected layout, got ${node.type}`);
211
+ * ```
212
+ */
213
+ export declare function invariant(condition: any, message: string): asserts condition;
214
+ /**
215
+ * Sanitize errors for production - prevents leaking sensitive information
216
+ *
217
+ * SECURITY CRITICAL:
218
+ * - In production: NEVER send stack traces, file paths, or internal state
219
+ * - In development: Show full error details for debugging
220
+ * - ALWAYS consume error.stack to prevent memory leaks
221
+ *
222
+ * @param error - Error to sanitize
223
+ * @returns Response suitable for sending to client
224
+ */
225
+ export declare function sanitizeError(error: unknown): Response;
226
+ export {};
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Escape a JSON (or JSON-derived) string for safe embedding inside an HTML
3
+ * <script> element via dangerouslySetInnerHTML. Without this a value containing
4
+ * "</script>" closes the tag early — the rest of the page leaks as raw HTML, and
5
+ * in an executable script the trailing content runs. Escaping "<" defeats the
6
+ * early close; ">" and "&" are escaped for completeness so the serialized payload
7
+ * can never form HTML syntax. The result is still valid JSON and a valid JS
8
+ * string literal (\uXXXX escapes are legal in both) and re-parses identically.
9
+ *
10
+ * Used by every site that interpolates JSON.stringify(...) into inline <script>
11
+ * content: the JSON-LD meta descriptors (handles/MetaTags) and the FOUC theme
12
+ * init script (theme/theme-script).
13
+ */
14
+ export declare function escapeJsonForScript(json: string): string;
15
+ /**
16
+ * Escape an inline <script> body so it cannot terminate or corrupt the document.
17
+ * Two sequences are rewritten, each via a JS escape that is valid in string,
18
+ * template, regex (including the `u`/`v` flags), and JSON contexts — so the body
19
+ * still parses identically as code AND as JSON (application/json, ld+json):
20
+ * - "</script" -> "<\/script": stops a literal close tag inside the body from
21
+ * ending the element early. `\/` is a valid JSON escape and a valid regex escape.
22
+ * - "<!--": the "!" (U+0021) is emitted as a unicode escape (see the replacement
23
+ * string below), so the literal "<!--" token never reaches the HTML parser. A
24
+ * literal "<!--" puts the parser into the "script data escaped" state and a
25
+ * following "<script" into "script data DOUBLE escaped", where the real
26
+ * "</script>" no longer closes the element — `var x = "<!--<script>"` would
27
+ * swallow the rest of the document. The unicode-escape form decodes back to "!"
28
+ * in string/template/JSON/regex contexts, unlike "\!" (invalid JSON, invalid
29
+ * /u-regex escape).
30
+ * Real operators such as `a < b` and `a && b` are untouched (unlike
31
+ * escapeJsonForScript, which \u-escapes every "<", "&", ">").
32
+ *
33
+ * GUARANTEE / LIMITATION: value-preserving for the contexts where these sequences
34
+ * legitimately appear — string/template literals, regexes (incl. `u`/`v`), and
35
+ * JSON. It is NOT source-text-preserving (e.g. String.raw`</script>` sees the
36
+ * extra backslash), and it cannot rewrite "</script"/"<!--" that appear as bare
37
+ * code (a legacy `<!--` line comment, or `</script` outside any literal) — neither
38
+ * occurs in valid script payloads. Not a general sanitizer for arbitrary UNTRUSTED
39
+ * source; for untrusted dynamic data, JSON-encode it and read it back, rather than
40
+ * inlining it as code.
41
+ *
42
+ * Used by the Script handle's <Scripts> renderer for inline `children`.
43
+ */
44
+ export declare function escapeScriptBody(js: string): string;
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Handle definition for accumulating data across route segments.
3
+ *
4
+ * Handles allow server-side route handlers to pass accumulated data to client
5
+ * components. Unlike loaders (which fetch data for specific routes), handles
6
+ * accumulate data across all matched route segments.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * // Define a handle (name auto-generated from file + export).
11
+ * // Default collect is the identity: one array per segment that pushed.
12
+ * export const Breadcrumbs = createHandle<BreadcrumbItem, BreadcrumbItem[]>(
13
+ * (segments) => segments.flat(), // opt into a single flat list
14
+ * );
15
+ *
16
+ * // Use in handler
17
+ * const push = ctx.use(Breadcrumbs);
18
+ * push({ label: "Home", href: "/" });
19
+ *
20
+ * // Consume on client
21
+ * const crumbs = useHandle(Breadcrumbs);
22
+ * ```
23
+ */
24
+ export interface Handle<TData, TAccumulated = TData[][]> {
25
+ /**
26
+ * Brand to distinguish handles from loaders in ctx.use()
27
+ */
28
+ readonly __brand: "handle";
29
+ /**
30
+ * Auto-generated unique ID for this handle (used as key in storage)
31
+ * Format: "filePath#ExportName" in dev, "hash#ExportName" in production
32
+ */
33
+ readonly $$id: string;
34
+ }
35
+ export declare function getCollectFn(id: string): ((segments: unknown[][]) => unknown) | undefined;
36
+ /**
37
+ * Create a handle definition for accumulating data across route segments.
38
+ *
39
+ * The $$id is auto-generated by the Vite exposeInternalIds plugin based on
40
+ * file path and export name. No manual naming required.
41
+ *
42
+ * @param collect - Optional collect function. Default: pass the per-segment data
43
+ * through as-is (one array per segment that pushed, in segment order). Lossless,
44
+ * so a consumer can tell which/how-many segments contributed. Opt into a single
45
+ * flat list with `(segments) => segments.flat()`.
46
+ * @param __injectedId - Auto-injected by Vite plugin, do not provide manually
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * // Default: per-segment grouping, as-is
51
+ * export const Pushed = createHandle<string>();
52
+ * // Result type: string[][] (e.g. [["a"], ["b", "c"]])
53
+ *
54
+ * // Opt into a single flat list
55
+ * export const Breadcrumbs = createHandle<BreadcrumbItem, BreadcrumbItem[]>(
56
+ * (segments) => segments.flat()
57
+ * );
58
+ * // Result type: BreadcrumbItem[]
59
+ *
60
+ * // Custom: last value wins
61
+ * export const PageTitle = createHandle<string, string>(
62
+ * (segments) => segments.flat().at(-1) ?? "Default Title"
63
+ * );
64
+ * // Result type: string
65
+ *
66
+ * // Custom: object merge
67
+ * export const Meta = createHandle<Partial<MetaTags>, MetaTags>(
68
+ * (segments) => Object.assign({ robots: "index,follow" }, ...segments.flat())
69
+ * );
70
+ * // Result type: MetaTags
71
+ *
72
+ * // Custom: dedupe by href (TAccumulated must be given — a custom collect that
73
+ * // returns a flat array no longer matches the default TData[][])
74
+ * export const Breadcrumbs = createHandle<BreadcrumbItem, BreadcrumbItem[]>(
75
+ * (segments) => {
76
+ * const all = segments.flat();
77
+ * return all.filter((item, i) => all.findIndex(x => x.href === item.href) === i);
78
+ * }
79
+ * );
80
+ * ```
81
+ */
82
+ export declare function createHandle<TData, TAccumulated = TData[][]>(collect?: (segments: TData[][]) => TAccumulated, __injectedId?: string): Handle<TData, TAccumulated>;
83
+ export declare function isHandle(value: unknown): value is Handle<unknown, unknown>;
84
+ /**
85
+ * Collect handle data from a HandleData map, applying the handle's collect
86
+ * function over segments in order. Shared between server-side rendered()
87
+ * reads and client-side useHandle().
88
+ *
89
+ * @param handle - The handle to collect data for
90
+ * @param data - Full handle data map (handleName -> segmentId -> entries[])
91
+ * @param segmentOrder - Segment IDs in parent -> child resolution order
92
+ */
93
+ export declare function collectHandleData<TData, TAccumulated>(handle: Handle<TData, TAccumulated>, data: Record<string, Record<string, unknown[]>>, segmentOrder: string[]): TAccumulated;