valaxy 0.25.11 → 0.26.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.
@@ -0,0 +1,60 @@
1
+ import { UseDarkOptions } from '@vueuse/core';
2
+
3
+ interface ValaxyAddon<AddonOptions = Record<string, any>> {
4
+ name: string;
5
+ /**
6
+ * be global component
7
+ */
8
+ global?: boolean;
9
+ props?: Record<string, any>;
10
+ options?: AddonOptions;
11
+ }
12
+
13
+ declare namespace DefaultTheme {
14
+ interface Config {
15
+ valaxyDarkOptions?: {
16
+ /**
17
+ * Options for `useDark`
18
+ * disableTransition default is `true`
19
+ * Its options are not computed, init when loaded.
20
+ * @see https://vueuse.org/core/useDark
21
+ * @url https://paco.me/writing/disable-theme-transitions
22
+ *
23
+ * @zh `useDark` 的选项
24
+ * disableTransition 默认为 `true`,不会进行渐变过渡,这是 VueUse 的默认行为
25
+ */
26
+ useDarkOptions?: UseDarkOptions;
27
+ /**
28
+ * Enable circle transition when toggling dark mode
29
+ * Then use `toggleDarkWithTransition` instead of `toggleDark`
30
+ * @zh 启用圆形过渡切换暗黑模式
31
+ */
32
+ circleTransition?: boolean;
33
+ /**
34
+ * Theme color
35
+ * @zh 主题色
36
+ */
37
+ themeColor?: {
38
+ /**
39
+ * Theme color for light mode
40
+ * @zh 亮色主题色
41
+ */
42
+ light?: string;
43
+ /**
44
+ * Theme color for dark mode
45
+ * @zh 暗色主题色
46
+ */
47
+ dark?: string;
48
+ };
49
+ };
50
+ /**
51
+ * Custom header levels of outline in the aside component.
52
+ *
53
+ * @default 2
54
+ */
55
+ outline?: number | [number, number] | 'deep' | false;
56
+ }
57
+ }
58
+
59
+ export { DefaultTheme as D };
60
+ export type { ValaxyAddon as V };
@@ -1,65 +1,11 @@
1
+ import { V as ValaxyAddon, D as DefaultTheme } from '../shared/valaxy.D_ue8jlC.mjs';
1
2
  import { FuseOptions } from '@vueuse/integrations/useFuse';
2
3
  import { ZoomOptions } from 'medium-zoom';
3
4
  import { ILazyLoadOptions } from 'vanilla-lazyload';
4
5
  import { RouteRecordRaw } from 'vue-router';
5
- import { UseDarkOptions } from '@vueuse/core';
6
6
  import { NodeRelations, ImageObject } from '@unhead/schema-org';
7
-
8
- interface ValaxyAddon<AddonOptions = Record<string, any>> {
9
- name: string;
10
- /**
11
- * be global component
12
- */
13
- global?: boolean;
14
- props?: Record<string, any>;
15
- options?: AddonOptions;
16
- }
17
-
18
- declare namespace DefaultTheme {
19
- interface Config {
20
- valaxyDarkOptions?: {
21
- /**
22
- * Options for `useDark`
23
- * disableTransition default is `true`
24
- * Its options are not computed, init when loaded.
25
- * @see https://vueuse.org/core/useDark
26
- * @url https://paco.me/writing/disable-theme-transitions
27
- *
28
- * @zh `useDark` 的选项
29
- * disableTransition 默认为 `true`,不会进行渐变过渡,这是 VueUse 的默认行为
30
- */
31
- useDarkOptions?: UseDarkOptions;
32
- /**
33
- * Enable circle transition when toggling dark mode
34
- * Then use `toggleDarkWithTransition` instead of `toggleDark`
35
- * @zh 启用圆形过渡切换暗黑模式
36
- */
37
- circleTransition?: boolean;
38
- /**
39
- * Theme color
40
- * @zh 主题色
41
- */
42
- themeColor?: {
43
- /**
44
- * Theme color for light mode
45
- * @zh 亮色主题色
46
- */
47
- light?: string;
48
- /**
49
- * Theme color for dark mode
50
- * @zh 暗色主题色
51
- */
52
- dark?: string;
53
- };
54
- };
55
- /**
56
- * Custom header levels of outline in the aside component.
57
- *
58
- * @default 2
59
- */
60
- outline?: number | [number, number] | 'deep' | false;
61
- }
62
- }
7
+ import { Header } from '@valaxyjs/utils';
8
+ import '@vueuse/core';
63
9
 
64
10
  interface CollectionConfig {
65
11
  title?: string;
@@ -120,21 +66,7 @@ interface Photo {
120
66
  caption: string;
121
67
  desc: string;
122
68
  }
123
- interface PageFrontMatter extends Record<string, any> {
124
- /**
125
- * Path of post
126
- * route.path
127
- * @description 路径
128
- */
129
- path: string;
130
- /**
131
- * abbrlink
132
- *
133
- * generated by valaxy-addon-abbrlink, do not manually modify
134
- *
135
- * just compatible for [hexo-abbrlink](https://github.com/ohroy/hexo-abbrlink)
136
- */
137
- abbrlink: string;
69
+ interface BaseFrontMatter extends Record<string, any> {
138
70
  /**
139
71
  * Title
140
72
  * @description 文章标题
@@ -145,6 +77,8 @@ interface PageFrontMatter extends Record<string, any> {
145
77
  * ---
146
78
  * ```
147
79
  *
80
+ * i18n:
81
+ *
148
82
  * ```md
149
83
  * ---
150
84
  * title:
@@ -154,11 +88,31 @@ interface PageFrontMatter extends Record<string, any> {
154
88
  * ```
155
89
  */
156
90
  title: string | Record<string, string>;
91
+ /**
92
+ * @description:en-US Created Date
93
+ * @description:zh-CN 文章创建日期
94
+ */
157
95
  date: string | number | Date;
158
96
  /**
159
97
  * Updated Time
160
98
  */
161
99
  updated: string | number | Date;
100
+ }
101
+ interface PageFrontMatter extends BaseFrontMatter {
102
+ /**
103
+ * Path of post
104
+ * route.path
105
+ * @description 路径
106
+ */
107
+ path: string;
108
+ /**
109
+ * abbrlink
110
+ *
111
+ * generated by valaxy-addon-abbrlink, do not manually modify
112
+ *
113
+ * just compatible for [hexo-abbrlink](https://github.com/ohroy/hexo-abbrlink)
114
+ */
115
+ abbrlink: string;
162
116
  /**
163
117
  * i18n
164
118
  */
@@ -178,6 +132,10 @@ interface PageFrontMatter extends Record<string, any> {
178
132
  * @description 是否显示文章底部版权信息
179
133
  */
180
134
  copyright: boolean;
135
+ /**
136
+ * for seo
137
+ * schema
138
+ */
181
139
  image: NodeRelations<ImageObject | string>;
182
140
  /**
183
141
  * cover
@@ -816,4 +774,29 @@ type UserSiteConfig = PartialDeep<SiteConfig>;
816
774
  */
817
775
  type UserValaxyConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyConfig<ThemeConfig>>;
818
776
 
819
- 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 RedirectItem as b, type PostFrontMatter as c, type PageFrontMatter as d, type SocialLink as e, type RedirectRule as f, type Pkg as g, type UserValaxyConfig as h, type Photo as i };
777
+ type Page = Partial<PageFrontMatter>;
778
+ type Post = Partial<PostFrontMatter>;
779
+
780
+ type CleanUrlsMode = 'disabled' | 'without-subfolders' | 'with-subfolders';
781
+ interface PageData {
782
+ relativePath: string;
783
+ /**
784
+ * differs from relativePath in case of path rewrites
785
+ * absolute file path
786
+ */
787
+ filePath?: string;
788
+ title: string;
789
+ titleTemplate?: string;
790
+ description: string;
791
+ headers: Header[];
792
+ frontmatter: Post;
793
+ lastUpdated?: number;
794
+ }
795
+ interface PageDataPayload {
796
+ path: string;
797
+ pageData: PageData;
798
+ }
799
+ type HeadConfig = [string, Record<string, string>] | [string, Record<string, string>, string];
800
+
801
+ export { DefaultTheme, ValaxyAddon };
802
+ export type { Album, BaseFrontMatter, CleanUrlsMode, ExcerptType, FuseListItem, HeadConfig, Page, PageData, PageDataPayload, PageFrontMatter, PartialDeep, Photo, Pkg, Post, PostFrontMatter, RedirectItem, RedirectRule, RuntimeConfig, SiteConfig, SocialLink, UserSiteConfig, UserValaxyConfig, ValaxyConfig };
@@ -0,0 +1 @@
1
+
package/index.d.ts CHANGED
@@ -4,5 +4,5 @@
4
4
 
5
5
  export * from './shims'
6
6
  export * from './client/index'
7
- export * from './dist/node/index'
8
- export * from './dist/types/index'
7
+ export * from './dist/node/index.mjs'
8
+ export * from './dist/types/index.mjs'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.25.11",
4
+ "version": "0.26.1",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -22,23 +22,24 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "types": "./index.d.ts",
25
- "default": "./dist/node/index.js"
25
+ "default": "./dist/node/index.mjs"
26
26
  },
27
27
  "./client/*": "./client/*",
28
- "./client": "./client/index.ts",
28
+ "./client": "./client/shims.d.ts",
29
29
  "./node": {
30
- "types": "./dist/node/index.d.ts",
31
- "default": "./dist/node/index.js"
30
+ "types": "./dist/node/index.d.mts",
31
+ "default": "./dist/node/index.mjs"
32
32
  },
33
- "./types": "./dist/types/index.d.ts",
33
+ "./package.json": "./package.json",
34
+ "./types": "./dist/types/index.d.mts",
34
35
  "./*": "./*"
35
36
  },
36
- "main": "dist/node/index.js",
37
- "module": "dist/node/index.js",
37
+ "main": "dist/node/index.mjs",
38
+ "module": "dist/node/index.mjs",
38
39
  "types": "index.d.ts",
39
40
  "bin": {
40
- "vala": "./bin/valaxy.js",
41
- "valaxy": "./bin/valaxy.js"
41
+ "vala": "./bin/valaxy.mjs",
42
+ "valaxy": "./bin/valaxy.mjs"
42
43
  },
43
44
  "files": [
44
45
  "bin",
@@ -58,22 +59,22 @@
58
59
  "@clack/prompts": "^0.11.0",
59
60
  "@iconify-json/ri": "^1.2.5",
60
61
  "@intlify/unplugin-vue-i18n": "^6.0.8",
61
- "@shikijs/transformers": "^3.8.1",
62
+ "@shikijs/transformers": "^3.9.1",
62
63
  "@types/katex": "^0.16.7",
63
- "@unhead/addons": "^2.0.12",
64
- "@unhead/schema-org": "^2.0.12",
65
- "@unhead/vue": "^2.0.12",
66
- "@vitejs/plugin-vue": "^6.0.0",
64
+ "@unhead/addons": "^2.0.13",
65
+ "@unhead/schema-org": "^2.0.13",
66
+ "@unhead/vue": "^2.0.13",
67
+ "@vitejs/plugin-vue": "^6.0.1",
67
68
  "@vue/devtools-api": "7.7.2",
68
- "@vueuse/core": "^13.5.0",
69
- "@vueuse/integrations": "^13.5.0",
69
+ "@vueuse/core": "^13.6.0",
70
+ "@vueuse/integrations": "^13.6.0",
70
71
  "beasties": "^0.3.5",
71
72
  "consola": "^3.4.2",
72
73
  "cross-spawn": "^7.0.6",
73
74
  "css-i18n": "^0.0.5",
74
75
  "dayjs": "^1.11.13",
75
76
  "debug": "^4.4.1",
76
- "define-config-ts": "^0.0.3",
77
+ "define-config-ts": "^0.1.2",
77
78
  "defu": "^6.1.4",
78
79
  "ejs": "^3.1.10",
79
80
  "escape-html": "^1.0.3",
@@ -112,18 +113,18 @@
112
113
  "qrcode": "^1.5.4",
113
114
  "resolve-global": "^2.0.0",
114
115
  "sass": "^1.89.2",
115
- "shiki": "^3.8.1",
116
+ "shiki": "^3.9.1",
116
117
  "star-markdown-css": "^0.5.3",
117
118
  "table": "^6.9.0",
118
- "unhead": "^2.0.12",
119
- "unocss": "^66.3.3",
119
+ "unhead": "^2.0.13",
120
+ "unocss": "^66.4.0",
120
121
  "unplugin-vue-components": "28.0.0",
121
122
  "unplugin-vue-markdown": "^29.1.0",
122
123
  "unplugin-vue-router": "^0.14.0",
123
124
  "vanilla-lazyload": "^19.1.3",
124
125
  "vite": "^7.0.6",
125
126
  "vite-dev-rpc": "^1.1.0",
126
- "vite-plugin-vue-devtools": "^7.7.7",
127
+ "vite-plugin-vue-devtools": "^8.0.0",
127
128
  "vite-plugin-vue-layouts": "^0.11.0",
128
129
  "vite-ssg": "^28.0.0",
129
130
  "vite-ssg-sitemap": "^0.10.0",
@@ -132,8 +133,8 @@
132
133
  "vue-i18n": "^11.1.11",
133
134
  "vue-router": "^4.5.1",
134
135
  "yargs": "^18.0.0",
135
- "@valaxyjs/devtools": "0.25.11",
136
- "@valaxyjs/utils": "0.25.11"
136
+ "@valaxyjs/devtools": "0.26.1",
137
+ "@valaxyjs/utils": "0.26.1"
137
138
  },
138
139
  "devDependencies": {
139
140
  "@mdit-vue/plugin-component": "^2.1.4",
@@ -158,15 +159,16 @@
158
159
  "diacritics": "^1.3.0",
159
160
  "gh-pages": "^6.3.0",
160
161
  "https-localhost": "^4.7.1",
161
- "rollup-plugin-visualizer": "^6.0.3"
162
+ "rollup-plugin-visualizer": "^6.0.3",
163
+ "unbuild": "^3.6.0"
162
164
  },
163
165
  "resolutions": {
164
166
  "vite": "catalog:build"
165
167
  },
166
168
  "scripts": {
167
169
  "clean": "rimraf dist",
168
- "build": "rimraf dist && tsup",
169
- "dev": "tsup --watch",
170
+ "build": "unbuild",
171
+ "dev": "unbuild --stub",
170
172
  "preview": "vite preview",
171
173
  "preview-https": "serve dist",
172
174
  "release:beta": "bumpp --no-tag --no-commit --no-push && pnpm publish --no-git-checks --tag beta"
package/shims.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { Header } from '@valaxyjs/utils'
2
2
 
3
- // import './client/typed-router'
4
-
5
3
  import type { Ref } from 'vue'
4
+
6
5
  import type { Post } from './types'
7
6
  import 'vue-router'
7
+ import './client/shims'
8
8
 
9
9
  declare module 'valaxy-addon-*'
10
10
  declare module '@docsearch/js' {
package/types/config.ts CHANGED
@@ -2,7 +2,7 @@ import type { FuseOptions } from '@vueuse/integrations/useFuse'
2
2
  import type { ZoomOptions } from 'medium-zoom'
3
3
  import type { ILazyLoadOptions } from 'vanilla-lazyload'
4
4
  import type { RouteRecordRaw } from 'vue-router'
5
- import type { ValaxyAddon } from '../types'
5
+ import type { ValaxyAddon } from './addon'
6
6
  import type { DefaultTheme } from './default-theme'
7
7
  import type { PostFrontMatter } from './frontmatter'
8
8
  import type { FuseListItem } from './node'
@@ -27,21 +27,7 @@ export interface Photo {
27
27
  desc: string
28
28
  }
29
29
 
30
- export interface PageFrontMatter extends Record<string, any> {
31
- /**
32
- * Path of post
33
- * route.path
34
- * @description 路径
35
- */
36
- path: string
37
- /**
38
- * abbrlink
39
- *
40
- * generated by valaxy-addon-abbrlink, do not manually modify
41
- *
42
- * just compatible for [hexo-abbrlink](https://github.com/ohroy/hexo-abbrlink)
43
- */
44
- abbrlink: string
30
+ export interface BaseFrontMatter extends Record<string, any> {
45
31
  /**
46
32
  * Title
47
33
  * @description 文章标题
@@ -52,6 +38,8 @@ export interface PageFrontMatter extends Record<string, any> {
52
38
  * ---
53
39
  * ```
54
40
  *
41
+ * i18n:
42
+ *
55
43
  * ```md
56
44
  * ---
57
45
  * title:
@@ -61,11 +49,33 @@ export interface PageFrontMatter extends Record<string, any> {
61
49
  * ```
62
50
  */
63
51
  title: string | Record<string, string>
52
+ /**
53
+ * @description:en-US Created Date
54
+ * @description:zh-CN 文章创建日期
55
+ */
64
56
  date: string | number | Date
65
57
  /**
66
58
  * Updated Time
67
59
  */
68
60
  updated: string | number | Date
61
+ }
62
+
63
+ export interface PageFrontMatter extends BaseFrontMatter {
64
+ /**
65
+ * Path of post
66
+ * route.path
67
+ * @description 路径
68
+ */
69
+ path: string
70
+ /**
71
+ * abbrlink
72
+ *
73
+ * generated by valaxy-addon-abbrlink, do not manually modify
74
+ *
75
+ * just compatible for [hexo-abbrlink](https://github.com/ohroy/hexo-abbrlink)
76
+ */
77
+ abbrlink: string
78
+
69
79
  /**
70
80
  * i18n
71
81
  */
@@ -88,7 +98,10 @@ export interface PageFrontMatter extends Record<string, any> {
88
98
  */
89
99
  copyright: boolean
90
100
 
91
- // schema
101
+ /**
102
+ * for seo
103
+ * schema
104
+ */
92
105
  image: NodeRelations<ImageObject | string>
93
106
 
94
107
  /**
@@ -1,12 +0,0 @@
1
- import {
2
- cli,
3
- registerDevCommand,
4
- run,
5
- startValaxyDev
6
- } from "../../chunk-YYHL7OM3.js";
7
- export {
8
- cli,
9
- registerDevCommand,
10
- run,
11
- startValaxyDev
12
- };
@@ -1,104 +0,0 @@
1
- import {
2
- $t,
3
- ALL_ROUTE,
4
- EXCERPT_SEPARATOR,
5
- PATHNAME_PROTOCOL_RE,
6
- ViteValaxyPlugins,
7
- build,
8
- cli,
9
- createServer,
10
- createValaxyPlugin,
11
- customElements,
12
- defaultSiteConfig,
13
- defaultValaxyConfig,
14
- defaultViteConfig,
15
- defineAddon,
16
- defineConfig,
17
- defineSiteConfig,
18
- defineTheme,
19
- defineUnoSetup,
20
- defineValaxyAddon,
21
- defineValaxyConfig,
22
- defineValaxyTheme,
23
- generateClientRedirects,
24
- getGitTimestamp,
25
- getIndexHtml,
26
- getServerInfoText,
27
- isExternal,
28
- isInstalledGlobally,
29
- isPath,
30
- loadConfigFromFile,
31
- mergeValaxyConfig,
32
- mergeViteConfigs,
33
- postProcessForSSG,
34
- processValaxyOptions,
35
- registerDevCommand,
36
- resolveAddonsConfig,
37
- resolveImportPath,
38
- resolveImportUrl,
39
- resolveOptions,
40
- resolveSiteConfig,
41
- resolveSiteConfigFromRoot,
42
- resolveThemeConfigFromRoot,
43
- resolveThemeValaxyConfig,
44
- resolveUserThemeConfig,
45
- resolveValaxyConfig,
46
- resolveValaxyConfigFromRoot,
47
- run,
48
- ssgBuild,
49
- startValaxyDev,
50
- toAtFS,
51
- transformObject
52
- } from "../chunk-YYHL7OM3.js";
53
- export {
54
- $t,
55
- ALL_ROUTE,
56
- EXCERPT_SEPARATOR,
57
- PATHNAME_PROTOCOL_RE,
58
- ViteValaxyPlugins,
59
- build,
60
- cli,
61
- createServer,
62
- createValaxyPlugin,
63
- customElements,
64
- defaultSiteConfig,
65
- defaultValaxyConfig,
66
- defaultViteConfig,
67
- defineAddon,
68
- defineConfig,
69
- defineSiteConfig,
70
- defineTheme,
71
- defineUnoSetup,
72
- defineValaxyAddon,
73
- defineValaxyConfig,
74
- defineValaxyTheme,
75
- generateClientRedirects,
76
- getGitTimestamp,
77
- getIndexHtml,
78
- getServerInfoText,
79
- isExternal,
80
- isInstalledGlobally,
81
- isPath,
82
- loadConfigFromFile,
83
- mergeValaxyConfig,
84
- mergeViteConfigs,
85
- postProcessForSSG,
86
- processValaxyOptions,
87
- registerDevCommand,
88
- resolveAddonsConfig,
89
- resolveImportPath,
90
- resolveImportUrl,
91
- resolveOptions,
92
- resolveSiteConfig,
93
- resolveSiteConfigFromRoot,
94
- resolveThemeConfigFromRoot,
95
- resolveThemeValaxyConfig,
96
- resolveUserThemeConfig,
97
- resolveValaxyConfig,
98
- resolveValaxyConfigFromRoot,
99
- run,
100
- ssgBuild,
101
- startValaxyDev,
102
- toAtFS,
103
- transformObject
104
- };
@@ -1,35 +0,0 @@
1
- import { c as PostFrontMatter, d as PageFrontMatter } from '../config-bf4WqwPK.js';
2
- export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem, P as PartialDeep, i as Photo, g as Pkg, b as RedirectItem, f as RedirectRule, R as RuntimeConfig, S as SiteConfig, e as SocialLink, U as UserSiteConfig, h as UserValaxyConfig, a as ValaxyAddon, V as ValaxyConfig } from '../config-bf4WqwPK.js';
3
- import { Header } from '@valaxyjs/utils';
4
- import '@vueuse/integrations/useFuse';
5
- import 'medium-zoom';
6
- import 'vanilla-lazyload';
7
- import 'vue-router';
8
- import '@vueuse/core';
9
- import '@unhead/schema-org';
10
-
11
- type Page = Partial<PageFrontMatter>;
12
- type Post = Partial<PostFrontMatter>;
13
-
14
- type CleanUrlsMode = 'disabled' | 'without-subfolders' | 'with-subfolders';
15
- interface PageData {
16
- relativePath: string;
17
- /**
18
- * differs from relativePath in case of path rewrites
19
- * absolute file path
20
- */
21
- filePath?: string;
22
- title: string;
23
- titleTemplate?: string;
24
- description: string;
25
- headers: Header[];
26
- frontmatter: Post;
27
- lastUpdated?: number;
28
- }
29
- interface PageDataPayload {
30
- path: string;
31
- pageData: PageData;
32
- }
33
- type HeadConfig = [string, Record<string, string>] | [string, Record<string, string>, string];
34
-
35
- export { type CleanUrlsMode, type HeadConfig, type Page, type PageData, type PageDataPayload, PageFrontMatter, type Post, PostFrontMatter };
File without changes
File without changes