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.
- package/bin/{valaxy.js → valaxy.mjs} +1 -1
- package/client/composables/app/useValaxyHead.ts +1 -1
- package/client/composables/decrypt.ts +1 -1
- package/client/composables/features/collapse-code.ts +1 -1
- package/client/styles/common/code.scss +2 -2
- package/dist/node/cli/index.mjs +65 -0
- package/dist/node/{index.d.ts → index.d.mts} +267 -32
- package/dist/node/index.mjs +75 -0
- package/dist/{chunk-YYHL7OM3.js → shared/valaxy.DYu2a9p6.mjs} +2650 -3043
- package/dist/shared/valaxy.D_ue8jlC.d.mts +60 -0
- package/dist/{config-bf4WqwPK.d.ts → types/index.d.mts} +56 -73
- package/dist/types/index.mjs +1 -0
- package/index.d.ts +2 -2
- package/package.json +29 -27
- package/shims.d.ts +2 -2
- package/types/config.ts +1 -1
- package/types/frontmatter/page.ts +29 -16
- package/dist/node/cli/index.js +0 -12
- package/dist/node/index.js +0 -104
- package/dist/types/index.d.ts +0 -35
- package/dist/types/index.js +0 -0
- /package/dist/node/cli/{index.d.ts → index.d.mts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useHead } from '@unhead/vue'
|
|
2
|
-
import pkg from 'valaxy/package.json'
|
|
3
2
|
import { computed } from 'vue'
|
|
3
|
+
import pkg from '../../../package.json' with { type: 'json' }
|
|
4
4
|
|
|
5
5
|
import { useFrontmatter, useValaxyI18n } from '../../composables'
|
|
6
6
|
import { useSiteConfig } from '../../config'
|
|
@@ -15,7 +15,7 @@ export function getKeyMaterial(password: string) {
|
|
|
15
15
|
)
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export function getKey(keyMaterial: CryptoKey, salt:
|
|
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.
|
|
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.
|
|
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.
|
|
254
|
+
[class*='language-'].folded>button.code-block-unfold-btn {
|
|
255
255
|
display: block;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import 'node:process';
|
|
2
|
+
import 'yargs';
|
|
3
|
+
import 'yargs/helpers';
|
|
4
|
+
export { c as cli, d as registerDevCommand, r as run, a as startValaxyDev } from '../../shared/valaxy.DYu2a9p6.mjs';
|
|
5
|
+
import 'node:path';
|
|
6
|
+
import 'consola';
|
|
7
|
+
import 'consola/utils';
|
|
8
|
+
import 'fast-glob';
|
|
9
|
+
import 'fs-extra';
|
|
10
|
+
import 'gray-matter';
|
|
11
|
+
import '@antfu/utils';
|
|
12
|
+
import 'debug';
|
|
13
|
+
import 'pathe';
|
|
14
|
+
import 'defu';
|
|
15
|
+
import 'vite';
|
|
16
|
+
import 'node:crypto';
|
|
17
|
+
import 'floating-vue';
|
|
18
|
+
import 'define-config-ts';
|
|
19
|
+
import 'ora';
|
|
20
|
+
import 'cross-spawn';
|
|
21
|
+
import 'mlly';
|
|
22
|
+
import 'resolve-global';
|
|
23
|
+
import 'node:fs/promises';
|
|
24
|
+
import 'js-yaml';
|
|
25
|
+
import 'dayjs';
|
|
26
|
+
import 'feed';
|
|
27
|
+
import 'markdown-it';
|
|
28
|
+
import 'table';
|
|
29
|
+
import 'hookable';
|
|
30
|
+
import 'vite-ssg-sitemap';
|
|
31
|
+
import 'vite-ssg/node';
|
|
32
|
+
import '@intlify/unplugin-vue-i18n/vite';
|
|
33
|
+
import '@unhead/addons/vite';
|
|
34
|
+
import 'unplugin-vue-components/vite';
|
|
35
|
+
import 'vite-plugin-vue-layouts';
|
|
36
|
+
import 'vitepress-plugin-group-icons';
|
|
37
|
+
import 'markdown-it-async';
|
|
38
|
+
import '@shikijs/transformers';
|
|
39
|
+
import 'shiki';
|
|
40
|
+
import 'css-i18n';
|
|
41
|
+
import 'markdown-it-anchor';
|
|
42
|
+
import 'markdown-it-attrs';
|
|
43
|
+
import 'markdown-it-emoji';
|
|
44
|
+
import 'markdown-it-footnote';
|
|
45
|
+
import 'markdown-it-image-figures';
|
|
46
|
+
import 'markdown-it-task-lists';
|
|
47
|
+
import 'node:url';
|
|
48
|
+
import 'markdown-it-container';
|
|
49
|
+
import 'katex';
|
|
50
|
+
import 'unplugin-vue-markdown/vite';
|
|
51
|
+
import 'js-base64';
|
|
52
|
+
import 'node:fs';
|
|
53
|
+
import 'jiti';
|
|
54
|
+
import 'unocss';
|
|
55
|
+
import 'pascalcase';
|
|
56
|
+
import 'lru-cache';
|
|
57
|
+
import 'html-to-text';
|
|
58
|
+
import 'unplugin-vue-router/vite';
|
|
59
|
+
import 'node:os';
|
|
60
|
+
import '@clack/prompts';
|
|
61
|
+
import 'node:net';
|
|
62
|
+
import 'node:child_process';
|
|
63
|
+
import 'node:readline';
|
|
64
|
+
import 'qrcode';
|
|
65
|
+
import 'ejs';
|
|
@@ -1,13 +1,13 @@
|
|
|
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 {
|
|
5
|
+
import { DefaultTheme, ValaxyConfig, ValaxyAddon, PartialDeep as PartialDeep$1, RuntimeConfig, RedirectItem, SiteConfig, UserSiteConfig } from 'valaxy/types';
|
|
6
6
|
import Vue from '@vitejs/plugin-vue';
|
|
7
7
|
import { Options as Options$2 } from 'beasties';
|
|
8
8
|
import { Hookable } from 'hookable';
|
|
9
9
|
import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
|
|
10
|
-
import { presetUno, presetAttributify, presetIcons, presetTypography } from 'unocss';
|
|
10
|
+
import { presetUno, presetAttributify, presetIcons, presetTypography, presetWind4 } from 'unocss';
|
|
11
11
|
import { VitePluginConfig } from 'unocss/vite';
|
|
12
12
|
import Components from 'unplugin-vue-components/vite';
|
|
13
13
|
import Markdown from 'unplugin-vue-markdown/vite';
|
|
@@ -15,24 +15,17 @@ import { EditableTreeNode } from 'unplugin-vue-router';
|
|
|
15
15
|
import Router from 'unplugin-vue-router/vite';
|
|
16
16
|
import Layouts from 'vite-plugin-vue-layouts';
|
|
17
17
|
import { Options as Options$1 } from 'vitepress-plugin-group-icons';
|
|
18
|
-
import { HeadersPluginOptions } from '@mdit-vue/plugin-headers';
|
|
19
|
-
import { SfcPluginOptions } from '@mdit-vue/plugin-sfc';
|
|
20
|
-
import { TocPluginOptions } from '@mdit-vue/plugin-toc';
|
|
21
18
|
import { KatexOptions } from 'katex';
|
|
22
19
|
import MarkdownIt from 'markdown-it';
|
|
23
20
|
import anchorPlugin from 'markdown-it-anchor';
|
|
24
21
|
import { Options, MarkdownItAsync } from 'markdown-it-async';
|
|
25
22
|
import { ThemeRegistration, BuiltinTheme, LanguageInput, ShikiTransformer, Highlighter } from 'shiki';
|
|
26
|
-
export { cli, registerDevCommand, run, startValaxyDev } from './cli/index.
|
|
23
|
+
export { cli, registerDevCommand, run, startValaxyDev } from './cli/index.mjs';
|
|
27
24
|
import { Awaitable } from '@antfu/utils';
|
|
25
|
+
import { V as ValaxyAddon$1, D as DefaultTheme$1 } from '../shared/valaxy.D_ue8jlC.mjs';
|
|
28
26
|
import * as defu from 'defu';
|
|
29
|
-
import '@vueuse/integrations/useFuse';
|
|
30
|
-
import 'medium-zoom';
|
|
31
|
-
import 'vanilla-lazyload';
|
|
32
|
-
import 'vue-router';
|
|
33
|
-
import '@vueuse/core';
|
|
34
|
-
import '@unhead/schema-org';
|
|
35
27
|
import 'yargs';
|
|
28
|
+
import '@vueuse/core';
|
|
36
29
|
|
|
37
30
|
declare module 'vite' {
|
|
38
31
|
interface UserConfig {
|
|
@@ -46,6 +39,233 @@ declare module 'vite' {
|
|
|
46
39
|
*/
|
|
47
40
|
declare function createValaxyNode(options: ResolvedValaxyOptions): ValaxyNode;
|
|
48
41
|
|
|
42
|
+
interface MarkdownItHeader {
|
|
43
|
+
/**
|
|
44
|
+
* The level of the header
|
|
45
|
+
*
|
|
46
|
+
* `1` to `6` for `<h1>` to `<h6>`
|
|
47
|
+
*/
|
|
48
|
+
level: number;
|
|
49
|
+
/**
|
|
50
|
+
* The title of the header
|
|
51
|
+
*/
|
|
52
|
+
title: string;
|
|
53
|
+
/**
|
|
54
|
+
* The slug of the header
|
|
55
|
+
*
|
|
56
|
+
* Typically the `id` attr of the header anchor
|
|
57
|
+
*/
|
|
58
|
+
slug: string;
|
|
59
|
+
/**
|
|
60
|
+
* Link of the header
|
|
61
|
+
*
|
|
62
|
+
* Typically using `#${slug}` as the anchor hash
|
|
63
|
+
*/
|
|
64
|
+
link: string;
|
|
65
|
+
/**
|
|
66
|
+
* The children of the header
|
|
67
|
+
*/
|
|
68
|
+
children: MarkdownItHeader[];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Options of @mdit-vue/plugin-headers
|
|
73
|
+
*/
|
|
74
|
+
interface HeadersPluginOptions {
|
|
75
|
+
/**
|
|
76
|
+
* A custom slugification function
|
|
77
|
+
*
|
|
78
|
+
* Should use the same slugify function with markdown-it-anchor
|
|
79
|
+
* to ensure the link is matched
|
|
80
|
+
*/
|
|
81
|
+
slugify?: (str: string) => string;
|
|
82
|
+
/**
|
|
83
|
+
* A function for formatting header title
|
|
84
|
+
*/
|
|
85
|
+
format?: (str: string) => string;
|
|
86
|
+
/**
|
|
87
|
+
* Heading level that going to be extracted
|
|
88
|
+
*
|
|
89
|
+
* Should be a subset of markdown-it-anchor's `level` option
|
|
90
|
+
* to ensure the slug is existed
|
|
91
|
+
*
|
|
92
|
+
* @default [2,3]
|
|
93
|
+
*/
|
|
94
|
+
level?: number[];
|
|
95
|
+
/**
|
|
96
|
+
* Should allow headers inside nested blocks or not
|
|
97
|
+
*
|
|
98
|
+
* If set to `true`, headers inside blockquote, list, etc. would also be extracted.
|
|
99
|
+
*
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
shouldAllowNested?: boolean;
|
|
103
|
+
}
|
|
104
|
+
declare module '@mdit-vue/types' {
|
|
105
|
+
interface MarkdownItEnv {
|
|
106
|
+
/**
|
|
107
|
+
* The headers that extracted by `@mdit-vue/plugin-headers`
|
|
108
|
+
*/
|
|
109
|
+
headers?: MarkdownItHeader[];
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Options of @mdit-vue/plugin-sfc
|
|
115
|
+
*/
|
|
116
|
+
interface SfcPluginOptions {
|
|
117
|
+
/**
|
|
118
|
+
* Custom blocks to be extracted
|
|
119
|
+
*
|
|
120
|
+
* @default []
|
|
121
|
+
*/
|
|
122
|
+
customBlocks?: string[];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* SFC block that extracted from markdown
|
|
126
|
+
*/
|
|
127
|
+
interface SfcBlock {
|
|
128
|
+
/**
|
|
129
|
+
* The type of the block
|
|
130
|
+
*/
|
|
131
|
+
type: string;
|
|
132
|
+
/**
|
|
133
|
+
* The content, including open-tag and close-tag
|
|
134
|
+
*/
|
|
135
|
+
content: string;
|
|
136
|
+
/**
|
|
137
|
+
* The content that stripped open-tag and close-tag off
|
|
138
|
+
*/
|
|
139
|
+
contentStripped: string;
|
|
140
|
+
/**
|
|
141
|
+
* The open-tag
|
|
142
|
+
*/
|
|
143
|
+
tagOpen: string;
|
|
144
|
+
/**
|
|
145
|
+
* The close-tag
|
|
146
|
+
*/
|
|
147
|
+
tagClose: string;
|
|
148
|
+
}
|
|
149
|
+
interface MarkdownSfcBlocks {
|
|
150
|
+
/**
|
|
151
|
+
* The `<template>` block
|
|
152
|
+
*/
|
|
153
|
+
template: SfcBlock | null;
|
|
154
|
+
/**
|
|
155
|
+
* The common `<script>` block
|
|
156
|
+
*/
|
|
157
|
+
script: SfcBlock | null;
|
|
158
|
+
/**
|
|
159
|
+
* The `<script setup>` block
|
|
160
|
+
*/
|
|
161
|
+
scriptSetup: SfcBlock | null;
|
|
162
|
+
/**
|
|
163
|
+
* All `<script>` blocks.
|
|
164
|
+
*
|
|
165
|
+
* By default, SFC only allows one `<script>` block and one `<script setup>` block.
|
|
166
|
+
* However, some tools may support different types of `<script>`s, so we keep all of them here.
|
|
167
|
+
*/
|
|
168
|
+
scripts: SfcBlock[];
|
|
169
|
+
/**
|
|
170
|
+
* All `<style>` blocks.
|
|
171
|
+
*/
|
|
172
|
+
styles: SfcBlock[];
|
|
173
|
+
/**
|
|
174
|
+
* All custom blocks.
|
|
175
|
+
*/
|
|
176
|
+
customBlocks: SfcBlock[];
|
|
177
|
+
}
|
|
178
|
+
declare module '@mdit-vue/types' {
|
|
179
|
+
interface MarkdownItEnv {
|
|
180
|
+
/**
|
|
181
|
+
* SFC blocks that extracted by `@mdit-vue/plugin-sfc`
|
|
182
|
+
*/
|
|
183
|
+
sfcBlocks?: MarkdownSfcBlocks;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Options of @mdit-vue/plugin-toc
|
|
189
|
+
*/
|
|
190
|
+
interface TocPluginOptions {
|
|
191
|
+
/**
|
|
192
|
+
* The pattern serving as the TOC placeholder in your markdown
|
|
193
|
+
*
|
|
194
|
+
* @default /^\[\[toc\]\]$/i
|
|
195
|
+
*/
|
|
196
|
+
pattern?: RegExp;
|
|
197
|
+
/**
|
|
198
|
+
* A custom slugification function
|
|
199
|
+
*
|
|
200
|
+
* Should use the same slugify function with markdown-it-anchor
|
|
201
|
+
* to ensure the link is matched
|
|
202
|
+
*/
|
|
203
|
+
slugify?: (str: string) => string;
|
|
204
|
+
/**
|
|
205
|
+
* A function for formatting headings
|
|
206
|
+
*/
|
|
207
|
+
format?: (str: string) => string;
|
|
208
|
+
/**
|
|
209
|
+
* Heading level that going to be included in the TOC
|
|
210
|
+
*
|
|
211
|
+
* Should be a subset of markdown-it-anchor's `level` option
|
|
212
|
+
* to ensure the link is existed
|
|
213
|
+
*
|
|
214
|
+
* @default [2,3]
|
|
215
|
+
*/
|
|
216
|
+
level?: number[];
|
|
217
|
+
/**
|
|
218
|
+
* Should allow headers inside nested blocks or not
|
|
219
|
+
*
|
|
220
|
+
* If set to `true`, headers inside blockquote, list, etc. would also be included.
|
|
221
|
+
*
|
|
222
|
+
* @default false
|
|
223
|
+
*/
|
|
224
|
+
shouldAllowNested?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* HTML tag of the TOC container
|
|
227
|
+
*
|
|
228
|
+
* @default 'nav'
|
|
229
|
+
*/
|
|
230
|
+
containerTag?: string;
|
|
231
|
+
/**
|
|
232
|
+
* The class for the TOC container
|
|
233
|
+
*
|
|
234
|
+
* @default 'table-of-contents'
|
|
235
|
+
*/
|
|
236
|
+
containerClass?: string;
|
|
237
|
+
/**
|
|
238
|
+
* HTML tag of the TOC list
|
|
239
|
+
*
|
|
240
|
+
* @default 'ul'
|
|
241
|
+
*/
|
|
242
|
+
listTag?: 'ol' | 'ul';
|
|
243
|
+
/**
|
|
244
|
+
* The class for the TOC list
|
|
245
|
+
*
|
|
246
|
+
* @default ''
|
|
247
|
+
*/
|
|
248
|
+
listClass?: string;
|
|
249
|
+
/**
|
|
250
|
+
* The class for the `<li>` tag
|
|
251
|
+
*
|
|
252
|
+
* @default ''
|
|
253
|
+
*/
|
|
254
|
+
itemClass?: string;
|
|
255
|
+
/**
|
|
256
|
+
* The tag of the link inside `<li>` tag
|
|
257
|
+
*
|
|
258
|
+
* @default 'a'
|
|
259
|
+
*/
|
|
260
|
+
linkTag?: 'a' | 'router-link';
|
|
261
|
+
/**
|
|
262
|
+
* The class for the link inside the `<li>` tag
|
|
263
|
+
*
|
|
264
|
+
* @default ''
|
|
265
|
+
*/
|
|
266
|
+
linkClass?: string;
|
|
267
|
+
}
|
|
268
|
+
|
|
49
269
|
interface BlockItem {
|
|
50
270
|
text?: string;
|
|
51
271
|
icon?: string;
|
|
@@ -177,7 +397,7 @@ interface MarkdownOptions extends Options {
|
|
|
177
397
|
}
|
|
178
398
|
|
|
179
399
|
type ValaxyNodeConfig<ThemeConfig = DefaultTheme.Config> = ValaxyConfig<ThemeConfig> & ValaxyExtendConfig;
|
|
180
|
-
type UserValaxyNodeConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyNodeConfig<ThemeConfig>>;
|
|
400
|
+
type UserValaxyNodeConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep$1<ValaxyNodeConfig<ThemeConfig>>;
|
|
181
401
|
/**
|
|
182
402
|
* fn with options for theme config
|
|
183
403
|
*/
|
|
@@ -327,10 +547,14 @@ interface ValaxyExtendConfig {
|
|
|
327
547
|
* @see https://unocss.dev/guide/presets
|
|
328
548
|
*/
|
|
329
549
|
unocssPresets?: {
|
|
550
|
+
/**
|
|
551
|
+
* @deprecated use wind4 instead
|
|
552
|
+
*/
|
|
330
553
|
uno?: Parameters<typeof presetUno>[0];
|
|
331
554
|
attributify?: Parameters<typeof presetAttributify>[0];
|
|
332
555
|
icons?: Parameters<typeof presetIcons>[0];
|
|
333
556
|
typography?: Parameters<typeof presetTypography>[0];
|
|
557
|
+
wind4?: Parameters<typeof presetWind4>[0];
|
|
334
558
|
};
|
|
335
559
|
fuse?: {
|
|
336
560
|
/**
|
|
@@ -497,7 +721,7 @@ declare function resolveOptions(options?: ValaxyEntryOptions, mode?: ResolvedVal
|
|
|
497
721
|
* resolve theme config
|
|
498
722
|
* @param options
|
|
499
723
|
*/
|
|
500
|
-
declare function resolveThemeValaxyConfig(options: ResolvedValaxyOptions): Promise<
|
|
724
|
+
declare function resolveThemeValaxyConfig(options: ResolvedValaxyOptions): Promise<any>;
|
|
501
725
|
|
|
502
726
|
declare function build(valaxyApp: ValaxyNode, viteConfig?: InlineConfig): Promise<void>;
|
|
503
727
|
declare function ssgBuild(valaxyApp: ValaxyNode, viteConfig?: InlineConfig): Promise<void>;
|
|
@@ -521,13 +745,13 @@ declare function mergeViteConfigs({ userRoot, themeRoot }: ResolvedValaxyOptions
|
|
|
521
745
|
*/
|
|
522
746
|
declare function getIndexHtml({ clientRoot, themeRoot, userRoot, config }: ResolvedValaxyOptions, rawHtml: string): Promise<string>;
|
|
523
747
|
|
|
524
|
-
declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
|
|
748
|
+
declare function defineValaxyAddon<AddonOptions = object>(addonFunc: (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon$1 & {
|
|
525
749
|
setup?: ValaxyAddonResolver['setup'];
|
|
526
|
-
}): (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon & {
|
|
750
|
+
}): (addonOptions?: AddonOptions, valaxyOptions?: ResolvedValaxyOptions) => ValaxyAddon$1 & {
|
|
527
751
|
setup?: ValaxyAddonResolver["setup"];
|
|
528
752
|
};
|
|
529
753
|
declare const defineAddon: typeof defineValaxyAddon;
|
|
530
|
-
declare function resolveAddonsConfig(addons: ValaxyAddonResolver[], options: ResolvedValaxyOptions): Promise<
|
|
754
|
+
declare function resolveAddonsConfig(addons: ValaxyAddonResolver[], options: ResolvedValaxyOptions): Promise<any>;
|
|
531
755
|
|
|
532
756
|
interface LoadConfigFromFileOptions {
|
|
533
757
|
cwd?: string;
|
|
@@ -538,53 +762,56 @@ interface ResolvedConfig<T extends UserInputConfig = UserInputConfig> {
|
|
|
538
762
|
config: T;
|
|
539
763
|
configFile: string;
|
|
540
764
|
}
|
|
541
|
-
declare function loadConfigFromFile<T extends UserInputConfig>(
|
|
765
|
+
declare function loadConfigFromFile<T extends UserInputConfig>(name: string, options?: LoadConfigFromFileOptions): Promise<ResolvedConfig<T>>;
|
|
542
766
|
|
|
543
767
|
declare const defaultSiteConfig: SiteConfig;
|
|
544
768
|
/**
|
|
545
769
|
* Type helper for site.config.ts
|
|
546
770
|
* @param config
|
|
547
771
|
*/
|
|
548
|
-
declare function defineSiteConfig(config: UserSiteConfig):
|
|
772
|
+
declare function defineSiteConfig(config: UserSiteConfig): UserSiteConfig;
|
|
549
773
|
/**
|
|
550
774
|
* resolve valaxy config from special root
|
|
551
775
|
*/
|
|
552
|
-
declare function resolveSiteConfigFromRoot(root: string): Promise<ResolvedConfig<
|
|
776
|
+
declare function resolveSiteConfigFromRoot(root: string): Promise<ResolvedConfig<UserSiteConfig>>;
|
|
553
777
|
/**
|
|
554
778
|
* resolve site.config.ts and merge with default
|
|
555
779
|
* @param root
|
|
556
780
|
*/
|
|
557
781
|
declare function resolveSiteConfig(root: string): Promise<{
|
|
558
|
-
siteConfig:
|
|
782
|
+
siteConfig: UserSiteConfig;
|
|
559
783
|
siteConfigFile: string;
|
|
560
784
|
}>;
|
|
561
785
|
|
|
562
786
|
/**
|
|
563
787
|
* resolve theme config from special root
|
|
564
788
|
*/
|
|
565
|
-
declare function resolveThemeConfigFromRoot(root: string): Promise<ResolvedConfig<DefaultTheme.Config>>;
|
|
789
|
+
declare function resolveThemeConfigFromRoot(root: string): Promise<ResolvedConfig<DefaultTheme$1.Config>>;
|
|
566
790
|
/**
|
|
567
791
|
* resolve theme.config.ts and merge with default
|
|
568
792
|
*/
|
|
569
|
-
declare function resolveUserThemeConfig(options:
|
|
570
|
-
|
|
793
|
+
declare function resolveUserThemeConfig(options: {
|
|
794
|
+
userRoot: string;
|
|
795
|
+
themeRoot: string;
|
|
796
|
+
}): Promise<{
|
|
797
|
+
themeConfig: DefaultTheme$1.Config;
|
|
571
798
|
themeConfigFile: string;
|
|
572
799
|
}>;
|
|
573
800
|
type ValaxyConfigExtendKey = 'vite' | 'vue' | 'unocss' | 'unocssPresets' | 'markdown' | 'extendMd' | 'addons';
|
|
574
801
|
type ValaxyPickConfig = Pick<ValaxyNodeConfig, ValaxyConfigExtendKey>;
|
|
575
|
-
type ValaxyTheme<ThemeConfig = DefaultTheme.Config> = ValaxyPickConfig & {
|
|
802
|
+
type ValaxyTheme<ThemeConfig = DefaultTheme$1.Config> = ValaxyPickConfig & {
|
|
576
803
|
themeConfig?: ThemeConfig;
|
|
577
804
|
};
|
|
578
|
-
declare function defineValaxyTheme<ThemeConfig = DefaultTheme.Config>(theme: ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>)): ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>);
|
|
805
|
+
declare function defineValaxyTheme<ThemeConfig = DefaultTheme$1.Config>(theme: ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>)): ValaxyTheme<ThemeConfig> | ((options: ResolvedValaxyOptions<ThemeConfig>) => ValaxyTheme<ThemeConfig>);
|
|
579
806
|
declare const defineTheme: typeof defineValaxyTheme;
|
|
580
807
|
|
|
581
808
|
declare const defaultValaxyConfig: ValaxyNodeConfig;
|
|
582
809
|
/**
|
|
583
810
|
* Type helper for valaxy.config.ts
|
|
584
811
|
*/
|
|
585
|
-
declare function defineValaxyConfig<ThemeConfig>(config: UserValaxyNodeConfig<ThemeConfig>): PartialDeep<
|
|
812
|
+
declare function defineValaxyConfig<ThemeConfig>(config: UserValaxyNodeConfig<ThemeConfig>): PartialDeep<any>;
|
|
586
813
|
declare const defineConfig: typeof defineValaxyConfig;
|
|
587
|
-
declare function resolveValaxyConfigFromRoot(root: string, options?: ResolvedValaxyOptions): Promise<ResolvedConfig<
|
|
814
|
+
declare function resolveValaxyConfigFromRoot(root: string, options?: ResolvedValaxyOptions): Promise<ResolvedConfig<any>>;
|
|
588
815
|
/**
|
|
589
816
|
* merge valaxy.config
|
|
590
817
|
* (source, default)
|
|
@@ -604,9 +831,9 @@ declare const mergeValaxyConfig: <Source extends {
|
|
|
604
831
|
* @param options
|
|
605
832
|
*/
|
|
606
833
|
declare function resolveValaxyConfig(options: ValaxyEntryOptions): Promise<{
|
|
607
|
-
config:
|
|
834
|
+
config: any;
|
|
608
835
|
configFile: string;
|
|
609
|
-
theme:
|
|
836
|
+
theme: any;
|
|
610
837
|
}>;
|
|
611
838
|
|
|
612
839
|
type UnoSetup = () => Awaitable<Partial<VitePluginConfig> | undefined>;
|
|
@@ -622,6 +849,13 @@ declare const customElements: Set<string>;
|
|
|
622
849
|
*/
|
|
623
850
|
declare const defaultViteConfig: UserConfig;
|
|
624
851
|
|
|
852
|
+
declare let version: string;
|
|
853
|
+
|
|
854
|
+
declare const GLOBAL_STATE: {
|
|
855
|
+
valaxyApp: ValaxyApp | undefined;
|
|
856
|
+
server: ViteDevServer | undefined;
|
|
857
|
+
};
|
|
858
|
+
|
|
625
859
|
declare function ViteValaxyPlugins(valaxyApp: ValaxyNode, serverOptions?: ValaxyServerOptions): Promise<(PluginOption | PluginOption[])[]>;
|
|
626
860
|
|
|
627
861
|
/**
|
|
@@ -682,4 +916,5 @@ declare function toAtFS(path: string): string;
|
|
|
682
916
|
declare function resolveImportPath(importName: string, ensure?: true): Promise<string>;
|
|
683
917
|
declare function resolveImportPath(importName: string, ensure?: boolean): Promise<string | undefined>;
|
|
684
918
|
|
|
685
|
-
export { $t, ALL_ROUTE, EXCERPT_SEPARATOR,
|
|
919
|
+
export { $t, ALL_ROUTE, EXCERPT_SEPARATOR, GLOBAL_STATE, PATHNAME_PROTOCOL_RE, 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, version };
|
|
920
|
+
export type { HookResult, LoadConfigFromFileOptions, ResolvedConfig, ResolvedValaxyOptions, UnoSetup, UserInputConfig, UserValaxyNodeConfig, ValaxyAddonExport, ValaxyAddonFn, ValaxyAddonLike, ValaxyAddonResolver, ValaxyAddons, ValaxyApp, ValaxyConfigExport, ValaxyConfigExtendKey, ValaxyConfigFn, ValaxyEntryOptions, ValaxyExtendConfig, ValaxyHooks, ValaxyNode, ValaxyNodeConfig, ValaxyPickConfig, ValaxyServerOptions, ValaxyTheme };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export { C as ALL_ROUTE, E as EXCERPT_SEPARATOR, G as GLOBAL_STATE, P as PATHNAME_PROTOCOL_RE, V as ViteValaxyPlugins, b as build, c as cli, N as createServer, L as createValaxyPlugin, D as customElements, j as defaultSiteConfig, w as defaultValaxyConfig, F as defaultViteConfig, h as defineAddon, y as defineConfig, k as defineSiteConfig, u as defineTheme, f as defineValaxyAddon, x as defineValaxyConfig, t as defineValaxyTheme, g as generateClientRedirects, O as getGitTimestamp, e as getIndexHtml, M as getServerInfoText, Q as isExternal, T as isInstalledGlobally, R as isPath, v as loadConfigFromFile, A as mergeValaxyConfig, m as mergeViteConfigs, p as postProcessForSSG, I as processValaxyOptions, d as registerDevCommand, i as resolveAddonsConfig, X as resolveImportPath, U as resolveImportUrl, J as resolveOptions, n as resolveSiteConfig, l as resolveSiteConfigFromRoot, o as resolveThemeConfigFromRoot, K as resolveThemeValaxyConfig, q as resolveUserThemeConfig, B as resolveValaxyConfig, z as resolveValaxyConfigFromRoot, r as run, s as ssgBuild, a as startValaxyDev, W as toAtFS, S as transformObject, H as version } from '../shared/valaxy.DYu2a9p6.mjs';
|
|
2
|
+
import 'node:path';
|
|
3
|
+
import 'fs-extra';
|
|
4
|
+
import 'consola/utils';
|
|
5
|
+
import 'node:process';
|
|
6
|
+
import 'define-config-ts';
|
|
7
|
+
import 'yargs';
|
|
8
|
+
import 'yargs/helpers';
|
|
9
|
+
import 'consola';
|
|
10
|
+
import 'fast-glob';
|
|
11
|
+
import 'gray-matter';
|
|
12
|
+
import '@antfu/utils';
|
|
13
|
+
import 'debug';
|
|
14
|
+
import 'pathe';
|
|
15
|
+
import 'defu';
|
|
16
|
+
import 'vite';
|
|
17
|
+
import 'node:crypto';
|
|
18
|
+
import 'floating-vue';
|
|
19
|
+
import 'ora';
|
|
20
|
+
import 'cross-spawn';
|
|
21
|
+
import 'mlly';
|
|
22
|
+
import 'resolve-global';
|
|
23
|
+
import 'node:fs/promises';
|
|
24
|
+
import 'js-yaml';
|
|
25
|
+
import 'dayjs';
|
|
26
|
+
import 'feed';
|
|
27
|
+
import 'markdown-it';
|
|
28
|
+
import 'table';
|
|
29
|
+
import 'hookable';
|
|
30
|
+
import 'vite-ssg-sitemap';
|
|
31
|
+
import 'vite-ssg/node';
|
|
32
|
+
import '@intlify/unplugin-vue-i18n/vite';
|
|
33
|
+
import '@unhead/addons/vite';
|
|
34
|
+
import 'unplugin-vue-components/vite';
|
|
35
|
+
import 'vite-plugin-vue-layouts';
|
|
36
|
+
import 'vitepress-plugin-group-icons';
|
|
37
|
+
import 'markdown-it-async';
|
|
38
|
+
import '@shikijs/transformers';
|
|
39
|
+
import 'shiki';
|
|
40
|
+
import 'css-i18n';
|
|
41
|
+
import 'markdown-it-anchor';
|
|
42
|
+
import 'markdown-it-attrs';
|
|
43
|
+
import 'markdown-it-emoji';
|
|
44
|
+
import 'markdown-it-footnote';
|
|
45
|
+
import 'markdown-it-image-figures';
|
|
46
|
+
import 'markdown-it-task-lists';
|
|
47
|
+
import 'node:url';
|
|
48
|
+
import 'markdown-it-container';
|
|
49
|
+
import 'katex';
|
|
50
|
+
import 'unplugin-vue-markdown/vite';
|
|
51
|
+
import 'js-base64';
|
|
52
|
+
import 'node:fs';
|
|
53
|
+
import 'jiti';
|
|
54
|
+
import 'unocss';
|
|
55
|
+
import 'pascalcase';
|
|
56
|
+
import 'lru-cache';
|
|
57
|
+
import 'html-to-text';
|
|
58
|
+
import 'unplugin-vue-router/vite';
|
|
59
|
+
import 'node:os';
|
|
60
|
+
import '@clack/prompts';
|
|
61
|
+
import 'node:net';
|
|
62
|
+
import 'node:child_process';
|
|
63
|
+
import 'node:readline';
|
|
64
|
+
import 'qrcode';
|
|
65
|
+
import 'ejs';
|
|
66
|
+
|
|
67
|
+
function $t(key) {
|
|
68
|
+
return `$locale:${key}`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function defineUnoSetup(fn) {
|
|
72
|
+
return fn;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { $t, defineUnoSetup };
|