@wyxos/vibe 3.1.33 → 3.1.34
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/lib/index.cjs +1 -1
- package/lib/index.js +166 -170
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2985,13 +2985,16 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
2985
2985
|
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
2986
2986
|
}, ii = { class: "h-full w-full" }, ai = {
|
|
2987
2987
|
key: 0,
|
|
2988
|
+
"data-testid": "vibe-fullscreen-aside-column",
|
|
2989
|
+
class: "vibe-fullscreen-aside-column-shell relative h-full min-h-0 shrink-0 overflow-hidden"
|
|
2990
|
+
}, oi = {
|
|
2988
2991
|
"data-testid": "vibe-fullscreen-aside",
|
|
2989
|
-
class: "h-full min-h-0 w-[var(--vibe-fullscreen-aside-width,22rem)]
|
|
2990
|
-
},
|
|
2992
|
+
class: "absolute inset-y-0 right-0 h-full min-h-0 w-[var(--vibe-fullscreen-aside-width,22rem)] overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
2993
|
+
}, si = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ci = {
|
|
2991
2994
|
key: 0,
|
|
2992
2995
|
"data-testid": "vibe-fullscreen-aside",
|
|
2993
2996
|
class: "absolute inset-y-0 right-0 z-[6] w-full max-w-[22rem] overflow-hidden border-l border-white/10 bg-black/82 backdrop-blur-[18px]"
|
|
2994
|
-
},
|
|
2997
|
+
}, li = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ui = 1280, di = 768, fi = /* @__PURE__ */ d({
|
|
2995
2998
|
__name: "FullscreenSurface",
|
|
2996
2999
|
props: {
|
|
2997
3000
|
active: {
|
|
@@ -3057,7 +3060,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3057
3060
|
enabled: N(d, "active"),
|
|
3058
3061
|
onAssetError: d.reportAssetError ?? void 0,
|
|
3059
3062
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
3060
|
-
}), _ = D(typeof window > "u" ?
|
|
3063
|
+
}), _ = D(typeof window > "u" ? ui : window.innerWidth || ui), C = cn({
|
|
3061
3064
|
active: N(d, "active"),
|
|
3062
3065
|
items: h.items,
|
|
3063
3066
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
@@ -3074,7 +3077,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3074
3077
|
fullscreenMedia: C,
|
|
3075
3078
|
updateDominantToneFromImageElement: xe,
|
|
3076
3079
|
viewer: h
|
|
3077
|
-
}), z = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), ee = i(() => _.value <
|
|
3080
|
+
}), z = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), ee = i(() => _.value < di ? "vertical" : "horizontal"), V = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), U = i(() => {
|
|
3078
3081
|
let e = h.activeItem.value;
|
|
3079
3082
|
return e ? {
|
|
3080
3083
|
hasNextPage: d.hasNextPage,
|
|
@@ -3089,7 +3092,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3089
3092
|
...U.value,
|
|
3090
3093
|
kind: h.statusKind.value,
|
|
3091
3094
|
message: h.statusMessage.value
|
|
3092
|
-
}), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() => ln(te.value)), re = i(() => ln(ne.value)), J = i(() => ln(W.value)), Y = i(() => re.value && _.value >=
|
|
3095
|
+
}), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() => ln(te.value)), re = i(() => ln(ne.value)), J = i(() => ln(W.value)), Y = i(() => re.value && _.value >= ui), ie = i(() => re.value && !Y.value), ae = i(() => ln(K.value)), oe = i(() => !!(h.activeItem.value && (d.showBackToList || h.activeItem.value.title || h.items.value.length || q.value))), ce = i(() => d.showEndBadge && h.isAtEnd.value && !h.hasNextPage.value && !h.loading.value), fe = i(() => J.value || !!G.value || ce.value), pe = i(() => z.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), { emptyStateProps: X, showBadgeEmptyState: me, showCustomEmptyState: he, showInlineEmptyState: ge } = fn({
|
|
3093
3096
|
emptyStateMode: N(d, "emptyStateMode"),
|
|
3094
3097
|
itemCount: i(() => d.items.length),
|
|
3095
3098
|
loading: N(d, "loading"),
|
|
@@ -3102,7 +3105,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3102
3105
|
window.removeEventListener("resize", _e);
|
|
3103
3106
|
});
|
|
3104
3107
|
function _e() {
|
|
3105
|
-
_.value = window.innerWidth ||
|
|
3108
|
+
_.value = window.innerWidth || ui;
|
|
3106
3109
|
}
|
|
3107
3110
|
function ve(e, t) {
|
|
3108
3111
|
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && xe(e, t);
|
|
@@ -3420,15 +3423,8 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3420
3423
|
"status-kind",
|
|
3421
3424
|
"status-message"
|
|
3422
3425
|
])) : o("", !0)
|
|
3423
|
-
]), u(r, {
|
|
3424
|
-
"
|
|
3425
|
-
"enter-from-class": "translate-x-full opacity-0",
|
|
3426
|
-
"enter-to-class": "translate-x-0 opacity-100",
|
|
3427
|
-
"leave-active-class": "transform-gpu transition-all duration-260 ease-in",
|
|
3428
|
-
"leave-from-class": "translate-x-0 opacity-100",
|
|
3429
|
-
"leave-to-class": "translate-x-full opacity-0"
|
|
3430
|
-
}, {
|
|
3431
|
-
default: B(() => [Y.value && U.value ? (w(), s("aside", ai, [c("div", oi, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
|
|
3426
|
+
]), u(r, { name: "vibe-fullscreen-aside-column" }, {
|
|
3427
|
+
default: B(() => [Y.value && U.value ? (w(), s("div", ai, [c("aside", oi, [c("div", si, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])])) : o("", !0)]),
|
|
3432
3428
|
_: 3
|
|
3433
3429
|
})]),
|
|
3434
3430
|
u(r, {
|
|
@@ -3439,7 +3435,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3439
3435
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3440
3436
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3441
3437
|
}, {
|
|
3442
|
-
default: B(() => [ie.value && U.value ? (w(), s("aside",
|
|
3438
|
+
default: B(() => [ie.value && U.value ? (w(), s("aside", ci, [c("div", li, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
|
|
3443
3439
|
_: 3
|
|
3444
3440
|
})
|
|
3445
3441
|
]));
|
|
@@ -3447,7 +3443,7 @@ var Ar = { class: "relative flex h-full min-h-0 flex-col overflow-hidden bg-[#05
|
|
|
3447
3443
|
});
|
|
3448
3444
|
//#endregion
|
|
3449
3445
|
//#region src/components/viewer-core/masonryLayoutState.ts
|
|
3450
|
-
function
|
|
3446
|
+
function pi(e) {
|
|
3451
3447
|
let t = j([]), n = j([]), r = j(/* @__PURE__ */ new Map()), i = j(0), a = j(/* @__PURE__ */ new Map()), o = j([]);
|
|
3452
3448
|
function s(s, c, l) {
|
|
3453
3449
|
let u = pr(s, {
|
|
@@ -3513,24 +3509,24 @@ function fi(e) {
|
|
|
3513
3509
|
}
|
|
3514
3510
|
//#endregion
|
|
3515
3511
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
3516
|
-
var
|
|
3517
|
-
function
|
|
3512
|
+
var mi = 300, hi = 600, gi = 40, _i = 300, vi = 400, yi = 300;
|
|
3513
|
+
function bi(e, t) {
|
|
3518
3514
|
return t === "top" ? [...e].reverse() : e;
|
|
3519
3515
|
}
|
|
3520
|
-
function
|
|
3521
|
-
return e <= 0 ?
|
|
3516
|
+
function xi(e) {
|
|
3517
|
+
return e <= 0 ? hi : hi + Math.min((e - 1) * gi, vi);
|
|
3522
3518
|
}
|
|
3523
|
-
function
|
|
3519
|
+
function Si(e, t, n = yi) {
|
|
3524
3520
|
return e + t > n;
|
|
3525
3521
|
}
|
|
3526
|
-
function
|
|
3527
|
-
return
|
|
3522
|
+
function Ci() {
|
|
3523
|
+
return _i;
|
|
3528
3524
|
}
|
|
3529
|
-
function
|
|
3525
|
+
function wi(e) {
|
|
3530
3526
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
3531
3527
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
3532
3528
|
}
|
|
3533
|
-
function
|
|
3529
|
+
function Ti(e) {
|
|
3534
3530
|
let t = D(/* @__PURE__ */ new Set()), n = D(/* @__PURE__ */ new Set()), r = D(/* @__PURE__ */ new Map()), a = D(/* @__PURE__ */ new Map()), o = D(/* @__PURE__ */ new Map()), s = D(/* @__PURE__ */ new Set()), c = D(/* @__PURE__ */ new Map()), l = D(/* @__PURE__ */ new Map()), u = D(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
|
|
3535
3531
|
z(e.visibleIndices, (i) => {
|
|
3536
3532
|
if (!i.length) return;
|
|
@@ -3540,20 +3536,20 @@ function wi(e) {
|
|
|
3540
3536
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
3541
3537
|
}
|
|
3542
3538
|
if (!o.length) return;
|
|
3543
|
-
let s =
|
|
3544
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
3545
|
-
r.value = c,
|
|
3539
|
+
let s = bi(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
3540
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * gi, vi));
|
|
3541
|
+
r.value = c, Ei(() => {
|
|
3546
3542
|
let e = new Set(n.value);
|
|
3547
3543
|
for (let t of o) e.add(t);
|
|
3548
3544
|
n.value = e;
|
|
3549
|
-
}),
|
|
3545
|
+
}), Di(() => {
|
|
3550
3546
|
let e = new Set(t.value);
|
|
3551
3547
|
for (let t of o) e.delete(t);
|
|
3552
3548
|
t.value = e, w(() => {
|
|
3553
3549
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
3554
3550
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
3555
3551
|
n.value = e, r.value = t, a.value = i;
|
|
3556
|
-
},
|
|
3552
|
+
}, xi(o.length));
|
|
3557
3553
|
});
|
|
3558
3554
|
}, { flush: "post" }), z(() => e.items.value.map((e) => $(e)), (e) => {
|
|
3559
3555
|
if (!e.length || !o.value.size) return;
|
|
@@ -3566,7 +3562,7 @@ function wi(e) {
|
|
|
3566
3562
|
});
|
|
3567
3563
|
function m(n, r = "bottom") {
|
|
3568
3564
|
if (!n.length) return;
|
|
3569
|
-
let i =
|
|
3565
|
+
let i = Si(t.value.size, n.length), o = i ? new Set(e.visibleIndices.value) : null, s = o ? h(o) : new Set(t.value), c = i ? g(s) : new Map(a.value);
|
|
3570
3566
|
for (let t of n) {
|
|
3571
3567
|
let n = $(t), a = i ? e.indexById.value.get(n) : null;
|
|
3572
3568
|
o && (a == null || !o.has(a)) || (s.add(n), c.set(n, r));
|
|
@@ -3598,7 +3594,7 @@ function wi(e) {
|
|
|
3598
3594
|
let e = $(t.item);
|
|
3599
3595
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
3600
3596
|
}
|
|
3601
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
3597
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Ei(() => {
|
|
3602
3598
|
let e = new Set(s.value);
|
|
3603
3599
|
for (let t of p) e.add(t);
|
|
3604
3600
|
s.value = e;
|
|
@@ -3606,9 +3602,9 @@ function wi(e) {
|
|
|
3606
3602
|
let e = new Map(o.value), t = new Set(s.value);
|
|
3607
3603
|
for (let n of p) e.delete(n), t.delete(n);
|
|
3608
3604
|
o.value = e, s.value = t;
|
|
3609
|
-
},
|
|
3605
|
+
}, _i);
|
|
3610
3606
|
}
|
|
3611
|
-
function v(t, n, r =
|
|
3607
|
+
function v(t, n, r = mi) {
|
|
3612
3608
|
if (!t.size) return;
|
|
3613
3609
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
3614
3610
|
for (let [r, o] of t.entries()) {
|
|
@@ -3627,8 +3623,8 @@ function wi(e) {
|
|
|
3627
3623
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
3628
3624
|
let o = new Map(l.value);
|
|
3629
3625
|
for (let e of a) o.set(e, r);
|
|
3630
|
-
l.value = o,
|
|
3631
|
-
u.value = new Set(a),
|
|
3626
|
+
l.value = o, Ei(() => {
|
|
3627
|
+
u.value = new Set(a), Ei(() => {
|
|
3632
3628
|
c.value = /* @__PURE__ */ new Map();
|
|
3633
3629
|
});
|
|
3634
3630
|
}), w(() => {
|
|
@@ -3639,8 +3635,8 @@ function wi(e) {
|
|
|
3639
3635
|
}, r);
|
|
3640
3636
|
}
|
|
3641
3637
|
function y(e) {
|
|
3642
|
-
if (n.value.has(e)) return `transform ${
|
|
3643
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
3638
|
+
if (n.value.has(e)) return `transform ${hi}ms ease-out`;
|
|
3639
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? mi}ms ease-out`;
|
|
3644
3640
|
}
|
|
3645
3641
|
function b(e) {
|
|
3646
3642
|
if (!n.value.has(e)) return;
|
|
@@ -3657,7 +3653,7 @@ function wi(e) {
|
|
|
3657
3653
|
} : {
|
|
3658
3654
|
dx: 0,
|
|
3659
3655
|
dy: 0
|
|
3660
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
3656
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? wi({
|
|
3661
3657
|
columnWidth: e.columnWidth.value,
|
|
3662
3658
|
direction: u,
|
|
3663
3659
|
itemHeight: o,
|
|
@@ -3671,14 +3667,14 @@ function wi(e) {
|
|
|
3671
3667
|
if (!r) return {
|
|
3672
3668
|
opacity: "0",
|
|
3673
3669
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
3674
|
-
transition: `opacity ${
|
|
3670
|
+
transition: `opacity ${_i}ms ease-out, transform ${_i}ms ease-out`
|
|
3675
3671
|
};
|
|
3676
3672
|
let i = s.value.has(n);
|
|
3677
3673
|
return {
|
|
3678
3674
|
height: `${r.height}px`,
|
|
3679
3675
|
opacity: i ? "0" : "1",
|
|
3680
3676
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
3681
|
-
transition: `opacity ${
|
|
3677
|
+
transition: `opacity ${_i}ms ease-out, transform ${_i}ms ease-out`,
|
|
3682
3678
|
width: `${e.columnWidth.value}px`
|
|
3683
3679
|
};
|
|
3684
3680
|
}
|
|
@@ -3699,28 +3695,28 @@ function wi(e) {
|
|
|
3699
3695
|
playFlipMoveAnimation: v
|
|
3700
3696
|
};
|
|
3701
3697
|
}
|
|
3702
|
-
function
|
|
3698
|
+
function Ei(e) {
|
|
3703
3699
|
if (typeof requestAnimationFrame == "function") {
|
|
3704
3700
|
requestAnimationFrame(() => e());
|
|
3705
3701
|
return;
|
|
3706
3702
|
}
|
|
3707
3703
|
setTimeout(e, 0);
|
|
3708
3704
|
}
|
|
3709
|
-
function
|
|
3710
|
-
|
|
3705
|
+
function Di(e) {
|
|
3706
|
+
Ei(() => Ei(e));
|
|
3711
3707
|
}
|
|
3712
3708
|
//#endregion
|
|
3713
3709
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
3714
|
-
function
|
|
3710
|
+
function Oi(e, t) {
|
|
3715
3711
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
3716
3712
|
}
|
|
3717
|
-
function
|
|
3713
|
+
function ki(e, t, n) {
|
|
3718
3714
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
3719
3715
|
}
|
|
3720
|
-
function
|
|
3716
|
+
function Ai(e, t, n, r) {
|
|
3721
3717
|
return Math.max(e?.scrollHeight ?? 0, r) - (t + n);
|
|
3722
3718
|
}
|
|
3723
|
-
function
|
|
3719
|
+
function ji(e, t) {
|
|
3724
3720
|
return {
|
|
3725
3721
|
height: `${e}px`,
|
|
3726
3722
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -3728,11 +3724,11 @@ function Ai(e, t) {
|
|
|
3728
3724
|
}
|
|
3729
3725
|
//#endregion
|
|
3730
3726
|
//#region src/components/viewer-core/masonryScrollBehavior.ts
|
|
3731
|
-
var
|
|
3732
|
-
function
|
|
3727
|
+
var Mi = 24, Ni = 48;
|
|
3728
|
+
function Pi(e) {
|
|
3733
3729
|
let t = D(0), n = 0, r = 0;
|
|
3734
3730
|
function i(e) {
|
|
3735
|
-
if (t.value =
|
|
3731
|
+
if (t.value = zi(e), t.value <= 0) {
|
|
3736
3732
|
o();
|
|
3737
3733
|
return;
|
|
3738
3734
|
}
|
|
@@ -3752,7 +3748,7 @@ function Ni(e) {
|
|
|
3752
3748
|
let s = e.getViewport();
|
|
3753
3749
|
if (s && r > 0) {
|
|
3754
3750
|
let n = Math.min(Math.max(0, i - r), 250), a = t.value * n / 1e3;
|
|
3755
|
-
s.scrollTop =
|
|
3751
|
+
s.scrollTop = Bi(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
|
|
3756
3752
|
}
|
|
3757
3753
|
r = i, a();
|
|
3758
3754
|
}
|
|
@@ -3762,44 +3758,44 @@ function Ni(e) {
|
|
|
3762
3758
|
stop: o
|
|
3763
3759
|
};
|
|
3764
3760
|
}
|
|
3765
|
-
function
|
|
3761
|
+
function Fi(e) {
|
|
3766
3762
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3767
3763
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3768
|
-
return t <= 0 ? 1 :
|
|
3764
|
+
return t <= 0 ? 1 : Bi(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3769
3765
|
}
|
|
3770
|
-
function
|
|
3766
|
+
function Ii(e) {
|
|
3771
3767
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3772
3768
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3773
|
-
return t <= 0 ? 1 :
|
|
3769
|
+
return t <= 0 ? 1 : Bi(e.progressDistancePx / t, 0, 1);
|
|
3774
3770
|
}
|
|
3775
|
-
function
|
|
3776
|
-
let t = i(() => Math.max(0, e.viewportHeight.value -
|
|
3771
|
+
function Li(e) {
|
|
3772
|
+
let t = i(() => Math.max(0, e.viewportHeight.value - Mi * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
|
|
3777
3773
|
if (!n.value) return 0;
|
|
3778
3774
|
let r = e.viewportHeight.value / e.containerHeight.value * t.value;
|
|
3779
|
-
return Math.min(t.value, Math.max(
|
|
3775
|
+
return Math.min(t.value, Math.max(Ni, r));
|
|
3780
3776
|
}), a = i(() => {
|
|
3781
|
-
if (!n.value) return
|
|
3777
|
+
if (!n.value) return Mi;
|
|
3782
3778
|
let i = Math.max(0, e.containerHeight.value - e.viewportHeight.value);
|
|
3783
|
-
return
|
|
3779
|
+
return Mi + Math.max(0, t.value - r.value) * (i > 0 ? Bi(e.scrollTop.value / i, 0, 1) : 0);
|
|
3784
3780
|
});
|
|
3785
3781
|
return {
|
|
3786
|
-
getScrollbarThumbStyle: () =>
|
|
3782
|
+
getScrollbarThumbStyle: () => ji(r.value, a.value),
|
|
3787
3783
|
showScrollbar: n
|
|
3788
3784
|
};
|
|
3789
3785
|
}
|
|
3790
|
-
function
|
|
3786
|
+
function Ri(e) {
|
|
3791
3787
|
return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3792
3788
|
}
|
|
3793
|
-
function
|
|
3789
|
+
function zi(e) {
|
|
3794
3790
|
return Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3795
3791
|
}
|
|
3796
|
-
function
|
|
3792
|
+
function Bi(e, t, n) {
|
|
3797
3793
|
return Math.min(Math.max(e, t), n);
|
|
3798
3794
|
}
|
|
3799
3795
|
//#endregion
|
|
3800
3796
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
3801
|
-
var
|
|
3802
|
-
function
|
|
3797
|
+
var Vi = 250, Hi = 1e3;
|
|
3798
|
+
function Ui(e) {
|
|
3803
3799
|
let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = D(!1), c = 0, l = null;
|
|
3804
3800
|
x(() => {
|
|
3805
3801
|
S();
|
|
@@ -3822,7 +3818,7 @@ function Hi(e) {
|
|
|
3822
3818
|
if (!C(t) || !e.isAtBoundary()) return;
|
|
3823
3819
|
let n = Date.now();
|
|
3824
3820
|
if (!(n < c)) {
|
|
3825
|
-
if (c = n +
|
|
3821
|
+
if (c = n + Vi, a.value) {
|
|
3826
3822
|
s.value = !0;
|
|
3827
3823
|
return;
|
|
3828
3824
|
}
|
|
@@ -3861,7 +3857,7 @@ function Hi(e) {
|
|
|
3861
3857
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3862
3858
|
}
|
|
3863
3859
|
function v() {
|
|
3864
|
-
o.value = !1, y(
|
|
3860
|
+
o.value = !1, y(Hi);
|
|
3865
3861
|
}
|
|
3866
3862
|
function y(e) {
|
|
3867
3863
|
S(), a.value = !0, l = setTimeout(() => {
|
|
@@ -3893,7 +3889,7 @@ function Hi(e) {
|
|
|
3893
3889
|
}
|
|
3894
3890
|
//#endregion
|
|
3895
3891
|
//#region src/components/viewer-core/masonryBoundaryLock.ts
|
|
3896
|
-
function
|
|
3892
|
+
function Wi() {
|
|
3897
3893
|
let e = D(!1), t = null;
|
|
3898
3894
|
x(() => {
|
|
3899
3895
|
r();
|
|
@@ -3914,8 +3910,8 @@ function Ui() {
|
|
|
3914
3910
|
}
|
|
3915
3911
|
//#endregion
|
|
3916
3912
|
//#region src/components/viewer-core/masonryItemMutation.ts
|
|
3917
|
-
function
|
|
3918
|
-
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r =
|
|
3913
|
+
function Gi(e) {
|
|
3914
|
+
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r = qi(e.previousItems, e.layoutIndexById, e.layoutHeights), i = Ji(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has($(e))), c = Ki(e.previousItems, o, r, i), l = t.length > n.length && n.length > 0 && t[0] !== n[0], u = e.scrollTop > e.contentInsetPx + e.gapPx, d = l && u ? e.currentItems[e.activeIndex] : null;
|
|
3919
3915
|
return {
|
|
3920
3916
|
addedItems: s,
|
|
3921
3917
|
anchorId: d ? $(d) : null,
|
|
@@ -3927,7 +3923,7 @@ function Wi(e) {
|
|
|
3927
3923
|
shouldResetScrollForEmptyRemoval: e.currentItems.length === 0 && e.previousItems.length > 0 && c.length > 0 && e.scrollTop > 0
|
|
3928
3924
|
};
|
|
3929
3925
|
}
|
|
3930
|
-
function
|
|
3926
|
+
function Ki(e, t, n, r) {
|
|
3931
3927
|
return e.flatMap((e) => {
|
|
3932
3928
|
let i = $(e);
|
|
3933
3929
|
if (t.has(i)) return [];
|
|
@@ -3939,7 +3935,7 @@ function Gi(e, t, n, r) {
|
|
|
3939
3935
|
}] : [];
|
|
3940
3936
|
});
|
|
3941
3937
|
}
|
|
3942
|
-
function
|
|
3938
|
+
function qi(e, t, n) {
|
|
3943
3939
|
let r = /* @__PURE__ */ new Map();
|
|
3944
3940
|
for (let i of e) {
|
|
3945
3941
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3947,7 +3943,7 @@ function Ki(e, t, n) {
|
|
|
3947
3943
|
}
|
|
3948
3944
|
return r;
|
|
3949
3945
|
}
|
|
3950
|
-
function
|
|
3946
|
+
function Ji(e, t, n) {
|
|
3951
3947
|
let r = /* @__PURE__ */ new Map();
|
|
3952
3948
|
for (let i of e) {
|
|
3953
3949
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3957,7 +3953,7 @@ function qi(e, t, n) {
|
|
|
3957
3953
|
}
|
|
3958
3954
|
//#endregion
|
|
3959
3955
|
//#region src/components/viewer-core/masonryPendingAppend.ts
|
|
3960
|
-
function
|
|
3956
|
+
function Yi(e) {
|
|
3961
3957
|
let t = D(null), n = D(!1), r = null;
|
|
3962
3958
|
function i() {
|
|
3963
3959
|
o(), e.pendingAppendItems.value.length && (t.value = c([...e.items.value, ...e.pendingAppendItems.value]), s());
|
|
@@ -4002,42 +3998,42 @@ function Ji(e) {
|
|
|
4002
3998
|
}
|
|
4003
3999
|
//#endregion
|
|
4004
4000
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
4005
|
-
var
|
|
4006
|
-
function
|
|
4007
|
-
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth ||
|
|
4008
|
-
bucketPx:
|
|
4009
|
-
contentInsetPx:
|
|
4010
|
-
gapPx:
|
|
4011
|
-
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m =
|
|
4001
|
+
var Xi = 600, Zi = 24, Qi = 16, $i = 300, ea = 200, ta = 0, na = 1, ra = Zi + Qi, ia = 200, aa = 500, oa = 1e3;
|
|
4002
|
+
function sa(e) {
|
|
4003
|
+
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || $i), o = pi({
|
|
4004
|
+
bucketPx: Xi,
|
|
4005
|
+
contentInsetPx: Zi,
|
|
4006
|
+
gapPx: Qi
|
|
4007
|
+
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Wi(), h = i(() => Math.max($i, a.value - Zi * 2)), g = i(() => ur(h.value, $i)), v = i(() => dr(h.value, g.value, $i, Qi)), y = i(() => Ri(e.bottomLoadBufferPx.value)), b = i(() => ca(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => _r({
|
|
4012
4008
|
itemCount: e.items.value.length,
|
|
4013
4009
|
viewportHeight: r.value,
|
|
4014
4010
|
scrollTop: n.value,
|
|
4015
|
-
overscanPx:
|
|
4016
|
-
bucketPx:
|
|
4011
|
+
overscanPx: ea,
|
|
4012
|
+
bucketPx: Xi,
|
|
4017
4013
|
buckets: s.value
|
|
4018
4014
|
})), w = i(() => C.value.map((t) => ({
|
|
4019
4015
|
item: e.items.value[t],
|
|
4020
4016
|
index: t
|
|
4021
4017
|
}))), T = i(() => {
|
|
4022
|
-
let e = l.value +
|
|
4023
|
-
return Math.max(e, t, r.value) +
|
|
4024
|
-
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() =>
|
|
4018
|
+
let e = l.value + Zi * 2, t = I.reservedContentHeight.value ?? 0;
|
|
4019
|
+
return Math.max(e, t, r.value) + ia + y.value;
|
|
4020
|
+
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Ii({
|
|
4025
4021
|
active: e.active.value,
|
|
4026
4022
|
maxScrollTop: Y(),
|
|
4027
4023
|
progressDistancePx: n.value,
|
|
4028
|
-
thresholdPx:
|
|
4024
|
+
thresholdPx: ta,
|
|
4029
4025
|
triggerEnabled: E.value
|
|
4030
|
-
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() =>
|
|
4026
|
+
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() => Fi({
|
|
4031
4027
|
active: e.active.value,
|
|
4032
4028
|
maxScrollTop: Y(),
|
|
4033
4029
|
progressDistancePx: n.value,
|
|
4034
|
-
thresholdPx:
|
|
4030
|
+
thresholdPx: ra,
|
|
4035
4031
|
triggerEnabled: e.hasPreviousPage.value
|
|
4036
|
-
})), j =
|
|
4032
|
+
})), j = Li({
|
|
4037
4033
|
containerHeight: T,
|
|
4038
4034
|
scrollTop: n,
|
|
4039
4035
|
viewportHeight: r
|
|
4040
|
-
}), M =
|
|
4036
|
+
}), M = Ti({
|
|
4041
4037
|
items: e.items,
|
|
4042
4038
|
visibleIndices: C,
|
|
4043
4039
|
positions: f,
|
|
@@ -4046,44 +4042,44 @@ function oa(e) {
|
|
|
4046
4042
|
columnWidth: v,
|
|
4047
4043
|
scrollTop: n,
|
|
4048
4044
|
viewportHeight: r
|
|
4049
|
-
}), N =
|
|
4045
|
+
}), N = Ui({
|
|
4050
4046
|
direction: "top",
|
|
4051
4047
|
getAnimationLockMs(e) {
|
|
4052
|
-
return Math.max(
|
|
4048
|
+
return Math.max(aa, xi(e)) + oa;
|
|
4053
4049
|
},
|
|
4054
4050
|
hasPage: e.hasPreviousPage,
|
|
4055
4051
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4056
4052
|
isAtBoundary() {
|
|
4057
|
-
return n.value <=
|
|
4053
|
+
return n.value <= ra;
|
|
4058
4054
|
},
|
|
4059
4055
|
loading: e.loading,
|
|
4060
4056
|
requestPage: e.requestPreviousPage
|
|
4061
|
-
}), P =
|
|
4057
|
+
}), P = Ui({
|
|
4062
4058
|
direction: "bottom",
|
|
4063
4059
|
getAnimationLockMs(e) {
|
|
4064
|
-
return
|
|
4060
|
+
return xi(e) + oa;
|
|
4065
4061
|
},
|
|
4066
4062
|
hasPage: E,
|
|
4067
4063
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4068
4064
|
isAtBoundary() {
|
|
4069
|
-
return J() <=
|
|
4065
|
+
return J() <= na;
|
|
4070
4066
|
},
|
|
4071
4067
|
loading: e.loading,
|
|
4072
4068
|
requestPage: e.requestNextPage
|
|
4073
|
-
}), F =
|
|
4069
|
+
}), F = Pi({
|
|
4074
4070
|
active: e.active,
|
|
4075
4071
|
getMaxScrollTop: Y,
|
|
4076
4072
|
getViewport: () => t.value,
|
|
4077
4073
|
onScroll: ee
|
|
4078
|
-
}), I =
|
|
4079
|
-
bucketPx:
|
|
4074
|
+
}), I = Yi({
|
|
4075
|
+
bucketPx: Xi,
|
|
4080
4076
|
columnHeights: c,
|
|
4081
4077
|
columnCount: g,
|
|
4082
4078
|
columnWidth: v,
|
|
4083
4079
|
commitPendingAppend: e.commitPendingAppend,
|
|
4084
4080
|
contentHeight: l,
|
|
4085
|
-
contentInsetPx:
|
|
4086
|
-
gapPx:
|
|
4081
|
+
contentInsetPx: Zi,
|
|
4082
|
+
gapPx: Qi,
|
|
4087
4083
|
items: e.items,
|
|
4088
4084
|
pendingAppendItems: e.pendingAppendItems
|
|
4089
4085
|
}), L = null, R = 0;
|
|
@@ -4092,20 +4088,20 @@ function oa(e) {
|
|
|
4092
4088
|
g,
|
|
4093
4089
|
v
|
|
4094
4090
|
], async ([t], [r = []]) => {
|
|
4095
|
-
let i =
|
|
4091
|
+
let i = Gi({
|
|
4096
4092
|
activeIndex: b.value,
|
|
4097
|
-
contentInsetPx:
|
|
4093
|
+
contentInsetPx: Zi,
|
|
4098
4094
|
currentItems: t,
|
|
4099
|
-
gapPx:
|
|
4095
|
+
gapPx: Qi,
|
|
4100
4096
|
layoutHeights: u.value,
|
|
4101
4097
|
layoutIndexById: d.value,
|
|
4102
4098
|
layoutPositions: f.value,
|
|
4103
4099
|
previousItems: r ?? [],
|
|
4104
4100
|
scrollTop: n.value
|
|
4105
4101
|
});
|
|
4106
|
-
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(
|
|
4102
|
+
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(Ci() + oa), i.shouldResetScrollForEmptyRemoval && te();
|
|
4107
4103
|
let a = r ?? [];
|
|
4108
|
-
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ?
|
|
4104
|
+
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ? aa : void 0), i.anchorId ? (await _(), U(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && ne();
|
|
4109
4105
|
}, { immediate: !0 }), z([
|
|
4110
4106
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
4111
4107
|
g,
|
|
@@ -4119,7 +4115,7 @@ function oa(e) {
|
|
|
4119
4115
|
}
|
|
4120
4116
|
if (F.start(), !a || i !== !1 || p.value == null) return;
|
|
4121
4117
|
await _();
|
|
4122
|
-
let o = Math.max(0, T.value - r.value), s =
|
|
4118
|
+
let o = Math.max(0, T.value - r.value), s = ca(p.value, 0, o);
|
|
4123
4119
|
a.scrollTop = s, n.value = s, N.syncBoundary(), P.syncBoundary();
|
|
4124
4120
|
}), z(() => e.loading.value, async (e) => {
|
|
4125
4121
|
I.clearReservedHeightWhenIdle(e), N.onLoadingChange(e), P.onLoadingChange(e), await _();
|
|
@@ -4152,7 +4148,7 @@ function oa(e) {
|
|
|
4152
4148
|
let a = t.value, o = f.value[e], s = u.value[e];
|
|
4153
4149
|
if (!a || !o || !s) return;
|
|
4154
4150
|
let c = a.scrollTop, l = Math.max(0, T.value - r.value);
|
|
4155
|
-
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y -
|
|
4151
|
+
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Zi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Zi), a.scrollTop = ca(c, 0, l), n.value = a.scrollTop, W();
|
|
4156
4152
|
}
|
|
4157
4153
|
function U(e, r) {
|
|
4158
4154
|
let i = t.value, a = r.get(e), o = d.value.get(e), s = o == null ? null : f.value[o];
|
|
@@ -4180,7 +4176,7 @@ function oa(e) {
|
|
|
4180
4176
|
e.setActiveIndex(i);
|
|
4181
4177
|
}
|
|
4182
4178
|
function ne() {
|
|
4183
|
-
let t = n.value <=
|
|
4179
|
+
let t = n.value <= ra, r = J() <= na;
|
|
4184
4180
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
4185
4181
|
}
|
|
4186
4182
|
function G() {
|
|
@@ -4190,13 +4186,13 @@ function oa(e) {
|
|
|
4190
4186
|
r.value = q(), a.value = re();
|
|
4191
4187
|
}
|
|
4192
4188
|
function q() {
|
|
4193
|
-
return
|
|
4189
|
+
return Oi(t.value, r.value);
|
|
4194
4190
|
}
|
|
4195
4191
|
function re() {
|
|
4196
|
-
return
|
|
4192
|
+
return ki(t.value, a.value, $i);
|
|
4197
4193
|
}
|
|
4198
4194
|
function J() {
|
|
4199
|
-
return
|
|
4195
|
+
return Ai(t.value, n.value, r.value, T.value);
|
|
4200
4196
|
}
|
|
4201
4197
|
function Y() {
|
|
4202
4198
|
let e = Math.max(t.value?.scrollHeight ?? 0, T.value);
|
|
@@ -4222,17 +4218,17 @@ function oa(e) {
|
|
|
4222
4218
|
scrollViewportRef: t
|
|
4223
4219
|
};
|
|
4224
4220
|
}
|
|
4225
|
-
function
|
|
4221
|
+
function ca(e, t, n) {
|
|
4226
4222
|
return Math.min(Math.max(e, t), n);
|
|
4227
4223
|
}
|
|
4228
4224
|
//#endregion
|
|
4229
4225
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
4230
|
-
function
|
|
4226
|
+
function la(e) {
|
|
4231
4227
|
if (e) try {
|
|
4232
4228
|
e.removeAttribute("src"), e.src = "";
|
|
4233
4229
|
} catch {}
|
|
4234
4230
|
}
|
|
4235
|
-
function
|
|
4231
|
+
function ua(e) {
|
|
4236
4232
|
if (e) {
|
|
4237
4233
|
try {
|
|
4238
4234
|
e.currentTime = 0;
|
|
@@ -4243,12 +4239,12 @@ function la(e) {
|
|
|
4243
4239
|
} catch {}
|
|
4244
4240
|
}
|
|
4245
4241
|
}
|
|
4246
|
-
function
|
|
4242
|
+
function da(e, t) {
|
|
4247
4243
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
4248
4244
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
4249
4245
|
return e.bottom > 0 && e.top < n;
|
|
4250
4246
|
}
|
|
4251
|
-
function
|
|
4247
|
+
function fa(e) {
|
|
4252
4248
|
if (!e) return null;
|
|
4253
4249
|
try {
|
|
4254
4250
|
return new URL(e, window.location.href).href;
|
|
@@ -4258,9 +4254,9 @@ function da(e) {
|
|
|
4258
4254
|
}
|
|
4259
4255
|
//#endregion
|
|
4260
4256
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
4261
|
-
function
|
|
4257
|
+
function pa(e) {
|
|
4262
4258
|
let t = D(null), n = i(() => {
|
|
4263
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
4259
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? fa(e.item.value.healthCheck.url) : null;
|
|
4264
4260
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
4265
4261
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
4266
4262
|
z(n, (e, n) => {
|
|
@@ -4338,14 +4334,14 @@ function fa(e) {
|
|
|
4338
4334
|
}
|
|
4339
4335
|
//#endregion
|
|
4340
4336
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
4341
|
-
var
|
|
4337
|
+
var ma = ["aria-label"], ha = {
|
|
4342
4338
|
key: 0,
|
|
4343
4339
|
"data-testid": "vibe-list-card-spinner",
|
|
4344
4340
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
4345
|
-
},
|
|
4341
|
+
}, ga = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, _a = ["src", "alt"], va = ["src"], ya = ["data-kind"], ba = { class: "grid justify-items-center gap-3 px-4 text-center" }, xa = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Sa = {
|
|
4346
4342
|
key: 4,
|
|
4347
4343
|
class: "grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.08),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
|
|
4348
|
-
},
|
|
4344
|
+
}, Ca = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, wa = { class: "pointer-events-none absolute inset-0 z-[3]" }, Ta = /* @__PURE__ */ d({
|
|
4349
4345
|
__name: "ListCard",
|
|
4350
4346
|
props: {
|
|
4351
4347
|
active: {
|
|
@@ -4369,7 +4365,7 @@ var pa = ["aria-label"], ma = {
|
|
|
4369
4365
|
},
|
|
4370
4366
|
emits: ["open"],
|
|
4371
4367
|
setup(e, { emit: t }) {
|
|
4372
|
-
let n = e, r = t, l = i(() => Cr(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), j = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P =
|
|
4368
|
+
let n = e, r = t, l = i(() => Cr(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), j = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = pa({
|
|
4373
4369
|
attachedAssetUrl: E,
|
|
4374
4370
|
getPriority: le,
|
|
4375
4371
|
isInView: d,
|
|
@@ -4489,7 +4485,7 @@ var pa = ["aria-label"], ma = {
|
|
|
4489
4485
|
d.value = !0;
|
|
4490
4486
|
return;
|
|
4491
4487
|
}
|
|
4492
|
-
d.value =
|
|
4488
|
+
d.value = da(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
4493
4489
|
}
|
|
4494
4490
|
function ie(e) {
|
|
4495
4491
|
if (!e) return;
|
|
@@ -4509,10 +4505,10 @@ var pa = ["aria-label"], ma = {
|
|
|
4509
4505
|
}), g.value = null, m.value = !1, T.value = !1, J(), K();
|
|
4510
4506
|
}
|
|
4511
4507
|
function oe() {
|
|
4512
|
-
|
|
4508
|
+
la(_.value);
|
|
4513
4509
|
}
|
|
4514
4510
|
function ce() {
|
|
4515
|
-
|
|
4511
|
+
ua(C.value);
|
|
4516
4512
|
}
|
|
4517
4513
|
function le() {
|
|
4518
4514
|
let e = y.value;
|
|
@@ -4526,8 +4522,8 @@ var pa = ["aria-label"], ma = {
|
|
|
4526
4522
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
4527
4523
|
}
|
|
4528
4524
|
function ue(e) {
|
|
4529
|
-
let t =
|
|
4530
|
-
return !e || !t ? !1 :
|
|
4525
|
+
let t = fa(E.value);
|
|
4526
|
+
return !e || !t ? !1 : fa("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
4531
4527
|
}
|
|
4532
4528
|
function fe() {
|
|
4533
4529
|
r("open");
|
|
@@ -4555,8 +4551,8 @@ var pa = ["aria-label"], ma = {
|
|
|
4555
4551
|
class: "absolute inset-0 z-[1] block h-full w-full cursor-pointer text-left focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
|
|
4556
4552
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
4557
4553
|
onClick: fe
|
|
4558
|
-
}, null, 8,
|
|
4559
|
-
ee.value ? (w(), s("div",
|
|
4554
|
+
}, null, 8, ma),
|
|
4555
|
+
ee.value ? (w(), s("div", ha, [c("span", ga, [u(F(se), {
|
|
4560
4556
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
4561
4557
|
"aria-hidden": "true"
|
|
4562
4558
|
})])])) : o("", !0),
|
|
@@ -4570,7 +4566,7 @@ var pa = ["aria-label"], ma = {
|
|
|
4570
4566
|
class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
4571
4567
|
onLoad: te,
|
|
4572
4568
|
onError: W
|
|
4573
|
-
}, null, 42,
|
|
4569
|
+
}, null, 42, _a)) : N.value && E.value && !L.value ? (w(), s("video", {
|
|
4574
4570
|
key: 2,
|
|
4575
4571
|
ref_key: "videoRef",
|
|
4576
4572
|
ref: C,
|
|
@@ -4586,31 +4582,31 @@ var pa = ["aria-label"], ma = {
|
|
|
4586
4582
|
onPlaying: ne,
|
|
4587
4583
|
onStalled: G,
|
|
4588
4584
|
onWaiting: G
|
|
4589
|
-
}, null, 42,
|
|
4585
|
+
}, null, 42, va)) : L.value ? (w(), s("div", {
|
|
4590
4586
|
key: 3,
|
|
4591
4587
|
"data-testid": "vibe-list-card-error",
|
|
4592
4588
|
"data-kind": I.value,
|
|
4593
4589
|
class: "pointer-events-none relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
|
|
4594
|
-
}, [c("div",
|
|
4590
|
+
}, [c("div", ba, [
|
|
4595
4591
|
u(F(de), {
|
|
4596
4592
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4597
4593
|
"aria-hidden": "true"
|
|
4598
4594
|
}),
|
|
4599
|
-
c("span",
|
|
4595
|
+
c("span", xa, M(F(Cn)(I.value)), 1),
|
|
4600
4596
|
R.value ? (w(), s("button", {
|
|
4601
4597
|
key: 0,
|
|
4602
4598
|
type: "button",
|
|
4603
4599
|
class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-3 py-2 text-[0.62rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
|
|
4604
4600
|
onClick: H(ae, ["stop"])
|
|
4605
4601
|
}, " Retry ")) : o("", !0)
|
|
4606
|
-
])], 8,
|
|
4602
|
+
])], 8, ya)) : (w(), s("div", Sa, [c("div", Ca, [k(e.$slots, "item-icon", {
|
|
4607
4603
|
icon: F(Jt)(n.item.type),
|
|
4608
4604
|
item: n.item
|
|
4609
4605
|
}, () => [(w(), a(A(F(Jt)(n.item.type)), {
|
|
4610
4606
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4611
4607
|
"aria-hidden": "true"
|
|
4612
4608
|
}))])])])),
|
|
4613
|
-
c("div",
|
|
4609
|
+
c("div", wa, [k(e.$slots, "grid-item-overlay", {
|
|
4614
4610
|
active: n.active,
|
|
4615
4611
|
focused: f.value,
|
|
4616
4612
|
hovered: p.value,
|
|
@@ -4620,24 +4616,24 @@ var pa = ["aria-label"], ma = {
|
|
|
4620
4616
|
})])
|
|
4621
4617
|
], 34));
|
|
4622
4618
|
}
|
|
4623
|
-
}),
|
|
4619
|
+
}), Ea = { class: "relative h-full min-h-0 bg-[radial-gradient(circle_at_top_center,rgba(255,255,255,0.04),transparent_28%),linear-gradient(180deg,#06070b,#05060a)]" }, Da = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Oa = {
|
|
4624
4620
|
"data-testid": "vibe-pagination",
|
|
4625
4621
|
class: "inline-flex shrink-0 items-center gap-2 whitespace-nowrap border border-white/14 bg-black/40 px-3 py-2 text-[0.63rem] font-bold uppercase tracking-[0.12em] text-[#f7f1ea]/72 backdrop-blur-[18px] min-[721px]:gap-3 min-[721px]:px-4 min-[721px]:py-3 min-[721px]:text-[0.74rem] min-[721px]:tracking-[0.2em]"
|
|
4626
|
-
},
|
|
4622
|
+
}, ka = { class: "whitespace-nowrap" }, Aa = {
|
|
4627
4623
|
key: 0,
|
|
4628
4624
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
4629
|
-
},
|
|
4625
|
+
}, ja = [
|
|
4630
4626
|
"data-active",
|
|
4631
4627
|
"data-index",
|
|
4632
4628
|
"data-item-id",
|
|
4633
4629
|
"data-occurrence-key"
|
|
4634
|
-
],
|
|
4630
|
+
], Ma = ["data-item-id"], Na = {
|
|
4635
4631
|
key: 0,
|
|
4636
4632
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
4637
|
-
},
|
|
4633
|
+
}, Pa = {
|
|
4638
4634
|
key: 1,
|
|
4639
4635
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
4640
|
-
},
|
|
4636
|
+
}, Fa = { class: "mx-auto flex w-full justify-center" }, Ia = /* @__PURE__ */ d({
|
|
4641
4637
|
__name: "ListSurface",
|
|
4642
4638
|
props: {
|
|
4643
4639
|
active: {
|
|
@@ -4699,7 +4695,7 @@ var pa = ["aria-label"], ma = {
|
|
|
4699
4695
|
"update:activeIndex"
|
|
4700
4696
|
],
|
|
4701
4697
|
setup(e, { expose: n, emit: r }) {
|
|
4702
|
-
let d = e, f = L(), p = r, m =
|
|
4698
|
+
let d = e, f = L(), p = r, m = sa({
|
|
4703
4699
|
active: N(d, "active"),
|
|
4704
4700
|
allowExhaustedNextPageRefresh: N(d, "allowExhaustedNextPageRefresh"),
|
|
4705
4701
|
bottomLoadBufferPx: N(d, "bottomLoadBufferPx"),
|
|
@@ -4747,8 +4743,8 @@ var pa = ["aria-label"], ma = {
|
|
|
4747
4743
|
nextBoundaryLoadProgress: e,
|
|
4748
4744
|
previousBoundaryLoadProgress: t
|
|
4749
4745
|
});
|
|
4750
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
4751
|
-
c("div",
|
|
4746
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", Ea, [
|
|
4747
|
+
c("div", Da, [c("span", Oa, [c("span", ka, M(F(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", Aa, M(d.paginationDetail), 1)) : o("", !0)])]),
|
|
4752
4748
|
c("div", {
|
|
4753
4749
|
ref: F(m).scrollViewportRef,
|
|
4754
4750
|
"data-testid": "vibe-list-scroll",
|
|
@@ -4769,7 +4765,7 @@ var pa = ["aria-label"], ma = {
|
|
|
4769
4765
|
"data-occurrence-key": F($)(t),
|
|
4770
4766
|
class: "absolute will-change-transform",
|
|
4771
4767
|
style: b(F(m).getCardStyle(n))
|
|
4772
|
-
}, [u(
|
|
4768
|
+
}, [u(Ta, {
|
|
4773
4769
|
active: n === F(m).resolvedActiveIndex.value,
|
|
4774
4770
|
index: n,
|
|
4775
4771
|
item: t,
|
|
@@ -4793,14 +4789,14 @@ var pa = ["aria-label"], ma = {
|
|
|
4793
4789
|
"report-asset-load",
|
|
4794
4790
|
"surface-active",
|
|
4795
4791
|
"onOpen"
|
|
4796
|
-
])], 12,
|
|
4792
|
+
])], 12, ja))), 128)),
|
|
4797
4793
|
(w(!0), s(t, null, O(F(m).leavingItems.value, (t) => (w(), s("article", {
|
|
4798
4794
|
key: `leaving-${F($)(t.item)}`,
|
|
4799
4795
|
"data-testid": "vibe-list-card-leaving",
|
|
4800
4796
|
"data-item-id": t.item.id,
|
|
4801
4797
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
4802
4798
|
style: b(F(m).getLeavingCardStyle(t.item))
|
|
4803
|
-
}, [u(
|
|
4799
|
+
}, [u(Ta, {
|
|
4804
4800
|
active: !1,
|
|
4805
4801
|
index: -1,
|
|
4806
4802
|
item: t.item,
|
|
@@ -4815,7 +4811,7 @@ var pa = ["aria-label"], ma = {
|
|
|
4815
4811
|
"item",
|
|
4816
4812
|
"report-asset-error",
|
|
4817
4813
|
"report-asset-load"
|
|
4818
|
-
])], 12,
|
|
4814
|
+
])], 12, Ma))), 128)),
|
|
4819
4815
|
F(j) && F(E) ? (w(), a(or, {
|
|
4820
4816
|
key: 0,
|
|
4821
4817
|
message: F(E).message,
|
|
@@ -4830,12 +4826,12 @@ var pa = ["aria-label"], ma = {
|
|
|
4830
4826
|
"surface"
|
|
4831
4827
|
])) : o("", !0)
|
|
4832
4828
|
], 4)], 544),
|
|
4833
|
-
F(m).showScrollbar.value ? (w(), s("div",
|
|
4829
|
+
F(m).showScrollbar.value ? (w(), s("div", Na, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
4834
4830
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
4835
4831
|
class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", d.loading ? "bg-white/52" : "bg-white/34"]),
|
|
4836
4832
|
style: b(F(m).getScrollbarThumbStyle())
|
|
4837
4833
|
}, null, 6)])) : o("", !0),
|
|
4838
|
-
f["grid-footer"] ? (w(), s("div",
|
|
4834
|
+
f["grid-footer"] ? (w(), s("div", Pa, [c("div", Fa, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
4839
4835
|
x.value ? (w(), s("div", {
|
|
4840
4836
|
key: 2,
|
|
4841
4837
|
class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", f["grid-footer"] ? "pb-24" : "pb-6"])
|
|
@@ -4861,13 +4857,13 @@ var pa = ["aria-label"], ma = {
|
|
|
4861
4857
|
])) : o("", !0)
|
|
4862
4858
|
]));
|
|
4863
4859
|
}
|
|
4864
|
-
}),
|
|
4860
|
+
}), La = ["data-surface-mode"], Ra = {
|
|
4865
4861
|
key: 1,
|
|
4866
4862
|
class: "absolute left-5 top-5 z-30 border border-amber-400/45 bg-black/35 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-amber-100 backdrop-blur"
|
|
4867
|
-
},
|
|
4863
|
+
}, za = ["data-visible", "inert"], Ba = ["data-visible", "inert"], Va = {
|
|
4868
4864
|
key: 3,
|
|
4869
4865
|
class: "relative z-[1] grid h-full w-full content-center justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
|
|
4870
|
-
},
|
|
4866
|
+
}, Ha = /* @__PURE__ */ d({
|
|
4871
4867
|
name: "VibeLayout",
|
|
4872
4868
|
__name: "Layout",
|
|
4873
4869
|
props: {
|
|
@@ -4935,7 +4931,7 @@ var pa = ["aria-label"], ma = {
|
|
|
4935
4931
|
type: "button",
|
|
4936
4932
|
class: "absolute left-5 top-5 z-30 inline-flex items-center border border-rose-400/55 bg-rose-500/18 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-white backdrop-blur transition hover:bg-rose-500/28",
|
|
4937
4933
|
onClick: n[0] ||= (...e) => F(h).retryInitialLoad && F(h).retryInitialLoad(...e)
|
|
4938
|
-
}, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div",
|
|
4934
|
+
}, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div", Ra, M(F(h).errorMessage.value), 1)) : o("", !0), F(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
|
|
4939
4935
|
appear: "",
|
|
4940
4936
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4941
4937
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4949,7 +4945,7 @@ var pa = ["aria-label"], ma = {
|
|
|
4949
4945
|
"data-visible": F(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4950
4946
|
inert: F(h).surfaceMode.value !== "list",
|
|
4951
4947
|
class: "absolute inset-0 z-[2]"
|
|
4952
|
-
}, [u(
|
|
4948
|
+
}, [u(Ia, {
|
|
4953
4949
|
ref_key: "listSurfaceRef",
|
|
4954
4950
|
ref: g,
|
|
4955
4951
|
active: F(h).surfaceMode.value === "list",
|
|
@@ -5023,7 +5019,7 @@ var pa = ["aria-label"], ma = {
|
|
|
5023
5019
|
"onBoundaryLoadProgress",
|
|
5024
5020
|
"onOpenFullscreen",
|
|
5025
5021
|
"onUpdate:activeIndex"
|
|
5026
|
-
])], 8,
|
|
5022
|
+
])], 8, za), [[R, F(h).surfaceMode.value === "list"]])]),
|
|
5027
5023
|
_: 3
|
|
5028
5024
|
}), u(r, {
|
|
5029
5025
|
appear: "",
|
|
@@ -5039,7 +5035,7 @@ var pa = ["aria-label"], ma = {
|
|
|
5039
5035
|
"data-visible": F(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
5040
5036
|
inert: F(h).surfaceMode.value !== "fullscreen",
|
|
5041
5037
|
class: "absolute inset-0 z-[3]"
|
|
5042
|
-
}, [u(
|
|
5038
|
+
}, [u(fi, {
|
|
5043
5039
|
items: F(h).items.value,
|
|
5044
5040
|
active: F(h).surfaceMode.value === "fullscreen",
|
|
5045
5041
|
"active-index": F(h).activeIndex.value,
|
|
@@ -5102,12 +5098,12 @@ var pa = ["aria-label"], ma = {
|
|
|
5102
5098
|
fn: B((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
5103
5099
|
key: "6"
|
|
5104
5100
|
} : void 0
|
|
5105
|
-
]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8,
|
|
5101
|
+
]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8, Ba), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
|
|
5106
5102
|
_: 3
|
|
5107
|
-
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div",
|
|
5103
|
+
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div", Va, [u(F(se), {
|
|
5108
5104
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
5109
5105
|
"aria-hidden": "true"
|
|
5110
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(
|
|
5106
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(fi, {
|
|
5111
5107
|
key: 4,
|
|
5112
5108
|
items: F(h).items.value,
|
|
5113
5109
|
active: !0,
|
|
@@ -5196,10 +5192,10 @@ var pa = ["aria-label"], ma = {
|
|
|
5196
5192
|
"show-status-badges",
|
|
5197
5193
|
"onBackToList",
|
|
5198
5194
|
"onUpdate:activeIndex"
|
|
5199
|
-
]))], 8,
|
|
5195
|
+
]))], 8, La));
|
|
5200
5196
|
}
|
|
5201
|
-
}),
|
|
5202
|
-
e.component("VibeLayout",
|
|
5197
|
+
}), Ua = { install(e) {
|
|
5198
|
+
e.component("VibeLayout", Ha);
|
|
5203
5199
|
} };
|
|
5204
5200
|
//#endregion
|
|
5205
|
-
export {
|
|
5201
|
+
export { Ha as VibeLayout, Ua as VibePlugin, Ua as default };
|