@fangzhongya/vue-archive 0.0.71 → 0.0.72
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/packages/components/use/retrie/input/codemirror/codemirror.cjs +1 -3
- package/dist/packages/components/use/retrie/input/codemirror/codemirror.d.ts +2 -1
- package/dist/packages/components/use/retrie/input/codemirror/codemirror.js +21 -23
- package/dist/packages/components/use/retrie/input/codemirror/codemirror.vue.cjs +5 -1
- package/dist/packages/components/use/retrie/input/codemirror/codemirror.vue.js +47 -39
- package/dist/packages/components/use/retrie/input/editor/editor.cjs +1 -3
- package/dist/packages/components/use/retrie/input/editor/editor.d.ts +4 -26
- package/dist/packages/components/use/retrie/input/editor/editor.js +23 -23
- package/dist/packages/components/use/retrie/input/editor/editor.vue.cjs +5 -1
- package/dist/packages/components/use/retrie/input/editor/editor.vue.js +34 -29
- package/dist/packages/components/use/retrie/input/editor/init.cjs +1 -1
- package/dist/packages/components/use/retrie/input/editor/init.d.ts +3 -0
- package/dist/packages/components/use/retrie/input/editor/init.js +14 -11
- package/dist/packages/components/use/retrie/input/index.d.ts +3 -3
- package/dist/packages/components/use/retrie/input/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/input/index.vue.js +25 -28
- package/dist/packages/components/use/retrie/input/text.d.ts +5 -11
- package/dist/packages/components/use/retrie/input/text.vue.cjs +5 -1
- package/dist/packages/components/use/retrie/input/text.vue.js +18 -20
- package/package.json +1 -1
|
@@ -1,3 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@codemirror/view"),
|
|
2
|
-
|
|
3
|
-
`,extensions:[...e,d.basicSetup,s.EditorView.updateListener.of(r=>{t&&t(r),r.docChanged&&n&&n(r.state.doc.toString(),r),r.focusChanged&&(r.view.hasFocus?o&&o(r):c&&c(r))})]});function E(e,t){return new s.EditorView({state:i([u.javascript()],t),parent:e})}function q(e,t){return new s.EditorView({state:i([a.html()],t),parent:e})}function S(e,t){return new s.EditorView({state:i([g.json()],t),parent:e})}function m(e,t){return new s.EditorView({state:i([f.css()],t),parent:e})}exports.createEditorState=i;exports.getCss=m;exports.getHtml=q;exports.getJs=E;exports.getJson=S;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@codemirror/view"),a=require("@codemirror/lang-javascript"),g=require("@codemirror/lang-html"),f=require("@codemirror/lang-json"),l=require("@codemirror/lang-css"),d=require("@codemirror/state"),E=require("codemirror"),i=(e,{onUpdate:t,onChange:n,onFocus:o,onBlur:c,value:u})=>d.EditorState.create({doc:u,extensions:[...e,E.basicSetup,s.EditorView.updateListener.of(r=>{t&&t(r),r.docChanged&&n&&n(r.state.doc.toString(),r),r.focusChanged&&(r.view.hasFocus?o&&o(r):c&&c(r))})]});function q(e,t){return new s.EditorView({state:i([a.javascript()],t),parent:e})}function S(e,t){return new s.EditorView({state:i([g.html()],t),parent:e})}function m(e,t){return new s.EditorView({state:i([f.json()],t),parent:e})}function J(e,t){return new s.EditorView({state:i([l.css()],t),parent:e})}exports.createEditorState=i;exports.getCss=J;exports.getHtml=S;exports.getJs=q;exports.getJson=m;
|
|
@@ -5,8 +5,9 @@ interface CreateStateOptions extends EditorStateConfig {
|
|
|
5
5
|
onUpdate?(viewUpdate: ViewUpdate): void;
|
|
6
6
|
onFocus?(viewUpdate: ViewUpdate): void;
|
|
7
7
|
onBlur?(viewUpdate: ViewUpdate): void;
|
|
8
|
+
value: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const createEditorState: (extensions: Extension[], { onUpdate, onChange, onFocus, onBlur }: CreateStateOptions) => EditorState;
|
|
10
|
+
export declare const createEditorState: (extensions: Extension[], { onUpdate, onChange, onFocus, onBlur, value }: CreateStateOptions) => EditorState;
|
|
10
11
|
export declare function getJs(parent: Element, obj: CreateStateOptions): EditorView;
|
|
11
12
|
export declare function getHtml(parent: Element, obj: CreateStateOptions): EditorView;
|
|
12
13
|
export declare function getJson(parent: Element, obj: CreateStateOptions): EditorView;
|
|
@@ -1,30 +1,20 @@
|
|
|
1
1
|
import { EditorView as e } from "@codemirror/view";
|
|
2
|
-
import { javascript as
|
|
3
|
-
import { html as
|
|
4
|
-
import { json as
|
|
5
|
-
import { css as
|
|
6
|
-
import { EditorState as
|
|
7
|
-
import { basicSetup as
|
|
8
|
-
const i = (r, { onUpdate: t, onChange: n, onFocus: s, onBlur: f }) =>
|
|
9
|
-
doc:
|
|
10
|
-
|
|
11
|
-
`,
|
|
2
|
+
import { javascript as c } from "@codemirror/lang-javascript";
|
|
3
|
+
import { html as u } from "@codemirror/lang-html";
|
|
4
|
+
import { json as a } from "@codemirror/lang-json";
|
|
5
|
+
import { css as g } from "@codemirror/lang-css";
|
|
6
|
+
import { EditorState as S } from "@codemirror/state";
|
|
7
|
+
import { basicSetup as h } from "codemirror";
|
|
8
|
+
const i = (r, { onUpdate: t, onChange: n, onFocus: s, onBlur: f, value: m }) => S.create({
|
|
9
|
+
doc: m,
|
|
12
10
|
extensions: [
|
|
13
11
|
...r,
|
|
14
|
-
|
|
12
|
+
h,
|
|
15
13
|
e.updateListener.of((o) => {
|
|
16
14
|
t && t(o), o.docChanged && n && n(o.state.doc.toString(), o), o.focusChanged && (o.view.hasFocus ? s && s(o) : f && f(o));
|
|
17
15
|
})
|
|
18
16
|
]
|
|
19
17
|
});
|
|
20
|
-
function J(r, t) {
|
|
21
|
-
return new e({
|
|
22
|
-
// 状态
|
|
23
|
-
state: i([m()], t),
|
|
24
|
-
// 绑定元素
|
|
25
|
-
parent: r
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
18
|
function b(r, t) {
|
|
29
19
|
return new e({
|
|
30
20
|
// 状态
|
|
@@ -49,10 +39,18 @@ function H(r, t) {
|
|
|
49
39
|
parent: r
|
|
50
40
|
});
|
|
51
41
|
}
|
|
42
|
+
function L(r, t) {
|
|
43
|
+
return new e({
|
|
44
|
+
// 状态
|
|
45
|
+
state: i([g()], t),
|
|
46
|
+
// 绑定元素
|
|
47
|
+
parent: r
|
|
48
|
+
});
|
|
49
|
+
}
|
|
52
50
|
export {
|
|
53
51
|
i as createEditorState,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
L as getCss,
|
|
53
|
+
d as getHtml,
|
|
54
|
+
b as getJs,
|
|
55
|
+
H as getJson
|
|
58
56
|
};
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("vue"),f=require("../../../../../directives/adjust/index.cjs"),c=require("./codemirror.cjs"),v={class:"codemirror-div"},p=t.defineComponent({__name:"codemirror",props:{modelValue:{type:String,default:`
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
`},format:{type:String}},emits:["update:modelValue"],setup(n,{emit:i}){const e=n,u=i,s=t.ref(),r=t.ref();function a(o){const l=o.view.state.doc.toString().trim();l&&u("update:modelValue",l)}function m(){let o=e.modelValue;e.format==="js"||e.format==="ts"?r.value=c.getJs(s.value,{value:o,onBlur:a}):e.format==="css"||e.format==="scss"?r.value=c.getCss(s.value,{value:o,onBlur:a}):e.format==="html"||e.format==="vue"?r.value=c.getHtml(s.value,{value:o,onBlur:a}):e.format==="json"&&(r.value=c.getJson(s.value,{value:o,onBlur:a}))}return t.watch(()=>e.modelValue,()=>{r.value?.dispatch({changes:{from:0,to:r.value?.state.doc.length,insert:e.modelValue}})}),t.onMounted(()=>{m()}),(o,d)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",v,[t.createElementVNode("div",{class:"codemirror-code",ref_key:"refText",ref:s},null,512)])),[[t.unref(f),{bottom:{}}]])}});module.exports=p;
|
|
@@ -1,62 +1,70 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { getJs as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as f, ref as l, watch as d, onMounted as v, withDirectives as p, createElementBlock as g, openBlock as _, createElementVNode as h, unref as V } from "vue";
|
|
2
|
+
import w from "../../../../../directives/adjust/index.js";
|
|
3
|
+
import { getJs as x, getCss as j, getHtml as k, getJson as y } from "./codemirror.js";
|
|
4
|
+
const B = { class: "codemirror-div" }, T = /* @__PURE__ */ f({
|
|
5
5
|
__name: "codemirror",
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: {
|
|
8
|
-
type:
|
|
8
|
+
type: String,
|
|
9
|
+
default: `
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
`
|
|
9
14
|
},
|
|
10
15
|
format: {
|
|
11
16
|
type: String
|
|
12
|
-
},
|
|
13
|
-
check: {
|
|
14
|
-
type: Function,
|
|
15
|
-
default() {
|
|
16
|
-
return "";
|
|
17
|
-
}
|
|
18
17
|
}
|
|
19
18
|
},
|
|
20
19
|
emits: ["update:modelValue"],
|
|
21
|
-
setup(
|
|
22
|
-
const e =
|
|
23
|
-
function
|
|
24
|
-
const s =
|
|
25
|
-
|
|
26
|
-
n && (s.dispatch({
|
|
27
|
-
changes: {
|
|
28
|
-
from: 0,
|
|
29
|
-
to: a.length,
|
|
30
|
-
insert: n
|
|
31
|
-
}
|
|
32
|
-
}), f("update:modelValue", n));
|
|
20
|
+
setup(m, { emit: n }) {
|
|
21
|
+
const e = m, c = n, r = l(), o = l();
|
|
22
|
+
function a(t) {
|
|
23
|
+
const s = t.view.state.doc.toString().trim();
|
|
24
|
+
s && c("update:modelValue", s);
|
|
33
25
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
onBlur:
|
|
39
|
-
}) : e.format === "
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
function i() {
|
|
27
|
+
let t = e.modelValue;
|
|
28
|
+
e.format === "js" || e.format === "ts" ? o.value = x(r.value, {
|
|
29
|
+
value: t,
|
|
30
|
+
onBlur: a
|
|
31
|
+
}) : e.format === "css" || e.format === "scss" ? o.value = j(r.value, {
|
|
32
|
+
value: t,
|
|
33
|
+
onBlur: a
|
|
34
|
+
}) : e.format === "html" || e.format === "vue" ? o.value = k(r.value, {
|
|
35
|
+
value: t,
|
|
36
|
+
onBlur: a
|
|
37
|
+
}) : e.format === "json" && (o.value = y(r.value, {
|
|
38
|
+
value: t,
|
|
39
|
+
onBlur: a
|
|
43
40
|
}));
|
|
44
41
|
}
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
return d(
|
|
43
|
+
() => e.modelValue,
|
|
44
|
+
() => {
|
|
45
|
+
o.value?.dispatch({
|
|
46
|
+
changes: {
|
|
47
|
+
from: 0,
|
|
48
|
+
to: o.value?.state.doc.length,
|
|
49
|
+
insert: e.modelValue
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
), v(() => {
|
|
54
|
+
i();
|
|
55
|
+
}), (t, u) => p((_(), g("div", B, [
|
|
56
|
+
h("div", {
|
|
49
57
|
class: "codemirror-code",
|
|
50
58
|
ref_key: "refText",
|
|
51
|
-
ref:
|
|
59
|
+
ref: r
|
|
52
60
|
}, null, 512)
|
|
53
61
|
])), [
|
|
54
|
-
[
|
|
62
|
+
[V(w), {
|
|
55
63
|
bottom: {}
|
|
56
64
|
}]
|
|
57
65
|
]);
|
|
58
66
|
}
|
|
59
67
|
});
|
|
60
68
|
export {
|
|
61
|
-
|
|
69
|
+
T as default
|
|
62
70
|
};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
|
|
3
|
-
`,lineNumbers:"on",automaticLayout:!0};function r(e){return t.editor.create(e,{...n,language:"typescript"})}function o(e){return t.editor.create(e,{...n,language:"html"})}function u(e){return t.editor.create(e,{...n,language:"json"})}function a(e){return t.editor.create(e,{...n,language:"css"})}exports.getCss=a;exports.getHtml=o;exports.getJs=r;exports.getJson=u;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("monaco-editor/esm/vs/editor/editor.api"),r={theme:"vs",value:""};function g(e,t){return n.editor.create(e,{...r,value:t,language:"typescript"})}function o(e,t){return n.editor.create(e,{...r,value:t,language:"html"})}function s(e,t){return n.editor.create(e,{...r,value:t,language:"json"})}function u(e,t){return n.editor.create(e,{...r,value:t,language:"css"})}exports.getCss=u;exports.getHtml=o;exports.getJs=g;exports.getJson=s;
|
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
import { editor } from 'monaco-editor/esm/vs/editor/editor.api';
|
|
2
|
-
export declare function getJs(parent: HTMLElement): editor.IStandaloneCodeEditor;
|
|
3
|
-
export declare function getHtml(parent: HTMLElement): editor.IStandaloneCodeEditor;
|
|
4
|
-
export declare function getJson(parent: HTMLElement): editor.IStandaloneCodeEditor;
|
|
5
|
-
export declare function getCss(parent: HTMLElement): editor.IStandaloneCodeEditor;
|
|
6
|
-
;
|
|
7
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
8
|
-
"update:modelValue": (...args: any[]) => void;
|
|
9
|
-
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: null;
|
|
12
|
-
};
|
|
13
|
-
format: {
|
|
14
|
-
type: StringConstructor;
|
|
15
|
-
};
|
|
16
|
-
check: {
|
|
17
|
-
type: FunctionConstructor;
|
|
18
|
-
default(): string;
|
|
19
|
-
};
|
|
20
|
-
}>> & Readonly<{
|
|
21
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
22
|
-
}>, {
|
|
23
|
-
check: Function;
|
|
24
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
25
|
-
refText: HTMLDivElement;
|
|
26
|
-
}, HTMLDivElement>;
|
|
27
|
-
export default _default;
|
|
2
|
+
export declare function getJs(parent: HTMLElement, value: string): editor.IStandaloneCodeEditor;
|
|
3
|
+
export declare function getHtml(parent: HTMLElement, value: string): editor.IStandaloneCodeEditor;
|
|
4
|
+
export declare function getJson(parent: HTMLElement, value: string): editor.IStandaloneCodeEditor;
|
|
5
|
+
export declare function getCss(parent: HTMLElement, value: string): editor.IStandaloneCodeEditor;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { editor as
|
|
2
|
-
const
|
|
1
|
+
import { editor as n } from "monaco-editor/esm/vs/editor/editor.api";
|
|
2
|
+
const r = {
|
|
3
3
|
theme: "vs",
|
|
4
|
-
value:
|
|
5
|
-
|
|
6
|
-
`,
|
|
7
|
-
lineNumbers: "on",
|
|
8
|
-
automaticLayout: !0
|
|
4
|
+
value: ""
|
|
9
5
|
};
|
|
10
|
-
function
|
|
11
|
-
return
|
|
12
|
-
...
|
|
6
|
+
function g(e, t) {
|
|
7
|
+
return n.create(e, {
|
|
8
|
+
...r,
|
|
9
|
+
value: t,
|
|
13
10
|
language: "typescript"
|
|
14
11
|
});
|
|
15
12
|
}
|
|
16
|
-
function
|
|
17
|
-
return
|
|
18
|
-
...
|
|
13
|
+
function u(e, t) {
|
|
14
|
+
return n.create(e, {
|
|
15
|
+
...r,
|
|
16
|
+
value: t,
|
|
19
17
|
language: "html"
|
|
20
18
|
});
|
|
21
19
|
}
|
|
22
|
-
function
|
|
23
|
-
return
|
|
24
|
-
...
|
|
20
|
+
function c(e, t) {
|
|
21
|
+
return n.create(e, {
|
|
22
|
+
...r,
|
|
23
|
+
value: t,
|
|
25
24
|
language: "json"
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
...
|
|
27
|
+
function o(e, t) {
|
|
28
|
+
return n.create(e, {
|
|
29
|
+
...r,
|
|
30
|
+
value: t,
|
|
31
31
|
language: "css"
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
o as getCss,
|
|
36
|
+
u as getHtml,
|
|
37
|
+
g as getJs,
|
|
38
|
+
c as getJson
|
|
39
39
|
};
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),m=require("../../../../../directives/adjust/index.cjs"),
|
|
1
|
+
"use strict";const t=require("vue"),m=require("../../../../../directives/adjust/index.cjs"),r=require("./editor.cjs"),d=require("./init.cjs"),v={class:"editor-div"},p=t.defineComponent({__name:"editor",props:{modelValue:{type:String,default:`
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
`},format:{type:String}},emits:["update:modelValue"],setup(u,{emit:n}){const e=u,i=n,s=t.ref(),l=t.shallowRef();function c(){d.init();const o=e.modelValue;e.format==="js"||e.format==="ts"?l.value=r.getJs(s.value,o):e.format==="css"||e.format==="scss"?l.value=r.getCss(s.value,o):e.format==="html"||e.format==="vue"?l.value=r.getHtml(s.value,o):e.format==="json"&&(l.value=r.getJson(s.value,o))}function f(o){o&&i("update:modelValue",o)}return t.watch(()=>e.modelValue,()=>{l.value?.setValue(e.modelValue)}),t.onMounted(()=>{c(),l.value?.onDidBlurEditorText(o=>{if(l.value){const a=l.value.getValue();f(a)}})}),(o,a)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",v,[t.createElementVNode("div",{class:"editor-code",ref_key:"refText",ref:s},null,512)])),[[t.unref(m),{bottom:{}}]])}});module.exports=p;
|
|
@@ -1,53 +1,58 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { getJs as
|
|
4
|
-
import { init as
|
|
5
|
-
const E = { class: "editor-div" },
|
|
1
|
+
import { defineComponent as n, ref as f, shallowRef as c, watch as d, onMounted as v, withDirectives as p, createElementBlock as V, openBlock as _, createElementVNode as g, unref as h } from "vue";
|
|
2
|
+
import x from "../../../../../directives/adjust/index.js";
|
|
3
|
+
import { getJs as B, getCss as j, getHtml as k, getJson as w } from "./editor.js";
|
|
4
|
+
import { init as y } from "./init.js";
|
|
5
|
+
const E = { class: "editor-div" }, S = /* @__PURE__ */ n({
|
|
6
6
|
__name: "editor",
|
|
7
7
|
props: {
|
|
8
8
|
modelValue: {
|
|
9
|
-
type:
|
|
9
|
+
type: String,
|
|
10
|
+
default: `
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
`
|
|
10
15
|
},
|
|
11
16
|
format: {
|
|
12
17
|
type: String
|
|
13
|
-
},
|
|
14
|
-
check: {
|
|
15
|
-
type: Function,
|
|
16
|
-
default() {
|
|
17
|
-
return "";
|
|
18
|
-
}
|
|
19
18
|
}
|
|
20
19
|
},
|
|
21
20
|
emits: ["update:modelValue"],
|
|
22
|
-
setup(
|
|
23
|
-
const e =
|
|
24
|
-
function
|
|
25
|
-
|
|
21
|
+
setup(r, { emit: s }) {
|
|
22
|
+
const e = r, u = s, l = f(), o = c();
|
|
23
|
+
function i() {
|
|
24
|
+
y();
|
|
25
|
+
const t = e.modelValue;
|
|
26
|
+
e.format === "js" || e.format === "ts" ? o.value = B(l.value, t) : e.format === "css" || e.format === "scss" ? o.value = j(l.value, t) : e.format === "html" || e.format === "vue" ? o.value = k(l.value, t) : e.format === "json" && (o.value = w(l.value, t));
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
l && u("update:modelValue", l);
|
|
28
|
+
function m(t) {
|
|
29
|
+
t && u("update:modelValue", t);
|
|
30
30
|
}
|
|
31
|
-
return d(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
return d(
|
|
32
|
+
() => e.modelValue,
|
|
33
|
+
() => {
|
|
34
|
+
o.value?.setValue(e.modelValue);
|
|
35
|
+
}
|
|
36
|
+
), v(() => {
|
|
37
|
+
i(), o.value?.onDidBlurEditorText((t) => {
|
|
38
|
+
if (o.value) {
|
|
39
|
+
const a = o.value.getValue();
|
|
40
|
+
m(a);
|
|
36
41
|
}
|
|
37
42
|
});
|
|
38
|
-
}), (
|
|
39
|
-
|
|
43
|
+
}), (t, a) => p((_(), V("div", E, [
|
|
44
|
+
g("div", {
|
|
40
45
|
class: "editor-code",
|
|
41
46
|
ref_key: "refText",
|
|
42
|
-
ref:
|
|
47
|
+
ref: l
|
|
43
48
|
}, null, 512)
|
|
44
49
|
])), [
|
|
45
|
-
[
|
|
50
|
+
[h(x), {
|
|
46
51
|
bottom: {}
|
|
47
52
|
}]
|
|
48
53
|
]);
|
|
49
54
|
}
|
|
50
55
|
});
|
|
51
56
|
export {
|
|
52
|
-
|
|
57
|
+
S as default
|
|
53
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("monaco-editor/esm/vs/editor/editor.main");function e(o){const r="/monaco-editor/esm/vs/",t=new Worker(`${r}${o}.js?type=module&worker_file`,{type:"module"});return t.onerror=()=>{},t.postMessage(""),t}const n=e("editor/editor.worker"),i=e("language/json/json.worker"),c=e("language/css/css.worker"),u=e("language/html/html.worker"),g=e("language/typescript/ts.worker");function a(){self.MonacoEnvironment={getWorker(o,r){return r==="json"?i:r==="css"||r==="scss"||r==="less"?c:r==="html"||r==="handlebars"||r==="razor"?u:r==="typescript"||r==="javascript"?g:n}},s.languages.typescript.typescriptDefaults.setEagerModelSync(!0)}exports.init=a;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { languages as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { languages as s } from "monaco-editor/esm/vs/editor/editor.main";
|
|
2
|
+
function e(t) {
|
|
3
|
+
const r = "/monaco-editor/esm/vs/", o = new Worker(`${r}${t}.js?type=module&worker_file`, {
|
|
4
|
+
type: "module"
|
|
5
|
+
});
|
|
6
|
+
return o.onerror = () => {
|
|
7
|
+
}, o.postMessage(""), o;
|
|
8
|
+
}
|
|
9
|
+
const n = e("editor/editor.worker"), c = e("language/json/json.worker"), i = e("language/css/css.worker"), u = e("language/html/html.worker"), k = e("language/typescript/ts.worker");
|
|
10
|
+
function p() {
|
|
8
11
|
self.MonacoEnvironment = {
|
|
9
|
-
getWorker(
|
|
10
|
-
return r === "json" ?
|
|
12
|
+
getWorker(t, r) {
|
|
13
|
+
return r === "json" ? c : r === "css" || r === "scss" || r === "less" ? i : r === "html" || r === "handlebars" || r === "razor" ? u : r === "typescript" || r === "javascript" ? k : n;
|
|
11
14
|
}
|
|
12
|
-
},
|
|
15
|
+
}, s.typescript.typescriptDefaults.setEagerModelSync(!0);
|
|
13
16
|
}
|
|
14
17
|
export {
|
|
15
|
-
|
|
18
|
+
p as init
|
|
16
19
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from '../../../../../vue/dist/vue.esm-bundler.js';
|
|
2
2
|
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
3
|
modelValue: {
|
|
4
|
-
type:
|
|
4
|
+
type: StringConstructor;
|
|
5
5
|
};
|
|
6
6
|
check: {
|
|
7
7
|
type: FunctionConstructor;
|
|
@@ -15,7 +15,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
15
15
|
"update:modelValue": (...args: any[]) => void;
|
|
16
16
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
17
17
|
modelValue: {
|
|
18
|
-
type:
|
|
18
|
+
type: StringConstructor;
|
|
19
19
|
};
|
|
20
20
|
check: {
|
|
21
21
|
type: FunctionConstructor;
|
|
@@ -28,7 +28,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
28
28
|
}>> & Readonly<{
|
|
29
29
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
|
-
check: Function;
|
|
32
31
|
format: string;
|
|
32
|
+
check: Function;
|
|
33
33
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
34
34
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),m=require("./text.vue.cjs");;/* empty css */const i=require("./codemirror/codemirror.vue.cjs");;/* empty css */const d=require("./editor/editor.vue.cjs");;/* empty css */const c=require("../../../../config.cjs"),_={class:"form-input"},v=e.defineComponent({__name:"index",props:{modelValue:{type:String},check:{type:Function,default(){return""}},format:{type:String,default:"js"}},emits:["update:modelValue"],setup(a,{emit:p}){const l=a,r=e.ref(c.getConfig("editortype")||0),s=p,t=e.computed({get(){return l.modelValue},set(n){s("update:modelValue",n)}});return(n,o)=>(e.openBlock(),e.createElementBlock("div",_,[r.value==1?(e.openBlock(),e.createBlock(i,{key:0,modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=u=>t.value=u),format:l.format},null,8,["modelValue","format"])):r.value==2?(e.openBlock(),e.createBlock(d,{key:1,modelValue:t.value,"onUpdate:modelValue":o[1]||(o[1]=u=>t.value=u),format:l.format},null,8,["modelValue","format"])):(e.openBlock(),e.createBlock(m,{key:2,modelValue:t.value,"onUpdate:modelValue":o[2]||(o[2]=u=>t.value=u)},null,8,["modelValue"]))]))}});module.exports=v;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as i, ref as f, computed as s, createElementBlock as V, openBlock as l, createBlock as a } from "vue";
|
|
2
|
+
import c from "./text.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
4
|
+
import v from "./codemirror/codemirror.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import
|
|
6
|
+
import y from "./editor/editor.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import { getConfig as
|
|
9
|
-
const
|
|
8
|
+
import { getConfig as _ } from "../../../../config.js";
|
|
9
|
+
const k = { class: "form-input" }, E = /* @__PURE__ */ i({
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
12
12
|
modelValue: {
|
|
13
|
-
type:
|
|
13
|
+
type: String
|
|
14
14
|
},
|
|
15
15
|
check: {
|
|
16
16
|
type: Function,
|
|
@@ -24,34 +24,31 @@ const _ = { class: "form-input" }, E = /* @__PURE__ */ d({
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(n, { emit:
|
|
28
|
-
const
|
|
27
|
+
setup(n, { emit: p }) {
|
|
28
|
+
const m = n, r = f(_("editortype") || 0), d = p, e = s({
|
|
29
29
|
get() {
|
|
30
|
-
return
|
|
30
|
+
return m.modelValue;
|
|
31
31
|
},
|
|
32
|
-
set(
|
|
33
|
-
|
|
32
|
+
set(u) {
|
|
33
|
+
d("update:modelValue", u);
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
return (
|
|
37
|
-
|
|
36
|
+
return (u, t) => (l(), V("div", k, [
|
|
37
|
+
r.value == 1 ? (l(), a(v, {
|
|
38
38
|
key: 0,
|
|
39
|
-
modelValue:
|
|
40
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
41
|
-
format:
|
|
42
|
-
|
|
43
|
-
}, null, 8, ["modelValue", "format", "check"])) : u.value == 2 ? (m(), a(v, {
|
|
39
|
+
modelValue: e.value,
|
|
40
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value = o),
|
|
41
|
+
format: m.format
|
|
42
|
+
}, null, 8, ["modelValue", "format"])) : r.value == 2 ? (l(), a(y, {
|
|
44
43
|
key: 1,
|
|
45
|
-
modelValue:
|
|
46
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
47
|
-
format:
|
|
48
|
-
|
|
49
|
-
}, null, 8, ["modelValue", "format", "check"])) : (m(), a(k, {
|
|
44
|
+
modelValue: e.value,
|
|
45
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value = o),
|
|
46
|
+
format: m.format
|
|
47
|
+
}, null, 8, ["modelValue", "format"])) : (l(), a(c, {
|
|
50
48
|
key: 2,
|
|
51
|
-
modelValue:
|
|
52
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
53
|
-
|
|
54
|
-
}, null, 8, ["modelValue", "check"]))
|
|
49
|
+
modelValue: e.value,
|
|
50
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => e.value = o)
|
|
51
|
+
}, null, 8, ["modelValue"]))
|
|
55
52
|
]));
|
|
56
53
|
}
|
|
57
54
|
});
|
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from '../../../../../vue/dist/vue.esm-bundler.js';
|
|
2
2
|
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
3
|
modelValue: {
|
|
4
|
-
type:
|
|
5
|
-
|
|
6
|
-
check: {
|
|
7
|
-
type: FunctionConstructor;
|
|
8
|
-
default(): string;
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
9
6
|
};
|
|
10
7
|
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
11
8
|
"update:modelValue": (...args: any[]) => void;
|
|
12
9
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
13
10
|
modelValue: {
|
|
14
|
-
type:
|
|
15
|
-
|
|
16
|
-
check: {
|
|
17
|
-
type: FunctionConstructor;
|
|
18
|
-
default(): string;
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
19
13
|
};
|
|
20
14
|
}>> & Readonly<{
|
|
21
15
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
22
16
|
}>, {
|
|
23
|
-
|
|
17
|
+
modelValue: string;
|
|
24
18
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLTextAreaElement>;
|
|
25
19
|
export default _default;
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),m=e.defineComponent({__name:"text",props:{modelValue:{type:String,default:`
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
`}},emits:["update:modelValue"],setup(u,{emit:n}){const o=u,a=n,l=e.ref(o.modelValue);e.watch(()=>o.modelValue,()=>{l.value=o.modelValue});async function s(r){const t=l.value;t&&a("update:modelValue",t)}return(r,t)=>e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{class:"form-input-text",rows:"5","onUpdate:modelValue":t[0]||(t[0]=c=>l.value=c),onBlur:s},null,544)),[[e.vModelText,l.value]])}});module.exports=m;
|
|
@@ -1,36 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const V = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as s, ref as d, watch as p, withDirectives as c, createElementBlock as i, openBlock as f, vModelText as v } from "vue";
|
|
2
|
+
const V = /* @__PURE__ */ s({
|
|
3
3
|
__name: "text",
|
|
4
4
|
props: {
|
|
5
5
|
modelValue: {
|
|
6
|
-
type:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
6
|
+
type: String,
|
|
7
|
+
default: `
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
`
|
|
13
12
|
}
|
|
14
13
|
},
|
|
15
14
|
emits: ["update:modelValue"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
15
|
+
setup(o, { emit: a }) {
|
|
16
|
+
const l = o, u = a, t = d(l.modelValue);
|
|
18
17
|
p(
|
|
19
|
-
() =>
|
|
18
|
+
() => l.modelValue,
|
|
20
19
|
() => {
|
|
21
|
-
t.value =
|
|
20
|
+
t.value = l.modelValue;
|
|
22
21
|
}
|
|
23
22
|
);
|
|
24
|
-
async function r
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
o && n("update:modelValue", o);
|
|
23
|
+
async function n(r) {
|
|
24
|
+
const e = t.value;
|
|
25
|
+
e && u("update:modelValue", e);
|
|
28
26
|
}
|
|
29
|
-
return (
|
|
27
|
+
return (r, e) => c((f(), i("textarea", {
|
|
30
28
|
class: "form-input-text",
|
|
31
29
|
rows: "5",
|
|
32
|
-
"onUpdate:modelValue":
|
|
33
|
-
onBlur:
|
|
30
|
+
"onUpdate:modelValue": e[0] || (e[0] = (m) => t.value = m),
|
|
31
|
+
onBlur: n
|
|
34
32
|
}, null, 544)), [
|
|
35
33
|
[v, t.value]
|
|
36
34
|
]);
|