@rangojs/router 0.10.0 → 0.11.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 (868) hide show
  1. package/AGENTS.md +1 -1
  2. package/LICENSE +21 -0
  3. package/README.md +17 -15
  4. package/dist/types/browser/partial-update.d.ts +1 -0
  5. package/dist/types/cache/cf/cf-cache-constants.d.ts +1 -1
  6. package/dist/types/cache/cf/cf-cache-store.d.ts +1 -1
  7. package/dist/types/client-urls/navigation.d.ts +11 -0
  8. package/dist/types/client-urls/revalidate-chain.d.ts +33 -0
  9. package/dist/types/client-urls/types.d.ts +41 -14
  10. package/dist/types/client.d.ts +2 -0
  11. package/dist/types/index.d.ts +1 -1
  12. package/dist/types/index.rsc.d.ts +1 -1
  13. package/dist/types/router/is-action.d.ts +34 -0
  14. package/dist/types/rsc/shell-capture-constants.d.ts +1 -1
  15. package/dist/types/testing/index.d.ts +3 -1
  16. package/dist/types/testing/run-client-revalidate.d.ts +43 -0
  17. package/dist/types/testing/to-url.d.ts +2 -0
  18. package/dist/types/types/handler-context.d.ts +12 -5
  19. package/dist/types/types/index.d.ts +1 -1
  20. package/dist/types/vite/plugins/expose-action-id.d.ts +14 -0
  21. package/dist/vite/index.js +19 -6
  22. package/package.json +6 -5
  23. package/skills/bundle-analysis/SKILL.md +1 -1
  24. package/skills/client-urls/SKILL.md +26 -4
  25. package/skills/loader/SKILL.md +1 -0
  26. package/skills/testing/SKILL.md +2 -1
  27. package/skills/testing/bindings.md +1 -1
  28. package/skills/testing/cache-prerender.md +1 -1
  29. package/skills/testing/client-components.md +1 -1
  30. package/skills/testing/e2e-parity.md +1 -1
  31. package/skills/testing/flight.md +1 -1
  32. package/skills/testing/handles.md +1 -1
  33. package/skills/testing/loader.md +1 -1
  34. package/skills/testing/middleware.md +1 -1
  35. package/skills/testing/render-handler.md +1 -1
  36. package/skills/testing/response-routes.md +1 -1
  37. package/skills/testing/reverse-and-types.md +1 -1
  38. package/skills/testing/server-actions.md +1 -1
  39. package/skills/testing/server-tree.md +1 -1
  40. package/skills/testing/setup.md +1 -1
  41. package/skills/typesafety/route-types.md +1 -0
  42. package/src/browser/partial-update.ts +11 -2
  43. package/src/browser/server-action-bridge.ts +9 -2
  44. package/src/cache/cache-runtime.ts +2 -2
  45. package/src/cache/cf/cf-cache-constants.ts +1 -1
  46. package/src/cache/cf/cf-cache-store.ts +1 -1
  47. package/src/client-urls/navigation.ts +40 -42
  48. package/src/client-urls/revalidate-chain.ts +83 -0
  49. package/src/client-urls/types.ts +41 -13
  50. package/src/client.tsx +5 -0
  51. package/src/index.rsc.ts +1 -0
  52. package/src/index.ts +1 -0
  53. package/src/router/is-action.ts +100 -0
  54. package/src/router/revalidation.ts +5 -48
  55. package/src/rsc/server-action.ts +2 -4
  56. package/src/rsc/shell-capture-constants.ts +1 -1
  57. package/src/rsc/shell-capture.ts +2 -2
  58. package/src/testing/index.ts +4 -1
  59. package/src/testing/run-client-revalidate.ts +108 -0
  60. package/src/testing/run-transition-when.ts +1 -3
  61. package/src/testing/to-url.ts +5 -0
  62. package/src/types/handler-context.ts +13 -5
  63. package/src/types/index.ts +1 -0
  64. package/src/vite/plugins/expose-action-id.ts +29 -1
  65. package/dist/__internal.d.ts +0 -83
  66. package/dist/__internal.d.ts.map +0 -1
  67. package/dist/__internal.js +0 -19
  68. package/dist/__internal.js.map +0 -1
  69. package/dist/__mocks__/version.d.ts +0 -7
  70. package/dist/__mocks__/version.d.ts.map +0 -1
  71. package/dist/__mocks__/version.js +0 -7
  72. package/dist/__mocks__/version.js.map +0 -1
  73. package/dist/__tests__/client-href.test.d.ts +0 -2
  74. package/dist/__tests__/client-href.test.d.ts.map +0 -1
  75. package/dist/__tests__/client-href.test.js +0 -74
  76. package/dist/__tests__/client-href.test.js.map +0 -1
  77. package/dist/__tests__/component-utils.test.d.ts +0 -2
  78. package/dist/__tests__/component-utils.test.d.ts.map +0 -1
  79. package/dist/__tests__/component-utils.test.js +0 -51
  80. package/dist/__tests__/component-utils.test.js.map +0 -1
  81. package/dist/__tests__/event-controller.test.d.ts +0 -2
  82. package/dist/__tests__/event-controller.test.d.ts.map +0 -1
  83. package/dist/__tests__/event-controller.test.js +0 -538
  84. package/dist/__tests__/event-controller.test.js.map +0 -1
  85. package/dist/__tests__/helpers/route-tree.d.ts +0 -118
  86. package/dist/__tests__/helpers/route-tree.d.ts.map +0 -1
  87. package/dist/__tests__/helpers/route-tree.js +0 -374
  88. package/dist/__tests__/helpers/route-tree.js.map +0 -1
  89. package/dist/__tests__/match-result.test.d.ts +0 -2
  90. package/dist/__tests__/match-result.test.d.ts.map +0 -1
  91. package/dist/__tests__/match-result.test.js +0 -154
  92. package/dist/__tests__/match-result.test.js.map +0 -1
  93. package/dist/__tests__/navigation-store.test.d.ts +0 -2
  94. package/dist/__tests__/navigation-store.test.d.ts.map +0 -1
  95. package/dist/__tests__/navigation-store.test.js +0 -440
  96. package/dist/__tests__/navigation-store.test.js.map +0 -1
  97. package/dist/__tests__/partial-update.test.d.ts +0 -2
  98. package/dist/__tests__/partial-update.test.d.ts.map +0 -1
  99. package/dist/__tests__/partial-update.test.js +0 -1009
  100. package/dist/__tests__/partial-update.test.js.map +0 -1
  101. package/dist/__tests__/reverse-types.test.d.ts +0 -8
  102. package/dist/__tests__/reverse-types.test.d.ts.map +0 -1
  103. package/dist/__tests__/reverse-types.test.js +0 -656
  104. package/dist/__tests__/reverse-types.test.js.map +0 -1
  105. package/dist/__tests__/route-definition.test.d.ts +0 -2
  106. package/dist/__tests__/route-definition.test.d.ts.map +0 -1
  107. package/dist/__tests__/route-definition.test.js +0 -55
  108. package/dist/__tests__/route-definition.test.js.map +0 -1
  109. package/dist/__tests__/router-helpers.test.d.ts +0 -2
  110. package/dist/__tests__/router-helpers.test.d.ts.map +0 -1
  111. package/dist/__tests__/router-helpers.test.js +0 -377
  112. package/dist/__tests__/router-helpers.test.js.map +0 -1
  113. package/dist/__tests__/router-integration-2.test.d.ts +0 -2
  114. package/dist/__tests__/router-integration-2.test.d.ts.map +0 -1
  115. package/dist/__tests__/router-integration-2.test.js +0 -426
  116. package/dist/__tests__/router-integration-2.test.js.map +0 -1
  117. package/dist/__tests__/router-integration.test.d.ts +0 -2
  118. package/dist/__tests__/router-integration.test.d.ts.map +0 -1
  119. package/dist/__tests__/router-integration.test.js +0 -1051
  120. package/dist/__tests__/router-integration.test.js.map +0 -1
  121. package/dist/__tests__/search-params.test.d.ts +0 -5
  122. package/dist/__tests__/search-params.test.d.ts.map +0 -1
  123. package/dist/__tests__/search-params.test.js +0 -306
  124. package/dist/__tests__/search-params.test.js.map +0 -1
  125. package/dist/__tests__/segment-system.test.d.ts +0 -2
  126. package/dist/__tests__/segment-system.test.d.ts.map +0 -1
  127. package/dist/__tests__/segment-system.test.js +0 -627
  128. package/dist/__tests__/segment-system.test.js.map +0 -1
  129. package/dist/__tests__/static-handler-types.test.d.ts +0 -8
  130. package/dist/__tests__/static-handler-types.test.d.ts.map +0 -1
  131. package/dist/__tests__/static-handler-types.test.js +0 -63
  132. package/dist/__tests__/static-handler-types.test.js.map +0 -1
  133. package/dist/__tests__/urls.test.d.ts +0 -2
  134. package/dist/__tests__/urls.test.d.ts.map +0 -1
  135. package/dist/__tests__/urls.test.js +0 -421
  136. package/dist/__tests__/urls.test.js.map +0 -1
  137. package/dist/__tests__/use-mount.test.d.ts +0 -2
  138. package/dist/__tests__/use-mount.test.d.ts.map +0 -1
  139. package/dist/__tests__/use-mount.test.js +0 -35
  140. package/dist/__tests__/use-mount.test.js.map +0 -1
  141. package/dist/bin/rango.d.ts +0 -2
  142. package/dist/bin/rango.d.ts.map +0 -1
  143. package/dist/bin/rango.js.map +0 -1
  144. package/dist/browser/event-controller.d.ts +0 -191
  145. package/dist/browser/event-controller.d.ts.map +0 -1
  146. package/dist/browser/event-controller.js +0 -559
  147. package/dist/browser/event-controller.js.map +0 -1
  148. package/dist/browser/index.d.ts +0 -2
  149. package/dist/browser/index.d.ts.map +0 -1
  150. package/dist/browser/index.js +0 -14
  151. package/dist/browser/index.js.map +0 -1
  152. package/dist/browser/link-interceptor.d.ts +0 -38
  153. package/dist/browser/link-interceptor.d.ts.map +0 -1
  154. package/dist/browser/link-interceptor.js +0 -99
  155. package/dist/browser/link-interceptor.js.map +0 -1
  156. package/dist/browser/logging.d.ts +0 -10
  157. package/dist/browser/logging.d.ts.map +0 -1
  158. package/dist/browser/logging.js +0 -29
  159. package/dist/browser/logging.js.map +0 -1
  160. package/dist/browser/lru-cache.d.ts +0 -17
  161. package/dist/browser/lru-cache.d.ts.map +0 -1
  162. package/dist/browser/lru-cache.js +0 -50
  163. package/dist/browser/lru-cache.js.map +0 -1
  164. package/dist/browser/merge-segment-loaders.d.ts +0 -39
  165. package/dist/browser/merge-segment-loaders.d.ts.map +0 -1
  166. package/dist/browser/merge-segment-loaders.js +0 -102
  167. package/dist/browser/merge-segment-loaders.js.map +0 -1
  168. package/dist/browser/navigation-bridge.d.ts +0 -102
  169. package/dist/browser/navigation-bridge.d.ts.map +0 -1
  170. package/dist/browser/navigation-bridge.js +0 -708
  171. package/dist/browser/navigation-bridge.js.map +0 -1
  172. package/dist/browser/navigation-client.d.ts +0 -25
  173. package/dist/browser/navigation-client.d.ts.map +0 -1
  174. package/dist/browser/navigation-client.js +0 -157
  175. package/dist/browser/navigation-client.js.map +0 -1
  176. package/dist/browser/navigation-store.d.ts +0 -101
  177. package/dist/browser/navigation-store.d.ts.map +0 -1
  178. package/dist/browser/navigation-store.js +0 -625
  179. package/dist/browser/navigation-store.js.map +0 -1
  180. package/dist/browser/partial-update.d.ts +0 -75
  181. package/dist/browser/partial-update.d.ts.map +0 -1
  182. package/dist/browser/partial-update.js +0 -426
  183. package/dist/browser/partial-update.js.map +0 -1
  184. package/dist/browser/react/Link.d.ts +0 -86
  185. package/dist/browser/react/Link.d.ts.map +0 -1
  186. package/dist/browser/react/Link.js +0 -128
  187. package/dist/browser/react/Link.js.map +0 -1
  188. package/dist/browser/react/NavigationProvider.d.ts +0 -63
  189. package/dist/browser/react/NavigationProvider.d.ts.map +0 -1
  190. package/dist/browser/react/NavigationProvider.js +0 -216
  191. package/dist/browser/react/NavigationProvider.js.map +0 -1
  192. package/dist/browser/react/ScrollRestoration.d.ts +0 -75
  193. package/dist/browser/react/ScrollRestoration.d.ts.map +0 -1
  194. package/dist/browser/react/ScrollRestoration.js +0 -57
  195. package/dist/browser/react/ScrollRestoration.js.map +0 -1
  196. package/dist/browser/react/context.d.ts +0 -46
  197. package/dist/browser/react/context.d.ts.map +0 -1
  198. package/dist/browser/react/context.js +0 -10
  199. package/dist/browser/react/context.js.map +0 -1
  200. package/dist/browser/react/index.d.ts +0 -11
  201. package/dist/browser/react/index.d.ts.map +0 -1
  202. package/dist/browser/react/index.js +0 -22
  203. package/dist/browser/react/index.js.map +0 -1
  204. package/dist/browser/react/location-state-shared.d.ts +0 -63
  205. package/dist/browser/react/location-state-shared.d.ts.map +0 -1
  206. package/dist/browser/react/location-state-shared.js +0 -81
  207. package/dist/browser/react/location-state-shared.js.map +0 -1
  208. package/dist/browser/react/location-state.d.ts +0 -23
  209. package/dist/browser/react/location-state.d.ts.map +0 -1
  210. package/dist/browser/react/location-state.js +0 -29
  211. package/dist/browser/react/location-state.js.map +0 -1
  212. package/dist/browser/react/mount-context.d.ts +0 -24
  213. package/dist/browser/react/mount-context.d.ts.map +0 -1
  214. package/dist/browser/react/mount-context.js +0 -24
  215. package/dist/browser/react/mount-context.js.map +0 -1
  216. package/dist/browser/react/use-action.d.ts +0 -64
  217. package/dist/browser/react/use-action.d.ts.map +0 -1
  218. package/dist/browser/react/use-action.js +0 -134
  219. package/dist/browser/react/use-action.js.map +0 -1
  220. package/dist/browser/react/use-client-cache.d.ts +0 -41
  221. package/dist/browser/react/use-client-cache.d.ts.map +0 -1
  222. package/dist/browser/react/use-client-cache.js +0 -39
  223. package/dist/browser/react/use-client-cache.js.map +0 -1
  224. package/dist/browser/react/use-handle.d.ts +0 -31
  225. package/dist/browser/react/use-handle.d.ts.map +0 -1
  226. package/dist/browser/react/use-handle.js +0 -144
  227. package/dist/browser/react/use-handle.js.map +0 -1
  228. package/dist/browser/react/use-href.d.ts +0 -33
  229. package/dist/browser/react/use-href.d.ts.map +0 -1
  230. package/dist/browser/react/use-href.js +0 -39
  231. package/dist/browser/react/use-href.js.map +0 -1
  232. package/dist/browser/react/use-link-status.d.ts +0 -37
  233. package/dist/browser/react/use-link-status.d.ts.map +0 -1
  234. package/dist/browser/react/use-link-status.js +0 -99
  235. package/dist/browser/react/use-link-status.js.map +0 -1
  236. package/dist/browser/react/use-mount.d.ts +0 -25
  237. package/dist/browser/react/use-mount.d.ts.map +0 -1
  238. package/dist/browser/react/use-mount.js +0 -30
  239. package/dist/browser/react/use-mount.js.map +0 -1
  240. package/dist/browser/react/use-navigation.d.ts +0 -27
  241. package/dist/browser/react/use-navigation.d.ts.map +0 -1
  242. package/dist/browser/react/use-navigation.js +0 -87
  243. package/dist/browser/react/use-navigation.js.map +0 -1
  244. package/dist/browser/react/use-segments.d.ts +0 -38
  245. package/dist/browser/react/use-segments.d.ts.map +0 -1
  246. package/dist/browser/react/use-segments.js +0 -130
  247. package/dist/browser/react/use-segments.js.map +0 -1
  248. package/dist/browser/request-controller.d.ts +0 -26
  249. package/dist/browser/request-controller.d.ts.map +0 -1
  250. package/dist/browser/request-controller.js +0 -147
  251. package/dist/browser/request-controller.js.map +0 -1
  252. package/dist/browser/rsc-router.d.ts +0 -129
  253. package/dist/browser/rsc-router.d.ts.map +0 -1
  254. package/dist/browser/rsc-router.js +0 -195
  255. package/dist/browser/rsc-router.js.map +0 -1
  256. package/dist/browser/scroll-restoration.d.ts +0 -93
  257. package/dist/browser/scroll-restoration.d.ts.map +0 -1
  258. package/dist/browser/scroll-restoration.js +0 -321
  259. package/dist/browser/scroll-restoration.js.map +0 -1
  260. package/dist/browser/segment-structure-assert.d.ts +0 -17
  261. package/dist/browser/segment-structure-assert.d.ts.map +0 -1
  262. package/dist/browser/segment-structure-assert.js +0 -59
  263. package/dist/browser/segment-structure-assert.js.map +0 -1
  264. package/dist/browser/server-action-bridge.d.ts +0 -26
  265. package/dist/browser/server-action-bridge.d.ts.map +0 -1
  266. package/dist/browser/server-action-bridge.js +0 -668
  267. package/dist/browser/server-action-bridge.js.map +0 -1
  268. package/dist/browser/shallow.d.ts +0 -12
  269. package/dist/browser/shallow.d.ts.map +0 -1
  270. package/dist/browser/shallow.js +0 -34
  271. package/dist/browser/shallow.js.map +0 -1
  272. package/dist/browser/types.d.ts +0 -369
  273. package/dist/browser/types.d.ts.map +0 -1
  274. package/dist/browser/types.js +0 -2
  275. package/dist/browser/types.js.map +0 -1
  276. package/dist/build/__tests__/generate-cli.test.d.ts +0 -2
  277. package/dist/build/__tests__/generate-cli.test.d.ts.map +0 -1
  278. package/dist/build/__tests__/generate-cli.test.js +0 -237
  279. package/dist/build/__tests__/generate-cli.test.js.map +0 -1
  280. package/dist/build/__tests__/generate-manifest.test.d.ts +0 -2
  281. package/dist/build/__tests__/generate-manifest.test.d.ts.map +0 -1
  282. package/dist/build/__tests__/generate-manifest.test.js +0 -119
  283. package/dist/build/__tests__/generate-manifest.test.js.map +0 -1
  284. package/dist/build/__tests__/generate-route-types.test.d.ts +0 -2
  285. package/dist/build/__tests__/generate-route-types.test.d.ts.map +0 -1
  286. package/dist/build/__tests__/generate-route-types.test.js +0 -620
  287. package/dist/build/__tests__/generate-route-types.test.js.map +0 -1
  288. package/dist/build/__tests__/per-router-manifest.test.d.ts +0 -2
  289. package/dist/build/__tests__/per-router-manifest.test.d.ts.map +0 -1
  290. package/dist/build/__tests__/per-router-manifest.test.js +0 -308
  291. package/dist/build/__tests__/per-router-manifest.test.js.map +0 -1
  292. package/dist/build/generate-manifest.d.ts +0 -81
  293. package/dist/build/generate-manifest.d.ts.map +0 -1
  294. package/dist/build/generate-manifest.js +0 -276
  295. package/dist/build/generate-manifest.js.map +0 -1
  296. package/dist/build/generate-route-types.d.ts +0 -115
  297. package/dist/build/generate-route-types.d.ts.map +0 -1
  298. package/dist/build/generate-route-types.js +0 -740
  299. package/dist/build/generate-route-types.js.map +0 -1
  300. package/dist/build/index.d.ts +0 -21
  301. package/dist/build/index.d.ts.map +0 -1
  302. package/dist/build/index.js +0 -21
  303. package/dist/build/index.js.map +0 -1
  304. package/dist/build/route-trie.d.ts +0 -71
  305. package/dist/build/route-trie.d.ts.map +0 -1
  306. package/dist/build/route-trie.js +0 -175
  307. package/dist/build/route-trie.js.map +0 -1
  308. package/dist/cache/__tests__/cache-scope.test.d.ts +0 -2
  309. package/dist/cache/__tests__/cache-scope.test.d.ts.map +0 -1
  310. package/dist/cache/__tests__/cache-scope.test.js +0 -208
  311. package/dist/cache/__tests__/cache-scope.test.js.map +0 -1
  312. package/dist/cache/__tests__/document-cache.test.d.ts +0 -2
  313. package/dist/cache/__tests__/document-cache.test.d.ts.map +0 -1
  314. package/dist/cache/__tests__/document-cache.test.js +0 -345
  315. package/dist/cache/__tests__/document-cache.test.js.map +0 -1
  316. package/dist/cache/__tests__/memory-segment-store.test.d.ts +0 -2
  317. package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +0 -1
  318. package/dist/cache/__tests__/memory-segment-store.test.js +0 -425
  319. package/dist/cache/__tests__/memory-segment-store.test.js.map +0 -1
  320. package/dist/cache/__tests__/memory-store.test.d.ts +0 -2
  321. package/dist/cache/__tests__/memory-store.test.d.ts.map +0 -1
  322. package/dist/cache/__tests__/memory-store.test.js +0 -367
  323. package/dist/cache/__tests__/memory-store.test.js.map +0 -1
  324. package/dist/cache/cache-scope.d.ts +0 -102
  325. package/dist/cache/cache-scope.d.ts.map +0 -1
  326. package/dist/cache/cache-scope.js +0 -440
  327. package/dist/cache/cache-scope.js.map +0 -1
  328. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +0 -2
  329. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +0 -1
  330. package/dist/cache/cf/__tests__/cf-cache-store.test.js +0 -330
  331. package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +0 -1
  332. package/dist/cache/cf/cf-cache-store.d.ts +0 -165
  333. package/dist/cache/cf/cf-cache-store.d.ts.map +0 -1
  334. package/dist/cache/cf/cf-cache-store.js +0 -242
  335. package/dist/cache/cf/cf-cache-store.js.map +0 -1
  336. package/dist/cache/cf/index.d.ts +0 -14
  337. package/dist/cache/cf/index.d.ts.map +0 -1
  338. package/dist/cache/cf/index.js +0 -17
  339. package/dist/cache/cf/index.js.map +0 -1
  340. package/dist/cache/document-cache.d.ts +0 -64
  341. package/dist/cache/document-cache.d.ts.map +0 -1
  342. package/dist/cache/document-cache.js +0 -228
  343. package/dist/cache/document-cache.js.map +0 -1
  344. package/dist/cache/index.d.ts +0 -19
  345. package/dist/cache/index.d.ts.map +0 -1
  346. package/dist/cache/index.js +0 -21
  347. package/dist/cache/index.js.map +0 -1
  348. package/dist/cache/memory-segment-store.d.ts +0 -110
  349. package/dist/cache/memory-segment-store.d.ts.map +0 -1
  350. package/dist/cache/memory-segment-store.js +0 -117
  351. package/dist/cache/memory-segment-store.js.map +0 -1
  352. package/dist/cache/memory-store.d.ts +0 -41
  353. package/dist/cache/memory-store.d.ts.map +0 -1
  354. package/dist/cache/memory-store.js +0 -191
  355. package/dist/cache/memory-store.js.map +0 -1
  356. package/dist/cache/types.d.ts +0 -317
  357. package/dist/cache/types.d.ts.map +0 -1
  358. package/dist/cache/types.js +0 -12
  359. package/dist/cache/types.js.map +0 -1
  360. package/dist/client.d.ts +0 -248
  361. package/dist/client.d.ts.map +0 -1
  362. package/dist/client.js +0 -367
  363. package/dist/client.js.map +0 -1
  364. package/dist/client.rsc.d.ts +0 -26
  365. package/dist/client.rsc.d.ts.map +0 -1
  366. package/dist/client.rsc.js +0 -46
  367. package/dist/client.rsc.js.map +0 -1
  368. package/dist/component-utils.d.ts +0 -36
  369. package/dist/component-utils.d.ts.map +0 -1
  370. package/dist/component-utils.js +0 -61
  371. package/dist/component-utils.js.map +0 -1
  372. package/dist/components/DefaultDocument.d.ts +0 -13
  373. package/dist/components/DefaultDocument.d.ts.map +0 -1
  374. package/dist/components/DefaultDocument.js +0 -15
  375. package/dist/components/DefaultDocument.js.map +0 -1
  376. package/dist/debug.d.ts +0 -58
  377. package/dist/debug.d.ts.map +0 -1
  378. package/dist/debug.js +0 -157
  379. package/dist/debug.js.map +0 -1
  380. package/dist/default-error-boundary.d.ts +0 -11
  381. package/dist/default-error-boundary.d.ts.map +0 -1
  382. package/dist/default-error-boundary.js +0 -45
  383. package/dist/default-error-boundary.js.map +0 -1
  384. package/dist/deps/browser.d.ts +0 -2
  385. package/dist/deps/browser.d.ts.map +0 -1
  386. package/dist/deps/browser.js +0 -3
  387. package/dist/deps/browser.js.map +0 -1
  388. package/dist/deps/html-stream-client.d.ts +0 -2
  389. package/dist/deps/html-stream-client.d.ts.map +0 -1
  390. package/dist/deps/html-stream-client.js +0 -3
  391. package/dist/deps/html-stream-client.js.map +0 -1
  392. package/dist/deps/html-stream-server.d.ts +0 -2
  393. package/dist/deps/html-stream-server.d.ts.map +0 -1
  394. package/dist/deps/html-stream-server.js +0 -3
  395. package/dist/deps/html-stream-server.js.map +0 -1
  396. package/dist/deps/rsc.d.ts +0 -2
  397. package/dist/deps/rsc.d.ts.map +0 -1
  398. package/dist/deps/rsc.js +0 -4
  399. package/dist/deps/rsc.js.map +0 -1
  400. package/dist/deps/ssr.d.ts +0 -2
  401. package/dist/deps/ssr.d.ts.map +0 -1
  402. package/dist/deps/ssr.js +0 -3
  403. package/dist/deps/ssr.js.map +0 -1
  404. package/dist/errors.d.ts +0 -174
  405. package/dist/errors.d.ts.map +0 -1
  406. package/dist/errors.js +0 -241
  407. package/dist/errors.js.map +0 -1
  408. package/dist/handle.d.ts +0 -78
  409. package/dist/handle.d.ts.map +0 -1
  410. package/dist/handle.js +0 -82
  411. package/dist/handle.js.map +0 -1
  412. package/dist/handles/MetaTags.d.ts +0 -14
  413. package/dist/handles/MetaTags.d.ts.map +0 -1
  414. package/dist/handles/MetaTags.js +0 -136
  415. package/dist/handles/MetaTags.js.map +0 -1
  416. package/dist/handles/index.d.ts +0 -6
  417. package/dist/handles/index.d.ts.map +0 -1
  418. package/dist/handles/index.js +0 -6
  419. package/dist/handles/index.js.map +0 -1
  420. package/dist/handles/meta.d.ts +0 -39
  421. package/dist/handles/meta.d.ts.map +0 -1
  422. package/dist/handles/meta.js +0 -202
  423. package/dist/handles/meta.js.map +0 -1
  424. package/dist/host/__tests__/errors.test.d.ts +0 -2
  425. package/dist/host/__tests__/errors.test.d.ts.map +0 -1
  426. package/dist/host/__tests__/errors.test.js +0 -76
  427. package/dist/host/__tests__/errors.test.js.map +0 -1
  428. package/dist/host/__tests__/pattern-comprehensive.test.d.ts +0 -2
  429. package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +0 -1
  430. package/dist/host/__tests__/pattern-comprehensive.test.js +0 -732
  431. package/dist/host/__tests__/pattern-comprehensive.test.js.map +0 -1
  432. package/dist/host/__tests__/pattern-matcher.test.d.ts +0 -2
  433. package/dist/host/__tests__/pattern-matcher.test.d.ts.map +0 -1
  434. package/dist/host/__tests__/pattern-matcher.test.js +0 -251
  435. package/dist/host/__tests__/pattern-matcher.test.js.map +0 -1
  436. package/dist/host/__tests__/router.test.d.ts +0 -2
  437. package/dist/host/__tests__/router.test.d.ts.map +0 -1
  438. package/dist/host/__tests__/router.test.js +0 -241
  439. package/dist/host/__tests__/router.test.js.map +0 -1
  440. package/dist/host/__tests__/testing.test.d.ts +0 -2
  441. package/dist/host/__tests__/testing.test.d.ts.map +0 -1
  442. package/dist/host/__tests__/testing.test.js +0 -64
  443. package/dist/host/__tests__/testing.test.js.map +0 -1
  444. package/dist/host/__tests__/utils.test.d.ts +0 -2
  445. package/dist/host/__tests__/utils.test.d.ts.map +0 -1
  446. package/dist/host/__tests__/utils.test.js +0 -29
  447. package/dist/host/__tests__/utils.test.js.map +0 -1
  448. package/dist/host/cookie-handler.d.ts +0 -34
  449. package/dist/host/cookie-handler.d.ts.map +0 -1
  450. package/dist/host/cookie-handler.js +0 -124
  451. package/dist/host/cookie-handler.js.map +0 -1
  452. package/dist/host/errors.d.ts +0 -56
  453. package/dist/host/errors.d.ts.map +0 -1
  454. package/dist/host/errors.js +0 -79
  455. package/dist/host/errors.js.map +0 -1
  456. package/dist/host/index.d.ts +0 -29
  457. package/dist/host/index.d.ts.map +0 -1
  458. package/dist/host/index.js +0 -32
  459. package/dist/host/index.js.map +0 -1
  460. package/dist/host/pattern-matcher.d.ts +0 -36
  461. package/dist/host/pattern-matcher.d.ts.map +0 -1
  462. package/dist/host/pattern-matcher.js +0 -172
  463. package/dist/host/pattern-matcher.js.map +0 -1
  464. package/dist/host/router.d.ts +0 -26
  465. package/dist/host/router.d.ts.map +0 -1
  466. package/dist/host/router.js +0 -218
  467. package/dist/host/router.js.map +0 -1
  468. package/dist/host/testing.d.ts +0 -36
  469. package/dist/host/testing.d.ts.map +0 -1
  470. package/dist/host/testing.js +0 -55
  471. package/dist/host/testing.js.map +0 -1
  472. package/dist/host/types.d.ts +0 -115
  473. package/dist/host/types.d.ts.map +0 -1
  474. package/dist/host/types.js +0 -7
  475. package/dist/host/types.js.map +0 -1
  476. package/dist/host/utils.d.ts +0 -21
  477. package/dist/host/utils.d.ts.map +0 -1
  478. package/dist/host/utils.js +0 -23
  479. package/dist/host/utils.js.map +0 -1
  480. package/dist/href-client.d.ts +0 -131
  481. package/dist/href-client.d.ts.map +0 -1
  482. package/dist/href-client.js +0 -64
  483. package/dist/href-client.js.map +0 -1
  484. package/dist/href-context.d.ts +0 -29
  485. package/dist/href-context.d.ts.map +0 -1
  486. package/dist/href-context.js +0 -21
  487. package/dist/href-context.js.map +0 -1
  488. package/dist/index.d.ts +0 -73
  489. package/dist/index.d.ts.map +0 -1
  490. package/dist/index.js +0 -91
  491. package/dist/index.js.map +0 -1
  492. package/dist/index.rsc.d.ts +0 -32
  493. package/dist/index.rsc.d.ts.map +0 -1
  494. package/dist/index.rsc.js +0 -40
  495. package/dist/index.rsc.js.map +0 -1
  496. package/dist/internal-debug.d.ts +0 -2
  497. package/dist/internal-debug.d.ts.map +0 -1
  498. package/dist/internal-debug.js +0 -5
  499. package/dist/internal-debug.js.map +0 -1
  500. package/dist/loader.d.ts +0 -14
  501. package/dist/loader.d.ts.map +0 -1
  502. package/dist/loader.js +0 -20
  503. package/dist/loader.js.map +0 -1
  504. package/dist/loader.rsc.d.ts +0 -19
  505. package/dist/loader.rsc.d.ts.map +0 -1
  506. package/dist/loader.rsc.js +0 -99
  507. package/dist/loader.rsc.js.map +0 -1
  508. package/dist/network-error-thrower.d.ts +0 -17
  509. package/dist/network-error-thrower.d.ts.map +0 -1
  510. package/dist/network-error-thrower.js +0 -14
  511. package/dist/network-error-thrower.js.map +0 -1
  512. package/dist/outlet-context.d.ts +0 -13
  513. package/dist/outlet-context.d.ts.map +0 -1
  514. package/dist/outlet-context.js +0 -3
  515. package/dist/outlet-context.js.map +0 -1
  516. package/dist/prerender/__tests__/param-hash.test.d.ts +0 -2
  517. package/dist/prerender/__tests__/param-hash.test.d.ts.map +0 -1
  518. package/dist/prerender/__tests__/param-hash.test.js +0 -148
  519. package/dist/prerender/__tests__/param-hash.test.js.map +0 -1
  520. package/dist/prerender/param-hash.d.ts +0 -16
  521. package/dist/prerender/param-hash.d.ts.map +0 -1
  522. package/dist/prerender/param-hash.js +0 -36
  523. package/dist/prerender/param-hash.js.map +0 -1
  524. package/dist/prerender/store.d.ts +0 -38
  525. package/dist/prerender/store.d.ts.map +0 -1
  526. package/dist/prerender/store.js +0 -61
  527. package/dist/prerender/store.js.map +0 -1
  528. package/dist/prerender.d.ts +0 -66
  529. package/dist/prerender.d.ts.map +0 -1
  530. package/dist/prerender.js +0 -57
  531. package/dist/prerender.js.map +0 -1
  532. package/dist/reverse.d.ts +0 -196
  533. package/dist/reverse.d.ts.map +0 -1
  534. package/dist/reverse.js +0 -78
  535. package/dist/reverse.js.map +0 -1
  536. package/dist/root-error-boundary.d.ts +0 -33
  537. package/dist/root-error-boundary.d.ts.map +0 -1
  538. package/dist/root-error-boundary.js +0 -165
  539. package/dist/root-error-boundary.js.map +0 -1
  540. package/dist/route-content-wrapper.d.ts +0 -46
  541. package/dist/route-content-wrapper.d.ts.map +0 -1
  542. package/dist/route-content-wrapper.js +0 -77
  543. package/dist/route-content-wrapper.js.map +0 -1
  544. package/dist/route-definition.d.ts +0 -421
  545. package/dist/route-definition.d.ts.map +0 -1
  546. package/dist/route-definition.js +0 -868
  547. package/dist/route-definition.js.map +0 -1
  548. package/dist/route-map-builder.d.ts +0 -155
  549. package/dist/route-map-builder.d.ts.map +0 -1
  550. package/dist/route-map-builder.js +0 -237
  551. package/dist/route-map-builder.js.map +0 -1
  552. package/dist/route-types.d.ts +0 -165
  553. package/dist/route-types.d.ts.map +0 -1
  554. package/dist/route-types.js +0 -7
  555. package/dist/route-types.js.map +0 -1
  556. package/dist/router/__tests__/handler-context.test.d.ts +0 -2
  557. package/dist/router/__tests__/handler-context.test.d.ts.map +0 -1
  558. package/dist/router/__tests__/handler-context.test.js +0 -65
  559. package/dist/router/__tests__/handler-context.test.js.map +0 -1
  560. package/dist/router/__tests__/loader-cycle-detection.test.d.ts +0 -2
  561. package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +0 -1
  562. package/dist/router/__tests__/loader-cycle-detection.test.js +0 -221
  563. package/dist/router/__tests__/loader-cycle-detection.test.js.map +0 -1
  564. package/dist/router/__tests__/match-context.test.d.ts +0 -2
  565. package/dist/router/__tests__/match-context.test.d.ts.map +0 -1
  566. package/dist/router/__tests__/match-context.test.js +0 -92
  567. package/dist/router/__tests__/match-context.test.js.map +0 -1
  568. package/dist/router/__tests__/match-pipelines.test.d.ts +0 -2
  569. package/dist/router/__tests__/match-pipelines.test.d.ts.map +0 -1
  570. package/dist/router/__tests__/match-pipelines.test.js +0 -417
  571. package/dist/router/__tests__/match-pipelines.test.js.map +0 -1
  572. package/dist/router/__tests__/match-result.test.d.ts +0 -2
  573. package/dist/router/__tests__/match-result.test.d.ts.map +0 -1
  574. package/dist/router/__tests__/match-result.test.js +0 -457
  575. package/dist/router/__tests__/match-result.test.js.map +0 -1
  576. package/dist/router/__tests__/on-error.test.d.ts +0 -2
  577. package/dist/router/__tests__/on-error.test.d.ts.map +0 -1
  578. package/dist/router/__tests__/on-error.test.js +0 -678
  579. package/dist/router/__tests__/on-error.test.js.map +0 -1
  580. package/dist/router/__tests__/pattern-matching.test.d.ts +0 -2
  581. package/dist/router/__tests__/pattern-matching.test.d.ts.map +0 -1
  582. package/dist/router/__tests__/pattern-matching.test.js +0 -629
  583. package/dist/router/__tests__/pattern-matching.test.js.map +0 -1
  584. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +0 -2
  585. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +0 -1
  586. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +0 -155
  587. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +0 -1
  588. package/dist/router/error-handling.d.ts +0 -77
  589. package/dist/router/error-handling.d.ts.map +0 -1
  590. package/dist/router/error-handling.js +0 -202
  591. package/dist/router/error-handling.js.map +0 -1
  592. package/dist/router/handler-context.d.ts +0 -20
  593. package/dist/router/handler-context.d.ts.map +0 -1
  594. package/dist/router/handler-context.js +0 -198
  595. package/dist/router/handler-context.js.map +0 -1
  596. package/dist/router/intercept-resolution.d.ts +0 -66
  597. package/dist/router/intercept-resolution.d.ts.map +0 -1
  598. package/dist/router/intercept-resolution.js +0 -246
  599. package/dist/router/intercept-resolution.js.map +0 -1
  600. package/dist/router/loader-resolution.d.ts +0 -64
  601. package/dist/router/loader-resolution.d.ts.map +0 -1
  602. package/dist/router/loader-resolution.js +0 -284
  603. package/dist/router/loader-resolution.js.map +0 -1
  604. package/dist/router/logging.d.ts +0 -15
  605. package/dist/router/logging.d.ts.map +0 -1
  606. package/dist/router/logging.js +0 -99
  607. package/dist/router/logging.js.map +0 -1
  608. package/dist/router/manifest.d.ts +0 -22
  609. package/dist/router/manifest.d.ts.map +0 -1
  610. package/dist/router/manifest.js +0 -181
  611. package/dist/router/manifest.js.map +0 -1
  612. package/dist/router/match-api.d.ts +0 -35
  613. package/dist/router/match-api.d.ts.map +0 -1
  614. package/dist/router/match-api.js +0 -406
  615. package/dist/router/match-api.js.map +0 -1
  616. package/dist/router/match-context.d.ts +0 -206
  617. package/dist/router/match-context.d.ts.map +0 -1
  618. package/dist/router/match-context.js +0 -17
  619. package/dist/router/match-context.js.map +0 -1
  620. package/dist/router/match-middleware/background-revalidation.d.ts +0 -127
  621. package/dist/router/match-middleware/background-revalidation.d.ts.map +0 -1
  622. package/dist/router/match-middleware/background-revalidation.js +0 -75
  623. package/dist/router/match-middleware/background-revalidation.js.map +0 -1
  624. package/dist/router/match-middleware/cache-lookup.d.ts +0 -112
  625. package/dist/router/match-middleware/cache-lookup.d.ts.map +0 -1
  626. package/dist/router/match-middleware/cache-lookup.js +0 -257
  627. package/dist/router/match-middleware/cache-lookup.js.map +0 -1
  628. package/dist/router/match-middleware/cache-store.d.ts +0 -113
  629. package/dist/router/match-middleware/cache-store.d.ts.map +0 -1
  630. package/dist/router/match-middleware/cache-store.js +0 -108
  631. package/dist/router/match-middleware/cache-store.js.map +0 -1
  632. package/dist/router/match-middleware/index.d.ts +0 -81
  633. package/dist/router/match-middleware/index.d.ts.map +0 -1
  634. package/dist/router/match-middleware/index.js +0 -80
  635. package/dist/router/match-middleware/index.js.map +0 -1
  636. package/dist/router/match-middleware/intercept-resolution.d.ts +0 -117
  637. package/dist/router/match-middleware/intercept-resolution.d.ts.map +0 -1
  638. package/dist/router/match-middleware/intercept-resolution.js +0 -134
  639. package/dist/router/match-middleware/intercept-resolution.js.map +0 -1
  640. package/dist/router/match-middleware/segment-resolution.d.ts +0 -99
  641. package/dist/router/match-middleware/segment-resolution.d.ts.map +0 -1
  642. package/dist/router/match-middleware/segment-resolution.js +0 -53
  643. package/dist/router/match-middleware/segment-resolution.js.map +0 -1
  644. package/dist/router/match-pipelines.d.ts +0 -147
  645. package/dist/router/match-pipelines.d.ts.map +0 -1
  646. package/dist/router/match-pipelines.js +0 -82
  647. package/dist/router/match-pipelines.js.map +0 -1
  648. package/dist/router/match-result.d.ts +0 -126
  649. package/dist/router/match-result.d.ts.map +0 -1
  650. package/dist/router/match-result.js +0 -93
  651. package/dist/router/match-result.js.map +0 -1
  652. package/dist/router/metrics.d.ts +0 -20
  653. package/dist/router/metrics.d.ts.map +0 -1
  654. package/dist/router/metrics.js +0 -47
  655. package/dist/router/metrics.js.map +0 -1
  656. package/dist/router/middleware.d.ts +0 -249
  657. package/dist/router/middleware.d.ts.map +0 -1
  658. package/dist/router/middleware.js +0 -434
  659. package/dist/router/middleware.js.map +0 -1
  660. package/dist/router/middleware.test.d.ts +0 -2
  661. package/dist/router/middleware.test.d.ts.map +0 -1
  662. package/dist/router/middleware.test.js +0 -816
  663. package/dist/router/middleware.test.js.map +0 -1
  664. package/dist/router/pattern-matching.d.ts +0 -149
  665. package/dist/router/pattern-matching.d.ts.map +0 -1
  666. package/dist/router/pattern-matching.js +0 -349
  667. package/dist/router/pattern-matching.js.map +0 -1
  668. package/dist/router/revalidation.d.ts +0 -44
  669. package/dist/router/revalidation.d.ts.map +0 -1
  670. package/dist/router/revalidation.js +0 -147
  671. package/dist/router/revalidation.js.map +0 -1
  672. package/dist/router/router-context.d.ts +0 -135
  673. package/dist/router/router-context.d.ts.map +0 -1
  674. package/dist/router/router-context.js +0 -36
  675. package/dist/router/router-context.js.map +0 -1
  676. package/dist/router/segment-resolution.d.ts +0 -127
  677. package/dist/router/segment-resolution.d.ts.map +0 -1
  678. package/dist/router/segment-resolution.js +0 -919
  679. package/dist/router/segment-resolution.js.map +0 -1
  680. package/dist/router/trie-matching.d.ts +0 -40
  681. package/dist/router/trie-matching.d.ts.map +0 -1
  682. package/dist/router/trie-matching.js +0 -127
  683. package/dist/router/trie-matching.js.map +0 -1
  684. package/dist/router/types.d.ts +0 -136
  685. package/dist/router/types.d.ts.map +0 -1
  686. package/dist/router/types.js +0 -7
  687. package/dist/router/types.js.map +0 -1
  688. package/dist/router.d.ts +0 -753
  689. package/dist/router.d.ts.map +0 -1
  690. package/dist/router.gen.d.ts +0 -6
  691. package/dist/router.gen.d.ts.map +0 -1
  692. package/dist/router.gen.js +0 -6
  693. package/dist/router.gen.js.map +0 -1
  694. package/dist/router.js +0 -1304
  695. package/dist/router.js.map +0 -1
  696. package/dist/rsc/__tests__/helpers.test.d.ts +0 -2
  697. package/dist/rsc/__tests__/helpers.test.d.ts.map +0 -1
  698. package/dist/rsc/__tests__/helpers.test.js +0 -140
  699. package/dist/rsc/__tests__/helpers.test.js.map +0 -1
  700. package/dist/rsc/handler.d.ts +0 -45
  701. package/dist/rsc/handler.d.ts.map +0 -1
  702. package/dist/rsc/handler.js +0 -1172
  703. package/dist/rsc/handler.js.map +0 -1
  704. package/dist/rsc/helpers.d.ts +0 -16
  705. package/dist/rsc/helpers.d.ts.map +0 -1
  706. package/dist/rsc/helpers.js +0 -55
  707. package/dist/rsc/helpers.js.map +0 -1
  708. package/dist/rsc/index.d.ts +0 -22
  709. package/dist/rsc/index.d.ts.map +0 -1
  710. package/dist/rsc/index.js +0 -23
  711. package/dist/rsc/index.js.map +0 -1
  712. package/dist/rsc/nonce.d.ts +0 -9
  713. package/dist/rsc/nonce.d.ts.map +0 -1
  714. package/dist/rsc/nonce.js +0 -18
  715. package/dist/rsc/nonce.js.map +0 -1
  716. package/dist/rsc/types.d.ts +0 -206
  717. package/dist/rsc/types.d.ts.map +0 -1
  718. package/dist/rsc/types.js +0 -8
  719. package/dist/rsc/types.js.map +0 -1
  720. package/dist/search-params.d.ts +0 -103
  721. package/dist/search-params.d.ts.map +0 -1
  722. package/dist/search-params.js +0 -74
  723. package/dist/search-params.js.map +0 -1
  724. package/dist/segment-system.d.ts +0 -75
  725. package/dist/segment-system.d.ts.map +0 -1
  726. package/dist/segment-system.js +0 -336
  727. package/dist/segment-system.js.map +0 -1
  728. package/dist/server/context.d.ts +0 -245
  729. package/dist/server/context.d.ts.map +0 -1
  730. package/dist/server/context.js +0 -197
  731. package/dist/server/context.js.map +0 -1
  732. package/dist/server/fetchable-loader-store.d.ts +0 -18
  733. package/dist/server/fetchable-loader-store.d.ts.map +0 -1
  734. package/dist/server/fetchable-loader-store.js +0 -18
  735. package/dist/server/fetchable-loader-store.js.map +0 -1
  736. package/dist/server/handle-store.d.ts +0 -85
  737. package/dist/server/handle-store.d.ts.map +0 -1
  738. package/dist/server/handle-store.js +0 -142
  739. package/dist/server/handle-store.js.map +0 -1
  740. package/dist/server/loader-registry.d.ts +0 -55
  741. package/dist/server/loader-registry.d.ts.map +0 -1
  742. package/dist/server/loader-registry.js +0 -132
  743. package/dist/server/loader-registry.js.map +0 -1
  744. package/dist/server/request-context.d.ts +0 -226
  745. package/dist/server/request-context.d.ts.map +0 -1
  746. package/dist/server/request-context.js +0 -290
  747. package/dist/server/request-context.js.map +0 -1
  748. package/dist/server/root-layout.d.ts +0 -4
  749. package/dist/server/root-layout.d.ts.map +0 -1
  750. package/dist/server/root-layout.js +0 -5
  751. package/dist/server/root-layout.js.map +0 -1
  752. package/dist/server.d.ts +0 -15
  753. package/dist/server.d.ts.map +0 -1
  754. package/dist/server.js +0 -20
  755. package/dist/server.js.map +0 -1
  756. package/dist/ssr/__tests__/ssr-handler.test.d.ts +0 -2
  757. package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +0 -1
  758. package/dist/ssr/__tests__/ssr-handler.test.js +0 -132
  759. package/dist/ssr/__tests__/ssr-handler.test.js.map +0 -1
  760. package/dist/ssr/index.d.ts +0 -98
  761. package/dist/ssr/index.d.ts.map +0 -1
  762. package/dist/ssr/index.js +0 -158
  763. package/dist/ssr/index.js.map +0 -1
  764. package/dist/static-handler.d.ts +0 -50
  765. package/dist/static-handler.d.ts.map +0 -1
  766. package/dist/static-handler.gen.d.ts +0 -5
  767. package/dist/static-handler.gen.d.ts.map +0 -1
  768. package/dist/static-handler.gen.js +0 -5
  769. package/dist/static-handler.gen.js.map +0 -1
  770. package/dist/static-handler.js +0 -29
  771. package/dist/static-handler.js.map +0 -1
  772. package/dist/theme/ThemeProvider.d.ts +0 -20
  773. package/dist/theme/ThemeProvider.d.ts.map +0 -1
  774. package/dist/theme/ThemeProvider.js +0 -240
  775. package/dist/theme/ThemeProvider.js.map +0 -1
  776. package/dist/theme/ThemeScript.d.ts +0 -48
  777. package/dist/theme/ThemeScript.d.ts.map +0 -1
  778. package/dist/theme/ThemeScript.js +0 -13
  779. package/dist/theme/ThemeScript.js.map +0 -1
  780. package/dist/theme/__tests__/theme.test.d.ts +0 -2
  781. package/dist/theme/__tests__/theme.test.d.ts.map +0 -1
  782. package/dist/theme/__tests__/theme.test.js +0 -103
  783. package/dist/theme/__tests__/theme.test.js.map +0 -1
  784. package/dist/theme/constants.d.ts +0 -29
  785. package/dist/theme/constants.d.ts.map +0 -1
  786. package/dist/theme/constants.js +0 -48
  787. package/dist/theme/constants.js.map +0 -1
  788. package/dist/theme/index.d.ts +0 -31
  789. package/dist/theme/index.d.ts.map +0 -1
  790. package/dist/theme/index.js +0 -36
  791. package/dist/theme/index.js.map +0 -1
  792. package/dist/theme/theme-context.d.ts +0 -40
  793. package/dist/theme/theme-context.d.ts.map +0 -1
  794. package/dist/theme/theme-context.js +0 -60
  795. package/dist/theme/theme-context.js.map +0 -1
  796. package/dist/theme/theme-script.d.ts +0 -27
  797. package/dist/theme/theme-script.d.ts.map +0 -1
  798. package/dist/theme/theme-script.js +0 -147
  799. package/dist/theme/theme-script.js.map +0 -1
  800. package/dist/theme/types.d.ts +0 -163
  801. package/dist/theme/types.d.ts.map +0 -1
  802. package/dist/theme/types.js +0 -11
  803. package/dist/theme/types.js.map +0 -1
  804. package/dist/theme/use-theme.d.ts +0 -12
  805. package/dist/theme/use-theme.d.ts.map +0 -1
  806. package/dist/theme/use-theme.js +0 -40
  807. package/dist/theme/use-theme.js.map +0 -1
  808. package/dist/types.d.ts +0 -1479
  809. package/dist/types.d.ts.map +0 -1
  810. package/dist/types.js +0 -10
  811. package/dist/types.js.map +0 -1
  812. package/dist/urls.d.ts +0 -441
  813. package/dist/urls.d.ts.map +0 -1
  814. package/dist/urls.gen.d.ts +0 -8
  815. package/dist/urls.gen.d.ts.map +0 -1
  816. package/dist/urls.gen.js +0 -8
  817. package/dist/urls.gen.js.map +0 -1
  818. package/dist/urls.js +0 -443
  819. package/dist/urls.js.map +0 -1
  820. package/dist/use-loader.d.ts +0 -127
  821. package/dist/use-loader.d.ts.map +0 -1
  822. package/dist/use-loader.js +0 -237
  823. package/dist/use-loader.js.map +0 -1
  824. package/dist/vite/__tests__/ast-handler-extract.test.d.ts +0 -2
  825. package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +0 -1
  826. package/dist/vite/__tests__/ast-handler-extract.test.js +0 -294
  827. package/dist/vite/__tests__/ast-handler-extract.test.js.map +0 -1
  828. package/dist/vite/__tests__/expose-id-utils.test.d.ts +0 -2
  829. package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +0 -1
  830. package/dist/vite/__tests__/expose-id-utils.test.js +0 -224
  831. package/dist/vite/__tests__/expose-id-utils.test.js.map +0 -1
  832. package/dist/vite/__tests__/expose-internal-ids.test.d.ts +0 -2
  833. package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +0 -1
  834. package/dist/vite/__tests__/expose-internal-ids.test.js +0 -647
  835. package/dist/vite/__tests__/expose-internal-ids.test.js.map +0 -1
  836. package/dist/vite/__tests__/expose-router-id.test.d.ts +0 -2
  837. package/dist/vite/__tests__/expose-router-id.test.d.ts.map +0 -1
  838. package/dist/vite/__tests__/expose-router-id.test.js +0 -39
  839. package/dist/vite/__tests__/expose-router-id.test.js.map +0 -1
  840. package/dist/vite/ast-handler-extract.d.ts +0 -49
  841. package/dist/vite/ast-handler-extract.d.ts.map +0 -1
  842. package/dist/vite/ast-handler-extract.js +0 -249
  843. package/dist/vite/ast-handler-extract.js.map +0 -1
  844. package/dist/vite/expose-action-id.d.ts +0 -19
  845. package/dist/vite/expose-action-id.d.ts.map +0 -1
  846. package/dist/vite/expose-action-id.js +0 -250
  847. package/dist/vite/expose-action-id.js.map +0 -1
  848. package/dist/vite/expose-id-utils.d.ts +0 -69
  849. package/dist/vite/expose-id-utils.d.ts.map +0 -1
  850. package/dist/vite/expose-id-utils.js +0 -289
  851. package/dist/vite/expose-id-utils.js.map +0 -1
  852. package/dist/vite/expose-internal-ids.d.ts +0 -22
  853. package/dist/vite/expose-internal-ids.d.ts.map +0 -1
  854. package/dist/vite/expose-internal-ids.js +0 -886
  855. package/dist/vite/expose-internal-ids.js.map +0 -1
  856. package/dist/vite/index.d.ts +0 -149
  857. package/dist/vite/index.d.ts.map +0 -1
  858. package/dist/vite/index.js.bak +0 -5448
  859. package/dist/vite/index.js.map +0 -1
  860. package/dist/vite/index.named-routes.gen.ts +0 -103
  861. package/dist/vite/package-resolution.d.ts +0 -43
  862. package/dist/vite/package-resolution.d.ts.map +0 -1
  863. package/dist/vite/package-resolution.js +0 -112
  864. package/dist/vite/package-resolution.js.map +0 -1
  865. package/dist/vite/virtual-entries.d.ts +0 -25
  866. package/dist/vite/virtual-entries.d.ts.map +0 -1
  867. package/dist/vite/virtual-entries.js +0 -110
  868. package/dist/vite/virtual-entries.js.map +0 -1
package/AGENTS.md CHANGED
@@ -10,4 +10,4 @@ Start with the mental model at `node_modules/@rangojs/router/skills/rango/SKILL.
10
10
 
11
11
  ## Contributing
12
12
 
13
- This package is developed in the monorepo at https://github.com/ivogt/vite-rsc. If you are contributing there rather than consuming the published package, read the root `AGENTS.md` in that repo for the pre-push gate and e2e rules — they apply to the monorepo, not to consumer apps.
13
+ This package is developed in the monorepo at https://github.com/rangojs/rango. If you are contributing there rather than consuming the published package, read the root `AGENTS.md` in that repo for the pre-push gate and e2e rules — they apply to the monorepo, not to consumer apps.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 Ivo Todorov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,13 +4,14 @@ A code-first, type-safe React Server Components router. Django-inspired:
4
4
  routes are expressed in one visible tree, URLs are built from names, and
5
5
  everything past the core is opt-in.
6
6
 
7
- > **Experimental:** This package is under active development. APIs may change
8
- > between releases. Install with `@experimental` tag.
7
+ > **Pre-1.0:** Rango follows semver 0.x breaking changes land in minor
8
+ > releases and are noted in the changelog. npm `latest` is the current 0.x
9
+ > release; the `experimental` tag tracks `main` between tagged releases.
9
10
 
10
11
  This page is a tour: it builds one small shop and meets the entire core API
11
12
  along the way — about six primitives. Everything else is opt-in and linked at
12
13
  the end. For the design rationale behind these APIs, read
13
- [Why Rango](https://github.com/ivogt/vite-rsc/blob/main/packages/rangojs-router/docs/why-rango.md); this page shows how it feels, that page
14
+ [Why Rango](https://github.com/rangojs/rango/blob/main/packages/rangojs-router/docs/why-rango.md); this page shows how it feels, that page
14
15
  argues why it's right.
15
16
 
16
17
  ## Start a new app
@@ -24,7 +25,8 @@ pnpm create rango my-app
24
25
 
25
26
  Select a deployment target with `--template basic`, `--template cloudflare`, or
26
27
  `--template vercel`. The templates include streaming RSC, typed routes, Server
27
- Actions, Tailwind CSS, and production deployment configuration. For a plain
28
+ Actions, Tailwind CSS, and production deployment configuration; the scaffolder
29
+ installs the latest `@rangojs/router` release. For a plain
28
30
  JavaScript Node app, add `--template basic --js`. With npm, run
29
31
  `npm create rango@latest my-app`. The scaffolder currently requires Node.js 24
30
32
  or newer.
@@ -34,7 +36,7 @@ or newer.
34
36
  If you are adding Rango to an existing Vite RSC project:
35
37
 
36
38
  ```bash
37
- npm install @rangojs/router@experimental react @vitejs/plugin-rsc
39
+ npm install @rangojs/router@latest react @vitejs/plugin-rsc
38
40
  ```
39
41
 
40
42
  ```ts
@@ -170,7 +172,7 @@ per group — while matching stays an `O(path length)` prefix trie, identical
170
172
  in dev and production. None of this is assumed: the trie is benchmarked
171
173
  in-repo against multi-thousand-route manifests, and the lazy guarantees are
172
174
  pinned by run-count tests (see
173
- [matching & lazy discovery](https://github.com/ivogt/vite-rsc/blob/main/packages/rangojs-router/docs/internal/matching-and-lazy-discovery.md)).
175
+ [matching & lazy discovery](https://github.com/rangojs/rango/blob/main/packages/rangojs-router/docs/internal/matching-and-lazy-discovery.md)).
174
176
  Grow the tree without watching the boot time.
175
177
 
176
178
  That's a working site. Everything below adds to this app.
@@ -466,19 +468,19 @@ npx rango generate src/ # recursive scan
466
468
 
467
469
  ### Examples
468
470
 
469
- - [`e2e/mini`](https://github.com/ivogt/vite-rsc/tree/main/packages/rangojs-router/e2e/mini) — single-file demo app
470
- - [`cloudflare-basic`](https://github.com/ivogt/vite-rsc/tree/main/tests/cloudflare-basic) — Cloudflare Workers with caching, loaders, theme, and pre-rendering
471
- - [`cloudflare-multi-router`](https://github.com/ivogt/vite-rsc/tree/main/examples/cloudflare-multi-router) — multi-app host routing
472
- - [`vercel-basic`](https://github.com/ivogt/vite-rsc/tree/main/examples/vercel-basic) — Vercel deployment with `preset: "vercel"`, `VercelCacheStore`, and OTel tracing
473
- - [`vercel-multi-router`](https://github.com/ivogt/vite-rsc/tree/main/examples/vercel-multi-router) — multi-app host routing on Vercel (single function, routed by Host header)
471
+ - [`e2e/mini`](https://github.com/rangojs/rango/tree/main/packages/rangojs-router/e2e/mini) — single-file demo app
472
+ - [`cloudflare-basic`](https://github.com/rangojs/rango/tree/main/tests/cloudflare-basic) — Cloudflare Workers with caching, loaders, theme, and pre-rendering
473
+ - [`cloudflare-multi-router`](https://github.com/rangojs/rango/tree/main/examples/cloudflare-multi-router) — multi-app host routing
474
+ - [`vercel-basic`](https://github.com/rangojs/rango/tree/main/examples/vercel-basic) — Vercel deployment with `preset: "vercel"`, `VercelCacheStore`, and OTel tracing
475
+ - [`vercel-multi-router`](https://github.com/rangojs/rango/tree/main/examples/vercel-multi-router) — multi-app host routing on Vercel (single function, routed by Host header)
474
476
 
475
477
  ### Going deeper
476
478
 
477
- - [Why Rango](https://github.com/ivogt/vite-rsc/blob/main/packages/rangojs-router/docs/why-rango.md) — the design rationale, claim by claim
479
+ - [Why Rango](https://github.com/rangojs/rango/blob/main/packages/rangojs-router/docs/why-rango.md) — the design rationale, claim by claim
478
480
  - [Framework comparison](./skills/comparison/references/framework-comparison.md) — Rango vs Next.js App Router, TanStack Start, and Waku, capability by capability
479
- - [Docs index](https://github.com/ivogt/vite-rsc/blob/main/packages/rangojs-router/docs/README.md) — architecture, caching, prerender, testing
480
- - [Execution model](https://github.com/ivogt/vite-rsc/blob/main/packages/rangojs-router/docs/internal/execution-model.md) — the runtime contract
481
+ - [Docs index](https://github.com/rangojs/rango/blob/main/packages/rangojs-router/docs/README.md) — architecture, caching, prerender, testing
482
+ - [Execution model](https://github.com/rangojs/rango/blob/main/packages/rangojs-router/docs/internal/execution-model.md) — the runtime contract
481
483
 
482
484
  ## License
483
485
 
484
- MIT
486
+ [MIT](./LICENSE)
@@ -52,6 +52,7 @@ export type UpdateMode = {
52
52
  } | {
53
53
  type: "action";
54
54
  interceptSourceUrl?: string;
55
+ actionId?: string;
55
56
  };
56
57
  /**
57
58
  * Type for the fetchPartialUpdate function
@@ -66,7 +66,7 @@ export declare const MAX_REVALIDATION_INTERVAL = 30;
66
66
  * This is the default; override per store via
67
67
  * `CFCacheStoreOptions.edgeLookupTimeoutMs` (<= 0 disables the budget).
68
68
  *
69
- * 25ms, raised from 10: production Workers logs (autobarn pilot) showed the
69
+ * 25ms, raised from 10: Workers logs (production pilot) showed the
70
70
  * 10ms budget firing frequently on cold colos where the first Cache API touch
71
71
  * is slow but healthy — each false positive downgrades a warm L1 HIT to an
72
72
  * L2/render round trip that costs far more than the 15ms of extra patience.
@@ -322,7 +322,7 @@ export declare class CFCacheStore<TEnv = unknown> implements SegmentCacheStore<T
322
322
  * this, kv.put/get reject with `414 ... exceeds key length limit of 512`
323
323
  * and the entry silently never reaches L2 (observed in production for
324
324
  * "use cache" items whose serialized args — e.g. a CMS query object — blow
325
- * the cap; autobarn pilot). Keys are opaque storage identifiers, so
325
+ * the cap; production pilot). Keys are opaque storage identifiers, so
326
326
  * normalization is semantics-preserving as long as distinct logical keys
327
327
  * stay distinct: colliding requires an identical 400-byte prefix AND a
328
328
  * 128-bit SHA-256 collision. Deterministic, so every family's read, write,
@@ -31,6 +31,17 @@ export declare function beginClientUrlNavigation(targetUrl: URL, signal: AbortSi
31
31
  export declare function collectClientRevalidationDecisions(options: {
32
32
  currentUrl: URL;
33
33
  nextUrl: URL;
34
+ /**
35
+ * True only when the decisions ride the action POST itself — the one
36
+ * request the server evaluates with actionContext (locked default true).
37
+ * Action-triggered refetch GETs (partial-update terminals) pass false:
38
+ * the server gives those navigation defaults, and the delta gate below
39
+ * must diff against the default the SERVER will use, or a force decision
40
+ * on the refetch would be silently swallowed as "equals default".
41
+ */
42
+ actionRequest: boolean;
43
+ /** Action TRUTH for the predicates' isAction() matcher; may be true on
44
+ * refetch GETs where actionRequest is false. */
34
45
  isAction: boolean;
35
46
  actionId?: string;
36
47
  stale: boolean;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The clientUrls revalidate() chain evaluator, shared by the browser
3
+ * collector (navigation.ts) and the public testing primitive
4
+ * (testing/run-client-revalidate.ts) so the two can never drift.
5
+ *
6
+ * Semantics mirror the server's evaluateRevalidation
7
+ * (src/router/revalidation.ts): a boolean verdict is a hard decision and
8
+ * short-circuits the rest of the chain; a `{ defaultShouldRevalidate }`
9
+ * object updates the running suggestion, which later predicates receive as
10
+ * their `defaultShouldRevalidate`; null/undefined defers; a throwing
11
+ * predicate fails open to the current suggestion (logged). One deliberate
12
+ * divergence: the object form is accepted only with a boolean value — the
13
+ * server is laxer, but never re-compares the value, while this decision
14
+ * feeds a strict-equality delta gate and the wire encoding
15
+ * (navigation.ts), where a truthy non-boolean would invert intent.
16
+ */
17
+ import type { ClientRevalidateArgs, ClientRevalidateFn } from "./types.js";
18
+ /**
19
+ * The locked default the server will apply to the request these decisions
20
+ * ride on. `actionRequest` is about the REQUEST, not the user gesture: only
21
+ * the action POST itself is evaluated server-side with actionContext
22
+ * (default `true`); the follow-up refetch GETs an action can trigger carry
23
+ * no actionContext and get navigation defaults — even though their
24
+ * predicates still see `isAction()` as true.
25
+ */
26
+ export declare function lockedClientDefault(options: {
27
+ actionRequest: boolean;
28
+ currentParams: Record<string, string>;
29
+ nextParams: Record<string, string>;
30
+ currentUrl: URL;
31
+ nextUrl: URL;
32
+ }): boolean;
33
+ export declare function runClientRevalidateChain(fns: readonly ClientRevalidateFn[], baseArgs: Omit<ClientRevalidateArgs, "defaultShouldRevalidate">, lockedDefault: boolean, label: string): boolean;
@@ -1,5 +1,5 @@
1
1
  import type { ComponentType, ReactNode } from "react";
2
- import type { LoaderDefinition, LoaderOptions, TransitionConfig } from "../types.js";
2
+ import type { IsActionFn, LoaderDefinition, LoaderOptions, TransitionConfig } from "../types.js";
3
3
  import type { TrieMatchResult } from "../router/trie-matching.js";
4
4
  import type { PathOptions } from "../urls/pattern-types.js";
5
5
  import type { SearchSchema } from "../search-params.js";
@@ -23,7 +23,8 @@ export type ClientLayoutFn = <const TItems extends ClientUrlItems>(component: Co
23
23
  * subset of the server ShouldRevalidateFn args — the predicate RUNS IN THE
24
24
  * BROWSER (it is declared in a "use client" module and never crosses the
25
25
  * projection boundary); only its decision is sent to the server. There is no
26
- * `context` — no server handler context exists where this executes.
26
+ * `context` — no server handler context exists where this executes. `isAction`
27
+ * is the same callable matcher as on the server, not a boolean.
27
28
  */
28
29
  export interface ClientRevalidateArgs {
29
30
  /** Full URL of the page being navigated away from (current location). */
@@ -35,20 +36,45 @@ export interface ClientRevalidateArgs {
35
36
  /** Route params for the navigation target (definition-local match). */
36
37
  readonly nextParams: Record<string, string>;
37
38
  /**
38
- * The locked default decision for this loader, computed client-side with
39
- * the same rules the server would apply: `true` on actions and when
40
- * params/search changed, `false` otherwise. Return it for default behavior
41
- * plus your own conditions.
39
+ * The current default decision for this loader, computed client-side with
40
+ * the same rules the server applies to the request the decisions ride on:
41
+ * `true` when they ride the action POST itself, otherwise `true` when
42
+ * params/search changed. (An action-triggered refetch GET gets navigation
43
+ * defaults — matching the server — even though `isAction()` is true.)
44
+ * Earlier predicates' `{ defaultShouldRevalidate }` verdicts thread into
45
+ * this value, exactly like the server chain. Return it for default
46
+ * behavior plus your own conditions.
42
47
  */
43
48
  readonly defaultShouldRevalidate: boolean;
44
49
  /** True when this is a stale history-entry background revalidation. */
45
50
  readonly stale: boolean;
46
- /** True when revalidation is triggered by a server action. */
47
- readonly isAction: boolean;
48
- /** The triggering server action's id, when isAction. */
51
+ /**
52
+ * Same {@link IsActionFn} the server `revalidate()` predicate receives.
53
+ * In the browser the match is against the action stub's hashed `$$id`
54
+ * (the id the action request carries) — not the RSC file-path `$id`.
55
+ */
56
+ readonly isAction: IsActionFn;
57
+ /**
58
+ * The triggering server action's id, when this is an action. In the
59
+ * browser this is the hashed `hash#export` form (`$$id`), not the RSC
60
+ * file-path `src/...#export`. Prefer `isAction(ref)` — a substring of
61
+ * `path#export` will not match here in production.
62
+ */
49
63
  readonly actionId?: string;
50
64
  }
51
- export type ClientRevalidateFn = (args: ClientRevalidateArgs) => boolean;
65
+ /**
66
+ * Client-run per-loader predicate, with the same chain semantics as the
67
+ * server's `revalidate()` (src/router/revalidation.ts): a boolean is a HARD
68
+ * decision that short-circuits the rest of the chain; a
69
+ * `{ defaultShouldRevalidate }` object updates the running suggestion, which
70
+ * later predicates receive as their `defaultShouldRevalidate`; `void` /
71
+ * `null` / `undefined` defers to the current suggestion — so
72
+ * `isAction(CartActions) || undefined` defers to the locked default.
73
+ * Predicates must be synchronous; the object form requires a boolean value.
74
+ */
75
+ export type ClientRevalidateFn = (args: ClientRevalidateArgs) => boolean | {
76
+ defaultShouldRevalidate: boolean;
77
+ } | null | void;
52
78
  export interface ClientUrlLoaderRecord {
53
79
  readonly loader: LoaderDefinition<any, any>;
54
80
  /** Client-run per-loader revalidation predicates; empty = locked defaults. */
@@ -114,10 +140,11 @@ export interface ClientUrlHelpers {
114
140
  readonly loading: (component: ReactNode) => ClientUrlItem;
115
141
  /**
116
142
  * Per-loader revalidation predicate, valid inside a loader() use callback
117
- * only. Runs IN THE BROWSER with client-computable args; return true to
118
- * re-run the loader, false to keep held data. Absent predicates (and
119
- * requests that carry no decisions: no-JS, PE, prefetch, document loads)
120
- * follow the locked server defaults.
143
+ * only. Runs IN THE BROWSER with client-computable args (including the
144
+ * callable `isAction(...refs)` matcher); return true to re-run the loader,
145
+ * false to keep held data. Absent predicates (and requests that carry no
146
+ * decisions: no-JS, PE, prefetch, document loads) follow the locked server
147
+ * defaults.
121
148
  */
122
149
  readonly revalidate: (fn: ClientRevalidateFn) => ClientUrlItem;
123
150
  /**
@@ -190,3 +190,5 @@ export { useHref } from "./browser/react/use-href.js";
190
190
  export { useReverse } from "./browser/react/use-reverse.js";
191
191
  export type { ScopedReverseFunction, LocalReverseFunction } from "./reverse.js";
192
192
  export type { LoaderDefinition } from "./types.js";
193
+ export type { ActionRef, IsActionFn } from "./types.js";
194
+ export type { ClientRevalidateArgs, ClientRevalidateFn, } from "./client-urls/types.js";
@@ -11,7 +11,7 @@
11
11
  */
12
12
  export { RouteNotFoundError, DataNotFoundError, notFound, MiddlewareError, HandlerError, BuildError, DslContextError, InvalidHandlerError, RouterError, Skip, isSkip, } from "./errors.js";
13
13
  export type { DocumentProps, DefaultEnv, RouteDefinition, RouteConfig, RouteDefinitionOptions, TrailingSlashMode, Handler, // Supports params object, path pattern, or route name
14
- HandlerContext, ExtractParams, GenericParams, Middleware, RevalidateParams, Revalidate, ActionRef, RouteKeys, LoaderDefinition, LoaderFn, LoaderContext, LoaderOptions, FetchableLoaderOptions, LoadOptions, ErrorInfo, ErrorBoundaryFallbackProps, ErrorBoundaryHandler, ClientErrorBoundaryFallbackProps, NotFoundInfo, NotFoundBoundaryFallbackProps, NotFoundBoundaryHandler, ErrorPhase, OnErrorContext, OnErrorCallback, } from "./types.js";
14
+ HandlerContext, ExtractParams, GenericParams, Middleware, RevalidateParams, Revalidate, ActionRef, IsActionFn, RouteKeys, LoaderDefinition, LoaderFn, LoaderContext, LoaderOptions, FetchableLoaderOptions, LoadOptions, ErrorInfo, ErrorBoundaryFallbackProps, ErrorBoundaryHandler, ClientErrorBoundaryFallbackProps, NotFoundInfo, NotFoundBoundaryFallbackProps, NotFoundBoundaryHandler, ErrorPhase, OnErrorContext, OnErrorCallback, } from "./types.js";
15
15
  export type { SearchSchema, SearchSchemaValue, ResolveSearchSchema, RouteSearchParams, RouteParams, } from "./search-params.js";
16
16
  export { TRACKING_SEARCH_PARAMS, type CacheSearchParams, } from "./cache/search-params-filter.js";
17
17
  export { createLoader } from "./loader.js";
@@ -9,7 +9,7 @@
9
9
  * in RSC context, while the regular index.ts is used in client components.
10
10
  */
11
11
  export { RouteNotFoundError, DataNotFoundError, notFound, MiddlewareError, HandlerError, BuildError, DslContextError, InvalidHandlerError, RouterError, Skip, isSkip, } from "./index.js";
12
- export type { DocumentProps, DefaultEnv, RouteDefinition, RouteConfig, RouteDefinitionOptions, TrailingSlashMode, Handler, HandlerContext, ExtractParams, GenericParams, Middleware, RevalidateParams, Revalidate, ActionRef, RouteKeys, LoaderDefinition, LoaderFn, LoaderContext, FetchableLoaderOptions, LoadOptions, ErrorInfo, ErrorBoundaryFallbackProps, ErrorBoundaryHandler, ClientErrorBoundaryFallbackProps, NotFoundInfo, NotFoundBoundaryFallbackProps, NotFoundBoundaryHandler, ErrorPhase, OnErrorContext, OnErrorCallback, TransitionConfig, TransitionWhenFn, TransitionWhenContext, ViewTransitionClass, } from "./types.js";
12
+ export type { DocumentProps, DefaultEnv, RouteDefinition, RouteConfig, RouteDefinitionOptions, TrailingSlashMode, Handler, HandlerContext, ExtractParams, GenericParams, Middleware, RevalidateParams, Revalidate, ActionRef, IsActionFn, RouteKeys, LoaderDefinition, LoaderFn, LoaderContext, FetchableLoaderOptions, LoadOptions, ErrorInfo, ErrorBoundaryFallbackProps, ErrorBoundaryHandler, ClientErrorBoundaryFallbackProps, NotFoundInfo, NotFoundBoundaryFallbackProps, NotFoundBoundaryHandler, ErrorPhase, OnErrorContext, OnErrorCallback, TransitionConfig, TransitionWhenFn, TransitionWhenContext, ViewTransitionClass, } from "./types.js";
13
13
  export type { RangoOptions, SSRStreamMode, SSROptions, ResolveStreamingContext, } from "./router.js";
14
14
  export type { OriginCheckConfig, OriginCheckContext, OriginCheckPhase, } from "./rsc/origin-guard.js";
15
15
  export type { ShellCaptureDebug, ShellCaptureDebugEvent, } from "./rsc/shell-capture.js";
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Shared `isAction()` matcher for revalidate predicates (server + clientUrls).
3
+ *
4
+ * Action identity is `actionId`. The helper resolves an imported reference the
5
+ * same way the action boundary derives that id (`$id ?? $$id`), so a
6
+ * rename-safe `isAction(fn)` / `isAction(namespace)` match works in both the
7
+ * RSC environment (file-path `$id`) and the browser (hashed `$$id`).
8
+ */
9
+ import type { IsActionFn } from "../types.js";
10
+ /**
11
+ * Resolve a server-action reference's stable id, mirroring how the action
12
+ * boundary derives `actionContext.actionId` in `rsc/server-action.ts`
13
+ * (`$id ?? $$id`): the file-path `$id` set by the expose-action-id plugin in a
14
+ * production RSC build when present, otherwise React's `$$id`. Resolving both
15
+ * the incoming `actionId` and the reference with the same precedence makes
16
+ * `isAction()` form-agnostic across dev and production.
17
+ */
18
+ export declare function resolveActionRefId(ref: unknown): string | undefined;
19
+ /**
20
+ * Build the `isAction()` helper bound to the current action. Called with no
21
+ * arguments it answers "is this request an action at all?" — `true` during
22
+ * action handling (including action-triggered refetches that carry no id
23
+ * yet), `false` on plain navigation. Called with one or more action
24
+ * references it narrows to those: a single imported action, several
25
+ * (variadic), a namespace import (`import * as Mod`), an object literal of
26
+ * actions (`{ addToCart, removeFromCart }`), or a grouped namespace object.
27
+ * Returns `false` when there is no action or nothing matches.
28
+ *
29
+ * `inAction` is the request kind. It defaults to "an id is present" so
30
+ * existing server call sites stay a single argument. The client passes the
31
+ * explicit flag so a refetch terminal with `isAction: true` still answers
32
+ * bare `isAction()` even if `actionId` was not threaded.
33
+ */
34
+ export declare function makeIsAction(currentActionId: string | undefined, inAction?: boolean): IsActionFn;
@@ -29,7 +29,7 @@ export declare const SHELL_CAPTURE_MAX_WAIT_MS = 15000;
29
29
  * Hard cap on one capture TASK — runShellCapture end to end (both attempts +
30
30
  * the in-place retry delay). SHELL_CAPTURE_MAX_WAIT_MS arms only inside
31
31
  * captureShellHTML, AFTER the capture's router.match(); a handler wedged on a
32
- * never-settling upstream await (autobarn pilot: a 30s+ tarpitting fetch)
32
+ * never-settling upstream await (production pilot: a 30s+ tarpitting fetch)
33
33
  * wedges the task with no deadline in force. The task's settle path releases
34
34
  * the per-key stampede guard and the serialized capture-queue slot, so an
35
35
  * unbounded task strands BOTH for the isolate's lifetime.
@@ -26,7 +26,7 @@
26
26
  * condition and would throw if pulled into this barrel.
27
27
  *
28
28
  * Layers:
29
- * - Unit: runMiddleware, runLoader
29
+ * - Unit: runMiddleware, runLoader, runClientRevalidate
30
30
  * - Integration: dispatch (request -> Response)
31
31
  * - Cross-cut: assertCacheStatus, assertShellStatus, assertGeneratedRoutesMatch
32
32
  * - Component: see @rangojs/router/testing/dom (renderRoute)
@@ -39,6 +39,8 @@ export { runLoader, runLoaderResult } from "./run-loader.js";
39
39
  export type { RunLoaderOptions, RunLoaderResult, UseResolver, TestLoaderContext, } from "./run-loader.js";
40
40
  export { runTransitionWhen } from "./run-transition-when.js";
41
41
  export type { RunTransitionWhenOptions, RunTransitionWhenResult, } from "./run-transition-when.js";
42
+ export { runClientRevalidate } from "./run-client-revalidate.js";
43
+ export type { RunClientRevalidateOptions } from "./run-client-revalidate.js";
42
44
  export { dispatch } from "./dispatch.js";
43
45
  export type { DispatchOptions } from "./dispatch.js";
44
46
  export { assertCacheStatus, assertCacheDecision, parseCacheHeader, createCacheSink, filterCacheDecisions, } from "./cache-status.js";
@@ -0,0 +1,43 @@
1
+ /**
2
+ * runClientRevalidate — unit-test clientUrls() revalidate() predicates.
3
+ *
4
+ * Builds the same {@link ClientRevalidateArgs} the browser collector passes
5
+ * and evaluates the predicate(s) through the SAME chain evaluator production
6
+ * uses (client-urls/revalidate-chain.ts) — locked default, boolean
7
+ * short-circuit, soft-verdict threading, and fail-open are the production
8
+ * code paths, not a re-implementation. Pass an array to test a chain.
9
+ *
10
+ * Synchronous: client revalidate functions must be sync.
11
+ */
12
+ import type { ClientRevalidateFn } from "../client-urls/types.js";
13
+ /**
14
+ * Options for {@link runClientRevalidate}. Defaults model a same-URL
15
+ * navigation with no action (locked default `false`).
16
+ */
17
+ export interface RunClientRevalidateOptions {
18
+ currentUrl?: string | URL;
19
+ nextUrl?: string | URL;
20
+ currentParams?: Record<string, string>;
21
+ nextParams?: Record<string, string>;
22
+ stale?: boolean;
23
+ /**
24
+ * The triggering action: a single imported reference (id resolved via
25
+ * `$id ?? $$id`; throws if the function carries neither) or a raw actionId
26
+ * string. A namespace/object is rejected — it cannot identify the ONE
27
+ * action that triggered the request. Omit for a plain navigation.
28
+ */
29
+ action?: ((...args: never[]) => unknown) | string;
30
+ /**
31
+ * Model an action-triggered refetch GET: predicates see `isAction()` as
32
+ * true, but the locked default stays the navigation default, matching how
33
+ * the server evaluates that request (no actionContext). Defaults to
34
+ * treating a provided `action` as the action POST itself.
35
+ */
36
+ actionRequest?: boolean;
37
+ }
38
+ /**
39
+ * Run one clientUrls `revalidate()` predicate — or a chain, in declaration
40
+ * order — against production-built args. Returns the final boolean decision
41
+ * (locked default if every predicate defers or throws).
42
+ */
43
+ export declare function runClientRevalidate(fn: ClientRevalidateFn | readonly ClientRevalidateFn[], opts?: RunClientRevalidateOptions): boolean;
@@ -0,0 +1,2 @@
1
+ /** Shared string|URL coercion for the testing primitives. */
2
+ export declare function toURL(value: string | URL | undefined, fallback: URL): URL;
@@ -418,13 +418,17 @@ export type RevalidateParams<TParams = GenericParams, TEnv = any> = Parameters<S
418
418
  /**
419
419
  * A reference to a server action, used by `isAction()` in a revalidate predicate.
420
420
  *
421
- * Either a directly imported action (`import { addToCart }`) or a namespace
422
- * import of an action module (`import * as CartActions`). Matching resolves the
421
+ * Either a directly imported action (`import { addToCart }`), a namespace
422
+ * import of an action module (`import * as CartActions`), an object
423
+ * literal of actions (`{ addToCart, removeFromCart }`), or a grouped
424
+ * namespace (`{ Cart: CartActions, Order: OrderActions }`). Matching resolves the
423
425
  * action's build-injected id (`path#export`) — the same identity the router uses
424
426
  * for `actionId` — so a renamed or moved action breaks at compile time instead
425
427
  * of silently failing to match.
426
428
  */
427
429
  export type ActionRef = ((...args: never[]) => unknown) | Record<string, unknown>;
430
+ /** The `isAction()` matcher passed to server and client `revalidate()` predicates. */
431
+ export type IsActionFn = (...actions: ActionRef[]) => boolean;
428
432
  /**
429
433
  * Revalidation function called during client-side navigation to decide whether
430
434
  * a segment (layout, route, parallel slot, or loader) should be re-rendered.
@@ -511,8 +515,10 @@ export type ShouldRevalidateFn<TParams = GenericParams, TEnv = any> = (args: {
511
515
  /**
512
516
  * Typed, rename-safe action matching. Returns `true` when the action that
513
517
  * triggered this revalidation is one of the given references — or, for a
514
- * namespace import (`import * as CartActions`), any export of that module —
515
- * and `false` otherwise (including plain navigation with no action).
518
+ * namespace import (`import * as CartActions`), object literal
519
+ * (`{ addToCart, removeFromCart }`), or grouped namespaces
520
+ * (`{ Cart: CartActions }`), any of those exports — and `false`
521
+ * otherwise (including plain navigation with no action).
516
522
  *
517
523
  * Called with NO arguments it answers "is this request an action at all?":
518
524
  * `true` for any action, `false` on plain navigation. Use the bare form when
@@ -536,9 +542,10 @@ export type ShouldRevalidateFn<TParams = GenericParams, TEnv = any> = (args: {
536
542
  * revalidate((ctx) => ctx.isAction(addToCart) || undefined); // one action
537
543
  * revalidate((ctx) => ctx.isAction(addToCart, removeFromCart) || undefined); // several
538
544
  * revalidate((ctx) => ctx.isAction(CartActions) || undefined); // any in the module
545
+ * revalidate((ctx) => ctx.isAction({ addToCart, removeFromCart }) || undefined); // object form
539
546
  * ```
540
547
  */
541
- isAction: (...actions: ActionRef[]) => boolean;
548
+ isAction: IsActionFn;
542
549
  /** URL where the action was executed (the page the user was on when they triggered the action). */
543
550
  actionUrl?: URL;
544
551
  /** Return value from the action execution. Can be used to conditionally revalidate based on the action's outcome. */
@@ -3,7 +3,7 @@ import "./global-namespace.js";
3
3
  export type { DocumentProps, ExtractParams, TrailingSlashMode, RouteConfig, RouteDefinitionOptions, RouteDefinition, ResolvedRouteMap, } from "./route-config.js";
4
4
  export type { ErrorInfo, ErrorBoundaryFallbackProps, ErrorBoundaryHandler, ClientErrorBoundaryFallbackProps, LoaderDataResult, NotFoundInfo, NotFoundBoundaryFallbackProps, NotFoundBoundaryHandler, } from "./boundaries.js";
5
5
  export { isLoaderDataResult } from "./boundaries.js";
6
- export type { MiddlewareFn, ScopedRouteMap, Handler, HandlerContext, InternalHandlerContext, GenericParams, RevalidateParams, ShouldRevalidateFn, ActionRef, RouteKeys, ExtractRouteParams, HandlersForRouteMap, Revalidate, Middleware, } from "./handler-context.js";
6
+ export type { MiddlewareFn, ScopedRouteMap, Handler, HandlerContext, InternalHandlerContext, GenericParams, RevalidateParams, ShouldRevalidateFn, ActionRef, IsActionFn, RouteKeys, ExtractRouteParams, HandlersForRouteMap, Revalidate, Middleware, } from "./handler-context.js";
7
7
  export type { ViewTransitionClass, TransitionConfig, TransitionWhenFn, TransitionWhenContext, ResolvedSegment, SegmentMetadata, SlotState, RootLayoutProps, MatchResult, } from "./segments.js";
8
8
  export type { LazyIncludeContext, RouteEntry } from "./route-entry.js";
9
9
  export type { LoaderContext, LoaderFn, FetchableLoaderOptions, LoaderOptions, LoadOptions, LoaderDefinition, } from "./loader-types.js";
@@ -1,4 +1,18 @@
1
1
  import type { Plugin } from "vite";
2
+ /**
3
+ * Per-reference own `bind` injected next to `$$id`. React's client.browser
4
+ * build carries no server-reference metadata across `.bind()` (the
5
+ * edge/node/server builds install an own `bind` on each reference that
6
+ * does), so `isAction(boundStub)` would silently miss in the browser only.
7
+ * Installing the same per-reference own `bind` here — scoped to the stubs
8
+ * this plugin already wraps, guarded to never override an existing own
9
+ * `bind` — closes that without mutating the global Function.prototype
10
+ * (which would re-wrap once per Vite environment/HMR pass and break
11
+ * native-function detection for co-loaded code). The helper re-installs
12
+ * itself on the bound result so chained binds keep the metadata too.
13
+ */
14
+ export declare const ACTION_BIND_HELPER_NAME: string;
15
+ export declare const ACTION_BIND_HELPER_SOURCE: string;
2
16
  /**
3
17
  * Vite plugin that exposes action IDs on server reference functions.
4
18
  *
@@ -1401,6 +1401,14 @@ function isUseServerModule(filePath) {
1401
1401
  return false;
1402
1402
  }
1403
1403
  }
1404
+ var ACTION_BIND_HELPER_NAME = "__rangoActionBind";
1405
+ var ACTION_BIND_HELPER_SOURCE = `var ${ACTION_BIND_HELPER_NAME} = function () {
1406
+ var bound = Function.prototype.bind.apply(this, arguments);
1407
+ if (typeof this.$id === "string") bound.$id = this.$id;
1408
+ if (typeof this.$$id === "string") bound.$$id = this.$$id;
1409
+ bound.bind = ${ACTION_BIND_HELPER_NAME};
1410
+ return bound;
1411
+ };`;
1404
1412
  function applyServerReferenceWrapping(code, s, hashToFileMap) {
1405
1413
  if (!code.includes("createServerReference(")) {
1406
1414
  return false;
@@ -1425,9 +1433,13 @@ function applyServerReferenceWrapping(code, s, hashToFileMap) {
1425
1433
  }
1426
1434
  }
1427
1435
  }
1428
- const replacement = `(function(fn) { fn.$$id = ${finalIdArg}; return fn; })(${fnCall}(${idArg}${rest}))`;
1436
+ const replacement = `(function(fn) { fn.$$id = ${finalIdArg}; if (!Object.prototype.hasOwnProperty.call(fn, "bind")) fn.bind = ${ACTION_BIND_HELPER_NAME}; return fn; })(${fnCall}(${idArg}${rest}))`;
1429
1437
  s.overwrite(start, end, replacement);
1430
1438
  }
1439
+ if (hasChanges) {
1440
+ s.prepend(`${ACTION_BIND_HELPER_SOURCE}
1441
+ `);
1442
+ }
1431
1443
  return hasChanges;
1432
1444
  }
1433
1445
  function transformServerReferences(code, sourceId, hashToFileMap) {
@@ -3698,7 +3710,7 @@ import { resolve } from "node:path";
3698
3710
  // package.json
3699
3711
  var package_default = {
3700
3712
  name: "@rangojs/router",
3701
- version: "0.10.0",
3713
+ version: "0.11.0",
3702
3714
  description: "Django-inspired RSC router with composable URL patterns",
3703
3715
  keywords: [
3704
3716
  "react",
@@ -3707,15 +3719,15 @@ var package_default = {
3707
3719
  "rsc",
3708
3720
  "vite"
3709
3721
  ],
3710
- homepage: "https://github.com/ivogt/vite-rsc#readme",
3722
+ homepage: "https://github.com/rangojs/rango#readme",
3711
3723
  bugs: {
3712
- url: "https://github.com/ivogt/vite-rsc/issues"
3724
+ url: "https://github.com/rangojs/rango/issues"
3713
3725
  },
3714
3726
  license: "MIT",
3715
3727
  author: "Ivo Todorov",
3716
3728
  repository: {
3717
3729
  type: "git",
3718
- url: "git+https://github.com/ivogt/vite-rsc.git",
3730
+ url: "git+https://github.com/rangojs/rango.git",
3719
3731
  directory: "packages/rangojs-router"
3720
3732
  },
3721
3733
  bin: {
@@ -3730,7 +3742,8 @@ var package_default = {
3730
3742
  "dist",
3731
3743
  "skills",
3732
3744
  "AGENTS.md",
3733
- "README.md"
3745
+ "README.md",
3746
+ "LICENSE"
3734
3747
  ],
3735
3748
  type: "module",
3736
3749
  exports: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rangojs/router",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Django-inspired RSC router with composable URL patterns",
5
5
  "keywords": [
6
6
  "react",
@@ -9,15 +9,15 @@
9
9
  "rsc",
10
10
  "vite"
11
11
  ],
12
- "homepage": "https://github.com/ivogt/vite-rsc#readme",
12
+ "homepage": "https://github.com/rangojs/rango#readme",
13
13
  "bugs": {
14
- "url": "https://github.com/ivogt/vite-rsc/issues"
14
+ "url": "https://github.com/rangojs/rango/issues"
15
15
  },
16
16
  "license": "MIT",
17
17
  "author": "Ivo Todorov",
18
18
  "repository": {
19
19
  "type": "git",
20
- "url": "git+https://github.com/ivogt/vite-rsc.git",
20
+ "url": "git+https://github.com/rangojs/rango.git",
21
21
  "directory": "packages/rangojs-router"
22
22
  },
23
23
  "bin": {
@@ -32,7 +32,8 @@
32
32
  "dist",
33
33
  "skills",
34
34
  "AGENTS.md",
35
- "README.md"
35
+ "README.md",
36
+ "LICENSE"
36
37
  ],
37
38
  "type": "module",
38
39
  "exports": {
@@ -150,7 +150,7 @@ The treemap shows nested boxes; box area = uncompressed size. Hover for gzip/bro
150
150
 
151
151
  ## Reporting Rango regressions
152
152
 
153
- If a finding looks like a `@rangojs/router` regression (the framework is shipping more than it should, not your app), open an issue at the [@rangojs/router GitHub](https://github.com/ivogt/vite-rsc/issues) and include:
153
+ If a finding looks like a `@rangojs/router` regression (the framework is shipping more than it should, not your app), open an issue at the [@rangojs/router GitHub](https://github.com/rangojs/rango/issues) and include:
154
154
 
155
155
  - The output of `client.html` / `rsc.html` (screenshots or the JSON `data = {...}` block from the HTML).
156
156
  - The `@rangojs/router` version (`pnpm why @rangojs/router`).