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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/dist/_chunks/{actions-Top9GftB.js → actions-DIgnvDrG.js} +4 -4
  2. package/dist/_chunks/{actions-Top9GftB.js.map → actions-DIgnvDrG.js.map} +1 -1
  3. package/dist/_chunks/{als-registry-DpygwCp0.js → als-registry-PPYstxK0.js} +2 -1
  4. package/dist/_chunks/{als-registry-DpygwCp0.js.map → als-registry-PPYstxK0.js.map} +1 -1
  5. package/dist/_chunks/{cache-api-Bo8c7XVF.js → cache-api-uWQwuxWb.js} +5 -5
  6. package/dist/_chunks/{cache-api-Bo8c7XVF.js.map → cache-api-uWQwuxWb.js.map} +1 -1
  7. package/dist/_chunks/{chains-DMoHX4yH.js → chains-C7CExrUI.js} +2 -2
  8. package/dist/_chunks/{chains-DMoHX4yH.js.map → chains-C7CExrUI.js.map} +1 -1
  9. package/dist/_chunks/chains-CSslTUdI.js +1 -0
  10. package/dist/_chunks/{classify-BwyAd-dZ.js → classify-Cj9EeZoL.js} +2 -2
  11. package/dist/_chunks/{classify-BwyAd-dZ.js.map → classify-Cj9EeZoL.js.map} +1 -1
  12. package/dist/_chunks/{cli-check-DQAD9MLo.js → cli-check-C3QOAru7.js} +3 -3
  13. package/dist/_chunks/{cli-check-DQAD9MLo.js.map → cli-check-C3QOAru7.js.map} +1 -1
  14. package/dist/_chunks/{cli-schema-sync-C_xNLqBj.js → cli-schema-sync-BRxZz66D.js} +1 -1
  15. package/dist/_chunks/{cli-schema-sync-CmGls3dc.js → cli-schema-sync-DQUS_o3V.js} +2 -2
  16. package/dist/_chunks/{cli-schema-sync-CmGls3dc.js.map → cli-schema-sync-DQUS_o3V.js.map} +1 -1
  17. package/dist/_chunks/{client-dep-entries-C5BTQtFS.js → client-dep-entries-ZETBdLgv.js} +2 -2
  18. package/dist/_chunks/{client-dep-entries-C5BTQtFS.js.map → client-dep-entries-ZETBdLgv.js.map} +1 -1
  19. package/dist/_chunks/{convention-lint-GQA6WTRo.js → convention-lint-BoVISNS6.js} +3 -3
  20. package/dist/_chunks/{convention-lint-GQA6WTRo.js.map → convention-lint-BoVISNS6.js.map} +1 -1
  21. package/dist/_chunks/dev-server-B8roKA3Q.js +1 -0
  22. package/dist/_chunks/{dev-server-Cr3_Fu5A.js → dev-server-C5R6jx8Q.js} +2 -2
  23. package/dist/_chunks/{dev-server-Cr3_Fu5A.js.map → dev-server-C5R6jx8Q.js.map} +1 -1
  24. package/dist/_chunks/{dev-span-RsVeYYc_.js → dev-span-0aG7Q_Ph.js} +3 -7
  25. package/dist/_chunks/dev-span-0aG7Q_Ph.js.map +1 -0
  26. package/dist/_chunks/{error-boundary-Bh-egWUI.js → error-boundary-DB51f9ih.js} +98 -419
  27. package/dist/_chunks/error-boundary-DB51f9ih.js.map +1 -0
  28. package/dist/_chunks/{flight-source-node-BsrlUjMO.js → flight-source-node-D9cHBhjP.js} +7 -4
  29. package/dist/_chunks/flight-source-node-D9cHBhjP.js.map +1 -0
  30. package/dist/_chunks/{json-lossy-check-D47R9Fp5.js → json-lossy-check-Y1GxqVX_.js} +2 -2
  31. package/dist/_chunks/{json-lossy-check-D47R9Fp5.js.map → json-lossy-check-Y1GxqVX_.js.map} +1 -1
  32. package/dist/_chunks/{live-graph-HcLScfiV.js → live-graph-BDQWvnMm.js} +4 -4
  33. package/dist/_chunks/{live-graph-HcLScfiV.js.map → live-graph-BDQWvnMm.js.map} +1 -1
  34. package/dist/_chunks/{logger-DDLtp5e-.js → logger-DmRR9tmZ.js} +2 -2
  35. package/dist/_chunks/{logger-DDLtp5e-.js.map → logger-DmRR9tmZ.js.map} +1 -1
  36. package/dist/_chunks/metadata-routes-MXNjWOt5.js.map +1 -1
  37. package/dist/_chunks/{node-response-omewa8e6.js → node-response-yp8zdyRp.js} +2 -2
  38. package/dist/_chunks/{node-response-omewa8e6.js.map → node-response-yp8zdyRp.js.map} +1 -1
  39. package/dist/_chunks/plugin-context-BtaQcMuh.js.map +1 -1
  40. package/dist/_chunks/{poison-scan-DONdiCGX.js → poison-scan-WQgUydF_.js} +2 -2
  41. package/dist/_chunks/{poison-scan-DONdiCGX.js.map → poison-scan-WQgUydF_.js.map} +1 -1
  42. package/dist/_chunks/{scanner-DSAJjH0x.js → scanner-C9Lrf77z.js} +3 -2
  43. package/dist/_chunks/{scanner-DSAJjH0x.js.map → scanner-C9Lrf77z.js.map} +1 -1
  44. package/dist/_chunks/{sizeof-DVhEVN_y.js → sizeof-BISkSaU0.js} +2 -2
  45. package/dist/_chunks/{sizeof-DVhEVN_y.js.map → sizeof-BISkSaU0.js.map} +1 -1
  46. package/dist/_chunks/{walkers-96YopJds.js → walkers-Bxv4v7tX.js} +3 -3
  47. package/dist/_chunks/{walkers-96YopJds.js.map → walkers-Bxv4v7tX.js.map} +1 -1
  48. package/dist/adapters/cloudflare-kv-cache.js +1 -1
  49. package/dist/analyze/crawl-entry.js +3 -3
  50. package/dist/analyze/graph-command.js +2 -2
  51. package/dist/cache/index.js +2 -2
  52. package/dist/cache/stores/memory.js +1 -1
  53. package/dist/cdn/workers-cache-purge.js +1 -1
  54. package/dist/cli.js +3 -3
  55. package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -1
  56. package/dist/client/browser-entry/hydrate.d.ts +1 -1
  57. package/dist/client/browser-entry/router-init.d.ts.map +1 -1
  58. package/dist/client/error-boundary.d.ts +1 -0
  59. package/dist/client/error-boundary.d.ts.map +1 -1
  60. package/dist/client/error-boundary.js +1 -1
  61. package/dist/client/history.d.ts +4 -5
  62. package/dist/client/history.d.ts.map +1 -1
  63. package/dist/client/index.js +6 -7
  64. package/dist/client/index.js.map +1 -1
  65. package/dist/client/internal.d.ts +1 -1
  66. package/dist/client/internal.d.ts.map +1 -1
  67. package/dist/client/internal.js +194 -55
  68. package/dist/client/internal.js.map +1 -1
  69. package/dist/client/navigation-commit.d.ts +6 -25
  70. package/dist/client/navigation-commit.d.ts.map +1 -1
  71. package/dist/client/outlet-content-cache.d.ts +59 -0
  72. package/dist/client/outlet-content-cache.d.ts.map +1 -0
  73. package/dist/client/outlet-scope-context.d.ts +30 -0
  74. package/dist/client/outlet-scope-context.d.ts.map +1 -0
  75. package/dist/client/params-context.d.ts +10 -11
  76. package/dist/client/params-context.d.ts.map +1 -1
  77. package/dist/client/router-pipeline.d.ts +5 -5
  78. package/dist/client/router-pipeline.d.ts.map +1 -1
  79. package/dist/client/router-types.d.ts +10 -24
  80. package/dist/client/router-types.d.ts.map +1 -1
  81. package/dist/client/router.d.ts.map +1 -1
  82. package/dist/client/rsc-fetch.d.ts +4 -17
  83. package/dist/client/rsc-fetch.d.ts.map +1 -1
  84. package/dist/client/segment-cache.d.ts +15 -103
  85. package/dist/client/segment-cache.d.ts.map +1 -1
  86. package/dist/client/segment-outlet.d.ts +28 -52
  87. package/dist/client/segment-outlet.d.ts.map +1 -1
  88. package/dist/client/stale-segment.d.ts +39 -0
  89. package/dist/client/stale-segment.d.ts.map +1 -0
  90. package/dist/client/use-segment-params.d.ts +1 -1
  91. package/dist/config-types.d.ts +7 -6
  92. package/dist/config-types.d.ts.map +1 -1
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +9 -732
  95. package/dist/index.js.map +1 -1
  96. package/dist/native/rsc/manifest.json +6 -4
  97. package/dist/native/rsc/routing/segment-keys.js +3 -11
  98. package/dist/native/rsc/routing/segment-keys.js.map +1 -1
  99. package/dist/native/rsc/server/access-gate.js +3 -7
  100. package/dist/native/rsc/server/access-gate.js.map +1 -1
  101. package/dist/native/rsc/server/als-registry.js +2 -1
  102. package/dist/native/rsc/server/als-registry.js.map +1 -1
  103. package/dist/native/rsc/server/build-manifest.js.map +1 -1
  104. package/dist/native/rsc/server/chain-url-parts.js +1 -6
  105. package/dist/native/rsc/server/chain-url-parts.js.map +1 -1
  106. package/dist/native/rsc/server/client-state-tree.js +33 -0
  107. package/dist/native/rsc/server/client-state-tree.js.map +1 -0
  108. package/dist/native/rsc/server/flight-source-node.js +5 -2
  109. package/dist/native/rsc/server/flight-source-node.js.map +1 -1
  110. package/dist/native/rsc/server/flight-source.js +46 -7
  111. package/dist/native/rsc/server/flight-source.js.map +1 -1
  112. package/dist/native/rsc/server/pipeline-interception.js +1 -1
  113. package/dist/native/rsc/server/publish-params.js.map +1 -1
  114. package/dist/native/rsc/server/route-element-builder.js +43 -61
  115. package/dist/native/rsc/server/route-element-builder.js.map +1 -1
  116. package/dist/native/rsc/server/rsc-entry/helpers.js +5 -28
  117. package/dist/native/rsc/server/rsc-entry/helpers.js.map +1 -1
  118. package/dist/native/rsc/server/rsc-entry/render-route.js +33 -7
  119. package/dist/native/rsc/server/rsc-entry/render-route.js.map +1 -1
  120. package/dist/native/rsc/server/rsc-entry/revalidate-renderer.js +2 -1
  121. package/dist/native/rsc/server/rsc-entry/revalidate-renderer.js.map +1 -1
  122. package/dist/native/rsc/server/rsc-entry/rsc-payload.js +2 -5
  123. package/dist/native/rsc/server/rsc-entry/rsc-payload.js.map +1 -1
  124. package/dist/native/rsc/server/rsc-entry/rsc-stream.js +44 -40
  125. package/dist/native/rsc/server/rsc-entry/rsc-stream.js.map +1 -1
  126. package/dist/native/rsc/server/rsc-entry/ssr-renderer.js +1 -1
  127. package/dist/native/rsc/server/rsc-entry/ssr-renderer.js.map +1 -1
  128. package/dist/native/rsc/server/segment-hash/capture.js +107 -0
  129. package/dist/native/rsc/server/segment-hash/capture.js.map +1 -0
  130. package/dist/native/rsc/server/segment-hash/outlet.js +81 -0
  131. package/dist/native/rsc/server/segment-hash/outlet.js.map +1 -0
  132. package/dist/native/rsc/server/segment-hash/stream-tap.js +139 -0
  133. package/dist/native/rsc/server/segment-hash/stream-tap.js.map +1 -0
  134. package/dist/native/rsc/server/segment-hash/value-hash.js +171 -0
  135. package/dist/native/rsc/server/segment-hash/value-hash.js.map +1 -0
  136. package/dist/native/rsc/server/slot-resolver.js +20 -124
  137. package/dist/native/rsc/server/slot-resolver.js.map +1 -1
  138. package/dist/native/rsc/server/vite-handoff-rsc.js.map +1 -1
  139. package/dist/native/rsc/shared/outlet-decision.js +5 -0
  140. package/dist/native/rsc/shared/outlet-decision.js.map +1 -0
  141. package/dist/native/ssr/client/error-boundary.js +16 -3
  142. package/dist/native/ssr/client/error-boundary.js.map +1 -1
  143. package/dist/native/ssr/client/navigation-commit.js +1 -5
  144. package/dist/native/ssr/client/navigation-commit.js.map +1 -1
  145. package/dist/native/ssr/client/outlet-content-cache.js +53 -0
  146. package/dist/native/ssr/client/outlet-content-cache.js.map +1 -0
  147. package/dist/native/ssr/client/outlet-scope-context.js +12 -0
  148. package/dist/native/ssr/client/outlet-scope-context.js.map +1 -0
  149. package/dist/native/ssr/client/params-context.js.map +1 -1
  150. package/dist/native/ssr/client/rsc-fetch.js +1 -12
  151. package/dist/native/ssr/client/rsc-fetch.js.map +1 -1
  152. package/dist/native/ssr/client/segment-outlet.js +34 -13
  153. package/dist/native/ssr/client/segment-outlet.js.map +1 -1
  154. package/dist/native/ssr/client/stale-segment.js +29 -0
  155. package/dist/native/ssr/client/stale-segment.js.map +1 -0
  156. package/dist/native/ssr/manifest.json +5 -4
  157. package/dist/native/ssr/routing/segment-keys.js +5 -1
  158. package/dist/native/ssr/routing/segment-keys.js.map +1 -1
  159. package/dist/native/ssr/server/access-gate.js +3 -7
  160. package/dist/native/ssr/server/access-gate.js.map +1 -1
  161. package/dist/native/ssr/server/als-registry.js +1 -0
  162. package/dist/native/ssr/server/als-registry.js.map +1 -1
  163. package/dist/native/ssr/server/build-manifest.js.map +1 -1
  164. package/dist/native/ssr/server/client-state-tree.js +33 -0
  165. package/dist/native/ssr/server/client-state-tree.js.map +1 -0
  166. package/dist/native/ssr/server/flight-source-node.js +5 -2
  167. package/dist/native/ssr/server/flight-source-node.js.map +1 -1
  168. package/dist/native/ssr/server/flight-source.js +1 -0
  169. package/dist/native/ssr/server/flight-source.js.map +1 -1
  170. package/dist/native/ssr/server/pipeline-interception.js +1 -1
  171. package/dist/native/ssr/server/segment-hash/value-hash.js +162 -0
  172. package/dist/native/ssr/server/segment-hash/value-hash.js.map +1 -0
  173. package/dist/native/ssr/server/ssr-wrappers.js.map +1 -1
  174. package/dist/native/ssr/server/vite-handoff-rsc.js.map +1 -1
  175. package/dist/native/ssr/shared/payload-root.js.map +1 -1
  176. package/dist/plugin-context.d.ts +0 -16
  177. package/dist/plugin-context.d.ts.map +1 -1
  178. package/dist/plugins/build-manifest.d.ts.map +1 -1
  179. package/dist/routing/index.js +2 -2
  180. package/dist/routing/segment-keys.d.ts +8 -21
  181. package/dist/routing/segment-keys.d.ts.map +1 -1
  182. package/dist/server/access-gate.d.ts +0 -14
  183. package/dist/server/access-gate.d.ts.map +1 -1
  184. package/dist/server/als-registry.d.ts +16 -0
  185. package/dist/server/als-registry.d.ts.map +1 -1
  186. package/dist/server/build-manifest.d.ts +1 -10
  187. package/dist/server/build-manifest.d.ts.map +1 -1
  188. package/dist/server/chain-url-parts.d.ts +3 -13
  189. package/dist/server/chain-url-parts.d.ts.map +1 -1
  190. package/dist/server/client-state-tree.d.ts +31 -0
  191. package/dist/server/client-state-tree.d.ts.map +1 -0
  192. package/dist/server/flight-source-node.d.ts +6 -1
  193. package/dist/server/flight-source-node.d.ts.map +1 -1
  194. package/dist/server/flight-source.d.ts +27 -0
  195. package/dist/server/flight-source.d.ts.map +1 -1
  196. package/dist/server/index.js +2 -2
  197. package/dist/server/internal.js +48 -47
  198. package/dist/server/internal.js.map +1 -1
  199. package/dist/server/publish-params.d.ts +5 -4
  200. package/dist/server/publish-params.d.ts.map +1 -1
  201. package/dist/server/route-element-builder.d.ts +4 -19
  202. package/dist/server/route-element-builder.d.ts.map +1 -1
  203. package/dist/server/rsc-entry/helpers.d.ts +7 -13
  204. package/dist/server/rsc-entry/helpers.d.ts.map +1 -1
  205. package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
  206. package/dist/server/rsc-entry/revalidate-renderer.d.ts.map +1 -1
  207. package/dist/server/rsc-entry/rsc-payload.d.ts +1 -2
  208. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  209. package/dist/server/rsc-entry/rsc-stream.d.ts +11 -2
  210. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  211. package/dist/server/rsc-entry/ssr-renderer.d.ts +0 -2
  212. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  213. package/dist/server/segment-hash/capture.d.ts +77 -0
  214. package/dist/server/segment-hash/capture.d.ts.map +1 -0
  215. package/dist/server/segment-hash/outlet.d.ts +65 -0
  216. package/dist/server/segment-hash/outlet.d.ts.map +1 -0
  217. package/dist/server/segment-hash/stream-tap.d.ts +49 -0
  218. package/dist/server/segment-hash/stream-tap.d.ts.map +1 -0
  219. package/dist/server/segment-hash/value-hash.d.ts +70 -0
  220. package/dist/server/segment-hash/value-hash.d.ts.map +1 -0
  221. package/dist/server/slot-resolver.d.ts +13 -78
  222. package/dist/server/slot-resolver.d.ts.map +1 -1
  223. package/dist/server/ssr-wrappers.d.ts +7 -9
  224. package/dist/server/ssr-wrappers.d.ts.map +1 -1
  225. package/dist/server/vite-handoff-rsc.d.ts +10 -1
  226. package/dist/server/vite-handoff-rsc.d.ts.map +1 -1
  227. package/dist/shared/outlet-decision.d.ts +48 -0
  228. package/dist/shared/outlet-decision.d.ts.map +1 -0
  229. package/dist/shared/payload-root.d.ts +5 -8
  230. package/dist/shared/payload-root.d.ts.map +1 -1
  231. package/dist/shared/segment-info.d.ts +13 -28
  232. package/dist/shared/segment-info.d.ts.map +1 -1
  233. package/package.json +1 -1
  234. package/src/client/browser-entry/action-dispatch.ts +1 -15
  235. package/src/client/browser-entry/hydrate.ts +3 -3
  236. package/src/client/browser-entry/router-init.ts +28 -47
  237. package/src/client/error-boundary.tsx +49 -9
  238. package/src/client/history.ts +4 -5
  239. package/src/client/internal.ts +1 -1
  240. package/src/client/navigation-commit.ts +25 -83
  241. package/src/client/outlet-content-cache.ts +119 -0
  242. package/src/client/outlet-scope-context.ts +42 -0
  243. package/src/client/params-context.ts +11 -12
  244. package/src/client/router-pipeline.ts +10 -74
  245. package/src/client/router-types.ts +11 -26
  246. package/src/client/router.ts +7 -22
  247. package/src/client/rsc-fetch.ts +5 -30
  248. package/src/client/segment-cache.ts +19 -264
  249. package/src/client/segment-outlet.tsx +80 -72
  250. package/src/client/stale-segment.ts +60 -0
  251. package/src/client/use-segment-params.ts +1 -1
  252. package/src/config-types.ts +7 -6
  253. package/src/index.ts +0 -2
  254. package/src/plugin-context.ts +0 -16
  255. package/src/plugins/build-manifest.ts +1 -22
  256. package/src/routing/scanner.ts +12 -0
  257. package/src/routing/segment-keys.ts +9 -35
  258. package/src/rsc-runtime/vendor-types.d.ts +8 -0
  259. package/src/server/access-gate.tsx +3 -32
  260. package/src/server/als-registry.ts +23 -0
  261. package/src/server/build-manifest.ts +1 -11
  262. package/src/server/chain-url-parts.ts +3 -21
  263. package/src/server/client-state-tree.ts +75 -0
  264. package/src/server/flight-source-node.ts +7 -2
  265. package/src/server/flight-source.ts +102 -9
  266. package/src/server/pipeline-interception.ts +1 -1
  267. package/src/server/publish-params.ts +5 -4
  268. package/src/server/route-element-builder.ts +77 -206
  269. package/src/server/rsc-entry/helpers.ts +11 -65
  270. package/src/server/rsc-entry/render-route.ts +54 -28
  271. package/src/server/rsc-entry/revalidate-renderer.ts +2 -1
  272. package/src/server/rsc-entry/rsc-payload.ts +11 -39
  273. package/src/server/rsc-entry/rsc-stream.ts +123 -101
  274. package/src/server/rsc-entry/ssr-renderer.ts +1 -3
  275. package/src/server/segment-hash/capture.ts +232 -0
  276. package/src/server/segment-hash/outlet.ts +185 -0
  277. package/src/server/segment-hash/stream-tap.ts +244 -0
  278. package/src/server/segment-hash/value-hash.ts +338 -0
  279. package/src/server/slot-resolver.ts +37 -323
  280. package/src/server/ssr-wrappers.tsx +7 -9
  281. package/src/server/vite-handoff-rsc.ts +12 -1
  282. package/src/shared/outlet-decision.ts +54 -0
  283. package/src/shared/payload-root.ts +5 -8
  284. package/src/shared/segment-info.ts +13 -28
  285. package/dist/_chunks/chains-CmzbpG-6.js +0 -1
  286. package/dist/_chunks/dev-server--4_Ogy_6.js +0 -1
  287. package/dist/_chunks/dev-span-RsVeYYc_.js.map +0 -1
  288. package/dist/_chunks/error-boundary-Bh-egWUI.js.map +0 -1
  289. package/dist/_chunks/flight-source-node-BsrlUjMO.js.map +0 -1
  290. package/dist/client/segment-update-context.d.ts +0 -15
  291. package/dist/client/segment-update-context.d.ts.map +0 -1
  292. package/dist/client/slot-content-cache-context.d.ts +0 -35
  293. package/dist/client/slot-content-cache-context.d.ts.map +0 -1
  294. package/dist/native/rsc/server/request-dep.js +0 -12
  295. package/dist/native/rsc/server/request-dep.js.map +0 -1
  296. package/dist/native/rsc/server/route-element-helpers.js +0 -20
  297. package/dist/native/rsc/server/route-element-helpers.js.map +0 -1
  298. package/dist/native/rsc/server/skippable-prefix.js +0 -72
  299. package/dist/native/rsc/server/skippable-prefix.js.map +0 -1
  300. package/dist/native/rsc/server/state-tree-diff.js +0 -35
  301. package/dist/native/rsc/server/state-tree-diff.js.map +0 -1
  302. package/dist/native/ssr/client/segment-cache.js +0 -119
  303. package/dist/native/ssr/client/segment-cache.js.map +0 -1
  304. package/dist/native/ssr/client/segment-update-context.js +0 -9
  305. package/dist/native/ssr/client/segment-update-context.js.map +0 -1
  306. package/dist/native/ssr/client/slot-content-cache-context.js +0 -8
  307. package/dist/native/ssr/client/slot-content-cache-context.js.map +0 -1
  308. package/dist/native/ssr/server/state-tree-diff.js +0 -23
  309. package/dist/native/ssr/server/state-tree-diff.js.map +0 -1
  310. package/dist/plugins/request-dep/analysis.d.ts +0 -106
  311. package/dist/plugins/request-dep/analysis.d.ts.map +0 -1
  312. package/dist/plugins/request-dep/index.d.ts +0 -75
  313. package/dist/plugins/request-dep/index.d.ts.map +0 -1
  314. package/dist/plugins/request-dep/origin.d.ts +0 -61
  315. package/dist/plugins/request-dep/origin.d.ts.map +0 -1
  316. package/dist/server/request-dep.d.ts +0 -15
  317. package/dist/server/request-dep.d.ts.map +0 -1
  318. package/dist/server/route-element-helpers.d.ts +0 -12
  319. package/dist/server/route-element-helpers.d.ts.map +0 -1
  320. package/dist/server/skippable-prefix.d.ts +0 -29
  321. package/dist/server/skippable-prefix.d.ts.map +0 -1
  322. package/dist/server/state-tree-diff.d.ts +0 -78
  323. package/dist/server/state-tree-diff.d.ts.map +0 -1
  324. package/src/client/segment-update-context.ts +0 -23
  325. package/src/client/slot-content-cache-context.ts +0 -43
  326. package/src/plugins/request-dep/analysis.ts +0 -447
  327. package/src/plugins/request-dep/index.ts +0 -376
  328. package/src/plugins/request-dep/origin.ts +0 -310
  329. package/src/server/request-dep.ts +0 -37
  330. package/src/server/route-element-helpers.ts +0 -37
  331. package/src/server/skippable-prefix.ts +0 -172
  332. package/src/server/state-tree-diff.ts +0 -132
@@ -1,96 +1,104 @@
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
 
35
29
  'use client';
36
30
 
37
- import { useContext, useLayoutEffect, type ReactNode } from 'react';
38
- import { SegmentUpdateContext } from './segment-update-context.ts';
39
- import { SlotContentCacheContext } from './slot-content-cache-context.ts';
31
+ import { createElement, use, useContext, useLayoutEffect, useMemo, type ReactNode } from 'react';
32
+ import type {
33
+ CaptureHole,
34
+ OutletDecision,
35
+ OutletDecisionValue,
36
+ } from '../shared/outlet-decision.ts';
37
+ import { OutletContentCacheContext } from './outlet-content-cache.ts';
38
+ import { LIVE_OUTLET_SCOPE, OutletScopeContext, type OutletScope } from './outlet-scope-context.ts';
39
+ import { staleSegmentError } from './stale-segment.ts';
40
40
 
41
41
  export interface SegmentOutletProps {
42
42
  /**
43
- * Unique identifier for this segment. For normal segments this is the
44
- * urlPath (e.g., "/", "/dashboard"). For route groups this includes the
45
- * group name (e.g., "/(marketing)") to distinguish siblings that share
46
- * the same urlPath. For slots this includes the slot name (e.g., "/@sidebar").
47
- * Must match the segmentId used in state-tree-diff.ts.
43
+ * The outlet's key: a segment id (`/`, `/(marketing)`), a slot key
44
+ * (`/@sidebar`), a layout's children (`/dashboard/@children`), or the
45
+ * metadata outlet.
48
46
  */
49
47
  segmentPath: string;
50
-
51
- /** The segment's React subtree (layout + inner content). */
52
- children: ReactNode;
53
-
54
48
  /**
55
- * When true, the outlet renders the content it last committed for this
56
- * path instead of `children`. Used for skipped parallel route slots — the
57
- * server sends an empty SegmentOutlet with skip=true, and the client keeps
58
- * the previously committed slot content.
49
+ * What the server decided for this segment. Absent only on the bare holes
50
+ * a capture render emits, which never reach the client.
59
51
  */
60
- skip?: boolean;
52
+ decision?: OutletDecisionValue | CaptureHole;
61
53
  }
62
54
 
63
- /**
64
- * Client component boundary at each layout segment in the element tree.
65
- *
66
- * Resolution order, all reads:
67
- * 1. An update in SegmentUpdateContext for this path → render it.
68
- * 2. `skip` → render the committed content for this path (null if none —
69
- * a fresh outlet with nothing committed yet renders empty and is fully
70
- * rendered on the next navigation).
71
- * 3. Otherwise → render `children`.
72
- *
73
- * Whatever a non-skip render resolves to is recorded once React commits it.
74
- * A skip render records nothing: it displayed the cache, it did not add to it.
75
- */
76
- export function SegmentOutlet({ segmentPath, children, skip }: SegmentOutletProps) {
77
- const updates = useContext(SegmentUpdateContext);
78
- const cache = useContext(SlotContentCacheContext);
55
+ function isCaptureHole(value: OutletDecisionValue | CaptureHole): value is CaptureHole {
56
+ return 'captureHole' in value;
57
+ }
58
+
59
+ function isThenable(value: OutletDecisionValue): value is PromiseLike<OutletDecision> {
60
+ return typeof (value as PromiseLike<OutletDecision>).then === 'function';
61
+ }
62
+
63
+ export function SegmentOutlet({ segmentPath, decision }: SegmentOutletProps): ReactNode {
64
+ const scope = useContext(OutletScopeContext);
65
+ const cache = useContext(OutletContentCacheContext);
66
+
67
+ // Inside a skipped segment's cached content this element is from an
68
+ // earlier render; the skip handed down this segment's new decision.
69
+ const value = scope.skipped ? scope.decisions.get(segmentPath) : decision;
70
+ // A capture's hole marker is replaced before anything is sent; one that got
71
+ // through is a decision the client does not have.
72
+ if (value === undefined || isCaptureHole(value)) throw staleSegmentError(segmentPath);
73
+ const resolved = isThenable(value) ? use(value) : value;
79
74
 
80
- const update = updates.get(segmentPath);
81
- const hasUpdate = update !== undefined;
82
- const content: ReactNode = hasUpdate
83
- ? update
84
- : skip
85
- ? (cache?.get(segmentPath) ?? null)
86
- : children;
75
+ const cached = resolved.skip ? cache?.lookup(segmentPath, resolved.hash) : undefined;
76
+ if (resolved.skip && !cached) throw staleSegmentError(segmentPath);
77
+ const content: ReactNode = resolved.skip ? cached!.content : resolved.children;
78
+ const childScope = useMemo<OutletScope>(
79
+ () =>
80
+ resolved.skip
81
+ ? { skipped: true, decisions: new Map(Object.entries(resolved.outlets)) }
82
+ : LIVE_OUTLET_SCOPE,
83
+ [resolved]
84
+ );
87
85
 
88
- // Commit-time write. `hasUpdate || !skip` is "this render brought its own
89
- // content" — the one case where the cache learns something new.
90
- const record = hasUpdate || !skip;
86
+ // Commit-time write: live content is recorded once React commits it, and
87
+ // its hash attached when the server's arrives.
91
88
  useLayoutEffect(() => {
92
- if (record && cache !== null) cache.set(segmentPath, content);
93
- }, [record, cache, segmentPath, content]);
89
+ if (cache === null) return;
90
+ if (resolved.skip) {
91
+ cache.touch(segmentPath);
92
+ return;
93
+ }
94
+ const entry = cache.record(segmentPath, content);
95
+ resolved.hash?.then(
96
+ (hash) => {
97
+ if (hash) cache.attachHash(segmentPath, entry, hash);
98
+ },
99
+ () => {}
100
+ );
101
+ }, [resolved, cache, segmentPath, content]);
94
102
 
95
- return content;
103
+ return createElement(OutletScopeContext.Provider, { value: childScope }, content);
96
104
  }
@@ -0,0 +1,60 @@
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
+
14
+ export interface StaleSegmentDigest {
15
+ type: 'stale-segment';
16
+ leaveSpa: true;
17
+ }
18
+
19
+ export function staleSegmentError(segmentPath: string): Error {
20
+ const error = new Error(`[timber] content for segment "${segmentPath}" is no longer held`);
21
+ const digest: StaleSegmentDigest = { type: 'stale-segment', leaveSpa: true };
22
+ (error as Error & { digest: string }).digest = JSON.stringify(digest);
23
+ return error;
24
+ }
25
+
26
+ /** The router surface recovery needs. */
27
+ interface RecoveryRouter {
28
+ getPendingUrl(): string | null;
29
+ navigate(url: string, options?: { replace?: boolean; scroll?: boolean }): PromiseLike<unknown>;
30
+ refresh(): PromiseLike<unknown>;
31
+ }
32
+
33
+ /** A recovery in flight: a second stale segment during it leaves the SPA. */
34
+ let recovering = false;
35
+
36
+ /**
37
+ * Answer a stale segment by fetching the page again inside the SPA. The new
38
+ * request advertises only what the client holds now, so every skip it gets
39
+ * names content that is there. A navigation still in flight is re-requested;
40
+ * otherwise the page on the address bar — a traversal has already moved it —
41
+ * is refreshed, which sends no hashes at all.
42
+ *
43
+ * Returns false when the caller should leave the SPA instead: there is no
44
+ * router, or this miss happened while recovering from the last one.
45
+ */
46
+ export function recoverFromStaleSegment(router: RecoveryRouter | null): boolean {
47
+ if (!router || recovering) return false;
48
+ recovering = true;
49
+ const pending = router.getPendingUrl();
50
+ const done = () => {
51
+ recovering = false;
52
+ };
53
+ queueMicrotask(() => {
54
+ const handle = pending
55
+ ? router.navigate(pending, { replace: true, scroll: false })
56
+ : router.refresh();
57
+ Promise.resolve(handle).then(done, done);
58
+ });
59
+ return true;
60
+ }
@@ -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
@@ -327,19 +327,20 @@ export interface TimberUserConfig {
327
327
  */
328
328
  buildDir?: string;
329
329
  /**
330
- * Enable the client-side segment cache for partial navigation.
330
+ * Skip unchanged segments on client navigation (segment hash dedupe).
331
331
  *
332
- * When enabled, the router serializes the mounted segment tree into an
333
- * `X-Timber-State-Tree` header on every client navigation. The server
334
- * skips re-rendering unchanged sync layouts and sends a partial RSC
335
- * payload. The client merges the partial payload with its cached segments.
332
+ * When enabled, every live segment the server sends carries a hash of its
333
+ * output, and the router advertises the hashes of the content it holds in
334
+ * `X-Timber-State-Tree`. The server still renders every segment; one whose
335
+ * output hashes the same as the client's copy is sent as a skip, and the
336
+ * client keeps its copy. Every segment renders once either way.
336
337
  *
337
338
  * When disabled (the default), every navigation gets a full RSC payload.
338
339
  *
339
340
  * This is a performance optimization only — not a security boundary.
340
341
  * The server always runs all `access.ts` files regardless.
341
342
  *
342
- * See design/19-client-navigation.md §"X-Timber-State-Tree Header"
343
+ * See design/52-segment-hash-dedupe.md
343
344
  */
344
345
  clientSegmentCache?: boolean;
345
346
  /**
package/src/index.ts CHANGED
@@ -33,7 +33,6 @@ import { clientChunkGroup } from './plugins/client-chunks.ts';
33
33
  import { timberServerBundle } from './plugins/server-bundle.ts';
34
34
  import { timberEncryptionRuntime } from './plugins/encryption-runtime.ts';
35
35
  import { timberCacheTransform } from './plugins/cache.ts';
36
- import { timberRequestDep } from './plugins/request-dep/index.ts';
37
36
  import { timberOptimizePackageImports } from './plugins/optimize-package-imports.ts';
38
37
  import { timberClientInServerPackageDeps } from './plugins/client-in-server-package-deps.ts';
39
38
  import { timberNodeFlightBuilds } from './plugins/node-flight-builds.ts';
@@ -592,7 +591,6 @@ export function timber(config?: TimberUserConfig): PluginOption[] {
592
591
  timberMdx(ctx),
593
592
  timberOptimizePackageImports(ctx), // Listed barrels → the modules that define the imported names
594
593
  timberClientInServerPackageDeps(), // Dev: a package's inner 'use client' file → its bare path, so the browser pre-bundles it
595
- timberRequestDep(ctx),
596
594
  timberCacheTransform(ctx),
597
595
  timberPrerenderSugar(ctx), // export const prerender → cache.component() desugaring
598
596
  prebuilt, // cache.component() → __prebuilt() callsite rewrite
@@ -120,22 +120,6 @@ export interface PluginContext {
120
120
  * populate per-route modulepreload entries from clientReferenceDeps.
121
121
  */
122
122
  routeClientRefKeys?: Map<string, Set<string>>;
123
- /**
124
- * Static request-dependency verdict per segment entry file, keyed by the
125
- * absolute `filePath` the route scanner produced. Computed once by
126
- * `timber-request-dep`'s RSC `buildEnd` and serialized into
127
- * `buildManifest.requestDep` by `timber-build-manifest` (build only — dev
128
- * answers the same question through the `Symbol.for('timber:request-dep')`
129
- * bridge instead).
130
- *
131
- * `undefined` and `{}` are different states and the difference is the whole
132
- * of TIM-1300: an empty object means the analysis ran and found no segments,
133
- * `undefined` means it never ran, and the runtime cannot tell them apart —
134
- * every key is absent either way, so every segment falls to the conservative
135
- * `true` and nothing is ever skipped. The build fails loudly on `undefined`
136
- * rather than shipping that silently.
137
- */
138
- requestDepMap?: Record<string, boolean>;
139
123
  /**
140
124
  * Maps absolute module IDs of client references in non-facade RSC
141
125
  * chunks to the absolute paths of their consuming facade modules.
@@ -385,7 +385,7 @@ export function timberBuildManifest(ctx: PluginContext): Plugin {
385
385
  '// Auto-generated build manifest — do not edit.',
386
386
  '// Production: reads manifest from globalThis (set by _timber-manifest-init.js).',
387
387
  '// The object below is only the fallback for when that global is unset —',
388
- '// the real manifest, including the requestDep map, is in that init module.',
388
+ '// the real manifest is in that init module.',
389
389
  '',
390
390
  `const manifest = globalThis.__TIMBER_BUILD_MANIFEST__ ?? ${empty};`,
391
391
  '',
@@ -437,27 +437,6 @@ export function timberBuildManifest(ctx: PluginContext): Plugin {
437
437
  ctx.buildManifest.metadataRouteHashes = computeMetadataRouteHashes(ctx.routeTree.root);
438
438
  }
439
439
 
440
- // Attach the static request-dependency map from the request-dep
441
- // plugin, computed in the RSC `buildEnd` hook. The RSC environment is
442
- // built before the client one, so the field is populated by now.
443
- //
444
- // Absent means the RSC `buildEnd` never ran — a broken plugin pipeline,
445
- // not an app without segments, which produces `{}`. Serializing that as
446
- // an empty map is indistinguishable at runtime from an analysis that
447
- // found nothing (`server/request-dep.ts` answers `true` for any absent
448
- // key either way), so every segment and slot silently stops being a
449
- // skip candidate and slot caching is off with nothing to show for it.
450
- // Fail the build instead (TIM-1300).
451
- if (ctx.requestDepMap === undefined) {
452
- throw new Error(
453
- '[timber] Build manifest: the request-dependency map was never computed. ' +
454
- "The RSC environment's buildEnd hook did not run before the client build, " +
455
- 'so no segment or slot could be skipped on client navigation. This is a ' +
456
- 'plugin pipeline bug — timber-request-dep must run in the rsc environment.'
457
- );
458
- }
459
- ctx.buildManifest.requestDep = ctx.requestDepMap;
460
-
461
440
  // When client JavaScript is disabled, strip JS chunks from the bundle
462
441
  // so Rollup never writes them to disk. CSS assets are preserved —
463
442
  // they're still needed for server-rendered HTML. The JS references
@@ -366,6 +366,18 @@ function scanChildren(dirPath: string, parentNode: SegmentNode, extSet: Set<stri
366
366
  `Rename the directory to remove the encoded delimiter.`
367
367
  );
368
368
  }
369
+ // `@children` is the implicit slot a layout's `children` prop fills, and
370
+ // the key of the outlet that carries it (`childrenOutletKey`). A slot
371
+ // directory by that name would claim the same outlet and be rendered in
372
+ // place of the children (design/52-segment-hash-dedupe.md).
373
+ if (entry === '@children') {
374
+ throw new Error(
375
+ `Build error: "@children" is reserved and cannot be a slot directory.\n` +
376
+ ` Directory: ${fullPath}\n` +
377
+ `A layout's children fill the implicit children slot. Put this content in the ` +
378
+ `parent segment's page, or give the slot another name.`
379
+ );
380
+ }
369
381
  if (NULL_BYTE_RE.test(entry)) {
370
382
  throw new Error(
371
383
  `Build error: directory name contains an encoded null byte (%00).\n` +
@@ -23,8 +23,6 @@
23
23
  * URL path and the segment classification, never on file payloads.
24
24
  */
25
25
 
26
- import type { CoercedParams } from '../shared/param-value.ts';
27
-
28
26
  export interface SegmentKeyInput {
29
27
  urlPath: string;
30
28
  segmentName?: string;
@@ -149,38 +147,14 @@ export function computeSlotKey(parentSegmentId: string, slotName: string): strin
149
147
  }
150
148
 
151
149
  /**
152
- * Compute a content key for a parallel route slot.
153
- *
154
- * The content key encodes everything that determines the slot's rendered
155
- * output for a given navigation: the slot key (which includes the owning
156
- * segment's identity and the slot name), the URL parts consumed by the
157
- * owning segment (which determine parent params the slot page might
158
- * read), the matched page file (or a sentinel for `default.tsx`), and
159
- * the slot's own extracted params.
160
- *
161
- * The slot key prevents cross-group collisions: two route groups at the
162
- * same URL level each owning a `@sidebar` slot produce different keys
163
- * even when both fall back to `default.tsx`.
164
- *
165
- * The key is opaque to the client — it stores whatever the server sent
166
- * and advertises it back. The server computes the destination key and
167
- * checks membership. This eliminates the need for the server to
168
- * reconstruct the client's state from a departing URL.
169
- *
170
- * See design/07-routing.md §"Segment Tree Diffing on Navigation"
150
+ * The outlet key of a layout's `children`. A layout's own outlet covers its
151
+ * chrome; everything it receives as `children` — this segment's boundaries
152
+ * and metadata collectors, the next segment's access gate, the page — is a
153
+ * separate outlet, so an unchanged layout
154
+ * dedupes while what is under it changes. Keyed as the implicit `children`
155
+ * slot; the route scanner rejects an `@children` directory.
156
+ * See design/52-segment-hash-dedupe.md §"The unit is the segment's own output".
171
157
  */
172
- export function computeSlotContentKey(
173
- slotKey: string,
174
- ownerParts: string[],
175
- entryFile: string | null,
176
- slotParams: CoercedParams
177
- ): string {
178
- const owner = ownerParts.join('/');
179
- const entry = entryFile ?? '\x01';
180
- const paramKeys = Object.keys(slotParams).sort();
181
- const paramParts = paramKeys.map((k) => {
182
- const v = slotParams[k];
183
- return Array.isArray(v) ? `${k}=${v.map(String).join('\x02')}` : `${k}=${String(v)}`;
184
- });
185
- return [slotKey, owner, entry, ...paramParts].join('\0');
158
+ export function childrenOutletKey(segmentId: string): string {
159
+ return computeSlotKey(segmentId, '@children');
186
160
  }
@@ -70,6 +70,14 @@ declare module '@vitejs/plugin-rsc/vendor/react-server-dom/server.edge' {
70
70
  id: string,
71
71
  exportName: string | null
72
72
  ): T;
73
+
74
+ // Tests render real client references (segment-hash tests) the way the
75
+ // use-client transform registers them.
76
+ export function registerClientReference<T>(
77
+ proxyImplementation: T,
78
+ id: string,
79
+ exportName: string
80
+ ): T & { $$id: string };
73
81
  }
74
82
 
75
83
  // src decodes through plugin-rsc's wrappers; tests decode a Flight response
@@ -68,17 +68,8 @@ export interface AccessGateProps {
68
68
  * AccessGate renders the matching deny page in-tree instead of throwing.
69
69
  * This prevents the error from reaching React Flight, eliminating the
70
70
  * second render pass. See TIM-666.
71
- *
72
- * Omitted for skipped segments — a deny there must hard-navigate to
73
- * avoid rendering the deny page inside cached layout chrome (TIM-1074).
74
71
  */
75
72
  denyPages?: DenyPageEntry[];
76
- /**
77
- * When true, this gate wraps a skipped segment. On deny, the gate
78
- * records the deny in ALS and rethrows so the response path can
79
- * return rscErrorEnvelope for a client hard-navigate.
80
- */
81
- skippedSegment?: boolean;
82
73
  /**
83
74
  * When true, this gate guards a segment of the URL's own route that is not
84
75
  * in the rendered tree — an intercepted navigation renders one for each
@@ -133,33 +124,19 @@ export interface SlotAccessGateProps {
133
124
  * because the gate also sits inside every layout above it and rendering
134
125
  * here would wrap the deny page in all of them (TIM-1356).
135
126
  *
136
- * For skipped segments (skippedSegment=true), deny pages are NOT rendered
137
- * in-tree — the client's cached layout chrome would wrap them incorrectly.
138
- * Instead, the deny is recorded in ALS and rethrown so the response path
139
- * can return rscErrorEnvelope for a client hard-navigate.
140
- *
141
127
  * For a segment outside the rendered tree (outsideTree=true), see
142
128
  * `DenySignal._leaveSpa`.
143
129
  */
144
130
  export function AccessGate(props: AccessGateProps): Promise<ReactNode> {
145
- const {
146
- accessFn,
147
- segmentName,
148
- segmentKey,
149
- segmentIndex,
150
- denyPages,
151
- skippedSegment,
152
- outsideTree,
153
- children,
154
- } = props;
131
+ const { accessFn, segmentName, segmentKey, segmentIndex, denyPages, outsideTree, children } =
132
+ props;
155
133
 
156
134
  return accessGateFallback(
157
135
  accessFn,
158
136
  segmentName,
159
137
  segmentKey,
160
138
  segmentIndex,
161
- skippedSegment ? undefined : denyPages,
162
- skippedSegment,
139
+ denyPages,
163
140
  outsideTree,
164
141
  children
165
142
  );
@@ -175,7 +152,6 @@ async function accessGateFallback(
175
152
  segmentKey: AccessGateProps['segmentKey'],
176
153
  segmentIndex: AccessGateProps['segmentIndex'],
177
154
  denyPages: DenyPageEntry[] | undefined,
178
- skippedSegment: boolean | undefined,
179
155
  outsideTree: boolean | undefined,
180
156
  children: ReactNode
181
157
  ): Promise<ReactNode> {
@@ -193,11 +169,6 @@ async function accessGateFallback(
193
169
  throw error;
194
170
  }
195
171
 
196
- if (skippedSegment) {
197
- error._hardNavigate = true;
198
- throw error;
199
- }
200
-
201
172
  if (denyPages) {
202
173
  return handleCaughtDeny(denyPages, error, segmentKey);
203
174
  }
@@ -339,3 +339,26 @@ export interface PrebuiltCaptureStore {
339
339
  export const prebuiltCaptureAls = getOrCreateAls<PrebuiltCaptureStore>(
340
340
  Symbol.for('timber:prebuilt-capture-als')
341
341
  );
342
+
343
+ // ─── Segment Hash Capture ─────────────────────────────────────────────────
344
+ // Used by: segment-hash/capture.ts, segment-hash/outlet.ts
345
+
346
+ /**
347
+ * One in-flight segment-hash capture render (design/52 §"Capture"). The
348
+ * outlet gate renders a nested segment as a bare hole there — its content
349
+ * belongs to its own hash.
350
+ *
351
+ * @internal — import via segment-hash/capture.ts
352
+ */
353
+ export interface SegmentCaptureStore {
354
+ /**
355
+ * A nested outlet rendered here, as a hole: the opaque marker it carries in
356
+ * place of its decision (a Flight temporary reference).
357
+ */
358
+ hole(segmentPath: string): import('../shared/outlet-decision.ts').CaptureHole;
359
+ }
360
+
361
+ /** @internal — import via segment-hash/capture.ts */
362
+ export const segmentCaptureAls = getOrCreateAls<SegmentCaptureStore>(
363
+ Symbol.for('timber:segment-capture-als')
364
+ );
@@ -41,12 +41,6 @@ export interface BuildManifest {
41
41
  * In dev mode this is empty — a startup nonce is used instead.
42
42
  */
43
43
  metadataRouteHashes?: Record<string, string>;
44
- /**
45
- * Static request-dependency map from the Vite plugin's module-graph analysis.
46
- * Map from segment entry file path to whether it's request-dependent.
47
- * Used by buildSegmentInfo() for X-Timber-Segments in production.
48
- */
49
- requestDep?: Record<string, boolean>;
50
44
  }
51
45
 
52
46
  /**
@@ -56,10 +50,7 @@ export interface BuildManifest {
56
50
  * `virtual:timber-build-manifest` serializes this constant into its generated
57
51
  * source rather than restating it — one literal for the dev module, one for the
58
52
  * production module's `globalThis.__TIMBER_BUILD_MANIFEST__ ?? …` fallback.
59
- * They were three hand-written objects that had already drifted: this one and
60
- * the dev literal were missing `requestDep` while the production fallback had
61
- * it, so a reader who grepped the built bundle for `requestDep` found the one
62
- * copy that mentioned it and read the fallback as the shipped map (TIM-1300).
53
+ * They were three hand-written objects that had already drifted (TIM-1300).
63
54
  * A field added here now reaches every copy.
64
55
  */
65
56
  export const EMPTY_BUILD_MANIFEST: BuildManifest = {
@@ -68,7 +59,6 @@ export const EMPTY_BUILD_MANIFEST: BuildManifest = {
68
59
  modulepreload: {},
69
60
  fonts: {},
70
61
  metadataRouteHashes: {},
71
- requestDep: {},
72
62
  };
73
63
 
74
64
  /** Segment shape expected by collectRouteCss (matches ManifestSegmentNode). */
@@ -2,13 +2,11 @@
2
2
  * How much of the URL a matched segment chain has consumed.
3
3
  *
4
4
  * One question — "which URL parts had been consumed by the time segment `i`
5
- * rendered?" — asked by four things that must all agree:
5
+ * rendered?" — asked by everything that must agree about it:
6
6
  *
7
7
  * - the layout depth handed to `SegmentProvider` (`route-element-builder.ts`),
8
8
  * which `useSelectedLayoutSegment(s)` indexes the live pathname with;
9
- * - `slotUrlParts`, which slices the destination pathname for slot matching;
10
- * - `resolveSlotProps` and `skippable-prefix.ts`, which derive content keys
11
- * for slot skip decisions (TIM-1370).
9
+ * - slot matching, which slices the destination pathname at the owner.
12
10
  *
13
11
  * They were four separate `extractUrlParts(...).length` calls. That was fine
14
12
  * while the answer was a plain walk, and stopped being fine when interception
@@ -35,7 +33,7 @@ import { computeInterceptedBase } from '../routing/interception.ts';
35
33
  *
36
34
  * The root segment is named '' and consumes nothing, so it is skipped here
37
35
  * rather than by each caller — callers that pass a chain including the root
38
- * (interception anchoring, slot-skip slicing) would otherwise have to remember
36
+ * (interception anchoring, slot matching) would otherwise have to remember
39
37
  * to filter it, and one that forgot would push an empty part and shift every
40
38
  * subsequent index by one.
41
39
  *
@@ -145,19 +143,3 @@ export function consumedUrlParts(
145
143
  // At or below it: the intercepting subtree's parts ARE the target's.
146
144
  return [...targetPrefix, ...partsThrough(interception.index, index)];
147
145
  }
148
-
149
- /**
150
- * The index in `match.segments` of a segment, or -1.
151
- *
152
- * Split out so the three slot call sites and the layout-depth one derive their
153
- * slice point identically — `indexOf` plus `consumedUrlParts` — instead of
154
- * each inlining the pair.
155
- */
156
- export function consumedPartsThroughSegment(
157
- segment: ManifestSegmentNode,
158
- match: RouteMatch
159
- ): string[] {
160
- const index = match.segments.indexOf(segment);
161
- if (index < 0) return [];
162
- return consumedUrlParts(match.segments as ManifestSegmentNode[], index, match);
163
- }