@vtj/pro 0.7.25 → 0.7.26

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.
@@ -1,7 +1,7 @@
1
1
  function __vite__mapDeps(indexes) {
2
2
  if (!__vite__mapDeps.viteFileDeps) {
3
- __vite__mapDeps.viteFileDeps = ["./monaco-editor-DzwMy79G.js","./monaco-editor-z6e5Xz8u.css"]
3
+ __vite__mapDeps.viteFileDeps = ["./monaco-editor-CPxLaFIm.js","./monaco-editor-BoaUnmrp.css"]
4
4
  }
5
5
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
6
6
  }
7
- import{_ as i,e as h}from"./monaco-editor-DzwMy79G.js";import{d as y,r as f,i as g,n as v,I as E,f as V,o as w,c as T,O as k,aa as D,a5 as P,P as b}from"./@vue-YzzUp3ER.js";const A=y({__name:"Editor",props:{lang:{default:"typescript"},modelValue:{default:""},options:{default:()=>({})},height:{default:"300px"},readonly:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},border:{type:Boolean},minimap:{type:Boolean,default:!1}},emits:["change","blur","update:modelValue"],setup(d,{expose:u,emit:m}){const t=d;self.MonacoEnvironment={createTrustedTypesPolicy:void 0,async getWorker(o,r){let n;return r==="json"&&(n=await i(()=>import("./monaco-editor-DzwMy79G.js").then(a=>a.j),__vite__mapDeps([0,1]),import.meta.url)),["css","scss","less"].includes(r)&&(n=await i(()=>import("./monaco-editor-DzwMy79G.js").then(a=>a.c),__vite__mapDeps([0,1]),import.meta.url)),["html","handlebars","razor","vue"].includes(r)&&(n=await i(()=>import("./monaco-editor-DzwMy79G.js").then(a=>a.h),__vite__mapDeps([0,1]),import.meta.url)),["typescript","javascript"].includes(r)&&(n=await i(()=>import("./monaco-editor-DzwMy79G.js").then(a=>a.t),__vite__mapDeps([0,1]),import.meta.url)),n=n||await i(()=>import("./monaco-editor-DzwMy79G.js").then(a=>a.a),__vite__mapDeps([0,1]),import.meta.url),new n.default}};const l=m,s=f();let e=null;const p=async()=>{e&&(await e.getAction("editor.action.formatDocument")?.run(),e.setValue(e.getValue()))},c=async()=>{await p();const o=e?.getValue();l("update:modelValue",o),l("blur",o)},_=()=>{e=h.create(s.value,{value:t.modelValue,language:t.lang,readOnly:t.readonly,theme:t.dark?"vs-dark":"vs",automaticLayout:!0,minimap:{enabled:t.minimap},...t.options}),e.onDidChangeModelContent(o=>{l("change",e?.getValue(),o)}),e.onDidBlurEditorText(c)};return g(()=>{v(_)}),E(()=>{e&&e.dispose()}),V(()=>t.modelValue,o=>{e&&e.setValue(o)}),u({getEditor:()=>e}),(o,r)=>(w(),T("div",{class:k(["v-code-editor",{"is-border":t.border}]),ref_key:"container",ref:s,onKeyup:r[0]||(r[0]=D(P(()=>{},["stop"]),["enter"])),style:b({height:t.height})},null,38))}});export{A as default};
7
+ import{_ as i,e as h}from"./monaco-editor-CPxLaFIm.js";import{d as y,r as f,i as g,n as v,I as E,f as V,o as w,c as T,O as k,aa as D,a5 as P,P as b}from"./@vue-YzzUp3ER.js";const A=y({__name:"Editor",props:{lang:{default:"typescript"},modelValue:{default:""},options:{default:()=>({})},height:{default:"300px"},readonly:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},border:{type:Boolean},minimap:{type:Boolean,default:!1}},emits:["change","blur","update:modelValue"],setup(d,{expose:u,emit:m}){const t=d;self.MonacoEnvironment={createTrustedTypesPolicy:void 0,async getWorker(o,r){let n;return r==="json"&&(n=await i(()=>import("./monaco-editor-CPxLaFIm.js").then(a=>a.j),__vite__mapDeps([0,1]),import.meta.url)),["css","scss","less"].includes(r)&&(n=await i(()=>import("./monaco-editor-CPxLaFIm.js").then(a=>a.c),__vite__mapDeps([0,1]),import.meta.url)),["html","handlebars","razor","vue"].includes(r)&&(n=await i(()=>import("./monaco-editor-CPxLaFIm.js").then(a=>a.h),__vite__mapDeps([0,1]),import.meta.url)),["typescript","javascript"].includes(r)&&(n=await i(()=>import("./monaco-editor-CPxLaFIm.js").then(a=>a.t),__vite__mapDeps([0,1]),import.meta.url)),n=n||await i(()=>import("./monaco-editor-CPxLaFIm.js").then(a=>a.a),__vite__mapDeps([0,1]),import.meta.url),new n.default}};const l=m,s=f();let e=null;const p=async()=>{e&&(await e.getAction("editor.action.formatDocument")?.run(),e.setValue(e.getValue()))},c=async()=>{await p();const o=e?.getValue();l("update:modelValue",o),l("blur",o)},_=()=>{e=h.create(s.value,{value:t.modelValue,language:t.lang,readOnly:t.readonly,theme:t.dark?"vs-dark":"vs",automaticLayout:!0,minimap:{enabled:t.minimap},...t.options}),e.onDidChangeModelContent(o=>{l("change",e?.getValue(),o)}),e.onDidBlurEditorText(c)};return g(()=>{v(_)}),E(()=>{e&&e.dispose()}),V(()=>t.modelValue,o=>{e&&e.setValue(o)}),u({getEditor:()=>e}),(o,r)=>(w(),T("div",{class:k(["v-code-editor",{"is-border":t.border}]),ref_key:"container",ref:s,onKeyup:r[0]||(r[0]=D(P(()=>{},["stop"]),["enter"])),style:b({height:t.height})},null,38))}});export{A as default};