vue-codemirror6 1.1.6 → 1.1.10

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,10 @@ 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.4](https://github.com/logue/vue-codemirror6/compare/1.1.4...1.1.4)
7
+ #### [1.1.6](https://github.com/logue/vue-codemirror6/compare/1.1.3...1.1.6)
8
8
 
9
- > 12 January 2023
10
-
11
- - Update dependencies. [`febe5f1`](https://github.com/logue/vue-codemirror6/commit/febe5f1822d86a8e30d38fc6440b13209b41186d)
9
+ - Fix for #11 [`c634b55`](https://github.com/logue/vue-codemirror6/commit/c634b555ffff93bb30da2f501ec366289fc86ec1)
10
+ - Update dependencies. [`63d99a2`](https://github.com/logue/vue-codemirror6/commit/63d99a23a5df4771ca1c3edea8e8f97502622228)
12
11
  - release v1.1.2 [`903af1f`](https://github.com/logue/vue-codemirror6/commit/903af1fcf128ea7958ca9ae40fc97f062d8696d1)
13
12
 
14
13
  #### [1.1.3](https://github.com/logue/vue-codemirror6/compare/1.1.2...1.1.3)
package/README.md CHANGED
@@ -261,13 +261,14 @@ export default defineComponent({
261
261
 
262
262
  ## Methods
263
263
 
264
- | Method | Description |
265
- | --------- | --------------------------------------------------------------------------------------------------- |
266
- | selection | Get and set the [EditorSelection](https://codemirror.net/docs/ref/#state.EditorSelection) instance. |
267
- | cursor | Get and set the [cursor](https://codemirror.net/docs/ref/#state.EditorSelection^cursor) location. |
268
- | state | Get and set [EditorState](https://codemirror.net/docs/ref/#state.EditorState). |
269
- | focus | Get and set [focus](https://codemirror.net/docs/ref/#view.EditorView.focus). |
270
- | lint | Force run linter (Only if `linter` prop is specified) |
264
+ | Method | Description |
265
+ | ---------------- | --------------------------------------------------------------------------------------------------- |
266
+ | selection | Get and set the [EditorSelection](https://codemirror.net/docs/ref/#state.EditorSelection) instance. |
267
+ | cursor | Get and set the [cursor](https://codemirror.net/docs/ref/#state.EditorSelection^cursor) location. |
268
+ | state | Get and set [EditorState](https://codemirror.net/docs/ref/#state.EditorState). |
269
+ | focus | Get and set [focus](https://codemirror.net/docs/ref/#view.EditorView.focus). |
270
+ | lint | Force run linter (Only if `linter` prop is specified) |
271
+ | forceReconfigure | Re register all extensions. |
271
272
 
272
273
  The instructions below are compatible methods for those familiar with [codemirror5](https://codemirror.net/5/). Since the above method is usually sufficient, its active use is not recommended.
273
274
 
package/dist/Meta.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // This file is auto-generated by the build system.
2
2
  const meta = {
3
- version: '1.1.6',
4
- date: '2023-01-16T11:26:58.296Z',
3
+ version: '1.1.10',
4
+ date: '2023-01-29T01:57:06.994Z',
5
5
  };
6
6
  export default meta;
@@ -371,6 +371,21 @@ export default defineComponent({
371
371
  forceLinting(view.value);
372
372
  }
373
373
  };
374
+ /**
375
+ * Force Reconfigure Extension
376
+ *
377
+ * @see {@link https://codemirror.net/examples/config/#top-level-reconfiguration}
378
+ */
379
+ const forceReconfigure = () => {
380
+ // Deconfigure all Extensions
381
+ view.value.dispatch({
382
+ effects: StateEffect.reconfigure.of([]),
383
+ });
384
+ // Register extensions
385
+ view.value.dispatch({
386
+ effects: StateEffect.appendConfig.of(extensions.value),
387
+ });
388
+ };
374
389
  /* ----- Bellow is experimental. ------ */
375
390
  /**
376
391
  * Get the text between the given points in the editor.
@@ -456,6 +471,7 @@ export default defineComponent({
456
471
  focus,
457
472
  length,
458
473
  lint,
474
+ forceReconfigure,
459
475
  // Bellow is CodeMirror5's function
460
476
  getRange,
461
477
  getLine,
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.6
8
+ * @version 1.1.10
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
@@ -245,6 +245,14 @@ var CodeMirror = defineComponent({
245
245
  forceLinting(view.value);
246
246
  }
247
247
  };
248
+ const forceReconfigure = () => {
249
+ view.value.dispatch({
250
+ effects: StateEffect.reconfigure.of([])
251
+ });
252
+ view.value.dispatch({
253
+ effects: StateEffect.appendConfig.of(extensions.value)
254
+ });
255
+ };
248
256
  const getRange = (from, to) => view.value.state.sliceDoc(from, to);
249
257
  const getLine = (number) => view.value.state.doc.line(number + 1).text;
250
258
  const lineCount = () => view.value.state.doc.lines;
@@ -282,6 +290,7 @@ var CodeMirror = defineComponent({
282
290
  focus,
283
291
  length,
284
292
  lint,
293
+ forceReconfigure,
285
294
  getRange,
286
295
  getLine,
287
296
  lineCount,
@@ -318,8 +327,8 @@ var CodeMirror = defineComponent({
318
327
  });
319
328
 
320
329
  const meta = {
321
- version: "1.1.6",
322
- date: "2023-01-16T11:26:58.296Z"
330
+ version: "1.1.10",
331
+ date: "2023-01-29T01:57:06.994Z"
323
332
  };
324
333
 
325
334
  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.6
8
+ * @version 1.1.10
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
@@ -240,6 +240,14 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
240
240
  lint.forceLinting(view$1.value);
241
241
  }
242
242
  };
243
+ const forceReconfigure = () => {
244
+ view$1.value.dispatch({
245
+ effects: state.StateEffect.reconfigure.of([])
246
+ });
247
+ view$1.value.dispatch({
248
+ effects: state.StateEffect.appendConfig.of(extensions.value)
249
+ });
250
+ };
243
251
  const getRange = (from, to) => view$1.value.state.sliceDoc(from, to);
244
252
  const getLine = (number) => view$1.value.state.doc.line(number + 1).text;
245
253
  const lineCount = () => view$1.value.state.doc.lines;
@@ -277,6 +285,7 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
277
285
  focus,
278
286
  length,
279
287
  lint: lint$1,
288
+ forceReconfigure,
280
289
  getRange,
281
290
  getLine,
282
291
  lineCount,
@@ -313,8 +322,8 @@ var CodeMirror = (function (exports, vueDemi, lodash, codemirror, state, view, c
313
322
  });
314
323
 
315
324
  const meta = {
316
- version: "1.1.6",
317
- date: "2023-01-16T11:26:58.296Z"
325
+ version: "1.1.10",
326
+ date: "2023-01-29T01:57:06.994Z"
318
327
  };
319
328
 
320
329
  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.6
8
+ * @version 1.1.10
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
@@ -243,6 +243,14 @@
243
243
  lint.forceLinting(view$1.value);
244
244
  }
245
245
  };
246
+ const forceReconfigure = () => {
247
+ view$1.value.dispatch({
248
+ effects: state.StateEffect.reconfigure.of([])
249
+ });
250
+ view$1.value.dispatch({
251
+ effects: state.StateEffect.appendConfig.of(extensions.value)
252
+ });
253
+ };
246
254
  const getRange = (from, to) => view$1.value.state.sliceDoc(from, to);
247
255
  const getLine = (number) => view$1.value.state.doc.line(number + 1).text;
248
256
  const lineCount = () => view$1.value.state.doc.lines;
@@ -280,6 +288,7 @@
280
288
  focus,
281
289
  length,
282
290
  lint: lint$1,
291
+ forceReconfigure,
283
292
  getRange,
284
293
  getLine,
285
294
  lineCount,
@@ -316,8 +325,8 @@
316
325
  });
317
326
 
318
327
  const meta = {
319
- version: "1.1.6",
320
- date: "2023-01-16T11:26:58.296Z"
328
+ version: "1.1.10",
329
+ date: "2023-01-29T01:57:06.994Z"
321
330
  };
322
331
 
323
332
  const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
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.6",
4
+ "version": "1.1.10",
5
5
  "license": "MIT",
6
6
  "description": "CodeMirror6 Component for vue2 and vue3.",
7
7
  "keywords": [
@@ -53,7 +53,7 @@
53
53
  "./sfc": "./src/components/CodeMirror.ts"
54
54
  },
55
55
  "engines": {
56
- "node": ">=18.12.1",
56
+ "node": ">=18.13.0",
57
57
  "yarn": ">=1.22.10"
58
58
  },
59
59
  "packageManager": "yarn@3.3.1",
@@ -93,21 +93,21 @@
93
93
  "@codemirror/lang-markdown": "^6.0.5",
94
94
  "@types/lodash": "^4.14.191",
95
95
  "@types/node": "^18.11.18",
96
- "@typescript-eslint/eslint-plugin": "^5.48.1",
97
- "@typescript-eslint/parser": "^5.48.1",
96
+ "@typescript-eslint/eslint-plugin": "^5.49.0",
97
+ "@typescript-eslint/parser": "^5.49.0",
98
98
  "@vitejs/plugin-vue": "^4.0.0",
99
99
  "@vue/eslint-config-prettier": "^7.0.0",
100
100
  "@vue/tsconfig": "^0.1.3",
101
- "@vueuse/core": "^9.10.0",
102
- "eslint": "^8.32.0",
101
+ "@vueuse/core": "^9.11.1",
102
+ "eslint": "^8.33.0",
103
103
  "eslint-config-google": "^0.14.0",
104
104
  "eslint-config-prettier": "^8.6.0",
105
105
  "eslint-import-resolver-alias": "^1.1.2",
106
106
  "eslint-import-resolver-typescript": "^3.5.3",
107
- "eslint-linter-browserify": "^8.32.0",
107
+ "eslint-linter-browserify": "^8.33.0",
108
108
  "eslint-plugin-html": "^7.1.0",
109
- "eslint-plugin-import": "^2.27.4",
110
- "eslint-plugin-jsdoc": "^39.6.4",
109
+ "eslint-plugin-import": "^2.27.5",
110
+ "eslint-plugin-jsdoc": "^39.7.0",
111
111
  "eslint-plugin-prettier": "^4.2.1",
112
112
  "eslint-plugin-tsdoc": "^0.2.17",
113
113
  "eslint-plugin-vue": "^9.9.0",
@@ -117,15 +117,15 @@
117
117
  "lint-staged": "^13.1.0",
118
118
  "npm-run-all": "^4.1.5",
119
119
  "prettier": "^2.8.3",
120
- "rimraf": "^4.0.7",
120
+ "rimraf": "^4.1.2",
121
121
  "rollup-plugin-visualizer": "^5.9.0",
122
122
  "typescript": "^4.9.4",
123
123
  "vite": "^4.0.4",
124
124
  "vite-plugin-banner": "^0.7.0",
125
- "vite-plugin-checker": "^0.5.3",
125
+ "vite-plugin-checker": "^0.5.5",
126
126
  "vue": "^3.2.45",
127
127
  "vue-eslint-parser": "^9.1.0",
128
- "vue-markdown-wasm": "^0.2.0",
128
+ "vue-markdown-wasm": "^0.3.1",
129
129
  "vue-tsc": "^1.0.24"
130
130
  },
131
131
  "husky": {
@@ -460,6 +460,22 @@ export default defineComponent({
460
460
  }
461
461
  };
462
462
 
463
+ /**
464
+ * Force Reconfigure Extension
465
+ *
466
+ * @see {@link https://codemirror.net/examples/config/#top-level-reconfiguration}
467
+ */
468
+ const forceReconfigure = () => {
469
+ // Deconfigure all Extensions
470
+ view.value.dispatch({
471
+ effects: StateEffect.reconfigure.of([]),
472
+ });
473
+ // Register extensions
474
+ view.value.dispatch({
475
+ effects: StateEffect.appendConfig.of(extensions.value),
476
+ });
477
+ };
478
+
463
479
  /* ----- Bellow is experimental. ------ */
464
480
 
465
481
  /**
@@ -575,6 +591,7 @@ export default defineComponent({
575
591
  focus,
576
592
  length,
577
593
  lint,
594
+ forceReconfigure,
578
595
  // Bellow is CodeMirror5's function
579
596
  getRange,
580
597
  getLine,