@king-one/form-design 0.0.7 → 0.0.9
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
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import * as u from "monaco-editor";
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import * as u from "monaco-editor/esm/vs/editor/editor.api";
|
|
2
|
+
import "monaco-editor/esm/vs/editor/contrib/folding/browser/folding.js";
|
|
3
|
+
import "monaco-editor/esm/vs/language/json/monaco.contribution";
|
|
4
|
+
import { onMounted as l } from "vue";
|
|
5
|
+
function m(r) {
|
|
4
6
|
window.MonacoEnvironment = {
|
|
5
7
|
getWorker(o, n) {
|
|
6
8
|
return n === "json" ? new Worker(
|
|
@@ -33,7 +35,7 @@ function s(r) {
|
|
|
33
35
|
const t = async (o) => {
|
|
34
36
|
e && e.setValue(JSON.stringify(o, null, 2));
|
|
35
37
|
};
|
|
36
|
-
return
|
|
38
|
+
return l(() => {
|
|
37
39
|
r.value && (e = u.editor.create(r.value, {
|
|
38
40
|
value: "",
|
|
39
41
|
readOnly: !0,
|
|
@@ -41,7 +43,6 @@ function s(r) {
|
|
|
41
43
|
scrollbar: {
|
|
42
44
|
verticalScrollbarSize: 5
|
|
43
45
|
},
|
|
44
|
-
fontLigatures: !0,
|
|
45
46
|
folding: !0,
|
|
46
47
|
theme: "vs",
|
|
47
48
|
language: "json",
|
|
@@ -56,5 +57,5 @@ function s(r) {
|
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
m as useMonaco
|
|
60
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("monaco-editor/esm/vs/editor/editor.api");require("monaco-editor/esm/vs/editor/contrib/folding/browser/folding.js");require("monaco-editor/esm/vs/language/json/monaco.contribution");const a=require("vue");var n=typeof document<"u"?document.currentScript:null;function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=s(c);function l(e){window.MonacoEnvironment={getWorker(o,u){return u==="json"?new Worker(new URL("/assets/json.worker-BPBY9qSj.js",typeof document>"u"?require("url").pathToFileURL(__filename).href:n&&n.src||new URL("src/hooks/use-monaco.js",document.baseURI).href),{type:"module"}):new Worker(new URL("/assets/editor.worker-DAdS0XRj.js",typeof document>"u"?require("url").pathToFileURL(__filename).href:n&&n.src||new URL("src/hooks/use-monaco.js",document.baseURI).href),{type:"module"})}};let r=null;const t=async o=>{r&&r.setValue(JSON.stringify(o,null,2))};return a.onMounted(()=>{e.value&&(r=i.editor.create(e.value,{value:"",readOnly:!0,automaticLayout:!0,scrollbar:{verticalScrollbarSize:5},folding:!0,theme:"vs",language:"json",selectOnLineNumbers:!0,scrollBeyondLastLine:!0,overviewRulerBorder:!1}))}),{setEditorValue:t}}exports.useMonaco=l;
|