md-editor-v3 4.12.2 → 4.12.4
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 +7 -9
- package/lib/es/MdEditor.mjs +7 -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 +36 -36
- 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 +2 -1
- 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 +1 -0
- package/lib/types/MdEditor/index.d.ts +24 -23
- package/lib/types/MdEditor/layouts/Content/ContentPreview.d.ts +13 -12
- 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 +13 -13
- 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/type.d.ts +7 -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 +17 -17
- package/lib/types/MdPreview/composition/useExpose.d.ts +2 -1
- package/lib/types/MdPreview/index.d.ts +21 -20
- 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
package/lib/cjs/MdEditor.cjs
CHANGED
|
@@ -1338,7 +1338,7 @@ const scrollAuto = (pEle, cEle, codeMirrorUt) => {
|
|
|
1338
1338
|
startLineIndex = i;
|
|
1339
1339
|
break;
|
|
1340
1340
|
} else {
|
|
1341
|
-
if (i + 1
|
|
1341
|
+
if (i + 1 < startLines.length && elesHasLineNumber[i + 1].offsetTop < cScrollTop) {
|
|
1342
1342
|
i++;
|
|
1343
1343
|
continue;
|
|
1344
1344
|
}
|
|
@@ -1360,7 +1360,7 @@ const scrollAuto = (pEle, cEle, codeMirrorUt) => {
|
|
|
1360
1360
|
}
|
|
1361
1361
|
default: {
|
|
1362
1362
|
realEleStart = elesHasLineNumber[startLineIndex];
|
|
1363
|
-
realEleEnd = elesHasLineNumber[startLineIndex + 1];
|
|
1363
|
+
realEleEnd = elesHasLineNumber[startLineIndex + 1 === elesHasLineNumber.length ? startLineIndex : startLineIndex + 1];
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
@@ -1369,7 +1369,7 @@ const scrollAuto = (pEle, cEle, codeMirrorUt) => {
|
|
|
1369
1369
|
let scale = 0;
|
|
1370
1370
|
const { start, end } = blockMap[Number(realEleStart.dataset.line || 0)];
|
|
1371
1371
|
const firstLineScrollTop = getTopByLine(start);
|
|
1372
|
-
let endLineScrollTop = getTopByLine(end + 1);
|
|
1372
|
+
let endLineScrollTop = getTopByLine(end === view2.state.doc.lines ? end : end + 1);
|
|
1373
1373
|
let blockHeight = 0;
|
|
1374
1374
|
if (endLineScrollTop > scrollDOM.scrollHeight - scrollDOM.clientHeight || realEleEnd.scrollTop > cEle.scrollHeight - cEle.clientHeight) {
|
|
1375
1375
|
scale = Math.max(
|
|
@@ -1412,7 +1412,7 @@ const scrollAuto = (pEle, cEle, codeMirrorUt) => {
|
|
|
1412
1412
|
} else {
|
|
1413
1413
|
cEleHandler();
|
|
1414
1414
|
}
|
|
1415
|
-
},
|
|
1415
|
+
}, 1);
|
|
1416
1416
|
return [
|
|
1417
1417
|
() => {
|
|
1418
1418
|
buildMap();
|
|
@@ -1984,7 +1984,7 @@ const getApply = (_label) => {
|
|
|
1984
1984
|
const createAutocompletion = (completions) => {
|
|
1985
1985
|
const defaultCompletion = (context) => {
|
|
1986
1986
|
const word = context.matchBefore(
|
|
1987
|
-
/^#+|^-\s*\[*\s*\]*|`+|\[|!\[*|^\|\s
|
|
1987
|
+
/^#+|^-\s*\[*\s*\]*|`+|\[|!\[*|^\|\s?\|?|\$\$?|!+\s*\w*/
|
|
1988
1988
|
);
|
|
1989
1989
|
if (word === null || word.from == word.to && context.explicit) {
|
|
1990
1990
|
return null;
|
|
@@ -2500,11 +2500,9 @@ const useCodeMirror = (props2) => {
|
|
|
2500
2500
|
focus: props2.onFocus,
|
|
2501
2501
|
drop: props2.onDrop,
|
|
2502
2502
|
compositionstart: () => {
|
|
2503
|
-
console.log("compositionstart");
|
|
2504
2503
|
spelling.value = true;
|
|
2505
2504
|
},
|
|
2506
2505
|
compositionend: (_e, view2) => {
|
|
2507
|
-
console.log("compositionend");
|
|
2508
2506
|
spelling.value = false;
|
|
2509
2507
|
props2.updateModelValue(view2.state.doc.toString());
|
|
2510
2508
|
},
|
|
@@ -2586,7 +2584,7 @@ const useCodeMirror = (props2) => {
|
|
|
2586
2584
|
});
|
|
2587
2585
|
index.bus.on(editorId, {
|
|
2588
2586
|
name: index.EVENT_LISTENER,
|
|
2589
|
-
callback(handlers) {
|
|
2587
|
+
callback: util.throttle((handlers) => {
|
|
2590
2588
|
var _a;
|
|
2591
2589
|
const nextDomEventHandlers = {
|
|
2592
2590
|
...domEventHandlers
|
|
@@ -2610,7 +2608,7 @@ const useCodeMirror = (props2) => {
|
|
|
2610
2608
|
codemirror.EditorView.domEventHandlers(nextDomEventHandlers)
|
|
2611
2609
|
)
|
|
2612
2610
|
});
|
|
2613
|
-
}
|
|
2611
|
+
})
|
|
2614
2612
|
});
|
|
2615
2613
|
});
|
|
2616
2614
|
vue.watch(
|
package/lib/es/MdEditor.mjs
CHANGED
|
@@ -1337,7 +1337,7 @@ const scrollAuto = (pEle, cEle, codeMirrorUt) => {
|
|
|
1337
1337
|
startLineIndex = i;
|
|
1338
1338
|
break;
|
|
1339
1339
|
} else {
|
|
1340
|
-
if (i + 1
|
|
1340
|
+
if (i + 1 < startLines.length && elesHasLineNumber[i + 1].offsetTop < cScrollTop) {
|
|
1341
1341
|
i++;
|
|
1342
1342
|
continue;
|
|
1343
1343
|
}
|
|
@@ -1359,7 +1359,7 @@ const scrollAuto = (pEle, cEle, codeMirrorUt) => {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
default: {
|
|
1361
1361
|
realEleStart = elesHasLineNumber[startLineIndex];
|
|
1362
|
-
realEleEnd = elesHasLineNumber[startLineIndex + 1];
|
|
1362
|
+
realEleEnd = elesHasLineNumber[startLineIndex + 1 === elesHasLineNumber.length ? startLineIndex : startLineIndex + 1];
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
@@ -1368,7 +1368,7 @@ const scrollAuto = (pEle, cEle, codeMirrorUt) => {
|
|
|
1368
1368
|
let scale = 0;
|
|
1369
1369
|
const { start, end } = blockMap[Number(realEleStart.dataset.line || 0)];
|
|
1370
1370
|
const firstLineScrollTop = getTopByLine(start);
|
|
1371
|
-
let endLineScrollTop = getTopByLine(end + 1);
|
|
1371
|
+
let endLineScrollTop = getTopByLine(end === view.state.doc.lines ? end : end + 1);
|
|
1372
1372
|
let blockHeight = 0;
|
|
1373
1373
|
if (endLineScrollTop > scrollDOM.scrollHeight - scrollDOM.clientHeight || realEleEnd.scrollTop > cEle.scrollHeight - cEle.clientHeight) {
|
|
1374
1374
|
scale = Math.max(
|
|
@@ -1411,7 +1411,7 @@ const scrollAuto = (pEle, cEle, codeMirrorUt) => {
|
|
|
1411
1411
|
} else {
|
|
1412
1412
|
cEleHandler();
|
|
1413
1413
|
}
|
|
1414
|
-
},
|
|
1414
|
+
}, 1);
|
|
1415
1415
|
return [
|
|
1416
1416
|
() => {
|
|
1417
1417
|
buildMap();
|
|
@@ -1983,7 +1983,7 @@ const getApply = (_label) => {
|
|
|
1983
1983
|
const createAutocompletion = (completions) => {
|
|
1984
1984
|
const defaultCompletion = (context) => {
|
|
1985
1985
|
const word = context.matchBefore(
|
|
1986
|
-
/^#+|^-\s*\[*\s*\]*|`+|\[|!\[*|^\|\s
|
|
1986
|
+
/^#+|^-\s*\[*\s*\]*|`+|\[|!\[*|^\|\s?\|?|\$\$?|!+\s*\w*/
|
|
1987
1987
|
);
|
|
1988
1988
|
if (word === null || word.from == word.to && context.explicit) {
|
|
1989
1989
|
return null;
|
|
@@ -2499,11 +2499,9 @@ const useCodeMirror = (props2) => {
|
|
|
2499
2499
|
focus: props2.onFocus,
|
|
2500
2500
|
drop: props2.onDrop,
|
|
2501
2501
|
compositionstart: () => {
|
|
2502
|
-
console.log("compositionstart");
|
|
2503
2502
|
spelling.value = true;
|
|
2504
2503
|
},
|
|
2505
2504
|
compositionend: (_e, view) => {
|
|
2506
|
-
console.log("compositionend");
|
|
2507
2505
|
spelling.value = false;
|
|
2508
2506
|
props2.updateModelValue(view.state.doc.toString());
|
|
2509
2507
|
},
|
|
@@ -2585,7 +2583,7 @@ const useCodeMirror = (props2) => {
|
|
|
2585
2583
|
});
|
|
2586
2584
|
bus.on(editorId, {
|
|
2587
2585
|
name: EVENT_LISTENER,
|
|
2588
|
-
callback(handlers) {
|
|
2586
|
+
callback: throttle((handlers) => {
|
|
2589
2587
|
var _a;
|
|
2590
2588
|
const nextDomEventHandlers = {
|
|
2591
2589
|
...domEventHandlers
|
|
@@ -2609,7 +2607,7 @@ const useCodeMirror = (props2) => {
|
|
|
2609
2607
|
EditorView$1.domEventHandlers(nextDomEventHandlers)
|
|
2610
2608
|
)
|
|
2611
2609
|
});
|
|
2612
|
-
}
|
|
2610
|
+
})
|
|
2613
2611
|
});
|
|
2614
2612
|
});
|
|
2615
2613
|
watch(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
1
|
import { Themes } from '../MdEditor/type';
|
|
3
|
-
|
|
2
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<{
|
|
4
5
|
title: {
|
|
5
6
|
type: PropType<string>;
|
|
6
7
|
default: string;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
+
|
|
2
3
|
declare const _default: {
|
|
3
4
|
new (...args: any[]): {
|
|
4
|
-
$: import(
|
|
5
|
+
$: import('vue').ComponentInternalInstance;
|
|
5
6
|
$data: {};
|
|
6
7
|
$props: Partial<{
|
|
7
8
|
title: string;
|
|
8
|
-
}> & Omit<Readonly<import(
|
|
9
|
+
}> & Omit<Readonly<import('vue').ExtractPropTypes<{
|
|
9
10
|
title: {
|
|
10
11
|
type: import("vue").PropType<string>;
|
|
11
12
|
default: string;
|
|
@@ -36,7 +37,7 @@ declare const _default: {
|
|
|
36
37
|
};
|
|
37
38
|
}>> & {
|
|
38
39
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
39
|
-
} & import(
|
|
40
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "title">;
|
|
40
41
|
$attrs: {
|
|
41
42
|
[x: string]: unknown;
|
|
42
43
|
};
|
|
@@ -44,13 +45,13 @@ declare const _default: {
|
|
|
44
45
|
[x: string]: unknown;
|
|
45
46
|
};
|
|
46
47
|
$slots: Readonly<{
|
|
47
|
-
[name: string]: import(
|
|
48
|
+
[name: string]: import('vue').Slot | undefined;
|
|
48
49
|
}>;
|
|
49
|
-
$root: import(
|
|
50
|
-
$parent: import(
|
|
50
|
+
$root: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
51
|
+
$parent: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
51
52
|
$emit: (event: "onChange", ...args: any[]) => void;
|
|
52
53
|
$el: any;
|
|
53
|
-
$options: import(
|
|
54
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
54
55
|
title: {
|
|
55
56
|
type: import("vue").PropType<string>;
|
|
56
57
|
default: string;
|
|
@@ -96,14 +97,14 @@ declare const _default: {
|
|
|
96
97
|
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
97
98
|
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
98
99
|
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
99
|
-
renderTracked?: (((e: import(
|
|
100
|
-
renderTriggered?: (((e: import(
|
|
101
|
-
errorCaptured?: (((err: unknown, instance: import(
|
|
100
|
+
renderTracked?: (((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]) | undefined;
|
|
101
|
+
renderTriggered?: (((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]) | undefined;
|
|
102
|
+
errorCaptured?: (((err: unknown, instance: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
102
103
|
};
|
|
103
104
|
$forceUpdate: () => void;
|
|
104
|
-
$nextTick: typeof import(
|
|
105
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import(
|
|
106
|
-
} & Readonly<import(
|
|
105
|
+
$nextTick: typeof import('vue').nextTick;
|
|
106
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import('vue').WatchOptions<boolean> | undefined): import('vue').WatchStopHandle;
|
|
107
|
+
} & Readonly<import('vue').ExtractPropTypes<{
|
|
107
108
|
title: {
|
|
108
109
|
type: import("vue").PropType<string>;
|
|
109
110
|
default: string;
|
|
@@ -134,11 +135,11 @@ declare const _default: {
|
|
|
134
135
|
};
|
|
135
136
|
}>> & {
|
|
136
137
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
137
|
-
} & import(
|
|
138
|
+
} & import('vue').ShallowUnwrapRef<() => JSX.Element> & {} & import('vue').ComponentCustomProperties & {};
|
|
138
139
|
__isFragment?: undefined;
|
|
139
140
|
__isTeleport?: undefined;
|
|
140
141
|
__isSuspense?: undefined;
|
|
141
|
-
} & import(
|
|
142
|
+
} & import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
142
143
|
title: {
|
|
143
144
|
type: import("vue").PropType<string>;
|
|
144
145
|
default: string;
|
|
@@ -171,7 +172,7 @@ declare const _default: {
|
|
|
171
172
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
172
173
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onChange"[], "onChange", {
|
|
173
174
|
title: string;
|
|
174
|
-
}, {}, string> & import(
|
|
175
|
+
}, {}, string> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
175
176
|
install: (app: App) => App;
|
|
176
177
|
};
|
|
177
178
|
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
import { LooseRequired } from '@vue/shared';
|
|
3
|
-
import { MdHeadingId } from '../MdEditor/type';
|
|
4
1
|
import { TocItem } from './MdCatalog';
|
|
2
|
+
import { MdHeadingId } from '../MdEditor/type';
|
|
3
|
+
import { LooseRequired } from '@vue/shared';
|
|
4
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
|
5
|
+
|
|
5
6
|
declare const props: {
|
|
6
7
|
tocItem: {
|
|
7
8
|
type: PropType<TocItem>;
|
|
@@ -25,7 +26,7 @@ declare const props: {
|
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
28
|
export type CatalogLinkProps = Readonly<LooseRequired<Readonly<ExtractPropTypes<typeof props>>>>;
|
|
28
|
-
declare const CatalogLink: import(
|
|
29
|
+
declare const CatalogLink: import('vue').DefineComponent<{
|
|
29
30
|
tocItem: {
|
|
30
31
|
type: PropType<TocItem>;
|
|
31
32
|
default: () => {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
1
|
import { HeadList, MdHeadingId, Themes } from '../MdEditor/type';
|
|
2
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
|
3
|
+
|
|
3
4
|
export interface TocItem {
|
|
4
5
|
text: string;
|
|
5
6
|
level: number;
|
|
@@ -7,7 +8,7 @@ export interface TocItem {
|
|
|
7
8
|
active: boolean;
|
|
8
9
|
children?: Array<TocItem>;
|
|
9
10
|
}
|
|
10
|
-
declare const MdCatalog: import(
|
|
11
|
+
declare const MdCatalog: import('vue').DefineComponent<{
|
|
11
12
|
/**
|
|
12
13
|
* 编辑器的Id,务必与需要绑定的编辑器Id相同
|
|
13
14
|
*/
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
+
|
|
2
3
|
declare const _default: {
|
|
3
4
|
new (...args: any[]): {
|
|
4
|
-
$: import(
|
|
5
|
+
$: import('vue').ComponentInternalInstance;
|
|
5
6
|
$data: {};
|
|
6
7
|
$props: Partial<{
|
|
7
8
|
class: string;
|
|
8
|
-
theme: import(
|
|
9
|
-
mdHeadingId: import(
|
|
9
|
+
theme: import('..').Themes;
|
|
10
|
+
mdHeadingId: import('..').MdHeadingId;
|
|
10
11
|
scrollElementOffsetTop: number;
|
|
11
12
|
offsetTop: number;
|
|
12
|
-
}> & Omit<Readonly<import(
|
|
13
|
+
}> & Omit<Readonly<import('vue').ExtractPropTypes<{
|
|
13
14
|
editorId: {
|
|
14
15
|
type: import("vue").PropType<string>;
|
|
15
16
|
};
|
|
@@ -45,7 +46,7 @@ declare const _default: {
|
|
|
45
46
|
}>> & {
|
|
46
47
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
47
48
|
onOnActive?: ((...args: any[]) => any) | undefined;
|
|
48
|
-
} & import(
|
|
49
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "class" | "theme" | "mdHeadingId" | "scrollElementOffsetTop" | "offsetTop">;
|
|
49
50
|
$attrs: {
|
|
50
51
|
[x: string]: unknown;
|
|
51
52
|
};
|
|
@@ -53,13 +54,13 @@ declare const _default: {
|
|
|
53
54
|
[x: string]: unknown;
|
|
54
55
|
};
|
|
55
56
|
$slots: Readonly<{
|
|
56
|
-
[name: string]: import(
|
|
57
|
+
[name: string]: import('vue').Slot | undefined;
|
|
57
58
|
}>;
|
|
58
|
-
$root: import(
|
|
59
|
-
$parent: import(
|
|
59
|
+
$root: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
60
|
+
$parent: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
60
61
|
$emit: (event: "onClick" | "onActive", ...args: any[]) => void;
|
|
61
62
|
$el: any;
|
|
62
|
-
$options: import(
|
|
63
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
63
64
|
editorId: {
|
|
64
65
|
type: import("vue").PropType<string>;
|
|
65
66
|
};
|
|
@@ -114,14 +115,14 @@ declare const _default: {
|
|
|
114
115
|
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
115
116
|
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
116
117
|
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
117
|
-
renderTracked?: (((e: import(
|
|
118
|
-
renderTriggered?: (((e: import(
|
|
119
|
-
errorCaptured?: (((err: unknown, instance: import(
|
|
118
|
+
renderTracked?: (((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]) | undefined;
|
|
119
|
+
renderTriggered?: (((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]) | undefined;
|
|
120
|
+
errorCaptured?: (((err: unknown, instance: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
120
121
|
};
|
|
121
122
|
$forceUpdate: () => void;
|
|
122
|
-
$nextTick: typeof import(
|
|
123
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import(
|
|
124
|
-
} & Readonly<import(
|
|
123
|
+
$nextTick: typeof import('vue').nextTick;
|
|
124
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import('vue').WatchOptions<boolean> | undefined): import('vue').WatchStopHandle;
|
|
125
|
+
} & Readonly<import('vue').ExtractPropTypes<{
|
|
125
126
|
editorId: {
|
|
126
127
|
type: import("vue").PropType<string>;
|
|
127
128
|
};
|
|
@@ -157,11 +158,11 @@ declare const _default: {
|
|
|
157
158
|
}>> & {
|
|
158
159
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
159
160
|
onOnActive?: ((...args: any[]) => any) | undefined;
|
|
160
|
-
} & import(
|
|
161
|
+
} & import('vue').ShallowUnwrapRef<() => JSX.Element> & {} & import('vue').ComponentCustomProperties & {};
|
|
161
162
|
__isFragment?: undefined;
|
|
162
163
|
__isTeleport?: undefined;
|
|
163
164
|
__isSuspense?: undefined;
|
|
164
|
-
} & import(
|
|
165
|
+
} & import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
165
166
|
editorId: {
|
|
166
167
|
type: import("vue").PropType<string>;
|
|
167
168
|
};
|
|
@@ -203,7 +204,7 @@ declare const _default: {
|
|
|
203
204
|
mdHeadingId: import("..").MdHeadingId;
|
|
204
205
|
scrollElementOffsetTop: number;
|
|
205
206
|
offsetTop: number;
|
|
206
|
-
}, {}, string> & import(
|
|
207
|
+
}, {}, string> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
207
208
|
install: (app: App) => App;
|
|
208
209
|
};
|
|
209
210
|
export default _default;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
declare const Editor: import(
|
|
1
|
+
declare const Editor: import('vue').DefineComponent<{
|
|
2
2
|
onChange: {
|
|
3
|
-
type: import("vue").PropType<import(
|
|
3
|
+
type: import("vue").PropType<import("~/type").ChangeEvent>;
|
|
4
4
|
};
|
|
5
5
|
onSave: {
|
|
6
|
-
type: import("vue").PropType<import(
|
|
6
|
+
type: import("vue").PropType<import("~/type").SaveEvent>;
|
|
7
7
|
};
|
|
8
8
|
onUploadImg: {
|
|
9
|
-
type: import("vue").PropType<import(
|
|
9
|
+
type: import("vue").PropType<import("~/type").UploadImgEvent>;
|
|
10
10
|
};
|
|
11
11
|
pageFullscreen: {
|
|
12
12
|
type: import("vue").PropType<boolean>;
|
|
@@ -21,11 +21,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
21
21
|
default: boolean;
|
|
22
22
|
};
|
|
23
23
|
toolbars: {
|
|
24
|
-
type: import("vue").PropType<import(
|
|
24
|
+
type: import("vue").PropType<import("~/type").ToolbarNames[]>;
|
|
25
25
|
default: string[];
|
|
26
26
|
};
|
|
27
27
|
toolbarsExclude: {
|
|
28
|
-
type: import("vue").PropType<import(
|
|
28
|
+
type: import("vue").PropType<import("~/type").ToolbarNames[]>;
|
|
29
29
|
default: never[];
|
|
30
30
|
};
|
|
31
31
|
noPrettier: {
|
|
@@ -48,11 +48,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
48
48
|
type: import("vue").PropType<string | JSX.Element>;
|
|
49
49
|
};
|
|
50
50
|
onError: {
|
|
51
|
-
type: import("vue").PropType<import(
|
|
51
|
+
type: import("vue").PropType<import("~/type").ErrorEvent>;
|
|
52
52
|
};
|
|
53
53
|
footers: {
|
|
54
|
-
type: import("vue").PropType<import(
|
|
55
|
-
default: import(
|
|
54
|
+
type: import("vue").PropType<import("~/type").Footers[]>;
|
|
55
|
+
default: import("~/type").Footers[];
|
|
56
56
|
};
|
|
57
57
|
scrollAuto: {
|
|
58
58
|
type: import("vue").PropType<boolean>;
|
|
@@ -110,7 +110,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
110
110
|
default: string;
|
|
111
111
|
};
|
|
112
112
|
theme: {
|
|
113
|
-
type: import("vue").PropType<import(
|
|
113
|
+
type: import("vue").PropType<import("~/type").Themes>;
|
|
114
114
|
default: string;
|
|
115
115
|
};
|
|
116
116
|
class: {
|
|
@@ -122,10 +122,10 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
122
122
|
default: string;
|
|
123
123
|
};
|
|
124
124
|
onHtmlChanged: {
|
|
125
|
-
type: import("vue").PropType<import(
|
|
125
|
+
type: import("vue").PropType<import("~/type").HtmlChangedEvent>;
|
|
126
126
|
};
|
|
127
127
|
onGetCatalog: {
|
|
128
|
-
type: import("vue").PropType<import(
|
|
128
|
+
type: import("vue").PropType<import("~/type").GetCatalogEvent>;
|
|
129
129
|
};
|
|
130
130
|
editorId: {
|
|
131
131
|
type: import("vue").PropType<string>;
|
|
@@ -144,8 +144,8 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
144
144
|
default: () => {};
|
|
145
145
|
};
|
|
146
146
|
mdHeadingId: {
|
|
147
|
-
type: import("vue").PropType<import(
|
|
148
|
-
default: import(
|
|
147
|
+
type: import("vue").PropType<import("~/type").MdHeadingId>;
|
|
148
|
+
default: import("~/type").MdHeadingId;
|
|
149
149
|
};
|
|
150
150
|
sanitize: {
|
|
151
151
|
type: import("vue").PropType<(html: string) => string>;
|
|
@@ -187,22 +187,22 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
187
187
|
default: boolean;
|
|
188
188
|
};
|
|
189
189
|
customIcon: {
|
|
190
|
-
type: import("vue").PropType<import(
|
|
190
|
+
type: import("vue").PropType<import("~/type").CustomIcon>;
|
|
191
191
|
default: {};
|
|
192
192
|
};
|
|
193
193
|
sanitizeMermaid: {
|
|
194
194
|
type: import("vue").PropType<(h: string) => Promise<string>>;
|
|
195
195
|
default: (h: string) => Promise<string>;
|
|
196
196
|
};
|
|
197
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import(
|
|
197
|
+
}, () => 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<{
|
|
198
198
|
onChange: {
|
|
199
|
-
type: import("vue").PropType<import(
|
|
199
|
+
type: import("vue").PropType<import("~/type").ChangeEvent>;
|
|
200
200
|
};
|
|
201
201
|
onSave: {
|
|
202
|
-
type: import("vue").PropType<import(
|
|
202
|
+
type: import("vue").PropType<import("~/type").SaveEvent>;
|
|
203
203
|
};
|
|
204
204
|
onUploadImg: {
|
|
205
|
-
type: import("vue").PropType<import(
|
|
205
|
+
type: import("vue").PropType<import("~/type").UploadImgEvent>;
|
|
206
206
|
};
|
|
207
207
|
pageFullscreen: {
|
|
208
208
|
type: import("vue").PropType<boolean>;
|
|
@@ -217,11 +217,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
217
217
|
default: boolean;
|
|
218
218
|
};
|
|
219
219
|
toolbars: {
|
|
220
|
-
type: import("vue").PropType<import(
|
|
220
|
+
type: import("vue").PropType<import("~/type").ToolbarNames[]>;
|
|
221
221
|
default: string[];
|
|
222
222
|
};
|
|
223
223
|
toolbarsExclude: {
|
|
224
|
-
type: import("vue").PropType<import(
|
|
224
|
+
type: import("vue").PropType<import("~/type").ToolbarNames[]>;
|
|
225
225
|
default: never[];
|
|
226
226
|
};
|
|
227
227
|
noPrettier: {
|
|
@@ -244,11 +244,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
244
244
|
type: import("vue").PropType<string | JSX.Element>;
|
|
245
245
|
};
|
|
246
246
|
onError: {
|
|
247
|
-
type: import("vue").PropType<import(
|
|
247
|
+
type: import("vue").PropType<import("~/type").ErrorEvent>;
|
|
248
248
|
};
|
|
249
249
|
footers: {
|
|
250
|
-
type: import("vue").PropType<import(
|
|
251
|
-
default: import(
|
|
250
|
+
type: import("vue").PropType<import("~/type").Footers[]>;
|
|
251
|
+
default: import("~/type").Footers[];
|
|
252
252
|
};
|
|
253
253
|
scrollAuto: {
|
|
254
254
|
type: import("vue").PropType<boolean>;
|
|
@@ -306,7 +306,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
306
306
|
default: string;
|
|
307
307
|
};
|
|
308
308
|
theme: {
|
|
309
|
-
type: import("vue").PropType<import(
|
|
309
|
+
type: import("vue").PropType<import("~/type").Themes>;
|
|
310
310
|
default: string;
|
|
311
311
|
};
|
|
312
312
|
class: {
|
|
@@ -318,10 +318,10 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
318
318
|
default: string;
|
|
319
319
|
};
|
|
320
320
|
onHtmlChanged: {
|
|
321
|
-
type: import("vue").PropType<import(
|
|
321
|
+
type: import("vue").PropType<import("~/type").HtmlChangedEvent>;
|
|
322
322
|
};
|
|
323
323
|
onGetCatalog: {
|
|
324
|
-
type: import("vue").PropType<import(
|
|
324
|
+
type: import("vue").PropType<import("~/type").GetCatalogEvent>;
|
|
325
325
|
};
|
|
326
326
|
editorId: {
|
|
327
327
|
type: import("vue").PropType<string>;
|
|
@@ -340,8 +340,8 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
340
340
|
default: () => {};
|
|
341
341
|
};
|
|
342
342
|
mdHeadingId: {
|
|
343
|
-
type: import("vue").PropType<import(
|
|
344
|
-
default: import(
|
|
343
|
+
type: import("vue").PropType<import("~/type").MdHeadingId>;
|
|
344
|
+
default: import("~/type").MdHeadingId;
|
|
345
345
|
};
|
|
346
346
|
sanitize: {
|
|
347
347
|
type: import("vue").PropType<(html: string) => string>;
|
|
@@ -383,7 +383,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
383
383
|
default: boolean;
|
|
384
384
|
};
|
|
385
385
|
customIcon: {
|
|
386
|
-
type: import("vue").PropType<import(
|
|
386
|
+
type: import("vue").PropType<import("~/type").CustomIcon>;
|
|
387
387
|
default: {};
|
|
388
388
|
};
|
|
389
389
|
sanitizeMermaid: {
|
|
@@ -409,23 +409,23 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
409
409
|
htmlPreview: boolean;
|
|
410
410
|
class: string;
|
|
411
411
|
style: string | import("vue").CSSProperties;
|
|
412
|
-
toolbars: import(
|
|
413
|
-
toolbarsExclude: import(
|
|
412
|
+
toolbars: import("~/type").ToolbarNames[];
|
|
413
|
+
toolbarsExclude: import("~/type").ToolbarNames[];
|
|
414
414
|
noPrettier: boolean;
|
|
415
415
|
tabWidth: number;
|
|
416
416
|
tableShape: number[];
|
|
417
417
|
placeholder: string;
|
|
418
|
-
footers: import(
|
|
418
|
+
footers: import("~/type").Footers[];
|
|
419
419
|
scrollAuto: boolean;
|
|
420
420
|
showToolbarName: boolean;
|
|
421
421
|
inputBoxWitdh: string;
|
|
422
422
|
modelValue: string;
|
|
423
|
-
theme: import(
|
|
423
|
+
theme: import("~/type").Themes;
|
|
424
424
|
language: string;
|
|
425
425
|
editorId: string;
|
|
426
426
|
showCodeRowNumber: boolean;
|
|
427
427
|
previewTheme: string;
|
|
428
|
-
mdHeadingId: import(
|
|
428
|
+
mdHeadingId: import("~/type").MdHeadingId;
|
|
429
429
|
sanitize: (html: string) => string;
|
|
430
430
|
noMermaid: boolean;
|
|
431
431
|
noKatex: boolean;
|
|
@@ -435,7 +435,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
435
435
|
codeStyleReverseList: string[];
|
|
436
436
|
noHighlight: boolean;
|
|
437
437
|
noImgZoomIn: boolean;
|
|
438
|
-
customIcon: import(
|
|
438
|
+
customIcon: import("~/type").CustomIcon;
|
|
439
439
|
sanitizeMermaid: (h: string) => Promise<string>;
|
|
440
440
|
}>;
|
|
441
441
|
export default Editor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
|
|
2
3
|
export type IconName = 'bold' | 'underline' | 'italic' | 'strike-through' | 'title' | 'sub' | 'sup' | 'quote' | 'unordered-list' | 'ordered-list' | 'task' | 'code-row' | 'code' | 'link' | 'image' | 'table' | 'revoke' | 'next' | 'baocun' | 'prettier' | 'suoxiao' | 'fangda' | 'fullscreen-exit' | 'fullscreen' | 'preview' | 'coding' | 'catalog' | 'github' | 'mermaid' | 'formula' | 'close' | 'delete' | 'upload';
|
|
3
|
-
declare const _default: import(
|
|
4
|
+
declare const _default: import('vue').DefineComponent<{
|
|
4
5
|
name: {
|
|
5
6
|
type: PropType<IconName>;
|
|
6
7
|
default: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
1
|
import { IconName } from './Icon';
|
|
3
|
-
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<{
|
|
4
5
|
name: {
|
|
5
6
|
type: PropType<IconName>;
|
|
6
7
|
default: string;
|