@mlightcad/ui-components 0.0.16 → 0.1.1

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