@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,72 +0,0 @@
1
- import { shouldSkipSegment, shouldSkipSlot } from "./state-tree-diff.js";
2
- import { consumedUrlParts } from "./chain-url-parts.js";
3
- import { computeSlotContentKey, computeSlotKey } from "../routing/segment-keys.js";
4
- import { matchUrlParts } from "./tree-match.js";
5
- import { slotUrlParts } from "./slot-resolver.js";
6
- // src/server/skippable-prefix.ts
7
- function computeSkippableSet(segments, segmentKeys, layoutBySegment, clientStateTree, match, req) {
8
- const skippableSet = new Set();
9
- if (!clientStateTree) return skippableSet;
10
- for (let i = 0; i < segments.length; i++) {
11
- const isLeaf = i === segments.length - 1;
12
- const layoutComponent = layoutBySegment.get(segments[i]);
13
- if (shouldSkipSegment(segmentKeys[i], layoutComponent, isLeaf, clientStateTree)) skippableSet.add(i);
14
- else if (layoutComponent) break;
15
- }
16
- if (skippableSet.size > 0) {
17
- let mergePointIndex = -1;
18
- for (let i = 0; i < segments.length; i++) {
19
- if (skippableSet.has(i)) continue;
20
- if (layoutBySegment.has(segments[i])) {
21
- mergePointIndex = i;
22
- break;
23
- }
24
- }
25
- if (mergePointIndex === -1) {
26
- for (let i = segments.length - 1; i >= 0; i--) if (skippableSet.has(i) && layoutBySegment.has(segments[i])) {
27
- skippableSet.delete(i);
28
- mergePointIndex = i;
29
- break;
30
- }
31
- }
32
- let hasClientOutlet = false;
33
- for (let j = 0; j < segments.length; j++) {
34
- if (skippableSet.has(j)) continue;
35
- if (layoutBySegment.has(segments[j]) && clientStateTree.has(segmentKeys[j])) {
36
- hasClientOutlet = true;
37
- break;
38
- }
39
- }
40
- if (!hasClientOutlet) skippableSet.clear();
41
- }
42
- if (skippableSet.size > 0) truncateSkippableForChangedSlots(skippableSet, segments, segmentKeys, match, clientStateTree, req);
43
- return skippableSet;
44
- }
45
- function truncateSkippableForChangedSlots(skippableSet, segments, segmentKeys, match, clientStateTree, req) {
46
- const clientSlotKeys = clientStateTree.slots ?? null;
47
- const destUrl = req.url;
48
- for (let i = 0; i < segments.length; i++) {
49
- if (!skippableSet.has(i)) continue;
50
- const segment = segments[i];
51
- const slotEntries = Object.entries(segment.slots ?? {});
52
- if (slotEntries.length === 0) continue;
53
- const segIdx = match.segments.indexOf(segment);
54
- const ownerParts = segIdx >= 0 ? consumedUrlParts(match.segments, segIdx, match) : [];
55
- const destParts = slotUrlParts(segment, match, destUrl);
56
- for (const [slotName, slotNode] of slotEntries) {
57
- const m = slotNode;
58
- const k = computeSlotKey(segmentKeys[i], `@${slotName}`);
59
- const destMatch = matchUrlParts(m, destParts);
60
- const hasAccessInChain = !!m.access || (destMatch?.chain.some((seg) => seg.access) ?? false);
61
- const entryFile = (destMatch?.chain[destMatch.chain.length - 1])?.page?.filePath ?? null;
62
- const contentKey = computeSlotContentKey(k, ownerParts, entryFile, destMatch?.params ?? {});
63
- if (hasAccessInChain || m.children.some((c) => c.segmentType === "intercepting") || !shouldSkipSlot(contentKey, clientSlotKeys)) {
64
- for (let j = i; j < segments.length; j++) skippableSet.delete(j);
65
- return;
66
- }
67
- }
68
- }
69
- }
70
- export { computeSkippableSet };
71
-
72
- //# sourceMappingURL=skippable-prefix.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skippable-prefix.js","names":[],"sources":["../../../../src/server/skippable-prefix.ts"],"mappings":";;;;;;AAiCA,SAAgB,oBACd,UACA,aACA,iBACA,iBACA,OACA,KACa;CACb,MAAM,eAAe,IAAI,IAAY;CACrC,IAAI,CAAC,iBAAiB,OAAO;CAG7B,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;EACxC,MAAM,SAAS,MAAM,SAAS,SAAS;EACvC,MAAM,kBAAkB,gBAAgB,IAAI,SAAS,EAAE;EAEvD,IACE,kBACE,YAAY,IACZ,iBACA,QACA,eACF,GAEA,aAAa,IAAI,CAAC;OACb,IAAI,iBACT;CAEJ;CAIA,IAAI,aAAa,OAAO,GAAG;EACzB,IAAI,kBAAkB;EACtB,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;GACxC,IAAI,aAAa,IAAI,CAAC,GAAG;GACzB,IAAI,gBAAgB,IAAI,SAAS,EAAE,GAAG;IACpC,kBAAkB;IAClB;GACF;EACF;EAEA,IAAI,oBAAoB,IACtB;QAAK,IAAI,IAAI,SAAS,SAAS,GAAG,KAAK,GAAG,KACxC,IAAI,aAAa,IAAI,CAAC,KAAK,gBAAgB,IAAI,SAAS,EAAE,GAAG;IAC3D,aAAa,OAAO,CAAC;IACrB,kBAAkB;IAClB;GACF;EACF;EAKF,IAAI,kBAAkB;EACtB,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;GACxC,IAAI,aAAa,IAAI,CAAC,GAAG;GACzB,IAAI,gBAAgB,IAAI,SAAS,EAAE,KAAK,gBAAgB,IAAI,YAAY,EAAE,GAAG;IAC3E,kBAAkB;IAClB;GACF;EACF;EACA,IAAI,CAAC,iBACH,aAAa,MAAM;CAEvB;CAGA,IAAI,aAAa,OAAO,GACtB,iCACE,cACA,UACA,aACA,OACA,iBACA,GACF;CAGF,OAAO;AACT;AAeA,SAAS,iCACP,cACA,UACA,aACA,OACA,iBACA,KACM;CACN,MAAM,iBAAiB,gBAAgB,SAAS;CAChD,MAAM,UAAU,IAAI;CAEpB,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;EACxC,IAAI,CAAC,aAAa,IAAI,CAAC,GAAG;EAC1B,MAAM,UAAU,SAAS;EACzB,MAAM,cAAc,OAAO,QAAQ,QAAQ,SAAS,CAAC,CAAC;EACtD,IAAI,YAAY,WAAW,GAAG;EAE9B,MAAM,SAAS,MAAM,SAAS,QAAQ,OAAO;EAC7C,MAAM,aAAa,UAAU,IAAI,iBAAiB,MAAM,UAAU,QAAQ,KAAK,IAAI,CAAC;EACpF,MAAM,YAAY,aAAa,SAAS,OAAO,OAAO;EAEtD,KAAK,MAAM,CAAC,UAAU,aAAa,aAAa;GAC9C,MAAM,IAAI;GACV,MAAM,IAAI,eAAe,YAAY,IAAI,IAAI,UAAU;GAGvD,MAAM,YAAY,cAAc,GAAG,SAAS;GAC5C,MAAM,mBAAmB,CAAC,CAAC,EAAE,WAAW,WAAW,MAAM,MAAM,QAAQ,IAAI,MAAM,KAAK;GAGtF,MAAM,aADW,WAAW,MAAM,UAAU,MAAM,SAAS,GACzC,EAAU,MAAM,YAAY;GAC9C,MAAM,aAAa,sBAAsB,GAAG,YAAY,WAAW,WAAW,UAAU,CAAC,CAAC;GAE1F,IACE,oBACA,EAAE,SAAS,MAAM,MAAM,EAAE,gBAAgB,cAAc,KACvD,CAAC,eAAe,YAAY,cAAc,GAC1C;IACA,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK,aAAa,OAAO,CAAC;IAC/D;GACF;EACF;CACF;AACF"}
@@ -1,35 +0,0 @@
1
- import { swallow } from "./logger.js";
2
- // src/server/state-tree-diff.ts
3
- function parseClientStateTree(req) {
4
- const header = req.headers.get("X-Timber-State-Tree");
5
- if (!header) return null;
6
- try {
7
- const parsed = JSON.parse(header);
8
- const hasSegments = Array.isArray(parsed.segments) && parsed.segments.length > 0;
9
- const hasSlots = Array.isArray(parsed.slots) && parsed.slots.length > 0;
10
- const hasTreePaths = Array.isArray(parsed.treePaths) && parsed.treePaths.length > 0;
11
- if (!hasSegments && !hasSlots && !hasTreePaths) return null;
12
- const result = new Set(hasSegments ? parsed.segments : []);
13
- result.slots = hasSlots ? new Set(parsed.slots) : null;
14
- result.treePaths = hasTreePaths ? new Set(parsed.treePaths) : null;
15
- return result;
16
- } catch (err) {
17
- swallow(err, "malformed X-Timber-State-Tree header");
18
- return null;
19
- }
20
- }
21
- function shouldSkipSegment(segmentKey, layoutComponent, isLeaf, clientSegments) {
22
- if (!clientSegments) return false;
23
- if (!clientSegments.has(segmentKey)) return false;
24
- if (!layoutComponent) return false;
25
- if (isLeaf) return false;
26
- if (layoutComponent.constructor.name === "AsyncFunction") return false;
27
- return true;
28
- }
29
- function shouldSkipSlot(contentKey, clientSlotKeys) {
30
- if (!clientSlotKeys) return false;
31
- return clientSlotKeys.has(contentKey);
32
- }
33
- export { parseClientStateTree, shouldSkipSegment, shouldSkipSlot };
34
-
35
- //# sourceMappingURL=state-tree-diff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state-tree-diff.js","names":[],"sources":["../../../../src/server/state-tree-diff.ts"],"mappings":";;AAyCA,SAAgB,qBAAqB,KAAsC;CACzE,MAAM,SAAS,IAAI,QAAQ,IAAI,qBAAqB;CACpD,IAAI,CAAC,QAAQ,OAAO;CAEpB,IAAI;EACF,MAAM,SAAS,KAAK,MAAM,MAAM;EAKhC,MAAM,cAAc,MAAM,QAAQ,OAAO,QAAQ,KAAK,OAAO,SAAS,SAAS;EAC/E,MAAM,WAAW,MAAM,QAAQ,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS;EACtE,MAAM,eAAe,MAAM,QAAQ,OAAO,SAAS,KAAK,OAAO,UAAU,SAAS;EAClF,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,cAChC,OAAO;EAET,MAAM,SAAS,IAAI,IAAI,cAAe,OAAO,WAAwB,CAAC,CAAC;EACvE,OAAO,QAAQ,WAAW,IAAI,IAAI,OAAO,KAAiB,IAAI;EAC9D,OAAO,YAAY,eAAe,IAAI,IAAI,OAAO,SAAqB,IAAI;EAC1E,OAAO;CACT,SAAS,KAAK;EACZ,QAAQ,KAAK,sCAAsC;EACnD,OAAO;CACT;AACF;AAyBA,SAAgB,kBACd,YACA,iBACA,QACA,gBACS;CACT,IAAI,CAAC,gBAAgB,OAAO;CAC5B,IAAI,CAAC,eAAe,IAAI,UAAU,GAAG,OAAO;CAC5C,IAAI,CAAC,iBAAiB,OAAO;CAC7B,IAAI,QAAQ,OAAO;CAMnB,IAAI,gBAAgB,YAAY,SAAS,iBAAiB,OAAO;CAEjE,OAAO;AACT;AAoBA,SAAgB,eAAe,YAAoB,gBAA6C;CAC9F,IAAI,CAAC,gBAAgB,OAAO;CAC5B,OAAO,eAAe,IAAI,UAAU;AACtC"}
@@ -1,119 +0,0 @@
1
- import { createSingleflight } from "../cache/singleflight.js";
2
- function buildSegmentTree(segments) {
3
- if (segments.length === 0) return void 0;
4
- const segmentEntries = [];
5
- const slotEntries = [];
6
- for (const info of segments) if (info.slot) slotEntries.push(info);
7
- else segmentEntries.push(info);
8
- let root;
9
- let parent;
10
- const nodeById = new Map();
11
- for (const info of segmentEntries) {
12
- const id = info.segmentId ?? info.path;
13
- const node = {
14
- segment: id,
15
- treePath: info.treePath,
16
- payload: null,
17
- isRequestDependent: info.isRequestDependent,
18
- children: new Map()
19
- };
20
- nodeById.set(id, node);
21
- if (!root) root = node;
22
- if (parent) parent.children.set(id, node);
23
- parent = node;
24
- }
25
- for (const slotInfo of slotEntries) {
26
- const parentId = slotInfo.parentSegment;
27
- const parentNode = parentId ? nodeById.get(parentId) : root;
28
- if (!parentNode) continue;
29
- const slotId = slotInfo.segmentId ?? slotInfo.path;
30
- const slotNode = {
31
- segment: slotId,
32
- payload: null,
33
- isRequestDependent: slotInfo.isRequestDependent,
34
- children: new Map(),
35
- denied: slotInfo.denied,
36
- contentKey: slotInfo.contentKey
37
- };
38
- if (!parentNode.slots) parentNode.slots = new Map();
39
- parentNode.slots.set(slotId, slotNode);
40
- }
41
- return root;
42
- }
43
- var NEGATIVE_ENTRY = Object.freeze({ payload: null });
44
- var PREFETCH_SINGLEFLIGHT_TIMEOUT_MS = 5e3;
45
- function prefetchMapKey(key) {
46
- return `${key.from.length}:${key.from}:${key.scope.length}:${key.scope}:${key.url}`;
47
- }
48
- var PrefetchCache = class PrefetchCache {
49
- static TTL_MS = 3e4;
50
- entries = new Map();
51
- flights = createSingleflight({ timeoutMs: PREFETCH_SINGLEFLIGHT_TIMEOUT_MS });
52
- evictionGen = 0;
53
- set(key, result) {
54
- this.entries.set(prefetchMapKey(key), {
55
- result,
56
- expiresAt: Date.now() + PrefetchCache.TTL_MS
57
- });
58
- }
59
- get(key) {
60
- const mapKey = prefetchMapKey(key);
61
- const entry = this.entries.get(mapKey);
62
- if (!entry) return void 0;
63
- if (Date.now() >= entry.expiresAt) {
64
- this.entries.delete(mapKey);
65
- return;
66
- }
67
- return entry.result;
68
- }
69
- has(key) {
70
- return this.get(key) !== void 0;
71
- }
72
- consume(key) {
73
- const result = this.get(key);
74
- if (result !== void 0) this.entries.delete(prefetchMapKey(key));
75
- return result;
76
- }
77
- fetchOrCoalesce(key, doFetch, isNonRoute) {
78
- const genAtStart = this.evictionGen;
79
- return this.flights.do(prefetchMapKey(key), async (signal) => {
80
- try {
81
- const result = await doFetch(signal);
82
- if (!signal.aborted && this.evictionGen === genAtStart) this.set(key, result);
83
- return {
84
- kind: "ready",
85
- result,
86
- startGen: genAtStart
87
- };
88
- } catch (err) {
89
- if (isNonRoute(err)) {
90
- if (!signal.aborted && this.evictionGen === genAtStart) this.setNegative(key);
91
- return {
92
- kind: "non-route",
93
- startGen: genAtStart
94
- };
95
- }
96
- throw err;
97
- }
98
- });
99
- }
100
- joinInflight(key) {
101
- return this.flights.get(prefetchMapKey(key));
102
- }
103
- setNegative(key) {
104
- this.set(key, NEGATIVE_ENTRY);
105
- }
106
- isNegative(key) {
107
- return this.get(key) === NEGATIVE_ENTRY;
108
- }
109
- clearReady() {
110
- this.entries.clear();
111
- this.evictionGen++;
112
- }
113
- getEvictionGen() {
114
- return this.evictionGen;
115
- }
116
- };
117
- export { PrefetchCache, buildSegmentTree };
118
-
119
- //# sourceMappingURL=segment-cache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"segment-cache.js","names":[],"sources":["../../../../src/client/segment-cache.ts"],"mappings":";AA6OA,SAAgB,iBAAiB,UAAkD;CAEjF,IAAI,SAAS,WAAW,GAAG,OAAO;CAIlC,MAAM,iBAAgC,CAAC;CACvC,MAAM,cAA6B,CAAC;CACpC,KAAK,MAAM,QAAQ,UACjB,IAAI,KAAK,MACP,YAAY,KAAK,IAAI;MAErB,eAAe,KAAK,IAAI;CAK5B,IAAI;CACJ,IAAI;CACJ,MAAM,WAAW,IAAI,IAAyB;CAE9C,KAAK,MAAM,QAAQ,gBAAgB;EACjC,MAAM,KAAK,KAAK,aAAa,KAAK;EAClC,MAAM,OAAoB;GACxB,SAAS;GACT,UAAU,KAAK;GACf,SAAS;GACT,oBAAoB,KAAK;GACzB,UAAU,IAAI,IAAI;EACpB;EAEA,SAAS,IAAI,IAAI,IAAI;EAErB,IAAI,CAAC,MACH,OAAO;EAGT,IAAI,QACF,OAAO,SAAS,IAAI,IAAI,IAAI;EAG9B,SAAS;CACX;CAGA,KAAK,MAAM,YAAY,aAAa;EAClC,MAAM,WAAW,SAAS;EAC1B,MAAM,aAAa,WAAW,SAAS,IAAI,QAAQ,IAAI;EACvD,IAAI,CAAC,YAAY;EAEjB,MAAM,SAAS,SAAS,aAAa,SAAS;EAC9C,MAAM,WAAwB;GAC5B,SAAS;GACT,SAAS;GACT,oBAAoB,SAAS;GAC7B,UAAU,IAAI,IAAI;GAClB,QAAQ,SAAS;GACjB,YAAY,SAAS;EACvB;EAEA,IAAI,CAAC,WAAW,OACd,WAAW,QAAQ,IAAI,IAAI;EAE7B,WAAW,MAAM,IAAI,QAAQ,QAAQ;CACvC;CAEA,OAAO;AACT;AAUA,IAAM,iBAAiC,OAAO,OAAO,EAAE,SAAS,KAAK,CAAC;AAOtE,IAAM,mCAAmC;AAyCzC,SAAS,eAAe,KAA0B;CAChD,OAAO,GAAG,IAAI,KAAK,OAAO,GAAG,IAAI,KAAK,GAAG,IAAI,MAAM,OAAO,GAAG,IAAI,MAAM,GAAG,IAAI;AAChF;AAiCA,IAAa,gBAAb,MAAa,cAAc;CACzB,OAAwB,SAAS;CACjC,UAAkB,IAAI,IAAwB;CAC9C,UAAkB,mBAAmB,EAAE,WAAW,iCAAiC,CAAC;CACpF,cAAsB;CAEtB,IAAI,KAAkB,QAA8B;EAClD,KAAK,QAAQ,IAAI,eAAe,GAAG,GAAG;GACpC;GACA,WAAW,KAAK,IAAI,IAAI,cAAc;EACxC,CAAC;CACH;CAEA,IAAI,KAA8C;EAChD,MAAM,SAAS,eAAe,GAAG;EACjC,MAAM,QAAQ,KAAK,QAAQ,IAAI,MAAM;EACrC,IAAI,CAAC,OAAO,OAAO;EACnB,IAAI,KAAK,IAAI,KAAK,MAAM,WAAW;GACjC,KAAK,QAAQ,OAAO,MAAM;GAC1B;EACF;EACA,OAAO,MAAM;CACf;CAGA,IAAI,KAA2B;EAC7B,OAAO,KAAK,IAAI,GAAG,MAAM;CAC3B;CAGA,QAAQ,KAA8C;EACpD,MAAM,SAAS,KAAK,IAAI,GAAG;EAC3B,IAAI,WAAW,QACb,KAAK,QAAQ,OAAO,eAAe,GAAG,CAAC;EAEzC,OAAO;CACT;CAeA,gBACE,KACA,SACA,YACwB;EAOxB,MAAM,aAAa,KAAK;EACxB,OAAO,KAAK,QAAQ,GAAG,eAAe,GAAG,GAAG,OAAO,WAAW;GAC5D,IAAI;IACF,MAAM,SAAS,MAAM,QAAQ,MAAM;IACnC,IAAI,CAAC,OAAO,WAAW,KAAK,gBAAgB,YAAY,KAAK,IAAI,KAAK,MAAM;IAC5E,OAAO;KAAE,MAAM;KAAkB;KAAQ,UAAU;IAAW;GAChE,SAAS,KAAK;IACZ,IAAI,WAAW,GAAG,GAAG;KACnB,IAAI,CAAC,OAAO,WAAW,KAAK,gBAAgB,YAAY,KAAK,YAAY,GAAG;KAC5E,OAAO;MAAE,MAAM;MAAsB,UAAU;KAAW;IAC5D;IACA,MAAM;GACR;EACF,CAAC;CACH;CASA,aAAa,KAAsD;EACjE,OAAO,KAAK,QAAQ,IAAI,eAAe,GAAG,CAAC;CAC7C;CAUA,YAAY,KAAwB;EAClC,KAAK,IAAI,KAAK,cAAc;CAC9B;CAGA,WAAW,KAA2B;EACpC,OAAO,KAAK,IAAI,GAAG,MAAM;CAC3B;CAgBA,aAAmB;EACjB,KAAK,QAAQ,MAAM;EACnB,KAAK;CACP;CAEA,iBAAyB;EACvB,OAAO,KAAK;CACd;AACF"}
@@ -1,9 +0,0 @@
1
- "use client";
2
- import "../_virtual/_rolldown/runtime.js";
3
- import { createGlobalContext } from "./global-context.js";
4
- // src/client/segment-update-context.ts
5
- var EMPTY_SEGMENT_UPDATES = new Map();
6
- var SegmentUpdateContext = createGlobalContext(Symbol.for("__timber_segment_update_ctx"), EMPTY_SEGMENT_UPDATES);
7
- export { EMPTY_SEGMENT_UPDATES, SegmentUpdateContext };
8
-
9
- //# sourceMappingURL=segment-update-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"segment-update-context.js","names":[],"sources":["../../../../src/client/segment-update-context.ts"],"mappings":";;;;AAiBA,IAAa,wBAAwB,IAAI,IAAuB;AAEhE,IAAa,uBAAuB,oBAClC,OAAO,IAAI,6BAA6B,GACxC,qBACF"}
@@ -1,8 +0,0 @@
1
- "use client";
2
- import "../_virtual/_rolldown/runtime.js";
3
- import { createGlobalContext } from "./global-context.js";
4
- // src/client/slot-content-cache-context.ts
5
- var SlotContentCacheContext = createGlobalContext(Symbol.for("__timber_slot_content_cache_ctx"), null);
6
- export { SlotContentCacheContext };
7
-
8
- //# sourceMappingURL=slot-content-cache-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slot-content-cache-context.js","names":[],"sources":["../../../../src/client/slot-content-cache-context.ts"],"mappings":";;;;AAuCA,IAAa,0BAA0B,oBACrC,OAAO,IAAI,iCAAiC,GAC5C,IACF"}
@@ -1,23 +0,0 @@
1
- import { swallow } from "./logger.js";
2
- // src/server/state-tree-diff.ts
3
- function parseClientStateTree(req) {
4
- const header = req.headers.get("X-Timber-State-Tree");
5
- if (!header) return null;
6
- try {
7
- const parsed = JSON.parse(header);
8
- const hasSegments = Array.isArray(parsed.segments) && parsed.segments.length > 0;
9
- const hasSlots = Array.isArray(parsed.slots) && parsed.slots.length > 0;
10
- const hasTreePaths = Array.isArray(parsed.treePaths) && parsed.treePaths.length > 0;
11
- if (!hasSegments && !hasSlots && !hasTreePaths) return null;
12
- const result = new Set(hasSegments ? parsed.segments : []);
13
- result.slots = hasSlots ? new Set(parsed.slots) : null;
14
- result.treePaths = hasTreePaths ? new Set(parsed.treePaths) : null;
15
- return result;
16
- } catch (err) {
17
- swallow(err, "malformed X-Timber-State-Tree header");
18
- return null;
19
- }
20
- }
21
- export { parseClientStateTree };
22
-
23
- //# sourceMappingURL=state-tree-diff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state-tree-diff.js","names":[],"sources":["../../../../src/server/state-tree-diff.ts"],"mappings":";;AAyCA,SAAgB,qBAAqB,KAAsC;CACzE,MAAM,SAAS,IAAI,QAAQ,IAAI,qBAAqB;CACpD,IAAI,CAAC,QAAQ,OAAO;CAEpB,IAAI;EACF,MAAM,SAAS,KAAK,MAAM,MAAM;EAKhC,MAAM,cAAc,MAAM,QAAQ,OAAO,QAAQ,KAAK,OAAO,SAAS,SAAS;EAC/E,MAAM,WAAW,MAAM,QAAQ,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS;EACtE,MAAM,eAAe,MAAM,QAAQ,OAAO,SAAS,KAAK,OAAO,UAAU,SAAS;EAClF,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,cAChC,OAAO;EAET,MAAM,SAAS,IAAI,IAAI,cAAe,OAAO,WAAwB,CAAC,CAAC;EACvE,OAAO,QAAQ,WAAW,IAAI,IAAI,OAAO,KAAiB,IAAI;EAC9D,OAAO,YAAY,eAAe,IAAI,IAAI,OAAO,SAAqB,IAAI;EAC1E,OAAO;CACT,SAAS,KAAK;EACZ,QAAQ,KAAK,sCAAsC;EACnD,OAAO;CACT;AACF"}
@@ -1,106 +0,0 @@
1
- /**
2
- * Per-module syntactic facts for request-dependency analysis.
3
- *
4
- * This module is deliberately dumb: it records *what the source says*, with no
5
- * knowledge of which specifiers or names are interesting. Every judgement —
6
- * "is this an accessor", "is this a definition object" — lives in `origin.ts`,
7
- * which resolves a binding to the module it actually came from.
8
- *
9
- * That split is the point. The previous shape asked each module in isolation
10
- * "do you import `getSearchParams` from `@timber-js/app/server` and call it",
11
- * which any indirection defeats: a barrel re-export, a namespace import, a
12
- * factory reached through the app's own `_lib`. Each of those was a separate
13
- * hole and each was found separately (TIM-1291). Recording bindings and edges
14
- * here, and resolving them across the graph there, closes the family instead of
15
- * its members.
16
- *
17
- * See design/19-client-navigation.md §"Why the slot comparison ignores the query".
18
- */
19
- import type { ProgramNode } from '../callsite-ast.ts';
20
- /**
21
- * One module-graph edge introduced by an `import` or `export … from`.
22
- *
23
- * `imported` is the name as it exists in the *source* module: an export name,
24
- * `'default'`, or `'*'` for a namespace/star form.
25
- */
26
- export interface ImportEdge {
27
- source: string;
28
- imported: string;
29
- }
30
- /** The callee of `const x = f()` / `const x = ns.f()`. */
31
- export type CalleeRef = {
32
- kind: 'local';
33
- name: string;
34
- } | {
35
- kind: 'member';
36
- object: string;
37
- property: string;
38
- };
39
- export interface ModuleFacts {
40
- /** Local name → the edge that bound it (`import { a as b } from 'x'`). */
41
- importedBindings: Map<string, ImportEdge>;
42
- /** Exported name → edge, for `export { a as b } from 'x'`. */
43
- reExports: Map<string, ImportEdge>;
44
- /** Sources of anonymous `export * from 'x'`, in source order. */
45
- starReExports: string[];
46
- /** Exported name → local name, for `export { x }`, `export const x = …`. */
47
- localExports: Map<string, string>;
48
- /** Local variable name → the callee that produced its value. */
49
- factoryCalls: Map<string, CalleeRef>;
50
- /** Local names invoked directly: `f()`. */
51
- calledLocals: Set<string>;
52
- /** `ns.f()` → `ns` → `{ f }`. */
53
- calledMembers: Map<string, Set<string>>;
54
- /** Base identifier of a `.get()` chain: `x.get()`, `x().get()`, `x.p.get()`. */
55
- getterLocals: Set<string>;
56
- /** `ns.defs.get()` → `ns` → `{ defs }`. */
57
- getterMembers: Map<string, Set<string>>;
58
- /** Every name the module *body* mentions — import/export clauses excluded. */
59
- referencedLocals: Set<string>;
60
- /** Specifier → resolved module id, filled by the plugin via `this.resolve`. */
61
- resolvedSources: Map<string, string>;
62
- /** Specifiers that failed to resolve — treated as request-dependent. */
63
- unresolvedSources: Set<string>;
64
- }
65
- /** `export default` has no local name of its own; this stands in for one. */
66
- export declare const DEFAULT_EXPORT = "default";
67
- export declare function createModuleFacts(): ModuleFacts;
68
- /**
69
- * Specifiers the origin walk can actually reach, so the plugin resolves those
70
- * and not every import in the file.
71
- *
72
- * A re-export edge is always reachable — a downstream module can ask for any
73
- * name it forwards. An `import` edge is reachable through any local name the
74
- * module body mentions, or that it re-exports.
75
- *
76
- * The name set must be **the same one the taint rules consult**. Deriving it
77
- * from the call shapes instead (called, `.get()`d, member-called, minted from)
78
- * left `read(filters)` — a definition passed as an argument — with its
79
- * specifier unresolved, so the origin walk reported it inert and the page read
80
- * as request-independent. Two hand-maintained lists of "names that matter" is
81
- * one list too many; this is the one, and `referencedLocals` is a superset of
82
- * every call shape by construction, since each of them is an identifier the
83
- * walk visits. (Codex review round 1 on PR #991.)
84
- */
85
- export declare function usedSources(facts: ModuleFacts): Set<string>;
86
- /**
87
- * True when the module cannot affect any answer, so its facts need not be kept.
88
- *
89
- * Every judgement bottoms out at a module edge: a call site resolves through
90
- * `importedBindings`, a chain link through `reExports` / `starReExports`. A
91
- * module with none of those can only ever resolve to `none` — its exports lead
92
- * to locals that lead nowhere — which is exactly what a *missing* entry
93
- * produces. Dropping it is behaviour-preserving and keeps the dev-time map from
94
- * holding an entry for every leaf module in the graph.
95
- */
96
- export declare function contributesNothing(facts: ModuleFacts): boolean;
97
- /**
98
- * Record every binding, module edge, and call shape in one module.
99
- *
100
- * Names are recorded without scope analysis, so a parameter that shadows an
101
- * imported name is credited to the import. That direction is deliberate: a
102
- * needlessly request-dependent segment costs a re-render, a wrongly static one
103
- * serves stale content.
104
- */
105
- export declare function analyzeModule(program: ProgramNode): ModuleFacts;
106
- //# sourceMappingURL=analysis.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../../../src/plugins/request-dep/analysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,WAAW,EAKZ,MAAM,oBAAoB,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,0DAA0D;AAC1D,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD,MAAM,WAAW,WAAW;IAC1B,0EAA0E;IAC1E,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC1C,8DAA8D;IAC9D,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,iEAAiE;IACjE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,4EAA4E;IAC5E,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,gEAAgE;IAChE,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACrC,2CAA2C;IAC3C,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,iCAAiC;IACjC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,gFAAgF;IAChF,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,2CAA2C;IAC3C,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,8EAA8E;IAC9E,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,+EAA+E;IAC/E,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,wEAAwE;IACxE,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,6EAA6E;AAC7E,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC,wBAAgB,iBAAiB,IAAI,WAAW,CAe/C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAa3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAM9D;AAsRD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,CAsB/D"}
@@ -1,75 +0,0 @@
1
- /**
2
- * timber-request-dep — Static module-graph analysis for request-dependency.
3
- *
4
- * Replaces runtime ALS-based taint tracking with a build/dev-time computed
5
- * map: segment entry file → statically request-dependent?
6
- *
7
- * A segment/slot is request-dependent iff any module reachable from its
8
- * layout/page/default in the RSC module graph (stopping at client-reference
9
- * boundaries) reads the request: it calls a request accessor (`getHeaders`,
10
- * `getSearchParams`, `cookies`, …) or calls `.get()` on a value minted by
11
- * `defineSearchParams` / `defineCookie`.
12
- *
13
- * "Calls a request accessor" is decided by resolving the call site's binding
14
- * back through import and re-export edges (`origin.ts`), not by matching the
15
- * calling module's own import declarations. That distinction is the whole
16
- * ticket: a barrel, an alias, or a namespace import used to make a page that
17
- * reads the query look static, and a static slot is cached and skipped on a
18
- * query-only navigation — serving stale content (TIM-1273, TIM-1291).
19
- *
20
- * This is deterministic, covers children/barrels/node_modules/Suspense-
21
- * deferred code, and is computed before any byte is flushed.
22
- *
23
- * See design/19-client-navigation.md §"X-Timber-State-Tree Header"
24
- */
25
- import type { Plugin } from 'vite';
26
- import type { PluginContext } from '../../plugin-context.ts';
27
- import { type ModuleFacts } from './analysis.ts';
28
- export type { ModuleFacts } from './analysis.ts';
29
- export { analyzeModule, usedSources } from './analysis.ts';
30
- export { createOriginResolver } from './origin.ts';
31
- export declare function isFrameworkModule(id: string): boolean;
32
- export interface ReachabilityInput {
33
- factsMap: ReadonlyMap<string, ModuleFacts>;
34
- getImports: (id: string) => string[];
35
- /**
36
- * Does the graph this walk runs over contain this module at all?
37
- *
38
- * Only the entry needs asking. Every other id the walk visits comes out of
39
- * `getImports`, which enumerates edges the graph already resolved, so those
40
- * are known by construction. The entry comes from outside — the route
41
- * manifest's `filePath`, produced by the scanner from the filesystem — and
42
- * nothing guarantees it is spelled the way the graph spells it, or that the
43
- * module has been pulled through the pipeline yet.
44
- */
45
- isKnownModule: (id: string) => boolean;
46
- }
47
- /**
48
- * Walk the module graph from an entry, returning true if any module reachable
49
- * from it reads the request.
50
- *
51
- * Two passes, and the second is a deliberately blunt backstop:
52
- *
53
- * 1. **Binding origins.** For each reachable module, resolve every call site's
54
- * binding to its origin. This is precise and indifferent to indirection.
55
- * 2. **Definition reachability.** A module that calls `.get()` on *something*
56
- * it imported, with a module holding a definition factory reachable behind
57
- * that import, counts too. The origin walk cannot see through a value that
58
- * is computed rather than bound — `getFilterCookie(key).get()`, where the
59
- * helper returns a definition — and this pass can.
60
- *
61
- * The second pass over-reports by construction, which is the safe direction: a
62
- * needlessly request-dependent segment costs a re-render, a wrongly static one
63
- * serves stale content.
64
- *
65
- * An entry the graph does not contain is an edge we failed to walk, not the
66
- * absence of one — the same rule an unresolvable specifier gets. Without the
67
- * check it reads as an entry with no imports and no facts, and both passes fall
68
- * through to `false`: confidently request-INdependent, for a module nothing
69
- * ever looked at. In the build that answer is worse than no answer, because it
70
- * is written into `requestDep` as a definite `false` and the runtime's own
71
- * "absent key → conservative" fallback never fires.
72
- */
73
- export declare function isReachableTaintSource(entryId: string, input: ReachabilityInput): boolean;
74
- export declare function timberRequestDep(ctx: PluginContext): Plugin;
75
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/request-dep/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAkD,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjG,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAInD,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAKrD;AAgCD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC3C,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;IACrC;;;;;;;;;OASG;IACH,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAgCzF;AAyED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAkI3D"}
@@ -1,61 +0,0 @@
1
- /**
2
- * Binding-origin resolution across the module graph.
3
- *
4
- * Given a local name at a call site, walk import and re-export edges until the
5
- * binding lands somewhere that can be classified: a framework request accessor,
6
- * a definition factory, a definition object minted by one, or nothing of
7
- * interest. The walk is what makes the analysis indifferent to how the app
8
- * organises its own code — a barrel, an alias, a namespace import, and a
9
- * re-export chain five hops deep all reach the same origin (TIM-1291).
10
- *
11
- * The asymmetry that governs every judgement here: over-reporting costs a
12
- * re-render, under-reporting serves stale content to a client that cached a
13
- * slot whose render varies with the query. So an edge we cannot follow resolves
14
- * to `unknown`, and `unknown` counts as request-dependent.
15
- *
16
- * See design/19-client-navigation.md §"Why the slot comparison ignores the query".
17
- */
18
- import type { ModuleFacts } from './analysis.ts';
19
- /** Every specifier the classifier recognises without resolving it. */
20
- export declare const FRAMEWORK_SOURCES: ReadonlySet<string>;
21
- export type Origin =
22
- /** A request accessor: `getSearchParams`, `cookies`, … */
23
- {
24
- kind: 'accessor';
25
- }
26
- /** A definition factory: `defineSearchParams`, `defineCookie`. */
27
- | {
28
- kind: 'factory';
29
- }
30
- /** A value minted by a definition factory — `.get()` on it reads the request. */
31
- | {
32
- kind: 'definition';
33
- }
34
- /** A namespace object for a framework module (`import * as h from 'next/headers'`). */
35
- | {
36
- kind: 'framework-namespace';
37
- source: string;
38
- }
39
- /** A namespace object for an app module. */
40
- | {
41
- kind: 'namespace';
42
- moduleId: string;
43
- }
44
- /** An edge that could not be followed. Treated as request-dependent. */
45
- | {
46
- kind: 'unknown';
47
- }
48
- /** Resolved, and not interesting. */
49
- | {
50
- kind: 'none';
51
- };
52
- export interface OriginResolver {
53
- /** Does this module itself read the request? */
54
- isTainted(moduleId: string): boolean;
55
- /** Does this module hold a definition factory binding? */
56
- isDefinitionModule(moduleId: string): boolean;
57
- /** Does this module call `.get()` on a binding it imported? */
58
- callsGetterOnImport(moduleId: string): boolean;
59
- }
60
- export declare function createOriginResolver(factsMap: ReadonlyMap<string, ModuleFacts>): OriginResolver;
61
- //# sourceMappingURL=origin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"origin.d.ts","sourceRoot":"","sources":["../../../src/plugins/request-dep/origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAyB,WAAW,EAAE,MAAM,eAAe,CAAC;AAwBxE,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAGhD,CAAC;AAIH,MAAM,MAAM,MAAM;AAChB,0DAA0D;AACxD;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE;AACtB,kEAAkE;GAChE;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE;AACrB,iFAAiF;GAC/E;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE;AACxB,uFAAuF;GACrF;IAAE,IAAI,EAAE,qBAAqB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACjD,4CAA4C;GAC1C;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AACzC,wEAAwE;GACtE;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE;AACrB,qCAAqC;GACnC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAkCrB,MAAM,WAAW,cAAc;IAC7B,gDAAgD;IAChD,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACrC,0DAA0D;IAC1D,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9C,+DAA+D;IAC/D,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAChD;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,cAAc,CA0M/F"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Static request-dependency lookup.
3
- *
4
- * Queries the Vite plugin's precomputed module-graph analysis to determine
5
- * whether a segment's entry file (layout/page/default) is request-dependent.
6
- *
7
- * In dev: the plugin registers a resolver function via Symbol.for bridge
8
- * that lazily walks the RSC module graph.
9
- * In prod: reads from the build manifest's requestDep map (set during build
10
- * and serialized into the manifest init script by the adapter).
11
- *
12
- * Returns true (conservative) when no data is available.
13
- */
14
- export declare function isStaticRequestDependent(filePath: string): boolean;
15
- //# sourceMappingURL=request-dep.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request-dep.d.ts","sourceRoot":"","sources":["../../src/server/request-dep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAkBlE"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Pure helpers for `route-element-builder.ts` — tree inspection and rewriting
3
- * that need no request state. Split out so the builder stays within the
4
- * 500-line limit as its wrapping steps grew (TIM-1450).
5
- */
6
- /**
7
- * Replace the outermost SegmentOutlet in a partial payload with its
8
- * SegmentProvider child. Walks through AccessGate wrappers (which sit
9
- * outside SegmentOutlet) to find the outlet.
10
- */
11
- export declare function replaceOutermostSegmentOutlet(element: React.ReactElement, replacement: React.ReactElement): React.ReactElement;
12
- //# sourceMappingURL=route-element-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"route-element-helpers.d.ts","sourceRoot":"","sources":["../../src/server/route-element-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,KAAK,CAAC,YAAY,EAC3B,WAAW,EAAE,KAAK,CAAC,YAAY,GAC9B,KAAK,CAAC,YAAY,CAgBpB"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Skippable-prefix computation.
3
- *
4
- * Determines which layouts can be skipped on a partial navigation by
5
- * computing a contiguous prefix of segments whose cached layouts need
6
- * not re-render. Extracted from `route-element-builder.ts` to keep it
7
- * under the 500-line limit (design/18-build-system.md).
8
- *
9
- * See design/19-client-navigation.md §"X-Timber-State-Tree Header".
10
- */
11
- import type { ManifestSegmentNode } from './route-matcher.ts';
12
- import type { RouteMatch } from './pipeline.ts';
13
- import { type ClientStateTree } from './state-tree-diff.ts';
14
- /**
15
- * Compute the set of segment indices whose layouts can be skipped.
16
- *
17
- * Three sub-rules in order:
18
- * (a) Contiguous prefix via `shouldSkipSegment` — stop at the first
19
- * non-skippable layout.
20
- * (b) If every layout landed in the prefix, remove the innermost one
21
- * as the merge point (the client needs a mounted outlet there).
22
- * (c) Cross-section guard — clear the whole set unless at least one
23
- * non-skipped layout's key is in `clientStateTree`.
24
- *
25
- * After the prefix is computed, `truncateSkippableForChangedSlots`
26
- * removes any segment whose parallel slots changed content.
27
- */
28
- export declare function computeSkippableSet(segments: ManifestSegmentNode[], segmentKeys: string[], layoutBySegment: Map<ManifestSegmentNode, unknown>, clientStateTree: ClientStateTree | null | undefined, match: RouteMatch, req: Request): Set<number>;
29
- //# sourceMappingURL=skippable-prefix.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skippable-prefix.d.ts","sourceRoot":"","sources":["../../src/server/skippable-prefix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAqC,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM/F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,WAAW,EAAE,MAAM,EAAE,EACrB,eAAe,EAAE,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,EAClD,eAAe,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,EACnD,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,OAAO,GACX,GAAG,CAAC,MAAM,CAAC,CAyEb"}