vue-codemirror6 0.6.5 → 0.6.8

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 CHANGED
@@ -30,7 +30,7 @@ For Vue 2.7 or later, import vue directly like Vue3.
30
30
  | ---------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
31
31
  | basic | boolean | Use [basicSetup](https://codemirror.net/docs/ref/#codemirror.basicSetup). |
32
32
  | minimal | boolean | Use [miniSetup](https://codemirror.net/docs/ref/#codemirror.minimalSetup). If a `basic` prop is also specified, that setting will take precedence. |
33
- | dark | boolean | Toggle Darkmode. It can be changed in real time, but the input value will return to the initial value. |
33
+ | dark | boolean | Toggle Darkmode. |
34
34
  | wrap | boolean | Line text wrapping. see [lineWrapping](https://codemirror.net/6/docs/ref/#view.EditorView.lineWrapping). |
35
35
  | tab | boolean | Enables tab indentation. |
36
36
  | theme | { [selector: string]: StyleSpec } | Specify the theme. For example, if you use [@codemirror/theme-one-dark](https://github.com/codemirror/theme-one-dark), import `oneDark` and put it in this prop. |
@@ -170,6 +170,11 @@ export default defineComponent({
170
170
  /** text */
171
171
  const value: Ref<string> = ref('');
172
172
 
173
+ /** Dark mode **/
174
+ const dark: Ref<boolean> = ref(
175
+ window.matchMedia('(prefers-color-scheme: dark)').matches
176
+ );
177
+
173
178
  /**
174
179
  * CodeMirror Language
175
180
  *
@@ -177,12 +182,6 @@ export default defineComponent({
177
182
  */
178
183
  const lang: LanguageSupport = md();
179
184
 
180
- /** Dark mode **/
181
- const dark = ref(window.matchMedia('(prefers-color-scheme: dark)').matches);
182
-
183
- /** When dark value changed, sync vuetify's dark mode */
184
- watch(dark, v => (vuetify.theme.dark = v));
185
-
186
185
  /**
187
186
  * Internationalization Config.
188
187
  * In this example, the display language to Japanese.
@@ -221,6 +220,9 @@ export default defineComponent({
221
220
  'No diagnostics': 'エラーなし',
222
221
  });
223
222
 
223
+ /** When dark value changed, sync vuetify's dark mode */
224
+ watch(dark, v => (vuetify.theme.dark = v));
225
+
224
226
  return {
225
227
  dark,
226
228
  value,
@@ -234,25 +236,26 @@ export default defineComponent({
234
236
 
235
237
  ## Methods
236
238
 
237
- | Methods | Description |
238
- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
239
- | selection() | Get the [EditorSelection](https://codemirror.net/docs/ref/#state.EditorSelection) instance. |
240
- | getRange(from?: number, to?: number) | Get the text between the given points in the editor. |
241
- | getLine(number: number) | Get the content of line. |
242
- | lineCount() | Get the number of lines in the editor. |
243
- | getCursor() | Retrieve one end of the primary selection. |
244
- | listSelections() | Retrieves a list of all current selections. |
245
- | getSelection() | Get the currently selected code. |
246
- | getSelections() | The length of the given array should be the same as the number of active selections. |
247
- | somethingSelected() | Return true if any text is selected. |
248
- | replaceRange(replacement: string \| Text, from: number, to: number) | Replace the part of the document between from and to with the given string. |
249
- | replaceSelection(replacement: string \| Text) | Replace the selection(s) with the given string. |
250
- | setCursor(position: number) | Set the cursor position. |
251
- | setSelection(anchor: number, head?: number) | Set a single selection range. |
252
- | setSelections(ranges: readonly SelectionRange[], primary?: number) | Sets a new set of selections. |
253
- | extendSelectionsBy(f: Function) | Applies the given function to all existing selections, and calls extendSelections on the result. |
254
- | focus() | Set focus |
255
- | hasFocus() | is Focused |
239
+ | Methods | Description |
240
+ | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
241
+ | selection | Get and set the [EditorSelection](https://codemirror.net/docs/ref/#state.EditorSelection) instance. |
242
+ | cursor | Get and set the cursor location. |
243
+ | state | Get and set [EditorState](https://codemirror.net/docs/ref/#state.EditorState). |
244
+ | focus | Get and set focus. |
245
+ | getRange(from?: number, to?: number) | Get the text between the given points in the editor. |
246
+ | getLine(number: number) | Get the content of line. |
247
+ | lineCount() | Get the number of lines in the editor. |
248
+ | getCursor() | Retrieve one end of the primary selection. |
249
+ | listSelections() | Retrieves a list of all current selections. |
250
+ | getSelection() | Get the currently selected code. |
251
+ | getSelections() | The length of the given array should be the same as the number of active selections. |
252
+ | somethingSelected() | Return true if any text is selected. |
253
+ | replaceRange(replacement: string \| Text, from: number, to: number) | Replace the part of the document between from and to with the given string. |
254
+ | replaceSelection(replacement: string \| Text) | Replace the selection(s) with the given string. |
255
+ | setCursor(position: number) | Set the cursor position. |
256
+ | setSelection(anchor: number, head?: number) | Set a single selection range. |
257
+ | setSelections(ranges: readonly SelectionRange[], primary?: number) | Sets a new set of selections. |
258
+ | extendSelectionsBy(f: Function) | Applies the given function to all existing selections, and calls extendSelections on the result. |
256
259
 
257
260
  ## Recommendations
258
261
 
@@ -294,3 +297,5 @@ const config: UserConfig = {
294
297
  ## LICENSE
295
298
 
296
299
  [MIT](LICENSE)
300
+
301
+ &copy; 2022 by Logue.
@@ -1,5 +1,5 @@
1
1
  import { type PropType, type Ref, type SetupContext } from 'vue-demi';
2
- import { EditorSelection } from '@codemirror/state';
2
+ import { EditorSelection, EditorState } from '@codemirror/state';
3
3
  import type { Extension, SelectionRange, Text } from '@codemirror/state';
4
4
  import type { LanguageSupport } from '@codemirror/language';
5
5
  import type { ViewUpdate } from '@codemirror/view';
@@ -10,8 +10,9 @@ export interface CodeMirrorEmitsInterface {
10
10
  /** Model Update */
11
11
  (e: 'update:modelValue', value: string | Text): void;
12
12
  /** CodeMirror ViewUpdate */
13
- (e: 'update', value: ViewUpdate): void;
13
+ (e: 'update:view', value: ViewUpdate): void;
14
14
  }
15
+ /** CodeMirror Component */
15
16
  declare const _default: import("vue-demi").DefineComponent<{
16
17
  /** Model value */
17
18
  modelValue: {
@@ -122,7 +123,7 @@ declare const _default: import("vue-demi").DefineComponent<{
122
123
  */
123
124
  linter: {
124
125
  type: PropType<LintSource>;
125
- default: () => undefined;
126
+ default: undefined;
126
127
  };
127
128
  /** Show Gutter */
128
129
  lintGutter: {
@@ -133,8 +134,10 @@ declare const _default: import("vue-demi").DefineComponent<{
133
134
  context: SetupContext<import("vue-demi").EmitsOptions>;
134
135
  editor: Ref<Element | undefined>;
135
136
  cursor: Ref<number>;
136
- selection: () => EditorSelection;
137
- getRange: (from?: number | undefined, to?: number | undefined) => string;
137
+ selection: Ref<EditorSelection>;
138
+ state: Ref<EditorState>;
139
+ focus: Ref<boolean>;
140
+ getRange: (from?: number, to?: number) => string;
138
141
  getLine: (number: number) => string;
139
142
  lineCount: () => number;
140
143
  getCursor: () => number;
@@ -145,11 +148,9 @@ declare const _default: import("vue-demi").DefineComponent<{
145
148
  replaceRange: (replacement: string | Text, from: number, to: number) => void;
146
149
  replaceSelection: (replacement: string | Text) => void;
147
150
  setCursor: (position: number) => number;
148
- setSelection: (anchor: number, head?: number | undefined) => void;
149
- setSelections: (ranges: readonly SelectionRange[], primary?: number | undefined) => void;
151
+ setSelection: (anchor: number, head?: number) => void;
152
+ setSelections: (ranges: readonly SelectionRange[], primary?: number) => void;
150
153
  extendSelectionsBy: (f: Function) => void;
151
- focus: () => void;
152
- hasFocus: () => boolean;
153
154
  }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, import("vue-demi").EmitsOptions, "update:modelValue" | "update:view", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
154
155
  /** Model value */
155
156
  modelValue: {
@@ -260,7 +261,7 @@ declare const _default: import("vue-demi").DefineComponent<{
260
261
  */
261
262
  linter: {
262
263
  type: PropType<LintSource>;
263
- default: () => undefined;
264
+ default: undefined;
264
265
  };
265
266
  /** Show Gutter */
266
267
  lintGutter: {
@@ -285,6 +286,5 @@ declare const _default: import("vue-demi").DefineComponent<{
285
286
  linter: LintSource;
286
287
  lintGutter: boolean;
287
288
  }>;
288
- /** CodeMirror Component */
289
289
  export default _default;
290
290
  //# sourceMappingURL=CodeMirror.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeMirror.d.ts","sourceRoot":"","sources":["../../src/components/CodeMirror.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,QAAQ,EACb,KAAK,GAAG,EACR,KAAK,YAAY,EAClB,MAAM,UAAU,CAAC;AAOlB,OAAO,EAAE,eAAe,EAA4B,MAAM,mBAAmB,CAAC;AAM9E,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,IAAI,EAEL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,qBAAqB;AACrB,MAAM,WAAW,wBAAwB;IACvC,mBAAmB;IACnB,CAAC,CAAC,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACrD,4BAA4B;IAC5B,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CACxC;;IAaG,kBAAkB;;;;;IAKlB;;;;OAIG;;;;;;;IAOH,gBAAgB;;;;;IAKhB;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAOH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH,kBAAkB;;;;;;;;;qBAoII,eAAe;sEAUU,MAAM;sBAO5B,MAAM,KAAG,MAAM;qBAGlB,MAAM;qBAEN,MAAM;0BAED,SAAS,cAAc,EAAE;wBAE3B,MAAM;yBAML,MAAM,EAAE;6BAGJ,OAAO;gCAWtB,MAAM,GAAG,IAAI,QACpB,MAAM,MACR,MAAM;oCAW2B,MAAM,GAAG,IAAI;0BAOvB,MAAM;2BAOL,MAAM;4BAS1B,SAAS,cAAc,EAAE;4BAWJ,QAAQ;;oBAUlB,OAAO;;IA5V5B,kBAAkB;;;;;IAKlB;;;;OAIG;;;;;;;IAOH,gBAAgB;;;;;IAKhB;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAOH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;AA5HtB,2BAA2B;AAC3B,wBAqZG"}
1
+ {"version":3,"file":"CodeMirror.d.ts","sourceRoot":"","sources":["../../src/components/CodeMirror.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,QAAQ,EACb,KAAK,GAAG,EACR,KAAK,YAAY,EAClB,MAAM,UAAU,CAAC;AAOlB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAM9E,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,IAAI,EAEL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,qBAAqB;AACrB,MAAM,WAAW,wBAAwB;IACvC,mBAAmB;IACnB,CAAC,CAAC,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACrD,4BAA4B;IAC5B,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CAC7C;AAED,2BAA2B;;IAWvB,kBAAkB;;;;;IAKlB;;;;OAIG;;;;;;;IAOH,gBAAgB;;;;;IAKhB;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAOH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH,kBAAkB;;;;;;;;;;;;sBA6JO,MAAM,OAAO,MAAM,KAAG,MAAM;sBAO5B,MAAM,KAAG,MAAM;qBAGlB,MAAM;qBAEN,MAAM;0BAED,SAAS,cAAc,EAAE;wBAG3B,MAAM;yBASL,MAAM,EAAE;6BAGJ,OAAO;gCAWtB,MAAM,GAAG,IAAI,QACpB,MAAM,MACR,MAAM;oCAW2B,MAAM,GAAG,IAAI;0BAOvB,MAAM;2BAOL,MAAM,SAAS,MAAM;4BASzC,SAAS,cAAc,EAAE,YACvB,MAAM;4BAUa,QAAQ;;IArWvC,kBAAkB;;;;;IAKlB;;;;OAIG;;;;;;;IAOH,gBAAgB;;;;;IAKhB;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAOH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;AA3HtB,wBAmaG"}
@@ -1,3 +1,4 @@
1
+ import { type VNode } from 'vue-demi';
1
2
  interface Options {
2
3
  class?: string;
3
4
  domProps?: Record<any, any>;
@@ -7,9 +8,7 @@ interface Options {
7
8
  style?: string;
8
9
  'aria-hidden'?: string;
9
10
  }
10
- declare const h: (type: string | Record<any, any>, options?: Options, chidren?: any) => import("vue-demi").VNode<import("vue-demi").RendererNode, import("vue-demi").RendererElement, {
11
- [key: string]: any;
12
- }>;
11
+ declare const h: (type: string | Record<any, any>, options?: Options, chidren?: any) => VNode;
13
12
  declare const slot: (defaultSlots: any) => any;
14
13
  export { slot, h as default };
15
14
  //# sourceMappingURL=h-demi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"h-demi.d.ts","sourceRoot":"","sources":["../../src/helpers/h-demi.ts"],"names":[],"mappings":"AAEA,UAAU,OAAO;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAWD,QAAA,MAAM,CAAC,SACC,MAAM,GAAG,OAAO,GAAG,EAAE,GAAG,CAAC,YACtB,OAAO,YACN,GAAG;;EAWd,CAAC;AAEF,QAAA,MAAM,IAAI,iBAAkB,GAAG,QACoC,CAAC;AAEpE,OAAO,EAAE,IAAI,EAAE,CAAC,IAAI,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"h-demi.d.ts","sourceRoot":"","sources":["../../src/helpers/h-demi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,KAAK,EAAQ,MAAM,UAAU,CAAC;AAEhE,UAAU,OAAO;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAWD,QAAA,MAAM,CAAC,SACC,MAAM,GAAG,OAAO,GAAG,EAAE,GAAG,CAAC,YACtB,OAAO,YACN,GAAG,KACZ,KAcF,CAAC;AAEF,QAAA,MAAM,IAAI,iBAAkB,GAAG,QACoC,CAAC;AAEpE,OAAO,EAAE,IAAI,EAAE,CAAC,IAAI,OAAO,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAGjD,QAAA,MAAM,iBAAiB,mBAAiD,CAAC;AAEzE,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAGjD,QAAA,MAAM,iBAAiB,QAAS,GAAG,QAA4C,CAAC;AAEhF,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,CAAC"}
package/dist/index.es.js CHANGED
@@ -5,35 +5,23 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2022 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 0.6.5
8
+ * @version 0.6.8
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
12
- import { isVue2, h as h$1, defineComponent, ref, computed, watch, onMounted, nextTick, onUnmounted, toRaw } from "vue-demi";
13
- import { trim, compact } from "lodash";
14
- import { StateEffect, EditorState, EditorSelection } from "@codemirror/state";
15
- import { EditorView, keymap } from "@codemirror/view";
16
- import { linter, lintGutter } from "@codemirror/lint";
17
- import { basicSetup, minimalSetup } from "codemirror";
18
- import { indentWithTab } from "@codemirror/commands";
19
- const adaptOnsV3 = (ons) => {
20
- if (!ons)
21
- return null;
22
- return Object.entries(ons).reduce((ret, [key, handler]) => {
23
- key = key.charAt(0).toUpperCase() + key.slice(1);
24
- key = `on${key}`;
25
- return { ...ret, [key]: handler };
26
- }, {});
27
- };
28
- const h = (type, options = {}, chidren) => {
29
- if (isVue2)
30
- return h$1(type, options, chidren);
31
- const { props, domProps, on, ...extraOptions } = options;
32
- const ons = on ? adaptOnsV3(on) : {};
33
- return h$1(type, { ...extraOptions, ...props, ...domProps, ...ons }, chidren);
34
- };
35
- const slot = (defaultSlots) => typeof defaultSlots == "function" ? defaultSlots() : defaultSlots;
36
- var CodeMirror = defineComponent({
12
+ import { isVue2 as V, Vue2 as x, h, defineComponent as B, ref as p, computed as r, toRaw as O, watch as v, onMounted as M, nextTick as R, onUnmounted as j } from "vue-demi";
13
+ import { compact as E, trim as T } from "lodash";
14
+ import { EditorState as g, StateEffect as $, EditorSelection as y } from "@codemirror/state";
15
+ import { EditorView as d, keymap as D } from "@codemirror/view";
16
+ import { linter as G, lintGutter as L } from "@codemirror/lint";
17
+ import { basicSetup as A, minimalSetup as F } from "codemirror";
18
+ import { indentWithTab as N } from "@codemirror/commands";
19
+ const U = (t) => t ? Object.entries(t).reduce((i, [n, s]) => (n = n.charAt(0).toUpperCase() + n.slice(1), n = `on${n}`, { ...i, [n]: s }), {}) : {}, S = (t, i = {}, n) => {
20
+ if (V && parseInt(x.version) < 2.7)
21
+ return h(t, i, n);
22
+ const { props: s, domProps: o, on: l, ...c } = i, u = l ? U(l) : {};
23
+ return h(t, { ...c, ...s, ...o, ...u }, n);
24
+ }, W = (t) => typeof t == "function" ? t() : t, w = B({
37
25
  name: "CodeMirror",
38
26
  model: {
39
27
  prop: "modelValue",
@@ -46,181 +34,152 @@ var CodeMirror = defineComponent({
46
34
  },
47
35
  theme: {
48
36
  type: Object,
49
- default: () => {
50
- return {};
51
- }
37
+ default: () => ({})
52
38
  },
53
39
  dark: {
54
40
  type: Boolean,
55
- default: false
41
+ default: !1
56
42
  },
57
43
  basic: {
58
44
  type: Boolean,
59
- default: false
45
+ default: !1
60
46
  },
61
47
  minimal: {
62
48
  type: Boolean,
63
- default: false
49
+ default: !1
64
50
  },
65
51
  wrap: {
66
52
  type: Boolean,
67
- default: false
53
+ default: !1
68
54
  },
69
55
  tab: {
70
56
  type: Boolean,
71
- default: false
57
+ default: !1
72
58
  },
73
59
  readonly: {
74
60
  type: Boolean,
75
- default: false
61
+ default: !1
76
62
  },
77
63
  editable: {
78
64
  type: Boolean,
79
- default: true
65
+ default: !0
80
66
  },
81
67
  extensions: {
82
68
  type: Array,
83
- default: () => {
84
- return [];
85
- }
69
+ default: () => []
86
70
  },
87
71
  phrases: {
88
72
  type: Object,
89
- default: () => void 0
73
+ default: () => {
74
+ }
90
75
  },
91
76
  lang: {
92
77
  type: Object,
93
- default: () => void 0
78
+ default: () => {
79
+ }
94
80
  },
95
81
  linter: {
96
82
  type: Function,
97
- default: () => void 0
83
+ default: void 0
98
84
  },
99
85
  lintGutter: {
100
86
  type: Boolean,
101
- defalt: false
87
+ defalt: !1
102
88
  }
103
89
  },
104
90
  emits: ["update:modelValue", "update:view"],
105
- setup(props, context) {
106
- const editor = ref();
107
- const doc = ref(props.modelValue);
108
- let view;
109
- const cursor = computed({
110
- get: () => view.state.selection.main.head || 0,
111
- set: (p) => view.dispatch({ selection: { anchor: p } })
112
- });
113
- const emit = context.emit;
114
- watch(() => props.modelValue, (text) => {
115
- if (view.composing) {
116
- return;
91
+ setup(t, i) {
92
+ const n = p(), s = p(t.modelValue);
93
+ let o;
94
+ const l = r({
95
+ get: () => o.state.selection,
96
+ set: (e) => o.dispatch({ selection: e })
97
+ }), c = r({
98
+ get: () => l.value.main.head || 0,
99
+ set: (e) => o.dispatch({ selection: { anchor: e } })
100
+ }), u = r({
101
+ get: () => o.state,
102
+ set: (e) => o.setState(e)
103
+ }), b = r({
104
+ get: () => o.hasFocus,
105
+ set: (e) => {
106
+ e && o.focus();
117
107
  }
118
- const previous = view.state.selection;
119
- view.dispatch({
120
- changes: { from: 0, to: view.state.doc.length, insert: text },
121
- selection: previous
108
+ }), m = r(() => E([
109
+ t.basic ? A : void 0,
110
+ t.minimal && !t.basic ? F : void 0,
111
+ d.updateListener.of((e) => f("update:view", e)),
112
+ d.theme(t.theme, { dark: t.dark }),
113
+ t.wrap ? d.lineWrapping : void 0,
114
+ t.tab ? D.of([N]) : void 0,
115
+ t.phrases ? g.phrases.of(t.phrases) : void 0,
116
+ t.readonly ? g.readOnly.of(t.readonly) : void 0,
117
+ t.editable ? d.editable.of(t.editable) : void 0,
118
+ t.lang ? O(t.lang) : void 0,
119
+ t.linter ? G(t.linter) : void 0,
120
+ t.linter && t.lintGutter ? L() : void 0,
121
+ ...t.extensions
122
+ ])), f = i.emit;
123
+ return v(() => t.modelValue, (e) => {
124
+ if (o.composing)
125
+ return;
126
+ const a = o.state.selection;
127
+ o.dispatch({
128
+ changes: { from: 0, to: o.state.doc.length, insert: e },
129
+ selection: a
122
130
  });
123
- });
124
- watch(() => props.dark, () => {
125
- view.dispatch({
126
- effects: StateEffect.reconfigure.of(getExtensions())
131
+ }), v(m, (e) => {
132
+ o.dispatch({
133
+ effects: $.reconfigure.of(e)
127
134
  });
128
- });
129
- onMounted(async () => {
130
- let value = doc.value;
131
- if (editor.value && editor.value.childNodes[0]) {
132
- if (doc.value !== "") {
133
- console.warn("[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values.");
134
- }
135
- value = trim(editor.value.childNodes[0].innerText);
136
- }
137
- view = new EditorView({
138
- doc: value,
139
- extensions: getExtensions(),
140
- parent: editor.value,
141
- dispatch: (tr) => {
142
- view.update([tr]);
143
- if (tr.changes.empty)
144
- return;
145
- emit("update:modelValue", view.state.doc.toString());
135
+ }), M(async () => {
136
+ let e = s.value;
137
+ n.value && n.value.childNodes[0] && (s.value !== "" && console.warn("[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."), e = T(n.value.childNodes[0].innerText)), o = new d({
138
+ doc: e,
139
+ extensions: m.value,
140
+ parent: n.value,
141
+ dispatch: (a) => {
142
+ o.update([a]), !a.changes.empty && f("update:modelValue", o.state.doc.toString());
146
143
  }
147
- });
148
- await nextTick();
149
- });
150
- onUnmounted(() => view.destroy());
151
- const getExtensions = () => {
152
- const extensions = compact([
153
- props.basic ? basicSetup : void 0,
154
- props.minimal && !props.basic ? minimalSetup : void 0,
155
- EditorView.updateListener.of((update) => emit("update", update)),
156
- EditorView.theme(props.theme, { dark: props.dark }),
157
- props.wrap ? EditorView.lineWrapping : void 0,
158
- props.tab ? keymap.of([indentWithTab]) : void 0,
159
- props.phrases ? EditorState.phrases.of(props.phrases) : void 0,
160
- props.readonly ? EditorState.readOnly.of(props.readonly) : void 0,
161
- props.editable ? EditorView.editable.of(props.editable) : void 0,
162
- props.lang ? toRaw(props.lang) : void 0,
163
- props.linter ? linter(props.linter) : void 0,
164
- props.linter && props.lintGutter ? lintGutter() : void 0,
165
- ...props.extensions
166
- ]);
167
- return extensions;
168
- };
169
- const selection = () => view.state.selection;
170
- const getRange = (from, to) => view.state.sliceDoc(from, to);
171
- const getLine = (number) => view.state.doc.line(number + 1).text;
172
- const lineCount = () => view.state.doc.lines;
173
- const getCursor = () => cursor.value;
174
- const listSelections = () => selection().ranges;
175
- const getSelection = () => view.state.sliceDoc(selection().main.from, selection().main.to);
176
- const getSelections = () => selection().ranges.map((r) => view.state.sliceDoc(r.from, r.to));
177
- const somethingSelected = () => selection().ranges.some((r) => !r.empty);
178
- const replaceRange = (replacement, from, to) => view.dispatch({
179
- changes: { from, to, insert: replacement }
180
- });
181
- const replaceSelection = (replacement) => view.dispatch(view.state.replaceSelection(replacement));
182
- const setCursor = (position) => cursor.value = position;
183
- const setSelection = (anchor, head) => view.dispatch({ selection: { anchor, head } });
184
- const setSelections = (ranges, primary) => view.dispatch({
185
- selection: EditorSelection.create(ranges, primary)
186
- });
187
- const extendSelectionsBy = (f) => view.dispatch({
188
- selection: EditorSelection.create(selection().ranges.map((r) => r.extend(f(r))))
189
- });
190
- const focus = () => view.focus();
191
- const hasFocus = () => view.hasFocus;
192
- return {
193
- context,
194
- editor,
195
- cursor,
196
- selection,
197
- getRange,
198
- getLine,
199
- lineCount,
200
- getCursor,
201
- listSelections,
202
- getSelection,
203
- getSelections,
204
- somethingSelected,
205
- replaceRange,
206
- replaceSelection,
207
- setCursor,
208
- setSelection,
209
- setSelections,
210
- extendSelectionsBy,
211
- focus,
212
- hasFocus
144
+ }), await R();
145
+ }), j(() => o.destroy()), {
146
+ context: i,
147
+ editor: n,
148
+ cursor: c,
149
+ selection: l,
150
+ state: u,
151
+ focus: b,
152
+ getRange: (e, a) => o.state.sliceDoc(e, a),
153
+ getLine: (e) => o.state.doc.line(e + 1).text,
154
+ lineCount: () => o.state.doc.lines,
155
+ getCursor: () => c.value,
156
+ listSelections: () => o.state.selection.ranges,
157
+ getSelection: () => o.state.sliceDoc(o.state.selection.main.from, o.state.selection.main.to),
158
+ getSelections: () => o.state.selection.ranges.map((e) => o.state.sliceDoc(e.from, e.to)),
159
+ somethingSelected: () => o.state.selection.ranges.some((e) => !e.empty),
160
+ replaceRange: (e, a, C) => o.dispatch({
161
+ changes: { from: a, to: C, insert: e }
162
+ }),
163
+ replaceSelection: (e) => o.dispatch(o.state.replaceSelection(e)),
164
+ setCursor: (e) => c.value = e,
165
+ setSelection: (e, a) => o.dispatch({ selection: { anchor: e, head: a } }),
166
+ setSelections: (e, a) => o.dispatch({
167
+ selection: y.create(e, a)
168
+ }),
169
+ extendSelectionsBy: (e) => o.dispatch({
170
+ selection: y.create(l.value.ranges.map((a) => a.extend(e(a))))
171
+ })
213
172
  };
214
173
  },
215
174
  render() {
216
- return h("div", {
175
+ return S("div", {
217
176
  ref: "editor",
218
177
  class: "vue-codemirror"
219
- }, this.$slots.default ? h("aside", { style: "display: none;", "aria-hidden": "true" }, slot(this.$slots.default)) : void 0);
178
+ }, this.$slots.default ? S("aside", { style: "display: none;", "aria-hidden": "true" }, W(this.$slots.default)) : void 0);
220
179
  }
221
- });
222
- const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
223
- if (typeof window !== "undefined" && window.Vue) {
224
- window.Vue.use(CodeMirror);
225
- }
226
- export { CodeMirror as default, installCodeMirror as install };
180
+ }), ce = (t) => t.component("CodeMirror", w);
181
+ typeof window < "u" && window.Vue && window.Vue.use(w);
182
+ export {
183
+ w as default,
184
+ ce as install
185
+ };
package/dist/index.umd.js CHANGED
@@ -5,8 +5,8 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2022 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 0.6.5
8
+ * @version 0.6.8
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
12
- (function(r,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue-demi"),require("lodash"),require("@codemirror/state"),require("@codemirror/view"),require("@codemirror/lint"),require("codemirror"),require("@codemirror/commands")):typeof define=="function"&&define.amd?define(["exports","vue-demi","lodash","@codemirror/state","@codemirror/view","@codemirror/lint","codemirror","@codemirror/commands"],n):(r=typeof globalThis<"u"?globalThis:r||self,n(r.CodeMirror={},r.VueDemi,r.lodash,r.state,r.view,r.lint,r.codemirror,r.commands))})(this,function(r,n,g,f,c,y,S,w){"use strict";const V=e=>e?Object.entries(e).reduce((s,[a,l])=>(a=a.charAt(0).toUpperCase()+a.slice(1),a=`on${a}`,{...s,[a]:l}),{}):null,v=(e,s={},a)=>{if(n.isVue2)return n.h(e,s,a);const{props:l,domProps:o,on:u,...m}=s,h=u?V(u):{};return n.h(e,{...m,...l,...o,...h},a)},C=e=>typeof e=="function"?e():e;var p=n.defineComponent({name:"CodeMirror",model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:String,default:""},theme:{type:Object,default:()=>({})},dark:{type:Boolean,default:!1},basic:{type:Boolean,default:!1},minimal:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1},tab:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},extensions:{type:Array,default:()=>[]},phrases:{type:Object,default:()=>{}},lang:{type:Object,default:()=>{}},linter:{type:Function,default:()=>{}},lintGutter:{type:Boolean,defalt:!1}},emits:["update:modelValue","update:view"],setup(e,s){const a=n.ref(),l=n.ref(e.modelValue);let o;const u=n.computed({get:()=>o.state.selection.main.head||0,set:t=>o.dispatch({selection:{anchor:t}})}),m=s.emit;n.watch(()=>e.modelValue,t=>{if(o.composing)return;const i=o.state.selection;o.dispatch({changes:{from:0,to:o.state.doc.length,insert:t},selection:i})}),n.watch(()=>e.dark,()=>{o.dispatch({effects:f.StateEffect.reconfigure.of(h())})}),n.onMounted(async()=>{let t=l.value;a.value&&a.value.childNodes[0]&&(l.value!==""&&console.warn("[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."),t=g.trim(a.value.childNodes[0].innerText)),o=new c.EditorView({doc:t,extensions:h(),parent:a.value,dispatch:i=>{o.update([i]),!i.changes.empty&&m("update:modelValue",o.state.doc.toString())}}),await n.nextTick()}),n.onUnmounted(()=>o.destroy());const h=()=>g.compact([e.basic?S.basicSetup:void 0,e.minimal&&!e.basic?S.minimalSetup:void 0,c.EditorView.updateListener.of(i=>m("update",i)),c.EditorView.theme(e.theme,{dark:e.dark}),e.wrap?c.EditorView.lineWrapping:void 0,e.tab?c.keymap.of([w.indentWithTab]):void 0,e.phrases?f.EditorState.phrases.of(e.phrases):void 0,e.readonly?f.EditorState.readOnly.of(e.readonly):void 0,e.editable?c.EditorView.editable.of(e.editable):void 0,e.lang?n.toRaw(e.lang):void 0,e.linter?y.linter(e.linter):void 0,e.linter&&e.lintGutter?y.lintGutter():void 0,...e.extensions]),d=()=>o.state.selection;return{context:s,editor:a,cursor:u,selection:d,getRange:(t,i)=>o.state.sliceDoc(t,i),getLine:t=>o.state.doc.line(t+1).text,lineCount:()=>o.state.doc.lines,getCursor:()=>u.value,listSelections:()=>d().ranges,getSelection:()=>o.state.sliceDoc(d().main.from,d().main.to),getSelections:()=>d().ranges.map(t=>o.state.sliceDoc(t.from,t.to)),somethingSelected:()=>d().ranges.some(t=>!t.empty),replaceRange:(t,i,b)=>o.dispatch({changes:{from:i,to:b,insert:t}}),replaceSelection:t=>o.dispatch(o.state.replaceSelection(t)),setCursor:t=>u.value=t,setSelection:(t,i)=>o.dispatch({selection:{anchor:t,head:i}}),setSelections:(t,i)=>o.dispatch({selection:f.EditorSelection.create(t,i)}),extendSelectionsBy:t=>o.dispatch({selection:f.EditorSelection.create(d().ranges.map(i=>i.extend(t(i))))}),focus:()=>o.focus(),hasFocus:()=>o.hasFocus}},render(){return v("div",{ref:"editor",class:"vue-codemirror"},this.$slots.default?v("aside",{style:"display: none;","aria-hidden":"true"},C(this.$slots.default)):void 0)}});const x=e=>e.component("CodeMirror",p);typeof window<"u"&&window.Vue&&window.Vue.use(p),r.default=p,r.install=x,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
12
+ (function(a,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue-demi"),require("lodash"),require("@codemirror/state"),require("@codemirror/view"),require("@codemirror/lint"),require("codemirror"),require("@codemirror/commands")):typeof define=="function"&&define.amd?define(["exports","vue-demi","lodash","@codemirror/state","@codemirror/view","@codemirror/lint","codemirror","@codemirror/commands"],n):(a=typeof globalThis<"u"?globalThis:a||self,n(a.CodeMirror={},a.VueDemi,a.lodash,a.state,a.view,a.lint,a.codemirror,a.commands))})(this,function(a,n,p,u,d,g,y,V){"use strict";const C=t=>t?Object.entries(t).reduce((r,[i,c])=>(i=i.charAt(0).toUpperCase()+i.slice(1),i=`on${i}`,{...r,[i]:c}),{}):{},S=(t,r={},i)=>{if(n.isVue2&&parseInt(n.Vue2.version)<2.7)return n.h(t,r,i);const{props:c,domProps:o,on:l,...f}=r,h=l?C(l):{};return n.h(t,{...f,...c,...o,...h},i)},b=t=>typeof t=="function"?t():t,m=n.defineComponent({name:"CodeMirror",model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:String,default:""},theme:{type:Object,default:()=>({})},dark:{type:Boolean,default:!1},basic:{type:Boolean,default:!1},minimal:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1},tab:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},extensions:{type:Array,default:()=>[]},phrases:{type:Object,default:()=>{}},lang:{type:Object,default:()=>{}},linter:{type:Function,default:void 0},lintGutter:{type:Boolean,defalt:!1}},emits:["update:modelValue","update:view"],setup(t,r){const i=n.ref(),c=n.ref(t.modelValue);let o;const l=n.computed({get:()=>o.state.selection,set:e=>o.dispatch({selection:e})}),f=n.computed({get:()=>l.value.main.head||0,set:e=>o.dispatch({selection:{anchor:e}})}),h=n.computed({get:()=>o.state,set:e=>o.setState(e)}),B=n.computed({get:()=>o.hasFocus,set:e=>{e&&o.focus()}}),v=n.computed(()=>p.compact([t.basic?y.basicSetup:void 0,t.minimal&&!t.basic?y.minimalSetup:void 0,d.EditorView.updateListener.of(e=>w("update:view",e)),d.EditorView.theme(t.theme,{dark:t.dark}),t.wrap?d.EditorView.lineWrapping:void 0,t.tab?d.keymap.of([V.indentWithTab]):void 0,t.phrases?u.EditorState.phrases.of(t.phrases):void 0,t.readonly?u.EditorState.readOnly.of(t.readonly):void 0,t.editable?d.EditorView.editable.of(t.editable):void 0,t.lang?n.toRaw(t.lang):void 0,t.linter?g.linter(t.linter):void 0,t.linter&&t.lintGutter?g.lintGutter():void 0,...t.extensions])),w=r.emit;return n.watch(()=>t.modelValue,e=>{if(o.composing)return;const s=o.state.selection;o.dispatch({changes:{from:0,to:o.state.doc.length,insert:e},selection:s})}),n.watch(v,e=>{o.dispatch({effects:u.StateEffect.reconfigure.of(e)})}),n.onMounted(async()=>{let e=c.value;i.value&&i.value.childNodes[0]&&(c.value!==""&&console.warn("[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."),e=p.trim(i.value.childNodes[0].innerText)),o=new d.EditorView({doc:e,extensions:v.value,parent:i.value,dispatch:s=>{o.update([s]),!s.changes.empty&&w("update:modelValue",o.state.doc.toString())}}),await n.nextTick()}),n.onUnmounted(()=>o.destroy()),{context:r,editor:i,cursor:f,selection:l,state:h,focus:B,getRange:(e,s)=>o.state.sliceDoc(e,s),getLine:e=>o.state.doc.line(e+1).text,lineCount:()=>o.state.doc.lines,getCursor:()=>f.value,listSelections:()=>o.state.selection.ranges,getSelection:()=>o.state.sliceDoc(o.state.selection.main.from,o.state.selection.main.to),getSelections:()=>o.state.selection.ranges.map(e=>o.state.sliceDoc(e.from,e.to)),somethingSelected:()=>o.state.selection.ranges.some(e=>!e.empty),replaceRange:(e,s,E)=>o.dispatch({changes:{from:s,to:E,insert:e}}),replaceSelection:e=>o.dispatch(o.state.replaceSelection(e)),setCursor:e=>f.value=e,setSelection:(e,s)=>o.dispatch({selection:{anchor:e,head:s}}),setSelections:(e,s)=>o.dispatch({selection:u.EditorSelection.create(e,s)}),extendSelectionsBy:e=>o.dispatch({selection:u.EditorSelection.create(l.value.ranges.map(s=>s.extend(e(s))))})}},render(){return S("div",{ref:"editor",class:"vue-codemirror"},this.$slots.default?S("aside",{style:"display: none;","aria-hidden":"true"},b(this.$slots.default)):void 0)}}),x=t=>t.component("CodeMirror",m);typeof window<"u"&&window.Vue&&window.Vue.use(m),a.default=m,a.install=x,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "vue-codemirror6",
4
- "version": "0.6.5",
4
+ "version": "0.6.8",
5
+ "license": "MIT",
5
6
  "description": "CodeMirror6 Component for vue2 and vue3",
6
7
  "keywords": [
7
8
  "vuejs",
@@ -32,24 +33,23 @@
32
33
  "bugs": {
33
34
  "url": "https://github.com/logue/vue-codemirror6/issues"
34
35
  },
35
- "engines": {
36
- "node": ">=16.15.1",
37
- "yarn": ">=1.22.4"
38
- },
39
- "packageManager": "yarn@3.2.1",
40
- "license": "MIT",
41
36
  "main": "./dist/index.umd.js",
42
37
  "module": "./dist/index.es.js",
38
+ "types": "./dist/index.d.ts",
43
39
  "exports": {
44
40
  ".": {
45
41
  "import": "./dist/index.es.js",
46
42
  "require": "./dist/index.umd.js"
47
43
  }
48
44
  },
49
- "types": "./dist/index.d.ts",
50
45
  "files": [
51
46
  "/dist"
52
47
  ],
48
+ "engines": {
49
+ "node": ">=16.16.0",
50
+ "yarn": ">=1.22.4"
51
+ },
52
+ "packageManager": "yarn@3.2.1",
53
53
  "sideEffects": false,
54
54
  "scripts": {
55
55
  "dev": "vite",
@@ -64,11 +64,11 @@
64
64
  "prepare": "husky install"
65
65
  },
66
66
  "dependencies": {
67
- "codemirror": "^6.0.1",
68
67
  "vue-demi": "latest"
69
68
  },
70
69
  "peerDependencies": {
71
- "@vue/composition-api": "^1.6.3",
70
+ "@vue/composition-api": "^1.7.0",
71
+ "codemirror": "^6.0.1",
72
72
  "vue": "^2.6.14 || ^3.2.37"
73
73
  },
74
74
  "peerDependenciesMeta": {
@@ -77,24 +77,26 @@
77
77
  }
78
78
  },
79
79
  "devDependencies": {
80
- "@codemirror/lang-javascript": "^6.0.1",
81
- "@codemirror/lang-markdown": "^6.0.0",
80
+ "@codemirror/lang-javascript": "^6.0.2",
81
+ "@codemirror/lang-markdown": "^6.0.1",
82
82
  "@types/lodash": "^4.14.182",
83
- "@types/node": "^18.0.1",
84
- "@typescript-eslint/eslint-plugin": "^5.30.4",
85
- "@typescript-eslint/parser": "^5.30.4",
86
- "@vitejs/plugin-vue": "^2.3.3",
83
+ "@types/node": "^18.6.3",
84
+ "@typescript-eslint/eslint-plugin": "^5.31.0",
85
+ "@typescript-eslint/parser": "^5.31.0",
86
+ "@vitejs/plugin-vue": "^3.0.1",
87
87
  "@vue/eslint-config-prettier": "^7.0.0",
88
- "eslint": "^8.19.0",
88
+ "@vue/tsconfig": "^0.1.3",
89
+ "codemirror": "^6.0.1",
90
+ "eslint": "^8.21.0",
89
91
  "eslint-config-google": "^0.14.0",
90
92
  "eslint-config-prettier": "^8.5.0",
91
93
  "eslint-import-resolver-alias": "^1.1.2",
92
- "eslint-import-resolver-typescript": "^3.2.0",
93
- "eslint-plugin-html": "^6.2.0",
94
+ "eslint-import-resolver-typescript": "^3.3.0",
95
+ "eslint-plugin-html": "^7.1.0",
94
96
  "eslint-plugin-import": "^2.26.0",
95
- "eslint-plugin-jsdoc": "^39.3.3",
97
+ "eslint-plugin-jsdoc": "^39.3.4",
96
98
  "eslint-plugin-tsdoc": "^0.2.16",
97
- "eslint-plugin-vue": "^9.1.1",
99
+ "eslint-plugin-vue": "^9.3.0",
98
100
  "eslint-plugin-vuejs-accessibility": "^1.2.0",
99
101
  "eslint-plugin-yaml": "^0.5.0",
100
102
  "eslint4b-prebuilt": "^6.7.2",
@@ -103,14 +105,14 @@
103
105
  "lodash": "^4.17.21",
104
106
  "prettier": "^2.7.1",
105
107
  "rimraf": "^3.0.2",
106
- "rollup-plugin-visualizer": "^5.6.0",
107
- "typescript": "4.6.*",
108
- "vite": "^2.9.13",
108
+ "rollup-plugin-visualizer": "^5.7.1",
109
+ "typescript": "^4.7.4",
110
+ "vite": "^3.0.4",
109
111
  "vite-plugin-banner": "^0.3.0",
110
- "vite-plugin-checker": "^0.4.7",
112
+ "vite-plugin-checker": "^0.4.9",
111
113
  "vue": "^3.2.37",
112
114
  "vue-eslint-parser": "^9.0.3",
113
- "vue-tsc": "^0.38.2"
115
+ "vue-tsc": "^0.39.4"
114
116
  },
115
117
  "husky": {
116
118
  "hooks": {