@mlightcad/ui-components 0.0.13 → 0.0.14
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/ui-components.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".ml-dropdown-icon[data-v-3fc33b5d],.ml-dropdown-icon[data-v-3fc33b5d]:hover{outline:none;border:none}.ml-status-bar[data-v-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".ml-dropdown-icon[data-v-3fc33b5d],.ml-dropdown-icon[data-v-3fc33b5d]:hover{outline:none;border:none}.ml-status-bar[data-v-d6a59cf0]{position:fixed;bottom:0;left:0;right:0;height:30px;display:flex;justify-content:space-between;align-items:center;background-color:var(--el-fill-color);box-sizing:border-box;border:1px solid var(--el-border-color)}.ml-status-bar-left[data-v-d6a59cf0],.ml-status-bar-right[data-v-d6a59cf0]{display:flex;align-items:center}.ml-status-bar-left[data-v-d6a59cf0]>*{margin-right:10px}.ml-status-bar-right[data-v-d6a59cf0]>*{margin-left:10px}.ml-vertical-toolbar-button-group[data-v-d5511111]{display:flex;flex-direction:column}.ml-horizontal-toolbar-button-group[data-v-d5511111]{display:flex;flex-direction:row}.ml-toolbar-button[data-v-d5511111]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px}.ml-toolbar-button-text[data-v-d5511111]{margin-left:0;margin-top:5px}.ml-tool-palette-dialog[data-v-d384c67e]{cursor:default;width:300px;min-width:var(--collapsed-width);position:fixed;box-sizing:border-box;border:1px solid var(--el-border-color)}.ml-tool-palette-dialog-icon[data-v-d384c67e]{border-bottom:1px solid var(--el-border-color)}.ml-tool-palette-dialog-layout[data-v-d384c67e]{display:flex;height:100%}.ml-tool-palette-title-bar[data-v-d384c67e]{width:var(--collapsed-width);display:flex;justify-content:left;align-items:center;cursor:move;writing-mode:vertical-rl;text-align:center;background-color:var(--el-fill-color)}.ml-tool-palette-title[data-v-d384c67e]{pointer-events:none;margin-top:10px;margin-bottom:10px;font-size:small;-webkit-user-select:none;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ml-tool-palette-content[data-v-d384c67e]{pointer-events:none;-webkit-user-select:none;user-select:none;flex-grow:1;display:flex;justify-content:space-around;background-color:var(--el-fill-color);overflow:hidden}.ml-tool-palette-dialog-layout.left .ml-tool-palette-title-bar[data-v-d384c67e]{order:1}.ml-tool-palette-dialog-layout.left .ml-tool-palette-content[data-v-d384c67e],.ml-tool-palette-dialog-layout.right .ml-tool-palette-title-bar[data-v-d384c67e]{order:2}.ml-tool-palette-dialog-layout.right .ml-tool-palette-content[data-v-d384c67e]{order:1}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
import { ElIcon as A, ElDropdownItem as se, ElDropdownMenu as ie, ElDropdown as ue, ElButton as ae, ElTooltip as ce, ElButtonGroup as re } from "element-plus/es";
|
|
3
3
|
import "element-plus/es/components/base/style/css";
|
|
4
4
|
import "element-plus/es/components/icon/style/css";
|
|
5
|
-
import { openBlock as y, createElementBlock as I, createElementVNode as
|
|
5
|
+
import { openBlock as y, createElementBlock as I, createElementVNode as z, defineComponent as V, mergeModels as Y, useModel as K, computed as g, createBlock as W, withCtx as k, resolveDynamicComponent as Q, createVNode as S, Fragment as Z, renderList as P, createTextVNode as ve, toDisplayString as U, pushScopeId as R, popScopeId as ee, renderSlot as O, normalizeClass as te, normalizeStyle as X, createCommentVNode as ne, ref as m, onMounted as D, onUnmounted as F, watch as L, onBeforeUnmount as le, unref as G } from "vue";
|
|
6
6
|
import "element-plus/es/components/dropdown/style/css";
|
|
7
7
|
import "element-plus/es/components/dropdown-menu/style/css";
|
|
8
8
|
import "element-plus/es/components/dropdown-item/style/css";
|
|
@@ -14,7 +14,7 @@ const de = {
|
|
|
14
14
|
width: "1em",
|
|
15
15
|
height: "1em",
|
|
16
16
|
viewBox: "0 0 1024 1024"
|
|
17
|
-
}, me = /* @__PURE__ */
|
|
17
|
+
}, me = /* @__PURE__ */ z("path", {
|
|
18
18
|
fill: "currentColor",
|
|
19
19
|
d: "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"
|
|
20
20
|
}, null, -1), he = [
|
|
@@ -28,7 +28,7 @@ const j = { render: fe }, pe = {
|
|
|
28
28
|
width: "1em",
|
|
29
29
|
height: "1em",
|
|
30
30
|
viewBox: "0 0 1024 1024"
|
|
31
|
-
}, we = /* @__PURE__ */
|
|
31
|
+
}, we = /* @__PURE__ */ z("path", {
|
|
32
32
|
fill: "currentColor",
|
|
33
33
|
d: "M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"
|
|
34
34
|
}, null, -1), _e = [
|
|
@@ -64,14 +64,14 @@ const q = { render: ge }, Le = /* @__PURE__ */ V({
|
|
|
64
64
|
}, 8, ["size"]);
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
}), xe = (e) => (R("data-v-3fc33b5d"), e = e(), ee(), e), ye = /* @__PURE__ */ xe(() => /* @__PURE__ */
|
|
67
|
+
}), xe = (e) => (R("data-v-3fc33b5d"), e = e(), ee(), e), ye = /* @__PURE__ */ xe(() => /* @__PURE__ */ z("svg", {
|
|
68
68
|
preserveAspectRatio: "xMidYMid meet",
|
|
69
69
|
viewBox: "0 0 24 24",
|
|
70
70
|
width: "1.2em",
|
|
71
71
|
height: "1.2em",
|
|
72
72
|
"data-v-63d067da": ""
|
|
73
73
|
}, [
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ z("path", {
|
|
75
75
|
fill: "currentColor",
|
|
76
76
|
d: "m18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301a14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"
|
|
77
77
|
})
|
|
@@ -128,7 +128,7 @@ const q = { render: ge }, Le = /* @__PURE__ */ V({
|
|
|
128
128
|
for (const [o, l] of s)
|
|
129
129
|
t[o] = l;
|
|
130
130
|
return t;
|
|
131
|
-
}, N = /* @__PURE__ */ H(Me, [["__scopeId", "data-v-3fc33b5d"]]), Ee = '<svg preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" width="1.2em" height="1.2em" data-v-63d067da=""><path fill="currentColor" d="m18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301a14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"></path></svg>',
|
|
131
|
+
}, N = /* @__PURE__ */ H(Me, [["__scopeId", "data-v-3fc33b5d"]]), Ee = '<svg preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" width="1.2em" height="1.2em" data-v-63d067da=""><path fill="currentColor" d="m18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301a14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"></path></svg>', be = /* @__PURE__ */ V({
|
|
132
132
|
__name: "MlLanguage",
|
|
133
133
|
props: {
|
|
134
134
|
languages: {},
|
|
@@ -148,18 +148,18 @@ const q = { render: ge }, Le = /* @__PURE__ */ V({
|
|
|
148
148
|
onClick: l
|
|
149
149
|
}, null, 8, ["items", "current"]));
|
|
150
150
|
}
|
|
151
|
-
}),
|
|
151
|
+
}), ze = {}, Ce = { class: "ml-status-bar" }, Be = { class: "ml-status-bar-left" }, ke = { class: "ml-status-bar-right" };
|
|
152
152
|
function $e(e, s) {
|
|
153
153
|
return y(), I("div", Ce, [
|
|
154
|
-
|
|
154
|
+
z("div", Be, [
|
|
155
155
|
O(e.$slots, "left", {}, void 0, !0)
|
|
156
156
|
]),
|
|
157
|
-
|
|
157
|
+
z("div", ke, [
|
|
158
158
|
O(e.$slots, "right", {}, void 0, !0)
|
|
159
159
|
])
|
|
160
160
|
]);
|
|
161
161
|
}
|
|
162
|
-
const Te = /* @__PURE__ */ H(
|
|
162
|
+
const Te = /* @__PURE__ */ H(ze, [["render", $e], ["__scopeId", "data-v-d6a59cf0"]]), We = {
|
|
163
163
|
key: 0,
|
|
164
164
|
class: "ml-toolbar-button-text"
|
|
165
165
|
}, Ie = /* @__PURE__ */ V({
|
|
@@ -203,7 +203,7 @@ const Te = /* @__PURE__ */ H(be, [["render", $e], ["__scopeId", "data-v-ac7280f8
|
|
|
203
203
|
onClick: (B) => a(x.command)
|
|
204
204
|
}, {
|
|
205
205
|
default: k(() => [
|
|
206
|
-
|
|
206
|
+
z("div", null, [
|
|
207
207
|
S(c, { size: n.value }, {
|
|
208
208
|
default: k(() => [
|
|
209
209
|
(y(), W(Q(x.icon)))
|
|
@@ -276,12 +276,12 @@ function Ve(e, s, t) {
|
|
|
276
276
|
}
|
|
277
277
|
}, c = (v) => {
|
|
278
278
|
if (o.value && n.value && l.value) {
|
|
279
|
-
const f = window.innerWidth, x = window.innerHeight, C = e.value, B = C.getBoundingClientRect(),
|
|
279
|
+
const f = window.innerWidth, x = window.innerHeight, C = e.value, B = C.getBoundingClientRect(), b = B.width, p = B.height, T = n.value.x + (v.clientX - u.x), E = n.value.y + (v.clientY - u.y);
|
|
280
280
|
l.value.x = Math.max(
|
|
281
281
|
t ? t.value.offset.value.left : 0,
|
|
282
282
|
T
|
|
283
283
|
);
|
|
284
|
-
const _ = f -
|
|
284
|
+
const _ = f - b;
|
|
285
285
|
l.value.x = Math.min(
|
|
286
286
|
t ? _ - t.value.offset.value.right : _,
|
|
287
287
|
l.value.x
|
|
@@ -289,7 +289,7 @@ function Ve(e, s, t) {
|
|
|
289
289
|
t ? t.value.offset.value.top : 0,
|
|
290
290
|
Math.min(E, x - p)
|
|
291
291
|
);
|
|
292
|
-
const M = x - p
|
|
292
|
+
const M = x - p;
|
|
293
293
|
l.value.y = Math.min(
|
|
294
294
|
t ? M - t.value.offset.value.bottom : M,
|
|
295
295
|
l.value.y
|
|
@@ -375,10 +375,10 @@ function Oe(e, s = m({ left: 0, right: 0, top: 0, bottom: 0 })) {
|
|
|
375
375
|
function Xe(e, s = m(!1), t = m(!1), o = m({ left: 0, right: 0, top: 0, bottom: 0 }), l = { width: 20, height: 40 }) {
|
|
376
376
|
const { initialRect: n } = Oe(e, o), u = m(!1);
|
|
377
377
|
let d = 0, i = 0, a = 0, r = 0, w = 0;
|
|
378
|
-
const c = 5, h = m(null), v = (
|
|
378
|
+
const c = 5, h = m(null), v = (b) => {
|
|
379
379
|
if (!(!e.value || s.value))
|
|
380
380
|
if (u.value) {
|
|
381
|
-
const p =
|
|
381
|
+
const p = b.clientX - r, T = b.clientY - w;
|
|
382
382
|
if (h.value === "left" || h.value === "left-bottom-corner") {
|
|
383
383
|
const E = i - p;
|
|
384
384
|
E > l.width && (n.value.width = E, n.value.left = d + p, e.value.style.left = n.value.left + "px", e.value.style.width = n.value.width + "px");
|
|
@@ -392,13 +392,13 @@ function Xe(e, s = m(!1), t = m(!1), o = m({ left: 0, right: 0, top: 0, bottom:
|
|
|
392
392
|
E > l.height && (n.value.height = E, e.value.style.height = n.value.height + "px");
|
|
393
393
|
}
|
|
394
394
|
} else {
|
|
395
|
-
const p = e.value.getBoundingClientRect(), T =
|
|
395
|
+
const p = e.value.getBoundingClientRect(), T = b.clientX - p.left, E = b.clientY - p.top, _ = T <= c, M = T >= p.width - c, $ = E >= p.height - c;
|
|
396
396
|
_ && $ && t.value ? (e.value.style.cursor = "nesw-resize", h.value = "left-bottom-corner") : M && $ && !t.value ? (e.value.style.cursor = "nwse-resize", h.value = "right-bottom-corner") : _ && t.value ? (e.value.style.cursor = "ew-resize", h.value = "left") : M && !t.value ? (e.value.style.cursor = "ew-resize", h.value = "right") : $ ? (e.value.style.cursor = "ns-resize", h.value = "bottom") : (e.value.style.cursor = "", h.value = null);
|
|
397
397
|
}
|
|
398
|
-
}, f = (
|
|
398
|
+
}, f = (b) => {
|
|
399
399
|
if (!e.value || !h.value) return;
|
|
400
400
|
const p = e.value.getBoundingClientRect();
|
|
401
|
-
r =
|
|
401
|
+
r = b.clientX, w = b.clientY, i = p.width, a = p.height, d = p.left, n.value.width = i, n.value.height = a, n.value.left = p.left, n.value.top = p.top, u.value = !0, document.addEventListener("mousemove", v), document.addEventListener("mouseup", x);
|
|
402
402
|
}, x = () => {
|
|
403
403
|
u.value = !1, h.value = null, e.value && (e.value.style.cursor = ""), document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", x);
|
|
404
404
|
}, C = () => {
|
|
@@ -410,8 +410,8 @@ function Xe(e, s = m(!1), t = m(!1), o = m({ left: 0, right: 0, top: 0, bottom:
|
|
|
410
410
|
e.value && B();
|
|
411
411
|
}), le(() => {
|
|
412
412
|
C();
|
|
413
|
-
}), L(e, (
|
|
414
|
-
|
|
413
|
+
}), L(e, (b) => {
|
|
414
|
+
b ? B() : C();
|
|
415
415
|
}), { rect: n, isResizing: u };
|
|
416
416
|
}
|
|
417
417
|
function Ne(e, s, t, o) {
|
|
@@ -461,7 +461,7 @@ function Ue(e, s, t, o) {
|
|
|
461
461
|
g(() => c.value.height)
|
|
462
462
|
), { autoOpened: B } = Se(e, s, t);
|
|
463
463
|
Ne(e, w, t, B);
|
|
464
|
-
const
|
|
464
|
+
const b = (_) => {
|
|
465
465
|
if (e.value) {
|
|
466
466
|
const M = e.value.getBoundingClientRect(), $ = M.left + _;
|
|
467
467
|
if (w.value) {
|
|
@@ -473,7 +473,7 @@ function Ue(e, s, t, o) {
|
|
|
473
473
|
}
|
|
474
474
|
}, p = () => {
|
|
475
475
|
const _ = window.innerWidth - l.value;
|
|
476
|
-
l.value = window.innerWidth, n.value = window.innerHeight,
|
|
476
|
+
l.value = window.innerWidth, n.value = window.innerHeight, b(_);
|
|
477
477
|
};
|
|
478
478
|
D(() => {
|
|
479
479
|
window.addEventListener("resize", p);
|
|
@@ -483,7 +483,7 @@ function Ue(e, s, t, o) {
|
|
|
483
483
|
const T = (_) => {
|
|
484
484
|
_ ? (c.value.width = J, w.value && f.value && v.value && (c.value.left = f.value + v.value - J)) : (c.value.width = v.value, w.value && f.value && v.value && (c.value.left = f.value));
|
|
485
485
|
}, E = () => {
|
|
486
|
-
u.value ? (c.value.top = o.value.offset.value.top, c.value.height = window.innerHeight - o.value.offset.value.top - o.value.offset.value.bottom
|
|
486
|
+
u.value ? (c.value.top = o.value.offset.value.top, c.value.height = window.innerHeight - o.value.offset.value.top - o.value.offset.value.bottom) : (c.value.top = x.value, c.value.height = C.value);
|
|
487
487
|
};
|
|
488
488
|
return L(u, () => {
|
|
489
489
|
E();
|
|
@@ -498,13 +498,13 @@ function Ue(e, s, t, o) {
|
|
|
498
498
|
}
|
|
499
499
|
}), { rect: c, orientation: d, reversed: w };
|
|
500
500
|
}
|
|
501
|
-
const Fe = (e) => (R("data-v-
|
|
501
|
+
const Fe = (e) => (R("data-v-d384c67e"), e = e(), ee(), e), Ge = /* @__PURE__ */ Fe(() => /* @__PURE__ */ z("svg", {
|
|
502
502
|
xmlns: "http://www.w3.org/2000/svg",
|
|
503
503
|
width: "1em",
|
|
504
504
|
height: "1em",
|
|
505
505
|
viewBox: "0 0 1024 1024"
|
|
506
506
|
}, [
|
|
507
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ z("path", {
|
|
508
508
|
fill: "currentColor",
|
|
509
509
|
d: "M764.288 214.592L512 466.88L259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512L214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
510
510
|
})
|
|
@@ -539,11 +539,11 @@ const Fe = (e) => (R("data-v-c27d14f6"), e = e(), ee(), e), Ge = /* @__PURE__ */
|
|
|
539
539
|
width: `${a.value.width}px`,
|
|
540
540
|
height: `${a.value.height}px`
|
|
541
541
|
})), h = g(() => w.value ? {
|
|
542
|
-
borderLeft: "1px solid",
|
|
542
|
+
borderLeft: "1px solid var(--el-border-color)",
|
|
543
543
|
borderRight: null
|
|
544
544
|
} : {
|
|
545
545
|
borderLeft: null,
|
|
546
|
-
borderRight: "1px solid"
|
|
546
|
+
borderRight: "1px solid var(--el-border-color)"
|
|
547
547
|
}), v = () => {
|
|
548
548
|
o.value = !1;
|
|
549
549
|
const f = d.value;
|
|
@@ -561,10 +561,10 @@ const Fe = (e) => (R("data-v-c27d14f6"), e = e(), ee(), e), Ge = /* @__PURE__ */
|
|
|
561
561
|
style: X([c.value]),
|
|
562
562
|
class: "ml-tool-palette-dialog"
|
|
563
563
|
}, [
|
|
564
|
-
|
|
564
|
+
z("div", {
|
|
565
565
|
class: te(["ml-tool-palette-dialog-layout", G(r)])
|
|
566
566
|
}, [
|
|
567
|
-
|
|
567
|
+
z("div", {
|
|
568
568
|
ref_key: "titleBarElement",
|
|
569
569
|
ref: u,
|
|
570
570
|
class: "ml-tool-palette-title-bar",
|
|
@@ -586,25 +586,25 @@ const Fe = (e) => (R("data-v-c27d14f6"), e = e(), ee(), e), Ge = /* @__PURE__ */
|
|
|
586
586
|
"onUpdate:modelValue": x[0] || (x[0] = (B) => n.value = B),
|
|
587
587
|
reverse: G(w)
|
|
588
588
|
}, null, 8, ["modelValue", "reverse"]),
|
|
589
|
-
|
|
589
|
+
z("span", je, U(t.title), 1)
|
|
590
590
|
], 4),
|
|
591
|
-
|
|
591
|
+
z("div", qe, [
|
|
592
592
|
O(f.$slots, "default", {}, void 0, !0)
|
|
593
593
|
])
|
|
594
594
|
], 2)
|
|
595
595
|
], 4)) : ne("", !0);
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
}), Ke = /* @__PURE__ */ H(Je, [["__scopeId", "data-v-
|
|
598
|
+
}), Ke = /* @__PURE__ */ H(Je, [["__scopeId", "data-v-d384c67e"]]), it = {
|
|
599
599
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
600
600
|
install(e) {
|
|
601
|
-
e.component("MlCollapse", N), e.component("MlDropdown", N), e.component("MlLanguage",
|
|
601
|
+
e.component("MlCollapse", N), e.component("MlDropdown", N), e.component("MlLanguage", be), e.component("MlStatusBar", Te), e.component("MlToolBar", De), e.component("MlToolPalette", Ke);
|
|
602
602
|
}
|
|
603
603
|
};
|
|
604
604
|
export {
|
|
605
605
|
Le as MlCollapse,
|
|
606
606
|
N as MlDropdown,
|
|
607
|
-
|
|
607
|
+
be as MlLanguage,
|
|
608
608
|
Te as MlStatusBar,
|
|
609
609
|
De as MlToolBar,
|
|
610
610
|
Ke as MlToolPalette,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".ml-dropdown-icon[data-v-3fc33b5d],.ml-dropdown-icon[data-v-3fc33b5d]:hover{outline:none;border:none}.ml-status-bar[data-v-
|
|
2
|
-
(function(L,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("element-plus/es"),require("element-plus/es/components/base/style/css"),require("element-plus/es/components/icon/style/css"),require("vue"),require("element-plus/es/components/dropdown/style/css"),require("element-plus/es/components/dropdown-menu/style/css"),require("element-plus/es/components/dropdown-item/style/css"),require("element-plus/es/components/button-group/style/css"),require("element-plus/es/components/tooltip/style/css"),require("element-plus/es/components/button/style/css")):typeof define=="function"&&define.amd?define(["exports","element-plus/es","element-plus/es/components/base/style/css","element-plus/es/components/icon/style/css","vue","element-plus/es/components/dropdown/style/css","element-plus/es/components/dropdown-menu/style/css","element-plus/es/components/dropdown-item/style/css","element-plus/es/components/button-group/style/css","element-plus/es/components/tooltip/style/css","element-plus/es/components/button/style/css"],x):(L=typeof globalThis<"u"?globalThis:L||self,x(L.UIComponents={},L.es,null,null,L.Vue))})(this,function(L,x,pe,fe,e){"use strict";const Y={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},A=[e.createElementVNode("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"},null,-1)];function H(t,i){return e.openBlock(),e.createElementBlock("svg",Y,[...A])}const $={render:H},X={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},q=[e.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"},null,-1)];function U(t,i){return e.openBlock(),e.createElementBlock("svg",X,[...q])}const T={render:U},S=e.defineComponent({__name:"MlCollapse",props:e.mergeModels({size:{default:18},reverse:{type:Boolean,default:!1}},{modelValue:{default:!0},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:i}){const n=t,s=e.useModel(t,"modelValue"),l=i,o=e.computed(()=>n.reverse?s.value?$:T:s.value?T:$),a=e.computed(()=>`${n.size}px`),h=()=>{l("change",s.value),s.value=!s.value};return(c,r)=>{const d=x.ElIcon;return e.openBlock(),e.createBlock(d,{size:a.value,onClick:h},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value)))]),_:1},8,["size"])}}}),F=(t=>(e.pushScopeId("data-v-3fc33b5d"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("svg",{preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em","data-v-63d067da":""},[e.createElementVNode("path",{fill:"currentColor",d:"m18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301a14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"})],-1)),j=e.defineComponent({__name:"MlDropdown",props:{icon:{},items:{},current:{default:void 0}},emits:{click:null},setup(t,{emit:i}){const n=t,s=i,l=e.computed(()=>n.items.filter(a=>a.name!==n.current)),o=a=>{s("click",a)};return(a,h)=>{const c=x.ElIcon,r=x.ElDropdownItem,d=x.ElDropdownMenu,w=x.ElDropdown;return e.openBlock(),e.createBlock(w,{onCommand:o},{dropdown:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,u=>(e.openBlock(),e.createBlock(r,{key:u.text,command:u.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.text),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createVNode(c,{size:"30",class:"ml-dropdown-icon"},{default:e.withCtx(()=>[F]),_:1})]),_:1})}}}),z=(t,i)=>{const n=t.__vccOpts||t;for(const[s,l]of i)n[s]=l;return n},V=z(j,[["__scopeId","data-v-3fc33b5d"]]),G='<svg preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" width="1.2em" height="1.2em" data-v-63d067da=""><path fill="currentColor" d="m18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301a14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"></path></svg>',I=e.defineComponent({__name:"MlLanguage",props:{languages:{},current:{}},emits:{click:null},setup(t,{emit:i}){const n=t,s=i,l=o=>{s("click",o)};return(o,a)=>(e.openBlock(),e.createBlock(V,{icon:G,items:n.languages,current:n.current,onClick:l},null,8,["items","current"]))}}),J={},K={class:"ml-status-bar"},Q={class:"ml-status-bar-left"},Z={class:"ml-status-bar-right"};function P(t,i){return e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",Q,[e.renderSlot(t.$slots,"left",{},void 0,!0)]),e.createElementVNode("div",Z,[e.renderSlot(t.$slots,"right",{},void 0,!0)])])}const N=z(J,[["render",P],["__scopeId","data-v-ac7280f8"]]),R={key:0,class:"ml-toolbar-button-text"},W=z(e.defineComponent({__name:"MlToolBar",props:{items:{},size:{default:"large"},direction:{}},emits:{click:null},setup(t,{emit:i}){const n=t,s=i,l=e.computed(()=>n.direction==="vertical"?"ml-vertical-toolbar-button-group":"ml-horizontal-toolbar-button-group"),o=e.computed(()=>n.size==="small"?20:30),a=e.computed(()=>{switch(n.size){case"small":return 30;case"medium":return 50}return 70}),h=d=>d.description?d.description:d.text,c=e.computed(()=>n.size==="large"),r=d=>{s("click",d)};return(d,w)=>{const u=x.ElIcon,p=x.ElButton,m=x.ElTooltip,f=x.ElButtonGroup;return e.openBlock(),e.createBlock(f,{class:e.normalizeClass(l.value)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,(g,M)=>(e.openBlock(),e.createBlock(m,{key:g.text,content:h(g),"hide-after":0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(p,{class:"ml-toolbar-button",style:e.normalizeStyle({width:a.value+"px",height:a.value+"px"}),key:M,onClick:k=>r(g.command)},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(u,{size:o.value},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.icon)))]),_:2},1032,["size"]),c.value?(e.openBlock(),e.createElementBlock("div",R,e.toDisplayString(g.text),1)):e.createCommentVNode("",!0)])]),_:2},1032,["style","onClick"]))]),_:2},1032,["content"]))),128))]),_:1},8,["class"])}}}),[["__scopeId","data-v-d5511111"]]),D=20;function ee(t,i,n){const s=e.ref(!1),l=c=>{if(n.value&&t.value){const r=t.value.getBoundingClientRect(),d=c.clientX<r.left||c.clientX>r.right||c.clientY<r.top||c.clientY>r.bottom;s.value=!d}},o=()=>{n.value&&(s.value=!0)},a=()=>{i.value&&i.value.addEventListener("mousemove",o),t.value&&t.value.addEventListener("mousemove",o)},h=()=>{i.value&&i.value.removeEventListener("mousemove",o),t.value&&t.value.removeEventListener("mousemove",o)};return e.onMounted(()=>{window.addEventListener("mousemove",l)}),e.onUnmounted(()=>{window.removeEventListener("mousemove",l)}),e.watch(n,c=>{c&&(s.value=!1)}),e.watch(t,c=>{c?a():h()}),{autoOpened:s}}function te(t,i,n){const s=e.ref(!1),l=e.ref(null),o=e.ref(null),a={x:0,y:0},h=e.computed(()=>l.value==null||o.value==null?{x:0,y:0}:{x:l.value.x-o.value.x,y:l.value.y-o.value.y}),c=()=>{if(t.value){const m=t.value.getBoundingClientRect();o.value={x:m.left,y:m.top},l.value={x:m.left,y:m.top}}},r=()=>{t.value&&t.value.addEventListener("mousedown",w)},d=()=>{t.value&&t.value.removeEventListener("mousedown",w)},w=m=>{if(t.value!=null){if(i&&i.value){const f=i.value.getBoundingClientRect();if(m.clientX<f.left||m.clientX>f.right||m.clientY<f.top||m.clientY>f.bottom)return}s.value=!0,a.x=m.clientX,a.y=m.clientY,c(),document.addEventListener("mousemove",u),document.addEventListener("mouseup",p)}},u=m=>{if(s.value&&o.value&&l.value){const f=window.innerWidth,g=window.innerHeight,M=t.value,k=M.getBoundingClientRect(),E=k.width,v=k.height,b=o.value.x+(m.clientX-a.x),B=o.value.y+(m.clientY-a.y);l.value.x=Math.max(n?n.value.offset.value.left:0,b);const _=f-E;l.value.x=Math.min(n?_-n.value.offset.value.right:_,l.value.x),l.value.y=Math.max(n?n.value.offset.value.top:0,Math.min(B,g-v));const y=g-v-1;l.value.y=Math.min(n?y-n.value.offset.value.bottom:y,l.value.y),M.style.left=l.value.x+"px",M.style.top=l.value.y+"px"}},p=()=>{s.value=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",p)};return e.onMounted(()=>{t.value&&(c(),r())}),e.onUnmounted(()=>{t.value&&t.value.removeEventListener("mousedown",w)}),e.watch(t,m=>{m?(c(),r()):d()}),{isDragging:s,movement:h,position:l}}function ne(t,i,n){const s=e.ref(!1),l=e.ref("left"),{isDragging:o,movement:a,position:h}=te(t,i,n);return e.watch(a,c=>{if(c&&t.value){const d=t.value.getBoundingClientRect();d.left<=n.value.offset.value.left?(l.value="left",s.value=!0):window.innerWidth-d.left-d.width<=n.value.offset.value.right?(l.value="right",s.value=!0):s.value=!1}}),{docked:s,orientation:l,isDragging:o,movement:a,position:h}}function oe(t,i,n,s){const l=e.ref(null),o=e.ref(null),a=e.ref(null),h=e.ref(null);return e.watch(t,(c,r)=>{l.value=r}),e.watch(i,(c,r)=>{o.value=r}),e.watch(n,(c,r)=>{a.value=r}),e.watch(s,(c,r)=>{h.value=r}),{lastLeft:l,lastTop:o,lastWidth:a,lastHeight:h}}function le(t,i,n,s){const l=e.ref(t.value.width),o=e.ref(t.value.left),a=e.computed(()=>t.value.width),h=e.computed(()=>t.value.left),c=e.computed(()=>n.value?n.value.x:null);return e.watch([a,h],([r,d])=>{(l.value==null||o.value==null||i.value)&&(l.value=r,o.value=d)}),e.watch(c,r=>{s.value&&n.value&&(o.value=r)}),{left:o,width:l}}function se(t,i=e.ref({left:0,right:0,top:0,bottom:0})){const n=e.ref({});let s=!1;const l=()=>{if(!s&&t.value){const o=t.value.getBoundingClientRect();n.value.left=Math.max(o.left,i.value.left),n.value.top=Math.max(o.top,i.value.top),n.value.width=o.width,n.value.height=o.height,s=!0}};return e.onMounted(()=>{t.value&&l()}),e.watch(t,o=>{o&&l()}),{isIntialized:s,initialRect:n}}function ie(t,i=e.ref(!1),n=e.ref(!1),s=e.ref({left:0,right:0,top:0,bottom:0}),l={width:20,height:40}){const{initialRect:o}=se(t,s),a=e.ref(!1);let h=0,c=0,r=0,d=0,w=0;const u=5,p=e.ref(null),m=E=>{if(!(!t.value||i.value))if(a.value){const v=E.clientX-d,b=E.clientY-w;if(p.value==="left"||p.value==="left-bottom-corner"){const B=c-v;B>l.width&&(o.value.width=B,o.value.left=h+v,t.value.style.left=o.value.left+"px",t.value.style.width=o.value.width+"px")}if(p.value==="right"||p.value==="right-bottom-corner"){const B=c+v;B>l.width&&(o.value.width=B,t.value.style.width=o.value.width+"px")}if(p.value==="bottom"||p.value==="left-bottom-corner"||p.value==="right-bottom-corner"){const B=r+b;B>l.height&&(o.value.height=B,t.value.style.height=o.value.height+"px")}}else{const v=t.value.getBoundingClientRect(),b=E.clientX-v.left,B=E.clientY-v.top,_=b<=u,y=b>=v.width-u,C=B>=v.height-u;_&&C&&n.value?(t.value.style.cursor="nesw-resize",p.value="left-bottom-corner"):y&&C&&!n.value?(t.value.style.cursor="nwse-resize",p.value="right-bottom-corner"):_&&n.value?(t.value.style.cursor="ew-resize",p.value="left"):y&&!n.value?(t.value.style.cursor="ew-resize",p.value="right"):C?(t.value.style.cursor="ns-resize",p.value="bottom"):(t.value.style.cursor="",p.value=null)}},f=E=>{if(!t.value||!p.value)return;const v=t.value.getBoundingClientRect();d=E.clientX,w=E.clientY,c=v.width,r=v.height,h=v.left,o.value.width=c,o.value.height=r,o.value.left=v.left,o.value.top=v.top,a.value=!0,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)},g=()=>{a.value=!1,p.value=null,t.value&&(t.value.style.cursor=""),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)},M=()=>{t.value&&(t.value.removeEventListener("mousedown",f),t.value.removeEventListener("mousemove",m)),document.removeEventListener("mouseup",g)},k=()=>{t.value&&(t.value.addEventListener("mousedown",f),t.value.addEventListener("mousemove",m))};return e.onMounted(()=>{t.value&&k()}),e.onBeforeUnmount(()=>{M()}),e.watch(t,E=>{E?k():M()}),{rect:o,isResizing:a}}function ce(t,i,n,s){const l=()=>{if(t.value){const c=t.value;i.value?c.style.transition="width 0.3s ease-out, left 0.3s ease-out":c.style.transition="width 0.3s ease"}},o=()=>{t.value&&(t.value.style.transition="")},a=()=>{t.value&&t.value.removeEventListener("transitionend",o)},h=()=>{t.value&&t.value.addEventListener("transitionend",o)};e.onMounted(()=>{t.value&&t.value.addEventListener("transitionend",o)}),e.onBeforeUnmount(()=>{t.value&&t.value.removeEventListener("transitionend",o)}),e.watch(t,c=>{c?h():a()}),e.watch(n,()=>{l()}),e.watch(s,()=>{l()})}function ae(t,i,n,s){const l=e.ref(window.innerWidth),o=e.ref(window.innerHeight),{docked:a,orientation:h,movement:c,position:r,isDragging:d}=ne(t,i,s),w=e.computed(()=>h.value==="right"),{rect:u,isResizing:p}=ie(t,n,w,s.value.offset),{width:m,left:f}=le(u,p,r,d),{lastTop:g,lastHeight:M}=oe(e.computed(()=>u.value.left),e.computed(()=>u.value.top),e.computed(()=>u.value.width),e.computed(()=>u.value.height)),{autoOpened:k}=ee(t,i,n);ce(t,w,n,k);const E=_=>{if(t.value){const y=t.value.getBoundingClientRect(),C=y.left+_;if(w.value){u.value.left=C;const he=window.innerWidth-y.width-y.left;y.left<=0&&he>=0&&_<0&&(u.value.left=Math.max(0,C)),window.innerWidth-y.width<=0&&(u.value.left=window.innerWidth-y.width)}else y.left+y.width>=window.innerWidth&&_<0&&(u.value.left=Math.max(0,C))}},v=()=>{const _=window.innerWidth-l.value;l.value=window.innerWidth,o.value=window.innerHeight,E(_)};e.onMounted(()=>{window.addEventListener("resize",v)}),e.onUnmounted(()=>{window.removeEventListener("resize",v)});const b=_=>{_?(u.value.width=D,w.value&&f.value&&m.value&&(u.value.left=f.value+m.value-D)):(u.value.width=m.value,w.value&&f.value&&m.value&&(u.value.left=f.value))},B=()=>{a.value?(u.value.top=s.value.offset.value.top,u.value.height=window.innerHeight-s.value.offset.value.top-s.value.offset.value.bottom-1):(u.value.top=g.value,u.value.height=M.value)};return e.watch(a,()=>{B()}),e.watch(n,_=>{b(_)}),e.watch(k,_=>{n.value&&!d.value&&b(!_)}),e.watch(c,_=>{if(_&&t.value){const C=t.value.getBoundingClientRect();u.value.left=C.left,u.value.top=C.top}}),{rect:u,orientation:h,reversed:w}}const re=(t=>(e.pushScopeId("data-v-c27d14f6"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592L512 466.88L259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512L214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})],-1)),ue={class:"ml-tool-palette-title"},de={class:"ml-tool-palette-content"},O=z(e.defineComponent({__name:"MlToolPalette",props:e.mergeModels({title:{default:""},leftOffset:{default:0},rightOffset:{default:0},topOffset:{default:0},bottomOffset:{default:0}},{modelValue:{default:!0},modelModifiers:{}}),emits:e.mergeModels(["close"],["update:modelValue"]),setup(t,{emit:i}){const n=t,s=e.useModel(t,"modelValue"),l=i,o=e.ref(!1),a=e.ref(null),h=e.ref(null),c=e.computed(()=>({offset:e.ref({left:n.leftOffset,right:n.rightOffset,top:n.topOffset,bottom:n.bottomOffset})})),{rect:r,orientation:d,reversed:w}=ae(h,a,o,c),u=e.computed(()=>({left:`${r.value.left}px`,top:`${r.value.top}px`,width:`${r.value.width}px`,height:`${r.value.height}px`})),p=e.computed(()=>w.value?{borderLeft:"1px solid",borderRight:null}:{borderLeft:null,borderRight:"1px solid"}),m=()=>{s.value=!1;const f=h.value;l("close",{x:f?f.clientLeft:0,y:f?f.clientTop:0})};return(f,g)=>{const M=x.ElIcon;return s.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"toolPaletteElement",ref:h,style:e.normalizeStyle([u.value]),class:"ml-tool-palette-dialog"},[e.createElementVNode("div",{class:e.normalizeClass(["ml-tool-palette-dialog-layout",e.unref(d)])},[e.createElementVNode("div",{ref_key:"titleBarElement",ref:a,class:"ml-tool-palette-title-bar",style:e.normalizeStyle(p.value)},[e.createVNode(M,{size:18,class:"ml-tool-palette-dialog-icon",onClick:m},{default:e.withCtx(()=>[re]),_:1}),e.createVNode(S,{class:"ml-tool-palette-dialog-icon",modelValue:o.value,"onUpdate:modelValue":g[0]||(g[0]=k=>o.value=k),reverse:e.unref(w)},null,8,["modelValue","reverse"]),e.createElementVNode("span",ue,e.toDisplayString(n.title),1)],4),e.createElementVNode("div",de,[e.renderSlot(f.$slots,"default",{},void 0,!0)])],2)],4)):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-c27d14f6"]]),me={install(t){t.component("MlCollapse",V),t.component("MlDropdown",V),t.component("MlLanguage",I),t.component("MlStatusBar",N),t.component("MlToolBar",W),t.component("MlToolPalette",O)}};L.MlCollapse=S,L.MlDropdown=V,L.MlLanguage=I,L.MlStatusBar=N,L.MlToolBar=W,L.MlToolPalette=O,L.default=me,Object.defineProperties(L,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".ml-dropdown-icon[data-v-3fc33b5d],.ml-dropdown-icon[data-v-3fc33b5d]:hover{outline:none;border:none}.ml-status-bar[data-v-d6a59cf0]{position:fixed;bottom:0;left:0;right:0;height:30px;display:flex;justify-content:space-between;align-items:center;background-color:var(--el-fill-color);box-sizing:border-box;border:1px solid var(--el-border-color)}.ml-status-bar-left[data-v-d6a59cf0],.ml-status-bar-right[data-v-d6a59cf0]{display:flex;align-items:center}.ml-status-bar-left[data-v-d6a59cf0]>*{margin-right:10px}.ml-status-bar-right[data-v-d6a59cf0]>*{margin-left:10px}.ml-vertical-toolbar-button-group[data-v-d5511111]{display:flex;flex-direction:column}.ml-horizontal-toolbar-button-group[data-v-d5511111]{display:flex;flex-direction:row}.ml-toolbar-button[data-v-d5511111]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px}.ml-toolbar-button-text[data-v-d5511111]{margin-left:0;margin-top:5px}.ml-tool-palette-dialog[data-v-d384c67e]{cursor:default;width:300px;min-width:var(--collapsed-width);position:fixed;box-sizing:border-box;border:1px solid var(--el-border-color)}.ml-tool-palette-dialog-icon[data-v-d384c67e]{border-bottom:1px solid var(--el-border-color)}.ml-tool-palette-dialog-layout[data-v-d384c67e]{display:flex;height:100%}.ml-tool-palette-title-bar[data-v-d384c67e]{width:var(--collapsed-width);display:flex;justify-content:left;align-items:center;cursor:move;writing-mode:vertical-rl;text-align:center;background-color:var(--el-fill-color)}.ml-tool-palette-title[data-v-d384c67e]{pointer-events:none;margin-top:10px;margin-bottom:10px;font-size:small;-webkit-user-select:none;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ml-tool-palette-content[data-v-d384c67e]{pointer-events:none;-webkit-user-select:none;user-select:none;flex-grow:1;display:flex;justify-content:space-around;background-color:var(--el-fill-color);overflow:hidden}.ml-tool-palette-dialog-layout.left .ml-tool-palette-title-bar[data-v-d384c67e]{order:1}.ml-tool-palette-dialog-layout.left .ml-tool-palette-content[data-v-d384c67e],.ml-tool-palette-dialog-layout.right .ml-tool-palette-title-bar[data-v-d384c67e]{order:2}.ml-tool-palette-dialog-layout.right .ml-tool-palette-content[data-v-d384c67e]{order:1}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
(function(L,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("element-plus/es"),require("element-plus/es/components/base/style/css"),require("element-plus/es/components/icon/style/css"),require("vue"),require("element-plus/es/components/dropdown/style/css"),require("element-plus/es/components/dropdown-menu/style/css"),require("element-plus/es/components/dropdown-item/style/css"),require("element-plus/es/components/button-group/style/css"),require("element-plus/es/components/tooltip/style/css"),require("element-plus/es/components/button/style/css")):typeof define=="function"&&define.amd?define(["exports","element-plus/es","element-plus/es/components/base/style/css","element-plus/es/components/icon/style/css","vue","element-plus/es/components/dropdown/style/css","element-plus/es/components/dropdown-menu/style/css","element-plus/es/components/dropdown-item/style/css","element-plus/es/components/button-group/style/css","element-plus/es/components/tooltip/style/css","element-plus/es/components/button/style/css"],x):(L=typeof globalThis<"u"?globalThis:L||self,x(L.UIComponents={},L.es,null,null,L.Vue))})(this,function(L,x,pe,fe,e){"use strict";const Y={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},A=[e.createElementVNode("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"},null,-1)];function H(t,i){return e.openBlock(),e.createElementBlock("svg",Y,[...A])}const $={render:H},X={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},q=[e.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"},null,-1)];function U(t,i){return e.openBlock(),e.createElementBlock("svg",X,[...q])}const T={render:U},S=e.defineComponent({__name:"MlCollapse",props:e.mergeModels({size:{default:18},reverse:{type:Boolean,default:!1}},{modelValue:{default:!0},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:i}){const n=t,s=e.useModel(t,"modelValue"),l=i,o=e.computed(()=>n.reverse?s.value?$:T:s.value?T:$),a=e.computed(()=>`${n.size}px`),h=()=>{l("change",s.value),s.value=!s.value};return(c,r)=>{const d=x.ElIcon;return e.openBlock(),e.createBlock(d,{size:a.value,onClick:h},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value)))]),_:1},8,["size"])}}}),F=(t=>(e.pushScopeId("data-v-3fc33b5d"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("svg",{preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em","data-v-63d067da":""},[e.createElementVNode("path",{fill:"currentColor",d:"m18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301a14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"})],-1)),j=e.defineComponent({__name:"MlDropdown",props:{icon:{},items:{},current:{default:void 0}},emits:{click:null},setup(t,{emit:i}){const n=t,s=i,l=e.computed(()=>n.items.filter(a=>a.name!==n.current)),o=a=>{s("click",a)};return(a,h)=>{const c=x.ElIcon,r=x.ElDropdownItem,d=x.ElDropdownMenu,w=x.ElDropdown;return e.openBlock(),e.createBlock(w,{onCommand:o},{dropdown:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,u=>(e.openBlock(),e.createBlock(r,{key:u.text,command:u.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.text),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createVNode(c,{size:"30",class:"ml-dropdown-icon"},{default:e.withCtx(()=>[F]),_:1})]),_:1})}}}),z=(t,i)=>{const n=t.__vccOpts||t;for(const[s,l]of i)n[s]=l;return n},V=z(j,[["__scopeId","data-v-3fc33b5d"]]),G='<svg preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" width="1.2em" height="1.2em" data-v-63d067da=""><path fill="currentColor" d="m18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301a14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"></path></svg>',I=e.defineComponent({__name:"MlLanguage",props:{languages:{},current:{}},emits:{click:null},setup(t,{emit:i}){const n=t,s=i,l=o=>{s("click",o)};return(o,a)=>(e.openBlock(),e.createBlock(V,{icon:G,items:n.languages,current:n.current,onClick:l},null,8,["items","current"]))}}),J={},K={class:"ml-status-bar"},Q={class:"ml-status-bar-left"},Z={class:"ml-status-bar-right"};function P(t,i){return e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",Q,[e.renderSlot(t.$slots,"left",{},void 0,!0)]),e.createElementVNode("div",Z,[e.renderSlot(t.$slots,"right",{},void 0,!0)])])}const N=z(J,[["render",P],["__scopeId","data-v-d6a59cf0"]]),R={key:0,class:"ml-toolbar-button-text"},W=z(e.defineComponent({__name:"MlToolBar",props:{items:{},size:{default:"large"},direction:{}},emits:{click:null},setup(t,{emit:i}){const n=t,s=i,l=e.computed(()=>n.direction==="vertical"?"ml-vertical-toolbar-button-group":"ml-horizontal-toolbar-button-group"),o=e.computed(()=>n.size==="small"?20:30),a=e.computed(()=>{switch(n.size){case"small":return 30;case"medium":return 50}return 70}),h=d=>d.description?d.description:d.text,c=e.computed(()=>n.size==="large"),r=d=>{s("click",d)};return(d,w)=>{const u=x.ElIcon,p=x.ElButton,m=x.ElTooltip,f=x.ElButtonGroup;return e.openBlock(),e.createBlock(f,{class:e.normalizeClass(l.value)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,(g,M)=>(e.openBlock(),e.createBlock(m,{key:g.text,content:h(g),"hide-after":0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(p,{class:"ml-toolbar-button",style:e.normalizeStyle({width:a.value+"px",height:a.value+"px"}),key:M,onClick:k=>r(g.command)},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(u,{size:o.value},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.icon)))]),_:2},1032,["size"]),c.value?(e.openBlock(),e.createElementBlock("div",R,e.toDisplayString(g.text),1)):e.createCommentVNode("",!0)])]),_:2},1032,["style","onClick"]))]),_:2},1032,["content"]))),128))]),_:1},8,["class"])}}}),[["__scopeId","data-v-d5511111"]]),D=20;function ee(t,i,n){const s=e.ref(!1),l=c=>{if(n.value&&t.value){const r=t.value.getBoundingClientRect(),d=c.clientX<r.left||c.clientX>r.right||c.clientY<r.top||c.clientY>r.bottom;s.value=!d}},o=()=>{n.value&&(s.value=!0)},a=()=>{i.value&&i.value.addEventListener("mousemove",o),t.value&&t.value.addEventListener("mousemove",o)},h=()=>{i.value&&i.value.removeEventListener("mousemove",o),t.value&&t.value.removeEventListener("mousemove",o)};return e.onMounted(()=>{window.addEventListener("mousemove",l)}),e.onUnmounted(()=>{window.removeEventListener("mousemove",l)}),e.watch(n,c=>{c&&(s.value=!1)}),e.watch(t,c=>{c?a():h()}),{autoOpened:s}}function te(t,i,n){const s=e.ref(!1),l=e.ref(null),o=e.ref(null),a={x:0,y:0},h=e.computed(()=>l.value==null||o.value==null?{x:0,y:0}:{x:l.value.x-o.value.x,y:l.value.y-o.value.y}),c=()=>{if(t.value){const m=t.value.getBoundingClientRect();o.value={x:m.left,y:m.top},l.value={x:m.left,y:m.top}}},r=()=>{t.value&&t.value.addEventListener("mousedown",w)},d=()=>{t.value&&t.value.removeEventListener("mousedown",w)},w=m=>{if(t.value!=null){if(i&&i.value){const f=i.value.getBoundingClientRect();if(m.clientX<f.left||m.clientX>f.right||m.clientY<f.top||m.clientY>f.bottom)return}s.value=!0,a.x=m.clientX,a.y=m.clientY,c(),document.addEventListener("mousemove",u),document.addEventListener("mouseup",p)}},u=m=>{if(s.value&&o.value&&l.value){const f=window.innerWidth,g=window.innerHeight,M=t.value,k=M.getBoundingClientRect(),E=k.width,v=k.height,b=o.value.x+(m.clientX-a.x),B=o.value.y+(m.clientY-a.y);l.value.x=Math.max(n?n.value.offset.value.left:0,b);const _=f-E;l.value.x=Math.min(n?_-n.value.offset.value.right:_,l.value.x),l.value.y=Math.max(n?n.value.offset.value.top:0,Math.min(B,g-v));const y=g-v;l.value.y=Math.min(n?y-n.value.offset.value.bottom:y,l.value.y),M.style.left=l.value.x+"px",M.style.top=l.value.y+"px"}},p=()=>{s.value=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",p)};return e.onMounted(()=>{t.value&&(c(),r())}),e.onUnmounted(()=>{t.value&&t.value.removeEventListener("mousedown",w)}),e.watch(t,m=>{m?(c(),r()):d()}),{isDragging:s,movement:h,position:l}}function ne(t,i,n){const s=e.ref(!1),l=e.ref("left"),{isDragging:o,movement:a,position:h}=te(t,i,n);return e.watch(a,c=>{if(c&&t.value){const d=t.value.getBoundingClientRect();d.left<=n.value.offset.value.left?(l.value="left",s.value=!0):window.innerWidth-d.left-d.width<=n.value.offset.value.right?(l.value="right",s.value=!0):s.value=!1}}),{docked:s,orientation:l,isDragging:o,movement:a,position:h}}function oe(t,i,n,s){const l=e.ref(null),o=e.ref(null),a=e.ref(null),h=e.ref(null);return e.watch(t,(c,r)=>{l.value=r}),e.watch(i,(c,r)=>{o.value=r}),e.watch(n,(c,r)=>{a.value=r}),e.watch(s,(c,r)=>{h.value=r}),{lastLeft:l,lastTop:o,lastWidth:a,lastHeight:h}}function le(t,i,n,s){const l=e.ref(t.value.width),o=e.ref(t.value.left),a=e.computed(()=>t.value.width),h=e.computed(()=>t.value.left),c=e.computed(()=>n.value?n.value.x:null);return e.watch([a,h],([r,d])=>{(l.value==null||o.value==null||i.value)&&(l.value=r,o.value=d)}),e.watch(c,r=>{s.value&&n.value&&(o.value=r)}),{left:o,width:l}}function se(t,i=e.ref({left:0,right:0,top:0,bottom:0})){const n=e.ref({});let s=!1;const l=()=>{if(!s&&t.value){const o=t.value.getBoundingClientRect();n.value.left=Math.max(o.left,i.value.left),n.value.top=Math.max(o.top,i.value.top),n.value.width=o.width,n.value.height=o.height,s=!0}};return e.onMounted(()=>{t.value&&l()}),e.watch(t,o=>{o&&l()}),{isIntialized:s,initialRect:n}}function ie(t,i=e.ref(!1),n=e.ref(!1),s=e.ref({left:0,right:0,top:0,bottom:0}),l={width:20,height:40}){const{initialRect:o}=se(t,s),a=e.ref(!1);let h=0,c=0,r=0,d=0,w=0;const u=5,p=e.ref(null),m=E=>{if(!(!t.value||i.value))if(a.value){const v=E.clientX-d,b=E.clientY-w;if(p.value==="left"||p.value==="left-bottom-corner"){const B=c-v;B>l.width&&(o.value.width=B,o.value.left=h+v,t.value.style.left=o.value.left+"px",t.value.style.width=o.value.width+"px")}if(p.value==="right"||p.value==="right-bottom-corner"){const B=c+v;B>l.width&&(o.value.width=B,t.value.style.width=o.value.width+"px")}if(p.value==="bottom"||p.value==="left-bottom-corner"||p.value==="right-bottom-corner"){const B=r+b;B>l.height&&(o.value.height=B,t.value.style.height=o.value.height+"px")}}else{const v=t.value.getBoundingClientRect(),b=E.clientX-v.left,B=E.clientY-v.top,_=b<=u,y=b>=v.width-u,C=B>=v.height-u;_&&C&&n.value?(t.value.style.cursor="nesw-resize",p.value="left-bottom-corner"):y&&C&&!n.value?(t.value.style.cursor="nwse-resize",p.value="right-bottom-corner"):_&&n.value?(t.value.style.cursor="ew-resize",p.value="left"):y&&!n.value?(t.value.style.cursor="ew-resize",p.value="right"):C?(t.value.style.cursor="ns-resize",p.value="bottom"):(t.value.style.cursor="",p.value=null)}},f=E=>{if(!t.value||!p.value)return;const v=t.value.getBoundingClientRect();d=E.clientX,w=E.clientY,c=v.width,r=v.height,h=v.left,o.value.width=c,o.value.height=r,o.value.left=v.left,o.value.top=v.top,a.value=!0,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)},g=()=>{a.value=!1,p.value=null,t.value&&(t.value.style.cursor=""),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)},M=()=>{t.value&&(t.value.removeEventListener("mousedown",f),t.value.removeEventListener("mousemove",m)),document.removeEventListener("mouseup",g)},k=()=>{t.value&&(t.value.addEventListener("mousedown",f),t.value.addEventListener("mousemove",m))};return e.onMounted(()=>{t.value&&k()}),e.onBeforeUnmount(()=>{M()}),e.watch(t,E=>{E?k():M()}),{rect:o,isResizing:a}}function ce(t,i,n,s){const l=()=>{if(t.value){const c=t.value;i.value?c.style.transition="width 0.3s ease-out, left 0.3s ease-out":c.style.transition="width 0.3s ease"}},o=()=>{t.value&&(t.value.style.transition="")},a=()=>{t.value&&t.value.removeEventListener("transitionend",o)},h=()=>{t.value&&t.value.addEventListener("transitionend",o)};e.onMounted(()=>{t.value&&t.value.addEventListener("transitionend",o)}),e.onBeforeUnmount(()=>{t.value&&t.value.removeEventListener("transitionend",o)}),e.watch(t,c=>{c?h():a()}),e.watch(n,()=>{l()}),e.watch(s,()=>{l()})}function ae(t,i,n,s){const l=e.ref(window.innerWidth),o=e.ref(window.innerHeight),{docked:a,orientation:h,movement:c,position:r,isDragging:d}=ne(t,i,s),w=e.computed(()=>h.value==="right"),{rect:u,isResizing:p}=ie(t,n,w,s.value.offset),{width:m,left:f}=le(u,p,r,d),{lastTop:g,lastHeight:M}=oe(e.computed(()=>u.value.left),e.computed(()=>u.value.top),e.computed(()=>u.value.width),e.computed(()=>u.value.height)),{autoOpened:k}=ee(t,i,n);ce(t,w,n,k);const E=_=>{if(t.value){const y=t.value.getBoundingClientRect(),C=y.left+_;if(w.value){u.value.left=C;const he=window.innerWidth-y.width-y.left;y.left<=0&&he>=0&&_<0&&(u.value.left=Math.max(0,C)),window.innerWidth-y.width<=0&&(u.value.left=window.innerWidth-y.width)}else y.left+y.width>=window.innerWidth&&_<0&&(u.value.left=Math.max(0,C))}},v=()=>{const _=window.innerWidth-l.value;l.value=window.innerWidth,o.value=window.innerHeight,E(_)};e.onMounted(()=>{window.addEventListener("resize",v)}),e.onUnmounted(()=>{window.removeEventListener("resize",v)});const b=_=>{_?(u.value.width=D,w.value&&f.value&&m.value&&(u.value.left=f.value+m.value-D)):(u.value.width=m.value,w.value&&f.value&&m.value&&(u.value.left=f.value))},B=()=>{a.value?(u.value.top=s.value.offset.value.top,u.value.height=window.innerHeight-s.value.offset.value.top-s.value.offset.value.bottom):(u.value.top=g.value,u.value.height=M.value)};return e.watch(a,()=>{B()}),e.watch(n,_=>{b(_)}),e.watch(k,_=>{n.value&&!d.value&&b(!_)}),e.watch(c,_=>{if(_&&t.value){const C=t.value.getBoundingClientRect();u.value.left=C.left,u.value.top=C.top}}),{rect:u,orientation:h,reversed:w}}const re=(t=>(e.pushScopeId("data-v-d384c67e"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592L512 466.88L259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512L214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})],-1)),ue={class:"ml-tool-palette-title"},de={class:"ml-tool-palette-content"},O=z(e.defineComponent({__name:"MlToolPalette",props:e.mergeModels({title:{default:""},leftOffset:{default:0},rightOffset:{default:0},topOffset:{default:0},bottomOffset:{default:0}},{modelValue:{default:!0},modelModifiers:{}}),emits:e.mergeModels(["close"],["update:modelValue"]),setup(t,{emit:i}){const n=t,s=e.useModel(t,"modelValue"),l=i,o=e.ref(!1),a=e.ref(null),h=e.ref(null),c=e.computed(()=>({offset:e.ref({left:n.leftOffset,right:n.rightOffset,top:n.topOffset,bottom:n.bottomOffset})})),{rect:r,orientation:d,reversed:w}=ae(h,a,o,c),u=e.computed(()=>({left:`${r.value.left}px`,top:`${r.value.top}px`,width:`${r.value.width}px`,height:`${r.value.height}px`})),p=e.computed(()=>w.value?{borderLeft:"1px solid var(--el-border-color)",borderRight:null}:{borderLeft:null,borderRight:"1px solid var(--el-border-color)"}),m=()=>{s.value=!1;const f=h.value;l("close",{x:f?f.clientLeft:0,y:f?f.clientTop:0})};return(f,g)=>{const M=x.ElIcon;return s.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"toolPaletteElement",ref:h,style:e.normalizeStyle([u.value]),class:"ml-tool-palette-dialog"},[e.createElementVNode("div",{class:e.normalizeClass(["ml-tool-palette-dialog-layout",e.unref(d)])},[e.createElementVNode("div",{ref_key:"titleBarElement",ref:a,class:"ml-tool-palette-title-bar",style:e.normalizeStyle(p.value)},[e.createVNode(M,{size:18,class:"ml-tool-palette-dialog-icon",onClick:m},{default:e.withCtx(()=>[re]),_:1}),e.createVNode(S,{class:"ml-tool-palette-dialog-icon",modelValue:o.value,"onUpdate:modelValue":g[0]||(g[0]=k=>o.value=k),reverse:e.unref(w)},null,8,["modelValue","reverse"]),e.createElementVNode("span",ue,e.toDisplayString(n.title),1)],4),e.createElementVNode("div",de,[e.renderSlot(f.$slots,"default",{},void 0,!0)])],2)],4)):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-d384c67e"]]),me={install(t){t.component("MlCollapse",V),t.component("MlDropdown",V),t.component("MlLanguage",I),t.component("MlStatusBar",N),t.component("MlToolBar",W),t.component("MlToolPalette",O)}};L.MlCollapse=S,L.MlDropdown=V,L.MlLanguage=I,L.MlStatusBar=N,L.MlToolBar=W,L.MlToolPalette=O,L.default=me,Object.defineProperties(L,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -130,11 +130,11 @@ const resizedStyle = computed(() => {
|
|
|
130
130
|
|
|
131
131
|
const titleBarBorderStyle = computed(() => {
|
|
132
132
|
return reversed.value ? {
|
|
133
|
-
borderLeft: '1px solid',
|
|
133
|
+
borderLeft: '1px solid var(--el-border-color)',
|
|
134
134
|
borderRight: null
|
|
135
135
|
} : {
|
|
136
136
|
borderLeft: null,
|
|
137
|
-
borderRight: '1px solid'
|
|
137
|
+
borderRight: '1px solid var(--el-border-color)'
|
|
138
138
|
}
|
|
139
139
|
})
|
|
140
140
|
|
|
@@ -155,11 +155,11 @@ const handleClose = () => {
|
|
|
155
155
|
min-width: var(--collapsed-width);
|
|
156
156
|
position: fixed;
|
|
157
157
|
box-sizing: border-box;
|
|
158
|
-
border: 1px solid;
|
|
158
|
+
border: 1px solid var(--el-border-color);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
.ml-tool-palette-dialog-icon {
|
|
162
|
-
border-bottom: 1px solid;
|
|
162
|
+
border-bottom: 1px solid var(--el-border-color);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
.ml-tool-palette-dialog-layout {
|
|
@@ -175,6 +175,7 @@ const handleClose = () => {
|
|
|
175
175
|
cursor: move; /* Draggable cursor on the left part */
|
|
176
176
|
writing-mode: vertical-rl; /* Vertically align the text */
|
|
177
177
|
text-align: center;
|
|
178
|
+
background-color: var(--el-fill-color);
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
.ml-tool-palette-title {
|
|
@@ -125,7 +125,7 @@ export function useBoundingRect(
|
|
|
125
125
|
rect.value.height =
|
|
126
126
|
window.innerHeight -
|
|
127
127
|
dragOptions.value.offset.value.top -
|
|
128
|
-
dragOptions.value.offset.value.bottom
|
|
128
|
+
dragOptions.value.offset.value.bottom
|
|
129
129
|
} else {
|
|
130
130
|
rect.value.top = lastTop.value
|
|
131
131
|
rect.value.height = lastHeight.value
|
|
@@ -125,7 +125,7 @@ export function useDrag(
|
|
|
125
125
|
options ? options.value.offset.value.top : 0,
|
|
126
126
|
Math.min(newY, viewportHeight - elementHeight)
|
|
127
127
|
)
|
|
128
|
-
const distanceToBottomBorder = viewportHeight - elementHeight
|
|
128
|
+
const distanceToBottomBorder = viewportHeight - elementHeight
|
|
129
129
|
position.value.y = Math.min(
|
|
130
130
|
options
|
|
131
131
|
? distanceToBottomBorder - options.value.offset.value.bottom
|