valaxy 0.21.1 → 0.22.2-beta.5
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/bin/{valaxy.mjs → valaxy.js} +1 -1
- package/client/composables/common.ts +37 -0
- package/client/composables/global.ts +4 -4
- package/client/composables/locale.ts +8 -5
- package/client/composables/outline/anchor.ts +4 -2
- package/client/main.ts +9 -5
- package/client/templates/loader.vue +10 -0
- package/client/utils/time.ts +21 -55
- package/dist/chunk-ACYXZDCP.js +2 -0
- package/dist/{chunk-KQEK3EI2.mjs → chunk-BKO6YTFK.js} +1 -1
- package/dist/chunk-ESOXDAAD.js +158 -0
- package/dist/node/cli/index.d.ts +12 -2
- package/dist/node/cli/index.js +2 -0
- package/dist/node/index.d.ts +8 -2
- package/dist/node/index.js +2 -0
- package/dist/node/worker_shikiResolveLang.d.ts +10 -0
- package/dist/node/worker_shikiResolveLang.js +2 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/{index.mjs → index.js} +1 -1
- package/package.json +16 -23
- package/types/data.ts +5 -1
- package/bin/valaxy.cjs +0 -10
- package/dist/chunk-QBQ5XWB7.cjs +0 -1
- package/dist/chunk-TWPNJIK4.cjs +0 -161
- package/dist/chunk-WZQPPSXL.mjs +0 -162
- package/dist/config-Dxu7i2Zs.d.cts +0 -741
- package/dist/node/cli/index.cjs +0 -1
- package/dist/node/cli/index.d.cts +0 -6
- package/dist/node/cli/index.mjs +0 -2
- package/dist/node/index.cjs +0 -1
- package/dist/node/index.d.cts +0 -649
- package/dist/node/index.mjs +0 -2
- package/dist/types/index.cjs +0 -1
- package/dist/types/index.d.cts +0 -31
package/dist/node/cli/index.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import yargs from 'yargs';
|
|
1
|
+
import yargs, { Argv } from 'yargs';
|
|
2
|
+
import { LogLevel } from 'vite';
|
|
3
|
+
|
|
4
|
+
declare function startValaxyDev({ root, port, remote, log, open, }: {
|
|
5
|
+
root?: string;
|
|
6
|
+
port?: number;
|
|
7
|
+
remote?: boolean;
|
|
8
|
+
log?: LogLevel;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
declare function registerDevCommand(cli: Argv): void;
|
|
2
12
|
|
|
3
13
|
declare const cli: yargs.Argv<{}>;
|
|
4
14
|
declare function run(): void;
|
|
5
15
|
|
|
6
|
-
export { cli, run };
|
|
16
|
+
export { cli, registerDevCommand, run, startValaxyDev };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
+
import{W as a,X as b,Y as c,Z as d}from"../../chunk-ESOXDAAD.js";import"../../chunk-ACYXZDCP.js";import"../../chunk-BKO6YTFK.js";export{c as cli,b as registerDevCommand,d as run,a as startValaxyDev};
|
package/dist/node/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { KatexOptions } from 'katex';
|
|
|
21
21
|
import MarkdownIt from 'markdown-it';
|
|
22
22
|
import anchorPlugin from 'markdown-it-anchor';
|
|
23
23
|
import { LanguageInput, ShikiTransformer, Highlighter, ThemeRegistration, BuiltinTheme } from 'shiki';
|
|
24
|
-
export { cli, run } from './cli/index.js';
|
|
24
|
+
export { cli, registerDevCommand, run, startValaxyDev } from './cli/index.js';
|
|
25
25
|
import { Awaitable } from '@antfu/utils';
|
|
26
26
|
import * as defu from 'defu';
|
|
27
27
|
import { P as PartialDeep$1 } from '../config-Dxu7i2Zs.js';
|
|
@@ -281,6 +281,8 @@ interface ValaxyExtendConfig {
|
|
|
281
281
|
};
|
|
282
282
|
/**
|
|
283
283
|
* @see https://github.com/unplugin/unplugin-vue-components
|
|
284
|
+
*
|
|
285
|
+
* exclude @default components/.exclude
|
|
284
286
|
*/
|
|
285
287
|
components?: Parameters<typeof Components>[0];
|
|
286
288
|
/**
|
|
@@ -613,6 +615,10 @@ declare function ViteValaxyPlugins(valaxyApp: ValaxyNode, serverOptions?: Valaxy
|
|
|
613
615
|
*/
|
|
614
616
|
declare function createValaxyLoader(options: ResolvedValaxyOptions, serverOptions?: ValaxyServerOptions): Promise<Plugin[]>;
|
|
615
617
|
|
|
618
|
+
/**
|
|
619
|
+
* with valaxyPrefix
|
|
620
|
+
*/
|
|
621
|
+
declare function getServerInfoText(msg: string): string;
|
|
616
622
|
declare function createServer(valaxyApp: ValaxyNode, viteConfig?: InlineConfig, serverOptions?: ValaxyServerOptions): Promise<vite.ViteDevServer>;
|
|
617
623
|
|
|
618
624
|
declare function getGitTimestamp(file: string, type?: 'created' | 'updated'): Promise<number>;
|
|
@@ -646,4 +652,4 @@ declare const isInstalledGlobally: {
|
|
|
646
652
|
declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
|
|
647
653
|
declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
|
|
648
654
|
|
|
649
|
-
export { ALL_ROUTE, EXCERPT_SEPARATOR, EXTERNAL_URL_RE, 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 ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyLoader, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, generateClientRedirects, getGitTimestamp, getIndexHtml, isExternal, isInstalledGlobally, isPath, loadConfig, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
|
|
655
|
+
export { ALL_ROUTE, EXCERPT_SEPARATOR, EXTERNAL_URL_RE, 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 ValaxyConfigExport, type ValaxyConfigExtendKey, type ValaxyConfigFn, type ValaxyEntryOptions, type ValaxyExtendConfig, type ValaxyHooks, type ValaxyNode, type ValaxyNodeConfig, type ValaxyPickConfig, type ValaxyServerOptions, type ValaxyTheme, ViteValaxyPlugins, build, createServer, createValaxyLoader, customElements, defaultSiteConfig, defaultValaxyConfig, defaultViteConfig, defineAddon, defineConfig, defineSiteConfig, defineTheme, defineUnoSetup, defineValaxyAddon, defineValaxyConfig, defineValaxyTheme, ensurePrefix, generateClientRedirects, getGitTimestamp, getIndexHtml, getServerInfoText, isExternal, isInstalledGlobally, isPath, loadConfig, loadConfigFromFile, mergeValaxyConfig, mergeViteConfigs, postProcessForSSG, processValaxyOptions, resolveAddonsConfig, resolveImportPath, resolveOptions, resolveSiteConfig, resolveSiteConfigFromRoot, resolveThemeConfigFromRoot, resolveThemeValaxyConfig, resolveUserThemeConfig, resolveValaxyConfig, resolveValaxyConfigFromRoot, slash, ssgBuild, toAtFS, transformObject };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
+
import{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,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-ESOXDAAD.js";import"../chunk-ACYXZDCP.js";import"../chunk-BKO6YTFK.js";export{d as ALL_ROUTE,a as EXCERPT_SEPARATOR,b as EXTERNAL_URL_RE,c as PATHNAME_PROTOCOL_RE,P as ViteValaxyPlugins,Q as build,Y as cli,V as createServer,O as createValaxyLoader,e as customElements,t as defaultSiteConfig,x as defaultValaxyConfig,f as defaultViteConfig,E as defineAddon,z as defineConfig,u as defineSiteConfig,J as defineTheme,K as defineUnoSetup,D as defineValaxyAddon,y as defineValaxyConfig,I as defineValaxyTheme,j as ensurePrefix,T as generateClientRedirects,g as getGitTimestamp,q as getIndexHtml,U as getServerInfoText,h as isExternal,n as isInstalledGlobally,l as isPath,r as loadConfig,s as loadConfigFromFile,B as mergeValaxyConfig,p as mergeViteConfigs,S as postProcessForSSG,L as processValaxyOptions,X as registerDevCommand,F as resolveAddonsConfig,o as resolveImportPath,M as resolveOptions,w as resolveSiteConfig,v as resolveSiteConfigFromRoot,G as resolveThemeConfigFromRoot,N as resolveThemeValaxyConfig,H as resolveUserThemeConfig,C as resolveValaxyConfig,A as resolveValaxyConfigFromRoot,Z as run,i as slash,R as ssgBuild,W as startValaxyDev,k as toAtFS,m as transformObject};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
+
import{b as n}from"../chunk-ACYXZDCP.js";import{e}from"../chunk-BKO6YTFK.js";e();import{bundledLanguages as r}from"shiki";async function g(a){return r[a]?.().then(t=>t.default)||[]}n(g);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,8 +13,12 @@ type Post = Partial<PostFrontMatter>;
|
|
|
13
13
|
|
|
14
14
|
type CleanUrlsMode = 'disabled' | 'without-subfolders' | 'with-subfolders';
|
|
15
15
|
interface PageData {
|
|
16
|
-
path: string;
|
|
17
16
|
relativePath: string;
|
|
17
|
+
/**
|
|
18
|
+
* differs from relativePath in case of path rewrites
|
|
19
|
+
* absolute file path
|
|
20
|
+
*/
|
|
21
|
+
filePath?: string;
|
|
18
22
|
title: string;
|
|
19
23
|
titleTemplate?: string;
|
|
20
24
|
description: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{e}from"../chunk-BKO6YTFK.js";e();e();e();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.22.2-beta.5",
|
|
5
5
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -22,27 +22,23 @@
|
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./index.d.ts",
|
|
25
|
-
"
|
|
26
|
-
"require": "./dist/node/index.cjs"
|
|
25
|
+
"default": "./dist/node/index.js"
|
|
27
26
|
},
|
|
28
27
|
"./client/*": "./client/*",
|
|
29
28
|
"./client": "./client/index.ts",
|
|
30
29
|
"./node": {
|
|
31
30
|
"types": "./dist/node/index.d.ts",
|
|
32
|
-
"
|
|
33
|
-
"require": "./dist/node/index.cjs"
|
|
31
|
+
"default": "./dist/node/index.js"
|
|
34
32
|
},
|
|
35
33
|
"./types": "./dist/types/index.d.ts",
|
|
36
34
|
"./*": "./*"
|
|
37
35
|
},
|
|
38
|
-
"main": "dist/node/index.
|
|
39
|
-
"module": "dist/node/index.
|
|
36
|
+
"main": "dist/node/index.js",
|
|
37
|
+
"module": "dist/node/index.js",
|
|
40
38
|
"types": "index.d.ts",
|
|
41
39
|
"bin": {
|
|
42
|
-
"vala": "./bin/valaxy.
|
|
43
|
-
"
|
|
44
|
-
"valam": "./bin/valaxy.mjs",
|
|
45
|
-
"valaxy": "./bin/valaxy.mjs"
|
|
40
|
+
"vala": "./bin/valaxy.js",
|
|
41
|
+
"valaxy": "./bin/valaxy.js"
|
|
46
42
|
},
|
|
47
43
|
"files": [
|
|
48
44
|
"bin",
|
|
@@ -59,10 +55,9 @@
|
|
|
59
55
|
"@antfu/install-pkg": "^0.5.0",
|
|
60
56
|
"@antfu/utils": "^0.7.10",
|
|
61
57
|
"@clack/prompts": "^0.8.2",
|
|
62
|
-
"@iconify-json/ri": "^1.2.
|
|
58
|
+
"@iconify-json/ri": "^1.2.5",
|
|
63
59
|
"@intlify/unplugin-vue-i18n": "^6.0.1",
|
|
64
60
|
"@types/katex": "^0.16.7",
|
|
65
|
-
"@types/luxon": "^3.4.2",
|
|
66
61
|
"@unhead/addons": "^1.11.14",
|
|
67
62
|
"@unhead/schema-org": "^1.11.14",
|
|
68
63
|
"@unhead/vue": "^1.11.14",
|
|
@@ -74,8 +69,7 @@
|
|
|
74
69
|
"consola": "^3.2.3",
|
|
75
70
|
"cross-spawn": "^7.0.6",
|
|
76
71
|
"css-i18n": "^0.0.5",
|
|
77
|
-
"
|
|
78
|
-
"date-fns-tz": "^3.2.0",
|
|
72
|
+
"dayjs": "^1.11.13",
|
|
79
73
|
"debug": "^4.4.0",
|
|
80
74
|
"defu": "^6.1.4",
|
|
81
75
|
"ejs": "^3.1.10",
|
|
@@ -90,9 +84,8 @@
|
|
|
90
84
|
"jiti": "^2.4.1",
|
|
91
85
|
"js-base64": "^3.7.7",
|
|
92
86
|
"js-yaml": "^4.1.0",
|
|
93
|
-
"katex": "^0.16.
|
|
87
|
+
"katex": "^0.16.17",
|
|
94
88
|
"lru-cache": "^11.0.2",
|
|
95
|
-
"luxon": "^3.5.0",
|
|
96
89
|
"markdown-it": "^14.1.0",
|
|
97
90
|
"markdown-it-anchor": "^9.2.0",
|
|
98
91
|
"markdown-it-attrs": "^4.3.0",
|
|
@@ -117,21 +110,21 @@
|
|
|
117
110
|
"shiki": "^1.24.2",
|
|
118
111
|
"star-markdown-css": "^0.5.3",
|
|
119
112
|
"unocss": "^0.65.1",
|
|
120
|
-
"unplugin-vue-components": "^0.
|
|
121
|
-
"unplugin-vue-markdown": "^0.
|
|
113
|
+
"unplugin-vue-components": "^0.28.0",
|
|
114
|
+
"unplugin-vue-markdown": "^0.28.0",
|
|
122
115
|
"unplugin-vue-router": "^0.10.9",
|
|
123
116
|
"vanilla-lazyload": "^19.1.3",
|
|
124
117
|
"vite": "^6.0.3",
|
|
125
118
|
"vite-plugin-vue-devtools": "^7.6.8",
|
|
126
119
|
"vite-plugin-vue-layouts": "^0.11.0",
|
|
127
|
-
"vite-ssg": "^0.24.
|
|
120
|
+
"vite-ssg": "^0.24.3",
|
|
128
121
|
"vite-ssg-sitemap": "^0.8.1",
|
|
129
122
|
"vue": "^3.5.13",
|
|
130
123
|
"vue-i18n": "^10.0.5",
|
|
131
124
|
"vue-router": "^4.5.0",
|
|
132
125
|
"yargs": "^17.7.2",
|
|
133
|
-
"@valaxyjs/
|
|
134
|
-
"@valaxyjs/
|
|
126
|
+
"@valaxyjs/devtools": "0.22.1",
|
|
127
|
+
"@valaxyjs/utils": "0.22.1"
|
|
135
128
|
},
|
|
136
129
|
"devDependencies": {
|
|
137
130
|
"@mdit-vue/plugin-component": "^2.1.3",
|
|
@@ -160,7 +153,7 @@
|
|
|
160
153
|
"table": "^6.9.0"
|
|
161
154
|
},
|
|
162
155
|
"scripts": {
|
|
163
|
-
"build": "rimraf dist && tsup
|
|
156
|
+
"build": "rimraf dist && tsup",
|
|
164
157
|
"dev": "tsup --watch",
|
|
165
158
|
"preview": "vite preview",
|
|
166
159
|
"preview-https": "serve dist"
|
package/types/data.ts
CHANGED
|
@@ -7,8 +7,12 @@ export type CleanUrlsMode =
|
|
|
7
7
|
| 'with-subfolders'
|
|
8
8
|
|
|
9
9
|
export interface PageData {
|
|
10
|
-
path: string
|
|
11
10
|
relativePath: string
|
|
11
|
+
/**
|
|
12
|
+
* differs from relativePath in case of path rewrites
|
|
13
|
+
* absolute file path
|
|
14
|
+
*/
|
|
15
|
+
filePath?: string
|
|
12
16
|
title: string
|
|
13
17
|
titleTemplate?: string
|
|
14
18
|
description: string
|
package/bin/valaxy.cjs
DELETED
package/dist/chunk-QBQ5XWB7.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var m=Object.create;var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var l=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var p=(e,t)=>()=>(e&&(t=e(e=0)),t);var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var a=(e,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of u(t))!f.call(e,r)&&r!==n&&o(e,r,{get:()=>t[r],enumerable:!(c=i(t,r))||c.enumerable});return e};var h=(e,t,n)=>(n=e!=null?m(d(e)):{},a(t||!e||!e.__esModule?o(n,"default",{value:e,enumerable:!0}):n,e));var s,I,U= exports.e =p(()=>{"use strict";s=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href,I= exports.d =s()});exports.a = l; exports.b = R; exports.c = h; exports.d = I; exports.e = U;
|