@farm.js/core 0.1.77 → 0.1.80

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 (521) hide show
  1. package/dist/after.cjs +1 -1
  2. package/dist/after.mjs +1 -1
  3. package/dist/{agent-mcp-handler-PJKZHYSA.mjs → agent-mcp-handler-GDY5CPPW.mjs} +6 -6
  4. package/dist/{agent-mcp-handler-73SGWVZT.cjs → agent-mcp-handler-IUL6OPC3.cjs} +7 -7
  5. package/dist/{agent-mcp.d-B1h3RznZ.d.ts → agent-mcp.d-BPa5n0ld.d.ts} +1 -1
  6. package/dist/{agent-mcp.d-WFQotg8M.d.mts → agent-mcp.d-DOP95Jxm.d.mts} +1 -1
  7. package/dist/agent-runtime.cjs +3 -3
  8. package/dist/agent-runtime.d.mts +4 -4
  9. package/dist/agent-runtime.d.ts +4 -4
  10. package/dist/agent-runtime.mjs +2 -2
  11. package/dist/{analyzer-64YS2OXQ.mjs → analyzer-F7CWE5VA.mjs} +3 -3
  12. package/dist/analyzer-I7RBBQ65.cjs +16 -0
  13. package/dist/api/client.cjs +1 -1
  14. package/dist/api/client.mjs +1 -1
  15. package/dist/api/client.native.cjs +1 -1
  16. package/dist/api/client.native.mjs +1 -1
  17. package/dist/api/node.cjs +7 -7
  18. package/dist/api/node.d.mts +6 -6
  19. package/dist/api/node.d.ts +6 -6
  20. package/dist/api/node.mjs +6 -6
  21. package/dist/api/route-manager.cjs +10 -10
  22. package/dist/api/route-manager.d.mts +6 -6
  23. package/dist/api/route-manager.d.ts +6 -6
  24. package/dist/api/route-manager.mjs +9 -9
  25. package/dist/api/runtime.cjs +6 -6
  26. package/dist/api/runtime.d.mts +5 -5
  27. package/dist/api/runtime.d.ts +5 -5
  28. package/dist/api/runtime.mjs +5 -5
  29. package/dist/api.cjs +12 -12
  30. package/dist/api.d.mts +7 -7
  31. package/dist/api.d.ts +7 -7
  32. package/dist/api.mjs +11 -11
  33. package/dist/{app-manifest.d-EZEYG-tD.d.mts → app-manifest.d-9UD6BznX.d.mts} +1 -1
  34. package/dist/{app-manifest.d-Ktsqsuk9.d.ts → app-manifest.d-CO6Iu0Hx.d.ts} +1 -1
  35. package/dist/app-markdown.cjs +6 -6
  36. package/dist/app-markdown.d.mts +5 -5
  37. package/dist/app-markdown.d.ts +5 -5
  38. package/dist/app-markdown.mjs +5 -5
  39. package/dist/{app.d-DTkqYcIr.d.mts → app.d-DXeRWZK7.d.mts} +4 -4
  40. package/dist/{app.d-CSh3y8w8.d.ts → app.d-DwX1ePhs.d.ts} +4 -4
  41. package/dist/cache.cjs +4 -4
  42. package/dist/cache.mjs +3 -3
  43. package/dist/{chunk-QYOAGT3E.cjs → chunk-2BEGVSDF.cjs} +6 -5
  44. package/dist/{chunk-WW62HKA2.cjs → chunk-2FK47RRZ.cjs} +15 -15
  45. package/dist/{chunk-2YJ4DHTD.cjs → chunk-2NOHVIJ3.cjs} +2 -2
  46. package/dist/{chunk-GDM3ZD2O.cjs → chunk-2OFP3IVA.cjs} +5 -1
  47. package/dist/{chunk-JRBWBMP2.mjs → chunk-2RRTOKRZ.mjs} +1 -1
  48. package/dist/{chunk-BTHNOAOF.mjs → chunk-3JQBQG7K.mjs} +4 -4
  49. package/dist/{chunk-H76C5AOU.mjs → chunk-3K2E55BJ.mjs} +2 -2
  50. package/dist/{chunk-VJ6L7TII.cjs → chunk-3SPECQXI.cjs} +31 -20
  51. package/dist/{chunk-FNVGK72M.mjs → chunk-44G4XHEL.mjs} +15 -8
  52. package/dist/{chunk-63EFR2WF.cjs → chunk-4H4ZXUNB.cjs} +3 -3
  53. package/dist/{chunk-ZBE5EHVJ.mjs → chunk-4MIDUSIX.mjs} +14 -14
  54. package/dist/{chunk-F4ID7BGO.cjs → chunk-4OFWG4IK.cjs} +7 -7
  55. package/dist/{chunk-WXMR3OHY.mjs → chunk-4WXNTAOM.mjs} +1 -1
  56. package/dist/{chunk-LTDMJD2F.cjs → chunk-5OAN7BG5.cjs} +12 -12
  57. package/dist/{chunk-MQW4LHJR.cjs → chunk-5VDJEKGK.cjs} +4 -4
  58. package/dist/{chunk-CYNQPKA4.cjs → chunk-5ZHC6QGD.cjs} +2 -2
  59. package/dist/{chunk-ALEUMLJN.mjs → chunk-67JTJCAS.mjs} +3 -2
  60. package/dist/{chunk-WHNNDFCJ.mjs → chunk-6GJZJAED.mjs} +1 -1
  61. package/dist/{chunk-SYPEMXW2.mjs → chunk-6MZSTPD2.mjs} +1 -1
  62. package/dist/{chunk-SFSTZ7TB.cjs → chunk-7DD5TNPS.cjs} +8 -8
  63. package/dist/{chunk-GC5ROI3A.cjs → chunk-7U4XF76R.cjs} +1 -1
  64. package/dist/{chunk-QVBXTSIZ.mjs → chunk-7V5M43ND.mjs} +1 -1
  65. package/dist/{chunk-62DZHPDK.cjs → chunk-7YLDUB4R.cjs} +10 -10
  66. package/dist/{chunk-7EOSFIPN.cjs → chunk-A4WWKG2B.cjs} +2 -2
  67. package/dist/{chunk-OCKQ3YOH.mjs → chunk-A5D3UMLJ.mjs} +2 -2
  68. package/dist/{chunk-DSRWQ4SJ.cjs → chunk-ANZLZNNX.cjs} +83 -25
  69. package/dist/{chunk-CSAIIMY3.mjs → chunk-ATISIC6G.mjs} +1 -1
  70. package/dist/{chunk-FVVGEGQ2.cjs → chunk-AXA2BSX3.cjs} +2 -2
  71. package/dist/{chunk-BNCKXPCU.cjs → chunk-BIAGSYIZ.cjs} +30 -30
  72. package/dist/{chunk-FPGSIOWS.mjs → chunk-BPWTSPK6.mjs} +3 -3
  73. package/dist/{chunk-UYACD4SH.cjs → chunk-CCMP4JD2.cjs} +1 -1
  74. package/dist/{chunk-JHZ6HULQ.cjs → chunk-CGIVCGH5.cjs} +2 -2
  75. package/dist/{chunk-ERT6HQAI.mjs → chunk-CNDBLUKI.mjs} +2 -2
  76. package/dist/{chunk-3AJQFVWW.mjs → chunk-COTFX4GT.mjs} +2 -2
  77. package/dist/{chunk-RK4MGL6Q.mjs → chunk-CYRO3WP4.mjs} +4 -3
  78. package/dist/{chunk-PUEPDMWY.cjs → chunk-DVHFIETW.cjs} +29 -22
  79. package/dist/{chunk-F35C3TJZ.mjs → chunk-E4E4Y5FD.mjs} +1 -1
  80. package/dist/{chunk-TQOYIPMQ.mjs → chunk-EG5YBYHO.mjs} +2 -2
  81. package/dist/{chunk-2DA7CLY7.mjs → chunk-EILUVBKS.mjs} +14 -0
  82. package/dist/{chunk-GAAK3HDZ.mjs → chunk-EY7ED5UW.mjs} +6 -6
  83. package/dist/{chunk-ZO6TOLHL.mjs → chunk-FS55CNTC.mjs} +1 -1
  84. package/dist/{chunk-YRQ44JTF.cjs → chunk-G4SZC2WH.cjs} +649 -446
  85. package/dist/{chunk-OQZF6H6G.cjs → chunk-GAWSWJJ2.cjs} +27 -27
  86. package/dist/{chunk-QUEYL2WM.cjs → chunk-GBESKA76.cjs} +4 -4
  87. package/dist/{chunk-NTHAZLVS.mjs → chunk-GBW5DU7V.mjs} +385 -182
  88. package/dist/{chunk-OVUU2RCQ.mjs → chunk-HD5FLXP2.mjs} +1 -1
  89. package/dist/{chunk-Q2EKSSEG.cjs → chunk-HEDGTXXB.cjs} +14 -14
  90. package/dist/{chunk-5QZT2EQN.cjs → chunk-HNUBRUFQ.cjs} +2 -2
  91. package/dist/{chunk-JA6RML7C.mjs → chunk-HR4N2K4V.mjs} +2 -2
  92. package/dist/{chunk-6D3CJFNU.cjs → chunk-HR5GU4UU.cjs} +7 -7
  93. package/dist/{chunk-SX535SU5.cjs → chunk-IJPRCQHW.cjs} +10 -10
  94. package/dist/{chunk-SMYDCZBW.mjs → chunk-JGEN2FIT.mjs} +1 -1
  95. package/dist/{chunk-3GMD2E4Q.mjs → chunk-K3XKEZR6.mjs} +3 -3
  96. package/dist/{chunk-LPXJEZJK.mjs → chunk-KCJBIWBM.mjs} +2 -2
  97. package/dist/{chunk-IXC6WDMT.mjs → chunk-KEU55O2D.mjs} +1 -1
  98. package/dist/{chunk-5WFPZG7K.mjs → chunk-KKVRWNDH.mjs} +6 -6
  99. package/dist/{chunk-NSNQLBHR.cjs → chunk-KMGHXIDA.cjs} +2 -2
  100. package/dist/{chunk-Z2FFLTF5.mjs → chunk-LTXKRIST.mjs} +2 -2
  101. package/dist/{chunk-YROK6CJC.cjs → chunk-LVGB5PYK.cjs} +30 -30
  102. package/dist/{chunk-QODXWUGQ.mjs → chunk-MDEFTF63.mjs} +69 -14
  103. package/dist/{chunk-FTQUNBRN.cjs → chunk-MHKPXX3J.cjs} +2 -2
  104. package/dist/{chunk-HFJLMALC.cjs → chunk-MQOHYV6L.cjs} +17 -17
  105. package/dist/{chunk-BGUTIQII.mjs → chunk-MUZHULW2.mjs} +1 -1
  106. package/dist/{chunk-WGNGM6MJ.mjs → chunk-MZ5QGWRW.mjs} +2 -2
  107. package/dist/{chunk-DZZHTMWM.cjs → chunk-N3H7UPBM.cjs} +3 -2
  108. package/dist/{chunk-CF74ABRI.mjs → chunk-NJ4OASLP.mjs} +4 -4
  109. package/dist/{chunk-RFXEQYPH.cjs → chunk-NW3DL2PM.cjs} +83 -24
  110. package/dist/{chunk-QDHR54S6.cjs → chunk-OBVBII5K.cjs} +5 -5
  111. package/dist/{chunk-WRWJ7IWT.cjs → chunk-OLKYHTLN.cjs} +5 -5
  112. package/dist/{chunk-EVIWKPJV.cjs → chunk-PLJMEUAN.cjs} +15 -1
  113. package/dist/{chunk-EMTN5ABC.mjs → chunk-POVHO46S.mjs} +1 -1
  114. package/dist/{chunk-X3Y6JWJG.cjs → chunk-PWMJBCAN.cjs} +3 -3
  115. package/dist/{chunk-PG7J7XYT.cjs → chunk-Q4TRGTO7.cjs} +6 -6
  116. package/dist/{chunk-KUXEII7V.mjs → chunk-Q4YEAWUK.mjs} +1 -1
  117. package/dist/{chunk-D2RLADWN.mjs → chunk-QBJ6N5MT.mjs} +83 -24
  118. package/dist/{chunk-PKXGFQZS.mjs → chunk-QD34VE4N.mjs} +1 -1
  119. package/dist/{chunk-2QPTZMGK.mjs → chunk-QHAISITM.mjs} +1 -1
  120. package/dist/{chunk-VJI2LWTL.cjs → chunk-RFNQTQ44.cjs} +2 -2
  121. package/dist/{chunk-TZ2YPXLB.cjs → chunk-RLCOWWE5.cjs} +7 -7
  122. package/dist/{chunk-IG2JE6WJ.mjs → chunk-RLEAVG6G.mjs} +1 -1
  123. package/dist/{chunk-SL2BSPDJ.mjs → chunk-RPA45OQS.mjs} +2 -2
  124. package/dist/{chunk-ORWXJDUN.mjs → chunk-RQBGHHOQ.mjs} +1 -1
  125. package/dist/{chunk-GC2BSXQS.cjs → chunk-SDICLSQU.cjs} +11 -11
  126. package/dist/{chunk-FE6KYDHC.cjs → chunk-SHDCKRP4.cjs} +3 -3
  127. package/dist/{chunk-DUSTJ6A5.mjs → chunk-SLEHAGGV.mjs} +2 -2
  128. package/dist/{chunk-IIVZTGGP.cjs → chunk-T3SMMLSB.cjs} +2 -2
  129. package/dist/{chunk-K6DXKHFE.mjs → chunk-TE7AX6HB.mjs} +1 -1
  130. package/dist/chunk-TIZJYHB7.mjs +42 -0
  131. package/dist/{chunk-NQZWLIPT.cjs → chunk-TS3ZHJN5.cjs} +3 -3
  132. package/dist/{chunk-KHS3T3E5.mjs → chunk-TYHWZOA2.mjs} +1 -1
  133. package/dist/{chunk-Z3QXQN4U.mjs → chunk-U6GMCDRS.mjs} +1 -1
  134. package/dist/{chunk-URQW27KO.mjs → chunk-UBLKPREL.mjs} +1 -1
  135. package/dist/{chunk-DD22NQFX.cjs → chunk-UGLTOLTJ.cjs} +2 -2
  136. package/dist/{chunk-PE2LEWXA.mjs → chunk-UJPE75GF.mjs} +1 -1
  137. package/dist/{chunk-6ZFGWB75.cjs → chunk-UWOCYINY.cjs} +4 -4
  138. package/dist/chunk-UZM3PDKK.cjs +46 -0
  139. package/dist/{chunk-YTGNMKRA.mjs → chunk-V73Y4UBL.mjs} +67 -9
  140. package/dist/{chunk-G7B6NU4X.cjs → chunk-VFMHE5D3.cjs} +3 -3
  141. package/dist/{chunk-IXO6O2EL.cjs → chunk-VGVRGGP4.cjs} +2 -2
  142. package/dist/{chunk-YRXPDKMM.cjs → chunk-W53Z4WDI.cjs} +8 -8
  143. package/dist/{chunk-47R7CX4A.mjs → chunk-WBPVLCNE.mjs} +1 -1
  144. package/dist/{chunk-4VLXQ55O.cjs → chunk-WIZRYFB2.cjs} +3 -3
  145. package/dist/{chunk-WZVESREI.cjs → chunk-WJ2O2MPP.cjs} +312 -291
  146. package/dist/{chunk-SIYELCIX.cjs → chunk-X4TSMQWF.cjs} +339 -309
  147. package/dist/{chunk-DASQJ5UD.mjs → chunk-XF7MJSUS.mjs} +1 -1
  148. package/dist/{chunk-S7QEQCVV.mjs → chunk-XGL42MQ7.mjs} +1 -1
  149. package/dist/{chunk-YN7G22MP.cjs → chunk-XKUKWMGX.cjs} +3 -3
  150. package/dist/{chunk-JD42G6BN.cjs → chunk-XY5OZQF6.cjs} +2 -2
  151. package/dist/{chunk-7EXFAJST.mjs → chunk-XZBBKZGW.mjs} +80 -59
  152. package/dist/{chunk-3QM74STY.cjs → chunk-Y2FEFQAY.cjs} +3 -3
  153. package/dist/{chunk-ZJGFAW5U.mjs → chunk-YHHOTKUT.mjs} +5 -1
  154. package/dist/{chunk-65XXHTVJ.mjs → chunk-YN3YMSKD.mjs} +4 -4
  155. package/dist/{chunk-PDACTAVX.mjs → chunk-YOVSWY2E.mjs} +1 -1
  156. package/dist/{chunk-R5X7FDOG.mjs → chunk-YU2MNIIY.mjs} +1 -1
  157. package/dist/{chunk-42EUEYW6.cjs → chunk-YUQUGVSV.cjs} +8 -8
  158. package/dist/{chunk-DZ3AZ7UK.cjs → chunk-Z4SMFUZ7.cjs} +28 -28
  159. package/dist/{chunk-7SAGHWWU.cjs → chunk-Z5BANEQD.cjs} +6 -6
  160. package/dist/{chunk-IHMSLS2O.mjs → chunk-ZDYYZX73.mjs} +63 -33
  161. package/dist/{chunk-4PWGLPL6.mjs → chunk-ZIEO3DQ3.mjs} +26 -15
  162. package/dist/{chunk-FCHEO3LG.cjs → chunk-ZPEZXQTM.cjs} +22 -22
  163. package/dist/{chunk-PMKUTZGR.cjs → chunk-ZVSQN7NC.cjs} +135 -80
  164. package/dist/{cli-runtime.d-DljFfr8T.d.ts → cli-runtime.d-8BhZy_wr.d.ts} +7 -6
  165. package/dist/{cli-runtime.d-HSkdfvoq.d.mts → cli-runtime.d-DPNTN-JV.d.mts} +7 -6
  166. package/dist/client/lifecycle.cjs +1 -1
  167. package/dist/client/lifecycle.d.mts +1 -1
  168. package/dist/client/lifecycle.d.ts +1 -1
  169. package/dist/client/lifecycle.mjs +1 -1
  170. package/dist/{client-component.d-B-1dIlsw.d.mts → client-component.d-CMCdyAr8.d.mts} +1 -1
  171. package/dist/{client-component.d-_otXB__v.d.ts → client-component.d-CkDcob6D.d.ts} +1 -1
  172. package/dist/client-plugins.cjs +1 -1
  173. package/dist/{client-plugins.d-MjxlvbCK.d.ts → client-plugins.d-BYIovYqX.d.ts} +4 -4
  174. package/dist/{client-plugins.d-BmBzvfSP.d.mts → client-plugins.d-WcMwOZGZ.d.mts} +4 -4
  175. package/dist/client-plugins.d.mts +4 -4
  176. package/dist/client-plugins.d.ts +4 -4
  177. package/dist/client-plugins.mjs +1 -1
  178. package/dist/client.cjs +4 -4
  179. package/dist/client.d.mts +9 -9
  180. package/dist/client.d.ts +9 -9
  181. package/dist/client.mjs +3 -3
  182. package/dist/config.cjs +1 -1
  183. package/dist/config.d.mts +4 -4
  184. package/dist/config.d.ts +4 -4
  185. package/dist/config.mjs +1 -1
  186. package/dist/cron.cjs +4 -4
  187. package/dist/cron.mjs +3 -3
  188. package/dist/deferred.cjs +1 -1
  189. package/dist/deferred.mjs +1 -1
  190. package/dist/deployment.cjs +1 -1
  191. package/dist/deployment.mjs +1 -1
  192. package/dist/desktop.cjs +1 -1
  193. package/dist/desktop.d.mts +5 -5
  194. package/dist/desktop.d.ts +5 -5
  195. package/dist/desktop.mjs +1 -1
  196. package/dist/{dev-guard-ZDIELV6Q.mjs → dev-guard-K3GJDPEQ.mjs} +1 -1
  197. package/dist/{dev-guard-ZLLKVO5T.cjs → dev-guard-VIEEA4LS.cjs} +1 -1
  198. package/dist/{devtools-7LHXG2VS.mjs → devtools-F3FDFV26.mjs} +11 -11
  199. package/dist/{devtools-NNQN66EZ.cjs → devtools-JJOYTIMS.cjs} +13 -13
  200. package/dist/{devtools-client-X5OQCXDF.cjs → devtools-client-BKBCCORT.cjs} +1 -1
  201. package/dist/{devtools-client-SU4XH46J.mjs → devtools-client-L4MUWD6K.mjs} +1 -1
  202. package/dist/{devtools-ui-CYBVFLPH.mjs → devtools-ui-BOG33MT5.mjs} +1 -1
  203. package/dist/{devtools-ui-SYRUXUA7.cjs → devtools-ui-C2EMF2SO.cjs} +1 -1
  204. package/dist/docs.cjs +15 -15
  205. package/dist/docs.d.mts +6 -6
  206. package/dist/docs.d.ts +6 -6
  207. package/dist/docs.mjs +14 -14
  208. package/dist/env-types.cjs +1 -1
  209. package/dist/env-types.mjs +1 -1
  210. package/dist/env.cjs +1 -1
  211. package/dist/env.mjs +1 -1
  212. package/dist/environment/vite.cjs +6 -6
  213. package/dist/environment/vite.d.mts +9 -0
  214. package/dist/environment/vite.d.ts +9 -0
  215. package/dist/environment/vite.mjs +5 -5
  216. package/dist/environment.cjs +1 -1
  217. package/dist/environment.mjs +1 -1
  218. package/dist/font.cjs +1 -1
  219. package/dist/font.mjs +1 -1
  220. package/dist/{handler.d-C53zFDmp.d.ts → handler.d-BwdOyc9x.d.ts} +1 -1
  221. package/dist/{handler.d-CaYopqaD.d.mts → handler.d-s3IM6pbJ.d.mts} +1 -1
  222. package/dist/headers.cjs +1 -1
  223. package/dist/{headers.d-MBkD9ZLf.d.mts → headers.d-BR-OXrqQ.d.mts} +1 -1
  224. package/dist/{headers.d-BvtpC90T.d.ts → headers.d-CAW4wPey.d.ts} +1 -1
  225. package/dist/headers.mjs +1 -1
  226. package/dist/i18n/client.cjs +1 -1
  227. package/dist/i18n/client.mjs +1 -1
  228. package/dist/i18n/index.cjs +1 -1
  229. package/dist/i18n/index.mjs +1 -1
  230. package/dist/i18n/server.cjs +1 -1
  231. package/dist/i18n/server.mjs +1 -1
  232. package/dist/image/server.cjs +1 -1
  233. package/dist/image/server.mjs +1 -1
  234. package/dist/image/sharp.cjs +1 -1
  235. package/dist/image/sharp.mjs +1 -1
  236. package/dist/image.cjs +1 -1
  237. package/dist/image.mjs +1 -1
  238. package/dist/index.cjs +74 -68
  239. package/dist/{index.d-Mikf-tdP.d.mts → index.d-BEVK61zS.d.mts} +1 -1
  240. package/dist/{index.d-2hQpPZ-P.d.ts → index.d-ah2c89Wu.d.ts} +1 -1
  241. package/dist/index.d.mts +25 -25
  242. package/dist/index.d.ts +25 -25
  243. package/dist/index.mjs +72 -66
  244. package/dist/instrumentation.cjs +1 -1
  245. package/dist/instrumentation.mjs +1 -1
  246. package/dist/integrations/orm.cjs +4 -4
  247. package/dist/integrations/orm.d.mts +4 -4
  248. package/dist/integrations/orm.d.ts +4 -4
  249. package/dist/integrations/orm.mjs +3 -3
  250. package/dist/integrations.cjs +3 -3
  251. package/dist/integrations.d.mts +4 -4
  252. package/dist/integrations.d.ts +4 -4
  253. package/dist/integrations.mjs +2 -2
  254. package/dist/internal/app-markdown-runtime.cjs +5 -5
  255. package/dist/internal/app-markdown-runtime.d.mts +5 -5
  256. package/dist/internal/app-markdown-runtime.d.ts +5 -5
  257. package/dist/internal/app-markdown-runtime.mjs +4 -4
  258. package/dist/internal/build-runtime.cjs +51 -51
  259. package/dist/internal/build-runtime.d.mts +7 -7
  260. package/dist/internal/build-runtime.d.ts +7 -7
  261. package/dist/internal/build-runtime.mjs +50 -50
  262. package/dist/internal/cli-runtime.cjs +31 -28
  263. package/dist/internal/cli-runtime.d.mts +11 -11
  264. package/dist/internal/cli-runtime.d.ts +11 -11
  265. package/dist/internal/cli-runtime.mjs +30 -27
  266. package/dist/internal/client-error-overlay.cjs +5 -5
  267. package/dist/internal/client-error-overlay.mjs +2 -2
  268. package/dist/internal/client-runtime.cjs +49 -12
  269. package/dist/internal/client-runtime.d.mts +17 -21
  270. package/dist/internal/client-runtime.d.ts +17 -21
  271. package/dist/internal/client-runtime.mjs +38 -1
  272. package/dist/internal/compression-runtime.cjs +1 -1
  273. package/dist/internal/compression-runtime.d.mts +4 -4
  274. package/dist/internal/compression-runtime.d.ts +4 -4
  275. package/dist/internal/compression-runtime.mjs +1 -1
  276. package/dist/internal/config-runtime.cjs +13 -13
  277. package/dist/internal/config-runtime.d.mts +6 -6
  278. package/dist/internal/config-runtime.d.ts +6 -6
  279. package/dist/internal/config-runtime.mjs +12 -12
  280. package/dist/internal/desktop-guard.cjs +1 -1
  281. package/dist/internal/desktop-guard.mjs +1 -1
  282. package/dist/internal/docs-precompiled-runtime.cjs +1 -1
  283. package/dist/internal/docs-precompiled-runtime.mjs +1 -1
  284. package/dist/internal/form-actions-client.cjs +1 -1
  285. package/dist/internal/form-actions-client.mjs +1 -1
  286. package/dist/internal/form-actions.cjs +1 -1
  287. package/dist/internal/form-actions.mjs +1 -1
  288. package/dist/internal/infra-analytics-runtime.cjs +11 -11
  289. package/dist/internal/infra-analytics-runtime.mjs +9 -9
  290. package/dist/internal/island-codec.cjs +1 -1
  291. package/dist/internal/island-codec.mjs +1 -1
  292. package/dist/internal/island-value-store.cjs +1 -1
  293. package/dist/internal/island-value-store.mjs +1 -1
  294. package/dist/internal/islands-boot.cjs +59 -10
  295. package/dist/internal/islands-boot.d.mts +19 -1
  296. package/dist/internal/islands-boot.d.ts +19 -1
  297. package/dist/internal/islands-boot.mjs +55 -6
  298. package/dist/internal/islands-runtime.cjs +1 -1
  299. package/dist/internal/islands-runtime.mjs +1 -1
  300. package/dist/internal/islands-server.cjs +1 -1
  301. package/dist/internal/islands-server.mjs +1 -1
  302. package/dist/internal/islx-client.cjs +1 -1
  303. package/dist/internal/islx-react.cjs +1 -1
  304. package/dist/internal/islx-server.cjs +1 -1
  305. package/dist/internal/isolated-boundary.cjs +1 -1
  306. package/dist/internal/isolated-boundary.mjs +1 -1
  307. package/dist/internal/metadata-image-runtime.cjs +1 -1
  308. package/dist/internal/metadata-image-runtime.mjs +1 -1
  309. package/dist/internal/native-server-fns.cjs +5 -5
  310. package/dist/internal/native-server-fns.mjs +4 -4
  311. package/dist/internal/product-telemetry-runtime.cjs +4 -4
  312. package/dist/internal/product-telemetry-runtime.mjs +3 -3
  313. package/dist/internal/production-node-env.cjs +1 -1
  314. package/dist/internal/production-node-env.mjs +1 -1
  315. package/dist/internal/production-runtime.cjs +27 -27
  316. package/dist/internal/production-runtime.d.mts +14 -13
  317. package/dist/internal/production-runtime.d.ts +14 -13
  318. package/dist/internal/production-runtime.mjs +28 -28
  319. package/dist/internal/react-cache.cjs +1 -1
  320. package/dist/internal/react-cache.mjs +1 -1
  321. package/dist/internal/request-cookies.cjs +1 -1
  322. package/dist/internal/request-cookies.mjs +1 -1
  323. package/dist/internal/server-fn-transform.cjs +1 -1
  324. package/dist/internal/server-fn-transform.mjs +1 -1
  325. package/dist/internal/server-tree.cjs +1 -1
  326. package/dist/internal/server-tree.mjs +1 -1
  327. package/dist/internal/spa-router.cjs +44 -0
  328. package/dist/internal/spa-router.d.mts +41 -0
  329. package/dist/internal/spa-router.d.ts +41 -0
  330. package/dist/internal/spa-router.mjs +44 -0
  331. package/dist/internal/start-manifest.cjs +1 -1
  332. package/dist/internal/start-manifest.d.mts +4 -4
  333. package/dist/internal/start-manifest.d.ts +4 -4
  334. package/dist/internal/start-manifest.mjs +1 -1
  335. package/dist/internal/vercel-edge-middleware.cjs +4 -4
  336. package/dist/internal/vercel-edge-middleware.mjs +3 -3
  337. package/dist/json-ld.cjs +1 -1
  338. package/dist/json-ld.mjs +1 -1
  339. package/dist/{layers-I7VE5Q2Y.mjs → layers-5ZD4764G.mjs} +1 -1
  340. package/dist/{layers-WP5K5F7W.cjs → layers-HMEGUEXM.cjs} +1 -1
  341. package/dist/libsql-http-2QD224YS.mjs +600 -0
  342. package/dist/libsql-http-M6LMNXCN.cjs +600 -0
  343. package/dist/{lifecycle.d-VzcXyEyn.d.ts → lifecycle.d-OtGWAvJT.d.mts} +1 -1
  344. package/dist/{lifecycle.d-VzcXyEyn.d.mts → lifecycle.d-OtGWAvJT.d.ts} +1 -1
  345. package/dist/{manager-YO2RHDYU.mjs → manager-OMTC5FOJ.mjs} +2 -2
  346. package/dist/{manager-R7FV4A56.cjs → manager-PX4QN4HK.cjs} +4 -4
  347. package/dist/markdown.cjs +4 -4
  348. package/dist/markdown.d.mts +4 -4
  349. package/dist/markdown.d.ts +4 -4
  350. package/dist/markdown.mjs +3 -3
  351. package/dist/middleware.cjs +10 -10
  352. package/dist/middleware.d.mts +4 -4
  353. package/dist/middleware.d.ts +4 -4
  354. package/dist/middleware.mjs +9 -9
  355. package/dist/mobile.cjs +1 -1
  356. package/dist/mobile.mjs +1 -1
  357. package/dist/{modules-KOKD4XS6.mjs → modules-3Q2ZCY4Q.mjs} +1 -1
  358. package/dist/{modules-QTP7WJPD.cjs → modules-KDHFBQ6L.cjs} +1 -1
  359. package/dist/{mount.d-GU-tNxbE.d.ts → mount.d-DcoPFqv5.d.ts} +1 -1
  360. package/dist/{mount.d-DsP46XCy.d.mts → mount.d-Ylo-CmzK.d.mts} +1 -1
  361. package/dist/{native-server-fn-handler-LII4MDRR.mjs → native-server-fn-handler-OXFTI6V5.mjs} +5 -5
  362. package/dist/{native-server-fn-handler-IWNKQEXK.cjs → native-server-fn-handler-TNVFEQW3.cjs} +6 -6
  363. package/dist/{native-specs-LDV6IZ4N.mjs → native-specs-A7YOL463.mjs} +1 -1
  364. package/dist/{native-specs-5OLED4MM.cjs → native-specs-JDPH26AO.cjs} +1 -1
  365. package/dist/{native-tree-D3PW64ZL.cjs → native-tree-5TENEQ7Y.cjs} +5 -5
  366. package/dist/{native-tree-G6ZWS7IR.mjs → native-tree-LNO7K6JR.mjs} +4 -4
  367. package/dist/native.cjs +1 -1
  368. package/dist/native.mjs +1 -1
  369. package/dist/{navigation-delegate.d-DsxNPrLT.d.ts → navigation-delegate.d-2MK4YSlL.d.ts} +1 -1
  370. package/dist/{navigation-delegate.d-CUtNOYLi.d.mts → navigation-delegate.d-BA5h0fbE.d.mts} +1 -1
  371. package/dist/navigation.cjs +5 -5
  372. package/dist/navigation.d.mts +7 -7
  373. package/dist/navigation.d.ts +7 -7
  374. package/dist/navigation.mjs +4 -4
  375. package/dist/{nitro-HKMVYIXY.cjs → nitro-6UOJXJZ6.cjs} +8 -8
  376. package/dist/{nitro-RHLKLYXH.mjs → nitro-C3MYDX7V.mjs} +4 -4
  377. package/dist/{node-module-bundle-LIZ2KMVW.cjs → node-module-bundle-M6BISE2P.cjs} +1 -1
  378. package/dist/{node-module-bundle-VR6NV6AI.mjs → node-module-bundle-XPLBMXRD.mjs} +1 -1
  379. package/dist/observability.cjs +9 -3
  380. package/dist/{observability.d-DdJRiaIX.d.ts → observability.d-mXSbp4jc.d.mts} +17 -1
  381. package/dist/{observability.d-DdJRiaIX.d.mts → observability.d-mXSbp4jc.d.ts} +17 -1
  382. package/dist/observability.d.mts +1 -1
  383. package/dist/observability.d.ts +1 -1
  384. package/dist/observability.mjs +8 -2
  385. package/dist/og.cjs +1 -1
  386. package/dist/og.mjs +1 -1
  387. package/dist/platform.cjs +1 -1
  388. package/dist/platform.mjs +1 -1
  389. package/dist/{plugin-2KWR2X4B.mjs → plugin-33I3V42N.mjs} +2 -2
  390. package/dist/{plugin-MW7IDV76.cjs → plugin-LN3JBZRR.cjs} +3 -3
  391. package/dist/plugin.cjs +41 -41
  392. package/dist/plugin.d.mts +8 -8
  393. package/dist/plugin.d.ts +8 -8
  394. package/dist/plugin.mjs +40 -40
  395. package/dist/{port-CLL4BC4O.mjs → port-CEZTV776.mjs} +1 -1
  396. package/dist/{port-HASZTQGY.cjs → port-STMSGUVU.cjs} +1 -1
  397. package/dist/query/client.cjs +7 -7
  398. package/dist/query/client.mjs +2 -2
  399. package/dist/query/index.cjs +1 -1
  400. package/dist/query/index.mjs +1 -1
  401. package/dist/query/parsers.cjs +1 -1
  402. package/dist/query/parsers.mjs +1 -1
  403. package/dist/query/server.cjs +1 -1
  404. package/dist/query/server.mjs +1 -1
  405. package/dist/{render-plan.d-8K6S0h0L.d.ts → render-plan.d-2o-AG-ot.d.ts} +1 -1
  406. package/dist/{render-plan.d-B7Xp-PPW.d.mts → render-plan.d-ChYBMhLu.d.mts} +1 -1
  407. package/dist/renderer/none/server.cjs +1 -1
  408. package/dist/renderer/none/server.mjs +1 -1
  409. package/dist/renderer/react/client.cjs +1 -1
  410. package/dist/renderer/react/client.mjs +1 -1
  411. package/dist/renderer/react/server.cjs +1 -1
  412. package/dist/renderer/react/server.mjs +1 -1
  413. package/dist/renderer/react/vite.cjs +1 -1
  414. package/dist/renderer/react/vite.mjs +1 -1
  415. package/dist/renderer-client.cjs +5 -5
  416. package/dist/renderer-client.d.mts +7 -7
  417. package/dist/renderer-client.d.ts +7 -7
  418. package/dist/renderer-client.mjs +2 -2
  419. package/dist/renderer.cjs +1 -1
  420. package/dist/renderer.d.mts +16 -1
  421. package/dist/renderer.d.ts +16 -1
  422. package/dist/renderer.mjs +1 -1
  423. package/dist/request.cjs +1 -1
  424. package/dist/{request.d-CuQxmOqX.d.ts → request.d-CE0FIkiM.d.ts} +1 -1
  425. package/dist/{request.d-nhqciCAz.d.mts → request.d-RCnCBuWq.d.mts} +1 -1
  426. package/dist/request.d.mts +5 -5
  427. package/dist/request.d.ts +5 -5
  428. package/dist/request.mjs +1 -1
  429. package/dist/{route-rendering.d-BSsdDYC1.d.ts → route-rendering.d-BTPOM2nU.d.ts} +1 -1
  430. package/dist/{route-rendering.d-CeF1FOnl.d.mts → route-rendering.d-BZJnfKsp.d.mts} +1 -1
  431. package/dist/router.cjs +1 -1
  432. package/dist/{router.d-C7yGlhDL.d.ts → router.d-BU_WE6Ol.d.ts} +1 -1
  433. package/dist/{router.d-D462OX24.d.mts → router.d-D8Vvwl4i.d.mts} +1 -1
  434. package/dist/router.mjs +1 -1
  435. package/dist/routes.cjs +5 -5
  436. package/dist/routes.d.mts +4 -4
  437. package/dist/routes.d.ts +4 -4
  438. package/dist/routes.mjs +4 -4
  439. package/dist/{rsc-pipeline-7PV6ARDS.cjs → rsc-pipeline-A3R4U26C.cjs} +17 -17
  440. package/dist/{rsc-pipeline-EZU4W4RL.mjs → rsc-pipeline-JZWVSHOR.mjs} +16 -16
  441. package/dist/{runtime-RWLFEPS3.mjs → runtime-SQFRHRGJ.mjs} +20 -20
  442. package/dist/{runtime-QOE3NRXF.cjs → runtime-WZ3CHHGJ.cjs} +28 -28
  443. package/dist/{runtime.d-C-BHQMy5.d.mts → runtime.d-BnmuOXVD.d.mts} +1 -1
  444. package/dist/{runtime.d-CORDJQMy.d.ts → runtime.d-DJ6IIKcF.d.ts} +1 -1
  445. package/dist/safe-fetch.cjs +1 -1
  446. package/dist/safe-fetch.mjs +1 -1
  447. package/dist/{schema-dev-notice-CA55V57L.mjs → schema-dev-notice-EUPAUJVN.mjs} +3 -3
  448. package/dist/{schema-dev-notice-RWA2UTR6.cjs → schema-dev-notice-ZSCL47CT.cjs} +6 -6
  449. package/dist/schema.cjs +1 -1
  450. package/dist/schema.mjs +1 -1
  451. package/dist/search-client-A7YJT7JZ.cjs +15 -0
  452. package/dist/{search-client-OXH6GBNO.mjs → search-client-GIXIEU75.mjs} +2 -2
  453. package/dist/server-action-security.cjs +1 -1
  454. package/dist/server-action-security.mjs +1 -1
  455. package/dist/{server-components-status.d-BbADqqjq.d.ts → server-components-status.d-BeqSXcjM.d.ts} +1 -1
  456. package/dist/{server-components-status.d-BJ6huueH.d.mts → server-components-status.d-BzOg9M8g.d.mts} +1 -1
  457. package/dist/server-fn-client.cjs +1 -1
  458. package/dist/server-fn-client.mjs +1 -1
  459. package/dist/server-fn.cjs +5 -5
  460. package/dist/server-fn.mjs +4 -4
  461. package/dist/server-plugins.cjs +1 -1
  462. package/dist/server-plugins.d.mts +6 -6
  463. package/dist/server-plugins.d.ts +6 -6
  464. package/dist/server-plugins.mjs +1 -1
  465. package/dist/server-query-client.cjs +1 -1
  466. package/dist/server-query-client.mjs +1 -1
  467. package/dist/server-query.cjs +6 -6
  468. package/dist/server-query.mjs +5 -5
  469. package/dist/server.cjs +122 -100
  470. package/dist/server.d.mts +15 -15
  471. package/dist/server.d.ts +15 -15
  472. package/dist/server.mjs +77 -55
  473. package/dist/{session-WPAT6H76.mjs → session-4IB34X35.mjs} +3 -3
  474. package/dist/session-MOYQJ7E6.cjs +24 -0
  475. package/dist/{spa-router.d-DyGJLQc_.d.ts → spa-router.d-BOwuVkMl.d.ts} +20 -4
  476. package/dist/{spa-router.d-DfjafHyX.d.mts → spa-router.d-CDpftSsk.d.mts} +20 -4
  477. package/dist/{ssg.d-D11lz_wr.d.ts → ssg.d-BTVqyq8T.d.ts} +2 -2
  478. package/dist/{ssg.d-iiLTyLAO.d.mts → ssg.d-Bx_WFuwg.d.mts} +2 -2
  479. package/dist/storage.cjs +3 -3
  480. package/dist/storage.d.mts +112 -96
  481. package/dist/storage.d.ts +112 -96
  482. package/dist/storage.mjs +2 -2
  483. package/dist/testing.cjs +13 -13
  484. package/dist/testing.d.mts +4 -4
  485. package/dist/testing.d.ts +4 -4
  486. package/dist/testing.mjs +10 -10
  487. package/dist/theme/client.cjs +1 -1
  488. package/dist/theme/client.mjs +1 -1
  489. package/dist/theme/index.cjs +1 -1
  490. package/dist/theme/index.mjs +1 -1
  491. package/dist/theme/runtime.cjs +1 -1
  492. package/dist/theme/runtime.mjs +1 -1
  493. package/dist/theme/server.cjs +1 -1
  494. package/dist/theme/server.mjs +1 -1
  495. package/dist/{types.d-DC97bnjj.d.mts → types.d-C5hlNbHa.d.mts} +14 -2
  496. package/dist/{types.d-DC97bnjj.d.ts → types.d-C5hlNbHa.d.ts} +14 -2
  497. package/dist/{utils.d-fW-95yEh.d.mts → utils.d-JkrpS-NJ.d.mts} +1 -1
  498. package/dist/{utils.d-D-GQeEfa.d.ts → utils.d-_dvevm5s.d.ts} +1 -1
  499. package/dist/version.cjs +3 -3
  500. package/dist/version.mjs +2 -2
  501. package/dist/vite.cjs +43 -41
  502. package/dist/vite.d.mts +15 -10
  503. package/dist/vite.d.ts +15 -10
  504. package/dist/vite.mjs +42 -40
  505. package/dist/workflows.cjs +4 -4
  506. package/dist/workflows.mjs +3 -3
  507. package/package.json +9 -5
  508. package/types/images.d.ts +9 -0
  509. package/dist/analyzer-HTNXLX6N.cjs +0 -16
  510. package/dist/chunk-BTZ5O6VM.cjs +0 -14
  511. package/dist/chunk-Y6FXYEAI.mjs +0 -10
  512. package/dist/search-client-ZZLKVO5R.cjs +0 -15
  513. package/dist/session-OU7M4CIF.cjs +0 -24
  514. package/dist/{chunk-GFXKO4UW.mjs → chunk-3XTRT3MB.mjs} +48 -48
  515. package/dist/{chunk-BEXH6BGH.mjs → chunk-6JWXHPVR.mjs} +0 -0
  516. package/dist/{chunk-RL47VZ6J.mjs → chunk-C2OLXVUC.mjs} +0 -0
  517. package/dist/{chunk-YTNE4KGC.cjs → chunk-HS4JPIGR.cjs} +0 -0
  518. package/dist/{chunk-PC5OZ4YR.cjs → chunk-TCMRLW3K.cjs} +0 -0
  519. package/dist/{chunk-UOE6ZZZP.mjs → chunk-URBP6DLH.mjs} +0 -0
  520. package/dist/{chunk-AF3PNVVF.cjs → chunk-WGWWRV2M.cjs} +0 -0
  521. package/dist/{chunk-L7Y65BQU.cjs → chunk-WHEQJN4G.cjs} +48 -48
@@ -28,11 +28,11 @@ import {
28
28
  } from "./chunk-KQH2COEJ.mjs";
29
29
  import {
30
30
  FARM_MOBILE_SESSION_PLUGIN
31
- } from "./chunk-WHNNDFCJ.mjs";
31
+ } from "./chunk-6GJZJAED.mjs";
32
32
  import {
33
33
  collectFarmNativeServerFns,
34
34
  findFarmNativeScreenFiles
35
- } from "./chunk-2QPTZMGK.mjs";
35
+ } from "./chunk-QHAISITM.mjs";
36
36
  import {
37
37
  assertFarmDocsAdapterServesNoGuardedPages,
38
38
  compileFarmDocsAdapterEdgeManifest,
@@ -41,7 +41,7 @@ import {
41
41
  hasFarmDocsRuntimeAdapter,
42
42
  listFarmDocsAdapterPages,
43
43
  listFarmDocsPagePaths
44
- } from "./chunk-TQOYIPMQ.mjs";
44
+ } from "./chunk-EG5YBYHO.mjs";
45
45
  import {
46
46
  FARM_DOCS_LAST_MODIFIED_MANIFEST,
47
47
  createFarmDocsHandler,
@@ -54,18 +54,18 @@ import {
54
54
  loadFarmDocsPage,
55
55
  resolveFarmDocsContentDir,
56
56
  toFarmDocsMarkdownPage
57
- } from "./chunk-LPXJEZJK.mjs";
57
+ } from "./chunk-KCJBIWBM.mjs";
58
58
  import {
59
59
  generateFarmDocsSearchClientRuntime,
60
60
  isFarmDocsSearchEnabled,
61
61
  resolveFarmDocsSearchClientModule
62
- } from "./chunk-ALEUMLJN.mjs";
62
+ } from "./chunk-67JTJCAS.mjs";
63
63
  import {
64
64
  CDN_CACHE_CONTROL_HEADERS
65
- } from "./chunk-URQW27KO.mjs";
65
+ } from "./chunk-UBLKPREL.mjs";
66
66
  import {
67
67
  FARM_PRERENDER_ENV
68
- } from "./chunk-YTGNMKRA.mjs";
68
+ } from "./chunk-V73Y4UBL.mjs";
69
69
  import {
70
70
  loadFarmDocsEngine
71
71
  } from "./chunk-LRPPXKCX.mjs";
@@ -74,7 +74,7 @@ import {
74
74
  getDeployTargetForPreset,
75
75
  hasCustomFarmRouteContext,
76
76
  resolveDeployOutputPath
77
- } from "./chunk-ZBE5EHVJ.mjs";
77
+ } from "./chunk-4MIDUSIX.mjs";
78
78
  import {
79
79
  resolveFarmInstrumentationFile
80
80
  } from "./chunk-57QAQU4F.mjs";
@@ -86,6 +86,7 @@ import {
86
86
  } from "./chunk-BRNPLD22.mjs";
87
87
  import {
88
88
  DEFAULT_NOT_FOUND_STYLES,
89
+ FARM_EARLY_NAVIGATION_SOURCE,
89
90
  FARM_LAYOUT_ELEMENT_CLIENT_SOURCE,
90
91
  FARM_NAVIGATION_SCRIPT_SOURCE,
91
92
  FARM_NAVIGATION_STREAM_READER_SOURCE,
@@ -116,23 +117,23 @@ import {
116
117
  resolveFarmNotFoundComponentPath,
117
118
  resolveFarmRouteRootStrategy,
118
119
  toBakedMarkdownSourcePath
119
- } from "./chunk-IHMSLS2O.mjs";
120
+ } from "./chunk-ZDYYZX73.mjs";
120
121
  import {
121
122
  TAILWIND_CSS_BROWSER_TARGET,
122
123
  generateFarmClientPluginEntryCode,
123
124
  hasFarmServerRuntimePlugins,
124
125
  includesTailwindVitePlugin,
125
126
  loadTailwindVitePlugin
126
- } from "./chunk-SL2BSPDJ.mjs";
127
+ } from "./chunk-RPA45OQS.mjs";
127
128
  import {
128
129
  PluginManager
129
- } from "./chunk-RL47VZ6J.mjs";
130
+ } from "./chunk-C2OLXVUC.mjs";
130
131
  import {
131
132
  generateFarmTypeArtifacts,
132
133
  readRouteRenderingDirectiveFromFile,
133
134
  resolveRouteRenderingConfig,
134
135
  resolveRouteRenderingConfigFromFile
135
- } from "./chunk-65XXHTVJ.mjs";
136
+ } from "./chunk-YN3YMSKD.mjs";
136
137
  import {
137
138
  HOISTED_HEAD_ELEMENT,
138
139
  appMiddlewareMayHandlePath,
@@ -145,7 +146,7 @@ import {
145
146
  layoutsCanCoverSamePage,
146
147
  routeBoundaryCoversDirectory,
147
148
  stripRouteGroups
148
- } from "./chunk-H76C5AOU.mjs";
149
+ } from "./chunk-3K2E55BJ.mjs";
149
150
  import {
150
151
  FARM_NATIVE_TREE_CONTENT_TYPE
151
152
  } from "./chunk-LLZSYFOM.mjs";
@@ -159,15 +160,15 @@ import {
159
160
  listFarmBuiltInRoutePaths,
160
161
  resolveFarmApiCatalogInput,
161
162
  resolveFarmAppManifestInput
162
- } from "./chunk-BTHNOAOF.mjs";
163
+ } from "./chunk-3JQBQG7K.mjs";
163
164
  import {
164
165
  FARM_DEFAULT_MCP_PATH,
165
166
  createFarmDefaultMCPServer,
166
167
  farmConfigMountsMCP
167
- } from "./chunk-JA6RML7C.mjs";
168
+ } from "./chunk-HR4N2K4V.mjs";
168
169
  import {
169
170
  isFarmPreviewDeploymentEnvironment
170
- } from "./chunk-ORWXJDUN.mjs";
171
+ } from "./chunk-RQBGHHOQ.mjs";
171
172
  import {
172
173
  FARM_NATIVE_SERVER_FN_PLUGIN
173
174
  } from "./chunk-L4RTTTVE.mjs";
@@ -188,7 +189,7 @@ import {
188
189
  withFarmSourceSnapshot,
189
190
  withFarmSourceSnapshotOf,
190
191
  withPackageClientBoundaryCache
191
- } from "./chunk-QODXWUGQ.mjs";
192
+ } from "./chunk-MDEFTF63.mjs";
192
193
  import {
193
194
  generateFarmDocsAdapterClientRuntime,
194
195
  getFarmDocsAdapterConfigModule
@@ -208,9 +209,6 @@ import {
208
209
  import {
209
210
  resolveFarmServerComponentsMode
210
211
  } from "./chunk-4QENVMG7.mjs";
211
- import {
212
- getFarmAppDirectories
213
- } from "./chunk-4STJ6LGR.mjs";
214
212
  import {
215
213
  REACT_RENDERER,
216
214
  getFarmRendererCapabilities,
@@ -221,13 +219,16 @@ import {
221
219
  loadFarmRendererVitePlugins,
222
220
  resolveFarmRendererAppSetup
223
221
  } from "./chunk-GCRT6GJG.mjs";
222
+ import {
223
+ getFarmAppDirectories
224
+ } from "./chunk-4STJ6LGR.mjs";
224
225
  import {
225
226
  applyFarmCronVercelCrons,
226
227
  createFarmCronCloudflareConfig,
227
228
  mergeScheduledTasks,
228
229
  prepareFarmCronForNitro,
229
230
  toFarmCronCloudflareScheduledTasks
230
- } from "./chunk-CSAIIMY3.mjs";
231
+ } from "./chunk-ATISIC6G.mjs";
231
232
  import {
232
233
  resolveServerActionsConfig
233
234
  } from "./chunk-NLATR3T3.mjs";
@@ -239,39 +240,39 @@ import {
239
240
  isFarmMarkdownPageFile,
240
241
  parseMarkdownFrontmatter,
241
242
  readFarmMarkdownRouteConfig
242
- } from "./chunk-BGUTIQII.mjs";
243
+ } from "./chunk-MUZHULW2.mjs";
243
244
  import {
244
245
  resolveFarmMdxComponentsModulePath,
245
246
  resolveMdxConfig
246
247
  } from "./chunk-UIJOLBUL.mjs";
247
248
  import {
248
249
  getFarmMarkdownAlternatePath
249
- } from "./chunk-R5X7FDOG.mjs";
250
+ } from "./chunk-YU2MNIIY.mjs";
250
251
  import {
251
252
  withPlainDiagnostics
252
253
  } from "./chunk-MGKWYPE3.mjs";
253
254
  import {
254
255
  applyFarmWorkflowVercelCrons,
255
256
  prepareFarmWorkflowsForNitro
256
- } from "./chunk-3AJQFVWW.mjs";
257
+ } from "./chunk-COTFX4GT.mjs";
257
258
  import {
258
259
  getFarmIntegrationPluginServerRuntime,
259
260
  getIntegrationProviders
260
- } from "./chunk-BEXH6BGH.mjs";
261
+ } from "./chunk-6JWXHPVR.mjs";
261
262
  import {
262
263
  FARM_INTEGRATION_API_BASE_PATH_KEY
263
264
  } from "./chunk-CZOXZ6WQ.mjs";
264
265
  import {
265
266
  _collectFarmStorageModules
266
- } from "./chunk-D2RLADWN.mjs";
267
+ } from "./chunk-QBJ6N5MT.mjs";
267
268
  import {
268
269
  appendMiddlewareDirectory,
269
270
  appendMiddlewareRoutePath,
270
271
  compareMiddlewareRouteLocations
271
- } from "./chunk-PKXGFQZS.mjs";
272
+ } from "./chunk-QD34VE4N.mjs";
272
273
  import {
273
274
  APIRouteManager
274
- } from "./chunk-5WFPZG7K.mjs";
275
+ } from "./chunk-KKVRWNDH.mjs";
275
276
  import {
276
277
  readFarmI18nCatalogs
277
278
  } from "./chunk-VO55MMBX.mjs";
@@ -292,14 +293,14 @@ import {
292
293
  logger,
293
294
  toPosixPath,
294
295
  toViteModuleId
295
- } from "./chunk-Z3QXQN4U.mjs";
296
+ } from "./chunk-U6GMCDRS.mjs";
296
297
  import {
297
298
  resolveFarmAPIServerBasePath,
298
299
  resolveFarmAPIServerRoutePath
299
300
  } from "./chunk-2I6PUKWJ.mjs";
300
301
  import {
301
302
  FARM_VERSION
302
- } from "./chunk-SMYDCZBW.mjs";
303
+ } from "./chunk-JGEN2FIT.mjs";
303
304
  import {
304
305
  FARM_VIDEO_PLAYER_PATH
305
306
  } from "./chunk-AG27TI6Q.mjs";
@@ -794,17 +795,43 @@ function collectFarmClientModulePreloads(bundle, options) {
794
795
  ...staticImports(chunk, loaded, [])
795
796
  ].map(index);
796
797
  }
797
- return { files, entry: entryFiles.map(index), modules };
798
+ const dynamicFiles = (moduleIds) => {
799
+ const into = [];
800
+ const loaded = new Set(entryLoaded);
801
+ for (const moduleId of moduleIds ?? []) {
802
+ const chunk = chunks.find(
803
+ (candidate) => candidate.isDynamicEntry && candidate.facadeModuleId && path4.resolve(candidate.facadeModuleId.split("?")[0]) === path4.resolve(moduleId)
804
+ );
805
+ if (!chunk || loaded.has(chunk.fileName)) continue;
806
+ loaded.add(chunk.fileName);
807
+ into.push(chunk.fileName);
808
+ staticImports(chunk, loaded, into);
809
+ }
810
+ return into;
811
+ };
812
+ const rendererFiles = dynamicFiles(options.rendererModules);
813
+ return {
814
+ files,
815
+ entry: entryFiles.map(index),
816
+ router: dynamicFiles(options.routerModules).map(index),
817
+ ...rendererFiles.length > 0 ? { renderer: rendererFiles.map(index) } : {},
818
+ modules
819
+ };
798
820
  }
799
821
  function createFarmClientModulePreloadPlugin(options) {
800
822
  return {
801
823
  name: "farm-client-module-preloads",
802
824
  enforce: "post",
803
825
  async generateBundle(_output, bundle) {
826
+ const rendererModules = [];
827
+ for (const specifier of options.rendererImports ?? []) {
828
+ const resolved = await this.resolve(specifier, options.rendererImporter);
829
+ if (resolved) rendererModules.push(resolved.id);
830
+ }
804
831
  await fs.mkdir(options.buildDir, { recursive: true });
805
832
  await fs.writeFile(
806
833
  path4.join(options.buildDir, FARM_CLIENT_MODULE_PRELOADS_FILE),
807
- JSON.stringify(collectFarmClientModulePreloads(bundle, options))
834
+ JSON.stringify(collectFarmClientModulePreloads(bundle, { ...options, rendererModules }))
808
835
  );
809
836
  }
810
837
  };
@@ -1682,12 +1709,15 @@ function createFarmPrivateClientSourcemapsPlugin(options) {
1682
1709
  return {
1683
1710
  name: "farm-private-client-sourcemaps",
1684
1711
  enforce: "post",
1685
- generateBundle(_output, bundle) {
1686
- maps = [];
1687
- for (const [fileName, output] of Object.entries(bundle)) {
1688
- if (output.type !== "asset" || !fileName.endsWith(".map")) continue;
1689
- maps.push([fileName, output.source ?? ""]);
1690
- delete bundle[fileName];
1712
+ generateBundle: {
1713
+ order: "post",
1714
+ handler(_output, bundle) {
1715
+ maps = [];
1716
+ for (const [fileName, output] of Object.entries(bundle)) {
1717
+ if (output.type !== "asset" || !fileName.endsWith(".map")) continue;
1718
+ maps.push([fileName, output.source ?? ""]);
1719
+ delete bundle[fileName];
1720
+ }
1691
1721
  }
1692
1722
  },
1693
1723
  async writeBundle() {
@@ -3054,7 +3084,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3054
3084
  if (!mobile) await removeFarmMobileClientManifest(path16.dirname(outputDir));
3055
3085
  const viteBuild = productionVite.build;
3056
3086
  const { farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.mjs");
3057
- const { PluginManager: PluginManager2 } = await import("./plugin-2KWR2X4B.mjs");
3087
+ const { PluginManager: PluginManager2 } = await import("./plugin-33I3V42N.mjs");
3058
3088
  const fs5 = await import("fs/promises");
3059
3089
  const pluginManager = new PluginManager2({
3060
3090
  config,
@@ -3469,7 +3499,19 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3469
3499
  }) : createFarmClientModulePreloadPlugin({
3470
3500
  root,
3471
3501
  buildDir: path16.dirname(outputDir),
3472
- entryName: "farm-client"
3502
+ entryName: "farm-client",
3503
+ routerModules: [
3504
+ path16.join(clientEntryDir, "farm-client-router.tsx"),
3505
+ path16.join(clientEntryDir, `${FARM_CLIENT_ROUTE_TABLE_MODULE}.tsx`)
3506
+ ],
3507
+ // What the islands entry loads with its first render or hydration (RFC 0010).
3508
+ ...islandsMode && isReactRenderer(config.renderer) ? {
3509
+ rendererImports: [
3510
+ "react-dom/client",
3511
+ "@farm.js/core/internal/islands-runtime"
3512
+ ],
3513
+ rendererImporter: clientEntryPath
3514
+ } : {}
3473
3515
  }),
3474
3516
  ...adapterOwnsDocsRuntime && platform === "web" ? [
3475
3517
  createFarmDocsModulePreloadPlugin({
@@ -3642,11 +3684,12 @@ function createHistoryState(path, pageState, currentState) {
3642
3684
 
3643
3685
  async function fetchFarmNavigationDocument(url, headers, recover = true, signal) {
3644
3686
  const deploymentId = window.__FARM_DEPLOYMENT_ID__;
3645
- const response = await fetch(url, {
3646
- headers: createFarmDeploymentRequestHeaders(deploymentId, headers),
3687
+ const requestHeaders = createFarmDeploymentRequestHeaders(deploymentId, headers);
3688
+ const response = await (${streamNavigations ? "(recover && takeFarmEarlyNavigation(url, requestHeaders, signal)) || " : ""}fetch(url, {
3689
+ headers: requestHeaders,
3647
3690
  signal,
3648
3691
  redirect: "manual",
3649
- });
3692
+ }));
3650
3693
  // Let a document navigation follow redirects, including cross-origin chains
3651
3694
  // and fragment inheritance. Never cache/swap their HTML under the source URL.
3652
3695
  if (response.type === "opaqueredirect" || response.redirected) {
@@ -3673,7 +3716,9 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
3673
3716
  return response;
3674
3717
  }
3675
3718
 
3676
- ${streamNavigations ? FARM_NAVIGATION_STREAM_READER_SOURCE : ""}
3719
+ ${streamNavigations ? `${FARM_NAVIGATION_STREAM_READER_SOURCE}
3720
+
3721
+ ${FARM_EARLY_NAVIGATION_SOURCE}` : ""}
3677
3722
 
3678
3723
  function clearFarmPrefetchCacheOnDeploymentMismatch(router, error) {
3679
3724
  if (error?.name === "FarmDeploymentMismatchError") {
@@ -4712,6 +4757,10 @@ function farmRouterIntent(event) {
4712
4757
  void loadFarmRouter().catch(function() {});
4713
4758
  }
4714
4759
  for (const type of farmRouterIntentEvents) document.addEventListener(type, farmRouterIntent, true);
4760
+ // In islands mode the boot script loads this entry on a hover or focus over a link, and that
4761
+ // event fired before these listeners existed: a link still under the pointer or focused is it.
4762
+ const farmIntendedLink = document.querySelector("a[href]:hover, a[href]:focus");
4763
+ if (farmIntendedLink) farmRouterIntent({ target: farmIntendedLink });
4715
4764
  `;
4716
4765
  function bindingPattern(name) {
4717
4766
  return new RegExp(`(?<![\\w$])(?<![^.]\\.)${name.replace(/\$/g, "\\$")}(?![\\w$])`);
@@ -4830,11 +4879,21 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
4830
4879
  platform
4831
4880
  );
4832
4881
  const appSetupPath = resolveFarmRendererAppSetup(root, renderer);
4833
- const rendererClientImports = isReactRenderer(renderer) ? `import React from "react";
4882
+ const lazyRenderer = islandValues && platform !== "mobile" && isReactRenderer(renderer) && clientRouteSlots.length === 0;
4883
+ const rendererClientImports = lazyRenderer ? `import React from "react";
4884
+ import { holdFarmIslandInteractions, restorePagePosition } from "@farm.js/core/internal/client-runtime";` : isReactRenderer(renderer) ? `import React from "react";
4834
4885
  import { createRoot, hydrateRoot } from "react-dom/client";
4835
- import { restorePagePosition } from "@farm.js/core/internal/client-runtime";` : appSetupPath ? `import React, { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
4886
+ import { restorePagePosition } from "@farm.js/core/internal/client-runtime";` : (
4887
+ // Named exports only, as the server entry and the development client read them. A copy
4888
+ // of the namespace, so feature checks of optional exports don't make Rolldown warn.
4889
+ appSetupPath ? `import * as __farmRendererClient from ${JSON.stringify(renderer.client)};
4890
+ import { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
4836
4891
  import __farmAppSetup from ${JSON.stringify(toPosixPath(appSetupPath))};
4837
- __farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};`;
4892
+ const React = { ...__farmRendererClient };
4893
+ __farmConfigureApp(__farmAppSetup);` : `import * as __farmRendererClient from ${JSON.stringify(renderer.client)};
4894
+ import { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};
4895
+ const React = { ...__farmRendererClient };`
4896
+ );
4838
4897
  const providerClientCode = generateFarmIntegrationProviderClientCode(
4839
4898
  integrationProviders,
4840
4899
  root,
@@ -5258,7 +5317,42 @@ installFarmLinkPrefetch();
5258
5317
  });
5259
5318
  const isolatedHydrationEnabled = isolatedBoundaryModules.size > 0;
5260
5319
  const serverTreeEnabled = isolatedHydrationEnabled && clientPages.some((page) => page.serverTree);
5261
- const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? `import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement${hasServerTreeLayouts ? ", createFarmServerTreeLayout" : ""} } from "@farm.js/core/internal/islands-runtime";` : 'import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";'}${serverTreeEnabled && !islandValues ? '\nimport { createFarmServerTreeElement } from "@farm.js/core/internal/server-tree";' : ""}` : "";
5320
+ const islandsRuntimeExports = [
5321
+ "createFarmIsolatedHydrationRuntime",
5322
+ "createFarmServerPageBoundary",
5323
+ "wrapFarmIsolatedClientGraph",
5324
+ ...serverTreeEnabled ? ["createFarmServerTreeElement"] : [],
5325
+ ...hasServerTreeLayouts ? ["createFarmServerTreeLayout"] : []
5326
+ ].join(", ");
5327
+ const lazyRendererRuntime = lazyRenderer ? `// React DOM${isolatedHydrationEnabled ? " and islx" : ""} load with the first render or hydration (RFC 0010).
5328
+ let createRoot;
5329
+ let hydrateRoot;
5330
+ let farmRendererLoading = null;
5331
+ let farmRendererLoaded = false;${isolatedHydrationEnabled ? `
5332
+ // The boot stops holding interactions once this entry runs. Until islx loads, islands that have not
5333
+ // hydrated hold them here, for their schedulers to replay.
5334
+ const releaseFarmIslandInteractions = holdFarmIslandInteractions("f-island");` : ""}
5335
+ function loadFarmRenderer() {
5336
+ return farmRendererLoading || (farmRendererLoading = Promise.all([
5337
+ import("react-dom/client"),${isolatedHydrationEnabled ? `
5338
+ // Named here, so the build keeps only these of islx's exports.
5339
+ import("@farm.js/core/internal/islands-runtime").then(function({ ${islandsRuntimeExports} }) {
5340
+ return { ${islandsRuntimeExports} };
5341
+ }),` : ""}
5342
+ ]).then(function(modules) {
5343
+ createRoot = modules[0].createRoot;
5344
+ hydrateRoot = modules[0].hydrateRoot;${isolatedHydrationEnabled ? "\n startFarmIslandsRuntime(modules[1]);\n releaseFarmIslandInteractions();" : ""}
5345
+ farmRendererLoaded = true;
5346
+ }, function(error) {${isolatedHydrationEnabled ? `
5347
+ // Without islx a held click would never replay: the page acts natively again.
5348
+ releaseFarmIslandInteractions();` : ""}
5349
+ // A chunk that failed to load can load on a later call.
5350
+ farmRendererLoading = null;
5351
+ throw error;
5352
+ }));
5353
+ }
5354
+ ` : "";
5355
+ const isolatedHydrationImport = lazyRenderer ? "" : isolatedHydrationEnabled ? `${islandValues ? `import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement${hasServerTreeLayouts ? ", createFarmServerTreeLayout" : ""} } from "@farm.js/core/internal/islands-runtime";` : 'import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";'}${serverTreeEnabled && !islandValues ? '\nimport { createFarmServerTreeElement } from "@farm.js/core/internal/server-tree";' : ""}` : "";
5262
5356
  const isolatedHydrationRuntime = isolatedHydrationEnabled ? `const farmIsolatedBoundaryLoaders = {
5263
5357
  ${Array.from(isolatedBoundaryModules.entries()).map(
5264
5358
  ([reference, modulePath]) => ` ${JSON.stringify(reference)}: () => import(${JSON.stringify(modulePath)}),`
@@ -5269,7 +5363,43 @@ async function loadFarmIsolatedBoundary(reference) {
5269
5363
  if (!loader) throw new Error("isolated client boundary loader was not found: " + reference);
5270
5364
  return loader();
5271
5365
  }
5272
- const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
5366
+ ${lazyRenderer ? `let farmIslandsRuntime = null;
5367
+ let FarmServerPage;
5368
+ let wrapFarmIsolatedClientGraph;${serverTreeEnabled ? "\nlet createFarmServerTreeElement;" : ""}${hasServerTreeLayouts ? "\nlet createFarmServerTreeLayout;" : ""}
5369
+ function startFarmIslandsRuntime(islands) {
5370
+ wrapFarmIsolatedClientGraph = islands.wrapFarmIsolatedClientGraph;${serverTreeEnabled ? "\n createFarmServerTreeElement = islands.createFarmServerTreeElement;" : ""}${hasServerTreeLayouts ? "\n createFarmServerTreeLayout = islands.createFarmServerTreeLayout;" : ""}
5371
+ farmIslandsRuntime = islands.createFarmIsolatedHydrationRuntime({
5372
+ ReactRuntime: React,
5373
+ hydrateRoot,
5374
+ load: loadFarmIsolatedBoundary,
5375
+ schedule: scheduleFarmIslandHydration,
5376
+ wrap: wrapWithIntegrationProviders,
5377
+ });
5378
+ // A hydrating layout keeps a non-hydrating page as server HTML; this wrapper runs its islands.
5379
+ FarmServerPage = islands.createFarmServerPageBoundary(React, farmIslandsRuntime);
5380
+ }
5381
+ // Nothing hydrates before islx loads. Until then, calls wait for it in the order they were made,
5382
+ // behind the hydration that loads it; one that fails reports itself to whoever awaited it.
5383
+ function whenFarmIslandsRuntime(call) {
5384
+ if (farmIslandsRuntime) call(farmIslandsRuntime);
5385
+ else if (farmRendererLoading) farmRendererLoading.then(function() { call(farmIslandsRuntime); }, function() {});
5386
+ }
5387
+ const farmIsolatedHydrationRuntime = {
5388
+ hydrate: function(scope, signal) {
5389
+ if (farmIslandsRuntime) return farmIslandsRuntime.hydrate(scope, signal);
5390
+ return loadFarmRenderer().then(function() { return farmIslandsRuntime.hydrate(scope, signal); });
5391
+ },
5392
+ dispose: function(scope) {
5393
+ whenFarmIslandsRuntime(function(runtime) { runtime.dispose(scope); });
5394
+ },
5395
+ // Only a hydrated island has state to carry over.
5396
+ carryOver: function(from, to) {
5397
+ if (farmIslandsRuntime) farmIslandsRuntime.carryOver(from, to);
5398
+ },
5399
+ endStream: function(root) {
5400
+ whenFarmIslandsRuntime(function(runtime) { runtime.endStream(root); });
5401
+ },
5402
+ };` : `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
5273
5403
  ReactRuntime: React,
5274
5404
  hydrateRoot,
5275
5405
  load: loadFarmIsolatedBoundary,
@@ -5278,7 +5408,7 @@ const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
5278
5408
  });
5279
5409
 
5280
5410
  // A hydrating layout keeps a non-hydrating page as server HTML; this wrapper runs its islands.
5281
- const FarmServerPage = createFarmServerPageBoundary(React, farmIsolatedHydrationRuntime);
5411
+ const FarmServerPage = createFarmServerPageBoundary(React, farmIsolatedHydrationRuntime);`}
5282
5412
 
5283
5413
  function disposeFarmIsolatedClientBoundaries(scope) {
5284
5414
  farmIsolatedHydrationRuntime.dispose(scope);
@@ -5335,7 +5465,7 @@ ${docsNavigationRuntime}
5335
5465
  ${docsAdapterRuntime}
5336
5466
 
5337
5467
  ${imports.join("\n")}
5338
- ${generateFarmDocsSearchClientRuntime(docsSearchEnabled, docsSearchModuleId)}
5468
+ ${generateFarmDocsSearchClientRuntime(docsSearchEnabled, docsSearchModuleId, void 0, lazyRenderer ? "loadFarmRenderer" : void 0)}
5339
5469
 
5340
5470
  ${providerClientCode.runtime}
5341
5471
 
@@ -5355,7 +5485,7 @@ ${generateFarmClientRouteTableRuntime({
5355
5485
  })}
5356
5486
  ${generateClientPageDirectorySource()}
5357
5487
 
5358
- ${isolatedHydrationRuntime}
5488
+ ${lazyRendererRuntime}${isolatedHydrationRuntime}
5359
5489
  ${routeClientGraphRuntime}
5360
5490
 
5361
5491
  const clientRouteSlots = [
@@ -5479,10 +5609,15 @@ function matchRoute(pathname) {
5479
5609
  }
5480
5610
 
5481
5611
  async function loadRouteComponent(route) {
5482
- if (!route.load) return null;
5612
+ if (!route.load) return null;${lazyRenderer ? `
5613
+ // A page component renders with React DOM, which loads beside it (RFC 0010).
5614
+ const renderer = loadFarmRenderer();
5615
+ if (!route.Component) route.Component = await route.load();
5616
+ await renderer;
5617
+ return route.Component;` : `
5483
5618
  if (route.Component) return route.Component;
5484
5619
  route.Component = await route.load();
5485
- return route.Component;
5620
+ return route.Component;`}
5486
5621
  }
5487
5622
 
5488
5623
  // The props the server rendered this document with, as the page receives them:
@@ -5498,7 +5633,9 @@ function reviveServerPageProps(serverProps) {
5498
5633
  async function createMatchedHydrationRoute(matched, pathname, searchParams, navigationPage, serverProps, layoutSource, hydrationContainer) {
5499
5634
  const hydrateLayouts = hasHydratableLayout(pathname);
5500
5635
  const params = matched.params;
5501
- let pageElement = null;
5636
+ let pageElement = null;${lazyRenderer ? `
5637
+ // Only a route that renders a page or its layouts needs React DOM; one of islands hydrates them.
5638
+ if (hydrateLayouts || matched.route.pageShouldHydrate) await loadFarmRenderer();` : ""}
5502
5639
  // Layouts rendered as server trees rebuild from the HTML that carries them.
5503
5640
  if (hydrateLayouts && !(await prepareFarmTreeLayouts(pathname, params, layoutSource))) return null;
5504
5641
 
@@ -5868,7 +6005,9 @@ async function hydrate() {
5868
6005
  );
5869
6006
  window.__FARM_PROPS__ = initialPayload.page;
5870
6007
  window.__FARM_ROUTE_SLOTS__ = initialPayload.slots;
5871
-
6008
+ ${lazyRenderer ? ` // React DOM and islx load with what first renders or hydrates, not here (RFC 0010): a root
6009
+ // that waits for its trigger, or a navigation that swaps its page in, does not wait for them.
6010
+ ` : ""}
5872
6011
  if (await hydrateFarmDocsAdapterRuntime()) {
5873
6012
  return;
5874
6013
  }
@@ -5905,76 +6044,82 @@ async function hydrate() {
5905
6044
  return;
5906
6045
  }
5907
6046
 
6047
+ const pageHydration = scheduleFarmRouteHydration(matched, pathname, container, window.__FARM_PROPS__);
6048
+ ${isolatedHydrationEnabled ? `// Not cancelled with the page: a navigation disposes the islands it removes, and one in a
6049
+ // layout it keeps still waits for its trigger, as on a page of islands only.
6050
+ const isolatedHydration =
6051
+ !hasHydratableLayout(pathname) &&
6052
+ document.querySelector('f-island[src]')
6053
+ ? hydrateFarmIsolatedClientBoundaries(document)
6054
+ : Promise.resolve();
6055
+ await Promise.all([pageHydration, isolatedHydration]);` : "await pageHydration;"}
6056
+ }
6057
+
6058
+ // Hydrates the route's page or layout root in \`container\` when its strategy is due: at once, or
6059
+ // on its idle, visible or interaction trigger (RFC 0003, section 11). The first load schedules it,
6060
+ // and so does a navigation that swaps a page into a root that never hydrated (RFC 0011): nothing
6061
+ // in that root ran, so it waits for the next page's trigger as a first load of that page would.
6062
+ function scheduleFarmRouteHydration(matched, pathname, container, serverProps) {
5908
6063
  container.dataset.farmIsland = "page";
5909
6064
  container.dataset.farmIslandStrategy = matched.route.islandStrategy || "load";
5910
6065
 
5911
6066
  const hydrationController = new AbortController();
5912
6067
  pendingPageHydrationController = hydrationController;
5913
- try {
5914
- const pageHydration = scheduleFarmIslandHydration({
5915
- container,
5916
- strategy: matched.route.islandStrategy,
5917
- signal: hydrationController.signal,
5918
- hydrate: async function() {
5919
- if (
5920
- hydrationController.signal.aborted ||
5921
- !container.isConnected ||
5922
- window.location.pathname !== pathname
5923
- ) {
5924
- return;
5925
- }
5926
- const searchParams = searchParamsToObject(new URLSearchParams(window.location.search));
5927
- const shouldHydrate = !isHydrated && Boolean(container.innerHTML.trim());
5928
- const routeState = await createMatchedHydrationRoute(
5929
- matched,
5930
- pathname,
5931
- searchParams,
5932
- undefined,
5933
- window.__FARM_PROPS__,
5934
- undefined,
5935
- shouldHydrate ? container : undefined,
5936
- );
5937
- if (!routeState) return;
5938
- const hydrationSession = await farmClientRuntime.beginHydration({
5939
- container,
5940
- mode: shouldHydrate ? "hydrate" : "render",
5941
- });
6068
+ return scheduleFarmIslandHydration({
6069
+ container,
6070
+ strategy: matched.route.islandStrategy,
6071
+ signal: hydrationController.signal,
6072
+ hydrate: async function() {
6073
+ if (
6074
+ hydrationController.signal.aborted ||
6075
+ !container.isConnected ||
6076
+ window.location.pathname !== pathname
6077
+ ) {
6078
+ return;
6079
+ }
6080
+ const searchParams = searchParamsToObject(new URLSearchParams(window.location.search));
6081
+ const shouldHydrate = !isHydrated && Boolean(container.innerHTML.trim());
6082
+ const routeState = await createMatchedHydrationRoute(
6083
+ matched,
6084
+ pathname,
6085
+ searchParams,
6086
+ undefined,
6087
+ serverProps,
6088
+ undefined,
6089
+ shouldHydrate ? container : undefined,
6090
+ );
6091
+ if (!routeState) return;
6092
+ const hydrationSession = await farmClientRuntime.beginHydration({
6093
+ container,
6094
+ mode: shouldHydrate ? "hydrate" : "render",
6095
+ });
5942
6096
 
5943
- try {
5944
- // A navigation replaced this route before it hydrated. Like a superseded
5945
- // navigation, that is not a failure, so error hooks never see it.
5946
- if (hydrationController.signal.aborted || !container.isConnected) return;
5947
- if (shouldHydrate) {
5948
- reactRoot = hydrateFarmRoute(container, routeState);
6097
+ try {
6098
+ // A navigation replaced this route before it hydrated. Like a superseded
6099
+ // navigation, that is not a failure, so error hooks never see it.
6100
+ if (hydrationController.signal.aborted || !container.isConnected) return;
6101
+ if (shouldHydrate) {
6102
+ reactRoot = hydrateFarmRoute(container, routeState);
6103
+ reactRootContainer = container;
6104
+ isHydrated = true;
6105
+ } else {
6106
+ if (!reactRoot) {
6107
+ reactRoot = createRoot(container);
5949
6108
  reactRootContainer = container;
5950
- isHydrated = true;
5951
- } else {
5952
- if (!reactRoot) {
5953
- reactRoot = createRoot(container);
5954
- reactRootContainer = container;
5955
- }
5956
- renderFarmRoute(reactRoot, routeState);
5957
6109
  }
5958
- await farmClientRuntime.completeHydration(hydrationSession);
5959
- } catch (error) {
5960
- await farmClientRuntime.failHydration(hydrationSession, error);
5961
- console.error("[Farm.js] Hydration error:", error);
6110
+ renderFarmRoute(reactRoot, routeState);
5962
6111
  }
5963
- },
5964
- });
5965
- ${isolatedHydrationEnabled ? `// Not cancelled with the page: a navigation disposes the islands it removes, and one in a
5966
- // layout it keeps still waits for its trigger, as on a page of islands only.
5967
- const isolatedHydration =
5968
- !hasHydratableLayout(pathname) &&
5969
- document.querySelector('f-island[src]')
5970
- ? hydrateFarmIsolatedClientBoundaries(document)
5971
- : Promise.resolve();
5972
- await Promise.all([pageHydration, isolatedHydration]);` : "await pageHydration;"}
5973
- } finally {
6112
+ await farmClientRuntime.completeHydration(hydrationSession);
6113
+ } catch (error) {
6114
+ await farmClientRuntime.failHydration(hydrationSession, error);
6115
+ console.error("[Farm.js] Hydration error:", error);
6116
+ }
6117
+ },
6118
+ }).finally(function() {
5974
6119
  if (pendingPageHydrationController === hydrationController) {
5975
6120
  pendingPageHydrationController = null;
5976
6121
  }
5977
- }
6122
+ });
5978
6123
  }
5979
6124
 
5980
6125
  /*farm-router-start*/
@@ -6183,11 +6328,9 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
6183
6328
  partialNavigationHeaders: function() {
6184
6329
  const root = document.getElementById("root") || document.body;
6185
6330
  const layouts = getLayoutPatterns(root);
6186
- // The root React owns, or one whose layouts hydrate together but have not yet: the
6187
- // navigation creates it (swapContent).
6188
- const rendersTree = reactRoot
6189
- ? reactRootContainer === root
6190
- : root.id === "root" && hasHydratableLayout(window.location.pathname);
6331
+ // Only a root React owns rebuilds the next page from its tree. One that has not hydrated
6332
+ // swaps the next page's HTML in and keeps waiting (swapContent), without React DOM.
6333
+ const rendersTree = Boolean(reactRoot) && reactRootContainer === root;
6191
6334
  return {
6192
6335
  ...(layouts.length ? { "F-Layouts": JSON.stringify(layouts) } : {}),
6193
6336
  ...(rendersTree ? { "F-Render": "tree" } : {}),
@@ -6526,30 +6669,6 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
6526
6669
  const hydrateLayouts = hasHydratableLayout(newPathname);
6527
6670
  const nextPage = newRoot.querySelector("#__farm_page__");
6528
6671
 
6529
- ${islandValues ? `// A layout that hydrates as one root but has not yet (its client components wait for a
6530
- // click): its first navigation renders the page's payload in a new root, as later ones do.
6531
- if (
6532
- matched && hydrateLayouts && !reactRoot && currentRoot.id === "root" &&
6533
- nextPage?.querySelector('script[type="f/tree"][partial]')
6534
- ) {
6535
- const routeState = await createMatchedHydrationRoute(
6536
- matched,
6537
- newPathname,
6538
- searchParamsToObject(targetUrl.searchParams),
6539
- nextPage,
6540
- nextPageProps,
6541
- newRoot,
6542
- );
6543
- if (!isNavigationCurrent()) return false;
6544
- if (!routeState) return "segment-mismatch";
6545
- cancelPendingPageHydration();
6546
- resetRouteSlotRoots();
6547
- setFarmReactRoot(createRoot(currentRoot), currentRoot);
6548
- renderFarmRoute(reactRoot, routeState);
6549
- window.__FARM_ROUTE_SLOTS__ = nextRouteSlots;
6550
- setFarmHydrated();
6551
- return true;
6552
- }` : ""}
6553
6672
  // If React already owns the shared layout, update that root. React keeps
6554
6673
  // matching layout component instances and their state mounted.
6555
6674
  if (matched && hydrateLayouts && reactRoot && reactRootContainer === currentRoot) {
@@ -6594,24 +6713,51 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
6594
6713
 
6595
6714
  // Check if the new HTML contains an interactive route boundary.
6596
6715
  if (matched) {
6597
- const searchParams = searchParamsToObject(targetUrl.searchParams);
6598
6716
  const pageContainer =
6599
6717
  hydrateLayouts ? currentRoot : document.getElementById("__farm_page__") || currentRoot;
6600
- const routeState = await createMatchedHydrationRoute(
6601
- matched,
6602
- newPathname,
6603
- searchParams,
6604
- undefined,
6605
- nextPageProps,
6606
- undefined,
6607
- pageContainer,
6608
- );
6609
- if (!isNavigationCurrent()) return false;
6610
- if (routeState) {
6611
- setFarmReactRoot(hydrateFarmRoute(pageContainer, routeState), pageContainer);
6612
- setFarmHydrated();
6718
+ if (
6719
+ (hydrateLayouts || matched.route.pageShouldHydrate) &&
6720
+ (matched.route.islandStrategy || "load") !== "load"
6721
+ ) {
6722
+ // A root that waits for its trigger waits after a navigation too, as on a first load:
6723
+ // the page is server HTML and its tree until then, and React DOM loads when it hydrates.
6724
+ scheduleFarmRouteHydration(matched, newPathname, pageContainer, nextPageProps).catch(
6725
+ function(error) {
6726
+ console.error("[Farm.js] Hydration error:", error);
6727
+ },
6728
+ );
6729
+ } else {
6730
+ const searchParams = searchParamsToObject(targetUrl.searchParams);
6731
+ const routeState = await createMatchedHydrationRoute(
6732
+ matched,
6733
+ newPathname,
6734
+ searchParams,
6735
+ undefined,
6736
+ nextPageProps,
6737
+ undefined,
6738
+ pageContainer,
6739
+ );
6740
+ if (!isNavigationCurrent()) return false;
6741
+ if (routeState) {
6742
+ setFarmReactRoot(hydrateFarmRoute(pageContainer, routeState), pageContainer);
6743
+ setFarmHydrated();
6744
+ }
6613
6745
  }
6614
- ${isolatedHydrationEnabled ? `if (matched.route.hasIsolatedClientBoundaries && !hydrateLayouts) {
6746
+ ${isolatedHydrationEnabled ? lazyRenderer ? `if (matched.route.hasIsolatedClientBoundaries && !hydrateLayouts) {
6747
+ if (farmRendererLoaded) {
6748
+ await hydrateFarmIsolatedClientBoundaries(
6749
+ isolatedHydrationScope,
6750
+ navigation.controller.signal,
6751
+ );
6752
+ if (!isNavigationCurrent()) return false;
6753
+ } else {
6754
+ // React DOM and islx are still on their way (RFC 0010): the page shows now, and its
6755
+ // islands hydrate once they arrive. A navigation that removes them first disposes them.
6756
+ hydrateFarmIsolatedClientBoundaries(isolatedHydrationScope).catch(function(error) {
6757
+ console.error("[Farm.js] Hydrating the page's islands failed:", error);
6758
+ });
6759
+ }
6760
+ }` : `if (matched.route.hasIsolatedClientBoundaries && !hydrateLayouts) {
6615
6761
  await hydrateFarmIsolatedClientBoundaries(
6616
6762
  isolatedHydrationScope,
6617
6763
  navigation.controller.signal,
@@ -6764,7 +6910,7 @@ void hydrate();
6764
6910
  async function buildSSRInMemory(productionVite, config, root, routeManager, apiRouteManager, serverRenderer, preset, collectedPageRoutes, collectedLayoutRoutes, collectedRouteSlots, isolatedClientBoundaryModules, hydrationPlanCache, rendererBuildLifetime, sourceSnapshot) {
6765
6911
  const viteBuild = productionVite.build;
6766
6912
  const { farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.mjs");
6767
- const { PluginManager: PluginManager2 } = await import("./plugin-2KWR2X4B.mjs");
6913
+ const { PluginManager: PluginManager2 } = await import("./plugin-33I3V42N.mjs");
6768
6914
  const fs5 = await import("fs/promises");
6769
6915
  const pluginManager = new PluginManager2({
6770
6916
  config,
@@ -6867,7 +7013,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
6867
7013
  const appDirs = getFarmAppDirectories(config);
6868
7014
  let openAPIReference = null;
6869
7015
  if (config.openapi.enabled && config.openapi.route) {
6870
- const { OpenAPIManager, renderOpenAPIReferenceHTML } = await import("./manager-YO2RHDYU.mjs");
7016
+ const { OpenAPIManager, renderOpenAPIReferenceHTML } = await import("./manager-OMTC5FOJ.mjs");
6871
7017
  const openAPIManager = new OpenAPIManager(appDirs, config.openapi, {
6872
7018
  mode: "production",
6873
7019
  apiBaseURL: config.api.baseURL,
@@ -7679,7 +7825,15 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
7679
7825
  const hasReactSyncRender = isReactRenderer(config.renderer);
7680
7826
  const rendererServerImports = isReactRenderer(config.renderer) ? `import * as React from "react";
7681
7827
  import * as ReactDOMServer from "react-dom/server";
7682
- import { markPagePosition, markLayoutPosition } from "@farm.js/core/internal/production-runtime";${hasIsolatedClientGraphRuntime ? farmIslandsMode ? '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph, renderFarmServerTreePage, renderFarmServerTreeLayout, withFarmIslandsRender } from "@farm.js/core/internal/islands-runtime";' : '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";\nimport { renderFarmServerTreePage } from "@farm.js/core/internal/server-tree";' : ""}` : `import React, * as ReactDOMServer from ${JSON.stringify(config.renderer.server)};${generateFarmRendererAppSetupServerCode(config)}`;
7828
+ import { markPagePosition, markLayoutPosition } from "@farm.js/core/internal/production-runtime";${hasIsolatedClientGraphRuntime ? farmIslandsMode ? '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph, renderFarmServerTreePage, renderFarmServerTreeLayout, withFarmIslandsRender } from "@farm.js/core/internal/islands-runtime";' : '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";\nimport { renderFarmServerTreePage } from "@farm.js/core/internal/server-tree";' : ""}` : (
7829
+ // The renderer contract is the server module's named exports, which the development
7830
+ // server reads too; a renderer needs no default export. The entry feature-checks optional
7831
+ // exports (streaming, `capabilities`, `generateHydrationScript`) on a copy of the
7832
+ // namespace, because Rolldown warns about each such read off the namespace itself.
7833
+ `import * as __farmRendererServer from ${JSON.stringify(config.renderer.server)};
7834
+ const ReactDOMServer = { ...__farmRendererServer };
7835
+ const React = ReactDOMServer;${generateFarmRendererAppSetupServerCode(config)}`
7836
+ );
7683
7837
  const routeClientGraphServerRuntime = hasIsolatedClientGraphRuntime ? `function wrapFarmRouteClientGraph(element) {
7684
7838
  return wrapFarmIsolatedClientGraph(React, element);
7685
7839
  }
@@ -8982,10 +9136,12 @@ function farmDocumentBootsClient(markup, hydratesAtLoad, routeSlots) {
8982
9136
  return true;
8983
9137
  }
8984
9138
 
8985
- // The boot entry runs the client entry from the URL on its script. A root that waits (the element
8986
- // a hydrating layout or client page hydrates) is named with its strategy, for the boot to watch.
8987
- function renderFarmClientBootScript(root, rootStrategy) {
9139
+ // The boot entry runs the client entry from the URL on its script, with the files listed for what
9140
+ // started it. A root that waits (the element a hydrating layout or client page hydrates) is named
9141
+ // with its strategy, for the boot to watch.
9142
+ function renderFarmClientBootScript(root, rootStrategy, markup, pageModule, navigation) {
8988
9143
  return stampFarmCspNonce('<script type="module" src="${farmClientBoot ? FARM_CLIENT_BOOT_SRC_PLACEHOLDER : ""}" data-farm-runtime="/__farm_client_js_src__"' +
9144
+ renderFarmClientBootPreloads(markup, pageModule, root, rootStrategy, navigation) +
8989
9145
  (root ? ' data-farm-root="' + root + '" data-farm-root-strategy="' + rootStrategy + '"' : '') +
8990
9146
  '></script>');
8991
9147
  }
@@ -9775,6 +9931,11 @@ ${generateFarmClientBootRoutesServerSource(`"${FARM_CLIENT_ROUTE_TABLE_PLACEHOLD
9775
9931
  const farmClientEntryPreloadTags = farmClientModulePreloads
9776
9932
  ? farmClientModulePreloads.entry.map(renderFarmClientModulePreload).join("")
9777
9933
  : "";
9934
+ // A document that runs the entry at once (no boot) hydrates with the renderer it imports lazily
9935
+ // (RFC 0010). A client navigation's response runs neither, so it leaves them out.
9936
+ const farmClientRendererPreloadTags = farmClientModulePreloads
9937
+ ? (farmClientModulePreloads.renderer || []).map(renderFarmClientModulePreload).join("")
9938
+ : "";
9778
9939
  // The client modules a document's markup loads: its islands' boundaries and the
9779
9940
  // client references of its server tree. An island with a deferred strategy loads its
9780
9941
  // module on its own trigger, so it is not preloaded.
@@ -9786,22 +9947,17 @@ function renderFarmClientModulePreload(index) {
9786
9947
  '" fetchpriority="low">';
9787
9948
  }
9788
9949
 
9789
- // The modulepreload links for a document: the entry's static imports, then the
9790
- // modules its hydrating page and its markup load.
9791
- function renderFarmClientModulePreloads(markup, pageModule) {
9792
- // A nonce policy blocks parser-inserted links without the nonce, and the
9793
- // response filter manages nonces on script elements only, so CSP nonce mode
9794
- // keeps the documents it had.
9795
- if (!farmClientModulePreloads || (farmSecurityConfig.csp && farmSecurityConfig.csp.nonce)) return "";
9950
+ // The manifest indexes of the modules a document's hydrating page and its markup
9951
+ // load, leaving out those already listed.
9952
+ function collectFarmClientDocumentModules(markup, pageModule, listed) {
9796
9953
  const modules = farmClientModulePreloads.modules;
9797
- const listed = new Set();
9798
- let tags = farmClientEntryPreloadTags;
9954
+ const indexes = [];
9799
9955
  const add = (moduleId) => {
9800
9956
  if (!moduleId || !Object.prototype.hasOwnProperty.call(modules, moduleId)) return;
9801
9957
  for (const index of modules[moduleId]) {
9802
9958
  if (listed.has(index)) continue;
9803
9959
  listed.add(index);
9804
- tags += renderFarmClientModulePreload(index);
9960
+ indexes.push(index);
9805
9961
  }
9806
9962
  };
9807
9963
  add(pageModule);
@@ -9811,7 +9967,47 @@ function renderFarmClientModulePreloads(markup, pageModule) {
9811
9967
  add(match[1] || match[3]);
9812
9968
  }
9813
9969
  }
9814
- return tags;
9970
+ return indexes;
9971
+ }
9972
+
9973
+ // The modulepreload links for a document: the entry's static imports and, unless it answers a
9974
+ // client navigation, the renderer, then the modules its hydrating page and its markup load.
9975
+ function renderFarmClientModulePreloads(markup, pageModule, navigation) {
9976
+ // A nonce policy blocks parser-inserted links without the nonce, and the
9977
+ // response filter manages nonces on script elements only, so CSP nonce mode
9978
+ // keeps the documents it had.
9979
+ if (!farmClientModulePreloads || (farmSecurityConfig.csp && farmSecurityConfig.csp.nonce)) return "";
9980
+ return farmClientEntryPreloadTags + (navigation ? "" : farmClientRendererPreloadTags) +
9981
+ collectFarmClientDocumentModules(markup, pageModule, new Set())
9982
+ .map(renderFarmClientModulePreload)
9983
+ .join("");
9984
+ }
9985
+
9986
+ // What a boot document's runtime fetches as it starts, for the boot to request with it rather
9987
+ // than each a round trip after the file that imports it: the entry's static imports, the router
9988
+ // and route table a link's intent loads, the renderer the entry renders and hydrates with (RFC
9989
+ // 0010), and the modules the root hydrates with. A root that
9990
+ // waits for its time hydrates once the runtime runs, so its modules come with the entry's; one
9991
+ // that waits for a click hydrates on an interaction in it, and the boot fetches them then. The
9992
+ // boot adds the links itself with the script's nonce, so CSP nonce mode keeps them.
9993
+ function renderFarmClientBootPreloads(markup, pageModule, root, rootStrategy, navigation) {
9994
+ if (!farmClientModulePreloads) return "";
9995
+ const files = farmClientModulePreloads.files;
9996
+ const attribute = function(name, indexes) {
9997
+ if (indexes.length === 0) return "";
9998
+ return " " + name + '="' + escapeFarmHtmlAttribute(
9999
+ indexes.map(function(index) { return files[index]; }).join(" ")
10000
+ ) + '"';
10001
+ };
10002
+ const entry = farmClientModulePreloads.entry;
10003
+ const rootModules = root
10004
+ ? collectFarmClientDocumentModules(markup, pageModule, new Set(entry))
10005
+ : [];
10006
+ const waitsForClick = rootStrategy === "interaction";
10007
+ return attribute("data-farm-preload", waitsForClick ? entry : entry.concat(rootModules)) +
10008
+ attribute("data-farm-preload-router", farmClientModulePreloads.router || []) +
10009
+ attribute("data-farm-preload-renderer", navigation ? [] : farmClientModulePreloads.renderer || []) +
10010
+ (waitsForClick ? attribute("data-farm-preload-root", rootModules) : "");
9815
10011
  }
9816
10012
 
9817
10013
  // The origin hreflang alternates resolve against when the route sets no
@@ -12251,6 +12447,10 @@ ${hasServerRuntimeIntegrations ? `
12251
12447
  // Set once the whole document is rendered: whether it starts with the boot entry, which
12252
12448
  // preloads nothing.
12253
12449
  let farmBootsClient = false;
12450
+ // A client navigation swaps this document in without running its scripts. A route a
12451
+ // shared cache stores renders the same for every request.
12452
+ const farmNavigationRequest = ${farmIslandsMode ? `!farmSharedCacheableRoute &&
12453
+ (request.headers.has("f-stream") || request.headers.has("f-render"))` : "false"};
12254
12454
  // A layout's own <html> document with Farm's head assets merged in and the #root the client
12255
12455
  // hydrates opening its body: the whole document, or a streamed one's opening.
12256
12456
  const composeFarmFullDocument = function(markup) {
@@ -12260,7 +12460,7 @@ ${hasServerRuntimeIntegrations ? `
12260
12460
  );
12261
12461
  composed = composed
12262
12462
  // Inject CSS link after opening head tag or first meta tag
12263
- .replace(/<head([^>]*)>/i, function(match, attrs) { return '<head' + attrs + '>\\n <link rel="stylesheet" href="/__farm_client_css_href__">' + (farmBootsClient ? "" : renderFarmClientModulePreloads(composed, route.clientModule)); })
12463
+ .replace(/<head([^>]*)>/i, function(match, attrs) { return '<head' + attrs + '>\\n <link rel="stylesheet" href="/__farm_client_css_href__">' + (farmBootsClient ? "" : renderFarmClientModulePreloads(composed, route.clientModule, farmNavigationRequest)); })
12264
12464
  .replace(/<\\/head>/i, () => renderFarmRendererHydrationScript() + '\\n</head>')
12265
12465
  // Explicit metadata wins over renderer and layout titles. Without
12266
12466
  // explicit metadata, a renderer title wins over the layout title.
@@ -12456,7 +12656,10 @@ ${hasServerRuntimeIntegrations ? `
12456
12656
  const farmEntryScript = farmBootsClient
12457
12657
  ? renderFarmClientBootScript(
12458
12658
  farmHydratesRoot ? (shouldHydrateLayout ? "root" : "__farm_page__") : "",
12459
- route.rootStrategy
12659
+ route.rootStrategy,
12660
+ html,
12661
+ route.clientModule,
12662
+ farmNavigationRequest
12460
12663
  )
12461
12664
  : renderFarmClientEntryScript();
12462
12665
 
@@ -12487,7 +12690,7 @@ ${hasServerRuntimeIntegrations ? `
12487
12690
  \${viewportTags}
12488
12691
  \${hasFavicon ? "" : '<link rel="icon" href="data:,">'}
12489
12692
  \${suppressDefaultTitle ? "" : "<title>" + title + "</title>"}\${metaTags}\${rendererHead ? "\\n " + rendererHead : ""}
12490
- <link rel="stylesheet" href="/__farm_client_css_href__">\${farmBootsClient ? "" : renderFarmClientModulePreloads(html, route.clientModule)}
12693
+ <link rel="stylesheet" href="/__farm_client_css_href__">\${farmBootsClient ? "" : renderFarmClientModulePreloads(html, route.clientModule, farmNavigationRequest)}
12491
12694
  \${renderFarmRendererHydrationScript()}
12492
12695
  </head>
12493
12696
  <body>
@@ -14969,7 +15172,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
14969
15172
  basePath: config.basePath,
14970
15173
  publicDir: config.publicDir
14971
15174
  }),
14972
- farmEnvironmentFunctionsPlugin(),
15175
+ farmEnvironmentFunctionsPlugin({ renderer: config.renderer }),
14973
15176
  // Route modules load here at build time (rendering config, prerendering): `server-only`
14974
15177
  // resolves as it does in the server build. Module-entry packages load pre-bundled, as in
14975
15178
  // `farm dev`: unbundled, lucide-react alone is ~1,750 modules through the module runner,
@@ -15039,7 +15242,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
15039
15242
  farmPlugin,
15040
15243
  farmServerOnlyEntriesPlugin
15041
15244
  } = await import("./vite.mjs");
15042
- const { PluginManager: PluginManager2 } = await import("./plugin-2KWR2X4B.mjs");
15245
+ const { PluginManager: PluginManager2 } = await import("./plugin-33I3V42N.mjs");
15043
15246
  const pluginManager = new PluginManager2({
15044
15247
  config,
15045
15248
  isDev: false,
@@ -15067,7 +15270,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
15067
15270
  }
15068
15271
  async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
15069
15272
  const { farmI18nClientBridgePlugin, farmIslandContainersPlugin, farmPlugin } = await import("./vite.mjs");
15070
- const { PluginManager: PluginManager2 } = await import("./plugin-2KWR2X4B.mjs");
15273
+ const { PluginManager: PluginManager2 } = await import("./plugin-33I3V42N.mjs");
15071
15274
  const pluginManager = new PluginManager2({
15072
15275
  config,
15073
15276
  isDev: false,
@@ -15109,7 +15312,7 @@ function resolveLegacyPageEntry(config, root, srcDir) {
15109
15312
  }
15110
15313
  async function buildNitro(config, routeManager, apiRouteManager, serverRenderer, preset, root, distDir, pluginManager) {
15111
15314
  const [{ createNitroConfig }, { createNitro, build: nitroBuild }] = await Promise.all([
15112
- import("./nitro-RHLKLYXH.mjs"),
15315
+ import("./nitro-C3MYDX7V.mjs"),
15113
15316
  import("nitro/builder")
15114
15317
  ]);
15115
15318
  let nitroConfig = await createNitroConfig(