@farm.js/core 0.1.62 → 0.1.64

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 (194) hide show
  1. package/dist/{agent-mcp-handler-OV4WRFBL.cjs → agent-mcp-handler-OXT73ZBY.cjs} +5 -5
  2. package/dist/{agent-mcp-handler-7QMX2LUY.mjs → agent-mcp-handler-QLFDDTYN.mjs} +4 -4
  3. package/dist/{agent-mcp.d-BKZ3UNbt.d.mts → agent-mcp.d-CO_ABmNK.d.mts} +1 -1
  4. package/dist/{agent-mcp.d-C1zr_nGS.d.ts → agent-mcp.d-QD2WZ9BS.d.ts} +1 -1
  5. package/dist/agent-runtime.d.mts +1 -1
  6. package/dist/agent-runtime.d.ts +1 -1
  7. package/dist/analyzer-ODLF2Z6O.cjs +16 -0
  8. package/dist/{analyzer-YESYU3GK.mjs → analyzer-Q3QXC6PD.mjs} +3 -2
  9. package/dist/api/route-manager.d.mts +3 -3
  10. package/dist/api/route-manager.d.ts +3 -3
  11. package/dist/api/runtime.d.mts +2 -2
  12. package/dist/api/runtime.d.ts +2 -2
  13. package/dist/api.d.mts +3 -3
  14. package/dist/api.d.ts +3 -3
  15. package/dist/{app-manifest.d-ntch_bvA.d.ts → app-manifest.d-BpKxiU_E.d.mts} +9 -1
  16. package/dist/{app-manifest.d-BpvhfKRH.d.mts → app-manifest.d-DDmNkYQQ.d.ts} +9 -1
  17. package/dist/app-markdown.cjs +4 -4
  18. package/dist/app-markdown.d.mts +2 -2
  19. package/dist/app-markdown.d.ts +2 -2
  20. package/dist/app-markdown.mjs +3 -3
  21. package/dist/{app.d-CysWA_8v.d.mts → app.d-kuoVWhWM.d.mts} +4 -4
  22. package/dist/{app.d-AE8_v3Db.d.ts → app.d-x68Cwr0_.d.ts} +4 -4
  23. package/dist/{chunk-LT4VAF5Z.cjs → chunk-2C5L5RPM.cjs} +7 -6
  24. package/dist/{chunk-RMUD75WT.cjs → chunk-3EBHJET2.cjs} +355 -270
  25. package/dist/{chunk-RZNCMRD3.mjs → chunk-6NHSGVVA.mjs} +1 -1
  26. package/dist/{chunk-LVWGURLD.mjs → chunk-6NNYPY5W.mjs} +327 -13
  27. package/dist/{chunk-PRFNLQSP.cjs → chunk-7XGWBPQQ.cjs} +4 -4
  28. package/dist/{chunk-SG57PX7K.cjs → chunk-BTVDYS4B.cjs} +7 -2
  29. package/dist/{chunk-545WJ5UG.cjs → chunk-DUSHDZQL.cjs} +11 -11
  30. package/dist/{chunk-GVOMPU3Y.cjs → chunk-EL4364S2.cjs} +209 -32
  31. package/dist/{chunk-GGNJAGGE.cjs → chunk-FAP7CX7C.cjs} +1056 -529
  32. package/dist/{chunk-T46NNU4D.mjs → chunk-FH45OB37.mjs} +2 -2
  33. package/dist/{chunk-55U5QIXQ.mjs → chunk-FIR62CR3.mjs} +1 -1
  34. package/dist/{chunk-MEQN6DDA.cjs → chunk-FJWN7RV4.cjs} +5 -5
  35. package/dist/chunk-IOEXXZK3.mjs +88 -0
  36. package/dist/{chunk-EXXFSZOC.cjs → chunk-JCPSA4X5.cjs} +135 -134
  37. package/dist/{chunk-YSXTNSXS.mjs → chunk-K7OZAVOI.mjs} +7 -6
  38. package/dist/{chunk-KVW2M6PI.mjs → chunk-KL7SHLQB.mjs} +1 -1
  39. package/dist/{chunk-NT3QDN2E.mjs → chunk-LQDLEWPO.mjs} +1 -1
  40. package/dist/{chunk-UZZ6IEQP.mjs → chunk-MESQF2JC.mjs} +2 -2
  41. package/dist/{chunk-WKJQ2FJA.cjs → chunk-MG356ROI.cjs} +5 -5
  42. package/dist/{chunk-AJB3DHN6.cjs → chunk-N3Z3PLHC.cjs} +2 -2
  43. package/dist/{chunk-2CNKQC3G.mjs → chunk-NNLFW3P4.mjs} +2 -2
  44. package/dist/{chunk-XX32BOMM.cjs → chunk-NXFA7G3Y.cjs} +52 -26
  45. package/dist/{chunk-SM25ZC4S.cjs → chunk-O2XFIPNL.cjs} +1 -1
  46. package/dist/{chunk-VWW4Q3BJ.mjs → chunk-O4FWNLQK.mjs} +4 -4
  47. package/dist/{chunk-DZPR2W6U.cjs → chunk-O6L3YYPM.cjs} +5 -5
  48. package/dist/{chunk-UWI3SJAK.cjs → chunk-O7IEMY55.cjs} +3 -3
  49. package/dist/{chunk-6BJJYOFL.cjs → chunk-OLIGNTWU.cjs} +7 -7
  50. package/dist/{chunk-OUWRNHTV.mjs → chunk-OYF23QLG.mjs} +17 -16
  51. package/dist/{chunk-IQIKPKFP.mjs → chunk-RAH5MT53.mjs} +110 -25
  52. package/dist/{chunk-E72UD6ME.mjs → chunk-RVGSVQWT.mjs} +1 -1
  53. package/dist/{chunk-ZVIEFTUA.cjs → chunk-S25BQIFW.cjs} +16 -16
  54. package/dist/chunk-S7ZW72JH.cjs +254 -0
  55. package/dist/{chunk-VM7X5CKC.mjs → chunk-SLYDIHLW.mjs} +31 -5
  56. package/dist/chunk-SNFTMSHX.mjs +254 -0
  57. package/dist/{chunk-2WZTGPK6.mjs → chunk-SQ5O7I3L.mjs} +7 -2
  58. package/dist/{chunk-PCXIJKPM.mjs → chunk-TNBJ4LZG.mjs} +2 -2
  59. package/dist/{chunk-O27PLNQZ.cjs → chunk-UJ3R2AH2.cjs} +4 -4
  60. package/dist/{chunk-T4TBK5NY.mjs → chunk-VQ4NWOWO.mjs} +2 -2
  61. package/dist/{chunk-ZZ2QKCKW.mjs → chunk-WAY6LOQH.mjs} +1 -1
  62. package/dist/chunk-WBTHHTBO.cjs +88 -0
  63. package/dist/{chunk-ZBUAOGMY.mjs → chunk-WFNAOWH4.mjs} +1 -1
  64. package/dist/{chunk-IWRLV46X.cjs → chunk-WMTBBQHY.cjs} +4 -4
  65. package/dist/{chunk-2JYBLE63.mjs → chunk-WNYRYI4D.mjs} +770 -243
  66. package/dist/{chunk-CI4UNQHO.cjs → chunk-XBSKPLHF.cjs} +2 -2
  67. package/dist/{chunk-IOF4KXMP.mjs → chunk-XVWSDSUM.mjs} +201 -24
  68. package/dist/{chunk-JEJQGZI7.cjs → chunk-XZLZ6YPP.cjs} +346 -32
  69. package/dist/{chunk-QAS7KE7J.cjs → chunk-Y5TOT5F6.cjs} +5 -5
  70. package/dist/{chunk-DPE53XWL.mjs → chunk-ZEXE4TGY.mjs} +1 -1
  71. package/dist/{client-component.d-BoqC2MLC.d.mts → client-component.d-D74pqdea.d.mts} +14 -3
  72. package/dist/{client-component.d-Bgt3x5Fu.d.ts → client-component.d-D8VcypQA.d.ts} +14 -3
  73. package/dist/{client-plugins.d-BcqIy4au.d.ts → client-plugins.d-CXElzotB.d.ts} +18 -2
  74. package/dist/{client-plugins.d-CWyYBxXf.d.mts → client-plugins.d-D4-6hNx7.d.mts} +18 -2
  75. package/dist/client-plugins.d.mts +1 -1
  76. package/dist/client-plugins.d.ts +1 -1
  77. package/dist/client.d.mts +6 -6
  78. package/dist/client.d.ts +6 -6
  79. package/dist/config.d.mts +1 -1
  80. package/dist/config.d.ts +1 -1
  81. package/dist/desktop.d.mts +2 -2
  82. package/dist/desktop.d.ts +2 -2
  83. package/dist/{devtools-NUVXYG7I.mjs → devtools-MX3FE733.mjs} +5 -5
  84. package/dist/{devtools-SVRSGPNC.cjs → devtools-WET5NAKO.cjs} +6 -6
  85. package/dist/docs.cjs +8 -8
  86. package/dist/docs.d.mts +2 -2
  87. package/dist/docs.d.ts +2 -2
  88. package/dist/docs.mjs +7 -7
  89. package/dist/index.cjs +21 -20
  90. package/dist/{index.d-nAncqTXz.d.ts → index.d-A_x10zGS.d.ts} +1 -1
  91. package/dist/{index.d-BDaiu2i5.d.mts → index.d-SSgYDv4D.d.mts} +1 -1
  92. package/dist/index.d.mts +16 -16
  93. package/dist/index.d.ts +16 -16
  94. package/dist/index.mjs +20 -19
  95. package/dist/integrations.d.mts +1 -1
  96. package/dist/integrations.d.ts +1 -1
  97. package/dist/internal/app-markdown-runtime.cjs +3 -3
  98. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  99. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  100. package/dist/internal/app-markdown-runtime.mjs +2 -2
  101. package/dist/internal/build-runtime.cjs +22 -21
  102. package/dist/internal/build-runtime.d.mts +3 -3
  103. package/dist/internal/build-runtime.d.ts +3 -3
  104. package/dist/internal/build-runtime.mjs +21 -20
  105. package/dist/internal/cli-runtime.cjs +7 -7
  106. package/dist/internal/cli-runtime.mjs +6 -6
  107. package/dist/internal/client-error-overlay.cjs +4 -4
  108. package/dist/internal/client-error-overlay.mjs +1 -1
  109. package/dist/internal/client-runtime.d.mts +4 -4
  110. package/dist/internal/client-runtime.d.ts +4 -4
  111. package/dist/internal/compression-runtime.d.mts +1 -1
  112. package/dist/internal/compression-runtime.d.ts +1 -1
  113. package/dist/internal/config-runtime.cjs +7 -7
  114. package/dist/internal/config-runtime.d.mts +4 -4
  115. package/dist/internal/config-runtime.d.ts +4 -4
  116. package/dist/internal/config-runtime.mjs +6 -6
  117. package/dist/internal/infra-analytics-runtime.cjs +11 -9
  118. package/dist/internal/infra-analytics-runtime.mjs +9 -7
  119. package/dist/internal/native-server-fns.cjs +5 -4
  120. package/dist/internal/native-server-fns.mjs +4 -3
  121. package/dist/internal/product-telemetry-runtime.cjs +17 -211
  122. package/dist/internal/product-telemetry-runtime.mjs +10 -204
  123. package/dist/internal/production-runtime.cjs +13 -12
  124. package/dist/internal/production-runtime.d.mts +13 -12
  125. package/dist/internal/production-runtime.d.ts +13 -12
  126. package/dist/internal/production-runtime.mjs +14 -13
  127. package/dist/internal/react-cache.cjs +21 -1
  128. package/dist/internal/react-cache.d.mts +8 -1
  129. package/dist/internal/react-cache.d.ts +8 -1
  130. package/dist/internal/react-cache.mjs +21 -1
  131. package/dist/markdown.cjs +2 -2
  132. package/dist/markdown.d.mts +1 -1
  133. package/dist/markdown.d.ts +1 -1
  134. package/dist/markdown.mjs +1 -1
  135. package/dist/middleware.d.mts +3 -3
  136. package/dist/middleware.d.ts +3 -3
  137. package/dist/mobile.d.mts +2 -2
  138. package/dist/mobile.d.ts +2 -2
  139. package/dist/{native-tree-AS5L3ID3.mjs → native-tree-BPEE2LAL.mjs} +2 -2
  140. package/dist/{native-tree-Z2WYUJEV.cjs → native-tree-WOX3JMBG.cjs} +3 -3
  141. package/dist/{navigation-delegate.d-CSCm8ZxL.d.mts → navigation-delegate.d-DQVYKoaZ.d.mts} +1 -1
  142. package/dist/{navigation-delegate.d-BbUHRXxG.d.ts → navigation-delegate.d-GghbHJuK.d.ts} +1 -1
  143. package/dist/navigation.d.mts +4 -4
  144. package/dist/navigation.d.ts +4 -4
  145. package/dist/plugin.cjs +14 -14
  146. package/dist/plugin.d.mts +3 -3
  147. package/dist/plugin.d.ts +3 -3
  148. package/dist/plugin.mjs +13 -13
  149. package/dist/{production-runtime.d-DgT24A0f.d.ts → production-runtime.d-Bzns3NW9.d.ts} +1 -1
  150. package/dist/{production-runtime.d-CcQiDko5.d.mts → production-runtime.d-DiFa5vHW.d.mts} +1 -1
  151. package/dist/{render-plan.d-CyrX6MDs.d.ts → render-plan.d-CL_Ikfg_.d.ts} +1 -1
  152. package/dist/{render-plan.d-BH9WF-JZ.d.mts → render-plan.d-CcF0MeCf.d.mts} +1 -1
  153. package/dist/renderer-client.d.mts +4 -4
  154. package/dist/renderer-client.d.ts +4 -4
  155. package/dist/{request.d-BB8M8bcD.d.ts → request.d-B1RnTLri.d.ts} +1 -1
  156. package/dist/{request.d-CUrPnCW7.d.mts → request.d-DarDOCk9.d.mts} +1 -1
  157. package/dist/request.d.mts +2 -2
  158. package/dist/request.d.ts +2 -2
  159. package/dist/{route-rendering.d-DYqZMIf4.d.ts → route-rendering.d-BTUYCIj4.d.ts} +1 -1
  160. package/dist/{route-rendering.d-CYxlzaFm.d.mts → route-rendering.d-D_2Ual0-.d.mts} +1 -1
  161. package/dist/{router.d-DaKo507j.d.ts → router.d-CMANF6da.d.ts} +1 -1
  162. package/dist/{router.d-7o24CD8u.d.mts → router.d-Cuv1jntg.d.mts} +1 -1
  163. package/dist/{routes.d-BknKQcTu.d.ts → routes.d-B6yFe6jm.d.ts} +1 -1
  164. package/dist/{routes.d-D1IrO9KK.d.mts → routes.d-c2HKfrfL.d.mts} +1 -1
  165. package/dist/routes.d.mts +1 -1
  166. package/dist/routes.d.ts +1 -1
  167. package/dist/{rsc-pipeline-RFLHDAKD.mjs → rsc-pipeline-3LNVP2OO.mjs} +6 -6
  168. package/dist/{rsc-pipeline-OF2I7PCX.cjs → rsc-pipeline-G5WELVW3.cjs} +7 -7
  169. package/dist/{runtime-LBTK62AD.cjs → runtime-DMEULPE7.cjs} +22 -11
  170. package/dist/{runtime-M6UJCSLA.mjs → runtime-HQJ2LLQL.mjs} +20 -9
  171. package/dist/{runtime.d-CN73a-IL.d.ts → runtime.d-C3RQUj6_.d.ts} +1 -1
  172. package/dist/{runtime.d-CcNuzhX6.d.mts → runtime.d-wvh4ngU0.d.mts} +1 -1
  173. package/dist/server-plugins.d.mts +2 -2
  174. package/dist/server-plugins.d.ts +2 -2
  175. package/dist/server.cjs +31 -31
  176. package/dist/server.d.mts +9 -9
  177. package/dist/server.d.ts +9 -9
  178. package/dist/server.mjs +16 -16
  179. package/dist/{spa-router.d-CNi77LZm.d.mts → spa-router.d-WU_qS5gJ.d.mts} +2 -2
  180. package/dist/{spa-router.d-Cvgf5QP4.d.ts → spa-router.d-m8H_Kl_B.d.ts} +2 -2
  181. package/dist/testing.d.mts +1 -1
  182. package/dist/testing.d.ts +1 -1
  183. package/dist/{utils.d-C3H-14_Y.d.ts → utils.d-C9dQD5Zg.d.ts} +1 -1
  184. package/dist/{utils.d-D8VfzZYn.d.mts → utils.d-W9IiEqmW.d.mts} +1 -1
  185. package/dist/version.cjs +2 -2
  186. package/dist/version.mjs +1 -1
  187. package/dist/vite.cjs +18 -14
  188. package/dist/vite.d.mts +23 -5
  189. package/dist/vite.d.ts +23 -5
  190. package/dist/vite.mjs +17 -13
  191. package/package.json +1 -1
  192. package/dist/analyzer-2AHWJJR7.cjs +0 -15
  193. package/dist/chunk-CSLUBKGG.mjs +0 -44
  194. package/dist/chunk-SGBNF56S.cjs +0 -44
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readAliases,
3
3
  resolveFile
4
- } from "./chunk-LVWGURLD.mjs";
4
+ } from "./chunk-6NNYPY5W.mjs";
5
5
  import {
6
6
  transformFarmServerFns
7
7
  } from "./chunk-GNZIAJGB.mjs";
@@ -1,21 +1,28 @@
1
+ import {
2
+ farmComponentKind,
3
+ farmComponentModuleScripts,
4
+ keepFarmComponentRanges,
5
+ readFarmComponentBlocks
6
+ } from "./chunk-IOEXXZK3.mjs";
1
7
  import {
2
8
  FARM_NATIVE_STYLE_PROPERTIES,
3
9
  FARM_NATIVE_TEXT_KEYS,
4
10
  farmNativeClassProblem,
5
11
  inspectFarmNativeStylesheets,
6
12
  parseFarmNativeStylesheet,
7
- resolveFarmNativeClasses
13
+ resolveFarmNativeClasses,
14
+ resolveFarmNativeInlineStyle
8
15
  } from "./chunk-JCEFKP5M.mjs";
9
16
  import {
10
17
  FARM_VERSION
11
- } from "./chunk-NT3QDN2E.mjs";
18
+ } from "./chunk-LQDLEWPO.mjs";
12
19
 
13
20
  // src/mobile/analyzer.ts
14
21
  import { createHash } from "crypto";
15
22
  import { existsSync, readFileSync, statSync } from "fs";
16
23
  import { mkdir, readFile, writeFile } from "fs/promises";
17
24
  import * as path from "path";
18
- var ANALYZER_VERSION = `5:${FARM_VERSION}`;
25
+ var ANALYZER_VERSION = `6:${FARM_VERSION}`;
19
26
  var INTRINSIC_KINDS = {};
20
27
  for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
21
28
  INTRINSIC_KINDS[tag] = "View";
@@ -29,6 +36,8 @@ Object.assign(INTRINSIC_KINDS, {
29
36
  a: "Pressable",
30
37
  input: "TextInput",
31
38
  textarea: "TextInput",
39
+ // Native-tier screens submit forms as a browser would (native-tree.ts).
40
+ form: "View",
32
41
  ul: "List",
33
42
  ol: "List"
34
43
  });
@@ -162,6 +171,8 @@ var MAPPED_COMPONENTS = {
162
171
  };
163
172
  var SERVER_FN_FACTORIES = /* @__PURE__ */ new Set(["createServerFn", "createServerQuery"]);
164
173
  var SCRIPT_EXTENSIONS = [".tsx", ".ts", ".jsx", ".js", ".mjs"];
174
+ var COMPONENT_EXTENSIONS = [".vue", ".svelte"];
175
+ var isModuleFile = (file) => [...SCRIPT_EXTENSIONS, ...COMPONENT_EXTENSIONS].some((extension) => file.endsWith(extension));
165
176
  var STYLE_FILE = /\.(?:css|scss|sass|less|styl|stylus|pcss|postcss)(?:\?.*)?$/i;
166
177
  var ASSET_FILE = /\.(?:png|jpe?g|gif|webp|avif|svg|ico|bmp|json|woff2?|ttf|otf|mp3|wav|txt)(?:\?.*)?$/i;
167
178
  var STYLE_PROPERTIES = new Set(
@@ -310,7 +321,7 @@ var SKIP_KEYS = /* @__PURE__ */ new Set([
310
321
  "typeArguments",
311
322
  "decorators"
312
323
  ]);
313
- function analyzeSource(file, source, parseSync) {
324
+ function analyzeSource(file, source, parseSync, lang = scriptLang(file)) {
314
325
  const facts = {
315
326
  imports: [],
316
327
  blockers: [],
@@ -333,7 +344,8 @@ function analyzeSource(file, source, parseSync) {
333
344
  });
334
345
  };
335
346
  const needsDevice = (node, message) => block(node, "client-logic", message, "native");
336
- const result = parseSync(file, source, { lang: scriptLang(file) });
347
+ let formDepth = 0;
348
+ const result = parseSync(file, source, { lang });
337
349
  if (result.errors.length > 0) {
338
350
  const error = result.errors[0];
339
351
  const offset = error.labels?.[0]?.start ?? 0;
@@ -464,6 +476,7 @@ function analyzeSource(file, source, parseSync) {
464
476
  const props = {};
465
477
  const style = [];
466
478
  const events = [];
479
+ let submits = false;
467
480
  for (const attribute of opening.attributes) {
468
481
  if (attribute.type === "JSXSpreadAttribute") {
469
482
  if (isIntrinsic)
@@ -486,7 +499,10 @@ function analyzeSource(file, source, parseSync) {
486
499
  continue;
487
500
  }
488
501
  if ((name === "action" || name === "formAction") && isIntrinsic) {
489
- block(attribute, "form-action", `${name} on <${tag}>`);
502
+ if (staticString(value) === void 0) {
503
+ block(attribute, "form-action", `${name} on <${tag}>`);
504
+ }
505
+ submits = true;
490
506
  continue;
491
507
  }
492
508
  if (/^on[A-Z]/.test(name)) {
@@ -560,7 +576,8 @@ function analyzeSource(file, source, parseSync) {
560
576
  }
561
577
  if (tag === "input" && name === "type") {
562
578
  const type = staticString(value);
563
- if (type === void 0 || !INPUT_TYPES.has(type)) {
579
+ const formType = formDepth > 0 && (type === "hidden" || type === "submit");
580
+ if (!formType && (type === void 0 || !INPUT_TYPES.has(type))) {
564
581
  block(
565
582
  attribute,
566
583
  "unmapped-element",
@@ -577,6 +594,22 @@ function analyzeSource(file, source, parseSync) {
577
594
  if (kind === "TextInput" && events.some((event) => event === "onChange" || event === "onInput")) {
578
595
  wins.add("input");
579
596
  }
597
+ const inForm = formDepth > 0;
598
+ const buttonType = tag === "button" ? props.type ?? "submit" : void 0;
599
+ if (isIntrinsic && (tag === "button" || kind === "TextInput") && events.length === 0 && !submits && props.type !== "hidden" && (!inForm || buttonType !== void 0 && buttonType !== "submit")) {
600
+ block(
601
+ opening,
602
+ "inert-control",
603
+ inForm ? `<button type="${String(buttonType)}"> does nothing on a native-tier screen` : `<${tag}> has no link or form to submit on a native-tier screen`,
604
+ "native"
605
+ );
606
+ }
607
+ if (isIntrinsic && tag === "form") {
608
+ const method = typeof props.method === "string" ? props.method.toLowerCase() : "get";
609
+ if (props.method === "{expr}" || method !== "get" && method !== "post") {
610
+ block(opening, "form-action", `<form method="${String(props.method)}">`, "native");
611
+ }
612
+ }
580
613
  if (Object.keys(props).length > 0) node.props = props;
581
614
  if (style.length > 0) node.style = style;
582
615
  if (events.length > 0) node.events = events;
@@ -604,7 +637,10 @@ function analyzeSource(file, source, parseSync) {
604
637
  for (const attribute of node.openingElement.attributes) {
605
638
  visit(attribute.type === "JSXSpreadAttribute" ? attribute.argument : attribute.value);
606
639
  }
640
+ const form = ui.tag === "form";
641
+ if (form) formDepth += 1;
607
642
  visitChildren(node.children, ui);
643
+ if (form) formDepth -= 1;
608
644
  append(parent, ui);
609
645
  return ui;
610
646
  }
@@ -780,6 +816,278 @@ function analyzeSource(file, source, parseSync) {
780
816
  facts.blockers.sort((left, right) => left.line - right.line || left.column - right.column);
781
817
  return facts;
782
818
  }
819
+ var COMPONENT_STRUCTURE = /* @__PURE__ */ new Set([
820
+ "template",
821
+ "slot",
822
+ "Transition",
823
+ "TransitionGroup",
824
+ "KeepAlive",
825
+ "Suspense",
826
+ "svelte:head",
827
+ "svelte:fragment",
828
+ "svelte:options",
829
+ "svelte:window",
830
+ "svelte:body",
831
+ "svelte:document",
832
+ "svelte:boundary"
833
+ ]);
834
+ var COMPONENT_DYNAMIC = /* @__PURE__ */ new Set(["component", "svelte:element", "svelte:component", "Teleport"]);
835
+ var VOID_ELEMENTS = new Set(
836
+ "area base br col embed hr img input link meta source track wbr".split(" ")
837
+ );
838
+ function analyzeComponentSource(file, source, parseSync) {
839
+ const blocks = readFarmComponentBlocks(file, source);
840
+ const name = blocks.kind === "vue" ? "Vue" : "Svelte";
841
+ const scripts = keepFarmComponentRanges(source, blocks.scripts);
842
+ const typed = blocks.scripts.some((script) => script.attributes.lang === "tsx") ? "tsx" : "ts";
843
+ const facts = analyzeSource(file, scripts, parseSync, typed);
844
+ facts.blockers = facts.blockers.filter((blocker) => blocker.rule !== "client-logic");
845
+ const starts = lineStarts(source);
846
+ const block = (offset, rule, message, only) => facts.blockers.push({ ...locate(starts, offset), rule, message, ...only ? { only } : {} });
847
+ facts.blockers.push({
848
+ line: 1,
849
+ column: 1,
850
+ rule: "renderer-component",
851
+ message: `a ${name} component has no React Native port`,
852
+ only: "react-native"
853
+ });
854
+ for (const script of farmComponentModuleScripts(blocks)) {
855
+ const hydrate = /\bexport\s+const\s+hydrate\s*=\s*true\b/.exec(
856
+ source.slice(script.start, script.end)
857
+ );
858
+ if (hydrate) {
859
+ block(
860
+ script.start + hydrate.index,
861
+ "client-logic",
862
+ "it exports hydrate = true, which hydrates the page in the browser",
863
+ "native"
864
+ );
865
+ }
866
+ }
867
+ const styles = blocks.styles.filter((style) => !style.attributes.lang || style.attributes.lang === "css").map((style) => source.slice(style.start, style.end));
868
+ if (styles.length > 0) facts.styles = styles;
869
+ for (const style of blocks.styles) {
870
+ if (style.attributes.lang && style.attributes.lang !== "css") {
871
+ block(
872
+ style.start,
873
+ "css-import",
874
+ `<style lang="${String(style.attributes.lang)}"> is not CSS`
875
+ );
876
+ }
877
+ }
878
+ const imported = /* @__PURE__ */ new Set();
879
+ for (const script of blocks.scripts) {
880
+ const text = source.slice(script.start, script.end);
881
+ for (const match of text.matchAll(/\bimport\s+(?:type\s+)?([\w$]+)\s*(?:,|from\b)/g)) {
882
+ imported.add(match[1]);
883
+ }
884
+ for (const match of text.matchAll(/\bimport\s+(?:[\w$]+\s*,\s*)?\{([^}]*)\}/g)) {
885
+ for (const part of match[1].split(",")) {
886
+ const local = part.trim().split(/\s+as\s+/).pop()?.trim();
887
+ if (local) imported.add(local);
888
+ }
889
+ }
890
+ }
891
+ const pascal = (tag) => tag.replace(/(^|-)([a-z])/g, (_, __, letter) => letter.toUpperCase());
892
+ let formDepth = 0;
893
+ const open = [];
894
+ for (const range of blocks.markup) {
895
+ const markup = source.slice(range.start, range.end);
896
+ let index = 0;
897
+ while (index < markup.length) {
898
+ const at = range.start + index;
899
+ if (markup.startsWith("<!--", index)) {
900
+ const end = markup.indexOf("-->", index + 4);
901
+ index = end === -1 ? markup.length : end + 3;
902
+ continue;
903
+ }
904
+ if (markup[index] === "{") {
905
+ const end = closeBrace(markup, index);
906
+ if (blocks.kind === "svelte" && /^\{@html\b/.test(markup.slice(index))) {
907
+ block(at, "dangerously-set-inner-html", "{@html} renders raw HTML");
908
+ }
909
+ index = end;
910
+ continue;
911
+ }
912
+ if (markup[index] !== "<") {
913
+ index += 1;
914
+ continue;
915
+ }
916
+ const closing = markup[index + 1] === "/";
917
+ const nameMatch = /^[A-Za-z][\w:.-]*/.exec(markup.slice(index + (closing ? 2 : 1)));
918
+ if (!nameMatch) {
919
+ index += 1;
920
+ continue;
921
+ }
922
+ const tag = nameMatch[0];
923
+ let cursor = index + (closing ? 2 : 1) + tag.length;
924
+ const attributes = [];
925
+ let selfClosing = false;
926
+ while (cursor < markup.length && markup[cursor] !== ">") {
927
+ const char = markup[cursor];
928
+ if (/\s/.test(char)) {
929
+ cursor += 1;
930
+ continue;
931
+ }
932
+ if (char === "/" && markup[cursor + 1] === ">") {
933
+ selfClosing = true;
934
+ cursor += 1;
935
+ continue;
936
+ }
937
+ if (char === "{") {
938
+ attributes.push({ name: "{", dynamic: true, offset: range.start + cursor });
939
+ cursor = closeBrace(markup, cursor);
940
+ continue;
941
+ }
942
+ const attrName = /^[^\s=/>]+/.exec(markup.slice(cursor))?.[0] ?? char;
943
+ const attrOffset = range.start + cursor;
944
+ cursor += attrName.length;
945
+ while (/\s/.test(markup[cursor] ?? "")) cursor += 1;
946
+ let value2;
947
+ let braced = false;
948
+ if (markup[cursor] === "=") {
949
+ cursor += 1;
950
+ while (/\s/.test(markup[cursor] ?? "")) cursor += 1;
951
+ const quote = markup[cursor];
952
+ if (quote === '"' || quote === "'") {
953
+ const end = markup.indexOf(quote, cursor + 1);
954
+ value2 = markup.slice(cursor + 1, end === -1 ? markup.length : end);
955
+ cursor = end === -1 ? markup.length : end + 1;
956
+ } else if (quote === "{") {
957
+ const end = closeBrace(markup, cursor);
958
+ value2 = markup.slice(cursor, end);
959
+ braced = true;
960
+ cursor = end;
961
+ } else {
962
+ value2 = /^[^\s>]+/.exec(markup.slice(cursor))?.[0] ?? "";
963
+ cursor += value2.length;
964
+ }
965
+ }
966
+ const dynamic = braced || attrName.startsWith(":") || attrName.startsWith("v-bind:") || attrName.startsWith("@") || attrName.startsWith("v-on:") || blocks.kind === "svelte" && value2 !== void 0 && /\{/.test(value2);
967
+ attributes.push({ name: attrName, value: value2, dynamic, offset: attrOffset });
968
+ }
969
+ index = cursor + 1;
970
+ if (closing) {
971
+ const position = open.lastIndexOf(tag);
972
+ if (position !== -1) {
973
+ for (const closed of open.splice(position)) if (closed === "form") formDepth -= 1;
974
+ }
975
+ continue;
976
+ }
977
+ const element = !selfClosing && !VOID_ELEMENTS.has(tag.toLowerCase());
978
+ if (element) open.push(tag);
979
+ if (tag === "form" && element) formDepth += 1;
980
+ for (const attribute of attributes) {
981
+ if (attribute.name === "v-html") {
982
+ block(attribute.offset, "dangerously-set-inner-html", "v-html renders raw HTML");
983
+ }
984
+ if (attribute.name.toLowerCase() === "contenteditable") {
985
+ block(attribute.offset, "content-editable", "contentEditable");
986
+ }
987
+ }
988
+ if (COMPONENT_STRUCTURE.has(tag)) continue;
989
+ if (COMPONENT_DYNAMIC.has(tag) || attributes.some((attribute) => attribute.name === "is")) {
990
+ block(at, "dynamic-component", `<${tag}> picks what it renders at runtime`);
991
+ continue;
992
+ }
993
+ const intrinsic = /^[a-z][a-z0-9]*$/.test(tag);
994
+ if (!intrinsic) {
995
+ if (!imported.has(tag) && !imported.has(pascal(tag))) {
996
+ block(at, "dynamic-component", `<${tag}> is not a component this file imports`);
997
+ }
998
+ continue;
999
+ }
1000
+ const kind = INTRINSIC_KINDS[tag];
1001
+ if (!facts.tags.includes(tag)) facts.tags.push(tag);
1002
+ facts.elements.total += 1;
1003
+ if (!kind) {
1004
+ block(at, "unmapped-element", `<${tag}> has no native mapping`);
1005
+ continue;
1006
+ }
1007
+ facts.elements.mapped += 1;
1008
+ facts.elements.byKind[kind] = (facts.elements.byKind[kind] ?? 0) + 1;
1009
+ const value = (attr) => attributes.find((attribute) => attribute.name.toLowerCase() === attr);
1010
+ const boundAttribute = (attr) => attributes.find(
1011
+ (attribute) => attribute.dynamic && (attribute.name === `:${attr}` || attribute.name === `v-bind:${attr}` || attribute.name === attr) || attr === "class" && attribute.name.startsWith("class:")
1012
+ );
1013
+ const classes = value("class");
1014
+ if (boundAttribute("class")) {
1015
+ block(at, "runtime-class-name", `<${tag}> builds its class names at runtime`);
1016
+ } else if (classes?.value) {
1017
+ for (const token of classes.value.split(/\s+/).filter(Boolean)) {
1018
+ const problem = classifyClass(token);
1019
+ if (problem && /^class ".*" is not in the native Tailwind subset$/.test(problem)) {
1020
+ facts.appClasses.push({ name: token, ...locate(starts, classes.offset) });
1021
+ } else if (problem) block(classes.offset, "class-name", problem);
1022
+ else {
1023
+ const native = farmNativeClassProblem(token);
1024
+ if (native) block(classes.offset, "class-name", native, "native");
1025
+ }
1026
+ }
1027
+ }
1028
+ const style = value("style");
1029
+ if (boundAttribute("style")) {
1030
+ block(at, "runtime-style", `<${tag}> style is computed at runtime`);
1031
+ } else if (style?.value) {
1032
+ for (const declaration of resolveFarmNativeInlineStyle(style.value).unsupported) {
1033
+ block(
1034
+ style.offset,
1035
+ "style",
1036
+ `<${tag}> style "${declaration}" has no native-tier style`,
1037
+ "native"
1038
+ );
1039
+ }
1040
+ }
1041
+ const type = value("type");
1042
+ if (tag === "input") {
1043
+ const inputType = type?.dynamic ? void 0 : (type?.value ?? "text").toLowerCase();
1044
+ const formType = formDepth > 0 && (inputType === "hidden" || inputType === "submit");
1045
+ if (!formType && (inputType === void 0 || !INPUT_TYPES.has(inputType))) {
1046
+ block(
1047
+ at,
1048
+ "unmapped-element",
1049
+ `<input type="${inputType ?? "{expr}"}"> has no native mapping`
1050
+ );
1051
+ continue;
1052
+ }
1053
+ if (inputType === "hidden") continue;
1054
+ }
1055
+ const buttonType = tag === "button" ? (type?.value ?? "submit").toLowerCase() : void 0;
1056
+ if ((tag === "button" || kind === "TextInput") && !value("action") && !value("formaction") && (formDepth === 0 || buttonType !== void 0 && buttonType !== "submit")) {
1057
+ block(
1058
+ at,
1059
+ "inert-control",
1060
+ formDepth > 0 ? `<button type="${buttonType}"> does nothing on a native-tier screen` : `<${tag}> has no link or form to submit on a native-tier screen`,
1061
+ "native"
1062
+ );
1063
+ }
1064
+ if (tag === "form") {
1065
+ const method = value("method");
1066
+ const methodValue = (method?.value ?? "get").toLowerCase();
1067
+ if (method?.dynamic || methodValue !== "get" && methodValue !== "post") {
1068
+ block(at, "form-action", `<form method="${method?.value ?? "{expr}"}">`, "native");
1069
+ }
1070
+ }
1071
+ }
1072
+ }
1073
+ return facts;
1074
+ }
1075
+ function closeBrace(text, start) {
1076
+ let depth = 0;
1077
+ for (let index = start; index < text.length; index += 1) {
1078
+ const char = text[index];
1079
+ if (char === '"' || char === "'" || char === "`") {
1080
+ const end = text.indexOf(char, index + 1);
1081
+ if (end === -1) return text.length;
1082
+ index = end;
1083
+ } else if (char === "{") depth += 1;
1084
+ else if (char === "}") {
1085
+ depth -= 1;
1086
+ if (depth === 0) return index + 1;
1087
+ }
1088
+ }
1089
+ return text.length;
1090
+ }
783
1091
  function readAliases(root, srcDir) {
784
1092
  const aliases = [{ prefix: "@/", targets: [path.join(root, srcDir) + path.sep] }];
785
1093
  try {
@@ -922,11 +1230,14 @@ async function analyzeFarmMobileRoutes(options) {
922
1230
  let pending = facts.get(file);
923
1231
  if (!pending) {
924
1232
  pending = readFile(file, "utf8").then((source) => {
925
- const hash = createHash("sha1").update(file.endsWith(".tsx") ? "tsx\0" : file.endsWith(".ts") ? "ts\0" : "jsx\0").update(source).digest("hex");
1233
+ const component = farmComponentKind(file);
1234
+ const hash = createHash("sha1").update(
1235
+ component ? `${component}\0` : file.endsWith(".tsx") ? "tsx\0" : file.endsWith(".ts") ? "ts\0" : "jsx\0"
1236
+ ).update(source).digest("hex");
926
1237
  let result = cache.modules[hash];
927
1238
  if (result) cached += 1;
928
1239
  else {
929
- result = analyzeSource(file, source, parseSync);
1240
+ result = component ? analyzeComponentSource(file, source, parseSync) : analyzeSource(file, source, parseSync);
930
1241
  parsed += 1;
931
1242
  }
932
1243
  used[hash] = result;
@@ -990,7 +1301,7 @@ async function analyzeFarmMobileRoutes(options) {
990
1301
  }
991
1302
  };
992
1303
  }
993
- if (!SCRIPT_EXTENSIONS.some((extension) => file.endsWith(extension))) {
1304
+ if (!isModuleFile(file)) {
994
1305
  return {
995
1306
  fact,
996
1307
  blocker: {
@@ -1027,8 +1338,7 @@ async function analyzeFarmMobileRoutes(options) {
1027
1338
  const scripts = /* @__PURE__ */ new Set();
1028
1339
  for (const { page, layouts } of entries.values()) {
1029
1340
  for (const file of [page, ...layouts]) {
1030
- if (file && SCRIPT_EXTENSIONS.some((extension) => file.endsWith(extension)))
1031
- scripts.add(file);
1341
+ if (file && isModuleFile(file)) scripts.add(file);
1032
1342
  }
1033
1343
  }
1034
1344
  await Promise.all([...scripts].map(visitModule));
@@ -1059,6 +1369,7 @@ async function analyzeFarmMobileRoutes(options) {
1059
1369
  const tags = /* @__PURE__ */ new Set();
1060
1370
  const graph = [];
1061
1371
  const layoutClasses = /* @__PURE__ */ new Set();
1372
+ const componentSheets = [];
1062
1373
  const walk = (file, entry, layout) => {
1063
1374
  if (seen.has(file)) return;
1064
1375
  seen.add(file);
@@ -1113,6 +1424,9 @@ async function analyzeFarmMobileRoutes(options) {
1113
1424
  for (const appClass of moduleFacts.appClasses)
1114
1425
  appClasses.push({ file: label, ...appClass });
1115
1426
  for (const tag of moduleFacts.tags) tags.add(tag);
1427
+ for (const css of moduleFacts.styles ?? []) {
1428
+ componentSheets.push(parseFarmNativeStylesheet(css));
1429
+ }
1116
1430
  }
1117
1431
  for (const win of moduleFacts.wins) wins.add(win);
1118
1432
  elements.total += moduleFacts.elements.total;
@@ -1155,7 +1469,7 @@ async function analyzeFarmMobileRoutes(options) {
1155
1469
  ir.root = `${relative2(root, page)}#default`;
1156
1470
  }
1157
1471
  for (const layout of layouts) walk(layout, true, true);
1158
- const sheets = [...stylesheets].map(readStylesheet);
1472
+ const sheets = [...[...stylesheets].map(readStylesheet), ...componentSheets];
1159
1473
  for (const appClass of appClasses) {
1160
1474
  const { styled, problems } = inspectFarmNativeStylesheets(sheets, { class: appClass.name });
1161
1475
  const at = { file: appClass.file, line: appClass.line, column: appClass.column };
@@ -6,7 +6,7 @@ var _chunkUNJZGVPUcjs = require('./chunk-UNJZGVPU.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
9
+ var _chunk2C5L5RPMcjs = require('./chunk-2C5L5RPM.cjs');
10
10
 
11
11
  // src/app-markdown-runtime.ts
12
12
  var _url = require('url');
@@ -160,7 +160,7 @@ async function anonymousVisitorOpensPage(options, url, targetPathname) {
160
160
  if (!PAGE_CHECK_DROPPED_HEADERS.has(name.toLowerCase())) headers.append(name, value);
161
161
  }
162
162
  headers.set("accept", "text/html");
163
- headers.set(_chunkLT4VAF5Zcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER, _chunkLT4VAF5Zcjs._getFarmMarkdownPageCheckToken.call(void 0, ));
163
+ headers.set(_chunk2C5L5RPMcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER, _chunk2C5L5RPMcjs._getFarmMarkdownPageCheckToken.call(void 0, ));
164
164
  const response = await options.renderPage(
165
165
  new Request(pageUrl, {
166
166
  method: "GET",
@@ -192,7 +192,7 @@ async function createFarmMarkdownSourceResponse(options) {
192
192
  }
193
193
  const url = new URL(options.request.url);
194
194
  const hasMarkdownExtension = url.pathname.toLowerCase().endsWith(".md");
195
- if (!hasMarkdownExtension && !_chunkLT4VAF5Zcjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
195
+ if (!hasMarkdownExtension && !_chunk2C5L5RPMcjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
196
196
  return null;
197
197
  }
198
198
  const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname);
@@ -254,7 +254,7 @@ async function createFarmMarkdownSourceResponse(options) {
254
254
  if (!hasMarkdownExtension) {
255
255
  headers.set("Vary", "Accept");
256
256
  }
257
- return _chunkLT4VAF5Zcjs.createFarmMarkdownViewResponse.call(void 0, {
257
+ return _chunk2C5L5RPMcjs.createFarmMarkdownViewResponse.call(void 0, {
258
258
  request: options.request,
259
259
  requestUrl: url,
260
260
  markdown: source.source,
@@ -35,7 +35,11 @@ function resolveFarmAppManifestConfig(input) {
35
35
  throw new TypeError(`${NAME} must be true, false, or an options object.`);
36
36
  }
37
37
  const config = isObject(input) ? input : {};
38
- checkKeys(config, ["app", "packages", "mcp", "webmcp", "integrations", "agent", "plugins"], NAME);
38
+ checkKeys(
39
+ config,
40
+ ["app", "packages", "mcp", "webmcp", "integrations", "agent", "plugins", "site"],
41
+ NAME
42
+ );
39
43
  const packages = config.packages;
40
44
  if (packages !== void 0 && typeof packages !== "boolean" && packages !== "names") {
41
45
  throw new TypeError(`${NAME}.packages must be true, false, or "names".`);
@@ -56,7 +60,8 @@ function resolveFarmAppManifestConfig(input) {
56
60
  })),
57
61
  integrations: readBoolean(config.integrations, `${NAME}.integrations`),
58
62
  agent: readBoolean(config.agent, `${NAME}.agent`),
59
- plugins: readBoolean(config.plugins, `${NAME}.plugins`)
63
+ plugins: readBoolean(config.plugins, `${NAME}.plugins`),
64
+ site: readBoolean(config.site, `${NAME}.site`)
60
65
  };
61
66
  }
62
67
 
@@ -25,7 +25,7 @@ var _chunkRD623KW4cjs = require('./chunk-RD623KW4.cjs');
25
25
 
26
26
 
27
27
 
28
- var _chunkDZPR2W6Ucjs = require('./chunk-DZPR2W6U.cjs');
28
+ var _chunkO6L3YYPMcjs = require('./chunk-O6L3YYPM.cjs');
29
29
 
30
30
 
31
31
 
@@ -33,10 +33,10 @@ var _chunkDZPR2W6Ucjs = require('./chunk-DZPR2W6U.cjs');
33
33
  var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
34
34
 
35
35
 
36
- var _chunkSG57PX7Kcjs = require('./chunk-SG57PX7K.cjs');
36
+ var _chunkBTVDYS4Bcjs = require('./chunk-BTVDYS4B.cjs');
37
37
 
38
38
 
39
- var _chunkMEQN6DDAcjs = require('./chunk-MEQN6DDA.cjs');
39
+ var _chunkFJWN7RV4cjs = require('./chunk-FJWN7RV4.cjs');
40
40
 
41
41
 
42
42
 
@@ -53,7 +53,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
53
53
  var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
54
54
 
55
55
 
56
- var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
56
+ var _chunk2C5L5RPMcjs = require('./chunk-2C5L5RPM.cjs');
57
57
 
58
58
 
59
59
  var _chunkDQJ2CIH7cjs = require('./chunk-DQJ2CIH7.cjs');
@@ -417,16 +417,16 @@ function resolveFarmAgentConfig(input, context = {}) {
417
417
  const jsonLd = _optionalChain([input, 'optionalAccess', _17 => _17.jsonLd]);
418
418
  return {
419
419
  jsonLd: jsonLd === void 0 ? { ...DEFAULT_JSON_LD } : !jsonLd ? false : jsonLd === true ? {} : jsonLd,
420
- noindexPreviews: _chunkDZPR2W6Ucjs.resolveFarmNoindexPreviews.call(void 0, _optionalChain([input, 'optionalAccess', _18 => _18.noindexPreviews])),
420
+ noindexPreviews: _chunkO6L3YYPMcjs.resolveFarmNoindexPreviews.call(void 0, _optionalChain([input, 'optionalAccess', _18 => _18.noindexPreviews])),
421
421
  // The docs engine answers /llms.txt with its own pages; a default here would replace it.
422
422
  // llms-full.txt renders every listed page, so it stays opt-in.
423
- llmsTxt: _chunkMEQN6DDAcjs.resolveFarmLlmsTxtConfig.call(void 0, _nullishCoalesce(_optionalChain([input, 'optionalAccess', _19 => _19.llmsTxt]), () => ( (context.docs ? false : { full: false })))),
423
+ llmsTxt: _chunkFJWN7RV4cjs.resolveFarmLlmsTxtConfig.call(void 0, _nullishCoalesce(_optionalChain([input, 'optionalAccess', _19 => _19.llmsTxt]), () => ( (context.docs ? false : { full: false })))),
424
424
  // Same rule as llms.txt: the docs engine answers /sitemap.xml with its own pages.
425
- sitemap: _chunkDZPR2W6Ucjs.resolveFarmAgentSitemap.call(void 0, _nullishCoalesce(_optionalChain([input, 'optionalAccess', _20 => _20.sitemap]), () => ( !context.docs))),
426
- crawlers: _chunkDZPR2W6Ucjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([input, 'optionalAccess', _21 => _21.crawlers])),
425
+ sitemap: _chunkO6L3YYPMcjs.resolveFarmAgentSitemap.call(void 0, _nullishCoalesce(_optionalChain([input, 'optionalAccess', _20 => _20.sitemap]), () => ( !context.docs))),
426
+ crawlers: _chunkO6L3YYPMcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([input, 'optionalAccess', _21 => _21.crawlers])),
427
427
  apiCatalog: resolveFarmAgentBoolean(_optionalChain([input, 'optionalAccess', _22 => _22.apiCatalog]), "apiCatalog", false),
428
428
  aiCatalog: resolveFarmAgentBoolean(_optionalChain([input, 'optionalAccess', _23 => _23.aiCatalog]), "aiCatalog", true),
429
- manifest: _chunkSG57PX7Kcjs.resolveFarmAppManifestConfig.call(void 0, _optionalChain([input, 'optionalAccess', _24 => _24.manifest])),
429
+ manifest: _chunkBTVDYS4Bcjs.resolveFarmAppManifestConfig.call(void 0, _optionalChain([input, 'optionalAccess', _24 => _24.manifest])),
430
430
  // Same rule as llms.txt: the docs engine serves its own MCP server at /mcp.
431
431
  mcp: resolveFarmAgentBoolean(_optionalChain([input, 'optionalAccess', _25 => _25.mcp]), "mcp", !context.docs)
432
432
  };
@@ -1076,7 +1076,7 @@ async function resolveConfig(userConfig, mode) {
1076
1076
  const srcDir = userConfig.srcDir || "src";
1077
1077
  _chunkBPNOYILCcjs.setFarmProjectSourceDir.call(void 0, root, srcDir);
1078
1078
  const docs = await resolveDocsConfig(userConfig.docs, { root, srcDir });
1079
- const md = _chunkLT4VAF5Zcjs.resolveMarkdownConfig.call(void 0, userConfig.md);
1079
+ const md = _chunk2C5L5RPMcjs.resolveMarkdownConfig.call(void 0, userConfig.md);
1080
1080
  const mdx = _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, userConfig.mdx);
1081
1081
  const env = _chunk3EIPOTZVcjs.resolveEnv.call(void 0, userConfig.env, process.env);
1082
1082
  _chunk3EIPOTZVcjs.setEnv.call(void 0, env);
@@ -1184,7 +1184,7 @@ async function resolveConfig(userConfig, mode) {
1184
1184
  ],
1185
1185
  routeRules,
1186
1186
  images: _chunkHEPJIKKQcjs.resolveFarmImageConfig.call(void 0, userConfig.images),
1187
- performance: _chunkDZPR2W6Ucjs.resolveFarmPerformanceConfig.call(void 0, userConfig.performance),
1187
+ performance: _chunkO6L3YYPMcjs.resolveFarmPerformanceConfig.call(void 0, userConfig.performance),
1188
1188
  theme: _chunkWT6RAN2Icjs.resolveFarmThemeConfig.call(void 0, userConfig.theme, basePath),
1189
1189
  publicDir: userConfig.publicDir || "public",
1190
1190
  i18n: _chunkLNVGXUL3cjs.resolveFarmI18nConfig.call(void 0, userConfig.i18n, { root, mode, basePath }),