@mlightcad/ui-components 0.0.16 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,81 +1,81 @@
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-3eed2087]{display:flex;flex-direction:column}.ml-horizontal-toolbar-button-group[data-v-3eed2087]{display:flex;flex-direction:row}.ml-toolbar-button[data-v-3eed2087]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px}.ml-toolbar-button-text[data-v-3eed2087]{margin-left:0;margin-top:5px}.ml-tool-palette-dialog[data-v-11a64c54]{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-11a64c54]{border-bottom:1px solid var(--el-border-color)}.ml-tool-palette-dialog-layout[data-v-11a64c54]{display:flex;height:100%}.ml-tool-palette-title-bar[data-v-11a64c54]{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-11a64c54]{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-11a64c54]{-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-11a64c54]{order:1}.ml-tool-palette-dialog-layout.left .ml-tool-palette-content[data-v-11a64c54],.ml-tool-palette-dialog-layout.right .ml-tool-palette-title-bar[data-v-11a64c54]{order:2}.ml-tool-palette-dialog-layout.right .ml-tool-palette-content[data-v-11a64c54]{order:1}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { ElIcon as A, ElDropdownItem as ue, ElDropdownMenu as ae, ElDropdown as ce, ElButton as Z, ElTooltip as P, ElButtonGroup as re } from "element-plus/es";
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-toggle-button[data-v-b676e93b]{border:none;padding:0;cursor:pointer;width:var(--0547f26d);height:var(--0547f26d)}.ml-vertical-toolbar-button-group[data-v-5261c686]{display:flex;flex-direction:column}.ml-horizontal-toolbar-button-group[data-v-5261c686]{display:flex;flex-direction:row}.ml-toolbar-button[data-v-5261c686]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px}.ml-toolbar-button-text[data-v-5261c686]{margin-left:0;margin-top:5px}.ml-tool-palette-dialog[data-v-8645db4f]{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-8645db4f]{border-bottom:1px solid var(--el-border-color);cursor:default}.ml-tool-palette-dialog-icon[data-v-8645db4f]:hover{color:var(--el-color-primary)}.ml-tool-palette-dialog-layout[data-v-8645db4f]{display:flex;height:100%}.ml-tool-palette-title-bar[data-v-8645db4f]{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-8645db4f]{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-8645db4f]{-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-8645db4f]{order:1}.ml-tool-palette-dialog-layout.left .ml-tool-palette-content[data-v-8645db4f],.ml-tool-palette-dialog-layout.right .ml-tool-palette-title-bar[data-v-8645db4f]{order:2}.ml-tool-palette-dialog-layout.right .ml-tool-palette-content[data-v-8645db4f]{order:1}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { ElIcon as H, ElDropdownItem as ue, ElDropdownMenu as ae, ElDropdown as ce, ElButton as Q, ElTooltip as Z, 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 B, defineComponent as S, mergeModels as D, useModel as U, computed as _, createBlock as T, withCtx as b, resolveDynamicComponent as F, createVNode as V, Fragment as R, renderList as ee, createTextVNode as ve, toDisplayString as G, pushScopeId as te, popScopeId as ne, renderSlot as O, normalizeClass as le, normalizeStyle as X, createCommentVNode as oe, ref as m, onMounted as Y, onUnmounted as j, watch as L, onBeforeUnmount as se, unref as q } from "vue";
5
+ import { openBlock as M, createElementBlock as I, createElementVNode as E, defineComponent as S, mergeModels as V, useModel as U, computed as p, createBlock as $, withCtx as B, resolveDynamicComponent as P, createVNode as D, Fragment as R, renderList as ee, createTextVNode as ve, toDisplayString as F, pushScopeId as te, popScopeId as ne, renderSlot as O, useCssVars as de, normalizeClass as le, normalizeStyle as X, createCommentVNode as oe, ref as m, onMounted as Y, onUnmounted as G, watch as L, onBeforeUnmount as se, unref as j } 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";
9
9
  import "element-plus/es/components/tooltip/style/css";
10
10
  import "element-plus/es/components/button/style/css";
11
11
  import "element-plus/es/components/button-group/style/css";
12
- const de = {
12
+ const me = {
13
13
  xmlns: "http://www.w3.org/2000/svg",
14
14
  width: "1em",
15
15
  height: "1em",
16
16
  viewBox: "0 0 1024 1024"
17
- }, me = /* @__PURE__ */ B("path", {
17
+ }, he = /* @__PURE__ */ E("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
- }, null, -1), he = [
21
- me
20
+ }, null, -1), fe = [
21
+ he
22
22
  ];
23
- function fe(e, s) {
24
- return y(), I("svg", de, [...he]);
23
+ function pe(e, s) {
24
+ return M(), I("svg", me, [...fe]);
25
25
  }
26
- const J = { render: fe }, pe = {
26
+ const q = { render: pe }, _e = {
27
27
  xmlns: "http://www.w3.org/2000/svg",
28
28
  width: "1em",
29
29
  height: "1em",
30
30
  viewBox: "0 0 1024 1024"
31
- }, _e = /* @__PURE__ */ B("path", {
31
+ }, we = /* @__PURE__ */ E("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
- }, null, -1), we = [
35
- _e
34
+ }, null, -1), ge = [
35
+ we
36
36
  ];
37
- function ge(e, s) {
38
- return y(), I("svg", pe, [...we]);
37
+ function Le(e, s) {
38
+ return M(), I("svg", _e, [...ge]);
39
39
  }
40
- const K = { render: ge }, Le = /* @__PURE__ */ S({
40
+ const J = { render: Le }, xe = /* @__PURE__ */ S({
41
41
  __name: "MlCollapse",
42
- props: /* @__PURE__ */ D({
42
+ props: /* @__PURE__ */ V({
43
43
  size: { default: 18 },
44
44
  reverse: { type: Boolean, default: !1 }
45
45
  }, {
46
46
  modelValue: { default: !0 },
47
47
  modelModifiers: {}
48
48
  }),
49
- emits: /* @__PURE__ */ D(["change"], ["update:modelValue"]),
49
+ emits: /* @__PURE__ */ V(["change"], ["update:modelValue"]),
50
50
  setup(e, { emit: s }) {
51
- const t = e, o = U(e, "modelValue"), l = s, n = _(() => t.reverse ? o.value ? J : K : o.value ? K : J), i = _(() => `${t.size}px`), d = () => {
51
+ const t = e, o = U(e, "modelValue"), l = s, n = p(() => t.reverse ? o.value ? q : J : o.value ? J : q), u = p(() => `${t.size}px`), d = () => {
52
52
  l("change", o.value), o.value = !o.value;
53
53
  };
54
- return (u, a) => {
55
- const r = A;
56
- return y(), T(r, {
57
- size: i.value,
54
+ return (i, a) => {
55
+ const r = H;
56
+ return M(), $(r, {
57
+ size: u.value,
58
58
  onClick: d
59
59
  }, {
60
- default: b(() => [
61
- (y(), T(F(n.value)))
60
+ default: B(() => [
61
+ (M(), $(P(n.value)))
62
62
  ]),
63
63
  _: 1
64
64
  }, 8, ["size"]);
65
65
  };
66
66
  }
67
- }), xe = (e) => (te("data-v-3fc33b5d"), e = e(), ne(), e), ye = /* @__PURE__ */ xe(() => /* @__PURE__ */ B("svg", {
67
+ }), Me = (e) => (te("data-v-3fc33b5d"), e = e(), ne(), e), be = /* @__PURE__ */ Me(() => /* @__PURE__ */ E("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__ */ B("path", {
74
+ /* @__PURE__ */ E("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
  })
78
- ], -1)), Me = /* @__PURE__ */ S({
78
+ ], -1)), ye = /* @__PURE__ */ S({
79
79
  __name: "MlDropdown",
80
80
  props: {
81
81
  icon: {},
@@ -86,21 +86,21 @@ const K = { render: ge }, Le = /* @__PURE__ */ S({
86
86
  click: null
87
87
  },
88
88
  setup(e, { emit: s }) {
89
- const t = e, o = s, l = _(() => t.items.filter((i) => i.name !== t.current)), n = (i) => {
90
- o("click", i);
89
+ const t = e, o = s, l = p(() => t.items.filter((u) => u.name !== t.current)), n = (u) => {
90
+ o("click", u);
91
91
  };
92
- return (i, d) => {
93
- const u = A, a = ue, r = ae, p = ce;
94
- return y(), T(p, { onCommand: n }, {
95
- dropdown: b(() => [
96
- V(r, null, {
97
- default: b(() => [
98
- (y(!0), I(R, null, ee(l.value, (c) => (y(), T(a, {
92
+ return (u, d) => {
93
+ const i = H, a = ue, r = ae, _ = ce;
94
+ return M(), $(_, { onCommand: n }, {
95
+ dropdown: B(() => [
96
+ D(r, null, {
97
+ default: B(() => [
98
+ (M(!0), I(R, null, ee(l.value, (c) => (M(), $(a, {
99
99
  key: c.text,
100
100
  command: c.name
101
101
  }, {
102
- default: b(() => [
103
- ve(G(c.text), 1)
102
+ default: B(() => [
103
+ ve(F(c.text), 1)
104
104
  ]),
105
105
  _: 2
106
106
  }, 1032, ["command"]))), 128))
@@ -108,13 +108,13 @@ const K = { render: ge }, Le = /* @__PURE__ */ S({
108
108
  _: 1
109
109
  })
110
110
  ]),
111
- default: b(() => [
112
- V(u, {
111
+ default: B(() => [
112
+ D(i, {
113
113
  size: "30",
114
114
  class: "ml-dropdown-icon"
115
115
  }, {
116
- default: b(() => [
117
- ye
116
+ default: B(() => [
117
+ be
118
118
  ]),
119
119
  _: 1
120
120
  })
@@ -123,12 +123,12 @@ const K = { render: ge }, Le = /* @__PURE__ */ S({
123
123
  });
124
124
  };
125
125
  }
126
- }), H = (e, s) => {
126
+ }), A = (e, s) => {
127
127
  const t = e.__vccOpts || e;
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"]]), ze = '<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__ */ S({
131
+ }, N = /* @__PURE__ */ A(ye, [["__scopeId", "data-v-3fc33b5d"]]), ze = '<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>', Ee = /* @__PURE__ */ S({
132
132
  __name: "MlLanguage",
133
133
  props: {
134
134
  languages: {},
@@ -141,69 +141,62 @@ const K = { render: ge }, Le = /* @__PURE__ */ S({
141
141
  const t = e, o = s, l = (n) => {
142
142
  o("click", n);
143
143
  };
144
- return (n, i) => (y(), T(N, {
144
+ return (n, u) => (M(), $(N, {
145
145
  icon: ze,
146
146
  items: t.languages,
147
147
  current: t.current,
148
148
  onClick: l
149
149
  }, null, 8, ["items", "current"]));
150
150
  }
151
- }), Ee = {}, Be = { class: "ml-status-bar" }, Ce = { class: "ml-status-bar-left" }, ke = { class: "ml-status-bar-right" };
152
- function Te(e, s) {
153
- return y(), I("div", Be, [
154
- B("div", Ce, [
151
+ }), Ce = {}, Be = { class: "ml-status-bar" }, ke = { class: "ml-status-bar-left" }, Te = { class: "ml-status-bar-right" };
152
+ function $e(e, s) {
153
+ return M(), I("div", Be, [
154
+ E("div", ke, [
155
155
  O(e.$slots, "left", {}, void 0, !0)
156
156
  ]),
157
- B("div", ke, [
157
+ E("div", Te, [
158
158
  O(e.$slots, "right", {}, void 0, !0)
159
159
  ])
160
160
  ]);
161
161
  }
162
- const $e = /* @__PURE__ */ H(Ee, [["render", Te], ["__scopeId", "data-v-d6a59cf0"]]), We = /* @__PURE__ */ S({
162
+ const We = /* @__PURE__ */ A(Ce, [["render", $e], ["__scopeId", "data-v-d6a59cf0"]]), Ie = /* @__PURE__ */ S({
163
163
  __name: "MlToggleButton",
164
- props: /* @__PURE__ */ D({
165
- size: { default: "default" },
166
- type: {},
164
+ props: /* @__PURE__ */ V({
165
+ size: { default: 30 },
167
166
  data: {}
168
167
  }, {
169
168
  modelValue: { default: !1 },
170
169
  modelModifiers: {}
171
170
  }),
172
- emits: /* @__PURE__ */ D(["click"], ["update:modelValue"]),
171
+ emits: /* @__PURE__ */ V(["click"], ["update:modelValue"]),
173
172
  setup(e, { emit: s }) {
174
- const t = e, o = U(e, "modelValue"), l = s, n = _(() => o.value ? t.data.onIcon : t.data.offIcon), i = _(() => o.value ? t.data.onTooltip : t.data.offTooltip), d = () => {
173
+ de((a) => ({
174
+ "0547f26d": u.value
175
+ }));
176
+ const t = e, o = U(e, "modelValue"), l = s, n = p(() => o.value ? t.data.onIcon : t.data.offIcon), u = p(() => t.size + "px"), d = p(() => o.value ? t.data.onTooltip : t.data.offTooltip), i = () => {
175
177
  o.value = !o.value, l("click", o.value);
176
178
  };
177
- return (u, a) => {
178
- const r = A, p = Z, c = P;
179
- return y(), T(c, {
180
- content: i.value,
179
+ return (a, r) => {
180
+ const _ = Q, c = Z;
181
+ return M(), $(c, {
182
+ content: d.value,
181
183
  "hide-after": 0
182
184
  }, {
183
- default: b(() => [
184
- V(p, {
185
- type: t.type,
186
- size: t.size
187
- }, {
188
- default: b(() => [
189
- V(r, { onClick: d }, {
190
- default: b(() => [
191
- (y(), T(F(n.value)))
192
- ]),
193
- _: 1
194
- })
195
- ]),
196
- _: 1
197
- }, 8, ["type", "size"])
185
+ default: B(() => [
186
+ D(_, {
187
+ class: "ml-toggle-button",
188
+ icon: n.value,
189
+ onClick: i
190
+ }, null, 8, ["icon"])
198
191
  ]),
199
192
  _: 1
200
193
  }, 8, ["content"]);
201
194
  };
202
195
  }
203
- }), Ie = {
196
+ }), Ve = /* @__PURE__ */ A(Ie, [["__scopeId", "data-v-b676e93b"]]), De = {
204
197
  key: 0,
205
198
  class: "ml-toolbar-button-text"
206
- }, Ve = /* @__PURE__ */ S({
199
+ }, Se = /* @__PURE__ */ S({
207
200
  __name: "MlToolBar",
208
201
  props: {
209
202
  items: {},
@@ -214,7 +207,7 @@ const $e = /* @__PURE__ */ H(Ee, [["render", Te], ["__scopeId", "data-v-d6a59cf0
214
207
  click: null
215
208
  },
216
209
  setup(e, { emit: s }) {
217
- const t = e, o = s, l = _(() => t.direction === "vertical" ? "ml-vertical-toolbar-button-group" : "ml-horizontal-toolbar-button-group"), n = _(() => t.size === "small" ? 20 : 30), i = _(() => {
210
+ const t = e, o = s, l = p(() => t.direction === "vertical" ? "ml-vertical-toolbar-button-group" : "ml-horizontal-toolbar-button-group"), n = p(() => t.size === "small" ? 20 : 30), u = p(() => {
218
211
  switch (t.size) {
219
212
  case "small":
220
213
  return 30;
@@ -222,36 +215,36 @@ const $e = /* @__PURE__ */ H(Ee, [["render", Te], ["__scopeId", "data-v-d6a59cf0
222
215
  return 50;
223
216
  }
224
217
  return 70;
225
- }), d = (r) => r.description ? r.description : r.text, u = _(() => t.size === "large"), a = (r) => {
218
+ }), d = (r) => r.description ? r.description : r.text, i = p(() => t.size === "large"), a = (r) => {
226
219
  o("click", r);
227
220
  };
228
- return (r, p) => {
229
- const c = A, h = Z, v = P, f = re;
230
- return y(), T(f, {
221
+ return (r, _) => {
222
+ const c = H, h = Q, v = Z, f = re;
223
+ return M(), $(f, {
231
224
  class: le(l.value)
232
225
  }, {
233
- default: b(() => [
234
- (y(!0), I(R, null, ee(r.items, (x, C) => (y(), T(v, {
226
+ default: B(() => [
227
+ (M(!0), I(R, null, ee(r.items, (x, C) => (M(), $(v, {
235
228
  key: x.text,
236
229
  content: d(x),
237
230
  "hide-after": 0
238
231
  }, {
239
- default: b(() => [
240
- (y(), T(h, {
232
+ default: B(() => [
233
+ (M(), $(h, {
241
234
  class: "ml-toolbar-button",
242
- style: X({ width: i.value + "px", height: i.value + "px" }),
235
+ style: X({ width: u.value + "px", height: u.value + "px" }),
243
236
  key: C,
244
237
  onClick: (k) => a(x.command)
245
238
  }, {
246
- default: b(() => [
247
- B("div", null, [
248
- V(c, { size: n.value }, {
249
- default: b(() => [
250
- (y(), T(F(x.icon)))
239
+ default: B(() => [
240
+ E("div", null, [
241
+ D(c, { size: n.value }, {
242
+ default: B(() => [
243
+ (M(), $(P(x.icon)))
251
244
  ]),
252
245
  _: 2
253
246
  }, 1032, ["size"]),
254
- u.value ? (y(), I("div", Ie, G(x.text), 1)) : oe("", !0)
247
+ i.value ? (M(), I("div", De, F(x.text), 1)) : oe("", !0)
255
248
  ])
256
249
  ]),
257
250
  _: 2
@@ -264,35 +257,35 @@ const $e = /* @__PURE__ */ H(Ee, [["render", Te], ["__scopeId", "data-v-d6a59cf0
264
257
  }, 8, ["class"]);
265
258
  };
266
259
  }
267
- }), De = /* @__PURE__ */ H(Ve, [["__scopeId", "data-v-3eed2087"]]), Q = 20;
268
- function Se(e, s, t) {
269
- const o = m(!1), l = (u) => {
260
+ }), Ye = /* @__PURE__ */ A(Se, [["__scopeId", "data-v-5261c686"]]), K = 20;
261
+ function Ae(e, s, t) {
262
+ const o = m(!1), l = (i) => {
270
263
  if (t.value && e.value) {
271
- const a = e.value.getBoundingClientRect(), r = u.clientX < a.left || u.clientX > a.right || u.clientY < a.top || u.clientY > a.bottom;
264
+ const a = e.value.getBoundingClientRect(), r = i.clientX < a.left || i.clientX > a.right || i.clientY < a.top || i.clientY > a.bottom;
272
265
  o.value = !r;
273
266
  }
274
267
  }, n = () => {
275
268
  t.value && (o.value = !0);
276
- }, i = () => {
269
+ }, u = () => {
277
270
  s.value && s.value.addEventListener("mousemove", n), e.value && e.value.addEventListener("mousemove", n);
278
271
  }, d = () => {
279
272
  s.value && s.value.removeEventListener("mousemove", n), e.value && e.value.removeEventListener("mousemove", n);
280
273
  };
281
274
  return Y(() => {
282
275
  window.addEventListener("mousemove", l);
283
- }), j(() => {
276
+ }), G(() => {
284
277
  window.removeEventListener("mousemove", l);
285
- }), L(t, (u) => {
286
- u && (o.value = !1);
287
- }), L(e, (u) => {
288
- u ? i() : d();
278
+ }), L(t, (i) => {
279
+ i && (o.value = !1);
280
+ }), L(e, (i) => {
281
+ i ? u() : d();
289
282
  }), { autoOpened: o };
290
283
  }
291
- function Ye(e, s, t) {
292
- const o = m(!1), l = m(null), n = m(null), i = { x: 0, y: 0 }, d = _(() => l.value == null || n.value == null ? { x: 0, y: 0 } : {
284
+ function He(e, s, t) {
285
+ const o = m(!1), l = m(null), n = m(null), u = { x: 0, y: 0 }, d = p(() => l.value == null || n.value == null ? { x: 0, y: 0 } : {
293
286
  x: l.value.x - n.value.x,
294
287
  y: l.value.y - n.value.y
295
- }), u = () => {
288
+ }), i = () => {
296
289
  if (e.value) {
297
290
  const v = e.value.getBoundingClientRect();
298
291
  n.value = {
@@ -304,35 +297,35 @@ function Ye(e, s, t) {
304
297
  };
305
298
  }
306
299
  }, a = () => {
307
- e.value && e.value.addEventListener("mousedown", p);
300
+ e.value && e.value.addEventListener("mousedown", _);
308
301
  }, r = () => {
309
- e.value && e.value.removeEventListener("mousedown", p);
310
- }, p = (v) => {
302
+ e.value && e.value.removeEventListener("mousedown", _);
303
+ }, _ = (v) => {
311
304
  if (e.value != null) {
312
305
  if (s && s.value) {
313
306
  const f = s.value.getBoundingClientRect();
314
307
  if (v.clientX < f.left || v.clientX > f.right || v.clientY < f.top || v.clientY > f.bottom) return;
315
308
  }
316
- o.value = !0, i.x = v.clientX, i.y = v.clientY, u(), document.addEventListener("mousemove", c), document.addEventListener("mouseup", h);
309
+ o.value = !0, u.x = v.clientX, u.y = v.clientY, i(), document.addEventListener("mousemove", c), document.addEventListener("mouseup", h);
317
310
  }
318
311
  }, c = (v) => {
319
312
  if (o.value && n.value && l.value) {
320
- const f = window.innerWidth, x = window.innerHeight, C = e.value, k = C.getBoundingClientRect(), E = k.width, w = k.height, W = n.value.x + (v.clientX - i.x), z = n.value.y + (v.clientY - i.y);
313
+ const f = window.innerWidth, x = window.innerHeight, C = e.value, k = C.getBoundingClientRect(), z = k.width, w = k.height, W = n.value.x + (v.clientX - u.x), y = n.value.y + (v.clientY - u.y);
321
314
  l.value.x = Math.max(
322
315
  t ? t.value.offset.value.left : 0,
323
316
  W
324
317
  );
325
- const g = f - E;
318
+ const g = f - z;
326
319
  l.value.x = Math.min(
327
320
  t ? g - t.value.offset.value.right : g,
328
321
  l.value.x
329
322
  ), l.value.y = Math.max(
330
323
  t ? t.value.offset.value.top : 0,
331
- Math.min(z, x - w)
324
+ Math.min(y, x - w)
332
325
  );
333
- const M = x - w;
326
+ const b = x - w;
334
327
  l.value.y = Math.min(
335
- t ? M - t.value.offset.value.bottom : M,
328
+ t ? b - t.value.offset.value.bottom : b,
336
329
  l.value.y
337
330
  ), C.style.left = l.value.x + "px", C.style.top = l.value.y + "px";
338
331
  }
@@ -340,25 +333,25 @@ function Ye(e, s, t) {
340
333
  o.value = !1, document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", h);
341
334
  };
342
335
  return Y(() => {
343
- e.value && (u(), a());
344
- }), j(() => {
345
- e.value && e.value.removeEventListener("mousedown", p);
336
+ e.value && (i(), a());
337
+ }), G(() => {
338
+ e.value && e.value.removeEventListener("mousedown", _);
346
339
  }), L(e, (v) => {
347
- v ? (u(), a()) : r();
340
+ v ? (i(), a()) : r();
348
341
  }), {
349
342
  isDragging: o,
350
343
  movement: d,
351
344
  position: l
352
345
  };
353
346
  }
354
- function Ae(e, s, t) {
355
- const o = m(!1), l = m("left"), { isDragging: n, movement: i, position: d } = Ye(
347
+ function Oe(e, s, t) {
348
+ const o = m(!1), l = m("left"), { isDragging: n, movement: u, position: d } = He(
356
349
  e,
357
350
  s,
358
351
  t
359
352
  );
360
- return L(i, (u) => {
361
- if (u && e.value) {
353
+ return L(u, (i) => {
354
+ if (i && e.value) {
362
355
  const r = e.value.getBoundingClientRect();
363
356
  r.left <= t.value.offset.value.left ? (l.value = "left", o.value = !0) : window.innerWidth - r.left - r.width <= t.value.offset.value.right ? (l.value = "right", o.value = !0) : o.value = !1;
364
357
  }
@@ -366,36 +359,36 @@ function Ae(e, s, t) {
366
359
  docked: o,
367
360
  orientation: l,
368
361
  isDragging: n,
369
- movement: i,
362
+ movement: u,
370
363
  position: d
371
364
  };
372
365
  }
373
- function He(e, s, t, o) {
374
- const l = m(null), n = m(null), i = m(null), d = m(null);
375
- return L(e, (u, a) => {
366
+ function Xe(e, s, t, o) {
367
+ const l = m(null), n = m(null), u = m(null), d = m(null);
368
+ return L(e, (i, a) => {
376
369
  l.value = a;
377
- }), L(s, (u, a) => {
370
+ }), L(s, (i, a) => {
378
371
  n.value = a;
379
- }), L(t, (u, a) => {
380
- i.value = a;
381
- }), L(o, (u, a) => {
372
+ }), L(t, (i, a) => {
373
+ u.value = a;
374
+ }), L(o, (i, a) => {
382
375
  d.value = a;
383
376
  }), {
384
377
  lastLeft: l,
385
378
  lastTop: n,
386
- lastWidth: i,
379
+ lastWidth: u,
387
380
  lastHeight: d
388
381
  };
389
382
  }
390
- function Oe(e, s, t, o) {
391
- const l = m(e.value.width), n = m(e.value.left), i = _(() => e.value.width), d = _(() => e.value.left), u = _(() => t.value ? t.value.x : null);
392
- return L([i, d], ([a, r]) => {
383
+ function Ne(e, s, t, o) {
384
+ const l = m(e.value.width), n = m(e.value.left), u = p(() => e.value.width), d = p(() => e.value.left), i = p(() => t.value ? t.value.x : null);
385
+ return L([u, d], ([a, r]) => {
393
386
  (l.value == null || n.value == null || s.value) && (l.value = a, n.value = r);
394
- }), L(u, (a) => {
387
+ }), L(i, (a) => {
395
388
  o.value && t.value && (n.value = a);
396
389
  }), { left: n, width: l };
397
390
  }
398
- function Xe(e, s = m({ left: 0, right: 0, top: 0, bottom: 0 })) {
391
+ function Ue(e, s = m({ left: 0, right: 0, top: 0, bottom: 0 })) {
399
392
  const t = m({});
400
393
  let o = !1;
401
394
  const l = () => {
@@ -413,35 +406,35 @@ function Xe(e, s = m({ left: 0, right: 0, top: 0, bottom: 0 })) {
413
406
  initialRect: t
414
407
  };
415
408
  }
416
- function Ne(e, s = m(!1), t = m(!1), o = m({ left: 0, right: 0, top: 0, bottom: 0 }), l = { width: 20, height: 40 }) {
417
- const { initialRect: n } = Xe(e, o), i = m(!1);
418
- let d = 0, u = 0, a = 0, r = 0, p = 0;
419
- const c = 5, h = m(null), v = (E) => {
409
+ function Fe(e, s = m(!1), t = m(!1), o = m({ left: 0, right: 0, top: 0, bottom: 0 }), l = { width: 20, height: 40 }) {
410
+ const { initialRect: n } = Ue(e, o), u = m(!1);
411
+ let d = 0, i = 0, a = 0, r = 0, _ = 0;
412
+ const c = 5, h = m(null), v = (z) => {
420
413
  if (!(!e.value || s.value))
421
- if (i.value) {
422
- const w = E.clientX - r, W = E.clientY - p;
414
+ if (u.value) {
415
+ const w = z.clientX - r, W = z.clientY - _;
423
416
  if (h.value === "left" || h.value === "left-bottom-corner") {
424
- const z = u - w;
425
- z > l.width && (n.value.width = z, n.value.left = d + w, e.value.style.left = n.value.left + "px", e.value.style.width = n.value.width + "px");
417
+ const y = i - w;
418
+ y > l.width && (n.value.width = y, n.value.left = d + w, e.value.style.left = n.value.left + "px", e.value.style.width = n.value.width + "px");
426
419
  }
427
420
  if (h.value === "right" || h.value === "right-bottom-corner") {
428
- const z = u + w;
429
- z > l.width && (n.value.width = z, e.value.style.width = n.value.width + "px");
421
+ const y = i + w;
422
+ y > l.width && (n.value.width = y, e.value.style.width = n.value.width + "px");
430
423
  }
431
424
  if (h.value === "bottom" || h.value === "left-bottom-corner" || h.value === "right-bottom-corner") {
432
- const z = a + W;
433
- z > l.height && (n.value.height = z, e.value.style.height = n.value.height + "px");
425
+ const y = a + W;
426
+ y > l.height && (n.value.height = y, e.value.style.height = n.value.height + "px");
434
427
  }
435
428
  } else {
436
- const w = e.value.getBoundingClientRect(), W = E.clientX - w.left, z = E.clientY - w.top, g = W <= c, M = W >= w.width - c, $ = z >= w.height - c;
437
- g && $ && 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") : g && 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);
429
+ const w = e.value.getBoundingClientRect(), W = z.clientX - w.left, y = z.clientY - w.top, g = W <= c, b = W >= w.width - c, T = y >= w.height - c;
430
+ g && T && t.value ? (e.value.style.cursor = "nesw-resize", h.value = "left-bottom-corner") : b && T && !t.value ? (e.value.style.cursor = "nwse-resize", h.value = "right-bottom-corner") : g && t.value ? (e.value.style.cursor = "ew-resize", h.value = "left") : b && !t.value ? (e.value.style.cursor = "ew-resize", h.value = "right") : T ? (e.value.style.cursor = "ns-resize", h.value = "bottom") : (e.value.style.cursor = "", h.value = null);
438
431
  }
439
- }, f = (E) => {
432
+ }, f = (z) => {
440
433
  if (!e.value || !h.value) return;
441
434
  const w = e.value.getBoundingClientRect();
442
- r = E.clientX, p = E.clientY, u = w.width, a = w.height, d = w.left, n.value.width = u, n.value.height = a, n.value.left = w.left, n.value.top = w.top, i.value = !0, document.addEventListener("mousemove", v), document.addEventListener("mouseup", x);
435
+ r = z.clientX, _ = z.clientY, i = w.width, a = w.height, d = w.left, n.value.width = i, n.value.height = a, n.value.left = w.left, n.value.top = w.top, u.value = !0, document.addEventListener("mousemove", v), document.addEventListener("mouseup", x);
443
436
  }, x = () => {
444
- i.value = !1, h.value = null, e.value && (e.value.style.cursor = ""), document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", x);
437
+ u.value = !1, h.value = null, e.value && (e.value.style.cursor = ""), document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", x);
445
438
  }, C = () => {
446
439
  e.value && (e.value.removeEventListener("mousedown", f), e.value.removeEventListener("mousemove", v)), document.removeEventListener("mouseup", x);
447
440
  }, k = () => {
@@ -451,19 +444,19 @@ function Ne(e, s = m(!1), t = m(!1), o = m({ left: 0, right: 0, top: 0, bottom:
451
444
  e.value && k();
452
445
  }), se(() => {
453
446
  C();
454
- }), L(e, (E) => {
455
- E ? k() : C();
456
- }), { rect: n, isResizing: i };
447
+ }), L(e, (z) => {
448
+ z ? k() : C();
449
+ }), { rect: n, isResizing: u };
457
450
  }
458
- function Ue(e, s, t, o) {
451
+ function Ge(e, s, t, o) {
459
452
  const l = () => {
460
453
  if (e.value) {
461
- const u = e.value;
462
- s.value ? u.style.transition = "width 0.3s ease-out, left 0.3s ease-out" : u.style.transition = "width 0.3s ease";
454
+ const i = e.value;
455
+ s.value ? i.style.transition = "width 0.3s ease-out, left 0.3s ease-out" : i.style.transition = "width 0.3s ease";
463
456
  }
464
457
  }, n = () => {
465
458
  e.value && (e.value.style.transition = "");
466
- }, i = () => {
459
+ }, u = () => {
467
460
  e.value && e.value.removeEventListener("transitionend", n);
468
461
  }, d = () => {
469
462
  e.value && e.value.addEventListener("transitionend", n);
@@ -472,86 +465,86 @@ function Ue(e, s, t, o) {
472
465
  e.value && e.value.addEventListener("transitionend", n);
473
466
  }), se(() => {
474
467
  e.value && e.value.removeEventListener("transitionend", n);
475
- }), L(e, (u) => {
476
- u ? d() : i();
468
+ }), L(e, (i) => {
469
+ i ? d() : u();
477
470
  }), L(t, () => {
478
471
  l();
479
472
  }), L(o, () => {
480
473
  l();
481
474
  });
482
475
  }
483
- function Fe(e, s, t, o) {
484
- const l = m(window.innerWidth), n = m(window.innerHeight), { docked: i, orientation: d, movement: u, position: a, isDragging: r } = Ae(
476
+ function je(e, s, t, o) {
477
+ const l = m(window.innerWidth), n = m(window.innerHeight), { docked: u, orientation: d, movement: i, position: a, isDragging: r } = Oe(
485
478
  e,
486
479
  s,
487
480
  o
488
- ), p = _(() => d.value === "right"), { rect: c, isResizing: h } = Ne(
481
+ ), _ = p(() => d.value === "right"), { rect: c, isResizing: h } = Fe(
489
482
  e,
490
483
  t,
491
- p,
484
+ _,
492
485
  o.value.offset
493
- ), { width: v, left: f } = Oe(
486
+ ), { width: v, left: f } = Ne(
494
487
  c,
495
488
  h,
496
489
  a,
497
490
  r
498
- ), { lastTop: x, lastHeight: C } = He(
499
- _(() => c.value.left),
500
- _(() => c.value.top),
501
- _(() => c.value.width),
502
- _(() => c.value.height)
503
- ), { autoOpened: k } = Se(e, s, t);
504
- Ue(e, p, t, k);
505
- const E = (g) => {
491
+ ), { lastTop: x, lastHeight: C } = Xe(
492
+ p(() => c.value.left),
493
+ p(() => c.value.top),
494
+ p(() => c.value.width),
495
+ p(() => c.value.height)
496
+ ), { autoOpened: k } = Ae(e, s, t);
497
+ Ge(e, _, t, k);
498
+ const z = (g) => {
506
499
  if (e.value) {
507
- const M = e.value.getBoundingClientRect(), $ = M.left + g;
508
- if (p.value) {
509
- c.value.left = $;
510
- const ie = window.innerWidth - M.width - M.left;
511
- M.left <= 0 && ie >= 0 && g < 0 && (c.value.left = Math.max(0, $)), window.innerWidth - M.width <= 0 && (c.value.left = window.innerWidth - M.width);
500
+ const b = e.value.getBoundingClientRect(), T = b.left + g;
501
+ if (_.value) {
502
+ c.value.left = T;
503
+ const ie = window.innerWidth - b.width - b.left;
504
+ b.left <= 0 && ie >= 0 && g < 0 && (c.value.left = Math.max(0, T)), window.innerWidth - b.width <= 0 && (c.value.left = window.innerWidth - b.width);
512
505
  } else
513
- M.left + M.width >= window.innerWidth && g < 0 && (c.value.left = Math.max(0, $));
506
+ b.left + b.width >= window.innerWidth && g < 0 && (c.value.left = Math.max(0, T));
514
507
  }
515
508
  }, w = () => {
516
509
  const g = window.innerWidth - l.value;
517
- l.value = window.innerWidth, n.value = window.innerHeight, E(g);
510
+ l.value = window.innerWidth, n.value = window.innerHeight, z(g);
518
511
  };
519
512
  Y(() => {
520
513
  window.addEventListener("resize", w);
521
- }), j(() => {
514
+ }), G(() => {
522
515
  window.removeEventListener("resize", w);
523
516
  });
524
517
  const W = (g) => {
525
- g ? (c.value.width = Q, p.value && f.value && v.value && (c.value.left = f.value + v.value - Q)) : (c.value.width = v.value, p.value && f.value && v.value && (c.value.left = f.value));
526
- }, z = () => {
527
- i.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);
518
+ g ? (c.value.width = K, _.value && f.value && v.value && (c.value.left = f.value + v.value - K)) : (c.value.width = v.value, _.value && f.value && v.value && (c.value.left = f.value));
519
+ }, y = () => {
520
+ 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);
528
521
  };
529
- return L(i, () => {
530
- z();
522
+ return L(u, () => {
523
+ y();
531
524
  }), L(t, (g) => {
532
525
  W(g);
533
526
  }), L(k, (g) => {
534
527
  t.value && !r.value && W(!g);
535
- }), L(u, (g) => {
528
+ }), L(i, (g) => {
536
529
  if (g && e.value) {
537
- const $ = e.value.getBoundingClientRect();
538
- c.value.left = $.left, c.value.top = $.top;
530
+ const T = e.value.getBoundingClientRect();
531
+ c.value.left = T.left, c.value.top = T.top;
539
532
  }
540
- }), { rect: c, orientation: d, reversed: p };
533
+ }), { rect: c, orientation: d, reversed: _ };
541
534
  }
542
- const Ge = (e) => (te("data-v-11a64c54"), e = e(), ne(), e), je = /* @__PURE__ */ Ge(() => /* @__PURE__ */ B("svg", {
535
+ const qe = (e) => (te("data-v-8645db4f"), e = e(), ne(), e), Je = /* @__PURE__ */ qe(() => /* @__PURE__ */ E("svg", {
543
536
  xmlns: "http://www.w3.org/2000/svg",
544
537
  width: "1em",
545
538
  height: "1em",
546
539
  viewBox: "0 0 1024 1024"
547
540
  }, [
548
- /* @__PURE__ */ B("path", {
541
+ /* @__PURE__ */ E("path", {
549
542
  fill: "currentColor",
550
543
  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"
551
544
  })
552
- ], -1)), qe = { class: "ml-tool-palette-title" }, Je = { class: "ml-tool-palette-content" }, Ke = /* @__PURE__ */ S({
545
+ ], -1)), Ke = { class: "ml-tool-palette-title" }, Qe = { class: "ml-tool-palette-content" }, Ze = /* @__PURE__ */ S({
553
546
  __name: "MlToolPalette",
554
- props: /* @__PURE__ */ D({
547
+ props: /* @__PURE__ */ V({
555
548
  title: { default: "" },
556
549
  leftOffset: { default: 0 },
557
550
  rightOffset: { default: 0 },
@@ -561,9 +554,9 @@ const Ge = (e) => (te("data-v-11a64c54"), e = e(), ne(), e), je = /* @__PURE__ *
561
554
  modelValue: { default: !0 },
562
555
  modelModifiers: {}
563
556
  }),
564
- emits: /* @__PURE__ */ D(["close"], ["update:modelValue"]),
557
+ emits: /* @__PURE__ */ V(["close"], ["update:modelValue"]),
565
558
  setup(e, { emit: s }) {
566
- const t = e, o = U(e, "modelValue"), l = s, n = m(!1), i = m(null), d = m(null), u = _(() => ({
559
+ const t = e, o = U(e, "modelValue"), l = s, n = m(!1), u = m(null), d = m(null), i = p(() => ({
567
560
  offset: m({
568
561
  left: t.leftOffset,
569
562
  right: t.rightOffset,
@@ -573,13 +566,13 @@ const Ge = (e) => (te("data-v-11a64c54"), e = e(), ne(), e), je = /* @__PURE__ *
573
566
  })), {
574
567
  rect: a,
575
568
  orientation: r,
576
- reversed: p
577
- } = Fe(d, i, n, u), c = _(() => ({
569
+ reversed: _
570
+ } = je(d, u, n, i), c = p(() => ({
578
571
  left: `${a.value.left}px`,
579
572
  top: `${a.value.top}px`,
580
573
  width: `${a.value.width}px`,
581
574
  height: `${a.value.height}px`
582
- })), h = _(() => p.value ? {
575
+ })), h = p(() => _.value ? {
583
576
  borderLeft: "1px solid var(--el-border-color)",
584
577
  borderRight: null
585
578
  } : {
@@ -594,61 +587,61 @@ const Ge = (e) => (te("data-v-11a64c54"), e = e(), ne(), e), je = /* @__PURE__ *
594
587
  });
595
588
  };
596
589
  return (f, x) => {
597
- const C = A;
598
- return o.value ? (y(), I("div", {
590
+ const C = H;
591
+ return o.value ? (M(), I("div", {
599
592
  key: 0,
600
593
  ref_key: "toolPaletteElement",
601
594
  ref: d,
602
595
  style: X([c.value]),
603
596
  class: "ml-tool-palette-dialog"
604
597
  }, [
605
- B("div", {
606
- class: le(["ml-tool-palette-dialog-layout", q(r)])
598
+ E("div", {
599
+ class: le(["ml-tool-palette-dialog-layout", j(r)])
607
600
  }, [
608
- B("div", {
601
+ E("div", {
609
602
  ref_key: "titleBarElement",
610
- ref: i,
603
+ ref: u,
611
604
  class: "ml-tool-palette-title-bar",
612
605
  style: X(h.value)
613
606
  }, [
614
- V(C, {
607
+ D(C, {
615
608
  size: 18,
616
609
  class: "ml-tool-palette-dialog-icon",
617
610
  onClick: v
618
611
  }, {
619
- default: b(() => [
620
- je
612
+ default: B(() => [
613
+ Je
621
614
  ]),
622
615
  _: 1
623
616
  }),
624
- V(Le, {
617
+ D(xe, {
625
618
  class: "ml-tool-palette-dialog-icon",
626
619
  modelValue: n.value,
627
620
  "onUpdate:modelValue": x[0] || (x[0] = (k) => n.value = k),
628
- reverse: q(p)
621
+ reverse: j(_)
629
622
  }, null, 8, ["modelValue", "reverse"]),
630
- B("span", qe, G(t.title), 1)
623
+ E("span", Ke, F(t.title), 1)
631
624
  ], 4),
632
- B("div", Je, [
625
+ E("div", Qe, [
633
626
  O(f.$slots, "default", {}, void 0, !0)
634
627
  ])
635
628
  ], 2)
636
629
  ], 4)) : oe("", !0);
637
630
  };
638
631
  }
639
- }), Qe = /* @__PURE__ */ H(Ke, [["__scopeId", "data-v-11a64c54"]]), ut = {
632
+ }), Pe = /* @__PURE__ */ A(Ze, [["__scopeId", "data-v-8645db4f"]]), ct = {
640
633
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
641
634
  install(e) {
642
- e.component("MlCollapse", N), e.component("MlDropdown", N), e.component("MlLanguage", be), e.component("MlStatusBar", $e), e.component("MlToggleButton", We), e.component("MlToolBar", De), e.component("MlToolPalette", Qe);
635
+ e.component("MlCollapse", N), e.component("MlDropdown", N), e.component("MlLanguage", Ee), e.component("MlStatusBar", We), e.component("MlToggleButton", Ve), e.component("MlToolBar", Ye), e.component("MlToolPalette", Pe);
643
636
  }
644
637
  };
645
638
  export {
646
- Le as MlCollapse,
639
+ xe as MlCollapse,
647
640
  N as MlDropdown,
648
- be as MlLanguage,
649
- $e as MlStatusBar,
650
- We as MlToggleButton,
651
- De as MlToolBar,
652
- Qe as MlToolPalette,
653
- ut as default
641
+ Ee as MlLanguage,
642
+ We as MlStatusBar,
643
+ Ve as MlToggleButton,
644
+ Ye as MlToolBar,
645
+ Pe as MlToolPalette,
646
+ ct as default
654
647
  };
@@ -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-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-3eed2087]{display:flex;flex-direction:column}.ml-horizontal-toolbar-button-group[data-v-3eed2087]{display:flex;flex-direction:row}.ml-toolbar-button[data-v-3eed2087]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px}.ml-toolbar-button-text[data-v-3eed2087]{margin-left:0;margin-top:5px}.ml-tool-palette-dialog[data-v-11a64c54]{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-11a64c54]{border-bottom:1px solid var(--el-border-color)}.ml-tool-palette-dialog-layout[data-v-11a64c54]{display:flex;height:100%}.ml-tool-palette-title-bar[data-v-11a64c54]{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-11a64c54]{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-11a64c54]{-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-11a64c54]{order:1}.ml-tool-palette-dialog-layout.left .ml-tool-palette-content[data-v-11a64c54],.ml-tool-palette-dialog-layout.right .ml-tool-palette-title-bar[data-v-11a64c54]{order:2}.ml-tool-palette-dialog-layout.right .ml-tool-palette-content[data-v-11a64c54]{order:1}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- (function(B,y){typeof exports=="object"&&typeof module<"u"?y(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/tooltip/style/css"),require("element-plus/es/components/button/style/css"),require("element-plus/es/components/button-group/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/tooltip/style/css","element-plus/es/components/button/style/css","element-plus/es/components/button-group/style/css"],y):(B=typeof globalThis<"u"?globalThis:B||self,y(B.UIComponents={},B.es,null,null,B.Vue))})(this,function(B,y,fe,ve,e){"use strict";const A={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},H=[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 X(t,i){return e.openBlock(),e.createElementBlock("svg",A,[...H])}const T={render:X},q={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},U=[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 F(t,i){return e.openBlock(),e.createElementBlock("svg",q,[...U])}const $={render:F},I=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 o=t,s=e.useModel(t,"modelValue"),l=i,n=e.computed(()=>o.reverse?s.value?T:$:s.value?$:T),c=e.computed(()=>`${o.size}px`),h=()=>{l("change",s.value),s.value=!s.value};return(a,r)=>{const d=y.ElIcon;return e.openBlock(),e.createBlock(d,{size:c.value,onClick:h},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value)))]),_:1},8,["size"])}}}),j=(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)),G=e.defineComponent({__name:"MlDropdown",props:{icon:{},items:{},current:{default:void 0}},emits:{click:null},setup(t,{emit:i}){const o=t,s=i,l=e.computed(()=>o.items.filter(c=>c.name!==o.current)),n=c=>{s("click",c)};return(c,h)=>{const a=y.ElIcon,r=y.ElDropdownItem,d=y.ElDropdownMenu,v=y.ElDropdown;return e.openBlock(),e.createBlock(v,{onCommand:n},{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(a,{size:"30",class:"ml-dropdown-icon"},{default:e.withCtx(()=>[j]),_:1})]),_:1})}}}),z=(t,i)=>{const o=t.__vccOpts||t;for(const[s,l]of i)o[s]=l;return o},V=z(G,[["__scopeId","data-v-3fc33b5d"]]),J='<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>',S=e.defineComponent({__name:"MlLanguage",props:{languages:{},current:{}},emits:{click:null},setup(t,{emit:i}){const o=t,s=i,l=n=>{s("click",n)};return(n,c)=>(e.openBlock(),e.createBlock(V,{icon:J,items:o.languages,current:o.current,onClick:l},null,8,["items","current"]))}}),K={},Q={class:"ml-status-bar"},Z={class:"ml-status-bar-left"},P={class:"ml-status-bar-right"};function R(t,i){return e.openBlock(),e.createElementBlock("div",Q,[e.createElementVNode("div",Z,[e.renderSlot(t.$slots,"left",{},void 0,!0)]),e.createElementVNode("div",P,[e.renderSlot(t.$slots,"right",{},void 0,!0)])])}const N=z(K,[["render",R],["__scopeId","data-v-d6a59cf0"]]),D=e.defineComponent({__name:"MlToggleButton",props:e.mergeModels({size:{default:"default"},type:{},data:{}},{modelValue:{default:!1},modelModifiers:{}}),emits:e.mergeModels(["click"],["update:modelValue"]),setup(t,{emit:i}){const o=t,s=e.useModel(t,"modelValue"),l=i,n=e.computed(()=>s.value?o.data.onIcon:o.data.offIcon),c=e.computed(()=>s.value?o.data.onTooltip:o.data.offTooltip),h=()=>{s.value=!s.value,l("click",s.value)};return(a,r)=>{const d=y.ElIcon,v=y.ElButton,u=y.ElTooltip;return e.openBlock(),e.createBlock(u,{content:c.value,"hide-after":0},{default:e.withCtx(()=>[e.createVNode(v,{type:o.type,size:o.size},{default:e.withCtx(()=>[e.createVNode(d,{onClick:h},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value)))]),_:1})]),_:1},8,["type","size"])]),_:1},8,["content"])}}}),ee={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 o=t,s=i,l=e.computed(()=>o.direction==="vertical"?"ml-vertical-toolbar-button-group":"ml-horizontal-toolbar-button-group"),n=e.computed(()=>o.size==="small"?20:30),c=e.computed(()=>{switch(o.size){case"small":return 30;case"medium":return 50}return 70}),h=d=>d.description?d.description:d.text,a=e.computed(()=>o.size==="large"),r=d=>{s("click",d)};return(d,v)=>{const u=y.ElIcon,p=y.ElButton,m=y.ElTooltip,f=y.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,E)=>(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:c.value+"px",height:c.value+"px"}),key:E,onClick:k=>r(g.command)},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(u,{size:n.value},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.icon)))]),_:2},1032,["size"]),a.value?(e.openBlock(),e.createElementBlock("div",ee,e.toDisplayString(g.text),1)):e.createCommentVNode("",!0)])]),_:2},1032,["style","onClick"]))]),_:2},1032,["content"]))),128))]),_:1},8,["class"])}}}),[["__scopeId","data-v-3eed2087"]]),O=20;function te(t,i,o){const s=e.ref(!1),l=a=>{if(o.value&&t.value){const r=t.value.getBoundingClientRect(),d=a.clientX<r.left||a.clientX>r.right||a.clientY<r.top||a.clientY>r.bottom;s.value=!d}},n=()=>{o.value&&(s.value=!0)},c=()=>{i.value&&i.value.addEventListener("mousemove",n),t.value&&t.value.addEventListener("mousemove",n)},h=()=>{i.value&&i.value.removeEventListener("mousemove",n),t.value&&t.value.removeEventListener("mousemove",n)};return e.onMounted(()=>{window.addEventListener("mousemove",l)}),e.onUnmounted(()=>{window.removeEventListener("mousemove",l)}),e.watch(o,a=>{a&&(s.value=!1)}),e.watch(t,a=>{a?c():h()}),{autoOpened:s}}function oe(t,i,o){const s=e.ref(!1),l=e.ref(null),n=e.ref(null),c={x:0,y:0},h=e.computed(()=>l.value==null||n.value==null?{x:0,y:0}:{x:l.value.x-n.value.x,y:l.value.y-n.value.y}),a=()=>{if(t.value){const m=t.value.getBoundingClientRect();n.value={x:m.left,y:m.top},l.value={x:m.left,y:m.top}}},r=()=>{t.value&&t.value.addEventListener("mousedown",v)},d=()=>{t.value&&t.value.removeEventListener("mousedown",v)},v=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,c.x=m.clientX,c.y=m.clientY,a(),document.addEventListener("mousemove",u),document.addEventListener("mouseup",p)}},u=m=>{if(s.value&&n.value&&l.value){const f=window.innerWidth,g=window.innerHeight,E=t.value,k=E.getBoundingClientRect(),M=k.width,w=k.height,b=n.value.x+(m.clientX-c.x),x=n.value.y+(m.clientY-c.y);l.value.x=Math.max(o?o.value.offset.value.left:0,b);const _=f-M;l.value.x=Math.min(o?_-o.value.offset.value.right:_,l.value.x),l.value.y=Math.max(o?o.value.offset.value.top:0,Math.min(x,g-w));const L=g-w;l.value.y=Math.min(o?L-o.value.offset.value.bottom:L,l.value.y),E.style.left=l.value.x+"px",E.style.top=l.value.y+"px"}},p=()=>{s.value=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",p)};return e.onMounted(()=>{t.value&&(a(),r())}),e.onUnmounted(()=>{t.value&&t.value.removeEventListener("mousedown",v)}),e.watch(t,m=>{m?(a(),r()):d()}),{isDragging:s,movement:h,position:l}}function ne(t,i,o){const s=e.ref(!1),l=e.ref("left"),{isDragging:n,movement:c,position:h}=oe(t,i,o);return e.watch(c,a=>{if(a&&t.value){const d=t.value.getBoundingClientRect();d.left<=o.value.offset.value.left?(l.value="left",s.value=!0):window.innerWidth-d.left-d.width<=o.value.offset.value.right?(l.value="right",s.value=!0):s.value=!1}}),{docked:s,orientation:l,isDragging:n,movement:c,position:h}}function le(t,i,o,s){const l=e.ref(null),n=e.ref(null),c=e.ref(null),h=e.ref(null);return e.watch(t,(a,r)=>{l.value=r}),e.watch(i,(a,r)=>{n.value=r}),e.watch(o,(a,r)=>{c.value=r}),e.watch(s,(a,r)=>{h.value=r}),{lastLeft:l,lastTop:n,lastWidth:c,lastHeight:h}}function se(t,i,o,s){const l=e.ref(t.value.width),n=e.ref(t.value.left),c=e.computed(()=>t.value.width),h=e.computed(()=>t.value.left),a=e.computed(()=>o.value?o.value.x:null);return e.watch([c,h],([r,d])=>{(l.value==null||n.value==null||i.value)&&(l.value=r,n.value=d)}),e.watch(a,r=>{s.value&&o.value&&(n.value=r)}),{left:n,width:l}}function ie(t,i=e.ref({left:0,right:0,top:0,bottom:0})){const o=e.ref({});let s=!1;const l=()=>{if(!s&&t.value){const n=t.value.getBoundingClientRect();o.value.left=Math.max(n.left,i.value.left),o.value.top=Math.max(n.top,i.value.top),o.value.width=n.width,o.value.height=n.height,s=!0}};return e.onMounted(()=>{t.value&&l()}),e.watch(t,n=>{n&&l()}),{isIntialized:s,initialRect:o}}function ce(t,i=e.ref(!1),o=e.ref(!1),s=e.ref({left:0,right:0,top:0,bottom:0}),l={width:20,height:40}){const{initialRect:n}=ie(t,s),c=e.ref(!1);let h=0,a=0,r=0,d=0,v=0;const u=5,p=e.ref(null),m=M=>{if(!(!t.value||i.value))if(c.value){const w=M.clientX-d,b=M.clientY-v;if(p.value==="left"||p.value==="left-bottom-corner"){const x=a-w;x>l.width&&(n.value.width=x,n.value.left=h+w,t.value.style.left=n.value.left+"px",t.value.style.width=n.value.width+"px")}if(p.value==="right"||p.value==="right-bottom-corner"){const x=a+w;x>l.width&&(n.value.width=x,t.value.style.width=n.value.width+"px")}if(p.value==="bottom"||p.value==="left-bottom-corner"||p.value==="right-bottom-corner"){const x=r+b;x>l.height&&(n.value.height=x,t.value.style.height=n.value.height+"px")}}else{const w=t.value.getBoundingClientRect(),b=M.clientX-w.left,x=M.clientY-w.top,_=b<=u,L=b>=w.width-u,C=x>=w.height-u;_&&C&&o.value?(t.value.style.cursor="nesw-resize",p.value="left-bottom-corner"):L&&C&&!o.value?(t.value.style.cursor="nwse-resize",p.value="right-bottom-corner"):_&&o.value?(t.value.style.cursor="ew-resize",p.value="left"):L&&!o.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=M=>{if(!t.value||!p.value)return;const w=t.value.getBoundingClientRect();d=M.clientX,v=M.clientY,a=w.width,r=w.height,h=w.left,n.value.width=a,n.value.height=r,n.value.left=w.left,n.value.top=w.top,c.value=!0,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)},g=()=>{c.value=!1,p.value=null,t.value&&(t.value.style.cursor=""),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)},E=()=>{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(()=>{E()}),e.watch(t,M=>{M?k():E()}),{rect:n,isResizing:c}}function ae(t,i,o,s){const l=()=>{if(t.value){const a=t.value;i.value?a.style.transition="width 0.3s ease-out, left 0.3s ease-out":a.style.transition="width 0.3s ease"}},n=()=>{t.value&&(t.value.style.transition="")},c=()=>{t.value&&t.value.removeEventListener("transitionend",n)},h=()=>{t.value&&t.value.addEventListener("transitionend",n)};e.onMounted(()=>{t.value&&t.value.addEventListener("transitionend",n)}),e.onBeforeUnmount(()=>{t.value&&t.value.removeEventListener("transitionend",n)}),e.watch(t,a=>{a?h():c()}),e.watch(o,()=>{l()}),e.watch(s,()=>{l()})}function re(t,i,o,s){const l=e.ref(window.innerWidth),n=e.ref(window.innerHeight),{docked:c,orientation:h,movement:a,position:r,isDragging:d}=ne(t,i,s),v=e.computed(()=>h.value==="right"),{rect:u,isResizing:p}=ce(t,o,v,s.value.offset),{width:m,left:f}=se(u,p,r,d),{lastTop:g,lastHeight:E}=le(e.computed(()=>u.value.left),e.computed(()=>u.value.top),e.computed(()=>u.value.width),e.computed(()=>u.value.height)),{autoOpened:k}=te(t,i,o);ae(t,v,o,k);const M=_=>{if(t.value){const L=t.value.getBoundingClientRect(),C=L.left+_;if(v.value){u.value.left=C;const pe=window.innerWidth-L.width-L.left;L.left<=0&&pe>=0&&_<0&&(u.value.left=Math.max(0,C)),window.innerWidth-L.width<=0&&(u.value.left=window.innerWidth-L.width)}else L.left+L.width>=window.innerWidth&&_<0&&(u.value.left=Math.max(0,C))}},w=()=>{const _=window.innerWidth-l.value;l.value=window.innerWidth,n.value=window.innerHeight,M(_)};e.onMounted(()=>{window.addEventListener("resize",w)}),e.onUnmounted(()=>{window.removeEventListener("resize",w)});const b=_=>{_?(u.value.width=O,v.value&&f.value&&m.value&&(u.value.left=f.value+m.value-O)):(u.value.width=m.value,v.value&&f.value&&m.value&&(u.value.left=f.value))},x=()=>{c.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=E.value)};return e.watch(c,()=>{x()}),e.watch(o,_=>{b(_)}),e.watch(k,_=>{o.value&&!d.value&&b(!_)}),e.watch(a,_=>{if(_&&t.value){const C=t.value.getBoundingClientRect();u.value.left=C.left,u.value.top=C.top}}),{rect:u,orientation:h,reversed:v}}const ue=(t=>(e.pushScopeId("data-v-11a64c54"),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)),de={class:"ml-tool-palette-title"},me={class:"ml-tool-palette-content"},Y=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 o=t,s=e.useModel(t,"modelValue"),l=i,n=e.ref(!1),c=e.ref(null),h=e.ref(null),a=e.computed(()=>({offset:e.ref({left:o.leftOffset,right:o.rightOffset,top:o.topOffset,bottom:o.bottomOffset})})),{rect:r,orientation:d,reversed:v}=re(h,c,n,a),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(()=>v.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 E=y.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:c,class:"ml-tool-palette-title-bar",style:e.normalizeStyle(p.value)},[e.createVNode(E,{size:18,class:"ml-tool-palette-dialog-icon",onClick:m},{default:e.withCtx(()=>[ue]),_:1}),e.createVNode(I,{class:"ml-tool-palette-dialog-icon",modelValue:n.value,"onUpdate:modelValue":g[0]||(g[0]=k=>n.value=k),reverse:e.unref(v)},null,8,["modelValue","reverse"]),e.createElementVNode("span",de,e.toDisplayString(o.title),1)],4),e.createElementVNode("div",me,[e.renderSlot(f.$slots,"default",{},void 0,!0)])],2)],4)):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-11a64c54"]]),he={install(t){t.component("MlCollapse",V),t.component("MlDropdown",V),t.component("MlLanguage",S),t.component("MlStatusBar",N),t.component("MlToggleButton",D),t.component("MlToolBar",W),t.component("MlToolPalette",Y)}};B.MlCollapse=I,B.MlDropdown=V,B.MlLanguage=S,B.MlStatusBar=N,B.MlToggleButton=D,B.MlToolBar=W,B.MlToolPalette=Y,B.default=he,Object.defineProperties(B,{__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-toggle-button[data-v-b676e93b]{border:none;padding:0;cursor:pointer;width:var(--0547f26d);height:var(--0547f26d)}.ml-vertical-toolbar-button-group[data-v-5261c686]{display:flex;flex-direction:column}.ml-horizontal-toolbar-button-group[data-v-5261c686]{display:flex;flex-direction:row}.ml-toolbar-button[data-v-5261c686]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px}.ml-toolbar-button-text[data-v-5261c686]{margin-left:0;margin-top:5px}.ml-tool-palette-dialog[data-v-8645db4f]{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-8645db4f]{border-bottom:1px solid var(--el-border-color);cursor:default}.ml-tool-palette-dialog-icon[data-v-8645db4f]:hover{color:var(--el-color-primary)}.ml-tool-palette-dialog-layout[data-v-8645db4f]{display:flex;height:100%}.ml-tool-palette-title-bar[data-v-8645db4f]{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-8645db4f]{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-8645db4f]{-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-8645db4f]{order:1}.ml-tool-palette-dialog-layout.left .ml-tool-palette-content[data-v-8645db4f],.ml-tool-palette-dialog-layout.right .ml-tool-palette-title-bar[data-v-8645db4f]{order:2}.ml-tool-palette-dialog-layout.right .ml-tool-palette-content[data-v-8645db4f]{order:1}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ (function(B,y){typeof exports=="object"&&typeof module<"u"?y(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/tooltip/style/css"),require("element-plus/es/components/button/style/css"),require("element-plus/es/components/button-group/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/tooltip/style/css","element-plus/es/components/button/style/css","element-plus/es/components/button-group/style/css"],y):(B=typeof globalThis<"u"?globalThis:B||self,y(B.UIComponents={},B.es,null,null,B.Vue))})(this,function(B,y,fe,ve,e){"use strict";const A={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},H=[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 X(t,i){return e.openBlock(),e.createElementBlock("svg",A,[...H])}const V={render:X},q={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},U=[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 F(t,i){return e.openBlock(),e.createElementBlock("svg",q,[...U])}const $={render:F},I=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 o=t,s=e.useModel(t,"modelValue"),l=i,n=e.computed(()=>o.reverse?s.value?V:$:s.value?$:V),a=e.computed(()=>`${o.size}px`),h=()=>{l("change",s.value),s.value=!s.value};return(c,r)=>{const d=y.ElIcon;return e.openBlock(),e.createBlock(d,{size:a.value,onClick:h},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value)))]),_:1},8,["size"])}}}),j=(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)),G=e.defineComponent({__name:"MlDropdown",props:{icon:{},items:{},current:{default:void 0}},emits:{click:null},setup(t,{emit:i}){const o=t,s=i,l=e.computed(()=>o.items.filter(a=>a.name!==o.current)),n=a=>{s("click",a)};return(a,h)=>{const c=y.ElIcon,r=y.ElDropdownItem,d=y.ElDropdownMenu,v=y.ElDropdown;return e.openBlock(),e.createBlock(v,{onCommand:n},{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(()=>[j]),_:1})]),_:1})}}}),z=(t,i)=>{const o=t.__vccOpts||t;for(const[s,l]of i)o[s]=l;return o},T=z(G,[["__scopeId","data-v-3fc33b5d"]]),J='<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>',S=e.defineComponent({__name:"MlLanguage",props:{languages:{},current:{}},emits:{click:null},setup(t,{emit:i}){const o=t,s=i,l=n=>{s("click",n)};return(n,a)=>(e.openBlock(),e.createBlock(T,{icon:J,items:o.languages,current:o.current,onClick:l},null,8,["items","current"]))}}),K={},Q={class:"ml-status-bar"},Z={class:"ml-status-bar-left"},P={class:"ml-status-bar-right"};function R(t,i){return e.openBlock(),e.createElementBlock("div",Q,[e.createElementVNode("div",Z,[e.renderSlot(t.$slots,"left",{},void 0,!0)]),e.createElementVNode("div",P,[e.renderSlot(t.$slots,"right",{},void 0,!0)])])}const N=z(K,[["render",R],["__scopeId","data-v-d6a59cf0"]]),W=z(e.defineComponent({__name:"MlToggleButton",props:e.mergeModels({size:{default:30},data:{}},{modelValue:{default:!1},modelModifiers:{}}),emits:e.mergeModels(["click"],["update:modelValue"]),setup(t,{emit:i}){e.useCssVars(r=>({"0547f26d":a.value}));const o=t,s=e.useModel(t,"modelValue"),l=i,n=e.computed(()=>s.value?o.data.onIcon:o.data.offIcon),a=e.computed(()=>o.size+"px"),h=e.computed(()=>s.value?o.data.onTooltip:o.data.offTooltip),c=()=>{s.value=!s.value,l("click",s.value)};return(r,d)=>{const v=y.ElButton,u=y.ElTooltip;return e.openBlock(),e.createBlock(u,{content:h.value,"hide-after":0},{default:e.withCtx(()=>[e.createVNode(v,{class:"ml-toggle-button",icon:n.value,onClick:c},null,8,["icon"])]),_:1},8,["content"])}}}),[["__scopeId","data-v-b676e93b"]]),ee={key:0,class:"ml-toolbar-button-text"},D=z(e.defineComponent({__name:"MlToolBar",props:{items:{},size:{default:"large"},direction:{}},emits:{click:null},setup(t,{emit:i}){const o=t,s=i,l=e.computed(()=>o.direction==="vertical"?"ml-vertical-toolbar-button-group":"ml-horizontal-toolbar-button-group"),n=e.computed(()=>o.size==="small"?20:30),a=e.computed(()=>{switch(o.size){case"small":return 30;case"medium":return 50}return 70}),h=d=>d.description?d.description:d.text,c=e.computed(()=>o.size==="large"),r=d=>{s("click",d)};return(d,v)=>{const u=y.ElIcon,p=y.ElButton,m=y.ElTooltip,f=y.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,E)=>(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:E,onClick:k=>r(g.command)},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(u,{size:n.value},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.icon)))]),_:2},1032,["size"]),c.value?(e.openBlock(),e.createElementBlock("div",ee,e.toDisplayString(g.text),1)):e.createCommentVNode("",!0)])]),_:2},1032,["style","onClick"]))]),_:2},1032,["content"]))),128))]),_:1},8,["class"])}}}),[["__scopeId","data-v-5261c686"]]),O=20;function te(t,i,o){const s=e.ref(!1),l=c=>{if(o.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}},n=()=>{o.value&&(s.value=!0)},a=()=>{i.value&&i.value.addEventListener("mousemove",n),t.value&&t.value.addEventListener("mousemove",n)},h=()=>{i.value&&i.value.removeEventListener("mousemove",n),t.value&&t.value.removeEventListener("mousemove",n)};return e.onMounted(()=>{window.addEventListener("mousemove",l)}),e.onUnmounted(()=>{window.removeEventListener("mousemove",l)}),e.watch(o,c=>{c&&(s.value=!1)}),e.watch(t,c=>{c?a():h()}),{autoOpened:s}}function oe(t,i,o){const s=e.ref(!1),l=e.ref(null),n=e.ref(null),a={x:0,y:0},h=e.computed(()=>l.value==null||n.value==null?{x:0,y:0}:{x:l.value.x-n.value.x,y:l.value.y-n.value.y}),c=()=>{if(t.value){const m=t.value.getBoundingClientRect();n.value={x:m.left,y:m.top},l.value={x:m.left,y:m.top}}},r=()=>{t.value&&t.value.addEventListener("mousedown",v)},d=()=>{t.value&&t.value.removeEventListener("mousedown",v)},v=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&&n.value&&l.value){const f=window.innerWidth,g=window.innerHeight,E=t.value,k=E.getBoundingClientRect(),x=k.width,w=k.height,b=n.value.x+(m.clientX-a.x),M=n.value.y+(m.clientY-a.y);l.value.x=Math.max(o?o.value.offset.value.left:0,b);const _=f-x;l.value.x=Math.min(o?_-o.value.offset.value.right:_,l.value.x),l.value.y=Math.max(o?o.value.offset.value.top:0,Math.min(M,g-w));const L=g-w;l.value.y=Math.min(o?L-o.value.offset.value.bottom:L,l.value.y),E.style.left=l.value.x+"px",E.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",v)}),e.watch(t,m=>{m?(c(),r()):d()}),{isDragging:s,movement:h,position:l}}function ne(t,i,o){const s=e.ref(!1),l=e.ref("left"),{isDragging:n,movement:a,position:h}=oe(t,i,o);return e.watch(a,c=>{if(c&&t.value){const d=t.value.getBoundingClientRect();d.left<=o.value.offset.value.left?(l.value="left",s.value=!0):window.innerWidth-d.left-d.width<=o.value.offset.value.right?(l.value="right",s.value=!0):s.value=!1}}),{docked:s,orientation:l,isDragging:n,movement:a,position:h}}function le(t,i,o,s){const l=e.ref(null),n=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)=>{n.value=r}),e.watch(o,(c,r)=>{a.value=r}),e.watch(s,(c,r)=>{h.value=r}),{lastLeft:l,lastTop:n,lastWidth:a,lastHeight:h}}function se(t,i,o,s){const l=e.ref(t.value.width),n=e.ref(t.value.left),a=e.computed(()=>t.value.width),h=e.computed(()=>t.value.left),c=e.computed(()=>o.value?o.value.x:null);return e.watch([a,h],([r,d])=>{(l.value==null||n.value==null||i.value)&&(l.value=r,n.value=d)}),e.watch(c,r=>{s.value&&o.value&&(n.value=r)}),{left:n,width:l}}function ie(t,i=e.ref({left:0,right:0,top:0,bottom:0})){const o=e.ref({});let s=!1;const l=()=>{if(!s&&t.value){const n=t.value.getBoundingClientRect();o.value.left=Math.max(n.left,i.value.left),o.value.top=Math.max(n.top,i.value.top),o.value.width=n.width,o.value.height=n.height,s=!0}};return e.onMounted(()=>{t.value&&l()}),e.watch(t,n=>{n&&l()}),{isIntialized:s,initialRect:o}}function ce(t,i=e.ref(!1),o=e.ref(!1),s=e.ref({left:0,right:0,top:0,bottom:0}),l={width:20,height:40}){const{initialRect:n}=ie(t,s),a=e.ref(!1);let h=0,c=0,r=0,d=0,v=0;const u=5,p=e.ref(null),m=x=>{if(!(!t.value||i.value))if(a.value){const w=x.clientX-d,b=x.clientY-v;if(p.value==="left"||p.value==="left-bottom-corner"){const M=c-w;M>l.width&&(n.value.width=M,n.value.left=h+w,t.value.style.left=n.value.left+"px",t.value.style.width=n.value.width+"px")}if(p.value==="right"||p.value==="right-bottom-corner"){const M=c+w;M>l.width&&(n.value.width=M,t.value.style.width=n.value.width+"px")}if(p.value==="bottom"||p.value==="left-bottom-corner"||p.value==="right-bottom-corner"){const M=r+b;M>l.height&&(n.value.height=M,t.value.style.height=n.value.height+"px")}}else{const w=t.value.getBoundingClientRect(),b=x.clientX-w.left,M=x.clientY-w.top,_=b<=u,L=b>=w.width-u,C=M>=w.height-u;_&&C&&o.value?(t.value.style.cursor="nesw-resize",p.value="left-bottom-corner"):L&&C&&!o.value?(t.value.style.cursor="nwse-resize",p.value="right-bottom-corner"):_&&o.value?(t.value.style.cursor="ew-resize",p.value="left"):L&&!o.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=x=>{if(!t.value||!p.value)return;const w=t.value.getBoundingClientRect();d=x.clientX,v=x.clientY,c=w.width,r=w.height,h=w.left,n.value.width=c,n.value.height=r,n.value.left=w.left,n.value.top=w.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)},E=()=>{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(()=>{E()}),e.watch(t,x=>{x?k():E()}),{rect:n,isResizing:a}}function ae(t,i,o,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"}},n=()=>{t.value&&(t.value.style.transition="")},a=()=>{t.value&&t.value.removeEventListener("transitionend",n)},h=()=>{t.value&&t.value.addEventListener("transitionend",n)};e.onMounted(()=>{t.value&&t.value.addEventListener("transitionend",n)}),e.onBeforeUnmount(()=>{t.value&&t.value.removeEventListener("transitionend",n)}),e.watch(t,c=>{c?h():a()}),e.watch(o,()=>{l()}),e.watch(s,()=>{l()})}function re(t,i,o,s){const l=e.ref(window.innerWidth),n=e.ref(window.innerHeight),{docked:a,orientation:h,movement:c,position:r,isDragging:d}=ne(t,i,s),v=e.computed(()=>h.value==="right"),{rect:u,isResizing:p}=ce(t,o,v,s.value.offset),{width:m,left:f}=se(u,p,r,d),{lastTop:g,lastHeight:E}=le(e.computed(()=>u.value.left),e.computed(()=>u.value.top),e.computed(()=>u.value.width),e.computed(()=>u.value.height)),{autoOpened:k}=te(t,i,o);ae(t,v,o,k);const x=_=>{if(t.value){const L=t.value.getBoundingClientRect(),C=L.left+_;if(v.value){u.value.left=C;const pe=window.innerWidth-L.width-L.left;L.left<=0&&pe>=0&&_<0&&(u.value.left=Math.max(0,C)),window.innerWidth-L.width<=0&&(u.value.left=window.innerWidth-L.width)}else L.left+L.width>=window.innerWidth&&_<0&&(u.value.left=Math.max(0,C))}},w=()=>{const _=window.innerWidth-l.value;l.value=window.innerWidth,n.value=window.innerHeight,x(_)};e.onMounted(()=>{window.addEventListener("resize",w)}),e.onUnmounted(()=>{window.removeEventListener("resize",w)});const b=_=>{_?(u.value.width=O,v.value&&f.value&&m.value&&(u.value.left=f.value+m.value-O)):(u.value.width=m.value,v.value&&f.value&&m.value&&(u.value.left=f.value))},M=()=>{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=E.value)};return e.watch(a,()=>{M()}),e.watch(o,_=>{b(_)}),e.watch(k,_=>{o.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:v}}const ue=(t=>(e.pushScopeId("data-v-8645db4f"),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)),de={class:"ml-tool-palette-title"},me={class:"ml-tool-palette-content"},Y=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 o=t,s=e.useModel(t,"modelValue"),l=i,n=e.ref(!1),a=e.ref(null),h=e.ref(null),c=e.computed(()=>({offset:e.ref({left:o.leftOffset,right:o.rightOffset,top:o.topOffset,bottom:o.bottomOffset})})),{rect:r,orientation:d,reversed:v}=re(h,a,n,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(()=>v.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 E=y.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(E,{size:18,class:"ml-tool-palette-dialog-icon",onClick:m},{default:e.withCtx(()=>[ue]),_:1}),e.createVNode(I,{class:"ml-tool-palette-dialog-icon",modelValue:n.value,"onUpdate:modelValue":g[0]||(g[0]=k=>n.value=k),reverse:e.unref(v)},null,8,["modelValue","reverse"]),e.createElementVNode("span",de,e.toDisplayString(o.title),1)],4),e.createElementVNode("div",me,[e.renderSlot(f.$slots,"default",{},void 0,!0)])],2)],4)):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-8645db4f"]]),he={install(t){t.component("MlCollapse",T),t.component("MlDropdown",T),t.component("MlLanguage",S),t.component("MlStatusBar",N),t.component("MlToggleButton",W),t.component("MlToolBar",D),t.component("MlToolPalette",Y)}};B.MlCollapse=I,B.MlDropdown=T,B.MlLanguage=S,B.MlStatusBar=N,B.MlToggleButton=W,B.MlToolBar=D,B.MlToolPalette=Y,B.default=he,Object.defineProperties(B,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mlightcad/ui-components",
3
- "version": "0.0.16",
3
+ "version": "0.1.0",
4
4
  "description": "One common UI component library based on Element Plus",
5
5
  "license": "MIT",
6
6
  "author": "MLight Lee <mlight.lee@outlook.com>",
@@ -160,6 +160,11 @@ const handleClose = () => {
160
160
 
161
161
  .ml-tool-palette-dialog-icon {
162
162
  border-bottom: 1px solid var(--el-border-color);
163
+ cursor: default; /* Override parent move cursor on icon */
164
+ }
165
+
166
+ .ml-tool-palette-dialog-icon:hover {
167
+ color: var(--el-color-primary);
163
168
  }
164
169
 
165
170
  .ml-tool-palette-dialog-layout {