@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
@@ -1,12 +1,73 @@
1
1
  import { FarmPresetRuntime } from './deployment.js';
2
+ import { F as FarmIslandStrategy } from './island.d-CfGru1MO.js';
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 };
package/dist/renderer.mjs CHANGED
@@ -1,9 +1,14 @@
1
+ import {
2
+ resolveFarmIsland
3
+ } from "./chunk-RQ6XX5IN.mjs";
4
+ import "./chunk-S32PDOLO.mjs";
1
5
  import {
2
6
  FARM_COMPONENT_EXTENSIONS,
3
7
  NO_RENDERER,
4
8
  REACT_RENDERER,
5
9
  assertFarmRendererServerModule,
6
10
  assertFarmRendererStreamingRuntime,
11
+ createFarmRendererHookError,
7
12
  defineRenderer,
8
13
  getFarmRendererCapabilities,
9
14
  getFarmRendererComponentExtensions,
@@ -11,12 +16,14 @@ import {
11
16
  isFarmRendererDisabled,
12
17
  isReactRenderer,
13
18
  loadFarmRendererVitePlugins,
19
+ readFarmRendererHydration,
14
20
  readFarmRendererWebStream,
15
21
  resolveFarmComponentExtensions,
16
22
  resolveFarmRenderer,
17
23
  resolveFarmRendererAppSetup,
18
24
  resolveFarmRendererModule
19
- } from "./chunk-RMLR5RMH.mjs";
25
+ } from "./chunk-BCCCPFHQ.mjs";
26
+ import "./chunk-VIXTAVEA.mjs";
20
27
  import "./chunk-TIZJYHB7.mjs";
21
28
  export {
22
29
  FARM_COMPONENT_EXTENSIONS,
@@ -24,6 +31,7 @@ export {
24
31
  REACT_RENDERER,
25
32
  assertFarmRendererServerModule,
26
33
  assertFarmRendererStreamingRuntime,
34
+ createFarmRendererHookError,
27
35
  defineRenderer,
28
36
  getFarmRendererCapabilities,
29
37
  getFarmRendererComponentExtensions,
@@ -31,8 +39,10 @@ export {
31
39
  isFarmRendererDisabled,
32
40
  isReactRenderer,
33
41
  loadFarmRendererVitePlugins,
42
+ readFarmRendererHydration,
34
43
  readFarmRendererWebStream,
35
44
  resolveFarmComponentExtensions,
45
+ resolveFarmIsland,
36
46
  resolveFarmRenderer,
37
47
  resolveFarmRendererAppSetup,
38
48
  resolveFarmRendererModule
@@ -1,4 +1,4 @@
1
- import './client-plugins.d-C1WM3ieD.mjs';
1
+ import './client-plugins.d-BwKwuO_0.mjs';
2
2
 
3
3
  /**
4
4
  * @internal How many times code that may read the visitor's cookies was handed `request`
@@ -1,4 +1,4 @@
1
- import './client-plugins.d-DcmDzcSC.js';
1
+ import './client-plugins.d-BVXjyIkY.js';
2
2
 
3
3
  /**
4
4
  * @internal How many times code that may read the visitor's cookies was handed `request`
@@ -1,11 +1,12 @@
1
- export { g as getCurrentRequest } from './request.d-BhggxQf3.mjs';
2
- import './client-plugins.d-C1WM3ieD.mjs';
1
+ export { g as getCurrentRequest } from './request.d-C2HOn3Hi.mjs';
2
+ import './client-plugins.d-BwKwuO_0.mjs';
3
3
  import './lifecycle.d-OtGWAvJT.mjs';
4
4
  import './route.d-ShmtqqVQ.mjs';
5
5
  import './endpoint.d-BXbBpKoh.mjs';
6
6
  import './cache.mjs';
7
7
  import './renderer.mjs';
8
8
  import './deployment.mjs';
9
+ import './island.d-CfGru1MO.mjs';
9
10
  import 'http';
10
11
  import './routing.d-D67HQmnv.mjs';
11
12
  import './types.d-euATAbE4.mjs';
package/dist/request.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- export { g as getCurrentRequest } from './request.d-CyJS9bjm.js';
2
- import './client-plugins.d-DcmDzcSC.js';
1
+ export { g as getCurrentRequest } from './request.d-CAeitOG1.js';
2
+ import './client-plugins.d-BVXjyIkY.js';
3
3
  import './lifecycle.d-OtGWAvJT.js';
4
4
  import './route.d-Cd4Fi6BA.js';
5
5
  import './endpoint.d-Dx_1k6Du.js';
6
6
  import './cache.js';
7
7
  import './renderer.js';
8
8
  import './deployment.js';
9
+ import './island.d-CfGru1MO.js';
9
10
  import 'http';
10
11
  import './routing.d-BhPgtN_S.js';
11
12
  import './types.d-euATAbE4.js';
@@ -1,4 +1,4 @@
1
- import { e as RouteModule } from './client-plugins.d-DcmDzcSC.js';
1
+ import { e as RouteModule } from './client-plugins.d-BVXjyIkY.js';
2
2
 
3
3
  /**
4
4
  * The rendering-mode merge shared by every consumer of route directives.
@@ -1,4 +1,4 @@
1
- import { e as RouteModule } from './client-plugins.d-C1WM3ieD.mjs';
1
+ import { e as RouteModule } from './client-plugins.d-BwKwuO_0.mjs';
2
2
 
3
3
  /**
4
4
  * The rendering-mode merge shared by every consumer of route directives.
@@ -1,6 +1,6 @@
1
1
  import { RefObject } from 'react';
2
2
  import { FarmRouterRouteInput } from './router.mjs';
3
- import { F as FarmNavigationBlockerContext, a as FarmNavigationState } from './spa-router.d-l3G38xHa.mjs';
3
+ import { F as FarmNavigationBlockerContext, a as FarmNavigationState } from './spa-router.d-BD-6WX1R.mjs';
4
4
 
5
5
  interface UseRouterOptions {
6
6
  basePath?: string;
@@ -1,6 +1,6 @@
1
1
  import { RefObject } from 'react';
2
2
  import { FarmRouterRouteInput } from './router.js';
3
- import { F as FarmNavigationBlockerContext, a as FarmNavigationState } from './spa-router.d-Bjgl-Osi.js';
3
+ import { F as FarmNavigationBlockerContext, a as FarmNavigationState } from './spa-router.d-Cw5i_15e.js';
4
4
 
5
5
  interface UseRouterOptions {
6
6
  basePath?: string;
@@ -1,6 +1,6 @@
1
1
  import { m as FarmI18nRouting } from './types.d-euATAbE4.mjs';
2
2
  import { o as FarmMobileRouteScreen, p as FarmMobileScreen, m as FarmMobilePresentation, l as FarmMobilePrefetch, k as FarmMobilePageConfig, F as FarmMobileOS, R as ResolvedFarmMobileConfig, q as FarmMobileTab } from './config.d-BKIhJtmr.mjs';
3
- import { P as PlatformRouteFiles } from './generate-route-types.d-CaGMIaNI.mjs';
3
+ import { P as PlatformRouteFiles } from './generate-route-types.d-BFOMM8Ef.mjs';
4
4
 
5
5
  type FarmUiNodeKind = "View" | "Text" | "Image" | "Pressable" | "TextInput" | "List";
6
6
  /** A minimal, platform-neutral UI tree for a portable component. No emitter reads it yet. */
@@ -1,6 +1,6 @@
1
1
  import { m as FarmI18nRouting } from './types.d-euATAbE4.js';
2
2
  import { o as FarmMobileRouteScreen, p as FarmMobileScreen, m as FarmMobilePresentation, l as FarmMobilePrefetch, k as FarmMobilePageConfig, F as FarmMobileOS, R as ResolvedFarmMobileConfig, q as FarmMobileTab } from './config.d-BKIhJtmr.js';
3
- import { P as PlatformRouteFiles } from './generate-route-types.d-B76M5R11.js';
3
+ import { P as PlatformRouteFiles } from './generate-route-types.d-C2m8myHb.js';
4
4
 
5
5
  type FarmUiNodeKind = "View" | "Text" | "Image" | "Pressable" | "TextInput" | "List";
6
6
  /** A minimal, platform-neutral UI tree for a portable component. No emitter reads it yet. */
package/dist/routes.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { o as FarmAppContext, p as PageProps, q as FarmSearchParams, s as PluginContextProps, b as FarmRouteRuntimeConfig, M as Metadata, e as RouteModule, L as LayoutProps, t as FarmRouteRuntime, u as FarmRouteRegions, v as FarmRouteMaxDuration, P as ParsedRoute } from './client-plugins.d-C1WM3ieD.mjs';
1
+ import { o as FarmAppContext, p as PageProps, q as FarmSearchParams, s as PluginContextProps, b as FarmRouteRuntimeConfig, M as Metadata, e as RouteModule, L as LayoutProps, t as FarmRouteRuntime, u as FarmRouteRegions, v as FarmRouteMaxDuration, P as ParsedRoute } from './client-plugins.d-BwKwuO_0.mjs';
2
2
  import { ComponentType } from 'react';
3
3
  import { RouteDataCacheKey } from './cache.mjs';
4
4
  import { ServerFn } from './server-fn.mjs';
@@ -37,6 +37,7 @@ import './config.d-BKIhJtmr.mjs';
37
37
  import './types.d-DQnyD3VD.mjs';
38
38
  import './font.mjs';
39
39
  import './deployment.mjs';
40
+ import './island.d-CfGru1MO.mjs';
40
41
 
41
42
  type ProgrammaticRouteRenderMode = "static" | "dynamic";
42
43
  type ProgrammaticRouteMethod = "GET" | "HEAD" | "QUERY" | "POST" | "PUT" | "DELETE" | "PATCH" | "OPTIONS";
package/dist/routes.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { o as FarmAppContext, p as PageProps, q as FarmSearchParams, s as PluginContextProps, b as FarmRouteRuntimeConfig, M as Metadata, e as RouteModule, L as LayoutProps, t as FarmRouteRuntime, u as FarmRouteRegions, v as FarmRouteMaxDuration, P as ParsedRoute } from './client-plugins.d-DcmDzcSC.js';
1
+ import { o as FarmAppContext, p as PageProps, q as FarmSearchParams, s as PluginContextProps, b as FarmRouteRuntimeConfig, M as Metadata, e as RouteModule, L as LayoutProps, t as FarmRouteRuntime, u as FarmRouteRegions, v as FarmRouteMaxDuration, P as ParsedRoute } from './client-plugins.d-BVXjyIkY.js';
2
2
  import { ComponentType } from 'react';
3
3
  import { RouteDataCacheKey } from './cache.js';
4
4
  import { ServerFn } from './server-fn.js';
@@ -37,6 +37,7 @@ import './config.d-BKIhJtmr.js';
37
37
  import './types.d-DQnyD3VD.js';
38
38
  import './font.js';
39
39
  import './deployment.js';
40
+ import './island.d-CfGru1MO.js';
40
41
 
41
42
  type ProgrammaticRouteRenderMode = "static" | "dynamic";
42
43
  type ProgrammaticRouteMethod = "GET" | "HEAD" | "QUERY" | "POST" | "PUT" | "DELETE" | "PATCH" | "OPTIONS";
@@ -2,32 +2,32 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkN2EFMN2Kcjs = require('./chunk-N2EFMN2K.cjs');
5
+ var _chunkHOQ2MYBJcjs = require('./chunk-HOQ2MYBJ.cjs');
6
6
  require('./chunk-PWMJBCAN.cjs');
7
- require('./chunk-LM2ZDNDD.cjs');
7
+ require('./chunk-BOEDYXAX.cjs');
8
8
  require('./chunk-OZC2JPW6.cjs');
9
9
  require('./chunk-Y2FEFQAY.cjs');
10
10
  require('./chunk-DMSXZNQR.cjs');
11
+ require('./chunk-AQLHD6HZ.cjs');
12
+ require('./chunk-YKHRCY4T.cjs');
11
13
 
12
14
 
13
15
 
14
16
 
15
17
 
16
18
 
17
- var _chunkBBVLOENDcjs = require('./chunk-BBVLOEND.cjs');
18
- require('./chunk-AQLHD6HZ.cjs');
19
- require('./chunk-YKHRCY4T.cjs');
20
- require('./chunk-UVV3I5QA.cjs');
19
+ var _chunkF7JVO3OZcjs = require('./chunk-F7JVO3OZ.cjs');
20
+ require('./chunk-L2GUEYHR.cjs');
21
21
  require('./chunk-IIHZ2BEE.cjs');
22
22
  require('./chunk-LSHX2H5G.cjs');
23
23
  require('./chunk-STF6VDYQ.cjs');
24
24
  require('./chunk-EACD6ND7.cjs');
25
- require('./chunk-6JHZPB52.cjs');
26
25
  require('./chunk-BTVDYS4B.cjs');
27
26
  require('./chunk-OLKYHTLN.cjs');
28
- require('./chunk-RE5E2G5S.cjs');
27
+ require('./chunk-6JHZPB52.cjs');
28
+ require('./chunk-MNUYXZV7.cjs');
29
29
  require('./chunk-52Q4OB4A.cjs');
30
- require('./chunk-BCTHOQPP.cjs');
30
+ require('./chunk-3OKSEJ33.cjs');
31
31
  require('./chunk-MCSRMEQV.cjs');
32
32
  require('./chunk-HQKCSJEH.cjs');
33
33
  require('./chunk-XRFGOYXG.cjs');
@@ -86,4 +86,4 @@ require('./chunk-UZM3PDKK.cjs');
86
86
 
87
87
 
88
88
 
89
- exports.FARM_RSC_PACKAGES = _chunkBBVLOENDcjs.FARM_RSC_PACKAGES; exports.buildFarmRsc = _chunkN2EFMN2Kcjs.buildFarmRsc; exports.createFarmRscDevServer = _chunkN2EFMN2Kcjs.createFarmRscDevServer; exports.createFarmRscViteConfig = _chunkN2EFMN2Kcjs.createFarmRscViteConfig; exports.farmAppUsesRscPipeline = _chunkBBVLOENDcjs.farmAppUsesRscPipeline; exports.farmConfigUsesServerComponents = _chunkBBVLOENDcjs.farmConfigUsesServerComponents; exports.inspectFarmServerComponents = _chunkBBVLOENDcjs.inspectFarmServerComponents; exports.resolveFarmRscCheckConfig = _chunkBBVLOENDcjs.resolveFarmRscCheckConfig;
89
+ exports.FARM_RSC_PACKAGES = _chunkF7JVO3OZcjs.FARM_RSC_PACKAGES; exports.buildFarmRsc = _chunkHOQ2MYBJcjs.buildFarmRsc; exports.createFarmRscDevServer = _chunkHOQ2MYBJcjs.createFarmRscDevServer; exports.createFarmRscViteConfig = _chunkHOQ2MYBJcjs.createFarmRscViteConfig; exports.farmAppUsesRscPipeline = _chunkF7JVO3OZcjs.farmAppUsesRscPipeline; exports.farmConfigUsesServerComponents = _chunkF7JVO3OZcjs.farmConfigUsesServerComponents; exports.inspectFarmServerComponents = _chunkF7JVO3OZcjs.inspectFarmServerComponents; exports.resolveFarmRscCheckConfig = _chunkF7JVO3OZcjs.resolveFarmRscCheckConfig;
@@ -2,32 +2,32 @@ import {
2
2
  buildFarmRsc,
3
3
  createFarmRscDevServer,
4
4
  createFarmRscViteConfig
5
- } from "./chunk-I4DR3HCH.mjs";
5
+ } from "./chunk-INU4K4U4.mjs";
6
6
  import "./chunk-RLEAVG6G.mjs";
7
- import "./chunk-CJDBTTLB.mjs";
7
+ import "./chunk-EDBIBO67.mjs";
8
8
  import "./chunk-VISQDC6W.mjs";
9
9
  import "./chunk-7V5M43ND.mjs";
10
10
  import "./chunk-MO4UTDQ6.mjs";
11
+ import "./chunk-SMUW7UST.mjs";
12
+ import "./chunk-UB7RVEMX.mjs";
11
13
  import {
12
14
  FARM_RSC_PACKAGES,
13
15
  farmAppUsesRscPipeline,
14
16
  farmConfigUsesServerComponents,
15
17
  inspectFarmServerComponents,
16
18
  resolveFarmRscCheckConfig
17
- } from "./chunk-YSU3WCW6.mjs";
18
- import "./chunk-SMUW7UST.mjs";
19
- import "./chunk-UB7RVEMX.mjs";
20
- import "./chunk-TPA2PV5J.mjs";
19
+ } from "./chunk-MYSH5Y4E.mjs";
20
+ import "./chunk-5V6HSJFG.mjs";
21
21
  import "./chunk-YVVY276M.mjs";
22
22
  import "./chunk-XR2ZIBQK.mjs";
23
23
  import "./chunk-CU5SYTJG.mjs";
24
24
  import "./chunk-NQ3Y6E2T.mjs";
25
- import "./chunk-22W4FNTG.mjs";
26
25
  import "./chunk-SQ5O7I3L.mjs";
27
26
  import "./chunk-XGL42MQ7.mjs";
28
- import "./chunk-4QENVMG7.mjs";
27
+ import "./chunk-22W4FNTG.mjs";
28
+ import "./chunk-RJBUI5AN.mjs";
29
29
  import "./chunk-Z3RM3VA2.mjs";
30
- import "./chunk-RMLR5RMH.mjs";
30
+ import "./chunk-BCCCPFHQ.mjs";
31
31
  import "./chunk-AOIUYHPH.mjs";
32
32
  import "./chunk-7VJXYB6S.mjs";
33
33
  import "./chunk-NLATR3T3.mjs";
@@ -23,11 +23,8 @@ import "./chunk-UBLKPREL.mjs";
23
23
  import {
24
24
  loadConfig,
25
25
  resolveConfig
26
- } from "./chunk-CJDBTTLB.mjs";
26
+ } from "./chunk-EDBIBO67.mjs";
27
27
  import "./chunk-VISQDC6W.mjs";
28
- import {
29
- scanRoutePatterns
30
- } from "./chunk-AUFEM3FB.mjs";
31
28
  import {
32
29
  createPlatformBlockChecker,
33
30
  isPlainObject,
@@ -36,24 +33,26 @@ import {
36
33
  resolvePlatformBlock,
37
34
  resolvePlatformProfile
38
35
  } from "./chunk-UB7RVEMX.mjs";
36
+ import {
37
+ scanRoutePatterns
38
+ } from "./chunk-L5HDCDFT.mjs";
39
39
  import "./chunk-YFTGIHNC.mjs";
40
- import "./chunk-TPA2PV5J.mjs";
40
+ import "./chunk-5V6HSJFG.mjs";
41
41
  import "./chunk-YVVY276M.mjs";
42
42
  import "./chunk-XR2ZIBQK.mjs";
43
43
  import "./chunk-CU5SYTJG.mjs";
44
44
  import "./chunk-NQ3Y6E2T.mjs";
45
- import "./chunk-22W4FNTG.mjs";
46
45
  import "./chunk-SQ5O7I3L.mjs";
47
46
  import "./chunk-XGL42MQ7.mjs";
48
- import {
49
- resolveFarmServerComponentsMode
50
- } from "./chunk-4QENVMG7.mjs";
47
+ import "./chunk-22W4FNTG.mjs";
48
+ import "./chunk-RJBUI5AN.mjs";
51
49
  import {
52
50
  getFarmSourceRoots
53
51
  } from "./chunk-Z3RM3VA2.mjs";
54
52
  import {
55
- getFarmRendererComponentExtensions
56
- } from "./chunk-RMLR5RMH.mjs";
53
+ getFarmRendererComponentExtensions,
54
+ resolveFarmServerComponentsMode
55
+ } from "./chunk-BCCCPFHQ.mjs";
57
56
  import "./chunk-AOIUYHPH.mjs";
58
57
  import "./chunk-7VJXYB6S.mjs";
59
58
  import "./chunk-NLATR3T3.mjs";
@@ -1129,6 +1128,7 @@ async function resolveFarmMobileApp(options = {}) {
1129
1128
  srcDir: config.srcDir,
1130
1129
  sourceRoots: getFarmSourceRoots(config),
1131
1130
  componentExtensions: getFarmRendererComponentExtensions(config.renderer),
1131
+ renderer: config.renderer,
1132
1132
  platformFiles: true
1133
1133
  });
1134
1134
  const routes = [...scan.pages, ...scan.nativeOnlyPages].sort();
@@ -1191,7 +1191,7 @@ async function resolveFarmMobileApp(options = {}) {
1191
1191
  return decision.source === "default" || decision.requested !== void 0;
1192
1192
  });
1193
1193
  const portable = mobile.native.engine !== "platform" && (mobile.native.auto === "on" || candidates.some((route) => screens[route].requested === "native"));
1194
- const { analyzeFarmMobileRoutes } = await import("./analyzer-RPU2KG4J.mjs");
1194
+ const { analyzeFarmMobileRoutes } = await import("./analyzer-7RNO3XKC.mjs");
1195
1195
  const analyzed = await analyzeFarmMobileRoutes({
1196
1196
  root,
1197
1197
  srcDir: config.srcDir,
@@ -23,37 +23,36 @@ require('./chunk-YUQUGVSV.cjs');
23
23
 
24
24
 
25
25
 
26
- var _chunkLM2ZDNDDcjs = require('./chunk-LM2ZDNDD.cjs');
26
+ var _chunkBOEDYXAXcjs = require('./chunk-BOEDYXAX.cjs');
27
27
  require('./chunk-OZC2JPW6.cjs');
28
28
 
29
29
 
30
- var _chunkS7WZUK3Bcjs = require('./chunk-S7WZUK3B.cjs');
31
30
 
32
31
 
33
32
 
34
33
 
35
34
 
35
+ var _chunkYKHRCY4Tcjs = require('./chunk-YKHRCY4T.cjs');
36
36
 
37
37
 
38
- var _chunkYKHRCY4Tcjs = require('./chunk-YKHRCY4T.cjs');
38
+ var _chunkGLNVLCUHcjs = require('./chunk-GLNVLCUH.cjs');
39
39
  require('./chunk-AQIRXBBY.cjs');
40
- require('./chunk-UVV3I5QA.cjs');
40
+ require('./chunk-L2GUEYHR.cjs');
41
41
  require('./chunk-IIHZ2BEE.cjs');
42
42
  require('./chunk-LSHX2H5G.cjs');
43
43
  require('./chunk-STF6VDYQ.cjs');
44
44
  require('./chunk-EACD6ND7.cjs');
45
- require('./chunk-6JHZPB52.cjs');
46
45
  require('./chunk-BTVDYS4B.cjs');
47
46
  require('./chunk-OLKYHTLN.cjs');
48
-
49
-
50
- var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
47
+ require('./chunk-6JHZPB52.cjs');
48
+ require('./chunk-MNUYXZV7.cjs');
51
49
 
52
50
 
53
51
  var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
54
52
 
55
53
 
56
- var _chunkBCTHOQPPcjs = require('./chunk-BCTHOQPP.cjs');
54
+
55
+ var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
57
56
  require('./chunk-MCSRMEQV.cjs');
58
57
  require('./chunk-HQKCSJEH.cjs');
59
58
  require('./chunk-XRFGOYXG.cjs');
@@ -1109,7 +1108,7 @@ async function resolveFarmMobileApp(options = {}) {
1109
1108
  const root = path2.resolve(_nullishCoalesce(_nullishCoalesce(_optionalChain([options, 'access', _76 => _76.config, 'optionalAccess', _77 => _77.root]), () => ( options.root)), () => ( process.cwd())));
1110
1109
  const command = _nullishCoalesce(options.command, () => ( "build"));
1111
1110
  const mode = command === "dev" ? "development" : "production";
1112
- const userConfig = options.userConfig === void 0 ? await _chunkLM2ZDNDDcjs.loadConfig.call(void 0, root, void 0, mode) : options.userConfig;
1111
+ const userConfig = options.userConfig === void 0 ? await _chunkBOEDYXAXcjs.loadConfig.call(void 0, root, void 0, mode) : options.userConfig;
1113
1112
  if (_optionalChain([userConfig, 'optionalAccess', _78 => _78.mobile]) === void 0) {
1114
1113
  throw new FarmMobileError(
1115
1114
  'farm.config.ts has no `mobile` entry. Add one, such as `mobile: { id: "com.example.notes", server: "https://notes.example.com" }`.'
@@ -1123,12 +1122,13 @@ async function resolveFarmMobileApp(options = {}) {
1123
1122
  mode
1124
1123
  });
1125
1124
  const block = await resolveFarmMobileBlock(userConfig.mobile, context, options.cache);
1126
- const config = await _asyncNullishCoalesce(options.config, async () => ( await _chunkLM2ZDNDDcjs.resolveConfig.call(void 0, { ...userConfig, root }, mode)));
1127
- const scan = await _chunkS7WZUK3Bcjs.scanRoutePatterns.call(void 0, {
1125
+ const config = await _asyncNullishCoalesce(options.config, async () => ( await _chunkBOEDYXAXcjs.resolveConfig.call(void 0, { ...userConfig, root }, mode)));
1126
+ const scan = await _chunkGLNVLCUHcjs.scanRoutePatterns.call(void 0, {
1128
1127
  root,
1129
1128
  srcDir: config.srcDir,
1130
1129
  sourceRoots: _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, config),
1131
- componentExtensions: _chunkBCTHOQPPcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer),
1130
+ componentExtensions: _chunk3OKSEJ33cjs.getFarmRendererComponentExtensions.call(void 0, config.renderer),
1131
+ renderer: config.renderer,
1132
1132
  platformFiles: true
1133
1133
  });
1134
1134
  const routes = [...scan.pages, ...scan.nativeOnlyPages].sort();
@@ -1191,14 +1191,14 @@ async function resolveFarmMobileApp(options = {}) {
1191
1191
  return decision.source === "default" || decision.requested !== void 0;
1192
1192
  });
1193
1193
  const portable = mobile.native.engine !== "platform" && (mobile.native.auto === "on" || candidates.some((route) => screens[route].requested === "native"));
1194
- const { analyzeFarmMobileRoutes } = await import("./analyzer-LV23T6QN.cjs");
1194
+ const { analyzeFarmMobileRoutes } = await import("./analyzer-PFKA5NI6.cjs");
1195
1195
  const analyzed = await analyzeFarmMobileRoutes({
1196
1196
  root,
1197
1197
  srcDir: config.srcDir,
1198
1198
  routes: portable ? routes : candidates,
1199
1199
  pageFiles: scan.pageFiles,
1200
1200
  nativeOnlyRoutes: scan.nativeOnlyPages,
1201
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _82 => _82.experimental, 'optionalAccess', _83 => _83.serverComponents])) !== void 0,
1201
+ serverComponents: _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _82 => _82.experimental, 'optionalAccess', _83 => _83.serverComponents])) !== void 0,
1202
1202
  cacheFile: path2.resolve(root, getFarmMobileOutputDirs(config.distDir).analyzerCache)
1203
1203
  });
1204
1204
  analyzerStats = analyzed.stats;