@timber-js/app 0.2.0-alpha.23 → 0.2.0-alpha.230

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 (1560) hide show
  1. package/LICENSE +8 -0
  2. package/agent-skill.md +376 -0
  3. package/bin/timber.mjs +15 -1
  4. package/dist/_chunks/actions-DHum77eH.js +1272 -0
  5. package/dist/_chunks/actions-DHum77eH.js.map +1 -0
  6. package/dist/_chunks/als-registry-DpygwCp0.js +42 -0
  7. package/dist/_chunks/als-registry-DpygwCp0.js.map +1 -0
  8. package/dist/_chunks/als-slots-kbQrHTzm.js +25 -0
  9. package/dist/_chunks/als-slots-kbQrHTzm.js.map +1 -0
  10. package/dist/_chunks/base-path-DDIx0FXe.js +79 -0
  11. package/dist/_chunks/base-path-DDIx0FXe.js.map +1 -0
  12. package/dist/_chunks/build-output-helper-5UsltK-S.js +398 -0
  13. package/dist/_chunks/build-output-helper-5UsltK-S.js.map +1 -0
  14. package/dist/_chunks/cache-api-BZJNt01a.js +1282 -0
  15. package/dist/_chunks/cache-api-BZJNt01a.js.map +1 -0
  16. package/dist/_chunks/canonicalize-CqK135BN.js +117 -0
  17. package/dist/_chunks/canonicalize-CqK135BN.js.map +1 -0
  18. package/dist/_chunks/chains-D-RRc7CM.js +266 -0
  19. package/dist/_chunks/chains-D-RRc7CM.js.map +1 -0
  20. package/dist/_chunks/chains-KblEfYzm.js +1 -0
  21. package/dist/_chunks/classify-_W0RWa5w.js +146 -0
  22. package/dist/_chunks/classify-_W0RWa5w.js.map +1 -0
  23. package/dist/_chunks/cli-check-B-JZkpBD.js +251 -0
  24. package/dist/_chunks/cli-check-B-JZkpBD.js.map +1 -0
  25. package/dist/_chunks/cli-context-BPdyA7Fp.js +1 -0
  26. package/dist/_chunks/cli-context-CwTKMjVe.js +77 -0
  27. package/dist/_chunks/cli-context-CwTKMjVe.js.map +1 -0
  28. package/dist/_chunks/cli-dev-status-prPMLU8G.js +138 -0
  29. package/dist/_chunks/cli-dev-status-prPMLU8G.js.map +1 -0
  30. package/dist/_chunks/cli-init-BoXOYYil.js +196 -0
  31. package/dist/_chunks/cli-init-BoXOYYil.js.map +1 -0
  32. package/dist/_chunks/cli-schema-sync-CAllbqRB.js +289 -0
  33. package/dist/_chunks/cli-schema-sync-CAllbqRB.js.map +1 -0
  34. package/dist/_chunks/cli-schema-sync-y_8ijmzO.js +1 -0
  35. package/dist/_chunks/client-dep-entries-C9hv-3k9.js +109 -0
  36. package/dist/_chunks/client-dep-entries-C9hv-3k9.js.map +1 -0
  37. package/dist/_chunks/cloudflare-_2fhxQE8.js +1314 -0
  38. package/dist/_chunks/cloudflare-_2fhxQE8.js.map +1 -0
  39. package/dist/_chunks/codec-registry-CPc6bjVl.js +20 -0
  40. package/dist/_chunks/codec-registry-CPc6bjVl.js.map +1 -0
  41. package/dist/_chunks/codegen-B9oWkWGf.js +429 -0
  42. package/dist/_chunks/codegen-B9oWkWGf.js.map +1 -0
  43. package/dist/_chunks/convention-lint-CrDKERHg.js +578 -0
  44. package/dist/_chunks/convention-lint-CrDKERHg.js.map +1 -0
  45. package/dist/_chunks/dev-discovery-YnabkCKD.js +238 -0
  46. package/dist/_chunks/dev-discovery-YnabkCKD.js.map +1 -0
  47. package/dist/_chunks/dev-server-L8biS7Az.js +1 -0
  48. package/dist/_chunks/dev-server-Rq659RR1.js +2439 -0
  49. package/dist/_chunks/dev-server-Rq659RR1.js.map +1 -0
  50. package/dist/_chunks/dev-span-_NzMX-au.js +108 -0
  51. package/dist/_chunks/dev-span-_NzMX-au.js.map +1 -0
  52. package/dist/_chunks/dev-store-BvdqtHvK.js +327 -0
  53. package/dist/_chunks/dev-store-BvdqtHvK.js.map +1 -0
  54. package/dist/_chunks/dist-C1Rjlo6s.js +384 -0
  55. package/dist/_chunks/dist-C1Rjlo6s.js.map +1 -0
  56. package/dist/_chunks/error-boundary-OHK1mI99.js +1100 -0
  57. package/dist/_chunks/error-boundary-OHK1mI99.js.map +1 -0
  58. package/dist/_chunks/fast-hash-DddxkU5Y.js +40 -0
  59. package/dist/_chunks/fast-hash-DddxkU5Y.js.map +1 -0
  60. package/dist/_chunks/flight-source-node-BGanuoSS.js +516 -0
  61. package/dist/_chunks/flight-source-node-BGanuoSS.js.map +1 -0
  62. package/dist/_chunks/format-DuPOoXUP.js +13 -0
  63. package/dist/_chunks/format-DuPOoXUP.js.map +1 -0
  64. package/dist/_chunks/fs-identity-BmQ_Agg-.js +205 -0
  65. package/dist/_chunks/fs-identity-BmQ_Agg-.js.map +1 -0
  66. package/dist/_chunks/global-context-CFSSysdJ.js +77 -0
  67. package/dist/_chunks/global-context-CFSSysdJ.js.map +1 -0
  68. package/dist/_chunks/graph-cache-B1LAg4t7.js +219 -0
  69. package/dist/_chunks/graph-cache-B1LAg4t7.js.map +1 -0
  70. package/dist/_chunks/href-validation-CEZy1V-k.js +210 -0
  71. package/dist/_chunks/href-validation-CEZy1V-k.js.map +1 -0
  72. package/dist/_chunks/json-lossy-check-BXM45k8p.js +65 -0
  73. package/dist/_chunks/json-lossy-check-BXM45k8p.js.map +1 -0
  74. package/dist/_chunks/live-graph-C7-yA8W9.js +150 -0
  75. package/dist/_chunks/live-graph-C7-yA8W9.js.map +1 -0
  76. package/dist/_chunks/logger-YtMSKfft.js +755 -0
  77. package/dist/_chunks/logger-YtMSKfft.js.map +1 -0
  78. package/dist/_chunks/{metadata-routes-Cjmvi3rQ.js → metadata-routes-BL26HCDd.js} +71 -29
  79. package/dist/_chunks/metadata-routes-BL26HCDd.js.map +1 -0
  80. package/dist/_chunks/navigation-root-CoGHIMiE.js +239 -0
  81. package/dist/_chunks/navigation-root-CoGHIMiE.js.map +1 -0
  82. package/dist/_chunks/node-response-D3hXWb8y.js +267 -0
  83. package/dist/_chunks/node-response-D3hXWb8y.js.map +1 -0
  84. package/dist/_chunks/param-value-DqlGfF57.js +65 -0
  85. package/dist/_chunks/param-value-DqlGfF57.js.map +1 -0
  86. package/dist/_chunks/plugin-context-BfSRKJfz.js +1 -0
  87. package/dist/_chunks/plugin-context-FCkaNLUB.js +327 -0
  88. package/dist/_chunks/plugin-context-FCkaNLUB.js.map +1 -0
  89. package/dist/_chunks/poison-rules-Bmz-lCPi.js +109 -0
  90. package/dist/_chunks/poison-rules-Bmz-lCPi.js.map +1 -0
  91. package/dist/_chunks/poison-scan-CRSP06Es.js +98 -0
  92. package/dist/_chunks/poison-scan-CRSP06Es.js.map +1 -0
  93. package/dist/_chunks/purge-store-8BqLAYZ1.js +13 -0
  94. package/dist/_chunks/purge-store-8BqLAYZ1.js.map +1 -0
  95. package/dist/_chunks/render-timeout-MrrqD1wd.js +53 -0
  96. package/dist/_chunks/render-timeout-MrrqD1wd.js.map +1 -0
  97. package/dist/_chunks/resolve-schema-B-aCuTu3.js +49 -0
  98. package/dist/_chunks/resolve-schema-B-aCuTu3.js.map +1 -0
  99. package/dist/_chunks/route-methods-Dk2kZc0n.js +36 -0
  100. package/dist/_chunks/route-methods-Dk2kZc0n.js.map +1 -0
  101. package/dist/_chunks/rsc-cache-key-D0cb0Gmc.js +242 -0
  102. package/dist/_chunks/rsc-cache-key-D0cb0Gmc.js.map +1 -0
  103. package/dist/_chunks/rsc-media-type-m8jz9u6_.js +60 -0
  104. package/dist/_chunks/rsc-media-type-m8jz9u6_.js.map +1 -0
  105. package/dist/_chunks/rsc-payload-path-EphpDB-J.js +53 -0
  106. package/dist/_chunks/rsc-payload-path-EphpDB-J.js.map +1 -0
  107. package/dist/_chunks/scan-CyizcBiX.js +139 -0
  108. package/dist/_chunks/scan-CyizcBiX.js.map +1 -0
  109. package/dist/_chunks/scanner-BNQ4qnLX.js +2048 -0
  110. package/dist/_chunks/scanner-BNQ4qnLX.js.map +1 -0
  111. package/dist/_chunks/schema-bridge-DyRs3cqy.js +235 -0
  112. package/dist/_chunks/schema-bridge-DyRs3cqy.js.map +1 -0
  113. package/dist/_chunks/segment-classify-Ho8jXWeC.js +195 -0
  114. package/dist/_chunks/segment-classify-Ho8jXWeC.js.map +1 -0
  115. package/dist/_chunks/segment-context-GAyTjjtS.js +33 -0
  116. package/dist/_chunks/segment-context-GAyTjjtS.js.map +1 -0
  117. package/dist/_chunks/segment-keys-Y60KNc8C.js +61 -0
  118. package/dist/_chunks/segment-keys-Y60KNc8C.js.map +1 -0
  119. package/dist/_chunks/singleflight-CzoOVB9Y.js +53 -0
  120. package/dist/_chunks/singleflight-CzoOVB9Y.js.map +1 -0
  121. package/dist/_chunks/sizeof-Cmx6Fs-Y.js +35 -0
  122. package/dist/_chunks/sizeof-Cmx6Fs-Y.js.map +1 -0
  123. package/dist/_chunks/ssr-data-9hPtcNOr.js +48 -0
  124. package/dist/_chunks/ssr-data-9hPtcNOr.js.map +1 -0
  125. package/dist/_chunks/state-B-EBjeER.js +49 -0
  126. package/dist/_chunks/state-B-EBjeER.js.map +1 -0
  127. package/dist/_chunks/status-page-marker-U6B1aFMb.js +530 -0
  128. package/dist/_chunks/status-page-marker-U6B1aFMb.js.map +1 -0
  129. package/dist/_chunks/tree-match-Bqdr9szG.js +168 -0
  130. package/dist/_chunks/tree-match-Bqdr9szG.js.map +1 -0
  131. package/dist/_chunks/use-query-states-pkDV-jSg.js +223 -0
  132. package/dist/_chunks/use-query-states-pkDV-jSg.js.map +1 -0
  133. package/dist/_chunks/walkers-D_QHR_nf.js +142 -0
  134. package/dist/_chunks/walkers-D_QHR_nf.js.map +1 -0
  135. package/dist/_chunks/write-file-atomic-DW8m_Atv.js +31 -0
  136. package/dist/_chunks/write-file-atomic-DW8m_Atv.js.map +1 -0
  137. package/dist/adapters/build-output-helper.d.ts +81 -0
  138. package/dist/adapters/build-output-helper.d.ts.map +1 -0
  139. package/dist/adapters/canonicalize-module.d.ts +8 -0
  140. package/dist/adapters/canonicalize-module.d.ts.map +1 -0
  141. package/dist/adapters/cloudflare-dev.d.ts +109 -0
  142. package/dist/adapters/cloudflare-dev.d.ts.map +1 -0
  143. package/dist/adapters/cloudflare-dev.js +73 -0
  144. package/dist/adapters/cloudflare-dev.js.map +1 -0
  145. package/dist/adapters/cloudflare-kv-cache.d.ts +64 -0
  146. package/dist/adapters/cloudflare-kv-cache.d.ts.map +1 -0
  147. package/dist/adapters/cloudflare-kv-cache.js +122 -0
  148. package/dist/adapters/cloudflare-kv-cache.js.map +1 -0
  149. package/dist/adapters/cloudflare.d.ts +217 -24
  150. package/dist/adapters/cloudflare.d.ts.map +1 -1
  151. package/dist/adapters/cloudflare.js +1 -188
  152. package/dist/adapters/compress-module.d.ts +25 -4
  153. package/dist/adapters/compress-module.d.ts.map +1 -1
  154. package/dist/adapters/fs-identity.d.ts +63 -0
  155. package/dist/adapters/fs-identity.d.ts.map +1 -0
  156. package/dist/adapters/nitro-immutable-assets.d.ts +47 -0
  157. package/dist/adapters/nitro-immutable-assets.d.ts.map +1 -0
  158. package/dist/adapters/nitro-presets.d.ts +37 -0
  159. package/dist/adapters/nitro-presets.d.ts.map +1 -0
  160. package/dist/adapters/nitro-preview.d.ts +65 -0
  161. package/dist/adapters/nitro-preview.d.ts.map +1 -0
  162. package/dist/adapters/nitro.d.ts +69 -38
  163. package/dist/adapters/nitro.d.ts.map +1 -1
  164. package/dist/adapters/nitro.js +837 -347
  165. package/dist/adapters/nitro.js.map +1 -1
  166. package/dist/adapters/shared.d.ts +85 -0
  167. package/dist/adapters/shared.d.ts.map +1 -0
  168. package/dist/adapters/types.d.ts +124 -16
  169. package/dist/adapters/types.d.ts.map +1 -1
  170. package/dist/adapters/types.js +0 -0
  171. package/dist/analyze/chains.d.ts +124 -0
  172. package/dist/analyze/chains.d.ts.map +1 -0
  173. package/dist/analyze/classify.d.ts +153 -0
  174. package/dist/analyze/classify.d.ts.map +1 -0
  175. package/dist/analyze/crawl-entry.d.ts +17 -0
  176. package/dist/analyze/crawl-entry.d.ts.map +1 -0
  177. package/dist/analyze/crawl-entry.js +312 -0
  178. package/dist/analyze/crawl-entry.js.map +1 -0
  179. package/dist/analyze/crawl.d.ts +134 -0
  180. package/dist/analyze/crawl.d.ts.map +1 -0
  181. package/dist/analyze/graph-cache.d.ts +104 -0
  182. package/dist/analyze/graph-cache.d.ts.map +1 -0
  183. package/dist/analyze/graph-command.d.ts +43 -0
  184. package/dist/analyze/graph-command.d.ts.map +1 -0
  185. package/dist/analyze/graph-command.js +386 -0
  186. package/dist/analyze/graph-command.js.map +1 -0
  187. package/dist/analyze/live-graph.d.ts +81 -0
  188. package/dist/analyze/live-graph.d.ts.map +1 -0
  189. package/dist/analyze/poison-rules.d.ts +72 -0
  190. package/dist/analyze/poison-rules.d.ts.map +1 -0
  191. package/dist/analyze/poison-scan.d.ts +48 -0
  192. package/dist/analyze/poison-scan.d.ts.map +1 -0
  193. package/dist/analyze/scan.d.ts +73 -0
  194. package/dist/analyze/scan.d.ts.map +1 -0
  195. package/dist/cache/cache-api.d.ts +48 -0
  196. package/dist/cache/cache-api.d.ts.map +1 -0
  197. package/dist/cache/fast-hash.d.ts +5 -0
  198. package/dist/cache/fast-hash.d.ts.map +1 -1
  199. package/dist/cache/guarded-read.d.ts +29 -0
  200. package/dist/cache/guarded-read.d.ts.map +1 -0
  201. package/dist/cache/handler-store.d.ts +45 -0
  202. package/dist/cache/handler-store.d.ts.map +1 -0
  203. package/dist/cache/index.d.ts +32 -9
  204. package/dist/cache/index.d.ts.map +1 -1
  205. package/dist/cache/index.js +4 -326
  206. package/dist/cache/invalidation-epoch.d.ts +50 -0
  207. package/dist/cache/invalidation-epoch.d.ts.map +1 -0
  208. package/dist/cache/json-lossy-check.d.ts +11 -0
  209. package/dist/cache/json-lossy-check.d.ts.map +1 -0
  210. package/dist/cache/key-discipline.d.ts +61 -0
  211. package/dist/cache/key-discipline.d.ts.map +1 -0
  212. package/dist/cache/redis-handler.d.ts +140 -9
  213. package/dist/cache/redis-handler.d.ts.map +1 -1
  214. package/dist/cache/singleflight.d.ts +31 -2
  215. package/dist/cache/singleflight.d.ts.map +1 -1
  216. package/dist/cache/sizeof.d.ts +22 -0
  217. package/dist/cache/sizeof.d.ts.map +1 -0
  218. package/dist/cache/stable-stringify.d.ts +15 -0
  219. package/dist/cache/stable-stringify.d.ts.map +1 -1
  220. package/dist/cache/store.d.ts +53 -0
  221. package/dist/cache/store.d.ts.map +1 -0
  222. package/dist/cache/stores/cloudflare-kv.d.ts +38 -0
  223. package/dist/cache/stores/cloudflare-kv.d.ts.map +1 -0
  224. package/dist/cache/stores/cloudflare-kv.js +28 -0
  225. package/dist/cache/stores/cloudflare-kv.js.map +1 -0
  226. package/dist/cache/stores/memory.d.ts +42 -0
  227. package/dist/cache/stores/memory.d.ts.map +1 -0
  228. package/dist/cache/stores/memory.js +89 -0
  229. package/dist/cache/stores/memory.js.map +1 -0
  230. package/dist/cache/stores/redis.d.ts +69 -0
  231. package/dist/cache/stores/redis.d.ts.map +1 -0
  232. package/dist/cache/stores/redis.js +34 -0
  233. package/dist/cache/stores/redis.js.map +1 -0
  234. package/dist/cache/stores/vercel.d.ts +36 -0
  235. package/dist/cache/stores/vercel.d.ts.map +1 -0
  236. package/dist/cache/stores/vercel.js +32 -0
  237. package/dist/cache/stores/vercel.js.map +1 -0
  238. package/dist/cache/tag-aware-handler.d.ts +51 -0
  239. package/dist/cache/tag-aware-handler.d.ts.map +1 -0
  240. package/dist/cache/timber-cache.d.ts +25 -11
  241. package/dist/cache/timber-cache.d.ts.map +1 -1
  242. package/dist/cdn/cloudflare-purge.d.ts +23 -0
  243. package/dist/cdn/cloudflare-purge.d.ts.map +1 -0
  244. package/dist/cdn/cloudflare-purge.js +29 -0
  245. package/dist/cdn/cloudflare-purge.js.map +1 -0
  246. package/dist/cdn/fastly-purge.d.ts +25 -0
  247. package/dist/cdn/fastly-purge.d.ts.map +1 -0
  248. package/dist/cdn/fastly-purge.js +32 -0
  249. package/dist/cdn/fastly-purge.js.map +1 -0
  250. package/dist/cdn/headers.d.ts +97 -0
  251. package/dist/cdn/headers.d.ts.map +1 -0
  252. package/dist/cdn/index.d.ts +5 -0
  253. package/dist/cdn/index.d.ts.map +1 -0
  254. package/dist/cdn/index.js +93 -0
  255. package/dist/cdn/index.js.map +1 -0
  256. package/dist/cdn/purge-store.d.ts +32 -0
  257. package/dist/cdn/purge-store.d.ts.map +1 -0
  258. package/dist/cdn/workers-cache-purge.d.ts +20 -0
  259. package/dist/cdn/workers-cache-purge.d.ts.map +1 -0
  260. package/dist/cdn/workers-cache-purge.js +33 -0
  261. package/dist/cdn/workers-cache-purge.js.map +1 -0
  262. package/dist/cli-check.d.ts +133 -0
  263. package/dist/cli-check.d.ts.map +1 -0
  264. package/dist/cli-context.d.ts +62 -0
  265. package/dist/cli-context.d.ts.map +1 -0
  266. package/dist/cli-dev-status.d.ts +75 -0
  267. package/dist/cli-dev-status.d.ts.map +1 -0
  268. package/dist/cli-init.d.ts +72 -0
  269. package/dist/cli-init.d.ts.map +1 -0
  270. package/dist/cli-schema-sync.d.ts +59 -0
  271. package/dist/cli-schema-sync.d.ts.map +1 -0
  272. package/dist/cli.d.ts +80 -16
  273. package/dist/cli.d.ts.map +1 -1
  274. package/dist/cli.js +210 -69
  275. package/dist/cli.js.map +1 -1
  276. package/dist/client/browser-dev.d.ts +42 -2
  277. package/dist/client/browser-dev.d.ts.map +1 -1
  278. package/dist/client/browser-entry/action-dispatch.d.ts +19 -0
  279. package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -0
  280. package/dist/client/browser-entry/action-queue.d.ts +64 -0
  281. package/dist/client/browser-entry/action-queue.d.ts.map +1 -0
  282. package/dist/client/browser-entry/form-state.d.ts +22 -0
  283. package/dist/client/browser-entry/form-state.d.ts.map +1 -0
  284. package/dist/client/browser-entry/hmr.d.ts +27 -0
  285. package/dist/client/browser-entry/hmr.d.ts.map +1 -0
  286. package/dist/client/browser-entry/hydrate.d.ts +61 -0
  287. package/dist/client/browser-entry/hydrate.d.ts.map +1 -0
  288. package/dist/client/browser-entry/index.d.ts +32 -0
  289. package/dist/client/browser-entry/index.d.ts.map +1 -0
  290. package/dist/client/browser-entry/post-hydration.d.ts +26 -0
  291. package/dist/client/browser-entry/post-hydration.d.ts.map +1 -0
  292. package/dist/client/browser-entry/router-init.d.ts +41 -0
  293. package/dist/client/browser-entry/router-init.d.ts.map +1 -0
  294. package/dist/client/browser-entry/rsc-stream.d.ts +35 -0
  295. package/dist/client/browser-entry/rsc-stream.d.ts.map +1 -0
  296. package/dist/client/browser-entry/scroll.d.ts +28 -0
  297. package/dist/client/browser-entry/scroll.d.ts.map +1 -0
  298. package/dist/client/deny-last-resort.d.ts +29 -0
  299. package/dist/client/deny-last-resort.d.ts.map +1 -0
  300. package/dist/client/dev-pill/index.d.ts +32 -0
  301. package/dist/client/dev-pill/index.d.ts.map +1 -0
  302. package/dist/client/dev-pill/store.d.ts +105 -0
  303. package/dist/client/dev-pill/store.d.ts.map +1 -0
  304. package/dist/client/dev-pill/view.d.ts +9 -0
  305. package/dist/client/dev-pill/view.d.ts.map +1 -0
  306. package/dist/client/error-boundary.d.ts +58 -9
  307. package/dist/client/error-boundary.d.ts.map +1 -1
  308. package/dist/client/error-boundary.js +1 -126
  309. package/dist/client/error-reconstituter.d.ts +55 -0
  310. package/dist/client/error-reconstituter.d.ts.map +1 -0
  311. package/dist/client/form.d.ts +38 -99
  312. package/dist/client/form.d.ts.map +1 -1
  313. package/dist/client/global-context.d.ts +35 -0
  314. package/dist/client/global-context.d.ts.map +1 -0
  315. package/dist/client/history.d.ts +50 -9
  316. package/dist/client/history.d.ts.map +1 -1
  317. package/dist/client/index.d.ts +22 -33
  318. package/dist/client/index.d.ts.map +1 -1
  319. package/dist/client/index.js +416 -1241
  320. package/dist/client/index.js.map +1 -1
  321. package/dist/client/internal.d.ts +20 -0
  322. package/dist/client/internal.d.ts.map +1 -0
  323. package/dist/client/internal.js +785 -0
  324. package/dist/client/internal.js.map +1 -0
  325. package/dist/client/link.d.ts +85 -60
  326. package/dist/client/link.d.ts.map +1 -1
  327. package/dist/client/location-search.d.ts +12 -0
  328. package/dist/client/location-search.d.ts.map +1 -0
  329. package/dist/client/navigation-api.d.ts +95 -0
  330. package/dist/client/navigation-api.d.ts.map +1 -0
  331. package/dist/client/navigation-commit.d.ts +111 -0
  332. package/dist/client/navigation-commit.d.ts.map +1 -0
  333. package/dist/client/navigation-context.d.ts +75 -37
  334. package/dist/client/navigation-context.d.ts.map +1 -1
  335. package/dist/client/navigation-root.d.ts +106 -0
  336. package/dist/client/navigation-root.d.ts.map +1 -0
  337. package/dist/client/navigation-transition.d.ts +255 -0
  338. package/dist/client/navigation-transition.d.ts.map +1 -0
  339. package/dist/client/nuqs-adapter.d.ts +5 -2
  340. package/dist/client/nuqs-adapter.d.ts.map +1 -1
  341. package/dist/client/params-context.d.ts +81 -0
  342. package/dist/client/params-context.d.ts.map +1 -0
  343. package/dist/client/react-root.d.ts +51 -0
  344. package/dist/client/react-root.d.ts.map +1 -0
  345. package/dist/client/router-effects.d.ts +203 -0
  346. package/dist/client/router-effects.d.ts.map +1 -0
  347. package/dist/client/router-lifecycle.d.ts +107 -0
  348. package/dist/client/router-lifecycle.d.ts.map +1 -0
  349. package/dist/client/router-pipeline.d.ts +81 -0
  350. package/dist/client/router-pipeline.d.ts.map +1 -0
  351. package/dist/client/router-ref.d.ts +2 -2
  352. package/dist/client/router-ref.d.ts.map +1 -1
  353. package/dist/client/router-skew.d.ts +21 -0
  354. package/dist/client/router-skew.d.ts.map +1 -0
  355. package/dist/client/router-types.d.ts +294 -0
  356. package/dist/client/router-types.d.ts.map +1 -0
  357. package/dist/client/router-url.d.ts +24 -0
  358. package/dist/client/router-url.d.ts.map +1 -0
  359. package/dist/client/router.d.ts +1 -97
  360. package/dist/client/router.d.ts.map +1 -1
  361. package/dist/client/rsc-fetch.d.ts +110 -28
  362. package/dist/client/rsc-fetch.d.ts.map +1 -1
  363. package/dist/client/segment-cache.d.ts +186 -25
  364. package/dist/client/segment-cache.d.ts.map +1 -1
  365. package/dist/client/segment-context.d.ts.map +1 -1
  366. package/dist/client/segment-outlet.d.ts +68 -0
  367. package/dist/client/segment-outlet.d.ts.map +1 -0
  368. package/dist/client/segment-update-context.d.ts +15 -0
  369. package/dist/client/segment-update-context.d.ts.map +1 -0
  370. package/dist/client/shallow-url.d.ts +10 -0
  371. package/dist/client/shallow-url.d.ts.map +1 -0
  372. package/dist/client/slot-content-cache-context.d.ts +35 -0
  373. package/dist/client/slot-content-cache-context.d.ts.map +1 -0
  374. package/dist/client/slot-context.d.ts +31 -0
  375. package/dist/client/slot-context.d.ts.map +1 -0
  376. package/dist/client/slot-outlet.d.ts +16 -0
  377. package/dist/client/slot-outlet.d.ts.map +1 -0
  378. package/dist/client/slot-provider.d.ts +25 -0
  379. package/dist/client/slot-provider.d.ts.map +1 -0
  380. package/dist/client/ssr-data.d.ts +26 -50
  381. package/dist/client/ssr-data.d.ts.map +1 -1
  382. package/dist/client/stale-client.d.ts +69 -0
  383. package/dist/client/stale-client.d.ts.map +1 -0
  384. package/dist/client/state.d.ts +21 -13
  385. package/dist/client/state.d.ts.map +1 -1
  386. package/dist/client/status-page-marker.d.ts +25 -0
  387. package/dist/client/status-page-marker.d.ts.map +1 -0
  388. package/dist/client/top-loader.d.ts +7 -6
  389. package/dist/client/top-loader.d.ts.map +1 -1
  390. package/dist/client/unload-guard.d.ts +5 -0
  391. package/dist/client/unload-guard.d.ts.map +1 -1
  392. package/dist/client/use-cookie.d.ts +25 -0
  393. package/dist/client/use-cookie.d.ts.map +1 -1
  394. package/dist/client/use-field-state.d.ts +42 -0
  395. package/dist/client/use-field-state.d.ts.map +1 -0
  396. package/dist/client/use-link-status.d.ts +5 -5
  397. package/dist/client/use-link-status.d.ts.map +1 -1
  398. package/dist/client/use-pathname.d.ts +13 -11
  399. package/dist/client/use-pathname.d.ts.map +1 -1
  400. package/dist/client/use-pending-navigation.d.ts +47 -0
  401. package/dist/client/use-pending-navigation.d.ts.map +1 -0
  402. package/dist/client/use-query-states.d.ts +10 -4
  403. package/dist/client/use-query-states.d.ts.map +1 -1
  404. package/dist/client/use-router.d.ts +15 -8
  405. package/dist/client/use-router.d.ts.map +1 -1
  406. package/dist/client/use-search-params.d.ts +15 -8
  407. package/dist/client/use-search-params.d.ts.map +1 -1
  408. package/dist/client/use-segment-params.d.ts +55 -0
  409. package/dist/client/use-segment-params.d.ts.map +1 -0
  410. package/dist/codec.d.ts +69 -0
  411. package/dist/codec.d.ts.map +1 -0
  412. package/dist/codec.js +75 -0
  413. package/dist/codec.js.map +1 -0
  414. package/dist/config-types.d.ts +366 -0
  415. package/dist/config-types.d.ts.map +1 -0
  416. package/dist/config-validation.d.ts +68 -0
  417. package/dist/config-validation.d.ts.map +1 -0
  418. package/dist/cookies/define-cookie.d.ts +58 -25
  419. package/dist/cookies/define-cookie.d.ts.map +1 -1
  420. package/dist/cookies/index.d.ts +3 -2
  421. package/dist/cookies/index.d.ts.map +1 -1
  422. package/dist/cookies/index.js +230 -37
  423. package/dist/cookies/index.js.map +1 -1
  424. package/dist/cookies/json-cookie.d.ts +64 -0
  425. package/dist/cookies/json-cookie.d.ts.map +1 -0
  426. package/dist/cookies/validation.d.ts +34 -0
  427. package/dist/cookies/validation.d.ts.map +1 -0
  428. package/dist/dev-tools/404-page.d.ts +50 -0
  429. package/dist/dev-tools/404-page.d.ts.map +1 -0
  430. package/dist/dev-tools/await-span.d.ts +17 -0
  431. package/dist/dev-tools/await-span.d.ts.map +1 -0
  432. package/dist/dev-tools/browser-logs.d.ts +40 -0
  433. package/dist/dev-tools/browser-logs.d.ts.map +1 -0
  434. package/dist/dev-tools/dev-page-shell.d.ts +95 -0
  435. package/dist/dev-tools/dev-page-shell.d.ts.map +1 -0
  436. package/dist/dev-tools/error-page.d.ts +32 -0
  437. package/dist/dev-tools/error-page.d.ts.map +1 -0
  438. package/dist/dev-tools/holding-server.d.ts +46 -0
  439. package/dist/dev-tools/holding-server.d.ts.map +1 -0
  440. package/dist/dev-tools/hydration-overlay.d.ts +11 -0
  441. package/dist/dev-tools/hydration-overlay.d.ts.map +1 -0
  442. package/dist/dev-tools/index.d.ts +31 -0
  443. package/dist/dev-tools/index.d.ts.map +1 -0
  444. package/dist/dev-tools/instrumentation.d.ts +74 -0
  445. package/dist/dev-tools/instrumentation.d.ts.map +1 -0
  446. package/dist/{server/dev-logger.d.ts → dev-tools/logger.d.ts} +1 -1
  447. package/dist/dev-tools/logger.d.ts.map +1 -0
  448. package/dist/{plugins/dev-logs.d.ts → dev-tools/logs.d.ts} +19 -5
  449. package/dist/dev-tools/logs.d.ts.map +1 -0
  450. package/dist/{plugins/dev-error-overlay.d.ts → dev-tools/overlay.d.ts} +15 -25
  451. package/dist/dev-tools/overlay.d.ts.map +1 -0
  452. package/dist/dev-tools/span-sink.d.ts +42 -0
  453. package/dist/dev-tools/span-sink.d.ts.map +1 -0
  454. package/dist/dev-tools/stack-classifier.d.ts +34 -0
  455. package/dist/dev-tools/stack-classifier.d.ts.map +1 -0
  456. package/dist/dev-tools/terminal.d.ts +28 -0
  457. package/dist/dev-tools/terminal.d.ts.map +1 -0
  458. package/dist/fonts/ast-walk.d.ts +68 -0
  459. package/dist/fonts/ast-walk.d.ts.map +1 -0
  460. package/dist/fonts/ast.d.ts +112 -8
  461. package/dist/fonts/ast.d.ts.map +1 -1
  462. package/dist/fonts/bundle.d.ts +50 -0
  463. package/dist/fonts/bundle.d.ts.map +1 -0
  464. package/dist/fonts/css.d.ts +1 -1
  465. package/dist/fonts/dev-middleware.d.ts +22 -0
  466. package/dist/fonts/dev-middleware.d.ts.map +1 -0
  467. package/dist/fonts/fallbacks.d.ts +0 -7
  468. package/dist/fonts/fallbacks.d.ts.map +1 -1
  469. package/dist/fonts/google.d.ts +5 -3
  470. package/dist/fonts/google.d.ts.map +1 -1
  471. package/dist/fonts/local.d.ts +5 -5
  472. package/dist/fonts/local.d.ts.map +1 -1
  473. package/dist/fonts/paths.d.ts +43 -0
  474. package/dist/fonts/paths.d.ts.map +1 -0
  475. package/dist/fonts/pipeline.d.ts +177 -0
  476. package/dist/fonts/pipeline.d.ts.map +1 -0
  477. package/dist/fonts/transform.d.ts +82 -0
  478. package/dist/fonts/transform.d.ts.map +1 -0
  479. package/dist/fonts/types.d.ts +47 -1
  480. package/dist/fonts/types.d.ts.map +1 -1
  481. package/dist/fonts/virtual-modules.d.ts +77 -0
  482. package/dist/fonts/virtual-modules.d.ts.map +1 -0
  483. package/dist/index.d.ts +35 -181
  484. package/dist/index.d.ts.map +1 -1
  485. package/dist/index.js +9949 -14264
  486. package/dist/index.js.map +1 -1
  487. package/dist/params/codec-registry.d.ts +26 -0
  488. package/dist/params/codec-registry.d.ts.map +1 -0
  489. package/dist/params/define-schema.d.ts +81 -0
  490. package/dist/params/define-schema.d.ts.map +1 -0
  491. package/dist/params/index.d.ts +5 -0
  492. package/dist/params/index.d.ts.map +1 -0
  493. package/dist/params/index.js +33 -0
  494. package/dist/params/index.js.map +1 -0
  495. package/dist/params/resolve-schema.d.ts +34 -0
  496. package/dist/params/resolve-schema.d.ts.map +1 -0
  497. package/dist/plugin-context.d.ts +269 -0
  498. package/dist/plugin-context.d.ts.map +1 -0
  499. package/dist/plugins/build-manifest.d.ts +7 -3
  500. package/dist/plugins/build-manifest.d.ts.map +1 -1
  501. package/dist/plugins/build-report.d.ts +61 -11
  502. package/dist/plugins/build-report.d.ts.map +1 -1
  503. package/dist/plugins/cache.d.ts +64 -0
  504. package/dist/plugins/cache.d.ts.map +1 -0
  505. package/dist/plugins/callsite-ast.d.ts +117 -0
  506. package/dist/plugins/callsite-ast.d.ts.map +1 -0
  507. package/dist/plugins/callsite-jsx.d.ts +35 -0
  508. package/dist/plugins/callsite-jsx.d.ts.map +1 -0
  509. package/dist/plugins/chunks.d.ts +11 -4
  510. package/dist/plugins/chunks.d.ts.map +1 -1
  511. package/dist/plugins/client-chunks.d.ts +40 -0
  512. package/dist/plugins/client-chunks.d.ts.map +1 -0
  513. package/dist/plugins/client-dep-entries.d.ts +80 -0
  514. package/dist/plugins/client-dep-entries.d.ts.map +1 -0
  515. package/dist/plugins/client-in-server-package-deps.d.ts +63 -0
  516. package/dist/plugins/client-in-server-package-deps.d.ts.map +1 -0
  517. package/dist/plugins/cloudflare-wasm.d.ts +21 -0
  518. package/dist/plugins/cloudflare-wasm.d.ts.map +1 -0
  519. package/dist/plugins/content.d.ts +1 -1
  520. package/dist/plugins/content.d.ts.map +1 -1
  521. package/dist/plugins/dev-await.d.ts +81 -0
  522. package/dist/plugins/dev-await.d.ts.map +1 -0
  523. package/dist/plugins/dev-discovery.d.ts +187 -0
  524. package/dist/plugins/dev-discovery.d.ts.map +1 -0
  525. package/dist/plugins/dev-hostname.d.ts +152 -0
  526. package/dist/plugins/dev-hostname.d.ts.map +1 -0
  527. package/dist/plugins/dev-server.d.ts +29 -2
  528. package/dist/plugins/dev-server.d.ts.map +1 -1
  529. package/dist/plugins/dev-store-clear.d.ts +83 -0
  530. package/dist/plugins/dev-store-clear.d.ts.map +1 -0
  531. package/dist/plugins/encryption-runtime.d.ts +13 -0
  532. package/dist/plugins/encryption-runtime.d.ts.map +1 -0
  533. package/dist/plugins/entries.d.ts +40 -4
  534. package/dist/plugins/entries.d.ts.map +1 -1
  535. package/dist/plugins/fonts.d.ts +35 -74
  536. package/dist/plugins/fonts.d.ts.map +1 -1
  537. package/dist/plugins/graph-endpoint.d.ts +114 -0
  538. package/dist/plugins/graph-endpoint.d.ts.map +1 -0
  539. package/dist/plugins/mdx.d.ts +18 -5
  540. package/dist/plugins/mdx.d.ts.map +1 -1
  541. package/dist/plugins/optimize-package-imports-defaults.d.ts +13 -0
  542. package/dist/plugins/optimize-package-imports-defaults.d.ts.map +1 -0
  543. package/dist/plugins/optimize-package-imports.d.ts +124 -0
  544. package/dist/plugins/optimize-package-imports.d.ts.map +1 -0
  545. package/dist/plugins/orphaned-modules.d.ts +57 -0
  546. package/dist/plugins/orphaned-modules.d.ts.map +1 -0
  547. package/dist/plugins/post-build.d.ts +110 -0
  548. package/dist/plugins/post-build.d.ts.map +1 -0
  549. package/dist/plugins/prebuilt-capture.d.ts +67 -0
  550. package/dist/plugins/prebuilt-capture.d.ts.map +1 -0
  551. package/dist/plugins/prebuilt-options-analysis.d.ts +40 -0
  552. package/dist/plugins/prebuilt-options-analysis.d.ts.map +1 -0
  553. package/dist/plugins/prebuilt.d.ts +98 -0
  554. package/dist/plugins/prebuilt.d.ts.map +1 -0
  555. package/dist/plugins/prerender-sugar.d.ts +39 -0
  556. package/dist/plugins/prerender-sugar.d.ts.map +1 -0
  557. package/dist/plugins/react-resolve.d.ts +49 -0
  558. package/dist/plugins/react-resolve.d.ts.map +1 -0
  559. package/dist/plugins/request-dep/analysis.d.ts +106 -0
  560. package/dist/plugins/request-dep/analysis.d.ts.map +1 -0
  561. package/dist/plugins/request-dep/index.d.ts +75 -0
  562. package/dist/plugins/request-dep/index.d.ts.map +1 -0
  563. package/dist/plugins/request-dep/origin.d.ts +61 -0
  564. package/dist/plugins/request-dep/origin.d.ts.map +1 -0
  565. package/dist/plugins/routing.d.ts +2 -2
  566. package/dist/plugins/routing.d.ts.map +1 -1
  567. package/dist/plugins/rsc-assets-manifest.d.ts +33 -0
  568. package/dist/plugins/rsc-assets-manifest.d.ts.map +1 -0
  569. package/dist/plugins/server-bundle.d.ts +1 -1
  570. package/dist/plugins/server-bundle.d.ts.map +1 -1
  571. package/dist/plugins/shims.d.ts +29 -5
  572. package/dist/plugins/shims.d.ts.map +1 -1
  573. package/dist/plugins/static-build.d.ts +246 -26
  574. package/dist/plugins/static-build.d.ts.map +1 -1
  575. package/dist/routing/codegen-shared.d.ts +26 -0
  576. package/dist/routing/codegen-shared.d.ts.map +1 -0
  577. package/dist/routing/codegen-types.d.ts +61 -0
  578. package/dist/routing/codegen-types.d.ts.map +1 -0
  579. package/dist/routing/codegen-write.d.ts +42 -0
  580. package/dist/routing/codegen-write.d.ts.map +1 -0
  581. package/dist/routing/codegen.d.ts +8 -3
  582. package/dist/routing/codegen.d.ts.map +1 -1
  583. package/dist/routing/collision-probe.d.ts +104 -0
  584. package/dist/routing/collision-probe.d.ts.map +1 -0
  585. package/dist/routing/collision-spaces.d.ts +26 -0
  586. package/dist/routing/collision-spaces.d.ts.map +1 -0
  587. package/dist/routing/convention-lint.d.ts +55 -0
  588. package/dist/routing/convention-lint.d.ts.map +1 -0
  589. package/dist/routing/export-detect.d.ts +91 -0
  590. package/dist/routing/export-detect.d.ts.map +1 -0
  591. package/dist/routing/file-cache.d.ts +8 -0
  592. package/dist/routing/file-cache.d.ts.map +1 -0
  593. package/dist/routing/index.d.ts +13 -7
  594. package/dist/routing/index.d.ts.map +1 -1
  595. package/dist/routing/index.js +5 -2
  596. package/dist/routing/interception-overlap.d.ts +35 -0
  597. package/dist/routing/interception-overlap.d.ts.map +1 -0
  598. package/dist/routing/interception.d.ts +234 -10
  599. package/dist/routing/interception.d.ts.map +1 -1
  600. package/dist/routing/link-codegen.d.ts +105 -0
  601. package/dist/routing/link-codegen.d.ts.map +1 -0
  602. package/dist/routing/manifest-codegen.d.ts +26 -0
  603. package/dist/routing/manifest-codegen.d.ts.map +1 -0
  604. package/dist/routing/scanner.d.ts +14 -10
  605. package/dist/routing/scanner.d.ts.map +1 -1
  606. package/dist/routing/schema-validation.d.ts +35 -0
  607. package/dist/routing/schema-validation.d.ts.map +1 -0
  608. package/dist/routing/segment-classify.d.ts +114 -0
  609. package/dist/routing/segment-classify.d.ts.map +1 -0
  610. package/dist/routing/segment-codegen.d.ts +38 -0
  611. package/dist/routing/segment-codegen.d.ts.map +1 -0
  612. package/dist/routing/segment-keys.d.ts +118 -0
  613. package/dist/routing/segment-keys.d.ts.map +1 -0
  614. package/dist/routing/slot-placement.d.ts +48 -0
  615. package/dist/routing/slot-placement.d.ts.map +1 -0
  616. package/dist/routing/types.d.ts +81 -26
  617. package/dist/routing/types.d.ts.map +1 -1
  618. package/dist/routing/walkers.d.ts +57 -0
  619. package/dist/routing/walkers.d.ts.map +1 -0
  620. package/dist/rsc-runtime/dev-reference-cache.d.ts +47 -0
  621. package/dist/rsc-runtime/dev-reference-cache.d.ts.map +1 -0
  622. package/dist/rsc-runtime/encryption-runtime.d.ts +25 -0
  623. package/dist/rsc-runtime/encryption-runtime.d.ts.map +1 -0
  624. package/dist/rsc-runtime/render-flight.d.ts +14 -0
  625. package/dist/rsc-runtime/render-flight.d.ts.map +1 -0
  626. package/dist/rsc-runtime/rsc.d.ts +3 -13
  627. package/dist/rsc-runtime/rsc.d.ts.map +1 -1
  628. package/dist/rsc-runtime/server-reference-load-error.d.ts +14 -0
  629. package/dist/rsc-runtime/server-reference-load-error.d.ts.map +1 -0
  630. package/dist/rsc-runtime/server-references.d.ts +19 -0
  631. package/dist/rsc-runtime/server-references.d.ts.map +1 -0
  632. package/dist/rsc-runtime/ssr.d.ts +7 -10
  633. package/dist/rsc-runtime/ssr.d.ts.map +1 -1
  634. package/dist/rsc-runtime/transforms.d.ts +13 -0
  635. package/dist/rsc-runtime/transforms.d.ts.map +1 -0
  636. package/dist/schema-bridge.d.ts +154 -0
  637. package/dist/schema-bridge.d.ts.map +1 -0
  638. package/dist/search-params/define.d.ts +262 -0
  639. package/dist/search-params/define.d.ts.map +1 -0
  640. package/dist/search-params/index.d.ts +3 -7
  641. package/dist/search-params/index.d.ts.map +1 -1
  642. package/dist/search-params/index.js +178 -362
  643. package/dist/search-params/index.js.map +1 -1
  644. package/dist/search-params/parse-total.d.ts +81 -0
  645. package/dist/search-params/parse-total.d.ts.map +1 -0
  646. package/dist/search-params/serialize-equal.d.ts +9 -0
  647. package/dist/search-params/serialize-equal.d.ts.map +1 -0
  648. package/dist/search-params/wrappers.d.ts +76 -0
  649. package/dist/search-params/wrappers.d.ts.map +1 -0
  650. package/dist/server/abort-scope.d.ts +27 -0
  651. package/dist/server/abort-scope.d.ts.map +1 -0
  652. package/dist/server/access-gate.d.ts +110 -10
  653. package/dist/server/access-gate.d.ts.map +1 -1
  654. package/dist/server/action-client.d.ts +20 -133
  655. package/dist/server/action-client.d.ts.map +1 -1
  656. package/dist/server/action-encryption.d.ts +76 -0
  657. package/dist/server/action-encryption.d.ts.map +1 -0
  658. package/dist/server/action-handler.d.ts +60 -11
  659. package/dist/server/action-handler.d.ts.map +1 -1
  660. package/dist/server/action-schema.d.ts +126 -0
  661. package/dist/server/action-schema.d.ts.map +1 -0
  662. package/dist/server/action-types.d.ts +108 -0
  663. package/dist/server/action-types.d.ts.map +1 -0
  664. package/dist/server/actions.d.ts +78 -40
  665. package/dist/server/actions.d.ts.map +1 -1
  666. package/dist/server/als-registry.d.ts +189 -17
  667. package/dist/server/als-registry.d.ts.map +1 -1
  668. package/dist/server/body-limits.d.ts.map +1 -1
  669. package/dist/server/build-manifest.d.ts +25 -30
  670. package/dist/server/build-manifest.d.ts.map +1 -1
  671. package/dist/server/canonicalize.d.ts +53 -0
  672. package/dist/server/canonicalize.d.ts.map +1 -1
  673. package/dist/server/chain-url-parts.d.ts +82 -0
  674. package/dist/server/chain-url-parts.d.ts.map +1 -0
  675. package/dist/server/children-interception.d.ts +49 -0
  676. package/dist/server/children-interception.d.ts.map +1 -0
  677. package/dist/server/client-error-message.d.ts +12 -0
  678. package/dist/server/client-error-message.d.ts.map +1 -0
  679. package/dist/server/coalesce-tick.d.ts +40 -0
  680. package/dist/server/coalesce-tick.d.ts.map +1 -0
  681. package/dist/server/compress.d.ts +2 -0
  682. package/dist/server/compress.d.ts.map +1 -1
  683. package/dist/server/cookie-context.d.ts +156 -0
  684. package/dist/server/cookie-context.d.ts.map +1 -0
  685. package/dist/server/cookie-parsing.d.ts +65 -0
  686. package/dist/server/cookie-parsing.d.ts.map +1 -0
  687. package/dist/server/csp-nonce.d.ts +36 -0
  688. package/dist/server/csp-nonce.d.ts.map +1 -0
  689. package/dist/server/csrf.d.ts +58 -15
  690. package/dist/server/csrf.d.ts.map +1 -1
  691. package/dist/server/debug.d.ts +0 -1
  692. package/dist/server/debug.d.ts.map +1 -1
  693. package/dist/server/default-logger.d.ts +23 -0
  694. package/dist/server/default-logger.d.ts.map +1 -0
  695. package/dist/server/default-status-page.d.ts +45 -0
  696. package/dist/server/default-status-page.d.ts.map +1 -0
  697. package/dist/server/deny-boundary.d.ts +257 -0
  698. package/dist/server/deny-boundary.d.ts.map +1 -0
  699. package/dist/server/deny-renderer.d.ts +22 -15
  700. package/dist/server/deny-renderer.d.ts.map +1 -1
  701. package/dist/server/early-hints-sender.d.ts.map +1 -1
  702. package/dist/server/early-hints.d.ts +14 -12
  703. package/dist/server/early-hints.d.ts.map +1 -1
  704. package/dist/server/error-boundary-wrapper.d.ts +102 -10
  705. package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
  706. package/dist/server/error-response-headers.d.ts +3 -0
  707. package/dist/server/error-response-headers.d.ts.map +1 -0
  708. package/dist/server/fallback-error.d.ts +19 -7
  709. package/dist/server/fallback-error.d.ts.map +1 -1
  710. package/dist/server/flight-injection-state.d.ts +66 -0
  711. package/dist/server/flight-injection-state.d.ts.map +1 -0
  712. package/dist/server/flight-injector-core.d.ts +125 -0
  713. package/dist/server/flight-injector-core.d.ts.map +1 -0
  714. package/dist/server/flight-scripts.d.ts +63 -0
  715. package/dist/server/flight-scripts.d.ts.map +1 -0
  716. package/dist/server/flight-source-node.d.ts +105 -0
  717. package/dist/server/flight-source-node.d.ts.map +1 -0
  718. package/dist/server/flight-source.d.ts +136 -0
  719. package/dist/server/flight-source.d.ts.map +1 -0
  720. package/dist/server/form-data.d.ts +59 -2
  721. package/dist/server/form-data.d.ts.map +1 -1
  722. package/dist/server/form-state-flight.d.ts +32 -0
  723. package/dist/server/form-state-flight.d.ts.map +1 -0
  724. package/dist/server/head-response.d.ts +35 -0
  725. package/dist/server/head-response.d.ts.map +1 -0
  726. package/dist/server/html-injector-core.d.ts +169 -0
  727. package/dist/server/html-injector-core.d.ts.map +1 -0
  728. package/dist/server/html-injectors.d.ts +77 -47
  729. package/dist/server/html-injectors.d.ts.map +1 -1
  730. package/dist/server/index.d.ts +16 -54
  731. package/dist/server/index.d.ts.map +1 -1
  732. package/dist/server/index.js +621 -3009
  733. package/dist/server/index.js.map +1 -1
  734. package/dist/server/instrumentation.d.ts +13 -5
  735. package/dist/server/instrumentation.d.ts.map +1 -1
  736. package/dist/server/interception-gates.d.ts +49 -0
  737. package/dist/server/interception-gates.d.ts.map +1 -0
  738. package/dist/server/internal.d.ts +48 -0
  739. package/dist/server/internal.d.ts.map +1 -0
  740. package/dist/server/internal.js +5094 -0
  741. package/dist/server/internal.js.map +1 -0
  742. package/dist/server/json-status-response.d.ts +34 -0
  743. package/dist/server/json-status-response.d.ts.map +1 -0
  744. package/dist/server/logger.d.ts +105 -7
  745. package/dist/server/logger.d.ts.map +1 -1
  746. package/dist/server/metadata-collector.d.ts +75 -0
  747. package/dist/server/metadata-collector.d.ts.map +1 -0
  748. package/dist/server/metadata-platform.d.ts +2 -2
  749. package/dist/server/metadata-render.d.ts +2 -2
  750. package/dist/server/metadata-render.d.ts.map +1 -1
  751. package/dist/server/metadata-route-links.d.ts +70 -0
  752. package/dist/server/metadata-route-links.d.ts.map +1 -0
  753. package/dist/server/metadata-routes.d.ts +47 -11
  754. package/dist/server/metadata-routes.d.ts.map +1 -1
  755. package/dist/server/metadata-social.d.ts +2 -2
  756. package/dist/server/metadata.d.ts +10 -2
  757. package/dist/server/metadata.d.ts.map +1 -1
  758. package/dist/server/middleware-runner.d.ts +20 -5
  759. package/dist/server/middleware-runner.d.ts.map +1 -1
  760. package/dist/server/node-body-response.d.ts +55 -0
  761. package/dist/server/node-body-response.d.ts.map +1 -0
  762. package/dist/server/node-response.d.ts +62 -0
  763. package/dist/server/node-response.d.ts.map +1 -0
  764. package/dist/server/node-stream-transforms.d.ts +108 -0
  765. package/dist/server/node-stream-transforms.d.ts.map +1 -0
  766. package/dist/server/node-streams-platform.d.ts +21 -0
  767. package/dist/server/node-streams-platform.d.ts.map +1 -0
  768. package/dist/server/param-coercion.d.ts +91 -0
  769. package/dist/server/param-coercion.d.ts.map +1 -0
  770. package/dist/server/pipeline-helpers.d.ts +227 -0
  771. package/dist/server/pipeline-helpers.d.ts.map +1 -0
  772. package/dist/server/pipeline-interception.d.ts +100 -9
  773. package/dist/server/pipeline-interception.d.ts.map +1 -1
  774. package/dist/server/pipeline-metadata-route.d.ts +24 -0
  775. package/dist/server/pipeline-metadata-route.d.ts.map +1 -0
  776. package/dist/server/pipeline-metadata.d.ts +18 -2
  777. package/dist/server/pipeline-metadata.d.ts.map +1 -1
  778. package/dist/server/pipeline-outcome.d.ts +59 -0
  779. package/dist/server/pipeline-outcome.d.ts.map +1 -0
  780. package/dist/server/pipeline-phases.d.ts +76 -0
  781. package/dist/server/pipeline-phases.d.ts.map +1 -0
  782. package/dist/server/pipeline.d.ts +190 -23
  783. package/dist/server/pipeline.d.ts.map +1 -1
  784. package/dist/server/port-resolution.d.ts +22 -0
  785. package/dist/server/port-resolution.d.ts.map +1 -0
  786. package/dist/server/prebuilt/cache-key.d.ts +89 -0
  787. package/dist/server/prebuilt/cache-key.d.ts.map +1 -0
  788. package/dist/server/prebuilt/capture-render.d.ts +30 -0
  789. package/dist/server/prebuilt/capture-render.d.ts.map +1 -0
  790. package/dist/server/prebuilt/capture-routes.d.ts +37 -0
  791. package/dist/server/prebuilt/capture-routes.d.ts.map +1 -0
  792. package/dist/server/prebuilt/capture-state.d.ts +101 -0
  793. package/dist/server/prebuilt/capture-state.d.ts.map +1 -0
  794. package/dist/server/prebuilt/dev-store.d.ts +149 -0
  795. package/dist/server/prebuilt/dev-store.d.ts.map +1 -0
  796. package/dist/server/prebuilt/lifetime.d.ts +38 -0
  797. package/dist/server/prebuilt/lifetime.d.ts.map +1 -0
  798. package/dist/server/prebuilt/manifest-tag-index.d.ts +27 -0
  799. package/dist/server/prebuilt/manifest-tag-index.d.ts.map +1 -0
  800. package/dist/server/prebuilt/overlay.d.ts +119 -0
  801. package/dist/server/prebuilt/overlay.d.ts.map +1 -0
  802. package/dist/server/prebuilt/payload-source.d.ts +87 -0
  803. package/dist/server/prebuilt/payload-source.d.ts.map +1 -0
  804. package/dist/server/prebuilt/slots.d.ts +105 -0
  805. package/dist/server/prebuilt/slots.d.ts.map +1 -0
  806. package/dist/server/prebuilt/synthetic-store.d.ts +67 -0
  807. package/dist/server/prebuilt/synthetic-store.d.ts.map +1 -0
  808. package/dist/server/prebuilt-builder.d.ts +121 -0
  809. package/dist/server/prebuilt-builder.d.ts.map +1 -0
  810. package/dist/server/prebuilt-runtime.d.ts +105 -0
  811. package/dist/server/prebuilt-runtime.d.ts.map +1 -0
  812. package/dist/server/primitives.d.ts +114 -90
  813. package/dist/server/primitives.d.ts.map +1 -1
  814. package/dist/server/publish-params.d.ts +33 -0
  815. package/dist/server/publish-params.d.ts.map +1 -0
  816. package/dist/server/react-cache-bridge.d.ts +59 -0
  817. package/dist/server/react-cache-bridge.d.ts.map +1 -0
  818. package/dist/server/react-cache-scope.d.ts +49 -0
  819. package/dist/server/react-cache-scope.d.ts.map +1 -0
  820. package/dist/server/render-timeout.d.ts +66 -0
  821. package/dist/server/render-timeout.d.ts.map +1 -0
  822. package/dist/server/render-utils.d.ts +56 -0
  823. package/dist/server/render-utils.d.ts.map +1 -0
  824. package/dist/server/request-context.d.ts +167 -103
  825. package/dist/server/request-context.d.ts.map +1 -1
  826. package/dist/server/request-dep.d.ts +15 -0
  827. package/dist/server/request-dep.d.ts.map +1 -0
  828. package/dist/server/response-cache-policy.d.ts +3 -0
  829. package/dist/server/response-cache-policy.d.ts.map +1 -0
  830. package/dist/server/response-framing.d.ts +43 -0
  831. package/dist/server/response-framing.d.ts.map +1 -0
  832. package/dist/server/route-element-builder.d.ts +57 -30
  833. package/dist/server/route-element-builder.d.ts.map +1 -1
  834. package/dist/server/route-element-helpers.d.ts +12 -0
  835. package/dist/server/route-element-helpers.d.ts.map +1 -0
  836. package/dist/server/route-handler.d.ts +9 -3
  837. package/dist/server/route-handler.d.ts.map +1 -1
  838. package/dist/server/route-matcher.d.ts +75 -40
  839. package/dist/server/route-matcher.d.ts.map +1 -1
  840. package/dist/server/route-methods.d.ts +23 -0
  841. package/dist/server/route-methods.d.ts.map +1 -0
  842. package/dist/server/route-module-loader.d.ts +37 -0
  843. package/dist/server/route-module-loader.d.ts.map +1 -0
  844. package/dist/server/rsc-cache-key-guard.d.ts +78 -0
  845. package/dist/server/rsc-cache-key-guard.d.ts.map +1 -0
  846. package/dist/server/rsc-entry/action-dispatcher.d.ts +65 -0
  847. package/dist/server/rsc-entry/action-dispatcher.d.ts.map +1 -0
  848. package/dist/server/rsc-entry/action-middleware-runner.d.ts +66 -0
  849. package/dist/server/rsc-entry/action-middleware-runner.d.ts.map +1 -0
  850. package/dist/server/rsc-entry/api-handler.d.ts +19 -3
  851. package/dist/server/rsc-entry/api-handler.d.ts.map +1 -1
  852. package/dist/server/rsc-entry/deny-fallback.d.ts +55 -0
  853. package/dist/server/rsc-entry/deny-fallback.d.ts.map +1 -0
  854. package/dist/server/rsc-entry/error-renderer.d.ts +35 -21
  855. package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
  856. package/dist/server/rsc-entry/helpers.d.ts +14 -59
  857. package/dist/server/rsc-entry/helpers.d.ts.map +1 -1
  858. package/dist/server/rsc-entry/index.d.ts +30 -6
  859. package/dist/server/rsc-entry/index.d.ts.map +1 -1
  860. package/dist/server/rsc-entry/render-route.d.ts +55 -0
  861. package/dist/server/rsc-entry/render-route.d.ts.map +1 -0
  862. package/dist/server/rsc-entry/render-signals.d.ts +65 -0
  863. package/dist/server/rsc-entry/render-signals.d.ts.map +1 -0
  864. package/dist/server/rsc-entry/revalidate-renderer.d.ts +98 -0
  865. package/dist/server/rsc-entry/revalidate-renderer.d.ts.map +1 -0
  866. package/dist/server/rsc-entry/rsc-payload.d.ts +38 -11
  867. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  868. package/dist/server/rsc-entry/rsc-stream.d.ts +18 -31
  869. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  870. package/dist/server/rsc-entry/ssr-bridge.d.ts +7 -2
  871. package/dist/server/rsc-entry/ssr-bridge.d.ts.map +1 -1
  872. package/dist/server/rsc-entry/ssr-renderer.d.ts +52 -8
  873. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  874. package/dist/server/rsc-error-envelope.d.ts +11 -0
  875. package/dist/server/rsc-error-envelope.d.ts.map +1 -0
  876. package/dist/server/safe-load.d.ts +39 -0
  877. package/dist/server/safe-load.d.ts.map +1 -0
  878. package/dist/server/schema-introspection.d.ts +68 -0
  879. package/dist/server/schema-introspection.d.ts.map +1 -0
  880. package/dist/server/sensitive-fields.d.ts +88 -0
  881. package/dist/server/sensitive-fields.d.ts.map +1 -0
  882. package/dist/server/signal-identity.d.ts +49 -0
  883. package/dist/server/signal-identity.d.ts.map +1 -0
  884. package/dist/server/sitemap-generator.d.ts +130 -0
  885. package/dist/server/sitemap-generator.d.ts.map +1 -0
  886. package/dist/server/sitemap-handler.d.ts +22 -0
  887. package/dist/server/sitemap-handler.d.ts.map +1 -0
  888. package/dist/server/skippable-prefix.d.ts +29 -0
  889. package/dist/server/skippable-prefix.d.ts.map +1 -0
  890. package/dist/server/slot-interception.d.ts +80 -0
  891. package/dist/server/slot-interception.d.ts.map +1 -0
  892. package/dist/server/slot-resolver.d.ts +138 -7
  893. package/dist/server/slot-resolver.d.ts.map +1 -1
  894. package/dist/server/slot-subtree-contain.d.ts +54 -0
  895. package/dist/server/slot-subtree-contain.d.ts.map +1 -0
  896. package/dist/server/ssr-bridge-types.d.ts +213 -0
  897. package/dist/server/ssr-bridge-types.d.ts.map +1 -0
  898. package/dist/server/ssr-entry.d.ts +15 -51
  899. package/dist/server/ssr-entry.d.ts.map +1 -1
  900. package/dist/server/ssr-form-state.d.ts +30 -0
  901. package/dist/server/ssr-form-state.d.ts.map +1 -0
  902. package/dist/server/ssr-render.d.ts +42 -12
  903. package/dist/server/ssr-render.d.ts.map +1 -1
  904. package/dist/server/ssr-wrappers.d.ts +92 -0
  905. package/dist/server/ssr-wrappers.d.ts.map +1 -0
  906. package/dist/server/state-tree-diff.d.ts +44 -9
  907. package/dist/server/state-tree-diff.d.ts.map +1 -1
  908. package/dist/server/static-generator.d.ts +112 -0
  909. package/dist/server/static-generator.d.ts.map +1 -0
  910. package/dist/server/static-not-found.d.ts +52 -0
  911. package/dist/server/static-not-found.d.ts.map +1 -0
  912. package/dist/server/status-code-resolver.d.ts +26 -15
  913. package/dist/server/status-code-resolver.d.ts.map +1 -1
  914. package/dist/server/stream-utils.d.ts +93 -0
  915. package/dist/server/stream-utils.d.ts.map +1 -0
  916. package/dist/server/traced-access.d.ts +18 -0
  917. package/dist/server/traced-access.d.ts.map +1 -0
  918. package/dist/server/tracing.d.ts +72 -31
  919. package/dist/server/tracing.d.ts.map +1 -1
  920. package/dist/server/tree-match.d.ts +59 -0
  921. package/dist/server/tree-match.d.ts.map +1 -0
  922. package/dist/server/types.d.ts +90 -8
  923. package/dist/server/types.d.ts.map +1 -1
  924. package/dist/server/utils/element-type.d.ts +50 -0
  925. package/dist/server/utils/element-type.d.ts.map +1 -0
  926. package/dist/server/utils/escape-html.d.ts +14 -0
  927. package/dist/server/utils/escape-html.d.ts.map +1 -0
  928. package/dist/server/version-skew.d.ts +61 -0
  929. package/dist/server/version-skew.d.ts.map +1 -0
  930. package/dist/server/workers-cache-bridge.d.ts +26 -0
  931. package/dist/server/workers-cache-bridge.d.ts.map +1 -0
  932. package/dist/shared/als-slots.d.ts +42 -0
  933. package/dist/shared/als-slots.d.ts.map +1 -0
  934. package/dist/shared/base-path.d.ts +56 -0
  935. package/dist/shared/base-path.d.ts.map +1 -0
  936. package/dist/shared/csrf-reject.d.ts +16 -0
  937. package/dist/shared/csrf-reject.d.ts.map +1 -0
  938. package/dist/shared/dev-span.d.ts +99 -0
  939. package/dist/shared/dev-span.d.ts.map +1 -0
  940. package/dist/shared/error-digest.d.ts +28 -0
  941. package/dist/shared/error-digest.d.ts.map +1 -0
  942. package/dist/shared/flight-base64.d.ts +13 -0
  943. package/dist/shared/flight-base64.d.ts.map +1 -0
  944. package/dist/shared/flight-segment.d.ts +18 -0
  945. package/dist/shared/flight-segment.d.ts.map +1 -0
  946. package/dist/shared/form-state-flight.d.ts +32 -0
  947. package/dist/shared/form-state-flight.d.ts.map +1 -0
  948. package/dist/shared/href-validation.d.ts +49 -0
  949. package/dist/shared/href-validation.d.ts.map +1 -0
  950. package/dist/shared/merge-search-params.d.ts +22 -0
  951. package/dist/shared/merge-search-params.d.ts.map +1 -0
  952. package/dist/shared/param-value.d.ts +104 -0
  953. package/dist/shared/param-value.d.ts.map +1 -0
  954. package/dist/shared/payload-root.d.ts +110 -0
  955. package/dist/shared/payload-root.d.ts.map +1 -0
  956. package/dist/shared/redirect-type.d.ts +17 -0
  957. package/dist/shared/redirect-type.d.ts.map +1 -0
  958. package/dist/shared/rsc-cache-key.d.ts +163 -0
  959. package/dist/shared/rsc-cache-key.d.ts.map +1 -0
  960. package/dist/shared/rsc-error-envelope.d.ts +16 -0
  961. package/dist/shared/rsc-error-envelope.d.ts.map +1 -0
  962. package/dist/shared/rsc-manifest.d.ts +28 -0
  963. package/dist/shared/rsc-manifest.d.ts.map +1 -0
  964. package/dist/shared/rsc-media-type.d.ts +52 -0
  965. package/dist/shared/rsc-media-type.d.ts.map +1 -0
  966. package/dist/shared/rsc-payload-path.d.ts +48 -0
  967. package/dist/shared/rsc-payload-path.d.ts.map +1 -0
  968. package/dist/shared/segment-info.d.ts +66 -0
  969. package/dist/shared/segment-info.d.ts.map +1 -0
  970. package/dist/shared/slot-params.d.ts +52 -0
  971. package/dist/shared/slot-params.d.ts.map +1 -0
  972. package/dist/shared/static-platform-files.d.ts +71 -0
  973. package/dist/shared/static-platform-files.d.ts.map +1 -0
  974. package/dist/shared/status-reason-phrase.d.ts +26 -0
  975. package/dist/shared/status-reason-phrase.d.ts.map +1 -0
  976. package/dist/shims/font-google.d.ts +1 -1
  977. package/dist/shims/font-google.d.ts.map +1 -1
  978. package/dist/shims/font-google.js +41 -0
  979. package/dist/shims/font-google.js.map +1 -0
  980. package/dist/shims/font-local.d.ts +26 -0
  981. package/dist/shims/font-local.d.ts.map +1 -0
  982. package/dist/shims/font-local.js +19 -0
  983. package/dist/shims/font-local.js.map +1 -0
  984. package/dist/shims/headers.d.ts +60 -1
  985. package/dist/shims/headers.d.ts.map +1 -1
  986. package/dist/shims/image.d.ts +120 -120
  987. package/dist/shims/image.d.ts.map +1 -1
  988. package/dist/shims/navigation-client.d.ts +25 -12
  989. package/dist/shims/navigation-client.d.ts.map +1 -1
  990. package/dist/shims/navigation-rsc.d.ts +21 -0
  991. package/dist/shims/navigation-rsc.d.ts.map +1 -0
  992. package/dist/shims/navigation.d.ts +10 -5
  993. package/dist/shims/navigation.d.ts.map +1 -1
  994. package/dist/utils/state-machine.d.ts +80 -0
  995. package/dist/utils/state-machine.d.ts.map +1 -0
  996. package/dist/utils/write-file-atomic.d.ts +17 -0
  997. package/dist/utils/write-file-atomic.d.ts.map +1 -0
  998. package/docs/api/30-api-server.mdx +241 -0
  999. package/docs/api/31-api-client.mdx +225 -0
  1000. package/docs/api/32-api-cache.mdx +341 -0
  1001. package/docs/api/33-api-search-params.mdx +178 -0
  1002. package/docs/api/34-api-config.mdx +421 -0
  1003. package/docs/api/35-api-typescript.mdx +91 -0
  1004. package/docs/api/36-cli.mdx +272 -0
  1005. package/docs/learn/00-introduction.mdx +109 -0
  1006. package/docs/learn/01-quick-start.mdx +94 -0
  1007. package/docs/learn/02-pages-and-layouts.mdx +147 -0
  1008. package/docs/learn/03-fetching-data.mdx +227 -0
  1009. package/docs/learn/04-access-control.mdx +115 -0
  1010. package/docs/learn/05-the-flush-point.mdx +175 -0
  1011. package/docs/learn/06-typed-params.mdx +275 -0
  1012. package/docs/learn/07-typed-routes.mdx +108 -0
  1013. package/docs/learn/08-forms-and-actions.mdx +260 -0
  1014. package/docs/learn/09-streaming.mdx +146 -0
  1015. package/docs/learn/10-caching.mdx +303 -0
  1016. package/docs/learn/11-middleware.mdx +166 -0
  1017. package/docs/learn/12-error-handling.mdx +192 -0
  1018. package/docs/learn/13-deploying.mdx +289 -0
  1019. package/llms.txt +55 -0
  1020. package/package.json +120 -29
  1021. package/src/adapters/build-output-helper.ts +375 -0
  1022. package/src/adapters/canonicalize-module.ts +29 -0
  1023. package/src/adapters/cloudflare-dev.ts +183 -0
  1024. package/src/adapters/cloudflare-kv-cache.ts +203 -0
  1025. package/src/adapters/cloudflare.ts +799 -151
  1026. package/src/adapters/compress-module.ts +110 -86
  1027. package/src/adapters/fs-identity.ts +155 -0
  1028. package/src/adapters/nitro-immutable-assets.ts +142 -0
  1029. package/src/adapters/nitro-presets.ts +139 -0
  1030. package/src/adapters/nitro-preview.ts +565 -0
  1031. package/src/adapters/nitro.ts +349 -448
  1032. package/src/adapters/raw-imports.d.ts +5 -0
  1033. package/src/adapters/shared.ts +314 -0
  1034. package/src/adapters/types.ts +129 -17
  1035. package/src/adapters/wrangler.d.ts +7 -0
  1036. package/src/analyze/chains.ts +411 -0
  1037. package/src/analyze/classify.ts +259 -0
  1038. package/src/analyze/crawl-entry.ts +68 -0
  1039. package/src/analyze/crawl.ts +500 -0
  1040. package/src/analyze/graph-cache.ts +331 -0
  1041. package/src/analyze/graph-command.ts +654 -0
  1042. package/src/analyze/live-graph.ts +232 -0
  1043. package/src/analyze/poison-rules.ts +165 -0
  1044. package/src/analyze/poison-scan.ts +159 -0
  1045. package/src/analyze/scan.ts +149 -0
  1046. package/src/cache/cache-api.ts +113 -0
  1047. package/src/cache/fast-hash.ts +5 -0
  1048. package/src/cache/guarded-read.ts +44 -0
  1049. package/src/cache/handler-store.ts +113 -0
  1050. package/src/cache/index.ts +93 -20
  1051. package/src/cache/invalidation-epoch.ts +105 -0
  1052. package/src/cache/json-lossy-check.ts +69 -0
  1053. package/src/cache/key-discipline.ts +218 -0
  1054. package/src/cache/redis-handler.ts +193 -19
  1055. package/src/cache/singleflight.ts +85 -7
  1056. package/src/cache/sizeof.ts +35 -0
  1057. package/src/cache/stable-stringify.ts +118 -2
  1058. package/src/cache/store.ts +71 -0
  1059. package/src/cache/stores/cloudflare-kv.ts +52 -0
  1060. package/src/cache/stores/memory.ts +125 -0
  1061. package/src/cache/stores/redis.ts +97 -0
  1062. package/src/cache/stores/vercel.ts +59 -0
  1063. package/src/cache/tag-aware-handler.ts +250 -0
  1064. package/src/cache/timber-cache.ts +218 -47
  1065. package/src/cdn/cloudflare-purge.ts +50 -0
  1066. package/src/cdn/fastly-purge.ts +63 -0
  1067. package/src/cdn/headers.ts +153 -0
  1068. package/src/cdn/index.ts +23 -0
  1069. package/src/cdn/purge-store.ts +62 -0
  1070. package/src/cdn/workers-cache-purge.ts +34 -0
  1071. package/src/cli-check.ts +417 -0
  1072. package/src/cli-context.ts +128 -0
  1073. package/src/cli-dev-status.ts +196 -0
  1074. package/src/cli-init.ts +278 -0
  1075. package/src/cli-schema-sync.ts +401 -0
  1076. package/src/cli.ts +308 -84
  1077. package/src/client/browser-dev.ts +192 -5
  1078. package/src/client/browser-entry/action-dispatch.ts +317 -0
  1079. package/src/client/browser-entry/action-queue.ts +152 -0
  1080. package/src/client/browser-entry/form-state.ts +49 -0
  1081. package/src/client/browser-entry/hmr.ts +82 -0
  1082. package/src/client/browser-entry/hydrate.ts +152 -0
  1083. package/src/client/browser-entry/index.ts +153 -0
  1084. package/src/client/browser-entry/post-hydration.ts +99 -0
  1085. package/src/client/browser-entry/router-init.ts +391 -0
  1086. package/src/client/browser-entry/rsc-stream.ts +145 -0
  1087. package/src/client/browser-entry/scroll.ts +50 -0
  1088. package/src/client/deny-last-resort.tsx +54 -0
  1089. package/src/client/dev-pill/index.ts +128 -0
  1090. package/src/client/dev-pill/store.ts +254 -0
  1091. package/src/client/dev-pill/view.ts +326 -0
  1092. package/src/client/error-boundary.tsx +296 -61
  1093. package/src/client/error-reconstituter.tsx +84 -0
  1094. package/src/client/form.tsx +61 -173
  1095. package/src/client/global-context.ts +59 -0
  1096. package/src/client/history.ts +74 -11
  1097. package/src/client/index.ts +91 -53
  1098. package/src/client/internal.ts +54 -0
  1099. package/src/client/link.tsx +464 -151
  1100. package/src/client/location-search.ts +15 -0
  1101. package/src/client/navigation-api.ts +254 -0
  1102. package/src/client/navigation-commit.ts +318 -0
  1103. package/src/client/navigation-context.ts +71 -142
  1104. package/src/client/navigation-root.tsx +237 -0
  1105. package/src/client/navigation-transition.ts +401 -0
  1106. package/src/client/nuqs-adapter.tsx +62 -32
  1107. package/src/client/params-context.ts +175 -0
  1108. package/src/client/react-root.ts +105 -0
  1109. package/src/client/router-effects.ts +349 -0
  1110. package/src/client/router-lifecycle.ts +394 -0
  1111. package/src/client/router-pipeline.ts +443 -0
  1112. package/src/client/router-ref.ts +3 -3
  1113. package/src/client/router-skew.ts +30 -0
  1114. package/src/client/router-types.ts +326 -0
  1115. package/src/client/router-url.ts +32 -0
  1116. package/src/client/router.ts +491 -421
  1117. package/src/client/rsc-fetch.ts +510 -109
  1118. package/src/client/segment-cache.ts +362 -41
  1119. package/src/client/segment-context.ts +7 -4
  1120. package/src/client/segment-outlet.tsx +96 -0
  1121. package/src/client/segment-update-context.ts +23 -0
  1122. package/src/client/shallow-url.ts +22 -0
  1123. package/src/client/slot-content-cache-context.ts +43 -0
  1124. package/src/client/slot-context.ts +39 -0
  1125. package/src/client/slot-outlet.tsx +22 -0
  1126. package/src/client/slot-provider.tsx +32 -0
  1127. package/src/client/ssr-data.ts +27 -67
  1128. package/src/client/stale-client.ts +191 -0
  1129. package/src/client/state.ts +31 -24
  1130. package/src/client/status-page-marker.tsx +32 -0
  1131. package/src/client/top-loader.tsx +13 -10
  1132. package/src/client/unload-guard.ts +35 -3
  1133. package/src/client/use-cookie.ts +93 -29
  1134. package/src/client/use-field-state.ts +144 -0
  1135. package/src/client/use-link-status.ts +7 -7
  1136. package/src/client/use-pathname.ts +22 -31
  1137. package/src/client/use-pending-navigation.ts +119 -0
  1138. package/src/client/use-query-states.ts +206 -36
  1139. package/src/client/use-router.ts +31 -9
  1140. package/src/client/use-search-params.ts +38 -49
  1141. package/src/client/use-segment-params.ts +69 -0
  1142. package/src/client/use-selected-layout-segment.ts +2 -2
  1143. package/src/codec.ts +149 -0
  1144. package/src/config-types.ts +366 -0
  1145. package/src/config-validation.ts +511 -0
  1146. package/src/cookies/define-cookie.ts +186 -53
  1147. package/src/cookies/index.ts +13 -2
  1148. package/src/cookies/json-cookie.ts +105 -0
  1149. package/src/cookies/validation.ts +192 -0
  1150. package/src/dev-tools/404-page.ts +286 -0
  1151. package/src/dev-tools/await-span.ts +69 -0
  1152. package/src/dev-tools/browser-logs.ts +55 -0
  1153. package/src/dev-tools/dev-page-shell.ts +278 -0
  1154. package/src/dev-tools/error-page.ts +331 -0
  1155. package/src/dev-tools/holding-server.ts +185 -0
  1156. package/src/dev-tools/hydration-overlay.ts +158 -0
  1157. package/src/dev-tools/index.ts +79 -0
  1158. package/src/dev-tools/instrumentation.ts +281 -0
  1159. package/src/{server/dev-logger.ts → dev-tools/logger.ts} +36 -88
  1160. package/src/{plugins/dev-logs.ts → dev-tools/logs.ts} +158 -27
  1161. package/src/{plugins/dev-error-overlay.ts → dev-tools/overlay.ts} +25 -80
  1162. package/src/dev-tools/span-sink.ts +132 -0
  1163. package/src/dev-tools/stack-classifier.ts +75 -0
  1164. package/src/dev-tools/terminal.ts +182 -0
  1165. package/src/fonts/ast-walk.ts +235 -0
  1166. package/src/fonts/ast.ts +479 -128
  1167. package/src/fonts/bundle.ts +138 -0
  1168. package/src/fonts/css.ts +1 -1
  1169. package/src/fonts/dev-middleware.ts +85 -0
  1170. package/src/fonts/fallbacks.ts +0 -23
  1171. package/src/fonts/google.ts +101 -19
  1172. package/src/fonts/local.ts +12 -11
  1173. package/src/fonts/paths.ts +58 -0
  1174. package/src/fonts/pipeline.ts +348 -0
  1175. package/src/fonts/transform.ts +311 -0
  1176. package/src/fonts/types.ts +52 -1
  1177. package/src/fonts/virtual-modules.ts +179 -0
  1178. package/src/index.ts +498 -380
  1179. package/src/params/codec-registry.ts +34 -0
  1180. package/src/params/define-schema.ts +115 -0
  1181. package/src/params/index.ts +17 -0
  1182. package/src/params/resolve-schema.ts +84 -0
  1183. package/src/plugin-context.ts +509 -0
  1184. package/src/plugins/build-manifest.ts +189 -36
  1185. package/src/plugins/build-report.ts +299 -87
  1186. package/src/plugins/cache.ts +243 -0
  1187. package/src/plugins/callsite-ast.ts +472 -0
  1188. package/src/plugins/callsite-jsx.ts +243 -0
  1189. package/src/plugins/chunks.ts +74 -5
  1190. package/src/plugins/client-chunks.ts +185 -0
  1191. package/src/plugins/client-dep-entries.ts +124 -0
  1192. package/src/plugins/client-in-server-package-deps.ts +139 -0
  1193. package/src/plugins/cloudflare-wasm.ts +141 -0
  1194. package/src/plugins/content.ts +31 -2
  1195. package/src/plugins/dev-await.ts +415 -0
  1196. package/src/plugins/dev-discovery.ts +428 -0
  1197. package/src/plugins/dev-hostname.ts +322 -0
  1198. package/src/plugins/dev-server.ts +471 -100
  1199. package/src/plugins/dev-store-clear.ts +145 -0
  1200. package/src/plugins/encryption-runtime.ts +31 -0
  1201. package/src/plugins/entries.ts +158 -17
  1202. package/src/plugins/fonts.ts +260 -657
  1203. package/src/plugins/graph-endpoint.ts +544 -0
  1204. package/src/plugins/mdx.ts +108 -35
  1205. package/src/plugins/optimize-package-imports-defaults.ts +88 -0
  1206. package/src/plugins/optimize-package-imports.ts +439 -0
  1207. package/src/plugins/orphaned-modules.ts +78 -0
  1208. package/src/plugins/post-build.ts +327 -0
  1209. package/src/plugins/prebuilt-capture.ts +213 -0
  1210. package/src/plugins/prebuilt-options-analysis.ts +175 -0
  1211. package/src/plugins/prebuilt.ts +679 -0
  1212. package/src/plugins/prerender-sugar.ts +348 -0
  1213. package/src/plugins/react-resolve.ts +149 -0
  1214. package/src/plugins/request-dep/analysis.ts +447 -0
  1215. package/src/plugins/request-dep/index.ts +376 -0
  1216. package/src/plugins/request-dep/origin.ts +310 -0
  1217. package/src/plugins/routing.ts +296 -278
  1218. package/src/plugins/rsc-assets-manifest.ts +251 -0
  1219. package/src/plugins/server-bundle.ts +115 -15
  1220. package/src/plugins/shims.ts +257 -97
  1221. package/src/plugins/static-build.ts +681 -71
  1222. package/src/react-canary.d.ts +2 -0
  1223. package/src/routing/codegen-shared.ts +39 -0
  1224. package/src/routing/codegen-types.ts +62 -0
  1225. package/src/routing/codegen-write.ts +163 -0
  1226. package/src/routing/codegen.ts +349 -232
  1227. package/src/routing/collision-probe.ts +438 -0
  1228. package/src/routing/collision-spaces.ts +281 -0
  1229. package/src/routing/convention-lint.ts +649 -0
  1230. package/src/routing/export-detect.ts +536 -0
  1231. package/src/routing/file-cache.ts +23 -0
  1232. package/src/routing/index.ts +16 -7
  1233. package/src/routing/interception-overlap.ts +141 -0
  1234. package/src/routing/interception.ts +1044 -67
  1235. package/src/routing/link-codegen.ts +280 -0
  1236. package/src/routing/manifest-codegen.ts +232 -0
  1237. package/src/routing/scanner.ts +417 -223
  1238. package/src/routing/schema-validation.ts +155 -0
  1239. package/src/routing/segment-classify.ts +280 -0
  1240. package/src/routing/segment-codegen.ts +99 -0
  1241. package/src/routing/segment-keys.ts +186 -0
  1242. package/src/routing/slot-placement.ts +97 -0
  1243. package/src/routing/types.ts +82 -26
  1244. package/src/routing/walkers.ts +98 -0
  1245. package/src/rsc-runtime/dev-reference-cache.ts +115 -0
  1246. package/src/rsc-runtime/encryption-runtime.ts +78 -0
  1247. package/src/rsc-runtime/render-flight.ts +26 -0
  1248. package/src/rsc-runtime/rsc.ts +35 -5
  1249. package/src/rsc-runtime/server-reference-load-error.ts +16 -0
  1250. package/src/rsc-runtime/server-references.ts +135 -0
  1251. package/src/rsc-runtime/ssr.ts +23 -0
  1252. package/src/rsc-runtime/transforms.ts +13 -0
  1253. package/src/rsc-runtime/vendor-types.d.ts +87 -0
  1254. package/src/schema-bridge.ts +437 -0
  1255. package/src/search-params/define.ts +676 -0
  1256. package/src/search-params/index.ts +14 -20
  1257. package/src/search-params/parse-total.ts +91 -0
  1258. package/src/search-params/serialize-equal.ts +14 -0
  1259. package/src/search-params/wrappers.ts +150 -0
  1260. package/src/server/abort-scope.ts +49 -0
  1261. package/src/server/access-gate.tsx +208 -57
  1262. package/src/server/action-client.ts +175 -294
  1263. package/src/server/action-encryption.ts +144 -0
  1264. package/src/server/action-handler.ts +533 -150
  1265. package/src/server/action-schema.ts +203 -0
  1266. package/src/server/action-types.ts +145 -0
  1267. package/src/server/actions.ts +172 -85
  1268. package/src/server/als-registry.ts +245 -30
  1269. package/src/server/body-limits.ts +10 -2
  1270. package/src/server/build-manifest.ts +33 -57
  1271. package/src/server/canonicalize.ts +62 -3
  1272. package/src/server/chain-url-parts.ts +163 -0
  1273. package/src/server/children-interception.ts +116 -0
  1274. package/src/server/client-error-message.ts +18 -0
  1275. package/src/server/coalesce-tick.ts +75 -0
  1276. package/src/server/compress.ts +91 -19
  1277. package/src/server/cookie-context.ts +462 -0
  1278. package/src/server/cookie-parsing.ts +163 -0
  1279. package/src/server/csp-nonce.ts +58 -0
  1280. package/src/server/csrf.ts +238 -37
  1281. package/src/server/debug.ts +0 -1
  1282. package/src/server/default-logger.ts +100 -0
  1283. package/src/server/default-status-page.ts +88 -0
  1284. package/src/server/deny-boundary.ts +527 -0
  1285. package/src/server/deny-renderer.ts +210 -181
  1286. package/src/server/early-hints-sender.ts +4 -3
  1287. package/src/server/early-hints.ts +39 -29
  1288. package/src/server/error-boundary-wrapper.ts +160 -44
  1289. package/src/server/error-response-headers.ts +18 -0
  1290. package/src/server/fallback-error.ts +88 -104
  1291. package/src/server/flight-injection-state.ts +113 -0
  1292. package/src/server/flight-injector-core.ts +332 -0
  1293. package/src/server/flight-scripts.ts +92 -0
  1294. package/src/server/flight-source-node.ts +434 -0
  1295. package/src/server/flight-source.ts +289 -0
  1296. package/src/server/form-data.ts +191 -20
  1297. package/src/server/form-state-flight.ts +67 -0
  1298. package/src/server/head-response.ts +50 -0
  1299. package/src/server/html-injector-core.ts +320 -0
  1300. package/src/server/html-injectors.ts +241 -285
  1301. package/src/server/index.ts +42 -195
  1302. package/src/server/instrumentation.ts +42 -11
  1303. package/src/server/interception-gates.ts +94 -0
  1304. package/src/server/internal.ts +164 -0
  1305. package/src/server/json-status-response.ts +105 -0
  1306. package/src/server/logger.ts +163 -38
  1307. package/src/server/metadata-collector.ts +175 -0
  1308. package/src/server/metadata-platform.ts +2 -2
  1309. package/src/server/metadata-render.ts +30 -8
  1310. package/src/server/metadata-route-links.ts +200 -0
  1311. package/src/server/metadata-routes.ts +114 -24
  1312. package/src/server/metadata-social.ts +2 -2
  1313. package/src/server/metadata.ts +23 -2
  1314. package/src/server/middleware-runner.ts +32 -5
  1315. package/src/server/node-body-response.ts +236 -0
  1316. package/src/server/node-response.ts +93 -0
  1317. package/src/server/node-stream-transforms.ts +340 -0
  1318. package/src/server/node-streams-platform.ts +23 -0
  1319. package/src/server/param-coercion.ts +223 -0
  1320. package/src/server/pipeline-helpers.ts +554 -0
  1321. package/src/server/pipeline-interception.ts +301 -32
  1322. package/src/server/pipeline-metadata-route.ts +242 -0
  1323. package/src/server/pipeline-metadata.ts +30 -4
  1324. package/src/server/pipeline-outcome.ts +290 -0
  1325. package/src/server/pipeline-phases.ts +443 -0
  1326. package/src/server/pipeline.ts +474 -427
  1327. package/src/server/port-resolution.ts +43 -0
  1328. package/src/server/prebuilt/cache-key.ts +340 -0
  1329. package/src/server/prebuilt/capture-render.ts +122 -0
  1330. package/src/server/prebuilt/capture-routes.ts +104 -0
  1331. package/src/server/prebuilt/capture-state.ts +196 -0
  1332. package/src/server/prebuilt/dev-store.ts +252 -0
  1333. package/src/server/prebuilt/lifetime.ts +151 -0
  1334. package/src/server/prebuilt/manifest-tag-index.ts +46 -0
  1335. package/src/server/prebuilt/overlay.ts +290 -0
  1336. package/src/server/prebuilt/payload-source.ts +221 -0
  1337. package/src/server/prebuilt/slots.ts +201 -0
  1338. package/src/server/prebuilt/synthetic-store.ts +125 -0
  1339. package/src/server/prebuilt-builder.ts +515 -0
  1340. package/src/server/prebuilt-runtime.ts +830 -0
  1341. package/src/server/primitives.ts +167 -171
  1342. package/src/server/publish-params.ts +42 -0
  1343. package/src/server/react-cache-bridge.ts +124 -0
  1344. package/src/server/react-cache-scope.ts +104 -0
  1345. package/src/server/render-timeout.ts +123 -0
  1346. package/src/server/render-utils.ts +70 -0
  1347. package/src/server/request-context.ts +321 -323
  1348. package/src/server/request-dep.ts +37 -0
  1349. package/src/server/response-cache-policy.ts +45 -0
  1350. package/src/server/response-framing.ts +59 -0
  1351. package/src/server/route-element-builder.ts +539 -355
  1352. package/src/server/route-element-helpers.ts +37 -0
  1353. package/src/server/route-handler.ts +78 -48
  1354. package/src/server/route-matcher.ts +251 -265
  1355. package/src/server/route-methods.ts +37 -0
  1356. package/src/server/route-module-loader.ts +161 -0
  1357. package/src/server/rsc-cache-key-guard.ts +122 -0
  1358. package/src/server/rsc-entry/action-dispatcher.ts +146 -0
  1359. package/src/server/rsc-entry/action-middleware-runner.ts +130 -0
  1360. package/src/server/rsc-entry/api-handler.ts +30 -93
  1361. package/src/server/rsc-entry/deny-fallback.ts +151 -0
  1362. package/src/server/rsc-entry/error-renderer.ts +306 -113
  1363. package/src/server/rsc-entry/helpers.ts +90 -115
  1364. package/src/server/rsc-entry/index.ts +417 -350
  1365. package/src/server/rsc-entry/render-route.ts +248 -0
  1366. package/src/server/rsc-entry/render-signals.ts +108 -0
  1367. package/src/server/rsc-entry/revalidate-renderer.ts +349 -0
  1368. package/src/server/rsc-entry/rsc-payload.ts +212 -113
  1369. package/src/server/rsc-entry/rsc-stream.ts +143 -135
  1370. package/src/server/rsc-entry/ssr-bridge.ts +43 -8
  1371. package/src/server/rsc-entry/ssr-renderer.ts +311 -140
  1372. package/src/server/rsc-error-envelope.ts +18 -0
  1373. package/src/server/rsc-prop-warnings.ts +1 -1
  1374. package/src/server/safe-load.ts +53 -0
  1375. package/src/server/schema-introspection.ts +393 -0
  1376. package/src/server/sensitive-fields.ts +287 -0
  1377. package/src/server/server-only-guard-noop.js +3 -0
  1378. package/src/server/server-timing.ts +1 -1
  1379. package/src/server/signal-identity.ts +130 -0
  1380. package/src/server/sitemap-generator.ts +337 -0
  1381. package/src/server/sitemap-handler.ts +150 -0
  1382. package/src/server/skippable-prefix.ts +172 -0
  1383. package/src/server/slot-interception.ts +168 -0
  1384. package/src/server/slot-resolver.ts +747 -300
  1385. package/src/server/slot-subtree-contain.ts +273 -0
  1386. package/src/server/ssr-bridge-types.ts +217 -0
  1387. package/src/server/ssr-entry.ts +246 -109
  1388. package/src/server/ssr-form-state.ts +58 -0
  1389. package/src/server/ssr-render.ts +253 -113
  1390. package/src/server/ssr-wrappers.tsx +152 -0
  1391. package/src/server/state-tree-diff.ts +85 -30
  1392. package/src/server/static-generator.ts +680 -0
  1393. package/src/server/static-not-found.ts +134 -0
  1394. package/src/server/status-code-resolver.ts +107 -148
  1395. package/src/server/stream-utils.ts +398 -0
  1396. package/src/server/traced-access.ts +50 -0
  1397. package/src/server/tracing.ts +274 -128
  1398. package/src/server/tree-match.ts +494 -0
  1399. package/src/server/types.ts +97 -11
  1400. package/src/server/utils/element-type.ts +88 -0
  1401. package/src/server/utils/escape-html.ts +20 -0
  1402. package/src/server/version-skew.ts +104 -0
  1403. package/src/server/waituntil-bridge.ts +1 -1
  1404. package/src/server/workers-cache-bridge.ts +33 -0
  1405. package/src/shared/als-slots.ts +74 -0
  1406. package/src/shared/base-path.ts +80 -0
  1407. package/src/shared/csrf-reject.ts +15 -0
  1408. package/src/shared/dev-span.ts +188 -0
  1409. package/src/shared/error-digest.ts +46 -0
  1410. package/src/shared/flight-base64.ts +23 -0
  1411. package/src/shared/flight-segment.ts +35 -0
  1412. package/src/shared/form-state-flight.ts +59 -0
  1413. package/src/shared/href-validation.ts +159 -0
  1414. package/src/shared/merge-search-params.ts +55 -0
  1415. package/src/shared/param-value.ts +281 -0
  1416. package/src/shared/payload-root.ts +153 -0
  1417. package/src/shared/redirect-type.ts +17 -0
  1418. package/src/shared/rsc-cache-key.ts +269 -0
  1419. package/src/shared/rsc-error-envelope.ts +16 -0
  1420. package/src/shared/rsc-manifest.ts +29 -0
  1421. package/src/shared/rsc-media-type.ts +59 -0
  1422. package/src/shared/rsc-payload-path.ts +52 -0
  1423. package/src/shared/segment-info.ts +67 -0
  1424. package/src/shared/slot-params.ts +109 -0
  1425. package/src/shared/static-platform-files.ts +75 -0
  1426. package/src/shared/status-reason-phrase.ts +61 -0
  1427. package/src/shims/font-google.ts +1 -1
  1428. package/src/shims/font-local.ts +34 -0
  1429. package/src/shims/headers.ts +130 -1
  1430. package/src/shims/navigation-client.ts +36 -32
  1431. package/src/shims/navigation-rsc.ts +47 -0
  1432. package/src/shims/navigation.ts +10 -7
  1433. package/src/utils/state-machine.ts +111 -0
  1434. package/src/utils/write-file-atomic.ts +32 -0
  1435. package/dist/_chunks/als-registry-B7DbZ2hS.js +0 -41
  1436. package/dist/_chunks/als-registry-B7DbZ2hS.js.map +0 -1
  1437. package/dist/_chunks/debug-B3Gypr3D.js +0 -108
  1438. package/dist/_chunks/debug-B3Gypr3D.js.map +0 -1
  1439. package/dist/_chunks/format-RyoGQL74.js +0 -164
  1440. package/dist/_chunks/format-RyoGQL74.js.map +0 -1
  1441. package/dist/_chunks/interception-BOoWmLUA.js +0 -676
  1442. package/dist/_chunks/interception-BOoWmLUA.js.map +0 -1
  1443. package/dist/_chunks/metadata-routes-Cjmvi3rQ.js.map +0 -1
  1444. package/dist/_chunks/request-context-BQUC8PHn.js +0 -330
  1445. package/dist/_chunks/request-context-BQUC8PHn.js.map +0 -1
  1446. package/dist/_chunks/ssr-data-MjmprTmO.js +0 -88
  1447. package/dist/_chunks/ssr-data-MjmprTmO.js.map +0 -1
  1448. package/dist/_chunks/tracing-CemImE6h.js +0 -187
  1449. package/dist/_chunks/tracing-CemImE6h.js.map +0 -1
  1450. package/dist/_chunks/use-cookie-DX-l1_5E.js +0 -91
  1451. package/dist/_chunks/use-cookie-DX-l1_5E.js.map +0 -1
  1452. package/dist/_chunks/use-query-states-D5KaffOK.js +0 -109
  1453. package/dist/_chunks/use-query-states-D5KaffOK.js.map +0 -1
  1454. package/dist/adapters/cloudflare.js.map +0 -1
  1455. package/dist/cache/index.js.map +0 -1
  1456. package/dist/cache/register-cached-function.d.ts +0 -17
  1457. package/dist/cache/register-cached-function.d.ts.map +0 -1
  1458. package/dist/client/browser-entry.d.ts +0 -21
  1459. package/dist/client/browser-entry.d.ts.map +0 -1
  1460. package/dist/client/error-boundary.js.map +0 -1
  1461. package/dist/client/head.d.ts +0 -16
  1462. package/dist/client/head.d.ts.map +0 -1
  1463. package/dist/client/link-status-provider.d.ts +0 -11
  1464. package/dist/client/link-status-provider.d.ts.map +0 -1
  1465. package/dist/client/segment-merger.d.ts +0 -119
  1466. package/dist/client/segment-merger.d.ts.map +0 -1
  1467. package/dist/client/stale-reload.d.ts +0 -44
  1468. package/dist/client/stale-reload.d.ts.map +0 -1
  1469. package/dist/client/transition-root.d.ts +0 -74
  1470. package/dist/client/transition-root.d.ts.map +0 -1
  1471. package/dist/client/types.d.ts +0 -14
  1472. package/dist/client/types.d.ts.map +0 -1
  1473. package/dist/client/use-navigation-pending.d.ts +0 -26
  1474. package/dist/client/use-navigation-pending.d.ts.map +0 -1
  1475. package/dist/client/use-params.d.ts +0 -92
  1476. package/dist/client/use-params.d.ts.map +0 -1
  1477. package/dist/content/index.d.ts +0 -11
  1478. package/dist/content/index.d.ts.map +0 -1
  1479. package/dist/content/index.js +0 -2
  1480. package/dist/plugins/adapter-build.d.ts +0 -18
  1481. package/dist/plugins/adapter-build.d.ts.map +0 -1
  1482. package/dist/plugins/cache-transform.d.ts +0 -36
  1483. package/dist/plugins/cache-transform.d.ts.map +0 -1
  1484. package/dist/plugins/dev-error-overlay.d.ts.map +0 -1
  1485. package/dist/plugins/dev-logs.d.ts.map +0 -1
  1486. package/dist/plugins/dynamic-transform.d.ts +0 -72
  1487. package/dist/plugins/dynamic-transform.d.ts.map +0 -1
  1488. package/dist/plugins/server-action-exports.d.ts +0 -26
  1489. package/dist/plugins/server-action-exports.d.ts.map +0 -1
  1490. package/dist/routing/status-file-lint.d.ts +0 -33
  1491. package/dist/routing/status-file-lint.d.ts.map +0 -1
  1492. package/dist/search-params/analyze.d.ts +0 -54
  1493. package/dist/search-params/analyze.d.ts.map +0 -1
  1494. package/dist/search-params/builtin-codecs.d.ts +0 -105
  1495. package/dist/search-params/builtin-codecs.d.ts.map +0 -1
  1496. package/dist/search-params/codecs.d.ts +0 -53
  1497. package/dist/search-params/codecs.d.ts.map +0 -1
  1498. package/dist/search-params/create.d.ts +0 -106
  1499. package/dist/search-params/create.d.ts.map +0 -1
  1500. package/dist/search-params/registry.d.ts +0 -20
  1501. package/dist/search-params/registry.d.ts.map +0 -1
  1502. package/dist/server/asset-headers.d.ts +0 -42
  1503. package/dist/server/asset-headers.d.ts.map +0 -1
  1504. package/dist/server/client-module-map.d.ts +0 -47
  1505. package/dist/server/client-module-map.d.ts.map +0 -1
  1506. package/dist/server/dev-fetch-instrumentation.d.ts +0 -22
  1507. package/dist/server/dev-fetch-instrumentation.d.ts.map +0 -1
  1508. package/dist/server/dev-logger.d.ts.map +0 -1
  1509. package/dist/server/dev-span-processor.d.ts +0 -29
  1510. package/dist/server/dev-span-processor.d.ts.map +0 -1
  1511. package/dist/server/dev-warnings.d.ts +0 -129
  1512. package/dist/server/dev-warnings.d.ts.map +0 -1
  1513. package/dist/server/flush.d.ts +0 -74
  1514. package/dist/server/flush.d.ts.map +0 -1
  1515. package/dist/server/form-flash.d.ts +0 -78
  1516. package/dist/server/form-flash.d.ts.map +0 -1
  1517. package/dist/server/manifest-status-resolver.d.ts +0 -58
  1518. package/dist/server/manifest-status-resolver.d.ts.map +0 -1
  1519. package/dist/server/nuqs-ssr-provider.d.ts +0 -28
  1520. package/dist/server/nuqs-ssr-provider.d.ts.map +0 -1
  1521. package/dist/server/prerender.d.ts +0 -77
  1522. package/dist/server/prerender.d.ts.map +0 -1
  1523. package/dist/server/tree-builder.d.ts +0 -126
  1524. package/dist/server/tree-builder.d.ts.map +0 -1
  1525. package/dist/utils/directive-parser.d.ts +0 -70
  1526. package/dist/utils/directive-parser.d.ts.map +0 -1
  1527. package/src/cache/register-cached-function.ts +0 -103
  1528. package/src/client/browser-entry.ts +0 -678
  1529. package/src/client/head.ts +0 -61
  1530. package/src/client/link-status-provider.tsx +0 -30
  1531. package/src/client/segment-merger.ts +0 -339
  1532. package/src/client/stale-reload.ts +0 -87
  1533. package/src/client/transition-root.tsx +0 -166
  1534. package/src/client/types.ts +0 -21
  1535. package/src/client/use-navigation-pending.ts +0 -38
  1536. package/src/client/use-params.ts +0 -141
  1537. package/src/content/index.ts +0 -13
  1538. package/src/plugins/adapter-build.ts +0 -118
  1539. package/src/plugins/cache-transform.ts +0 -199
  1540. package/src/plugins/dynamic-transform.ts +0 -161
  1541. package/src/plugins/server-action-exports.ts +0 -220
  1542. package/src/routing/status-file-lint.ts +0 -112
  1543. package/src/search-params/analyze.ts +0 -192
  1544. package/src/search-params/builtin-codecs.ts +0 -228
  1545. package/src/search-params/codecs.ts +0 -153
  1546. package/src/search-params/create.ts +0 -321
  1547. package/src/search-params/registry.ts +0 -31
  1548. package/src/server/asset-headers.ts +0 -81
  1549. package/src/server/client-module-map.ts +0 -58
  1550. package/src/server/dev-fetch-instrumentation.ts +0 -96
  1551. package/src/server/dev-span-processor.ts +0 -78
  1552. package/src/server/dev-warnings.ts +0 -283
  1553. package/src/server/flush.ts +0 -182
  1554. package/src/server/form-flash.ts +0 -89
  1555. package/src/server/manifest-status-resolver.ts +0 -215
  1556. package/src/server/nuqs-ssr-provider.tsx +0 -63
  1557. package/src/server/prerender.ts +0 -139
  1558. package/src/server/tree-builder.ts +0 -382
  1559. package/src/shims/server-only-noop.js +0 -6
  1560. package/src/utils/directive-parser.ts +0 -529
@@ -0,0 +1,108 @@
1
+ // src/server/build-manifest.ts
2
+ /**
3
+ * Empty build manifest used in dev mode, and the single source of truth for
4
+ * what an empty manifest contains.
5
+ *
6
+ * `virtual:timber-build-manifest` serializes this constant into its generated
7
+ * source rather than restating it — one literal for the dev module, one for the
8
+ * production module's `globalThis.__TIMBER_BUILD_MANIFEST__ ?? …` fallback.
9
+ * They were three hand-written objects that had already drifted: this one and
10
+ * the dev literal were missing `requestDep` while the production fallback had
11
+ * it, so a reader who grepped the built bundle for `requestDep` found the one
12
+ * copy that mentioned it and read the fallback as the shipped map (TIM-1300).
13
+ * A field added here now reaches every copy.
14
+ */
15
+ var EMPTY_BUILD_MANIFEST = {
16
+ css: {},
17
+ js: {},
18
+ modulepreload: {},
19
+ fonts: {},
20
+ metadataRouteHashes: {},
21
+ requestDep: {}
22
+ };
23
+ /**
24
+ * Collect all CSS files needed for a matched route's segment chain.
25
+ *
26
+ * Walks segments root → leaf, collecting CSS for each layout and page.
27
+ * Deduplicates while preserving order (root layout CSS first).
28
+ */
29
+ function collectRouteCss(segments, manifest) {
30
+ const seen = /* @__PURE__ */ new Set();
31
+ const result = [];
32
+ for (const segment of segments) for (const file of [segment.layout, segment.page]) {
33
+ if (!file) continue;
34
+ const cssFiles = manifest.css[file.filePath];
35
+ if (!cssFiles) continue;
36
+ for (const url of cssFiles) if (!seen.has(url)) {
37
+ seen.add(url);
38
+ result.push(url);
39
+ }
40
+ }
41
+ return result;
42
+ }
43
+ /**
44
+ * Collect all font entries needed for a matched route's segment chain.
45
+ *
46
+ * Walks segments root → leaf, collecting fonts for each layout and page.
47
+ * Deduplicates by href while preserving order.
48
+ */
49
+ function collectRouteFonts(segments, manifest) {
50
+ const seen = /* @__PURE__ */ new Set();
51
+ const result = [];
52
+ for (const segment of segments) for (const file of [segment.layout, segment.page]) {
53
+ if (!file) continue;
54
+ const fonts = manifest.fonts[file.filePath];
55
+ if (!fonts) continue;
56
+ for (const entry of fonts) if (!seen.has(entry.href)) {
57
+ seen.add(entry.href);
58
+ result.push(entry);
59
+ }
60
+ }
61
+ return result;
62
+ }
63
+ /**
64
+ * Collect modulepreload URLs for a matched route's segment chain.
65
+ *
66
+ * Walks segments root → leaf, collecting transitive JS dependencies
67
+ * for each layout and page. Deduplicates across segments.
68
+ */
69
+ function collectRouteModulepreloads(segments, manifest) {
70
+ const seen = /* @__PURE__ */ new Set();
71
+ const result = [];
72
+ for (const segment of segments) for (const file of [segment.layout, segment.page]) {
73
+ if (!file) continue;
74
+ const preloads = manifest.modulepreload[file.filePath];
75
+ if (!preloads) continue;
76
+ for (const url of preloads) if (!seen.has(url)) {
77
+ seen.add(url);
78
+ result.push(url);
79
+ }
80
+ }
81
+ return result;
82
+ }
83
+ // src/shared/dev-span.ts
84
+ /**
85
+ * The wire contract between the dev server's span sink and the dev request
86
+ * pill in the browser. Dev-only; see design/50-dev-request-pill.md.
87
+ *
88
+ * Isomorphic: no server, client, or build-time imports.
89
+ */
90
+ /** HMR event that carries one finished span to the browser. */
91
+ var DEV_SPAN_EVENT = "timber:span";
92
+ /** HMR event a tab sends to ask for a trace's spans that ended before it connected. */
93
+ var DEV_SPAN_REPLAY_EVENT = "timber:span-replay";
94
+ /**
95
+ * `globalThis` key holding the span sink. The dev server plugin installs it
96
+ * and `DevSpanProcessor` (RSC module graph, same process, separate module
97
+ * instances) reads it, so the hand-off is a `Symbol.for` global.
98
+ */
99
+ var DEV_SPAN_SINK_KEY = Symbol.for("timber.dev.span-sink");
100
+ /** The `Server-Timing` metric whose `desc` is the response's trace ID. */
101
+ var TRACE_TIMING_NAME = "timber-trace";
102
+ /** The `Server-Timing` entry that carries a trace ID. */
103
+ function traceTimingEntry(traceId) {
104
+ return `${TRACE_TIMING_NAME};desc="${traceId}"`;
105
+ }
106
+ export { EMPTY_BUILD_MANIFEST as a, collectRouteModulepreloads as c, traceTimingEntry as i, DEV_SPAN_REPLAY_EVENT as n, collectRouteCss as o, DEV_SPAN_SINK_KEY as r, collectRouteFonts as s, DEV_SPAN_EVENT as t };
107
+
108
+ //# sourceMappingURL=dev-span-_NzMX-au.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-span-_NzMX-au.js","names":[],"sources":["../../src/server/build-manifest.ts","../../src/shared/dev-span.ts"],"sourcesContent":["/**\n * Build manifest types and utilities for CSS and JS asset tracking.\n *\n * The build manifest maps route segment file paths to their output\n * chunks from Vite's client build. This enables:\n * - <link rel=\"stylesheet\"> injection in HTML <head>\n * - <script type=\"module\"> with hashed URLs in production\n * - <link rel=\"modulepreload\"> for client chunk dependencies\n * - Link preload headers for Early Hints (103)\n *\n * In dev mode, Vite's HMR client handles CSS/JS injection, so the build\n * manifest is empty. In production, it's populated from Vite's\n * .vite/manifest.json after the client build.\n *\n * Design docs: 18-build-system.md §\"Build Manifest\", 02-rendering-pipeline.md §\"Early Hints\"\n */\n\n/** A font asset entry in the build manifest. */\nexport interface ManifestFontEntry {\n /** URL path to the font file (e.g. `/_timber/fonts/inter-latin-400-abc123.woff2`). */\n href: string;\n /** Font format (e.g. `woff2`). */\n format: string;\n /** Crossorigin attribute — always `anonymous` for fonts. */\n crossOrigin: string;\n}\n\n/** Build manifest mapping input file paths to output asset URLs. */\nexport interface BuildManifest {\n /** Map from input file path (relative to project root) to output CSS URLs. */\n css: Record<string, string[]>;\n /** Map from input file path to output JS chunk URL (hashed filename). */\n js: Record<string, string>;\n /** Map from input file path to transitive JS dependency URLs for modulepreload. */\n modulepreload: Record<string, string[]>;\n /** Map from input file path to font assets used by that module. */\n fonts: Record<string, ManifestFontEntry[]>;\n /**\n * Cache-busting hashes for metadata route files (opengraph-image, etc.).\n * Map from file path (relative to project root) to short content hash.\n * In dev mode this is empty — a startup nonce is used instead.\n */\n metadataRouteHashes?: Record<string, string>;\n /**\n * Static request-dependency map from the Vite plugin's module-graph analysis.\n * Map from segment entry file path to whether it's request-dependent.\n * Used by buildSegmentInfo() for X-Timber-Segments in production.\n */\n requestDep?: Record<string, boolean>;\n}\n\n/**\n * Empty build manifest used in dev mode, and the single source of truth for\n * what an empty manifest contains.\n *\n * `virtual:timber-build-manifest` serializes this constant into its generated\n * source rather than restating it — one literal for the dev module, one for the\n * production module's `globalThis.__TIMBER_BUILD_MANIFEST__ ?? …` fallback.\n * They were three hand-written objects that had already drifted: this one and\n * the dev literal were missing `requestDep` while the production fallback had\n * it, so a reader who grepped the built bundle for `requestDep` found the one\n * copy that mentioned it and read the fallback as the shipped map (TIM-1300).\n * A field added here now reaches every copy.\n */\nexport const EMPTY_BUILD_MANIFEST: BuildManifest = {\n css: {},\n js: {},\n modulepreload: {},\n fonts: {},\n metadataRouteHashes: {},\n requestDep: {},\n};\n\n/** Segment shape expected by collectRouteCss (matches ManifestSegmentNode). */\ninterface SegmentWithFiles {\n layout?: { filePath: string };\n page?: { filePath: string };\n}\n\n/**\n * Collect all CSS files needed for a matched route's segment chain.\n *\n * Walks segments root → leaf, collecting CSS for each layout and page.\n * Deduplicates while preserving order (root layout CSS first).\n */\nexport function collectRouteCss(segments: SegmentWithFiles[], manifest: BuildManifest): string[] {\n const seen = new Set<string>();\n const result: string[] = [];\n\n for (const segment of segments) {\n for (const file of [segment.layout, segment.page]) {\n if (!file) continue;\n const cssFiles = manifest.css[file.filePath];\n if (!cssFiles) continue;\n for (const url of cssFiles) {\n if (!seen.has(url)) {\n seen.add(url);\n result.push(url);\n }\n }\n }\n }\n\n return result;\n}\n\n/**\n * Generate <link rel=\"stylesheet\"> tags for CSS URLs.\n *\n * Returns an HTML string to prepend to headHtml for injection\n * via injectHead() before </head>.\n */\nexport function buildCssLinkTags(cssUrls: string[]): string {\n // Emit only <link rel=\"stylesheet\"> — no preload tags. CSS preloading\n // is handled by 103 Early Hints (Link header) which fires before the\n // HTML stream. Float also emits `<link rel=\"stylesheet\" data-precedence>`\n // at the top of <head> during Fizz rendering — the browser discovers\n // CSS from that tag. A <link rel=\"preload\"> here would arrive *after*\n // Float's stylesheet tag and trigger \"Preload was ignored\" warnings.\n return cssUrls.map((url) => `<link rel=\"stylesheet\" href=\"${url}\">`).join('');\n}\n\n// ─── Font utilities ──────────────────────────────────────────────────────\n\n/**\n * Collect all font entries needed for a matched route's segment chain.\n *\n * Walks segments root → leaf, collecting fonts for each layout and page.\n * Deduplicates by href while preserving order.\n */\nexport function collectRouteFonts(\n segments: SegmentWithFiles[],\n manifest: BuildManifest\n): ManifestFontEntry[] {\n const seen = new Set<string>();\n const result: ManifestFontEntry[] = [];\n\n for (const segment of segments) {\n for (const file of [segment.layout, segment.page]) {\n if (!file) continue;\n const fonts = manifest.fonts[file.filePath];\n if (!fonts) continue;\n for (const entry of fonts) {\n if (!seen.has(entry.href)) {\n seen.add(entry.href);\n result.push(entry);\n }\n }\n }\n }\n\n return result;\n}\n\n/**\n * Generate <link rel=\"preload\"> tags for font assets.\n *\n * Font preloads use `as=font` and always include `crossorigin` (required\n * for font preloads even for same-origin resources per the spec).\n */\nexport function buildFontPreloadTags(fonts: ManifestFontEntry[]): string {\n return fonts\n .map(\n (f) =>\n `<link rel=\"preload\" href=\"${f.href}\" as=\"font\" type=\"font/${f.format}\" crossorigin=\"${f.crossOrigin}\">`\n )\n .join('');\n}\n\n// ─── JS chunk utilities ──────────────────────────────────────────────────\n\n/**\n * Collect modulepreload URLs for a matched route's segment chain.\n *\n * Walks segments root → leaf, collecting transitive JS dependencies\n * for each layout and page. Deduplicates across segments.\n */\nexport function collectRouteModulepreloads(\n segments: SegmentWithFiles[],\n manifest: BuildManifest\n): string[] {\n const seen = new Set<string>();\n const result: string[] = [];\n\n for (const segment of segments) {\n for (const file of [segment.layout, segment.page]) {\n if (!file) continue;\n const preloads = manifest.modulepreload[file.filePath];\n if (!preloads) continue;\n for (const url of preloads) {\n if (!seen.has(url)) {\n seen.add(url);\n result.push(url);\n }\n }\n }\n }\n\n return result;\n}\n\n/**\n * Generate <link rel=\"modulepreload\"> tags for JS dependency URLs.\n *\n * Modulepreload hints tell the browser to fetch and parse JS modules\n * before they're needed, reducing waterfall latency for dynamic imports.\n */\nexport function buildModulepreloadTags(urls: string[]): string {\n return urls.map((url) => `<link rel=\"modulepreload\" href=\"${url}\">`).join('');\n}\n","/**\n * The wire contract between the dev server's span sink and the dev request\n * pill in the browser. Dev-only; see design/50-dev-request-pill.md.\n *\n * Isomorphic: no server, client, or build-time imports.\n */\n\n/** HMR event that carries one finished span to the browser. */\nexport const DEV_SPAN_EVENT = 'timber:span';\n\n/** HMR event a tab sends to ask for a trace's spans that ended before it connected. */\nexport const DEV_SPAN_REPLAY_EVENT = 'timber:span-replay';\n\n/**\n * `globalThis` key holding the span sink. The dev server plugin installs it\n * and `DevSpanProcessor` (RSC module graph, same process, separate module\n * instances) reads it, so the hand-off is a `Symbol.for` global.\n */\nexport const DEV_SPAN_SINK_KEY = Symbol.for('timber.dev.span-sink');\n\n/** The `Server-Timing` metric whose `desc` is the response's trace ID. */\nexport const TRACE_TIMING_NAME = 'timber-trace';\n\n/**\n * `globalThis` key holding the dev await wrapper. The dev await transform\n * (`plugins/dev-await.ts`) rewrites `await x` in app server code to call\n * it, looked up at call time; dev tracing installs it. With nothing\n * installed the call is a plain await. See design/50-dev-request-pill.md\n * §\"Phase 2\".\n */\nexport const DEV_AWAIT_KEY = Symbol.for('timber.dev.await');\n\n/** Span name for one awaited call in app server code. */\nexport const AWAIT_SPAN_NAME = 'timber.await';\n\n/**\n * Await spans shorter than this are dropped before they reach the terminal\n * tree or the pill: `await params` and other awaits of settled values would\n * otherwise drown the I/O the spans exist to show.\n */\nexport const AWAIT_SPAN_MIN_MS = 1;\n\n/** Root span of every pipeline request. */\nexport const ROOT_SPAN_NAME = 'http.server.request';\n\n/**\n * The span attributes that may reach the browser — the ones the pill reads,\n * and nothing else. An allowlist of keys, not of prefixes: a prefix let\n * through `timber.fetch_error` (an error message that can quote a full URL)\n * and user attributes such as `url.full` or\n * `http.request.header.authorization`. Typing the payload with this list\n * means the pill cannot read an attribute that isn't on it.\n */\nexport const DEV_SPAN_ATTRIBUTES = [\n 'http.request.method',\n 'http.response.status_code',\n /** Query and fragment stripped. */\n 'http.url',\n /** Query and fragment stripped. */\n 'url.path',\n 'timber.route',\n 'timber.segment',\n 'timber.slot',\n 'timber.action_name',\n 'timber.cache_status',\n /** The awaited expression's source text, whitespace collapsed, truncated. */\n 'timber.await_label',\n /** `path/relative/to/root.ts:line` of the await. */\n 'timber.await_location',\n /** The awaited promise was already awaited elsewhere: a wait on shared work, not new work. */\n 'timber.await_shared',\n] as const;\n\nexport type DevSpanAttribute = (typeof DEV_SPAN_ATTRIBUTES)[number];\n\n/** Attributes that hold a URL; sent without query or fragment. */\nexport const DEV_SPAN_URL_ATTRIBUTES: ReadonlySet<DevSpanAttribute> = new Set([\n 'http.url',\n 'url.path',\n]);\n\nexport type DevSpanSink = (span: DevSpanPayload) => void;\n\n/** One finished span, projected for the browser. */\nexport interface DevSpanPayload {\n traceId: string;\n spanId: string;\n /** Absent for the root span. */\n parentSpanId?: string;\n name: string;\n /** Epoch milliseconds. */\n startMs: number;\n /** Epoch milliseconds. */\n endMs: number;\n error: boolean;\n /** Only `DEV_SPAN_ATTRIBUTES`; URLs without query or fragment. */\n attributes: Partial<Record<DevSpanAttribute, string | number | boolean>>;\n /** Names of `timber.*` span events, e.g. `timber.cache.hit`. */\n events: string[];\n}\n\n/**\n * Read the trace ID from `Server-Timing` metrics, either a raw header value\n * or the `serverTiming` entries of a `PerformanceResourceTiming`.\n */\nexport function traceIdFromServerTiming(\n timing: string | null | readonly { name: string; description: string }[]\n): string | null {\n if (timing == null) return null;\n if (typeof timing !== 'string') {\n return timing.find((t) => t.name === TRACE_TIMING_NAME)?.description || null;\n }\n // `timber-trace;desc=\"<32 hex>\"` — the ID is hex, so no escaping to undo.\n const match = new RegExp(`(?:^|,)\\\\s*${TRACE_TIMING_NAME}\\\\s*;\\\\s*desc=\"?([0-9a-f]+)\"?`).exec(\n timing\n );\n return match?.[1] ?? null;\n}\n\n/** The `Server-Timing` entry that carries a trace ID. */\nexport function traceTimingEntry(traceId: string): string {\n return `${TRACE_TIMING_NAME};desc=\"${traceId}\"`;\n}\n\n// ─── Labels ─────────────────────────────────────────────────────────────────\n\n/** Span attributes as either side holds them (OTEL also allows arrays). */\ntype SpanAttributes = Readonly<Record<string, unknown>>;\n\n/** `@slot ` for a span from a parallel slot, so it reads apart from the main route. */\nfunction slotPrefix(attrs: SpanAttributes): string {\n const slot = attrs['timber.slot'];\n return slot ? `${String(slot)} ` : '';\n}\n\n/**\n * Map a span to its display label and environment tag. One mapping for the\n * terminal tree and the dev request pill, so the two never name a span\n * differently.\n */\nexport function devSpanLabel(name: string, attrs: SpanAttributes): { label: string; env: string } {\n switch (name) {\n case ROOT_SPAN_NAME: {\n const method = attrs['http.request.method'] ?? 'GET';\n const path = attrs['url.path'] ?? '/';\n return { label: `${String(method)} ${String(path)}`, env: 'rsc' };\n }\n case 'timber.proxy':\n return { label: 'proxy.ts', env: 'proxy' };\n case 'timber.middleware':\n return { label: 'middleware.ts', env: 'rsc' };\n case 'timber.render':\n return { label: 'render', env: 'rsc' };\n case 'timber.access': {\n const seg = attrs['timber.segment'] ?? 'segment';\n return { label: `AccessGate (${String(seg)})`, env: 'rsc' };\n }\n case 'timber.ssr':\n return { label: 'hydration render', env: 'ssr' };\n case 'timber.action': {\n const actionName = attrs['timber.action_name'] ?? 'action';\n return { label: String(actionName), env: 'rsc' };\n }\n case 'timber.metadata':\n return { label: 'metadata()', env: 'rsc' };\n case 'timber.layout': {\n const seg = attrs['timber.segment'] ?? '/';\n return { label: `layout ${slotPrefix(attrs)}${String(seg)}`, env: 'rsc' };\n }\n case 'timber.page': {\n const route = attrs['timber.route'] ?? '/';\n return { label: `page ${slotPrefix(attrs)}${String(route)}`, env: 'rsc' };\n }\n case AWAIT_SPAN_NAME:\n // Shared: waited on a promise another await already took — no new work.\n return {\n label: `await ${String(attrs['timber.await_label'] ?? '')}${attrs['timber.await_shared'] === true ? ' (shared)' : ''}`,\n env: 'await',\n };\n case 'timber.fetch': {\n const fetchMethod = attrs['http.request.method'] ?? 'GET';\n const fetchUrl = attrs['http.url'] ?? '';\n return { label: `fetch ${String(fetchMethod)} ${String(fetchUrl)}`, env: 'fetch' };\n }\n default:\n return { label: name, env: 'rsc' };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAgEA,IAAa,uBAAsC;CACjD,KAAK,CAAC;CACN,IAAI,CAAC;CACL,eAAe,CAAC;CAChB,OAAO,CAAC;CACR,qBAAqB,CAAC;CACtB,YAAY,CAAC;AACf;;;;;;;AAcA,SAAgB,gBAAgB,UAA8B,UAAmC;CAC/F,MAAM,uBAAO,IAAI,IAAY;CAC7B,MAAM,SAAmB,CAAC;CAE1B,KAAK,MAAM,WAAW,UACpB,KAAK,MAAM,QAAQ,CAAC,QAAQ,QAAQ,QAAQ,IAAI,GAAG;EACjD,IAAI,CAAC,MAAM;EACX,MAAM,WAAW,SAAS,IAAI,KAAK;EACnC,IAAI,CAAC,UAAU;EACf,KAAK,MAAM,OAAO,UAChB,IAAI,CAAC,KAAK,IAAI,GAAG,GAAG;GAClB,KAAK,IAAI,GAAG;GACZ,OAAO,KAAK,GAAG;EACjB;CAEJ;CAGF,OAAO;AACT;;;;;;;AA0BA,SAAgB,kBACd,UACA,UACqB;CACrB,MAAM,uBAAO,IAAI,IAAY;CAC7B,MAAM,SAA8B,CAAC;CAErC,KAAK,MAAM,WAAW,UACpB,KAAK,MAAM,QAAQ,CAAC,QAAQ,QAAQ,QAAQ,IAAI,GAAG;EACjD,IAAI,CAAC,MAAM;EACX,MAAM,QAAQ,SAAS,MAAM,KAAK;EAClC,IAAI,CAAC,OAAO;EACZ,KAAK,MAAM,SAAS,OAClB,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,GAAG;GACzB,KAAK,IAAI,MAAM,IAAI;GACnB,OAAO,KAAK,KAAK;EACnB;CAEJ;CAGF,OAAO;AACT;;;;;;;AAyBA,SAAgB,2BACd,UACA,UACU;CACV,MAAM,uBAAO,IAAI,IAAY;CAC7B,MAAM,SAAmB,CAAC;CAE1B,KAAK,MAAM,WAAW,UACpB,KAAK,MAAM,QAAQ,CAAC,QAAQ,QAAQ,QAAQ,IAAI,GAAG;EACjD,IAAI,CAAC,MAAM;EACX,MAAM,WAAW,SAAS,cAAc,KAAK;EAC7C,IAAI,CAAC,UAAU;EACf,KAAK,MAAM,OAAO,UAChB,IAAI,CAAC,KAAK,IAAI,GAAG,GAAG;GAClB,KAAK,IAAI,GAAG;GACZ,OAAO,KAAK,GAAG;EACjB;CAEJ;CAGF,OAAO;AACT;;;;;;;;;AC/LA,IAAa,iBAAiB;;AAG9B,IAAa,wBAAwB;;;;;;AAOrC,IAAa,oBAAoB,OAAO,IAAI,sBAAsB;;AAGlE,IAAa,oBAAoB;;AAmGjC,SAAgB,iBAAiB,SAAyB;CACxD,OAAO,GAAG,kBAAkB,SAAS,QAAQ;AAC/C"}
@@ -0,0 +1,327 @@
1
+ // src/cache/handler-store.ts
2
+ var handler = null;
3
+ var explicitlyConfigured = false;
4
+ /** Replace the active cache handler. */
5
+ function setCacheHandler(h) {
6
+ handler = h;
7
+ explicitlyConfigured = true;
8
+ }
9
+ /** Whether the handler was explicitly configured (vs the default in-memory fallback). */
10
+ function isCacheHandlerConfigured() {
11
+ return explicitlyConfigured;
12
+ }
13
+ /**
14
+ * Get the active cache handler. Creates a default MemoryCacheHandler on
15
+ * first access if none has been set via setCacheHandler().
16
+ */
17
+ function getCacheHandler() {
18
+ if (!handler) handler = createDefaultHandler();
19
+ return handler;
20
+ }
21
+ function createDefaultHandler() {
22
+ const store = /* @__PURE__ */ new Map();
23
+ const maxEntries = 1e3;
24
+ return {
25
+ async get(key) {
26
+ const entry = store.get(key);
27
+ if (!entry) return null;
28
+ store.delete(key);
29
+ store.set(key, entry);
30
+ const stale = Date.now() > entry.expiresAt;
31
+ return {
32
+ value: entry.value,
33
+ stale
34
+ };
35
+ },
36
+ async set(key, value, opts) {
37
+ if (store.has(key)) store.delete(key);
38
+ while (store.size >= maxEntries) {
39
+ const oldest = store.keys().next().value;
40
+ if (oldest !== void 0) store.delete(oldest);
41
+ else break;
42
+ }
43
+ store.set(key, {
44
+ value,
45
+ expiresAt: Date.now() + opts.ttl * 1e3,
46
+ tags: opts.tags
47
+ });
48
+ },
49
+ async invalidate(opts) {
50
+ if (opts.key) store.delete(opts.key);
51
+ if (opts.tag) {
52
+ for (const [key, entry] of store) if (entry.tags.includes(opts.tag)) store.delete(key);
53
+ }
54
+ }
55
+ };
56
+ }
57
+ // src/cache/invalidation-epoch.ts
58
+ /**
59
+ * Per-process invalidation epoch tracking for timber.cache (TIM-1028).
60
+ *
61
+ * handler.set for a cache miss runs after `fn()` resolves. An explicit
62
+ * `cache.invalidate({ tag })` / `revalidateTag` that lands while fn is in
63
+ * flight would otherwise be silently undone — the just-invalidated value
64
+ * re-stored as fresh for the full TTL, resurrecting pre-mutation data.
65
+ *
66
+ * Every invalidation bumps a monotonic epoch and records it against the
67
+ * invalidated key/tag. Before storing a result, the cache wrapper checks
68
+ * whether its key or any of its tags were invalidated after fn started and
69
+ * skips the write if so. Skipping is always safe: the only cost is one
70
+ * extra cache miss on the next call.
71
+ *
72
+ * Scope: per-process, like the singleflight map. An invalidation issued by
73
+ * another instance against a shared handler (Redis/KV) during fn flight is
74
+ * not observable here — closing that window fully would require store-level
75
+ * versioning, which no CacheHandler backend offers.
76
+ */
77
+ var epoch = 0;
78
+ /**
79
+ * Last-invalidated epoch per `key:<k>` / `tag:<t>` entry. Insertion order is
80
+ * epoch order (entries are re-inserted on update), so the oldest entry is
81
+ * always first — pruning evicts lowest epochs.
82
+ */
83
+ var lastInvalidated = /* @__PURE__ */ new Map();
84
+ /**
85
+ * Bound on tracked entries so high-cardinality tag invalidation (e.g.
86
+ * per-user tags) cannot grow this map without limit.
87
+ */
88
+ var MAX_TRACKED_ENTRIES = 1e4;
89
+ /**
90
+ * Every execution that started at or before this epoch counts as
91
+ * invalidated. Raised by eviction (history was truncated, so we can no
92
+ * longer prove an execution wasn't invalidated) and by
93
+ * `recordInvalidationOfAll()`.
94
+ */
95
+ var invalidatedEpochFloor = 0;
96
+ /** The current epoch. Capture before running fn(), pass to wasInvalidatedSince. */
97
+ function currentInvalidationEpoch() {
98
+ return epoch;
99
+ }
100
+ /**
101
+ * Record an invalidation. Call BEFORE handler.invalidate() so an execution
102
+ * whose set-check races the invalidation errs toward skipping the write.
103
+ */
104
+ function recordInvalidation(opts) {
105
+ epoch++;
106
+ if (opts.key) track(`key:${opts.key}`);
107
+ if (opts.tag) track(`tag:${opts.tag}`);
108
+ }
109
+ /**
110
+ * Record an invalidation of every key and tag at once. The dev server
111
+ * calls this on a source change (server/prebuilt/dev-store.ts): any cached
112
+ * render in flight may have loaded the pre-change code, so none of them may
113
+ * store, and a caller arriving after the change must not join their flight.
114
+ */
115
+ function recordInvalidationOfAll() {
116
+ epoch++;
117
+ invalidatedEpochFloor = epoch;
118
+ }
119
+ function track(entry) {
120
+ lastInvalidated.delete(entry);
121
+ lastInvalidated.set(entry, epoch);
122
+ while (lastInvalidated.size > MAX_TRACKED_ENTRIES) {
123
+ const oldest = lastInvalidated.entries().next().value;
124
+ if (oldest === void 0) break;
125
+ invalidatedEpochFloor = Math.max(invalidatedEpochFloor, oldest[1]);
126
+ lastInvalidated.delete(oldest[0]);
127
+ }
128
+ }
129
+ /**
130
+ * Whether the key or any tag was invalidated after `startEpoch` (the epoch
131
+ * captured when fn started executing).
132
+ */
133
+ function wasInvalidatedSince(startEpoch, key, tags) {
134
+ return lastInvalidationEpochFor(key, tags) > startEpoch;
135
+ }
136
+ /**
137
+ * The highest epoch at which the key or any of the tags was invalidated
138
+ * (0 if never). Used to scope the singleflight key: callers arriving after
139
+ * an invalidation must not coalesce onto a flight that started before it —
140
+ * they would receive the pre-invalidation result the invalidation was
141
+ * issued to discard.
142
+ */
143
+ function lastInvalidationEpochFor(key, tags) {
144
+ let last = invalidatedEpochFloor;
145
+ const keyEpoch = lastInvalidated.get(`key:${key}`);
146
+ if (keyEpoch !== void 0 && keyEpoch > last) last = keyEpoch;
147
+ for (const tag of tags) {
148
+ const tagEpoch = lastInvalidated.get(`tag:${tag}`);
149
+ if (tagEpoch !== void 0 && tagEpoch > last) last = tagEpoch;
150
+ }
151
+ return last;
152
+ }
153
+ // src/server/prebuilt/dev-store.ts
154
+ /**
155
+ * Dev-mode store for cache.component output (TIM-1588, design/44 §Dev Mode).
156
+ *
157
+ * In production a `prerender` entry is captured at build time and frozen
158
+ * until the next deploy. Dev has no build step, so this in-memory store
159
+ * stands in for the build artifact: a prerender-tier render is captured on
160
+ * its first request (under the synthetic build store, so request-context
161
+ * reads fail exactly as `pnpm build` would) and served from here after
162
+ * that. Runtime-tier entries (`ttl`/`tags`) keep using the cache-handler
163
+ * overlay; in dev their keys carry this store's namespace (`overlayKey`).
164
+ *
165
+ * Every dev-server watcher event clears the store. The dev-server plugin
166
+ * sends `PREBUILT_DEV_CLEAR_EVENT` to the RSC environment and the RSC entry
167
+ * calls `clearDevPrebuiltStore()` (plugins/dev-store-clear.ts, TIM-1599).
168
+ * A save of a file the RSC module graph knows is scoped: the event names
169
+ * the components declared in the saved module and its transitive
170
+ * importers, which are the only call sites whose code could have changed.
171
+ * Any other event (a file read with `fs`, an add or a delete) names none,
172
+ * and clears everything — the module graph never says who reads a file
173
+ * with `fs`. A clear
174
+ * does three things:
175
+ *
176
+ * 1. drops the seeds of the named components and every ISR seed (every
177
+ * seed, unscoped);
178
+ * 2. bumps the generation, which namespaces dev overlay keys and
179
+ * `cache.data` keys, so EVERY runtime-tier and data entry stored
180
+ * before the save becomes unreachable, scoped or not. Those tiers are
181
+ * cheap to refill, and a data function's ID comes from its call site,
182
+ * so a scoped answer for them would need a dependency walk of its own;
183
+ * 3. records an invalidation of the named components (of everything,
184
+ * unscoped), so a capture of one already in flight — which may have
185
+ * loaded the pre-save code — is not stored, and a request arriving
186
+ * after the save does not join that flight (the TIM-1028 guard every
187
+ * capture path already runs). Captures of the other components are
188
+ * untouched.
189
+ *
190
+ * Inactive outside dev: production never enables it. Dev enables it only
191
+ * when HMR is on — with `server.hmr: false` Vite delivers no watcher events
192
+ * to plugins and nothing would clear the store, so dev bypasses caching
193
+ * entirely instead (`DevPrebuiltStoreMode`).
194
+ */
195
+ /** Custom HMR event the dev-server plugin sends to the RSC environment. */
196
+ var PREBUILT_DEV_CLEAR_EVENT = "timber:prebuilt-dev-clear";
197
+ var mode = "off";
198
+ var generation = 0;
199
+ /** Components already announced by the one-time dev log. */
200
+ var loggedIds = /* @__PURE__ */ new Set();
201
+ /** Component ID → cache key → seed. */
202
+ var seeds = /* @__PURE__ */ new Map();
203
+ /**
204
+ * Distinguishes this process's overlay keys from a previous dev session's,
205
+ * in case the configured cache handler outlives the process (Redis in dev).
206
+ * Created on first use, never at module load: production imports this
207
+ * module too, and Workers reject random-value generation in global scope.
208
+ * Global `crypto`, not node:crypto, because dev may run the RSC environment
209
+ * in workerd.
210
+ */
211
+ var processToken = null;
212
+ function isDevPrebuiltStoreActive() {
213
+ return mode === "active";
214
+ }
215
+ /** Dev without HMR: every cache.component wrapper renders live. */
216
+ function isDevPrebuiltCacheBypassed() {
217
+ return mode === "bypass";
218
+ }
219
+ /**
220
+ * Namespace for overlay keys while the dev store is active, in place of the
221
+ * deployment ID (which is null in dev). Changes on every clear. Null when
222
+ * inactive.
223
+ */
224
+ function devOverlayNamespace() {
225
+ if (mode !== "active") return null;
226
+ processToken ??= crypto.randomUUID().slice(0, 8);
227
+ return `dev-${processToken}-${generation}`;
228
+ }
229
+ /**
230
+ * The key a `cache.data` entry is stored under: the logical key, prefixed in
231
+ * dev with the namespace above. So a save makes every data entry stored
232
+ * before it unreachable, whatever the handler. A data function's ID comes
233
+ * from its call site, so editing a helper it calls, or a file it reads,
234
+ * would otherwise keep serving the old result to every component captured
235
+ * after the save. Invalidation epochs and singleflight stay on the logical
236
+ * key; only the handler sees the prefix.
237
+ */
238
+ function devDataCacheKey(key) {
239
+ const namespace = devOverlayNamespace();
240
+ return namespace === null ? key : `${namespace}\u0000${key}`;
241
+ }
242
+ function getDevSeed(componentId, cacheKey) {
243
+ return seeds.get(componentId)?.get(cacheKey);
244
+ }
245
+ /**
246
+ * Store a captured seed, announcing the component's first one. The caller
247
+ * has already checked that no clear (or tag invalidation) happened while it
248
+ * was capturing.
249
+ */
250
+ function setDevSeed(componentId, cacheKey, seed) {
251
+ let entries = seeds.get(componentId);
252
+ if (!entries) seeds.set(componentId, entries = /* @__PURE__ */ new Map());
253
+ entries.set(cacheKey, seed);
254
+ if (!loggedIds.has(componentId)) {
255
+ loggedIds.add(componentId);
256
+ console.log(`[timber] cache.component "${componentId}": prerendered in dev — served from memory until a file it depends on changes. A hard reload (Cache-Control: no-cache) renders it again.`);
257
+ }
258
+ }
259
+ /**
260
+ * An invalidation-epoch tag for one component (it never reaches a cache
261
+ * handler; the NUL keeps it apart from user tags), recorded when a scoped
262
+ * clear drops the component. Dev captures add it
263
+ * to their invalidation checks, so a scoped clear reaches a capture of the
264
+ * component that is in flight, including its first, which has no seed yet.
265
+ */
266
+ function devComponentTag(componentId) {
267
+ return `\u0000timber-dev-component:${componentId}`;
268
+ }
269
+ /**
270
+ * A source change: drop the seeds of `componentIds`, or of every component
271
+ * when absent. Every clear bumps the generation (see the header).
272
+ */
273
+ function clearDevPrebuiltStore(componentIds) {
274
+ generation++;
275
+ if (componentIds === void 0) {
276
+ seeds.clear();
277
+ recordInvalidationOfAll();
278
+ return;
279
+ }
280
+ for (const id of componentIds) {
281
+ recordInvalidation({ tag: devComponentTag(id) });
282
+ seeds.delete(id);
283
+ }
284
+ for (const entries of seeds.values()) for (const [cacheKey, seed] of entries) if (seed.isr) entries.delete(cacheKey);
285
+ }
286
+ /**
287
+ * The invalidation-epoch key dev captures of one entry check. Unlike the
288
+ * overlay key it carries no generation, like the seed it guards: a capture
289
+ * that a scoped clear kept in flight started under an older generation,
290
+ * and must still see a hard reload that comes after the clear.
291
+ */
292
+ function devEntryKey(componentId, cacheKey) {
293
+ return `\u0000timber-dev-entry:${componentId}:${cacheKey}`;
294
+ }
295
+ /**
296
+ * A hard reload: discard one entry — its seed and its overlay record — so
297
+ * the request renders it again. Recorded as an invalidation of both its
298
+ * keys first, so a capture of it already in flight (which may have read the
299
+ * old external data) neither stores nor is joined by this request.
300
+ */
301
+ async function discardDevEntry(componentId, cacheKey, overlayKey) {
302
+ recordInvalidation({ key: devEntryKey(componentId, cacheKey) });
303
+ recordInvalidation({ key: overlayKey });
304
+ seeds.get(componentId)?.delete(cacheKey);
305
+ await getCacheHandler().invalidate({ key: overlayKey });
306
+ }
307
+ /**
308
+ * `revalidateTag` in dev: drop the seeds carrying the tag. This is the dev
309
+ * counterpart of writing a tombstone over a build seed (design/45 §ISR
310
+ * mechanics) — the next request misses and captures again.
311
+ */
312
+ function invalidateDevSeedsByTag(tag) {
313
+ for (const entries of seeds.values()) for (const [cacheKey, seed] of entries) if (seed.tags.includes(tag)) entries.delete(cacheKey);
314
+ }
315
+ /**
316
+ * Whether the request asks to skip caches — a browser hard reload, or any
317
+ * request while DevTools "Disable cache" is on, sends `Cache-Control:
318
+ * no-cache`. Dev only: the escape hatch for components that read external
319
+ * data (a CMS, a database) while it is being edited. Production never
320
+ * honors it — a client must not be able to force cache.component re-renders.
321
+ */
322
+ function isHardReload(headers) {
323
+ return /(?:^|,)\s*no-cache\s*(?:,|$)/i.test(headers.get("cache-control") ?? "");
324
+ }
325
+ export { wasInvalidatedSince as _, devEntryKey as a, setCacheHandler as b, getDevSeed as c, isDevPrebuiltStoreActive as d, isHardReload as f, recordInvalidation as g, lastInvalidationEpochFor as h, devDataCacheKey as i, invalidateDevSeedsByTag as l, currentInvalidationEpoch as m, clearDevPrebuiltStore as n, devOverlayNamespace as o, setDevSeed as p, devComponentTag as r, discardDevEntry as s, PREBUILT_DEV_CLEAR_EVENT as t, isDevPrebuiltCacheBypassed as u, getCacheHandler as v, isCacheHandlerConfigured as y };
326
+
327
+ //# sourceMappingURL=dev-store-BvdqtHvK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-store-BvdqtHvK.js","names":[],"sources":["../../src/cache/handler-store.ts","../../src/cache/invalidation-epoch.ts","../../src/server/prebuilt/dev-store.ts"],"sourcesContent":["/**\n * Module-level cache handler singleton.\n *\n * Lazily initialized to MemoryCacheHandler on first access. The framework\n * replaces this at boot from timber.config.ts via setCacheHandler().\n *\n * This module avoids importing from ./index to prevent circular dependencies.\n */\n\n// Inline the interface to avoid circular import with index.ts\ninterface CacheHandlerLike {\n get(key: string): Promise<{ value: unknown; stale: boolean } | null>;\n set(key: string, value: unknown, opts: { ttl: number; tags: string[] }): Promise<void>;\n invalidate(opts: { key?: string; tag?: string }): Promise<void>;\n}\n\nlet handler: CacheHandlerLike | null = null;\n\nlet explicitlyConfigured = false;\n\n/** Whether `handler` came from timber.cache.ts (applyConfiguredCacheHandler). */\nlet fromCacheConfig = false;\n\n/** The handler last installed by a direct setCacheHandler() call, if any. */\nlet directHandler: CacheHandlerLike | null = null;\n\n/** Replace the active cache handler. */\nexport function setCacheHandler(h: CacheHandlerLike): void {\n handler = h;\n explicitlyConfigured = true;\n fromCacheConfig = false;\n directHandler = h;\n}\n\n/**\n * Apply the handler timber.cache.ts exports, or `null` when it exports none.\n * Called on every run of the RSC entry. In dev the entry re-runs after an\n * edit while this module keeps its state (design/21 §HMR Wiring), so a\n * handler removed from timber.cache.ts must be dropped here, not kept\n * serving. A handler installed by a direct setCacheHandler() call (from\n * register(), say) is left in place when the file exports none, and comes\n * back when a configured handler that replaced it is removed.\n */\nexport function applyConfiguredCacheHandler(h: CacheHandlerLike | null): void {\n if (h) {\n handler = h;\n explicitlyConfigured = true;\n fromCacheConfig = true;\n } else if (fromCacheConfig) {\n handler = directHandler;\n explicitlyConfigured = directHandler !== null;\n fromCacheConfig = false;\n }\n}\n\n/** @internal — reset for tests only. */\nexport function _resetCacheHandler(): void {\n handler = null;\n explicitlyConfigured = false;\n fromCacheConfig = false;\n directHandler = null;\n}\n\n/** Whether the handler was explicitly configured (vs the default in-memory fallback). */\nexport function isCacheHandlerConfigured(): boolean {\n return explicitlyConfigured;\n}\n\n/**\n * Get the active cache handler. Creates a default MemoryCacheHandler on\n * first access if none has been set via setCacheHandler().\n */\nexport function getCacheHandler(): CacheHandlerLike {\n if (!handler) {\n // Inline a minimal LRU cache to avoid circular dep with index.ts.\n // In production, the framework always calls setCacheHandler() at boot.\n handler = createDefaultHandler();\n }\n return handler;\n}\n\nfunction createDefaultHandler(): CacheHandlerLike {\n const store = new Map<string, { value: unknown; expiresAt: number; tags: string[] }>();\n const maxEntries = 1000;\n\n return {\n async get(key) {\n const entry = store.get(key);\n if (!entry) return null;\n store.delete(key);\n store.set(key, entry);\n const stale = Date.now() > entry.expiresAt;\n return { value: entry.value, stale };\n },\n async set(key, value, opts) {\n if (store.has(key)) store.delete(key);\n while (store.size >= maxEntries) {\n const oldest = store.keys().next().value;\n if (oldest !== undefined) store.delete(oldest);\n else break;\n }\n store.set(key, { value, expiresAt: Date.now() + opts.ttl * 1000, tags: opts.tags });\n },\n async invalidate(opts) {\n if (opts.key) store.delete(opts.key);\n if (opts.tag) {\n for (const [key, entry] of store) {\n if (entry.tags.includes(opts.tag)) store.delete(key);\n }\n }\n },\n };\n}\n","/**\n * Per-process invalidation epoch tracking for timber.cache (TIM-1028).\n *\n * handler.set for a cache miss runs after `fn()` resolves. An explicit\n * `cache.invalidate({ tag })` / `revalidateTag` that lands while fn is in\n * flight would otherwise be silently undone — the just-invalidated value\n * re-stored as fresh for the full TTL, resurrecting pre-mutation data.\n *\n * Every invalidation bumps a monotonic epoch and records it against the\n * invalidated key/tag. Before storing a result, the cache wrapper checks\n * whether its key or any of its tags were invalidated after fn started and\n * skips the write if so. Skipping is always safe: the only cost is one\n * extra cache miss on the next call.\n *\n * Scope: per-process, like the singleflight map. An invalidation issued by\n * another instance against a shared handler (Redis/KV) during fn flight is\n * not observable here — closing that window fully would require store-level\n * versioning, which no CacheHandler backend offers.\n */\n\nlet epoch = 0;\n\n/**\n * Last-invalidated epoch per `key:<k>` / `tag:<t>` entry. Insertion order is\n * epoch order (entries are re-inserted on update), so the oldest entry is\n * always first — pruning evicts lowest epochs.\n */\nconst lastInvalidated = new Map<string, number>();\n\n/**\n * Bound on tracked entries so high-cardinality tag invalidation (e.g.\n * per-user tags) cannot grow this map without limit.\n */\nconst MAX_TRACKED_ENTRIES = 10_000;\n\n/**\n * Every execution that started at or before this epoch counts as\n * invalidated. Raised by eviction (history was truncated, so we can no\n * longer prove an execution wasn't invalidated) and by\n * `recordInvalidationOfAll()`.\n */\nlet invalidatedEpochFloor = 0;\n\n/** The current epoch. Capture before running fn(), pass to wasInvalidatedSince. */\nexport function currentInvalidationEpoch(): number {\n return epoch;\n}\n\n/**\n * Record an invalidation. Call BEFORE handler.invalidate() so an execution\n * whose set-check races the invalidation errs toward skipping the write.\n */\nexport function recordInvalidation(opts: { key?: string; tag?: string }): void {\n epoch++;\n if (opts.key) track(`key:${opts.key}`);\n if (opts.tag) track(`tag:${opts.tag}`);\n}\n\n/**\n * Record an invalidation of every key and tag at once. The dev server\n * calls this on a source change (server/prebuilt/dev-store.ts): any cached\n * render in flight may have loaded the pre-change code, so none of them may\n * store, and a caller arriving after the change must not join their flight.\n */\nexport function recordInvalidationOfAll(): void {\n epoch++;\n invalidatedEpochFloor = epoch;\n}\n\nfunction track(entry: string): void {\n lastInvalidated.delete(entry);\n lastInvalidated.set(entry, epoch);\n while (lastInvalidated.size > MAX_TRACKED_ENTRIES) {\n const oldest = lastInvalidated.entries().next().value;\n if (oldest === undefined) break;\n invalidatedEpochFloor = Math.max(invalidatedEpochFloor, oldest[1]);\n lastInvalidated.delete(oldest[0]);\n }\n}\n\n/**\n * Whether the key or any tag was invalidated after `startEpoch` (the epoch\n * captured when fn started executing).\n */\nexport function wasInvalidatedSince(startEpoch: number, key: string, tags: string[]): boolean {\n return lastInvalidationEpochFor(key, tags) > startEpoch;\n}\n\n/**\n * The highest epoch at which the key or any of the tags was invalidated\n * (0 if never). Used to scope the singleflight key: callers arriving after\n * an invalidation must not coalesce onto a flight that started before it —\n * they would receive the pre-invalidation result the invalidation was\n * issued to discard.\n */\nexport function lastInvalidationEpochFor(key: string, tags: string[]): number {\n let last = invalidatedEpochFloor;\n const keyEpoch = lastInvalidated.get(`key:${key}`);\n if (keyEpoch !== undefined && keyEpoch > last) last = keyEpoch;\n for (const tag of tags) {\n const tagEpoch = lastInvalidated.get(`tag:${tag}`);\n if (tagEpoch !== undefined && tagEpoch > last) last = tagEpoch;\n }\n return last;\n}\n","/**\n * Dev-mode store for cache.component output (TIM-1588, design/44 §Dev Mode).\n *\n * In production a `prerender` entry is captured at build time and frozen\n * until the next deploy. Dev has no build step, so this in-memory store\n * stands in for the build artifact: a prerender-tier render is captured on\n * its first request (under the synthetic build store, so request-context\n * reads fail exactly as `pnpm build` would) and served from here after\n * that. Runtime-tier entries (`ttl`/`tags`) keep using the cache-handler\n * overlay; in dev their keys carry this store's namespace (`overlayKey`).\n *\n * Every dev-server watcher event clears the store. The dev-server plugin\n * sends `PREBUILT_DEV_CLEAR_EVENT` to the RSC environment and the RSC entry\n * calls `clearDevPrebuiltStore()` (plugins/dev-store-clear.ts, TIM-1599).\n * A save of a file the RSC module graph knows is scoped: the event names\n * the components declared in the saved module and its transitive\n * importers, which are the only call sites whose code could have changed.\n * Any other event (a file read with `fs`, an add or a delete) names none,\n * and clears everything — the module graph never says who reads a file\n * with `fs`. A clear\n * does three things:\n *\n * 1. drops the seeds of the named components and every ISR seed (every\n * seed, unscoped);\n * 2. bumps the generation, which namespaces dev overlay keys and\n * `cache.data` keys, so EVERY runtime-tier and data entry stored\n * before the save becomes unreachable, scoped or not. Those tiers are\n * cheap to refill, and a data function's ID comes from its call site,\n * so a scoped answer for them would need a dependency walk of its own;\n * 3. records an invalidation of the named components (of everything,\n * unscoped), so a capture of one already in flight — which may have\n * loaded the pre-save code — is not stored, and a request arriving\n * after the save does not join that flight (the TIM-1028 guard every\n * capture path already runs). Captures of the other components are\n * untouched.\n *\n * Inactive outside dev: production never enables it. Dev enables it only\n * when HMR is on — with `server.hmr: false` Vite delivers no watcher events\n * to plugins and nothing would clear the store, so dev bypasses caching\n * entirely instead (`DevPrebuiltStoreMode`).\n */\n\nimport { getCacheHandler } from '../../cache/handler-store.ts';\nimport { recordInvalidation, recordInvalidationOfAll } from '../../cache/invalidation-epoch.ts';\n\n/** Custom HMR event the dev-server plugin sends to the RSC environment. */\nexport const PREBUILT_DEV_CLEAR_EVENT = 'timber:prebuilt-dev-clear';\n\n/**\n * The `PREBUILT_DEV_CLEAR_EVENT` payload: the components whose seeds to\n * drop. Absent means every component.\n */\nexport interface DevStoreClear {\n componentIds?: string[];\n}\n\n/** One captured prerender-tier entry — the dev counterpart of a `.flight` seed. */\nexport interface DevSeed {\n bytes: Uint8Array;\n /** Resolved tags, so `revalidateTag` can drop an ISR seed. */\n tags: string[];\n /** Capture time; stands in for the manifest's buildTimestamp. */\n capturedAt: number;\n /**\n * The component also has a runtime lifetime (`ttl`/`tags`, ISR): its\n * newer renders live in the overlay, which every clear moves on from.\n */\n isr: boolean;\n}\n\n/**\n * - `off`: production (and the default). Wrappers use the build artifact and\n * the overlay.\n * - `active`: dev with HMR. The dev store stands in for the build artifact.\n * - `bypass`: dev without HMR (`server.hmr: false`). No watcher event would\n * ever reach the store, so nothing is cached at all: every wrapper renders\n * live, runtime-tier ones included (the overlay would otherwise hold\n * entries a save never clears).\n */\nexport type DevPrebuiltStoreMode = 'off' | 'active' | 'bypass';\n\nlet mode: DevPrebuiltStoreMode = 'off';\nlet generation = 0;\n/** Components already announced by the one-time dev log. */\nconst loggedIds = new Set<string>();\n/** Component ID → cache key → seed. */\nconst seeds = new Map<string, Map<string, DevSeed>>();\n\n/**\n * Distinguishes this process's overlay keys from a previous dev session's,\n * in case the configured cache handler outlives the process (Redis in dev).\n * Created on first use, never at module load: production imports this\n * module too, and Workers reject random-value generation in global scope.\n * Global `crypto`, not node:crypto, because dev may run the RSC environment\n * in workerd.\n */\nlet processToken: string | null = null;\n\n/**\n * Set by the RSC entry in dev (and by tests). A change of mode starts the\n * store empty. Setting the same mode again keeps it: the RSC entry\n * self-accepts, so it re-runs whenever anything it imports changes (with\n * Tailwind, every source save reaches it through the CSS), and the save\n * has already cleared what it could have changed.\n */\nexport function setDevPrebuiltStoreMode(next: DevPrebuiltStoreMode): void {\n if (next === mode) return;\n mode = next;\n seeds.clear();\n}\n\nexport function isDevPrebuiltStoreActive(): boolean {\n return mode === 'active';\n}\n\n/** Dev without HMR: every cache.component wrapper renders live. */\nexport function isDevPrebuiltCacheBypassed(): boolean {\n return mode === 'bypass';\n}\n\n/**\n * Namespace for overlay keys while the dev store is active, in place of the\n * deployment ID (which is null in dev). Changes on every clear. Null when\n * inactive.\n */\nexport function devOverlayNamespace(): string | null {\n if (mode !== 'active') return null;\n processToken ??= crypto.randomUUID().slice(0, 8);\n return `dev-${processToken}-${generation}`;\n}\n\n/**\n * The key a `cache.data` entry is stored under: the logical key, prefixed in\n * dev with the namespace above. So a save makes every data entry stored\n * before it unreachable, whatever the handler. A data function's ID comes\n * from its call site, so editing a helper it calls, or a file it reads,\n * would otherwise keep serving the old result to every component captured\n * after the save. Invalidation epochs and singleflight stay on the logical\n * key; only the handler sees the prefix.\n */\nexport function devDataCacheKey(key: string): string {\n const namespace = devOverlayNamespace();\n return namespace === null ? key : `${namespace}\\u0000${key}`;\n}\n\nexport function getDevSeed(componentId: string, cacheKey: string): DevSeed | undefined {\n return seeds.get(componentId)?.get(cacheKey);\n}\n\n/**\n * Store a captured seed, announcing the component's first one. The caller\n * has already checked that no clear (or tag invalidation) happened while it\n * was capturing.\n */\nexport function setDevSeed(componentId: string, cacheKey: string, seed: DevSeed): void {\n let entries = seeds.get(componentId);\n if (!entries) seeds.set(componentId, (entries = new Map()));\n entries.set(cacheKey, seed);\n if (!loggedIds.has(componentId)) {\n loggedIds.add(componentId);\n console.log(\n `[timber] cache.component \"${componentId}\": prerendered in dev — served from memory until ` +\n `a file it depends on changes. A hard reload (Cache-Control: no-cache) renders it again.`\n );\n }\n}\n\n/**\n * An invalidation-epoch tag for one component (it never reaches a cache\n * handler; the NUL keeps it apart from user tags), recorded when a scoped\n * clear drops the component. Dev captures add it\n * to their invalidation checks, so a scoped clear reaches a capture of the\n * component that is in flight, including its first, which has no seed yet.\n */\nexport function devComponentTag(componentId: string): string {\n return `\\u0000timber-dev-component:${componentId}`;\n}\n\n/**\n * A source change: drop the seeds of `componentIds`, or of every component\n * when absent. Every clear bumps the generation (see the header).\n */\nexport function clearDevPrebuiltStore(componentIds?: Iterable<string>): void {\n generation++;\n if (componentIds === undefined) {\n seeds.clear();\n recordInvalidationOfAll();\n return;\n }\n for (const id of componentIds) {\n recordInvalidation({ tag: devComponentTag(id) });\n seeds.delete(id);\n }\n // An ISR seed is the base its overlay entries refresh. Kept while they\n // become unreachable, it would serve a render older than the last one.\n for (const entries of seeds.values()) {\n for (const [cacheKey, seed] of entries) {\n if (seed.isr) entries.delete(cacheKey);\n }\n }\n}\n\n/**\n * The invalidation-epoch key dev captures of one entry check. Unlike the\n * overlay key it carries no generation, like the seed it guards: a capture\n * that a scoped clear kept in flight started under an older generation,\n * and must still see a hard reload that comes after the clear.\n */\nexport function devEntryKey(componentId: string, cacheKey: string): string {\n return `\\u0000timber-dev-entry:${componentId}:${cacheKey}`;\n}\n\n/**\n * A hard reload: discard one entry — its seed and its overlay record — so\n * the request renders it again. Recorded as an invalidation of both its\n * keys first, so a capture of it already in flight (which may have read the\n * old external data) neither stores nor is joined by this request.\n */\nexport async function discardDevEntry(\n componentId: string,\n cacheKey: string,\n overlayKey: string\n): Promise<void> {\n recordInvalidation({ key: devEntryKey(componentId, cacheKey) });\n recordInvalidation({ key: overlayKey });\n seeds.get(componentId)?.delete(cacheKey);\n await getCacheHandler().invalidate({ key: overlayKey });\n}\n\n/**\n * `revalidateTag` in dev: drop the seeds carrying the tag. This is the dev\n * counterpart of writing a tombstone over a build seed (design/45 §ISR\n * mechanics) — the next request misses and captures again.\n */\nexport function invalidateDevSeedsByTag(tag: string): void {\n for (const entries of seeds.values()) {\n for (const [cacheKey, seed] of entries) {\n if (seed.tags.includes(tag)) entries.delete(cacheKey);\n }\n }\n}\n\n/**\n * Whether the request asks to skip caches — a browser hard reload, or any\n * request while DevTools \"Disable cache\" is on, sends `Cache-Control:\n * no-cache`. Dev only: the escape hatch for components that read external\n * data (a CMS, a database) while it is being edited. Production never\n * honors it — a client must not be able to force cache.component re-renders.\n */\nexport function isHardReload(headers: Headers): boolean {\n return /(?:^|,)\\s*no-cache\\s*(?:,|$)/i.test(headers.get('cache-control') ?? '');\n}\n"],"mappings":";AAgBA,IAAI,UAAmC;AAEvC,IAAI,uBAAuB;;AAS3B,SAAgB,gBAAgB,GAA2B;CACzD,UAAU;CACV,uBAAuB;AAGzB;;AAgCA,SAAgB,2BAAoC;CAClD,OAAO;AACT;;;;;AAMA,SAAgB,kBAAoC;CAClD,IAAI,CAAC,SAGH,UAAU,qBAAqB;CAEjC,OAAO;AACT;AAEA,SAAS,uBAAyC;CAChD,MAAM,wBAAQ,IAAI,IAAmE;CACrF,MAAM,aAAa;CAEnB,OAAO;EACL,MAAM,IAAI,KAAK;GACb,MAAM,QAAQ,MAAM,IAAI,GAAG;GAC3B,IAAI,CAAC,OAAO,OAAO;GACnB,MAAM,OAAO,GAAG;GAChB,MAAM,IAAI,KAAK,KAAK;GACpB,MAAM,QAAQ,KAAK,IAAI,IAAI,MAAM;GACjC,OAAO;IAAE,OAAO,MAAM;IAAO;GAAM;EACrC;EACA,MAAM,IAAI,KAAK,OAAO,MAAM;GAC1B,IAAI,MAAM,IAAI,GAAG,GAAG,MAAM,OAAO,GAAG;GACpC,OAAO,MAAM,QAAQ,YAAY;IAC/B,MAAM,SAAS,MAAM,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;IACnC,IAAI,WAAW,KAAA,GAAW,MAAM,OAAO,MAAM;SACxC;GACP;GACA,MAAM,IAAI,KAAK;IAAE;IAAO,WAAW,KAAK,IAAI,IAAI,KAAK,MAAM;IAAM,MAAM,KAAK;GAAK,CAAC;EACpF;EACA,MAAM,WAAW,MAAM;GACrB,IAAI,KAAK,KAAK,MAAM,OAAO,KAAK,GAAG;GACnC,IAAI,KAAK,KACF;SAAA,MAAM,CAAC,KAAK,UAAU,OACzB,IAAI,MAAM,KAAK,SAAS,KAAK,GAAG,GAAG,MAAM,OAAO,GAAG;GAAA;EAGzD;CACF;AACF;;;;;;;;;;;;;;;;;;;;;AC5FA,IAAI,QAAQ;;;;;;AAOZ,IAAM,kCAAkB,IAAI,IAAoB;;;;;AAMhD,IAAM,sBAAsB;;;;;;;AAQ5B,IAAI,wBAAwB;;AAG5B,SAAgB,2BAAmC;CACjD,OAAO;AACT;;;;;AAMA,SAAgB,mBAAmB,MAA4C;CAC7E;CACA,IAAI,KAAK,KAAK,MAAM,OAAO,KAAK,KAAK;CACrC,IAAI,KAAK,KAAK,MAAM,OAAO,KAAK,KAAK;AACvC;;;;;;;AAQA,SAAgB,0BAAgC;CAC9C;CACA,wBAAwB;AAC1B;AAEA,SAAS,MAAM,OAAqB;CAClC,gBAAgB,OAAO,KAAK;CAC5B,gBAAgB,IAAI,OAAO,KAAK;CAChC,OAAO,gBAAgB,OAAO,qBAAqB;EACjD,MAAM,SAAS,gBAAgB,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC;EAChD,IAAI,WAAW,KAAA,GAAW;EAC1B,wBAAwB,KAAK,IAAI,uBAAuB,OAAO,EAAE;EACjE,gBAAgB,OAAO,OAAO,EAAE;CAClC;AACF;;;;;AAMA,SAAgB,oBAAoB,YAAoB,KAAa,MAAyB;CAC5F,OAAO,yBAAyB,KAAK,IAAI,IAAI;AAC/C;;;;;;;;AASA,SAAgB,yBAAyB,KAAa,MAAwB;CAC5E,IAAI,OAAO;CACX,MAAM,WAAW,gBAAgB,IAAI,OAAO,KAAK;CACjD,IAAI,aAAa,KAAA,KAAa,WAAW,MAAM,OAAO;CACtD,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,WAAW,gBAAgB,IAAI,OAAO,KAAK;EACjD,IAAI,aAAa,KAAA,KAAa,WAAW,MAAM,OAAO;CACxD;CACA,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1DA,IAAa,2BAA2B;AAmCxC,IAAI,OAA6B;AACjC,IAAI,aAAa;;AAEjB,IAAM,4BAAY,IAAI,IAAY;;AAElC,IAAM,wBAAQ,IAAI,IAAkC;;;;;;;;;AAUpD,IAAI,eAA8B;AAelC,SAAgB,2BAAoC;CAClD,OAAO,SAAS;AAClB;;AAGA,SAAgB,6BAAsC;CACpD,OAAO,SAAS;AAClB;;;;;;AAOA,SAAgB,sBAAqC;CACnD,IAAI,SAAS,UAAU,OAAO;CAC9B,iBAAiB,OAAO,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC;CAC/C,OAAO,OAAO,aAAa,GAAG;AAChC;;;;;;;;;;AAWA,SAAgB,gBAAgB,KAAqB;CACnD,MAAM,YAAY,oBAAoB;CACtC,OAAO,cAAc,OAAO,MAAM,GAAG,UAAU,QAAQ;AACzD;AAEA,SAAgB,WAAW,aAAqB,UAAuC;CACrF,OAAO,MAAM,IAAI,WAAW,CAAC,EAAE,IAAI,QAAQ;AAC7C;;;;;;AAOA,SAAgB,WAAW,aAAqB,UAAkB,MAAqB;CACrF,IAAI,UAAU,MAAM,IAAI,WAAW;CACnC,IAAI,CAAC,SAAS,MAAM,IAAI,aAAc,0BAAU,IAAI,IAAI,CAAE;CAC1D,QAAQ,IAAI,UAAU,IAAI;CAC1B,IAAI,CAAC,UAAU,IAAI,WAAW,GAAG;EAC/B,UAAU,IAAI,WAAW;EACzB,QAAQ,IACN,6BAA6B,YAAY,yIAE3C;CACF;AACF;;;;;;;;AASA,SAAgB,gBAAgB,aAA6B;CAC3D,OAAO,8BAA8B;AACvC;;;;;AAMA,SAAgB,sBAAsB,cAAuC;CAC3E;CACA,IAAI,iBAAiB,KAAA,GAAW;EAC9B,MAAM,MAAM;EACZ,wBAAwB;EACxB;CACF;CACA,KAAK,MAAM,MAAM,cAAc;EAC7B,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,EAAE,CAAC;EAC/C,MAAM,OAAO,EAAE;CACjB;CAGA,KAAK,MAAM,WAAW,MAAM,OAAO,GACjC,KAAK,MAAM,CAAC,UAAU,SAAS,SAC7B,IAAI,KAAK,KAAK,QAAQ,OAAO,QAAQ;AAG3C;;;;;;;AAQA,SAAgB,YAAY,aAAqB,UAA0B;CACzE,OAAO,0BAA0B,YAAY,GAAG;AAClD;;;;;;;AAQA,eAAsB,gBACpB,aACA,UACA,YACe;CACf,mBAAmB,EAAE,KAAK,YAAY,aAAa,QAAQ,EAAE,CAAC;CAC9D,mBAAmB,EAAE,KAAK,WAAW,CAAC;CACtC,MAAM,IAAI,WAAW,CAAC,EAAE,OAAO,QAAQ;CACvC,MAAM,gBAAgB,CAAC,CAAC,WAAW,EAAE,KAAK,WAAW,CAAC;AACxD;;;;;;AAOA,SAAgB,wBAAwB,KAAmB;CACzD,KAAK,MAAM,WAAW,MAAM,OAAO,GACjC,KAAK,MAAM,CAAC,UAAU,SAAS,SAC7B,IAAI,KAAK,KAAK,SAAS,GAAG,GAAG,QAAQ,OAAO,QAAQ;AAG1D;;;;;;;;AASA,SAAgB,aAAa,SAA2B;CACtD,OAAO,gCAAgC,KAAK,QAAQ,IAAI,eAAe,KAAK,EAAE;AAChF"}