valaxy 1.0.0-rc.8 → 1.0.0
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.
- package/client/.gitignore +7 -0
- package/client/components/ValaxyLocalSearch.vue +1 -1
- package/client/composables/app/useValaxyHead.ts +1 -1
- package/client/composables/features/collapse-code.ts +1 -1
- package/client/composables/features/copy-markdown.ts +20 -6
- package/client/composables/search/useLocalSearch.ts +5 -5
- package/client/index.d.ts +1 -0
- package/client/index.html +1 -0
- package/client/modules/devtools.ts +53 -58
- package/client/modules/unhead.ts +9 -1
- package/client/setup/main.ts +1 -1
- package/client/setups.ts +2 -5
- package/client/shims.d.ts +7 -0
- package/client/styles/css-vars/borders.css +1 -1
- package/client/styles/css-vars/function.css +0 -4
- package/client/styles/css-vars/palette.css +10 -19
- package/client/tsconfig.json +1 -3
- package/client/types/index.ts +0 -6
- package/client/utils/content.ts +5 -0
- package/dist/node/cli/index.d.mts +18 -3
- package/dist/node/cli/index.mjs +24 -14
- package/dist/node/index.d.mts +180 -22
- package/dist/node/index.mjs +28 -18
- package/dist/shared/{valaxy.Di1xqt_R.mjs → valaxy.BVZF0N6Q.mjs} +8538 -5135
- package/dist/shared/{valaxy.CmvWuejN.d.mts → valaxy.CjaAzLmd.d.mts} +7 -3
- package/dist/types/index.d.mts +2 -2
- package/package.json +68 -57
- package/shared/node/i18n.ts +1 -1
- package/types/config.ts +5 -3
- package/types/frontmatter/page.ts +2 -0
- package/types/markdown-it-container.d.ts +3 -5
- package/types/markdown-it-plugins.d.ts +22 -0
- package/vendor/README.md +29 -0
- package/vendor/components/LICENSE +21 -0
- package/vendor/components/index.d.mts +3 -0
- package/vendor/components/index.mjs +2 -0
- package/vendor/components/src-S1kwY0Q8.mjs +660 -0
- package/vendor/components/utils-BfjsfvcK.mjs +229 -0
- package/vendor/i18n/LICENSE +20 -0
- package/vendor/i18n/index.d.mts +7 -0
- package/vendor/i18n/index.mjs +1389 -0
- package/vendor/i18n/types.d.ts +48 -0
- package/{LICENSE → vendor/layouts/LICENSE} +1 -1
- package/vendor/layouts/client.d.ts +11 -0
- package/vendor/layouts/index.d.mts +86 -0
- package/vendor/layouts/index.mjs +235 -0
- package/vendor/layouts/layoutName-DVkP7Qpo.mjs +82 -0
- package/vendor/layouts/runtime.d.mts +72 -0
- package/vendor/layouts/runtime.mjs +284 -0
- package/vendor/sources.json +46 -0
- package/client/components/builtin/ValaxyMermaid.vue +0 -86
- package/client/modules/mermaid.ts +0 -26
- package/client/setup/mermaid.ts +0 -22
package/dist/node/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
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';
|
|
1
|
+
import { Plugin, UserConfig, InlineConfig, ViteDevServer, PluginOption } from 'vite';
|
|
2
|
+
import { SiteConfig, DefaultTheme, RuntimeConfig, RedirectItem, ValaxyConfig, PartialDeep, ValaxyAddon, UserSiteConfig } from '../types/index.mjs';
|
|
4
3
|
import Vue from '@vitejs/plugin-vue';
|
|
5
4
|
import { Hookable } from 'hookable';
|
|
6
5
|
import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
|
|
@@ -8,19 +7,16 @@ import { presetAttributify, presetIcons, presetTypography, presetWind4 } from 'u
|
|
|
8
7
|
import { VitePluginConfig } from 'unocss/vite';
|
|
9
8
|
import Components from 'unplugin-vue-components/vite';
|
|
10
9
|
import Markdown from 'unplugin-vue-markdown/vite';
|
|
11
|
-
import Layouts from 'vite-plugin-vue-layouts-next';
|
|
12
|
-
import { groupIconVitePlugin } from 'vitepress-plugin-group-icons';
|
|
13
10
|
import { EditableTreeNode } from 'vue-router/unplugin';
|
|
14
11
|
import Router from 'vue-router/vite';
|
|
15
12
|
import { MarkdownEnv } from 'unplugin-vue-markdown/types';
|
|
13
|
+
import { ValaxyDevtoolsAddon } from '@valaxyjs/devtools/plugin';
|
|
16
14
|
import { Argv } from 'yargs';
|
|
17
15
|
import { KatexOptions } from 'katex';
|
|
18
|
-
import
|
|
19
|
-
import anchorPlugin from 'markdown-it-anchor';
|
|
20
|
-
import { Options, MarkdownItAsync } from 'markdown-it-async';
|
|
16
|
+
import { MarkdownExitOptions, MarkdownExit, StateCore, Token } from 'markdown-exit';
|
|
21
17
|
import { ThemeRegistration, BuiltinTheme, LanguageInput, ShikiTransformer, Highlighter } from 'shiki';
|
|
22
18
|
import { Header } from '@valaxyjs/utils';
|
|
23
|
-
export { CreateCliOptions, createCli, registerDevCommand, run, startValaxyDev } from './cli/index.mjs';
|
|
19
|
+
export { CreateCliOptions, createCli, desktopRuntimeVersion, execBuild, registerDevCommand, run, startValaxyDev } from './cli/index.mjs';
|
|
24
20
|
import { Awaitable } from '@antfu/utils';
|
|
25
21
|
import * as defu from 'defu';
|
|
26
22
|
import '@vueuse/integrations/useFuse';
|
|
@@ -30,6 +26,48 @@ import 'vue-router';
|
|
|
30
26
|
import '@vueuse/core';
|
|
31
27
|
import '@unhead/schema-org';
|
|
32
28
|
|
|
29
|
+
//#region src/types.d.ts
|
|
30
|
+
interface Options {
|
|
31
|
+
/**
|
|
32
|
+
* Relative path to the directory to search for layout components.
|
|
33
|
+
* @default 'src/layouts'
|
|
34
|
+
*/
|
|
35
|
+
layoutsDirs: string | string[];
|
|
36
|
+
/**
|
|
37
|
+
* Valid file extensions for layout components.
|
|
38
|
+
* @default ['vue']
|
|
39
|
+
*/
|
|
40
|
+
extensions: string[];
|
|
41
|
+
/**
|
|
42
|
+
* List of path globs to exclude when resolving layouts.
|
|
43
|
+
*/
|
|
44
|
+
exclude: string[];
|
|
45
|
+
/**
|
|
46
|
+
* Normalized layout name/key to use as the default layout
|
|
47
|
+
* (for example, myDefault.vue -> my-default)
|
|
48
|
+
* @default 'default'
|
|
49
|
+
*/
|
|
50
|
+
defaultLayout: string;
|
|
51
|
+
/**
|
|
52
|
+
* Layout name/key to render when a page asks for a layout that does not exist.
|
|
53
|
+
* Defaults to `defaultLayout`.
|
|
54
|
+
*/
|
|
55
|
+
fallbackLayout?: string;
|
|
56
|
+
/**
|
|
57
|
+
* `sync` bundles a layout into the main chunk, `async` lazy-loads it.
|
|
58
|
+
* Defaults to `sync` for `default` (and for every layout under `VITE_SSG`), `async` otherwise.
|
|
59
|
+
*/
|
|
60
|
+
importMode: (name: string) => 'sync' | 'async';
|
|
61
|
+
/**
|
|
62
|
+
* Whether nested routes should inherit the default layout from parent routes.
|
|
63
|
+
* When false, if a child route has its own layout, the parent route won't use the default layout.
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
inheritDefaultLayout: boolean;
|
|
67
|
+
}
|
|
68
|
+
type UserOptions = Partial<Options>;
|
|
69
|
+
declare function Layout(userOptions?: UserOptions): Plugin;
|
|
70
|
+
|
|
33
71
|
interface ValaxyFileInfo {
|
|
34
72
|
/**
|
|
35
73
|
* file path id
|
|
@@ -298,6 +336,17 @@ interface TocPluginOptions {
|
|
|
298
336
|
linkClass?: string;
|
|
299
337
|
}
|
|
300
338
|
|
|
339
|
+
/**
|
|
340
|
+
* The Markdown renderer used by every Valaxy compile path.
|
|
341
|
+
*
|
|
342
|
+
* Keep the concrete parser behind this module so page compilation, excerpts,
|
|
343
|
+
* search, and RSS share the same async rendering semantics.
|
|
344
|
+
*/
|
|
345
|
+
type MarkdownRenderer = MarkdownExit;
|
|
346
|
+
interface MarkdownRendererOptions extends Omit<MarkdownExitOptions, 'highlight'> {
|
|
347
|
+
highlight?: ((str: string, lang: string, attrs: string) => string | Promise<string>) | null;
|
|
348
|
+
}
|
|
349
|
+
|
|
301
350
|
interface BlockItem {
|
|
302
351
|
text?: string;
|
|
303
352
|
icon?: string;
|
|
@@ -319,24 +368,50 @@ type ThemeOptions = ThemeRegistration | BuiltinTheme | {
|
|
|
319
368
|
light: ThemeRegistration | BuiltinTheme;
|
|
320
369
|
dark: ThemeRegistration | BuiltinTheme;
|
|
321
370
|
};
|
|
371
|
+
interface MarkdownAnchorPermalinkOptions {
|
|
372
|
+
class?: string;
|
|
373
|
+
symbol?: string;
|
|
374
|
+
renderHref?: (slug: string, state: StateCore) => string;
|
|
375
|
+
renderAttrs?: (slug: string, state: StateCore) => Record<string, string | number>;
|
|
376
|
+
}
|
|
377
|
+
type MarkdownAnchorPermalinkGenerator = (slug: string, options: MarkdownAnchorPermalinkOptions, state: StateCore, index: number) => void;
|
|
378
|
+
interface MarkdownAnchorOptions {
|
|
379
|
+
level?: number | number[];
|
|
380
|
+
slugify?: (value: string) => string;
|
|
381
|
+
slugifyWithState?: (value: string, state: StateCore) => string;
|
|
382
|
+
getTokensText?: (tokens: Token[]) => string;
|
|
383
|
+
uniqueSlugStartIndex?: number;
|
|
384
|
+
permalink?: MarkdownAnchorPermalinkGenerator;
|
|
385
|
+
callback?: (token: Token, info: {
|
|
386
|
+
slug: string;
|
|
387
|
+
title: string;
|
|
388
|
+
}) => void;
|
|
389
|
+
tabIndex?: number | false;
|
|
390
|
+
}
|
|
322
391
|
/**
|
|
323
392
|
* Extend Markdown options
|
|
324
393
|
* @zh 扩展 Markdown 配置,包含代码高亮、Markdown-it 和插件配置
|
|
325
394
|
*/
|
|
326
|
-
interface MarkdownOptions extends
|
|
395
|
+
interface MarkdownOptions extends MarkdownRendererOptions {
|
|
396
|
+
/**
|
|
397
|
+
* Cache repeated highlighted code blocks (up to 8 MiB per highlighter).
|
|
398
|
+
* Enabled for built-in transforms. Custom codeTransformers/shikiSetup must
|
|
399
|
+
* opt in only when their output depends solely on the code, language and attrs.
|
|
400
|
+
*/
|
|
401
|
+
highlightCache?: boolean;
|
|
327
402
|
/**
|
|
328
403
|
* Setup markdown-it instance before applying plugins
|
|
329
404
|
*/
|
|
330
|
-
preConfig?: (md:
|
|
405
|
+
preConfig?: (md: MarkdownRenderer) => void;
|
|
331
406
|
/**
|
|
332
407
|
* markdown-it options
|
|
333
408
|
*/
|
|
334
|
-
options?:
|
|
409
|
+
options?: MarkdownRenderer['options'];
|
|
335
410
|
/**
|
|
336
411
|
* config markdown-it
|
|
337
412
|
*/
|
|
338
|
-
config?: (md:
|
|
339
|
-
anchor?:
|
|
413
|
+
config?: (md: MarkdownRenderer) => void;
|
|
414
|
+
anchor?: MarkdownAnchorOptions;
|
|
340
415
|
attrs?: {
|
|
341
416
|
leftDelimiter?: string;
|
|
342
417
|
rightDelimiter?: string;
|
|
@@ -519,7 +594,11 @@ interface ContentLoaderContext {
|
|
|
519
594
|
}
|
|
520
595
|
interface ContentLoader {
|
|
521
596
|
name: string;
|
|
597
|
+
/** Validate the complete output before writing; fail production builds on errors. */
|
|
598
|
+
strict?: boolean;
|
|
522
599
|
load: (ctx: ContentLoaderContext) => Promise<ContentItem[]> | ContentItem[];
|
|
600
|
+
/** Publish associated metadata only after content has been validated and written. */
|
|
601
|
+
onLoaded?: (ctx: ContentLoaderContext) => void | Promise<void>;
|
|
523
602
|
/**
|
|
524
603
|
* Polling interval (ms) for dev mode.
|
|
525
604
|
* undefined = no polling
|
|
@@ -644,6 +723,14 @@ interface CdnModule {
|
|
|
644
723
|
*/
|
|
645
724
|
exports?: string[];
|
|
646
725
|
}
|
|
726
|
+
type GroupIconValue = string | {
|
|
727
|
+
dark: string;
|
|
728
|
+
light: string;
|
|
729
|
+
};
|
|
730
|
+
interface GroupIconOptions {
|
|
731
|
+
customIcon?: Record<string, GroupIconValue>;
|
|
732
|
+
defaultLabels?: string[];
|
|
733
|
+
}
|
|
647
734
|
type ValaxyNodeConfig<ThemeConfig = DefaultTheme.Config> = ValaxyConfig<ThemeConfig> & ValaxyExtendConfig;
|
|
648
735
|
type UserValaxyNodeConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyNodeConfig<ThemeConfig>>;
|
|
649
736
|
/**
|
|
@@ -772,7 +859,7 @@ interface ValaxyExtendConfig {
|
|
|
772
859
|
* - `true` (default): all pages render KaTeX, unless `frontmatter.katex: false`
|
|
773
860
|
* - `false`: no pages render KaTeX by default, but individual pages can opt-in via `frontmatter.katex: true`
|
|
774
861
|
*
|
|
775
|
-
* @see [Example | Valaxy](https://valaxy.site/examples/
|
|
862
|
+
* @see [Example | Valaxy](https://valaxy.site/examples/math)
|
|
776
863
|
* @see https://katex.org/
|
|
777
864
|
* @default true
|
|
778
865
|
*/
|
|
@@ -836,7 +923,7 @@ interface ValaxyExtendConfig {
|
|
|
836
923
|
/**
|
|
837
924
|
* @see https://github.com/loicduong/vite-plugin-vue-layouts-next
|
|
838
925
|
*/
|
|
839
|
-
layouts?: Parameters<typeof
|
|
926
|
+
layouts?: Parameters<typeof Layout>[0];
|
|
840
927
|
/**
|
|
841
928
|
* @see https://router.vuejs.org/file-based-routing/
|
|
842
929
|
*/
|
|
@@ -853,7 +940,7 @@ interface ValaxyExtendConfig {
|
|
|
853
940
|
/**
|
|
854
941
|
* @see https://github.com/yuyinws/vitepress-plugin-group-icons
|
|
855
942
|
*/
|
|
856
|
-
groupIcons?:
|
|
943
|
+
groupIcons?: GroupIconOptions;
|
|
857
944
|
/**
|
|
858
945
|
* unocss presets
|
|
859
946
|
* @see https://unocss.dev/guide/presets
|
|
@@ -876,10 +963,19 @@ interface ValaxyExtendConfig {
|
|
|
876
963
|
};
|
|
877
964
|
/**
|
|
878
965
|
* @experimental
|
|
879
|
-
* Enable
|
|
880
|
-
* @see https://devtools
|
|
966
|
+
* Enable Vite DevTools, Valaxy DevTools and Vue DevTools
|
|
967
|
+
* @see https://devtools.vite.dev/
|
|
881
968
|
*/
|
|
882
969
|
devtools?: boolean;
|
|
970
|
+
/**
|
|
971
|
+
* Enable the local, read-only MCP endpoint during development.
|
|
972
|
+
* @zh 开启开发环境的本地只读 MCP 服务,默认关闭。
|
|
973
|
+
* @default false
|
|
974
|
+
*/
|
|
975
|
+
mcp?: boolean | {
|
|
976
|
+
/** Include drafts in MCP results. Password-protected pages remain excluded. */
|
|
977
|
+
includeDrafts?: boolean;
|
|
978
|
+
};
|
|
883
979
|
/**
|
|
884
980
|
* @en config for markdown (include markdown-it plugins)
|
|
885
981
|
* @zh markdown 相关配置
|
|
@@ -966,10 +1062,14 @@ interface ValaxyAddonResolver {
|
|
|
966
1062
|
options: Record<string, any>;
|
|
967
1063
|
configFile?: string;
|
|
968
1064
|
pkg: Record<string, any>;
|
|
1065
|
+
/** Loaded only when development tools are enabled. */
|
|
1066
|
+
devtools?: ValaxyDevtoolsAddon;
|
|
969
1067
|
extendCli?: ValaxyAddonExtendCli;
|
|
970
1068
|
setup?: (node: ValaxyNode) => void;
|
|
971
1069
|
}
|
|
972
1070
|
type ValaxyNodeAddon = ValaxyAddon & {
|
|
1071
|
+
/** Loaded only when development tools are enabled. */
|
|
1072
|
+
devtools?: ValaxyDevtoolsAddon;
|
|
973
1073
|
extendCli?: ValaxyAddonExtendCli;
|
|
974
1074
|
setup?: ValaxyAddonResolver['setup'];
|
|
975
1075
|
};
|
|
@@ -1118,6 +1218,57 @@ declare const customElements: Set<string>;
|
|
|
1118
1218
|
*/
|
|
1119
1219
|
declare const defaultViteConfig: UserConfig;
|
|
1120
1220
|
|
|
1221
|
+
interface ContentDiagnostic {
|
|
1222
|
+
code: string;
|
|
1223
|
+
severity: 'error' | 'warning';
|
|
1224
|
+
message: string;
|
|
1225
|
+
hint: string;
|
|
1226
|
+
line?: number;
|
|
1227
|
+
}
|
|
1228
|
+
interface ContentPageInfo {
|
|
1229
|
+
path: string;
|
|
1230
|
+
/** Routes after configured build-time hooks; runtime router changes are excluded. */
|
|
1231
|
+
routes: {
|
|
1232
|
+
path: string;
|
|
1233
|
+
aliases: string[];
|
|
1234
|
+
previewPath: string;
|
|
1235
|
+
layout: string | false;
|
|
1236
|
+
}[];
|
|
1237
|
+
/** Only public article metadata, never raw configuration or frontmatter. */
|
|
1238
|
+
metadata: Record<string, string | string[] | boolean>;
|
|
1239
|
+
draft: boolean;
|
|
1240
|
+
hidden: boolean;
|
|
1241
|
+
includedInProductionRoutes: boolean;
|
|
1242
|
+
}
|
|
1243
|
+
interface ContentCheckResult {
|
|
1244
|
+
path: string;
|
|
1245
|
+
ok: boolean;
|
|
1246
|
+
page?: ContentPageInfo;
|
|
1247
|
+
diagnostics: ContentDiagnostic[];
|
|
1248
|
+
/** At most 100 diagnostics are returned; this counts all detected diagnostics. */
|
|
1249
|
+
totalDiagnostics: number;
|
|
1250
|
+
}
|
|
1251
|
+
interface ContentServiceOptions {
|
|
1252
|
+
/** Apply the MCP visibility policy. CLI/API callers can inspect their own private files. */
|
|
1253
|
+
publicOnly?: boolean;
|
|
1254
|
+
includeDrafts?: boolean;
|
|
1255
|
+
/** Resolved Vite base, when called from a running development server. */
|
|
1256
|
+
base?: string;
|
|
1257
|
+
/** Resolved Vite public directory; false disables public assets. */
|
|
1258
|
+
publicDir?: string | false;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Inspect Markdown through Valaxy's route pipeline without starting a server.
|
|
1263
|
+
* Configured route/Markdown hooks run as they do during route generation. Scans
|
|
1264
|
+
* are serialized and rebuilt per request so edits and removals are observable.
|
|
1265
|
+
*/
|
|
1266
|
+
declare function createContentService(app: ValaxyNode, settings?: ContentServiceOptions): {
|
|
1267
|
+
inspectPage: (path: string) => Promise<ContentPageInfo>;
|
|
1268
|
+
checkPage: (path: string) => Promise<ContentCheckResult>;
|
|
1269
|
+
dispose: () => Promise<void>;
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1121
1272
|
declare let version: string;
|
|
1122
1273
|
|
|
1123
1274
|
declare const GLOBAL_STATE: {
|
|
@@ -1125,6 +1276,12 @@ declare const GLOBAL_STATE: {
|
|
|
1125
1276
|
server: ViteDevServer | undefined;
|
|
1126
1277
|
};
|
|
1127
1278
|
|
|
1279
|
+
/**
|
|
1280
|
+
* Load content from all loaders and write .md files to cache directory.
|
|
1281
|
+
* Uses digest-based incremental caching to skip unchanged files.
|
|
1282
|
+
*/
|
|
1283
|
+
declare function loadAllContent(loaders: ContentLoader[], ctx: ContentLoaderContext): Promise<void>;
|
|
1284
|
+
|
|
1128
1285
|
/**
|
|
1129
1286
|
* Post process valaxyOptions
|
|
1130
1287
|
* @param valaxyOptions
|
|
@@ -1158,7 +1315,7 @@ declare function createValaxyPlugin(options: ResolvedValaxyOptions, serverOption
|
|
|
1158
1315
|
* with valaxyPrefix
|
|
1159
1316
|
*/
|
|
1160
1317
|
declare function getServerInfoText(msg: string): string;
|
|
1161
|
-
declare function createServer(valaxyApp: ValaxyNode, viteConfig?: InlineConfig, serverOptions?: ValaxyServerOptions): Promise<
|
|
1318
|
+
declare function createServer(valaxyApp: ValaxyNode, viteConfig?: InlineConfig, serverOptions?: ValaxyServerOptions): Promise<ViteDevServer>;
|
|
1162
1319
|
|
|
1163
1320
|
/**
|
|
1164
1321
|
* @see https://github.com/mdn/dom-examples/blob/main/web-crypto/encrypt-decrypt/aes-cbc.js
|
|
@@ -1170,6 +1327,7 @@ declare function encryptContent(content: string, options: {
|
|
|
1170
1327
|
salt: Uint8Array;
|
|
1171
1328
|
}): Promise<string>;
|
|
1172
1329
|
|
|
1330
|
+
/** Read commit timestamps from the file's repository, following renames. */
|
|
1173
1331
|
declare function getGitTimestamp(file: string, type?: 'created' | 'updated'): Promise<number>;
|
|
1174
1332
|
|
|
1175
1333
|
/**
|
|
@@ -1209,5 +1367,5 @@ declare function toAtFS(path: string): string;
|
|
|
1209
1367
|
declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
|
|
1210
1368
|
declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
|
|
1211
1369
|
|
|
1212
|
-
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 };
|
|
1213
|
-
export type { CdnModule, ContentItem, ContentLoader, ContentLoaderContext, 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 };
|
|
1370
|
+
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, loadAllContent, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject, version };
|
|
1371
|
+
export type { CdnModule, ContentCheckResult, ContentDiagnostic, ContentItem, ContentLoader, ContentLoaderContext, ContentPageInfo, ContentServiceOptions, GroupIconOptions, GroupIconValue, HookResult, LoadConfigFromFileOptions, MarkdownRenderer, 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 };
|
package/dist/node/index.mjs
CHANGED
|
@@ -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
|
|
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 loadAllContent, J as loadConfigFromFile, K as mergeValaxyConfig, L as mergeViteConfigs, M as postProcessForSSG, N as processValaxyOptions, O as registerDevCommand, Q as resolveAddonsConfig, R as resolveImportPath, T as resolveImportUrl, U as resolveOptions, W as resolveSiteConfig, X as resolveSiteConfigFromRoot, Y as resolveThemeConfigFromRoot, Z as resolveThemeValaxyConfig, _ as resolveUserThemeConfig, $ as resolveValaxyConfig, a0 as resolveValaxyConfigFromRoot, a1 as run, a2 as ssgBuild, a3 as startValaxyDev, a4 as toAtFS, a5 as transformObject, a6 as version } from '../shared/valaxy.BVZF0N6Q.mjs';
|
|
2
2
|
import 'node:path';
|
|
3
3
|
import 'consola';
|
|
4
4
|
import 'fs-extra';
|
|
@@ -8,8 +8,8 @@ import 'define-config-ts';
|
|
|
8
8
|
import 'yargs';
|
|
9
9
|
import 'yargs/helpers';
|
|
10
10
|
import 'node:os';
|
|
11
|
-
import 'fast-glob';
|
|
12
11
|
import 'gray-matter';
|
|
12
|
+
import 'tinyglobby';
|
|
13
13
|
import 'js-yaml';
|
|
14
14
|
import '@antfu/utils';
|
|
15
15
|
import 'debug';
|
|
@@ -23,23 +23,35 @@ import 'cross-spawn';
|
|
|
23
23
|
import 'mlly';
|
|
24
24
|
import 'resolve-global';
|
|
25
25
|
import '@valaxyjs/utils';
|
|
26
|
+
import 'node:fs';
|
|
26
27
|
import 'node:fs/promises';
|
|
27
28
|
import 'dayjs';
|
|
28
29
|
import 'feed';
|
|
29
|
-
import 'markdown-
|
|
30
|
+
import 'markdown-exit';
|
|
30
31
|
import 'table';
|
|
31
32
|
import 'hookable';
|
|
32
|
-
import '
|
|
33
|
-
import '@intlify/unplugin-vue-i18n/vite';
|
|
34
|
-
import '@unhead/addons/vite';
|
|
35
|
-
import 'unplugin-vue-components/vite';
|
|
36
|
-
import 'vite-plugin-vue-layouts-next';
|
|
33
|
+
import '@unhead/bundler/vite';
|
|
37
34
|
import 'vitepress-plugin-group-icons';
|
|
38
|
-
import '
|
|
35
|
+
import 'local-pkg';
|
|
36
|
+
import 'picomatch';
|
|
37
|
+
import 'chokidar';
|
|
38
|
+
import 'unplugin';
|
|
39
|
+
import 'unplugin-utils';
|
|
40
|
+
import 'obug';
|
|
41
|
+
import 'magic-string';
|
|
39
42
|
import 'node:buffer';
|
|
43
|
+
import 'p-map';
|
|
44
|
+
import '@intlify/shared';
|
|
45
|
+
import '@intlify/bundle-utils';
|
|
46
|
+
import '@rollup/pluginutils';
|
|
47
|
+
import 'vue/compiler-sfc';
|
|
48
|
+
import 'picocolors';
|
|
49
|
+
import '@eslint-community/eslint-utils';
|
|
50
|
+
import '@intlify/vue-i18n-extensions';
|
|
51
|
+
import '@typescript-eslint/scope-manager';
|
|
40
52
|
import 'minisearch';
|
|
41
|
-
import 'markdown-it-async';
|
|
42
53
|
import '@shikijs/transformers';
|
|
54
|
+
import 'lru-cache';
|
|
43
55
|
import 'shiki';
|
|
44
56
|
import 'css-i18n';
|
|
45
57
|
import 'markdown-it-anchor';
|
|
@@ -53,31 +65,29 @@ import 'markdown-it-container';
|
|
|
53
65
|
import 'katex';
|
|
54
66
|
import 'katex/contrib/mhchem';
|
|
55
67
|
import 'unplugin-vue-markdown/vite';
|
|
56
|
-
import 'js-base64';
|
|
57
|
-
import 'lru-cache';
|
|
58
68
|
import 'jiti';
|
|
59
69
|
import 'unocss';
|
|
60
70
|
import 'pascalcase';
|
|
61
71
|
import 'html-to-text';
|
|
62
72
|
import 'vue-router/vite';
|
|
63
|
-
import 'node:child_process';
|
|
64
|
-
import 'node:v8';
|
|
65
73
|
import 'vite-ssg-sitemap';
|
|
66
74
|
import '@unhead/vue/server';
|
|
75
|
+
import 'vue-router/unplugin';
|
|
76
|
+
import 'node:child_process';
|
|
67
77
|
import '@clack/prompts';
|
|
68
78
|
import 'node:net';
|
|
69
79
|
import 'node:readline';
|
|
70
80
|
import 'qrcode';
|
|
71
81
|
import 'ejs';
|
|
72
82
|
|
|
73
|
-
function $t(key) {
|
|
74
|
-
return `$locale:${key}`;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
83
|
function defineUnoSetup(fn) {
|
|
78
84
|
return fn;
|
|
79
85
|
}
|
|
80
86
|
|
|
87
|
+
function $t(key) {
|
|
88
|
+
return `$locale:${key}`;
|
|
89
|
+
}
|
|
90
|
+
|
|
81
91
|
function defineContentLoader(loader) {
|
|
82
92
|
return loader;
|
|
83
93
|
}
|