@fast-crud/editor-code 1.26.0 → 1.26.1

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
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.26.1](https://github.com/fast-crud/fast-crud/compare/v1.26.0...v1.26.1) (2025-08-07)
7
+
8
+ ### Bug Fixes
9
+
10
+ * 修复editor-code export name错误的bug ([29dee87](https://github.com/fast-crud/fast-crud/commit/29dee87eb221e05ca31cab8c060bded04b064012))
11
+
6
12
  # [1.26.0](https://github.com/fast-crud/fast-crud/compare/v1.25.13...v1.26.0) (2025-07-28)
7
13
 
8
14
  ### Features
@@ -1 +1 @@
1
- {"version":3,"file":"editor-code.umd.js","sources":["../../src/editor/components/fs-editor-code/async-import.ts","../../src/editor/components/fs-editor-code/workers.ts","../src/editor/components/fs-editor-code/index.vue","../../src/editor/type/types.ts","../../src/editor/type/index.ts","../../src/editor/components/fs-editor-code/validators.ts","../../src/editor/index.umd.ts"],"sourcesContent":[null,null,"<template>\n <div ref=\"monacoRef\" class=\"fs-editor-code\"></div>\n</template>\n\n<script lang=\"ts\" setup>\nimport * as monaco from \"monaco-editor\";\n// import * as monaco from \"monaco-editor/esm/vs/editor/editor.api\";\nimport { onMounted, onUnmounted, ref, watch } from \"vue\";\nimport { cloneDeep, debounce as lodashDebounce } from \"lodash-es\";\nimport {\n importJavascriptContribution,\n importJsonContribution,\n importMonacoYaml,\n importYamlContribution\n} from \"./async-import\";\nimport { initWorkers } from \"./workers\";\n/**\n * config:\n * value: '', // 编辑器初始文本\n * language: 'javascript', // 语言\n * theme: 'vs', // 主题\n * readOnly: false, // 是否只读\n * minimap: { enabled: false }, // 是否启用小地图\n * fontSize: 14, // 字体大小\n * tabSize: 2, // tab缩进长度\n * automaticLayout: true, // 自动布局\n * lineNumbers: 'off', // 是否启用行号\n * contextmenu: true, // 是否启用上下文菜单\n * folding: true, // 是否启用代码折叠\n * foldingStrategy: 'auto', // 代码折叠策略\n * wordWrap: 'on', // 自动换行设置\n * wrappingIndent: 'indent', // 换行缩进\n * formatOnPaste: true, // 粘贴时是否自动格式化\n * formatOnType: true, // 输入时是否自动格式化\n * dragAndDrop: true, // 是否允许拖放\n * cursorStyle: 'line', // 光标样式\n * cursorBlinking: 'blink', // 光标闪烁方式\n * scrollbar: {\n * vertical: 'auto', // 垂直滚动条的显示方式\n * horizontal: 'auto', // 水平滚动条的显示方式\n * verticalScrollbarSize: 2, // 垂直滚动条的宽\n * horizontalScrollbarSize: 2, // 水平滚动条的高度\n * }\n */\nconst props = defineProps<{\n language?: string;\n modelValue?: string;\n config?: any;\n schema?: any;\n debounce?: number;\n init?: any;\n readonly?: boolean;\n disabled?: boolean;\n id?: string;\n}>();\n\nexport type EditorCodeCtx = {\n // monaco对象\n monaco: any;\n //语言\n language: string;\n //配置\n config: any;\n //editor实例对象\n instance?: any;\n\n schema?: any;\n\n initialValue?: any;\n};\ninitWorkers();\nconst monacoRef = ref();\n\nlet instanceRef: any = null;\n\nfunction disposeEditor() {\n if (instanceRef) {\n instanceRef.dispose(); //使用完成销毁实例\n }\n}\n\nonUnmounted(() => {\n disposeEditor();\n});\n\nconst emits = defineEmits([\"update:modelValue\", \"change\", \"ready\"]);\n\nconst emitValue = lodashDebounce((value: any) => {\n emits(\"update:modelValue\", value);\n}, props.debounce || 500);\n\nasync function createEditor(ctx: EditorCodeCtx) {\n disposeEditor();\n const instance = monaco.editor.create(monacoRef.value, {\n automaticLayout: true,\n value: props.modelValue,\n language: ctx.language,\n theme: \"vs-dark\",\n minimap: { enabled: false },\n readOnly: props.readonly || props.disabled,\n hover: {\n enabled: true\n },\n ...ctx.config\n });\n\n // @event `change`\n instance.onDidChangeModelContent((event) => {\n const value = instance.getValue();\n if (props.modelValue !== value) {\n emits(\"change\", value);\n emitValue(value);\n }\n });\n\n instanceRef = instance;\n ctx.instance = instance;\n emits(\"ready\", ctx);\n return instance;\n}\n\nasync function initJavascript(ctx: EditorCodeCtx) {\n await importJavascriptContribution();\n monaco.languages.register({ id: \"javascript\" });\n}\n\nasync function initJson(ctx: EditorCodeCtx) {\n await importJsonContribution();\n monaco.languages.register({ id: \"json\" });\n\n const schemas = [];\n if (ctx.schema) {\n schemas.push({\n uri: \"http://myserver/foo-schema.json\", // id of the first schema\n fileMatch: [\"*\"], // associate with our model\n schema: {\n ...ctx.schema\n }\n });\n }\n\n monaco.languages.json.jsonDefaults.setDiagnosticsOptions({\n validate: true,\n enableSchemaRequest: false,\n schemas\n });\n}\n\nasync function initYaml(ctx: EditorCodeCtx) {\n await importYamlContribution();\n const { configureMonacoYaml } = await importMonacoYaml();\n monaco.languages.register({ id: \"yaml\" });\n let id = `fs-editor-code-yaml-${props.id || \"\"}.yaml`;\n const schemas = [];\n if (ctx.schema) {\n schemas.push({\n fileMatch: [\"*\"], // associate with our model\n schema: {\n ...ctx.schema\n },\n uri: `http://myserver/${id}`\n });\n }\n configureMonacoYaml(monaco, {\n schemas,\n format: true,\n hover: true,\n completion: true,\n validate: true,\n isKubernetes: false,\n enableSchemaRequest: false\n });\n\n // const uri = monaco.Uri.parse(id);\n // const oldModel = monaco.editor.getModel(uri);\n // if (oldModel) {\n // oldModel.dispose();\n // }\n // ctx.config.model = monaco.editor.createModel(props.modelValue, null, uri);\n}\n\nasync function doInit() {\n disposeEditor();\n const ctx: EditorCodeCtx = {\n monaco,\n language: props.language || \"javascript\",\n config: cloneDeep(props.config || {}),\n initialValue: props.modelValue || \"\",\n schema: props.schema\n };\n if (ctx.language === \"javascript\") {\n await initJavascript(ctx);\n } else if (ctx.language === \"yaml\") {\n await initYaml(ctx);\n } else if (ctx.language === \"json\") {\n await initJson(ctx);\n }\n\n await createEditor(ctx);\n}\n\nonMounted(async () => {\n await doInit();\n watch(\n () => {\n return {\n language: props.language,\n config: props.config\n };\n },\n (value: any) => {\n doInit();\n }\n );\n});\n\nwatch(\n () => {\n return props.modelValue;\n },\n (value: any) => {\n if (instanceRef && instanceRef.getValue() !== value) {\n instanceRef.setValue(value);\n }\n }\n);\n</script>\n\n<style lang=\"less\">\n.fs-editor-code {\n min-height: 100px;\n width: 100%;\n border: 1px solid #eee;\n border-radius: 5px;\n}\n\n.monaco-editor .hover-content {\n z-index: 10000 !important;\n}\n</style>\n",null,null,null,null],"names":["importJsYaml","importYamlContribution","importJsonContribution","importJavascriptContribution","importMonacoYaml","WorkerBucket","registerWorker","labels","worker","label","labelItem","initWorkers","_","workerLoader","props","__props","monacoRef","ref","instanceRef","disposeEditor","onUnmounted","emits","__emit","emitValue","lodashDebounce","value","createEditor","ctx","instance","monaco","event","initJavascript","initJson","schemas","initYaml","configureMonacoYaml","id","doInit","cloneDeep","onMounted","watch","_createElementBlock","types","FsExtendsModelType","app","options","newTypes","addTypes","useTypes","FsEditorCodeValidators","rule","yaml","modules","FsExtendsComponents","utils","FsEditorCode"],"mappings":"urBAAA,eAAsBA,GAAY,CACzB,OAAA,KAAM,QAAO,SAAS,CAC/B,CAEA,eAAsBC,GAAsB,CAC1C,KAAM,QAAO,6DAA6D,CAC5E,CAEA,eAAsBC,GAAsB,CAC1C,KAAM,QAAO,wDAAwD,CACvE,CAEA,eAAsBC,GAA4B,CAChD,KAAM,QAAO,yEAAyE,CACxF,CAEA,eAAsBC,GAAgB,CAC7B,OAAA,KAAM,QAAO,aAAa,CACnC,CCdA,MAAMC,EAA6B,CAAA,EAInB,SAAAC,EAAeC,EAA2BC,EAAW,CACnEH,EAAa,KAAK,CAChB,OAAAG,EACA,MAAQC,GAAiB,CACnB,GAAA,OAAOF,GAAW,SACpB,OAAOA,IAAWE,EAEpB,UAAWC,KAAaH,EAItB,GAHIG,IAAc,KAGdA,IAAcD,EACT,MAAA,GAGJ,MAAA,EACT,CAAA,CACD,CACH,UAEgBE,GAAW,CACrB,OAAO,oBAKX,OAAO,kBAAoB,CAEzB,UAAUC,EAAG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AJ,IAAIzB,EAAY,MAAM,gBAAA,4HCDf,SAAA0B,GAAA,CACL,MAAA,CACL,cAAe,CACb,KAAM,CAAE,UAAW,CAAE,KAAM,gBAAkB,EAAE,IAAK,CAAE,KAAM,GAAM,CACnE,CAAA,CAEL,CCHe,MAAAC,EAAA,CACb,QAAQC,EAAUC,EAAY,CAC5B,MAAMC,EAAWJ,IACX,CAAE,SAAAK,GAAaC,EAAAA,WACrBD,EAASD,CAAQ,CACnB,GCyBWG,EAAyB,CACpC,SAhCe,CACf,UAAW,MAAOC,EAAWzB,IAAc,CAEzC,GAAIA,EACE,GAAA,CACF,KAAK,MAAMA,CAAK,QACT,EAAQ,CACf,cAAQ,MAAM,CAAC,EACT,IAAI,MAAM,YAAc,EAAE,OAAO,CACxC,CAEL,EACA,QAAS,YAqBT,SAlBe,CACf,UAAW,MAAOyB,EAAWzB,IAAc,CAEzC,GAAIA,EACE,GAAA,CACI,MAAA0B,EAAO,MAAMnD,IACnBmD,EAAK,KAAK1B,EAAO,CAAE,OAAQ0B,EAAK,YAAa,QACtC,EAAQ,CACf,cAAQ,MAAM,CAAC,EACT,IAAI,MAAM,YAAc,EAAE,OAAO,CACxC,CAEL,EACA,QAAS,aC1BLC,6DACAC,EAAsB,CAC1B,QAAQT,EAAQ,CACdU,QAAM,KAAK,sBAAsBV,EAAKQ,EAAS,KAAM,yBAA0B,IAAI,CACrF,GAGWG,EAAe,CAC1B,QAAQX,EAAUC,EAAY,CACxBD,EAAA,IAAID,EAAoBE,CAAO,EACnCD,EAAI,IAAIS,CAAmB,CAC7B"}
1
+ {"version":3,"file":"editor-code.umd.js","sources":["../../src/editor/components/fs-editor-code/async-import.ts","../../src/editor/components/fs-editor-code/workers.ts","../src/editor/components/fs-editor-code/index.vue","../../src/editor/type/types.ts","../../src/editor/type/index.ts","../../src/editor/components/fs-editor-code/validators.ts","../../src/editor/index.umd.ts"],"sourcesContent":[null,null,"<template>\n <div ref=\"monacoRef\" class=\"fs-editor-code\"></div>\n</template>\n\n<script lang=\"ts\" setup>\nimport * as monaco from \"monaco-editor\";\n// import * as monaco from \"monaco-editor/esm/vs/editor/editor.api\";\nimport { onMounted, onUnmounted, ref, watch } from \"vue\";\nimport { cloneDeep, debounce as lodashDebounce } from \"lodash-es\";\nimport {\n importJavascriptContribution,\n importJsonContribution,\n importMonacoYaml,\n importYamlContribution\n} from \"./async-import\";\nimport { initWorkers } from \"./workers\";\n/**\n * config:\n * value: '', // 编辑器初始文本\n * language: 'javascript', // 语言\n * theme: 'vs', // 主题\n * readOnly: false, // 是否只读\n * minimap: { enabled: false }, // 是否启用小地图\n * fontSize: 14, // 字体大小\n * tabSize: 2, // tab缩进长度\n * automaticLayout: true, // 自动布局\n * lineNumbers: 'off', // 是否启用行号\n * contextmenu: true, // 是否启用上下文菜单\n * folding: true, // 是否启用代码折叠\n * foldingStrategy: 'auto', // 代码折叠策略\n * wordWrap: 'on', // 自动换行设置\n * wrappingIndent: 'indent', // 换行缩进\n * formatOnPaste: true, // 粘贴时是否自动格式化\n * formatOnType: true, // 输入时是否自动格式化\n * dragAndDrop: true, // 是否允许拖放\n * cursorStyle: 'line', // 光标样式\n * cursorBlinking: 'blink', // 光标闪烁方式\n * scrollbar: {\n * vertical: 'auto', // 垂直滚动条的显示方式\n * horizontal: 'auto', // 水平滚动条的显示方式\n * verticalScrollbarSize: 2, // 垂直滚动条的宽\n * horizontalScrollbarSize: 2, // 水平滚动条的高度\n * }\n */\nconst props = defineProps<{\n language?: string;\n modelValue?: string;\n config?: any;\n schema?: any;\n debounce?: number;\n init?: any;\n readonly?: boolean;\n disabled?: boolean;\n id?: string;\n}>();\n\nexport type EditorCodeCtx = {\n // monaco对象\n monaco: any;\n //语言\n language: string;\n //配置\n config: any;\n //editor实例对象\n instance?: any;\n\n schema?: any;\n\n initialValue?: any;\n};\ninitWorkers();\nconst monacoRef = ref();\n\nlet instanceRef: any = null;\n\nfunction disposeEditor() {\n if (instanceRef) {\n instanceRef.dispose(); //使用完成销毁实例\n }\n}\n\nonUnmounted(() => {\n disposeEditor();\n});\n\nconst emits = defineEmits([\"update:modelValue\", \"change\", \"ready\"]);\n\nconst emitValue = lodashDebounce((value: any) => {\n emits(\"update:modelValue\", value);\n}, props.debounce || 500);\n\nasync function createEditor(ctx: EditorCodeCtx) {\n disposeEditor();\n const instance = monaco.editor.create(monacoRef.value, {\n automaticLayout: true,\n value: props.modelValue,\n language: ctx.language,\n theme: \"vs-dark\",\n minimap: { enabled: false },\n readOnly: props.readonly || props.disabled,\n hover: {\n enabled: true\n },\n ...ctx.config\n });\n\n // @event `change`\n instance.onDidChangeModelContent((event) => {\n const value = instance.getValue();\n if (props.modelValue !== value) {\n emits(\"change\", value);\n emitValue(value);\n }\n });\n\n instanceRef = instance;\n ctx.instance = instance;\n emits(\"ready\", ctx);\n return instance;\n}\n\nasync function initJavascript(ctx: EditorCodeCtx) {\n await importJavascriptContribution();\n monaco.languages.register({ id: \"javascript\" });\n}\n\nasync function initJson(ctx: EditorCodeCtx) {\n await importJsonContribution();\n monaco.languages.register({ id: \"json\" });\n\n const schemas = [];\n if (ctx.schema) {\n schemas.push({\n uri: \"http://myserver/foo-schema.json\", // id of the first schema\n fileMatch: [\"*\"], // associate with our model\n schema: {\n ...ctx.schema\n }\n });\n }\n\n monaco.languages.json.jsonDefaults.setDiagnosticsOptions({\n validate: true,\n enableSchemaRequest: false,\n schemas\n });\n}\n\nasync function initYaml(ctx: EditorCodeCtx) {\n await importYamlContribution();\n const { configureMonacoYaml } = await importMonacoYaml();\n monaco.languages.register({ id: \"yaml\" });\n let id = `fs-editor-code-yaml-${props.id || \"\"}.yaml`;\n const schemas = [];\n if (ctx.schema) {\n schemas.push({\n fileMatch: [\"*\"], // associate with our model\n schema: {\n ...ctx.schema\n },\n uri: `http://myserver/${id}`\n });\n }\n configureMonacoYaml(monaco, {\n schemas,\n format: true,\n hover: true,\n completion: true,\n validate: true,\n isKubernetes: false,\n enableSchemaRequest: false\n });\n\n // const uri = monaco.Uri.parse(id);\n // const oldModel = monaco.editor.getModel(uri);\n // if (oldModel) {\n // oldModel.dispose();\n // }\n // ctx.config.model = monaco.editor.createModel(props.modelValue, null, uri);\n}\n\nasync function doInit() {\n disposeEditor();\n const ctx: EditorCodeCtx = {\n monaco,\n language: props.language || \"javascript\",\n config: cloneDeep(props.config || {}),\n initialValue: props.modelValue || \"\",\n schema: props.schema\n };\n if (ctx.language === \"javascript\") {\n await initJavascript(ctx);\n } else if (ctx.language === \"yaml\") {\n await initYaml(ctx);\n } else if (ctx.language === \"json\") {\n await initJson(ctx);\n }\n\n await createEditor(ctx);\n}\n\nonMounted(async () => {\n await doInit();\n watch(\n () => {\n return {\n language: props.language,\n config: props.config\n };\n },\n (value: any) => {\n doInit();\n }\n );\n});\n\nwatch(\n () => {\n return props.modelValue;\n },\n (value: any) => {\n if (instanceRef && instanceRef.getValue() !== value) {\n instanceRef.setValue(value);\n }\n }\n);\n</script>\n\n<style lang=\"less\">\n.fs-editor-code {\n min-height: 100px;\n width: 100%;\n border: 1px solid #eee;\n border-radius: 5px;\n}\n\n.monaco-editor .hover-content {\n z-index: 10000 !important;\n}\n</style>\n",null,null,null,null],"names":["importJsYaml","importYamlContribution","importJsonContribution","importJavascriptContribution","importMonacoYaml","WorkerBucket","registerWorker","labels","worker","label","labelItem","initWorkers","_","workerLoader","props","__props","monacoRef","ref","instanceRef","disposeEditor","onUnmounted","emits","__emit","emitValue","lodashDebounce","value","createEditor","ctx","instance","monaco","event","initJavascript","initJson","schemas","initYaml","configureMonacoYaml","id","doInit","cloneDeep","onMounted","watch","types","FsExtendsModelType","app","options","newTypes","addTypes","useTypes","FsEditorCodeValidators","rule","yaml","modules","FsExtendsComponents","utils","FsEditorCode"],"mappings":"urBAAA,eAAsBA,GAAY,CACzB,OAAA,KAAM,QAAO,SAAS,CAC/B,CAEA,eAAsBC,GAAsB,CAC1C,KAAM,QAAO,6DAA6D,CAC5E,CAEA,eAAsBC,GAAsB,CAC1C,KAAM,QAAO,wDAAw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ACrF,GAGWG,EAAe,CAC1B,QAAQX,EAAUC,EAAY,CACxBD,EAAA,IAAID,EAAoBE,CAAO,EACnCD,EAAI,IAAIS,CAAmB,CAC7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index-4cfdb04c.mjs","sources":["../src/editor/components/fs-editor-code/index.vue"],"sourcesContent":["<template>\n <div ref=\"monacoRef\" class=\"fs-editor-code\"></div>\n</template>\n\n<script lang=\"ts\" setup>\nimport * as monaco from \"monaco-editor\";\n// import * as monaco from \"monaco-editor/esm/vs/editor/editor.api\";\nimport { onMounted, onUnmounted, ref, watch } from \"vue\";\nimport { cloneDeep, debounce as lodashDebounce } from \"lodash-es\";\nimport {\n importJavascriptContribution,\n importJsonContribution,\n importMonacoYaml,\n importYamlContribution\n} from \"./async-import\";\nimport { initWorkers } from \"./workers\";\n/**\n * config:\n * value: '', // 编辑器初始文本\n * language: 'javascript', // 语言\n * theme: 'vs', // 主题\n * readOnly: false, // 是否只读\n * minimap: { enabled: false }, // 是否启用小地图\n * fontSize: 14, // 字体大小\n * tabSize: 2, // tab缩进长度\n * automaticLayout: true, // 自动布局\n * lineNumbers: 'off', // 是否启用行号\n * contextmenu: true, // 是否启用上下文菜单\n * folding: true, // 是否启用代码折叠\n * foldingStrategy: 'auto', // 代码折叠策略\n * wordWrap: 'on', // 自动换行设置\n * wrappingIndent: 'indent', // 换行缩进\n * formatOnPaste: true, // 粘贴时是否自动格式化\n * formatOnType: true, // 输入时是否自动格式化\n * dragAndDrop: true, // 是否允许拖放\n * cursorStyle: 'line', // 光标样式\n * cursorBlinking: 'blink', // 光标闪烁方式\n * scrollbar: {\n * vertical: 'auto', // 垂直滚动条的显示方式\n * horizontal: 'auto', // 水平滚动条的显示方式\n * verticalScrollbarSize: 2, // 垂直滚动条的宽\n * horizontalScrollbarSize: 2, // 水平滚动条的高度\n * }\n */\nconst props = defineProps<{\n language?: string;\n modelValue?: string;\n config?: any;\n schema?: any;\n debounce?: number;\n init?: any;\n readonly?: boolean;\n disabled?: boolean;\n id?: string;\n}>();\n\nexport type EditorCodeCtx = {\n // monaco对象\n monaco: any;\n //语言\n language: string;\n //配置\n config: any;\n //editor实例对象\n instance?: any;\n\n schema?: any;\n\n initialValue?: any;\n};\ninitWorkers();\nconst monacoRef = ref();\n\nlet instanceRef: any = null;\n\nfunction disposeEditor() {\n if (instanceRef) {\n instanceRef.dispose(); //使用完成销毁实例\n }\n}\n\nonUnmounted(() => {\n disposeEditor();\n});\n\nconst emits = defineEmits([\"update:modelValue\", \"change\", \"ready\"]);\n\nconst emitValue = lodashDebounce((value: any) => {\n emits(\"update:modelValue\", value);\n}, props.debounce || 500);\n\nasync function createEditor(ctx: EditorCodeCtx) {\n disposeEditor();\n const instance = monaco.editor.create(monacoRef.value, {\n automaticLayout: true,\n value: props.modelValue,\n language: ctx.language,\n theme: \"vs-dark\",\n minimap: { enabled: false },\n readOnly: props.readonly || props.disabled,\n hover: {\n enabled: true\n },\n ...ctx.config\n });\n\n // @event `change`\n instance.onDidChangeModelContent((event) => {\n const value = instance.getValue();\n if (props.modelValue !== value) {\n emits(\"change\", value);\n emitValue(value);\n }\n });\n\n instanceRef = instance;\n ctx.instance = instance;\n emits(\"ready\", ctx);\n return instance;\n}\n\nasync function initJavascript(ctx: EditorCodeCtx) {\n await importJavascriptContribution();\n monaco.languages.register({ id: \"javascript\" });\n}\n\nasync function initJson(ctx: EditorCodeCtx) {\n await importJsonContribution();\n monaco.languages.register({ id: \"json\" });\n\n const schemas = [];\n if (ctx.schema) {\n schemas.push({\n uri: \"http://myserver/foo-schema.json\", // id of the first schema\n fileMatch: [\"*\"], // associate with our model\n schema: {\n ...ctx.schema\n }\n });\n }\n\n monaco.languages.json.jsonDefaults.setDiagnosticsOptions({\n validate: true,\n enableSchemaRequest: false,\n schemas\n });\n}\n\nasync function initYaml(ctx: EditorCodeCtx) {\n await importYamlContribution();\n const { configureMonacoYaml } = await importMonacoYaml();\n monaco.languages.register({ id: \"yaml\" });\n let id = `fs-editor-code-yaml-${props.id || \"\"}.yaml`;\n const schemas = [];\n if (ctx.schema) {\n schemas.push({\n fileMatch: [\"*\"], // associate with our model\n schema: {\n ...ctx.schema\n },\n uri: `http://myserver/${id}`\n });\n }\n configureMonacoYaml(monaco, {\n schemas,\n format: true,\n hover: true,\n completion: true,\n validate: true,\n isKubernetes: false,\n enableSchemaRequest: false\n });\n\n // const uri = monaco.Uri.parse(id);\n // const oldModel = monaco.editor.getModel(uri);\n // if (oldModel) {\n // oldModel.dispose();\n // }\n // ctx.config.model = monaco.editor.createModel(props.modelValue, null, uri);\n}\n\nasync function doInit() {\n disposeEditor();\n const ctx: EditorCodeCtx = {\n monaco,\n language: props.language || \"javascript\",\n config: cloneDeep(props.config || {}),\n initialValue: props.modelValue || \"\",\n schema: props.schema\n };\n if (ctx.language === \"javascript\") {\n await initJavascript(ctx);\n } else if (ctx.language === \"yaml\") {\n await initYaml(ctx);\n } else if (ctx.language === \"json\") {\n await initJson(ctx);\n }\n\n await createEditor(ctx);\n}\n\nonMounted(async () => {\n await doInit();\n watch(\n () => {\n return {\n language: props.language,\n config: props.config\n };\n },\n (value: any) => {\n doInit();\n }\n );\n});\n\nwatch(\n () => {\n return props.modelValue;\n },\n (value: any) => {\n if (instanceRef && instanceRef.getValue() !== value) {\n instanceRef.setValue(value);\n }\n }\n);\n</script>\n\n<style lang=\"less\">\n.fs-editor-code {\n min-height: 100px;\n width: 100%;\n border: 1px solid #eee;\n border-radius: 5px;\n}\n\n.monaco-editor .hover-content {\n z-index: 10000 !important;\n}\n</style>\n"],"names":["props","__props","initWorkers","monacoRef","ref","instanceRef","disposeEditor","onUnmounted","emits","__emit","emitValue","lodashDebounce","value","createEditor","ctx","instance","monaco","event","initJavascript","importJavascriptContribution","initJson","importJsonContribution","schemas","initYaml","importYamlContribution","configureMonacoYaml","importMonacoYaml","id","doInit","cloneDeep","onMounted","watch","_createElementBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4CA,UAAMA,IAAQC;AA0BF,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U/B,EAAM;AAAA,UAChB,QAAQA,EAAM;AAAA,QAAA;AAAA,QAGlB,CAACY,MAAe;AACP,UAAAgB;QACT;AAAA,MAAA;AAAA,IACF,CACD,GAEDG;AAAA,MACE,MACS/B,EAAM;AAAA,MAEf,CAACY,MAAe;AACd,QAAIP,KAAeA,EAAY,SAAS,MAAMO,KAC5CP,EAAY,SAASO,CAAK;AAAA,MAE9B;AAAA,IAAA,mBA/NAoB,EAAkD,OAAA;AAAA,eAAzC;AAAA,MAAJ,KAAI7B;AAAA,MAAY,OAAM;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"index-4cfdb04c.mjs","sources":["../src/editor/components/fs-editor-code/index.vue"],"sourcesContent":["<template>\n <div ref=\"monacoRef\" class=\"fs-editor-code\"></div>\n</template>\n\n<script lang=\"ts\" setup>\nimport * as monaco from \"monaco-editor\";\n// import * as monaco from \"monaco-editor/esm/vs/editor/editor.api\";\nimport { onMounted, onUnmounted, ref, watch } from \"vue\";\nimport { cloneDeep, debounce as lodashDebounce } from \"lodash-es\";\nimport {\n importJavascriptContribution,\n importJsonContribution,\n importMonacoYaml,\n importYamlContribution\n} from \"./async-import\";\nimport { initWorkers } from \"./workers\";\n/**\n * config:\n * value: '', // 编辑器初始文本\n * language: 'javascript', // 语言\n * theme: 'vs', // 主题\n * readOnly: false, // 是否只读\n * minimap: { enabled: false }, // 是否启用小地图\n * fontSize: 14, // 字体大小\n * tabSize: 2, // tab缩进长度\n * automaticLayout: true, // 自动布局\n * lineNumbers: 'off', // 是否启用行号\n * contextmenu: true, // 是否启用上下文菜单\n * folding: true, // 是否启用代码折叠\n * foldingStrategy: 'auto', // 代码折叠策略\n * wordWrap: 'on', // 自动换行设置\n * wrappingIndent: 'indent', // 换行缩进\n * formatOnPaste: true, // 粘贴时是否自动格式化\n * formatOnType: true, // 输入时是否自动格式化\n * dragAndDrop: true, // 是否允许拖放\n * cursorStyle: 'line', // 光标样式\n * cursorBlinking: 'blink', // 光标闪烁方式\n * scrollbar: {\n * vertical: 'auto', // 垂直滚动条的显示方式\n * horizontal: 'auto', // 水平滚动条的显示方式\n * verticalScrollbarSize: 2, // 垂直滚动条的宽\n * horizontalScrollbarSize: 2, // 水平滚动条的高度\n * }\n */\nconst props = defineProps<{\n language?: string;\n modelValue?: string;\n config?: any;\n schema?: any;\n debounce?: number;\n init?: any;\n readonly?: boolean;\n disabled?: boolean;\n id?: string;\n}>();\n\nexport type EditorCodeCtx = {\n // monaco对象\n monaco: any;\n //语言\n language: string;\n //配置\n config: any;\n //editor实例对象\n instance?: any;\n\n schema?: any;\n\n initialValue?: any;\n};\ninitWorkers();\nconst monacoRef = ref();\n\nlet instanceRef: any = null;\n\nfunction disposeEditor() {\n if (instanceRef) {\n instanceRef.dispose(); //使用完成销毁实例\n }\n}\n\nonUnmounted(() => {\n disposeEditor();\n});\n\nconst emits = defineEmits([\"update:modelValue\", \"change\", \"ready\"]);\n\nconst emitValue = lodashDebounce((value: any) => {\n emits(\"update:modelValue\", value);\n}, props.debounce || 500);\n\nasync function createEditor(ctx: EditorCodeCtx) {\n disposeEditor();\n const instance = monaco.editor.create(monacoRef.value, {\n automaticLayout: true,\n value: props.modelValue,\n language: ctx.language,\n theme: \"vs-dark\",\n minimap: { enabled: false },\n readOnly: props.readonly || props.disabled,\n hover: {\n enabled: true\n },\n ...ctx.config\n });\n\n // @event `change`\n instance.onDidChangeModelContent((event) => {\n const value = instance.getValue();\n if (props.modelValue !== value) {\n emits(\"change\", value);\n emitValue(value);\n }\n });\n\n instanceRef = instance;\n ctx.instance = instance;\n emits(\"ready\", ctx);\n return instance;\n}\n\nasync function initJavascript(ctx: EditorCodeCtx) {\n await importJavascriptContribution();\n monaco.languages.register({ id: \"javascript\" });\n}\n\nasync function initJson(ctx: EditorCodeCtx) {\n await importJsonContribution();\n monaco.languages.register({ id: \"json\" });\n\n const schemas = [];\n if (ctx.schema) {\n schemas.push({\n uri: \"http://myserver/foo-schema.json\", // id of the first schema\n fileMatch: [\"*\"], // associate with our model\n schema: {\n ...ctx.schema\n }\n });\n }\n\n monaco.languages.json.jsonDefaults.setDiagnosticsOptions({\n validate: true,\n enableSchemaRequest: false,\n schemas\n });\n}\n\nasync function initYaml(ctx: EditorCodeCtx) {\n await importYamlContribution();\n const { configureMonacoYaml } = await importMonacoYaml();\n monaco.languages.register({ id: \"yaml\" });\n let id = `fs-editor-code-yaml-${props.id || \"\"}.yaml`;\n const schemas = [];\n if (ctx.schema) {\n schemas.push({\n fileMatch: [\"*\"], // associate with our model\n schema: {\n ...ctx.schema\n },\n uri: `http://myserver/${id}`\n });\n }\n configureMonacoYaml(monaco, {\n schemas,\n format: true,\n hover: true,\n completion: true,\n validate: true,\n isKubernetes: false,\n enableSchemaRequest: false\n });\n\n // const uri = monaco.Uri.parse(id);\n // const oldModel = monaco.editor.getModel(uri);\n // if (oldModel) {\n // oldModel.dispose();\n // }\n // ctx.config.model = monaco.editor.createModel(props.modelValue, null, uri);\n}\n\nasync function doInit() {\n disposeEditor();\n const ctx: EditorCodeCtx = {\n monaco,\n language: props.language || \"javascript\",\n config: cloneDeep(props.config || {}),\n initialValue: props.modelValue || \"\",\n schema: props.schema\n };\n if (ctx.language === \"javascript\") {\n await initJavascript(ctx);\n } else if (ctx.language === \"yaml\") {\n await initYaml(ctx);\n } else if (ctx.language === \"json\") {\n await initJson(ctx);\n }\n\n await createEditor(ctx);\n}\n\nonMounted(async () => {\n await doInit();\n watch(\n () => {\n return {\n language: props.language,\n config: props.config\n };\n },\n (value: any) => {\n doInit();\n }\n );\n});\n\nwatch(\n () => {\n return props.modelValue;\n },\n (value: any) => {\n if (instanceRef && instanceRef.getValue() !== value) {\n instanceRef.setValue(value);\n }\n }\n);\n</script>\n\n<style lang=\"less\">\n.fs-editor-code {\n min-height: 100px;\n width: 100%;\n border: 1px solid #eee;\n border-radius: 5px;\n}\n\n.monaco-editor .hover-content {\n z-index: 10000 !important;\n}\n</style>\n"],"names":["props","__props","initWorkers","monacoRef","ref","instanceRef","disposeEditor","onUnmounted","emits","__emit","emitValue","lodashDebounce","value","createEditor","ctx","instance","monaco","event","initJavascript","importJavascriptContribution","initJson","importJsonContribution","schemas","initYaml","importYamlContribution","configureMonacoYaml","importMonacoYaml","id","doInit","cloneDeep","onMounted","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4CA,UAAMA,IAAQC;AA0BF,IAAAC;AACZ,UAAMC,IAAYC;AAElB,QAAIC,IAAmB;AAEvB,aAASC,IAAgB;AACvB,MAAID,KACFA,EAAY,QAAQ;AAAA,IAExB;AAEA,IAAAE,EAAY,MAAM;AACF,MAAAD;IAAA,CACf;AAED,UAAME,IAAQC,GAERC,IAAYC,EAAe,CAACC,MAAe;AAC/C,MAAAJ,EAAM,qBAAqBI,CAAK;AAAA,IAAA,GAC/BZ,EAAM,YAAY,GAAG;AAExB,mBAAea,EAAaC,GAAoB;AAChC,MAAAR;AACd,YAAMS,IAAWC,EAAO,OAAO,OAAOb,EAAU,OAAO;AAAA,QACrD,iBAAiB;AAAA,QACjB,OAAOH,EAAM;AAAA,QACb,UAAUc,EAAI;AAAA,QACd,OAAO;AAAA,QACP,SAAS,EAAE,SAAS,GAAM;AAAA,QAC1B,UAAUd,EAAM,YAAYA,EAAM;AAAA,QAClC,OAAO;AAAA,UACL,SAAS;AAAA,QACX;AAAA,QACA,GAAGc,EAAI;AAAA,MAAA,CACR;AAGQ,aAAAC,EAAA,wBAAwB,CAACE,MAAU;AACpC,cAAAL,IAAQG,EAAS;AACnB,QAAAf,EAAM,eAAeY,MACvBJ,EAAM,UAAUI,CAAK,GACrBF,EAAUE,CAAK;AAAA,MACjB,CACD,GAEaP,IAAAU,GACdD,EAAI,WAAWC,GACfP,EAAM,SAASM,CAAG,GACXC;AAAA,IACT;AAEA,mBAAeG,EAAeJ,GAAoB;AAChD,YAAMK,EAA6B,GACnCH,EAAO,UAAU,SAAS,EAAE,IAAI,aAAc,CAAA;AAAA,IAChD;AAEA,mBAAeI,EAASN,GAAoB;AAC1C,YAAMO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,EAAkB,IACfJ,EAAI,aAAa,SAC1B,MAAMS,EAAST,CAAG,IACTA,EAAI,aAAa,UAC1B,MAAMM,EAASN,CAAG,GAGpB,MAAMD,EAAaC,CAAG;AAAA,IACxB;AAEA,WAAAgB,EAAU,YAAY;AACpB,YAAMF,EAAO,GACbG;AAAA,QACE,OACS;AAAA,UACL,UAAU/B,EAAM;AAAA,UAChB,QAAQA,EAAM;AAAA,QAAA;AAAA,QAGlB,CAACY,MAAe;AACP,UAAAgB;QACT;AAAA,MAAA;AAAA,IACF,CACD,GAEDG;AAAA,MACE,MACS/B,EAAM;AAAA,MAEf,CAACY,MAAe;AACd,QAAIP,KAAeA,EAAY,SAAS,MAAMO,KAC5CP,EAAY,SAASO,CAAK;AAAA,MAE9B;AAAA,IAAA;;;;;;;"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@fast-crud/editor-code",
3
- "version": "1.26.0",
3
+ "version": "1.26.1",
4
4
  "private": false,
5
- "main": "./dist/fast-editor-code.umd.js",
6
- "module": "./dist/fast-editor-code.mjs",
5
+ "main": "./dist/editor-code.umd.js",
6
+ "module": "./dist/editor-code.mjs",
7
7
  "types": "./dist/d/index.d.ts",
8
8
  "scripts": {
9
9
  "build:all": "npm run build:type && npm run build && npm run copy:index",
@@ -26,7 +26,7 @@
26
26
  "monaco-yaml": "^5.3.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@fast-crud/fast-crud": "^1.26.0",
29
+ "@fast-crud/fast-crud": "^1.26.1",
30
30
  "@ls-lint/ls-lint": "^2.0.1",
31
31
  "@rollup/plugin-commonjs": "^25.0.3",
32
32
  "@rollup/plugin-strip": "^3.0.2",
@@ -75,5 +75,5 @@
75
75
  "vue-eslint-parser": "^9.3.1",
76
76
  "vue-tsc": "^1.8.8"
77
77
  },
78
- "gitHead": "acca2d87670d07de84a67bc65889844fdb2e7849"
78
+ "gitHead": "043a5c68b5641866d68685ec93457f5e9c10a682"
79
79
  }
package/stats.html CHANGED
@@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {
4929
4929
  </script>
4930
4930
  <script>
4931
4931
  /*<!--*/
4932
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"editor-code.mjs","uid":"8a838400-1"},{"name":"index-c2ddaf47.mjs","children":[{"name":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src","children":[{"name":"editor","children":[{"name":"type","children":[{"uid":"8a838400-3","name":"types.ts"},{"uid":"8a838400-5","name":"index.ts"}]},{"name":"components/fs-editor-code","children":[{"uid":"8a838400-7","name":"async-import.ts"},{"uid":"8a838400-9","name":"validators.ts"},{"uid":"8a838400-11","name":"workers.ts"}]},{"uid":"8a838400-13","name":"index.ts"}]},{"uid":"8a838400-14","name":"index.ts"}]}]},{"name":"index-4cfdb04c.mjs","children":[{"name":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code","children":[{"uid":"8a838400-16","name":"index.vue?vue&type=script&setup=true&lang.ts"},{"uid":"8a838400-18","name":"index.vue?vue&type=style&index=0&lang.less"},{"uid":"8a838400-20","name":"index.vue"}]}]}],"isRoot":true},"nodeParts":{"8a838400-1":{"id":"editor-code.mjs","gzipLength":0,"brotliLength":0,"renderedLength":249,"metaUid":"8a838400-0"},"8a838400-3":{"renderedLength":136,"gzipLength":0,"brotliLength":0,"metaUid":"8a838400-2"},"8a838400-5":{"renderedLength":145,"gzipLength":0,"brotliLength":0,"metaUid":"8a838400-4"},"8a838400-7":{"renderedLength":525,"gzipLength":0,"brotliLength":0,"metaUid":"8a838400-6"},"8a838400-9":{"renderedLength":668,"gzipLength":0,"brotliLength":0,"metaUid":"8a838400-8"},"8a838400-11":{"renderedLength":735,"gzipLength":0,"brotliLength":0,"metaUid":"8a838400-10"},"8a838400-13":{"renderedLength":407,"gzipLength":0,"brotliLength":0,"metaUid":"8a838400-12"},"8a838400-14":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"8a838400-0"},"8a838400-16":{"renderedLength":4185,"gzipLength":0,"brotliLength":0,"metaUid":"8a838400-15"},"8a838400-18":{"renderedLength":49,"gzipLength":0,"brotliLength":0,"metaUid":"8a838400-17"},"8a838400-20":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"8a838400-19"}},"nodeMetas":{"8a838400-0":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/index.ts","moduleParts":{"editor-code.mjs":"8a838400-1","index-c2ddaf47.mjs":"8a838400-14"},"imported":[{"uid":"8a838400-12"}],"importedBy":[],"isEntry":true},"8a838400-2":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/type/types.ts","moduleParts":{"index-c2ddaf47.mjs":"8a838400-3"},"imported":[],"importedBy":[{"uid":"8a838400-4"}]},"8a838400-4":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/type/index.ts","moduleParts":{"index-c2ddaf47.mjs":"8a838400-5"},"imported":[{"uid":"8a838400-22"},{"uid":"8a838400-2"}],"importedBy":[{"uid":"8a838400-12"},{"uid":"8a838400-21"}]},"8a838400-6":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/async-import.ts","moduleParts":{"index-c2ddaf47.mjs":"8a838400-7"},"imported":[{"uid":"8a838400-26","dynamic":true},{"uid":"8a838400-27","dynamic":true},{"uid":"8a838400-28","dynamic":true},{"uid":"8a838400-29","dynamic":true},{"uid":"8a838400-30","dynamic":true}],"importedBy":[{"uid":"8a838400-8"},{"uid":"8a838400-15"}]},"8a838400-8":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/validators.ts","moduleParts":{"index-c2ddaf47.mjs":"8a838400-9"},"imported":[{"uid":"8a838400-6"}],"importedBy":[{"uid":"8a838400-21"}]},"8a838400-10":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/workers.ts","moduleParts":{"index-c2ddaf47.mjs":"8a838400-11"},"imported":[],"importedBy":[{"uid":"8a838400-21"},{"uid":"8a838400-15"}]},"8a838400-12":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/index.ts","moduleParts":{"index-c2ddaf47.mjs":"8a838400-13"},"imported":[{"uid":"8a838400-4"},{"uid":"8a838400-21"},{"uid":"8a838400-22"},{"uid":"8a838400-19","dynamic":true}],"importedBy":[{"uid":"8a838400-0"}]},"8a838400-15":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/index.vue?vue&type=script&setup=true&lang.ts","moduleParts":{"index-4cfdb04c.mjs":"8a838400-16"},"imported":[{"uid":"8a838400-23"},{"uid":"8a838400-24"},{"uid":"8a838400-25"},{"uid":"8a838400-6"},{"uid":"8a838400-10"}],"importedBy":[{"uid":"8a838400-19"}]},"8a838400-17":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/index.vue?vue&type=style&index=0&lang.less","moduleParts":{"index-4cfdb04c.mjs":"8a838400-18"},"imported":[],"importedBy":[{"uid":"8a838400-19"}]},"8a838400-19":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/index.vue","moduleParts":{"index-4cfdb04c.mjs":"8a838400-20"},"imported":[{"uid":"8a838400-15"},{"uid":"8a838400-17"}],"importedBy":[{"uid":"8a838400-12"}]},"8a838400-21":{"id":"D:/Codes/fast-crud/packages/fast-ecology/editor-code/src/editor/exports.ts","moduleParts":{},"imported":[{"uid":"8a838400-4"},{"uid":"8a838400-8"},{"uid":"8a838400-10"}],"importedBy":[{"uid":"8a838400-12"}]},"8a838400-22":{"id":"@fast-crud/fast-crud","moduleParts":{},"imported":[],"importedBy":[{"uid":"8a838400-12"},{"uid":"8a838400-4"}],"isExternal":true},"8a838400-23":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"8a838400-15"}],"isExternal":true},"8a838400-24":{"id":"monaco-editor","moduleParts":{},"imported":[],"importedBy":[{"uid":"8a838400-15"}],"isExternal":true},"8a838400-25":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"8a838400-15"}],"isExternal":true},"8a838400-26":{"id":"js-yaml","moduleParts":{},"imported":[],"importedBy":[{"uid":"8a838400-6"}],"isExternal":true},"8a838400-27":{"id":"monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution","moduleParts":{},"imported":[],"importedBy":[{"uid":"8a838400-6"}],"isExternal":true},"8a838400-28":{"id":"monaco-editor/esm/vs/language/json/monaco.contribution","moduleParts":{},"imported":[],"importedBy":[{"uid":"8a838400-6"}],"isExternal":true},"8a838400-29":{"id":"monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution","moduleParts":{},"imported":[],"importedBy":[{"uid":"8a838400-6"}],"isExternal":true},"8a838400-30":{"id":"monaco-yaml","moduleParts":{},"imported":[],"importedBy":[{"uid":"8a838400-6"}],"isExternal":true}},"env":{"rollup":"3.29.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
4932
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"editor-code.mjs","uid":"74c95c71-1"},{"name":"index-c2ddaf47.mjs","children":[{"name":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src","children":[{"name":"editor","children":[{"name":"type","children":[{"uid":"74c95c71-3","name":"types.ts"},{"uid":"74c95c71-5","name":"index.ts"}]},{"name":"components/fs-editor-code","children":[{"uid":"74c95c71-7","name":"async-import.ts"},{"uid":"74c95c71-9","name":"validators.ts"},{"uid":"74c95c71-11","name":"workers.ts"}]},{"uid":"74c95c71-13","name":"index.ts"}]},{"uid":"74c95c71-14","name":"index.ts"}]}]},{"name":"index-4cfdb04c.mjs","children":[{"name":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code","children":[{"uid":"74c95c71-16","name":"index.vue?vue&type=script&setup=true&lang.ts"},{"uid":"74c95c71-18","name":"index.vue?vue&type=style&index=0&lang.less"},{"uid":"74c95c71-20","name":"index.vue"}]}]}],"isRoot":true},"nodeParts":{"74c95c71-1":{"id":"editor-code.mjs","gzipLength":0,"brotliLength":0,"renderedLength":249,"metaUid":"74c95c71-0"},"74c95c71-3":{"renderedLength":136,"gzipLength":0,"brotliLength":0,"metaUid":"74c95c71-2"},"74c95c71-5":{"renderedLength":145,"gzipLength":0,"brotliLength":0,"metaUid":"74c95c71-4"},"74c95c71-7":{"renderedLength":525,"gzipLength":0,"brotliLength":0,"metaUid":"74c95c71-6"},"74c95c71-9":{"renderedLength":668,"gzipLength":0,"brotliLength":0,"metaUid":"74c95c71-8"},"74c95c71-11":{"renderedLength":735,"gzipLength":0,"brotliLength":0,"metaUid":"74c95c71-10"},"74c95c71-13":{"renderedLength":407,"gzipLength":0,"brotliLength":0,"metaUid":"74c95c71-12"},"74c95c71-14":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"74c95c71-0"},"74c95c71-16":{"renderedLength":4185,"gzipLength":0,"brotliLength":0,"metaUid":"74c95c71-15"},"74c95c71-18":{"renderedLength":49,"gzipLength":0,"brotliLength":0,"metaUid":"74c95c71-17"},"74c95c71-20":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"74c95c71-19"}},"nodeMetas":{"74c95c71-0":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/index.ts","moduleParts":{"editor-code.mjs":"74c95c71-1","index-c2ddaf47.mjs":"74c95c71-14"},"imported":[{"uid":"74c95c71-12"}],"importedBy":[],"isEntry":true},"74c95c71-2":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/type/types.ts","moduleParts":{"index-c2ddaf47.mjs":"74c95c71-3"},"imported":[],"importedBy":[{"uid":"74c95c71-4"}]},"74c95c71-4":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/type/index.ts","moduleParts":{"index-c2ddaf47.mjs":"74c95c71-5"},"imported":[{"uid":"74c95c71-22"},{"uid":"74c95c71-2"}],"importedBy":[{"uid":"74c95c71-12"},{"uid":"74c95c71-21"}]},"74c95c71-6":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/async-import.ts","moduleParts":{"index-c2ddaf47.mjs":"74c95c71-7"},"imported":[{"uid":"74c95c71-26","dynamic":true},{"uid":"74c95c71-27","dynamic":true},{"uid":"74c95c71-28","dynamic":true},{"uid":"74c95c71-29","dynamic":true},{"uid":"74c95c71-30","dynamic":true}],"importedBy":[{"uid":"74c95c71-8"},{"uid":"74c95c71-15"}]},"74c95c71-8":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/validators.ts","moduleParts":{"index-c2ddaf47.mjs":"74c95c71-9"},"imported":[{"uid":"74c95c71-6"}],"importedBy":[{"uid":"74c95c71-21"}]},"74c95c71-10":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/workers.ts","moduleParts":{"index-c2ddaf47.mjs":"74c95c71-11"},"imported":[],"importedBy":[{"uid":"74c95c71-21"},{"uid":"74c95c71-15"}]},"74c95c71-12":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/index.ts","moduleParts":{"index-c2ddaf47.mjs":"74c95c71-13"},"imported":[{"uid":"74c95c71-4"},{"uid":"74c95c71-21"},{"uid":"74c95c71-22"},{"uid":"74c95c71-19","dynamic":true}],"importedBy":[{"uid":"74c95c71-0"}]},"74c95c71-15":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/index.vue?vue&type=script&setup=true&lang.ts","moduleParts":{"index-4cfdb04c.mjs":"74c95c71-16"},"imported":[{"uid":"74c95c71-23"},{"uid":"74c95c71-24"},{"uid":"74c95c71-25"},{"uid":"74c95c71-6"},{"uid":"74c95c71-10"}],"importedBy":[{"uid":"74c95c71-19"}]},"74c95c71-17":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/index.vue?vue&type=style&index=0&lang.less","moduleParts":{"index-4cfdb04c.mjs":"74c95c71-18"},"imported":[],"importedBy":[{"uid":"74c95c71-19"}]},"74c95c71-19":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/components/fs-editor-code/index.vue","moduleParts":{"index-4cfdb04c.mjs":"74c95c71-20"},"imported":[{"uid":"74c95c71-15"},{"uid":"74c95c71-17"}],"importedBy":[{"uid":"74c95c71-12"}]},"74c95c71-21":{"id":"C:/Data/Codes/open/fast-crud/packages/fast-ecology/editor-code/src/editor/exports.ts","moduleParts":{},"imported":[{"uid":"74c95c71-4"},{"uid":"74c95c71-8"},{"uid":"74c95c71-10"}],"importedBy":[{"uid":"74c95c71-12"}]},"74c95c71-22":{"id":"@fast-crud/fast-crud","moduleParts":{},"imported":[],"importedBy":[{"uid":"74c95c71-12"},{"uid":"74c95c71-4"}],"isExternal":true},"74c95c71-23":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"74c95c71-15"}],"isExternal":true},"74c95c71-24":{"id":"monaco-editor","moduleParts":{},"imported":[],"importedBy":[{"uid":"74c95c71-15"}],"isExternal":true},"74c95c71-25":{"id":"lodash-es","moduleParts":{},"imported":[],"importedBy":[{"uid":"74c95c71-15"}],"isExternal":true},"74c95c71-26":{"id":"js-yaml","moduleParts":{},"imported":[],"importedBy":[{"uid":"74c95c71-6"}],"isExternal":true},"74c95c71-27":{"id":"monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution","moduleParts":{},"imported":[],"importedBy":[{"uid":"74c95c71-6"}],"isExternal":true},"74c95c71-28":{"id":"monaco-editor/esm/vs/language/json/monaco.contribution","moduleParts":{},"imported":[],"importedBy":[{"uid":"74c95c71-6"}],"isExternal":true},"74c95c71-29":{"id":"monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution","moduleParts":{},"imported":[],"importedBy":[{"uid":"74c95c71-6"}],"isExternal":true},"74c95c71-30":{"id":"monaco-yaml","moduleParts":{},"imported":[],"importedBy":[{"uid":"74c95c71-6"}],"isExternal":true}},"env":{"rollup":"3.29.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
4933
4933
 
4934
4934
  const run = () => {
4935
4935
  const width = window.innerWidth;