@rangojs/router 0.0.0-experimental.124 → 0.0.0-experimental.125

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 (1009) hide show
  1. package/dist/bin/rango.js +3 -4
  2. package/dist/vite/index.js +9 -43
  3. package/package.json +1 -1
  4. package/skills/hooks/SKILL.md +2 -2
  5. package/skills/route/SKILL.md +6 -0
  6. package/src/__internal.ts +0 -65
  7. package/src/browser/action-coordinator.ts +1 -1
  8. package/src/browser/action-fence.ts +10 -0
  9. package/src/browser/event-controller.ts +1 -83
  10. package/src/browser/navigation-store-handle.ts +3 -4
  11. package/src/browser/navigation-store.ts +0 -39
  12. package/src/browser/navigation-transaction.ts +0 -32
  13. package/src/browser/partial-update.ts +1 -83
  14. package/src/browser/prefetch/cache.ts +6 -45
  15. package/src/browser/prefetch/queue.ts +6 -3
  16. package/src/browser/rango-state.ts +2 -23
  17. package/src/browser/react/Link.tsx +0 -2
  18. package/src/browser/react/NavigationProvider.tsx +2 -1
  19. package/src/browser/react/ScrollRestoration.tsx +10 -6
  20. package/src/browser/react/filter-segment-order.ts +0 -2
  21. package/src/browser/react/index.ts +0 -45
  22. package/src/browser/react/location-state-shared.ts +0 -13
  23. package/src/browser/react/location-state.ts +0 -1
  24. package/src/browser/react/use-action.ts +6 -15
  25. package/src/browser/react/use-handle.ts +0 -5
  26. package/src/browser/react/use-link-status.ts +0 -4
  27. package/src/browser/react/use-navigation.ts +0 -3
  28. package/src/browser/react/use-params.ts +0 -2
  29. package/src/browser/react/use-search-params.ts +0 -5
  30. package/src/browser/react/use-segments.ts +0 -13
  31. package/src/browser/rsc-router.tsx +2 -2
  32. package/src/browser/types.ts +0 -1
  33. package/src/browser/validate-redirect-origin.ts +4 -5
  34. package/src/build/route-trie.ts +3 -0
  35. package/src/build/route-types/param-extraction.ts +6 -3
  36. package/src/build/route-types/router-processing.ts +0 -8
  37. package/src/cache/cache-policy.ts +0 -54
  38. package/src/cache/cache-runtime.ts +27 -24
  39. package/src/cache/cache-scope.ts +0 -27
  40. package/src/cache/cache-tag.ts +0 -37
  41. package/src/cache/cf/cf-cache-store.ts +72 -45
  42. package/src/cache/cf/index.ts +0 -24
  43. package/src/cache/document-cache.ts +0 -36
  44. package/src/cache/handle-snapshot.ts +0 -40
  45. package/src/cache/index.ts +0 -27
  46. package/src/cache/memory-segment-store.ts +0 -52
  47. package/src/cache/profile-registry.ts +7 -3
  48. package/src/cache/read-through-swr.ts +41 -11
  49. package/src/cache/segment-codec.ts +0 -16
  50. package/src/cache/types.ts +0 -98
  51. package/src/client.rsc.tsx +1 -22
  52. package/src/client.tsx +14 -32
  53. package/src/deps/ssr.ts +0 -1
  54. package/src/handle.ts +2 -12
  55. package/src/handles/MetaTags.tsx +0 -14
  56. package/src/handles/meta.ts +0 -39
  57. package/src/host/cookie-handler.ts +0 -36
  58. package/src/host/errors.ts +0 -24
  59. package/src/host/index.ts +6 -0
  60. package/src/host/pattern-matcher.ts +7 -50
  61. package/src/host/router.ts +1 -65
  62. package/src/host/testing.ts +0 -16
  63. package/src/host/types.ts +6 -2
  64. package/src/href-client.ts +0 -4
  65. package/src/index.rsc.ts +20 -2
  66. package/src/internal-debug.ts +2 -4
  67. package/src/loader.rsc.ts +4 -15
  68. package/src/loader.ts +3 -9
  69. package/src/network-error-thrower.tsx +1 -6
  70. package/src/outlet-provider.tsx +1 -5
  71. package/src/prerender/param-hash.ts +10 -11
  72. package/src/prerender/store.ts +23 -30
  73. package/src/prerender.ts +34 -0
  74. package/src/root-error-boundary.tsx +1 -19
  75. package/src/route-content-wrapper.tsx +1 -44
  76. package/src/route-definition/dsl-helpers.ts +7 -19
  77. package/src/route-definition/helpers-types.ts +3 -3
  78. package/src/route-definition/redirect.ts +11 -1
  79. package/src/route-map-builder.ts +0 -16
  80. package/src/router/content-negotiation.ts +0 -13
  81. package/src/router/error-handling.ts +12 -16
  82. package/src/router/find-match.ts +4 -30
  83. package/src/router/intercept-resolution.ts +10 -1
  84. package/src/router/lazy-includes.ts +1 -57
  85. package/src/router/loader-resolution.ts +3 -2
  86. package/src/router/logging.ts +0 -6
  87. package/src/router/manifest.ts +1 -25
  88. package/src/router/match-api.ts +0 -20
  89. package/src/router/match-context.ts +0 -22
  90. package/src/router/match-handlers.ts +0 -43
  91. package/src/router/match-middleware/background-revalidation.ts +0 -7
  92. package/src/router/match-middleware/cache-lookup.ts +1 -54
  93. package/src/router/match-middleware/cache-store.ts +0 -31
  94. package/src/router/match-middleware/intercept-resolution.ts +0 -22
  95. package/src/router/match-middleware/segment-resolution.ts +0 -21
  96. package/src/router/match-pipelines.ts +1 -42
  97. package/src/router/match-result.ts +1 -52
  98. package/src/router/metrics.ts +0 -34
  99. package/src/router/middleware-cookies.ts +0 -13
  100. package/src/router/middleware-types.ts +0 -115
  101. package/src/router/middleware.ts +7 -30
  102. package/src/router/navigation-snapshot.ts +0 -51
  103. package/src/router/params-util.ts +23 -0
  104. package/src/router/pattern-matching.ts +1 -33
  105. package/src/router/prerender-match.ts +29 -45
  106. package/src/router/request-classification.ts +1 -38
  107. package/src/router/revalidation.ts +5 -58
  108. package/src/router/router-context.ts +0 -26
  109. package/src/router/segment-resolution/fresh.ts +25 -57
  110. package/src/router/segment-resolution/helpers.ts +34 -0
  111. package/src/router/segment-resolution/loader-cache.ts +10 -13
  112. package/src/router/segment-resolution/revalidation.ts +5 -42
  113. package/src/router/segment-resolution/streamed-handler-telemetry.ts +52 -0
  114. package/src/router/segment-resolution.ts +4 -1
  115. package/src/router/telemetry-otel.ts +0 -20
  116. package/src/router/telemetry.ts +0 -22
  117. package/src/router/timeout.ts +0 -20
  118. package/src/router/trie-matching.ts +63 -40
  119. package/src/router/types.ts +1 -63
  120. package/src/router/url-params.ts +0 -5
  121. package/src/router.ts +4 -2
  122. package/src/rsc/handler.ts +11 -2
  123. package/src/rsc/helpers.ts +15 -0
  124. package/src/rsc/origin-guard.ts +0 -12
  125. package/src/rsc/progressive-enhancement.ts +2 -1
  126. package/src/rsc/rsc-rendering.ts +2 -7
  127. package/src/rsc/runtime-warnings.ts +14 -0
  128. package/src/rsc/server-action.ts +30 -28
  129. package/src/rsc/types.ts +0 -1
  130. package/src/search-params.ts +0 -16
  131. package/src/segment-loader-promise.ts +14 -2
  132. package/src/segment-system.tsx +79 -88
  133. package/src/server/handle-store.ts +7 -24
  134. package/src/server/loader-registry.ts +5 -24
  135. package/src/server/request-context.ts +6 -78
  136. package/src/ssr/index.tsx +14 -14
  137. package/src/static-handler.ts +2 -27
  138. package/src/testing/cache-status.ts +0 -47
  139. package/src/testing/collect-handle.ts +1 -24
  140. package/src/testing/e2e/index.ts +0 -22
  141. package/src/testing/e2e/matchers.ts +0 -16
  142. package/src/testing/flight-matchers.ts +0 -13
  143. package/src/testing/flight-normalize.ts +3 -30
  144. package/src/testing/flight.ts +0 -48
  145. package/src/testing/generated-routes.ts +1 -41
  146. package/src/testing/index.ts +0 -21
  147. package/src/testing/internal/context.ts +3 -45
  148. package/src/testing/internal/seed-vars.ts +0 -26
  149. package/src/testing/render-handler.ts +0 -49
  150. package/src/testing/render-route.tsx +0 -90
  151. package/src/testing/run-loader.ts +0 -96
  152. package/src/testing/run-middleware.ts +0 -26
  153. package/src/theme/ThemeProvider.tsx +0 -52
  154. package/src/theme/ThemeScript.tsx +0 -6
  155. package/src/theme/constants.ts +0 -12
  156. package/src/theme/index.ts +0 -7
  157. package/src/theme/theme-context.ts +1 -5
  158. package/src/theme/theme-script.ts +0 -14
  159. package/src/theme/use-theme.ts +0 -3
  160. package/src/types/boundaries.ts +0 -35
  161. package/src/types/error-types.ts +25 -89
  162. package/src/types/global-namespace.ts +4 -14
  163. package/src/types/handler-context.ts +0 -8
  164. package/src/types/index.ts +0 -10
  165. package/src/types/request-scope.ts +0 -19
  166. package/src/types/route-config.ts +6 -50
  167. package/src/types/route-entry.ts +0 -6
  168. package/src/types/segments.ts +0 -13
  169. package/src/urls/include-helper.ts +0 -4
  170. package/src/urls/index.ts +0 -6
  171. package/src/urls/path-helper-types.ts +2 -2
  172. package/src/urls/path-helper.ts +0 -54
  173. package/src/urls/urls-function.ts +0 -13
  174. package/src/use-loader.tsx +0 -186
  175. package/src/vite/discovery/bundle-postprocess.ts +2 -1
  176. package/src/vite/discovery/discover-routers.ts +6 -7
  177. package/src/vite/discovery/virtual-module-codegen.ts +1 -11
  178. package/src/vite/plugin-types.ts +3 -1
  179. package/src/vite/plugins/cjs-to-esm.ts +0 -11
  180. package/src/vite/plugins/client-ref-dedup.ts +0 -11
  181. package/src/vite/plugins/client-ref-hashing.ts +0 -10
  182. package/src/vite/plugins/cloudflare-protocol-stub.ts +0 -20
  183. package/src/vite/plugins/expose-action-id.ts +2 -73
  184. package/src/vite/plugins/expose-id-utils.ts +0 -55
  185. package/src/vite/plugins/expose-ids/export-analysis.ts +0 -38
  186. package/src/vite/plugins/expose-ids/handler-transform.ts +0 -15
  187. package/src/vite/plugins/expose-ids/loader-transform.ts +0 -15
  188. package/src/vite/plugins/expose-ids/router-transform.ts +0 -13
  189. package/src/vite/plugins/expose-internal-ids.ts +10 -0
  190. package/src/vite/plugins/performance-tracks.ts +0 -3
  191. package/src/vite/plugins/use-cache-transform.ts +0 -36
  192. package/src/vite/plugins/version-injector.ts +0 -20
  193. package/src/vite/plugins/version-plugin.ts +1 -49
  194. package/src/vite/plugins/virtual-entries.ts +0 -15
  195. package/src/vite/rango.ts +1 -108
  196. package/src/vite/router-discovery.ts +2 -1
  197. package/src/vite/utils/ast-handler-extract.ts +0 -16
  198. package/src/vite/utils/bundle-analysis.ts +6 -13
  199. package/src/vite/utils/client-chunks.ts +0 -6
  200. package/src/vite/utils/forward-user-plugins.ts +0 -22
  201. package/src/vite/utils/manifest-utils.ts +0 -4
  202. package/src/vite/utils/package-resolution.ts +1 -73
  203. package/src/vite/utils/prerender-utils.ts +0 -35
  204. package/src/vite/utils/shared-utils.ts +3 -35
  205. package/dist/__internal.d.ts +0 -83
  206. package/dist/__internal.d.ts.map +0 -1
  207. package/dist/__internal.js +0 -19
  208. package/dist/__internal.js.map +0 -1
  209. package/dist/__mocks__/version.d.ts +0 -7
  210. package/dist/__mocks__/version.d.ts.map +0 -1
  211. package/dist/__mocks__/version.js +0 -7
  212. package/dist/__mocks__/version.js.map +0 -1
  213. package/dist/__tests__/client-href.test.d.ts +0 -2
  214. package/dist/__tests__/client-href.test.d.ts.map +0 -1
  215. package/dist/__tests__/client-href.test.js +0 -74
  216. package/dist/__tests__/client-href.test.js.map +0 -1
  217. package/dist/__tests__/component-utils.test.d.ts +0 -2
  218. package/dist/__tests__/component-utils.test.d.ts.map +0 -1
  219. package/dist/__tests__/component-utils.test.js +0 -51
  220. package/dist/__tests__/component-utils.test.js.map +0 -1
  221. package/dist/__tests__/event-controller.test.d.ts +0 -2
  222. package/dist/__tests__/event-controller.test.d.ts.map +0 -1
  223. package/dist/__tests__/event-controller.test.js +0 -538
  224. package/dist/__tests__/event-controller.test.js.map +0 -1
  225. package/dist/__tests__/helpers/route-tree.d.ts +0 -118
  226. package/dist/__tests__/helpers/route-tree.d.ts.map +0 -1
  227. package/dist/__tests__/helpers/route-tree.js +0 -374
  228. package/dist/__tests__/helpers/route-tree.js.map +0 -1
  229. package/dist/__tests__/match-result.test.d.ts +0 -2
  230. package/dist/__tests__/match-result.test.d.ts.map +0 -1
  231. package/dist/__tests__/match-result.test.js +0 -154
  232. package/dist/__tests__/match-result.test.js.map +0 -1
  233. package/dist/__tests__/navigation-store.test.d.ts +0 -2
  234. package/dist/__tests__/navigation-store.test.d.ts.map +0 -1
  235. package/dist/__tests__/navigation-store.test.js +0 -440
  236. package/dist/__tests__/navigation-store.test.js.map +0 -1
  237. package/dist/__tests__/partial-update.test.d.ts +0 -2
  238. package/dist/__tests__/partial-update.test.d.ts.map +0 -1
  239. package/dist/__tests__/partial-update.test.js +0 -1009
  240. package/dist/__tests__/partial-update.test.js.map +0 -1
  241. package/dist/__tests__/reverse-types.test.d.ts +0 -8
  242. package/dist/__tests__/reverse-types.test.d.ts.map +0 -1
  243. package/dist/__tests__/reverse-types.test.js +0 -656
  244. package/dist/__tests__/reverse-types.test.js.map +0 -1
  245. package/dist/__tests__/route-definition.test.d.ts +0 -2
  246. package/dist/__tests__/route-definition.test.d.ts.map +0 -1
  247. package/dist/__tests__/route-definition.test.js +0 -55
  248. package/dist/__tests__/route-definition.test.js.map +0 -1
  249. package/dist/__tests__/router-helpers.test.d.ts +0 -2
  250. package/dist/__tests__/router-helpers.test.d.ts.map +0 -1
  251. package/dist/__tests__/router-helpers.test.js +0 -377
  252. package/dist/__tests__/router-helpers.test.js.map +0 -1
  253. package/dist/__tests__/router-integration-2.test.d.ts +0 -2
  254. package/dist/__tests__/router-integration-2.test.d.ts.map +0 -1
  255. package/dist/__tests__/router-integration-2.test.js +0 -426
  256. package/dist/__tests__/router-integration-2.test.js.map +0 -1
  257. package/dist/__tests__/router-integration.test.d.ts +0 -2
  258. package/dist/__tests__/router-integration.test.d.ts.map +0 -1
  259. package/dist/__tests__/router-integration.test.js +0 -1051
  260. package/dist/__tests__/router-integration.test.js.map +0 -1
  261. package/dist/__tests__/search-params.test.d.ts +0 -5
  262. package/dist/__tests__/search-params.test.d.ts.map +0 -1
  263. package/dist/__tests__/search-params.test.js +0 -306
  264. package/dist/__tests__/search-params.test.js.map +0 -1
  265. package/dist/__tests__/segment-system.test.d.ts +0 -2
  266. package/dist/__tests__/segment-system.test.d.ts.map +0 -1
  267. package/dist/__tests__/segment-system.test.js +0 -627
  268. package/dist/__tests__/segment-system.test.js.map +0 -1
  269. package/dist/__tests__/static-handler-types.test.d.ts +0 -8
  270. package/dist/__tests__/static-handler-types.test.d.ts.map +0 -1
  271. package/dist/__tests__/static-handler-types.test.js +0 -63
  272. package/dist/__tests__/static-handler-types.test.js.map +0 -1
  273. package/dist/__tests__/urls.test.d.ts +0 -2
  274. package/dist/__tests__/urls.test.d.ts.map +0 -1
  275. package/dist/__tests__/urls.test.js +0 -421
  276. package/dist/__tests__/urls.test.js.map +0 -1
  277. package/dist/__tests__/use-mount.test.d.ts +0 -2
  278. package/dist/__tests__/use-mount.test.d.ts.map +0 -1
  279. package/dist/__tests__/use-mount.test.js +0 -35
  280. package/dist/__tests__/use-mount.test.js.map +0 -1
  281. package/dist/bin/rango.d.ts +0 -2
  282. package/dist/bin/rango.d.ts.map +0 -1
  283. package/dist/bin/rango.js.map +0 -1
  284. package/dist/browser/event-controller.d.ts +0 -191
  285. package/dist/browser/event-controller.d.ts.map +0 -1
  286. package/dist/browser/event-controller.js +0 -559
  287. package/dist/browser/event-controller.js.map +0 -1
  288. package/dist/browser/index.d.ts +0 -2
  289. package/dist/browser/index.d.ts.map +0 -1
  290. package/dist/browser/index.js +0 -14
  291. package/dist/browser/index.js.map +0 -1
  292. package/dist/browser/link-interceptor.d.ts +0 -38
  293. package/dist/browser/link-interceptor.d.ts.map +0 -1
  294. package/dist/browser/link-interceptor.js +0 -99
  295. package/dist/browser/link-interceptor.js.map +0 -1
  296. package/dist/browser/logging.d.ts +0 -10
  297. package/dist/browser/logging.d.ts.map +0 -1
  298. package/dist/browser/logging.js +0 -29
  299. package/dist/browser/logging.js.map +0 -1
  300. package/dist/browser/lru-cache.d.ts +0 -17
  301. package/dist/browser/lru-cache.d.ts.map +0 -1
  302. package/dist/browser/lru-cache.js +0 -50
  303. package/dist/browser/lru-cache.js.map +0 -1
  304. package/dist/browser/merge-segment-loaders.d.ts +0 -39
  305. package/dist/browser/merge-segment-loaders.d.ts.map +0 -1
  306. package/dist/browser/merge-segment-loaders.js +0 -102
  307. package/dist/browser/merge-segment-loaders.js.map +0 -1
  308. package/dist/browser/navigation-bridge.d.ts +0 -102
  309. package/dist/browser/navigation-bridge.d.ts.map +0 -1
  310. package/dist/browser/navigation-bridge.js +0 -708
  311. package/dist/browser/navigation-bridge.js.map +0 -1
  312. package/dist/browser/navigation-client.d.ts +0 -25
  313. package/dist/browser/navigation-client.d.ts.map +0 -1
  314. package/dist/browser/navigation-client.js +0 -157
  315. package/dist/browser/navigation-client.js.map +0 -1
  316. package/dist/browser/navigation-store.d.ts +0 -101
  317. package/dist/browser/navigation-store.d.ts.map +0 -1
  318. package/dist/browser/navigation-store.js +0 -625
  319. package/dist/browser/navigation-store.js.map +0 -1
  320. package/dist/browser/partial-update.d.ts +0 -75
  321. package/dist/browser/partial-update.d.ts.map +0 -1
  322. package/dist/browser/partial-update.js +0 -426
  323. package/dist/browser/partial-update.js.map +0 -1
  324. package/dist/browser/react/Link.d.ts +0 -86
  325. package/dist/browser/react/Link.d.ts.map +0 -1
  326. package/dist/browser/react/Link.js +0 -128
  327. package/dist/browser/react/Link.js.map +0 -1
  328. package/dist/browser/react/NavigationProvider.d.ts +0 -63
  329. package/dist/browser/react/NavigationProvider.d.ts.map +0 -1
  330. package/dist/browser/react/NavigationProvider.js +0 -216
  331. package/dist/browser/react/NavigationProvider.js.map +0 -1
  332. package/dist/browser/react/ScrollRestoration.d.ts +0 -75
  333. package/dist/browser/react/ScrollRestoration.d.ts.map +0 -1
  334. package/dist/browser/react/ScrollRestoration.js +0 -57
  335. package/dist/browser/react/ScrollRestoration.js.map +0 -1
  336. package/dist/browser/react/context.d.ts +0 -46
  337. package/dist/browser/react/context.d.ts.map +0 -1
  338. package/dist/browser/react/context.js +0 -10
  339. package/dist/browser/react/context.js.map +0 -1
  340. package/dist/browser/react/index.d.ts +0 -11
  341. package/dist/browser/react/index.d.ts.map +0 -1
  342. package/dist/browser/react/index.js +0 -22
  343. package/dist/browser/react/index.js.map +0 -1
  344. package/dist/browser/react/location-state-shared.d.ts +0 -63
  345. package/dist/browser/react/location-state-shared.d.ts.map +0 -1
  346. package/dist/browser/react/location-state-shared.js +0 -81
  347. package/dist/browser/react/location-state-shared.js.map +0 -1
  348. package/dist/browser/react/location-state.d.ts +0 -23
  349. package/dist/browser/react/location-state.d.ts.map +0 -1
  350. package/dist/browser/react/location-state.js +0 -29
  351. package/dist/browser/react/location-state.js.map +0 -1
  352. package/dist/browser/react/mount-context.d.ts +0 -24
  353. package/dist/browser/react/mount-context.d.ts.map +0 -1
  354. package/dist/browser/react/mount-context.js +0 -24
  355. package/dist/browser/react/mount-context.js.map +0 -1
  356. package/dist/browser/react/use-action.d.ts +0 -64
  357. package/dist/browser/react/use-action.d.ts.map +0 -1
  358. package/dist/browser/react/use-action.js +0 -134
  359. package/dist/browser/react/use-action.js.map +0 -1
  360. package/dist/browser/react/use-client-cache.d.ts +0 -41
  361. package/dist/browser/react/use-client-cache.d.ts.map +0 -1
  362. package/dist/browser/react/use-client-cache.js +0 -39
  363. package/dist/browser/react/use-client-cache.js.map +0 -1
  364. package/dist/browser/react/use-handle.d.ts +0 -31
  365. package/dist/browser/react/use-handle.d.ts.map +0 -1
  366. package/dist/browser/react/use-handle.js +0 -144
  367. package/dist/browser/react/use-handle.js.map +0 -1
  368. package/dist/browser/react/use-href.d.ts +0 -33
  369. package/dist/browser/react/use-href.d.ts.map +0 -1
  370. package/dist/browser/react/use-href.js +0 -39
  371. package/dist/browser/react/use-href.js.map +0 -1
  372. package/dist/browser/react/use-link-status.d.ts +0 -37
  373. package/dist/browser/react/use-link-status.d.ts.map +0 -1
  374. package/dist/browser/react/use-link-status.js +0 -99
  375. package/dist/browser/react/use-link-status.js.map +0 -1
  376. package/dist/browser/react/use-mount.d.ts +0 -25
  377. package/dist/browser/react/use-mount.d.ts.map +0 -1
  378. package/dist/browser/react/use-mount.js +0 -30
  379. package/dist/browser/react/use-mount.js.map +0 -1
  380. package/dist/browser/react/use-navigation.d.ts +0 -27
  381. package/dist/browser/react/use-navigation.d.ts.map +0 -1
  382. package/dist/browser/react/use-navigation.js +0 -87
  383. package/dist/browser/react/use-navigation.js.map +0 -1
  384. package/dist/browser/react/use-segments.d.ts +0 -38
  385. package/dist/browser/react/use-segments.d.ts.map +0 -1
  386. package/dist/browser/react/use-segments.js +0 -130
  387. package/dist/browser/react/use-segments.js.map +0 -1
  388. package/dist/browser/request-controller.d.ts +0 -26
  389. package/dist/browser/request-controller.d.ts.map +0 -1
  390. package/dist/browser/request-controller.js +0 -147
  391. package/dist/browser/request-controller.js.map +0 -1
  392. package/dist/browser/rsc-router.d.ts +0 -129
  393. package/dist/browser/rsc-router.d.ts.map +0 -1
  394. package/dist/browser/rsc-router.js +0 -195
  395. package/dist/browser/rsc-router.js.map +0 -1
  396. package/dist/browser/scroll-restoration.d.ts +0 -93
  397. package/dist/browser/scroll-restoration.d.ts.map +0 -1
  398. package/dist/browser/scroll-restoration.js +0 -321
  399. package/dist/browser/scroll-restoration.js.map +0 -1
  400. package/dist/browser/segment-structure-assert.d.ts +0 -17
  401. package/dist/browser/segment-structure-assert.d.ts.map +0 -1
  402. package/dist/browser/segment-structure-assert.js +0 -59
  403. package/dist/browser/segment-structure-assert.js.map +0 -1
  404. package/dist/browser/server-action-bridge.d.ts +0 -26
  405. package/dist/browser/server-action-bridge.d.ts.map +0 -1
  406. package/dist/browser/server-action-bridge.js +0 -668
  407. package/dist/browser/server-action-bridge.js.map +0 -1
  408. package/dist/browser/shallow.d.ts +0 -12
  409. package/dist/browser/shallow.d.ts.map +0 -1
  410. package/dist/browser/shallow.js +0 -34
  411. package/dist/browser/shallow.js.map +0 -1
  412. package/dist/browser/types.d.ts +0 -369
  413. package/dist/browser/types.d.ts.map +0 -1
  414. package/dist/browser/types.js +0 -2
  415. package/dist/browser/types.js.map +0 -1
  416. package/dist/build/__tests__/generate-cli.test.d.ts +0 -2
  417. package/dist/build/__tests__/generate-cli.test.d.ts.map +0 -1
  418. package/dist/build/__tests__/generate-cli.test.js +0 -237
  419. package/dist/build/__tests__/generate-cli.test.js.map +0 -1
  420. package/dist/build/__tests__/generate-manifest.test.d.ts +0 -2
  421. package/dist/build/__tests__/generate-manifest.test.d.ts.map +0 -1
  422. package/dist/build/__tests__/generate-manifest.test.js +0 -119
  423. package/dist/build/__tests__/generate-manifest.test.js.map +0 -1
  424. package/dist/build/__tests__/generate-route-types.test.d.ts +0 -2
  425. package/dist/build/__tests__/generate-route-types.test.d.ts.map +0 -1
  426. package/dist/build/__tests__/generate-route-types.test.js +0 -620
  427. package/dist/build/__tests__/generate-route-types.test.js.map +0 -1
  428. package/dist/build/__tests__/per-router-manifest.test.d.ts +0 -2
  429. package/dist/build/__tests__/per-router-manifest.test.d.ts.map +0 -1
  430. package/dist/build/__tests__/per-router-manifest.test.js +0 -308
  431. package/dist/build/__tests__/per-router-manifest.test.js.map +0 -1
  432. package/dist/build/generate-manifest.d.ts +0 -81
  433. package/dist/build/generate-manifest.d.ts.map +0 -1
  434. package/dist/build/generate-manifest.js +0 -276
  435. package/dist/build/generate-manifest.js.map +0 -1
  436. package/dist/build/generate-route-types.d.ts +0 -115
  437. package/dist/build/generate-route-types.d.ts.map +0 -1
  438. package/dist/build/generate-route-types.js +0 -740
  439. package/dist/build/generate-route-types.js.map +0 -1
  440. package/dist/build/index.d.ts +0 -21
  441. package/dist/build/index.d.ts.map +0 -1
  442. package/dist/build/index.js +0 -21
  443. package/dist/build/index.js.map +0 -1
  444. package/dist/build/route-trie.d.ts +0 -71
  445. package/dist/build/route-trie.d.ts.map +0 -1
  446. package/dist/build/route-trie.js +0 -175
  447. package/dist/build/route-trie.js.map +0 -1
  448. package/dist/cache/__tests__/cache-scope.test.d.ts +0 -2
  449. package/dist/cache/__tests__/cache-scope.test.d.ts.map +0 -1
  450. package/dist/cache/__tests__/cache-scope.test.js +0 -208
  451. package/dist/cache/__tests__/cache-scope.test.js.map +0 -1
  452. package/dist/cache/__tests__/document-cache.test.d.ts +0 -2
  453. package/dist/cache/__tests__/document-cache.test.d.ts.map +0 -1
  454. package/dist/cache/__tests__/document-cache.test.js +0 -345
  455. package/dist/cache/__tests__/document-cache.test.js.map +0 -1
  456. package/dist/cache/__tests__/memory-segment-store.test.d.ts +0 -2
  457. package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +0 -1
  458. package/dist/cache/__tests__/memory-segment-store.test.js +0 -425
  459. package/dist/cache/__tests__/memory-segment-store.test.js.map +0 -1
  460. package/dist/cache/__tests__/memory-store.test.d.ts +0 -2
  461. package/dist/cache/__tests__/memory-store.test.d.ts.map +0 -1
  462. package/dist/cache/__tests__/memory-store.test.js +0 -367
  463. package/dist/cache/__tests__/memory-store.test.js.map +0 -1
  464. package/dist/cache/cache-scope.d.ts +0 -102
  465. package/dist/cache/cache-scope.d.ts.map +0 -1
  466. package/dist/cache/cache-scope.js +0 -440
  467. package/dist/cache/cache-scope.js.map +0 -1
  468. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +0 -2
  469. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +0 -1
  470. package/dist/cache/cf/__tests__/cf-cache-store.test.js +0 -330
  471. package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +0 -1
  472. package/dist/cache/cf/cf-cache-store.d.ts +0 -165
  473. package/dist/cache/cf/cf-cache-store.d.ts.map +0 -1
  474. package/dist/cache/cf/cf-cache-store.js +0 -242
  475. package/dist/cache/cf/cf-cache-store.js.map +0 -1
  476. package/dist/cache/cf/index.d.ts +0 -14
  477. package/dist/cache/cf/index.d.ts.map +0 -1
  478. package/dist/cache/cf/index.js +0 -17
  479. package/dist/cache/cf/index.js.map +0 -1
  480. package/dist/cache/document-cache.d.ts +0 -64
  481. package/dist/cache/document-cache.d.ts.map +0 -1
  482. package/dist/cache/document-cache.js +0 -228
  483. package/dist/cache/document-cache.js.map +0 -1
  484. package/dist/cache/index.d.ts +0 -19
  485. package/dist/cache/index.d.ts.map +0 -1
  486. package/dist/cache/index.js +0 -21
  487. package/dist/cache/index.js.map +0 -1
  488. package/dist/cache/memory-segment-store.d.ts +0 -110
  489. package/dist/cache/memory-segment-store.d.ts.map +0 -1
  490. package/dist/cache/memory-segment-store.js +0 -117
  491. package/dist/cache/memory-segment-store.js.map +0 -1
  492. package/dist/cache/memory-store.d.ts +0 -41
  493. package/dist/cache/memory-store.d.ts.map +0 -1
  494. package/dist/cache/memory-store.js +0 -191
  495. package/dist/cache/memory-store.js.map +0 -1
  496. package/dist/cache/types.d.ts +0 -317
  497. package/dist/cache/types.d.ts.map +0 -1
  498. package/dist/cache/types.js +0 -12
  499. package/dist/cache/types.js.map +0 -1
  500. package/dist/client.d.ts +0 -248
  501. package/dist/client.d.ts.map +0 -1
  502. package/dist/client.js +0 -367
  503. package/dist/client.js.map +0 -1
  504. package/dist/client.rsc.d.ts +0 -26
  505. package/dist/client.rsc.d.ts.map +0 -1
  506. package/dist/client.rsc.js +0 -46
  507. package/dist/client.rsc.js.map +0 -1
  508. package/dist/component-utils.d.ts +0 -36
  509. package/dist/component-utils.d.ts.map +0 -1
  510. package/dist/component-utils.js +0 -61
  511. package/dist/component-utils.js.map +0 -1
  512. package/dist/components/DefaultDocument.d.ts +0 -13
  513. package/dist/components/DefaultDocument.d.ts.map +0 -1
  514. package/dist/components/DefaultDocument.js +0 -15
  515. package/dist/components/DefaultDocument.js.map +0 -1
  516. package/dist/debug.d.ts +0 -58
  517. package/dist/debug.d.ts.map +0 -1
  518. package/dist/debug.js +0 -157
  519. package/dist/debug.js.map +0 -1
  520. package/dist/default-error-boundary.d.ts +0 -11
  521. package/dist/default-error-boundary.d.ts.map +0 -1
  522. package/dist/default-error-boundary.js +0 -45
  523. package/dist/default-error-boundary.js.map +0 -1
  524. package/dist/deps/browser.d.ts +0 -2
  525. package/dist/deps/browser.d.ts.map +0 -1
  526. package/dist/deps/browser.js +0 -3
  527. package/dist/deps/browser.js.map +0 -1
  528. package/dist/deps/html-stream-client.d.ts +0 -2
  529. package/dist/deps/html-stream-client.d.ts.map +0 -1
  530. package/dist/deps/html-stream-client.js +0 -3
  531. package/dist/deps/html-stream-client.js.map +0 -1
  532. package/dist/deps/html-stream-server.d.ts +0 -2
  533. package/dist/deps/html-stream-server.d.ts.map +0 -1
  534. package/dist/deps/html-stream-server.js +0 -3
  535. package/dist/deps/html-stream-server.js.map +0 -1
  536. package/dist/deps/rsc.d.ts +0 -2
  537. package/dist/deps/rsc.d.ts.map +0 -1
  538. package/dist/deps/rsc.js +0 -4
  539. package/dist/deps/rsc.js.map +0 -1
  540. package/dist/deps/ssr.d.ts +0 -2
  541. package/dist/deps/ssr.d.ts.map +0 -1
  542. package/dist/deps/ssr.js +0 -3
  543. package/dist/deps/ssr.js.map +0 -1
  544. package/dist/errors.d.ts +0 -174
  545. package/dist/errors.d.ts.map +0 -1
  546. package/dist/errors.js +0 -241
  547. package/dist/errors.js.map +0 -1
  548. package/dist/handle.d.ts +0 -78
  549. package/dist/handle.d.ts.map +0 -1
  550. package/dist/handle.js +0 -82
  551. package/dist/handle.js.map +0 -1
  552. package/dist/handles/MetaTags.d.ts +0 -14
  553. package/dist/handles/MetaTags.d.ts.map +0 -1
  554. package/dist/handles/MetaTags.js +0 -136
  555. package/dist/handles/MetaTags.js.map +0 -1
  556. package/dist/handles/index.d.ts +0 -6
  557. package/dist/handles/index.d.ts.map +0 -1
  558. package/dist/handles/index.js +0 -6
  559. package/dist/handles/index.js.map +0 -1
  560. package/dist/handles/meta.d.ts +0 -39
  561. package/dist/handles/meta.d.ts.map +0 -1
  562. package/dist/handles/meta.js +0 -202
  563. package/dist/handles/meta.js.map +0 -1
  564. package/dist/host/__tests__/errors.test.d.ts +0 -2
  565. package/dist/host/__tests__/errors.test.d.ts.map +0 -1
  566. package/dist/host/__tests__/errors.test.js +0 -76
  567. package/dist/host/__tests__/errors.test.js.map +0 -1
  568. package/dist/host/__tests__/pattern-comprehensive.test.d.ts +0 -2
  569. package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +0 -1
  570. package/dist/host/__tests__/pattern-comprehensive.test.js +0 -732
  571. package/dist/host/__tests__/pattern-comprehensive.test.js.map +0 -1
  572. package/dist/host/__tests__/pattern-matcher.test.d.ts +0 -2
  573. package/dist/host/__tests__/pattern-matcher.test.d.ts.map +0 -1
  574. package/dist/host/__tests__/pattern-matcher.test.js +0 -251
  575. package/dist/host/__tests__/pattern-matcher.test.js.map +0 -1
  576. package/dist/host/__tests__/router.test.d.ts +0 -2
  577. package/dist/host/__tests__/router.test.d.ts.map +0 -1
  578. package/dist/host/__tests__/router.test.js +0 -241
  579. package/dist/host/__tests__/router.test.js.map +0 -1
  580. package/dist/host/__tests__/testing.test.d.ts +0 -2
  581. package/dist/host/__tests__/testing.test.d.ts.map +0 -1
  582. package/dist/host/__tests__/testing.test.js +0 -64
  583. package/dist/host/__tests__/testing.test.js.map +0 -1
  584. package/dist/host/__tests__/utils.test.d.ts +0 -2
  585. package/dist/host/__tests__/utils.test.d.ts.map +0 -1
  586. package/dist/host/__tests__/utils.test.js +0 -29
  587. package/dist/host/__tests__/utils.test.js.map +0 -1
  588. package/dist/host/cookie-handler.d.ts +0 -34
  589. package/dist/host/cookie-handler.d.ts.map +0 -1
  590. package/dist/host/cookie-handler.js +0 -124
  591. package/dist/host/cookie-handler.js.map +0 -1
  592. package/dist/host/errors.d.ts +0 -56
  593. package/dist/host/errors.d.ts.map +0 -1
  594. package/dist/host/errors.js +0 -79
  595. package/dist/host/errors.js.map +0 -1
  596. package/dist/host/index.d.ts +0 -29
  597. package/dist/host/index.d.ts.map +0 -1
  598. package/dist/host/index.js +0 -32
  599. package/dist/host/index.js.map +0 -1
  600. package/dist/host/pattern-matcher.d.ts +0 -36
  601. package/dist/host/pattern-matcher.d.ts.map +0 -1
  602. package/dist/host/pattern-matcher.js +0 -172
  603. package/dist/host/pattern-matcher.js.map +0 -1
  604. package/dist/host/router.d.ts +0 -26
  605. package/dist/host/router.d.ts.map +0 -1
  606. package/dist/host/router.js +0 -218
  607. package/dist/host/router.js.map +0 -1
  608. package/dist/host/testing.d.ts +0 -36
  609. package/dist/host/testing.d.ts.map +0 -1
  610. package/dist/host/testing.js +0 -55
  611. package/dist/host/testing.js.map +0 -1
  612. package/dist/host/types.d.ts +0 -115
  613. package/dist/host/types.d.ts.map +0 -1
  614. package/dist/host/types.js +0 -7
  615. package/dist/host/types.js.map +0 -1
  616. package/dist/host/utils.d.ts +0 -21
  617. package/dist/host/utils.d.ts.map +0 -1
  618. package/dist/host/utils.js +0 -23
  619. package/dist/host/utils.js.map +0 -1
  620. package/dist/href-client.d.ts +0 -131
  621. package/dist/href-client.d.ts.map +0 -1
  622. package/dist/href-client.js +0 -64
  623. package/dist/href-client.js.map +0 -1
  624. package/dist/href-context.d.ts +0 -29
  625. package/dist/href-context.d.ts.map +0 -1
  626. package/dist/href-context.js +0 -21
  627. package/dist/href-context.js.map +0 -1
  628. package/dist/index.d.ts +0 -73
  629. package/dist/index.d.ts.map +0 -1
  630. package/dist/index.js +0 -91
  631. package/dist/index.js.map +0 -1
  632. package/dist/index.rsc.d.ts +0 -32
  633. package/dist/index.rsc.d.ts.map +0 -1
  634. package/dist/index.rsc.js +0 -40
  635. package/dist/index.rsc.js.map +0 -1
  636. package/dist/internal-debug.d.ts +0 -2
  637. package/dist/internal-debug.d.ts.map +0 -1
  638. package/dist/internal-debug.js +0 -5
  639. package/dist/internal-debug.js.map +0 -1
  640. package/dist/loader.d.ts +0 -14
  641. package/dist/loader.d.ts.map +0 -1
  642. package/dist/loader.js +0 -20
  643. package/dist/loader.js.map +0 -1
  644. package/dist/loader.rsc.d.ts +0 -19
  645. package/dist/loader.rsc.d.ts.map +0 -1
  646. package/dist/loader.rsc.js +0 -99
  647. package/dist/loader.rsc.js.map +0 -1
  648. package/dist/network-error-thrower.d.ts +0 -17
  649. package/dist/network-error-thrower.d.ts.map +0 -1
  650. package/dist/network-error-thrower.js +0 -14
  651. package/dist/network-error-thrower.js.map +0 -1
  652. package/dist/outlet-context.d.ts +0 -13
  653. package/dist/outlet-context.d.ts.map +0 -1
  654. package/dist/outlet-context.js +0 -3
  655. package/dist/outlet-context.js.map +0 -1
  656. package/dist/prerender/__tests__/param-hash.test.d.ts +0 -2
  657. package/dist/prerender/__tests__/param-hash.test.d.ts.map +0 -1
  658. package/dist/prerender/__tests__/param-hash.test.js +0 -148
  659. package/dist/prerender/__tests__/param-hash.test.js.map +0 -1
  660. package/dist/prerender/param-hash.d.ts +0 -16
  661. package/dist/prerender/param-hash.d.ts.map +0 -1
  662. package/dist/prerender/param-hash.js +0 -36
  663. package/dist/prerender/param-hash.js.map +0 -1
  664. package/dist/prerender/store.d.ts +0 -38
  665. package/dist/prerender/store.d.ts.map +0 -1
  666. package/dist/prerender/store.js +0 -61
  667. package/dist/prerender/store.js.map +0 -1
  668. package/dist/prerender.d.ts +0 -66
  669. package/dist/prerender.d.ts.map +0 -1
  670. package/dist/prerender.js +0 -57
  671. package/dist/prerender.js.map +0 -1
  672. package/dist/reverse.d.ts +0 -196
  673. package/dist/reverse.d.ts.map +0 -1
  674. package/dist/reverse.js +0 -78
  675. package/dist/reverse.js.map +0 -1
  676. package/dist/root-error-boundary.d.ts +0 -33
  677. package/dist/root-error-boundary.d.ts.map +0 -1
  678. package/dist/root-error-boundary.js +0 -165
  679. package/dist/root-error-boundary.js.map +0 -1
  680. package/dist/route-content-wrapper.d.ts +0 -46
  681. package/dist/route-content-wrapper.d.ts.map +0 -1
  682. package/dist/route-content-wrapper.js +0 -77
  683. package/dist/route-content-wrapper.js.map +0 -1
  684. package/dist/route-definition.d.ts +0 -421
  685. package/dist/route-definition.d.ts.map +0 -1
  686. package/dist/route-definition.js +0 -868
  687. package/dist/route-definition.js.map +0 -1
  688. package/dist/route-map-builder.d.ts +0 -155
  689. package/dist/route-map-builder.d.ts.map +0 -1
  690. package/dist/route-map-builder.js +0 -237
  691. package/dist/route-map-builder.js.map +0 -1
  692. package/dist/route-types.d.ts +0 -165
  693. package/dist/route-types.d.ts.map +0 -1
  694. package/dist/route-types.js +0 -7
  695. package/dist/route-types.js.map +0 -1
  696. package/dist/router/__tests__/handler-context.test.d.ts +0 -2
  697. package/dist/router/__tests__/handler-context.test.d.ts.map +0 -1
  698. package/dist/router/__tests__/handler-context.test.js +0 -65
  699. package/dist/router/__tests__/handler-context.test.js.map +0 -1
  700. package/dist/router/__tests__/loader-cycle-detection.test.d.ts +0 -2
  701. package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +0 -1
  702. package/dist/router/__tests__/loader-cycle-detection.test.js +0 -221
  703. package/dist/router/__tests__/loader-cycle-detection.test.js.map +0 -1
  704. package/dist/router/__tests__/match-context.test.d.ts +0 -2
  705. package/dist/router/__tests__/match-context.test.d.ts.map +0 -1
  706. package/dist/router/__tests__/match-context.test.js +0 -92
  707. package/dist/router/__tests__/match-context.test.js.map +0 -1
  708. package/dist/router/__tests__/match-pipelines.test.d.ts +0 -2
  709. package/dist/router/__tests__/match-pipelines.test.d.ts.map +0 -1
  710. package/dist/router/__tests__/match-pipelines.test.js +0 -417
  711. package/dist/router/__tests__/match-pipelines.test.js.map +0 -1
  712. package/dist/router/__tests__/match-result.test.d.ts +0 -2
  713. package/dist/router/__tests__/match-result.test.d.ts.map +0 -1
  714. package/dist/router/__tests__/match-result.test.js +0 -457
  715. package/dist/router/__tests__/match-result.test.js.map +0 -1
  716. package/dist/router/__tests__/on-error.test.d.ts +0 -2
  717. package/dist/router/__tests__/on-error.test.d.ts.map +0 -1
  718. package/dist/router/__tests__/on-error.test.js +0 -678
  719. package/dist/router/__tests__/on-error.test.js.map +0 -1
  720. package/dist/router/__tests__/pattern-matching.test.d.ts +0 -2
  721. package/dist/router/__tests__/pattern-matching.test.d.ts.map +0 -1
  722. package/dist/router/__tests__/pattern-matching.test.js +0 -629
  723. package/dist/router/__tests__/pattern-matching.test.js.map +0 -1
  724. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +0 -2
  725. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +0 -1
  726. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +0 -155
  727. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +0 -1
  728. package/dist/router/error-handling.d.ts +0 -77
  729. package/dist/router/error-handling.d.ts.map +0 -1
  730. package/dist/router/error-handling.js +0 -202
  731. package/dist/router/error-handling.js.map +0 -1
  732. package/dist/router/handler-context.d.ts +0 -20
  733. package/dist/router/handler-context.d.ts.map +0 -1
  734. package/dist/router/handler-context.js +0 -198
  735. package/dist/router/handler-context.js.map +0 -1
  736. package/dist/router/intercept-resolution.d.ts +0 -66
  737. package/dist/router/intercept-resolution.d.ts.map +0 -1
  738. package/dist/router/intercept-resolution.js +0 -246
  739. package/dist/router/intercept-resolution.js.map +0 -1
  740. package/dist/router/loader-resolution.d.ts +0 -64
  741. package/dist/router/loader-resolution.d.ts.map +0 -1
  742. package/dist/router/loader-resolution.js +0 -284
  743. package/dist/router/loader-resolution.js.map +0 -1
  744. package/dist/router/logging.d.ts +0 -15
  745. package/dist/router/logging.d.ts.map +0 -1
  746. package/dist/router/logging.js +0 -99
  747. package/dist/router/logging.js.map +0 -1
  748. package/dist/router/manifest.d.ts +0 -22
  749. package/dist/router/manifest.d.ts.map +0 -1
  750. package/dist/router/manifest.js +0 -181
  751. package/dist/router/manifest.js.map +0 -1
  752. package/dist/router/match-api.d.ts +0 -35
  753. package/dist/router/match-api.d.ts.map +0 -1
  754. package/dist/router/match-api.js +0 -406
  755. package/dist/router/match-api.js.map +0 -1
  756. package/dist/router/match-context.d.ts +0 -206
  757. package/dist/router/match-context.d.ts.map +0 -1
  758. package/dist/router/match-context.js +0 -17
  759. package/dist/router/match-context.js.map +0 -1
  760. package/dist/router/match-middleware/background-revalidation.d.ts +0 -127
  761. package/dist/router/match-middleware/background-revalidation.d.ts.map +0 -1
  762. package/dist/router/match-middleware/background-revalidation.js +0 -75
  763. package/dist/router/match-middleware/background-revalidation.js.map +0 -1
  764. package/dist/router/match-middleware/cache-lookup.d.ts +0 -112
  765. package/dist/router/match-middleware/cache-lookup.d.ts.map +0 -1
  766. package/dist/router/match-middleware/cache-lookup.js +0 -257
  767. package/dist/router/match-middleware/cache-lookup.js.map +0 -1
  768. package/dist/router/match-middleware/cache-store.d.ts +0 -113
  769. package/dist/router/match-middleware/cache-store.d.ts.map +0 -1
  770. package/dist/router/match-middleware/cache-store.js +0 -108
  771. package/dist/router/match-middleware/cache-store.js.map +0 -1
  772. package/dist/router/match-middleware/index.d.ts +0 -81
  773. package/dist/router/match-middleware/index.d.ts.map +0 -1
  774. package/dist/router/match-middleware/index.js +0 -80
  775. package/dist/router/match-middleware/index.js.map +0 -1
  776. package/dist/router/match-middleware/intercept-resolution.d.ts +0 -117
  777. package/dist/router/match-middleware/intercept-resolution.d.ts.map +0 -1
  778. package/dist/router/match-middleware/intercept-resolution.js +0 -134
  779. package/dist/router/match-middleware/intercept-resolution.js.map +0 -1
  780. package/dist/router/match-middleware/segment-resolution.d.ts +0 -99
  781. package/dist/router/match-middleware/segment-resolution.d.ts.map +0 -1
  782. package/dist/router/match-middleware/segment-resolution.js +0 -53
  783. package/dist/router/match-middleware/segment-resolution.js.map +0 -1
  784. package/dist/router/match-pipelines.d.ts +0 -147
  785. package/dist/router/match-pipelines.d.ts.map +0 -1
  786. package/dist/router/match-pipelines.js +0 -82
  787. package/dist/router/match-pipelines.js.map +0 -1
  788. package/dist/router/match-result.d.ts +0 -126
  789. package/dist/router/match-result.d.ts.map +0 -1
  790. package/dist/router/match-result.js +0 -93
  791. package/dist/router/match-result.js.map +0 -1
  792. package/dist/router/metrics.d.ts +0 -20
  793. package/dist/router/metrics.d.ts.map +0 -1
  794. package/dist/router/metrics.js +0 -47
  795. package/dist/router/metrics.js.map +0 -1
  796. package/dist/router/middleware.d.ts +0 -249
  797. package/dist/router/middleware.d.ts.map +0 -1
  798. package/dist/router/middleware.js +0 -434
  799. package/dist/router/middleware.js.map +0 -1
  800. package/dist/router/middleware.test.d.ts +0 -2
  801. package/dist/router/middleware.test.d.ts.map +0 -1
  802. package/dist/router/middleware.test.js +0 -816
  803. package/dist/router/middleware.test.js.map +0 -1
  804. package/dist/router/pattern-matching.d.ts +0 -149
  805. package/dist/router/pattern-matching.d.ts.map +0 -1
  806. package/dist/router/pattern-matching.js +0 -349
  807. package/dist/router/pattern-matching.js.map +0 -1
  808. package/dist/router/revalidation.d.ts +0 -44
  809. package/dist/router/revalidation.d.ts.map +0 -1
  810. package/dist/router/revalidation.js +0 -147
  811. package/dist/router/revalidation.js.map +0 -1
  812. package/dist/router/router-context.d.ts +0 -135
  813. package/dist/router/router-context.d.ts.map +0 -1
  814. package/dist/router/router-context.js +0 -36
  815. package/dist/router/router-context.js.map +0 -1
  816. package/dist/router/segment-resolution.d.ts +0 -127
  817. package/dist/router/segment-resolution.d.ts.map +0 -1
  818. package/dist/router/segment-resolution.js +0 -919
  819. package/dist/router/segment-resolution.js.map +0 -1
  820. package/dist/router/trie-matching.d.ts +0 -40
  821. package/dist/router/trie-matching.d.ts.map +0 -1
  822. package/dist/router/trie-matching.js +0 -127
  823. package/dist/router/trie-matching.js.map +0 -1
  824. package/dist/router/types.d.ts +0 -136
  825. package/dist/router/types.d.ts.map +0 -1
  826. package/dist/router/types.js +0 -7
  827. package/dist/router/types.js.map +0 -1
  828. package/dist/router.d.ts +0 -753
  829. package/dist/router.d.ts.map +0 -1
  830. package/dist/router.gen.d.ts +0 -6
  831. package/dist/router.gen.d.ts.map +0 -1
  832. package/dist/router.gen.js +0 -6
  833. package/dist/router.gen.js.map +0 -1
  834. package/dist/router.js +0 -1304
  835. package/dist/router.js.map +0 -1
  836. package/dist/rsc/__tests__/helpers.test.d.ts +0 -2
  837. package/dist/rsc/__tests__/helpers.test.d.ts.map +0 -1
  838. package/dist/rsc/__tests__/helpers.test.js +0 -140
  839. package/dist/rsc/__tests__/helpers.test.js.map +0 -1
  840. package/dist/rsc/handler.d.ts +0 -45
  841. package/dist/rsc/handler.d.ts.map +0 -1
  842. package/dist/rsc/handler.js +0 -1172
  843. package/dist/rsc/handler.js.map +0 -1
  844. package/dist/rsc/helpers.d.ts +0 -16
  845. package/dist/rsc/helpers.d.ts.map +0 -1
  846. package/dist/rsc/helpers.js +0 -55
  847. package/dist/rsc/helpers.js.map +0 -1
  848. package/dist/rsc/index.d.ts +0 -22
  849. package/dist/rsc/index.d.ts.map +0 -1
  850. package/dist/rsc/index.js +0 -23
  851. package/dist/rsc/index.js.map +0 -1
  852. package/dist/rsc/nonce.d.ts +0 -9
  853. package/dist/rsc/nonce.d.ts.map +0 -1
  854. package/dist/rsc/nonce.js +0 -18
  855. package/dist/rsc/nonce.js.map +0 -1
  856. package/dist/rsc/types.d.ts +0 -206
  857. package/dist/rsc/types.d.ts.map +0 -1
  858. package/dist/rsc/types.js +0 -8
  859. package/dist/rsc/types.js.map +0 -1
  860. package/dist/search-params.d.ts +0 -103
  861. package/dist/search-params.d.ts.map +0 -1
  862. package/dist/search-params.js +0 -74
  863. package/dist/search-params.js.map +0 -1
  864. package/dist/segment-system.d.ts +0 -75
  865. package/dist/segment-system.d.ts.map +0 -1
  866. package/dist/segment-system.js +0 -336
  867. package/dist/segment-system.js.map +0 -1
  868. package/dist/server/context.d.ts +0 -245
  869. package/dist/server/context.d.ts.map +0 -1
  870. package/dist/server/context.js +0 -197
  871. package/dist/server/context.js.map +0 -1
  872. package/dist/server/fetchable-loader-store.d.ts +0 -18
  873. package/dist/server/fetchable-loader-store.d.ts.map +0 -1
  874. package/dist/server/fetchable-loader-store.js +0 -18
  875. package/dist/server/fetchable-loader-store.js.map +0 -1
  876. package/dist/server/handle-store.d.ts +0 -85
  877. package/dist/server/handle-store.d.ts.map +0 -1
  878. package/dist/server/handle-store.js +0 -142
  879. package/dist/server/handle-store.js.map +0 -1
  880. package/dist/server/loader-registry.d.ts +0 -55
  881. package/dist/server/loader-registry.d.ts.map +0 -1
  882. package/dist/server/loader-registry.js +0 -132
  883. package/dist/server/loader-registry.js.map +0 -1
  884. package/dist/server/request-context.d.ts +0 -226
  885. package/dist/server/request-context.d.ts.map +0 -1
  886. package/dist/server/request-context.js +0 -290
  887. package/dist/server/request-context.js.map +0 -1
  888. package/dist/server/root-layout.d.ts +0 -4
  889. package/dist/server/root-layout.d.ts.map +0 -1
  890. package/dist/server/root-layout.js +0 -5
  891. package/dist/server/root-layout.js.map +0 -1
  892. package/dist/server.d.ts +0 -15
  893. package/dist/server.d.ts.map +0 -1
  894. package/dist/server.js +0 -20
  895. package/dist/server.js.map +0 -1
  896. package/dist/ssr/__tests__/ssr-handler.test.d.ts +0 -2
  897. package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +0 -1
  898. package/dist/ssr/__tests__/ssr-handler.test.js +0 -132
  899. package/dist/ssr/__tests__/ssr-handler.test.js.map +0 -1
  900. package/dist/ssr/index.d.ts +0 -98
  901. package/dist/ssr/index.d.ts.map +0 -1
  902. package/dist/ssr/index.js +0 -158
  903. package/dist/ssr/index.js.map +0 -1
  904. package/dist/static-handler.d.ts +0 -50
  905. package/dist/static-handler.d.ts.map +0 -1
  906. package/dist/static-handler.gen.d.ts +0 -5
  907. package/dist/static-handler.gen.d.ts.map +0 -1
  908. package/dist/static-handler.gen.js +0 -5
  909. package/dist/static-handler.gen.js.map +0 -1
  910. package/dist/static-handler.js +0 -29
  911. package/dist/static-handler.js.map +0 -1
  912. package/dist/theme/ThemeProvider.d.ts +0 -20
  913. package/dist/theme/ThemeProvider.d.ts.map +0 -1
  914. package/dist/theme/ThemeProvider.js +0 -240
  915. package/dist/theme/ThemeProvider.js.map +0 -1
  916. package/dist/theme/ThemeScript.d.ts +0 -48
  917. package/dist/theme/ThemeScript.d.ts.map +0 -1
  918. package/dist/theme/ThemeScript.js +0 -13
  919. package/dist/theme/ThemeScript.js.map +0 -1
  920. package/dist/theme/__tests__/theme.test.d.ts +0 -2
  921. package/dist/theme/__tests__/theme.test.d.ts.map +0 -1
  922. package/dist/theme/__tests__/theme.test.js +0 -103
  923. package/dist/theme/__tests__/theme.test.js.map +0 -1
  924. package/dist/theme/constants.d.ts +0 -29
  925. package/dist/theme/constants.d.ts.map +0 -1
  926. package/dist/theme/constants.js +0 -48
  927. package/dist/theme/constants.js.map +0 -1
  928. package/dist/theme/index.d.ts +0 -31
  929. package/dist/theme/index.d.ts.map +0 -1
  930. package/dist/theme/index.js +0 -36
  931. package/dist/theme/index.js.map +0 -1
  932. package/dist/theme/theme-context.d.ts +0 -40
  933. package/dist/theme/theme-context.d.ts.map +0 -1
  934. package/dist/theme/theme-context.js +0 -60
  935. package/dist/theme/theme-context.js.map +0 -1
  936. package/dist/theme/theme-script.d.ts +0 -27
  937. package/dist/theme/theme-script.d.ts.map +0 -1
  938. package/dist/theme/theme-script.js +0 -147
  939. package/dist/theme/theme-script.js.map +0 -1
  940. package/dist/theme/types.d.ts +0 -163
  941. package/dist/theme/types.d.ts.map +0 -1
  942. package/dist/theme/types.js +0 -11
  943. package/dist/theme/types.js.map +0 -1
  944. package/dist/theme/use-theme.d.ts +0 -12
  945. package/dist/theme/use-theme.d.ts.map +0 -1
  946. package/dist/theme/use-theme.js +0 -40
  947. package/dist/theme/use-theme.js.map +0 -1
  948. package/dist/types.d.ts +0 -1479
  949. package/dist/types.d.ts.map +0 -1
  950. package/dist/types.js +0 -10
  951. package/dist/types.js.map +0 -1
  952. package/dist/urls.d.ts +0 -441
  953. package/dist/urls.d.ts.map +0 -1
  954. package/dist/urls.gen.d.ts +0 -8
  955. package/dist/urls.gen.d.ts.map +0 -1
  956. package/dist/urls.gen.js +0 -8
  957. package/dist/urls.gen.js.map +0 -1
  958. package/dist/urls.js +0 -443
  959. package/dist/urls.js.map +0 -1
  960. package/dist/use-loader.d.ts +0 -127
  961. package/dist/use-loader.d.ts.map +0 -1
  962. package/dist/use-loader.js +0 -237
  963. package/dist/use-loader.js.map +0 -1
  964. package/dist/vite/__tests__/ast-handler-extract.test.d.ts +0 -2
  965. package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +0 -1
  966. package/dist/vite/__tests__/ast-handler-extract.test.js +0 -294
  967. package/dist/vite/__tests__/ast-handler-extract.test.js.map +0 -1
  968. package/dist/vite/__tests__/expose-id-utils.test.d.ts +0 -2
  969. package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +0 -1
  970. package/dist/vite/__tests__/expose-id-utils.test.js +0 -224
  971. package/dist/vite/__tests__/expose-id-utils.test.js.map +0 -1
  972. package/dist/vite/__tests__/expose-internal-ids.test.d.ts +0 -2
  973. package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +0 -1
  974. package/dist/vite/__tests__/expose-internal-ids.test.js +0 -647
  975. package/dist/vite/__tests__/expose-internal-ids.test.js.map +0 -1
  976. package/dist/vite/__tests__/expose-router-id.test.d.ts +0 -2
  977. package/dist/vite/__tests__/expose-router-id.test.d.ts.map +0 -1
  978. package/dist/vite/__tests__/expose-router-id.test.js +0 -39
  979. package/dist/vite/__tests__/expose-router-id.test.js.map +0 -1
  980. package/dist/vite/ast-handler-extract.d.ts +0 -49
  981. package/dist/vite/ast-handler-extract.d.ts.map +0 -1
  982. package/dist/vite/ast-handler-extract.js +0 -249
  983. package/dist/vite/ast-handler-extract.js.map +0 -1
  984. package/dist/vite/expose-action-id.d.ts +0 -19
  985. package/dist/vite/expose-action-id.d.ts.map +0 -1
  986. package/dist/vite/expose-action-id.js +0 -250
  987. package/dist/vite/expose-action-id.js.map +0 -1
  988. package/dist/vite/expose-id-utils.d.ts +0 -69
  989. package/dist/vite/expose-id-utils.d.ts.map +0 -1
  990. package/dist/vite/expose-id-utils.js +0 -289
  991. package/dist/vite/expose-id-utils.js.map +0 -1
  992. package/dist/vite/expose-internal-ids.d.ts +0 -22
  993. package/dist/vite/expose-internal-ids.d.ts.map +0 -1
  994. package/dist/vite/expose-internal-ids.js +0 -886
  995. package/dist/vite/expose-internal-ids.js.map +0 -1
  996. package/dist/vite/index.d.ts +0 -149
  997. package/dist/vite/index.d.ts.map +0 -1
  998. package/dist/vite/index.js.bak +0 -5448
  999. package/dist/vite/index.js.map +0 -1
  1000. package/dist/vite/index.named-routes.gen.ts +0 -103
  1001. package/dist/vite/package-resolution.d.ts +0 -43
  1002. package/dist/vite/package-resolution.d.ts.map +0 -1
  1003. package/dist/vite/package-resolution.js +0 -112
  1004. package/dist/vite/package-resolution.js.map +0 -1
  1005. package/dist/vite/virtual-entries.d.ts +0 -25
  1006. package/dist/vite/virtual-entries.d.ts.map +0 -1
  1007. package/dist/vite/virtual-entries.js +0 -110
  1008. package/dist/vite/virtual-entries.js.map +0 -1
  1009. package/src/browser/shallow.ts +0 -40
@@ -1,49 +1,4 @@
1
- // React exports for browser navigation
2
-
3
- // Hook with Zustand-style selectors
4
- export { useNavigation } from "./use-navigation.js";
5
-
6
- // Router actions hook (stable reference, no re-renders)
7
- export { useRouter } from "./use-router.js";
8
-
9
- // URL hooks
10
- export { usePathname } from "./use-pathname.js";
11
- export { useSearchParams } from "./use-search-params.js";
12
- export { useParams } from "./use-params.js";
13
-
14
- // Action state tracking hook
15
- export { useAction, type TrackedActionState } from "./use-action.js";
16
-
17
- // Segments state hook
18
- export { useSegments, type SegmentsState } from "./use-segments.js";
19
-
20
- // Handle data hook
21
- export { useHandle } from "./use-handle.js";
22
-
23
- // Mount-aware reverse hook
24
- export { useReverse } from "./use-reverse.js";
25
-
26
- // Provider
27
1
  export {
28
2
  NavigationProvider,
29
3
  type NavigationProviderProps,
30
4
  } from "./NavigationProvider.js";
31
-
32
- // Context (for advanced usage)
33
- export {
34
- NavigationStoreContext,
35
- type NavigationStoreContextValue,
36
- } from "./context.js";
37
-
38
- // Link component
39
- export { Link, type LinkProps, type PrefetchStrategy } from "./Link.js";
40
-
41
- // Link status hook
42
- export { useLinkStatus, type LinkStatus } from "./use-link-status.js";
43
-
44
- // Scroll restoration
45
- export {
46
- ScrollRestoration,
47
- useScrollRestoration,
48
- type ScrollRestorationProps,
49
- } from "./ScrollRestoration.js";
@@ -1,8 +1,3 @@
1
- /**
2
- * Shared location state utilities - works in both RSC and client contexts
3
- * No "use client" directive so it can be imported from RSC
4
- */
5
-
6
1
  import type { ReactElement } from "react";
7
2
 
8
3
  /**
@@ -26,16 +21,8 @@ export interface LocationStateOptions {
26
21
 
27
22
  type LocationStateUnsafeFn = (...args: never[]) => unknown;
28
23
 
29
- // Broadest constructor signature (`abstract` covers both abstract and concrete
30
- // classes). A class passed as state has a `new` signature, not a call signature,
31
- // so it slips past LocationStateUnsafeFn; at runtime the lazy-getter path
32
- // (`typeof value === "function"`) then mistakes it for a getter and throws.
33
24
  type LocationStateUnsafeCtor = abstract new (...args: never[]) => unknown;
34
25
 
35
- // `unknown` cannot be verified serializable, so it is rejected (callers must
36
- // supply a concrete type). `any` deliberately defeats type checking and is NOT
37
- // guardable — it is assignable to the branded error too, so the check always
38
- // passes; it remains an explicit escape hatch.
39
26
  type IsAny<T> = 0 extends 1 & T ? true : false;
40
27
  type IsUnknown<T> =
41
28
  IsAny<T> extends true ? false : unknown extends T ? true : false;
@@ -3,7 +3,6 @@
3
3
  import { useState, useEffect, useRef } from "react";
4
4
  import type { LocationStateDefinition } from "./location-state-shared.js";
5
5
 
6
- // Re-export shared utilities and types
7
6
  export {
8
7
  createLocationState,
9
8
  isLocationStateEntry,
@@ -24,32 +24,24 @@ const DEFAULT_ACTION_STATE: TrackedActionState = {
24
24
  result: null,
25
25
  };
26
26
 
27
- /**
28
- * Normalize action ID - returns the ID as-is
29
- *
30
- * Server actions have IDs like "hash#actionName" or "src/actions.ts#actionName".
31
- * When using function references, we use the full ID for exact matching.
32
- * When using strings, the event controller supports suffix matching
33
- * (e.g., "addToCart" matches "hash#addToCart").
34
- */
35
- function normalizeActionId(actionId: string): string {
36
- return actionId;
37
- }
38
-
39
27
  /**
40
28
  * Extract action ID from a server action function or string.
41
29
  *
42
30
  * Actions passed as props from server components lose their metadata
43
31
  * during RSC serialization - use a string action name instead.
32
+ *
33
+ * The extracted $$id (e.g. "hash#actionName" or "src/actions.ts#actionName")
34
+ * is returned as-is. Suffix-vs-exact matching against this ID happens
35
+ * downstream in the event controller, not here.
44
36
  */
45
- export function getActionId(action: ServerActionFunction | string): string {
37
+ function getActionId(action: ServerActionFunction | string): string {
46
38
  invariant(
47
39
  typeof action === "function" || typeof action === "string",
48
40
  `useAction: action must be a function or string, got ${typeof action}`,
49
41
  );
50
42
  const actionId = (action as any)?.$$id;
51
43
  if (actionId) {
52
- return normalizeActionId(actionId);
44
+ return actionId;
53
45
  }
54
46
 
55
47
  // If action is a string, use it directly
@@ -162,7 +154,6 @@ export function useAction<T>(
162
154
  });
163
155
  const prevSelected = useRef(baseState);
164
156
  prevSelected.current = baseState;
165
- // useOptimistic allows immediate updates during transitions/actions
166
157
  const [optimisticState, setOptimisticState] = useOptimistic<
167
158
  T | TrackedActionState
168
159
  >(null!);
@@ -43,7 +43,6 @@ export function useHandle<T, A, S>(
43
43
  ): Rango.FlightSerialize<A> | S {
44
44
  const ctx = useContext(NavigationStoreContext);
45
45
 
46
- // Initial state from context event controller, or empty fallback without provider.
47
46
  const [value, setValue] = useState<Rango.FlightSerialize<A> | S>(() => {
48
47
  if (!ctx) {
49
48
  const collected = collectHandleData(
@@ -54,7 +53,6 @@ export function useHandle<T, A, S>(
54
53
  return selector ? selector(collected) : collected;
55
54
  }
56
55
 
57
- // On client, use event controller state
58
56
  const state = ctx.eventController.getHandleState();
59
57
  const collected = collectHandleData(
60
58
  handle,
@@ -65,15 +63,12 @@ export function useHandle<T, A, S>(
65
63
  });
66
64
  const [optimisticValue, setOptimisticValue] = useOptimistic(value);
67
65
 
68
- // Track previous value for shallow comparison
69
66
  const prevValueRef = useRef(value);
70
67
  prevValueRef.current = value;
71
68
 
72
- // Ref keeps the latest selector without re-subscribing on every render.
73
69
  const selectorRef = useRef(selector);
74
70
  selectorRef.current = selector;
75
71
 
76
- // Subscribe to handle data changes (client only)
77
72
  useEffect(() => {
78
73
  if (!ctx) return;
79
74
 
@@ -82,11 +82,9 @@ export function useLinkStatus(): LinkStatus {
82
82
  const linkTo = useContext(LinkContext);
83
83
  const ctx = useContext(NavigationStoreContext);
84
84
 
85
- // Get origin for URL normalization (stable across renders)
86
85
  const origin =
87
86
  typeof window !== "undefined" ? window.location.origin : "http://localhost";
88
87
 
89
- // Base state for useOptimistic
90
88
  const [basePending, setBasePending] = useState<boolean>(() => {
91
89
  if (!ctx || linkTo === null) {
92
90
  return false;
@@ -97,7 +95,6 @@ export function useLinkStatus(): LinkStatus {
97
95
 
98
96
  const prevPending = useRef(basePending);
99
97
 
100
- // useOptimistic allows immediate updates during transitions
101
98
  const [pending, setOptimisticPending] = useOptimistic(basePending);
102
99
 
103
100
  useEffect(() => {
@@ -105,7 +102,6 @@ export function useLinkStatus(): LinkStatus {
105
102
  return;
106
103
  }
107
104
 
108
- // Subscribe to navigation state changes
109
105
  return ctx.eventController.subscribe(() => {
110
106
  const state = ctx.eventController.getState();
111
107
  const isPending = isPendingFor(linkTo, state.pendingUrl, origin);
@@ -46,7 +46,6 @@ export function useNavigation<T>(
46
46
  throw new Error("useNavigation must be used within NavigationProvider");
47
47
  }
48
48
 
49
- // Base state for useOptimistic
50
49
  const [baseValue, setBaseValue] = useState<T | PublicNavigationState>(() => {
51
50
  const publicState = toPublicState(ctx.eventController.getState());
52
51
  return selector ? selector(publicState) : publicState;
@@ -59,7 +58,6 @@ export function useNavigation<T>(
59
58
  // parent transition (e.g. <Link> click) is still pending.
60
59
  const optimisticPinnedRef = useRef(false);
61
60
 
62
- // useOptimistic allows immediate updates during transitions/actions
63
61
  const [value, setOptimisticValue] = useOptimistic(baseValue);
64
62
 
65
63
  // Store selector in a ref so the subscription callback always uses the
@@ -72,7 +70,6 @@ export function useNavigation<T>(
72
70
 
73
71
  // Subscribe to event controller state changes (only runs on client)
74
72
  useEffect(() => {
75
- // Subscribe to updates from event controller
76
73
  return ctx.eventController.subscribe(() => {
77
74
  const currentState = ctx.eventController.getState();
78
75
  const publicState = toPublicState(currentState);
@@ -50,8 +50,6 @@ export function useParams<T>(
50
50
  });
51
51
 
52
52
  const prevValue = useRef(value);
53
- // Ref keeps the latest selector without re-subscribing. Event-driven by
54
- // design: value updates on store events, not on selector identity change.
55
53
  const selectorRef = useRef(selector);
56
54
  selectorRef.current = selector;
57
55
 
@@ -24,9 +24,6 @@ import type { ReadonlyURLSearchParams } from "../types.js";
24
24
  export function useSearchParams(): ReadonlyURLSearchParams {
25
25
  const ctx = useContext(NavigationStoreContext);
26
26
 
27
- // Always initialize with empty URLSearchParams to match SSR output
28
- // and avoid hydration mismatch. The useEffect below syncs from
29
- // the real URL after hydration.
30
27
  const [searchParams, setSearchParams] = useState<ReadonlyURLSearchParams>(
31
28
  () => new URLSearchParams(),
32
29
  );
@@ -41,12 +38,10 @@ export function useSearchParams(): ReadonlyURLSearchParams {
41
38
  const nextSearch = location.searchParams.toString();
42
39
  if (nextSearch !== prevSearch.current) {
43
40
  prevSearch.current = nextSearch;
44
- // Create a snapshot so callers cannot mutate the source URLSearchParams
45
41
  setSearchParams(new URLSearchParams(nextSearch));
46
42
  }
47
43
  };
48
44
 
49
- // Sync on mount (picks up search params from browser URL)
50
45
  update();
51
46
 
52
47
  return ctx.eventController.subscribe(update);
@@ -86,31 +86,20 @@ export function useSegments<T>(
86
86
  const selectorRef = useRef(selector);
87
87
  selectorRef.current = selector;
88
88
 
89
- // Track selector identity to detect when the selector function changes.
90
- // Only then do we eagerly recompute during render to avoid staleness.
91
- // Without this guard, no-selector mode causes infinite re-renders because
92
- // buildSegmentsState creates fresh arrays that fail Object.is checks.
93
89
  const prevSelectorIdentity = useRef(selector);
94
90
 
95
- // Cache SegmentsState to stabilize nested references (path, segmentIds
96
- // arrays) so selectors returning composite values don't cause spurious
97
- // render-time setState calls.
98
91
  const segmentsCache = useRef<{
99
92
  location: URL;
100
93
  routeSegmentIds: string[];
101
94
  state: SegmentsState;
102
95
  } | null>(null);
103
96
 
104
- // Recompute selected value from current store state and apply selector.
105
- // Shared by the render-time eager check and the subscription callback.
106
97
  function recompute(
107
98
  sel: ((state: SegmentsState) => T) | undefined,
108
99
  ): T | SegmentsState {
109
100
  const location = ctx!.eventController.getLocation();
110
101
  const handleState = ctx!.eventController.getHandleState();
111
102
 
112
- // Reuse cached state when inputs haven't changed by reference,
113
- // keeping array/object references stable for composite selectors.
114
103
  const cache = segmentsCache.current;
115
104
  let segmentsState: SegmentsState;
116
105
  if (
@@ -165,8 +154,6 @@ export function useSegments<T>(
165
154
  unsubscribeNav();
166
155
  unsubscribeHandles();
167
156
  };
168
- // Stable subscription: selector changes are handled via selectorRef,
169
- // state comparison uses prevState ref. No re-subscribe needed.
170
157
  // eslint-disable-next-line react-hooks/exhaustive-deps
171
158
  }, []);
172
159
 
@@ -178,8 +178,8 @@ export async function initBrowserApp(
178
178
 
179
179
  // Register the active store on the module-level handle and wire the
180
180
  // jar-divergence observer before any getRangoState() read can detect a
181
- // cross-tab/server rotation. The real boot path never populates the
182
- // getNavigationStore() singleton, so this handle is the live reference.
181
+ // cross-tab/server rotation. There is no global store singleton, so this
182
+ // handle is the live reference.
183
183
  registerNavigationStore(store);
184
184
 
185
185
  // Seed router identity from the initial SSR payload so the first
@@ -14,7 +14,6 @@ import type { RenderSegmentsOptions } from "../segment-system.js";
14
14
  export interface RscPayload<TMetadata = RscMetadata> {
15
15
  metadata?: TMetadata;
16
16
  returnValue?: ActionResult;
17
- formState?: unknown;
18
17
  }
19
18
 
20
19
  /**
@@ -17,11 +17,10 @@ export function validateRedirectOrigin(
17
17
  );
18
18
  return null;
19
19
  }
20
- // Return pathname+search+hash for relative inputs, full href for absolute.
21
- // This normalizes protocol-relative and other ambiguous forms.
22
- return target.href.startsWith(currentOrigin)
23
- ? target.href
24
- : target.pathname + target.search + target.hash;
20
+ // Origin matched above, so target.href is same-origin: return the
21
+ // canonical full href. This normalizes protocol-relative and other
22
+ // ambiguous forms.
23
+ return target.href;
25
24
  } catch {
26
25
  console.error(`[rango] Redirect blocked: invalid URL "${url}"`);
27
26
  return null;
@@ -63,6 +63,9 @@ export interface TrieNode {
63
63
  * @param routeAncestry - Map of route name to ancestry shortCodes
64
64
  * @param routeToStaticPrefix - Map of route name to its entry's staticPrefix
65
65
  * @param routeTrailingSlash - Optional map of route name to trailing slash mode
66
+ * @param prerenderRouteNames - Optional set of prerendered route names (sets leaf.pr)
67
+ * @param passthroughRouteNames - Optional set of passthrough route names (sets leaf.pt)
68
+ * @param responseTypeRoutes - Optional map of route name to response type (sets leaf.rt)
66
69
  */
67
70
  export function buildRouteTrie(
68
71
  routeManifest: Record<string, string>,
@@ -37,12 +37,15 @@ export function formatRouteEntry(
37
37
  ): string {
38
38
  const hasSearch = search && Object.keys(search).length > 0;
39
39
 
40
+ // JSON.stringify the pattern and search values so backslashes and quotes in a
41
+ // route pattern (e.g. a custom regex constraint) survive interpolation into
42
+ // both the type-level string and the runtime NamedRoutes value.
40
43
  if (!hasSearch) {
41
- return ` ${key}: "${pattern}",`;
44
+ return ` ${key}: ${JSON.stringify(pattern)},`;
42
45
  }
43
46
 
44
47
  const searchBody = Object.entries(search!)
45
- .map(([k, v]) => `${k}: "${v}"`)
48
+ .map(([k, v]) => `${k}: ${JSON.stringify(v)}`)
46
49
  .join(", ");
47
- return ` ${key}: { path: "${pattern}", search: { ${searchBody} } },`;
50
+ return ` ${key}: { path: ${JSON.stringify(pattern)}, search: { ${searchBody} } },`;
48
51
  }
@@ -617,9 +617,6 @@ export function writeCombinedRouteTypes(
617
617
  ? readFileSync(outPath, "utf-8")
618
618
  : null;
619
619
 
620
- // When the static parser can't extract routes (e.g. callback-style urls()),
621
- // write an empty placeholder so the build-time transform's injected import
622
- // resolves. Runtime discovery will overwrite this with the real routes.
623
620
  if (Object.keys(result.routes).length === 0) {
624
621
  if (!existing) {
625
622
  const emptySource = generateRouteTypesSource({});
@@ -635,11 +632,6 @@ export function writeCombinedRouteTypes(
635
632
  hasSearchSchemas ? result.searchSchemas : undefined,
636
633
  );
637
634
  if (existing !== source) {
638
- // On initial dev startup, don't overwrite a file from runtime discovery
639
- // (which has all dynamic routes) with a smaller set from the static
640
- // parser. The static parser can't see routes generated by Array.from()
641
- // or other dynamic code. During HMR (file watcher), always write so
642
- // newly added routes appear immediately.
643
635
  if (opts?.preserveIfLarger && existing) {
644
636
  const existingCount = countPublicRouteEntries(existing);
645
637
  const newCount = Object.keys(result.routes).filter(
@@ -69,24 +69,6 @@ export function computeExpiration(
69
69
  return { staleAt, expiresAt };
70
70
  }
71
71
 
72
- // ============================================================================
73
- // Cache Key Resolution
74
- // ============================================================================
75
-
76
- /**
77
- * Resolve cache key using the 3-tier priority:
78
- * 1. keyFn (full override from route/loader cache options)
79
- * 2. store.keyGenerator (modifies default key)
80
- * 3. defaultKey (used when neither keyFn nor keyGenerator is provided)
81
- *
82
- * Errors from keyFn and store.keyGenerator propagate to the caller.
83
- * Cache identity is correctness-critical: if explicit key logic throws,
84
- * silently remapping to a different key could cause cache collisions or
85
- * serve stale/wrong data. Callers must handle the error or let it surface.
86
- *
87
- * Uses _getRequestContext (non-throwing) so that calls outside ALS
88
- * (e.g. build-time) gracefully fall back to defaultKey.
89
- */
90
72
  export async function resolveCacheKey(
91
73
  keyFn: ((ctx: RequestContext) => string | Promise<string>) | undefined,
92
74
  store: SegmentCacheStore | null,
@@ -95,34 +77,17 @@ export async function resolveCacheKey(
95
77
  ): Promise<string> {
96
78
  const requestCtx = _getRequestContext();
97
79
 
98
- // Priority 1: Route/loader-level key function (full override)
99
80
  if (keyFn && requestCtx) {
100
81
  return await keyFn(requestCtx);
101
82
  }
102
83
 
103
- // Priority 2: Store-level keyGenerator (modifies default key)
104
84
  if (store?.keyGenerator && requestCtx) {
105
85
  return await store.keyGenerator(requestCtx, defaultKey);
106
86
  }
107
87
 
108
- // Priority 3: Default key (no custom key logic provided)
109
88
  return defaultKey;
110
89
  }
111
90
 
112
- // ============================================================================
113
- // Cache Tag Resolution
114
- // ============================================================================
115
-
116
- /**
117
- * Resolve cache tags from a tags option (static array or function of ctx).
118
- *
119
- * Fails open: a thrown tag callback falls back to no tags rather than
120
- * aborting the request. Tags are additive metadata (not identity), so a
121
- * missing tag does not cause cache collisions, only a missed invalidation.
122
- *
123
- * Shared by the cache() DSL (cache-scope) and loader caching (loader-cache)
124
- * so tag resolution behaves identically across every cache axis.
125
- */
126
91
  export function resolveTagsOption<TEnv>(
127
92
  tags: string[] | ((ctx: RequestContext<TEnv>) => string[]) | undefined,
128
93
  ctx: RequestContext<TEnv> | undefined,
@@ -131,10 +96,6 @@ export function resolveTagsOption<TEnv>(
131
96
  if (!tags) return undefined;
132
97
  if (typeof tags === "function") {
133
98
  if (!ctx) {
134
- // A dynamic tags function needs the request context to run. Without it
135
- // (e.g. resolved outside a request, at build/prerender time) the entry is
136
- // cached UNTAGGED and can never be invalidated - surface that rather than
137
- // silently dropping the tags, matching the thrown-callback branch below.
138
99
  console.warn(
139
100
  `[${label}] Dynamic tags function present but no request context; ` +
140
101
  `caching without tags (this entry will not be tag-invalidatable).`,
@@ -167,25 +128,10 @@ function normalizeTagList(tags: string[]): string[] | undefined {
167
128
  return out.length > 0 ? out : undefined;
168
129
  }
169
130
 
170
- // ============================================================================
171
- // Cache Store Resolution
172
- // ============================================================================
173
-
174
- /**
175
- * Resolve cache store from the 2-tier priority:
176
- * 1. Explicit store from cache options
177
- * 2. App-level store from request context
178
- */
179
131
  export function resolveCacheStore(
180
132
  explicitStore: SegmentCacheStore | undefined,
181
133
  ): SegmentCacheStore | null {
182
134
  if (explicitStore) {
183
- // Register explicit per-scope stores so updateTag()/revalidateTag() can
184
- // reach them. This is the single chokepoint every cache axis (segment,
185
- // response, loader) resolves through, so registering here covers them all
186
- // eagerly - no dependence on whether a tagged write has happened yet. The
187
- // app-level store is intentionally not registered (always reachable via
188
- // ctx._cacheStore).
189
135
  registerExplicitTaggedStore(explicitStore);
190
136
  return explicitStore;
191
137
  }
@@ -46,6 +46,7 @@ import {
46
46
  runWithCacheTagScope,
47
47
  } from "./cache-tag.js";
48
48
  import { reportCacheError } from "./cache-error.js";
49
+ import type { CacheItemResult } from "./types.js";
49
50
 
50
51
  /**
51
52
  * Convert encodeReply result to a stable string key.
@@ -84,6 +85,11 @@ export function registerCachedFunction<T extends (...args: any[]) => any>(
84
85
  // cacheTag() call inside the function degrades to a no-op rather than
85
86
  // throwing "must be called inside a use cache function" - adopting cacheTag()
86
87
  // must not hard-fail in apps/tests without an item-capable cache configured.
88
+ // Note: the INSIDE_CACHE_EXEC guard (cookies()/headers()/ctx.set() rejection)
89
+ // is intentionally NOT stamped here. It is a cached-path-only check; in the
90
+ // bypass the body actually executes, so the guarded side effects take effect
91
+ // and nothing is lost on a (non-existent) hit. Same applies to the
92
+ // non-serializable-args bypass below.
87
93
  if (!store?.getItem) {
88
94
  const scoped = runWithCacheTagScope(() => fn.apply(this, args));
89
95
  const result = await scoped.result;
@@ -185,23 +191,29 @@ export function registerCachedFunction<T extends (...args: any[]) => any>(
185
191
  // Cache lookup
186
192
  const cached = await store.getItem(cacheKey);
187
193
 
194
+ // Serve a cached entry on the hit path: deserialize the stored value,
195
+ // replay handle data (gated on tainted args), and surface the entry's tags
196
+ // to the request set (the function did not re-run, so its runtime cacheTag()
197
+ // tags are only available from the stored entry). Shared by the fresh-hit
198
+ // and stale-hit branches; the only divergence is the stale branch scheduling
199
+ // background revalidation, which it does after this returns.
200
+ const serveCached = async (entry: CacheItemResult): Promise<any> => {
201
+ const result = await deserializeResult(entry.value);
202
+ if (entry.handles && hasTaintedArgs) {
203
+ const handleStore = requestCtx?._handleStore;
204
+ if (handleStore) {
205
+ const r = await decodeHandles(entry.handles);
206
+ if (r) restoreHandles(r, handleStore);
207
+ }
208
+ }
209
+ recordRequestTags(entry.tags, requestCtx);
210
+ return result;
211
+ };
212
+
188
213
  if (cached && !cached.shouldRevalidate) {
189
214
  // Fresh hit: deserialize and return
190
215
  try {
191
- const result = await deserializeResult(cached.value);
192
- // Restore handle data if present
193
- if (cached.handles && hasTaintedArgs) {
194
- const handleStore = requestCtx?._handleStore;
195
- if (handleStore) {
196
- const r = await decodeHandles(cached.handles);
197
- if (r) restoreHandles(r, handleStore);
198
- }
199
- }
200
- // Surface the hit's tags to the request set so a document built from a
201
- // cached item is still tagged (the function did not re-run, so its
202
- // runtime cacheTag() tags are only available from the stored entry).
203
- recordRequestTags(cached.tags, requestCtx);
204
- return result;
216
+ return await serveCached(cached);
205
217
  } catch (error) {
206
218
  // The stored value is corrupt/partial (failed RSC deserialize). Report
207
219
  // it, then fall through to fresh execution - the miss path below re-runs
@@ -217,16 +229,7 @@ export function registerCachedFunction<T extends (...args: any[]) => any>(
217
229
  if (cached?.shouldRevalidate) {
218
230
  // Stale hit: return stale value, revalidate in background
219
231
  try {
220
- const result = await deserializeResult(cached.value);
221
- if (cached.handles && hasTaintedArgs) {
222
- const handleStore = requestCtx?._handleStore;
223
- if (handleStore) {
224
- const r = await decodeHandles(cached.handles);
225
- if (r) restoreHandles(r, handleStore);
226
- }
227
- }
228
- // Tag the request with the stale entry's tags (see fresh-hit note).
229
- recordRequestTags(cached.tags, requestCtx);
232
+ const result = await serveCached(cached);
230
233
  // Background revalidation — must capture handles if tainted args present.
231
234
  // Use an isolated handle store so background pushes don't pollute the
232
235
  // live response or throw LateHandlePushError on the completed store.
@@ -34,12 +34,6 @@ import {
34
34
  } from "./cache-policy.js";
35
35
  import type { RequestContext } from "../server/request-context.js";
36
36
 
37
- /**
38
- * Resolve tags for a cache() boundary from its config (static array or
39
- * function of ctx). Thin wrapper over the shared resolveTagsOption so the
40
- * cache() DSL and loader caching resolve tags identically.
41
- * @internal
42
- */
43
37
  export function resolveCacheTags(
44
38
  config: PartialCacheOptions | false,
45
39
  ctx: RequestContext | undefined,
@@ -54,17 +48,6 @@ function debugCacheLog(message: string): void {
54
48
  }
55
49
  }
56
50
 
57
- // ============================================================================
58
- // Key Generation (internal)
59
- // ============================================================================
60
-
61
- /**
62
- * Generate cache key base from host, pathname, route params, and search params.
63
- * Host is included to prevent cross-host cache collisions on shared stores.
64
- * Route params and search params are sorted alphabetically for deterministic keys.
65
- * Internal _rsc* and __* query params are excluded.
66
- * @internal
67
- */
68
51
  function getCacheKeyBase(
69
52
  host: string,
70
53
  pathname: string,
@@ -80,16 +63,6 @@ function getCacheKeyBase(
80
63
  return key;
81
64
  }
82
65
 
83
- /**
84
- * Generate default cache key for a route request.
85
- * Includes pathname, route params, and user-facing search params for
86
- * correct scoping. Internal _rsc* params are excluded.
87
- * Includes request type prefix since they produce different segment sets:
88
- * - doc: document requests (full page load)
89
- * - partial: navigation requests (client-side navigation)
90
- * - intercept: intercept navigation (modal/overlay routes)
91
- * @internal
92
- */
93
66
  function getDefaultRouteCacheKey(
94
67
  pathname: string,
95
68
  params?: Record<string, string>,
@@ -18,35 +18,11 @@ import {
18
18
 
19
19
  const cacheTagStorage = new AsyncLocalStorage<Set<string>>();
20
20
 
21
- /**
22
- * Normalize a tag for storage.
23
- *
24
- * Returns the tag unchanged if usable, or null if it is empty/whitespace-only
25
- * (dropped consistently in every environment - an empty tag matches nothing).
26
- *
27
- * Backend-specific constraints are intentionally NOT enforced here so the tag
28
- * primitive stays backend-agnostic. In particular, the CFCacheStore
29
- * encodeURIComponent's tags at serialization time so commas/spaces/non-Latin1
30
- * characters cannot corrupt the comma-delimited Cloudflare Cache-Tag header or
31
- * the HTTP marker header (it does not reject them). Keep tags short and
32
- * low-cardinality: a tag's KV marker key must stay under Cloudflare's 512-byte
33
- * limit, and a Cache-Tag value under 1024 bytes. The in-memory store has no
34
- * such limitations.
35
- *
36
- * @internal
37
- */
38
21
  export function normalizeTag(tag: string): string | null {
39
22
  if (!tag || !tag.trim()) return null;
40
23
  return tag;
41
24
  }
42
25
 
43
- /**
44
- * Normalize a tag collection: drop empty/whitespace-only tags so the WRITE path
45
- * matches the invalidate path (updateTag/revalidateTag/cacheTag all normalize).
46
- * Does not deduplicate - callers that need that wrap with a Set.
47
- *
48
- * @internal
49
- */
50
26
  export function normalizeTags(tags: Iterable<string>): string[] {
51
27
  const out: string[] = [];
52
28
  for (const tag of tags) {
@@ -89,19 +65,6 @@ export function cacheTag(...tags: string[]): void {
89
65
  }
90
66
  }
91
67
 
92
- /**
93
- * Record `tags` into the request-scoped tag set (ctx._requestTags), the union of
94
- * every cache tag resolved while producing the response. The document cache reads
95
- * this after the render settles so a full-page entry is tagged with everything its
96
- * content used, making it invalidatable by updateTag()/revalidateTag().
97
- *
98
- * Called at the tag-resolution sites: "use cache" stores (cache-runtime, both the
99
- * miss and read/hit paths), loader cache (cache-policy/loader-cache), and segment
100
- * cache() (cache-scope). Writes the field directly (not via ctx.set()) so it does
101
- * not trip the cache-scope side-effect guard, mirroring cacheTag() itself.
102
- *
103
- * @internal
104
- */
105
68
  export function recordRequestTags(
106
69
  tags: Iterable<string> | undefined,
107
70
  ctx: RequestContext | undefined = _getRequestContext(),