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
|
@@ -1,18 +1,19 @@
|
|
|
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
|
-
style: import(
|
|
9
|
+
style: import('vue').CSSProperties;
|
|
9
10
|
visible: boolean;
|
|
10
11
|
height: string;
|
|
11
12
|
width: string;
|
|
12
13
|
showAdjust: boolean;
|
|
13
14
|
isFullscreen: boolean;
|
|
14
15
|
onAdjust: (val: boolean) => void;
|
|
15
|
-
}> & Omit<Readonly<import(
|
|
16
|
+
}> & Omit<Readonly<import('vue').ExtractPropTypes<{
|
|
16
17
|
title: {
|
|
17
18
|
type: import("vue").PropType<string>;
|
|
18
19
|
default: string;
|
|
@@ -53,7 +54,7 @@ declare const _default: {
|
|
|
53
54
|
};
|
|
54
55
|
}>> & {
|
|
55
56
|
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
56
|
-
} & import(
|
|
57
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "title" | "style" | "visible" | "height" | "width" | "showAdjust" | "isFullscreen" | "onAdjust">;
|
|
57
58
|
$attrs: {
|
|
58
59
|
[x: string]: unknown;
|
|
59
60
|
};
|
|
@@ -61,13 +62,13 @@ declare const _default: {
|
|
|
61
62
|
[x: string]: unknown;
|
|
62
63
|
};
|
|
63
64
|
$slots: Readonly<{
|
|
64
|
-
[name: string]: import(
|
|
65
|
+
[name: string]: import('vue').Slot | undefined;
|
|
65
66
|
}>;
|
|
66
|
-
$root: import(
|
|
67
|
-
$parent: import(
|
|
67
|
+
$root: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
68
|
+
$parent: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
68
69
|
$emit: (event: "onClose", ...args: any[]) => void;
|
|
69
70
|
$el: any;
|
|
70
|
-
$options: import(
|
|
71
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
71
72
|
title: {
|
|
72
73
|
type: import("vue").PropType<string>;
|
|
73
74
|
default: string;
|
|
@@ -130,14 +131,14 @@ declare const _default: {
|
|
|
130
131
|
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
131
132
|
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
132
133
|
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
133
|
-
renderTracked?: (((e: import(
|
|
134
|
-
renderTriggered?: (((e: import(
|
|
135
|
-
errorCaptured?: (((err: unknown, instance: import(
|
|
134
|
+
renderTracked?: (((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]) | undefined;
|
|
135
|
+
renderTriggered?: (((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]) | undefined;
|
|
136
|
+
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;
|
|
136
137
|
};
|
|
137
138
|
$forceUpdate: () => void;
|
|
138
|
-
$nextTick: typeof import(
|
|
139
|
-
$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(
|
|
140
|
-
} & Readonly<import(
|
|
139
|
+
$nextTick: typeof import('vue').nextTick;
|
|
140
|
+
$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;
|
|
141
|
+
} & Readonly<import('vue').ExtractPropTypes<{
|
|
141
142
|
title: {
|
|
142
143
|
type: import("vue").PropType<string>;
|
|
143
144
|
default: string;
|
|
@@ -178,11 +179,11 @@ declare const _default: {
|
|
|
178
179
|
};
|
|
179
180
|
}>> & {
|
|
180
181
|
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
181
|
-
} & import(
|
|
182
|
+
} & import('vue').ShallowUnwrapRef<() => "" | JSX.Element> & {} & import('vue').ComponentCustomProperties & {};
|
|
182
183
|
__isFragment?: undefined;
|
|
183
184
|
__isTeleport?: undefined;
|
|
184
185
|
__isSuspense?: undefined;
|
|
185
|
-
} & import(
|
|
186
|
+
} & import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
186
187
|
title: {
|
|
187
188
|
type: import("vue").PropType<string>;
|
|
188
189
|
default: string;
|
|
@@ -232,7 +233,7 @@ declare const _default: {
|
|
|
232
233
|
showAdjust: boolean;
|
|
233
234
|
isFullscreen: boolean;
|
|
234
235
|
onAdjust: (val: boolean) => void;
|
|
235
|
-
}, {}, string> & import(
|
|
236
|
+
}, {}, string> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
236
237
|
install: (app: App) => App;
|
|
237
238
|
};
|
|
238
239
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import { SettingType, UpdateSetting, MdPreviewProps } from './type';
|
|
3
|
-
import { EditorContext, EditorProps } from './type';
|
|
4
1
|
import { ContentExposeParam } from './layouts/Content/type';
|
|
2
|
+
import { SettingType, UpdateSetting, MdPreviewProps, EditorContext, EditorProps } from './type';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
|
|
5
5
|
/**
|
|
6
6
|
* 处理保存逻辑,主要是需要异步返回编译后的html
|
|
7
7
|
*
|
|
@@ -54,7 +54,7 @@ export declare const useConfig: (props: EditorProps, context: EditorContext) =>
|
|
|
54
54
|
* @param props
|
|
55
55
|
* @returns
|
|
56
56
|
*/
|
|
57
|
-
export declare const useCatalog: (props: EditorProps) => import(
|
|
57
|
+
export declare const useCatalog: (props: EditorProps) => import('vue').ComputedRef<boolean>;
|
|
58
58
|
/**
|
|
59
59
|
* 向外暴露属性
|
|
60
60
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CodeCss, Config, ConfigOption, Footers, StaticTextDefault } from './type';
|
|
2
|
+
|
|
2
3
|
export declare const prefix = "md-editor";
|
|
3
4
|
export declare const defaultEditorId = "md-editor-v3";
|
|
4
5
|
export declare const iconfontSvgUrl = "https://at.alicdn.com/t/c/font_2605852_prouiefeic.js";
|
|
@@ -1,31 +1,32 @@
|
|
|
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
|
preview: boolean;
|
|
8
9
|
pageFullscreen: boolean;
|
|
9
10
|
htmlPreview: boolean;
|
|
10
11
|
class: string;
|
|
11
|
-
style: string | import(
|
|
12
|
-
toolbars: import(
|
|
13
|
-
toolbarsExclude: import(
|
|
12
|
+
style: string | import('vue').CSSProperties;
|
|
13
|
+
toolbars: import('./type').ToolbarNames[];
|
|
14
|
+
toolbarsExclude: import('./type').ToolbarNames[];
|
|
14
15
|
noPrettier: boolean;
|
|
15
16
|
tabWidth: number;
|
|
16
17
|
tableShape: number[];
|
|
17
18
|
placeholder: string;
|
|
18
|
-
footers: import(
|
|
19
|
+
footers: import('./type').Footers[];
|
|
19
20
|
scrollAuto: boolean;
|
|
20
21
|
showToolbarName: boolean;
|
|
21
22
|
inputBoxWitdh: string;
|
|
22
23
|
modelValue: string;
|
|
23
|
-
theme: import(
|
|
24
|
+
theme: import('./type').Themes;
|
|
24
25
|
language: string;
|
|
25
26
|
editorId: string;
|
|
26
27
|
showCodeRowNumber: boolean;
|
|
27
28
|
previewTheme: string;
|
|
28
|
-
mdHeadingId: import(
|
|
29
|
+
mdHeadingId: import('./type').MdHeadingId;
|
|
29
30
|
sanitize: (html: string) => string;
|
|
30
31
|
noMermaid: boolean;
|
|
31
32
|
noKatex: boolean;
|
|
@@ -35,9 +36,9 @@ declare const _default: {
|
|
|
35
36
|
codeStyleReverseList: string[];
|
|
36
37
|
noHighlight: boolean;
|
|
37
38
|
noImgZoomIn: boolean;
|
|
38
|
-
customIcon: import(
|
|
39
|
+
customIcon: import('./type').CustomIcon;
|
|
39
40
|
sanitizeMermaid: (h: string) => Promise<string>;
|
|
40
|
-
}> & Omit<Readonly<import(
|
|
41
|
+
}> & Omit<Readonly<import('vue').ExtractPropTypes<{
|
|
41
42
|
onChange: {
|
|
42
43
|
type: import("vue").PropType<import("./type").ChangeEvent>;
|
|
43
44
|
};
|
|
@@ -246,7 +247,7 @@ declare const _default: {
|
|
|
246
247
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
247
248
|
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
248
249
|
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
249
|
-
} & import(
|
|
250
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "preview" | "pageFullscreen" | "htmlPreview" | "class" | "style" | "toolbars" | "toolbarsExclude" | "noPrettier" | "tabWidth" | "tableShape" | "placeholder" | "footers" | "scrollAuto" | "showToolbarName" | "inputBoxWitdh" | "modelValue" | "theme" | "language" | "editorId" | "showCodeRowNumber" | "previewTheme" | "mdHeadingId" | "sanitize" | "noMermaid" | "noKatex" | "codeTheme" | "formatCopiedText" | "codeStyleReverse" | "codeStyleReverseList" | "noHighlight" | "noImgZoomIn" | "customIcon" | "sanitizeMermaid">;
|
|
250
251
|
$attrs: {
|
|
251
252
|
[x: string]: unknown;
|
|
252
253
|
};
|
|
@@ -254,13 +255,13 @@ declare const _default: {
|
|
|
254
255
|
[x: string]: unknown;
|
|
255
256
|
};
|
|
256
257
|
$slots: Readonly<{
|
|
257
|
-
[name: string]: import(
|
|
258
|
+
[name: string]: import('vue').Slot | undefined;
|
|
258
259
|
}>;
|
|
259
|
-
$root: import(
|
|
260
|
-
$parent: import(
|
|
260
|
+
$root: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
261
|
+
$parent: import('vue').ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
261
262
|
$emit: (event: "onChange" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "onError" | "update:modelValue" | "onBlur" | "onFocus" | "onInput" | "onDrop" | "onInputBoxWitdhChange", ...args: any[]) => void;
|
|
262
263
|
$el: any;
|
|
263
|
-
$options: import(
|
|
264
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
264
265
|
onChange: {
|
|
265
266
|
type: import("vue").PropType<import("./type").ChangeEvent>;
|
|
266
267
|
};
|
|
@@ -516,14 +517,14 @@ declare const _default: {
|
|
|
516
517
|
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
517
518
|
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
518
519
|
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
519
|
-
renderTracked?: (((e: import(
|
|
520
|
-
renderTriggered?: (((e: import(
|
|
521
|
-
errorCaptured?: (((err: unknown, instance: import(
|
|
520
|
+
renderTracked?: (((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]) | undefined;
|
|
521
|
+
renderTriggered?: (((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[]) | undefined;
|
|
522
|
+
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;
|
|
522
523
|
};
|
|
523
524
|
$forceUpdate: () => void;
|
|
524
|
-
$nextTick: typeof import(
|
|
525
|
-
$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(
|
|
526
|
-
} & Readonly<import(
|
|
525
|
+
$nextTick: typeof import('vue').nextTick;
|
|
526
|
+
$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;
|
|
527
|
+
} & Readonly<import('vue').ExtractPropTypes<{
|
|
527
528
|
onChange: {
|
|
528
529
|
type: import("vue").PropType<import("./type").ChangeEvent>;
|
|
529
530
|
};
|
|
@@ -732,11 +733,11 @@ declare const _default: {
|
|
|
732
733
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
733
734
|
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
734
735
|
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
735
|
-
} & import(
|
|
736
|
+
} & import('vue').ShallowUnwrapRef<() => JSX.Element> & {} & import('vue').ComponentCustomProperties & {};
|
|
736
737
|
__isFragment?: undefined;
|
|
737
738
|
__isTeleport?: undefined;
|
|
738
739
|
__isSuspense?: undefined;
|
|
739
|
-
} & import(
|
|
740
|
+
} & import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
740
741
|
onChange: {
|
|
741
742
|
type: import("vue").PropType<import("./type").ChangeEvent>;
|
|
742
743
|
};
|
|
@@ -979,7 +980,7 @@ declare const _default: {
|
|
|
979
980
|
noImgZoomIn: boolean;
|
|
980
981
|
customIcon: import("./type").CustomIcon;
|
|
981
982
|
sanitizeMermaid: (h: string) => Promise<string>;
|
|
982
|
-
}, {}, string> & import(
|
|
983
|
+
}, {}, string> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
983
984
|
install: (app: App) => App;
|
|
984
985
|
};
|
|
985
986
|
export default _default;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { ExtractPropTypes } from 'vue';
|
|
2
|
-
import { LooseRequired } from '@vue/shared';
|
|
3
1
|
import { contentPreviewProps } from './props';
|
|
2
|
+
import { LooseRequired } from '@vue/shared';
|
|
3
|
+
import { ExtractPropTypes } from 'vue';
|
|
4
|
+
|
|
4
5
|
export type ContentPreviewProps = Readonly<LooseRequired<Readonly<ExtractPropTypes<typeof contentPreviewProps>>>>;
|
|
5
|
-
declare const ContentPreview: import(
|
|
6
|
+
declare const ContentPreview: import('vue').DefineComponent<{
|
|
6
7
|
modelValue: {
|
|
7
8
|
type: import("vue").PropType<string>;
|
|
8
9
|
default: string;
|
|
9
10
|
};
|
|
10
11
|
setting: {
|
|
11
|
-
type: import("vue").PropType<import(
|
|
12
|
+
type: import("vue").PropType<import("~/type").SettingType>;
|
|
12
13
|
default: () => {
|
|
13
14
|
preview: boolean;
|
|
14
15
|
};
|
|
@@ -18,11 +19,11 @@ declare const ContentPreview: import("vue").DefineComponent<{
|
|
|
18
19
|
default: () => void;
|
|
19
20
|
};
|
|
20
21
|
onGetCatalog: {
|
|
21
|
-
type: import("vue").PropType<(list: import(
|
|
22
|
+
type: import("vue").PropType<(list: import("~/type").HeadList[]) => void>;
|
|
22
23
|
default: () => void;
|
|
23
24
|
};
|
|
24
25
|
mdHeadingId: {
|
|
25
|
-
type: import("vue").PropType<import(
|
|
26
|
+
type: import("vue").PropType<import("~/type").MdHeadingId>;
|
|
26
27
|
default: () => string;
|
|
27
28
|
};
|
|
28
29
|
noMermaid: {
|
|
@@ -61,7 +62,7 @@ declare const ContentPreview: import("vue").DefineComponent<{
|
|
|
61
62
|
default: string;
|
|
62
63
|
};
|
|
63
64
|
setting: {
|
|
64
|
-
type: import("vue").PropType<import(
|
|
65
|
+
type: import("vue").PropType<import("~/type").SettingType>;
|
|
65
66
|
default: () => {
|
|
66
67
|
preview: boolean;
|
|
67
68
|
};
|
|
@@ -71,11 +72,11 @@ declare const ContentPreview: import("vue").DefineComponent<{
|
|
|
71
72
|
default: () => void;
|
|
72
73
|
};
|
|
73
74
|
onGetCatalog: {
|
|
74
|
-
type: import("vue").PropType<(list: import(
|
|
75
|
+
type: import("vue").PropType<(list: import("~/type").HeadList[]) => void>;
|
|
75
76
|
default: () => void;
|
|
76
77
|
};
|
|
77
78
|
mdHeadingId: {
|
|
78
|
-
type: import("vue").PropType<import(
|
|
79
|
+
type: import("vue").PropType<import("~/type").MdHeadingId>;
|
|
79
80
|
default: () => string;
|
|
80
81
|
};
|
|
81
82
|
noMermaid: {
|
|
@@ -110,15 +111,15 @@ declare const ContentPreview: import("vue").DefineComponent<{
|
|
|
110
111
|
};
|
|
111
112
|
}>>, {
|
|
112
113
|
onHtmlChanged: (h: string) => void;
|
|
113
|
-
onGetCatalog: (list: import(
|
|
114
|
+
onGetCatalog: (list: import("~/type").HeadList[]) => void;
|
|
114
115
|
modelValue: string;
|
|
115
|
-
mdHeadingId: import(
|
|
116
|
+
mdHeadingId: import("~/type").MdHeadingId;
|
|
116
117
|
sanitize: (html: string) => string;
|
|
117
118
|
noMermaid: boolean;
|
|
118
119
|
noKatex: boolean;
|
|
119
120
|
formatCopiedText: (text: string) => string;
|
|
120
121
|
noHighlight: boolean;
|
|
121
|
-
setting: import(
|
|
122
|
+
setting: import("~/type").SettingType;
|
|
122
123
|
previewOnly: boolean;
|
|
123
124
|
}>;
|
|
124
125
|
export default ContentPreview;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { CompletionSource } from '@codemirror/autocomplete';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
declare const createAutocompletion: (completions: Array<CompletionSource> | undefined) => import('@codemirror/state').Extension;
|
|
3
4
|
export default createAutocompletion;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Extension } from '@codemirror/state';
|
|
2
|
-
import { EditorView } from '@codemirror/view';
|
|
3
1
|
import { FocusOption } from '../../../type';
|
|
2
|
+
import { EditorView } from '@codemirror/view';
|
|
3
|
+
import { Extension } from '@codemirror/state';
|
|
4
|
+
|
|
4
5
|
export default class CodeMirrorUt {
|
|
5
6
|
view: EditorView;
|
|
6
7
|
maxLength: number;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* From https://github.com/codemirror/theme-one-dark
|
|
3
|
-
*/
|
|
4
|
-
import { Extension } from '@codemirror/state';
|
|
5
1
|
import { HighlightStyle } from '@codemirror/language';
|
|
2
|
+
import { Extension } from '@codemirror/state';
|
|
3
|
+
|
|
6
4
|
export declare const color: {
|
|
7
5
|
chalky: string;
|
|
8
6
|
coral: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { default as useResize } from './useResize';
|
|
2
|
+
import { default as useMarkdownIt } from './useMarkdownIt';
|
|
3
|
+
import { default as useCopyCode } from './useCopyCode';
|
|
4
|
+
import { default as userZoom } from './userZoom';
|
|
5
|
+
import { default as useCodeMirror } from './useCodeMirror';
|
|
6
|
+
import { default as useAutoScroll } from './useAutoScroll';
|
|
7
|
+
|
|
7
8
|
export { useAutoScroll, useCodeMirror, userZoom, useCopyCode, useMarkdownIt, useResize };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
import CodeMirrorUt from '../codemirror';
|
|
3
1
|
import { ContentProps } from '../props';
|
|
2
|
+
import { default as CodeMirrorUt } from '../codemirror';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
|
|
4
5
|
declare const useAutoScroll: (props: ContentProps, html: Ref<string>, codeMirrorUt: Ref<CodeMirrorUt | undefined>) => void;
|
|
5
6
|
export default useAutoScroll;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { default as CodeMirrorUt } from '../codemirror';
|
|
1
2
|
import { ContentProps } from '../props';
|
|
2
|
-
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* 文本编辑区组件
|
|
5
6
|
*
|
|
@@ -7,8 +8,8 @@ import CodeMirrorUt from '../codemirror';
|
|
|
7
8
|
* @returns
|
|
8
9
|
*/
|
|
9
10
|
declare const useCodeMirror: (props: ContentProps) => {
|
|
10
|
-
inputWrapperRef: import(
|
|
11
|
-
codeMirrorUt: import(
|
|
11
|
+
inputWrapperRef: import('vue').Ref<HTMLDivElement | undefined>;
|
|
12
|
+
codeMirrorUt: import('vue').ShallowRef<CodeMirrorUt | undefined>;
|
|
12
13
|
resetHistory(): void;
|
|
13
14
|
};
|
|
14
15
|
export default useCodeMirror;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ContentPreviewProps } from '../ContentPreview';
|
|
2
|
+
|
|
2
3
|
declare const useMarkdownIt: (props: ContentPreviewProps, previewOnly: boolean) => {
|
|
3
|
-
html: import(
|
|
4
|
-
key: import(
|
|
4
|
+
html: import('vue').Ref<string>;
|
|
5
|
+
key: import('vue').Ref<string>;
|
|
5
6
|
};
|
|
6
7
|
export default useMarkdownIt;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ContentPreviewProps } from '../ContentPreview';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* 注册katex扩展到页面
|
|
4
5
|
*
|
|
5
6
|
*/
|
|
6
7
|
declare const useMermaid: (props: ContentPreviewProps) => {
|
|
7
8
|
mermaidRef: any;
|
|
8
|
-
reRenderRef: import(
|
|
9
|
+
reRenderRef: import('vue').ShallowRef<number>;
|
|
9
10
|
replaceMermaid: () => void;
|
|
10
11
|
};
|
|
11
12
|
export default useMermaid;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
1
|
import { ContentProps } from '../props';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
|
|
3
4
|
declare const useResize: (props: ContentProps, contentRef: Ref<HTMLDivElement | undefined>, resizeRef: Ref<HTMLDivElement | undefined>) => {
|
|
4
5
|
inputWrapperStyle: {
|
|
5
6
|
width: string | undefined;
|
|
@@ -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: {
|
|
@@ -235,20 +235,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
235
235
|
}>>, {
|
|
236
236
|
onChange: (v: string) => void;
|
|
237
237
|
onHtmlChanged: (h: string) => void;
|
|
238
|
-
onGetCatalog: (list: import(
|
|
238
|
+
onGetCatalog: (list: import("~/type").HeadList[]) => void;
|
|
239
239
|
onBlur: (event: FocusEvent) => void;
|
|
240
240
|
onFocus: (event: FocusEvent) => void;
|
|
241
241
|
onDrop: (event: DragEvent) => void;
|
|
242
242
|
placeholder: string;
|
|
243
243
|
modelValue: string;
|
|
244
|
-
theme: import(
|
|
245
|
-
mdHeadingId: import(
|
|
244
|
+
theme: import("~/type").Themes;
|
|
245
|
+
mdHeadingId: import("~/type").MdHeadingId;
|
|
246
246
|
sanitize: (html: string) => string;
|
|
247
247
|
noMermaid: boolean;
|
|
248
248
|
noKatex: boolean;
|
|
249
249
|
formatCopiedText: (text: string) => string;
|
|
250
250
|
noHighlight: boolean;
|
|
251
|
-
setting: import(
|
|
251
|
+
setting: import("~/type").SettingType;
|
|
252
252
|
updateModelValue: (v: string) => void;
|
|
253
253
|
previewOnly: boolean;
|
|
254
254
|
}>;
|
|
@@ -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
|
}
|