vue-codemirror6 1.7.0 → 1.8.1

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/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.0
7
+ * @version 1.8.1
8
8
  * @see {@link https://github.com/logue/vue-codemirror6}
9
9
  */
10
10
 
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 { }
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 };