@mlightcad/ui-components 0.1.4 → 0.1.5

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,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-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-4a154978]{border:none;padding:0;cursor:pointer;width:var(--7a331cae);height:var(--7a331cae)}.ml-toolbar-group[data-v-c74d9a36]{background-color:var(--el-fill-color)}.ml-sub-toolbar-group[data-v-c74d9a36]{background-color:var(--el-bg-color)}.ml-toolbar-button[data-v-c74d9a36]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px}.ml-toolbar-button-text[data-v-c74d9a36]{margin-top:5px}.ml-tool-palette-dialog[data-v-cd1a3c67]{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-disabled[data-v-cd1a3c67]{pointer-events:none;opacity:.6}.ml-tool-palette-dialog-icon[data-v-cd1a3c67]{border-bottom:1px solid var(--el-border-color);cursor:default}.ml-tool-palette-dialog-icon[data-v-cd1a3c67]:hover{color:var(--el-color-primary)}.ml-tool-palette-dialog-layout[data-v-cd1a3c67]{display:flex;height:100%}.ml-tool-palette-title-bar[data-v-cd1a3c67]{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-cd1a3c67]{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-cd1a3c67]{-webkit-user-select:none;user-select:none;flex-grow:1;display:flex;flex-direction:column;background-color:var(--el-fill-color);overflow:hidden}.ml-tool-palette-tabs[data-v-cd1a3c67]{display:flex;flex-direction:column;height:100%;flex:1}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tabs{display:flex;flex-direction:column;height:100%}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tabs__header{margin:0;border-bottom:none;order:1;flex-shrink:0;position:relative}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tabs__content{flex:1;overflow:auto;padding:0;order:2;min-height:0;position:relative}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tab-pane{height:100%;overflow:auto}.ml-tool-palette-default-content[data-v-cd1a3c67]{flex:1;overflow:auto;display:flex;flex-direction:column}.ml-tool-palette-dialog-layout.left .ml-tool-palette-title-bar[data-v-cd1a3c67]{order:1}.ml-tool-palette-dialog-layout.left .ml-tool-palette-content[data-v-cd1a3c67],.ml-tool-palette-dialog-layout.right .ml-tool-palette-title-bar[data-v-cd1a3c67]{order:2}.ml-tool-palette-dialog-layout.right .ml-tool-palette-content[data-v-cd1a3c67]{order:1}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { ElIcon as J, ElDropdownItem as ue, ElDropdownMenu as re, ElDropdown as ce, ElButton as le, ElTooltip as ne, ElButtonGroup as de, ElPopover as ve, ElTabPane as me, ElTabs as he } 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-0dbba7bb]{border:none;padding:0;cursor:pointer;width:var(--10a97421);height:var(--10a97421)}.ml-toolbar-group[data-v-64f06546]{background-color:var(--el-fill-color)}.ml-sub-toolbar-group[data-v-64f06546]{background-color:var(--el-bg-color)}.ml-toolbar-button[data-v-64f06546]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px}.ml-toolbar-button-text[data-v-64f06546]{margin-top:5px}.ml-tool-palette-dialog[data-v-cd1a3c67]{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-disabled[data-v-cd1a3c67]{pointer-events:none;opacity:.6}.ml-tool-palette-dialog-icon[data-v-cd1a3c67]{border-bottom:1px solid var(--el-border-color);cursor:default}.ml-tool-palette-dialog-icon[data-v-cd1a3c67]:hover{color:var(--el-color-primary)}.ml-tool-palette-dialog-layout[data-v-cd1a3c67]{display:flex;height:100%}.ml-tool-palette-title-bar[data-v-cd1a3c67]{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-cd1a3c67]{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-cd1a3c67]{-webkit-user-select:none;user-select:none;flex-grow:1;display:flex;flex-direction:column;background-color:var(--el-fill-color);overflow:hidden}.ml-tool-palette-tabs[data-v-cd1a3c67]{display:flex;flex-direction:column;height:100%;flex:1}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tabs{display:flex;flex-direction:column;height:100%}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tabs__header{margin:0;border-bottom:none;order:1;flex-shrink:0;position:relative}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tabs__content{flex:1;overflow:auto;padding:0;order:2;min-height:0;position:relative}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tab-pane{height:100%;overflow:auto}.ml-tool-palette-default-content[data-v-cd1a3c67]{flex:1;overflow:auto;display:flex;flex-direction:column}.ml-tool-palette-dialog-layout.left .ml-tool-palette-title-bar[data-v-cd1a3c67]{order:1}.ml-tool-palette-dialog-layout.left .ml-tool-palette-content[data-v-cd1a3c67],.ml-tool-palette-dialog-layout.right .ml-tool-palette-title-bar[data-v-cd1a3c67]{order:2}.ml-tool-palette-dialog-layout.right .ml-tool-palette-content[data-v-cd1a3c67]{order:1}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { ElIcon as Q, ElDropdownItem as ve, ElDropdownMenu as me, ElDropdown as he, ElButton as ae, ElTooltip as ie, ElButtonGroup as fe, ElPopover as pe, ElTabPane as ge, ElTabs as _e } 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 _, createElementBlock as V, createElementVNode as k, defineComponent as H, mergeModels as A, useModel as G, computed as M, createBlock as B, withCtx as x, resolveDynamicComponent as N, createVNode as I, Fragment as O, renderList as j, createTextVNode as fe, toDisplayString as Y, pushScopeId as oe, popScopeId as se, renderSlot as q, useCssVars as pe, ref as g, normalizeStyle as X, createCommentVNode as F, onMounted as D, onUnmounted as Q, watch as E, onBeforeUnmount as ae, normalizeClass as Z, unref as P } from "vue";
5
+ import { openBlock as f, createElementBlock as W, createElementVNode as C, defineComponent as H, mergeModels as A, useModel as q, computed as M, createBlock as B, withCtx as L, resolveDynamicComponent as G, createVNode as $, Fragment as U, renderList as J, createTextVNode as we, toDisplayString as Y, pushScopeId as ue, popScopeId as re, renderSlot as K, useCssVars as be, ref as g, watch as z, normalizeStyle as N, createCommentVNode as j, onMounted as O, onUnmounted as R, onBeforeUnmount as ce, normalizeClass as te, unref as le } 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";
@@ -12,35 +12,35 @@ import "element-plus/es/components/popover/style/css";
12
12
  import "element-plus/es/components/button-group/style/css";
13
13
  import "element-plus/es/components/tabs/style/css";
14
14
  import "element-plus/es/components/tab-pane/style/css";
15
- const _e = {
15
+ const xe = {
16
16
  xmlns: "http://www.w3.org/2000/svg",
17
17
  width: "1em",
18
18
  height: "1em",
19
19
  viewBox: "0 0 1024 1024"
20
- }, we = /* @__PURE__ */ k("path", {
20
+ }, Le = /* @__PURE__ */ C("path", {
21
21
  fill: "currentColor",
22
22
  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"
23
- }, null, -1), ge = [
24
- we
23
+ }, null, -1), Me = [
24
+ Le
25
25
  ];
26
- function be(e, u) {
27
- return _(), V("svg", _e, [...ge]);
26
+ function ye(e, u) {
27
+ return f(), W("svg", xe, [...Me]);
28
28
  }
29
- const R = { render: be }, Le = {
29
+ const oe = { render: ye }, ze = {
30
30
  xmlns: "http://www.w3.org/2000/svg",
31
31
  width: "1em",
32
32
  height: "1em",
33
33
  viewBox: "0 0 1024 1024"
34
- }, xe = /* @__PURE__ */ k("path", {
34
+ }, Ee = /* @__PURE__ */ C("path", {
35
35
  fill: "currentColor",
36
36
  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"
37
- }, null, -1), Me = [
38
- xe
37
+ }, null, -1), Te = [
38
+ Ee
39
39
  ];
40
- function ye(e, u) {
41
- return _(), V("svg", Le, [...Me]);
40
+ function Ce(e, u) {
41
+ return f(), W("svg", ze, [...Te]);
42
42
  }
43
- const ee = { render: ye }, ze = /* @__PURE__ */ H({
43
+ const ne = { render: Ce }, ke = /* @__PURE__ */ H({
44
44
  __name: "MlCollapse",
45
45
  props: /* @__PURE__ */ A({
46
46
  size: { default: 18 },
@@ -51,34 +51,34 @@ const ee = { render: ye }, ze = /* @__PURE__ */ H({
51
51
  }),
52
52
  emits: /* @__PURE__ */ A(["change"], ["update:modelValue"]),
53
53
  setup(e, { emit: u }) {
54
- const t = e, o = G(e, "modelValue"), n = u, l = M(() => t.reverse ? o.value ? R : ee : o.value ? ee : R), i = M(() => `${t.size}px`), m = () => {
55
- n("change", o.value), o.value = !o.value;
54
+ const t = e, s = q(e, "modelValue"), n = u, o = M(() => t.reverse ? s.value ? oe : ne : s.value ? ne : oe), i = M(() => `${t.size}px`), m = () => {
55
+ n("change", s.value), s.value = !s.value;
56
56
  };
57
57
  return (a, r) => {
58
- const p = J;
59
- return _(), B(p, {
58
+ const h = Q;
59
+ return f(), B(h, {
60
60
  size: i.value,
61
61
  onClick: m
62
62
  }, {
63
- default: x(() => [
64
- (_(), B(N(l.value)))
63
+ default: L(() => [
64
+ (f(), B(G(o.value)))
65
65
  ]),
66
66
  _: 1
67
67
  }, 8, ["size"]);
68
68
  };
69
69
  }
70
- }), Ee = (e) => (oe("data-v-3fc33b5d"), e = e(), se(), e), Ce = /* @__PURE__ */ Ee(() => /* @__PURE__ */ k("svg", {
70
+ }), Be = (e) => (ue("data-v-3fc33b5d"), e = e(), re(), e), $e = /* @__PURE__ */ Be(() => /* @__PURE__ */ C("svg", {
71
71
  preserveAspectRatio: "xMidYMid meet",
72
72
  viewBox: "0 0 24 24",
73
73
  width: "1.2em",
74
74
  height: "1.2em",
75
75
  "data-v-63d067da": ""
76
76
  }, [
77
- /* @__PURE__ */ k("path", {
77
+ /* @__PURE__ */ C("path", {
78
78
  fill: "currentColor",
79
79
  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"
80
80
  })
81
- ], -1)), Te = /* @__PURE__ */ H({
81
+ ], -1)), We = /* @__PURE__ */ H({
82
82
  __name: "MlDropdown",
83
83
  props: {
84
84
  icon: {},
@@ -89,21 +89,21 @@ const ee = { render: ye }, ze = /* @__PURE__ */ H({
89
89
  click: null
90
90
  },
91
91
  setup(e, { emit: u }) {
92
- const t = e, o = u, n = M(() => t.items.filter((i) => i.name !== t.current)), l = (i) => {
93
- o("click", i);
92
+ const t = e, s = u, n = M(() => t.items.filter((i) => i.name !== t.current)), o = (i) => {
93
+ s("click", i);
94
94
  };
95
95
  return (i, m) => {
96
- const a = J, r = ue, p = re, L = ce;
97
- return _(), B(L, { onCommand: l }, {
98
- dropdown: x(() => [
99
- I(p, null, {
100
- default: x(() => [
101
- (_(!0), V(O, null, j(n.value, (c) => (_(), B(r, {
102
- key: c.text,
103
- command: c.name
96
+ const a = Q, r = ve, h = me, x = he;
97
+ return f(), B(x, { onCommand: o }, {
98
+ dropdown: L(() => [
99
+ $(h, null, {
100
+ default: L(() => [
101
+ (f(!0), W(U, null, J(n.value, (d) => (f(), B(r, {
102
+ key: d.text,
103
+ command: d.name
104
104
  }, {
105
- default: x(() => [
106
- fe(Y(c.text), 1)
105
+ default: L(() => [
106
+ we(Y(d.text), 1)
107
107
  ]),
108
108
  _: 2
109
109
  }, 1032, ["command"]))), 128))
@@ -111,13 +111,13 @@ const ee = { render: ye }, ze = /* @__PURE__ */ H({
111
111
  _: 1
112
112
  })
113
113
  ]),
114
- default: x(() => [
115
- I(a, {
114
+ default: L(() => [
115
+ $(a, {
116
116
  size: "30",
117
117
  class: "ml-dropdown-icon"
118
118
  }, {
119
- default: x(() => [
120
- Ce
119
+ default: L(() => [
120
+ $e
121
121
  ]),
122
122
  _: 1
123
123
  })
@@ -126,12 +126,12 @@ const ee = { render: ye }, ze = /* @__PURE__ */ H({
126
126
  });
127
127
  };
128
128
  }
129
- }), U = (e, u) => {
129
+ }), F = (e, u) => {
130
130
  const t = e.__vccOpts || e;
131
- for (const [o, n] of u)
132
- t[o] = n;
131
+ for (const [s, n] of u)
132
+ t[s] = n;
133
133
  return t;
134
- }, K = /* @__PURE__ */ U(Te, [["__scopeId", "data-v-3fc33b5d"]]), ke = '<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__ */ H({
134
+ }, P = /* @__PURE__ */ F(We, [["__scopeId", "data-v-3fc33b5d"]]), Ie = '<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>', Ve = /* @__PURE__ */ H({
135
135
  __name: "MlLanguage",
136
136
  props: {
137
137
  languages: {},
@@ -141,28 +141,28 @@ const ee = { render: ye }, ze = /* @__PURE__ */ H({
141
141
  click: null
142
142
  },
143
143
  setup(e, { emit: u }) {
144
- const t = e, o = u, n = (l) => {
145
- o("click", l);
144
+ const t = e, s = u, n = (o) => {
145
+ s("click", o);
146
146
  };
147
- return (l, i) => (_(), B(K, {
148
- icon: ke,
147
+ return (o, i) => (f(), B(P, {
148
+ icon: Ie,
149
149
  items: t.languages,
150
150
  current: t.current,
151
151
  onClick: n
152
152
  }, null, 8, ["items", "current"]));
153
153
  }
154
- }), $e = {}, We = { class: "ml-status-bar" }, Ie = { class: "ml-status-bar-left" }, Ve = { class: "ml-status-bar-right" };
155
- function Se(e, u) {
156
- return _(), V("div", We, [
157
- k("div", Ie, [
158
- q(e.$slots, "left", {}, void 0, !0)
154
+ }), Se = {}, De = { class: "ml-status-bar" }, Oe = { class: "ml-status-bar-left" }, Ye = { class: "ml-status-bar-right" };
155
+ function Ae(e, u) {
156
+ return f(), W("div", De, [
157
+ C("div", Oe, [
158
+ K(e.$slots, "left", {}, void 0, !0)
159
159
  ]),
160
- k("div", Ve, [
161
- q(e.$slots, "right", {}, void 0, !0)
160
+ C("div", Ye, [
161
+ K(e.$slots, "right", {}, void 0, !0)
162
162
  ])
163
163
  ]);
164
164
  }
165
- const De = /* @__PURE__ */ U($e, [["render", Se], ["__scopeId", "data-v-d6a59cf0"]]), Ye = /* @__PURE__ */ H({
165
+ const He = /* @__PURE__ */ F(Se, [["render", Ae], ["__scopeId", "data-v-d6a59cf0"]]), Xe = /* @__PURE__ */ H({
166
166
  __name: "MlToggleButton",
167
167
  props: /* @__PURE__ */ A({
168
168
  size: { default: 30 },
@@ -173,22 +173,22 @@ const De = /* @__PURE__ */ U($e, [["render", Se], ["__scopeId", "data-v-d6a59cf0
173
173
  }),
174
174
  emits: /* @__PURE__ */ A(["click"], ["update:modelValue"]),
175
175
  setup(e, { emit: u }) {
176
- pe((r) => ({
177
- "7a331cae": i.value
176
+ be((r) => ({
177
+ "10a97421": i.value
178
178
  }));
179
- const t = e, o = G(e, "modelValue"), n = u, l = M(() => o.value ? t.data.onIcon : t.data.offIcon), i = M(() => t.size + "px"), m = M(() => o.value ? t.data.onTooltip : t.data.offTooltip), a = () => {
180
- o.value = !o.value, n("click", o.value);
179
+ const t = e, s = q(e, "modelValue"), n = u, o = M(() => s.value ? t.data.onIcon : t.data.offIcon), i = M(() => t.size + "px"), m = M(() => s.value ? t.data.onTooltip : t.data.offTooltip), a = () => {
180
+ s.value = !s.value, n("click", s.value);
181
181
  };
182
- return (r, p) => {
183
- const L = le, c = ne;
184
- return _(), B(c, {
182
+ return (r, h) => {
183
+ const x = ae, d = ie;
184
+ return f(), B(d, {
185
185
  content: m.value,
186
186
  "hide-after": 0
187
187
  }, {
188
- default: x(() => [
189
- I(L, {
188
+ default: L(() => [
189
+ $(x, {
190
190
  class: "ml-toggle-button",
191
- icon: l.value,
191
+ icon: o.value,
192
192
  onClick: a
193
193
  }, null, 8, ["icon"])
194
194
  ]),
@@ -196,16 +196,16 @@ const De = /* @__PURE__ */ U($e, [["render", Se], ["__scopeId", "data-v-d6a59cf0
196
196
  }, 8, ["content"]);
197
197
  };
198
198
  }
199
- }), Ae = /* @__PURE__ */ U(Ye, [["__scopeId", "data-v-4a154978"]]), He = {
199
+ }), Ue = /* @__PURE__ */ F(Xe, [["__scopeId", "data-v-0dbba7bb"]]), Ne = {
200
200
  key: 0,
201
201
  class: "ml-toolbar-button-text"
202
- }, Oe = {
202
+ }, Fe = {
203
203
  key: 0,
204
204
  class: "ml-toolbar-button-text"
205
- }, Xe = {
205
+ }, Ge = {
206
206
  key: 0,
207
207
  class: "ml-toolbar-button-text"
208
- }, Ue = /* @__PURE__ */ H({
208
+ }, je = /* @__PURE__ */ H({
209
209
  __name: "MlToolBar",
210
210
  props: {
211
211
  items: {},
@@ -213,70 +213,84 @@ const De = /* @__PURE__ */ U($e, [["render", Se], ["__scopeId", "data-v-d6a59cf0
213
213
  direction: { default: "horizontal" },
214
214
  placement: {}
215
215
  },
216
- emits: ["click"],
216
+ emits: ["click", "toggle"],
217
217
  setup(e, { emit: u }) {
218
- const t = e, o = u, n = M(() => t.size === "small" ? 20 : 30), l = M(() => t.size === "small" ? 30 : t.size === "medium" ? 50 : 70), i = M(() => t.size === "large"), m = (d) => d.description ?? d.text, a = g(null), r = (d) => {
219
- a.value = d;
220
- }, p = () => {
221
- a.value = null;
222
- }, L = (d) => {
223
- d && o("click", d);
224
- }, c = (d) => {
225
- d && o("click", d), p();
226
- }, b = M(() => {
227
- const d = "right-start", $ = "bottom-start";
228
- return t.placement && (t.direction === "vertical" && (t.placement.startsWith("left") || t.placement.startsWith("right")) || t.direction === "horizontal" && (t.placement.startsWith("top") || t.placement.startsWith("bottom"))) ? t.placement : t.direction === "vertical" ? d : $;
229
- }), h = (d) => t.direction === "horizontal" && d.children ? d.children.length * l.value : l.value, T = (d) => t.direction === "vertical" && d.children ? l.value : 0;
230
- return (d, $) => {
231
- const W = J, C = le, s = ne, f = de, y = ve;
232
- return _(), B(f, {
218
+ const t = e, s = u, n = M(() => t.size === "small" ? 20 : 30), o = M(() => t.size === "small" ? 30 : t.size === "medium" ? 50 : 70), i = M(() => t.size === "large"), m = g(null), a = (l) => {
219
+ m.value = l;
220
+ }, r = () => {
221
+ m.value = null;
222
+ }, h = g({});
223
+ z(
224
+ () => t.items,
225
+ (l) => {
226
+ l.forEach((c) => {
227
+ c.toggle && h.value[c.command] === void 0 && (h.value[c.command] = c.toggle.value ?? !1);
228
+ });
229
+ },
230
+ { immediate: !0 }
231
+ );
232
+ const x = (l) => {
233
+ if (l.toggle) {
234
+ const c = !h.value[l.command];
235
+ h.value[l.command] = c, s("toggle", l.command, c);
236
+ } else
237
+ s("click", l.command);
238
+ }, d = (l) => {
239
+ l && s("click", l), r();
240
+ }, p = (l) => !!l.toggle && h.value[l.command], v = (l) => l.toggle ? p(l) ? l.toggle.on.icon : l.toggle.off.icon : l.icon, E = (l) => l.toggle ? p(l) ? l.toggle.on.text : l.toggle.off.text : l.text, k = (l) => l.toggle ? p(l) ? l.toggle.on.description ?? l.toggle.on.text : l.toggle.off.description ?? l.toggle.off.text : l.description ?? l.text, I = M(() => {
241
+ const l = "right-start", c = "bottom-start";
242
+ return t.placement && (t.direction === "vertical" && (t.placement.startsWith("left") || t.placement.startsWith("right")) || t.direction === "horizontal" && (t.placement.startsWith("top") || t.placement.startsWith("bottom"))) ? t.placement : t.direction === "vertical" ? l : c;
243
+ }), V = (l) => t.direction === "horizontal" && l.children ? l.children.length * o.value : o.value, T = (l) => t.direction === "vertical" && l.children ? o.value : 0;
244
+ return (l, c) => {
245
+ const w = Q, b = ae, y = ie, _ = fe, Z = pe;
246
+ return f(), B(_, {
233
247
  class: "ml-toolbar-group",
234
- direction: d.direction
248
+ direction: l.direction
235
249
  }, {
236
- default: x(() => [
237
- (_(!0), V(O, null, j(d.items, (v, z) => {
238
- var w;
239
- return _(), V(O, { key: z }, [
240
- (w = v.children) != null && w.length ? (_(), B(y, {
250
+ default: L(() => [
251
+ (f(!0), W(U, null, J(l.items, (S, X) => {
252
+ var ee;
253
+ return f(), W(U, { key: X }, [
254
+ (ee = S.children) != null && ee.length ? (f(), B(Z, {
241
255
  key: 0,
242
- visible: a.value === z,
256
+ visible: m.value === X,
243
257
  trigger: "manual",
244
- placement: b.value,
258
+ placement: I.value,
245
259
  "show-arrow": !0,
246
260
  teleported: !0,
247
261
  "popper-style": {
248
- minWidth: h(v) + "px",
249
- maxWidth: T(v) + "px",
262
+ minWidth: V(S) + "px",
263
+ maxWidth: T(S) + "px",
250
264
  "--el-popover-padding": "0px",
251
265
  "--el-popover-border-width": "0px",
252
266
  "--el-popover-border-color": "transparent"
253
267
  },
254
- onMouseenter: (S) => r(z),
255
- onMouseleave: p
268
+ onMouseenter: (D) => a(X),
269
+ onMouseleave: r
256
270
  }, {
257
- reference: x(() => [
258
- I(C, {
271
+ reference: L(() => [
272
+ $(b, {
259
273
  class: "ml-toolbar-button",
260
- style: X({ width: l.value + "px", height: l.value + "px" }),
261
- onMouseenter: (S) => r(z),
262
- onMouseleave: p
274
+ style: N({ width: o.value + "px", height: o.value + "px" }),
275
+ onMouseenter: (D) => a(X),
276
+ onMouseleave: r
263
277
  }, {
264
- default: x(() => [
265
- I(s, {
266
- content: m(v),
278
+ default: L(() => [
279
+ $(y, {
280
+ content: k(S),
267
281
  "auto-close": 3e3,
268
282
  "show-after": 1e3,
269
283
  "hide-after": 0
270
284
  }, {
271
- default: x(() => [
272
- k("div", null, [
273
- I(W, { size: n.value }, {
274
- default: x(() => [
275
- (_(), B(N(v.icon)))
285
+ default: L(() => [
286
+ C("div", null, [
287
+ $(w, { size: n.value }, {
288
+ default: L(() => [
289
+ (f(), B(G(v(S))))
276
290
  ]),
277
291
  _: 2
278
292
  }, 1032, ["size"]),
279
- i.value ? (_(), V("div", Oe, Y(v.text), 1)) : F("", !0)
293
+ i.value ? (f(), W("div", Fe, Y(E(S)), 1)) : j("", !0)
280
294
  ])
281
295
  ]),
282
296
  _: 2
@@ -285,36 +299,36 @@ const De = /* @__PURE__ */ U($e, [["render", Se], ["__scopeId", "data-v-d6a59cf0
285
299
  _: 2
286
300
  }, 1032, ["style", "onMouseenter"])
287
301
  ]),
288
- default: x(() => [
289
- I(f, {
302
+ default: L(() => [
303
+ $(_, {
290
304
  class: "ml-sub-toolbar-group",
291
- direction: d.direction,
292
- onMouseenter: (S) => r(z),
293
- onMouseleave: p
305
+ direction: l.direction,
306
+ onMouseenter: (D) => a(X),
307
+ onMouseleave: r
294
308
  }, {
295
- default: x(() => [
296
- (_(!0), V(O, null, j(v.children, (S, ie) => (_(), B(s, {
297
- key: ie,
298
- content: m(S),
309
+ default: L(() => [
310
+ (f(!0), W(U, null, J(S.children, (D, de) => (f(), B(y, {
311
+ key: de,
312
+ content: k(D),
299
313
  "auto-close": 3e3,
300
314
  "show-after": 1e3,
301
315
  "hide-after": 0
302
316
  }, {
303
- default: x(() => [
304
- I(C, {
317
+ default: L(() => [
318
+ $(b, {
305
319
  class: "ml-toolbar-button",
306
- style: X({ width: l.value + "px", height: l.value + "px" }),
307
- onClick: (at) => c(S.command)
320
+ style: N({ width: o.value + "px", height: o.value + "px" }),
321
+ onClick: (ct) => d(D.command)
308
322
  }, {
309
- default: x(() => [
310
- k("div", null, [
311
- I(W, { size: n.value }, {
312
- default: x(() => [
313
- (_(), B(N(S.icon)))
323
+ default: L(() => [
324
+ C("div", null, [
325
+ $(w, { size: n.value }, {
326
+ default: L(() => [
327
+ (f(), B(G(v(D))))
314
328
  ]),
315
329
  _: 2
316
330
  }, 1032, ["size"]),
317
- i.value ? (_(), V("div", He, Y(S.text), 1)) : F("", !0)
331
+ i.value ? (f(), W("div", Ne, Y(E(D)), 1)) : j("", !0)
318
332
  ])
319
333
  ]),
320
334
  _: 2
@@ -327,28 +341,28 @@ const De = /* @__PURE__ */ U($e, [["render", Se], ["__scopeId", "data-v-d6a59cf0
327
341
  }, 1032, ["direction", "onMouseenter"])
328
342
  ]),
329
343
  _: 2
330
- }, 1032, ["visible", "placement", "popper-style", "onMouseenter"])) : (_(), B(s, {
344
+ }, 1032, ["visible", "placement", "popper-style", "onMouseenter"])) : (f(), B(y, {
331
345
  key: 1,
332
- content: m(v),
346
+ content: k(S),
333
347
  "auto-close": 3e3,
334
348
  "show-after": 1e3,
335
349
  "hide-after": 0
336
350
  }, {
337
- default: x(() => [
338
- I(C, {
351
+ default: L(() => [
352
+ $(b, {
339
353
  class: "ml-toolbar-button",
340
- style: X({ width: l.value + "px", height: l.value + "px" }),
341
- onClick: (S) => L(v.command)
354
+ style: N({ width: o.value + "px", height: o.value + "px" }),
355
+ onClick: (D) => x(S)
342
356
  }, {
343
- default: x(() => [
344
- k("div", null, [
345
- I(W, { size: n.value }, {
346
- default: x(() => [
347
- (_(), B(N(v.icon)))
357
+ default: L(() => [
358
+ C("div", null, [
359
+ $(w, { size: n.value }, {
360
+ default: L(() => [
361
+ (f(), B(G(v(S))))
348
362
  ]),
349
363
  _: 2
350
364
  }, 1032, ["size"]),
351
- i.value ? (_(), V("div", Xe, Y(v.text), 1)) : F("", !0)
365
+ i.value ? (f(), W("div", Ge, Y(E(S)), 1)) : j("", !0)
352
366
  ])
353
367
  ]),
354
368
  _: 2
@@ -363,295 +377,295 @@ const De = /* @__PURE__ */ U($e, [["render", Se], ["__scopeId", "data-v-d6a59cf0
363
377
  }, 8, ["direction"]);
364
378
  };
365
379
  }
366
- }), Ne = /* @__PURE__ */ U(Ue, [["__scopeId", "data-v-c74d9a36"]]), te = 20;
367
- function Fe(e, u, t) {
368
- const o = g(!1), n = (a) => {
380
+ }), qe = /* @__PURE__ */ F(je, [["__scopeId", "data-v-64f06546"]]), se = 20;
381
+ function Je(e, u, t) {
382
+ const s = g(!1), n = (a) => {
369
383
  if (t.value && e.value) {
370
- const r = e.value.getBoundingClientRect(), p = a.clientX < r.left || a.clientX > r.right || a.clientY < r.top || a.clientY > r.bottom;
371
- o.value = !p;
384
+ const r = e.value.getBoundingClientRect(), h = a.clientX < r.left || a.clientX > r.right || a.clientY < r.top || a.clientY > r.bottom;
385
+ s.value = !h;
372
386
  }
373
- }, l = () => {
374
- t.value && (o.value = !0);
387
+ }, o = () => {
388
+ t.value && (s.value = !0);
375
389
  }, i = () => {
376
- u.value && u.value.addEventListener("mousemove", l), e.value && e.value.addEventListener("mousemove", l);
390
+ u.value && u.value.addEventListener("mousemove", o), e.value && e.value.addEventListener("mousemove", o);
377
391
  }, m = () => {
378
- u.value && u.value.removeEventListener("mousemove", l), e.value && e.value.removeEventListener("mousemove", l);
392
+ u.value && u.value.removeEventListener("mousemove", o), e.value && e.value.removeEventListener("mousemove", o);
379
393
  };
380
- return D(() => {
394
+ return O(() => {
381
395
  window.addEventListener("mousemove", n);
382
- }), Q(() => {
396
+ }), R(() => {
383
397
  window.removeEventListener("mousemove", n);
384
- }), E(t, (a) => {
385
- a && (o.value = !1);
386
- }), E(e, (a) => {
398
+ }), z(t, (a) => {
399
+ a && (s.value = !1);
400
+ }), z(e, (a) => {
387
401
  a ? i() : m();
388
- }), { autoOpened: o };
402
+ }), { autoOpened: s };
389
403
  }
390
- function Ge(e, u, t) {
391
- const o = g(!1), n = g(null), l = g(null), i = { x: 0, y: 0 }, m = M(() => n.value == null || l.value == null ? { x: 0, y: 0 } : {
392
- x: n.value.x - l.value.x,
393
- y: n.value.y - l.value.y
404
+ function Ke(e, u, t) {
405
+ const s = g(!1), n = g(null), o = g(null), i = { x: 0, y: 0 }, m = M(() => n.value == null || o.value == null ? { x: 0, y: 0 } : {
406
+ x: n.value.x - o.value.x,
407
+ y: n.value.y - o.value.y
394
408
  }), a = () => {
395
409
  if (e.value) {
396
- const h = e.value.getBoundingClientRect();
397
- l.value = {
398
- x: h.left,
399
- y: h.top
410
+ const v = e.value.getBoundingClientRect();
411
+ o.value = {
412
+ x: v.left,
413
+ y: v.top
400
414
  }, n.value = {
401
- x: h.left,
402
- y: h.top
415
+ x: v.left,
416
+ y: v.top
403
417
  };
404
418
  }
405
419
  }, r = () => {
406
- e.value && e.value.addEventListener("mousedown", L);
407
- }, p = () => {
408
- e.value && e.value.removeEventListener("mousedown", L);
409
- }, L = (h) => {
420
+ e.value && e.value.addEventListener("mousedown", x);
421
+ }, h = () => {
422
+ e.value && e.value.removeEventListener("mousedown", x);
423
+ }, x = (v) => {
410
424
  if (e.value != null) {
411
425
  if (u && u.value) {
412
- const T = u.value.getBoundingClientRect();
413
- if (h.clientX < T.left || h.clientX > T.right || h.clientY < T.top || h.clientY > T.bottom) return;
426
+ const E = u.value.getBoundingClientRect();
427
+ if (v.clientX < E.left || v.clientX > E.right || v.clientY < E.top || v.clientY > E.bottom) return;
414
428
  }
415
- o.value = !0, i.x = h.clientX, i.y = h.clientY, a(), document.addEventListener("mousemove", c), document.addEventListener("mouseup", b);
429
+ s.value = !0, i.x = v.clientX, i.y = v.clientY, a(), document.addEventListener("mousemove", d), document.addEventListener("mouseup", p);
416
430
  }
417
- }, c = (h) => {
418
- if (o.value && l.value && n.value) {
419
- const T = window.innerWidth, d = window.innerHeight, $ = e.value, W = $.getBoundingClientRect(), C = W.width, s = W.height, f = l.value.x + (h.clientX - i.x), y = l.value.y + (h.clientY - i.y);
431
+ }, d = (v) => {
432
+ if (s.value && o.value && n.value) {
433
+ const E = window.innerWidth, k = window.innerHeight, I = e.value, V = I.getBoundingClientRect(), T = V.width, l = V.height, c = o.value.x + (v.clientX - i.x), w = o.value.y + (v.clientY - i.y);
420
434
  n.value.x = Math.max(
421
435
  t ? t.value.offset.value.left : 0,
422
- f
436
+ c
423
437
  );
424
- const v = T - C;
438
+ const b = E - T;
425
439
  n.value.x = Math.min(
426
- t ? v - t.value.offset.value.right : v,
440
+ t ? b - t.value.offset.value.right : b,
427
441
  n.value.x
428
442
  ), n.value.y = Math.max(
429
443
  t ? t.value.offset.value.top : 0,
430
- Math.min(y, d - s)
444
+ Math.min(w, k - l)
431
445
  );
432
- const z = d - s;
446
+ const y = k - l;
433
447
  n.value.y = Math.min(
434
- t ? z - t.value.offset.value.bottom : z,
448
+ t ? y - t.value.offset.value.bottom : y,
435
449
  n.value.y
436
- ), $.style.left = n.value.x + "px", $.style.top = n.value.y + "px";
450
+ ), I.style.left = n.value.x + "px", I.style.top = n.value.y + "px";
437
451
  }
438
- }, b = () => {
439
- o.value = !1, document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", b);
452
+ }, p = () => {
453
+ s.value = !1, document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", p);
440
454
  };
441
- return D(() => {
455
+ return O(() => {
442
456
  e.value && (a(), r());
443
- }), Q(() => {
444
- e.value && e.value.removeEventListener("mousedown", L);
445
- }), E(e, (h) => {
446
- h ? (a(), r()) : p();
457
+ }), R(() => {
458
+ e.value && e.value.removeEventListener("mousedown", x);
459
+ }), z(e, (v) => {
460
+ v ? (a(), r()) : h();
447
461
  }), {
448
- isDragging: o,
462
+ isDragging: s,
449
463
  movement: m,
450
464
  position: n
451
465
  };
452
466
  }
453
- function je(e, u, t) {
454
- const o = g(!1), n = g("left"), { isDragging: l, movement: i, position: m } = Ge(
467
+ function Qe(e, u, t) {
468
+ const s = g(!1), n = g("left"), { isDragging: o, movement: i, position: m } = Ke(
455
469
  e,
456
470
  u,
457
471
  t
458
472
  );
459
- return E(i, (a) => {
473
+ return z(i, (a) => {
460
474
  if (a && e.value) {
461
- const p = e.value.getBoundingClientRect();
462
- p.left <= t.value.offset.value.left ? (n.value = "left", o.value = !0) : window.innerWidth - p.left - p.width <= t.value.offset.value.right ? (n.value = "right", o.value = !0) : o.value = !1;
475
+ const h = e.value.getBoundingClientRect();
476
+ h.left <= t.value.offset.value.left ? (n.value = "left", s.value = !0) : window.innerWidth - h.left - h.width <= t.value.offset.value.right ? (n.value = "right", s.value = !0) : s.value = !1;
463
477
  }
464
478
  }), {
465
- docked: o,
479
+ docked: s,
466
480
  orientation: n,
467
- isDragging: l,
481
+ isDragging: o,
468
482
  movement: i,
469
483
  position: m
470
484
  };
471
485
  }
472
- function qe(e, u, t, o) {
473
- const n = g(null), l = g(null), i = g(null), m = g(null);
474
- return E(e, (a, r) => {
486
+ function Ze(e, u, t, s) {
487
+ const n = g(null), o = g(null), i = g(null), m = g(null);
488
+ return z(e, (a, r) => {
475
489
  n.value = r;
476
- }), E(u, (a, r) => {
477
- l.value = r;
478
- }), E(t, (a, r) => {
490
+ }), z(u, (a, r) => {
491
+ o.value = r;
492
+ }), z(t, (a, r) => {
479
493
  i.value = r;
480
- }), E(o, (a, r) => {
494
+ }), z(s, (a, r) => {
481
495
  m.value = r;
482
496
  }), {
483
497
  lastLeft: n,
484
- lastTop: l,
498
+ lastTop: o,
485
499
  lastWidth: i,
486
500
  lastHeight: m
487
501
  };
488
502
  }
489
- function Je(e, u, t, o) {
490
- const n = g(e.value.width), l = g(e.value.left), i = M(() => e.value.width), m = M(() => e.value.left), a = M(() => t.value ? t.value.x : null);
491
- return E([i, m], ([r, p]) => {
492
- (n.value == null || l.value == null || u.value) && (n.value = r, l.value = p);
493
- }), E(a, (r) => {
494
- o.value && t.value && (l.value = r);
495
- }), { left: l, width: n };
503
+ function Pe(e, u, t, s) {
504
+ const n = g(e.value.width), o = g(e.value.left), i = M(() => e.value.width), m = M(() => e.value.left), a = M(() => t.value ? t.value.x : null);
505
+ return z([i, m], ([r, h]) => {
506
+ (n.value == null || o.value == null || u.value) && (n.value = r, o.value = h);
507
+ }), z(a, (r) => {
508
+ s.value && t.value && (o.value = r);
509
+ }), { left: o, width: n };
496
510
  }
497
- function Ke(e, u = g({ left: 0, right: 0, top: 0, bottom: 0 })) {
511
+ function Re(e, u = g({ left: 0, right: 0, top: 0, bottom: 0 })) {
498
512
  const t = g({});
499
- let o = !1;
513
+ let s = !1;
500
514
  const n = () => {
501
- if (!o && e.value) {
502
- const l = e.value.getBoundingClientRect();
503
- t.value.left = Math.max(l.left, u.value.left), t.value.top = Math.max(l.top, u.value.top), t.value.width = l.width, t.value.height = l.height, o = !0;
515
+ if (!s && e.value) {
516
+ const o = e.value.getBoundingClientRect();
517
+ t.value.left = Math.max(o.left, u.value.left), t.value.top = Math.max(o.top, u.value.top), t.value.width = o.width, t.value.height = o.height, s = !0;
504
518
  }
505
519
  };
506
- return D(() => {
520
+ return O(() => {
507
521
  e.value && n();
508
- }), E(e, (l) => {
509
- l && n();
522
+ }), z(e, (o) => {
523
+ o && n();
510
524
  }), {
511
- isIntialized: o,
525
+ isIntialized: s,
512
526
  initialRect: t
513
527
  };
514
528
  }
515
- function Qe(e, u = g(!1), t = g(!1), o = g({ left: 0, right: 0, top: 0, bottom: 0 }), n = { width: 20, height: 40 }) {
516
- const { initialRect: l } = Ke(e, o), i = g(!1);
517
- let m = 0, a = 0, r = 0, p = 0, L = 0;
518
- const c = 5, b = g(null), h = (C) => {
529
+ function et(e, u = g(!1), t = g(!1), s = g({ left: 0, right: 0, top: 0, bottom: 0 }), n = { width: 20, height: 40 }) {
530
+ const { initialRect: o } = Re(e, s), i = g(!1);
531
+ let m = 0, a = 0, r = 0, h = 0, x = 0;
532
+ const d = 5, p = g(null), v = (T) => {
519
533
  if (!(!e.value || u.value))
520
534
  if (i.value) {
521
- const s = C.clientX - p, f = C.clientY - L;
522
- if (b.value === "left" || b.value === "left-bottom-corner") {
523
- const y = a - s;
524
- y > n.width && (l.value.width = y, l.value.left = m + s, e.value.style.left = l.value.left + "px", e.value.style.width = l.value.width + "px");
535
+ const l = T.clientX - h, c = T.clientY - x;
536
+ if (p.value === "left" || p.value === "left-bottom-corner") {
537
+ const w = a - l;
538
+ w > n.width && (o.value.width = w, o.value.left = m + l, e.value.style.left = o.value.left + "px", e.value.style.width = o.value.width + "px");
525
539
  }
526
- if (b.value === "right" || b.value === "right-bottom-corner") {
527
- const y = a + s;
528
- y > n.width && (l.value.width = y, e.value.style.width = l.value.width + "px");
540
+ if (p.value === "right" || p.value === "right-bottom-corner") {
541
+ const w = a + l;
542
+ w > n.width && (o.value.width = w, e.value.style.width = o.value.width + "px");
529
543
  }
530
- if (b.value === "bottom" || b.value === "left-bottom-corner" || b.value === "right-bottom-corner") {
531
- const y = r + f;
532
- y > n.height && (l.value.height = y, e.value.style.height = l.value.height + "px");
544
+ if (p.value === "bottom" || p.value === "left-bottom-corner" || p.value === "right-bottom-corner") {
545
+ const w = r + c;
546
+ w > n.height && (o.value.height = w, e.value.style.height = o.value.height + "px");
533
547
  }
534
548
  } else {
535
- const s = e.value.getBoundingClientRect(), f = C.clientX - s.left, y = C.clientY - s.top, v = Math.abs(f) <= c, z = Math.abs(s.width - f) <= c, w = Math.abs(s.height - y) <= c;
536
- v && w && t.value ? (e.value.style.cursor = "nesw-resize", b.value = "left-bottom-corner") : z && w && !t.value ? (e.value.style.cursor = "nwse-resize", b.value = "right-bottom-corner") : v && t.value ? (e.value.style.cursor = "ew-resize", b.value = "left") : z && !t.value ? (e.value.style.cursor = "ew-resize", b.value = "right") : w ? (e.value.style.cursor = "ns-resize", b.value = "bottom") : (e.value.style.cursor = "", b.value = null);
549
+ const l = e.value.getBoundingClientRect(), c = T.clientX - l.left, w = T.clientY - l.top, b = Math.abs(c) <= d, y = Math.abs(l.width - c) <= d, _ = Math.abs(l.height - w) <= d;
550
+ b && _ && t.value ? (e.value.style.cursor = "nesw-resize", p.value = "left-bottom-corner") : y && _ && !t.value ? (e.value.style.cursor = "nwse-resize", p.value = "right-bottom-corner") : b && t.value ? (e.value.style.cursor = "ew-resize", p.value = "left") : y && !t.value ? (e.value.style.cursor = "ew-resize", p.value = "right") : _ ? (e.value.style.cursor = "ns-resize", p.value = "bottom") : (e.value.style.cursor = "", p.value = null);
537
551
  }
538
- }, T = (C) => {
539
- if (!e.value || !b.value) return;
540
- const s = e.value.getBoundingClientRect();
541
- p = C.clientX, L = C.clientY, a = s.width, r = s.height, m = s.left, l.value.width = a, l.value.height = r, l.value.left = s.left, l.value.top = s.top, i.value = !0, document.addEventListener("mousemove", h), document.addEventListener("mouseup", d);
542
- }, d = () => {
543
- i.value = !1, b.value = null, e.value && (e.value.style.cursor = ""), document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", d);
544
- }, $ = () => {
545
- e.value && (e.value.removeEventListener("mousedown", T), e.value.removeEventListener("mousemove", h)), document.removeEventListener("mouseup", d);
546
- }, W = () => {
547
- e.value && (e.value.addEventListener("mousedown", T), e.value.addEventListener("mousemove", h));
552
+ }, E = (T) => {
553
+ if (!e.value || !p.value) return;
554
+ const l = e.value.getBoundingClientRect();
555
+ h = T.clientX, x = T.clientY, a = l.width, r = l.height, m = l.left, o.value.width = a, o.value.height = r, o.value.left = l.left, o.value.top = l.top, i.value = !0, document.addEventListener("mousemove", v), document.addEventListener("mouseup", k);
556
+ }, k = () => {
557
+ i.value = !1, p.value = null, e.value && (e.value.style.cursor = ""), document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", k);
558
+ }, I = () => {
559
+ e.value && (e.value.removeEventListener("mousedown", E), e.value.removeEventListener("mousemove", v)), document.removeEventListener("mouseup", k);
560
+ }, V = () => {
561
+ e.value && (e.value.addEventListener("mousedown", E), e.value.addEventListener("mousemove", v));
548
562
  };
549
- return D(() => {
550
- e.value && W();
551
- }), ae(() => {
552
- $();
553
- }), E(e, (C) => {
554
- C ? W() : $();
555
- }), { rect: l, isResizing: i };
563
+ return O(() => {
564
+ e.value && V();
565
+ }), ce(() => {
566
+ I();
567
+ }), z(e, (T) => {
568
+ T ? V() : I();
569
+ }), { rect: o, isResizing: i };
556
570
  }
557
- function Ze(e, u, t, o) {
571
+ function tt(e, u, t, s) {
558
572
  const n = () => {
559
573
  if (e.value) {
560
574
  const a = e.value;
561
575
  u.value ? a.style.transition = "width 0.3s ease-out, left 0.3s ease-out" : a.style.transition = "width 0.3s ease";
562
576
  }
563
- }, l = () => {
577
+ }, o = () => {
564
578
  e.value && (e.value.style.transition = "");
565
579
  }, i = () => {
566
- e.value && e.value.removeEventListener("transitionend", l);
580
+ e.value && e.value.removeEventListener("transitionend", o);
567
581
  }, m = () => {
568
- e.value && e.value.addEventListener("transitionend", l);
582
+ e.value && e.value.addEventListener("transitionend", o);
569
583
  };
570
- D(() => {
571
- e.value && e.value.addEventListener("transitionend", l);
572
- }), ae(() => {
573
- e.value && e.value.removeEventListener("transitionend", l);
574
- }), E(e, (a) => {
584
+ O(() => {
585
+ e.value && e.value.addEventListener("transitionend", o);
586
+ }), ce(() => {
587
+ e.value && e.value.removeEventListener("transitionend", o);
588
+ }), z(e, (a) => {
575
589
  a ? m() : i();
576
- }), E(t, () => {
590
+ }), z(t, () => {
577
591
  n();
578
- }), E(o, () => {
592
+ }), z(s, () => {
579
593
  n();
580
594
  });
581
595
  }
582
- function Pe(e, u, t, o) {
583
- const n = g(window.innerWidth), l = g(window.innerHeight), { docked: i, orientation: m, movement: a, position: r, isDragging: p } = je(
596
+ function lt(e, u, t, s) {
597
+ const n = g(window.innerWidth), o = g(window.innerHeight), { docked: i, orientation: m, movement: a, position: r, isDragging: h } = Qe(
584
598
  e,
585
599
  u,
586
- o
587
- ), L = M(() => m.value === "right"), { rect: c, isResizing: b } = Qe(
600
+ s
601
+ ), x = M(() => m.value === "right"), { rect: d, isResizing: p } = et(
588
602
  e,
589
603
  t,
590
- L,
591
- o.value.offset
592
- ), { width: h, left: T } = Je(
593
- c,
594
- b,
604
+ x,
605
+ s.value.offset
606
+ ), { width: v, left: E } = Pe(
607
+ d,
608
+ p,
595
609
  r,
596
- p
597
- ), { lastTop: d, lastHeight: $ } = qe(
598
- M(() => c.value.left),
599
- M(() => c.value.top),
600
- M(() => c.value.width),
601
- M(() => c.value.height)
602
- ), { autoOpened: W } = Fe(e, u, t);
603
- Ze(e, L, t, W);
604
- const C = (v) => {
610
+ h
611
+ ), { lastTop: k, lastHeight: I } = Ze(
612
+ M(() => d.value.left),
613
+ M(() => d.value.top),
614
+ M(() => d.value.width),
615
+ M(() => d.value.height)
616
+ ), { autoOpened: V } = Je(e, u, t);
617
+ tt(e, x, t, V);
618
+ const T = (b) => {
605
619
  if (e.value) {
606
- const z = e.value.getBoundingClientRect(), w = z.left + v;
607
- if (L.value) {
608
- c.value.left = w;
609
- const S = window.innerWidth - z.width - z.left;
610
- z.left <= 0 && S >= 0 && v < 0 && (c.value.left = Math.max(0, w)), window.innerWidth - z.width <= 0 && (c.value.left = window.innerWidth - z.width);
620
+ const y = e.value.getBoundingClientRect(), _ = y.left + b;
621
+ if (x.value) {
622
+ d.value.left = _;
623
+ const Z = window.innerWidth - y.width - y.left;
624
+ y.left <= 0 && Z >= 0 && b < 0 && (d.value.left = Math.max(0, _)), window.innerWidth - y.width <= 0 && (d.value.left = window.innerWidth - y.width);
611
625
  } else
612
- z.left + z.width >= window.innerWidth && v < 0 && (c.value.left = Math.max(0, w));
626
+ y.left + y.width >= window.innerWidth && b < 0 && (d.value.left = Math.max(0, _));
613
627
  }
614
- }, s = () => {
615
- const v = window.innerWidth - n.value;
616
- n.value = window.innerWidth, l.value = window.innerHeight, C(v);
628
+ }, l = () => {
629
+ const b = window.innerWidth - n.value;
630
+ n.value = window.innerWidth, o.value = window.innerHeight, T(b);
617
631
  };
618
- D(() => {
619
- window.addEventListener("resize", s);
620
- }), Q(() => {
621
- window.removeEventListener("resize", s);
632
+ O(() => {
633
+ window.addEventListener("resize", l);
634
+ }), R(() => {
635
+ window.removeEventListener("resize", l);
622
636
  });
623
- const f = (v) => {
624
- v ? (c.value.width = te, L.value && T.value && h.value && (c.value.left = T.value + h.value - te)) : (c.value.width = h.value, L.value && T.value && h.value && (c.value.left = T.value));
625
- }, y = () => {
626
- 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 = d.value, c.value.height = $.value);
637
+ const c = (b) => {
638
+ b ? (d.value.width = se, x.value && E.value && v.value && (d.value.left = E.value + v.value - se)) : (d.value.width = v.value, x.value && E.value && v.value && (d.value.left = E.value));
639
+ }, w = () => {
640
+ i.value ? (d.value.top = s.value.offset.value.top, d.value.height = window.innerHeight - s.value.offset.value.top - s.value.offset.value.bottom) : (d.value.top = k.value, d.value.height = I.value);
627
641
  };
628
- return E(i, () => {
629
- y();
630
- }), E(t, (v) => {
631
- f(v);
632
- }), E(W, (v) => {
633
- t.value && !p.value && f(!v);
634
- }), E(a, (v) => {
635
- if (v && e.value) {
636
- const w = e.value.getBoundingClientRect();
637
- c.value.left = w.left, c.value.top = w.top;
642
+ return z(i, () => {
643
+ w();
644
+ }), z(t, (b) => {
645
+ c(b);
646
+ }), z(V, (b) => {
647
+ t.value && !h.value && c(!b);
648
+ }), z(a, (b) => {
649
+ if (b && e.value) {
650
+ const _ = e.value.getBoundingClientRect();
651
+ d.value.left = _.left, d.value.top = _.top;
638
652
  }
639
- }), { rect: c, orientation: m, reversed: L };
653
+ }), { rect: d, orientation: m, reversed: x };
640
654
  }
641
- const Re = (e) => (oe("data-v-cd1a3c67"), e = e(), se(), e), et = /* @__PURE__ */ Re(() => /* @__PURE__ */ k("svg", {
655
+ const ot = (e) => (ue("data-v-cd1a3c67"), e = e(), re(), e), nt = /* @__PURE__ */ ot(() => /* @__PURE__ */ C("svg", {
642
656
  xmlns: "http://www.w3.org/2000/svg",
643
657
  width: "1em",
644
658
  height: "1em",
645
659
  viewBox: "0 0 1024 1024"
646
660
  }, [
647
- /* @__PURE__ */ k("path", {
661
+ /* @__PURE__ */ C("path", {
648
662
  fill: "currentColor",
649
663
  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"
650
664
  })
651
- ], -1)), tt = { class: "ml-tool-palette-title" }, lt = { class: "ml-tool-palette-content" }, nt = {
665
+ ], -1)), st = { class: "ml-tool-palette-title" }, at = { class: "ml-tool-palette-content" }, it = {
652
666
  key: 1,
653
667
  class: "ml-tool-palette-default-content"
654
- }, ot = /* @__PURE__ */ H({
668
+ }, ut = /* @__PURE__ */ H({
655
669
  __name: "MlToolPalette",
656
670
  props: /* @__PURE__ */ A({
657
671
  title: { default: "" },
@@ -669,17 +683,17 @@ const Re = (e) => (oe("data-v-cd1a3c67"), e = e(), se(), e), et = /* @__PURE__ *
669
683
  }),
670
684
  emits: /* @__PURE__ */ A(["close", "tab-change", "tab-close"], ["update:modelValue", "update:activeTab"]),
671
685
  setup(e, { emit: u }) {
672
- const t = e, o = G(e, "modelValue"), n = G(e, "activeTab"), l = u, i = M(() => t.tabs && t.tabs.length > 0);
673
- D(() => {
686
+ const t = e, s = q(e, "modelValue"), n = q(e, "activeTab"), o = u, i = M(() => t.tabs && t.tabs.length > 0);
687
+ O(() => {
674
688
  i.value && !n.value && t.tabs && t.tabs.length > 0 && (n.value = t.tabs[0].name);
675
- }), E(
689
+ }), z(
676
690
  () => t.tabs,
677
- (s) => {
678
- s && s.length > 0 && !n.value && (n.value = s[0].name);
691
+ (l) => {
692
+ l && l.length > 0 && !n.value && (n.value = l[0].name);
679
693
  },
680
694
  { immediate: !0 }
681
695
  );
682
- const m = g(!1), a = g(null), r = g(null), p = M(() => ({
696
+ const m = g(!1), a = g(null), r = g(null), h = M(() => ({
683
697
  offset: g({
684
698
  left: t.leftOffset,
685
699
  right: t.rightOffset,
@@ -687,124 +701,124 @@ const Re = (e) => (oe("data-v-cd1a3c67"), e = e(), se(), e), et = /* @__PURE__ *
687
701
  bottom: t.bottomOffset
688
702
  })
689
703
  })), {
690
- rect: L,
691
- orientation: c,
692
- reversed: b
693
- } = Pe(r, a, m, p), h = M(() => ({
694
- left: `${L.value.left}px`,
695
- top: `${L.value.top}px`,
696
- width: `${L.value.width}px`,
697
- height: `${L.value.height}px`
698
- })), T = M(
699
- () => b.value ? { borderLeft: "1px solid var(--el-border-color)", borderRight: null } : { borderLeft: null, borderRight: "1px solid var(--el-border-color)" }
700
- ), d = M(() => {
704
+ rect: x,
705
+ orientation: d,
706
+ reversed: p
707
+ } = lt(r, a, m, h), v = M(() => ({
708
+ left: `${x.value.left}px`,
709
+ top: `${x.value.top}px`,
710
+ width: `${x.value.width}px`,
711
+ height: `${x.value.height}px`
712
+ })), E = M(
713
+ () => p.value ? { borderLeft: "1px solid var(--el-border-color)", borderRight: null } : { borderLeft: null, borderRight: "1px solid var(--el-border-color)" }
714
+ ), k = M(() => {
701
715
  if (i.value && n.value && t.tabs) {
702
- const s = t.tabs.find((f) => f.name === n.value);
703
- if (s != null && s.title) return s.title;
716
+ const l = t.tabs.find((c) => c.name === n.value);
717
+ if (l != null && l.title) return l.title;
704
718
  }
705
719
  return t.title;
706
- }), $ = () => {
707
- o.value = !1;
708
- const s = r.value;
709
- l("close", {
710
- x: s ? s.clientLeft : 0,
711
- y: s ? s.clientTop : 0
720
+ }), I = () => {
721
+ s.value = !1;
722
+ const l = r.value;
723
+ o("close", {
724
+ x: l ? l.clientLeft : 0,
725
+ y: l ? l.clientTop : 0
712
726
  });
713
- }, W = (s) => {
714
- l("tab-change", s);
715
- }, C = (s) => {
716
- if (l("tab-close", s), n.value === s && t.tabs) {
717
- const f = t.tabs.findIndex((y) => y.name === s);
718
- if (f >= 0) {
719
- const y = t.tabs[f + 1] || t.tabs[f - 1];
720
- y && (n.value = y.name);
727
+ }, V = (l) => {
728
+ o("tab-change", l);
729
+ }, T = (l) => {
730
+ if (o("tab-close", l), n.value === l && t.tabs) {
731
+ const c = t.tabs.findIndex((w) => w.name === l);
732
+ if (c >= 0) {
733
+ const w = t.tabs[c + 1] || t.tabs[c - 1];
734
+ w && (n.value = w.name);
721
735
  }
722
736
  }
723
737
  };
724
- return (s, f) => {
725
- const y = J, v = me, z = he;
726
- return o.value ? (_(), V("div", {
738
+ return (l, c) => {
739
+ const w = Q, b = ge, y = _e;
740
+ return s.value ? (f(), W("div", {
727
741
  key: 0,
728
742
  ref_key: "toolPaletteElement",
729
743
  ref: r,
730
- style: X([h.value]),
731
- class: Z(["ml-tool-palette-dialog", { "ml-tool-palette-disabled": s.disabled }])
744
+ style: N([v.value]),
745
+ class: te(["ml-tool-palette-dialog", { "ml-tool-palette-disabled": l.disabled }])
732
746
  }, [
733
- k("div", {
734
- class: Z(["ml-tool-palette-dialog-layout", P(c)])
747
+ C("div", {
748
+ class: te(["ml-tool-palette-dialog-layout", le(d)])
735
749
  }, [
736
- k("div", {
750
+ C("div", {
737
751
  ref_key: "titleBarElement",
738
752
  ref: a,
739
753
  class: "ml-tool-palette-title-bar",
740
- style: X(T.value)
754
+ style: N(E.value)
741
755
  }, [
742
- I(y, {
756
+ $(w, {
743
757
  size: 18,
744
758
  class: "ml-tool-palette-dialog-icon",
745
- onClick: f[0] || (f[0] = (w) => !s.disabled && $())
759
+ onClick: c[0] || (c[0] = (_) => !l.disabled && I())
746
760
  }, {
747
- default: x(() => [
748
- et
761
+ default: L(() => [
762
+ nt
749
763
  ]),
750
764
  _: 1
751
765
  }),
752
- I(ze, {
766
+ $(ke, {
753
767
  class: "ml-tool-palette-dialog-icon",
754
768
  modelValue: m.value,
755
- "onUpdate:modelValue": f[1] || (f[1] = (w) => m.value = w),
756
- reverse: P(b),
757
- disabled: s.disabled
769
+ "onUpdate:modelValue": c[1] || (c[1] = (_) => m.value = _),
770
+ reverse: le(p),
771
+ disabled: l.disabled
758
772
  }, null, 8, ["modelValue", "reverse", "disabled"]),
759
- k("span", tt, Y(d.value), 1)
773
+ C("span", st, Y(k.value), 1)
760
774
  ], 4),
761
- k("div", lt, [
762
- i.value ? (_(), B(z, {
775
+ C("div", at, [
776
+ i.value ? (f(), B(y, {
763
777
  key: 0,
764
778
  modelValue: n.value,
765
- "onUpdate:modelValue": f[2] || (f[2] = (w) => n.value = w),
779
+ "onUpdate:modelValue": c[2] || (c[2] = (_) => n.value = _),
766
780
  type: "border-card",
767
781
  class: "ml-tool-palette-tabs",
768
- onTabRemove: f[3] || (f[3] = (w) => !s.disabled && C),
769
- onTabChange: f[4] || (f[4] = (w) => !s.disabled && W)
782
+ onTabRemove: c[3] || (c[3] = (_) => !l.disabled && T),
783
+ onTabChange: c[4] || (c[4] = (_) => !l.disabled && V)
770
784
  }, {
771
- default: x(() => [
772
- (_(!0), V(O, null, j(t.tabs, (w) => (_(), B(v, {
773
- key: w.name,
774
- name: w.name,
775
- label: w.label
785
+ default: L(() => [
786
+ (f(!0), W(U, null, J(t.tabs, (_) => (f(), B(b, {
787
+ key: _.name,
788
+ name: _.name,
789
+ label: _.label
776
790
  }, {
777
- label: x(() => [
778
- k("span", null, Y(w.label), 1)
791
+ label: L(() => [
792
+ C("span", null, Y(_.label), 1)
779
793
  ]),
780
- default: x(() => [
781
- q(s.$slots, `tab-${w.name}`, {}, void 0, !0)
794
+ default: L(() => [
795
+ K(l.$slots, `tab-${_.name}`, {}, void 0, !0)
782
796
  ]),
783
797
  _: 2
784
798
  }, 1032, ["name", "label"]))), 128))
785
799
  ]),
786
800
  _: 3
787
- }, 8, ["modelValue"])) : (_(), V("div", nt, [
788
- q(s.$slots, "default", {}, void 0, !0)
801
+ }, 8, ["modelValue"])) : (f(), W("div", it, [
802
+ K(l.$slots, "default", {}, void 0, !0)
789
803
  ]))
790
804
  ])
791
805
  ], 2)
792
- ], 6)) : F("", !0);
806
+ ], 6)) : j("", !0);
793
807
  };
794
808
  }
795
- }), st = /* @__PURE__ */ U(ot, [["__scopeId", "data-v-cd1a3c67"]]), bt = {
809
+ }), rt = /* @__PURE__ */ F(ut, [["__scopeId", "data-v-cd1a3c67"]]), yt = {
796
810
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
797
811
  install(e) {
798
- e.component("MlCollapse", K), e.component("MlDropdown", K), e.component("MlLanguage", Be), e.component("MlStatusBar", De), e.component("MlToggleButton", Ae), e.component("MlToolBar", Ne), e.component("MlToolPalette", st);
812
+ e.component("MlCollapse", P), e.component("MlDropdown", P), e.component("MlLanguage", Ve), e.component("MlStatusBar", He), e.component("MlToggleButton", Ue), e.component("MlToolBar", qe), e.component("MlToolPalette", rt);
799
813
  }
800
814
  };
801
815
  export {
802
- ze as MlCollapse,
803
- K as MlDropdown,
804
- Be as MlLanguage,
805
- De as MlStatusBar,
806
- Ae as MlToggleButton,
807
- Ne as MlToolBar,
808
- st as MlToolPalette,
809
- bt as default
816
+ ke as MlCollapse,
817
+ P as MlDropdown,
818
+ Ve as MlLanguage,
819
+ He as MlStatusBar,
820
+ Ue as MlToggleButton,
821
+ qe as MlToolBar,
822
+ rt as MlToolPalette,
823
+ yt as default
810
824
  };