valaxy 0.16.4 → 0.17.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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk262FIKDLcjs = require('../../chunk-262FIKDL.cjs');require('../../chunk-GXMNHGBP.cjs');exports.cli = _chunk262FIKDLcjs.G; exports.run = _chunk262FIKDLcjs.H;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGZDC6BWcjs = require('../../chunk-HGZDC6BW.cjs');require('../../chunk-GXMNHGBP.cjs');exports.cli = _chunkHGZDC6BWcjs.G; exports.run = _chunkHGZDC6BWcjs.H;
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{G as a,H as b}from"../../chunk-XWKIRAYV.mjs";import"../../chunk-WSC7UAH5.mjs";export{a as cli,b as run};
2
+ import{G as a,H as b}from"../../chunk-RC63JCY7.mjs";import"../../chunk-WSC7UAH5.mjs";export{a as cli,b as run};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk262FIKDLcjs = require('../chunk-262FIKDL.cjs');require('../chunk-GXMNHGBP.cjs');exports.build = _chunk262FIKDLcjs.B; exports.cli = _chunk262FIKDLcjs.G; exports.createServer = _chunk262FIKDLcjs.F; exports.defaultSiteConfig = _chunk262FIKDLcjs.t; exports.defaultValaxyConfig = _chunk262FIKDLcjs.u; exports.defineAddon = _chunk262FIKDLcjs.n; exports.defineConfig = _chunk262FIKDLcjs.s; exports.defineSiteConfig = _chunk262FIKDLcjs.q; exports.defineTheme = _chunk262FIKDLcjs.p; exports.defineUnoSetup = _chunk262FIKDLcjs.v; exports.defineValaxyAddon = _chunk262FIKDLcjs.m; exports.defineValaxyConfig = _chunk262FIKDLcjs.r; exports.defineValaxyTheme = _chunk262FIKDLcjs.o; exports.ensurePrefix = _chunk262FIKDLcjs.d; exports.generateClientRedirects = _chunk262FIKDLcjs.E; exports.getGitTimestamp = _chunk262FIKDLcjs.a; exports.getIndexHtml = _chunk262FIKDLcjs.A; exports.isExternal = _chunk262FIKDLcjs.b; exports.isPath = _chunk262FIKDLcjs.f; exports.mergeValaxyConfig = _chunk262FIKDLcjs.g; exports.mergeViteConfigs = _chunk262FIKDLcjs.z; exports.postProcessForSSG = _chunk262FIKDLcjs.D; exports.processValaxyOptions = _chunk262FIKDLcjs.w; exports.resolveAddonConfig = _chunk262FIKDLcjs.j; exports.resolveImportPath = _chunk262FIKDLcjs.l; exports.resolveOptions = _chunk262FIKDLcjs.x; exports.resolveThemeValaxyConfig = _chunk262FIKDLcjs.y; exports.resolveValaxyConfig = _chunk262FIKDLcjs.i; exports.resolveValaxyConfigFromRoot = _chunk262FIKDLcjs.h; exports.run = _chunk262FIKDLcjs.H; exports.slash = _chunk262FIKDLcjs.c; exports.ssgBuild = _chunk262FIKDLcjs.C; exports.toAtFS = _chunk262FIKDLcjs.e; exports.transformObject = _chunk262FIKDLcjs.k;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHGZDC6BWcjs = require('../chunk-HGZDC6BW.cjs');require('../chunk-GXMNHGBP.cjs');exports.build = _chunkHGZDC6BWcjs.B; exports.cli = _chunkHGZDC6BWcjs.G; exports.createServer = _chunkHGZDC6BWcjs.F; exports.defaultSiteConfig = _chunkHGZDC6BWcjs.t; exports.defaultValaxyConfig = _chunkHGZDC6BWcjs.u; exports.defineAddon = _chunkHGZDC6BWcjs.n; exports.defineConfig = _chunkHGZDC6BWcjs.s; exports.defineSiteConfig = _chunkHGZDC6BWcjs.q; exports.defineTheme = _chunkHGZDC6BWcjs.p; exports.defineUnoSetup = _chunkHGZDC6BWcjs.v; exports.defineValaxyAddon = _chunkHGZDC6BWcjs.m; exports.defineValaxyConfig = _chunkHGZDC6BWcjs.r; exports.defineValaxyTheme = _chunkHGZDC6BWcjs.o; exports.ensurePrefix = _chunkHGZDC6BWcjs.d; exports.generateClientRedirects = _chunkHGZDC6BWcjs.E; exports.getGitTimestamp = _chunkHGZDC6BWcjs.a; exports.getIndexHtml = _chunkHGZDC6BWcjs.A; exports.isExternal = _chunkHGZDC6BWcjs.b; exports.isPath = _chunkHGZDC6BWcjs.f; exports.mergeValaxyConfig = _chunkHGZDC6BWcjs.g; exports.mergeViteConfigs = _chunkHGZDC6BWcjs.z; exports.postProcessForSSG = _chunkHGZDC6BWcjs.D; exports.processValaxyOptions = _chunkHGZDC6BWcjs.w; exports.resolveAddonConfig = _chunkHGZDC6BWcjs.j; exports.resolveImportPath = _chunkHGZDC6BWcjs.l; exports.resolveOptions = _chunkHGZDC6BWcjs.x; exports.resolveThemeValaxyConfig = _chunkHGZDC6BWcjs.y; exports.resolveValaxyConfig = _chunkHGZDC6BWcjs.i; exports.resolveValaxyConfigFromRoot = _chunkHGZDC6BWcjs.h; exports.run = _chunkHGZDC6BWcjs.H; exports.slash = _chunkHGZDC6BWcjs.c; exports.ssgBuild = _chunkHGZDC6BWcjs.C; exports.toAtFS = _chunkHGZDC6BWcjs.e; exports.transformObject = _chunkHGZDC6BWcjs.k;
@@ -6,7 +6,8 @@ import { D as DefaultTheme, V as ValaxyConfig, P as PartialDeep, a as ValaxyAddo
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 Pages from 'vite-plugin-pages';
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
- pages?: Parameters<typeof Pages>[0];
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,7 +285,7 @@ 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>;
@@ -6,7 +6,8 @@ import { D as DefaultTheme, V as ValaxyConfig, P as PartialDeep, a as ValaxyAddo
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 Pages from 'vite-plugin-pages';
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
- pages?: Parameters<typeof Pages>[0];
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,7 +285,7 @@ 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>;
@@ -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,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-XWKIRAYV.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};
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-RC63JCY7.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.16.4",
4
+ "version": "0.17.0-beta.2",
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.cjs",
38
+ "main": "dist/node/index.mjs",
39
39
  "module": "dist/node/index.mjs",
40
40
  "types": "index.d.ts",
41
41
  "bin": {
@@ -66,8 +66,9 @@
66
66
  "@unhead/schema-org": "^1.8.9",
67
67
  "@unhead/vue": "^1.8.9",
68
68
  "@vitejs/plugin-vue": "^5.0.3",
69
- "@vueuse/core": "^10.7.1",
70
- "@vueuse/integrations": "^10.7.1",
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",
@@ -108,9 +109,10 @@
108
109
  "unconfig": "^0.3.11",
109
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
114
  "vite": "^5.0.11",
113
- "vite-plugin-pages": "^0.32.0",
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",
@@ -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>