valaxy 0.17.1 → 0.17.3

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 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4GHJCKV2cjs = require('../../chunk-4GHJCKV2.cjs');require('../../chunk-TEOGEXZQ.cjs');exports.cli = _chunk4GHJCKV2cjs.M; exports.run = _chunk4GHJCKV2cjs.N;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkT4SN3XT6cjs = require('../../chunk-T4SN3XT6.cjs');require('../../chunk-FNMRWIFM.cjs');exports.cli = _chunkT4SN3XT6cjs.M; exports.run = _chunkT4SN3XT6cjs.N;
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{M as a,N as b}from"../../chunk-GRG2TP6T.mjs";import"../../chunk-ZO24WTQL.mjs";export{a as cli,b as run};
2
+ import{M as a,N as b}from"../../chunk-HZ4FMCTT.mjs";import"../../chunk-R4WV6S3O.mjs";export{a as cli,b as run};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4GHJCKV2cjs = require('../chunk-4GHJCKV2.cjs');require('../chunk-TEOGEXZQ.cjs');exports.build = _chunk4GHJCKV2cjs.H; exports.cli = _chunk4GHJCKV2cjs.M; exports.createServer = _chunk4GHJCKV2cjs.L; exports.defaultSiteConfig = _chunk4GHJCKV2cjs.k; exports.defaultValaxyConfig = _chunk4GHJCKV2cjs.o; exports.defineAddon = _chunk4GHJCKV2cjs.v; exports.defineConfig = _chunk4GHJCKV2cjs.q; exports.defineSiteConfig = _chunk4GHJCKV2cjs.l; exports.defineTheme = _chunk4GHJCKV2cjs.A; exports.defineUnoSetup = _chunk4GHJCKV2cjs.B; exports.defineValaxyAddon = _chunk4GHJCKV2cjs.u; exports.defineValaxyConfig = _chunk4GHJCKV2cjs.p; exports.defineValaxyTheme = _chunk4GHJCKV2cjs.z; exports.ensurePrefix = _chunk4GHJCKV2cjs.e; exports.generateClientRedirects = _chunk4GHJCKV2cjs.K; exports.getGitTimestamp = _chunk4GHJCKV2cjs.a; exports.getIndexHtml = _chunk4GHJCKV2cjs.G; exports.isExternal = _chunk4GHJCKV2cjs.c; exports.isPath = _chunk4GHJCKV2cjs.g; exports.loadConfig = _chunk4GHJCKV2cjs.i; exports.loadConfigFromFile = _chunk4GHJCKV2cjs.j; exports.mergeValaxyConfig = _chunk4GHJCKV2cjs.s; exports.mergeViteConfigs = _chunk4GHJCKV2cjs.F; exports.postProcessForSSG = _chunk4GHJCKV2cjs.J; exports.processValaxyOptions = _chunk4GHJCKV2cjs.C; exports.resolveAddonConfig = _chunk4GHJCKV2cjs.w; exports.resolveImportPath = _chunk4GHJCKV2cjs.b; exports.resolveOptions = _chunk4GHJCKV2cjs.D; exports.resolveSiteConfig = _chunk4GHJCKV2cjs.n; exports.resolveSiteConfigFromRoot = _chunk4GHJCKV2cjs.m; exports.resolveThemeConfigFromRoot = _chunk4GHJCKV2cjs.x; exports.resolveThemeValaxyConfig = _chunk4GHJCKV2cjs.E; exports.resolveUserThemeConfig = _chunk4GHJCKV2cjs.y; exports.resolveValaxyConfig = _chunk4GHJCKV2cjs.t; exports.resolveValaxyConfigFromRoot = _chunk4GHJCKV2cjs.r; exports.run = _chunk4GHJCKV2cjs.N; exports.slash = _chunk4GHJCKV2cjs.d; exports.ssgBuild = _chunk4GHJCKV2cjs.I; exports.toAtFS = _chunk4GHJCKV2cjs.f; exports.transformObject = _chunk4GHJCKV2cjs.h;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkT4SN3XT6cjs = require('../chunk-T4SN3XT6.cjs');require('../chunk-FNMRWIFM.cjs');exports.build = _chunkT4SN3XT6cjs.H; exports.cli = _chunkT4SN3XT6cjs.M; exports.createServer = _chunkT4SN3XT6cjs.L; exports.defaultSiteConfig = _chunkT4SN3XT6cjs.k; exports.defaultValaxyConfig = _chunkT4SN3XT6cjs.o; exports.defineAddon = _chunkT4SN3XT6cjs.v; exports.defineConfig = _chunkT4SN3XT6cjs.q; exports.defineSiteConfig = _chunkT4SN3XT6cjs.l; exports.defineTheme = _chunkT4SN3XT6cjs.A; exports.defineUnoSetup = _chunkT4SN3XT6cjs.B; exports.defineValaxyAddon = _chunkT4SN3XT6cjs.u; exports.defineValaxyConfig = _chunkT4SN3XT6cjs.p; exports.defineValaxyTheme = _chunkT4SN3XT6cjs.z; exports.ensurePrefix = _chunkT4SN3XT6cjs.e; exports.generateClientRedirects = _chunkT4SN3XT6cjs.K; exports.getGitTimestamp = _chunkT4SN3XT6cjs.a; exports.getIndexHtml = _chunkT4SN3XT6cjs.G; exports.isExternal = _chunkT4SN3XT6cjs.c; exports.isPath = _chunkT4SN3XT6cjs.g; exports.loadConfig = _chunkT4SN3XT6cjs.i; exports.loadConfigFromFile = _chunkT4SN3XT6cjs.j; exports.mergeValaxyConfig = _chunkT4SN3XT6cjs.s; exports.mergeViteConfigs = _chunkT4SN3XT6cjs.F; exports.postProcessForSSG = _chunkT4SN3XT6cjs.J; exports.processValaxyOptions = _chunkT4SN3XT6cjs.C; exports.resolveAddonConfig = _chunkT4SN3XT6cjs.w; exports.resolveImportPath = _chunkT4SN3XT6cjs.b; exports.resolveOptions = _chunkT4SN3XT6cjs.D; exports.resolveSiteConfig = _chunkT4SN3XT6cjs.n; exports.resolveSiteConfigFromRoot = _chunkT4SN3XT6cjs.m; exports.resolveThemeConfigFromRoot = _chunkT4SN3XT6cjs.x; exports.resolveThemeValaxyConfig = _chunkT4SN3XT6cjs.E; exports.resolveUserThemeConfig = _chunkT4SN3XT6cjs.y; exports.resolveValaxyConfig = _chunkT4SN3XT6cjs.t; exports.resolveValaxyConfigFromRoot = _chunkT4SN3XT6cjs.r; exports.run = _chunkT4SN3XT6cjs.N; exports.slash = _chunkT4SN3XT6cjs.d; exports.ssgBuild = _chunkT4SN3XT6cjs.I; exports.toAtFS = _chunkT4SN3XT6cjs.f; exports.transformObject = _chunkT4SN3XT6cjs.h;
@@ -13,7 +13,7 @@ import { EditableTreeNode } from 'unplugin-vue-router';
13
13
  import { presetUno, presetAttributify, presetIcons, presetTypography } from 'unocss';
14
14
  import { Hookable } from 'hookable';
15
15
  import MarkdownIt from 'markdown-it';
16
- import { ILanguageRegistration, IThemeRegistration } from 'shiki';
16
+ import { LanguageInput, ShikijiTransformer, Highlighter, ThemeRegistration, BuiltinTheme } from 'shikiji';
17
17
  import anchorPlugin from 'markdown-it-anchor';
18
18
  import { KatexOptions } from 'katex';
19
19
  import { FrontmatterPluginOptions } from '@mdit-vue/plugin-frontmatter';
@@ -55,9 +55,9 @@ interface Blocks {
55
55
  details?: BlockItem;
56
56
  }
57
57
 
58
- type ThemeOptions = IThemeRegistration | {
59
- light: IThemeRegistration;
60
- dark: IThemeRegistration;
58
+ type ThemeOptions = ThemeRegistration | BuiltinTheme | {
59
+ light: ThemeRegistration | BuiltinTheme;
60
+ dark: ThemeRegistration | BuiltinTheme;
61
61
  };
62
62
  interface MarkdownOptions {
63
63
  /**
@@ -79,7 +79,50 @@ interface MarkdownOptions {
79
79
  allowedAttributes?: string[];
80
80
  disable?: boolean;
81
81
  };
82
+ /**
83
+ * Custom theme for syntax highlighting.
84
+ *
85
+ * You can also pass an object with `light` and `dark` themes to support dual themes.
86
+ *
87
+ * @example { theme: 'github-dark' }
88
+ * @example { theme: { light: 'github-light', dark: 'github-dark' } }
89
+ *
90
+ * You can use an existing theme.
91
+ * @see https://github.com/antfu/shikiji/blob/main/docs/themes.md#all-themes
92
+ * Or add your own theme.
93
+ * @see https://github.com/antfu/shikiji/blob/main/docs/themes.md#load-custom-themes
94
+ */
95
+ theme?: ThemeOptions;
96
+ /**
97
+ * Languages for syntax highlighting.
98
+ * @see https://github.com/antfu/shikiji/blob/main/docs/languages.md#all-themes
99
+ */
100
+ languages?: LanguageInput[];
101
+ /**
102
+ * Custom language aliases.
103
+ *
104
+ * @example { 'my-lang': 'js' }
105
+ * @see https://github.com/antfu/shikiji/tree/main#custom-language-aliases
106
+ */
107
+ languageAlias?: Record<string, string>;
108
+ /**
109
+ * Show line numbers in code blocks
110
+ * @default false
111
+ */
112
+ lineNumbers?: boolean;
113
+ /**
114
+ * Fallback language when the specified language is not available.
115
+ */
82
116
  defaultHighlightLang?: string;
117
+ /**
118
+ * Transformers applied to code blocks
119
+ * @see https://github.com/antfu/shikiji#hast-transformers
120
+ */
121
+ codeTransformers?: ShikijiTransformer[];
122
+ /**
123
+ * Setup Shikiji instance
124
+ */
125
+ shikijiSetup?: (shikiji: Highlighter) => void | Promise<void>;
83
126
  frontmatter?: FrontmatterPluginOptions;
84
127
  headers?: HeadersPluginOptions;
85
128
  sfc?: SfcPluginOptions;
@@ -98,16 +141,10 @@ interface MarkdownOptions {
98
141
  async: boolean;
99
142
  classes: string;
100
143
  };
101
- lineNumbers?: boolean;
102
144
  /**
103
145
  * @see https://katex.org/docs/options.html
104
146
  */
105
147
  katex?: KatexOptions;
106
- /**
107
- * shiki
108
- */
109
- theme?: ThemeOptions;
110
- languages?: ILanguageRegistration[];
111
148
  /**
112
149
  * Custom block configurations
113
150
  */
@@ -224,6 +261,11 @@ interface ResolvedValaxyOptions<ThemeConfig = DefaultTheme.Config> {
224
261
  * package.json root
225
262
  */
226
263
  pkgRoot: string;
264
+ /**
265
+ * temp dir, store d.ts and other temp files
266
+ * .valaxy
267
+ */
268
+ tempDir: string;
227
269
  /**
228
270
  * Client root path
229
271
  * @default 'valaxy/client'
@@ -13,7 +13,7 @@ import { EditableTreeNode } from 'unplugin-vue-router';
13
13
  import { presetUno, presetAttributify, presetIcons, presetTypography } from 'unocss';
14
14
  import { Hookable } from 'hookable';
15
15
  import MarkdownIt from 'markdown-it';
16
- import { ILanguageRegistration, IThemeRegistration } from 'shiki';
16
+ import { LanguageInput, ShikijiTransformer, Highlighter, ThemeRegistration, BuiltinTheme } from 'shikiji';
17
17
  import anchorPlugin from 'markdown-it-anchor';
18
18
  import { KatexOptions } from 'katex';
19
19
  import { FrontmatterPluginOptions } from '@mdit-vue/plugin-frontmatter';
@@ -55,9 +55,9 @@ interface Blocks {
55
55
  details?: BlockItem;
56
56
  }
57
57
 
58
- type ThemeOptions = IThemeRegistration | {
59
- light: IThemeRegistration;
60
- dark: IThemeRegistration;
58
+ type ThemeOptions = ThemeRegistration | BuiltinTheme | {
59
+ light: ThemeRegistration | BuiltinTheme;
60
+ dark: ThemeRegistration | BuiltinTheme;
61
61
  };
62
62
  interface MarkdownOptions {
63
63
  /**
@@ -79,7 +79,50 @@ interface MarkdownOptions {
79
79
  allowedAttributes?: string[];
80
80
  disable?: boolean;
81
81
  };
82
+ /**
83
+ * Custom theme for syntax highlighting.
84
+ *
85
+ * You can also pass an object with `light` and `dark` themes to support dual themes.
86
+ *
87
+ * @example { theme: 'github-dark' }
88
+ * @example { theme: { light: 'github-light', dark: 'github-dark' } }
89
+ *
90
+ * You can use an existing theme.
91
+ * @see https://github.com/antfu/shikiji/blob/main/docs/themes.md#all-themes
92
+ * Or add your own theme.
93
+ * @see https://github.com/antfu/shikiji/blob/main/docs/themes.md#load-custom-themes
94
+ */
95
+ theme?: ThemeOptions;
96
+ /**
97
+ * Languages for syntax highlighting.
98
+ * @see https://github.com/antfu/shikiji/blob/main/docs/languages.md#all-themes
99
+ */
100
+ languages?: LanguageInput[];
101
+ /**
102
+ * Custom language aliases.
103
+ *
104
+ * @example { 'my-lang': 'js' }
105
+ * @see https://github.com/antfu/shikiji/tree/main#custom-language-aliases
106
+ */
107
+ languageAlias?: Record<string, string>;
108
+ /**
109
+ * Show line numbers in code blocks
110
+ * @default false
111
+ */
112
+ lineNumbers?: boolean;
113
+ /**
114
+ * Fallback language when the specified language is not available.
115
+ */
82
116
  defaultHighlightLang?: string;
117
+ /**
118
+ * Transformers applied to code blocks
119
+ * @see https://github.com/antfu/shikiji#hast-transformers
120
+ */
121
+ codeTransformers?: ShikijiTransformer[];
122
+ /**
123
+ * Setup Shikiji instance
124
+ */
125
+ shikijiSetup?: (shikiji: Highlighter) => void | Promise<void>;
83
126
  frontmatter?: FrontmatterPluginOptions;
84
127
  headers?: HeadersPluginOptions;
85
128
  sfc?: SfcPluginOptions;
@@ -98,16 +141,10 @@ interface MarkdownOptions {
98
141
  async: boolean;
99
142
  classes: string;
100
143
  };
101
- lineNumbers?: boolean;
102
144
  /**
103
145
  * @see https://katex.org/docs/options.html
104
146
  */
105
147
  katex?: KatexOptions;
106
- /**
107
- * shiki
108
- */
109
- theme?: ThemeOptions;
110
- languages?: ILanguageRegistration[];
111
148
  /**
112
149
  * Custom block configurations
113
150
  */
@@ -224,6 +261,11 @@ interface ResolvedValaxyOptions<ThemeConfig = DefaultTheme.Config> {
224
261
  * package.json root
225
262
  */
226
263
  pkgRoot: string;
264
+ /**
265
+ * temp dir, store d.ts and other temp files
266
+ * .valaxy
267
+ */
268
+ tempDir: string;
227
269
  /**
228
270
  * Client root path
229
271
  * @default 'valaxy/client'
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-GRG2TP6T.mjs";import"../chunk-ZO24WTQL.mjs";export{H as build,M as cli,L as createServer,k as defaultSiteConfig,o as defaultValaxyConfig,v as defineAddon,q as defineConfig,l as defineSiteConfig,A as defineTheme,B as defineUnoSetup,u as defineValaxyAddon,p as defineValaxyConfig,z as defineValaxyTheme,e as ensurePrefix,K as generateClientRedirects,a as getGitTimestamp,G as getIndexHtml,c as isExternal,g as isPath,i as loadConfig,j as loadConfigFromFile,s as mergeValaxyConfig,F as mergeViteConfigs,J as postProcessForSSG,C as processValaxyOptions,w as resolveAddonConfig,b as resolveImportPath,D as resolveOptions,n as resolveSiteConfig,m as resolveSiteConfigFromRoot,x as resolveThemeConfigFromRoot,E as resolveThemeValaxyConfig,y as resolveUserThemeConfig,t as resolveValaxyConfig,r as resolveValaxyConfigFromRoot,N as run,d as slash,I as ssgBuild,f as toAtFS,h as transformObject};
2
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-HZ4FMCTT.mjs";import"../chunk-R4WV6S3O.mjs";export{H as build,M as cli,L as createServer,k as defaultSiteConfig,o as defaultValaxyConfig,v as defineAddon,q as defineConfig,l as defineSiteConfig,A as defineTheme,B as defineUnoSetup,u as defineValaxyAddon,p as defineValaxyConfig,z as defineValaxyTheme,e as ensurePrefix,K as generateClientRedirects,a as getGitTimestamp,G as getIndexHtml,c as isExternal,g as isPath,i as loadConfig,j as loadConfigFromFile,s as mergeValaxyConfig,F as mergeViteConfigs,J as postProcessForSSG,C as processValaxyOptions,w as resolveAddonConfig,b as resolveImportPath,D as resolveOptions,n as resolveSiteConfig,m as resolveSiteConfigFromRoot,x as resolveThemeConfigFromRoot,E as resolveThemeValaxyConfig,y as resolveUserThemeConfig,t as resolveValaxyConfig,r as resolveValaxyConfigFromRoot,N as run,d as slash,I as ssgBuild,f as toAtFS,h as transformObject};
@@ -1 +1 @@
1
- "use strict";var _chunkTEOGEXZQcjs = require('../chunk-TEOGEXZQ.cjs');_chunkTEOGEXZQcjs.e.call(void 0, );_chunkTEOGEXZQcjs.e.call(void 0, );_chunkTEOGEXZQcjs.e.call(void 0, );_chunkTEOGEXZQcjs.e.call(void 0, );_chunkTEOGEXZQcjs.e.call(void 0, );_chunkTEOGEXZQcjs.e.call(void 0, );_chunkTEOGEXZQcjs.e.call(void 0, );
1
+ "use strict";var _chunkFNMRWIFMcjs = require('../chunk-FNMRWIFM.cjs');_chunkFNMRWIFMcjs.e.call(void 0, );_chunkFNMRWIFMcjs.e.call(void 0, );_chunkFNMRWIFMcjs.e.call(void 0, );_chunkFNMRWIFMcjs.e.call(void 0, );_chunkFNMRWIFMcjs.e.call(void 0, );_chunkFNMRWIFMcjs.e.call(void 0, );_chunkFNMRWIFMcjs.e.call(void 0, );
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{d as e}from"../chunk-ZO24WTQL.mjs";e();e();e();e();e();e();e();
2
+ import{d as e}from"../chunk-R4WV6S3O.mjs";e();e();e();e();e();e();e();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.17.1",
4
+ "version": "0.17.3",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -59,7 +59,7 @@
59
59
  "dependencies": {
60
60
  "@antfu/utils": "^0.7.7",
61
61
  "@ctrl/tinycolor": "^4.0.3",
62
- "@iconify-json/carbon": "^1.1.27",
62
+ "@iconify-json/carbon": "^1.1.28",
63
63
  "@iconify-json/ri": "^1.1.19",
64
64
  "@intlify/unplugin-vue-i18n": "^2.0.0",
65
65
  "@types/body-scroll-lock": "^3.1.2",
@@ -68,7 +68,7 @@
68
68
  "@unhead/schema-org": "^1.8.10",
69
69
  "@unhead/vue": "^1.8.10",
70
70
  "@vitejs/plugin-vue": "^5.0.3",
71
- "@vue/devtools-api": "^7.0.11",
71
+ "@vue/devtools-api": "^7.0.13",
72
72
  "@vueuse/core": "^10.7.2",
73
73
  "@vueuse/integrations": "^10.7.2",
74
74
  "body-scroll-lock": "4.0.0-beta.0",
@@ -89,8 +89,7 @@
89
89
  "is-installed-globally": "^1.0.0",
90
90
  "jiti": "^1.21.0",
91
91
  "katex": "^0.16.9",
92
- "kolorist": "^1.8.0",
93
- "lru-cache": "^10.1.0",
92
+ "lru-cache": "^10.2.0",
94
93
  "markdown-it": "^14.0.0",
95
94
  "markdown-it-anchor": "^8.6.7",
96
95
  "markdown-it-attrs": "^4.1.6",
@@ -107,22 +106,24 @@
107
106
  "pinia": "^2.1.7",
108
107
  "qrcode": "^1.5.3",
109
108
  "sass": "^1.70.0",
110
- "shiki": "^0.14.7",
109
+ "shikiji": "0.9.7",
110
+ "shikiji-transformers": "0.9.7",
111
111
  "star-markdown-css": "^0.4.2",
112
112
  "unconfig": "^0.3.11",
113
- "unocss": "^0.58.3",
113
+ "unocss": "^0.58.4",
114
114
  "unplugin-vue-components": "^0.26.0",
115
115
  "unplugin-vue-router": "^0.7.0",
116
116
  "vanilla-lazyload": "^17.8.5",
117
117
  "vite": "^5.0.12",
118
- "vite-plugin-vue-devtools": "^7.0.11",
118
+ "vite-plugin-vue-devtools": "^7.0.13",
119
119
  "vite-plugin-vue-layouts": "0.11.0",
120
120
  "vite-ssg": "0.23.6",
121
121
  "vite-ssg-sitemap": "0.6.1",
122
122
  "vue": "^3.4.15",
123
123
  "vue-i18n": "^9.9.0",
124
124
  "vue-router": "^4.2.5",
125
- "yargs": "^17.7.2"
125
+ "yargs": "^17.7.2",
126
+ "@valaxyjs/devtools": "0.0.1"
126
127
  },
127
128
  "devDependencies": {
128
129
  "@mdit-vue/plugin-component": "^2.0.0",
@@ -143,8 +144,7 @@
143
144
  "debug": "^4.3.4",
144
145
  "diacritics": "^1.3.0",
145
146
  "https-localhost": "^4.7.1",
146
- "markdown-it-image-figures": "^2.1.1",
147
- "shiki-processor": "^0.1.3"
147
+ "markdown-it-image-figures": "^2.1.1"
148
148
  },
149
149
  "scripts": {
150
150
  "build": "rimraf dist && tsup --splitting",
package/shims.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'vue-router'
2
2
 
3
- import './client/typed-router'
3
+ // import './client/typed-router'
4
4
 
5
5
  import type { Post } from './types'
6
6
  import type { Header } from './node/markdown'