@farm.js/core 0.1.51-beta.2 → 0.1.60

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 (321) hide show
  1. package/dist/{agent-mcp-handler-WWCC4GLG.mjs → agent-mcp-handler-7QMX2LUY.mjs} +7 -7
  2. package/dist/agent-mcp-handler-OV4WRFBL.cjs +18 -0
  3. package/dist/{agent-mcp.d-Z5DuwrqW.d.mts → agent-mcp.d-C-2S9bnP.d.mts} +1 -1
  4. package/dist/{agent-mcp.d-CR5Ov83o.d.ts → agent-mcp.d-SIoCUP1I.d.ts} +1 -1
  5. package/dist/agent-runtime.cjs +5 -5
  6. package/dist/agent-runtime.d.mts +2 -2
  7. package/dist/agent-runtime.d.ts +2 -2
  8. package/dist/agent-runtime.mjs +4 -4
  9. package/dist/{analyzer-Z6TNEAET.mjs → analyzer-22BEYV7S.mjs} +126 -12
  10. package/dist/{analyzer-T76CN3S7.cjs → analyzer-LCSI3NSH.cjs} +132 -18
  11. package/dist/api/client.cjs +5 -4
  12. package/dist/api/client.d.mts +1 -1
  13. package/dist/api/client.d.ts +1 -1
  14. package/dist/api/client.mjs +3 -2
  15. package/dist/api/client.native.cjs +45 -0
  16. package/dist/api/client.native.d.mts +23 -0
  17. package/dist/api/client.native.d.ts +23 -0
  18. package/dist/api/client.native.mjs +45 -0
  19. package/dist/api/route-manager.cjs +7 -7
  20. package/dist/api/route-manager.d.mts +4 -4
  21. package/dist/api/route-manager.d.ts +4 -4
  22. package/dist/api/route-manager.mjs +6 -6
  23. package/dist/api/runtime.cjs +5 -5
  24. package/dist/api/runtime.d.mts +3 -3
  25. package/dist/api/runtime.d.ts +3 -3
  26. package/dist/api/runtime.mjs +4 -4
  27. package/dist/{api-client.d-CeA6tNA6.d.mts → api-client.d-BNLXNCXJ.d.mts} +1 -1
  28. package/dist/{api-client.d-BWcqZciH.d.ts → api-client.d-ddQBNGtu.d.ts} +1 -1
  29. package/dist/api.cjs +11 -11
  30. package/dist/api.d.mts +5 -5
  31. package/dist/api.d.ts +5 -5
  32. package/dist/api.mjs +10 -10
  33. package/dist/{app-manifest.d-CAHkOBFa.d.mts → app-manifest.d-DrSAHskY.d.mts} +1 -1
  34. package/dist/{app-manifest.d-DiWr_Jfx.d.ts → app-manifest.d-Tb3CJpL4.d.ts} +1 -1
  35. package/dist/app-markdown.cjs +7 -7
  36. package/dist/app-markdown.d.mts +3 -3
  37. package/dist/app-markdown.d.ts +3 -3
  38. package/dist/app-markdown.mjs +6 -6
  39. package/dist/{app.d-DmapqkbV.d.ts → app.d-CmWlYpZJ.d.ts} +9 -4
  40. package/dist/{app.d-BfgJCsTQ.d.mts → app.d-D6QQM_kk.d.mts} +9 -4
  41. package/dist/{chunk-SN5VSO3Q.mjs → chunk-25T5VXOE.mjs} +7 -9
  42. package/dist/{chunk-GUJTVM36.cjs → chunk-2FRLSDBT.cjs} +1 -1
  43. package/dist/{chunk-LM2YOGDK.mjs → chunk-2I6PUKWJ.mjs} +1 -1
  44. package/dist/{chunk-EIMK7D2D.mjs → chunk-2KTYMMWT.mjs} +34 -4
  45. package/dist/{chunk-B5BBTPJQ.cjs → chunk-2OF5RPVU.cjs} +14 -14
  46. package/dist/chunk-37PYUEK5.mjs +533 -0
  47. package/dist/chunk-3HLQTOVU.cjs +6 -0
  48. package/dist/{chunk-VSLM6BHX.cjs → chunk-3OJNNCDL.cjs} +9 -9
  49. package/dist/{chunk-X3JNB2TB.mjs → chunk-3PX4AIXO.mjs} +36 -5
  50. package/dist/{chunk-UQHIWZZ6.cjs → chunk-3TL3AH25.cjs} +12 -6
  51. package/dist/chunk-3YMLUNL2.cjs +251 -0
  52. package/dist/chunk-4JTQPOKO.cjs +137 -0
  53. package/dist/{chunk-QXPSWMUD.cjs → chunk-4P23B7DU.cjs} +5 -5
  54. package/dist/{chunk-YVJV7Q2X.mjs → chunk-55U5QIXQ.mjs} +1 -1
  55. package/dist/{chunk-5N7QAGEA.cjs → chunk-5JNUYGNF.cjs} +37 -7
  56. package/dist/{chunk-NJLTQR5P.cjs → chunk-6BJJYOFL.cjs} +7 -7
  57. package/dist/chunk-6UUH4N4J.mjs +251 -0
  58. package/dist/{chunk-2NHOYYUT.mjs → chunk-7H45IJWO.mjs} +2 -2
  59. package/dist/{chunk-NN3MOPSI.mjs → chunk-A2MN5PQJ.mjs} +7 -7
  60. package/dist/{chunk-KY32FWK7.mjs → chunk-BHJAYPYU.mjs} +2 -2
  61. package/dist/{chunk-VAHBCI6X.mjs → chunk-BQWBHWEW.mjs} +26 -1
  62. package/dist/{chunk-KJMWAUKE.mjs → chunk-C7GJDVN4.mjs} +1 -1
  63. package/dist/{chunk-OYNNA4DD.cjs → chunk-CBKRS3M4.cjs} +9 -9
  64. package/dist/{chunk-I2DQGS56.cjs → chunk-CBOEJ5Z4.cjs} +39 -41
  65. package/dist/{chunk-BOVGCUDZ.cjs → chunk-CI4UNQHO.cjs} +2 -2
  66. package/dist/{chunk-S5AQ7CAC.cjs → chunk-CNNBFGL5.cjs} +39 -14
  67. package/dist/chunk-D2X5MUF5.cjs +1457 -0
  68. package/dist/{chunk-LEIXUFJN.cjs → chunk-D4MRNBVF.cjs} +10 -9
  69. package/dist/{chunk-2KVDHNQS.mjs → chunk-D7LTCK3U.mjs} +2 -2
  70. package/dist/{chunk-J3LBO2O4.cjs → chunk-DPJ66FSI.cjs} +22 -22
  71. package/dist/{chunk-NYQSC4DX.cjs → chunk-DZPR2W6U.cjs} +5 -5
  72. package/dist/{chunk-GW4YUIHW.mjs → chunk-E72UD6ME.mjs} +1 -1
  73. package/dist/chunk-EFZGB7JC.cjs +114 -0
  74. package/dist/{chunk-XXXRRVY6.mjs → chunk-EGVC4LIG.mjs} +5 -5
  75. package/dist/{chunk-72NBDVWQ.mjs → chunk-EXUONJYV.mjs} +3 -3
  76. package/dist/{chunk-VS7EHLLW.mjs → chunk-EZ34EHQP.mjs} +1 -1
  77. package/dist/{chunk-FM2UEKS2.mjs → chunk-F6Y7ZAPQ.mjs} +2 -2
  78. package/dist/{chunk-LMFJCXDD.mjs → chunk-FN5UEC7I.mjs} +1 -1
  79. package/dist/{chunk-E6LTONL4.mjs → chunk-FORSVMEJ.mjs} +2 -2
  80. package/dist/{chunk-6CYQQQGR.mjs → chunk-HPWB57PZ.mjs} +1 -1
  81. package/dist/{chunk-Y2G5SJFB.mjs → chunk-IFHPDLIS.mjs} +1 -1
  82. package/dist/{chunk-GNJIYJMS.cjs → chunk-IFXSBJPN.cjs} +16 -16
  83. package/dist/{chunk-74Z5KX4A.mjs → chunk-ILMTRGBG.mjs} +309 -56
  84. package/dist/{chunk-NXBHYO7S.cjs → chunk-JBK7UJOI.cjs} +14 -11
  85. package/dist/chunk-JI5D7MXY.mjs +137 -0
  86. package/dist/{chunk-QXJADAQB.cjs → chunk-JIBEFLQ7.cjs} +6 -2
  87. package/dist/{chunk-LZ4SB57H.mjs → chunk-JPIUGDK4.mjs} +1 -1
  88. package/dist/{chunk-Y3N5BFRJ.mjs → chunk-JSDV2NUN.mjs} +1 -1
  89. package/dist/{chunk-IRSS4HS4.mjs → chunk-K3RU5MOR.mjs} +1 -1
  90. package/dist/chunk-KPOMS5RO.cjs +237 -0
  91. package/dist/{chunk-LAZK6UV7.mjs → chunk-KVW2M6PI.mjs} +1 -1
  92. package/dist/{chunk-5IONBVJY.cjs → chunk-LB3DPQP6.cjs} +22 -22
  93. package/dist/{chunk-CZ35L6PL.mjs → chunk-LJVNMGE3.mjs} +10 -4
  94. package/dist/chunk-LLZSYFOM.mjs +6 -0
  95. package/dist/{chunk-X2AMN2WV.cjs → chunk-LQNW3ABP.cjs} +10 -10
  96. package/dist/{chunk-6ONBZGVH.cjs → chunk-LRB5OVRT.cjs} +3 -3
  97. package/dist/{chunk-WJFFPXCV.cjs → chunk-LT4VAF5Z.cjs} +12 -10
  98. package/dist/{chunk-F6TLUMH7.mjs → chunk-M53MIIXY.mjs} +1 -1
  99. package/dist/{chunk-HIFIG6HL.cjs → chunk-MEQN6DDA.cjs} +5 -5
  100. package/dist/{chunk-XLRLSTJ6.cjs → chunk-MGKW5XZE.cjs} +7 -7
  101. package/dist/{chunk-B3GZAQSC.cjs → chunk-MHLNWRCJ.cjs} +3 -3
  102. package/dist/{chunk-5ENW27SL.mjs → chunk-MMK4MZUN.mjs} +1 -1
  103. package/dist/{chunk-DTU4PX7V.cjs → chunk-MTWXOEI4.cjs} +927 -629
  104. package/dist/chunk-NHD7BAKD.mjs +1457 -0
  105. package/dist/{chunk-NPQLMP7M.cjs → chunk-NQJDO7K7.cjs} +32 -31
  106. package/dist/{chunk-76GHW3WI.cjs → chunk-O27PLNQZ.cjs} +10 -10
  107. package/dist/{chunk-PIHKO25G.mjs → chunk-OM7WILES.mjs} +1 -1
  108. package/dist/{chunk-7UPCJDB5.mjs → chunk-PCXIJKPM.mjs} +8 -8
  109. package/dist/{chunk-IWFV5ZED.cjs → chunk-PMJSG4JS.cjs} +1 -1
  110. package/dist/{chunk-JATTVAHA.cjs → chunk-PRFNLQSP.cjs} +4 -4
  111. package/dist/{chunk-SBABQKPT.cjs → chunk-QAS7KE7J.cjs} +7 -7
  112. package/dist/chunk-QGOZLGVP.mjs +0 -0
  113. package/dist/{chunk-VQJYGZNX.cjs → chunk-QMNWKQL4.cjs} +1 -1
  114. package/dist/{chunk-XB24LZWI.cjs → chunk-QRX4JRBO.cjs} +3 -3
  115. package/dist/{chunk-LNM57D3H.cjs → chunk-R53QDV6T.cjs} +4 -4
  116. package/dist/{chunk-SUV6YO4Q.cjs → chunk-RAWWCDCT.cjs} +5 -5
  117. package/dist/{chunk-LJDIFIJ2.mjs → chunk-RPUJHJHE.mjs} +4 -4
  118. package/dist/{chunk-G2KTRMWA.mjs → chunk-RSEAX5MW.mjs} +4 -0
  119. package/dist/chunk-SJRCWF4Z.mjs +237 -0
  120. package/dist/{chunk-IBSAYAWB.mjs → chunk-SX7EECTS.mjs} +8 -5
  121. package/dist/{chunk-KBRZAYI7.mjs → chunk-T4TBK5NY.mjs} +2 -2
  122. package/dist/{chunk-4SSRBCBR.mjs → chunk-T7I62A4C.mjs} +619 -321
  123. package/dist/{chunk-E36C43IX.cjs → chunk-U4BJKNIR.cjs} +6 -6
  124. package/dist/{chunk-YU42A5MA.cjs → chunk-UDJY2ZGY.cjs} +533 -280
  125. package/dist/{chunk-SHS6KXOZ.mjs → chunk-UR25Z5Z6.mjs} +1 -1
  126. package/dist/{chunk-WZW6LEHM.cjs → chunk-UYSTTPYJ.cjs} +1590 -1019
  127. package/dist/{chunk-KRRZJ77U.mjs → chunk-UZZ6IEQP.mjs} +3 -3
  128. package/dist/{chunk-EKJYE4Y7.cjs → chunk-VGG74PSU.cjs} +25 -25
  129. package/dist/{chunk-CTM4SPB3.mjs → chunk-VPTWKOCY.mjs} +20 -19
  130. package/dist/{chunk-UN6N623E.mjs → chunk-VQJHT2ND.mjs} +2 -2
  131. package/dist/{chunk-SJ23LJ3N.cjs → chunk-VVTJTMGQ.cjs} +3 -3
  132. package/dist/{chunk-KHXAJ2KA.cjs → chunk-W2RZ73IU.cjs} +12 -12
  133. package/dist/{chunk-JWI5PUO2.mjs → chunk-W2ZXMMHA.mjs} +2 -1
  134. package/dist/{chunk-BLD5GVCG.mjs → chunk-W6QLRQ3V.mjs} +1 -1
  135. package/dist/{chunk-AV26KHTG.mjs → chunk-X2CZTWQA.mjs} +2 -2
  136. package/dist/chunk-XPIPMWY3.cjs +1 -0
  137. package/dist/chunk-XTG73QZA.cjs +533 -0
  138. package/dist/{chunk-XPMC4E2G.cjs → chunk-XVSBALOY.cjs} +3 -3
  139. package/dist/{chunk-XYL4HSVC.cjs → chunk-YI6FKTTN.cjs} +38 -7
  140. package/dist/{chunk-N77JBPLC.mjs → chunk-YSXTNSXS.mjs} +10 -8
  141. package/dist/{chunk-EHB77D5U.cjs → chunk-ZDAEHG2O.cjs} +3 -3
  142. package/dist/{chunk-PMKUU273.mjs → chunk-ZFUKPWFC.mjs} +1226 -655
  143. package/dist/{chunk-E73PGHSR.mjs → chunk-ZMHAFH4R.mjs} +8 -8
  144. package/dist/{chunk-ZOWNWHK6.cjs → chunk-ZNH6NR3H.cjs} +2 -2
  145. package/dist/chunk-ZNXTU4YH.mjs +114 -0
  146. package/dist/{chunk-PFV2KPDZ.cjs → chunk-ZOYKJBP5.cjs} +3 -3
  147. package/dist/{chunk-CECUDGXQ.cjs → chunk-ZP32GNJQ.cjs} +13 -13
  148. package/dist/{chunk-72D2NX77.mjs → chunk-ZZ2QKCKW.mjs} +1 -1
  149. package/dist/{client-plugins.d-Bx3FXpqm.d.mts → client-plugins.d-CgQQ-EAv.d.mts} +25 -4
  150. package/dist/{client-plugins.d-TiLbS5j4.d.ts → client-plugins.d-vXrbcfJ1.d.ts} +25 -4
  151. package/dist/client-plugins.d.mts +2 -2
  152. package/dist/client-plugins.d.ts +2 -2
  153. package/dist/client.cjs +9 -9
  154. package/dist/client.d.mts +9 -9
  155. package/dist/client.d.ts +9 -9
  156. package/dist/client.mjs +9 -9
  157. package/dist/{config.d-iRPI16ku.d.mts → config.d-DqZkLwef.d.mts} +146 -1
  158. package/dist/{config.d-iRPI16ku.d.ts → config.d-DqZkLwef.d.ts} +146 -1
  159. package/dist/config.d.mts +2 -2
  160. package/dist/config.d.ts +2 -2
  161. package/dist/cron.cjs +3 -3
  162. package/dist/cron.d.mts +10 -0
  163. package/dist/cron.d.ts +10 -0
  164. package/dist/cron.mjs +2 -2
  165. package/dist/desktop.d.mts +3 -3
  166. package/dist/desktop.d.ts +3 -3
  167. package/dist/{devtools-UQLDAOEI.mjs → devtools-KQZ6SRCJ.mjs} +16 -16
  168. package/dist/{devtools-6XWCZIGO.cjs → devtools-UF6JYHUN.cjs} +18 -18
  169. package/dist/docs.cjs +19 -19
  170. package/dist/docs.d.mts +3 -3
  171. package/dist/docs.d.ts +3 -3
  172. package/dist/docs.mjs +18 -18
  173. package/dist/index.cjs +99 -95
  174. package/dist/{index.d-yueUNipJ.d.ts → index.d-DlCELfhf.d.ts} +1 -1
  175. package/dist/{index.d-YxJ2AiDF.d.mts → index.d-Dmfb7Kb_.d.mts} +1 -1
  176. package/dist/index.d.mts +18 -18
  177. package/dist/index.d.ts +18 -18
  178. package/dist/index.mjs +139 -135
  179. package/dist/integrations.cjs +5 -5
  180. package/dist/integrations.d.mts +2 -2
  181. package/dist/integrations.d.ts +2 -2
  182. package/dist/integrations.mjs +4 -4
  183. package/dist/internal/app-markdown-runtime.cjs +6 -6
  184. package/dist/internal/app-markdown-runtime.d.mts +3 -3
  185. package/dist/internal/app-markdown-runtime.d.ts +3 -3
  186. package/dist/internal/app-markdown-runtime.mjs +5 -5
  187. package/dist/internal/build-runtime.cjs +52 -50
  188. package/dist/internal/build-runtime.d.mts +4 -4
  189. package/dist/internal/build-runtime.d.ts +4 -4
  190. package/dist/internal/build-runtime.mjs +51 -49
  191. package/dist/internal/cli-runtime.cjs +28 -28
  192. package/dist/internal/cli-runtime.mjs +28 -28
  193. package/dist/internal/client-error-overlay.cjs +4 -4
  194. package/dist/internal/client-error-overlay.mjs +1 -1
  195. package/dist/internal/client-runtime.cjs +20 -15
  196. package/dist/internal/client-runtime.d.mts +5 -5
  197. package/dist/internal/client-runtime.d.ts +5 -5
  198. package/dist/internal/client-runtime.mjs +8 -3
  199. package/dist/internal/compression-runtime.d.mts +2 -2
  200. package/dist/internal/compression-runtime.d.ts +2 -2
  201. package/dist/internal/config-runtime.cjs +18 -18
  202. package/dist/internal/config-runtime.d.mts +119 -7
  203. package/dist/internal/config-runtime.d.ts +119 -7
  204. package/dist/internal/config-runtime.mjs +17 -17
  205. package/dist/internal/infra-analytics-runtime.cjs +11 -11
  206. package/dist/internal/infra-analytics-runtime.mjs +9 -9
  207. package/dist/internal/islands-boot.cjs +211 -0
  208. package/dist/internal/islands-boot.d.mts +8 -0
  209. package/dist/internal/islands-boot.d.ts +8 -0
  210. package/dist/internal/islands-boot.mjs +211 -0
  211. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  212. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  213. package/dist/internal/production-runtime.cjs +42 -28
  214. package/dist/internal/production-runtime.d.mts +50 -12
  215. package/dist/internal/production-runtime.d.ts +50 -12
  216. package/dist/internal/production-runtime.mjs +52 -38
  217. package/dist/markdown.cjs +7 -5
  218. package/dist/markdown.d.mts +2 -2
  219. package/dist/markdown.d.ts +2 -2
  220. package/dist/markdown.mjs +6 -4
  221. package/dist/middleware.cjs +10 -10
  222. package/dist/middleware.d.mts +4 -4
  223. package/dist/middleware.d.ts +4 -4
  224. package/dist/middleware.mjs +9 -9
  225. package/dist/mobile.d.mts +43 -5
  226. package/dist/mobile.d.ts +43 -5
  227. package/dist/modules-VHD7BELU.mjs +13 -0
  228. package/dist/modules-WT5D3AWY.cjs +13 -0
  229. package/dist/native-specs-BD7HOTMJ.mjs +15 -0
  230. package/dist/native-specs-IQQRJOOW.cjs +15 -0
  231. package/dist/native-tree-6G5O53O3.cjs +27 -0
  232. package/dist/native-tree-VWNW2MQ2.mjs +27 -0
  233. package/dist/native.cjs +87 -0
  234. package/dist/native.d.mts +72 -0
  235. package/dist/native.d.ts +72 -0
  236. package/dist/native.mjs +87 -0
  237. package/dist/{navigation-delegate.d-HnDXhlyP.d.mts → navigation-delegate.d-CnOTWOyi.d.mts} +1 -1
  238. package/dist/{navigation-delegate.d-BY1e_Xrh.d.ts → navigation-delegate.d-JXx40JzR.d.ts} +1 -1
  239. package/dist/navigation.cjs +5 -5
  240. package/dist/navigation.d.mts +5 -5
  241. package/dist/navigation.d.ts +5 -5
  242. package/dist/navigation.mjs +4 -4
  243. package/dist/{nitro-R444AF3O.mjs → nitro-FLN6DRGJ.mjs} +7 -7
  244. package/dist/{nitro-CK7M4RMY.cjs → nitro-HXAZZQKY.cjs} +12 -12
  245. package/dist/plugin.cjs +43 -42
  246. package/dist/plugin.d.mts +5 -4
  247. package/dist/plugin.d.ts +5 -4
  248. package/dist/plugin.mjs +42 -41
  249. package/dist/port-C6GBH4C6.cjs +419 -0
  250. package/dist/port-WOOQ3V56.mjs +419 -0
  251. package/dist/{production-runtime.d-BpJUDzP8.d.mts → production-runtime.d-CP5s6RuY.d.mts} +1 -1
  252. package/dist/{production-runtime.d-lMjvE9cf.d.ts → production-runtime.d-N-cE3pmy.d.ts} +1 -1
  253. package/dist/{programmatic-routes-client.d-BlFp5hv4.d.ts → programmatic-routes-client.d-CLG2N1yH.d.ts} +2 -2
  254. package/dist/{programmatic-routes-client.d-6CGQ3TCk.d.mts → programmatic-routes-client.d-CPbNqtIi.d.mts} +2 -2
  255. package/dist/query/client.cjs +6 -6
  256. package/dist/query/client.mjs +2 -2
  257. package/dist/{render-plan.d-DhP0mTHF.d.ts → render-plan.d-B9lAP3uX.d.ts} +1 -1
  258. package/dist/{render-plan.d-BH9edqKs.d.mts → render-plan.d-DZ-qjjdG.d.mts} +1 -1
  259. package/dist/renderer/react/server.cjs +2 -2
  260. package/dist/renderer/react/server.mjs +3 -3
  261. package/dist/renderer-client.cjs +6 -6
  262. package/dist/renderer-client.d.mts +5 -5
  263. package/dist/renderer-client.d.ts +5 -5
  264. package/dist/renderer-client.mjs +2 -2
  265. package/dist/{request.d-BVZrsR1v.d.ts → request.d-BiicaNxb.d.ts} +1 -1
  266. package/dist/{request.d-DJFRdKi8.d.mts → request.d-DV0oeUit.d.mts} +1 -1
  267. package/dist/request.d.mts +3 -3
  268. package/dist/request.d.ts +3 -3
  269. package/dist/{route-rendering.d-Bpmw7PED.d.mts → route-rendering.d-BrIKA51A.d.mts} +1 -1
  270. package/dist/{route-rendering.d-B00JtK_-.d.ts → route-rendering.d-Iss0C7GR.d.ts} +1 -1
  271. package/dist/{router.d-Bd1x9XxQ.d.ts → router.d-DjGn_al7.d.ts} +1 -1
  272. package/dist/{router.d-e0jQ3jQ-.d.mts → router.d-mNTbOGV_.d.mts} +1 -1
  273. package/dist/{routes.d-D96Dq9lz.d.ts → routes.d-BKSjHuH9.d.ts} +27 -4
  274. package/dist/{routes.d-Cmv8TgVq.d.mts → routes.d-qd8Qf4LG.d.mts} +27 -4
  275. package/dist/routes.d.mts +2 -2
  276. package/dist/routes.d.ts +2 -2
  277. package/dist/{rsc-pipeline-DX4OC5FN.cjs → rsc-pipeline-SVLBTY7H.cjs} +21 -21
  278. package/dist/{rsc-pipeline-ZQ4CTVEG.mjs → rsc-pipeline-WBLBDQXA.mjs} +20 -20
  279. package/dist/{runtime-NQ3EDSA7.cjs → runtime-DGUOWSMF.cjs} +307 -48
  280. package/dist/{runtime-NPDRDV6R.mjs → runtime-HFZTVNFF.mjs} +298 -39
  281. package/dist/{runtime.d-CgB3IJDq.d.mts → runtime.d-BNVbojF1.d.mts} +1 -1
  282. package/dist/{runtime.d-D-td-RR3.d.ts → runtime.d-Bm_4hP5T.d.ts} +1 -1
  283. package/dist/{schema-dev-notice-F6QYSOAI.mjs → schema-dev-notice-JMXEQWIQ.mjs} +3 -3
  284. package/dist/{schema-dev-notice-UU7DMZEU.cjs → schema-dev-notice-PLBFDTOF.cjs} +6 -6
  285. package/dist/server-fn-client.d.mts +1 -1
  286. package/dist/server-fn-client.d.ts +1 -1
  287. package/dist/server-plugins.cjs +1 -1
  288. package/dist/server-plugins.d.mts +3 -3
  289. package/dist/server-plugins.d.ts +3 -3
  290. package/dist/server-plugins.mjs +1 -1
  291. package/dist/server.cjs +82 -81
  292. package/dist/server.d.mts +12 -11
  293. package/dist/server.d.ts +12 -11
  294. package/dist/server.mjs +65 -64
  295. package/dist/session-2Q72D4QV.cjs +23 -0
  296. package/dist/{session-IGEDQ5PY.mjs → session-QZXZOPR2.mjs} +2 -2
  297. package/dist/shell-render.d-CG6bPiiA.d.mts +41 -0
  298. package/dist/shell-render.d-CG6bPiiA.d.ts +41 -0
  299. package/dist/{spa-router.d-CO01mVOM.d.ts → spa-router.d-DAtnNoBe.d.ts} +11 -2
  300. package/dist/{spa-router.d-BWDhS0FK.d.mts → spa-router.d-DHDoXxDE.d.mts} +11 -2
  301. package/dist/testing.cjs +7 -7
  302. package/dist/testing.d.mts +2 -2
  303. package/dist/testing.d.ts +2 -2
  304. package/dist/testing.mjs +6 -6
  305. package/dist/{utils.d-B77__yh8.d.ts → utils.d-DwZ-KLSB.d.ts} +7 -1
  306. package/dist/{utils.d-DRDazhCA.d.mts → utils.d-uKZcKJk4.d.mts} +7 -1
  307. package/dist/version.cjs +2 -2
  308. package/dist/version.mjs +1 -1
  309. package/dist/vite.cjs +43 -42
  310. package/dist/vite.d.mts +17 -6
  311. package/dist/vite.d.ts +17 -6
  312. package/dist/vite.mjs +42 -41
  313. package/dist/workflows.cjs +3 -3
  314. package/dist/workflows.mjs +2 -2
  315. package/package.json +17 -3
  316. package/dist/agent-mcp-handler-RT3COCEL.cjs +0 -18
  317. package/dist/session-AAU7RNRO.cjs +0 -23
  318. package/dist/{chunk-7FVVQEVL.cjs → chunk-4BS3HSY7.cjs} +2 -2
  319. package/dist/{chunk-N7JQXQAV.cjs → chunk-5OJVKXFV.cjs} +2 -2
  320. package/dist/{chunk-WSDKXV4E.mjs → chunk-72KABRWN.mjs} +4 -4
  321. package/dist/{chunk-C3BOESDW.mjs → chunk-B4CWYGCG.mjs} +3 -3
@@ -5,7 +5,7 @@ import {
5
5
  loadConfig,
6
6
  resolveConfig,
7
7
  resolveDeployConfig
8
- } from "../chunk-CTM4SPB3.mjs";
8
+ } from "../chunk-VPTWKOCY.mjs";
9
9
  import "../chunk-VISQDC6W.mjs";
10
10
  import {
11
11
  createFarmDesktopContext,
@@ -22,50 +22,50 @@ import "../chunk-X3XUZWRB.mjs";
22
22
  import "../chunk-XR2ZIBQK.mjs";
23
23
  import "../chunk-CU5SYTJG.mjs";
24
24
  import "../chunk-ES2LD2YD.mjs";
25
- import "../chunk-KBRZAYI7.mjs";
26
- import "../chunk-2WZTGPK6.mjs";
27
- import "../chunk-LAZK6UV7.mjs";
25
+ import "../chunk-T4TBK5NY.mjs";
28
26
  import "../chunk-22W4FNTG.mjs";
27
+ import "../chunk-2WZTGPK6.mjs";
28
+ import "../chunk-KVW2M6PI.mjs";
29
+ import "../chunk-52Y3C3HG.mjs";
29
30
  import "../chunk-2NGZFOKG.mjs";
30
31
  import "../chunk-N33DLJBC.mjs";
31
- import "../chunk-52Y3C3HG.mjs";
32
32
  import "../chunk-UIJOLBUL.mjs";
33
+ import "../chunk-YSXTNSXS.mjs";
33
34
  import "../chunk-VFXE6NWR.mjs";
34
- import "../chunk-LZ4SB57H.mjs";
35
- import "../chunk-X3JNB2TB.mjs";
35
+ import "../chunk-JPIUGDK4.mjs";
36
+ import "../chunk-3PX4AIXO.mjs";
36
37
  import "../chunk-WXFY5JIY.mjs";
37
38
  import "../chunk-FSQMN2MQ.mjs";
38
- import "../chunk-YWPNIYUP.mjs";
39
- import "../chunk-N77JBPLC.mjs";
40
39
  import "../chunk-YP7YO3S3.mjs";
41
- import "../chunk-Y2G5SJFB.mjs";
40
+ import "../chunk-YWPNIYUP.mjs";
41
+ import "../chunk-IFHPDLIS.mjs";
42
42
  import "../chunk-H4WUWLQR.mjs";
43
- import "../chunk-F6TLUMH7.mjs";
43
+ import "../chunk-M53MIIXY.mjs";
44
44
  import "../chunk-46P5KNTE.mjs";
45
45
  import "../chunk-EDPENAVO.mjs";
46
- import "../chunk-KJMWAUKE.mjs";
46
+ import "../chunk-C7GJDVN4.mjs";
47
47
  import "../chunk-EVMXPJCB.mjs";
48
48
  import "../chunk-TGSEVBPO.mjs";
49
49
  import "../chunk-QSTRBKHZ.mjs";
50
50
  import "../chunk-MU5V7XHL.mjs";
51
51
  import {
52
52
  logger
53
- } from "../chunk-Y3N5BFRJ.mjs";
53
+ } from "../chunk-JSDV2NUN.mjs";
54
54
  import "../chunk-H3ASZDT7.mjs";
55
55
  import "../chunk-2DA7CLY7.mjs";
56
56
  import "../chunk-CO6UYM2D.mjs";
57
+ import "../chunk-2I6PUKWJ.mjs";
57
58
  import "../chunk-GFT5AHAT.mjs";
58
59
  import "../chunk-D2LCAV6L.mjs";
59
- import "../chunk-LM2YOGDK.mjs";
60
60
  import "../chunk-GYMGK467.mjs";
61
61
  import "../chunk-GUZC226X.mjs";
62
- import "../chunk-BLD5GVCG.mjs";
62
+ import "../chunk-W6QLRQ3V.mjs";
63
63
  import "../chunk-WCLLPR6H.mjs";
64
64
  import "../chunk-UAQD67HM.mjs";
65
65
  import "../chunk-AZQXXXDX.mjs";
66
66
  import "../chunk-ONG4RDW3.mjs";
67
- import "../chunk-JNYFXL7X.mjs";
68
67
  import "../chunk-LM55GS4R.mjs";
68
+ import "../chunk-JNYFXL7X.mjs";
69
69
  import "../chunk-OHWM2VI4.mjs";
70
70
  import "../chunk-VIXTAVEA.mjs";
71
71
  import "../chunk-7S7AAK2D.mjs";
@@ -75,7 +75,7 @@ import "../chunk-Y6FXYEAI.mjs";
75
75
 
76
76
  // src/config-runtime.ts
77
77
  function loadFarmMobileRuntime() {
78
- return import("../runtime-NPDRDV6R.mjs");
78
+ return import("../runtime-HFZTVNFF.mjs");
79
79
  }
80
80
  export {
81
81
  createFarmDesktopContext,
@@ -1,20 +1,20 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkQXPSWMUDcjs = require('../chunk-QXPSWMUD.cjs');
5
- require('../chunk-J3LBO2O4.cjs');
6
- require('../chunk-SBABQKPT.cjs');
4
+ var _chunk4P23B7DUcjs = require('../chunk-4P23B7DU.cjs');
5
+ require('../chunk-DPJ66FSI.cjs');
6
+ require('../chunk-QAS7KE7J.cjs');
7
7
  require('../chunk-SG57PX7K.cjs');
8
- require('../chunk-HIFIG6HL.cjs');
9
- require('../chunk-WJFFPXCV.cjs');
10
- require('../chunk-6ONBZGVH.cjs');
8
+ require('../chunk-MEQN6DDA.cjs');
9
+ require('../chunk-LT4VAF5Z.cjs');
10
+ require('../chunk-LRB5OVRT.cjs');
11
11
  require('../chunk-EVIWKPJV.cjs');
12
+ require('../chunk-2OF5RPVU.cjs');
12
13
  require('../chunk-LIFUPCXW.cjs');
13
14
  require('../chunk-JYT7AN37.cjs');
14
- require('../chunk-B5BBTPJQ.cjs');
15
- require('../chunk-GUJTVM36.cjs');
15
+ require('../chunk-2FRLSDBT.cjs');
16
16
  require('../chunk-CA7DNRHO.cjs');
17
- require('../chunk-IWFV5ZED.cjs');
17
+ require('../chunk-PMJSG4JS.cjs');
18
18
  require('../chunk-A25FXJ7D.cjs');
19
19
  require('../chunk-HNAISJFD.cjs');
20
20
  require('../chunk-3BIASUGR.cjs');
@@ -23,8 +23,8 @@ require('../chunk-YTVSWXEZ.cjs');
23
23
  require('../chunk-BTZ5O6VM.cjs');
24
24
 
25
25
  // src/infra-analytics-runtime.ts
26
- var createFarmInfraAnalyticsPlugin2 = _chunkQXPSWMUDcjs.createFarmInfraAnalyticsPlugin;
27
- var createFarmInfraAnalyticsRecorder2 = _chunkQXPSWMUDcjs.createFarmInfraAnalyticsRecorder;
26
+ var createFarmInfraAnalyticsPlugin2 = _chunk4P23B7DUcjs.createFarmInfraAnalyticsPlugin;
27
+ var createFarmInfraAnalyticsRecorder2 = _chunk4P23B7DUcjs.createFarmInfraAnalyticsRecorder;
28
28
 
29
29
 
30
30
 
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  createFarmInfraAnalyticsPlugin,
3
3
  createFarmInfraAnalyticsRecorder
4
- } from "../chunk-E6LTONL4.mjs";
5
- import "../chunk-E73PGHSR.mjs";
6
- import "../chunk-KRRZJ77U.mjs";
4
+ } from "../chunk-FORSVMEJ.mjs";
5
+ import "../chunk-ZMHAFH4R.mjs";
6
+ import "../chunk-UZZ6IEQP.mjs";
7
7
  import "../chunk-2WZTGPK6.mjs";
8
- import "../chunk-LAZK6UV7.mjs";
9
- import "../chunk-N77JBPLC.mjs";
10
- import "../chunk-KJMWAUKE.mjs";
8
+ import "../chunk-KVW2M6PI.mjs";
9
+ import "../chunk-YSXTNSXS.mjs";
10
+ import "../chunk-C7GJDVN4.mjs";
11
11
  import "../chunk-2DA7CLY7.mjs";
12
+ import "../chunk-2I6PUKWJ.mjs";
12
13
  import "../chunk-GFT5AHAT.mjs";
13
14
  import "../chunk-D2LCAV6L.mjs";
14
- import "../chunk-LM2YOGDK.mjs";
15
- import "../chunk-6CYQQQGR.mjs";
15
+ import "../chunk-HPWB57PZ.mjs";
16
16
  import "../chunk-GUZC226X.mjs";
17
- import "../chunk-BLD5GVCG.mjs";
17
+ import "../chunk-W6QLRQ3V.mjs";
18
18
  import "../chunk-LM55GS4R.mjs";
19
19
  import "../chunk-6HRAK7I5.mjs";
20
20
  import "../chunk-VIXTAVEA.mjs";
@@ -0,0 +1,211 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return 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; }require('../chunk-BTZ5O6VM.cjs');
2
+
3
+ // src/client/islands-boot.ts
4
+ var FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR = 'button,[role="button"],input[type="button"],input[type="submit"],input[type="reset"]';
5
+ var FARM_ISLANDS_BOOT_VISIBLE_MARGIN = "200px";
6
+ var ISLAND = "f-island";
7
+ var HYDRATED_ISLAND = '[data-farm-island-hydrated="true"]';
8
+ function isModified(event) {
9
+ return event.metaKey || event.altKey || event.ctrlKey || event.shiftKey;
10
+ }
11
+ function heldClickTarget(target) {
12
+ const link = target.closest("a[href]");
13
+ if (link) return _optionalChain([link, 'access', _ => _.getAttribute, 'call', _2 => _2("href"), 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4("#")]) ? link : null;
14
+ return target.closest(FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR);
15
+ }
16
+ function pendingIsland(node, root) {
17
+ if (node.closest(HYDRATED_ISLAND)) return null;
18
+ return _nullishCoalesce(node.closest(ISLAND), () => ( (_optionalChain([root, 'optionalAccess', _5 => _5.contains, 'call', _6 => _6(node)]) ? root : null)));
19
+ }
20
+ function routedLink(target) {
21
+ const anchor = target instanceof Element ? target.closest("a") : null;
22
+ const href = _optionalChain([anchor, 'optionalAccess', _7 => _7.getAttribute, 'call', _8 => _8("href")]);
23
+ if (!anchor || !href) return null;
24
+ if (anchor.hasAttribute("download") || href.startsWith("#") || href.startsWith("//")) return null;
25
+ if (/^[a-zA-Z][a-zA-Z\d+.-]*:/.test(href)) return null;
26
+ if (anchor.target && anchor.target !== "_self") return null;
27
+ return anchor;
28
+ }
29
+ function loadFarmClientEntry() {
30
+ const boot = document.querySelector("script[data-farm-runtime]");
31
+ const src = _optionalChain([boot, 'optionalAccess', _9 => _9.dataset, 'access', _10 => _10.farmRuntime]);
32
+ if (!boot || !src) {
33
+ return Promise.reject(new Error("The boot script has no data-farm-runtime attribute."));
34
+ }
35
+ return new Promise((resolve, reject) => {
36
+ const script = document.createElement("script");
37
+ script.type = "module";
38
+ script.src = src;
39
+ if (boot.nonce) script.nonce = boot.nonce;
40
+ script.addEventListener("load", () => resolve(), { once: true });
41
+ script.addEventListener(
42
+ "error",
43
+ () => reject(new Error(`The client runtime at ${src} failed to load.`)),
44
+ { once: true }
45
+ );
46
+ document.head.append(script);
47
+ });
48
+ }
49
+ function startFarmIslandsBoot(load = loadFarmClientEntry) {
50
+ const queue = _nullishCoalesce(window.__FARM_PREHYDRATION_CLICK_QUEUE__, () => ( (window.__FARM_PREHYDRATION_CLICK_QUEUE__ = [])));
51
+ const cleanups = [];
52
+ let loading;
53
+ const script = document.querySelector("script[data-farm-runtime]");
54
+ const rootId = _optionalChain([script, 'optionalAccess', _11 => _11.dataset, 'access', _12 => _12.farmRoot]);
55
+ const root = rootId ? document.getElementById(rootId) : null;
56
+ const release = () => {
57
+ for (const cleanup of cleanups.splice(0)) cleanup();
58
+ };
59
+ const start = () => {
60
+ if (!loading) {
61
+ loading = load().then(release, (error) => {
62
+ release();
63
+ throw error;
64
+ });
65
+ loading.catch((error) => {
66
+ console.error("[Farm.js] The client runtime failed to load.", error);
67
+ });
68
+ }
69
+ return loading;
70
+ };
71
+ const listen = (type, handler, capture) => {
72
+ document.addEventListener(type, handler, capture);
73
+ cleanups.push(() => document.removeEventListener(type, handler, capture));
74
+ };
75
+ const hold = (event, target, kind) => {
76
+ event.preventDefault();
77
+ event.stopImmediatePropagation();
78
+ if (!queue.some((item) => item.target === target)) {
79
+ queue.push({ target, kind, createdAt: Date.now() });
80
+ document.dispatchEvent(
81
+ new CustomEvent("farm:island-interaction", { detail: { target, kind } })
82
+ );
83
+ }
84
+ void start();
85
+ };
86
+ listen(
87
+ "click",
88
+ (event) => {
89
+ const click = event;
90
+ if (click.defaultPrevented || click.button !== 0 || isModified(click)) return;
91
+ const target = click.target instanceof Element ? heldClickTarget(click.target) : null;
92
+ if (!target || !pendingIsland(target, root)) return;
93
+ hold(event, target, "click");
94
+ },
95
+ true
96
+ );
97
+ listen(
98
+ "submit",
99
+ (event) => {
100
+ const form = event.target;
101
+ if (event.defaultPrevented || !(form instanceof Element) || form.nodeName !== "FORM") return;
102
+ if (pendingIsland(form, root)) hold(event, form, "submit");
103
+ },
104
+ true
105
+ );
106
+ const observe = (event) => {
107
+ const target = event.target;
108
+ if (!(target instanceof Element)) return;
109
+ if (routedLink(target)) void start();
110
+ else if (event.type !== "mouseover" && (pendingIsland(target, root) || target.closest("form"))) {
111
+ void start();
112
+ }
113
+ };
114
+ for (const type of ["pointerdown", "focusin", "mouseover"]) listen(type, observe, true);
115
+ listen(
116
+ "click",
117
+ (event) => {
118
+ const click = event;
119
+ if (click.defaultPrevented || click.button !== 0 || isModified(click)) return;
120
+ const anchor = routedLink(click.target);
121
+ if (!anchor) return;
122
+ click.preventDefault();
123
+ start().then(
124
+ () => {
125
+ if (anchor.isConnected) {
126
+ anchor.dispatchEvent(new MouseEvent("click", { bubbles: true, cancelable: true }));
127
+ } else location.assign(anchor.href);
128
+ },
129
+ () => location.assign(anchor.href)
130
+ );
131
+ },
132
+ false
133
+ );
134
+ const visibility = typeof IntersectionObserver === "function" ? new IntersectionObserver(
135
+ (entries) => {
136
+ if (entries.some((entry) => entry.isIntersecting)) void start();
137
+ },
138
+ { rootMargin: FARM_ISLANDS_BOOT_VISIBLE_MARGIN }
139
+ ) : null;
140
+ if (visibility) cleanups.push(() => visibility.disconnect());
141
+ let idle = false;
142
+ const startWhenIdle = () => {
143
+ if (idle) return;
144
+ idle = true;
145
+ const idleWindow = window;
146
+ if (typeof idleWindow.requestIdleCallback === "function") {
147
+ const handle = idleWindow.requestIdleCallback(() => void start(), { timeout: 2e3 });
148
+ cleanups.push(() => _optionalChain([idleWindow, 'access', _13 => _13.cancelIdleCallback, 'optionalCall', _14 => _14(handle)]));
149
+ } else {
150
+ const handle = window.setTimeout(() => void start(), 1);
151
+ cleanups.push(() => window.clearTimeout(handle));
152
+ }
153
+ };
154
+ const parsedVisible = [];
155
+ const observeVisible = (island) => {
156
+ const targets = island.getClientRects().length > 0 ? [island] : Array.from(island.children);
157
+ if (!visibility || targets.length === 0) void start();
158
+ else for (const target of targets) visibility.observe(target);
159
+ };
160
+ const considerIsland = (island) => {
161
+ if (_optionalChain([island, 'access', _15 => _15.parentElement, 'optionalAccess', _16 => _16.closest, 'call', _17 => _17(ISLAND)])) return;
162
+ const strategy = island.getAttribute("strategy");
163
+ if (strategy === "interaction") return;
164
+ if (strategy === "idle") startWhenIdle();
165
+ else if (strategy !== "visible") void start();
166
+ else if (document.readyState === "loading") parsedVisible.push(island);
167
+ else observeVisible(island);
168
+ };
169
+ const consider = (node) => {
170
+ if (loading) return;
171
+ if (node.nodeType === Node.COMMENT_NODE) {
172
+ const data = node.data;
173
+ if (data === "$?" || data === "$!") void start();
174
+ } else if (node instanceof Element) {
175
+ if (node.matches(ISLAND)) considerIsland(node);
176
+ for (const island of Array.from(node.querySelectorAll(ISLAND))) considerIsland(island);
177
+ }
178
+ };
179
+ const comments = document.createTreeWalker(document, NodeFilter.SHOW_COMMENT);
180
+ while (!loading && comments.nextNode()) consider(comments.currentNode);
181
+ consider(document.documentElement);
182
+ if (rootId && !root) void start();
183
+ else if (root && !loading) {
184
+ const strategy = _optionalChain([script, 'optionalAccess', _18 => _18.dataset, 'access', _19 => _19.farmRootStrategy]);
185
+ if (strategy === "idle") startWhenIdle();
186
+ else if (strategy === "visible") observeVisible(root);
187
+ else if (strategy !== "interaction") void start();
188
+ }
189
+ if (!loading && document.readyState === "loading") {
190
+ const observer = new MutationObserver((records) => {
191
+ for (const record of records) {
192
+ for (const node of Array.from(record.addedNodes)) consider(node);
193
+ }
194
+ });
195
+ observer.observe(document, { childList: true, subtree: true });
196
+ const parsed = () => {
197
+ observer.disconnect();
198
+ for (const island of parsedVisible.splice(0)) if (!loading) observeVisible(island);
199
+ };
200
+ document.addEventListener("DOMContentLoaded", parsed, { once: true });
201
+ cleanups.push(() => {
202
+ observer.disconnect();
203
+ document.removeEventListener("DOMContentLoaded", parsed);
204
+ });
205
+ }
206
+ }
207
+
208
+
209
+
210
+
211
+ exports.FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR = FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR; exports.FARM_ISLANDS_BOOT_VISIBLE_MARGIN = FARM_ISLANDS_BOOT_VISIBLE_MARGIN; exports.startFarmIslandsBoot = startFarmIslandsBoot;
@@ -0,0 +1,8 @@
1
+ /** Kept equal to FARM_ISLAND_REPLAYABLE_SELECTOR (island.ts); a test compares them. */
2
+ declare const FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR = "button,[role=\"button\"],input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"]";
3
+ /** Kept equal to the island scheduler's visibility margin (island-triggers.ts). */
4
+ declare const FARM_ISLANDS_BOOT_VISIBLE_MARGIN = "200px";
5
+ /** Starts the runtime when the page first needs it. `load` runs it; it starts as it runs. */
6
+ declare function startFarmIslandsBoot(load?: () => Promise<unknown>): void;
7
+
8
+ export { FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR, FARM_ISLANDS_BOOT_VISIBLE_MARGIN, startFarmIslandsBoot };
@@ -0,0 +1,8 @@
1
+ /** Kept equal to FARM_ISLAND_REPLAYABLE_SELECTOR (island.ts); a test compares them. */
2
+ declare const FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR = "button,[role=\"button\"],input[type=\"button\"],input[type=\"submit\"],input[type=\"reset\"]";
3
+ /** Kept equal to the island scheduler's visibility margin (island-triggers.ts). */
4
+ declare const FARM_ISLANDS_BOOT_VISIBLE_MARGIN = "200px";
5
+ /** Starts the runtime when the page first needs it. `load` runs it; it starts as it runs. */
6
+ declare function startFarmIslandsBoot(load?: () => Promise<unknown>): void;
7
+
8
+ export { FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR, FARM_ISLANDS_BOOT_VISIBLE_MARGIN, startFarmIslandsBoot };
@@ -0,0 +1,211 @@
1
+ import "../chunk-Y6FXYEAI.mjs";
2
+
3
+ // src/client/islands-boot.ts
4
+ var FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR = 'button,[role="button"],input[type="button"],input[type="submit"],input[type="reset"]';
5
+ var FARM_ISLANDS_BOOT_VISIBLE_MARGIN = "200px";
6
+ var ISLAND = "f-island";
7
+ var HYDRATED_ISLAND = '[data-farm-island-hydrated="true"]';
8
+ function isModified(event) {
9
+ return event.metaKey || event.altKey || event.ctrlKey || event.shiftKey;
10
+ }
11
+ function heldClickTarget(target) {
12
+ const link = target.closest("a[href]");
13
+ if (link) return link.getAttribute("href")?.startsWith("#") ? link : null;
14
+ return target.closest(FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR);
15
+ }
16
+ function pendingIsland(node, root) {
17
+ if (node.closest(HYDRATED_ISLAND)) return null;
18
+ return node.closest(ISLAND) ?? (root?.contains(node) ? root : null);
19
+ }
20
+ function routedLink(target) {
21
+ const anchor = target instanceof Element ? target.closest("a") : null;
22
+ const href = anchor?.getAttribute("href");
23
+ if (!anchor || !href) return null;
24
+ if (anchor.hasAttribute("download") || href.startsWith("#") || href.startsWith("//")) return null;
25
+ if (/^[a-zA-Z][a-zA-Z\d+.-]*:/.test(href)) return null;
26
+ if (anchor.target && anchor.target !== "_self") return null;
27
+ return anchor;
28
+ }
29
+ function loadFarmClientEntry() {
30
+ const boot = document.querySelector("script[data-farm-runtime]");
31
+ const src = boot?.dataset.farmRuntime;
32
+ if (!boot || !src) {
33
+ return Promise.reject(new Error("The boot script has no data-farm-runtime attribute."));
34
+ }
35
+ return new Promise((resolve, reject) => {
36
+ const script = document.createElement("script");
37
+ script.type = "module";
38
+ script.src = src;
39
+ if (boot.nonce) script.nonce = boot.nonce;
40
+ script.addEventListener("load", () => resolve(), { once: true });
41
+ script.addEventListener(
42
+ "error",
43
+ () => reject(new Error(`The client runtime at ${src} failed to load.`)),
44
+ { once: true }
45
+ );
46
+ document.head.append(script);
47
+ });
48
+ }
49
+ function startFarmIslandsBoot(load = loadFarmClientEntry) {
50
+ const queue = window.__FARM_PREHYDRATION_CLICK_QUEUE__ ?? (window.__FARM_PREHYDRATION_CLICK_QUEUE__ = []);
51
+ const cleanups = [];
52
+ let loading;
53
+ const script = document.querySelector("script[data-farm-runtime]");
54
+ const rootId = script?.dataset.farmRoot;
55
+ const root = rootId ? document.getElementById(rootId) : null;
56
+ const release = () => {
57
+ for (const cleanup of cleanups.splice(0)) cleanup();
58
+ };
59
+ const start = () => {
60
+ if (!loading) {
61
+ loading = load().then(release, (error) => {
62
+ release();
63
+ throw error;
64
+ });
65
+ loading.catch((error) => {
66
+ console.error("[Farm.js] The client runtime failed to load.", error);
67
+ });
68
+ }
69
+ return loading;
70
+ };
71
+ const listen = (type, handler, capture) => {
72
+ document.addEventListener(type, handler, capture);
73
+ cleanups.push(() => document.removeEventListener(type, handler, capture));
74
+ };
75
+ const hold = (event, target, kind) => {
76
+ event.preventDefault();
77
+ event.stopImmediatePropagation();
78
+ if (!queue.some((item) => item.target === target)) {
79
+ queue.push({ target, kind, createdAt: Date.now() });
80
+ document.dispatchEvent(
81
+ new CustomEvent("farm:island-interaction", { detail: { target, kind } })
82
+ );
83
+ }
84
+ void start();
85
+ };
86
+ listen(
87
+ "click",
88
+ (event) => {
89
+ const click = event;
90
+ if (click.defaultPrevented || click.button !== 0 || isModified(click)) return;
91
+ const target = click.target instanceof Element ? heldClickTarget(click.target) : null;
92
+ if (!target || !pendingIsland(target, root)) return;
93
+ hold(event, target, "click");
94
+ },
95
+ true
96
+ );
97
+ listen(
98
+ "submit",
99
+ (event) => {
100
+ const form = event.target;
101
+ if (event.defaultPrevented || !(form instanceof Element) || form.nodeName !== "FORM") return;
102
+ if (pendingIsland(form, root)) hold(event, form, "submit");
103
+ },
104
+ true
105
+ );
106
+ const observe = (event) => {
107
+ const target = event.target;
108
+ if (!(target instanceof Element)) return;
109
+ if (routedLink(target)) void start();
110
+ else if (event.type !== "mouseover" && (pendingIsland(target, root) || target.closest("form"))) {
111
+ void start();
112
+ }
113
+ };
114
+ for (const type of ["pointerdown", "focusin", "mouseover"]) listen(type, observe, true);
115
+ listen(
116
+ "click",
117
+ (event) => {
118
+ const click = event;
119
+ if (click.defaultPrevented || click.button !== 0 || isModified(click)) return;
120
+ const anchor = routedLink(click.target);
121
+ if (!anchor) return;
122
+ click.preventDefault();
123
+ start().then(
124
+ () => {
125
+ if (anchor.isConnected) {
126
+ anchor.dispatchEvent(new MouseEvent("click", { bubbles: true, cancelable: true }));
127
+ } else location.assign(anchor.href);
128
+ },
129
+ () => location.assign(anchor.href)
130
+ );
131
+ },
132
+ false
133
+ );
134
+ const visibility = typeof IntersectionObserver === "function" ? new IntersectionObserver(
135
+ (entries) => {
136
+ if (entries.some((entry) => entry.isIntersecting)) void start();
137
+ },
138
+ { rootMargin: FARM_ISLANDS_BOOT_VISIBLE_MARGIN }
139
+ ) : null;
140
+ if (visibility) cleanups.push(() => visibility.disconnect());
141
+ let idle = false;
142
+ const startWhenIdle = () => {
143
+ if (idle) return;
144
+ idle = true;
145
+ const idleWindow = window;
146
+ if (typeof idleWindow.requestIdleCallback === "function") {
147
+ const handle = idleWindow.requestIdleCallback(() => void start(), { timeout: 2e3 });
148
+ cleanups.push(() => idleWindow.cancelIdleCallback?.(handle));
149
+ } else {
150
+ const handle = window.setTimeout(() => void start(), 1);
151
+ cleanups.push(() => window.clearTimeout(handle));
152
+ }
153
+ };
154
+ const parsedVisible = [];
155
+ const observeVisible = (island) => {
156
+ const targets = island.getClientRects().length > 0 ? [island] : Array.from(island.children);
157
+ if (!visibility || targets.length === 0) void start();
158
+ else for (const target of targets) visibility.observe(target);
159
+ };
160
+ const considerIsland = (island) => {
161
+ if (island.parentElement?.closest(ISLAND)) return;
162
+ const strategy = island.getAttribute("strategy");
163
+ if (strategy === "interaction") return;
164
+ if (strategy === "idle") startWhenIdle();
165
+ else if (strategy !== "visible") void start();
166
+ else if (document.readyState === "loading") parsedVisible.push(island);
167
+ else observeVisible(island);
168
+ };
169
+ const consider = (node) => {
170
+ if (loading) return;
171
+ if (node.nodeType === Node.COMMENT_NODE) {
172
+ const data = node.data;
173
+ if (data === "$?" || data === "$!") void start();
174
+ } else if (node instanceof Element) {
175
+ if (node.matches(ISLAND)) considerIsland(node);
176
+ for (const island of Array.from(node.querySelectorAll(ISLAND))) considerIsland(island);
177
+ }
178
+ };
179
+ const comments = document.createTreeWalker(document, NodeFilter.SHOW_COMMENT);
180
+ while (!loading && comments.nextNode()) consider(comments.currentNode);
181
+ consider(document.documentElement);
182
+ if (rootId && !root) void start();
183
+ else if (root && !loading) {
184
+ const strategy = script?.dataset.farmRootStrategy;
185
+ if (strategy === "idle") startWhenIdle();
186
+ else if (strategy === "visible") observeVisible(root);
187
+ else if (strategy !== "interaction") void start();
188
+ }
189
+ if (!loading && document.readyState === "loading") {
190
+ const observer = new MutationObserver((records) => {
191
+ for (const record of records) {
192
+ for (const node of Array.from(record.addedNodes)) consider(node);
193
+ }
194
+ });
195
+ observer.observe(document, { childList: true, subtree: true });
196
+ const parsed = () => {
197
+ observer.disconnect();
198
+ for (const island of parsedVisible.splice(0)) if (!loading) observeVisible(island);
199
+ };
200
+ document.addEventListener("DOMContentLoaded", parsed, { once: true });
201
+ cleanups.push(() => {
202
+ observer.disconnect();
203
+ document.removeEventListener("DOMContentLoaded", parsed);
204
+ });
205
+ }
206
+ }
207
+ export {
208
+ FARM_ISLANDS_BOOT_REPLAYABLE_SELECTOR,
209
+ FARM_ISLANDS_BOOT_VISIBLE_MARGIN,
210
+ startFarmIslandsBoot
211
+ };
@@ -3,7 +3,7 @@
3
3
  var _chunkSGBNF56Scjs = require('../chunk-SGBNF56S.cjs');
4
4
 
5
5
 
6
- var _chunkGUJTVM36cjs = require('../chunk-GUJTVM36.cjs');
6
+ var _chunk2FRLSDBTcjs = require('../chunk-2FRLSDBT.cjs');
7
7
  require('../chunk-BTZ5O6VM.cjs');
8
8
 
9
9
  // src/product-telemetry.ts
@@ -55,7 +55,7 @@ function createFarmProductionSiteReporter(options) {
55
55
  schemaVersion: FARM_PRODUCTION_SITE_TELEMETRY_SCHEMA_VERSION,
56
56
  eventType: FARM_PRODUCTION_SITE_ATTESTATION_EVENT_TYPE,
57
57
  packageName: FARM_PRODUCTION_SITE_TELEMETRY_PACKAGE_NAME,
58
- packageVersion: sanitizeDetail(_chunkGUJTVM36cjs.FARM_VERSION, "unknown"),
58
+ packageVersion: sanitizeDetail(_chunk2FRLSDBTcjs.FARM_VERSION, "unknown"),
59
59
  renderer: sanitizeDetail(options.renderer, "custom"),
60
60
  deployTarget: sanitizeDetail(options.deployTarget, "custom")
61
61
  };
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-CSLUBKGG.mjs";
4
4
  import {
5
5
  FARM_VERSION
6
- } from "../chunk-6CYQQQGR.mjs";
6
+ } from "../chunk-HPWB57PZ.mjs";
7
7
  import "../chunk-Y6FXYEAI.mjs";
8
8
 
9
9
  // src/product-telemetry.ts