@farm.js/core 0.1.86 → 0.2.0-beta.0

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 (272) hide show
  1. package/dist/{agent-mcp.d-7uKdOttc.d.ts → agent-mcp.d-BdM0pIrD.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-LChlR2au.d.mts → agent-mcp.d-CMGqpUbk.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +1 -1
  4. package/dist/agent-runtime.d.ts +1 -1
  5. package/dist/analyzer-B2TRJT3B.cjs +17 -0
  6. package/dist/{analyzer-I5S5YKHM.mjs → analyzer-PWHYGER6.mjs} +2 -2
  7. package/dist/api/node.d.mts +3 -3
  8. package/dist/api/node.d.ts +3 -3
  9. package/dist/api/route-manager.cjs +4 -4
  10. package/dist/api/route-manager.d.mts +3 -3
  11. package/dist/api/route-manager.d.ts +3 -3
  12. package/dist/api/route-manager.mjs +3 -3
  13. package/dist/api/runtime.d.mts +2 -2
  14. package/dist/api/runtime.d.ts +2 -2
  15. package/dist/api.cjs +5 -5
  16. package/dist/api.d.mts +4 -4
  17. package/dist/api.d.ts +4 -4
  18. package/dist/api.mjs +4 -4
  19. package/dist/{app-manifest.d-QMdmqqCr.d.mts → app-manifest.d-BeDB2OVm.d.mts} +1 -1
  20. package/dist/{app-manifest.d-CRp21oAz.d.ts → app-manifest.d-COhjPgHn.d.ts} +1 -1
  21. package/dist/app-markdown.d.mts +2 -2
  22. package/dist/app-markdown.d.ts +2 -2
  23. package/dist/{app.d-Bvpc2eJq.d.mts → app.d-AVZXCfcO.d.mts} +5 -4
  24. package/dist/{app.d-DEKpJEp4.d.ts → app.d-b3A4cca5.d.ts} +5 -4
  25. package/dist/{chunk-B7L24VPX.cjs → chunk-22KXTL3I.cjs} +6 -4
  26. package/dist/chunk-2HTNASSB.cjs +134 -0
  27. package/dist/{chunk-FULX5RYX.cjs → chunk-2OR5WAD5.cjs} +19 -13
  28. package/dist/{chunk-5P65LXGU.cjs → chunk-3MY6TNNE.cjs} +15 -14
  29. package/dist/{chunk-A4WWKG2B.cjs → chunk-5ZWXTIGE.cjs} +2 -2
  30. package/dist/{chunk-2NKNP4AH.cjs → chunk-6266WH6X.cjs} +1 -1
  31. package/dist/chunk-65LZRVCZ.mjs +18 -0
  32. package/dist/{chunk-L2IULWKV.cjs → chunk-7LBNWL3L.cjs} +3 -3
  33. package/dist/{chunk-KHIEGVG7.mjs → chunk-BGEA4K7C.mjs} +10 -4
  34. package/dist/{chunk-CVKTYG4L.mjs → chunk-BJHXFEAF.mjs} +2 -2
  35. package/dist/chunk-BQHIJOZM.cjs +13 -0
  36. package/dist/{chunk-IAERD73G.cjs → chunk-CFLRUCN7.cjs} +384 -339
  37. package/dist/{chunk-NXOZRI3B.cjs → chunk-CNGGEHXY.cjs} +2 -2
  38. package/dist/{chunk-3RVLJTFZ.mjs → chunk-D7LXBLUW.mjs} +1 -1
  39. package/dist/{chunk-B5QRNCIE.mjs → chunk-DATICPTO.mjs} +1 -1
  40. package/dist/{chunk-XMVZXZ32.cjs → chunk-ERV422FO.cjs} +2 -2
  41. package/dist/{chunk-BAD6T5NU.cjs → chunk-FEWCWBOF.cjs} +4 -4
  42. package/dist/{chunk-FLMALEY2.mjs → chunk-GGD57DJA.mjs} +3 -25
  43. package/dist/{chunk-HQ2VAJLW.mjs → chunk-GV5D5EM6.mjs} +1 -1
  44. package/dist/{chunk-6MZSTPD2.mjs → chunk-H47EH24T.mjs} +1 -1
  45. package/dist/{chunk-OBVBII5K.cjs → chunk-HU4R2PPW.cjs} +2 -2
  46. package/dist/{chunk-7H2TXT2K.mjs → chunk-HX5HLFBZ.mjs} +7 -0
  47. package/dist/{chunk-N3VMHPIY.mjs → chunk-HZY63K5C.mjs} +2 -2
  48. package/dist/{chunk-25JGHAGH.cjs → chunk-I2RBHZF7.cjs} +15 -8
  49. package/dist/{chunk-FDU4Q4QP.cjs → chunk-IRPXOTEN.cjs} +10 -4
  50. package/dist/{chunk-NAHDG6UX.mjs → chunk-JDO3X7RB.mjs} +6 -5
  51. package/dist/{chunk-TQJ35BBW.cjs → chunk-JGUMFTZT.cjs} +4 -4
  52. package/dist/chunk-JIGWHFA5.mjs +32 -0
  53. package/dist/{chunk-YBXIVQCE.cjs → chunk-JP5TWUK2.cjs} +4 -4
  54. package/dist/chunk-K6RMOB25.mjs +134 -0
  55. package/dist/{chunk-UGD53SNO.cjs → chunk-KQ6TYQU7.cjs} +16 -12
  56. package/dist/{chunk-6QYPP5KC.mjs → chunk-L6ZL35ZJ.mjs} +7 -5
  57. package/dist/{chunk-7UTRNV6R.mjs → chunk-LUGQUU4S.mjs} +1 -1
  58. package/dist/{chunk-QYWP5KDY.mjs → chunk-M4CNAZMS.mjs} +74 -29
  59. package/dist/{chunk-3TKGMIPX.mjs → chunk-MM4U2NNI.mjs} +91 -12
  60. package/dist/{chunk-CFKAYV7B.mjs → chunk-MRULVIH3.mjs} +1 -1
  61. package/dist/{chunk-UAQQUQWE.mjs → chunk-MZPPT5NA.mjs} +1 -1
  62. package/dist/{chunk-2UYYXSUS.mjs → chunk-N5NRXLCX.mjs} +4 -2
  63. package/dist/chunk-NDMPGFKL.cjs +47 -0
  64. package/dist/{chunk-YHM4PXJY.mjs → chunk-O5YM6GU3.mjs} +1 -1
  65. package/dist/{chunk-QYDGIXQ5.cjs → chunk-PA3VZNWU.cjs} +9 -9
  66. package/dist/{chunk-2PJVEL56.cjs → chunk-PCAEJNQF.cjs} +5 -27
  67. package/dist/{chunk-P253SZJF.cjs → chunk-PQ6DBVJ2.cjs} +360 -281
  68. package/dist/chunk-PTAGDZ7I.mjs +13 -0
  69. package/dist/{chunk-3AV4DCXY.mjs → chunk-PWTBXYJY.mjs} +12 -6
  70. package/dist/{chunk-PO5MZIWK.mjs → chunk-QBXS4TNG.mjs} +6 -2
  71. package/dist/chunk-QZUCVJZJ.cjs +18 -0
  72. package/dist/{chunk-45ANSCTO.mjs → chunk-SCOKBXHS.mjs} +98 -56
  73. package/dist/{chunk-BLZCAFGJ.cjs → chunk-SG5RFGV6.cjs} +2 -2
  74. package/dist/{chunk-U54REWMJ.cjs → chunk-SUACCCZG.cjs} +18 -16
  75. package/dist/chunk-TCGPBSVY.mjs +47 -0
  76. package/dist/{chunk-CN2JOTRO.cjs → chunk-THGSPDFD.cjs} +7 -7
  77. package/dist/{chunk-FWLXYNWA.cjs → chunk-TQFIZRON.cjs} +387 -345
  78. package/dist/{chunk-VGHDPEPQ.cjs → chunk-UA77C2ZA.cjs} +2 -2
  79. package/dist/{chunk-Q3YWQEUS.cjs → chunk-VMGQOP7X.cjs} +2 -2
  80. package/dist/{chunk-4SJ22WTT.mjs → chunk-W3ZBLFLU.mjs} +1 -1
  81. package/dist/{chunk-SB74WCKC.mjs → chunk-WOTAU3BN.mjs} +4 -4
  82. package/dist/{chunk-JB4BHRFK.cjs → chunk-WP77JDKI.cjs} +16 -16
  83. package/dist/{chunk-YMAE32O7.mjs → chunk-WPB6HJC7.mjs} +1 -1
  84. package/dist/{chunk-VPGEYX5Y.mjs → chunk-WX752VMN.mjs} +2 -2
  85. package/dist/{chunk-VTEAUQMT.mjs → chunk-X2SMVPLH.mjs} +19 -3
  86. package/dist/{chunk-DJ3PVHTW.cjs → chunk-XGPRM7OK.cjs} +3 -3
  87. package/dist/{chunk-GWPANDW3.mjs → chunk-XJJQAFZX.mjs} +1 -1
  88. package/dist/{chunk-UDWBTABT.cjs → chunk-XRYLMTYF.cjs} +3 -3
  89. package/dist/{chunk-PAENAKTC.mjs → chunk-YCHIR3X6.mjs} +1 -1
  90. package/dist/chunk-YIGUFJMR.cjs +32 -0
  91. package/dist/{chunk-CPSFDQKJ.cjs → chunk-Z43CIBUR.cjs} +20 -4
  92. package/dist/{chunk-RA5OUXOJ.mjs → chunk-ZOD6EYWE.mjs} +2 -2
  93. package/dist/{cli-runtime.d-DaElKjaL.d.ts → cli-runtime.d-jqZ7YCsm.d.ts} +5 -5
  94. package/dist/{cli-runtime.d-C7aMfoTq.d.mts → cli-runtime.d-qL44rqYO.d.mts} +5 -5
  95. package/dist/{client-component.d-miqIXyQv.d.mts → client-component.d-B2L2LyAr.d.mts} +1 -1
  96. package/dist/{client-component.d-CZG02pIh.d.ts → client-component.d-BDD5aiUb.d.ts} +1 -1
  97. package/dist/{client-plugins.d-BVXjyIkY.d.ts → client-plugins.d-Crct3m_r.d.ts} +14 -5
  98. package/dist/{client-plugins.d-BwKwuO_0.d.mts → client-plugins.d-Dzc3vOw_.d.mts} +14 -5
  99. package/dist/client-plugins.d.mts +1 -1
  100. package/dist/client-plugins.d.ts +1 -1
  101. package/dist/client.cjs +8 -6
  102. package/dist/client.d.mts +8 -7
  103. package/dist/client.d.ts +8 -7
  104. package/dist/client.mjs +7 -5
  105. package/dist/config.d.mts +1 -1
  106. package/dist/config.d.ts +1 -1
  107. package/dist/desktop.d.mts +2 -2
  108. package/dist/desktop.d.ts +2 -2
  109. package/dist/{devtools-DGC2247E.mjs → devtools-2CRVXV7E.mjs} +4 -2
  110. package/dist/{devtools-A3L7WNTB.cjs → devtools-RL4AU5KD.cjs} +5 -3
  111. package/dist/docs.cjs +6 -4
  112. package/dist/docs.d.mts +3 -3
  113. package/dist/docs.d.ts +3 -3
  114. package/dist/docs.mjs +5 -3
  115. package/dist/environment/vite.cjs +4 -4
  116. package/dist/environment/vite.mjs +3 -3
  117. package/dist/font.cjs +4 -2
  118. package/dist/font.d.mts +13 -1
  119. package/dist/font.d.ts +13 -1
  120. package/dist/font.mjs +3 -1
  121. package/dist/{handler.d-BKTWzzNA.d.mts → handler.d-B1S1ZBqS.d.mts} +1 -1
  122. package/dist/{handler.d-Dzpyg3-N.d.ts → handler.d-ZweCBJD4.d.ts} +1 -1
  123. package/dist/{headers.d-PZyXcDAH.d.ts → headers.d-BgBdQN8x.d.ts} +1 -1
  124. package/dist/{headers.d-5opjyhXw.d.mts → headers.d-C-yGl_f6.d.mts} +1 -1
  125. package/dist/i18n/client.cjs +11 -10
  126. package/dist/i18n/client.mjs +3 -2
  127. package/dist/image-attributes.d-BMPDQO1q.d.mts +55 -0
  128. package/dist/image-attributes.d-BMPDQO1q.d.ts +55 -0
  129. package/dist/image.cjs +5 -127
  130. package/dist/image.d.mts +3 -13
  131. package/dist/image.d.ts +3 -13
  132. package/dist/image.mjs +5 -127
  133. package/dist/index.cjs +40 -36
  134. package/dist/{index.d-C0Mie66f.d.mts → index.d-13h3oDu7.d.mts} +1 -1
  135. package/dist/{index.d-DV2q-0mE.d.ts → index.d-CtoniAXT.d.ts} +1 -1
  136. package/dist/index.d.mts +24 -23
  137. package/dist/index.d.ts +24 -23
  138. package/dist/index.mjs +35 -31
  139. package/dist/integrations/orm.d.mts +1 -1
  140. package/dist/integrations/orm.d.ts +1 -1
  141. package/dist/integrations.d.mts +1 -1
  142. package/dist/integrations.d.ts +1 -1
  143. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  144. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  145. package/dist/internal/build-runtime.cjs +22 -22
  146. package/dist/internal/build-runtime.d.mts +4 -4
  147. package/dist/internal/build-runtime.d.ts +4 -4
  148. package/dist/internal/build-runtime.mjs +21 -21
  149. package/dist/internal/cli-runtime.cjs +8 -6
  150. package/dist/internal/cli-runtime.d.mts +7 -7
  151. package/dist/internal/cli-runtime.d.ts +7 -7
  152. package/dist/internal/cli-runtime.mjs +7 -5
  153. package/dist/internal/client-error-overlay.cjs +4 -4
  154. package/dist/internal/client-error-overlay.mjs +1 -1
  155. package/dist/internal/client-runtime.cjs +77 -52
  156. package/dist/internal/client-runtime.d.mts +9 -7
  157. package/dist/internal/client-runtime.d.ts +9 -7
  158. package/dist/internal/client-runtime.mjs +64 -39
  159. package/dist/internal/compression-runtime.d.mts +1 -1
  160. package/dist/internal/compression-runtime.d.ts +1 -1
  161. package/dist/internal/config-runtime.cjs +6 -4
  162. package/dist/internal/config-runtime.d.mts +3 -3
  163. package/dist/internal/config-runtime.d.ts +3 -3
  164. package/dist/internal/config-runtime.mjs +5 -3
  165. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  166. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  167. package/dist/internal/islands-boot.cjs +51 -18
  168. package/dist/internal/islands-boot.d.mts +3 -1
  169. package/dist/internal/islands-boot.d.ts +3 -1
  170. package/dist/internal/islands-boot.mjs +34 -1
  171. package/dist/internal/native-server-fns.cjs +4 -4
  172. package/dist/internal/native-server-fns.mjs +3 -3
  173. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  174. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  175. package/dist/internal/production-runtime.cjs +6 -6
  176. package/dist/internal/production-runtime.d.mts +10 -10
  177. package/dist/internal/production-runtime.d.ts +10 -10
  178. package/dist/internal/production-runtime.mjs +5 -5
  179. package/dist/internal/renderer-islands.cjs +35 -8
  180. package/dist/internal/renderer-islands.d.mts +9 -1
  181. package/dist/internal/renderer-islands.d.ts +9 -1
  182. package/dist/internal/renderer-islands.mjs +35 -8
  183. package/dist/internal/spa-router.cjs +4 -3
  184. package/dist/internal/spa-router.d.mts +3 -3
  185. package/dist/internal/spa-router.d.ts +3 -3
  186. package/dist/internal/spa-router.mjs +3 -2
  187. package/dist/internal/start-manifest.d.mts +1 -1
  188. package/dist/internal/start-manifest.d.ts +1 -1
  189. package/dist/{island-runtime.d-BA7EPo1v.d.ts → island-runtime.d-D2Mh5eTU.d.ts} +5 -1
  190. package/dist/{island-runtime.d-BBS_YUSX.d.mts → island-runtime.d-lrpEJlgg.d.mts} +5 -1
  191. package/dist/{manager-PX4QN4HK.cjs → manager-D4DZRBRS.cjs} +4 -4
  192. package/dist/{manager-OMTC5FOJ.mjs → manager-PKPQGBAE.mjs} +3 -3
  193. package/dist/markdown.d.mts +1 -1
  194. package/dist/markdown.d.ts +1 -1
  195. package/dist/middleware.cjs +4 -4
  196. package/dist/middleware.d.mts +1 -1
  197. package/dist/middleware.d.ts +1 -1
  198. package/dist/middleware.mjs +3 -3
  199. package/dist/{mount.d-gWul1GA1.d.ts → mount.d-DyKlRR6z.d.ts} +1 -1
  200. package/dist/{mount.d-CZ_qL1iS.d.mts → mount.d-_6Un9wdK.d.mts} +1 -1
  201. package/dist/{navigation-delegate.d-BBTzhJLj.d.mts → navigation-delegate.d-B9GjWbov.d.mts} +1 -1
  202. package/dist/{navigation-delegate.d-BZsYEAet.d.ts → navigation-delegate.d-BbW1_pf_.d.ts} +1 -1
  203. package/dist/navigation.cjs +6 -5
  204. package/dist/navigation.d.mts +4 -4
  205. package/dist/navigation.d.ts +4 -4
  206. package/dist/navigation.mjs +5 -4
  207. package/dist/{plugin-QOTAPTVV.mjs → plugin-EVKQZBNW.mjs} +1 -1
  208. package/dist/{plugin-3PT7I26P.cjs → plugin-MWO3G2XM.cjs} +2 -2
  209. package/dist/plugin.cjs +19 -19
  210. package/dist/plugin.d.mts +5 -5
  211. package/dist/plugin.d.ts +5 -5
  212. package/dist/plugin.mjs +18 -18
  213. package/dist/query/client.cjs +8 -7
  214. package/dist/query/client.mjs +3 -2
  215. package/dist/{render-plan.d-AaJsYPX-.d.ts → render-plan.d-D0FV9lDT.d.ts} +1 -1
  216. package/dist/{render-plan.d-bnWxS12w.d.mts → render-plan.d-DaM1NPnm.d.mts} +1 -1
  217. package/dist/renderer-client.cjs +19 -13
  218. package/dist/renderer-client.d.mts +6 -5
  219. package/dist/renderer-client.d.ts +6 -5
  220. package/dist/renderer-client.mjs +10 -4
  221. package/dist/renderer.cjs +3 -3
  222. package/dist/renderer.mjs +2 -2
  223. package/dist/{request.d-CAeitOG1.d.ts → request.d-CrXC7voZ.d.ts} +1 -1
  224. package/dist/{request.d-C2HOn3Hi.d.mts → request.d-DVSLilGx.d.mts} +1 -1
  225. package/dist/request.d.mts +2 -2
  226. package/dist/request.d.ts +2 -2
  227. package/dist/{route-rendering.d-CYA-ulnX.d.mts → route-rendering.d-CWi3UYtR.d.mts} +1 -1
  228. package/dist/{route-rendering.d-A1dIkUK5.d.ts → route-rendering.d-OfbM_rj8.d.ts} +1 -1
  229. package/dist/{router.d-A_Yt6jYz.d.ts → router.d-Bm9FNSu3.d.ts} +1 -1
  230. package/dist/{router.d-8lxnzlkr.d.mts → router.d-YKVirmj4.d.mts} +1 -1
  231. package/dist/routes.d.mts +1 -1
  232. package/dist/routes.d.ts +1 -1
  233. package/dist/{rsc-pipeline-SNGPAXGW.cjs → rsc-pipeline-3DYC5ZXW.cjs} +6 -4
  234. package/dist/{rsc-pipeline-BROS3NEB.mjs → rsc-pipeline-LRB4ZG6I.mjs} +5 -3
  235. package/dist/{runtime-SLJLW37A.mjs → runtime-3WJNNAAR.mjs} +5 -3
  236. package/dist/{runtime-7T5TRAWL.cjs → runtime-CRFF32H6.cjs} +7 -5
  237. package/dist/{runtime.d-C_rZ9_DD.d.mts → runtime.d-BVj6apd0.d.mts} +1 -1
  238. package/dist/{runtime.d-BPyvWrgQ.d.ts → runtime.d-D7QYVJGO.d.ts} +1 -1
  239. package/dist/{server-components-status.d-BpxiEMQE.d.mts → server-components-status.d-BDVcxi0z.d.mts} +1 -1
  240. package/dist/{server-components-status.d-C2UEKJn7.d.ts → server-components-status.d-CfKDpmCH.d.ts} +1 -1
  241. package/dist/server-plugins.d.mts +3 -3
  242. package/dist/server-plugins.d.ts +3 -3
  243. package/dist/server.cjs +54 -40
  244. package/dist/server.d.mts +11 -11
  245. package/dist/server.d.ts +11 -11
  246. package/dist/server.mjs +34 -20
  247. package/dist/{spa-router.d-BD-6WX1R.d.mts → spa-router.d-DGmropfK.d.mts} +5 -3
  248. package/dist/{spa-router.d-Cw5i_15e.d.ts → spa-router.d-nE1jHNGt.d.ts} +5 -3
  249. package/dist/{ssg.d-CCE9aob5.d.mts → ssg.d-DS-gXUbf.d.mts} +2 -2
  250. package/dist/{ssg.d-Bifiq0EL.d.ts → ssg.d-jXlUAKzg.d.ts} +2 -2
  251. package/dist/{store-core.d-5tVn5vi1.d.ts → store-core.d-B5cwOd8g.d.ts} +3 -2
  252. package/dist/{store-core.d-BN2MxSG9.d.mts → store-core.d-C-gATBwd.d.mts} +3 -2
  253. package/dist/testing.cjs +3 -3
  254. package/dist/testing.d.mts +1 -1
  255. package/dist/testing.d.ts +1 -1
  256. package/dist/testing.mjs +3 -3
  257. package/dist/{utils.d-BUjpSNIO.d.ts → utils.d-BODwBtkz.d.ts} +1 -1
  258. package/dist/{utils.d-wGPLeVbq.d.mts → utils.d-Cmj-fzds.d.mts} +1 -1
  259. package/dist/version.cjs +2 -2
  260. package/dist/version.mjs +1 -1
  261. package/dist/vite.cjs +24 -22
  262. package/dist/vite.d.mts +21 -7
  263. package/dist/vite.d.ts +21 -7
  264. package/dist/vite.mjs +23 -21
  265. package/package.json +3 -3
  266. package/dist/analyzer-OEMQSLYT.cjs +0 -17
  267. package/dist/chunk-7EPYN7GW.cjs +0 -30
  268. package/dist/chunk-HZOMT5DY.mjs +0 -30
  269. package/dist/chunk-SBDWCDS6.cjs +0 -8
  270. package/dist/chunk-YX6AFPXC.mjs +0 -8
  271. package/dist/{chunk-4B6YJ5DS.cjs → chunk-4ZVKDHS6.cjs} +3 -3
  272. package/dist/{chunk-4EEAPBNV.mjs → chunk-PEQJ4UUT.mjs} +3 -3
@@ -5,10 +5,13 @@ var _chunkJIBEFLQ7cjs = require('./chunk-JIBEFLQ7.cjs');
5
5
 
6
6
 
7
7
 
8
+ var _chunkPCAEJNQFcjs = require('./chunk-PCAEJNQF.cjs');
8
9
 
9
10
 
10
11
 
11
- var _chunk2PJVEL56cjs = require('./chunk-2PJVEL56.cjs');
12
+
13
+
14
+ var _chunkYIGUFJMRcjs = require('./chunk-YIGUFJMR.cjs');
12
15
 
13
16
 
14
17
  var _chunkPENBZAHJcjs = require('./chunk-PENBZAHJ.cjs');
@@ -313,12 +316,12 @@ var SPARouter = class {
313
316
  viewTransition = false,
314
317
  refresh = false
315
318
  } = options;
316
- const url = _chunk2PJVEL56cjs.resolveFarmNavigationURL.call(void 0, href, window.location.href);
317
- if (_chunk2PJVEL56cjs.isFarmBlockedNavigationURL.call(void 0, url)) return;
319
+ const url = _chunkYIGUFJMRcjs.resolveFarmNavigationURL.call(void 0, href, window.location.href);
320
+ if (_chunkYIGUFJMRcjs.isFarmBlockedNavigationURL.call(void 0, url)) return;
318
321
  const pathname = url.pathname;
319
322
  const search = url.search;
320
323
  const fullPath = pathname + search;
321
- if (_chunk2PJVEL56cjs.isFarmExternalNavigationURL.call(void 0, url, window.location.origin) || _chunk2PJVEL56cjs.isFarmLocaleChangeHref.call(void 0, url.toString()) || this.options.shouldUseDocumentNavigation(pathname)) {
324
+ if (_chunkYIGUFJMRcjs.isFarmExternalNavigationURL.call(void 0, url, window.location.origin) || _chunkPCAEJNQFcjs.isFarmLocaleChangeHref.call(void 0, url.toString()) || this.options.shouldUseDocumentNavigation(pathname)) {
322
325
  this.cancelActiveNavigation();
323
326
  if (replace) window.location.replace(url.toString());
324
327
  else window.location.assign(url.toString());
@@ -465,9 +468,10 @@ var SPARouter = class {
465
468
  await this.whenNavigationSettles();
466
469
  if (this.destroyed) return;
467
470
  }
468
- if (_chunk2PJVEL56cjs.isFarmLocaleChangeHref.call(void 0, href)) return;
469
- const url = _chunk2PJVEL56cjs.resolveFarmNavigationURL.call(void 0, href, window.location.href);
470
- if (_chunk2PJVEL56cjs.isFarmExternalNavigationURL.call(void 0, url, window.location.origin)) return;
471
+ if (_chunkPCAEJNQFcjs.isFarmLocaleChangeHref.call(void 0, href)) return;
472
+ const url = _chunkYIGUFJMRcjs.resolveFarmNavigationURL.call(void 0, href, window.location.href);
473
+ if (_chunkYIGUFJMRcjs.isFarmExternalNavigationURL.call(void 0, url, window.location.origin)) return;
474
+ if (_chunkYIGUFJMRcjs.isFarmSameDocumentFragment.call(void 0, url.href, window.location.href)) return;
471
475
  if (this.options.shouldUseDocumentNavigation(url.pathname)) return;
472
476
  const fullPath = url.pathname + url.search;
473
477
  const interceptFrom = window.location.pathname + window.location.search;
@@ -629,7 +633,7 @@ var SPARouter = class {
629
633
  this.writePageState(action, readPageState(), href, false);
630
634
  }
631
635
  async commitNavigation(options) {
632
- const historyUrl = _chunk2PJVEL56cjs.resolveFarmNavigationURL.call(void 0,
636
+ const historyUrl = _chunkYIGUFJMRcjs.resolveFarmNavigationURL.call(void 0,
633
637
  options.pageData.canonicalPath || options.fullPath,
634
638
  window.location.href
635
639
  );
@@ -654,13 +658,13 @@ var SPARouter = class {
654
658
  }
655
659
  this.currentHistoryIndex = nextHistoryIndex;
656
660
  this.currentHistoryKey = historyKey;
657
- const resolvedHistoryUrl = _chunk2PJVEL56cjs.resolveFarmNavigationURL.call(void 0, historyPath, window.location.href);
661
+ const resolvedHistoryUrl = _chunkYIGUFJMRcjs.resolveFarmNavigationURL.call(void 0, historyPath, window.location.href);
658
662
  this.currentHistoryPath = resolvedHistoryUrl.pathname + resolvedHistoryUrl.search;
659
663
  this.currentHistoryHash = resolvedHistoryUrl.hash;
660
664
  this.currentInterceptFrom = historyState[FARM_INTERCEPT_FROM_KEY];
661
665
  notifyRouterHistoryChange();
662
666
  this.updateDocumentMetadata(options.pageData.metadata);
663
- _chunk2PJVEL56cjs._hydrateFarmI18n.call(void 0, options.pageData.i18n);
667
+ _chunkPCAEJNQFcjs._hydrateFarmI18n.call(void 0, options.pageData.i18n);
664
668
  if (this.onNavigate) {
665
669
  await this.onNavigate(options.pageData, { refresh: options.refresh === true });
666
670
  }
@@ -915,7 +919,7 @@ var SPARouter = class {
915
919
  }
916
920
  if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
917
921
  this.updateDocumentMetadata(pageData.metadata);
918
- _chunk2PJVEL56cjs._hydrateFarmI18n.call(void 0, pageData.i18n);
922
+ _chunkPCAEJNQFcjs._hydrateFarmI18n.call(void 0, pageData.i18n);
919
923
  if (this.onNavigate) {
920
924
  await this.onNavigate(pageData);
921
925
  }
@@ -1049,7 +1053,7 @@ var SPARouter = class {
1049
1053
  }
1050
1054
  writePageState(action, state, href, notify = true) {
1051
1055
  if (typeof window === "undefined") return;
1052
- const url = href ? _chunk2PJVEL56cjs.resolveFarmNavigationURL.call(void 0, href, window.location.href).toString() : window.location.href;
1056
+ const url = href ? _chunkYIGUFJMRcjs.resolveFarmNavigationURL.call(void 0, href, window.location.href).toString() : window.location.href;
1053
1057
  const parsedUrl = new URL(url);
1054
1058
  const nextPath = parsedUrl.pathname + parsedUrl.search;
1055
1059
  const historyPath = nextPath + parsedUrl.hash;
@@ -9,13 +9,14 @@ import {
9
9
  } from "./chunk-IYEY3JWJ.mjs";
10
10
  import {
11
11
  APIRouteConflictError
12
- } from "./chunk-NAHDG6UX.mjs";
12
+ } from "./chunk-JDO3X7RB.mjs";
13
13
  import {
14
14
  findProgrammaticRouteFilesInDir
15
15
  } from "./chunk-URBP6DLH.mjs";
16
16
  import {
17
+ hasPolyroutePlugin,
17
18
  isFarmAPIRouteFileName
18
- } from "./chunk-YX6AFPXC.mjs";
19
+ } from "./chunk-PTAGDZ7I.mjs";
19
20
  import {
20
21
  API_ROUTE_METHODS,
21
22
  FARM_INTERNAL_SERVER_ERROR_BODY,
@@ -38,7 +39,7 @@ import {
38
39
  } from "./chunk-O5QUJEWT.mjs";
39
40
  import {
40
41
  loadFarmDevModule
41
- } from "./chunk-7H2TXT2K.mjs";
42
+ } from "./chunk-HX5HLFBZ.mjs";
42
43
  import {
43
44
  isFarmI18nCatalogFile,
44
45
  resolveFarmI18nConfig
@@ -276,6 +277,7 @@ function farmApiPlugin(options = {}) {
276
277
  name: "@farm.js/core:api",
277
278
  enforce: "pre",
278
279
  configureServer(server) {
280
+ const polyroute = hasPolyroutePlugin(server.config.plugins);
279
281
  projectRoot = server.config.root;
280
282
  devServer = server;
281
283
  const discoverFileRoutes = async (apiDir) => {
@@ -293,7 +295,7 @@ function farmApiPlugin(options = {}) {
293
295
  const fullPath = path.join(dir, entry.name);
294
296
  if (entry.isDirectory()) {
295
297
  files.push(...findRouteFiles(fullPath));
296
- } else if (isFarmAPIRouteFileName(entry.name)) {
298
+ } else if (isFarmAPIRouteFileName(entry.name, polyroute)) {
297
299
  files.push(fullPath);
298
300
  }
299
301
  }
@@ -611,7 +613,7 @@ function farmApiPlugin(options = {}) {
611
613
  }
612
614
  return [];
613
615
  }
614
- if (normalizedFile.includes("/api/") && fileName.startsWith("route.")) {
616
+ if (normalizedFile.includes("/api/") && isFarmAPIRouteFileName(fileName, hasPolyroutePlugin(server.config.plugins))) {
615
617
  const shortPath = normalizedFile.split("/api/")[1] || normalizedFile;
616
618
  log(`API route updated: ${shortPath}`);
617
619
  for (const mod of modules) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FARM_VERSION
3
- } from "./chunk-GWPANDW3.mjs";
3
+ } from "./chunk-XJJQAFZX.mjs";
4
4
 
5
5
  // src/deployment-environment.ts
6
6
  function isFarmProductionDeploymentEnvironment(env = process.env) {
@@ -34,6 +34,7 @@ import {
34
34
  inferFarmIslandStrategy,
35
35
  invalidateFarmRouteRootInferences,
36
36
  isFarmDocsClientConfigModule,
37
+ isFarmLayoutModule,
37
38
  mergeFarmViteAlias,
38
39
  redactFarmDocsClientConfig,
39
40
  resolveDevGlobalStylesheetHref,
@@ -43,7 +44,7 @@ import {
43
44
  resolveFarmIslxActionsMode,
44
45
  resolveFarmRouteRootStrategy,
45
46
  toBakedMarkdownSourcePath
46
- } from "./chunk-3TKGMIPX.mjs";
47
+ } from "./chunk-MM4U2NNI.mjs";
47
48
  import {
48
49
  generateFarmClientPluginEntryCode,
49
50
  hasFarmServerRuntimePlugins,
@@ -58,13 +59,10 @@ import {
58
59
  import {
59
60
  generateFarmTypeArtifacts,
60
61
  resolveRouteRenderingConfig
61
- } from "./chunk-4SJ22WTT.mjs";
62
- import {
63
- usesFarmRendererIslands
64
- } from "./chunk-VTEAUQMT.mjs";
62
+ } from "./chunk-W3ZBLFLU.mjs";
65
63
  import {
66
64
  _setFarmInfraAnalyticsWebMCPRoute
67
- } from "./chunk-CFKAYV7B.mjs";
65
+ } from "./chunk-MRULVIH3.mjs";
68
66
  import {
69
67
  createFarmRouteRenderPlan,
70
68
  farmPathGuardCoversEndpoint,
@@ -73,7 +71,7 @@ import {
73
71
  getSharedLayoutPrefixLength,
74
72
  parseFarmLayoutChainHeader,
75
73
  renderFarmLocaleAlternateLinks
76
- } from "./chunk-4EEAPBNV.mjs";
74
+ } from "./chunk-PEQJ4UUT.mjs";
77
75
  import {
78
76
  FARM_NATIVE_TREE_CONTENT_TYPE
79
77
  } from "./chunk-LLZSYFOM.mjs";
@@ -91,13 +89,13 @@ import {
91
89
  resolveFarmMCPRouteLabel,
92
90
  resolveFarmMarkdownRouteLabel,
93
91
  setFarmRouteLabel
94
- } from "./chunk-CVKTYG4L.mjs";
92
+ } from "./chunk-BJHXFEAF.mjs";
95
93
  import {
96
94
  FARM_DEFAULT_MCP_PATH
97
95
  } from "./chunk-HR4N2K4V.mjs";
98
96
  import {
99
97
  isFarmPreviewDeploymentEnvironment
100
- } from "./chunk-7UTRNV6R.mjs";
98
+ } from "./chunk-LUGQUU4S.mjs";
101
99
  import {
102
100
  createFarmServerFnBoundaryModule,
103
101
  isFarmServerFnBoundaryId,
@@ -105,7 +103,7 @@ import {
105
103
  } from "./chunk-GNZIAJGB.mjs";
106
104
  import {
107
105
  resolveFarmLayoutFonts
108
- } from "./chunk-HZOMT5DY.mjs";
106
+ } from "./chunk-TCGPBSVY.mjs";
109
107
  import {
110
108
  FARM_BROWSER_BUILTIN_PREFIX,
111
109
  FARM_CLIENT_REFERENCE_DIRECTORY,
@@ -148,7 +146,7 @@ import {
148
146
  usePackageScanCacheFile,
149
147
  withFarmSourceSnapshotOf,
150
148
  wrapFarmIslandContainers
151
- } from "./chunk-SB74WCKC.mjs";
149
+ } from "./chunk-WOTAU3BN.mjs";
152
150
  import {
153
151
  generateFarmDocsAdapterClientRuntime,
154
152
  getFarmDocsAdapterConfigModule
@@ -170,6 +168,9 @@ import {
170
168
  FARM_DEVTOOLS_PATH,
171
169
  resolveFarmDevtoolsConfig
172
170
  } from "./chunk-CU5SYTJG.mjs";
171
+ import {
172
+ usesFarmRendererIslands
173
+ } from "./chunk-X2SMVPLH.mjs";
173
174
  import {
174
175
  FARM_PREVIEW_ROBOTS_TAG,
175
176
  resolveFarmAgentCrawlers,
@@ -194,10 +195,6 @@ import {
194
195
  resolveFarmRendererAppSetup,
195
196
  resolveFarmServerComponentsMode
196
197
  } from "./chunk-HV6CYSMF.mjs";
197
- import {
198
- getPublicFarmImageConfig,
199
- resolveFarmImageConfig
200
- } from "./chunk-AOIUYHPH.mjs";
201
198
  import {
202
199
  FARM_PREVIEW_REQUEST_HEADER
203
200
  } from "./chunk-7VJXYB6S.mjs";
@@ -234,7 +231,7 @@ import {
234
231
  } from "./chunk-BMQAPZXD.mjs";
235
232
  import {
236
233
  MiddlewareManager
237
- } from "./chunk-3RVLJTFZ.mjs";
234
+ } from "./chunk-D7LXBLUW.mjs";
238
235
  import {
239
236
  _runWithMiddlewareContext,
240
237
  _runWithMiddlewareData
@@ -250,7 +247,11 @@ import {
250
247
  } from "./chunk-IYEY3JWJ.mjs";
251
248
  import {
252
249
  APIRouteManager
253
- } from "./chunk-NAHDG6UX.mjs";
250
+ } from "./chunk-JDO3X7RB.mjs";
251
+ import {
252
+ hasPolyroutePlugin,
253
+ isFarmAPIRouteFileName
254
+ } from "./chunk-PTAGDZ7I.mjs";
254
255
  import {
255
256
  getFarmI18nClientSnapshot
256
257
  } from "./chunk-O7JEFGUV.mjs";
@@ -283,7 +284,7 @@ import {
283
284
  invalidateFailedFarmDevModules,
284
285
  invalidateFarmDevDependents,
285
286
  loadFarmDevModule
286
- } from "./chunk-7H2TXT2K.mjs";
287
+ } from "./chunk-HX5HLFBZ.mjs";
287
288
  import {
288
289
  isFarmI18nCatalogFile,
289
290
  resolveFarmI18nMessagePath
@@ -313,10 +314,14 @@ import {
313
314
  } from "./chunk-EILUVBKS.mjs";
314
315
  import {
315
316
  FARM_VERSION
316
- } from "./chunk-GWPANDW3.mjs";
317
+ } from "./chunk-XJJQAFZX.mjs";
317
318
  import {
318
319
  DEFAULT_FARM_API_BASE_PATH
319
320
  } from "./chunk-W6QLRQ3V.mjs";
321
+ import {
322
+ getPublicFarmImageConfig,
323
+ resolveFarmImageConfig
324
+ } from "./chunk-AOIUYHPH.mjs";
320
325
  import {
321
326
  createFarmPageDataRedirectResponse,
322
327
  getFarmPageDataRedirectFromResponse
@@ -1282,13 +1287,13 @@ function loadFarmDocsSearchDevRuntime() {
1282
1287
  return import("./search-client-GIXIEU75.mjs");
1283
1288
  }
1284
1289
  function loadFarmOpenAPIDevRuntime() {
1285
- return import("./manager-OMTC5FOJ.mjs");
1290
+ return import("./manager-PKPQGBAE.mjs");
1286
1291
  }
1287
1292
  function loadFarmWorkflowsDevRuntime() {
1288
1293
  return import("./workflows.mjs");
1289
1294
  }
1290
1295
  function loadFarmDevtoolsSnapshotRuntime() {
1291
- return import("./devtools-DGC2247E.mjs");
1296
+ return import("./devtools-2CRVXV7E.mjs");
1292
1297
  }
1293
1298
  function loadFarmDevtoolsUIRuntime() {
1294
1299
  return import("./devtools-ui-BOG33MT5.mjs");
@@ -2298,6 +2303,22 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2298
2303
  function shouldEmitFarmClientRootHmr(renderer) {
2299
2304
  return getFarmRendererCapabilities(resolveFarmRenderer(renderer)).reconcilesRerenders;
2300
2305
  }
2306
+ function reachesSharedFarmRendererIsland(graph, file, islandModules) {
2307
+ const queue = Array.from(graph?.getModulesByFile(file) ?? []);
2308
+ const seen = new Set(queue);
2309
+ for (const node of queue) {
2310
+ if (node.file && islandModules.has(path6.resolve(node.file))) {
2311
+ if (node.importers.size > 0) return true;
2312
+ continue;
2313
+ }
2314
+ for (const importer of node.importers) {
2315
+ if (seen.has(importer)) continue;
2316
+ seen.add(importer);
2317
+ queue.push(importer);
2318
+ }
2319
+ }
2320
+ return false;
2321
+ }
2301
2322
  var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
2302
2323
  function toFarmRuntimeModuleId(specifier) {
2303
2324
  return FARM_RUNTIME_MODULE_PREFIX + specifier;
@@ -2332,7 +2353,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2332
2353
  const fontImports = farmFontImportsPlugin({
2333
2354
  root: options.root,
2334
2355
  basePath: options.basePath,
2335
- publicDir: options.publicDir
2356
+ publicDir: options.publicDir,
2357
+ // A production build never starts the app, so it reads the directories from these options.
2358
+ isLayoutModule: (id) => isFarmLayoutModule(id, getFarmAppDirectories(farmApp?.getConfig() ?? options))
2336
2359
  });
2337
2360
  let farmApp;
2338
2361
  const isFarmGeneratedOutput = (file) => {
@@ -2616,9 +2639,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2616
2639
  const match = /\/(?:page|layout|loading|error)(\.[^./]+)$/.exec(normalized);
2617
2640
  return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && !!match && routeModuleExtensions.has(match[1].toLowerCase());
2618
2641
  };
2642
+ const polyroute = hasPolyroutePlugin(server.config.plugins);
2619
2643
  const isApiRouteFile = (file) => {
2620
2644
  const normalized = file.replace(/\\/g, "/");
2621
- return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && /route\.(ts|tsx|js|jsx)$/.test(normalized);
2645
+ return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && isFarmAPIRouteFileName(path6.posix.basename(normalized), polyroute);
2622
2646
  };
2623
2647
  const isProgrammaticRouteFile = (file) => {
2624
2648
  const normalized = file.replace(/\\/g, "/");
@@ -2680,7 +2704,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2680
2704
  if (isI18nCatalogFile(file)) {
2681
2705
  farmApp?.getI18nRuntime().reload().then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => logger.warn(`i18n catalog reload failed: ${error.message}`));
2682
2706
  }
2683
- const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2707
+ const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || polyroute && isApiRouteFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2684
2708
  if (isRouteRefreshEvent) {
2685
2709
  if (!queuedRouteFiles) {
2686
2710
  const files = /* @__PURE__ */ new Set();
@@ -5216,7 +5240,17 @@ export { manifest };
5216
5240
  );
5217
5241
  return;
5218
5242
  }` : "";
5219
- const hmrCode = transformOptions?.ssr || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5243
+ const rendererIslandHmr = rendererIslandModule && !transformOptions?.ssr && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
5244
+ const hmrCode = rendererIslandHmr ? `
5245
+ if (import.meta.hot) {
5246
+ import.meta.hot.accept((newModule) => {
5247
+ const runtime = window.__FARM_ISOLATED_HYDRATION_RUNTIME__;
5248
+ if (!newModule || !runtime?.updateModule?.(${JSON.stringify(toViteModuleId(cleanId, root))}, newModule)) {
5249
+ import.meta.hot.invalidate();
5250
+ }
5251
+ });
5252
+ }
5253
+ ` : transformOptions?.ssr || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5220
5254
  if (import.meta.hot) {
5221
5255
  import.meta.hot.accept((newModule) => {
5222
5256
  ${isolatedHmrUpdate}
@@ -5401,7 +5435,10 @@ if (import.meta.hot) {
5401
5435
  )
5402
5436
  ))
5403
5437
  return modules;
5404
- if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && getFarmAppDirectories(currentFarmConfig).some(
5438
+ if (currentFarmConfig && isFarmAPIRouteFileName(
5439
+ path6.posix.basename(normalizedFile),
5440
+ hasPolyroutePlugin(server2.config.plugins)
5441
+ ) && getFarmAppDirectories(currentFarmConfig).some(
5405
5442
  (appDir) => normalizedFile.startsWith(`${toPosixPath(appDir)}/api/`)
5406
5443
  )) {
5407
5444
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
@@ -5517,6 +5554,14 @@ if (import.meta.hot) {
5517
5554
  return [];
5518
5555
  }
5519
5556
  }
5557
+ if (currentFarmConfig && planRouteManager && usesFarmRendererIslands(currentFarmConfig) && shouldEmitFarmClientRootHmr(currentFarmConfig.renderer) && reachesSharedFarmRendererIsland(
5558
+ server2.environments.client?.moduleGraph,
5559
+ normalizedFile,
5560
+ planRouteManager.getIsolatedClientBoundaryModules(currentFarmConfig.root)
5561
+ )) {
5562
+ reloadAfterEdit();
5563
+ return [];
5564
+ }
5520
5565
  if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !server2.environments.client?.moduleGraph.getModulesByFile(normalizedFile)?.size && invalidateFarmDevDependents(server2, file, getFarmRenderedServerModules()).length > 0) {
5521
5566
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5522
5567
  reloadAfterEdit();
@@ -6165,7 +6210,7 @@ import { createClientPluginManager } from '@farm.js/core/plugin/client'
6165
6210
  // Not @farm.js/core/client: that module's graph imports react, which other renderers' apps lack.
6166
6211
  import { SPARouter } from '@farm.js/core/internal/spa-router'
6167
6212
  import { isFarmRouteActive } from '@farm.js/core/router'
6168
- import { installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
6213
+ import { installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, readFarmLinkNavigateOptions, targetsCurrentContext, rememberFarmLinkLocale, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
6169
6214
  import { reviveDeferredData } from '@farm.js/core/deferred'
6170
6215
  import {
6171
6216
  createFarmDeploymentMismatchError,
@@ -8075,8 +8120,7 @@ document.addEventListener('click', function(event) {
8075
8120
  if (href.startsWith('#')) return;
8076
8121
 
8077
8122
  // Don't intercept if target is set to open in new window
8078
- const linkTarget = target.getAttribute('target');
8079
- if (linkTarget && linkTarget !== '_self') return;
8123
+ if (!targetsCurrentContext(target)) return;
8080
8124
 
8081
8125
  // Don't intercept modifier clicks (Ctrl+Click = new tab)
8082
8126
  if (isModifierEvent(event)) return;
@@ -8363,6 +8407,7 @@ export {
8363
8407
  transformIsolatedClientBoundaryModule,
8364
8408
  isFarmAppRuntimeFile,
8365
8409
  shouldEmitFarmClientRootHmr,
8410
+ reachesSharedFarmRendererIsland,
8366
8411
  farmPlugin,
8367
8412
  defineConfig
8368
8413
  };
@@ -9,7 +9,7 @@ import {
9
9
  collectSSGPages,
10
10
  matchSSGPage,
11
11
  resolveRouteRenderingConfigFromFile
12
- } from "./chunk-4SJ22WTT.mjs";
12
+ } from "./chunk-W3ZBLFLU.mjs";
13
13
  import {
14
14
  resolveFarmRendererRoutes
15
15
  } from "./chunk-YNPVG2GG.mjs";
@@ -56,10 +56,10 @@ import {
56
56
  stripRouteGroups,
57
57
  takeFarmHoistedHead,
58
58
  takeFarmNavigationOutlet
59
- } from "./chunk-4EEAPBNV.mjs";
59
+ } from "./chunk-PEQJ4UUT.mjs";
60
60
  import {
61
61
  listFarmMCPLlmsTxtLinks
62
- } from "./chunk-CVKTYG4L.mjs";
62
+ } from "./chunk-BJHXFEAF.mjs";
63
63
  import {
64
64
  FARM_DEFAULT_MCP_PATH,
65
65
  collectFarmDefaultMCPPages,
@@ -104,7 +104,7 @@ import {
104
104
  traceFarmSourceReads,
105
105
  usesFarmServerTree,
106
106
  withFarmSourceSnapshot
107
- } from "./chunk-SB74WCKC.mjs";
107
+ } from "./chunk-WOTAU3BN.mjs";
108
108
  import {
109
109
  _setDefaultFarmThemeConfig,
110
110
  getTheme
@@ -166,9 +166,6 @@ import {
166
166
  resolveFarmRendererModule,
167
167
  resolveFarmServerComponentsMode
168
168
  } from "./chunk-HV6CYSMF.mjs";
169
- import {
170
- resolveFarmImageConfig
171
- } from "./chunk-AOIUYHPH.mjs";
172
169
  import {
173
170
  resolveCronConfig
174
171
  } from "./chunk-7VJXYB6S.mjs";
@@ -266,8 +263,9 @@ import {
266
263
  toFileModuleUrl
267
264
  } from "./chunk-VHIXGZYH.mjs";
268
265
  import {
266
+ createFarmDevModuleCheck,
269
267
  loadFarmDevModule
270
- } from "./chunk-7H2TXT2K.mjs";
268
+ } from "./chunk-HX5HLFBZ.mjs";
271
269
  import {
272
270
  resolveFarmI18nConfig
273
271
  } from "./chunk-VJSXPN3W.mjs";
@@ -306,10 +304,13 @@ import {
306
304
  } from "./chunk-EILUVBKS.mjs";
307
305
  import {
308
306
  FARM_VERSION
309
- } from "./chunk-GWPANDW3.mjs";
307
+ } from "./chunk-XJJQAFZX.mjs";
310
308
  import {
311
309
  normalizeFarmAPIConfig
312
310
  } from "./chunk-W6QLRQ3V.mjs";
311
+ import {
312
+ resolveFarmImageConfig
313
+ } from "./chunk-AOIUYHPH.mjs";
313
314
  import {
314
315
  _setFarmSearchPreserveRoutes
315
316
  } from "./chunk-VDQZV6BX.mjs";
@@ -2206,7 +2207,7 @@ function farmFontImportsPlugin(options = {}) {
2206
2207
  production
2207
2208
  );
2208
2209
  },
2209
- async transform(code, id) {
2210
+ async transform(code, id, transformOptions) {
2210
2211
  const result = await transformFarmFontCalls({
2211
2212
  code,
2212
2213
  id,
@@ -2217,6 +2218,13 @@ function farmFontImportsPlugin(options = {}) {
2217
2218
  register: (moduleId, calls) => registry.register(moduleId, calls, production)
2218
2219
  });
2219
2220
  if (!result) registry.clearModule(id.split("?", 1)[0]);
2221
+ const server = this.environment ? this.environment.config.consumer === "server" : transformOptions?.ssr === true;
2222
+ const cleanId = id.split("?", 1)[0];
2223
+ if (server && MODULE_EXTENSION_RE.test(cleanId) && options.isLayoutModule?.(cleanId)) {
2224
+ const source = result?.code ?? code;
2225
+ const inferred = addInferredLayoutFonts(source, this.parse(source));
2226
+ if (inferred) return { code: inferred, map: null };
2227
+ }
2220
2228
  return result ? { code: result.code, map: null } : null;
2221
2229
  },
2222
2230
  async generateBundle(_options, bundle) {
@@ -2561,6 +2569,74 @@ ${FONT_SECTION_END}
2561
2569
  return resource;
2562
2570
  }
2563
2571
  };
2572
+ function isFarmLayoutModule(id, appDirs) {
2573
+ if (!/\/layout\.[cm]?[jt]sx?$/.test(id)) return false;
2574
+ return appDirs.some((appDir) => id.startsWith(`${appDir.replace(/\\/g, "/")}/`));
2575
+ }
2576
+ var LAYOUT_FONTS_EXPORT = "__farmLayoutFonts";
2577
+ var LAYOUT_FONT_PROPERTIES = /* @__PURE__ */ new Set(["className", "variable"]);
2578
+ function addInferredLayoutFonts(code, ast) {
2579
+ const body = (Array.isArray(ast.body) ? ast.body : []).filter(isAstNode);
2580
+ if (body.some((statement) => statement.type === "ExportAllDeclaration")) return null;
2581
+ if (moduleExports(body, "fonts") || moduleExports(body, LAYOUT_FONTS_EXPORT)) return null;
2582
+ const bindings = moduleScopeBindings(body);
2583
+ const uses = [];
2584
+ const seen = /* @__PURE__ */ new Set();
2585
+ walkAst(ast, (node) => {
2586
+ if (node.type !== "MemberExpression" || node.computed === true) return;
2587
+ if (!isAstNode(node.object) || node.object.type !== "Identifier") return;
2588
+ const name = node.object.name;
2589
+ const property2 = readPropertyName(node.property);
2590
+ if (typeof name !== "string" || !bindings.has(name)) return;
2591
+ if (!property2 || !LAYOUT_FONT_PROPERTIES.has(property2)) return;
2592
+ const key = `${name}.${property2}`;
2593
+ if (seen.has(key)) return;
2594
+ seen.add(key);
2595
+ uses.push(`[${name}, ${JSON.stringify(property2)}]`);
2596
+ });
2597
+ if (uses.length === 0) return null;
2598
+ return `${code}
2599
+ import { inferFarmLayoutFonts as __farmInferLayoutFonts } from "@farm.js/core/font";
2600
+ export const ${LAYOUT_FONTS_EXPORT} = /* @__PURE__ */ __farmInferLayoutFonts([${uses.join(", ")}]);
2601
+ `;
2602
+ }
2603
+ function moduleExports(body, name) {
2604
+ return body.some((statement) => {
2605
+ if (statement.type !== "ExportNamedDeclaration") return false;
2606
+ const specifiers = Array.isArray(statement.specifiers) ? statement.specifiers : [];
2607
+ if (specifiers.some((specifier) => readPropertyName(specifier.exported) === name)) return true;
2608
+ return isAstNode(statement.declaration) && declaredNames(statement.declaration).includes(name);
2609
+ });
2610
+ }
2611
+ function moduleScopeBindings(body) {
2612
+ const names = /* @__PURE__ */ new Set();
2613
+ for (const statement of body) {
2614
+ if (statement.type === "ImportDeclaration") {
2615
+ if (statement.importKind === "type") continue;
2616
+ const specifiers = Array.isArray(statement.specifiers) ? statement.specifiers : [];
2617
+ for (const specifier of specifiers) {
2618
+ if (specifier.importKind === "type" || !isAstNode(specifier.local)) continue;
2619
+ if (typeof specifier.local.name === "string") names.add(specifier.local.name);
2620
+ }
2621
+ continue;
2622
+ }
2623
+ const declaration = statement.type === "ExportNamedDeclaration" || statement.type === "ExportDefaultDeclaration" ? statement.declaration : statement;
2624
+ if (isAstNode(declaration)) for (const name of declaredNames(declaration)) names.add(name);
2625
+ }
2626
+ return names;
2627
+ }
2628
+ function declaredNames(declaration) {
2629
+ if (declaration.type === "VariableDeclaration") {
2630
+ const declarations = Array.isArray(declaration.declarations) ? declaration.declarations : [];
2631
+ return declarations.flatMap(
2632
+ (declarator) => isAstNode(declarator.id) && declarator.id.type === "Identifier" && typeof declarator.id.name === "string" ? [declarator.id.name] : []
2633
+ );
2634
+ }
2635
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && isAstNode(declaration.id) && typeof declaration.id.name === "string") {
2636
+ return [declaration.id.name];
2637
+ }
2638
+ return [];
2639
+ }
2564
2640
  function findFontBindings(ast) {
2565
2641
  const named = /* @__PURE__ */ new Map();
2566
2642
  const namespaces = /* @__PURE__ */ new Set();
@@ -4264,6 +4340,7 @@ var ServerRenderer = class {
4264
4340
  constructor(config, routeManager, i18nRuntime, viteServer) {
4265
4341
  this.ssgManifest = [];
4266
4342
  this.dataCache = getFarmDataCache();
4343
+ this.rendererServerModuleCurrent = () => true;
4267
4344
  this.config = config;
4268
4345
  this.routeManager = routeManager;
4269
4346
  this.i18nRuntime = i18nRuntime;
@@ -4272,7 +4349,7 @@ var ServerRenderer = class {
4272
4349
  this.loadSSGManifest();
4273
4350
  }
4274
4351
  async initialize() {
4275
- if (this.rendererRuntime) return;
4352
+ if (this.rendererRuntime && this.rendererServerModuleCurrent()) return;
4276
4353
  if (this.islandValues()) {
4277
4354
  installFarmIslandValues();
4278
4355
  (await import("./internal/islands-server.mjs")).installFarmIslandsServer();
@@ -4289,6 +4366,7 @@ var ServerRenderer = class {
4289
4366
  this.config.renderer.server
4290
4367
  )
4291
4368
  ).href);
4369
+ this.rendererServerModuleCurrent = this.viteServer && !isReactRenderer(this.config.renderer) && !isFarmRendererDisabled(this.config.renderer) ? createFarmDevModuleCheck(this.viteServer, loaded) : () => true;
4292
4370
  const runtime = loaded;
4293
4371
  assertFarmRendererServerModule(runtime, this.config.renderer);
4294
4372
  assertFarmRendererStreamingRuntime(
@@ -6734,7 +6812,7 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
6734
6812
  const renderToPipeableStream = runtime.renderToPipeableStream ?? (getFarmRendererStreamingCapabilitiesForRuntime(this.config.renderer, "node").web && runtime.renderToReadableStream ? pipeFarmRendererWebStream(runtime) : void 0);
6735
6813
  const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
6736
6814
  const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument(req);
6737
- if (!renderToPipeableStream || _isFarmMarkdownPageCheck(req.headers?.[FARM_MARKDOWN_PAGE_CHECK_HEADER]) || streamDocument && (options.captureStaticShell || !isReactRenderer(this.config.renderer))) {
6815
+ if (!renderToPipeableStream || _isFarmMarkdownPageCheck(req.headers?.[FARM_MARKDOWN_PAGE_CHECK_HEADER]) || streamDocument && options.captureStaticShell) {
6738
6816
  return this.renderBufferedSSR(element, req, res, clearMiddlewareData, options);
6739
6817
  }
6740
6818
  return new Promise((resolve3, reject) => {
@@ -8810,6 +8888,7 @@ export {
8810
8888
  RouteManager,
8811
8889
  createFarmDevClientManifest,
8812
8890
  farmFontImportsPlugin,
8891
+ isFarmLayoutModule,
8813
8892
  mergeFarmFontCss,
8814
8893
  resolveDevGlobalStylesheetHref,
8815
8894
  collectDevStylesheetUrls,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getFarmRouteLabel
3
- } from "./chunk-CVKTYG4L.mjs";
3
+ } from "./chunk-BJHXFEAF.mjs";
4
4
  import {
5
5
  _classifyFarmMCPSession,
6
6
  _farmMCPClientSession,
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-D2VAANBS.mjs";
19
19
  import {
20
20
  FARM_VERSION
21
- } from "./chunk-GWPANDW3.mjs";
21
+ } from "./chunk-XJJQAFZX.mjs";
22
22
 
23
23
  // src/mobile/analyzer.ts
24
24
  import { createHash } from "crypto";
@@ -4,11 +4,13 @@ import {
4
4
  import {
5
5
  buildFarmRoutePath
6
6
  } from "./chunk-BRNPLD22.mjs";
7
+ import {
8
+ localizeActiveFarmHref
9
+ } from "./chunk-GGD57DJA.mjs";
7
10
  import {
8
11
  isFarmScriptURL,
9
- localizeActiveFarmHref,
10
12
  resolveFarmNavigationURL
11
- } from "./chunk-FLMALEY2.mjs";
13
+ } from "./chunk-JIGWHFA5.mjs";
12
14
  import {
13
15
  getFarmSearchPreserveRoutes
14
16
  } from "./chunk-VDQZV6BX.mjs";