vue-codemirror6 1.0.2 → 1.0.3
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 +8 -8
- package/dist/Meta.d.ts +4 -0
- package/dist/Meta.d.ts.map +1 -0
- package/dist/helpers/h-demi.d.ts +5 -0
- package/dist/helpers/h-demi.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +8 -7
- package/dist/index.iife.js +8 -6
- package/dist/index.umd.js +8 -6
- package/dist/interfaces/MetaInterface.d.ts +8 -0
- package/dist/interfaces/MetaInterface.d.ts.map +1 -0
- package/dist/stats.html +4034 -0
- package/package.json +19 -19
package/README.md
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
[](https://uiwjs.github.io/npm-unpkg/#/pkg/vue-codemirror6/file/README.md)
|
|
6
6
|
[](https://www.npmjs.com/package/vue-codemirror6)
|
|
7
7
|
[](https://gitpod.io/#https://github.com/logue/vue-codemirror6)
|
|
8
|
+
[](https://twitter.com/logue256)
|
|
8
9
|
|
|
9
|
-
A component for using [CodeMirror6](https://codemirror.net/6/) with Vue.
|
|
10
|
+
A component for using [CodeMirror6](https://codemirror.net/6/) with Vue. This component works in both Vue2 and Vue3.
|
|
10
11
|
|
|
11
12
|
## Usage
|
|
12
13
|
|
|
@@ -14,17 +15,15 @@ A component for using [CodeMirror6](https://codemirror.net/6/) with Vue. Unrelat
|
|
|
14
15
|
yarn add vue-codemirror6 codemirror
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
When using with Vue <2.6, [@vue/composition-api](https://www.npmjs.com/package/@vue/composition-api) is required separately.
|
|
18
|
+
For Vue 2.7 or below, [@vue/composition-api](https://www.npmjs.com/package/@vue/composition-api) is required separately.
|
|
20
19
|
|
|
21
20
|
```sh
|
|
22
21
|
yarn add vue-codemirror6 @vue/composition-api
|
|
23
22
|
```
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
This component can handle bidirectional binding by `v-model` like a general Vue component.
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
## Props
|
|
28
27
|
|
|
29
28
|
| Props | Type | Information |
|
|
30
29
|
| ---------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
@@ -43,7 +42,7 @@ For Vue 2.7 or later, import vue directly like Vue3.
|
|
|
43
42
|
| lintGutter | boolean | Display 🔴 on the line where there was an error when `linter` was specified. It will not work if `linter` is not specified. |
|
|
44
43
|
| tag | string | HTML tags used in the component. (Default is `div` tag.) |
|
|
45
44
|
|
|
46
|
-
Notice: `lang` and `linter` can also be set together in `extensions`.
|
|
45
|
+
⚠ Notice: `lang` and `linter` can also be set together in `extensions`. These are separated for compatibility with previous versions of CodeMirror settings and for typing props.
|
|
47
46
|
|
|
48
47
|
### Supported Languages
|
|
49
48
|
|
|
@@ -152,8 +151,8 @@ import { ref, defineComponent, type Ref } from 'vue';
|
|
|
152
151
|
import CodeMirror from 'vue-codemirror6';
|
|
153
152
|
|
|
154
153
|
// CodeMirror extensions
|
|
155
|
-
import type { LanguageSupport } from '@codemirror/language';
|
|
156
154
|
import { markdown as md } from '@codemirror/lang-markdown';
|
|
155
|
+
import type { LanguageSupport } from '@codemirror/language';
|
|
157
156
|
import type { Extension } from '@codemirror/state';
|
|
158
157
|
import type { ViewUpdate } from '@codemirror/view';
|
|
159
158
|
|
|
@@ -164,6 +163,7 @@ export default defineComponent({
|
|
|
164
163
|
setup() {
|
|
165
164
|
/**
|
|
166
165
|
* Get Vuetify instance
|
|
166
|
+
*
|
|
167
167
|
* @see {@link https://github.com/logue/vite-vue2-vuetify-ts-starter | vite-vue2-vuetify-ts-starter}
|
|
168
168
|
*/
|
|
169
169
|
const vuetify = useVuetify();
|
package/dist/Meta.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Meta.d.ts","sourceRoot":"","sources":["../src/Meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,4BAA4B,CAAC;AAG5D,QAAA,MAAM,IAAI,EAAE,aAGX,CAAC;AACF,eAAe,IAAI,CAAC"}
|
package/dist/helpers/h-demi.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
+
{"version":3,"file":"h-demi.d.ts","sourceRoot":"","sources":["../../src/helpers/h-demi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import CodeMirror from './components/CodeMirror';
|
|
2
|
+
import Meta from './Meta';
|
|
2
3
|
declare const installCodeMirror: (app: any) => any;
|
|
3
|
-
export { CodeMirror as default, installCodeMirror as install };
|
|
4
|
+
export { CodeMirror as default, installCodeMirror as install, Meta };
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAG1B,QAAA,MAAM,iBAAiB,QAAS,GAAG,QAA4C,CAAC;AAEhF,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/index.es.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
6
|
* @copyright 2022 By Masashi Yoshikawa All rights reserved.
|
|
7
7
|
* @license MIT
|
|
8
|
-
* @version 1.0.
|
|
8
|
+
* @version 1.0.3
|
|
9
9
|
* @see {@link https://github.com/logue/vue-codemirror6}
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -181,11 +181,7 @@ const CodeMirror = defineComponent({
|
|
|
181
181
|
onMounted(async () => {
|
|
182
182
|
let value = doc.value;
|
|
183
183
|
if (editor.value && editor.value.childNodes[0]) {
|
|
184
|
-
if (doc.value !== "")
|
|
185
|
-
console.warn(
|
|
186
|
-
"[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."
|
|
187
|
-
);
|
|
188
|
-
}
|
|
184
|
+
if (doc.value !== "") ;
|
|
189
185
|
value = trim(editor.value.childNodes[0].innerText);
|
|
190
186
|
}
|
|
191
187
|
view.value = new EditorView({
|
|
@@ -277,9 +273,14 @@ const CodeMirror = defineComponent({
|
|
|
277
273
|
}
|
|
278
274
|
});
|
|
279
275
|
|
|
276
|
+
const meta = {
|
|
277
|
+
version: "1.0.3",
|
|
278
|
+
date: "2022-10-11T23:57:24.765Z"
|
|
279
|
+
};
|
|
280
|
+
|
|
280
281
|
const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
|
|
281
282
|
if (typeof window !== "undefined" && window.Vue) {
|
|
282
283
|
window.Vue.use(CodeMirror);
|
|
283
284
|
}
|
|
284
285
|
|
|
285
|
-
export { CodeMirror as default, installCodeMirror as install };
|
|
286
|
+
export { meta as Meta, CodeMirror as default, installCodeMirror as install };
|
package/dist/index.iife.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
6
|
* @copyright 2022 By Masashi Yoshikawa All rights reserved.
|
|
7
7
|
* @license MIT
|
|
8
|
-
* @version 1.0.
|
|
8
|
+
* @version 1.0.3
|
|
9
9
|
* @see {@link https://github.com/logue/vue-codemirror6}
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -176,11 +176,7 @@ var CodeMirror = (function (exports, vueDemi, lodash, state, view, lint, codemir
|
|
|
176
176
|
vueDemi.onMounted(async () => {
|
|
177
177
|
let value = doc.value;
|
|
178
178
|
if (editor.value && editor.value.childNodes[0]) {
|
|
179
|
-
if (doc.value !== "")
|
|
180
|
-
console.warn(
|
|
181
|
-
"[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."
|
|
182
|
-
);
|
|
183
|
-
}
|
|
179
|
+
if (doc.value !== "") ;
|
|
184
180
|
value = lodash.trim(editor.value.childNodes[0].innerText);
|
|
185
181
|
}
|
|
186
182
|
view$1.value = new view.EditorView({
|
|
@@ -272,11 +268,17 @@ var CodeMirror = (function (exports, vueDemi, lodash, state, view, lint, codemir
|
|
|
272
268
|
}
|
|
273
269
|
});
|
|
274
270
|
|
|
271
|
+
const meta = {
|
|
272
|
+
version: "1.0.3",
|
|
273
|
+
date: "2022-10-11T23:57:24.765Z"
|
|
274
|
+
};
|
|
275
|
+
|
|
275
276
|
const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
|
|
276
277
|
if (typeof window !== "undefined" && window.Vue) {
|
|
277
278
|
window.Vue.use(CodeMirror);
|
|
278
279
|
}
|
|
279
280
|
|
|
281
|
+
exports.Meta = meta;
|
|
280
282
|
exports.default = CodeMirror;
|
|
281
283
|
exports.install = installCodeMirror;
|
|
282
284
|
|
package/dist/index.umd.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @author Logue <logue@hotmail.co.jp>
|
|
6
6
|
* @copyright 2022 By Masashi Yoshikawa All rights reserved.
|
|
7
7
|
* @license MIT
|
|
8
|
-
* @version 1.0.
|
|
8
|
+
* @version 1.0.3
|
|
9
9
|
* @see {@link https://github.com/logue/vue-codemirror6}
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -179,11 +179,7 @@
|
|
|
179
179
|
vueDemi.onMounted(async () => {
|
|
180
180
|
let value = doc.value;
|
|
181
181
|
if (editor.value && editor.value.childNodes[0]) {
|
|
182
|
-
if (doc.value !== "")
|
|
183
|
-
console.warn(
|
|
184
|
-
"[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."
|
|
185
|
-
);
|
|
186
|
-
}
|
|
182
|
+
if (doc.value !== "") ;
|
|
187
183
|
value = lodash.trim(editor.value.childNodes[0].innerText);
|
|
188
184
|
}
|
|
189
185
|
view$1.value = new view.EditorView({
|
|
@@ -275,11 +271,17 @@
|
|
|
275
271
|
}
|
|
276
272
|
});
|
|
277
273
|
|
|
274
|
+
const meta = {
|
|
275
|
+
version: "1.0.3",
|
|
276
|
+
date: "2022-10-11T23:57:24.765Z"
|
|
277
|
+
};
|
|
278
|
+
|
|
278
279
|
const installCodeMirror = (app) => app.component("CodeMirror", CodeMirror);
|
|
279
280
|
if (typeof window !== "undefined" && window.Vue) {
|
|
280
281
|
window.Vue.use(CodeMirror);
|
|
281
282
|
}
|
|
282
283
|
|
|
284
|
+
exports.Meta = meta;
|
|
283
285
|
exports.default = CodeMirror;
|
|
284
286
|
exports.install = installCodeMirror;
|
|
285
287
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetaInterface.d.ts","sourceRoot":"","sources":["../../src/interfaces/MetaInterface.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,MAAM,CAAC,OAAO,WAAW,aAAa;IACpC,cAAc;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;CACd"}
|