valaxy 0.15.7 → 0.15.9

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/dist/node/cli.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRDHGI62Kcjs = require('../chunk-RDHGI62K.cjs');require('../chunk-YDNPXS5U.cjs');exports.cli = _chunkRDHGI62Kcjs.F; exports.run = _chunkRDHGI62Kcjs.G;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRAU3RNGIcjs = require('../chunk-RAU3RNGI.cjs');require('../chunk-YDNPXS5U.cjs');exports.cli = _chunkRAU3RNGIcjs.F; exports.run = _chunkRAU3RNGIcjs.G;
package/dist/node/cli.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{F as a,G as b}from"../chunk-L6ZWDWRN.mjs";import"../chunk-GY4S4RDR.mjs";export{a as cli,b as run};
2
+ import{F as a,G as b}from"../chunk-57ETS265.mjs";import"../chunk-GY4S4RDR.mjs";export{a as cli,b as run};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRDHGI62Kcjs = require('../chunk-RDHGI62K.cjs');var _chunkYDNPXS5Ucjs = require('../chunk-YDNPXS5U.cjs');_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );exports.build = _chunkRDHGI62Kcjs.C; exports.cli = _chunkRDHGI62Kcjs.F; exports.createServer = _chunkRDHGI62Kcjs.B; exports.defaultSiteConfig = _chunkRDHGI62Kcjs.t; exports.defaultValaxyConfig = _chunkRDHGI62Kcjs.u; exports.defineAddon = _chunkRDHGI62Kcjs.n; exports.defineConfig = _chunkRDHGI62Kcjs.s; exports.defineSiteConfig = _chunkRDHGI62Kcjs.q; exports.defineTheme = _chunkRDHGI62Kcjs.p; exports.defineUnoSetup = _chunkRDHGI62Kcjs.v; exports.defineValaxyAddon = _chunkRDHGI62Kcjs.m; exports.defineValaxyConfig = _chunkRDHGI62Kcjs.r; exports.defineValaxyTheme = _chunkRDHGI62Kcjs.o; exports.ensurePrefix = _chunkRDHGI62Kcjs.d; exports.getGitTimestamp = _chunkRDHGI62Kcjs.a; exports.getIndexHtml = _chunkRDHGI62Kcjs.A; exports.isExternal = _chunkRDHGI62Kcjs.b; exports.isPath = _chunkRDHGI62Kcjs.f; exports.mergeValaxyConfig = _chunkRDHGI62Kcjs.g; exports.mergeViteConfigs = _chunkRDHGI62Kcjs.z; exports.postProcessForSSG = _chunkRDHGI62Kcjs.E; exports.processValaxyOptions = _chunkRDHGI62Kcjs.w; exports.resolveAddonConfig = _chunkRDHGI62Kcjs.j; exports.resolveImportPath = _chunkRDHGI62Kcjs.l; exports.resolveOptions = _chunkRDHGI62Kcjs.x; exports.resolveThemeValaxyConfig = _chunkRDHGI62Kcjs.y; exports.resolveValaxyConfig = _chunkRDHGI62Kcjs.i; exports.resolveValaxyConfigFromRoot = _chunkRDHGI62Kcjs.h; exports.run = _chunkRDHGI62Kcjs.G; exports.slash = _chunkRDHGI62Kcjs.c; exports.ssgBuild = _chunkRDHGI62Kcjs.D; exports.toAtFS = _chunkRDHGI62Kcjs.e; exports.transformObject = _chunkRDHGI62Kcjs.k;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRAU3RNGIcjs = require('../chunk-RAU3RNGI.cjs');var _chunkYDNPXS5Ucjs = require('../chunk-YDNPXS5U.cjs');_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );exports.build = _chunkRAU3RNGIcjs.C; exports.cli = _chunkRAU3RNGIcjs.F; exports.createServer = _chunkRAU3RNGIcjs.B; exports.defaultSiteConfig = _chunkRAU3RNGIcjs.t; exports.defaultValaxyConfig = _chunkRAU3RNGIcjs.u; exports.defineAddon = _chunkRAU3RNGIcjs.n; exports.defineConfig = _chunkRAU3RNGIcjs.s; exports.defineSiteConfig = _chunkRAU3RNGIcjs.q; exports.defineTheme = _chunkRAU3RNGIcjs.p; exports.defineUnoSetup = _chunkRAU3RNGIcjs.v; exports.defineValaxyAddon = _chunkRAU3RNGIcjs.m; exports.defineValaxyConfig = _chunkRAU3RNGIcjs.r; exports.defineValaxyTheme = _chunkRAU3RNGIcjs.o; exports.ensurePrefix = _chunkRAU3RNGIcjs.d; exports.getGitTimestamp = _chunkRAU3RNGIcjs.a; exports.getIndexHtml = _chunkRAU3RNGIcjs.A; exports.isExternal = _chunkRAU3RNGIcjs.b; exports.isPath = _chunkRAU3RNGIcjs.f; exports.mergeValaxyConfig = _chunkRAU3RNGIcjs.g; exports.mergeViteConfigs = _chunkRAU3RNGIcjs.z; exports.postProcessForSSG = _chunkRAU3RNGIcjs.E; exports.processValaxyOptions = _chunkRAU3RNGIcjs.w; exports.resolveAddonConfig = _chunkRAU3RNGIcjs.j; exports.resolveImportPath = _chunkRAU3RNGIcjs.l; exports.resolveOptions = _chunkRAU3RNGIcjs.x; exports.resolveThemeValaxyConfig = _chunkRAU3RNGIcjs.y; exports.resolveValaxyConfig = _chunkRAU3RNGIcjs.i; exports.resolveValaxyConfigFromRoot = _chunkRAU3RNGIcjs.h; exports.run = _chunkRAU3RNGIcjs.G; exports.slash = _chunkRAU3RNGIcjs.c; exports.ssgBuild = _chunkRAU3RNGIcjs.D; exports.toAtFS = _chunkRAU3RNGIcjs.e; exports.transformObject = _chunkRAU3RNGIcjs.k;
@@ -9,6 +9,7 @@ import Components from 'unplugin-vue-components/vite';
9
9
  import { VitePluginConfig } from 'unocss/vite';
10
10
  import Pages from 'vite-plugin-pages';
11
11
  import { presetUno, presetAttributify, presetIcons, presetTypography } from 'unocss';
12
+ import { Hookable } from 'hookable';
12
13
  import MarkdownIt from 'markdown-it';
13
14
  import { ILanguageRegistration, IThemeRegistration } from 'shiki';
14
15
  import anchorPlugin from 'markdown-it-anchor';
@@ -104,6 +105,18 @@ type UserValaxyNodeConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<Valax
104
105
  */
105
106
  type ValaxyConfigFn<ThemeConfig = DefaultTheme.Config> = (options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyNodeConfig | Promise<ValaxyNodeConfig>;
106
107
  type ValaxyConfigExport<ThemeConfig = DefaultTheme.Config> = ValaxyNodeConfig<ThemeConfig> | ValaxyConfigFn<ThemeConfig>;
108
+ type HookResult = Promise<void> | void;
109
+ interface ValaxyHooks {
110
+ 'options:resolved': () => HookResult;
111
+ 'config:init': () => HookResult;
112
+ 'build:before': () => HookResult;
113
+ 'build:after': () => HookResult;
114
+ }
115
+ interface ValaxyNode {
116
+ version: string;
117
+ hooks: Hookable<ValaxyHooks>;
118
+ hook: ValaxyNode['hooks']['hook'];
119
+ }
107
120
  interface ValaxyExtendConfig {
108
121
  /**
109
122
  * Markdown Feature
@@ -147,6 +160,7 @@ interface ValaxyExtendConfig {
147
160
  path: string;
148
161
  }) => void;
149
162
  addons?: ValaxyAddons;
163
+ hooks?: Partial<ValaxyHooks>;
150
164
  }
151
165
  type ValaxyAddonLike = ValaxyAddon | false | null | undefined;
152
166
  type ValaxyAddons = (ValaxyAddon | string)[] | Record<string, ValaxyAddonLike>;
@@ -161,6 +175,7 @@ interface ValaxyAddonResolver {
161
175
  options: Record<string, any>;
162
176
  configFile?: string;
163
177
  pkg: Record<string, any>;
178
+ setup?: (node: ValaxyNode) => void;
164
179
  }
165
180
 
166
181
  interface ValaxyEntryOptions {
@@ -257,7 +272,11 @@ declare function ssgBuild(options: ResolvedValaxyOptions, viteConfig?: InlineCon
257
272
  */
258
273
  declare function postProcessForSSG(options: ResolvedValaxyOptions): Promise<void>;
259
274
 
260
- declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon): (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon;
275
+ declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
276
+ setup?: ValaxyAddonResolver['setup'];
277
+ }): (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
278
+ setup?: ValaxyAddonResolver['setup'];
279
+ };
261
280
  declare const defineAddon: typeof defineValaxyAddon;
262
281
  type ValaxyConfigExtendKey = 'vite' | 'vue' | 'unocss' | 'unocssPresets' | 'markdown' | 'extendMd' | 'addons';
263
282
  type ValaxyPickConfig = Pick<ValaxyNodeConfig, ValaxyConfigExtendKey>;
@@ -339,4 +358,4 @@ declare function resolveAddonConfig(addons: ValaxyAddonResolver[], options?: Res
339
358
  declare function transformObject(obj: any): string;
340
359
  declare function resolveImportPath(importName: string, ensure?: true): string;
341
360
 
342
- export { ResolvedValaxyOptions, UnoSetup, UserValaxyNodeConfig, ValaxyAddonExport, ValaxyAddonFn, ValaxyAddonLike, ValaxyAddonResolver, ValaxyAddons, ValaxyConfigExport, ValaxyConfigExtendKey, ValaxyConfigFn, ValaxyEntryOptions, ValaxyExtendConfig, ValaxyNodeConfig, ValaxyPickConfig, ValaxyServerOptions, ValaxyTheme, build, createServer, defaultSiteConfig, defaultValaxyConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, getGitTimestamp, getIndexHtml, isExternal, isPath, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonConfig, resolveImportPath, resolveOptions, resolveThemeValaxyConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
361
+ export { HookResult, ResolvedValaxyOptions, UnoSetup, UserValaxyNodeConfig, ValaxyAddonExport, ValaxyAddonFn, ValaxyAddonLike, ValaxyAddonResolver, ValaxyAddons, ValaxyConfigExport, ValaxyConfigExtendKey, ValaxyConfigFn, ValaxyEntryOptions, ValaxyExtendConfig, ValaxyHooks, ValaxyNode, ValaxyNodeConfig, ValaxyPickConfig, ValaxyServerOptions, ValaxyTheme, build, createServer, defaultSiteConfig, defaultValaxyConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, getGitTimestamp, getIndexHtml, isExternal, isPath, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonConfig, resolveImportPath, resolveOptions, resolveThemeValaxyConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
@@ -9,6 +9,7 @@ import Components from 'unplugin-vue-components/vite';
9
9
  import { VitePluginConfig } from 'unocss/vite';
10
10
  import Pages from 'vite-plugin-pages';
11
11
  import { presetUno, presetAttributify, presetIcons, presetTypography } from 'unocss';
12
+ import { Hookable } from 'hookable';
12
13
  import MarkdownIt from 'markdown-it';
13
14
  import { ILanguageRegistration, IThemeRegistration } from 'shiki';
14
15
  import anchorPlugin from 'markdown-it-anchor';
@@ -104,6 +105,18 @@ type UserValaxyNodeConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<Valax
104
105
  */
105
106
  type ValaxyConfigFn<ThemeConfig = DefaultTheme.Config> = (options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyNodeConfig | Promise<ValaxyNodeConfig>;
106
107
  type ValaxyConfigExport<ThemeConfig = DefaultTheme.Config> = ValaxyNodeConfig<ThemeConfig> | ValaxyConfigFn<ThemeConfig>;
108
+ type HookResult = Promise<void> | void;
109
+ interface ValaxyHooks {
110
+ 'options:resolved': () => HookResult;
111
+ 'config:init': () => HookResult;
112
+ 'build:before': () => HookResult;
113
+ 'build:after': () => HookResult;
114
+ }
115
+ interface ValaxyNode {
116
+ version: string;
117
+ hooks: Hookable<ValaxyHooks>;
118
+ hook: ValaxyNode['hooks']['hook'];
119
+ }
107
120
  interface ValaxyExtendConfig {
108
121
  /**
109
122
  * Markdown Feature
@@ -147,6 +160,7 @@ interface ValaxyExtendConfig {
147
160
  path: string;
148
161
  }) => void;
149
162
  addons?: ValaxyAddons;
163
+ hooks?: Partial<ValaxyHooks>;
150
164
  }
151
165
  type ValaxyAddonLike = ValaxyAddon | false | null | undefined;
152
166
  type ValaxyAddons = (ValaxyAddon | string)[] | Record<string, ValaxyAddonLike>;
@@ -161,6 +175,7 @@ interface ValaxyAddonResolver {
161
175
  options: Record<string, any>;
162
176
  configFile?: string;
163
177
  pkg: Record<string, any>;
178
+ setup?: (node: ValaxyNode) => void;
164
179
  }
165
180
 
166
181
  interface ValaxyEntryOptions {
@@ -257,7 +272,11 @@ declare function ssgBuild(options: ResolvedValaxyOptions, viteConfig?: InlineCon
257
272
  */
258
273
  declare function postProcessForSSG(options: ResolvedValaxyOptions): Promise<void>;
259
274
 
260
- declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon): (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon;
275
+ declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
276
+ setup?: ValaxyAddonResolver['setup'];
277
+ }): (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
278
+ setup?: ValaxyAddonResolver['setup'];
279
+ };
261
280
  declare const defineAddon: typeof defineValaxyAddon;
262
281
  type ValaxyConfigExtendKey = 'vite' | 'vue' | 'unocss' | 'unocssPresets' | 'markdown' | 'extendMd' | 'addons';
263
282
  type ValaxyPickConfig = Pick<ValaxyNodeConfig, ValaxyConfigExtendKey>;
@@ -339,4 +358,4 @@ declare function resolveAddonConfig(addons: ValaxyAddonResolver[], options?: Res
339
358
  declare function transformObject(obj: any): string;
340
359
  declare function resolveImportPath(importName: string, ensure?: true): string;
341
360
 
342
- export { ResolvedValaxyOptions, UnoSetup, UserValaxyNodeConfig, ValaxyAddonExport, ValaxyAddonFn, ValaxyAddonLike, ValaxyAddonResolver, ValaxyAddons, ValaxyConfigExport, ValaxyConfigExtendKey, ValaxyConfigFn, ValaxyEntryOptions, ValaxyExtendConfig, ValaxyNodeConfig, ValaxyPickConfig, ValaxyServerOptions, ValaxyTheme, build, createServer, defaultSiteConfig, defaultValaxyConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, getGitTimestamp, getIndexHtml, isExternal, isPath, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonConfig, resolveImportPath, resolveOptions, resolveThemeValaxyConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
361
+ export { HookResult, ResolvedValaxyOptions, UnoSetup, UserValaxyNodeConfig, ValaxyAddonExport, ValaxyAddonFn, ValaxyAddonLike, ValaxyAddonResolver, ValaxyAddons, ValaxyConfigExport, ValaxyConfigExtendKey, ValaxyConfigFn, ValaxyEntryOptions, ValaxyExtendConfig, ValaxyHooks, ValaxyNode, ValaxyNodeConfig, ValaxyPickConfig, ValaxyServerOptions, ValaxyTheme, build, createServer, defaultSiteConfig, defaultValaxyConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, getGitTimestamp, getIndexHtml, isExternal, isPath, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonConfig, resolveImportPath, resolveOptions, resolveThemeValaxyConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{A as N,B as U,C as k,D as S,E as F,F as w,G as E,a as n,b as a,c as r,d as i,e as p,f as s,g as f,h as g,i as y,j as m,k as l,l as d,m as x,n as C,o as V,p as u,q as h,r as c,s as T,t as v,u as P,v as A,w as R,x as O,y as b,z as D}from"../chunk-L6ZWDWRN.mjs";import{e}from"../chunk-GY4S4RDR.mjs";e();e();e();export{k as build,w as cli,U as createServer,v as defaultSiteConfig,P as defaultValaxyConfig,C as defineAddon,T as defineConfig,h as defineSiteConfig,u as defineTheme,A as defineUnoSetup,x as defineValaxyAddon,c as defineValaxyConfig,V as defineValaxyTheme,i as ensurePrefix,n as getGitTimestamp,N as getIndexHtml,a as isExternal,s as isPath,f as mergeValaxyConfig,D as mergeViteConfigs,F as postProcessForSSG,R as processValaxyOptions,m as resolveAddonConfig,d as resolveImportPath,O as resolveOptions,b as resolveThemeValaxyConfig,y as resolveValaxyConfig,g as resolveValaxyConfigFromRoot,E as run,r as slash,S as ssgBuild,p as toAtFS,l as transformObject};
2
+ import{A as H,B as O,C as D,D as U,E as S,F,G as w,a as n,b as a,c as r,d as i,e as p,f as s,g as f,h as y,i as l,j as g,k as m,l as d,m as x,n as C,o as V,p as u,q as h,r as c,s as k,t as v,u as T,v as P,w as R,x as b,y as A,z as N}from"../chunk-57ETS265.mjs";import{e}from"../chunk-GY4S4RDR.mjs";e();e();e();export{D as build,F as cli,O as createServer,v as defaultSiteConfig,T as defaultValaxyConfig,C as defineAddon,k as defineConfig,h as defineSiteConfig,u as defineTheme,P as defineUnoSetup,x as defineValaxyAddon,c as defineValaxyConfig,V as defineValaxyTheme,i as ensurePrefix,n as getGitTimestamp,H as getIndexHtml,a as isExternal,s as isPath,f as mergeValaxyConfig,N as mergeViteConfigs,S as postProcessForSSG,R as processValaxyOptions,g as resolveAddonConfig,d as resolveImportPath,b as resolveOptions,A as resolveThemeValaxyConfig,l as resolveValaxyConfig,y as resolveValaxyConfigFromRoot,w as run,r as slash,U as ssgBuild,p as toAtFS,m as transformObject};
@@ -29,6 +29,7 @@ interface Photo {
29
29
  caption: string;
30
30
  desc: string;
31
31
  }
32
+ type ExcerptType = 'md' | 'html' | 'text' | 'ai';
32
33
  interface PageFrontMatter extends Record<string, any> {
33
34
  /**
34
35
  * Path of post
@@ -176,7 +177,7 @@ interface PostFrontMatter extends PageFrontMatter {
176
177
  * - html: render as html
177
178
  * - text: render as text
178
179
  */
179
- excerpt_type: 'md' | 'text' | 'html';
180
+ excerpt_type: 'md' | 'text' | 'html' | 'ai';
180
181
  /**
181
182
  * Category
182
183
  * @description 分类,若为数组,则按顺序代表多层文件夹
@@ -267,4 +268,4 @@ interface PageDataPayload {
267
268
  }
268
269
  type HeadConfig = [string, Record<string, string>] | [string, Record<string, string>, string];
269
270
 
270
- export { Album, CleanUrlsMode, HeadConfig, Header, Page, PageData, PageDataPayload, PageFrontMatter, Photo, Post, PostFrontMatter };
271
+ export { Album, CleanUrlsMode, ExcerptType, HeadConfig, Header, Page, PageData, PageDataPayload, PageFrontMatter, Photo, Post, PostFrontMatter };
@@ -29,6 +29,7 @@ interface Photo {
29
29
  caption: string;
30
30
  desc: string;
31
31
  }
32
+ type ExcerptType = 'md' | 'html' | 'text' | 'ai';
32
33
  interface PageFrontMatter extends Record<string, any> {
33
34
  /**
34
35
  * Path of post
@@ -176,7 +177,7 @@ interface PostFrontMatter extends PageFrontMatter {
176
177
  * - html: render as html
177
178
  * - text: render as text
178
179
  */
179
- excerpt_type: 'md' | 'text' | 'html';
180
+ excerpt_type: 'md' | 'text' | 'html' | 'ai';
180
181
  /**
181
182
  * Category
182
183
  * @description 分类,若为数组,则按顺序代表多层文件夹
@@ -267,4 +268,4 @@ interface PageDataPayload {
267
268
  }
268
269
  type HeadConfig = [string, Record<string, string>] | [string, Record<string, string>, string];
269
270
 
270
- export { Album, CleanUrlsMode, HeadConfig, Header, Page, PageData, PageDataPayload, PageFrontMatter, Photo, Post, PostFrontMatter };
271
+ export { Album, CleanUrlsMode, ExcerptType, HeadConfig, Header, Page, PageData, PageDataPayload, PageFrontMatter, Photo, Post, PostFrontMatter };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.15.7",
4
+ "version": "0.15.9",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -57,7 +57,7 @@
57
57
  "@iconify-json/carbon": "^1.1.21",
58
58
  "@iconify-json/ri": "^1.1.12",
59
59
  "@intlify/unplugin-vue-i18n": "^1.4.0",
60
- "@types/body-scroll-lock": "^3.1.0",
60
+ "@types/body-scroll-lock": "^3.1.1",
61
61
  "@unhead/addons": "^1.7.4",
62
62
  "@unhead/schema-org": "^1.7.4",
63
63
  "@unhead/vue": "^1.7.4",
@@ -78,6 +78,7 @@
78
78
  "fuse.js": "^6.6.2",
79
79
  "global-dirs": "^3.0.1",
80
80
  "gray-matter": "^4.0.3",
81
+ "hookable": "^5.5.3",
81
82
  "html-to-text": "^9.0.5",
82
83
  "is-installed-globally": "^0.4.0",
83
84
  "jiti": "^1.20.0",
@@ -96,21 +97,21 @@
96
97
  "open": "9.1.0",
97
98
  "ora": "^7.0.1",
98
99
  "pascalcase": "^2.0.0",
99
- "pinia": "^2.1.6",
100
+ "pinia": "^2.1.7",
100
101
  "qrcode": "^1.5.3",
101
- "sass": "^1.69.2",
102
+ "sass": "^1.69.4",
102
103
  "shiki": "^0.14.5",
103
104
  "star-markdown-css": "^0.4.2",
104
105
  "unconfig": "^0.3.11",
105
106
  "unocss": "^0.56.5",
106
107
  "unplugin-vue-components": "^0.25.2",
107
- "vanilla-lazyload": "^17.8.4",
108
- "vite": "^4.4.11",
108
+ "vanilla-lazyload": "^17.8.5",
109
+ "vite": "^4.5.0",
109
110
  "vite-plugin-pages": "^0.31.0",
110
111
  "vite-plugin-vue-layouts": "^0.8.0",
111
112
  "vite-ssg": "0.23.3",
112
- "vite-ssg-sitemap": "0.5.1",
113
- "vue": "^3.3.4",
113
+ "vite-ssg-sitemap": "0.6.0",
114
+ "vue": "^3.3.6",
114
115
  "vue-i18n": "^9.5.0",
115
116
  "vue-router": "^4.2.5",
116
117
  "yargs": "^17.7.2"
@@ -123,15 +124,15 @@
123
124
  "@mdit-vue/plugin-title": "^1.0.0",
124
125
  "@mdit-vue/plugin-toc": "^1.0.0",
125
126
  "@mdit-vue/shared": "^1.0.0",
126
- "@types/cross-spawn": "^6.0.3",
127
- "@types/ejs": "^3.1.3",
128
- "@types/html-to-text": "^9.0.2",
129
- "@types/katex": "^0.16.3",
130
- "@types/markdown-it": "^13.0.2",
131
- "@types/nprogress": "^0.2.1",
132
- "@types/pascalcase": "^1.0.1",
133
- "@types/qrcode": "^1.5.2",
134
- "@types/yargs": "^17.0.28",
127
+ "@types/cross-spawn": "^6.0.4",
128
+ "@types/ejs": "^3.1.4",
129
+ "@types/html-to-text": "^9.0.3",
130
+ "@types/katex": "^0.16.5",
131
+ "@types/markdown-it": "^13.0.4",
132
+ "@types/nprogress": "^0.2.2",
133
+ "@types/pascalcase": "^1.0.2",
134
+ "@types/qrcode": "^1.5.4",
135
+ "@types/yargs": "^17.0.29",
135
136
  "debug": "^4.3.4",
136
137
  "diacritics": "^1.3.0",
137
138
  "https-localhost": "^4.7.1",
package/types/addon.ts CHANGED
@@ -1,3 +1,4 @@
1
+ // for client
1
2
  export interface ValaxyAddon<AddonOptions = Record<string, any>> {
2
3
  name: string
3
4
  /**
package/types/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  // do not export node type here
2
-
3
2
  export * from './addon'
4
3
  export * from './config'
5
4
  export * from './data'
package/types/posts.ts CHANGED
@@ -24,6 +24,8 @@ export interface Photo {
24
24
  desc: string
25
25
  }
26
26
 
27
+ export type ExcerptType = 'md' | 'html' | 'text' | 'ai'
28
+
27
29
  export interface PageFrontMatter extends Record<string, any> {
28
30
  /**
29
31
  * Path of post
@@ -182,7 +184,7 @@ export interface PostFrontMatter extends PageFrontMatter {
182
184
  * - html: render as html
183
185
  * - text: render as text
184
186
  */
185
- excerpt_type: 'md' | 'text' | 'html'
187
+ excerpt_type: 'md' | 'text' | 'html' | 'ai'
186
188
 
187
189
  /**
188
190
  * Category