valaxy 0.26.0 → 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;
@@ -828,4 +774,29 @@ type UserSiteConfig = PartialDeep<SiteConfig>;
828
774
  */
829
775
  type UserValaxyConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyConfig<ThemeConfig>>;
830
776
 
831
- export { type Album as A, type BaseFrontMatter as B, DefaultTheme as D, type ExcerptType as E, type FuseListItem as F, type PartialDeep as P, type RedirectRule as R, type SocialLink as S, type UserSiteConfig as U, type ValaxyAddon as V, type PostFrontMatter as a, type PageFrontMatter as b, type RedirectItem as c, type SiteConfig as d, type RuntimeConfig as e, type Pkg as f, type ValaxyConfig 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.26.0",
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
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",
@@ -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.26.0",
136
- "@valaxyjs/utils": "0.26.0"
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"
@@ -1,12 +0,0 @@
1
- import {
2
- cli,
3
- registerDevCommand,
4
- run,
5
- startValaxyDev
6
- } from "../../chunk-INEH2Z2Z.js";
7
- export {
8
- cli,
9
- registerDevCommand,
10
- run,
11
- startValaxyDev
12
- };
@@ -1,106 +0,0 @@
1
- import {
2
- $t,
3
- ALL_ROUTE,
4
- EXCERPT_SEPARATOR,
5
- GLOBAL_STATE,
6
- PATHNAME_PROTOCOL_RE,
7
- ViteValaxyPlugins,
8
- build,
9
- cli,
10
- createServer,
11
- createValaxyPlugin,
12
- customElements,
13
- defaultSiteConfig,
14
- defaultValaxyConfig,
15
- defaultViteConfig,
16
- defineAddon,
17
- defineConfig,
18
- defineSiteConfig,
19
- defineTheme,
20
- defineUnoSetup,
21
- defineValaxyAddon,
22
- defineValaxyConfig,
23
- defineValaxyTheme,
24
- generateClientRedirects,
25
- getGitTimestamp,
26
- getIndexHtml,
27
- getServerInfoText,
28
- isExternal,
29
- isInstalledGlobally,
30
- isPath,
31
- loadConfigFromFile,
32
- mergeValaxyConfig,
33
- mergeViteConfigs,
34
- postProcessForSSG,
35
- processValaxyOptions,
36
- registerDevCommand,
37
- resolveAddonsConfig,
38
- resolveImportPath,
39
- resolveImportUrl,
40
- resolveOptions,
41
- resolveSiteConfig,
42
- resolveSiteConfigFromRoot,
43
- resolveThemeConfigFromRoot,
44
- resolveThemeValaxyConfig,
45
- resolveUserThemeConfig,
46
- resolveValaxyConfig,
47
- resolveValaxyConfigFromRoot,
48
- run,
49
- ssgBuild,
50
- startValaxyDev,
51
- toAtFS,
52
- transformObject
53
- } from "../chunk-INEH2Z2Z.js";
54
- export {
55
- $t,
56
- ALL_ROUTE,
57
- EXCERPT_SEPARATOR,
58
- GLOBAL_STATE,
59
- PATHNAME_PROTOCOL_RE,
60
- ViteValaxyPlugins,
61
- build,
62
- cli,
63
- createServer,
64
- createValaxyPlugin,
65
- customElements,
66
- defaultSiteConfig,
67
- defaultValaxyConfig,
68
- defaultViteConfig,
69
- defineAddon,
70
- defineConfig,
71
- defineSiteConfig,
72
- defineTheme,
73
- defineUnoSetup,
74
- defineValaxyAddon,
75
- defineValaxyConfig,
76
- defineValaxyTheme,
77
- generateClientRedirects,
78
- getGitTimestamp,
79
- getIndexHtml,
80
- getServerInfoText,
81
- isExternal,
82
- isInstalledGlobally,
83
- isPath,
84
- loadConfigFromFile,
85
- mergeValaxyConfig,
86
- mergeViteConfigs,
87
- postProcessForSSG,
88
- processValaxyOptions,
89
- registerDevCommand,
90
- resolveAddonsConfig,
91
- resolveImportPath,
92
- resolveImportUrl,
93
- resolveOptions,
94
- resolveSiteConfig,
95
- resolveSiteConfigFromRoot,
96
- resolveThemeConfigFromRoot,
97
- resolveThemeValaxyConfig,
98
- resolveUserThemeConfig,
99
- resolveValaxyConfig,
100
- resolveValaxyConfigFromRoot,
101
- run,
102
- ssgBuild,
103
- startValaxyDev,
104
- toAtFS,
105
- transformObject
106
- };
@@ -1,35 +0,0 @@
1
- import { a as PostFrontMatter, b as PageFrontMatter } from '../config-Dz-VnMOz.js';
2
- export { A as Album, B as BaseFrontMatter, D as DefaultTheme, E as ExcerptType, F as FuseListItem, P as PartialDeep, i as Photo, f as Pkg, c as RedirectItem, R as RedirectRule, e as RuntimeConfig, d as SiteConfig, S as SocialLink, U as UserSiteConfig, h as UserValaxyConfig, V as ValaxyAddon, g as ValaxyConfig } from '../config-Dz-VnMOz.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