@timber-js/app 0.2.0-alpha.198 → 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 (246) 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-dVDi1GQz.js → cli-check-D6VolrDV.js} +3 -3
  11. package/dist/_chunks/{cli-check-dVDi1GQz.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-Ph6luW4c.js → convention-lint-fRkwVwEH.js} +25 -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/index.js +2 -2
  92. package/dist/routing/interception.d.ts +2 -2
  93. package/dist/routing/slot-placement.d.ts +2 -2
  94. package/dist/server/access-gate.d.ts +73 -1
  95. package/dist/server/access-gate.d.ts.map +1 -1
  96. package/dist/server/action-handler.d.ts.map +1 -1
  97. package/dist/server/actions.d.ts +16 -1
  98. package/dist/server/actions.d.ts.map +1 -1
  99. package/dist/server/als-registry.d.ts +3 -9
  100. package/dist/server/als-registry.d.ts.map +1 -1
  101. package/dist/server/children-interception.d.ts +1 -1
  102. package/dist/server/default-status-page.d.ts +2 -2
  103. package/dist/server/default-status-page.d.ts.map +1 -1
  104. package/dist/server/deny-boundary.d.ts +15 -9
  105. package/dist/server/deny-boundary.d.ts.map +1 -1
  106. package/dist/server/deny-renderer.d.ts.map +1 -1
  107. package/dist/server/error-boundary-wrapper.d.ts +21 -4
  108. package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
  109. package/dist/server/error-response-headers.d.ts +3 -0
  110. package/dist/server/error-response-headers.d.ts.map +1 -0
  111. package/dist/server/index.js +3 -3
  112. package/dist/server/index.js.map +1 -1
  113. package/dist/server/internal.d.ts +1 -2
  114. package/dist/server/internal.d.ts.map +1 -1
  115. package/dist/server/internal.js +2339 -2506
  116. package/dist/server/internal.js.map +1 -1
  117. package/dist/server/metadata-collector.d.ts +2 -5
  118. package/dist/server/metadata-collector.d.ts.map +1 -1
  119. package/dist/server/param-coercion.d.ts +10 -3
  120. package/dist/server/param-coercion.d.ts.map +1 -1
  121. package/dist/server/pipeline-outcome.d.ts.map +1 -1
  122. package/dist/server/pipeline-phases.d.ts +11 -0
  123. package/dist/server/pipeline-phases.d.ts.map +1 -1
  124. package/dist/server/port-resolution.d.ts +3 -89
  125. package/dist/server/port-resolution.d.ts.map +1 -1
  126. package/dist/server/primitives.d.ts +38 -10
  127. package/dist/server/primitives.d.ts.map +1 -1
  128. package/dist/server/response-cache-policy.d.ts +3 -0
  129. package/dist/server/response-cache-policy.d.ts.map +1 -0
  130. package/dist/server/route-element-builder.d.ts +11 -41
  131. package/dist/server/route-element-builder.d.ts.map +1 -1
  132. package/dist/server/route-element-helpers.d.ts +12 -0
  133. package/dist/server/route-element-helpers.d.ts.map +1 -0
  134. package/dist/server/route-module-loader.d.ts +37 -0
  135. package/dist/server/route-module-loader.d.ts.map +1 -0
  136. package/dist/server/rsc-cache-key-guard.d.ts.map +1 -1
  137. package/dist/server/rsc-entry/action-middleware-runner.d.ts.map +1 -1
  138. package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
  139. package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
  140. package/dist/server/rsc-entry/rsc-payload.d.ts +22 -1
  141. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  142. package/dist/server/rsc-entry/rsc-stream.d.ts +4 -11
  143. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  144. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  145. package/dist/server/rsc-error-envelope.d.ts +11 -0
  146. package/dist/server/rsc-error-envelope.d.ts.map +1 -0
  147. package/dist/server/skippable-prefix.d.ts +18 -15
  148. package/dist/server/skippable-prefix.d.ts.map +1 -1
  149. package/dist/server/slot-resolver.d.ts.map +1 -1
  150. package/dist/server/slot-subtree-contain.d.ts +54 -0
  151. package/dist/server/slot-subtree-contain.d.ts.map +1 -0
  152. package/dist/server/stream-utils.d.ts.map +1 -1
  153. package/dist/server/utils/element-type.d.ts +10 -0
  154. package/dist/server/utils/element-type.d.ts.map +1 -1
  155. package/dist/shared/rsc-error-envelope.d.ts +0 -9
  156. package/dist/shared/rsc-error-envelope.d.ts.map +1 -1
  157. package/dist/shared/status-reason-phrase.d.ts +26 -0
  158. package/dist/shared/status-reason-phrase.d.ts.map +1 -0
  159. package/docs/api/30-api-server.mdx +4 -2
  160. package/docs/api/31-api-client.mdx +5 -1
  161. package/docs/api/36-cli.mdx +5 -3
  162. package/docs/learn/12-error-handling.mdx +5 -1
  163. package/package.json +10 -10
  164. package/src/client/browser-entry/action-dispatch.ts +166 -99
  165. package/src/client/browser-entry/action-queue.ts +90 -0
  166. package/src/client/browser-entry/router-init.ts +60 -35
  167. package/src/client/deny-last-resort.tsx +54 -0
  168. package/src/client/error-boundary.tsx +144 -42
  169. package/src/client/history.ts +52 -3
  170. package/src/client/internal.ts +1 -0
  171. package/src/client/link.tsx +70 -35
  172. package/src/client/navigation-commit.ts +79 -27
  173. package/src/client/navigation-transition.ts +176 -127
  174. package/src/client/router-effects.ts +14 -17
  175. package/src/client/router-lifecycle.ts +181 -115
  176. package/src/client/router-pipeline.ts +94 -71
  177. package/src/client/router-types.ts +61 -7
  178. package/src/client/router.ts +147 -74
  179. package/src/client/rsc-fetch.ts +0 -13
  180. package/src/client/segment-cache.ts +43 -10
  181. package/src/client/state.ts +26 -0
  182. package/src/client/status-page-marker.tsx +32 -0
  183. package/src/dev-tools/holding-server.ts +4 -17
  184. package/src/index.ts +18 -34
  185. package/src/plugins/dev-server.ts +2 -1
  186. package/src/routing/interception.ts +2 -2
  187. package/src/routing/slot-placement.ts +2 -2
  188. package/src/server/access-gate.tsx +89 -21
  189. package/src/server/action-client.ts +2 -2
  190. package/src/server/action-handler.ts +23 -10
  191. package/src/server/actions.ts +81 -34
  192. package/src/server/als-registry.ts +3 -9
  193. package/src/server/children-interception.ts +1 -1
  194. package/src/server/default-status-page.ts +7 -47
  195. package/src/server/deny-boundary.ts +45 -28
  196. package/src/server/deny-renderer.ts +6 -2
  197. package/src/server/error-boundary-wrapper.ts +23 -4
  198. package/src/server/error-response-headers.ts +18 -0
  199. package/src/server/internal.ts +2 -10
  200. package/src/server/metadata-collector.ts +3 -18
  201. package/src/server/param-coercion.ts +13 -4
  202. package/src/server/pipeline-outcome.ts +35 -13
  203. package/src/server/pipeline-phases.ts +22 -16
  204. package/src/server/port-resolution.ts +3 -165
  205. package/src/server/prebuilt-builder.ts +4 -4
  206. package/src/server/primitives.ts +75 -11
  207. package/src/server/response-cache-policy.ts +45 -0
  208. package/src/server/route-element-builder.ts +149 -412
  209. package/src/server/route-element-helpers.ts +37 -0
  210. package/src/server/route-handler.ts +2 -2
  211. package/src/server/route-module-loader.ts +161 -0
  212. package/src/server/rsc-cache-key-guard.ts +2 -42
  213. package/src/server/rsc-entry/action-middleware-runner.ts +4 -4
  214. package/src/server/rsc-entry/api-handler.ts +5 -5
  215. package/src/server/rsc-entry/error-renderer.ts +3 -4
  216. package/src/server/rsc-entry/helpers.ts +1 -1
  217. package/src/server/rsc-entry/index.ts +3 -3
  218. package/src/server/rsc-entry/render-route.ts +4 -8
  219. package/src/server/rsc-entry/rsc-payload.ts +59 -42
  220. package/src/server/rsc-entry/rsc-stream.ts +48 -27
  221. package/src/server/rsc-entry/ssr-renderer.ts +6 -10
  222. package/src/server/rsc-error-envelope.ts +18 -0
  223. package/src/server/skippable-prefix.ts +105 -7
  224. package/src/server/slot-resolver.ts +43 -12
  225. package/src/server/slot-subtree-contain.ts +255 -0
  226. package/src/server/stream-utils.ts +12 -8
  227. package/src/server/utils/element-type.ts +18 -2
  228. package/src/shared/rsc-error-envelope.ts +0 -15
  229. package/src/shared/status-reason-phrase.ts +61 -0
  230. package/dist/_chunks/actions-BS-m5SLv.js.map +0 -1
  231. package/dist/_chunks/convention-lint-Ph6luW4c.js.map +0 -1
  232. package/dist/_chunks/error-boundary-BvRCCmbN.js +0 -353
  233. package/dist/_chunks/error-boundary-BvRCCmbN.js.map +0 -1
  234. package/dist/_chunks/logger-DDirEsn7.js.map +0 -1
  235. package/dist/_chunks/mdx-file-CXyHGUpS.js +0 -25
  236. package/dist/_chunks/mdx-file-CXyHGUpS.js.map +0 -1
  237. package/dist/_chunks/router-ref-8gr8qsxN.js +0 -28
  238. package/dist/_chunks/router-ref-8gr8qsxN.js.map +0 -1
  239. package/dist/_chunks/rsc-error-envelope-tT5PJs4q.js +0 -40
  240. package/dist/_chunks/rsc-error-envelope-tT5PJs4q.js.map +0 -1
  241. package/dist/_chunks/scanner-tdFPvDYi.js.map +0 -1
  242. package/dist/_chunks/segment-keys-BhqoHiLc.js.map +0 -1
  243. package/dist/_chunks/ssr-data-BQGhTPAK.js.map +0 -1
  244. package/dist/server/tree-builder.d.ts +0 -150
  245. package/dist/server/tree-builder.d.ts.map +0 -1
  246. package/src/server/tree-builder.ts +0 -313
@@ -1 +1 @@
1
- {"version":3,"file":"rsc-stream.d.ts","sourceRoot":"","sources":["../../../src/server/rsc-entry/rsc-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAKnE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAe,MAAM,kBAAkB,CAAC;AAG3E,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,cAAc,CAAC;AAItB;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,YAAY,EAAE,UAAU,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,WAAW,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACvD;;;;;;;;OAQG;IACH,kBAAkB,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B;gEAC4D;IAC5D,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,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B,EAAE,CAAC;IAChC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;IACzC,KAAK,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,qBAAqB,CAAC;IACvC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAoWjF"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Build the hard-navigate envelope for a status code.
3
+ *
4
+ * Preserve middleware's request-wide headers and cookies, but discard the
5
+ * abandoned body's framing, validators, and cache policy. Every producer,
6
+ * including errors returned normally during render, gets this cleanup here.
7
+ * The input header bag is left intact. The body deliberately carries no message —
8
+ * only the status already on the wire (design/13-security.md principle 4).
9
+ */
10
+ export declare function rscErrorEnvelope(status: number, responseHeaders?: Headers): Response;
11
+ //# sourceMappingURL=rsc-error-envelope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsc-error-envelope.d.ts","sourceRoot":"","sources":["../../src/server/rsc-error-envelope.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO,GAAG,QAAQ,CAKpF"}
@@ -1,26 +1,29 @@
1
1
  /**
2
- * Skippable-prefix truncation.
2
+ * Skippable-prefix computation.
3
3
  *
4
- * Extracted from `route-element-builder.ts`, which was over the 500-line limit
5
- * (design/18-build-system.md). This is a self-contained question — "may this
6
- * segment's layout still be skipped, given what its slots would render?" — with
7
- * no dependency on element construction.
4
+ * Determines which layouts can be skipped on a partial navigation by
5
+ * computing a contiguous prefix of segments whose cached layouts need
6
+ * not re-render. Extracted from `route-element-builder.ts` to keep it
7
+ * under the 500-line limit (design/18-build-system.md).
8
+ *
9
+ * See design/19-client-navigation.md §"X-Timber-State-Tree Header".
8
10
  */
9
11
  import type { ManifestSegmentNode } from './route-matcher.ts';
10
12
  import type { RouteMatch } from './pipeline.ts';
11
13
  import { type ClientStateTree } from './state-tree-diff.ts';
12
14
  /**
13
- * Truncate the skippable prefix when a skippable layout has slots whose
14
- * content changed between the departing and destination URLs (TIM-1232).
15
+ * Compute the set of segment indices whose layouts can be skipped.
15
16
  *
16
- * Without this, changed slots at skipped layouts are never sent to the
17
- * client — the `continue` in the main loop skips slot resolution entirely.
18
- * Removing the segment from the skippable set forces it to render with
19
- * its slots. The prefix must stay contiguous, so all segments after the
20
- * first changed-slot segment are also removed.
17
+ * Three sub-rules in order:
18
+ * (a) Contiguous prefix via `shouldSkipSegment` — stop at the first
19
+ * non-skippable layout.
20
+ * (b) If every layout landed in the prefix, remove the innermost one
21
+ * as the merge point (the client needs a mounted outlet there).
22
+ * (c) Cross-section guard — clear the whole set unless at least one
23
+ * non-skipped layout's key is in `clientStateTree`.
21
24
  *
22
- * Uses key-based diffing (TIM-1370): computes the destination content key
23
- * per slot and checks if the client's advertised set contains it.
25
+ * After the prefix is computed, `truncateSkippableForChangedSlots`
26
+ * removes any segment whose parallel slots changed content.
24
27
  */
25
- export declare function truncateSkippableForChangedSlots(skippableSet: Set<number>, segments: ManifestSegmentNode[], segmentKeys: string[], match: RouteMatch, clientStateTree: ClientStateTree, req: Request): void;
28
+ export declare function computeSkippableSet(segments: ManifestSegmentNode[], segmentKeys: string[], layoutBySegment: Map<ManifestSegmentNode, unknown>, clientStateTree: ClientStateTree | null | undefined, match: RouteMatch, req: Request): Set<number>;
26
29
  //# sourceMappingURL=skippable-prefix.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skippable-prefix.d.ts","sourceRoot":"","sources":["../../src/server/skippable-prefix.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM5E;;;;;;;;;;;;GAYG;AACH,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,WAAW,EAAE,MAAM,EAAE,EACrB,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,eAAe,EAChC,GAAG,EAAE,OAAO,GACX,IAAI,CAoCN"}
1
+ {"version":3,"file":"skippable-prefix.d.ts","sourceRoot":"","sources":["../../src/server/skippable-prefix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAqC,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM/F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,WAAW,EAAE,MAAM,EAAE,EACrB,eAAe,EAAE,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,EAClD,eAAe,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,EACnD,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,OAAO,GACX,GAAG,CAAC,MAAM,CAAC,CAyEb"}
@@ -1 +1 @@
1
- {"version":3,"file":"slot-resolver.d.ts","sourceRoot":"","sources":["../../src/server/slot-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,e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,EAAE,mBAAmB,EAC5B,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,MAAM,GACV,MAAM,EAAE,CAUV;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,UAAU,EACjB,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,IAAI,CAcN;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,UAAU,EACjB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,aAAa,EAAE,GAC5B,IAAI,CA+DN;AAED,UAAU,oBAAoB;IAC5B,OAAO,EAAE,mBAAmB,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,CAAC,EAAE,eAAe,CAAC;IACnB,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,YAAY,EAAE,aAAa,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,OAAO,EACP,SAAS,EACT,KAAK,EACL,CAAC,EACD,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,GACb,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAwIzD"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Slot subtree containment — keeps a nested `deny()` inside its slot.
3
+ *
4
+ * `SafeSlotPage` (slot-resolver.ts) catches a `DenySignal` thrown by the slot
5
+ * page's own body and returns the slot's fallback instead, which is what makes
6
+ * slot denial graceful degradation at HTTP 200. That catch covers only the
7
+ * function it calls. Every server component in the tree the page *returns*
8
+ * runs later, as its own Flight task, and a deny there reaches Flight's global
9
+ * `onError` — where it is indistinguishable from a main-route deny. Production
10
+ * Flight hands `onError` nothing but the error object (no task, no key path,
11
+ * no component stack; it even clears its request storage around the call), so
12
+ * nothing at that point can recover where the throw came from, and the status
13
+ * commit in `rsc-payload.ts` would take it for a page-level deny and answer 4xx.
14
+ *
15
+ * The only place the origin is known is *before* the component runs. So this
16
+ * module rewrites the tree a slot component returns: each server-component
17
+ * element is replaced by an element of `ContainedSlotComponent`, which invokes
18
+ * the original, catches `DenySignal`, and substitutes the slot fallback in that
19
+ * component's place. The wrapper rewrites its own output the same way, so
20
+ * containment follows the tree however deep it renders — one walk per
21
+ * component result, once each. No Flight error row, no signal, no client
22
+ * boundary involvement: the deny never leaves the slot, on the payload path
23
+ * and the document path alike.
24
+ *
25
+ * What is NOT contained, deliberately: anything other than `DenySignal`.
26
+ * `RedirectSignal` must still reach the pipeline (TIM-554), and a plain error
27
+ * still takes the slot's catch-all boundary. A thrown thenable — `use()` on a
28
+ * pending promise — passes through untouched so Flight can suspend the task.
29
+ *
30
+ * Flight's `renderElement` does not only invoke plain functions: it unwraps
31
+ * `memo` (renders `.type`), `forwardRef` (calls `.render`), and `lazy`
32
+ * (runs `_init`, then renders what it resolved to). A server component behind
33
+ * any of those is invoked all the same, so its deny would escape too. The walk
34
+ * therefore resolves an element type the way Flight would — down to the
35
+ * function Flight would call — and wraps that.
36
+ *
37
+ * See design/02-rendering-pipeline.md §"Slot Access Failure = Graceful
38
+ * Degradation", TIM-1450.
39
+ */
40
+ import { type ReactNode } from 'react';
41
+ /**
42
+ * Contain every server component in the tree a slot component returned.
43
+ *
44
+ * `fallback` is the slot's deny fallback (`default.tsx`, or nothing) and
45
+ * replaces exactly the component that denied — siblings that already rendered
46
+ * stay, the same way a deny scoped by a Suspense boundary behaves on the main
47
+ * route.
48
+ *
49
+ * `opaque` is an element the caller built and has already contained, which
50
+ * the walk must leave alone: a slot layout passes the `children` element it
51
+ * received, so the page beneath it is not wrapped a second time.
52
+ */
53
+ export declare function containSlotSubtree(tree: ReactNode, fallback: ReactNode, opaque?: ReactNode): ReactNode;
54
+ //# sourceMappingURL=slot-subtree-contain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slot-subtree-contain.d.ts","sourceRoot":"","sources":["../../src/server/slot-subtree-contain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAsD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoM3F;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,SAAS,EACnB,MAAM,CAAC,EAAE,SAAS,GACjB,SAAS,CAEX"}
@@ -1 +1 @@
1
- {"version":3,"file":"stream-utils.d.ts","sourceRoot":"","sources":["../../src/server/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,MAAM,WAAW,UAAU;IACzB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,OAAO,CAAC,EAAE,UAAU,GACnB,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAmK1D;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,EAChC,SAAS,EAAE,MAAM,GAChB,cAAc,CAAC,UAAU,CAAC,CA4D5B"}
1
+ {"version":3,"file":"stream-utils.d.ts","sourceRoot":"","sources":["../../src/server/stream-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,MAAM,WAAW,UAAU;IACzB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,OAAO,CAAC,EAAE,UAAU,GACnB,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAmK1D;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,EAChC,SAAS,EAAE,MAAM,GAChB,cAAc,CAAC,UAAU,CAAC,CA8D5B"}
@@ -36,5 +36,15 @@ export type LoadedComponent = (...args: unknown[]) => ReactNode;
36
36
  * Anything else (numbers, plain config objects, JSON, etc.) is rejected so
37
37
  * the boundary wrapper is skipped rather than crashing inside React.
38
38
  */
39
+ /**
40
+ * Detect whether a component is a React client reference.
41
+ * Client references have $$typeof set to Symbol.for('react.client.reference')
42
+ * by registerClientReference() in the React Flight server runtime.
43
+ *
44
+ * Used to skip OTEL tracing wrappers that would call the component as a
45
+ * function. Client components must go through createElement only — they are
46
+ * serialized as references in the RSC Flight stream, not executed on the server.
47
+ */
48
+ export declare function isClientReference(component: unknown): boolean;
39
49
  export declare function isValidElementType(value: unknown): value is LoadedComponent;
40
50
  //# sourceMappingURL=element-type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element-type.d.ts","sourceRoot":"","sources":["../../../src/server/utils/element-type.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,SAAS,CAAC;AA2BhE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAK3E"}
1
+ {"version":3,"file":"element-type.d.ts","sourceRoot":"","sources":["../../../src/server/utils/element-type.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,SAAS,CAAC;AA0BhE;;;;;;;;;;;;;;;;;GAiBG;AACH;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAM7D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAK3E"}
@@ -13,13 +13,4 @@
13
13
  */
14
14
  /** Header the client checks to decide whether to hard-navigate. */
15
15
  export declare const TIMBER_ERROR_HEADER = "X-Timber-Error";
16
- /**
17
- * Build the hard-navigate envelope for a status code.
18
- *
19
- * `responseHeaders` carries anything middleware already set (cookies, cache
20
- * directives); the content type and error header are overwritten because the
21
- * body is always this envelope. The body deliberately carries no message —
22
- * only the status already on the wire (design/13-security.md principle 4).
23
- */
24
- export declare function rscErrorEnvelope(status: number, responseHeaders?: Headers): Response;
25
16
  //# sourceMappingURL=rsc-error-envelope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rsc-error-envelope.d.ts","sourceRoot":"","sources":["../../src/shared/rsc-error-envelope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO,GAAG,QAAQ,CAKpF"}
1
+ {"version":3,"file":"rsc-error-envelope.d.ts","sourceRoot":"","sources":["../../src/shared/rsc-error-envelope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,mBAAmB,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Reason phrases for the framework default status page.
3
+ *
4
+ * Shared between the server-rendered default page (`server/default-status-page.ts`,
5
+ * the HTML terminal of the deny chain) and its client-rendered counterpart
6
+ * (`client/deny-last-resort.tsx`, the terminal a streamed deny reaches when no
7
+ * status file sits at or above the component that denied). One table, so the
8
+ * two surfaces cannot drift — a reader who sees "403 Forbidden" on a document
9
+ * load must see the same words after a client navigation.
10
+ *
11
+ * Nothing here is caller-supplied text: the phrase is looked up from a clamped
12
+ * integer, never interpolated from a request. See design/13-security.md
13
+ * principle 4 ("Errors don't leak").
14
+ */
15
+ /**
16
+ * Coerce a status into something safe to put in markup.
17
+ *
18
+ * `DenySignal.status` is typed `number` but nothing validates it at
19
+ * construction, and JS callers can hand us anything. Rather than escaping a
20
+ * value that should never have been a string, collapse non-integers to 500 —
21
+ * the page is decoration for a status already on the wire.
22
+ */
23
+ export declare function displayStatus(status: number): number;
24
+ /** Human-readable phrase for a status code. Never caller-supplied text. */
25
+ export declare function statusReasonPhrase(status: number): string;
26
+ //# sourceMappingURL=status-reason-phrase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-reason-phrase.d.ts","sourceRoot":"","sources":["../../src/shared/status-reason-phrase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA8BH;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIzD"}
@@ -93,6 +93,8 @@ Mutations are only allowed before the response flushes. Attempting to set a cook
93
93
 
94
94
  For typed cookies with validation and a client React hook, see [`defineCookie()`](/docs/typed-params) from `@timber-js/app/cookies`.
95
95
 
96
+ Cookies queued before a middleware error are included once on the HTTP 500 response. They also survive when `proxy.ts` awaits `next()` and then throws. This applies to both document requests and client navigations; a later error does not roll back queued cookie writes.
97
+
96
98
  ## Actions
97
99
 
98
100
  ### `createActionClient(options)`
@@ -157,7 +159,7 @@ For typed coercion, define codecs in `app/schema.ts` with `defineSchema()`. See
157
159
  ```ts
158
160
  interface RouteContext {
159
161
  req: Request;
160
- headers: Headers; // Response headers (writable)
162
+ headers: Headers; // Response headers (writable)
161
163
  }
162
164
  ```
163
165
 
@@ -169,7 +171,7 @@ Segment params and query params are **not** on `RouteContext`. Read them the sam
169
171
  interface MiddlewareContext {
170
172
  req: Request;
171
173
  segmentParams: Record<string, string | string[]>;
172
- headers: Headers; // Response headers (writable)
174
+ headers: Headers; // Response headers (writable)
173
175
  requestHeaders: Headers; // Request headers (injectable)
174
176
  readonly nonce: string; // Per-request CSP nonce, generated on first read
175
177
  }
@@ -31,6 +31,8 @@ import { Link } from '@timber-js/app/client';
31
31
  | `prefetch` | `boolean` | Prefetch the RSC payload on hover |
32
32
  | `onNavigate` | `OnNavigateHandler` | Intercept navigation before routing |
33
33
 
34
+ `prefetch` also works for previously visited URLs. A click can reuse the prefetched payload for 30 seconds; after expiry, navigation fetches a fresh payload. Same-page fragment links only scroll within the page and do not prefetch.
35
+
34
36
  ### `<TimberErrorBoundary>`
35
37
 
36
38
  Error boundary component with reset support.
@@ -60,7 +62,9 @@ router.forward();
60
62
  | `back()` | Go back |
61
63
  | `forward()` | Go forward |
62
64
 
63
- If the server answers a navigation or a `refresh()` with an error, the router hands the URL back to the server as a full page load so it can render the error page as HTML with the right status code. That applies to back/forward too. None of these methods report the failure to your code — there is nothing to catch, and nothing to render a fallback for.
65
+ A `deny()` reached by a client navigation renders your status page in place, without a page load — the denial travels in the navigation payload, and the boundary for the matching status file renders it. The payload response itself is always HTTP 200; the status code contract is a property of full page loads, where the browser, crawlers, and CDNs are the ones reading it.
66
+
67
+ If the server cannot answer a navigation or a `refresh()` at all, the router hands the URL back to the server as a full page load so it can render the error page as HTML with the right status code. That applies to back/forward too. None of these methods report the failure to your code — there is nothing to catch, and nothing to render a fallback for.
64
68
 
65
69
  ### `usePathname()`
66
70
 
@@ -25,14 +25,14 @@ timber dev --config ./custom-vite.config.ts
25
25
 
26
26
  Starts a Vite dev server with timber's routing, RSC pipeline, and dev tooling active. File changes trigger instant HMR. Route changes are detected automatically.
27
27
 
28
- The server binds the port immediately on startup and shows a loading page while Vite initializes. This eliminates connection refused errors during cold start.
28
+ When the requested port is available, the server shows a loading page while Vite initializes. If that port is occupied, startup continues without the loading page.
29
29
 
30
30
  #### Port selection
31
31
 
32
32
  The default port is **`3000`** for both `timber dev` and `timber preview` (matching Next.js and most Node web frameworks). If `3000` is already in use, timber automatically bumps to `3001`, then `3002`, and so on until it finds a free port:
33
33
 
34
34
  ```
35
- [timber] Port 3000 in use, using 3001
35
+ Port 3000 is in use, trying another one...
36
36
  ```
37
37
 
38
38
  To override the default, use any of the following (highest precedence first):
@@ -42,7 +42,9 @@ To override the default, use any of the following (highest precedence first):
42
42
 
43
43
  > **Note:** `timber dev --port 4000` is an error, not a silent no-op. `timber dev` accepts only `--config` — use `PORT` or `server.port` to change the port.
44
44
 
45
- When you set the port explicitly, timber **does not** auto-bump — a conflict produces an `EADDRINUSE` error so you find out immediately rather than connecting to the wrong port. This same behavior applies to `timber preview` and the production Node preview server.
45
+ For `timber dev`, an occupied port produces a notice and the server tries the next free port. Set `server.strictPort: true` in `vite.config.ts` to fail on a conflict instead. Preview and the production Node preview server report a conflict for an explicit port.
46
+
47
+ Config and `.env` restarts keep the dev server on its current port, including a port selected after a conflict. Changing the configured port takes effect on restart. The startup loading page is skipped when the old server still occupies the requested port.
46
48
 
47
49
  ### `timber build`
48
50
 
@@ -27,6 +27,10 @@ Errors thrown before rendering (in middleware, access checks, or the page functi
27
27
 
28
28
  Errors thrown during React rendering are caught by error boundaries. Because timber buffers until `onShellReady`, errors outside `<Suspense>` still produce correct HTTP status codes.
29
29
 
30
+ If rendering fails and the error fallback is unavailable or also crashes, the empty 500 response preserves cookies queued by middleware. It uses `Cache-Control: private, no-store` and removes the abandoned page's cache overrides, validators, and body framing headers so a transient failure does not inherit the successful page's cache lifetime.
31
+
32
+ RSC hard-navigation error envelopes use the same header cleanup, including when a Flight stream fails during rendering. These JSON responses preserve queued cookies and tell the client to load the error page with a full document navigation.
33
+
30
34
  ## `deny()`
31
35
 
32
36
  `deny()` produces the correct HTTP status and renders the matching status file:
@@ -49,7 +53,7 @@ export default async function ProductPage() {
49
53
  }
50
54
  ```
51
55
 
52
- `deny()` called outside `<Suspense>` produces a real HTTP status code. Called inside `<Suspense>` (after the flush), it triggers the nearest error boundary and injects `<meta name="robots" content="noindex">`.
56
+ `deny()` called outside `<Suspense>` produces a real HTTP status code on a full page load. Called inside `<Suspense>` (after the flush), it triggers the nearest error boundary and injects `<meta name="robots" content="noindex">`. On a client navigation the status page renders in place either way — the payload the router fetches is always HTTP 200 and carries the denial inside it.
53
57
 
54
58
  ## Status-Code Files
55
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timber-js/app",
3
- "version": "0.2.0-alpha.198",
3
+ "version": "0.2.0-alpha.199",
4
4
  "description": "Vite-native React framework built for Servers and Serverless Platforms — correct HTTP semantics, real status codes, pages that work without JavaScript",
5
5
  "keywords": [
6
6
  "cloudflare-workers",
@@ -148,14 +148,14 @@
148
148
  },
149
149
  "dependencies": {
150
150
  "@opentelemetry/api": "^1.9.1",
151
- "@opentelemetry/context-async-hooks": "^2.10.0",
152
- "@opentelemetry/sdk-trace-base": "^2.10.0",
151
+ "@opentelemetry/context-async-hooks": "^2.11.0",
152
+ "@opentelemetry/sdk-trace-base": "^2.11.0",
153
153
  "cookie": "^2.0.1",
154
154
  "jsonc-parser": "^3.3.1",
155
- "magic-string": "^1.2.2",
156
- "nitro": "3.0.260610-beta",
157
- "oxc-transform-react": "^0.145.0",
158
- "srvx": "^0.12.7"
155
+ "magic-string": "^1.2.3",
156
+ "nitro": "3.0.260903-beta",
157
+ "oxc-transform-react": "^0.149.0",
158
+ "srvx": "^1.0.4"
159
159
  },
160
160
  "peerDependencies": {
161
161
  "@content-collections/core": "^0.14.0 || ^0.15.0",
@@ -165,10 +165,10 @@
165
165
  "@vitejs/plugin-react": "^6.1.0",
166
166
  "@vitejs/plugin-rsc": ">=0.5.28",
167
167
  "nuqs": "^2.0.0",
168
- "react": "19.3.0-canary-f789f203-20260825",
169
- "react-dom": "19.3.0-canary-f789f203-20260825",
168
+ "react": "19.3.0",
169
+ "react-dom": "19.3.0",
170
170
  "satteri": "^0.9.5",
171
- "vite": "8.2.1",
171
+ "vite": "8.2.2",
172
172
  "vite-plugin-satteri": "^0.2.15",
173
173
  "wrangler": "^4.0.0",
174
174
  "zod": "^3.22.0 || ^4.0.0"