vue-codemirror6 1.1.18 → 1.1.20

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,7 +4,7 @@ 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.18](https://github.com/logue/vue-codemirror6/compare/1.1.16...1.1.18)
7
+ #### [1.1.19](https://github.com/logue/vue-codemirror6/compare/1.1.16...1.1.19)
8
8
 
9
9
  - Fix for #17. [`5a45c9d`](https://github.com/logue/vue-codemirror6/commit/5a45c9d05d7c49ec5f738bc0af5317a6b6405e70)
10
10
  - Changed diagnostic counting method. Implemented to hook to ViewUpdate. [`cba57dd`](https://github.com/logue/vue-codemirror6/commit/cba57dd00333cbec27849776abd5f4f98cd4720d)
@@ -32,7 +32,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
32
32
 
33
33
  - chore(CODEOWNERS): CODEOWNERS.com Bot, at your service! [`#14`](https://github.com/logue/vue-codemirror6/pull/14)
34
34
  - Update demo code. (Replaced @codemirror/html to @codemirror/vue.) [`8da1a8a`](https://github.com/logue/vue-codemirror6/commit/8da1a8a4e37d713cc78281ce9c304c42a06940dc)
35
- - Changed implementation to generate *.d.ts with vite-plugin-dts. [`1caaa20`](https://github.com/logue/vue-codemirror6/commit/1caaa20b1423a3d252a6c770a630fb60e2e3440d)
35
+ - Changed implementation to generate \*.d.ts with vite-plugin-dts. [`1caaa20`](https://github.com/logue/vue-codemirror6/commit/1caaa20b1423a3d252a6c770a630fb60e2e3440d)
36
36
  - Update README.md. [`f8dd493`](https://github.com/logue/vue-codemirror6/commit/f8dd4934a7b9cc089cd830473db5250d28b3389b)
37
37
 
38
38
  #### [1.1.11](https://github.com/logue/vue-codemirror6/compare/1.1.3...1.1.11)
package/dist/index.es.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.18
8
+ * @version 1.1.20
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
@@ -467,7 +467,7 @@ var CodeMirror = defineComponent({
467
467
  selection.value.ranges.map((r) => r.extend(f(r)))
468
468
  )
469
469
  });
470
- context.expose({
470
+ const exposed = {
471
471
  editor,
472
472
  view,
473
473
  cursor,
@@ -493,10 +493,9 @@ var CodeMirror = defineComponent({
493
493
  setSelection,
494
494
  setSelections,
495
495
  extendSelectionsBy
496
- });
497
- return {
498
- editor
499
496
  };
497
+ context.expose(exposed);
498
+ return exposed;
500
499
  },
501
500
  render() {
502
501
  return h(
@@ -518,13 +517,14 @@ var CodeMirror = defineComponent({
518
517
  });
519
518
 
520
519
  const meta = {
521
- version: "1.1.18",
522
- date: "2023-04-04T00:08:06.631Z"
520
+ version: "1.1.20",
521
+ date: "2023-05-03T03:20:39.310Z"
523
522
  };
523
+ var meta$1 = meta;
524
524
 
525
525
  const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
526
526
  if (typeof window !== "undefined" && window.Vue) {
527
527
  window.Vue.use(CodeMirror);
528
528
  }
529
529
 
530
- export { meta as Meta, CodeMirror as default, installCodeMirror as install };
530
+ export { meta$1 as Meta, CodeMirror as default, installCodeMirror as install };
@@ -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.18
8
+ * @version 1.1.20
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
@@ -463,7 +463,7 @@ var CodeMirror = (function (exports, vueDemi, codemirror, view, state, lint, com
463
463
  selection.value.ranges.map((r) => r.extend(f(r)))
464
464
  )
465
465
  });
466
- context.expose({
466
+ const exposed = {
467
467
  editor,
468
468
  view: view$1,
469
469
  cursor,
@@ -489,10 +489,9 @@ var CodeMirror = (function (exports, vueDemi, codemirror, view, state, lint, com
489
489
  setSelection,
490
490
  setSelections,
491
491
  extendSelectionsBy
492
- });
493
- return {
494
- editor
495
492
  };
493
+ context.expose(exposed);
494
+ return exposed;
496
495
  },
497
496
  render() {
498
497
  return h(
@@ -514,16 +513,17 @@ var CodeMirror = (function (exports, vueDemi, codemirror, view, state, lint, com
514
513
  });
515
514
 
516
515
  const meta = {
517
- version: "1.1.18",
518
- date: "2023-04-04T00:08:06.631Z"
516
+ version: "1.1.20",
517
+ date: "2023-05-03T03:20:39.310Z"
519
518
  };
519
+ var meta$1 = meta;
520
520
 
521
521
  const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
522
522
  if (typeof window !== "undefined" && window.Vue) {
523
523
  window.Vue.use(CodeMirror);
524
524
  }
525
525
 
526
- exports.Meta = meta;
526
+ exports.Meta = meta$1;
527
527
  exports["default"] = CodeMirror;
528
528
  exports.install = installCodeMirror;
529
529
 
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.18
8
+ * @version 1.1.20
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
@@ -466,7 +466,7 @@
466
466
  selection.value.ranges.map((r) => r.extend(f(r)))
467
467
  )
468
468
  });
469
- context.expose({
469
+ const exposed = {
470
470
  editor,
471
471
  view: view$1,
472
472
  cursor,
@@ -492,10 +492,9 @@
492
492
  setSelection,
493
493
  setSelections,
494
494
  extendSelectionsBy
495
- });
496
- return {
497
- editor
498
495
  };
496
+ context.expose(exposed);
497
+ return exposed;
499
498
  },
500
499
  render() {
501
500
  return h(
@@ -517,16 +516,17 @@
517
516
  });
518
517
 
519
518
  const meta = {
520
- version: "1.1.18",
521
- date: "2023-04-04T00:08:06.631Z"
519
+ version: "1.1.20",
520
+ date: "2023-05-03T03:20:39.310Z"
522
521
  };
522
+ var meta$1 = meta;
523
523
 
524
524
  const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
525
525
  if (typeof window !== "undefined" && window.Vue) {
526
526
  window.Vue.use(CodeMirror);
527
527
  }
528
528
 
529
- exports.Meta = meta;
529
+ exports.Meta = meta$1;
530
530
  exports["default"] = CodeMirror;
531
531
  exports.install = installCodeMirror;
532
532
 
@@ -1,6 +1,6 @@
1
- import { type PropType, type Ref } from 'vue-demi';
1
+ import { type PropType, type Ref, type ShallowRef, type WritableComputedRef } from 'vue-demi';
2
2
  import { EditorView, type ViewUpdate } from '@codemirror/view';
3
- import { EditorState, type Extension, type Text } from '@codemirror/state';
3
+ import { EditorSelection, EditorState, type Extension, type SelectionRange, type StateField, type Text } from '@codemirror/state';
4
4
  import { type LintSource } from '@codemirror/lint';
5
5
  import type { LanguageSupport } from '@codemirror/language';
6
6
  import type { StyleSpec } from 'style-mod';
@@ -206,6 +206,29 @@ declare const _default: import("vue-demi").DefineComponent<{
206
206
  };
207
207
  }, {
208
208
  editor: Ref<HTMLElement | undefined>;
209
+ view: ShallowRef<EditorView>;
210
+ cursor: WritableComputedRef<number>;
211
+ selection: WritableComputedRef<EditorSelection>;
212
+ focus: WritableComputedRef<boolean>;
213
+ length: Ref<number>;
214
+ json: WritableComputedRef<Record<string, StateField<any>>>;
215
+ diagnosticCount: Ref<number>;
216
+ lint: () => void;
217
+ forceReconfigure: () => void;
218
+ getRange: (from?: number, to?: number) => string | undefined;
219
+ getLine: (number: number) => string;
220
+ lineCount: () => number;
221
+ getCursor: () => number;
222
+ listSelections: () => readonly SelectionRange[];
223
+ getSelection: () => string;
224
+ getSelections: () => string[];
225
+ somethingSelected: () => boolean;
226
+ replaceRange: (replacement: string | Text, from: number, to: number) => void;
227
+ replaceSelection: (replacement: string | Text) => void;
228
+ setCursor: (position: number) => void;
229
+ setSelection: (anchor: number, head?: number) => void;
230
+ setSelections: (ranges: readonly SelectionRange[], primary?: number) => void;
231
+ extendSelectionsBy: (f: any) => void;
209
232
  }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {
210
233
  /** Model Update */
211
234
  'update:modelValue': (value: string | Text) => boolean;
@@ -6,15 +6,15 @@
6
6
  import { type Slots, type VNode, type VNodeProps } from 'vue-demi';
7
7
  interface Options extends VNodeProps {
8
8
  class?: string;
9
- domProps?: Record<any, any>;
10
- on?: Record<any, any>;
11
- props?: Record<any, any>;
9
+ domProps?: VNodeProps;
10
+ on?: Record<string, () => void>;
11
+ props?: VNodeProps;
12
12
  style?: string;
13
13
  'aria-hidden'?: string;
14
14
  }
15
15
  /**
16
16
  * hDemi function.
17
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 };
18
+ export default function h(type: string | Record<any, any>, options?: Options, chidren?: any): VNode;
19
+ export declare const slot: (defaultSlots: any) => Slots;
20
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "vue-codemirror6",
4
- "version": "1.1.18",
4
+ "version": "1.1.20",
5
5
  "license": "MIT",
6
6
  "description": "CodeMirror6 Component for vue2 and vue3.",
7
7
  "keywords": [
@@ -55,7 +55,7 @@
55
55
  "engines": {
56
56
  "yarn": ">=1.22.19"
57
57
  },
58
- "packageManager": "yarn@3.5.0",
58
+ "packageManager": "yarn@3.5.1",
59
59
  "sideEffects": false,
60
60
  "scripts": {
61
61
  "dev": "vite",
@@ -79,24 +79,25 @@
79
79
  "vue": "^2.7.14 || ^3.2"
80
80
  },
81
81
  "devDependencies": {
82
- "@codemirror/lang-javascript": "^6.1.4",
82
+ "@codemirror/lang-javascript": "^6.1.7",
83
83
  "@codemirror/lang-json": "^6.0.1",
84
- "@codemirror/lang-markdown": "^6.1.0",
84
+ "@codemirror/lang-markdown": "^6.1.1",
85
85
  "@codemirror/lang-vue": "^0.1.1",
86
- "@types/lodash": "^4.14.192",
87
- "@types/node": "^18.15.11",
88
- "@typescript-eslint/eslint-plugin": "^5.57.1",
89
- "@typescript-eslint/parser": "^5.57.1",
90
- "@vitejs/plugin-vue": "^4.1.0",
86
+ "@tsconfig/node-lts": "^18.12.1",
87
+ "@types/node": "^18.16.3",
88
+ "@typescript-eslint/eslint-plugin": "^5.59.2",
89
+ "@typescript-eslint/parser": "^5.59.2",
90
+ "@vitejs/plugin-vue": "^4.2.1",
91
+ "@vue/compiler-sfc": "^3.2.47",
91
92
  "@vue/eslint-config-prettier": "^7.1.0",
92
- "@vue/tsconfig": "^0.1.3",
93
- "@vueuse/core": "^9.13.0",
94
- "bootstrap": "5.3.0-alpha2",
95
- "eslint": "^8.37.0",
93
+ "@vue/tsconfig": "^0.3.2",
94
+ "@vueuse/core": "^10.1.2",
95
+ "bootstrap": "5.3.0-alpha3",
96
+ "eslint": "^8.39.0",
96
97
  "eslint-config-standard-with-typescript": "latest",
97
98
  "eslint-import-resolver-alias": "^1.1.2",
98
- "eslint-import-resolver-typescript": "^3.5.4",
99
- "eslint-linter-browserify": "^8.37.0",
99
+ "eslint-import-resolver-typescript": "^3.5.5",
100
+ "eslint-linter-browserify": "^8.39.0",
100
101
  "eslint-plugin-html": "^7.1.0",
101
102
  "eslint-plugin-import": "^2.27.5",
102
103
  "eslint-plugin-n": "^15.7.0",
@@ -106,21 +107,21 @@
106
107
  "eslint-plugin-vuejs-accessibility": "^2.1.0",
107
108
  "eslint-plugin-yaml": "^0.5.0",
108
109
  "husky": "^8.0.3",
109
- "lint-staged": "^13.2.0",
110
+ "lint-staged": "^13.2.2",
110
111
  "npm-run-all": "^4.1.5",
111
- "prettier": "^2.8.7",
112
- "rimraf": "^4.4.1",
112
+ "prettier": "^2.8.8",
113
+ "rimraf": "^5.0.0",
113
114
  "rollup-plugin-visualizer": "^5.9.0",
114
- "sass": "^1.60.0",
115
- "typescript": "^4.9.5",
116
- "vite": "^4.2.1",
115
+ "sass": "^1.62.1",
116
+ "typescript": "^5.0.4",
117
+ "vite": "^4.3.4",
117
118
  "vite-plugin-banner": "^0.7.0",
118
- "vite-plugin-checker": "^0.5.6",
119
- "vite-plugin-dts": "^2.2.0",
119
+ "vite-plugin-checker": "^0.6.0",
120
+ "vite-plugin-dts": "^2.3.0",
120
121
  "vue": "^3.2.47",
121
- "vue-eslint-parser": "^9.1.1",
122
- "vue-markdown-wasm": "^0.3.6",
123
- "vue-tsc": "^1.2.0"
122
+ "vue-eslint-parser": "^9.2.0",
123
+ "vue-markdown-wasm": "^0.3.7",
124
+ "vue-tsc": "^1.6.3"
124
125
  },
125
126
  "husky": {
126
127
  "hooks": {
@@ -132,7 +133,8 @@
132
133
  "*": "prettier -w -u"
133
134
  },
134
135
  "resolutions": {
136
+ "http-cache-semantics": "^4.1.1",
135
137
  "json5": "^2.2.3",
136
- "http-cache-semantics": "^4.1.1"
138
+ "yaml": "^2.2.2"
137
139
  }
138
140
  }
@@ -649,8 +649,7 @@ export default defineComponent({
649
649
  ),
650
650
  });
651
651
 
652
- /** Export properties and functions */
653
- context.expose({
652
+ const exposed = {
654
653
  editor,
655
654
  view,
656
655
  cursor,
@@ -676,11 +675,11 @@ export default defineComponent({
676
675
  setSelection,
677
676
  setSelections,
678
677
  extendSelectionsBy,
679
- });
680
-
681
- return {
682
- editor,
683
678
  };
679
+
680
+ /** Export properties and functions */
681
+ context.expose(exposed);
682
+ return exposed;
684
683
  },
685
684
  render() {
686
685
  // <template>