vue-codemirror6 1.1.11 → 1.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,11 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- #### [1.1.6](https://github.com/logue/vue-codemirror6/compare/1.1.3...1.1.6)
7
+ #### [1.1.11](https://github.com/logue/vue-codemirror6/compare/1.1.11...1.1.11)
8
8
 
9
+ #### [1.1.11](https://github.com/logue/vue-codemirror6/compare/1.1.3...1.1.11)
10
+
11
+ > 4 February 2023
12
+
13
+ - [SECURITY FIX] CWE-1333: Inefficient Regular Expression Complexity #13 [`fc63a9f`](https://github.com/logue/vue-codemirror6/commit/fc63a9f14b5307089e9551157b011072971b112f)
9
14
  - Fix for #11 [`c634b55`](https://github.com/logue/vue-codemirror6/commit/c634b555ffff93bb30da2f501ec366289fc86ec1)
10
- - Update dependencies. [`63d99a2`](https://github.com/logue/vue-codemirror6/commit/63d99a23a5df4771ca1c3edea8e8f97502622228)
11
- - release v1.1.2 [`903af1f`](https://github.com/logue/vue-codemirror6/commit/903af1fcf128ea7958ca9ae40fc97f062d8696d1)
15
+ - Add forceReconfigure() function. [`bbfa8ad`](https://github.com/logue/vue-codemirror6/commit/bbfa8adb5bd5cdb56a53bd69337a4e0313e52033)
12
16
 
13
17
  #### [1.1.3](https://github.com/logue/vue-codemirror6/compare/1.1.2...1.1.3)
14
18
 
package/README.md CHANGED
@@ -54,7 +54,11 @@ This component can handle bidirectional binding by `v-model` like a general Vue
54
54
 
55
55
  ### Supported Languages
56
56
 
57
+ #### Official
58
+
59
+ - [`@codemirror/lang-angular`](https://www.npmjs.com/package/@codemirror/lang-angular)
57
60
  - [`@codemirror/lang-cpp`](https://www.npmjs.com/package/@codemirror/lang-cpp)
61
+ - [`@codemirror/lang-css`](https://www.npmjs.com/package/@codemirror/lang-css)
58
62
  - [`@codemirror/lang-html`](https://www.npmjs.com/package/@codemirror/lang-html)
59
63
  - [`@codemirror/lang-java`](https://www.npmjs.com/package/@codemirror/lang-java)
60
64
  - [`@codemirror/lang-javascript`](https://www.npmjs.com/package/@codemirror/lang-javascript)
@@ -65,8 +69,61 @@ This component can handle bidirectional binding by `v-model` like a general Vue
65
69
  - [`@codemirror/lang-python`](https://www.npmjs.com/package/@codemirror/lang-python)
66
70
  - [`@codemirror/lang-rust`](https://www.npmjs.com/package/@codemirror/lang-rust)
67
71
  - [`@codemirror/lang-sql`](https://www.npmjs.com/package/@codemirror/lang-sql)
72
+ - [`@codemirror/lang-vue`](https://www.npmjs.com/package/@codemirror/lang-vue)
73
+ - [`@codemirror/lang-west`](https://www.npmjs.com/package/@codemirror/lang-west)
68
74
  - [`@codemirror/lang-xml`](https://www.npmjs.com/package/@codemirror/lang-xml)
69
75
 
76
+ ### Unofficial
77
+
78
+ - [@phoenix-plugin-registry/petetnt.brackets-codemirror-fortran](https://www.npmjs.com/package/@phoenix-plugin-registry/petetnt.brackets-codemirror-fortran)
79
+ - [@phoenix-plugin-registry/petetnt.brackets-codemirror-go](https://www.npmjs.com/package/@phoenix-plugin-registry/petetnt.brackets-codemirror-go)
80
+ - [`@acarl005/lang-sql`](https://www.npmjs.com/package/@acarl005/lang-sql)
81
+ - [`@ark-us/codemirror-lang-taylor`](https://www.npmjs.com/package/@ark-us/codemirror-lang-taylor)
82
+ - [`@formulavize/lang-fiz`](https://www.npmjs.com/package/@formulavize/lang-fiz)
83
+ - [`@gravitywiz/codemirror-lang-gfcalc`](https://www.npmjs.com/package/@gravitywiz/codemirror-lang-gfcalc)
84
+ - [`@nextjournal/lang-clojure`](https://www.npmjs.com/package/@nextjournal/lang-clojure)
85
+ - [`@plutojl/lang-julia`](https://www.npmjs.com/package/@plutojl/lang-julia)
86
+ - [`@polybase/codemirror-lang-javascript`](https://www.npmjs.com/package/@polybase/codemirror-lang-javascript) -[`@replit/codemirror-lang-nix`](https://www.npmjs.com/package/@replit/codemirror-lang-nix)
87
+ - [`@replit/codemirror-lang-csharp`](https://www.npmjs.com/package/@replit/codemirror-lang-csharp)
88
+ - [`@replit/codemirror-lang-solidity`](https://www.npmjs.com/package/@replit/codemirror-lang-solidity)
89
+ - [`@replit/codemirror-lang-svelte`](https://www.npmjs.com/package/@replit/codemirror-lang-svelte)
90
+ - [`@zhijiu/lang-sql`](https://www.npmjs.com/package/@zhijiu/lang-sql)
91
+ - [`codemirror-lang-bool`](https://www.npmjs.com/package/codemirror-lang-bool)
92
+ - [`codemirror-lang-brainfuck`](https://www.npmjs.com/package/codemirror-lang-brainfuck)
93
+ - [`codemirror-lang-cherry`](https://www.npmjs.com/package/codemirror-lang-cherry)
94
+ - [`codemirror-lang-chordpro`](https://www.npmjs.com/package/codemirror-lang-chordpro)
95
+ - [`codemirror-lang-circom`](https://www.npmjs.com/package/codemirror-lang-circom)
96
+ - [`codemirror-lang-edn`](https://www.npmjs.com/package/codemirror-lang-edn)
97
+ - [`codemirror-lang-ejs`](https://www.npmjs.com/package/codemirror-lang-ejs)
98
+ - [`codemirror-lang-fsl`](https://www.npmjs.com/package/codemirror-lang-fsl)
99
+ - [`codemirror-lang-gml`](https://www.npmjs.com/package/codemirror-lang-gml)
100
+ - [`codemirror-lang-golfscript`](https://www.npmjs.com/package/codemirror-lang-golfscript)
101
+ - [`codemirror-lang-homescript`](https://www.npmjs.com/package/codemirror-lang-homescript)
102
+ - [`codemirror-lang-html-n8n`](https://www.npmjs.com/package/codemirror-lang-html-n8n)
103
+ - [`codemirror-lang-inform7`](https://www.npmjs.com/package/codemirror-lang-inform7)
104
+ - [`codemirror-lang-j`](https://www.npmjs.com/package/codemirror-lang-j)
105
+ - [`codemirror-lang-janet`](https://www.npmjs.com/package/codemirror-lang-janet)
106
+ - [`codemirror-lang-k`](https://www.npmjs.com/package/codemirror-lang-k)
107
+ - [`codemirror-lang-karol`](https://www.npmjs.com/package/codemirror-lang-karol)
108
+ - [`codemirror-lang-mermaid`](https://www.npmjs.com/package/codemirror-lang-mermaid)
109
+ - [`codemirror-lang-n8n-expression`](https://www.npmjs.com/package/codemirror-lang-n8n-expression)
110
+ - [`codemirror-lang-prolog`](https://www.npmjs.com/package/codemirror-lang-prolog)
111
+ - [`codemirror-lang-qpen`](https://www.npmjs.com/package/codemirror-lang-qpen)
112
+ - [`codemirror-lang-qtam`](https://www.npmjs.com/package/codemirror-lang-qtam)
113
+ - [`codemirror-lang-r`](https://www.npmjs.com/package/codemirror-lang-r)
114
+ - [`codemirror-lang-rome-ast`](https://www.npmjs.com/package/codemirror-lang-rome-ast)
115
+ - [`codemirror-lang-rome`](https://www.npmjs.com/package/codemirror-lang-rome)
116
+ - [`codemirror-lang-rush`](https://www.npmjs.com/package/codemirror-lang-rush)
117
+ - [`codemirror-lang-scopescript`](https://www.npmjs.com/package/codemirror-lang-scopescript)
118
+ - [`codemirror-lang-statement`](https://www.npmjs.com/package/codemirror-lang-statement)
119
+ - [`gcode-lang-codemirror`](https://www.npmjs.com/package/gcode-lang-codemirror)
120
+ - [`gmail-lang`](https://www.npmjs.com/package/gmail-lang)
121
+ - [`lang-bqn`](https://www.npmjs.com/package/lang-bqn)
122
+ - [`lang-clojure`](https://www.npmjs.com/package/lang-clojure)
123
+ - [`lang-d`](https://www.npmjs.com/package/lang-d)
124
+ - [`lang-feel`](https://www.npmjs.com/package/lang-feel)
125
+ - [`lang-firestore`](https://www.npmjs.com/package/lang-firestore)
126
+
70
127
  ### Supported Themes
71
128
 
72
129
  - [`@codemirror/theme-one-dark`](https://github.com/codemirror/theme-one-dark)
@@ -312,6 +369,8 @@ const config: UserConfig = {
312
369
  '@codemirror/search',
313
370
  '@codemirror/state',
314
371
  '@codemirror/view',
372
+ ],
373
+ 'codemirror-lang': [
315
374
  // Add the following as needed.
316
375
  '@codemirror/lang-html',
317
376
  '@codemirror/lang-javascript',
package/dist/index.es.js CHANGED
@@ -5,11 +5,11 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2022-2023 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.1.11
8
+ * @version 1.1.12
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
12
- import { isVue2, Vue2, h as h$1, defineComponent, ref, shallowRef, computed, watch, onMounted, nextTick, onUnmounted } from 'vue-demi';
12
+ import { isVue2, h as h$1, defineComponent, ref, shallowRef, computed, watch, onMounted, nextTick, onUnmounted } from 'vue-demi';
13
13
  import { compact, trim } from 'lodash';
14
14
  import { basicSetup, minimalSetup } from 'codemirror';
15
15
  import { EditorState, StateEffect, EditorSelection } from '@codemirror/state';
@@ -26,8 +26,8 @@ const adaptOnsV3 = (ons) => {
26
26
  return { ...ret, [key]: handler };
27
27
  }, {});
28
28
  };
29
- const h = (type, options = {}, chidren) => {
30
- if (isVue2 && parseInt(Vue2.version) < 2.7) {
29
+ function h(type, options = {}, chidren) {
30
+ if (isVue2) {
31
31
  return h$1(type, options, chidren);
32
32
  }
33
33
  const { props, domProps, on, ...extraOptions } = options;
@@ -37,7 +37,7 @@ const h = (type, options = {}, chidren) => {
37
37
  { ...extraOptions, ...props, ...domProps, ...ons },
38
38
  chidren
39
39
  );
40
- };
40
+ }
41
41
  const slot = (defaultSlots) => typeof defaultSlots == "function" ? defaultSlots() : defaultSlots;
42
42
 
43
43
  var CodeMirror = defineComponent({
@@ -201,8 +201,16 @@ var CodeMirror = defineComponent({
201
201
  */
202
202
  linterConfig: {
203
203
  type: Object,
204
- default: () => {
205
- }
204
+ default: () => void 0
205
+ },
206
+ /**
207
+ * Forces any linters configured to run when the editor is idle to run right away.
208
+ *
209
+ * @see {@link https://codemirror.net/docs/ref/#lint.forceLinting}
210
+ */
211
+ forceLinting: {
212
+ type: Boolean,
213
+ default: false
206
214
  },
207
215
  /**
208
216
  * Show Linter Gutter
@@ -223,8 +231,7 @@ var CodeMirror = defineComponent({
223
231
  */
224
232
  gutterConfig: {
225
233
  type: Object,
226
- default: () => {
227
- }
234
+ default: () => void 0
228
235
  },
229
236
  /**
230
237
  * Using tag
@@ -242,6 +249,7 @@ var CodeMirror = defineComponent({
242
249
  * @param props - Props
243
250
  * @param context - Context
244
251
  */
252
+ // @ts-ignore
245
253
  setup(props, context) {
246
254
  const editor = ref();
247
255
  const doc = ref(props.modelValue);
@@ -316,6 +324,9 @@ var CodeMirror = defineComponent({
316
324
  if (view.value.composing) {
317
325
  return;
318
326
  }
327
+ if (props.linter && props.forceLinting) {
328
+ forceLinting(view.value);
329
+ }
319
330
  view.value.dispatch({
320
331
  changes: { from: 0, to: view.value.state.doc.length, insert: value },
321
332
  selection: view.value.state.selection,
@@ -325,13 +336,12 @@ var CodeMirror = defineComponent({
325
336
  { immediate: true }
326
337
  );
327
338
  watch(
328
- extensions,
329
- (exts) => (
330
- // TODO: Reduce unchanched value
339
+ () => extensions.value,
340
+ (exts) => {
331
341
  view.value.dispatch({
332
342
  effects: StateEffect.reconfigure.of(exts)
333
- })
334
- )
343
+ });
344
+ }
335
345
  );
336
346
  watch(focus, (isFocus) => context.emit("focus", isFocus));
337
347
  onMounted(async () => {
@@ -443,16 +453,19 @@ var CodeMirror = defineComponent({
443
453
  },
444
454
  render() {
445
455
  return h(
456
+ // @ts-ignore
446
457
  this.$props.tag,
447
458
  {
448
459
  ref: "editor",
449
460
  class: "vue-codemirror"
450
461
  },
462
+ // @ts-ignore
451
463
  this.$slots.default ? (
452
464
  // Hide original content
453
465
  h(
454
466
  "aside",
455
467
  { style: "display: none;", "aria-hidden": "true" },
468
+ // @ts-ignore
456
469
  slot(this.$slots.default)
457
470
  )
458
471
  ) : void 0
@@ -461,8 +474,8 @@ var CodeMirror = defineComponent({
461
474
  });
462
475
 
463
476
  const meta = {
464
- version: "1.1.11",
465
- date: "2023-02-04T13:41:04.676Z"
477
+ version: "1.1.12",
478
+ date: "2023-03-10T04:51:22.645Z"
466
479
  };
467
480
 
468
481
  const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
@@ -5,7 +5,7 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2022-2023 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.1.11
8
+ * @version 1.1.12
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
@@ -21,8 +21,8 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
21
21
  return { ...ret, [key]: handler };
22
22
  }, {});
23
23
  };
24
- const h = (type, options = {}, chidren) => {
25
- if (vueDemi.isVue2 && parseInt(vueDemi.Vue2.version) < 2.7) {
24
+ function h(type, options = {}, chidren) {
25
+ if (vueDemi.isVue2) {
26
26
  return vueDemi.h(type, options, chidren);
27
27
  }
28
28
  const { props, domProps, on, ...extraOptions } = options;
@@ -32,7 +32,7 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
32
32
  { ...extraOptions, ...props, ...domProps, ...ons },
33
33
  chidren
34
34
  );
35
- };
35
+ }
36
36
  const slot = (defaultSlots) => typeof defaultSlots == "function" ? defaultSlots() : defaultSlots;
37
37
 
38
38
  var CodeMirror = vueDemi.defineComponent({
@@ -196,8 +196,16 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
196
196
  */
197
197
  linterConfig: {
198
198
  type: Object,
199
- default: () => {
200
- }
199
+ default: () => void 0
200
+ },
201
+ /**
202
+ * Forces any linters configured to run when the editor is idle to run right away.
203
+ *
204
+ * @see {@link https://codemirror.net/docs/ref/#lint.forceLinting}
205
+ */
206
+ forceLinting: {
207
+ type: Boolean,
208
+ default: false
201
209
  },
202
210
  /**
203
211
  * Show Linter Gutter
@@ -218,8 +226,7 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
218
226
  */
219
227
  gutterConfig: {
220
228
  type: Object,
221
- default: () => {
222
- }
229
+ default: () => void 0
223
230
  },
224
231
  /**
225
232
  * Using tag
@@ -237,6 +244,7 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
237
244
  * @param props - Props
238
245
  * @param context - Context
239
246
  */
247
+ // @ts-ignore
240
248
  setup(props, context) {
241
249
  const editor = vueDemi.ref();
242
250
  const doc = vueDemi.ref(props.modelValue);
@@ -311,6 +319,9 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
311
319
  if (view$1.value.composing) {
312
320
  return;
313
321
  }
322
+ if (props.linter && props.forceLinting) {
323
+ lint.forceLinting(view$1.value);
324
+ }
314
325
  view$1.value.dispatch({
315
326
  changes: { from: 0, to: view$1.value.state.doc.length, insert: value },
316
327
  selection: view$1.value.state.selection,
@@ -320,13 +331,12 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
320
331
  { immediate: true }
321
332
  );
322
333
  vueDemi.watch(
323
- extensions,
324
- (exts) => (
325
- // TODO: Reduce unchanched value
334
+ () => extensions.value,
335
+ (exts) => {
326
336
  view$1.value.dispatch({
327
337
  effects: state.StateEffect.reconfigure.of(exts)
328
- })
329
- )
338
+ });
339
+ }
330
340
  );
331
341
  vueDemi.watch(focus, (isFocus) => context.emit("focus", isFocus));
332
342
  vueDemi.onMounted(async () => {
@@ -438,16 +448,19 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
438
448
  },
439
449
  render() {
440
450
  return h(
451
+ // @ts-ignore
441
452
  this.$props.tag,
442
453
  {
443
454
  ref: "editor",
444
455
  class: "vue-codemirror"
445
456
  },
457
+ // @ts-ignore
446
458
  this.$slots.default ? (
447
459
  // Hide original content
448
460
  h(
449
461
  "aside",
450
462
  { style: "display: none;", "aria-hidden": "true" },
463
+ // @ts-ignore
451
464
  slot(this.$slots.default)
452
465
  )
453
466
  ) : void 0
@@ -456,8 +469,8 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
456
469
  });
457
470
 
458
471
  const meta = {
459
- version: "1.1.11",
460
- date: "2023-02-04T13:41:04.676Z"
472
+ version: "1.1.12",
473
+ date: "2023-03-10T04:51:22.645Z"
461
474
  };
462
475
 
463
476
  const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
package/dist/index.umd.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2022-2023 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.1.11
8
+ * @version 1.1.12
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
@@ -24,8 +24,8 @@
24
24
  return { ...ret, [key]: handler };
25
25
  }, {});
26
26
  };
27
- const h = (type, options = {}, chidren) => {
28
- if (vueDemi.isVue2 && parseInt(vueDemi.Vue2.version) < 2.7) {
27
+ function h(type, options = {}, chidren) {
28
+ if (vueDemi.isVue2) {
29
29
  return vueDemi.h(type, options, chidren);
30
30
  }
31
31
  const { props, domProps, on, ...extraOptions } = options;
@@ -35,7 +35,7 @@
35
35
  { ...extraOptions, ...props, ...domProps, ...ons },
36
36
  chidren
37
37
  );
38
- };
38
+ }
39
39
  const slot = (defaultSlots) => typeof defaultSlots == "function" ? defaultSlots() : defaultSlots;
40
40
 
41
41
  var CodeMirror = vueDemi.defineComponent({
@@ -199,8 +199,16 @@
199
199
  */
200
200
  linterConfig: {
201
201
  type: Object,
202
- default: () => {
203
- }
202
+ default: () => void 0
203
+ },
204
+ /**
205
+ * Forces any linters configured to run when the editor is idle to run right away.
206
+ *
207
+ * @see {@link https://codemirror.net/docs/ref/#lint.forceLinting}
208
+ */
209
+ forceLinting: {
210
+ type: Boolean,
211
+ default: false
204
212
  },
205
213
  /**
206
214
  * Show Linter Gutter
@@ -221,8 +229,7 @@
221
229
  */
222
230
  gutterConfig: {
223
231
  type: Object,
224
- default: () => {
225
- }
232
+ default: () => void 0
226
233
  },
227
234
  /**
228
235
  * Using tag
@@ -240,6 +247,7 @@
240
247
  * @param props - Props
241
248
  * @param context - Context
242
249
  */
250
+ // @ts-ignore
243
251
  setup(props, context) {
244
252
  const editor = vueDemi.ref();
245
253
  const doc = vueDemi.ref(props.modelValue);
@@ -314,6 +322,9 @@
314
322
  if (view$1.value.composing) {
315
323
  return;
316
324
  }
325
+ if (props.linter && props.forceLinting) {
326
+ lint.forceLinting(view$1.value);
327
+ }
317
328
  view$1.value.dispatch({
318
329
  changes: { from: 0, to: view$1.value.state.doc.length, insert: value },
319
330
  selection: view$1.value.state.selection,
@@ -323,13 +334,12 @@
323
334
  { immediate: true }
324
335
  );
325
336
  vueDemi.watch(
326
- extensions,
327
- (exts) => (
328
- // TODO: Reduce unchanched value
337
+ () => extensions.value,
338
+ (exts) => {
329
339
  view$1.value.dispatch({
330
340
  effects: state.StateEffect.reconfigure.of(exts)
331
- })
332
- )
341
+ });
342
+ }
333
343
  );
334
344
  vueDemi.watch(focus, (isFocus) => context.emit("focus", isFocus));
335
345
  vueDemi.onMounted(async () => {
@@ -441,16 +451,19 @@
441
451
  },
442
452
  render() {
443
453
  return h(
454
+ // @ts-ignore
444
455
  this.$props.tag,
445
456
  {
446
457
  ref: "editor",
447
458
  class: "vue-codemirror"
448
459
  },
460
+ // @ts-ignore
449
461
  this.$slots.default ? (
450
462
  // Hide original content
451
463
  h(
452
464
  "aside",
453
465
  { style: "display: none;", "aria-hidden": "true" },
466
+ // @ts-ignore
454
467
  slot(this.$slots.default)
455
468
  )
456
469
  ) : void 0
@@ -459,8 +472,8 @@
459
472
  });
460
473
 
461
474
  const meta = {
462
- version: "1.1.11",
463
- date: "2023-02-04T13:41:04.676Z"
475
+ version: "1.1.12",
476
+ date: "2023-03-10T04:51:22.645Z"
464
477
  };
465
478
 
466
479
  const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
@@ -0,0 +1,3 @@
1
+ import type MetaInterface from './interfaces/MetaInterface';
2
+ declare const meta: MetaInterface;
3
+ export default meta;
@@ -0,0 +1,27 @@
1
+ import { type ObjectEmitsOptions } from 'vue-demi';
2
+ import { EditorState, type Text } from '@codemirror/state';
3
+ import { EditorView, type ViewUpdate } from '@codemirror/view';
4
+ /** Emit Interface */
5
+ export interface CodeMirrorEmitsOptions extends ObjectEmitsOptions {
6
+ /** Model Update */
7
+ (e: 'update:modelValue', value: string | Text): void;
8
+ /** CodeMirror ViewUpdate */
9
+ (e: 'update', value: ViewUpdate): void;
10
+ /** CodeMirror onFocus */
11
+ (e: 'focus', value: boolean): void;
12
+ /** CodeMirror onReady */
13
+ (e: 'ready', value: {
14
+ view: EditorView;
15
+ state: EditorState;
16
+ container: HTMLElement;
17
+ }): void;
18
+ /** CodeMirror onDestroy */
19
+ (e: 'destroy'): void;
20
+ /** State Changed */
21
+ (e: 'change', value: EditorState): void;
22
+ /** Diagnostic Count */
23
+ (e: 'diagnosticCount'): number;
24
+ }
25
+ /** CodeMirror Component */
26
+ declare const _default: import("vue-demi").DefineComponent<unknown, object, {}, import("vue-demi").ComputedOptions, import("vue-demi").MethodOptions, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<unknown>, {}>;
27
+ export default _default;
@@ -1,18 +1,20 @@
1
- /**
2
- * h-demi - h function for Vue 2 and 3
3
- *
4
- * @see {@link https://github.com/vueuse/vue-demi/issues/65}
5
- */
6
- import { type VNode } from 'vue-demi';
7
- interface Options {
8
- class?: string;
9
- domProps?: Record<any, any>;
10
- on?: Record<any, any>;
11
- props?: Record<any, any>;
12
- ref?: string;
13
- style?: string;
14
- 'aria-hidden'?: string;
15
- }
16
- declare const h: (type: string | Record<any, any>, options?: Options, chidren?: any) => VNode;
17
- declare const slot: (defaultSlots: any) => any;
18
- export { slot, h as default };
1
+ /**
2
+ * h-demi - h function for Vue 2 and 3
3
+ *
4
+ * @see {@link https://github.com/vueuse/vue-demi/issues/65}
5
+ */
6
+ import { type Slots, type VNode, type VNodeProps } from 'vue-demi';
7
+ interface Options extends VNodeProps {
8
+ class?: string;
9
+ domProps?: Record<any, any>;
10
+ on?: Record<any, any>;
11
+ props?: Record<any, any>;
12
+ style?: string;
13
+ 'aria-hidden'?: string;
14
+ }
15
+ /**
16
+ * hDemi function.
17
+ */
18
+ declare function h(type: string | Record<any, any>, options?: Options, chidren?: any): VNode;
19
+ declare const slot: (defaultSlots: any) => Slots;
20
+ export { slot, h as default };
@@ -1,4 +1,4 @@
1
- import CodeMirror from './components/CodeMirror';
2
- import Meta from './Meta';
3
- declare const installCodeMirror: (app: any) => any;
4
- export { CodeMirror as default, installCodeMirror as install, Meta };
1
+ import CodeMirror from './components/CodeMirror';
2
+ import Meta from './Meta';
3
+ declare const installCodeMirror: (app: any) => any;
4
+ export { CodeMirror as default, installCodeMirror as install, Meta };
@@ -1,7 +1,7 @@
1
- /** Build information meta data */
2
- export default interface MetaInterface {
3
- /** Version */
4
- version: string;
5
- /** Build date */
6
- date: string;
7
- }
1
+ /** Build information meta data */
2
+ export default interface MetaInterface {
3
+ /** Version */
4
+ version: string;
5
+ /** Build date */
6
+ date: string;
7
+ }