md-editor-v3 4.12.3 → 4.13.0-beta.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.
- package/README.md +24 -0
- package/lib/cjs/MdEditor.cjs +59 -24
- package/lib/cjs/chunks/config.cjs +5 -2
- package/lib/cjs/chunks/index.cjs +34 -9
- package/lib/cjs/chunks/index4.cjs +2 -0
- package/lib/es/MdEditor.mjs +60 -25
- package/lib/es/chunks/config.mjs +5 -2
- package/lib/es/chunks/index.mjs +35 -10
- package/lib/es/chunks/index4.mjs +11 -9
- package/lib/types/DropdownToolbar/DropdownToolbar.d.ts +3 -2
- package/lib/types/DropdownToolbar/index.d.ts +17 -16
- package/lib/types/MdCatalog/CatalogLink.d.ts +5 -4
- package/lib/types/MdCatalog/MdCatalog.d.ts +3 -2
- package/lib/types/MdCatalog/index.d.ts +19 -18
- package/lib/types/MdEditor/Editor.d.ts +37 -37
- package/lib/types/MdEditor/components/Checkbox/index.d.ts +2 -1
- package/lib/types/MdEditor/components/Divider/index.d.ts +1 -1
- package/lib/types/MdEditor/components/Dropdown/index.d.ts +2 -1
- package/lib/types/MdEditor/components/Icon/Icon.d.ts +3 -2
- package/lib/types/MdEditor/components/Icon/Str.d.ts +1 -0
- package/lib/types/MdEditor/components/Icon/index.d.ts +3 -2
- package/lib/types/MdEditor/components/Modal/Modal.d.ts +2 -1
- package/lib/types/MdEditor/components/Modal/index.d.ts +18 -17
- package/lib/types/MdEditor/components/Popper/index.d.ts +2 -1
- package/lib/types/MdEditor/composition.d.ts +4 -4
- package/lib/types/MdEditor/config.d.ts +3 -2
- package/lib/types/MdEditor/index.d.ts +27 -26
- package/lib/types/MdEditor/layouts/Content/ContentPreview.d.ts +14 -13
- package/lib/types/MdEditor/layouts/Content/codemirror/autocompletion.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Content/codemirror/commands.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Content/codemirror/index.d.ts +3 -2
- package/lib/types/MdEditor/layouts/Content/codemirror/themeLight.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Content/codemirror/themeOneDark.d.ts +2 -4
- package/lib/types/MdEditor/layouts/Content/composition/index.d.ts +7 -6
- package/lib/types/MdEditor/layouts/Content/composition/useAttach.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Content/composition/useAutoScroll.d.ts +3 -2
- package/lib/types/MdEditor/layouts/Content/composition/useCodeMirror.d.ts +4 -3
- package/lib/types/MdEditor/layouts/Content/composition/useCopyCode.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Content/composition/useHighlight.d.ts +1 -0
- package/lib/types/MdEditor/layouts/Content/composition/useKatex.d.ts +1 -0
- package/lib/types/MdEditor/layouts/Content/composition/useMarkdownIt.d.ts +3 -2
- package/lib/types/MdEditor/layouts/Content/composition/useMermaid.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Content/composition/usePasteUpload.d.ts +1 -0
- package/lib/types/MdEditor/layouts/Content/composition/useResize.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Content/composition/userZoom.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Content/index.d.ts +14 -14
- package/lib/types/MdEditor/layouts/Content/markdownIt/codetabs/index.d.ts +2 -9
- package/lib/types/MdEditor/layouts/Content/markdownIt/heading/index.d.ts +3 -2
- package/lib/types/MdEditor/layouts/Content/markdownIt/katex/index.d.ts +1 -5
- package/lib/types/MdEditor/layouts/Content/markdownIt/mermaid/index.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Content/props.d.ts +4 -3
- package/lib/types/MdEditor/layouts/Content/type.d.ts +1 -0
- package/lib/types/MdEditor/layouts/Footer/MarkdownTotal.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Footer/ScrollAuto.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Footer/index.d.ts +3 -2
- package/lib/types/MdEditor/layouts/Modals/Clip.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Modals/Link.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Modals/index.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Toolbar/TableShape.d.ts +2 -1
- package/lib/types/MdEditor/layouts/Toolbar/composition.d.ts +1 -0
- package/lib/types/MdEditor/layouts/Toolbar/index.d.ts +9 -8
- package/lib/types/MdEditor/layouts/Toolbar/props.d.ts +4 -3
- package/lib/types/MdEditor/props.d.ts +3 -2
- package/lib/types/MdEditor/static/event-name.d.ts +1 -0
- package/lib/types/MdEditor/type.d.ts +18 -6
- package/lib/types/MdEditor/utils/content-help.d.ts +2 -1
- package/lib/types/MdEditor/utils/scroll-auto.d.ts +2 -1
- package/lib/types/MdEditor/utils/vue-tsx.d.ts +2 -1
- package/lib/types/MdPreview/MdPreview.d.ts +18 -18
- package/lib/types/MdPreview/composition/useExpose.d.ts +2 -1
- package/lib/types/MdPreview/index.d.ts +24 -23
- package/lib/types/ModalToolbar/ModalToolbar.d.ts +3 -2
- package/lib/types/ModalToolbar/index.d.ts +17 -16
- package/lib/types/NormalToolbar/NormalToolbar.d.ts +3 -2
- package/lib/types/NormalToolbar/index.d.ts +17 -16
- package/lib/types/config.d.ts +2 -2
- package/lib/umd/index.js +36 -36
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
2
|
updateModelValue: {
|
|
3
3
|
type: import("vue").PropType<(v: string) => void>;
|
|
4
4
|
default: () => void;
|
|
@@ -47,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
47
|
type: import("vue").PropType<boolean>;
|
|
48
48
|
};
|
|
49
49
|
theme: {
|
|
50
|
-
type: import("vue").PropType<import(
|
|
50
|
+
type: import("vue").PropType<import("~/type").Themes>;
|
|
51
51
|
default: string;
|
|
52
52
|
};
|
|
53
53
|
onInput: {
|
|
@@ -68,7 +68,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
68
|
default: string;
|
|
69
69
|
};
|
|
70
70
|
setting: {
|
|
71
|
-
type: import("vue").PropType<import(
|
|
71
|
+
type: import("vue").PropType<import("~/type").SettingType>;
|
|
72
72
|
default: () => {
|
|
73
73
|
preview: boolean;
|
|
74
74
|
};
|
|
@@ -78,11 +78,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
78
78
|
default: () => void;
|
|
79
79
|
};
|
|
80
80
|
onGetCatalog: {
|
|
81
|
-
type: import("vue").PropType<(list: import(
|
|
81
|
+
type: import("vue").PropType<(list: import("~/type").HeadList[]) => void>;
|
|
82
82
|
default: () => void;
|
|
83
83
|
};
|
|
84
84
|
mdHeadingId: {
|
|
85
|
-
type: import("vue").PropType<import(
|
|
85
|
+
type: import("vue").PropType<import("~/type").MdHeadingId>;
|
|
86
86
|
default: () => string;
|
|
87
87
|
};
|
|
88
88
|
noMermaid: {
|
|
@@ -164,7 +164,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
164
164
|
type: import("vue").PropType<boolean>;
|
|
165
165
|
};
|
|
166
166
|
theme: {
|
|
167
|
-
type: import("vue").PropType<import(
|
|
167
|
+
type: import("vue").PropType<import("~/type").Themes>;
|
|
168
168
|
default: string;
|
|
169
169
|
};
|
|
170
170
|
onInput: {
|
|
@@ -185,7 +185,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
185
185
|
default: string;
|
|
186
186
|
};
|
|
187
187
|
setting: {
|
|
188
|
-
type: import("vue").PropType<import(
|
|
188
|
+
type: import("vue").PropType<import("~/type").SettingType>;
|
|
189
189
|
default: () => {
|
|
190
190
|
preview: boolean;
|
|
191
191
|
};
|
|
@@ -195,11 +195,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
195
195
|
default: () => void;
|
|
196
196
|
};
|
|
197
197
|
onGetCatalog: {
|
|
198
|
-
type: import("vue").PropType<(list: import(
|
|
198
|
+
type: import("vue").PropType<(list: import("~/type").HeadList[]) => void>;
|
|
199
199
|
default: () => void;
|
|
200
200
|
};
|
|
201
201
|
mdHeadingId: {
|
|
202
|
-
type: import("vue").PropType<import(
|
|
202
|
+
type: import("vue").PropType<import("~/type").MdHeadingId>;
|
|
203
203
|
default: () => string;
|
|
204
204
|
};
|
|
205
205
|
noMermaid: {
|
|
@@ -233,23 +233,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
233
233
|
type: import("vue").PropType<(h: string) => Promise<string>>;
|
|
234
234
|
};
|
|
235
235
|
}>>, {
|
|
236
|
+
previewOnly: boolean;
|
|
236
237
|
onChange: (v: string) => void;
|
|
237
238
|
onHtmlChanged: (h: string) => void;
|
|
238
|
-
onGetCatalog: (list: import(
|
|
239
|
+
onGetCatalog: (list: import("~/type").HeadList[]) => void;
|
|
239
240
|
onBlur: (event: FocusEvent) => void;
|
|
240
241
|
onFocus: (event: FocusEvent) => void;
|
|
241
242
|
onDrop: (event: DragEvent) => void;
|
|
242
243
|
placeholder: string;
|
|
243
244
|
modelValue: string;
|
|
244
|
-
theme: import(
|
|
245
|
-
mdHeadingId: import(
|
|
245
|
+
theme: import("~/type").Themes;
|
|
246
|
+
mdHeadingId: import("~/type").MdHeadingId;
|
|
246
247
|
sanitize: (html: string) => string;
|
|
247
248
|
noMermaid: boolean;
|
|
248
249
|
noKatex: boolean;
|
|
249
250
|
formatCopiedText: (text: string) => string;
|
|
250
251
|
noHighlight: boolean;
|
|
251
|
-
setting: import(
|
|
252
|
+
setting: import("~/type").SettingType;
|
|
252
253
|
updateModelValue: (v: string) => void;
|
|
253
|
-
previewOnly: boolean;
|
|
254
254
|
}>;
|
|
255
255
|
export default _default;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* 这里仅做适配
|
|
5
|
-
*
|
|
6
|
-
* 源码如果在页面中存在多个编辑器,但是内容又是相同的时候,第二个开始的内容有点混乱
|
|
7
|
-
* 需要与编辑器的editorId绑定
|
|
8
|
-
*/
|
|
9
|
-
import markdownit from 'markdown-it/lib';
|
|
1
|
+
import { default as markdownit } from 'markdown-it/lib';
|
|
2
|
+
|
|
10
3
|
export interface CodeTabsPluginOps extends markdownit.Options {
|
|
11
4
|
editorId: string;
|
|
12
5
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import markdownit from 'markdown-it/lib';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
1
|
import { HeadList, MdHeadingId } from '../../../../type';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { default as markdownit } from 'markdown-it/lib';
|
|
4
|
+
|
|
4
5
|
export interface HeadingPluginOps extends markdownit.Options {
|
|
5
6
|
mdHeadingId: MdHeadingId;
|
|
6
7
|
headsRef: Ref<HeadList[]>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
-
import { CompletionSource } from '@codemirror/autocomplete';
|
|
3
|
-
import { LooseRequired } from '@vue/shared';
|
|
4
1
|
import { HeadList, SettingType, MdHeadingId, Themes } from '../../type';
|
|
2
|
+
import { LooseRequired } from '@vue/shared';
|
|
3
|
+
import { CompletionSource } from '@codemirror/autocomplete';
|
|
4
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
5
|
+
|
|
5
6
|
export declare const contentPreviewProps: {
|
|
6
7
|
modelValue: {
|
|
7
8
|
type: PropType<string>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { PropType, VNode, ExtractPropTypes } from 'vue';
|
|
2
1
|
import { Footers } from '../../type';
|
|
3
|
-
|
|
2
|
+
import { PropType, VNode, ExtractPropTypes } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<{
|
|
4
5
|
modelValue: {
|
|
5
6
|
type: PropType<string>;
|
|
6
7
|
default: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
2
3
|
interface HoverData {
|
|
3
4
|
x: number;
|
|
4
5
|
y: number;
|
|
5
6
|
}
|
|
6
|
-
declare const TableShape: import(
|
|
7
|
+
declare const TableShape: import('vue').DefineComponent<{
|
|
7
8
|
tableShape: {
|
|
8
9
|
type: PropType<number[]>;
|
|
9
10
|
default: () => number[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { VNode } from 'vue';
|
|
2
1
|
import { ToolbarNames } from '../../type';
|
|
3
|
-
|
|
2
|
+
import { VNode } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<{
|
|
4
5
|
noPrettier: {
|
|
5
6
|
type: import("vue").PropType<boolean>;
|
|
6
7
|
};
|
|
@@ -13,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
14
|
default: () => never[];
|
|
14
15
|
};
|
|
15
16
|
setting: {
|
|
16
|
-
type: import("vue").PropType<import(
|
|
17
|
+
type: import("vue").PropType<import("~/type").SettingType>;
|
|
17
18
|
default: () => {};
|
|
18
19
|
};
|
|
19
20
|
screenfull: {
|
|
@@ -25,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
26
|
default: string;
|
|
26
27
|
};
|
|
27
28
|
updateSetting: {
|
|
28
|
-
type: import("vue").PropType<import(
|
|
29
|
+
type: import("vue").PropType<import("~/type").UpdateSetting>;
|
|
29
30
|
default: () => void;
|
|
30
31
|
};
|
|
31
32
|
tableShape: {
|
|
@@ -56,7 +57,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
57
|
default: () => never[];
|
|
57
58
|
};
|
|
58
59
|
setting: {
|
|
59
|
-
type: import("vue").PropType<import(
|
|
60
|
+
type: import("vue").PropType<import("~/type").SettingType>;
|
|
60
61
|
default: () => {};
|
|
61
62
|
};
|
|
62
63
|
screenfull: {
|
|
@@ -68,7 +69,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
69
|
default: string;
|
|
69
70
|
};
|
|
70
71
|
updateSetting: {
|
|
71
|
-
type: import("vue").PropType<import(
|
|
72
|
+
type: import("vue").PropType<import("~/type").UpdateSetting>;
|
|
72
73
|
default: () => void;
|
|
73
74
|
};
|
|
74
75
|
tableShape: {
|
|
@@ -90,9 +91,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
90
91
|
toolbars: ToolbarNames[];
|
|
91
92
|
toolbarsExclude: ToolbarNames[];
|
|
92
93
|
tableShape: number[];
|
|
93
|
-
setting: import(
|
|
94
|
+
setting: import("~/type").SettingType;
|
|
94
95
|
screenfull: Record<string, any>;
|
|
95
96
|
screenfullJs: string;
|
|
96
|
-
updateSetting: import(
|
|
97
|
+
updateSetting: import("~/type").UpdateSetting;
|
|
97
98
|
}>;
|
|
98
99
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { PropType, VNode, ExtractPropTypes } from 'vue';
|
|
2
|
-
import { LooseRequired } from '@vue/shared';
|
|
3
1
|
import { ToolbarNames, SettingType, UpdateSetting } from '../../type';
|
|
2
|
+
import { LooseRequired } from '@vue/shared';
|
|
3
|
+
import { PropType, VNode, ExtractPropTypes } from 'vue';
|
|
4
|
+
|
|
4
5
|
export declare const toolbarProps: {
|
|
5
6
|
noPrettier: {
|
|
6
7
|
type: PropType<boolean>;
|
|
@@ -34,7 +35,7 @@ export declare const toolbarProps: {
|
|
|
34
35
|
default: () => number[];
|
|
35
36
|
};
|
|
36
37
|
defToolbars: {
|
|
37
|
-
type: PropType<VNode<import(
|
|
38
|
+
type: PropType<VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
38
39
|
[key: string]: any;
|
|
39
40
|
}>>;
|
|
40
41
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { PropType, CSSProperties } from 'vue';
|
|
2
|
-
import { CompletionSource } from '@codemirror/autocomplete';
|
|
3
1
|
import { ToolbarNames, MdHeadingId, Themes, Footers, ChangeEvent, SaveEvent, UploadImgEvent, HtmlChangedEvent, GetCatalogEvent, ErrorEvent, EditorEmits, CustomIcon } from './type';
|
|
2
|
+
import { CompletionSource } from '@codemirror/autocomplete';
|
|
3
|
+
import { PropType, CSSProperties } from 'vue';
|
|
4
|
+
|
|
4
5
|
export declare const mdHeadingId: MdHeadingId;
|
|
5
6
|
export declare const mdPreviewProps: {
|
|
6
7
|
/**
|
|
@@ -4,6 +4,7 @@ export declare const CHANGE_FULL_SCREEN = "changeFullscreen";
|
|
|
4
4
|
export declare const PAGE_FULL_SCREEN_CHANGED = "pageFullscreenChanged";
|
|
5
5
|
export declare const FULL_SCREEN_CHANGED = "fullscreenChanged";
|
|
6
6
|
export declare const PREVIEW_CHANGED = "previewChanged";
|
|
7
|
+
export declare const PREVIEW_ONLY_CHANGED = "previewOnlyChanged";
|
|
7
8
|
export declare const HTML_PREVIEW_CHANGED = "htmlPreviewChanged";
|
|
8
9
|
export declare const CATALOG_VISIBLE_CHANGED = "catalogVisibleChanged";
|
|
9
10
|
export declare const TEXTAREA_FOCUS = "textareaFocus";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import markdownit from 'markdown-it/lib';
|
|
3
|
-
import { Component, ExtractPropTypes, SetupContext } from 'vue';
|
|
4
|
-
import { Extension } from '@codemirror/state';
|
|
5
|
-
import { KeyBinding, EditorView } from '@codemirror/view';
|
|
6
|
-
import { editorProps, mdPreviewProps } from './props';
|
|
1
|
+
import { ToolDirective } from './utils/content-help';
|
|
7
2
|
import { IconName } from './components/Icon/Icon';
|
|
3
|
+
import { editorProps, mdPreviewProps } from './props';
|
|
4
|
+
import { KeyBinding, EditorView } from '@codemirror/view';
|
|
5
|
+
import { Extension } from '@codemirror/state';
|
|
6
|
+
import { Component, ExtractPropTypes, SetupContext } from 'vue';
|
|
7
|
+
import { default as markdownit } from 'markdown-it/lib';
|
|
8
|
+
import { LooseRequired } from '@vue/shared';
|
|
9
|
+
|
|
8
10
|
declare global {
|
|
9
11
|
interface Window {
|
|
10
12
|
hljs: any;
|
|
@@ -42,6 +44,7 @@ export interface ToolbarTips {
|
|
|
42
44
|
pageFullscreen?: string;
|
|
43
45
|
fullscreen?: string;
|
|
44
46
|
preview?: string;
|
|
47
|
+
previewOnly?: string;
|
|
45
48
|
htmlPreview?: string;
|
|
46
49
|
catalog?: string;
|
|
47
50
|
github?: string;
|
|
@@ -112,6 +115,7 @@ export interface SettingType {
|
|
|
112
115
|
fullscreen: boolean;
|
|
113
116
|
preview: boolean;
|
|
114
117
|
htmlPreview: boolean;
|
|
118
|
+
previewOnly: boolean;
|
|
115
119
|
}
|
|
116
120
|
export type Themes = 'light' | 'dark';
|
|
117
121
|
/**
|
|
@@ -299,6 +303,7 @@ export interface ExposeEvent {
|
|
|
299
303
|
pageFullscreen(status: boolean): void;
|
|
300
304
|
fullscreen(status: boolean): void;
|
|
301
305
|
preview(status: boolean): void;
|
|
306
|
+
previewOnly(status: boolean): void;
|
|
302
307
|
htmlPreview(status: boolean): void;
|
|
303
308
|
catalog(status: boolean): void;
|
|
304
309
|
}
|
|
@@ -350,6 +355,7 @@ export interface ExposeParam {
|
|
|
350
355
|
* @param status 是否显示预览
|
|
351
356
|
*/
|
|
352
357
|
togglePreview(status?: boolean): void;
|
|
358
|
+
togglePreviewOnly(status?: boolean): void;
|
|
353
359
|
/**
|
|
354
360
|
* 切换是否显示html预览
|
|
355
361
|
*
|
|
@@ -405,6 +411,12 @@ export interface ExposeParam {
|
|
|
405
411
|
* @param handlers
|
|
406
412
|
*/
|
|
407
413
|
domEventHandlers(handlers: DOMEventHandlers): void;
|
|
414
|
+
/**
|
|
415
|
+
* 执行内部插入命令
|
|
416
|
+
*
|
|
417
|
+
* @param direct
|
|
418
|
+
*/
|
|
419
|
+
execCommand(direct: ToolDirective): void;
|
|
408
420
|
}
|
|
409
421
|
export type ExposePreviewParam = Pick<ExposeParam, 'rerender'>;
|
|
410
422
|
export type EditorProps = Readonly<LooseRequired<Readonly<ExtractPropTypes<typeof editorProps>>>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import CodeMirrorUt from '../layouts/Content/codemirror';
|
|
1
|
+
import { default as CodeMirrorUt } from '../layouts/Content/codemirror';
|
|
2
|
+
|
|
2
3
|
export type ToolDirective = 'bold' | 'underline' | 'italic' | 'strikeThrough' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'quote' | 'unorderedList' | 'orderedList' | 'task' | 'codeRow' | 'code' | 'link' | 'image' | 'table' | 'sub' | 'sup' | 'prettier' | 'flow' | 'sequence' | 'gantt' | 'class' | 'state' | 'pie' | 'relationship' | 'journey' | 'katexInline' | 'katexBlock' | 'universal';
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPublicInstance, SetupContext } from 'vue';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* 获取指定插槽内容
|
|
4
5
|
* 方法设定:vue组件中v-slot优先级高于props
|
|
@@ -14,7 +15,7 @@ export declare const getSlot: ({ instance, ctx, props }: {
|
|
|
14
15
|
[x: string]: unknown;
|
|
15
16
|
};
|
|
16
17
|
slots: Readonly<{
|
|
17
|
-
[name: string]: import(
|
|
18
|
+
[name: string]: import('vue').Slot | undefined;
|
|
18
19
|
}>;
|
|
19
20
|
emit: (event: any, ...args: any[]) => void;
|
|
20
21
|
expose: (exposed?: Record<string, any> | undefined) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
declare const MdPreview: import(
|
|
1
|
+
declare const MdPreview: import('vue').DefineComponent<{
|
|
2
2
|
modelValue: {
|
|
3
3
|
type: import("vue").PropType<string>;
|
|
4
4
|
default: string;
|
|
5
5
|
};
|
|
6
6
|
theme: {
|
|
7
|
-
type: import("vue").PropType<import(
|
|
7
|
+
type: import("vue").PropType<import("~/type").Themes>;
|
|
8
8
|
default: string;
|
|
9
9
|
};
|
|
10
10
|
class: {
|
|
@@ -16,10 +16,10 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
18
|
onHtmlChanged: {
|
|
19
|
-
type: import("vue").PropType<import(
|
|
19
|
+
type: import("vue").PropType<import("~/type").HtmlChangedEvent>;
|
|
20
20
|
};
|
|
21
21
|
onGetCatalog: {
|
|
22
|
-
type: import("vue").PropType<import(
|
|
22
|
+
type: import("vue").PropType<import("~/type").GetCatalogEvent>;
|
|
23
23
|
};
|
|
24
24
|
editorId: {
|
|
25
25
|
type: import("vue").PropType<string>;
|
|
@@ -38,8 +38,8 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
38
38
|
default: () => {};
|
|
39
39
|
};
|
|
40
40
|
mdHeadingId: {
|
|
41
|
-
type: import("vue").PropType<import(
|
|
42
|
-
default: import(
|
|
41
|
+
type: import("vue").PropType<import("~/type").MdHeadingId>;
|
|
42
|
+
default: import("~/type").MdHeadingId;
|
|
43
43
|
};
|
|
44
44
|
sanitize: {
|
|
45
45
|
type: import("vue").PropType<(html: string) => string>;
|
|
@@ -81,20 +81,20 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
81
81
|
default: boolean;
|
|
82
82
|
};
|
|
83
83
|
customIcon: {
|
|
84
|
-
type: import("vue").PropType<import(
|
|
84
|
+
type: import("vue").PropType<import("~/type").CustomIcon>;
|
|
85
85
|
default: {};
|
|
86
86
|
};
|
|
87
87
|
sanitizeMermaid: {
|
|
88
88
|
type: import("vue").PropType<(h: string) => Promise<string>>;
|
|
89
89
|
default: (h: string) => Promise<string>;
|
|
90
90
|
};
|
|
91
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import(
|
|
91
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("~/type").EditorEmits, "onChange" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "onError" | "update:modelValue" | "onBlur" | "onFocus" | "onInput" | "onDrop" | "onInputBoxWitdhChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
92
92
|
modelValue: {
|
|
93
93
|
type: import("vue").PropType<string>;
|
|
94
94
|
default: string;
|
|
95
95
|
};
|
|
96
96
|
theme: {
|
|
97
|
-
type: import("vue").PropType<import(
|
|
97
|
+
type: import("vue").PropType<import("~/type").Themes>;
|
|
98
98
|
default: string;
|
|
99
99
|
};
|
|
100
100
|
class: {
|
|
@@ -106,10 +106,10 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
106
106
|
default: string;
|
|
107
107
|
};
|
|
108
108
|
onHtmlChanged: {
|
|
109
|
-
type: import("vue").PropType<import(
|
|
109
|
+
type: import("vue").PropType<import("~/type").HtmlChangedEvent>;
|
|
110
110
|
};
|
|
111
111
|
onGetCatalog: {
|
|
112
|
-
type: import("vue").PropType<import(
|
|
112
|
+
type: import("vue").PropType<import("~/type").GetCatalogEvent>;
|
|
113
113
|
};
|
|
114
114
|
editorId: {
|
|
115
115
|
type: import("vue").PropType<string>;
|
|
@@ -128,8 +128,8 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
128
128
|
default: () => {};
|
|
129
129
|
};
|
|
130
130
|
mdHeadingId: {
|
|
131
|
-
type: import("vue").PropType<import(
|
|
132
|
-
default: import(
|
|
131
|
+
type: import("vue").PropType<import("~/type").MdHeadingId>;
|
|
132
|
+
default: import("~/type").MdHeadingId;
|
|
133
133
|
};
|
|
134
134
|
sanitize: {
|
|
135
135
|
type: import("vue").PropType<(html: string) => string>;
|
|
@@ -171,7 +171,7 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
171
171
|
default: boolean;
|
|
172
172
|
};
|
|
173
173
|
customIcon: {
|
|
174
|
-
type: import("vue").PropType<import(
|
|
174
|
+
type: import("vue").PropType<import("~/type").CustomIcon>;
|
|
175
175
|
default: {};
|
|
176
176
|
};
|
|
177
177
|
sanitizeMermaid: {
|
|
@@ -194,13 +194,13 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
194
194
|
}, {
|
|
195
195
|
class: string;
|
|
196
196
|
style: string | import("vue").CSSProperties;
|
|
197
|
-
modelValue: string;
|
|
198
|
-
theme: import('../MdEditor/type').Themes;
|
|
199
197
|
language: string;
|
|
198
|
+
modelValue: string;
|
|
199
|
+
theme: import("~/type").Themes;
|
|
200
200
|
editorId: string;
|
|
201
201
|
showCodeRowNumber: boolean;
|
|
202
202
|
previewTheme: string;
|
|
203
|
-
mdHeadingId: import(
|
|
203
|
+
mdHeadingId: import("~/type").MdHeadingId;
|
|
204
204
|
sanitize: (html: string) => string;
|
|
205
205
|
noMermaid: boolean;
|
|
206
206
|
noKatex: boolean;
|
|
@@ -210,7 +210,7 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
210
210
|
codeStyleReverseList: string[];
|
|
211
211
|
noHighlight: boolean;
|
|
212
212
|
noImgZoomIn: boolean;
|
|
213
|
-
customIcon: import(
|
|
213
|
+
customIcon: import("~/type").CustomIcon;
|
|
214
214
|
sanitizeMermaid: (h: string) => Promise<string>;
|
|
215
215
|
}>;
|
|
216
216
|
export default MdPreview;
|