@king-one/form-design 0.0.6 → 0.0.7
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 +6 -0
- package/dist/es/assets/editor.worker-DAdS0XRj.js +31 -0
- package/dist/es/assets/json.worker-BPBY9qSj.js +63 -0
- package/dist/es/src/hooks/use-monaco.mjs +32 -17
- package/dist/lib/src/hooks/use-monaco.js +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/package.json +1 -1
|
@@ -1,33 +1,48 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
function c(r) {
|
|
1
|
+
import * as u from "monaco-editor";
|
|
2
|
+
import { onMounted as a } from "vue";
|
|
3
|
+
function s(r) {
|
|
5
4
|
window.MonacoEnvironment = {
|
|
6
|
-
// getWorker() {
|
|
7
|
-
// return new Promise(() => {})
|
|
8
|
-
// }
|
|
9
5
|
getWorker(o, n) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
return n === "json" ? new Worker(
|
|
7
|
+
new URL(
|
|
8
|
+
/* @vite-ignore */
|
|
9
|
+
"/assets/json.worker-BPBY9qSj.js",
|
|
10
|
+
import.meta.url
|
|
11
|
+
),
|
|
12
|
+
{ type: "module" }
|
|
13
|
+
) : new Worker(
|
|
14
|
+
new URL(
|
|
15
|
+
/* @vite-ignore */
|
|
16
|
+
"/assets/editor.worker-DAdS0XRj.js",
|
|
17
|
+
import.meta.url
|
|
18
|
+
),
|
|
19
|
+
{ type: "module" }
|
|
20
|
+
);
|
|
17
21
|
}
|
|
22
|
+
// getWorker(_workerId: string, label: string) {
|
|
23
|
+
// switch (label) {
|
|
24
|
+
// case 'json':
|
|
25
|
+
// // @ts-ignore
|
|
26
|
+
// return getWorker
|
|
27
|
+
// default:
|
|
28
|
+
// return new Promise(() => {})
|
|
29
|
+
// }
|
|
30
|
+
// }
|
|
18
31
|
};
|
|
19
32
|
let e = null;
|
|
20
33
|
const t = async (o) => {
|
|
21
34
|
e && e.setValue(JSON.stringify(o, null, 2));
|
|
22
35
|
};
|
|
23
|
-
return
|
|
24
|
-
r.value && (e =
|
|
36
|
+
return a(() => {
|
|
37
|
+
r.value && (e = u.editor.create(r.value, {
|
|
25
38
|
value: "",
|
|
26
39
|
readOnly: !0,
|
|
27
40
|
automaticLayout: !0,
|
|
28
41
|
scrollbar: {
|
|
29
42
|
verticalScrollbarSize: 5
|
|
30
43
|
},
|
|
44
|
+
fontLigatures: !0,
|
|
45
|
+
folding: !0,
|
|
31
46
|
theme: "vs",
|
|
32
47
|
language: "json",
|
|
33
48
|
selectOnLineNumbers: !0,
|
|
@@ -41,5 +56,5 @@ function c(r) {
|
|
|
41
56
|
};
|
|
42
57
|
}
|
|
43
58
|
export {
|
|
44
|
-
|
|
59
|
+
s as useMonaco
|
|
45
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("monaco-editor"),c=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 l=s(a);function i(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 c.onMounted(()=>{e.value&&(r=l.editor.create(e.value,{value:"",readOnly:!0,automaticLayout:!0,scrollbar:{verticalScrollbarSize:5},fontLigatures:!0,folding:!0,theme:"vs",language:"json",selectOnLineNumbers:!0,scrollBeyondLastLine:!0,overviewRulerBorder:!1}))}),{setEditorValue:t}}exports.useMonaco=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:iconfont-design;src:url(fonts/iconfont.woff2?t=
|
|
1
|
+
@font-face{font-family:iconfont-design;src:url(fonts/iconfont.woff2?t=59739) format("woff2"),url(fonts/iconfont.woff?t=83252) format("woff"),url(fonts/iconfont.ttf?t=74276) format("truetype")}.k-design-icon{font-family:iconfont-design!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-from-design-exclamation-circle-filled:before{content:"\e670"}.icon-from-design-exclamation-circle:before{content:"\e660"}.icon-from-design-form-object:before{content:"\e666"}.icon-from-design-form-list:before{content:"\e667"}.icon-from-design-form-table:before{content:"\e66f"}.icon-from-design-copy:before{content:"\e65d"}.icon-from-design-form-radio:before{content:"\e698"}.icon-from-design-form-daterange:before{content:"\e699"}.icon-from-design-form-money:before{content:"\e69a"}.icon-from-design-form-kit-leave:before{content:"\e69b"}.icon-from-design-form-kit-reimbursement:before{content:"\e69c"}.icon-from-design-form-kit-out:before{content:"\e69d"}.icon-from-design-form-kit-replenish:before{content:"\e69e"}.icon-from-design-form-kit-overtime:before{content:"\e69f"}.icon-from-design-form-number:before{content:"\e6a0"}.icon-from-design-form-textarea:before{content:"\e6a1"}.icon-from-design-form-select:before{content:"\e6a2"}.icon-from-design-form-kit-transfer:before{content:"\e6a3"}.icon-from-design-form-right:before{content:"\e6a4"}.icon-from-design-form-checkbox:before{content:"\e687"}.icon-from-design-form-area:before{content:"\e688"}.icon-from-design-form-del:before{content:"\e689"}.icon-from-design-form-contact-person:before{content:"\e68a"}.icon-from-design-form-default:before{content:"\e68b"}.icon-from-design-form-date:before{content:"\e68c"}.icon-from-design-form-drag:before{content:"\e68d"}.icon-from-design-form-desctext:before{content:"\e68e"}.icon-from-design-form-fileupload:before{content:"\e68f"}.icon-from-design-form-input:before{content:"\e690"}.icon-from-design-form-grid:before{content:"\e691"}.icon-from-design-form-imgupload:before{content:"\e692"}.icon-from-design-form-hot-city:before{content:"\e693"}.icon-from-design-form-kit-leave-2:before{content:"\e694"}.icon-from-design-form-inputNumber:before{content:"\e695"}.icon-from-design-form-kit-business-trip:before{content:"\e696"}.icon-from-design-shouzhixiangyou:before{content:"\e615"}.icon-from-design-xiangzuohuangse:before{content:"\e60a"}.icon-from-design-code:before{content:"\e65a"}.icon-from-design-desktop:before{content:"\e65b"}.icon-from-design-delete1:before{content:"\e65c"}.icon-from-design-double-left:before{content:"\e65e"}.icon-from-design-double-right:before{content:"\e65f"}.icon-from-design-mobile:before{content:"\e668"}.icon-from-design-question-circle:before{content:"\e66c"}.icon-from-design-sound:before{content:"\e672"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-primary-light-3:#79bbff;--king-color-primary-light-5:#a0cfff;--king-color-primary-light-7:#c6e2ff;--king-color-primary-light-8:#d9ecff;--king-color-primary-light-9:#ecf5ff;--king-color-success:#67c23a;--king-color-success-light-3:#95d475;--king-color-success-light-5:#b3e19d;--king-color-success-light-7:#d1edc4;--king-color-success-light-8:#e1f3d8;--king-color-success-light-9:#f0f9eb;--king-color-warning:#e6a23c;--king-color-warning-light-3:#eebe77;--king-color-warning-light-5:#f3d19e;--king-color-warning-light-7:#f8e3c5;--king-color-warning-light-8:#faecd8;--king-color-warning-light-9:#fdf6ec;--king-color-danger:#f56c6c;--king-color-danger-light-3:#f89898;--king-color-danger-light-5:#fab6b6;--king-color-danger-light-7:#fcd3d3;--king-color-danger-light-8:#fde2e2;--king-color-danger-light-9:#fef0f0;--king-color-error:#f56c6c;--king-color-error-light-3:#f89898;--king-color-error-light-5:#fab6b6;--king-color-error-light-7:#fcd3d3;--king-color-error-light-8:#fde2e2;--king-color-error-light-9:#fef0f0;--king-color-info:#909399;--king-color-info-light-3:#b1b3b8;--king-color-info-light-5:#c8c9cc;--king-color-info-light-7:#dedfe0;--king-color-info-light-8:#e9e9eb;--king-color-info-light-9:#f4f4f5;--king-transition-duration:0.3s}.k-design-main{width:100%;height:100%;display:flex;background:#f8f8f8;overflow:hidden;overflow-x:auto;font-size:13px;text-align:initial}.k-design-main,.k-design-main *{box-sizing:border-box}.k-design-material{flex:0 0 320px;height:100%;border:1px solid var(--king-color-info-light-7)}.k-design-material .k-design-toolbar{height:50px;display:flex;justify-content:center;align-items:center}.k-design-material .k-design-toolbar .toolbar-button{width:120px;text-align:center}.k-design-material .k-design-widget{padding:0 10px}.k-design-material .k-design-widget .widget-group-name{color:var(--king-color-info);font-size:14px;margin:10px 0}.k-design-material .k-design-widget .widget-list-drag{display:flex;flex-flow:row wrap;margin-left:-5px;margin-right:-5px;row-gap:10px}.k-design-material .k-design-widget .widget-col{padding-left:5px;padding-right:5px;width:50%}.k-design-material .k-design-widget .widget-col .widget-item{display:flex;align-items:center;padding:8px 10px;background:#fff;border:1px solid var(--king-color-info-light-9);border-radius:5px;cursor:pointer;font-size:13px}.k-design-material .k-design-widget .widget-item:hover{color:var(--king-color-primary);border-color:var(--king-color-primary-light-3)}.k-design-material .k-design-widget .widget-item-icon{margin-right:5px}.k-design-setting{flex:0;height:100%;border:1px solid var(--king-color-info-light-7);position:relative;background:#fff}.k-design-setting .setting-aside{height:100%;width:320px}.k-design-setting .setting-aside .setting-empty{margin-top:50px}.k-design-setting .setting-collapse{position:absolute;left:-25px;top:8px;cursor:pointer;border-left:none}.form-design-collapse-enter-active,.form-design-collapse-leave-active{transition:var(--form-design-collapse-duration) max-width linear,var(--form-design-collapse-duration) padding-left linear,var(--form-design-collapse-duration) padding-right linear}:root{--form-design-collapse-duration:0.3s}.k-design-panel{flex:1;min-width:800px;border-top:1px solid var(--king-color-info-light-7);border-bottom:1px solid var(--king-color-info-light-7);display:flex;flex-direction:column}.k-design-panel .k-design-panel__toolbar{min-height:38px;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:5px 10px;border-bottom:1px solid var(--king-color-info-light-9)}.k-design-panel .k-design-panel__toolbar .k-design-panel__toolbar--icon{cursor:pointer;margin-right:5px}.k-design-panel .k-design-panel__toolbar .right{padding-right:25px;display:flex;align-items:center}.k-design-panel .k-design-panel__content{flex:1;overflow:hidden;position:relative}.k-design-panel .k-design-panel__content .design-from{height:100%}.k-design-panel .k-design-panel__content .content-panel{height:100%;overflow:auto}.k-design-panel .k-design-panel__content .content-panel .prompt{margin:0 auto;width:65%;max-width:400px;padding:35px 20px;border-radius:10px;border:1px dashed rgba(25,31,37,.12);margin-top:50px;text-align:center;font-size:14px;color:#7a7a7a}.k-design-panel .k-design-panel__content .content-editor{height:100%;overflow:hidden}.k-design-panel .k-design-panel__content .drag-from{min-height:100%;padding-bottom:20px}.k-design-panel .k-design-panel__content .drag-from .widget-col{background-color:#fff}.k-design-panel .k-design-panel__content .drag-from .widget-col .widget-item{display:flex;padding:10px}.k-design-panel .k-design-panel__content .drag-from .widget-col .widget-item .widget-item-icon{margin-right:5px}@font-face{font-family:iconfont-design;src:url(fonts/iconfont.woff2?t=
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-primary-light-3:#79bbff;--king-color-primary-light-5:#a0cfff;--king-color-primary-light-7:#c6e2ff;--king-color-primary-light-8:#d9ecff;--king-color-primary-light-9:#ecf5ff;--king-color-success:#67c23a;--king-color-success-light-3:#95d475;--king-color-success-light-5:#b3e19d;--king-color-success-light-7:#d1edc4;--king-color-success-light-8:#e1f3d8;--king-color-success-light-9:#f0f9eb;--king-color-warning:#e6a23c;--king-color-warning-light-3:#eebe77;--king-color-warning-light-5:#f3d19e;--king-color-warning-light-7:#f8e3c5;--king-color-warning-light-8:#faecd8;--king-color-warning-light-9:#fdf6ec;--king-color-danger:#f56c6c;--king-color-danger-light-3:#f89898;--king-color-danger-light-5:#fab6b6;--king-color-danger-light-7:#fcd3d3;--king-color-danger-light-8:#fde2e2;--king-color-danger-light-9:#fef0f0;--king-color-error:#f56c6c;--king-color-error-light-3:#f89898;--king-color-error-light-5:#fab6b6;--king-color-error-light-7:#fcd3d3;--king-color-error-light-8:#fde2e2;--king-color-error-light-9:#fef0f0;--king-color-info:#909399;--king-color-info-light-3:#b1b3b8;--king-color-info-light-5:#c8c9cc;--king-color-info-light-7:#dedfe0;--king-color-info-light-8:#e9e9eb;--king-color-info-light-9:#f4f4f5;--king-transition-duration:0.3s}.k-design-main{width:100%;height:100%;display:flex;background:#f8f8f8;overflow:hidden;overflow-x:auto;font-size:13px;text-align:initial}.k-design-main,.k-design-main *{box-sizing:border-box}.k-design-material{flex:0 0 320px;height:100%;border:1px solid var(--king-color-info-light-7)}.k-design-material .k-design-toolbar{height:50px;display:flex;justify-content:center;align-items:center}.k-design-material .k-design-toolbar .toolbar-button{width:120px;text-align:center}.k-design-material .k-design-widget{padding:0 10px}.k-design-material .k-design-widget .widget-group-name{color:var(--king-color-info);font-size:14px;margin:10px 0}.k-design-material .k-design-widget .widget-list-drag{display:flex;flex-flow:row wrap;margin-left:-5px;margin-right:-5px;row-gap:10px}.k-design-material .k-design-widget .widget-col{padding-left:5px;padding-right:5px;width:50%}.k-design-material .k-design-widget .widget-col .widget-item{display:flex;align-items:center;padding:8px 10px;background:#fff;border:1px solid var(--king-color-info-light-9);border-radius:5px;cursor:pointer;font-size:13px}.k-design-material .k-design-widget .widget-item:hover{color:var(--king-color-primary);border-color:var(--king-color-primary-light-3)}.k-design-material .k-design-widget .widget-item-icon{margin-right:5px}.k-design-setting{flex:0;height:100%;border:1px solid var(--king-color-info-light-7);position:relative;background:#fff}.k-design-setting .setting-aside{height:100%;width:320px}.k-design-setting .setting-aside .setting-empty{margin-top:50px}.k-design-setting .setting-collapse{position:absolute;left:-25px;top:8px;cursor:pointer;border-left:none}.form-design-collapse-enter-active,.form-design-collapse-leave-active{transition:var(--form-design-collapse-duration) max-width linear,var(--form-design-collapse-duration) padding-left linear,var(--form-design-collapse-duration) padding-right linear}:root{--form-design-collapse-duration:0.3s}.k-design-panel{flex:1;min-width:800px;border-top:1px solid var(--king-color-info-light-7);border-bottom:1px solid var(--king-color-info-light-7);display:flex;flex-direction:column}.k-design-panel .k-design-panel__toolbar{min-height:38px;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:5px 10px;border-bottom:1px solid var(--king-color-info-light-9)}.k-design-panel .k-design-panel__toolbar .k-design-panel__toolbar--icon{cursor:pointer;margin-right:5px}.k-design-panel .k-design-panel__toolbar .right{padding-right:25px;display:flex;align-items:center}.k-design-panel .k-design-panel__content{flex:1;overflow:hidden;position:relative}.k-design-panel .k-design-panel__content .design-from{height:100%}.k-design-panel .k-design-panel__content .content-panel{height:100%;overflow:auto}.k-design-panel .k-design-panel__content .content-panel .prompt{margin:0 auto;width:65%;max-width:400px;padding:35px 20px;border-radius:10px;border:1px dashed rgba(25,31,37,.12);margin-top:50px;text-align:center;font-size:14px;color:#7a7a7a}.k-design-panel .k-design-panel__content .content-editor{height:100%;overflow:hidden}.k-design-panel .k-design-panel__content .drag-from{min-height:100%;padding-bottom:20px}.k-design-panel .k-design-panel__content .drag-from .widget-col{background-color:#fff}.k-design-panel .k-design-panel__content .drag-from .widget-col .widget-item{display:flex;padding:10px}.k-design-panel .k-design-panel__content .drag-from .widget-col .widget-item .widget-item-icon{margin-right:5px}@font-face{font-family:iconfont-design;src:url(fonts/iconfont.woff2?t=96300) format("woff2"),url(fonts/iconfont.woff?t=78384) format("woff"),url(fonts/iconfont.ttf?t=23576) format("truetype")}.k-design-icon{font-family:iconfont-design!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-from-design-exclamation-circle-filled:before{content:"\e670"}.icon-from-design-exclamation-circle:before{content:"\e660"}.icon-from-design-form-object:before{content:"\e666"}.icon-from-design-form-list:before{content:"\e667"}.icon-from-design-form-table:before{content:"\e66f"}.icon-from-design-copy:before{content:"\e65d"}.icon-from-design-form-radio:before{content:"\e698"}.icon-from-design-form-daterange:before{content:"\e699"}.icon-from-design-form-money:before{content:"\e69a"}.icon-from-design-form-kit-leave:before{content:"\e69b"}.icon-from-design-form-kit-reimbursement:before{content:"\e69c"}.icon-from-design-form-kit-out:before{content:"\e69d"}.icon-from-design-form-kit-replenish:before{content:"\e69e"}.icon-from-design-form-kit-overtime:before{content:"\e69f"}.icon-from-design-form-number:before{content:"\e6a0"}.icon-from-design-form-textarea:before{content:"\e6a1"}.icon-from-design-form-select:before{content:"\e6a2"}.icon-from-design-form-kit-transfer:before{content:"\e6a3"}.icon-from-design-form-right:before{content:"\e6a4"}.icon-from-design-form-checkbox:before{content:"\e687"}.icon-from-design-form-area:before{content:"\e688"}.icon-from-design-form-del:before{content:"\e689"}.icon-from-design-form-contact-person:before{content:"\e68a"}.icon-from-design-form-default:before{content:"\e68b"}.icon-from-design-form-date:before{content:"\e68c"}.icon-from-design-form-drag:before{content:"\e68d"}.icon-from-design-form-desctext:before{content:"\e68e"}.icon-from-design-form-fileupload:before{content:"\e68f"}.icon-from-design-form-input:before{content:"\e690"}.icon-from-design-form-grid:before{content:"\e691"}.icon-from-design-form-imgupload:before{content:"\e692"}.icon-from-design-form-hot-city:before{content:"\e693"}.icon-from-design-form-kit-leave-2:before{content:"\e694"}.icon-from-design-form-inputNumber:before{content:"\e695"}.icon-from-design-form-kit-business-trip:before{content:"\e696"}.icon-from-design-shouzhixiangyou:before{content:"\e615"}.icon-from-design-xiangzuohuangse:before{content:"\e60a"}.icon-from-design-code:before{content:"\e65a"}.icon-from-design-desktop:before{content:"\e65b"}.icon-from-design-delete1:before{content:"\e65c"}.icon-from-design-double-left:before{content:"\e65e"}.icon-from-design-double-right:before{content:"\e65f"}.icon-from-design-mobile:before{content:"\e668"}.icon-from-design-question-circle:before{content:"\e66c"}.icon-from-design-sound:before{content:"\e672"}.k-design-panel-item{cursor:move;border:1px dashed transparent;padding:10px;background-color:#fff;margin-bottom:10px;position:relative}.k-design-panel-item .k-design-panel-item__form{margin-bottom:0;cursor:move}.k-design-panel-item .k-design-panel-item__form *{cursor:move}.k-design-panel-item .k-design-panel-item__error{color:var(--king-color-error)}.k-design-panel-item .icons{position:absolute;right:0;bottom:0;background-color:#fff;border:1px solid var(--king-color-primary);border-bottom:0;border-right:0;padding:0 7px;cursor:pointer;border-top-left-radius:10px}.k-design-panel-item .icons .panel-icon{color:var(--king-color-primary);cursor:pointer}.k-design-panel-item .icons .panel-icon{margin-right:5px}.k-design-panel-item .icons .panel-exclamation-icon{color:var(--king-color-error)}.k-design-panel-item--active{border-color:var(--king-color-primary);border-left:4px solid var(--king-color-primary)}.k-design-panel-item--error{border-color:var(--king-color-error)}.k-design-panel-item--error .icons{border-color:var(--king-color-error)}.k-design-panel-drag{min-height:60px;background-color:#f5f6f6;padding:10px 5px}
|