vue-codemirror6 1.1.22 → 1.1.23
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.es.js +12 -6
- package/dist/index.iife.js +12 -6
- package/dist/index.umd.js +12 -6
- package/dist/src/components/CodeMirror.d.ts +5 -5
- package/dist/src-docs/main.d.ts +0 -0
- package/package.json +22 -21
- package/src/components/CodeMirror.ts +14 -5
package/dist/index.es.js
CHANGED
|
@@ -436,11 +436,17 @@ var CodeMirror = defineComponent({
|
|
|
436
436
|
const getLine = (number) => view.value.state.doc.line(number + 1).text;
|
|
437
437
|
const lineCount = () => view.value.state.doc.lines;
|
|
438
438
|
const getCursor = () => view.value.state.selection.main.head;
|
|
439
|
-
const listSelections = () =>
|
|
440
|
-
|
|
441
|
-
view.value.state.selection.
|
|
442
|
-
|
|
443
|
-
)
|
|
439
|
+
const listSelections = () => {
|
|
440
|
+
let _view$value$state$sel;
|
|
441
|
+
return (_view$value$state$sel = view.value.state.selection.ranges) !== null && _view$value$state$sel !== void 0 ? _view$value$state$sel : [];
|
|
442
|
+
};
|
|
443
|
+
const getSelection = () => {
|
|
444
|
+
let _view$value$state$sli;
|
|
445
|
+
return (_view$value$state$sli = view.value.state.sliceDoc(
|
|
446
|
+
view.value.state.selection.main.from,
|
|
447
|
+
view.value.state.selection.main.to
|
|
448
|
+
)) !== null && _view$value$state$sli !== void 0 ? _view$value$state$sli : "";
|
|
449
|
+
};
|
|
444
450
|
const getSelections = () => {
|
|
445
451
|
const s = view.value.state;
|
|
446
452
|
if (!s) {
|
|
@@ -518,7 +524,7 @@ var CodeMirror = defineComponent({
|
|
|
518
524
|
|
|
519
525
|
const meta = {
|
|
520
526
|
version: "1.1.22",
|
|
521
|
-
date: "2023-
|
|
527
|
+
date: "2023-07-28T01:14:51.564Z"
|
|
522
528
|
};
|
|
523
529
|
var meta$1 = meta;
|
|
524
530
|
|
package/dist/index.iife.js
CHANGED
|
@@ -432,11 +432,17 @@ var CodeMirror = (function (exports, vueDemi, codemirror, view, state, lint, com
|
|
|
432
432
|
const getLine = (number) => view$1.value.state.doc.line(number + 1).text;
|
|
433
433
|
const lineCount = () => view$1.value.state.doc.lines;
|
|
434
434
|
const getCursor = () => view$1.value.state.selection.main.head;
|
|
435
|
-
const listSelections = () =>
|
|
436
|
-
|
|
437
|
-
view$1.value.state.selection.
|
|
438
|
-
|
|
439
|
-
)
|
|
435
|
+
const listSelections = () => {
|
|
436
|
+
let _view$value$state$sel;
|
|
437
|
+
return (_view$value$state$sel = view$1.value.state.selection.ranges) !== null && _view$value$state$sel !== void 0 ? _view$value$state$sel : [];
|
|
438
|
+
};
|
|
439
|
+
const getSelection = () => {
|
|
440
|
+
let _view$value$state$sli;
|
|
441
|
+
return (_view$value$state$sli = view$1.value.state.sliceDoc(
|
|
442
|
+
view$1.value.state.selection.main.from,
|
|
443
|
+
view$1.value.state.selection.main.to
|
|
444
|
+
)) !== null && _view$value$state$sli !== void 0 ? _view$value$state$sli : "";
|
|
445
|
+
};
|
|
440
446
|
const getSelections = () => {
|
|
441
447
|
const s = view$1.value.state;
|
|
442
448
|
if (!s) {
|
|
@@ -514,7 +520,7 @@ var CodeMirror = (function (exports, vueDemi, codemirror, view, state, lint, com
|
|
|
514
520
|
|
|
515
521
|
const meta = {
|
|
516
522
|
version: "1.1.22",
|
|
517
|
-
date: "2023-
|
|
523
|
+
date: "2023-07-28T01:14:51.564Z"
|
|
518
524
|
};
|
|
519
525
|
var meta$1 = meta;
|
|
520
526
|
|
package/dist/index.umd.js
CHANGED
|
@@ -435,11 +435,17 @@
|
|
|
435
435
|
const getLine = (number) => view$1.value.state.doc.line(number + 1).text;
|
|
436
436
|
const lineCount = () => view$1.value.state.doc.lines;
|
|
437
437
|
const getCursor = () => view$1.value.state.selection.main.head;
|
|
438
|
-
const listSelections = () =>
|
|
439
|
-
|
|
440
|
-
view$1.value.state.selection.
|
|
441
|
-
|
|
442
|
-
)
|
|
438
|
+
const listSelections = () => {
|
|
439
|
+
let _view$value$state$sel;
|
|
440
|
+
return (_view$value$state$sel = view$1.value.state.selection.ranges) !== null && _view$value$state$sel !== void 0 ? _view$value$state$sel : [];
|
|
441
|
+
};
|
|
442
|
+
const getSelection = () => {
|
|
443
|
+
let _view$value$state$sli;
|
|
444
|
+
return (_view$value$state$sli = view$1.value.state.sliceDoc(
|
|
445
|
+
view$1.value.state.selection.main.from,
|
|
446
|
+
view$1.value.state.selection.main.to
|
|
447
|
+
)) !== null && _view$value$state$sli !== void 0 ? _view$value$state$sli : "";
|
|
448
|
+
};
|
|
443
449
|
const getSelections = () => {
|
|
444
450
|
const s = view$1.value.state;
|
|
445
451
|
if (!s) {
|
|
@@ -517,7 +523,7 @@
|
|
|
517
523
|
|
|
518
524
|
const meta = {
|
|
519
525
|
version: "1.1.22",
|
|
520
|
-
date: "2023-
|
|
526
|
+
date: "2023-07-28T01:14:51.564Z"
|
|
521
527
|
};
|
|
522
528
|
var meta$1 = meta;
|
|
523
529
|
|
|
@@ -446,6 +446,8 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
446
446
|
default: string;
|
|
447
447
|
};
|
|
448
448
|
}>> & {
|
|
449
|
+
onFocus?: ((value: boolean) => any) | undefined;
|
|
450
|
+
onChange?: ((value: EditorState) => any) | undefined;
|
|
449
451
|
"onUpdate:modelValue"?: ((value: string | Text) => any) | undefined;
|
|
450
452
|
onUpdate?: ((value: ViewUpdate) => any) | undefined;
|
|
451
453
|
onReady?: ((value: {
|
|
@@ -453,16 +455,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
453
455
|
state: EditorState;
|
|
454
456
|
container: HTMLElement;
|
|
455
457
|
}) => any) | undefined;
|
|
456
|
-
onFocus?: ((value: boolean) => any) | undefined;
|
|
457
|
-
onChange?: ((value: EditorState) => any) | undefined;
|
|
458
458
|
onDestroy?: (() => any) | undefined;
|
|
459
459
|
}, {
|
|
460
|
+
dark: boolean;
|
|
461
|
+
lang: LanguageSupport;
|
|
462
|
+
placeholder: string | HTMLElement;
|
|
460
463
|
modelValue: string | Text;
|
|
461
464
|
theme: Record<string, StyleSpec>;
|
|
462
|
-
dark: boolean;
|
|
463
465
|
basic: boolean;
|
|
464
466
|
minimal: boolean;
|
|
465
|
-
placeholder: string | HTMLElement;
|
|
466
467
|
wrap: boolean;
|
|
467
468
|
tab: boolean;
|
|
468
469
|
allowMultipleSelections: boolean;
|
|
@@ -472,7 +473,6 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
472
473
|
disabled: boolean;
|
|
473
474
|
extensions: Extension[];
|
|
474
475
|
phrases: Record<string, string>;
|
|
475
|
-
lang: LanguageSupport;
|
|
476
476
|
linter: LintSource;
|
|
477
477
|
linterConfig: Record<string, any>;
|
|
478
478
|
forceLinting: boolean;
|
|
File without changes
|
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.
|
|
4
|
+
"version": "1.1.23",
|
|
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.6.
|
|
58
|
+
"packageManager": "yarn@3.6.1",
|
|
59
59
|
"sideEffects": false,
|
|
60
60
|
"scripts": {
|
|
61
61
|
"dev": "vite",
|
|
@@ -81,47 +81,47 @@
|
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@codemirror/lang-javascript": "^6.1.9",
|
|
83
83
|
"@codemirror/lang-json": "^6.0.1",
|
|
84
|
-
"@codemirror/lang-markdown": "^6.
|
|
84
|
+
"@codemirror/lang-markdown": "^6.2.0",
|
|
85
85
|
"@codemirror/lang-vue": "^0.1.2",
|
|
86
|
-
"@tsconfig/node-lts": "^18.12.
|
|
87
|
-
"@types/node": "^20.
|
|
88
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
89
|
-
"@typescript-eslint/parser": "^
|
|
86
|
+
"@tsconfig/node-lts": "^18.12.3",
|
|
87
|
+
"@types/node": "^20.4.5",
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
89
|
+
"@typescript-eslint/parser": "^6.2.0",
|
|
90
90
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
91
91
|
"@vue/compiler-sfc": "^3.3.4",
|
|
92
|
-
"@vue/eslint-config-prettier": "^
|
|
92
|
+
"@vue/eslint-config-prettier": "^8.0.0",
|
|
93
93
|
"@vue/tsconfig": "^0.4.0",
|
|
94
|
-
"@vueuse/core": "^10.1
|
|
95
|
-
"bootstrap": "5.3.
|
|
96
|
-
"eslint": "^8.
|
|
94
|
+
"@vueuse/core": "^10.2.1",
|
|
95
|
+
"bootstrap": "^5.3.1",
|
|
96
|
+
"eslint": "^8.45.0",
|
|
97
97
|
"eslint-config-standard-with-typescript": "latest",
|
|
98
98
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
99
99
|
"eslint-import-resolver-typescript": "^3.5.5",
|
|
100
|
-
"eslint-linter-browserify": "^8.
|
|
100
|
+
"eslint-linter-browserify": "^8.45.0",
|
|
101
101
|
"eslint-plugin-html": "^7.1.0",
|
|
102
102
|
"eslint-plugin-import": "^2.27.5",
|
|
103
|
-
"eslint-plugin-n": "^16.0.
|
|
103
|
+
"eslint-plugin-n": "^16.0.1",
|
|
104
104
|
"eslint-plugin-promise": "^6.1.1",
|
|
105
105
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
106
106
|
"eslint-plugin-vue": "latest",
|
|
107
107
|
"eslint-plugin-vuejs-accessibility": "^2.1.0",
|
|
108
108
|
"eslint-plugin-yaml": "^0.5.0",
|
|
109
109
|
"husky": "^8.0.3",
|
|
110
|
-
"lint-staged": "^13.2.
|
|
110
|
+
"lint-staged": "^13.2.3",
|
|
111
111
|
"npm-run-all": "^4.1.5",
|
|
112
|
-
"prettier": "^
|
|
112
|
+
"prettier": "^3.0.0",
|
|
113
113
|
"rimraf": "^5.0.1",
|
|
114
114
|
"rollup-plugin-visualizer": "^5.9.2",
|
|
115
|
-
"sass": "^1.
|
|
116
|
-
"typescript": "^5.1.
|
|
117
|
-
"vite": "^4.
|
|
115
|
+
"sass": "^1.64.1",
|
|
116
|
+
"typescript": "^5.1.6",
|
|
117
|
+
"vite": "^4.4.7",
|
|
118
118
|
"vite-plugin-banner": "^0.7.0",
|
|
119
|
-
"vite-plugin-checker": "^0.6.
|
|
120
|
-
"vite-plugin-dts": "^
|
|
119
|
+
"vite-plugin-checker": "^0.6.1",
|
|
120
|
+
"vite-plugin-dts": "^3.3.1",
|
|
121
121
|
"vue": "^3.3.4",
|
|
122
122
|
"vue-eslint-parser": "^9.3.1",
|
|
123
123
|
"vue-markdown-wasm": "^0.3.9",
|
|
124
|
-
"vue-tsc": "^1.
|
|
124
|
+
"vue-tsc": "^1.8.8"
|
|
125
125
|
},
|
|
126
126
|
"husky": {
|
|
127
127
|
"hooks": {
|
|
@@ -135,6 +135,7 @@
|
|
|
135
135
|
"resolutions": {
|
|
136
136
|
"http-cache-semantics": "^4.1.1",
|
|
137
137
|
"json5": "^2.2.3",
|
|
138
|
+
"semver": "^7.5.2",
|
|
138
139
|
"yaml": "^2.2.2"
|
|
139
140
|
}
|
|
140
141
|
}
|
|
@@ -558,14 +558,23 @@ export default defineComponent({
|
|
|
558
558
|
/** Retrieve one end of the primary selection. */
|
|
559
559
|
const getCursor = (): number => view.value.state.selection.main.head;
|
|
560
560
|
/** Retrieves a list of all current selections. */
|
|
561
|
-
const listSelections = (): readonly SelectionRange[] =>
|
|
562
|
-
|
|
561
|
+
const listSelections = (): readonly SelectionRange[] => {
|
|
562
|
+
let _view$value$state$sel;
|
|
563
|
+
return (_view$value$state$sel = view.value.state.selection.ranges) !==
|
|
564
|
+
null && _view$value$state$sel !== undefined
|
|
565
|
+
? _view$value$state$sel
|
|
566
|
+
: [];
|
|
567
|
+
};
|
|
563
568
|
/** Get the currently selected code. */
|
|
564
|
-
const getSelection = (): string =>
|
|
565
|
-
|
|
569
|
+
const getSelection = (): string => {
|
|
570
|
+
let _view$value$state$sli;
|
|
571
|
+
return (_view$value$state$sli = view.value.state.sliceDoc(
|
|
566
572
|
view.value.state.selection.main.from,
|
|
567
573
|
view.value.state.selection.main.to
|
|
568
|
-
)
|
|
574
|
+
)) !== null && _view$value$state$sli !== undefined
|
|
575
|
+
? _view$value$state$sli
|
|
576
|
+
: '';
|
|
577
|
+
};
|
|
569
578
|
/**
|
|
570
579
|
* The length of the given array should be the same as the number of active selections.
|
|
571
580
|
* Replaces the content of the selections with the strings in the array.
|