valaxy 0.28.10 → 0.28.11

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,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import type { Post } from 'valaxy'
3
- import { onContentUpdated, runContentUpdated, useAplayer, useCodePen, useCollapseCode, useCopyCode, useMediumZoom, wrapTable } from 'valaxy'
3
+ import { onContentUpdated, runContentUpdated, useCodePen, useCollapseCode, useCopyCode, useMediumZoom, wrapTable } from 'valaxy'
4
4
  import { onMounted, onUpdated, ref } from 'vue'
5
5
  import { useI18n } from 'vue-i18n'
6
6
  import { useCodeGroups } from '../composables/codeGroups'
@@ -27,9 +27,6 @@ onUpdated(() => {
27
27
  })
28
28
 
29
29
  // widgets
30
- if (props.frontmatter.aplayer)
31
- useAplayer()
32
-
33
30
  if (props.frontmatter.codepen)
34
31
  useCodePen()
35
32
 
@@ -1,3 +1,2 @@
1
- export * from './aplayer'
2
1
  export * from './backToTop'
3
2
  export * from './codepen'
package/client/main.ts CHANGED
@@ -166,11 +166,3 @@ if (!import.meta.env.SSR) {
166
166
  app.mount('#app', hydrate)
167
167
  })()
168
168
  }
169
-
170
- /**
171
- * Legacy compatibility export for vite-ssg.
172
- * vite-ssg expects `createApp(routePath)` returning `{ app, router, ... }`.
173
- * This wraps `createValaxyApp` to match that signature so
174
- * `--ssg-engine vite-ssg` continues to work.
175
- */
176
- export const createApp = (routePath?: string) => createValaxyApp({ routePath })
@@ -1,7 +1,7 @@
1
1
  import 'node:process';
2
2
  import 'yargs';
3
3
  import 'yargs/helpers';
4
- export { c as cli, J as registerDevCommand, X as run, _ as startValaxyDev } from '../../shared/valaxy.DbAZGdnY.mjs';
4
+ export { c as cli, I as registerDevCommand, W as run, Y as startValaxyDev } from '../../shared/valaxy.DeExWA-9.mjs';
5
5
  import 'node:os';
6
6
  import 'node:path';
7
7
  import 'consola';
@@ -30,9 +30,14 @@ import 'markdown-it';
30
30
  import 'table';
31
31
  import 'hookable';
32
32
  import 'node:fs';
33
- import 'node:child_process';
34
- import 'node:v8';
35
- import 'vite-ssg-sitemap';
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';
37
+ import 'vitepress-plugin-group-icons';
38
+ import 'p-map';
39
+ import 'node:buffer';
40
+ import 'minisearch';
36
41
  import 'markdown-it-async';
37
42
  import '@shikijs/transformers';
38
43
  import 'shiki';
@@ -43,26 +48,21 @@ import 'markdown-it-emoji';
43
48
  import 'markdown-it-footnote';
44
49
  import 'markdown-it-image-figures';
45
50
  import 'markdown-it-task-lists';
46
- import 'vitepress-plugin-group-icons';
47
51
  import 'node:url';
48
52
  import 'markdown-it-container';
49
53
  import 'katex';
50
54
  import 'katex/contrib/mhchem';
51
55
  import 'unplugin-vue-markdown/vite';
52
56
  import 'js-base64';
53
- import '@intlify/unplugin-vue-i18n/vite';
54
- import '@unhead/addons/vite';
55
- import 'unplugin-vue-components/vite';
56
- import 'vite-plugin-vue-layouts-next';
57
- import 'p-map';
58
- import 'node:buffer';
59
- import 'minisearch';
60
57
  import 'lru-cache';
61
58
  import 'jiti';
62
59
  import 'unocss';
63
60
  import 'pascalcase';
64
61
  import 'html-to-text';
65
62
  import 'vue-router/vite';
63
+ import 'node:child_process';
64
+ import 'node:v8';
65
+ import 'vite-ssg-sitemap';
66
66
  import '@unhead/vue/server';
67
67
  import '@clack/prompts';
68
68
  import 'node:net';
@@ -1,11 +1,10 @@
1
- import { ViteSSGOptions } from 'vite-ssg';
2
1
  import * as vite from 'vite';
3
2
  import { UserConfig, InlineConfig, ViteDevServer, PluginOption, Plugin } from 'vite';
4
- 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.D8f6owDk.mjs';
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.-usflxeS.mjs';
5
4
  import Vue from '@vitejs/plugin-vue';
6
5
  import { Hookable } from 'hookable';
7
6
  import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
8
- import { presetWind4, presetAttributify, presetIcons, presetTypography } from 'unocss';
7
+ import { presetAttributify, presetIcons, presetTypography, presetWind4 } from 'unocss';
9
8
  import { VitePluginConfig } from 'unocss/vite';
10
9
  import Components from 'unplugin-vue-components/vite';
11
10
  import Markdown from 'unplugin-vue-markdown/vite';
@@ -31,12 +30,6 @@ import '@vueuse/core';
31
30
  import '@unhead/schema-org';
32
31
  import 'yargs';
33
32
 
34
- declare module 'vite' {
35
- interface UserConfig {
36
- ssgOptions?: ViteSSGOptions;
37
- }
38
- }
39
-
40
33
  /**
41
34
  * Valaxy Node Instance
42
35
  * @param options
@@ -629,13 +622,6 @@ interface ValaxyNode {
629
622
  options: ResolvedValaxyOptions;
630
623
  }
631
624
  interface ValaxyExtendConfig {
632
- /**
633
- * Don't fail builds due to dead links.
634
- *
635
- * @default false
636
- * @deprecated use `build.ignoreDeadLinks` instead
637
- */
638
- ignoreDeadLinks?: boolean | 'localhostLinks' | (string | RegExp | ((link: string) => boolean))[];
639
625
  /**
640
626
  * options for `valaxy build`
641
627
  */
@@ -653,27 +639,6 @@ interface ValaxyExtendConfig {
653
639
  * @default false
654
640
  */
655
641
  ssgForPagination: boolean;
656
- /**
657
- * SSG (Static Site Generation) configuration.
658
- */
659
- ssg?: {
660
- /**
661
- * @en SSG engine to use.
662
- * - `'valaxy'`: Built-in engine, no JSDOM dependency. (recommended)
663
- * - `'vite-ssg'`: Legacy engine based on vite-ssg / JSDOM.
664
- *
665
- * Can be overridden by CLI flag `--ssg-engine`.
666
- *
667
- * @zh 使用的 SSG 引擎。
668
- * - `'valaxy'`:内置引擎,无 JSDOM 依赖。(推荐)
669
- * - `'vite-ssg'`:基于 vite-ssg / JSDOM 的旧版引擎。
670
- *
671
- * 可通过 CLI 参数 `--ssg-engine` 覆盖。
672
- *
673
- * @default 'valaxy'
674
- */
675
- engine?: 'valaxy' | 'vite-ssg';
676
- };
677
642
  /**
678
643
  * @en FOUC (Flash of Unstyled Content) guard configuration.
679
644
  * Prevents layout shift on first paint by hiding the page body until
@@ -858,10 +823,6 @@ interface ValaxyExtendConfig {
858
823
  * @see https://unocss.dev/guide/presets
859
824
  */
860
825
  unocssPresets?: {
861
- /**
862
- * @deprecated use wind4 instead
863
- */
864
- uno?: Parameters<typeof presetWind4>[0];
865
826
  attributify?: Parameters<typeof presetAttributify>[0];
866
827
  icons?: Parameters<typeof presetIcons>[0];
867
828
  typography?: Parameters<typeof presetTypography>[0];
@@ -976,24 +937,15 @@ interface ValaxySSGOptions {
976
937
  }
977
938
  declare function ssgBuild(valaxyApp: ValaxyNode, viteConfig?: InlineConfig, userSsgOptions?: ValaxySSGOptions): Promise<void>;
978
939
 
940
+ declare module 'vite' {
941
+ interface UserConfig {
942
+ ssgOptions?: ValaxySSGOptions;
943
+ }
944
+ }
945
+
979
946
  declare function build(valaxyApp: ValaxyNode, viteConfig?: InlineConfig): Promise<void>;
980
947
  /**
981
- * Legacy SSG build using vite-ssg (JSDOM-based).
982
- * Kept as fallback for `--ssg-engine vite-ssg`.
983
- */
984
- declare function ssgBuildLegacy(valaxyApp: ValaxyNode, viteConfig?: InlineConfig): Promise<void>;
985
- /**
986
- * Fix corrupted HTML produced by vite-ssg's JSDOM serialization under memory
987
- * pressure. JSDOM.serialize() can emit truncated trailing fragments
988
- * (e.g. `/html>`, `ml>`, `l>`) when heap is constrained during
989
- * high-concurrency renders.
990
- *
991
- * Only needed for the legacy vite-ssg engine; the built-in Valaxy SSG
992
- * engine uses pure string rendering and is not affected.
993
- */
994
- declare function fixViteSsgHtml(options: ResolvedValaxyOptions): Promise<void>;
995
- /**
996
- * Shared post-processing after SSG build (both engines).
948
+ * Shared post-processing after the SSG build.
997
949
  */
998
950
  declare function postProcessForSSG(options: ResolvedValaxyOptions): Promise<void>;
999
951
  declare function generateClientRedirects(options: ResolvedValaxyOptions): Promise<void>;
@@ -1209,5 +1161,5 @@ declare function toAtFS(path: string): string;
1209
1161
  declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
1210
1162
  declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
1211
1163
 
1212
- 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, fixViteSsgHtml, 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 };
1164
+ 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, toAtFS, transformObject, version };
1213
1165
  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 };
@@ -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 fixViteSsgHtml, 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, S as resolveThemeValaxyConfig, T as resolveUserThemeConfig, U as resolveValaxyConfig, W as resolveValaxyConfigFromRoot, X as run, Y as ssgBuild, Z as ssgBuildLegacy, _ as startValaxyDev, $ as toAtFS, a0 as transformObject, a1 as version } from '../shared/valaxy.DbAZGdnY.mjs';
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 startValaxyDev, Z as toAtFS, _ as transformObject, $ as version } from '../shared/valaxy.DeExWA-9.mjs';
2
2
  import 'node:path';
3
3
  import 'consola';
4
4
  import 'fs-extra';
@@ -30,9 +30,14 @@ import 'markdown-it';
30
30
  import 'table';
31
31
  import 'hookable';
32
32
  import 'node:fs';
33
- import 'node:child_process';
34
- import 'node:v8';
35
- import 'vite-ssg-sitemap';
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';
37
+ import 'vitepress-plugin-group-icons';
38
+ import 'p-map';
39
+ import 'node:buffer';
40
+ import 'minisearch';
36
41
  import 'markdown-it-async';
37
42
  import '@shikijs/transformers';
38
43
  import 'shiki';
@@ -43,26 +48,21 @@ import 'markdown-it-emoji';
43
48
  import 'markdown-it-footnote';
44
49
  import 'markdown-it-image-figures';
45
50
  import 'markdown-it-task-lists';
46
- import 'vitepress-plugin-group-icons';
47
51
  import 'node:url';
48
52
  import 'markdown-it-container';
49
53
  import 'katex';
50
54
  import 'katex/contrib/mhchem';
51
55
  import 'unplugin-vue-markdown/vite';
52
56
  import 'js-base64';
53
- import '@intlify/unplugin-vue-i18n/vite';
54
- import '@unhead/addons/vite';
55
- import 'unplugin-vue-components/vite';
56
- import 'vite-plugin-vue-layouts-next';
57
- import 'p-map';
58
- import 'node:buffer';
59
- import 'minisearch';
60
57
  import 'lru-cache';
61
58
  import 'jiti';
62
59
  import 'unocss';
63
60
  import 'pascalcase';
64
61
  import 'html-to-text';
65
62
  import 'vue-router/vite';
63
+ import 'node:child_process';
64
+ import 'node:v8';
65
+ import 'vite-ssg-sitemap';
66
66
  import '@unhead/vue/server';
67
67
  import '@clack/prompts';
68
68
  import 'node:net';
@@ -210,11 +210,6 @@ interface PageFrontMatter extends BaseFrontMatter {
210
210
  * @description 标题前的图标
211
211
  */
212
212
  icon: string;
213
- /**
214
- * title color
215
- * @deprecated Please use `pageTitleClass` | `postTitleClass` instead
216
- */
217
- color: string;
218
213
  /**
219
214
  * display comment
220
215
  */