@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
@@ -15,12 +15,11 @@
15
15
  * design/41-global-params.md §"Transport".
16
16
  *
17
17
  * **The client owns the provider.** There is exactly one `ParamsProvider` in
18
- * the browser's tree, rendered by `PayloadRoot` above the point where a
19
- * partial navigation splices the new payload into the retained tree. It has to
20
- * be there and it has to be alone: a provider *inside* the payload lands below
21
- * the retained region, whose own root is the departing route's provider, so
22
- * every reader in a skipped layout resolves to the departing record and no
23
- * amount of wrapping above it helps (TIM-1297).
18
+ * the browser's tree, rendered by `PayloadRoot` above the payload root. It has
19
+ * to be there and it has to be alone: a segment the server skipped renders the
20
+ * content the client cached for it, which carries no provider of its own, so a
21
+ * provider *inside* the payload would never reach a reader in a skipped layout
22
+ * (TIM-1297, design/52-segment-hash-dedupe.md).
24
23
  *
25
24
  * Ordering still holds without a bootstrap contract, for the same reason it
26
25
  * did when the provider was in the tree: a provider renders before its own
@@ -48,11 +47,11 @@ interface ParamsProviderProps {
48
47
  * The client's root: publishes a payload's params over the tree being shown.
49
48
  *
50
49
  * Rendered at the same position in the wrapper chain on **every** render path
51
- * — hydration, full navigation, partial navigation, popstate replay, shallow
52
- * search sync, and revalidation from a server action. Being unconditional is
53
- * load-bearing twice over: an element type that appears on one render and not
54
- * the next remounts everything below it, destroying exactly the layout state a
55
- * partial navigation exists to preserve; and a reader in a skipped layout has
50
+ * — hydration, navigation, popstate replay, shallow search sync, and
51
+ * revalidation from a server action. Being unconditional is load-bearing twice
52
+ * over: an element type that appears on one render and not the next remounts
53
+ * everything below it, destroying exactly the layout state a skipped segment
54
+ * keeps; and a reader in a skipped layout has
56
55
  * to have *some* provider above it on every path or it falls back to the
57
56
  * module-level snapshot.
58
57
  *
@@ -1 +1 @@
1
- {"version":3,"file":"params-context.d.ts","sourceRoot":"","sources":["../../src/client/params-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAKjE,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAwCjD;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,GAAG,IAAI,CAE5D;AAID,UAAU,mBAAmB;IAC3B,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAqCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,uDAIhG"}
1
+ {"version":3,"file":"params-context.d.ts","sourceRoot":"","sources":["../../src/client/params-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAKjE,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAwCjD;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,GAAG,IAAI,CAE5D;AAID,UAAU,mBAAmB;IAC3B,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAqCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,uDAIhG"}
@@ -16,7 +16,7 @@ import type { FetchResult } from './rsc-fetch.ts';
16
16
  import type { PrefetchCache, PrefetchKey } from './segment-cache.ts';
17
17
  import type { StateTree } from '../shared/segment-info.ts';
18
18
  import type { NavigationState } from './navigation-context.ts';
19
- import { type NavigationCommitter } from './navigation-commit.ts';
19
+ import type { NavigationCommitter } from './navigation-commit.ts';
20
20
  import type { RouterDeps } from './router-types.ts';
21
21
  import type { NavigationHandle, RenderOwner } from './navigation-transition.ts';
22
22
  /** A fetched payload plus the state update that makes it the current page. */
@@ -31,7 +31,7 @@ export interface NavigationFetchOptions {
31
31
  signal?: AbortSignal;
32
32
  departingUrl?: string;
33
33
  }
34
- export interface NavigationPipelineDeps extends Pick<NavigationCommitter, 'prepareNavigation' | 'currentStateTree' | 'isSegmentReuseSuppressed' | 'restoreSegmentReuse'> {
34
+ export interface NavigationPipelineDeps extends Pick<NavigationCommitter, 'prepareNavigation' | 'currentStateTree'> {
35
35
  deps: RouterDeps;
36
36
  prefetchCache: PrefetchCache;
37
37
  /** Record that this navigation's tree reached React (router-lifecycle.ts). */
@@ -54,8 +54,8 @@ export interface NavigationPipeline {
54
54
  * prefetch cache key — one function so a prefetch and the click that consumes
55
55
  * it can never disagree about what "where we came from" means (TIM-1265). The
56
56
  * query is dropped deliberately: it would land in the `_rsc` digest, which is
57
- * logged (TIM-1268), and nothing downstream reads it — slot-skip resolution
58
- * and interception scope both compare pathnames.
57
+ * logged (TIM-1268), and nothing downstream reads it — interception scope
58
+ * compares pathnames.
59
59
  *
60
60
  * Absolute inputs parse against the base and ignore it, so one call handles
61
61
  * both `location.href` and a bare pathname.
@@ -77,5 +77,5 @@ export declare function departingPathname(raw: string): string;
77
77
  * request describe the same departure point.
78
78
  */
79
79
  export declare function prefetchKeyFor(url: string, departingUrl: string, stateTree: StateTree | undefined): PrefetchKey;
80
- export declare function createNavigationPipeline({ deps, prefetchCache, currentStateTree, prepareNavigation, isSegmentReuseSuppressed, restoreSegmentReuse, markHandedOff, forgetOlderHandoffs, }: NavigationPipelineDeps): NavigationPipeline;
80
+ export declare function createNavigationPipeline({ deps, prefetchCache, currentStateTree, prepareNavigation, markHandedOff, forgetOlderHandoffs, }: NavigationPipelineDeps): NavigationPipeline;
81
81
  //# sourceMappingURL=router-pipeline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"router-pipeline.d.ts","sourceRoot":"","sources":["../../src/client/router-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC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E,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAClD,mBAAmB,EACnB,mBAAmB,GAAG,kBAAkB,CACzC;IACC,IAAI,EAAE,UAAU,CAAC;IACjB,aAAa,EAAE,aAAa,CAAC;IAC7B,8EAA8E;IAC9E,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,oEAAoE;IACpE,mBAAmB,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CACnD;AAED,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,sBAAsB,EAAE,CACtB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,sBAAsB,KAC5B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAChC,mDAAmD;IACnD,mBAAmB,EAAE,CACnB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,WAAW;IAClB,sEAAsE;IACtE,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,KACtC,gBAAgB,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,SAAS,GAAG,SAAS,GAC/B,WAAW,CAEb;AAiBD,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,GACpB,EAAE,sBAAsB,GAAG,kBAAkB,CAoO7C"}
@@ -13,6 +13,7 @@ import type { ParamsSource } from '../shared/payload-root.ts';
13
13
  import type { SegmentInfo } from '../shared/segment-info.ts';
14
14
  import type { SegmentCache, PrefetchCache } from './segment-cache.ts';
15
15
  import type { TransitionResult, NavigationHandle, RenderOwner } from './navigation-transition.ts';
16
+ import type { OutletContentCache } from './outlet-content-cache.ts';
16
17
  import type { NavigationEpoch } from './router-lifecycle.ts';
17
18
  /**
18
19
  * The view transition type the router adds to a render it hands React —
@@ -111,25 +112,13 @@ export interface RouterDeps {
111
112
  navigateTransition: (pendingUrl: string, owner: RenderOwner,
112
113
  /** The view transition types this render adds; see `NavigationRender`. */
113
114
  types: readonly string[], perform: (wrapPayload: (payload: unknown, navState: NavigationState,
114
- /**
115
- * The params to publish over `payload`. On a partial navigation
116
- * `payload` is the *retained* tree and these are the *incoming*
117
- * route's — the two deliberately come from different payloads,
118
- * which is the entire point of the client owning the provider
119
- * (TIM-1297).
120
- */
121
- params: ParamsSource, segmentUpdates?: Map<string, unknown>) => unknown) => Promise<TransitionResult<unknown>>) => NavigationHandle;
115
+ /** The params to publish over `payload` (TIM-1297). */
116
+ params: ParamsSource) => unknown) => Promise<TransitionResult<unknown>>) => NavigationHandle;
122
117
  /**
123
118
  * Save scroll position via the Navigation API's per-entry state.
124
119
  * When provided, used instead of history.replaceState for scroll storage.
125
120
  */
126
121
  saveNavigationEntryScroll?: (scrollY: number) => void;
127
- /**
128
- * Get the current unwrapped RSC payload element. Used for partial
129
- * navigation: the router re-wraps the same element with new
130
- * NavigationProvider context so mounted SegmentOutlets are preserved.
131
- */
132
- _getCurrentPayload?: () => unknown;
133
122
  /**
134
123
  * Scroll the element matching a URL #fragment into view. Returns true
135
124
  * when a matching element was found and scrolled. When absent or false,
@@ -139,8 +128,8 @@ export interface RouterDeps {
139
128
  scrollToHash?: (hash: string) => boolean;
140
129
  /**
141
130
  * Whether the client segment cache is enabled. When false (the default),
142
- * the router sends no segment/slot lists, so every navigation gets a full
143
- * RSC payload.
131
+ * the router advertises no segment hashes, so the server sends every
132
+ * segment (design/52-segment-hash-dedupe.md).
144
133
  *
145
134
  * It does NOT gate the `treePaths` half of X-Timber-State-Tree. Those
146
135
  * describe the tree currently mounted, and interception scoping needs them
@@ -148,6 +137,11 @@ export interface RouterDeps {
148
137
  * optimization, so it must not depend on a performance opt-in (TIM-1282).
149
138
  */
150
139
  clientSegmentCache?: boolean;
140
+ /**
141
+ * The router's record of committed outlet content and its hashes — the
142
+ * source of the hashes the router advertises. Absent outside a browser.
143
+ */
144
+ outletContentCache?: OutletContentCache;
151
145
  }
152
146
  export interface RouterInstance {
153
147
  /**
@@ -235,14 +229,6 @@ export interface RouterInstance {
235
229
  * displaces a suspended transition (TIM-1480).
236
230
  */
237
231
  settleHandoffs(): void;
238
- /**
239
- * Make the next navigation a full render: the server re-renders every
240
- * segment instead of skipping the shared layouts the client reports as
241
- * mounted (TIM-1466). Called when `revalidatePath` named a page other
242
- * than the current one — a layout that page shares with this one may now
243
- * be stale, and the server cannot tell that from the state tree.
244
- */
245
- suppressSegmentReuse(): void;
246
232
  /**
247
233
  * Evict all prefetch cache entries and history stack payloads (TIM-1476).
248
234
  * Called after a server action that revalidated data — the mutation may
@@ -1 +1 @@
1
- {"version":3,"file":"router-types.d.ts","sourceRoot":"","sources":["../../src/client/router-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAClG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,wBAAwB,GAChC,oBAAoB,GACpB,i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AI,EAAE,UAAU,GAAG,cAAc,CA6gB7D"}
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/client/router.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAIV,UAAU,EACV,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAK3B;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,CA6f7D"}
@@ -38,8 +38,6 @@ export interface FetchResult {
38
38
  decodePromise: Promise<void> | null;
39
39
  /** Segment metadata from X-Timber-Segments header for populating the segment cache. */
40
40
  segmentInfo: SegmentInfo[] | null;
41
- /** Segment paths that were skipped by the server (for client-side merging). */
42
- skippedSegments: string[] | null;
43
41
  }
44
42
  /** Set the client deployment ID. Called once at bootstrap. */
45
43
  export declare function setClientDeploymentId(id: string | null): void;
@@ -89,20 +87,11 @@ export declare function buildRscHeaders(stateTree: StateTree | undefined, curren
89
87
  * Extract segment metadata from the X-Timber-Segments response header.
90
88
  * Returns null if the header is missing or malformed.
91
89
  *
92
- * Format: JSON array of {path, isRequestDependent} objects describing the rendered
93
- * segment chain from root to leaf. Used to populate the client-side
94
- * segment cache for state tree diffing on subsequent navigations.
90
+ * Format: JSON array of {path, segmentId?, treePath?} objects describing the
91
+ * mounted layout-bearing segments from root to leaf. The client reports the
92
+ * tree paths back for interception scoping (TIM-1282).
95
93
  */
96
94
  export declare function extractSegmentInfo(response: Response): SegmentInfo[] | null;
97
- /**
98
- * Extract skipped segment paths from the X-Timber-Skipped-Segments header.
99
- * Returns null if the header is missing or malformed.
100
- *
101
- * When the server skips sync layouts the client already has cached,
102
- * it sends this header listing the skipped segment paths (outermost first).
103
- * The client uses this to merge the partial payload with cached segments.
104
- */
105
- export declare function extractSkippedSegments(response: Response): string[] | null;
106
95
  /**
107
96
  * Thrown when an RSC payload response contains X-Timber-Redirect header.
108
97
  * Caught in navigate() to trigger a soft router navigation to the redirect target.
@@ -156,7 +145,5 @@ export declare class NonRscResponse extends Error {
156
145
  * into their error before `decodeRsc` sees the body. There is no second
157
146
  * path — tests decode real Flight bytes through the same code (TIM-1541).
158
147
  */
159
- export declare function fetchRscPayload(url: string, deps: RouterDeps, stateTree?: {
160
- segments: string[];
161
- }, currentUrl?: string, signal?: AbortSignal): Promise<FetchResult>;
148
+ export declare function fetchRscPayload(url: string, deps: RouterDeps, stateTree?: StateTree, currentUrl?: string, signal?: AbortSignal): Promise<FetchResult>;
162
149
  //# sourceMappingURL=rsc-fetch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rsc-fetch.d.ts","sourceRoot":"","sources":["../../src/client/rsc-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGnF,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIpD,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,uDAAuD;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;;;OAQG;IACH,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACnD;;;;;;OAMG;IACH,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACpC,uFAAuF;IACvF,WAAW,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAClC,+EAA+E;IAC/E,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAClC;AAiDD,8DAA8D;AAC9D,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAE7D;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,IAAI,CAErD;AAgBD,8DAA8D;AAC9D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BAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,YAAY,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAItC;CACF;AAED;;;;;;;;;GASG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,YAAY,GAAG,EAAE,MAAM,EAGtB;CACF;AAqDD;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,UAAU,EAChB,SAAS,CAAC,EAAE,SAAS,EACrB,UAAU,CAAC,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,WAAW,CAAC,CAoItB"}
@@ -18,115 +18,27 @@ export interface PrefetchResult {
18
18
  * about to render, and not the ones already on screen.
19
19
  */
20
20
  params?: PublishedParams | Promise<PublishedParams>;
21
- /** Segment paths skipped by the server (for client-side merging). */
22
- skippedSegments?: string[] | null;
23
21
  }
24
22
  /**
25
- * A node in the client-side segment tree. Each node represents a mounted
26
- * layout or page segment with its RSC flight payload.
27
- */
28
- export interface SegmentNode {
29
- /** The segment's URL pattern (e.g., "/", "/dashboard", "/projects/[id]") */
30
- segment: string;
31
- /**
32
- * The segment's `app/` directory path, groups included (e.g. `/(browse)/feed`).
33
- * Undefined for slot nodes and for servers that predate the field.
34
- */
35
- treePath?: string;
36
- /** The RSC flight payload for this segment (opaque to the cache) */
37
- payload: unknown;
38
- /**
39
- * Whether the segment/slot is request-dependent (calls getHeaders,
40
- * getSearchParams, cookies, etc.). Request-dependent segments always
41
- * re-render on navigation. For segments, this is still based on the
42
- * AsyncFunction heuristic (to be replaced separately). For slots,
43
- * this is taint-tracked via ALS.
44
- */
45
- isRequestDependent: boolean;
46
- /** Child segments keyed by segment path */
47
- children: Map<string, SegmentNode>;
48
- /** Parallel route slots keyed by slot path (e.g., "/@sidebar") */
49
- slots?: Map<string, SegmentNode>;
50
- /** Whether this slot's access.ts denied on its last render. */
51
- denied?: boolean;
52
- /**
53
- * Content key for slot nodes — opaque string the server computed from
54
- * owner parts, slot name, entry file, and slot params. Advertised back
55
- * to the server so it can decide skips by key membership (TIM-1370).
56
- */
57
- contentKey?: string;
58
- }
59
- /**
60
- * Maintains the client-side segment tree representing currently mounted
61
- * layouts and pages. Used for navigation reconciliation — the router diffs
62
- * new routes against this tree to determine which segments to re-fetch.
23
+ * The client's record of which layout-bearing segments are mounted — the
24
+ * `treePaths` half of `X-Timber-State-Tree`, which the server reads for
25
+ * interception scoping (TIM-1282).
26
+ *
27
+ * Content reuse is not decided here. The outlet content cache holds what the
28
+ * client can reuse, keyed by segment hash (client/outlet-content-cache.ts,
29
+ * design/52-segment-hash-dedupe.md).
30
+ *
31
+ * Written only by a navigation's commit (`navigation-commit.ts`), so a
32
+ * superseded navigation never describes the mounted tree (TIM-1301).
63
33
  */
64
34
  export declare class SegmentCache {
65
- private root;
66
- /**
67
- * Monotonic counter. Bumped by `invalidateReuse()` (TIM-1466).
68
- * `serializeStateTree` suppresses `segments` and `slots` when
69
- * `reuseInvalidatedAt > reuseRestoredAt`. Only `restoreReuse()`
70
- * advances `reuseRestoredAt` — `set()` does not, because a
71
- * pre-invalidation navigation's commit thunk would lift suppression
72
- * before a post-invalidation request has been sent (codex on #1167).
73
- */
74
- private reuseInvalidatedAt;
75
- private reuseRestoredAt;
76
- get(segment: string): SegmentNode | undefined;
77
- set(segment: string, node: SegmentNode): void;
35
+ private paths;
36
+ /** Replace the record with the chain a committed page mounted. */
37
+ record(segmentInfo: readonly SegmentInfo[]): void;
78
38
  clear(): void;
79
- /**
80
- * Suppress segment and slot reuse without destroying the tree
81
- * structure (TIM-1466). `serializeStateTree` sends empty
82
- * `segments`/`slots` (forcing a full render) while `treePaths`
83
- * still reflects the mounted tree for interception scoping.
84
- * Call `restoreReuse()` once post-invalidation data has been
85
- * fetched and committed.
86
- */
87
- invalidateReuse(): void;
88
- /**
89
- * Lift reuse suppression. Called after the segment cache has been
90
- * rebuilt from a response that was fetched with suppression active
91
- * (i.e. the server sent a full render). Safe to call idempotently.
92
- */
93
- restoreReuse(): void;
94
- /** Whether segment/slot reuse is currently suppressed (TIM-1466). */
95
- isReuseSuppressed(): boolean;
96
- /**
97
- * Serialize the mounted segment tree for the X-Timber-State-Tree header.
98
- * Only includes sync segments — async segments are excluded because the
99
- * server must always re-render them (they may depend on request context).
100
- *
101
- * When mergeableFilter is provided, only segments whose paths are in the
102
- * set are included. This ensures the server only skips segments that the
103
- * client can actually merge (i.e., segments whose cached element tree
104
- * contains an inner SegmentProvider the merger can splice into).
105
- *
106
- * `treePaths` is collected UNFILTERED, unlike `segments` and `slots`. Those
107
- * two answer "what may the server skip re-rendering?", so every reason a
108
- * segment cannot be reused is a reason to leave it out. `treePaths` answers
109
- * "what is mounted right now?" for interception scoping — a request-dependent
110
- * layout is still on screen, and dropping it would silently narrow the scope
111
- * the server sees and cancel a modal that should open (TIM-1282).
112
- *
113
- * This is a performance optimization only, NOT a security boundary.
114
- * The server always runs all access.ts files regardless of the state tree.
115
- */
116
- serializeStateTree(mergeableFilter?: Set<string>): StateTree;
39
+ /** The `app/` directory paths of the mounted segments, root first. */
40
+ treePaths(): string[];
117
41
  }
118
- /**
119
- * Build a SegmentNode tree from flat segment metadata.
120
- *
121
- * Takes an ordered list of segment descriptors (root → leaf) from the
122
- * server's X-Timber-Segments header and constructs the hierarchical
123
- * tree structure that SegmentCache expects.
124
- *
125
- * Each segment is nested as a child of the previous one, forming a
126
- * linear chain from root to leaf. The leaf segment (page) is excluded
127
- * from the tree — pages are never cached across navigations.
128
- */
129
- export declare function buildSegmentTree(segments: SegmentInfo[]): SegmentNode | undefined;
130
42
  /**
131
43
  * Identifies a prefetched payload. A payload is addressed by *every* input that
132
44
  * changes the server's answer, not by the destination alone.
@@ -1 +1 @@
1
- {"version":3,"file":"segment-cache.d.ts","s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C,GAAG,EAAE,WAAW,GAAG,OAAO,CAE7B;IAED,0EAA0E;IAC1E,OAAO,CAAC,GAAG,EAAE,WAAW,GAAG,cAAc,GAAG,SAAS,CAMpD;IAED;;;;;;;;;;;;OAYG;IACH,eAAe,CACb,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,cAAc,CAAC,EACzD,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,GACtC,OAAO,CAAC,aAAa,CAAC,CAqBxB;IAED;;;;;;OAMG;IACH,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,SAAS,CAEjE;IAED;;;;;;;OAOG;IACH,WAAW,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAElC;IAED,yEAAyE;IACzE,UAAU,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAEpC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,IAAI,IAAI,CAGjB;IAED,cAAc,IAAI,MAAM,CAEvB;CACF"}
@@ -1,68 +1,44 @@
1
1
  /**
2
- * SegmentOutlet — client component boundary at each layout segment.
2
+ * SegmentOutlet — the client boundary around one segment: a layout's own
3
+ * chrome, a layout's `children`, a parallel slot, or the page's metadata.
3
4
  *
4
- * Each layout in the segment tree is wrapped with a SegmentOutlet that:
5
- * 1. Knows its segment path (prop from the server)
6
- * 2. Reads from SegmentUpdateContext for partial navigation updates
7
- * 3. Reads from — and, at commit, writes to — the router's slot content
8
- * cache, so a skipped parallel slot keeps showing what it last committed
5
+ * The server decides each outlet (server/segment-hash/outlet.ts):
9
6
  *
10
- * On full navigation: receives new children via props and renders them.
11
- * On partial navigation (this segment skipped): the context map has no entry
12
- * for this path, so the outlet renders its children — which, because the
13
- * router re-wraps the *retained* tree, are the same elements as before,
14
- * preserving layout state.
15
- * On partial navigation (this segment updated): the context map has content
16
- * for this path, so the outlet renders the update.
17
- * On a skipped parallel slot (`skip=true`, children null): the outlet renders
18
- * the content it last committed for this path.
7
+ * - **Live** — the outlet renders the content it was sent, and once React
8
+ * commits it, records it in the router's outlet content cache beside the
9
+ * hash the server computed from the rows that carried it.
10
+ * - **Skip** — the client already holds content with this hash. The outlet
11
+ * renders the cached copy, and provides the nested outlets' new decisions
12
+ * to the outlet elements inside that copy (client/outlet-scope-context.ts),
13
+ * so each renders its segment's new decision in place.
19
14
  *
20
- * Uses React context instead of useSyncExternalStore to stay compatible
21
- * with concurrent rendering (transitions). All outlets re-render when the
22
- * context value changes, but each bails out quickly if its segment has
23
- * no update — same approach as Next.js LayoutRouter.
15
+ * Every navigation renders the payload root, and every outlet in it is live
16
+ * or skipped on its own. There is no partial payload spliced into a retained
17
+ * tree: an unchanged segment keeps its state because it renders the same
18
+ * elements at the same position.
24
19
  *
25
- * Render is a pure read. The only write — recording committed slot content —
26
- * happens in a layout effect, so a render React throws away (a superseded
27
- * transition, a Suspense retry) cannot poison what a later `skip=true`
28
- * resolves to (TIM-1423). See client/slot-content-cache-context.ts.
20
+ * Render is a pure read. The only write — recording committed content —
21
+ * happens in a layout effect, so a render React throws away cannot poison
22
+ * what a later skip resolves to (TIM-1423).
29
23
  *
30
- * Security: performance optimization only. The server always runs all
31
- * access.ts files regardless of segment skipping.
32
- * See design/13-security.md §"State tree manipulation".
24
+ * Security: performance only. The server runs every access.ts regardless, and
25
+ * a skip whose hash the client does not hold leaves the SPA rather than show
26
+ * other content. See design/13-security.md §"State tree manipulation".
33
27
  */
34
28
  import { type ReactNode } from 'react';
29
+ import type { CaptureHole, OutletDecisionValue } from '../shared/outlet-decision.ts';
35
30
  export interface SegmentOutletProps {
36
31
  /**
37
- * Unique identifier for this segment. For normal segments this is the
38
- * urlPath (e.g., "/", "/dashboard"). For route groups this includes the
39
- * group name (e.g., "/(marketing)") to distinguish siblings that share
40
- * the same urlPath. For slots this includes the slot name (e.g., "/@sidebar").
41
- * Must match the segmentId used in state-tree-diff.ts.
32
+ * The outlet's key: a segment id (`/`, `/(marketing)`), a slot key
33
+ * (`/@sidebar`), a layout's children (`/dashboard/@children`), or the
34
+ * metadata outlet.
42
35
  */
43
36
  segmentPath: string;
44
- /** The segment's React subtree (layout + inner content). */
45
- children: ReactNode;
46
37
  /**
47
- * When true, the outlet renders the content it last committed for this
48
- * path instead of `children`. Used for skipped parallel route slots — the
49
- * server sends an empty SegmentOutlet with skip=true, and the client keeps
50
- * the previously committed slot content.
38
+ * What the server decided for this segment. Absent only on the bare holes
39
+ * a capture render emits, which never reach the client.
51
40
  */
52
- skip?: boolean;
41
+ decision?: OutletDecisionValue | CaptureHole;
53
42
  }
54
- /**
55
- * Client component boundary at each layout segment in the element tree.
56
- *
57
- * Resolution order, all reads:
58
- * 1. An update in SegmentUpdateContext for this path → render it.
59
- * 2. `skip` → render the committed content for this path (null if none —
60
- * a fresh outlet with nothing committed yet renders empty and is fully
61
- * rendered on the next navigation).
62
- * 3. Otherwise → render `children`.
63
- *
64
- * Whatever a non-skip render resolves to is recorded once React commits it.
65
- * A skip render records nothing: it displayed the cache, it did not add to it.
66
- */
67
- export declare function SegmentOutlet({ segmentPath, children, skip }: SegmentOutletProps): ReactNode;
43
+ export declare function SegmentOutlet({ segmentPath, decision }: SegmentOutletProps): ReactNode;
68
44
  //# sourceMappingURL=segment-outlet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"segment-outlet.d.ts","sourceRoot":"","sources":["../../src/client/segment-outlet.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAIH,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpE,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,kBAAkB,aAoBhF"}
1
+ {"version":3,"file":"segment-outlet.d.ts","sourceRoot":"","sources":["../../src/client/segment-outlet.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,EAA4D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjG,OAAO,KAAK,EACV,WAAW,EAEX,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAKtC,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,mBAAmB,GAAG,WAAW,CAAC;CAC9C;AAUD,wBAAgB,aAAa,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,kBAAkB,GAAG,SAAS,CAyCtF"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The error a `SegmentOutlet` throws when it cannot render what the server
3
+ * decided — a skip whose content the client no longer holds under that hash,
4
+ * or an outlet inside a skipped segment that received no new decision.
5
+ *
6
+ * Either means the client's record moved on between the request and the
7
+ * response (a prefetch consumed late, a replayed payload whose content was
8
+ * evicted). Rendering anything else would show content the server did not
9
+ * produce, so the error passes every boundary to the terminal, which fetches
10
+ * the page again (`recoverFromStaleSegment`) — and leaves the SPA only if
11
+ * that misses too (design/52 §"The client checks before reusing").
12
+ */
13
+ export interface StaleSegmentDigest {
14
+ type: 'stale-segment';
15
+ leaveSpa: true;
16
+ }
17
+ export declare function staleSegmentError(segmentPath: string): Error;
18
+ /** The router surface recovery needs. */
19
+ interface RecoveryRouter {
20
+ getPendingUrl(): string | null;
21
+ navigate(url: string, options?: {
22
+ replace?: boolean;
23
+ scroll?: boolean;
24
+ }): PromiseLike<unknown>;
25
+ refresh(): PromiseLike<unknown>;
26
+ }
27
+ /**
28
+ * Answer a stale segment by fetching the page again inside the SPA. The new
29
+ * request advertises only what the client holds now, so every skip it gets
30
+ * names content that is there. A navigation still in flight is re-requested;
31
+ * otherwise the page on the address bar — a traversal has already moved it —
32
+ * is refreshed, which sends no hashes at all.
33
+ *
34
+ * Returns false when the caller should leave the SPA instead: there is no
35
+ * router, or this miss happened while recovering from the last one.
36
+ */
37
+ export declare function recoverFromStaleSegment(router: RecoveryRouter | null): boolean;
38
+ export {};
39
+ //# sourceMappingURL=stale-segment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stale-segment.d.ts","sourceRoot":"","sources":["../../src/client/stale-segment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,IAAI,CAAC;CAChB;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK,CAK5D;AAED,yCAAyC;AACzC,UAAU,cAAc;IACtB,aAAa,IAAI,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/F,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC;AAKD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,GAAG,OAAO,CAc9E"}
@@ -17,7 +17,7 @@
17
17
  * One unconditional read of ParamsContext, on every side (TIM-1425):
18
18
  *
19
19
  * - In the browser, `PayloadRoot` publishes the payload's params above the
20
- * merge point on every render path. Params update atomically with the RSC
20
+ * payload root on every render path. Params update atomically with the RSC
21
21
  * tree — no timing gap (TIM-1294, TIM-1297).
22
22
  * - During SSR, the wrapper chain mounts the same `PayloadRoot`, fed the
23
23
  * `params` half of `splitPayloadRoot(root)` — the identical derivation
@@ -326,19 +326,20 @@ export interface TimberUserConfig {
326
326
  */
327
327
  buildDir?: string;
328
328
  /**
329
- * Enable the client-side segment cache for partial navigation.
329
+ * Skip unchanged segments on client navigation (segment hash dedupe).
330
330
  *
331
- * When enabled, the router serializes the mounted segment tree into an
332
- * `X-Timber-State-Tree` header on every client navigation. The server
333
- * skips re-rendering unchanged sync layouts and sends a partial RSC
334
- * payload. The client merges the partial payload with its cached segments.
331
+ * When enabled, every live segment the server sends carries a hash of its
332
+ * output, and the router advertises the hashes of the content it holds in
333
+ * `X-Timber-State-Tree`. The server still renders every segment; one whose
334
+ * output hashes the same as the client's copy is sent as a skip, and the
335
+ * client keeps its copy. Every segment renders once either way.
335
336
  *
336
337
  * When disabled (the default), every navigation gets a full RSC payload.
337
338
  *
338
339
  * This is a performance optimization only — not a security boundary.
339
340
  * The server always runs all `access.ts` files regardless.
340
341
  *
341
- * See design/19-client-navigation.md §"X-Timber-State-Tree Header"
342
+ * See design/52-segment-hash-dedupe.md
342
343
  */
343
344
  clientSegmentCache?: boolean;
344
345
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"config-types.d.ts","sourceRoot":"","sources":["../src/config-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uDAAuD;AACvD,MAAM,WAAW,sBAAsB;IACrC,yEAAyE;IACzE,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC7B;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,sBAAsB,CAAC;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,IAAI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;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAEvE;AAmHD,wBAAgB,MAAM,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,YAAY,EAAE,CAqXhE;eAEc,MAAM"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,MAAM,CAAC;AA+CjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAa1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAQ1D,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAElG;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,MAAM;CAAG;AAE1B;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAEvE;AAmHD,wBAAgB,MAAM,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,YAAY,EAAE,CAoXhE;eAEc,MAAM"}