vuepress-plugin-md-power 1.0.0-rc.146 → 1.0.0-rc.148
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/lib/client/components/VPCodeTree.vue +16 -0
- package/lib/client/composables/audio.d.ts +35 -35
- package/lib/client/composables/audio.js +169 -181
- package/lib/client/composables/codeRepl.d.ts +20 -17
- package/lib/client/composables/codeRepl.js +146 -252
- package/lib/client/composables/demo.d.ts +34 -41
- package/lib/client/composables/demo.js +108 -102
- package/lib/client/composables/pdf.d.ts +4 -15
- package/lib/client/composables/pdf.js +46 -51
- package/lib/client/composables/rustRepl-iGLjb94D.js +101 -0
- package/lib/client/composables/rustRepl.d.ts +15 -7
- package/lib/client/composables/rustRepl.js +3 -104
- package/lib/client/composables/size.d.ts +11 -21
- package/lib/client/composables/size.js +35 -32
- package/lib/client/index.d.ts +1 -1
- package/lib/client/index.js +1 -2
- package/lib/client/options.d.ts +8 -8
- package/lib/client/options.js +20 -29
- package/lib/client/utils/http.d.ts +5 -3
- package/lib/client/utils/http.js +19 -24
- package/lib/client/utils/link.d.ts +3 -1
- package/lib/client/utils/link.js +6 -5
- package/lib/client/utils/sleep.d.ts +3 -1
- package/lib/client/utils/sleep.js +7 -7
- package/lib/node/index.d.ts +405 -368
- package/lib/node/index.js +3777 -3779
- package/lib/shared/index.d.ts +395 -365
- package/package.json +10 -10
package/lib/node/index.d.ts
CHANGED
|
@@ -1,444 +1,481 @@
|
|
|
1
|
-
import Token from
|
|
2
|
-
import { App } from
|
|
3
|
-
import {
|
|
4
|
-
import { BuiltinTheme, ThemeRegistration } from
|
|
5
|
-
import
|
|
1
|
+
import Token from "markdown-it/lib/token.mjs";
|
|
2
|
+
import { App } from "vuepress";
|
|
3
|
+
import { Markdown, MarkdownEnv } from "vuepress/markdown";
|
|
4
|
+
import { BuiltinTheme, ThemeRegistration } from "shiki";
|
|
5
|
+
import "markdown-it";
|
|
6
|
+
import { Plugin } from "vuepress/core";
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
//#region src/shared/caniuse.d.ts
|
|
9
|
+
type CanIUseMode = "embed" | "image";
|
|
8
10
|
interface CanIUseTokenMeta {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
feature: string;
|
|
12
|
+
mode: CanIUseMode;
|
|
13
|
+
versions: string;
|
|
12
14
|
}
|
|
13
15
|
interface CanIUseOptions {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
16
|
+
/**
|
|
17
|
+
* 嵌入模式
|
|
18
|
+
*
|
|
19
|
+
* embed 通过iframe嵌入,提供可交互视图
|
|
20
|
+
*
|
|
21
|
+
* image 通过图片嵌入,静态
|
|
22
|
+
*
|
|
23
|
+
* @default 'embed'
|
|
24
|
+
*/
|
|
25
|
+
mode?: CanIUseMode;
|
|
26
|
+
} //#endregion
|
|
27
|
+
//#region src/shared/size.d.ts
|
|
26
28
|
interface SizeOptions {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
width?: string;
|
|
30
|
+
height?: string;
|
|
31
|
+
ratio?: number | string;
|
|
30
32
|
}
|
|
31
33
|
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/shared/codepen.d.ts
|
|
32
36
|
interface CodepenTokenMeta extends SizeOptions {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
title?: string;
|
|
38
|
+
user?: string;
|
|
39
|
+
slash?: string;
|
|
40
|
+
tab?: string;
|
|
41
|
+
theme?: string;
|
|
42
|
+
preview?: boolean;
|
|
43
|
+
editable?: boolean;
|
|
40
44
|
}
|
|
41
45
|
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/shared/codeSandbox.d.ts
|
|
42
48
|
interface CodeSandboxTokenMeta extends SizeOptions {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
user?: string;
|
|
50
|
+
id?: string;
|
|
51
|
+
layout?: string;
|
|
52
|
+
type?: "button" | "embed";
|
|
53
|
+
title?: string;
|
|
54
|
+
filepath?: string;
|
|
55
|
+
navbar?: boolean;
|
|
56
|
+
console?: boolean;
|
|
51
57
|
}
|
|
52
58
|
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/shared/codeTabs.d.ts
|
|
53
61
|
interface CodeTabsOptions {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
icon?: boolean | {
|
|
63
|
+
named?: false | string[];
|
|
64
|
+
extensions?: false | string[];
|
|
65
|
+
};
|
|
58
66
|
}
|
|
59
67
|
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/shared/demo.d.ts
|
|
60
70
|
interface DemoFile {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
71
|
+
type: "vue" | "normal" | "css" | "markdown";
|
|
72
|
+
export?: string;
|
|
73
|
+
path: string;
|
|
74
|
+
gitignore?: boolean;
|
|
65
75
|
}
|
|
66
76
|
interface MarkdownDemoEnv extends MarkdownEnv {
|
|
67
|
-
|
|
77
|
+
demoFiles?: DemoFile[];
|
|
68
78
|
}
|
|
69
79
|
interface DemoMeta {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
type: "vue" | "normal" | "markdown";
|
|
81
|
+
url: string;
|
|
82
|
+
title?: string;
|
|
83
|
+
desc?: string;
|
|
84
|
+
codeSetting?: string;
|
|
85
|
+
expanded?: boolean;
|
|
76
86
|
}
|
|
77
87
|
interface DemoContainerRender {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
before: (app: App, md: Markdown, env: MarkdownDemoEnv, meta: DemoMeta, codeMap: Record<string, string>) => string;
|
|
89
|
+
after: () => string;
|
|
90
|
+
token?: (token: Token, tokens: Token[], index: number) => void;
|
|
81
91
|
}
|
|
82
92
|
|
|
83
|
-
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/shared/fileTree.d.ts
|
|
95
|
+
type FileTreeIconMode = "simple" | "colored";
|
|
84
96
|
interface FileTreeOptions {
|
|
85
|
-
|
|
97
|
+
icon?: FileTreeIconMode;
|
|
86
98
|
}
|
|
87
99
|
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/shared/icons.d.ts
|
|
88
102
|
interface IconsOptions {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
103
|
+
/**
|
|
104
|
+
* The size of the icon
|
|
105
|
+
* @default '1em'
|
|
106
|
+
*/
|
|
107
|
+
size?: string | number;
|
|
108
|
+
/**
|
|
109
|
+
* The color of the icon
|
|
110
|
+
* @default 'currentColor'
|
|
111
|
+
*/
|
|
112
|
+
color?: string;
|
|
99
113
|
}
|
|
100
114
|
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/shared/jsfiddle.d.ts
|
|
101
117
|
interface JSFiddleTokenMeta extends SizeOptions {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
118
|
+
source: string;
|
|
119
|
+
title?: string;
|
|
120
|
+
theme?: string;
|
|
121
|
+
tab?: string;
|
|
106
122
|
}
|
|
107
123
|
|
|
108
|
-
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/shared/npmTo.d.ts
|
|
126
|
+
type NpmToPackageManager = "npm" | "pnpm" | "yarn" | "bun" | "deno";
|
|
109
127
|
type NpmToOptions = NpmToPackageManager[] | {
|
|
110
|
-
|
|
128
|
+
tabs?: NpmToPackageManager[];
|
|
111
129
|
};
|
|
112
130
|
|
|
113
|
-
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/shared/pdf.d.ts
|
|
133
|
+
type PDFEmbedType = "iframe" | "embed" | "pdfjs";
|
|
114
134
|
interface PDFTokenMeta extends SizeOptions {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
135
|
+
page?: number;
|
|
136
|
+
noToolbar?: boolean;
|
|
137
|
+
zoom?: number;
|
|
138
|
+
src?: string;
|
|
139
|
+
title?: string;
|
|
120
140
|
}
|
|
121
141
|
interface PDFOptions {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
142
|
+
/**
|
|
143
|
+
* pdfjs url
|
|
144
|
+
*/
|
|
145
|
+
pdfjsUrl?: string;
|
|
126
146
|
}
|
|
127
147
|
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/shared/plot.d.ts
|
|
128
150
|
interface PlotOptions {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
/**
|
|
152
|
+
* 是否启用 `!! !!` markdown (该标记为非标准标记,脱离插件将不生效)
|
|
153
|
+
* @default true
|
|
154
|
+
*/
|
|
155
|
+
tag?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* 遮罩层颜色
|
|
158
|
+
*/
|
|
159
|
+
mask?: string | {
|
|
160
|
+
light: string;
|
|
161
|
+
dark: string;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* 文本颜色
|
|
165
|
+
*/
|
|
166
|
+
color?: string | {
|
|
167
|
+
light: string;
|
|
168
|
+
dark: string;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* 触发方式
|
|
172
|
+
*
|
|
173
|
+
* @default 'hover'
|
|
174
|
+
*/
|
|
175
|
+
trigger?: "hover" | "click";
|
|
154
176
|
}
|
|
155
177
|
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region src/shared/codeTree.d.ts
|
|
156
180
|
interface CodeTreeOptions {
|
|
157
|
-
|
|
158
|
-
|
|
181
|
+
icon?: FileTreeIconMode;
|
|
182
|
+
height?: string | number;
|
|
159
183
|
}
|
|
160
184
|
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/shared/repl.d.ts
|
|
161
187
|
type ThemeOptions = BuiltinTheme | {
|
|
162
|
-
|
|
163
|
-
|
|
188
|
+
light: BuiltinTheme;
|
|
189
|
+
dark: BuiltinTheme;
|
|
164
190
|
};
|
|
165
191
|
interface ReplOptions {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
192
|
+
theme?: ThemeOptions;
|
|
193
|
+
go?: boolean;
|
|
194
|
+
kotlin?: boolean;
|
|
195
|
+
rust?: boolean;
|
|
170
196
|
}
|
|
171
197
|
interface ReplEditorData {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
198
|
+
grammars: {
|
|
199
|
+
go?: any;
|
|
200
|
+
kotlin?: any;
|
|
201
|
+
rust?: any;
|
|
202
|
+
};
|
|
203
|
+
theme: ThemeRegistration | {
|
|
204
|
+
light: ThemeRegistration;
|
|
205
|
+
dark: ThemeRegistration;
|
|
206
|
+
};
|
|
181
207
|
}
|
|
182
208
|
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region src/shared/plugin.d.ts
|
|
183
211
|
interface MarkdownPowerPluginOptions {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
|
|
212
|
+
/**
|
|
213
|
+
* 是否启用注释
|
|
214
|
+
* @default false
|
|
215
|
+
*/
|
|
216
|
+
annotation?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* 是否启用 abbr 语法
|
|
219
|
+
* @default false
|
|
220
|
+
*/
|
|
221
|
+
abbr?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* 配置代码块分组
|
|
224
|
+
*/
|
|
225
|
+
codeTabs?: CodeTabsOptions;
|
|
226
|
+
/**
|
|
227
|
+
* 是否启用 npm-to 容器
|
|
228
|
+
*/
|
|
229
|
+
npmTo?: boolean | NpmToOptions;
|
|
230
|
+
/**
|
|
231
|
+
* 是否启用 PDF 嵌入语法
|
|
232
|
+
*
|
|
233
|
+
* `@[pdf](pdf_url)`
|
|
234
|
+
*
|
|
235
|
+
* @default false
|
|
236
|
+
*/
|
|
237
|
+
pdf?: boolean | PDFOptions;
|
|
238
|
+
/**
|
|
239
|
+
* 是否启用 iconify 图标嵌入语法
|
|
240
|
+
*
|
|
241
|
+
* `::collect:icon_name::`
|
|
242
|
+
*
|
|
243
|
+
* @default false
|
|
244
|
+
*/
|
|
245
|
+
icons?: boolean | IconsOptions;
|
|
246
|
+
/**
|
|
247
|
+
* 是否启用 隐秘文本 语法
|
|
248
|
+
*
|
|
249
|
+
* `!!plot_content!!`
|
|
250
|
+
*
|
|
251
|
+
* @default false
|
|
252
|
+
*/
|
|
253
|
+
plot?: boolean | PlotOptions;
|
|
254
|
+
/**
|
|
255
|
+
* 是否启用 timeline 语法
|
|
256
|
+
*
|
|
257
|
+
* ```md
|
|
258
|
+
* ::: timeline
|
|
259
|
+
* - title
|
|
260
|
+
* time="Q1" icon="ri:clockwise-line" line="dashed" type="warning" color="red"
|
|
261
|
+
*
|
|
262
|
+
* xxx
|
|
263
|
+
* :::
|
|
264
|
+
* ```
|
|
265
|
+
*
|
|
266
|
+
* @default false
|
|
267
|
+
*/
|
|
268
|
+
timeline?: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* 是否启用 collapse 折叠面板 语法
|
|
271
|
+
*
|
|
272
|
+
* ```md
|
|
273
|
+
* ::: collapse accordion
|
|
274
|
+
* - + title
|
|
275
|
+
*
|
|
276
|
+
* content
|
|
277
|
+
*
|
|
278
|
+
* - - title
|
|
279
|
+
*
|
|
280
|
+
* content
|
|
281
|
+
* :::
|
|
282
|
+
* ```
|
|
283
|
+
*
|
|
284
|
+
* @default false
|
|
285
|
+
*/
|
|
286
|
+
collapse?: boolean;
|
|
287
|
+
/**
|
|
288
|
+
* 是否启用 chat 容器 语法
|
|
289
|
+
*
|
|
290
|
+
* ```md
|
|
291
|
+
* ::: chat
|
|
292
|
+
* {:date}
|
|
293
|
+
*
|
|
294
|
+
* {user}
|
|
295
|
+
* message
|
|
296
|
+
*
|
|
297
|
+
* {.}
|
|
298
|
+
* message
|
|
299
|
+
* :::
|
|
300
|
+
* ```
|
|
301
|
+
* @default false
|
|
302
|
+
*/
|
|
303
|
+
chat?: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* 是否启用 field / field-group 容器
|
|
306
|
+
*
|
|
307
|
+
* @default false
|
|
308
|
+
*/
|
|
309
|
+
field?: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* 是否启用 bilibili 视频嵌入
|
|
312
|
+
*
|
|
313
|
+
* `@[bilibili](bid)`
|
|
314
|
+
*
|
|
315
|
+
* @default false
|
|
316
|
+
*/
|
|
317
|
+
bilibili?: boolean;
|
|
318
|
+
/**
|
|
319
|
+
* 是否启用 youtube 视频嵌入
|
|
320
|
+
*
|
|
321
|
+
* `@[youtube](video_id)`
|
|
322
|
+
*
|
|
323
|
+
* @default false
|
|
324
|
+
*/
|
|
325
|
+
youtube?: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* 是否启用 artPlayer 视频嵌入
|
|
328
|
+
*
|
|
329
|
+
* `@[artPlayer](url)`
|
|
330
|
+
*/
|
|
331
|
+
artPlayer?: boolean;
|
|
332
|
+
/**
|
|
333
|
+
* 是否启用 audioReader 音频嵌入
|
|
334
|
+
*
|
|
335
|
+
* `@[audioReader](url)`
|
|
336
|
+
*/
|
|
337
|
+
audioReader?: boolean;
|
|
338
|
+
/**
|
|
339
|
+
* 是否启用 codepen 嵌入
|
|
340
|
+
*
|
|
341
|
+
* `@[codepen](pen_id)`
|
|
342
|
+
*
|
|
343
|
+
* @default false
|
|
344
|
+
*/
|
|
345
|
+
codepen?: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* @deprecated
|
|
348
|
+
*/
|
|
349
|
+
replit?: boolean;
|
|
350
|
+
/**
|
|
351
|
+
* 是否启用 codeSandbox 嵌入
|
|
352
|
+
*
|
|
353
|
+
* `@[codesandbox](codesandbox_id)`
|
|
354
|
+
*
|
|
355
|
+
* @default false
|
|
356
|
+
*/
|
|
357
|
+
codeSandbox?: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* 是否启用 jsfiddle 嵌入
|
|
360
|
+
*
|
|
361
|
+
* `@[jsfiddle](jsfiddle_id)`
|
|
362
|
+
*
|
|
363
|
+
* @default false
|
|
364
|
+
*/
|
|
365
|
+
jsfiddle?: boolean;
|
|
366
|
+
/**
|
|
367
|
+
* 是否启用 REPL 容器语法
|
|
368
|
+
*
|
|
369
|
+
* @default false
|
|
370
|
+
*/
|
|
371
|
+
repl?: false | ReplOptions;
|
|
372
|
+
/**
|
|
373
|
+
* 是否启用 文件树 容器语法
|
|
374
|
+
*
|
|
375
|
+
* @default false
|
|
376
|
+
*/
|
|
377
|
+
fileTree?: boolean | FileTreeOptions;
|
|
378
|
+
/**
|
|
379
|
+
* 是否启用 代码树 容器语法 和 嵌入语法
|
|
380
|
+
*
|
|
381
|
+
* ```md
|
|
382
|
+
* ::: code-tree
|
|
383
|
+
* :::
|
|
384
|
+
* ```
|
|
385
|
+
*
|
|
386
|
+
* `@[code-tree](file_path)`
|
|
387
|
+
*
|
|
388
|
+
*
|
|
389
|
+
* @default false
|
|
390
|
+
*/
|
|
391
|
+
codeTree?: boolean | CodeTreeOptions;
|
|
392
|
+
/**
|
|
393
|
+
* 是否启用 demo 语法
|
|
394
|
+
*/
|
|
395
|
+
demo?: boolean;
|
|
396
|
+
/**
|
|
397
|
+
* 是否启用 caniuse 嵌入语法
|
|
398
|
+
*
|
|
399
|
+
* `@[caniuse](feature_name)`
|
|
400
|
+
*
|
|
401
|
+
* @default false
|
|
402
|
+
*/
|
|
403
|
+
caniuse?: boolean | CanIUseOptions;
|
|
404
|
+
/**
|
|
405
|
+
* 是否启用 自动填充 图片宽高属性
|
|
406
|
+
*
|
|
407
|
+
* __请注意,无论是否启用,该功能仅在构建生产包时生效__
|
|
408
|
+
*
|
|
409
|
+
* - 如果为 `true` ,等同于 `'local'`
|
|
410
|
+
* - 如果为 `local`,则仅对本地图片 添加 width 和 height
|
|
411
|
+
* - 如果为 `all`,则对所有图片(即包括 本地 和 远程) 添加 width 和 height
|
|
412
|
+
*
|
|
413
|
+
* 图片在加载过程中如果比较慢,从加载到完成的过程会导致页面布局不稳定,导致内容闪烁等。
|
|
414
|
+
* 此功能通过给图片添加 `width` 和 `height` 属性来解决该问题。
|
|
415
|
+
*
|
|
416
|
+
* 请谨慎使用 `all` 选项,该选项会在构建阶段发起网络请求,尝试加载远程图片以获取图片尺寸信息,
|
|
417
|
+
* 这可能会导致 构建时间变得更长(幸运的是获取尺寸信息只需要加载图片 几 KB 的数据包,因此耗时不会过长)
|
|
418
|
+
*
|
|
419
|
+
* @default false
|
|
420
|
+
*/
|
|
421
|
+
imageSize?: boolean | "local" | "all";
|
|
422
|
+
} //#endregion
|
|
423
|
+
//#region src/shared/replit.d.ts
|
|
396
424
|
interface ReplitTokenMeta extends SizeOptions {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
425
|
+
title?: string;
|
|
426
|
+
source?: string;
|
|
427
|
+
theme?: string;
|
|
400
428
|
}
|
|
401
429
|
|
|
430
|
+
//#endregion
|
|
431
|
+
//#region src/shared/video.d.ts
|
|
402
432
|
interface VideoOptions {
|
|
403
|
-
|
|
404
|
-
|
|
433
|
+
bilibili?: boolean;
|
|
434
|
+
youtube?: boolean;
|
|
405
435
|
}
|
|
406
436
|
interface BilibiliTokenMeta extends SizeOptions {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
437
|
+
title?: string;
|
|
438
|
+
bvid?: string;
|
|
439
|
+
aid?: string;
|
|
440
|
+
cid?: string;
|
|
441
|
+
autoplay?: boolean;
|
|
442
|
+
time?: string | number;
|
|
443
|
+
page?: number;
|
|
414
444
|
}
|
|
415
445
|
interface YoutubeTokenMeta extends SizeOptions {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
446
|
+
title?: string;
|
|
447
|
+
id: string;
|
|
448
|
+
autoplay?: boolean;
|
|
449
|
+
loop?: boolean;
|
|
450
|
+
start?: string | number;
|
|
451
|
+
end?: string | number;
|
|
422
452
|
}
|
|
423
453
|
interface ArtPlayerTokenMeta extends SizeOptions {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
454
|
+
muted?: boolean;
|
|
455
|
+
autoplay?: boolean;
|
|
456
|
+
autoMini?: boolean;
|
|
457
|
+
loop?: boolean;
|
|
458
|
+
volume?: number;
|
|
459
|
+
poster?: string;
|
|
460
|
+
url: string;
|
|
461
|
+
type?: string;
|
|
432
462
|
}
|
|
433
463
|
|
|
464
|
+
//#endregion
|
|
465
|
+
//#region src/node/container/codeTabs.d.ts
|
|
434
466
|
declare function createCodeTabIconGetter(options?: CodeTabsOptions): (filename: string) => string | void;
|
|
435
467
|
|
|
468
|
+
//#endregion
|
|
469
|
+
//#region src/node/enhance/imageSize.d.ts
|
|
436
470
|
interface ImgSize {
|
|
437
|
-
|
|
438
|
-
|
|
471
|
+
width: number;
|
|
472
|
+
height: number;
|
|
439
473
|
}
|
|
440
474
|
declare function resolveImageSize(app: App, url: string, remote?: boolean): Promise<ImgSize>;
|
|
441
475
|
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region src/node/plugin.d.ts
|
|
442
478
|
declare function markdownPowerPlugin(options?: MarkdownPowerPluginOptions): Plugin;
|
|
443
479
|
|
|
444
|
-
|
|
480
|
+
//#endregion
|
|
481
|
+
export { ArtPlayerTokenMeta, BilibiliTokenMeta, CanIUseMode, CanIUseOptions, CanIUseTokenMeta, CodeSandboxTokenMeta, CodeTabsOptions, CodepenTokenMeta, DemoContainerRender, DemoFile, DemoMeta, FileTreeIconMode, FileTreeOptions, IconsOptions, JSFiddleTokenMeta, MarkdownDemoEnv, MarkdownPowerPluginOptions, NpmToOptions, NpmToPackageManager, PDFEmbedType, PDFOptions, PDFTokenMeta, PlotOptions, ReplEditorData, ReplOptions, ReplitTokenMeta, SizeOptions, ThemeOptions, VideoOptions, YoutubeTokenMeta, createCodeTabIconGetter, markdownPowerPlugin, resolveImageSize };
|