vue-codemirror6 1.7.0 → 1.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.
- package/README.md +86 -405
- package/dist/composables/useCodeMirror.d.ts +381 -0
- package/dist/helpers/h-demi.d.ts +42 -0
- package/dist/index.d.ts +298 -502
- package/dist/index.es.js +5 -382
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/s~0.es.js +389 -0
- package/dist/s~0.es.js.map +1 -0
- package/dist/types/CodeMirrorExposed.d.ts +70 -0
- package/dist/types/Meta.d.ts +18 -0
- package/dist/wc-auto.d.ts +17 -0
- package/dist/wc-auto.es.js +17 -0
- package/dist/wc-auto.es.js.map +1 -0
- package/dist/wc-auto.umd.js +11 -0
- package/dist/wc.d.ts +62 -0
- package/dist/wc.es.js +40 -0
- package/dist/wc.es.js.map +1 -0
- package/dist/wc.umd.js +11 -0
- package/package.json +75 -50
- package/README.ja.md +0 -447
package/dist/index.d.ts
CHANGED
|
@@ -4,508 +4,304 @@
|
|
|
4
4
|
* @description CodeMirror6 Component for vue2 and vue3.
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
6
|
* @license MIT
|
|
7
|
-
* @version 1.
|
|
7
|
+
* @version 1.8.0
|
|
8
8
|
* @see {@link https://github.com/logue/vue-codemirror6}
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { App } from 'vue-demi';
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
readonly
|
|
38
|
-
|
|
39
|
-
readonly
|
|
40
|
-
|
|
41
|
-
readonly
|
|
42
|
-
|
|
43
|
-
readonly
|
|
44
|
-
|
|
45
|
-
readonly
|
|
46
|
-
|
|
47
|
-
readonly
|
|
48
|
-
|
|
49
|
-
readonly
|
|
50
|
-
|
|
51
|
-
readonly
|
|
52
|
-
|
|
53
|
-
readonly
|
|
54
|
-
|
|
55
|
-
readonly
|
|
56
|
-
|
|
57
|
-
readonly
|
|
58
|
-
|
|
59
|
-
readonly
|
|
60
|
-
|
|
61
|
-
readonly
|
|
62
|
-
|
|
63
|
-
readonly
|
|
64
|
-
|
|
65
|
-
readonly
|
|
66
|
-
|
|
67
|
-
readonly
|
|
68
|
-
|
|
69
|
-
readonly
|
|
70
|
-
|
|
71
|
-
readonly
|
|
72
|
-
|
|
73
|
-
readonly
|
|
74
|
-
|
|
75
|
-
readonly
|
|
76
|
-
|
|
77
|
-
readonly
|
|
78
|
-
|
|
79
|
-
readonly
|
|
80
|
-
|
|
81
|
-
readonly
|
|
82
|
-
|
|
83
|
-
readonly
|
|
84
|
-
|
|
85
|
-
readonly
|
|
86
|
-
|
|
87
|
-
readonly
|
|
88
|
-
|
|
89
|
-
readonly
|
|
90
|
-
|
|
91
|
-
readonly
|
|
92
|
-
|
|
93
|
-
readonly
|
|
94
|
-
|
|
95
|
-
readonly
|
|
96
|
-
|
|
97
|
-
readonly
|
|
98
|
-
|
|
99
|
-
readonly
|
|
100
|
-
|
|
101
|
-
readonly
|
|
102
|
-
|
|
103
|
-
readonly
|
|
104
|
-
|
|
105
|
-
readonly
|
|
106
|
-
|
|
107
|
-
readonly
|
|
108
|
-
|
|
109
|
-
readonly
|
|
110
|
-
|
|
111
|
-
readonly
|
|
112
|
-
|
|
113
|
-
readonly
|
|
114
|
-
|
|
115
|
-
readonly
|
|
116
|
-
|
|
117
|
-
readonly
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
readonly
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
readonly
|
|
206
|
-
readonly
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
readonly
|
|
210
|
-
readonly
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
readonly
|
|
214
|
-
readonly
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
readonly
|
|
218
|
-
readonly
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
readonly
|
|
222
|
-
readonly
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
readonly
|
|
226
|
-
readonly
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
readonly
|
|
230
|
-
readonly
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
readonly
|
|
234
|
-
readonly
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
readonly
|
|
238
|
-
readonly
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
readonly
|
|
242
|
-
readonly
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
readonly
|
|
246
|
-
readonly
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
readonly
|
|
250
|
-
readonly
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
readonly
|
|
254
|
-
readonly
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
readonly
|
|
258
|
-
readonly
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
readonly
|
|
274
|
-
readonly
|
|
275
|
-
|
|
276
|
-
readonly
|
|
277
|
-
readonly
|
|
278
|
-
readonly
|
|
279
|
-
|
|
280
|
-
readonly
|
|
281
|
-
readonly
|
|
282
|
-
readonly
|
|
283
|
-
|
|
284
|
-
readonly
|
|
285
|
-
readonly
|
|
286
|
-
readonly
|
|
287
|
-
|
|
288
|
-
readonly
|
|
289
|
-
readonly
|
|
290
|
-
readonly
|
|
291
|
-
|
|
292
|
-
readonly
|
|
293
|
-
readonly
|
|
294
|
-
readonly
|
|
295
|
-
|
|
296
|
-
readonly scrollIntoView:
|
|
297
|
-
readonly
|
|
298
|
-
readonly
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
};
|
|
308
|
-
}>, {
|
|
309
|
-
editor: Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
310
|
-
view: ShallowRef<EditorView_2 | undefined>;
|
|
311
|
-
cursor: WritableComputedRef<number, number>;
|
|
312
|
-
selection: WritableComputedRef<EditorSelection | undefined, EditorSelection | undefined>;
|
|
313
|
-
focus: WritableComputedRef<boolean, boolean>;
|
|
314
|
-
length: Ref<number, number>;
|
|
315
|
-
json: WritableComputedRef<Record<string, StateField<unknown>> | undefined, Record<string, StateField<unknown>> | undefined>;
|
|
316
|
-
diagnosticCount: Ref<number, number>;
|
|
317
|
-
dom: HTMLElement | undefined;
|
|
318
|
-
lint: () => void;
|
|
319
|
-
forceReconfigure: () => void;
|
|
320
|
-
getRange: (from?: number, to?: number) => string | undefined;
|
|
321
|
-
getLine: (number: number) => string | undefined;
|
|
322
|
-
lineCount: () => number;
|
|
323
|
-
getCursor: () => number;
|
|
324
|
-
listSelections: () => readonly SelectionRange[];
|
|
325
|
-
getSelection: () => string;
|
|
326
|
-
getSelections: () => string[];
|
|
327
|
-
somethingSelected: () => boolean;
|
|
328
|
-
replaceRange: (replacement: string | Text_2, from: number, to: number) => void;
|
|
329
|
-
replaceSelection: (replacement: string | Text_2) => void;
|
|
330
|
-
setCursor: (position: number) => void;
|
|
331
|
-
setSelection: (anchor: number, head?: number) => void;
|
|
332
|
-
setSelections: (ranges: readonly SelectionRange[], primary?: number) => void;
|
|
333
|
-
extendSelectionsBy: (f: (range: SelectionRange) => number) => void;
|
|
334
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
335
|
-
'update:modelValue': (_value?: string | Text_2) => boolean;
|
|
336
|
-
update: (_value: ViewUpdate) => boolean;
|
|
337
|
-
ready: (_value: {
|
|
338
|
-
view: EditorView_2;
|
|
339
|
-
state: EditorState;
|
|
340
|
-
container: HTMLElement;
|
|
341
|
-
}) => boolean;
|
|
342
|
-
focus: (_value: boolean) => boolean;
|
|
343
|
-
change: (_value: EditorState) => boolean;
|
|
344
|
-
destroy: () => boolean;
|
|
345
|
-
}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
346
|
-
readonly modelValue: {
|
|
347
|
-
readonly type: PropType<string | Text_2>;
|
|
348
|
-
readonly default: '';
|
|
349
|
-
};
|
|
350
|
-
readonly theme: {
|
|
351
|
-
readonly type: PropType<Record<string, StyleSpec>>;
|
|
352
|
-
readonly default: () => {};
|
|
353
|
-
};
|
|
354
|
-
readonly dark: {
|
|
355
|
-
readonly type: BooleanConstructor;
|
|
356
|
-
readonly default: false;
|
|
357
|
-
};
|
|
358
|
-
readonly basic: {
|
|
359
|
-
readonly type: BooleanConstructor;
|
|
360
|
-
readonly default: false;
|
|
361
|
-
};
|
|
362
|
-
readonly minimal: {
|
|
363
|
-
readonly type: BooleanConstructor;
|
|
364
|
-
readonly default: false;
|
|
365
|
-
};
|
|
366
|
-
readonly placeholder: {
|
|
367
|
-
readonly type: PropType<string | HTMLElement>;
|
|
368
|
-
readonly default: undefined;
|
|
369
|
-
};
|
|
370
|
-
readonly wrap: {
|
|
371
|
-
readonly type: BooleanConstructor;
|
|
372
|
-
readonly default: false;
|
|
373
|
-
};
|
|
374
|
-
readonly tab: {
|
|
375
|
-
readonly type: BooleanConstructor;
|
|
376
|
-
readonly default: false;
|
|
377
|
-
};
|
|
378
|
-
readonly indentUnit: {
|
|
379
|
-
readonly type: StringConstructor;
|
|
380
|
-
readonly default: undefined;
|
|
381
|
-
};
|
|
382
|
-
readonly allowMultipleSelections: {
|
|
383
|
-
readonly type: BooleanConstructor;
|
|
384
|
-
readonly default: false;
|
|
385
|
-
};
|
|
386
|
-
readonly tabSize: {
|
|
387
|
-
readonly type: NumberConstructor;
|
|
388
|
-
readonly default: undefined;
|
|
389
|
-
};
|
|
390
|
-
readonly lineSeparator: {
|
|
391
|
-
readonly type: StringConstructor;
|
|
392
|
-
readonly default: undefined;
|
|
393
|
-
};
|
|
394
|
-
readonly readonly: {
|
|
395
|
-
readonly type: BooleanConstructor;
|
|
396
|
-
readonly default: false;
|
|
397
|
-
};
|
|
398
|
-
readonly disabled: {
|
|
399
|
-
readonly type: BooleanConstructor;
|
|
400
|
-
readonly default: false;
|
|
401
|
-
};
|
|
402
|
-
readonly extensions: {
|
|
403
|
-
readonly type: PropType<Extension[]>;
|
|
404
|
-
readonly default: () => never[];
|
|
405
|
-
};
|
|
406
|
-
readonly phrases: {
|
|
407
|
-
readonly type: PropType<Record<string, string>>;
|
|
408
|
-
readonly default: undefined;
|
|
409
|
-
};
|
|
410
|
-
readonly lang: {
|
|
411
|
-
readonly type: PropType<LanguageSupport>;
|
|
412
|
-
readonly default: undefined;
|
|
413
|
-
};
|
|
414
|
-
readonly linter: {
|
|
415
|
-
readonly type: PropType<LintSource>;
|
|
416
|
-
readonly default: undefined;
|
|
417
|
-
};
|
|
418
|
-
readonly linterConfig: {
|
|
419
|
-
readonly type: ObjectConstructor;
|
|
420
|
-
readonly default: () => {};
|
|
421
|
-
};
|
|
422
|
-
readonly forceLinting: {
|
|
423
|
-
readonly type: BooleanConstructor;
|
|
424
|
-
readonly default: false;
|
|
425
|
-
};
|
|
426
|
-
readonly gutter: {
|
|
427
|
-
readonly type: BooleanConstructor;
|
|
428
|
-
readonly default: false;
|
|
429
|
-
};
|
|
430
|
-
readonly gutterConfig: {
|
|
431
|
-
readonly type: ObjectConstructor;
|
|
432
|
-
readonly default: undefined;
|
|
433
|
-
};
|
|
434
|
-
readonly tag: {
|
|
435
|
-
readonly type: StringConstructor;
|
|
436
|
-
readonly default: 'div';
|
|
437
|
-
};
|
|
438
|
-
readonly scrollIntoView: {
|
|
439
|
-
readonly type: BooleanConstructor;
|
|
440
|
-
readonly default: true;
|
|
441
|
-
};
|
|
442
|
-
readonly preserveScrollPosition: {
|
|
443
|
-
readonly type: BooleanConstructor;
|
|
444
|
-
readonly default: false;
|
|
445
|
-
};
|
|
446
|
-
readonly keymap: {
|
|
447
|
-
readonly type: PropType<KeyBinding[]>;
|
|
448
|
-
readonly default: () => never[];
|
|
449
|
-
};
|
|
450
|
-
}>> & Readonly<{
|
|
451
|
-
onChange?: ((_value: EditorState) => any) | undefined;
|
|
452
|
-
onDestroy?: (() => any) | undefined;
|
|
453
|
-
onFocus?: ((_value: boolean) => any) | undefined;
|
|
454
|
-
onReady?: ((_value: {
|
|
455
|
-
view: EditorView_2;
|
|
456
|
-
state: EditorState;
|
|
457
|
-
container: HTMLElement;
|
|
458
|
-
}) => any) | undefined;
|
|
459
|
-
onUpdate?: ((_value: ViewUpdate) => any) | undefined;
|
|
460
|
-
"onUpdate:modelValue"?: ((_value?: string | Text_2 | undefined) => any) | undefined;
|
|
461
|
-
}>, {
|
|
462
|
-
readonly modelValue: string | Text_2;
|
|
463
|
-
readonly theme: Record<string, StyleSpec>;
|
|
464
|
-
readonly dark: boolean;
|
|
465
|
-
readonly basic: boolean;
|
|
466
|
-
readonly minimal: boolean;
|
|
467
|
-
readonly placeholder: string | HTMLElement;
|
|
468
|
-
readonly wrap: boolean;
|
|
469
|
-
readonly tab: boolean;
|
|
470
|
-
readonly indentUnit: string;
|
|
471
|
-
readonly allowMultipleSelections: boolean;
|
|
472
|
-
readonly tabSize: number;
|
|
473
|
-
readonly lineSeparator: string;
|
|
474
|
-
readonly readonly: boolean;
|
|
475
|
-
readonly disabled: boolean;
|
|
476
|
-
readonly extensions: Extension[];
|
|
477
|
-
readonly phrases: Record<string, string>;
|
|
478
|
-
readonly lang: LanguageSupport;
|
|
479
|
-
readonly linter: LintSource;
|
|
480
|
-
readonly linterConfig: Record<string, any>;
|
|
481
|
-
readonly forceLinting: boolean;
|
|
482
|
-
readonly gutter: boolean;
|
|
483
|
-
readonly gutterConfig: Record<string, any>;
|
|
484
|
-
readonly tag: string;
|
|
485
|
-
readonly scrollIntoView: boolean;
|
|
486
|
-
readonly preserveScrollPosition: boolean;
|
|
487
|
-
readonly keymap: KeyBinding[];
|
|
488
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
489
|
-
export default component;
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* Vue plugin install function that registers the CodeMirror component globally.
|
|
493
|
-
*
|
|
494
|
-
* @param app - Vue application instance.
|
|
495
|
-
*/
|
|
496
|
-
export declare const install: (app: App) => void;
|
|
497
|
-
|
|
498
|
-
/** Build information meta data */
|
|
499
|
-
export declare type Meta = {
|
|
500
|
-
/** Version */
|
|
501
|
-
version: string;
|
|
502
|
-
/** Build date */
|
|
503
|
-
date: string;
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
export declare const Meta: Meta = {
|
|
507
|
-
version: import.meta.env.APP_VERSION,
|
|
508
|
-
date: import.meta.env.BUILD_DATE,
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
export { }
|
|
11
|
+
import { type App } from 'vue-demi';
|
|
12
|
+
import { Meta } from './types/Meta.js';
|
|
13
|
+
/** CodeMirror Component */
|
|
14
|
+
declare const component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
15
|
+
readonly modelValue: {
|
|
16
|
+
readonly type: import("vue").PropType<string | import("@codemirror/state").Text>;
|
|
17
|
+
readonly default: '';
|
|
18
|
+
};
|
|
19
|
+
readonly theme: {
|
|
20
|
+
readonly type: import("vue").PropType<Record<string, import("style-mod").StyleSpec>>;
|
|
21
|
+
readonly default: () => {};
|
|
22
|
+
};
|
|
23
|
+
readonly dark: {
|
|
24
|
+
readonly type: BooleanConstructor;
|
|
25
|
+
readonly default: false;
|
|
26
|
+
};
|
|
27
|
+
readonly basic: {
|
|
28
|
+
readonly type: BooleanConstructor;
|
|
29
|
+
readonly default: false;
|
|
30
|
+
};
|
|
31
|
+
readonly minimal: {
|
|
32
|
+
readonly type: BooleanConstructor;
|
|
33
|
+
readonly default: false;
|
|
34
|
+
};
|
|
35
|
+
readonly placeholder: {
|
|
36
|
+
readonly type: import("vue").PropType<string | HTMLElement>;
|
|
37
|
+
readonly default: undefined;
|
|
38
|
+
};
|
|
39
|
+
readonly wrap: {
|
|
40
|
+
readonly type: BooleanConstructor;
|
|
41
|
+
readonly default: false;
|
|
42
|
+
};
|
|
43
|
+
readonly tab: {
|
|
44
|
+
readonly type: BooleanConstructor;
|
|
45
|
+
readonly default: false;
|
|
46
|
+
};
|
|
47
|
+
readonly indentUnit: {
|
|
48
|
+
readonly type: StringConstructor;
|
|
49
|
+
readonly default: undefined;
|
|
50
|
+
};
|
|
51
|
+
readonly allowMultipleSelections: {
|
|
52
|
+
readonly type: BooleanConstructor;
|
|
53
|
+
readonly default: false;
|
|
54
|
+
};
|
|
55
|
+
readonly tabSize: {
|
|
56
|
+
readonly type: NumberConstructor;
|
|
57
|
+
readonly default: undefined;
|
|
58
|
+
};
|
|
59
|
+
readonly lineSeparator: {
|
|
60
|
+
readonly type: StringConstructor;
|
|
61
|
+
readonly default: undefined;
|
|
62
|
+
};
|
|
63
|
+
readonly readonly: {
|
|
64
|
+
readonly type: BooleanConstructor;
|
|
65
|
+
readonly default: false;
|
|
66
|
+
};
|
|
67
|
+
readonly disabled: {
|
|
68
|
+
readonly type: BooleanConstructor;
|
|
69
|
+
readonly default: false;
|
|
70
|
+
};
|
|
71
|
+
readonly extensions: {
|
|
72
|
+
readonly type: import("vue").PropType<import("@codemirror/state").Extension[]>;
|
|
73
|
+
readonly default: () => never[];
|
|
74
|
+
};
|
|
75
|
+
readonly phrases: {
|
|
76
|
+
readonly type: import("vue").PropType<Record<string, string>>;
|
|
77
|
+
readonly default: undefined;
|
|
78
|
+
};
|
|
79
|
+
readonly lang: {
|
|
80
|
+
readonly type: import("vue").PropType<import("@codemirror/language").LanguageSupport>;
|
|
81
|
+
readonly default: undefined;
|
|
82
|
+
};
|
|
83
|
+
readonly linter: {
|
|
84
|
+
readonly type: import("vue").PropType<import("@codemirror/lint").LintSource>;
|
|
85
|
+
readonly default: undefined;
|
|
86
|
+
};
|
|
87
|
+
readonly linterConfig: {
|
|
88
|
+
readonly type: ObjectConstructor;
|
|
89
|
+
readonly default: () => {};
|
|
90
|
+
};
|
|
91
|
+
readonly forceLinting: {
|
|
92
|
+
readonly type: BooleanConstructor;
|
|
93
|
+
readonly default: false;
|
|
94
|
+
};
|
|
95
|
+
readonly gutter: {
|
|
96
|
+
readonly type: BooleanConstructor;
|
|
97
|
+
readonly default: false;
|
|
98
|
+
};
|
|
99
|
+
readonly gutterConfig: {
|
|
100
|
+
readonly type: ObjectConstructor;
|
|
101
|
+
readonly default: undefined;
|
|
102
|
+
};
|
|
103
|
+
readonly tag: {
|
|
104
|
+
readonly type: StringConstructor;
|
|
105
|
+
readonly default: 'div';
|
|
106
|
+
};
|
|
107
|
+
readonly scrollIntoView: {
|
|
108
|
+
readonly type: BooleanConstructor;
|
|
109
|
+
readonly default: true;
|
|
110
|
+
};
|
|
111
|
+
readonly preserveScrollPosition: {
|
|
112
|
+
readonly type: BooleanConstructor;
|
|
113
|
+
readonly default: false;
|
|
114
|
+
};
|
|
115
|
+
readonly keymap: {
|
|
116
|
+
readonly type: import("vue").PropType<import("@codemirror/view").KeyBinding[]>;
|
|
117
|
+
readonly default: () => never[];
|
|
118
|
+
};
|
|
119
|
+
}>, {
|
|
120
|
+
editor: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
121
|
+
view: import("vue").ShallowRef<import("codemirror").EditorView | undefined>;
|
|
122
|
+
cursor: import("vue").WritableComputedRef<number, number>;
|
|
123
|
+
selection: import("vue").WritableComputedRef<import("@codemirror/state").EditorSelection | undefined, import("@codemirror/state").EditorSelection | undefined>;
|
|
124
|
+
focus: import("vue").WritableComputedRef<boolean, boolean>;
|
|
125
|
+
length: import("vue").Ref<number, number>;
|
|
126
|
+
json: import("vue").WritableComputedRef<Record<string, import("@codemirror/state").StateField<unknown>> | undefined, Record<string, import("@codemirror/state").StateField<unknown>> | undefined>;
|
|
127
|
+
diagnosticCount: import("vue").Ref<number, number>;
|
|
128
|
+
dom: HTMLElement | undefined;
|
|
129
|
+
lint: () => void;
|
|
130
|
+
forceReconfigure: () => void;
|
|
131
|
+
getRange: (from?: number, to?: number) => string | undefined;
|
|
132
|
+
getLine: (number: number) => string | undefined;
|
|
133
|
+
lineCount: () => number;
|
|
134
|
+
getCursor: () => number;
|
|
135
|
+
listSelections: () => readonly import("@codemirror/state").SelectionRange[];
|
|
136
|
+
getSelection: () => string;
|
|
137
|
+
getSelections: () => string[];
|
|
138
|
+
somethingSelected: () => boolean;
|
|
139
|
+
replaceRange: (replacement: string | import("@codemirror/state").Text, from: number, to: number) => void;
|
|
140
|
+
replaceSelection: (replacement: string | import("@codemirror/state").Text) => void;
|
|
141
|
+
setCursor: (position: number) => void;
|
|
142
|
+
setSelection: (anchor: number, head?: number) => void;
|
|
143
|
+
setSelections: (ranges: readonly import("@codemirror/state").SelectionRange[], primary?: number) => void;
|
|
144
|
+
extendSelectionsBy: (f: (range: import("@codemirror/state").SelectionRange) => number) => void;
|
|
145
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
146
|
+
'update:modelValue': (_value?: string | import("@codemirror/state").Text) => boolean;
|
|
147
|
+
update: (_value: import("@codemirror/view").ViewUpdate) => boolean;
|
|
148
|
+
ready: (_value: {
|
|
149
|
+
view: import("codemirror").EditorView;
|
|
150
|
+
state: import("@codemirror/state").EditorState;
|
|
151
|
+
container: HTMLElement;
|
|
152
|
+
}) => boolean;
|
|
153
|
+
focus: (_value: boolean) => boolean;
|
|
154
|
+
change: (_value: import("@codemirror/state").EditorState) => boolean;
|
|
155
|
+
destroy: () => boolean;
|
|
156
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
157
|
+
readonly modelValue: {
|
|
158
|
+
readonly type: import("vue").PropType<string | import("@codemirror/state").Text>;
|
|
159
|
+
readonly default: '';
|
|
160
|
+
};
|
|
161
|
+
readonly theme: {
|
|
162
|
+
readonly type: import("vue").PropType<Record<string, import("style-mod").StyleSpec>>;
|
|
163
|
+
readonly default: () => {};
|
|
164
|
+
};
|
|
165
|
+
readonly dark: {
|
|
166
|
+
readonly type: BooleanConstructor;
|
|
167
|
+
readonly default: false;
|
|
168
|
+
};
|
|
169
|
+
readonly basic: {
|
|
170
|
+
readonly type: BooleanConstructor;
|
|
171
|
+
readonly default: false;
|
|
172
|
+
};
|
|
173
|
+
readonly minimal: {
|
|
174
|
+
readonly type: BooleanConstructor;
|
|
175
|
+
readonly default: false;
|
|
176
|
+
};
|
|
177
|
+
readonly placeholder: {
|
|
178
|
+
readonly type: import("vue").PropType<string | HTMLElement>;
|
|
179
|
+
readonly default: undefined;
|
|
180
|
+
};
|
|
181
|
+
readonly wrap: {
|
|
182
|
+
readonly type: BooleanConstructor;
|
|
183
|
+
readonly default: false;
|
|
184
|
+
};
|
|
185
|
+
readonly tab: {
|
|
186
|
+
readonly type: BooleanConstructor;
|
|
187
|
+
readonly default: false;
|
|
188
|
+
};
|
|
189
|
+
readonly indentUnit: {
|
|
190
|
+
readonly type: StringConstructor;
|
|
191
|
+
readonly default: undefined;
|
|
192
|
+
};
|
|
193
|
+
readonly allowMultipleSelections: {
|
|
194
|
+
readonly type: BooleanConstructor;
|
|
195
|
+
readonly default: false;
|
|
196
|
+
};
|
|
197
|
+
readonly tabSize: {
|
|
198
|
+
readonly type: NumberConstructor;
|
|
199
|
+
readonly default: undefined;
|
|
200
|
+
};
|
|
201
|
+
readonly lineSeparator: {
|
|
202
|
+
readonly type: StringConstructor;
|
|
203
|
+
readonly default: undefined;
|
|
204
|
+
};
|
|
205
|
+
readonly readonly: {
|
|
206
|
+
readonly type: BooleanConstructor;
|
|
207
|
+
readonly default: false;
|
|
208
|
+
};
|
|
209
|
+
readonly disabled: {
|
|
210
|
+
readonly type: BooleanConstructor;
|
|
211
|
+
readonly default: false;
|
|
212
|
+
};
|
|
213
|
+
readonly extensions: {
|
|
214
|
+
readonly type: import("vue").PropType<import("@codemirror/state").Extension[]>;
|
|
215
|
+
readonly default: () => never[];
|
|
216
|
+
};
|
|
217
|
+
readonly phrases: {
|
|
218
|
+
readonly type: import("vue").PropType<Record<string, string>>;
|
|
219
|
+
readonly default: undefined;
|
|
220
|
+
};
|
|
221
|
+
readonly lang: {
|
|
222
|
+
readonly type: import("vue").PropType<import("@codemirror/language").LanguageSupport>;
|
|
223
|
+
readonly default: undefined;
|
|
224
|
+
};
|
|
225
|
+
readonly linter: {
|
|
226
|
+
readonly type: import("vue").PropType<import("@codemirror/lint").LintSource>;
|
|
227
|
+
readonly default: undefined;
|
|
228
|
+
};
|
|
229
|
+
readonly linterConfig: {
|
|
230
|
+
readonly type: ObjectConstructor;
|
|
231
|
+
readonly default: () => {};
|
|
232
|
+
};
|
|
233
|
+
readonly forceLinting: {
|
|
234
|
+
readonly type: BooleanConstructor;
|
|
235
|
+
readonly default: false;
|
|
236
|
+
};
|
|
237
|
+
readonly gutter: {
|
|
238
|
+
readonly type: BooleanConstructor;
|
|
239
|
+
readonly default: false;
|
|
240
|
+
};
|
|
241
|
+
readonly gutterConfig: {
|
|
242
|
+
readonly type: ObjectConstructor;
|
|
243
|
+
readonly default: undefined;
|
|
244
|
+
};
|
|
245
|
+
readonly tag: {
|
|
246
|
+
readonly type: StringConstructor;
|
|
247
|
+
readonly default: 'div';
|
|
248
|
+
};
|
|
249
|
+
readonly scrollIntoView: {
|
|
250
|
+
readonly type: BooleanConstructor;
|
|
251
|
+
readonly default: true;
|
|
252
|
+
};
|
|
253
|
+
readonly preserveScrollPosition: {
|
|
254
|
+
readonly type: BooleanConstructor;
|
|
255
|
+
readonly default: false;
|
|
256
|
+
};
|
|
257
|
+
readonly keymap: {
|
|
258
|
+
readonly type: import("vue").PropType<import("@codemirror/view").KeyBinding[]>;
|
|
259
|
+
readonly default: () => never[];
|
|
260
|
+
};
|
|
261
|
+
}>> & Readonly<{
|
|
262
|
+
onChange?: ((_value: import("@codemirror/state").EditorState) => any) | undefined;
|
|
263
|
+
onDestroy?: (() => any) | undefined;
|
|
264
|
+
onFocus?: ((_value: boolean) => any) | undefined;
|
|
265
|
+
onReady?: ((_value: {
|
|
266
|
+
view: import("codemirror").EditorView;
|
|
267
|
+
state: import("@codemirror/state").EditorState;
|
|
268
|
+
container: HTMLElement;
|
|
269
|
+
}) => any) | undefined;
|
|
270
|
+
onUpdate?: ((_value: import("@codemirror/view").ViewUpdate) => any) | undefined;
|
|
271
|
+
"onUpdate:modelValue"?: ((_value?: string | import("@codemirror/state").Text | undefined) => any) | undefined;
|
|
272
|
+
}>, {
|
|
273
|
+
readonly modelValue: string | import("@codemirror/state").Text;
|
|
274
|
+
readonly theme: Record<string, import("style-mod").StyleSpec>;
|
|
275
|
+
readonly dark: boolean;
|
|
276
|
+
readonly basic: boolean;
|
|
277
|
+
readonly minimal: boolean;
|
|
278
|
+
readonly placeholder: string | HTMLElement;
|
|
279
|
+
readonly wrap: boolean;
|
|
280
|
+
readonly tab: boolean;
|
|
281
|
+
readonly indentUnit: string;
|
|
282
|
+
readonly allowMultipleSelections: boolean;
|
|
283
|
+
readonly tabSize: number;
|
|
284
|
+
readonly lineSeparator: string;
|
|
285
|
+
readonly readonly: boolean;
|
|
286
|
+
readonly disabled: boolean;
|
|
287
|
+
readonly extensions: import("@codemirror/state").Extension[];
|
|
288
|
+
readonly phrases: Record<string, string>;
|
|
289
|
+
readonly lang: import("@codemirror/language").LanguageSupport;
|
|
290
|
+
readonly linter: import("@codemirror/lint").LintSource;
|
|
291
|
+
readonly linterConfig: Record<string, any>;
|
|
292
|
+
readonly forceLinting: boolean;
|
|
293
|
+
readonly gutter: boolean;
|
|
294
|
+
readonly gutterConfig: Record<string, any>;
|
|
295
|
+
readonly tag: string;
|
|
296
|
+
readonly scrollIntoView: boolean;
|
|
297
|
+
readonly preserveScrollPosition: boolean;
|
|
298
|
+
readonly keymap: import("@codemirror/view").KeyBinding[];
|
|
299
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
300
|
+
/**
|
|
301
|
+
* Vue plugin install function that registers the CodeMirror component globally.
|
|
302
|
+
*
|
|
303
|
+
* @param app - Vue application instance.
|
|
304
|
+
*/
|
|
305
|
+
declare const installCodeMirror: (app: App) => void;
|
|
306
|
+
export type { CodeMirrorExposed } from './types/CodeMirrorExposed.js';
|
|
307
|
+
export { component as default, installCodeMirror as install, Meta };
|