@timber-js/app 0.2.0-alpha.239 → 0.2.0-alpha.240

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 (332) hide show
  1. package/dist/_chunks/{actions-Top9GftB.js → actions-DIgnvDrG.js} +4 -4
  2. package/dist/_chunks/{actions-Top9GftB.js.map → actions-DIgnvDrG.js.map} +1 -1
  3. package/dist/_chunks/{als-registry-DpygwCp0.js → als-registry-PPYstxK0.js} +2 -1
  4. package/dist/_chunks/{als-registry-DpygwCp0.js.map → als-registry-PPYstxK0.js.map} +1 -1
  5. package/dist/_chunks/{cache-api-Bo8c7XVF.js → cache-api-uWQwuxWb.js} +5 -5
  6. package/dist/_chunks/{cache-api-Bo8c7XVF.js.map → cache-api-uWQwuxWb.js.map} +1 -1
  7. package/dist/_chunks/{chains-DMoHX4yH.js → chains-C7CExrUI.js} +2 -2
  8. package/dist/_chunks/{chains-DMoHX4yH.js.map → chains-C7CExrUI.js.map} +1 -1
  9. package/dist/_chunks/chains-CSslTUdI.js +1 -0
  10. package/dist/_chunks/{classify-BwyAd-dZ.js → classify-Cj9EeZoL.js} +2 -2
  11. package/dist/_chunks/{classify-BwyAd-dZ.js.map → classify-Cj9EeZoL.js.map} +1 -1
  12. package/dist/_chunks/{cli-check-DQAD9MLo.js → cli-check-C3QOAru7.js} +3 -3
  13. package/dist/_chunks/{cli-check-DQAD9MLo.js.map → cli-check-C3QOAru7.js.map} +1 -1
  14. package/dist/_chunks/{cli-schema-sync-C_xNLqBj.js → cli-schema-sync-BRxZz66D.js} +1 -1
  15. package/dist/_chunks/{cli-schema-sync-CmGls3dc.js → cli-schema-sync-DQUS_o3V.js} +2 -2
  16. package/dist/_chunks/{cli-schema-sync-CmGls3dc.js.map → cli-schema-sync-DQUS_o3V.js.map} +1 -1
  17. package/dist/_chunks/{client-dep-entries-C5BTQtFS.js → client-dep-entries-ZETBdLgv.js} +2 -2
  18. package/dist/_chunks/{client-dep-entries-C5BTQtFS.js.map → client-dep-entries-ZETBdLgv.js.map} +1 -1
  19. package/dist/_chunks/{convention-lint-GQA6WTRo.js → convention-lint-BoVISNS6.js} +3 -3
  20. package/dist/_chunks/{convention-lint-GQA6WTRo.js.map → convention-lint-BoVISNS6.js.map} +1 -1
  21. package/dist/_chunks/dev-server-B8roKA3Q.js +1 -0
  22. package/dist/_chunks/{dev-server-Cr3_Fu5A.js → dev-server-C5R6jx8Q.js} +2 -2
  23. package/dist/_chunks/{dev-server-Cr3_Fu5A.js.map → dev-server-C5R6jx8Q.js.map} +1 -1
  24. package/dist/_chunks/{dev-span-RsVeYYc_.js → dev-span-0aG7Q_Ph.js} +3 -7
  25. package/dist/_chunks/dev-span-0aG7Q_Ph.js.map +1 -0
  26. package/dist/_chunks/{error-boundary-Bh-egWUI.js → error-boundary-DB51f9ih.js} +98 -419
  27. package/dist/_chunks/error-boundary-DB51f9ih.js.map +1 -0
  28. package/dist/_chunks/{flight-source-node-BsrlUjMO.js → flight-source-node-D9cHBhjP.js} +7 -4
  29. package/dist/_chunks/flight-source-node-D9cHBhjP.js.map +1 -0
  30. package/dist/_chunks/{json-lossy-check-D47R9Fp5.js → json-lossy-check-Y1GxqVX_.js} +2 -2
  31. package/dist/_chunks/{json-lossy-check-D47R9Fp5.js.map → json-lossy-check-Y1GxqVX_.js.map} +1 -1
  32. package/dist/_chunks/{live-graph-HcLScfiV.js → live-graph-BDQWvnMm.js} +4 -4
  33. package/dist/_chunks/{live-graph-HcLScfiV.js.map → live-graph-BDQWvnMm.js.map} +1 -1
  34. package/dist/_chunks/{logger-DDLtp5e-.js → logger-DmRR9tmZ.js} +2 -2
  35. package/dist/_chunks/{logger-DDLtp5e-.js.map → logger-DmRR9tmZ.js.map} +1 -1
  36. package/dist/_chunks/metadata-routes-MXNjWOt5.js.map +1 -1
  37. package/dist/_chunks/{node-response-omewa8e6.js → node-response-yp8zdyRp.js} +2 -2
  38. package/dist/_chunks/{node-response-omewa8e6.js.map → node-response-yp8zdyRp.js.map} +1 -1
  39. package/dist/_chunks/plugin-context-BtaQcMuh.js.map +1 -1
  40. package/dist/_chunks/{poison-scan-DONdiCGX.js → poison-scan-WQgUydF_.js} +2 -2
  41. package/dist/_chunks/{poison-scan-DONdiCGX.js.map → poison-scan-WQgUydF_.js.map} +1 -1
  42. package/dist/_chunks/{scanner-DSAJjH0x.js → scanner-C9Lrf77z.js} +3 -2
  43. package/dist/_chunks/{scanner-DSAJjH0x.js.map → scanner-C9Lrf77z.js.map} +1 -1
  44. package/dist/_chunks/{sizeof-DVhEVN_y.js → sizeof-BISkSaU0.js} +2 -2
  45. package/dist/_chunks/{sizeof-DVhEVN_y.js.map → sizeof-BISkSaU0.js.map} +1 -1
  46. package/dist/_chunks/{walkers-96YopJds.js → walkers-Bxv4v7tX.js} +3 -3
  47. package/dist/_chunks/{walkers-96YopJds.js.map → walkers-Bxv4v7tX.js.map} +1 -1
  48. package/dist/adapters/cloudflare-kv-cache.js +1 -1
  49. package/dist/analyze/crawl-entry.js +3 -3
  50. package/dist/analyze/graph-command.js +2 -2
  51. package/dist/cache/index.js +2 -2
  52. package/dist/cache/stores/memory.js +1 -1
  53. package/dist/cdn/workers-cache-purge.js +1 -1
  54. package/dist/cli.js +3 -3
  55. package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -1
  56. package/dist/client/browser-entry/hydrate.d.ts +1 -1
  57. package/dist/client/browser-entry/router-init.d.ts.map +1 -1
  58. package/dist/client/error-boundary.d.ts +1 -0
  59. package/dist/client/error-boundary.d.ts.map +1 -1
  60. package/dist/client/error-boundary.js +1 -1
  61. package/dist/client/history.d.ts +4 -5
  62. package/dist/client/history.d.ts.map +1 -1
  63. package/dist/client/index.js +6 -7
  64. package/dist/client/index.js.map +1 -1
  65. package/dist/client/internal.d.ts +1 -1
  66. package/dist/client/internal.d.ts.map +1 -1
  67. package/dist/client/internal.js +194 -55
  68. package/dist/client/internal.js.map +1 -1
  69. package/dist/client/navigation-commit.d.ts +6 -25
  70. package/dist/client/navigation-commit.d.ts.map +1 -1
  71. package/dist/client/outlet-content-cache.d.ts +59 -0
  72. package/dist/client/outlet-content-cache.d.ts.map +1 -0
  73. package/dist/client/outlet-scope-context.d.ts +30 -0
  74. package/dist/client/outlet-scope-context.d.ts.map +1 -0
  75. package/dist/client/params-context.d.ts +10 -11
  76. package/dist/client/params-context.d.ts.map +1 -1
  77. package/dist/client/router-pipeline.d.ts +5 -5
  78. package/dist/client/router-pipeline.d.ts.map +1 -1
  79. package/dist/client/router-types.d.ts +10 -24
  80. package/dist/client/router-types.d.ts.map +1 -1
  81. package/dist/client/router.d.ts.map +1 -1
  82. package/dist/client/rsc-fetch.d.ts +4 -17
  83. package/dist/client/rsc-fetch.d.ts.map +1 -1
  84. package/dist/client/segment-cache.d.ts +15 -103
  85. package/dist/client/segment-cache.d.ts.map +1 -1
  86. package/dist/client/segment-outlet.d.ts +28 -52
  87. package/dist/client/segment-outlet.d.ts.map +1 -1
  88. package/dist/client/stale-segment.d.ts +39 -0
  89. package/dist/client/stale-segment.d.ts.map +1 -0
  90. package/dist/client/use-segment-params.d.ts +1 -1
  91. package/dist/config-types.d.ts +7 -6
  92. package/dist/config-types.d.ts.map +1 -1
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +9 -732
  95. package/dist/index.js.map +1 -1
  96. package/dist/native/rsc/manifest.json +6 -4
  97. package/dist/native/rsc/routing/segment-keys.js +3 -11
  98. package/dist/native/rsc/routing/segment-keys.js.map +1 -1
  99. package/dist/native/rsc/server/access-gate.js +3 -7
  100. package/dist/native/rsc/server/access-gate.js.map +1 -1
  101. package/dist/native/rsc/server/als-registry.js +2 -1
  102. package/dist/native/rsc/server/als-registry.js.map +1 -1
  103. package/dist/native/rsc/server/build-manifest.js.map +1 -1
  104. package/dist/native/rsc/server/chain-url-parts.js +1 -6
  105. package/dist/native/rsc/server/chain-url-parts.js.map +1 -1
  106. package/dist/native/rsc/server/client-state-tree.js +33 -0
  107. package/dist/native/rsc/server/client-state-tree.js.map +1 -0
  108. package/dist/native/rsc/server/flight-source-node.js +5 -2
  109. package/dist/native/rsc/server/flight-source-node.js.map +1 -1
  110. package/dist/native/rsc/server/flight-source.js +46 -7
  111. package/dist/native/rsc/server/flight-source.js.map +1 -1
  112. package/dist/native/rsc/server/pipeline-interception.js +1 -1
  113. package/dist/native/rsc/server/publish-params.js.map +1 -1
  114. package/dist/native/rsc/server/route-element-builder.js +43 -61
  115. package/dist/native/rsc/server/route-element-builder.js.map +1 -1
  116. package/dist/native/rsc/server/rsc-entry/helpers.js +5 -28
  117. package/dist/native/rsc/server/rsc-entry/helpers.js.map +1 -1
  118. package/dist/native/rsc/server/rsc-entry/render-route.js +33 -7
  119. package/dist/native/rsc/server/rsc-entry/render-route.js.map +1 -1
  120. package/dist/native/rsc/server/rsc-entry/revalidate-renderer.js +2 -1
  121. package/dist/native/rsc/server/rsc-entry/revalidate-renderer.js.map +1 -1
  122. package/dist/native/rsc/server/rsc-entry/rsc-payload.js +2 -5
  123. package/dist/native/rsc/server/rsc-entry/rsc-payload.js.map +1 -1
  124. package/dist/native/rsc/server/rsc-entry/rsc-stream.js +44 -40
  125. package/dist/native/rsc/server/rsc-entry/rsc-stream.js.map +1 -1
  126. package/dist/native/rsc/server/rsc-entry/ssr-renderer.js +1 -1
  127. package/dist/native/rsc/server/rsc-entry/ssr-renderer.js.map +1 -1
  128. package/dist/native/rsc/server/segment-hash/capture.js +107 -0
  129. package/dist/native/rsc/server/segment-hash/capture.js.map +1 -0
  130. package/dist/native/rsc/server/segment-hash/outlet.js +81 -0
  131. package/dist/native/rsc/server/segment-hash/outlet.js.map +1 -0
  132. package/dist/native/rsc/server/segment-hash/stream-tap.js +139 -0
  133. package/dist/native/rsc/server/segment-hash/stream-tap.js.map +1 -0
  134. package/dist/native/rsc/server/segment-hash/value-hash.js +171 -0
  135. package/dist/native/rsc/server/segment-hash/value-hash.js.map +1 -0
  136. package/dist/native/rsc/server/slot-resolver.js +20 -124
  137. package/dist/native/rsc/server/slot-resolver.js.map +1 -1
  138. package/dist/native/rsc/server/vite-handoff-rsc.js.map +1 -1
  139. package/dist/native/rsc/shared/outlet-decision.js +5 -0
  140. package/dist/native/rsc/shared/outlet-decision.js.map +1 -0
  141. package/dist/native/ssr/client/error-boundary.js +16 -3
  142. package/dist/native/ssr/client/error-boundary.js.map +1 -1
  143. package/dist/native/ssr/client/navigation-commit.js +1 -5
  144. package/dist/native/ssr/client/navigation-commit.js.map +1 -1
  145. package/dist/native/ssr/client/outlet-content-cache.js +53 -0
  146. package/dist/native/ssr/client/outlet-content-cache.js.map +1 -0
  147. package/dist/native/ssr/client/outlet-scope-context.js +12 -0
  148. package/dist/native/ssr/client/outlet-scope-context.js.map +1 -0
  149. package/dist/native/ssr/client/params-context.js.map +1 -1
  150. package/dist/native/ssr/client/rsc-fetch.js +1 -12
  151. package/dist/native/ssr/client/rsc-fetch.js.map +1 -1
  152. package/dist/native/ssr/client/segment-outlet.js +34 -13
  153. package/dist/native/ssr/client/segment-outlet.js.map +1 -1
  154. package/dist/native/ssr/client/stale-segment.js +29 -0
  155. package/dist/native/ssr/client/stale-segment.js.map +1 -0
  156. package/dist/native/ssr/manifest.json +5 -4
  157. package/dist/native/ssr/routing/segment-keys.js +5 -1
  158. package/dist/native/ssr/routing/segment-keys.js.map +1 -1
  159. package/dist/native/ssr/server/access-gate.js +3 -7
  160. package/dist/native/ssr/server/access-gate.js.map +1 -1
  161. package/dist/native/ssr/server/als-registry.js +1 -0
  162. package/dist/native/ssr/server/als-registry.js.map +1 -1
  163. package/dist/native/ssr/server/build-manifest.js.map +1 -1
  164. package/dist/native/ssr/server/client-state-tree.js +33 -0
  165. package/dist/native/ssr/server/client-state-tree.js.map +1 -0
  166. package/dist/native/ssr/server/flight-source-node.js +5 -2
  167. package/dist/native/ssr/server/flight-source-node.js.map +1 -1
  168. package/dist/native/ssr/server/flight-source.js +1 -0
  169. package/dist/native/ssr/server/flight-source.js.map +1 -1
  170. package/dist/native/ssr/server/pipeline-interception.js +1 -1
  171. package/dist/native/ssr/server/segment-hash/value-hash.js +162 -0
  172. package/dist/native/ssr/server/segment-hash/value-hash.js.map +1 -0
  173. package/dist/native/ssr/server/ssr-wrappers.js.map +1 -1
  174. package/dist/native/ssr/server/vite-handoff-rsc.js.map +1 -1
  175. package/dist/native/ssr/shared/payload-root.js.map +1 -1
  176. package/dist/plugin-context.d.ts +0 -16
  177. package/dist/plugin-context.d.ts.map +1 -1
  178. package/dist/plugins/build-manifest.d.ts.map +1 -1
  179. package/dist/routing/index.js +2 -2
  180. package/dist/routing/segment-keys.d.ts +8 -21
  181. package/dist/routing/segment-keys.d.ts.map +1 -1
  182. package/dist/server/access-gate.d.ts +0 -14
  183. package/dist/server/access-gate.d.ts.map +1 -1
  184. package/dist/server/als-registry.d.ts +16 -0
  185. package/dist/server/als-registry.d.ts.map +1 -1
  186. package/dist/server/build-manifest.d.ts +1 -10
  187. package/dist/server/build-manifest.d.ts.map +1 -1
  188. package/dist/server/chain-url-parts.d.ts +3 -13
  189. package/dist/server/chain-url-parts.d.ts.map +1 -1
  190. package/dist/server/client-state-tree.d.ts +31 -0
  191. package/dist/server/client-state-tree.d.ts.map +1 -0
  192. package/dist/server/flight-source-node.d.ts +6 -1
  193. package/dist/server/flight-source-node.d.ts.map +1 -1
  194. package/dist/server/flight-source.d.ts +27 -0
  195. package/dist/server/flight-source.d.ts.map +1 -1
  196. package/dist/server/index.js +2 -2
  197. package/dist/server/internal.js +48 -47
  198. package/dist/server/internal.js.map +1 -1
  199. package/dist/server/publish-params.d.ts +5 -4
  200. package/dist/server/publish-params.d.ts.map +1 -1
  201. package/dist/server/route-element-builder.d.ts +4 -19
  202. package/dist/server/route-element-builder.d.ts.map +1 -1
  203. package/dist/server/rsc-entry/helpers.d.ts +7 -13
  204. package/dist/server/rsc-entry/helpers.d.ts.map +1 -1
  205. package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
  206. package/dist/server/rsc-entry/revalidate-renderer.d.ts.map +1 -1
  207. package/dist/server/rsc-entry/rsc-payload.d.ts +1 -2
  208. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  209. package/dist/server/rsc-entry/rsc-stream.d.ts +11 -2
  210. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  211. package/dist/server/rsc-entry/ssr-renderer.d.ts +0 -2
  212. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  213. package/dist/server/segment-hash/capture.d.ts +77 -0
  214. package/dist/server/segment-hash/capture.d.ts.map +1 -0
  215. package/dist/server/segment-hash/outlet.d.ts +65 -0
  216. package/dist/server/segment-hash/outlet.d.ts.map +1 -0
  217. package/dist/server/segment-hash/stream-tap.d.ts +49 -0
  218. package/dist/server/segment-hash/stream-tap.d.ts.map +1 -0
  219. package/dist/server/segment-hash/value-hash.d.ts +70 -0
  220. package/dist/server/segment-hash/value-hash.d.ts.map +1 -0
  221. package/dist/server/slot-resolver.d.ts +13 -78
  222. package/dist/server/slot-resolver.d.ts.map +1 -1
  223. package/dist/server/ssr-wrappers.d.ts +7 -9
  224. package/dist/server/ssr-wrappers.d.ts.map +1 -1
  225. package/dist/server/vite-handoff-rsc.d.ts +10 -1
  226. package/dist/server/vite-handoff-rsc.d.ts.map +1 -1
  227. package/dist/shared/outlet-decision.d.ts +48 -0
  228. package/dist/shared/outlet-decision.d.ts.map +1 -0
  229. package/dist/shared/payload-root.d.ts +5 -8
  230. package/dist/shared/payload-root.d.ts.map +1 -1
  231. package/dist/shared/segment-info.d.ts +13 -28
  232. package/dist/shared/segment-info.d.ts.map +1 -1
  233. package/package.json +1 -1
  234. package/src/client/browser-entry/action-dispatch.ts +1 -15
  235. package/src/client/browser-entry/hydrate.ts +3 -3
  236. package/src/client/browser-entry/router-init.ts +28 -47
  237. package/src/client/error-boundary.tsx +49 -9
  238. package/src/client/history.ts +4 -5
  239. package/src/client/internal.ts +1 -1
  240. package/src/client/navigation-commit.ts +25 -83
  241. package/src/client/outlet-content-cache.ts +119 -0
  242. package/src/client/outlet-scope-context.ts +42 -0
  243. package/src/client/params-context.ts +11 -12
  244. package/src/client/router-pipeline.ts +10 -74
  245. package/src/client/router-types.ts +11 -26
  246. package/src/client/router.ts +7 -22
  247. package/src/client/rsc-fetch.ts +5 -30
  248. package/src/client/segment-cache.ts +19 -264
  249. package/src/client/segment-outlet.tsx +80 -72
  250. package/src/client/stale-segment.ts +60 -0
  251. package/src/client/use-segment-params.ts +1 -1
  252. package/src/config-types.ts +7 -6
  253. package/src/index.ts +0 -2
  254. package/src/plugin-context.ts +0 -16
  255. package/src/plugins/build-manifest.ts +1 -22
  256. package/src/routing/scanner.ts +12 -0
  257. package/src/routing/segment-keys.ts +9 -35
  258. package/src/rsc-runtime/vendor-types.d.ts +8 -0
  259. package/src/server/access-gate.tsx +3 -32
  260. package/src/server/als-registry.ts +23 -0
  261. package/src/server/build-manifest.ts +1 -11
  262. package/src/server/chain-url-parts.ts +3 -21
  263. package/src/server/client-state-tree.ts +75 -0
  264. package/src/server/flight-source-node.ts +7 -2
  265. package/src/server/flight-source.ts +102 -9
  266. package/src/server/pipeline-interception.ts +1 -1
  267. package/src/server/publish-params.ts +5 -4
  268. package/src/server/route-element-builder.ts +77 -206
  269. package/src/server/rsc-entry/helpers.ts +11 -65
  270. package/src/server/rsc-entry/render-route.ts +54 -28
  271. package/src/server/rsc-entry/revalidate-renderer.ts +2 -1
  272. package/src/server/rsc-entry/rsc-payload.ts +11 -39
  273. package/src/server/rsc-entry/rsc-stream.ts +123 -101
  274. package/src/server/rsc-entry/ssr-renderer.ts +1 -3
  275. package/src/server/segment-hash/capture.ts +232 -0
  276. package/src/server/segment-hash/outlet.ts +185 -0
  277. package/src/server/segment-hash/stream-tap.ts +244 -0
  278. package/src/server/segment-hash/value-hash.ts +338 -0
  279. package/src/server/slot-resolver.ts +37 -323
  280. package/src/server/ssr-wrappers.tsx +7 -9
  281. package/src/server/vite-handoff-rsc.ts +12 -1
  282. package/src/shared/outlet-decision.ts +54 -0
  283. package/src/shared/payload-root.ts +5 -8
  284. package/src/shared/segment-info.ts +13 -28
  285. package/dist/_chunks/chains-CmzbpG-6.js +0 -1
  286. package/dist/_chunks/dev-server--4_Ogy_6.js +0 -1
  287. package/dist/_chunks/dev-span-RsVeYYc_.js.map +0 -1
  288. package/dist/_chunks/error-boundary-Bh-egWUI.js.map +0 -1
  289. package/dist/_chunks/flight-source-node-BsrlUjMO.js.map +0 -1
  290. package/dist/client/segment-update-context.d.ts +0 -15
  291. package/dist/client/segment-update-context.d.ts.map +0 -1
  292. package/dist/client/slot-content-cache-context.d.ts +0 -35
  293. package/dist/client/slot-content-cache-context.d.ts.map +0 -1
  294. package/dist/native/rsc/server/request-dep.js +0 -12
  295. package/dist/native/rsc/server/request-dep.js.map +0 -1
  296. package/dist/native/rsc/server/route-element-helpers.js +0 -20
  297. package/dist/native/rsc/server/route-element-helpers.js.map +0 -1
  298. package/dist/native/rsc/server/skippable-prefix.js +0 -72
  299. package/dist/native/rsc/server/skippable-prefix.js.map +0 -1
  300. package/dist/native/rsc/server/state-tree-diff.js +0 -35
  301. package/dist/native/rsc/server/state-tree-diff.js.map +0 -1
  302. package/dist/native/ssr/client/segment-cache.js +0 -119
  303. package/dist/native/ssr/client/segment-cache.js.map +0 -1
  304. package/dist/native/ssr/client/segment-update-context.js +0 -9
  305. package/dist/native/ssr/client/segment-update-context.js.map +0 -1
  306. package/dist/native/ssr/client/slot-content-cache-context.js +0 -8
  307. package/dist/native/ssr/client/slot-content-cache-context.js.map +0 -1
  308. package/dist/native/ssr/server/state-tree-diff.js +0 -23
  309. package/dist/native/ssr/server/state-tree-diff.js.map +0 -1
  310. package/dist/plugins/request-dep/analysis.d.ts +0 -106
  311. package/dist/plugins/request-dep/analysis.d.ts.map +0 -1
  312. package/dist/plugins/request-dep/index.d.ts +0 -75
  313. package/dist/plugins/request-dep/index.d.ts.map +0 -1
  314. package/dist/plugins/request-dep/origin.d.ts +0 -61
  315. package/dist/plugins/request-dep/origin.d.ts.map +0 -1
  316. package/dist/server/request-dep.d.ts +0 -15
  317. package/dist/server/request-dep.d.ts.map +0 -1
  318. package/dist/server/route-element-helpers.d.ts +0 -12
  319. package/dist/server/route-element-helpers.d.ts.map +0 -1
  320. package/dist/server/skippable-prefix.d.ts +0 -29
  321. package/dist/server/skippable-prefix.d.ts.map +0 -1
  322. package/dist/server/state-tree-diff.d.ts +0 -78
  323. package/dist/server/state-tree-diff.d.ts.map +0 -1
  324. package/src/client/segment-update-context.ts +0 -23
  325. package/src/client/slot-content-cache-context.ts +0 -43
  326. package/src/plugins/request-dep/analysis.ts +0 -447
  327. package/src/plugins/request-dep/index.ts +0 -376
  328. package/src/plugins/request-dep/origin.ts +0 -310
  329. package/src/server/request-dep.ts +0 -37
  330. package/src/server/route-element-helpers.ts +0 -37
  331. package/src/server/skippable-prefix.ts +0 -172
  332. package/src/server/state-tree-diff.ts +0 -132
@@ -1,10 +1,189 @@
1
- import { _ as readPayloadTree, a as createSpaExits, c as createRenderOwner, d as fetchRscPayload, f as createNavigationCommitter, g as prefetchScopeOf, h as SegmentCache, i as createScrollEffects, l as isClientStale, m as PrefetchCache, n as TimberErrorBoundary, o as runAsHandle, p as isPartialNavigation, r as createNavigationRecovery, s as recordSkew, u as NonRscResponse, v as readPublishedParams } from "../_chunks/error-boundary-Bh-egWUI.js";
1
+ import { n as createSingleflight, t as SingleflightTimeoutError } from "../_chunks/singleflight-CzoOVB9Y.js";
2
2
  import { a as NavigationProvider, c as getRouter, i as routerUrlKey, l as getRouterOrNull, o as useNavigationContext, r as parseRouterUrl, u as setGlobalRouter } from "../_chunks/navigation-root-Cvb7P1ud.js";
3
- import { t as SingleflightTimeoutError } from "../_chunks/singleflight-CzoOVB9Y.js";
3
+ import { a as createSpaExits, c as createRenderOwner, d as fetchRscPayload, f as createNavigationCommitter, i as createScrollEffects, l as isClientStale, m as readPublishedParams, n as TimberErrorBoundary, o as runAsHandle, p as readPayloadTree, r as createNavigationRecovery, s as recordSkew, u as NonRscResponse } from "../_chunks/error-boundary-DB51f9ih.js";
4
4
  import { n as registerSsrDataProvider, t as getSsrData } from "../_chunks/ssr-data-9hPtcNOr.js";
5
5
  import { n as useSegmentContext, t as SegmentProvider } from "../_chunks/segment-context-GAyTjjtS.js";
6
6
  import { c as cachedSearchParams, s as cachedSearch, t as _setCachedSearch } from "../_chunks/state-B-EBjeER.js";
7
7
  import { t as bindUseQueryStates } from "../_chunks/use-query-states-D3MMl-KM.js";
8
+ // src/client/segment-cache.ts
9
+ /**
10
+ * The client's record of which layout-bearing segments are mounted — the
11
+ * `treePaths` half of `X-Timber-State-Tree`, which the server reads for
12
+ * interception scoping (TIM-1282).
13
+ *
14
+ * Content reuse is not decided here. The outlet content cache holds what the
15
+ * client can reuse, keyed by segment hash (client/outlet-content-cache.ts,
16
+ * design/52-segment-hash-dedupe.md).
17
+ *
18
+ * Written only by a navigation's commit (`navigation-commit.ts`), so a
19
+ * superseded navigation never describes the mounted tree (TIM-1301).
20
+ */
21
+ var SegmentCache = class {
22
+ paths = [];
23
+ /** Replace the record with the chain a committed page mounted. */
24
+ record(segmentInfo) {
25
+ this.paths = segmentInfo.flatMap((info) => info.treePath ? [info.treePath] : []);
26
+ }
27
+ clear() {
28
+ this.paths = [];
29
+ }
30
+ /** The `app/` directory paths of the mounted segments, root first. */
31
+ treePaths() {
32
+ return [...this.paths];
33
+ }
34
+ };
35
+ /** Sentinel value for negative cache entries (URL is not a route). */
36
+ var NEGATIVE_ENTRY = Object.freeze({ payload: null });
37
+ /**
38
+ * Timeout for the in-flight singleflight (TIM-1438). Per CLAUDE.md's
39
+ * singleflight rule: "Never write a coalescing Map without a timeout."
40
+ * A hung prefetch cannot block clicks or suppress hovers forever.
41
+ */
42
+ var PREFETCH_SINGLEFLIGHT_TIMEOUT_MS = 5e3;
43
+ /**
44
+ * Compose the map key. Length-prefixed rather than delimiter-joined for the
45
+ * same reason `shared/rsc-cache-key.ts` is: any delimiter is forgeable by a
46
+ * value containing it, and a URL may contain any character a delimiter could.
47
+ */
48
+ function prefetchMapKey(key) {
49
+ return `${key.from.length}:${key.from}:${key.scope.length}:${key.scope}:${key.url}`;
50
+ }
51
+ /**
52
+ * The `scope` half of a `PrefetchKey`, derived from the state tree that will
53
+ * actually be sent. Taking it from the header value rather than re-walking the
54
+ * cache is the point: the key varies by exactly what the request varies by.
55
+ */
56
+ function prefetchScopeOf(stateTree) {
57
+ return stateTree?.treePaths?.join("\0") ?? "";
58
+ }
59
+ /**
60
+ * Short-lived cache for hover-triggered prefetches. Entries expire after
61
+ * 30 seconds. When a link is clicked, the prefetched payload is consumed
62
+ * (moved to the history stack) and removed from this cache.
63
+ *
64
+ * In-flight dedup (TIM-1438): concurrent fetches for the same key are
65
+ * coalesced by a `createSingleflight` instance. A hover starts a flight;
66
+ * a click for the same key joins it instead of issuing a duplicate. The
67
+ * singleflight enforces a 5-second timeout and cleans up automatically
68
+ * on settlement.
69
+ *
70
+ * timber.js does NOT prefetch on viewport intersection — only explicit
71
+ * hover on <Link prefetch> triggers a prefetch.
72
+ */
73
+ var PrefetchCache = class PrefetchCache {
74
+ static TTL_MS = 3e4;
75
+ entries = /* @__PURE__ */ new Map();
76
+ flights = createSingleflight({ timeoutMs: PREFETCH_SINGLEFLIGHT_TIMEOUT_MS });
77
+ evictionGen = 0;
78
+ set(key, result) {
79
+ this.entries.set(prefetchMapKey(key), {
80
+ result,
81
+ expiresAt: Date.now() + PrefetchCache.TTL_MS
82
+ });
83
+ }
84
+ get(key) {
85
+ const mapKey = prefetchMapKey(key);
86
+ const entry = this.entries.get(mapKey);
87
+ if (!entry) return void 0;
88
+ if (Date.now() >= entry.expiresAt) {
89
+ this.entries.delete(mapKey);
90
+ return;
91
+ }
92
+ return entry.result;
93
+ }
94
+ /** True if a ready or negative entry exists for this key. */
95
+ has(key) {
96
+ return this.get(key) !== void 0;
97
+ }
98
+ /** Get and remove the entry (used when navigation consumes a prefetch) */
99
+ consume(key) {
100
+ const result = this.get(key);
101
+ if (result !== void 0) this.entries.delete(prefetchMapKey(key));
102
+ return result;
103
+ }
104
+ /**
105
+ * Fetch or coalesce with an in-flight fetch for this key (TIM-1438).
106
+ *
107
+ * Concurrent callers (hover + click, repeated hovers) get the same
108
+ * promise. On success the result is stored as a ready entry. On
109
+ * NonRscResponse a negative entry is stored and the outcome is
110
+ * `{ kind: 'non-route' }`. Other errors (network, version skew)
111
+ * reject — the singleflight cleans up the key and subsequent callers
112
+ * retry.
113
+ *
114
+ * The singleflight signal is passed to `doFetch` so a timed-out flight
115
+ * aborts the underlying fetch rather than leaving it running.
116
+ */
117
+ fetchOrCoalesce(key, doFetch, isNonRoute) {
118
+ const genAtStart = this.evictionGen;
119
+ return this.flights.do(prefetchMapKey(key), async (signal) => {
120
+ try {
121
+ const result = await doFetch(signal);
122
+ if (!signal.aborted && this.evictionGen === genAtStart) this.set(key, result);
123
+ return {
124
+ kind: "ready",
125
+ result,
126
+ startGen: genAtStart
127
+ };
128
+ } catch (err) {
129
+ if (isNonRoute(err)) {
130
+ if (!signal.aborted && this.evictionGen === genAtStart) this.setNegative(key);
131
+ return {
132
+ kind: "non-route",
133
+ startGen: genAtStart
134
+ };
135
+ }
136
+ throw err;
137
+ }
138
+ });
139
+ }
140
+ /**
141
+ * Join an in-flight singleflight fetch if one exists for this key.
142
+ * Returns the in-flight promise or undefined. Used by the click path to
143
+ * coalesce with a hover prefetch without starting a new flight — when no
144
+ * flight exists, the click issues its own fetch with the navigation's
145
+ * abort signal so superseded navigations abort immediately (TIM-1438).
146
+ */
147
+ joinInflight(key) {
148
+ return this.flights.get(prefetchMapKey(key));
149
+ }
150
+ /**
151
+ * Store a negative entry — the URL is not a route (non-RSC Content-Type).
152
+ *
153
+ * Keyed like every other entry even though "not a route" does not actually
154
+ * vary by departing URL: a source-independent negative would be a second
155
+ * keying rule to keep correct, and the only cost of the uniform one is a
156
+ * repeated fetch for a link hovered from a second page.
157
+ */
158
+ setNegative(key) {
159
+ this.set(key, NEGATIVE_ENTRY);
160
+ }
161
+ /** Check if the entry is a negative cache entry (URL is not a route). */
162
+ isNegative(key) {
163
+ return this.get(key) === NEGATIVE_ENTRY;
164
+ }
165
+ /**
166
+ * Evict all ready entries and fence in-flight singleflights (TIM-1476).
167
+ * Called after a server action that revalidated data — the mutation may
168
+ * affect any route, not just the paths the server named. In-flight
169
+ * singleflights are not aborted (they may carry post-mutation data),
170
+ * but their results are discarded if they complete after eviction:
171
+ * `fetchOrCoalesce` captures the generation before the flight and
172
+ * skips the store when it has been bumped.
173
+ *
174
+ * Consumers that join an in-flight flight via `joinInflight` must
175
+ * check `getEvictionGen()` before and after the await: if the gen
176
+ * changed, the result predates the eviction and must be discarded
177
+ * (codex on #1131 round 2).
178
+ */
179
+ clearReady() {
180
+ this.entries.clear();
181
+ this.evictionGen++;
182
+ }
183
+ getEvictionGen() {
184
+ return this.evictionGen;
185
+ }
186
+ };
8
187
  // src/client/history.ts
9
188
  /**
10
189
  * Session-lived history stack keyed by URL. Enables instant back/forward
@@ -301,8 +480,8 @@ function raceAbort(promise, signal) {
301
480
  * prefetch cache key — one function so a prefetch and the click that consumes
302
481
  * it can never disagree about what "where we came from" means (TIM-1265). The
303
482
  * query is dropped deliberately: it would land in the `_rsc` digest, which is
304
- * logged (TIM-1268), and nothing downstream reads it — slot-skip resolution
305
- * and interception scope both compare pathnames.
483
+ * logged (TIM-1268), and nothing downstream reads it — interception scope
484
+ * compares pathnames.
306
485
  *
307
486
  * Absolute inputs parse against the base and ignore it, so one call handles
308
487
  * both `location.href` and a bare pathname.
@@ -333,22 +512,6 @@ function prefetchKeyFor(url, departingUrl, stateTree) {
333
512
  };
334
513
  }
335
514
  /**
336
- * Build a segment updates map for partial navigation. Identifies the
337
- * first non-skipped segment and maps it to the payload content.
338
- */
339
- function buildSegmentUpdates(result, payload) {
340
- const skipped = new Set(result.skippedSegments);
341
- const segmentInfo = result.segmentInfo;
342
- const updates = /* @__PURE__ */ new Map();
343
- if (segmentInfo) {
344
- for (const info of segmentInfo) if (!skipped.has(info.segmentId ?? info.path)) {
345
- updates.set(info.segmentId ?? info.path, payload);
346
- break;
347
- }
348
- }
349
- return updates;
350
- }
351
- /**
352
515
  * Inspect a decode rejection for version skew before handing the promise on,
353
516
  * without changing what the consumer sees.
354
517
  *
@@ -362,7 +525,7 @@ function observeSkew(decodePromise) {
362
525
  decodePromise?.catch((error) => void recordSkew(error));
363
526
  return decodePromise;
364
527
  }
365
- function createNavigationPipeline({ deps, prefetchCache, currentStateTree, prepareNavigation, isSegmentReuseSuppressed, restoreSegmentReuse, markHandedOff, forgetOlderHandoffs }) {
528
+ function createNavigationPipeline({ deps, prefetchCache, currentStateTree, prepareNavigation, markHandedOff, forgetOlderHandoffs }) {
366
529
  /**
367
530
  * Hand a payload to React via navigateTransition. The perform callback should fetch data, prepare the commit, and return the
368
531
  * FetchResult plus the NavigationState and the commit thunk.
@@ -381,18 +544,7 @@ function createNavigationPipeline({ deps, prefetchCache, currentStateTree, prepa
381
544
  return deps.navigateTransition(url, owner, types, async (wrapPayload) => {
382
545
  const result = await perform();
383
546
  const params = await result.params;
384
- const payload = await result.payload;
385
- if (isPartialNavigation(result.skippedSegments)) {
386
- const segmentUpdates = buildSegmentUpdates(result, payload);
387
- const element = wrapPayload(deps._getCurrentPayload?.() ?? payload, result.navState, params, segmentUpdates);
388
- handOff();
389
- return {
390
- element,
391
- decodePromise: observeSkew(result.decodePromise),
392
- commit: commitAndForget(result.commit)
393
- };
394
- }
395
- const element = wrapPayload(payload, result.navState, params);
547
+ const element = wrapPayload(await result.payload, result.navState, params);
396
548
  handOff();
397
549
  return {
398
550
  element,
@@ -407,7 +559,6 @@ function createNavigationPipeline({ deps, prefetchCache, currentStateTree, prepa
407
559
  */
408
560
  async function performNavigationFetch(url, options) {
409
561
  const stateTree = currentStateTree();
410
- let reuseSuppressedAtFetch = isSegmentReuseSuppressed();
411
562
  const cacheKey = prefetchKeyFor(url, options.departingUrl ?? deps.getCurrentUrl(), stateTree);
412
563
  const currentUrl = cacheKey.from;
413
564
  if (prefetchCache.isNegative(cacheKey)) {
@@ -419,8 +570,7 @@ function createNavigationPipeline({ deps, prefetchCache, currentStateTree, prepa
419
570
  payload: prefetched.payload,
420
571
  params: prefetched.params ?? readPublishedParams(void 0),
421
572
  decodePromise: prefetched.decodePromise ?? null,
422
- segmentInfo: prefetched.segmentInfo ?? null,
423
- skippedSegments: prefetched.skippedSegments ?? null
573
+ segmentInfo: prefetched.segmentInfo ?? null
424
574
  } : void 0;
425
575
  if (result === void 0) {
426
576
  const inflight = prefetchCache.joinInflight(cacheKey);
@@ -435,8 +585,7 @@ function createNavigationPipeline({ deps, prefetchCache, currentStateTree, prepa
435
585
  payload: outcome.result.payload,
436
586
  params: outcome.result.params ?? readPublishedParams(void 0),
437
587
  decodePromise: outcome.result.decodePromise ?? null,
438
- segmentInfo: outcome.result.segmentInfo ?? null,
439
- skippedSegments: outcome.result.skippedSegments ?? null
588
+ segmentInfo: outcome.result.segmentInfo ?? null
440
589
  };
441
590
  }
442
591
  } catch (error) {
@@ -447,7 +596,6 @@ function createNavigationPipeline({ deps, prefetchCache, currentStateTree, prepa
447
596
  }
448
597
  }
449
598
  if (result === void 0) {
450
- reuseSuppressedAtFetch = isSegmentReuseSuppressed();
451
599
  const freshStateTree = currentStateTree();
452
600
  result = await fetchRscPayload(url, deps, freshStateTree, currentUrl, options.signal);
453
601
  }
@@ -466,10 +614,8 @@ function createNavigationPipeline({ deps, prefetchCache, currentStateTree, prepa
466
614
  const { navState, commit } = prepareNavigation(url, {
467
615
  payload: result.payload,
468
616
  params,
469
- segmentInfo: result.segmentInfo,
470
- skippedSegments: result.skippedSegments
617
+ segmentInfo: result.segmentInfo
471
618
  });
472
- if (reuseSuppressedAtFetch) restoreSegmentReuse();
473
619
  return {
474
620
  ...result,
475
621
  params,
@@ -495,10 +641,11 @@ function createRouter(deps) {
495
641
  const segmentCache = new SegmentCache();
496
642
  const prefetchCache = new PrefetchCache();
497
643
  const historyStack = new HistoryStack();
498
- const { prepareNavigation, currentStateTree, committedSegmentInfo, isSegmentReuseSuppressed, restoreSegmentReuse } = createNavigationCommitter({
644
+ const { prepareNavigation, currentStateTree, committedSegmentInfo } = createNavigationCommitter({
499
645
  segmentCache,
500
646
  historyStack,
501
- clientSegmentCache: () => deps.clientSegmentCache
647
+ clientSegmentCache: () => deps.clientSegmentCache,
648
+ outletHashes: () => deps.outletContentCache?.hashes() ?? {}
502
649
  });
503
650
  const lifecycle = createNavigationLifecycle();
504
651
  const { currentOwner, createNavOwner, runNavigation, markHandedOff, forgetOlderHandoffs, isPending, getPendingUrl, onPendingChange } = lifecycle;
@@ -507,8 +654,6 @@ function createRouter(deps) {
507
654
  prefetchCache,
508
655
  currentStateTree,
509
656
  prepareNavigation,
510
- isSegmentReuseSuppressed,
511
- restoreSegmentReuse,
512
657
  markHandedOff,
513
658
  forgetOlderHandoffs
514
659
  });
@@ -593,8 +738,7 @@ function createRouter(deps) {
593
738
  const { navState, commit } = prepareNavigation(url, {
594
739
  payload: result.payload,
595
740
  params,
596
- segmentInfo: result.segmentInfo,
597
- skippedSegments: result.skippedSegments
741
+ segmentInfo: result.segmentInfo
598
742
  });
599
743
  return {
600
744
  ...result,
@@ -641,8 +785,7 @@ function createRouter(deps) {
641
785
  navState,
642
786
  commit,
643
787
  decodePromise: null,
644
- segmentInfo: entry.segmentInfo ?? null,
645
- skippedSegments: null
788
+ segmentInfo: entry.segmentInfo ?? null
646
789
  };
647
790
  });
648
791
  restoreScrollAfterPaint(scrollY);
@@ -710,8 +853,7 @@ function createRouter(deps) {
710
853
  navState,
711
854
  commit,
712
855
  decodePromise: null,
713
- segmentInfo,
714
- skippedSegments: null
856
+ segmentInfo
715
857
  };
716
858
  });
717
859
  await render.catch(() => {});
@@ -721,9 +863,6 @@ function createRouter(deps) {
721
863
  onIdle: (listener) => lifecycle.onIdle(listener),
722
864
  onTreeCommit: (listener) => lifecycle.onTreeCommit(listener),
723
865
  settleHandoffs: () => lifecycle.settleHandoffs(),
724
- suppressSegmentReuse() {
725
- segmentCache.invalidateReuse();
726
- },
727
866
  evictStaleCaches() {
728
867
  prefetchCache.clearReady();
729
868
  historyStack.clear();