@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
@@ -17,10 +17,11 @@ import type { RscPayloadRoot } from '../shared/payload-root.ts';
17
17
  * Build the payload root: the tree, and the params it rendered with beside it.
18
18
  *
19
19
  * The params are a *sibling* of the tree, not a provider around it. A provider
20
- * inside the payload is shadowed by the retained tree's own provider on a
21
- * partial navigation, and its props are not readable at the instant the root
22
- * row resolves — see `shared/payload-root.ts` for both, and TIM-1297. The
23
- * client renders the one provider readers see, above the merge point.
20
+ * inside the payload would not reach a segment the server skipped — the
21
+ * client renders its cached copy, which carries no such provider — and its
22
+ * props are not readable at the instant the root row resolves — see
23
+ * `shared/payload-root.ts` for both, and TIM-1297. The client renders the one
24
+ * provider readers see, above the payload root.
24
25
  *
25
26
  * The records are flattened to plain objects on the way out. Every param
26
27
  * record the framework builds is `Object.create(null)` (design/13-security.md
@@ -1 +1 @@
1
- {"version":3,"file":"publish-params.d.ts","sourceRoot":"","sources":["../../src/server/publish-params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,GAAG,cAAc,CAM/E"}
1
+ {"version":3,"file":"publish-params.d.ts","sourceRoot":"","sources":["../../src/server/publish-params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,GAAG,cAAc,CAM/E"}
@@ -17,10 +17,9 @@
17
17
  import type { RouteMatch } from './pipeline.ts';
18
18
  import type { ManifestSegmentNode } from './route-matcher.ts';
19
19
  import type { DenyPageEntry } from './deny-boundary.ts';
20
- import { type SlotSkipEntry } from './slot-resolver.ts';
21
20
  import type { RscPayloadRoot } from '../shared/payload-root.ts';
22
21
  import type { InterceptionContext } from './pipeline.ts';
23
- import type { ClientStateTree } from './state-tree-diff.ts';
22
+ import { type SegmentHashRender } from './segment-hash/outlet.ts';
24
23
  /**
25
24
  * The `segments` array handed to a layout's `SegmentProvider` — the value
26
25
  * `useSelectedLayoutSegment(s)` reads.
@@ -28,9 +27,8 @@ import type { ClientStateTree } from './state-tree-diff.ts';
28
27
  * Only its **length** matters: both hooks take `segments.length` as a depth and
29
28
  * index the live pathname with it. So this is really "how many URL parts had
30
29
  * been consumed by the time this layout rendered", which is
31
- * `consumedUrlParts` — the same derivation slot matching and the slot-skip
32
- * slicing use, so a layout and the slots beside it cannot disagree about how
33
- * deep they are. The root consumes nothing → `['']`, length 1.
30
+ * `consumedUrlParts` — the same derivation slot matching uses, so a layout
31
+ * and the slots beside it cannot disagree about how deep they are. The root consumes nothing → `['']`, length 1.
34
32
  *
35
33
  * @internal — exported for tests; production has exactly one caller.
36
34
  */
@@ -61,19 +59,6 @@ export interface RouteElementResult {
61
59
  segments: ManifestSegmentNode[];
62
60
  /** Max deferSuspenseFor hold window across all segments. */
63
61
  deferSuspenseFor: number;
64
- /**
65
- * Segment paths that were skipped because the client already has them cached.
66
- * Ordered outermost to innermost. Empty when no segments were skipped.
67
- * The client uses this to merge the partial payload with cached segments.
68
- * See design/19-client-navigation.md §"X-Timber-State-Tree Header"
69
- */
70
- skippedSegments: string[];
71
- /**
72
- * Slot metadata for the X-Timber-Segments header. Contains info about
73
- * all parallel route slots encountered during element tree construction,
74
- * enabling the client to populate its segment cache with slot entries.
75
- */
76
- slotSkipInfo: SlotSkipEntry[];
77
62
  /**
78
63
  * The deny page chain built from the leaf segment outward to root.
79
64
  * Threaded into `renderRscStream` for late addressing of nested-component
@@ -96,5 +81,5 @@ export interface RouteElementResult {
96
81
  * segments, the pre-computed verdict is replayed — no re-execution,
97
82
  * no metadata side effects, no head leak (TIM-1027).
98
83
  */
99
- export declare function buildRouteElement(req: Request, match: RouteMatch, interception?: InterceptionContext, clientStateTree?: ClientStateTree | null, metadataRouteHashes?: Record<string, string>): Promise<RouteElementResult>;
84
+ export declare function buildRouteElement(req: Request, match: RouteMatch, interception: InterceptionContext | undefined, render: SegmentHashRender, metadataRouteHashes?: Record<string, string>): Promise<RouteElementResult>;
100
85
  //# sourceMappingURL=route-element-builder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"route-element-builder.d.ts","sourceRoot":"","sources":["../../src/server/route-element-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAQ9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAU5D;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,UAAU,GAChB,MAAM,EAAE,CAGV;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAID,+CAA+C;AAC/C,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC3C,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,OAAO,EAAE,cAAc,CAAC;IACxB,wDAAwD;IACxD,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;IACzC,qCAAqC;IACrC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,4DAA4D;IAC5D,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,YAAY,EAAE,aAAa,EAAE,CAAC;IAC9B;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,EAAE,CAAC;CACjC;AA4DD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,UAAU,EACjB,YAAY,CAAC,EAAE,mBAAmB,EAClC,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,EACxC,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3C,OAAO,CAAC,kBAAkB,CAAC,CAmb7B"}
1
+ {"version":3,"file":"route-element-builder.d.ts","sourceRoot":"","sources":["../../src/server/route-element-builder.ts"],"names":[],"mappings":"AAAA;;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BAAiB,EACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3C,OAAO,CAAC,kBAAkB,CAAC,CAyU7B"}
@@ -5,24 +5,18 @@
5
5
  */
6
6
  import type { ManifestSegmentNode } from '../route-matcher.ts';
7
7
  import type { SegmentInfo } from '../../shared/segment-info.ts';
8
- import type { SlotSkipEntry } from '../slot-resolver.ts';
9
8
  /**
10
- * Build segment metadata for the X-Timber-Segments response header.
11
- * Describes the rendered segment chain with request-dependency status,
12
- * enabling the client to populate its segment cache for state tree diffing.
9
+ * Describe the mounted segment chain for `X-Timber-Segments` and the
10
+ * `self.__timber_segments` bootstrap: every layout-bearing segment above the
11
+ * first one that denied. The client reports these back as `treePaths` for
12
+ * interception scoping (design/07-routing.md §"Intercepting Routes").
13
13
  *
14
- * Request-dependency is determined by static module-graph analysis: the
15
- * Vite plugin walks each segment's import graph and marks it as
16
- * request-dependent if any reachable module calls a request accessor.
17
- * This replaces the previous runtime ALS-based taint tracking which
18
- * couldn't attribute accessor calls in Flight-deferred child components.
19
- *
20
- * See design/07-routing.md §"Server Diffing Rules".
14
+ * Nothing here is about caching — what the client may reuse is decided by
15
+ * segment hashes in the payload itself (design/52-segment-hash-dedupe.md).
21
16
  */
22
17
  export declare function buildSegmentInfo(segments: ManifestSegmentNode[], layoutComponents: Array<{
23
- component: (...args: unknown[]) => unknown;
24
18
  segment: ManifestSegmentNode;
25
- }>, slotSkipInfo?: SlotSkipEntry[], skippedSegmentKeys?: string[], firstDeniedIndex?: number): SegmentInfo[];
19
+ }>, firstDeniedIndex?: number): SegmentInfo[];
26
20
  export { isAbortError } from '../render-utils.ts';
27
21
  export { escapeHtml } from '../utils/escape-html.ts';
28
22
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,KAAK,CAAC;IACtB,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC3C,OAAO,EAAE,mBAAmB,CAAC;CAC9B,CAAC,EACF,YAAY,CAAC,EAAE,aAAa,EAAE,EAC9B,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAC7B,gBAAgB,SAAW,GAC1B,WAAW,EAAE,CAsEf;AAKD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,KAAK,CAAC;IAAE,OAAO,EAAE,mBAAmB,CAAA;CAAE,CAAC,EACzD,gBAAgB,SAAW,GAC1B,WAAW,EAAE,CA4Bf;AAKD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"render-route.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/render-route.ts"],"names":[],"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,UAAU,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;AAElF,wDAAwD;AACxD,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,YAAY,CAAC;IACzB,mBAAmB,EAAE,qBAAqB,CAAC;IAC3C,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,sBAAsB,GAC3B,CAAC,GAAG,EAAE,OAAO,KAAK,kBAAkB,CAiLtC"}
@@ -20,7 +20,6 @@
20
20
  */
21
21
  import type { LayoutComponentEntry } from '../route-element-builder.ts';
22
22
  import type { ManifestSegmentNode } from '../route-matcher.ts';
23
- import type { SlotSkipEntry } from '../slot-resolver.ts';
24
23
  import type { RenderSignals } from './render-signals.ts';
25
24
  import { type FlightSource } from '../flight-source.ts';
26
25
  /**
@@ -48,5 +47,5 @@ import { type FlightSource } from '../flight-source.ts';
48
47
  * the payload path pretend to a status contract it could not keep for
49
48
  * nested components, and was removed in TIM-1495.
50
49
  */
51
- export declare function buildRscPayloadResponse(rscStream: FlightSource, signals: RenderSignals, segments: ManifestSegmentNode[], layoutComponents: LayoutComponentEntry[], responseHeaders: Headers, skippedSegments?: string[], slotSkipInfo?: SlotSkipEntry[]): Promise<Response>;
50
+ export declare function buildRscPayloadResponse(rscStream: FlightSource, signals: RenderSignals, segments: ManifestSegmentNode[], layoutComponents: LayoutComponentEntry[], responseHeaders: Headers): Promise<Response>;
52
51
  //# sourceMappingURL=rsc-payload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rsc-payload.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/rsc-payload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAW7B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,oBAAoB,EAAE,EACxC,eAAe,EAAE,OAAO,EACxB,eAAe,CAAC,EAAE,MAAM,EAAE,EAC1B,YAAY,CAAC,EAAE,aAAa,EAAE,GAC7B,OAAO,CAAC,QAAQ,CAAC,CAyLnB"}
1
+ {"version":3,"file":"rsc-payload.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/rsc-payload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAQ/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAW7B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,oBAAoB,EAAE,EACxC,eAAe,EAAE,OAAO,GACvB,OAAO,CAAC,QAAQ,CAAC,CAgKnB"}
@@ -9,13 +9,15 @@
9
9
  * Design docs: 02-rendering-pipeline.md §"Single-Pass Rendering",
10
10
  * 13-security.md §"Errors don't leak"
11
11
  */
12
- import type { FlightSource } from '../flight-source.ts';
12
+ import type { FlightSource, FlightTap } from '../flight-source.ts';
13
13
  import type { RscPayloadRoot } from '../../shared/payload-root.ts';
14
14
  import { type DenyPageEntry } from '../deny-boundary.ts';
15
15
  import { type RenderSignals } from './render-signals.ts';
16
16
  export interface RscStreamResult {
17
17
  rscStream: FlightSource;
18
18
  signals: RenderSignals;
19
+ /** The render's error handler — segment-hash captures report through it. */
20
+ onError: (error: unknown) => string | void;
19
21
  }
20
22
  /**
21
23
  * Render a payload root (tree plus its params) to a Flight source.
@@ -32,5 +34,12 @@ export interface RscStreamResult {
32
34
  * `renderTimeoutMs` passes with it still running (design/02 §"Always Wire
33
35
  * abort() to Both Request Signal AND Timeout").
34
36
  */
35
- export declare function renderRscStream(payload: RscPayloadRoot, req: Request, renderTimeoutMs: number, leafDenyChain?: DenyPageEntry[]): RscStreamResult;
37
+ export declare function renderRscStream(payload: RscPayloadRoot, req: Request, renderTimeoutMs: number, leafDenyChain?: DenyPageEntry[], tap?: FlightTap,
38
+ /**
39
+ * Digests a segment-hash capture already produced through this handler. A
40
+ * capture's error row decoded into the live content reaches this render
41
+ * again as an error carrying that digest: pass it through, it has been
42
+ * reported and signalled once already.
43
+ */
44
+ relayedDigests?: ReadonlySet<string>): RscStreamResult;
36
45
  //# sourceMappingURL=rsc-stream.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rsc-stream.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/rsc-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAKnE,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQ3E,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAG/E,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,aAAa,CAAC;CACxB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,cAAc,EACvB,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,MAAM,EACvB,aAAa,CAAC,EAAE,aAAa,EAAE,GAC9B,eAAe,CA6GjB"}
1
+ {"version":3,"file":"rsc-stream.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/rsc-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAKnE,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQ3E,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAG/E,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,aAAa,CAAC;IACvB,4EAA4E;IAC5E,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,CAAC;CAC5C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,cAAc,EACvB,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,MAAM,EACvB,aAAa,CAAC,EAAE,aAAa,EAAE,EAC/B,GAAG,CAAC,EAAE,SAAS;AACf;;;;;GAKG;AACH,cAAc,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACnC,eAAe,CAyHjB"}
@@ -15,7 +15,6 @@ import type { ClientBootstrapConfig } from '../html-injectors.ts';
15
15
  import type { RouteMatch } from '../pipeline.ts';
16
16
  import type { LayoutComponentEntry } from '../route-element-builder.ts';
17
17
  import type { ManifestSegmentNode } from '../route-matcher.ts';
18
- import type { SlotSkipEntry } from '../slot-resolver.ts';
19
18
  import { type GlobalErrorFile } from './error-renderer.ts';
20
19
  import type { RenderSignals } from './render-signals.ts';
21
20
  import { type FlightSource } from '../flight-source.ts';
@@ -60,7 +59,6 @@ interface SsrRenderOptions {
60
59
  deferSuspenseFor: number;
61
60
  /** Tier 2 global-error.tsx file, if present in app/. */
62
61
  globalError?: GlobalErrorFile;
63
- slotSkipInfo?: SlotSkipEntry[];
64
62
  /**
65
63
  * The Flight bytes of the no-JS action's form state this page answers
66
64
  * (`encodeFormState`); absent on every other render. Fizz and hydrateRoot
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-renderer.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/ssr-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAMlE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOzD,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAuC,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA2B7F;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAiB,CAAC;AAEhF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iCAAiC,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAqB,CAAC;AAEtF,UAAU,gBAAgB;IACxB,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAA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AE,KAAK,EAAE,OAAO,CAAA;CAAqB,CAAC;AAEtF,UAAU,gBAAgB;IACxB,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;IACzC,KAAK,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,qBAAqB,CAAC;IACvC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA6QjF"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * The capture: a segment rendered on its own Flight stream, inside the current
3
+ * request — the segment's one and only render.
4
+ *
5
+ * The outlet gate captures a segment when the client advertised a hash for it.
6
+ * The capture is decoded as it streams by React's own Flight client in the
7
+ * RSC environment, and the decoded value graph is hashed (value-hash.ts):
8
+ *
9
+ * - its hash equals the client's → a skip, and the decoded tree is dropped;
10
+ * - it differs → the decoded tree is emitted as the segment's live content.
11
+ * Nothing is rendered a second time: server components already ran, and the
12
+ * main render only serializes what they produced.
13
+ *
14
+ * A capture that reaches a Suspense boundary or a promise prop still pending
15
+ * is not waited on (the shell rule is not built): its decoded tree is emitted
16
+ * live at once and the pending content streams when it would have anyway.
17
+ *
18
+ * Nested outlets are holes. Each renders as a `SegmentOutlet` whose decision is
19
+ * an opaque marker, written as a Flight temporary reference. Decoding
20
+ * replaces it with a lazy decision for the nested segment, made only if the
21
+ * decoded tree is sent — a skip decides the nested segments itself.
22
+ *
23
+ * Because the capture is the render, it writes request state (metadata
24
+ * entries, deny status) directly, and reports errors through the main
25
+ * render's error handler. An error decoded into the live content keeps its
26
+ * digest: the main render passes it through rather than reporting it again.
27
+ *
28
+ * See design/52-segment-hash-dedupe.md §"Capture".
29
+ */
30
+ import { type ReactNode } from 'react';
31
+ import type { CaptureHole, OutletDecisionValue } from '../../shared/outlet-decision.ts';
32
+ /**
33
+ * Inside a capture render, the marker a nested outlet renders with in place of
34
+ * its decision; undefined outside one.
35
+ */
36
+ export declare function captureHoleMarker(segmentPath: string): CaptureHole | undefined;
37
+ export interface CaptureOptions {
38
+ /** The segment captured — its `useId()` prefix derives from it. */
39
+ segmentPath: string;
40
+ /** Upper bound on the whole capture stream. */
41
+ timeoutMs: number;
42
+ /** The request's signal — a disconnect abandons the capture. */
43
+ signal?: AbortSignal;
44
+ /** Subscribes to the main render's end — a capture never outlives it. */
45
+ onRenderEnd?: (cancel: () => void) => () => void;
46
+ /** The main render's error handler: its digests, signals and reports. */
47
+ onError?: (error: unknown) => string | void;
48
+ /** Whether a decoded element type is timber's `SegmentOutlet`. */
49
+ isOutlet: (type: unknown) => boolean;
50
+ /** The decision for a nested outlet, made only if the capture is sent live. */
51
+ decideHole: (segmentPath: string) => OutletDecisionValue | undefined;
52
+ }
53
+ /** What a capture found, as soon as it can say. */
54
+ export type SegmentCapture =
55
+ /** Everything the segment reaches settled: its hash is known. */
56
+ {
57
+ kind: 'complete';
58
+ hash: string;
59
+ /**
60
+ * The nested outlets that rendered as holes. One missing here was not
61
+ * rendered — an access gate above it denied — and a skip must not decide
62
+ * it: deciding renders its content.
63
+ */
64
+ holes: ReadonlySet<string>;
65
+ /** The decoded content, to send if the segment is not skipped. */
66
+ content: ReactNode;
67
+ /** The segment is skipped: stop reading the capture. */
68
+ discard(): void;
69
+ }
70
+ /** Not waited for — still streaming, or not hashable. Send it live. */
71
+ | {
72
+ kind: 'live';
73
+ content: ReactNode;
74
+ };
75
+ /** Render `content` as a capture. Settles once its hash is known or not waited for. */
76
+ export declare function captureSegment(content: ReactNode, options: CaptureOptions): Promise<SegmentCapture>;
77
+ //# sourceMappingURL=capture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../src/server/segment-hash/capture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtD,OAAO,KAAK,EACV,WAAW,EAEX,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAGzC;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAE9E;AAOD,MAAM,WAAW,cAAc;IAC7B,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,yEAAyE;IACzE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IACjD,yEAAyE;IACzE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,CAAC;IAC5C,kEAAkE;IAClE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IACrC,+EAA+E;IAC/E,UAAU,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,mBAAmB,GAAG,SAAS,CAAC;CACtE;AAED,mDAAmD;AACnD,MAAM,MAAM,cAAc;AACxB,iEAAiE;AAC/D;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,kEAAkE;IAClE,OAAO,EAAE,SAAS,CAAC;IACnB,wDAAwD;IACxD,OAAO,IAAI,IAAI,CAAC;CACjB;AACH,uEAAuE;GACrE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC;AAsBzC,uFAAuF;AACvF,wBAAsB,cAAc,CAClC,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,cAAc,CAAC,CAkHzB"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * The outlet gate: renders one segment as a `SegmentOutlet` whose decision is
3
+ * either its live content or a skip.
4
+ *
5
+ * Every segment renders on every navigation; access runs for every one. What
6
+ * hash dedupe saves is bytes: when the client advertised a hash for a segment,
7
+ * the gate captures the segment (capture.ts), and if the capture's hash
8
+ * equals the client's, the segment is sent as a skip — the client keeps the
9
+ * content it holds. Otherwise the live content is sent with a hash the client
10
+ * stores beside it (stream-tap.ts). Nothing is predicted: a skip happens only
11
+ * when a render the server just ran produced exactly what the client holds.
12
+ *
13
+ * A skip carries the decisions of the segments nested directly inside it —
14
+ * only those the capture rendered as holes. Their access gates ran in the
15
+ * capture; a nested gate that denied rendered its deny page instead of the
16
+ * hole, so its segment is never decided, never rendered, never sent.
17
+ *
18
+ * See design/52-segment-hash-dedupe.md §"Mechanism".
19
+ */
20
+ import { type ReactElement, type ReactNode } from 'react';
21
+ import type { SegmentHashTap } from './stream-tap.ts';
22
+ /** One outlet in the element tree, and the outlets directly inside it. */
23
+ export interface OutletSpec {
24
+ segmentPath: string;
25
+ content: ReactNode;
26
+ nested: OutletSpec[];
27
+ }
28
+ /** Per-request inputs to every gate in one render. */
29
+ export interface SegmentHashRender {
30
+ /** The hashes the client advertised (`X-Timber-State-Tree`), by path. */
31
+ clientHashes: ReadonlyMap<string, string> | null;
32
+ /** Hashes the outgoing stream; null when `clientSegmentCache` is off. */
33
+ tap: SegmentHashTap | null;
34
+ /**
35
+ * Bounds each capture's stream. A capture also ends with the main render
36
+ * (`tap.onEnd`), which usually comes first.
37
+ */
38
+ captureTimeoutMs: number;
39
+ /**
40
+ * The main render's error handler. A capture is a segment's render, so its
41
+ * errors are the render's: reported, digested and signalled once, there.
42
+ */
43
+ onCaptureError?: (error: unknown) => string | void;
44
+ signal?: AbortSignal;
45
+ }
46
+ /** A render with dedupe off: every segment live, no hashes. */
47
+ export declare const NO_SEGMENT_HASHING: SegmentHashRender;
48
+ /**
49
+ * Whether a decoded element type is timber's `SegmentOutlet` client
50
+ * reference. Matched by reference id — module and export — so an app
51
+ * component that happened to be exported as `SegmentOutlet` is not read as a
52
+ * hole, which would keep changes inside it out of its segment's hash.
53
+ */
54
+ export declare function isOutletType(type: unknown): boolean;
55
+ /**
56
+ * The element for an outlet: a server component that decides when it renders
57
+ * — after every access gate above it — and inside a capture renders a bare
58
+ * hole, since the nested segment's content belongs to its own hash.
59
+ *
60
+ * A closure with no props rather than a component taking `{ spec, render }`:
61
+ * dev Flight serializes a server component's props as debug info, and these
62
+ * would repeat the whole subtree in every dev payload.
63
+ */
64
+ export declare function outletGate(spec: OutletSpec, render: SegmentHashRender): ReactElement;
65
+ //# sourceMappingURL=outlet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outlet.d.ts","sourceRoot":"","sources":["../../../src/server/segment-hash/outlet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,sDAAsD;AACtD,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACjD,yEAAyE;IACzE,GAAG,EAAE,cAAc,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,CAAC;IACnD,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,EAAE,iBAIhC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CASnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,iBAAiB,GAAG,YAAY,CAYpF"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The advertised hash: each live segment's hash, computed from what the main
3
+ * Flight stream actually sent.
4
+ *
5
+ * A live `SegmentOutlet` carries `decision.hash` as a promise. The tap feeds
6
+ * the outgoing stream to React's own Flight client in the RSC environment,
7
+ * finds each live outlet in the decoded tree, and once everything the
8
+ * decision's `children` reach has settled, resolves that promise with the
9
+ * hash of those decoded values (value-hash.ts). Flight then writes the hash
10
+ * as one more row. The client stores it beside the content it committed, so
11
+ * the hash it later advertises describes exactly what it received
12
+ * (design/52 §"Two hashes, two jobs").
13
+ *
14
+ * Nothing about this can stall the response: a hash the tap cannot compute
15
+ * resolves to null once the decoded payload has been explored without
16
+ * finding its outlet, or when the stream ends, and every pending hash
17
+ * resolves to null once `timeoutMs` passes — a pending promise would otherwise hold the
18
+ * Flight stream open.
19
+ *
20
+ * See design/52-segment-hash-dedupe.md §"Wire format".
21
+ */
22
+ export interface SegmentHashTap {
23
+ /**
24
+ * The hash of live segment `segmentPath`'s content in this stream, once it
25
+ * has all arrived. Null when it cannot be computed.
26
+ */
27
+ advertise(segmentPath: string): Promise<string | null>;
28
+ /** Feed one chunk of the outgoing stream. */
29
+ observe(chunk: Uint8Array): void;
30
+ /** The stream ended or was cancelled: give up on everything pending. */
31
+ end(): void;
32
+ /**
33
+ * Run `cancel` once the stream ends, however it ends; returns the
34
+ * unsubscribe. Captures started for this render stop with it (capture.ts) —
35
+ * nothing waits on them any more. A callback list rather than an
36
+ * AbortSignal: aborting a signal from the stream's teardown kept every
37
+ * finished request reachable in dev (tests/e2e/dev-request-retention.test.ts).
38
+ */
39
+ onEnd(cancel: () => void): () => void;
40
+ }
41
+ export interface SegmentHashTapOptions {
42
+ timeoutMs: number;
43
+ /** Whether a decoded element type is timber's `SegmentOutlet`. */
44
+ isOutlet: (type: unknown) => boolean;
45
+ /** React's Flight client in the RSC environment. */
46
+ decode: (stream: ReadableStream<Uint8Array>) => PromiseLike<unknown>;
47
+ }
48
+ export declare function createSegmentHashTap(options: SegmentHashTapOptions): SegmentHashTap;
49
+ //# sourceMappingURL=stream-tap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream-tap.d.ts","sourceRoot":"","sources":["../../../src/server/segment-hash/stream-tap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvD,6CAA6C;IAC7C,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACjC,wEAAwE;IACxE,GAAG,IAAI,IAAI,CAAC;IACZ;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IACrC,oDAAoD;IACpD,MAAM,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,CAAC;CACtE;AAsBD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,cAAc,CA2KnF"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * The hash of a segment: a canonical walk over the values React's own Flight
3
+ * client decoded — never over the wire format.
4
+ *
5
+ * Both sides of the comparison are decoded by React (`createFromReadableStream`
6
+ * in the RSC environment): the capture of a segment, and the segment's rows in
7
+ * the response the client received. So everything about how Flight encodes a
8
+ * value — which markers mean references, how objects are outlined or deduped,
9
+ * which rows carry debug info — is interpreted by the code that defines it,
10
+ * and a React upgrade that changes the encoding changes nothing here.
11
+ *
12
+ * What is hashed is what a client can observe:
13
+ *
14
+ * - **Identity.** Every object is a node, numbered on first visit; a later
15
+ * visit writes `alias(n)`. Objects are the decoded objects themselves, so
16
+ * sharing, cycles and promise identity are exactly what the client gets —
17
+ * and a shared subgraph is written once.
18
+ * - **An allowlist of value kinds**: primitives, plain objects (own keys, in
19
+ * order), arrays, React elements, client and server references, promises,
20
+ * lazy elements, Dates, Maps, Sets, binary data and errors. Anything else —
21
+ * a stream, an async iterator, a class instance — makes the segment
22
+ * unhashable, which means it is always sent: a value kind this code does
23
+ * not know costs bytes, never correctness.
24
+ * - **Holes.** A nested `SegmentOutlet` element is `hole(segmentPath, key)`;
25
+ * its decision — and the nested segment's content — is not visited.
26
+ *
27
+ * The hash is SHA-256, truncated to 132 bits (22 base64url characters).
28
+ *
29
+ * See design/52-segment-hash-dedupe.md §"The hash is over a canonical form".
30
+ */
31
+ export declare const SEGMENT_HASH_LENGTH = 22;
32
+ export type ValueHashOutcome =
33
+ /** Every value the subgraph reaches is settled. */
34
+ {
35
+ status: 'complete';
36
+ hash: string;
37
+ streaming: boolean;
38
+ }
39
+ /** Some promises or lazy elements are still pending; wait for them. */
40
+ | {
41
+ status: 'pending';
42
+ streaming: boolean;
43
+ waitFor: PromiseLike<unknown>[];
44
+ }
45
+ /** A value of a kind not on the allowlist, or over budget: always sent. */
46
+ | {
47
+ status: 'unhashable';
48
+ };
49
+ export interface ValueHashOptions {
50
+ /** Whether an element type is timber's `SegmentOutlet` client reference. */
51
+ isOutlet(type: unknown): boolean;
52
+ }
53
+ export declare function hashCanonical(canonical: string): string;
54
+ /**
55
+ * In dev, @vitejs/plugin-rsc appends `$$cache=<random>` to every reference
56
+ * id, freshly per render, so the browser re-imports a module after HMR. Two
57
+ * renders of the same tree name the same module with different ids; the tag
58
+ * is not part of what the module is.
59
+ */
60
+ export declare function stripReferenceCacheTag(id: string): string;
61
+ /** Hash the value graph rooted at `root`. */
62
+ export declare function hashValue(root: unknown, options: ValueHashOptions): ValueHashOutcome;
63
+ /**
64
+ * Hash `root` once everything it reaches has settled, waiting as needed.
65
+ * Settles to null if it is unhashable or `signal` aborts first.
66
+ */
67
+ export declare function hashSettledValue(root: unknown, options: ValueHashOptions, signal: {
68
+ aborted: boolean;
69
+ }): Promise<string | null>;
70
+ //# sourceMappingURL=value-hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-hash.d.ts","sourceRoot":"","sources":["../../../src/server/segment-hash/value-hash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAIH,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,MAAM,MAAM,gBAAgB;AAC1B,mDAAmD;AACjD;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE;AAC1D,uEAAuE;GACrE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAA;CAAE;AAC5E,2EAA2E;GACzE;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,CAAC;AAE7B,MAAM,WAAW,gBAAgB;IAC/B,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;CAClC;AA0BD,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEzD;AAcD,6CAA6C;AAC7C,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAqNpF;AAQD;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAC3B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CASxB"}
@@ -17,7 +17,7 @@
17
17
  */
18
18
  import type { InterceptionContext, RouteMatch } from './pipeline.ts';
19
19
  import type { ManifestSegmentNode } from './route-matcher.ts';
20
- import { type ClientStateTree } from './state-tree-diff.ts';
20
+ import { type OutletSpec, type SegmentHashRender } from './segment-hash/outlet.ts';
21
21
  type CreateElementFn = (...args: unknown[]) => React.ReactElement;
22
22
  /**
23
23
  * Resolve the element for a parallel slot.
@@ -70,71 +70,8 @@ export interface SlotMatchResult {
70
70
  * handing `@sidebar` a shorter URL than it matches against. It would render
71
71
  * its `default.tsx` where a page exists.
72
72
  *
73
- * The index must also agree with `slotUrlParts`, which slices the destination
74
- * pathname at the same point and already used `indexOf(owner)`. Two derivations
75
- * of one index is how they came apart; this is the shared one.
76
- *
77
73
  */
78
74
  export declare function findSlotOwnerIndex(slotNode: ManifestSegmentNode, segments: ManifestSegmentNode[]): number;
79
- export interface SlotSkipEntry {
80
- slotKey: string;
81
- parentSegmentId: string;
82
- /**
83
- * Whether the slot's components called request accessors (getHeaders,
84
- * getSearchParams, cookies) during their last render. Replaces the
85
- * unreliable AsyncFunction heuristic — taint-tracked via ALS.
86
- */
87
- isRequestDependent: boolean;
88
- /** Whether the slot's access.ts denied on this render. */
89
- denied: boolean;
90
- /** Whether the slot was skipped (content not rendered, client keeps cached). */
91
- skipped?: boolean;
92
- /**
93
- * Content key encoding owner parts + slot name + entry file + slot params.
94
- * Sent to the client via X-Timber-Segments; the client advertises it back
95
- * so the server can decide skips by key membership (TIM-1370).
96
- */
97
- contentKey: string;
98
- }
99
- /**
100
- * The destination URL parts a segment's slots match against.
101
- *
102
- * A slot walks its own sub-tree starting where its owning segment stopped
103
- * consuming the URL, so the parts are sliced at the length its ancestors
104
- * consumed. Shared by `resolveSlotProps` and `publishSlotSegmentParams` — both
105
- * have to slice identically or the two would disagree about which page a slot
106
- * matched, and only one of them would be right.
107
- *
108
- * @internal
109
- */
110
- export declare function slotUrlParts(segment: ManifestSegmentNode, match: RouteMatch, url: string): string[];
111
- /**
112
- * Seed per-slot segment params for a segment whose layout is being SKIPPED.
113
- *
114
- * `resolveSlotProps` seeds these as part of resolving slot props, but a skipped
115
- * layout never gets there — `route-element-builder` continues past it. Its
116
- * slots are still mounted on the client, though, so leaving them out of the
117
- * published map made `useSegmentParams(slotPath)` fall back to the main route's
118
- * record after any navigation that skipped their parent (TIM-1285).
119
- *
120
- * Only the params are seeded. Nothing renders, no access chain runs — a skipped
121
- * layout's slots are unchanged by definition, which is what made it skippable.
122
- *
123
- * @internal
124
- */
125
- export declare function publishSlotSegmentParams(segment: ManifestSegmentNode, match: RouteMatch, destinationUrl: string, parentTreePath: string | undefined): void;
126
- /**
127
- * Emit slot metadata for a layout whose rendering was SKIPPED.
128
- *
129
- * Skipped layouts never reach `resolveSlotProps`, but the client rebuilds
130
- * its segment tree from each navigation's X-Timber-Segments response. If
131
- * skipped slots are absent, the client loses their contentKeys and can't
132
- * advertise them on the next navigation — breaking key-based slot skipping.
133
- *
134
- * This computes contentKey and isRequestDependent for each slot without
135
- * rendering anything, using the same derivation as `resolveSlotProps`.
136
- */
137
- export declare function emitSlotInfoForSkippedLayout(segment: ManifestSegmentNode, segmentId: string, match: RouteMatch, destinationUrl: string, slotSkipInfo: SlotSkipEntry[]): void;
138
75
  interface ResolveSlotPropsArgs {
139
76
  segment: ManifestSegmentNode;
140
77
  segmentId: string;
@@ -142,24 +79,22 @@ interface ResolveSlotPropsArgs {
142
79
  h: CreateElementFn;
143
80
  interception?: InterceptionContext;
144
81
  parentTreePath: string;
145
- /** The request being rendered. Its URL is the slot-matching destination. */
82
+ /** The request being rendered. */
146
83
  req: Request;
147
- clientStateTree: ClientStateTree | null;
148
- slotSkipInfo: SlotSkipEntry[];
84
+ render: SegmentHashRender;
85
+ }
86
+ /** A layout's slot props, and the outlet of each slot. */
87
+ export interface ResolvedSlots {
88
+ props: Record<string, unknown>;
89
+ outlets: OutletSpec[];
149
90
  }
150
91
  /**
151
- * Resolve all parallel route slots for a layout, wrapping each in a
152
- * SegmentOutlet for client-side caching. Slots whose content key matches
153
- * one the client advertised are rendered with `skip=true` so the client
154
- * keeps its cached content.
92
+ * Resolve all parallel route slots for a layout, each in its own outlet.
155
93
  *
156
- * The skip decision is key-based (TIM-1370): the server computes a content
157
- * key per slot from the owning segment's URL parts, the slot name, the
158
- * matched entry file, and the slot's own params. The client advertises
159
- * the keys it has cached; the server checks membership. This replaces
160
- * the previous approach of reconstructing the client's state from a
161
- * departing URL.
94
+ * Every slot is resolved and every slot's access chain runs, on every render.
95
+ * Whether a slot's bytes are sent is decided by its outlet's hash, the same
96
+ * as any other segment (design/52-segment-hash-dedupe.md).
162
97
  */
163
- export declare function resolveSlotProps({ segment, segmentId, match, h, interception, parentTreePath, req, clientStateTree, slotSkipInfo, }: ResolveSlotPropsArgs): Promise<Record<string, unknown>>;
98
+ export declare function resolveSlotProps({ segment, segmentId, match, h, interception, parentTreePath, req, render, }: ResolveSlotPropsArgs): Promise<ResolvedSlots>;
164
99
  export {};
165
100
  //# sourceMappingURL=slot-resolver.d.ts.map