@rangojs/router 0.0.0-experimental.113 → 0.0.0-experimental.114

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 (834) hide show
  1. package/dist/__internal.d.ts +83 -0
  2. package/dist/__internal.d.ts.map +1 -0
  3. package/dist/__internal.js +19 -0
  4. package/dist/__internal.js.map +1 -0
  5. package/dist/__mocks__/version.d.ts +7 -0
  6. package/dist/__mocks__/version.d.ts.map +1 -0
  7. package/dist/__mocks__/version.js +7 -0
  8. package/dist/__mocks__/version.js.map +1 -0
  9. package/dist/__tests__/client-href.test.d.ts +2 -0
  10. package/dist/__tests__/client-href.test.d.ts.map +1 -0
  11. package/dist/__tests__/client-href.test.js +74 -0
  12. package/dist/__tests__/client-href.test.js.map +1 -0
  13. package/dist/__tests__/component-utils.test.d.ts +2 -0
  14. package/dist/__tests__/component-utils.test.d.ts.map +1 -0
  15. package/dist/__tests__/component-utils.test.js +51 -0
  16. package/dist/__tests__/component-utils.test.js.map +1 -0
  17. package/dist/__tests__/event-controller.test.d.ts +2 -0
  18. package/dist/__tests__/event-controller.test.d.ts.map +1 -0
  19. package/dist/__tests__/event-controller.test.js +538 -0
  20. package/dist/__tests__/event-controller.test.js.map +1 -0
  21. package/dist/__tests__/helpers/route-tree.d.ts +118 -0
  22. package/dist/__tests__/helpers/route-tree.d.ts.map +1 -0
  23. package/dist/__tests__/helpers/route-tree.js +374 -0
  24. package/dist/__tests__/helpers/route-tree.js.map +1 -0
  25. package/dist/__tests__/match-result.test.d.ts +2 -0
  26. package/dist/__tests__/match-result.test.d.ts.map +1 -0
  27. package/dist/__tests__/match-result.test.js +154 -0
  28. package/dist/__tests__/match-result.test.js.map +1 -0
  29. package/dist/__tests__/navigation-store.test.d.ts +2 -0
  30. package/dist/__tests__/navigation-store.test.d.ts.map +1 -0
  31. package/dist/__tests__/navigation-store.test.js +440 -0
  32. package/dist/__tests__/navigation-store.test.js.map +1 -0
  33. package/dist/__tests__/partial-update.test.d.ts +2 -0
  34. package/dist/__tests__/partial-update.test.d.ts.map +1 -0
  35. package/dist/__tests__/partial-update.test.js +1009 -0
  36. package/dist/__tests__/partial-update.test.js.map +1 -0
  37. package/dist/__tests__/reverse-types.test.d.ts +8 -0
  38. package/dist/__tests__/reverse-types.test.d.ts.map +1 -0
  39. package/dist/__tests__/reverse-types.test.js +656 -0
  40. package/dist/__tests__/reverse-types.test.js.map +1 -0
  41. package/dist/__tests__/route-definition.test.d.ts +2 -0
  42. package/dist/__tests__/route-definition.test.d.ts.map +1 -0
  43. package/dist/__tests__/route-definition.test.js +55 -0
  44. package/dist/__tests__/route-definition.test.js.map +1 -0
  45. package/dist/__tests__/router-helpers.test.d.ts +2 -0
  46. package/dist/__tests__/router-helpers.test.d.ts.map +1 -0
  47. package/dist/__tests__/router-helpers.test.js +377 -0
  48. package/dist/__tests__/router-helpers.test.js.map +1 -0
  49. package/dist/__tests__/router-integration-2.test.d.ts +2 -0
  50. package/dist/__tests__/router-integration-2.test.d.ts.map +1 -0
  51. package/dist/__tests__/router-integration-2.test.js +426 -0
  52. package/dist/__tests__/router-integration-2.test.js.map +1 -0
  53. package/dist/__tests__/router-integration.test.d.ts +2 -0
  54. package/dist/__tests__/router-integration.test.d.ts.map +1 -0
  55. package/dist/__tests__/router-integration.test.js +1051 -0
  56. package/dist/__tests__/router-integration.test.js.map +1 -0
  57. package/dist/__tests__/search-params.test.d.ts +5 -0
  58. package/dist/__tests__/search-params.test.d.ts.map +1 -0
  59. package/dist/__tests__/search-params.test.js +306 -0
  60. package/dist/__tests__/search-params.test.js.map +1 -0
  61. package/dist/__tests__/segment-system.test.d.ts +2 -0
  62. package/dist/__tests__/segment-system.test.d.ts.map +1 -0
  63. package/dist/__tests__/segment-system.test.js +627 -0
  64. package/dist/__tests__/segment-system.test.js.map +1 -0
  65. package/dist/__tests__/static-handler-types.test.d.ts +8 -0
  66. package/dist/__tests__/static-handler-types.test.d.ts.map +1 -0
  67. package/dist/__tests__/static-handler-types.test.js +63 -0
  68. package/dist/__tests__/static-handler-types.test.js.map +1 -0
  69. package/dist/__tests__/urls.test.d.ts +2 -0
  70. package/dist/__tests__/urls.test.d.ts.map +1 -0
  71. package/dist/__tests__/urls.test.js +421 -0
  72. package/dist/__tests__/urls.test.js.map +1 -0
  73. package/dist/__tests__/use-mount.test.d.ts +2 -0
  74. package/dist/__tests__/use-mount.test.d.ts.map +1 -0
  75. package/dist/__tests__/use-mount.test.js +35 -0
  76. package/dist/__tests__/use-mount.test.js.map +1 -0
  77. package/dist/bin/rango.d.ts +2 -0
  78. package/dist/bin/rango.d.ts.map +1 -0
  79. package/dist/bin/rango.js +73 -2
  80. package/dist/bin/rango.js.map +1 -0
  81. package/dist/browser/event-controller.d.ts +191 -0
  82. package/dist/browser/event-controller.d.ts.map +1 -0
  83. package/dist/browser/event-controller.js +559 -0
  84. package/dist/browser/event-controller.js.map +1 -0
  85. package/dist/browser/index.d.ts +2 -0
  86. package/dist/browser/index.d.ts.map +1 -0
  87. package/dist/browser/index.js +14 -0
  88. package/dist/browser/index.js.map +1 -0
  89. package/dist/browser/link-interceptor.d.ts +38 -0
  90. package/dist/browser/link-interceptor.d.ts.map +1 -0
  91. package/dist/browser/link-interceptor.js +99 -0
  92. package/dist/browser/link-interceptor.js.map +1 -0
  93. package/dist/browser/logging.d.ts +10 -0
  94. package/dist/browser/logging.d.ts.map +1 -0
  95. package/dist/browser/logging.js +29 -0
  96. package/dist/browser/logging.js.map +1 -0
  97. package/dist/browser/lru-cache.d.ts +17 -0
  98. package/dist/browser/lru-cache.d.ts.map +1 -0
  99. package/dist/browser/lru-cache.js +50 -0
  100. package/dist/browser/lru-cache.js.map +1 -0
  101. package/dist/browser/merge-segment-loaders.d.ts +39 -0
  102. package/dist/browser/merge-segment-loaders.d.ts.map +1 -0
  103. package/dist/browser/merge-segment-loaders.js +102 -0
  104. package/dist/browser/merge-segment-loaders.js.map +1 -0
  105. package/dist/browser/navigation-bridge.d.ts +102 -0
  106. package/dist/browser/navigation-bridge.d.ts.map +1 -0
  107. package/dist/browser/navigation-bridge.js +708 -0
  108. package/dist/browser/navigation-bridge.js.map +1 -0
  109. package/dist/browser/navigation-client.d.ts +25 -0
  110. package/dist/browser/navigation-client.d.ts.map +1 -0
  111. package/dist/browser/navigation-client.js +157 -0
  112. package/dist/browser/navigation-client.js.map +1 -0
  113. package/dist/browser/navigation-store.d.ts +101 -0
  114. package/dist/browser/navigation-store.d.ts.map +1 -0
  115. package/dist/browser/navigation-store.js +625 -0
  116. package/dist/browser/navigation-store.js.map +1 -0
  117. package/dist/browser/partial-update.d.ts +75 -0
  118. package/dist/browser/partial-update.d.ts.map +1 -0
  119. package/dist/browser/partial-update.js +426 -0
  120. package/dist/browser/partial-update.js.map +1 -0
  121. package/dist/browser/react/Link.d.ts +86 -0
  122. package/dist/browser/react/Link.d.ts.map +1 -0
  123. package/dist/browser/react/Link.js +128 -0
  124. package/dist/browser/react/Link.js.map +1 -0
  125. package/dist/browser/react/NavigationProvider.d.ts +63 -0
  126. package/dist/browser/react/NavigationProvider.d.ts.map +1 -0
  127. package/dist/browser/react/NavigationProvider.js +216 -0
  128. package/dist/browser/react/NavigationProvider.js.map +1 -0
  129. package/dist/browser/react/ScrollRestoration.d.ts +75 -0
  130. package/dist/browser/react/ScrollRestoration.d.ts.map +1 -0
  131. package/dist/browser/react/ScrollRestoration.js +57 -0
  132. package/dist/browser/react/ScrollRestoration.js.map +1 -0
  133. package/dist/browser/react/context.d.ts +46 -0
  134. package/dist/browser/react/context.d.ts.map +1 -0
  135. package/dist/browser/react/context.js +10 -0
  136. package/dist/browser/react/context.js.map +1 -0
  137. package/dist/browser/react/index.d.ts +11 -0
  138. package/dist/browser/react/index.d.ts.map +1 -0
  139. package/dist/browser/react/index.js +22 -0
  140. package/dist/browser/react/index.js.map +1 -0
  141. package/dist/browser/react/location-state-shared.d.ts +63 -0
  142. package/dist/browser/react/location-state-shared.d.ts.map +1 -0
  143. package/dist/browser/react/location-state-shared.js +81 -0
  144. package/dist/browser/react/location-state-shared.js.map +1 -0
  145. package/dist/browser/react/location-state.d.ts +23 -0
  146. package/dist/browser/react/location-state.d.ts.map +1 -0
  147. package/dist/browser/react/location-state.js +29 -0
  148. package/dist/browser/react/location-state.js.map +1 -0
  149. package/dist/browser/react/mount-context.d.ts +24 -0
  150. package/dist/browser/react/mount-context.d.ts.map +1 -0
  151. package/dist/browser/react/mount-context.js +24 -0
  152. package/dist/browser/react/mount-context.js.map +1 -0
  153. package/dist/browser/react/use-action.d.ts +64 -0
  154. package/dist/browser/react/use-action.d.ts.map +1 -0
  155. package/dist/browser/react/use-action.js +134 -0
  156. package/dist/browser/react/use-action.js.map +1 -0
  157. package/dist/browser/react/use-client-cache.d.ts +41 -0
  158. package/dist/browser/react/use-client-cache.d.ts.map +1 -0
  159. package/dist/browser/react/use-client-cache.js +39 -0
  160. package/dist/browser/react/use-client-cache.js.map +1 -0
  161. package/dist/browser/react/use-handle.d.ts +31 -0
  162. package/dist/browser/react/use-handle.d.ts.map +1 -0
  163. package/dist/browser/react/use-handle.js +144 -0
  164. package/dist/browser/react/use-handle.js.map +1 -0
  165. package/dist/browser/react/use-href.d.ts +33 -0
  166. package/dist/browser/react/use-href.d.ts.map +1 -0
  167. package/dist/browser/react/use-href.js +39 -0
  168. package/dist/browser/react/use-href.js.map +1 -0
  169. package/dist/browser/react/use-link-status.d.ts +37 -0
  170. package/dist/browser/react/use-link-status.d.ts.map +1 -0
  171. package/dist/browser/react/use-link-status.js +99 -0
  172. package/dist/browser/react/use-link-status.js.map +1 -0
  173. package/dist/browser/react/use-mount.d.ts +25 -0
  174. package/dist/browser/react/use-mount.d.ts.map +1 -0
  175. package/dist/browser/react/use-mount.js +30 -0
  176. package/dist/browser/react/use-mount.js.map +1 -0
  177. package/dist/browser/react/use-navigation.d.ts +27 -0
  178. package/dist/browser/react/use-navigation.d.ts.map +1 -0
  179. package/dist/browser/react/use-navigation.js +87 -0
  180. package/dist/browser/react/use-navigation.js.map +1 -0
  181. package/dist/browser/react/use-segments.d.ts +38 -0
  182. package/dist/browser/react/use-segments.d.ts.map +1 -0
  183. package/dist/browser/react/use-segments.js +130 -0
  184. package/dist/browser/react/use-segments.js.map +1 -0
  185. package/dist/browser/request-controller.d.ts +26 -0
  186. package/dist/browser/request-controller.d.ts.map +1 -0
  187. package/dist/browser/request-controller.js +147 -0
  188. package/dist/browser/request-controller.js.map +1 -0
  189. package/dist/browser/rsc-router.d.ts +129 -0
  190. package/dist/browser/rsc-router.d.ts.map +1 -0
  191. package/dist/browser/rsc-router.js +195 -0
  192. package/dist/browser/rsc-router.js.map +1 -0
  193. package/dist/browser/scroll-restoration.d.ts +93 -0
  194. package/dist/browser/scroll-restoration.d.ts.map +1 -0
  195. package/dist/browser/scroll-restoration.js +321 -0
  196. package/dist/browser/scroll-restoration.js.map +1 -0
  197. package/dist/browser/segment-structure-assert.d.ts +17 -0
  198. package/dist/browser/segment-structure-assert.d.ts.map +1 -0
  199. package/dist/browser/segment-structure-assert.js +59 -0
  200. package/dist/browser/segment-structure-assert.js.map +1 -0
  201. package/dist/browser/server-action-bridge.d.ts +26 -0
  202. package/dist/browser/server-action-bridge.d.ts.map +1 -0
  203. package/dist/browser/server-action-bridge.js +668 -0
  204. package/dist/browser/server-action-bridge.js.map +1 -0
  205. package/dist/browser/shallow.d.ts +12 -0
  206. package/dist/browser/shallow.d.ts.map +1 -0
  207. package/dist/browser/shallow.js +34 -0
  208. package/dist/browser/shallow.js.map +1 -0
  209. package/dist/browser/types.d.ts +369 -0
  210. package/dist/browser/types.d.ts.map +1 -0
  211. package/dist/browser/types.js +2 -0
  212. package/dist/browser/types.js.map +1 -0
  213. package/dist/build/__tests__/generate-cli.test.d.ts +2 -0
  214. package/dist/build/__tests__/generate-cli.test.d.ts.map +1 -0
  215. package/dist/build/__tests__/generate-cli.test.js +237 -0
  216. package/dist/build/__tests__/generate-cli.test.js.map +1 -0
  217. package/dist/build/__tests__/generate-manifest.test.d.ts +2 -0
  218. package/dist/build/__tests__/generate-manifest.test.d.ts.map +1 -0
  219. package/dist/build/__tests__/generate-manifest.test.js +119 -0
  220. package/dist/build/__tests__/generate-manifest.test.js.map +1 -0
  221. package/dist/build/__tests__/generate-route-types.test.d.ts +2 -0
  222. package/dist/build/__tests__/generate-route-types.test.d.ts.map +1 -0
  223. package/dist/build/__tests__/generate-route-types.test.js +620 -0
  224. package/dist/build/__tests__/generate-route-types.test.js.map +1 -0
  225. package/dist/build/__tests__/per-router-manifest.test.d.ts +2 -0
  226. package/dist/build/__tests__/per-router-manifest.test.d.ts.map +1 -0
  227. package/dist/build/__tests__/per-router-manifest.test.js +308 -0
  228. package/dist/build/__tests__/per-router-manifest.test.js.map +1 -0
  229. package/dist/build/generate-manifest.d.ts +81 -0
  230. package/dist/build/generate-manifest.d.ts.map +1 -0
  231. package/dist/build/generate-manifest.js +276 -0
  232. package/dist/build/generate-manifest.js.map +1 -0
  233. package/dist/build/generate-route-types.d.ts +115 -0
  234. package/dist/build/generate-route-types.d.ts.map +1 -0
  235. package/dist/build/generate-route-types.js +740 -0
  236. package/dist/build/generate-route-types.js.map +1 -0
  237. package/dist/build/index.d.ts +21 -0
  238. package/dist/build/index.d.ts.map +1 -0
  239. package/dist/build/index.js +21 -0
  240. package/dist/build/index.js.map +1 -0
  241. package/dist/build/route-trie.d.ts +71 -0
  242. package/dist/build/route-trie.d.ts.map +1 -0
  243. package/dist/build/route-trie.js +175 -0
  244. package/dist/build/route-trie.js.map +1 -0
  245. package/dist/cache/__tests__/cache-scope.test.d.ts +2 -0
  246. package/dist/cache/__tests__/cache-scope.test.d.ts.map +1 -0
  247. package/dist/cache/__tests__/cache-scope.test.js +208 -0
  248. package/dist/cache/__tests__/cache-scope.test.js.map +1 -0
  249. package/dist/cache/__tests__/document-cache.test.d.ts +2 -0
  250. package/dist/cache/__tests__/document-cache.test.d.ts.map +1 -0
  251. package/dist/cache/__tests__/document-cache.test.js +345 -0
  252. package/dist/cache/__tests__/document-cache.test.js.map +1 -0
  253. package/dist/cache/__tests__/memory-segment-store.test.d.ts +2 -0
  254. package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +1 -0
  255. package/dist/cache/__tests__/memory-segment-store.test.js +425 -0
  256. package/dist/cache/__tests__/memory-segment-store.test.js.map +1 -0
  257. package/dist/cache/__tests__/memory-store.test.d.ts +2 -0
  258. package/dist/cache/__tests__/memory-store.test.d.ts.map +1 -0
  259. package/dist/cache/__tests__/memory-store.test.js +367 -0
  260. package/dist/cache/__tests__/memory-store.test.js.map +1 -0
  261. package/dist/cache/cache-scope.d.ts +102 -0
  262. package/dist/cache/cache-scope.d.ts.map +1 -0
  263. package/dist/cache/cache-scope.js +440 -0
  264. package/dist/cache/cache-scope.js.map +1 -0
  265. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +2 -0
  266. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +1 -0
  267. package/dist/cache/cf/__tests__/cf-cache-store.test.js +330 -0
  268. package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +1 -0
  269. package/dist/cache/cf/cf-cache-store.d.ts +165 -0
  270. package/dist/cache/cf/cf-cache-store.d.ts.map +1 -0
  271. package/dist/cache/cf/cf-cache-store.js +242 -0
  272. package/dist/cache/cf/cf-cache-store.js.map +1 -0
  273. package/dist/cache/cf/index.d.ts +14 -0
  274. package/dist/cache/cf/index.d.ts.map +1 -0
  275. package/dist/cache/cf/index.js +17 -0
  276. package/dist/cache/cf/index.js.map +1 -0
  277. package/dist/cache/document-cache.d.ts +64 -0
  278. package/dist/cache/document-cache.d.ts.map +1 -0
  279. package/dist/cache/document-cache.js +228 -0
  280. package/dist/cache/document-cache.js.map +1 -0
  281. package/dist/cache/index.d.ts +19 -0
  282. package/dist/cache/index.d.ts.map +1 -0
  283. package/dist/cache/index.js +21 -0
  284. package/dist/cache/index.js.map +1 -0
  285. package/dist/cache/memory-segment-store.d.ts +110 -0
  286. package/dist/cache/memory-segment-store.d.ts.map +1 -0
  287. package/dist/cache/memory-segment-store.js +117 -0
  288. package/dist/cache/memory-segment-store.js.map +1 -0
  289. package/dist/cache/memory-store.d.ts +41 -0
  290. package/dist/cache/memory-store.d.ts.map +1 -0
  291. package/dist/cache/memory-store.js +191 -0
  292. package/dist/cache/memory-store.js.map +1 -0
  293. package/dist/cache/types.d.ts +317 -0
  294. package/dist/cache/types.d.ts.map +1 -0
  295. package/dist/cache/types.js +12 -0
  296. package/dist/cache/types.js.map +1 -0
  297. package/dist/client.d.ts +248 -0
  298. package/dist/client.d.ts.map +1 -0
  299. package/dist/client.js +367 -0
  300. package/dist/client.js.map +1 -0
  301. package/dist/client.rsc.d.ts +26 -0
  302. package/dist/client.rsc.d.ts.map +1 -0
  303. package/dist/client.rsc.js +46 -0
  304. package/dist/client.rsc.js.map +1 -0
  305. package/dist/component-utils.d.ts +36 -0
  306. package/dist/component-utils.d.ts.map +1 -0
  307. package/dist/component-utils.js +61 -0
  308. package/dist/component-utils.js.map +1 -0
  309. package/dist/components/DefaultDocument.d.ts +13 -0
  310. package/dist/components/DefaultDocument.d.ts.map +1 -0
  311. package/dist/components/DefaultDocument.js +15 -0
  312. package/dist/components/DefaultDocument.js.map +1 -0
  313. package/dist/debug.d.ts +58 -0
  314. package/dist/debug.d.ts.map +1 -0
  315. package/dist/debug.js +157 -0
  316. package/dist/debug.js.map +1 -0
  317. package/dist/default-error-boundary.d.ts +11 -0
  318. package/dist/default-error-boundary.d.ts.map +1 -0
  319. package/dist/default-error-boundary.js +45 -0
  320. package/dist/default-error-boundary.js.map +1 -0
  321. package/dist/deps/browser.d.ts +2 -0
  322. package/dist/deps/browser.d.ts.map +1 -0
  323. package/dist/deps/browser.js +3 -0
  324. package/dist/deps/browser.js.map +1 -0
  325. package/dist/deps/html-stream-client.d.ts +2 -0
  326. package/dist/deps/html-stream-client.d.ts.map +1 -0
  327. package/dist/deps/html-stream-client.js +3 -0
  328. package/dist/deps/html-stream-client.js.map +1 -0
  329. package/dist/deps/html-stream-server.d.ts +2 -0
  330. package/dist/deps/html-stream-server.d.ts.map +1 -0
  331. package/dist/deps/html-stream-server.js +3 -0
  332. package/dist/deps/html-stream-server.js.map +1 -0
  333. package/dist/deps/rsc.d.ts +2 -0
  334. package/dist/deps/rsc.d.ts.map +1 -0
  335. package/dist/deps/rsc.js +4 -0
  336. package/dist/deps/rsc.js.map +1 -0
  337. package/dist/deps/ssr.d.ts +2 -0
  338. package/dist/deps/ssr.d.ts.map +1 -0
  339. package/dist/deps/ssr.js +3 -0
  340. package/dist/deps/ssr.js.map +1 -0
  341. package/dist/errors.d.ts +174 -0
  342. package/dist/errors.d.ts.map +1 -0
  343. package/dist/errors.js +241 -0
  344. package/dist/errors.js.map +1 -0
  345. package/dist/handle.d.ts +78 -0
  346. package/dist/handle.d.ts.map +1 -0
  347. package/dist/handle.js +82 -0
  348. package/dist/handle.js.map +1 -0
  349. package/dist/handles/MetaTags.d.ts +14 -0
  350. package/dist/handles/MetaTags.d.ts.map +1 -0
  351. package/dist/handles/MetaTags.js +136 -0
  352. package/dist/handles/MetaTags.js.map +1 -0
  353. package/dist/handles/index.d.ts +6 -0
  354. package/dist/handles/index.d.ts.map +1 -0
  355. package/dist/handles/index.js +6 -0
  356. package/dist/handles/index.js.map +1 -0
  357. package/dist/handles/meta.d.ts +39 -0
  358. package/dist/handles/meta.d.ts.map +1 -0
  359. package/dist/handles/meta.js +202 -0
  360. package/dist/handles/meta.js.map +1 -0
  361. package/dist/host/__tests__/errors.test.d.ts +2 -0
  362. package/dist/host/__tests__/errors.test.d.ts.map +1 -0
  363. package/dist/host/__tests__/errors.test.js +76 -0
  364. package/dist/host/__tests__/errors.test.js.map +1 -0
  365. package/dist/host/__tests__/pattern-comprehensive.test.d.ts +2 -0
  366. package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +1 -0
  367. package/dist/host/__tests__/pattern-comprehensive.test.js +732 -0
  368. package/dist/host/__tests__/pattern-comprehensive.test.js.map +1 -0
  369. package/dist/host/__tests__/pattern-matcher.test.d.ts +2 -0
  370. package/dist/host/__tests__/pattern-matcher.test.d.ts.map +1 -0
  371. package/dist/host/__tests__/pattern-matcher.test.js +251 -0
  372. package/dist/host/__tests__/pattern-matcher.test.js.map +1 -0
  373. package/dist/host/__tests__/router.test.d.ts +2 -0
  374. package/dist/host/__tests__/router.test.d.ts.map +1 -0
  375. package/dist/host/__tests__/router.test.js +241 -0
  376. package/dist/host/__tests__/router.test.js.map +1 -0
  377. package/dist/host/__tests__/testing.test.d.ts +2 -0
  378. package/dist/host/__tests__/testing.test.d.ts.map +1 -0
  379. package/dist/host/__tests__/testing.test.js +64 -0
  380. package/dist/host/__tests__/testing.test.js.map +1 -0
  381. package/dist/host/__tests__/utils.test.d.ts +2 -0
  382. package/dist/host/__tests__/utils.test.d.ts.map +1 -0
  383. package/dist/host/__tests__/utils.test.js +29 -0
  384. package/dist/host/__tests__/utils.test.js.map +1 -0
  385. package/dist/host/cookie-handler.d.ts +34 -0
  386. package/dist/host/cookie-handler.d.ts.map +1 -0
  387. package/dist/host/cookie-handler.js +124 -0
  388. package/dist/host/cookie-handler.js.map +1 -0
  389. package/dist/host/errors.d.ts +56 -0
  390. package/dist/host/errors.d.ts.map +1 -0
  391. package/dist/host/errors.js +79 -0
  392. package/dist/host/errors.js.map +1 -0
  393. package/dist/host/index.d.ts +29 -0
  394. package/dist/host/index.d.ts.map +1 -0
  395. package/dist/host/index.js +32 -0
  396. package/dist/host/index.js.map +1 -0
  397. package/dist/host/pattern-matcher.d.ts +36 -0
  398. package/dist/host/pattern-matcher.d.ts.map +1 -0
  399. package/dist/host/pattern-matcher.js +172 -0
  400. package/dist/host/pattern-matcher.js.map +1 -0
  401. package/dist/host/router.d.ts +26 -0
  402. package/dist/host/router.d.ts.map +1 -0
  403. package/dist/host/router.js +218 -0
  404. package/dist/host/router.js.map +1 -0
  405. package/dist/host/testing.d.ts +36 -0
  406. package/dist/host/testing.d.ts.map +1 -0
  407. package/dist/host/testing.js +55 -0
  408. package/dist/host/testing.js.map +1 -0
  409. package/dist/host/types.d.ts +115 -0
  410. package/dist/host/types.d.ts.map +1 -0
  411. package/dist/host/types.js +7 -0
  412. package/dist/host/types.js.map +1 -0
  413. package/dist/host/utils.d.ts +21 -0
  414. package/dist/host/utils.d.ts.map +1 -0
  415. package/dist/host/utils.js +23 -0
  416. package/dist/host/utils.js.map +1 -0
  417. package/dist/href-client.d.ts +131 -0
  418. package/dist/href-client.d.ts.map +1 -0
  419. package/dist/href-client.js +64 -0
  420. package/dist/href-client.js.map +1 -0
  421. package/dist/href-context.d.ts +29 -0
  422. package/dist/href-context.d.ts.map +1 -0
  423. package/dist/href-context.js +21 -0
  424. package/dist/href-context.js.map +1 -0
  425. package/dist/index.d.ts +73 -0
  426. package/dist/index.d.ts.map +1 -0
  427. package/dist/index.js +91 -0
  428. package/dist/index.js.map +1 -0
  429. package/dist/index.rsc.d.ts +32 -0
  430. package/dist/index.rsc.d.ts.map +1 -0
  431. package/dist/index.rsc.js +40 -0
  432. package/dist/index.rsc.js.map +1 -0
  433. package/dist/internal-debug.d.ts +2 -0
  434. package/dist/internal-debug.d.ts.map +1 -0
  435. package/dist/internal-debug.js +5 -0
  436. package/dist/internal-debug.js.map +1 -0
  437. package/dist/loader.d.ts +14 -0
  438. package/dist/loader.d.ts.map +1 -0
  439. package/dist/loader.js +20 -0
  440. package/dist/loader.js.map +1 -0
  441. package/dist/loader.rsc.d.ts +19 -0
  442. package/dist/loader.rsc.d.ts.map +1 -0
  443. package/dist/loader.rsc.js +99 -0
  444. package/dist/loader.rsc.js.map +1 -0
  445. package/dist/network-error-thrower.d.ts +17 -0
  446. package/dist/network-error-thrower.d.ts.map +1 -0
  447. package/dist/network-error-thrower.js +14 -0
  448. package/dist/network-error-thrower.js.map +1 -0
  449. package/dist/outlet-context.d.ts +13 -0
  450. package/dist/outlet-context.d.ts.map +1 -0
  451. package/dist/outlet-context.js +3 -0
  452. package/dist/outlet-context.js.map +1 -0
  453. package/dist/prerender/__tests__/param-hash.test.d.ts +2 -0
  454. package/dist/prerender/__tests__/param-hash.test.d.ts.map +1 -0
  455. package/dist/prerender/__tests__/param-hash.test.js +148 -0
  456. package/dist/prerender/__tests__/param-hash.test.js.map +1 -0
  457. package/dist/prerender/param-hash.d.ts +16 -0
  458. package/dist/prerender/param-hash.d.ts.map +1 -0
  459. package/dist/prerender/param-hash.js +36 -0
  460. package/dist/prerender/param-hash.js.map +1 -0
  461. package/dist/prerender/store.d.ts +38 -0
  462. package/dist/prerender/store.d.ts.map +1 -0
  463. package/dist/prerender/store.js +61 -0
  464. package/dist/prerender/store.js.map +1 -0
  465. package/dist/prerender.d.ts +66 -0
  466. package/dist/prerender.d.ts.map +1 -0
  467. package/dist/prerender.js +57 -0
  468. package/dist/prerender.js.map +1 -0
  469. package/dist/reverse.d.ts +196 -0
  470. package/dist/reverse.d.ts.map +1 -0
  471. package/dist/reverse.js +78 -0
  472. package/dist/reverse.js.map +1 -0
  473. package/dist/root-error-boundary.d.ts +33 -0
  474. package/dist/root-error-boundary.d.ts.map +1 -0
  475. package/dist/root-error-boundary.js +165 -0
  476. package/dist/root-error-boundary.js.map +1 -0
  477. package/dist/route-content-wrapper.d.ts +46 -0
  478. package/dist/route-content-wrapper.d.ts.map +1 -0
  479. package/dist/route-content-wrapper.js +77 -0
  480. package/dist/route-content-wrapper.js.map +1 -0
  481. package/dist/route-definition.d.ts +421 -0
  482. package/dist/route-definition.d.ts.map +1 -0
  483. package/dist/route-definition.js +868 -0
  484. package/dist/route-definition.js.map +1 -0
  485. package/dist/route-map-builder.d.ts +155 -0
  486. package/dist/route-map-builder.d.ts.map +1 -0
  487. package/dist/route-map-builder.js +237 -0
  488. package/dist/route-map-builder.js.map +1 -0
  489. package/dist/route-types.d.ts +165 -0
  490. package/dist/route-types.d.ts.map +1 -0
  491. package/dist/route-types.js +7 -0
  492. package/dist/route-types.js.map +1 -0
  493. package/dist/router/__tests__/handler-context.test.d.ts +2 -0
  494. package/dist/router/__tests__/handler-context.test.d.ts.map +1 -0
  495. package/dist/router/__tests__/handler-context.test.js +65 -0
  496. package/dist/router/__tests__/handler-context.test.js.map +1 -0
  497. package/dist/router/__tests__/loader-cycle-detection.test.d.ts +2 -0
  498. package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +1 -0
  499. package/dist/router/__tests__/loader-cycle-detection.test.js +221 -0
  500. package/dist/router/__tests__/loader-cycle-detection.test.js.map +1 -0
  501. package/dist/router/__tests__/match-context.test.d.ts +2 -0
  502. package/dist/router/__tests__/match-context.test.d.ts.map +1 -0
  503. package/dist/router/__tests__/match-context.test.js +92 -0
  504. package/dist/router/__tests__/match-context.test.js.map +1 -0
  505. package/dist/router/__tests__/match-pipelines.test.d.ts +2 -0
  506. package/dist/router/__tests__/match-pipelines.test.d.ts.map +1 -0
  507. package/dist/router/__tests__/match-pipelines.test.js +417 -0
  508. package/dist/router/__tests__/match-pipelines.test.js.map +1 -0
  509. package/dist/router/__tests__/match-result.test.d.ts +2 -0
  510. package/dist/router/__tests__/match-result.test.d.ts.map +1 -0
  511. package/dist/router/__tests__/match-result.test.js +457 -0
  512. package/dist/router/__tests__/match-result.test.js.map +1 -0
  513. package/dist/router/__tests__/on-error.test.d.ts +2 -0
  514. package/dist/router/__tests__/on-error.test.d.ts.map +1 -0
  515. package/dist/router/__tests__/on-error.test.js +678 -0
  516. package/dist/router/__tests__/on-error.test.js.map +1 -0
  517. package/dist/router/__tests__/pattern-matching.test.d.ts +2 -0
  518. package/dist/router/__tests__/pattern-matching.test.d.ts.map +1 -0
  519. package/dist/router/__tests__/pattern-matching.test.js +629 -0
  520. package/dist/router/__tests__/pattern-matching.test.js.map +1 -0
  521. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +2 -0
  522. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +1 -0
  523. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +155 -0
  524. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +1 -0
  525. package/dist/router/error-handling.d.ts +77 -0
  526. package/dist/router/error-handling.d.ts.map +1 -0
  527. package/dist/router/error-handling.js +202 -0
  528. package/dist/router/error-handling.js.map +1 -0
  529. package/dist/router/handler-context.d.ts +20 -0
  530. package/dist/router/handler-context.d.ts.map +1 -0
  531. package/dist/router/handler-context.js +198 -0
  532. package/dist/router/handler-context.js.map +1 -0
  533. package/dist/router/intercept-resolution.d.ts +66 -0
  534. package/dist/router/intercept-resolution.d.ts.map +1 -0
  535. package/dist/router/intercept-resolution.js +246 -0
  536. package/dist/router/intercept-resolution.js.map +1 -0
  537. package/dist/router/loader-resolution.d.ts +64 -0
  538. package/dist/router/loader-resolution.d.ts.map +1 -0
  539. package/dist/router/loader-resolution.js +284 -0
  540. package/dist/router/loader-resolution.js.map +1 -0
  541. package/dist/router/logging.d.ts +15 -0
  542. package/dist/router/logging.d.ts.map +1 -0
  543. package/dist/router/logging.js +99 -0
  544. package/dist/router/logging.js.map +1 -0
  545. package/dist/router/manifest.d.ts +22 -0
  546. package/dist/router/manifest.d.ts.map +1 -0
  547. package/dist/router/manifest.js +181 -0
  548. package/dist/router/manifest.js.map +1 -0
  549. package/dist/router/match-api.d.ts +35 -0
  550. package/dist/router/match-api.d.ts.map +1 -0
  551. package/dist/router/match-api.js +406 -0
  552. package/dist/router/match-api.js.map +1 -0
  553. package/dist/router/match-context.d.ts +206 -0
  554. package/dist/router/match-context.d.ts.map +1 -0
  555. package/dist/router/match-context.js +17 -0
  556. package/dist/router/match-context.js.map +1 -0
  557. package/dist/router/match-middleware/background-revalidation.d.ts +127 -0
  558. package/dist/router/match-middleware/background-revalidation.d.ts.map +1 -0
  559. package/dist/router/match-middleware/background-revalidation.js +75 -0
  560. package/dist/router/match-middleware/background-revalidation.js.map +1 -0
  561. package/dist/router/match-middleware/cache-lookup.d.ts +112 -0
  562. package/dist/router/match-middleware/cache-lookup.d.ts.map +1 -0
  563. package/dist/router/match-middleware/cache-lookup.js +257 -0
  564. package/dist/router/match-middleware/cache-lookup.js.map +1 -0
  565. package/dist/router/match-middleware/cache-store.d.ts +113 -0
  566. package/dist/router/match-middleware/cache-store.d.ts.map +1 -0
  567. package/dist/router/match-middleware/cache-store.js +108 -0
  568. package/dist/router/match-middleware/cache-store.js.map +1 -0
  569. package/dist/router/match-middleware/index.d.ts +81 -0
  570. package/dist/router/match-middleware/index.d.ts.map +1 -0
  571. package/dist/router/match-middleware/index.js +80 -0
  572. package/dist/router/match-middleware/index.js.map +1 -0
  573. package/dist/router/match-middleware/intercept-resolution.d.ts +117 -0
  574. package/dist/router/match-middleware/intercept-resolution.d.ts.map +1 -0
  575. package/dist/router/match-middleware/intercept-resolution.js +134 -0
  576. package/dist/router/match-middleware/intercept-resolution.js.map +1 -0
  577. package/dist/router/match-middleware/segment-resolution.d.ts +99 -0
  578. package/dist/router/match-middleware/segment-resolution.d.ts.map +1 -0
  579. package/dist/router/match-middleware/segment-resolution.js +53 -0
  580. package/dist/router/match-middleware/segment-resolution.js.map +1 -0
  581. package/dist/router/match-pipelines.d.ts +147 -0
  582. package/dist/router/match-pipelines.d.ts.map +1 -0
  583. package/dist/router/match-pipelines.js +82 -0
  584. package/dist/router/match-pipelines.js.map +1 -0
  585. package/dist/router/match-result.d.ts +126 -0
  586. package/dist/router/match-result.d.ts.map +1 -0
  587. package/dist/router/match-result.js +93 -0
  588. package/dist/router/match-result.js.map +1 -0
  589. package/dist/router/metrics.d.ts +20 -0
  590. package/dist/router/metrics.d.ts.map +1 -0
  591. package/dist/router/metrics.js +47 -0
  592. package/dist/router/metrics.js.map +1 -0
  593. package/dist/router/middleware.d.ts +249 -0
  594. package/dist/router/middleware.d.ts.map +1 -0
  595. package/dist/router/middleware.js +434 -0
  596. package/dist/router/middleware.js.map +1 -0
  597. package/dist/router/middleware.test.d.ts +2 -0
  598. package/dist/router/middleware.test.d.ts.map +1 -0
  599. package/dist/router/middleware.test.js +816 -0
  600. package/dist/router/middleware.test.js.map +1 -0
  601. package/dist/router/pattern-matching.d.ts +149 -0
  602. package/dist/router/pattern-matching.d.ts.map +1 -0
  603. package/dist/router/pattern-matching.js +349 -0
  604. package/dist/router/pattern-matching.js.map +1 -0
  605. package/dist/router/revalidation.d.ts +44 -0
  606. package/dist/router/revalidation.d.ts.map +1 -0
  607. package/dist/router/revalidation.js +147 -0
  608. package/dist/router/revalidation.js.map +1 -0
  609. package/dist/router/router-context.d.ts +135 -0
  610. package/dist/router/router-context.d.ts.map +1 -0
  611. package/dist/router/router-context.js +36 -0
  612. package/dist/router/router-context.js.map +1 -0
  613. package/dist/router/segment-resolution.d.ts +127 -0
  614. package/dist/router/segment-resolution.d.ts.map +1 -0
  615. package/dist/router/segment-resolution.js +919 -0
  616. package/dist/router/segment-resolution.js.map +1 -0
  617. package/dist/router/trie-matching.d.ts +40 -0
  618. package/dist/router/trie-matching.d.ts.map +1 -0
  619. package/dist/router/trie-matching.js +127 -0
  620. package/dist/router/trie-matching.js.map +1 -0
  621. package/dist/router/types.d.ts +136 -0
  622. package/dist/router/types.d.ts.map +1 -0
  623. package/dist/router/types.js +7 -0
  624. package/dist/router/types.js.map +1 -0
  625. package/dist/router.d.ts +753 -0
  626. package/dist/router.d.ts.map +1 -0
  627. package/dist/router.gen.d.ts +6 -0
  628. package/dist/router.gen.d.ts.map +1 -0
  629. package/dist/router.gen.js +6 -0
  630. package/dist/router.gen.js.map +1 -0
  631. package/dist/router.js +1304 -0
  632. package/dist/router.js.map +1 -0
  633. package/dist/rsc/__tests__/helpers.test.d.ts +2 -0
  634. package/dist/rsc/__tests__/helpers.test.d.ts.map +1 -0
  635. package/dist/rsc/__tests__/helpers.test.js +140 -0
  636. package/dist/rsc/__tests__/helpers.test.js.map +1 -0
  637. package/dist/rsc/handler.d.ts +45 -0
  638. package/dist/rsc/handler.d.ts.map +1 -0
  639. package/dist/rsc/handler.js +1172 -0
  640. package/dist/rsc/handler.js.map +1 -0
  641. package/dist/rsc/helpers.d.ts +16 -0
  642. package/dist/rsc/helpers.d.ts.map +1 -0
  643. package/dist/rsc/helpers.js +55 -0
  644. package/dist/rsc/helpers.js.map +1 -0
  645. package/dist/rsc/index.d.ts +22 -0
  646. package/dist/rsc/index.d.ts.map +1 -0
  647. package/dist/rsc/index.js +23 -0
  648. package/dist/rsc/index.js.map +1 -0
  649. package/dist/rsc/nonce.d.ts +9 -0
  650. package/dist/rsc/nonce.d.ts.map +1 -0
  651. package/dist/rsc/nonce.js +18 -0
  652. package/dist/rsc/nonce.js.map +1 -0
  653. package/dist/rsc/types.d.ts +206 -0
  654. package/dist/rsc/types.d.ts.map +1 -0
  655. package/dist/rsc/types.js +8 -0
  656. package/dist/rsc/types.js.map +1 -0
  657. package/dist/search-params.d.ts +103 -0
  658. package/dist/search-params.d.ts.map +1 -0
  659. package/dist/search-params.js +74 -0
  660. package/dist/search-params.js.map +1 -0
  661. package/dist/segment-system.d.ts +75 -0
  662. package/dist/segment-system.d.ts.map +1 -0
  663. package/dist/segment-system.js +336 -0
  664. package/dist/segment-system.js.map +1 -0
  665. package/dist/server/context.d.ts +245 -0
  666. package/dist/server/context.d.ts.map +1 -0
  667. package/dist/server/context.js +197 -0
  668. package/dist/server/context.js.map +1 -0
  669. package/dist/server/fetchable-loader-store.d.ts +18 -0
  670. package/dist/server/fetchable-loader-store.d.ts.map +1 -0
  671. package/dist/server/fetchable-loader-store.js +18 -0
  672. package/dist/server/fetchable-loader-store.js.map +1 -0
  673. package/dist/server/handle-store.d.ts +85 -0
  674. package/dist/server/handle-store.d.ts.map +1 -0
  675. package/dist/server/handle-store.js +142 -0
  676. package/dist/server/handle-store.js.map +1 -0
  677. package/dist/server/loader-registry.d.ts +55 -0
  678. package/dist/server/loader-registry.d.ts.map +1 -0
  679. package/dist/server/loader-registry.js +132 -0
  680. package/dist/server/loader-registry.js.map +1 -0
  681. package/dist/server/request-context.d.ts +226 -0
  682. package/dist/server/request-context.d.ts.map +1 -0
  683. package/dist/server/request-context.js +290 -0
  684. package/dist/server/request-context.js.map +1 -0
  685. package/dist/server/root-layout.d.ts +4 -0
  686. package/dist/server/root-layout.d.ts.map +1 -0
  687. package/dist/server/root-layout.js +5 -0
  688. package/dist/server/root-layout.js.map +1 -0
  689. package/dist/server.d.ts +15 -0
  690. package/dist/server.d.ts.map +1 -0
  691. package/dist/server.js +20 -0
  692. package/dist/server.js.map +1 -0
  693. package/dist/ssr/__tests__/ssr-handler.test.d.ts +2 -0
  694. package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +1 -0
  695. package/dist/ssr/__tests__/ssr-handler.test.js +132 -0
  696. package/dist/ssr/__tests__/ssr-handler.test.js.map +1 -0
  697. package/dist/ssr/index.d.ts +98 -0
  698. package/dist/ssr/index.d.ts.map +1 -0
  699. package/dist/ssr/index.js +158 -0
  700. package/dist/ssr/index.js.map +1 -0
  701. package/dist/static-handler.d.ts +50 -0
  702. package/dist/static-handler.d.ts.map +1 -0
  703. package/dist/static-handler.gen.d.ts +5 -0
  704. package/dist/static-handler.gen.d.ts.map +1 -0
  705. package/dist/static-handler.gen.js +5 -0
  706. package/dist/static-handler.gen.js.map +1 -0
  707. package/dist/static-handler.js +29 -0
  708. package/dist/static-handler.js.map +1 -0
  709. package/dist/theme/ThemeProvider.d.ts +20 -0
  710. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  711. package/dist/theme/ThemeProvider.js +240 -0
  712. package/dist/theme/ThemeProvider.js.map +1 -0
  713. package/dist/theme/ThemeScript.d.ts +48 -0
  714. package/dist/theme/ThemeScript.d.ts.map +1 -0
  715. package/dist/theme/ThemeScript.js +13 -0
  716. package/dist/theme/ThemeScript.js.map +1 -0
  717. package/dist/theme/__tests__/theme.test.d.ts +2 -0
  718. package/dist/theme/__tests__/theme.test.d.ts.map +1 -0
  719. package/dist/theme/__tests__/theme.test.js +103 -0
  720. package/dist/theme/__tests__/theme.test.js.map +1 -0
  721. package/dist/theme/constants.d.ts +29 -0
  722. package/dist/theme/constants.d.ts.map +1 -0
  723. package/dist/theme/constants.js +48 -0
  724. package/dist/theme/constants.js.map +1 -0
  725. package/dist/theme/index.d.ts +31 -0
  726. package/dist/theme/index.d.ts.map +1 -0
  727. package/dist/theme/index.js +36 -0
  728. package/dist/theme/index.js.map +1 -0
  729. package/dist/theme/theme-context.d.ts +40 -0
  730. package/dist/theme/theme-context.d.ts.map +1 -0
  731. package/dist/theme/theme-context.js +60 -0
  732. package/dist/theme/theme-context.js.map +1 -0
  733. package/dist/theme/theme-script.d.ts +27 -0
  734. package/dist/theme/theme-script.d.ts.map +1 -0
  735. package/dist/theme/theme-script.js +147 -0
  736. package/dist/theme/theme-script.js.map +1 -0
  737. package/dist/theme/types.d.ts +163 -0
  738. package/dist/theme/types.d.ts.map +1 -0
  739. package/dist/theme/types.js +11 -0
  740. package/dist/theme/types.js.map +1 -0
  741. package/dist/theme/use-theme.d.ts +12 -0
  742. package/dist/theme/use-theme.d.ts.map +1 -0
  743. package/dist/theme/use-theme.js +40 -0
  744. package/dist/theme/use-theme.js.map +1 -0
  745. package/dist/types.d.ts +1479 -0
  746. package/dist/types.d.ts.map +1 -0
  747. package/dist/types.js +10 -0
  748. package/dist/types.js.map +1 -0
  749. package/dist/urls.d.ts +441 -0
  750. package/dist/urls.d.ts.map +1 -0
  751. package/dist/urls.gen.d.ts +8 -0
  752. package/dist/urls.gen.d.ts.map +1 -0
  753. package/dist/urls.gen.js +8 -0
  754. package/dist/urls.gen.js.map +1 -0
  755. package/dist/urls.js +443 -0
  756. package/dist/urls.js.map +1 -0
  757. package/dist/use-loader.d.ts +127 -0
  758. package/dist/use-loader.d.ts.map +1 -0
  759. package/dist/use-loader.js +237 -0
  760. package/dist/use-loader.js.map +1 -0
  761. package/dist/vite/__tests__/ast-handler-extract.test.d.ts +2 -0
  762. package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +1 -0
  763. package/dist/vite/__tests__/ast-handler-extract.test.js +294 -0
  764. package/dist/vite/__tests__/ast-handler-extract.test.js.map +1 -0
  765. package/dist/vite/__tests__/expose-id-utils.test.d.ts +2 -0
  766. package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +1 -0
  767. package/dist/vite/__tests__/expose-id-utils.test.js +224 -0
  768. package/dist/vite/__tests__/expose-id-utils.test.js.map +1 -0
  769. package/dist/vite/__tests__/expose-internal-ids.test.d.ts +2 -0
  770. package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +1 -0
  771. package/dist/vite/__tests__/expose-internal-ids.test.js +647 -0
  772. package/dist/vite/__tests__/expose-internal-ids.test.js.map +1 -0
  773. package/dist/vite/__tests__/expose-router-id.test.d.ts +2 -0
  774. package/dist/vite/__tests__/expose-router-id.test.d.ts.map +1 -0
  775. package/dist/vite/__tests__/expose-router-id.test.js +39 -0
  776. package/dist/vite/__tests__/expose-router-id.test.js.map +1 -0
  777. package/dist/vite/ast-handler-extract.d.ts +49 -0
  778. package/dist/vite/ast-handler-extract.d.ts.map +1 -0
  779. package/dist/vite/ast-handler-extract.js +249 -0
  780. package/dist/vite/ast-handler-extract.js.map +1 -0
  781. package/dist/vite/expose-action-id.d.ts +19 -0
  782. package/dist/vite/expose-action-id.d.ts.map +1 -0
  783. package/dist/vite/expose-action-id.js +250 -0
  784. package/dist/vite/expose-action-id.js.map +1 -0
  785. package/dist/vite/expose-id-utils.d.ts +69 -0
  786. package/dist/vite/expose-id-utils.d.ts.map +1 -0
  787. package/dist/vite/expose-id-utils.js +289 -0
  788. package/dist/vite/expose-id-utils.js.map +1 -0
  789. package/dist/vite/expose-internal-ids.d.ts +22 -0
  790. package/dist/vite/expose-internal-ids.d.ts.map +1 -0
  791. package/dist/vite/expose-internal-ids.js +886 -0
  792. package/dist/vite/expose-internal-ids.js.map +1 -0
  793. package/dist/vite/index.d.ts +149 -0
  794. package/dist/vite/index.d.ts.map +1 -0
  795. package/dist/vite/index.js +130 -15
  796. package/dist/vite/index.js.bak +5448 -0
  797. package/dist/vite/index.js.map +1 -0
  798. package/dist/vite/index.named-routes.gen.ts +103 -0
  799. package/dist/vite/package-resolution.d.ts +43 -0
  800. package/dist/vite/package-resolution.d.ts.map +1 -0
  801. package/dist/vite/package-resolution.js +112 -0
  802. package/dist/vite/package-resolution.js.map +1 -0
  803. package/dist/vite/virtual-entries.d.ts +25 -0
  804. package/dist/vite/virtual-entries.d.ts.map +1 -0
  805. package/dist/vite/virtual-entries.js +110 -0
  806. package/dist/vite/virtual-entries.js.map +1 -0
  807. package/package.json +18 -17
  808. package/skills/hooks/SKILL.md +3 -3
  809. package/skills/links/SKILL.md +10 -10
  810. package/skills/rango/SKILL.md +1 -0
  811. package/skills/react-compiler/SKILL.md +168 -0
  812. package/skills/view-transitions/SKILL.md +85 -3
  813. package/src/browser/react/use-reverse.ts +19 -12
  814. package/src/build/route-types/router-processing.ts +14 -1
  815. package/src/build/route-types/source-scan.ts +118 -0
  816. package/src/handle.ts +3 -5
  817. package/src/loader.rsc.ts +2 -5
  818. package/src/loader.ts +2 -5
  819. package/src/missing-id-error.ts +68 -0
  820. package/src/reverse.ts +16 -13
  821. package/src/route-definition/dsl-helpers.ts +5 -2
  822. package/src/route-definition/helpers-types.ts +31 -19
  823. package/src/router/router-options.ts +24 -0
  824. package/src/router/segment-resolution/fresh.ts +17 -4
  825. package/src/router/segment-resolution/revalidation.ts +17 -4
  826. package/src/router/segment-resolution/view-transition-default.ts +36 -0
  827. package/src/router/types.ts +8 -0
  828. package/src/router.ts +2 -0
  829. package/src/segment-system.tsx +18 -2
  830. package/src/types/segments.ts +18 -1
  831. package/src/urls/path-helper-types.ts +9 -1
  832. package/src/vite/plugins/expose-ids/export-analysis.ts +68 -12
  833. package/src/vite/plugins/expose-internal-ids.ts +12 -4
  834. package/src/vite/router-discovery.ts +14 -2
@@ -13,7 +13,7 @@ argument-hint: [ctx.reverse|href|useHref|useMount|useReverse|scopedReverse]
13
13
  **On the client, two patterns:**
14
14
 
15
15
  1. **Receive URLs as props / loader data / action return.** The default. The server has the full route manifest and handler context — generate URLs there and hand strings to client components.
16
- 2. **`useReverse(routes)`.** Import a generated `routes` map from a `urls()` module's `.gen.ts` and call `reverse(".name", params?)`. Mount-aware via `useMount()`, auto-fills params from `useParams()`, fully typed from the imported map. Use this when a client component needs to generate URLs into a known module without round-tripping through the server.
16
+ 2. **`useReverse(routes)`.** Import a generated `routes` map from a `urls()` module's `.gen.ts` and call `reverse("name", params?)` (the leading dot is optional). Mount-aware via `useMount()`, auto-fills params from `useParams()`, fully typed from the imported map. Use this when a client component needs to generate URLs into a known module without round-tripping through the server.
17
17
 
18
18
  `ctx.reverse()` itself is **server-only** — it depends on the full route manifest and handler context. Client components never import or call it.
19
19
 
@@ -273,7 +273,7 @@ function MountInfo() {
273
273
 
274
274
  Hook that returns a typed local reverse function for a `routes` map imported from a generated `.gen.ts` next to a `urls()` module. The route map is the **exposure boundary** — `useReverse` only knows about names in that map, never the full app manifest.
275
275
 
276
- > Import the per-module `routes` (e.g. `urls/blog.gen.ts`), **not** `router.named-routes.gen.ts`. The named-routes file is the whole app manifest and is server-only data importing it into a client component pulls every route name into the client bundle.
276
+ > **Which map?** `useReverse` accepts any routes map. Prefer the per-module `routes` (e.g. `urls/blog.gen.ts`): it gives **mount-aware** local `.name` reverse (auto-prefixes the `include()` mount) and only that module's names enter the client bundle. You _can_ instead pass `router.named-routes.gen.ts` (`NamedRoutes`) for **global** names (`blog.post`; the leading dot is optional) — it is a plain importable map and works on the client (it is **not** server-only)but its paths are **absolute** while `useReverse` mount-prefixes, so it is correct only at the root mount (under a non-root mount it double-prefixes), and importing it pulls every route name and pattern in the app into the client bundle (a small names-to-paths map — not components or loaders), versus the per-module map which exposes only one module's names. So the per-module map is preferred for in-module links; the named-routes map is the escape hatch for global names.
277
277
 
278
278
  ```tsx
279
279
  "use client";
@@ -285,8 +285,8 @@ export function BlogNav() {
285
285
 
286
286
  return (
287
287
  <nav>
288
- <Link to={reverse(".index")}>Blog</Link>
289
- <Link to={reverse(".post", { postId: "hello" })}>Post</Link>
288
+ <Link to={reverse("index")}>Blog</Link>
289
+ <Link to={reverse("post", { postId: "hello" })}>Post</Link>
290
290
  </nav>
291
291
  );
292
292
  }
@@ -294,7 +294,7 @@ export function BlogNav() {
294
294
 
295
295
  ### How it resolves
296
296
 
297
- 1. Strips the leading `.` and looks up the name in the imported `routes` map.
297
+ 1. Strips an optional leading `.` and looks up the name in the imported `routes` map.
298
298
  2. Joins the local pattern with the surrounding `useMount()` value — the include's URL pattern.
299
299
  3. Substitutes params: explicit params from the call, then auto-filled from `useParams()` for anything still unresolved (mount params like `:tenantId` flow in this way).
300
300
  4. Appends a query string if a search object is passed and the route has a `search` schema.
@@ -362,14 +362,14 @@ reverse(".search", {}, { q: "hello world", page: 2 });
362
362
 
363
363
  ### Errors
364
364
 
365
- - Unknown name: throws `Unknown local route: ".not-a-route"`.
365
+ - Unknown name: throws `Unknown route: ".not-a-route"`.
366
366
  - Missing required param: throws `Missing param "postId" for route ".detail"`.
367
367
 
368
368
  Both happen synchronously during `reverse()` — wrap calls in try/catch (or an ErrorBoundary if the throw happens during render) when you need to surface them as UI.
369
369
 
370
- ### Names are dot-only on the client
370
+ ### The leading dot is optional
371
371
 
372
- `useReverse` accepts only `.name` (and dotted variants like `.nested.index`). There is no global namespace on the client the import IS the scope. To link into a different module, import that module's `routes`:
372
+ `reverse("post")` and `reverse(".post")` resolve **identically** the leading dot is cosmetic. The map you import IS the scope, so there is no separate global namespace to disambiguate and the dot carries no meaning; it exists only as a readability convention and for parity with `ctx.reverse(".name")` on the server. To link into a different module, import that module's `routes`:
373
373
 
374
374
  ```tsx
375
375
  import { routes as blogRoutes } from "../urls/blog.gen.js";
@@ -380,8 +380,8 @@ function CrossNav() {
380
380
  const shop = useReverse(shopRoutes);
381
381
  return (
382
382
  <nav>
383
- <Link to={blog(".index")}>Blog</Link>
384
- <Link to={shop(".cart")}>Cart</Link>
383
+ <Link to={blog("index")}>Blog</Link>
384
+ <Link to={shop("cart")}>Cart</Link>
385
385
  </nav>
386
386
  );
387
387
  }
@@ -220,6 +220,7 @@ Grouped by concern — read when you need to…
220
220
  | `/tailwind` | Set up Tailwind CSS v4 with `?url` imports |
221
221
  | `/view-transitions` | React View Transitions on layouts, routes, and parallel slots |
222
222
  | `/breadcrumbs` | Built-in Breadcrumbs handle for breadcrumb navigation |
223
+ | `/react-compiler` | Enable React Compiler (opt-in) the vite-rsc way; client-only scope |
223
224
 
224
225
  **Observability & production health**:
225
226
 
@@ -0,0 +1,168 @@
1
+ ---
2
+ name: react-compiler
3
+ description: Enable the React Compiler in a Rango app the @vitejs/plugin-rsc way — a separate @rolldown/plugin-babel running reactCompilerPreset(), ordered after react() and before the plugin that supplies @vitejs/plugin-rsc. Use when a consumer wants to turn React Compiler on, hits the dead plugin-react v6 `react({ babel })` path, or is unsure why server components aren't being compiled.
4
+ argument-hint:
5
+ ---
6
+
7
+ # React Compiler
8
+
9
+ React Compiler is **opt-in** in Rango. The plugin pipeline is fully compatible —
10
+ you just add one more plugin. The catch on a current Rango stack (Vite 8 +
11
+ `@vitejs/plugin-react` v6) is that **v6 dropped its internal Babel for oxc**, so
12
+ the way the React docs and most blog posts show it — `react({ babel: { plugins:
13
+ [...] } })` — silently does nothing. The compiler has to be its own top-level
14
+ plugin.
15
+
16
+ ## The shape (read first)
17
+
18
+ - The compiler is a **Babel** plugin, run via
19
+ [`@rolldown/plugin-babel`](https://www.npmjs.com/package/@rolldown/plugin-babel)
20
+ with `reactCompilerPreset()` from `@vitejs/plugin-react`.
21
+ - **Ordering is load-bearing:** put `babel(...)` **after `react()`** and
22
+ **before the plugin that supplies `@vitejs/plugin-rsc`**. In a default Rango
23
+ app that plugin is `rango()` itself; in a Cloudflare app it is
24
+ `@cloudflare/vite-plugin`.
25
+ - **It is client-only.** `reactCompilerPreset()` gates itself to the client
26
+ environment. Server/RSC components are not compiled, and that is the upstream
27
+ example's behavior — not a Rango limitation. See
28
+ [What gets compiled](#what-gets-compiled-client-only).
29
+ - **Rango's build-time prerender is unaffected.** You do not need to do anything
30
+ special. See [Prerender](#interaction-with-build-time-prerender).
31
+
32
+ ## Step 1: Install
33
+
34
+ ```bash
35
+ pnpm add -D @rolldown/plugin-babel @babel/core babel-plugin-react-compiler
36
+ # TypeScript users also want the Babel core types:
37
+ pnpm add -D @types/babel__core
38
+ ```
39
+
40
+ React 19 ships `react/compiler-runtime` in-tree, so there is **no** extra runtime
41
+ to install and **no** `target` option to set. Only pass `target: '17' | '18'` to
42
+ `reactCompilerPreset()` if you are on an older React.
43
+
44
+ ## Step 2: Wire it in
45
+
46
+ ### Default (non-Cloudflare) app
47
+
48
+ ```ts
49
+ // vite.config.ts
50
+ import { defineConfig } from "vite";
51
+ import react, { reactCompilerPreset } from "@vitejs/plugin-react";
52
+ import babel from "@rolldown/plugin-babel";
53
+ import { rango } from "@rangojs/router/vite";
54
+
55
+ export default defineConfig({
56
+ plugins: [
57
+ react(),
58
+ babel({ presets: [reactCompilerPreset()] }),
59
+ rango(), // supplies @vitejs/plugin-rsc
60
+ ],
61
+ });
62
+ ```
63
+
64
+ ### Cloudflare app
65
+
66
+ ```ts
67
+ // vite.config.ts
68
+ import { cloudflare } from "@cloudflare/vite-plugin";
69
+ import react, { reactCompilerPreset } from "@vitejs/plugin-react";
70
+ import babel from "@rolldown/plugin-babel";
71
+ import { defineConfig } from "vite";
72
+ import { rango } from "@rangojs/router/vite";
73
+
74
+ export default defineConfig({
75
+ plugins: [
76
+ react(),
77
+ babel({ presets: [reactCompilerPreset()] }),
78
+ rango({ preset: "cloudflare" }),
79
+ cloudflare({
80
+ /* ... */
81
+ }), // supplies @vitejs/plugin-rsc
82
+ ],
83
+ });
84
+ ```
85
+
86
+ ## What gets compiled (client-only)
87
+
88
+ `reactCompilerPreset()` carries
89
+ `rolldown.applyToEnvironmentHook: (env) => env.config.consumer === "client"`, so
90
+ even though the babel plugin is top-level, the transform runs **only in the
91
+ `client` environment**:
92
+
93
+ | Environment | `consumer` | Compiled? |
94
+ | ----------- | ---------- | --------- |
95
+ | client | `client` | Yes |
96
+ | ssr | `server` | No |
97
+ | rsc | `server` | No |
98
+
99
+ This matches the upstream `@vitejs/plugin-rsc` example. If you genuinely need to
100
+ compile **server** components, you would have to invoke
101
+ `babel-plugin-react-compiler` yourself without the preset's
102
+ `applyToEnvironmentHook` — that is outside what the example does and is not
103
+ covered here.
104
+
105
+ ## Options
106
+
107
+ `reactCompilerPreset()` forwards to `babel-plugin-react-compiler`:
108
+
109
+ | Option | Effect |
110
+ | ------------------------------- | -------------------------------------------------------------------------------------- |
111
+ | `compilationMode: 'annotation'` | Compile only components marked with the `"use memo"` directive, not every eligible one |
112
+ | `target: '17' \| '18'` | Emit `react-compiler-runtime` calls for React < 19. Omit on React 19+. |
113
+
114
+ ## Interaction with build-time prerender
115
+
116
+ Nothing to configure. Rango's discovery/prerender step runs a throwaway temp Vite
117
+ server (`createTempRscServer`) that forwards only your **resolution** plugins
118
+ (`resolveId` / `load`). A pure transform plugin like `@rolldown/plugin-babel` is
119
+ intentionally **not** forwarded — and that is correct: the temp runner only
120
+ produces **data** (serialized Flight payloads + the route manifest), not shipped
121
+ code, and React Compiler is a memoization-only transform that does not change
122
+ rendered output. Your shipped client bundle still gets compiled, because the
123
+ babel plugin lives in your app's top-level plugin array alongside `react()`.
124
+
125
+ ## Step 3: Verify the compiler actually ran
126
+
127
+ A compiled module imports the cache allocator from `react/compiler-runtime` and
128
+ calls `_c(n)`. Those two appear in **every** compiled module, so they are the
129
+ reliable per-module signal in dev:
130
+
131
+ ```bash
132
+ pnpm dev
133
+ # fetch any client component module straight from Vite and look for the markers:
134
+ curl -s "http://localhost:5173/src/components/SomeClientComponent.tsx" \
135
+ | grep -E "compiler-runtime|_c\("
136
+ ```
137
+
138
+ For a production build, grep the built client bundle for the compiler's
139
+ input-independent cache check, which has a **zero baseline** without the compiler:
140
+
141
+ ```bash
142
+ pnpm build
143
+ grep -r "Symbol.for(\"react.memo_cache_sentinel\")" dist/client/assets/ | head
144
+ ```
145
+
146
+ Note the **comparison** form `$[i] === Symbol.for("react.memo_cache_sentinel")`
147
+ is only emitted for components with input-independent JSX, so it is reliable over
148
+ the **whole** client bundle, not necessarily in one chosen module. (React core
149
+ also defines that symbol once with a single `=` assignment, so count comparisons,
150
+ not the bare string.) Run the same grep over `dist/rsc` / `dist/ssr` and you
151
+ should find **none** — that is the client-only contract.
152
+
153
+ ## Troubleshooting
154
+
155
+ | Symptom | Cause / fix |
156
+ | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
157
+ | Nothing is compiled; no `compiler-runtime` import anywhere | You used `react({ babel: { plugins: [...] } })`. plugin-react v6 has no internal Babel — add `@rolldown/plugin-babel` as its own plugin. |
158
+ | Client compiled, but server/RSC components are not | Expected. `reactCompilerPreset()` is client-only (see the table). Not a bug. |
159
+ | `Cannot find module 'babel-plugin-react-compiler'` (or `@babel/core`) | Install the peer deps from Step 1; they are not bundled by `reactCompilerPreset()`. |
160
+ | Build pulls in `react-compiler-runtime` | You set `target: '17'`/`'18'` on React 19. Drop `target` — React 19 ships `react/compiler-runtime` in-tree. |
161
+ | Output looks compiled but a component misbehaves | The component likely breaks the Rules of React. Fix the component, or scope the compiler with `compilationMode: 'annotation'` while you do. |
162
+
163
+ ## Reference
164
+
165
+ A worked, tested wiring (dev + production e2e markers, incl. the client-only
166
+ contract) lives in the `@rangojs/router` repo: `docs/react-compiler.md` and the
167
+ `react-compiler.test.ts` files under `e2e/e2e-basic`, `tests/cloudflare-basic`,
168
+ and `tests/vite-rsc-demo`.
@@ -6,11 +6,33 @@ argument-hint: [layout|route|parallel|intercept]
6
6
 
7
7
  # View Transitions
8
8
 
9
- Rango wires React's experimental `<ViewTransition>` into the segment tree via the `transition()` helper. Each segment can declare its own transition config; rango wraps it at the right tree position so navigations morph the right pieces and modals do not.
9
+ `transition()` opts a route (or group of routes) into transition-driven navigation. It does two things, and you choose how far to go:
10
10
 
11
- > Requires React experimental (the build that exports `<ViewTransition>` and `addTransitionType`). With stable React, `transition()` is a no-opyour routes still render, just without view-transition wrappers.
11
+ 1. **`startTransition` (the foundation).** The navigation commit is driven through React's `startTransition`. That holds the previous content across a same-route navigation (stale-while-revalidate no loading-skeleton flash) and is the **precondition** for any view-transition animation. Works on **all** React versions.
12
+ 2. **`<ViewTransition>` (the animation, layered on top).** On experimental React, rango also wraps the segment content in React's `<ViewTransition>` so the swap cross-fades/morphs. This is the only part that needs experimental React; pass `viewTransition: false` to keep #1 without it (and place your own `<ViewTransition>` where you want it).
12
13
 
13
- ## What `transition()` does
14
+ > The `<ViewTransition>` layer requires React experimental (the build that exports `<ViewTransition>` / `addTransitionType`). On stable React that layer is a no-op — but the `startTransition` driving (content hold) still applies.
15
+
16
+ ## Purpose: `startTransition` vs `<ViewTransition>`
17
+
18
+ These are two **independent** mechanisms. `startTransition` controls _fallbacks_ (hold the old content vs. flash the Suspense skeleton) and is what lets a view transition fire at all; the `<ViewTransition>` boundary is the _visual cross-fade_.
19
+
20
+ | | `startTransition` **OFF** | `startTransition` **ON** |
21
+ | -------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
22
+ | **`<ViewTransition>` OFF** | plain nav — remount on param change, skeleton flash, no animation | **hold** content (no skeleton flash); a consumer-placed `<ViewTransition>` still morphs; no router cross-fade |
23
+ | **`<ViewTransition>` ON** | **impossible** — React never activates `<ViewTransition>` outside a Transition | hold + router cross-fade |
24
+
25
+ The bottom-left cell is the key constraint: a view transition cannot exist without a `startTransition`. So once you reach for `transition()`, the only real choice is _startTransition_ vs _startTransition + ViewTransition_:
26
+
27
+ | What you want | Config | Effect |
28
+ | -------------------------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
29
+ | nothing (default nav) | no `transition()` | remount + skeleton on param change |
30
+ | `startTransition` only | `transition({ viewTransition: false })` | hold content; place your own `<ViewTransition>` where you want it |
31
+ | `startTransition` + `<ViewTransition>` | `transition({})` / `transition({ enter, exit, … })` | hold + router cross-fade (experimental React; on stable it degrades to the `startTransition`-only row) |
32
+
33
+ `createRouter({ viewTransition: "auto" \| false })` sets the app-wide default for the third row; a per-segment `viewTransition` wins. See [Opting out of the router boundary](#opting-out-of-the-router-boundary-place-your-own-viewtransition) for the full opt-out story.
34
+
35
+ ## What `transition()` does (wrap location)
14
36
 
15
37
  `transition(config)` attaches a [`TransitionConfig`](#transitionconfig) to the surrounding entry. Where the wrap actually lands in the rendered React tree depends on the segment type:
16
38
 
@@ -186,12 +208,72 @@ interface TransitionConfig {
186
208
  share?: string | Record<string, string>;
187
209
  default?: string | Record<string, string>; // fallback for any phase
188
210
  name?: string; // explicit view-transition-name
211
+ viewTransition?: "auto" | false; // boundary opt-out (see below)
189
212
  }
190
213
  ```
191
214
 
192
215
  - `default` is the catch-all if a phase-specific prop is unset.
193
216
  - The object form keys are React transition types tagged by rango: `"navigation"` (forward navigations), `"navigation-back"` (popstate cache restores), and `"action"` (partial-update action/refetch paths only — see the caveat in "Direction-aware transitions").
194
217
  - `name` lets you participate in cross-page morphs by name (advanced; you usually don't need this on a layout/route-level wrap).
218
+ - `viewTransition` toggles whether rango places its own `<ViewTransition>` boundary. `"auto"` (default) wraps as described above; `false` opts out — see the next section.
219
+
220
+ ## Opting out of the router boundary (place your own `<ViewTransition>`)
221
+
222
+ By default a `transition()` segment gets a rango-placed `<ViewTransition>` boundary — a cross-fade of the whole outlet/route. If you'd rather animate specific elements yourself (place `<ViewTransition name="...">` in your components), set `viewTransition: false`. The router then contributes **no boundary of its own** but still:
223
+
224
+ - drives the navigation commit through `startTransition` (so React runs `document.startViewTransition`, and your own `<ViewTransition>` elements animate on navigation — driving is what they need, not a router boundary), and
225
+ - holds same-route content (stale-while-revalidate; no skeleton flash).
226
+
227
+ ```tsx
228
+ // Router drives the transition + holds content, but places NO cross-fade.
229
+ // Only your <ViewTransition name="hero"> morphs.
230
+ urls(({ path, transition }) => [
231
+ path("/product/:id", ProductPage, { name: "product" }, () => [
232
+ transition({ viewTransition: false }),
233
+ ]),
234
+ ]);
235
+
236
+ // ProductPage renders the boundary itself, exactly where it's wanted:
237
+ function ProductPage() {
238
+ return (
239
+ <ViewTransition name="hero">
240
+ <img src={cover} />
241
+ </ViewTransition>
242
+ );
243
+ }
244
+ ```
245
+
246
+ This is the rango analogue of the "router triggers, you place the names" model used by React Router / TanStack: rango guarantees navigations run inside a React transition; you own the boundaries.
247
+
248
+ **App-wide default.** Flip the default for every `transition()` segment at the router level. A per-segment `viewTransition` still overrides it.
249
+
250
+ ```ts
251
+ const router = createRouter<AppEnv>({ viewTransition: false });
252
+ // Now `transition({})` drives + holds but places no boundary anywhere.
253
+ // Re-enable a router boundary on one route with transition({ viewTransition: "auto" }).
254
+ ```
255
+
256
+ **Precedence (per-route vs router default).** A bare `transition({})` has no per-route `viewTransition`, so it inherits the router default (`"auto"` unless `createRouter({ viewTransition: false })`). An explicit per-route value always wins. The `viewTransition` flag only toggles the boundary — `startTransition` driving and content-hold are on in every row below (they key off `transition()` presence, not this flag):
257
+
258
+ | per-route (`transition(...)`) | router (`createRouter`) | resolved boundary | result |
259
+ | ---------------------------------------- | ----------------------- | ------------------------ | ----------- |
260
+ | `transition({})` (unset) | `"auto"` (default) | wrap | **ST + VT** |
261
+ | `transition({})` (unset) | `false` | no wrap | **ST only** |
262
+ | `transition({ viewTransition: "auto" })` | `"auto"` | wrap | ST + VT |
263
+ | `transition({ viewTransition: "auto" })` | `false` | wrap (per-route wins) | **ST + VT** |
264
+ | `transition({ viewTransition: false })` | `"auto"` | no wrap (per-route wins) | **ST only** |
265
+ | `transition({ viewTransition: false })` | `false` | no wrap | ST only |
266
+
267
+ On stable React the "VT" column is always a no-op (there is no `<ViewTransition>`), so every row collapses to its `startTransition`-only behavior there.
268
+
269
+ | Config | Router boundary | startTransition driving (no skeleton flash) | Your own `<ViewTransition name>` |
270
+ | ---------------------------------------------------- | ---------------- | ------------------------------------------- | ---------------------------------- |
271
+ | no `transition()` | — | no | does not fire on nav |
272
+ | `transition({})` / `{ viewTransition: "auto" }` | yes (cross-fade) | yes | fires, under the router cross-fade |
273
+ | `transition({ viewTransition: false })` | none | yes | fires alone |
274
+ | global `viewTransition: false`, route `transition()` | none | yes | fires alone |
275
+
276
+ > On **stable** React there is no `<ViewTransition>` at all, so `viewTransition: false` is visually a no-op there — but the startTransition driving and content-hold still apply, identical to `transition({})`.
195
277
 
196
278
  ## Recommendations
197
279
 
@@ -34,11 +34,18 @@ function joinMount(mount: string, pattern: string): string {
34
34
  /**
35
35
  * Mount-aware reverse function for a locally-imported `routes` map.
36
36
  *
37
- * Resolves dot-prefixed route names against the passed `routes` (typically
38
- * a generated `routes` from a `urls()` module's `.gen.ts`), prefixes the
39
- * result with the surrounding `include()` mount path, and substitutes
40
- * params — auto-filling from the current matched route's params and
41
- * letting explicit params override.
37
+ * The `routes` map you pass IS the scope: `reverse("name")` looks the name up
38
+ * in that map (verbatim), prefixes the result with the surrounding `include()`
39
+ * mount path via `useMount()`, and substitutes params — auto-filling from the
40
+ * current matched route's params, with explicit params overriding. A module's
41
+ * components can therefore reverse their own routes without knowing where the
42
+ * module is mounted: include it under any prefix and the URLs resolve correctly.
43
+ *
44
+ * The leading dot is optional and cosmetic: `reverse("post")` and
45
+ * `reverse(".post")` resolve identically. The dot exists only as a readability
46
+ * convention and for parity with `ctx.reverse(".name")` on the server; here the
47
+ * passed map is the scope, so there is no separate global namespace to
48
+ * disambiguate and the dot carries no meaning.
42
49
  *
43
50
  * @example
44
51
  * ```tsx
@@ -50,8 +57,8 @@ function joinMount(mount: string, pattern: string): string {
50
57
  * const reverse = useReverse(blogRoutes);
51
58
  * return (
52
59
  * <>
53
- * <Link to={reverse(".index")}>Blog</Link>
54
- * <Link to={reverse(".post", { postId: "hello" })}>Post</Link>
60
+ * <Link to={reverse("index")}>Blog</Link>
61
+ * <Link to={reverse("post", { postId: "hello" })}>Post</Link>
55
62
  * </>
56
63
  * );
57
64
  * }
@@ -69,14 +76,14 @@ export function useReverse<const TRoutes extends LocalRouteMap>(
69
76
  explicitParams?: Record<string, string | undefined>,
70
77
  search?: Record<string, unknown>,
71
78
  ): string => {
72
- if (!name.startsWith(".")) {
73
- throw new Error(`Local route names must start with ".": "${name}"`);
74
- }
75
- const lookupName = name.slice(1);
79
+ // The leading dot is optional. The passed map IS the scope, so a dot to
80
+ // signal "local" is unnecessary "detail" and ".detail" resolve the same.
81
+ // A dot is accepted (and stripped) for readability / ctx.reverse parity.
82
+ const lookupName = name.startsWith(".") ? name.slice(1) : name;
76
83
  const entry = (routes as LocalRouteMap)[lookupName];
77
84
  const pattern = getPattern(entry);
78
85
  if (pattern === undefined) {
79
- throw new Error(`Unknown local route: "${name}"`);
86
+ throw new Error(`Unknown route: "${name}"`);
80
87
  }
81
88
 
82
89
  const joined = joinMount(mount, pattern);
@@ -15,6 +15,7 @@ import {
15
15
  import ts from "typescript";
16
16
  import { generateRouteTypesSource } from "./codegen.js";
17
17
  import type { ScanFilter } from "./scan-filter.js";
18
+ import { firstCodeMatchIndex } from "./source-scan.js";
18
19
  import {
19
20
  resolveImportedVariable,
20
21
  resolveImportPath,
@@ -38,6 +39,8 @@ function countPublicRouteEntries(source: string): number {
38
39
  }
39
40
 
40
41
  const ROUTER_CALL_PATTERN = /\bcreateRouter\s*[<(]/;
42
+ // Global variant for the code-region scan (firstCodeMatchIndex sets lastIndex).
43
+ const ROUTER_CALL_PATTERN_G = /\bcreateRouter\s*[<(]/g;
41
44
 
42
45
  function isRoutableSourceFile(name: string): boolean {
43
46
  return (
@@ -90,7 +93,17 @@ function findRouterFilesRecursive(
90
93
 
91
94
  try {
92
95
  const source = readFileSync(fullPath, "utf-8");
93
- if (ROUTER_CALL_PATTERN.test(source)) {
96
+ // Fast path: most files contain no `createRouter(` at all, so the cheap
97
+ // raw regex short-circuits before the code-region scan. Only a file that
98
+ // mentions the token (real call OR a comment/string mention) is rescanned
99
+ // over code regions — allocation-free, never building a stripped copy —
100
+ // so a mention inside a comment or string is not mistaken for a real
101
+ // router file (which previously triggered a spurious "Multiple routers
102
+ // found" error).
103
+ if (
104
+ ROUTER_CALL_PATTERN.test(source) &&
105
+ firstCodeMatchIndex(source, ROUTER_CALL_PATTERN_G) >= 0
106
+ ) {
94
107
  routerFilesInDir.push(fullPath);
95
108
  }
96
109
  } catch {
@@ -0,0 +1,118 @@
1
+ // Allocation-light, linear-time source scanning for the build-time scanners.
2
+ //
3
+ // The router-file scanner, the HMR relevance check, and the unsupported-shape
4
+ // warning all need to know whether a token like `createRouter(` / `createLoader(`
5
+ // appears in REAL code versus inside a comment or string literal. Rather than
6
+ // build a full comment/string-stripped copy of the source (which on a large
7
+ // file allocates an O(n) string plus, naively, a per-char array), these helpers
8
+ // run the regex over the whole source ONCE (the engine sweeps left-to-right,
9
+ // O(n)) and classify each match's offset with a forward, O(1)-memory cursor that
10
+ // advances monotonically across the source.
11
+ //
12
+ // Time: O(n) — one native regex sweep plus one forward classification pass.
13
+ // Memory: O(1) for the boolean check; O(#matches) for the index list. No
14
+ // stripped copy and no per-char array are ever materialized.
15
+ //
16
+ // Pragmatic scanner, not a full tokenizer: regex literals are not special-cased
17
+ // (a target token inside one is implausible) and template interpolations are
18
+ // treated as opaque string content. One intentional consequence: a token whose
19
+ // match would only complete by treating an interleaved comment as whitespace
20
+ // (e.g. `createRouter /* x */ (`) is not detected — real calls never interleave
21
+ // a comment between the callee and its arguments.
22
+
23
+ // JS line terminators end a `//` comment: LF, CR, LS (U+2028), PS (U+2029).
24
+ function isLineTerminator(ch: string): boolean {
25
+ const c = ch.charCodeAt(0);
26
+ // LF, CR, LS (U+2028), PS (U+2029)
27
+ return c === 10 || c === 13 || c === 0x2028 || c === 0x2029;
28
+ }
29
+
30
+ /**
31
+ * Build a classifier that answers "is offset `q` in code (not a comment or
32
+ * string)?" for STRICTLY INCREASING `q`. The internal cursor only moves forward,
33
+ * so a full left-to-right sequence of queries costs O(n) total with O(1) memory.
34
+ */
35
+ function makeCodeClassifier(code: string): (q: number) => boolean {
36
+ const n = code.length;
37
+ let i = 0; // forward cursor: everything before `i` is already classified
38
+ let skipStart = -1; // last detected comment/string region (cache)
39
+ let skipEnd = -1;
40
+
41
+ return (q: number): boolean => {
42
+ if (q >= skipStart && q < skipEnd) return false; // q in the cached region
43
+ while (i < n && i <= q) {
44
+ const c = code[i];
45
+ const d = i + 1 < n ? code[i + 1] : "";
46
+ let end = -1;
47
+ if (c === "/" && d === "/") {
48
+ let j = i + 2;
49
+ while (j < n && !isLineTerminator(code[j])) j++;
50
+ end = j;
51
+ } else if (c === "/" && d === "*") {
52
+ let j = i + 2;
53
+ while (j < n && !(code[j] === "*" && code[j + 1] === "/")) j++;
54
+ end = Math.min(n, j + 2);
55
+ } else if (c === '"' || c === "'" || c === "`") {
56
+ let j = i + 1;
57
+ while (j < n) {
58
+ if (code[j] === "\\") {
59
+ j += 2;
60
+ continue;
61
+ }
62
+ if (code[j] === c) {
63
+ j++;
64
+ break;
65
+ }
66
+ j++;
67
+ }
68
+ end = j;
69
+ }
70
+ if (end >= 0) {
71
+ // Comment/string region [i, end). `q >= i` here (loop condition).
72
+ if (q < end) {
73
+ skipStart = i;
74
+ skipEnd = end;
75
+ return false;
76
+ }
77
+ i = end;
78
+ } else {
79
+ i++;
80
+ }
81
+ }
82
+ return true; // reached q in code mode
83
+ };
84
+ }
85
+
86
+ /**
87
+ * Index of the first match of `pattern` that occurs in code (not in a comment
88
+ * or string), or -1. `pattern` MUST be a global (`/g`) regex. Single native
89
+ * regex sweep with early-exit; O(1) extra memory.
90
+ */
91
+ export function firstCodeMatchIndex(code: string, pattern: RegExp): number {
92
+ const inCode = makeCodeClassifier(code);
93
+ pattern.lastIndex = 0;
94
+ let m: RegExpExecArray | null;
95
+ while ((m = pattern.exec(code)) !== null) {
96
+ if (inCode(m.index)) return m.index;
97
+ if (pattern.lastIndex <= m.index) pattern.lastIndex = m.index + 1;
98
+ }
99
+ return -1;
100
+ }
101
+
102
+ /**
103
+ * Byte offsets of every match of `pattern` that occurs in code (not in a
104
+ * comment or string). `pattern` MUST be a global (`/g`) regex. Each offset is
105
+ * the match start — the same byte offset a raw `pattern.exec` reports. O(n)
106
+ * time, O(#matches) memory.
107
+ */
108
+ export function codeMatchIndices(code: string, pattern: RegExp): number[] {
109
+ const inCode = makeCodeClassifier(code);
110
+ const indices: number[] = [];
111
+ pattern.lastIndex = 0;
112
+ let m: RegExpExecArray | null;
113
+ while ((m = pattern.exec(code)) !== null) {
114
+ if (inCode(m.index)) indices.push(m.index);
115
+ if (pattern.lastIndex <= m.index) pattern.lastIndex = m.index + 1;
116
+ }
117
+ return indices;
118
+ }
package/src/handle.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { missingInjectedIdError } from "./missing-id-error.js";
2
+
1
3
  /**
2
4
  * Handle definition for accumulating data across route segments.
3
5
  *
@@ -96,11 +98,7 @@ export function createHandle<TData, TAccumulated = TData[]>(
96
98
  const handleId = __injectedId ?? "";
97
99
 
98
100
  if (!handleId && process.env.NODE_ENV === "development") {
99
- throw new Error(
100
- "[rango] Handle is missing $$id. " +
101
- "Make sure the exposeInternalIds Vite plugin is enabled and " +
102
- "the handle is exported with: export const MyHandle = createHandle(...)",
103
- );
101
+ throw missingInjectedIdError("Handle", "createHandle");
104
102
  }
105
103
 
106
104
  const collectFn =
package/src/loader.rsc.ts CHANGED
@@ -21,6 +21,7 @@ import {
21
21
  registerFetchableLoader,
22
22
  getFetchableLoader,
23
23
  } from "./server/fetchable-loader-store.js";
24
+ import { missingInjectedIdError } from "./missing-id-error.js";
24
25
 
25
26
  export { getFetchableLoader };
26
27
 
@@ -53,11 +54,7 @@ export function createLoader<T>(
53
54
  const loaderId = __injectedId || "";
54
55
 
55
56
  if (!loaderId && process.env.NODE_ENV === "development") {
56
- throw new Error(
57
- "[rango] Loader is missing $$id. " +
58
- "Make sure the exposeInternalIds Vite plugin is enabled and " +
59
- "the loader is exported with: export const MyLoader = createLoader(...)",
60
- );
57
+ throw missingInjectedIdError("Loader", "createLoader");
61
58
  }
62
59
 
63
60
  // If not fetchable, store fn in registry (for SSR ctx.use() resolution)
package/src/loader.ts CHANGED
@@ -18,6 +18,7 @@ import type {
18
18
  LoaderDefinition,
19
19
  LoaderFn,
20
20
  } from "./types.js";
21
+ import { missingInjectedIdError } from "./missing-id-error.js";
21
22
 
22
23
  // Overload 1: With function only (not fetchable)
23
24
  export function createLoader<T>(
@@ -46,11 +47,7 @@ export function createLoader<T>(
46
47
  const loaderId = __injectedId || "";
47
48
 
48
49
  if (!loaderId && process.env.NODE_ENV === "development") {
49
- throw new Error(
50
- "[rango] Loader is missing $$id. " +
51
- "Make sure the exposeInternalIds Vite plugin is enabled and " +
52
- "the loader is exported with: export const MyLoader = createLoader(...)",
53
- );
50
+ throw missingInjectedIdError("Loader", "createLoader");
54
51
  }
55
52
 
56
53
  return {