@farm.js/core 0.1.42 → 0.1.44

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 (243) hide show
  1. package/dist/{agent-mcp-ssVy_tea.d.mts → agent-mcp-CWI-awqd.d.mts} +1 -1
  2. package/dist/{agent-mcp-SSD6L3VZ.d.ts → agent-mcp-EnzWYv_X.d.ts} +1 -1
  3. package/dist/agent-runtime.cjs +3 -2
  4. package/dist/agent-runtime.d.mts +1 -1
  5. package/dist/agent-runtime.d.ts +1 -1
  6. package/dist/agent-runtime.mjs +2 -1
  7. package/dist/api/route-manager.d.mts +3 -3
  8. package/dist/api/route-manager.d.ts +3 -3
  9. package/dist/api/runtime.d.mts +2 -2
  10. package/dist/api/runtime.d.ts +2 -2
  11. package/dist/api.cjs +2 -2
  12. package/dist/api.d.mts +8 -3
  13. package/dist/api.d.ts +8 -3
  14. package/dist/api.mjs +1 -1
  15. package/dist/{app-KjFzdCqy.d.ts → app-CAN_2Cqo.d.ts} +8 -4
  16. package/dist/{app-1h3lVT4a.d.mts → app-DG3dE8v5.d.mts} +8 -4
  17. package/dist/{app-manifest-D3RkVNuS.d.mts → app-manifest-8x5VjZ0L.d.mts} +1 -1
  18. package/dist/{app-manifest-DaW8-tvX.d.ts → app-manifest-DazjgQya.d.ts} +1 -1
  19. package/dist/app-markdown.d.mts +2 -2
  20. package/dist/app-markdown.d.ts +2 -2
  21. package/dist/{chunk-ECKF2BAM.cjs → chunk-2GVF3C2F.cjs} +255 -42
  22. package/dist/{chunk-TUL355PH.mjs → chunk-2MKTHHEU.mjs} +136 -161
  23. package/dist/chunk-2NXO5SBY.mjs +57 -0
  24. package/dist/{chunk-AX7S67YV.mjs → chunk-37VKVISD.mjs} +9 -173
  25. package/dist/chunk-3BROEWFY.cjs +39 -0
  26. package/dist/chunk-3SAWHWDH.cjs +186 -0
  27. package/dist/{chunk-AHFRQMRX.cjs → chunk-3YJMBQ27.cjs} +1 -1
  28. package/dist/{chunk-6PKXK4TY.mjs → chunk-53ZV6K65.mjs} +1 -1
  29. package/dist/{chunk-JG3MEQUH.cjs → chunk-5GBL2LKD.cjs} +430 -217
  30. package/dist/{chunk-LYIZHJTK.cjs → chunk-5LPHJZSI.cjs} +14 -14
  31. package/dist/chunk-5NIWBWDD.mjs +97 -0
  32. package/dist/{chunk-NRDBW4MP.mjs → chunk-7IQQIPRZ.mjs} +10 -0
  33. package/dist/{chunk-TCJ4A4A2.cjs → chunk-AI3WVJNP.cjs} +324 -350
  34. package/dist/chunk-APDGOKKE.cjs +148 -0
  35. package/dist/chunk-AZBSVLRM.cjs +132 -0
  36. package/dist/{chunk-RHGK2JEN.cjs → chunk-B6XAA7V6.cjs} +18 -182
  37. package/dist/chunk-CEDPEDNW.cjs +98 -0
  38. package/dist/{chunk-WSOBCAYO.cjs → chunk-CW6SNEN2.cjs} +25 -25
  39. package/dist/chunk-D5RFPV2H.mjs +148 -0
  40. package/dist/chunk-E22SWCXB.cjs +144 -0
  41. package/dist/{chunk-375K2ZVU.mjs → chunk-ERA5RP3L.mjs} +263 -50
  42. package/dist/{chunk-724JLMS4.mjs → chunk-F646BZ4Y.mjs} +4 -2
  43. package/dist/{chunk-C5KVWHIH.cjs → chunk-G2Z5DGMS.cjs} +5 -3
  44. package/dist/{chunk-ZATTDMBW.cjs → chunk-GA6JM4L6.cjs} +279 -376
  45. package/dist/chunk-GZWHCWLB.mjs +186 -0
  46. package/dist/{chunk-24SP5TGU.mjs → chunk-H4LXPWI2.mjs} +2 -2
  47. package/dist/chunk-H7BLEEAE.cjs +57 -0
  48. package/dist/chunk-IOMVXBLZ.mjs +144 -0
  49. package/dist/{chunk-BD3D7EZV.cjs → chunk-IXFOBGLQ.cjs} +9 -3
  50. package/dist/{chunk-JIYYX7WU.mjs → chunk-JVXW76I7.mjs} +2 -2
  51. package/dist/{chunk-MHN4UR5U.cjs → chunk-KFZZFZ7J.cjs} +7 -7
  52. package/dist/{chunk-BXJ5HJTJ.cjs → chunk-LPE3ED4R.cjs} +17 -13
  53. package/dist/chunk-LRJRXXQZ.cjs +109 -0
  54. package/dist/{chunk-HCSVR4YZ.mjs → chunk-M3BXTWJM.mjs} +18 -0
  55. package/dist/{chunk-2JZHQDUY.mjs → chunk-OYZGFRPA.mjs} +1 -1
  56. package/dist/{chunk-JR4QCLJY.cjs → chunk-PDU4P2IC.cjs} +19 -1
  57. package/dist/chunk-PJEHUSHA.mjs +229 -0
  58. package/dist/{chunk-QTEJGB5A.mjs → chunk-QGFKXYC7.mjs} +80 -177
  59. package/dist/chunk-QGH2RQVF.mjs +132 -0
  60. package/dist/{chunk-YWMZUGIS.mjs → chunk-R3ZFQJEF.mjs} +247 -34
  61. package/dist/{chunk-U2UC7UGP.mjs → chunk-R4J2UOV4.mjs} +1 -1
  62. package/dist/chunk-S34OBRMZ.mjs +109 -0
  63. package/dist/{chunk-TS4JHGUJ.mjs → chunk-S3ZEMCE6.mjs} +9 -3
  64. package/dist/{chunk-WWFTAUFG.cjs → chunk-SBH2JLLF.cjs} +12 -2
  65. package/dist/{chunk-YSLWRWWP.cjs → chunk-SKK6UF5P.cjs} +200 -46
  66. package/dist/{chunk-ZS6HDNOM.cjs → chunk-T44ECMEP.cjs} +6 -6
  67. package/dist/{chunk-OFZUJMCU.mjs → chunk-WPJQN64R.mjs} +195 -41
  68. package/dist/{chunk-NU25TRIO.mjs → chunk-WWYXIECF.mjs} +12 -8
  69. package/dist/{chunk-7YHSD3Z6.cjs → chunk-XPSGGECF.cjs} +85 -31
  70. package/dist/chunk-XUGFRFD2.mjs +39 -0
  71. package/dist/{chunk-IVQY6UTY.mjs → chunk-XUHIRBXY.mjs} +1 -1
  72. package/dist/{chunk-PIZXONIS.mjs → chunk-YFLBG2W3.mjs} +56 -2
  73. package/dist/chunk-YKUEJ3MG.cjs +229 -0
  74. package/dist/{chunk-QKZMB7LY.cjs → chunk-YN2QEMMO.cjs} +2 -2
  75. package/dist/{client-plugins-DIem0I0W.d.ts → client-plugins-BGS0wqzc.d.ts} +36 -16
  76. package/dist/{client-plugins-C9Py_50W.d.mts → client-plugins-nQ0tYt4l.d.mts} +36 -16
  77. package/dist/client-plugins.d.mts +1 -1
  78. package/dist/client-plugins.d.ts +1 -1
  79. package/dist/client.cjs +4 -3
  80. package/dist/client.d.mts +5 -5
  81. package/dist/client.d.ts +5 -5
  82. package/dist/client.mjs +3 -2
  83. package/dist/config.d.mts +1 -1
  84. package/dist/config.d.ts +1 -1
  85. package/dist/{devtools-2RY3EKHL.cjs → devtools-5Q7VRKVH.cjs} +6 -5
  86. package/dist/{devtools-Q3LBNUJ7.mjs → devtools-LJ4IGYGW.mjs} +5 -4
  87. package/dist/docs.cjs +7 -6
  88. package/dist/docs.d.mts +2 -2
  89. package/dist/docs.d.ts +2 -2
  90. package/dist/docs.mjs +6 -5
  91. package/dist/index-Cy26isrh.d.ts +48 -0
  92. package/dist/index-y1jgR74U.d.mts +48 -0
  93. package/dist/index.cjs +44 -25
  94. package/dist/index.d.mts +15 -15
  95. package/dist/index.d.ts +15 -15
  96. package/dist/index.mjs +51 -32
  97. package/dist/integrations.cjs +5 -3
  98. package/dist/integrations.d.mts +1 -1
  99. package/dist/integrations.d.ts +1 -1
  100. package/dist/integrations.mjs +6 -4
  101. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  102. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  103. package/dist/internal/build-runtime.cjs +30 -15
  104. package/dist/internal/build-runtime.d.mts +12 -16
  105. package/dist/internal/build-runtime.d.ts +12 -16
  106. package/dist/internal/build-runtime.mjs +29 -14
  107. package/dist/internal/cli-runtime.cjs +24 -11
  108. package/dist/internal/cli-runtime.mjs +24 -11
  109. package/dist/internal/client-error-overlay.cjs +4 -4
  110. package/dist/internal/client-error-overlay.mjs +1 -1
  111. package/dist/internal/client-runtime.cjs +5 -1
  112. package/dist/internal/client-runtime.d.mts +1 -0
  113. package/dist/internal/client-runtime.d.ts +1 -0
  114. package/dist/internal/client-runtime.mjs +4 -0
  115. package/dist/internal/compression-runtime.d.mts +1 -1
  116. package/dist/internal/compression-runtime.d.ts +1 -1
  117. package/dist/internal/config-runtime.cjs +6 -5
  118. package/dist/internal/config-runtime.d.mts +2 -2
  119. package/dist/internal/config-runtime.d.ts +2 -2
  120. package/dist/internal/config-runtime.mjs +5 -4
  121. package/dist/internal/form-actions-client.cjs +18 -0
  122. package/dist/internal/form-actions-client.d.mts +5 -0
  123. package/dist/internal/form-actions-client.d.ts +5 -0
  124. package/dist/internal/form-actions-client.mjs +18 -0
  125. package/dist/internal/form-actions.cjs +18 -0
  126. package/dist/internal/form-actions.d.mts +14 -0
  127. package/dist/internal/form-actions.d.ts +14 -0
  128. package/dist/internal/form-actions.mjs +18 -0
  129. package/dist/internal/island-codec.cjs +22 -0
  130. package/dist/internal/island-codec.d.mts +29 -0
  131. package/dist/internal/island-codec.d.ts +29 -0
  132. package/dist/internal/island-codec.mjs +22 -0
  133. package/dist/internal/island-value-store.cjs +13 -0
  134. package/dist/internal/island-value-store.d.mts +6 -0
  135. package/dist/internal/island-value-store.d.ts +6 -0
  136. package/dist/internal/island-value-store.mjs +13 -0
  137. package/dist/internal/islands-runtime.cjs +77 -0
  138. package/dist/internal/islands-runtime.d.mts +57 -0
  139. package/dist/internal/islands-runtime.d.ts +57 -0
  140. package/dist/internal/islands-runtime.mjs +77 -0
  141. package/dist/internal/islands-server.cjs +19 -0
  142. package/dist/internal/islands-server.d.mts +3 -0
  143. package/dist/internal/islands-server.d.ts +3 -0
  144. package/dist/internal/islands-server.mjs +19 -0
  145. package/dist/internal/islx-client.cjs +5 -0
  146. package/dist/internal/islx-client.d.mts +2 -0
  147. package/dist/internal/islx-client.d.ts +2 -0
  148. package/dist/internal/islx-client.mjs +3 -0
  149. package/dist/internal/islx-react.cjs +4 -0
  150. package/dist/internal/islx-react.d.mts +1 -0
  151. package/dist/internal/islx-react.d.ts +1 -0
  152. package/dist/internal/islx-react.mjs +2 -0
  153. package/dist/internal/islx-server.cjs +5 -0
  154. package/dist/internal/islx-server.d.mts +2 -0
  155. package/dist/internal/islx-server.d.ts +2 -0
  156. package/dist/internal/islx-server.mjs +3 -0
  157. package/dist/internal/isolated-boundary.cjs +4 -3
  158. package/dist/internal/isolated-boundary.d.mts +13 -1
  159. package/dist/internal/isolated-boundary.d.ts +13 -1
  160. package/dist/internal/isolated-boundary.mjs +3 -2
  161. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  162. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  163. package/dist/internal/production-runtime.cjs +24 -13
  164. package/dist/internal/production-runtime.d.mts +20 -10
  165. package/dist/internal/production-runtime.d.ts +20 -10
  166. package/dist/internal/production-runtime.mjs +24 -13
  167. package/dist/internal/server-tree.cjs +6 -3
  168. package/dist/internal/server-tree.d.mts +25 -2
  169. package/dist/internal/server-tree.d.ts +25 -2
  170. package/dist/internal/server-tree.mjs +7 -4
  171. package/dist/island-value-protocol-BRayRghM.d.mts +12 -0
  172. package/dist/island-value-protocol-BRayRghM.d.ts +12 -0
  173. package/dist/markdown.d.mts +1 -1
  174. package/dist/markdown.d.ts +1 -1
  175. package/dist/middleware.d.mts +3 -3
  176. package/dist/middleware.d.ts +3 -3
  177. package/dist/navigation.cjs +5 -4
  178. package/dist/navigation.d.mts +4 -4
  179. package/dist/navigation.d.ts +4 -4
  180. package/dist/navigation.mjs +4 -3
  181. package/dist/og.d.mts +5 -0
  182. package/dist/og.d.ts +5 -0
  183. package/dist/plugin.cjs +19 -12
  184. package/dist/plugin.d.mts +3 -3
  185. package/dist/plugin.d.ts +3 -3
  186. package/dist/plugin.mjs +18 -11
  187. package/dist/{production-runtime-bjjWq-DA.d.ts → production-runtime-BVMDgHrA.d.ts} +1 -1
  188. package/dist/{production-runtime-CHFKIgpW.d.mts → production-runtime-ClFA_1KQ.d.mts} +1 -1
  189. package/dist/query/client.cjs +6 -5
  190. package/dist/query/client.mjs +2 -1
  191. package/dist/{render-plan-DOHg6wdO.d.mts → render-plan-CoSovy_O.d.mts} +4 -2
  192. package/dist/{render-plan-B2UndB4x.d.ts → render-plan-y2DefWf8.d.ts} +4 -2
  193. package/dist/renderer/react/server.cjs +7 -6
  194. package/dist/renderer/react/server.d.mts +3 -1
  195. package/dist/renderer/react/server.d.ts +3 -1
  196. package/dist/renderer/react/server.mjs +5 -4
  197. package/dist/renderer-client.cjs +5 -4
  198. package/dist/renderer-client.d.mts +3 -3
  199. package/dist/renderer-client.d.ts +3 -3
  200. package/dist/renderer-client.mjs +2 -1
  201. package/dist/renderer.d.mts +3 -1
  202. package/dist/renderer.d.ts +3 -1
  203. package/dist/{request-DVNXRQrI.d.ts → request-aG5Wovm5.d.ts} +1 -1
  204. package/dist/{request-DQcGfdgQ.d.mts → request-cNM09Q7e.d.mts} +1 -1
  205. package/dist/request.d.mts +2 -2
  206. package/dist/request.d.ts +2 -2
  207. package/dist/{route-rendering-B_6fj-GG.d.ts → route-rendering-B3uQmCWX.d.ts} +1 -1
  208. package/dist/{route-rendering-CEX4mFn-.d.mts → route-rendering-EyInfsjI.d.mts} +1 -1
  209. package/dist/{router-CHEMHm1P.d.ts → router-DNUf-Bg1.d.ts} +1 -1
  210. package/dist/{router-CKHPBKXX.d.mts → router-Devibh4r.d.mts} +1 -1
  211. package/dist/routes.d.mts +1 -1
  212. package/dist/routes.d.ts +1 -1
  213. package/dist/rsc-pipeline-4ZJ6GUVQ.cjs +78 -0
  214. package/dist/rsc-pipeline-KK6GFDET.mjs +78 -0
  215. package/dist/{runtime-jj8TKNsy.d.mts → runtime-9KZb8AI5.d.mts} +1 -1
  216. package/dist/{runtime-Br2ZDTAv.d.ts → runtime-CLr9P5kn.d.ts} +1 -1
  217. package/dist/{schema-dev-notice-5JPE67AI.cjs → schema-dev-notice-77ZL23PL.cjs} +4 -4
  218. package/dist/{schema-dev-notice-WLPZ6WKU.mjs → schema-dev-notice-BLXOS6U2.mjs} +2 -2
  219. package/dist/server-plugins.d.mts +2 -2
  220. package/dist/server-plugins.d.ts +2 -2
  221. package/dist/server.cjs +57 -38
  222. package/dist/server.d.mts +15 -10
  223. package/dist/server.d.ts +15 -10
  224. package/dist/server.mjs +37 -18
  225. package/dist/{spa-router-BEvS9Erj.d.mts → spa-router-BIxh4IY-.d.mts} +8 -3
  226. package/dist/{spa-router-DmCuH5B7.d.ts → spa-router-Ds6R_oe-.d.ts} +8 -3
  227. package/dist/{ssg-57v6cZcW.d.mts → ssg-ByrOVYdM.d.mts} +2 -2
  228. package/dist/{ssg-gT093ETk.d.ts → ssg-XnMHCyEc.d.ts} +2 -2
  229. package/dist/testing.d.mts +1 -1
  230. package/dist/testing.d.ts +1 -1
  231. package/dist/{utils-CCTKvR-P.d.ts → utils-BN70ueSN.d.ts} +1 -1
  232. package/dist/{utils-raHHQVyL.d.mts → utils-BrjR5xRs.d.mts} +1 -1
  233. package/dist/version.cjs +2 -2
  234. package/dist/version.mjs +1 -1
  235. package/dist/vite.cjs +19 -12
  236. package/dist/vite.d.mts +6 -4
  237. package/dist/vite.d.ts +6 -4
  238. package/dist/vite.mjs +18 -11
  239. package/package.json +53 -1
  240. package/dist/{chunk-35WS7P2V.mjs → chunk-26CXZR6L.mjs} +3 -3
  241. package/dist/{chunk-QEILRWVV.cjs → chunk-3XEMGDBF.cjs} +2 -2
  242. package/dist/{chunk-BPOTSHDO.cjs → chunk-IOAUK4OI.cjs} +2 -2
  243. package/dist/{chunk-BYR3RQPB.mjs → chunk-T76H22WI.mjs} +4 -4
@@ -27,6 +27,9 @@ import {
27
27
  import {
28
28
  setFarmTrailingSlashPreference
29
29
  } from "../chunk-54UPOYFS.mjs";
30
+ import {
31
+ getFarmIslandValueHeaders
32
+ } from "../chunk-2NXO5SBY.mjs";
30
33
  import {
31
34
  applyFarmCacheInvalidations
32
35
  } from "../chunk-4SIYUGRY.mjs";
@@ -319,6 +322,7 @@ export {
319
322
  applyFarmCacheInvalidations,
320
323
  createClientCancellation,
321
324
  createClientPluginManager,
325
+ getFarmIslandValueHeaders,
322
326
  getHashTargetElement,
323
327
  installChunkErrorRecovery,
324
328
  isFarmBlockedNavigationURL,
@@ -1,4 +1,4 @@
1
- import { aa as FarmRequest, ab as FarmResponse, f as FarmPluginContext, a as FarmPlugin } from '../client-plugins-C9Py_50W.mjs';
1
+ import { aa as FarmRequest, ab as FarmResponse, f as FarmPluginContext, a as FarmPlugin } from '../client-plugins-nQ0tYt4l.mjs';
2
2
  import '../lifecycle-DK06VuKP.mjs';
3
3
  import '../integration-api-DWyMmvrR.mjs';
4
4
  import '../endpoint-DGZRZHux.mjs';
@@ -1,4 +1,4 @@
1
- import { aa as FarmRequest, ab as FarmResponse, f as FarmPluginContext, a as FarmPlugin } from '../client-plugins-DIem0I0W.js';
1
+ import { aa as FarmRequest, ab as FarmResponse, f as FarmPluginContext, a as FarmPlugin } from '../client-plugins-BGS0wqzc.js';
2
2
  import '../lifecycle-DK06VuKP.js';
3
3
  import '../integration-api-BuPHMeKz.js';
4
4
  import '../endpoint-BOE0IAaG.js';
@@ -5,12 +5,12 @@ var _chunkA6WIQH5Zcjs = require('../chunk-A6WIQH5Z.cjs');
5
5
 
6
6
 
7
7
 
8
- var _chunkBXJ5HJTJcjs = require('../chunk-BXJ5HJTJ.cjs');
8
+ var _chunkLPE3ED4Rcjs = require('../chunk-LPE3ED4R.cjs');
9
9
  require('../chunk-KR6CKSXT.cjs');
10
- require('../chunk-JR4QCLJY.cjs');
11
- require('../chunk-Q5B3KJBP.cjs');
10
+ require('../chunk-PDU4P2IC.cjs');
12
11
  require('../chunk-FVPXT2JR.cjs');
13
12
  require('../chunk-YJRZR7VU.cjs');
13
+ require('../chunk-Q5B3KJBP.cjs');
14
14
  require('../chunk-PSV6XKPO.cjs');
15
15
  require('../chunk-JAXDRRRC.cjs');
16
16
  require('../chunk-D5IHNDHI.cjs');
@@ -28,8 +28,9 @@ require('../chunk-JEIG3EWE.cjs');
28
28
  require('../chunk-JDNHKPTD.cjs');
29
29
  require('../chunk-CMGMGHUZ.cjs');
30
30
  require('../chunk-OI6CMLWX.cjs');
31
- require('../chunk-RHGK2JEN.cjs');
31
+ require('../chunk-B6XAA7V6.cjs');
32
32
  require('../chunk-6QOLZITB.cjs');
33
+ require('../chunk-3SAWHWDH.cjs');
33
34
  require('../chunk-G643DQCH.cjs');
34
35
  require('../chunk-ALPWLT27.cjs');
35
36
  require('../chunk-75RZHGLS.cjs');
@@ -67,4 +68,4 @@ require('../chunk-S3JO3N4H.cjs');
67
68
 
68
69
 
69
70
 
70
- exports.loadConfig = _chunkBXJ5HJTJcjs.loadConfig; exports.loadFarmProductionVite = _chunkA6WIQH5Zcjs.loadFarmProductionVite; exports.logger = _chunk5QIKR7RRcjs.logger; exports.resolveConfig = _chunkBXJ5HJTJcjs.resolveConfig; exports.resolveDeployConfig = _chunkBXJ5HJTJcjs.resolveDeployConfig;
71
+ exports.loadConfig = _chunkLPE3ED4Rcjs.loadConfig; exports.loadFarmProductionVite = _chunkA6WIQH5Zcjs.loadFarmProductionVite; exports.logger = _chunk5QIKR7RRcjs.logger; exports.resolveConfig = _chunkLPE3ED4Rcjs.resolveConfig; exports.resolveDeployConfig = _chunkLPE3ED4Rcjs.resolveDeployConfig;
@@ -1,6 +1,6 @@
1
- export { bJ as loadConfig, bI as resolveConfig, bK as resolveDeployConfig } from '../client-plugins-C9Py_50W.mjs';
1
+ export { ay as loadConfig, az as resolveConfig, aA as resolveDeployConfig } from '../client-plugins-nQ0tYt4l.mjs';
2
2
  import { build, createServer, loadEnv } from 'vite';
3
- export { l as logger } from '../utils-raHHQVyL.mjs';
3
+ export { l as logger } from '../utils-BrjR5xRs.mjs';
4
4
  import '../lifecycle-DK06VuKP.mjs';
5
5
  import '../integration-api-DWyMmvrR.mjs';
6
6
  import '../endpoint-DGZRZHux.mjs';
@@ -1,6 +1,6 @@
1
- export { bJ as loadConfig, bI as resolveConfig, bK as resolveDeployConfig } from '../client-plugins-DIem0I0W.js';
1
+ export { ay as loadConfig, az as resolveConfig, aA as resolveDeployConfig } from '../client-plugins-BGS0wqzc.js';
2
2
  import { build, createServer, loadEnv } from 'vite';
3
- export { l as logger } from '../utils-CCTKvR-P.js';
3
+ export { l as logger } from '../utils-BN70ueSN.js';
4
4
  import '../lifecycle-DK06VuKP.js';
5
5
  import '../integration-api-BuPHMeKz.js';
6
6
  import '../endpoint-BOE0IAaG.js';
@@ -5,12 +5,12 @@ import {
5
5
  loadConfig,
6
6
  resolveConfig,
7
7
  resolveDeployConfig
8
- } from "../chunk-NU25TRIO.mjs";
8
+ } from "../chunk-WWYXIECF.mjs";
9
9
  import "../chunk-XZNTNMHT.mjs";
10
- import "../chunk-HCSVR4YZ.mjs";
11
- import "../chunk-GHFS7RUB.mjs";
10
+ import "../chunk-M3BXTWJM.mjs";
12
11
  import "../chunk-CZS6OACQ.mjs";
13
12
  import "../chunk-JBSVKMC5.mjs";
13
+ import "../chunk-GHFS7RUB.mjs";
14
14
  import "../chunk-DAATZTKJ.mjs";
15
15
  import "../chunk-DMRPN25V.mjs";
16
16
  import "../chunk-ETPEZLS3.mjs";
@@ -28,8 +28,9 @@ import "../chunk-BPNRQ5BA.mjs";
28
28
  import "../chunk-2UC36WAC.mjs";
29
29
  import "../chunk-ONUEYC6N.mjs";
30
30
  import "../chunk-AELACLOB.mjs";
31
- import "../chunk-AX7S67YV.mjs";
31
+ import "../chunk-37VKVISD.mjs";
32
32
  import "../chunk-H3EGVQE5.mjs";
33
+ import "../chunk-GZWHCWLB.mjs";
33
34
  import "../chunk-44SYJEG3.mjs";
34
35
  import "../chunk-HKFBMHCD.mjs";
35
36
  import "../chunk-ZLAT2CWY.mjs";
@@ -0,0 +1,18 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkS3JO3N4Hcjs = require('../chunk-S3JO3N4H.cjs');
4
+
5
+ // src/form-actions-client.ts
6
+ var _client = require('@farm.js/islx/client');
7
+ function getFarmFormActionStub(id) {
8
+ return _client.createServerReference.call(void 0, id);
9
+ }
10
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmFormActionStub, "getFarmFormActionStub");
11
+ function createFarmFormActionStub(id) {
12
+ return _client.createServerReference.call(void 0, id);
13
+ }
14
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmFormActionStub, "createFarmFormActionStub");
15
+
16
+
17
+
18
+ exports.createFarmFormActionStub = createFarmFormActionStub; exports.getFarmFormActionStub = getFarmFormActionStub;
@@ -0,0 +1,5 @@
1
+ /** The reference for an action passed as a prop: one per action, so props keep their identity. */
2
+ declare function getFarmFormActionStub(id: string): (...args: any[]) => any;
3
+ declare function createFarmFormActionStub(id: string): (...args: any[]) => any;
4
+
5
+ export { createFarmFormActionStub, getFarmFormActionStub };
@@ -0,0 +1,5 @@
1
+ /** The reference for an action passed as a prop: one per action, so props keep their identity. */
2
+ declare function getFarmFormActionStub(id: string): (...args: any[]) => any;
3
+ declare function createFarmFormActionStub(id: string): (...args: any[]) => any;
4
+
5
+ export { createFarmFormActionStub, getFarmFormActionStub };
@@ -0,0 +1,18 @@
1
+ import {
2
+ __name
3
+ } from "../chunk-LPEX4YW6.mjs";
4
+
5
+ // src/form-actions-client.ts
6
+ import { createServerReference } from "@farm.js/islx/client";
7
+ function getFarmFormActionStub(id) {
8
+ return createServerReference(id);
9
+ }
10
+ __name(getFarmFormActionStub, "getFarmFormActionStub");
11
+ function createFarmFormActionStub(id) {
12
+ return createServerReference(id);
13
+ }
14
+ __name(createFarmFormActionStub, "createFarmFormActionStub");
15
+ export {
16
+ createFarmFormActionStub,
17
+ getFarmFormActionStub
18
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunk3BROEWFYcjs = require('../chunk-3BROEWFY.cjs');
6
+ require('../chunk-P4TYB4SF.cjs');
7
+ require('../chunk-SVRTJOUF.cjs');
8
+ require('../chunk-5NAVKJCZ.cjs');
9
+ require('../chunk-4TLUFAIP.cjs');
10
+ require('../chunk-ZEG3OPIB.cjs');
11
+ require('../chunk-OX6O6WVA.cjs');
12
+ require('../chunk-NO3WWW3N.cjs');
13
+ require('../chunk-S3JO3N4H.cjs');
14
+
15
+
16
+
17
+
18
+ exports.FARM_FORM_ACTION_HEADER = _chunk3BROEWFYcjs.FARM_FORM_ACTION_HEADER; exports.handleFarmFormActionRequest = _chunk3BROEWFYcjs.handleFarmFormActionRequest; exports.registerFarmFormAction = _chunk3BROEWFYcjs.registerFarmFormAction;
@@ -0,0 +1,14 @@
1
+ import { ResolvedFarmServerActionsConfig } from '../server-action-security.mjs';
2
+ import '../server-fn-error-DDh14a0V.mjs';
3
+
4
+ /** The header carrying the action id for calls from client components. */
5
+ declare const FARM_FORM_ACTION_HEADER = "F-Action";
6
+ /** Registers a `"use server"` export. Kept for modules compiled before islx registered them. */
7
+ declare function registerFarmFormAction<T>(action: T, id: string): T;
8
+ /**
9
+ * Runs a server action posted to a page: a form submission, or a call from a client component.
10
+ * Returns `null` for any other request, which then renders as usual.
11
+ */
12
+ declare function handleFarmFormActionRequest(request: Request, config: ResolvedFarmServerActionsConfig): Promise<Response | null>;
13
+
14
+ export { FARM_FORM_ACTION_HEADER, handleFarmFormActionRequest, registerFarmFormAction };
@@ -0,0 +1,14 @@
1
+ import { ResolvedFarmServerActionsConfig } from '../server-action-security.js';
2
+ import '../server-fn-error-DDh14a0V.js';
3
+
4
+ /** The header carrying the action id for calls from client components. */
5
+ declare const FARM_FORM_ACTION_HEADER = "F-Action";
6
+ /** Registers a `"use server"` export. Kept for modules compiled before islx registered them. */
7
+ declare function registerFarmFormAction<T>(action: T, id: string): T;
8
+ /**
9
+ * Runs a server action posted to a page: a form submission, or a call from a client component.
10
+ * Returns `null` for any other request, which then renders as usual.
11
+ */
12
+ declare function handleFarmFormActionRequest(request: Request, config: ResolvedFarmServerActionsConfig): Promise<Response | null>;
13
+
14
+ export { FARM_FORM_ACTION_HEADER, handleFarmFormActionRequest, registerFarmFormAction };
@@ -0,0 +1,18 @@
1
+ import {
2
+ FARM_FORM_ACTION_HEADER,
3
+ handleFarmFormActionRequest,
4
+ registerFarmFormAction
5
+ } from "../chunk-XUGFRFD2.mjs";
6
+ import "../chunk-WMHG64DA.mjs";
7
+ import "../chunk-FP2INE7H.mjs";
8
+ import "../chunk-ZZGQD7A4.mjs";
9
+ import "../chunk-P7XDC7UJ.mjs";
10
+ import "../chunk-4SIYUGRY.mjs";
11
+ import "../chunk-CBBLJMR5.mjs";
12
+ import "../chunk-55YI3RRB.mjs";
13
+ import "../chunk-LPEX4YW6.mjs";
14
+ export {
15
+ FARM_FORM_ACTION_HEADER,
16
+ handleFarmFormActionRequest,
17
+ registerFarmFormAction
18
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+ var _chunkYKUEJ3MGcjs = require('../chunk-YKUEJ3MG.cjs');
11
+ require('../chunk-H7BLEEAE.cjs');
12
+ require('../chunk-S3JO3N4H.cjs');
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+ exports.NOT_A_FARM_MARKER = _chunkYKUEJ3MGcjs.NOT_A_FARM_MARKER; exports.decodeFarmJson = _chunkYKUEJ3MGcjs.decodeFarmJson; exports.decodeFarmTagged = _chunkYKUEJ3MGcjs.decodeFarmTagged; exports.encodeFarmJson = _chunkYKUEJ3MGcjs.encodeFarmJson; exports.encodeFarmLeaf = _chunkYKUEJ3MGcjs.encodeFarmLeaf; exports.farmPlainObject = _chunkYKUEJ3MGcjs.farmPlainObject; exports.farmTagged = _chunkYKUEJ3MGcjs.farmTagged; exports.needsFarmObjectTag = _chunkYKUEJ3MGcjs.needsFarmObjectTag;
@@ -0,0 +1,29 @@
1
+ /** A tagged object. */
2
+ declare function farmTagged(tag: string, value?: unknown): Record<string, unknown>;
3
+ /** Whether a plain object must travel wrapped as `o`, because its own keys include `$`. */
4
+ declare function needsFarmObjectTag(object: object): boolean;
5
+ /**
6
+ * The tag for a value JSON cannot hold and that has no children (everything above but `M`, `S`
7
+ * and `o`), or undefined when the value needs none.
8
+ */
9
+ declare function encodeFarmLeaf(value: unknown): Record<string, unknown> | undefined;
10
+ /** Returned by `decodeFarmTagged` for the runtime's reference tags (`r`, `s`, `a`). */
11
+ declare const NOT_A_FARM_MARKER: unique symbol;
12
+ /** A plain object from entries; `defineProperty`, so a "__proto__" key stays an ordinary key. */
13
+ declare function farmPlainObject(entries: Iterable<[string, unknown]>): Record<string, unknown>;
14
+ /**
15
+ * The value a tagged object stands for, decoding children (a `Map`'s or `Set`'s entries, an `o`
16
+ * object's properties) with `decodeChild`. Returns `NOT_A_FARM_MARKER` for the runtime's reference
17
+ * tags, and throws for an unknown or malformed tag.
18
+ */
19
+ declare function decodeFarmTagged(object: Record<string, unknown>, decodeChild: (value: unknown) => unknown): unknown;
20
+ /**
21
+ * Encodes a value for JSON with the tags above: plain objects, arrays and the types listed.
22
+ * Functions, symbols, class instances and circular values throw. Used for server action
23
+ * arguments and results.
24
+ */
25
+ declare function encodeFarmJson(value: unknown, seen?: Set<object>): unknown;
26
+ /** Decodes what `encodeFarmJson` produced, after `JSON.parse`. Reference tags are rejected. */
27
+ declare function decodeFarmJson(value: unknown): unknown;
28
+
29
+ export { NOT_A_FARM_MARKER, decodeFarmJson, decodeFarmTagged, encodeFarmJson, encodeFarmLeaf, farmPlainObject, farmTagged, needsFarmObjectTag };
@@ -0,0 +1,29 @@
1
+ /** A tagged object. */
2
+ declare function farmTagged(tag: string, value?: unknown): Record<string, unknown>;
3
+ /** Whether a plain object must travel wrapped as `o`, because its own keys include `$`. */
4
+ declare function needsFarmObjectTag(object: object): boolean;
5
+ /**
6
+ * The tag for a value JSON cannot hold and that has no children (everything above but `M`, `S`
7
+ * and `o`), or undefined when the value needs none.
8
+ */
9
+ declare function encodeFarmLeaf(value: unknown): Record<string, unknown> | undefined;
10
+ /** Returned by `decodeFarmTagged` for the runtime's reference tags (`r`, `s`, `a`). */
11
+ declare const NOT_A_FARM_MARKER: unique symbol;
12
+ /** A plain object from entries; `defineProperty`, so a "__proto__" key stays an ordinary key. */
13
+ declare function farmPlainObject(entries: Iterable<[string, unknown]>): Record<string, unknown>;
14
+ /**
15
+ * The value a tagged object stands for, decoding children (a `Map`'s or `Set`'s entries, an `o`
16
+ * object's properties) with `decodeChild`. Returns `NOT_A_FARM_MARKER` for the runtime's reference
17
+ * tags, and throws for an unknown or malformed tag.
18
+ */
19
+ declare function decodeFarmTagged(object: Record<string, unknown>, decodeChild: (value: unknown) => unknown): unknown;
20
+ /**
21
+ * Encodes a value for JSON with the tags above: plain objects, arrays and the types listed.
22
+ * Functions, symbols, class instances and circular values throw. Used for server action
23
+ * arguments and results.
24
+ */
25
+ declare function encodeFarmJson(value: unknown, seen?: Set<object>): unknown;
26
+ /** Decodes what `encodeFarmJson` produced, after `JSON.parse`. Reference tags are rejected. */
27
+ declare function decodeFarmJson(value: unknown): unknown;
28
+
29
+ export { NOT_A_FARM_MARKER, decodeFarmJson, decodeFarmTagged, encodeFarmJson, encodeFarmLeaf, farmPlainObject, farmTagged, needsFarmObjectTag };
@@ -0,0 +1,22 @@
1
+ import {
2
+ NOT_A_FARM_MARKER,
3
+ decodeFarmJson,
4
+ decodeFarmTagged,
5
+ encodeFarmJson,
6
+ encodeFarmLeaf,
7
+ farmPlainObject,
8
+ farmTagged,
9
+ needsFarmObjectTag
10
+ } from "../chunk-PJEHUSHA.mjs";
11
+ import "../chunk-2NXO5SBY.mjs";
12
+ import "../chunk-LPEX4YW6.mjs";
13
+ export {
14
+ NOT_A_FARM_MARKER,
15
+ decodeFarmJson,
16
+ decodeFarmTagged,
17
+ encodeFarmJson,
18
+ encodeFarmLeaf,
19
+ farmPlainObject,
20
+ farmTagged,
21
+ needsFarmObjectTag
22
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkS3JO3N4Hcjs = require('../chunk-S3JO3N4H.cjs');
4
+
5
+ // src/client/island-value-store.ts
6
+ var _client = require('@farm.js/islx/client');
7
+ function getFarmIslandValueStore() {
8
+ return _client.getValueStore.call(void 0, );
9
+ }
10
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmIslandValueStore, "getFarmIslandValueStore");
11
+
12
+
13
+ exports.getFarmIslandValueStore = getFarmIslandValueStore;
@@ -0,0 +1,6 @@
1
+ import { F as FarmIslandValueStore } from '../island-value-protocol-BRayRghM.mjs';
2
+
3
+ /** The page's value store, shared by every copy of the runtime. */
4
+ declare function getFarmIslandValueStore(): FarmIslandValueStore;
5
+
6
+ export { getFarmIslandValueStore };
@@ -0,0 +1,6 @@
1
+ import { F as FarmIslandValueStore } from '../island-value-protocol-BRayRghM.js';
2
+
3
+ /** The page's value store, shared by every copy of the runtime. */
4
+ declare function getFarmIslandValueStore(): FarmIslandValueStore;
5
+
6
+ export { getFarmIslandValueStore };
@@ -0,0 +1,13 @@
1
+ import {
2
+ __name
3
+ } from "../chunk-LPEX4YW6.mjs";
4
+
5
+ // src/client/island-value-store.ts
6
+ import { getValueStore } from "@farm.js/islx/client";
7
+ function getFarmIslandValueStore() {
8
+ return getValueStore();
9
+ }
10
+ __name(getFarmIslandValueStore, "getFarmIslandValueStore");
11
+ export {
12
+ getFarmIslandValueStore
13
+ };
@@ -0,0 +1,77 @@
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; }
2
+
3
+ var _chunkH7BLEEAEcjs = require('../chunk-H7BLEEAE.cjs');
4
+
5
+
6
+ var _chunkS3JO3N4Hcjs = require('../chunk-S3JO3N4H.cjs');
7
+
8
+ // src/client/islands-runtime.ts
9
+ var _client = require('@farm.js/islx/client');
10
+ var _react = require('@farm.js/islx/react');
11
+
12
+
13
+
14
+
15
+ var _client3 = require('@farm.js/islx/react/client');
16
+ function createFarmIsolatedHydrationRuntime(options) {
17
+ const runtime = _client3.createHydrationRuntime.call(void 0, {
18
+ load: options.load,
19
+ schedule: options.schedule,
20
+ wrap: options.wrap,
21
+ report: options.report
22
+ });
23
+ const router = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => window.__FARM_SPA_ROUTER__, "router");
24
+ _client.setActionNavigator.call(void 0, {
25
+ refresh: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => _optionalChain([router, 'call', _ => _(), 'optionalAccess', _2 => _2.refresh, 'optionalCall', _3 => _3({ scroll: false })]), "refresh"),
26
+ navigate: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (href) => {
27
+ const current = router();
28
+ return _optionalChain([current, 'optionalAccess', _4 => _4.navigate]) ? current.navigate(href) : location.assign(href);
29
+ }, "navigate")
30
+ });
31
+ _client.enhanceForms.call(void 0, );
32
+ return {
33
+ hydrate: runtime.hydrate,
34
+ carryOver: runtime.carryOver,
35
+ updateModule: runtime.update,
36
+ dispose: runtime.dispose,
37
+ rootCount: runtime.rootCount
38
+ };
39
+ }
40
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmIsolatedHydrationRuntime, "createFarmIsolatedHydrationRuntime");
41
+ function createFarmServerPageBoundary(_React, runtime) {
42
+ return _client3.createServerHtml.call(void 0, runtime);
43
+ }
44
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmServerPageBoundary, "createFarmServerPageBoundary");
45
+ function wrapFarmIsolatedClientGraph(_React, element) {
46
+ return _react.withinClientRoot.call(void 0, element);
47
+ }
48
+ _chunkS3JO3N4Hcjs.__name.call(void 0, wrapFarmIsolatedClientGraph, "wrapFarmIsolatedClientGraph");
49
+ function isolateFarmServerPageGraph(_React, element) {
50
+ return _react.isolateIslands.call(void 0, element);
51
+ }
52
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isolateFarmServerPageGraph, "isolateFarmServerPageGraph");
53
+ function renderFarmServerTreePage(_React, element, options) {
54
+ return _react.renderServerTree.call(void 0, element, {
55
+ isolate: options.isolate,
56
+ payloadOnly: options.payloadOnly,
57
+ // The values this request's browser holds (Farm's request store).
58
+ held: _nullishCoalesce(_optionalChain([_chunkH7BLEEAEcjs.getFarmIslandValuesServer.call(void 0, ), 'optionalAccess', _5 => _5.held, 'call', _6 => _6()]), () => ( null))
59
+ });
60
+ }
61
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmServerTreePage, "renderFarmServerTreePage");
62
+ function createFarmServerTreeElement(_React, source, options) {
63
+ return _client3.createServerTreeElement.call(void 0, source, {
64
+ load: options.load,
65
+ ServerHtml: options.ServerHtml,
66
+ key: options.key
67
+ });
68
+ }
69
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmServerTreeElement, "createFarmServerTreeElement");
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+ exports.createFarmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime; exports.createFarmServerPageBoundary = createFarmServerPageBoundary; exports.createFarmServerTreeElement = createFarmServerTreeElement; exports.isolateFarmServerPageGraph = isolateFarmServerPageGraph; exports.renderFarmServerTreePage = renderFarmServerTreePage; exports.wrapFarmIsolatedClientGraph = wrapFarmIsolatedClientGraph;
@@ -0,0 +1,57 @@
1
+ import React__default from 'react';
2
+ import { createServerHtml } from '@farm.js/islx/react/client';
3
+ import { F as FarmIslandStrategy } from '../island-CfGru1MO.mjs';
4
+
5
+ /**
6
+ * @internal Islands mode's runtime (`experimental.serverComponents: { mode: "islands" }`), run by
7
+ * islx. Generated code imports these in islands mode under the names the isolated-hydration
8
+ * runtime uses, so the rest of Farm's runtime stays the same; apps on isolated hydration without
9
+ * islands mode never load islx.
10
+ */
11
+
12
+ interface FarmIslandsRuntimeOptions {
13
+ load(reference: string): Promise<Record<string, unknown>>;
14
+ schedule(options: {
15
+ container: Element;
16
+ strategy: FarmIslandStrategy;
17
+ signal?: AbortSignal;
18
+ hydrate(): Promise<void>;
19
+ }): Promise<unknown>;
20
+ wrap?(element: React__default.ReactElement): React__default.ReactNode;
21
+ report?(message: string, error?: unknown): void;
22
+ }
23
+ /**
24
+ * Hydrates islands with Farm's scheduler and providers; actions (from islands, and from forms in
25
+ * server components) refresh through Farm's router.
26
+ */
27
+ declare function createFarmIsolatedHydrationRuntime(options: FarmIslandsRuntimeOptions): {
28
+ hydrate: (scope?: ParentNode, signal?: AbortSignal) => Promise<void>;
29
+ carryOver: (current: ParentNode, next: ParentNode) => number;
30
+ updateModule: (src: string, module: Record<string, unknown>) => number;
31
+ dispose: (scope: Node) => void;
32
+ rootCount: () => number;
33
+ };
34
+ /** A page a hydrating layout keeps as server HTML; its islands start inside it. */
35
+ declare function createFarmServerPageBoundary(_React: typeof React__default, runtime: Parameters<typeof createServerHtml>[0]): React__default.ComponentType<Record<string, unknown> & {
36
+ as?: string;
37
+ dangerouslySetInnerHTML: {
38
+ __html: string;
39
+ };
40
+ }>;
41
+ /** A layout that hydrates as one React root: its client components join that root. */
42
+ declare function wrapFarmIsolatedClientGraph(_React: typeof React__default, element: React__default.ReactNode): React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>;
43
+ /** The page such a layout keeps as server HTML: its client components are islands again. */
44
+ declare function isolateFarmServerPageGraph(_React: typeof React__default, element: React__default.ReactNode): React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>;
45
+ /** An async page under a hydrating layout, as a server tree the browser rebuilds in its root. */
46
+ declare function renderFarmServerTreePage(_React: typeof React__default, element: React__default.ReactNode, options: {
47
+ isolate?(element: React__default.ReactNode): React__default.ReactNode;
48
+ payloadOnly?: boolean;
49
+ }): Promise<React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>>;
50
+ /** Rebuilds a server-tree page in the browser, inside the layout's React root. */
51
+ declare function createFarmServerTreeElement(_React: typeof React__default, source: ParentNode | string, options: {
52
+ load(reference: string): Promise<Record<string, unknown>>;
53
+ ServerHtml: React__default.ComponentType<any>;
54
+ key?: string;
55
+ }): Promise<React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null>;
56
+
57
+ export { type FarmIslandsRuntimeOptions, createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, createFarmServerTreeElement, isolateFarmServerPageGraph, renderFarmServerTreePage, wrapFarmIsolatedClientGraph };
@@ -0,0 +1,57 @@
1
+ import React__default from 'react';
2
+ import { createServerHtml } from '@farm.js/islx/react/client';
3
+ import { F as FarmIslandStrategy } from '../island-CfGru1MO.js';
4
+
5
+ /**
6
+ * @internal Islands mode's runtime (`experimental.serverComponents: { mode: "islands" }`), run by
7
+ * islx. Generated code imports these in islands mode under the names the isolated-hydration
8
+ * runtime uses, so the rest of Farm's runtime stays the same; apps on isolated hydration without
9
+ * islands mode never load islx.
10
+ */
11
+
12
+ interface FarmIslandsRuntimeOptions {
13
+ load(reference: string): Promise<Record<string, unknown>>;
14
+ schedule(options: {
15
+ container: Element;
16
+ strategy: FarmIslandStrategy;
17
+ signal?: AbortSignal;
18
+ hydrate(): Promise<void>;
19
+ }): Promise<unknown>;
20
+ wrap?(element: React__default.ReactElement): React__default.ReactNode;
21
+ report?(message: string, error?: unknown): void;
22
+ }
23
+ /**
24
+ * Hydrates islands with Farm's scheduler and providers; actions (from islands, and from forms in
25
+ * server components) refresh through Farm's router.
26
+ */
27
+ declare function createFarmIsolatedHydrationRuntime(options: FarmIslandsRuntimeOptions): {
28
+ hydrate: (scope?: ParentNode, signal?: AbortSignal) => Promise<void>;
29
+ carryOver: (current: ParentNode, next: ParentNode) => number;
30
+ updateModule: (src: string, module: Record<string, unknown>) => number;
31
+ dispose: (scope: Node) => void;
32
+ rootCount: () => number;
33
+ };
34
+ /** A page a hydrating layout keeps as server HTML; its islands start inside it. */
35
+ declare function createFarmServerPageBoundary(_React: typeof React__default, runtime: Parameters<typeof createServerHtml>[0]): React__default.ComponentType<Record<string, unknown> & {
36
+ as?: string;
37
+ dangerouslySetInnerHTML: {
38
+ __html: string;
39
+ };
40
+ }>;
41
+ /** A layout that hydrates as one React root: its client components join that root. */
42
+ declare function wrapFarmIsolatedClientGraph(_React: typeof React__default, element: React__default.ReactNode): React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>;
43
+ /** The page such a layout keeps as server HTML: its client components are islands again. */
44
+ declare function isolateFarmServerPageGraph(_React: typeof React__default, element: React__default.ReactNode): React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>;
45
+ /** An async page under a hydrating layout, as a server tree the browser rebuilds in its root. */
46
+ declare function renderFarmServerTreePage(_React: typeof React__default, element: React__default.ReactNode, options: {
47
+ isolate?(element: React__default.ReactNode): React__default.ReactNode;
48
+ payloadOnly?: boolean;
49
+ }): Promise<React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>>;
50
+ /** Rebuilds a server-tree page in the browser, inside the layout's React root. */
51
+ declare function createFarmServerTreeElement(_React: typeof React__default, source: ParentNode | string, options: {
52
+ load(reference: string): Promise<Record<string, unknown>>;
53
+ ServerHtml: React__default.ComponentType<any>;
54
+ key?: string;
55
+ }): Promise<React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null>;
56
+
57
+ export { type FarmIslandsRuntimeOptions, createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, createFarmServerTreeElement, isolateFarmServerPageGraph, renderFarmServerTreePage, wrapFarmIsolatedClientGraph };