md-editor-v3 6.3.0 → 6.3.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/MdEditor.cjs +1 -1
- package/lib/es/MdEditor.mjs +454 -424
- package/lib/types/index.d.ts +3341 -8
- package/package.json +2 -1
- package/lib/types/DropdownToolbar/DropdownToolbar.d.ts +0 -137
- package/lib/types/DropdownToolbar/index.d.ts +0 -6
- package/lib/types/MdCatalog/CatalogLink.d.ts +0 -53
- package/lib/types/MdCatalog/MdCatalog.d.ts +0 -186
- package/lib/types/MdCatalog/index.d.ts +0 -6
- package/lib/types/MdEditor/Editor.d.ts +0 -590
- package/lib/types/MdEditor/components/Checkbox/index.d.ts +0 -33
- package/lib/types/MdEditor/components/CustomScrollbar/index.d.ts +0 -72
- package/lib/types/MdEditor/components/Divider/index.d.ts +0 -2
- package/lib/types/MdEditor/components/Dropdown/index.d.ts +0 -55
- package/lib/types/MdEditor/components/Icon/Github.d.ts +0 -2
- package/lib/types/MdEditor/components/Icon/Icon.d.ts +0 -18
- package/lib/types/MdEditor/components/Icon/Str.d.ts +0 -3
- package/lib/types/MdEditor/components/Icon/index.d.ts +0 -16
- package/lib/types/MdEditor/components/Modal/Modal.d.ts +0 -108
- package/lib/types/MdEditor/components/Modal/index.d.ts +0 -6
- package/lib/types/MdEditor/composition.d.ts +0 -92
- package/lib/types/MdEditor/config.d.ts +0 -33
- package/lib/types/MdEditor/index.d.ts +0 -6
- package/lib/types/MdEditor/layouts/Content/ContentPreview.d.ts +0 -153
- package/lib/types/MdEditor/layouts/Content/UpdateOnDemand.d.ts +0 -28
- package/lib/types/MdEditor/layouts/Content/codemirror/autocompletion.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Content/codemirror/commands.d.ts +0 -4
- package/lib/types/MdEditor/layouts/Content/codemirror/floatingToolbar.d.ts +0 -6
- package/lib/types/MdEditor/layouts/Content/codemirror/index.d.ts +0 -53
- package/lib/types/MdEditor/layouts/Content/codemirror/textShortener.d.ts +0 -20
- package/lib/types/MdEditor/layouts/Content/codemirror/themeLight.d.ts +0 -26
- package/lib/types/MdEditor/layouts/Content/codemirror/themeOneDark.d.ts +0 -26
- package/lib/types/MdEditor/layouts/Content/composition/index.d.ts +0 -10
- package/lib/types/MdEditor/layouts/Content/composition/useAttach.d.ts +0 -9
- package/lib/types/MdEditor/layouts/Content/composition/useAutoScroll.d.ts +0 -5
- package/lib/types/MdEditor/layouts/Content/composition/useCodeMirror.d.ts +0 -15
- package/lib/types/MdEditor/layouts/Content/composition/useCopyCode.d.ts +0 -4
- package/lib/types/MdEditor/layouts/Content/composition/useEcharts.d.ts +0 -10
- package/lib/types/MdEditor/layouts/Content/composition/useFollowCatalog.d.ts +0 -5
- package/lib/types/MdEditor/layouts/Content/composition/useHighlight.d.ts +0 -8
- package/lib/types/MdEditor/layouts/Content/composition/useKatex.d.ts +0 -8
- package/lib/types/MdEditor/layouts/Content/composition/useMarkdownIt.d.ts +0 -6
- package/lib/types/MdEditor/layouts/Content/composition/useMermaid.d.ts +0 -10
- package/lib/types/MdEditor/layouts/Content/composition/usePasteUpload.d.ts +0 -8
- package/lib/types/MdEditor/layouts/Content/composition/useRemount.d.ts +0 -3
- package/lib/types/MdEditor/layouts/Content/composition/useResize.d.ts +0 -12
- package/lib/types/MdEditor/layouts/Content/composition/useTaskState.d.ts +0 -3
- package/lib/types/MdEditor/layouts/Content/composition/useToolbarEffect.d.ts +0 -3
- package/lib/types/MdEditor/layouts/Content/composition/userZoom.d.ts +0 -10
- package/lib/types/MdEditor/layouts/Content/index.d.ts +0 -93
- package/lib/types/MdEditor/layouts/Content/markdownIt/admonition/index.d.ts +0 -11
- package/lib/types/MdEditor/layouts/Content/markdownIt/code/index.d.ts +0 -23
- package/lib/types/MdEditor/layouts/Content/markdownIt/echarts/index.d.ts +0 -7
- package/lib/types/MdEditor/layouts/Content/markdownIt/heading/index.d.ts +0 -9
- package/lib/types/MdEditor/layouts/Content/markdownIt/katex/index.d.ts +0 -20
- package/lib/types/MdEditor/layouts/Content/markdownIt/mermaid/index.d.ts +0 -7
- package/lib/types/MdEditor/layouts/Content/markdownIt/task/index.d.ts +0 -15
- package/lib/types/MdEditor/layouts/Content/markdownIt/xss/index.d.ts +0 -13
- package/lib/types/MdEditor/layouts/Content/props.d.ts +0 -204
- package/lib/types/MdEditor/layouts/Content/type.d.ts +0 -19
- package/lib/types/MdEditor/layouts/FloatingToolbar/index.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Footer/MarkdownTotal.d.ts +0 -15
- package/lib/types/MdEditor/layouts/Footer/ScrollAuto.d.ts +0 -21
- package/lib/types/MdEditor/layouts/Footer/index.d.ts +0 -52
- package/lib/types/MdEditor/layouts/Modals/Clip.d.ts +0 -33
- package/lib/types/MdEditor/layouts/Modals/index.d.ts +0 -33
- package/lib/types/MdEditor/layouts/Toolbar/TableShape.d.ts +0 -28
- package/lib/types/MdEditor/layouts/Toolbar/composition.d.ts +0 -7
- package/lib/types/MdEditor/layouts/Toolbar/index.d.ts +0 -23
- package/lib/types/MdEditor/layouts/Toolbar/props.d.ts +0 -14
- package/lib/types/MdEditor/layouts/Toolbar/tools/Bold.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Catalog.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Code.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/CodeRow.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Fullscreen.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Github.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/HtmlPreview.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Image.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/ImageDropdown.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Italic.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Katex.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Link.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Mermaid.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Next.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/OrderedList.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/PageFullscreen.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Prettier.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Preview.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/PreviewOnly.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Quote.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Revoke.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Save.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/StrikeThrough.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Sub.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Sup.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Table.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Task.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Title.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/Underline.d.ts +0 -2
- package/lib/types/MdEditor/layouts/Toolbar/tools/UnorderedList.d.ts +0 -2
- package/lib/types/MdEditor/props.d.ts +0 -784
- package/lib/types/MdEditor/static/env.d.ts +0 -1
- package/lib/types/MdEditor/static/event-name.d.ts +0 -23
- package/lib/types/MdEditor/static/index.d.ts +0 -14
- package/lib/types/MdEditor/type.d.ts +0 -534
- package/lib/types/MdEditor/utils/cache.d.ts +0 -2
- package/lib/types/MdEditor/utils/content-help.d.ts +0 -44
- package/lib/types/MdEditor/utils/dom.d.ts +0 -43
- package/lib/types/MdEditor/utils/event-bus.d.ts +0 -17
- package/lib/types/MdEditor/utils/index.d.ts +0 -38
- package/lib/types/MdEditor/utils/md-it.d.ts +0 -2
- package/lib/types/MdEditor/utils/scroll-auto.d.ts +0 -19
- package/lib/types/MdEditor/utils/vue-tsx.d.ts +0 -18
- package/lib/types/MdPreview/MdPreview.d.ts +0 -516
- package/lib/types/MdPreview/composition/useExpose.d.ts +0 -5
- package/lib/types/MdPreview/index.d.ts +0 -6
- package/lib/types/ModalToolbar/ModalToolbar.d.ts +0 -216
- package/lib/types/ModalToolbar/index.d.ts +0 -6
- package/lib/types/NormalFooterToolbar/NormalFooterToolbar.d.ts +0 -51
- package/lib/types/NormalFooterToolbar/index.d.ts +0 -6
- package/lib/types/NormalToolbar/NormalToolbar.d.ts +0 -117
- package/lib/types/NormalToolbar/index.d.ts +0 -6
- package/lib/types/config.d.ts +0 -3
- package/lib/types/preview.d.ts +0 -6
- package/lib/types/util.d.ts +0 -5
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { PropType, VNode } from 'vue';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
-
overlay: {
|
|
4
|
-
type: PropType<string | VNode | VNode[]>;
|
|
5
|
-
default: string;
|
|
6
|
-
};
|
|
7
|
-
visible: {
|
|
8
|
-
type: PropType<boolean>;
|
|
9
|
-
default: boolean;
|
|
10
|
-
};
|
|
11
|
-
onChange: {
|
|
12
|
-
type: PropType<(v: boolean) => void>;
|
|
13
|
-
default: () => void;
|
|
14
|
-
};
|
|
15
|
-
relative: {
|
|
16
|
-
type: PropType<string>;
|
|
17
|
-
default: string;
|
|
18
|
-
};
|
|
19
|
-
disabled: {
|
|
20
|
-
type: PropType<boolean>;
|
|
21
|
-
default: undefined;
|
|
22
|
-
};
|
|
23
|
-
}>, () => import("vue/jsx-runtime").JSX.Element[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
|
-
overlay: {
|
|
25
|
-
type: PropType<string | VNode | VNode[]>;
|
|
26
|
-
default: string;
|
|
27
|
-
};
|
|
28
|
-
visible: {
|
|
29
|
-
type: PropType<boolean>;
|
|
30
|
-
default: boolean;
|
|
31
|
-
};
|
|
32
|
-
onChange: {
|
|
33
|
-
type: PropType<(v: boolean) => void>;
|
|
34
|
-
default: () => void;
|
|
35
|
-
};
|
|
36
|
-
relative: {
|
|
37
|
-
type: PropType<string>;
|
|
38
|
-
default: string;
|
|
39
|
-
};
|
|
40
|
-
disabled: {
|
|
41
|
-
type: PropType<boolean>;
|
|
42
|
-
default: undefined;
|
|
43
|
-
};
|
|
44
|
-
}>> & Readonly<{}>, {
|
|
45
|
-
onChange: (v: boolean) => void;
|
|
46
|
-
disabled: boolean;
|
|
47
|
-
overlay: string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
-
[key: string]: any;
|
|
49
|
-
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
50
|
-
[key: string]: any;
|
|
51
|
-
}>[];
|
|
52
|
-
visible: boolean;
|
|
53
|
-
relative: string;
|
|
54
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
55
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
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' | 'save' | 'prettier' | 'minimize' | 'maximize' | 'fullscreen-exit' | 'fullscreen' | 'preview-only' | 'preview' | 'preview-html' | 'catalog' | 'github' | 'mermaid' | 'formula' | 'close' | 'delete' | 'upload';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
-
name: {
|
|
5
|
-
type: PropType<IconName>;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
-
name: {
|
|
12
|
-
type: PropType<IconName>;
|
|
13
|
-
default: string;
|
|
14
|
-
};
|
|
15
|
-
}>> & Readonly<{}>, {
|
|
16
|
-
name: IconName;
|
|
17
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { IconName } from './Icon';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
-
name: {
|
|
5
|
-
type: PropType<IconName>;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
-
name: {
|
|
10
|
-
type: PropType<IconName>;
|
|
11
|
-
default: string;
|
|
12
|
-
};
|
|
13
|
-
}>> & Readonly<{}>, {
|
|
14
|
-
name: IconName;
|
|
15
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
-
export default _default;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { PropType, CSSProperties, VNode } from 'vue';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
-
title: {
|
|
4
|
-
type: PropType<string | VNode | VNode[]>;
|
|
5
|
-
default: string;
|
|
6
|
-
};
|
|
7
|
-
visible: {
|
|
8
|
-
type: PropType<boolean>;
|
|
9
|
-
default: boolean;
|
|
10
|
-
};
|
|
11
|
-
width: {
|
|
12
|
-
type: PropType<string>;
|
|
13
|
-
default: string;
|
|
14
|
-
};
|
|
15
|
-
height: {
|
|
16
|
-
type: PropType<string>;
|
|
17
|
-
default: string;
|
|
18
|
-
};
|
|
19
|
-
onClose: {
|
|
20
|
-
type: PropType<() => void>;
|
|
21
|
-
};
|
|
22
|
-
showAdjust: {
|
|
23
|
-
type: PropType<boolean>;
|
|
24
|
-
default: boolean;
|
|
25
|
-
};
|
|
26
|
-
isFullscreen: {
|
|
27
|
-
type: PropType<boolean>;
|
|
28
|
-
default: boolean;
|
|
29
|
-
};
|
|
30
|
-
onAdjust: {
|
|
31
|
-
type: PropType<(val: boolean) => void>;
|
|
32
|
-
default: () => void;
|
|
33
|
-
};
|
|
34
|
-
class: {
|
|
35
|
-
type: PropType<string>;
|
|
36
|
-
default: undefined;
|
|
37
|
-
};
|
|
38
|
-
style: {
|
|
39
|
-
type: PropType<CSSProperties | string>;
|
|
40
|
-
default: () => {};
|
|
41
|
-
};
|
|
42
|
-
showMask: {
|
|
43
|
-
type: PropType<boolean>;
|
|
44
|
-
default: boolean;
|
|
45
|
-
};
|
|
46
|
-
}>, () => import("vue/jsx-runtime").JSX.Element | "", {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onClose"[], "onClose", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
|
-
title: {
|
|
48
|
-
type: PropType<string | VNode | VNode[]>;
|
|
49
|
-
default: string;
|
|
50
|
-
};
|
|
51
|
-
visible: {
|
|
52
|
-
type: PropType<boolean>;
|
|
53
|
-
default: boolean;
|
|
54
|
-
};
|
|
55
|
-
width: {
|
|
56
|
-
type: PropType<string>;
|
|
57
|
-
default: string;
|
|
58
|
-
};
|
|
59
|
-
height: {
|
|
60
|
-
type: PropType<string>;
|
|
61
|
-
default: string;
|
|
62
|
-
};
|
|
63
|
-
onClose: {
|
|
64
|
-
type: PropType<() => void>;
|
|
65
|
-
};
|
|
66
|
-
showAdjust: {
|
|
67
|
-
type: PropType<boolean>;
|
|
68
|
-
default: boolean;
|
|
69
|
-
};
|
|
70
|
-
isFullscreen: {
|
|
71
|
-
type: PropType<boolean>;
|
|
72
|
-
default: boolean;
|
|
73
|
-
};
|
|
74
|
-
onAdjust: {
|
|
75
|
-
type: PropType<(val: boolean) => void>;
|
|
76
|
-
default: () => void;
|
|
77
|
-
};
|
|
78
|
-
class: {
|
|
79
|
-
type: PropType<string>;
|
|
80
|
-
default: undefined;
|
|
81
|
-
};
|
|
82
|
-
style: {
|
|
83
|
-
type: PropType<CSSProperties | string>;
|
|
84
|
-
default: () => {};
|
|
85
|
-
};
|
|
86
|
-
showMask: {
|
|
87
|
-
type: PropType<boolean>;
|
|
88
|
-
default: boolean;
|
|
89
|
-
};
|
|
90
|
-
}>> & Readonly<{
|
|
91
|
-
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
92
|
-
}>, {
|
|
93
|
-
style: string | CSSProperties;
|
|
94
|
-
title: string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
95
|
-
[key: string]: any;
|
|
96
|
-
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
97
|
-
[key: string]: any;
|
|
98
|
-
}>[];
|
|
99
|
-
class: string;
|
|
100
|
-
height: string;
|
|
101
|
-
width: string;
|
|
102
|
-
visible: boolean;
|
|
103
|
-
showAdjust: boolean;
|
|
104
|
-
isFullscreen: boolean;
|
|
105
|
-
onAdjust: (val: boolean) => void;
|
|
106
|
-
showMask: boolean;
|
|
107
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
108
|
-
export default _default;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { Ref, ComputedRef } from 'vue';
|
|
2
|
-
import { SettingType, UpdateSetting, MdPreviewProps, EditorProps, EditorContext } from './type';
|
|
3
|
-
import { ContentExposeParam } from './layouts/Content/type';
|
|
4
|
-
/**
|
|
5
|
-
* 处理保存逻辑,主要是需要异步返回编译后的html
|
|
6
|
-
*
|
|
7
|
-
* @param props
|
|
8
|
-
* @param context
|
|
9
|
-
*/
|
|
10
|
-
export declare const useOnSave: (props: EditorProps, context: EditorContext, options: {
|
|
11
|
-
editorId: string;
|
|
12
|
-
}) => void;
|
|
13
|
-
export interface ProvideOptions {
|
|
14
|
-
rootRef: Ref<HTMLDivElement | undefined>;
|
|
15
|
-
editorId: string;
|
|
16
|
-
setting: SettingType;
|
|
17
|
-
updateSetting: UpdateSetting;
|
|
18
|
-
catalogVisible: Ref<boolean>;
|
|
19
|
-
defToolbars: ComputedRef<any>;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* 抽离预览组件需要提供的组件全局属性
|
|
23
|
-
*
|
|
24
|
-
* @param props 预览组件的props
|
|
25
|
-
*/
|
|
26
|
-
export declare const useProvidePreview: (props: MdPreviewProps, { editorId, rootRef, setting }: Partial<Pick<ProvideOptions, "editorId" | "rootRef" | "setting">>) => {
|
|
27
|
-
editorId: string | undefined;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* 向下提供部分公共参数
|
|
31
|
-
*
|
|
32
|
-
* @param props
|
|
33
|
-
*/
|
|
34
|
-
export declare const useProvide: (props: EditorProps, options: ProvideOptions) => {
|
|
35
|
-
editorId: string | undefined;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* 抽离预览组件需要嵌入的脚本
|
|
39
|
-
*
|
|
40
|
-
* @param props 预览组件的props
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* 插入编辑器支持的扩展外链
|
|
44
|
-
*
|
|
45
|
-
* @param props
|
|
46
|
-
*/
|
|
47
|
-
export declare const useExpansion: (props: EditorProps) => void;
|
|
48
|
-
/**
|
|
49
|
-
* 错误收集
|
|
50
|
-
*
|
|
51
|
-
* @param props
|
|
52
|
-
* @param context
|
|
53
|
-
*/
|
|
54
|
-
export declare const useErrorCatcher: (props: EditorProps, context: EditorContext, options: {
|
|
55
|
-
editorId: string;
|
|
56
|
-
}) => void;
|
|
57
|
-
/**
|
|
58
|
-
* 收集整理公共配置
|
|
59
|
-
*
|
|
60
|
-
* @param props
|
|
61
|
-
* @param context
|
|
62
|
-
* @returns
|
|
63
|
-
*/
|
|
64
|
-
export declare const useConfig: (props: EditorProps, context: EditorContext, options: {
|
|
65
|
-
editorId: string;
|
|
66
|
-
}) => [setting: SettingType, updateSetting: UpdateSetting];
|
|
67
|
-
/**
|
|
68
|
-
* 目录状态整理
|
|
69
|
-
*
|
|
70
|
-
* @param props
|
|
71
|
-
* @returns
|
|
72
|
-
*/
|
|
73
|
-
export declare const useCatalog: (_props: EditorProps, options: {
|
|
74
|
-
editorId: string;
|
|
75
|
-
}) => Ref<boolean, boolean>;
|
|
76
|
-
/**
|
|
77
|
-
* 向外暴露属性
|
|
78
|
-
*
|
|
79
|
-
* @param props 组件属性
|
|
80
|
-
* @param ctx vue conext
|
|
81
|
-
* @param catalogVisible 目录显示状态
|
|
82
|
-
* @param setting 内部状态集合
|
|
83
|
-
* @param updateSetting 更新内部集合
|
|
84
|
-
*/
|
|
85
|
-
export declare const useExpose: (props: EditorProps, ctx: EditorContext, options: {
|
|
86
|
-
editorId: string;
|
|
87
|
-
catalogVisible: Ref<boolean>;
|
|
88
|
-
setting: SettingType;
|
|
89
|
-
updateSetting: UpdateSetting;
|
|
90
|
-
codeRef: Ref<ContentExposeParam | undefined>;
|
|
91
|
-
}) => void;
|
|
92
|
-
export declare const useEditorId: (props: MdPreviewProps) => string;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { CodeCss, Config, GlobalConfig, Footers, StaticTextDefault } from './type';
|
|
2
|
-
export declare const prefix = "md-editor";
|
|
3
|
-
export declare const prefixHump = "MdEditor";
|
|
4
|
-
export declare const defaultEditorId = "md-editor-v3";
|
|
5
|
-
export declare const cdnBase = "https://unpkg.com";
|
|
6
|
-
export declare const highlightUrl = "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/highlight.min.js";
|
|
7
|
-
export declare const prettierUrl: {
|
|
8
|
-
main: string;
|
|
9
|
-
markdown: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const cropperUrl: {
|
|
12
|
-
css: string;
|
|
13
|
-
js: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const screenfullUrl = "https://unpkg.com/screenfull@5.2.0/dist/screenfull.js";
|
|
16
|
-
export declare const mermaidUrl = "https://unpkg.com/mermaid@11.9.0/dist/mermaid.min.js";
|
|
17
|
-
export declare const katexUrl: {
|
|
18
|
-
js: string;
|
|
19
|
-
css: string;
|
|
20
|
-
};
|
|
21
|
-
export declare const codeCss: CodeCss;
|
|
22
|
-
export declare const echartsUrl = "https://unpkg.com/echarts@6.0.0/dist/echarts.min.js";
|
|
23
|
-
export declare const editorExtensionsAttrs: GlobalConfig['editorExtensionsAttrs'];
|
|
24
|
-
export declare const allToolbar: string[];
|
|
25
|
-
export declare const allFooter: Array<Footers>;
|
|
26
|
-
export declare const staticTextDefault: StaticTextDefault;
|
|
27
|
-
export declare const globalConfig: GlobalConfig;
|
|
28
|
-
export declare const config: Config;
|
|
29
|
-
/**
|
|
30
|
-
* 拖拽时最小的宽度
|
|
31
|
-
* 5.3.0开始使用百分比,不能小于10%
|
|
32
|
-
*/
|
|
33
|
-
export declare const MinInputBoxWidth = 0.1;
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { LooseRequired } from '@vue/shared';
|
|
2
|
-
import { ExtractPropTypes } from 'vue';
|
|
3
|
-
import { contentPreviewProps } from './props';
|
|
4
|
-
export type ContentPreviewProps = Readonly<LooseRequired<Readonly<ExtractPropTypes<typeof contentPreviewProps>>>>;
|
|
5
|
-
declare const ContentPreview: import("vue").DefineComponent<ExtractPropTypes<{
|
|
6
|
-
modelValue: {
|
|
7
|
-
type: import("vue").PropType<string>;
|
|
8
|
-
default: string;
|
|
9
|
-
};
|
|
10
|
-
onChange: {
|
|
11
|
-
type: import("vue").PropType<(v: string) => void>;
|
|
12
|
-
default: () => void;
|
|
13
|
-
};
|
|
14
|
-
onHtmlChanged: {
|
|
15
|
-
type: import("vue").PropType<(h: string) => void>;
|
|
16
|
-
default: () => void;
|
|
17
|
-
};
|
|
18
|
-
onGetCatalog: {
|
|
19
|
-
type: import("vue").PropType<(list: import("../../type").HeadList[]) => void>;
|
|
20
|
-
default: () => void;
|
|
21
|
-
};
|
|
22
|
-
mdHeadingId: {
|
|
23
|
-
type: import("vue").PropType<import("../../type").MdHeadingId>;
|
|
24
|
-
default: () => string;
|
|
25
|
-
};
|
|
26
|
-
noMermaid: {
|
|
27
|
-
type: import("vue").PropType<boolean>;
|
|
28
|
-
default: boolean;
|
|
29
|
-
};
|
|
30
|
-
sanitize: {
|
|
31
|
-
type: import("vue").PropType<(html: string) => string>;
|
|
32
|
-
default: (html: string) => string;
|
|
33
|
-
};
|
|
34
|
-
noKatex: {
|
|
35
|
-
type: import("vue").PropType<boolean>;
|
|
36
|
-
default: boolean;
|
|
37
|
-
};
|
|
38
|
-
formatCopiedText: {
|
|
39
|
-
type: import("vue").PropType<(text: string) => string>;
|
|
40
|
-
default: (text: string) => string;
|
|
41
|
-
};
|
|
42
|
-
noHighlight: {
|
|
43
|
-
type: import("vue").PropType<boolean>;
|
|
44
|
-
default: boolean;
|
|
45
|
-
};
|
|
46
|
-
previewOnly: {
|
|
47
|
-
type: import("vue").PropType<boolean>;
|
|
48
|
-
default: boolean;
|
|
49
|
-
};
|
|
50
|
-
noImgZoomIn: {
|
|
51
|
-
type: import("vue").PropType<boolean>;
|
|
52
|
-
};
|
|
53
|
-
sanitizeMermaid: {
|
|
54
|
-
type: import("vue").PropType<(h: string) => Promise<string>>;
|
|
55
|
-
};
|
|
56
|
-
codeFoldable: {
|
|
57
|
-
type: import("vue").PropType<boolean>;
|
|
58
|
-
};
|
|
59
|
-
autoFoldThreshold: {
|
|
60
|
-
type: import("vue").PropType<number>;
|
|
61
|
-
};
|
|
62
|
-
onRemount: {
|
|
63
|
-
type: import("vue").PropType<() => void>;
|
|
64
|
-
};
|
|
65
|
-
noEcharts: {
|
|
66
|
-
type: import("vue").PropType<boolean>;
|
|
67
|
-
};
|
|
68
|
-
previewComponent: {
|
|
69
|
-
type: import("vue").PropType<import("vue").Component>;
|
|
70
|
-
default: undefined;
|
|
71
|
-
};
|
|
72
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
73
|
-
modelValue: {
|
|
74
|
-
type: import("vue").PropType<string>;
|
|
75
|
-
default: string;
|
|
76
|
-
};
|
|
77
|
-
onChange: {
|
|
78
|
-
type: import("vue").PropType<(v: string) => void>;
|
|
79
|
-
default: () => void;
|
|
80
|
-
};
|
|
81
|
-
onHtmlChanged: {
|
|
82
|
-
type: import("vue").PropType<(h: string) => void>;
|
|
83
|
-
default: () => void;
|
|
84
|
-
};
|
|
85
|
-
onGetCatalog: {
|
|
86
|
-
type: import("vue").PropType<(list: import("../../type").HeadList[]) => void>;
|
|
87
|
-
default: () => void;
|
|
88
|
-
};
|
|
89
|
-
mdHeadingId: {
|
|
90
|
-
type: import("vue").PropType<import("../../type").MdHeadingId>;
|
|
91
|
-
default: () => string;
|
|
92
|
-
};
|
|
93
|
-
noMermaid: {
|
|
94
|
-
type: import("vue").PropType<boolean>;
|
|
95
|
-
default: boolean;
|
|
96
|
-
};
|
|
97
|
-
sanitize: {
|
|
98
|
-
type: import("vue").PropType<(html: string) => string>;
|
|
99
|
-
default: (html: string) => string;
|
|
100
|
-
};
|
|
101
|
-
noKatex: {
|
|
102
|
-
type: import("vue").PropType<boolean>;
|
|
103
|
-
default: boolean;
|
|
104
|
-
};
|
|
105
|
-
formatCopiedText: {
|
|
106
|
-
type: import("vue").PropType<(text: string) => string>;
|
|
107
|
-
default: (text: string) => string;
|
|
108
|
-
};
|
|
109
|
-
noHighlight: {
|
|
110
|
-
type: import("vue").PropType<boolean>;
|
|
111
|
-
default: boolean;
|
|
112
|
-
};
|
|
113
|
-
previewOnly: {
|
|
114
|
-
type: import("vue").PropType<boolean>;
|
|
115
|
-
default: boolean;
|
|
116
|
-
};
|
|
117
|
-
noImgZoomIn: {
|
|
118
|
-
type: import("vue").PropType<boolean>;
|
|
119
|
-
};
|
|
120
|
-
sanitizeMermaid: {
|
|
121
|
-
type: import("vue").PropType<(h: string) => Promise<string>>;
|
|
122
|
-
};
|
|
123
|
-
codeFoldable: {
|
|
124
|
-
type: import("vue").PropType<boolean>;
|
|
125
|
-
};
|
|
126
|
-
autoFoldThreshold: {
|
|
127
|
-
type: import("vue").PropType<number>;
|
|
128
|
-
};
|
|
129
|
-
onRemount: {
|
|
130
|
-
type: import("vue").PropType<() => void>;
|
|
131
|
-
};
|
|
132
|
-
noEcharts: {
|
|
133
|
-
type: import("vue").PropType<boolean>;
|
|
134
|
-
};
|
|
135
|
-
previewComponent: {
|
|
136
|
-
type: import("vue").PropType<import("vue").Component>;
|
|
137
|
-
default: undefined;
|
|
138
|
-
};
|
|
139
|
-
}>> & Readonly<{}>, {
|
|
140
|
-
onChange: (v: string) => void;
|
|
141
|
-
previewOnly: boolean;
|
|
142
|
-
onHtmlChanged: (h: string) => void;
|
|
143
|
-
onGetCatalog: (list: import("../../type").HeadList[]) => void;
|
|
144
|
-
modelValue: string;
|
|
145
|
-
mdHeadingId: import("../../type").MdHeadingId;
|
|
146
|
-
sanitize: (html: string) => string;
|
|
147
|
-
noMermaid: boolean;
|
|
148
|
-
noKatex: boolean;
|
|
149
|
-
formatCopiedText: (text: string) => string;
|
|
150
|
-
noHighlight: boolean;
|
|
151
|
-
previewComponent: import("vue").Component;
|
|
152
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
153
|
-
export default ContentPreview;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
declare const UpdateOnDemand: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
-
id: {
|
|
3
|
-
type: StringConstructor;
|
|
4
|
-
required: true;
|
|
5
|
-
};
|
|
6
|
-
class: {
|
|
7
|
-
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
8
|
-
required: true;
|
|
9
|
-
};
|
|
10
|
-
html: {
|
|
11
|
-
type: StringConstructor;
|
|
12
|
-
required: true;
|
|
13
|
-
};
|
|
14
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
id: {
|
|
16
|
-
type: StringConstructor;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
class: {
|
|
20
|
-
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
html: {
|
|
24
|
-
type: StringConstructor;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
-
export default UpdateOnDemand;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { StateField } from '@codemirror/state';
|
|
2
|
-
import { Tooltip } from '@codemirror/view';
|
|
3
|
-
import { App } from 'vue';
|
|
4
|
-
export declare const createFloatingToolbar: (options: {
|
|
5
|
-
privide: (app: App) => void;
|
|
6
|
-
}) => (import("@codemirror/state").Extension | StateField<Tooltip | null>)[];
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Extension } from '@codemirror/state';
|
|
2
|
-
import { EditorView } from '@codemirror/view';
|
|
3
|
-
import { FocusOption } from '../../../type';
|
|
4
|
-
export default class CodeMirrorUt {
|
|
5
|
-
view: EditorView;
|
|
6
|
-
maxLength: number;
|
|
7
|
-
private toggleTabSize;
|
|
8
|
-
private togglePlaceholder;
|
|
9
|
-
/**
|
|
10
|
-
* 设置全部的扩展
|
|
11
|
-
*/
|
|
12
|
-
setExtensions: (extensions: Extension[]) => void;
|
|
13
|
-
toggleDisabled: (extensions: Extension[]) => void;
|
|
14
|
-
toggleReadOnly: (extensions: Extension[]) => void;
|
|
15
|
-
toggleMaxlength: (extensions: Extension[]) => void;
|
|
16
|
-
getValue(): string;
|
|
17
|
-
/**
|
|
18
|
-
* 设置内容
|
|
19
|
-
*
|
|
20
|
-
* @param insert 待插入内容
|
|
21
|
-
* @param from 插入开始位置
|
|
22
|
-
* @param to 插入结束位置
|
|
23
|
-
*/
|
|
24
|
-
setValue(insert: string, from?: number, to?: number): void;
|
|
25
|
-
/**
|
|
26
|
-
* 获取选中的文本
|
|
27
|
-
*/
|
|
28
|
-
getSelectedText(): string;
|
|
29
|
-
/**
|
|
30
|
-
* 使用新的内容替换选中的内容
|
|
31
|
-
*
|
|
32
|
-
* @param text 待替换内容
|
|
33
|
-
* @param options 替换后是否选中
|
|
34
|
-
*/
|
|
35
|
-
replaceSelectedText(text: string, _options: any, editorId: string): void;
|
|
36
|
-
constructor(view: EditorView);
|
|
37
|
-
/**
|
|
38
|
-
* 设置tabSize
|
|
39
|
-
*
|
|
40
|
-
* @param tabSize 需要切换的大小
|
|
41
|
-
*/
|
|
42
|
-
setTabSize(tabSize: number): void;
|
|
43
|
-
/**
|
|
44
|
-
* 设置placeholder
|
|
45
|
-
*
|
|
46
|
-
* @param t 目标内容
|
|
47
|
-
*/
|
|
48
|
-
setPlaceholder(t: string): void;
|
|
49
|
-
focus(options: FocusOption): void;
|
|
50
|
-
setDisabled(d: boolean): void;
|
|
51
|
-
setReadOnly(r: boolean): void;
|
|
52
|
-
setMaxLength(ml: number): void;
|
|
53
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* https://discuss.codemirror.net/t/i-created-an-extension-to-collapse-and-display-long-text-but-im-encountering-issues-when-pasting-long-text-in-places-where-there-are-characters-before-or-after-it/9400
|
|
3
|
-
*
|
|
4
|
-
* 在 codemirror 作者帮助下优化了该插件。
|
|
5
|
-
*/
|
|
6
|
-
import { EditorState, Extension } from '@codemirror/state';
|
|
7
|
-
export interface FindTextsContext {
|
|
8
|
-
state: EditorState;
|
|
9
|
-
lineText: string;
|
|
10
|
-
lineNumber: number;
|
|
11
|
-
lineFrom: number;
|
|
12
|
-
lineTo: number;
|
|
13
|
-
defaultTextRegex: RegExp;
|
|
14
|
-
}
|
|
15
|
-
export interface TextShortenerOptions {
|
|
16
|
-
maxLength: number;
|
|
17
|
-
shortenText?: (text: string) => string;
|
|
18
|
-
findTexts?: (context: FindTextsContext) => Array<[number, number]>;
|
|
19
|
-
}
|
|
20
|
-
export declare const createTextShortener: (options: TextShortenerOptions) => Extension;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* From https://github.com/codemirror/theme-one-dark
|
|
3
|
-
*/
|
|
4
|
-
import { HighlightStyle } from '@codemirror/language';
|
|
5
|
-
import { Extension } from '@codemirror/state';
|
|
6
|
-
export declare const color: {
|
|
7
|
-
chalky: string;
|
|
8
|
-
coral: string;
|
|
9
|
-
cyan: string;
|
|
10
|
-
invalid: string;
|
|
11
|
-
ivory: string;
|
|
12
|
-
stone: string;
|
|
13
|
-
malibu: string;
|
|
14
|
-
sage: string;
|
|
15
|
-
whiskey: string;
|
|
16
|
-
violet: string;
|
|
17
|
-
darkBackground: string;
|
|
18
|
-
highlightBackground: string;
|
|
19
|
-
background: string;
|
|
20
|
-
tooltipBackground: string;
|
|
21
|
-
selection: string;
|
|
22
|
-
cursor: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const oneLightTheme: Extension;
|
|
25
|
-
export declare const oneLightHighlightStyle: HighlightStyle;
|
|
26
|
-
export declare const oneLight: Extension;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* From https://github.com/codemirror/theme-one-dark
|
|
3
|
-
*/
|
|
4
|
-
import { HighlightStyle } from '@codemirror/language';
|
|
5
|
-
import { Extension } from '@codemirror/state';
|
|
6
|
-
export declare const color: {
|
|
7
|
-
chalky: string;
|
|
8
|
-
coral: string;
|
|
9
|
-
cyan: string;
|
|
10
|
-
invalid: string;
|
|
11
|
-
ivory: string;
|
|
12
|
-
stone: string;
|
|
13
|
-
malibu: string;
|
|
14
|
-
sage: string;
|
|
15
|
-
whiskey: string;
|
|
16
|
-
violet: string;
|
|
17
|
-
darkBackground: string;
|
|
18
|
-
highlightBackground: string;
|
|
19
|
-
background: string;
|
|
20
|
-
tooltipBackground: string;
|
|
21
|
-
selection: string;
|
|
22
|
-
cursor: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const oneDarkTheme: Extension;
|
|
25
|
-
export declare const oneDarkHighlightStyle: HighlightStyle;
|
|
26
|
-
export declare const oneDark: Extension;
|