valaxy 0.27.0 → 0.28.0-beta.2
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/components/AppLink.vue +4 -0
- package/client/components/ClientOnly.ts +12 -0
- package/client/components/ValaxyDynamicComponent.vue +22 -14
- package/client/components/ValaxyLogo.vue +1 -1
- package/client/components/ValaxyOverlay.vue +1 -1
- package/client/composables/codeGroups.ts +3 -3
- package/client/composables/collections.ts +101 -2
- package/client/composables/common.ts +6 -5
- package/client/composables/dark.ts +1 -1
- package/client/composables/features/collapse-code.ts +1 -1
- package/client/composables/features/copy-markdown.ts +85 -0
- package/client/composables/features/index.ts +1 -0
- package/client/composables/outline/anchor.ts +1 -1
- package/client/composables/post/index.ts +104 -2
- package/client/config.ts +4 -2
- package/client/entry-ssr.ts +25 -0
- package/client/layouts/README.md +1 -1
- package/client/locales/en.yml +12 -0
- package/client/locales/zh-CN.yml +12 -0
- package/client/main.ts +122 -24
- package/client/modules/components.ts +2 -2
- package/client/modules/floating-vue.ts +2 -3
- package/client/modules/valaxy.ts +2 -3
- package/client/setup/main.ts +2 -3
- package/client/setups.ts +24 -3
- package/client/styles/common/code.scss +8 -8
- package/client/styles/common/hamburger.scss +2 -2
- package/client/styles/common/markdown.scss +2 -2
- package/client/styles/common/transition.scss +2 -2
- package/client/styles/components/code-group.scss +2 -2
- package/client/styles/components/custom-block.scss +1 -1
- package/client/styles/css-vars.scss +7 -6
- package/client/styles/vars.scss +4 -3
- package/client/tsconfig.json +1 -1
- package/client/types/collection.ts +27 -0
- package/client/types/index.ts +2 -2
- package/client/utils/time.ts +1 -1
- package/dist/node/cli/index.mjs +14 -9
- package/dist/node/index.d.mts +216 -11
- package/dist/node/index.mjs +19 -10
- package/dist/shared/{valaxy.DpV6HHc6.mjs → valaxy.DXqMwOZX.mjs} +4034 -2514
- package/dist/shared/{valaxy._i636HSR.d.mts → valaxy.JIuR8V4d.d.mts} +111 -2
- package/dist/types/index.d.mts +2 -2
- package/index.d.ts +1 -0
- package/package.json +36 -36
- package/shared/node/i18n.ts +15 -1
- package/types/config.ts +74 -0
- package/types/frontmatter/page.ts +6 -1
- package/types/posts.ts +9 -1
package/dist/node/index.d.mts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { ViteSSGOptions } from 'vite-ssg';
|
|
2
2
|
import * as vite from 'vite';
|
|
3
3
|
import { UserConfig, InlineConfig, ViteDevServer, PluginOption, Plugin } from 'vite';
|
|
4
|
-
import { D as DefaultTheme, R as RuntimeConfig, a as RedirectItem, V as ValaxyConfig, P as PartialDeep, b as ValaxyAddon, S as SiteConfig, U as UserSiteConfig } from '../shared/valaxy.
|
|
4
|
+
import { D as DefaultTheme, R as RuntimeConfig, a as RedirectItem, V as ValaxyConfig, P as PartialDeep, b as ValaxyAddon, S as SiteConfig, U as UserSiteConfig } from '../shared/valaxy.JIuR8V4d.mjs';
|
|
5
5
|
import Vue from '@vitejs/plugin-vue';
|
|
6
|
-
import { Options as Options$1 } from 'beasties';
|
|
7
6
|
import { Hookable } from 'hookable';
|
|
8
7
|
import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
|
|
9
8
|
import { presetWind4, presetAttributify, presetIcons, presetTypography } from 'unocss';
|
|
10
9
|
import { VitePluginConfig } from 'unocss/vite';
|
|
11
10
|
import Components from 'unplugin-vue-components/vite';
|
|
12
11
|
import Markdown from 'unplugin-vue-markdown/vite';
|
|
13
|
-
import Layouts from 'vite-plugin-vue-layouts';
|
|
12
|
+
import Layouts from 'vite-plugin-vue-layouts-next';
|
|
14
13
|
import { groupIconVitePlugin } from 'vitepress-plugin-group-icons';
|
|
15
14
|
import { EditableTreeNode } from 'vue-router/unplugin';
|
|
16
15
|
import Router from 'vue-router/vite';
|
|
@@ -403,10 +402,31 @@ interface MarkdownOptions extends Options {
|
|
|
403
402
|
* @see https://katex.org/docs/options.html
|
|
404
403
|
*/
|
|
405
404
|
katex?: KatexOptions;
|
|
405
|
+
/**
|
|
406
|
+
* Options for `markdown-it-mathjax3`
|
|
407
|
+
* @see https://github.com/tani/markdown-it-mathjax3
|
|
408
|
+
*/
|
|
409
|
+
mathjax?: any;
|
|
406
410
|
externalLinks?: Record<string, string>;
|
|
407
411
|
}
|
|
408
412
|
|
|
409
413
|
type HookResult = Promise<void> | void;
|
|
414
|
+
interface MdAfterRenderContext {
|
|
415
|
+
route: EditableTreeNode;
|
|
416
|
+
data: Readonly<Record<string, any>>;
|
|
417
|
+
/**
|
|
418
|
+
* The final excerpt stored in `route.meta.excerpt`.
|
|
419
|
+
* - For `<!-- more -->` or auto-generated excerpts: rendered according to `excerpt_type` (HTML/text/md).
|
|
420
|
+
* - For manual frontmatter `excerpt`: used as-is (raw string, `excerpt_type` does not apply).
|
|
421
|
+
* - Empty string if no excerpt is available.
|
|
422
|
+
*/
|
|
423
|
+
excerpt: string;
|
|
424
|
+
/**
|
|
425
|
+
* Raw markdown content (without frontmatter) from gray-matter.
|
|
426
|
+
*/
|
|
427
|
+
content: string;
|
|
428
|
+
path: string;
|
|
429
|
+
}
|
|
410
430
|
interface ValaxyHooks {
|
|
411
431
|
'options:resolved': () => HookResult;
|
|
412
432
|
'config:init': () => HookResult;
|
|
@@ -415,9 +435,70 @@ interface ValaxyHooks {
|
|
|
415
435
|
*/
|
|
416
436
|
'vue-router:extendRoute': (route: EditableTreeNode) => HookResult;
|
|
417
437
|
'vue-router:beforeWriteFiles': (root: EditableTreeNode) => HookResult;
|
|
438
|
+
/**
|
|
439
|
+
* Called after a markdown page has been loaded and its frontmatter/excerpt resolved.
|
|
440
|
+
* Fires for all `.md` routes (posts, pages, collections, etc.).
|
|
441
|
+
* Provides access to the route, raw markdown content, resolved excerpt, frontmatter data, and file path.
|
|
442
|
+
* Useful for addons that need to inspect or extend page metadata (e.g., auto-generating excerpts).
|
|
443
|
+
* @see valaxy/node/plugins/vueRouter.ts extendRoute
|
|
444
|
+
*/
|
|
445
|
+
'md:afterRender': (ctx: MdAfterRenderContext) => HookResult;
|
|
418
446
|
'build:before': () => HookResult;
|
|
419
447
|
'build:after': () => HookResult;
|
|
448
|
+
/**
|
|
449
|
+
* @experimental
|
|
450
|
+
* Called before content loaders start fetching.
|
|
451
|
+
* @see https://github.com/YunYouJun/valaxy/issues/294
|
|
452
|
+
*/
|
|
453
|
+
'content:before-load': () => HookResult;
|
|
454
|
+
/**
|
|
455
|
+
* @experimental
|
|
456
|
+
* Called after all content loaders have finished and files are written to cache.
|
|
457
|
+
* @see https://github.com/YunYouJun/valaxy/issues/294
|
|
458
|
+
*/
|
|
459
|
+
'content:loaded': () => HookResult;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
interface ContentItem {
|
|
463
|
+
/**
|
|
464
|
+
* Route path relative to pages/, e.g. 'posts/my-post.md'
|
|
465
|
+
* Must end with .md
|
|
466
|
+
*/
|
|
467
|
+
path: string;
|
|
468
|
+
/**
|
|
469
|
+
* Full markdown content including YAML frontmatter block
|
|
470
|
+
*/
|
|
471
|
+
content: string;
|
|
472
|
+
/**
|
|
473
|
+
* Optional digest for incremental caching (skip write if unchanged)
|
|
474
|
+
*/
|
|
475
|
+
digest?: string;
|
|
476
|
+
}
|
|
477
|
+
interface ContentLoaderContext {
|
|
478
|
+
node: ValaxyNode;
|
|
479
|
+
/** .valaxy/content/ */
|
|
480
|
+
cacheDir: string;
|
|
481
|
+
mode: 'dev' | 'build';
|
|
482
|
+
}
|
|
483
|
+
interface ContentLoader {
|
|
484
|
+
name: string;
|
|
485
|
+
load: (ctx: ContentLoaderContext) => Promise<ContentItem[]> | ContentItem[];
|
|
486
|
+
/**
|
|
487
|
+
* Polling interval (ms) for dev mode.
|
|
488
|
+
* undefined = no polling
|
|
489
|
+
*/
|
|
490
|
+
devPollInterval?: number;
|
|
491
|
+
/**
|
|
492
|
+
* Per-item transform before writing to cache
|
|
493
|
+
*/
|
|
494
|
+
transform?: (item: ContentItem) => ContentItem | Promise<ContentItem>;
|
|
420
495
|
}
|
|
496
|
+
/**
|
|
497
|
+
* @experimental
|
|
498
|
+
* Define a content loader for fetching content from external CMS platforms.
|
|
499
|
+
* @see https://github.com/YunYouJun/valaxy/issues/294
|
|
500
|
+
*/
|
|
501
|
+
declare function defineContentLoader(loader: ContentLoader): ContentLoader;
|
|
421
502
|
|
|
422
503
|
interface ValaxyEntryOptions {
|
|
423
504
|
/**
|
|
@@ -493,6 +574,39 @@ interface ResolvedValaxyOptions<ThemeConfig = DefaultTheme.Config> {
|
|
|
493
574
|
};
|
|
494
575
|
}
|
|
495
576
|
|
|
577
|
+
/**
|
|
578
|
+
* @experimental
|
|
579
|
+
* A module to load from CDN instead of bundling
|
|
580
|
+
*/
|
|
581
|
+
interface CdnModule {
|
|
582
|
+
/**
|
|
583
|
+
* npm package name to externalize
|
|
584
|
+
* @example 'vue'
|
|
585
|
+
*/
|
|
586
|
+
name: string;
|
|
587
|
+
/**
|
|
588
|
+
* Global variable name the library exposes on `window`
|
|
589
|
+
* Used for mapping imports to `window[global]`
|
|
590
|
+
* @example 'Vue'
|
|
591
|
+
*/
|
|
592
|
+
global: string;
|
|
593
|
+
/**
|
|
594
|
+
* Full CDN URL to the UMD/IIFE script
|
|
595
|
+
* @example 'https://cdn.jsdelivr.net/npm/vue@3.5.0/dist/vue.global.prod.js'
|
|
596
|
+
*/
|
|
597
|
+
url: string;
|
|
598
|
+
/**
|
|
599
|
+
* Optional CSS URL if the module requires stylesheet
|
|
600
|
+
* @example 'https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css'
|
|
601
|
+
*/
|
|
602
|
+
css?: string;
|
|
603
|
+
/**
|
|
604
|
+
* Named exports to re-export from the global variable.
|
|
605
|
+
* Required for libraries that use named exports (e.g., `import { ref } from 'vue'`).
|
|
606
|
+
* @example ['ref', 'computed', 'watch', 'createApp']
|
|
607
|
+
*/
|
|
608
|
+
exports?: string[];
|
|
609
|
+
}
|
|
496
610
|
type ValaxyNodeConfig<ThemeConfig = DefaultTheme.Config> = ValaxyConfig<ThemeConfig> & ValaxyExtendConfig;
|
|
497
611
|
type UserValaxyNodeConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyNodeConfig<ThemeConfig>>;
|
|
498
612
|
/**
|
|
@@ -531,6 +645,34 @@ interface ValaxyExtendConfig {
|
|
|
531
645
|
* @default false
|
|
532
646
|
*/
|
|
533
647
|
ssgForPagination: boolean;
|
|
648
|
+
/**
|
|
649
|
+
* @en FOUC (Flash of Unstyled Content) guard configuration.
|
|
650
|
+
* Prevents layout shift on first paint by hiding the page body until
|
|
651
|
+
* full CSS is loaded. Uses `body { opacity: 0 }` inline, then the
|
|
652
|
+
* main stylesheet sets `body { opacity: 1 }` to reveal content.
|
|
653
|
+
*
|
|
654
|
+
* @zh FOUC(无样式内容闪烁)防护配置。
|
|
655
|
+
* 通过在完整 CSS 加载前隐藏页面内容来防止首屏样式闪烁。
|
|
656
|
+
* 内联 `body { opacity: 0 }`,完整 CSS 加载后通过 `body { opacity: 1 }` 解锁显示。
|
|
657
|
+
*/
|
|
658
|
+
foucGuard?: {
|
|
659
|
+
/**
|
|
660
|
+
* @en Enable FOUC guard. When disabled, no opacity hiding or fallback
|
|
661
|
+
* scripts will be injected.
|
|
662
|
+
* @zh 是否启用 FOUC 防护。禁用后不会注入 opacity 隐藏及兜底脚本。
|
|
663
|
+
* @default true
|
|
664
|
+
*/
|
|
665
|
+
enabled?: boolean;
|
|
666
|
+
/**
|
|
667
|
+
* @en Maximum wait time (ms) before force-showing the page, as a safety
|
|
668
|
+
* fallback in case CSS fails to load. Set to `0` to disable the timeout
|
|
669
|
+
* fallback (only `window.onload` will trigger reveal).
|
|
670
|
+
* @zh 最大等待时间(毫秒),作为 CSS 加载失败时的安全兜底。
|
|
671
|
+
* 设置为 `0` 可禁用超时兜底(仅依赖 `window.onload` 触发显示)。
|
|
672
|
+
* @default 5000
|
|
673
|
+
*/
|
|
674
|
+
maxDuration?: number;
|
|
675
|
+
};
|
|
534
676
|
};
|
|
535
677
|
/**
|
|
536
678
|
* @experimental
|
|
@@ -572,12 +714,30 @@ interface ValaxyExtendConfig {
|
|
|
572
714
|
features: {
|
|
573
715
|
/**
|
|
574
716
|
* enable katex for global
|
|
717
|
+
*
|
|
718
|
+
* - `true` (default): all pages render KaTeX, unless `frontmatter.katex: false`
|
|
719
|
+
* - `false`: no pages render KaTeX by default, but individual pages can opt-in via `frontmatter.katex: true`
|
|
720
|
+
*
|
|
575
721
|
* @see [Example | Valaxy](https://valaxy.site/examples/katex)
|
|
576
722
|
* @see https://katex.org/
|
|
577
723
|
* @default true
|
|
578
724
|
*/
|
|
579
725
|
katex: boolean;
|
|
580
726
|
};
|
|
727
|
+
/**
|
|
728
|
+
* Enable MathJax3 math rendering (aligned with VitePress `markdown.math`).
|
|
729
|
+
*
|
|
730
|
+
* When enabled, MathJax3 will be used via `markdown-it-mathjax3` to render
|
|
731
|
+
* math formulas as self-contained SVG — no external CSS or fonts required.
|
|
732
|
+
*
|
|
733
|
+
* - `features.katex` and `math` are **mutually exclusive**.
|
|
734
|
+
* - When `math` is enabled, `features.katex` is automatically ignored.
|
|
735
|
+
* - `math` requires installing `markdown-it-mathjax3`: `pnpm add markdown-it-mathjax3`
|
|
736
|
+
*
|
|
737
|
+
* @see https://www.mathjax.org/
|
|
738
|
+
* @default false
|
|
739
|
+
*/
|
|
740
|
+
math: boolean;
|
|
581
741
|
/**
|
|
582
742
|
* vite.config.ts options
|
|
583
743
|
* @see https://vite.dev/
|
|
@@ -614,11 +774,11 @@ interface ValaxyExtendConfig {
|
|
|
614
774
|
*/
|
|
615
775
|
components?: Parameters<typeof Components>[0];
|
|
616
776
|
/**
|
|
617
|
-
* @see https://github.com/
|
|
777
|
+
* @see https://github.com/loicduong/vite-plugin-vue-layouts-next
|
|
618
778
|
*/
|
|
619
779
|
layouts?: Parameters<typeof Layouts>[0];
|
|
620
780
|
/**
|
|
621
|
-
* @see https://
|
|
781
|
+
* @see https://router.vuejs.org/file-based-routing/
|
|
622
782
|
*/
|
|
623
783
|
router?: Parameters<typeof Router>[0];
|
|
624
784
|
/**
|
|
@@ -707,10 +867,27 @@ interface ValaxyExtendConfig {
|
|
|
707
867
|
*/
|
|
708
868
|
hooks?: Partial<ValaxyHooks>;
|
|
709
869
|
/**
|
|
710
|
-
*
|
|
711
|
-
*
|
|
870
|
+
* @experimental
|
|
871
|
+
* CDN externals configuration.
|
|
872
|
+
* Specify modules to load from CDN instead of bundling them.
|
|
873
|
+
* Only takes effect during `valaxy build`, not in dev mode.
|
|
874
|
+
* @see https://github.com/YunYouJun/valaxy/issues/604
|
|
875
|
+
*/
|
|
876
|
+
cdn?: {
|
|
877
|
+
/**
|
|
878
|
+
* Modules to load from CDN instead of bundling
|
|
879
|
+
* @default []
|
|
880
|
+
*/
|
|
881
|
+
modules?: CdnModule[];
|
|
882
|
+
};
|
|
883
|
+
/**
|
|
884
|
+
* @experimental
|
|
885
|
+
* Content loaders for fetching content from external CMS platforms.
|
|
886
|
+
* Loaded content is written as .md files to `.valaxy/content/pages/`
|
|
887
|
+
* and automatically integrated into the routing and markdown pipeline.
|
|
888
|
+
* @see https://github.com/YunYouJun/valaxy/issues/294
|
|
712
889
|
*/
|
|
713
|
-
|
|
890
|
+
loaders?: ContentLoader[];
|
|
714
891
|
}
|
|
715
892
|
type ValaxyApp = ReturnType<typeof createValaxyNode>;
|
|
716
893
|
|
|
@@ -730,8 +907,22 @@ type ValaxyAddons = (ValaxyAddon | string)[] | Record<string, ValaxyAddonLike>;
|
|
|
730
907
|
type ValaxyAddonFn<ThemeConfig = DefaultTheme.Config> = (addonOptions: ValaxyAddonResolver, valaxyOptions: ResolvedValaxyOptions<ThemeConfig>) => ValaxyNodeConfig | Promise<ValaxyNodeConfig>;
|
|
731
908
|
type ValaxyAddonExport<ThemeConfig = DefaultTheme.Config> = ValaxyNodeConfig<ThemeConfig> | ValaxyAddonFn<ThemeConfig>;
|
|
732
909
|
|
|
910
|
+
interface ValaxySSGOptions {
|
|
911
|
+
concurrency?: number;
|
|
912
|
+
onBeforePageRender?: (route: string, html: string) => Promise<string | void> | string | void;
|
|
913
|
+
onPageRendered?: (route: string, html: string) => Promise<string | void> | string | void;
|
|
914
|
+
onFinished?: () => Promise<void> | void;
|
|
915
|
+
includedRoutes?: (paths: string[], routes: any[]) => string[] | Promise<string[]>;
|
|
916
|
+
includeAllRoutes?: boolean;
|
|
917
|
+
}
|
|
918
|
+
declare function ssgBuild(valaxyApp: ValaxyNode, viteConfig?: InlineConfig, userSsgOptions?: ValaxySSGOptions): Promise<void>;
|
|
919
|
+
|
|
733
920
|
declare function build(valaxyApp: ValaxyNode, viteConfig?: InlineConfig): Promise<void>;
|
|
734
|
-
|
|
921
|
+
/**
|
|
922
|
+
* Legacy SSG build using vite-ssg (JSDOM-based).
|
|
923
|
+
* Kept as fallback for `--ssg-engine vite-ssg`.
|
|
924
|
+
*/
|
|
925
|
+
declare function ssgBuildLegacy(valaxyApp: ValaxyNode, viteConfig?: InlineConfig): Promise<void>;
|
|
735
926
|
/**
|
|
736
927
|
* post process for ssg fix extra string like `/html>` `ml>` `l>`
|
|
737
928
|
* handle tasks after ssg build
|
|
@@ -813,6 +1004,20 @@ declare function defineValaxyTheme<ThemeConfig = DefaultTheme.Config>(theme: Val
|
|
|
813
1004
|
declare const defineTheme: typeof defineValaxyTheme;
|
|
814
1005
|
|
|
815
1006
|
declare const defaultValaxyConfig: ValaxyNodeConfig;
|
|
1007
|
+
/**
|
|
1008
|
+
* Whether MathJax is enabled (takes priority over KaTeX).
|
|
1009
|
+
*/
|
|
1010
|
+
declare function isMathJaxEnabled(config?: ValaxyNodeConfig | null): boolean;
|
|
1011
|
+
/**
|
|
1012
|
+
* Whether KaTeX is enabled (disabled when MathJax is active).
|
|
1013
|
+
*/
|
|
1014
|
+
declare function isKatexEnabled(config?: ValaxyNodeConfig | null): boolean;
|
|
1015
|
+
/**
|
|
1016
|
+
* Whether the KaTeX markdown-it plugin should be registered.
|
|
1017
|
+
* Always true unless MathJax is active, so that per-page `frontmatter.katex: true`
|
|
1018
|
+
* can work even when `features.katex` is globally `false`.
|
|
1019
|
+
*/
|
|
1020
|
+
declare function isKatexPluginNeeded(config?: ValaxyNodeConfig | null): boolean;
|
|
816
1021
|
/**
|
|
817
1022
|
* Type helper for valaxy.config.ts
|
|
818
1023
|
*/
|
|
@@ -946,5 +1151,5 @@ declare function toAtFS(path: string): string;
|
|
|
946
1151
|
declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
|
|
947
1152
|
declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
|
|
948
1153
|
|
|
949
|
-
export { $t, ALL_ROUTE, EXCERPT_SEPARATOR, GLOBAL_STATE, PATHNAME_PROTOCOL_RE, ViteValaxyPlugins, build, createServer, createValaxyPlugin, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, encryptContent, generateClientRedirects, getGitTimestamp, getIndexHtml, getServerInfoText, isExternal, isInstalledGlobally, isPath, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject, version };
|
|
950
|
-
export type { HookResult, LoadConfigFromFileOptions, ResolvedConfig, ResolvedValaxyOptions, UnoSetup, UserInputConfig, UserValaxyNodeConfig, ValaxyAddonExport, ValaxyAddonFn, ValaxyAddonLike, ValaxyAddonResolver, ValaxyAddons, ValaxyApp, ValaxyConfigExport, ValaxyConfigExtendKey, ValaxyConfigFn, ValaxyEntryOptions, ValaxyExtendConfig, ValaxyHooks, ValaxyNode, ValaxyNodeConfig, ValaxyPickConfig, ValaxyServerOptions, ValaxyTheme };
|
|
1154
|
+
export { $t, ALL_ROUTE, EXCERPT_SEPARATOR, GLOBAL_STATE, PATHNAME_PROTOCOL_RE, ViteValaxyPlugins, build, 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, ssgBuildLegacy, toAtFS, transformObject, version };
|
|
1155
|
+
export type { CdnModule, ContentItem, ContentLoader, ContentLoaderContext, HookResult, LoadConfigFromFileOptions, MdAfterRenderContext, ResolvedConfig, ResolvedValaxyOptions, UnoSetup, UserInputConfig, UserValaxyNodeConfig, ValaxyAddonExport, ValaxyAddonFn, ValaxyAddonLike, ValaxyAddonResolver, ValaxyAddons, ValaxyApp, ValaxyConfigExport, ValaxyConfigExtendKey, ValaxyConfigFn, ValaxyEntryOptions, ValaxyExtendConfig, ValaxyHooks, ValaxyNode, 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, V as ViteValaxyPlugins, b as build, c as cli, a as createServer, d as createValaxyPlugin, e as customElements, f as defaultSiteConfig, g as defaultValaxyConfig, h as defaultViteConfig, i as defineAddon, j as defineConfig, k as defineSiteConfig, l as defineTheme, m as defineValaxyAddon, n as defineValaxyConfig, o as defineValaxyTheme, p as encryptContent, q as generateClientRedirects, r as getGitTimestamp, s as getIndexHtml, t as getServerInfoText, u as isExternal, v as isInstalledGlobally, w as
|
|
1
|
+
export { A as ALL_ROUTE, E as EXCERPT_SEPARATOR, G as GLOBAL_STATE, P as PATHNAME_PROTOCOL_RE, V as ViteValaxyPlugins, b as build, c as cli, a as createServer, d as createValaxyPlugin, e as customElements, f as defaultSiteConfig, g as defaultValaxyConfig, h as defaultViteConfig, i as defineAddon, j as defineConfig, k as defineSiteConfig, l as defineTheme, m as defineValaxyAddon, n as defineValaxyConfig, o as defineValaxyTheme, p as encryptContent, q as generateClientRedirects, r as getGitTimestamp, s as getIndexHtml, t as getServerInfoText, u as isExternal, v as isInstalledGlobally, w as isKatexEnabled, x as isKatexPluginNeeded, y as isMathJaxEnabled, z as isPath, B as loadConfigFromFile, C as mergeValaxyConfig, D as mergeViteConfigs, F as postProcessForSSG, H as processValaxyOptions, I as registerDevCommand, J as resolveAddonsConfig, K as resolveImportPath, L as resolveImportUrl, M as resolveOptions, N as resolveSiteConfig, O as resolveSiteConfigFromRoot, Q as resolveThemeConfigFromRoot, R as resolveThemeValaxyConfig, S as resolveUserThemeConfig, T as resolveValaxyConfig, U as resolveValaxyConfigFromRoot, W as run, X as ssgBuild, Y as ssgBuildLegacy, Z as startValaxyDev, _ as toAtFS, $ as transformObject, a0 as version } from '../shared/valaxy.DXqMwOZX.mjs';
|
|
2
2
|
import 'node:path';
|
|
3
3
|
import 'fs-extra';
|
|
4
4
|
import 'consola/utils';
|
|
@@ -29,13 +29,9 @@ import 'feed';
|
|
|
29
29
|
import 'markdown-it';
|
|
30
30
|
import 'table';
|
|
31
31
|
import 'hookable';
|
|
32
|
+
import 'node:child_process';
|
|
33
|
+
import 'node:v8';
|
|
32
34
|
import 'vite-ssg-sitemap';
|
|
33
|
-
import 'vite-ssg/node';
|
|
34
|
-
import '@intlify/unplugin-vue-i18n/vite';
|
|
35
|
-
import '@unhead/addons/vite';
|
|
36
|
-
import 'unplugin-vue-components/vite';
|
|
37
|
-
import 'vite-plugin-vue-layouts';
|
|
38
|
-
import 'vitepress-plugin-group-icons';
|
|
39
35
|
import 'markdown-it-async';
|
|
40
36
|
import '@shikijs/transformers';
|
|
41
37
|
import 'shiki';
|
|
@@ -46,21 +42,30 @@ import 'markdown-it-emoji';
|
|
|
46
42
|
import 'markdown-it-footnote';
|
|
47
43
|
import 'markdown-it-image-figures';
|
|
48
44
|
import 'markdown-it-task-lists';
|
|
45
|
+
import 'vitepress-plugin-group-icons';
|
|
49
46
|
import 'node:url';
|
|
50
47
|
import 'markdown-it-container';
|
|
51
48
|
import 'katex';
|
|
49
|
+
import 'katex/contrib/mhchem';
|
|
52
50
|
import 'unplugin-vue-markdown/vite';
|
|
53
51
|
import 'js-base64';
|
|
52
|
+
import '@intlify/unplugin-vue-i18n/vite';
|
|
53
|
+
import '@unhead/addons/vite';
|
|
54
|
+
import 'unplugin-vue-components/vite';
|
|
55
|
+
import 'vite-plugin-vue-layouts-next';
|
|
56
|
+
import 'p-map';
|
|
57
|
+
import 'node:buffer';
|
|
58
|
+
import 'minisearch';
|
|
59
|
+
import 'lru-cache';
|
|
54
60
|
import 'node:fs';
|
|
55
61
|
import 'jiti';
|
|
56
62
|
import 'unocss';
|
|
57
63
|
import 'pascalcase';
|
|
58
|
-
import 'lru-cache';
|
|
59
64
|
import 'html-to-text';
|
|
60
65
|
import 'vue-router/vite';
|
|
66
|
+
import '@unhead/vue/server';
|
|
61
67
|
import '@clack/prompts';
|
|
62
68
|
import 'node:net';
|
|
63
|
-
import 'node:child_process';
|
|
64
69
|
import 'node:readline';
|
|
65
70
|
import 'qrcode';
|
|
66
71
|
import 'ejs';
|
|
@@ -73,4 +78,8 @@ function defineUnoSetup(fn) {
|
|
|
73
78
|
return fn;
|
|
74
79
|
}
|
|
75
80
|
|
|
76
|
-
|
|
81
|
+
function defineContentLoader(loader) {
|
|
82
|
+
return loader;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { $t, defineContentLoader, defineUnoSetup };
|