md-editor-v3 1.11.14 → 2.0.0-beta.10

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.
@@ -1,7 +1,7 @@
1
1
  import { PropType, CSSProperties } from 'vue';
2
- import { StaticTextDefaultValue, ToolbarNames, HeadList, PreviewThemes, MarkedHeading, MarkedHeadingId, MarkedImage, Themes } from './type';
2
+ import { ToolbarNames, HeadList, MarkedHeadingId, Themes, InnerError } from './type';
3
3
  export declare const markedHeadingId: MarkedHeadingId;
4
- declare const _default: import("vue").DefineComponent<{
4
+ declare const Editor: import("vue").DefineComponent<{
5
5
  modelValue: {
6
6
  type: PropType<string>;
7
7
  default: string;
@@ -10,22 +10,10 @@ declare const _default: import("vue").DefineComponent<{
10
10
  type: PropType<Themes>;
11
11
  default: string;
12
12
  };
13
- editorClass: {
13
+ class: {
14
14
  type: StringConstructor;
15
15
  default: string;
16
16
  };
17
- hljs: {
18
- type: ObjectConstructor;
19
- default: null;
20
- };
21
- highlightJs: {
22
- type: PropType<string>;
23
- default: string;
24
- };
25
- highlightCss: {
26
- type: PropType<string>;
27
- default: string;
28
- };
29
17
  historyLength: {
30
18
  type: PropType<number>;
31
19
  default: number;
@@ -37,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
37
25
  type: PropType<(v: string) => void>;
38
26
  };
39
27
  onUploadImg: {
40
- type: PropType<(files: File[], callBack: (urls: string[]) => void) => void>;
28
+ type: PropType<(files: Array<File>, callBack: (urls: string[]) => void) => void>;
41
29
  };
42
30
  pageFullScreen: {
43
31
  type: PropType<boolean>;
@@ -59,12 +47,6 @@ declare const _default: import("vue").DefineComponent<{
59
47
  type: PropType<string>;
60
48
  default: string;
61
49
  };
62
- languageUserDefined: {
63
- type: PropType<{
64
- [key: string]: StaticTextDefaultValue;
65
- }>;
66
- default: () => {};
67
- };
68
50
  toolbars: {
69
51
  type: PropType<ToolbarNames[]>;
70
52
  default: string[];
@@ -73,37 +55,13 @@ declare const _default: import("vue").DefineComponent<{
73
55
  type: PropType<ToolbarNames[]>;
74
56
  default: never[];
75
57
  };
76
- prettier: {
58
+ noPrettier: {
77
59
  type: PropType<boolean>;
78
60
  default: boolean;
79
61
  };
80
- prettierCDN: {
81
- type: PropType<string>;
82
- default: string;
83
- };
84
- prettierMDCDN: {
85
- type: PropType<string>;
86
- default: string;
87
- };
88
62
  onHtmlChanged: {
89
63
  type: PropType<(h: string) => void>;
90
64
  };
91
- Cropper: {
92
- type: FunctionConstructor;
93
- default: null;
94
- };
95
- cropperCss: {
96
- type: PropType<string>;
97
- default: string;
98
- };
99
- cropperJs: {
100
- type: PropType<string>;
101
- default: string;
102
- };
103
- iconfontJs: {
104
- type: PropType<string>;
105
- default: string;
106
- };
107
65
  onGetCatalog: {
108
66
  type: PropType<(list: HeadList[]) => void>;
109
67
  };
@@ -119,22 +77,10 @@ declare const _default: import("vue").DefineComponent<{
119
77
  type: PropType<boolean>;
120
78
  default: boolean;
121
79
  };
122
- screenfull: {
123
- type: ObjectConstructor;
124
- default: null;
125
- };
126
- screenfullJs: {
127
- type: PropType<string>;
128
- default: string;
129
- };
130
80
  previewTheme: {
131
- type: PropType<PreviewThemes>;
81
+ type: PropType<string>;
132
82
  default: string;
133
83
  };
134
- markedHeading: {
135
- type: PropType<MarkedHeading>;
136
- default: (text: string, level: number, raw: string) => string;
137
- };
138
84
  style: {
139
85
  type: PropType<string | CSSProperties>;
140
86
  default: () => {};
@@ -147,13 +93,6 @@ declare const _default: import("vue").DefineComponent<{
147
93
  type: PropType<number[]>;
148
94
  default: () => number[];
149
95
  };
150
- mermaid: {
151
- type: ObjectConstructor;
152
- };
153
- mermaidJs: {
154
- type: PropType<string>;
155
- default: string;
156
- };
157
96
  noMermaid: {
158
97
  type: PropType<boolean>;
159
98
  default: boolean;
@@ -166,17 +105,6 @@ declare const _default: import("vue").DefineComponent<{
166
105
  type: PropType<string>;
167
106
  default: string;
168
107
  };
169
- katex: {
170
- type: ObjectConstructor;
171
- };
172
- katexJs: {
173
- type: PropType<string>;
174
- default: string;
175
- };
176
- katexCss: {
177
- type: PropType<string>;
178
- default: string;
179
- };
180
108
  noKatex: {
181
109
  type: PropType<boolean>;
182
110
  default: boolean;
@@ -184,14 +112,14 @@ declare const _default: import("vue").DefineComponent<{
184
112
  defToolbars: {
185
113
  type: PropType<string | JSX.Element>;
186
114
  };
187
- extensions: {
188
- type: PropType<any[]>;
115
+ onError: {
116
+ type: PropType<(err: InnerError) => void>;
189
117
  };
190
- markedImage: {
191
- type: PropType<MarkedImage>;
192
- default: (href: string, title: string, desc: string) => string;
118
+ codeTheme: {
119
+ type: PropType<string>;
120
+ default: string;
193
121
  };
194
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "onSave" | "onChange" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
122
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "onSave" | "onChange" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "onError", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
195
123
  modelValue: {
196
124
  type: PropType<string>;
197
125
  default: string;
@@ -200,22 +128,10 @@ declare const _default: import("vue").DefineComponent<{
200
128
  type: PropType<Themes>;
201
129
  default: string;
202
130
  };
203
- editorClass: {
131
+ class: {
204
132
  type: StringConstructor;
205
133
  default: string;
206
134
  };
207
- hljs: {
208
- type: ObjectConstructor;
209
- default: null;
210
- };
211
- highlightJs: {
212
- type: PropType<string>;
213
- default: string;
214
- };
215
- highlightCss: {
216
- type: PropType<string>;
217
- default: string;
218
- };
219
135
  historyLength: {
220
136
  type: PropType<number>;
221
137
  default: number;
@@ -227,7 +143,7 @@ declare const _default: import("vue").DefineComponent<{
227
143
  type: PropType<(v: string) => void>;
228
144
  };
229
145
  onUploadImg: {
230
- type: PropType<(files: File[], callBack: (urls: string[]) => void) => void>;
146
+ type: PropType<(files: Array<File>, callBack: (urls: string[]) => void) => void>;
231
147
  };
232
148
  pageFullScreen: {
233
149
  type: PropType<boolean>;
@@ -249,12 +165,6 @@ declare const _default: import("vue").DefineComponent<{
249
165
  type: PropType<string>;
250
166
  default: string;
251
167
  };
252
- languageUserDefined: {
253
- type: PropType<{
254
- [key: string]: StaticTextDefaultValue;
255
- }>;
256
- default: () => {};
257
- };
258
168
  toolbars: {
259
169
  type: PropType<ToolbarNames[]>;
260
170
  default: string[];
@@ -263,37 +173,13 @@ declare const _default: import("vue").DefineComponent<{
263
173
  type: PropType<ToolbarNames[]>;
264
174
  default: never[];
265
175
  };
266
- prettier: {
176
+ noPrettier: {
267
177
  type: PropType<boolean>;
268
178
  default: boolean;
269
179
  };
270
- prettierCDN: {
271
- type: PropType<string>;
272
- default: string;
273
- };
274
- prettierMDCDN: {
275
- type: PropType<string>;
276
- default: string;
277
- };
278
180
  onHtmlChanged: {
279
181
  type: PropType<(h: string) => void>;
280
182
  };
281
- Cropper: {
282
- type: FunctionConstructor;
283
- default: null;
284
- };
285
- cropperCss: {
286
- type: PropType<string>;
287
- default: string;
288
- };
289
- cropperJs: {
290
- type: PropType<string>;
291
- default: string;
292
- };
293
- iconfontJs: {
294
- type: PropType<string>;
295
- default: string;
296
- };
297
183
  onGetCatalog: {
298
184
  type: PropType<(list: HeadList[]) => void>;
299
185
  };
@@ -309,22 +195,10 @@ declare const _default: import("vue").DefineComponent<{
309
195
  type: PropType<boolean>;
310
196
  default: boolean;
311
197
  };
312
- screenfull: {
313
- type: ObjectConstructor;
314
- default: null;
315
- };
316
- screenfullJs: {
317
- type: PropType<string>;
318
- default: string;
319
- };
320
198
  previewTheme: {
321
- type: PropType<PreviewThemes>;
199
+ type: PropType<string>;
322
200
  default: string;
323
201
  };
324
- markedHeading: {
325
- type: PropType<MarkedHeading>;
326
- default: (text: string, level: number, raw: string) => string;
327
- };
328
202
  style: {
329
203
  type: PropType<string | CSSProperties>;
330
204
  default: () => {};
@@ -337,13 +211,6 @@ declare const _default: import("vue").DefineComponent<{
337
211
  type: PropType<number[]>;
338
212
  default: () => number[];
339
213
  };
340
- mermaid: {
341
- type: ObjectConstructor;
342
- };
343
- mermaidJs: {
344
- type: PropType<string>;
345
- default: string;
346
- };
347
214
  noMermaid: {
348
215
  type: PropType<boolean>;
349
216
  default: boolean;
@@ -356,17 +223,6 @@ declare const _default: import("vue").DefineComponent<{
356
223
  type: PropType<string>;
357
224
  default: string;
358
225
  };
359
- katex: {
360
- type: ObjectConstructor;
361
- };
362
- katexJs: {
363
- type: PropType<string>;
364
- default: string;
365
- };
366
- katexCss: {
367
- type: PropType<string>;
368
- default: string;
369
- };
370
226
  noKatex: {
371
227
  type: PropType<boolean>;
372
228
  default: boolean;
@@ -374,16 +230,15 @@ declare const _default: import("vue").DefineComponent<{
374
230
  defToolbars: {
375
231
  type: PropType<string | JSX.Element>;
376
232
  };
377
- extensions: {
378
- type: PropType<any[]>;
233
+ onError: {
234
+ type: PropType<(err: InnerError) => void>;
379
235
  };
380
- markedImage: {
381
- type: PropType<MarkedImage>;
382
- default: (href: string, title: string, desc: string) => string;
236
+ codeTheme: {
237
+ type: PropType<string>;
238
+ default: string;
383
239
  };
384
240
  }>>, {
385
241
  editorId: string;
386
- prettier: boolean;
387
242
  preview: boolean;
388
243
  htmlPreview: boolean;
389
244
  tabWidth: number;
@@ -391,38 +246,21 @@ declare const _default: import("vue").DefineComponent<{
391
246
  historyLength: number;
392
247
  previewOnly: boolean;
393
248
  showCodeRowNumber: boolean;
394
- Cropper: Function;
395
- previewTheme: PreviewThemes;
396
- iconfontJs: string;
397
- prettierCDN: string;
398
- prettierMDCDN: string;
399
- cropperCss: string;
400
- cropperJs: string;
249
+ previewTheme: string;
250
+ noPrettier: boolean;
401
251
  style: string | CSSProperties;
252
+ class: string;
402
253
  modelValue: string;
403
- editorClass: string;
404
- hljs: Record<string, any>;
405
- highlightJs: string;
406
- highlightCss: string;
407
254
  pageFullScreen: boolean;
408
255
  language: string;
409
- languageUserDefined: {
410
- [key: string]: StaticTextDefaultValue;
411
- };
412
256
  toolbars: ToolbarNames[];
413
257
  toolbarsExclude: ToolbarNames[];
414
- screenfull: Record<string, any>;
415
- screenfullJs: string;
416
- markedHeading: MarkedHeading;
417
258
  markedHeadingId: MarkedHeadingId;
418
259
  tableShape: number[];
419
- mermaidJs: string;
420
260
  noMermaid: boolean;
421
261
  sanitize: (html: string) => string;
422
262
  placeholder: string;
423
- katexJs: string;
424
- katexCss: string;
425
263
  noKatex: boolean;
426
- markedImage: MarkedImage;
264
+ codeTheme: string;
427
265
  }>;
428
- export default _default;
266
+ export default Editor;
@@ -0,0 +1,39 @@
1
+ import { TocItem } from './index';
2
+ import { MarkedHeadingId } from '../../type';
3
+ import { PropType } from 'vue';
4
+ export interface CatalogLinkProps {
5
+ tocItem: TocItem;
6
+ markedHeadingId: MarkedHeadingId;
7
+ }
8
+ declare const CatalogLink: import("vue").DefineComponent<{
9
+ tocItem: {
10
+ type: PropType<TocItem>;
11
+ default: () => {};
12
+ };
13
+ markedHeadingId: {
14
+ type: PropType<MarkedHeadingId>;
15
+ default: () => void;
16
+ };
17
+ scrollElement: {
18
+ type: PropType<string | Element>;
19
+ default: string;
20
+ };
21
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
+ tocItem: {
23
+ type: PropType<TocItem>;
24
+ default: () => {};
25
+ };
26
+ markedHeadingId: {
27
+ type: PropType<MarkedHeadingId>;
28
+ default: () => void;
29
+ };
30
+ scrollElement: {
31
+ type: PropType<string | Element>;
32
+ default: string;
33
+ };
34
+ }>>, {
35
+ markedHeadingId: MarkedHeadingId;
36
+ scrollElement: string | Element;
37
+ tocItem: TocItem;
38
+ }>;
39
+ export default CatalogLink;
@@ -5,7 +5,7 @@ export interface TocItem {
5
5
  level: number;
6
6
  children?: Array<TocItem>;
7
7
  }
8
- declare const Catalog: import("vue").DefineComponent<{
8
+ declare const MdCatalog: import("vue").DefineComponent<{
9
9
  editorId: {
10
10
  type: PropType<string>;
11
11
  };
@@ -48,4 +48,4 @@ declare const Catalog: import("vue").DefineComponent<{
48
48
  class: string;
49
49
  markedHeadingId: MarkedHeadingId;
50
50
  }>;
51
- export default Catalog;
51
+ export default MdCatalog;
@@ -0,0 +1,96 @@
1
+ import { PropType } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ title: {
4
+ type: PropType<string>;
5
+ default: string;
6
+ };
7
+ modalTitle: {
8
+ type: PropType<string>;
9
+ default: string;
10
+ };
11
+ visible: {
12
+ type: PropType<boolean>;
13
+ };
14
+ width: {
15
+ type: PropType<string>;
16
+ default: string;
17
+ };
18
+ height: {
19
+ type: PropType<string>;
20
+ default: string;
21
+ };
22
+ trigger: {
23
+ type: PropType<string | JSX.Element>;
24
+ };
25
+ onClick: {
26
+ type: PropType<() => void>;
27
+ };
28
+ onClose: {
29
+ type: PropType<() => void>;
30
+ };
31
+ /**
32
+ * 显示全屏按钮
33
+ */
34
+ showAdjust: {
35
+ type: PropType<boolean>;
36
+ default: boolean;
37
+ };
38
+ isFullscreen: {
39
+ type: PropType<boolean>;
40
+ default: boolean;
41
+ };
42
+ onAdjust: {
43
+ type: PropType<(val: boolean) => void>;
44
+ };
45
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "onClick" | "onClose" | "onAdjust", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
46
+ title: {
47
+ type: PropType<string>;
48
+ default: string;
49
+ };
50
+ modalTitle: {
51
+ type: PropType<string>;
52
+ default: string;
53
+ };
54
+ visible: {
55
+ type: PropType<boolean>;
56
+ };
57
+ width: {
58
+ type: PropType<string>;
59
+ default: string;
60
+ };
61
+ height: {
62
+ type: PropType<string>;
63
+ default: string;
64
+ };
65
+ trigger: {
66
+ type: PropType<string | JSX.Element>;
67
+ };
68
+ onClick: {
69
+ type: PropType<() => void>;
70
+ };
71
+ onClose: {
72
+ type: PropType<() => void>;
73
+ };
74
+ /**
75
+ * 显示全屏按钮
76
+ */
77
+ showAdjust: {
78
+ type: PropType<boolean>;
79
+ default: boolean;
80
+ };
81
+ isFullscreen: {
82
+ type: PropType<boolean>;
83
+ default: boolean;
84
+ };
85
+ onAdjust: {
86
+ type: PropType<(val: boolean) => void>;
87
+ };
88
+ }>>, {
89
+ title: string;
90
+ modalTitle: string;
91
+ width: string;
92
+ height: string;
93
+ showAdjust: boolean;
94
+ isFullscreen: boolean;
95
+ }>;
96
+ export default _default;