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,6 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
|
|
3
|
-
|
|
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-only' | 'preview' | 'coding' | 'catalog' | 'github' | 'mermaid' | 'formula' | 'close' | 'delete' | 'upload';
|
|
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;
|
|
@@ -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, EditorProps, EditorContext } 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,8 +1,9 @@
|
|
|
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
|
-
export declare const iconfontSvgUrl = "https://at.alicdn.com/t/c/
|
|
5
|
-
export declare const iconfontClassUrl = "https://at.alicdn.com/t/c/
|
|
5
|
+
export declare const iconfontSvgUrl = "https://at.alicdn.com/t/c/font_2605852_rfu1p40qggh.js";
|
|
6
|
+
export declare const iconfontClassUrl = "https://at.alicdn.com/t/c/font_2605852_rfu1p40qggh.css";
|
|
6
7
|
export declare const cdnBase = "https://cdnjs.cloudflare.com/ajax/libs";
|
|
7
8
|
export declare const highlightUrl = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js";
|
|
8
9
|
export declare const prettierUrl: {
|
|
@@ -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
|
-
|
|
13
|
-
|
|
12
|
+
style: string | import('vue').CSSProperties;
|
|
13
|
+
language: string;
|
|
14
|
+
toolbars: import('./type').ToolbarNames[];
|
|
15
|
+
toolbarsExclude: import('./type').ToolbarNames[];
|
|
14
16
|
noPrettier: boolean;
|
|
15
17
|
tabWidth: number;
|
|
16
18
|
tableShape: number[];
|
|
17
19
|
placeholder: string;
|
|
18
|
-
footers: import(
|
|
20
|
+
footers: import('./type').Footers[];
|
|
19
21
|
scrollAuto: boolean;
|
|
20
22
|
showToolbarName: boolean;
|
|
21
23
|
inputBoxWitdh: string;
|
|
22
24
|
modelValue: string;
|
|
23
|
-
theme: import(
|
|
24
|
-
language: string;
|
|
25
|
+
theme: import('./type').Themes;
|
|
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" | "language" | "toolbars" | "toolbarsExclude" | "noPrettier" | "tabWidth" | "tableShape" | "placeholder" | "footers" | "scrollAuto" | "showToolbarName" | "inputBoxWitdh" | "modelValue" | "theme" | "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
|
};
|
|
@@ -475,6 +476,7 @@ declare const _default: {
|
|
|
475
476
|
htmlPreview: boolean;
|
|
476
477
|
class: string;
|
|
477
478
|
style: string | import("vue").CSSProperties;
|
|
479
|
+
language: string;
|
|
478
480
|
toolbars: import("./type").ToolbarNames[];
|
|
479
481
|
toolbarsExclude: import("./type").ToolbarNames[];
|
|
480
482
|
noPrettier: boolean;
|
|
@@ -487,7 +489,6 @@ declare const _default: {
|
|
|
487
489
|
inputBoxWitdh: string;
|
|
488
490
|
modelValue: string;
|
|
489
491
|
theme: import("./type").Themes;
|
|
490
|
-
language: string;
|
|
491
492
|
editorId: string;
|
|
492
493
|
showCodeRowNumber: boolean;
|
|
493
494
|
previewTheme: string;
|
|
@@ -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
|
};
|
|
@@ -951,6 +952,7 @@ declare const _default: {
|
|
|
951
952
|
htmlPreview: boolean;
|
|
952
953
|
class: string;
|
|
953
954
|
style: string | import("vue").CSSProperties;
|
|
955
|
+
language: string;
|
|
954
956
|
toolbars: import("./type").ToolbarNames[];
|
|
955
957
|
toolbarsExclude: import("./type").ToolbarNames[];
|
|
956
958
|
noPrettier: boolean;
|
|
@@ -963,7 +965,6 @@ declare const _default: {
|
|
|
963
965
|
inputBoxWitdh: string;
|
|
964
966
|
modelValue: string;
|
|
965
967
|
theme: import("./type").Themes;
|
|
966
|
-
language: string;
|
|
967
968
|
editorId: string;
|
|
968
969
|
showCodeRowNumber: boolean;
|
|
969
970
|
previewTheme: string;
|
|
@@ -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: {
|
|
@@ -109,16 +110,16 @@ declare const ContentPreview: import("vue").DefineComponent<{
|
|
|
109
110
|
type: import("vue").PropType<(h: string) => Promise<string>>;
|
|
110
111
|
};
|
|
111
112
|
}>>, {
|
|
113
|
+
previewOnly: boolean;
|
|
112
114
|
onHtmlChanged: (h: string) => void;
|
|
113
|
-
onGetCatalog: (list: import(
|
|
115
|
+
onGetCatalog: (list: import("~/type").HeadList[]) => void;
|
|
114
116
|
modelValue: string;
|
|
115
|
-
mdHeadingId: import(
|
|
117
|
+
mdHeadingId: import("~/type").MdHeadingId;
|
|
116
118
|
sanitize: (html: string) => string;
|
|
117
119
|
noMermaid: boolean;
|
|
118
120
|
noKatex: boolean;
|
|
119
121
|
formatCopiedText: (text: string) => string;
|
|
120
122
|
noHighlight: boolean;
|
|
121
|
-
setting: import(
|
|
122
|
-
previewOnly: boolean;
|
|
123
|
+
setting: import("~/type").SettingType;
|
|
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;
|