@v1nt1248/3nclient-lib 0.3.27 → 0.3.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { $ as e, B as t, Q as n, R as r, T as i, V as a, X as o, Z as s, at as c, ct as l, dt as u, et as d, ft as f, ht as p, it as m, lt as h, mt as g, nt as _, o as v, ot as y, pt as b, rt as x, st as S, t as C, tt as w, ut as T, v as E, z as D } from "./chunks/plugins-keys-jqAZ5D94.js";
2
- import { a as ee, i as O, n as k, r as A, t as j } from "./chunks/ui3n-notification-DlDM-u-R.js";
3
- import { t as te } from "./chunks/emoticons-DMgiBINj.js";
4
- import M from "sanitize-html";
5
- import { autoUpdate as ne, computePosition as re, offset as ie } from "@floating-ui/dom";
2
+ import { a as ee, i as O, n as k, r as te, t as A } from "./chunks/ui3n-notification-DlDM-u-R.js";
3
+ import { t as ne } from "./chunks/emoticons-DMgiBINj.js";
4
+ import j from "sanitize-html";
5
+ import { autoUpdate as M, computePosition as re, offset as ie } from "@floating-ui/dom";
6
6
  import { Fragment as N, Teleport as ae, Transition as oe, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createTextVNode as se, createVNode as z, defineComponent as B, getCurrentInstance as ce, inject as le, mergeProps as ue, nextTick as de, normalizeClass as V, normalizeStyle as H, onBeforeMount as fe, onBeforeUnmount as pe, onMounted as U, openBlock as W, provide as me, ref as G, renderList as he, renderSlot as K, resolveDynamicComponent as ge, toDisplayString as q, toHandlers as _e, unref as J, useCssModule as ve, useCssVars as ye, useSlots as be, useTemplateRef as xe, vModelText as Se, watch as Y, withCtx as X, withDirectives as Ce, withKeys as Z, withModifiers as Q } from "vue";
7
7
  import { arrow as we, autoUpdate as Te, flip as Ee, offset as De, shift as Oe, useFloating as ke } from "@floating-ui/vue";
8
8
  //#region node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayMap.js
@@ -508,37 +508,37 @@ var Ae = /* @__PURE__ */ g(((e, t) => {
508
508
  var n = Gt(), r = x(), i = _(), a = i && i.isSet;
509
509
  t.exports = a ? r(a) : n;
510
510
  })), qt = /* @__PURE__ */ g(((e, t) => {
511
- var n = at(), r = ot(), i = lt(), a = ht(), s = yt(), l = bt(), u = xt(), d = Tt(), f = kt(), p = jt(), h = Mt(), g = o(), _ = Nt(), v = Bt(), y = Ht(), b = c(), x = m(), S = Wt(), C = T(), w = Kt(), E = mt(), D = vt(), ee = 1, O = 2, k = 4, A = "[object Arguments]", j = "[object Array]", te = "[object Boolean]", M = "[object Date]", ne = "[object Error]", re = "[object Function]", ie = "[object GeneratorFunction]", N = "[object Map]", ae = "[object Number]", oe = "[object Object]", P = "[object RegExp]", F = "[object Set]", I = "[object String]", L = "[object Symbol]", R = "[object WeakMap]", se = "[object ArrayBuffer]", z = "[object DataView]", B = "[object Float32Array]", ce = "[object Float64Array]", le = "[object Int8Array]", ue = "[object Int16Array]", de = "[object Int32Array]", V = "[object Uint8Array]", H = "[object Uint8ClampedArray]", fe = "[object Uint16Array]", pe = "[object Uint32Array]", U = {};
512
- U[A] = U[j] = U[se] = U[z] = U[te] = U[M] = U[B] = U[ce] = U[le] = U[ue] = U[de] = U[N] = U[ae] = U[oe] = U[P] = U[F] = U[I] = U[L] = U[V] = U[H] = U[fe] = U[pe] = !0, U[ne] = U[re] = U[R] = !1;
511
+ var n = at(), r = ot(), i = lt(), a = ht(), s = yt(), l = bt(), u = xt(), d = Tt(), f = kt(), p = jt(), h = Mt(), g = o(), _ = Nt(), v = Bt(), y = Ht(), b = c(), x = m(), S = Wt(), C = T(), w = Kt(), E = mt(), D = vt(), ee = 1, O = 2, k = 4, te = "[object Arguments]", A = "[object Array]", ne = "[object Boolean]", j = "[object Date]", M = "[object Error]", re = "[object Function]", ie = "[object GeneratorFunction]", N = "[object Map]", ae = "[object Number]", oe = "[object Object]", P = "[object RegExp]", F = "[object Set]", I = "[object String]", L = "[object Symbol]", R = "[object WeakMap]", se = "[object ArrayBuffer]", z = "[object DataView]", B = "[object Float32Array]", ce = "[object Float64Array]", le = "[object Int8Array]", ue = "[object Int16Array]", de = "[object Int32Array]", V = "[object Uint8Array]", H = "[object Uint8ClampedArray]", fe = "[object Uint16Array]", pe = "[object Uint32Array]", U = {};
512
+ U[te] = U[A] = U[se] = U[z] = U[ne] = U[j] = U[B] = U[ce] = U[le] = U[ue] = U[de] = U[N] = U[ae] = U[oe] = U[P] = U[F] = U[I] = U[L] = U[V] = U[H] = U[fe] = U[pe] = !0, U[M] = U[re] = U[R] = !1;
513
513
  function W(e, t, o, c, m, T) {
514
- var j, te = t & ee, M = t & O, ne = t & k;
515
- if (o && (j = m ? o(e, c, m, T) : o(e)), j !== void 0) return j;
514
+ var A, ne = t & ee, j = t & O, M = t & k;
515
+ if (o && (A = m ? o(e, c, m, T) : o(e)), A !== void 0) return A;
516
516
  if (!C(e)) return e;
517
517
  var N = b(e);
518
518
  if (N) {
519
- if (j = _(e), !te) return u(e, j);
519
+ if (A = _(e), !ne) return u(e, A);
520
520
  } else {
521
521
  var ae = g(e), P = ae == re || ae == ie;
522
- if (x(e)) return l(e, te);
523
- if (ae == oe || ae == A || P && !m) {
524
- if (j = M || P ? {} : y(e), !te) return M ? f(e, s(j, e)) : d(e, a(j, e));
522
+ if (x(e)) return l(e, ne);
523
+ if (ae == oe || ae == te || P && !m) {
524
+ if (A = j || P ? {} : y(e), !ne) return j ? f(e, s(A, e)) : d(e, a(A, e));
525
525
  } else {
526
526
  if (!U[ae]) return m ? e : {};
527
- j = v(e, ae, te);
527
+ A = v(e, ae, ne);
528
528
  }
529
529
  }
530
530
  T ||= new n();
531
531
  var F = T.get(e);
532
532
  if (F) return F;
533
- T.set(e, j), w(e) ? e.forEach(function(n) {
534
- j.add(W(n, t, o, n, e, T));
533
+ T.set(e, A), w(e) ? e.forEach(function(n) {
534
+ A.add(W(n, t, o, n, e, T));
535
535
  }) : S(e) && e.forEach(function(n, r) {
536
- j.set(r, W(n, t, o, r, e, T));
536
+ A.set(r, W(n, t, o, r, e, T));
537
537
  });
538
- var I = N ? void 0 : (ne ? M ? h : p : M ? D : E)(e);
538
+ var I = N ? void 0 : (M ? j ? h : p : j ? D : E)(e);
539
539
  return r(I || e, function(n, r) {
540
- I && (r = n, n = e[r]), i(j, r, W(n, t, o, r, e, T));
541
- }), j;
540
+ I && (r = n, n = e[r]), i(A, r, W(n, t, o, r, e, T));
541
+ }), A;
542
542
  }
543
543
  t.exports = W;
544
544
  })), Jt = /* @__PURE__ */ g(((e, t) => {
@@ -783,11 +783,11 @@ function Cn(e, t) {
783
783
  return;
784
784
  }
785
785
  if (typeof r == "string") {
786
- e.innerHTML = M(r);
786
+ e.innerHTML = j(r);
787
787
  return;
788
788
  }
789
789
  try {
790
- e.innerHTML = M(r.dirty, { ...(0, Sn.default)(r, "dirty") });
790
+ e.innerHTML = j(r.dirty, { ...(0, Sn.default)(r, "dirty") });
791
791
  return;
792
792
  } catch (e) {
793
793
  throw Error("[v-ui3n-html] ", e);
@@ -946,7 +946,7 @@ function Hn(e, t, n) {
946
946
  return;
947
947
  }
948
948
  let f = document.getElementById(Ln), p = f || document.createElement("div");
949
- f || (p.id = Ln, p.classList.add("ui3n-title")), p.innerHTML = r, p.style.maxWidth = `${i}px`, p.style.color = a, p.style.backgroundColor = o, Object.keys(d).length && Object.assign(p.style, d), e.insertAdjacentElement("beforeend", p), In = ne(e, p, () => {
949
+ f || (p.id = Ln, p.classList.add("ui3n-title")), p.innerHTML = r, p.style.maxWidth = `${i}px`, p.style.color = a, p.style.backgroundColor = o, Object.keys(d).length && Object.assign(p.style, d), e.insertAdjacentElement("beforeend", p), In = M(e, p, () => {
950
950
  re(e, p, {
951
951
  placement: s,
952
952
  strategy: c,
@@ -1215,11 +1215,11 @@ var Xn = {
1215
1215
  },
1216
1216
  emits: ["click"],
1217
1217
  setup(e, { emit: t }) {
1218
- let n = e, r = t, i = G(null), a = P(() => te[n.emoji]);
1218
+ let n = e, r = t, i = G(null), a = P(() => ne[n.emoji]);
1219
1219
  U(() => {
1220
1220
  i.value && i.value.style.setProperty("--ui3n-emoji-size", `${n.size}px`);
1221
1221
  }), Y(() => n.emoji, (e) => {
1222
- Object.keys(te).includes(e) || console.error(`[Ui3nEmoji] Invalid emoticon: ${e}`);
1222
+ Object.keys(ne).includes(e) || console.error(`[Ui3nEmoji] Invalid emoticon: ${e}`);
1223
1223
  }, { immediate: !0 }), Y(() => n.size, (e, t) => {
1224
1224
  i.value && e && e !== t && i.value.style.setProperty("--ui3n-emoji-size", `${e}px`);
1225
1225
  });
@@ -1408,7 +1408,7 @@ var Xn = {
1408
1408
  key: 1,
1409
1409
  class: V(t.$style.appendIconSlot)
1410
1410
  }, [
1411
- p.value ? (W(), F(A, {
1411
+ p.value ? (W(), F(te, {
1412
1412
  key: 0,
1413
1413
  icon: "round-check-circle-outline",
1414
1414
  size: 16,
@@ -1931,7 +1931,7 @@ var Xn = {
1931
1931
  mode: "out-in",
1932
1932
  name: "fade"
1933
1933
  }, {
1934
- default: X(() => [(W(), F(A, {
1934
+ default: X(() => [(W(), F(te, {
1935
1935
  key: e.value === "asc" ? "round-arrow-upward" : "round-arrow-downward",
1936
1936
  icon: e.value === "asc" ? "round-arrow-upward" : "round-arrow-downward",
1937
1937
  width: n.value,
@@ -2319,7 +2319,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2319
2319
  e.title && !t.$slots.header ? (W(), L("div", {
2320
2320
  key: 0,
2321
2321
  class: V([t.$style.title, t.$style.titleDefault])
2322
- }, [c.value ? (W(), F(A, ue({ key: 0 }, c.value, { class: t.$style.icon }), null, 16, ["class"])) : I("", !0), R("span", null, q(e.title), 1)], 2)) : I("", !0),
2322
+ }, [c.value ? (W(), F(te, ue({ key: 0 }, c.value, { class: t.$style.icon }), null, 16, ["class"])) : I("", !0), R("span", null, q(e.title), 1)], 2)) : I("", !0),
2323
2323
  t.$slots.header ? (W(), L("div", {
2324
2324
  key: 1,
2325
2325
  class: V(t.$style.title)
@@ -2542,7 +2542,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2542
2542
  ui3nListItem: "_ui3nListItem_1ou60_25",
2543
2543
  ui3nListItemContent: "_ui3nListItemContent_1ou60_42",
2544
2544
  ui3nListItemContentDisabled: "_ui3nListItemContentDisabled_1ou60_49"
2545
- } }]]), Gr = 40, Kr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2545
+ } }]]), Gr = 32, Kr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2546
2546
  __name: "ui3n-scrollbar-vertical",
2547
2547
  props: {
2548
2548
  thumbMinHeight: { default: Gr },
@@ -2552,6 +2552,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2552
2552
  thumbHoverColor: { default: "var(--color-bg-control-accent-hover)" },
2553
2553
  thumbActiveColor: { default: "var(--color-bg-control-accent-focused)" },
2554
2554
  trackWidth: { default: 6 },
2555
+ trackRadius: { default: 4 },
2555
2556
  trackColor: { default: "transparent" }
2556
2557
  },
2557
2558
  emits: ["scroll"],
@@ -2577,11 +2578,14 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2577
2578
  }), w = P(() => r.thumbColor), T = P(() => r.thumbHoverColor), E = P(() => r.thumbActiveColor), D = P(() => {
2578
2579
  let e = Number(r.trackWidth);
2579
2580
  return isNaN(e) ? String(r.trackWidth) : `${e}px`;
2580
- }), ee = P(() => r.trackColor);
2581
- function O() {
2581
+ }), ee = P(() => r.trackColor), O = P(() => {
2582
+ let e = Number(r.trackRadius);
2583
+ return isNaN(e) ? String(r.trackRadius) : `${e}px`;
2584
+ });
2585
+ function k() {
2582
2586
  a.value && (c.value = a.value.scrollHeight, l.value = a.value.clientHeight, u.value = a.value.scrollTop);
2583
2587
  }
2584
- function k(e) {
2588
+ function te(e) {
2585
2589
  d.value || (u.value = e.target.scrollTop), p.value = !0, window.clearTimeout(h), h = window.setTimeout(() => {
2586
2590
  p.value = !1;
2587
2591
  }, 1500), i("scroll", e);
@@ -2594,10 +2598,10 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2594
2598
  behavior: "smooth"
2595
2599
  });
2596
2600
  }
2597
- function j(e) {
2598
- !s.value || !a.value || (e.preventDefault(), e.stopPropagation(), s.value.setPointerCapture(e.pointerId), d.value = !0, g = e.clientY, _ = u.value, document.body.style.userSelect = "none", s.value.addEventListener("pointermove", te), s.value.addEventListener("pointerup", M), s.value.addEventListener("pointercancel", M));
2601
+ function ne(e) {
2602
+ !s.value || !a.value || (e.preventDefault(), e.stopPropagation(), s.value.setPointerCapture(e.pointerId), d.value = !0, g = e.clientY, _ = u.value, document.body.style.userSelect = "none", s.value.addEventListener("pointermove", j), s.value.addEventListener("pointerup", M), s.value.addEventListener("pointercancel", M));
2599
2603
  }
2600
- function te(e) {
2604
+ function j(e) {
2601
2605
  if (!d.value || !a.value) return;
2602
2606
  let t = e.clientY - g, n = c.value - l.value, r = t / (l.value - x.value) * n;
2603
2607
  a.value.scrollTop = _ + r, u.value = a.value.scrollTop;
@@ -2607,13 +2611,13 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2607
2611
  try {
2608
2612
  s.value.releasePointerCapture(e.pointerId);
2609
2613
  } catch {}
2610
- s.value.removeEventListener("pointermove", te), s.value.removeEventListener("pointerup", M), s.value.removeEventListener("pointercancel", M);
2614
+ s.value.removeEventListener("pointermove", j), s.value.removeEventListener("pointerup", M), s.value.removeEventListener("pointercancel", M);
2611
2615
  }
2612
2616
  }
2613
2617
  return U(() => {
2614
- O(), a.value && (m = new ResizeObserver(O), m.observe(a.value), a.value.firstElementChild && m.observe(a.value.firstElementChild));
2618
+ k(), a.value && (m = new ResizeObserver(k), m.observe(a.value), a.value.firstElementChild && m.observe(a.value.firstElementChild));
2615
2619
  }), pe(() => {
2616
- m?.disconnect(), window.clearTimeout(h), s.value && (s.value.removeEventListener("pointermove", te), s.value.removeEventListener("pointerup", M), s.value.removeEventListener("pointercancel", M)), document.body.style.userSelect = "";
2620
+ m?.disconnect(), window.clearTimeout(h), s.value && (s.value.removeEventListener("pointermove", j), s.value.removeEventListener("pointerup", M), s.value.removeEventListener("pointercancel", M)), document.body.style.userSelect = "";
2617
2621
  }), t({
2618
2622
  scrollTo: (e) => {
2619
2623
  a.value?.scrollTo(e);
@@ -2627,6 +2631,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2627
2631
  "--ui3n-scrollbar-thumb-hover-color": T.value,
2628
2632
  "--ui3n-scrollbar-thumb-active-color": E.value,
2629
2633
  "--ui3n-scrollbar-track-width": D.value,
2634
+ "--ui3n-scrollbar-track-radius": O.value,
2630
2635
  "--ui3n-scrollbar-track-color": ee.value
2631
2636
  }),
2632
2637
  onMouseenter: t[0] ||= (e) => f.value = !0,
@@ -2635,7 +2640,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2635
2640
  ref_key: "containerRef",
2636
2641
  ref: a,
2637
2642
  class: V(e.$style.scrollbarContainer),
2638
- onScroll: k
2643
+ onScroll: te
2639
2644
  }, [K(e.$slots, "default")], 34), R("div", {
2640
2645
  ref_key: "trackRef",
2641
2646
  ref: o,
@@ -2649,16 +2654,16 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2649
2654
  height: `${x.value}px`,
2650
2655
  transform: `translateY(${S.value}px)`
2651
2656
  }),
2652
- onPointerdown: j
2657
+ onPointerdown: ne
2653
2658
  }, null, 38)], 34)], 38));
2654
2659
  }
2655
2660
  }), [["__cssModules", { $style: {
2656
- ui3nScrollbarVertical: "_ui3nScrollbarVertical_18kmr_1",
2657
- scrollbarContainer: "_scrollbarContainer_18kmr_8",
2658
- track: "_track_18kmr_21",
2659
- trackVisible: "_trackVisible_18kmr_35",
2660
- thumb: "_thumb_18kmr_41",
2661
- active: "_active_18kmr_54"
2661
+ ui3nScrollbarVertical: "_ui3nScrollbarVertical_fjwb1_1",
2662
+ scrollbarContainer: "_scrollbarContainer_fjwb1_8",
2663
+ track: "_track_fjwb1_21",
2664
+ trackVisible: "_trackVisible_fjwb1_36",
2665
+ thumb: "_thumb_fjwb1_42",
2666
+ active: "_active_fjwb1_55"
2662
2667
  } }]]), qr = ["data-sid"], Jr = /* @__PURE__ */ O(/* @__PURE__ */ B({
2663
2668
  __name: "ui3n-virtual-scroll",
2664
2669
  props: {
@@ -3411,7 +3416,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
3411
3416
  e.disabled && t.$style.btnDisabled
3412
3417
  ]),
3413
3418
  onClick: Q(b, ["stop", "prevent"])
3414
- }, [z(A, {
3419
+ }, [z(te, {
3415
3420
  icon: "round-done",
3416
3421
  size: "12",
3417
3422
  color: "var(--color-icon-table-accent-default)"
@@ -3423,7 +3428,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
3423
3428
  e.disabled && t.$style.btnDisabled
3424
3429
  ]),
3425
3430
  onClick: Q(x, ["stop", "prevent"])
3426
- }, [z(A, {
3431
+ }, [z(te, {
3427
3432
  icon: "round-close",
3428
3433
  size: "12",
3429
3434
  color: "var(--color-icon-table-secondary-default)"
@@ -3438,7 +3443,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
3438
3443
  }, q(u.value || e.placeholder || "..."), 513), Ce((W(), L("div", {
3439
3444
  class: V([t.$style.btn, t.$style.editBtn]),
3440
3445
  onClick: Q(v, ["stop", "prevent"])
3441
- }, [z(A, {
3446
+ }, [z(te, {
3442
3447
  icon: "round-edit",
3443
3448
  size: "12",
3444
3449
  color: "var(--color-icon-control-accent-unselected)"
@@ -4024,7 +4029,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
4024
4029
  class: V(t.$style.clearBtn),
4025
4030
  onClick: Q(y, ["stop", "prevent"])
4026
4031
  }, null, 8, ["disabled", "class"])) : I("", !0),
4027
- z(A, {
4032
+ z(te, {
4028
4033
  icon: "outline-arrow-drop-down",
4029
4034
  color: "var(--color-icon-block-primary-default)",
4030
4035
  size: "16",
@@ -4129,7 +4134,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
4129
4134
  return (t, n) => (W(), L("div", {
4130
4135
  class: V([t.$style.menuItem, e.isActive && t.$style.menuItemSelected]),
4131
4136
  onClick: i
4132
- }, [e.item.icon ? (W(), F(A, {
4137
+ }, [e.item.icon ? (W(), F(te, {
4133
4138
  key: 0,
4134
4139
  icon: e.item.icon,
4135
4140
  size: "20",
@@ -4141,7 +4146,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
4141
4146
  menuItemName: "_menuItemName_5dv4z_15",
4142
4147
  menuItemSelected: "_menuItemSelected_5dv4z_21",
4143
4148
  bounceOnce: "_bounceOnce_5dv4z_1"
4144
- } }]]), Mi = 40, Ni = /* @__PURE__ */ O(/* @__PURE__ */ B({
4149
+ } }]]), Mi = 32, Ni = /* @__PURE__ */ O(/* @__PURE__ */ B({
4145
4150
  __name: "ui3n-scroolbar-horizontal",
4146
4151
  props: {
4147
4152
  thumbMinWidth: { default: Mi },
@@ -4151,6 +4156,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
4151
4156
  thumbHoverColor: { default: "var(--color-bg-control-accent-hover)" },
4152
4157
  thumbActiveColor: { default: "var(--color-bg-control-accent-focused)" },
4153
4158
  trackHeight: { default: 6 },
4159
+ trackRadius: { default: 4 },
4154
4160
  trackColor: { default: "transparent" }
4155
4161
  },
4156
4162
  emits: ["scroll"],
@@ -4176,11 +4182,14 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
4176
4182
  }), w = P(() => r.thumbColor), T = P(() => r.thumbHoverColor), E = P(() => r.thumbActiveColor), D = P(() => {
4177
4183
  let e = Number(r.trackHeight);
4178
4184
  return isNaN(e) ? String(r.trackHeight) : `${e}px`;
4179
- }), ee = P(() => r.trackColor);
4180
- function O() {
4185
+ }), ee = P(() => {
4186
+ let e = Number(r.trackRadius);
4187
+ return isNaN(e) ? String(r.trackRadius) : `${e}px`;
4188
+ }), O = P(() => r.trackColor);
4189
+ function k() {
4181
4190
  a.value && (c.value = a.value.scrollWidth, l.value = a.value.clientWidth, u.value = a.value.scrollLeft);
4182
4191
  }
4183
- function k(e) {
4192
+ function te(e) {
4184
4193
  d.value || (u.value = e.target.scrollLeft), p.value = !0, window.clearTimeout(h), h = window.setTimeout(() => {
4185
4194
  p.value = !1;
4186
4195
  }, 1500), i("scroll", e);
@@ -4193,10 +4202,10 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
4193
4202
  behavior: "smooth"
4194
4203
  });
4195
4204
  }
4196
- function j(e) {
4197
- !s.value || !a.value || (e.preventDefault(), e.stopPropagation(), s.value.setPointerCapture(e.pointerId), d.value = !0, g = e.clientX, _ = u.value, document.body.style.userSelect = "none", s.value.addEventListener("pointermove", te), s.value.addEventListener("pointerup", M), s.value.addEventListener("pointercancel", M));
4205
+ function ne(e) {
4206
+ !s.value || !a.value || (e.preventDefault(), e.stopPropagation(), s.value.setPointerCapture(e.pointerId), d.value = !0, g = e.clientX, _ = u.value, document.body.style.userSelect = "none", s.value.addEventListener("pointermove", j), s.value.addEventListener("pointerup", M), s.value.addEventListener("pointercancel", M));
4198
4207
  }
4199
- function te(e) {
4208
+ function j(e) {
4200
4209
  if (!d.value || !a.value) return;
4201
4210
  let t = e.clientX - g, n = c.value - l.value, r = t / (l.value - x.value) * n;
4202
4211
  a.value.scrollLeft = _ + r, u.value = a.value.scrollLeft;
@@ -4206,13 +4215,13 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
4206
4215
  try {
4207
4216
  s.value.releasePointerCapture(e.pointerId);
4208
4217
  } catch {}
4209
- s.value.removeEventListener("pointermove", te), s.value.removeEventListener("pointerup", M), s.value.removeEventListener("pointercancel", M);
4218
+ s.value.removeEventListener("pointermove", j), s.value.removeEventListener("pointerup", M), s.value.removeEventListener("pointercancel", M);
4210
4219
  }
4211
4220
  }
4212
4221
  return U(() => {
4213
- O(), a.value && (m = new ResizeObserver(O), m.observe(a.value), a.value.firstElementChild && m.observe(a.value.firstElementChild));
4222
+ k(), a.value && (m = new ResizeObserver(k), m.observe(a.value), a.value.firstElementChild && m.observe(a.value.firstElementChild));
4214
4223
  }), pe(() => {
4215
- m?.disconnect(), window.clearTimeout(h), s.value && (s.value.removeEventListener("pointermove", te), s.value.removeEventListener("pointerup", M), s.value.removeEventListener("pointercancel", M)), document.body.style.userSelect = "";
4224
+ m?.disconnect(), window.clearTimeout(h), s.value && (s.value.removeEventListener("pointermove", j), s.value.removeEventListener("pointerup", M), s.value.removeEventListener("pointercancel", M)), document.body.style.userSelect = "";
4216
4225
  }), t({
4217
4226
  scrollTo: (e) => {
4218
4227
  a.value?.scrollTo(e);
@@ -4226,7 +4235,8 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
4226
4235
  "--ui3n-scrollbar-horizontal-thumb-hover-color": T.value,
4227
4236
  "--ui3n-scrollbar-horizontal-thumb-active-color": E.value,
4228
4237
  "--ui3n-scrollbar-horizontal-track-height": D.value,
4229
- "--ui3n-scrollbar-horizontal-track-color": ee.value
4238
+ "--ui3n-scrollbar-horizontal-track-radius": ee.value,
4239
+ "--ui3n-scrollbar-horizontal-track-color": O.value
4230
4240
  }),
4231
4241
  onMouseenter: t[0] ||= (e) => f.value = !0,
4232
4242
  onMouseleave: t[1] ||= (e) => f.value = !1
@@ -4234,7 +4244,7 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
4234
4244
  ref_key: "containerRef",
4235
4245
  ref: a,
4236
4246
  class: V(e.$style.scrollbarContainer),
4237
- onScroll: k
4247
+ onScroll: te
4238
4248
  }, [K(e.$slots, "default")], 34), R("div", {
4239
4249
  ref_key: "trackRef",
4240
4250
  ref: o,
@@ -4248,16 +4258,16 @@ var Br = ["id"], Vr = /* @__PURE__ */ O(/* @__PURE__ */ B({
4248
4258
  width: `${x.value}px`,
4249
4259
  transform: `translateX(${S.value}px)`
4250
4260
  }),
4251
- onPointerdown: j
4261
+ onPointerdown: ne
4252
4262
  }, null, 38)], 34)], 38));
4253
4263
  }
4254
4264
  }), [["__cssModules", { $style: {
4255
- ui3nScrollbarHorizontal: "_ui3nScrollbarHorizontal_cads6_1",
4256
- scrollbarContainer: "_scrollbarContainer_cads6_8",
4257
- track: "_track_cads6_22",
4258
- trackVisible: "_trackVisible_cads6_36",
4259
- thumb: "_thumb_cads6_42",
4260
- active: "_active_cads6_55"
4265
+ ui3nScrollbarHorizontal: "_ui3nScrollbarHorizontal_1ne48_1",
4266
+ scrollbarContainer: "_scrollbarContainer_1ne48_8",
4267
+ track: "_track_1ne48_22",
4268
+ trackVisible: "_trackVisible_1ne48_37",
4269
+ thumb: "_thumb_1ne48_43",
4270
+ active: "_active_1ne48_56"
4261
4271
  } }]]);
4262
4272
  //#endregion
4263
4273
  //#region src/composables/useDblClickHandler.ts
@@ -4271,4 +4281,4 @@ function Pi(e, t, n = 250) {
4271
4281
  return { handleDblClick: a };
4272
4282
  }
4273
4283
  //#endregion
4274
- export { Ei as Ui3nAutocomplete, Zr as Ui3nBadge, Qr as Ui3nBreadcrumb, $r as Ui3nBreadcrumbs, k as Ui3nButton, jr as Ui3nCheckbox, Zn as Ui3nChip, En as Ui3nClickOutside, Vr as Ui3nDialog, Rr as Ui3nDialogProvider, $n as Ui3nDropFiles, Si as Ui3nEditable, er as Ui3nEmoji, wn as Ui3nHtml, A as Ui3nIcon, nr as Ui3nInput, Tr as Ui3nInputFile, Wr as Ui3nList, Xn as Ui3nLongPress, Hr as Ui3nMenu, Ai as Ui3nMobileMenu, ji as Ui3nMobileMenuItem, j as Ui3nNotification, di as Ui3nProgressCircular, oi as Ui3nProgressLinear, _i as Ui3nRadio, vi as Ui3nRadioGroup, Nn as Ui3nResize, ee as Ui3nRipple, Ni as Ui3nScrollbarHorizontal, Kr as Ui3nScrollbarVertical, ki as Ui3nSelector, Di as Ui3nSlider, ni as Ui3nStepLineBar, ti as Ui3nSwitch, Ir as Ui3nTable, Mr as Ui3nTableSortIcon, Yr as Ui3nTabs, Dr as Ui3nText, Un as Ui3nTitle, pi as Ui3nTooltip, Jr as Ui3nVirtualScroll, Pi as useDblClickHandler };
4284
+ export { Ei as Ui3nAutocomplete, Zr as Ui3nBadge, Qr as Ui3nBreadcrumb, $r as Ui3nBreadcrumbs, k as Ui3nButton, jr as Ui3nCheckbox, Zn as Ui3nChip, En as Ui3nClickOutside, Vr as Ui3nDialog, Rr as Ui3nDialogProvider, $n as Ui3nDropFiles, Si as Ui3nEditable, er as Ui3nEmoji, wn as Ui3nHtml, te as Ui3nIcon, nr as Ui3nInput, Tr as Ui3nInputFile, Wr as Ui3nList, Xn as Ui3nLongPress, Hr as Ui3nMenu, Ai as Ui3nMobileMenu, ji as Ui3nMobileMenuItem, A as Ui3nNotification, di as Ui3nProgressCircular, oi as Ui3nProgressLinear, _i as Ui3nRadio, vi as Ui3nRadioGroup, Nn as Ui3nResize, ee as Ui3nRipple, Ni as Ui3nScrollbarHorizontal, Kr as Ui3nScrollbarVertical, ki as Ui3nSelector, Di as Ui3nSlider, ni as Ui3nStepLineBar, ti as Ui3nSwitch, Ir as Ui3nTable, Mr as Ui3nTableSortIcon, Yr as Ui3nTabs, Dr as Ui3nText, Un as Ui3nTitle, pi as Ui3nTooltip, Jr as Ui3nVirtualScroll, Pi as useDblClickHandler };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@v1nt1248/3nclient-lib",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "author": "v1nt1248",
5
- "version": "0.3.27",
5
+ "version": "0.3.28",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -8,6 +8,7 @@ export interface Ui3nScrollbarHorizontalProps {
8
8
  thumbHoverColor?: string;
9
9
  thumbActiveColor?: string;
10
10
  trackHeight?: number | string;
11
+ trackRadius?: number | string;
11
12
  trackColor?: string;
12
13
  }
13
14
 
@@ -7,7 +7,7 @@
7
7
  Ui3nScrollbarHorizontalExpose,
8
8
  } from './types';
9
9
 
10
- const MIN_WIDTH = 40;
10
+ const MIN_WIDTH = 32;
11
11
 
12
12
  const props = withDefaults(defineProps<Ui3nScrollbarHorizontalProps>(), {
13
13
  thumbMinWidth: MIN_WIDTH,
@@ -17,6 +17,7 @@
17
17
  thumbHoverColor: 'var(--color-bg-control-accent-hover)',
18
18
  thumbActiveColor: 'var(--color-bg-control-accent-focused)',
19
19
  trackHeight: 6,
20
+ trackRadius: 4,
20
21
  trackColor: 'transparent',
21
22
  });
22
23
 
@@ -91,6 +92,10 @@
91
92
  const num = Number(props.trackHeight);
92
93
  return isNaN(num) ? String(props.trackHeight) : `${num}px`;
93
94
  });
95
+ const trackRadiusCss = computed(() => {
96
+ const num = Number(props.trackRadius);
97
+ return isNaN(num) ? String(props.trackRadius) : `${num}px`;
98
+ });
94
99
  const trackColorCss = computed(() => props.trackColor);
95
100
 
96
101
  function updateMetrics() {
@@ -232,6 +237,7 @@
232
237
  '--ui3n-scrollbar-horizontal-thumb-hover-color': thumbHoverColorCss,
233
238
  '--ui3n-scrollbar-horizontal-thumb-active-color': thumbActiveColorCss,
234
239
  '--ui3n-scrollbar-horizontal-track-height': trackHeightCss,
240
+ '--ui3n-scrollbar-horizontal-track-radius': trackRadiusCss,
235
241
  '--ui3n-scrollbar-horizontal-track-color': trackColorCss,
236
242
  }"
237
243
  @mouseenter="isHovered = true"
@@ -293,6 +299,7 @@
293
299
  bottom: 2px;
294
300
  height: var(--ui3n-scrollbar-horizontal-track-height);
295
301
  background: var(--ui3n-scrollbar-horizontal-track-color);
302
+ border-radius: var(--ui3n-scrollbar-horizontal-track-radius);
296
303
  z-index: 10;
297
304
  visibility: hidden;
298
305
  opacity: 0;
@@ -11,6 +11,7 @@ export interface Ui3nScrollbarVerticalProps {
11
11
  thumbHoverColor?: string;
12
12
  thumbActiveColor?: string;
13
13
  trackWidth?: number;
14
+ trackRadius?: number | string;
14
15
  trackColor?: string;
15
16
  }
16
17
 
@@ -7,7 +7,7 @@
7
7
  Ui3nScrollbarVerticalExpose,
8
8
  } from './types';
9
9
 
10
- const MIN_HEIGHT = 40;
10
+ const MIN_HEIGHT = 32;
11
11
 
12
12
  const props = withDefaults(defineProps<Ui3nScrollbarVerticalProps>(), {
13
13
  thumbMinHeight: MIN_HEIGHT,
@@ -17,6 +17,7 @@
17
17
  thumbHoverColor: 'var(--color-bg-control-accent-hover)',
18
18
  thumbActiveColor: 'var(--color-bg-control-accent-focused)',
19
19
  trackWidth: 6,
20
+ trackRadius: 4,
20
21
  trackColor: 'transparent',
21
22
  });
22
23
  const emits = defineEmits<Ui3nScrollbarVerticalEmits>();
@@ -90,6 +91,10 @@
90
91
  return isNaN(num) ? String(props.trackWidth) : `${num}px`;
91
92
  });
92
93
  const trackColorCss = computed(() => props.trackColor);
94
+ const trackRadiusCss = computed(() => {
95
+ const num = Number(props.trackRadius);
96
+ return isNaN(num) ? String(props.trackRadius) : `${num}px`;
97
+ });
93
98
 
94
99
  function updateMetrics() {
95
100
  if (!containerRef.value) {
@@ -233,6 +238,7 @@
233
238
  '--ui3n-scrollbar-thumb-hover-color': thumbHoverColorCss,
234
239
  '--ui3n-scrollbar-thumb-active-color': thumbActiveColorCss,
235
240
  '--ui3n-scrollbar-track-width': trackWidthCss,
241
+ '--ui3n-scrollbar-track-radius': trackRadiusCss,
236
242
  '--ui3n-scrollbar-track-color': trackColorCss,
237
243
  }"
238
244
  @mouseenter="isHovered = true"
@@ -293,6 +299,7 @@
293
299
  bottom: 0;
294
300
  width: var(--ui3n-scrollbar-track-width);
295
301
  background: var(--ui3n-scrollbar-track-color);
302
+ border-radius: var(--ui3n-scrollbar-track-radius);
296
303
  z-index: 10;
297
304
  visibility: hidden;
298
305
  opacity: 0;