@farm.js/core 0.1.60 → 0.1.62

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 (265) hide show
  1. package/dist/{agent-mcp.d-C-2S9bnP.d.mts → agent-mcp.d-BKZ3UNbt.d.mts} +1 -1
  2. package/dist/{agent-mcp.d-SIoCUP1I.d.ts → agent-mcp.d-C1zr_nGS.d.ts} +1 -1
  3. package/dist/agent-runtime.cjs +3 -3
  4. package/dist/agent-runtime.d.mts +2 -2
  5. package/dist/agent-runtime.d.ts +2 -2
  6. package/dist/agent-runtime.mjs +2 -2
  7. package/dist/analyzer-2AHWJJR7.cjs +15 -0
  8. package/dist/analyzer-YESYU3GK.mjs +15 -0
  9. package/dist/api/route-manager.cjs +4 -4
  10. package/dist/api/route-manager.d.mts +4 -4
  11. package/dist/api/route-manager.d.ts +4 -4
  12. package/dist/api/route-manager.mjs +3 -3
  13. package/dist/api/runtime.cjs +3 -3
  14. package/dist/api/runtime.d.mts +3 -3
  15. package/dist/api/runtime.d.ts +3 -3
  16. package/dist/api/runtime.mjs +2 -2
  17. package/dist/api.cjs +5 -5
  18. package/dist/api.d.mts +4 -4
  19. package/dist/api.d.ts +4 -4
  20. package/dist/api.mjs +4 -4
  21. package/dist/{app-manifest.d-DrSAHskY.d.mts → app-manifest.d-BpvhfKRH.d.mts} +1 -1
  22. package/dist/{app-manifest.d-Tb3CJpL4.d.ts → app-manifest.d-ntch_bvA.d.ts} +1 -1
  23. package/dist/app-markdown.d.mts +3 -3
  24. package/dist/app-markdown.d.ts +3 -3
  25. package/dist/{app.d-CmWlYpZJ.d.ts → app.d-AE8_v3Db.d.ts} +4 -10
  26. package/dist/{app.d-D6QQM_kk.d.mts → app.d-CysWA_8v.d.mts} +4 -10
  27. package/dist/{chunk-FORSVMEJ.mjs → chunk-2CNKQC3G.mjs} +1 -1
  28. package/dist/{chunk-ZFUKPWFC.mjs → chunk-2JYBLE63.mjs} +416 -208
  29. package/dist/{chunk-QRX4JRBO.cjs → chunk-3CCAICF7.cjs} +5 -5
  30. package/dist/{chunk-ANHZ6SUL.mjs → chunk-3TXKFRSO.mjs} +1 -1
  31. package/dist/{chunk-BHJAYPYU.mjs → chunk-3UZVPO72.mjs} +1 -1
  32. package/dist/{chunk-6UUH4N4J.mjs → chunk-43V3ANPQ.mjs} +1 -1
  33. package/dist/chunk-4EBC7EMW.cjs +8 -0
  34. package/dist/{chunk-VZY7MAVS.cjs → chunk-4IHMHFQB.cjs} +27 -1
  35. package/dist/{chunk-FK25QSVC.cjs → chunk-4P5634G6.cjs} +2 -2
  36. package/dist/{chunk-4JTQPOKO.cjs → chunk-53ZCZ46B.cjs} +2 -2
  37. package/dist/{chunk-NQJDO7K7.cjs → chunk-545WJ5UG.cjs} +321 -37
  38. package/dist/{chunk-VU3MYZPO.mjs → chunk-5FE5YT2N.mjs} +26 -0
  39. package/dist/{chunk-A5BJKSZE.cjs → chunk-5IQ2ERQA.cjs} +2 -2
  40. package/dist/{chunk-SJRCWF4Z.mjs → chunk-5Y22WNTO.mjs} +2 -2
  41. package/dist/{chunk-U4BJKNIR.cjs → chunk-752XUZIM.cjs} +11 -6
  42. package/dist/{chunk-JBK7UJOI.cjs → chunk-AJB3DHN6.cjs} +2 -2
  43. package/dist/{chunk-YB44NKC2.cjs → chunk-AXVRUDMB.cjs} +2 -2
  44. package/dist/{chunk-LJVNMGE3.mjs → chunk-BM2LH2JM.mjs} +8 -3
  45. package/dist/{chunk-YI6FKTTN.cjs → chunk-BT4SEFLC.cjs} +261 -38
  46. package/dist/{chunk-LIFUPCXW.cjs → chunk-CFG4QERR.cjs} +13 -2
  47. package/dist/{chunk-3OWVWZ6R.cjs → chunk-CLFEQGET.cjs} +6 -6
  48. package/dist/{chunk-OZK2DS44.mjs → chunk-CROAFCMW.mjs} +1 -1
  49. package/dist/{chunk-2KTYMMWT.mjs → chunk-DPE53XWL.mjs} +1 -1
  50. package/dist/{chunk-3PX4AIXO.mjs → chunk-DQF3QLOH.mjs} +258 -35
  51. package/dist/{chunk-FSQMN2MQ.mjs → chunk-E46NXBNJ.mjs} +1 -1
  52. package/dist/{chunk-EGVC4LIG.mjs → chunk-E4RDMG3K.mjs} +1 -1
  53. package/dist/{chunk-X2CZTWQA.mjs → chunk-ECKQFEX2.mjs} +1 -1
  54. package/dist/{chunk-MTWXOEI4.cjs → chunk-EXXFSZOC.cjs} +246 -193
  55. package/dist/{chunk-UYSTTPYJ.cjs → chunk-GGNJAGGE.cjs} +643 -435
  56. package/dist/{chunk-XTG73QZA.cjs → chunk-GVOMPU3Y.cjs} +12 -8
  57. package/dist/{chunk-ZP32GNJQ.cjs → chunk-I32V5CZL.cjs} +14 -13
  58. package/dist/{chunk-37PYUEK5.mjs → chunk-IOF4KXMP.mjs} +7 -3
  59. package/dist/{chunk-ILMTRGBG.mjs → chunk-IQIKPKFP.mjs} +157 -45
  60. package/dist/{chunk-5JNUYGNF.cjs → chunk-IWRLV46X.cjs} +2 -2
  61. package/dist/{chunk-KPOMS5RO.cjs → chunk-J3GFOQOL.cjs} +3 -3
  62. package/dist/{chunk-NHD7BAKD.mjs → chunk-JCEFKP5M.mjs} +41 -25
  63. package/dist/{analyzer-LCSI3NSH.cjs → chunk-JEJQGZI7.cjs} +16 -13
  64. package/dist/{chunk-LB3DPQP6.cjs → chunk-JLDNXURZ.cjs} +23 -23
  65. package/dist/{chunk-VGG74PSU.cjs → chunk-L2JG337G.cjs} +2 -2
  66. package/dist/chunk-L4RTTTVE.mjs +8 -0
  67. package/dist/chunk-LEJDW34D.cjs +115 -0
  68. package/dist/{analyzer-22BEYV7S.mjs → chunk-LVWGURLD.mjs} +6 -3
  69. package/dist/{chunk-Z5A6CNV2.mjs → chunk-MK5E44WP.mjs} +1 -1
  70. package/dist/{chunk-T4EW7AAD.mjs → chunk-NKRZLQUK.mjs} +2 -2
  71. package/dist/{chunk-HPWB57PZ.mjs → chunk-NT3QDN2E.mjs} +1 -1
  72. package/dist/{chunk-T7I62A4C.mjs → chunk-OUWRNHTV.mjs} +81 -28
  73. package/dist/{chunk-GFT5AHAT.mjs → chunk-QDWMCFTH.mjs} +12 -1
  74. package/dist/{chunk-AER5I65K.mjs → chunk-QTD6EMN2.mjs} +1 -1
  75. package/dist/{chunk-UDJY2ZGY.cjs → chunk-RMUD75WT.cjs} +413 -301
  76. package/dist/chunk-RZNCMRD3.mjs +141 -0
  77. package/dist/{chunk-D7LTCK3U.mjs → chunk-SA7MLSP4.mjs} +11 -6
  78. package/dist/{chunk-2FRLSDBT.cjs → chunk-SM25ZC4S.cjs} +1 -1
  79. package/dist/{chunk-3YMLUNL2.cjs → chunk-SVXOCTQ2.cjs} +1 -1
  80. package/dist/{chunk-W2RZ73IU.cjs → chunk-SYXPWJ7N.cjs} +8 -8
  81. package/dist/{chunk-F6Y7ZAPQ.mjs → chunk-T46NNU4D.mjs} +6 -3
  82. package/dist/{chunk-IFHPDLIS.mjs → chunk-TGULJSHD.mjs} +5 -4
  83. package/dist/{chunk-JPIUGDK4.mjs → chunk-TZVUF5JJ.mjs} +1 -1
  84. package/dist/chunk-UWI3SJAK.cjs +141 -0
  85. package/dist/{chunk-JI5D7MXY.mjs → chunk-UYRI6U3P.mjs} +1 -1
  86. package/dist/{chunk-D2X5MUF5.cjs → chunk-V727H3RI.cjs} +47 -31
  87. package/dist/{chunk-ZMHAFH4R.mjs → chunk-VM7X5CKC.mjs} +2 -2
  88. package/dist/{chunk-VPTWKOCY.mjs → chunk-VWW4Q3BJ.mjs} +287 -6
  89. package/dist/{chunk-4P23B7DU.cjs → chunk-WKJQ2FJA.cjs} +3 -3
  90. package/dist/{chunk-HASX6DC7.cjs → chunk-WKPBIT5Q.cjs} +8 -8
  91. package/dist/{chunk-RAWWCDCT.cjs → chunk-WYAXRIYP.cjs} +3 -3
  92. package/dist/{chunk-3TL3AH25.cjs → chunk-X4K7TYN6.cjs} +12 -7
  93. package/dist/chunk-XCXHQBMM.mjs +115 -0
  94. package/dist/{chunk-DPJ66FSI.cjs → chunk-XX32BOMM.cjs} +7 -7
  95. package/dist/{chunk-2IAPKPEB.cjs → chunk-YN6BHOYY.cjs} +6 -6
  96. package/dist/{chunk-CBKRS3M4.cjs → chunk-Z7P2BTZ3.cjs} +7 -6
  97. package/dist/{chunk-SX7EECTS.mjs → chunk-ZBUAOGMY.mjs} +1 -1
  98. package/dist/{chunk-RPUJHJHE.mjs → chunk-ZFWYCVKS.mjs} +4 -3
  99. package/dist/{chunk-IFXSBJPN.cjs → chunk-ZVIEFTUA.cjs} +20 -17
  100. package/dist/{chunk-EXUONJYV.mjs → chunk-ZZI56IUY.mjs} +3 -3
  101. package/dist/{programmatic-routes-client.d-CLG2N1yH.d.ts → client-component.d-Bgt3x5Fu.d.ts} +18 -3
  102. package/dist/{programmatic-routes-client.d-CPbNqtIi.d.mts → client-component.d-BoqC2MLC.d.mts} +18 -3
  103. package/dist/{client-plugins.d-vXrbcfJ1.d.ts → client-plugins.d-BcqIy4au.d.ts} +1 -1
  104. package/dist/{client-plugins.d-CgQQ-EAv.d.mts → client-plugins.d-CWyYBxXf.d.mts} +1 -1
  105. package/dist/client-plugins.d.mts +2 -2
  106. package/dist/client-plugins.d.ts +2 -2
  107. package/dist/client.d.mts +7 -7
  108. package/dist/client.d.ts +7 -7
  109. package/dist/{config.d-DqZkLwef.d.ts → config.d-qt-mE8O5.d.mts} +6 -2
  110. package/dist/{config.d-DqZkLwef.d.mts → config.d-qt-mE8O5.d.ts} +6 -2
  111. package/dist/config.d.mts +2 -2
  112. package/dist/config.d.ts +2 -2
  113. package/dist/cron.cjs +12 -2
  114. package/dist/cron.d.mts +101 -3
  115. package/dist/cron.d.ts +101 -3
  116. package/dist/cron.mjs +11 -1
  117. package/dist/desktop.d.mts +3 -3
  118. package/dist/desktop.d.ts +3 -3
  119. package/dist/{devtools-KQZ6SRCJ.mjs → devtools-NUVXYG7I.mjs} +6 -6
  120. package/dist/{devtools-UF6JYHUN.cjs → devtools-SVRSGPNC.cjs} +8 -8
  121. package/dist/docs.cjs +9 -9
  122. package/dist/docs.d.mts +3 -3
  123. package/dist/docs.d.ts +3 -3
  124. package/dist/docs.mjs +8 -8
  125. package/dist/image/server.cjs +3 -3
  126. package/dist/image/server.mjs +2 -2
  127. package/dist/image/sharp.cjs +10 -10
  128. package/dist/image/sharp.mjs +2 -2
  129. package/dist/index.cjs +42 -27
  130. package/dist/{index.d-Dmfb7Kb_.d.mts → index.d-BDaiu2i5.d.mts} +1 -1
  131. package/dist/{index.d-DlCELfhf.d.ts → index.d-nAncqTXz.d.ts} +1 -1
  132. package/dist/index.d.mts +18 -18
  133. package/dist/index.d.ts +18 -18
  134. package/dist/index.mjs +42 -27
  135. package/dist/integrations.cjs +3 -3
  136. package/dist/integrations.d.mts +2 -2
  137. package/dist/integrations.d.ts +2 -2
  138. package/dist/integrations.mjs +2 -2
  139. package/dist/internal/app-markdown-runtime.d.mts +3 -3
  140. package/dist/internal/app-markdown-runtime.d.ts +3 -3
  141. package/dist/internal/build-runtime.cjs +27 -22
  142. package/dist/internal/build-runtime.d.mts +4 -4
  143. package/dist/internal/build-runtime.d.ts +4 -4
  144. package/dist/internal/build-runtime.mjs +26 -21
  145. package/dist/internal/cli-runtime.cjs +12 -11
  146. package/dist/internal/cli-runtime.mjs +11 -10
  147. package/dist/internal/client-error-overlay.cjs +4 -4
  148. package/dist/internal/client-error-overlay.mjs +1 -1
  149. package/dist/internal/client-runtime.d.mts +5 -5
  150. package/dist/internal/client-runtime.d.ts +5 -5
  151. package/dist/internal/compression-runtime.d.mts +2 -2
  152. package/dist/internal/compression-runtime.d.ts +2 -2
  153. package/dist/internal/config-runtime.cjs +8 -8
  154. package/dist/internal/config-runtime.d.mts +5 -5
  155. package/dist/internal/config-runtime.d.ts +5 -5
  156. package/dist/internal/config-runtime.mjs +7 -7
  157. package/dist/internal/form-actions.cjs +4 -4
  158. package/dist/internal/form-actions.mjs +3 -3
  159. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  160. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  161. package/dist/internal/metadata-image-runtime.cjs +3 -3
  162. package/dist/internal/metadata-image-runtime.mjs +2 -2
  163. package/dist/internal/native-server-fns.cjs +25 -0
  164. package/dist/internal/native-server-fns.d.mts +42 -0
  165. package/dist/internal/native-server-fns.d.ts +42 -0
  166. package/dist/internal/native-server-fns.mjs +25 -0
  167. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  168. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  169. package/dist/internal/production-node-env.cjs +2 -2
  170. package/dist/internal/production-node-env.mjs +1 -1
  171. package/dist/internal/production-runtime.cjs +16 -10
  172. package/dist/internal/production-runtime.d.mts +39 -12
  173. package/dist/internal/production-runtime.d.ts +39 -12
  174. package/dist/internal/production-runtime.mjs +15 -9
  175. package/dist/internal/react-cache.cjs +51 -0
  176. package/dist/internal/react-cache.d.mts +3 -0
  177. package/dist/internal/react-cache.d.ts +3 -0
  178. package/dist/internal/react-cache.mjs +51 -0
  179. package/dist/markdown.d.mts +2 -2
  180. package/dist/markdown.d.ts +2 -2
  181. package/dist/middleware.cjs +3 -3
  182. package/dist/middleware.d.mts +4 -4
  183. package/dist/middleware.d.ts +4 -4
  184. package/dist/middleware.mjs +2 -2
  185. package/dist/mobile.d.mts +10 -4
  186. package/dist/mobile.d.ts +10 -4
  187. package/dist/{modules-VHD7BELU.mjs → modules-KOKD4XS6.mjs} +2 -2
  188. package/dist/modules-QTP7WJPD.cjs +13 -0
  189. package/dist/native-server-fn-handler-GLRHAYWV.mjs +28 -0
  190. package/dist/native-server-fn-handler-J5MYRXN6.cjs +28 -0
  191. package/dist/native-specs-5OLED4MM.cjs +15 -0
  192. package/dist/{native-specs-BD7HOTMJ.mjs → native-specs-LDV6IZ4N.mjs} +1 -1
  193. package/dist/{native-tree-VWNW2MQ2.mjs → native-tree-AS5L3ID3.mjs} +2 -2
  194. package/dist/{native-tree-6G5O53O3.cjs → native-tree-Z2WYUJEV.cjs} +3 -3
  195. package/dist/native.cjs +1 -1
  196. package/dist/native.d.mts +5 -5
  197. package/dist/native.d.ts +5 -5
  198. package/dist/native.mjs +1 -1
  199. package/dist/{navigation-delegate.d-JXx40JzR.d.ts → navigation-delegate.d-BbUHRXxG.d.ts} +1 -1
  200. package/dist/{navigation-delegate.d-CnOTWOyi.d.mts → navigation-delegate.d-CSCm8ZxL.d.mts} +1 -1
  201. package/dist/navigation.d.mts +5 -5
  202. package/dist/navigation.d.ts +5 -5
  203. package/dist/{nitro-FLN6DRGJ.mjs → nitro-DD4QCA66.mjs} +5 -5
  204. package/dist/{nitro-HXAZZQKY.cjs → nitro-VRDX2H4M.cjs} +8 -8
  205. package/dist/plugin.cjs +19 -18
  206. package/dist/plugin.d.mts +5 -5
  207. package/dist/plugin.d.ts +5 -5
  208. package/dist/plugin.mjs +18 -17
  209. package/dist/{port-WOOQ3V56.mjs → port-UFUZL6RI.mjs} +2 -2
  210. package/dist/{port-C6GBH4C6.cjs → port-VTLHPZOI.cjs} +10 -10
  211. package/dist/{production-runtime.d-CP5s6RuY.d.mts → production-runtime.d-CcQiDko5.d.mts} +1 -1
  212. package/dist/{production-runtime.d-N-cE3pmy.d.ts → production-runtime.d-DgT24A0f.d.ts} +1 -1
  213. package/dist/{render-plan.d-DZ-qjjdG.d.mts → render-plan.d-BH9WF-JZ.d.mts} +1 -1
  214. package/dist/{render-plan.d-B9lAP3uX.d.ts → render-plan.d-CyrX6MDs.d.ts} +1 -1
  215. package/dist/renderer-client.d.mts +5 -5
  216. package/dist/renderer-client.d.ts +5 -5
  217. package/dist/{request.d-BiicaNxb.d.ts → request.d-BB8M8bcD.d.ts} +1 -1
  218. package/dist/{request.d-DV0oeUit.d.mts → request.d-CUrPnCW7.d.mts} +1 -1
  219. package/dist/request.d.mts +3 -3
  220. package/dist/request.d.ts +3 -3
  221. package/dist/{route-rendering.d-BrIKA51A.d.mts → route-rendering.d-CYxlzaFm.d.mts} +1 -1
  222. package/dist/{route-rendering.d-Iss0C7GR.d.ts → route-rendering.d-DYqZMIf4.d.ts} +1 -1
  223. package/dist/{router.d-mNTbOGV_.d.mts → router.d-7o24CD8u.d.mts} +1 -1
  224. package/dist/{router.d-DjGn_al7.d.ts → router.d-DaKo507j.d.ts} +1 -1
  225. package/dist/{routes.d-BKSjHuH9.d.ts → routes.d-BknKQcTu.d.ts} +7 -1
  226. package/dist/{routes.d-qd8Qf4LG.d.mts → routes.d-D1IrO9KK.d.mts} +7 -1
  227. package/dist/routes.d.mts +2 -2
  228. package/dist/routes.d.ts +2 -2
  229. package/dist/{rsc-pipeline-SVLBTY7H.cjs → rsc-pipeline-OF2I7PCX.cjs} +8 -8
  230. package/dist/{rsc-pipeline-WBLBDQXA.mjs → rsc-pipeline-RFLHDAKD.mjs} +7 -7
  231. package/dist/{runtime-DGUOWSMF.cjs → runtime-LBTK62AD.cjs} +70 -47
  232. package/dist/{runtime-HFZTVNFF.mjs → runtime-M6UJCSLA.mjs} +38 -15
  233. package/dist/{runtime.d-Bm_4hP5T.d.ts → runtime.d-CN73a-IL.d.ts} +1 -1
  234. package/dist/{runtime.d-BNVbojF1.d.mts → runtime.d-CcNuzhX6.d.mts} +1 -1
  235. package/dist/server-action-security.cjs +3 -3
  236. package/dist/server-action-security.mjs +2 -2
  237. package/dist/server-fn.cjs +4 -4
  238. package/dist/server-fn.mjs +3 -3
  239. package/dist/server-plugins.d.mts +3 -3
  240. package/dist/server-plugins.d.ts +3 -3
  241. package/dist/server-query.cjs +5 -5
  242. package/dist/server-query.mjs +4 -4
  243. package/dist/server.cjs +38 -37
  244. package/dist/server.d.mts +10 -10
  245. package/dist/server.d.ts +10 -10
  246. package/dist/server.mjs +23 -22
  247. package/dist/{spa-router.d-DHDoXxDE.d.mts → spa-router.d-CNi77LZm.d.mts} +2 -2
  248. package/dist/{spa-router.d-DAtnNoBe.d.ts → spa-router.d-Cvgf5QP4.d.ts} +2 -2
  249. package/dist/testing.cjs +6 -6
  250. package/dist/testing.d.mts +2 -2
  251. package/dist/testing.d.ts +2 -2
  252. package/dist/testing.mjs +4 -4
  253. package/dist/{utils.d-DwZ-KLSB.d.ts → utils.d-C3H-14_Y.d.ts} +1 -1
  254. package/dist/{utils.d-uKZcKJk4.d.mts → utils.d-D8VfzZYn.d.mts} +1 -1
  255. package/dist/version.cjs +2 -2
  256. package/dist/version.mjs +1 -1
  257. package/dist/vite.cjs +21 -18
  258. package/dist/vite.d.mts +5 -5
  259. package/dist/vite.d.ts +5 -5
  260. package/dist/vite.mjs +20 -17
  261. package/dist/workflows.cjs +3 -3
  262. package/dist/workflows.mjs +2 -2
  263. package/package.json +12 -2
  264. package/dist/modules-WT5D3AWY.cjs +0 -13
  265. package/dist/native-specs-IQQRJOOW.cjs +0 -15
@@ -3,14 +3,9 @@ import {
3
3
  farmDesktopDevGuardPlugin,
4
4
  isFarmReactRefreshActive
5
5
  } from "./chunk-QOSDWGKT.mjs";
6
- import {
7
- createFarmServerFnBoundaryModule,
8
- isFarmServerFnBoundaryId,
9
- transformFarmServerFns
10
- } from "./chunk-GNZIAJGB.mjs";
11
6
  import {
12
7
  createFarmImageHandler
13
- } from "./chunk-ANHZ6SUL.mjs";
8
+ } from "./chunk-3TXKFRSO.mjs";
14
9
  import {
15
10
  FARM_LAYOUT_ELEMENT_CLIENT_SOURCE,
16
11
  FARM_NAVIGATION_STREAM_READER_SOURCE,
@@ -30,6 +25,7 @@ import {
30
25
  hasUseClientDirective,
31
26
  inferFarmIslandStrategy,
32
27
  isFarmDocsClientConfigModule,
28
+ isFarmPackageClientBoundary,
33
29
  isIsolatableClientBoundarySource,
34
30
  redactFarmDocsClientConfig,
35
31
  resolveDevGlobalStylesheetHref,
@@ -39,8 +35,9 @@ import {
39
35
  resolveFarmIsolatedClientHydrationMode,
40
36
  resolveFarmRouteRootStrategy,
41
37
  resolveModuleSourcePath,
38
+ rewriteFarmPackageClientImports,
42
39
  stripUseClientDirective
43
- } from "./chunk-ZFUKPWFC.mjs";
40
+ } from "./chunk-2JYBLE63.mjs";
44
41
  import {
45
42
  loadTailwindVitePlugin
46
43
  } from "./chunk-OM7WILES.mjs";
@@ -53,7 +50,7 @@ import {
53
50
  import {
54
51
  generateFarmTypeArtifacts,
55
52
  resolveRouteRenderingConfig
56
- } from "./chunk-LJVNMGE3.mjs";
53
+ } from "./chunk-BM2LH2JM.mjs";
57
54
  import {
58
55
  createFarmRouteRenderPlan,
59
56
  farmPathGuardCoversEndpoint,
@@ -85,10 +82,15 @@ import {
85
82
  resolveFarmMCPRouteLabel,
86
83
  resolveFarmMarkdownRouteLabel,
87
84
  setFarmRouteLabel
88
- } from "./chunk-ZMHAFH4R.mjs";
85
+ } from "./chunk-VM7X5CKC.mjs";
89
86
  import {
90
87
  FARM_DEFAULT_MCP_PATH
91
88
  } from "./chunk-UZZ6IEQP.mjs";
89
+ import {
90
+ createFarmServerFnBoundaryModule,
91
+ isFarmServerFnBoundaryId,
92
+ transformFarmServerFns
93
+ } from "./chunk-GNZIAJGB.mjs";
92
94
  import {
93
95
  resolveFarmLayoutFonts
94
96
  } from "./chunk-HZOMT5DY.mjs";
@@ -170,7 +172,7 @@ import {
170
172
  getIntegrationDocumentNavigationMatchers,
171
173
  getIntegrationProviders,
172
174
  matchIntegrationRoute
173
- } from "./chunk-IFHPDLIS.mjs";
175
+ } from "./chunk-TGULJSHD.mjs";
174
176
  import {
175
177
  MiddlewareManager
176
178
  } from "./chunk-A2MN5PQJ.mjs";
@@ -189,7 +191,7 @@ import {
189
191
  } from "./chunk-IYEY3JWJ.mjs";
190
192
  import {
191
193
  APIRouteManager
192
- } from "./chunk-BHJAYPYU.mjs";
194
+ } from "./chunk-3UZVPO72.mjs";
193
195
  import {
194
196
  getFarmI18nClientSnapshot
195
197
  } from "./chunk-CV6MFQ4Y.mjs";
@@ -199,7 +201,7 @@ import {
199
201
  } from "./chunk-NR63PD3P.mjs";
200
202
  import {
201
203
  isFarmAPIPathname
202
- } from "./chunk-RPUJHJHE.mjs";
204
+ } from "./chunk-ZFWYCVKS.mjs";
203
205
  import {
204
206
  registerFarmMCPServer
205
207
  } from "./chunk-C7GJDVN4.mjs";
@@ -247,10 +249,10 @@ import {
247
249
  createFarmRequestBodyErrorResponse,
248
250
  readNodeRequestBody,
249
251
  resolveFarmServerConfig
250
- } from "./chunk-GFT5AHAT.mjs";
252
+ } from "./chunk-QDWMCFTH.mjs";
251
253
  import {
252
254
  FARM_VERSION
253
- } from "./chunk-HPWB57PZ.mjs";
255
+ } from "./chunk-NT3QDN2E.mjs";
254
256
  import {
255
257
  DEFAULT_FARM_API_BASE_PATH
256
258
  } from "./chunk-W6QLRQ3V.mjs";
@@ -322,8 +324,13 @@ var VITE_DEFAULT_FS_DENY = [
322
324
  ".yarnrc.yml",
323
325
  "**/.git/**"
324
326
  ];
327
+ var FARM_DEV_FS_DENY = [
328
+ "**/.farm/!(client-references)/**",
329
+ "**/.farm/client-references?*/**",
330
+ "**/.farm/*"
331
+ ];
325
332
  function getFarmDevFsDeny(userDeny, options) {
326
- const deny = ["**/.farm/**"];
333
+ const deny = [...FARM_DEV_FS_DENY];
327
334
  const root = path2.resolve(options.root || process.cwd());
328
335
  const distDir = options.distDir ? path2.resolve(root, options.distDir) : void 0;
329
336
  const relativeDistDir = distDir ? path2.relative(root, distDir) : "";
@@ -424,7 +431,7 @@ function isInside(directory, file) {
424
431
 
425
432
  // src/vite.ts
426
433
  import * as fs2 from "fs";
427
- import * as path5 from "path";
434
+ import * as path6 from "path";
428
435
  import { pathToFileURL } from "url";
429
436
 
430
437
  // src/dev-static.ts
@@ -678,6 +685,52 @@ async function createBlurDataURL(bytes) {
678
685
  }
679
686
  }
680
687
 
688
+ // src/vite.ts
689
+ import { rewriteFormStatusImports } from "@farm.js/islx/compiler";
690
+
691
+ // src/islands-react-cache-transform.ts
692
+ import path5 from "path";
693
+ import { parseAst } from "rolldown/parseAst";
694
+ var FARM_REACT_CACHE_MODULE = "@farm.js/core/internal/react-cache";
695
+ function rewriteFarmReactCacheImport(code, file) {
696
+ if (!code.includes("cache") || !code.includes("react")) return null;
697
+ const extension = path5.extname(file).slice(1);
698
+ const lang = extension === "ts" || extension === "mts" || extension === "cts" ? "ts" : "tsx";
699
+ let program;
700
+ try {
701
+ program = parseAst(code, { lang });
702
+ } catch {
703
+ return null;
704
+ }
705
+ let output = code;
706
+ const declarations = (program.body ?? []).filter(
707
+ (node) => node.type === "ImportDeclaration" && node.source?.value === "react" && node.importKind !== "type"
708
+ );
709
+ let changed = false;
710
+ for (const node of [...declarations].sort((left, right) => right.start - left.start)) {
711
+ const specifiers = node.specifiers ?? [];
712
+ const caches = specifiers.filter(
713
+ (specifier) => specifier.type === "ImportSpecifier" && specifier.importKind !== "type" && (specifier.imported?.name ?? specifier.imported?.value) === "cache"
714
+ );
715
+ if (caches.length === 0) continue;
716
+ const others = specifiers.filter((specifier) => !caches.includes(specifier));
717
+ const text = (specifier) => code.slice(specifier.start, specifier.end);
718
+ const defaults = others.filter((specifier) => specifier.type !== "ImportSpecifier");
719
+ const named = others.filter((specifier) => specifier.type === "ImportSpecifier");
720
+ const clause = [
721
+ ...defaults.map(text),
722
+ ...named.length > 0 ? [`{ ${named.map(text).join(", ")} }`] : []
723
+ ].join(", ");
724
+ const lines = [
725
+ ...clause ? [`import ${clause} from "react";`] : [],
726
+ `import { ${caches.map((specifier) => `cache as ${specifier.local.name}`).join(", ")} } from ${JSON.stringify(FARM_REACT_CACHE_MODULE)};`
727
+ ];
728
+ output = output.slice(0, node.start) + lines.join("\n") + output.slice(node.end);
729
+ changed = true;
730
+ }
731
+ return changed ? output : null;
732
+ }
733
+
681
734
  // src/navigation/page-data-error.ts
682
735
  function resolveFarmPageDataFailure(error) {
683
736
  if (isFarmNotFoundError(error)) {
@@ -771,7 +824,7 @@ function loadFarmWorkflowsDevRuntime() {
771
824
  return import("./workflows.mjs");
772
825
  }
773
826
  function loadFarmDevtoolsSnapshotRuntime() {
774
- return import("./devtools-KQZ6SRCJ.mjs");
827
+ return import("./devtools-NUVXYG7I.mjs");
775
828
  }
776
829
  function loadFarmDevtoolsUIRuntime() {
777
830
  return import("./devtools-ui-CYBVFLPH.mjs");
@@ -796,6 +849,8 @@ function farmI18nClientBridgePlugin() {
796
849
  };
797
850
  }
798
851
  var FARM_SERVER_ONLY_ENTRIES = /* @__PURE__ */ new Set(["@farm.js/core/og"]);
852
+ var SERVER_ONLY_PACKAGE = "server-only";
853
+ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
799
854
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
800
855
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
801
856
  function createFarmPlatformClientModule(platform) {
@@ -813,7 +868,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
813
868
  enforce: "pre",
814
869
  config() {
815
870
  return {
816
- optimizeDeps: { rolldownOptions: { plugins: [farmBrowserBuiltinsOptimizerPlugin()] } }
871
+ optimizeDeps: { rolldownOptions: { plugins: [farmBrowserBuiltinsOptimizerPlugin()] } },
872
+ // Resolve `server-only` here rather than in Node, which would load its throwing build.
873
+ ssr: { noExternal: [SERVER_ONLY_PACKAGE] }
817
874
  };
818
875
  },
819
876
  configResolved(config) {
@@ -821,6 +878,14 @@ function farmServerOnlyEntriesPlugin(options = {}) {
821
878
  },
822
879
  resolveId(id, importer, options2) {
823
880
  if (id === FARM_PLATFORM_ENTRY) return options2?.ssr ? null : FARM_PLATFORM_CLIENT_ID;
881
+ if (id === SERVER_ONLY_PACKAGE) {
882
+ if (options2?.ssr || options2?.scan) {
883
+ return FARM_SERVER_ONLY_PACKAGE_ID;
884
+ }
885
+ this.error(
886
+ `${importer ?? "A module"} imports "server-only", so it must not reach the browser, but client code imports it. Move what the client needs out of that module, or call it from a server component, server function or API route.`
887
+ );
888
+ }
824
889
  if (!options2?.ssr && isBuiltin(id)) {
825
890
  return resolveFarmBrowserBuiltin(this, id, importer, options2);
826
891
  }
@@ -840,6 +905,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
840
905
  return null;
841
906
  },
842
907
  load(id) {
908
+ if (id === FARM_SERVER_ONLY_PACKAGE_ID) return "export {};";
843
909
  if (id === FARM_PLATFORM_CLIENT_ID) {
844
910
  return createFarmPlatformClientModule(options.platform ?? resolveFarmPlatform());
845
911
  }
@@ -1205,7 +1271,7 @@ function fileContainsProgrammaticPageRoute(file) {
1205
1271
  }
1206
1272
  function rewriteEarlySsrRelativeImports(options) {
1207
1273
  const cleanId = options.id.split("?", 1)[0];
1208
- if (!path5.isAbsolute(cleanId) || cleanId.replace(/\\/g, "/").includes("/node_modules/")) {
1274
+ if (!path6.isAbsolute(cleanId) || cleanId.replace(/\\/g, "/").includes("/node_modules/")) {
1209
1275
  return null;
1210
1276
  }
1211
1277
  const replacements = [];
@@ -1225,7 +1291,7 @@ function rewriteEarlySsrRelativeImports(options) {
1225
1291
  const suffixIndex = source.value.search(/[?#]/);
1226
1292
  const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
1227
1293
  const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
1228
- const resolvedPath = path5.resolve(path5.dirname(cleanId), sourcePath);
1294
+ const resolvedPath = path6.resolve(path6.dirname(cleanId), sourcePath);
1229
1295
  const moduleId = toViteModuleId(resolvedPath, options.root);
1230
1296
  const specifier = moduleId.startsWith("/@fs/") ? toPosixPath(resolvedPath) : moduleId;
1231
1297
  replacements.push({
@@ -1242,6 +1308,19 @@ function rewriteEarlySsrRelativeImports(options) {
1242
1308
  return output;
1243
1309
  }
1244
1310
  function transformIsolatedClientBoundaryModule(options) {
1311
+ if (options.slots) {
1312
+ try {
1313
+ const rewritten = rewriteFormStatusImports({
1314
+ code: options.code,
1315
+ id: options.moduleReference,
1316
+ parse: options.parse,
1317
+ from: "@farm.js/core/internal/islx-react"
1318
+ });
1319
+ if (rewritten) options = { ...options, code: rewritten.code };
1320
+ } catch {
1321
+ return null;
1322
+ }
1323
+ }
1245
1324
  let ast;
1246
1325
  try {
1247
1326
  ast = options.parse(options.code);
@@ -1465,7 +1544,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1465
1544
  },
1466
1545
  server: {
1467
1546
  fs: {
1468
- ...layerRoots.length ? { allow: [path5.resolve(options.root || process.cwd()), ...layerRoots] } : {},
1547
+ ...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
1469
1548
  deny: getFarmDevFsDeny(userConfig.server?.fs?.deny, options)
1470
1549
  }
1471
1550
  }
@@ -1554,7 +1633,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1554
1633
  });
1555
1634
  }
1556
1635
  const sourceRoots = getFarmSourceRoots(farmConfig);
1557
- server.watcher.add(sourceRoots.map((source) => path5.join(source.root, source.srcDir)));
1636
+ server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
1558
1637
  if (farmConfig.i18n.enabled) {
1559
1638
  server.watcher.add(
1560
1639
  farmConfig.i18n.locales.map(
@@ -1569,7 +1648,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1569
1648
  ...farmDocsDevRuntime?.getFarmDocsRouteTypeEntries(farmConfig.docs) ?? []
1570
1649
  ];
1571
1650
  const appDirSlugs = sourceRoots.map(
1572
- (source) => path5.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
1651
+ (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
1573
1652
  );
1574
1653
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
1575
1654
  try {
@@ -1610,7 +1689,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1610
1689
  };
1611
1690
  await generateTypeArtifacts("startup");
1612
1691
  const srcDirSlugs = sourceRoots.map(
1613
- (source) => path5.join(source.root, source.srcDir).replace(/\\/g, "/")
1692
+ (source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
1614
1693
  );
1615
1694
  const layerConfigFiles = new Set(
1616
1695
  farmConfig.layers.map((layer) => layer.configFile?.replace(/\\/g, "/")).filter((file) => Boolean(file))
@@ -1741,6 +1820,17 @@ function farmPlugin(options = {}, initialPluginManager) {
1741
1820
  });
1742
1821
  }
1743
1822
  const dispatchToDevServer = createFarmDevServerDispatch(server);
1823
+ if (options.mobileClient) {
1824
+ const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.mjs");
1825
+ const load = (file) => loadFarmDevModule(server, file);
1826
+ globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
1827
+ server.httpServer?.once("close", () => {
1828
+ const globals = globalThis;
1829
+ if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
1830
+ delete globals[FARM_DEV_SERVER_MODULE_LOADER];
1831
+ }
1832
+ });
1833
+ }
1744
1834
  apiRouteManager = new APIRouteManager(appDirs, server, {
1745
1835
  plugins: farmConfig.plugins,
1746
1836
  i18n: farmApp.getI18nRuntime(),
@@ -1758,7 +1848,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1758
1848
  farmApp.getServerRenderer().setAPIRouteLookup((routePath) => apiRouteManager.getRoutes().has(routePath));
1759
1849
  let discoveredWorkflows = [];
1760
1850
  const hasWorkflowDirectory = workflowConfig.enabled && workflowConfig.dirs.some(
1761
- (dir) => fs2.existsSync(path5.isAbsolute(dir) ? dir : path5.join(farmConfig.root, dir))
1851
+ (dir) => fs2.existsSync(path6.isAbsolute(dir) ? dir : path6.join(farmConfig.root, dir))
1762
1852
  );
1763
1853
  if (hasWorkflowDirectory) {
1764
1854
  const { createFarmWorkflowRequestHandler, discoverFarmWorkflows } = await loadFarmWorkflowsDevRuntime();
@@ -2257,12 +2347,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2257
2347
  }),
2258
2348
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
2259
2349
  // A guard written for an MCP server's path keeps its tools out of the public view.
2260
- guardCoversPath: (path6) => farmPathGuardCoversEndpoint(
2350
+ guardCoversPath: (path7) => farmPathGuardCoversEndpoint(
2261
2351
  {
2262
2352
  config: farmConfig,
2263
2353
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
2264
2354
  },
2265
- path6,
2355
+ path7,
2266
2356
  apiServerBasePath
2267
2357
  )
2268
2358
  }
@@ -2341,7 +2431,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2341
2431
  }
2342
2432
  }
2343
2433
  if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD") && req.headers.accept?.includes(FARM_NATIVE_TREE_CONTENT_TYPE)) {
2344
- const { createFarmNativeTreeResponse } = await import("./native-tree-VWNW2MQ2.mjs");
2434
+ const { createFarmNativeTreeResponse } = await import("./native-tree-AS5L3ID3.mjs");
2345
2435
  const treeResponse = await createFarmNativeTreeResponse({
2346
2436
  request: new Request(fullUrl, { method: requestMethod, headers: docsHeaders }),
2347
2437
  // As for the Markdown mirror: this server's own listener, redirects not followed.
@@ -3528,6 +3618,28 @@ export const manifest = getManifest();
3528
3618
  },
3529
3619
  async transform(code, id, transformOptions) {
3530
3620
  const actionConfig = farmApp?.getConfig() ?? options;
3621
+ let rewrotePackageImports = false;
3622
+ if (resolveFarmServerComponentsMode(actionConfig.experimental?.serverComponents) === "islands" && !id.includes("/node_modules/") && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !hasUseClientDirective(code)) {
3623
+ const file = id.split("?", 1)[0];
3624
+ const projectRoot = actionConfig.root || server?.config.root || process.cwd();
3625
+ const referenced = rewriteFarmPackageClientImports({
3626
+ code,
3627
+ file,
3628
+ root: projectRoot,
3629
+ isClientPackage: (specifier) => isFarmPackageClientBoundary(file, specifier, projectRoot)
3630
+ });
3631
+ if (referenced !== null) {
3632
+ code = referenced;
3633
+ rewrotePackageImports = true;
3634
+ }
3635
+ if (transformOptions?.ssr === true) {
3636
+ const cached = rewriteFarmReactCacheImport(code, file);
3637
+ if (cached !== null) {
3638
+ code = cached;
3639
+ rewrotePackageImports = true;
3640
+ }
3641
+ }
3642
+ }
3531
3643
  if (islandsServerFns() && !isFarmServerFnBoundaryId(id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3532
3644
  const serverFns = transformFarmServerFns(code, id, {
3533
3645
  environment: transformOptions?.ssr === true ? "rsc" : "client"
@@ -3573,7 +3685,7 @@ export const manifest = getManifest();
3573
3685
  if (imageModule) return imageModule;
3574
3686
  }
3575
3687
  let transformedCode = code;
3576
- let transformed = false;
3688
+ let transformed = rewrotePackageImports;
3577
3689
  if (typeof fontImports.transform === "function") {
3578
3690
  const fontResult = await fontImports.transform.call(
3579
3691
  this,
@@ -3612,7 +3724,7 @@ export const manifest = getManifest();
3612
3724
  const root = currentConfig.root || server?.config.root || process.cwd();
3613
3725
  const cleanId = id.split("?", 1)[0];
3614
3726
  const selectedIsolatedModules = options.isolatedClientBoundaryModules ?? farmApp?.getRouteManager().getIsolatedClientBoundaryModules(root);
3615
- const selectedForIsolatedHydration = selectedIsolatedModules?.has(path5.resolve(cleanId)) === true;
3727
+ const selectedForIsolatedHydration = selectedIsolatedModules?.has(path6.resolve(cleanId)) === true;
3616
3728
  if (isReactRenderer(resolveFarmRenderer(currentConfig.renderer)) && selectedForIsolatedHydration && isIsolatableClientBoundarySource(clientBoundarySource)) {
3617
3729
  isolatedModuleReference = toViteModuleId(cleanId, root);
3618
3730
  const islandsMode = resolveFarmServerComponentsMode(currentConfig.experimental?.serverComponents) === "islands";
@@ -3620,7 +3732,7 @@ export const manifest = getManifest();
3620
3732
  const inference = islandsMode && explicitStrategy === null ? inferFarmIslandStrategy(cleanId, root) : null;
3621
3733
  if (inference) {
3622
3734
  for (const file of inference.files) {
3623
- if (file !== path5.resolve(cleanId)) this.addWatchFile(file);
3735
+ if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
3624
3736
  recordFarmIslandInferenceDependency(file, cleanId);
3625
3737
  }
3626
3738
  }
@@ -3715,8 +3827,8 @@ if (import.meta.hot) {
3715
3827
  }
3716
3828
  logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
3717
3829
  logger.info("Pre-rendering SSG pages...");
3718
- const outDir = path5.join(server?.config.root || process.cwd(), options.outDir || "dist");
3719
- const clientDir = path5.join(outDir, "client");
3830
+ const outDir = path6.join(server?.config.root || process.cwd(), options.outDir || "dist");
3831
+ const clientDir = path6.join(outDir, "client");
3720
3832
  for (const page of ssgPages) {
3721
3833
  try {
3722
3834
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
@@ -3768,8 +3880,8 @@ if (import.meta.hot) {
3768
3880
  <script type="module" src="/assets/client.js"></script>
3769
3881
  </body>
3770
3882
  </html>`;
3771
- const outputPath = page.urlPath === "/" ? path5.join(clientDir, "index.html") : path5.join(clientDir, page.urlPath + ".html");
3772
- fs2.mkdirSync(path5.dirname(outputPath), { recursive: true });
3883
+ const outputPath = page.urlPath === "/" ? path6.join(clientDir, "index.html") : path6.join(clientDir, page.urlPath + ".html");
3884
+ fs2.mkdirSync(path6.dirname(outputPath), { recursive: true });
3773
3885
  fs2.writeFileSync(outputPath, fullHtml);
3774
3886
  const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
3775
3887
  logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
@@ -3778,7 +3890,7 @@ if (import.meta.hot) {
3778
3890
  logger.error(` \u2717 ${page.urlPath}: ${error}`);
3779
3891
  }
3780
3892
  }
3781
- const manifestPath = path5.join(outDir, "__ssg_manifest.json");
3893
+ const manifestPath = path6.join(outDir, "__ssg_manifest.json");
3782
3894
  fs2.writeFileSync(
3783
3895
  manifestPath,
3784
3896
  JSON.stringify(
@@ -3812,8 +3924,8 @@ if (import.meta.hot) {
3812
3924
  });
3813
3925
  }
3814
3926
  }
3815
- for (const island of farmIslandInferenceDependents.get(path5.resolve(file)) ?? []) {
3816
- if (island === path5.resolve(file)) continue;
3927
+ for (const island of farmIslandInferenceDependents.get(path6.resolve(file)) ?? []) {
3928
+ if (island === path6.resolve(file)) continue;
3817
3929
  for (const mod of server2.moduleGraph.getModulesByFile(toPosixPath(island)) ?? []) {
3818
3930
  server2.moduleGraph.invalidateModule(mod);
3819
3931
  }
@@ -3828,9 +3940,9 @@ if (import.meta.hot) {
3828
3940
  server2.ws.send({ type: "full-reload", path: "*" });
3829
3941
  return [];
3830
3942
  }
3831
- const currentSrcRoot = currentFarmConfig ? getFarmSourceRoots(currentFarmConfig).map((source) => path5.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
3943
+ const currentSrcRoot = currentFarmConfig ? getFarmSourceRoots(currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
3832
3944
  if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && isProgrammaticRoutesFileName(normalizedFile)) {
3833
- logUpdate("PAGE", `updated ${path5.basename(file)}`);
3945
+ logUpdate("PAGE", `updated ${path6.basename(file)}`);
3834
3946
  for (const mod of modules) {
3835
3947
  server2.moduleGraph.invalidateModule(mod);
3836
3948
  }
@@ -3961,10 +4073,10 @@ function createPageDataMiddlewareRequest(req, target) {
3961
4073
  }
3962
4074
  function resolveDevelopmentRoot(farmRoot, viteRoot) {
3963
4075
  if (!farmRoot) return viteRoot;
3964
- if (path5.resolve(farmRoot) === path5.resolve(viteRoot)) return farmRoot;
4076
+ if (path6.resolve(farmRoot) === path6.resolve(viteRoot)) return farmRoot;
3965
4077
  try {
3966
4078
  if (fs2.realpathSync(farmRoot) === fs2.realpathSync(viteRoot)) {
3967
- return path5.resolve(viteRoot);
4079
+ return path6.resolve(viteRoot);
3968
4080
  }
3969
4081
  } catch {
3970
4082
  }
@@ -3972,10 +4084,10 @@ function resolveDevelopmentRoot(farmRoot, viteRoot) {
3972
4084
  }
3973
4085
  var farmIslandInferenceDependents = /* @__PURE__ */ new Map();
3974
4086
  function recordFarmIslandInferenceDependency(file, island) {
3975
- const key = path5.resolve(file);
4087
+ const key = path6.resolve(file);
3976
4088
  let islands = farmIslandInferenceDependents.get(key);
3977
4089
  if (!islands) farmIslandInferenceDependents.set(key, islands = /* @__PURE__ */ new Set());
3978
- islands.add(path5.resolve(island));
4090
+ islands.add(path6.resolve(island));
3979
4091
  }
3980
4092
  var FARM_DEV_CLIENT_BOOT_ID = "/@farm/client-boot.js";
3981
4093
  var FARM_DEV_CLIENT_BOOT_MODULE = 'import { startFarmIslandsBoot } from "@farm.js/core/internal/islands-boot";\nstartFarmIslandsBoot();\n';
@@ -6255,7 +6367,7 @@ function generateClientManifest(bundle) {
6255
6367
  }
6256
6368
  async function defineConfig(config = {}) {
6257
6369
  const tailwindVitePlugin = await loadTailwindVitePlugin();
6258
- const appRoot = path5.resolve(config.root || process.cwd());
6370
+ const appRoot = path6.resolve(config.root || process.cwd());
6259
6371
  if (config.extends?.length) {
6260
6372
  const { config: layeredConfig } = await import("./layers-T55SA47E.mjs").then(
6261
6373
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
@@ -21,7 +21,7 @@ var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
21
21
  var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
22
22
 
23
23
 
24
- var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
24
+ var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
25
25
 
26
26
  // src/docs/handler.ts
27
27
 
@@ -1890,7 +1890,7 @@ function createFarmDocsHandler(docs, options) {
1890
1890
  ETag: etag,
1891
1891
  "X-Content-Type-Options": "nosniff"
1892
1892
  });
1893
- if (_chunkLIFUPCXWcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
1893
+ if (_chunkCFG4QERRcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
1894
1894
  return new Response(null, { status: 304, headers });
1895
1895
  }
1896
1896
  if (request.method === "HEAD") return new Response(null, { status: 200, headers });
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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
2
 
3
- var _chunk3YMLUNL2cjs = require('./chunk-3YMLUNL2.cjs');
3
+ var _chunkSVXOCTQ2cjs = require('./chunk-SVXOCTQ2.cjs');
4
4
 
5
5
 
6
6
 
@@ -43,7 +43,7 @@ function scanFarmMobileAppModules(options) {
43
43
  specs.push({ name: match[2], file });
44
44
  }
45
45
  const android = entries.filter((entry) => entry.endsWith(".kt")).map((entry) => path.join(dir, entry));
46
- const ios = entries.filter((entry) => entry.endsWith(".swift")).map((entry) => path.join(dir, entry));
46
+ const ios = entries.filter((entry) => /\.(?:mm|m|h|swift)$/.test(entry)).map((entry) => path.join(dir, entry));
47
47
  if (specs.length === 0 && android.length === 0 && ios.length === 0) return void 0;
48
48
  return { dir, specs, android, ios };
49
49
  }
@@ -198,7 +198,7 @@ function readFarmMobileWebModules(appModules, modules, options) {
198
198
  const where = `modules[${JSON.stringify(spec.name)}].web`;
199
199
  let web;
200
200
  try {
201
- web = _chunk3YMLUNL2cjs.readFarmNativeWebSpec.call(void 0, { root: options.root, file: spec.file });
201
+ web = _chunkSVXOCTQ2cjs.readFarmNativeWebSpec.call(void 0, { root: options.root, file: spec.file });
202
202
  } catch (error) {
203
203
  issues.push(`${where}: ${error.message}`);
204
204
  return spec;
@@ -926,17 +926,50 @@ function splitFarmCssDeclarations(css) {
926
926
  push(css.length);
927
927
  return out;
928
928
  }
929
- function resolveFarmNativeInlineStyle(css) {
929
+ function substituteFarmNativeVars(value, vars, depth = 0) {
930
+ if (!value.includes("var(")) return value;
931
+ if (depth > 8) return void 0;
932
+ let missing = false;
933
+ const replaced = value.replace(
934
+ /var\(\s*(--[\w-]+)\s*(?:,\s*([^()]*(?:\([^()]*\))?[^()]*))?\)/g,
935
+ (_, name, fallback) => {
936
+ const resolved = vars[name] ?? fallback?.trim();
937
+ if (resolved === void 0) {
938
+ missing = true;
939
+ return "";
940
+ }
941
+ return resolved;
942
+ }
943
+ );
944
+ return missing ? void 0 : substituteFarmNativeVars(replaced, vars, depth + 1);
945
+ }
946
+ function resolveFarmNativeInlineStyle(css, vars = {
947
+ light: {},
948
+ dark: {}
949
+ }) {
930
950
  const style = {};
951
+ const dark = {};
931
952
  const unsupported = [];
953
+ const themes = [
954
+ [style, vars.light],
955
+ [dark, { ...vars.light, ...vars.dark }]
956
+ ];
932
957
  for (const [property, raw] of splitFarmCssDeclarations(css)) {
933
- const value = raw.toLowerCase();
934
958
  if (!property) continue;
935
- const resolved = resolveFarmNativeDeclaration(property, value);
936
- if (resolved) Object.assign(style, resolved);
937
- else if (resolved === void 0) unsupported.push(`${property}: ${value}`);
959
+ for (const [target, themeVars] of themes) {
960
+ const value = substituteFarmNativeVars(raw, themeVars)?.toLowerCase();
961
+ const resolved = value === void 0 ? void 0 : resolveFarmNativeDeclaration(property, value);
962
+ if (resolved === void 0) {
963
+ unsupported.push(`${property}: ${raw.toLowerCase()}`);
964
+ break;
965
+ }
966
+ if (resolved) Object.assign(target, resolved);
967
+ }
968
+ }
969
+ for (const key of Object.keys(dark)) {
970
+ if (dark[key] === style[key]) delete dark[key];
938
971
  }
939
- return { style, unsupported };
972
+ return { style, dark, unsupported };
940
973
  }
941
974
  function oklchToHex(value) {
942
975
  const match = /^oklch\(\s*([\d.]+)(%?)\s+([\d.]+)\s+([\d.]+|none)(?:deg)?\s*(?:\/\s*([\d.]+)(%?))?\s*\)$/.exec(
@@ -1302,23 +1335,6 @@ function matches(selector, element) {
1302
1335
  };
1303
1336
  return step(0, element);
1304
1337
  }
1305
- function substitute(value, vars, depth = 0) {
1306
- if (!value.includes("var(")) return value;
1307
- if (depth > 8) return void 0;
1308
- let missing = false;
1309
- const replaced = value.replace(
1310
- /var\(\s*(--[\w-]+)\s*(?:,\s*([^()]*(?:\([^()]*\))?[^()]*))?\)/g,
1311
- (_, name, fallback) => {
1312
- const resolved = vars[name] ?? fallback?.trim();
1313
- if (resolved === void 0) {
1314
- missing = true;
1315
- return "";
1316
- }
1317
- return resolved;
1318
- }
1319
- );
1320
- return missing ? void 0 : substitute(replaced, vars, depth + 1);
1321
- }
1322
1338
  function cascadeFarmNativeStylesheets(sheets, element) {
1323
1339
  const style = {};
1324
1340
  const dark = {};
@@ -1342,7 +1358,7 @@ function cascadeFarmNativeStylesheets(sheets, element) {
1342
1358
  const themes = rule.dark ? [dark] : [style, dark];
1343
1359
  for (const target of themes) {
1344
1360
  const vars = target === dark ? { ...sheet.vars.light, ...sheet.vars.dark } : sheet.vars.light;
1345
- const value = substitute(raw, vars);
1361
+ const value = substituteFarmNativeVars(raw, vars);
1346
1362
  const resolved = value === void 0 ? void 0 : resolveFarmNativeDeclaration(property, value.toLowerCase().trim());
1347
1363
  if (resolved === void 0) {
1348
1364
  const message = `${property}: ${raw}`;
@@ -1369,7 +1385,7 @@ function inspectFarmNativeStylesheets(sheets, target) {
1369
1385
  styled = true;
1370
1386
  for (const [property, raw] of rule.declarations) {
1371
1387
  for (const vars of [sheet.vars.light, { ...sheet.vars.light, ...sheet.vars.dark }]) {
1372
- const value = substitute(raw, vars);
1388
+ const value = substituteFarmNativeVars(raw, vars);
1373
1389
  if (value === void 0 || resolveFarmNativeDeclaration(property, value.toLowerCase().trim()) === void 0) {
1374
1390
  const message = `"${rule.text} { ${property}: ${raw} }" has no native-tier style`;
1375
1391
  if (!problems.includes(message)) problems.push(message);