vue-codemirror6 1.6.1 → 1.7.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.ja.md +60 -66
- package/README.md +77 -69
- package/dist/index.d.ts +510 -718
- package/dist/index.es.js +371 -369
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +9 -498
- package/package.json +82 -88
- package/CHANGELOG.md +0 -332
- package/dist/index.cjs +0 -461
- package/dist/index.cjs.map +0 -1
- package/dist/index.umd.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,719 +1,511 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* vue-codemirror6
|
|
3
|
+
*
|
|
4
|
+
* @description CodeMirror6 Component for vue2 and vue3.
|
|
5
|
+
* @author Logue <logue@hotmail.co.jp>
|
|
6
|
+
* @license MIT
|
|
7
|
+
* @version 1.7.0
|
|
8
|
+
* @see {@link https://github.com/logue/vue-codemirror6}
|
|
9
|
+
*/
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
|
|
206
|
-
|
|
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
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
};
|
|
510
|
-
/**
|
|
511
|
-
* Language Phreses
|
|
512
|
-
*
|
|
513
|
-
* This is a CodeMirror Facet that allows you to define custom phrases for the editor.
|
|
514
|
-
* It can be used to override default phrases or add new ones.
|
|
515
|
-
* This is useful for translating the editor to different languages or for customizing the editor's UI.
|
|
516
|
-
*
|
|
517
|
-
* @see {@link https://codemirror.net/examples/translate/}
|
|
518
|
-
*/
|
|
519
|
-
phrases: {
|
|
520
|
-
type: PropType<Record<string, string>>;
|
|
521
|
-
default: undefined;
|
|
522
|
-
};
|
|
523
|
-
/**
|
|
524
|
-
* CodeMirror Language
|
|
525
|
-
*
|
|
526
|
-
* This is a CodeMirror Facet that allows you to define the language of the editor.
|
|
527
|
-
* It can be used to enable syntax highlighting and other language-specific features.
|
|
528
|
-
* It is useful for displaying code in a specific language, such as JavaScript, Python, or HTML.
|
|
529
|
-
*
|
|
530
|
-
* @see {@link https://codemirror.net/docs/ref/#language}
|
|
531
|
-
*/
|
|
532
|
-
lang: {
|
|
533
|
-
type: PropType<LanguageSupport>;
|
|
534
|
-
default: undefined;
|
|
535
|
-
};
|
|
536
|
-
/**
|
|
537
|
-
* CodeMirror Linter
|
|
538
|
-
*
|
|
539
|
-
* This is a CodeMirror Facet that allows you to define a linter for the editor.
|
|
540
|
-
* It can be used to check the code for errors and warnings, and to provide feedback to the user.
|
|
541
|
-
* It is useful for displaying code in a specific language, such as JavaScript, Python, or HTML.
|
|
542
|
-
* This is useful for providing feedback to the user about the code they are writing.
|
|
543
|
-
*
|
|
544
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.linter}
|
|
545
|
-
*/
|
|
546
|
-
linter: {
|
|
547
|
-
type: PropType<LintSource>;
|
|
548
|
-
default: undefined;
|
|
549
|
-
};
|
|
550
|
-
/**
|
|
551
|
-
* Linter Config
|
|
552
|
-
*
|
|
553
|
-
* This is a CodeMirror Facet that allows you to define the configuration for the linter.
|
|
554
|
-
* It can be used to specify options for the linter, such as the severity of errors and warnings, and to customize the behavior of the linter.
|
|
555
|
-
* This is useful for providing feedback to the user about the code they are writing.
|
|
556
|
-
*
|
|
557
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.linter^config}
|
|
558
|
-
*/
|
|
559
|
-
linterConfig: {
|
|
560
|
-
type: ObjectConstructor;
|
|
561
|
-
default: () => {};
|
|
562
|
-
};
|
|
563
|
-
/**
|
|
564
|
-
* Forces any linters configured to run when the editor is idle to run right away.
|
|
565
|
-
*
|
|
566
|
-
* This is useful for running linters on the initial load of the editor, or when the user has made changes to the code and wants to see the results immediately.
|
|
567
|
-
*
|
|
568
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.forceLinting}
|
|
569
|
-
*/
|
|
570
|
-
forceLinting: {
|
|
571
|
-
type: BooleanConstructor;
|
|
572
|
-
default: boolean;
|
|
573
|
-
};
|
|
574
|
-
/**
|
|
575
|
-
* Show Linter Gutter
|
|
576
|
-
*
|
|
577
|
-
* An area to 🔴 the lines with errors will be displayed.
|
|
578
|
-
* This feature is not enabled if `linter` is not specified.
|
|
579
|
-
*
|
|
580
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.lintGutter}
|
|
581
|
-
*/
|
|
582
|
-
gutter: {
|
|
583
|
-
type: BooleanConstructor;
|
|
584
|
-
default: boolean;
|
|
585
|
-
};
|
|
586
|
-
/**
|
|
587
|
-
* Gutter Config
|
|
588
|
-
*
|
|
589
|
-
* This is a CodeMirror Facet that allows you to define the configuration for the gutter.
|
|
590
|
-
* It can be used to specify options for the gutter, such as the size of the gutter, the position of the gutter, and to customize the behavior of the gutter.
|
|
591
|
-
* This is useful for providing feedback to the user about the code they are writing.
|
|
592
|
-
*
|
|
593
|
-
* @see {@link https://codemirror.net/docs/ref/#lint.lintGutter^config}
|
|
594
|
-
*/
|
|
595
|
-
gutterConfig: {
|
|
596
|
-
type: ObjectConstructor;
|
|
597
|
-
default: undefined;
|
|
598
|
-
};
|
|
599
|
-
/**
|
|
600
|
-
* Using tag
|
|
601
|
-
*/
|
|
602
|
-
tag: {
|
|
603
|
-
type: StringConstructor;
|
|
604
|
-
default: string;
|
|
605
|
-
};
|
|
606
|
-
/**
|
|
607
|
-
* Allows an external update to scroll the form.
|
|
608
|
-
*
|
|
609
|
-
* This is useful for scrolling the editor to a specific position when the user has made changes to the code and wants to see the results immediately.
|
|
610
|
-
* If this is set to true, the editor will scroll to the position specified in the transaction.
|
|
611
|
-
* If this is set to false, the editor will not scroll to the position specified in the transaction.
|
|
612
|
-
*
|
|
613
|
-
* @see {@link https://codemirror.net/docs/ref/#state.TransactionSpec.scrollIntoView}
|
|
614
|
-
*/
|
|
615
|
-
scrollIntoView: {
|
|
616
|
-
type: BooleanConstructor;
|
|
617
|
-
default: boolean;
|
|
618
|
-
};
|
|
619
|
-
/**
|
|
620
|
-
* Preserve the current scroll position on external updates.
|
|
621
|
-
*
|
|
622
|
-
* This keeps the editor's own scroll container from jumping when
|
|
623
|
-
* `modelValue` is updated from outside the component.
|
|
624
|
-
*
|
|
625
|
-
* @see {@link https://codemirror.net/docs/ref/#view.EditorView.scrollSnapshot}
|
|
626
|
-
*/
|
|
627
|
-
preserveScrollPosition: {
|
|
628
|
-
type: BooleanConstructor;
|
|
629
|
-
default: boolean;
|
|
630
|
-
};
|
|
631
|
-
/**
|
|
632
|
-
* Key map
|
|
633
|
-
* This is a CodeMirror Facet that allows you to define custom key bindings.
|
|
634
|
-
* It can be used to override default key bindings or add new ones.
|
|
635
|
-
*
|
|
636
|
-
* @see {@link https://codemirror.net/docs/ref/#view.keymap}
|
|
637
|
-
*/
|
|
638
|
-
keymap: {
|
|
639
|
-
type: PropType<KeyBinding[]>;
|
|
640
|
-
default: () => never[];
|
|
641
|
-
};
|
|
642
|
-
}>> & Readonly<{
|
|
643
|
-
onChange?: ((_value: EditorState) => any) | undefined;
|
|
644
|
-
onFocus?: ((_value: boolean) => any) | undefined;
|
|
645
|
-
"onUpdate:modelValue"?: ((_value?: string | Text$1 | undefined) => any) | undefined;
|
|
646
|
-
onUpdate?: ((_value: ViewUpdate) => any) | undefined;
|
|
647
|
-
onReady?: ((_value: {
|
|
648
|
-
view: EditorView;
|
|
649
|
-
state: EditorState;
|
|
650
|
-
container: HTMLElement;
|
|
651
|
-
}) => any) | undefined;
|
|
652
|
-
onDestroy?: (() => any) | undefined;
|
|
653
|
-
}>, {
|
|
654
|
-
modelValue: string | Text$1;
|
|
655
|
-
theme: Record<string, StyleSpec>;
|
|
656
|
-
dark: boolean;
|
|
657
|
-
basic: boolean;
|
|
658
|
-
minimal: boolean;
|
|
659
|
-
placeholder: string | HTMLElement;
|
|
660
|
-
wrap: boolean;
|
|
661
|
-
tab: boolean;
|
|
662
|
-
indentUnit: string;
|
|
663
|
-
allowMultipleSelections: boolean;
|
|
664
|
-
tabSize: number;
|
|
665
|
-
lineSeparator: string;
|
|
666
|
-
readonly: boolean;
|
|
667
|
-
disabled: boolean;
|
|
668
|
-
extensions: Extension[];
|
|
669
|
-
phrases: Record<string, string>;
|
|
670
|
-
lang: LanguageSupport;
|
|
671
|
-
linter: LintSource;
|
|
672
|
-
linterConfig: Record<string, any>;
|
|
673
|
-
forceLinting: boolean;
|
|
674
|
-
gutter: boolean;
|
|
675
|
-
gutterConfig: Record<string, any>;
|
|
676
|
-
tag: string;
|
|
677
|
-
scrollIntoView: boolean;
|
|
678
|
-
preserveScrollPosition: boolean;
|
|
679
|
-
keymap: KeyBinding[];
|
|
680
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
681
|
-
declare const installCodeMirror: (app: App) => void;
|
|
682
|
-
/** Public API exposed from the CodeMirror component instance.
|
|
683
|
-
* Note: Vue 3 auto-unwraps refs on the component instance proxy,
|
|
684
|
-
* so reactive refs appear as their underlying value types here.
|
|
685
|
-
*/
|
|
686
|
-
export type CodeMirrorExposed = {
|
|
687
|
-
editor: HTMLElement | undefined;
|
|
688
|
-
view: EditorView | undefined;
|
|
689
|
-
cursor: number;
|
|
690
|
-
selection: EditorSelection | undefined;
|
|
691
|
-
focus: boolean;
|
|
692
|
-
length: number;
|
|
693
|
-
json: Record<string, StateField<unknown>> | undefined;
|
|
694
|
-
diagnosticCount: number;
|
|
695
|
-
dom: Element | undefined;
|
|
696
|
-
lint: () => void;
|
|
697
|
-
forceReconfigure: () => void;
|
|
698
|
-
getRange: (from?: number, to?: number) => string | undefined;
|
|
699
|
-
getLine: (number: number) => string | undefined;
|
|
700
|
-
lineCount: () => number;
|
|
701
|
-
getCursor: () => number;
|
|
702
|
-
listSelections: () => readonly SelectionRange[];
|
|
703
|
-
getSelection: () => string;
|
|
704
|
-
getSelections: () => string[];
|
|
705
|
-
somethingSelected: () => boolean;
|
|
706
|
-
replaceRange: (replacement: string | Text$1, from: number, to: number) => void;
|
|
707
|
-
replaceSelection: (replacement: string | Text$1) => void;
|
|
708
|
-
setCursor: (position: number) => void;
|
|
709
|
-
setSelection: (anchor: number, head?: number) => void;
|
|
710
|
-
setSelections: (ranges: readonly SelectionRange[], primary?: number) => void;
|
|
711
|
-
extendSelectionsBy: (f: (range: SelectionRange) => number) => void;
|
|
712
|
-
};
|
|
713
|
-
|
|
714
|
-
export {
|
|
715
|
-
CodeMirror as default,
|
|
716
|
-
installCodeMirror as install,
|
|
717
|
-
};
|
|
718
|
-
|
|
719
|
-
export {};
|
|
11
|
+
import { App } from 'vue-demi';
|
|
12
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
13
|
+
import { ComponentProvideOptions } from 'vue';
|
|
14
|
+
import { DefineComponent } from 'vue';
|
|
15
|
+
import { EditorSelection } from '@codemirror/state';
|
|
16
|
+
import { EditorState } from '@codemirror/state';
|
|
17
|
+
import type { EditorView } from '@codemirror/view';
|
|
18
|
+
import { EditorView as EditorView_2 } from 'codemirror';
|
|
19
|
+
import { Extension } from '@codemirror/state';
|
|
20
|
+
import { ExtractPropTypes } from 'vue';
|
|
21
|
+
import { KeyBinding } from '@codemirror/view';
|
|
22
|
+
import { LanguageSupport } from '@codemirror/language';
|
|
23
|
+
import { LintSource } from '@codemirror/lint';
|
|
24
|
+
import { PropType } from 'vue';
|
|
25
|
+
import { PublicProps } from 'vue';
|
|
26
|
+
import { Ref } from 'vue';
|
|
27
|
+
import { SelectionRange } from '@codemirror/state';
|
|
28
|
+
import { ShallowRef } from 'vue';
|
|
29
|
+
import { StateField } from '@codemirror/state';
|
|
30
|
+
import { StyleSpec } from 'style-mod';
|
|
31
|
+
import { Text as Text_2 } from '@codemirror/state';
|
|
32
|
+
import { ViewUpdate } from '@codemirror/view';
|
|
33
|
+
import { VueElementConstructor } from 'vue';
|
|
34
|
+
import { WritableComputedRef } from 'vue';
|
|
35
|
+
|
|
36
|
+
export declare const CodeMirror: VueElementConstructor<ExtractPropTypes< {
|
|
37
|
+
readonly modelValue: {
|
|
38
|
+
readonly type: PropType<string | Text_2>;
|
|
39
|
+
readonly default: '';
|
|
40
|
+
};
|
|
41
|
+
readonly theme: {
|
|
42
|
+
readonly type: PropType<Record<string, StyleSpec>>;
|
|
43
|
+
readonly default: () => {};
|
|
44
|
+
};
|
|
45
|
+
readonly dark: {
|
|
46
|
+
readonly type: BooleanConstructor;
|
|
47
|
+
readonly default: false;
|
|
48
|
+
};
|
|
49
|
+
readonly basic: {
|
|
50
|
+
readonly type: BooleanConstructor;
|
|
51
|
+
readonly default: false;
|
|
52
|
+
};
|
|
53
|
+
readonly minimal: {
|
|
54
|
+
readonly type: BooleanConstructor;
|
|
55
|
+
readonly default: false;
|
|
56
|
+
};
|
|
57
|
+
readonly placeholder: {
|
|
58
|
+
readonly type: PropType<string | HTMLElement>;
|
|
59
|
+
readonly default: undefined;
|
|
60
|
+
};
|
|
61
|
+
readonly wrap: {
|
|
62
|
+
readonly type: BooleanConstructor;
|
|
63
|
+
readonly default: false;
|
|
64
|
+
};
|
|
65
|
+
readonly tab: {
|
|
66
|
+
readonly type: BooleanConstructor;
|
|
67
|
+
readonly default: false;
|
|
68
|
+
};
|
|
69
|
+
readonly indentUnit: {
|
|
70
|
+
readonly type: StringConstructor;
|
|
71
|
+
readonly default: undefined;
|
|
72
|
+
};
|
|
73
|
+
readonly allowMultipleSelections: {
|
|
74
|
+
readonly type: BooleanConstructor;
|
|
75
|
+
readonly default: false;
|
|
76
|
+
};
|
|
77
|
+
readonly tabSize: {
|
|
78
|
+
readonly type: NumberConstructor;
|
|
79
|
+
readonly default: undefined;
|
|
80
|
+
};
|
|
81
|
+
readonly lineSeparator: {
|
|
82
|
+
readonly type: StringConstructor;
|
|
83
|
+
readonly default: undefined;
|
|
84
|
+
};
|
|
85
|
+
readonly readonly: {
|
|
86
|
+
readonly type: BooleanConstructor;
|
|
87
|
+
readonly default: false;
|
|
88
|
+
};
|
|
89
|
+
readonly disabled: {
|
|
90
|
+
readonly type: BooleanConstructor;
|
|
91
|
+
readonly default: false;
|
|
92
|
+
};
|
|
93
|
+
readonly extensions: {
|
|
94
|
+
readonly type: PropType<Extension[]>;
|
|
95
|
+
readonly default: () => never[];
|
|
96
|
+
};
|
|
97
|
+
readonly phrases: {
|
|
98
|
+
readonly type: PropType<Record<string, string>>;
|
|
99
|
+
readonly default: undefined;
|
|
100
|
+
};
|
|
101
|
+
readonly lang: {
|
|
102
|
+
readonly type: PropType<LanguageSupport>;
|
|
103
|
+
readonly default: undefined;
|
|
104
|
+
};
|
|
105
|
+
readonly linter: {
|
|
106
|
+
readonly type: PropType<LintSource>;
|
|
107
|
+
readonly default: undefined;
|
|
108
|
+
};
|
|
109
|
+
readonly linterConfig: {
|
|
110
|
+
readonly type: ObjectConstructor;
|
|
111
|
+
readonly default: () => {};
|
|
112
|
+
};
|
|
113
|
+
readonly forceLinting: {
|
|
114
|
+
readonly type: BooleanConstructor;
|
|
115
|
+
readonly default: false;
|
|
116
|
+
};
|
|
117
|
+
readonly gutter: {
|
|
118
|
+
readonly type: BooleanConstructor;
|
|
119
|
+
readonly default: false;
|
|
120
|
+
};
|
|
121
|
+
readonly gutterConfig: {
|
|
122
|
+
readonly type: ObjectConstructor;
|
|
123
|
+
readonly default: undefined;
|
|
124
|
+
};
|
|
125
|
+
readonly tag: {
|
|
126
|
+
readonly type: StringConstructor;
|
|
127
|
+
readonly default: 'div';
|
|
128
|
+
};
|
|
129
|
+
readonly scrollIntoView: {
|
|
130
|
+
readonly type: BooleanConstructor;
|
|
131
|
+
readonly default: true;
|
|
132
|
+
};
|
|
133
|
+
readonly preserveScrollPosition: {
|
|
134
|
+
readonly type: BooleanConstructor;
|
|
135
|
+
readonly default: false;
|
|
136
|
+
};
|
|
137
|
+
readonly keymap: {
|
|
138
|
+
readonly type: PropType<KeyBinding[]>;
|
|
139
|
+
readonly default: () => never[];
|
|
140
|
+
};
|
|
141
|
+
}>>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Public API exposed from the CodeMirror component instance.
|
|
145
|
+
*
|
|
146
|
+
* Note: Vue 3 auto-unwraps refs on the component instance proxy,
|
|
147
|
+
* so reactive refs appear as their underlying value types here.
|
|
148
|
+
*/
|
|
149
|
+
export declare type CodeMirrorExposed = {
|
|
150
|
+
/** Editor DOM element. */
|
|
151
|
+
editor: HTMLElement | undefined;
|
|
152
|
+
/** CodeMirror Editor View. @see {@link https://codemirror.net/docs/ref/#view.EditorView} */
|
|
153
|
+
view: EditorView | undefined;
|
|
154
|
+
/** Cursor position. */
|
|
155
|
+
cursor: number;
|
|
156
|
+
/** Editor selection. @see {@link https://codemirror.net/docs/ref/#state.EditorSelection} */
|
|
157
|
+
selection: EditorSelection | undefined;
|
|
158
|
+
/** Whether the editor has focus. @see {@link https://codemirror.net/docs/ref/#view.EditorView.hasFocus} */
|
|
159
|
+
focus: boolean;
|
|
160
|
+
/** Document text length. */
|
|
161
|
+
length: number;
|
|
162
|
+
/** Serialized editor state. */
|
|
163
|
+
json: Record<string, StateField<unknown>> | undefined;
|
|
164
|
+
/** Number of active lint diagnostics. @see {@link https://codemirror.net/docs/ref/#lint.diagnosticCount} */
|
|
165
|
+
diagnosticCount: number;
|
|
166
|
+
/** Editor content DOM element. */
|
|
167
|
+
dom: Element | undefined;
|
|
168
|
+
/** Forces any linters configured to run when the editor is idle to run right away. */
|
|
169
|
+
lint: () => void;
|
|
170
|
+
/** Deconfigures and re-registers all extensions. @see {@link https://codemirror.net/examples/config/#top-level-reconfiguration} */
|
|
171
|
+
forceReconfigure: () => void;
|
|
172
|
+
/** Get the text between the given points in the editor. */
|
|
173
|
+
getRange: (from?: number, to?: number) => string | undefined;
|
|
174
|
+
/** Get the content of the given line. */
|
|
175
|
+
getLine: (number: number) => string | undefined;
|
|
176
|
+
/** Get the number of lines in the editor. */
|
|
177
|
+
lineCount: () => number;
|
|
178
|
+
/** Retrieve one end of the primary selection. */
|
|
179
|
+
getCursor: () => number;
|
|
180
|
+
/** Retrieves a list of all current selections. */
|
|
181
|
+
listSelections: () => readonly SelectionRange[];
|
|
182
|
+
/** Get the currently selected code. */
|
|
183
|
+
getSelection: () => string;
|
|
184
|
+
/** Get the currently selected code for every selection range. */
|
|
185
|
+
getSelections: () => string[];
|
|
186
|
+
/** Return true if any text is selected. */
|
|
187
|
+
somethingSelected: () => boolean;
|
|
188
|
+
/** Replace the part of the document between from and to with the given string. */
|
|
189
|
+
replaceRange: (replacement: string | Text_2, from: number, to: number) => void;
|
|
190
|
+
/** Replace the selection(s) with the given string. */
|
|
191
|
+
replaceSelection: (replacement: string | Text_2) => void;
|
|
192
|
+
/** Set the cursor position. */
|
|
193
|
+
setCursor: (position: number) => void;
|
|
194
|
+
/** Set a single selection range. */
|
|
195
|
+
setSelection: (anchor: number, head?: number) => void;
|
|
196
|
+
/** Sets a new set of selections. There must be at least one selection in the given array. */
|
|
197
|
+
setSelections: (ranges: readonly SelectionRange[], primary?: number) => void;
|
|
198
|
+
/** Applies the given function to all existing selections, and calls extendSelections on the result. */
|
|
199
|
+
extendSelectionsBy: (f: (range: SelectionRange) => number) => void;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
/** CodeMirror Component */
|
|
203
|
+
declare const component: DefineComponent<ExtractPropTypes< {
|
|
204
|
+
readonly modelValue: {
|
|
205
|
+
readonly type: PropType<string | Text_2>;
|
|
206
|
+
readonly default: '';
|
|
207
|
+
};
|
|
208
|
+
readonly theme: {
|
|
209
|
+
readonly type: PropType<Record<string, StyleSpec>>;
|
|
210
|
+
readonly default: () => {};
|
|
211
|
+
};
|
|
212
|
+
readonly dark: {
|
|
213
|
+
readonly type: BooleanConstructor;
|
|
214
|
+
readonly default: false;
|
|
215
|
+
};
|
|
216
|
+
readonly basic: {
|
|
217
|
+
readonly type: BooleanConstructor;
|
|
218
|
+
readonly default: false;
|
|
219
|
+
};
|
|
220
|
+
readonly minimal: {
|
|
221
|
+
readonly type: BooleanConstructor;
|
|
222
|
+
readonly default: false;
|
|
223
|
+
};
|
|
224
|
+
readonly placeholder: {
|
|
225
|
+
readonly type: PropType<string | HTMLElement>;
|
|
226
|
+
readonly default: undefined;
|
|
227
|
+
};
|
|
228
|
+
readonly wrap: {
|
|
229
|
+
readonly type: BooleanConstructor;
|
|
230
|
+
readonly default: false;
|
|
231
|
+
};
|
|
232
|
+
readonly tab: {
|
|
233
|
+
readonly type: BooleanConstructor;
|
|
234
|
+
readonly default: false;
|
|
235
|
+
};
|
|
236
|
+
readonly indentUnit: {
|
|
237
|
+
readonly type: StringConstructor;
|
|
238
|
+
readonly default: undefined;
|
|
239
|
+
};
|
|
240
|
+
readonly allowMultipleSelections: {
|
|
241
|
+
readonly type: BooleanConstructor;
|
|
242
|
+
readonly default: false;
|
|
243
|
+
};
|
|
244
|
+
readonly tabSize: {
|
|
245
|
+
readonly type: NumberConstructor;
|
|
246
|
+
readonly default: undefined;
|
|
247
|
+
};
|
|
248
|
+
readonly lineSeparator: {
|
|
249
|
+
readonly type: StringConstructor;
|
|
250
|
+
readonly default: undefined;
|
|
251
|
+
};
|
|
252
|
+
readonly readonly: {
|
|
253
|
+
readonly type: BooleanConstructor;
|
|
254
|
+
readonly default: false;
|
|
255
|
+
};
|
|
256
|
+
readonly disabled: {
|
|
257
|
+
readonly type: BooleanConstructor;
|
|
258
|
+
readonly default: false;
|
|
259
|
+
};
|
|
260
|
+
readonly extensions: {
|
|
261
|
+
readonly type: PropType<Extension[]>;
|
|
262
|
+
readonly default: () => never[];
|
|
263
|
+
};
|
|
264
|
+
readonly phrases: {
|
|
265
|
+
readonly type: PropType<Record<string, string>>;
|
|
266
|
+
readonly default: undefined;
|
|
267
|
+
};
|
|
268
|
+
readonly lang: {
|
|
269
|
+
readonly type: PropType<LanguageSupport>;
|
|
270
|
+
readonly default: undefined;
|
|
271
|
+
};
|
|
272
|
+
readonly linter: {
|
|
273
|
+
readonly type: PropType<LintSource>;
|
|
274
|
+
readonly default: undefined;
|
|
275
|
+
};
|
|
276
|
+
readonly linterConfig: {
|
|
277
|
+
readonly type: ObjectConstructor;
|
|
278
|
+
readonly default: () => {};
|
|
279
|
+
};
|
|
280
|
+
readonly forceLinting: {
|
|
281
|
+
readonly type: BooleanConstructor;
|
|
282
|
+
readonly default: false;
|
|
283
|
+
};
|
|
284
|
+
readonly gutter: {
|
|
285
|
+
readonly type: BooleanConstructor;
|
|
286
|
+
readonly default: false;
|
|
287
|
+
};
|
|
288
|
+
readonly gutterConfig: {
|
|
289
|
+
readonly type: ObjectConstructor;
|
|
290
|
+
readonly default: undefined;
|
|
291
|
+
};
|
|
292
|
+
readonly tag: {
|
|
293
|
+
readonly type: StringConstructor;
|
|
294
|
+
readonly default: 'div';
|
|
295
|
+
};
|
|
296
|
+
readonly scrollIntoView: {
|
|
297
|
+
readonly type: BooleanConstructor;
|
|
298
|
+
readonly default: true;
|
|
299
|
+
};
|
|
300
|
+
readonly preserveScrollPosition: {
|
|
301
|
+
readonly type: BooleanConstructor;
|
|
302
|
+
readonly default: false;
|
|
303
|
+
};
|
|
304
|
+
readonly keymap: {
|
|
305
|
+
readonly type: PropType<KeyBinding[]>;
|
|
306
|
+
readonly default: () => never[];
|
|
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 { }
|