@timber-js/app 0.2.0-alpha.197 → 0.2.0-alpha.199

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 (249) hide show
  1. package/dist/_chunks/{actions-BS-m5SLv.js → actions-d1hCqnU3.js} +35 -8
  2. package/dist/_chunks/actions-d1hCqnU3.js.map +1 -0
  3. package/dist/_chunks/als-registry-C6kcfprT.js.map +1 -1
  4. package/dist/_chunks/{cache-api-DqzgTEqk.js → cache-api-ByagcC-J.js} +2 -2
  5. package/dist/_chunks/{cache-api-DqzgTEqk.js.map → cache-api-ByagcC-J.js.map} +1 -1
  6. package/dist/_chunks/canonicalize-CgHoscYO.js +66 -0
  7. package/dist/_chunks/canonicalize-CgHoscYO.js.map +1 -0
  8. package/dist/_chunks/{chains-CZG7E5zg.js → chains-Bpb0W4ax.js} +3 -3
  9. package/dist/_chunks/{chains-CZG7E5zg.js.map → chains-Bpb0W4ax.js.map} +1 -1
  10. package/dist/_chunks/{cli-check-bE3H5Bjr.js → cli-check-D6VolrDV.js} +3 -3
  11. package/dist/_chunks/{cli-check-bE3H5Bjr.js.map → cli-check-D6VolrDV.js.map} +1 -1
  12. package/dist/_chunks/{cli-schema-sync-DTy_-Msq.js → cli-schema-sync-D6rO-VcS.js} +2 -2
  13. package/dist/_chunks/{cli-schema-sync-DTy_-Msq.js.map → cli-schema-sync-D6rO-VcS.js.map} +1 -1
  14. package/dist/_chunks/{convention-lint-n3RJLgww.js → convention-lint-fRkwVwEH.js} +27 -4
  15. package/dist/_chunks/convention-lint-fRkwVwEH.js.map +1 -0
  16. package/dist/_chunks/error-boundary-BfPHZjm0.js +1050 -0
  17. package/dist/_chunks/error-boundary-BfPHZjm0.js.map +1 -0
  18. package/dist/_chunks/{live-graph-BXDsdzBv.js → live-graph-D_2D32Ad.js} +3 -3
  19. package/dist/_chunks/{live-graph-BXDsdzBv.js.map → live-graph-D_2D32Ad.js.map} +1 -1
  20. package/dist/_chunks/{logger-DDirEsn7.js → logger-uLBuGKDI.js} +471 -440
  21. package/dist/_chunks/logger-uLBuGKDI.js.map +1 -0
  22. package/dist/_chunks/{navigation-root-B00jjGd5.js → navigation-context-D0TU0Jog.js} +3 -101
  23. package/dist/_chunks/navigation-context-D0TU0Jog.js.map +1 -0
  24. package/dist/_chunks/navigation-root-mHSK9psY.js +126 -0
  25. package/dist/_chunks/{navigation-root-B00jjGd5.js.map → navigation-root-mHSK9psY.js.map} +1 -1
  26. package/dist/_chunks/{poison-scan-BoDLgbix.js → poison-scan-Bm9Yyqk9.js} +2 -2
  27. package/dist/_chunks/{poison-scan-BoDLgbix.js.map → poison-scan-Bm9Yyqk9.js.map} +1 -1
  28. package/dist/_chunks/{scanner-tdFPvDYi.js → scanner-AiazgH_f.js} +6 -5
  29. package/dist/_chunks/scanner-AiazgH_f.js.map +1 -0
  30. package/dist/_chunks/{segment-keys-BhqoHiLc.js → segment-keys-lqtdookO.js} +2 -65
  31. package/dist/_chunks/segment-keys-lqtdookO.js.map +1 -0
  32. package/dist/_chunks/{ssr-data-BQGhTPAK.js → ssr-data-D6T6Y3ef.js} +4 -26
  33. package/dist/_chunks/ssr-data-D6T6Y3ef.js.map +1 -0
  34. package/dist/_chunks/state-FippDgxN.js +52 -0
  35. package/dist/_chunks/state-FippDgxN.js.map +1 -0
  36. package/dist/_chunks/status-page-marker-DwQBrLBz.js +496 -0
  37. package/dist/_chunks/status-page-marker-DwQBrLBz.js.map +1 -0
  38. package/dist/_chunks/{walkers-DNX05dC0.js → walkers-B6XUtmqK.js} +2 -2
  39. package/dist/_chunks/{walkers-DNX05dC0.js.map → walkers-B6XUtmqK.js.map} +1 -1
  40. package/dist/analyze/crawl-entry.js +2 -2
  41. package/dist/analyze/graph-command.js +2 -2
  42. package/dist/cache/index.js +1 -1
  43. package/dist/cli.js +2 -2
  44. package/dist/client/browser-entry/action-dispatch.d.ts +6 -4
  45. package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -1
  46. package/dist/client/browser-entry/action-queue.d.ts +44 -0
  47. package/dist/client/browser-entry/action-queue.d.ts.map +1 -0
  48. package/dist/client/browser-entry/router-init.d.ts.map +1 -1
  49. package/dist/client/deny-last-resort.d.ts +29 -0
  50. package/dist/client/deny-last-resort.d.ts.map +1 -0
  51. package/dist/client/error-boundary.d.ts +48 -2
  52. package/dist/client/error-boundary.d.ts.map +1 -1
  53. package/dist/client/error-boundary.js +2 -2
  54. package/dist/client/history.d.ts +21 -2
  55. package/dist/client/history.d.ts.map +1 -1
  56. package/dist/client/index.js +34 -14
  57. package/dist/client/index.js.map +1 -1
  58. package/dist/client/internal.d.ts +1 -0
  59. package/dist/client/internal.d.ts.map +1 -1
  60. package/dist/client/internal.js +272 -1225
  61. package/dist/client/internal.js.map +1 -1
  62. package/dist/client/link.d.ts.map +1 -1
  63. package/dist/client/navigation-commit.d.ts +12 -19
  64. package/dist/client/navigation-commit.d.ts.map +1 -1
  65. package/dist/client/navigation-transition.d.ts +62 -11
  66. package/dist/client/navigation-transition.d.ts.map +1 -1
  67. package/dist/client/router-effects.d.ts +9 -8
  68. package/dist/client/router-effects.d.ts.map +1 -1
  69. package/dist/client/router-lifecycle.d.ts +60 -17
  70. package/dist/client/router-lifecycle.d.ts.map +1 -1
  71. package/dist/client/router-pipeline.d.ts +7 -4
  72. package/dist/client/router-pipeline.d.ts.map +1 -1
  73. package/dist/client/router-types.d.ts +63 -8
  74. package/dist/client/router-types.d.ts.map +1 -1
  75. package/dist/client/router.d.ts.map +1 -1
  76. package/dist/client/rsc-fetch.d.ts +0 -9
  77. package/dist/client/rsc-fetch.d.ts.map +1 -1
  78. package/dist/client/segment-cache.d.ts +23 -8
  79. package/dist/client/segment-cache.d.ts.map +1 -1
  80. package/dist/client/state.d.ts +16 -0
  81. package/dist/client/state.d.ts.map +1 -1
  82. package/dist/client/status-page-marker.d.ts +25 -0
  83. package/dist/client/status-page-marker.d.ts.map +1 -0
  84. package/dist/cookies/index.js +1 -1
  85. package/dist/dev-tools/holding-server.d.ts +4 -17
  86. package/dist/dev-tools/holding-server.d.ts.map +1 -1
  87. package/dist/index.d.ts.map +1 -1
  88. package/dist/index.js +74 -175
  89. package/dist/index.js.map +1 -1
  90. package/dist/plugins/dev-server.d.ts.map +1 -1
  91. package/dist/routing/codegen-write.d.ts.map +1 -1
  92. package/dist/routing/index.js +2 -2
  93. package/dist/routing/interception.d.ts +2 -2
  94. package/dist/routing/slot-placement.d.ts +2 -2
  95. package/dist/server/access-gate.d.ts +73 -1
  96. package/dist/server/access-gate.d.ts.map +1 -1
  97. package/dist/server/action-handler.d.ts.map +1 -1
  98. package/dist/server/actions.d.ts +16 -1
  99. package/dist/server/actions.d.ts.map +1 -1
  100. package/dist/server/als-registry.d.ts +3 -9
  101. package/dist/server/als-registry.d.ts.map +1 -1
  102. package/dist/server/children-interception.d.ts +1 -1
  103. package/dist/server/default-status-page.d.ts +2 -2
  104. package/dist/server/default-status-page.d.ts.map +1 -1
  105. package/dist/server/deny-boundary.d.ts +15 -9
  106. package/dist/server/deny-boundary.d.ts.map +1 -1
  107. package/dist/server/deny-renderer.d.ts.map +1 -1
  108. package/dist/server/error-boundary-wrapper.d.ts +21 -4
  109. package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
  110. package/dist/server/error-response-headers.d.ts +3 -0
  111. package/dist/server/error-response-headers.d.ts.map +1 -0
  112. package/dist/server/index.js +3 -3
  113. package/dist/server/index.js.map +1 -1
  114. package/dist/server/internal.d.ts +1 -2
  115. package/dist/server/internal.d.ts.map +1 -1
  116. package/dist/server/internal.js +2339 -2506
  117. package/dist/server/internal.js.map +1 -1
  118. package/dist/server/metadata-collector.d.ts +2 -5
  119. package/dist/server/metadata-collector.d.ts.map +1 -1
  120. package/dist/server/param-coercion.d.ts +10 -3
  121. package/dist/server/param-coercion.d.ts.map +1 -1
  122. package/dist/server/pipeline-outcome.d.ts.map +1 -1
  123. package/dist/server/pipeline-phases.d.ts +11 -0
  124. package/dist/server/pipeline-phases.d.ts.map +1 -1
  125. package/dist/server/port-resolution.d.ts +3 -89
  126. package/dist/server/port-resolution.d.ts.map +1 -1
  127. package/dist/server/primitives.d.ts +38 -10
  128. package/dist/server/primitives.d.ts.map +1 -1
  129. package/dist/server/response-cache-policy.d.ts +3 -0
  130. package/dist/server/response-cache-policy.d.ts.map +1 -0
  131. package/dist/server/route-element-builder.d.ts +11 -41
  132. package/dist/server/route-element-builder.d.ts.map +1 -1
  133. package/dist/server/route-element-helpers.d.ts +12 -0
  134. package/dist/server/route-element-helpers.d.ts.map +1 -0
  135. package/dist/server/route-module-loader.d.ts +37 -0
  136. package/dist/server/route-module-loader.d.ts.map +1 -0
  137. package/dist/server/rsc-cache-key-guard.d.ts.map +1 -1
  138. package/dist/server/rsc-entry/action-middleware-runner.d.ts.map +1 -1
  139. package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
  140. package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
  141. package/dist/server/rsc-entry/rsc-payload.d.ts +22 -1
  142. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  143. package/dist/server/rsc-entry/rsc-stream.d.ts +4 -11
  144. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  145. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  146. package/dist/server/rsc-error-envelope.d.ts +11 -0
  147. package/dist/server/rsc-error-envelope.d.ts.map +1 -0
  148. package/dist/server/skippable-prefix.d.ts +18 -15
  149. package/dist/server/skippable-prefix.d.ts.map +1 -1
  150. package/dist/server/slot-resolver.d.ts.map +1 -1
  151. package/dist/server/slot-subtree-contain.d.ts +54 -0
  152. package/dist/server/slot-subtree-contain.d.ts.map +1 -0
  153. package/dist/server/stream-utils.d.ts.map +1 -1
  154. package/dist/server/utils/element-type.d.ts +10 -0
  155. package/dist/server/utils/element-type.d.ts.map +1 -1
  156. package/dist/shared/rsc-error-envelope.d.ts +0 -9
  157. package/dist/shared/rsc-error-envelope.d.ts.map +1 -1
  158. package/dist/shared/status-reason-phrase.d.ts +26 -0
  159. package/dist/shared/status-reason-phrase.d.ts.map +1 -0
  160. package/docs/api/30-api-server.mdx +4 -2
  161. package/docs/api/31-api-client.mdx +5 -1
  162. package/docs/api/36-cli.mdx +5 -3
  163. package/docs/learn/12-error-handling.mdx +5 -1
  164. package/package.json +10 -10
  165. package/src/client/browser-entry/action-dispatch.ts +166 -99
  166. package/src/client/browser-entry/action-queue.ts +90 -0
  167. package/src/client/browser-entry/router-init.ts +60 -35
  168. package/src/client/deny-last-resort.tsx +54 -0
  169. package/src/client/error-boundary.tsx +144 -42
  170. package/src/client/history.ts +52 -3
  171. package/src/client/internal.ts +1 -0
  172. package/src/client/link.tsx +70 -35
  173. package/src/client/navigation-commit.ts +79 -27
  174. package/src/client/navigation-transition.ts +176 -127
  175. package/src/client/router-effects.ts +14 -17
  176. package/src/client/router-lifecycle.ts +181 -115
  177. package/src/client/router-pipeline.ts +94 -71
  178. package/src/client/router-types.ts +61 -7
  179. package/src/client/router.ts +147 -74
  180. package/src/client/rsc-fetch.ts +0 -13
  181. package/src/client/segment-cache.ts +43 -10
  182. package/src/client/state.ts +26 -0
  183. package/src/client/status-page-marker.tsx +32 -0
  184. package/src/dev-tools/holding-server.ts +4 -17
  185. package/src/index.ts +18 -34
  186. package/src/plugins/dev-server.ts +2 -1
  187. package/src/react-canary.d.ts +2 -0
  188. package/src/routing/codegen-write.ts +2 -0
  189. package/src/routing/interception.ts +2 -2
  190. package/src/routing/slot-placement.ts +2 -2
  191. package/src/server/access-gate.tsx +89 -21
  192. package/src/server/action-client.ts +2 -2
  193. package/src/server/action-handler.ts +23 -10
  194. package/src/server/actions.ts +81 -34
  195. package/src/server/als-registry.ts +3 -9
  196. package/src/server/children-interception.ts +1 -1
  197. package/src/server/default-status-page.ts +7 -47
  198. package/src/server/deny-boundary.ts +45 -28
  199. package/src/server/deny-renderer.ts +6 -2
  200. package/src/server/error-boundary-wrapper.ts +23 -4
  201. package/src/server/error-response-headers.ts +18 -0
  202. package/src/server/internal.ts +2 -10
  203. package/src/server/metadata-collector.ts +3 -18
  204. package/src/server/param-coercion.ts +13 -4
  205. package/src/server/pipeline-outcome.ts +35 -13
  206. package/src/server/pipeline-phases.ts +22 -16
  207. package/src/server/port-resolution.ts +3 -165
  208. package/src/server/prebuilt-builder.ts +4 -4
  209. package/src/server/primitives.ts +75 -11
  210. package/src/server/response-cache-policy.ts +45 -0
  211. package/src/server/route-element-builder.ts +149 -412
  212. package/src/server/route-element-helpers.ts +37 -0
  213. package/src/server/route-handler.ts +2 -2
  214. package/src/server/route-module-loader.ts +161 -0
  215. package/src/server/rsc-cache-key-guard.ts +2 -42
  216. package/src/server/rsc-entry/action-middleware-runner.ts +4 -4
  217. package/src/server/rsc-entry/api-handler.ts +5 -5
  218. package/src/server/rsc-entry/error-renderer.ts +3 -4
  219. package/src/server/rsc-entry/helpers.ts +1 -1
  220. package/src/server/rsc-entry/index.ts +3 -3
  221. package/src/server/rsc-entry/render-route.ts +4 -8
  222. package/src/server/rsc-entry/rsc-payload.ts +59 -42
  223. package/src/server/rsc-entry/rsc-stream.ts +48 -27
  224. package/src/server/rsc-entry/ssr-renderer.ts +6 -10
  225. package/src/server/rsc-error-envelope.ts +18 -0
  226. package/src/server/skippable-prefix.ts +105 -7
  227. package/src/server/slot-resolver.ts +43 -12
  228. package/src/server/slot-subtree-contain.ts +255 -0
  229. package/src/server/stream-utils.ts +12 -8
  230. package/src/server/utils/element-type.ts +18 -2
  231. package/src/shared/rsc-error-envelope.ts +0 -15
  232. package/src/shared/status-reason-phrase.ts +61 -0
  233. package/dist/_chunks/actions-BS-m5SLv.js.map +0 -1
  234. package/dist/_chunks/convention-lint-n3RJLgww.js.map +0 -1
  235. package/dist/_chunks/error-boundary-BvRCCmbN.js +0 -353
  236. package/dist/_chunks/error-boundary-BvRCCmbN.js.map +0 -1
  237. package/dist/_chunks/logger-DDirEsn7.js.map +0 -1
  238. package/dist/_chunks/mdx-file-CXyHGUpS.js +0 -25
  239. package/dist/_chunks/mdx-file-CXyHGUpS.js.map +0 -1
  240. package/dist/_chunks/router-ref-8gr8qsxN.js +0 -28
  241. package/dist/_chunks/router-ref-8gr8qsxN.js.map +0 -1
  242. package/dist/_chunks/rsc-error-envelope-tT5PJs4q.js +0 -40
  243. package/dist/_chunks/rsc-error-envelope-tT5PJs4q.js.map +0 -1
  244. package/dist/_chunks/scanner-tdFPvDYi.js.map +0 -1
  245. package/dist/_chunks/segment-keys-BhqoHiLc.js.map +0 -1
  246. package/dist/_chunks/ssr-data-BQGhTPAK.js.map +0 -1
  247. package/dist/server/tree-builder.d.ts +0 -150
  248. package/dist/server/tree-builder.d.ts.map +0 -1
  249. package/src/server/tree-builder.ts +0 -313
@@ -1 +1 @@
1
- {"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiC,MAAM,MAAM,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,WAAW,CAAC;AAKjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAoD1D;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAyI1D;AA8PD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAuC9D"}
1
+ {"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/plugins/dev-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAiC,MAAM,MAAM,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,WAAW,CAAC;AAKjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAqD1D;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAyI1D;AA8PD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAuC9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"codegen-write.d.ts","sourceRoot":"","sources":["../../src/routing/codegen-write.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,+BAA+B,CAAC;AAE3D,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AA4ClD;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAcxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB9F"}
1
+ {"version":3,"file":"codegen-write.d.ts","sourceRoot":"","sources":["../../src/routing/codegen-write.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,+BAA+B,CAAC;AAE3D,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AA8ClD;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAcxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB9F"}
@@ -1,5 +1,5 @@
1
- import { n as scanRoutes, r as collectInterceptionRewrites } from "../_chunks/scanner-tdFPvDYi.js";
1
+ import { n as scanRoutes, r as collectInterceptionRewrites } from "../_chunks/scanner-AiazgH_f.js";
2
2
  import { a as INTERCEPTION_MARKERS, i as DEFAULT_PAGE_EXTENSIONS, n as classifyUrlSegment, t as classifySegment } from "../_chunks/segment-classify-C539Pa2O.js";
3
3
  import { n as generateRouteMap } from "../_chunks/file-cache-Dw6BJPG7.js";
4
- import { n as collectDynamicSegmentsFromTree, r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "../_chunks/walkers-DNX05dC0.js";
4
+ import { n as collectDynamicSegmentsFromTree, r as validateSchemaAgainstRoutes, t as collectLeafRoutes } from "../_chunks/walkers-B6XUtmqK.js";
5
5
  export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS, classifySegment, classifyUrlSegment, collectDynamicSegmentsFromTree, collectInterceptionRewrites, collectLeafRoutes, generateRouteMap, scanRoutes, validateSchemaAgainstRoutes };
@@ -97,8 +97,8 @@ export interface SlotInterceptionRewrite extends InterceptionRewriteBase {
97
97
  * either. The server resolves the owner by `interceptingScope` — a tree path,
98
98
  * which identifies exactly one directory — and builds the rendered chain as
99
99
  * `[…owner ancestors, interceptingNode, …its matched descendants]`. That is an
100
- * ordinary segment chain, so `tree-builder.ts` renders it with no knowledge
101
- * that interception happened.
100
+ * ordinary segment chain, so `route-element-builder.ts` renders it with no
101
+ * knowledge that interception happened.
102
102
  *
103
103
  * Resolving the owner from the tree rather than from a URL is what makes this
104
104
  * shape work where the modal shape cannot: `interceptingPrefix` is
@@ -13,8 +13,8 @@ import type { SegmentNode } from './types.ts';
13
13
  * Reject every parallel slot that no renderer reaches.
14
14
  *
15
15
  * **Where slots are resolved.** Two places read `segment.slots`, and both walk
16
- * the main route chain: `route-element-builder.ts` (the RSC render) and
17
- * `tree-builder.ts`. Neither is reachable from inside a slot. The slot's own
16
+ * the main route chain: `route-element-builder.ts` (the RSC render).
17
+ * It is not reachable from inside a slot. The slot's own
18
18
  * subtree is rendered by `slot-resolver.ts`, which walks the slot's matched
19
19
  * chain to apply that chain's layouts, error boundaries and access gates
20
20
  * (`wrapWithIntermediateSegments`, `wrapWithLayout`) and never reads `.slots`
@@ -12,8 +12,80 @@
12
12
  *
13
13
  * See design/04-authorization.md and design/02-rendering-pipeline.md §"AccessGate"
14
14
  */
15
- import type { AccessGateProps, SlotAccessGateProps } from './tree-builder.ts';
15
+ import type { DenyPageEntry } from './deny-boundary.ts';
16
16
  import type { ReactNode } from 'react';
17
+ import type { LoadedComponent } from './utils/element-type.ts';
18
+ /**
19
+ * Function that creates a React element. Matches React.createElement signature.
20
+ *
21
+ * `props` is typed as `object | null` rather than `Record<string, unknown>` so
22
+ * that interface types with known keys (e.g. `AccessGateProps`,
23
+ * `ErrorBoundaryProps`) flow through without an explicit index-signature cast.
24
+ */
25
+ export type CreateElement = (type: unknown, props: object | null, ...children: unknown[]) => ReactNode;
26
+ /**
27
+ * Framework-injected access gate component.
28
+ *
29
+ * When `verdict` is provided (from the pre-render pass), AccessGate replays
30
+ * the stored result synchronously — no re-execution, no async, immune to
31
+ * Suspense timing. When `verdict` is absent, falls back to calling `accessFn`
32
+ * (backward compat for construction sites that don't run a pre-render pass).
33
+ */
34
+ export interface AccessGateProps {
35
+ accessFn: () => unknown;
36
+ /** Segment name for dev logging (e.g. "authenticated", "dashboard"). */
37
+ segmentName?: string;
38
+ /**
39
+ * Segment key of the gated segment (`computeSegmentKeys`). Decides whether
40
+ * a matched deny page renders here or is hoisted to the segment that owns
41
+ * it. Omitted by construction sites that build no deny chains — with no
42
+ * chain there is nothing to place. See TIM-1356.
43
+ */
44
+ segmentKey?: string;
45
+ /**
46
+ * Index of this segment in the matched segment chain. Recorded in ALS
47
+ * when the gate catches a DenySignal so post-render consumers
48
+ * (buildSegmentInfo, X-Timber-Segments) can bound the segment list
49
+ * without a pre-render access pass. See TIM-1363.
50
+ */
51
+ segmentIndex?: number;
52
+ /**
53
+ * Deny page fallback chain. When provided and a DenySignal is caught,
54
+ * AccessGate renders the matching deny page in-tree instead of throwing.
55
+ * This prevents the error from reaching React Flight, eliminating the
56
+ * second render pass. See TIM-666.
57
+ *
58
+ * Omitted for skipped segments — a deny there must hard-navigate to
59
+ * avoid rendering the deny page inside cached layout chrome (TIM-1074).
60
+ */
61
+ denyPages?: DenyPageEntry[];
62
+ /**
63
+ * When true, this gate wraps a skipped segment. On deny, the gate
64
+ * records the deny in ALS and rethrows so the response path can
65
+ * return rscErrorEnvelope for a client hard-navigate.
66
+ */
67
+ skippedSegment?: boolean;
68
+ children: ReactNode;
69
+ }
70
+ /**
71
+ * Framework-injected slot access gate component.
72
+ * On denial, renders denied.tsx → default.tsx → null instead of failing the page.
73
+ *
74
+ * DeniedComponent is passed instead of a pre-built element so that
75
+ * SlotAccessGate can forward DenySignal.data as dangerouslyPassData
76
+ * and slotName as the slot prop after catching the signal.
77
+ */
78
+ export interface SlotAccessGateProps {
79
+ accessFn: () => unknown;
80
+ /** The denied.tsx component (not a pre-built element). null if no denied.tsx exists. */
81
+ DeniedComponent: LoadedComponent | null;
82
+ /** Slot directory name without @ prefix (e.g. "admin", "sidebar"). */
83
+ slotName: string;
84
+ /** createElement function for building elements dynamically. */
85
+ createElement: CreateElement;
86
+ defaultFallback: ReactNode;
87
+ children: ReactNode;
88
+ }
17
89
  /**
18
90
  * Framework-injected access gate for segments.
19
91
  *
@@ -1 +1 @@
1
- {"version":3,"file":"access-gate.d.ts","sourceRoot":"","sources":["../../src/server/access-gate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAK9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC,CAsBrE;AA2DD;;;;;;;;;;;;;GAaG;AACH,wBAAs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C3B,OAAO,CAAC,QAAQ,GAAG,YAAY,GAAG,IAAI,CAAC,CA6EzC"}
1
+ {"version":3,"file":"action-handler.d.ts","sourceRoot":"","sources":["../../src/server/action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAE1D,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAItE,OAAO,EAAwC,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE/F,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AASrD,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,gDAAgD;IAChD,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;;;OAIG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;CACzC;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAarD;AAID;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,aAAa,CAAC;IACxB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,QAAQ,GAAG,YAAY,GAAG,IAAI,CAAC,CA6EzC"}
@@ -18,7 +18,7 @@ import { type RevalidationState } from './als-registry.ts';
18
18
  export interface RevalidationResult {
19
19
  /**
20
20
  * The payload root — tree plus the params it rendered with, exactly as an
21
- * ordinary route payload. The client splits it in `applyRevalidation`.
21
+ * ordinary route payload. The client splits it in `applyActionResult`.
22
22
  */
23
23
  payload: unknown;
24
24
  }
@@ -29,6 +29,15 @@ export type { RevalidationState } from './als-registry.ts';
29
29
  export interface ActionHandlerConfig {
30
30
  /** Renderer for producing RSC payloads during revalidation. */
31
31
  renderer?: RevalidateRenderer;
32
+ /**
33
+ * Pathname of the page the action was submitted from. When set,
34
+ * revalidatePath renders are skipped for non-matching paths — the
35
+ * server cache is already invalidated, so the next navigation fetches
36
+ * fresh data. See TIM-1454.
37
+ */
38
+ requestPathname?: string;
39
+ /** Search string of the action request URL (e.g. `?page=1`). */
40
+ requestSearch?: string;
32
41
  }
33
42
  /** Result of handling a server action request. */
34
43
  export interface ActionHandlerResult {
@@ -36,6 +45,12 @@ export interface ActionHandlerResult {
36
45
  actionResult: unknown;
37
46
  /** Revalidation result if revalidatePath was called (element tree, not yet serialized). */
38
47
  revalidation?: RevalidationResult;
48
+ /**
49
+ * Paths passed to `revalidatePath()` that don't match the current page
50
+ * (TIM-1454). The client invalidates its caches for these so the next
51
+ * navigation fetches fresh data.
52
+ */
53
+ invalidatedPaths?: string[];
39
54
  /** Redirect location if a RedirectSignal was thrown during revalidation. */
40
55
  redirectTo?: string;
41
56
  /** Redirect status code. */
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/server/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG5E,kFAAkF;AAClF,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,2EAA2E;AAC3E,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAG/E,YAAY,EAAE,iB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IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GACtD,OAAO,CAAC,mBAAmB,CAAC,CA0F9B"}
@@ -101,17 +101,11 @@ export interface RequestContextStore {
101
101
  /**
102
102
  * Set by AccessGate or PageDenyBoundary when a DenySignal is caught
103
103
  * server-side (inside the React tree, before React Flight sees it).
104
- * The pipeline reads this after render to set the HTTP status code.
105
- * See TIM-666.
104
+ * The document path reads this after render to set the HTTP status code;
105
+ * the RSC payload path does not read it (a Flight payload response is always 200).
106
+ * See TIM-666, TIM-1495.
106
107
  */
107
108
  denyStatus?: number;
108
- /**
109
- * Callback fired when setDenyStatus() is called. Used by shellSettled
110
- * to short-circuit when any component catches a DenySignal in-tree,
111
- * regardless of which component caught it (AccessGate, TracedLayout,
112
- * or PageDenyBoundary). See TIM-1208.
113
- */
114
- onDenyStatus?: () => void;
115
109
  /**
116
110
  * Dev-only: getter for the current request's RSC debug components.
117
111
  * Set by renderRoute() so onPipelineError can include component tree
@@ -1 +1 @@
1
- {"version":3,"file":"als-registry.d.ts","sourceRoot":"","sources":["../../src/server/als-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AA2BlE,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,wCAE7B,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,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,4DAA4D;AAC5D,eAAO,MAAM,YAAY,gCAAmE,CAAC;AAM7F,2EAA2E;AAC3E,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAED,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,yCAEhC,CAAC"}
@@ -21,7 +21,7 @@
21
21
  *
22
22
  * The result is an ordinary `RouteMatch` whose chain runs
23
23
  * `[…owner ancestors, interceptingNode, …its matched descendants]`. Every
24
- * consumer downstream — `tree-builder.ts`, the element builder, access gates,
24
+ * consumer downstream — `route-element-builder.ts`, access gates,
25
25
  * middleware — sees a segment chain and needs to know nothing about
26
26
  * interception. That is why this feature adds no rendering path: the chain
27
27
  * *is* the feature.
@@ -17,10 +17,10 @@
17
17
  * clamped to a plain integer before it reaches the markup. No request URL, no
18
18
  * error message, no stack — see design/13-security.md principle 4.
19
19
  */
20
+ import { statusReasonPhrase } from '../shared/status-reason-phrase.ts';
21
+ export { statusReasonPhrase };
20
22
  /** HTML content type used for every framework default page response. */
21
23
  export declare const DEFAULT_STATUS_PAGE_CONTENT_TYPE = "text/html; charset=utf-8";
22
- /** Human-readable phrase for a status code. Never caller-supplied text. */
23
- export declare function statusReasonPhrase(status: number): string;
24
24
  /**
25
25
  * Build the framework default page for a status code as a full HTML document.
26
26
  *
@@ -1 +1 @@
1
- {"version":3,"file":"default-status-page.d.ts","sourceRoot":"","sources":["../../src/server/default-status-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AA+BH,wEAAwE;AACxE,eAAO,MAAM,gCAAgC,6BAA6B,CAAC;AAc3E,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAgC5D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,GAAG,QAAQ,CAG5F"}
1
+ {"version":3,"file":"default-status-page.d.ts","sourceRoot":"","sources":["../../src/server/default-status-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAMtF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,wEAAwE;AACxE,eAAO,MAAM,gCAAgC,6BAA6B,CAAC;AAE3E;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAgC5D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,GAAG,QAAQ,CAG5F"}
@@ -136,6 +136,13 @@ export declare function buildDenyPageChain(segments: ManifestSegmentNode[], star
136
136
  * `resolve5xx`. See TIM-1360.
137
137
  */
138
138
  export declare function matchDenyEntry(chain: DenyPageEntry[], status: number): DenyPageEntry | null;
139
+ /**
140
+ * Return ALL deny page entries whose status filter matches, in traversal
141
+ * order (best match first). `matchDenyEntry` returns only the first;
142
+ * late addressing (TIM-1450) needs the full list so the client can find
143
+ * the first *reachable* owner via its ancestry context.
144
+ */
145
+ export declare function matchDenyEntries(chain: DenyPageEntry[], status: number): DenyPageEntry[];
139
146
  /**
140
147
  * Decide where the deny page for `status` renders, from the perspective of
141
148
  * the catch site at `selfKey`.
@@ -179,15 +186,16 @@ export declare function renderDenyEntry(entry: DenyEntryShape, status: number, d
179
186
  * file, bare when nothing matched at all.
180
187
  *
181
188
  * `setDenyStatus` runs on the hoist path too, and must run *before* the
182
- * throw: on the RSC payload path no boundary executes server-side, so the
183
- * ALS status is the only thing standing between the response and a 200
184
- * (`rsc-payload.ts` reads it after the stream settles).
189
+ * throw: on the document path the hoisted row fails the Fizz shell and the
190
+ * re-render fallback serves the page, and the ALS status is what the
191
+ * pipeline commits for it. The RSC payload path never reads it — a Flight
192
+ * payload response is always 200 and the row itself carries the deny (TIM-1495).
185
193
  *
186
194
  * Either branch leaves part of the matched chain unmounted — hoisting sends
187
195
  * the render to a boundary that discards everything below it, and a layout
188
196
  * that denies returns the deny page instead of its own child outlet. What the
189
- * response then says about the tree is decided from the deny status alone in
190
- * `rsc-payload.ts`, not tracked here; see the note there for why.
197
+ * client then learns about the tree is decided by the boundary that renders
198
+ * the page, at the commit that puts it on screen (`navigation-commit.ts`).
191
199
  */
192
200
  export declare function handleCaughtDeny(chain: DenyPageEntry[] | undefined, error: DenySignal, selfKey: string | undefined): React.ReactElement;
193
201
  /**
@@ -204,7 +212,7 @@ export declare function handleCaughtDeny(chain: DenyPageEntry[] | undefined, err
204
212
  * No error reaches React Flight — the Flight stream is clean, SSR succeeds,
205
213
  * and the entire request uses a single renderToReadableStream call.
206
214
  */
207
- export declare function PageDenyBoundary({ Page, route, denyPages, segmentKey, onSettled, }: {
215
+ export declare function PageDenyBoundary({ Page, route, denyPages, segmentKey, }: {
208
216
  /** The page server component function. */
209
217
  Page: (...args: unknown[]) => unknown;
210
218
  /** Route path for OTEL tracing. */
@@ -217,13 +225,11 @@ export declare function PageDenyBoundary({ Page, route, denyPages, segmentKey, o
217
225
  * chain matched further up is hoisted to its owner.
218
226
  */
219
227
  segmentKey: string;
220
- /** Called when the page component finishes (success or deny). See TIM-1045. */
221
- onSettled?: () => void;
222
228
  }): Promise<React.ReactElement>;
223
229
  /**
224
230
  * Set the deny status in the request context ALS.
225
231
  * Called from AccessGate / PageDenyBoundary when a DenySignal is caught.
226
- * The pipeline reads this after render to set the HTTP status code.
232
+ * The document path reads this after render to set the HTTP status code.
227
233
  */
228
234
  export declare function setDenyStatus(status: number): void;
229
235
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"deny-boundary.d.ts","sourceRoot":"","sources":["../../src/server/deny-bo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AAE,cAAc,CAAC;CAC1B,CAAC;AAEF,6DAA6D;AAC7D,MAAM,MAAM,SAAS,GAAG,CACtB,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,EACrC,UAAU,EAAE,UAAU,KACnB,OAAO,CAAC,QAAQ,CAAC,CAAC;AAgCvB;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,KAAK,QAAQ,GAAG,IAAI,CAAC;AAEhG;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,WAAW,EAAE,EAC/B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,qBAAqB,EACtC,sBAAsB,EAAE,mBAAmB,EAC3C,OAAO,EAAE,SAAS,EAClB,WAAW,CAAC,EAAE,mBAAmB,EACjC,gBAAgB,SAAW,GAC1B,OAAO,CAAC,QAAQ,CAAC,CAsInB;AAgBD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,gBAAgB,EAAE,WAAW,EAAE,EAC/B,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,OAAO,EACxB,sBAAsB,EAAE,mBAAmB,EAC3C,gBAAgB,SAAW,GAC1B,OAAO,CAAC,QAAQ,CAAC,CAiDnB"}
@@ -7,13 +7,11 @@
7
7
  *
8
8
  * - `route-element-builder.ts` / `slot-resolver.ts` — the request-time
9
9
  * renderer, walking the runtime manifest (`SegmentNode<ManifestFile>`).
10
- * - `tree-builder.ts` — the build-time tree walker
11
- * (`SegmentNode<RouteFile>`), with its loader and `createElement` injected.
12
10
  *
13
11
  * `errorBoundaryComponent` is injected rather than imported: `TimberErrorBoundary`
14
12
  * is a `'use client'` module, and importing it here would pull client code into
15
- * every consumer — including `tree-builder.ts`, which the server barrel reaches.
16
- * `tests/use-client-pipeline.test.ts` walks the import graph to enforce this.
13
+ * every consumer. `tests/use-client-pipeline.test.ts` walks the import graph
14
+ * from this file to enforce that no `client/` module is reachable at any depth.
17
15
  *
18
16
  * See design/10-error-handling.md §"Status-Code File Variants".
19
17
  */
@@ -50,6 +48,21 @@ export interface ErrorBoundaryProps {
50
48
  * every owner-addressed deny. See TIM-1356.
51
49
  */
52
50
  segmentKey?: string;
51
+ /**
52
+ * Catch denies only; re-throw every other error. Set on the copy of a
53
+ * segment's boundaries that sits outside its layout, which exists to give a
54
+ * deny thrown from the layout's own chrome a catcher at the right position
55
+ * without changing where a 5xx from that chrome goes. See TIM-1450.
56
+ */
57
+ denyOnly?: boolean;
58
+ /**
59
+ * The boundary belongs to a parallel slot. A slot degrading is the page
60
+ * staying: its status pages never set the document status and never tell
61
+ * the segment cache the main route's chain is gone. Set on every boundary
62
+ * a slot's files declare, not only the catch-all outside them — the
63
+ * identity is the slot's, not the file's (codex on #1138).
64
+ */
65
+ isSlotBoundary?: boolean;
53
66
  children: ReactNode;
54
67
  }
55
68
  /** How to load a route file's module. Only `default` is read. */
@@ -71,6 +84,10 @@ export interface ErrorBoundaryWrapConfig<TFile, TElement> {
71
84
  errorBoundaryComponent: unknown;
72
85
  /** Segment key stamped on every boundary this walk creates. See `ErrorBoundaryProps`. */
73
86
  segmentKey?: string;
87
+ /** Stamped on every boundary this walk creates. See `ErrorBoundaryProps`. */
88
+ denyOnly?: boolean;
89
+ /** Stamped on every boundary this walk creates. See `ErrorBoundaryProps`. */
90
+ isSlotBoundary?: boolean;
74
91
  }
75
92
  /**
76
93
  * Wrap an element in the error boundaries declared by a route segment.
@@ -1 +1 @@
1
- {"version":3,"file":"error-boundary-wrapper.d.ts","sourceRoot":"","sources":["../../src/server/error-boundary-wrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK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C3E,UAAU,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACxC;;;OAGG;IACH,sBAAsB,EAAE,OAAO,CAAC;IAChC,yFAAyF;IACzF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAoDD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,8BAA8B,CAClD,KAAK,SAAS,YAAY,EAC1B,QAAQ,SAAS,SAAS,EAE1B,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,EAC3B,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,uBAAuB,CAAC,KAAK,EAAE,QAAQ,CAAC,GAC/C,OAAO,CAAC,QAAQ,CAAC,CAsCnB"}
@@ -0,0 +1,3 @@
1
+ /** Preserve request-wide metadata when replacing a failed response body. */
2
+ export declare function errorResponseHeaders(responseHeaders?: Headers): Headers;
3
+ //# sourceMappingURL=error-response-headers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-response-headers.d.ts","sourceRoot":"","sources":["../../src/server/error-response-headers.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,OAAO,CAcvE"}
@@ -1,7 +1,7 @@
1
1
  import { n as formFlashAls } from "../_chunks/als-registry-C6kcfprT.js";
2
- import { D as getSegmentParams, J as withSpan, L as isDebug, P as getCookieJar, R as isDevMode, S as waitUntil, T as getHeaders, U as getSpanId, W as getTraceId, _ as RedirectSignal, b as redirect, g as DenySignal, x as redirectExternal, y as deny, z as addSpanEvent } from "../_chunks/logger-DDirEsn7.js";
2
+ import { A as isDenySignal, B as getSegmentParams, F as waitUntil, N as redirect, P as redirectExternal, R as getHeaders, T as withSpan, X as isDevMode, Y as isDebug, b as getSpanId, g as addSpanEvent, j as isRedirectSignal, k as deny, q as getCookieJar, x as getTraceId } from "../_chunks/logger-uLBuGKDI.js";
3
3
  import { t as formatSize } from "../_chunks/format-BKclgVbk.js";
4
- import { a as parseFormData, i as coerce, n as revalidatePath, r as revalidateTag } from "../_chunks/actions-BS-m5SLv.js";
4
+ import { a as parseFormData, i as coerce, n as revalidatePath, r as revalidateTag } from "../_chunks/actions-d1hCqnU3.js";
5
5
  //#region src/shared/redirect-type.ts
6
6
  /**
7
7
  * Next.js redirect type discriminator.
@@ -350,7 +350,7 @@ function createActionClient(config = {}) {
350
350
  input
351
351
  }) };
352
352
  } catch (error) {
353
- if (error instanceof RedirectSignal || error instanceof DenySignal) throw error;
353
+ if (isRedirectSignal(error) || isDenySignal(error)) throw error;
354
354
  return handleActionError(error);
355
355
  }
356
356
  }