@timber-js/app 0.2.0-alpha.15 → 0.2.0-alpha.150

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 (854) hide show
  1. package/LICENSE +8 -0
  2. package/dist/_chunks/actions-a0RczDnB.js +1106 -0
  3. package/dist/_chunks/actions-a0RczDnB.js.map +1 -0
  4. package/dist/_chunks/build-output-helper-B20ZuTSA.js +102 -0
  5. package/dist/_chunks/build-output-helper-B20ZuTSA.js.map +1 -0
  6. package/dist/_chunks/cache-api-Co-yI-gP.js +424 -0
  7. package/dist/_chunks/cache-api-Co-yI-gP.js.map +1 -0
  8. package/dist/_chunks/{metadata-routes-Cjmvi3rQ.js → canonicalize-P41GR6tY.js} +94 -18
  9. package/dist/_chunks/canonicalize-P41GR6tY.js.map +1 -0
  10. package/dist/_chunks/cli-schema-sync-DJDdyEae.js +629 -0
  11. package/dist/_chunks/cli-schema-sync-DJDdyEae.js.map +1 -0
  12. package/dist/_chunks/cli-schema-sync-D_IhHEUW.js +2 -0
  13. package/dist/_chunks/codec-registry-oOUxugz3.js +21 -0
  14. package/dist/_chunks/codec-registry-oOUxugz3.js.map +1 -0
  15. package/dist/_chunks/define-Bssfp6ot.js +82 -0
  16. package/dist/_chunks/define-Bssfp6ot.js.map +1 -0
  17. package/dist/_chunks/define-CFmvb4Bt.js +203 -0
  18. package/dist/_chunks/define-CFmvb4Bt.js.map +1 -0
  19. package/dist/_chunks/fast-hash-D6hIVt1Y.js +36 -0
  20. package/dist/_chunks/fast-hash-D6hIVt1Y.js.map +1 -0
  21. package/dist/_chunks/format-CfwjgPz9.js +14 -0
  22. package/dist/_chunks/format-CfwjgPz9.js.map +1 -0
  23. package/dist/_chunks/href-validation-FiA_rToW.js +141 -0
  24. package/dist/_chunks/href-validation-FiA_rToW.js.map +1 -0
  25. package/dist/_chunks/logger-CM0clugc.js +645 -0
  26. package/dist/_chunks/logger-CM0clugc.js.map +1 -0
  27. package/dist/_chunks/navigation-root-bUDZLw74.js +124 -0
  28. package/dist/_chunks/navigation-root-bUDZLw74.js.map +1 -0
  29. package/dist/_chunks/plugin-context-DurqFBuY.js +2 -0
  30. package/dist/_chunks/plugin-context-GfDWsdd2.js +268 -0
  31. package/dist/_chunks/plugin-context-GfDWsdd2.js.map +1 -0
  32. package/dist/_chunks/registry-DbJPKoBp.js +20 -0
  33. package/dist/_chunks/registry-DbJPKoBp.js.map +1 -0
  34. package/dist/_chunks/resolve-schema-3iUvBV5T.js +50 -0
  35. package/dist/_chunks/resolve-schema-3iUvBV5T.js.map +1 -0
  36. package/dist/_chunks/router-ref-CtmF-aPv.js +28 -0
  37. package/dist/_chunks/router-ref-CtmF-aPv.js.map +1 -0
  38. package/dist/_chunks/schema-bridge-BY3QLBL7.js +119 -0
  39. package/dist/_chunks/schema-bridge-BY3QLBL7.js.map +1 -0
  40. package/dist/_chunks/segment-classify-CDDRVKs7.js +137 -0
  41. package/dist/_chunks/segment-classify-CDDRVKs7.js.map +1 -0
  42. package/dist/_chunks/segment-context-ZDnXDkbz.js +34 -0
  43. package/dist/_chunks/segment-context-ZDnXDkbz.js.map +1 -0
  44. package/dist/_chunks/{ssr-data-MjmprTmO.js → ssr-data-BOWsq18U.js} +1 -1
  45. package/dist/_chunks/ssr-data-BOWsq18U.js.map +1 -0
  46. package/dist/_chunks/tree-match-D2l830j2.js +102 -0
  47. package/dist/_chunks/tree-match-D2l830j2.js.map +1 -0
  48. package/dist/_chunks/{use-query-states-D5KaffOK.js → use-query-states-CbeQmext.js} +7 -20
  49. package/dist/_chunks/use-query-states-CbeQmext.js.map +1 -0
  50. package/dist/_chunks/use-segment-params-D1CzlgBo.js +151 -0
  51. package/dist/_chunks/use-segment-params-D1CzlgBo.js.map +1 -0
  52. package/dist/_chunks/validation-taUkvA4Q.js +113 -0
  53. package/dist/_chunks/validation-taUkvA4Q.js.map +1 -0
  54. package/dist/_chunks/walkers-DvWDj453.js +790 -0
  55. package/dist/_chunks/walkers-DvWDj453.js.map +1 -0
  56. package/dist/adapters/build-output-helper.d.ts +28 -0
  57. package/dist/adapters/build-output-helper.d.ts.map +1 -0
  58. package/dist/adapters/cloudflare-dev.d.ts +109 -0
  59. package/dist/adapters/cloudflare-dev.d.ts.map +1 -0
  60. package/dist/adapters/cloudflare-dev.js +73 -0
  61. package/dist/adapters/cloudflare-dev.js.map +1 -0
  62. package/dist/adapters/cloudflare-kv-cache.d.ts +64 -0
  63. package/dist/adapters/cloudflare-kv-cache.d.ts.map +1 -0
  64. package/dist/adapters/cloudflare-kv-cache.js +117 -0
  65. package/dist/adapters/cloudflare-kv-cache.js.map +1 -0
  66. package/dist/adapters/cloudflare.d.ts +142 -20
  67. package/dist/adapters/cloudflare.d.ts.map +1 -1
  68. package/dist/adapters/cloudflare.js +150 -64
  69. package/dist/adapters/cloudflare.js.map +1 -1
  70. package/dist/adapters/compress-module.d.ts +5 -4
  71. package/dist/adapters/compress-module.d.ts.map +1 -1
  72. package/dist/adapters/nitro.d.ts +17 -3
  73. package/dist/adapters/nitro.d.ts.map +1 -1
  74. package/dist/adapters/nitro.js +146 -147
  75. package/dist/adapters/nitro.js.map +1 -1
  76. package/dist/adapters/shared.d.ts +16 -0
  77. package/dist/adapters/shared.d.ts.map +1 -0
  78. package/dist/cache/cache-api.d.ts +24 -0
  79. package/dist/cache/cache-api.d.ts.map +1 -0
  80. package/dist/cache/handler-store.d.ts +31 -0
  81. package/dist/cache/handler-store.d.ts.map +1 -0
  82. package/dist/cache/index.d.ts +25 -7
  83. package/dist/cache/index.d.ts.map +1 -1
  84. package/dist/cache/index.js +100 -240
  85. package/dist/cache/index.js.map +1 -1
  86. package/dist/cache/invalidation-epoch.d.ts +43 -0
  87. package/dist/cache/invalidation-epoch.d.ts.map +1 -0
  88. package/dist/cache/redis-handler.d.ts +85 -8
  89. package/dist/cache/redis-handler.d.ts.map +1 -1
  90. package/dist/cache/singleflight.d.ts +18 -1
  91. package/dist/cache/singleflight.d.ts.map +1 -1
  92. package/dist/cache/sizeof.d.ts +22 -0
  93. package/dist/cache/sizeof.d.ts.map +1 -0
  94. package/dist/cache/stable-stringify.d.ts +9 -0
  95. package/dist/cache/stable-stringify.d.ts.map +1 -1
  96. package/dist/cache/timber-cache.d.ts +20 -10
  97. package/dist/cache/timber-cache.d.ts.map +1 -1
  98. package/dist/cli-schema-sync.d.ts +59 -0
  99. package/dist/cli-schema-sync.d.ts.map +1 -0
  100. package/dist/cli.d.ts +26 -2
  101. package/dist/cli.d.ts.map +1 -1
  102. package/dist/cli.js +70 -33
  103. package/dist/cli.js.map +1 -1
  104. package/dist/client/browser-dev.d.ts +34 -1
  105. package/dist/client/browser-dev.d.ts.map +1 -1
  106. package/dist/client/browser-entry/action-dispatch.d.ts +17 -0
  107. package/dist/client/browser-entry/action-dispatch.d.ts.map +1 -0
  108. package/dist/client/browser-entry/hmr.d.ts +21 -0
  109. package/dist/client/browser-entry/hmr.d.ts.map +1 -0
  110. package/dist/client/browser-entry/hydrate.d.ts +46 -0
  111. package/dist/client/browser-entry/hydrate.d.ts.map +1 -0
  112. package/dist/client/browser-entry/index.d.ts +29 -0
  113. package/dist/client/browser-entry/index.d.ts.map +1 -0
  114. package/dist/client/browser-entry/post-hydration.d.ts +26 -0
  115. package/dist/client/browser-entry/post-hydration.d.ts.map +1 -0
  116. package/dist/client/browser-entry/router-init.d.ts +26 -0
  117. package/dist/client/browser-entry/router-init.d.ts.map +1 -0
  118. package/dist/client/browser-entry/rsc-stream.d.ts +24 -0
  119. package/dist/client/browser-entry/rsc-stream.d.ts.map +1 -0
  120. package/dist/client/browser-entry/scroll.d.ts +28 -0
  121. package/dist/client/browser-entry/scroll.d.ts.map +1 -0
  122. package/dist/client/error-boundary.d.ts +12 -5
  123. package/dist/client/error-boundary.d.ts.map +1 -1
  124. package/dist/client/error-boundary.js +47 -10
  125. package/dist/client/error-boundary.js.map +1 -1
  126. package/dist/client/error-reconstituter.d.ts +61 -0
  127. package/dist/client/error-reconstituter.d.ts.map +1 -0
  128. package/dist/client/form.d.ts +16 -27
  129. package/dist/client/form.d.ts.map +1 -1
  130. package/dist/client/history.d.ts +11 -3
  131. package/dist/client/history.d.ts.map +1 -1
  132. package/dist/client/index.d.ts +10 -24
  133. package/dist/client/index.d.ts.map +1 -1
  134. package/dist/client/index.js +183 -1134
  135. package/dist/client/index.js.map +1 -1
  136. package/dist/client/internal.d.ts +19 -0
  137. package/dist/client/internal.d.ts.map +1 -0
  138. package/dist/client/internal.js +900 -0
  139. package/dist/client/internal.js.map +1 -0
  140. package/dist/client/link.d.ts +69 -60
  141. package/dist/client/link.d.ts.map +1 -1
  142. package/dist/client/navigation-api-types.d.ts +90 -0
  143. package/dist/client/navigation-api-types.d.ts.map +1 -0
  144. package/dist/client/navigation-api.d.ts +122 -0
  145. package/dist/client/navigation-api.d.ts.map +1 -0
  146. package/dist/client/navigation-context.d.ts +3 -2
  147. package/dist/client/navigation-context.d.ts.map +1 -1
  148. package/dist/client/navigation-root.d.ts +119 -0
  149. package/dist/client/navigation-root.d.ts.map +1 -0
  150. package/dist/client/nuqs-adapter.d.ts +1 -1
  151. package/dist/client/nuqs-adapter.d.ts.map +1 -1
  152. package/dist/client/router-ref.d.ts +1 -1
  153. package/dist/client/router.d.ts +86 -10
  154. package/dist/client/router.d.ts.map +1 -1
  155. package/dist/client/rsc-fetch.d.ts +46 -3
  156. package/dist/client/rsc-fetch.d.ts.map +1 -1
  157. package/dist/client/segment-cache.d.ts +3 -1
  158. package/dist/client/segment-cache.d.ts.map +1 -1
  159. package/dist/client/segment-outlet.d.ts +49 -0
  160. package/dist/client/segment-outlet.d.ts.map +1 -0
  161. package/dist/client/segment-update-context.d.ts +21 -0
  162. package/dist/client/segment-update-context.d.ts.map +1 -0
  163. package/dist/client/shallow-url.d.ts +10 -0
  164. package/dist/client/shallow-url.d.ts.map +1 -0
  165. package/dist/client/ssr-data.d.ts +13 -4
  166. package/dist/client/ssr-data.d.ts.map +1 -1
  167. package/dist/client/state.d.ts +1 -1
  168. package/dist/client/top-loader.d.ts +5 -5
  169. package/dist/client/top-loader.d.ts.map +1 -1
  170. package/dist/client/use-cookie.d.ts +12 -0
  171. package/dist/client/use-cookie.d.ts.map +1 -1
  172. package/dist/client/use-link-status.d.ts +5 -5
  173. package/dist/client/use-link-status.d.ts.map +1 -1
  174. package/dist/client/use-pathname.d.ts.map +1 -1
  175. package/dist/client/use-pending-navigation.d.ts +23 -0
  176. package/dist/client/use-pending-navigation.d.ts.map +1 -0
  177. package/dist/client/use-query-states.d.ts +1 -1
  178. package/dist/client/use-query-states.d.ts.map +1 -1
  179. package/dist/client/use-router.d.ts +1 -1
  180. package/dist/client/use-router.d.ts.map +1 -1
  181. package/dist/client/use-search-params.d.ts +12 -5
  182. package/dist/client/use-search-params.d.ts.map +1 -1
  183. package/dist/client/{use-params.d.ts → use-segment-params.d.ts} +8 -6
  184. package/dist/client/use-segment-params.d.ts.map +1 -0
  185. package/dist/codec.d.ts +69 -0
  186. package/dist/codec.d.ts.map +1 -0
  187. package/dist/codec.js +75 -0
  188. package/dist/codec.js.map +1 -0
  189. package/dist/config-types.d.ts +294 -0
  190. package/dist/config-types.d.ts.map +1 -0
  191. package/dist/config-validation.d.ts +51 -0
  192. package/dist/config-validation.d.ts.map +1 -0
  193. package/dist/content/index.d.ts +1 -10
  194. package/dist/content/index.d.ts.map +1 -1
  195. package/dist/content/index.js +0 -2
  196. package/dist/cookies/define-cookie.d.ts +58 -25
  197. package/dist/cookies/define-cookie.d.ts.map +1 -1
  198. package/dist/cookies/index.d.ts +2 -1
  199. package/dist/cookies/index.d.ts.map +1 -1
  200. package/dist/cookies/index.js +249 -36
  201. package/dist/cookies/index.js.map +1 -1
  202. package/dist/cookies/json-cookie.d.ts +64 -0
  203. package/dist/cookies/json-cookie.d.ts.map +1 -0
  204. package/dist/cookies/validation.d.ts +34 -0
  205. package/dist/cookies/validation.d.ts.map +1 -0
  206. package/dist/dev-tools/404-page.d.ts +50 -0
  207. package/dist/dev-tools/404-page.d.ts.map +1 -0
  208. package/dist/dev-tools/browser-logs.d.ts +84 -0
  209. package/dist/dev-tools/browser-logs.d.ts.map +1 -0
  210. package/dist/dev-tools/dev-page-shell.d.ts +78 -0
  211. package/dist/dev-tools/dev-page-shell.d.ts.map +1 -0
  212. package/dist/dev-tools/error-page.d.ts +32 -0
  213. package/dist/dev-tools/error-page.d.ts.map +1 -0
  214. package/dist/dev-tools/holding-server.d.ts +54 -0
  215. package/dist/dev-tools/holding-server.d.ts.map +1 -0
  216. package/dist/dev-tools/hydration-overlay.d.ts +11 -0
  217. package/dist/dev-tools/hydration-overlay.d.ts.map +1 -0
  218. package/dist/dev-tools/index.d.ts +31 -0
  219. package/dist/dev-tools/index.d.ts.map +1 -0
  220. package/dist/dev-tools/instrumentation.d.ts +59 -0
  221. package/dist/dev-tools/instrumentation.d.ts.map +1 -0
  222. package/dist/{server/dev-logger.d.ts → dev-tools/logger.d.ts} +1 -1
  223. package/dist/dev-tools/logger.d.ts.map +1 -0
  224. package/dist/{plugins/dev-logs.d.ts → dev-tools/logs.d.ts} +2 -2
  225. package/dist/dev-tools/logs.d.ts.map +1 -0
  226. package/dist/dev-tools/overlay.d.ts +91 -0
  227. package/dist/dev-tools/overlay.d.ts.map +1 -0
  228. package/dist/dev-tools/stack-classifier.d.ts +34 -0
  229. package/dist/dev-tools/stack-classifier.d.ts.map +1 -0
  230. package/dist/dev-tools/terminal.d.ts +28 -0
  231. package/dist/dev-tools/terminal.d.ts.map +1 -0
  232. package/dist/fonts/ast-walk.d.ts +68 -0
  233. package/dist/fonts/ast-walk.d.ts.map +1 -0
  234. package/dist/fonts/ast.d.ts +110 -6
  235. package/dist/fonts/ast.d.ts.map +1 -1
  236. package/dist/fonts/bundle.d.ts +50 -0
  237. package/dist/fonts/bundle.d.ts.map +1 -0
  238. package/dist/fonts/dev-middleware.d.ts +22 -0
  239. package/dist/fonts/dev-middleware.d.ts.map +1 -0
  240. package/dist/fonts/fallbacks.d.ts +0 -7
  241. package/dist/fonts/fallbacks.d.ts.map +1 -1
  242. package/dist/fonts/google.d.ts +4 -2
  243. package/dist/fonts/google.d.ts.map +1 -1
  244. package/dist/fonts/local.d.ts +4 -4
  245. package/dist/fonts/local.d.ts.map +1 -1
  246. package/dist/fonts/paths.d.ts +43 -0
  247. package/dist/fonts/paths.d.ts.map +1 -0
  248. package/dist/fonts/pipeline.d.ts +158 -0
  249. package/dist/fonts/pipeline.d.ts.map +1 -0
  250. package/dist/fonts/transform.d.ts +78 -0
  251. package/dist/fonts/transform.d.ts.map +1 -0
  252. package/dist/fonts/types.d.ts +47 -1
  253. package/dist/fonts/types.d.ts.map +1 -1
  254. package/dist/fonts/virtual-modules.d.ts +77 -0
  255. package/dist/fonts/virtual-modules.d.ts.map +1 -0
  256. package/dist/index.d.ts +46 -180
  257. package/dist/index.d.ts.map +1 -1
  258. package/dist/index.js +6432 -13423
  259. package/dist/index.js.map +1 -1
  260. package/dist/params/codec-registry.d.ts +26 -0
  261. package/dist/params/codec-registry.d.ts.map +1 -0
  262. package/dist/params/define-schema.d.ts +81 -0
  263. package/dist/params/define-schema.d.ts.map +1 -0
  264. package/dist/params/index.d.ts +5 -0
  265. package/dist/params/index.d.ts.map +1 -0
  266. package/dist/params/index.js +34 -0
  267. package/dist/params/index.js.map +1 -0
  268. package/dist/params/resolve-schema.d.ts +34 -0
  269. package/dist/params/resolve-schema.d.ts.map +1 -0
  270. package/dist/plugin-context.d.ts +137 -0
  271. package/dist/plugin-context.d.ts.map +1 -0
  272. package/dist/plugins/adapter-build.d.ts +20 -1
  273. package/dist/plugins/adapter-build.d.ts.map +1 -1
  274. package/dist/plugins/build-manifest.d.ts +7 -3
  275. package/dist/plugins/build-manifest.d.ts.map +1 -1
  276. package/dist/plugins/build-report.d.ts +9 -7
  277. package/dist/plugins/build-report.d.ts.map +1 -1
  278. package/dist/plugins/cache.d.ts +73 -0
  279. package/dist/plugins/cache.d.ts.map +1 -0
  280. package/dist/plugins/client-chunks.d.ts +39 -0
  281. package/dist/plugins/client-chunks.d.ts.map +1 -0
  282. package/dist/plugins/cloudflare-wasm.d.ts +21 -0
  283. package/dist/plugins/cloudflare-wasm.d.ts.map +1 -0
  284. package/dist/plugins/content.d.ts +1 -1
  285. package/dist/plugins/content.d.ts.map +1 -1
  286. package/dist/plugins/dev-server.d.ts +17 -1
  287. package/dist/plugins/dev-server.d.ts.map +1 -1
  288. package/dist/plugins/entries.d.ts +1 -1
  289. package/dist/plugins/entries.d.ts.map +1 -1
  290. package/dist/plugins/fonts.d.ts +16 -73
  291. package/dist/plugins/fonts.d.ts.map +1 -1
  292. package/dist/plugins/mdx.d.ts +1 -1
  293. package/dist/plugins/mdx.d.ts.map +1 -1
  294. package/dist/plugins/routing.d.ts +1 -1
  295. package/dist/plugins/routing.d.ts.map +1 -1
  296. package/dist/plugins/server-bundle.d.ts.map +1 -1
  297. package/dist/plugins/shims.d.ts +29 -5
  298. package/dist/plugins/shims.d.ts.map +1 -1
  299. package/dist/plugins/static-build.d.ts +5 -26
  300. package/dist/plugins/static-build.d.ts.map +1 -1
  301. package/dist/routing/codegen-shared.d.ts +67 -0
  302. package/dist/routing/codegen-shared.d.ts.map +1 -0
  303. package/dist/routing/codegen-types.d.ts +64 -0
  304. package/dist/routing/codegen-types.d.ts.map +1 -0
  305. package/dist/routing/codegen.d.ts +7 -2
  306. package/dist/routing/codegen.d.ts.map +1 -1
  307. package/dist/routing/convention-lint.d.ts +41 -0
  308. package/dist/routing/convention-lint.d.ts.map +1 -0
  309. package/dist/routing/file-cache.d.ts +8 -0
  310. package/dist/routing/file-cache.d.ts.map +1 -0
  311. package/dist/routing/index.d.ts +7 -1
  312. package/dist/routing/index.d.ts.map +1 -1
  313. package/dist/routing/index.js +4 -2
  314. package/dist/routing/interception.d.ts +0 -5
  315. package/dist/routing/interception.d.ts.map +1 -1
  316. package/dist/routing/link-codegen.d.ts +90 -0
  317. package/dist/routing/link-codegen.d.ts.map +1 -0
  318. package/dist/routing/manifest-codegen.d.ts +32 -0
  319. package/dist/routing/manifest-codegen.d.ts.map +1 -0
  320. package/dist/routing/scanner.d.ts +1 -10
  321. package/dist/routing/scanner.d.ts.map +1 -1
  322. package/dist/routing/schema-validation.d.ts +35 -0
  323. package/dist/routing/schema-validation.d.ts.map +1 -0
  324. package/dist/routing/segment-classify.d.ts +75 -0
  325. package/dist/routing/segment-classify.d.ts.map +1 -0
  326. package/dist/routing/segment-codegen.d.ts +38 -0
  327. package/dist/routing/segment-codegen.d.ts.map +1 -0
  328. package/dist/routing/types.d.ts +77 -25
  329. package/dist/routing/types.d.ts.map +1 -1
  330. package/dist/routing/walkers.d.ts +51 -0
  331. package/dist/routing/walkers.d.ts.map +1 -0
  332. package/dist/rsc-runtime/rsc.d.ts +1 -1
  333. package/dist/rsc-runtime/rsc.d.ts.map +1 -1
  334. package/dist/rsc-runtime/ssr.d.ts +12 -0
  335. package/dist/rsc-runtime/ssr.d.ts.map +1 -1
  336. package/dist/schema-bridge.d.ts +91 -0
  337. package/dist/schema-bridge.d.ts.map +1 -0
  338. package/dist/search-params/define.d.ts +157 -0
  339. package/dist/search-params/define.d.ts.map +1 -0
  340. package/dist/search-params/index.d.ts +4 -7
  341. package/dist/search-params/index.d.ts.map +1 -1
  342. package/dist/search-params/index.js +37 -440
  343. package/dist/search-params/index.js.map +1 -1
  344. package/dist/search-params/registry.d.ts +2 -2
  345. package/dist/search-params/registry.d.ts.map +1 -1
  346. package/dist/search-params/wrappers.d.ts +53 -0
  347. package/dist/search-params/wrappers.d.ts.map +1 -0
  348. package/dist/segment-params/define.d.ts +89 -0
  349. package/dist/segment-params/define.d.ts.map +1 -0
  350. package/dist/segment-params/index.d.ts +3 -0
  351. package/dist/segment-params/index.d.ts.map +1 -0
  352. package/dist/segment-params/index.js +2 -0
  353. package/dist/server/access-gate.d.ts +8 -3
  354. package/dist/server/access-gate.d.ts.map +1 -1
  355. package/dist/server/action-client.d.ts +41 -6
  356. package/dist/server/action-client.d.ts.map +1 -1
  357. package/dist/server/action-encryption.d.ts +76 -0
  358. package/dist/server/action-encryption.d.ts.map +1 -0
  359. package/dist/server/action-handler.d.ts +35 -1
  360. package/dist/server/action-handler.d.ts.map +1 -1
  361. package/dist/server/actions.d.ts +9 -30
  362. package/dist/server/actions.d.ts.map +1 -1
  363. package/dist/server/als-registry.d.ts +70 -11
  364. package/dist/server/als-registry.d.ts.map +1 -1
  365. package/dist/server/asset-headers.d.ts +1 -15
  366. package/dist/server/asset-headers.d.ts.map +1 -1
  367. package/dist/server/body-limits.d.ts.map +1 -1
  368. package/dist/server/build-manifest.d.ts +6 -29
  369. package/dist/server/build-manifest.d.ts.map +1 -1
  370. package/dist/server/canonicalize.d.ts +10 -0
  371. package/dist/server/canonicalize.d.ts.map +1 -1
  372. package/dist/server/coalesce-tick.d.ts +40 -0
  373. package/dist/server/coalesce-tick.d.ts.map +1 -0
  374. package/dist/server/cookie-context.d.ts +170 -0
  375. package/dist/server/cookie-context.d.ts.map +1 -0
  376. package/dist/server/cookie-parsing.d.ts +51 -0
  377. package/dist/server/cookie-parsing.d.ts.map +1 -0
  378. package/dist/server/csrf.d.ts +3 -2
  379. package/dist/server/csrf.d.ts.map +1 -1
  380. package/dist/server/default-logger.d.ts +22 -0
  381. package/dist/server/default-logger.d.ts.map +1 -0
  382. package/dist/server/deny-boundary.d.ts +115 -0
  383. package/dist/server/deny-boundary.d.ts.map +1 -0
  384. package/dist/server/deny-renderer.d.ts +2 -2
  385. package/dist/server/deny-renderer.d.ts.map +1 -1
  386. package/dist/server/dev-source-map.d.ts +22 -0
  387. package/dist/server/dev-source-map.d.ts.map +1 -0
  388. package/dist/server/early-hints-sender.d.ts.map +1 -1
  389. package/dist/server/early-hints.d.ts +13 -11
  390. package/dist/server/early-hints.d.ts.map +1 -1
  391. package/dist/server/error-boundary-wrapper.d.ts +7 -1
  392. package/dist/server/error-boundary-wrapper.d.ts.map +1 -1
  393. package/dist/server/fallback-error.d.ts +12 -7
  394. package/dist/server/fallback-error.d.ts.map +1 -1
  395. package/dist/server/flight-injection-state.d.ts +66 -0
  396. package/dist/server/flight-injection-state.d.ts.map +1 -0
  397. package/dist/server/flight-scripts.d.ts +42 -0
  398. package/dist/server/flight-scripts.d.ts.map +1 -0
  399. package/dist/server/form-data.d.ts +29 -0
  400. package/dist/server/form-data.d.ts.map +1 -1
  401. package/dist/server/html-injector-core.d.ts +221 -0
  402. package/dist/server/html-injector-core.d.ts.map +1 -0
  403. package/dist/server/html-injectors.d.ts +81 -41
  404. package/dist/server/html-injectors.d.ts.map +1 -1
  405. package/dist/server/index.d.ts +10 -46
  406. package/dist/server/index.d.ts.map +1 -1
  407. package/dist/server/index.js +170 -2911
  408. package/dist/server/index.js.map +1 -1
  409. package/dist/server/internal.d.ts +44 -0
  410. package/dist/server/internal.d.ts.map +1 -0
  411. package/dist/server/internal.js +3015 -0
  412. package/dist/server/internal.js.map +1 -0
  413. package/dist/server/logger.d.ts +39 -7
  414. package/dist/server/logger.d.ts.map +1 -1
  415. package/dist/server/metadata-routes.d.ts +23 -7
  416. package/dist/server/metadata-routes.d.ts.map +1 -1
  417. package/dist/server/middleware-runner.d.ts +36 -4
  418. package/dist/server/middleware-runner.d.ts.map +1 -1
  419. package/dist/server/node-stream-transforms.d.ts +119 -0
  420. package/dist/server/node-stream-transforms.d.ts.map +1 -0
  421. package/dist/server/param-coercion.d.ts +54 -0
  422. package/dist/server/param-coercion.d.ts.map +1 -0
  423. package/dist/server/pipeline-helpers.d.ts +95 -0
  424. package/dist/server/pipeline-helpers.d.ts.map +1 -0
  425. package/dist/server/pipeline-interception.d.ts +1 -1
  426. package/dist/server/pipeline-interception.d.ts.map +1 -1
  427. package/dist/server/pipeline-metadata.d.ts +6 -0
  428. package/dist/server/pipeline-metadata.d.ts.map +1 -1
  429. package/dist/server/pipeline-outcome.d.ts +49 -0
  430. package/dist/server/pipeline-outcome.d.ts.map +1 -0
  431. package/dist/server/pipeline-phases.d.ts +56 -0
  432. package/dist/server/pipeline-phases.d.ts.map +1 -0
  433. package/dist/server/pipeline.d.ts +122 -19
  434. package/dist/server/pipeline.d.ts.map +1 -1
  435. package/dist/server/port-resolution.d.ts +117 -0
  436. package/dist/server/port-resolution.d.ts.map +1 -0
  437. package/dist/server/primitives.d.ts +75 -31
  438. package/dist/server/primitives.d.ts.map +1 -1
  439. package/dist/server/render-timeout.d.ts +51 -0
  440. package/dist/server/render-timeout.d.ts.map +1 -0
  441. package/dist/server/render-utils.d.ts +25 -0
  442. package/dist/server/render-utils.d.ts.map +1 -0
  443. package/dist/server/request-context.d.ts +62 -107
  444. package/dist/server/request-context.d.ts.map +1 -1
  445. package/dist/server/route-element-builder.d.ts +30 -18
  446. package/dist/server/route-element-builder.d.ts.map +1 -1
  447. package/dist/server/route-handler.d.ts.map +1 -1
  448. package/dist/server/route-matcher.d.ts +25 -36
  449. package/dist/server/route-matcher.d.ts.map +1 -1
  450. package/dist/server/rsc-entry/action-middleware-runner.d.ts +66 -0
  451. package/dist/server/rsc-entry/action-middleware-runner.d.ts.map +1 -0
  452. package/dist/server/rsc-entry/api-handler.d.ts +12 -3
  453. package/dist/server/rsc-entry/api-handler.d.ts.map +1 -1
  454. package/dist/server/rsc-entry/error-renderer.d.ts +26 -13
  455. package/dist/server/rsc-entry/error-renderer.d.ts.map +1 -1
  456. package/dist/server/rsc-entry/helpers.d.ts +51 -23
  457. package/dist/server/rsc-entry/helpers.d.ts.map +1 -1
  458. package/dist/server/rsc-entry/index.d.ts +19 -8
  459. package/dist/server/rsc-entry/index.d.ts.map +1 -1
  460. package/dist/server/rsc-entry/render-route.d.ts +50 -0
  461. package/dist/server/rsc-entry/render-route.d.ts.map +1 -0
  462. package/dist/server/rsc-entry/revalidate-renderer.d.ts +108 -0
  463. package/dist/server/rsc-entry/revalidate-renderer.d.ts.map +1 -0
  464. package/dist/server/rsc-entry/rsc-payload.d.ts +3 -3
  465. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  466. package/dist/server/rsc-entry/rsc-stream.d.ts +17 -1
  467. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  468. package/dist/server/rsc-entry/ssr-bridge.d.ts +5 -1
  469. package/dist/server/rsc-entry/ssr-bridge.d.ts.map +1 -1
  470. package/dist/server/rsc-entry/ssr-renderer.d.ts +34 -4
  471. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  472. package/dist/server/rsc-entry/wrap-action-dispatch.d.ts +119 -0
  473. package/dist/server/rsc-entry/wrap-action-dispatch.d.ts.map +1 -0
  474. package/dist/server/safe-load.d.ts +46 -0
  475. package/dist/server/safe-load.d.ts.map +1 -0
  476. package/dist/server/sensitive-fields.d.ts +74 -0
  477. package/dist/server/sensitive-fields.d.ts.map +1 -0
  478. package/dist/server/sitemap-generator.d.ts +129 -0
  479. package/dist/server/sitemap-generator.d.ts.map +1 -0
  480. package/dist/server/sitemap-handler.d.ts +22 -0
  481. package/dist/server/sitemap-handler.d.ts.map +1 -0
  482. package/dist/server/slot-resolver.d.ts +7 -5
  483. package/dist/server/slot-resolver.d.ts.map +1 -1
  484. package/dist/server/ssr-bridge-types.d.ts +121 -0
  485. package/dist/server/ssr-bridge-types.d.ts.map +1 -0
  486. package/dist/server/ssr-entry.d.ts +2 -43
  487. package/dist/server/ssr-entry.d.ts.map +1 -1
  488. package/dist/server/ssr-render.d.ts +64 -21
  489. package/dist/server/ssr-render.d.ts.map +1 -1
  490. package/dist/server/ssr-wrappers.d.ts +50 -0
  491. package/dist/server/ssr-wrappers.d.ts.map +1 -0
  492. package/dist/server/state-tree-diff.d.ts +12 -5
  493. package/dist/server/state-tree-diff.d.ts.map +1 -1
  494. package/dist/server/status-code-resolver.d.ts +22 -11
  495. package/dist/server/status-code-resolver.d.ts.map +1 -1
  496. package/dist/server/stream-utils.d.ts +36 -0
  497. package/dist/server/stream-utils.d.ts.map +1 -0
  498. package/dist/server/tracing.d.ts +7 -6
  499. package/dist/server/tracing.d.ts.map +1 -1
  500. package/dist/server/tree-builder.d.ts +62 -30
  501. package/dist/server/tree-builder.d.ts.map +1 -1
  502. package/dist/server/tree-match.d.ts +49 -0
  503. package/dist/server/tree-match.d.ts.map +1 -0
  504. package/dist/server/types.d.ts +71 -6
  505. package/dist/server/types.d.ts.map +1 -1
  506. package/dist/server/utils/escape-html.d.ts +14 -0
  507. package/dist/server/utils/escape-html.d.ts.map +1 -0
  508. package/dist/server/utils/mdx-file.d.ts +15 -0
  509. package/dist/server/utils/mdx-file.d.ts.map +1 -0
  510. package/dist/server/version-skew.d.ts +61 -0
  511. package/dist/server/version-skew.d.ts.map +1 -0
  512. package/dist/shared/head-header.d.ts +54 -0
  513. package/dist/shared/head-header.d.ts.map +1 -0
  514. package/dist/shared/href-validation.d.ts +49 -0
  515. package/dist/shared/href-validation.d.ts.map +1 -0
  516. package/dist/shared/merge-search-params.d.ts +22 -0
  517. package/dist/shared/merge-search-params.d.ts.map +1 -0
  518. package/dist/shared/redirect-type.d.ts +17 -0
  519. package/dist/shared/redirect-type.d.ts.map +1 -0
  520. package/dist/shims/font-google.d.ts +1 -1
  521. package/dist/shims/font-google.d.ts.map +1 -1
  522. package/dist/shims/font-google.js +42 -0
  523. package/dist/shims/font-google.js.map +1 -0
  524. package/dist/shims/font-local.d.ts +26 -0
  525. package/dist/shims/font-local.d.ts.map +1 -0
  526. package/dist/shims/font-local.js +20 -0
  527. package/dist/shims/font-local.js.map +1 -0
  528. package/dist/shims/headers.d.ts +53 -1
  529. package/dist/shims/headers.d.ts.map +1 -1
  530. package/dist/shims/image.d.ts +16 -16
  531. package/dist/shims/navigation-client.d.ts +35 -11
  532. package/dist/shims/navigation-client.d.ts.map +1 -1
  533. package/dist/shims/navigation.d.ts +11 -5
  534. package/dist/shims/navigation.d.ts.map +1 -1
  535. package/dist/utils/state-machine.d.ts +80 -0
  536. package/dist/utils/state-machine.d.ts.map +1 -0
  537. package/package.json +63 -24
  538. package/src/adapters/build-output-helper.ts +139 -0
  539. package/src/adapters/cloudflare-dev.ts +177 -0
  540. package/src/adapters/cloudflare-kv-cache.ts +179 -0
  541. package/src/adapters/cloudflare.ts +356 -116
  542. package/src/adapters/compress-module.ts +27 -92
  543. package/src/adapters/nitro.ts +155 -99
  544. package/src/adapters/raw-imports.d.ts +5 -0
  545. package/src/adapters/shared.ts +40 -0
  546. package/src/adapters/wrangler.d.ts +7 -0
  547. package/src/cache/cache-api.ts +47 -0
  548. package/src/cache/handler-store.ts +68 -0
  549. package/src/cache/index.ts +84 -18
  550. package/src/cache/invalidation-epoch.ts +93 -0
  551. package/src/cache/redis-handler.ts +110 -15
  552. package/src/cache/singleflight.ts +62 -4
  553. package/src/cache/sizeof.ts +33 -0
  554. package/src/cache/stable-stringify.ts +65 -2
  555. package/src/cache/timber-cache.ts +132 -36
  556. package/src/cli-schema-sync.ts +388 -0
  557. package/src/cli.ts +98 -34
  558. package/src/client/browser-dev.ts +153 -1
  559. package/src/client/browser-entry/action-dispatch.ts +119 -0
  560. package/src/client/browser-entry/hmr.ts +70 -0
  561. package/src/client/browser-entry/hydrate.ts +187 -0
  562. package/src/client/browser-entry/index.ts +111 -0
  563. package/src/client/browser-entry/post-hydration.ts +104 -0
  564. package/src/client/browser-entry/router-init.ts +292 -0
  565. package/src/client/browser-entry/rsc-stream.ts +157 -0
  566. package/src/client/browser-entry/scroll.ts +50 -0
  567. package/src/client/error-boundary.tsx +127 -22
  568. package/src/client/error-reconstituter.tsx +79 -0
  569. package/src/client/form.tsx +31 -32
  570. package/src/client/history.ts +11 -3
  571. package/src/client/index.ts +67 -45
  572. package/src/client/internal.ts +58 -0
  573. package/src/client/link.tsx +346 -150
  574. package/src/client/navigation-api-types.ts +112 -0
  575. package/src/client/navigation-api.ts +347 -0
  576. package/src/client/navigation-context.ts +15 -7
  577. package/src/client/navigation-root.tsx +355 -0
  578. package/src/client/nuqs-adapter.tsx +16 -3
  579. package/src/client/router-ref.ts +1 -1
  580. package/src/client/router.ts +490 -140
  581. package/src/client/rsc-fetch.ts +220 -17
  582. package/src/client/segment-cache.ts +6 -3
  583. package/src/client/segment-outlet.tsx +77 -0
  584. package/src/client/segment-update-context.ts +42 -0
  585. package/src/client/shallow-url.ts +22 -0
  586. package/src/client/ssr-data.ts +13 -5
  587. package/src/client/state.ts +2 -2
  588. package/src/client/top-loader.tsx +11 -9
  589. package/src/client/use-cookie.ts +31 -2
  590. package/src/client/use-link-status.ts +7 -7
  591. package/src/client/use-pathname.ts +1 -0
  592. package/src/client/use-pending-navigation.ts +40 -0
  593. package/src/client/use-query-states.ts +9 -3
  594. package/src/client/use-router.ts +4 -1
  595. package/src/client/use-search-params.ts +31 -44
  596. package/src/client/{use-params.ts → use-segment-params.ts} +9 -6
  597. package/src/codec.ts +147 -0
  598. package/src/config-types.ts +292 -0
  599. package/src/config-validation.ts +311 -0
  600. package/src/content/index.ts +5 -13
  601. package/src/cookies/define-cookie.ts +217 -53
  602. package/src/cookies/index.ts +12 -1
  603. package/src/cookies/json-cookie.ts +105 -0
  604. package/src/cookies/validation.ts +192 -0
  605. package/src/dev-tools/404-page.ts +286 -0
  606. package/src/dev-tools/browser-logs.ts +291 -0
  607. package/src/dev-tools/dev-page-shell.ts +260 -0
  608. package/src/dev-tools/error-page.ts +331 -0
  609. package/src/dev-tools/holding-server.ts +187 -0
  610. package/src/dev-tools/hydration-overlay.ts +158 -0
  611. package/src/dev-tools/index.ts +83 -0
  612. package/src/dev-tools/instrumentation.ts +213 -0
  613. package/src/{plugins/dev-logs.ts → dev-tools/logs.ts} +9 -5
  614. package/src/dev-tools/overlay.ts +469 -0
  615. package/src/dev-tools/stack-classifier.ts +75 -0
  616. package/src/dev-tools/terminal.ts +183 -0
  617. package/src/fonts/ast-walk.ts +235 -0
  618. package/src/fonts/ast.ts +477 -126
  619. package/src/fonts/bundle.ts +138 -0
  620. package/src/fonts/dev-middleware.ts +85 -0
  621. package/src/fonts/fallbacks.ts +0 -23
  622. package/src/fonts/google.ts +7 -3
  623. package/src/fonts/local.ts +9 -8
  624. package/src/fonts/paths.ts +58 -0
  625. package/src/fonts/pipeline.ts +316 -0
  626. package/src/fonts/transform.ts +344 -0
  627. package/src/fonts/types.ts +52 -1
  628. package/src/fonts/virtual-modules.ts +179 -0
  629. package/src/index.ts +417 -346
  630. package/src/params/codec-registry.ts +34 -0
  631. package/src/params/define-schema.ts +115 -0
  632. package/src/params/index.ts +17 -0
  633. package/src/params/resolve-schema.ts +84 -0
  634. package/src/plugin-context.ts +325 -0
  635. package/src/plugins/adapter-build.ts +98 -4
  636. package/src/plugins/build-manifest.ts +168 -23
  637. package/src/plugins/build-report.ts +16 -25
  638. package/src/plugins/cache.ts +285 -0
  639. package/src/plugins/client-chunks.ts +113 -0
  640. package/src/plugins/cloudflare-wasm.ts +141 -0
  641. package/src/plugins/content.ts +1 -1
  642. package/src/plugins/dev-server.ts +264 -46
  643. package/src/plugins/entries.ts +110 -8
  644. package/src/plugins/fonts.ts +170 -663
  645. package/src/plugins/mdx.ts +47 -10
  646. package/src/plugins/routing.ts +237 -241
  647. package/src/plugins/server-bundle.ts +85 -12
  648. package/src/plugins/shims.ts +207 -64
  649. package/src/plugins/static-build.ts +15 -89
  650. package/src/routing/codegen-shared.ts +115 -0
  651. package/src/routing/codegen-types.ts +65 -0
  652. package/src/routing/codegen.ts +380 -178
  653. package/src/routing/convention-lint.ts +358 -0
  654. package/src/routing/file-cache.ts +23 -0
  655. package/src/routing/index.ts +10 -1
  656. package/src/routing/interception.ts +3 -22
  657. package/src/routing/link-codegen.ts +310 -0
  658. package/src/routing/manifest-codegen.ts +290 -0
  659. package/src/routing/scanner.ts +248 -188
  660. package/src/routing/schema-validation.ts +149 -0
  661. package/src/routing/segment-classify.ts +188 -0
  662. package/src/routing/segment-codegen.ts +98 -0
  663. package/src/routing/types.ts +78 -25
  664. package/src/routing/walkers.ts +90 -0
  665. package/src/rsc-runtime/rsc.ts +2 -0
  666. package/src/rsc-runtime/ssr.ts +50 -0
  667. package/src/rsc-runtime/vendor-types.d.ts +7 -0
  668. package/src/schema-bridge.ts +252 -0
  669. package/src/search-params/define.ts +570 -0
  670. package/src/search-params/index.ts +14 -20
  671. package/src/search-params/registry.ts +2 -2
  672. package/src/search-params/wrappers.ts +110 -0
  673. package/src/segment-params/define.ts +249 -0
  674. package/src/segment-params/index.ts +9 -0
  675. package/src/server/access-gate.tsx +84 -34
  676. package/src/server/action-client.ts +119 -28
  677. package/src/server/action-encryption.ts +144 -0
  678. package/src/server/action-handler.ts +122 -16
  679. package/src/server/actions.ts +39 -53
  680. package/src/server/als-registry.ts +108 -20
  681. package/src/server/asset-headers.ts +8 -34
  682. package/src/server/body-limits.ts +10 -2
  683. package/src/server/build-manifest.ts +13 -56
  684. package/src/server/canonicalize.ts +6 -3
  685. package/src/server/coalesce-tick.ts +75 -0
  686. package/src/server/compress.ts +34 -7
  687. package/src/server/cookie-context.ts +484 -0
  688. package/src/server/cookie-parsing.ts +147 -0
  689. package/src/server/csrf.ts +39 -6
  690. package/src/server/default-logger.ts +99 -0
  691. package/src/server/deny-boundary.ts +311 -0
  692. package/src/server/deny-renderer.ts +80 -64
  693. package/src/server/dev-source-map.ts +31 -0
  694. package/src/server/early-hints-sender.ts +3 -2
  695. package/src/server/early-hints.ts +37 -27
  696. package/src/server/error-boundary-wrapper.ts +61 -22
  697. package/src/server/fallback-error.ts +79 -102
  698. package/src/server/flight-injection-state.ts +113 -0
  699. package/src/server/flight-scripts.ts +62 -0
  700. package/src/server/form-data.ts +101 -5
  701. package/src/server/html-injector-core.ts +437 -0
  702. package/src/server/html-injectors.ts +256 -251
  703. package/src/server/index.ts +29 -183
  704. package/src/server/internal.ts +165 -0
  705. package/src/server/logger.ts +67 -36
  706. package/src/server/metadata-routes.ts +44 -19
  707. package/src/server/middleware-runner.ts +75 -4
  708. package/src/server/node-stream-transforms.ts +331 -0
  709. package/src/server/param-coercion.ts +206 -0
  710. package/src/server/pipeline-helpers.ts +204 -0
  711. package/src/server/pipeline-interception.ts +32 -18
  712. package/src/server/pipeline-metadata.ts +13 -0
  713. package/src/server/pipeline-outcome.ts +197 -0
  714. package/src/server/pipeline-phases.ts +527 -0
  715. package/src/server/pipeline.ts +213 -382
  716. package/src/server/port-resolution.ts +215 -0
  717. package/src/server/primitives.ts +126 -63
  718. package/src/server/render-timeout.ts +108 -0
  719. package/src/server/render-utils.ts +31 -0
  720. package/src/server/request-context.ts +168 -337
  721. package/src/server/route-element-builder.ts +481 -222
  722. package/src/server/route-handler.ts +31 -4
  723. package/src/server/route-matcher.ts +144 -277
  724. package/src/server/rsc-entry/action-middleware-runner.ts +167 -0
  725. package/src/server/rsc-entry/api-handler.ts +69 -32
  726. package/src/server/rsc-entry/error-renderer.ts +306 -89
  727. package/src/server/rsc-entry/helpers.ts +160 -59
  728. package/src/server/rsc-entry/index.ts +299 -329
  729. package/src/server/rsc-entry/render-route.ts +311 -0
  730. package/src/server/rsc-entry/revalidate-renderer.ts +344 -0
  731. package/src/server/rsc-entry/rsc-payload.ts +71 -26
  732. package/src/server/rsc-entry/rsc-stream.ts +85 -13
  733. package/src/server/rsc-entry/ssr-bridge.ts +18 -5
  734. package/src/server/rsc-entry/ssr-renderer.ts +273 -43
  735. package/src/server/rsc-entry/wrap-action-dispatch.ts +449 -0
  736. package/src/server/safe-load.ts +60 -0
  737. package/src/server/sensitive-fields.ts +230 -0
  738. package/src/server/sitemap-generator.ts +338 -0
  739. package/src/server/sitemap-handler.ts +148 -0
  740. package/src/server/slot-resolver.ts +258 -257
  741. package/src/server/ssr-bridge-types.ts +124 -0
  742. package/src/server/ssr-entry.ts +206 -78
  743. package/src/server/ssr-render.ts +345 -82
  744. package/src/server/ssr-wrappers.tsx +141 -0
  745. package/src/server/state-tree-diff.ts +30 -23
  746. package/src/server/status-code-resolver.ts +115 -130
  747. package/src/server/stream-utils.ts +213 -0
  748. package/src/server/tracing.ts +38 -11
  749. package/src/server/tree-builder.ts +204 -90
  750. package/src/server/tree-match.ts +220 -0
  751. package/src/server/types.ts +78 -9
  752. package/src/server/utils/escape-html.ts +20 -0
  753. package/src/server/utils/mdx-file.ts +22 -0
  754. package/src/server/version-skew.ts +104 -0
  755. package/src/shared/head-header.ts +69 -0
  756. package/src/shared/href-validation.ts +159 -0
  757. package/src/shared/merge-search-params.ts +55 -0
  758. package/src/shared/redirect-type.ts +17 -0
  759. package/src/shims/font-google.ts +1 -1
  760. package/src/shims/font-local.ts +34 -0
  761. package/src/shims/headers.ts +122 -1
  762. package/src/shims/navigation-client.ts +51 -29
  763. package/src/shims/navigation.ts +14 -7
  764. package/src/utils/state-machine.ts +111 -0
  765. package/dist/_chunks/als-registry-B7DbZ2hS.js +0 -41
  766. package/dist/_chunks/als-registry-B7DbZ2hS.js.map +0 -1
  767. package/dist/_chunks/debug-B3Gypr3D.js +0 -108
  768. package/dist/_chunks/debug-B3Gypr3D.js.map +0 -1
  769. package/dist/_chunks/format-RyoGQL74.js +0 -164
  770. package/dist/_chunks/format-RyoGQL74.js.map +0 -1
  771. package/dist/_chunks/interception-BOoWmLUA.js +0 -676
  772. package/dist/_chunks/interception-BOoWmLUA.js.map +0 -1
  773. package/dist/_chunks/metadata-routes-Cjmvi3rQ.js.map +0 -1
  774. package/dist/_chunks/request-context-BQUC8PHn.js +0 -330
  775. package/dist/_chunks/request-context-BQUC8PHn.js.map +0 -1
  776. package/dist/_chunks/ssr-data-MjmprTmO.js.map +0 -1
  777. package/dist/_chunks/tracing-CemImE6h.js +0 -187
  778. package/dist/_chunks/tracing-CemImE6h.js.map +0 -1
  779. package/dist/_chunks/use-cookie-DX-l1_5E.js +0 -91
  780. package/dist/_chunks/use-cookie-DX-l1_5E.js.map +0 -1
  781. package/dist/_chunks/use-query-states-D5KaffOK.js.map +0 -1
  782. package/dist/cache/register-cached-function.d.ts +0 -17
  783. package/dist/cache/register-cached-function.d.ts.map +0 -1
  784. package/dist/client/browser-entry.d.ts +0 -21
  785. package/dist/client/browser-entry.d.ts.map +0 -1
  786. package/dist/client/link-status-provider.d.ts +0 -11
  787. package/dist/client/link-status-provider.d.ts.map +0 -1
  788. package/dist/client/segment-merger.d.ts +0 -119
  789. package/dist/client/segment-merger.d.ts.map +0 -1
  790. package/dist/client/stale-reload.d.ts +0 -44
  791. package/dist/client/stale-reload.d.ts.map +0 -1
  792. package/dist/client/transition-root.d.ts +0 -74
  793. package/dist/client/transition-root.d.ts.map +0 -1
  794. package/dist/client/use-navigation-pending.d.ts +0 -26
  795. package/dist/client/use-navigation-pending.d.ts.map +0 -1
  796. package/dist/client/use-params.d.ts.map +0 -1
  797. package/dist/plugins/cache-transform.d.ts +0 -36
  798. package/dist/plugins/cache-transform.d.ts.map +0 -1
  799. package/dist/plugins/dev-error-overlay.d.ts +0 -60
  800. package/dist/plugins/dev-error-overlay.d.ts.map +0 -1
  801. package/dist/plugins/dev-logs.d.ts.map +0 -1
  802. package/dist/plugins/dynamic-transform.d.ts +0 -72
  803. package/dist/plugins/dynamic-transform.d.ts.map +0 -1
  804. package/dist/plugins/server-action-exports.d.ts +0 -26
  805. package/dist/plugins/server-action-exports.d.ts.map +0 -1
  806. package/dist/routing/status-file-lint.d.ts +0 -33
  807. package/dist/routing/status-file-lint.d.ts.map +0 -1
  808. package/dist/search-params/analyze.d.ts +0 -54
  809. package/dist/search-params/analyze.d.ts.map +0 -1
  810. package/dist/search-params/builtin-codecs.d.ts +0 -105
  811. package/dist/search-params/builtin-codecs.d.ts.map +0 -1
  812. package/dist/search-params/codecs.d.ts +0 -53
  813. package/dist/search-params/codecs.d.ts.map +0 -1
  814. package/dist/search-params/create.d.ts +0 -106
  815. package/dist/search-params/create.d.ts.map +0 -1
  816. package/dist/server/dev-fetch-instrumentation.d.ts +0 -22
  817. package/dist/server/dev-fetch-instrumentation.d.ts.map +0 -1
  818. package/dist/server/dev-logger.d.ts.map +0 -1
  819. package/dist/server/dev-span-processor.d.ts +0 -29
  820. package/dist/server/dev-span-processor.d.ts.map +0 -1
  821. package/dist/server/dev-warnings.d.ts +0 -129
  822. package/dist/server/dev-warnings.d.ts.map +0 -1
  823. package/dist/server/flush.d.ts +0 -74
  824. package/dist/server/flush.d.ts.map +0 -1
  825. package/dist/server/manifest-status-resolver.d.ts +0 -58
  826. package/dist/server/manifest-status-resolver.d.ts.map +0 -1
  827. package/dist/server/prerender.d.ts +0 -77
  828. package/dist/server/prerender.d.ts.map +0 -1
  829. package/dist/utils/directive-parser.d.ts +0 -70
  830. package/dist/utils/directive-parser.d.ts.map +0 -1
  831. package/src/cache/register-cached-function.ts +0 -103
  832. package/src/client/browser-entry.ts +0 -678
  833. package/src/client/link-status-provider.tsx +0 -30
  834. package/src/client/segment-merger.ts +0 -339
  835. package/src/client/stale-reload.ts +0 -87
  836. package/src/client/transition-root.tsx +0 -166
  837. package/src/client/use-navigation-pending.ts +0 -38
  838. package/src/plugins/cache-transform.ts +0 -199
  839. package/src/plugins/dev-error-overlay.ts +0 -230
  840. package/src/plugins/dynamic-transform.ts +0 -161
  841. package/src/plugins/server-action-exports.ts +0 -220
  842. package/src/routing/status-file-lint.ts +0 -112
  843. package/src/search-params/analyze.ts +0 -192
  844. package/src/search-params/builtin-codecs.ts +0 -228
  845. package/src/search-params/codecs.ts +0 -153
  846. package/src/search-params/create.ts +0 -321
  847. package/src/server/dev-fetch-instrumentation.ts +0 -96
  848. package/src/server/dev-span-processor.ts +0 -78
  849. package/src/server/dev-warnings.ts +0 -283
  850. package/src/server/flush.ts +0 -182
  851. package/src/server/manifest-status-resolver.ts +0 -215
  852. package/src/server/prerender.ts +0 -139
  853. package/src/utils/directive-parser.ts +0 -529
  854. /package/src/{server/dev-logger.ts → dev-tools/logger.ts} +0 -0
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Version Skew Detection — graceful recovery when stale clients hit new deployments.
3
+ *
4
+ * When a new version of the app is deployed, clients with open tabs still have
5
+ * the old JavaScript bundle. Without version skew handling, these stale clients
6
+ * will experience:
7
+ *
8
+ * 1. Server action calls that crash (action IDs are content-hashed)
9
+ * 2. Chunk load failures (old filenames gone from CDN)
10
+ * 3. RSC payload mismatches (component references differ between builds)
11
+ *
12
+ * This module implements deployment ID comparison:
13
+ * - A per-build deployment ID is generated at build time (see build-manifest.ts)
14
+ * - The client sends it via `X-Timber-Deployment-Id` header on every RSC/action request
15
+ * - The server compares it against the current build's ID
16
+ * - On mismatch: signal the client to reload (not crash)
17
+ *
18
+ * The deployment ID is always-on in production. Dev mode skips the check
19
+ * (HMR handles code updates without full reloads).
20
+ *
21
+ * See design/25-production-deployments.md, TIM-446
22
+ */
23
+ /** Header sent by the client with every RSC/action request. */
24
+ export declare const DEPLOYMENT_ID_HEADER = "X-Timber-Deployment-Id";
25
+ /** Response header that signals the client to do a full page reload. */
26
+ export declare const RELOAD_HEADER = "X-Timber-Reload";
27
+ /**
28
+ * Set the current deployment ID. Called once at server startup from the
29
+ * manifest init module. In dev mode this is never called (deployment ID
30
+ * checks are skipped).
31
+ */
32
+ export declare function setDeploymentId(id: string): void;
33
+ /**
34
+ * Get the current deployment ID. Returns null in dev mode.
35
+ */
36
+ export declare function getDeploymentId(): string | null;
37
+ /** Result of a version skew check. */
38
+ export interface SkewCheckResult {
39
+ /** Whether the client's deployment ID matches the server's. */
40
+ ok: boolean;
41
+ /** The client's deployment ID (null if header not sent — e.g., initial page load). */
42
+ clientId: string | null;
43
+ }
44
+ /**
45
+ * Check if a request's deployment ID matches the current build.
46
+ *
47
+ * Returns `{ ok: true }` when:
48
+ * - Dev mode (no deployment ID set — HMR handles updates)
49
+ * - No deployment ID header (initial page load, non-RSC request)
50
+ * - Deployment IDs match
51
+ *
52
+ * Returns `{ ok: false }` when:
53
+ * - Client sends a deployment ID that differs from the current build
54
+ */
55
+ export declare function checkVersionSkew(req: Request): SkewCheckResult;
56
+ /**
57
+ * Apply version skew reload headers to a response.
58
+ * Sets X-Timber-Reload: 1 to signal the client to do a full page reload.
59
+ */
60
+ export declare function applyReloadHeaders(headers: Headers): void;
61
+ //# sourceMappingURL=version-skew.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-skew.d.ts","sourceRoot":"","sources":["../../src/server/version-skew.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAE7D,wEAAwE;AACxE,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAU/C;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAID,sCAAsC;AACtC,MAAM,WAAW,eAAe;IAC9B,+DAA+D;IAC/D,EAAE,EAAE,OAAO,CAAC;IACZ,sFAAsF;IACtF,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,eAAe,CAmB9D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEzD"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Shared encode/decode for the X-Timber-Head response header.
3
+ *
4
+ * Head elements (title, meta, link) are forwarded to the client as a JSON
5
+ * payload in a response header on both the navigation path (RSC payload
6
+ * responses) and the action-revalidation path. HTTP header values must be
7
+ * ByteStrings — any character above U+00FF (em dash, curly quotes, emoji,
8
+ * CJK) makes `new Response(...)` throw. Percent-encoding via
9
+ * encodeURIComponent keeps the value ASCII-safe.
10
+ *
11
+ * This module is the single source of truth for the wire format. Both
12
+ * server emit sites (rsc-entry/rsc-payload.ts, action-handler.ts) and both
13
+ * client parse sites (rsc-fetch.ts, browser-entry/action-dispatch.ts) MUST
14
+ * use it — changing one side alone breaks the other. See TIM-1058.
15
+ *
16
+ * Isomorphic: no server or client imports allowed here.
17
+ *
18
+ * See design/16-metadata.md and design/08-forms-and-actions.md.
19
+ */
20
+ /** Header name for resolved head elements. */
21
+ export declare const HEAD_HEADER = "X-Timber-Head";
22
+ /**
23
+ * Maximum encoded payload size in characters (ASCII after encoding, so
24
+ * characters === bytes). Headers aren't meant for unbounded payloads;
25
+ * oversized head metadata is skipped rather than truncated — the client
26
+ * keeps its current head, which degrades gracefully.
27
+ */
28
+ export declare const HEAD_HEADER_MAX_LENGTH = 4096;
29
+ /**
30
+ * A rendered head element descriptor — the structural shape on the wire.
31
+ * Matches the server's `HeadElement` (route-element-builder.ts); the client
32
+ * narrows `tag` to 'title' | 'meta' | 'link' when applying to the DOM.
33
+ */
34
+ export interface HeadElementPayload {
35
+ tag: string;
36
+ content?: string;
37
+ attrs?: Record<string, string | null>;
38
+ }
39
+ /**
40
+ * Encode head elements for the X-Timber-Head header.
41
+ *
42
+ * Returns the percent-encoded JSON string, or null when the encoded
43
+ * payload exceeds HEAD_HEADER_MAX_LENGTH (caller skips the header).
44
+ */
45
+ export declare function encodeHeadHeader(headElements: HeadElementPayload[]): string | null;
46
+ /**
47
+ * Decode an X-Timber-Head header value back into head elements.
48
+ *
49
+ * Returns null when the value is missing or malformed (corrupted
50
+ * percent-encoding or invalid JSON) — callers treat null as "no head
51
+ * update" rather than failing the navigation or action.
52
+ */
53
+ export declare function decodeHeadHeader(header: string | null): HeadElementPayload[] | null;
54
+ //# sourceMappingURL=head-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"head-header.d.ts","sourceRoot":"","sources":["../../src/shared/head-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,8CAA8C;AAC9C,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;CACvC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,kBAAkB,EAAE,GAAG,MAAM,GAAG,IAAI,CAGlF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,kBAAkB,EAAE,GAAG,IAAI,CAQnF"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Shared href/URL validation for all navigation sinks.
3
+ *
4
+ * Used by <Link>, useRouter().push/replace, and redirectExternal().
5
+ * Single source of truth for dangerous-scheme detection — prevents
6
+ * control-character smuggling that bypasses naive regex checks.
7
+ *
8
+ * See design/13-security.md §"Link scheme injection" (test #9)
9
+ * and design/07-routing.md §"<Link> Scheme Validation".
10
+ */
11
+ /**
12
+ * Validate an href for navigation sinks (<Link>, useRouter, etc.).
13
+ *
14
+ * Rejects dangerous schemes (javascript:, data:, vbscript:) even when
15
+ * control characters are embedded to bypass naive regex checks.
16
+ * Also rejects protocol-relative URLs (//evil.com).
17
+ *
18
+ * Throws on rejection. Safe hrefs pass through silently.
19
+ */
20
+ export declare function validateNavigationHref(href: string): void;
21
+ /**
22
+ * Check if an href is internal (same-origin navigation) or external.
23
+ *
24
+ * Strips control characters before checking so that "java\tscript:" is
25
+ * correctly identified as having a scheme (and thus not internal).
26
+ */
27
+ export declare function isInternalHref(href: string): boolean;
28
+ /**
29
+ * Assert that a redirect target is a relative path — rejects absolute and
30
+ * protocol-relative URLs. Used by both the server `redirect()` primitive and
31
+ * the client next/navigation shim so they enforce identical semantics.
32
+ *
33
+ * Normalizes for validation only: strips C0 controls, trims, then replaces
34
+ * backslashes with forward slashes. Browsers normalize \ → / during URL
35
+ * resolution, so "/\evil.com" becomes "//evil.com" (protocol-relative open
36
+ * redirect). See design/13-security.md tests #8, #8a–#8c.
37
+ */
38
+ export declare function assertRelativeRedirectPath(path: string): void;
39
+ /**
40
+ * Validate and canonicalize an external redirect URL.
41
+ *
42
+ * Requires http: or https: scheme and checks origin against an allow-list.
43
+ * Returns the parsed canonical URL string (from URL.href) to prevent
44
+ * raw user input from reaching the Location header.
45
+ *
46
+ * @throws On invalid URL, dangerous scheme, or origin not in allow-list.
47
+ */
48
+ export declare function validateExternalRedirectUrl(url: string, allowList: string[]): string;
49
+ //# sourceMappingURL=href-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"href-validation.d.ts","sourceRoot":"","sources":["../../src/shared/href-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAuBH;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAqBzD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAUpD;AAKD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAiB7D;AAID;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAiCpF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shared utility for merging preserved search params into a target URL.
3
+ *
4
+ * Used by both <Link> (client) and redirect() (server). Extracted to a shared
5
+ * module to avoid importing client code ('use client') from server modules.
6
+ */
7
+ /**
8
+ * Merge preserved search params from the current URL into a target href.
9
+ *
10
+ * When `preserve` is `true`, all current search params are merged.
11
+ * When `preserve` is a `string[]`, only the named params are merged.
12
+ *
13
+ * The target href's own search params take precedence — preserved params
14
+ * are only added if the target doesn't already define them.
15
+ *
16
+ * @param targetHref - The resolved target href (may already contain query string)
17
+ * @param currentSearch - The current URL's search string (e.g. "?private=access&page=2")
18
+ * @param preserve - `true` to preserve all, or `string[]` to preserve specific params
19
+ * @returns The target href with preserved search params merged in
20
+ */
21
+ export declare function mergePreservedSearchParams(targetHref: string, currentSearch: string, preserve: true | string[]): string;
22
+ //# sourceMappingURL=merge-search-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-search-params.d.ts","sourceRoot":"","sources":["../../src/shared/merge-search-params.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,IAAI,GAAG,MAAM,EAAE,GACxB,MAAM,CA6BR"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Next.js redirect type discriminator.
3
+ *
4
+ * Provided for API compatibility with libraries that import `RedirectType`
5
+ * from `next/navigation`. In timber, `redirect()` always uses `replace`
6
+ * semantics (no history entry for the redirect itself).
7
+ *
8
+ * Lives in shared/ (isomorphic) so both the server primitives and the
9
+ * client-only next/navigation shim export the same definition without the
10
+ * client shim pulling in server code.
11
+ */
12
+ export declare const RedirectType: {
13
+ readonly push: "push";
14
+ readonly replace: "replace";
15
+ };
16
+ export type RedirectTypeValue = (typeof RedirectType)[keyof typeof RedirectType];
17
+ //# sourceMappingURL=redirect-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redirect-type.d.ts","sourceRoot":"","sources":["../../src/shared/redirect-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC"}
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * Design doc: 24-fonts.md, "Next.js Font Compatibility"
18
18
  */
19
- import type { GoogleFontConfig, FontResult } from '#/fonts/types.js';
19
+ import type { GoogleFontConfig, FontResult } from '../fonts/types.js';
20
20
  export type { GoogleFontConfig, FontResult };
21
21
  /**
22
22
  * Generic font loader — accepts any font name, returns a stub FontResult.
@@ -1 +1 @@
1
- {"version":3,"file":"font-google.d.ts","sourceRoot":"","sources":["../../src/shims/font-google.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAErE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC;AAkB7C;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,UAAU,CAEjF;AAID,eAAO,MAAM,KAAK,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAC7F,eAAO,MAAM,MAAM,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAC9F,eAAO,MAAM,SAAS,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AACjG,eAAO,MAAM,IAAI,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAC5F,eAAO,MAAM,UAAU,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAClG,eAAO,MAAM,OAAO,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAC/F,eAAO,MAAM,KAAK,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAC7F,eAAO,MAAM,UAAU,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAClG,eAAO,MAAM,cAAc,GAAI,SAAS,gBAAgB,KAAG,UAC7B,CAAC;AAC/B,eAAO,MAAM,eAAe,GAAI,SAAS,gBAAgB,KAAG,UAC9B,CAAC;AAC/B,eAAO,MAAM,gBAAgB,GAAI,SAAS,gBAAgB,KAAG,UAC/B,CAAC;AAC/B,eAAO,MAAM,YAAY,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC"}
1
+ {"version":3,"file":"font-google.d.ts","sourceRoot":"","sources":["../../src/shims/font-google.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEtE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC;AAkB7C;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,UAAU,CAEjF;AAID,eAAO,MAAM,KAAK,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAC7F,eAAO,MAAM,MAAM,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAC9F,eAAO,MAAM,SAAS,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AACjG,eAAO,MAAM,IAAI,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAC5F,eAAO,MAAM,UAAU,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAClG,eAAO,MAAM,OAAO,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAC/F,eAAO,MAAM,KAAK,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAC7F,eAAO,MAAM,UAAU,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC;AAClG,eAAO,MAAM,cAAc,GAAI,SAAS,gBAAgB,KAAG,UAC7B,CAAC;AAC/B,eAAO,MAAM,eAAe,GAAI,SAAS,gBAAgB,KAAG,UAC9B,CAAC;AAC/B,eAAO,MAAM,gBAAgB,GAAI,SAAS,gBAAgB,KAAG,UAC/B,CAAC;AAC/B,eAAO,MAAM,YAAY,GAAI,SAAS,gBAAgB,KAAG,UAA0C,CAAC"}
@@ -0,0 +1,42 @@
1
+ //#region src/shims/font-google.ts
2
+ /**
3
+ * Create a stub FontResult with empty values.
4
+ *
5
+ * The timber-fonts plugin replaces these calls at build time with real
6
+ * class names and font stacks. This stub ensures code that imports
7
+ * font functions outside of the build pipeline (tests, type-checking)
8
+ * gets a valid FontResult shape without runtime errors.
9
+ */
10
+ function createStubFontResult(config) {
11
+ return {
12
+ className: "",
13
+ style: { fontFamily: "" },
14
+ variable: config?.variable
15
+ };
16
+ }
17
+ /**
18
+ * Generic font loader — accepts any font name, returns a stub FontResult.
19
+ *
20
+ * Named exports like `Inter`, `Roboto`, etc. are generated dynamically
21
+ * by the virtual module at build time. This function provides a catch-all
22
+ * for non-Vite contexts.
23
+ */
24
+ function createFont(_family, config) {
25
+ return createStubFontResult(config);
26
+ }
27
+ var Inter = (config) => createStubFontResult(config);
28
+ var Roboto = (config) => createStubFontResult(config);
29
+ var Open_Sans = (config) => createStubFontResult(config);
30
+ var Lato = (config) => createStubFontResult(config);
31
+ var Montserrat = (config) => createStubFontResult(config);
32
+ var Poppins = (config) => createStubFontResult(config);
33
+ var Geist = (config) => createStubFontResult(config);
34
+ var Geist_Mono = (config) => createStubFontResult(config);
35
+ var JetBrains_Mono = (config) => createStubFontResult(config);
36
+ var Source_Code_Pro = (config) => createStubFontResult(config);
37
+ var Playfair_Display = (config) => createStubFontResult(config);
38
+ var Merriweather = (config) => createStubFontResult(config);
39
+ //#endregion
40
+ export { Geist, Geist_Mono, Inter, JetBrains_Mono, Lato, Merriweather, Montserrat, Open_Sans, Playfair_Display, Poppins, Roboto, Source_Code_Pro, createFont };
41
+
42
+ //# sourceMappingURL=font-google.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-google.js","names":[],"sources":["../../src/shims/font-google.ts"],"sourcesContent":["/**\n * Fallback shim for `next/font/google` → `@timber/fonts/google`.\n *\n * At build time, the timber-fonts plugin's transform hook replaces font\n * function calls with static FontResult objects containing real class names\n * and font stacks. This file serves two purposes:\n *\n * 1. **TypeScript resolution** — provides types for IDEs and `tsc` outside\n * of Vite's module graph (where the virtual module handles it).\n * 2. **Runtime fallback** — returns empty className/fontFamily values when\n * the plugin hasn't processed a call (e.g. in tests or non-Vite environments).\n *\n * The shim resolution path (`next/font/google` → `\\0@timber/fonts/google`)\n * is unchanged — this file is NOT on that resolution path. It exists as a\n * physical module for direct imports and type re-exports.\n *\n * Design doc: 24-fonts.md, \"Next.js Font Compatibility\"\n */\n\nimport type { GoogleFontConfig, FontResult } from '../fonts/types.js';\n\nexport type { GoogleFontConfig, FontResult };\n\n/**\n * Create a stub FontResult with empty values.\n *\n * The timber-fonts plugin replaces these calls at build time with real\n * class names and font stacks. This stub ensures code that imports\n * font functions outside of the build pipeline (tests, type-checking)\n * gets a valid FontResult shape without runtime errors.\n */\nfunction createStubFontResult(config?: GoogleFontConfig): FontResult {\n return {\n className: '',\n style: { fontFamily: '' },\n variable: config?.variable,\n };\n}\n\n/**\n * Generic font loader — accepts any font name, returns a stub FontResult.\n *\n * Named exports like `Inter`, `Roboto`, etc. are generated dynamically\n * by the virtual module at build time. This function provides a catch-all\n * for non-Vite contexts.\n */\nexport function createFont(_family: string, config?: GoogleFontConfig): FontResult {\n return createStubFontResult(config);\n}\n\n// Common Google Font exports for TypeScript autocomplete.\n// These are stubs — the virtual module and transform hook provide real values.\nexport const Inter = (config?: GoogleFontConfig): FontResult => createStubFontResult(config);\nexport const Roboto = (config?: GoogleFontConfig): FontResult => createStubFontResult(config);\nexport const Open_Sans = (config?: GoogleFontConfig): FontResult => createStubFontResult(config);\nexport const Lato = (config?: GoogleFontConfig): FontResult => createStubFontResult(config);\nexport const Montserrat = (config?: GoogleFontConfig): FontResult => createStubFontResult(config);\nexport const Poppins = (config?: GoogleFontConfig): FontResult => createStubFontResult(config);\nexport const Geist = (config?: GoogleFontConfig): FontResult => createStubFontResult(config);\nexport const Geist_Mono = (config?: GoogleFontConfig): FontResult => createStubFontResult(config);\nexport const JetBrains_Mono = (config?: GoogleFontConfig): FontResult =>\n createStubFontResult(config);\nexport const Source_Code_Pro = (config?: GoogleFontConfig): FontResult =>\n createStubFontResult(config);\nexport const Playfair_Display = (config?: GoogleFontConfig): FontResult =>\n createStubFontResult(config);\nexport const Merriweather = (config?: GoogleFontConfig): FontResult => createStubFontResult(config);\n"],"mappings":";;;;;;;;;AA+BA,SAAS,qBAAqB,QAAuC;CACnE,OAAO;EACL,WAAW;EACX,OAAO,EAAE,YAAY,GAAG;EACxB,UAAU,QAAQ;CACpB;AACF;;;;;;;;AASA,SAAgB,WAAW,SAAiB,QAAuC;CACjF,OAAO,qBAAqB,MAAM;AACpC;AAIA,IAAa,SAAS,WAA0C,qBAAqB,MAAM;AAC3F,IAAa,UAAU,WAA0C,qBAAqB,MAAM;AAC5F,IAAa,aAAa,WAA0C,qBAAqB,MAAM;AAC/F,IAAa,QAAQ,WAA0C,qBAAqB,MAAM;AAC1F,IAAa,cAAc,WAA0C,qBAAqB,MAAM;AAChG,IAAa,WAAW,WAA0C,qBAAqB,MAAM;AAC7F,IAAa,SAAS,WAA0C,qBAAqB,MAAM;AAC3F,IAAa,cAAc,WAA0C,qBAAqB,MAAM;AAChG,IAAa,kBAAkB,WAC7B,qBAAqB,MAAM;AAC7B,IAAa,mBAAmB,WAC9B,qBAAqB,MAAM;AAC7B,IAAa,oBAAoB,WAC/B,qBAAqB,MAAM;AAC7B,IAAa,gBAAgB,WAA0C,qBAAqB,MAAM"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Fallback shim for `next/font/local` → `@timber/fonts/local`.
3
+ *
4
+ * At build time, the timber-fonts plugin's transform hook replaces
5
+ * `localFont()` calls with static FontResult objects containing real
6
+ * class names and font stacks. This file serves two purposes:
7
+ *
8
+ * 1. **TypeScript resolution** — provides types for IDEs and `tsc` outside
9
+ * of Vite's module graph (where the virtual module handles it).
10
+ * 2. **Runtime fallback** — returns empty className/fontFamily values when
11
+ * the plugin hasn't processed a call (e.g. in tests or non-Vite environments).
12
+ *
13
+ * Design doc: 24-fonts.md, "Next.js Font Compatibility"
14
+ */
15
+ import type { LocalFontConfig, FontResult } from '../fonts/types.js';
16
+ export type { LocalFontConfig, FontResult };
17
+ /**
18
+ * Create a local font.
19
+ *
20
+ * The timber-fonts plugin replaces these calls at build time with real
21
+ * class names and font stacks. This stub ensures code that imports
22
+ * `localFont` outside of the build pipeline (tests, type-checking)
23
+ * gets a valid FontResult shape without runtime errors.
24
+ */
25
+ export default function localFont(config?: LocalFontConfig): FontResult;
26
+ //# sourceMappingURL=font-local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-local.d.ts","sourceRoot":"","sources":["../../src/shims/font-local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAErE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,UAAU,CAMtE"}
@@ -0,0 +1,20 @@
1
+ //#region src/shims/font-local.ts
2
+ /**
3
+ * Create a local font.
4
+ *
5
+ * The timber-fonts plugin replaces these calls at build time with real
6
+ * class names and font stacks. This stub ensures code that imports
7
+ * `localFont` outside of the build pipeline (tests, type-checking)
8
+ * gets a valid FontResult shape without runtime errors.
9
+ */
10
+ function localFont(config) {
11
+ return {
12
+ className: "",
13
+ style: { fontFamily: "" },
14
+ variable: config?.variable
15
+ };
16
+ }
17
+ //#endregion
18
+ export { localFont as default };
19
+
20
+ //# sourceMappingURL=font-local.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-local.js","names":[],"sources":["../../src/shims/font-local.ts"],"sourcesContent":["/**\n * Fallback shim for `next/font/local` → `@timber/fonts/local`.\n *\n * At build time, the timber-fonts plugin's transform hook replaces\n * `localFont()` calls with static FontResult objects containing real\n * class names and font stacks. This file serves two purposes:\n *\n * 1. **TypeScript resolution** — provides types for IDEs and `tsc` outside\n * of Vite's module graph (where the virtual module handles it).\n * 2. **Runtime fallback** — returns empty className/fontFamily values when\n * the plugin hasn't processed a call (e.g. in tests or non-Vite environments).\n *\n * Design doc: 24-fonts.md, \"Next.js Font Compatibility\"\n */\n\nimport type { LocalFontConfig, FontResult } from '../fonts/types.js';\n\nexport type { LocalFontConfig, FontResult };\n\n/**\n * Create a local font.\n *\n * The timber-fonts plugin replaces these calls at build time with real\n * class names and font stacks. This stub ensures code that imports\n * `localFont` outside of the build pipeline (tests, type-checking)\n * gets a valid FontResult shape without runtime errors.\n */\nexport default function localFont(config?: LocalFontConfig): FontResult {\n return {\n className: '',\n style: { fontFamily: '' },\n variable: config?.variable,\n };\n}\n"],"mappings":";;;;;;;;;AA2BA,SAAwB,UAAU,QAAsC;CACtE,OAAO;EACL,WAAW;EACX,OAAO,EAAE,YAAY,GAAG;EACxB,UAAU,QAAQ;CACpB;AACF"}
@@ -4,6 +4,58 @@
4
4
  * Imports from @timber-js/app/server which Vite resolves to dist/server/index.js
5
5
  * via native package.json exports. This ensures the same ALS singleton as the
6
6
  * pipeline (both import from the same shared request-context chunk in dist/).
7
+ *
8
+ * `cookies()` is NOT a bare alias of `getCookieJar()`: Next.js's
9
+ * RequestCookies returns `{ name, value }` RequestCookie objects from
10
+ * `.get()`/`.getAll()`, while timber's native jar returns bare strings from
11
+ * `.get()`. Ecosystem libraries written against the real API use
12
+ * `(await cookies()).get('session')?.value` — with the bare-string shape
13
+ * that silently reads `undefined` off a string. The adapter below presents
14
+ * the Next shape while delegating every operation to the timber jar, so the
15
+ * encoding contract, cookie-octet validation, and mutable-context checks
16
+ * (design/29-cookies.md, ONGOING_SECURITY.md H-3) apply unchanged.
17
+ * See TIM-1042 and design/14-ecosystem.md §next/headers.
18
+ */
19
+ import type { CookieOptions, SetCookieOptions } from '@timber-js/app/server';
20
+ export { getHeaders, getCookieJar } from '@timber-js/app/server';
21
+ export { getHeaders as headers } from '@timber-js/app/server';
22
+ /** Next.js's request cookie shape: `cookies().get(name)` → `{ name, value }`. */
23
+ export interface RequestCookie {
24
+ name: string;
25
+ value: string;
26
+ }
27
+ /** Next.js's `cookies().set()` options — `expires` may be a ms timestamp. */
28
+ export interface NextCookieOptions extends Omit<SetCookieOptions, 'expires'> {
29
+ expires?: Date | number;
30
+ }
31
+ /** Next.js's object overload for `cookies().set({ name, value, ...options })`. */
32
+ export interface NextCookieListItem extends NextCookieOptions {
33
+ name: string;
34
+ value: string;
35
+ }
36
+ /** Next.js's RequestCookies surface, backed by timber's cookie jar. */
37
+ export interface NextRequestCookies {
38
+ get(name: string): RequestCookie | undefined;
39
+ get(cookie: RequestCookie): RequestCookie | undefined;
40
+ getAll(name?: string): RequestCookie[];
41
+ getAll(cookie: RequestCookie): RequestCookie[];
42
+ has(name: string): boolean;
43
+ readonly size: number;
44
+ set(name: string, value: string, options?: NextCookieOptions): void;
45
+ set(cookie: NextCookieListItem): void;
46
+ delete(name: string): void;
47
+ delete(cookie: {
48
+ name: string;
49
+ } & Pick<CookieOptions, 'path' | 'domain'>): void;
50
+ [Symbol.iterator](): IterableIterator<[string, RequestCookie]>;
51
+ toString(): string;
52
+ }
53
+ /**
54
+ * Next.js compat: `cookies()` returning the RequestCookies shape.
55
+ *
56
+ * Next.js 15 makes `cookies()` async; awaiting this sync return value works
57
+ * for both the `(await cookies()).get()` and legacy `cookies().get()` call
58
+ * styles, so libraries targeting either Next version resolve correctly.
7
59
  */
8
- export { headers, cookies } from '@timber-js/app/server';
60
+ export declare function cookies(): NextRequestCookies;
9
61
  //# sourceMappingURL=headers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../src/shims/headers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../src/shims/headers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG7E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGjE,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE9D,iFAAiF;AACjF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,6EAA6E;AAC7E,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC;IAC1E,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;CACzB;AAED,kFAAkF;AAClF,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,uEAAuE;AACvE,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAC7C,GAAG,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,GAAG,SAAS,CAAC;IACtD,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,aAAa,EAAE,CAAC;IACvC,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,EAAE,CAAC;IAC/C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACpE,GAAG,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACtC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,IAAI,CAAC;IAChF,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IAC/D,QAAQ,IAAI,MAAM,CAAC;CACpB;AAUD;;;;;;GAMG;AACH,wBAAgB,OAAO,IAAI,kBAAkB,CAqD5C"}
@@ -34,7 +34,7 @@ export declare function Image({ priority: _priority, quality: _quality, fill: _f
34
34
  alt?: string | undefined;
35
35
  crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
36
36
  decoding?: "async" | "auto" | "sync" | undefined;
37
- fetchPriority?: "high" | "low" | "auto";
37
+ fetchPriority?: "high" | "low" | "auto" | undefined;
38
38
  height?: number | string | undefined;
39
39
  loading?: "eager" | "lazy" | undefined;
40
40
  referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
@@ -51,17 +51,17 @@ export declare function Image({ priority: _priority, quality: _quality, fill: _f
51
51
  autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
52
52
  autoFocus?: boolean | undefined;
53
53
  className?: string | undefined;
54
- contentEditable?: (boolean | "false" | "true") | "inherit" | "plaintext-only" | undefined;
54
+ contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
55
55
  contextMenu?: string | undefined;
56
56
  dir?: string | undefined;
57
- draggable?: (boolean | "false" | "true") | undefined;
57
+ draggable?: (boolean | "true" | "false") | undefined;
58
58
  enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
59
59
  hidden?: boolean | undefined;
60
60
  id?: string | undefined;
61
61
  lang?: string | undefined;
62
62
  nonce?: string | undefined;
63
63
  slot?: string | undefined;
64
- spellCheck?: (boolean | "false" | "true") | undefined;
64
+ spellCheck?: (boolean | "true" | "false") | undefined;
65
65
  style?: import("react").CSSProperties | undefined;
66
66
  tabIndex?: number | undefined;
67
67
  title?: string | undefined;
@@ -99,11 +99,11 @@ export declare function Image({ priority: _priority, quality: _quality, fill: _f
99
99
  exportparts?: string | undefined;
100
100
  part?: string | undefined;
101
101
  "aria-activedescendant"?: string | undefined;
102
- "aria-atomic"?: (boolean | "false" | "true") | undefined;
102
+ "aria-atomic"?: (boolean | "true" | "false") | undefined;
103
103
  "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
104
104
  "aria-braillelabel"?: string | undefined;
105
105
  "aria-brailleroledescription"?: string | undefined;
106
- "aria-busy"?: (boolean | "false" | "true") | undefined;
106
+ "aria-busy"?: (boolean | "true" | "false") | undefined;
107
107
  "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
108
108
  "aria-colcount"?: number | undefined;
109
109
  "aria-colindex"?: number | undefined;
@@ -114,37 +114,37 @@ export declare function Image({ priority: _priority, quality: _quality, fill: _f
114
114
  "aria-describedby"?: string | undefined;
115
115
  "aria-description"?: string | undefined;
116
116
  "aria-details"?: string | undefined;
117
- "aria-disabled"?: (boolean | "false" | "true") | undefined;
117
+ "aria-disabled"?: (boolean | "true" | "false") | undefined;
118
118
  "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
119
119
  "aria-errormessage"?: string | undefined;
120
- "aria-expanded"?: (boolean | "false" | "true") | undefined;
120
+ "aria-expanded"?: (boolean | "true" | "false") | undefined;
121
121
  "aria-flowto"?: string | undefined;
122
- "aria-grabbed"?: (boolean | "false" | "true") | undefined;
122
+ "aria-grabbed"?: (boolean | "true" | "false") | undefined;
123
123
  "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
124
- "aria-hidden"?: (boolean | "false" | "true") | undefined;
124
+ "aria-hidden"?: (boolean | "true" | "false") | undefined;
125
125
  "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
126
126
  "aria-keyshortcuts"?: string | undefined;
127
127
  "aria-label"?: string | undefined;
128
128
  "aria-labelledby"?: string | undefined;
129
129
  "aria-level"?: number | undefined;
130
130
  "aria-live"?: "off" | "assertive" | "polite" | undefined;
131
- "aria-modal"?: (boolean | "false" | "true") | undefined;
132
- "aria-multiline"?: (boolean | "false" | "true") | undefined;
133
- "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
131
+ "aria-modal"?: (boolean | "true" | "false") | undefined;
132
+ "aria-multiline"?: (boolean | "true" | "false") | undefined;
133
+ "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
134
134
  "aria-orientation"?: "horizontal" | "vertical" | undefined;
135
135
  "aria-owns"?: string | undefined;
136
136
  "aria-placeholder"?: string | undefined;
137
137
  "aria-posinset"?: number | undefined;
138
138
  "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
139
- "aria-readonly"?: (boolean | "false" | "true") | undefined;
139
+ "aria-readonly"?: (boolean | "true" | "false") | undefined;
140
140
  "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
141
- "aria-required"?: (boolean | "false" | "true") | undefined;
141
+ "aria-required"?: (boolean | "true" | "false") | undefined;
142
142
  "aria-roledescription"?: string | undefined;
143
143
  "aria-rowcount"?: number | undefined;
144
144
  "aria-rowindex"?: number | undefined;
145
145
  "aria-rowindextext"?: string | undefined;
146
146
  "aria-rowspan"?: number | undefined;
147
- "aria-selected"?: (boolean | "false" | "true") | undefined;
147
+ "aria-selected"?: (boolean | "true" | "false") | undefined;
148
148
  "aria-setsize"?: number | undefined;
149
149
  "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
150
150
  "aria-valuemax"?: number | undefined;
@@ -1,12 +1,19 @@
1
1
  /**
2
2
  * Shim: next/navigation (client environment only)
3
3
  *
4
- * Re-exports only the client-side hooks from timber's client API.
5
- * Server-only functions (redirect, notFound, etc.) are excluded to prevent
6
- * server/primitives.ts from being pulled into the browser bundle.
4
+ * Re-exports the client-side hooks from timber's client API, and implements
5
+ * client-render `redirect()` / `permanentRedirect()` / `notFound()` without
6
+ * pulling server/primitives.ts into the browser bundle.
7
+ *
8
+ * Next.js supports calling redirect()/notFound() during client component
9
+ * render. timber matches that by throwing a plain Error carrying the same
10
+ * JSON digest the server pipeline attaches to RedirectSignal/DenySignal.
11
+ * TimberErrorBoundary recognizes the digest and converts it to an SPA
12
+ * navigation (redirect) or a status-code fallback (notFound), and
13
+ * browser-dev's isFrameworkSignalError() keeps it out of the dev overlay.
7
14
  *
8
15
  * The full shim (navigation.ts) is still used in the RSC and SSR environments
9
- * where both client hooks and server functions are needed.
16
+ * where the real server primitives produce proper HTTP responses.
10
17
  *
11
18
  * Imports use @timber-js/app/client (not #/ subpath imports) so they resolve
12
19
  * to the same module instances as user code in Vite dev — preventing module
@@ -15,12 +22,29 @@
15
22
  *
16
23
  * See design/14-ecosystem.md §"next/navigation" for the full shim audit.
17
24
  */
18
- export { useParams, usePathname, useSearchParams, useRouter, useSelectedLayoutSegment, useSelectedLayoutSegments, } from '@timber-js/app/client';
19
- export declare const RedirectType: {
20
- readonly push: "push";
21
- readonly replace: "replace";
22
- };
23
- export declare function redirect(): never;
24
- export declare function permanentRedirect(): never;
25
+ import type { RedirectTypeValue } from '../shared/redirect-type.js';
26
+ export { useSegmentParams, useSegmentParams as useParams } from '../client/use-segment-params.js';
27
+ export { useSearchParams } from '../client/use-search-params.js';
28
+ export { usePathname, useRouter, useSelectedLayoutSegment, useSelectedLayoutSegments, } from '@timber-js/app/client';
29
+ export { RedirectType } from '../shared/redirect-type.js';
30
+ /**
31
+ * Client-render redirect. Throws a redirect-digest error that the nearest
32
+ * TimberErrorBoundary converts into an SPA navigation (replace semantics).
33
+ *
34
+ * The optional RedirectType argument is accepted for Next.js API
35
+ * compatibility but ignored — timber always uses replace semantics,
36
+ * matching the server-side redirect().
37
+ */
38
+ export declare function redirect(path: string, _type?: RedirectTypeValue): never;
39
+ /**
40
+ * Client-render permanent redirect. On the client there is no HTTP status —
41
+ * this behaves identically to redirect() apart from the digest's status.
42
+ */
43
+ export declare function permanentRedirect(path: string, _type?: RedirectTypeValue): never;
44
+ /**
45
+ * Client-render notFound. Throws a deny-digest error (status 404) that the
46
+ * nearest matching TimberErrorBoundary renders as the 404 fallback. The
47
+ * message matches DenySignal's so digest-less fallback parsing still works.
48
+ */
25
49
  export declare function notFound(): never;
26
50
  //# sourceMappingURL=navigation-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-client.d.ts","sourceRoot":"","sources":["../../src/shims/navigation-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EACf,SAAS,EACT,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAI/B,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAKX,wBAAgB,QAAQ,IAAI,KAAK,CAKhC;AAED,wBAAgB,iBAAiB,IAAI,KAAK,CAKzC;AAED,wBAAgB,QAAQ,IAAI,KAAK,CAIhC"}
1
+ {"version":3,"file":"navigation-client.d.ts","sourceRoot":"","sources":["../../src/shims/navigation-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAIpE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,IAAI,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,WAAW,EACX,SAAS,EACT,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAS1D;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,iBAAiB,GAAG,KAAK,CAGvE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,iBAAiB,GAAG,KAAK,CAGhF;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,KAAK,CAEhC"}
@@ -1,10 +1,16 @@
1
1
  /**
2
2
  * Shim: next/navigation → timber navigation primitives
3
3
  *
4
- * Client hooks import from @timber-js/app/client (the public barrel) so they
5
- * resolve to the same module instances as user code in Vite dev. Server
6
- * functions import from @timber-js/app/server for ALS singleton consistency.
4
+ * Client hooks import from their direct modules since useSegmentParams,
5
+ * useSearchParams, and useQueryStates are no longer part of
6
+ * @timber-js/app/client public exports (they live on define* factories).
7
+ * The shim re-exports them for next/navigation library compat (nuqs etc).
8
+ *
9
+ * Server functions import from @timber-js/app/server for ALS singleton consistency.
7
10
  */
8
- export { useParams, usePathname, useSearchParams, useRouter, useSelectedLayoutSegment, useSelectedLayoutSegments, } from '@timber-js/app/client';
9
- export { redirect, permanentRedirect, notFound, RedirectType } from '@timber-js/app/server';
11
+ export { useSegmentParams, useSegmentParams as useParams } from '../client/use-segment-params.js';
12
+ export { useSearchParams } from '../client/use-search-params.js';
13
+ export { usePathname, useRouter, useSelectedLayoutSegment, useSelectedLayoutSegments, } from '@timber-js/app/client';
14
+ export { redirect, redirectExternal, RedirectType } from '@timber-js/app/server';
15
+ export { permanentRedirect, notFound } from '../server/primitives.js';
10
16
  //# sourceMappingURL=navigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/shims/navigation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EACf,SAAS,EACT,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/shims/navigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,IAAI,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,WAAW,EACX,SAAS,EACT,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIjF,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC"}