@vasakgroup/vue-libvasak 0.3.6 → 0.4.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,31 +1,31 @@
1
- import { ref as y, onMounted as V, onUnmounted as U, watch as M, defineComponent as h, toRef as O, computed as k, createElementBlock as l, unref as w, openBlock as a, normalizeStyle as D, createCommentVNode as f, createElementVNode as i, createVNode as B, toDisplayString as g, normalizeClass as b, renderSlot as x, createBlock as T, onBeforeUnmount as q, Fragment as z, renderList as A, withCtx as H, mergeModels as J, useAttrs as K, useId as Q, useModel as X, withDirectives as Y, mergeProps as Z, isRef as _, vModelSelect as ee, withModifiers as te } from "vue";
2
- import { listen as ae } from "@tauri-apps/api/event";
3
- import { getSymbolSource as le, getIconSource as S } from "@vasakgroup/plugin-vicons";
4
- import { getCurrentWindow as ne } from "@tauri-apps/api/window";
5
- function se(e, s) {
6
- const t = y("");
7
- let n = null, o = !1, r = 0;
8
- async function u() {
9
- const m = ++r, c = e.value;
10
- if (!c) {
1
+ import { ref as S, onMounted as Q, onUnmounted as ke, watch as Z, defineComponent as L, toRef as ae, computed as y, createElementBlock as n, unref as O, openBlock as l, normalizeStyle as H, createCommentVNode as f, createElementVNode as h, createVNode as V, toDisplayString as w, normalizeClass as d, renderSlot as T, createBlock as F, onBeforeUnmount as _, Fragment as X, renderList as Y, withCtx as W, mergeModels as $e, useAttrs as we, useId as Ce, useModel as ze, withDirectives as Le, mergeProps as Be, isRef as Se, vModelSelect as Ae, inject as Te, provide as ie, createTextVNode as De, createSlots as Ee, withModifiers as z, withKeys as D, Teleport as Me, Transition as Ie, nextTick as re } from "vue";
2
+ import { listen as Ve } from "@tauri-apps/api/event";
3
+ import { getSymbolSource as je, getIconSource as Oe } from "@vasakgroup/plugin-vicons";
4
+ import { getCurrentWindow as Pe } from "@tauri-apps/api/window";
5
+ function Ne(e, s) {
6
+ const t = S("");
7
+ let a = null, o = !1, i = 0;
8
+ async function c() {
9
+ const u = ++i, m = e.value;
10
+ if (!m) {
11
11
  t.value = "";
12
12
  return;
13
13
  }
14
- const d = s.value === "symbol" ? await le(c) : await S(c);
15
- m === r && (t.value = d);
14
+ const v = s.value === "symbol" ? await je(m) : await Oe(m);
15
+ u === i && (t.value = v);
16
16
  }
17
- return V(async () => {
18
- const m = await ae("vicons:theme-changed", u);
17
+ return Q(async () => {
18
+ const u = await Ve("vicons:theme-changed", c);
19
19
  if (o) {
20
- m();
20
+ u();
21
21
  return;
22
22
  }
23
- n = m, await u();
24
- }), U(() => {
25
- o = !0, n?.();
26
- }), M(e, u), t;
23
+ a = u, await c();
24
+ }), ke(() => {
25
+ o = !0, a?.();
26
+ }), Z(e, c), t;
27
27
  }
28
- const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
28
+ const Re = ["src", "alt"], M = /* @__PURE__ */ L({
29
29
  __name: "ThemeIcon",
30
30
  props: {
31
31
  name: {},
@@ -34,23 +34,23 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
34
34
  alt: { default: "" }
35
35
  },
36
36
  setup(e) {
37
- const s = e, t = se(O(s, "name"), O(s, "type")), n = k(() => `${s.size}px`);
38
- return (o, r) => w(t) ? (a(), l("img", {
37
+ const s = e, t = Ne(ae(s, "name"), ae(s, "type")), a = y(() => `${s.size}px`);
38
+ return (o, i) => O(t) ? (l(), n("img", {
39
39
  key: 0,
40
- src: w(t),
40
+ src: O(t),
41
41
  alt: e.alt,
42
- style: D({ width: n.value, height: n.value }),
42
+ style: H({ width: a.value, height: a.value }),
43
43
  class: "shrink-0 object-contain"
44
- }, null, 12, oe)) : (a(), l("span", {
44
+ }, null, 12, Re)) : (l(), n("span", {
45
45
  key: 1,
46
- style: D({ width: n.value, height: n.value }),
46
+ style: H({ width: a.value, height: a.value }),
47
47
  class: "shrink-0"
48
48
  }, null, 4));
49
49
  }
50
- }), ie = { class: "flex flex-col gap-2" }, re = ["aria-expanded"], ce = {
50
+ }), Fe = { class: "flex flex-col gap-2" }, We = ["aria-expanded"], Ue = {
51
51
  key: 1,
52
52
  class: "flex flex-col gap-1"
53
- }, N = /* @__PURE__ */ h({
53
+ }, ue = /* @__PURE__ */ L({
54
54
  __name: "SideGroup",
55
55
  props: {
56
56
  title: {},
@@ -58,40 +58,40 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
58
58
  defaultOpen: { type: Boolean, default: !0 }
59
59
  },
60
60
  setup(e) {
61
- const s = e, t = y(s.defaultOpen);
62
- return M(
61
+ const s = e, t = S(s.defaultOpen);
62
+ return Z(
63
63
  () => s.collapsed,
64
- (n) => {
65
- n && (t.value = !0);
64
+ (a) => {
65
+ a && (t.value = !0);
66
66
  }
67
- ), (n, o) => (a(), l("section", ie, [
68
- e.collapsed ? f("", !0) : (a(), l("button", {
67
+ ), (a, o) => (l(), n("section", Fe, [
68
+ e.collapsed ? f("", !0) : (l(), n("button", {
69
69
  key: 0,
70
70
  type: "button",
71
71
  class: "group flex w-full items-center justify-between rounded-corner px-2 py-1 text-tx-muted text-xs uppercase tracking-[0.08em] hover:bg-ui-surface/60",
72
72
  "aria-expanded": t.value,
73
- onClick: o[0] || (o[0] = (r) => t.value = !t.value)
73
+ onClick: o[0] || (o[0] = (i) => t.value = !t.value)
74
74
  }, [
75
- i("span", null, g(e.title), 1),
76
- B($, {
75
+ h("span", null, w(e.title), 1),
76
+ V(M, {
77
77
  name: "pan-down-symbolic",
78
78
  type: "symbol",
79
79
  size: 12,
80
- class: b(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
80
+ class: d(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
81
81
  }, null, 8, ["class"])
82
- ], 8, re)),
83
- t.value || e.collapsed ? (a(), l("div", ce, [
84
- x(n.$slots, "default")
82
+ ], 8, We)),
83
+ t.value || e.collapsed ? (l(), n("div", Ue, [
84
+ T(a.$slots, "default")
85
85
  ])) : f("", !0)
86
86
  ]));
87
87
  }
88
- }), de = ["title", "aria-label", "disabled", "aria-current"], ue = { key: 1 }, me = {
88
+ }), Ge = ["title", "aria-label", "disabled", "aria-current"], Xe = { key: 1 }, Ye = {
89
89
  key: 0,
90
90
  class: "min-w-0 flex-1 truncate font-medium"
91
- }, fe = {
91
+ }, Ke = {
92
92
  key: 1,
93
93
  class: "rounded-corner bg-ui-surface px-2 py-0.5 font-semibold text-tx-muted text-xs"
94
- }, W = /* @__PURE__ */ h({
94
+ }, ce = /* @__PURE__ */ L({
95
95
  __name: "SideButton",
96
96
  props: {
97
97
  label: {},
@@ -103,49 +103,49 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
103
103
  },
104
104
  emits: ["click"],
105
105
  setup(e) {
106
- return (s, t) => (a(), l("button", {
106
+ return (s, t) => (l(), n("button", {
107
107
  type: "button",
108
108
  title: e.collapsed ? e.label : void 0,
109
109
  "aria-label": e.collapsed ? e.label : void 0,
110
110
  disabled: e.disabled,
111
111
  "aria-current": e.active ? "page" : void 0,
112
- class: b(["group relative flex w-full items-center gap-3 rounded-corner border px-3 py-2 text-left text-sm transition-all duration-200", [
112
+ class: d(["group relative flex w-full items-center gap-3 rounded-corner border px-3 py-2 text-left text-sm transition-all duration-200", [
113
113
  e.active ? "border-secondary bg-primary/15 text-tx-main shadow-sm" : "border-transparent bg-transparent hover:border-ui-border hover:bg-ui-surface/70",
114
114
  e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer",
115
115
  e.collapsed ? "justify-center px-2" : ""
116
116
  ]]),
117
- onClick: t[0] || (t[0] = (n) => s.$emit("click"))
117
+ onClick: t[0] || (t[0] = (a) => s.$emit("click"))
118
118
  }, [
119
- i("span", {
120
- class: b(["flex h-8 w-8 shrink-0 items-center justify-center rounded-corner font-semibold text-xs uppercase tracking-wide", e.active ? "border-secondary bg-primary/20" : ""]),
119
+ h("span", {
120
+ class: d(["flex h-8 w-8 shrink-0 items-center justify-center rounded-corner font-semibold text-xs uppercase tracking-wide", e.active ? "border-secondary bg-primary/20" : ""]),
121
121
  "aria-hidden": "true"
122
122
  }, [
123
- e.icon ? (a(), T($, {
123
+ e.icon ? (l(), F(M, {
124
124
  key: 0,
125
125
  name: e.icon,
126
126
  size: 20
127
- }, null, 8, ["name"])) : (a(), l("span", ue, g(e.label.charAt(0).toUpperCase()), 1))
127
+ }, null, 8, ["name"])) : (l(), n("span", Xe, w(e.label.charAt(0).toUpperCase()), 1))
128
128
  ], 2),
129
- e.collapsed ? f("", !0) : (a(), l("span", me, g(e.label), 1)),
130
- !e.collapsed && e.badge !== "" ? (a(), l("span", fe, g(e.badge), 1)) : f("", !0)
131
- ], 10, de));
129
+ e.collapsed ? f("", !0) : (l(), n("span", Ye, w(e.label), 1)),
130
+ !e.collapsed && e.badge !== "" ? (l(), n("span", Ke, w(e.badge), 1)) : f("", !0)
131
+ ], 10, Ge));
132
132
  }
133
- }), be = {
133
+ }), qe = {
134
134
  key: 0,
135
135
  class: "flex flex-col gap-2 border-ui-border border-b p-2"
136
- }, ge = { class: "flex items-center gap-2" }, he = ["aria-label", "aria-expanded"], ve = {
136
+ }, He = { class: "flex items-center gap-2" }, Je = ["aria-label", "aria-expanded"], Qe = {
137
137
  key: 0,
138
138
  class: "min-w-0 flex-1"
139
- }, ye = {
139
+ }, Ze = {
140
140
  key: 0,
141
141
  class: "truncate font-semibold text-sm"
142
- }, xe = {
142
+ }, _e = {
143
143
  key: 1,
144
144
  class: "truncate text-tx-muted text-xs"
145
- }, pe = { key: 0 }, ke = {
145
+ }, et = { key: 0 }, tt = {
146
146
  key: 1,
147
147
  class: "flex border-ui-border border-b p-2"
148
- }, we = ["aria-label", "aria-expanded"], Ce = { class: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2" }, F = "hidden h-8 w-8 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-surface/70 transition-colors hover:bg-ui-surface md:inline-flex", P = 767, $e = /* @__PURE__ */ h({
148
+ }, at = ["aria-label", "aria-expanded"], lt = { class: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2" }, le = "hidden h-8 w-8 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-surface/70 transition-colors hover:bg-ui-surface md:inline-flex", ne = 767, nt = /* @__PURE__ */ L({
149
149
  __name: "SideBar",
150
150
  props: {
151
151
  title: { default: "" },
@@ -158,100 +158,100 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
158
158
  },
159
159
  emits: ["update:modelValue", "update:collapsed", "change"],
160
160
  setup(e, { expose: s, emit: t }) {
161
- const n = e, o = t, r = y(n.collapsed ?? !1), u = y(!1);
162
- let m = null, c = null;
163
- const d = k(() => u.value || r.value), j = k(() => !!(n.title || n.subtitle));
164
- k(() => n.categories.length > 0);
165
- function R() {
161
+ const a = e, o = t, i = S(a.collapsed ?? !1), c = S(!1);
162
+ let u = null, m = null;
163
+ const v = y(() => c.value || i.value), I = y(() => !!(a.title || a.subtitle));
164
+ y(() => a.categories.length > 0);
165
+ function N() {
166
166
  return document.documentElement?.clientWidth || window.innerWidth;
167
167
  }
168
- function C() {
169
- u.value = R() <= P;
168
+ function A() {
169
+ c.value = N() <= ne;
170
170
  }
171
171
  function E() {
172
- r.value = !r.value, o("update:collapsed", r.value);
172
+ i.value = !i.value, o("update:collapsed", i.value);
173
173
  }
174
- function G(v) {
175
- o("update:modelValue", v), o("change", v);
174
+ function P(k) {
175
+ o("update:modelValue", k), o("change", k);
176
176
  }
177
- return M(
178
- () => n.collapsed,
179
- (v) => {
180
- v !== void 0 && (r.value = v);
177
+ return Z(
178
+ () => a.collapsed,
179
+ (k) => {
180
+ k !== void 0 && (i.value = k);
181
181
  }
182
- ), V(() => {
183
- m = window.matchMedia(`(max-width: ${P}px)`), C(), m.addEventListener("change", C), window.addEventListener("resize", C), typeof ResizeObserver < "u" && document.documentElement && (c = new ResizeObserver(C), c.observe(document.documentElement));
184
- }), q(() => {
185
- m?.removeEventListener("change", C), window.removeEventListener("resize", C), c?.disconnect(), c = null;
186
- }), s({ collapsed: d }), (v, Bt) => (a(), l("aside", {
187
- class: b(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-all duration-300", ["w-[84px]", d.value ? "md:w-[84px]" : "md:w-72"]])
182
+ ), Q(() => {
183
+ u = window.matchMedia(`(max-width: ${ne}px)`), A(), u.addEventListener("change", A), window.addEventListener("resize", A), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(A), m.observe(document.documentElement));
184
+ }), _(() => {
185
+ u?.removeEventListener("change", A), window.removeEventListener("resize", A), m?.disconnect(), m = null;
186
+ }), s({ collapsed: v }), (k, j) => (l(), n("aside", {
187
+ class: d(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-all duration-300", ["w-[84px]", v.value ? "md:w-[84px]" : "md:w-72"]])
188
188
  }, [
189
- j.value || v.$slots.header ? (a(), l("header", be, [
190
- i("div", ge, [
191
- i("button", {
189
+ I.value || k.$slots.header ? (l(), n("header", qe, [
190
+ h("div", He, [
191
+ h("button", {
192
192
  type: "button",
193
- class: b(F),
194
- "aria-label": d.value ? e.expandLabel : e.collapseLabel,
195
- "aria-expanded": !d.value,
193
+ class: d(le),
194
+ "aria-label": v.value ? e.expandLabel : e.collapseLabel,
195
+ "aria-expanded": !v.value,
196
196
  onClick: E
197
197
  }, [
198
- B($, {
199
- name: d.value ? "pan-end-symbolic" : "pan-start-symbolic",
198
+ V(M, {
199
+ name: v.value ? "pan-end-symbolic" : "pan-start-symbolic",
200
200
  type: "symbol",
201
201
  size: 16
202
202
  }, null, 8, ["name"])
203
- ], 8, he),
204
- j.value && !d.value ? (a(), l("div", ve, [
205
- e.title ? (a(), l("p", ye, g(e.title), 1)) : f("", !0),
206
- e.subtitle ? (a(), l("p", xe, g(e.subtitle), 1)) : f("", !0)
203
+ ], 8, Je),
204
+ I.value && !v.value ? (l(), n("div", Qe, [
205
+ e.title ? (l(), n("p", Ze, w(e.title), 1)) : f("", !0),
206
+ e.subtitle ? (l(), n("p", _e, w(e.subtitle), 1)) : f("", !0)
207
207
  ])) : f("", !0)
208
208
  ]),
209
- v.$slots.header && !d.value ? (a(), l("div", pe, [
210
- x(v.$slots, "header", { collapsed: d.value })
209
+ k.$slots.header && !v.value ? (l(), n("div", et, [
210
+ T(k.$slots, "header", { collapsed: v.value })
211
211
  ])) : f("", !0)
212
- ])) : (a(), l("div", ke, [
213
- i("button", {
212
+ ])) : (l(), n("div", tt, [
213
+ h("button", {
214
214
  type: "button",
215
- class: b(F),
216
- "aria-label": d.value ? e.expandLabel : e.collapseLabel,
217
- "aria-expanded": !d.value,
215
+ class: d(le),
216
+ "aria-label": v.value ? e.expandLabel : e.collapseLabel,
217
+ "aria-expanded": !v.value,
218
218
  onClick: E
219
219
  }, [
220
- B($, {
221
- name: d.value ? "pan-end-symbolic" : "pan-start-symbolic",
220
+ V(M, {
221
+ name: v.value ? "pan-end-symbolic" : "pan-start-symbolic",
222
222
  type: "symbol",
223
223
  size: 16
224
224
  }, null, 8, ["name"])
225
- ], 8, we)
225
+ ], 8, at)
226
226
  ])),
227
- i("div", Ce, [
228
- (a(!0), l(z, null, A(e.categories, (L) => (a(), T(N, {
229
- key: L.id,
230
- title: L.title,
231
- collapsed: d.value
227
+ h("div", lt, [
228
+ (l(!0), n(X, null, Y(e.categories, (R) => (l(), F(ue, {
229
+ key: R.id,
230
+ title: R.title,
231
+ collapsed: v.value
232
232
  }, {
233
- default: H(() => [
234
- (a(!0), l(z, null, A(L.items, (p) => (a(), T(W, {
235
- key: p.id,
236
- label: p.label,
237
- icon: p.icon,
238
- badge: p.badge,
239
- disabled: p.disabled,
240
- collapsed: d.value,
241
- active: e.modelValue === p.id,
242
- onClick: (St) => G(p.id)
233
+ default: W(() => [
234
+ (l(!0), n(X, null, Y(R.items, (b) => (l(), F(ce, {
235
+ key: b.id,
236
+ label: b.label,
237
+ icon: b.icon,
238
+ badge: b.badge,
239
+ disabled: b.disabled,
240
+ collapsed: v.value,
241
+ active: e.modelValue === b.id,
242
+ onClick: (g) => P(b.id)
243
243
  }, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
244
244
  ]),
245
245
  _: 2
246
246
  }, 1032, ["title", "collapsed"]))), 128)),
247
- x(v.$slots, "default", { collapsed: d.value })
247
+ T(k.$slots, "default", { collapsed: v.value })
248
248
  ])
249
249
  ], 2));
250
250
  }
251
- }), Be = { class: "flex min-w-0 flex-col gap-1" }, Se = ["for"], ze = { class: "relative flex min-w-0 items-center" }, Ie = ["id"], Le = /* @__PURE__ */ h({
251
+ }), ot = { class: "flex min-w-0 flex-col gap-1" }, st = ["for"], it = { class: "relative flex min-w-0 items-center" }, rt = ["id"], ut = /* @__PURE__ */ L({
252
252
  inheritAttrs: !1,
253
253
  __name: "SelectField",
254
- props: /* @__PURE__ */ J({
254
+ props: /* @__PURE__ */ $e({
255
255
  label: {}
256
256
  }, {
257
257
  modelValue: {
@@ -261,28 +261,28 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
261
261
  }),
262
262
  emits: ["update:modelValue"],
263
263
  setup(e) {
264
- const s = e, t = K(), n = Q(), o = k(() => t.id ?? n), [r, u] = X(e, "modelValue", {
265
- set(m) {
266
- return u.number ? Number(m) : m;
264
+ const s = e, t = we(), a = Ce(), o = y(() => t.id ?? a), [i, c] = ze(e, "modelValue", {
265
+ set(u) {
266
+ return c.number ? Number(u) : u;
267
267
  }
268
268
  });
269
- return (m, c) => (a(), l("div", Be, [
270
- s.label ? (a(), l("label", {
269
+ return (u, m) => (l(), n("div", ot, [
270
+ s.label ? (l(), n("label", {
271
271
  key: 0,
272
272
  for: o.value,
273
273
  class: "text-tx-muted text-xs"
274
- }, g(s.label), 9, Se)) : f("", !0),
275
- i("div", ze, [
276
- Y(i("select", Z({
274
+ }, w(s.label), 9, st)) : f("", !0),
275
+ h("div", it, [
276
+ Le(h("select", Be({
277
277
  id: o.value,
278
- "onUpdate:modelValue": c[0] || (c[0] = (d) => _(r) ? r.value = d : null),
278
+ "onUpdate:modelValue": m[0] || (m[0] = (v) => Se(i) ? i.value = v : null),
279
279
  class: "min-w-0 flex-1 appearance-none truncate rounded-corner border border-ui-border bg-ui-surface/60 py-1.5 pr-8 pl-2 text-sm text-tx-main"
280
- }, w(t)), [
281
- x(m.$slots, "default")
282
- ], 16, Ie), [
283
- [ee, w(r)]
280
+ }, O(t)), [
281
+ T(u.$slots, "default")
282
+ ], 16, rt), [
283
+ [Ae, O(i)]
284
284
  ]),
285
- B($, {
285
+ V(M, {
286
286
  name: "pan-down-symbolic",
287
287
  type: "symbol",
288
288
  size: 14,
@@ -291,85 +291,586 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
291
291
  ])
292
292
  ]));
293
293
  }
294
- }), Te = { "data-tauri-drag-region": "" }, Ae = ["src", "alt"], Ve = { "data-tauri-drag-region": "" }, Me = { "data-tauri-drag-region": "" }, je = ["src"], Ee = ["src"], Oe = ["src"], De = /* @__PURE__ */ h({
295
- __name: "TopBar",
294
+ }), ee = /* @__PURE__ */ Symbol("barra de vasak");
295
+ function J(e) {
296
+ return e === "left" || e === "right" ? "vertical" : "horizontal";
297
+ }
298
+ const ct = ["top", "bottom", "left", "right"];
299
+ function dt(e) {
300
+ return typeof e == "string" && ct.includes(e);
301
+ }
302
+ function G() {
303
+ const e = Te(ee, null);
304
+ if (e) return e;
305
+ const s = S("top");
306
+ return {
307
+ posicion: s,
308
+ orientacion: y(() => J(s.value)),
309
+ vertical: y(() => J(s.value) === "vertical")
310
+ };
311
+ }
312
+ const ft = "window", mt = "barPosition";
313
+ function bt(e) {
314
+ const t = e?.[ft]?.[mt];
315
+ return dt(t) ? t : null;
316
+ }
317
+ function vt(e = "top") {
318
+ const s = S(e);
319
+ let t = null, a = !1;
320
+ async function o() {
321
+ try {
322
+ const { readConfig: i } = await import("@vasakgroup/plugin-config-manager"), c = await i();
323
+ s.value = bt(c) ?? e;
324
+ } catch {
325
+ }
326
+ }
327
+ return Q(async () => {
328
+ await o();
329
+ try {
330
+ const { listen: i } = await import("@tauri-apps/api/event"), c = await i("config-changed", () => {
331
+ o();
332
+ });
333
+ if (a) {
334
+ c();
335
+ return;
336
+ }
337
+ t = c;
338
+ } catch {
339
+ }
340
+ }), _(() => {
341
+ a = !0, t?.(), t = null;
342
+ }), s;
343
+ }
344
+ const gt = ["title", "aria-label"], yt = ["title", "aria-label"], ht = ["title", "aria-label"], q = "flex items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 p-1 transition-colors", de = /* @__PURE__ */ L({
345
+ __name: "WindowControls",
296
346
  props: {
297
- title: String,
298
- image: String
347
+ minimizeLabel: { default: "Minimize" },
348
+ maximizeLabel: { default: "Maximize" },
349
+ closeLabel: { default: "Close" }
299
350
  },
300
351
  setup(e) {
301
- const s = y(null), t = ne(), n = y(""), o = y(""), r = y(""), u = e;
302
- return V(async () => {
303
- n.value = await S("window-close"), o.value = await S("window-minimize"), r.value = await S("window-maximize");
304
- }), (m, c) => (a(), l("div", {
305
- "data-tauri-drag-region": "",
306
- class: "flex h-8 px-4 py-1 bg-primary dark:bg-primary-dark rounded-t-corner-window justify-between align-center",
307
- ref_key: "bar",
308
- ref: s
352
+ const { vertical: s } = G();
353
+ function t() {
354
+ return Pe();
355
+ }
356
+ return (a, o) => (l(), n("div", {
357
+ class: d(["flex shrink-0 gap-1", O(s) ? "flex-col" : ""]),
358
+ "data-tauri-drag-region": ""
309
359
  }, [
310
- i("div", Te, [
311
- i("img", {
312
- src: u.image,
313
- "data-tauri-drag-region": "",
314
- class: "h-6 w-auto",
315
- alt: u.title
316
- }, null, 8, Ae)
317
- ]),
318
- i("div", Ve, g(u.title), 1),
319
- i("div", Me, [
320
- i("span", {
321
- class: "win-button",
322
- onClick: c[0] || (c[0] = (d) => w(t).minimize())
323
- }, [
324
- i("img", {
325
- src: o.value,
326
- class: "h-6 w-6 inline-block",
327
- alt: "Minimize"
328
- }, null, 8, je)
329
- ]),
330
- i("span", {
331
- class: "win-button",
332
- onClick: c[1] || (c[1] = (d) => w(t).toggleMaximize())
333
- }, [
334
- i("img", {
335
- src: r.value,
336
- class: "h-6 w-6 inline-block",
337
- alt: "Maximize"
338
- }, null, 8, Ee)
339
- ]),
340
- i("span", {
341
- class: "win-button",
342
- onClick: c[2] || (c[2] = (d) => w(t).close())
343
- }, [
344
- i("img", {
345
- src: n.value,
346
- class: "h-6 w-6 inline-block",
347
- alt: "Close"
348
- }, null, 8, Oe)
360
+ h("button", {
361
+ type: "button",
362
+ class: d([q, "hover:bg-status-success"]),
363
+ title: e.minimizeLabel,
364
+ "aria-label": e.minimizeLabel,
365
+ onClick: o[0] || (o[0] = (i) => t().minimize())
366
+ }, [
367
+ V(M, {
368
+ name: "window-minimize",
369
+ size: 24
370
+ })
371
+ ], 10, gt),
372
+ h("button", {
373
+ type: "button",
374
+ class: d([q, "hover:bg-status-warning"]),
375
+ title: e.maximizeLabel,
376
+ "aria-label": e.maximizeLabel,
377
+ onClick: o[1] || (o[1] = (i) => t().toggleMaximize())
378
+ }, [
379
+ V(M, {
380
+ name: "window-maximize",
381
+ size: 24
382
+ })
383
+ ], 10, yt),
384
+ h("button", {
385
+ type: "button",
386
+ class: d([q, "hover:bg-status-error"]),
387
+ title: e.closeLabel,
388
+ "aria-label": e.closeLabel,
389
+ onClick: o[2] || (o[2] = (i) => t().close())
390
+ }, [
391
+ V(M, {
392
+ name: "window-close",
393
+ size: 24
394
+ })
395
+ ], 10, ht)
396
+ ], 2));
397
+ }
398
+ }), pt = {
399
+ key: 0,
400
+ class: "flex shrink-0 items-center",
401
+ "data-tauri-drag-region": ""
402
+ }, xt = {
403
+ key: 1,
404
+ class: "min-w-0 shrink truncate text-sm",
405
+ "data-tauri-drag-region": ""
406
+ }, fe = /* @__PURE__ */ L({
407
+ __name: "AppBar",
408
+ props: {
409
+ position: { default: null },
410
+ title: { default: "" },
411
+ minimizeLabel: { default: "Minimize" },
412
+ maximizeLabel: { default: "Maximize" },
413
+ closeLabel: { default: "Close" },
414
+ hideControls: { type: Boolean, default: !1 }
415
+ },
416
+ setup(e) {
417
+ const s = e, t = G(), a = y(() => s.position ?? t.posicion.value), o = y(() => a.value === "left" || a.value === "right");
418
+ return ie(ee, {
419
+ posicion: a,
420
+ orientacion: y(() => o.value ? "vertical" : "horizontal"),
421
+ vertical: o
422
+ }), (i, c) => (l(), n("div", {
423
+ class: d(["flex shrink-0 items-center gap-2 p-1 font-title", o.value ? "h-full flex-col" : "w-full"]),
424
+ "data-tauri-drag-region": ""
425
+ }, [
426
+ i.$slots.identidad ? (l(), n("div", pt, [
427
+ T(i.$slots, "identidad")
428
+ ])) : f("", !0),
429
+ (i.$slots.titulo || e.title) && !o.value ? (l(), n("p", xt, [
430
+ T(i.$slots, "titulo", {}, () => [
431
+ De(w(e.title), 1)
349
432
  ])
350
- ])
351
- ], 512));
433
+ ])) : f("", !0),
434
+ h("div", {
435
+ class: d(["flex min-h-0 min-w-0 flex-1 items-center gap-2 overflow-auto", o.value ? "flex-col" : ""]),
436
+ "data-tauri-drag-region": ""
437
+ }, [
438
+ T(i.$slots, "default")
439
+ ], 2),
440
+ i.$slots.acciones ? (l(), n("div", {
441
+ key: 2,
442
+ class: d(["flex shrink-0 items-center gap-1", o.value ? "flex-col" : ""])
443
+ }, [
444
+ T(i.$slots, "acciones")
445
+ ], 2)) : f("", !0),
446
+ e.hideControls ? f("", !0) : (l(), F(de, {
447
+ key: 3,
448
+ "minimize-label": e.minimizeLabel,
449
+ "maximize-label": e.maximizeLabel,
450
+ "close-label": e.closeLabel
451
+ }, null, 8, ["minimize-label", "maximize-label", "close-label"]))
452
+ ], 2));
352
453
  }
353
- }), Fe = /* @__PURE__ */ h({
454
+ }), kt = { class: "flex min-h-0 min-w-0 flex-1" }, $t = /* @__PURE__ */ L({
354
455
  __name: "WindowFrame",
355
456
  props: {
356
- title: { default: "Vasak" },
357
- image: { default: "" }
457
+ position: { default: null },
458
+ title: { default: "" },
459
+ minimizeLabel: { default: "Minimize" },
460
+ maximizeLabel: { default: "Maximize" },
461
+ closeLabel: { default: "Close" },
462
+ hideControls: { type: Boolean, default: !1 },
463
+ hideBar: { type: Boolean, default: !1 }
358
464
  },
359
465
  setup(e) {
360
- const s = e;
361
- return (t, n) => (a(), l(z, null, [
362
- B(De, {
363
- title: s.title,
364
- image: s.image
365
- }, null, 8, ["title", "image"]),
366
- x(t.$slots, "default")
367
- ], 64));
466
+ const s = e, t = vt(), a = y(() => s.position ?? t.value), o = y(() => J(a.value)), i = y(() => o.value === "vertical");
467
+ ie(ee, { posicion: a, orientacion: o, vertical: i });
468
+ const c = {
469
+ top: "flex-col",
470
+ bottom: "flex-col-reverse",
471
+ left: "flex-row",
472
+ right: "flex-row-reverse"
473
+ };
474
+ return (u, m) => (l(), n("div", {
475
+ class: d(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", c[a.value]])
476
+ }, [
477
+ e.hideBar ? f("", !0) : (l(), F(fe, {
478
+ key: 0,
479
+ position: a.value,
480
+ title: e.title,
481
+ "minimize-label": e.minimizeLabel,
482
+ "maximize-label": e.maximizeLabel,
483
+ "close-label": e.closeLabel,
484
+ "hide-controls": e.hideControls
485
+ }, Ee({
486
+ default: W(() => [
487
+ T(u.$slots, "barra")
488
+ ]),
489
+ _: 2
490
+ }, [
491
+ u.$slots.identidad ? {
492
+ name: "identidad",
493
+ fn: W(() => [
494
+ T(u.$slots, "identidad")
495
+ ]),
496
+ key: "0"
497
+ } : void 0,
498
+ u.$slots.titulo ? {
499
+ name: "titulo",
500
+ fn: W(() => [
501
+ T(u.$slots, "titulo")
502
+ ]),
503
+ key: "1"
504
+ } : void 0,
505
+ u.$slots.acciones ? {
506
+ name: "acciones",
507
+ fn: W(() => [
508
+ T(u.$slots, "acciones")
509
+ ]),
510
+ key: "2"
511
+ } : void 0
512
+ ]), 1032, ["position", "title", "minimize-label", "maximize-label", "close-label", "hide-controls"])),
513
+ h("div", kt, [
514
+ T(u.$slots, "default")
515
+ ])
516
+ ], 2));
517
+ }
518
+ }), wt = ["aria-selected", "title", "aria-label", "tabindex"], Ct = {
519
+ key: 1,
520
+ "aria-hidden": "true"
521
+ }, zt = {
522
+ key: 2,
523
+ class: "min-w-0 flex-1 truncate"
524
+ }, Lt = ["title", "aria-label"], Bt = { class: "whitespace-nowrap" }, St = {
525
+ key: 0,
526
+ class: "size-2 shrink-0 rounded-full bg-current",
527
+ "aria-hidden": "true"
528
+ }, At = ["title", "aria-label"], Tt = 500, oe = 8, se = 6, me = /* @__PURE__ */ L({
529
+ __name: "TabItem",
530
+ props: {
531
+ tab: {},
532
+ active: { type: Boolean, default: !1 },
533
+ closeLabel: { default: "Close" },
534
+ dirtyLabel: { default: "Unsaved changes" },
535
+ tabindex: { default: 0 }
536
+ },
537
+ emits: ["select", "close", "menu", "mover", "navegar"],
538
+ setup(e, { emit: s }) {
539
+ const t = e, a = s, { vertical: o, posicion: i } = G(), c = S(null), u = S(null), m = S(!1), v = S(!1), I = S(!1), N = S({ top: 0, left: 0, right: 0 });
540
+ let A = null, E = null;
541
+ const P = y(() => t.tab.closable !== !1), k = y(() => t.tab.tooltip ?? t.tab.label), j = y(
542
+ () => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
543
+ ), R = y(() => t.tab.label.trim().charAt(0).toUpperCase()), b = y(() => m.value || I.value), g = y(
544
+ () => !!t.tab.dirty && !(b.value && P.value)
545
+ ), p = y(
546
+ () => P.value && (b.value || t.active || !t.tab.dirty)
547
+ ), x = y(
548
+ () => o.value && (m.value || v.value || I.value)
549
+ ), B = y(() => {
550
+ const $ = { position: "fixed", top: `${N.value.top}px`, zIndex: 50 };
551
+ return i.value === "right" ? { ...$, right: `${N.value.right + se}px` } : { ...$, left: `${N.value.left + se}px` };
552
+ });
553
+ function te() {
554
+ const $ = c.value;
555
+ if (!$) return;
556
+ const r = $.getBoundingClientRect();
557
+ N.value = {
558
+ top: r.top,
559
+ left: r.right,
560
+ right: window.innerWidth - r.left
561
+ };
562
+ }
563
+ function be($) {
564
+ const r = $.relatedTarget;
565
+ r && u.value?.contains(r) || (I.value = !1);
566
+ }
567
+ function ve() {
568
+ m.value = !0, te();
569
+ }
570
+ function ge() {
571
+ v.value = !0, te();
572
+ }
573
+ function U() {
574
+ A !== null && clearTimeout(A), A = null, E = null;
575
+ }
576
+ function ye($) {
577
+ $.button === 0 && (E = { x: $.clientX, y: $.clientY }, A = setTimeout(() => {
578
+ E && a("menu", E), U();
579
+ }, Tt));
580
+ }
581
+ function he($) {
582
+ if (!E) return;
583
+ (Math.abs($.clientX - E.x) > oe || Math.abs($.clientY - E.y) > oe) && U();
584
+ }
585
+ function pe($) {
586
+ $.button === 1 && P.value && ($.preventDefault(), a("close"));
587
+ }
588
+ function xe($) {
589
+ $.preventDefault(), a("menu", { x: $.clientX, y: $.clientY });
590
+ }
591
+ return _(U), ($, r) => (l(), n("div", {
592
+ ref_key: "raiz",
593
+ ref: c,
594
+ class: d(["group relative flex shrink-0 cursor-pointer items-center gap-2 rounded-corner border border-ui-border transition-colors", [
595
+ e.active ? "bg-primary font-bold text-tx-on-primary" : "bg-ui-bg/80 hover:bg-ui-surface/70",
596
+ O(o) ? "size-8 justify-center p-0 text-sm" : "w-34 max-w-34 px-3 py-1 text-sm"
597
+ ]]),
598
+ role: "tab",
599
+ "aria-selected": e.active,
600
+ title: k.value,
601
+ "aria-label": j.value,
602
+ tabindex: e.tabindex,
603
+ onClick: r[5] || (r[5] = z((C) => a("select"), ["stop"])),
604
+ onKeydown: [
605
+ r[6] || (r[6] = D(z((C) => a("select"), ["stop"]), ["enter"])),
606
+ r[7] || (r[7] = D(z((C) => a("select"), ["prevent", "stop"]), ["space"])),
607
+ r[8] || (r[8] = D(z((C) => a("navegar", "anterior"), ["prevent", "stop"]), ["left"])),
608
+ r[9] || (r[9] = D(z((C) => a("navegar", "anterior"), ["prevent", "stop"]), ["up"])),
609
+ r[10] || (r[10] = D(z((C) => a("navegar", "siguiente"), ["prevent", "stop"]), ["right"])),
610
+ r[11] || (r[11] = D(z((C) => a("navegar", "siguiente"), ["prevent", "stop"]), ["down"])),
611
+ r[12] || (r[12] = D(z((C) => a("navegar", "primera"), ["prevent", "stop"]), ["home"])),
612
+ r[13] || (r[13] = D(z((C) => a("navegar", "ultima"), ["prevent", "stop"]), ["end"])),
613
+ r[14] || (r[14] = D(z((C) => a("mover", -1), ["alt", "prevent", "stop"]), ["left"])),
614
+ r[15] || (r[15] = D(z((C) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
615
+ r[16] || (r[16] = D(z((C) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
616
+ r[17] || (r[17] = D(z((C) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
617
+ r[18] || (r[18] = D(z((C) => P.value && a("close"), ["prevent", "stop"]), ["delete"]))
618
+ ],
619
+ onAuxclick: z(pe, ["stop"]),
620
+ onContextmenu: xe,
621
+ onPointerdown: ye,
622
+ onPointermove: he,
623
+ onPointerup: U,
624
+ onPointerleave: U,
625
+ onMouseenter: ve,
626
+ onMouseleave: r[19] || (r[19] = (C) => m.value = !1),
627
+ onFocus: ge,
628
+ onBlur: r[20] || (r[20] = (C) => v.value = !1)
629
+ }, [
630
+ e.tab.icon ? (l(), F(M, {
631
+ key: 0,
632
+ name: e.tab.icon,
633
+ size: 16,
634
+ class: "shrink-0"
635
+ }, null, 8, ["name"])) : O(o) ? (l(), n("span", Ct, w(R.value), 1)) : f("", !0),
636
+ O(o) ? f("", !0) : (l(), n("span", zt, w(e.tab.label), 1)),
637
+ g.value ? (l(), n("span", {
638
+ key: 3,
639
+ class: d(["size-2 shrink-0 rounded-full bg-current", O(o) ? "absolute right-0.5 top-0.5" : ""]),
640
+ "aria-hidden": "true"
641
+ }, null, 2)) : p.value && !O(o) ? (l(), n("button", {
642
+ key: 4,
643
+ type: "button",
644
+ class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
645
+ title: e.closeLabel,
646
+ "aria-label": `${e.closeLabel}: ${j.value}`,
647
+ onClick: r[0] || (r[0] = z((C) => a("close"), ["stop"]))
648
+ }, [
649
+ V(M, {
650
+ name: "gtk-close",
651
+ type: "symbol",
652
+ size: 12
653
+ })
654
+ ], 8, Lt)) : f("", !0),
655
+ (l(), F(Me, { to: "body" }, [
656
+ V(Ie, {
657
+ "enter-active-class": "transition duration-150 ease-out",
658
+ "enter-from-class": "opacity-0 scale-95",
659
+ "leave-active-class": "transition duration-100 ease-in",
660
+ "leave-to-class": "opacity-0 scale-95"
661
+ }, {
662
+ default: W(() => [
663
+ x.value ? (l(), n("div", {
664
+ key: 0,
665
+ class: d(["flex items-center gap-2 rounded-corner border border-ui-border bg-ui-surface/95 px-3 py-1 text-sm shadow-lg", e.active ? "font-bold" : ""]),
666
+ ref_key: "desplegadoRef",
667
+ ref: u,
668
+ style: H(B.value),
669
+ onMouseenter: r[2] || (r[2] = (C) => I.value = !0),
670
+ onMouseleave: r[3] || (r[3] = (C) => I.value = !1),
671
+ onFocusin: r[4] || (r[4] = (C) => I.value = !0),
672
+ onFocusout: be
673
+ }, [
674
+ h("span", Bt, w(e.tab.label), 1),
675
+ e.tab.dirty ? (l(), n("span", St)) : f("", !0),
676
+ P.value ? (l(), n("button", {
677
+ key: 1,
678
+ type: "button",
679
+ class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
680
+ title: e.closeLabel,
681
+ "aria-label": `${e.closeLabel}: ${j.value}`,
682
+ onClick: r[1] || (r[1] = z((C) => a("close"), ["stop"]))
683
+ }, [
684
+ V(M, {
685
+ name: "gtk-close",
686
+ type: "symbol",
687
+ size: 12
688
+ })
689
+ ], 8, At)) : f("", !0)
690
+ ], 38)) : f("", !0)
691
+ ]),
692
+ _: 1
693
+ })
694
+ ]))
695
+ ], 42, wt));
696
+ }
697
+ }), Dt = ["aria-orientation"], Et = ["draggable", "onDragstart", "onDragover", "onDrop"], Mt = ["title", "aria-label"], It = /* @__PURE__ */ L({
698
+ __name: "TabBar",
699
+ props: {
700
+ tabs: {},
701
+ modelValue: { default: "" },
702
+ newLabel: { default: "" },
703
+ closeLabel: { default: "Close" },
704
+ dirtyLabel: { default: "Unsaved changes" },
705
+ fixedOrder: { type: Boolean, default: !1 }
706
+ },
707
+ emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
708
+ setup(e, { emit: s }) {
709
+ const t = e, a = s, { vertical: o } = G(), i = S(null), c = S(0), u = S(null), m = S(null);
710
+ function v(b) {
711
+ a("update:modelValue", b), a("select", b);
712
+ }
713
+ async function I(b, g) {
714
+ const p = t.tabs.length - 1;
715
+ if (p < 0) return;
716
+ const x = g === "primera" ? 0 : g === "ultima" ? p : g === "anterior" ? (b - 1 + t.tabs.length) % t.tabs.length : (b + 1) % t.tabs.length;
717
+ c.value = x, await re(), i.value?.querySelectorAll('[role="tab"]')?.[x]?.focus();
718
+ }
719
+ function N(b, g) {
720
+ if (t.fixedOrder) return;
721
+ const p = b + g;
722
+ if (p < 0 || p >= t.tabs.length) return;
723
+ const x = [...t.tabs], [B] = x.splice(b, 1);
724
+ B && (x.splice(p, 0, B), c.value = p, a("reorder", x));
725
+ }
726
+ function A(b) {
727
+ const g = i.value;
728
+ if (!g) return;
729
+ const p = b.deltaY || b.deltaX || 0, x = o.value ? g.scrollTop : g.scrollLeft;
730
+ o.value ? g.scrollTop += p : g.scrollLeft += p, (o.value ? g.scrollTop : g.scrollLeft) !== x && b.preventDefault();
731
+ }
732
+ function E(b, g) {
733
+ t.fixedOrder || (u.value = b, g.dataTransfer?.setData("text/plain", String(b)), g.dataTransfer && (g.dataTransfer.effectAllowed = "move"));
734
+ }
735
+ function P(b, g) {
736
+ t.fixedOrder || u.value === null || (g.preventDefault(), m.value = b, g.dataTransfer && (g.dataTransfer.dropEffect = "move"));
737
+ }
738
+ function k(b) {
739
+ const g = u.value;
740
+ if (j(), t.fixedOrder || g === null || g === b) return;
741
+ const p = [...t.tabs], [x] = p.splice(g, 1);
742
+ x && (p.splice(b, 0, x), a("reorder", p));
743
+ }
744
+ function j() {
745
+ u.value = null, m.value = null;
746
+ }
747
+ const R = y(
748
+ () => o.value ? "flex h-full flex-col items-center gap-1 overflow-y-auto overflow-x-hidden" : "flex items-center gap-1 overflow-x-auto overflow-y-hidden"
749
+ );
750
+ return (b, g) => (l(), n("div", {
751
+ class: d(["flex min-h-0 min-w-0 items-center gap-1", O(o) ? "w-full flex-col" : "h-full"]),
752
+ role: "tablist",
753
+ "aria-orientation": O(o) ? "vertical" : "horizontal"
754
+ }, [
755
+ h("div", {
756
+ ref_key: "carril",
757
+ ref: i,
758
+ class: d(R.value),
759
+ onWheel: A
760
+ }, [
761
+ (l(!0), n(X, null, Y(e.tabs, (p, x) => (l(), n("div", {
762
+ key: p.id,
763
+ class: d(["transition-opacity", [
764
+ u.value === x ? "opacity-40" : "",
765
+ m.value === x && u.value !== x ? "ring-2 ring-secondary rounded-corner" : ""
766
+ ]]),
767
+ draggable: !e.fixedOrder,
768
+ onDragstart: (B) => E(x, B),
769
+ onDragover: (B) => P(x, B),
770
+ onDrop: z((B) => k(x), ["prevent"]),
771
+ onDragend: j
772
+ }, [
773
+ V(me, {
774
+ tab: p,
775
+ active: p.id === e.modelValue,
776
+ "close-label": e.closeLabel,
777
+ "dirty-label": e.dirtyLabel,
778
+ tabindex: x === c.value ? 0 : -1,
779
+ onSelect: (B) => v(p.id),
780
+ onClose: (B) => a("close", p.id),
781
+ onMenu: (B) => a("menu", { id: p.id, ...B }),
782
+ onNavegar: (B) => I(x, B),
783
+ onMover: (B) => N(x, B)
784
+ }, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
785
+ ], 42, Et))), 128))
786
+ ], 34),
787
+ e.newLabel ? (l(), n("button", {
788
+ key: 0,
789
+ type: "button",
790
+ class: "flex size-7 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
791
+ title: e.newLabel,
792
+ "aria-label": e.newLabel,
793
+ onClick: g[0] || (g[0] = (p) => a("new"))
794
+ }, [
795
+ V(M, {
796
+ name: "gtk-add",
797
+ type: "symbol",
798
+ size: 14
799
+ })
800
+ ], 8, Mt)) : f("", !0)
801
+ ], 10, Dt));
802
+ }
803
+ }), Vt = { class: "relative flex shrink-0 items-center" }, jt = ["title", "aria-label", "aria-expanded"], Ot = ["value", "placeholder", "aria-label"], Pt = /* @__PURE__ */ L({
804
+ __name: "BarSearch",
805
+ props: {
806
+ modelValue: { default: "" },
807
+ placeholder: { default: "" },
808
+ label: { default: "Search" },
809
+ collapsed: { type: Boolean, default: !1 }
810
+ },
811
+ emits: ["update:modelValue", "search", "open", "close"],
812
+ setup(e, { emit: s }) {
813
+ const t = e, a = s, { vertical: o, posicion: i } = G(), c = S(!1), u = S(null), m = y(() => o.value || t.collapsed), v = y(() => !m.value || c.value), I = y(() => {
814
+ if (!m.value) return "";
815
+ const k = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
816
+ return i.value === "left" ? `${k} left-full top-0 ml-1` : i.value === "right" ? `${k} right-full top-0 mr-1` : i.value === "bottom" ? `${k} bottom-full right-0 mb-1` : `${k} top-full right-0 mt-1`;
817
+ });
818
+ async function N() {
819
+ c.value = !0, a("open"), await re(), u.value?.focus();
820
+ }
821
+ function A() {
822
+ c.value && (c.value = !1, a("close"));
823
+ }
824
+ function E(k) {
825
+ a("update:modelValue", k.target.value);
826
+ }
827
+ function P() {
828
+ a("search", t.modelValue);
829
+ }
830
+ return (k, j) => (l(), n("div", Vt, [
831
+ m.value ? (l(), n("button", {
832
+ key: 0,
833
+ type: "button",
834
+ class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
835
+ title: e.label,
836
+ "aria-label": e.label,
837
+ "aria-expanded": c.value,
838
+ onMousedown: j[0] || (j[0] = z(() => {
839
+ }, ["prevent"])),
840
+ onClick: j[1] || (j[1] = (R) => c.value ? A() : N())
841
+ }, [
842
+ V(M, {
843
+ name: "system-search",
844
+ type: "symbol",
845
+ size: 14
846
+ })
847
+ ], 40, jt)) : f("", !0),
848
+ v.value ? (l(), n("div", {
849
+ key: 1,
850
+ class: d(I.value)
851
+ }, [
852
+ h("input", {
853
+ ref_key: "campo",
854
+ ref: u,
855
+ type: "search",
856
+ class: d(["w-full rounded-corner border border-ui-border bg-ui-bg/80 px-2 py-1 text-sm outline-none focus:border-ui-border-strong", m.value ? "" : "w-48"]),
857
+ value: e.modelValue,
858
+ placeholder: e.placeholder || e.label,
859
+ "aria-label": e.label,
860
+ onInput: E,
861
+ onKeydown: [
862
+ D(P, ["enter"]),
863
+ D(A, ["esc"])
864
+ ],
865
+ onBlur: A
866
+ }, null, 42, Ot)
867
+ ], 2)) : f("", !0)
868
+ ]));
368
869
  }
369
- }), Pe = ["type", "disabled"], Ne = {
870
+ }), Nt = ["type", "disabled"], Rt = {
370
871
  key: 0,
371
872
  class: "w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"
372
- }, We = ["src", "alt"], Re = { key: 2 }, Ge = ["src", "alt"], Ue = /* @__PURE__ */ h({
873
+ }, Ft = ["src", "alt"], Wt = { key: 2 }, Ut = ["src", "alt"], Gt = /* @__PURE__ */ L({
373
874
  __name: "ActionButton",
374
875
  props: {
375
876
  label: {},
@@ -388,51 +889,51 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
388
889
  },
389
890
  emits: ["click"],
390
891
  setup(e, { emit: s }) {
391
- const t = e, n = s, o = {
892
+ const t = e, a = s, o = {
392
893
  primary: "bg-primary dark:bg-primary-dark text-tx-on-primary dark:text-tx-on-primary-dark hover:bg-primary/90 dark:hover:bg-primary-dark/90",
393
894
  secondary: "bg-secondary dark:bg-secondary-dark text-tx-on-primary dark:text-tx-on-primary-dark hover:bg-secondary/80 dark:hover:bg-secondary-dark/80",
394
895
  danger: "bg-status-error dark:bg-status-error-dark text-tx-on-primary dark:text-tx-on-primary-dark hover:bg-status-error/90 dark:hover:bg-status-error-dark/90"
395
- }, r = {
896
+ }, i = {
396
897
  sm: "px-2 py-1 text-xs",
397
898
  md: "px-3 py-1 text-sm",
398
899
  lg: "px-4 py-2 text-base"
399
- }, u = (m) => {
400
- t.stopPropagation && m.stopPropagation(), t.preventDefault && m.preventDefault(), !t.disabled && !t.loading && n("click");
900
+ }, c = (u) => {
901
+ t.stopPropagation && u.stopPropagation(), t.preventDefault && u.preventDefault(), !t.disabled && !t.loading && a("click");
401
902
  };
402
- return (m, c) => (a(), l("button", {
903
+ return (u, m) => (l(), n("button", {
403
904
  type: t.type,
404
- onClick: u,
405
- class: b(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
905
+ onClick: c,
906
+ class: d(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
406
907
  o[t.variant],
407
- r[t.size],
908
+ i[t.size],
408
909
  t.fullWidth ? "w-full" : "",
409
910
  t.iconSrc && !t.label ? "px-2 py-2" : "",
410
911
  e.customClass
411
912
  ]]),
412
913
  disabled: t.disabled || t.loading
413
914
  }, [
414
- e.loading ? (a(), l("span", Ne)) : f("", !0),
415
- t.iconSrc && !t.iconRight ? (a(), l("img", {
915
+ e.loading ? (l(), n("span", Rt)) : f("", !0),
916
+ t.iconSrc && !t.iconRight ? (l(), n("img", {
416
917
  key: 1,
417
918
  src: t.iconSrc,
418
919
  alt: t.iconAlt || t.label,
419
920
  class: "w-4 h-4"
420
- }, null, 8, We)) : f("", !0),
421
- t.label ? (a(), l("span", Re, g(t.label), 1)) : f("", !0),
422
- t.iconSrc && t.iconRight ? (a(), l("img", {
921
+ }, null, 8, Ft)) : f("", !0),
922
+ t.label ? (l(), n("span", Wt, w(t.label), 1)) : f("", !0),
923
+ t.iconSrc && t.iconRight ? (l(), n("img", {
423
924
  key: 3,
424
925
  src: t.iconSrc,
425
926
  alt: t.iconAlt || t.label,
426
927
  class: "w-4 h-4"
427
- }, null, 8, Ge)) : f("", !0)
428
- ], 10, Pe));
928
+ }, null, 8, Ut)) : f("", !0)
929
+ ], 10, Nt));
429
930
  }
430
- }), I = (e, s) => {
931
+ }), K = (e, s) => {
431
932
  const t = e.__vccOpts || e;
432
- for (const [n, o] of s)
433
- t[n] = o;
933
+ for (const [a, o] of s)
934
+ t[a] = o;
434
935
  return t;
435
- }, qe = /* @__PURE__ */ I(Ue, [["__scopeId", "data-v-2eaf6e27"]]), He = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, Je = /* @__PURE__ */ h({
936
+ }, Xt = /* @__PURE__ */ K(Gt, [["__scopeId", "data-v-2eaf6e27"]]), Yt = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, Kt = /* @__PURE__ */ L({
436
937
  __name: "ConfigSection",
437
938
  props: {
438
939
  title: {},
@@ -440,26 +941,26 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
440
941
  customClass: { default: () => ({}) }
441
942
  },
442
943
  setup(e) {
443
- return (s, t) => (a(), l("div", {
444
- class: b(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
944
+ return (s, t) => (l(), n("div", {
945
+ class: d(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
445
946
  }, [
446
- i("h3", He, g(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
447
- x(s.$slots, "default", {}, void 0, !0)
947
+ h("h3", Yt, w(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
948
+ T(s.$slots, "default", {}, void 0, !0)
448
949
  ], 2));
449
950
  }
450
- }), Ke = /* @__PURE__ */ I(Je, [["__scopeId", "data-v-45bd4eab"]]), Qe = { class: "flex items-center gap-3 flex-1 min-w-0" }, Xe = ["src", "alt"], Ye = { class: "min-w-0" }, Ze = { class: "font-semibold truncate" }, _e = {
951
+ }), qt = /* @__PURE__ */ K(Kt, [["__scopeId", "data-v-45bd4eab"]]), Ht = { class: "flex items-center gap-3 flex-1 min-w-0" }, Jt = ["src", "alt"], Qt = { class: "min-w-0" }, Zt = { class: "font-semibold truncate" }, _t = {
451
952
  key: 0,
452
953
  class: "text-xs text-gray-400 truncate"
453
- }, et = {
954
+ }, ea = {
454
955
  key: 1,
455
956
  class: "text-xs text-gray-400 truncate"
456
- }, tt = {
957
+ }, ta = {
457
958
  key: 2,
458
959
  class: "text-xs text-gray-400 flex gap-2 mt-1"
459
- }, at = {
960
+ }, aa = {
460
961
  key: 1,
461
962
  class: "w-2 h-2 rounded-full bg-green-500"
462
- }, lt = /* @__PURE__ */ h({
963
+ }, la = /* @__PURE__ */ L({
463
964
  __name: "DeviceCard",
464
965
  props: {
465
966
  icon: {},
@@ -476,39 +977,39 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
476
977
  },
477
978
  emits: ["action", "click"],
478
979
  setup(e, { emit: s }) {
479
- const t = s, n = () => {
980
+ const t = s, a = () => {
480
981
  t("action");
481
982
  }, o = () => {
482
983
  t("click");
483
984
  };
484
- return (r, u) => (a(), l("div", {
485
- class: b(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4", [{ "border-l-4 border-green-500": e.isConnected }, e.customClass]]),
985
+ return (i, c) => (l(), n("div", {
986
+ class: d(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4", [{ "border-l-4 border-green-500": e.isConnected }, e.customClass]]),
486
987
  onClick: o
487
988
  }, [
488
- i("div", Qe, [
489
- i("img", {
989
+ h("div", Ht, [
990
+ h("img", {
490
991
  src: e.icon,
491
992
  alt: e.title,
492
993
  class: "h-7 w-7 shrink-0"
493
- }, null, 8, Xe),
494
- i("div", Ye, [
495
- i("div", Ze, g(e.title), 1),
496
- e.subtitle ? (a(), l("div", _e, g(e.subtitle), 1)) : f("", !0),
497
- e.metadata ? (a(), l("div", et, g(e.metadata), 1)) : f("", !0),
498
- e.extraInfo && e.extraInfo.length > 0 ? (a(), l("div", tt, [
499
- (a(!0), l(z, null, A(e.extraInfo, (m, c) => (a(), l("span", { key: c }, g(m), 1))), 128))
994
+ }, null, 8, Jt),
995
+ h("div", Qt, [
996
+ h("div", Zt, w(e.title), 1),
997
+ e.subtitle ? (l(), n("div", _t, w(e.subtitle), 1)) : f("", !0),
998
+ e.metadata ? (l(), n("div", ea, w(e.metadata), 1)) : f("", !0),
999
+ e.extraInfo && e.extraInfo.length > 0 ? (l(), n("div", ta, [
1000
+ (l(!0), n(X, null, Y(e.extraInfo, (u, m) => (l(), n("span", { key: m }, w(u), 1))), 128))
500
1001
  ])) : f("", !0)
501
1002
  ])
502
1003
  ]),
503
- e.showActionButton ? (a(), l("button", {
1004
+ e.showActionButton ? (l(), n("button", {
504
1005
  key: 0,
505
1006
  class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
506
- onClick: te(n, ["stop"])
507
- }, g(e.actionLabel), 1)) : f("", !0),
508
- e.showStatusIndicator && e.isConnected ? (a(), l("div", at)) : f("", !0)
1007
+ onClick: z(a, ["stop"])
1008
+ }, w(e.actionLabel), 1)) : f("", !0),
1009
+ e.showStatusIndicator && e.isConnected ? (l(), n("div", aa)) : f("", !0)
509
1010
  ], 2));
510
1011
  }
511
- }), nt = ["for"], st = /* @__PURE__ */ h({
1012
+ }), na = ["for"], oa = /* @__PURE__ */ L({
512
1013
  __name: "FormGroup",
513
1014
  props: {
514
1015
  label: {},
@@ -517,18 +1018,18 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
517
1018
  labelClass: { default: () => ({}) }
518
1019
  },
519
1020
  setup(e) {
520
- return (s, t) => (a(), l("div", {
521
- class: b(["flex flex-col gap-2", e.customClass])
1021
+ return (s, t) => (l(), n("div", {
1022
+ class: d(["flex flex-col gap-2", e.customClass])
522
1023
  }, [
523
- e.label ? (a(), l("label", {
1024
+ e.label ? (l(), n("label", {
524
1025
  key: 0,
525
1026
  for: e.htmlFor,
526
- class: b(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
527
- }, g(e.label), 11, nt)) : f("", !0),
528
- x(s.$slots, "default", {}, void 0, !0)
1027
+ class: d(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
1028
+ }, w(e.label), 11, na)) : f("", !0),
1029
+ T(s.$slots, "default", {}, void 0, !0)
529
1030
  ], 2));
530
1031
  }
531
- }), ot = /* @__PURE__ */ I(st, [["__scopeId", "data-v-c0d9d9cb"]]), it = /* @__PURE__ */ h({
1032
+ }), sa = /* @__PURE__ */ K(oa, [["__scopeId", "data-v-c0d9d9cb"]]), ia = /* @__PURE__ */ L({
532
1033
  __name: "ListCard",
533
1034
  props: {
534
1035
  clickable: { type: Boolean, default: !1 },
@@ -536,11 +1037,11 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
536
1037
  },
537
1038
  emits: ["click"],
538
1039
  setup(e, { emit: s }) {
539
- const t = e, n = s, o = () => {
540
- t.clickable && n("click");
1040
+ const t = e, a = s, o = () => {
1041
+ t.clickable && a("click");
541
1042
  };
542
- return (r, u) => (a(), l("div", {
543
- class: b([
1043
+ return (i, c) => (l(), n("div", {
1044
+ class: d([
544
1045
  "flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
545
1046
  {
546
1047
  "hover:bg-vsk-primary/5 cursor-pointer": t.clickable
@@ -549,13 +1050,13 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
549
1050
  ]),
550
1051
  onClick: o
551
1052
  }, [
552
- x(r.$slots, "default", {}, void 0, !0)
1053
+ T(i.$slots, "default", {}, void 0, !0)
553
1054
  ], 2));
554
1055
  }
555
- }), rt = /* @__PURE__ */ I(it, [["__scopeId", "data-v-f86d47da"]]), ct = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, dt = ["src", "alt", "title"], ut = {
1056
+ }), ra = /* @__PURE__ */ K(ia, [["__scopeId", "data-v-f86d47da"]]), ua = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, ca = ["src", "alt", "title"], da = {
556
1057
  key: 1,
557
1058
  class: "w-8 h-8 flex items-center justify-center"
558
- }, mt = ["src", "alt"], ft = ["min", "max", "value"], bt = /* @__PURE__ */ h({
1059
+ }, fa = ["src", "alt"], ma = ["min", "max", "value"], ba = /* @__PURE__ */ L({
559
1060
  __name: "SliderControl",
560
1061
  props: {
561
1062
  icon: {},
@@ -570,49 +1071,49 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
570
1071
  },
571
1072
  emits: ["update:modelValue", "buttonClick"],
572
1073
  setup(e, { emit: s }) {
573
- const t = e, n = s, o = k(() => {
1074
+ const t = e, a = s, o = y(() => {
574
1075
  if (t.max <= t.min) return 0;
575
- const c = t.max - t.min, d = t.modelValue - t.min;
576
- return Math.round(d / c * 100);
577
- }), r = k(() => t.getPercentageClass ? t.getPercentageClass(o.value) : ""), u = (c) => {
578
- const d = c.target;
579
- n("update:modelValue", Number(d.value));
580
- }, m = () => {
581
- n("buttonClick");
1076
+ const m = t.max - t.min, v = t.modelValue - t.min;
1077
+ return Math.round(v / m * 100);
1078
+ }), i = y(() => t.getPercentageClass ? t.getPercentageClass(o.value) : ""), c = (m) => {
1079
+ const v = m.target;
1080
+ a("update:modelValue", Number(v.value));
1081
+ }, u = () => {
1082
+ a("buttonClick");
582
1083
  };
583
- return (c, d) => (a(), l("div", ct, [
584
- e.showButton ? (a(), l("button", {
1084
+ return (m, v) => (l(), n("div", ua, [
1085
+ e.showButton ? (l(), n("button", {
585
1086
  key: 0,
586
- onClick: m,
1087
+ onClick: u,
587
1088
  class: "w-8 h-8 flex items-center justify-center rounded-corner transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80 hover:scale-110 active:scale-95"
588
1089
  }, [
589
- i("img", {
1090
+ h("img", {
590
1091
  src: e.icon,
591
1092
  alt: e.alt,
592
1093
  title: e.tooltip,
593
- class: b(["w-6 h-6 transition-all duration-200", e.iconClass])
594
- }, null, 10, dt)
595
- ])) : (a(), l("div", ut, [
596
- i("img", {
1094
+ class: d(["w-6 h-6 transition-all duration-200", e.iconClass])
1095
+ }, null, 10, ca)
1096
+ ])) : (l(), n("div", da, [
1097
+ h("img", {
597
1098
  src: e.icon,
598
1099
  alt: e.alt,
599
1100
  class: "w-6 h-6 transition-all duration-200"
600
- }, null, 8, mt)
1101
+ }, null, 8, fa)
601
1102
  ])),
602
- i("input", {
1103
+ h("input", {
603
1104
  type: "range",
604
1105
  min: e.min,
605
1106
  max: e.max,
606
1107
  value: e.modelValue,
607
- onInput: u,
1108
+ onInput: c,
608
1109
  class: "flex-1 transition-all duration-200 hover:scale-105"
609
- }, null, 40, ft),
610
- i("span", {
611
- class: b(["w-12 text-right transition-all duration-200 font-medium", r.value])
612
- }, g(o.value) + "% ", 3)
1110
+ }, null, 40, ma),
1111
+ h("span", {
1112
+ class: d(["w-12 text-right transition-all duration-200 font-medium", i.value])
1113
+ }, w(o.value) + "% ", 3)
613
1114
  ]));
614
1115
  }
615
- }), gt = ["disabled"], ht = /* @__PURE__ */ h({
1116
+ }), va = ["disabled"], ga = /* @__PURE__ */ L({
616
1117
  __name: "SwitchToggle",
617
1118
  props: {
618
1119
  isOn: { type: Boolean },
@@ -624,14 +1125,14 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
624
1125
  },
625
1126
  emits: ["toggle"],
626
1127
  setup(e, { emit: s }) {
627
- const t = e, n = s, o = () => {
628
- n("toggle", !t.isOn);
1128
+ const t = e, a = s, o = () => {
1129
+ a("toggle", !t.isOn);
629
1130
  };
630
- return (r, u) => (a(), l("button", {
1131
+ return (i, c) => (l(), n("button", {
631
1132
  type: "button",
632
1133
  onClick: o,
633
1134
  disabled: e.disabled,
634
- class: b([
1135
+ class: d([
635
1136
  "relative inline-flex items-center rounded-full transition-colors",
636
1137
  e.size === "small" ? "h-6 w-11" : "h-7 w-12",
637
1138
  e.isOn ? e.activeClass : e.inactiveClass,
@@ -639,16 +1140,16 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
639
1140
  e.customClass
640
1141
  ])
641
1142
  }, [
642
- i("span", {
643
- class: b([
1143
+ h("span", {
1144
+ class: d([
644
1145
  "inline-block transform rounded-full bg-white shadow transition-transform",
645
1146
  e.size === "small" ? "h-4 w-4" : "h-6 w-6",
646
1147
  e.isOn ? e.size === "small" ? "translate-x-6" : "translate-x-5" : "translate-x-1"
647
1148
  ])
648
1149
  }, null, 2)
649
- ], 10, gt));
1150
+ ], 10, va));
650
1151
  }
651
- }), vt = ["disabled"], yt = ["src", "alt", "title"], xt = /* @__PURE__ */ h({
1152
+ }), ya = ["disabled"], ha = ["src", "alt", "title"], pa = /* @__PURE__ */ L({
652
1153
  __name: "ToggleControl",
653
1154
  props: {
654
1155
  icon: {},
@@ -661,12 +1162,12 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
661
1162
  },
662
1163
  emits: ["click"],
663
1164
  setup(e, { emit: s }) {
664
- const t = s, n = () => {
1165
+ const t = s, a = () => {
665
1166
  t("click");
666
1167
  };
667
- return (o, r) => (a(), l("button", {
668
- onClick: n,
669
- class: b(["p-2 rounded-corner background hover:opacity-50 transition-all duration-300 h-17.5 w-17.5 group relative overflow-hidden hover:scale-105 hover:shadow-lg active:scale-95", {
1168
+ return (o, i) => (l(), n("button", {
1169
+ onClick: a,
1170
+ class: d(["p-2 rounded-corner background hover:opacity-50 transition-all duration-300 h-17.5 w-17.5 group relative overflow-hidden hover:scale-105 hover:shadow-lg active:scale-95", {
670
1171
  "animate-pulse": e.isLoading,
671
1172
  "ring-2 ring-primary dark:ring-primary-dark": e.isActive,
672
1173
  "opacity-60": !e.isActive,
@@ -674,23 +1175,23 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
674
1175
  }]),
675
1176
  disabled: e.isLoading
676
1177
  }, [
677
- i("img", {
1178
+ h("img", {
678
1179
  src: e.icon,
679
1180
  alt: e.alt,
680
1181
  title: e.tooltip,
681
- class: b(["m-auto w-12.5 h-12.5 transition-all duration-300 group-hover:scale-110 relative z-10", {
1182
+ class: d(["m-auto w-12.5 h-12.5 transition-all duration-300 group-hover:scale-110 relative z-10", {
682
1183
  "animate-spin": e.isLoading,
683
1184
  "filter brightness-75": !e.isActive,
684
1185
  "drop-shadow-lg": e.isActive,
685
1186
  ...e.iconClass
686
1187
  }])
687
- }, null, 10, yt)
688
- ], 10, vt));
1188
+ }, null, 10, ha)
1189
+ ], 10, ya));
689
1190
  }
690
- }), pt = ["title"], kt = ["src", "alt"], wt = {
1191
+ }), xa = ["title"], ka = ["src", "alt"], $a = {
691
1192
  key: 0,
692
1193
  class: "absolute bottom-1 right-1 bg-primary dark:bg-primary-dark text-white text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold animate-bounce"
693
- }, Ct = /* @__PURE__ */ h({
1194
+ }, wa = /* @__PURE__ */ L({
694
1195
  __name: "TrayIconButton",
695
1196
  props: {
696
1197
  icon: {},
@@ -705,73 +1206,90 @@ const oe = ["src", "alt"], $ = /* @__PURE__ */ h({
705
1206
  },
706
1207
  emits: ["click"],
707
1208
  setup(e, { emit: s }) {
708
- const t = s, n = y(!1), o = () => {
1209
+ const t = s, a = S(!1), o = () => {
709
1210
  t("click");
710
1211
  };
711
- return (r, u) => (a(), l("div", {
712
- class: b(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300", e.customClass]),
1212
+ return (i, c) => (l(), n("div", {
1213
+ class: d(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300", e.customClass]),
713
1214
  title: e.tooltip,
714
1215
  onClick: o,
715
- onMouseenter: u[0] || (u[0] = (m) => n.value = !0),
716
- onMouseleave: u[1] || (u[1] = (m) => n.value = !1)
1216
+ onMouseenter: c[0] || (c[0] = (u) => a.value = !0),
1217
+ onMouseleave: c[1] || (c[1] = (u) => a.value = !1)
717
1218
  }, [
718
- i("img", {
1219
+ h("img", {
719
1220
  src: e.icon,
720
1221
  alt: e.alt,
721
- class: b(["m-auto h-5.5 w-auto transition-all duration-300", e.iconClass])
722
- }, null, 10, kt),
723
- e.badge !== null && e.badge > 0 ? (a(), l("div", wt, g(e.badge), 1)) : f("", !0),
724
- e.showCustomTooltip && e.customTooltipText ? (a(), l("div", {
1222
+ class: d(["m-auto h-5.5 w-auto transition-all duration-300", e.iconClass])
1223
+ }, null, 10, ka),
1224
+ e.badge !== null && e.badge > 0 ? (l(), n("div", $a, w(e.badge), 1)) : f("", !0),
1225
+ e.showCustomTooltip && e.customTooltipText ? (l(), n("div", {
725
1226
  key: 1,
726
- class: b(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-corner transition-all duration-300 pointer-events-none background", [
1227
+ class: d(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-corner transition-all duration-300 pointer-events-none background", [
727
1228
  e.tooltipClass,
728
1229
  {
729
- "opacity-0 -translate-y-2": !n.value,
730
- "opacity-100 translate-y-0": n.value
1230
+ "opacity-0 -translate-y-2": !a.value,
1231
+ "opacity-100 translate-y-0": a.value
731
1232
  }
732
1233
  ]])
733
- }, g(e.customTooltipText), 3)) : f("", !0),
734
- x(r.$slots, "default")
735
- ], 42, pt));
1234
+ }, w(e.customTooltipText), 3)) : f("", !0),
1235
+ T(i.$slots, "default")
1236
+ ], 42, xa));
736
1237
  }
737
- }), $t = [
738
- $e,
739
- W,
740
- N,
741
- Le,
742
- $,
743
- Fe,
744
- qe,
745
- Ke,
746
- lt,
747
- ot,
748
- rt,
749
- bt,
750
- ht,
751
- xt,
752
- Ct
753
- ], At = {
1238
+ }), Ca = [
1239
+ nt,
1240
+ ce,
1241
+ ue,
1242
+ ut,
1243
+ M,
1244
+ $t,
1245
+ fe,
1246
+ de,
1247
+ It,
1248
+ me,
1249
+ Pt,
1250
+ Xt,
1251
+ qt,
1252
+ la,
1253
+ sa,
1254
+ ra,
1255
+ ba,
1256
+ ga,
1257
+ pa,
1258
+ wa
1259
+ ], Aa = {
754
1260
  install(e) {
755
- $t.forEach((s) => {
1261
+ Ca.forEach((s) => {
756
1262
  e.component(s.name, s);
757
1263
  });
758
1264
  }
759
1265
  };
760
1266
  export {
761
- qe as ActionButton,
762
- Ke as ConfigSection,
763
- lt as DeviceCard,
764
- ot as FormGroup,
765
- rt as ListCard,
766
- Le as SelectField,
767
- $e as SideBar,
768
- W as SideButton,
769
- N as SideGroup,
770
- bt as SliderControl,
771
- ht as SwitchToggle,
772
- $ as ThemeIcon,
773
- xt as ToggleControl,
774
- Ct as TrayIconButton,
775
- Fe as WindowFrame,
776
- At as default
1267
+ Xt as ActionButton,
1268
+ fe as AppBar,
1269
+ Pt as BarSearch,
1270
+ ee as CLAVE_DE_LA_BARRA,
1271
+ qt as ConfigSection,
1272
+ la as DeviceCard,
1273
+ sa as FormGroup,
1274
+ ra as ListCard,
1275
+ ct as POSICIONES,
1276
+ ut as SelectField,
1277
+ nt as SideBar,
1278
+ ce as SideButton,
1279
+ ue as SideGroup,
1280
+ ba as SliderControl,
1281
+ ga as SwitchToggle,
1282
+ It as TabBar,
1283
+ me as TabItem,
1284
+ M as ThemeIcon,
1285
+ pa as ToggleControl,
1286
+ wa as TrayIconButton,
1287
+ de as WindowControls,
1288
+ $t as WindowFrame,
1289
+ Aa as default,
1290
+ dt as esPosicion,
1291
+ J as orientacionDe,
1292
+ bt as posicionDe,
1293
+ G as usarLaBarra,
1294
+ vt as usarLaPosicionDeLaBarra
777
1295
  };