@timber-js/app 0.2.0-alpha.184 → 0.2.0-alpha.186

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 (441) hide show
  1. package/dist/_chunks/{actions-O_LsyCE4.js → actions-C-Rw9vPc.js} +3 -3
  2. package/dist/_chunks/{actions-O_LsyCE4.js.map → actions-C-Rw9vPc.js.map} +1 -1
  3. package/dist/_chunks/als-slots-mFweg276.js +27 -0
  4. package/dist/_chunks/als-slots-mFweg276.js.map +1 -0
  5. package/dist/_chunks/base-path-DaQrzbez.js +80 -0
  6. package/dist/_chunks/base-path-DaQrzbez.js.map +1 -0
  7. package/dist/_chunks/build-manifest-DWppEdLB.js +86 -0
  8. package/dist/_chunks/build-manifest-DWppEdLB.js.map +1 -0
  9. package/dist/_chunks/build-output-helper-C3DrfzZR.js +369 -0
  10. package/dist/_chunks/build-output-helper-C3DrfzZR.js.map +1 -0
  11. package/dist/_chunks/{cache-api-B-lhk9p4.js → cache-api-Cd0VZ_Pd.js} +3 -3
  12. package/dist/_chunks/{cache-api-B-lhk9p4.js.map → cache-api-Cd0VZ_Pd.js.map} +1 -1
  13. package/dist/_chunks/cli-schema-sync-CKgHC2MB.js +1857 -0
  14. package/dist/_chunks/cli-schema-sync-CKgHC2MB.js.map +1 -0
  15. package/dist/_chunks/{cloudflare-CnT5Lr7U.js → cloudflare-Cs0uZXea.js} +89 -12
  16. package/dist/_chunks/{cloudflare-CnT5Lr7U.js.map → cloudflare-Cs0uZXea.js.map} +1 -1
  17. package/dist/_chunks/error-boundary-DpYRI_I1.js +330 -0
  18. package/dist/_chunks/error-boundary-DpYRI_I1.js.map +1 -0
  19. package/dist/_chunks/{fast-hash-D6hIVt1Y.js → fast-hash-C-tVYrLb.js} +6 -1
  20. package/dist/_chunks/fast-hash-C-tVYrLb.js.map +1 -0
  21. package/dist/_chunks/fs-identity-D7vb6GdI.js +208 -0
  22. package/dist/_chunks/fs-identity-D7vb6GdI.js.map +1 -0
  23. package/dist/_chunks/{logger-AWfuX-KJ.js → logger-N7e5auP0.js} +9 -13
  24. package/dist/_chunks/logger-N7e5auP0.js.map +1 -0
  25. package/dist/_chunks/navigation-root-B29qg0_T.js +274 -0
  26. package/dist/_chunks/navigation-root-B29qg0_T.js.map +1 -0
  27. package/dist/_chunks/param-value-C8TNYchQ.js +66 -0
  28. package/dist/_chunks/param-value-C8TNYchQ.js.map +1 -0
  29. package/dist/_chunks/{plugin-context---kTF5v8.js → plugin-context-DEGLSJs3.js} +2 -1
  30. package/dist/_chunks/plugin-context-DEGLSJs3.js.map +1 -0
  31. package/dist/_chunks/{router-ref-CtmF-aPv.js → router-ref-DuYuV_0Q.js} +2 -2
  32. package/dist/_chunks/router-ref-DuYuV_0Q.js.map +1 -0
  33. package/dist/_chunks/rsc-cache-key-DD0fl_-s.js +243 -0
  34. package/dist/_chunks/rsc-cache-key-DD0fl_-s.js.map +1 -0
  35. package/dist/_chunks/rsc-error-envelope-tT5PJs4q.js +40 -0
  36. package/dist/_chunks/rsc-error-envelope-tT5PJs4q.js.map +1 -0
  37. package/dist/_chunks/rsc-payload-path-B_LBodc2.js +48 -0
  38. package/dist/_chunks/rsc-payload-path-B_LBodc2.js.map +1 -0
  39. package/dist/_chunks/{segment-classify-Byy425ng.js → segment-classify-C539Pa2O.js} +23 -2
  40. package/dist/_chunks/segment-classify-C539Pa2O.js.map +1 -0
  41. package/dist/_chunks/{canonicalize-DQHyFClh.js → segment-keys-BawYuNFO.js} +61 -2
  42. package/dist/_chunks/segment-keys-BawYuNFO.js.map +1 -0
  43. package/dist/_chunks/slot-params-BCTmZkQB.js +76 -0
  44. package/dist/_chunks/slot-params-BCTmZkQB.js.map +1 -0
  45. package/dist/_chunks/{ssr-data-BOWsq18U.js → ssr-data-14MXm7Pj.js} +17 -2
  46. package/dist/_chunks/ssr-data-14MXm7Pj.js.map +1 -0
  47. package/dist/_chunks/use-segment-params-ClyUNq4d.js +128 -0
  48. package/dist/_chunks/use-segment-params-ClyUNq4d.js.map +1 -0
  49. package/dist/_chunks/{walkers-BtTlKviE.js → walkers-BhhwI9TD.js} +21 -87
  50. package/dist/_chunks/walkers-BhhwI9TD.js.map +1 -0
  51. package/dist/adapters/build-output-helper.d.ts +37 -0
  52. package/dist/adapters/build-output-helper.d.ts.map +1 -1
  53. package/dist/adapters/cloudflare-dev.js +1 -1
  54. package/dist/adapters/cloudflare-kv-cache.js +1 -1
  55. package/dist/adapters/cloudflare.d.ts.map +1 -1
  56. package/dist/adapters/cloudflare.js +1 -1
  57. package/dist/adapters/fs-identity.d.ts +64 -0
  58. package/dist/adapters/fs-identity.d.ts.map +1 -0
  59. package/dist/adapters/nitro.d.ts.map +1 -1
  60. package/dist/adapters/nitro.js +2 -3
  61. package/dist/adapters/nitro.js.map +1 -1
  62. package/dist/adapters/shared.d.ts +57 -1
  63. package/dist/adapters/shared.d.ts.map +1 -1
  64. package/dist/adapters/types.d.ts +13 -1
  65. package/dist/adapters/types.d.ts.map +1 -1
  66. package/dist/cache/fast-hash.d.ts +5 -0
  67. package/dist/cache/fast-hash.d.ts.map +1 -1
  68. package/dist/cache/index.js +1 -1
  69. package/dist/cli.js +2 -2
  70. package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -1
  71. package/dist/client/browser-entry/hydrate.d.ts +20 -9
  72. package/dist/client/browser-entry/hydrate.d.ts.map +1 -1
  73. package/dist/client/browser-entry/post-hydration.d.ts +4 -1
  74. package/dist/client/browser-entry/post-hydration.d.ts.map +1 -1
  75. package/dist/client/browser-entry/router-init.d.ts +3 -0
  76. package/dist/client/browser-entry/router-init.d.ts.map +1 -1
  77. package/dist/client/browser-entry/rsc-stream.d.ts +8 -0
  78. package/dist/client/browser-entry/rsc-stream.d.ts.map +1 -1
  79. package/dist/client/error-boundary.d.ts +1 -0
  80. package/dist/client/error-boundary.d.ts.map +1 -1
  81. package/dist/client/error-boundary.js +1 -162
  82. package/dist/client/history.d.ts +13 -6
  83. package/dist/client/history.d.ts.map +1 -1
  84. package/dist/client/index.js +18 -11
  85. package/dist/client/index.js.map +1 -1
  86. package/dist/client/internal.d.ts +4 -3
  87. package/dist/client/internal.d.ts.map +1 -1
  88. package/dist/client/internal.js +872 -305
  89. package/dist/client/internal.js.map +1 -1
  90. package/dist/client/link.d.ts.map +1 -1
  91. package/dist/client/navigation-api.d.ts +2 -2
  92. package/dist/client/navigation-commit.d.ts +71 -0
  93. package/dist/client/navigation-commit.d.ts.map +1 -0
  94. package/dist/client/navigation-context.d.ts +37 -20
  95. package/dist/client/navigation-context.d.ts.map +1 -1
  96. package/dist/client/navigation-root.d.ts +63 -23
  97. package/dist/client/navigation-root.d.ts.map +1 -1
  98. package/dist/client/params-context.d.ts +81 -0
  99. package/dist/client/params-context.d.ts.map +1 -0
  100. package/dist/client/router-effects.d.ts +129 -0
  101. package/dist/client/router-effects.d.ts.map +1 -0
  102. package/dist/client/router-lifecycle.d.ts +55 -0
  103. package/dist/client/router-lifecycle.d.ts.map +1 -0
  104. package/dist/client/router-pipeline.d.ts +84 -0
  105. package/dist/client/router-pipeline.d.ts.map +1 -0
  106. package/dist/client/router-ref.d.ts +1 -1
  107. package/dist/client/router-ref.d.ts.map +1 -1
  108. package/dist/client/router-skew.d.ts +21 -0
  109. package/dist/client/router-skew.d.ts.map +1 -0
  110. package/dist/client/router-types.d.ts +207 -0
  111. package/dist/client/router-types.d.ts.map +1 -0
  112. package/dist/client/router.d.ts +1 -182
  113. package/dist/client/router.d.ts.map +1 -1
  114. package/dist/client/rsc-fetch.d.ts +39 -16
  115. package/dist/client/rsc-fetch.d.ts.map +1 -1
  116. package/dist/client/segment-cache.d.ts +79 -34
  117. package/dist/client/segment-cache.d.ts.map +1 -1
  118. package/dist/client/ssr-data.d.ts +6 -0
  119. package/dist/client/ssr-data.d.ts.map +1 -1
  120. package/dist/client/stale-client.d.ts +69 -0
  121. package/dist/client/stale-client.d.ts.map +1 -0
  122. package/dist/client/state.d.ts +10 -1
  123. package/dist/client/state.d.ts.map +1 -1
  124. package/dist/client/top-loader.d.ts +2 -1
  125. package/dist/client/top-loader.d.ts.map +1 -1
  126. package/dist/client/unload-guard.d.ts +5 -0
  127. package/dist/client/unload-guard.d.ts.map +1 -1
  128. package/dist/client/use-cookie.d.ts.map +1 -1
  129. package/dist/client/use-router.d.ts +1 -1
  130. package/dist/client/use-segment-params.d.ts +18 -8
  131. package/dist/client/use-segment-params.d.ts.map +1 -1
  132. package/dist/cookies/index.js +3 -3
  133. package/dist/cookies/index.js.map +1 -1
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +915 -320
  136. package/dist/index.js.map +1 -1
  137. package/dist/plugin-context.d.ts +33 -1
  138. package/dist/plugin-context.d.ts.map +1 -1
  139. package/dist/plugins/adapter-build.d.ts.map +1 -1
  140. package/dist/plugins/build-manifest.d.ts +1 -1
  141. package/dist/plugins/build-manifest.d.ts.map +1 -1
  142. package/dist/plugins/entries.d.ts.map +1 -1
  143. package/dist/plugins/fonts.d.ts.map +1 -1
  144. package/dist/plugins/request-dep/analysis.d.ts +106 -0
  145. package/dist/plugins/request-dep/analysis.d.ts.map +1 -0
  146. package/dist/plugins/request-dep/index.d.ts +75 -0
  147. package/dist/plugins/request-dep/index.d.ts.map +1 -0
  148. package/dist/plugins/request-dep/origin.d.ts +61 -0
  149. package/dist/plugins/request-dep/origin.d.ts.map +1 -0
  150. package/dist/plugins/routing.d.ts +9 -0
  151. package/dist/plugins/routing.d.ts.map +1 -1
  152. package/dist/plugins/static-build.d.ts +149 -8
  153. package/dist/plugins/static-build.d.ts.map +1 -1
  154. package/dist/routing/codegen-types.d.ts +18 -0
  155. package/dist/routing/codegen-types.d.ts.map +1 -1
  156. package/dist/routing/codegen.d.ts.map +1 -1
  157. package/dist/routing/collision-probe.d.ts +104 -0
  158. package/dist/routing/collision-probe.d.ts.map +1 -0
  159. package/dist/routing/collision-spaces.d.ts +26 -0
  160. package/dist/routing/collision-spaces.d.ts.map +1 -0
  161. package/dist/routing/index.js +3 -3
  162. package/dist/routing/interception.d.ts +235 -6
  163. package/dist/routing/interception.d.ts.map +1 -1
  164. package/dist/routing/manifest-codegen.d.ts.map +1 -1
  165. package/dist/routing/scanner.d.ts.map +1 -1
  166. package/dist/routing/segment-classify.d.ts +33 -0
  167. package/dist/routing/segment-classify.d.ts.map +1 -1
  168. package/dist/routing/segment-keys.d.ts +95 -0
  169. package/dist/routing/segment-keys.d.ts.map +1 -0
  170. package/dist/routing/slot-placement.d.ts +48 -0
  171. package/dist/routing/slot-placement.d.ts.map +1 -0
  172. package/dist/routing/types.d.ts +1 -3
  173. package/dist/routing/types.d.ts.map +1 -1
  174. package/dist/routing/walkers.d.ts +6 -0
  175. package/dist/routing/walkers.d.ts.map +1 -1
  176. package/dist/search-params/define.d.ts +0 -6
  177. package/dist/search-params/define.d.ts.map +1 -1
  178. package/dist/search-params/index.js +176 -2
  179. package/dist/search-params/index.js.map +1 -1
  180. package/dist/segment-params/define.d.ts +0 -6
  181. package/dist/segment-params/define.d.ts.map +1 -1
  182. package/dist/segment-params/index.js +69 -1
  183. package/dist/segment-params/index.js.map +1 -0
  184. package/dist/server/actions.d.ts +6 -3
  185. package/dist/server/actions.d.ts.map +1 -1
  186. package/dist/server/als-registry.d.ts +2 -1
  187. package/dist/server/als-registry.d.ts.map +1 -1
  188. package/dist/server/build-manifest.d.ts +13 -1
  189. package/dist/server/build-manifest.d.ts.map +1 -1
  190. package/dist/server/chain-url-parts.d.ts +82 -0
  191. package/dist/server/chain-url-parts.d.ts.map +1 -0
  192. package/dist/server/children-interception.d.ts +49 -0
  193. package/dist/server/children-interception.d.ts.map +1 -0
  194. package/dist/server/default-status-page.d.ts +45 -0
  195. package/dist/server/default-status-page.d.ts.map +1 -0
  196. package/dist/server/deny-boundary.d.ts +4 -7
  197. package/dist/server/deny-boundary.d.ts.map +1 -1
  198. package/dist/server/deny-renderer.d.ts +14 -3
  199. package/dist/server/deny-renderer.d.ts.map +1 -1
  200. package/dist/server/head-response.d.ts +35 -0
  201. package/dist/server/head-response.d.ts.map +1 -0
  202. package/dist/server/index.js +2 -2
  203. package/dist/server/internal.js +528 -373
  204. package/dist/server/internal.js.map +1 -1
  205. package/dist/server/param-coercion.d.ts +10 -1
  206. package/dist/server/param-coercion.d.ts.map +1 -1
  207. package/dist/server/pipeline-helpers.d.ts +0 -18
  208. package/dist/server/pipeline-helpers.d.ts.map +1 -1
  209. package/dist/server/pipeline-interception.d.ts +59 -9
  210. package/dist/server/pipeline-interception.d.ts.map +1 -1
  211. package/dist/server/pipeline-outcome.d.ts.map +1 -1
  212. package/dist/server/pipeline-phases.d.ts.map +1 -1
  213. package/dist/server/pipeline.d.ts +11 -0
  214. package/dist/server/pipeline.d.ts.map +1 -1
  215. package/dist/server/prebuilt-builder.d.ts.map +1 -1
  216. package/dist/server/primitives.d.ts +0 -12
  217. package/dist/server/primitives.d.ts.map +1 -1
  218. package/dist/server/publish-params.d.ts +33 -0
  219. package/dist/server/publish-params.d.ts.map +1 -0
  220. package/dist/server/request-context.d.ts +48 -0
  221. package/dist/server/request-context.d.ts.map +1 -1
  222. package/dist/server/route-element-builder.d.ts +32 -2
  223. package/dist/server/route-element-builder.d.ts.map +1 -1
  224. package/dist/server/route-handler.d.ts.map +1 -1
  225. package/dist/server/route-matcher.d.ts +13 -0
  226. package/dist/server/route-matcher.d.ts.map +1 -1
  227. package/dist/server/rsc-cache-key-guard.d.ts +78 -0
  228. package/dist/server/rsc-cache-key-guard.d.ts.map +1 -0
  229. package/dist/server/rsc-entry/api-handler.d.ts.map +1 -1
  230. package/dist/server/rsc-entry/error-renderer.d.ts +14 -2
  231. package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
  232. package/dist/server/rsc-entry/helpers.d.ts +2 -10
  233. package/dist/server/rsc-entry/helpers.d.ts.map +1 -1
  234. package/dist/server/rsc-entry/index.d.ts.map +1 -1
  235. package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
  236. package/dist/server/rsc-entry/rsc-payload.d.ts +3 -2
  237. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  238. package/dist/server/rsc-entry/rsc-stream.d.ts +3 -2
  239. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  240. package/dist/server/rsc-entry/ssr-renderer.d.ts +2 -0
  241. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  242. package/dist/server/sitemap-generator.d.ts.map +1 -1
  243. package/dist/server/skippable-prefix.d.ts +23 -0
  244. package/dist/server/skippable-prefix.d.ts.map +1 -0
  245. package/dist/server/slot-interception.d.ts +80 -0
  246. package/dist/server/slot-interception.d.ts.map +1 -0
  247. package/dist/server/slot-resolver.d.ts +70 -8
  248. package/dist/server/slot-resolver.d.ts.map +1 -1
  249. package/dist/server/ssr-bridge-types.d.ts +6 -0
  250. package/dist/server/ssr-bridge-types.d.ts.map +1 -1
  251. package/dist/server/ssr-entry.d.ts.map +1 -1
  252. package/dist/server/ssr-wrappers.d.ts +24 -13
  253. package/dist/server/ssr-wrappers.d.ts.map +1 -1
  254. package/dist/server/state-tree-diff.d.ts +6 -27
  255. package/dist/server/state-tree-diff.d.ts.map +1 -1
  256. package/dist/server/static-generator.d.ts +6 -0
  257. package/dist/server/static-generator.d.ts.map +1 -1
  258. package/dist/server/static-not-found.d.ts +52 -0
  259. package/dist/server/static-not-found.d.ts.map +1 -0
  260. package/dist/server/status-code-resolver.d.ts +3 -10
  261. package/dist/server/status-code-resolver.d.ts.map +1 -1
  262. package/dist/shared/als-slots.d.ts +41 -0
  263. package/dist/shared/als-slots.d.ts.map +1 -0
  264. package/dist/shared/base-path.d.ts +56 -0
  265. package/dist/shared/base-path.d.ts.map +1 -0
  266. package/dist/shared/param-value.d.ts +80 -0
  267. package/dist/shared/param-value.d.ts.map +1 -0
  268. package/dist/shared/payload-root.d.ts +108 -0
  269. package/dist/shared/payload-root.d.ts.map +1 -0
  270. package/dist/shared/rsc-cache-key.d.ts +163 -0
  271. package/dist/shared/rsc-cache-key.d.ts.map +1 -0
  272. package/dist/shared/rsc-error-envelope.d.ts +25 -0
  273. package/dist/shared/rsc-error-envelope.d.ts.map +1 -0
  274. package/dist/shared/rsc-manifest.d.ts +28 -0
  275. package/dist/shared/rsc-manifest.d.ts.map +1 -0
  276. package/dist/shared/rsc-payload-path.d.ts +42 -0
  277. package/dist/shared/rsc-payload-path.d.ts.map +1 -0
  278. package/dist/shared/segment-info.d.ts +59 -0
  279. package/dist/shared/segment-info.d.ts.map +1 -0
  280. package/dist/shared/slot-params.d.ts +51 -0
  281. package/dist/shared/slot-params.d.ts.map +1 -0
  282. package/dist/shared/static-platform-files.d.ts +71 -0
  283. package/dist/shared/static-platform-files.d.ts.map +1 -0
  284. package/dist/shims/navigation-client.d.ts +8 -19
  285. package/dist/shims/navigation-client.d.ts.map +1 -1
  286. package/dist/shims/navigation.d.ts +0 -1
  287. package/dist/shims/navigation.d.ts.map +1 -1
  288. package/docs/api/31-api-client.mdx +4 -2
  289. package/docs/learn/02-pages-and-layouts.mdx +1 -1
  290. package/docs/learn/11-error-handling.mdx +4 -3
  291. package/docs/learn/12-client-navigation.mdx +2 -2
  292. package/docs/learn/14-deploying.mdx +23 -0
  293. package/docs/more/01-advanced-routing.mdx +172 -2
  294. package/docs/more/04-metadata-and-fonts.mdx +1 -1
  295. package/package.json +2 -2
  296. package/src/adapters/build-output-helper.ts +116 -3
  297. package/src/adapters/cloudflare.ts +86 -11
  298. package/src/adapters/fs-identity.ts +156 -0
  299. package/src/adapters/nitro.ts +6 -6
  300. package/src/adapters/shared.ts +196 -21
  301. package/src/adapters/types.ts +13 -1
  302. package/src/cache/fast-hash.ts +5 -0
  303. package/src/client/browser-entry/action-dispatch.ts +9 -4
  304. package/src/client/browser-entry/hydrate.ts +40 -29
  305. package/src/client/browser-entry/index.ts +15 -1
  306. package/src/client/browser-entry/post-hydration.ts +10 -9
  307. package/src/client/browser-entry/router-init.ts +104 -48
  308. package/src/client/browser-entry/rsc-stream.ts +11 -2
  309. package/src/client/error-boundary.tsx +20 -15
  310. package/src/client/history.ts +13 -6
  311. package/src/client/internal.ts +4 -3
  312. package/src/client/link.tsx +55 -8
  313. package/src/client/navigation-api.ts +3 -3
  314. package/src/client/navigation-commit.ts +174 -0
  315. package/src/client/navigation-context.ts +40 -67
  316. package/src/client/navigation-root.tsx +326 -101
  317. package/src/client/params-context.ts +192 -0
  318. package/src/client/router-effects.ts +231 -0
  319. package/src/client/router-lifecycle.ts +288 -0
  320. package/src/client/router-pipeline.ts +389 -0
  321. package/src/client/router-ref.ts +1 -1
  322. package/src/client/router-skew.ts +30 -0
  323. package/src/client/router-types.ts +230 -0
  324. package/src/client/router.ts +242 -690
  325. package/src/client/rsc-fetch.ts +180 -122
  326. package/src/client/segment-cache.ts +121 -44
  327. package/src/client/ssr-data.ts +6 -0
  328. package/src/client/stale-client.ts +191 -0
  329. package/src/client/state.ts +14 -1
  330. package/src/client/top-loader.tsx +2 -1
  331. package/src/client/unload-guard.ts +34 -2
  332. package/src/client/use-cookie.ts +9 -2
  333. package/src/client/use-router.ts +1 -1
  334. package/src/client/use-segment-params.ts +41 -18
  335. package/src/index.ts +5 -1
  336. package/src/plugin-context.ts +34 -1
  337. package/src/plugins/adapter-build.ts +4 -0
  338. package/src/plugins/build-manifest.ts +34 -13
  339. package/src/plugins/entries.ts +4 -0
  340. package/src/plugins/fonts.ts +11 -8
  341. package/src/plugins/request-dep/analysis.ts +447 -0
  342. package/src/plugins/request-dep/index.ts +376 -0
  343. package/src/plugins/request-dep/origin.ts +310 -0
  344. package/src/plugins/routing.ts +60 -3
  345. package/src/plugins/static-build.ts +333 -63
  346. package/src/routing/codegen-types.ts +18 -0
  347. package/src/routing/codegen.ts +50 -10
  348. package/src/routing/collision-probe.ts +438 -0
  349. package/src/routing/collision-spaces.ts +281 -0
  350. package/src/routing/interception.ts +896 -50
  351. package/src/routing/manifest-codegen.ts +6 -9
  352. package/src/routing/scanner.ts +114 -113
  353. package/src/routing/segment-classify.ts +57 -0
  354. package/src/routing/segment-keys.ts +146 -0
  355. package/src/routing/slot-placement.ts +97 -0
  356. package/src/routing/types.ts +1 -3
  357. package/src/routing/walkers.ts +8 -0
  358. package/src/search-params/define.ts +6 -29
  359. package/src/segment-params/define.ts +4 -27
  360. package/src/server/action-handler.ts +3 -1
  361. package/src/server/actions.ts +6 -3
  362. package/src/server/als-registry.ts +2 -1
  363. package/src/server/build-manifest.ts +14 -1
  364. package/src/server/chain-url-parts.ts +163 -0
  365. package/src/server/children-interception.ts +115 -0
  366. package/src/server/default-status-page.ts +127 -0
  367. package/src/server/deny-boundary.ts +5 -31
  368. package/src/server/deny-renderer.ts +83 -22
  369. package/src/server/head-response.ts +54 -0
  370. package/src/server/param-coercion.ts +48 -18
  371. package/src/server/pipeline-helpers.ts +0 -45
  372. package/src/server/pipeline-interception.ts +81 -32
  373. package/src/server/pipeline-outcome.ts +3 -5
  374. package/src/server/pipeline-phases.ts +68 -16
  375. package/src/server/pipeline.ts +57 -10
  376. package/src/server/prebuilt-builder.ts +1 -7
  377. package/src/server/prebuilt-runtime.ts +4 -4
  378. package/src/server/primitives.ts +0 -18
  379. package/src/server/publish-params.ts +42 -0
  380. package/src/server/request-context.ts +97 -18
  381. package/src/server/route-element-builder.ts +89 -98
  382. package/src/server/route-handler.ts +8 -8
  383. package/src/server/route-matcher.ts +21 -9
  384. package/src/server/rsc-cache-key-guard.ts +170 -0
  385. package/src/server/rsc-entry/api-handler.ts +6 -8
  386. package/src/server/rsc-entry/error-renderer.ts +64 -25
  387. package/src/server/rsc-entry/helpers.ts +31 -16
  388. package/src/server/rsc-entry/index.ts +36 -28
  389. package/src/server/rsc-entry/render-route.ts +12 -7
  390. package/src/server/rsc-entry/revalidate-renderer.ts +1 -1
  391. package/src/server/rsc-entry/rsc-payload.ts +14 -25
  392. package/src/server/rsc-entry/rsc-stream.ts +4 -3
  393. package/src/server/rsc-entry/ssr-renderer.ts +13 -9
  394. package/src/server/sitemap-generator.ts +1 -7
  395. package/src/server/skippable-prefix.ts +92 -0
  396. package/src/server/slot-interception.ts +168 -0
  397. package/src/server/slot-resolver.ts +253 -156
  398. package/src/server/ssr-bridge-types.ts +6 -0
  399. package/src/server/ssr-entry.ts +12 -4
  400. package/src/server/ssr-wrappers.tsx +33 -32
  401. package/src/server/state-tree-diff.ts +14 -55
  402. package/src/server/static-generator.ts +67 -45
  403. package/src/server/static-not-found.ts +134 -0
  404. package/src/server/status-code-resolver.ts +4 -47
  405. package/src/shared/als-slots.ts +72 -0
  406. package/src/shared/base-path.ts +80 -0
  407. package/src/shared/param-value.ts +244 -0
  408. package/src/shared/payload-root.ts +151 -0
  409. package/src/shared/rsc-cache-key.ts +269 -0
  410. package/src/shared/rsc-error-envelope.ts +31 -0
  411. package/src/shared/rsc-manifest.ts +29 -0
  412. package/src/shared/rsc-payload-path.ts +45 -0
  413. package/src/shared/segment-info.ts +60 -0
  414. package/src/shared/slot-params.ts +111 -0
  415. package/src/shared/static-platform-files.ts +75 -0
  416. package/src/shims/navigation-client.ts +8 -26
  417. package/src/shims/navigation.ts +0 -4
  418. package/dist/_chunks/build-output-helper-DOGYFb_X.js +0 -196
  419. package/dist/_chunks/build-output-helper-DOGYFb_X.js.map +0 -1
  420. package/dist/_chunks/canonicalize-DQHyFClh.js.map +0 -1
  421. package/dist/_chunks/cli-schema-sync-D3naS3eH.js +0 -688
  422. package/dist/_chunks/cli-schema-sync-D3naS3eH.js.map +0 -1
  423. package/dist/_chunks/define-COtkxMRT.js +0 -191
  424. package/dist/_chunks/define-COtkxMRT.js.map +0 -1
  425. package/dist/_chunks/define-c4au4I9R.js +0 -82
  426. package/dist/_chunks/define-c4au4I9R.js.map +0 -1
  427. package/dist/_chunks/fast-hash-D6hIVt1Y.js.map +0 -1
  428. package/dist/_chunks/logger-AWfuX-KJ.js.map +0 -1
  429. package/dist/_chunks/navigation-root-bUDZLw74.js +0 -124
  430. package/dist/_chunks/navigation-root-bUDZLw74.js.map +0 -1
  431. package/dist/_chunks/plugin-context---kTF5v8.js.map +0 -1
  432. package/dist/_chunks/router-ref-CtmF-aPv.js.map +0 -1
  433. package/dist/_chunks/segment-classify-Byy425ng.js.map +0 -1
  434. package/dist/_chunks/ssr-data-BOWsq18U.js.map +0 -1
  435. package/dist/_chunks/use-segment-params-D1CzlgBo.js +0 -151
  436. package/dist/_chunks/use-segment-params-D1CzlgBo.js.map +0 -1
  437. package/dist/_chunks/walkers-BtTlKviE.js.map +0 -1
  438. package/dist/client/error-boundary.js.map +0 -1
  439. package/dist/plugins/request-dep.d.ts +0 -32
  440. package/dist/plugins/request-dep.d.ts.map +0 -1
  441. package/src/plugins/request-dep.ts +0 -499
@@ -19,9 +19,8 @@
19
19
  *
20
20
  * **Component chain (4xx):**
21
21
  * Pass 1 — status files (leaf → root): {status}.tsx → 4xx.tsx
22
- * Pass 2 — legacy compat (leaf → root): not-found.tsx / forbidden.tsx / unauthorized.tsx
23
- * Pass 3 — error.tsx (leaf → root)
24
- * Pass 4 — framework default (returns null)
22
+ * Pass 2 — error.tsx (leaf → root)
23
+ * Pass 3 — framework default (returns null)
25
24
  *
26
25
  * **JSON chain (4xx and 5xx):**
27
26
  * Pass 1 — json status files (leaf → root): {status}.json → {category}.json
@@ -33,7 +32,7 @@
33
32
  */
34
33
  import type { SegmentNode } from '../routing/types.js';
35
34
  /** How the status-code file was matched. */
36
- export type StatusFileKind = 'exact' | 'category' | 'legacy' | 'error';
35
+ export type StatusFileKind = 'exact' | 'category' | 'error';
37
36
  /** Response format family for status-code resolution. */
38
37
  export type StatusFileFormat = 'component' | 'json';
39
38
  /** Result of resolving a status-code file for a segment chain. */
@@ -58,12 +57,6 @@ export interface SlotDeniedResolution<TFile> {
58
57
  /** How the file was matched. */
59
58
  kind: SlotDeniedKind;
60
59
  }
61
- /**
62
- * Maps legacy file convention names to their corresponding HTTP status codes.
63
- * Only used in the 4xx component fallback chain. Exported so the in-tree
64
- * deny chain (deny-boundary.ts) uses the same mapping — see TIM-1081.
65
- */
66
- export declare const LEGACY_FILE_TO_STATUS: Record<string, number>;
67
60
  /**
68
61
  * Resolve the status-code file to render for a given HTTP status code.
69
62
  *
@@ -1 +1 @@
1
- {"version":3,"file":"status-code-resolver.d.ts","sourceRoot":"","sources":["../../src/server/status-code-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,4CAA4C;AAC5C,MAAM,MAAM,cAAc,GACtB,OAAO,GACP,UAAU,GACV,QAAQ,GACR,OAAO,CAAC;AAEZ,yDAAyD;AACzD,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,MAAM,CAAC;AAEpD,kEAAkE;AAClE,MAAM,WAAW,oBAAoB,CAAC,KAAK;IACzC,8BAA8B;IAC9B,IAAI,EAAE,KAAK,CAAC;IACZ,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,IAAI,EAAE,cAAc,CAAC;IACrB,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,0CAA0C;AAC1C,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElD,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB,CAAC,KAAK;IACzC,0DAA0D;IAC1D,IAAI,EAAE,KAAK,CAAC;IACZ,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,IAAI,EAAE,cAAc,CAAC;CACtB;AAID;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIxD,CAAC;AAkDF;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EACrC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAC3C,MAAM,GAAE,gBAA8B,GACrC,oBAAoB,CAAC,KAAK,CAAC,GAAG,IAAI,CAKpC;AA0FD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EACrC,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,GAC3B,oBAAoB,CAAC,KAAK,CAAC,GAAG,IAAI,CAYpC"}
1
+ {"version":3,"file":"status-code-resolver.d.ts","sourceRoot":"","sources":["../../src/server/status-code-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,4CAA4C;AAC5C,MAAM,MAAM,cAAc,GACtB,OAAO,GACP,UAAU,GACV,OAAO,CAAC;AAEZ,yDAAyD;AACzD,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,MAAM,CAAC;AAEpD,kEAAkE;AAClE,MAAM,WAAW,oBAAoB,CAAC,KAAK;IACzC,8BAA8B;IAC9B,IAAI,EAAE,KAAK,CAAC;IACZ,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,IAAI,EAAE,cAAc,CAAC;IACrB,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,0CAA0C;AAC1C,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElD,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB,CAAC,KAAK;IACzC,0DAA0D;IAC1D,IAAI,EAAE,KAAK,CAAC;IACZ,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,IAAI,EAAE,cAAc,CAAC;CACtB;AA4BD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EACrC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAC3C,MAAM,GAAE,gBAA8B,GACrC,oBAAoB,CAAC,KAAK,CAAC,GAAG,IAAI,CAKpC;AAoFD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EACrC,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,GAC3B,oBAAoB,CAAC,KAAK,CAAC,GAAG,IAAI,CAYpC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * ALS getter slots for the isomorphic `define*` modules.
3
+ *
4
+ * `searchParams.get()` and `segmentParams.get()` read per-request state out of
5
+ * `server/als-registry.ts`, but the modules that expose them are *isomorphic*:
6
+ * `search-params/define.ts` and `segment-params/define.ts` are imported by
7
+ * `'use client'` components for their hooks, so neither may import
8
+ * `node:async_hooks` — not even transitively, because the dep optimizer
9
+ * pre-bundles them before per-environment resolution runs. So the server
10
+ * registers its getter into a slot at module-init time and the define modules
11
+ * read the slot.
12
+ *
13
+ * The slots live here, in a module with **no imports at all**, rather than in
14
+ * the define modules themselves. That is the whole point: `request-context.ts`
15
+ * has to reach the setter, and when the setter lived in
16
+ * `search-params/define.ts` every server entry that touched
17
+ * `@timber-js/app/server` pulled that module — and therefore its `'use client'`
18
+ * import of `client/use-query-states.ts`, and therefore `nuqs` — into the
19
+ * server graph. `nuqs` named-imports `createContext`/`useContext` from React,
20
+ * which React's `react-server` export withholds, so `@timber-js/app`,
21
+ * `@timber-js/app/server`, `@timber-js/app/cookies` and `@timber-js/app/cache`
22
+ * all failed to instantiate under the `react-server` condition (TIM-1298).
23
+ * A leaf module breaks the edge without a registration ceremony on either side.
24
+ *
25
+ * Registration must be eager, not a call-time `await import()`: the async
26
+ * microtask a dynamic import introduces loses AsyncLocalStorage context inside
27
+ * React's RSC Flight renderer, which broke `getSearchParams()` in parallel slot
28
+ * pages (TIM-523).
29
+ *
30
+ * See design/23-search-params.md §"defineSearchParams — The Factory" and
31
+ * design/41-global-params.md.
32
+ */
33
+ /** @internal Called from `server/request-context.ts` at module init. */
34
+ export declare const _setGetSearchParamsFn: (fn: () => URLSearchParams) => void;
35
+ /** @internal Read by `search-params/define.ts` inside `.get()`. */
36
+ export declare const getSearchParamsFromAls: () => URLSearchParams;
37
+ /** @internal Called from `server/request-context.ts` at module init. */
38
+ export declare const _setGetSegmentParamsFn: (fn: () => Record<string, string | string[]>) => void;
39
+ /** @internal Read by `segment-params/define.ts` inside `.get()`. */
40
+ export declare const getSegmentParamsFromAls: () => Record<string, string | string[]>;
41
+ //# sourceMappingURL=als-slots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"als-slots.d.ts","sourceRoot":"","sources":["../../src/shared/als-slots.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAgCH,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,iCA7Bd,IA6BqC,CAAC;AAC1D,mEAAmE;AACnE,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAE3D,wEAAwE;AACxE,eAAO,MAAM,sBAAsB,mDAlCf,IAkCuC,CAAC;AAC5D,oEAAoE;AACpE,eAAO,MAAM,uBAAuB,yCAAwB,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Deployment base path — Vite's resolved `base`, as it applies to the URLs
3
+ * timber addresses at runtime.
4
+ *
5
+ * A static build deployed under a sub-path (`base: '/repo/'`, the GitHub
6
+ * Pages project-site layout) serves every generated file below that prefix:
7
+ * the document for `/about` lives at `/repo/about/index.html`, its flight
8
+ * payload at `/repo/_rsc/about/index.rsc`. The client works in *route space* — the
9
+ * paths the app declares — so both a strip (browser URL → route path) and a
10
+ * prefix (route-space path → URL) are needed, and this module owns both.
11
+ *
12
+ * Pure functions, no state: the caller supplies the base. `client/rsc-fetch.ts`
13
+ * holds the client's copy, set at bootstrap from `virtual:timber-config`.
14
+ *
15
+ * See design/11-platform.md §"Deploying under a non-root base" (TIM-1261).
16
+ */
17
+ /**
18
+ * True when `base` is document-relative (`'./'`, `'foo/'`) — it makes asset
19
+ * URLs resolve against whatever document loaded them, which says nothing
20
+ * about where the deployment sits, so no prefix can be computed from it.
21
+ */
22
+ export declare function isRelativeBase(base: string | undefined): boolean;
23
+ /**
24
+ * Normalize Vite's `base` into a path prefix. Always returns a value with a
25
+ * leading and trailing slash.
26
+ *
27
+ * Two forms carry no usable deployment prefix and normalize to `/`:
28
+ *
29
+ * - **An absolute-URL base** points *assets* at a CDN. The HTML documents and
30
+ * `.rsc` payloads are still served from the deployment origin, so their
31
+ * URLs stay root-relative. This is correct, not a degradation.
32
+ * - **A relative base** — see `isRelativeBase`. The static build warns,
33
+ * because SPA navigation then only works at the domain root.
34
+ */
35
+ export declare function normalizeBasePath(base: string | undefined): string;
36
+ /**
37
+ * Strip the base prefix from a browser pathname, returning the route-space
38
+ * path. With base `/repo/`: `/repo/about` → `/about`, `/repo/` and `/repo`
39
+ * → `/`.
40
+ *
41
+ * A pathname outside the base is returned unchanged. It cannot be served by
42
+ * this deployment at all, so there is no better answer than letting the
43
+ * resulting fetch 404 and the router hard-navigate — visibly wrong beats
44
+ * silently rewritten.
45
+ *
46
+ * @param base A normalized base (see `normalizeBasePath`).
47
+ */
48
+ export declare function stripBasePath(base: string, pathname: string): string;
49
+ /**
50
+ * Prefix a route-space, root-relative path with the base.
51
+ * `/_rsc/about/index.rsc` → `/repo/_rsc/about/index.rsc`.
52
+ *
53
+ * @param base A normalized base (see `normalizeBasePath`).
54
+ */
55
+ export declare function withBasePath(base: string, path: string): string;
56
+ //# sourceMappingURL=base-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-path.d.ts","sourceRoot":"","sources":["../../src/shared/base-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAGhE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAIlE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMpE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/D"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * The canonical form of a segment param value.
3
+ *
4
+ * `getSegmentParams()` on the server and `useSegmentParams()` on the client
5
+ * must return the same value — same prototype, same own properties. This
6
+ * module is how that is guaranteed, and the mechanism matters:
7
+ *
8
+ * **Both sides are images of one normalizer.** A codec's output is deep-cloned
9
+ * into a closed canonical domain at coercion time, and *that clone* is what the
10
+ * server returns and what goes on the wire. Server and client agree by
11
+ * construction, because neither holds the codec's original.
12
+ *
13
+ * That replaces predicting what React Flight would do to an arbitrary value.
14
+ * Prediction is what the previous design attempted and it cannot be finished:
15
+ * the question "will Flight's decode output be observably identical to this
16
+ * input?" ranges over every way a JS object can carry state that is not in its
17
+ * serialization — own keys, enumerability, symbols, holes, accessors,
18
+ * subclassing, exotic objects — and a `Proxy` defeats it outright, since a
19
+ * lying `getPrototypeOf` trap makes any static check unsound. Twelve review
20
+ * findings on PR #992 were each one more case of that set, and the set does
21
+ * not close.
22
+ *
23
+ * Normalizing closes it. The only remaining question is whether Flight
24
+ * round-trips the normalizer's *output range* — a finite domain we defined,
25
+ * covered by `tests/e2e/segment-params.test.ts` against the real serializer.
26
+ *
27
+ * ## The domain
28
+ *
29
+ * - `undefined`, `null`, `string`, `number`, `boolean`, `bigint`
30
+ * - null-prototype objects, own enumerable string keys only
31
+ * - dense arrays
32
+ * - `Date`, `Map`, `Set` — rebuilt, never the codec's instance
33
+ *
34
+ * ...and it is a **tree**: no value appears twice, and nothing is cyclic.
35
+ * That is not a simplification, it is the last prediction being removed.
36
+ * Flight encodes a `Date` by value at each occurrence but tracks plain objects
37
+ * for reference dedup, so preserving aliasing would carry it across for some
38
+ * types and drop it for others — and knowing which is exactly the kind of
39
+ * guess this design exists to stop making (codex, PR #992). A tree has no
40
+ * sharing to preserve or lose, so what Flight does about it is unobservable.
41
+ *
42
+ * Anything else throws, naming the param and what it was. Note what is *not*
43
+ * a rejection: a `Date` subclass normalizes to a `Date`, a decorated array to
44
+ * a plain one, a sparse array to a dense one, a getter to the value it
45
+ * returned. Those used to be twelve separate checks. They are not divergences
46
+ * any more, because the normalization happens once and both sides see its
47
+ * result — so they need no checks at all.
48
+ *
49
+ * Own properties that Flight would drop (non-enumerable, symbol-keyed) are
50
+ * dropped here instead, symmetrically. Prototype pollution is handled by the
51
+ * same pass: `__proto__` is never copied, and every object is
52
+ * `Object.create(null)` (design/13-security.md #36b/#36c, TIM-873).
53
+ *
54
+ * ## The prototype flip
55
+ *
56
+ * Flight refuses to serialize a null-prototype object, so the canonical form
57
+ * cannot go on the wire as-is. `toPlainRecord` and `toNullProtoRecord` flip
58
+ * the prototype on the way out and back. They are exact inverses and both
59
+ * total, because they only ever see canonical values — there is nothing to
60
+ * validate and no shape to special-case.
61
+ *
62
+ * See design/41-global-params.md §"Transport".
63
+ */
64
+ /**
65
+ * Deep-clone a codec's output into the canonical form, or throw.
66
+ *
67
+ * `seen` accumulates every object the walk has entered, and a second encounter
68
+ * is rejected. That is one rule for two things — a shared reference and a cycle
69
+ * are both "this object again" — and it is what keeps the result a tree.
70
+ */
71
+ export declare function normalizeParamValue(value: unknown, path?: string): unknown;
72
+ /**
73
+ * Canonical form → wire form. React Flight rejects a null prototype
74
+ * ("Classes or null prototypes are not supported"), so objects cross as plain
75
+ * ones and are restored on arrival.
76
+ */
77
+ export declare function toPlainRecord<T>(value: T): T;
78
+ /** Wire form → canonical form. The exact inverse of `toPlainRecord`. */
79
+ export declare function toNullProtoRecord<T>(value: T): T;
80
+ //# sourceMappingURL=param-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"param-value.d.ts","sourceRoot":"","sources":["../../src/shared/param-value.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAqBH;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,SAAK,GAAG,OAAO,CAEtE;AAmGD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAE5C;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAEhD"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * The shape of an RSC payload's root row.
3
+ *
4
+ * Every tree the server sends the browser is serialized as
5
+ * `{ tree, params, slotParams }` — the route's element tree, plus the coerced
6
+ * params it rendered with, as *siblings* rather than as a wrapper around the
7
+ * tree. See design/41-global-params.md §"Transport".
8
+ *
9
+ * Two reasons it is a sibling field rather than a provider inside the payload
10
+ * (TIM-1297, which is TIM-1294's mechanism corrected):
11
+ *
12
+ * 1. **A provider inside the payload cannot serve a partial navigation.** The
13
+ * client keeps the previous tree and splices the new payload in at the
14
+ * first updated `SegmentOutlet`, so the payload's own provider lands
15
+ * *below* the retained region — and the retained region's root is the
16
+ * *departing* route's provider, which therefore wins for every reader in a
17
+ * skipped layout. Wrapping something above it does not help: context
18
+ * resolves to the nearest provider, and the departing one is nearer.
19
+ * Params belong to the *navigation*, so the provider has to be owned by the
20
+ * client, above the merge point, and there must be exactly one.
21
+ *
22
+ * 2. **Element props are not readable at the instant the root resolves.**
23
+ * Flight outlines a React element's props and fills the record in after the
24
+ * root row resolves, so a reader that unblocks on the root sees `{}` — and
25
+ * since the object is filled *in place*, its identity never changes and any
26
+ * memo keyed on it caches the empty snapshot permanently. A plain model
27
+ * field has no such window: the root chunk stays blocked until everything
28
+ * it references has resolved.
29
+ *
30
+ * This module is the single declaration of that shape. The server builds roots
31
+ * through `server/publish-params.ts` and the client reads them through the
32
+ * helpers here — producer and consumer do not each describe the payload.
33
+ */
34
+ import type { SlotParamsRecord } from './slot-params.js';
35
+ /** The params published beside a tree. */
36
+ export interface PublishedParams {
37
+ /** The main route's coerced params. */
38
+ params: Record<string, string | string[]>;
39
+ /** Per-slot params, or null when the route rendered no slots with params. */
40
+ slotParams: SlotParamsRecord | null;
41
+ }
42
+ /**
43
+ * Params ready to publish: settled, or a promise the root provider suspends on.
44
+ *
45
+ * Both forms exist on purpose. The hydration path cannot await — `hydrateRoot`
46
+ * has to be called before the inline Flight stream has necessarily produced
47
+ * the root row — so it hands over the promise and suspends exactly where React
48
+ * was already going to suspend on the tree. Every other path settles it inside
49
+ * the navigation transition first, which is what keeps a decode failure inside
50
+ * the app's own error boundaries instead of above them (TIM-1297).
51
+ */
52
+ export type ParamsSource = PublishedParams | Promise<PublishedParams>;
53
+ /** The root row of an RSC payload. */
54
+ export interface RscPayloadRoot extends PublishedParams {
55
+ /** The route's element tree. */
56
+ tree: unknown;
57
+ }
58
+ /**
59
+ * What a reader gets when the value it was handed is not a payload root.
60
+ *
61
+ * In the browser this is unreachable for a real response: all four producers
62
+ * of a route payload go through `withPublishedParams`, and a client talking to
63
+ * a different build is answered with 204 at Stage 1c
64
+ * (`server/pipeline-phases.ts`) before any payload exists. It is reachable in
65
+ * the router's test/fallback path, where `decodeRsc` is absent and the
66
+ * "payload" is the raw response text.
67
+ */
68
+ export declare const NO_PUBLISHED_PARAMS: PublishedParams;
69
+ /**
70
+ * Read the params published beside a tree.
71
+ *
72
+ * Accepts a payload root *or* a `PublishedParams` already split off one, so
73
+ * the client can pre-resolve on the navigation path and still hand the same
74
+ * value to the same provider. Never throws.
75
+ */
76
+ export declare function readPublishedParams(source: unknown): PublishedParams;
77
+ /**
78
+ * Read the renderable tree out of a payload root.
79
+ *
80
+ * Returns the value unchanged when it is not a root — the router's fallback
81
+ * path stores raw response text under the same name, and a test asserting on
82
+ * that text should see the text.
83
+ */
84
+ export declare function readPayloadTree(root: unknown): unknown;
85
+ /** A decoded payload, split into the two things the client does with it. */
86
+ export interface SplitPayload {
87
+ /** The renderable tree — an element, or a thenable React suspends on. */
88
+ tree: unknown;
89
+ /**
90
+ * The params published beside it. Settled when the root already is, so the
91
+ * hydration path can render without an extra await.
92
+ *
93
+ * **Never rejects.** A decode failure has to surface where React renders
94
+ * `tree`, so the error boundary *around the tree* catches it. Rejecting here
95
+ * too would take down the provider above every boundary in the app, turning
96
+ * a contained failure into a blank page (TIM-1297).
97
+ */
98
+ params: ParamsSource;
99
+ }
100
+ /**
101
+ * Split a decoded payload root into its tree and its params.
102
+ *
103
+ * Accepts a settled root or a thenable of one, and preserves which it was: a
104
+ * settled root splits synchronously, so no code path gains a suspend point it
105
+ * did not already have.
106
+ */
107
+ export declare function splitPayloadRoot(root: unknown): SplitPayload;
108
+ //# sourceMappingURL=payload-root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload-root.d.ts","sourceRoot":"","sources":["../../src/shared/payload-root.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC1C,6EAA6E;IAC7E,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACrC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAEtE,sCAAsC;AACtC,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,gCAAgC;IAChC,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAAkD,CAAC;AAarF;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,eAAe,CAGpE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAKtD;AAED,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,IAAI,EAAE,OAAO,CAAC;IACd;;;;;;;;OAQG;IACH,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,CAgB5D"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * The `_rsc` payload cache key — derived identically on both sides.
3
+ *
4
+ * The client puts this in the payload URL so the document and its Flight
5
+ * payload occupy different cache keys (TIM-1268). The server recomputes it
6
+ * from the received headers so a request cannot claim one client's key while
7
+ * sending another client's headers — see `server/rsc-cache-key-guard.ts`.
8
+ * Both sides must agree exactly, which is why the derivation lives here and
9
+ * not in either one.
10
+ *
11
+ * Isomorphic: no server or client imports. The browser bundle audit
12
+ * (`tests/client-bundle-audit.test.ts`) enforces the client half of that.
13
+ *
14
+ * See design/19-client-navigation.md §"The `_rsc` cache key".
15
+ */
16
+ /**
17
+ * The request headers that vary an RSC payload response, in canonical
18
+ * casing — this list is also emitted verbatim as the response's `Vary`
19
+ * tokens (`server/pipeline.ts`), since "what varies the response" is one
20
+ * question with one answer, not two lists that happen to agree.
21
+ *
22
+ * This list is the contract, and it is enforced rather than trusted:
23
+ * `tests/rsc-cache-key.test.ts` asserts that the header names
24
+ * `buildRscHeaders()` can emit are exactly this set. A header added to the
25
+ * request without being added here fails that test, because a varying input
26
+ * outside the key is precisely the cache-poisoning hazard the key exists to
27
+ * close.
28
+ *
29
+ * **No credentials, session identifiers, or user-supplied content may be
30
+ * added.** Every value here is hashed into a URL, and URLs are logged by
31
+ * proxies, CDNs, and origin access logs. `fnv1aHash` is a cache-key hash,
32
+ * not a KDF — a low-entropy secret would be recoverable by brute force.
33
+ * Authentication travels on cookies, which never enter the key.
34
+ */
35
+ export declare const RSC_KEY_HEADERS: readonly ['Accept', 'X-Timber-State-Tree', 'X-Timber-URL', 'X-Timber-Deployment-Id'];
36
+ /**
37
+ * Whether a value could be a key this module produced.
38
+ *
39
+ * `_rsc` is not a reserved parameter name — an application may already use
40
+ * it for its own search state, including for a value that happens to look
41
+ * like a digest. Anything without the `KEY_PREFIX` is therefore application
42
+ * data, not a claim on a payload cache key, and the origin guard leaves it
43
+ * alone rather than penalizing the response.
44
+ *
45
+ * Derived from `KEY_PREFIX` and `KEY_HEX_LENGTH` rather than spelled again,
46
+ * so the shape cannot drift from the digest that has to satisfy it.
47
+ *
48
+ * Ignoring a malformed value costs no protection: clients only ever send
49
+ * well-formed keys, so a URL bearing a malformed one is an address no
50
+ * legitimate request will ever ask for, and nothing can be poisoned at an
51
+ * address nobody reads.
52
+ */
53
+ export declare function isRscCacheKeyShape(value: string): boolean;
54
+ /**
55
+ * The query parameter carrying the payload cache key.
56
+ *
57
+ * Spelled here rather than at each of the four places that read or write it
58
+ * — the client that appends it, the origin guard that validates it, and the
59
+ * strip below — because it is a wire contract between two independent
60
+ * implementations, exactly like the digest itself.
61
+ */
62
+ export declare const RSC_KEY_PARAM = "_rsc";
63
+ /**
64
+ * Remove framework-issued `_rsc` values from a raw query string.
65
+ *
66
+ * Only values matching `isRscCacheKeyShape` are removed. `_rsc` is not a
67
+ * reserved name (see that function), so `/search?_rsc=foo` is application
68
+ * state and survives — the same exemption the origin guard applies, derived
69
+ * from the same predicate so the two cannot disagree about what "ours"
70
+ * means.
71
+ *
72
+ * Operates on the raw string rather than round-tripping through
73
+ * `URLSearchParams`, so every surviving pair keeps its original bytes.
74
+ * Re-serializing would rewrite `?b` as `?b=` and `?a=%7E` as `?a=~` on RSC
75
+ * navigations only, which is the same class of inconsistency this function
76
+ * exists to remove.
77
+ *
78
+ * Matching decodes the name, because `?%5Frsc=<key>` is a `_rsc` parameter
79
+ * as far as `URLSearchParams` is concerned — the same reasoning as the
80
+ * guard's fast path.
81
+ *
82
+ * @param search - `url.search`, with or without the leading `?`.
83
+ * @returns The query string including a leading `?`, or `''` if empty.
84
+ */
85
+ export declare function stripRscCacheKey(search: string): string;
86
+ /** A request's search state as application code should see it. */
87
+ export interface AppVisibleSearch {
88
+ /** Parsed params, with the framework's cache key removed. */
89
+ params: URLSearchParams;
90
+ /** The matching raw query string — `''` or `?…`. */
91
+ search: string;
92
+ }
93
+ /**
94
+ * The search state application code sees, for any request URL.
95
+ *
96
+ * The `_rsc` key rides on the payload URL of every RSC navigation and on no
97
+ * other request, so reading search params straight off `req.url` makes the
98
+ * same page observe different search state depending on whether it was
99
+ * reached by a full load or a client navigation — and lets the cache key
100
+ * leak into whatever the page builds from it: a canonical URL, a pagination
101
+ * link, an analytics payload (TIM-1272).
102
+ *
103
+ * Every application-facing derivation of search state goes through here.
104
+ * `params` and `search` are returned together, from one strip, because they
105
+ * are two views of one answer and were previously two expressions that had
106
+ * to agree.
107
+ *
108
+ * The raw request URL is deliberately untouched: `server/rsc-cache-key-guard.ts`
109
+ * still reads the parameter from `req.url` to bind the key to the request.
110
+ */
111
+ export declare function appVisibleSearch(url: URL): AppVisibleSearch;
112
+ /**
113
+ * Reads a header value by name. Must be case-insensitive — `Headers.get()`
114
+ * already is, and `recordLookup` below makes a plain record so.
115
+ */
116
+ export type HeaderLookup = (name: string) => string | null | undefined;
117
+ /**
118
+ * Compute the `_rsc` cache key for a request.
119
+ *
120
+ * Absent headers are omitted rather than sent as empty, so "header missing"
121
+ * and "header present but empty" produce different keys.
122
+ *
123
+ * Values are length-prefixed rather than delimiter-separated. Any delimiter
124
+ * can be forged by a value that contains it: with a `\0` separator, an
125
+ * `accept` of `a\nx-timber-url\0b` serializes identically to an `accept` of
126
+ * `a` alongside an `x-timber-url` of `b`, which would let one header claim
127
+ * another's key. HTTP forbids control characters in header values and both
128
+ * `fetch()` and the server runtime reject them, so this is defense in depth
129
+ * — but a length prefix is unambiguous for *any* content, which is a
130
+ * property worth having in a function whose whole job is to be agreed on by
131
+ * two independent implementations.
132
+ *
133
+ * SHA-256, truncated to 128 bits. A fast non-cryptographic hash is the
134
+ * obvious choice for a cache key and is the wrong one here: the origin
135
+ * *compares* this value against a recomputed one, which makes it a check.
136
+ * FNV-1a — used for timber's other cache keys — is a multiply-xor over a
137
+ * fixed field, so an attacker controlling a few bytes of any input (their
138
+ * own `X-Timber-URL`, say) can solve for a chosen digest rather than search
139
+ * for one, and forge a key belonging to somebody else.
140
+ *
141
+ * Returns `null` when no digest is available — `crypto.subtle` is absent in
142
+ * non-secure browsing contexts (plain `http://` on a LAN address). Callers
143
+ * must treat that as "no key", never as "key matches": the client omits the
144
+ * parameter and the server refuses to share-cache. That returns those
145
+ * clients to the pre-TIM-1268 posture, where `Vary` alone separates HTML
146
+ * from Flight — acceptable, because a non-secure origin has no shared-CDN
147
+ * caching story to protect in the first place.
148
+ */
149
+ export declare function rscCacheKey(lookup: HeaderLookup): Promise<string | null>;
150
+ /**
151
+ * An unverifiable stand-in key, for the one case where the digest cannot be
152
+ * computed: `crypto.subtle` is absent in non-secure browsing contexts.
153
+ * `crypto.getRandomValues` is not gated that way, so it is available exactly
154
+ * where the digest is not.
155
+ *
156
+ * Carries `KEY_PREFIX` like any other key, so the origin reads it as a claim
157
+ * it cannot verify — and refuses to share-cache the response — rather than
158
+ * exempting it as application data. Lives here so the prefix has one home.
159
+ */
160
+ export declare function randomRscCacheKey(): string;
161
+ /** Build a case-insensitive lookup over a plain header record. */
162
+ export declare function recordLookup(headers: Record<string, string>): HeaderLookup;
163
+ //# sourceMappingURL=rsc-cache-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsc-cache-key.d.ts","sourceRoot":"","sources":["../../src/shared/rsc-cache-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgCH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,YAC1B,QAAQ,EACR,qBAAqB,EACrB,cAAc,EACd,wBAAwB,CAChB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIzD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,SAAS,CAAC;AAoBpC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUvD;AAED,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,MAAM,EAAE,eAAe,CAAC;IACxB,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,gBAAgB,CAG3D;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiB9E;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAI1C;AAED,kEAAkE;AAClE,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,YAAY,CAM1E"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The hard-navigate error envelope shared by the server and the client router.
3
+ *
4
+ * A client-navigation (RSC) request cannot carry an error *page* — the response
5
+ * body must be Flight data or the decoder crashes. Instead the server answers
6
+ * with this envelope: an `X-Timber-Error: 1` header and a minimal JSON body.
7
+ * The client treats it as "give up on SPA navigation and hard-navigate", and
8
+ * the resulting document request renders the real error page as HTML.
9
+ *
10
+ * The header name lives here so the four server producers and the single
11
+ * client consumer cannot drift apart. See design/10-error-handling.md
12
+ * §"Error Page Rendering for Client Navigation".
13
+ */
14
+ /** Header the client checks to decide whether to hard-navigate. */
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
+ //# sourceMappingURL=rsc-error-envelope.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The RSC manifest — the shape the static build writes and the client reads.
3
+ *
4
+ * In `output: 'static'` there is no server at navigation time and a generated
5
+ * `.rsc` file carries no response headers, so anything a navigation would
6
+ * normally learn from headers has to be inlined here at build time.
7
+ *
8
+ * Route params used to be such a thing (TIM-1255, TIM-1285). They are not any
9
+ * more: they ride inside the payload, on its root row, so the
10
+ * `.rsc` file carries them the same way it carries the tree, and the static
11
+ * path stopped needing a special case (TIM-1294). What is left is the content
12
+ * hash, which genuinely cannot live inside the file it names.
13
+ *
14
+ * Declared once rather than in each half. The producer
15
+ * (`plugins/static-build.ts`) and the consumer (`client/rsc-fetch.ts`) each
16
+ * had their own copy, and the copies drifted the moment a field was added to
17
+ * one — a static SPA navigation then committed `null` for the field the
18
+ * producer was faithfully writing.
19
+ *
20
+ * Isomorphic: no server, client, or build-time imports.
21
+ */
22
+ export interface RscManifestEntry {
23
+ /** The content-hashed URL the payload actually lives at, in route space. */
24
+ url: string;
25
+ }
26
+ /** Keyed by the unhashed `/_rsc/*.rsc` path. */
27
+ export type RscManifest = Record<string, RscManifestEntry>;
28
+ //# sourceMappingURL=rsc-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsc-manifest.d.ts","sourceRoot":"","sources":["../../src/shared/rsc-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;CACb;AAED,gDAAgD;AAChD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Where a route's Flight payload lives in `output: 'static'`.
3
+ *
4
+ * The static build writes these files and the client fetches them, so the two
5
+ * halves must agree byte for byte. They used to state the naming rule
6
+ * separately — `plugins/static-build.ts` for the write and
7
+ * `client/rsc-fetch.ts` for the read — which is a duplicate representation with
8
+ * nothing checking it. One function now, called by both.
9
+ *
10
+ * ## The shape
11
+ *
12
+ * The payload path mirrors the HTML path: every route gets a directory and the
13
+ * artifact is the `index` inside it.
14
+ *
15
+ * / → /_rsc/index.rsc (cf. index.html)
16
+ * /about → /_rsc/about/index.rsc (cf. about/index.html)
17
+ * /blog/hello → /_rsc/blog/hello/index.rsc
18
+ *
19
+ * That shape is **injective**, which the previous one (`/about` →
20
+ * `/_rsc/about.rsc`, root → `/_rsc/index.rsc`) was not: a site with both `/`
21
+ * and `/index` produced two payloads at `_rsc/index.rsc`, and the second write
22
+ * won silently — a client navigation to one route was served the other route's
23
+ * payload, same content type and same shape, undetectable downstream
24
+ * (TIM-1266).
25
+ *
26
+ * Injectivity holds because two distinct non-root routes give distinct
27
+ * directories, and the root's `/_rsc/index.rsc` has no directory component for
28
+ * a non-root route to occupy — reaching it would need an empty route path,
29
+ * which is not a route.
30
+ *
31
+ * Isomorphic: no server, client, or build-time imports.
32
+ */
33
+ /**
34
+ * The route-space path of a route's static Flight payload.
35
+ *
36
+ * @param routePath A route-space pathname: leading slash, no deployment base,
37
+ * no query or fragment, no trailing slash (except the root `/`). Callers
38
+ * normalize; this function does not, because the two callers normalize from
39
+ * different sources (a browser URL, a build-time route entry).
40
+ */
41
+ export declare function rscPayloadPath(routePath: string): string;
42
+ //# sourceMappingURL=rsc-payload-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsc-payload-path.d.ts","sourceRoot":"","sources":["../../src/shared/rsc-payload-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGxD"}