valaxy 1.0.0-rc.10 → 1.0.0-rc.12

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.
@@ -1,10 +1,11 @@
1
1
  import { isClient, useClipboard } from '@vueuse/core'
2
2
  import { computed, ref, watchEffect } from 'vue'
3
3
  import { useRoute } from 'vue-router'
4
+ import { useSiteConfig } from '../../config'
4
5
 
5
6
  /**
6
7
  * Composable for copying raw Markdown content of the current post.
7
- * Requires `siteConfig.llms.files: true` to have .md files available at build output.
8
+ * Requires `siteConfig.llms.enable: true` and `siteConfig.llms.files: true` to have .md files available at build output.
8
9
  *
9
10
  * The `available` ref is initially `false` and becomes `true` after a HEAD request
10
11
  * confirms the `.md` file exists. This allows themes to conditionally render
@@ -26,6 +27,7 @@ import { useRoute } from 'vue-router'
26
27
  */
27
28
  export function useCopyMarkdown() {
28
29
  const route = useRoute()
30
+ const siteConfig = useSiteConfig()
29
31
  const copied = ref(false)
30
32
  const loading = ref(false)
31
33
  const available = ref(false)
@@ -39,14 +41,26 @@ export function useCopyMarkdown() {
39
41
  return `${p}.md`
40
42
  })
41
43
 
42
- // Probe the .md file to detect availability (siteConfig.llms.files enabled at build time)
44
+ // Only probe when raw Markdown output is enabled.
43
45
  if (isClient) {
44
- watchEffect(() => {
46
+ watchEffect((onCleanup) => {
45
47
  available.value = false
46
48
  error.value = null
47
- fetch(mdUrl.value, { method: 'HEAD' })
48
- .then((res) => { available.value = res.ok })
49
- .catch(() => { available.value = false })
49
+ if (!siteConfig.value.llms.enable || !siteConfig.value.llms.files)
50
+ return
51
+
52
+ const controller = new AbortController()
53
+ onCleanup(() => controller.abort())
54
+
55
+ fetch(mdUrl.value, { method: 'HEAD', signal: controller.signal })
56
+ .then((res) => {
57
+ if (!controller.signal.aborted)
58
+ available.value = res.ok
59
+ })
60
+ .catch(() => {
61
+ if (!controller.signal.aborted)
62
+ available.value = false
63
+ })
50
64
  })
51
65
  }
52
66
 
@@ -1,62 +1,57 @@
1
1
  import type { UserModule } from '../types'
2
+ import { createValaxyPageBridge } from '@valaxyjs/devtools/page'
3
+ import { useWindowSize } from '@vueuse/core'
4
+ import { effectScope, onScopeDispose, watch } from 'vue'
5
+ import { useScreenSize } from '../composables/helper/useScreenSize'
6
+ import { useValaxyConfig } from '../config'
2
7
 
3
- import { normalizeRepositoryUrl } from '@valaxyjs/utils'
4
- import pkg from '../../package.json'
5
- import valaxyLogo from '../assets/images/valaxy-logo.png'
6
-
7
- // import {addCustomCommand, addCustomTab } from '@vue/devtools-api'
8
-
9
- /**
10
- * add when enable vue devtools
11
- * https://devtools-next.vuejs.org/plugins/api
12
- */
13
- export async function addValaxyTabAndCommand() {
14
- const { addCustomTab, addCustomCommand } = await import('@vue/devtools-api')
15
- addCustomTab({
16
- // unique identifier
17
- name: 'valaxy',
18
- // title to display in the tab
19
- title: 'Valaxy',
20
- // any icon from Iconify, or a URL to an image
21
- icon: valaxyLogo,
22
- // iframe view
23
- view: {
24
- type: 'iframe',
25
- // src: import.meta.env.DEV ? 'http://localhost:5001/' : '/__valaxy_devtools__/',
26
- src: '/__valaxy_devtools__/',
27
- },
28
- // category: 'pinned',
29
- category: 'app',
30
- })
31
-
32
- addCustomCommand({
33
- id: 'valaxy',
34
- title: 'Valaxy',
35
- icon: valaxyLogo,
36
- children: [
37
- {
38
- id: 'valaxy:github',
39
- title: 'Github',
40
- icon: 'i-ri-github-fill',
41
- action: {
42
- type: 'url',
43
- src: normalizeRepositoryUrl(pkg.repository.url),
44
- },
8
+ export const install: UserModule = ({ app, router }) => {
9
+ const scope = effectScope()
10
+ app.runWithContext(() => scope.run(() => {
11
+ const config = useValaxyConfig()
12
+ const { width, height } = useWindowSize()
13
+ const screen = useScreenSize()
14
+ const bridge = createValaxyPageBridge(router, {
15
+ getDebug() {
16
+ const route = router.currentRoute.value
17
+ const { siteConfig, themeConfig, theme } = config.value
18
+ return {
19
+ route: {
20
+ path: route.path,
21
+ fullPath: route.fullPath,
22
+ name: route.name == null ? undefined : String(route.name),
23
+ layout: String(route.meta.layout || 'default'),
24
+ query: route.query,
25
+ params: route.params,
26
+ },
27
+ viewport: {
28
+ width: width.value,
29
+ height: height.value,
30
+ breakpoints: [
31
+ { label: 'xs', active: screen.isXs.value },
32
+ { label: 'sm', active: screen.isSm.value },
33
+ { label: 'md', active: screen.isMd.value },
34
+ { label: 'lg', active: screen.isLg.value },
35
+ { label: 'xl', active: screen.isXl.value },
36
+ { label: '2xl', active: screen.is2xl.value },
37
+ ],
38
+ },
39
+ config: {
40
+ theme: theme || '',
41
+ site: { lang: siteConfig.lang, title: siteConfig.title, url: siteConfig.url },
42
+ themeConfig: { ...themeConfig },
43
+ },
44
+ }
45
45
  },
46
- {
47
- id: 'valaxy:website',
48
- title: 'Website',
49
- icon: valaxyLogo,
50
- action: {
51
- type: 'url',
52
- src: 'https://valaxy.site/',
53
- },
54
- order: 2,
55
- },
56
- ],
57
- })
58
- }
59
-
60
- export const install: UserModule = async () => {
61
- await addValaxyTabAndCommand()
46
+ })
47
+ const sync = () => bridge.sync()
48
+ watch([width, height, config, ...Object.values(screen)], sync, { deep: true })
49
+ import.meta.hot?.on('valaxy:pageData', sync)
50
+ onScopeDispose(() => {
51
+ bridge.close()
52
+ import.meta.hot?.off('valaxy:pageData', sync)
53
+ })
54
+ }))
55
+ app.onUnmount(() => scope.stop())
56
+ import.meta.hot?.dispose(() => scope.stop())
62
57
  }
@@ -1,5 +1,5 @@
1
1
  import type { UserModule } from '../types'
2
- import { InferSeoMetaPlugin } from '@unhead/addons'
2
+ import { InferSeoMetaPlugin } from '@unhead/bundler'
3
3
 
4
4
  export const install: UserModule = async ({ head, isClient }) => {
5
5
  // Disables on client build, allows 0kb runtime
@@ -27,7 +27,7 @@ export default function setupMain(ctx: ValaxySSGContext, config: ComputedRef<Val
27
27
  installNprogress(ctx)
28
28
  installFloatingVue(ctx, config)
29
29
 
30
- if (import.meta.env.DEV && ctx.isClient) {
30
+ if (import.meta.env.DEV && ctx.isClient && config.value.devtools) {
31
31
  import('../modules/devtools').then(({ install: installDevtools }) => {
32
32
  setTimeout(() => {
33
33
  installDevtools(ctx)
@@ -1,20 +1,35 @@
1
1
  import { Argv } from 'yargs';
2
- import { LogLevel, ViteDevServer } from 'vite';
2
+ import { LogLevel, InlineConfig, ViteDevServer } from 'vite';
3
3
 
4
- declare function startValaxyDev({ root, port, remote, log, open, }: {
4
+ /**
5
+ * valaxy build
6
+ */
7
+ declare function execBuild({ ssg, root, output, log, siteUrl }: {
8
+ ssg: boolean;
9
+ root: string;
10
+ output: string;
11
+ log: string;
12
+ siteUrl?: string;
13
+ }): Promise<void>;
14
+
15
+ declare function startValaxyDev({ root, port, remote, log, open, vite, }: {
5
16
  root?: string;
6
17
  port?: number;
7
18
  remote?: boolean;
8
19
  log?: LogLevel;
9
20
  open?: boolean;
21
+ /** Final host overrides for programmatic callers such as Valaxy Desktop. */
22
+ vite?: InlineConfig;
10
23
  }): Promise<ViteDevServer>;
11
24
  declare function registerDevCommand(cli: Argv): void;
12
25
 
26
+ /** Programmatic lifecycle contract supported by Valaxy Desktop. */
27
+ declare const desktopRuntimeVersion = 1;
13
28
  interface CreateCliOptions {
14
29
  userRoot?: string;
15
30
  }
16
31
  declare function createCli(argv?: string[], options?: CreateCliOptions): Promise<Argv<object>>;
17
32
  declare function run(argv?: string[], options?: CreateCliOptions): Promise<void>;
18
33
 
19
- export { createCli, registerDevCommand, run, startValaxyDev };
34
+ export { createCli, desktopRuntimeVersion, execBuild, registerDevCommand, run, startValaxyDev };
20
35
  export type { CreateCliOptions };
@@ -2,7 +2,7 @@ import 'node:path';
2
2
  import 'node:process';
3
3
  import 'yargs';
4
4
  import 'yargs/helpers';
5
- export { c as createCli, J as registerDevCommand, Y as run, _ as startValaxyDev } from '../../shared/valaxy.B2Ey6Ph7.mjs';
5
+ export { c as createCli, s as desktopRuntimeVersion, u as execBuild, N as registerDevCommand, a0 as run, a2 as startValaxyDev } from '../../shared/valaxy.gZBECESB.mjs';
6
6
  import 'node:os';
7
7
  import 'consola';
8
8
  import 'consola/utils';
@@ -31,7 +31,7 @@ import 'table';
31
31
  import 'hookable';
32
32
  import 'node:fs';
33
33
  import '@intlify/unplugin-vue-i18n/vite';
34
- import '@unhead/addons/vite';
34
+ import '@unhead/bundler/vite';
35
35
  import 'unplugin-vue-components/vite';
36
36
  import 'vite-plugin-vue-layouts-next';
37
37
  import 'vitepress-plugin-group-icons';
@@ -63,6 +63,8 @@ import 'node:child_process';
63
63
  import 'node:v8';
64
64
  import 'vite-ssg-sitemap';
65
65
  import '@unhead/vue/server';
66
+ import 'vue-router/unplugin';
67
+ import 'vue/compiler-sfc';
66
68
  import '@clack/prompts';
67
69
  import 'node:net';
68
70
  import 'node:readline';
@@ -1,6 +1,5 @@
1
- import * as vite from 'vite';
2
1
  import { UserConfig, InlineConfig, ViteDevServer, PluginOption, Plugin } from 'vite';
3
- import { S as SiteConfig, D as DefaultTheme, R as RuntimeConfig, a as RedirectItem, V as ValaxyConfig, P as PartialDeep, b as ValaxyAddon, U as UserSiteConfig } from '../shared/valaxy.CmvWuejN.mjs';
2
+ import { S as SiteConfig, D as DefaultTheme, R as RuntimeConfig, a as RedirectItem, V as ValaxyConfig, P as PartialDeep, b as ValaxyAddon, U as UserSiteConfig } from '../shared/valaxy.VM_duYKy.mjs';
4
3
  import Vue from '@vitejs/plugin-vue';
5
4
  import { Hookable } from 'hookable';
6
5
  import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
@@ -12,12 +11,13 @@ import Layouts from 'vite-plugin-vue-layouts-next';
12
11
  import { EditableTreeNode } from 'vue-router/unplugin';
13
12
  import Router from 'vue-router/vite';
14
13
  import { MarkdownEnv } from 'unplugin-vue-markdown/types';
14
+ import { ValaxyDevtoolsAddon } from '@valaxyjs/devtools/plugin';
15
15
  import { Argv } from 'yargs';
16
16
  import { KatexOptions } from 'katex';
17
17
  import { MarkdownExitOptions, MarkdownExit, StateCore, Token } from 'markdown-exit';
18
18
  import { ThemeRegistration, BuiltinTheme, LanguageInput, ShikiTransformer, Highlighter } from 'shiki';
19
19
  import { Header } from '@valaxyjs/utils';
20
- export { CreateCliOptions, createCli, registerDevCommand, run, startValaxyDev } from './cli/index.mjs';
20
+ export { CreateCliOptions, createCli, desktopRuntimeVersion, execBuild, registerDevCommand, run, startValaxyDev } from './cli/index.mjs';
21
21
  import { Awaitable } from '@antfu/utils';
22
22
  import * as defu from 'defu';
23
23
  import '@vueuse/integrations/useFuse';
@@ -912,10 +912,19 @@ interface ValaxyExtendConfig {
912
912
  };
913
913
  /**
914
914
  * @experimental
915
- * Enable Vue Devtools & Valaxy Devtools
916
- * @see https://devtools-next.vuejs.org/
915
+ * Enable Vite DevTools, Valaxy DevTools and Vue DevTools
916
+ * @see https://devtools.vite.dev/
917
917
  */
918
918
  devtools?: boolean;
919
+ /**
920
+ * Enable the local, read-only MCP endpoint during development.
921
+ * @zh 开启开发环境的本地只读 MCP 服务,默认关闭。
922
+ * @default false
923
+ */
924
+ mcp?: boolean | {
925
+ /** Include drafts in MCP results. Password-protected pages remain excluded. */
926
+ includeDrafts?: boolean;
927
+ };
919
928
  /**
920
929
  * @en config for markdown (include markdown-it plugins)
921
930
  * @zh markdown 相关配置
@@ -1002,10 +1011,14 @@ interface ValaxyAddonResolver {
1002
1011
  options: Record<string, any>;
1003
1012
  configFile?: string;
1004
1013
  pkg: Record<string, any>;
1014
+ /** Loaded only when development tools are enabled. */
1015
+ devtools?: ValaxyDevtoolsAddon;
1005
1016
  extendCli?: ValaxyAddonExtendCli;
1006
1017
  setup?: (node: ValaxyNode) => void;
1007
1018
  }
1008
1019
  type ValaxyNodeAddon = ValaxyAddon & {
1020
+ /** Loaded only when development tools are enabled. */
1021
+ devtools?: ValaxyDevtoolsAddon;
1009
1022
  extendCli?: ValaxyAddonExtendCli;
1010
1023
  setup?: ValaxyAddonResolver['setup'];
1011
1024
  };
@@ -1154,6 +1167,57 @@ declare const customElements: Set<string>;
1154
1167
  */
1155
1168
  declare const defaultViteConfig: UserConfig;
1156
1169
 
1170
+ interface ContentDiagnostic {
1171
+ code: string;
1172
+ severity: 'error' | 'warning';
1173
+ message: string;
1174
+ hint: string;
1175
+ line?: number;
1176
+ }
1177
+ interface ContentPageInfo {
1178
+ path: string;
1179
+ /** Routes after configured build-time hooks; runtime router changes are excluded. */
1180
+ routes: {
1181
+ path: string;
1182
+ aliases: string[];
1183
+ previewPath: string;
1184
+ layout: string | false;
1185
+ }[];
1186
+ /** Only public article metadata, never raw configuration or frontmatter. */
1187
+ metadata: Record<string, string | string[] | boolean>;
1188
+ draft: boolean;
1189
+ hidden: boolean;
1190
+ includedInProductionRoutes: boolean;
1191
+ }
1192
+ interface ContentCheckResult {
1193
+ path: string;
1194
+ ok: boolean;
1195
+ page?: ContentPageInfo;
1196
+ diagnostics: ContentDiagnostic[];
1197
+ /** At most 100 diagnostics are returned; this counts all detected diagnostics. */
1198
+ totalDiagnostics: number;
1199
+ }
1200
+ interface ContentServiceOptions {
1201
+ /** Apply the MCP visibility policy. CLI/API callers can inspect their own private files. */
1202
+ publicOnly?: boolean;
1203
+ includeDrafts?: boolean;
1204
+ /** Resolved Vite base, when called from a running development server. */
1205
+ base?: string;
1206
+ /** Resolved Vite public directory; false disables public assets. */
1207
+ publicDir?: string | false;
1208
+ }
1209
+
1210
+ /**
1211
+ * Inspect Markdown through Valaxy's route pipeline without starting a server.
1212
+ * Configured route/Markdown hooks run as they do during route generation. Scans
1213
+ * are serialized and rebuilt per request so edits and removals are observable.
1214
+ */
1215
+ declare function createContentService(app: ValaxyNode, settings?: ContentServiceOptions): {
1216
+ inspectPage: (path: string) => Promise<ContentPageInfo>;
1217
+ checkPage: (path: string) => Promise<ContentCheckResult>;
1218
+ dispose: () => Promise<void>;
1219
+ };
1220
+
1157
1221
  declare let version: string;
1158
1222
 
1159
1223
  declare const GLOBAL_STATE: {
@@ -1194,7 +1258,7 @@ declare function createValaxyPlugin(options: ResolvedValaxyOptions, serverOption
1194
1258
  * with valaxyPrefix
1195
1259
  */
1196
1260
  declare function getServerInfoText(msg: string): string;
1197
- declare function createServer(valaxyApp: ValaxyNode, viteConfig?: InlineConfig, serverOptions?: ValaxyServerOptions): Promise<vite.ViteDevServer>;
1261
+ declare function createServer(valaxyApp: ValaxyNode, viteConfig?: InlineConfig, serverOptions?: ValaxyServerOptions): Promise<ViteDevServer>;
1198
1262
 
1199
1263
  /**
1200
1264
  * @see https://github.com/mdn/dom-examples/blob/main/web-crypto/encrypt-decrypt/aes-cbc.js
@@ -1245,5 +1309,5 @@ declare function toAtFS(path: string): string;
1245
1309
  declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
1246
1310
  declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
1247
1311
 
1248
- export { $t, ALL_ROUTE, EXCERPT_SEPARATOR, GLOBAL_STATE, PATHNAME_PROTOCOL_RE, StateManager, ViteValaxyPlugins, build, createMemoryReleasePlugin, createServer, createValaxyPlugin, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineContentLoader, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, encryptContent, generateClientRedirects, getGitTimestamp, getIndexHtml, getServerInfoText, isExternal, isInstalledGlobally, isKatexEnabled, isKatexPluginNeeded, isMathJaxEnabled, isPath, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject, version };
1249
- export type { CdnModule, ContentItem, ContentLoader, ContentLoaderContext, GroupIconOptions, GroupIconValue, HookResult, LoadConfigFromFileOptions, MdAfterRenderContext, ResolvedConfig, ResolvedValaxyOptions, UnoSetup, UserInputConfig, UserValaxyNodeConfig, ValaxyAddonCliContext, ValaxyAddonExport, ValaxyAddonExtendCli, ValaxyAddonFn, ValaxyAddonLike, ValaxyAddonResolver, ValaxyAddons, ValaxyApp, ValaxyConfigExport, ValaxyConfigExtendKey, ValaxyConfigFn, ValaxyEntryOptions, ValaxyExtendConfig, ValaxyFileInfo, ValaxyHooks, ValaxyNode, ValaxyNodeAddon, ValaxyNodeConfig, ValaxyPickConfig, ValaxyServerOptions, ValaxyTheme };
1312
+ export { $t, ALL_ROUTE, EXCERPT_SEPARATOR, GLOBAL_STATE, PATHNAME_PROTOCOL_RE, StateManager, ViteValaxyPlugins, build, createContentService, createMemoryReleasePlugin, createServer, createValaxyNode, createValaxyPlugin, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineContentLoader, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, encryptContent, generateClientRedirects, getGitTimestamp, getIndexHtml, getServerInfoText, isExternal, isInstalledGlobally, isKatexEnabled, isKatexPluginNeeded, isMathJaxEnabled, isPath, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject, version };
1313
+ export type { CdnModule, ContentCheckResult, ContentDiagnostic, ContentItem, ContentLoader, ContentLoaderContext, ContentPageInfo, ContentServiceOptions, GroupIconOptions, GroupIconValue, HookResult, LoadConfigFromFileOptions, MdAfterRenderContext, ResolvedConfig, ResolvedValaxyOptions, UnoSetup, UserInputConfig, UserValaxyNodeConfig, ValaxyAddonCliContext, ValaxyAddonExport, ValaxyAddonExtendCli, ValaxyAddonFn, ValaxyAddonLike, ValaxyAddonResolver, ValaxyAddons, ValaxyApp, ValaxyConfigExport, ValaxyConfigExtendKey, ValaxyConfigFn, ValaxyEntryOptions, ValaxyExtendConfig, ValaxyFileInfo, ValaxyHooks, ValaxyNode, ValaxyNodeAddon, ValaxyNodeConfig, ValaxyPickConfig, ValaxyServerOptions, ValaxyTheme };
@@ -1,4 +1,4 @@
1
- export { A as ALL_ROUTE, E as EXCERPT_SEPARATOR, G as GLOBAL_STATE, P as PATHNAME_PROTOCOL_RE, S as StateManager, V as ViteValaxyPlugins, b as build, c as createCli, a as createMemoryReleasePlugin, d as createServer, e as createValaxyPlugin, f as customElements, g as defaultSiteConfig, h as defaultValaxyConfig, i as defaultViteConfig, j as defineAddon, k as defineConfig, l as defineSiteConfig, m as defineTheme, n as defineValaxyAddon, o as defineValaxyConfig, p as defineValaxyTheme, q as encryptContent, r as generateClientRedirects, s as getGitTimestamp, t as getIndexHtml, u as getServerInfoText, v as isExternal, w as isInstalledGlobally, x as isKatexEnabled, y as isKatexPluginNeeded, z as isMathJaxEnabled, B as isPath, C as loadConfigFromFile, D as mergeValaxyConfig, F as mergeViteConfigs, H as postProcessForSSG, I as processValaxyOptions, J as registerDevCommand, K as resolveAddonsConfig, L as resolveImportPath, M as resolveImportUrl, N as resolveOptions, O as resolveSiteConfig, Q as resolveSiteConfigFromRoot, R as resolveThemeConfigFromRoot, T as resolveThemeValaxyConfig, U as resolveUserThemeConfig, W as resolveValaxyConfig, X as resolveValaxyConfigFromRoot, Y as run, Z as ssgBuild, _ as startValaxyDev, $ as toAtFS, a0 as transformObject, a1 as version } from '../shared/valaxy.B2Ey6Ph7.mjs';
1
+ export { A as ALL_ROUTE, E as EXCERPT_SEPARATOR, G as GLOBAL_STATE, P as PATHNAME_PROTOCOL_RE, S as StateManager, V as ViteValaxyPlugins, b as build, c as createCli, a as createContentService, d as createMemoryReleasePlugin, e as createServer, f as createValaxyNode, g as createValaxyPlugin, h as customElements, i as defaultSiteConfig, j as defaultValaxyConfig, k as defaultViteConfig, l as defineAddon, m as defineConfig, n as defineSiteConfig, o as defineTheme, p as defineValaxyAddon, q as defineValaxyConfig, r as defineValaxyTheme, s as desktopRuntimeVersion, t as encryptContent, u as execBuild, v as generateClientRedirects, w as getGitTimestamp, x as getIndexHtml, y as getServerInfoText, z as isExternal, B as isInstalledGlobally, C as isKatexEnabled, D as isKatexPluginNeeded, F as isMathJaxEnabled, H as isPath, I as loadConfigFromFile, J as mergeValaxyConfig, K as mergeViteConfigs, L as postProcessForSSG, M as processValaxyOptions, N as registerDevCommand, O as resolveAddonsConfig, Q as resolveImportPath, R as resolveImportUrl, T as resolveOptions, U as resolveSiteConfig, W as resolveSiteConfigFromRoot, X as resolveThemeConfigFromRoot, Y as resolveThemeValaxyConfig, Z as resolveUserThemeConfig, _ as resolveValaxyConfig, $ as resolveValaxyConfigFromRoot, a0 as run, a1 as ssgBuild, a2 as startValaxyDev, a3 as toAtFS, a4 as transformObject, a5 as version } from '../shared/valaxy.gZBECESB.mjs';
2
2
  import 'node:path';
3
3
  import 'consola';
4
4
  import 'fs-extra';
@@ -31,7 +31,7 @@ import 'table';
31
31
  import 'hookable';
32
32
  import 'node:fs';
33
33
  import '@intlify/unplugin-vue-i18n/vite';
34
- import '@unhead/addons/vite';
34
+ import '@unhead/bundler/vite';
35
35
  import 'unplugin-vue-components/vite';
36
36
  import 'vite-plugin-vue-layouts-next';
37
37
  import 'vitepress-plugin-group-icons';
@@ -63,6 +63,8 @@ import 'node:child_process';
63
63
  import 'node:v8';
64
64
  import 'vite-ssg-sitemap';
65
65
  import '@unhead/vue/server';
66
+ import 'vue-router/unplugin';
67
+ import 'vue/compiler-sfc';
66
68
  import '@clack/prompts';
67
69
  import 'node:net';
68
70
  import 'node:readline';
@@ -950,6 +950,8 @@ interface Pkg {
950
950
  [key: string]: any;
951
951
  }
952
952
  interface ValaxyConfig<ThemeConfig = DefaultTheme.Config> {
953
+ /** Enable development tools and the page inspection bridge. */
954
+ devtools?: boolean;
953
955
  /**
954
956
  * @en Site **info** config. This affects info displayed on the site, and is independent of themes.
955
957
  * @zh 站点**信息**配置,这部分内容面向站点展示,且在不同主题中也是通用的格式