@roku-ui/vue 0.18.1 → 0.18.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.
- package/dist/components/Menu.vue.d.ts +6 -3
- package/dist/index.css +1 -1
- package/dist/index.js +97 -89
- package/dist/index.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1223,14 +1223,14 @@ function Bn(e, r, t, n = {}) {
|
|
|
1223
1223
|
}), $ || _();
|
|
1224
1224
|
function I(k, R) {
|
|
1225
1225
|
if (u) {
|
|
1226
|
-
const
|
|
1226
|
+
const B = {
|
|
1227
1227
|
key: e,
|
|
1228
1228
|
oldValue: k,
|
|
1229
1229
|
newValue: R,
|
|
1230
1230
|
storageArea: t
|
|
1231
1231
|
};
|
|
1232
|
-
u.dispatchEvent(t instanceof Storage ? new StorageEvent("storage",
|
|
1233
|
-
detail:
|
|
1232
|
+
u.dispatchEvent(t instanceof Storage ? new StorageEvent("storage", B) : new CustomEvent(Kt, {
|
|
1233
|
+
detail: B
|
|
1234
1234
|
}));
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
@@ -1240,8 +1240,8 @@ function Bn(e, r, t, n = {}) {
|
|
|
1240
1240
|
if (k == null)
|
|
1241
1241
|
I(R, null), t.removeItem(e);
|
|
1242
1242
|
else {
|
|
1243
|
-
const
|
|
1244
|
-
R !==
|
|
1243
|
+
const B = h.write(k);
|
|
1244
|
+
R !== B && (t.setItem(e, B), I(R, B));
|
|
1245
1245
|
}
|
|
1246
1246
|
} catch (R) {
|
|
1247
1247
|
y(R);
|
|
@@ -1252,8 +1252,8 @@ function Bn(e, r, t, n = {}) {
|
|
|
1252
1252
|
if (R == null)
|
|
1253
1253
|
return o && b != null && t.setItem(e, h.write(b)), b;
|
|
1254
1254
|
if (!k && c) {
|
|
1255
|
-
const
|
|
1256
|
-
return typeof c == "function" ? c(
|
|
1255
|
+
const B = h.read(R);
|
|
1256
|
+
return typeof c == "function" ? c(B, b) : w === "object" && !Array.isArray(B) ? { ...b, ...B } : B;
|
|
1257
1257
|
} else return typeof R != "string" ? R : h.read(R);
|
|
1258
1258
|
}
|
|
1259
1259
|
function _(k) {
|
|
@@ -1485,7 +1485,7 @@ function Ln(e, r = {}) {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
});
|
|
1487
1487
|
function p(g, _) {
|
|
1488
|
-
var T, k, R,
|
|
1488
|
+
var T, k, R, B;
|
|
1489
1489
|
if (!c)
|
|
1490
1490
|
return;
|
|
1491
1491
|
const z = K(e);
|
|
@@ -1496,7 +1496,7 @@ function Ln(e, r = {}) {
|
|
|
1496
1496
|
left: (k = K(g)) != null ? k : y.value,
|
|
1497
1497
|
behavior: K(o)
|
|
1498
1498
|
});
|
|
1499
|
-
const j = ((
|
|
1499
|
+
const j = ((B = z == null ? void 0 : z.document) == null ? void 0 : B.documentElement) || (z == null ? void 0 : z.documentElement) || z;
|
|
1500
1500
|
y != null && (u.value = j.scrollLeft), $ != null && (f.value = j.scrollTop);
|
|
1501
1501
|
}
|
|
1502
1502
|
const b = C(!1), w = Fe({
|
|
@@ -1515,14 +1515,14 @@ function Ln(e, r = {}) {
|
|
|
1515
1515
|
var _;
|
|
1516
1516
|
if (!c)
|
|
1517
1517
|
return;
|
|
1518
|
-
const T = ((_ = g == null ? void 0 : g.document) == null ? void 0 : _.documentElement) || (g == null ? void 0 : g.documentElement) || ae(g), { display: k, flexDirection: R } = getComputedStyle(T),
|
|
1519
|
-
h.left =
|
|
1520
|
-
const z = Math.abs(
|
|
1521
|
-
k === "flex" && R === "row-reverse" ? (w.left = j, w.right = z) : (w.left = z, w.right = j), u.value =
|
|
1518
|
+
const T = ((_ = g == null ? void 0 : g.document) == null ? void 0 : _.documentElement) || (g == null ? void 0 : g.documentElement) || ae(g), { display: k, flexDirection: R } = getComputedStyle(T), B = T.scrollLeft;
|
|
1519
|
+
h.left = B < u.value, h.right = B > u.value;
|
|
1520
|
+
const z = Math.abs(B) <= (i.left || 0), j = Math.abs(B) + T.clientWidth >= T.scrollWidth - (i.right || 0) - Jt;
|
|
1521
|
+
k === "flex" && R === "row-reverse" ? (w.left = j, w.right = z) : (w.left = z, w.right = j), u.value = B;
|
|
1522
1522
|
let X = T.scrollTop;
|
|
1523
1523
|
g === c.document && !X && (X = c.document.body.scrollTop), h.top = X < f.value, h.bottom = X > f.value;
|
|
1524
|
-
const fe = Math.abs(X) <= (i.top || 0),
|
|
1525
|
-
k === "flex" && R === "column-reverse" ? (w.top =
|
|
1524
|
+
const fe = Math.abs(X) <= (i.top || 0), V = Math.abs(X) + T.clientHeight >= T.scrollHeight - (i.bottom || 0) - Jt;
|
|
1525
|
+
k === "flex" && R === "column-reverse" ? (w.top = V, w.bottom = fe) : (w.top = fe, w.bottom = V), f.value = X;
|
|
1526
1526
|
}, H = (g) => {
|
|
1527
1527
|
var _;
|
|
1528
1528
|
if (!c)
|
|
@@ -3012,6 +3012,7 @@ const Vl = {
|
|
|
3012
3012
|
trigger: {
|
|
3013
3013
|
default: "click"
|
|
3014
3014
|
},
|
|
3015
|
+
classes: {},
|
|
3015
3016
|
color: {
|
|
3016
3017
|
default: "primary"
|
|
3017
3018
|
}
|
|
@@ -3049,6 +3050,10 @@ const Vl = {
|
|
|
3049
3050
|
});
|
|
3050
3051
|
}), $t(f, () => {
|
|
3051
3052
|
s(!1);
|
|
3053
|
+
}, {
|
|
3054
|
+
capture: !0
|
|
3055
|
+
}), N(window, "contextmenu", () => {
|
|
3056
|
+
s(!1);
|
|
3052
3057
|
});
|
|
3053
3058
|
const b = C([-1]);
|
|
3054
3059
|
ce(() => {
|
|
@@ -3136,22 +3141,25 @@ const Vl = {
|
|
|
3136
3141
|
position: "absolute"
|
|
3137
3142
|
} : {});
|
|
3138
3143
|
return (g, _) => {
|
|
3144
|
+
var k, R, B, z;
|
|
3139
3145
|
const T = Fl;
|
|
3140
3146
|
return x(), A("div", {
|
|
3141
3147
|
ref_key: "menuWrapperRef",
|
|
3142
3148
|
ref: d,
|
|
3143
|
-
class:
|
|
3149
|
+
class: D([(k = t.classes) == null ? void 0 : k.wrapper, {
|
|
3150
|
+
relative: !((R = t.classes) != null && R.wrapper)
|
|
3151
|
+
}])
|
|
3144
3152
|
}, [O("div", {
|
|
3145
3153
|
ref_key: "menuTriggerRef",
|
|
3146
|
-
ref: u
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
})],
|
|
3154
|
+
ref: u,
|
|
3155
|
+
class: D([(B = t.classes) == null ? void 0 : B.trigger, {
|
|
3156
|
+
"w-inherit h-inherit": !((z = t.classes) != null && z.trigger)
|
|
3157
|
+
}])
|
|
3158
|
+
}, [L(g.$slots, "default")], 2), Y(We, {
|
|
3151
3159
|
"enter-active-class": t.enterActiveClass,
|
|
3152
3160
|
"leave-active-class": t.leaveActiveClass
|
|
3153
3161
|
}, {
|
|
3154
|
-
default: ee(() => [o.value ? (x(), A("menu", {
|
|
3162
|
+
default: ee(() => [o.value && g.data ? (x(), A("menu", {
|
|
3155
3163
|
key: 0,
|
|
3156
3164
|
class: "relative z-1 flex justify-center",
|
|
3157
3165
|
style: P(H.value)
|
|
@@ -3160,24 +3168,24 @@ const Vl = {
|
|
|
3160
3168
|
ref: f,
|
|
3161
3169
|
class: D([[v(c).class, I.value], "w-64 border bg-surface p-2"]),
|
|
3162
3170
|
style: P([v(c).style])
|
|
3163
|
-
}, [(x(!0), A(J, null, de(t.data, (
|
|
3164
|
-
key:
|
|
3165
|
-
}, [v(Ot)(
|
|
3171
|
+
}, [(x(!0), A(J, null, de(t.data, (j, X) => (x(), A(J, {
|
|
3172
|
+
key: X
|
|
3173
|
+
}, [v(Ot)(j) ? (x(), A("div", Wl, ne(j.title), 1)) : v(Pt)(j) ? (x(), A("div", Nl)) : (x(), A(J, {
|
|
3166
3174
|
key: 2
|
|
3167
|
-
}, [
|
|
3175
|
+
}, [j.render ? (x(), U(we(j.render), {
|
|
3168
3176
|
key: 0
|
|
3169
3177
|
})) : (x(), U(T, Z({
|
|
3170
3178
|
key: 1,
|
|
3171
3179
|
ref_for: !0
|
|
3172
3180
|
}, {
|
|
3173
3181
|
...t,
|
|
3174
|
-
data:
|
|
3182
|
+
data: j
|
|
3175
3183
|
}, {
|
|
3176
|
-
idx: [
|
|
3184
|
+
idx: [X],
|
|
3177
3185
|
"has-icon": v(wr)(t.data)
|
|
3178
3186
|
}), null, 16, ["idx", "has-icon"]))], 64))], 64))), 128))], 6)], 4)) : F("", !0)]),
|
|
3179
3187
|
_: 1
|
|
3180
|
-
}, 8, ["enter-active-class", "leave-active-class"])],
|
|
3188
|
+
}, 8, ["enter-active-class", "leave-active-class"])], 2);
|
|
3181
3189
|
};
|
|
3182
3190
|
}
|
|
3183
3191
|
}), Sr = /* @__PURE__ */ W({
|
|
@@ -4372,9 +4380,9 @@ const bo = /* @__PURE__ */ W({
|
|
|
4372
4380
|
$el: o
|
|
4373
4381
|
});
|
|
4374
4382
|
const g = C(), _ = Se(g), T = Se(() => l.value), k = Qe("bg", { dark: 2, light: 7 }, 0.5), R = Qe("bg", { dark: 2, light: 7 }, 0.75);
|
|
4375
|
-
function
|
|
4383
|
+
function B(z) {
|
|
4376
4384
|
var Re;
|
|
4377
|
-
const { clientY: j } = z, { top: X, height: fe } = i,
|
|
4385
|
+
const { clientY: j } = z, { top: X, height: fe } = i, V = X.value, G = fe.value, ie = V + G / 2, ge = j - ie;
|
|
4378
4386
|
(Re = o.value) == null || Re.scrollBy({
|
|
4379
4387
|
top: ge / G * c.value,
|
|
4380
4388
|
behavior: "smooth"
|
|
@@ -4394,7 +4402,7 @@ const bo = /* @__PURE__ */ W({
|
|
|
4394
4402
|
width: `${z.barWidth}px`
|
|
4395
4403
|
}),
|
|
4396
4404
|
class: "absolute right-0 z-99999 h-full",
|
|
4397
|
-
onPointerdown:
|
|
4405
|
+
onPointerdown: B
|
|
4398
4406
|
}, [
|
|
4399
4407
|
ft(O("div", {
|
|
4400
4408
|
ref_key: "scrollBarIndicatorRef",
|
|
@@ -4471,36 +4479,36 @@ const bo = /* @__PURE__ */ W({
|
|
|
4471
4479
|
}), Q(l, () => {
|
|
4472
4480
|
n("change", l.value);
|
|
4473
4481
|
});
|
|
4474
|
-
const u = m(() => l.value), f = m(() => p(u.value)), y = m(() => t.options.findIndex((
|
|
4482
|
+
const u = m(() => l.value), f = m(() => p(u.value)), y = m(() => t.options.findIndex((V) => R(V, u.value))), $ = C(f.value);
|
|
4475
4483
|
Q(f, () => {
|
|
4476
4484
|
$.value = f.value;
|
|
4477
4485
|
});
|
|
4478
|
-
function p(
|
|
4479
|
-
return
|
|
4486
|
+
function p(V) {
|
|
4487
|
+
return V ? typeof V == "string" || typeof V == "symbol" || typeof V == "number" ? String(V) : V.label ? V.label : V.id : "";
|
|
4480
4488
|
}
|
|
4481
|
-
function b(
|
|
4482
|
-
if (
|
|
4483
|
-
return typeof
|
|
4489
|
+
function b(V) {
|
|
4490
|
+
if (V)
|
|
4491
|
+
return typeof V == "string" || typeof V == "symbol" || typeof V == "number" ? V : V.id;
|
|
4484
4492
|
}
|
|
4485
|
-
function w(
|
|
4493
|
+
function w(V) {
|
|
4486
4494
|
o.value = !0;
|
|
4487
|
-
const G =
|
|
4495
|
+
const G = V.target;
|
|
4488
4496
|
$.value = G.value, n("input", $.value);
|
|
4489
4497
|
}
|
|
4490
|
-
const h = m(() => t.searchable && $.value !== f.value ? t.options.filter((
|
|
4491
|
-
pe("ArrowDown", (
|
|
4492
|
-
o.value && (
|
|
4493
|
-
}), pe("ArrowUp", (
|
|
4494
|
-
o.value && (
|
|
4498
|
+
const h = m(() => t.searchable && $.value !== f.value ? t.options.filter((V) => t.filter(p(V), $.value)) : t.options);
|
|
4499
|
+
pe("ArrowDown", (V) => {
|
|
4500
|
+
o.value && (V.preventDefault(), d.value === -1 && c.value !== -1 ? d.value = c.value : d.value === -1 && c.value === -1 && y.value !== -1 && (d.value = y.value), d.value = (d.value + 1) % t.options.length);
|
|
4501
|
+
}), pe("ArrowUp", (V) => {
|
|
4502
|
+
o.value && (V.preventDefault(), d.value === -1 && c.value !== -1 ? d.value = c.value : d.value === -1 && c.value === -1 && y.value !== -1 && (d.value = y.value), d.value = (d.value - 1 + t.options.length) % t.options.length);
|
|
4495
4503
|
}), pe("Enter", () => {
|
|
4496
4504
|
o.value && d.value !== -1 && (l.value = h.value[d.value], i.value.focus(), o.value = !1);
|
|
4497
4505
|
});
|
|
4498
|
-
function S(
|
|
4506
|
+
function S(V) {
|
|
4499
4507
|
if (i.value.focus(), !o.value) {
|
|
4500
4508
|
o.value = !0;
|
|
4501
4509
|
return;
|
|
4502
4510
|
}
|
|
4503
|
-
l.value =
|
|
4511
|
+
l.value = V, o.value = !1;
|
|
4504
4512
|
}
|
|
4505
4513
|
const M = m(() => t.color), I = br(M, "default"), H = m(() => {
|
|
4506
4514
|
switch (t.size) {
|
|
@@ -4525,14 +4533,14 @@ const bo = /* @__PURE__ */ W({
|
|
|
4525
4533
|
d.value = -1, c.value = -1;
|
|
4526
4534
|
});
|
|
4527
4535
|
const k = m(() => o.value && Me ? _.value === 0 ? !1 : document.documentElement.clientHeight - T.value > _.value : !1);
|
|
4528
|
-
function R(
|
|
4529
|
-
return G ? typeof
|
|
4536
|
+
function R(V, G) {
|
|
4537
|
+
return G ? typeof V == "string" || typeof V == "symbol" || typeof V == "number" ? V === G : typeof G == "string" || typeof G == "symbol" || typeof G == "number" ? !1 : V.id === G.id : !1;
|
|
4530
4538
|
}
|
|
4531
|
-
const
|
|
4532
|
-
function fe(
|
|
4533
|
-
c.value =
|
|
4539
|
+
const B = m(() => t.searchable ? "cursor-text" : "cursor-pointer"), z = Et(), j = yr(), X = at(M);
|
|
4540
|
+
function fe(V) {
|
|
4541
|
+
c.value = V, d.value = -1;
|
|
4534
4542
|
}
|
|
4535
|
-
return (
|
|
4543
|
+
return (V, G) => (x(), A("div", {
|
|
4536
4544
|
ref_key: "wrapperRef",
|
|
4537
4545
|
ref: s,
|
|
4538
4546
|
class: "relative",
|
|
@@ -4542,12 +4550,12 @@ const bo = /* @__PURE__ */ W({
|
|
|
4542
4550
|
O("input", {
|
|
4543
4551
|
ref_key: "inputRef",
|
|
4544
4552
|
ref: i,
|
|
4545
|
-
class: D([[H.value.wrapper, v(a).class,
|
|
4546
|
-
placeholder:
|
|
4553
|
+
class: D([[H.value.wrapper, v(a).class, B.value], "border outline-none outline-none focus-visible:outline-2 custom-input-colors"]),
|
|
4554
|
+
placeholder: V.placeholder,
|
|
4547
4555
|
style: P([v(a).style, v(I)]),
|
|
4548
|
-
readonly: !
|
|
4556
|
+
readonly: !V.searchable,
|
|
4549
4557
|
value: $.value,
|
|
4550
|
-
"aria-label":
|
|
4558
|
+
"aria-label": V.ariaLabel,
|
|
4551
4559
|
"aria-haspopup": "listbox",
|
|
4552
4560
|
autocomplete: "off",
|
|
4553
4561
|
onInput: w,
|
|
@@ -4564,9 +4572,9 @@ const bo = /* @__PURE__ */ W({
|
|
|
4564
4572
|
}]]),
|
|
4565
4573
|
style: P([v(z).style])
|
|
4566
4574
|
}, [
|
|
4567
|
-
|
|
4568
|
-
L(
|
|
4569
|
-
Ze(ne(
|
|
4575
|
+
V.options.length === 0 ? (x(), A("div", $a, [
|
|
4576
|
+
L(V.$slots, "none", {}, () => [
|
|
4577
|
+
Ze(ne(V.noneText), 1)
|
|
4570
4578
|
])
|
|
4571
4579
|
])) : (x(), A(J, { key: 1 }, [
|
|
4572
4580
|
(x(!0), A(J, null, de(h.value, (ie, ge) => (x(), A("div", {
|
|
@@ -4583,7 +4591,7 @@ const bo = /* @__PURE__ */ W({
|
|
|
4583
4591
|
onMousemove: (Re) => fe(ge),
|
|
4584
4592
|
onMouseleave: G[1] || (G[1] = (Re) => c.value = -1)
|
|
4585
4593
|
}, [
|
|
4586
|
-
L(
|
|
4594
|
+
L(V.$slots, "item", {
|
|
4587
4595
|
data: ie,
|
|
4588
4596
|
selected: R(ie, u.value)
|
|
4589
4597
|
}, () => [
|
|
@@ -4593,9 +4601,9 @@ const bo = /* @__PURE__ */ W({
|
|
|
4593
4601
|
O("i", { class: "i-fluent-checkmark-12-filled h-3 w-3" }, null, -1)
|
|
4594
4602
|
]))) : F("", !0)
|
|
4595
4603
|
], 46, Ca))), 128)),
|
|
4596
|
-
|
|
4597
|
-
L(
|
|
4598
|
-
Ze(ne(
|
|
4604
|
+
V.searchable && h.value.length === 0 ? (x(), A("div", Aa, [
|
|
4605
|
+
L(V.$slots, "not-found", {}, () => [
|
|
4606
|
+
Ze(ne(V.notFoundText), 1)
|
|
4599
4607
|
])
|
|
4600
4608
|
])) : F("", !0)
|
|
4601
4609
|
], 64))
|
|
@@ -4743,7 +4751,7 @@ const bo = /* @__PURE__ */ W({
|
|
|
4743
4751
|
return;
|
|
4744
4752
|
}
|
|
4745
4753
|
H.preventDefault(), H.stopPropagation();
|
|
4746
|
-
const _ = Ae(p), { clientX: T } = H, k = _.left.value,
|
|
4754
|
+
const _ = Ae(p), { clientX: T } = H, k = _.left.value, B = _.right.value - k, z = Math.round((T - k) / B * (o.value - 1));
|
|
4747
4755
|
if (z < 0) {
|
|
4748
4756
|
c.value = 0;
|
|
4749
4757
|
return;
|
|
@@ -5467,7 +5475,7 @@ function Ua(e, r = {}) {
|
|
|
5467
5475
|
}
|
|
5468
5476
|
});
|
|
5469
5477
|
function p(g, _) {
|
|
5470
|
-
var T, k, R,
|
|
5478
|
+
var T, k, R, B;
|
|
5471
5479
|
if (!c)
|
|
5472
5480
|
return;
|
|
5473
5481
|
const z = ve(e);
|
|
@@ -5478,7 +5486,7 @@ function Ua(e, r = {}) {
|
|
|
5478
5486
|
left: (k = ve(g)) != null ? k : y.value,
|
|
5479
5487
|
behavior: ve(o)
|
|
5480
5488
|
});
|
|
5481
|
-
const j = ((
|
|
5489
|
+
const j = ((B = z == null ? void 0 : z.document) == null ? void 0 : B.documentElement) || (z == null ? void 0 : z.documentElement) || z;
|
|
5482
5490
|
y != null && (u.value = j.scrollLeft), $ != null && (f.value = j.scrollTop);
|
|
5483
5491
|
}
|
|
5484
5492
|
const b = C(!1), w = Fe({
|
|
@@ -5497,14 +5505,14 @@ function Ua(e, r = {}) {
|
|
|
5497
5505
|
var _;
|
|
5498
5506
|
if (!c)
|
|
5499
5507
|
return;
|
|
5500
|
-
const T = ((_ = g == null ? void 0 : g.document) == null ? void 0 : _.documentElement) || (g == null ? void 0 : g.documentElement) || Te(g), { display: k, flexDirection: R } = getComputedStyle(T),
|
|
5501
|
-
h.left =
|
|
5502
|
-
const z = Math.abs(
|
|
5503
|
-
k === "flex" && R === "row-reverse" ? (w.left = j, w.right = z) : (w.left = z, w.right = j), u.value =
|
|
5508
|
+
const T = ((_ = g == null ? void 0 : g.document) == null ? void 0 : _.documentElement) || (g == null ? void 0 : g.documentElement) || Te(g), { display: k, flexDirection: R } = getComputedStyle(T), B = T.scrollLeft;
|
|
5509
|
+
h.left = B < u.value, h.right = B > u.value;
|
|
5510
|
+
const z = Math.abs(B) <= (i.left || 0), j = Math.abs(B) + T.clientWidth >= T.scrollWidth - (i.right || 0) - Qt;
|
|
5511
|
+
k === "flex" && R === "row-reverse" ? (w.left = j, w.right = z) : (w.left = z, w.right = j), u.value = B;
|
|
5504
5512
|
let X = T.scrollTop;
|
|
5505
5513
|
g === c.document && !X && (X = c.document.body.scrollTop), h.top = X < f.value, h.bottom = X > f.value;
|
|
5506
|
-
const fe = Math.abs(X) <= (i.top || 0),
|
|
5507
|
-
k === "flex" && R === "column-reverse" ? (w.top =
|
|
5514
|
+
const fe = Math.abs(X) <= (i.top || 0), V = Math.abs(X) + T.clientHeight >= T.scrollHeight - (i.bottom || 0) - Qt;
|
|
5515
|
+
k === "flex" && R === "column-reverse" ? (w.top = V, w.bottom = fe) : (w.top = fe, w.bottom = V), f.value = X;
|
|
5508
5516
|
}, H = (g) => {
|
|
5509
5517
|
var _;
|
|
5510
5518
|
if (!c)
|
|
@@ -5567,8 +5575,8 @@ const Vo = /* @__PURE__ */ W({
|
|
|
5567
5575
|
function y(S, M, I, H) {
|
|
5568
5576
|
const g = v(S), _ = Array.from({ length: v(M) }).fill(0), T = [], k = Math.max(0, u.value - v(H) * 2 - f.value * g.length - v(I) * g.length) / 2;
|
|
5569
5577
|
for (let R = 0; R < g.length; R++) {
|
|
5570
|
-
const
|
|
5571
|
-
T.push({ x: j, y: X, width:
|
|
5578
|
+
const B = g[R], z = _.indexOf(Math.min(..._)), j = z * (f.value + v(I)) + v(H) + k, X = _[z];
|
|
5579
|
+
T.push({ x: j, y: X, width: B.width.value, height: B.height.value }), _[z] += B.height.value + v(I);
|
|
5572
5580
|
}
|
|
5573
5581
|
return T;
|
|
5574
5582
|
}
|
|
@@ -5648,11 +5656,11 @@ const Vo = /* @__PURE__ */ W({
|
|
|
5648
5656
|
height: k.height * R
|
|
5649
5657
|
};
|
|
5650
5658
|
}));
|
|
5651
|
-
function $(k, R,
|
|
5652
|
-
const j = v(k), X = Array.from({ length: v(R) }).fill(0), fe = [],
|
|
5659
|
+
function $(k, R, B, z) {
|
|
5660
|
+
const j = v(k), X = Array.from({ length: v(R) }).fill(0), fe = [], V = Math.max(0, u.value - v(z) * 2 - f.value * j.length - v(B) * j.length) / 2;
|
|
5653
5661
|
for (let G = 0; G < j.length; G++) {
|
|
5654
|
-
const ie = j[G], ge = X.indexOf(Math.min(...X)), Re = ge * (f.value + v(
|
|
5655
|
-
fe.push({ x: Re, y: Cr, width: ie.width, height: ie.height }), X[ge] += ie.height + v(
|
|
5662
|
+
const ie = j[G], ge = X.indexOf(Math.min(...X)), Re = ge * (f.value + v(B)) + v(z) + V, Cr = X[ge];
|
|
5663
|
+
fe.push({ x: Re, y: Cr, width: ie.width, height: ie.height }), X[ge] += ie.height + v(B);
|
|
5656
5664
|
}
|
|
5657
5665
|
return fe;
|
|
5658
5666
|
}
|
|
@@ -5679,27 +5687,27 @@ const Vo = /* @__PURE__ */ W({
|
|
|
5679
5687
|
I.y.value + (((k = c.value) == null ? void 0 : k.clientHeight) ?? 0) + n.value
|
|
5680
5688
|
];
|
|
5681
5689
|
}), g = m(() => p.value.map((k) => {
|
|
5682
|
-
const R = k.y,
|
|
5683
|
-
return R >= H.value[0] && R <= H.value[1] ||
|
|
5690
|
+
const R = k.y, B = k.y + k.height;
|
|
5691
|
+
return R >= H.value[0] && R <= H.value[1] || B >= H.value[0] && B <= H.value[1] || R <= H.value[0] && B >= H.value[1];
|
|
5684
5692
|
})), _ = m(() => {
|
|
5685
5693
|
const k = [];
|
|
5686
|
-
return w.value.forEach((R,
|
|
5694
|
+
return w.value.forEach((R, B) => {
|
|
5687
5695
|
if (d(R.children))
|
|
5688
5696
|
R.children.forEach((z, j) => {
|
|
5689
5697
|
g.value[j] && k.push([z, j]);
|
|
5690
5698
|
});
|
|
5691
5699
|
else {
|
|
5692
|
-
if (!g.value[
|
|
5700
|
+
if (!g.value[B])
|
|
5693
5701
|
return;
|
|
5694
|
-
k.push([R,
|
|
5702
|
+
k.push([R, B]);
|
|
5695
5703
|
}
|
|
5696
5704
|
}), k;
|
|
5697
5705
|
});
|
|
5698
5706
|
r({
|
|
5699
5707
|
scroll: I,
|
|
5700
5708
|
scrollTo: (k, R = !1) => {
|
|
5701
|
-
const
|
|
5702
|
-
S.value = R, I.y.value = k, S.value =
|
|
5709
|
+
const B = S.value;
|
|
5710
|
+
S.value = R, I.y.value = k, S.value = B;
|
|
5703
5711
|
}
|
|
5704
5712
|
});
|
|
5705
5713
|
const T = m(() => t.is ?? "div");
|
|
@@ -5719,11 +5727,11 @@ const Vo = /* @__PURE__ */ W({
|
|
|
5719
5727
|
position: "relative"
|
|
5720
5728
|
})
|
|
5721
5729
|
}, [
|
|
5722
|
-
(x(!0), A(J, null, de(_.value, ([
|
|
5723
|
-
key:
|
|
5730
|
+
(x(!0), A(J, null, de(_.value, ([B, z]) => (x(), A("div", {
|
|
5731
|
+
key: B,
|
|
5724
5732
|
style: P([h(z), { position: "absolute" }])
|
|
5725
5733
|
}, [
|
|
5726
|
-
(x(), U(we(
|
|
5734
|
+
(x(), U(we(B), {
|
|
5727
5735
|
style: P({
|
|
5728
5736
|
width: `${f.value}px`
|
|
5729
5737
|
})
|