@farm.js/core 0.1.82 → 0.1.84

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 (253) hide show
  1. package/dist/{agent-mcp.d-C2Su3x4D.d.ts → agent-mcp.d-7uKdOttc.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-Yak-LqRd.d.mts → agent-mcp.d-LChlR2au.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +2 -1
  4. package/dist/agent-runtime.d.ts +2 -1
  5. package/dist/{analyzer-RPU2KG4J.mjs → analyzer-7RNO3XKC.mjs} +2 -2
  6. package/dist/analyzer-PFKA5NI6.cjs +17 -0
  7. package/dist/api/node.d.mts +4 -3
  8. package/dist/api/node.d.ts +4 -3
  9. package/dist/api/route-manager.d.mts +4 -3
  10. package/dist/api/route-manager.d.ts +4 -3
  11. package/dist/api/runtime.d.mts +3 -2
  12. package/dist/api/runtime.d.ts +3 -2
  13. package/dist/api.d.mts +5 -4
  14. package/dist/api.d.ts +5 -4
  15. package/dist/{app-manifest.d-DZyXaICz.d.ts → app-manifest.d-CRp21oAz.d.ts} +1 -1
  16. package/dist/{app-manifest.d-BcyOFMrg.d.mts → app-manifest.d-QMdmqqCr.d.mts} +1 -1
  17. package/dist/app-markdown.d.mts +3 -2
  18. package/dist/app-markdown.d.ts +3 -2
  19. package/dist/{app.d-CIoXsAbN.d.ts → app.d-CVPu_hoD.d.ts} +34 -4
  20. package/dist/{app.d-C0ePpuaG.d.mts → app.d-eSm7jgoc.d.mts} +34 -4
  21. package/dist/{chunk-B2PGVHBG.cjs → chunk-22BTYPIX.cjs} +4 -4
  22. package/dist/{chunk-BCTHOQPP.cjs → chunk-3OKSEJ33.cjs} +98 -10
  23. package/dist/{chunk-QSMUMK7Y.mjs → chunk-3WM7VBGW.mjs} +2 -2
  24. package/dist/{chunk-XMHERKSE.mjs → chunk-42IBGQTN.mjs} +5 -12
  25. package/dist/{chunk-RMPUEH5T.cjs → chunk-57EEWWUS.cjs} +2 -2
  26. package/dist/{chunk-Q2VOT3K2.cjs → chunk-5I4ZGKP2.cjs} +395 -333
  27. package/dist/{chunk-TPA2PV5J.mjs → chunk-5V6HSJFG.mjs} +24 -1
  28. package/dist/{chunk-RMLR5RMH.mjs → chunk-BCCCPFHQ.mjs} +92 -4
  29. package/dist/{chunk-LM2ZDNDD.cjs → chunk-BOEDYXAX.cjs} +30 -25
  30. package/dist/{chunk-NRCKBDYP.mjs → chunk-BRDGINBB.mjs} +153 -47
  31. package/dist/chunk-BUQR7KKO.mjs +17 -0
  32. package/dist/{chunk-63ZE6B6M.mjs → chunk-BZY3SRRD.mjs} +1 -1
  33. package/dist/{chunk-724WT3NI.mjs → chunk-CRE642TW.mjs} +1 -1
  34. package/dist/{chunk-JK26IMT7.cjs → chunk-CVZY4TLW.cjs} +1 -1
  35. package/dist/{chunk-ZIZRIZLP.mjs → chunk-CWUQBECF.mjs} +3 -1
  36. package/dist/{chunk-DAXU2NBE.mjs → chunk-DFDQGHPU.mjs} +104 -42
  37. package/dist/{chunk-AIPZDBP6.cjs → chunk-DSWSDDP2.cjs} +844 -553
  38. package/dist/{chunk-DRO3NXA3.cjs → chunk-EBSL5TW7.cjs} +203 -93
  39. package/dist/{chunk-CJDBTTLB.mjs → chunk-EDBIBO67.mjs} +18 -13
  40. package/dist/{chunk-BBVLOEND.cjs → chunk-F7JVO3OZ.cjs} +4 -4
  41. package/dist/chunk-FZ7OUN5M.cjs +30 -0
  42. package/dist/chunk-GLNVLCUH.cjs +426 -0
  43. package/dist/{chunk-5MMKNW7Q.cjs → chunk-H7REG7OX.cjs} +15 -8
  44. package/dist/{chunk-N2EFMN2K.cjs → chunk-HOQ2MYBJ.cjs} +10 -10
  45. package/dist/{chunk-OP5VI4TP.mjs → chunk-I5CVJ24H.mjs} +1 -1
  46. package/dist/{chunk-I4DR3HCH.mjs → chunk-INU4K4U4.mjs} +5 -5
  47. package/dist/{chunk-4X7LSGM6.mjs → chunk-IRJSZAJB.mjs} +1 -1
  48. package/dist/{chunk-EX6ZSN5P.cjs → chunk-IZYFP7IN.cjs} +17 -24
  49. package/dist/chunk-J6RFB324.cjs +17 -0
  50. package/dist/{chunk-47I2MYIR.mjs → chunk-KXVMWLTC.mjs} +484 -193
  51. package/dist/{chunk-UVV3I5QA.cjs → chunk-L2GUEYHR.cjs} +29 -6
  52. package/dist/{chunk-VMBIKDKW.cjs → chunk-L3BSHASB.cjs} +6 -4
  53. package/dist/chunk-L5HDCDFT.mjs +426 -0
  54. package/dist/{chunk-GXLNARPO.mjs → chunk-M5XU22PQ.mjs} +1 -1
  55. package/dist/chunk-M6AJZ4XR.mjs +30 -0
  56. package/dist/chunk-MAPHNGTF.cjs +98 -0
  57. package/dist/{chunk-RE5E2G5S.cjs → chunk-MNUYXZV7.cjs} +2 -18
  58. package/dist/{chunk-C3VCYOU4.mjs → chunk-MUUDHWQZ.mjs} +1 -1
  59. package/dist/{chunk-YSU3WCW6.mjs → chunk-MYSH5Y4E.mjs} +1 -1
  60. package/dist/{chunk-OMB7UGVW.mjs → chunk-NLHSKKTT.mjs} +14 -9
  61. package/dist/{chunk-ARORZ3MH.cjs → chunk-OFVBMS6I.cjs} +439 -333
  62. package/dist/{chunk-5MUFW5UU.cjs → chunk-OP7BIEUW.cjs} +2 -2
  63. package/dist/{chunk-I4WZRG73.mjs → chunk-RB5IGN3N.mjs} +13 -6
  64. package/dist/chunk-RJBUI5AN.mjs +18 -0
  65. package/dist/chunk-RQ6XX5IN.mjs +98 -0
  66. package/dist/{chunk-EJCVG25Z.mjs → chunk-S3R4JDRO.mjs} +17 -9
  67. package/dist/{chunk-WFVSAT7Y.cjs → chunk-T7HGXF7D.cjs} +3 -3
  68. package/dist/{chunk-HHQEKLZL.cjs → chunk-USMRAC72.cjs} +36 -31
  69. package/dist/{chunk-SM2SYWAR.cjs → chunk-XJDB564A.cjs} +18 -10
  70. package/dist/{chunk-EL2Z6YFZ.mjs → chunk-XLULEFRW.mjs} +180 -70
  71. package/dist/{chunk-6BPFIYGY.cjs → chunk-YU6VL7H5.cjs} +3 -3
  72. package/dist/{chunk-CD5Z7RR5.cjs → chunk-Z37PDUJR.cjs} +4 -4
  73. package/dist/{cli-runtime.d-Hnvvadz7.d.mts → cli-runtime.d-C7aMfoTq.d.mts} +8 -6
  74. package/dist/{cli-runtime.d-I0MphTbc.d.ts → cli-runtime.d-DaElKjaL.d.ts} +8 -6
  75. package/dist/{client-component.d-DapRqtSC.d.mts → client-component.d-DLMCzmUx.d.mts} +1 -1
  76. package/dist/{client-component.d-5QEvtJsg.d.ts → client-component.d-DLknFP8l.d.ts} +1 -1
  77. package/dist/{client-plugins.d-DcmDzcSC.d.ts → client-plugins.d-BVXjyIkY.d.ts} +14 -0
  78. package/dist/{client-plugins.d-C1WM3ieD.d.mts → client-plugins.d-BwKwuO_0.d.mts} +14 -0
  79. package/dist/client-plugins.d.mts +2 -1
  80. package/dist/client-plugins.d.ts +2 -1
  81. package/dist/client.cjs +4 -3
  82. package/dist/client.d.mts +10 -9
  83. package/dist/client.d.ts +10 -9
  84. package/dist/client.mjs +3 -2
  85. package/dist/config.d.mts +2 -1
  86. package/dist/config.d.ts +2 -1
  87. package/dist/desktop.d.mts +3 -2
  88. package/dist/desktop.d.ts +3 -2
  89. package/dist/{devtools-5B7NZE6F.cjs → devtools-4SVIRV4P.cjs} +7 -7
  90. package/dist/{devtools-C5GXZZ7E.mjs → devtools-MWQA5LVN.mjs} +5 -5
  91. package/dist/docs.cjs +10 -9
  92. package/dist/docs.d.mts +15 -6
  93. package/dist/docs.d.ts +15 -6
  94. package/dist/docs.mjs +9 -8
  95. package/dist/environment/vite.cjs +5 -5
  96. package/dist/environment/vite.d.mts +1 -0
  97. package/dist/environment/vite.d.ts +1 -0
  98. package/dist/environment/vite.mjs +4 -4
  99. package/dist/{generate-route-types.d-CaGMIaNI.d.mts → generate-route-types.d-BFOMM8Ef.d.mts} +3 -0
  100. package/dist/{generate-route-types.d-B76M5R11.d.ts → generate-route-types.d-C2m8myHb.d.ts} +3 -0
  101. package/dist/{handler.d-B8bPCBzl.d.mts → handler.d-BKTWzzNA.d.mts} +1 -1
  102. package/dist/{handler.d-Cliwo6Nu.d.ts → handler.d-Dzpyg3-N.d.ts} +1 -1
  103. package/dist/{headers.d-CVwSpSGX.d.mts → headers.d-5opjyhXw.d.mts} +1 -1
  104. package/dist/{headers.d-C_btqjV6.d.ts → headers.d-PZyXcDAH.d.ts} +1 -1
  105. package/dist/index.cjs +32 -29
  106. package/dist/{index.d-DFuMZk9-.d.mts → index.d-C0Mie66f.d.mts} +1 -1
  107. package/dist/{index.d-hOEbMcLk.d.ts → index.d-DV2q-0mE.d.ts} +1 -1
  108. package/dist/index.d.mts +26 -25
  109. package/dist/index.d.ts +26 -25
  110. package/dist/index.mjs +32 -29
  111. package/dist/integrations/orm.d.mts +2 -1
  112. package/dist/integrations/orm.d.ts +2 -1
  113. package/dist/integrations.d.mts +2 -1
  114. package/dist/integrations.d.ts +2 -1
  115. package/dist/internal/app-markdown-runtime.d.mts +3 -2
  116. package/dist/internal/app-markdown-runtime.d.ts +3 -2
  117. package/dist/internal/build-runtime.cjs +28 -27
  118. package/dist/internal/build-runtime.d.mts +5 -4
  119. package/dist/internal/build-runtime.d.ts +5 -4
  120. package/dist/internal/build-runtime.mjs +27 -26
  121. package/dist/internal/cli-runtime.cjs +9 -9
  122. package/dist/internal/cli-runtime.d.mts +8 -7
  123. package/dist/internal/cli-runtime.d.ts +8 -7
  124. package/dist/internal/cli-runtime.mjs +8 -8
  125. package/dist/internal/client-error-overlay.cjs +4 -4
  126. package/dist/internal/client-error-overlay.mjs +1 -1
  127. package/dist/internal/client-runtime.d.mts +8 -42
  128. package/dist/internal/client-runtime.d.ts +8 -42
  129. package/dist/internal/compression-runtime.d.mts +2 -1
  130. package/dist/internal/compression-runtime.d.ts +2 -1
  131. package/dist/internal/config-runtime.cjs +7 -7
  132. package/dist/internal/config-runtime.d.mts +6 -5
  133. package/dist/internal/config-runtime.d.ts +6 -5
  134. package/dist/internal/config-runtime.mjs +6 -6
  135. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  136. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  137. package/dist/internal/islands-action-client.cjs +18 -0
  138. package/dist/internal/islands-action-client.d.mts +18 -0
  139. package/dist/internal/islands-action-client.d.ts +18 -0
  140. package/dist/internal/islands-action-client.mjs +18 -0
  141. package/dist/internal/islands-runtime.cjs +3 -8
  142. package/dist/internal/islands-runtime.mjs +4 -9
  143. package/dist/internal/islx-actions-client.cjs +4 -3
  144. package/dist/internal/islx-actions-client.mjs +3 -2
  145. package/dist/internal/islx-actions-server.d.mts +0 -2
  146. package/dist/internal/islx-actions-server.d.ts +0 -2
  147. package/dist/internal/islx-client.cjs +13 -1
  148. package/dist/internal/islx-client.d.mts +11 -0
  149. package/dist/internal/islx-client.d.ts +11 -0
  150. package/dist/internal/islx-client.mjs +14 -0
  151. package/dist/internal/metadata-image-runtime.d.mts +1 -0
  152. package/dist/internal/metadata-image-runtime.d.ts +1 -0
  153. package/dist/internal/native-server-fns.cjs +4 -4
  154. package/dist/internal/native-server-fns.mjs +3 -3
  155. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  156. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  157. package/dist/internal/production-runtime.cjs +13 -13
  158. package/dist/internal/production-runtime.d.mts +11 -11
  159. package/dist/internal/production-runtime.d.ts +11 -11
  160. package/dist/internal/production-runtime.mjs +19 -19
  161. package/dist/internal/renderer-islands.cjs +47 -0
  162. package/dist/internal/renderer-islands.d.mts +32 -0
  163. package/dist/internal/renderer-islands.d.ts +32 -0
  164. package/dist/internal/renderer-islands.mjs +47 -0
  165. package/dist/internal/spa-router.d.mts +3 -3
  166. package/dist/internal/spa-router.d.ts +3 -3
  167. package/dist/internal/start-manifest.d.mts +2 -1
  168. package/dist/internal/start-manifest.d.ts +2 -1
  169. package/dist/island-runtime.d-BA7EPo1v.d.ts +38 -0
  170. package/dist/island-runtime.d-BBS_YUSX.d.mts +38 -0
  171. package/dist/markdown.d.mts +2 -1
  172. package/dist/markdown.d.ts +2 -1
  173. package/dist/middleware.d.mts +2 -1
  174. package/dist/middleware.d.ts +2 -1
  175. package/dist/mobile.d.mts +6 -3
  176. package/dist/mobile.d.ts +6 -3
  177. package/dist/{mount.d-DLeYxeRR.d.mts → mount.d-CZ_qL1iS.d.mts} +1 -1
  178. package/dist/{mount.d-CAovYKfs.d.ts → mount.d-gWul1GA1.d.ts} +1 -1
  179. package/dist/{navigation-delegate.d-Chv93QS6.d.mts → navigation-delegate.d-BBTzhJLj.d.mts} +1 -1
  180. package/dist/{navigation-delegate.d-BLM-8Q3Z.d.ts → navigation-delegate.d-BZsYEAet.d.ts} +1 -1
  181. package/dist/navigation.d.mts +5 -5
  182. package/dist/navigation.d.ts +5 -5
  183. package/dist/plugin.cjs +23 -22
  184. package/dist/plugin.d.mts +6 -6
  185. package/dist/plugin.d.ts +6 -6
  186. package/dist/plugin.mjs +22 -21
  187. package/dist/{render-plan.d-BSTjTH8h.d.ts → render-plan.d-AaJsYPX-.d.ts} +1 -1
  188. package/dist/{render-plan.d-CK5Lggyb.d.mts → render-plan.d-bnWxS12w.d.mts} +1 -1
  189. package/dist/renderer-client.cjs +6 -5
  190. package/dist/renderer-client.d.mts +8 -7
  191. package/dist/renderer-client.d.ts +8 -7
  192. package/dist/renderer-client.mjs +2 -1
  193. package/dist/renderer.cjs +12 -2
  194. package/dist/renderer.d.mts +167 -4
  195. package/dist/renderer.d.ts +167 -4
  196. package/dist/renderer.mjs +11 -1
  197. package/dist/{request.d-BhggxQf3.d.mts → request.d-C2HOn3Hi.d.mts} +1 -1
  198. package/dist/{request.d-CyJS9bjm.d.ts → request.d-CAeitOG1.d.ts} +1 -1
  199. package/dist/request.d.mts +3 -2
  200. package/dist/request.d.ts +3 -2
  201. package/dist/{route-rendering.d-BLPPmI5I.d.ts → route-rendering.d-A1dIkUK5.d.ts} +1 -1
  202. package/dist/{route-rendering.d-CUpG2mZJ.d.mts → route-rendering.d-CYA-ulnX.d.mts} +1 -1
  203. package/dist/{router.d-2NQM1Kgw.d.mts → router.d-8lxnzlkr.d.mts} +1 -1
  204. package/dist/{router.d-0X2Ki6rf.d.ts → router.d-A_Yt6jYz.d.ts} +1 -1
  205. package/dist/{routes.d-CCccJRrp.d.mts → routes.d-BWvpUoYu.d.mts} +1 -1
  206. package/dist/{routes.d-b7khoRoU.d.ts → routes.d-D7RWvfqL.d.ts} +1 -1
  207. package/dist/routes.d.mts +2 -1
  208. package/dist/routes.d.ts +2 -1
  209. package/dist/{rsc-pipeline-5AOF64FL.cjs → rsc-pipeline-OWBEZ7HB.cjs} +10 -10
  210. package/dist/{rsc-pipeline-DNRLYOJ7.mjs → rsc-pipeline-UT3Z2GDO.mjs} +9 -9
  211. package/dist/{runtime-EHG2FRXZ.mjs → runtime-F5I3WY3B.mjs} +12 -12
  212. package/dist/{runtime-ZVHG5SRB.cjs → runtime-SRMQ46SK.cjs} +15 -15
  213. package/dist/{runtime.d-CXuwkUgr.d.ts → runtime.d-BPyvWrgQ.d.ts} +1 -1
  214. package/dist/{runtime.d-CaFXcu_Q.d.mts → runtime.d-C_rZ9_DD.d.mts} +1 -1
  215. package/dist/{server-components-status.d-Cp7zvBm5.d.mts → server-components-status.d-BpxiEMQE.d.mts} +1 -1
  216. package/dist/{server-components-status.d-BdeFD8ZH.d.ts → server-components-status.d-C2UEKJn7.d.ts} +1 -1
  217. package/dist/server-plugins.d.mts +4 -3
  218. package/dist/server-plugins.d.ts +4 -3
  219. package/dist/server-query-call.d-rVM_lsYk.d.mts +15 -0
  220. package/dist/server-query-call.d-rVM_lsYk.d.ts +15 -0
  221. package/dist/server-query-client.cjs +5 -3
  222. package/dist/server-query-client.d.mts +3 -2
  223. package/dist/server-query-client.d.ts +3 -2
  224. package/dist/server-query-client.mjs +5 -3
  225. package/dist/{server-query-runtime.d-DXRNhX_3.d.ts → server-query-runtime.d-BlHd90D0.d.ts} +2 -8
  226. package/dist/{server-query-runtime.d-aP52iuL5.d.mts → server-query-runtime.d-CCLGkQtE.d.mts} +2 -8
  227. package/dist/server.cjs +52 -52
  228. package/dist/server.d.mts +12 -12
  229. package/dist/server.d.ts +12 -12
  230. package/dist/server.mjs +30 -30
  231. package/dist/{spa-router.d-l3G38xHa.d.mts → spa-router.d-BD-6WX1R.d.mts} +2 -2
  232. package/dist/{spa-router.d-Bjgl-Osi.d.ts → spa-router.d-Cw5i_15e.d.ts} +2 -2
  233. package/dist/{ssg.d-DDca17Lc.d.ts → ssg.d-Bifiq0EL.d.ts} +2 -2
  234. package/dist/{ssg.d-RnlHOqUL.d.mts → ssg.d-CCE9aob5.d.mts} +2 -2
  235. package/dist/{store-core.d-BaOUOPf7.d.ts → store-core.d-5tVn5vi1.d.ts} +3 -3
  236. package/dist/{store-core.d-BZjuC6Zc.d.mts → store-core.d-BN2MxSG9.d.mts} +3 -3
  237. package/dist/testing.d.mts +2 -1
  238. package/dist/testing.d.ts +2 -1
  239. package/dist/{utils.d-D8TWmpWo.d.ts → utils.d-BUjpSNIO.d.ts} +1 -1
  240. package/dist/{utils.d-tdzw0_zQ.d.mts → utils.d-wGPLeVbq.d.mts} +1 -1
  241. package/dist/version.cjs +2 -2
  242. package/dist/version.mjs +1 -1
  243. package/dist/vite.cjs +23 -22
  244. package/dist/vite.d.mts +12 -6
  245. package/dist/vite.d.ts +12 -6
  246. package/dist/vite.mjs +22 -21
  247. package/package.json +13 -3
  248. package/dist/analyzer-LV23T6QN.cjs +0 -17
  249. package/dist/chunk-4QENVMG7.mjs +0 -34
  250. package/dist/chunk-AUFEM3FB.mjs +0 -229
  251. package/dist/chunk-S7WZUK3B.cjs +0 -229
  252. package/dist/{chunk-NEKO3HM2.cjs → chunk-4B6YJ5DS.cjs} +2 -2
  253. package/dist/{chunk-CA2HBLXP.mjs → chunk-4EEAPBNV.mjs} +3 -3
package/dist/plugin.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  farmPlugin
3
- } from "./chunk-DAXU2NBE.mjs";
3
+ } from "./chunk-DFDQGHPU.mjs";
4
4
  import "./chunk-7V5M43ND.mjs";
5
5
  import "./chunk-ZIEO3DQ3.mjs";
6
6
  import "./chunk-UD6KTSJS.mjs";
7
7
  import "./chunk-RDSHEHBA.mjs";
8
- import "./chunk-NRCKBDYP.mjs";
8
+ import "./chunk-BRDGINBB.mjs";
9
9
  import "./chunk-MO4UTDQ6.mjs";
10
10
  import {
11
11
  FARM_NODE_RESPONSE_END_PENDING,
@@ -13,52 +13,53 @@ import {
13
13
  PluginManager,
14
14
  definePlugin
15
15
  } from "./chunk-IVP5Q4BX.mjs";
16
- import "./chunk-ZIZRIZLP.mjs";
17
- import "./chunk-YSU3WCW6.mjs";
16
+ import "./chunk-SMUW7UST.mjs";
17
+ import "./chunk-UB7RVEMX.mjs";
18
+ import "./chunk-CWUQBECF.mjs";
19
+ import "./chunk-MYSH5Y4E.mjs";
18
20
  import "./chunk-YHHOTKUT.mjs";
19
- import "./chunk-AUFEM3FB.mjs";
21
+ import "./chunk-L5HDCDFT.mjs";
20
22
  import "./chunk-HQ2VAJLW.mjs";
21
23
  import "./chunk-UTUS6JUH.mjs";
22
- import "./chunk-SMUW7UST.mjs";
23
- import "./chunk-UB7RVEMX.mjs";
24
- import "./chunk-CA2HBLXP.mjs";
24
+ import "./chunk-RQ6XX5IN.mjs";
25
+ import "./chunk-M5XU22PQ.mjs";
26
+ import "./chunk-EZYKV24V.mjs";
27
+ import "./chunk-4EEAPBNV.mjs";
25
28
  import "./chunk-LLZSYFOM.mjs";
26
29
  import "./chunk-UUMKLGUU.mjs";
27
30
  import "./chunk-ZXDX7VYZ.mjs";
28
- import "./chunk-V7HNYR76.mjs";
29
- import "./chunk-GXLNARPO.mjs";
30
- import "./chunk-QSMUMK7Y.mjs";
31
+ import "./chunk-3WM7VBGW.mjs";
31
32
  import "./chunk-HR4N2K4V.mjs";
32
- import "./chunk-4X7LSGM6.mjs";
33
- import "./chunk-EZYKV24V.mjs";
33
+ import "./chunk-V7HNYR76.mjs";
34
+ import "./chunk-IRJSZAJB.mjs";
35
+ import "./chunk-X3EFRVXY.mjs";
34
36
  import "./chunk-2PFGA6PB.mjs";
35
37
  import "./chunk-L4RTTTVE.mjs";
36
38
  import "./chunk-GNZIAJGB.mjs";
37
39
  import "./chunk-XAXTTBUT.mjs";
38
40
  import "./chunk-INKVDO42.mjs";
39
- import "./chunk-X3EFRVXY.mjs";
40
41
  import "./chunk-K6HIIWUB.mjs";
41
42
  import "./chunk-YFTGIHNC.mjs";
42
43
  import "./chunk-HZOMT5DY.mjs";
43
- import "./chunk-EL2Z6YFZ.mjs";
44
+ import "./chunk-XLULEFRW.mjs";
44
45
  import "./chunk-D2VAANBS.mjs";
45
46
  import "./chunk-S32PDOLO.mjs";
46
47
  import "./chunk-ZEWWZJPZ.mjs";
47
- import "./chunk-EJCVG25Z.mjs";
48
+ import "./chunk-S3R4JDRO.mjs";
48
49
  import "./chunk-NRNAHZ57.mjs";
49
- import "./chunk-TPA2PV5J.mjs";
50
+ import "./chunk-5V6HSJFG.mjs";
50
51
  import "./chunk-YVVY276M.mjs";
51
52
  import "./chunk-XR2ZIBQK.mjs";
52
53
  import {
53
54
  resolveFarmDevtoolsConfig
54
55
  } from "./chunk-CU5SYTJG.mjs";
55
56
  import "./chunk-NQ3Y6E2T.mjs";
56
- import "./chunk-22W4FNTG.mjs";
57
57
  import "./chunk-SQ5O7I3L.mjs";
58
58
  import "./chunk-XGL42MQ7.mjs";
59
- import "./chunk-4QENVMG7.mjs";
59
+ import "./chunk-22W4FNTG.mjs";
60
+ import "./chunk-RJBUI5AN.mjs";
60
61
  import "./chunk-Z3RM3VA2.mjs";
61
- import "./chunk-RMLR5RMH.mjs";
62
+ import "./chunk-BCCCPFHQ.mjs";
62
63
  import "./chunk-AOIUYHPH.mjs";
63
64
  import "./chunk-7VJXYB6S.mjs";
64
65
  import "./chunk-NLATR3T3.mjs";
@@ -125,7 +126,7 @@ import "./chunk-YT2ZMLXK.mjs";
125
126
  import "./chunk-D2LCAV6L.mjs";
126
127
  import "./chunk-H3ASZDT7.mjs";
127
128
  import "./chunk-EILUVBKS.mjs";
128
- import "./chunk-OP5VI4TP.mjs";
129
+ import "./chunk-I5CVJ24H.mjs";
129
130
  import "./chunk-QPNVDSFZ.mjs";
130
131
  import "./chunk-GYMGK467.mjs";
131
132
  import "./chunk-5Y4GYKKH.mjs";
@@ -1,5 +1,5 @@
1
1
  import { F as FarmIslandStrategy } from './island.d-CfGru1MO.js';
2
- import './client-plugins.d-DcmDzcSC.js';
2
+ import './client-plugins.d-BVXjyIkY.js';
3
3
 
4
4
  /**
5
5
  * A build-time rendering decision consumed by the browser router.
@@ -1,5 +1,5 @@
1
1
  import { F as FarmIslandStrategy } from './island.d-CfGru1MO.mjs';
2
- import './client-plugins.d-C1WM3ieD.mjs';
2
+ import './client-plugins.d-BwKwuO_0.mjs';
3
3
 
4
4
  /**
5
5
  * A build-time rendering decision consumed by the browser router.
@@ -15,7 +15,8 @@ var _chunkN4AQNEXRcjs = require('./chunk-N4AQNEXR.cjs');
15
15
 
16
16
 
17
17
 
18
- var _chunkEX6ZSN5Pcjs = require('./chunk-EX6ZSN5P.cjs');
18
+ var _chunkIZYFP7INcjs = require('./chunk-IZYFP7IN.cjs');
19
+ require('./chunk-J6RFB324.cjs');
19
20
 
20
21
 
21
22
 
@@ -244,7 +245,7 @@ function createSubmittedFormData(form, submitter) {
244
245
  return new FormData(form);
245
246
  }
246
247
  function createRendererQuery(query, input, options = {}) {
247
- if (!_chunkEX6ZSN5Pcjs.isFarmServerQueryBrowserRuntime.call(void 0, )) {
248
+ if (!_chunkIZYFP7INcjs.isFarmServerQueryBrowserRuntime.call(void 0, )) {
248
249
  const snapshot = {
249
250
  data: void 0,
250
251
  error: null,
@@ -257,17 +258,17 @@ function createRendererQuery(query, input, options = {}) {
257
258
  getSnapshot: () => snapshot,
258
259
  subscribe: () => () => {
259
260
  },
260
- refetch: () => _chunkEX6ZSN5Pcjs.fetchServerQuery.call(void 0, query, input),
261
+ refetch: () => _chunkIZYFP7INcjs.fetchServerQuery.call(void 0, query, input),
261
262
  dispose() {
262
263
  }
263
264
  };
264
265
  }
265
266
  const cache = _chunkI2BYNELAcjs.getFarmClientDataCache.call(void 0, );
266
- const key = _chunkEX6ZSN5Pcjs.createServerQueryCallKey.call(void 0, query, input);
267
+ const key = _chunkIZYFP7INcjs.createServerQueryCallKey.call(void 0, query, input);
267
268
  const listeners = /* @__PURE__ */ new Set();
268
269
  let unsubscribeCache;
269
270
  let cleanupBrowser;
270
- const run = (force = false) => _chunkEX6ZSN5Pcjs.fetchServerQuery.call(void 0, query, input, { ...options, force });
271
+ const run = (force = false) => _chunkIZYFP7INcjs.fetchServerQuery.call(void 0, query, input, { ...options, force });
271
272
  let pendingInvalidation = false;
272
273
  const ensureStarted = () => {
273
274
  if (options.enabled === false || unsubscribeCache) return;
@@ -1,20 +1,21 @@
1
1
  import './router.mjs';
2
- export { b as FarmViewTransitionMode } from './spa-router.d-l3G38xHa.mjs';
2
+ export { b as FarmViewTransitionMode } from './spa-router.d-BD-6WX1R.mjs';
3
3
  import './client-cache.d-di_Nasxa.mjs';
4
4
  import './server-fn.mjs';
5
5
  import './server-query.mjs';
6
- import './server-query-runtime.d-aP52iuL5.mjs';
6
+ import './server-query-runtime.d-CCLGkQtE.mjs';
7
7
  import './types.d-DQnyD3VD.mjs';
8
8
  export { b as FarmI18nClientSnapshot, f as FarmI18nLocale, o as FarmTranslator } from './types.d-euATAbE4.mjs';
9
- export { D as DefaultRouteHref, m as FARM_LINK_OPTION_KEYS, n as FarmAction, o as FarmActionOptions, p as FarmActionSnapshot, q as FarmActionStatus, r as FarmActionSubmit, s as FarmClientStore, t as FarmLinkAttributes, F as FarmLinkOptions, u as FarmRendererI18n, v as FarmRendererQuery, w as FarmRendererQueryOptions, x as FarmRendererQuerySnapshot, y as FarmRendererRouter, z as FarmRendererRouterOptions, A as FarmRendererRouterSnapshot, B as FarmRendererTheme, C as FarmRouteActionTarget, L as LinkDefaultRoute, G as Store, l as StoreApi, H as StoreFields, S as StoreKeyListener, g as StoreKeysListener, h as StoreListener, i as StorePatch, j as StoreState, k as StoreValueUpdater, I as createRendererAction, J as createRendererI18n, K as createRendererQuery, M as createRendererRouter, N as createRendererTheme, O as createStore, Q as resolveLinkAttributes, T as submitRendererActionForm } from './store-core.d-BZjuC6Zc.mjs';
10
- export { F as FarmNavigationDelegate, a as FarmNavigationDelegateContext, d as delegateNavigation } from './navigation-delegate.d-Chv93QS6.mjs';
11
- import './client-plugins.d-C1WM3ieD.mjs';
9
+ export { D as DefaultRouteHref, m as FARM_LINK_OPTION_KEYS, n as FarmAction, o as FarmActionOptions, p as FarmActionSnapshot, q as FarmActionStatus, r as FarmActionSubmit, s as FarmClientStore, t as FarmLinkAttributes, F as FarmLinkOptions, u as FarmRendererI18n, v as FarmRendererQuery, w as FarmRendererQueryOptions, x as FarmRendererQuerySnapshot, y as FarmRendererRouter, z as FarmRendererRouterOptions, A as FarmRendererRouterSnapshot, B as FarmRendererTheme, C as FarmRouteActionTarget, L as LinkDefaultRoute, G as Store, l as StoreApi, H as StoreFields, S as StoreKeyListener, g as StoreKeysListener, h as StoreListener, i as StorePatch, j as StoreState, k as StoreValueUpdater, I as createRendererAction, J as createRendererI18n, K as createRendererQuery, M as createRendererRouter, N as createRendererTheme, O as createStore, Q as resolveLinkAttributes, T as submitRendererActionForm } from './store-core.d-BN2MxSG9.mjs';
10
+ export { F as FarmNavigationDelegate, a as FarmNavigationDelegateContext, d as delegateNavigation } from './navigation-delegate.d-BBTzhJLj.mjs';
11
+ import './client-plugins.d-BwKwuO_0.mjs';
12
12
  import './lifecycle.d-OtGWAvJT.mjs';
13
13
  import './route.d-ShmtqqVQ.mjs';
14
14
  import './endpoint.d-BXbBpKoh.mjs';
15
15
  import './cache.mjs';
16
16
  import './renderer.mjs';
17
17
  import './deployment.mjs';
18
+ import './island.d-CfGru1MO.mjs';
18
19
  import 'http';
19
20
  import './routing.d-D67HQmnv.mjs';
20
21
  import './types.d-C5hlNbHa.mjs';
@@ -43,5 +44,5 @@ import 'rolldown';
43
44
  import './image-config.d-ByhQ0TT7.mjs';
44
45
  import './config.d-BKIhJtmr.mjs';
45
46
  import './font.mjs';
46
- import './island.d-CfGru1MO.mjs';
47
- import './render-plan.d-CK5Lggyb.mjs';
47
+ import './render-plan.d-bnWxS12w.mjs';
48
+ import './server-query-call.d-rVM_lsYk.mjs';
@@ -1,20 +1,21 @@
1
1
  import './router.js';
2
- export { b as FarmViewTransitionMode } from './spa-router.d-Bjgl-Osi.js';
2
+ export { b as FarmViewTransitionMode } from './spa-router.d-Cw5i_15e.js';
3
3
  import './client-cache.d-Deoqq-nM.js';
4
4
  import './server-fn.js';
5
5
  import './server-query.js';
6
- import './server-query-runtime.d-DXRNhX_3.js';
6
+ import './server-query-runtime.d-BlHd90D0.js';
7
7
  import './types.d-DQnyD3VD.js';
8
8
  export { b as FarmI18nClientSnapshot, f as FarmI18nLocale, o as FarmTranslator } from './types.d-euATAbE4.js';
9
- export { D as DefaultRouteHref, m as FARM_LINK_OPTION_KEYS, n as FarmAction, o as FarmActionOptions, p as FarmActionSnapshot, q as FarmActionStatus, r as FarmActionSubmit, s as FarmClientStore, t as FarmLinkAttributes, F as FarmLinkOptions, u as FarmRendererI18n, v as FarmRendererQuery, w as FarmRendererQueryOptions, x as FarmRendererQuerySnapshot, y as FarmRendererRouter, z as FarmRendererRouterOptions, A as FarmRendererRouterSnapshot, B as FarmRendererTheme, C as FarmRouteActionTarget, L as LinkDefaultRoute, G as Store, l as StoreApi, H as StoreFields, S as StoreKeyListener, g as StoreKeysListener, h as StoreListener, i as StorePatch, j as StoreState, k as StoreValueUpdater, I as createRendererAction, J as createRendererI18n, K as createRendererQuery, M as createRendererRouter, N as createRendererTheme, O as createStore, Q as resolveLinkAttributes, T as submitRendererActionForm } from './store-core.d-BaOUOPf7.js';
10
- export { F as FarmNavigationDelegate, a as FarmNavigationDelegateContext, d as delegateNavigation } from './navigation-delegate.d-BLM-8Q3Z.js';
11
- import './client-plugins.d-DcmDzcSC.js';
9
+ export { D as DefaultRouteHref, m as FARM_LINK_OPTION_KEYS, n as FarmAction, o as FarmActionOptions, p as FarmActionSnapshot, q as FarmActionStatus, r as FarmActionSubmit, s as FarmClientStore, t as FarmLinkAttributes, F as FarmLinkOptions, u as FarmRendererI18n, v as FarmRendererQuery, w as FarmRendererQueryOptions, x as FarmRendererQuerySnapshot, y as FarmRendererRouter, z as FarmRendererRouterOptions, A as FarmRendererRouterSnapshot, B as FarmRendererTheme, C as FarmRouteActionTarget, L as LinkDefaultRoute, G as Store, l as StoreApi, H as StoreFields, S as StoreKeyListener, g as StoreKeysListener, h as StoreListener, i as StorePatch, j as StoreState, k as StoreValueUpdater, I as createRendererAction, J as createRendererI18n, K as createRendererQuery, M as createRendererRouter, N as createRendererTheme, O as createStore, Q as resolveLinkAttributes, T as submitRendererActionForm } from './store-core.d-5tVn5vi1.js';
10
+ export { F as FarmNavigationDelegate, a as FarmNavigationDelegateContext, d as delegateNavigation } from './navigation-delegate.d-BZsYEAet.js';
11
+ import './client-plugins.d-BVXjyIkY.js';
12
12
  import './lifecycle.d-OtGWAvJT.js';
13
13
  import './route.d-Cd4Fi6BA.js';
14
14
  import './endpoint.d-Dx_1k6Du.js';
15
15
  import './cache.js';
16
16
  import './renderer.js';
17
17
  import './deployment.js';
18
+ import './island.d-CfGru1MO.js';
18
19
  import 'http';
19
20
  import './routing.d-BhPgtN_S.js';
20
21
  import './types.d-C5hlNbHa.js';
@@ -43,5 +44,5 @@ import 'rolldown';
43
44
  import './image-config.d-ByhQ0TT7.js';
44
45
  import './config.d-BKIhJtmr.js';
45
46
  import './font.js';
46
- import './island.d-CfGru1MO.js';
47
- import './render-plan.d-BSTjTH8h.js';
47
+ import './render-plan.d-AaJsYPX-.js';
48
+ import './server-query-call.d-rVM_lsYk.js';
@@ -15,7 +15,8 @@ import {
15
15
  createServerQueryCallKey,
16
16
  fetchServerQuery,
17
17
  isFarmServerQueryBrowserRuntime
18
- } from "./chunk-XMHERKSE.mjs";
18
+ } from "./chunk-42IBGQTN.mjs";
19
+ import "./chunk-BUQR7KKO.mjs";
19
20
  import {
20
21
  getTheme,
21
22
  setTheme,
package/dist/renderer.cjs CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
+ var _chunkMAPHNGTFcjs = require('./chunk-MAPHNGTF.cjs');
4
+ require('./chunk-7KJJ4SBS.cjs');
3
5
 
4
6
 
5
7
 
@@ -16,7 +18,12 @@
16
18
 
17
19
 
18
20
 
19
- var _chunkBCTHOQPPcjs = require('./chunk-BCTHOQPP.cjs');
21
+
22
+
23
+
24
+
25
+ var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
26
+ require('./chunk-3BIASUGR.cjs');
20
27
  require('./chunk-UZM3PDKK.cjs');
21
28
 
22
29
 
@@ -36,4 +43,7 @@ require('./chunk-UZM3PDKK.cjs');
36
43
 
37
44
 
38
45
 
39
- exports.FARM_COMPONENT_EXTENSIONS = _chunkBCTHOQPPcjs.FARM_COMPONENT_EXTENSIONS; exports.NO_RENDERER = _chunkBCTHOQPPcjs.NO_RENDERER; exports.REACT_RENDERER = _chunkBCTHOQPPcjs.REACT_RENDERER; exports.assertFarmRendererServerModule = _chunkBCTHOQPPcjs.assertFarmRendererServerModule; exports.assertFarmRendererStreamingRuntime = _chunkBCTHOQPPcjs.assertFarmRendererStreamingRuntime; exports.defineRenderer = _chunkBCTHOQPPcjs.defineRenderer; exports.getFarmRendererCapabilities = _chunkBCTHOQPPcjs.getFarmRendererCapabilities; exports.getFarmRendererComponentExtensions = _chunkBCTHOQPPcjs.getFarmRendererComponentExtensions; exports.getFarmRendererStreamingCapabilitiesForRuntime = _chunkBCTHOQPPcjs.getFarmRendererStreamingCapabilitiesForRuntime; exports.isFarmRendererDisabled = _chunkBCTHOQPPcjs.isFarmRendererDisabled; exports.isReactRenderer = _chunkBCTHOQPPcjs.isReactRenderer; exports.loadFarmRendererVitePlugins = _chunkBCTHOQPPcjs.loadFarmRendererVitePlugins; exports.readFarmRendererWebStream = _chunkBCTHOQPPcjs.readFarmRendererWebStream; exports.resolveFarmComponentExtensions = _chunkBCTHOQPPcjs.resolveFarmComponentExtensions; exports.resolveFarmRenderer = _chunkBCTHOQPPcjs.resolveFarmRenderer; exports.resolveFarmRendererAppSetup = _chunkBCTHOQPPcjs.resolveFarmRendererAppSetup; exports.resolveFarmRendererModule = _chunkBCTHOQPPcjs.resolveFarmRendererModule;
46
+
47
+
48
+
49
+ exports.FARM_COMPONENT_EXTENSIONS = _chunk3OKSEJ33cjs.FARM_COMPONENT_EXTENSIONS; exports.NO_RENDERER = _chunk3OKSEJ33cjs.NO_RENDERER; exports.REACT_RENDERER = _chunk3OKSEJ33cjs.REACT_RENDERER; exports.assertFarmRendererServerModule = _chunk3OKSEJ33cjs.assertFarmRendererServerModule; exports.assertFarmRendererStreamingRuntime = _chunk3OKSEJ33cjs.assertFarmRendererStreamingRuntime; exports.createFarmRendererHookError = _chunk3OKSEJ33cjs.createFarmRendererHookError; exports.defineRenderer = _chunk3OKSEJ33cjs.defineRenderer; exports.getFarmRendererCapabilities = _chunk3OKSEJ33cjs.getFarmRendererCapabilities; exports.getFarmRendererComponentExtensions = _chunk3OKSEJ33cjs.getFarmRendererComponentExtensions; exports.getFarmRendererStreamingCapabilitiesForRuntime = _chunk3OKSEJ33cjs.getFarmRendererStreamingCapabilitiesForRuntime; exports.isFarmRendererDisabled = _chunk3OKSEJ33cjs.isFarmRendererDisabled; exports.isReactRenderer = _chunk3OKSEJ33cjs.isReactRenderer; exports.loadFarmRendererVitePlugins = _chunk3OKSEJ33cjs.loadFarmRendererVitePlugins; exports.readFarmRendererHydration = _chunk3OKSEJ33cjs.readFarmRendererHydration; exports.readFarmRendererWebStream = _chunk3OKSEJ33cjs.readFarmRendererWebStream; exports.resolveFarmComponentExtensions = _chunk3OKSEJ33cjs.resolveFarmComponentExtensions; exports.resolveFarmIsland = _chunkMAPHNGTFcjs.resolveFarmIsland; exports.resolveFarmRenderer = _chunk3OKSEJ33cjs.resolveFarmRenderer; exports.resolveFarmRendererAppSetup = _chunk3OKSEJ33cjs.resolveFarmRendererAppSetup; exports.resolveFarmRendererModule = _chunk3OKSEJ33cjs.resolveFarmRendererModule;
@@ -1,12 +1,73 @@
1
1
  import { FarmPresetRuntime } from './deployment.mjs';
2
+ import { F as FarmIslandStrategy } from './island.d-CfGru1MO.mjs';
3
+
4
+ /** What `withIsland` gets for each export of a client module. */
5
+ interface FarmIslandReference {
6
+ /** The module id the browser imports, as `<f-island src>` carries it. */
7
+ readonly src: string;
8
+ /** The component's export in that module. */
9
+ readonly export: string;
10
+ /** The module's `island` export, or `"load"`. A `client:*` attribute overrides it. */
11
+ readonly strategy: FarmIslandStrategy;
12
+ }
13
+ /** A script element to write: its attributes, unescaped, and its text, already escaped. */
14
+ interface FarmIslandScript {
15
+ readonly attributes: Readonly<Record<string, string>>;
16
+ /** Escaped for a script element. Write it raw, not as text the renderer escapes again. */
17
+ readonly text: string;
18
+ }
19
+ /** An island to render: the parts to write around the component, and its props. */
20
+ interface FarmResolvedIsland {
21
+ /** The component's props, without `client:*`. */
22
+ readonly props: Record<string, unknown>;
23
+ /** Value scripts to write before the island: the values this response hasn't sent yet. */
24
+ readonly values: readonly FarmIslandScript[];
25
+ /**
26
+ * The island element to write around the component: its tag (`f-island`) and its attributes
27
+ * (src, export, props id, strategy, style), unescaped.
28
+ */
29
+ readonly element: {
30
+ readonly tag: string;
31
+ readonly attributes: Readonly<Record<string, string>>;
32
+ };
33
+ /** The props script to write right after the element. */
34
+ readonly script: FarmIslandScript;
35
+ }
36
+ /**
37
+ * The attributes that set one island's strategy where a client component is used. Add them to
38
+ * the renderer's `JSX.IntrinsicAttributes`, so `<Counter client:visible />` type-checks.
39
+ */
40
+ interface FarmIslandAttributes {
41
+ "client:load"?: boolean | "";
42
+ "client:idle"?: boolean | "";
43
+ "client:visible"?: boolean | "";
44
+ "client:interaction"?: boolean | "";
45
+ }
46
+ /**
47
+ * The island a renderer writes for a client component rendered from server output, with
48
+ * `props` as written where it's used:
49
+ *
50
+ * - `client:*` is removed from the props and picks the strategy, before the module's `island`
51
+ * export (`reference.strategy`).
52
+ * - The island gets an id unique within the response.
53
+ * - The props go through islx's codec: JSON, `Date`, `Map`, `Set` and its other tagged types,
54
+ * and server actions. A value several islands of one response get is sent once.
55
+ *
56
+ * Returns `undefined` when the props can't reach the browser, such as a function that isn't a
57
+ * server action. Farm logs why, once, and the renderer renders the component without an island,
58
+ * so its server HTML stays without client code. A `client:*` attribute that isn't a strategy, has
59
+ * a value, or is one of two on the same element throws.
60
+ */
61
+ declare function resolveFarmIsland(props: Record<string, unknown>, reference: FarmIslandReference): FarmResolvedIsland | undefined;
2
62
 
3
63
  /**
4
64
  * A rendering-library integration used by Farm's compiler, server renderer,
5
65
  * and browser hydration runtime.
6
66
  *
7
- * Renderer descriptors intentionally contain module identifiers instead of
8
- * implementation functions. This keeps farm.config.ts serializable and lets
9
- * every module resolve from the application that selected the renderer.
67
+ * Code that runs in the app (the Vite plugin, the server and client modules) is named by module
68
+ * id, so every module resolves from the application that selected the renderer and Farm can import
69
+ * it from the entries it generates. Build-time hooks (`routes()` and `hydration.resolve()`) are
70
+ * methods: they run in Node while Farm scans the app, and never reach a bundle.
10
71
  */
11
72
  interface FarmRenderer {
12
73
  /** Stable public identifier used in diagnostics and generated manifests. */
@@ -56,6 +117,80 @@ interface FarmRenderer {
56
117
  * the renderer's `configureApp()`, which both renderer runtime modules must export.
57
118
  */
58
119
  appSetup?: string;
120
+ /**
121
+ * Which files are routes, and the URL each one serves. Farm calls it once per route scan, in
122
+ * `farm dev`, `farm build` and `farm generate`, and builds its one route table from the rules
123
+ * `resolve()` returns. Leave it out to keep Farm's folders: `src/app/blog/[slug]/page.tsx`.
124
+ */
125
+ routes?(context: FarmRendererRoutesContext): FarmRendererRoutes | Promise<FarmRendererRoutes>;
126
+ /** Which pages and layouts hydrate, and when, by default and in this renderer's own syntax. */
127
+ hydration?: FarmRendererHydrationOptions;
128
+ }
129
+ /** What Farm passes to a renderer's `routes()`. */
130
+ interface FarmRendererRoutesContext {
131
+ /** The project root, or a layer's root when Farm scans that layer's routes. */
132
+ readonly root: string;
133
+ /** Farm's folder rules (`about/page.tsx` → `/about`), to hand the files you don't map yourself. */
134
+ readonly defaults: FarmRendererRoutes;
135
+ }
136
+ /** A renderer's route rules. */
137
+ interface FarmRendererRoutes {
138
+ /** The directory Farm scans, relative to the root. Defaults to `src/app` (`<srcDir>/app`). */
139
+ dir?: string;
140
+ /**
141
+ * The route a file is, or `null` when it isn't one. Called once per file under `dir`, with the
142
+ * same answer expected for the same file. Farm doesn't pass its own files: `route.ts`,
143
+ * `middleware.ts`, metadata routes, and named slots stay in `src/app`.
144
+ */
145
+ resolve(file: FarmRendererRouteFile): FarmRendererRoute | null | undefined;
146
+ }
147
+ /** A file under a renderer's route `dir`. */
148
+ interface FarmRendererRouteFile {
149
+ /** Relative to `dir`, with `/` separators: `"blog/[slug].client.leaf"`. */
150
+ readonly path: string;
151
+ /** The directories between `dir` and the file: `["blog"]`, or `[]` for a file directly in it. */
152
+ readonly segments: readonly string[];
153
+ /** The file name without its extension: `"[slug].client"`. */
154
+ readonly name: string;
155
+ /** The extension, lowercase: `".leaf"`. */
156
+ readonly extension: string;
157
+ }
158
+ type FarmRendererRouteKind = "page" | "layout" | "loading" | "error" | "not-found";
159
+ /** A route a file is, with optional hydration settings for it. */
160
+ interface FarmRendererRoute extends FarmRendererHydration {
161
+ kind: FarmRendererRouteKind;
162
+ /**
163
+ * The URL, written as `src/app` folders write it: `"/"`, `"/blog/[slug]"`,
164
+ * `"/docs/[...path]"`, `"/(marketing)/pricing"`. A layout, loading or error file applies to
165
+ * its pattern and everything below it. `"not-found"` takes `"/"`: Farm renders one not-found page.
166
+ */
167
+ pattern: string;
168
+ }
169
+ /** Hydration settings for a page or layout. A field left out falls back to the next level. */
170
+ interface FarmRendererHydration {
171
+ /** Whether the page or layout hydrates, as `export const hydrate = true` says. */
172
+ hydrate?: boolean;
173
+ /** When it hydrates, as `export const island = "visible"` says. Takes effect when it hydrates. */
174
+ strategy?: FarmIslandStrategy;
175
+ }
176
+ /**
177
+ * A renderer's hydration settings. The most specific level wins: a file's own settings, then its
178
+ * route rule from `routes()`, then these defaults, then Farm's (no hydration, `"load"`).
179
+ */
180
+ interface FarmRendererHydrationOptions {
181
+ /** Whether pages hydrate by default. */
182
+ pages?: boolean;
183
+ /** Whether layouts hydrate by default. */
184
+ layouts?: boolean;
185
+ /** When a hydrating page or layout that sets no strategy hydrates. */
186
+ strategy?: FarmIslandStrategy;
187
+ /**
188
+ * Reads a page or layout's settings from its source, in this renderer's own syntax. Farm calls
189
+ * it for files with the descriptor's `componentExtensions`, before any compiler runs. Return
190
+ * nothing to leave the file to Farm's `export const hydrate` and `export const island`; a file
191
+ * that says both, and disagrees, fails the build.
192
+ */
193
+ resolve?(source: string, file: string): FarmRendererHydration | null | undefined;
59
194
  }
60
195
  type FarmRendererRuntime = Exclude<FarmPresetRuntime, "unknown">;
61
196
  interface FarmRendererStreamingPrimitives {
@@ -114,6 +249,16 @@ interface FarmRendererCapabilities {
114
249
  * hydration leaves the server's markup there.
115
250
  */
116
251
  hydrationFallback: boolean;
252
+ /**
253
+ * Whether the server module exports `withIsland`, so a client component rendered from server
254
+ * output hydrates as its own island when the app sets
255
+ * `experimental.isolatedClientHydration: "enabled"`. Experimental.
256
+ *
257
+ * Farm wraps each export of a client module in the server graph with `withIsland`, and the
258
+ * browser starts each island with the client module's `createElement` and `hydrateRoot`.
259
+ * Without it, those apps take the path they take today.
260
+ */
261
+ islands: boolean;
117
262
  }
118
263
  interface FarmRendererCapabilitiesInput {
119
264
  streaming?: Partial<FarmRendererStreamingPrimitives> & {
@@ -122,6 +267,8 @@ interface FarmRendererCapabilitiesInput {
122
267
  reconcilesRerenders?: boolean;
123
268
  functionComponents?: boolean;
124
269
  hydrationFallback?: boolean;
270
+ /** The server module exports `withIsland`. Experimental; see `FarmRendererCapabilities`. */
271
+ islands?: boolean;
125
272
  }
126
273
  /** A client layout participating in a renderer-owned route update. */
127
274
  interface FarmRendererRouteLayout {
@@ -186,6 +333,7 @@ declare function getFarmRendererStreamingCapabilitiesForRuntime(renderer: Pick<F
186
333
  declare function assertFarmRendererServerModule(runtime: unknown, renderer: {
187
334
  readonly name: string;
188
335
  readonly server: string;
336
+ readonly capabilities?: Pick<FarmRendererCapabilitiesInput, "islands">;
189
337
  }): void;
190
338
  declare function assertFarmRendererStreamingRuntime(name: string, renderer: Pick<FarmRenderer, "capabilities"> | undefined, runtimeModule: Pick<Partial<FarmServerRendererRuntime>, "capabilities" | "renderToPipeableStream" | "renderToReadableStream">, runtime: FarmRendererRuntime | "unknown"): FarmRendererStreamingPrimitives;
191
339
  declare const FARM_COMPONENT_EXTENSIONS: readonly [".ts", ".tsx", ".js", ".jsx"];
@@ -226,6 +374,14 @@ interface FarmServerRendererRuntime {
226
374
  renderServerTreePage?(element: unknown, options?: {
227
375
  values?: boolean;
228
376
  }): Promise<unknown>;
377
+ /**
378
+ * Wraps a client component so that, rendered from server output, it starts an island: it calls
379
+ * `resolveFarmIsland` and renders the result around the component. Inside a tree that
380
+ * `wrapClientGraph` marks, it renders the component plain. Farm calls it on each export of a
381
+ * client module in the server graph. Required when the descriptor declares
382
+ * `capabilities.islands`.
383
+ */
384
+ withIsland?(component: unknown, reference: FarmIslandReference): unknown;
229
385
  /**
230
386
  * Optional: tag a plain function component so a renderer that compiles its
231
387
  * own components can tell the two apart. Renderers without the hook treat
@@ -322,6 +478,13 @@ declare const NO_RENDERER: Readonly<FarmRenderer>;
322
478
  declare function isFarmRendererDisabled(renderer: Pick<FarmRenderer, "name"> | false | undefined): boolean;
323
479
  declare function defineRenderer<const TRenderer extends FarmRenderer>(renderer: TRenderer): TRenderer;
324
480
  declare function resolveFarmRenderer(renderer?: FarmRenderer | false): FarmRenderer;
481
+ /** @internal An error a renderer hook caused, with the hook's own error as its `cause`. */
482
+ declare function createFarmRendererHookError(message: string, cause: unknown): Error;
483
+ /**
484
+ * @internal The `hydrate` and `strategy` a renderer hook returned, checked. `where` names the hook
485
+ * and the file for the error a bad value throws.
486
+ */
487
+ declare function readFarmRendererHydration(value: Readonly<Record<string, unknown>>, where: string): FarmRendererHydration;
325
488
  declare function readFarmRendererWebStream(stream: ReadableStream<Uint8Array | string>): Promise<string>;
326
489
  declare function isReactRenderer(renderer: Pick<FarmRenderer, "name"> | undefined): boolean;
327
490
  /** Absolute path of the renderer's app setup module, or null when the app has none. */
@@ -333,4 +496,4 @@ declare function loadFarmRendererVitePlugins(renderer: FarmRenderer, root: strin
333
496
  buildLifetime?: AbortSignal;
334
497
  }): Promise<unknown[]>;
335
498
 
336
- export { FARM_COMPONENT_EXTENSIONS, type FarmRenderer, type FarmRendererCapabilities, type FarmRendererCapabilitiesInput, type FarmRendererClientRoot, type FarmRendererClientRuntime, type FarmRendererRenderOptions, type FarmRendererRouteLayout, type FarmRendererRouteState, type FarmRendererRuntime, type FarmRendererStreamingCapabilities, type FarmRendererStreamingPrimitives, type FarmRendererViteModule, type FarmServerRendererRuntime, NO_RENDERER, REACT_RENDERER, assertFarmRendererServerModule, assertFarmRendererStreamingRuntime, defineRenderer, getFarmRendererCapabilities, getFarmRendererComponentExtensions, getFarmRendererStreamingCapabilitiesForRuntime, isFarmRendererDisabled, isReactRenderer, loadFarmRendererVitePlugins, readFarmRendererWebStream, resolveFarmComponentExtensions, resolveFarmRenderer, resolveFarmRendererAppSetup, resolveFarmRendererModule };
499
+ export { FARM_COMPONENT_EXTENSIONS, type FarmIslandAttributes, type FarmIslandReference, type FarmIslandScript, type FarmRenderer, type FarmRendererCapabilities, type FarmRendererCapabilitiesInput, type FarmRendererClientRoot, type FarmRendererClientRuntime, type FarmRendererHydration, type FarmRendererHydrationOptions, type FarmRendererRenderOptions, type FarmRendererRoute, type FarmRendererRouteFile, type FarmRendererRouteKind, type FarmRendererRouteLayout, type FarmRendererRouteState, type FarmRendererRoutes, type FarmRendererRoutesContext, type FarmRendererRuntime, type FarmRendererStreamingCapabilities, type FarmRendererStreamingPrimitives, type FarmRendererViteModule, type FarmResolvedIsland, type FarmServerRendererRuntime, NO_RENDERER, REACT_RENDERER, assertFarmRendererServerModule, assertFarmRendererStreamingRuntime, createFarmRendererHookError, defineRenderer, getFarmRendererCapabilities, getFarmRendererComponentExtensions, getFarmRendererStreamingCapabilitiesForRuntime, isFarmRendererDisabled, isReactRenderer, loadFarmRendererVitePlugins, readFarmRendererHydration, readFarmRendererWebStream, resolveFarmComponentExtensions, resolveFarmIsland, resolveFarmRenderer, resolveFarmRendererAppSetup, resolveFarmRendererModule };