@farming-labs/docs 0.2.44 → 0.2.46

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.
@@ -105,10 +105,10 @@ async function main() {
105
105
  ]
106
106
  };
107
107
  if (!parsedCommand.command || parsedCommand.command === "init") {
108
- const { init } = await import("../init-Drt3Q3Y7.mjs");
108
+ const { init } = await import("../init-Ch5On0zm.mjs");
109
109
  await init(initOptions);
110
110
  } else if (parsedCommand.command === "dev") {
111
- const { dev } = await import("../dev-CBha7knT.mjs");
111
+ const { dev } = await import("../dev-Tm9Ss4D6.mjs");
112
112
  await dev(devOptions);
113
113
  } else if (parsedCommand.command === "deploy") {
114
114
  const { runCloudDeploy } = await import("../cloud-C_Ok9rC5.mjs");
@@ -235,7 +235,7 @@ async function main() {
235
235
  printRobotsGenerateHelp();
236
236
  process.exit(1);
237
237
  } else if (parsedCommand.command === "downgrade") {
238
- const { downgrade } = await import("../downgrade-7PGER59g.mjs");
238
+ const { downgrade } = await import("../downgrade-CYEaOctn.mjs");
239
239
  const framework = (typeof flags.framework === "string" ? flags.framework : void 0) ?? (args[1] && !args[1].startsWith("--") ? args[1] : void 0);
240
240
  const hasVersionFlag = args.includes("--version") || args.some((arg) => arg.startsWith("--version="));
241
241
  await downgrade({
@@ -244,7 +244,7 @@ async function main() {
244
244
  dryRun: flags["dry-run"] === true
245
245
  });
246
246
  } else if (parsedCommand.command === "upgrade") {
247
- const { upgrade } = await import("../upgrade-CkdKWRlk.mjs");
247
+ const { upgrade } = await import("../upgrade-DzQtpgJM.mjs");
248
248
  const framework = (typeof flags.framework === "string" ? flags.framework : void 0) ?? (args[1] && !args[1].startsWith("--") ? args[1] : void 0);
249
249
  const hasVersionFlag = args.includes("--version") || args.some((arg) => arg.startsWith("--version="));
250
250
  const version = typeof flags.version === "string" ? flags.version : hasVersionFlag ? "" : void 0;
@@ -1,5 +1,5 @@
1
1
  import { i as detectPackageManagerFromProject } from "./utils-D-xTRNuh.mjs";
2
- import { K as rootLayoutTemplate, W as postcssConfigTemplate, g as docsLayoutTemplate, v as globalCssTemplate, yt as tsconfigTemplate } from "./templates-CEcOVbV0.mjs";
2
+ import { K as rootLayoutTemplate, W as postcssConfigTemplate, g as docsLayoutTemplate, v as globalCssTemplate, yt as tsconfigTemplate } from "./templates-uaauJcTO.mjs";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import pc from "picocolors";
@@ -1,5 +1,5 @@
1
1
  import { c as fileExists, o as exec, s as execOutput } from "./utils-D-xTRNuh.mjs";
2
- import { a as getPackagesForFramework, c as resolveDocsPackageManager, l as validateUpgradeVersion, r as buildDocsPackageInstallCommand, s as resolveDocsPackageFramework } from "./package-version-DPQSBBsX.mjs";
2
+ import { a as getPackagesForFramework, c as resolveDocsPackageManager, l as validateUpgradeVersion, r as buildDocsPackageInstallCommand, s as resolveDocsPackageFramework } from "./package-version-C8PigBZk.mjs";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import pc from "picocolors";
@@ -1,5 +1,5 @@
1
1
  import { a as devInstallCommand, c as fileExists, d as readFileSafe, f as spawnAndWaitFor, i as detectPackageManagerFromProject, l as formatPackageManagerDetection, n as detectGlobalCssFiles, o as exec, p as writeFileSafe, r as detectNextAppDir, t as detectFramework, u as installCommand } from "./utils-D-xTRNuh.mjs";
2
- import { $ as svelteDocsPublicHookTemplate, A as nextConfigMergedTemplate, B as nuxtServerApiDocsRouteTemplate, C as injectRootProviderIntoLayout, D as injectTanstackVitePlugins, E as injectTanstackRootProviderIntoRoute, F as nuxtDocsConfigTemplate, G as quickstartPageTemplate, H as nuxtServerDocsPublicMiddlewareTemplate, I as nuxtDocsPageTemplate, J as svelteDocsApiRouteTemplate, K as rootLayoutTemplate, L as nuxtGlobalCssTemplate, M as nextLocaleDocPageTemplate, N as nextLocalizedPageTemplate, O as installationPageTemplate, P as nuxtConfigTemplate, Q as svelteDocsPageTemplate, R as nuxtInstallationPageTemplate, S as injectNuxtCssImport, T as injectSvelteDocsPublicHook, U as nuxtWelcomePageTemplate, V as nuxtServerApiReferenceRouteTemplate, W as postcssConfigTemplate, X as svelteDocsLayoutServerTemplate, Y as svelteDocsConfigTemplate, Z as svelteDocsLayoutTemplate, _ as getAstroAdapterPkg, _t as tanstackViteConfigTemplate, a as astroDocsIndexTemplate, at as svelteWelcomePageTemplate, b as injectAstroDocsMiddleware, bt as welcomePageTemplate, c as astroDocsServerTemplate, ct as tanstackDocsCatchAllRouteTemplate, d as astroQuickstartPageTemplate, dt as tanstackDocsIndexRouteTemplate, et as svelteDocsServerTemplate, f as astroWelcomePageTemplate, ft as tanstackDocsPublicRouteTemplate, g as docsLayoutTemplate, gt as tanstackRootRouteTemplate, h as docsConfigTemplate, ht as tanstackQuickstartPageTemplate, i as astroDocsConfigTemplate, it as svelteRootLayoutTemplate, j as nextConfigTemplate, k as nextApiReferencePageTemplate, l as astroGlobalCssTemplate, lt as tanstackDocsConfigTemplate, m as customThemeTsTemplate, mt as tanstackInstallationPageTemplate, n as astroApiRouteTemplate, nt as svelteInstallationPageTemplate, o as astroDocsMiddlewareTemplate, ot as tanstackApiDocsRouteTemplate, p as customThemeCssTemplate, pt as tanstackDocsServerTemplate, q as svelteApiReferenceRouteTemplate, r as astroConfigTemplate, rt as svelteQuickstartPageTemplate, s as astroDocsPageTemplate, st as tanstackApiReferenceRouteTemplate, t as astroApiReferenceRouteTemplate, tt as svelteGlobalCssTemplate, u as astroInstallationPageTemplate, ut as tanstackDocsFunctionsTemplate, v as globalCssTemplate, vt as tanstackWelcomePageTemplate, w as injectSvelteCssImport, x as injectCssImport, y as injectAstroCssImport, yt as tsconfigTemplate, z as nuxtQuickstartPageTemplate } from "./templates-CEcOVbV0.mjs";
2
+ import { $ as svelteDocsPublicHookTemplate, A as nextConfigMergedTemplate, B as nuxtServerApiDocsRouteTemplate, C as injectRootProviderIntoLayout, D as injectTanstackVitePlugins, E as injectTanstackRootProviderIntoRoute, F as nuxtDocsConfigTemplate, G as quickstartPageTemplate, H as nuxtServerDocsPublicMiddlewareTemplate, I as nuxtDocsPageTemplate, J as svelteDocsApiRouteTemplate, K as rootLayoutTemplate, L as nuxtGlobalCssTemplate, M as nextLocaleDocPageTemplate, N as nextLocalizedPageTemplate, O as installationPageTemplate, P as nuxtConfigTemplate, Q as svelteDocsPageTemplate, R as nuxtInstallationPageTemplate, S as injectNuxtCssImport, T as injectSvelteDocsPublicHook, U as nuxtWelcomePageTemplate, V as nuxtServerApiReferenceRouteTemplate, W as postcssConfigTemplate, X as svelteDocsLayoutServerTemplate, Y as svelteDocsConfigTemplate, Z as svelteDocsLayoutTemplate, _ as getAstroAdapterPkg, _t as tanstackViteConfigTemplate, a as astroDocsIndexTemplate, at as svelteWelcomePageTemplate, b as injectAstroDocsMiddleware, bt as welcomePageTemplate, c as astroDocsServerTemplate, ct as tanstackDocsCatchAllRouteTemplate, d as astroQuickstartPageTemplate, dt as tanstackDocsIndexRouteTemplate, et as svelteDocsServerTemplate, f as astroWelcomePageTemplate, ft as tanstackDocsPublicRouteTemplate, g as docsLayoutTemplate, gt as tanstackRootRouteTemplate, h as docsConfigTemplate, ht as tanstackQuickstartPageTemplate, i as astroDocsConfigTemplate, it as svelteRootLayoutTemplate, j as nextConfigTemplate, k as nextApiReferencePageTemplate, l as astroGlobalCssTemplate, lt as tanstackDocsConfigTemplate, m as customThemeTsTemplate, mt as tanstackInstallationPageTemplate, n as astroApiRouteTemplate, nt as svelteInstallationPageTemplate, o as astroDocsMiddlewareTemplate, ot as tanstackApiDocsRouteTemplate, p as customThemeCssTemplate, pt as tanstackDocsServerTemplate, q as svelteApiReferenceRouteTemplate, r as astroConfigTemplate, rt as svelteQuickstartPageTemplate, s as astroDocsPageTemplate, st as tanstackApiReferenceRouteTemplate, t as astroApiReferenceRouteTemplate, tt as svelteGlobalCssTemplate, u as astroInstallationPageTemplate, ut as tanstackDocsFunctionsTemplate, v as globalCssTemplate, vt as tanstackWelcomePageTemplate, w as injectSvelteCssImport, x as injectCssImport, y as injectAstroCssImport, yt as tsconfigTemplate, z as nuxtQuickstartPageTemplate } from "./templates-uaauJcTO.mjs";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import pc from "picocolors";
@@ -792,7 +792,7 @@ async function init(options = {}) {
792
792
  p.log.info(`Using ${pc.cyan(pm)} as package manager`);
793
793
  const s2 = p.spinner();
794
794
  s2.start("Installing dependencies");
795
- const docsRuntimeInstallCommand = framework === "tanstack-start" ? `${installCommand(pm)} @farming-labs/docs @farming-labs/theme @farming-labs/tanstack-start` : framework === "sveltekit" ? `${installCommand(pm)} @farming-labs/docs @farming-labs/svelte @farming-labs/svelte-theme` : framework === "astro" ? `${installCommand(pm)} @farming-labs/docs @farming-labs/astro @farming-labs/astro-theme ${getAstroAdapterPkg(cfg.astroAdapter ?? "vercel")}` : framework === "nuxt" ? `${installCommand(pm)} @farming-labs/docs @farming-labs/nuxt @farming-labs/nuxt-theme` : `${installCommand(pm)} @farming-labs/docs @farming-labs/next @farming-labs/theme`;
795
+ const docsRuntimeInstallCommand = framework === "tanstack-start" ? `${installCommand(pm)} @farming-labs/docs @farming-labs/theme @farming-labs/tanstack-start` : framework === "sveltekit" ? `${installCommand(pm)} @farming-labs/docs @farming-labs/svelte @farming-labs/svelte-theme @farming-labs/theme` : framework === "astro" ? `${installCommand(pm)} @farming-labs/docs @farming-labs/astro @farming-labs/astro-theme @farming-labs/theme ${getAstroAdapterPkg(cfg.astroAdapter ?? "vercel")}` : framework === "nuxt" ? `${installCommand(pm)} @farming-labs/docs @farming-labs/nuxt @farming-labs/nuxt-theme @farming-labs/theme` : `${installCommand(pm)} @farming-labs/docs @farming-labs/next @farming-labs/theme`;
796
796
  try {
797
797
  exec(docsRuntimeInstallCommand, cwd);
798
798
  if (framework === "tanstack-start") {
@@ -24,17 +24,20 @@ const PACKAGES_BY_FRAMEWORK = {
24
24
  nuxt: [
25
25
  "@farming-labs/docs",
26
26
  "@farming-labs/nuxt",
27
- "@farming-labs/nuxt-theme"
27
+ "@farming-labs/nuxt-theme",
28
+ "@farming-labs/theme"
28
29
  ],
29
30
  sveltekit: [
30
31
  "@farming-labs/docs",
31
32
  "@farming-labs/svelte",
32
- "@farming-labs/svelte-theme"
33
+ "@farming-labs/svelte-theme",
34
+ "@farming-labs/theme"
33
35
  ],
34
36
  astro: [
35
37
  "@farming-labs/docs",
36
38
  "@farming-labs/astro",
37
- "@farming-labs/astro-theme"
39
+ "@farming-labs/astro-theme",
40
+ "@farming-labs/theme"
38
41
  ]
39
42
  };
40
43
  function presetFromFramework(fw) {
@@ -8,10 +8,7 @@ const THEME_INFO = {
8
8
  svelteImport: "@farming-labs/svelte-theme",
9
9
  astroImport: "@farming-labs/astro-theme",
10
10
  nuxtImport: "@farming-labs/nuxt-theme",
11
- nextCssImport: "default",
12
- svelteCssTheme: "fumadocs",
13
- astroCssTheme: "fumadocs",
14
- nuxtCssTheme: "fumadocs"
11
+ nextCssImport: "default"
15
12
  },
16
13
  darksharp: {
17
14
  factory: "darksharp",
@@ -19,10 +16,7 @@ const THEME_INFO = {
19
16
  svelteImport: "@farming-labs/svelte-theme/darksharp",
20
17
  astroImport: "@farming-labs/astro-theme/darksharp",
21
18
  nuxtImport: "@farming-labs/nuxt-theme/darksharp",
22
- nextCssImport: "darksharp",
23
- svelteCssTheme: "darksharp",
24
- astroCssTheme: "darksharp",
25
- nuxtCssTheme: "darksharp"
19
+ nextCssImport: "darksharp"
26
20
  },
27
21
  "pixel-border": {
28
22
  factory: "pixelBorder",
@@ -30,10 +24,7 @@ const THEME_INFO = {
30
24
  svelteImport: "@farming-labs/svelte-theme/pixel-border",
31
25
  astroImport: "@farming-labs/astro-theme/pixel-border",
32
26
  nuxtImport: "@farming-labs/nuxt-theme/pixel-border",
33
- nextCssImport: "pixel-border",
34
- svelteCssTheme: "pixel-border",
35
- astroCssTheme: "pixel-border",
36
- nuxtCssTheme: "pixel-border"
27
+ nextCssImport: "pixel-border"
37
28
  },
38
29
  colorful: {
39
30
  factory: "colorful",
@@ -41,10 +32,7 @@ const THEME_INFO = {
41
32
  svelteImport: "@farming-labs/svelte-theme/colorful",
42
33
  astroImport: "@farming-labs/astro-theme/colorful",
43
34
  nuxtImport: "@farming-labs/nuxt-theme/colorful",
44
- nextCssImport: "colorful",
45
- svelteCssTheme: "colorful",
46
- astroCssTheme: "colorful",
47
- nuxtCssTheme: "colorful"
35
+ nextCssImport: "colorful"
48
36
  },
49
37
  darkbold: {
50
38
  factory: "darkbold",
@@ -52,10 +40,7 @@ const THEME_INFO = {
52
40
  svelteImport: "@farming-labs/svelte-theme/darkbold",
53
41
  astroImport: "@farming-labs/astro-theme/darkbold",
54
42
  nuxtImport: "@farming-labs/nuxt-theme/darkbold",
55
- nextCssImport: "darkbold",
56
- svelteCssTheme: "darkbold",
57
- astroCssTheme: "darkbold",
58
- nuxtCssTheme: "darkbold"
43
+ nextCssImport: "darkbold"
59
44
  },
60
45
  shiny: {
61
46
  factory: "shiny",
@@ -63,10 +48,7 @@ const THEME_INFO = {
63
48
  svelteImport: "@farming-labs/svelte-theme/shiny",
64
49
  astroImport: "@farming-labs/astro-theme/shiny",
65
50
  nuxtImport: "@farming-labs/nuxt-theme/shiny",
66
- nextCssImport: "shiny",
67
- svelteCssTheme: "shiny",
68
- astroCssTheme: "shiny",
69
- nuxtCssTheme: "shiny"
51
+ nextCssImport: "shiny"
70
52
  },
71
53
  ledger: {
72
54
  factory: "ledger",
@@ -74,10 +56,7 @@ const THEME_INFO = {
74
56
  svelteImport: "@farming-labs/svelte-theme/ledger",
75
57
  astroImport: "@farming-labs/astro-theme/ledger",
76
58
  nuxtImport: "@farming-labs/nuxt-theme/ledger",
77
- nextCssImport: "ledger",
78
- svelteCssTheme: "ledger",
79
- astroCssTheme: "ledger",
80
- nuxtCssTheme: "ledger"
59
+ nextCssImport: "ledger"
81
60
  },
82
61
  greentree: {
83
62
  factory: "greentree",
@@ -85,10 +64,7 @@ const THEME_INFO = {
85
64
  svelteImport: "@farming-labs/svelte-theme/greentree",
86
65
  astroImport: "@farming-labs/astro-theme/greentree",
87
66
  nuxtImport: "@farming-labs/nuxt-theme/greentree",
88
- nextCssImport: "greentree",
89
- svelteCssTheme: "greentree",
90
- astroCssTheme: "greentree",
91
- nuxtCssTheme: "greentree"
67
+ nextCssImport: "greentree"
92
68
  },
93
69
  concrete: {
94
70
  factory: "concrete",
@@ -96,10 +72,7 @@ const THEME_INFO = {
96
72
  svelteImport: "@farming-labs/svelte-theme/concrete",
97
73
  astroImport: "@farming-labs/astro-theme/concrete",
98
74
  nuxtImport: "@farming-labs/nuxt-theme/concrete",
99
- nextCssImport: "concrete",
100
- svelteCssTheme: "concrete",
101
- astroCssTheme: "concrete",
102
- nuxtCssTheme: "concrete"
75
+ nextCssImport: "concrete"
103
76
  },
104
77
  "command-grid": {
105
78
  factory: "commandGrid",
@@ -107,10 +80,7 @@ const THEME_INFO = {
107
80
  svelteImport: "@farming-labs/svelte-theme/command-grid",
108
81
  astroImport: "@farming-labs/astro-theme/command-grid",
109
82
  nuxtImport: "@farming-labs/nuxt-theme/command-grid",
110
- nextCssImport: "command-grid",
111
- svelteCssTheme: "command-grid",
112
- astroCssTheme: "command-grid",
113
- nuxtCssTheme: "command-grid"
83
+ nextCssImport: "command-grid"
114
84
  },
115
85
  hardline: {
116
86
  factory: "hardline",
@@ -118,15 +88,18 @@ const THEME_INFO = {
118
88
  svelteImport: "@farming-labs/svelte-theme/hardline",
119
89
  astroImport: "@farming-labs/astro-theme/hardline",
120
90
  nuxtImport: "@farming-labs/nuxt-theme/hardline",
121
- nextCssImport: "hardline",
122
- svelteCssTheme: "hardline",
123
- astroCssTheme: "hardline",
124
- nuxtCssTheme: "hardline"
91
+ nextCssImport: "hardline"
125
92
  }
126
93
  };
127
94
  function getThemeInfo(theme) {
128
95
  return THEME_INFO[theme] ?? THEME_INFO.fumadocs;
129
96
  }
97
+ function getThemeCssImport(theme) {
98
+ return `@farming-labs/theme/${getThemeInfo(theme).nextCssImport}/css`;
99
+ }
100
+ function hasBuiltInThemeCssImport(content) {
101
+ return /["']@farming-labs\/(?:theme|svelte-theme|astro-theme|nuxt-theme)\/[^"'\n]*\/css["']/.test(content);
102
+ }
130
103
  function toPosixPath(value) {
131
104
  return value.replace(/\\/g, "/");
132
105
  }
@@ -415,13 +388,13 @@ function globalCssTemplate(theme, customThemeName, globalCssRelPath) {
415
388
  `;
416
389
  return `\
417
390
  @import "tailwindcss";
418
- @import "@farming-labs/theme/${getThemeInfo(theme).nextCssImport}/css";
391
+ @import "${getThemeCssImport(theme)}";
419
392
  `;
420
393
  }
421
394
  function injectCssImport(existingContent, theme, customThemeName, globalCssRelPath) {
422
- const importLine = theme === "custom" && customThemeName && globalCssRelPath ? `@import "${getCustomThemeCssImportPath(globalCssRelPath, customThemeName.replace(/\.css$/i, ""))}";` : `@import "@farming-labs/theme/${getThemeInfo(theme).nextCssImport}/css";`;
395
+ const importLine = theme === "custom" && customThemeName && globalCssRelPath ? `@import "${getCustomThemeCssImportPath(globalCssRelPath, customThemeName.replace(/\.css$/i, ""))}";` : `@import "${getThemeCssImport(theme)}";`;
423
396
  if (existingContent.includes(importLine)) return null;
424
- if (theme !== "custom" && existingContent.includes("@farming-labs/theme/") && existingContent.includes("/css")) return null;
397
+ if (theme !== "custom" && hasBuiltInThemeCssImport(existingContent)) return null;
425
398
  if (theme === "custom" && existingContent.includes("themes/") && existingContent.includes(".css")) return null;
426
399
  const lines = existingContent.split("\n");
427
400
  const lastImportIdx = lines.reduce((acc, l, i) => l.trimStart().startsWith("@import") ? i : acc, -1);
@@ -1435,17 +1408,17 @@ function svelteGlobalCssTemplate(theme, customThemeName, globalCssRelPath) {
1435
1408
  @import "${getCustomThemeCssImportPath(globalCssRelPath, customThemeName.replace(/\.css$/i, ""))}";
1436
1409
  `;
1437
1410
  return `\
1438
- @import "@farming-labs/svelte-theme/${theme}/css";
1411
+ @import "${getThemeCssImport(theme)}";
1439
1412
  `;
1440
1413
  }
1441
1414
  function svelteCssImportLine(theme, customThemeName, globalCssRelPath) {
1442
1415
  if (theme === "custom" && customThemeName && globalCssRelPath) return `@import "${getCustomThemeCssImportPath(globalCssRelPath, customThemeName.replace(/\.css$/i, ""))}";`;
1443
- return `@import "@farming-labs/svelte-theme/${theme}/css";`;
1416
+ return `@import "${getThemeCssImport(theme)}";`;
1444
1417
  }
1445
1418
  function injectSvelteCssImport(existingContent, theme, customThemeName, globalCssRelPath) {
1446
1419
  const importLine = svelteCssImportLine(theme, customThemeName, globalCssRelPath);
1447
1420
  if (existingContent.includes(importLine)) return null;
1448
- if (theme !== "custom" && existingContent.includes("@farming-labs/svelte-theme/") && existingContent.includes("/css")) return null;
1421
+ if (theme !== "custom" && hasBuiltInThemeCssImport(existingContent)) return null;
1449
1422
  if (theme === "custom" && existingContent.includes("themes/") && existingContent.includes(".css")) return null;
1450
1423
  const lines = existingContent.split("\n");
1451
1424
  const lastImportIdx = lines.reduce((acc, l, i) => l.trimStart().startsWith("@import") ? i : acc, -1);
@@ -1503,7 +1476,7 @@ Follow these steps to install and configure ${cfg.projectName}.
1503
1476
  ## Install Dependencies
1504
1477
 
1505
1478
  \`\`\`bash
1506
- pnpm add @farming-labs/docs @farming-labs/svelte @farming-labs/svelte-theme
1479
+ pnpm add @farming-labs/docs @farming-labs/svelte @farming-labs/svelte-theme @farming-labs/theme
1507
1480
  \`\`\`
1508
1481
 
1509
1482
  ## Configuration
@@ -1738,7 +1711,7 @@ import DocsContent from "@farming-labs/astro-theme/src/components/DocsContent.as
1738
1711
  import SearchDialog from "@farming-labs/astro-theme/src/components/SearchDialog.astro";
1739
1712
  import config from "${astroPageConfigImport(cfg.useAlias, 2)}";
1740
1713
  import { load } from "${astroPageServerImport(cfg.useAlias, 2)}";
1741
- import "${`@farming-labs/astro-theme/${getThemeInfo(cfg.theme).astroCssTheme}/css`}";
1714
+ import "${getThemeCssImport(cfg.theme)}";
1742
1715
 
1743
1716
  const data = await load(Astro.url.pathname);
1744
1717
  ---
@@ -1766,7 +1739,7 @@ import DocsContent from "@farming-labs/astro-theme/src/components/DocsContent.as
1766
1739
  import SearchDialog from "@farming-labs/astro-theme/src/components/SearchDialog.astro";
1767
1740
  import config from "${astroPageConfigImport(cfg.useAlias, 2)}";
1768
1741
  import { load } from "${astroPageServerImport(cfg.useAlias, 2)}";
1769
- import "${`@farming-labs/astro-theme/${getThemeInfo(cfg.theme).astroCssTheme}/css`}";
1742
+ import "${getThemeCssImport(cfg.theme)}";
1770
1743
 
1771
1744
  const data = await load(Astro.url.pathname);
1772
1745
  ---
@@ -1903,17 +1876,17 @@ function astroGlobalCssTemplate(theme, customThemeName, globalCssRelPath) {
1903
1876
  @import "${getCustomThemeCssImportPath(globalCssRelPath, customThemeName.replace(/\.css$/i, ""))}";
1904
1877
  `;
1905
1878
  return `\
1906
- @import "@farming-labs/astro-theme/${theme}/css";
1879
+ @import "${getThemeCssImport(theme)}";
1907
1880
  `;
1908
1881
  }
1909
1882
  function astroCssImportLine(theme, customThemeName, globalCssRelPath) {
1910
1883
  if (theme === "custom" && customThemeName && globalCssRelPath) return `@import "${getCustomThemeCssImportPath(globalCssRelPath, customThemeName.replace(/\.css$/i, ""))}";`;
1911
- return `@import "@farming-labs/astro-theme/${theme}/css";`;
1884
+ return `@import "${getThemeCssImport(theme)}";`;
1912
1885
  }
1913
1886
  function injectAstroCssImport(existingContent, theme, customThemeName, globalCssRelPath) {
1914
1887
  const importLine = astroCssImportLine(theme, customThemeName, globalCssRelPath);
1915
1888
  if (existingContent.includes(importLine)) return null;
1916
- if (theme !== "custom" && existingContent.includes("@farming-labs/astro-theme/") && existingContent.includes("/css")) return null;
1889
+ if (theme !== "custom" && hasBuiltInThemeCssImport(existingContent)) return null;
1917
1890
  if (theme === "custom" && existingContent.includes("themes/") && existingContent.includes(".css")) return null;
1918
1891
  const lines = existingContent.split("\n");
1919
1892
  const lastImportIdx = lines.reduce((acc, l, i) => l.trimStart().startsWith("@import") ? i : acc, -1);
@@ -1971,7 +1944,7 @@ Follow these steps to install and configure ${cfg.projectName}.
1971
1944
  ## Install Dependencies
1972
1945
 
1973
1946
  \\\`\\\`\\\`bash
1974
- pnpm add @farming-labs/docs @farming-labs/astro @farming-labs/astro-theme
1947
+ pnpm add @farming-labs/docs @farming-labs/astro @farming-labs/astro-theme @farming-labs/theme
1975
1948
  \\\`\\\`\\\`
1976
1949
 
1977
1950
  ## Configuration
@@ -2195,11 +2168,11 @@ function nuxtConfigTemplate(cfg) {
2195
2168
  export default defineNuxtConfig({
2196
2169
  compatibilityDate: "2024-11-01",
2197
2170
 
2198
- css: ["@farming-labs/nuxt-theme/${getThemeInfo(cfg.theme).nuxtCssTheme}/css"],
2171
+ css: ["${getThemeCssImport(cfg.theme)}"],
2199
2172
 
2200
2173
  vite: {
2201
2174
  optimizeDeps: {
2202
- include: ["@farming-labs/docs", "@farming-labs/nuxt", "@farming-labs/nuxt-theme"],
2175
+ include: ["@farming-labs/docs", "@farming-labs/nuxt", "@farming-labs/nuxt-theme", "@farming-labs/theme"],
2203
2176
  },
2204
2177
  },
2205
2178
 
@@ -2264,7 +2237,7 @@ Follow these steps to install and configure ${cfg.projectName}.
2264
2237
  ## Install Dependencies
2265
2238
 
2266
2239
  \`\`\`bash
2267
- pnpm add @farming-labs/docs @farming-labs/nuxt @farming-labs/nuxt-theme
2240
+ pnpm add @farming-labs/docs @farming-labs/nuxt @farming-labs/nuxt-theme @farming-labs/theme
2268
2241
  \`\`\`
2269
2242
 
2270
2243
  ## Configuration
@@ -2370,17 +2343,17 @@ function nuxtGlobalCssTemplate(theme, customThemeName, globalCssRelPath) {
2370
2343
  @import "${getCustomThemeCssImportPath(globalCssRelPath, customThemeName.replace(/\.css$/i, ""))}";
2371
2344
  `;
2372
2345
  return `\
2373
- @import "@farming-labs/nuxt-theme/${theme}/css";
2346
+ @import "${getThemeCssImport(theme)}";
2374
2347
  `;
2375
2348
  }
2376
2349
  function nuxtCssImportLine(theme, customThemeName, globalCssRelPath) {
2377
2350
  if (theme === "custom" && customThemeName && globalCssRelPath) return `@import "${getCustomThemeCssImportPath(globalCssRelPath, customThemeName.replace(/\.css$/i, ""))}";`;
2378
- return `@import "@farming-labs/nuxt-theme/${theme}/css";`;
2351
+ return `@import "${getThemeCssImport(theme)}";`;
2379
2352
  }
2380
2353
  function injectNuxtCssImport(existingContent, theme, customThemeName, globalCssRelPath) {
2381
2354
  const importLine = nuxtCssImportLine(theme, customThemeName, globalCssRelPath);
2382
2355
  if (existingContent.includes(importLine)) return null;
2383
- if (theme !== "custom" && existingContent.includes("@farming-labs/nuxt-theme/") && existingContent.includes("/css")) return null;
2356
+ if (theme !== "custom" && hasBuiltInThemeCssImport(existingContent)) return null;
2384
2357
  if (theme === "custom" && existingContent.includes("themes/") && existingContent.includes(".css")) return null;
2385
2358
  const lines = existingContent.split("\n");
2386
2359
  const lastImportIdx = lines.reduce((acc, l, i) => l.trimStart().startsWith("@import") ? i : acc, -1);
@@ -1,5 +1,5 @@
1
1
  import { c as fileExists, o as exec } from "./utils-D-xTRNuh.mjs";
2
- import { a as getPackagesForFramework, c as resolveDocsPackageManager, i as frameworkFromPreset, l as validateUpgradeVersion, n as PRESETS, o as presetFromFramework, r as buildDocsPackageInstallCommand, s as resolveDocsPackageFramework, t as PACKAGES_BY_FRAMEWORK } from "./package-version-DPQSBBsX.mjs";
2
+ import { a as getPackagesForFramework, c as resolveDocsPackageManager, i as frameworkFromPreset, l as validateUpgradeVersion, n as PRESETS, o as presetFromFramework, r as buildDocsPackageInstallCommand, s as resolveDocsPackageFramework, t as PACKAGES_BY_FRAMEWORK } from "./package-version-C8PigBZk.mjs";
3
3
  import path from "node:path";
4
4
  import pc from "picocolors";
5
5
  import * as p from "@clack/prompts";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/docs",
3
- "version": "0.2.44",
3
+ "version": "0.2.46",
4
4
  "description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
5
5
  "keywords": [
6
6
  "docs",