@farm.js/core 0.1.85 → 0.1.87

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 (242) hide show
  1. package/dist/{agent-mcp.d-7uKdOttc.d.ts → agent-mcp.d-BdM0pIrD.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-LChlR2au.d.mts → agent-mcp.d-CMGqpUbk.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +1 -1
  4. package/dist/agent-runtime.d.ts +1 -1
  5. package/dist/analyzer-LLU2Z6I4.cjs +17 -0
  6. package/dist/{analyzer-R6KNJ6IO.mjs → analyzer-W4EB7DHL.mjs} +2 -2
  7. package/dist/api/node.d.mts +3 -3
  8. package/dist/api/node.d.ts +3 -3
  9. package/dist/api/route-manager.cjs +3 -3
  10. package/dist/api/route-manager.d.mts +3 -3
  11. package/dist/api/route-manager.d.ts +3 -3
  12. package/dist/api/route-manager.mjs +2 -2
  13. package/dist/api/runtime.d.mts +2 -2
  14. package/dist/api/runtime.d.ts +2 -2
  15. package/dist/api.cjs +4 -4
  16. package/dist/api.d.mts +4 -4
  17. package/dist/api.d.ts +4 -4
  18. package/dist/api.mjs +3 -3
  19. package/dist/{app-manifest.d-QMdmqqCr.d.mts → app-manifest.d-BeDB2OVm.d.mts} +1 -1
  20. package/dist/{app-manifest.d-CRp21oAz.d.ts → app-manifest.d-COhjPgHn.d.ts} +1 -1
  21. package/dist/app-markdown.d.mts +2 -2
  22. package/dist/app-markdown.d.ts +2 -2
  23. package/dist/{app.d-Bvpc2eJq.d.mts → app.d-AVZXCfcO.d.mts} +5 -4
  24. package/dist/{app.d-DEKpJEp4.d.ts → app.d-b3A4cca5.d.ts} +5 -4
  25. package/dist/{chunk-3TCFONUE.mjs → chunk-26HESRBL.mjs} +60 -11
  26. package/dist/chunk-2HTNASSB.cjs +134 -0
  27. package/dist/{chunk-RVJQHQCG.cjs → chunk-33WR5XV5.cjs} +4 -4
  28. package/dist/{chunk-J7VIXTPQ.mjs → chunk-3F55K4MC.mjs} +1 -1
  29. package/dist/{chunk-YX532KEF.mjs → chunk-4FGTNYHE.mjs} +2 -2
  30. package/dist/{chunk-MYSH5Y4E.mjs → chunk-4IE3YK7U.mjs} +1 -1
  31. package/dist/{chunk-CWUQBECF.mjs → chunk-4SJ22WTT.mjs} +1 -1
  32. package/dist/{chunk-YS647ASS.mjs → chunk-5D73SKF3.mjs} +1 -1
  33. package/dist/{chunk-Q7GB3I4O.cjs → chunk-7BNVUIGL.cjs} +2 -2
  34. package/dist/{chunk-2DMOB6BH.mjs → chunk-A2PPQ5LB.mjs} +3 -3
  35. package/dist/{chunk-4QCMTIBM.mjs → chunk-ALOFMAFA.mjs} +11 -5
  36. package/dist/{chunk-HKJIUZS5.cjs → chunk-CXHVRHM2.cjs} +2 -2
  37. package/dist/{chunk-3RVLJTFZ.mjs → chunk-D7LXBLUW.mjs} +1 -1
  38. package/dist/{chunk-GFVPQ25Z.mjs → chunk-EZYNIADW.mjs} +65 -39
  39. package/dist/{chunk-NAHDG6UX.mjs → chunk-HFRG2IQS.mjs} +1 -1
  40. package/dist/{chunk-BCCCPFHQ.mjs → chunk-HV6CYSMF.mjs} +3 -0
  41. package/dist/{chunk-7H2TXT2K.mjs → chunk-HX5HLFBZ.mjs} +7 -0
  42. package/dist/{chunk-3HWNYLQV.cjs → chunk-HYL372GW.cjs} +1 -1
  43. package/dist/{chunk-25JGHAGH.cjs → chunk-I2RBHZF7.cjs} +15 -8
  44. package/dist/{chunk-BZN5HX7Y.cjs → chunk-IM422XKU.cjs} +2 -2
  45. package/dist/{chunk-6QYPP5KC.mjs → chunk-K5FLQJW5.mjs} +2 -2
  46. package/dist/chunk-K6RMOB25.mjs +134 -0
  47. package/dist/{chunk-CDZ55QRD.mjs → chunk-LBJOHMTB.mjs} +1 -1
  48. package/dist/{chunk-U6HUVY5R.mjs → chunk-LIWVPE72.mjs} +61 -23
  49. package/dist/{chunk-BBX4RPOV.cjs → chunk-MZR22RAC.cjs} +17 -11
  50. package/dist/chunk-NDMPGFKL.cjs +47 -0
  51. package/dist/{chunk-YHM4PXJY.mjs → chunk-O5YM6GU3.mjs} +1 -1
  52. package/dist/{chunk-XIXAUXV3.mjs → chunk-O7K4HMAQ.mjs} +1 -1
  53. package/dist/{chunk-PQR5A7R2.mjs → chunk-Q73LRKLP.mjs} +1 -1
  54. package/dist/{chunk-X7RSOEMQ.mjs → chunk-QLRI2BX5.mjs} +94 -15
  55. package/dist/{chunk-Z3LOPHSO.mjs → chunk-QSDIJ45N.mjs} +1 -1
  56. package/dist/{chunk-QUHDVJMR.cjs → chunk-RGYS5OPL.cjs} +3 -3
  57. package/dist/{chunk-UEQC4ZLP.cjs → chunk-SDNYULFS.cjs} +385 -359
  58. package/dist/{chunk-3OKSEJ33.cjs → chunk-T7UC2ORA.cjs} +3 -0
  59. package/dist/chunk-TCGPBSVY.mjs +47 -0
  60. package/dist/{chunk-H6C45DCF.cjs → chunk-TI4BZV6M.cjs} +393 -314
  61. package/dist/{chunk-OYM6VJEF.cjs → chunk-U3A46QFD.cjs} +140 -91
  62. package/dist/{chunk-VGHDPEPQ.cjs → chunk-UA77C2ZA.cjs} +2 -2
  63. package/dist/{chunk-U54REWMJ.cjs → chunk-VCI776NG.cjs} +13 -13
  64. package/dist/{chunk-WYTK7HQS.cjs → chunk-VCZ4EM5K.cjs} +391 -353
  65. package/dist/{chunk-F7JVO3OZ.cjs → chunk-VGZIIOU6.cjs} +4 -4
  66. package/dist/{chunk-5P65LXGU.cjs → chunk-WSQ3S3NV.cjs} +2 -2
  67. package/dist/{chunk-RQ6XX5IN.mjs → chunk-X2SMVPLH.mjs} +20 -4
  68. package/dist/{chunk-TOUC6BR3.cjs → chunk-XFUPWRKT.cjs} +4 -4
  69. package/dist/{chunk-DJ3PVHTW.cjs → chunk-XGPRM7OK.cjs} +3 -3
  70. package/dist/{chunk-L3BSHASB.cjs → chunk-XMVZXZ32.cjs} +4 -4
  71. package/dist/{chunk-L5HDCDFT.mjs → chunk-YNPVG2GG.mjs} +1 -1
  72. package/dist/{chunk-MAPHNGTF.cjs → chunk-Z43CIBUR.cjs} +21 -5
  73. package/dist/{chunk-7TPLDPNC.cjs → chunk-ZCX2XJPY.cjs} +10 -10
  74. package/dist/{chunk-GLNVLCUH.cjs → chunk-ZSVFI7JM.cjs} +6 -6
  75. package/dist/{cli-runtime.d-DaElKjaL.d.ts → cli-runtime.d-jqZ7YCsm.d.ts} +5 -5
  76. package/dist/{cli-runtime.d-C7aMfoTq.d.mts → cli-runtime.d-qL44rqYO.d.mts} +5 -5
  77. package/dist/{client-component.d-miqIXyQv.d.mts → client-component.d-B2L2LyAr.d.mts} +1 -1
  78. package/dist/{client-component.d-CZG02pIh.d.ts → client-component.d-BDD5aiUb.d.ts} +1 -1
  79. package/dist/{client-plugins.d-BVXjyIkY.d.ts → client-plugins.d-Crct3m_r.d.ts} +14 -5
  80. package/dist/{client-plugins.d-BwKwuO_0.d.mts → client-plugins.d-Dzc3vOw_.d.mts} +14 -5
  81. package/dist/client-plugins.d.mts +1 -1
  82. package/dist/client-plugins.d.ts +1 -1
  83. package/dist/client.d.mts +8 -7
  84. package/dist/client.d.ts +8 -7
  85. package/dist/config.d.mts +1 -1
  86. package/dist/config.d.ts +1 -1
  87. package/dist/desktop.d.mts +2 -2
  88. package/dist/desktop.d.ts +2 -2
  89. package/dist/{devtools-SXL5RFE5.cjs → devtools-GPIKZ5AV.cjs} +7 -5
  90. package/dist/{devtools-34ZQWX3M.mjs → devtools-GWJZPWIW.mjs} +5 -3
  91. package/dist/docs.cjs +7 -5
  92. package/dist/docs.d.mts +3 -3
  93. package/dist/docs.d.ts +3 -3
  94. package/dist/docs.mjs +6 -4
  95. package/dist/environment/vite.cjs +5 -5
  96. package/dist/environment/vite.mjs +4 -4
  97. package/dist/font.cjs +4 -2
  98. package/dist/font.d.mts +13 -1
  99. package/dist/font.d.ts +13 -1
  100. package/dist/font.mjs +3 -1
  101. package/dist/{handler.d-BKTWzzNA.d.mts → handler.d-B1S1ZBqS.d.mts} +1 -1
  102. package/dist/{handler.d-Dzpyg3-N.d.ts → handler.d-ZweCBJD4.d.ts} +1 -1
  103. package/dist/{headers.d-PZyXcDAH.d.ts → headers.d-BgBdQN8x.d.ts} +1 -1
  104. package/dist/{headers.d-5opjyhXw.d.mts → headers.d-C-yGl_f6.d.mts} +1 -1
  105. package/dist/image-attributes.d-BMPDQO1q.d.mts +55 -0
  106. package/dist/image-attributes.d-BMPDQO1q.d.ts +55 -0
  107. package/dist/image.cjs +5 -127
  108. package/dist/image.d.mts +3 -13
  109. package/dist/image.d.ts +3 -13
  110. package/dist/image.mjs +5 -127
  111. package/dist/index.cjs +28 -26
  112. package/dist/{index.d-C0Mie66f.d.mts → index.d-13h3oDu7.d.mts} +1 -1
  113. package/dist/{index.d-DV2q-0mE.d.ts → index.d-CtoniAXT.d.ts} +1 -1
  114. package/dist/index.d.mts +24 -23
  115. package/dist/index.d.ts +24 -23
  116. package/dist/index.mjs +27 -25
  117. package/dist/integrations/orm.d.mts +1 -1
  118. package/dist/integrations/orm.d.ts +1 -1
  119. package/dist/integrations.d.mts +1 -1
  120. package/dist/integrations.d.ts +1 -1
  121. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  122. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  123. package/dist/internal/build-runtime.cjs +23 -23
  124. package/dist/internal/build-runtime.d.mts +4 -4
  125. package/dist/internal/build-runtime.d.ts +4 -4
  126. package/dist/internal/build-runtime.mjs +22 -22
  127. package/dist/internal/cli-runtime.cjs +9 -7
  128. package/dist/internal/cli-runtime.d.mts +7 -7
  129. package/dist/internal/cli-runtime.d.ts +7 -7
  130. package/dist/internal/cli-runtime.mjs +8 -6
  131. package/dist/internal/client-error-overlay.cjs +4 -4
  132. package/dist/internal/client-error-overlay.mjs +1 -1
  133. package/dist/internal/client-runtime.cjs +66 -40
  134. package/dist/internal/client-runtime.d.mts +6 -6
  135. package/dist/internal/client-runtime.d.ts +6 -6
  136. package/dist/internal/client-runtime.mjs +53 -27
  137. package/dist/internal/compression-runtime.d.mts +1 -1
  138. package/dist/internal/compression-runtime.d.ts +1 -1
  139. package/dist/internal/config-runtime.cjs +7 -5
  140. package/dist/internal/config-runtime.d.mts +3 -3
  141. package/dist/internal/config-runtime.d.ts +3 -3
  142. package/dist/internal/config-runtime.mjs +6 -4
  143. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  144. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  145. package/dist/internal/islands-boot.cjs +44 -16
  146. package/dist/internal/islands-boot.d.mts +3 -1
  147. package/dist/internal/islands-boot.d.ts +3 -1
  148. package/dist/internal/islands-boot.mjs +28 -0
  149. package/dist/internal/native-server-fns.cjs +4 -4
  150. package/dist/internal/native-server-fns.mjs +3 -3
  151. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  152. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  153. package/dist/internal/production-runtime.cjs +6 -6
  154. package/dist/internal/production-runtime.d.mts +10 -10
  155. package/dist/internal/production-runtime.d.ts +10 -10
  156. package/dist/internal/production-runtime.mjs +5 -5
  157. package/dist/internal/renderer-islands.cjs +35 -8
  158. package/dist/internal/renderer-islands.d.mts +9 -1
  159. package/dist/internal/renderer-islands.d.ts +9 -1
  160. package/dist/internal/renderer-islands.mjs +35 -8
  161. package/dist/internal/spa-router.d.mts +3 -3
  162. package/dist/internal/spa-router.d.ts +3 -3
  163. package/dist/internal/start-manifest.d.mts +1 -1
  164. package/dist/internal/start-manifest.d.ts +1 -1
  165. package/dist/{island-runtime.d-BA7EPo1v.d.ts → island-runtime.d-D2Mh5eTU.d.ts} +5 -1
  166. package/dist/{island-runtime.d-BBS_YUSX.d.mts → island-runtime.d-lrpEJlgg.d.mts} +5 -1
  167. package/dist/markdown.d.mts +1 -1
  168. package/dist/markdown.d.ts +1 -1
  169. package/dist/middleware.cjs +4 -4
  170. package/dist/middleware.d.mts +1 -1
  171. package/dist/middleware.d.ts +1 -1
  172. package/dist/middleware.mjs +3 -3
  173. package/dist/{mount.d-gWul1GA1.d.ts → mount.d-DyKlRR6z.d.ts} +1 -1
  174. package/dist/{mount.d-CZ_qL1iS.d.mts → mount.d-_6Un9wdK.d.mts} +1 -1
  175. package/dist/{navigation-delegate.d-BBTzhJLj.d.mts → navigation-delegate.d-ChfinbWB.d.mts} +1 -1
  176. package/dist/{navigation-delegate.d-BZsYEAet.d.ts → navigation-delegate.d-fMgELdAe.d.ts} +1 -1
  177. package/dist/navigation.d.mts +4 -4
  178. package/dist/navigation.d.ts +4 -4
  179. package/dist/{plugin-QOTAPTVV.mjs → plugin-EVKQZBNW.mjs} +1 -1
  180. package/dist/{plugin-3PT7I26P.cjs → plugin-MWO3G2XM.cjs} +2 -2
  181. package/dist/plugin.cjs +20 -20
  182. package/dist/plugin.d.mts +5 -5
  183. package/dist/plugin.d.ts +5 -5
  184. package/dist/plugin.mjs +19 -19
  185. package/dist/{render-plan.d-AaJsYPX-.d.ts → render-plan.d-D0FV9lDT.d.ts} +1 -1
  186. package/dist/{render-plan.d-bnWxS12w.d.mts → render-plan.d-DaM1NPnm.d.mts} +1 -1
  187. package/dist/renderer-client.cjs +6 -1
  188. package/dist/renderer-client.d.mts +6 -5
  189. package/dist/renderer-client.d.ts +6 -5
  190. package/dist/renderer-client.mjs +5 -0
  191. package/dist/renderer.cjs +4 -4
  192. package/dist/renderer.d.mts +10 -2
  193. package/dist/renderer.d.ts +10 -2
  194. package/dist/renderer.mjs +3 -3
  195. package/dist/{request.d-CAeitOG1.d.ts → request.d-CrXC7voZ.d.ts} +1 -1
  196. package/dist/{request.d-C2HOn3Hi.d.mts → request.d-DVSLilGx.d.mts} +1 -1
  197. package/dist/request.d.mts +2 -2
  198. package/dist/request.d.ts +2 -2
  199. package/dist/{route-rendering.d-CYA-ulnX.d.mts → route-rendering.d-CWi3UYtR.d.mts} +1 -1
  200. package/dist/{route-rendering.d-A1dIkUK5.d.ts → route-rendering.d-OfbM_rj8.d.ts} +1 -1
  201. package/dist/{router.d-A_Yt6jYz.d.ts → router.d-D5Mp7bpO.d.ts} +1 -1
  202. package/dist/{router.d-8lxnzlkr.d.mts → router.d-DrQ1QDFk.d.mts} +1 -1
  203. package/dist/routes.d.mts +1 -1
  204. package/dist/routes.d.ts +1 -1
  205. package/dist/{rsc-pipeline-MW2V3WEE.mjs → rsc-pipeline-KLMQU3YP.mjs} +7 -5
  206. package/dist/{rsc-pipeline-ESPGX4VX.cjs → rsc-pipeline-TQOSDWOU.cjs} +8 -6
  207. package/dist/{runtime-KGSOEMLT.mjs → runtime-BDPBO65S.mjs} +7 -5
  208. package/dist/{runtime-FCMLEBTX.cjs → runtime-CQSCRVZ7.cjs} +12 -10
  209. package/dist/{runtime.d-C_rZ9_DD.d.mts → runtime.d-BVj6apd0.d.mts} +1 -1
  210. package/dist/{runtime.d-BPyvWrgQ.d.ts → runtime.d-D7QYVJGO.d.ts} +1 -1
  211. package/dist/{server-components-status.d-BpxiEMQE.d.mts → server-components-status.d-BDVcxi0z.d.mts} +1 -1
  212. package/dist/{server-components-status.d-C2UEKJn7.d.ts → server-components-status.d-CfKDpmCH.d.ts} +1 -1
  213. package/dist/server-plugins.d.mts +3 -3
  214. package/dist/server-plugins.d.ts +3 -3
  215. package/dist/server.cjs +45 -45
  216. package/dist/server.d.mts +11 -11
  217. package/dist/server.d.ts +11 -11
  218. package/dist/server.mjs +21 -21
  219. package/dist/{spa-router.d-Cw5i_15e.d.ts → spa-router.d-BXxoU3Cv.d.ts} +2 -2
  220. package/dist/{spa-router.d-BD-6WX1R.d.mts → spa-router.d-CXgvy-7L.d.mts} +2 -2
  221. package/dist/{ssg.d-CCE9aob5.d.mts → ssg.d-DS-gXUbf.d.mts} +2 -2
  222. package/dist/{ssg.d-Bifiq0EL.d.ts → ssg.d-jXlUAKzg.d.ts} +2 -2
  223. package/dist/{store-core.d-BN2MxSG9.d.mts → store-core.d-CDbVAbTn.d.mts} +3 -2
  224. package/dist/{store-core.d-5tVn5vi1.d.ts → store-core.d-D00BsbnO.d.ts} +3 -2
  225. package/dist/testing.cjs +2 -2
  226. package/dist/testing.d.mts +1 -1
  227. package/dist/testing.d.ts +1 -1
  228. package/dist/testing.mjs +2 -2
  229. package/dist/{utils.d-BUjpSNIO.d.ts → utils.d-BODwBtkz.d.ts} +1 -1
  230. package/dist/{utils.d-wGPLeVbq.d.mts → utils.d-Cmj-fzds.d.mts} +1 -1
  231. package/dist/version.cjs +2 -2
  232. package/dist/version.mjs +1 -1
  233. package/dist/vite.cjs +25 -23
  234. package/dist/vite.d.mts +21 -7
  235. package/dist/vite.d.ts +21 -7
  236. package/dist/vite.mjs +24 -22
  237. package/package.json +2 -2
  238. package/dist/analyzer-XVY76XMM.cjs +0 -17
  239. package/dist/chunk-7EPYN7GW.cjs +0 -30
  240. package/dist/chunk-HZOMT5DY.mjs +0 -30
  241. package/dist/{chunk-4B6YJ5DS.cjs → chunk-4ZVKDHS6.cjs} +3 -3
  242. package/dist/{chunk-4EEAPBNV.mjs → chunk-PEQJ4UUT.mjs} +3 -3
@@ -9,13 +9,13 @@ import {
9
9
  collectSSGPages,
10
10
  matchSSGPage,
11
11
  resolveRouteRenderingConfigFromFile
12
- } from "./chunk-CWUQBECF.mjs";
12
+ } from "./chunk-4SJ22WTT.mjs";
13
13
  import {
14
14
  resolveFarmRendererRoutes
15
- } from "./chunk-L5HDCDFT.mjs";
15
+ } from "./chunk-YNPVG2GG.mjs";
16
16
  import {
17
17
  findFarmAppPackageDir
18
- } from "./chunk-MYSH5Y4E.mjs";
18
+ } from "./chunk-4IE3YK7U.mjs";
19
19
  import {
20
20
  createFarmMetadataImageResponse,
21
21
  resolveFarmMetadataImageValue
@@ -56,10 +56,10 @@ import {
56
56
  stripRouteGroups,
57
57
  takeFarmHoistedHead,
58
58
  takeFarmNavigationOutlet
59
- } from "./chunk-4EEAPBNV.mjs";
59
+ } from "./chunk-PEQJ4UUT.mjs";
60
60
  import {
61
61
  listFarmMCPLlmsTxtLinks
62
- } from "./chunk-YX532KEF.mjs";
62
+ } from "./chunk-4FGTNYHE.mjs";
63
63
  import {
64
64
  FARM_DEFAULT_MCP_PATH,
65
65
  collectFarmDefaultMCPPages,
@@ -104,7 +104,7 @@ import {
104
104
  traceFarmSourceReads,
105
105
  usesFarmServerTree,
106
106
  withFarmSourceSnapshot
107
- } from "./chunk-3TCFONUE.mjs";
107
+ } from "./chunk-26HESRBL.mjs";
108
108
  import {
109
109
  _setDefaultFarmThemeConfig,
110
110
  getTheme
@@ -165,10 +165,7 @@ import {
165
165
  resolveFarmRendererAppSetup,
166
166
  resolveFarmRendererModule,
167
167
  resolveFarmServerComponentsMode
168
- } from "./chunk-BCCCPFHQ.mjs";
169
- import {
170
- resolveFarmImageConfig
171
- } from "./chunk-AOIUYHPH.mjs";
168
+ } from "./chunk-HV6CYSMF.mjs";
172
169
  import {
173
170
  resolveCronConfig
174
171
  } from "./chunk-7VJXYB6S.mjs";
@@ -266,8 +263,9 @@ import {
266
263
  toFileModuleUrl
267
264
  } from "./chunk-VHIXGZYH.mjs";
268
265
  import {
266
+ createFarmDevModuleCheck,
269
267
  loadFarmDevModule
270
- } from "./chunk-7H2TXT2K.mjs";
268
+ } from "./chunk-HX5HLFBZ.mjs";
271
269
  import {
272
270
  resolveFarmI18nConfig
273
271
  } from "./chunk-VJSXPN3W.mjs";
@@ -306,10 +304,13 @@ import {
306
304
  } from "./chunk-EILUVBKS.mjs";
307
305
  import {
308
306
  FARM_VERSION
309
- } from "./chunk-XIXAUXV3.mjs";
307
+ } from "./chunk-O7K4HMAQ.mjs";
310
308
  import {
311
309
  normalizeFarmAPIConfig
312
310
  } from "./chunk-W6QLRQ3V.mjs";
311
+ import {
312
+ resolveFarmImageConfig
313
+ } from "./chunk-AOIUYHPH.mjs";
313
314
  import {
314
315
  _setFarmSearchPreserveRoutes
315
316
  } from "./chunk-VDQZV6BX.mjs";
@@ -2206,7 +2207,7 @@ function farmFontImportsPlugin(options = {}) {
2206
2207
  production
2207
2208
  );
2208
2209
  },
2209
- async transform(code, id) {
2210
+ async transform(code, id, transformOptions) {
2210
2211
  const result = await transformFarmFontCalls({
2211
2212
  code,
2212
2213
  id,
@@ -2217,6 +2218,13 @@ function farmFontImportsPlugin(options = {}) {
2217
2218
  register: (moduleId, calls) => registry.register(moduleId, calls, production)
2218
2219
  });
2219
2220
  if (!result) registry.clearModule(id.split("?", 1)[0]);
2221
+ const server = this.environment ? this.environment.config.consumer === "server" : transformOptions?.ssr === true;
2222
+ const cleanId = id.split("?", 1)[0];
2223
+ if (server && MODULE_EXTENSION_RE.test(cleanId) && options.isLayoutModule?.(cleanId)) {
2224
+ const source = result?.code ?? code;
2225
+ const inferred = addInferredLayoutFonts(source, this.parse(source));
2226
+ if (inferred) return { code: inferred, map: null };
2227
+ }
2220
2228
  return result ? { code: result.code, map: null } : null;
2221
2229
  },
2222
2230
  async generateBundle(_options, bundle) {
@@ -2561,6 +2569,74 @@ ${FONT_SECTION_END}
2561
2569
  return resource;
2562
2570
  }
2563
2571
  };
2572
+ function isFarmLayoutModule(id, appDirs) {
2573
+ if (!/\/layout\.[cm]?[jt]sx?$/.test(id)) return false;
2574
+ return appDirs.some((appDir) => id.startsWith(`${appDir.replace(/\\/g, "/")}/`));
2575
+ }
2576
+ var LAYOUT_FONTS_EXPORT = "__farmLayoutFonts";
2577
+ var LAYOUT_FONT_PROPERTIES = /* @__PURE__ */ new Set(["className", "variable"]);
2578
+ function addInferredLayoutFonts(code, ast) {
2579
+ const body = (Array.isArray(ast.body) ? ast.body : []).filter(isAstNode);
2580
+ if (body.some((statement) => statement.type === "ExportAllDeclaration")) return null;
2581
+ if (moduleExports(body, "fonts") || moduleExports(body, LAYOUT_FONTS_EXPORT)) return null;
2582
+ const bindings = moduleScopeBindings(body);
2583
+ const uses = [];
2584
+ const seen = /* @__PURE__ */ new Set();
2585
+ walkAst(ast, (node) => {
2586
+ if (node.type !== "MemberExpression" || node.computed === true) return;
2587
+ if (!isAstNode(node.object) || node.object.type !== "Identifier") return;
2588
+ const name = node.object.name;
2589
+ const property2 = readPropertyName(node.property);
2590
+ if (typeof name !== "string" || !bindings.has(name)) return;
2591
+ if (!property2 || !LAYOUT_FONT_PROPERTIES.has(property2)) return;
2592
+ const key = `${name}.${property2}`;
2593
+ if (seen.has(key)) return;
2594
+ seen.add(key);
2595
+ uses.push(`[${name}, ${JSON.stringify(property2)}]`);
2596
+ });
2597
+ if (uses.length === 0) return null;
2598
+ return `${code}
2599
+ import { inferFarmLayoutFonts as __farmInferLayoutFonts } from "@farm.js/core/font";
2600
+ export const ${LAYOUT_FONTS_EXPORT} = /* @__PURE__ */ __farmInferLayoutFonts([${uses.join(", ")}]);
2601
+ `;
2602
+ }
2603
+ function moduleExports(body, name) {
2604
+ return body.some((statement) => {
2605
+ if (statement.type !== "ExportNamedDeclaration") return false;
2606
+ const specifiers = Array.isArray(statement.specifiers) ? statement.specifiers : [];
2607
+ if (specifiers.some((specifier) => readPropertyName(specifier.exported) === name)) return true;
2608
+ return isAstNode(statement.declaration) && declaredNames(statement.declaration).includes(name);
2609
+ });
2610
+ }
2611
+ function moduleScopeBindings(body) {
2612
+ const names = /* @__PURE__ */ new Set();
2613
+ for (const statement of body) {
2614
+ if (statement.type === "ImportDeclaration") {
2615
+ if (statement.importKind === "type") continue;
2616
+ const specifiers = Array.isArray(statement.specifiers) ? statement.specifiers : [];
2617
+ for (const specifier of specifiers) {
2618
+ if (specifier.importKind === "type" || !isAstNode(specifier.local)) continue;
2619
+ if (typeof specifier.local.name === "string") names.add(specifier.local.name);
2620
+ }
2621
+ continue;
2622
+ }
2623
+ const declaration = statement.type === "ExportNamedDeclaration" || statement.type === "ExportDefaultDeclaration" ? statement.declaration : statement;
2624
+ if (isAstNode(declaration)) for (const name of declaredNames(declaration)) names.add(name);
2625
+ }
2626
+ return names;
2627
+ }
2628
+ function declaredNames(declaration) {
2629
+ if (declaration.type === "VariableDeclaration") {
2630
+ const declarations = Array.isArray(declaration.declarations) ? declaration.declarations : [];
2631
+ return declarations.flatMap(
2632
+ (declarator) => isAstNode(declarator.id) && declarator.id.type === "Identifier" && typeof declarator.id.name === "string" ? [declarator.id.name] : []
2633
+ );
2634
+ }
2635
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && isAstNode(declaration.id) && typeof declaration.id.name === "string") {
2636
+ return [declaration.id.name];
2637
+ }
2638
+ return [];
2639
+ }
2564
2640
  function findFontBindings(ast) {
2565
2641
  const named = /* @__PURE__ */ new Map();
2566
2642
  const namespaces = /* @__PURE__ */ new Set();
@@ -4264,6 +4340,7 @@ var ServerRenderer = class {
4264
4340
  constructor(config, routeManager, i18nRuntime, viteServer) {
4265
4341
  this.ssgManifest = [];
4266
4342
  this.dataCache = getFarmDataCache();
4343
+ this.rendererServerModuleCurrent = () => true;
4267
4344
  this.config = config;
4268
4345
  this.routeManager = routeManager;
4269
4346
  this.i18nRuntime = i18nRuntime;
@@ -4272,7 +4349,7 @@ var ServerRenderer = class {
4272
4349
  this.loadSSGManifest();
4273
4350
  }
4274
4351
  async initialize() {
4275
- if (this.rendererRuntime) return;
4352
+ if (this.rendererRuntime && this.rendererServerModuleCurrent()) return;
4276
4353
  if (this.islandValues()) {
4277
4354
  installFarmIslandValues();
4278
4355
  (await import("./internal/islands-server.mjs")).installFarmIslandsServer();
@@ -4289,6 +4366,7 @@ var ServerRenderer = class {
4289
4366
  this.config.renderer.server
4290
4367
  )
4291
4368
  ).href);
4369
+ this.rendererServerModuleCurrent = this.viteServer && !isReactRenderer(this.config.renderer) && !isFarmRendererDisabled(this.config.renderer) ? createFarmDevModuleCheck(this.viteServer, loaded) : () => true;
4292
4370
  const runtime = loaded;
4293
4371
  assertFarmRendererServerModule(runtime, this.config.renderer);
4294
4372
  assertFarmRendererStreamingRuntime(
@@ -6734,7 +6812,7 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
6734
6812
  const renderToPipeableStream = runtime.renderToPipeableStream ?? (getFarmRendererStreamingCapabilitiesForRuntime(this.config.renderer, "node").web && runtime.renderToReadableStream ? pipeFarmRendererWebStream(runtime) : void 0);
6735
6813
  const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
6736
6814
  const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument(req);
6737
- if (!renderToPipeableStream || _isFarmMarkdownPageCheck(req.headers?.[FARM_MARKDOWN_PAGE_CHECK_HEADER]) || streamDocument && (options.captureStaticShell || !isReactRenderer(this.config.renderer))) {
6815
+ if (!renderToPipeableStream || _isFarmMarkdownPageCheck(req.headers?.[FARM_MARKDOWN_PAGE_CHECK_HEADER]) || streamDocument && options.captureStaticShell) {
6738
6816
  return this.renderBufferedSSR(element, req, res, clearMiddlewareData, options);
6739
6817
  }
6740
6818
  return new Promise((resolve3, reject) => {
@@ -8810,6 +8888,7 @@ export {
8810
8888
  RouteManager,
8811
8889
  createFarmDevClientManifest,
8812
8890
  farmFontImportsPlugin,
8891
+ isFarmLayoutModule,
8813
8892
  mergeFarmFontCss,
8814
8893
  resolveDevGlobalStylesheetHref,
8815
8894
  collectDevStylesheetUrls,
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-LRPPXKCX.mjs";
19
19
  import {
20
20
  resolveDocsConfig
21
- } from "./chunk-4QCMTIBM.mjs";
21
+ } from "./chunk-ALOFMAFA.mjs";
22
22
  import {
23
23
  getFarmDocsAdapterConfigModule,
24
24
  isSecretDocsConfigKey
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkQ7GB3I4Ocjs = require('./chunk-Q7GB3I4O.cjs');
4
+ var _chunk7BNVUIGLcjs = require('./chunk-7BNVUIGL.cjs');
5
5
 
6
6
 
7
7
  var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
@@ -64,7 +64,7 @@ function findFarmNativeScreenFiles(appDirs) {
64
64
  }
65
65
  function collectFarmNativeServerFns(options) {
66
66
  const { root, srcDir } = options;
67
- const aliases = _chunkQ7GB3I4Ocjs.readAliases.call(void 0, root, srcDir);
67
+ const aliases = _chunk7BNVUIGLcjs.readAliases.call(void 0, root, srcDir);
68
68
  const seen = /* @__PURE__ */ new Set();
69
69
  const found = /* @__PURE__ */ new Map();
70
70
  const queue = [...options.entries];
@@ -98,7 +98,7 @@ function collectFarmNativeServerFns(options) {
98
98
  }
99
99
  }
100
100
  for (const candidate of _nullishCoalesce(candidates, () => ( []))) {
101
- const resolved = _chunkQ7GB3I4Ocjs.resolveFile.call(void 0, candidate);
101
+ const resolved = _chunk7BNVUIGLcjs.resolveFile.call(void 0, candidate);
102
102
  if (resolved && SCRIPT.test(resolved) && !resolved.includes(`${_path2.default.sep}node_modules${_path2.default.sep}`)) {
103
103
  queue.push(resolved);
104
104
  break;