vuepress-plugin-md-power 1.0.0-rc.126 → 1.0.0-rc.128
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/VPDemoBasic.vue +39 -0
- package/lib/client/components/VPDemoNormal.vue +193 -0
- package/lib/client/styles/demo.css +157 -0
- package/lib/client/utils/shared.d.ts +4 -0
- package/lib/client/utils/shared.js +36 -0
- package/lib/node/index.d.ts +31 -2
- package/lib/node/index.js +719 -59
- package/lib/shared/index.d.ts +31 -1
- package/package.json +12 -5
package/lib/shared/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import Token from 'markdown-it/lib/token.mjs';
|
|
2
|
+
import { App } from 'vuepress';
|
|
3
|
+
import { MarkdownEnv, Markdown } from 'vuepress/markdown';
|
|
1
4
|
import { BuiltinTheme, ThemeRegistration } from 'shiki';
|
|
2
5
|
|
|
3
6
|
type CanIUseMode = 'embed' | 'image';
|
|
@@ -53,6 +56,29 @@ interface CodeTabsOptions {
|
|
|
53
56
|
};
|
|
54
57
|
}
|
|
55
58
|
|
|
59
|
+
interface DemoFile {
|
|
60
|
+
type: 'vue' | 'normal' | 'css' | 'markdown';
|
|
61
|
+
export?: string;
|
|
62
|
+
path: string;
|
|
63
|
+
gitignore?: boolean;
|
|
64
|
+
}
|
|
65
|
+
interface MarkdownDemoEnv extends MarkdownEnv {
|
|
66
|
+
demoFiles?: DemoFile[];
|
|
67
|
+
}
|
|
68
|
+
interface DemoMeta {
|
|
69
|
+
type: 'vue' | 'normal' | 'markdown';
|
|
70
|
+
url: string;
|
|
71
|
+
title?: string;
|
|
72
|
+
desc?: string;
|
|
73
|
+
codeSetting?: string;
|
|
74
|
+
expanded?: boolean;
|
|
75
|
+
}
|
|
76
|
+
interface DemoContainerRender {
|
|
77
|
+
before: (app: App, md: Markdown, env: MarkdownDemoEnv, meta: DemoMeta, codeMap: Record<string, string>) => string;
|
|
78
|
+
after: () => string;
|
|
79
|
+
token?: (token: Token, tokens: Token[], index: number) => void;
|
|
80
|
+
}
|
|
81
|
+
|
|
56
82
|
type FileTreeIconMode = 'simple' | 'colored';
|
|
57
83
|
interface FileTreeOptions {
|
|
58
84
|
icon?: FileTreeIconMode;
|
|
@@ -250,6 +276,10 @@ interface MarkdownPowerPluginOptions {
|
|
|
250
276
|
* @default false
|
|
251
277
|
*/
|
|
252
278
|
fileTree?: boolean | FileTreeOptions;
|
|
279
|
+
/**
|
|
280
|
+
* 是否启用 demo 语法
|
|
281
|
+
*/
|
|
282
|
+
demo?: boolean;
|
|
253
283
|
/**
|
|
254
284
|
* 是否启用 caniuse 嵌入语法
|
|
255
285
|
*
|
|
@@ -316,4 +346,4 @@ interface ArtPlayerTokenMeta extends SizeOptions {
|
|
|
316
346
|
type?: string;
|
|
317
347
|
}
|
|
318
348
|
|
|
319
|
-
export type { ArtPlayerTokenMeta, BilibiliTokenMeta, CanIUseMode, CanIUseOptions, CanIUseTokenMeta, CodeSandboxTokenMeta, CodeTabsOptions, CodepenTokenMeta, FileTreeIconMode, FileTreeOptions, IconsOptions, JSFiddleTokenMeta, MarkdownPowerPluginOptions, NpmToOptions, NpmToPackageManager, PDFEmbedType, PDFOptions, PDFTokenMeta, PlotOptions, ReplEditorData, ReplOptions, ReplitTokenMeta, SizeOptions, ThemeOptions, VideoOptions, YoutubeTokenMeta };
|
|
349
|
+
export type { 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 };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuepress-plugin-md-power",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.128",
|
|
5
5
|
"description": "The Plugin for VuePress 2 - markdown power",
|
|
6
6
|
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -33,9 +33,14 @@
|
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"artplayer": "^5.2.0",
|
|
35
35
|
"dashjs": "^4.7.4",
|
|
36
|
+
"esbuild": "^0.24.2",
|
|
36
37
|
"hls.js": "^1.5.18",
|
|
38
|
+
"less": "^4.2.1",
|
|
37
39
|
"markdown-it": "^14.0.0",
|
|
38
40
|
"mpegts.js": "1.7.3",
|
|
41
|
+
"sass": "^1.83.0",
|
|
42
|
+
"sass-embedded": "^1.83.0",
|
|
43
|
+
"stylus": "0.64.0",
|
|
39
44
|
"vuepress": "2.0.0-rc.19"
|
|
40
45
|
},
|
|
41
46
|
"peerDependenciesMeta": {
|
|
@@ -63,15 +68,17 @@
|
|
|
63
68
|
"@mdit/plugin-sup": "^0.14.0",
|
|
64
69
|
"@mdit/plugin-tab": "^0.14.0",
|
|
65
70
|
"@mdit/plugin-tasklist": "^0.14.0",
|
|
66
|
-
"@vuepress/helper": "2.0.0-rc.
|
|
71
|
+
"@vuepress/helper": "2.0.0-rc.69",
|
|
67
72
|
"@vueuse/core": "^12.3.0",
|
|
73
|
+
"chokidar": "3.6.0",
|
|
68
74
|
"image-size": "^1.2.0",
|
|
69
|
-
"local-pkg": "^0.
|
|
75
|
+
"local-pkg": "^1.0.0",
|
|
76
|
+
"lru-cache": "^11.0.2",
|
|
70
77
|
"markdown-it-container": "^4.0.0",
|
|
71
78
|
"nanoid": "^5.0.9",
|
|
72
79
|
"shiki": "^1.26.1",
|
|
73
|
-
"tm-grammars": "^1.22.
|
|
74
|
-
"tm-themes": "^1.9.
|
|
80
|
+
"tm-grammars": "^1.22.3",
|
|
81
|
+
"tm-themes": "^1.9.8",
|
|
75
82
|
"vue": "^3.5.13"
|
|
76
83
|
},
|
|
77
84
|
"devDependencies": {
|