vue-codemirror6 0.1.2 → 0.1.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.
|
@@ -3,7 +3,10 @@ import type { Extension } from '@codemirror/state';
|
|
|
3
3
|
import type { LanguageSupport } from '@codemirror/language';
|
|
4
4
|
import type { Diagnostic } from '@codemirror/lint';
|
|
5
5
|
import type { StyleSpec } from 'style-mod';
|
|
6
|
-
declare const _default: import("vue-
|
|
6
|
+
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
7
|
+
context: SetupContext<{}>;
|
|
8
|
+
editor: Ref<Element | undefined>;
|
|
9
|
+
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
7
10
|
/** Model value */
|
|
8
11
|
modelValue: {
|
|
9
12
|
type: StringConstructor;
|
|
@@ -80,85 +83,45 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
80
83
|
default: undefined;
|
|
81
84
|
};
|
|
82
85
|
}, {
|
|
83
|
-
|
|
84
|
-
editor: Ref<Element | undefined>;
|
|
85
|
-
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, import("vue-demi").EmitsOptions, "update:modelValue" | "update", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
86
|
-
/** Model value */
|
|
87
|
-
modelValue: {
|
|
88
|
-
type: StringConstructor;
|
|
89
|
-
default: string;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Theme
|
|
93
|
-
*
|
|
94
|
-
* @see {@link https://codemirror.net/6/examples/styling/ | Example: Styling}
|
|
95
|
-
*/
|
|
86
|
+
modelValue: string;
|
|
96
87
|
theme: {
|
|
97
|
-
|
|
98
|
-
[selector: string]: StyleSpec;
|
|
99
|
-
}>;
|
|
100
|
-
default: undefined;
|
|
101
|
-
};
|
|
102
|
-
/** Dark Mode */
|
|
103
|
-
dark: {
|
|
104
|
-
type: BooleanConstructor;
|
|
105
|
-
default: boolean;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Readonly
|
|
109
|
-
*
|
|
110
|
-
* @see {@link https://codemirror.net/6/docs/ref/#state.EditorState%5EreadOnly | readOnly}
|
|
111
|
-
*/
|
|
112
|
-
readonly: {
|
|
113
|
-
type: BooleanConstructor;
|
|
114
|
-
default: boolean;
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* Editable
|
|
118
|
-
*
|
|
119
|
-
* @see {@link https://codemirror.net/6/docs/ref/#view.EditorView%5Eeditable | editable}
|
|
120
|
-
*/
|
|
121
|
-
editable: {
|
|
122
|
-
type: BooleanConstructor;
|
|
123
|
-
default: boolean;
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* Additional Extension
|
|
127
|
-
*
|
|
128
|
-
* @see {@link https://codemirror.net/6/docs/ref/#state.Extension | Extending Editor State}
|
|
129
|
-
*/
|
|
130
|
-
extensions: {
|
|
131
|
-
type: PropType<Extension[]>;
|
|
132
|
-
default: undefined;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Language Phreses
|
|
136
|
-
*
|
|
137
|
-
* @see {@link https://codemirror.net/6/examples/translate/ | Example: Internationalization}
|
|
138
|
-
*/
|
|
139
|
-
phrases: {
|
|
140
|
-
type: PropType<Record<string, string>>;
|
|
141
|
-
default: undefined;
|
|
88
|
+
[selector: string]: StyleSpec;
|
|
142
89
|
};
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
lang:
|
|
149
|
-
|
|
150
|
-
|
|
90
|
+
dark: boolean;
|
|
91
|
+
readonly: boolean;
|
|
92
|
+
editable: boolean;
|
|
93
|
+
extensions: Extension[];
|
|
94
|
+
phrases: Record<string, string>;
|
|
95
|
+
lang: LanguageSupport;
|
|
96
|
+
linter: Diagnostic[];
|
|
97
|
+
} & {}> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
98
|
+
modelValue: string;
|
|
99
|
+
theme: {
|
|
100
|
+
[selector: string]: StyleSpec;
|
|
151
101
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
102
|
+
dark: boolean;
|
|
103
|
+
readonly: boolean;
|
|
104
|
+
editable: boolean;
|
|
105
|
+
extensions: Extension[];
|
|
106
|
+
phrases: Record<string, string>;
|
|
107
|
+
lang: LanguageSupport;
|
|
108
|
+
linter: Diagnostic[];
|
|
109
|
+
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
110
|
+
context: SetupContext<{}>;
|
|
111
|
+
editor: Ref<Element | undefined>;
|
|
112
|
+
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
113
|
+
modelValue: string;
|
|
114
|
+
theme: {
|
|
115
|
+
[selector: string]: StyleSpec;
|
|
160
116
|
};
|
|
161
|
-
|
|
117
|
+
dark: boolean;
|
|
118
|
+
readonly: boolean;
|
|
119
|
+
editable: boolean;
|
|
120
|
+
extensions: Extension[];
|
|
121
|
+
phrases: Record<string, string>;
|
|
122
|
+
lang: LanguageSupport;
|
|
123
|
+
linter: Diagnostic[];
|
|
124
|
+
} & {}, {
|
|
162
125
|
modelValue: string;
|
|
163
126
|
theme: {
|
|
164
127
|
[selector: string]: StyleSpec;
|
|
@@ -170,7 +133,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
170
133
|
phrases: Record<string, string>;
|
|
171
134
|
lang: LanguageSupport;
|
|
172
135
|
linter: Diagnostic[];
|
|
173
|
-
}
|
|
136
|
+
}, true>);
|
|
174
137
|
/** CodeMirror Component */
|
|
175
138
|
export default _default;
|
|
176
139
|
//# sourceMappingURL=CodeMirror.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeMirror.vue.d.ts","sourceRoot":"","sources":["../../src/components/CodeMirror.vue.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAe,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIzE,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC
|
|
1
|
+
{"version":3,"file":"CodeMirror.vue.d.ts","sourceRoot":"","sources":["../../src/components/CodeMirror.vue.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAe,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIzE,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;;;;;IAavC,kBAAkB;;;;;IAKlB;;;;OAIG;;;;;;;IAKH,gBAAgB;;;;;IAKhB;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/EP,2BAA2B;AAC3B,wBA+MG"}
|
|
@@ -2,15 +2,7 @@ import { defineComponent, ref, computed, watch, onMounted, onUnmounted, install
|
|
|
2
2
|
import { EditorState } from "@codemirror/state";
|
|
3
3
|
import { EditorView } from "@codemirror/view";
|
|
4
4
|
import { merge, compact } from "lodash";
|
|
5
|
-
|
|
6
|
-
var _export_sfc = (sfc, props) => {
|
|
7
|
-
const target = sfc.__vccOpts || sfc;
|
|
8
|
-
for (const [key, val] of props) {
|
|
9
|
-
target[key] = val;
|
|
10
|
-
}
|
|
11
|
-
return target;
|
|
12
|
-
};
|
|
13
|
-
const _sfc_main = defineComponent({
|
|
5
|
+
var __vue2_script = defineComponent({
|
|
14
6
|
name: "CodeMirror",
|
|
15
7
|
model: {
|
|
16
8
|
prop: "modelValue",
|
|
@@ -121,20 +113,74 @@ const _sfc_main = defineComponent({
|
|
|
121
113
|
};
|
|
122
114
|
}
|
|
123
115
|
});
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
116
|
+
var render = function() {
|
|
117
|
+
var _vm = this;
|
|
118
|
+
var _h = _vm.$createElement;
|
|
119
|
+
var _c = _vm._self._c || _h;
|
|
120
|
+
return _c("div", { ref: "editor", staticClass: "vue-codemirror" }, [_c("aside", { directives: [{ name: "show", rawName: "v-show", value: !_vm.context.slots.default, expression: "!context.slots.default" }] }, [_vm._t("default")], 2)]);
|
|
127
121
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
122
|
+
var staticRenderFns = [];
|
|
123
|
+
function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
124
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
125
|
+
if (render2) {
|
|
126
|
+
options.render = render2;
|
|
127
|
+
options.staticRenderFns = staticRenderFns2;
|
|
128
|
+
options._compiled = true;
|
|
129
|
+
}
|
|
130
|
+
if (functionalTemplate) {
|
|
131
|
+
options.functional = true;
|
|
132
|
+
}
|
|
133
|
+
if (scopeId) {
|
|
134
|
+
options._scopeId = "data-v-" + scopeId;
|
|
135
|
+
}
|
|
136
|
+
var hook;
|
|
137
|
+
if (moduleIdentifier) {
|
|
138
|
+
hook = function(context) {
|
|
139
|
+
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
140
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
141
|
+
context = __VUE_SSR_CONTEXT__;
|
|
142
|
+
}
|
|
143
|
+
if (injectStyles) {
|
|
144
|
+
injectStyles.call(this, context);
|
|
145
|
+
}
|
|
146
|
+
if (context && context._registeredComponents) {
|
|
147
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
options._ssrRegister = hook;
|
|
151
|
+
} else if (injectStyles) {
|
|
152
|
+
hook = shadowMode ? function() {
|
|
153
|
+
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
154
|
+
} : injectStyles;
|
|
155
|
+
}
|
|
156
|
+
if (hook) {
|
|
157
|
+
if (options.functional) {
|
|
158
|
+
options._injectStyles = hook;
|
|
159
|
+
var originalRender = options.render;
|
|
160
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
161
|
+
hook.call(context);
|
|
162
|
+
return originalRender(h, context);
|
|
163
|
+
};
|
|
164
|
+
} else {
|
|
165
|
+
var existing = options.beforeCreate;
|
|
166
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return {
|
|
170
|
+
exports: scriptExports,
|
|
171
|
+
options
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
const __cssModules = {};
|
|
175
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null);
|
|
176
|
+
function __vue2_injectStyles(context) {
|
|
177
|
+
for (let o in __cssModules) {
|
|
178
|
+
this[o] = __cssModules[o];
|
|
179
|
+
}
|
|
136
180
|
}
|
|
137
|
-
var CodeMirror = /* @__PURE__ */
|
|
181
|
+
var CodeMirror = /* @__PURE__ */ function() {
|
|
182
|
+
return __component__.exports;
|
|
183
|
+
}();
|
|
138
184
|
/**
|
|
139
185
|
* Vue CodeMirror6 Component
|
|
140
186
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(r,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue-demi"),require("@codemirror/state"),require("@codemirror/view"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","vue-demi","@codemirror/state","@codemirror/view","lodash"],n):(r=typeof globalThis<"u"?globalThis:r||self,n(r.CodeMirror={},r.VueDemi,r.state,r.view,r.lodash))})(this,function(r,n,c,_,m){"use strict";var S=n.defineComponent({name:"CodeMirror",model:{prop:"modelValue",event:"update:modelValue"},props:{modelValue:{type:String,default:""},theme:{type:Object,default:void 0},dark:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},extensions:{type:Array,default:void 0},phrases:{type:Object,default:void 0},lang:{type:Object,default:void 0},linter:{type:Array,default:void 0}},emits:["update:modelValue","update"],setup(e,i){const d=n.ref(),s=n.ref(e.modelValue),u=n.ref(e.dark),v=i.emit,f=n.computed(()=>{const t=[_.EditorView.updateListener.of(o=>{v("update",o)}),_.EditorView.theme(e.theme||{},{dark:u.value}),e.phrases?c.EditorState.phrases.of(e.phrases):void 0,e.lang,e.readonly?c.EditorState.readOnly.of(e.readonly):void 0,e.editable?_.EditorView.editable.of(e.editable):void 0];return e.linter&&m.merge(t,e.linter),e.extensions&&m.merge(t,e.extensions),m.compact(t)});let a;return n.watch(s,t=>{if(a.composing)return;const o=a.state.selection;a.setState(c.EditorState.create({doc:t,extensions:f.value,selection:o}))}),n.watch(u,()=>{a.setState(c.EditorState.create({doc:s.value,extensions:f.value}))}),n.onMounted(()=>{const t=!s.value&&d.value?d.value.childNodes[0].innerText:s.value;a=new _.EditorView({state:c.EditorState.create({doc:t,extensions:f.value}),parent:d.value,dispatch:o=>{a.update([o]),!o.changes.empty&&(s.value=a.state.doc.toString(),v("update:modelValue",s.value))}})}),n.onUnmounted(()=>a.destroy()),{context:i,editor:d}}}),V=function(){var e=this,i=e.$createElement,d=e._self._c||i;return d("div",{ref:"editor",staticClass:"vue-codemirror"},[d("aside",{directives:[{name:"show",rawName:"v-show",value:!e.context.slots.default,expression:"!context.slots.default"}]},[e._t("default")],2)])},w=[];function E(e,i,d,s,u,v,f,a){var t=typeof e=="function"?e.options:e;i&&(t.render=i,t.staticRenderFns=d,t._compiled=!0),s&&(t.functional=!0),v&&(t._scopeId="data-v-"+v);var o;if(f?(o=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),u&&u.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(f)},t._ssrRegister=o):u&&(o=a?function(){u.call(this,(t.functional?this.parent:this).$root.$options.shadowRoot)}:u),o)if(t.functional){t._injectStyles=o;var T=t.render;t.render=function($,C){return o.call(C),T($,C)}}else{var y=t.beforeCreate;t.beforeCreate=y?[].concat(y,o):[o]}return{exports:e,options:t}}const p={};var M=E(S,V,w,!1,b,null,null,null);function b(e){for(let i in p)this[i]=p[i]}var h=function(){return M.exports}();/**
|
|
2
2
|
* Vue CodeMirror6 Component
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @author Logue {@link logue@hotmail.co.jp}
|
|
6
6
|
* @copyright 2022 Masashi Yoshikawa {@link https://logue.dev/} All rights reserved.
|
|
7
7
|
* @see {@link https://github.com/logue/vue-codemirror6}
|
|
8
|
-
*/
|
|
8
|
+
*/n.install();const g=e=>{e.component("CodeMirror",h)};r.CodeMirror=h,r.default=h,r.install=g,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"name": "vue-codemirror6",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"description": "CodeMirror6 Component for vue2",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"vuejs",
|
|
8
|
-
"vue",
|
|
9
|
-
"vue-components",
|
|
10
|
-
"vue-codemirror",
|
|
11
|
-
"code-editor",
|
|
12
|
-
"text-editor",
|
|
13
|
-
"vue2",
|
|
14
|
-
"web-editor",
|
|
15
|
-
"vue-plugin",
|
|
16
|
-
"vue-component",
|
|
17
|
-
"codemirror-editor",
|
|
18
|
-
"vue-resource",
|
|
19
|
-
"codemirror6"
|
|
20
|
-
],
|
|
21
|
-
"author": {
|
|
22
|
-
"name": "Logue",
|
|
23
|
-
"email": "logue@hotmail.co.jp",
|
|
24
|
-
"url": "https://logue.dev/"
|
|
25
|
-
},
|
|
26
|
-
"homepage": "https://github.com/logue/vue-codemirror6",
|
|
27
|
-
"repository": {
|
|
28
|
-
"type": "git",
|
|
29
|
-
"url": "git@github.com:logue/vue-codemirror6.git"
|
|
30
|
-
},
|
|
31
|
-
"bugs": {
|
|
32
|
-
"url": "https://github.com/logue/vue-codemirror6/issues"
|
|
33
|
-
},
|
|
34
|
-
"engines": {
|
|
35
|
-
"node": ">=16"
|
|
36
|
-
},
|
|
37
|
-
"license": "MIT",
|
|
38
|
-
"main": "./dist/vue-codemirror6.umd.js",
|
|
39
|
-
"module": "./dist/vue-codemirror6.es.js",
|
|
40
|
-
"browser": {
|
|
41
|
-
"./sfc": "./src/components/CodeMirror.vue"
|
|
42
|
-
},
|
|
43
|
-
"exports": {
|
|
44
|
-
".": {
|
|
45
|
-
"import": "./dist/vue-codemirror6.es.js",
|
|
46
|
-
"require": "./dist/vue-codemirror6.umd.js"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"types": "./dist/index.d.ts",
|
|
50
|
-
"files": [
|
|
51
|
-
"/dist",
|
|
52
|
-
"/src/components/CodeMirror.vue"
|
|
53
|
-
],
|
|
54
|
-
"sideEffects": false,
|
|
55
|
-
"scripts": {
|
|
56
|
-
"dev": "vite",
|
|
57
|
-
"clean": "rimraf node_modules/.vite",
|
|
58
|
-
"build": "vite build & vue-tsc",
|
|
59
|
-
"build:clean": "rimraf dist",
|
|
60
|
-
"lint": "eslint . --fix --cache --cache-location ./node_modules/.vite/vite-plugin-eslint && prettier . --write",
|
|
61
|
-
"switch:2": "vue-demi-switch 2 & npx vue-demi-fix",
|
|
62
|
-
"switch:3": "vue-demi-switch 3 vue3 & npx vue-demi-fix",
|
|
63
|
-
"prepare": "husky install",
|
|
64
|
-
"postinstall": "npx vue-demi-fix"
|
|
65
|
-
},
|
|
66
|
-
"dependencies": {
|
|
67
|
-
"vue-demi": "latest"
|
|
68
|
-
},
|
|
69
|
-
"peerDependencies": {
|
|
70
|
-
"@codemirror/state": "^0.19.9",
|
|
71
|
-
"@codemirror/view": "^0.19.48",
|
|
72
|
-
"@vue/composition-api": "^1.4.9",
|
|
73
|
-
"vue": "^2.6.14 || ^3.2.31"
|
|
74
|
-
},
|
|
75
|
-
"peerDependenciesMeta": {
|
|
76
|
-
"@vue/composition-api": {
|
|
77
|
-
"optional": true
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"devDependencies": {
|
|
81
|
-
"@codemirror/basic-setup": "^0.19.3",
|
|
82
|
-
"@codemirror/lang-markdown": "^0.19.6",
|
|
83
|
-
"@codemirror/language": "^0.19.10",
|
|
84
|
-
"@codemirror/lint": "^0.19.6",
|
|
85
|
-
"@modyqyw/vite-plugin-eslint": "^1.2.0",
|
|
86
|
-
"@types/lodash": "^4.14.181",
|
|
87
|
-
"@types/node": "^17.0.23",
|
|
88
|
-
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
|
89
|
-
"@typescript-eslint/parser": "^5.18.0",
|
|
90
|
-
"@vue/composition-api": "^1.4.9",
|
|
91
|
-
"@vue/eslint-config-typescript": "^10.0.0",
|
|
92
|
-
"eslint": "^8.12.0",
|
|
93
|
-
"eslint-config-google": "^0.14.0",
|
|
94
|
-
"eslint-config-prettier": "^8.5.0",
|
|
95
|
-
"eslint-import-resolver-alias": "^1.1.2",
|
|
96
|
-
"eslint-import-resolver-typescript": "^2.7.1",
|
|
97
|
-
"eslint-plugin-import": "^2.26.0",
|
|
98
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
99
|
-
"eslint-plugin-prettier-vue": "^3.1.0",
|
|
100
|
-
"eslint-plugin-tsdoc": "^0.2.14",
|
|
101
|
-
"eslint-plugin-vue": "^8.5.0",
|
|
102
|
-
"eslint-plugin-vuejs-accessibility": "^1.1.1",
|
|
103
|
-
"husky": "^7.0.4",
|
|
104
|
-
"lint-staged": "^12.3.7",
|
|
105
|
-
"lodash": "^4.17.21",
|
|
106
|
-
"prettier": "^2.6.2",
|
|
107
|
-
"prettier-plugin-jsdoc": "^0.3.36",
|
|
108
|
-
"prettier-plugin-md-nocjsp": "^1.2.0",
|
|
109
|
-
"prettier-plugin-sort-imports": "^1.6.0",
|
|
110
|
-
"rimraf": "^3.0.2",
|
|
111
|
-
"typescript": "^4.6.3",
|
|
112
|
-
"vite": "^2.9.1",
|
|
113
|
-
"vite-plugin-vue2": "^1.9.3",
|
|
114
|
-
"vue": "^2.6.14",
|
|
115
|
-
"vue-eslint-parser": "^8.3.0",
|
|
116
|
-
"vue-template-compiler": "^2.6.14",
|
|
117
|
-
"vue-tsc": "^0.33.9"
|
|
118
|
-
},
|
|
119
|
-
"husky": {
|
|
120
|
-
"hooks": {
|
|
121
|
-
"pre-commit": "lint-staged"
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"lint-staged": {
|
|
125
|
-
"*.{js,ts,json,htm,html}": "eslint --fix --cache --cache-location ./node_modules/.vite/vite-plugin-eslint",
|
|
126
|
-
"*": "prettier -w -u"
|
|
127
|
-
}
|
|
128
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
+
"name": "vue-codemirror6",
|
|
4
|
+
"version": "0.1.3",
|
|
5
|
+
"description": "CodeMirror6 Component for vue2",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"vuejs",
|
|
8
|
+
"vue",
|
|
9
|
+
"vue-components",
|
|
10
|
+
"vue-codemirror",
|
|
11
|
+
"code-editor",
|
|
12
|
+
"text-editor",
|
|
13
|
+
"vue2",
|
|
14
|
+
"web-editor",
|
|
15
|
+
"vue-plugin",
|
|
16
|
+
"vue-component",
|
|
17
|
+
"codemirror-editor",
|
|
18
|
+
"vue-resource",
|
|
19
|
+
"codemirror6"
|
|
20
|
+
],
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "Logue",
|
|
23
|
+
"email": "logue@hotmail.co.jp",
|
|
24
|
+
"url": "https://logue.dev/"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/logue/vue-codemirror6",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git@github.com:logue/vue-codemirror6.git"
|
|
30
|
+
},
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/logue/vue-codemirror6/issues"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=16"
|
|
36
|
+
},
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"main": "./dist/vue-codemirror6.umd.js",
|
|
39
|
+
"module": "./dist/vue-codemirror6.es.js",
|
|
40
|
+
"browser": {
|
|
41
|
+
"./sfc": "./src/components/CodeMirror.vue"
|
|
42
|
+
},
|
|
43
|
+
"exports": {
|
|
44
|
+
".": {
|
|
45
|
+
"import": "./dist/vue-codemirror6.es.js",
|
|
46
|
+
"require": "./dist/vue-codemirror6.umd.js"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"types": "./dist/index.d.ts",
|
|
50
|
+
"files": [
|
|
51
|
+
"/dist",
|
|
52
|
+
"/src/components/CodeMirror.vue"
|
|
53
|
+
],
|
|
54
|
+
"sideEffects": false,
|
|
55
|
+
"scripts": {
|
|
56
|
+
"dev": "vite",
|
|
57
|
+
"clean": "rimraf node_modules/.vite",
|
|
58
|
+
"build": "vite build & vue-tsc",
|
|
59
|
+
"build:clean": "rimraf dist",
|
|
60
|
+
"lint": "eslint . --fix --cache --cache-location ./node_modules/.vite/vite-plugin-eslint && prettier . --write",
|
|
61
|
+
"switch:2": "vue-demi-switch 2 & npx vue-demi-fix",
|
|
62
|
+
"switch:3": "vue-demi-switch 3 vue3 & npx vue-demi-fix",
|
|
63
|
+
"prepare": "husky install",
|
|
64
|
+
"postinstall": "npx vue-demi-fix"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"vue-demi": "latest"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"@codemirror/state": "^0.19.9",
|
|
71
|
+
"@codemirror/view": "^0.19.48",
|
|
72
|
+
"@vue/composition-api": "^1.4.9",
|
|
73
|
+
"vue": "^2.6.14 || ^3.2.31"
|
|
74
|
+
},
|
|
75
|
+
"peerDependenciesMeta": {
|
|
76
|
+
"@vue/composition-api": {
|
|
77
|
+
"optional": true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@codemirror/basic-setup": "^0.19.3",
|
|
82
|
+
"@codemirror/lang-markdown": "^0.19.6",
|
|
83
|
+
"@codemirror/language": "^0.19.10",
|
|
84
|
+
"@codemirror/lint": "^0.19.6",
|
|
85
|
+
"@modyqyw/vite-plugin-eslint": "^1.2.0",
|
|
86
|
+
"@types/lodash": "^4.14.181",
|
|
87
|
+
"@types/node": "^17.0.23",
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
|
89
|
+
"@typescript-eslint/parser": "^5.18.0",
|
|
90
|
+
"@vue/composition-api": "^1.4.9",
|
|
91
|
+
"@vue/eslint-config-typescript": "^10.0.0",
|
|
92
|
+
"eslint": "^8.12.0",
|
|
93
|
+
"eslint-config-google": "^0.14.0",
|
|
94
|
+
"eslint-config-prettier": "^8.5.0",
|
|
95
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
96
|
+
"eslint-import-resolver-typescript": "^2.7.1",
|
|
97
|
+
"eslint-plugin-import": "^2.26.0",
|
|
98
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
99
|
+
"eslint-plugin-prettier-vue": "^3.1.0",
|
|
100
|
+
"eslint-plugin-tsdoc": "^0.2.14",
|
|
101
|
+
"eslint-plugin-vue": "^8.5.0",
|
|
102
|
+
"eslint-plugin-vuejs-accessibility": "^1.1.1",
|
|
103
|
+
"husky": "^7.0.4",
|
|
104
|
+
"lint-staged": "^12.3.7",
|
|
105
|
+
"lodash": "^4.17.21",
|
|
106
|
+
"prettier": "^2.6.2",
|
|
107
|
+
"prettier-plugin-jsdoc": "^0.3.36",
|
|
108
|
+
"prettier-plugin-md-nocjsp": "^1.2.0",
|
|
109
|
+
"prettier-plugin-sort-imports": "^1.6.0",
|
|
110
|
+
"rimraf": "^3.0.2",
|
|
111
|
+
"typescript": "^4.6.3",
|
|
112
|
+
"vite": "^2.9.1",
|
|
113
|
+
"vite-plugin-vue2": "^1.9.3",
|
|
114
|
+
"vue": "^2.6.14",
|
|
115
|
+
"vue-eslint-parser": "^8.3.0",
|
|
116
|
+
"vue-template-compiler": "^2.6.14",
|
|
117
|
+
"vue-tsc": "^0.33.9"
|
|
118
|
+
},
|
|
119
|
+
"husky": {
|
|
120
|
+
"hooks": {
|
|
121
|
+
"pre-commit": "lint-staged"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"lint-staged": {
|
|
125
|
+
"*.{js,ts,json,htm,html}": "eslint --fix --cache --cache-location ./node_modules/.vite/vite-plugin-eslint",
|
|
126
|
+
"*": "prettier -w -u"
|
|
127
|
+
}
|
|
128
|
+
}
|