md-editor-v3 1.11.13 → 2.0.0-beta.2

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,12 +112,13 @@ 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>;
117
+ default: () => () => void;
189
118
  };
190
- markedImage: {
191
- type: PropType<MarkedImage>;
192
- default: (href: string, title: string, desc: string) => string;
119
+ codeCssName: {
120
+ type: PropType<string>;
121
+ default: string;
193
122
  };
194
123
  }, () => 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<{
195
124
  modelValue: {
@@ -200,22 +129,10 @@ declare const _default: import("vue").DefineComponent<{
200
129
  type: PropType<Themes>;
201
130
  default: string;
202
131
  };
203
- editorClass: {
132
+ class: {
204
133
  type: StringConstructor;
205
134
  default: string;
206
135
  };
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
136
  historyLength: {
220
137
  type: PropType<number>;
221
138
  default: number;
@@ -227,7 +144,7 @@ declare const _default: import("vue").DefineComponent<{
227
144
  type: PropType<(v: string) => void>;
228
145
  };
229
146
  onUploadImg: {
230
- type: PropType<(files: File[], callBack: (urls: string[]) => void) => void>;
147
+ type: PropType<(files: Array<File>, callBack: (urls: string[]) => void) => void>;
231
148
  };
232
149
  pageFullScreen: {
233
150
  type: PropType<boolean>;
@@ -249,12 +166,6 @@ declare const _default: import("vue").DefineComponent<{
249
166
  type: PropType<string>;
250
167
  default: string;
251
168
  };
252
- languageUserDefined: {
253
- type: PropType<{
254
- [key: string]: StaticTextDefaultValue;
255
- }>;
256
- default: () => {};
257
- };
258
169
  toolbars: {
259
170
  type: PropType<ToolbarNames[]>;
260
171
  default: string[];
@@ -263,37 +174,13 @@ declare const _default: import("vue").DefineComponent<{
263
174
  type: PropType<ToolbarNames[]>;
264
175
  default: never[];
265
176
  };
266
- prettier: {
177
+ noPrettier: {
267
178
  type: PropType<boolean>;
268
179
  default: boolean;
269
180
  };
270
- prettierCDN: {
271
- type: PropType<string>;
272
- default: string;
273
- };
274
- prettierMDCDN: {
275
- type: PropType<string>;
276
- default: string;
277
- };
278
181
  onHtmlChanged: {
279
182
  type: PropType<(h: string) => void>;
280
183
  };
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
184
  onGetCatalog: {
298
185
  type: PropType<(list: HeadList[]) => void>;
299
186
  };
@@ -309,22 +196,10 @@ declare const _default: import("vue").DefineComponent<{
309
196
  type: PropType<boolean>;
310
197
  default: boolean;
311
198
  };
312
- screenfull: {
313
- type: ObjectConstructor;
314
- default: null;
315
- };
316
- screenfullJs: {
317
- type: PropType<string>;
318
- default: string;
319
- };
320
199
  previewTheme: {
321
- type: PropType<PreviewThemes>;
200
+ type: PropType<string>;
322
201
  default: string;
323
202
  };
324
- markedHeading: {
325
- type: PropType<MarkedHeading>;
326
- default: (text: string, level: number, raw: string) => string;
327
- };
328
203
  style: {
329
204
  type: PropType<string | CSSProperties>;
330
205
  default: () => {};
@@ -337,13 +212,6 @@ declare const _default: import("vue").DefineComponent<{
337
212
  type: PropType<number[]>;
338
213
  default: () => number[];
339
214
  };
340
- mermaid: {
341
- type: ObjectConstructor;
342
- };
343
- mermaidJs: {
344
- type: PropType<string>;
345
- default: string;
346
- };
347
215
  noMermaid: {
348
216
  type: PropType<boolean>;
349
217
  default: boolean;
@@ -356,17 +224,6 @@ declare const _default: import("vue").DefineComponent<{
356
224
  type: PropType<string>;
357
225
  default: string;
358
226
  };
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
227
  noKatex: {
371
228
  type: PropType<boolean>;
372
229
  default: boolean;
@@ -374,16 +231,16 @@ declare const _default: import("vue").DefineComponent<{
374
231
  defToolbars: {
375
232
  type: PropType<string | JSX.Element>;
376
233
  };
377
- extensions: {
378
- type: PropType<any[]>;
234
+ onError: {
235
+ type: PropType<(err: InnerError) => void>;
236
+ default: () => () => void;
379
237
  };
380
- markedImage: {
381
- type: PropType<MarkedImage>;
382
- default: (href: string, title: string, desc: string) => string;
238
+ codeCssName: {
239
+ type: PropType<string>;
240
+ default: string;
383
241
  };
384
242
  }>>, {
385
243
  editorId: string;
386
- prettier: boolean;
387
244
  preview: boolean;
388
245
  htmlPreview: boolean;
389
246
  tabWidth: number;
@@ -391,38 +248,22 @@ declare const _default: import("vue").DefineComponent<{
391
248
  historyLength: number;
392
249
  previewOnly: boolean;
393
250
  showCodeRowNumber: boolean;
394
- Cropper: Function;
395
- previewTheme: PreviewThemes;
396
- iconfontJs: string;
397
- prettierCDN: string;
398
- prettierMDCDN: string;
399
- cropperCss: string;
400
- cropperJs: string;
251
+ previewTheme: string;
252
+ noPrettier: boolean;
401
253
  style: string | CSSProperties;
254
+ class: string;
402
255
  modelValue: string;
403
- editorClass: string;
404
- hljs: Record<string, any>;
405
- highlightJs: string;
406
- highlightCss: string;
407
256
  pageFullScreen: boolean;
408
257
  language: string;
409
- languageUserDefined: {
410
- [key: string]: StaticTextDefaultValue;
411
- };
412
258
  toolbars: ToolbarNames[];
413
259
  toolbarsExclude: ToolbarNames[];
414
- screenfull: Record<string, any>;
415
- screenfullJs: string;
416
- markedHeading: MarkedHeading;
417
260
  markedHeadingId: MarkedHeadingId;
418
261
  tableShape: number[];
419
- mermaidJs: string;
420
262
  noMermaid: boolean;
421
263
  sanitize: (html: string) => string;
422
264
  placeholder: string;
423
- katexJs: string;
424
- katexCss: string;
425
265
  noKatex: boolean;
426
- markedImage: MarkedImage;
266
+ onError: (err: InnerError) => void;
267
+ codeCssName: string;
427
268
  }>;
428
- export default _default;
269
+ 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;
@@ -0,0 +1,105 @@
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
+ default: () => () => void;
28
+ };
29
+ onClose: {
30
+ type: PropType<() => void>;
31
+ default: () => () => void;
32
+ };
33
+ /**
34
+ * 显示全屏按钮
35
+ */
36
+ showAdjust: {
37
+ type: PropType<boolean>;
38
+ default: boolean;
39
+ };
40
+ isFullscreen: {
41
+ type: PropType<boolean>;
42
+ default: boolean;
43
+ };
44
+ onAdjust: {
45
+ type: PropType<(val: boolean) => void>;
46
+ default: () => () => void;
47
+ };
48
+ }, () => 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<{
49
+ title: {
50
+ type: PropType<string>;
51
+ default: string;
52
+ };
53
+ modalTitle: {
54
+ type: PropType<string>;
55
+ default: string;
56
+ };
57
+ visible: {
58
+ type: PropType<boolean>;
59
+ };
60
+ width: {
61
+ type: PropType<string>;
62
+ default: string;
63
+ };
64
+ height: {
65
+ type: PropType<string>;
66
+ default: string;
67
+ };
68
+ trigger: {
69
+ type: PropType<string | JSX.Element>;
70
+ };
71
+ onClick: {
72
+ type: PropType<() => void>;
73
+ default: () => () => void;
74
+ };
75
+ onClose: {
76
+ type: PropType<() => void>;
77
+ default: () => () => void;
78
+ };
79
+ /**
80
+ * 显示全屏按钮
81
+ */
82
+ showAdjust: {
83
+ type: PropType<boolean>;
84
+ default: boolean;
85
+ };
86
+ isFullscreen: {
87
+ type: PropType<boolean>;
88
+ default: boolean;
89
+ };
90
+ onAdjust: {
91
+ type: PropType<(val: boolean) => void>;
92
+ default: () => () => void;
93
+ };
94
+ }>>, {
95
+ title: string;
96
+ onClick: () => void;
97
+ modalTitle: string;
98
+ width: string;
99
+ height: string;
100
+ onClose: () => void;
101
+ showAdjust: boolean;
102
+ isFullscreen: boolean;
103
+ onAdjust: (val: boolean) => void;
104
+ }>;
105
+ export default _default;