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

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 (844) hide show
  1. package/dist/vite/index.js +205 -95
  2. package/package.json +17 -18
  3. package/skills/api-client/SKILL.md +211 -0
  4. package/skills/mime-routes/SKILL.md +1 -1
  5. package/skills/rango/SKILL.md +1 -0
  6. package/skills/response-routes/SKILL.md +61 -43
  7. package/skills/typesafety/SKILL.md +3 -3
  8. package/src/__augment-tests__/augmented.check.ts +2 -3
  9. package/src/build/collect-fallback-refs.ts +107 -0
  10. package/src/build/generate-manifest.ts +28 -1
  11. package/src/build/index.ts +8 -1
  12. package/src/build/prefix-tree-utils.ts +123 -0
  13. package/src/build/route-trie.ts +43 -0
  14. package/src/client.tsx +4 -23
  15. package/src/errors.ts +0 -3
  16. package/src/href-client.ts +7 -8
  17. package/src/index.rsc.ts +1 -2
  18. package/src/index.ts +1 -2
  19. package/src/router/find-match.ts +54 -6
  20. package/src/router/lazy-includes.ts +33 -14
  21. package/src/router/manifest.ts +19 -6
  22. package/src/router/pattern-matching.ts +15 -2
  23. package/src/router/router-interfaces.ts +11 -0
  24. package/src/router/trie-matching.ts +22 -3
  25. package/src/router.ts +21 -7
  26. package/src/rsc/manifest-init.ts +28 -41
  27. package/src/rsc/response-error.ts +79 -12
  28. package/src/rsc/response-route-handler.ts +16 -13
  29. package/src/urls/index.ts +1 -2
  30. package/src/urls/type-extraction.ts +33 -24
  31. package/src/vite/debug.ts +1 -0
  32. package/src/vite/discovery/discover-routers.ts +46 -29
  33. package/src/vite/discovery/state.ts +7 -0
  34. package/src/vite/index.ts +2 -0
  35. package/src/vite/plugin-types.ts +67 -0
  36. package/src/vite/plugins/client-ref-hashing.ts +12 -1
  37. package/src/vite/rango.ts +40 -0
  38. package/src/vite/utils/client-chunks.ts +190 -0
  39. package/src/vite/utils/manifest-utils.ts +8 -75
  40. package/src/vite/utils/shared-utils.ts +68 -3
  41. package/dist/__internal.d.ts +0 -83
  42. package/dist/__internal.d.ts.map +0 -1
  43. package/dist/__internal.js +0 -19
  44. package/dist/__internal.js.map +0 -1
  45. package/dist/__mocks__/version.d.ts +0 -7
  46. package/dist/__mocks__/version.d.ts.map +0 -1
  47. package/dist/__mocks__/version.js +0 -7
  48. package/dist/__mocks__/version.js.map +0 -1
  49. package/dist/__tests__/client-href.test.d.ts +0 -2
  50. package/dist/__tests__/client-href.test.d.ts.map +0 -1
  51. package/dist/__tests__/client-href.test.js +0 -74
  52. package/dist/__tests__/client-href.test.js.map +0 -1
  53. package/dist/__tests__/component-utils.test.d.ts +0 -2
  54. package/dist/__tests__/component-utils.test.d.ts.map +0 -1
  55. package/dist/__tests__/component-utils.test.js +0 -51
  56. package/dist/__tests__/component-utils.test.js.map +0 -1
  57. package/dist/__tests__/event-controller.test.d.ts +0 -2
  58. package/dist/__tests__/event-controller.test.d.ts.map +0 -1
  59. package/dist/__tests__/event-controller.test.js +0 -538
  60. package/dist/__tests__/event-controller.test.js.map +0 -1
  61. package/dist/__tests__/helpers/route-tree.d.ts +0 -118
  62. package/dist/__tests__/helpers/route-tree.d.ts.map +0 -1
  63. package/dist/__tests__/helpers/route-tree.js +0 -374
  64. package/dist/__tests__/helpers/route-tree.js.map +0 -1
  65. package/dist/__tests__/match-result.test.d.ts +0 -2
  66. package/dist/__tests__/match-result.test.d.ts.map +0 -1
  67. package/dist/__tests__/match-result.test.js +0 -154
  68. package/dist/__tests__/match-result.test.js.map +0 -1
  69. package/dist/__tests__/navigation-store.test.d.ts +0 -2
  70. package/dist/__tests__/navigation-store.test.d.ts.map +0 -1
  71. package/dist/__tests__/navigation-store.test.js +0 -440
  72. package/dist/__tests__/navigation-store.test.js.map +0 -1
  73. package/dist/__tests__/partial-update.test.d.ts +0 -2
  74. package/dist/__tests__/partial-update.test.d.ts.map +0 -1
  75. package/dist/__tests__/partial-update.test.js +0 -1009
  76. package/dist/__tests__/partial-update.test.js.map +0 -1
  77. package/dist/__tests__/reverse-types.test.d.ts +0 -8
  78. package/dist/__tests__/reverse-types.test.d.ts.map +0 -1
  79. package/dist/__tests__/reverse-types.test.js +0 -656
  80. package/dist/__tests__/reverse-types.test.js.map +0 -1
  81. package/dist/__tests__/route-definition.test.d.ts +0 -2
  82. package/dist/__tests__/route-definition.test.d.ts.map +0 -1
  83. package/dist/__tests__/route-definition.test.js +0 -55
  84. package/dist/__tests__/route-definition.test.js.map +0 -1
  85. package/dist/__tests__/router-helpers.test.d.ts +0 -2
  86. package/dist/__tests__/router-helpers.test.d.ts.map +0 -1
  87. package/dist/__tests__/router-helpers.test.js +0 -377
  88. package/dist/__tests__/router-helpers.test.js.map +0 -1
  89. package/dist/__tests__/router-integration-2.test.d.ts +0 -2
  90. package/dist/__tests__/router-integration-2.test.d.ts.map +0 -1
  91. package/dist/__tests__/router-integration-2.test.js +0 -426
  92. package/dist/__tests__/router-integration-2.test.js.map +0 -1
  93. package/dist/__tests__/router-integration.test.d.ts +0 -2
  94. package/dist/__tests__/router-integration.test.d.ts.map +0 -1
  95. package/dist/__tests__/router-integration.test.js +0 -1051
  96. package/dist/__tests__/router-integration.test.js.map +0 -1
  97. package/dist/__tests__/search-params.test.d.ts +0 -5
  98. package/dist/__tests__/search-params.test.d.ts.map +0 -1
  99. package/dist/__tests__/search-params.test.js +0 -306
  100. package/dist/__tests__/search-params.test.js.map +0 -1
  101. package/dist/__tests__/segment-system.test.d.ts +0 -2
  102. package/dist/__tests__/segment-system.test.d.ts.map +0 -1
  103. package/dist/__tests__/segment-system.test.js +0 -627
  104. package/dist/__tests__/segment-system.test.js.map +0 -1
  105. package/dist/__tests__/static-handler-types.test.d.ts +0 -8
  106. package/dist/__tests__/static-handler-types.test.d.ts.map +0 -1
  107. package/dist/__tests__/static-handler-types.test.js +0 -63
  108. package/dist/__tests__/static-handler-types.test.js.map +0 -1
  109. package/dist/__tests__/urls.test.d.ts +0 -2
  110. package/dist/__tests__/urls.test.d.ts.map +0 -1
  111. package/dist/__tests__/urls.test.js +0 -421
  112. package/dist/__tests__/urls.test.js.map +0 -1
  113. package/dist/__tests__/use-mount.test.d.ts +0 -2
  114. package/dist/__tests__/use-mount.test.d.ts.map +0 -1
  115. package/dist/__tests__/use-mount.test.js +0 -35
  116. package/dist/__tests__/use-mount.test.js.map +0 -1
  117. package/dist/bin/rango.d.ts +0 -2
  118. package/dist/bin/rango.d.ts.map +0 -1
  119. package/dist/bin/rango.js.map +0 -1
  120. package/dist/browser/event-controller.d.ts +0 -191
  121. package/dist/browser/event-controller.d.ts.map +0 -1
  122. package/dist/browser/event-controller.js +0 -559
  123. package/dist/browser/event-controller.js.map +0 -1
  124. package/dist/browser/index.d.ts +0 -2
  125. package/dist/browser/index.d.ts.map +0 -1
  126. package/dist/browser/index.js +0 -14
  127. package/dist/browser/index.js.map +0 -1
  128. package/dist/browser/link-interceptor.d.ts +0 -38
  129. package/dist/browser/link-interceptor.d.ts.map +0 -1
  130. package/dist/browser/link-interceptor.js +0 -99
  131. package/dist/browser/link-interceptor.js.map +0 -1
  132. package/dist/browser/logging.d.ts +0 -10
  133. package/dist/browser/logging.d.ts.map +0 -1
  134. package/dist/browser/logging.js +0 -29
  135. package/dist/browser/logging.js.map +0 -1
  136. package/dist/browser/lru-cache.d.ts +0 -17
  137. package/dist/browser/lru-cache.d.ts.map +0 -1
  138. package/dist/browser/lru-cache.js +0 -50
  139. package/dist/browser/lru-cache.js.map +0 -1
  140. package/dist/browser/merge-segment-loaders.d.ts +0 -39
  141. package/dist/browser/merge-segment-loaders.d.ts.map +0 -1
  142. package/dist/browser/merge-segment-loaders.js +0 -102
  143. package/dist/browser/merge-segment-loaders.js.map +0 -1
  144. package/dist/browser/navigation-bridge.d.ts +0 -102
  145. package/dist/browser/navigation-bridge.d.ts.map +0 -1
  146. package/dist/browser/navigation-bridge.js +0 -708
  147. package/dist/browser/navigation-bridge.js.map +0 -1
  148. package/dist/browser/navigation-client.d.ts +0 -25
  149. package/dist/browser/navigation-client.d.ts.map +0 -1
  150. package/dist/browser/navigation-client.js +0 -157
  151. package/dist/browser/navigation-client.js.map +0 -1
  152. package/dist/browser/navigation-store.d.ts +0 -101
  153. package/dist/browser/navigation-store.d.ts.map +0 -1
  154. package/dist/browser/navigation-store.js +0 -625
  155. package/dist/browser/navigation-store.js.map +0 -1
  156. package/dist/browser/partial-update.d.ts +0 -75
  157. package/dist/browser/partial-update.d.ts.map +0 -1
  158. package/dist/browser/partial-update.js +0 -426
  159. package/dist/browser/partial-update.js.map +0 -1
  160. package/dist/browser/react/Link.d.ts +0 -86
  161. package/dist/browser/react/Link.d.ts.map +0 -1
  162. package/dist/browser/react/Link.js +0 -128
  163. package/dist/browser/react/Link.js.map +0 -1
  164. package/dist/browser/react/NavigationProvider.d.ts +0 -63
  165. package/dist/browser/react/NavigationProvider.d.ts.map +0 -1
  166. package/dist/browser/react/NavigationProvider.js +0 -216
  167. package/dist/browser/react/NavigationProvider.js.map +0 -1
  168. package/dist/browser/react/ScrollRestoration.d.ts +0 -75
  169. package/dist/browser/react/ScrollRestoration.d.ts.map +0 -1
  170. package/dist/browser/react/ScrollRestoration.js +0 -57
  171. package/dist/browser/react/ScrollRestoration.js.map +0 -1
  172. package/dist/browser/react/context.d.ts +0 -46
  173. package/dist/browser/react/context.d.ts.map +0 -1
  174. package/dist/browser/react/context.js +0 -10
  175. package/dist/browser/react/context.js.map +0 -1
  176. package/dist/browser/react/index.d.ts +0 -11
  177. package/dist/browser/react/index.d.ts.map +0 -1
  178. package/dist/browser/react/index.js +0 -22
  179. package/dist/browser/react/index.js.map +0 -1
  180. package/dist/browser/react/location-state-shared.d.ts +0 -63
  181. package/dist/browser/react/location-state-shared.d.ts.map +0 -1
  182. package/dist/browser/react/location-state-shared.js +0 -81
  183. package/dist/browser/react/location-state-shared.js.map +0 -1
  184. package/dist/browser/react/location-state.d.ts +0 -23
  185. package/dist/browser/react/location-state.d.ts.map +0 -1
  186. package/dist/browser/react/location-state.js +0 -29
  187. package/dist/browser/react/location-state.js.map +0 -1
  188. package/dist/browser/react/mount-context.d.ts +0 -24
  189. package/dist/browser/react/mount-context.d.ts.map +0 -1
  190. package/dist/browser/react/mount-context.js +0 -24
  191. package/dist/browser/react/mount-context.js.map +0 -1
  192. package/dist/browser/react/use-action.d.ts +0 -64
  193. package/dist/browser/react/use-action.d.ts.map +0 -1
  194. package/dist/browser/react/use-action.js +0 -134
  195. package/dist/browser/react/use-action.js.map +0 -1
  196. package/dist/browser/react/use-client-cache.d.ts +0 -41
  197. package/dist/browser/react/use-client-cache.d.ts.map +0 -1
  198. package/dist/browser/react/use-client-cache.js +0 -39
  199. package/dist/browser/react/use-client-cache.js.map +0 -1
  200. package/dist/browser/react/use-handle.d.ts +0 -31
  201. package/dist/browser/react/use-handle.d.ts.map +0 -1
  202. package/dist/browser/react/use-handle.js +0 -144
  203. package/dist/browser/react/use-handle.js.map +0 -1
  204. package/dist/browser/react/use-href.d.ts +0 -33
  205. package/dist/browser/react/use-href.d.ts.map +0 -1
  206. package/dist/browser/react/use-href.js +0 -39
  207. package/dist/browser/react/use-href.js.map +0 -1
  208. package/dist/browser/react/use-link-status.d.ts +0 -37
  209. package/dist/browser/react/use-link-status.d.ts.map +0 -1
  210. package/dist/browser/react/use-link-status.js +0 -99
  211. package/dist/browser/react/use-link-status.js.map +0 -1
  212. package/dist/browser/react/use-mount.d.ts +0 -25
  213. package/dist/browser/react/use-mount.d.ts.map +0 -1
  214. package/dist/browser/react/use-mount.js +0 -30
  215. package/dist/browser/react/use-mount.js.map +0 -1
  216. package/dist/browser/react/use-navigation.d.ts +0 -27
  217. package/dist/browser/react/use-navigation.d.ts.map +0 -1
  218. package/dist/browser/react/use-navigation.js +0 -87
  219. package/dist/browser/react/use-navigation.js.map +0 -1
  220. package/dist/browser/react/use-segments.d.ts +0 -38
  221. package/dist/browser/react/use-segments.d.ts.map +0 -1
  222. package/dist/browser/react/use-segments.js +0 -130
  223. package/dist/browser/react/use-segments.js.map +0 -1
  224. package/dist/browser/request-controller.d.ts +0 -26
  225. package/dist/browser/request-controller.d.ts.map +0 -1
  226. package/dist/browser/request-controller.js +0 -147
  227. package/dist/browser/request-controller.js.map +0 -1
  228. package/dist/browser/rsc-router.d.ts +0 -129
  229. package/dist/browser/rsc-router.d.ts.map +0 -1
  230. package/dist/browser/rsc-router.js +0 -195
  231. package/dist/browser/rsc-router.js.map +0 -1
  232. package/dist/browser/scroll-restoration.d.ts +0 -93
  233. package/dist/browser/scroll-restoration.d.ts.map +0 -1
  234. package/dist/browser/scroll-restoration.js +0 -321
  235. package/dist/browser/scroll-restoration.js.map +0 -1
  236. package/dist/browser/segment-structure-assert.d.ts +0 -17
  237. package/dist/browser/segment-structure-assert.d.ts.map +0 -1
  238. package/dist/browser/segment-structure-assert.js +0 -59
  239. package/dist/browser/segment-structure-assert.js.map +0 -1
  240. package/dist/browser/server-action-bridge.d.ts +0 -26
  241. package/dist/browser/server-action-bridge.d.ts.map +0 -1
  242. package/dist/browser/server-action-bridge.js +0 -668
  243. package/dist/browser/server-action-bridge.js.map +0 -1
  244. package/dist/browser/shallow.d.ts +0 -12
  245. package/dist/browser/shallow.d.ts.map +0 -1
  246. package/dist/browser/shallow.js +0 -34
  247. package/dist/browser/shallow.js.map +0 -1
  248. package/dist/browser/types.d.ts +0 -369
  249. package/dist/browser/types.d.ts.map +0 -1
  250. package/dist/browser/types.js +0 -2
  251. package/dist/browser/types.js.map +0 -1
  252. package/dist/build/__tests__/generate-cli.test.d.ts +0 -2
  253. package/dist/build/__tests__/generate-cli.test.d.ts.map +0 -1
  254. package/dist/build/__tests__/generate-cli.test.js +0 -237
  255. package/dist/build/__tests__/generate-cli.test.js.map +0 -1
  256. package/dist/build/__tests__/generate-manifest.test.d.ts +0 -2
  257. package/dist/build/__tests__/generate-manifest.test.d.ts.map +0 -1
  258. package/dist/build/__tests__/generate-manifest.test.js +0 -119
  259. package/dist/build/__tests__/generate-manifest.test.js.map +0 -1
  260. package/dist/build/__tests__/generate-route-types.test.d.ts +0 -2
  261. package/dist/build/__tests__/generate-route-types.test.d.ts.map +0 -1
  262. package/dist/build/__tests__/generate-route-types.test.js +0 -620
  263. package/dist/build/__tests__/generate-route-types.test.js.map +0 -1
  264. package/dist/build/__tests__/per-router-manifest.test.d.ts +0 -2
  265. package/dist/build/__tests__/per-router-manifest.test.d.ts.map +0 -1
  266. package/dist/build/__tests__/per-router-manifest.test.js +0 -308
  267. package/dist/build/__tests__/per-router-manifest.test.js.map +0 -1
  268. package/dist/build/generate-manifest.d.ts +0 -81
  269. package/dist/build/generate-manifest.d.ts.map +0 -1
  270. package/dist/build/generate-manifest.js +0 -276
  271. package/dist/build/generate-manifest.js.map +0 -1
  272. package/dist/build/generate-route-types.d.ts +0 -115
  273. package/dist/build/generate-route-types.d.ts.map +0 -1
  274. package/dist/build/generate-route-types.js +0 -740
  275. package/dist/build/generate-route-types.js.map +0 -1
  276. package/dist/build/index.d.ts +0 -21
  277. package/dist/build/index.d.ts.map +0 -1
  278. package/dist/build/index.js +0 -21
  279. package/dist/build/index.js.map +0 -1
  280. package/dist/build/route-trie.d.ts +0 -71
  281. package/dist/build/route-trie.d.ts.map +0 -1
  282. package/dist/build/route-trie.js +0 -175
  283. package/dist/build/route-trie.js.map +0 -1
  284. package/dist/cache/__tests__/cache-scope.test.d.ts +0 -2
  285. package/dist/cache/__tests__/cache-scope.test.d.ts.map +0 -1
  286. package/dist/cache/__tests__/cache-scope.test.js +0 -208
  287. package/dist/cache/__tests__/cache-scope.test.js.map +0 -1
  288. package/dist/cache/__tests__/document-cache.test.d.ts +0 -2
  289. package/dist/cache/__tests__/document-cache.test.d.ts.map +0 -1
  290. package/dist/cache/__tests__/document-cache.test.js +0 -345
  291. package/dist/cache/__tests__/document-cache.test.js.map +0 -1
  292. package/dist/cache/__tests__/memory-segment-store.test.d.ts +0 -2
  293. package/dist/cache/__tests__/memory-segment-store.test.d.ts.map +0 -1
  294. package/dist/cache/__tests__/memory-segment-store.test.js +0 -425
  295. package/dist/cache/__tests__/memory-segment-store.test.js.map +0 -1
  296. package/dist/cache/__tests__/memory-store.test.d.ts +0 -2
  297. package/dist/cache/__tests__/memory-store.test.d.ts.map +0 -1
  298. package/dist/cache/__tests__/memory-store.test.js +0 -367
  299. package/dist/cache/__tests__/memory-store.test.js.map +0 -1
  300. package/dist/cache/cache-scope.d.ts +0 -102
  301. package/dist/cache/cache-scope.d.ts.map +0 -1
  302. package/dist/cache/cache-scope.js +0 -440
  303. package/dist/cache/cache-scope.js.map +0 -1
  304. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts +0 -2
  305. package/dist/cache/cf/__tests__/cf-cache-store.test.d.ts.map +0 -1
  306. package/dist/cache/cf/__tests__/cf-cache-store.test.js +0 -330
  307. package/dist/cache/cf/__tests__/cf-cache-store.test.js.map +0 -1
  308. package/dist/cache/cf/cf-cache-store.d.ts +0 -165
  309. package/dist/cache/cf/cf-cache-store.d.ts.map +0 -1
  310. package/dist/cache/cf/cf-cache-store.js +0 -242
  311. package/dist/cache/cf/cf-cache-store.js.map +0 -1
  312. package/dist/cache/cf/index.d.ts +0 -14
  313. package/dist/cache/cf/index.d.ts.map +0 -1
  314. package/dist/cache/cf/index.js +0 -17
  315. package/dist/cache/cf/index.js.map +0 -1
  316. package/dist/cache/document-cache.d.ts +0 -64
  317. package/dist/cache/document-cache.d.ts.map +0 -1
  318. package/dist/cache/document-cache.js +0 -228
  319. package/dist/cache/document-cache.js.map +0 -1
  320. package/dist/cache/index.d.ts +0 -19
  321. package/dist/cache/index.d.ts.map +0 -1
  322. package/dist/cache/index.js +0 -21
  323. package/dist/cache/index.js.map +0 -1
  324. package/dist/cache/memory-segment-store.d.ts +0 -110
  325. package/dist/cache/memory-segment-store.d.ts.map +0 -1
  326. package/dist/cache/memory-segment-store.js +0 -117
  327. package/dist/cache/memory-segment-store.js.map +0 -1
  328. package/dist/cache/memory-store.d.ts +0 -41
  329. package/dist/cache/memory-store.d.ts.map +0 -1
  330. package/dist/cache/memory-store.js +0 -191
  331. package/dist/cache/memory-store.js.map +0 -1
  332. package/dist/cache/types.d.ts +0 -317
  333. package/dist/cache/types.d.ts.map +0 -1
  334. package/dist/cache/types.js +0 -12
  335. package/dist/cache/types.js.map +0 -1
  336. package/dist/client.d.ts +0 -248
  337. package/dist/client.d.ts.map +0 -1
  338. package/dist/client.js +0 -367
  339. package/dist/client.js.map +0 -1
  340. package/dist/client.rsc.d.ts +0 -26
  341. package/dist/client.rsc.d.ts.map +0 -1
  342. package/dist/client.rsc.js +0 -46
  343. package/dist/client.rsc.js.map +0 -1
  344. package/dist/component-utils.d.ts +0 -36
  345. package/dist/component-utils.d.ts.map +0 -1
  346. package/dist/component-utils.js +0 -61
  347. package/dist/component-utils.js.map +0 -1
  348. package/dist/components/DefaultDocument.d.ts +0 -13
  349. package/dist/components/DefaultDocument.d.ts.map +0 -1
  350. package/dist/components/DefaultDocument.js +0 -15
  351. package/dist/components/DefaultDocument.js.map +0 -1
  352. package/dist/debug.d.ts +0 -58
  353. package/dist/debug.d.ts.map +0 -1
  354. package/dist/debug.js +0 -157
  355. package/dist/debug.js.map +0 -1
  356. package/dist/default-error-boundary.d.ts +0 -11
  357. package/dist/default-error-boundary.d.ts.map +0 -1
  358. package/dist/default-error-boundary.js +0 -45
  359. package/dist/default-error-boundary.js.map +0 -1
  360. package/dist/deps/browser.d.ts +0 -2
  361. package/dist/deps/browser.d.ts.map +0 -1
  362. package/dist/deps/browser.js +0 -3
  363. package/dist/deps/browser.js.map +0 -1
  364. package/dist/deps/html-stream-client.d.ts +0 -2
  365. package/dist/deps/html-stream-client.d.ts.map +0 -1
  366. package/dist/deps/html-stream-client.js +0 -3
  367. package/dist/deps/html-stream-client.js.map +0 -1
  368. package/dist/deps/html-stream-server.d.ts +0 -2
  369. package/dist/deps/html-stream-server.d.ts.map +0 -1
  370. package/dist/deps/html-stream-server.js +0 -3
  371. package/dist/deps/html-stream-server.js.map +0 -1
  372. package/dist/deps/rsc.d.ts +0 -2
  373. package/dist/deps/rsc.d.ts.map +0 -1
  374. package/dist/deps/rsc.js +0 -4
  375. package/dist/deps/rsc.js.map +0 -1
  376. package/dist/deps/ssr.d.ts +0 -2
  377. package/dist/deps/ssr.d.ts.map +0 -1
  378. package/dist/deps/ssr.js +0 -3
  379. package/dist/deps/ssr.js.map +0 -1
  380. package/dist/errors.d.ts +0 -174
  381. package/dist/errors.d.ts.map +0 -1
  382. package/dist/errors.js +0 -241
  383. package/dist/errors.js.map +0 -1
  384. package/dist/handle.d.ts +0 -78
  385. package/dist/handle.d.ts.map +0 -1
  386. package/dist/handle.js +0 -82
  387. package/dist/handle.js.map +0 -1
  388. package/dist/handles/MetaTags.d.ts +0 -14
  389. package/dist/handles/MetaTags.d.ts.map +0 -1
  390. package/dist/handles/MetaTags.js +0 -136
  391. package/dist/handles/MetaTags.js.map +0 -1
  392. package/dist/handles/index.d.ts +0 -6
  393. package/dist/handles/index.d.ts.map +0 -1
  394. package/dist/handles/index.js +0 -6
  395. package/dist/handles/index.js.map +0 -1
  396. package/dist/handles/meta.d.ts +0 -39
  397. package/dist/handles/meta.d.ts.map +0 -1
  398. package/dist/handles/meta.js +0 -202
  399. package/dist/handles/meta.js.map +0 -1
  400. package/dist/host/__tests__/errors.test.d.ts +0 -2
  401. package/dist/host/__tests__/errors.test.d.ts.map +0 -1
  402. package/dist/host/__tests__/errors.test.js +0 -76
  403. package/dist/host/__tests__/errors.test.js.map +0 -1
  404. package/dist/host/__tests__/pattern-comprehensive.test.d.ts +0 -2
  405. package/dist/host/__tests__/pattern-comprehensive.test.d.ts.map +0 -1
  406. package/dist/host/__tests__/pattern-comprehensive.test.js +0 -732
  407. package/dist/host/__tests__/pattern-comprehensive.test.js.map +0 -1
  408. package/dist/host/__tests__/pattern-matcher.test.d.ts +0 -2
  409. package/dist/host/__tests__/pattern-matcher.test.d.ts.map +0 -1
  410. package/dist/host/__tests__/pattern-matcher.test.js +0 -251
  411. package/dist/host/__tests__/pattern-matcher.test.js.map +0 -1
  412. package/dist/host/__tests__/router.test.d.ts +0 -2
  413. package/dist/host/__tests__/router.test.d.ts.map +0 -1
  414. package/dist/host/__tests__/router.test.js +0 -241
  415. package/dist/host/__tests__/router.test.js.map +0 -1
  416. package/dist/host/__tests__/testing.test.d.ts +0 -2
  417. package/dist/host/__tests__/testing.test.d.ts.map +0 -1
  418. package/dist/host/__tests__/testing.test.js +0 -64
  419. package/dist/host/__tests__/testing.test.js.map +0 -1
  420. package/dist/host/__tests__/utils.test.d.ts +0 -2
  421. package/dist/host/__tests__/utils.test.d.ts.map +0 -1
  422. package/dist/host/__tests__/utils.test.js +0 -29
  423. package/dist/host/__tests__/utils.test.js.map +0 -1
  424. package/dist/host/cookie-handler.d.ts +0 -34
  425. package/dist/host/cookie-handler.d.ts.map +0 -1
  426. package/dist/host/cookie-handler.js +0 -124
  427. package/dist/host/cookie-handler.js.map +0 -1
  428. package/dist/host/errors.d.ts +0 -56
  429. package/dist/host/errors.d.ts.map +0 -1
  430. package/dist/host/errors.js +0 -79
  431. package/dist/host/errors.js.map +0 -1
  432. package/dist/host/index.d.ts +0 -29
  433. package/dist/host/index.d.ts.map +0 -1
  434. package/dist/host/index.js +0 -32
  435. package/dist/host/index.js.map +0 -1
  436. package/dist/host/pattern-matcher.d.ts +0 -36
  437. package/dist/host/pattern-matcher.d.ts.map +0 -1
  438. package/dist/host/pattern-matcher.js +0 -172
  439. package/dist/host/pattern-matcher.js.map +0 -1
  440. package/dist/host/router.d.ts +0 -26
  441. package/dist/host/router.d.ts.map +0 -1
  442. package/dist/host/router.js +0 -218
  443. package/dist/host/router.js.map +0 -1
  444. package/dist/host/testing.d.ts +0 -36
  445. package/dist/host/testing.d.ts.map +0 -1
  446. package/dist/host/testing.js +0 -55
  447. package/dist/host/testing.js.map +0 -1
  448. package/dist/host/types.d.ts +0 -115
  449. package/dist/host/types.d.ts.map +0 -1
  450. package/dist/host/types.js +0 -7
  451. package/dist/host/types.js.map +0 -1
  452. package/dist/host/utils.d.ts +0 -21
  453. package/dist/host/utils.d.ts.map +0 -1
  454. package/dist/host/utils.js +0 -23
  455. package/dist/host/utils.js.map +0 -1
  456. package/dist/href-client.d.ts +0 -131
  457. package/dist/href-client.d.ts.map +0 -1
  458. package/dist/href-client.js +0 -64
  459. package/dist/href-client.js.map +0 -1
  460. package/dist/href-context.d.ts +0 -29
  461. package/dist/href-context.d.ts.map +0 -1
  462. package/dist/href-context.js +0 -21
  463. package/dist/href-context.js.map +0 -1
  464. package/dist/index.d.ts +0 -73
  465. package/dist/index.d.ts.map +0 -1
  466. package/dist/index.js +0 -91
  467. package/dist/index.js.map +0 -1
  468. package/dist/index.rsc.d.ts +0 -32
  469. package/dist/index.rsc.d.ts.map +0 -1
  470. package/dist/index.rsc.js +0 -40
  471. package/dist/index.rsc.js.map +0 -1
  472. package/dist/internal-debug.d.ts +0 -2
  473. package/dist/internal-debug.d.ts.map +0 -1
  474. package/dist/internal-debug.js +0 -5
  475. package/dist/internal-debug.js.map +0 -1
  476. package/dist/loader.d.ts +0 -14
  477. package/dist/loader.d.ts.map +0 -1
  478. package/dist/loader.js +0 -20
  479. package/dist/loader.js.map +0 -1
  480. package/dist/loader.rsc.d.ts +0 -19
  481. package/dist/loader.rsc.d.ts.map +0 -1
  482. package/dist/loader.rsc.js +0 -99
  483. package/dist/loader.rsc.js.map +0 -1
  484. package/dist/network-error-thrower.d.ts +0 -17
  485. package/dist/network-error-thrower.d.ts.map +0 -1
  486. package/dist/network-error-thrower.js +0 -14
  487. package/dist/network-error-thrower.js.map +0 -1
  488. package/dist/outlet-context.d.ts +0 -13
  489. package/dist/outlet-context.d.ts.map +0 -1
  490. package/dist/outlet-context.js +0 -3
  491. package/dist/outlet-context.js.map +0 -1
  492. package/dist/prerender/__tests__/param-hash.test.d.ts +0 -2
  493. package/dist/prerender/__tests__/param-hash.test.d.ts.map +0 -1
  494. package/dist/prerender/__tests__/param-hash.test.js +0 -148
  495. package/dist/prerender/__tests__/param-hash.test.js.map +0 -1
  496. package/dist/prerender/param-hash.d.ts +0 -16
  497. package/dist/prerender/param-hash.d.ts.map +0 -1
  498. package/dist/prerender/param-hash.js +0 -36
  499. package/dist/prerender/param-hash.js.map +0 -1
  500. package/dist/prerender/store.d.ts +0 -38
  501. package/dist/prerender/store.d.ts.map +0 -1
  502. package/dist/prerender/store.js +0 -61
  503. package/dist/prerender/store.js.map +0 -1
  504. package/dist/prerender.d.ts +0 -66
  505. package/dist/prerender.d.ts.map +0 -1
  506. package/dist/prerender.js +0 -57
  507. package/dist/prerender.js.map +0 -1
  508. package/dist/reverse.d.ts +0 -196
  509. package/dist/reverse.d.ts.map +0 -1
  510. package/dist/reverse.js +0 -78
  511. package/dist/reverse.js.map +0 -1
  512. package/dist/root-error-boundary.d.ts +0 -33
  513. package/dist/root-error-boundary.d.ts.map +0 -1
  514. package/dist/root-error-boundary.js +0 -165
  515. package/dist/root-error-boundary.js.map +0 -1
  516. package/dist/route-content-wrapper.d.ts +0 -46
  517. package/dist/route-content-wrapper.d.ts.map +0 -1
  518. package/dist/route-content-wrapper.js +0 -77
  519. package/dist/route-content-wrapper.js.map +0 -1
  520. package/dist/route-definition.d.ts +0 -421
  521. package/dist/route-definition.d.ts.map +0 -1
  522. package/dist/route-definition.js +0 -868
  523. package/dist/route-definition.js.map +0 -1
  524. package/dist/route-map-builder.d.ts +0 -155
  525. package/dist/route-map-builder.d.ts.map +0 -1
  526. package/dist/route-map-builder.js +0 -237
  527. package/dist/route-map-builder.js.map +0 -1
  528. package/dist/route-types.d.ts +0 -165
  529. package/dist/route-types.d.ts.map +0 -1
  530. package/dist/route-types.js +0 -7
  531. package/dist/route-types.js.map +0 -1
  532. package/dist/router/__tests__/handler-context.test.d.ts +0 -2
  533. package/dist/router/__tests__/handler-context.test.d.ts.map +0 -1
  534. package/dist/router/__tests__/handler-context.test.js +0 -65
  535. package/dist/router/__tests__/handler-context.test.js.map +0 -1
  536. package/dist/router/__tests__/loader-cycle-detection.test.d.ts +0 -2
  537. package/dist/router/__tests__/loader-cycle-detection.test.d.ts.map +0 -1
  538. package/dist/router/__tests__/loader-cycle-detection.test.js +0 -221
  539. package/dist/router/__tests__/loader-cycle-detection.test.js.map +0 -1
  540. package/dist/router/__tests__/match-context.test.d.ts +0 -2
  541. package/dist/router/__tests__/match-context.test.d.ts.map +0 -1
  542. package/dist/router/__tests__/match-context.test.js +0 -92
  543. package/dist/router/__tests__/match-context.test.js.map +0 -1
  544. package/dist/router/__tests__/match-pipelines.test.d.ts +0 -2
  545. package/dist/router/__tests__/match-pipelines.test.d.ts.map +0 -1
  546. package/dist/router/__tests__/match-pipelines.test.js +0 -417
  547. package/dist/router/__tests__/match-pipelines.test.js.map +0 -1
  548. package/dist/router/__tests__/match-result.test.d.ts +0 -2
  549. package/dist/router/__tests__/match-result.test.d.ts.map +0 -1
  550. package/dist/router/__tests__/match-result.test.js +0 -457
  551. package/dist/router/__tests__/match-result.test.js.map +0 -1
  552. package/dist/router/__tests__/on-error.test.d.ts +0 -2
  553. package/dist/router/__tests__/on-error.test.d.ts.map +0 -1
  554. package/dist/router/__tests__/on-error.test.js +0 -678
  555. package/dist/router/__tests__/on-error.test.js.map +0 -1
  556. package/dist/router/__tests__/pattern-matching.test.d.ts +0 -2
  557. package/dist/router/__tests__/pattern-matching.test.d.ts.map +0 -1
  558. package/dist/router/__tests__/pattern-matching.test.js +0 -629
  559. package/dist/router/__tests__/pattern-matching.test.js.map +0 -1
  560. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts +0 -2
  561. package/dist/router/__tests__/segment-resolution-parallel-loading.test.d.ts.map +0 -1
  562. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js +0 -155
  563. package/dist/router/__tests__/segment-resolution-parallel-loading.test.js.map +0 -1
  564. package/dist/router/error-handling.d.ts +0 -77
  565. package/dist/router/error-handling.d.ts.map +0 -1
  566. package/dist/router/error-handling.js +0 -202
  567. package/dist/router/error-handling.js.map +0 -1
  568. package/dist/router/handler-context.d.ts +0 -20
  569. package/dist/router/handler-context.d.ts.map +0 -1
  570. package/dist/router/handler-context.js +0 -198
  571. package/dist/router/handler-context.js.map +0 -1
  572. package/dist/router/intercept-resolution.d.ts +0 -66
  573. package/dist/router/intercept-resolution.d.ts.map +0 -1
  574. package/dist/router/intercept-resolution.js +0 -246
  575. package/dist/router/intercept-resolution.js.map +0 -1
  576. package/dist/router/loader-resolution.d.ts +0 -64
  577. package/dist/router/loader-resolution.d.ts.map +0 -1
  578. package/dist/router/loader-resolution.js +0 -284
  579. package/dist/router/loader-resolution.js.map +0 -1
  580. package/dist/router/logging.d.ts +0 -15
  581. package/dist/router/logging.d.ts.map +0 -1
  582. package/dist/router/logging.js +0 -99
  583. package/dist/router/logging.js.map +0 -1
  584. package/dist/router/manifest.d.ts +0 -22
  585. package/dist/router/manifest.d.ts.map +0 -1
  586. package/dist/router/manifest.js +0 -181
  587. package/dist/router/manifest.js.map +0 -1
  588. package/dist/router/match-api.d.ts +0 -35
  589. package/dist/router/match-api.d.ts.map +0 -1
  590. package/dist/router/match-api.js +0 -406
  591. package/dist/router/match-api.js.map +0 -1
  592. package/dist/router/match-context.d.ts +0 -206
  593. package/dist/router/match-context.d.ts.map +0 -1
  594. package/dist/router/match-context.js +0 -17
  595. package/dist/router/match-context.js.map +0 -1
  596. package/dist/router/match-middleware/background-revalidation.d.ts +0 -127
  597. package/dist/router/match-middleware/background-revalidation.d.ts.map +0 -1
  598. package/dist/router/match-middleware/background-revalidation.js +0 -75
  599. package/dist/router/match-middleware/background-revalidation.js.map +0 -1
  600. package/dist/router/match-middleware/cache-lookup.d.ts +0 -112
  601. package/dist/router/match-middleware/cache-lookup.d.ts.map +0 -1
  602. package/dist/router/match-middleware/cache-lookup.js +0 -257
  603. package/dist/router/match-middleware/cache-lookup.js.map +0 -1
  604. package/dist/router/match-middleware/cache-store.d.ts +0 -113
  605. package/dist/router/match-middleware/cache-store.d.ts.map +0 -1
  606. package/dist/router/match-middleware/cache-store.js +0 -108
  607. package/dist/router/match-middleware/cache-store.js.map +0 -1
  608. package/dist/router/match-middleware/index.d.ts +0 -81
  609. package/dist/router/match-middleware/index.d.ts.map +0 -1
  610. package/dist/router/match-middleware/index.js +0 -80
  611. package/dist/router/match-middleware/index.js.map +0 -1
  612. package/dist/router/match-middleware/intercept-resolution.d.ts +0 -117
  613. package/dist/router/match-middleware/intercept-resolution.d.ts.map +0 -1
  614. package/dist/router/match-middleware/intercept-resolution.js +0 -134
  615. package/dist/router/match-middleware/intercept-resolution.js.map +0 -1
  616. package/dist/router/match-middleware/segment-resolution.d.ts +0 -99
  617. package/dist/router/match-middleware/segment-resolution.d.ts.map +0 -1
  618. package/dist/router/match-middleware/segment-resolution.js +0 -53
  619. package/dist/router/match-middleware/segment-resolution.js.map +0 -1
  620. package/dist/router/match-pipelines.d.ts +0 -147
  621. package/dist/router/match-pipelines.d.ts.map +0 -1
  622. package/dist/router/match-pipelines.js +0 -82
  623. package/dist/router/match-pipelines.js.map +0 -1
  624. package/dist/router/match-result.d.ts +0 -126
  625. package/dist/router/match-result.d.ts.map +0 -1
  626. package/dist/router/match-result.js +0 -93
  627. package/dist/router/match-result.js.map +0 -1
  628. package/dist/router/metrics.d.ts +0 -20
  629. package/dist/router/metrics.d.ts.map +0 -1
  630. package/dist/router/metrics.js +0 -47
  631. package/dist/router/metrics.js.map +0 -1
  632. package/dist/router/middleware.d.ts +0 -249
  633. package/dist/router/middleware.d.ts.map +0 -1
  634. package/dist/router/middleware.js +0 -434
  635. package/dist/router/middleware.js.map +0 -1
  636. package/dist/router/middleware.test.d.ts +0 -2
  637. package/dist/router/middleware.test.d.ts.map +0 -1
  638. package/dist/router/middleware.test.js +0 -816
  639. package/dist/router/middleware.test.js.map +0 -1
  640. package/dist/router/pattern-matching.d.ts +0 -149
  641. package/dist/router/pattern-matching.d.ts.map +0 -1
  642. package/dist/router/pattern-matching.js +0 -349
  643. package/dist/router/pattern-matching.js.map +0 -1
  644. package/dist/router/revalidation.d.ts +0 -44
  645. package/dist/router/revalidation.d.ts.map +0 -1
  646. package/dist/router/revalidation.js +0 -147
  647. package/dist/router/revalidation.js.map +0 -1
  648. package/dist/router/router-context.d.ts +0 -135
  649. package/dist/router/router-context.d.ts.map +0 -1
  650. package/dist/router/router-context.js +0 -36
  651. package/dist/router/router-context.js.map +0 -1
  652. package/dist/router/segment-resolution.d.ts +0 -127
  653. package/dist/router/segment-resolution.d.ts.map +0 -1
  654. package/dist/router/segment-resolution.js +0 -919
  655. package/dist/router/segment-resolution.js.map +0 -1
  656. package/dist/router/trie-matching.d.ts +0 -40
  657. package/dist/router/trie-matching.d.ts.map +0 -1
  658. package/dist/router/trie-matching.js +0 -127
  659. package/dist/router/trie-matching.js.map +0 -1
  660. package/dist/router/types.d.ts +0 -136
  661. package/dist/router/types.d.ts.map +0 -1
  662. package/dist/router/types.js +0 -7
  663. package/dist/router/types.js.map +0 -1
  664. package/dist/router.d.ts +0 -753
  665. package/dist/router.d.ts.map +0 -1
  666. package/dist/router.gen.d.ts +0 -6
  667. package/dist/router.gen.d.ts.map +0 -1
  668. package/dist/router.gen.js +0 -6
  669. package/dist/router.gen.js.map +0 -1
  670. package/dist/router.js +0 -1304
  671. package/dist/router.js.map +0 -1
  672. package/dist/rsc/__tests__/helpers.test.d.ts +0 -2
  673. package/dist/rsc/__tests__/helpers.test.d.ts.map +0 -1
  674. package/dist/rsc/__tests__/helpers.test.js +0 -140
  675. package/dist/rsc/__tests__/helpers.test.js.map +0 -1
  676. package/dist/rsc/handler.d.ts +0 -45
  677. package/dist/rsc/handler.d.ts.map +0 -1
  678. package/dist/rsc/handler.js +0 -1172
  679. package/dist/rsc/handler.js.map +0 -1
  680. package/dist/rsc/helpers.d.ts +0 -16
  681. package/dist/rsc/helpers.d.ts.map +0 -1
  682. package/dist/rsc/helpers.js +0 -55
  683. package/dist/rsc/helpers.js.map +0 -1
  684. package/dist/rsc/index.d.ts +0 -22
  685. package/dist/rsc/index.d.ts.map +0 -1
  686. package/dist/rsc/index.js +0 -23
  687. package/dist/rsc/index.js.map +0 -1
  688. package/dist/rsc/nonce.d.ts +0 -9
  689. package/dist/rsc/nonce.d.ts.map +0 -1
  690. package/dist/rsc/nonce.js +0 -18
  691. package/dist/rsc/nonce.js.map +0 -1
  692. package/dist/rsc/types.d.ts +0 -206
  693. package/dist/rsc/types.d.ts.map +0 -1
  694. package/dist/rsc/types.js +0 -8
  695. package/dist/rsc/types.js.map +0 -1
  696. package/dist/search-params.d.ts +0 -103
  697. package/dist/search-params.d.ts.map +0 -1
  698. package/dist/search-params.js +0 -74
  699. package/dist/search-params.js.map +0 -1
  700. package/dist/segment-system.d.ts +0 -75
  701. package/dist/segment-system.d.ts.map +0 -1
  702. package/dist/segment-system.js +0 -336
  703. package/dist/segment-system.js.map +0 -1
  704. package/dist/server/context.d.ts +0 -245
  705. package/dist/server/context.d.ts.map +0 -1
  706. package/dist/server/context.js +0 -197
  707. package/dist/server/context.js.map +0 -1
  708. package/dist/server/fetchable-loader-store.d.ts +0 -18
  709. package/dist/server/fetchable-loader-store.d.ts.map +0 -1
  710. package/dist/server/fetchable-loader-store.js +0 -18
  711. package/dist/server/fetchable-loader-store.js.map +0 -1
  712. package/dist/server/handle-store.d.ts +0 -85
  713. package/dist/server/handle-store.d.ts.map +0 -1
  714. package/dist/server/handle-store.js +0 -142
  715. package/dist/server/handle-store.js.map +0 -1
  716. package/dist/server/loader-registry.d.ts +0 -55
  717. package/dist/server/loader-registry.d.ts.map +0 -1
  718. package/dist/server/loader-registry.js +0 -132
  719. package/dist/server/loader-registry.js.map +0 -1
  720. package/dist/server/request-context.d.ts +0 -226
  721. package/dist/server/request-context.d.ts.map +0 -1
  722. package/dist/server/request-context.js +0 -290
  723. package/dist/server/request-context.js.map +0 -1
  724. package/dist/server/root-layout.d.ts +0 -4
  725. package/dist/server/root-layout.d.ts.map +0 -1
  726. package/dist/server/root-layout.js +0 -5
  727. package/dist/server/root-layout.js.map +0 -1
  728. package/dist/server.d.ts +0 -15
  729. package/dist/server.d.ts.map +0 -1
  730. package/dist/server.js +0 -20
  731. package/dist/server.js.map +0 -1
  732. package/dist/ssr/__tests__/ssr-handler.test.d.ts +0 -2
  733. package/dist/ssr/__tests__/ssr-handler.test.d.ts.map +0 -1
  734. package/dist/ssr/__tests__/ssr-handler.test.js +0 -132
  735. package/dist/ssr/__tests__/ssr-handler.test.js.map +0 -1
  736. package/dist/ssr/index.d.ts +0 -98
  737. package/dist/ssr/index.d.ts.map +0 -1
  738. package/dist/ssr/index.js +0 -158
  739. package/dist/ssr/index.js.map +0 -1
  740. package/dist/static-handler.d.ts +0 -50
  741. package/dist/static-handler.d.ts.map +0 -1
  742. package/dist/static-handler.gen.d.ts +0 -5
  743. package/dist/static-handler.gen.d.ts.map +0 -1
  744. package/dist/static-handler.gen.js +0 -5
  745. package/dist/static-handler.gen.js.map +0 -1
  746. package/dist/static-handler.js +0 -29
  747. package/dist/static-handler.js.map +0 -1
  748. package/dist/theme/ThemeProvider.d.ts +0 -20
  749. package/dist/theme/ThemeProvider.d.ts.map +0 -1
  750. package/dist/theme/ThemeProvider.js +0 -240
  751. package/dist/theme/ThemeProvider.js.map +0 -1
  752. package/dist/theme/ThemeScript.d.ts +0 -48
  753. package/dist/theme/ThemeScript.d.ts.map +0 -1
  754. package/dist/theme/ThemeScript.js +0 -13
  755. package/dist/theme/ThemeScript.js.map +0 -1
  756. package/dist/theme/__tests__/theme.test.d.ts +0 -2
  757. package/dist/theme/__tests__/theme.test.d.ts.map +0 -1
  758. package/dist/theme/__tests__/theme.test.js +0 -103
  759. package/dist/theme/__tests__/theme.test.js.map +0 -1
  760. package/dist/theme/constants.d.ts +0 -29
  761. package/dist/theme/constants.d.ts.map +0 -1
  762. package/dist/theme/constants.js +0 -48
  763. package/dist/theme/constants.js.map +0 -1
  764. package/dist/theme/index.d.ts +0 -31
  765. package/dist/theme/index.d.ts.map +0 -1
  766. package/dist/theme/index.js +0 -36
  767. package/dist/theme/index.js.map +0 -1
  768. package/dist/theme/theme-context.d.ts +0 -40
  769. package/dist/theme/theme-context.d.ts.map +0 -1
  770. package/dist/theme/theme-context.js +0 -60
  771. package/dist/theme/theme-context.js.map +0 -1
  772. package/dist/theme/theme-script.d.ts +0 -27
  773. package/dist/theme/theme-script.d.ts.map +0 -1
  774. package/dist/theme/theme-script.js +0 -147
  775. package/dist/theme/theme-script.js.map +0 -1
  776. package/dist/theme/types.d.ts +0 -163
  777. package/dist/theme/types.d.ts.map +0 -1
  778. package/dist/theme/types.js +0 -11
  779. package/dist/theme/types.js.map +0 -1
  780. package/dist/theme/use-theme.d.ts +0 -12
  781. package/dist/theme/use-theme.d.ts.map +0 -1
  782. package/dist/theme/use-theme.js +0 -40
  783. package/dist/theme/use-theme.js.map +0 -1
  784. package/dist/types.d.ts +0 -1479
  785. package/dist/types.d.ts.map +0 -1
  786. package/dist/types.js +0 -10
  787. package/dist/types.js.map +0 -1
  788. package/dist/urls.d.ts +0 -441
  789. package/dist/urls.d.ts.map +0 -1
  790. package/dist/urls.gen.d.ts +0 -8
  791. package/dist/urls.gen.d.ts.map +0 -1
  792. package/dist/urls.gen.js +0 -8
  793. package/dist/urls.gen.js.map +0 -1
  794. package/dist/urls.js +0 -443
  795. package/dist/urls.js.map +0 -1
  796. package/dist/use-loader.d.ts +0 -127
  797. package/dist/use-loader.d.ts.map +0 -1
  798. package/dist/use-loader.js +0 -237
  799. package/dist/use-loader.js.map +0 -1
  800. package/dist/vite/__tests__/ast-handler-extract.test.d.ts +0 -2
  801. package/dist/vite/__tests__/ast-handler-extract.test.d.ts.map +0 -1
  802. package/dist/vite/__tests__/ast-handler-extract.test.js +0 -294
  803. package/dist/vite/__tests__/ast-handler-extract.test.js.map +0 -1
  804. package/dist/vite/__tests__/expose-id-utils.test.d.ts +0 -2
  805. package/dist/vite/__tests__/expose-id-utils.test.d.ts.map +0 -1
  806. package/dist/vite/__tests__/expose-id-utils.test.js +0 -224
  807. package/dist/vite/__tests__/expose-id-utils.test.js.map +0 -1
  808. package/dist/vite/__tests__/expose-internal-ids.test.d.ts +0 -2
  809. package/dist/vite/__tests__/expose-internal-ids.test.d.ts.map +0 -1
  810. package/dist/vite/__tests__/expose-internal-ids.test.js +0 -647
  811. package/dist/vite/__tests__/expose-internal-ids.test.js.map +0 -1
  812. package/dist/vite/__tests__/expose-router-id.test.d.ts +0 -2
  813. package/dist/vite/__tests__/expose-router-id.test.d.ts.map +0 -1
  814. package/dist/vite/__tests__/expose-router-id.test.js +0 -39
  815. package/dist/vite/__tests__/expose-router-id.test.js.map +0 -1
  816. package/dist/vite/ast-handler-extract.d.ts +0 -49
  817. package/dist/vite/ast-handler-extract.d.ts.map +0 -1
  818. package/dist/vite/ast-handler-extract.js +0 -249
  819. package/dist/vite/ast-handler-extract.js.map +0 -1
  820. package/dist/vite/expose-action-id.d.ts +0 -19
  821. package/dist/vite/expose-action-id.d.ts.map +0 -1
  822. package/dist/vite/expose-action-id.js +0 -250
  823. package/dist/vite/expose-action-id.js.map +0 -1
  824. package/dist/vite/expose-id-utils.d.ts +0 -69
  825. package/dist/vite/expose-id-utils.d.ts.map +0 -1
  826. package/dist/vite/expose-id-utils.js +0 -289
  827. package/dist/vite/expose-id-utils.js.map +0 -1
  828. package/dist/vite/expose-internal-ids.d.ts +0 -22
  829. package/dist/vite/expose-internal-ids.d.ts.map +0 -1
  830. package/dist/vite/expose-internal-ids.js +0 -886
  831. package/dist/vite/expose-internal-ids.js.map +0 -1
  832. package/dist/vite/index.d.ts +0 -149
  833. package/dist/vite/index.d.ts.map +0 -1
  834. package/dist/vite/index.js.bak +0 -5448
  835. package/dist/vite/index.js.map +0 -1
  836. package/dist/vite/index.named-routes.gen.ts +0 -103
  837. package/dist/vite/package-resolution.d.ts +0 -43
  838. package/dist/vite/package-resolution.d.ts.map +0 -1
  839. package/dist/vite/package-resolution.js +0 -112
  840. package/dist/vite/package-resolution.js.map +0 -1
  841. package/dist/vite/virtual-entries.d.ts +0 -25
  842. package/dist/vite/virtual-entries.d.ts.map +0 -1
  843. package/dist/vite/virtual-entries.js +0 -110
  844. package/dist/vite/virtual-entries.js.map +0 -1
@@ -22,6 +22,17 @@ const FS_PREFIX = "/@fs/";
22
22
  * Returns the input unchanged if it doesn't match a known dev-mode pattern
23
23
  * (e.g., already a production hash).
24
24
  */
25
+ /**
26
+ * The production client-reference key hash: `sha256(relativeId).slice(0,12)`,
27
+ * matching @vitejs/plugin-rsc's `hashString`. Exported so the client-chunks
28
+ * strategy can hash a `clientChunks` callback's `meta.normalizedId` (already the
29
+ * project-root-relative id) and compare it against fallback hashes collected
30
+ * during discovery.
31
+ */
32
+ export function hashRefKey(relativeId: string): string {
33
+ return createHash("sha256").update(relativeId).digest("hex").slice(0, 12);
34
+ }
35
+
25
36
  export function computeProductionHash(
26
37
  projectRoot: string,
27
38
  refKey: string,
@@ -49,7 +60,7 @@ export function computeProductionHash(
49
60
  return refKey;
50
61
  }
51
62
 
52
- return createHash("sha256").update(toHash).digest("hex").slice(0, 12);
63
+ return hashRefKey(toHash);
53
64
  }
54
65
 
55
66
  // Regex to match registerClientReference() calls as emitted by @vitejs/plugin-rsc.
package/src/vite/rango.ts CHANGED
@@ -23,6 +23,10 @@ import {
23
23
  onwarn,
24
24
  getManualChunks,
25
25
  } from "./utils/shared-utils.js";
26
+ import {
27
+ resolveClientChunks,
28
+ type ClientChunkContext,
29
+ } from "./utils/client-chunks.js";
26
30
  import type { RangoOptions } from "./plugin-types.js";
27
31
  import { printBanner, rangoVersion } from "./utils/banner.js";
28
32
  import { createVersionInjectorPlugin } from "./plugins/version-injector.js";
@@ -62,6 +66,23 @@ export async function rango(options?: RangoOptions): Promise<PluginOption[]> {
62
66
  const resolvedOptions: RangoOptions = options ?? { preset: "node" };
63
67
  const preset = resolvedOptions.preset ?? "node";
64
68
  const showBanner = resolvedOptions.banner ?? true;
69
+ // Client-chunking strategy (per-route/per-feature splitting of the browser
70
+ // bundle). Defaults to the built-in directory strategy (`true`) pre-1.0; pass
71
+ // `clientChunks: false` to opt out. Resolved once and forwarded to
72
+ // @vitejs/plugin-rsc in both presets. The built-in strategy only splits where it
73
+ // recognizes a route structure, so this default is a no-op for flat / host-split
74
+ // apps and never duplicates the shared runtime.
75
+ const clientChunksOption = resolvedOptions.clientChunks ?? true;
76
+ // Shared context the built-in strategy reads at build time: the production
77
+ // hashes of registered error/notFound fallback modules (-> app-fallback).
78
+ // Populated by the discovery plugin in buildStart, before the client build
79
+ // invokes the strategy. Only wired when the built-in strategy is active; a
80
+ // custom function owns its own grouping.
81
+ const useBuiltInClientChunks = clientChunksOption === true;
82
+ const clientChunkCtx: ClientChunkContext | undefined = useBuiltInClientChunks
83
+ ? { fallbackRefs: new Set<string>() }
84
+ : undefined;
85
+ const clientChunks = resolveClientChunks(clientChunksOption, clientChunkCtx);
65
86
  debugConfig?.("rango(%s) setup start", preset);
66
87
 
67
88
  const plugins: PluginOption[] = [];
@@ -147,6 +168,14 @@ export async function rango(options?: RangoOptions): Promise<PluginOption[]> {
147
168
  client: {
148
169
  build: {
149
170
  rollupOptions: {
171
+ // FILE_NAME_CONFLICT (and any other client-build warning) is
172
+ // emitted by the CLIENT environment build, which consults THIS
173
+ // env's onwarn -- Vite 8's environment builds do NOT propagate
174
+ // the top-level build.rollupOptions.onwarn into the client env.
175
+ // Wire it here so the suppression runs where the conflicts
176
+ // originate (the top-level handler is invoked 0x for these; the
177
+ // client-env handler is invoked for all of them).
178
+ onwarn,
150
179
  output: {
151
180
  manualChunks: getManualChunks,
152
181
  },
@@ -231,6 +260,7 @@ export async function rango(options?: RangoOptions): Promise<PluginOption[]> {
231
260
  rsc({
232
261
  entries: finalEntries,
233
262
  serverHandler: false,
263
+ clientChunks,
234
264
  }) as PluginOption,
235
265
  );
236
266
 
@@ -306,6 +336,14 @@ export async function rango(options?: RangoOptions): Promise<PluginOption[]> {
306
336
  client: {
307
337
  build: {
308
338
  rollupOptions: {
339
+ // FILE_NAME_CONFLICT (and any other client-build warning) is
340
+ // emitted by the CLIENT environment build, which consults THIS
341
+ // env's onwarn -- Vite 8's environment builds do NOT propagate
342
+ // the top-level build.rollupOptions.onwarn into the client env.
343
+ // Wire it here so the suppression runs where the conflicts
344
+ // originate (the top-level handler is invoked 0x for these; the
345
+ // client-env handler is invoked for all of them).
346
+ onwarn,
309
347
  output: {
310
348
  manualChunks: getManualChunks,
311
349
  },
@@ -394,6 +432,7 @@ export async function rango(options?: RangoOptions): Promise<PluginOption[]> {
394
432
  plugins.push(
395
433
  rsc({
396
434
  entries: finalEntries,
435
+ clientChunks,
397
436
  }) as PluginOption,
398
437
  );
399
438
 
@@ -496,6 +535,7 @@ export async function rango(options?: RangoOptions): Promise<PluginOption[]> {
496
535
  enableBuildPrerender: prerenderEnabled,
497
536
  buildEnv: options?.buildEnv,
498
537
  preset,
538
+ clientChunkCtx,
499
539
  }),
500
540
  );
501
541
 
@@ -0,0 +1,190 @@
1
+ // Resolution of the public `clientChunks` option into the callback shape that
2
+ // @vitejs/plugin-rsc expects. See plugin-types.ts (ClientChunks) and
3
+ // docs/client-chunking.md for the contract. The mechanism: a distinct returned
4
+ // name yields a distinct, dynamically-imported client chunk, independent of how
5
+ // the RSC/server build chunked the importing modules.
6
+
7
+ import type { ClientChunkMeta, ClientChunks } from "../plugin-types.js";
8
+ import { createRangoDebugger, NS } from "../debug.js";
9
+ import { hashRefKey } from "../plugins/client-ref-hashing.js";
10
+
11
+ /** The callback shape @vitejs/plugin-rsc's `clientChunks` option accepts. */
12
+ export type RscClientChunksFn = (meta: ClientChunkMeta) => string | undefined;
13
+
14
+ /**
15
+ * Build-time context the discovery pass populates and the built-in strategy
16
+ * reads. It refines how the catch-all (no route-root marker) modules are grouped
17
+ * without touching marker splits or the shared runtime:
18
+ *
19
+ * - `fallbackRefs`: production hashes of the `"use client"` modules a consumer
20
+ * registered as `errorBoundary`/`notFoundBoundary` fallbacks. Pulled into a
21
+ * dedicated `app-fallback` chunk so the error UI is not co-bundled with the
22
+ * very route code it exists to catch failures for (resilience), and so the
23
+ * chunk it would otherwise sit in gets named after a real module rather than
24
+ * the boundary. Populated by reading each fallback element's client-reference
25
+ * `$$id` during discovery (see discover-routers).
26
+ */
27
+ export interface ClientChunkContext {
28
+ fallbackRefs: Set<string>;
29
+ }
30
+
31
+ /**
32
+ * Opt-in observability for the built-in strategy. The route-root marker list is
33
+ * intentionally finite (see {@link ROUTE_ROOT_DIRS}); a consumer whose layout
34
+ * has no recognized marker (e.g. `src/parts/<feature>/…`) silently inherits the
35
+ * default grouping (no per-route split). That silence is the only real downside
36
+ * of a convention-based default, so we make the decision observable: run a build
37
+ * with `DEBUG=rango:chunks` to see, per client module, which route group it was
38
+ * assigned to or why it fell back to the shared grouping. Zero cost when off
39
+ * (the debugger is `undefined` unless the namespace is enabled). For full control
40
+ * over any layout, pass a `clientChunks` function instead of relying on the
41
+ * convention — that is the supported configurability path, not widening the list.
42
+ */
43
+ const debugChunks = createRangoDebugger(NS.chunks);
44
+
45
+ /**
46
+ * Modules that must stay on the default (shared) grouping regardless of strategy:
47
+ * React, the router client runtime, and anything in node_modules. Splitting these
48
+ * out per route would fragment the shared baseline and regress cache reuse — they
49
+ * are loaded on every route, so they belong in shared chunks.
50
+ *
51
+ * The Rango runtime is matched by package root only: `@rangojs/router` (the
52
+ * installed/aliased name) and the workspace `packages/(rangojs-router|rsc-router)/(src|dist)/`.
53
+ * The `(src|dist)` anchor matches the package's own source/build output but NOT
54
+ * consumer apps that merely live under a `packages/rangojs-router/` ancestor (the
55
+ * in-repo e2e apps), so their app components remain splittable. We deliberately do
56
+ * NOT match a bare `/src/browser/`: that is a consumer-owned path (a consumer's own
57
+ * `src/browser/Foo.tsx` must still split).
58
+ *
59
+ * We test BOTH `meta.id` (absolute) and `meta.normalizedId`. `normalizedId` is the
60
+ * project-root-relative form plugin-rsc derives (e.g. `../../src/browser/react/Link.tsx`
61
+ * for the in-repo runtime), which the package-root patterns miss; the absolute `id`
62
+ * always contains the package's real location, so it reliably catches the runtime.
63
+ */
64
+ function isSharedRuntime(meta: ClientChunkMeta): boolean {
65
+ return [meta.id, meta.normalizedId].some(
66
+ (path) =>
67
+ path.includes("/node_modules/") ||
68
+ /\/@rangojs\/router\//.test(path) ||
69
+ /\/packages\/(rangojs-router|rsc-router)\/(src|dist)\//.test(path),
70
+ );
71
+ }
72
+
73
+ /** Sanitize a raw group name into a filesystem/Rollup-safe chunk name fragment. */
74
+ function sanitizeGroup(name: string): string {
75
+ return name.replace(/[^a-zA-Z0-9_-]+/g, "_").replace(/^_+|_+$/g, "") || "app";
76
+ }
77
+
78
+ /**
79
+ * Directory names that conventionally hold one sub-directory per route/feature.
80
+ * When a `"use client"` module lives under one of these, the built-in strategy
81
+ * keys the chunk on the segment IMMEDIATELY AFTER the marker (the route id),
82
+ * rather than the module's immediate parent directory. This is what keeps
83
+ * `routes/foo/components/Button.tsx` and `routes/bar/components/Button.tsx` in
84
+ * `app-foo` / `app-bar` instead of colliding in a single `app-components`.
85
+ *
86
+ * Route identity lives in the path PREFIX; the immediate parent (a suffix) is
87
+ * only a reliable proxy for the un-nested `routes/<route>/Widget.tsx` layout.
88
+ */
89
+ const ROUTE_ROOT_DIRS = new Set([
90
+ "routes",
91
+ "route",
92
+ "pages",
93
+ "page",
94
+ "app",
95
+ "features",
96
+ "feature",
97
+ "views",
98
+ "view",
99
+ "handlers",
100
+ "urls",
101
+ "modules",
102
+ "screens",
103
+ "sections",
104
+ ]);
105
+
106
+ /**
107
+ * Built-in strategy used when `clientChunks: true` (also the default). Splits app
108
+ * client components by route/feature identity ONLY where it can recognize a route
109
+ * structure; everywhere else it inherits the default grouping (returns undefined).
110
+ * This conservatism is what makes it safe as a default:
111
+ *
112
+ * - A recognized route structure (`routes/<id>/…`, `app/<id>/…`, `handlers/<id>/…`
113
+ * etc.) splits into a per-route chunk `app-<id>`, at any nesting depth.
114
+ * - A flat `src/components/Button.tsx`, or host sub-apps already split by a dynamic
115
+ * `import()` boundary (each app's `serverChunk` differs), get `undefined` and so
116
+ * keep `@vitejs/plugin-rsc`'s default `serverChunk` grouping — i.e. NO change
117
+ * versus not enabling the option. Returning a parent-dir name here would instead
118
+ * merge unrelated modules (e.g. every host app's `components/Layout.tsx` into one
119
+ * `app-components`), re-introducing cross-app leakage.
120
+ *
121
+ * Resolution order:
122
+ * 1. Shared runtime (React / router / node_modules) -> `undefined` (never split).
123
+ * 2. A registered error/notFound fallback (`ctx.fallbackRefs`) -> `app-fallback`,
124
+ * regardless of location, so the error UI is decoupled from the happy path.
125
+ * 3. A {@link ROUTE_ROOT_DIRS} marker with a directory after it -> key on that
126
+ * next segment (the route id), robust to any nesting depth.
127
+ * 4. Otherwise `undefined` (inherit the default `serverChunk` grouping).
128
+ */
129
+ export function directoryClientChunks(
130
+ meta: ClientChunkMeta,
131
+ ctx?: ClientChunkContext,
132
+ ): string | undefined {
133
+ if (isSharedRuntime(meta)) {
134
+ // React / router runtime / node_modules: always shared, expected, uninteresting.
135
+ return undefined;
136
+ }
137
+ // Registered error/notFound fallbacks -> a dedicated chunk. The error UI must
138
+ // not co-bundle with the code it catches failures for, and removing it lets the
139
+ // chunk it would otherwise anchor be named after a real module, not the boundary.
140
+ if (
141
+ ctx?.fallbackRefs.size &&
142
+ ctx.fallbackRefs.has(hashRefKey(meta.normalizedId))
143
+ ) {
144
+ debugChunks?.("fallback %s -> app-fallback", meta.normalizedId);
145
+ return "app-fallback";
146
+ }
147
+ const segments = meta.normalizedId.split("/").filter(Boolean);
148
+ const dirCount = segments.length - 1; // exclude the filename
149
+ if (dirCount >= 1) {
150
+ // Route-root marker -> the segment after it is the route id. First marker
151
+ // wins, so a top-level route owns its whole subtree. The `< dirCount - 1`
152
+ // bound guarantees the segment after the marker is a directory, not the file.
153
+ for (let i = 0; i < dirCount - 1; i++) {
154
+ if (ROUTE_ROOT_DIRS.has(segments[i].toLowerCase())) {
155
+ const group = `app-${sanitizeGroup(segments[i + 1])}`;
156
+ debugChunks?.("split %s -> %s", meta.normalizedId, group);
157
+ return group;
158
+ }
159
+ }
160
+ }
161
+ // No recognized route structure -> inherit the default serverChunk grouping.
162
+ // This is the actionable "silent" case: app code that did NOT split by route.
163
+ // Surface it (under DEBUG=rango:chunks) so a consumer can see their layout
164
+ // missed the convention and either colocate under a marker dir or pass a fn.
165
+ debugChunks?.(
166
+ "shared %s (no route-root marker; inherits default grouping)",
167
+ meta.normalizedId,
168
+ );
169
+ return undefined;
170
+ }
171
+
172
+ /**
173
+ * Resolve a Rango `clientChunks` option into a @vitejs/plugin-rsc `clientChunks`
174
+ * callback, or `undefined` to leave plugin-rsc on its default (serverChunk)
175
+ * grouping.
176
+ *
177
+ * - `false` / `undefined` -> `undefined` (no override).
178
+ * - `true` -> the built-in {@link directoryClientChunks} strategy,
179
+ * bound to the discovery-populated {@link ClientChunkContext} (fallback chunk).
180
+ * - function -> the user's function, used verbatim (full control; the
181
+ * fallback refinement does not apply — the consumer owns the grouping).
182
+ */
183
+ export function resolveClientChunks(
184
+ option: ClientChunks | undefined,
185
+ ctx?: ClientChunkContext,
186
+ ): RscClientChunksFn | undefined {
187
+ if (!option) return undefined;
188
+ if (option === true) return (meta) => directoryClientChunks(meta, ctx);
189
+ return option;
190
+ }
@@ -1,78 +1,11 @@
1
- /**
2
- * Flatten prefix tree leaf nodes into precomputed route entries.
3
- * Leaf nodes have no children (no nested includes), so their routes can be
4
- * used directly by evaluateLazyEntry() without running the handler.
5
- * Non-leaf nodes are skipped because they have nested lazy includes that
6
- * require the handler to run for discovery.
7
- *
8
- * A leaf is also skipped when its staticPrefix collides with an ancestor
9
- * include node's staticPrefix. That happens when a dynamic param collapses the
10
- * staticPrefix of nested includes onto the parent's (e.g. `/m/:id/edit` -> sp
11
- * `/m`): precomputing such a leaf under the collapsed prefix would let the
12
- * ancestor's lazy entry claim a route it cannot register (the route is behind
13
- * further nested lazy includes), producing a RouteNotFoundError at request time
14
- * (issue #506). Those routes are resolved via the handler chain instead.
15
- */
16
- export function flattenLeafEntries(
17
- prefixTree: Record<string, any>,
18
- routeManifest: Record<string, string>,
19
- result: Array<{ staticPrefix: string; routes: Record<string, string> }>,
20
- ): void {
21
- function visit(node: any, ancestorStaticPrefixes: Set<string>): void {
22
- const children = node.children || {};
23
- if (
24
- Object.keys(children).length === 0 &&
25
- node.routes &&
26
- node.routes.length > 0
27
- ) {
28
- // Leaf node. Skip if its staticPrefix collides with an ancestor include
29
- // node's staticPrefix (dynamic-param collapse) — see doc comment above.
30
- if (ancestorStaticPrefixes.has(node.staticPrefix)) {
31
- return;
32
- }
33
- // Collect its routes from the manifest
34
- const routes: Record<string, string> = {};
35
- for (const name of node.routes) {
36
- if (name in routeManifest) {
37
- routes[name] = routeManifest[name];
38
- }
39
- }
40
- result.push({ staticPrefix: node.staticPrefix, routes });
41
- } else {
42
- // Non-leaf: recurse into children, tracking this node's staticPrefix as
43
- // an ancestor so a collapsed nested leaf below it is not over-claimed.
44
- const nextAncestors = new Set(ancestorStaticPrefixes);
45
- nextAncestors.add(node.staticPrefix);
46
- for (const child of Object.values(children)) {
47
- visit(child, nextAncestors);
48
- }
49
- }
50
- }
51
- for (const node of Object.values(prefixTree)) {
52
- visit(node, new Set());
53
- }
54
- }
55
-
56
- /**
57
- * Walk prefix tree to map each route name to its scope's staticPrefix.
58
- */
59
- export function buildRouteToStaticPrefix(
60
- prefixTree: Record<string, any>,
61
- result: Record<string, string>,
62
- ): void {
63
- function visit(node: any): void {
64
- const sp = node.staticPrefix || "";
65
- for (const name of node.routes || []) {
66
- result[name] = sp;
67
- }
68
- for (const child of Object.values(node.children || {})) {
69
- visit(child);
70
- }
71
- }
72
- for (const node of Object.values(prefixTree)) {
73
- visit(node);
74
- }
75
- }
1
+ // Pure prefix-tree walks live in the build layer so runtime code can consume
2
+ // them without importing from vite/. Re-exported here for the vite-side
3
+ // callers (discover-routers, virtual-module-codegen) that already import them
4
+ // from this module.
5
+ export {
6
+ flattenLeafEntries,
7
+ buildRouteToStaticPrefix,
8
+ } from "../../build/prefix-tree-utils.js";
76
9
 
77
10
  /**
78
11
  * Wrap a value as `JSON.parse('...')` instead of a JS object literal.
@@ -116,6 +116,50 @@ export function createVirtualEntriesPlugin(
116
116
  };
117
117
  }
118
118
 
119
+ // Matches rollup's FILE_NAME_CONFLICT message and reports whether the colliding
120
+ // file is a content-hashed asset, e.g.
121
+ // The emitted file "assets/index-DlGNrvnU.css" overwrites a previously ...
122
+ // The emitted file "assets/inter-latin-Dx4kXJAl.woff2" overwrites a ...
123
+ // The match is UNANCHORED on purpose: by the time the warning reaches this user
124
+ // onwarn handler, Vite's logger has wrapped rollup's raw message with an ANSI
125
+ // color sequence and a "[CODE] " label, e.g.
126
+ // "[FILE_NAME_CONFLICT] The emitted file \"...\" overwrites ..."
127
+ // A "^The emitted file" anchor sits behind that prefix and never matches; and
128
+ // Vite also strips the JSON.stringify quotes rollup puts around the filename, so
129
+ // the match is UNANCHORED and quote-OPTIONAL ("?...?"?). The non-whitespace
130
+ // capture stops at the space before "overwrites" (Vite's unquoted display form)
131
+ // or the closing quote (raw rollup form); either way it carries no ANSI.
132
+ // A content-hashed name ends with a "-" separator + a Vite content hash. The
133
+ // hash is a FIXED-LENGTH base64url run ([A-Za-z0-9_-], default 8), so it can
134
+ // itself contain "-"/"_": it CANNOT be located by splitting on the last "-"
135
+ // (that lands inside the hash whenever it carries a dash, e.g. "...-Cabi7G8-" ->
136
+ // "" or "...-CkhJZR-_" -> "_", which let those conflicts leak). Instead take the
137
+ // trailing HASH_LEN chars and require the "-" separator right before them. The
138
+ // hash must hold an uppercase letter or digit (a real hash is never an
139
+ // all-lowercase word), so stable names like "assets/manifest.json" or
140
+ // "assets/loading-skeleton.css" still surface as potential genuine overwrites.
141
+ function isContentHashedAssetConflict(message: string | undefined): boolean {
142
+ if (!message) return false;
143
+ const match =
144
+ /The emitted file "?([^"\s]+)"? overwrites a previously emitted file/.exec(
145
+ message,
146
+ );
147
+ if (!match) return false;
148
+ const fileName = match[1];
149
+ const base = fileName.slice(fileName.lastIndexOf("/") + 1);
150
+ const dot = base.lastIndexOf(".");
151
+ if (dot <= 0) return false;
152
+ const stem = base.slice(0, dot);
153
+ // HASH_LEN tracks Vite's default [hash] width; bump it if an app sets a custom
154
+ // assetFileNames hash length.
155
+ const HASH_LEN = 8;
156
+ if (stem.length < HASH_LEN + 1 || stem[stem.length - HASH_LEN - 1] !== "-") {
157
+ return false;
158
+ }
159
+ const hash = stem.slice(-HASH_LEN);
160
+ return /^[A-Za-z0-9_-]+$/.test(hash) && /[A-Z0-9]/.test(hash);
161
+ }
162
+
119
163
  /**
120
164
  * Rollup onwarn handler that suppresses known harmless warnings:
121
165
  * - "use client" directives: handled by the RSC plugin, not relevant to Rollup
@@ -126,6 +170,14 @@ export function createVirtualEntriesPlugin(
126
170
  * by the bundler, rather than the vite:reporter message handled below (Rollup/Vite 7 shape).
127
171
  * - empty bundle: @vitejs/plugin-rsc scan build (step 1/5) produces an empty "index" chunk
128
172
  * because the RSC entry is fully externalized during client-reference analysis
173
+ * - file name conflicts on content-hashed assets: @vitejs/plugin-rsc copies the rsc
174
+ * environment's imported CSS/assets into the client bundle (its assets-manifest
175
+ * generateBundle re-emits each via emitFile with an explicit content-hashed
176
+ * fileName). When the client bundle already produced that identical asset,
177
+ * rollup raises FILE_NAME_CONFLICT even though the bytes are identical (a
178
+ * content hash collision IS a content match). Only these are suppressed; a
179
+ * collision on a stable name still surfaces. No upstream fix as of
180
+ * @vitejs/plugin-rsc@0.5.27; remove when it skips the redundant emit.
129
181
  */
130
182
  export function onwarn(
131
183
  warning: Vite.Rollup.RollupLog,
@@ -139,6 +191,12 @@ export function onwarn(
139
191
  ) {
140
192
  return;
141
193
  }
194
+ if (
195
+ warning.code === "FILE_NAME_CONFLICT" &&
196
+ isContentHashedAssetConflict(warning.message)
197
+ ) {
198
+ return;
199
+ }
142
200
  // @vitejs/plugin-rsc@0.5.14: rsc:virtual:vite-rsc/assets-manifest renderChunk
143
201
  // returns { code } without map, causing Rollup to warn about incorrect sourcemaps.
144
202
  // This is harmless (simple string replacement). Remove this suppression if a
@@ -173,12 +231,19 @@ export function getManualChunks(id: string): string | undefined {
173
231
  return "react";
174
232
  }
175
233
  // Use dynamic package name from package.json
176
- // Check both npm install path and workspace symlink resolved path
234
+ // Check both npm install path and workspace symlink resolved path.
235
+ //
236
+ // The workspace patterns are anchored to the package's own `src`/`dist` so
237
+ // they match the router runtime but NOT consumer apps that merely live under a
238
+ // `packages/rangojs-router/` ancestor (the in-repo e2e apps at
239
+ // `packages/rangojs-router/e2e/<app>/src/...`). Without the anchor those apps'
240
+ // own client components were force-merged into the shared "router" chunk,
241
+ // which both misrepresented real-consumer bundles and blocked `clientChunks`
242
+ // splitting from relocating them.
177
243
  const packageName = getPublishedPackageName();
178
244
  if (
179
245
  normalized.includes(`node_modules/${packageName}/`) ||
180
- normalized.includes("packages/rsc-router/") ||
181
- normalized.includes("packages/rangojs-router/")
246
+ /\/packages\/(rsc-router|rangojs-router)\/(src|dist)\//.test(normalized)
182
247
  ) {
183
248
  return "router";
184
249
  }
@@ -1,83 +0,0 @@
1
- /**
2
- * Internal Types - Implementation Details
3
- *
4
- * @internal
5
- * These types are for internal use only and should not be relied upon by consumers.
6
- * They may change without notice between versions.
7
- *
8
- * If you find yourself needing these types, please open an issue to discuss
9
- * adding them to the public API.
10
- */
11
- /**
12
- * @internal
13
- * Internal representation of a resolved route segment.
14
- * Used during route matching and rendering pipeline.
15
- */
16
- export type { ResolvedSegment, SegmentMetadata } from "./types.js";
17
- /**
18
- * @internal
19
- * Internal match result from route resolution.
20
- */
21
- export type { MatchResult, SlotState } from "./types.js";
22
- /**
23
- * @internal
24
- * Context for intercept route selection.
25
- */
26
- export type { InterceptSelectorContext, InterceptSegmentsState, InterceptWhenFn, } from "./server/context.js";
27
- /**
28
- * @internal
29
- * RSC protocol payload structure.
30
- */
31
- export type { RscPayload, ReactFormState } from "./rsc/types.js";
32
- /**
33
- * @internal
34
- * Internal navigation store interface.
35
- */
36
- export type { NavigationStore, NavigationBridge, RscMetadata, ActionResult, InflightAction, NavigationState, TrackedActionState, ActionStateListener, SegmentCache, SegmentState, NavigationUpdate, } from "./browser/types.js";
37
- /**
38
- * @internal
39
- * Internal handle storage mechanism.
40
- */
41
- export type { HandleStore, HandleData } from "./server/handle-store.js";
42
- /**
43
- * @internal
44
- * Segment handle data in cache.
45
- */
46
- export type { SegmentHandleData } from "./cache/types.js";
47
- /**
48
- * @internal
49
- * Internal cache entry data structure.
50
- */
51
- export type { CachedEntryData, CachedEntryResult, CacheGetResult, SerializedSegmentData, CacheDefaults, } from "./cache/types.js";
52
- /**
53
- * @internal
54
- * Router context for AsyncLocalStorage.
55
- */
56
- export type { RouterContext, RevalidationContext, InterceptResult } from "./router/router-context.js";
57
- /**
58
- * @internal
59
- * Route match context during pipeline processing.
60
- */
61
- export type { MatchContext, MatchPipelineState } from "./router/match-context.js";
62
- /**
63
- * @internal
64
- * Pattern matching result.
65
- */
66
- export type { RouteMatchResult } from "./router/pattern-matching.js";
67
- /**
68
- * @internal
69
- * Entry data during route traversal.
70
- */
71
- export type { EntryData, InterceptEntry, MetricsStore, PerformanceMetric, EntryCacheConfig, EntryPropCommon, EntryPropDatas, LoaderEntry, EntryPropSegments, } from "./server/context.js";
72
- /**
73
- * @internal
74
- * Internal handler context with additional props for router internals.
75
- * Includes `_originalRequest` and `_currentSegmentId`.
76
- */
77
- export type { InternalHandlerContext } from "./types.js";
78
- /**
79
- * @internal
80
- * Debug utilities for manifest inspection and comparison.
81
- */
82
- export { serializeManifest, compareManifests, formatManifestDiff, type SerializedEntry, type SerializedManifest, } from "./debug.js";
83
- //# sourceMappingURL=__internal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"__internal.d.ts","sourceRoot":"","sources":["../src/__internal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH;;;;GAIG;AACH,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEnE;;;GAGG;AACH,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAMzD;;;GAGG;AACH,YAAY,EACV,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAM7B;;;GAGG;AACH,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE;;;GAGG;AACH,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAM5B;;;GAGG;AACH,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAExE;;;GAGG;AACH,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAM1D;;;GAGG;AACH,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAM1B;;;GAGG;AACH,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAMtG;;;GAGG;AACH,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAElF;;;GAGG;AACH,YAAY,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAMrE;;;GAGG;AACH,YAAY,EACV,SAAS,EACT,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,WAAW,EACX,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAM7B;;;;GAIG;AACH,YAAY,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAMzD;;;GAGG;AACH,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Internal Types - Implementation Details
3
- *
4
- * @internal
5
- * These types are for internal use only and should not be relied upon by consumers.
6
- * They may change without notice between versions.
7
- *
8
- * If you find yourself needing these types, please open an issue to discuss
9
- * adding them to the public API.
10
- */
11
- // ============================================================================
12
- // Debug Utilities (Internal)
13
- // ============================================================================
14
- /**
15
- * @internal
16
- * Debug utilities for manifest inspection and comparison.
17
- */
18
- export { serializeManifest, compareManifests, formatManifestDiff, } from "./debug.js";
19
- //# sourceMappingURL=__internal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"__internal.js","sourceRoot":"","sources":["../src/__internal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAsJH,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E;;;GAGG;AACH,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GAGnB,MAAM,YAAY,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Mock for rsc-router:version virtual module.
3
- * Used by vitest since the virtual module is only available at build time.
4
- * Empty string disables version path in URLs for simpler test assertions.
5
- */
6
- export declare const VERSION = "";
7
- //# sourceMappingURL=version.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/__mocks__/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,OAAO,KAAK,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Mock for rsc-router:version virtual module.
3
- * Used by vitest since the virtual module is only available at build time.
4
- * Empty string disables version path in URLs for simpler test assertions.
5
- */
6
- export const VERSION = "";
7
- //# sourceMappingURL=version.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/__mocks__/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=client-href.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-href.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/client-href.test.ts"],"names":[],"mappings":""}