@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
@@ -1,5 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
+ var _chunkQZUCVJZJcjs = require('./chunk-QZUCVJZJ.cjs');
4
+
5
+
3
6
  var _chunkPZXYAWYGcjs = require('./chunk-PZXYAWYG.cjs');
4
7
 
5
8
 
@@ -17,13 +20,15 @@ var _chunkEOXPRC2Ccjs = require('./chunk-EOXPRC2C.cjs');
17
20
 
18
21
 
19
22
 
20
- var _chunkB7L24VPXcjs = require('./chunk-B7L24VPX.cjs');
23
+ var _chunk22KXTL3Icjs = require('./chunk-22KXTL3I.cjs');
24
+
21
25
 
22
26
 
27
+ var _chunkPCAEJNQFcjs = require('./chunk-PCAEJNQF.cjs');
23
28
 
24
29
 
25
30
 
26
- var _chunk2PJVEL56cjs = require('./chunk-2PJVEL56.cjs');
31
+ var _chunkYIGUFJMRcjs = require('./chunk-YIGUFJMR.cjs');
27
32
 
28
33
 
29
34
  var _chunkI2BYNELAcjs = require('./chunk-I2BYNELA.cjs');
@@ -884,14 +889,14 @@ async function clearPersistedCache() {
884
889
 
885
890
  var bindReactUse = (store) => (keyOrKeys) => {
886
891
  if (Array.isArray(keyOrKeys)) {
887
- const keys = _chunkB7L24VPXcjs.normalizeStoreKeys.call(void 0, keyOrKeys);
892
+ const keys = _chunk22KXTL3Icjs.normalizeStoreKeys.call(void 0, keyOrKeys);
888
893
  let lastState = store.getSnapshot();
889
- let lastSlice = _chunkB7L24VPXcjs.pickStoreState.call(void 0, lastState, keys);
894
+ let lastSlice = _chunk22KXTL3Icjs.pickStoreState.call(void 0, lastState, keys);
890
895
  const getSnapshot = () => {
891
896
  const state = store.getSnapshot();
892
897
  if (lastState !== state) {
893
898
  lastState = state;
894
- lastSlice = _chunkB7L24VPXcjs.pickStoreState.call(void 0, state, keys);
899
+ lastSlice = _chunk22KXTL3Icjs.pickStoreState.call(void 0, state, keys);
895
900
  }
896
901
  return lastSlice;
897
902
  };
@@ -901,7 +906,7 @@ var bindReactUse = (store) => (keyOrKeys) => {
901
906
  getSnapshot
902
907
  );
903
908
  }
904
- if (_chunkB7L24VPXcjs.isStoreKey.call(void 0, keyOrKeys)) {
909
+ if (_chunk22KXTL3Icjs.isStoreKey.call(void 0, keyOrKeys)) {
905
910
  const key = keyOrKeys;
906
911
  return _react.useSyncExternalStore.call(void 0,
907
912
  (notify) => store.subscribe(key, () => notify()),
@@ -916,7 +921,7 @@ var bindReactUse = (store) => (keyOrKeys) => {
916
921
  );
917
922
  };
918
923
  function createStore(initialState, extend) {
919
- return _chunkB7L24VPXcjs.createStoreInstance.call(void 0, initialState, extend, bindReactUse);
924
+ return _chunk22KXTL3Icjs.createStoreInstance.call(void 0, initialState, extend, bindReactUse);
920
925
  }
921
926
 
922
927
  // src/client/link.tsx
@@ -977,7 +982,7 @@ function LinkInner({
977
982
  const intentTimeoutRef = _react.useRef.call(void 0, null);
978
983
  const activePrefetch = _react.useRef.call(void 0, null);
979
984
  const farm = useOptionalFarm();
980
- const link = _chunkB7L24VPXcjs.resolveFarmLink.call(void 0,
985
+ const link = _chunk22KXTL3Icjs.resolveFarmLink.call(void 0,
981
986
  {
982
987
  href,
983
988
  params,
@@ -1109,19 +1114,21 @@ function LinkInner({
1109
1114
  _optionalChain([onClick, 'optionalCall', _38 => _38(event)]);
1110
1115
  if (isScriptHref) {
1111
1116
  event.preventDefault();
1112
- _chunk2PJVEL56cjs.isFarmBlockedNavigationURL.call(void 0, _chunk2PJVEL56cjs.resolveFarmNavigationURL.call(void 0, resolvedHref, window.location.href));
1117
+ _chunkYIGUFJMRcjs.isFarmBlockedNavigationURL.call(void 0, _chunkYIGUFJMRcjs.resolveFarmNavigationURL.call(void 0, resolvedHref, window.location.href));
1113
1118
  return;
1114
1119
  }
1115
1120
  if (event.defaultPrevented) return;
1116
1121
  if (isExternal) return;
1117
1122
  if (event.currentTarget.hasAttribute("download")) return;
1118
- if (target && target !== "_self") return;
1123
+ if (!_chunkQZUCVJZJcjs.targetsCurrentContext.call(void 0, event.currentTarget)) return;
1119
1124
  if (isModifierEvent(event)) return;
1120
1125
  if (event.button !== 0) return;
1121
1126
  if (typeof window !== "undefined") {
1127
+ if (!event.currentTarget.target && window.__FARM_RSC_HYDRATED)
1128
+ return;
1122
1129
  event.preventDefault();
1123
- if (_chunk2PJVEL56cjs.isFarmLocaleChangeHref.call(void 0, localizedHref)) {
1124
- _chunk2PJVEL56cjs.rememberFarmLinkLocale.call(void 0, event.currentTarget);
1130
+ if (_chunkPCAEJNQFcjs.isFarmLocaleChangeHref.call(void 0, localizedHref)) {
1131
+ _chunkPCAEJNQFcjs.rememberFarmLinkLocale.call(void 0, event.currentTarget);
1125
1132
  window.location.assign(resolvedHref);
1126
1133
  return;
1127
1134
  }
@@ -1140,7 +1147,6 @@ function LinkInner({
1140
1147
  replace,
1141
1148
  scroll,
1142
1149
  viewTransition,
1143
- target,
1144
1150
  isExternal,
1145
1151
  isScriptHref,
1146
1152
  onClick
@@ -6,7 +6,8 @@ var _chunkVWIW47FWcjs = require('./chunk-VWIW47FW.cjs');
6
6
  var _chunkHS4JPIGRcjs = require('./chunk-HS4JPIGR.cjs');
7
7
 
8
8
 
9
- var _chunkSBDWCDS6cjs = require('./chunk-SBDWCDS6.cjs');
9
+
10
+ var _chunkBQHIJOZMcjs = require('./chunk-BQHIJOZM.cjs');
10
11
 
11
12
 
12
13
  var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
@@ -37,7 +38,7 @@ var _chunkIUKBPBM7cjs = require('./chunk-IUKBPBM7.cjs');
37
38
  var _chunkSNP33A33cjs = require('./chunk-SNP33A33.cjs');
38
39
 
39
40
 
40
- var _chunk25JGHAGHcjs = require('./chunk-25JGHAGH.cjs');
41
+ var _chunkI2RBHZF7cjs = require('./chunk-I2RBHZF7.cjs');
41
42
 
42
43
 
43
44
  var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
@@ -137,7 +138,7 @@ var APIRouteManager = class _APIRouteManager {
137
138
  /**
138
139
  * Recursively find all route.ts files
139
140
  */
140
- findRouteFiles(dir) {
141
+ findRouteFiles(dir, polyroute = _chunkBQHIJOZMcjs.hasPolyroutePlugin.call(void 0, _optionalChain([this, 'access', _ => _.viteServer, 'optionalAccess', _2 => _2.config, 'optionalAccess', _3 => _3.plugins]))) {
141
142
  const files = [];
142
143
  if (!fs.existsSync(dir)) {
143
144
  return files;
@@ -146,8 +147,8 @@ var APIRouteManager = class _APIRouteManager {
146
147
  for (const entry of entries) {
147
148
  const fullPath = path.join(dir, entry.name);
148
149
  if (entry.isDirectory()) {
149
- files.push(...this.findRouteFiles(fullPath));
150
- } else if (_chunkSBDWCDS6cjs.isFarmAPIRouteFileName.call(void 0, entry.name)) {
150
+ files.push(...this.findRouteFiles(fullPath, polyroute));
151
+ } else if (_chunkBQHIJOZMcjs.isFarmAPIRouteFileName.call(void 0, entry.name, polyroute)) {
151
152
  files.push(fullPath);
152
153
  }
153
154
  }
@@ -175,7 +176,7 @@ var APIRouteManager = class _APIRouteManager {
175
176
  if (existingSources) {
176
177
  for (const method of availableMethods) {
177
178
  const existingSource = existingSources.get(method);
178
- if (_optionalChain([existingSource, 'optionalAccess', _ => _.appDir]) === appDir) {
179
+ if (_optionalChain([existingSource, 'optionalAccess', _4 => _4.appDir]) === appDir) {
179
180
  throw new APIRouteConflictError(routePath, method, existingSource.filePath, filePath);
180
181
  }
181
182
  }
@@ -191,7 +192,7 @@ var APIRouteManager = class _APIRouteManager {
191
192
  this.registerRouteShape(routePath, filePath, appDir);
192
193
  const existingRoute = this.routes.get(routePath);
193
194
  const mergedMethods = existingRoute ? [...existingRoute.methods] : [];
194
- const openapi = { ..._optionalChain([existingRoute, 'optionalAccess', _2 => _2.openapi]) };
195
+ const openapi = { ..._optionalChain([existingRoute, 'optionalAccess', _5 => _5.openapi]) };
195
196
  for (const method of availableMethods) {
196
197
  if (!mergedMethods.includes(method)) mergedMethods.push(method);
197
198
  if (routeOpenAPI) openapi[method] = routeOpenAPI;
@@ -202,7 +203,7 @@ var APIRouteManager = class _APIRouteManager {
202
203
  path: routePath,
203
204
  filePath,
204
205
  methods: mergedMethods,
205
- endpoints: { ..._optionalChain([existingRoute, 'optionalAccess', _3 => _3.endpoints]), ...endpoints },
206
+ endpoints: { ..._optionalChain([existingRoute, 'optionalAccess', _6 => _6.endpoints]), ...endpoints },
206
207
  openapi: Object.keys(openapi).length > 0 ? openapi : void 0,
207
208
  ...runtimeConfig
208
209
  });
@@ -228,7 +229,7 @@ var APIRouteManager = class _APIRouteManager {
228
229
  const routesModule = await this.loadModule(routesFile);
229
230
  for (const exportValue of Object.values(routesModule)) {
230
231
  const endpoint = exportValue;
231
- if (!_optionalChain([endpoint, 'optionalAccess', _4 => _4.__path])) {
232
+ if (!_optionalChain([endpoint, 'optionalAccess', _7 => _7.__path])) {
232
233
  continue;
233
234
  }
234
235
  const method = String(endpoint.__method || "GET").toUpperCase();
@@ -289,7 +290,7 @@ var APIRouteManager = class _APIRouteManager {
289
290
  /** Load an app module through the server that loads the routes, as their handlers were. */
290
291
  async loadModule(filePath) {
291
292
  if (this.viteServer) {
292
- return await _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, this.viteServer, filePath);
293
+ return await _chunkI2RBHZF7cjs.loadFarmDevModule.call(void 0, this.viteServer, filePath);
293
294
  }
294
295
  return await import(
295
296
  /* @vite-ignore */
@@ -299,8 +300,8 @@ var APIRouteManager = class _APIRouteManager {
299
300
  addEndpoint(routePath, filePath, method, endpoint, appDir, runtimeConfig = {}) {
300
301
  const normalizedMethod = method.toUpperCase();
301
302
  const existingRoute = this.routes.get(routePath);
302
- const existingSource = _optionalChain([this, 'access', _5 => _5.endpointSources, 'access', _6 => _6.get, 'call', _7 => _7(routePath), 'optionalAccess', _8 => _8.get, 'call', _9 => _9(normalizedMethod)]);
303
- if (_optionalChain([existingSource, 'optionalAccess', _10 => _10.appDir]) === appDir) {
303
+ const existingSource = _optionalChain([this, 'access', _8 => _8.endpointSources, 'access', _9 => _9.get, 'call', _10 => _10(routePath), 'optionalAccess', _11 => _11.get, 'call', _12 => _12(normalizedMethod)]);
304
+ if (_optionalChain([existingSource, 'optionalAccess', _13 => _13.appDir]) === appDir) {
304
305
  throw new APIRouteConflictError(
305
306
  routePath,
306
307
  normalizedMethod,
@@ -313,7 +314,7 @@ var APIRouteManager = class _APIRouteManager {
313
314
  existingRoute.methods.push(normalizedMethod);
314
315
  }
315
316
  existingRoute.endpoints[normalizedMethod] = endpoint;
316
- _optionalChainDelete([existingRoute, 'access', _11 => _11.openapi, 'optionalAccess', _12 => delete _12[normalizedMethod]]);
317
+ _optionalChainDelete([existingRoute, 'access', _14 => _14.openapi, 'optionalAccess', _15 => delete _15[normalizedMethod]]);
317
318
  Object.assign(existingRoute, runtimeConfig);
318
319
  const sources = _nullishCoalesce(this.endpointSources.get(routePath), () => ( /* @__PURE__ */ new Map()));
319
320
  sources.set(normalizedMethod, { appDir, filePath });
@@ -383,7 +384,7 @@ var APIRouteManager = class _APIRouteManager {
383
384
  return _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
384
385
  }
385
386
  };
386
- return _optionalChain([this, 'access', _13 => _13.i18n, 'optionalAccess', _14 => _14.config, 'access', _15 => _15.enabled]) ? _chunkSXXSQVKKcjs._runWithFarmI18nRequest.call(void 0, this.i18n, request, invoke, {
387
+ return _optionalChain([this, 'access', _16 => _16.i18n, 'optionalAccess', _17 => _17.config, 'access', _18 => _18.enabled]) ? _chunkSXXSQVKKcjs._runWithFarmI18nRequest.call(void 0, this.i18n, request, invoke, {
387
388
  redirect: false
388
389
  }) : invoke();
389
390
  };
@@ -3,7 +3,7 @@
3
3
  var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
4
4
 
5
5
 
6
- var _chunkSBDWCDS6cjs = require('./chunk-SBDWCDS6.cjs');
6
+ var _chunkBQHIJOZMcjs = require('./chunk-BQHIJOZM.cjs');
7
7
 
8
8
 
9
9
  var _chunkGCJ4GNMCcjs = require('./chunk-GCJ4GNMC.cjs');
@@ -87,7 +87,7 @@ var APITypeGenerator = class {
87
87
  if (item.isDirectory()) {
88
88
  const newBasePath = basePath ? `${basePath}/${item.name}` : item.name;
89
89
  this.scanDirectory(fullPath, appDir, routes, newBasePath);
90
- } else if (_chunkSBDWCDS6cjs.isFarmAPIRouteFileName.call(void 0, item.name)) {
90
+ } else if (_chunkBQHIJOZMcjs.isFarmAPIRouteFileName.call(void 0, item.name)) {
91
91
  const routeInfo = this.extractRouteInfo(fullPath, appDir, basePath);
92
92
  if (routeInfo) {
93
93
  routes.push(routeInfo);
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// package.json
2
- var version = "0.1.86";
2
+ var version = "0.2.0-beta.0";
3
3
 
4
4
  // src/version.ts
5
5
  var FARM_VERSION = version;
@@ -0,0 +1,18 @@
1
+ // src/client/link-navigation.ts
2
+ function targetsCurrentContext(anchor) {
3
+ const target = anchor.target || anchor.ownerDocument.querySelector("base[target]")?.target;
4
+ return !target || target === "_self";
5
+ }
6
+ function readFarmLinkNavigateOptions(anchor) {
7
+ const viewTransition = anchor.getAttribute("data-view-transition");
8
+ return {
9
+ replace: anchor.hasAttribute("data-replace"),
10
+ scroll: !anchor.hasAttribute("data-no-scroll"),
11
+ viewTransition: viewTransition === "auto" ? "auto" : viewTransition === "true"
12
+ };
13
+ }
14
+
15
+ export {
16
+ targetsCurrentContext,
17
+ readFarmLinkNavigateOptions
18
+ };
@@ -3,7 +3,7 @@
3
3
  var _chunkPWMJBCANcjs = require('./chunk-PWMJBCAN.cjs');
4
4
 
5
5
 
6
- var _chunkFDU4Q4QPcjs = require('./chunk-FDU4Q4QP.cjs');
6
+ var _chunkIRPXOTENcjs = require('./chunk-IRPXOTEN.cjs');
7
7
 
8
8
 
9
9
 
@@ -163,7 +163,7 @@ async function createFarmRscViteConfig(userConfig, options) {
163
163
  server: { environmentName: "rsc" },
164
164
  config: {
165
165
  preset: options.preset,
166
- outputDir: options.outputDir && _chunkFDU4Q4QPcjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
166
+ outputDir: options.outputDir && _chunkIRPXOTENcjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
167
167
  }
168
168
  })
169
169
  ]
@@ -217,7 +217,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
217
217
  }
218
218
  async function configureFarmRscPlugins(config, command) {
219
219
  if (config.plugins.length === 0) return config;
220
- const { PluginManager } = await import("./plugin-3PT7I26P.cjs");
220
+ const { PluginManager } = await import("./plugin-MWO3G2XM.cjs");
221
221
  const manager = new PluginManager({
222
222
  config,
223
223
  isDev: command === "serve",
@@ -16,6 +16,9 @@ import {
16
16
  import {
17
17
  resolveFarmDevtoolsConfig
18
18
  } from "./chunk-CU5SYTJG.mjs";
19
+ import {
20
+ resolveFarmRendererServerComponentsIslands
21
+ } from "./chunk-X2SMVPLH.mjs";
19
22
  import {
20
23
  resolveFarmAgentCrawlers,
21
24
  resolveFarmAgentSitemap,
@@ -46,9 +49,6 @@ import {
46
49
  resolveFarmRenderer,
47
50
  resolveFarmServerComponentsMode
48
51
  } from "./chunk-HV6CYSMF.mjs";
49
- import {
50
- resolveFarmImageConfig
51
- } from "./chunk-AOIUYHPH.mjs";
52
52
  import {
53
53
  FARM_CRON_NAME_SEGMENT_PATTERN,
54
54
  normalizeCronExpression,
@@ -94,6 +94,9 @@ import {
94
94
  import {
95
95
  resolveFarmAPIConfig
96
96
  } from "./chunk-W6QLRQ3V.mjs";
97
+ import {
98
+ resolveFarmImageConfig
99
+ } from "./chunk-AOIUYHPH.mjs";
97
100
  import {
98
101
  normalizeFarmDeploymentId
99
102
  } from "./chunk-IWJONXPF.mjs";
@@ -1054,6 +1057,7 @@ async function resolveConfig(userConfig, mode) {
1054
1057
  mode
1055
1058
  });
1056
1059
  userConfig = layerResolution.config;
1060
+ const rendererServerComponentsIslands = resolveFarmRendererServerComponentsIslands(userConfig);
1057
1061
  if (userConfig.typescript !== void 0) {
1058
1062
  logger.warn(
1059
1063
  'The top-level "typescript" option is not supported and has no effect. Configure TypeScript in `tsconfig.json` and run `tsc --noEmit` separately when builds must enforce project type errors.'
@@ -1181,7 +1185,9 @@ async function resolveConfig(userConfig, mode) {
1181
1185
  // isolatedClientHydration itself.
1182
1186
  isolatedClientHydration: resolveFarmServerComponentsMode(userConfig.experimental?.serverComponents) === "islands" ? "enabled" : "off",
1183
1187
  ppr: false,
1184
- ...userConfig.experimental
1188
+ ...userConfig.experimental,
1189
+ // Another renderer's islands run without Farm's server components engine, which renders React.
1190
+ ...rendererServerComponentsIslands ? { serverComponents: false } : {}
1185
1191
  },
1186
1192
  agent: resolveFarmAgentConfig(userConfig.agent, {
1187
1193
  docs: docs.enabled,
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-HR4N2K4V.mjs";
5
5
  import {
6
6
  normalizeFarmProductionSiteOrigin
7
- } from "./chunk-7UTRNV6R.mjs";
7
+ } from "./chunk-LUGQUU4S.mjs";
8
8
  import {
9
9
  resolveFarmAppManifestConfig
10
10
  } from "./chunk-SQ5O7I3L.mjs";
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-YT2ZMLXK.mjs";
30
30
  import {
31
31
  FARM_VERSION
32
- } from "./chunk-GWPANDW3.mjs";
32
+ } from "./chunk-XJJQAFZX.mjs";
33
33
  import {
34
34
  applyFarmBasePath
35
35
  } from "./chunk-SF3JB56B.mjs";
@@ -0,0 +1,13 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/api/route-files.ts
2
+ function hasPolyroutePlugin(plugins) {
3
+ return _optionalChain([plugins, 'optionalAccess', _ => _.some, 'call', _2 => _2((plugin) => plugin.name === "polyroute")]) === true;
4
+ }
5
+ function isFarmAPIRouteFileName(fileName, polyroute = false) {
6
+ if (polyroute && fileName === "route.rs") return true;
7
+ return /^route\.(?:ts|tsx|js|jsx)$/.test(fileName);
8
+ }
9
+
10
+
11
+
12
+
13
+ exports.hasPolyroutePlugin = hasPolyroutePlugin; exports.isFarmAPIRouteFileName = isFarmAPIRouteFileName;