md-editor-v3 4.16.7 → 4.16.8-0

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