valaxy 0.25.11 → 0.26.0

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.
@@ -15,7 +15,7 @@ export function getKeyMaterial(password: string) {
15
15
  )
16
16
  }
17
17
 
18
- export function getKey(keyMaterial: CryptoKey, salt: Uint8Array) {
18
+ export function getKey(keyMaterial: CryptoKey, salt: BufferSource) {
19
19
  return window.crypto.subtle.deriveKey(
20
20
  {
21
21
  name: 'PBKDF2',
@@ -35,7 +35,7 @@ export function useCollapseCode() {
35
35
 
36
36
  useEventListener('click', (e) => {
37
37
  const el = e.target as HTMLElement
38
- if (el.matches('[class*="language-"] > button.collapse')) {
38
+ if (el.matches('[class*="language-"] > button.code-block-unfold-btn')) {
39
39
  const parent = el.parentElement
40
40
  parent?.classList.remove('folded')
41
41
  const codeHeightLimitClass = `max-h-${codeHeightLimit}px`
@@ -227,7 +227,7 @@ html:not(.dark) .vp-code-dark {
227
227
  }
228
228
 
229
229
  // collapse
230
- [class*='language-']>button.collapse {
230
+ [class*='language-']>button.code-block-unfold-btn {
231
231
  display: none;
232
232
  position: absolute;
233
233
  z-index: 10;
@@ -251,7 +251,7 @@ html:not(.dark) .vp-code-dark {
251
251
  }
252
252
  }
253
253
 
254
- [class*='language-'].folded>button.collapse {
254
+ [class*='language-'].folded>button.code-block-unfold-btn {
255
255
  display: block;
256
256
  }
257
257
  }
@@ -4,7 +4,7 @@ import yargs from "yargs";
4
4
  import { hideBin } from "yargs/helpers";
5
5
 
6
6
  // package.json
7
- var version = "0.25.11";
7
+ var version = "0.26.0";
8
8
 
9
9
  // node/modules/fuse.ts
10
10
  import path4 from "path";
@@ -190,7 +190,8 @@ import { loadConfig } from "define-config-ts";
190
190
  async function loadConfigFromFile(file, options = {}) {
191
191
  const { config, configFile } = await loadConfig({
192
192
  name: file,
193
- cwd: options.cwd || process.cwd()
193
+ cwd: options.cwd || process.cwd(),
194
+ throwOnNotFound: false
194
195
  });
195
196
  let userConfig = config;
196
197
  if (typeof config === "function")
@@ -1195,6 +1196,65 @@ import { consola as consola15 } from "consola";
1195
1196
  import { colors as colors15 } from "consola/utils";
1196
1197
  import { mergeConfig as mergeConfig4 } from "vite";
1197
1198
 
1199
+ // node/app/index.ts
1200
+ import { createHooks } from "hookable";
1201
+
1202
+ // node/app/state.ts
1203
+ var StateManager = class {
1204
+ /**
1205
+ * @zh 文章 ID 映射
1206
+ */
1207
+ idMap = /* @__PURE__ */ new Map();
1208
+ };
1209
+
1210
+ // node/app/class.ts
1211
+ var Valaxy = class {
1212
+ /**
1213
+ * version
1214
+ */
1215
+ static version = version;
1216
+ /**
1217
+ * file state
1218
+ */
1219
+ static state = new StateManager();
1220
+ constructor() {
1221
+ }
1222
+ };
1223
+
1224
+ // node/app/index.ts
1225
+ var buildHooks = [
1226
+ "build:before",
1227
+ "build:after"
1228
+ ];
1229
+ function createValaxyNode(options) {
1230
+ const hooks = createHooks();
1231
+ if (typeof options.config.hooks === "object") {
1232
+ Object.keys(options.config.hooks).forEach((name) => {
1233
+ const hookName = name;
1234
+ const hook = options.config.hooks[hookName];
1235
+ if (typeof hook !== "function")
1236
+ return;
1237
+ if (buildHooks.includes(hookName)) {
1238
+ if (options.mode === "build")
1239
+ hooks.hook(hookName, hook);
1240
+ } else {
1241
+ hooks.hook(hookName, hook);
1242
+ }
1243
+ });
1244
+ }
1245
+ const valaxyNode = {
1246
+ version,
1247
+ hooks,
1248
+ hook: hooks.hook,
1249
+ options
1250
+ };
1251
+ options.addons.forEach((addon) => {
1252
+ if (typeof addon.setup === "function")
1253
+ addon.setup(valaxyNode);
1254
+ });
1255
+ return valaxyNode;
1256
+ }
1257
+
1198
1258
  // node/build.ts
1199
1259
  import { join as join8, resolve as resolve12 } from "path";
1200
1260
  import { consola as consola13 } from "consola";
@@ -2035,7 +2095,7 @@ function preWrapperPlugin(md3, options) {
2035
2095
  const lang = extractLang(token.info);
2036
2096
  const rawCode = fence(...args);
2037
2097
  const codeHeightLimitClass = getCodeHeightLimitStyle(options, env);
2038
- return `<div class="language-${lang}${active}${codeHeightLimitClass}"><button title="${options.codeCopyButtonTitle || "Copy code"}" class="copy"></button><span class="lang">${lang}</span>${rawCode}<button class="collapse"></button></div>`;
2098
+ return `<div class="language-${lang}${active}${codeHeightLimitClass}"><button title="${options.codeCopyButtonTitle || "Copy code"}" class="copy"></button><span class="lang">${lang}</span>${rawCode}<button class="code-block-unfold-btn"></button></div>`;
2039
2099
  };
2040
2100
  }
2041
2101
 
@@ -2618,28 +2678,6 @@ async function setupMarkdownPlugins(md3, options, base = "/") {
2618
2678
  // node/plugins/markdown/transform/index.ts
2619
2679
  import Markdown from "unplugin-vue-markdown/vite";
2620
2680
 
2621
- // node/app/state.ts
2622
- var StateManager = class {
2623
- /**
2624
- * @zh 文章 ID 映射
2625
- */
2626
- idMap = /* @__PURE__ */ new Map();
2627
- };
2628
-
2629
- // node/app/class.ts
2630
- var Valaxy = class {
2631
- /**
2632
- * version
2633
- */
2634
- static version = version;
2635
- /**
2636
- * file state
2637
- */
2638
- static state = new StateManager();
2639
- constructor() {
2640
- }
2641
- };
2642
-
2643
2681
  // node/plugins/markdown/transform/include.ts
2644
2682
  import { slash as slash2 } from "@antfu/utils";
2645
2683
  import path7 from "pathe";
@@ -2871,7 +2909,7 @@ import {
2871
2909
  presetAttributify,
2872
2910
  presetIcons,
2873
2911
  presetTypography,
2874
- presetUno,
2912
+ presetWind4,
2875
2913
  transformerDirectives,
2876
2914
  transformerVariantGroup
2877
2915
  } from "unocss";
@@ -2959,7 +2997,7 @@ async function createUnocssConfig(options) {
2959
2997
  ["va-card", "shadow hover:shadow-lg bg-$va-c-bg-light"]
2960
2998
  ],
2961
2999
  presets: [
2962
- presetUno(pluginOptions.unocssPresets?.uno),
3000
+ presetWind4(pluginOptions.unocssPresets?.wind4),
2963
3001
  presetAttributify(pluginOptions.unocssPresets?.attributify),
2964
3002
  presetIcons({
2965
3003
  scale: 1.2,
@@ -3177,41 +3215,6 @@ import _debug2 from "debug";
3177
3215
  import { LRUCache } from "lru-cache";
3178
3216
  import path12 from "pathe";
3179
3217
 
3180
- // node/app/index.ts
3181
- import { createHooks } from "hookable";
3182
- var buildHooks = [
3183
- "build:before",
3184
- "build:after"
3185
- ];
3186
- function createValaxyNode(options) {
3187
- const hooks = createHooks();
3188
- if (typeof options.config.hooks === "object") {
3189
- Object.keys(options.config.hooks).forEach((name) => {
3190
- const hookName = name;
3191
- const hook = options.config.hooks[hookName];
3192
- if (typeof hook !== "function")
3193
- return;
3194
- if (buildHooks.includes(hookName)) {
3195
- if (options.mode === "build")
3196
- hooks.hook(hookName, hook);
3197
- } else {
3198
- hooks.hook(hookName, hook);
3199
- }
3200
- });
3201
- }
3202
- const valaxyNode = {
3203
- version,
3204
- hooks,
3205
- hook: hooks.hook,
3206
- options
3207
- };
3208
- options.addons.forEach((addon) => {
3209
- if (typeof addon.setup === "function")
3210
- addon.setup(valaxyNode);
3211
- });
3212
- return valaxyNode;
3213
- }
3214
-
3215
3218
  // node/plugins/markdown/transform/code-block.ts
3216
3219
  function handleCodeHeightLimit(mainContentMd, options, codeHeightLimit) {
3217
3220
  if (typeof codeHeightLimit !== "number" || codeHeightLimit <= 0)
@@ -4236,6 +4239,21 @@ async function generateClientRedirects(options) {
4236
4239
  await Promise.all(task);
4237
4240
  }
4238
4241
 
4242
+ // node/cli/utils/cli.ts
4243
+ import os from "os";
4244
+ import path13 from "path";
4245
+ import process8 from "process";
4246
+ import { consola as consola14 } from "consola";
4247
+ import { colors as colors14 } from "consola/utils";
4248
+ import ora4 from "ora";
4249
+ import { mergeConfig as mergeConfig3 } from "vite";
4250
+
4251
+ // node/env.ts
4252
+ var GLOBAL_STATE = {
4253
+ valaxyApp: void 0,
4254
+ server: void 0
4255
+ };
4256
+
4239
4257
  // node/server.ts
4240
4258
  import process7 from "process";
4241
4259
  import { colors as colors13 } from "consola/utils";
@@ -4269,21 +4287,6 @@ async function createServer(valaxyApp, viteConfig = {}, serverOptions = {}) {
4269
4287
  return server;
4270
4288
  }
4271
4289
 
4272
- // node/cli/utils/cli.ts
4273
- import os from "os";
4274
- import path13 from "path";
4275
- import process8 from "process";
4276
- import { consola as consola14 } from "consola";
4277
- import { colors as colors14 } from "consola/utils";
4278
- import ora4 from "ora";
4279
- import { mergeConfig as mergeConfig3 } from "vite";
4280
-
4281
- // node/env.ts
4282
- var GLOBAL_STATE = {
4283
- valaxyApp: void 0,
4284
- server: void 0
4285
- };
4286
-
4287
4290
  // node/cli/utils/cli.ts
4288
4291
  function printInfo(options, port, remote) {
4289
4292
  const themeVersion = colors14.blue(`v${options.config.themeConfig?.pkg?.version}`) || "unknown";
@@ -4919,6 +4922,7 @@ export {
4919
4922
  ssgBuild,
4920
4923
  postProcessForSSG,
4921
4924
  generateClientRedirects,
4925
+ GLOBAL_STATE,
4922
4926
  getServerInfoText,
4923
4927
  createServer,
4924
4928
  startValaxyDev,
@@ -120,21 +120,7 @@ interface Photo {
120
120
  caption: string;
121
121
  desc: string;
122
122
  }
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;
123
+ interface BaseFrontMatter extends Record<string, any> {
138
124
  /**
139
125
  * Title
140
126
  * @description 文章标题
@@ -145,6 +131,8 @@ interface PageFrontMatter extends Record<string, any> {
145
131
  * ---
146
132
  * ```
147
133
  *
134
+ * i18n:
135
+ *
148
136
  * ```md
149
137
  * ---
150
138
  * title:
@@ -154,11 +142,31 @@ interface PageFrontMatter extends Record<string, any> {
154
142
  * ```
155
143
  */
156
144
  title: string | Record<string, string>;
145
+ /**
146
+ * @description:en-US Created Date
147
+ * @description:zh-CN 文章创建日期
148
+ */
157
149
  date: string | number | Date;
158
150
  /**
159
151
  * Updated Time
160
152
  */
161
153
  updated: string | number | Date;
154
+ }
155
+ interface PageFrontMatter extends BaseFrontMatter {
156
+ /**
157
+ * Path of post
158
+ * route.path
159
+ * @description 路径
160
+ */
161
+ path: string;
162
+ /**
163
+ * abbrlink
164
+ *
165
+ * generated by valaxy-addon-abbrlink, do not manually modify
166
+ *
167
+ * just compatible for [hexo-abbrlink](https://github.com/ohroy/hexo-abbrlink)
168
+ */
169
+ abbrlink: string;
162
170
  /**
163
171
  * i18n
164
172
  */
@@ -178,6 +186,10 @@ interface PageFrontMatter extends Record<string, any> {
178
186
  * @description 是否显示文章底部版权信息
179
187
  */
180
188
  copyright: boolean;
189
+ /**
190
+ * for seo
191
+ * schema
192
+ */
181
193
  image: NodeRelations<ImageObject | string>;
182
194
  /**
183
195
  * cover
@@ -816,4 +828,4 @@ type UserSiteConfig = PartialDeep<SiteConfig>;
816
828
  */
817
829
  type UserValaxyConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyConfig<ThemeConfig>>;
818
830
 
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 };
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 };
@@ -3,7 +3,7 @@ import {
3
3
  registerDevCommand,
4
4
  run,
5
5
  startValaxyDev
6
- } from "../../chunk-YYHL7OM3.js";
6
+ } from "../../chunk-INEH2Z2Z.js";
7
7
  export {
8
8
  cli,
9
9
  registerDevCommand,
@@ -1,13 +1,14 @@
1
1
  import { ViteSSGOptions } from 'vite-ssg';
2
2
  import * as vite from 'vite';
3
- import { UserConfig, InlineConfig, PluginOption, Plugin } from 'vite';
3
+ import { UserConfig, InlineConfig, ViteDevServer, PluginOption, Plugin } from 'vite';
4
4
  import { MarkdownEnv } from 'unplugin-vue-markdown/types';
5
- import { D as DefaultTheme, V as ValaxyConfig, a as ValaxyAddon, P as PartialDeep, R as RuntimeConfig, b as RedirectItem, S as SiteConfig, U as UserSiteConfig } from '../config-bf4WqwPK.js';
5
+ import * as valaxy_types from 'valaxy/types';
6
+ import { DefaultTheme, ValaxyConfig, ValaxyAddon, PartialDeep, RuntimeConfig, RedirectItem, SiteConfig, UserSiteConfig } from 'valaxy/types';
6
7
  import Vue from '@vitejs/plugin-vue';
7
8
  import { Options as Options$2 } from 'beasties';
8
9
  import { Hookable } from 'hookable';
9
10
  import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
10
- import { presetUno, presetAttributify, presetIcons, presetTypography } from 'unocss';
11
+ import { presetUno, presetAttributify, presetIcons, presetTypography, presetWind4 } from 'unocss';
11
12
  import { VitePluginConfig } from 'unocss/vite';
12
13
  import Components from 'unplugin-vue-components/vite';
13
14
  import Markdown from 'unplugin-vue-markdown/vite';
@@ -25,14 +26,15 @@ import { Options, MarkdownItAsync } from 'markdown-it-async';
25
26
  import { ThemeRegistration, BuiltinTheme, LanguageInput, ShikiTransformer, Highlighter } from 'shiki';
26
27
  export { cli, registerDevCommand, run, startValaxyDev } from './cli/index.js';
27
28
  import { Awaitable } from '@antfu/utils';
29
+ import { V as ValaxyAddon$1, D as DefaultTheme$1, P as PartialDeep$1 } from '../config-Dz-VnMOz.js';
28
30
  import * as defu from 'defu';
31
+ import 'yargs';
29
32
  import '@vueuse/integrations/useFuse';
30
33
  import 'medium-zoom';
31
34
  import 'vanilla-lazyload';
32
35
  import 'vue-router';
33
36
  import '@vueuse/core';
34
37
  import '@unhead/schema-org';
35
- import 'yargs';
36
38
 
37
39
  declare module 'vite' {
38
40
  interface UserConfig {
@@ -327,10 +329,14 @@ interface ValaxyExtendConfig {
327
329
  * @see https://unocss.dev/guide/presets
328
330
  */
329
331
  unocssPresets?: {
332
+ /**
333
+ * @deprecated use wind4 instead
334
+ */
330
335
  uno?: Parameters<typeof presetUno>[0];
331
336
  attributify?: Parameters<typeof presetAttributify>[0];
332
337
  icons?: Parameters<typeof presetIcons>[0];
333
338
  typography?: Parameters<typeof presetTypography>[0];
339
+ wind4?: Parameters<typeof presetWind4>[0];
334
340
  };
335
341
  fuse?: {
336
342
  /**
@@ -521,9 +527,9 @@ declare function mergeViteConfigs({ userRoot, themeRoot }: ResolvedValaxyOptions
521
527
  */
522
528
  declare function getIndexHtml({ clientRoot, themeRoot, userRoot, config }: ResolvedValaxyOptions, rawHtml: string): Promise<string>;
523
529
 
524
- declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
530
+ declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon$1 & {
525
531
  setup?: ValaxyAddonResolver['setup'];
526
- }): (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
532
+ }): (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon$1 & {
527
533
  setup?: ValaxyAddonResolver["setup"];
528
534
  };
529
535
  declare const defineAddon: typeof defineValaxyAddon;
@@ -545,44 +551,44 @@ declare const defaultSiteConfig: SiteConfig;
545
551
  * Type helper for site.config.ts
546
552
  * @param config
547
553
  */
548
- declare function defineSiteConfig(config: UserSiteConfig): PartialDeep<SiteConfig>;
554
+ declare function defineSiteConfig(config: UserSiteConfig): valaxy_types.PartialDeep<SiteConfig>;
549
555
  /**
550
556
  * resolve valaxy config from special root
551
557
  */
552
- declare function resolveSiteConfigFromRoot(root: string): Promise<ResolvedConfig<PartialDeep<SiteConfig>>>;
558
+ declare function resolveSiteConfigFromRoot(root: string): Promise<ResolvedConfig<valaxy_types.PartialDeep<SiteConfig>>>;
553
559
  /**
554
560
  * resolve site.config.ts and merge with default
555
561
  * @param root
556
562
  */
557
563
  declare function resolveSiteConfig(root: string): Promise<{
558
- siteConfig: PartialDeep<SiteConfig>;
564
+ siteConfig: valaxy_types.PartialDeep<SiteConfig>;
559
565
  siteConfigFile: string;
560
566
  }>;
561
567
 
562
568
  /**
563
569
  * resolve theme config from special root
564
570
  */
565
- declare function resolveThemeConfigFromRoot(root: string): Promise<ResolvedConfig<DefaultTheme.Config>>;
571
+ declare function resolveThemeConfigFromRoot(root: string): Promise<ResolvedConfig<DefaultTheme$1.Config>>;
566
572
  /**
567
573
  * resolve theme.config.ts and merge with default
568
574
  */
569
575
  declare function resolveUserThemeConfig(options: ResolvedValaxyOptions): Promise<{
570
- themeConfig: DefaultTheme.Config;
576
+ themeConfig: DefaultTheme$1.Config;
571
577
  themeConfigFile: string;
572
578
  }>;
573
579
  type ValaxyConfigExtendKey = 'vite' | 'vue' | 'unocss' | 'unocssPresets' | 'markdown' | 'extendMd' | 'addons';
574
580
  type ValaxyPickConfig = Pick<ValaxyNodeConfig, ValaxyConfigExtendKey>;
575
- type ValaxyTheme<ThemeConfig = DefaultTheme.Config> = ValaxyPickConfig & {
581
+ type ValaxyTheme<ThemeConfig = DefaultTheme$1.Config> = ValaxyPickConfig & {
576
582
  themeConfig?: ThemeConfig;
577
583
  };
578
- declare function defineValaxyTheme<ThemeConfig = DefaultTheme.Config>(theme: ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>)): ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>);
584
+ declare function defineValaxyTheme<ThemeConfig = DefaultTheme$1.Config>(theme: ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>)): ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>);
579
585
  declare const defineTheme: typeof defineValaxyTheme;
580
586
 
581
587
  declare const defaultValaxyConfig: ValaxyNodeConfig;
582
588
  /**
583
589
  * Type helper for valaxy.config.ts
584
590
  */
585
- declare function defineValaxyConfig<ThemeConfig>(config: UserValaxyNodeConfig<ThemeConfig>): PartialDeep<ValaxyNodeConfig<ThemeConfig>>;
591
+ declare function defineValaxyConfig<ThemeConfig>(config: UserValaxyNodeConfig<ThemeConfig>): PartialDeep$1<ValaxyNodeConfig<ThemeConfig>>;
586
592
  declare const defineConfig: typeof defineValaxyConfig;
587
593
  declare function resolveValaxyConfigFromRoot(root: string, options?: ResolvedValaxyOptions): Promise<ResolvedConfig<ValaxyNodeConfig>>;
588
594
  /**
@@ -622,6 +628,11 @@ declare const customElements: Set<string>;
622
628
  */
623
629
  declare const defaultViteConfig: UserConfig;
624
630
 
631
+ declare const GLOBAL_STATE: {
632
+ valaxyApp: ValaxyApp | undefined;
633
+ server: ViteDevServer | undefined;
634
+ };
635
+
625
636
  declare function ViteValaxyPlugins(valaxyApp: ValaxyNode, serverOptions?: ValaxyServerOptions): Promise<(PluginOption | PluginOption[])[]>;
626
637
 
627
638
  /**
@@ -682,4 +693,4 @@ declare function toAtFS(path: string): string;
682
693
  declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
683
694
  declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
684
695
 
685
- export { $t, ALL_ROUTE, EXCERPT_SEPARATOR, type HookResult, type LoadConfigFromFileOptions, PATHNAME_PROTOCOL_RE, type ResolvedConfig, type ResolvedValaxyOptions, type UnoSetup, type UserInputConfig, type UserValaxyNodeConfig, type ValaxyAddonExport, type ValaxyAddonFn, type ValaxyAddonLike, type ValaxyAddonResolver, type ValaxyAddons, type ValaxyApp, type ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyPlugin, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, generateClientRedirects, getGitTimestamp, getIndexHtml, getServerInfoText, isExternal, isInstalledGlobally, isPath, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject };
696
+ export { $t, ALL_ROUTE, EXCERPT_SEPARATOR, GLOBAL_STATE, type HookResult, type LoadConfigFromFileOptions, PATHNAME_PROTOCOL_RE, type ResolvedConfig, type ResolvedValaxyOptions, type UnoSetup, type UserInputConfig, type UserValaxyNodeConfig, type ValaxyAddonExport, type ValaxyAddonFn, type ValaxyAddonLike, type ValaxyAddonResolver, type ValaxyAddons, type ValaxyApp, type ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyPlugin, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, generateClientRedirects, getGitTimestamp, getIndexHtml, getServerInfoText, isExternal, isInstalledGlobally, isPath, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveImportUrl, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, ssgBuild, toAtFS, transformObject };
@@ -2,6 +2,7 @@ import {
2
2
  $t,
3
3
  ALL_ROUTE,
4
4
  EXCERPT_SEPARATOR,
5
+ GLOBAL_STATE,
5
6
  PATHNAME_PROTOCOL_RE,
6
7
  ViteValaxyPlugins,
7
8
  build,
@@ -49,11 +50,12 @@ import {
49
50
  startValaxyDev,
50
51
  toAtFS,
51
52
  transformObject
52
- } from "../chunk-YYHL7OM3.js";
53
+ } from "../chunk-INEH2Z2Z.js";
53
54
  export {
54
55
  $t,
55
56
  ALL_ROUTE,
56
57
  EXCERPT_SEPARATOR,
58
+ GLOBAL_STATE,
57
59
  PATHNAME_PROTOCOL_RE,
58
60
  ViteValaxyPlugins,
59
61
  build,
@@ -1,5 +1,5 @@
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';
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
3
  import { Header } from '@valaxyjs/utils';
4
4
  import '@vueuse/integrations/useFuse';
5
5
  import 'medium-zoom';
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.0",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -25,7 +25,7 @@
25
25
  "default": "./dist/node/index.js"
26
26
  },
27
27
  "./client/*": "./client/*",
28
- "./client": "./client/index.ts",
28
+ "./client": "./client/shims.d.ts",
29
29
  "./node": {
30
30
  "types": "./dist/node/index.d.ts",
31
31
  "default": "./dist/node/index.js"
@@ -58,22 +58,22 @@
58
58
  "@clack/prompts": "^0.11.0",
59
59
  "@iconify-json/ri": "^1.2.5",
60
60
  "@intlify/unplugin-vue-i18n": "^6.0.8",
61
- "@shikijs/transformers": "^3.8.1",
61
+ "@shikijs/transformers": "^3.9.1",
62
62
  "@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",
63
+ "@unhead/addons": "^2.0.13",
64
+ "@unhead/schema-org": "^2.0.13",
65
+ "@unhead/vue": "^2.0.13",
66
+ "@vitejs/plugin-vue": "^6.0.1",
67
67
  "@vue/devtools-api": "7.7.2",
68
- "@vueuse/core": "^13.5.0",
69
- "@vueuse/integrations": "^13.5.0",
68
+ "@vueuse/core": "^13.6.0",
69
+ "@vueuse/integrations": "^13.6.0",
70
70
  "beasties": "^0.3.5",
71
71
  "consola": "^3.4.2",
72
72
  "cross-spawn": "^7.0.6",
73
73
  "css-i18n": "^0.0.5",
74
74
  "dayjs": "^1.11.13",
75
75
  "debug": "^4.4.1",
76
- "define-config-ts": "^0.0.3",
76
+ "define-config-ts": "^0.1.2",
77
77
  "defu": "^6.1.4",
78
78
  "ejs": "^3.1.10",
79
79
  "escape-html": "^1.0.3",
@@ -112,18 +112,18 @@
112
112
  "qrcode": "^1.5.4",
113
113
  "resolve-global": "^2.0.0",
114
114
  "sass": "^1.89.2",
115
- "shiki": "^3.8.1",
115
+ "shiki": "^3.9.1",
116
116
  "star-markdown-css": "^0.5.3",
117
117
  "table": "^6.9.0",
118
- "unhead": "^2.0.12",
119
- "unocss": "^66.3.3",
118
+ "unhead": "^2.0.13",
119
+ "unocss": "^66.4.0",
120
120
  "unplugin-vue-components": "28.0.0",
121
121
  "unplugin-vue-markdown": "^29.1.0",
122
122
  "unplugin-vue-router": "^0.14.0",
123
123
  "vanilla-lazyload": "^19.1.3",
124
124
  "vite": "^7.0.6",
125
125
  "vite-dev-rpc": "^1.1.0",
126
- "vite-plugin-vue-devtools": "^7.7.7",
126
+ "vite-plugin-vue-devtools": "^8.0.0",
127
127
  "vite-plugin-vue-layouts": "^0.11.0",
128
128
  "vite-ssg": "^28.0.0",
129
129
  "vite-ssg-sitemap": "^0.10.0",
@@ -132,8 +132,8 @@
132
132
  "vue-i18n": "^11.1.11",
133
133
  "vue-router": "^4.5.1",
134
134
  "yargs": "^18.0.0",
135
- "@valaxyjs/devtools": "0.25.11",
136
- "@valaxyjs/utils": "0.25.11"
135
+ "@valaxyjs/devtools": "0.26.0",
136
+ "@valaxyjs/utils": "0.26.0"
137
137
  },
138
138
  "devDependencies": {
139
139
  "@mdit-vue/plugin-component": "^2.1.4",
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
  /**