md-editor-v3 4.16.7 → 4.16.8-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/lib/cjs/MdEditor.cjs +1 -0
- package/lib/es/MdEditor.mjs +1 -0
- package/lib/types/DropdownToolbar/DropdownToolbar.d.ts +7 -8
- package/lib/types/DropdownToolbar/index.d.ts +46 -47
- package/lib/types/MdCatalog/CatalogLink.d.ts +5 -6
- package/lib/types/MdCatalog/MdCatalog.d.ts +3 -4
- package/lib/types/MdCatalog/index.d.ts +44 -45
- package/lib/types/MdEditor/Editor.d.ts +125 -125
- package/lib/types/MdEditor/components/Checkbox/index.d.ts +2 -3
- package/lib/types/MdEditor/components/Divider/index.d.ts +1 -1
- package/lib/types/MdEditor/components/Dropdown/index.d.ts +5 -6
- package/lib/types/MdEditor/components/Icon/Icon.d.ts +2 -3
- package/lib/types/MdEditor/components/Icon/Str.d.ts +0 -1
- package/lib/types/MdEditor/components/Icon/index.d.ts +4 -5
- package/lib/types/MdEditor/components/Modal/Modal.d.ts +2 -3
- package/lib/types/MdEditor/components/Modal/index.d.ts +49 -50
- package/lib/types/MdEditor/components/Popper/index.d.ts +2 -3
- package/lib/types/MdEditor/composition.d.ts +3 -4
- package/lib/types/MdEditor/config.d.ts +0 -1
- package/lib/types/MdEditor/index.d.ts +259 -260
- package/lib/types/MdEditor/layouts/Content/ContentPreview.d.ts +37 -38
- package/lib/types/MdEditor/layouts/Content/codemirror/autocompletion.d.ts +1 -2
- package/lib/types/MdEditor/layouts/Content/codemirror/commands.d.ts +1 -2
- package/lib/types/MdEditor/layouts/Content/codemirror/index.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Content/codemirror/themeLight.d.ts +1 -2
- package/lib/types/MdEditor/layouts/Content/codemirror/themeOneDark.d.ts +4 -2
- package/lib/types/MdEditor/layouts/Content/composition/index.d.ts +6 -7
- package/lib/types/MdEditor/layouts/Content/composition/useAttach.d.ts +1 -2
- package/lib/types/MdEditor/layouts/Content/composition/useAutoScroll.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Content/composition/useCodeMirror.d.ts +3 -4
- package/lib/types/MdEditor/layouts/Content/composition/useCopyCode.d.ts +1 -2
- package/lib/types/MdEditor/layouts/Content/composition/useHighlight.d.ts +1 -2
- package/lib/types/MdEditor/layouts/Content/composition/useKatex.d.ts +1 -2
- package/lib/types/MdEditor/layouts/Content/composition/useMarkdownIt.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Content/composition/useMermaid.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Content/composition/usePasteUpload.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Content/composition/useResize.d.ts +1 -2
- package/lib/types/MdEditor/layouts/Content/composition/userZoom.d.ts +1 -2
- package/lib/types/MdEditor/layouts/Content/index.d.ts +76 -76
- package/lib/types/MdEditor/layouts/Content/markdownIt/admonition/index.d.ts +6 -2
- package/lib/types/MdEditor/layouts/Content/markdownIt/code/index.d.ts +10 -3
- package/lib/types/MdEditor/layouts/Content/markdownIt/heading/index.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Content/markdownIt/katex/index.d.ts +6 -2
- package/lib/types/MdEditor/layouts/Content/markdownIt/mermaid/index.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Content/markdownIt/xss/index.d.ts +1 -1
- package/lib/types/MdEditor/layouts/Content/props.d.ts +3 -4
- package/lib/types/MdEditor/layouts/Content/type.d.ts +0 -1
- package/lib/types/MdEditor/layouts/Footer/MarkdownTotal.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Footer/ScrollAuto.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Footer/index.d.ts +5 -6
- package/lib/types/MdEditor/layouts/Modals/Clip.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Modals/Link.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Modals/index.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Toolbar/TableShape.d.ts +2 -3
- package/lib/types/MdEditor/layouts/Toolbar/composition.d.ts +0 -1
- package/lib/types/MdEditor/layouts/Toolbar/index.d.ts +25 -26
- package/lib/types/MdEditor/layouts/Toolbar/props.d.ts +3 -4
- package/lib/types/MdEditor/props.d.ts +4 -5
- package/lib/types/MdEditor/type.d.ts +7 -8
- package/lib/types/MdEditor/utils/content-help.d.ts +1 -2
- package/lib/types/MdEditor/utils/md-it.d.ts +1 -5
- package/lib/types/MdEditor/utils/scroll-auto.d.ts +1 -2
- package/lib/types/MdEditor/utils/vue-tsx.d.ts +0 -1
- package/lib/types/MdPreview/MdPreview.d.ts +56 -56
- package/lib/types/MdPreview/composition/useExpose.d.ts +1 -2
- package/lib/types/MdPreview/index.d.ts +118 -119
- package/lib/types/ModalToolbar/ModalToolbar.d.ts +5 -6
- package/lib/types/ModalToolbar/index.d.ts +66 -67
- package/lib/types/NormalToolbar/NormalToolbar.d.ts +5 -6
- package/lib/types/NormalToolbar/index.d.ts +30 -31
- package/lib/types/config.d.ts +2 -2
- package/lib/umd/index.js +1 -1
- package/package.json +4 -5
|
@@ -1,137 +1,136 @@
|
|
|
1
|
-
import { contentPreviewProps } from './props';
|
|
2
|
-
import { LooseRequired } from '@vue/shared';
|
|
3
1
|
import { ExtractPropTypes } from 'vue';
|
|
4
|
-
|
|
2
|
+
import { LooseRequired } from '@vue/shared';
|
|
3
|
+
import { contentPreviewProps } from './props';
|
|
5
4
|
export type ContentPreviewProps = Readonly<LooseRequired<Readonly<ExtractPropTypes<typeof contentPreviewProps>>>>;
|
|
6
|
-
declare const ContentPreview: import(
|
|
5
|
+
declare const ContentPreview: import("vue").DefineComponent<{
|
|
7
6
|
modelValue: {
|
|
8
|
-
type: import(
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
9
8
|
default: string;
|
|
10
9
|
};
|
|
11
10
|
setting: {
|
|
12
|
-
type: import(
|
|
11
|
+
type: import("vue").PropType<import("../../type").SettingType>;
|
|
13
12
|
default: () => {
|
|
14
13
|
preview: boolean;
|
|
15
14
|
};
|
|
16
15
|
};
|
|
17
16
|
onHtmlChanged: {
|
|
18
|
-
type: import(
|
|
17
|
+
type: import("vue").PropType<(h: string) => void>;
|
|
19
18
|
default: () => void;
|
|
20
19
|
};
|
|
21
20
|
onGetCatalog: {
|
|
22
|
-
type: import(
|
|
21
|
+
type: import("vue").PropType<(list: import("../../type").HeadList[]) => void>;
|
|
23
22
|
default: () => void;
|
|
24
23
|
};
|
|
25
24
|
mdHeadingId: {
|
|
26
|
-
type: import(
|
|
25
|
+
type: import("vue").PropType<import("../../type").MdHeadingId>;
|
|
27
26
|
default: () => string;
|
|
28
27
|
};
|
|
29
28
|
noMermaid: {
|
|
30
|
-
type: import(
|
|
29
|
+
type: import("vue").PropType<boolean>;
|
|
31
30
|
default: boolean;
|
|
32
31
|
};
|
|
33
32
|
sanitize: {
|
|
34
|
-
type: import(
|
|
33
|
+
type: import("vue").PropType<(html: string) => string>;
|
|
35
34
|
default: (html: string) => string;
|
|
36
35
|
};
|
|
37
36
|
noKatex: {
|
|
38
|
-
type: import(
|
|
37
|
+
type: import("vue").PropType<boolean>;
|
|
39
38
|
default: boolean;
|
|
40
39
|
};
|
|
41
40
|
formatCopiedText: {
|
|
42
|
-
type: import(
|
|
41
|
+
type: import("vue").PropType<(text: string) => string>;
|
|
43
42
|
default: (text: string) => string;
|
|
44
43
|
};
|
|
45
44
|
noHighlight: {
|
|
46
|
-
type: import(
|
|
45
|
+
type: import("vue").PropType<boolean>;
|
|
47
46
|
default: boolean;
|
|
48
47
|
};
|
|
49
48
|
previewOnly: {
|
|
50
|
-
type: import(
|
|
49
|
+
type: import("vue").PropType<boolean>;
|
|
51
50
|
default: boolean;
|
|
52
51
|
};
|
|
53
52
|
noImgZoomIn: {
|
|
54
|
-
type: import(
|
|
53
|
+
type: import("vue").PropType<boolean>;
|
|
55
54
|
};
|
|
56
55
|
sanitizeMermaid: {
|
|
57
|
-
type: import(
|
|
56
|
+
type: import("vue").PropType<(h: string) => Promise<string>>;
|
|
58
57
|
};
|
|
59
58
|
codeFoldable: {
|
|
60
|
-
type: import(
|
|
59
|
+
type: import("vue").PropType<boolean>;
|
|
61
60
|
};
|
|
62
61
|
autoFoldThreshold: {
|
|
63
|
-
type: import(
|
|
62
|
+
type: import("vue").PropType<number>;
|
|
64
63
|
};
|
|
65
|
-
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import(
|
|
64
|
+
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
66
65
|
modelValue: {
|
|
67
|
-
type: import(
|
|
66
|
+
type: import("vue").PropType<string>;
|
|
68
67
|
default: string;
|
|
69
68
|
};
|
|
70
69
|
setting: {
|
|
71
|
-
type: import(
|
|
70
|
+
type: import("vue").PropType<import("../../type").SettingType>;
|
|
72
71
|
default: () => {
|
|
73
72
|
preview: boolean;
|
|
74
73
|
};
|
|
75
74
|
};
|
|
76
75
|
onHtmlChanged: {
|
|
77
|
-
type: import(
|
|
76
|
+
type: import("vue").PropType<(h: string) => void>;
|
|
78
77
|
default: () => void;
|
|
79
78
|
};
|
|
80
79
|
onGetCatalog: {
|
|
81
|
-
type: import(
|
|
80
|
+
type: import("vue").PropType<(list: import("../../type").HeadList[]) => void>;
|
|
82
81
|
default: () => void;
|
|
83
82
|
};
|
|
84
83
|
mdHeadingId: {
|
|
85
|
-
type: import(
|
|
84
|
+
type: import("vue").PropType<import("../../type").MdHeadingId>;
|
|
86
85
|
default: () => string;
|
|
87
86
|
};
|
|
88
87
|
noMermaid: {
|
|
89
|
-
type: import(
|
|
88
|
+
type: import("vue").PropType<boolean>;
|
|
90
89
|
default: boolean;
|
|
91
90
|
};
|
|
92
91
|
sanitize: {
|
|
93
|
-
type: import(
|
|
92
|
+
type: import("vue").PropType<(html: string) => string>;
|
|
94
93
|
default: (html: string) => string;
|
|
95
94
|
};
|
|
96
95
|
noKatex: {
|
|
97
|
-
type: import(
|
|
96
|
+
type: import("vue").PropType<boolean>;
|
|
98
97
|
default: boolean;
|
|
99
98
|
};
|
|
100
99
|
formatCopiedText: {
|
|
101
|
-
type: import(
|
|
100
|
+
type: import("vue").PropType<(text: string) => string>;
|
|
102
101
|
default: (text: string) => string;
|
|
103
102
|
};
|
|
104
103
|
noHighlight: {
|
|
105
|
-
type: import(
|
|
104
|
+
type: import("vue").PropType<boolean>;
|
|
106
105
|
default: boolean;
|
|
107
106
|
};
|
|
108
107
|
previewOnly: {
|
|
109
|
-
type: import(
|
|
108
|
+
type: import("vue").PropType<boolean>;
|
|
110
109
|
default: boolean;
|
|
111
110
|
};
|
|
112
111
|
noImgZoomIn: {
|
|
113
|
-
type: import(
|
|
112
|
+
type: import("vue").PropType<boolean>;
|
|
114
113
|
};
|
|
115
114
|
sanitizeMermaid: {
|
|
116
|
-
type: import(
|
|
115
|
+
type: import("vue").PropType<(h: string) => Promise<string>>;
|
|
117
116
|
};
|
|
118
117
|
codeFoldable: {
|
|
119
|
-
type: import(
|
|
118
|
+
type: import("vue").PropType<boolean>;
|
|
120
119
|
};
|
|
121
120
|
autoFoldThreshold: {
|
|
122
|
-
type: import(
|
|
121
|
+
type: import("vue").PropType<number>;
|
|
123
122
|
};
|
|
124
123
|
}>>, {
|
|
125
124
|
previewOnly: boolean;
|
|
126
125
|
onHtmlChanged: (h: string) => void;
|
|
127
|
-
onGetCatalog: (list: import(
|
|
126
|
+
onGetCatalog: (list: import("../../type").HeadList[]) => void;
|
|
128
127
|
modelValue: string;
|
|
129
|
-
mdHeadingId: import(
|
|
128
|
+
mdHeadingId: import("../../type").MdHeadingId;
|
|
130
129
|
sanitize: (html: string) => string;
|
|
131
130
|
noMermaid: boolean;
|
|
132
131
|
noKatex: boolean;
|
|
133
132
|
formatCopiedText: (text: string) => string;
|
|
134
133
|
noHighlight: boolean;
|
|
135
|
-
setting: import(
|
|
134
|
+
setting: import("../../type").SettingType;
|
|
136
135
|
}, {}>;
|
|
137
136
|
export default ContentPreview;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { CompletionSource } from '@codemirror/autocomplete';
|
|
2
|
-
|
|
3
|
-
declare const createAutocompletion: (completions: Array<CompletionSource> | undefined) => import('@codemirror/state').Extension;
|
|
2
|
+
declare const createAutocompletion: (completions: Array<CompletionSource> | undefined) => import("@codemirror/state").Extension;
|
|
4
3
|
export default createAutocompletion;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { FocusOption } from '../../../type';
|
|
2
|
-
import { EditorView } from '@codemirror/view';
|
|
3
1
|
import { Extension } from '@codemirror/state';
|
|
4
|
-
|
|
2
|
+
import { EditorView } from '@codemirror/view';
|
|
3
|
+
import { FocusOption } from '../../../type';
|
|
5
4
|
export default class CodeMirrorUt {
|
|
6
5
|
view: EditorView;
|
|
7
6
|
maxLength: number;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* From https://github.com/codemirror/theme-one-dark
|
|
3
|
+
*/
|
|
2
4
|
import { Extension } from '@codemirror/state';
|
|
3
|
-
|
|
5
|
+
import { HighlightStyle } from '@codemirror/language';
|
|
4
6
|
export declare const color: {
|
|
5
7
|
chalky: string;
|
|
6
8
|
coral: string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import useAutoScroll from './useAutoScroll';
|
|
2
|
+
import useCodeMirror from './useCodeMirror';
|
|
3
|
+
import userZoom from './userZoom';
|
|
4
|
+
import useCopyCode from './useCopyCode';
|
|
5
|
+
import useMarkdownIt from './useMarkdownIt';
|
|
6
|
+
import useResize from './useResize';
|
|
8
7
|
export { useAutoScroll, useCodeMirror, userZoom, useCopyCode, useMarkdownIt, useResize };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ContentProps } from '../props';
|
|
2
|
-
import { default as CodeMirrorUt } from '../codemirror';
|
|
3
1
|
import { Ref } from 'vue';
|
|
4
|
-
|
|
2
|
+
import CodeMirrorUt from '../codemirror';
|
|
3
|
+
import { ContentProps } from '../props';
|
|
5
4
|
declare const useAutoScroll: (props: ContentProps, html: Ref<string>, codeMirrorUt: Ref<CodeMirrorUt | undefined>) => void;
|
|
6
5
|
export default useAutoScroll;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { default as CodeMirrorUt } from '../codemirror';
|
|
2
1
|
import { ContentProps } from '../props';
|
|
3
|
-
|
|
2
|
+
import CodeMirrorUt from '../codemirror';
|
|
4
3
|
/**
|
|
5
4
|
* 文本编辑区组件
|
|
6
5
|
*
|
|
@@ -8,8 +7,8 @@ import { ContentProps } from '../props';
|
|
|
8
7
|
* @returns
|
|
9
8
|
*/
|
|
10
9
|
declare const useCodeMirror: (props: ContentProps) => {
|
|
11
|
-
inputWrapperRef: import(
|
|
12
|
-
codeMirrorUt: import(
|
|
10
|
+
inputWrapperRef: import("vue").Ref<HTMLDivElement | undefined>;
|
|
11
|
+
codeMirrorUt: import("vue").ShallowRef<CodeMirrorUt | undefined>;
|
|
13
12
|
resetHistory(): void;
|
|
14
13
|
};
|
|
15
14
|
export default useCodeMirror;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ContentPreviewProps } from '../ContentPreview';
|
|
2
1
|
import { Ref } from 'vue';
|
|
3
|
-
|
|
2
|
+
import { ContentPreviewProps } from '../ContentPreview';
|
|
4
3
|
declare const useCopyCode: (props: ContentPreviewProps, html: Ref<string>, key: Ref<string>) => void;
|
|
5
4
|
export default useCopyCode;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ContentPreviewProps } from '../ContentPreview';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* 注册代码高亮扩展到页面
|
|
5
4
|
*
|
|
6
5
|
* @param props 内容组件props
|
|
7
6
|
*/
|
|
8
|
-
declare const useHighlight: (props: ContentPreviewProps) => import(
|
|
7
|
+
declare const useHighlight: (props: ContentPreviewProps) => import("vue").ShallowRef<any>;
|
|
9
8
|
export default useHighlight;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ContentPreviewProps } from '../ContentPreview';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* 注册katex扩展到页面
|
|
5
4
|
*
|
|
6
5
|
* @param props 内容组件props
|
|
7
6
|
*/
|
|
8
|
-
declare const useKatex: (props: ContentPreviewProps) => import(
|
|
7
|
+
declare const useKatex: (props: ContentPreviewProps) => import("vue").ShallowRef<any>;
|
|
9
8
|
export default useKatex;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ContentPreviewProps } from '../ContentPreview';
|
|
2
|
-
|
|
3
2
|
declare const useMarkdownIt: (props: ContentPreviewProps, previewOnly: boolean) => {
|
|
4
|
-
html: import(
|
|
5
|
-
key: import(
|
|
3
|
+
html: import("vue").Ref<string>;
|
|
4
|
+
key: import("vue").Ref<string>;
|
|
6
5
|
};
|
|
7
6
|
export default useMarkdownIt;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ContentPreviewProps } from '../ContentPreview';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* 注册katex扩展到页面
|
|
5
4
|
*
|
|
6
5
|
*/
|
|
7
6
|
declare const useMermaid: (props: ContentPreviewProps) => {
|
|
8
|
-
mermaidRef: import(
|
|
9
|
-
reRenderRef: import(
|
|
7
|
+
mermaidRef: import("vue").ShallowRef<any>;
|
|
8
|
+
reRenderRef: import("vue").ShallowRef<number>;
|
|
10
9
|
replaceMermaid: () => void;
|
|
11
10
|
};
|
|
12
11
|
export default useMermaid;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ContentProps } from '../props';
|
|
2
1
|
import { Ref } from 'vue';
|
|
3
|
-
|
|
2
|
+
import { ContentProps } from '../props';
|
|
4
3
|
declare const useResize: (props: ContentProps, contentRef: Ref<HTMLDivElement | undefined>, resizeRef: Ref<HTMLDivElement | undefined>) => {
|
|
5
4
|
inputWrapperStyle: {
|
|
6
5
|
width: string | undefined;
|