valaxy 0.16.3 → 0.17.0-beta.1
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/composables/features/vanilla-lazyload.ts +7 -0
- package/client/composables/post.ts +2 -2
- package/client/{template.html → index.html} +1 -1
- package/client/layouts/README.md +1 -1
- package/client/layouts/default.vue +1 -1
- package/client/layouts/post.vue +1 -1
- package/client/main.ts +15 -8
- package/client/modules/devtools.ts +60 -0
- package/client/modules/valaxy.ts +1 -1
- package/client/setup/main.ts +6 -0
- package/client/styles/palette.scss +0 -1
- package/dist/chunk-EG3RHL6A.mjs +150 -0
- package/dist/{chunk-R6EC3UMQ.cjs → chunk-GXMNHGBP.cjs} +1 -1
- package/dist/chunk-I374XGD2.cjs +149 -0
- package/dist/{chunk-YTQABADX.mjs → chunk-WSC7UAH5.mjs} +1 -1
- package/dist/{config-tjZfKSoC.d.cts → config-OaNeBI1c.d.cts} +10 -1
- package/dist/{config-tjZfKSoC.d.ts → config-OaNeBI1c.d.ts} +10 -1
- package/dist/node/cli/index.cjs +1 -1
- package/dist/node/cli/index.mjs +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +14 -13
- package/dist/node/index.d.ts +14 -13
- package/dist/node/index.mjs +1 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.mjs +1 -1
- package/package.json +16 -14
- package/types/config.ts +11 -0
- package/client/layouts/layout.vue +0 -39
- package/dist/chunk-KMYBWFOB.mjs +0 -135
- package/dist/chunk-O6VYMTHE.cjs +0 -134
- /package/client/pages/{[...all].vue → [...path].vue} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
-
var n=Object.create;var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var
|
|
2
|
+
var n=Object.create;var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var d=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var l=(t,e)=>()=>(t&&(e=t(t=0)),e);var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var s=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of p(e))!f.call(t,m)&&m!==o&&i(t,m,{get:()=>e[m],enumerable:!(r=a(e,m))||r.enumerable});return t};var h=(t,e,o)=>(o=t!=null?n(c(t)):{},s(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t));var _=l(()=>{"use strict"});export{d as a,g as b,h as c,_ as d};
|
|
@@ -275,6 +275,10 @@ interface SocialLink {
|
|
|
275
275
|
icon: string;
|
|
276
276
|
color: string;
|
|
277
277
|
}
|
|
278
|
+
interface RedirectRule {
|
|
279
|
+
to: string;
|
|
280
|
+
from: string | string[];
|
|
281
|
+
}
|
|
278
282
|
interface SiteConfig {
|
|
279
283
|
/**
|
|
280
284
|
* enable auto (light/dark mode)
|
|
@@ -544,6 +548,11 @@ interface SiteConfig {
|
|
|
544
548
|
* @description:zh-CN 限制代码块的高度,单位是 px
|
|
545
549
|
*/
|
|
546
550
|
codeHeightLimit?: number;
|
|
551
|
+
/**
|
|
552
|
+
* @description:en-US client redirect rules
|
|
553
|
+
* @description:zh-CN 客户端重定向规则
|
|
554
|
+
*/
|
|
555
|
+
redirects?: RedirectRule[];
|
|
547
556
|
}
|
|
548
557
|
type PartialDeep<T> = {
|
|
549
558
|
[P in keyof T]?: T[P] extends object ? PartialDeep<T[P]> : T[P];
|
|
@@ -594,4 +603,4 @@ type UserSiteConfig = PartialDeep<SiteConfig>;
|
|
|
594
603
|
*/
|
|
595
604
|
type UserValaxyConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyConfig<ThemeConfig>>;
|
|
596
605
|
|
|
597
|
-
export { type Album as A, DefaultTheme as D, type ExcerptType as E, type FuseListItem as F, type PartialDeep as P, type RuntimeConfig as R, type SiteConfig as S, type UserSiteConfig as U, type ValaxyConfig as V, type ValaxyAddon as a, type Post as b, type SocialLink as c, type
|
|
606
|
+
export { type Album as A, DefaultTheme as D, type ExcerptType as E, type FuseListItem as F, type PartialDeep as P, type RuntimeConfig as R, type SiteConfig as S, type UserSiteConfig as U, type ValaxyConfig as V, type ValaxyAddon as a, type Post as b, type SocialLink as c, type RedirectRule as d, type UserValaxyConfig as e, type Photo as f, type PageFrontMatter as g, type PostFrontMatter as h, type Page as i };
|
|
@@ -275,6 +275,10 @@ interface SocialLink {
|
|
|
275
275
|
icon: string;
|
|
276
276
|
color: string;
|
|
277
277
|
}
|
|
278
|
+
interface RedirectRule {
|
|
279
|
+
to: string;
|
|
280
|
+
from: string | string[];
|
|
281
|
+
}
|
|
278
282
|
interface SiteConfig {
|
|
279
283
|
/**
|
|
280
284
|
* enable auto (light/dark mode)
|
|
@@ -544,6 +548,11 @@ interface SiteConfig {
|
|
|
544
548
|
* @description:zh-CN 限制代码块的高度,单位是 px
|
|
545
549
|
*/
|
|
546
550
|
codeHeightLimit?: number;
|
|
551
|
+
/**
|
|
552
|
+
* @description:en-US client redirect rules
|
|
553
|
+
* @description:zh-CN 客户端重定向规则
|
|
554
|
+
*/
|
|
555
|
+
redirects?: RedirectRule[];
|
|
547
556
|
}
|
|
548
557
|
type PartialDeep<T> = {
|
|
549
558
|
[P in keyof T]?: T[P] extends object ? PartialDeep<T[P]> : T[P];
|
|
@@ -594,4 +603,4 @@ type UserSiteConfig = PartialDeep<SiteConfig>;
|
|
|
594
603
|
*/
|
|
595
604
|
type UserValaxyConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyConfig<ThemeConfig>>;
|
|
596
605
|
|
|
597
|
-
export { type Album as A, DefaultTheme as D, type ExcerptType as E, type FuseListItem as F, type PartialDeep as P, type RuntimeConfig as R, type SiteConfig as S, type UserSiteConfig as U, type ValaxyConfig as V, type ValaxyAddon as a, type Post as b, type SocialLink as c, type
|
|
606
|
+
export { type Album as A, DefaultTheme as D, type ExcerptType as E, type FuseListItem as F, type PartialDeep as P, type RuntimeConfig as R, type SiteConfig as S, type UserSiteConfig as U, type ValaxyConfig as V, type ValaxyAddon as a, type Post as b, type SocialLink as c, type RedirectRule as d, type UserValaxyConfig as e, type Photo as f, type PageFrontMatter as g, type PostFrontMatter as h, type Page as i };
|
package/dist/node/cli/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkI374XGD2cjs = require('../../chunk-I374XGD2.cjs');require('../../chunk-GXMNHGBP.cjs');exports.cli = _chunkI374XGD2cjs.G; exports.run = _chunkI374XGD2cjs.H;
|
package/dist/node/cli/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{G as a,H as b}from"../../chunk-EG3RHL6A.mjs";import"../../chunk-WSC7UAH5.mjs";export{a as cli,b as run};
|
package/dist/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkI374XGD2cjs = require('../chunk-I374XGD2.cjs');require('../chunk-GXMNHGBP.cjs');exports.build = _chunkI374XGD2cjs.B; exports.cli = _chunkI374XGD2cjs.G; exports.createServer = _chunkI374XGD2cjs.F; exports.defaultSiteConfig = _chunkI374XGD2cjs.t; exports.defaultValaxyConfig = _chunkI374XGD2cjs.u; exports.defineAddon = _chunkI374XGD2cjs.n; exports.defineConfig = _chunkI374XGD2cjs.s; exports.defineSiteConfig = _chunkI374XGD2cjs.q; exports.defineTheme = _chunkI374XGD2cjs.p; exports.defineUnoSetup = _chunkI374XGD2cjs.v; exports.defineValaxyAddon = _chunkI374XGD2cjs.m; exports.defineValaxyConfig = _chunkI374XGD2cjs.r; exports.defineValaxyTheme = _chunkI374XGD2cjs.o; exports.ensurePrefix = _chunkI374XGD2cjs.d; exports.generateClientRedirects = _chunkI374XGD2cjs.E; exports.getGitTimestamp = _chunkI374XGD2cjs.a; exports.getIndexHtml = _chunkI374XGD2cjs.A; exports.isExternal = _chunkI374XGD2cjs.b; exports.isPath = _chunkI374XGD2cjs.f; exports.mergeValaxyConfig = _chunkI374XGD2cjs.g; exports.mergeViteConfigs = _chunkI374XGD2cjs.z; exports.postProcessForSSG = _chunkI374XGD2cjs.D; exports.processValaxyOptions = _chunkI374XGD2cjs.w; exports.resolveAddonConfig = _chunkI374XGD2cjs.j; exports.resolveImportPath = _chunkI374XGD2cjs.l; exports.resolveOptions = _chunkI374XGD2cjs.x; exports.resolveThemeValaxyConfig = _chunkI374XGD2cjs.y; exports.resolveValaxyConfig = _chunkI374XGD2cjs.i; exports.resolveValaxyConfigFromRoot = _chunkI374XGD2cjs.h; exports.run = _chunkI374XGD2cjs.H; exports.slash = _chunkI374XGD2cjs.c; exports.ssgBuild = _chunkI374XGD2cjs.C; exports.toAtFS = _chunkI374XGD2cjs.e; exports.transformObject = _chunkI374XGD2cjs.k;
|
package/dist/node/index.d.cts
CHANGED
|
@@ -2,11 +2,12 @@ import { ViteSSGOptions } from 'vite-ssg';
|
|
|
2
2
|
export { cli, run } from './cli/index.cjs';
|
|
3
3
|
import * as vite from 'vite';
|
|
4
4
|
import { UserConfig, InlineConfig } from 'vite';
|
|
5
|
-
import { D as DefaultTheme, V as ValaxyConfig, P as PartialDeep, a as ValaxyAddon, R as RuntimeConfig, U as UserSiteConfig, S as SiteConfig } from '../config-
|
|
5
|
+
import { D as DefaultTheme, V as ValaxyConfig, P as PartialDeep, a as ValaxyAddon, R as RuntimeConfig, U as UserSiteConfig, S as SiteConfig } from '../config-OaNeBI1c.cjs';
|
|
6
6
|
import Vue from '@vitejs/plugin-vue';
|
|
7
7
|
import Components from 'unplugin-vue-components/vite';
|
|
8
8
|
import { VitePluginConfig } from 'unocss/vite';
|
|
9
|
-
import
|
|
9
|
+
import VueRouter from 'unplugin-vue-router/vite';
|
|
10
|
+
import { EditableTreeNode } from 'unplugin-vue-router';
|
|
10
11
|
import { presetUno, presetAttributify, presetIcons, presetTypography } from 'unocss';
|
|
11
12
|
import { Hookable } from 'hookable';
|
|
12
13
|
import MarkdownIt from 'markdown-it';
|
|
@@ -165,20 +166,18 @@ interface ValaxyExtendConfig {
|
|
|
165
166
|
icons?: Parameters<typeof presetIcons>[0];
|
|
166
167
|
typography?: Parameters<typeof presetTypography>[0];
|
|
167
168
|
};
|
|
168
|
-
|
|
169
|
+
vueRouter?: Parameters<typeof VueRouter>[0];
|
|
170
|
+
/**
|
|
171
|
+
* @experimental
|
|
172
|
+
* Enable Vue Devtools & Valaxy Devtools
|
|
173
|
+
*/
|
|
174
|
+
devtools?: boolean;
|
|
169
175
|
/**
|
|
170
176
|
* for markdown
|
|
171
177
|
*/
|
|
172
178
|
markdown?: MarkdownOptions;
|
|
173
179
|
extendMd?: (ctx: {
|
|
174
|
-
route:
|
|
175
|
-
meta: {
|
|
176
|
-
frontmatter: Record<string, any>;
|
|
177
|
-
layout?: string;
|
|
178
|
-
} & object;
|
|
179
|
-
path: string;
|
|
180
|
-
component: string;
|
|
181
|
-
};
|
|
180
|
+
route: EditableTreeNode;
|
|
182
181
|
data: Readonly<Record<string, any>>;
|
|
183
182
|
content: string;
|
|
184
183
|
excerpt?: string;
|
|
@@ -286,16 +285,18 @@ declare function mergeViteConfigs({ userRoot, themeRoot }: ResolvedValaxyOptions
|
|
|
286
285
|
* generate index.html from user/theme/client
|
|
287
286
|
* @internal
|
|
288
287
|
*/
|
|
289
|
-
declare function getIndexHtml({ clientRoot, themeRoot, userRoot, config }: ResolvedValaxyOptions): Promise<string>;
|
|
288
|
+
declare function getIndexHtml({ clientRoot, themeRoot, userRoot, config }: ResolvedValaxyOptions, rawHtml: string): Promise<string>;
|
|
290
289
|
|
|
291
290
|
declare function build(options: ResolvedValaxyOptions, viteConfig?: InlineConfig): Promise<void>;
|
|
292
291
|
declare function ssgBuild(options: ResolvedValaxyOptions, viteConfig?: InlineConfig): Promise<void>;
|
|
293
292
|
/**
|
|
294
293
|
* post process for ssg fix extra string like `/html>` `ml>` `l>`
|
|
294
|
+
* handle tasks after ssg build
|
|
295
295
|
* todo find why
|
|
296
296
|
* @param options
|
|
297
297
|
*/
|
|
298
298
|
declare function postProcessForSSG(options: ResolvedValaxyOptions): Promise<void>;
|
|
299
|
+
declare function generateClientRedirects(options: ResolvedValaxyOptions): Promise<void>;
|
|
299
300
|
|
|
300
301
|
declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
|
|
301
302
|
setup?: ValaxyAddonResolver['setup'];
|
|
@@ -383,4 +384,4 @@ declare function resolveAddonConfig(addons: ValaxyAddonResolver[], options?: Res
|
|
|
383
384
|
declare function transformObject(obj: any): string;
|
|
384
385
|
declare function resolveImportPath(importName: string, ensure?: true): string;
|
|
385
386
|
|
|
386
|
-
export { type HookResult, type ResolvedValaxyOptions, type UnoSetup, type UserValaxyNodeConfig, type ValaxyAddonExport, type ValaxyAddonFn, type ValaxyAddonLike, type ValaxyAddonResolver, type ValaxyAddons, type ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type 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 };
|
|
387
|
+
export { type HookResult, type ResolvedValaxyOptions, type UnoSetup, type UserValaxyNodeConfig, type ValaxyAddonExport, type ValaxyAddonFn, type ValaxyAddonLike, type ValaxyAddonResolver, type ValaxyAddons, type ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, build, createServer, defaultSiteConfig, defaultValaxyConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, generateClientRedirects, getGitTimestamp, getIndexHtml, isExternal, isPath, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonConfig, resolveImportPath, resolveOptions, resolveThemeValaxyConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -2,11 +2,12 @@ import { ViteSSGOptions } from 'vite-ssg';
|
|
|
2
2
|
export { cli, run } from './cli/index.js';
|
|
3
3
|
import * as vite from 'vite';
|
|
4
4
|
import { UserConfig, InlineConfig } from 'vite';
|
|
5
|
-
import { D as DefaultTheme, V as ValaxyConfig, P as PartialDeep, a as ValaxyAddon, R as RuntimeConfig, U as UserSiteConfig, S as SiteConfig } from '../config-
|
|
5
|
+
import { D as DefaultTheme, V as ValaxyConfig, P as PartialDeep, a as ValaxyAddon, R as RuntimeConfig, U as UserSiteConfig, S as SiteConfig } from '../config-OaNeBI1c.js';
|
|
6
6
|
import Vue from '@vitejs/plugin-vue';
|
|
7
7
|
import Components from 'unplugin-vue-components/vite';
|
|
8
8
|
import { VitePluginConfig } from 'unocss/vite';
|
|
9
|
-
import
|
|
9
|
+
import VueRouter from 'unplugin-vue-router/vite';
|
|
10
|
+
import { EditableTreeNode } from 'unplugin-vue-router';
|
|
10
11
|
import { presetUno, presetAttributify, presetIcons, presetTypography } from 'unocss';
|
|
11
12
|
import { Hookable } from 'hookable';
|
|
12
13
|
import MarkdownIt from 'markdown-it';
|
|
@@ -165,20 +166,18 @@ interface ValaxyExtendConfig {
|
|
|
165
166
|
icons?: Parameters<typeof presetIcons>[0];
|
|
166
167
|
typography?: Parameters<typeof presetTypography>[0];
|
|
167
168
|
};
|
|
168
|
-
|
|
169
|
+
vueRouter?: Parameters<typeof VueRouter>[0];
|
|
170
|
+
/**
|
|
171
|
+
* @experimental
|
|
172
|
+
* Enable Vue Devtools & Valaxy Devtools
|
|
173
|
+
*/
|
|
174
|
+
devtools?: boolean;
|
|
169
175
|
/**
|
|
170
176
|
* for markdown
|
|
171
177
|
*/
|
|
172
178
|
markdown?: MarkdownOptions;
|
|
173
179
|
extendMd?: (ctx: {
|
|
174
|
-
route:
|
|
175
|
-
meta: {
|
|
176
|
-
frontmatter: Record<string, any>;
|
|
177
|
-
layout?: string;
|
|
178
|
-
} & object;
|
|
179
|
-
path: string;
|
|
180
|
-
component: string;
|
|
181
|
-
};
|
|
180
|
+
route: EditableTreeNode;
|
|
182
181
|
data: Readonly<Record<string, any>>;
|
|
183
182
|
content: string;
|
|
184
183
|
excerpt?: string;
|
|
@@ -286,16 +285,18 @@ declare function mergeViteConfigs({ userRoot, themeRoot }: ResolvedValaxyOptions
|
|
|
286
285
|
* generate index.html from user/theme/client
|
|
287
286
|
* @internal
|
|
288
287
|
*/
|
|
289
|
-
declare function getIndexHtml({ clientRoot, themeRoot, userRoot, config }: ResolvedValaxyOptions): Promise<string>;
|
|
288
|
+
declare function getIndexHtml({ clientRoot, themeRoot, userRoot, config }: ResolvedValaxyOptions, rawHtml: string): Promise<string>;
|
|
290
289
|
|
|
291
290
|
declare function build(options: ResolvedValaxyOptions, viteConfig?: InlineConfig): Promise<void>;
|
|
292
291
|
declare function ssgBuild(options: ResolvedValaxyOptions, viteConfig?: InlineConfig): Promise<void>;
|
|
293
292
|
/**
|
|
294
293
|
* post process for ssg fix extra string like `/html>` `ml>` `l>`
|
|
294
|
+
* handle tasks after ssg build
|
|
295
295
|
* todo find why
|
|
296
296
|
* @param options
|
|
297
297
|
*/
|
|
298
298
|
declare function postProcessForSSG(options: ResolvedValaxyOptions): Promise<void>;
|
|
299
|
+
declare function generateClientRedirects(options: ResolvedValaxyOptions): Promise<void>;
|
|
299
300
|
|
|
300
301
|
declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
|
|
301
302
|
setup?: ValaxyAddonResolver['setup'];
|
|
@@ -383,4 +384,4 @@ declare function resolveAddonConfig(addons: ValaxyAddonResolver[], options?: Res
|
|
|
383
384
|
declare function transformObject(obj: any): string;
|
|
384
385
|
declare function resolveImportPath(importName: string, ensure?: true): string;
|
|
385
386
|
|
|
386
|
-
export { type HookResult, type ResolvedValaxyOptions, type UnoSetup, type UserValaxyNodeConfig, type ValaxyAddonExport, type ValaxyAddonFn, type ValaxyAddonLike, type ValaxyAddonResolver, type ValaxyAddons, type ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type 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 };
|
|
387
|
+
export { type HookResult, type ResolvedValaxyOptions, type UnoSetup, type UserValaxyNodeConfig, type ValaxyAddonExport, type ValaxyAddonFn, type ValaxyAddonLike, type ValaxyAddonResolver, type ValaxyAddons, type ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, build, createServer, defaultSiteConfig, defaultValaxyConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, generateClientRedirects, getGitTimestamp, getIndexHtml, isExternal, isPath, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonConfig, resolveImportPath, resolveOptions, resolveThemeValaxyConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
|
package/dist/node/index.mjs
CHANGED
|
@@ -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,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-
|
|
2
|
+
import{A,B,C,D,E,F,G,H,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-EG3RHL6A.mjs";import"../chunk-WSC7UAH5.mjs";export{B as build,G as cli,F as createServer,t as defaultSiteConfig,u as defaultValaxyConfig,n as defineAddon,s as defineConfig,q as defineSiteConfig,p as defineTheme,v as defineUnoSetup,m as defineValaxyAddon,r as defineValaxyConfig,o as defineValaxyTheme,d as ensurePrefix,E as generateClientRedirects,a as getGitTimestamp,A as getIndexHtml,b as isExternal,f as isPath,g as mergeValaxyConfig,z as mergeViteConfigs,D as postProcessForSSG,w as processValaxyOptions,j as resolveAddonConfig,l as resolveImportPath,x as resolveOptions,y as resolveThemeValaxyConfig,i as resolveValaxyConfig,h as resolveValaxyConfigFromRoot,H as run,c as slash,C as ssgBuild,e as toAtFS,k as transformObject};
|
package/dist/types/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var _chunkGXMNHGBPcjs = require('../chunk-GXMNHGBP.cjs');_chunkGXMNHGBPcjs.e.call(void 0, );_chunkGXMNHGBPcjs.e.call(void 0, );_chunkGXMNHGBPcjs.e.call(void 0, );_chunkGXMNHGBPcjs.e.call(void 0, );_chunkGXMNHGBPcjs.e.call(void 0, );_chunkGXMNHGBPcjs.e.call(void 0, );_chunkGXMNHGBPcjs.e.call(void 0, );
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as Post } from '../config-
|
|
2
|
-
export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem,
|
|
1
|
+
import { b as Post } from '../config-OaNeBI1c.cjs';
|
|
2
|
+
export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem, i as Page, g as PageFrontMatter, P as PartialDeep, f as Photo, h as PostFrontMatter, d as RedirectRule, R as RuntimeConfig, S as SiteConfig, c as SocialLink, U as UserSiteConfig, e as UserValaxyConfig, a as ValaxyAddon, V as ValaxyConfig } from '../config-OaNeBI1c.cjs';
|
|
3
3
|
import 'medium-zoom';
|
|
4
4
|
import '@vueuse/integrations/useFuse';
|
|
5
5
|
import 'vanilla-lazyload';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as Post } from '../config-
|
|
2
|
-
export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem,
|
|
1
|
+
import { b as Post } from '../config-OaNeBI1c.js';
|
|
2
|
+
export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem, i as Page, g as PageFrontMatter, P as PartialDeep, f as Photo, h as PostFrontMatter, d as RedirectRule, R as RuntimeConfig, S as SiteConfig, c as SocialLink, U as UserSiteConfig, e as UserValaxyConfig, a as ValaxyAddon, V as ValaxyConfig } from '../config-OaNeBI1c.js';
|
|
3
3
|
import 'medium-zoom';
|
|
4
4
|
import '@vueuse/integrations/useFuse';
|
|
5
5
|
import 'vanilla-lazyload';
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
-
import{e}from"../chunk-
|
|
2
|
+
import{d as e}from"../chunk-WSC7UAH5.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.
|
|
4
|
+
"version": "0.17.0-beta.1",
|
|
5
5
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"./types": "./dist/types/index.d.ts",
|
|
36
36
|
"./*": "./*"
|
|
37
37
|
},
|
|
38
|
-
"main": "dist/node/index.
|
|
38
|
+
"main": "dist/node/index.mjs",
|
|
39
39
|
"module": "dist/node/index.mjs",
|
|
40
40
|
"types": "index.d.ts",
|
|
41
41
|
"bin": {
|
|
@@ -65,16 +65,17 @@
|
|
|
65
65
|
"@unhead/addons": "^1.8.9",
|
|
66
66
|
"@unhead/schema-org": "^1.8.9",
|
|
67
67
|
"@unhead/vue": "^1.8.9",
|
|
68
|
-
"@vitejs/plugin-vue": "^5.0.
|
|
69
|
-
"@
|
|
70
|
-
"@vueuse/
|
|
68
|
+
"@vitejs/plugin-vue": "^5.0.3",
|
|
69
|
+
"@vue/devtools-api": "^7.0.10",
|
|
70
|
+
"@vueuse/core": "^10.7.2",
|
|
71
|
+
"@vueuse/integrations": "^10.7.2",
|
|
71
72
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
72
73
|
"consola": "^3.2.3",
|
|
73
74
|
"critters": "^0.0.20",
|
|
74
75
|
"cross-spawn": "^7.0.3",
|
|
75
76
|
"css-i18n": "^0.0.2",
|
|
76
77
|
"dayjs": "^1.11.10",
|
|
77
|
-
"defu": "^6.1.
|
|
78
|
+
"defu": "^6.1.4",
|
|
78
79
|
"ejs": "^3.1.9",
|
|
79
80
|
"escape-html": "^1.0.3",
|
|
80
81
|
"feed": "^4.2.2",
|
|
@@ -97,25 +98,26 @@
|
|
|
97
98
|
"markdown-it-task-lists": "^2.1.1",
|
|
98
99
|
"medium-zoom": "^1.1.0",
|
|
99
100
|
"nprogress": "^0.2.0",
|
|
100
|
-
"open": "10.0.
|
|
101
|
-
"ora": "^
|
|
101
|
+
"open": "10.0.3",
|
|
102
|
+
"ora": "^8.0.1",
|
|
102
103
|
"pascalcase": "^2.0.0",
|
|
103
104
|
"pinia": "^2.1.7",
|
|
104
105
|
"qrcode": "^1.5.3",
|
|
105
|
-
"sass": "^1.69.
|
|
106
|
+
"sass": "^1.69.7",
|
|
106
107
|
"shiki": "^0.14.7",
|
|
107
108
|
"star-markdown-css": "^0.4.2",
|
|
108
109
|
"unconfig": "^0.3.11",
|
|
109
|
-
"unocss": "^0.58.
|
|
110
|
+
"unocss": "^0.58.3",
|
|
110
111
|
"unplugin-vue-components": "^0.26.0",
|
|
112
|
+
"unplugin-vue-router": "^0.7.0",
|
|
111
113
|
"vanilla-lazyload": "^17.8.5",
|
|
112
|
-
"vite": "^5.0.
|
|
113
|
-
"vite-plugin-
|
|
114
|
+
"vite": "^5.0.11",
|
|
115
|
+
"vite-plugin-vue-devtools": "^7.0.10",
|
|
114
116
|
"vite-plugin-vue-layouts": "0.11.0",
|
|
115
117
|
"vite-ssg": "0.23.6",
|
|
116
118
|
"vite-ssg-sitemap": "0.6.1",
|
|
117
|
-
"vue": "^3.4.
|
|
118
|
-
"vue-i18n": "^9.
|
|
119
|
+
"vue": "^3.4.13",
|
|
120
|
+
"vue-i18n": "^9.9.0",
|
|
119
121
|
"vue-router": "^4.2.5",
|
|
120
122
|
"yargs": "^17.7.2"
|
|
121
123
|
},
|
package/types/config.ts
CHANGED
|
@@ -22,6 +22,11 @@ export interface SocialLink {
|
|
|
22
22
|
color: string
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
export interface RedirectRule {
|
|
26
|
+
to: string
|
|
27
|
+
from: string | string[]
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
// shared with valaxy node and client
|
|
26
31
|
export interface SiteConfig {
|
|
27
32
|
/**
|
|
@@ -313,6 +318,12 @@ export interface SiteConfig {
|
|
|
313
318
|
* @description:zh-CN 限制代码块的高度,单位是 px
|
|
314
319
|
*/
|
|
315
320
|
codeHeightLimit?: number
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* @description:en-US client redirect rules
|
|
324
|
+
* @description:zh-CN 客户端重定向规则
|
|
325
|
+
*/
|
|
326
|
+
redirects?: RedirectRule[]
|
|
316
327
|
}
|
|
317
328
|
|
|
318
329
|
export type PartialDeep<T> = {
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
// (Component as any) will crush page rendering
|
|
3
|
-
import { asAny } from 'valaxy'
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<template>
|
|
7
|
-
<RouterView v-slot="{ Component }">
|
|
8
|
-
<Component :is="asAny(Component)">
|
|
9
|
-
<template #main-header>
|
|
10
|
-
<slot name="main-header" />
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<template #main-header-after>
|
|
14
|
-
<slot name="main-header-after" />
|
|
15
|
-
</template>
|
|
16
|
-
<template #main>
|
|
17
|
-
<slot name="main" />
|
|
18
|
-
</template>
|
|
19
|
-
<template #main-content>
|
|
20
|
-
<slot name="main-content" />
|
|
21
|
-
</template>
|
|
22
|
-
<template #main-content-after>
|
|
23
|
-
<slot name="main-content-after" />
|
|
24
|
-
</template>
|
|
25
|
-
<template #main-nav-before>
|
|
26
|
-
<slot name="main-nav-before" />
|
|
27
|
-
</template>
|
|
28
|
-
<template #main-nav-after>
|
|
29
|
-
<slot name="main-nav-after" />
|
|
30
|
-
</template>
|
|
31
|
-
<template #aside-custom>
|
|
32
|
-
<slot name="aside-custom" />
|
|
33
|
-
</template>
|
|
34
|
-
<template #footer>
|
|
35
|
-
<slot name="footer" />
|
|
36
|
-
</template>
|
|
37
|
-
</Component>
|
|
38
|
-
</RouterView>
|
|
39
|
-
</template>
|