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.
Files changed (125) hide show
  1. package/lib/cjs/MdEditor.cjs +1 -1
  2. package/lib/es/MdEditor.mjs +454 -424
  3. package/lib/types/index.d.ts +3341 -8
  4. package/package.json +2 -1
  5. package/lib/types/DropdownToolbar/DropdownToolbar.d.ts +0 -137
  6. package/lib/types/DropdownToolbar/index.d.ts +0 -6
  7. package/lib/types/MdCatalog/CatalogLink.d.ts +0 -53
  8. package/lib/types/MdCatalog/MdCatalog.d.ts +0 -186
  9. package/lib/types/MdCatalog/index.d.ts +0 -6
  10. package/lib/types/MdEditor/Editor.d.ts +0 -590
  11. package/lib/types/MdEditor/components/Checkbox/index.d.ts +0 -33
  12. package/lib/types/MdEditor/components/CustomScrollbar/index.d.ts +0 -72
  13. package/lib/types/MdEditor/components/Divider/index.d.ts +0 -2
  14. package/lib/types/MdEditor/components/Dropdown/index.d.ts +0 -55
  15. package/lib/types/MdEditor/components/Icon/Github.d.ts +0 -2
  16. package/lib/types/MdEditor/components/Icon/Icon.d.ts +0 -18
  17. package/lib/types/MdEditor/components/Icon/Str.d.ts +0 -3
  18. package/lib/types/MdEditor/components/Icon/index.d.ts +0 -16
  19. package/lib/types/MdEditor/components/Modal/Modal.d.ts +0 -108
  20. package/lib/types/MdEditor/components/Modal/index.d.ts +0 -6
  21. package/lib/types/MdEditor/composition.d.ts +0 -92
  22. package/lib/types/MdEditor/config.d.ts +0 -33
  23. package/lib/types/MdEditor/index.d.ts +0 -6
  24. package/lib/types/MdEditor/layouts/Content/ContentPreview.d.ts +0 -153
  25. package/lib/types/MdEditor/layouts/Content/UpdateOnDemand.d.ts +0 -28
  26. package/lib/types/MdEditor/layouts/Content/codemirror/autocompletion.d.ts +0 -2
  27. package/lib/types/MdEditor/layouts/Content/codemirror/commands.d.ts +0 -4
  28. package/lib/types/MdEditor/layouts/Content/codemirror/floatingToolbar.d.ts +0 -6
  29. package/lib/types/MdEditor/layouts/Content/codemirror/index.d.ts +0 -53
  30. package/lib/types/MdEditor/layouts/Content/codemirror/textShortener.d.ts +0 -20
  31. package/lib/types/MdEditor/layouts/Content/codemirror/themeLight.d.ts +0 -26
  32. package/lib/types/MdEditor/layouts/Content/codemirror/themeOneDark.d.ts +0 -26
  33. package/lib/types/MdEditor/layouts/Content/composition/index.d.ts +0 -10
  34. package/lib/types/MdEditor/layouts/Content/composition/useAttach.d.ts +0 -9
  35. package/lib/types/MdEditor/layouts/Content/composition/useAutoScroll.d.ts +0 -5
  36. package/lib/types/MdEditor/layouts/Content/composition/useCodeMirror.d.ts +0 -15
  37. package/lib/types/MdEditor/layouts/Content/composition/useCopyCode.d.ts +0 -4
  38. package/lib/types/MdEditor/layouts/Content/composition/useEcharts.d.ts +0 -10
  39. package/lib/types/MdEditor/layouts/Content/composition/useFollowCatalog.d.ts +0 -5
  40. package/lib/types/MdEditor/layouts/Content/composition/useHighlight.d.ts +0 -8
  41. package/lib/types/MdEditor/layouts/Content/composition/useKatex.d.ts +0 -8
  42. package/lib/types/MdEditor/layouts/Content/composition/useMarkdownIt.d.ts +0 -6
  43. package/lib/types/MdEditor/layouts/Content/composition/useMermaid.d.ts +0 -10
  44. package/lib/types/MdEditor/layouts/Content/composition/usePasteUpload.d.ts +0 -8
  45. package/lib/types/MdEditor/layouts/Content/composition/useRemount.d.ts +0 -3
  46. package/lib/types/MdEditor/layouts/Content/composition/useResize.d.ts +0 -12
  47. package/lib/types/MdEditor/layouts/Content/composition/useTaskState.d.ts +0 -3
  48. package/lib/types/MdEditor/layouts/Content/composition/useToolbarEffect.d.ts +0 -3
  49. package/lib/types/MdEditor/layouts/Content/composition/userZoom.d.ts +0 -10
  50. package/lib/types/MdEditor/layouts/Content/index.d.ts +0 -93
  51. package/lib/types/MdEditor/layouts/Content/markdownIt/admonition/index.d.ts +0 -11
  52. package/lib/types/MdEditor/layouts/Content/markdownIt/code/index.d.ts +0 -23
  53. package/lib/types/MdEditor/layouts/Content/markdownIt/echarts/index.d.ts +0 -7
  54. package/lib/types/MdEditor/layouts/Content/markdownIt/heading/index.d.ts +0 -9
  55. package/lib/types/MdEditor/layouts/Content/markdownIt/katex/index.d.ts +0 -20
  56. package/lib/types/MdEditor/layouts/Content/markdownIt/mermaid/index.d.ts +0 -7
  57. package/lib/types/MdEditor/layouts/Content/markdownIt/task/index.d.ts +0 -15
  58. package/lib/types/MdEditor/layouts/Content/markdownIt/xss/index.d.ts +0 -13
  59. package/lib/types/MdEditor/layouts/Content/props.d.ts +0 -204
  60. package/lib/types/MdEditor/layouts/Content/type.d.ts +0 -19
  61. package/lib/types/MdEditor/layouts/FloatingToolbar/index.d.ts +0 -2
  62. package/lib/types/MdEditor/layouts/Footer/MarkdownTotal.d.ts +0 -15
  63. package/lib/types/MdEditor/layouts/Footer/ScrollAuto.d.ts +0 -21
  64. package/lib/types/MdEditor/layouts/Footer/index.d.ts +0 -52
  65. package/lib/types/MdEditor/layouts/Modals/Clip.d.ts +0 -33
  66. package/lib/types/MdEditor/layouts/Modals/index.d.ts +0 -33
  67. package/lib/types/MdEditor/layouts/Toolbar/TableShape.d.ts +0 -28
  68. package/lib/types/MdEditor/layouts/Toolbar/composition.d.ts +0 -7
  69. package/lib/types/MdEditor/layouts/Toolbar/index.d.ts +0 -23
  70. package/lib/types/MdEditor/layouts/Toolbar/props.d.ts +0 -14
  71. package/lib/types/MdEditor/layouts/Toolbar/tools/Bold.d.ts +0 -2
  72. package/lib/types/MdEditor/layouts/Toolbar/tools/Catalog.d.ts +0 -2
  73. package/lib/types/MdEditor/layouts/Toolbar/tools/Code.d.ts +0 -2
  74. package/lib/types/MdEditor/layouts/Toolbar/tools/CodeRow.d.ts +0 -2
  75. package/lib/types/MdEditor/layouts/Toolbar/tools/Fullscreen.d.ts +0 -2
  76. package/lib/types/MdEditor/layouts/Toolbar/tools/Github.d.ts +0 -2
  77. package/lib/types/MdEditor/layouts/Toolbar/tools/HtmlPreview.d.ts +0 -2
  78. package/lib/types/MdEditor/layouts/Toolbar/tools/Image.d.ts +0 -2
  79. package/lib/types/MdEditor/layouts/Toolbar/tools/ImageDropdown.d.ts +0 -2
  80. package/lib/types/MdEditor/layouts/Toolbar/tools/Italic.d.ts +0 -2
  81. package/lib/types/MdEditor/layouts/Toolbar/tools/Katex.d.ts +0 -2
  82. package/lib/types/MdEditor/layouts/Toolbar/tools/Link.d.ts +0 -2
  83. package/lib/types/MdEditor/layouts/Toolbar/tools/Mermaid.d.ts +0 -2
  84. package/lib/types/MdEditor/layouts/Toolbar/tools/Next.d.ts +0 -2
  85. package/lib/types/MdEditor/layouts/Toolbar/tools/OrderedList.d.ts +0 -2
  86. package/lib/types/MdEditor/layouts/Toolbar/tools/PageFullscreen.d.ts +0 -2
  87. package/lib/types/MdEditor/layouts/Toolbar/tools/Prettier.d.ts +0 -2
  88. package/lib/types/MdEditor/layouts/Toolbar/tools/Preview.d.ts +0 -2
  89. package/lib/types/MdEditor/layouts/Toolbar/tools/PreviewOnly.d.ts +0 -2
  90. package/lib/types/MdEditor/layouts/Toolbar/tools/Quote.d.ts +0 -2
  91. package/lib/types/MdEditor/layouts/Toolbar/tools/Revoke.d.ts +0 -2
  92. package/lib/types/MdEditor/layouts/Toolbar/tools/Save.d.ts +0 -2
  93. package/lib/types/MdEditor/layouts/Toolbar/tools/StrikeThrough.d.ts +0 -2
  94. package/lib/types/MdEditor/layouts/Toolbar/tools/Sub.d.ts +0 -2
  95. package/lib/types/MdEditor/layouts/Toolbar/tools/Sup.d.ts +0 -2
  96. package/lib/types/MdEditor/layouts/Toolbar/tools/Table.d.ts +0 -2
  97. package/lib/types/MdEditor/layouts/Toolbar/tools/Task.d.ts +0 -2
  98. package/lib/types/MdEditor/layouts/Toolbar/tools/Title.d.ts +0 -2
  99. package/lib/types/MdEditor/layouts/Toolbar/tools/Underline.d.ts +0 -2
  100. package/lib/types/MdEditor/layouts/Toolbar/tools/UnorderedList.d.ts +0 -2
  101. package/lib/types/MdEditor/props.d.ts +0 -784
  102. package/lib/types/MdEditor/static/env.d.ts +0 -1
  103. package/lib/types/MdEditor/static/event-name.d.ts +0 -23
  104. package/lib/types/MdEditor/static/index.d.ts +0 -14
  105. package/lib/types/MdEditor/type.d.ts +0 -534
  106. package/lib/types/MdEditor/utils/cache.d.ts +0 -2
  107. package/lib/types/MdEditor/utils/content-help.d.ts +0 -44
  108. package/lib/types/MdEditor/utils/dom.d.ts +0 -43
  109. package/lib/types/MdEditor/utils/event-bus.d.ts +0 -17
  110. package/lib/types/MdEditor/utils/index.d.ts +0 -38
  111. package/lib/types/MdEditor/utils/md-it.d.ts +0 -2
  112. package/lib/types/MdEditor/utils/scroll-auto.d.ts +0 -19
  113. package/lib/types/MdEditor/utils/vue-tsx.d.ts +0 -18
  114. package/lib/types/MdPreview/MdPreview.d.ts +0 -516
  115. package/lib/types/MdPreview/composition/useExpose.d.ts +0 -5
  116. package/lib/types/MdPreview/index.d.ts +0 -6
  117. package/lib/types/ModalToolbar/ModalToolbar.d.ts +0 -216
  118. package/lib/types/ModalToolbar/index.d.ts +0 -6
  119. package/lib/types/NormalFooterToolbar/NormalFooterToolbar.d.ts +0 -51
  120. package/lib/types/NormalFooterToolbar/index.d.ts +0 -6
  121. package/lib/types/NormalToolbar/NormalToolbar.d.ts +0 -117
  122. package/lib/types/NormalToolbar/index.d.ts +0 -6
  123. package/lib/types/config.d.ts +0 -3
  124. package/lib/types/preview.d.ts +0 -6
  125. package/lib/types/util.d.ts +0 -5
@@ -1,10 +0,0 @@
1
- import useAutoScroll from './useAutoScroll';
2
- import useCodeMirror from './useCodeMirror';
3
- import useCopyCode from './useCopyCode';
4
- import useMarkdownIt from './useMarkdownIt';
5
- import useResize from './useResize';
6
- import userZoom from './userZoom';
7
- export * from './useTaskState';
8
- export * from './useRemount';
9
- export * from './useFollowCatalog';
10
- export { useAutoScroll, useCodeMirror, userZoom, useCopyCode, useMarkdownIt, useResize };
@@ -1,9 +0,0 @@
1
- import { Ref } from 'vue';
2
- import CodeMirrorUt from '../codemirror';
3
- /**
4
- * 一些附带的设置
5
- *
6
- * @deprecated 暂时没啥用
7
- */
8
- declare const useAttach: (codeMirrorUt: Ref<CodeMirrorUt | undefined>) => void;
9
- export default useAttach;
@@ -1,5 +0,0 @@
1
- import { Ref } from 'vue';
2
- import CodeMirrorUt from '../codemirror';
3
- import { ContentProps } from '../props';
4
- declare const useAutoScroll: (props: ContentProps, html: Ref<string>, codeMirrorUt: Ref<CodeMirrorUt | undefined>) => void;
5
- export default useAutoScroll;
@@ -1,15 +0,0 @@
1
- import { Ref } from 'vue';
2
- import CodeMirrorUt from '../codemirror';
3
- import { ContentProps } from '../props';
4
- /**
5
- * 文本编辑区组件
6
- *
7
- * @param props
8
- * @returns
9
- */
10
- declare const useCodeMirror: (props: ContentProps) => {
11
- inputWrapperRef: Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
12
- codeMirrorUt: import("vue").ShallowRef<CodeMirrorUt | undefined, CodeMirrorUt | undefined>;
13
- resetHistory(): void;
14
- };
15
- export default useCodeMirror;
@@ -1,4 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { ContentPreviewProps } from '../ContentPreview';
3
- declare const useCopyCode: (props: ContentPreviewProps, html: Ref<string>, key: Ref<string>) => void;
4
- export default useCopyCode;
@@ -1,10 +0,0 @@
1
- import { ContentPreviewProps } from '../ContentPreview';
2
- /**
3
- * 注册katex扩展到页面
4
- *
5
- */
6
- declare const useEcharts: (props: ContentPreviewProps) => {
7
- reRenderEcharts: import("vue").ShallowRef<number, number>;
8
- replaceEcharts: () => void;
9
- };
10
- export default useEcharts;
@@ -1,5 +0,0 @@
1
- export declare const useFollowCatalog: () => {
2
- onCatalogActive: (_toc: unknown, ele: HTMLDivElement) => void;
3
- onMouseenter: () => boolean;
4
- onMouseleave: () => boolean;
5
- };
@@ -1,8 +0,0 @@
1
- import { ContentPreviewProps } from '../ContentPreview';
2
- /**
3
- * 注册代码高亮扩展到页面
4
- *
5
- * @param props 内容组件props
6
- */
7
- declare const useHighlight: (props: ContentPreviewProps) => import("vue").ShallowRef<any, any>;
8
- export default useHighlight;
@@ -1,8 +0,0 @@
1
- import { ContentPreviewProps } from '../ContentPreview';
2
- /**
3
- * 注册katex扩展到页面
4
- *
5
- * @param props 内容组件props
6
- */
7
- declare const useKatex: (props: ContentPreviewProps) => import("vue").ShallowRef<any, any>;
8
- export default useKatex;
@@ -1,6 +0,0 @@
1
- import { ContentPreviewProps } from '../ContentPreview';
2
- declare const useMarkdownIt: (props: ContentPreviewProps, previewOnly: boolean) => {
3
- html: import("vue").Ref<string, string>;
4
- key: import("vue").Ref<string, string>;
5
- };
6
- export default useMarkdownIt;
@@ -1,10 +0,0 @@
1
- import { ContentPreviewProps } from '../ContentPreview';
2
- /**
3
- * 注册katex扩展到页面
4
- *
5
- */
6
- declare const useMermaid: (props: ContentPreviewProps) => {
7
- reRenderRef: import("vue").ShallowRef<number, number>;
8
- replaceMermaid: () => Promise<void>;
9
- };
10
- export default useMermaid;
@@ -1,8 +0,0 @@
1
- import { ShallowRef } from 'vue';
2
- import CodeMirrorUt from '../codemirror';
3
- import { ContentProps } from '../props';
4
- /**
5
- * 处理粘贴板
6
- */
7
- declare const usePasteUpload: (props: ContentProps, codeMirrorUt: ShallowRef<CodeMirrorUt | undefined>) => (e: ClipboardEvent) => void;
8
- export default usePasteUpload;
@@ -1,3 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { ContentPreviewProps } from '../ContentPreview';
3
- export declare const useRemount: (props: ContentPreviewProps, html: Ref<string>, key: Ref<string>) => void;
@@ -1,12 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { ContentProps } from '../props';
3
- declare const useResize: (props: ContentProps, contentRef: Ref<HTMLDivElement | undefined>, resizeRef: Ref<HTMLDivElement | undefined>) => {
4
- inputWrapperStyle: {
5
- width: string | undefined;
6
- };
7
- resizeOperateStyle: {
8
- insetInlineStart: string | undefined;
9
- display: string;
10
- };
11
- };
12
- export default useResize;
@@ -1,3 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { ContentPreviewProps } from '../ContentPreview';
3
- export declare const useTaskState: (props: ContentPreviewProps, html: Ref<string>) => void;
@@ -1,3 +0,0 @@
1
- import { ComputedRef } from 'vue';
2
- import { ToolbarNames } from '../../../type';
3
- export declare const useToolbarEffect: (effect: () => void, deps: ComputedRef<ToolbarNames[]>) => void;
@@ -1,10 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { ContentPreviewProps } from '../ContentPreview';
3
- /**
4
- * 放大图片
5
- *
6
- * @param props 基础属性
7
- * @param html 编译后的html
8
- */
9
- declare const userZoom: (props: ContentPreviewProps, html: Ref<string>) => void;
10
- export default userZoom;
@@ -1,93 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- readonly onDrop: (event: DragEvent) => void;
3
- readonly onFocus: (event: FocusEvent) => void;
4
- readonly onBlur: (event: FocusEvent) => void;
5
- readonly onChange: (v: string) => void;
6
- readonly previewOnly: boolean;
7
- readonly onHtmlChanged: (h: string) => void;
8
- readonly onGetCatalog: (list: import("../../type").HeadList[]) => void;
9
- readonly placeholder: string;
10
- readonly transformImgUrl: (t: string) => string | Promise<string>;
11
- readonly modelValue: string;
12
- readonly mdHeadingId: import("../../type").MdHeadingId;
13
- readonly sanitize: (html: string) => string;
14
- readonly noMermaid: boolean;
15
- readonly noKatex: boolean;
16
- readonly formatCopiedText: (text: string) => string;
17
- readonly noHighlight: boolean;
18
- readonly updateModelValue: (v: string) => void;
19
- readonly onInput: ((event: Event) => void) | undefined;
20
- readonly oninputBoxWidthChange: ((width: string) => void) | undefined;
21
- readonly onRemount: (() => void) | undefined;
22
- readonly scrollAuto: boolean | undefined;
23
- readonly autoDetectCode: boolean | undefined;
24
- readonly completions: import("@codemirror/autocomplete").CompletionSource[] | undefined;
25
- readonly inputBoxWidth: string | undefined;
26
- readonly catalogLayout: "flat" | "fixed" | undefined;
27
- readonly catalogMaxDepth: number | undefined;
28
- readonly noImgZoomIn: boolean | undefined;
29
- readonly sanitizeMermaid: ((h: string) => Promise<string>) | undefined;
30
- readonly codeFoldable: boolean | undefined;
31
- readonly autoFoldThreshold: number | undefined;
32
- readonly noEcharts: boolean | undefined;
33
- readonly previewComponent: import("vue").Component | undefined;
34
- readonly autofocus: boolean | undefined;
35
- readonly readonly: boolean | undefined;
36
- readonly maxlength: number | undefined;
37
- }, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
38
- readonly onDrop: (event: DragEvent) => void;
39
- readonly onFocus: (event: FocusEvent) => void;
40
- readonly onBlur: (event: FocusEvent) => void;
41
- readonly onChange: (v: string) => void;
42
- readonly previewOnly: boolean;
43
- readonly onHtmlChanged: (h: string) => void;
44
- readonly onGetCatalog: (list: import("../../type").HeadList[]) => void;
45
- readonly placeholder: string;
46
- readonly transformImgUrl: (t: string) => string | Promise<string>;
47
- readonly modelValue: string;
48
- readonly mdHeadingId: import("../../type").MdHeadingId;
49
- readonly sanitize: (html: string) => string;
50
- readonly noMermaid: boolean;
51
- readonly noKatex: boolean;
52
- readonly formatCopiedText: (text: string) => string;
53
- readonly noHighlight: boolean;
54
- readonly updateModelValue: (v: string) => void;
55
- readonly onInput: ((event: Event) => void) | undefined;
56
- readonly oninputBoxWidthChange: ((width: string) => void) | undefined;
57
- readonly onRemount: (() => void) | undefined;
58
- readonly scrollAuto: boolean | undefined;
59
- readonly autoDetectCode: boolean | undefined;
60
- readonly completions: import("@codemirror/autocomplete").CompletionSource[] | undefined;
61
- readonly inputBoxWidth: string | undefined;
62
- readonly catalogLayout: "flat" | "fixed" | undefined;
63
- readonly catalogMaxDepth: number | undefined;
64
- readonly noImgZoomIn: boolean | undefined;
65
- readonly sanitizeMermaid: ((h: string) => Promise<string>) | undefined;
66
- readonly codeFoldable: boolean | undefined;
67
- readonly autoFoldThreshold: number | undefined;
68
- readonly noEcharts: boolean | undefined;
69
- readonly previewComponent: import("vue").Component | undefined;
70
- readonly autofocus: boolean | undefined;
71
- readonly readonly: boolean | undefined;
72
- readonly maxlength: number | undefined;
73
- }> & Readonly<{}>, {
74
- onDrop: (event: DragEvent) => void;
75
- onFocus: (event: FocusEvent) => void;
76
- onBlur: (event: FocusEvent) => void;
77
- onChange: (v: string) => void;
78
- previewOnly: boolean;
79
- onHtmlChanged: (h: string) => void;
80
- onGetCatalog: (list: import("../../type").HeadList[]) => void;
81
- placeholder: string;
82
- transformImgUrl: (t: string) => string | Promise<string>;
83
- modelValue: string;
84
- mdHeadingId: import("../../type").MdHeadingId;
85
- sanitize: (html: string) => string;
86
- noMermaid: boolean;
87
- noKatex: boolean;
88
- formatCopiedText: (text: string) => string;
89
- noHighlight: boolean;
90
- previewComponent: import("vue").Component;
91
- updateModelValue: (v: string) => void;
92
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
93
- export default _default;
@@ -1,11 +0,0 @@
1
- /**
2
- * 源码来自https://github.com/docarys/markdown-it-admonition
3
- *
4
- * 该代码只是正对md-editor-v3系列功能做了适配
5
- */
6
- import markdownit from 'markdown-it';
7
- export interface AdmonitionPluginOps {
8
- marker: string;
9
- }
10
- declare const AdmonitionPlugin: (md: markdownit, options: AdmonitionPluginOps) => void;
11
- export default AdmonitionPlugin;
@@ -1,23 +0,0 @@
1
- /**
2
- * 折叠代码源码来自:https://github.com/cncws/markdown-it-codetabs
3
- *
4
- * 该扩展添加了编辑器适配和折叠代码功能
5
- *
6
- * 源码如果在页面中存在多个编辑器,但是内容又是相同的时候,第二个开始的内容有点混乱
7
- * 需要与编辑器的editorId绑定
8
- */
9
- import markdownit from 'markdown-it';
10
- import { ComputedRef, Ref } from 'vue';
11
- import { CustomIcon, StaticTextDefaultValue } from '../../../../type';
12
- export interface CodeTabsPluginOps extends markdownit.Options {
13
- editorId: string;
14
- usedLanguageTextRef: Ref<StaticTextDefaultValue>;
15
- codeFoldable: boolean;
16
- autoFoldThreshold: number;
17
- customIconRef: ComputedRef<CustomIcon>;
18
- extraTools?: string | (({ lang }: {
19
- lang: string;
20
- }) => string);
21
- }
22
- declare const codetabs: (md: markdownit, _opts: CodeTabsPluginOps) => void;
23
- export default codetabs;
@@ -1,7 +0,0 @@
1
- import markdownit from 'markdown-it';
2
- import { ComputedRef } from 'vue';
3
- import { Themes } from '../../../../type';
4
- declare const EchartsPlugin: (md: markdownit, options: {
5
- themeRef: ComputedRef<Themes>;
6
- }) => void;
7
- export default EchartsPlugin;
@@ -1,9 +0,0 @@
1
- import markdownit from 'markdown-it';
2
- import { Ref } from 'vue';
3
- import { HeadList, MdHeadingId } from '../../../../type';
4
- export interface HeadingPluginOps extends markdownit.Options {
5
- mdHeadingId: MdHeadingId;
6
- headsRef: Ref<HeadList[]>;
7
- }
8
- declare const HeadingPlugin: (md: markdownit, options: HeadingPluginOps) => void;
9
- export default HeadingPlugin;
@@ -1,20 +0,0 @@
1
- /**
2
- * 源码来自https://github.com/waylonflinn/markdown-it-katex
3
- *
4
- * 该代码只是正对md-editor-v3系列功能做了适配
5
- */
6
- import markdownit from 'markdown-it';
7
- import { ShallowRef } from 'vue';
8
- interface KatexOptions {
9
- katexRef: ShallowRef;
10
- inlineDelimiters?: Array<{
11
- open: string;
12
- close: string;
13
- }>;
14
- blockDelimiters?: Array<{
15
- open: string;
16
- close: string;
17
- }>;
18
- }
19
- declare const KatexPlugin: (md: markdownit, { katexRef, inlineDelimiters, blockDelimiters }: KatexOptions) => void;
20
- export default KatexPlugin;
@@ -1,7 +0,0 @@
1
- import markdownit from 'markdown-it';
2
- import { ComputedRef } from 'vue';
3
- import { Themes } from '../../../../type';
4
- declare const MermaidPlugin: (md: markdownit, options: {
5
- themeRef: ComputedRef<Themes>;
6
- }) => void;
7
- export default MermaidPlugin;
@@ -1,15 +0,0 @@
1
- /**
2
- * 源码来自https://github.com/revin/markdown-it-task-lists
3
- *
4
- * 进行了部分重构
5
- * 1. 使用ts和箭头函数重构
6
- * 2. 将option作为局部变量,支持了多个实例的使用
7
- */
8
- import markdownit from 'markdown-it';
9
- interface Options {
10
- enabled?: boolean;
11
- label?: boolean;
12
- labelAfter?: boolean;
13
- }
14
- declare const githubTaskLists: (md: markdownit, options?: Options) => void;
15
- export default githubTaskLists;
@@ -1,13 +0,0 @@
1
- /**
2
- * 重写markdown-it-xss,它的作者好像不维护了
3
- */
4
- import markdownit from 'markdown-it';
5
- import * as xss from 'xss';
6
- export interface XSSPluginType {
7
- xss?: (_xss: typeof xss) => XSS.IFilterXSSOptions | xss.IFilterXSSOptions;
8
- /**
9
- * 它不会覆盖默认的白名单,而是把默认白名单、内置白名单结合
10
- */
11
- extendedWhiteList?: xss.IFilterXSSOptions['whiteList'];
12
- }
13
- export declare const XSSPlugin: (md: markdownit, options: XSSPluginType) => void;
@@ -1,204 +0,0 @@
1
- import { CompletionSource } from '@codemirror/autocomplete';
2
- import { LooseRequired } from '@vue/shared';
3
- import { ExtractPropTypes, PropType, Component } from 'vue';
4
- import { HeadList, MdHeadingId } from '../../type';
5
- export declare const contentPreviewProps: {
6
- modelValue: {
7
- type: PropType<string>;
8
- default: string;
9
- };
10
- onChange: {
11
- type: PropType<(v: string) => void>;
12
- default: () => void;
13
- };
14
- onHtmlChanged: {
15
- type: PropType<(h: string) => void>;
16
- default: () => void;
17
- };
18
- onGetCatalog: {
19
- type: PropType<(list: HeadList[]) => void>;
20
- default: () => void;
21
- };
22
- mdHeadingId: {
23
- type: PropType<MdHeadingId>;
24
- default: () => string;
25
- };
26
- noMermaid: {
27
- type: PropType<boolean>;
28
- default: boolean;
29
- };
30
- sanitize: {
31
- type: PropType<(html: string) => string>;
32
- default: (html: string) => string;
33
- };
34
- noKatex: {
35
- type: PropType<boolean>;
36
- default: boolean;
37
- };
38
- formatCopiedText: {
39
- type: PropType<(text: string) => string>;
40
- default: (text: string) => string;
41
- };
42
- noHighlight: {
43
- type: PropType<boolean>;
44
- default: boolean;
45
- };
46
- previewOnly: {
47
- type: PropType<boolean>;
48
- default: boolean;
49
- };
50
- noImgZoomIn: {
51
- type: PropType<boolean>;
52
- };
53
- sanitizeMermaid: {
54
- type: PropType<(h: string) => Promise<string>>;
55
- };
56
- codeFoldable: {
57
- type: PropType<boolean>;
58
- };
59
- autoFoldThreshold: {
60
- type: PropType<number>;
61
- };
62
- onRemount: {
63
- type: PropType<() => void>;
64
- };
65
- noEcharts: {
66
- type: PropType<boolean>;
67
- };
68
- previewComponent: {
69
- type: PropType<Component>;
70
- default: undefined;
71
- };
72
- };
73
- export declare const contentProps: {
74
- updateModelValue: {
75
- type: PropType<(v: string) => void>;
76
- default: () => void;
77
- };
78
- placeholder: {
79
- type: PropType<string>;
80
- default: string;
81
- };
82
- scrollAuto: {
83
- type: PropType<boolean>;
84
- };
85
- autofocus: {
86
- type: PropType<boolean>;
87
- };
88
- readonly: {
89
- type: PropType<boolean>;
90
- };
91
- maxlength: {
92
- type: PropType<number>;
93
- };
94
- autoDetectCode: {
95
- type: PropType<boolean>;
96
- };
97
- /**
98
- * 输入框失去焦点时触发事件
99
- */
100
- onBlur: {
101
- type: PropType<(event: FocusEvent) => void>;
102
- default: () => void;
103
- };
104
- /**
105
- * 输入框获得焦点时触发事件
106
- */
107
- onFocus: {
108
- type: PropType<(event: FocusEvent) => void>;
109
- default: () => void;
110
- };
111
- completions: {
112
- type: PropType<Array<CompletionSource>>;
113
- };
114
- onInput: {
115
- type: PropType<(event: Event) => void>;
116
- };
117
- onDrop: {
118
- type: PropType<(event: DragEvent) => void>;
119
- default: () => void;
120
- };
121
- inputBoxWidth: {
122
- type: PropType<string>;
123
- };
124
- oninputBoxWidthChange: {
125
- type: PropType<(width: string) => void>;
126
- };
127
- transformImgUrl: {
128
- type: PropType<(t: string) => string | Promise<string>>;
129
- default: (t: string) => string;
130
- };
131
- catalogLayout: {
132
- type: PropType<"fixed" | "flat">;
133
- };
134
- catalogMaxDepth: {
135
- type: PropType<number>;
136
- };
137
- modelValue: {
138
- type: PropType<string>;
139
- default: string;
140
- };
141
- onChange: {
142
- type: PropType<(v: string) => void>;
143
- default: () => void;
144
- };
145
- onHtmlChanged: {
146
- type: PropType<(h: string) => void>;
147
- default: () => void;
148
- };
149
- onGetCatalog: {
150
- type: PropType<(list: HeadList[]) => void>;
151
- default: () => void;
152
- };
153
- mdHeadingId: {
154
- type: PropType<MdHeadingId>;
155
- default: () => string;
156
- };
157
- noMermaid: {
158
- type: PropType<boolean>;
159
- default: boolean;
160
- };
161
- sanitize: {
162
- type: PropType<(html: string) => string>;
163
- default: (html: string) => string;
164
- };
165
- noKatex: {
166
- type: PropType<boolean>;
167
- default: boolean;
168
- };
169
- formatCopiedText: {
170
- type: PropType<(text: string) => string>;
171
- default: (text: string) => string;
172
- };
173
- noHighlight: {
174
- type: PropType<boolean>;
175
- default: boolean;
176
- };
177
- previewOnly: {
178
- type: PropType<boolean>;
179
- default: boolean;
180
- };
181
- noImgZoomIn: {
182
- type: PropType<boolean>;
183
- };
184
- sanitizeMermaid: {
185
- type: PropType<(h: string) => Promise<string>>;
186
- };
187
- codeFoldable: {
188
- type: PropType<boolean>;
189
- };
190
- autoFoldThreshold: {
191
- type: PropType<number>;
192
- };
193
- onRemount: {
194
- type: PropType<() => void>;
195
- };
196
- noEcharts: {
197
- type: PropType<boolean>;
198
- };
199
- previewComponent: {
200
- type: PropType<Component>;
201
- default: undefined;
202
- };
203
- };
204
- export type ContentProps = Readonly<LooseRequired<Readonly<ExtractPropTypes<typeof contentProps>>>>;
@@ -1,19 +0,0 @@
1
- import { EditorView } from '@codemirror/view';
2
- import { FocusOption } from '../../type';
3
- export interface ContentExposeParam {
4
- /**
5
- * 手动聚焦
6
- *
7
- * @param options 聚焦时光标的位置,不提供默认上次失焦时的位置
8
- */
9
- focus(options?: FocusOption): void;
10
- /**
11
- * 获取当前选中的文本
12
- */
13
- getSelectedText(): string | undefined;
14
- /**
15
- * 重置已经存在的历史记录
16
- */
17
- resetHistory(): void;
18
- getEditorView(): EditorView | undefined;
19
- }
@@ -1,2 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
- export default _default;
@@ -1,15 +0,0 @@
1
- import { PropType } from 'vue';
2
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
- modelValue: {
4
- type: PropType<string>;
5
- default: string;
6
- };
7
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
- modelValue: {
9
- type: PropType<string>;
10
- default: string;
11
- };
12
- }>> & Readonly<{}>, {
13
- modelValue: string;
14
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
- export default _default;
@@ -1,21 +0,0 @@
1
- import { PropType } from 'vue';
2
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
- scrollAuto: {
4
- type: PropType<boolean>;
5
- };
6
- onScrollAutoChange: {
7
- type: PropType<(v: boolean) => void>;
8
- default: () => void;
9
- };
10
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
11
- scrollAuto: {
12
- type: PropType<boolean>;
13
- };
14
- onScrollAutoChange: {
15
- type: PropType<(v: boolean) => void>;
16
- default: () => void;
17
- };
18
- }>> & Readonly<{}>, {
19
- onScrollAutoChange: (v: boolean) => void;
20
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
21
- export default _default;