vue-codemirror6 1.1.1 → 1.1.3
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/CHANGELOG.md +22 -0
- package/README.md +10 -9
- package/dist/Meta.d.ts +3 -3
- package/dist/Meta.js +6 -0
- package/dist/components/CodeMirror.d.ts +417 -438
- package/dist/components/CodeMirror.d.ts.map +1 -1
- package/dist/components/CodeMirror.js +494 -0
- package/dist/helpers/h-demi.d.ts +18 -18
- package/dist/helpers/h-demi.js +27 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.es.js +28 -14
- package/dist/index.iife.js +37 -19
- package/dist/index.js +11 -0
- package/dist/index.umd.js +39 -21
- package/dist/interfaces/MetaInterface.d.ts +7 -7
- package/dist/interfaces/MetaInterface.js +1 -0
- package/package.json +41 -42
- package/src/components/CodeMirror.ts +50 -27
|
@@ -1,439 +1,418 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
3
|
-
import { EditorView } from '@codemirror/view';
|
|
4
|
-
import
|
|
5
|
-
import type { LanguageSupport } from '@codemirror/language';
|
|
6
|
-
import type {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
(e: 'update
|
|
13
|
-
/** CodeMirror
|
|
14
|
-
(e: '
|
|
15
|
-
/** CodeMirror
|
|
16
|
-
(e: '
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
(e: 'change', value:
|
|
25
|
-
}
|
|
26
|
-
/** CodeMirror Component */
|
|
27
|
-
declare const _default: import("vue-demi").DefineComponent<{
|
|
28
|
-
/** Model value */
|
|
29
|
-
modelValue: {
|
|
30
|
-
type: PropType<string | Text>;
|
|
31
|
-
default: string;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Theme
|
|
35
|
-
*
|
|
36
|
-
* @see {@link https://codemirror.net/docs/ref/#view.EditorView^theme}
|
|
37
|
-
*/
|
|
38
|
-
theme: {
|
|
39
|
-
type: PropType<{
|
|
40
|
-
[selector: string]: StyleSpec;
|
|
41
|
-
}>;
|
|
42
|
-
default: () => void;
|
|
43
|
-
};
|
|
44
|
-
/** Dark Mode */
|
|
45
|
-
dark: {
|
|
46
|
-
type: BooleanConstructor;
|
|
47
|
-
default: boolean;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Use Basic Setup
|
|
51
|
-
*
|
|
52
|
-
* @see {@link https://codemirror.net/docs/ref/#codemirror.basicSetup}
|
|
53
|
-
*/
|
|
54
|
-
basic: {
|
|
55
|
-
type: BooleanConstructor;
|
|
56
|
-
default: boolean;
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Use Minimal Setup (The basic setting has priority.)
|
|
60
|
-
*
|
|
61
|
-
* @see {@link https://codemirror.net/docs/ref/#codemirror.minimalSetup}
|
|
62
|
-
*/
|
|
63
|
-
minimal: {
|
|
64
|
-
type: BooleanConstructor;
|
|
65
|
-
default: boolean;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Placeholder
|
|
69
|
-
*
|
|
70
|
-
* @see {@link https://codemirror.net/docs/ref/#view.placeholder}
|
|
71
|
-
*/
|
|
72
|
-
placeholder: {
|
|
73
|
-
type: PropType<string | HTMLElement>;
|
|
74
|
-
default: undefined;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Line wrapping
|
|
78
|
-
*
|
|
79
|
-
* An extension that enables line wrapping in the editor (by setting CSS white-space to pre-wrap in the content).
|
|
80
|
-
*
|
|
81
|
-
* @see {@link https://codemirror.net/docs/ref/#view.EditorView%5ElineWrapping}
|
|
82
|
-
*/
|
|
83
|
-
wrap: {
|
|
84
|
-
type: BooleanConstructor;
|
|
85
|
-
default: boolean;
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Allow tab key indent.
|
|
89
|
-
*
|
|
90
|
-
* @see {@link https://codemirror.net/examples/tab/}
|
|
91
|
-
*/
|
|
92
|
-
tab: {
|
|
93
|
-
type: BooleanConstructor;
|
|
94
|
-
default: boolean;
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* Tab size
|
|
98
|
-
*
|
|
99
|
-
* @see {@link https://codemirror.net/docs/ref/#state.EditorState^tabSize}
|
|
100
|
-
*/
|
|
101
|
-
tabSize: {
|
|
102
|
-
type: NumberConstructor;
|
|
103
|
-
default: undefined;
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Set line break (separetor) char.
|
|
107
|
-
*
|
|
108
|
-
* @see {@link https://codemirror.net/docs/ref/#state.EditorState^lineSeparator}
|
|
109
|
-
*/
|
|
110
|
-
lineSeparator: {
|
|
111
|
-
type: StringConstructor;
|
|
112
|
-
default: undefined;
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Readonly
|
|
116
|
-
*
|
|
117
|
-
* @see {@link https://codemirror.net/docs/ref/#state.EditorState^readOnly}
|
|
118
|
-
*/
|
|
119
|
-
readonly: {
|
|
120
|
-
type: BooleanConstructor;
|
|
121
|
-
default: boolean;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Disable input.
|
|
125
|
-
*
|
|
126
|
-
* This is the reversed value of the CodeMirror editable.
|
|
127
|
-
* Similar to `readonly`, but setting this value to true disables dragging.
|
|
128
|
-
*
|
|
129
|
-
* @see {@link https://codemirror.net/docs/ref/#view.EditorView^editable}
|
|
130
|
-
*/
|
|
131
|
-
disabled: {
|
|
132
|
-
type: BooleanConstructor;
|
|
133
|
-
default: boolean;
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* Additional Extension
|
|
137
|
-
*
|
|
138
|
-
* @see {@link https://codemirror.net/docs/ref/#state.Extension}
|
|
139
|
-
*/
|
|
140
|
-
extensions: {
|
|
141
|
-
type: PropType<Extension[]>;
|
|
142
|
-
default: () => never[];
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* Language Phreses
|
|
146
|
-
*
|
|
147
|
-
* @see {@link https://codemirror.net/examples/translate/}
|
|
148
|
-
*/
|
|
149
|
-
phrases: {
|
|
150
|
-
type: PropType<Record<string, string>>;
|
|
151
|
-
default: () => undefined;
|
|
152
|
-
};
|
|
153
|
-
/**
|
|
154
|
-
* CodeMirror Language
|
|
155
|
-
*
|
|
156
|
-
* @see {@link https://codemirror.net/docs/ref/#language}
|
|
157
|
-
*/
|
|
158
|
-
lang: {
|
|
159
|
-
type: PropType<LanguageSupport>;
|
|
160
|
-
default: () => undefined;
|
|
161
|
-
};
|
|
162
|
-
/**
|
|
163
|
-
* CodeMirror Linter
|
|
164
|
-
*
|
|
165
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.linter}
|
|
166
|
-
*/
|
|
167
|
-
linter: {
|
|
168
|
-
type: PropType<LintSource>;
|
|
169
|
-
default: undefined;
|
|
170
|
-
};
|
|
171
|
-
/**
|
|
172
|
-
* Linter Config
|
|
173
|
-
*
|
|
174
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.linter^config}
|
|
175
|
-
*/
|
|
176
|
-
linterConfig: {
|
|
177
|
-
type: ObjectConstructor;
|
|
178
|
-
default: () => void;
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* Show Linter Gutter
|
|
182
|
-
*
|
|
183
|
-
* An area to 🔴 the lines with errors will be displayed.
|
|
184
|
-
* This feature is not enabled if `linter` is not specified.
|
|
185
|
-
*
|
|
186
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.lintGutter}
|
|
187
|
-
*/
|
|
188
|
-
gutter: {
|
|
189
|
-
type: BooleanConstructor;
|
|
190
|
-
defalt: boolean;
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* Gutter Config
|
|
194
|
-
*
|
|
195
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.lintGutter^config}
|
|
196
|
-
*/
|
|
197
|
-
gutterConfig: {
|
|
198
|
-
type: ObjectConstructor;
|
|
199
|
-
default: () => void;
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* Using tag
|
|
203
|
-
*/
|
|
204
|
-
tag: {
|
|
205
|
-
type: StringConstructor;
|
|
206
|
-
default: string;
|
|
207
|
-
};
|
|
208
|
-
}, {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
* @see {@link https://codemirror.net/docs/ref/#
|
|
313
|
-
*/
|
|
314
|
-
|
|
315
|
-
type:
|
|
316
|
-
default:
|
|
317
|
-
};
|
|
318
|
-
/**
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
* @see {@link https://codemirror.net/docs/ref/#state.
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
|
-
type:
|
|
325
|
-
default:
|
|
326
|
-
};
|
|
327
|
-
/**
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.
|
|
370
|
-
*/
|
|
371
|
-
|
|
372
|
-
type:
|
|
373
|
-
|
|
374
|
-
};
|
|
375
|
-
/**
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.
|
|
379
|
-
*/
|
|
380
|
-
|
|
381
|
-
type: ObjectConstructor;
|
|
382
|
-
default: () => void;
|
|
383
|
-
};
|
|
384
|
-
/**
|
|
385
|
-
*
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
};
|
|
419
|
-
dark: boolean;
|
|
420
|
-
basic: boolean;
|
|
421
|
-
minimal: boolean;
|
|
422
|
-
placeholder: string | HTMLElement;
|
|
423
|
-
wrap: boolean;
|
|
424
|
-
tab: boolean;
|
|
425
|
-
tabSize: number;
|
|
426
|
-
lineSeparator: string;
|
|
427
|
-
readonly: boolean;
|
|
428
|
-
disabled: boolean;
|
|
429
|
-
extensions: Extension[];
|
|
430
|
-
phrases: Record<string, string>;
|
|
431
|
-
lang: LanguageSupport;
|
|
432
|
-
linter: LintSource;
|
|
433
|
-
linterConfig: Record<string, any>;
|
|
434
|
-
gutter: boolean;
|
|
435
|
-
gutterConfig: Record<string, any>;
|
|
436
|
-
tag: string;
|
|
437
|
-
}>;
|
|
438
|
-
export default _default;
|
|
1
|
+
import { type ObjectEmitsOptions, type PropType, type Ref } from 'vue-demi';
|
|
2
|
+
import { EditorState, type Extension, type Text } from '@codemirror/state';
|
|
3
|
+
import { EditorView, type ViewUpdate } from '@codemirror/view';
|
|
4
|
+
import { type LintSource } from '@codemirror/lint';
|
|
5
|
+
import type { LanguageSupport } from '@codemirror/language';
|
|
6
|
+
import type { StyleSpec } from 'style-mod';
|
|
7
|
+
/** Emit Interface */
|
|
8
|
+
export interface CodeMirrorEmitsOptions extends ObjectEmitsOptions {
|
|
9
|
+
/** Model Update */
|
|
10
|
+
(e: 'update:modelValue', value: string | Text): void;
|
|
11
|
+
/** CodeMirror ViewUpdate */
|
|
12
|
+
(e: 'update', value: ViewUpdate): void;
|
|
13
|
+
/** CodeMirror onFocus */
|
|
14
|
+
(e: 'focus', value: boolean): void;
|
|
15
|
+
/** CodeMirror onReady */
|
|
16
|
+
(e: 'ready', value: {
|
|
17
|
+
view: EditorView;
|
|
18
|
+
state: EditorState;
|
|
19
|
+
container: HTMLElement;
|
|
20
|
+
}): void;
|
|
21
|
+
/** CodeMirror onDestroy */
|
|
22
|
+
(e: 'destroy'): void;
|
|
23
|
+
/** State Changed */
|
|
24
|
+
(e: 'change', value: EditorState): void;
|
|
25
|
+
}
|
|
26
|
+
/** CodeMirror Component */
|
|
27
|
+
declare const _default: import("vue-demi").DefineComponent<{
|
|
28
|
+
/** Model value */
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: PropType<string | Text>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Theme
|
|
35
|
+
*
|
|
36
|
+
* @see {@link https://codemirror.net/docs/ref/#view.EditorView^theme}
|
|
37
|
+
*/
|
|
38
|
+
theme: {
|
|
39
|
+
type: PropType<{
|
|
40
|
+
[selector: string]: StyleSpec;
|
|
41
|
+
}>;
|
|
42
|
+
default: () => void;
|
|
43
|
+
};
|
|
44
|
+
/** Dark Mode */
|
|
45
|
+
dark: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Use Basic Setup
|
|
51
|
+
*
|
|
52
|
+
* @see {@link https://codemirror.net/docs/ref/#codemirror.basicSetup}
|
|
53
|
+
*/
|
|
54
|
+
basic: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Use Minimal Setup (The basic setting has priority.)
|
|
60
|
+
*
|
|
61
|
+
* @see {@link https://codemirror.net/docs/ref/#codemirror.minimalSetup}
|
|
62
|
+
*/
|
|
63
|
+
minimal: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Placeholder
|
|
69
|
+
*
|
|
70
|
+
* @see {@link https://codemirror.net/docs/ref/#view.placeholder}
|
|
71
|
+
*/
|
|
72
|
+
placeholder: {
|
|
73
|
+
type: PropType<string | HTMLElement>;
|
|
74
|
+
default: undefined;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Line wrapping
|
|
78
|
+
*
|
|
79
|
+
* An extension that enables line wrapping in the editor (by setting CSS white-space to pre-wrap in the content).
|
|
80
|
+
*
|
|
81
|
+
* @see {@link https://codemirror.net/docs/ref/#view.EditorView%5ElineWrapping}
|
|
82
|
+
*/
|
|
83
|
+
wrap: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Allow tab key indent.
|
|
89
|
+
*
|
|
90
|
+
* @see {@link https://codemirror.net/examples/tab/}
|
|
91
|
+
*/
|
|
92
|
+
tab: {
|
|
93
|
+
type: BooleanConstructor;
|
|
94
|
+
default: boolean;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Tab size
|
|
98
|
+
*
|
|
99
|
+
* @see {@link https://codemirror.net/docs/ref/#state.EditorState^tabSize}
|
|
100
|
+
*/
|
|
101
|
+
tabSize: {
|
|
102
|
+
type: NumberConstructor;
|
|
103
|
+
default: undefined;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Set line break (separetor) char.
|
|
107
|
+
*
|
|
108
|
+
* @see {@link https://codemirror.net/docs/ref/#state.EditorState^lineSeparator}
|
|
109
|
+
*/
|
|
110
|
+
lineSeparator: {
|
|
111
|
+
type: StringConstructor;
|
|
112
|
+
default: undefined;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Readonly
|
|
116
|
+
*
|
|
117
|
+
* @see {@link https://codemirror.net/docs/ref/#state.EditorState^readOnly}
|
|
118
|
+
*/
|
|
119
|
+
readonly: {
|
|
120
|
+
type: BooleanConstructor;
|
|
121
|
+
default: boolean;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Disable input.
|
|
125
|
+
*
|
|
126
|
+
* This is the reversed value of the CodeMirror editable.
|
|
127
|
+
* Similar to `readonly`, but setting this value to true disables dragging.
|
|
128
|
+
*
|
|
129
|
+
* @see {@link https://codemirror.net/docs/ref/#view.EditorView^editable}
|
|
130
|
+
*/
|
|
131
|
+
disabled: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
default: boolean;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Additional Extension
|
|
137
|
+
*
|
|
138
|
+
* @see {@link https://codemirror.net/docs/ref/#state.Extension}
|
|
139
|
+
*/
|
|
140
|
+
extensions: {
|
|
141
|
+
type: PropType<Extension[]>;
|
|
142
|
+
default: () => never[];
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Language Phreses
|
|
146
|
+
*
|
|
147
|
+
* @see {@link https://codemirror.net/examples/translate/}
|
|
148
|
+
*/
|
|
149
|
+
phrases: {
|
|
150
|
+
type: PropType<Record<string, string>>;
|
|
151
|
+
default: () => undefined;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* CodeMirror Language
|
|
155
|
+
*
|
|
156
|
+
* @see {@link https://codemirror.net/docs/ref/#language}
|
|
157
|
+
*/
|
|
158
|
+
lang: {
|
|
159
|
+
type: PropType<LanguageSupport>;
|
|
160
|
+
default: () => undefined;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* CodeMirror Linter
|
|
164
|
+
*
|
|
165
|
+
* @see {@link https://codemirror.net/docs/ref/#lint.linter}
|
|
166
|
+
*/
|
|
167
|
+
linter: {
|
|
168
|
+
type: PropType<LintSource>;
|
|
169
|
+
default: undefined;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Linter Config
|
|
173
|
+
*
|
|
174
|
+
* @see {@link https://codemirror.net/docs/ref/#lint.linter^config}
|
|
175
|
+
*/
|
|
176
|
+
linterConfig: {
|
|
177
|
+
type: ObjectConstructor;
|
|
178
|
+
default: () => void;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Show Linter Gutter
|
|
182
|
+
*
|
|
183
|
+
* An area to 🔴 the lines with errors will be displayed.
|
|
184
|
+
* This feature is not enabled if `linter` is not specified.
|
|
185
|
+
*
|
|
186
|
+
* @see {@link https://codemirror.net/docs/ref/#lint.lintGutter}
|
|
187
|
+
*/
|
|
188
|
+
gutter: {
|
|
189
|
+
type: BooleanConstructor;
|
|
190
|
+
defalt: boolean;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Gutter Config
|
|
194
|
+
*
|
|
195
|
+
* @see {@link https://codemirror.net/docs/ref/#lint.lintGutter^config}
|
|
196
|
+
*/
|
|
197
|
+
gutterConfig: {
|
|
198
|
+
type: ObjectConstructor;
|
|
199
|
+
default: () => void;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Using tag
|
|
203
|
+
*/
|
|
204
|
+
tag: {
|
|
205
|
+
type: StringConstructor;
|
|
206
|
+
default: string;
|
|
207
|
+
};
|
|
208
|
+
}, {
|
|
209
|
+
editor: Ref<HTMLElement | undefined>;
|
|
210
|
+
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, CodeMirrorEmitsOptions, "update:modelValue" | "update" | "focus" | "ready" | "destroy" | "change", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
211
|
+
/** Model value */
|
|
212
|
+
modelValue: {
|
|
213
|
+
type: PropType<string | Text>;
|
|
214
|
+
default: string;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Theme
|
|
218
|
+
*
|
|
219
|
+
* @see {@link https://codemirror.net/docs/ref/#view.EditorView^theme}
|
|
220
|
+
*/
|
|
221
|
+
theme: {
|
|
222
|
+
type: PropType<{
|
|
223
|
+
[selector: string]: StyleSpec;
|
|
224
|
+
}>;
|
|
225
|
+
default: () => void;
|
|
226
|
+
};
|
|
227
|
+
/** Dark Mode */
|
|
228
|
+
dark: {
|
|
229
|
+
type: BooleanConstructor;
|
|
230
|
+
default: boolean;
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* Use Basic Setup
|
|
234
|
+
*
|
|
235
|
+
* @see {@link https://codemirror.net/docs/ref/#codemirror.basicSetup}
|
|
236
|
+
*/
|
|
237
|
+
basic: {
|
|
238
|
+
type: BooleanConstructor;
|
|
239
|
+
default: boolean;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Use Minimal Setup (The basic setting has priority.)
|
|
243
|
+
*
|
|
244
|
+
* @see {@link https://codemirror.net/docs/ref/#codemirror.minimalSetup}
|
|
245
|
+
*/
|
|
246
|
+
minimal: {
|
|
247
|
+
type: BooleanConstructor;
|
|
248
|
+
default: boolean;
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* Placeholder
|
|
252
|
+
*
|
|
253
|
+
* @see {@link https://codemirror.net/docs/ref/#view.placeholder}
|
|
254
|
+
*/
|
|
255
|
+
placeholder: {
|
|
256
|
+
type: PropType<string | HTMLElement>;
|
|
257
|
+
default: undefined;
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Line wrapping
|
|
261
|
+
*
|
|
262
|
+
* An extension that enables line wrapping in the editor (by setting CSS white-space to pre-wrap in the content).
|
|
263
|
+
*
|
|
264
|
+
* @see {@link https://codemirror.net/docs/ref/#view.EditorView%5ElineWrapping}
|
|
265
|
+
*/
|
|
266
|
+
wrap: {
|
|
267
|
+
type: BooleanConstructor;
|
|
268
|
+
default: boolean;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* Allow tab key indent.
|
|
272
|
+
*
|
|
273
|
+
* @see {@link https://codemirror.net/examples/tab/}
|
|
274
|
+
*/
|
|
275
|
+
tab: {
|
|
276
|
+
type: BooleanConstructor;
|
|
277
|
+
default: boolean;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Tab size
|
|
281
|
+
*
|
|
282
|
+
* @see {@link https://codemirror.net/docs/ref/#state.EditorState^tabSize}
|
|
283
|
+
*/
|
|
284
|
+
tabSize: {
|
|
285
|
+
type: NumberConstructor;
|
|
286
|
+
default: undefined;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Set line break (separetor) char.
|
|
290
|
+
*
|
|
291
|
+
* @see {@link https://codemirror.net/docs/ref/#state.EditorState^lineSeparator}
|
|
292
|
+
*/
|
|
293
|
+
lineSeparator: {
|
|
294
|
+
type: StringConstructor;
|
|
295
|
+
default: undefined;
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* Readonly
|
|
299
|
+
*
|
|
300
|
+
* @see {@link https://codemirror.net/docs/ref/#state.EditorState^readOnly}
|
|
301
|
+
*/
|
|
302
|
+
readonly: {
|
|
303
|
+
type: BooleanConstructor;
|
|
304
|
+
default: boolean;
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* Disable input.
|
|
308
|
+
*
|
|
309
|
+
* This is the reversed value of the CodeMirror editable.
|
|
310
|
+
* Similar to `readonly`, but setting this value to true disables dragging.
|
|
311
|
+
*
|
|
312
|
+
* @see {@link https://codemirror.net/docs/ref/#view.EditorView^editable}
|
|
313
|
+
*/
|
|
314
|
+
disabled: {
|
|
315
|
+
type: BooleanConstructor;
|
|
316
|
+
default: boolean;
|
|
317
|
+
};
|
|
318
|
+
/**
|
|
319
|
+
* Additional Extension
|
|
320
|
+
*
|
|
321
|
+
* @see {@link https://codemirror.net/docs/ref/#state.Extension}
|
|
322
|
+
*/
|
|
323
|
+
extensions: {
|
|
324
|
+
type: PropType<Extension[]>;
|
|
325
|
+
default: () => never[];
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* Language Phreses
|
|
329
|
+
*
|
|
330
|
+
* @see {@link https://codemirror.net/examples/translate/}
|
|
331
|
+
*/
|
|
332
|
+
phrases: {
|
|
333
|
+
type: PropType<Record<string, string>>;
|
|
334
|
+
default: () => undefined;
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* CodeMirror Language
|
|
338
|
+
*
|
|
339
|
+
* @see {@link https://codemirror.net/docs/ref/#language}
|
|
340
|
+
*/
|
|
341
|
+
lang: {
|
|
342
|
+
type: PropType<LanguageSupport>;
|
|
343
|
+
default: () => undefined;
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* CodeMirror Linter
|
|
347
|
+
*
|
|
348
|
+
* @see {@link https://codemirror.net/docs/ref/#lint.linter}
|
|
349
|
+
*/
|
|
350
|
+
linter: {
|
|
351
|
+
type: PropType<LintSource>;
|
|
352
|
+
default: undefined;
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* Linter Config
|
|
356
|
+
*
|
|
357
|
+
* @see {@link https://codemirror.net/docs/ref/#lint.linter^config}
|
|
358
|
+
*/
|
|
359
|
+
linterConfig: {
|
|
360
|
+
type: ObjectConstructor;
|
|
361
|
+
default: () => void;
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* Show Linter Gutter
|
|
365
|
+
*
|
|
366
|
+
* An area to 🔴 the lines with errors will be displayed.
|
|
367
|
+
* This feature is not enabled if `linter` is not specified.
|
|
368
|
+
*
|
|
369
|
+
* @see {@link https://codemirror.net/docs/ref/#lint.lintGutter}
|
|
370
|
+
*/
|
|
371
|
+
gutter: {
|
|
372
|
+
type: BooleanConstructor;
|
|
373
|
+
defalt: boolean;
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* Gutter Config
|
|
377
|
+
*
|
|
378
|
+
* @see {@link https://codemirror.net/docs/ref/#lint.lintGutter^config}
|
|
379
|
+
*/
|
|
380
|
+
gutterConfig: {
|
|
381
|
+
type: ObjectConstructor;
|
|
382
|
+
default: () => void;
|
|
383
|
+
};
|
|
384
|
+
/**
|
|
385
|
+
* Using tag
|
|
386
|
+
*/
|
|
387
|
+
tag: {
|
|
388
|
+
type: StringConstructor;
|
|
389
|
+
default: string;
|
|
390
|
+
};
|
|
391
|
+
}>> & {
|
|
392
|
+
[x: `on${Capitalize<string>}`]: ((...args: never) => any) | undefined;
|
|
393
|
+
}, {
|
|
394
|
+
modelValue: string | Text;
|
|
395
|
+
theme: {
|
|
396
|
+
[selector: string]: StyleSpec;
|
|
397
|
+
};
|
|
398
|
+
dark: boolean;
|
|
399
|
+
basic: boolean;
|
|
400
|
+
minimal: boolean;
|
|
401
|
+
placeholder: string | HTMLElement;
|
|
402
|
+
wrap: boolean;
|
|
403
|
+
tab: boolean;
|
|
404
|
+
tabSize: number;
|
|
405
|
+
lineSeparator: string;
|
|
406
|
+
readonly: boolean;
|
|
407
|
+
disabled: boolean;
|
|
408
|
+
extensions: Extension[];
|
|
409
|
+
phrases: Record<string, string>;
|
|
410
|
+
lang: LanguageSupport;
|
|
411
|
+
linter: LintSource;
|
|
412
|
+
linterConfig: Record<string, any>;
|
|
413
|
+
gutter: boolean;
|
|
414
|
+
gutterConfig: Record<string, any>;
|
|
415
|
+
tag: string;
|
|
416
|
+
}>;
|
|
417
|
+
export default _default;
|
|
439
418
|
//# sourceMappingURL=CodeMirror.d.ts.map
|