@vasakgroup/vue-libvasak 0.2.0 → 0.2.2

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,19 +1,19 @@
1
- import { createElementBlock as s, openBlock as o, renderSlot as k, defineComponent as y, createElementVNode as u, ref as x, onMounted as q, toDisplayString as w, unref as W, Fragment as F, createVNode as Z, normalizeClass as d, createCommentVNode as g, renderList as Q, withModifiers as Y, computed as T } from "vue";
1
+ import { createElementBlock as s, openBlock as r, renderSlot as k, defineComponent as m, createElementVNode as u, ref as x, onMounted as q, toDisplayString as g, unref as W, Fragment as F, createVNode as Z, normalizeClass as d, createCommentVNode as w, renderList as Q, withModifiers as Y, computed as T } from "vue";
2
2
  const D = (t, e) => {
3
3
  const i = t.__vccOpts || t;
4
- for (const [l, a] of e)
5
- i[l] = a;
4
+ for (const [a, l] of e)
5
+ i[a] = l;
6
6
  return i;
7
7
  }, K = {}, X = { class: "sidebar" };
8
8
  function ee(t, e) {
9
- return o(), s("div", X, [
9
+ return r(), s("div", X, [
10
10
  k(t.$slots, "default")
11
11
  ]);
12
12
  }
13
13
  const te = /* @__PURE__ */ D(K, [["render", ee]]), ie = {
14
14
  href: "#",
15
15
  class: "sidebar-button"
16
- }, ne = ["src", "alt"], le = /* @__PURE__ */ y({
16
+ }, ne = ["src", "alt"], ae = /* @__PURE__ */ m({
17
17
  __name: "SideButton",
18
18
  props: {
19
19
  title: {
@@ -26,7 +26,7 @@ const te = /* @__PURE__ */ D(K, [["render", ee]]), ie = {
26
26
  }
27
27
  },
28
28
  setup(t) {
29
- return (e, i) => (o(), s("a", ie, [
29
+ return (e, i) => (r(), s("a", ie, [
30
30
  u("img", {
31
31
  src: t.image,
32
32
  alt: t.title,
@@ -35,25 +35,25 @@ const te = /* @__PURE__ */ D(K, [["render", ee]]), ie = {
35
35
  ]));
36
36
  }
37
37
  });
38
- function ae(t, e, i, l) {
39
- if (typeof e == "function" ? t !== e || !l : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
40
- return i === "m" ? l : i === "a" ? l.call(t) : l ? l.value : e.get(t);
38
+ function le(t, e, i, a) {
39
+ if (typeof e == "function" ? t !== e || !a : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
40
+ return i === "m" ? a : i === "a" ? a.call(t) : a ? a.value : e.get(t);
41
41
  }
42
- function se(t, e, i, l, a) {
42
+ function se(t, e, i, a, l) {
43
43
  if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
44
44
  return e.set(t, i), i;
45
45
  }
46
46
  var I;
47
- const m = "__TAURI_TO_IPC_KEY__";
48
- function oe(t, e = !1) {
47
+ const y = "__TAURI_TO_IPC_KEY__";
48
+ function re(t, e = !1) {
49
49
  return window.__TAURI_INTERNALS__.transformCallback(t, e);
50
50
  }
51
51
  async function n(t, e = {}, i) {
52
52
  return window.__TAURI_INTERNALS__.invoke(t, e, i);
53
53
  }
54
- class re {
54
+ class oe {
55
55
  get rid() {
56
- return ae(this, I, "f");
56
+ return le(this, I, "f");
57
57
  }
58
58
  constructor(e) {
59
59
  I.set(this, void 0), se(this, I, e);
@@ -91,14 +91,14 @@ class V {
91
91
  toPhysical(e) {
92
92
  return new C(this.width * e, this.height * e);
93
93
  }
94
- [m]() {
94
+ [y]() {
95
95
  return {
96
96
  width: this.width,
97
97
  height: this.height
98
98
  };
99
99
  }
100
100
  toJSON() {
101
- return this[m]();
101
+ return this[y]();
102
102
  }
103
103
  }
104
104
  class C {
@@ -119,14 +119,14 @@ class C {
119
119
  toLogical(e) {
120
120
  return new V(this.width / e, this.height / e);
121
121
  }
122
- [m]() {
122
+ [y]() {
123
123
  return {
124
124
  width: this.width,
125
125
  height: this.height
126
126
  };
127
127
  }
128
128
  toJSON() {
129
- return this[m]();
129
+ return this[y]();
130
130
  }
131
131
  }
132
132
  class _ {
@@ -139,7 +139,7 @@ class _ {
139
139
  toPhysical(e) {
140
140
  return this.size instanceof C ? this.size : this.size.toPhysical(e);
141
141
  }
142
- [m]() {
142
+ [y]() {
143
143
  return {
144
144
  [`${this.size.type}`]: {
145
145
  width: this.size.width,
@@ -148,7 +148,7 @@ class _ {
148
148
  };
149
149
  }
150
150
  toJSON() {
151
- return this[m]();
151
+ return this[y]();
152
152
  }
153
153
  }
154
154
  class U {
@@ -171,19 +171,19 @@ class U {
171
171
  * @since 2.0.0
172
172
  */
173
173
  toPhysical(e) {
174
- return new p(this.x * e, this.y * e);
174
+ return new f(this.x * e, this.y * e);
175
175
  }
176
- [m]() {
176
+ [y]() {
177
177
  return {
178
178
  x: this.x,
179
179
  y: this.y
180
180
  };
181
181
  }
182
182
  toJSON() {
183
- return this[m]();
183
+ return this[y]();
184
184
  }
185
185
  }
186
- class p {
186
+ class f {
187
187
  constructor(...e) {
188
188
  this.type = "Physical", e.length === 1 ? "Physical" in e[0] ? (this.x = e[0].Physical.x, this.y = e[0].Physical.y) : (this.x = e[0].x, this.y = e[0].y) : (this.x = e[0], this.y = e[1]);
189
189
  }
@@ -205,14 +205,14 @@ class p {
205
205
  toLogical(e) {
206
206
  return new U(this.x / e, this.y / e);
207
207
  }
208
- [m]() {
208
+ [y]() {
209
209
  return {
210
210
  x: this.x,
211
211
  y: this.y
212
212
  };
213
213
  }
214
214
  toJSON() {
215
- return this[m]();
215
+ return this[y]();
216
216
  }
217
217
  }
218
218
  class z {
@@ -223,9 +223,9 @@ class z {
223
223
  return this.position instanceof U ? this.position : this.position.toLogical(e);
224
224
  }
225
225
  toPhysical(e) {
226
- return this.position instanceof p ? this.position : this.position.toPhysical(e);
226
+ return this.position instanceof f ? this.position : this.position.toPhysical(e);
227
227
  }
228
- [m]() {
228
+ [y]() {
229
229
  return {
230
230
  [`${this.position.type}`]: {
231
231
  x: this.position.x,
@@ -234,7 +234,7 @@ class z {
234
234
  };
235
235
  }
236
236
  toJSON() {
237
- return this[m]();
237
+ return this[y]();
238
238
  }
239
239
  }
240
240
  var b;
@@ -248,17 +248,17 @@ async function G(t, e) {
248
248
  });
249
249
  }
250
250
  async function H(t, e, i) {
251
- var l;
252
- const a = typeof i?.target == "string" ? { kind: "AnyLabel", label: i.target } : (l = i?.target) !== null && l !== void 0 ? l : { kind: "Any" };
251
+ var a;
252
+ const l = typeof i?.target == "string" ? { kind: "AnyLabel", label: i.target } : (a = i?.target) !== null && a !== void 0 ? a : { kind: "Any" };
253
253
  return n("plugin:event|listen", {
254
254
  event: t,
255
- target: a,
256
- handler: oe(e)
255
+ target: l,
256
+ handler: re(e)
257
257
  }).then((c) => async () => G(t, c));
258
258
  }
259
259
  async function ue(t, e, i) {
260
- return H(t, (l) => {
261
- G(t, l.id), e(l);
260
+ return H(t, (a) => {
261
+ G(t, a.id), e(a);
262
262
  }, i);
263
263
  }
264
264
  async function ce(t, e) {
@@ -274,7 +274,7 @@ async function de(t, e, i) {
274
274
  payload: i
275
275
  });
276
276
  }
277
- class S extends re {
277
+ class S extends oe {
278
278
  /**
279
279
  * Creates an Image from a resource ID. For internal use only.
280
280
  *
@@ -284,12 +284,12 @@ class S extends re {
284
284
  super(e);
285
285
  }
286
286
  /** Creates a new Image using RGBA data, in row-major order from top to bottom, and with specified width and height. */
287
- static async new(e, i, l) {
287
+ static async new(e, i, a) {
288
288
  return n("plugin:image|new", {
289
289
  rgba: A(e),
290
290
  width: i,
291
- height: l
292
- }).then((a) => new S(a));
291
+ height: a
292
+ }).then((l) => new S(l));
293
293
  }
294
294
  /**
295
295
  * Creates a new image using the provided bytes by inferring the file format.
@@ -389,14 +389,14 @@ class J {
389
389
  * @returns The {@link Window} instance to communicate with the window.
390
390
  */
391
391
  constructor(e, i = {}) {
392
- var l;
392
+ var a;
393
393
  this.label = e, this.listeners = /* @__PURE__ */ Object.create(null), i?.skip || n("plugin:window|create", {
394
394
  options: {
395
395
  ...i,
396
- parent: typeof i.parent == "string" ? i.parent : (l = i.parent) === null || l === void 0 ? void 0 : l.label,
396
+ parent: typeof i.parent == "string" ? i.parent : (a = i.parent) === null || a === void 0 ? void 0 : a.label,
397
397
  label: e
398
398
  }
399
- }).then(async () => this.emit("tauri://created")).catch(async (a) => this.emit("tauri://error", a));
399
+ }).then(async () => this.emit("tauri://created")).catch(async (l) => this.emit("tauri://error", l));
400
400
  }
401
401
  /**
402
402
  * Gets the Window associated with the given label.
@@ -411,7 +411,7 @@ class J {
411
411
  */
412
412
  static async getByLabel(e) {
413
413
  var i;
414
- return (i = (await $()).find((l) => l.label === e)) !== null && i !== void 0 ? i : null;
414
+ return (i = (await $()).find((a) => a.label === e)) !== null && i !== void 0 ? i : null;
415
415
  }
416
416
  /**
417
417
  * Get an instance of `Window` for the current window.
@@ -462,8 +462,8 @@ class J {
462
462
  */
463
463
  async listen(e, i) {
464
464
  return this._handleTauriEvent(e, i) ? () => {
465
- const l = this.listeners[e];
466
- l.splice(l.indexOf(i), 1);
465
+ const a = this.listeners[e];
466
+ a.splice(a.indexOf(i), 1);
467
467
  } : H(e, i, {
468
468
  target: { kind: "Window", label: this.label }
469
469
  });
@@ -489,8 +489,8 @@ class J {
489
489
  */
490
490
  async once(e, i) {
491
491
  return this._handleTauriEvent(e, i) ? () => {
492
- const l = this.listeners[e];
493
- l.splice(l.indexOf(i), 1);
492
+ const a = this.listeners[e];
493
+ a.splice(a.indexOf(i), 1);
494
494
  } : ue(e, i, {
495
495
  target: { kind: "Window", label: this.label }
496
496
  });
@@ -508,8 +508,8 @@ class J {
508
508
  */
509
509
  async emit(e, i) {
510
510
  if (O.includes(e)) {
511
- for (const l of this.listeners[e] || [])
512
- l({
511
+ for (const a of this.listeners[e] || [])
512
+ a({
513
513
  event: e,
514
514
  id: -1,
515
515
  payload: i
@@ -530,17 +530,17 @@ class J {
530
530
  * @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`.
531
531
  * @param payload Event payload.
532
532
  */
533
- async emitTo(e, i, l) {
533
+ async emitTo(e, i, a) {
534
534
  if (O.includes(i)) {
535
- for (const a of this.listeners[i] || [])
536
- a({
535
+ for (const l of this.listeners[i] || [])
536
+ l({
537
537
  event: i,
538
538
  id: -1,
539
- payload: l
539
+ payload: a
540
540
  });
541
541
  return;
542
542
  }
543
- return de(e, i, l);
543
+ return de(e, i, a);
544
544
  }
545
545
  /** @ignore */
546
546
  _handleTauriEvent(e, i) {
@@ -575,7 +575,7 @@ class J {
575
575
  async innerPosition() {
576
576
  return n("plugin:window|inner_position", {
577
577
  label: this.label
578
- }).then((e) => new p(e));
578
+ }).then((e) => new f(e));
579
579
  }
580
580
  /**
581
581
  * The position of the top-left hand corner of the window relative to the top-left hand corner of the desktop.
@@ -590,7 +590,7 @@ class J {
590
590
  async outerPosition() {
591
591
  return n("plugin:window|outer_position", {
592
592
  label: this.label
593
- }).then((e) => new p(e));
593
+ }).then((e) => new f(e));
594
594
  }
595
595
  /**
596
596
  * The physical size of the window's client area.
@@ -1322,8 +1322,8 @@ class J {
1322
1322
  * @returns A promise indicating the success or failure of the operation.
1323
1323
  */
1324
1324
  async setSizeConstraints(e) {
1325
- function i(l) {
1326
- return l ? { Logical: l } : null;
1325
+ function i(a) {
1326
+ return a ? { Logical: a } : null;
1327
1327
  }
1328
1328
  return n("plugin:window|set_size_constraints", {
1329
1329
  label: this.label,
@@ -1790,7 +1790,7 @@ class J {
1790
1790
  */
1791
1791
  async onMoved(e) {
1792
1792
  return this.listen(b.WINDOW_MOVED, (i) => {
1793
- i.payload = new p(i.payload), e(i);
1793
+ i.payload = new f(i.payload), e(i);
1794
1794
  });
1795
1795
  }
1796
1796
  /**
@@ -1817,8 +1817,8 @@ class J {
1817
1817
  */
1818
1818
  async onCloseRequested(e) {
1819
1819
  return this.listen(b.WINDOW_CLOSE_REQUESTED, async (i) => {
1820
- const l = new he(i);
1821
- await e(l), l.isPreventDefault() || await this.destroy();
1820
+ const a = new he(i);
1821
+ await e(a), a.isPreventDefault() || await this.destroy();
1822
1822
  });
1823
1823
  }
1824
1824
  /**
@@ -1847,37 +1847,37 @@ class J {
1847
1847
  * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
1848
1848
  */
1849
1849
  async onDragDropEvent(e) {
1850
- const i = await this.listen(b.DRAG_ENTER, (r) => {
1850
+ const i = await this.listen(b.DRAG_ENTER, (o) => {
1851
1851
  e({
1852
- ...r,
1852
+ ...o,
1853
1853
  payload: {
1854
1854
  type: "enter",
1855
- paths: r.payload.paths,
1856
- position: new p(r.payload.position)
1855
+ paths: o.payload.paths,
1856
+ position: new f(o.payload.position)
1857
1857
  }
1858
1858
  });
1859
- }), l = await this.listen(b.DRAG_OVER, (r) => {
1859
+ }), a = await this.listen(b.DRAG_OVER, (o) => {
1860
1860
  e({
1861
- ...r,
1861
+ ...o,
1862
1862
  payload: {
1863
1863
  type: "over",
1864
- position: new p(r.payload.position)
1864
+ position: new f(o.payload.position)
1865
1865
  }
1866
1866
  });
1867
- }), a = await this.listen(b.DRAG_DROP, (r) => {
1867
+ }), l = await this.listen(b.DRAG_DROP, (o) => {
1868
1868
  e({
1869
- ...r,
1869
+ ...o,
1870
1870
  payload: {
1871
1871
  type: "drop",
1872
- paths: r.payload.paths,
1873
- position: new p(r.payload.position)
1872
+ paths: o.payload.paths,
1873
+ position: new f(o.payload.position)
1874
1874
  }
1875
1875
  });
1876
- }), c = await this.listen(b.DRAG_LEAVE, (r) => {
1877
- e({ ...r, payload: { type: "leave" } });
1876
+ }), c = await this.listen(b.DRAG_LEAVE, (o) => {
1877
+ e({ ...o, payload: { type: "leave" } });
1878
1878
  });
1879
1879
  return () => {
1880
- i(), a(), l(), c();
1880
+ i(), l(), a(), c();
1881
1881
  };
1882
1882
  }
1883
1883
  /**
@@ -1898,13 +1898,13 @@ class J {
1898
1898
  * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
1899
1899
  */
1900
1900
  async onFocusChanged(e) {
1901
- const i = await this.listen(b.WINDOW_FOCUS, (a) => {
1902
- e({ ...a, payload: !0 });
1903
- }), l = await this.listen(b.WINDOW_BLUR, (a) => {
1904
- e({ ...a, payload: !1 });
1901
+ const i = await this.listen(b.WINDOW_FOCUS, (l) => {
1902
+ e({ ...l, payload: !0 });
1903
+ }), a = await this.listen(b.WINDOW_BLUR, (l) => {
1904
+ e({ ...l, payload: !1 });
1905
1905
  });
1906
1906
  return () => {
1907
- i(), l();
1907
+ i(), a();
1908
1908
  };
1909
1909
  }
1910
1910
  /**
@@ -1971,7 +1971,7 @@ var M;
1971
1971
  async function be(t, e = {}, i) {
1972
1972
  return window.__TAURI_INTERNALS__.invoke(t, e, i);
1973
1973
  }
1974
- async function we(t) {
1974
+ async function ge(t) {
1975
1975
  try {
1976
1976
  return await be("plugin:vicons|get_icon", { name: t });
1977
1977
  } catch (e) {
@@ -1979,11 +1979,11 @@ async function we(t) {
1979
1979
  }
1980
1980
  return "";
1981
1981
  }
1982
- function ge(t) {
1982
+ function we(t) {
1983
1983
  try {
1984
1984
  const e = atob(t.substring(0, 32)), i = new Uint8Array(e.length);
1985
- for (let l = 0; l < e.length; l++)
1986
- i[l] = e.charCodeAt(l);
1985
+ for (let a = 0; a < e.length; a++)
1986
+ i[a] = e.charCodeAt(a);
1987
1987
  return i[0] === 137 && i[1] === 80 && i[2] === 78 && i[3] === 71 ? "image/png" : "image/svg+xml";
1988
1988
  } catch (e) {
1989
1989
  return console.error("Error identificando tipo de imagen:", e), "image/png";
@@ -1991,43 +1991,44 @@ function ge(t) {
1991
1991
  }
1992
1992
  async function L(t) {
1993
1993
  try {
1994
- const e = await we(t);
1995
- return `data:${ge(e)};base64,${e}`;
1994
+ const e = await ge(t);
1995
+ return `data:${we(e)};base64,${e}`;
1996
1996
  } catch (e) {
1997
1997
  return console.error("[Icon Error] Error obteniendo icono:", e), "";
1998
1998
  }
1999
1999
  }
2000
- const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-drag-region": "" }, pe = { "data-tauri-drag-region": "" }, ve = ["src"], _e = ["src"], ke = ["src"], xe = /* @__PURE__ */ y({
2000
+ const ye = { "data-tauri-drag-region": "" }, me = ["src", "alt"], pe = { "data-tauri-drag-region": "" }, fe = { "data-tauri-drag-region": "" }, ve = ["src"], _e = ["src"], ke = ["src"], xe = /* @__PURE__ */ m({
2001
2001
  __name: "TopBar",
2002
2002
  props: {
2003
2003
  title: String,
2004
2004
  image: String
2005
2005
  },
2006
2006
  setup(t) {
2007
- const e = x(null), i = j(), l = x(""), a = x(""), c = x(""), r = t;
2007
+ const e = x(null), i = j(), a = x(""), l = x(""), c = x(""), o = t;
2008
2008
  return q(async () => {
2009
- l.value = await L("window-close"), a.value = await L("window-minimize"), c.value = await L("window-maximize");
2010
- }), (f, h) => (o(), s("div", {
2009
+ a.value = await L("window-close"), l.value = await L("window-minimize"), c.value = await L("window-maximize");
2010
+ }), (p, h) => (r(), s("div", {
2011
2011
  "data-tauri-drag-region": "",
2012
- class: "flex h-8 px-4 py-1 bg-vsk-primary rounded-t-window justify-between align-center",
2012
+ class: "flex h-8 px-4 py-1 bg-primary dark:bg-primary-dark rounded-t-corner-window justify-between align-center",
2013
2013
  ref_key: "bar",
2014
2014
  ref: e
2015
2015
  }, [
2016
- u("div", me, [
2016
+ u("div", ye, [
2017
2017
  u("img", {
2018
- src: r.image,
2018
+ src: o.image,
2019
2019
  "data-tauri-drag-region": "",
2020
- class: "h-6 w-auto"
2021
- }, null, 8, ye)
2020
+ class: "h-6 w-auto",
2021
+ alt: o.title
2022
+ }, null, 8, me)
2022
2023
  ]),
2023
- u("div", fe, w(r.title), 1),
2024
- u("div", pe, [
2024
+ u("div", pe, g(o.title), 1),
2025
+ u("div", fe, [
2025
2026
  u("span", {
2026
2027
  class: "win-button",
2027
2028
  onClick: h[0] || (h[0] = (v) => W(i).minimize())
2028
2029
  }, [
2029
2030
  u("img", {
2030
- src: a.value,
2031
+ src: l.value,
2031
2032
  class: "h-6 w-6 inline-block",
2032
2033
  alt: "Minimize"
2033
2034
  }, null, 8, ve)
@@ -2047,7 +2048,7 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2047
2048
  onClick: h[2] || (h[2] = (v) => W(i).close())
2048
2049
  }, [
2049
2050
  u("img", {
2050
- src: l.value,
2051
+ src: a.value,
2051
2052
  class: "h-6 w-6 inline-block",
2052
2053
  alt: "Close"
2053
2054
  }, null, 8, ke)
@@ -2055,7 +2056,7 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2055
2056
  ])
2056
2057
  ], 512));
2057
2058
  }
2058
- }), Ce = /* @__PURE__ */ y({
2059
+ }), Ce = /* @__PURE__ */ m({
2059
2060
  __name: "WindowFrame",
2060
2061
  props: {
2061
2062
  title: {
@@ -2069,7 +2070,7 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2069
2070
  },
2070
2071
  setup(t) {
2071
2072
  const e = t;
2072
- return (i, l) => (o(), s(F, null, [
2073
+ return (i, a) => (r(), s(F, null, [
2073
2074
  Z(xe, {
2074
2075
  title: e.title,
2075
2076
  image: e.image
@@ -2080,7 +2081,7 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2080
2081
  }), Se = ["type", "disabled"], De = {
2081
2082
  key: 0,
2082
2083
  class: "w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"
2083
- }, ze = ["src", "alt"], Ie = { key: 2 }, Ae = ["src", "alt"], We = /* @__PURE__ */ y({
2084
+ }, ze = ["src", "alt"], Ie = { key: 2 }, Ae = ["src", "alt"], We = /* @__PURE__ */ m({
2084
2085
  __name: "ActionButton",
2085
2086
  props: {
2086
2087
  label: {},
@@ -2099,22 +2100,22 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2099
2100
  },
2100
2101
  emits: ["click"],
2101
2102
  setup(t, { emit: e }) {
2102
- const i = t, l = e, a = {
2103
- primary: "bg-vsk-primary text-white hover:bg-vsk-primary/90",
2104
- secondary: "bg-vsk-border text-vsk-text hover:bg-vsk-border/80",
2105
- danger: "bg-red-600 text-white hover:bg-red-700"
2103
+ const i = t, a = e, l = {
2104
+ 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",
2105
+ 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",
2106
+ 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"
2106
2107
  }, c = {
2107
2108
  sm: "px-2 py-1 text-xs",
2108
2109
  md: "px-3 py-1 text-sm",
2109
2110
  lg: "px-4 py-2 text-base"
2110
- }, r = (f) => {
2111
- i.stopPropagation && f.stopPropagation(), i.preventDefault && f.preventDefault(), !i.disabled && !i.loading && l("click");
2111
+ }, o = (p) => {
2112
+ i.stopPropagation && p.stopPropagation(), i.preventDefault && p.preventDefault(), !i.disabled && !i.loading && a("click");
2112
2113
  };
2113
- return (f, h) => (o(), s("button", {
2114
+ return (p, h) => (r(), s("button", {
2114
2115
  type: i.type,
2115
- onClick: r,
2116
- class: d(["rounded-vsk transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
2117
- a[i.variant],
2116
+ onClick: o,
2117
+ class: d(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
2118
+ l[i.variant],
2118
2119
  c[i.size],
2119
2120
  i.fullWidth ? "w-full" : "",
2120
2121
  i.iconSrc && !i.label ? "px-2 py-2" : "",
@@ -2122,23 +2123,23 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2122
2123
  ]]),
2123
2124
  disabled: i.disabled || i.loading
2124
2125
  }, [
2125
- t.loading ? (o(), s("span", De)) : g("", !0),
2126
- i.iconSrc && !i.iconRight ? (o(), s("img", {
2126
+ t.loading ? (r(), s("span", De)) : w("", !0),
2127
+ i.iconSrc && !i.iconRight ? (r(), s("img", {
2127
2128
  key: 1,
2128
2129
  src: i.iconSrc,
2129
2130
  alt: i.iconAlt || i.label,
2130
2131
  class: "w-4 h-4"
2131
- }, null, 8, ze)) : g("", !0),
2132
- i.label ? (o(), s("span", Ie, w(i.label), 1)) : g("", !0),
2133
- i.iconSrc && i.iconRight ? (o(), s("img", {
2132
+ }, null, 8, ze)) : w("", !0),
2133
+ i.label ? (r(), s("span", Ie, g(i.label), 1)) : w("", !0),
2134
+ i.iconSrc && i.iconRight ? (r(), s("img", {
2134
2135
  key: 3,
2135
2136
  src: i.iconSrc,
2136
2137
  alt: i.iconAlt || i.label,
2137
2138
  class: "w-4 h-4"
2138
- }, null, 8, Ae)) : g("", !0)
2139
+ }, null, 8, Ae)) : w("", !0)
2139
2140
  ], 10, Se));
2140
2141
  }
2141
- }), $e = /* @__PURE__ */ D(We, [["__scopeId", "data-v-d1ce8923"]]), Oe = { class: "text-base font-semibold m-0 text-vsk-primary" }, Le = /* @__PURE__ */ y({
2142
+ }), $e = /* @__PURE__ */ D(We, [["__scopeId", "data-v-2eaf6e27"]]), Oe = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, Le = /* @__PURE__ */ m({
2142
2143
  __name: "ConfigSection",
2143
2144
  props: {
2144
2145
  title: {},
@@ -2146,14 +2147,14 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2146
2147
  customClass: { default: () => ({}) }
2147
2148
  },
2148
2149
  setup(t) {
2149
- return (e, i) => (o(), s("div", {
2150
- class: d(["flex flex-col gap-4 p-4 background rounded-vsk", t.customClass])
2150
+ return (e, i) => (r(), s("div", {
2151
+ class: d(["flex flex-col gap-4 p-4 background rounded-corner", t.customClass])
2151
2152
  }, [
2152
- u("h3", Oe, w(t.icon ? `${t.icon} ${t.title}` : t.title), 1),
2153
+ u("h3", Oe, g(t.icon ? `${t.icon} ${t.title}` : t.title), 1),
2153
2154
  k(e.$slots, "default", {}, void 0, !0)
2154
2155
  ], 2));
2155
2156
  }
2156
- }), Be = /* @__PURE__ */ D(Le, [["__scopeId", "data-v-89531d08"]]), Te = { class: "flex items-center gap-3 flex-1 min-w-0" }, Re = ["src", "alt"], Ne = { class: "min-w-0" }, Ee = { class: "font-semibold truncate" }, Pe = {
2157
+ }), Be = /* @__PURE__ */ D(Le, [["__scopeId", "data-v-45bd4eab"]]), Te = { class: "flex items-center gap-3 flex-1 min-w-0" }, Re = ["src", "alt"], Ne = { class: "min-w-0" }, Ee = { class: "font-semibold truncate" }, Pe = {
2157
2158
  key: 0,
2158
2159
  class: "text-xs text-gray-400 truncate"
2159
2160
  }, Me = {
@@ -2165,7 +2166,7 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2165
2166
  }, Ve = {
2166
2167
  key: 1,
2167
2168
  class: "w-2 h-2 rounded-full bg-green-500"
2168
- }, Ue = /* @__PURE__ */ y({
2169
+ }, Ue = /* @__PURE__ */ m({
2169
2170
  __name: "DeviceCard",
2170
2171
  props: {
2171
2172
  icon: {},
@@ -2182,14 +2183,14 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2182
2183
  },
2183
2184
  emits: ["action", "click"],
2184
2185
  setup(t, { emit: e }) {
2185
- const i = e, l = () => {
2186
+ const i = e, a = () => {
2186
2187
  i("action");
2187
- }, a = () => {
2188
+ }, l = () => {
2188
2189
  i("click");
2189
2190
  };
2190
- return (c, r) => (o(), s("div", {
2191
+ return (c, o) => (r(), s("div", {
2191
2192
  class: d(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4", [{ "border-l-4 border-green-500": t.isConnected }, t.customClass]]),
2192
- onClick: a
2193
+ onClick: l
2193
2194
  }, [
2194
2195
  u("div", Te, [
2195
2196
  u("img", {
@@ -2198,23 +2199,23 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2198
2199
  class: "h-7 w-7 shrink-0"
2199
2200
  }, null, 8, Re),
2200
2201
  u("div", Ne, [
2201
- u("div", Ee, w(t.title), 1),
2202
- t.subtitle ? (o(), s("div", Pe, w(t.subtitle), 1)) : g("", !0),
2203
- t.metadata ? (o(), s("div", Me, w(t.metadata), 1)) : g("", !0),
2204
- t.extraInfo && t.extraInfo.length > 0 ? (o(), s("div", Fe, [
2205
- (o(!0), s(F, null, Q(t.extraInfo, (f, h) => (o(), s("span", { key: h }, w(f), 1))), 128))
2206
- ])) : g("", !0)
2202
+ u("div", Ee, g(t.title), 1),
2203
+ t.subtitle ? (r(), s("div", Pe, g(t.subtitle), 1)) : w("", !0),
2204
+ t.metadata ? (r(), s("div", Me, g(t.metadata), 1)) : w("", !0),
2205
+ t.extraInfo && t.extraInfo.length > 0 ? (r(), s("div", Fe, [
2206
+ (r(!0), s(F, null, Q(t.extraInfo, (p, h) => (r(), s("span", { key: h }, g(p), 1))), 128))
2207
+ ])) : w("", !0)
2207
2208
  ])
2208
2209
  ]),
2209
- t.showActionButton ? (o(), s("button", {
2210
+ t.showActionButton ? (r(), s("button", {
2210
2211
  key: 0,
2211
2212
  class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
2212
- onClick: Y(l, ["stop"])
2213
- }, w(t.actionLabel), 1)) : g("", !0),
2214
- t.showStatusIndicator && t.isConnected ? (o(), s("div", Ve)) : g("", !0)
2213
+ onClick: Y(a, ["stop"])
2214
+ }, g(t.actionLabel), 1)) : w("", !0),
2215
+ t.showStatusIndicator && t.isConnected ? (r(), s("div", Ve)) : w("", !0)
2215
2216
  ], 2));
2216
2217
  }
2217
- }), Ge = ["for"], He = /* @__PURE__ */ y({
2218
+ }), Ge = ["for"], He = /* @__PURE__ */ m({
2218
2219
  __name: "FormGroup",
2219
2220
  props: {
2220
2221
  label: {},
@@ -2223,18 +2224,18 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2223
2224
  labelClass: { default: () => ({}) }
2224
2225
  },
2225
2226
  setup(t) {
2226
- return (e, i) => (o(), s("div", {
2227
+ return (e, i) => (r(), s("div", {
2227
2228
  class: d(["flex flex-col gap-2", t.customClass])
2228
2229
  }, [
2229
- t.label ? (o(), s("label", {
2230
+ t.label ? (r(), s("label", {
2230
2231
  key: 0,
2231
2232
  for: t.htmlFor,
2232
- class: d(["text-sm font-medium text-vsk-primary", t.labelClass])
2233
- }, w(t.label), 11, Ge)) : g("", !0),
2233
+ class: d(["text-sm font-medium text-primary dark:text-primary-dark", t.labelClass])
2234
+ }, g(t.label), 11, Ge)) : w("", !0),
2234
2235
  k(e.$slots, "default", {}, void 0, !0)
2235
2236
  ], 2));
2236
2237
  }
2237
- }), je = /* @__PURE__ */ D(He, [["__scopeId", "data-v-a4bd01fc"]]), Je = /* @__PURE__ */ y({
2238
+ }), je = /* @__PURE__ */ D(He, [["__scopeId", "data-v-c0d9d9cb"]]), Je = /* @__PURE__ */ m({
2238
2239
  __name: "ListCard",
2239
2240
  props: {
2240
2241
  clickable: { type: Boolean, default: !1 },
@@ -2242,10 +2243,10 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2242
2243
  },
2243
2244
  emits: ["click"],
2244
2245
  setup(t, { emit: e }) {
2245
- const i = t, l = e, a = () => {
2246
- i.clickable && l("click");
2246
+ const i = t, a = e, l = () => {
2247
+ i.clickable && a("click");
2247
2248
  };
2248
- return (c, r) => (o(), s("div", {
2249
+ return (c, o) => (r(), s("div", {
2249
2250
  class: d([
2250
2251
  "flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
2251
2252
  {
@@ -2253,15 +2254,15 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2253
2254
  },
2254
2255
  t.customClass
2255
2256
  ]),
2256
- onClick: a
2257
+ onClick: l
2257
2258
  }, [
2258
2259
  k(c.$slots, "default", {}, void 0, !0)
2259
2260
  ], 2));
2260
2261
  }
2261
- }), qe = /* @__PURE__ */ D(Je, [["__scopeId", "data-v-f86d47da"]]), Ze = { class: "background rounded-vsk flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-white/60 dark:hover:bg-black/60" }, Qe = ["src", "alt", "title"], Ye = {
2262
+ }), qe = /* @__PURE__ */ D(Je, [["__scopeId", "data-v-f86d47da"]]), Ze = { 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" }, Qe = ["src", "alt", "title"], Ye = {
2262
2263
  key: 1,
2263
2264
  class: "w-8 h-8 flex items-center justify-center"
2264
- }, Ke = ["src", "alt"], Xe = ["min", "max", "value"], et = /* @__PURE__ */ y({
2265
+ }, Ke = ["src", "alt"], Xe = ["min", "max", "value"], et = /* @__PURE__ */ m({
2265
2266
  __name: "SliderControl",
2266
2267
  props: {
2267
2268
  icon: {},
@@ -2276,21 +2277,21 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2276
2277
  },
2277
2278
  emits: ["update:modelValue", "buttonClick"],
2278
2279
  setup(t, { emit: e }) {
2279
- const i = t, l = e, a = T(() => {
2280
+ const i = t, a = e, l = T(() => {
2280
2281
  if (i.max <= i.min) return 0;
2281
2282
  const h = i.max - i.min, v = i.modelValue - i.min;
2282
2283
  return Math.round(v / h * 100);
2283
- }), c = T(() => i.getPercentageClass ? i.getPercentageClass(a.value) : ""), r = (h) => {
2284
+ }), c = T(() => i.getPercentageClass ? i.getPercentageClass(l.value) : ""), o = (h) => {
2284
2285
  const v = h.target;
2285
- l("update:modelValue", Number(v.value));
2286
- }, f = () => {
2287
- l("buttonClick");
2286
+ a("update:modelValue", Number(v.value));
2287
+ }, p = () => {
2288
+ a("buttonClick");
2288
2289
  };
2289
- return (h, v) => (o(), s("div", Ze, [
2290
- t.showButton ? (o(), s("button", {
2290
+ return (h, v) => (r(), s("div", Ze, [
2291
+ t.showButton ? (r(), s("button", {
2291
2292
  key: 0,
2292
- onClick: f,
2293
- class: "w-8 h-8 flex items-center justify-center rounded-vsk transition-all duration-200 hover:bg-white/30 dark:hover:bg-black/30 hover:scale-110 active:scale-95"
2293
+ onClick: p,
2294
+ 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"
2294
2295
  }, [
2295
2296
  u("img", {
2296
2297
  src: t.icon,
@@ -2298,7 +2299,7 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2298
2299
  title: t.tooltip,
2299
2300
  class: d(["w-6 h-6 transition-all duration-200", t.iconClass])
2300
2301
  }, null, 10, Qe)
2301
- ])) : (o(), s("div", Ye, [
2302
+ ])) : (r(), s("div", Ye, [
2302
2303
  u("img", {
2303
2304
  src: t.icon,
2304
2305
  alt: t.alt,
@@ -2310,32 +2311,32 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2310
2311
  min: t.min,
2311
2312
  max: t.max,
2312
2313
  value: t.modelValue,
2313
- onInput: r,
2314
+ onInput: o,
2314
2315
  class: "flex-1 transition-all duration-200 hover:scale-105"
2315
2316
  }, null, 40, Xe),
2316
2317
  u("span", {
2317
2318
  class: d(["w-12 text-right transition-all duration-200 font-medium", c.value])
2318
- }, w(a.value) + "% ", 3)
2319
+ }, g(l.value) + "% ", 3)
2319
2320
  ]));
2320
2321
  }
2321
- }), tt = ["disabled"], it = /* @__PURE__ */ y({
2322
+ }), tt = ["disabled"], it = /* @__PURE__ */ m({
2322
2323
  __name: "SwitchToggle",
2323
2324
  props: {
2324
2325
  isOn: { type: Boolean },
2325
2326
  disabled: { type: Boolean, default: !1 },
2326
2327
  size: { default: "small" },
2327
- activeClass: { default: "bg-vsk-primary" },
2328
+ activeClass: { default: "bg-primary dark:bg-primary-dark" },
2328
2329
  inactiveClass: { default: "background" },
2329
2330
  customClass: { default: "" }
2330
2331
  },
2331
2332
  emits: ["toggle"],
2332
2333
  setup(t, { emit: e }) {
2333
- const i = t, l = e, a = () => {
2334
- l("toggle", !i.isOn);
2334
+ const i = t, a = e, l = () => {
2335
+ a("toggle", !i.isOn);
2335
2336
  };
2336
- return (c, r) => (o(), s("button", {
2337
+ return (c, o) => (r(), s("button", {
2337
2338
  type: "button",
2338
- onClick: a,
2339
+ onClick: l,
2339
2340
  disabled: t.disabled,
2340
2341
  class: d([
2341
2342
  "relative inline-flex items-center rounded-full transition-colors",
@@ -2354,7 +2355,7 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2354
2355
  }, null, 2)
2355
2356
  ], 10, tt));
2356
2357
  }
2357
- }), nt = ["disabled"], lt = ["src", "alt", "title"], at = /* @__PURE__ */ y({
2358
+ }), nt = ["disabled"], at = ["src", "alt", "title"], lt = /* @__PURE__ */ m({
2358
2359
  __name: "ToggleControl",
2359
2360
  props: {
2360
2361
  icon: {},
@@ -2367,14 +2368,14 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2367
2368
  },
2368
2369
  emits: ["click"],
2369
2370
  setup(t, { emit: e }) {
2370
- const i = e, l = () => {
2371
+ const i = e, a = () => {
2371
2372
  i("click");
2372
2373
  };
2373
- return (a, c) => (o(), s("button", {
2374
- onClick: l,
2375
- class: d(["p-2 rounded-vsk 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", {
2374
+ return (l, c) => (r(), s("button", {
2375
+ onClick: a,
2376
+ 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", {
2376
2377
  "animate-pulse": t.isLoading,
2377
- "ring-2 ring-vsk-primary/50": t.isActive,
2378
+ "ring-2 ring-primary dark:ring-primary-dark": t.isActive,
2378
2379
  "opacity-60": !t.isActive,
2379
2380
  ...t.customClass
2380
2381
  }]),
@@ -2390,13 +2391,13 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2390
2391
  "drop-shadow-lg": t.isActive,
2391
2392
  ...t.iconClass
2392
2393
  }])
2393
- }, null, 10, lt)
2394
+ }, null, 10, at)
2394
2395
  ], 10, nt));
2395
2396
  }
2396
- }), st = ["title"], ot = ["src", "alt"], rt = {
2397
+ }), st = ["title"], rt = ["src", "alt"], ot = {
2397
2398
  key: 0,
2398
- class: "absolute bottom-1 right-1 bg-vsk-primary text-white text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold animate-bounce"
2399
- }, ut = /* @__PURE__ */ y({
2399
+ 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"
2400
+ }, ut = /* @__PURE__ */ m({
2400
2401
  __name: "TrayIconButton",
2401
2402
  props: {
2402
2403
  icon: {},
@@ -2411,38 +2412,38 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2411
2412
  },
2412
2413
  emits: ["click"],
2413
2414
  setup(t, { emit: e }) {
2414
- const i = e, l = x(!1), a = () => {
2415
+ const i = e, a = x(!1), l = () => {
2415
2416
  i("click");
2416
2417
  };
2417
- return (c, r) => (o(), s("div", {
2418
- class: d(["p-1 rounded-vsk relative hover:bg-vsk-primary/30 group transition-all duration-300", t.customClass]),
2418
+ return (c, o) => (r(), s("div", {
2419
+ class: d(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300", t.customClass]),
2419
2420
  title: t.tooltip,
2420
- onClick: a,
2421
- onMouseenter: r[0] || (r[0] = (f) => l.value = !0),
2422
- onMouseleave: r[1] || (r[1] = (f) => l.value = !1)
2421
+ onClick: l,
2422
+ onMouseenter: o[0] || (o[0] = (p) => a.value = !0),
2423
+ onMouseleave: o[1] || (o[1] = (p) => a.value = !1)
2423
2424
  }, [
2424
2425
  u("img", {
2425
2426
  src: t.icon,
2426
2427
  alt: t.alt,
2427
2428
  class: d(["m-auto h-5.5 w-auto transition-all duration-300", t.iconClass])
2428
- }, null, 10, ot),
2429
- t.badge !== null && t.badge > 0 ? (o(), s("div", rt, w(t.badge), 1)) : g("", !0),
2430
- t.showCustomTooltip && t.customTooltipText ? (o(), s("div", {
2429
+ }, null, 10, rt),
2430
+ t.badge !== null && t.badge > 0 ? (r(), s("div", ot, g(t.badge), 1)) : w("", !0),
2431
+ t.showCustomTooltip && t.customTooltipText ? (r(), s("div", {
2431
2432
  key: 1,
2432
- class: d(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-vsk transition-all duration-300 pointer-events-none background", [
2433
+ 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", [
2433
2434
  t.tooltipClass,
2434
2435
  {
2435
- "opacity-0 -translate-y-2": !l.value,
2436
- "opacity-100 translate-y-0": l.value
2436
+ "opacity-0 -translate-y-2": !a.value,
2437
+ "opacity-100 translate-y-0": a.value
2437
2438
  }
2438
2439
  ]])
2439
- }, w(t.customTooltipText), 3)) : g("", !0),
2440
+ }, g(t.customTooltipText), 3)) : w("", !0),
2440
2441
  k(c.$slots, "default")
2441
2442
  ], 42, st));
2442
2443
  }
2443
2444
  }), ct = [
2444
2445
  te,
2445
- le,
2446
+ ae,
2446
2447
  Ce,
2447
2448
  $e,
2448
2449
  Be,
@@ -2451,7 +2452,7 @@ const me = { "data-tauri-drag-region": "" }, ye = ["src"], fe = { "data-tauri-dr
2451
2452
  qe,
2452
2453
  et,
2453
2454
  it,
2454
- at,
2455
+ lt,
2455
2456
  ut
2456
2457
  ], ht = {
2457
2458
  install(t) {
@@ -2467,10 +2468,10 @@ export {
2467
2468
  je as FormGroup,
2468
2469
  qe as ListCard,
2469
2470
  te as SideBar,
2470
- le as SideButton,
2471
+ ae as SideButton,
2471
2472
  et as SliderControl,
2472
2473
  it as SwitchToggle,
2473
- at as ToggleControl,
2474
+ lt as ToggleControl,
2474
2475
  ut as TrayIconButton,
2475
2476
  Ce as WindowFrame,
2476
2477
  ht as default
@@ -1 +1 @@
1
- (function(r,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(r=typeof globalThis<"u"?globalThis:r||self,n(r.VueLibVasak={},r.Vue))})(this,(function(r,n){"use strict";const y=(t,e)=>{const i=t.__vccOpts||t;for(const[l,s]of e)i[l]=s;return i},Q={},Y={class:"sidebar"};function K(t,e){return n.openBlock(),n.createElementBlock("div",Y,[n.renderSlot(t.$slots,"default")])}const z=y(Q,[["render",K]]),X={href:"#",class:"sidebar-button"},ee=["src","alt"],N=n.defineComponent({__name:"SideButton",props:{title:{type:String,default:"Link"},image:{type:String,default:""}},setup(t){return(e,i)=>(n.openBlock(),n.createElementBlock("a",X,[n.createElementVNode("img",{src:t.image,alt:t.title,class:"img-fluid"},null,8,ee)]))}});function te(t,e,i,l){if(typeof e=="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?l:i==="a"?l.call(t):l?l.value:e.get(t)}function ne(t,e,i,l,s){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,i),i}typeof SuppressedError=="function"&&SuppressedError;var _;const h="__TAURI_TO_IPC_KEY__";function ie(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function a(t,e={},i){return window.__TAURI_INTERNALS__.invoke(t,e,i)}class le{get rid(){return te(this,_,"f")}constructor(e){_.set(this,void 0),ne(this,_,e)}async close(){return a("plugin:resources|close",{rid:this.rid})}}_=new WeakMap;class D{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new p(this.width*e,this.height*e)}[h](){return{width:this.width,height:this.height}}toJSON(){return this[h]()}}class p{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new D(this.width/e,this.height/e)}[h](){return{width:this.width,height:this.height}}toJSON(){return this[h]()}}class w{constructor(e){this.size=e}toLogical(e){return this.size instanceof D?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof p?this.size:this.size.toPhysical(e)}[h](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[h]()}}class I{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new b(this.x*e,this.y*e)}[h](){return{x:this.x,y:this.y}}toJSON(){return this[h]()}}class b{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new I(this.x/e,this.y/e)}[h](){return{x:this.x,y:this.y}}toJSON(){return this[h]()}}class k{constructor(e){this.position=e}toLogical(e){return this.position instanceof I?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof b?this.position:this.position.toPhysical(e)}[h](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[h]()}}var u;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(u||(u={}));async function A(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await a("plugin:event|unlisten",{event:t,eventId:e})}async function $(t,e,i){var l;const s=typeof i?.target=="string"?{kind:"AnyLabel",label:i.target}:(l=i?.target)!==null&&l!==void 0?l:{kind:"Any"};return a("plugin:event|listen",{event:t,target:s,handler:ie(e)}).then(c=>async()=>A(t,c))}async function ae(t,e,i){return $(t,l=>{A(t,l.id),e(l)},i)}async function se(t,e){await a("plugin:event|emit",{event:t,payload:e})}async function oe(t,e,i){await a("plugin:event|emit_to",{target:typeof t=="string"?{kind:"AnyLabel",label:t}:t,event:e,payload:i})}class f extends le{constructor(e){super(e)}static async new(e,i,l){return a("plugin:image|new",{rgba:C(e),width:i,height:l}).then(s=>new f(s))}static async fromBytes(e){return a("plugin:image|from_bytes",{bytes:C(e)}).then(i=>new f(i))}static async fromPath(e){return a("plugin:image|from_path",{path:e}).then(i=>new f(i))}async rgba(){return a("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return a("plugin:image|size",{rid:this.rid})}}function C(t){return t==null?null:typeof t=="string"?t:t instanceof f?t.rid:t}var x;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(x||(x={}));class re{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}var W;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(W||(W={}));function V(){return new v(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function B(){return a("plugin:window|get_all_windows").then(t=>t.map(e=>new v(e,{skip:!0})))}const E=["tauri://created","tauri://error"];class v{constructor(e,i={}){var l;this.label=e,this.listeners=Object.create(null),i?.skip||a("plugin:window|create",{options:{...i,parent:typeof i.parent=="string"?i.parent:(l=i.parent)===null||l===void 0?void 0:l.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async s=>this.emit("tauri://error",s))}static async getByLabel(e){var i;return(i=(await B()).find(l=>l.label===e))!==null&&i!==void 0?i:null}static getCurrent(){return V()}static async getAll(){return B()}static async getFocusedWindow(){for(const e of await B())if(await e.isFocused())return e;return null}async listen(e,i){return this._handleTauriEvent(e,i)?()=>{const l=this.listeners[e];l.splice(l.indexOf(i),1)}:$(e,i,{target:{kind:"Window",label:this.label}})}async once(e,i){return this._handleTauriEvent(e,i)?()=>{const l=this.listeners[e];l.splice(l.indexOf(i),1)}:ae(e,i,{target:{kind:"Window",label:this.label}})}async emit(e,i){if(E.includes(e)){for(const l of this.listeners[e]||[])l({event:e,id:-1,payload:i});return}return se(e,i)}async emitTo(e,i,l){if(E.includes(i)){for(const s of this.listeners[i]||[])s({event:i,id:-1,payload:l});return}return oe(e,i,l)}_handleTauriEvent(e,i){return E.includes(e)?(e in this.listeners?this.listeners[e].push(i):this.listeners[e]=[i],!0):!1}async scaleFactor(){return a("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return a("plugin:window|inner_position",{label:this.label}).then(e=>new b(e))}async outerPosition(){return a("plugin:window|outer_position",{label:this.label}).then(e=>new b(e))}async innerSize(){return a("plugin:window|inner_size",{label:this.label}).then(e=>new p(e))}async outerSize(){return a("plugin:window|outer_size",{label:this.label}).then(e=>new p(e))}async isFullscreen(){return a("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return a("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return a("plugin:window|is_maximized",{label:this.label})}async isFocused(){return a("plugin:window|is_focused",{label:this.label})}async isDecorated(){return a("plugin:window|is_decorated",{label:this.label})}async isResizable(){return a("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return a("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return a("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return a("plugin:window|is_closable",{label:this.label})}async isVisible(){return a("plugin:window|is_visible",{label:this.label})}async title(){return a("plugin:window|title",{label:this.label})}async theme(){return a("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return a("plugin:window|is_always_on_top",{label:this.label})}async center(){return a("plugin:window|center",{label:this.label})}async requestUserAttention(e){let i=null;return e&&(e===x.Critical?i={type:"Critical"}:i={type:"Informational"}),a("plugin:window|request_user_attention",{label:this.label,value:i})}async setResizable(e){return a("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return a("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return a("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return a("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return a("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return a("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return a("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return a("plugin:window|maximize",{label:this.label})}async unmaximize(){return a("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return a("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return a("plugin:window|minimize",{label:this.label})}async unminimize(){return a("plugin:window|unminimize",{label:this.label})}async show(){return a("plugin:window|show",{label:this.label})}async hide(){return a("plugin:window|hide",{label:this.label})}async close(){return a("plugin:window|close",{label:this.label})}async destroy(){return a("plugin:window|destroy",{label:this.label})}async setDecorations(e){return a("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return a("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return a("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return a("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return a("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return a("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return a("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return a("plugin:window|set_size",{label:this.label,value:e instanceof w?e:new w(e)})}async setMinSize(e){return a("plugin:window|set_min_size",{label:this.label,value:e instanceof w?e:e?new w(e):null})}async setMaxSize(e){return a("plugin:window|set_max_size",{label:this.label,value:e instanceof w?e:e?new w(e):null})}async setSizeConstraints(e){function i(l){return l?{Logical:l}:null}return a("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:i(e?.minWidth),minHeight:i(e?.minHeight),maxWidth:i(e?.maxWidth),maxHeight:i(e?.maxHeight)}})}async setPosition(e){return a("plugin:window|set_position",{label:this.label,value:e instanceof k?e:new k(e)})}async setFullscreen(e){return a("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return a("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return a("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return a("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return a("plugin:window|set_icon",{label:this.label,value:C(e)})}async setSkipTaskbar(e){return a("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return a("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return a("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return a("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return a("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return a("plugin:window|set_cursor_position",{label:this.label,value:e instanceof k?e:new k(e)})}async setIgnoreCursorEvents(e){return a("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return a("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return a("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return a("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return a("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return a("plugin:window|set_overlay_icon",{label:this.label,value:e?C(e):void 0})}async setProgressBar(e){return a("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return a("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return a("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return a("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(u.WINDOW_RESIZED,i=>{i.payload=new p(i.payload),e(i)})}async onMoved(e){return this.listen(u.WINDOW_MOVED,i=>{i.payload=new b(i.payload),e(i)})}async onCloseRequested(e){return this.listen(u.WINDOW_CLOSE_REQUESTED,async i=>{const l=new re(i);await e(l),l.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){const i=await this.listen(u.DRAG_ENTER,o=>{e({...o,payload:{type:"enter",paths:o.payload.paths,position:new b(o.payload.position)}})}),l=await this.listen(u.DRAG_OVER,o=>{e({...o,payload:{type:"over",position:new b(o.payload.position)}})}),s=await this.listen(u.DRAG_DROP,o=>{e({...o,payload:{type:"drop",paths:o.payload.paths,position:new b(o.payload.position)}})}),c=await this.listen(u.DRAG_LEAVE,o=>{e({...o,payload:{type:"leave"}})});return()=>{i(),s(),l(),c()}}async onFocusChanged(e){const i=await this.listen(u.WINDOW_FOCUS,s=>{e({...s,payload:!0})}),l=await this.listen(u.WINDOW_BLUR,s=>{e({...s,payload:!1})});return()=>{i(),l()}}async onScaleChanged(e){return this.listen(u.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(u.WINDOW_THEME_CHANGED,e)}}var L;(function(t){t.Disabled="disabled",t.Throttle="throttle",t.Suspend="suspend"})(L||(L={}));var O;(function(t){t.Default="default",t.FluentOverlay="fluentOverlay"})(O||(O={}));var T;(function(t){t.AppearanceBased="appearanceBased",t.Light="light",t.Dark="dark",t.MediumLight="mediumLight",t.UltraDark="ultraDark",t.Titlebar="titlebar",t.Selection="selection",t.Menu="menu",t.Popover="popover",t.Sidebar="sidebar",t.HeaderView="headerView",t.Sheet="sheet",t.WindowBackground="windowBackground",t.HudWindow="hudWindow",t.FullScreenUI="fullScreenUI",t.Tooltip="tooltip",t.ContentBackground="contentBackground",t.UnderWindowBackground="underWindowBackground",t.UnderPageBackground="underPageBackground",t.Mica="mica",t.Blur="blur",t.Acrylic="acrylic",t.Tabbed="tabbed",t.TabbedDark="tabbedDark",t.TabbedLight="tabbedLight"})(T||(T={}));var R;(function(t){t.FollowsWindowActiveState="followsWindowActiveState",t.Active="active",t.Inactive="inactive"})(R||(R={})),typeof SuppressedError=="function"&&SuppressedError;async function ce(t,e={},i){return window.__TAURI_INTERNALS__.invoke(t,e,i)}async function de(t){try{return await ce("plugin:vicons|get_icon",{name:t})}catch(e){console.error("[Icon Error] Error obteniendo icono:",e)}return""}function ue(t){try{const e=atob(t.substring(0,32)),i=new Uint8Array(e.length);for(let l=0;l<e.length;l++)i[l]=e.charCodeAt(l);return i[0]===137&&i[1]===80&&i[2]===78&&i[3]===71?"image/png":"image/svg+xml"}catch(e){return console.error("Error identificando tipo de imagen:",e),"image/png"}}async function S(t){try{const e=await de(t);return`data:${ue(e)};base64,${e}`}catch(e){return console.error("[Icon Error] Error obteniendo icono:",e),""}}const he={"data-tauri-drag-region":""},me=["src"],be={"data-tauri-drag-region":""},ge={"data-tauri-drag-region":""},we=["src"],ye=["src"],pe=["src"],fe=n.defineComponent({__name:"TopBar",props:{title:String,image:String},setup(t){const e=n.ref(null),i=V(),l=n.ref(""),s=n.ref(""),c=n.ref(""),o=t;return n.onMounted(async()=>{l.value=await S("window-close"),s.value=await S("window-minimize"),c.value=await S("window-maximize")}),(m,d)=>(n.openBlock(),n.createElementBlock("div",{"data-tauri-drag-region":"",class:"flex h-8 px-4 py-1 bg-vsk-primary rounded-t-window justify-between align-center",ref_key:"bar",ref:e},[n.createElementVNode("div",he,[n.createElementVNode("img",{src:o.image,"data-tauri-drag-region":"",class:"h-6 w-auto"},null,8,me)]),n.createElementVNode("div",be,n.toDisplayString(o.title),1),n.createElementVNode("div",ge,[n.createElementVNode("span",{class:"win-button",onClick:d[0]||(d[0]=g=>n.unref(i).minimize())},[n.createElementVNode("img",{src:s.value,class:"h-6 w-6 inline-block",alt:"Minimize"},null,8,we)]),n.createElementVNode("span",{class:"win-button",onClick:d[1]||(d[1]=g=>n.unref(i).toggleMaximize())},[n.createElementVNode("img",{src:c.value,class:"h-6 w-6 inline-block",alt:"Maximize"},null,8,ye)]),n.createElementVNode("span",{class:"win-button",onClick:d[2]||(d[2]=g=>n.unref(i).close())},[n.createElementVNode("img",{src:l.value,class:"h-6 w-6 inline-block",alt:"Close"},null,8,pe)])])],512))}}),P=n.defineComponent({__name:"WindowFrame",props:{title:{type:String,default:"Vasak"},image:{type:String,default:""}},setup(t){const e=t;return(i,l)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(fe,{title:e.title,image:e.image},null,8,["title","image"]),n.renderSlot(i.$slots,"default")],64))}}),_e=["type","disabled"],ke={key:0,class:"w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"},Ce=["src","alt"],xe={key:2},Be=["src","alt"],M=y(n.defineComponent({__name:"ActionButton",props:{label:{},disabled:{type:Boolean,default:!1},variant:{default:"primary"},loading:{type:Boolean,default:!1},customClass:{default:()=>({})},size:{default:"md"},fullWidth:{type:Boolean,default:!1},iconSrc:{default:""},iconAlt:{default:""},iconRight:{type:Boolean,default:!1},type:{default:"button"},stopPropagation:{type:Boolean,default:!1},preventDefault:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:e}){const i=t,l=e,s={primary:"bg-vsk-primary text-white hover:bg-vsk-primary/90",secondary:"bg-vsk-border text-vsk-text hover:bg-vsk-border/80",danger:"bg-red-600 text-white hover:bg-red-700"},c={sm:"px-2 py-1 text-xs",md:"px-3 py-1 text-sm",lg:"px-4 py-2 text-base"},o=m=>{i.stopPropagation&&m.stopPropagation(),i.preventDefault&&m.preventDefault(),!i.disabled&&!i.loading&&l("click")};return(m,d)=>(n.openBlock(),n.createElementBlock("button",{type:i.type,onClick:o,class:n.normalizeClass(["rounded-vsk transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",[s[i.variant],c[i.size],i.fullWidth?"w-full":"",i.iconSrc&&!i.label?"px-2 py-2":"",t.customClass]]),disabled:i.disabled||i.loading},[t.loading?(n.openBlock(),n.createElementBlock("span",ke)):n.createCommentVNode("",!0),i.iconSrc&&!i.iconRight?(n.openBlock(),n.createElementBlock("img",{key:1,src:i.iconSrc,alt:i.iconAlt||i.label,class:"w-4 h-4"},null,8,Ce)):n.createCommentVNode("",!0),i.label?(n.openBlock(),n.createElementBlock("span",xe,n.toDisplayString(i.label),1)):n.createCommentVNode("",!0),i.iconSrc&&i.iconRight?(n.openBlock(),n.createElementBlock("img",{key:3,src:i.iconSrc,alt:i.iconAlt||i.label,class:"w-4 h-4"},null,8,Be)):n.createCommentVNode("",!0)],10,_e))}}),[["__scopeId","data-v-d1ce8923"]]),Ee={class:"text-base font-semibold m-0 text-vsk-primary"},F=y(n.defineComponent({__name:"ConfigSection",props:{title:{},icon:{default:""},customClass:{default:()=>({})}},setup(t){return(e,i)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["flex flex-col gap-4 p-4 background rounded-vsk",t.customClass])},[n.createElementVNode("h3",Ee,n.toDisplayString(t.icon?`${t.icon} ${t.title}`:t.title),1),n.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-89531d08"]]),Se={class:"flex items-center gap-3 flex-1 min-w-0"},ze=["src","alt"],Ne={class:"min-w-0"},De={class:"font-semibold truncate"},Ie={key:0,class:"text-xs text-gray-400 truncate"},Ae={key:1,class:"text-xs text-gray-400 truncate"},$e={key:2,class:"text-xs text-gray-400 flex gap-2 mt-1"},We={key:1,class:"w-2 h-2 rounded-full bg-green-500"},U=n.defineComponent({__name:"DeviceCard",props:{icon:{},title:{},subtitle:{default:""},metadata:{default:""},extraInfo:{default:()=>[]},isConnected:{type:Boolean,default:!1},showActionButton:{type:Boolean,default:!0},actionLabel:{default:"Conectar"},showStatusIndicator:{type:Boolean,default:!1},customClass:{default:""},clickable:{type:Boolean,default:!1}},emits:["action","click"],setup(t,{emit:e}){const i=e,l=()=>{i("action")},s=()=>{i("click")};return(c,o)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4",[{"border-l-4 border-green-500":t.isConnected},t.customClass]]),onClick:s},[n.createElementVNode("div",Se,[n.createElementVNode("img",{src:t.icon,alt:t.title,class:"h-7 w-7 shrink-0"},null,8,ze),n.createElementVNode("div",Ne,[n.createElementVNode("div",De,n.toDisplayString(t.title),1),t.subtitle?(n.openBlock(),n.createElementBlock("div",Ie,n.toDisplayString(t.subtitle),1)):n.createCommentVNode("",!0),t.metadata?(n.openBlock(),n.createElementBlock("div",Ae,n.toDisplayString(t.metadata),1)):n.createCommentVNode("",!0),t.extraInfo&&t.extraInfo.length>0?(n.openBlock(),n.createElementBlock("div",$e,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.extraInfo,(m,d)=>(n.openBlock(),n.createElementBlock("span",{key:d},n.toDisplayString(m),1))),128))])):n.createCommentVNode("",!0)])]),t.showActionButton?(n.openBlock(),n.createElementBlock("button",{key:0,class:"bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",onClick:n.withModifiers(l,["stop"])},n.toDisplayString(t.actionLabel),1)):n.createCommentVNode("",!0),t.showStatusIndicator&&t.isConnected?(n.openBlock(),n.createElementBlock("div",We)):n.createCommentVNode("",!0)],2))}}),Ve=["for"],G=y(n.defineComponent({__name:"FormGroup",props:{label:{},htmlFor:{default:""},customClass:{default:()=>({})},labelClass:{default:()=>({})}},setup(t){return(e,i)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["flex flex-col gap-2",t.customClass])},[t.label?(n.openBlock(),n.createElementBlock("label",{key:0,for:t.htmlFor,class:n.normalizeClass(["text-sm font-medium text-vsk-primary",t.labelClass])},n.toDisplayString(t.label),11,Ve)):n.createCommentVNode("",!0),n.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a4bd01fc"]]),j=y(n.defineComponent({__name:"ListCard",props:{clickable:{type:Boolean,default:!1},customClass:{default:()=>({})}},emits:["click"],setup(t,{emit:e}){const i=t,l=e,s=()=>{i.clickable&&l("click")};return(c,o)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",{"hover:bg-vsk-primary/5 cursor-pointer":i.clickable},t.customClass]),onClick:s},[n.renderSlot(c.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-f86d47da"]]),ve={class:"background rounded-vsk flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-white/60 dark:hover:bg-black/60"},Le=["src","alt","title"],Oe={key:1,class:"w-8 h-8 flex items-center justify-center"},Te=["src","alt"],Re=["min","max","value"],H=n.defineComponent({__name:"SliderControl",props:{icon:{},alt:{default:""},tooltip:{default:""},modelValue:{},min:{default:0},max:{default:100},showButton:{type:Boolean,default:!1},iconClass:{default:()=>({})},getPercentageClass:{type:Function,default:()=>""}},emits:["update:modelValue","buttonClick"],setup(t,{emit:e}){const i=t,l=e,s=n.computed(()=>{if(i.max<=i.min)return 0;const d=i.max-i.min,g=i.modelValue-i.min;return Math.round(g/d*100)}),c=n.computed(()=>i.getPercentageClass?i.getPercentageClass(s.value):""),o=d=>{const g=d.target;l("update:modelValue",Number(g.value))},m=()=>{l("buttonClick")};return(d,g)=>(n.openBlock(),n.createElementBlock("div",ve,[t.showButton?(n.openBlock(),n.createElementBlock("button",{key:0,onClick:m,class:"w-8 h-8 flex items-center justify-center rounded-vsk transition-all duration-200 hover:bg-white/30 dark:hover:bg-black/30 hover:scale-110 active:scale-95"},[n.createElementVNode("img",{src:t.icon,alt:t.alt,title:t.tooltip,class:n.normalizeClass(["w-6 h-6 transition-all duration-200",t.iconClass])},null,10,Le)])):(n.openBlock(),n.createElementBlock("div",Oe,[n.createElementVNode("img",{src:t.icon,alt:t.alt,class:"w-6 h-6 transition-all duration-200"},null,8,Te)])),n.createElementVNode("input",{type:"range",min:t.min,max:t.max,value:t.modelValue,onInput:o,class:"flex-1 transition-all duration-200 hover:scale-105"},null,40,Re),n.createElementVNode("span",{class:n.normalizeClass(["w-12 text-right transition-all duration-200 font-medium",c.value])},n.toDisplayString(s.value)+"% ",3)]))}}),Pe=["disabled"],q=n.defineComponent({__name:"SwitchToggle",props:{isOn:{type:Boolean},disabled:{type:Boolean,default:!1},size:{default:"small"},activeClass:{default:"bg-vsk-primary"},inactiveClass:{default:"background"},customClass:{default:""}},emits:["toggle"],setup(t,{emit:e}){const i=t,l=e,s=()=>{l("toggle",!i.isOn)};return(c,o)=>(n.openBlock(),n.createElementBlock("button",{type:"button",onClick:s,disabled:t.disabled,class:n.normalizeClass(["relative inline-flex items-center rounded-full transition-colors",t.size==="small"?"h-6 w-11":"h-7 w-12",t.isOn?t.activeClass:t.inactiveClass,t.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer",t.customClass])},[n.createElementVNode("span",{class:n.normalizeClass(["inline-block transform rounded-full bg-white shadow transition-transform",t.size==="small"?"h-4 w-4":"h-6 w-6",t.isOn?t.size==="small"?"translate-x-6":"translate-x-5":"translate-x-1"])},null,2)],10,Pe))}}),Me=["disabled"],Fe=["src","alt","title"],J=n.defineComponent({__name:"ToggleControl",props:{icon:{},alt:{default:""},tooltip:{default:""},isActive:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},iconClass:{default:()=>({})},customClass:{default:()=>({})}},emits:["click"],setup(t,{emit:e}){const i=e,l=()=>{i("click")};return(s,c)=>(n.openBlock(),n.createElementBlock("button",{onClick:l,class:n.normalizeClass(["p-2 rounded-vsk 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",{"animate-pulse":t.isLoading,"ring-2 ring-vsk-primary/50":t.isActive,"opacity-60":!t.isActive,...t.customClass}]),disabled:t.isLoading},[n.createElementVNode("img",{src:t.icon,alt:t.alt,title:t.tooltip,class:n.normalizeClass(["m-auto w-12.5 h-12.5 transition-all duration-300 group-hover:scale-110 relative z-10",{"animate-spin":t.isLoading,"filter brightness-75":!t.isActive,"drop-shadow-lg":t.isActive,...t.iconClass}])},null,10,Fe)],10,Me))}}),Ue=["title"],Ge=["src","alt"],je={key:0,class:"absolute bottom-1 right-1 bg-vsk-primary text-white text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold animate-bounce"},Z=n.defineComponent({__name:"TrayIconButton",props:{icon:{},alt:{default:""},tooltip:{default:""},badge:{default:null},iconClass:{default:()=>({})},customClass:{default:""},tooltipClass:{default:""},showCustomTooltip:{type:Boolean,default:!1},customTooltipText:{default:""}},emits:["click"],setup(t,{emit:e}){const i=e,l=n.ref(!1),s=()=>{i("click")};return(c,o)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["p-1 rounded-vsk relative hover:bg-vsk-primary/30 group transition-all duration-300",t.customClass]),title:t.tooltip,onClick:s,onMouseenter:o[0]||(o[0]=m=>l.value=!0),onMouseleave:o[1]||(o[1]=m=>l.value=!1)},[n.createElementVNode("img",{src:t.icon,alt:t.alt,class:n.normalizeClass(["m-auto h-5.5 w-auto transition-all duration-300",t.iconClass])},null,10,Ge),t.badge!==null&&t.badge>0?(n.openBlock(),n.createElementBlock("div",je,n.toDisplayString(t.badge),1)):n.createCommentVNode("",!0),t.showCustomTooltip&&t.customTooltipText?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-vsk transition-all duration-300 pointer-events-none background",[t.tooltipClass,{"opacity-0 -translate-y-2":!l.value,"opacity-100 translate-y-0":l.value}]])},n.toDisplayString(t.customTooltipText),3)):n.createCommentVNode("",!0),n.renderSlot(c.$slots,"default")],42,Ue))}}),He=[z,N,P,M,F,U,G,j,H,q,J,Z],qe={install(t){He.forEach(e=>{t.component(e.name,e)})}};r.ActionButton=M,r.ConfigSection=F,r.DeviceCard=U,r.FormGroup=G,r.ListCard=j,r.SideBar=z,r.SideButton=N,r.SliderControl=H,r.SwitchToggle=q,r.ToggleControl=J,r.TrayIconButton=Z,r.WindowFrame=P,r.default=qe,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(r,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(r=typeof globalThis<"u"?globalThis:r||self,n(r.VueLibVasak={},r.Vue))})(this,(function(r,n){"use strict";const y=(t,e)=>{const i=t.__vccOpts||t;for(const[l,s]of e)i[l]=s;return i},Q={},Y={class:"sidebar"};function K(t,e){return n.openBlock(),n.createElementBlock("div",Y,[n.renderSlot(t.$slots,"default")])}const z=y(Q,[["render",K]]),X={href:"#",class:"sidebar-button"},ee=["src","alt"],N=n.defineComponent({__name:"SideButton",props:{title:{type:String,default:"Link"},image:{type:String,default:""}},setup(t){return(e,i)=>(n.openBlock(),n.createElementBlock("a",X,[n.createElementVNode("img",{src:t.image,alt:t.title,class:"img-fluid"},null,8,ee)]))}});function te(t,e,i,l){if(typeof e=="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?l:i==="a"?l.call(t):l?l.value:e.get(t)}function ne(t,e,i,l,s){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,i),i}typeof SuppressedError=="function"&&SuppressedError;var k;const h="__TAURI_TO_IPC_KEY__";function ie(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function a(t,e={},i){return window.__TAURI_INTERNALS__.invoke(t,e,i)}class le{get rid(){return te(this,k,"f")}constructor(e){k.set(this,void 0),ne(this,k,e)}async close(){return a("plugin:resources|close",{rid:this.rid})}}k=new WeakMap;class D{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new p(this.width*e,this.height*e)}[h](){return{width:this.width,height:this.height}}toJSON(){return this[h]()}}class p{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new D(this.width/e,this.height/e)}[h](){return{width:this.width,height:this.height}}toJSON(){return this[h]()}}class w{constructor(e){this.size=e}toLogical(e){return this.size instanceof D?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof p?this.size:this.size.toPhysical(e)}[h](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[h]()}}class I{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new b(this.x*e,this.y*e)}[h](){return{x:this.x,y:this.y}}toJSON(){return this[h]()}}class b{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new I(this.x/e,this.y/e)}[h](){return{x:this.x,y:this.y}}toJSON(){return this[h]()}}class _{constructor(e){this.position=e}toLogical(e){return this.position instanceof I?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof b?this.position:this.position.toPhysical(e)}[h](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[h]()}}var u;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(u||(u={}));async function A(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await a("plugin:event|unlisten",{event:t,eventId:e})}async function $(t,e,i){var l;const s=typeof i?.target=="string"?{kind:"AnyLabel",label:i.target}:(l=i?.target)!==null&&l!==void 0?l:{kind:"Any"};return a("plugin:event|listen",{event:t,target:s,handler:ie(e)}).then(c=>async()=>A(t,c))}async function ae(t,e,i){return $(t,l=>{A(t,l.id),e(l)},i)}async function se(t,e){await a("plugin:event|emit",{event:t,payload:e})}async function oe(t,e,i){await a("plugin:event|emit_to",{target:typeof t=="string"?{kind:"AnyLabel",label:t}:t,event:e,payload:i})}class f extends le{constructor(e){super(e)}static async new(e,i,l){return a("plugin:image|new",{rgba:C(e),width:i,height:l}).then(s=>new f(s))}static async fromBytes(e){return a("plugin:image|from_bytes",{bytes:C(e)}).then(i=>new f(i))}static async fromPath(e){return a("plugin:image|from_path",{path:e}).then(i=>new f(i))}async rgba(){return a("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return a("plugin:image|size",{rid:this.rid})}}function C(t){return t==null?null:typeof t=="string"?t:t instanceof f?t.rid:t}var x;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(x||(x={}));class re{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}var W;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(W||(W={}));function V(){return new L(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function B(){return a("plugin:window|get_all_windows").then(t=>t.map(e=>new L(e,{skip:!0})))}const E=["tauri://created","tauri://error"];class L{constructor(e,i={}){var l;this.label=e,this.listeners=Object.create(null),i?.skip||a("plugin:window|create",{options:{...i,parent:typeof i.parent=="string"?i.parent:(l=i.parent)===null||l===void 0?void 0:l.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async s=>this.emit("tauri://error",s))}static async getByLabel(e){var i;return(i=(await B()).find(l=>l.label===e))!==null&&i!==void 0?i:null}static getCurrent(){return V()}static async getAll(){return B()}static async getFocusedWindow(){for(const e of await B())if(await e.isFocused())return e;return null}async listen(e,i){return this._handleTauriEvent(e,i)?()=>{const l=this.listeners[e];l.splice(l.indexOf(i),1)}:$(e,i,{target:{kind:"Window",label:this.label}})}async once(e,i){return this._handleTauriEvent(e,i)?()=>{const l=this.listeners[e];l.splice(l.indexOf(i),1)}:ae(e,i,{target:{kind:"Window",label:this.label}})}async emit(e,i){if(E.includes(e)){for(const l of this.listeners[e]||[])l({event:e,id:-1,payload:i});return}return se(e,i)}async emitTo(e,i,l){if(E.includes(i)){for(const s of this.listeners[i]||[])s({event:i,id:-1,payload:l});return}return oe(e,i,l)}_handleTauriEvent(e,i){return E.includes(e)?(e in this.listeners?this.listeners[e].push(i):this.listeners[e]=[i],!0):!1}async scaleFactor(){return a("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return a("plugin:window|inner_position",{label:this.label}).then(e=>new b(e))}async outerPosition(){return a("plugin:window|outer_position",{label:this.label}).then(e=>new b(e))}async innerSize(){return a("plugin:window|inner_size",{label:this.label}).then(e=>new p(e))}async outerSize(){return a("plugin:window|outer_size",{label:this.label}).then(e=>new p(e))}async isFullscreen(){return a("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return a("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return a("plugin:window|is_maximized",{label:this.label})}async isFocused(){return a("plugin:window|is_focused",{label:this.label})}async isDecorated(){return a("plugin:window|is_decorated",{label:this.label})}async isResizable(){return a("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return a("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return a("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return a("plugin:window|is_closable",{label:this.label})}async isVisible(){return a("plugin:window|is_visible",{label:this.label})}async title(){return a("plugin:window|title",{label:this.label})}async theme(){return a("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return a("plugin:window|is_always_on_top",{label:this.label})}async center(){return a("plugin:window|center",{label:this.label})}async requestUserAttention(e){let i=null;return e&&(e===x.Critical?i={type:"Critical"}:i={type:"Informational"}),a("plugin:window|request_user_attention",{label:this.label,value:i})}async setResizable(e){return a("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return a("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return a("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return a("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return a("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return a("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return a("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return a("plugin:window|maximize",{label:this.label})}async unmaximize(){return a("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return a("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return a("plugin:window|minimize",{label:this.label})}async unminimize(){return a("plugin:window|unminimize",{label:this.label})}async show(){return a("plugin:window|show",{label:this.label})}async hide(){return a("plugin:window|hide",{label:this.label})}async close(){return a("plugin:window|close",{label:this.label})}async destroy(){return a("plugin:window|destroy",{label:this.label})}async setDecorations(e){return a("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return a("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return a("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return a("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return a("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return a("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return a("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return a("plugin:window|set_size",{label:this.label,value:e instanceof w?e:new w(e)})}async setMinSize(e){return a("plugin:window|set_min_size",{label:this.label,value:e instanceof w?e:e?new w(e):null})}async setMaxSize(e){return a("plugin:window|set_max_size",{label:this.label,value:e instanceof w?e:e?new w(e):null})}async setSizeConstraints(e){function i(l){return l?{Logical:l}:null}return a("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:i(e?.minWidth),minHeight:i(e?.minHeight),maxWidth:i(e?.maxWidth),maxHeight:i(e?.maxHeight)}})}async setPosition(e){return a("plugin:window|set_position",{label:this.label,value:e instanceof _?e:new _(e)})}async setFullscreen(e){return a("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return a("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return a("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return a("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return a("plugin:window|set_icon",{label:this.label,value:C(e)})}async setSkipTaskbar(e){return a("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return a("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return a("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return a("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return a("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return a("plugin:window|set_cursor_position",{label:this.label,value:e instanceof _?e:new _(e)})}async setIgnoreCursorEvents(e){return a("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return a("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return a("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return a("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return a("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return a("plugin:window|set_overlay_icon",{label:this.label,value:e?C(e):void 0})}async setProgressBar(e){return a("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return a("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return a("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return a("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(u.WINDOW_RESIZED,i=>{i.payload=new p(i.payload),e(i)})}async onMoved(e){return this.listen(u.WINDOW_MOVED,i=>{i.payload=new b(i.payload),e(i)})}async onCloseRequested(e){return this.listen(u.WINDOW_CLOSE_REQUESTED,async i=>{const l=new re(i);await e(l),l.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){const i=await this.listen(u.DRAG_ENTER,o=>{e({...o,payload:{type:"enter",paths:o.payload.paths,position:new b(o.payload.position)}})}),l=await this.listen(u.DRAG_OVER,o=>{e({...o,payload:{type:"over",position:new b(o.payload.position)}})}),s=await this.listen(u.DRAG_DROP,o=>{e({...o,payload:{type:"drop",paths:o.payload.paths,position:new b(o.payload.position)}})}),c=await this.listen(u.DRAG_LEAVE,o=>{e({...o,payload:{type:"leave"}})});return()=>{i(),s(),l(),c()}}async onFocusChanged(e){const i=await this.listen(u.WINDOW_FOCUS,s=>{e({...s,payload:!0})}),l=await this.listen(u.WINDOW_BLUR,s=>{e({...s,payload:!1})});return()=>{i(),l()}}async onScaleChanged(e){return this.listen(u.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(u.WINDOW_THEME_CHANGED,e)}}var O;(function(t){t.Disabled="disabled",t.Throttle="throttle",t.Suspend="suspend"})(O||(O={}));var T;(function(t){t.Default="default",t.FluentOverlay="fluentOverlay"})(T||(T={}));var R;(function(t){t.AppearanceBased="appearanceBased",t.Light="light",t.Dark="dark",t.MediumLight="mediumLight",t.UltraDark="ultraDark",t.Titlebar="titlebar",t.Selection="selection",t.Menu="menu",t.Popover="popover",t.Sidebar="sidebar",t.HeaderView="headerView",t.Sheet="sheet",t.WindowBackground="windowBackground",t.HudWindow="hudWindow",t.FullScreenUI="fullScreenUI",t.Tooltip="tooltip",t.ContentBackground="contentBackground",t.UnderWindowBackground="underWindowBackground",t.UnderPageBackground="underPageBackground",t.Mica="mica",t.Blur="blur",t.Acrylic="acrylic",t.Tabbed="tabbed",t.TabbedDark="tabbedDark",t.TabbedLight="tabbedLight"})(R||(R={}));var P;(function(t){t.FollowsWindowActiveState="followsWindowActiveState",t.Active="active",t.Inactive="inactive"})(P||(P={})),typeof SuppressedError=="function"&&SuppressedError;async function ce(t,e={},i){return window.__TAURI_INTERNALS__.invoke(t,e,i)}async function de(t){try{return await ce("plugin:vicons|get_icon",{name:t})}catch(e){console.error("[Icon Error] Error obteniendo icono:",e)}return""}function ue(t){try{const e=atob(t.substring(0,32)),i=new Uint8Array(e.length);for(let l=0;l<e.length;l++)i[l]=e.charCodeAt(l);return i[0]===137&&i[1]===80&&i[2]===78&&i[3]===71?"image/png":"image/svg+xml"}catch(e){return console.error("Error identificando tipo de imagen:",e),"image/png"}}async function S(t){try{const e=await de(t);return`data:${ue(e)};base64,${e}`}catch(e){return console.error("[Icon Error] Error obteniendo icono:",e),""}}const he={"data-tauri-drag-region":""},me=["src","alt"],be={"data-tauri-drag-region":""},ge={"data-tauri-drag-region":""},we=["src"],ye=["src"],pe=["src"],fe=n.defineComponent({__name:"TopBar",props:{title:String,image:String},setup(t){const e=n.ref(null),i=V(),l=n.ref(""),s=n.ref(""),c=n.ref(""),o=t;return n.onMounted(async()=>{l.value=await S("window-close"),s.value=await S("window-minimize"),c.value=await S("window-maximize")}),(m,d)=>(n.openBlock(),n.createElementBlock("div",{"data-tauri-drag-region":"",class:"flex h-8 px-4 py-1 bg-primary dark:bg-primary-dark rounded-t-corner-window justify-between align-center",ref_key:"bar",ref:e},[n.createElementVNode("div",he,[n.createElementVNode("img",{src:o.image,"data-tauri-drag-region":"",class:"h-6 w-auto",alt:o.title},null,8,me)]),n.createElementVNode("div",be,n.toDisplayString(o.title),1),n.createElementVNode("div",ge,[n.createElementVNode("span",{class:"win-button",onClick:d[0]||(d[0]=g=>n.unref(i).minimize())},[n.createElementVNode("img",{src:s.value,class:"h-6 w-6 inline-block",alt:"Minimize"},null,8,we)]),n.createElementVNode("span",{class:"win-button",onClick:d[1]||(d[1]=g=>n.unref(i).toggleMaximize())},[n.createElementVNode("img",{src:c.value,class:"h-6 w-6 inline-block",alt:"Maximize"},null,8,ye)]),n.createElementVNode("span",{class:"win-button",onClick:d[2]||(d[2]=g=>n.unref(i).close())},[n.createElementVNode("img",{src:l.value,class:"h-6 w-6 inline-block",alt:"Close"},null,8,pe)])])],512))}}),v=n.defineComponent({__name:"WindowFrame",props:{title:{type:String,default:"Vasak"},image:{type:String,default:""}},setup(t){const e=t;return(i,l)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(fe,{title:e.title,image:e.image},null,8,["title","image"]),n.renderSlot(i.$slots,"default")],64))}}),ke=["type","disabled"],_e={key:0,class:"w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"},Ce=["src","alt"],xe={key:2},Be=["src","alt"],M=y(n.defineComponent({__name:"ActionButton",props:{label:{},disabled:{type:Boolean,default:!1},variant:{default:"primary"},loading:{type:Boolean,default:!1},customClass:{default:()=>({})},size:{default:"md"},fullWidth:{type:Boolean,default:!1},iconSrc:{default:""},iconAlt:{default:""},iconRight:{type:Boolean,default:!1},type:{default:"button"},stopPropagation:{type:Boolean,default:!1},preventDefault:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:e}){const i=t,l=e,s={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",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",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"},c={sm:"px-2 py-1 text-xs",md:"px-3 py-1 text-sm",lg:"px-4 py-2 text-base"},o=m=>{i.stopPropagation&&m.stopPropagation(),i.preventDefault&&m.preventDefault(),!i.disabled&&!i.loading&&l("click")};return(m,d)=>(n.openBlock(),n.createElementBlock("button",{type:i.type,onClick:o,class:n.normalizeClass(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",[s[i.variant],c[i.size],i.fullWidth?"w-full":"",i.iconSrc&&!i.label?"px-2 py-2":"",t.customClass]]),disabled:i.disabled||i.loading},[t.loading?(n.openBlock(),n.createElementBlock("span",_e)):n.createCommentVNode("",!0),i.iconSrc&&!i.iconRight?(n.openBlock(),n.createElementBlock("img",{key:1,src:i.iconSrc,alt:i.iconAlt||i.label,class:"w-4 h-4"},null,8,Ce)):n.createCommentVNode("",!0),i.label?(n.openBlock(),n.createElementBlock("span",xe,n.toDisplayString(i.label),1)):n.createCommentVNode("",!0),i.iconSrc&&i.iconRight?(n.openBlock(),n.createElementBlock("img",{key:3,src:i.iconSrc,alt:i.iconAlt||i.label,class:"w-4 h-4"},null,8,Be)):n.createCommentVNode("",!0)],10,ke))}}),[["__scopeId","data-v-2eaf6e27"]]),Ee={class:"text-base font-semibold m-0 text-primary dark:text-primary-dark"},F=y(n.defineComponent({__name:"ConfigSection",props:{title:{},icon:{default:""},customClass:{default:()=>({})}},setup(t){return(e,i)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["flex flex-col gap-4 p-4 background rounded-corner",t.customClass])},[n.createElementVNode("h3",Ee,n.toDisplayString(t.icon?`${t.icon} ${t.title}`:t.title),1),n.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-45bd4eab"]]),Se={class:"flex items-center gap-3 flex-1 min-w-0"},ze=["src","alt"],Ne={class:"min-w-0"},De={class:"font-semibold truncate"},Ie={key:0,class:"text-xs text-gray-400 truncate"},Ae={key:1,class:"text-xs text-gray-400 truncate"},$e={key:2,class:"text-xs text-gray-400 flex gap-2 mt-1"},We={key:1,class:"w-2 h-2 rounded-full bg-green-500"},U=n.defineComponent({__name:"DeviceCard",props:{icon:{},title:{},subtitle:{default:""},metadata:{default:""},extraInfo:{default:()=>[]},isConnected:{type:Boolean,default:!1},showActionButton:{type:Boolean,default:!0},actionLabel:{default:"Conectar"},showStatusIndicator:{type:Boolean,default:!1},customClass:{default:""},clickable:{type:Boolean,default:!1}},emits:["action","click"],setup(t,{emit:e}){const i=e,l=()=>{i("action")},s=()=>{i("click")};return(c,o)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4",[{"border-l-4 border-green-500":t.isConnected},t.customClass]]),onClick:s},[n.createElementVNode("div",Se,[n.createElementVNode("img",{src:t.icon,alt:t.title,class:"h-7 w-7 shrink-0"},null,8,ze),n.createElementVNode("div",Ne,[n.createElementVNode("div",De,n.toDisplayString(t.title),1),t.subtitle?(n.openBlock(),n.createElementBlock("div",Ie,n.toDisplayString(t.subtitle),1)):n.createCommentVNode("",!0),t.metadata?(n.openBlock(),n.createElementBlock("div",Ae,n.toDisplayString(t.metadata),1)):n.createCommentVNode("",!0),t.extraInfo&&t.extraInfo.length>0?(n.openBlock(),n.createElementBlock("div",$e,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.extraInfo,(m,d)=>(n.openBlock(),n.createElementBlock("span",{key:d},n.toDisplayString(m),1))),128))])):n.createCommentVNode("",!0)])]),t.showActionButton?(n.openBlock(),n.createElementBlock("button",{key:0,class:"bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",onClick:n.withModifiers(l,["stop"])},n.toDisplayString(t.actionLabel),1)):n.createCommentVNode("",!0),t.showStatusIndicator&&t.isConnected?(n.openBlock(),n.createElementBlock("div",We)):n.createCommentVNode("",!0)],2))}}),Ve=["for"],G=y(n.defineComponent({__name:"FormGroup",props:{label:{},htmlFor:{default:""},customClass:{default:()=>({})},labelClass:{default:()=>({})}},setup(t){return(e,i)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["flex flex-col gap-2",t.customClass])},[t.label?(n.openBlock(),n.createElementBlock("label",{key:0,for:t.htmlFor,class:n.normalizeClass(["text-sm font-medium text-primary dark:text-primary-dark",t.labelClass])},n.toDisplayString(t.label),11,Ve)):n.createCommentVNode("",!0),n.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-c0d9d9cb"]]),j=y(n.defineComponent({__name:"ListCard",props:{clickable:{type:Boolean,default:!1},customClass:{default:()=>({})}},emits:["click"],setup(t,{emit:e}){const i=t,l=e,s=()=>{i.clickable&&l("click")};return(c,o)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",{"hover:bg-vsk-primary/5 cursor-pointer":i.clickable},t.customClass]),onClick:s},[n.renderSlot(c.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-f86d47da"]]),Le={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"},Oe=["src","alt","title"],Te={key:1,class:"w-8 h-8 flex items-center justify-center"},Re=["src","alt"],Pe=["min","max","value"],H=n.defineComponent({__name:"SliderControl",props:{icon:{},alt:{default:""},tooltip:{default:""},modelValue:{},min:{default:0},max:{default:100},showButton:{type:Boolean,default:!1},iconClass:{default:()=>({})},getPercentageClass:{type:Function,default:()=>""}},emits:["update:modelValue","buttonClick"],setup(t,{emit:e}){const i=t,l=e,s=n.computed(()=>{if(i.max<=i.min)return 0;const d=i.max-i.min,g=i.modelValue-i.min;return Math.round(g/d*100)}),c=n.computed(()=>i.getPercentageClass?i.getPercentageClass(s.value):""),o=d=>{const g=d.target;l("update:modelValue",Number(g.value))},m=()=>{l("buttonClick")};return(d,g)=>(n.openBlock(),n.createElementBlock("div",Le,[t.showButton?(n.openBlock(),n.createElementBlock("button",{key:0,onClick:m,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"},[n.createElementVNode("img",{src:t.icon,alt:t.alt,title:t.tooltip,class:n.normalizeClass(["w-6 h-6 transition-all duration-200",t.iconClass])},null,10,Oe)])):(n.openBlock(),n.createElementBlock("div",Te,[n.createElementVNode("img",{src:t.icon,alt:t.alt,class:"w-6 h-6 transition-all duration-200"},null,8,Re)])),n.createElementVNode("input",{type:"range",min:t.min,max:t.max,value:t.modelValue,onInput:o,class:"flex-1 transition-all duration-200 hover:scale-105"},null,40,Pe),n.createElementVNode("span",{class:n.normalizeClass(["w-12 text-right transition-all duration-200 font-medium",c.value])},n.toDisplayString(s.value)+"% ",3)]))}}),ve=["disabled"],q=n.defineComponent({__name:"SwitchToggle",props:{isOn:{type:Boolean},disabled:{type:Boolean,default:!1},size:{default:"small"},activeClass:{default:"bg-primary dark:bg-primary-dark"},inactiveClass:{default:"background"},customClass:{default:""}},emits:["toggle"],setup(t,{emit:e}){const i=t,l=e,s=()=>{l("toggle",!i.isOn)};return(c,o)=>(n.openBlock(),n.createElementBlock("button",{type:"button",onClick:s,disabled:t.disabled,class:n.normalizeClass(["relative inline-flex items-center rounded-full transition-colors",t.size==="small"?"h-6 w-11":"h-7 w-12",t.isOn?t.activeClass:t.inactiveClass,t.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer",t.customClass])},[n.createElementVNode("span",{class:n.normalizeClass(["inline-block transform rounded-full bg-white shadow transition-transform",t.size==="small"?"h-4 w-4":"h-6 w-6",t.isOn?t.size==="small"?"translate-x-6":"translate-x-5":"translate-x-1"])},null,2)],10,ve))}}),Me=["disabled"],Fe=["src","alt","title"],J=n.defineComponent({__name:"ToggleControl",props:{icon:{},alt:{default:""},tooltip:{default:""},isActive:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},iconClass:{default:()=>({})},customClass:{default:()=>({})}},emits:["click"],setup(t,{emit:e}){const i=e,l=()=>{i("click")};return(s,c)=>(n.openBlock(),n.createElementBlock("button",{onClick:l,class:n.normalizeClass(["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",{"animate-pulse":t.isLoading,"ring-2 ring-primary dark:ring-primary-dark":t.isActive,"opacity-60":!t.isActive,...t.customClass}]),disabled:t.isLoading},[n.createElementVNode("img",{src:t.icon,alt:t.alt,title:t.tooltip,class:n.normalizeClass(["m-auto w-12.5 h-12.5 transition-all duration-300 group-hover:scale-110 relative z-10",{"animate-spin":t.isLoading,"filter brightness-75":!t.isActive,"drop-shadow-lg":t.isActive,...t.iconClass}])},null,10,Fe)],10,Me))}}),Ue=["title"],Ge=["src","alt"],je={key:0,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"},Z=n.defineComponent({__name:"TrayIconButton",props:{icon:{},alt:{default:""},tooltip:{default:""},badge:{default:null},iconClass:{default:()=>({})},customClass:{default:""},tooltipClass:{default:""},showCustomTooltip:{type:Boolean,default:!1},customTooltipText:{default:""}},emits:["click"],setup(t,{emit:e}){const i=e,l=n.ref(!1),s=()=>{i("click")};return(c,o)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300",t.customClass]),title:t.tooltip,onClick:s,onMouseenter:o[0]||(o[0]=m=>l.value=!0),onMouseleave:o[1]||(o[1]=m=>l.value=!1)},[n.createElementVNode("img",{src:t.icon,alt:t.alt,class:n.normalizeClass(["m-auto h-5.5 w-auto transition-all duration-300",t.iconClass])},null,10,Ge),t.badge!==null&&t.badge>0?(n.openBlock(),n.createElementBlock("div",je,n.toDisplayString(t.badge),1)):n.createCommentVNode("",!0),t.showCustomTooltip&&t.customTooltipText?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["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",[t.tooltipClass,{"opacity-0 -translate-y-2":!l.value,"opacity-100 translate-y-0":l.value}]])},n.toDisplayString(t.customTooltipText),3)):n.createCommentVNode("",!0),n.renderSlot(c.$slots,"default")],42,Ue))}}),He=[z,N,v,M,F,U,G,j,H,q,J,Z],qe={install(t){He.forEach(e=>{t.component(e.name,e)})}};r.ActionButton=M,r.ConfigSection=F,r.DeviceCard=U,r.FormGroup=G,r.ListCard=j,r.SideBar=z,r.SideButton=N,r.SliderControl=H,r.SwitchToggle=q,r.ToggleControl=J,r.TrayIconButton=Z,r.WindowFrame=v,r.default=qe,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vasakgroup/vue-libvasak",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Vue componenets for VSK Applications",
5
5
  "main": "./dist/vue-libvasak.umd.js",
6
6
  "module": "./dist/vue-libvasak.es.js",
@@ -42,10 +42,10 @@
42
42
  },
43
43
  "license": "GPLv3",
44
44
  "dependencies": {
45
- "@tauri-apps/api": "^2.9.1",
45
+ "@tauri-apps/api": "^2.10.1",
46
46
  "@vasakgroup/plugin-vicons": "^2.0.0",
47
- "vue": "^3.5.27",
48
- "vue-router": "^4.6.4"
47
+ "vue": "^3.5.28",
48
+ "vue-router": "^5.0.3"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "vue": "^3.0.0"
@@ -53,7 +53,7 @@
53
53
  "devDependencies": {
54
54
  "typescript": "^5.9.3",
55
55
  "vite": "^7.3.1",
56
- "@vitejs/plugin-vue": "^6.0.3"
56
+ "@vitejs/plugin-vue": "^6.0.4"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "vite build",
@@ -35,9 +35,9 @@ const emit = defineEmits<{
35
35
  }>();
36
36
 
37
37
  const variantClasses: Record<string, string> = {
38
- primary: 'bg-vsk-primary text-white hover:bg-vsk-primary/90',
39
- secondary: 'bg-vsk-border text-vsk-text hover:bg-vsk-border/80',
40
- danger: 'bg-red-600 text-white hover:bg-red-700',
38
+ 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',
39
+ 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',
40
+ 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',
41
41
  };
42
42
 
43
43
  const sizeClasses: Record<'sm' | 'md' | 'lg', string> = {
@@ -59,7 +59,7 @@ const handleClick = (event: Event) => {
59
59
  <button
60
60
  :type="props.type"
61
61
  @click="handleClick"
62
- class="rounded-vsk transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"
62
+ class="rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"
63
63
  :class="[
64
64
  variantClasses[props.variant],
65
65
  sizeClasses[props.size],
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <button
3
3
  @click="handleClick"
4
- class="p-2 rounded-vsk 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"
4
+ class="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"
5
5
  :class="{
6
6
  'animate-pulse': isLoading,
7
- 'ring-2 ring-vsk-primary/50': isActive,
7
+ 'ring-2 ring-primary dark:ring-primary-dark': isActive,
8
8
  'opacity-60': !isActive,
9
9
  ...customClass
10
10
  }"
@@ -15,7 +15,7 @@ withDefaults(defineProps<Props>(), {
15
15
 
16
16
  <template>
17
17
  <div class="flex flex-col gap-2" :class="customClass">
18
- <label v-if="label" :for="htmlFor" class="text-sm font-medium text-vsk-primary" :class="labelClass">
18
+ <label v-if="label" :for="htmlFor" class="text-sm font-medium text-primary dark:text-primary-dark" :class="labelClass">
19
19
  {{ label }}
20
20
  </label>
21
21
  <slot />
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <div
3
- class="background rounded-vsk flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-white/60 dark:hover:bg-black/60"
3
+ 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"
4
4
  >
5
5
  <button
6
6
  v-if="showButton"
7
7
  @click="handleButtonClick"
8
- class="w-8 h-8 flex items-center justify-center rounded-vsk transition-all duration-200 hover:bg-white/30 dark:hover:bg-black/30 hover:scale-110 active:scale-95"
8
+ 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"
9
9
  >
10
10
  <img
11
11
  :src="icon"
@@ -34,7 +34,7 @@ interface Props {
34
34
  const props = withDefaults(defineProps<Props>(), {
35
35
  disabled: false,
36
36
  size: 'small',
37
- activeClass: 'bg-vsk-primary',
37
+ activeClass: 'bg-primary dark:bg-primary-dark',
38
38
  inactiveClass: 'background',
39
39
  customClass: '',
40
40
  });
@@ -13,10 +13,10 @@ withDefaults(defineProps<Props>(), {
13
13
 
14
14
  <template>
15
15
  <div
16
- class="flex flex-col gap-4 p-4 background rounded-vsk"
16
+ class="flex flex-col gap-4 p-4 background rounded-corner"
17
17
  :class="customClass"
18
18
  >
19
- <h3 class="text-base font-semibold m-0 text-vsk-primary">
19
+ <h3 class="text-base font-semibold m-0 text-primary dark:text-primary-dark">
20
20
  {{ icon ? `${icon} ${title}` : title }}
21
21
  </h3>
22
22
  <slot />
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="p-1 rounded-vsk relative hover:bg-vsk-primary/30 group transition-all duration-300"
3
+ class="p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300"
4
4
  :class="customClass"
5
5
  :title="tooltip"
6
6
  @click="handleClick"
@@ -17,7 +17,7 @@
17
17
  <!-- Badge/Counter -->
18
18
  <div
19
19
  v-if="badge !== null && badge > 0"
20
- class="absolute bottom-1 right-1 bg-vsk-primary text-white text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold animate-bounce"
20
+ 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"
21
21
  >
22
22
  {{ badge }}
23
23
  </div>
@@ -25,7 +25,7 @@
25
25
  <!-- Tooltip personalizado -->
26
26
  <div
27
27
  v-if="showCustomTooltip && customTooltipText"
28
- class="absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-vsk transition-all duration-300 pointer-events-none background"
28
+ class="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"
29
29
  :class="[
30
30
  tooltipClass,
31
31
  {
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { defineProps, ref, Ref, onMounted } from "vue";
2
+ import { ref, Ref, onMounted } from "vue";
3
3
  import { getCurrentWindow } from "@tauri-apps/api/window";
4
4
  import { getIconSource } from "@vasakgroup/plugin-vicons";
5
5
 
@@ -24,11 +24,11 @@ onMounted(async () => {
24
24
  <template>
25
25
  <div
26
26
  data-tauri-drag-region
27
- class="flex h-8 px-4 py-1 bg-vsk-primary rounded-t-window justify-between align-center"
27
+ class="flex h-8 px-4 py-1 bg-primary dark:bg-primary-dark rounded-t-corner-window justify-between align-center"
28
28
  ref="bar"
29
29
  >
30
30
  <div data-tauri-drag-region>
31
- <img :src="props.image" data-tauri-drag-region class="h-6 w-auto" />
31
+ <img :src="props.image" data-tauri-drag-region class="h-6 w-auto" :alt="props.title" />
32
32
  </div>
33
33
  <div data-tauri-drag-region>{{ props.title }}</div>
34
34
  <div data-tauri-drag-region>