@wyxos/vibe 3.1.27 → 3.1.29
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.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i,
|
|
|
3
3
|
var U = (e) => {
|
|
4
4
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
5
5
|
return !1;
|
|
6
|
-
},
|
|
6
|
+
}, W = (e) => e === "", G = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), te = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ne = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), K = (e) => {
|
|
7
7
|
let t = ne(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
9
9
|
}, q = {
|
|
@@ -22,8 +22,8 @@ var U = (e) => {
|
|
|
22
22
|
width: o,
|
|
23
23
|
height: o,
|
|
24
24
|
stroke: s,
|
|
25
|
-
"stroke-width":
|
|
26
|
-
class:
|
|
25
|
+
"stroke-width": W(n) || W(r) || n === !0 || r === !0 ? Number(i || a || q["stroke-width"]) * 24 / Number(o) : i || a || q["stroke-width"],
|
|
26
|
+
class: G("lucide", c.class, ...e ? [`lucide-${te(K(e))}-icon`, `lucide-${te(e)}`] : ["lucide-icon"]),
|
|
27
27
|
...!l.default && !U(c) && { "aria-hidden": "true" }
|
|
28
28
|
}, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), J = (e, t) => (n, { slots: r, attrs: i }) => m(re, {
|
|
29
29
|
...i,
|
|
@@ -84,7 +84,7 @@ var U = (e) => {
|
|
|
84
84
|
}], ["path", {
|
|
85
85
|
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
86
86
|
key: "wfsgrz"
|
|
87
|
-
}]]),
|
|
87
|
+
}]]), X = J("image-plus", [
|
|
88
88
|
["path", {
|
|
89
89
|
d: "M16 5h6",
|
|
90
90
|
key: "1vod17"
|
|
@@ -107,10 +107,10 @@ var U = (e) => {
|
|
|
107
107
|
r: "2",
|
|
108
108
|
key: "af1f0g"
|
|
109
109
|
}]
|
|
110
|
-
]),
|
|
110
|
+
]), se = J("loader-circle", [["path", {
|
|
111
111
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
112
112
|
key: "13zald"
|
|
113
|
-
}]]),
|
|
113
|
+
}]]), ce = J("maximize-2", [
|
|
114
114
|
["path", {
|
|
115
115
|
d: "M15 3h6v6",
|
|
116
116
|
key: "1q9fwt"
|
|
@@ -226,14 +226,14 @@ function _e(e, t, n) {
|
|
|
226
226
|
}
|
|
227
227
|
//#endregion
|
|
228
228
|
//#region src/components/viewer-core/dom.ts
|
|
229
|
-
function
|
|
229
|
+
function Z(e) {
|
|
230
230
|
return e instanceof HTMLElement && [
|
|
231
231
|
"INPUT",
|
|
232
232
|
"TEXTAREA",
|
|
233
233
|
"SELECT"
|
|
234
234
|
].includes(e.tagName);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function ve(e) {
|
|
237
237
|
return e instanceof HTMLElement && !!e.closest("[data-swipe-lock], input, textarea, select, a");
|
|
238
238
|
}
|
|
239
239
|
function ye(e) {
|
|
@@ -841,7 +841,7 @@ function dt(e) {
|
|
|
841
841
|
setSequence: (e) => {
|
|
842
842
|
w = e;
|
|
843
843
|
}
|
|
844
|
-
}), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => be(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => ye(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length),
|
|
844
|
+
}), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => be(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => ye(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length), W = i(() => Oe(De(a.value), e.removedIds.value)), G = i(() => je(n.value, e.removedIds.value, P.value)), te = i(() => !N.value.length && !F.value && !!s.value), ne = Qe({
|
|
845
845
|
autoBuckets: n,
|
|
846
846
|
clearActiveResolveController(e) {
|
|
847
847
|
y === e && (y = null);
|
|
@@ -952,13 +952,13 @@ function dt(e) {
|
|
|
952
952
|
}, r = qe(t);
|
|
953
953
|
if (Ee("trailing")) {
|
|
954
954
|
if (!U.value) return;
|
|
955
|
-
let e = await
|
|
955
|
+
let e = await ve("trailing");
|
|
956
956
|
e?.followCursor && (e.itemsInserted === 0 || Ee("trailing")) && await _e(e.followCursor, n);
|
|
957
957
|
return;
|
|
958
958
|
}
|
|
959
959
|
if (r) {
|
|
960
960
|
if (t?.cursor === r) {
|
|
961
|
-
let e = await
|
|
961
|
+
let e = await ve("trailing");
|
|
962
962
|
e?.followCursor && e.itemsInserted === 0 && await _e(e.followCursor, n);
|
|
963
963
|
return;
|
|
964
964
|
}
|
|
@@ -966,7 +966,7 @@ function dt(e) {
|
|
|
966
966
|
return;
|
|
967
967
|
}
|
|
968
968
|
if (!B.value) {
|
|
969
|
-
let e = U.value ? await
|
|
969
|
+
let e = U.value ? await ve("trailing") : null;
|
|
970
970
|
e?.followCursor && e.itemsInserted === 0 && await _e(e.followCursor, n);
|
|
971
971
|
return;
|
|
972
972
|
}
|
|
@@ -975,15 +975,15 @@ function dt(e) {
|
|
|
975
975
|
async function Y() {
|
|
976
976
|
if (!(H.value || !V.value || F.value)) {
|
|
977
977
|
if (Ee("leading")) {
|
|
978
|
-
let e = await
|
|
979
|
-
e?.itemsInserted === 0 && e.followCursor && await
|
|
978
|
+
let e = await ve("leading");
|
|
979
|
+
e?.itemsInserted === 0 && e.followCursor && await Z(e.followCursor);
|
|
980
980
|
return;
|
|
981
981
|
}
|
|
982
|
-
await
|
|
982
|
+
await Z(ee.value);
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
985
|
async function ie() {
|
|
986
|
-
if (
|
|
986
|
+
if (te.value) {
|
|
987
987
|
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = k.value ? "initializing" : "idle", Ce(), M.reset(), m.value = !1, v.clear(), y?.abort(), y = null, d.clear(!0), we()) {
|
|
988
988
|
Q();
|
|
989
989
|
return;
|
|
@@ -992,23 +992,23 @@ function dt(e) {
|
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
async function ae() {
|
|
995
|
-
if (
|
|
995
|
+
if (te.value) return ie();
|
|
996
996
|
H.value || c.value !== "failed" || !b || (s.value = null, await b());
|
|
997
997
|
}
|
|
998
998
|
async function oe() {
|
|
999
999
|
if (!a.value.length) return m.value = !1, Q();
|
|
1000
1000
|
n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function X(t) {
|
|
1003
1003
|
let n = N.value;
|
|
1004
1004
|
if (!n.length) return;
|
|
1005
1005
|
let i = Se(t, 0, n.length - 1);
|
|
1006
1006
|
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function se(e) {
|
|
1009
1009
|
h.value = e, K.schedule();
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function ce() {
|
|
1012
1012
|
_.value = !0, d.clear(!0);
|
|
1013
1013
|
}
|
|
1014
1014
|
function le() {
|
|
@@ -1045,7 +1045,7 @@ function dt(e) {
|
|
|
1045
1045
|
r.value = He(N.value, P.value, e);
|
|
1046
1046
|
}
|
|
1047
1047
|
function he() {
|
|
1048
|
-
a.value.length > 0 && (!
|
|
1048
|
+
a.value.length > 0 && (!W.value.length || !N.value.length) && oe();
|
|
1049
1049
|
}
|
|
1050
1050
|
async function ge() {
|
|
1051
1051
|
if (!(!h.value || Te())) {
|
|
@@ -1069,13 +1069,13 @@ function dt(e) {
|
|
|
1069
1069
|
if (r) {
|
|
1070
1070
|
if (!r.visibleCount) return n.value = Je(n.value, t.originCursor, e, !0), a.value = [], m.value = !1, Q();
|
|
1071
1071
|
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, Q();
|
|
1072
|
-
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !
|
|
1072
|
+
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !W.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
|
|
1073
1073
|
m.value = !0;
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
|
-
async function
|
|
1076
|
+
async function Z(e) {
|
|
1077
1077
|
b = async () => {
|
|
1078
|
-
await
|
|
1078
|
+
await Z(e);
|
|
1079
1079
|
};
|
|
1080
1080
|
let t = await xe({
|
|
1081
1081
|
continueUntilFilled: !0,
|
|
@@ -1087,9 +1087,9 @@ function dt(e) {
|
|
|
1087
1087
|
let r = pe();
|
|
1088
1088
|
n.value = [...t.buckets, ...n.value], me(r), Q();
|
|
1089
1089
|
}
|
|
1090
|
-
async function
|
|
1090
|
+
async function ve(e) {
|
|
1091
1091
|
return b = async () => {
|
|
1092
|
-
await
|
|
1092
|
+
await ve(e);
|
|
1093
1093
|
}, q.reloadBoundaryBucket(e);
|
|
1094
1094
|
}
|
|
1095
1095
|
function xe(e) {
|
|
@@ -1121,12 +1121,12 @@ function dt(e) {
|
|
|
1121
1121
|
}
|
|
1122
1122
|
return {
|
|
1123
1123
|
activeIndex: P,
|
|
1124
|
-
canRetryInitialLoad:
|
|
1124
|
+
canRetryInitialLoad: te,
|
|
1125
1125
|
cancel: ue,
|
|
1126
1126
|
cancelFill: de,
|
|
1127
1127
|
canRefreshTrailingBoundary: U,
|
|
1128
1128
|
commitPendingAppend: oe,
|
|
1129
|
-
currentCursor:
|
|
1129
|
+
currentCursor: G,
|
|
1130
1130
|
errorMessage: s,
|
|
1131
1131
|
fillCollectedCount: l,
|
|
1132
1132
|
fillCursor: u,
|
|
@@ -1140,19 +1140,19 @@ function dt(e) {
|
|
|
1140
1140
|
isAutoPrefetchEnabled: h,
|
|
1141
1141
|
isPageLoadingLocked: H,
|
|
1142
1142
|
items: N,
|
|
1143
|
-
lockPageLoading:
|
|
1143
|
+
lockPageLoading: ce,
|
|
1144
1144
|
loading: F,
|
|
1145
1145
|
maybePrefetchAround: ge,
|
|
1146
1146
|
nextCursor: R,
|
|
1147
|
-
pendingAppendItems:
|
|
1147
|
+
pendingAppendItems: W,
|
|
1148
1148
|
phase: c,
|
|
1149
1149
|
prefetchNextPage: J,
|
|
1150
1150
|
prefetchPreviousPage: Y,
|
|
1151
1151
|
previousCursor: ee,
|
|
1152
1152
|
retryInitialLoad: ie,
|
|
1153
1153
|
retry: ae,
|
|
1154
|
-
setActiveIndex:
|
|
1155
|
-
setAutoPrefetchEnabled:
|
|
1154
|
+
setActiveIndex: X,
|
|
1155
|
+
setAutoPrefetchEnabled: se,
|
|
1156
1156
|
syncActiveIndexAfterVisibilityChange: me,
|
|
1157
1157
|
unlockPageLoading: le,
|
|
1158
1158
|
getActiveOccurrenceKey: pe,
|
|
@@ -1331,7 +1331,7 @@ function mt(e, t) {
|
|
|
1331
1331
|
!c.value || o.value === "list" || (o.value = "list", t("update:surfaceMode", "list"));
|
|
1332
1332
|
}
|
|
1333
1333
|
function p(e) {
|
|
1334
|
-
e.defaultPrevented || e.key !== "Escape" || !c.value || l.value !== "fullscreen" ||
|
|
1334
|
+
e.defaultPrevented || e.key !== "Escape" || !c.value || l.value !== "fullscreen" || Z(e.target) || (e.preventDefault(), f());
|
|
1335
1335
|
}
|
|
1336
1336
|
function m() {
|
|
1337
1337
|
a.value = window.innerWidth || 0;
|
|
@@ -1456,7 +1456,7 @@ var gt = {
|
|
|
1456
1456
|
class: "inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/65",
|
|
1457
1457
|
"aria-label": "Open active video fullscreen",
|
|
1458
1458
|
onClick: t[1] ||= (e) => r("fullscreen-request")
|
|
1459
|
-
}, [u(F(
|
|
1459
|
+
}, [u(F(ce), {
|
|
1460
1460
|
class: "h-4 w-4 stroke-[1.9]",
|
|
1461
1461
|
"aria-hidden": "true"
|
|
1462
1462
|
})])) : o("", !0),
|
|
@@ -1553,7 +1553,7 @@ var gt = {
|
|
|
1553
1553
|
class: "h-4 w-4 stroke-[2.2]",
|
|
1554
1554
|
"aria-hidden": "true"
|
|
1555
1555
|
})])) : o("", !0), n.title ? (w(), s("h2", It, M(n.title), 1)) : o("", !0)]), c("div", Lt, [c("span", Rt, [
|
|
1556
|
-
n.loading ? (w(), a(F(
|
|
1556
|
+
n.loading ? (w(), a(F(se), {
|
|
1557
1557
|
key: 0,
|
|
1558
1558
|
"data-testid": "vibe-pagination-spinner",
|
|
1559
1559
|
class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
|
|
@@ -1564,7 +1564,7 @@ var gt = {
|
|
|
1564
1564
|
]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", Vt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
|
|
1565
1565
|
}
|
|
1566
1566
|
}), Ut = {
|
|
1567
|
-
image:
|
|
1567
|
+
image: X,
|
|
1568
1568
|
video: ae,
|
|
1569
1569
|
audio: ie,
|
|
1570
1570
|
other: oe
|
|
@@ -2064,14 +2064,14 @@ function On(e) {
|
|
|
2064
2064
|
});
|
|
2065
2065
|
function v(e, t) {
|
|
2066
2066
|
if (t instanceof HTMLVideoElement) {
|
|
2067
|
-
s.set(e, t),
|
|
2067
|
+
s.set(e, t), G(e, t);
|
|
2068
2068
|
return;
|
|
2069
2069
|
}
|
|
2070
2070
|
s.delete(e);
|
|
2071
2071
|
}
|
|
2072
2072
|
function y(e, t) {
|
|
2073
2073
|
if (t instanceof HTMLAudioElement) {
|
|
2074
|
-
c.set(e, t),
|
|
2074
|
+
c.set(e, t), G(e, t);
|
|
2075
2075
|
return;
|
|
2076
2076
|
}
|
|
2077
2077
|
c.delete(e);
|
|
@@ -2099,21 +2099,21 @@ function On(e) {
|
|
|
2099
2099
|
H(i, n);
|
|
2100
2100
|
continue;
|
|
2101
2101
|
}
|
|
2102
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Tn(i),
|
|
2102
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Tn(i), G(n, i);
|
|
2103
2103
|
}
|
|
2104
2104
|
for (let [e, n] of c.entries()) {
|
|
2105
2105
|
if (e !== t || r.value[e]?.errorKind) {
|
|
2106
2106
|
H(n, e);
|
|
2107
2107
|
continue;
|
|
2108
2108
|
}
|
|
2109
|
-
Tn(n),
|
|
2109
|
+
Tn(n), G(e, n);
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
2112
|
function w(e, t) {
|
|
2113
2113
|
let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
|
|
2114
2114
|
if (n) {
|
|
2115
2115
|
let i = r.value[e]?.ready ?? !1;
|
|
2116
|
-
|
|
2116
|
+
G(e, n, t.type);
|
|
2117
2117
|
let a = r.value[e]?.ready ?? !1;
|
|
2118
2118
|
!i && a && J(e, n.currentSrc || n.src || ie(e));
|
|
2119
2119
|
}
|
|
@@ -2134,7 +2134,7 @@ function On(e) {
|
|
|
2134
2134
|
});
|
|
2135
2135
|
}
|
|
2136
2136
|
async function O(t, n) {
|
|
2137
|
-
let r = K(t), i =
|
|
2137
|
+
let r = K(t), i = W(t), a = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
2138
2138
|
if (r) {
|
|
2139
2139
|
r.pause();
|
|
2140
2140
|
try {
|
|
@@ -2163,17 +2163,17 @@ function On(e) {
|
|
|
2163
2163
|
let r = Number.parseFloat(e.target.value);
|
|
2164
2164
|
if (!Number.isFinite(r)) return;
|
|
2165
2165
|
let i = kn(r, 0, m.value || 0);
|
|
2166
|
-
|
|
2166
|
+
te(n, i, t), t.currentTime = i;
|
|
2167
2167
|
}
|
|
2168
2168
|
function M(e) {
|
|
2169
2169
|
let t = q(), n = d.value;
|
|
2170
2170
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2171
2171
|
let r = kn(Number.parseFloat(e.target.value), 0, 1);
|
|
2172
|
-
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r),
|
|
2172
|
+
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), G(n, t);
|
|
2173
2173
|
}
|
|
2174
2174
|
function N() {
|
|
2175
2175
|
let e = q(), t = d.value;
|
|
2176
|
-
!e || !t || (e.muted || e.volume <= 0 ? (e.volume = ne(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0),
|
|
2176
|
+
!e || !t || (e.muted || e.volume <= 0 ? (e.volume = ne(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), G(t, e));
|
|
2177
2177
|
}
|
|
2178
2178
|
function P(e) {
|
|
2179
2179
|
return !!t.value[e] && !n.value[e];
|
|
@@ -2200,7 +2200,7 @@ function On(e) {
|
|
|
2200
2200
|
async function V(e) {
|
|
2201
2201
|
if (!ee(e)) return;
|
|
2202
2202
|
t.value[e] = !1, n.value[e] = null;
|
|
2203
|
-
let r =
|
|
2203
|
+
let r = W(e);
|
|
2204
2204
|
r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
|
|
2205
2205
|
let i = K(e);
|
|
2206
2206
|
i && H(i, e), l.forEach((t) => {
|
|
@@ -2212,20 +2212,20 @@ function On(e) {
|
|
|
2212
2212
|
try {
|
|
2213
2213
|
e.currentTime = 0;
|
|
2214
2214
|
} catch {}
|
|
2215
|
-
|
|
2215
|
+
G(t, e);
|
|
2216
2216
|
}
|
|
2217
2217
|
function U() {
|
|
2218
2218
|
for (let [e, t] of s.entries()) H(t, e);
|
|
2219
2219
|
for (let [e, t] of c.entries()) H(t, e);
|
|
2220
2220
|
}
|
|
2221
|
-
function
|
|
2221
|
+
function W(e) {
|
|
2222
2222
|
return r.value[e] || (r.value[e] = mn()), r.value[e];
|
|
2223
2223
|
}
|
|
2224
|
-
function W(e, t, n) {
|
|
2225
|
-
gn(te(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
2226
|
-
}
|
|
2227
2224
|
function G(e, t, n) {
|
|
2228
|
-
|
|
2225
|
+
gn(W(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
2226
|
+
}
|
|
2227
|
+
function te(e, t, n) {
|
|
2228
|
+
let r = W(e);
|
|
2229
2229
|
r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.muted = n.muted, r.paused = n.paused, r.volume = Number.isFinite(n.volume) ? n.volume : r.volume;
|
|
2230
2230
|
}
|
|
2231
2231
|
function ne(e) {
|
|
@@ -2356,7 +2356,7 @@ function Pn(e, t, n = {}) {
|
|
|
2356
2356
|
onEnable() {
|
|
2357
2357
|
return T.syncMediaPlayback();
|
|
2358
2358
|
},
|
|
2359
|
-
onKeydown:
|
|
2359
|
+
onKeydown: G,
|
|
2360
2360
|
onResize: F
|
|
2361
2361
|
});
|
|
2362
2362
|
function P(e, t, n) {
|
|
@@ -2378,7 +2378,7 @@ function Pn(e, t, n = {}) {
|
|
|
2378
2378
|
return t && !I(-1) || n && !I(1) ? e * .24 : e;
|
|
2379
2379
|
}
|
|
2380
2380
|
function z(e) {
|
|
2381
|
-
!_.value || r.value.length === 0 || e.pointerType === "mouse" ||
|
|
2381
|
+
!_.value || r.value.length === 0 || e.pointerType === "mouse" || ve(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
|
|
2382
2382
|
}
|
|
2383
2383
|
function ee(e) {
|
|
2384
2384
|
!_.value || !h.value || v !== e.pointerId || (m.value = R(e.clientY - y));
|
|
@@ -2395,16 +2395,16 @@ function Pn(e, t, n = {}) {
|
|
|
2395
2395
|
function U() {
|
|
2396
2396
|
m.value = 0, h.value = !1, v = null;
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2399
|
-
if (!_.value || r.value.length === 0 || h.value ||
|
|
2398
|
+
function W(e) {
|
|
2399
|
+
if (!_.value || r.value.length === 0 || h.value || ve(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
2400
2400
|
e.preventDefault();
|
|
2401
2401
|
let t = Date.now();
|
|
2402
2402
|
t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
|
|
2403
2403
|
}
|
|
2404
|
-
function
|
|
2405
|
-
!_.value || r.value.length === 0 ||
|
|
2404
|
+
function G(e) {
|
|
2405
|
+
!_.value || r.value.length === 0 || Z(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2407
|
+
function te(e, t) {
|
|
2408
2408
|
T.onVideoClick(e, t, x);
|
|
2409
2409
|
}
|
|
2410
2410
|
function ne(e, t) {
|
|
@@ -2465,8 +2465,8 @@ function Pn(e, t, n = {}) {
|
|
|
2465
2465
|
onPointerDown: z,
|
|
2466
2466
|
onPointerMove: ee,
|
|
2467
2467
|
onPointerUp: B,
|
|
2468
|
-
onVideoClick:
|
|
2469
|
-
onWheel:
|
|
2468
|
+
onVideoClick: te,
|
|
2469
|
+
onWheel: W,
|
|
2470
2470
|
registerAudioElement: T.registerAudioElement,
|
|
2471
2471
|
registerImageElement: T.registerImageElement,
|
|
2472
2472
|
registerVideoElement: T.registerVideoElement,
|
|
@@ -2605,25 +2605,96 @@ function Wn(e) {
|
|
|
2605
2605
|
};
|
|
2606
2606
|
}
|
|
2607
2607
|
//#endregion
|
|
2608
|
-
//#region src/components/
|
|
2609
|
-
var Gn =
|
|
2610
|
-
|
|
2608
|
+
//#region src/components/FullscreenForwardFillPlaceholder.vue?vue&type=script&setup=true&lang.ts
|
|
2609
|
+
var Gn = {
|
|
2610
|
+
"data-testid": "vibe-forward-fill-placeholder",
|
|
2611
|
+
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
2612
|
+
}, Kn = { class: "grid w-full max-w-[22rem] justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, qn = { 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)]" }, Jn = {
|
|
2613
|
+
"data-testid": "vibe-forward-fill-message",
|
|
2614
|
+
class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72"
|
|
2615
|
+
}, Yn = {
|
|
2616
|
+
key: 0,
|
|
2617
|
+
"data-testid": "vibe-forward-fill-progress",
|
|
2618
|
+
class: "grid w-full gap-2"
|
|
2619
|
+
}, Xn = { class: "flex items-center justify-between gap-4 text-[0.62rem] font-bold uppercase tracking-[0.16em] text-[#f7f1ea]/58" }, Zn = { key: 0 }, Qn = {
|
|
2620
|
+
key: 0,
|
|
2621
|
+
class: "h-1 w-full overflow-hidden bg-white/10"
|
|
2622
|
+
}, $n = /* @__PURE__ */ d({
|
|
2623
|
+
__name: "FullscreenForwardFillPlaceholder",
|
|
2624
|
+
props: {
|
|
2625
|
+
fillCollectedCount: { default: null },
|
|
2626
|
+
fillCompletedCalls: { default: 0 },
|
|
2627
|
+
fillLoadedCount: { default: 0 },
|
|
2628
|
+
fillMode: { default: "idle" },
|
|
2629
|
+
fillProgress: { default: null },
|
|
2630
|
+
fillTargetCalls: { default: null },
|
|
2631
|
+
fillTargetCount: { default: null },
|
|
2632
|
+
fillTotalCount: { default: null },
|
|
2633
|
+
hasNextPage: {
|
|
2634
|
+
type: Boolean,
|
|
2635
|
+
default: !1
|
|
2636
|
+
},
|
|
2637
|
+
phase: { default: null },
|
|
2638
|
+
statusMessage: { default: null }
|
|
2639
|
+
},
|
|
2640
|
+
setup(e) {
|
|
2641
|
+
let t = e, n = i(() => t.phase === "filling" ? t.statusMessage ?? "Filling the view" : t.hasNextPage ? "Loading more items" : t.statusMessage ?? "Loading more items"), r = i(() => t.phase === "filling" || (t.fillMode ?? "idle") !== "idle"), a = i(() => {
|
|
2642
|
+
if (!r.value) return null;
|
|
2643
|
+
let e = m(t.fillProgress);
|
|
2644
|
+
if (e !== null) return e;
|
|
2645
|
+
let n = p(t.fillCollectedCount), i = p(t.fillTargetCount);
|
|
2646
|
+
if (n !== null && i !== null && i > 0) return h(n / i);
|
|
2647
|
+
let a = p(t.fillLoadedCount), o = p(t.fillTotalCount);
|
|
2648
|
+
return a !== null && o !== null && o > 0 ? h(a / o) : null;
|
|
2649
|
+
}), l = i(() => {
|
|
2650
|
+
if (!r.value) return null;
|
|
2651
|
+
let e = p(t.fillCollectedCount), n = p(t.fillTargetCount);
|
|
2652
|
+
if (e !== null && n !== null && n > 0) return `${e} / ${n} items`;
|
|
2653
|
+
let i = p(t.fillCompletedCalls) ?? 0, a = p(t.fillTargetCalls);
|
|
2654
|
+
if (a !== null && a > 0) return `${i} / ${a} calls`;
|
|
2655
|
+
let o = p(t.fillLoadedCount) ?? 0, s = p(t.fillTotalCount);
|
|
2656
|
+
return s === null ? i > 0 ? `${o} loaded / ${i} calls` : null : `${o} / ${s} loaded`;
|
|
2657
|
+
}), d = i(() => a.value === null ? null : `${Math.round(a.value * 100)}%`), f = i(() => ({ width: `${(a.value ?? 0) * 100}%` }));
|
|
2658
|
+
function p(e) {
|
|
2659
|
+
return typeof e == "number" && Number.isFinite(e) && e >= 0 ? Math.floor(e) : null;
|
|
2660
|
+
}
|
|
2661
|
+
function m(e) {
|
|
2662
|
+
return typeof e == "number" && Number.isFinite(e) ? h(e) : null;
|
|
2663
|
+
}
|
|
2664
|
+
function h(e) {
|
|
2665
|
+
return Math.min(Math.max(e, 0), 1);
|
|
2666
|
+
}
|
|
2667
|
+
return (e, t) => (w(), s("div", Gn, [c("div", Kn, [
|
|
2668
|
+
c("span", qn, [u(F(se), {
|
|
2669
|
+
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2670
|
+
"aria-hidden": "true"
|
|
2671
|
+
})]),
|
|
2672
|
+
c("p", Jn, M(n.value), 1),
|
|
2673
|
+
l.value ? (w(), s("div", Yn, [c("div", Xn, [c("span", null, M(l.value), 1), d.value ? (w(), s("span", Zn, M(d.value), 1)) : o("", !0)]), a.value === null ? o("", !0) : (w(), s("div", Qn, [c("span", {
|
|
2674
|
+
"data-testid": "vibe-forward-fill-progress-bar",
|
|
2675
|
+
class: "block h-full bg-[#f7f1ea]/58 transition-[width] duration-200",
|
|
2676
|
+
style: b(f.value)
|
|
2677
|
+
}, null, 4)]))])) : o("", !0)
|
|
2678
|
+
])]));
|
|
2679
|
+
}
|
|
2680
|
+
}), er = 1, tr = .5;
|
|
2681
|
+
function nr(e) {
|
|
2611
2682
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2612
|
-
width:
|
|
2613
|
-
height:
|
|
2683
|
+
width: er,
|
|
2684
|
+
height: er,
|
|
2614
2685
|
source: "fallback"
|
|
2615
2686
|
};
|
|
2616
2687
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2617
|
-
if (
|
|
2618
|
-
let r =
|
|
2688
|
+
if (dr(t) && dr(n)) {
|
|
2689
|
+
let r = fr(e, t, n);
|
|
2619
2690
|
return {
|
|
2620
2691
|
width: r.width,
|
|
2621
2692
|
height: r.height,
|
|
2622
2693
|
source: "preview"
|
|
2623
2694
|
};
|
|
2624
2695
|
}
|
|
2625
|
-
if (
|
|
2626
|
-
let t =
|
|
2696
|
+
if (dr(e.width) && dr(e.height)) {
|
|
2697
|
+
let t = fr(e, e.width, e.height);
|
|
2627
2698
|
return {
|
|
2628
2699
|
width: t.width,
|
|
2629
2700
|
height: t.height,
|
|
@@ -2631,24 +2702,24 @@ function qn(e) {
|
|
|
2631
2702
|
};
|
|
2632
2703
|
}
|
|
2633
2704
|
return {
|
|
2634
|
-
width:
|
|
2635
|
-
height:
|
|
2705
|
+
width: er,
|
|
2706
|
+
height: er,
|
|
2636
2707
|
source: "fallback"
|
|
2637
2708
|
};
|
|
2638
2709
|
}
|
|
2639
|
-
function
|
|
2710
|
+
function rr(e, t) {
|
|
2640
2711
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2641
2712
|
}
|
|
2642
|
-
function
|
|
2713
|
+
function ir(e, t, n, r = 0) {
|
|
2643
2714
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2644
2715
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2645
2716
|
return !a || a <= 0 ? n : a / t;
|
|
2646
2717
|
}
|
|
2647
|
-
function
|
|
2648
|
-
let n =
|
|
2718
|
+
function ar(e, t) {
|
|
2719
|
+
let n = nr(e);
|
|
2649
2720
|
return n.height / n.width * t;
|
|
2650
2721
|
}
|
|
2651
|
-
function
|
|
2722
|
+
function or(e, t) {
|
|
2652
2723
|
let n = Array.from({ length: t.columnCount }, () => 0), r = {
|
|
2653
2724
|
positions: Array(e.length),
|
|
2654
2725
|
heights: Array(e.length),
|
|
@@ -2657,18 +2728,18 @@ function Zn(e, t) {
|
|
|
2657
2728
|
indexById: /* @__PURE__ */ new Map(),
|
|
2658
2729
|
columnHeights: n
|
|
2659
2730
|
};
|
|
2660
|
-
return
|
|
2731
|
+
return sr(r, e, {
|
|
2661
2732
|
...t,
|
|
2662
2733
|
startIndex: 0
|
|
2663
2734
|
}), r;
|
|
2664
2735
|
}
|
|
2665
|
-
function
|
|
2736
|
+
function sr(e, t, n) {
|
|
2666
2737
|
for (let r = 0; r < t.length; r += 1) {
|
|
2667
2738
|
let i = t[r], a = n.startIndex + r;
|
|
2668
2739
|
e.indexById.set($(i), a);
|
|
2669
2740
|
let o = 0;
|
|
2670
2741
|
for (let t = 1; t < e.columnHeights.length; t += 1) e.columnHeights[t] < e.columnHeights[o] && (o = t);
|
|
2671
|
-
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l =
|
|
2742
|
+
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = ar(i, n.columnWidth);
|
|
2672
2743
|
e.positions[a] = {
|
|
2673
2744
|
x: s + (n.positionOffsetX ?? 0),
|
|
2674
2745
|
y: c + (n.positionOffsetY ?? 0)
|
|
@@ -2681,20 +2752,20 @@ function Qn(e, t, n) {
|
|
|
2681
2752
|
}
|
|
2682
2753
|
return e;
|
|
2683
2754
|
}
|
|
2684
|
-
function
|
|
2755
|
+
function cr(e, t) {
|
|
2685
2756
|
let n = [...t.columnHeights], r = t.contentHeight;
|
|
2686
2757
|
for (let i of e) {
|
|
2687
2758
|
let e = 0;
|
|
2688
2759
|
for (let t = 1; t < n.length; t += 1) n[t] < n[e] && (e = t);
|
|
2689
|
-
let a = n[e], o =
|
|
2760
|
+
let a = n[e], o = ar(i, t.columnWidth);
|
|
2690
2761
|
n[e] = a + o + t.gapY, r = Math.max(r, a + o);
|
|
2691
2762
|
}
|
|
2692
2763
|
return r;
|
|
2693
2764
|
}
|
|
2694
|
-
function
|
|
2765
|
+
function lr(e) {
|
|
2695
2766
|
return e.addedItems.length === 0 || e.removedItemCount > 0 || e.isPrepend || e.previousItems.length === 0 || e.layoutItemCount !== e.previousItems.length || e.columnHeights.length !== e.columnCount || e.currentItems.length !== e.previousItems.length + e.addedItems.length ? !1 : e.previousItems.every((t, n) => $(t) === $(e.currentItems[n]));
|
|
2696
2767
|
}
|
|
2697
|
-
function
|
|
2768
|
+
function ur(e) {
|
|
2698
2769
|
if (e.itemCount <= 0) return [];
|
|
2699
2770
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2700
2771
|
let t = Math.max(0, e.scrollTop - e.overscanPx), n = e.scrollTop + e.viewportHeight + e.overscanPx, r = Math.floor(t / e.bucketPx), i = Math.floor(n / e.bucketPx), a = /* @__PURE__ */ new Set();
|
|
@@ -2704,11 +2775,11 @@ function tr(e) {
|
|
|
2704
2775
|
}
|
|
2705
2776
|
return Array.from(a).sort((e, t) => e - t);
|
|
2706
2777
|
}
|
|
2707
|
-
function
|
|
2778
|
+
function dr(e) {
|
|
2708
2779
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2709
2780
|
}
|
|
2710
|
-
function
|
|
2711
|
-
return e.type !== "image" || n / t >=
|
|
2781
|
+
function fr(e, t, n) {
|
|
2782
|
+
return e.type !== "image" || n / t >= tr ? {
|
|
2712
2783
|
width: t,
|
|
2713
2784
|
height: n
|
|
2714
2785
|
} : {
|
|
@@ -2718,9 +2789,9 @@ function rr(e, t, n) {
|
|
|
2718
2789
|
}
|
|
2719
2790
|
//#endregion
|
|
2720
2791
|
//#region src/components/viewer-core/listPreview.ts
|
|
2721
|
-
var
|
|
2722
|
-
function
|
|
2723
|
-
let t =
|
|
2792
|
+
var pr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, mr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, hr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
2793
|
+
function gr(e) {
|
|
2794
|
+
let t = _r(e), n = t?.url, r = nr(e), i = e.title?.trim() || Kt(e.type);
|
|
2724
2795
|
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
2725
2796
|
kind: "video",
|
|
2726
2797
|
url: n,
|
|
@@ -2739,13 +2810,13 @@ function sr(e) {
|
|
|
2739
2810
|
width: r.width,
|
|
2740
2811
|
height: r.height,
|
|
2741
2812
|
label: i
|
|
2742
|
-
} : typeof n == "string" &&
|
|
2813
|
+
} : typeof n == "string" && yr(e, n) ? {
|
|
2743
2814
|
kind: "video",
|
|
2744
2815
|
url: n,
|
|
2745
2816
|
width: r.width,
|
|
2746
2817
|
height: r.height,
|
|
2747
2818
|
label: i
|
|
2748
|
-
} : typeof n == "string" &&
|
|
2819
|
+
} : typeof n == "string" && vr(e, n) ? {
|
|
2749
2820
|
kind: "image",
|
|
2750
2821
|
url: n,
|
|
2751
2822
|
width: r.width,
|
|
@@ -2759,54 +2830,54 @@ function sr(e) {
|
|
|
2759
2830
|
label: i
|
|
2760
2831
|
};
|
|
2761
2832
|
}
|
|
2762
|
-
function
|
|
2833
|
+
function _r(e) {
|
|
2763
2834
|
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
2764
2835
|
}
|
|
2765
|
-
function
|
|
2766
|
-
return e.type !== "image" || typeof t != "string" ? !1 :
|
|
2836
|
+
function vr(e, t) {
|
|
2837
|
+
return e.type !== "image" || typeof t != "string" ? !1 : pr.test(t) || br(t);
|
|
2767
2838
|
}
|
|
2768
|
-
function
|
|
2769
|
-
return e.type !== "video" || typeof t != "string" ? !1 :
|
|
2839
|
+
function yr(e, t) {
|
|
2840
|
+
return e.type !== "video" || typeof t != "string" ? !1 : mr.test(t) || xr(t);
|
|
2770
2841
|
}
|
|
2771
|
-
function
|
|
2842
|
+
function br(e) {
|
|
2772
2843
|
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
2773
2844
|
}
|
|
2774
|
-
function
|
|
2775
|
-
return
|
|
2845
|
+
function xr(e) {
|
|
2846
|
+
return hr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
2776
2847
|
}
|
|
2777
2848
|
//#endregion
|
|
2778
2849
|
//#region src/components/FullscreenPreviewRail.vue?vue&type=script&setup=true&lang.ts
|
|
2779
|
-
var
|
|
2850
|
+
var Sr = {
|
|
2780
2851
|
key: 0,
|
|
2781
2852
|
"data-testid": "vibe-fullscreen-next-previews",
|
|
2782
|
-
class: "pointer-events-auto absolute right-[clamp(1.25rem,2.6vw,2.25rem)] top-
|
|
2783
|
-
},
|
|
2853
|
+
class: "pointer-events-auto absolute right-[clamp(1.25rem,2.6vw,2.25rem)] top-1/2 z-[4] flex -translate-y-1/2 items-center justify-end gap-3 max-[860px]:hidden"
|
|
2854
|
+
}, Cr = [
|
|
2784
2855
|
"data-index",
|
|
2785
2856
|
"aria-label",
|
|
2786
2857
|
"title",
|
|
2787
2858
|
"onClick"
|
|
2788
|
-
],
|
|
2859
|
+
], wr = [
|
|
2789
2860
|
"src",
|
|
2790
2861
|
"onError",
|
|
2791
2862
|
"onLoad"
|
|
2792
|
-
],
|
|
2863
|
+
], Tr = [
|
|
2793
2864
|
"src",
|
|
2794
2865
|
"onError",
|
|
2795
2866
|
"onLoadedmetadata"
|
|
2796
|
-
],
|
|
2867
|
+
], Er = {
|
|
2797
2868
|
key: 2,
|
|
2798
2869
|
class: "grid h-full w-full place-items-center bg-white/6",
|
|
2799
2870
|
"aria-hidden": "true"
|
|
2800
|
-
},
|
|
2871
|
+
}, Dr = {
|
|
2801
2872
|
key: 3,
|
|
2802
2873
|
class: "pointer-events-none absolute left-2 top-2 inline-flex h-6 w-6 items-center justify-center border border-white/14 bg-black/55 backdrop-blur-[14px]",
|
|
2803
2874
|
"aria-hidden": "true"
|
|
2804
|
-
},
|
|
2875
|
+
}, Or = {
|
|
2805
2876
|
key: 4,
|
|
2806
2877
|
"data-testid": "vibe-fullscreen-next-preview-spinner",
|
|
2807
2878
|
class: "pointer-events-none absolute inset-0 grid place-items-center bg-black/18",
|
|
2808
2879
|
"aria-hidden": "true"
|
|
2809
|
-
},
|
|
2880
|
+
}, kr = { class: "inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/50 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Ar = { class: "pointer-events-none absolute bottom-1.5 right-1.5 border border-white/14 bg-black/58 px-1.5 py-1 text-[0.56rem] font-bold leading-none tracking-[0.12em] text-[#f7f1ea]/78 backdrop-blur-[14px]" }, jr = /* @__PURE__ */ d({
|
|
2810
2881
|
__name: "FullscreenPreviewRail",
|
|
2811
2882
|
props: {
|
|
2812
2883
|
activeIndex: {},
|
|
@@ -2818,7 +2889,7 @@ var pr = {
|
|
|
2818
2889
|
let r = e, l = n, d = D({}), f = i(() => {
|
|
2819
2890
|
let e = Math.min(Math.max(r.activeIndex + 1, 0), r.items.length);
|
|
2820
2891
|
return r.items.slice(e, e + r.maxItems).map((t, n) => ({
|
|
2821
|
-
asset:
|
|
2892
|
+
asset: gr(t),
|
|
2822
2893
|
index: e + n,
|
|
2823
2894
|
item: t
|
|
2824
2895
|
}));
|
|
@@ -2852,7 +2923,7 @@ var pr = {
|
|
|
2852
2923
|
return _(e) && d.value[p(e)] === "loading";
|
|
2853
2924
|
}
|
|
2854
2925
|
function b(e, t) {
|
|
2855
|
-
return d.value[p(e)] === "ready" ?
|
|
2926
|
+
return d.value[p(e)] === "ready" ? t : "opacity-0";
|
|
2856
2927
|
}
|
|
2857
2928
|
function x(e, t) {
|
|
2858
2929
|
d.value = {
|
|
@@ -2860,14 +2931,20 @@ var pr = {
|
|
|
2860
2931
|
[p(e)]: t
|
|
2861
2932
|
};
|
|
2862
2933
|
}
|
|
2863
|
-
|
|
2934
|
+
function S(e) {
|
|
2935
|
+
return e === 0 ? "h-[220px] w-[220px]" : "h-[140px] w-[140px]";
|
|
2936
|
+
}
|
|
2937
|
+
function C(e) {
|
|
2938
|
+
return e === 0 ? "opacity-90" : "opacity-40";
|
|
2939
|
+
}
|
|
2940
|
+
return (e, n) => f.value.length ? (w(), s("div", Sr, [(w(!0), s(t, null, O(f.value, (e, t) => (w(), s("button", {
|
|
2864
2941
|
key: `${e.item.id}-${e.index}`,
|
|
2865
2942
|
type: "button",
|
|
2866
2943
|
"data-testid": "vibe-fullscreen-next-preview",
|
|
2867
2944
|
"data-index": e.index,
|
|
2868
2945
|
"aria-label": m(e),
|
|
2869
2946
|
title: e.asset.label,
|
|
2870
|
-
class: "group relative
|
|
2947
|
+
class: v(["group relative overflow-hidden border border-white/14 bg-black/45 text-[#f7f1ea] shadow-[0_20px_50px_-30px_rgba(0,0,0,0.9)] backdrop-blur-[18px] transition hover:border-white/34 hover:bg-black/58 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]", S(t)]),
|
|
2871
2948
|
onClick: (t) => l("select", e.index)
|
|
2872
2949
|
}, [
|
|
2873
2950
|
e.asset.kind === "image" ? (w(), s("img", {
|
|
@@ -2877,26 +2954,26 @@ var pr = {
|
|
|
2877
2954
|
"aria-hidden": "true",
|
|
2878
2955
|
draggable: "false",
|
|
2879
2956
|
loading: "lazy",
|
|
2880
|
-
class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e,
|
|
2957
|
+
class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e, C(t))]]),
|
|
2881
2958
|
onError: (t) => x(e, "error"),
|
|
2882
2959
|
onLoad: (t) => x(e, "ready")
|
|
2883
|
-
}, null, 42,
|
|
2960
|
+
}, null, 42, wr)) : e.asset.kind === "video" ? (w(), s("video", {
|
|
2884
2961
|
key: 1,
|
|
2885
2962
|
src: e.asset.url ?? void 0,
|
|
2886
2963
|
"aria-hidden": "true",
|
|
2887
|
-
class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e,
|
|
2964
|
+
class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e, C(t))]]),
|
|
2888
2965
|
muted: "",
|
|
2889
2966
|
playsinline: "",
|
|
2890
2967
|
preload: "metadata",
|
|
2891
2968
|
onError: (t) => x(e, "error"),
|
|
2892
2969
|
onLoadedmetadata: (t) => x(e, "ready")
|
|
2893
|
-
}, null, 42,
|
|
2894
|
-
e.asset.kind === "video" ? (w(), s("span",
|
|
2895
|
-
y(e) ? (w(), s("span",
|
|
2896
|
-
c("span",
|
|
2897
|
-
],
|
|
2970
|
+
}, null, 42, Tr)) : (w(), s("span", Er, [(w(), a(A(F(Gt)(e.item.type)), { class: "h-5 w-5 stroke-[1.9] text-[#f7f1ea]/70" }))])),
|
|
2971
|
+
e.asset.kind === "video" ? (w(), s("span", Dr, [(w(), a(A(F(Gt)(e.item.type)), { class: "h-3.5 w-3.5 stroke-[2]" }))])) : o("", !0),
|
|
2972
|
+
y(e) ? (w(), s("span", Or, [c("span", kr, [u(F(se), { class: "h-4 w-4 animate-spin stroke-[1.9] text-[#f7f1ea]/82" })])])) : o("", !0),
|
|
2973
|
+
c("span", Ar, M(e.index + 1) + " / " + M(r.items.length), 1)
|
|
2974
|
+
], 10, Cr))), 128))])) : o("", !0);
|
|
2898
2975
|
}
|
|
2899
|
-
}),
|
|
2976
|
+
}), Mr = ["data-surface"], Nr = ["data-surface"], Pr = /* @__PURE__ */ d({
|
|
2900
2977
|
inheritAttrs: !1,
|
|
2901
2978
|
__name: "SurfaceEmptyState",
|
|
2902
2979
|
props: {
|
|
@@ -2910,31 +2987,31 @@ var pr = {
|
|
|
2910
2987
|
"data-testid": "vibe-empty-state-inline",
|
|
2911
2988
|
"data-surface": e.surface,
|
|
2912
2989
|
class: ["pointer-events-none absolute z-[4] text-center", e.surface === "grid" ? "inset-x-0 top-[clamp(6rem,22vh,11rem)] flex justify-center px-6" : "inset-0 grid place-items-center px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)]"]
|
|
2913
|
-
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, M(e.message), 3)])], 16,
|
|
2990
|
+
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, M(e.message), 3)])], 16, Mr)) : (w(), s("div", g({ key: 1 }, F(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
|
|
2914
2991
|
"data-testid": "vibe-empty-state-badge",
|
|
2915
2992
|
"data-surface": e.surface,
|
|
2916
2993
|
class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
|
|
2917
|
-
}, M(e.message), 11,
|
|
2994
|
+
}, M(e.message), 11, Nr)])], 16));
|
|
2918
2995
|
}
|
|
2919
|
-
}),
|
|
2996
|
+
}), Fr = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Ir = {
|
|
2920
2997
|
key: 0,
|
|
2921
2998
|
class: "relative h-full min-h-0"
|
|
2922
|
-
},
|
|
2999
|
+
}, Lr = [
|
|
2923
3000
|
"data-item-id",
|
|
2924
3001
|
"data-occurrence-key",
|
|
2925
3002
|
"data-index",
|
|
2926
3003
|
"data-active",
|
|
2927
3004
|
"aria-hidden"
|
|
2928
|
-
],
|
|
3005
|
+
], Rr = {
|
|
2929
3006
|
key: 0,
|
|
2930
3007
|
"data-testid": "vibe-asset-spinner",
|
|
2931
3008
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
2932
|
-
},
|
|
3009
|
+
}, zr = { 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]" }, Br = ["data-kind"], Vr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Hr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Ur = ["onClick"], Wr = [
|
|
2933
3010
|
"src",
|
|
2934
3011
|
"alt",
|
|
2935
3012
|
"onLoad",
|
|
2936
3013
|
"onError"
|
|
2937
|
-
],
|
|
3014
|
+
], Gr = [
|
|
2938
3015
|
"loop",
|
|
2939
3016
|
"src",
|
|
2940
3017
|
"preload",
|
|
@@ -2953,15 +3030,15 @@ var pr = {
|
|
|
2953
3030
|
"onStalled",
|
|
2954
3031
|
"onTimeupdate",
|
|
2955
3032
|
"onWaiting"
|
|
2956
|
-
],
|
|
3033
|
+
], Kr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, qr = [
|
|
2957
3034
|
"aria-label",
|
|
2958
3035
|
"disabled",
|
|
2959
3036
|
"onClick"
|
|
2960
|
-
],
|
|
3037
|
+
], Jr = { class: "relative z-[1] inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-emerald-500/12 p-4 backdrop-blur-[20px]" }, Yr = { class: "pointer-events-none absolute bottom-4 right-4 inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 backdrop-blur-[18px]" }, Xr = {
|
|
2961
3038
|
key: 0,
|
|
2962
3039
|
"data-testid": "vibe-asset-spinner",
|
|
2963
3040
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
2964
|
-
},
|
|
3041
|
+
}, Zr = { 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]" }, Qr = ["data-kind"], $r = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, ei = ["onClick"], ti = [
|
|
2965
3042
|
"src",
|
|
2966
3043
|
"preload",
|
|
2967
3044
|
"onCanplay",
|
|
@@ -2977,26 +3054,22 @@ var pr = {
|
|
|
2977
3054
|
"onStalled",
|
|
2978
3055
|
"onTimeupdate",
|
|
2979
3056
|
"onWaiting"
|
|
2980
|
-
],
|
|
3057
|
+
], ni = {
|
|
2981
3058
|
key: 2,
|
|
2982
3059
|
class: "relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
|
|
2983
|
-
},
|
|
3060
|
+
}, ri = { class: "inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-white/8 p-4 backdrop-blur-[20px]" }, ii = {
|
|
2984
3061
|
key: 0,
|
|
2985
3062
|
"data-testid": "vibe-fullscreen-overlay",
|
|
2986
3063
|
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
2987
|
-
},
|
|
2988
|
-
key: 1,
|
|
2989
|
-
"data-testid": "vibe-forward-fill-placeholder",
|
|
2990
|
-
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
2991
|
-
}, Qr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, $r = { 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)]" }, ei = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, ti = {
|
|
3064
|
+
}, ai = { class: "h-full w-full" }, oi = {
|
|
2992
3065
|
key: 0,
|
|
2993
3066
|
"data-testid": "vibe-fullscreen-aside",
|
|
2994
3067
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
2995
|
-
},
|
|
3068
|
+
}, si = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ci = {
|
|
2996
3069
|
key: 0,
|
|
2997
3070
|
"data-testid": "vibe-fullscreen-aside",
|
|
2998
3071
|
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]"
|
|
2999
|
-
},
|
|
3072
|
+
}, li = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ui = 1280, di = 768, fi = /* @__PURE__ */ d({
|
|
3000
3073
|
__name: "FullscreenSurface",
|
|
3001
3074
|
props: {
|
|
3002
3075
|
active: {
|
|
@@ -3006,6 +3079,14 @@ var pr = {
|
|
|
3006
3079
|
activeIndex: { default: 0 },
|
|
3007
3080
|
emptyStateMode: { default: "inline" },
|
|
3008
3081
|
errorMessage: { default: null },
|
|
3082
|
+
fillCollectedCount: { default: null },
|
|
3083
|
+
fillCompletedCalls: { default: 0 },
|
|
3084
|
+
fillLoadedCount: { default: 0 },
|
|
3085
|
+
fillMode: { default: "idle" },
|
|
3086
|
+
fillProgress: { default: null },
|
|
3087
|
+
fillTargetCalls: { default: null },
|
|
3088
|
+
fillTargetCount: { default: null },
|
|
3089
|
+
fillTotalCount: { default: null },
|
|
3009
3090
|
hasNextPage: {
|
|
3010
3091
|
type: Boolean,
|
|
3011
3092
|
default: !1
|
|
@@ -3054,7 +3135,7 @@ var pr = {
|
|
|
3054
3135
|
enabled: N(d, "active"),
|
|
3055
3136
|
onAssetError: d.reportAssetError ?? void 0,
|
|
3056
3137
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
3057
|
-
}), _ = D(typeof window > "u" ?
|
|
3138
|
+
}), _ = D(typeof window > "u" ? ui : window.innerWidth || ui), C = rn({
|
|
3058
3139
|
active: N(d, "active"),
|
|
3059
3140
|
items: h.items,
|
|
3060
3141
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
@@ -3069,9 +3150,9 @@ var pr = {
|
|
|
3069
3150
|
showDominantImageTone: N(d, "showDominantImageTone")
|
|
3070
3151
|
}), R = Bn({
|
|
3071
3152
|
fullscreenMedia: C,
|
|
3072
|
-
updateDominantToneFromImageElement:
|
|
3153
|
+
updateDominantToneFromImageElement: ve,
|
|
3073
3154
|
viewer: h
|
|
3074
|
-
}), z = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), V = i(() => _.value <
|
|
3155
|
+
}), z = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), V = i(() => _.value < di ? "vertical" : "horizontal"), U = i(() => ee.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), W = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), G = i(() => {
|
|
3075
3156
|
let e = h.activeItem.value;
|
|
3076
3157
|
return e ? {
|
|
3077
3158
|
hasNextPage: d.hasNextPage,
|
|
@@ -3081,14 +3162,14 @@ var pr = {
|
|
|
3081
3162
|
paginationDetail: d.paginationDetail,
|
|
3082
3163
|
total: d.items.length
|
|
3083
3164
|
} : null;
|
|
3084
|
-
}),
|
|
3165
|
+
}), te = i(() => !G.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](G.value)), ne = i(() => !G.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](G.value)), K = i(() => !d.showStatusBadges || !G.value || !h.statusKind.value || !h.statusMessage.value ? null : {
|
|
3085
3166
|
...G.value,
|
|
3086
3167
|
kind: h.statusKind.value,
|
|
3087
3168
|
message: h.statusMessage.value
|
|
3088
|
-
}),
|
|
3089
|
-
gridTemplateColumns:
|
|
3169
|
+
}), q = i(() => !K.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](K.value)), re = i(() => ({
|
|
3170
|
+
gridTemplateColumns: ie.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
3090
3171
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
3091
|
-
})),
|
|
3172
|
+
})), J = i(() => an(te.value)), Y = i(() => an(ne.value)), ie = i(() => Y.value && _.value >= ui), ae = i(() => Y.value && !ie.value), oe = i(() => an(q.value)), { emptyStateProps: X, showBadgeEmptyState: ce, showCustomEmptyState: fe, showInlineEmptyState: pe } = cn({
|
|
3092
3173
|
emptyStateMode: N(d, "emptyStateMode"),
|
|
3093
3174
|
itemCount: i(() => d.items.length),
|
|
3094
3175
|
loading: N(d, "loading"),
|
|
@@ -3096,30 +3177,30 @@ var pr = {
|
|
|
3096
3177
|
surface: "fullscreen"
|
|
3097
3178
|
});
|
|
3098
3179
|
S(() => {
|
|
3099
|
-
window.addEventListener("resize",
|
|
3180
|
+
window.addEventListener("resize", me);
|
|
3100
3181
|
}), x(() => {
|
|
3101
|
-
window.removeEventListener("resize",
|
|
3182
|
+
window.removeEventListener("resize", me);
|
|
3102
3183
|
});
|
|
3103
|
-
function
|
|
3104
|
-
_.value = window.innerWidth ||
|
|
3184
|
+
function me() {
|
|
3185
|
+
_.value = window.innerWidth || ui;
|
|
3105
3186
|
}
|
|
3106
|
-
function
|
|
3107
|
-
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement &&
|
|
3187
|
+
function he(e, t) {
|
|
3188
|
+
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && ve(e, t);
|
|
3108
3189
|
}
|
|
3109
|
-
function
|
|
3190
|
+
function ge(e, t) {
|
|
3110
3191
|
C.registerMediaElement(e, t), h.registerVideoElement(e, t), T.registerElement(e, t);
|
|
3111
3192
|
}
|
|
3112
|
-
function
|
|
3193
|
+
function _e(e, t) {
|
|
3113
3194
|
C.registerMediaElement(e, t), h.registerAudioElement(e, t);
|
|
3114
3195
|
}
|
|
3115
3196
|
function Z(e, t, n) {
|
|
3116
3197
|
let r = R.onFullscreenMediaEvent(e, t, n), i = n.currentTarget, a = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
3117
3198
|
r && i instanceof HTMLMediaElement && i.readyState >= a && C.settleAssetPreload(r);
|
|
3118
3199
|
}
|
|
3119
|
-
function
|
|
3200
|
+
function ve(e, t) {
|
|
3120
3201
|
I(e, t);
|
|
3121
3202
|
}
|
|
3122
|
-
function
|
|
3203
|
+
function ye(e, t, n) {
|
|
3123
3204
|
let r = R.getHandledItemKey(t, n);
|
|
3124
3205
|
if (!r || (h.onMediaEvent(r, e), !d.loopFullscreenVideo)) return;
|
|
3125
3206
|
let i = e.currentTarget;
|
|
@@ -3130,14 +3211,14 @@ var pr = {
|
|
|
3130
3211
|
let a = i.play();
|
|
3131
3212
|
a && typeof a.catch == "function" && a.catch(() => {});
|
|
3132
3213
|
}
|
|
3133
|
-
return (e, n) => (w(), s("div",
|
|
3214
|
+
return (e, n) => (w(), s("div", Fr, [
|
|
3134
3215
|
c("div", {
|
|
3135
3216
|
class: v(["absolute inset-0 transition-[background] duration-200", E.value]),
|
|
3136
3217
|
style: b(F(P))
|
|
3137
3218
|
}, null, 6),
|
|
3138
3219
|
c("div", {
|
|
3139
3220
|
class: "relative z-[1] grid h-full min-h-0",
|
|
3140
|
-
style: b(
|
|
3221
|
+
style: b(re.value)
|
|
3141
3222
|
}, [c("div", {
|
|
3142
3223
|
ref: "viewer.stageRef",
|
|
3143
3224
|
"data-testid": "vibe-stage",
|
|
@@ -3147,7 +3228,7 @@ var pr = {
|
|
|
3147
3228
|
onPointerup: n[4] ||= (...e) => F(h).onPointerUp && F(h).onPointerUp(...e),
|
|
3148
3229
|
onPointercancel: n[5] ||= (...e) => F(h).onPointerCancel && F(h).onPointerCancel(...e),
|
|
3149
3230
|
onWheel: n[6] ||= (...e) => F(h).onWheel && F(h).onWheel(...e)
|
|
3150
|
-
}, [F(h).activeItem.value ? (w(), s("div",
|
|
3231
|
+
}, [F(h).activeItem.value ? (w(), s("div", Ir, [
|
|
3151
3232
|
(w(!0), s(t, null, O(F(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
3152
3233
|
key: F(C).getItemKey(r),
|
|
3153
3234
|
"data-testid": "vibe-slide",
|
|
@@ -3164,7 +3245,7 @@ var pr = {
|
|
|
3164
3245
|
}, null, 6), F(h).isVisual(r) ? (w(), s("div", {
|
|
3165
3246
|
key: 0,
|
|
3166
3247
|
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === F(h).resolvedActiveIndex.value ? U.value : ""])
|
|
3167
|
-
}, [F(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
3248
|
+
}, [F(C).isAssetLoading(i, r) ? (w(), s("div", Rr, [c("span", zr, [u(F(se), {
|
|
3168
3249
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3169
3250
|
"aria-hidden": "true"
|
|
3170
3251
|
})])])) : o("", !0), F(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
@@ -3172,19 +3253,19 @@ var pr = {
|
|
|
3172
3253
|
"data-testid": "vibe-asset-error",
|
|
3173
3254
|
"data-kind": F(C).getAssetErrorKind(r),
|
|
3174
3255
|
class: "grid h-full w-full place-items-center"
|
|
3175
|
-
}, [c("div",
|
|
3256
|
+
}, [c("div", Vr, [
|
|
3176
3257
|
u(F(de), {
|
|
3177
3258
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3178
3259
|
"aria-hidden": "true"
|
|
3179
3260
|
}),
|
|
3180
|
-
c("p",
|
|
3261
|
+
c("p", Hr, M(F(C).getAssetErrorLabel(r)), 1),
|
|
3181
3262
|
F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
|
|
3182
3263
|
key: 0,
|
|
3183
3264
|
type: "button",
|
|
3184
3265
|
class: "inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
|
|
3185
3266
|
onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
|
|
3186
|
-
}, " Retry ", 8,
|
|
3187
|
-
])], 8,
|
|
3267
|
+
}, " Retry ", 8, Ur)) : o("", !0)
|
|
3268
|
+
])], 8, Br)) : r.type === "image" ? (w(), s("img", {
|
|
3188
3269
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3189
3270
|
src: F(C).getFullscreenImageSource(i, r),
|
|
3190
3271
|
alt: r.title ?? "",
|
|
@@ -3192,10 +3273,10 @@ var pr = {
|
|
|
3192
3273
|
draggable: "false",
|
|
3193
3274
|
class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", F(h).isImageReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
3194
3275
|
ref_for: !0,
|
|
3195
|
-
ref: (e) =>
|
|
3276
|
+
ref: (e) => he(F(C).getItemKey(r), e),
|
|
3196
3277
|
onLoad: (e) => F(R).onFullscreenImageLoad(e, i, r),
|
|
3197
3278
|
onError: (e) => F(R).onFullscreenImageError(i, r)
|
|
3198
|
-
}, null, 42,
|
|
3279
|
+
}, null, 42, Wr)) : (w(), s("video", {
|
|
3199
3280
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3200
3281
|
class: v(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", F(h).isMediaReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
3201
3282
|
playsinline: "",
|
|
@@ -3203,11 +3284,11 @@ var pr = {
|
|
|
3203
3284
|
src: F(C).getFullscreenMediaSource(i, r),
|
|
3204
3285
|
preload: F(C).getFullscreenMediaPreload(i),
|
|
3205
3286
|
ref_for: !0,
|
|
3206
|
-
ref: (e) =>
|
|
3287
|
+
ref: (e) => ge(F(C).getItemKey(r), e),
|
|
3207
3288
|
onClick: H((e) => F(h).onVideoClick(e, F(C).getItemKey(r)), ["stop"]),
|
|
3208
3289
|
onCanplay: (e) => Z(i, r, e),
|
|
3209
3290
|
onDurationchange: (e) => Z(i, r, e),
|
|
3210
|
-
onEnded: (e) =>
|
|
3291
|
+
onEnded: (e) => ye(e, i, r),
|
|
3211
3292
|
onError: (e) => F(R).onFullscreenMediaError(i, r),
|
|
3212
3293
|
onLoadstart: (e) => Z(i, r, e),
|
|
3213
3294
|
onLoadedmetadata: (e) => Z(i, r, e),
|
|
@@ -3219,10 +3300,10 @@ var pr = {
|
|
|
3219
3300
|
onStalled: (e) => Z(i, r, e),
|
|
3220
3301
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3221
3302
|
onWaiting: (e) => Z(i, r, e)
|
|
3222
|
-
}, null, 42,
|
|
3303
|
+
}, null, 42, Gr))], 2)) : F(h).isAudio(r) ? (w(), s("div", {
|
|
3223
3304
|
key: 1,
|
|
3224
3305
|
class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === F(h).resolvedActiveIndex.value ? U.value : ""])
|
|
3225
|
-
}, [c("div",
|
|
3306
|
+
}, [c("div", Kr, [
|
|
3226
3307
|
c("button", {
|
|
3227
3308
|
type: "button",
|
|
3228
3309
|
class: "relative grid h-full w-full place-items-center border border-white/12 bg-[linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02)),radial-gradient(circle_at_center,rgba(16,185,129,0.14),transparent_58%)] text-[#f7f1ea] transition-[border-color,background] duration-200 hover:border-white/30 hover:bg-[linear-gradient(180deg,rgba(255,255,255,0.07),rgba(255,255,255,0.03)),radial-gradient(circle_at_center,rgba(16,185,129,0.18),transparent_58%)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
|
|
@@ -3232,19 +3313,19 @@ var pr = {
|
|
|
3232
3313
|
}, [
|
|
3233
3314
|
n[7] ||= c("span", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(16,185,129,0.16),transparent_66%)]" }, null, -1),
|
|
3234
3315
|
n[8] ||= c("span", { class: "pointer-events-none absolute h-[clamp(220px,30vw,360px)] w-[clamp(220px,30vw,360px)] border border-white/8 bg-[radial-gradient(circle,rgba(255,255,255,0.08),transparent_62%)]" }, null, -1),
|
|
3235
|
-
c("span",
|
|
3316
|
+
c("span", Jr, [k(e.$slots, "item-icon", {
|
|
3236
3317
|
icon: F(Gt)(r.type),
|
|
3237
3318
|
item: r
|
|
3238
3319
|
}, () => [(w(), a(A(F(Gt)(r.type)), {
|
|
3239
3320
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3240
3321
|
"aria-hidden": "true"
|
|
3241
3322
|
}))])]),
|
|
3242
|
-
c("span",
|
|
3323
|
+
c("span", Yr, [(w(), a(A(F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(ue) : F(le)), {
|
|
3243
3324
|
class: "h-4 w-4 stroke-2",
|
|
3244
3325
|
"aria-hidden": "true"
|
|
3245
3326
|
}))])
|
|
3246
|
-
], 8,
|
|
3247
|
-
F(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
3327
|
+
], 8, qr),
|
|
3328
|
+
F(C).isAssetLoading(i, r) ? (w(), s("div", Xr, [c("span", Zr, [u(F(se), {
|
|
3248
3329
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3249
3330
|
"aria-hidden": "true"
|
|
3250
3331
|
})])])) : o("", !0),
|
|
@@ -3257,21 +3338,21 @@ var pr = {
|
|
|
3257
3338
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3258
3339
|
"aria-hidden": "true"
|
|
3259
3340
|
}),
|
|
3260
|
-
c("p",
|
|
3341
|
+
c("p", $r, M(F(C).getAssetErrorLabel(r)), 1),
|
|
3261
3342
|
F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
|
|
3262
3343
|
key: 0,
|
|
3263
3344
|
type: "button",
|
|
3264
3345
|
class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
|
|
3265
3346
|
onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
|
|
3266
|
-
}, " Retry ", 8,
|
|
3267
|
-
], 8,
|
|
3347
|
+
}, " Retry ", 8, ei)) : o("", !0)
|
|
3348
|
+
], 8, Qr)], 64)) : o("", !0)
|
|
3268
3349
|
]), (w(), s("audio", {
|
|
3269
3350
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3270
3351
|
src: F(C).getFullscreenMediaSource(i, r),
|
|
3271
3352
|
preload: F(C).getFullscreenMediaPreload(i),
|
|
3272
3353
|
class: "pointer-events-none absolute h-px w-px opacity-0",
|
|
3273
3354
|
ref_for: !0,
|
|
3274
|
-
ref: (e) =>
|
|
3355
|
+
ref: (e) => _e(F(C).getItemKey(r), e),
|
|
3275
3356
|
onCanplay: (e) => Z(i, r, e),
|
|
3276
3357
|
onDurationchange: (e) => Z(i, r, e),
|
|
3277
3358
|
onError: (e) => F(R).onFullscreenMediaError(i, r),
|
|
@@ -3285,14 +3366,14 @@ var pr = {
|
|
|
3285
3366
|
onStalled: (e) => Z(i, r, e),
|
|
3286
3367
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3287
3368
|
onWaiting: (e) => Z(i, r, e)
|
|
3288
|
-
}, null, 40,
|
|
3369
|
+
}, null, 40, ti))], 2)) : (w(), s("div", ni, [c("div", ri, [k(e.$slots, "item-icon", {
|
|
3289
3370
|
icon: F(Gt)(r.type),
|
|
3290
3371
|
item: r
|
|
3291
3372
|
}, () => [(w(), a(A(F(Gt)(r.type)), {
|
|
3292
3373
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3293
3374
|
"aria-hidden": "true"
|
|
3294
|
-
}))])])]))], 14,
|
|
3295
|
-
G.value && f["fullscreen-overlay"] ? (w(), s("div",
|
|
3375
|
+
}))])])]))], 14, Lr))), 128)),
|
|
3376
|
+
G.value && f["fullscreen-overlay"] ? (w(), s("div", ii, [c("div", ai, [k(e.$slots, "fullscreen-overlay", y(p(G.value)))])])) : o("", !0),
|
|
3296
3377
|
F(h).activeItem.value ? (w(), a(Ht, {
|
|
3297
3378
|
key: 1,
|
|
3298
3379
|
"current-index": F(h).resolvedActiveIndex.value,
|
|
@@ -3303,7 +3384,7 @@ var pr = {
|
|
|
3303
3384
|
title: F(h).activeItem.value.title ?? null,
|
|
3304
3385
|
total: F(h).items.value.length,
|
|
3305
3386
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
3306
|
-
}, l({ _: 2 }, [
|
|
3387
|
+
}, l({ _: 2 }, [J.value && G.value ? {
|
|
3307
3388
|
name: "actions",
|
|
3308
3389
|
fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(G.value)))]),
|
|
3309
3390
|
key: "0"
|
|
@@ -3316,7 +3397,7 @@ var pr = {
|
|
|
3316
3397
|
"title",
|
|
3317
3398
|
"total"
|
|
3318
3399
|
])) : o("", !0),
|
|
3319
|
-
u(
|
|
3400
|
+
u(jr, {
|
|
3320
3401
|
"active-index": F(h).resolvedActiveIndex.value,
|
|
3321
3402
|
items: F(h).items.value,
|
|
3322
3403
|
onSelect: n[1] ||= (e) => m("update:activeIndex", e)
|
|
@@ -3351,36 +3432,58 @@ var pr = {
|
|
|
3351
3432
|
"onVolumeInput",
|
|
3352
3433
|
"onVolumeToggle"
|
|
3353
3434
|
])) : o("", !0),
|
|
3354
|
-
|
|
3435
|
+
K.value ? (w(), s("div", {
|
|
3355
3436
|
key: 3,
|
|
3356
3437
|
class: v(["absolute left-1/2 z-[4] -translate-x-1/2", z.value])
|
|
3357
|
-
}, [
|
|
3438
|
+
}, [oe.value ? k(e.$slots, "fullscreen-status", y(g({ key: 0 }, K.value))) : (w(), s("div", {
|
|
3358
3439
|
key: 1,
|
|
3359
3440
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
3360
|
-
class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center",
|
|
3361
|
-
}, M(
|
|
3362
|
-
])) :
|
|
3363
|
-
|
|
3364
|
-
"
|
|
3365
|
-
|
|
3441
|
+
class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", K.value.kind === "end" ? "border-amber-300/35 text-amber-200" : K.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
3442
|
+
}, M(K.value.message), 3))], 2)) : o("", !0)
|
|
3443
|
+
])) : W.value ? (w(), a($n, {
|
|
3444
|
+
key: 1,
|
|
3445
|
+
"fill-collected-count": d.fillCollectedCount,
|
|
3446
|
+
"fill-completed-calls": d.fillCompletedCalls,
|
|
3447
|
+
"fill-loaded-count": d.fillLoadedCount,
|
|
3448
|
+
"fill-mode": d.fillMode,
|
|
3449
|
+
"fill-progress": d.fillProgress,
|
|
3450
|
+
"fill-target-calls": d.fillTargetCalls,
|
|
3451
|
+
"fill-target-count": d.fillTargetCount,
|
|
3452
|
+
"fill-total-count": d.fillTotalCount,
|
|
3453
|
+
"has-next-page": d.hasNextPage,
|
|
3454
|
+
phase: d.phase,
|
|
3455
|
+
"status-message": F(h).statusMessage.value
|
|
3456
|
+
}, null, 8, [
|
|
3457
|
+
"fill-collected-count",
|
|
3458
|
+
"fill-completed-calls",
|
|
3459
|
+
"fill-loaded-count",
|
|
3460
|
+
"fill-mode",
|
|
3461
|
+
"fill-progress",
|
|
3462
|
+
"fill-target-calls",
|
|
3463
|
+
"fill-target-count",
|
|
3464
|
+
"fill-total-count",
|
|
3465
|
+
"has-next-page",
|
|
3466
|
+
"phase",
|
|
3467
|
+
"status-message"
|
|
3468
|
+
])) : F(pe) && F(X) ? (w(), a(Pr, {
|
|
3366
3469
|
key: 2,
|
|
3367
3470
|
message: F(X).message,
|
|
3368
3471
|
mode: F(X).mode,
|
|
3369
3472
|
surface: F(X).surface
|
|
3370
3473
|
}, {
|
|
3371
|
-
default: B(() => [F(
|
|
3474
|
+
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(X)))) : o("", !0)]),
|
|
3372
3475
|
_: 3
|
|
3373
3476
|
}, 8, [
|
|
3374
3477
|
"message",
|
|
3375
3478
|
"mode",
|
|
3376
3479
|
"surface"
|
|
3377
|
-
])) : o("", !0), F(
|
|
3480
|
+
])) : o("", !0), F(ce) && F(X) ? (w(), a(Pr, {
|
|
3378
3481
|
key: 3,
|
|
3379
3482
|
message: F(X).message,
|
|
3380
3483
|
mode: F(X).mode,
|
|
3381
3484
|
surface: F(X).surface
|
|
3382
3485
|
}, {
|
|
3383
|
-
default: B(() => [F(
|
|
3486
|
+
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(X)))) : o("", !0)]),
|
|
3384
3487
|
_: 3
|
|
3385
3488
|
}, 8, [
|
|
3386
3489
|
"message",
|
|
@@ -3394,7 +3497,7 @@ var pr = {
|
|
|
3394
3497
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3395
3498
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3396
3499
|
}, {
|
|
3397
|
-
default: B(() => [
|
|
3500
|
+
default: B(() => [ie.value && G.value ? (w(), s("aside", oi, [c("div", si, [k(e.$slots, "fullscreen-aside", y(p(G.value)))])])) : o("", !0)]),
|
|
3398
3501
|
_: 3
|
|
3399
3502
|
})], 4),
|
|
3400
3503
|
u(r, {
|
|
@@ -3405,7 +3508,7 @@ var pr = {
|
|
|
3405
3508
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3406
3509
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3407
3510
|
}, {
|
|
3408
|
-
default: B(() => [
|
|
3511
|
+
default: B(() => [ae.value && G.value ? (w(), s("aside", ci, [c("div", li, [k(e.$slots, "fullscreen-aside", y(p(G.value)))])])) : o("", !0)]),
|
|
3409
3512
|
_: 3
|
|
3410
3513
|
})
|
|
3411
3514
|
]));
|
|
@@ -3413,10 +3516,10 @@ var pr = {
|
|
|
3413
3516
|
});
|
|
3414
3517
|
//#endregion
|
|
3415
3518
|
//#region src/components/viewer-core/masonryLayoutState.ts
|
|
3416
|
-
function
|
|
3519
|
+
function pi(e) {
|
|
3417
3520
|
let t = j([]), n = j([]), r = j(/* @__PURE__ */ new Map()), i = j(0), a = j(/* @__PURE__ */ new Map()), o = j([]);
|
|
3418
3521
|
function s(s, c, l) {
|
|
3419
|
-
let u =
|
|
3522
|
+
let u = or(s, {
|
|
3420
3523
|
columnCount: c,
|
|
3421
3524
|
columnWidth: l,
|
|
3422
3525
|
gapX: e.gapPx,
|
|
@@ -3426,7 +3529,7 @@ function ci(e) {
|
|
|
3426
3529
|
t.value = u.positions.map(d), n.value = u.heights, r.value = u.buckets, i.value = u.contentHeight, a.value = u.indexById, o.value = u.columnHeights;
|
|
3427
3530
|
}
|
|
3428
3531
|
function c(s, c, l, d) {
|
|
3429
|
-
i.value =
|
|
3532
|
+
i.value = sr(u(), s, {
|
|
3430
3533
|
columnCount: l,
|
|
3431
3534
|
columnWidth: d,
|
|
3432
3535
|
gapX: e.gapPx,
|
|
@@ -3438,7 +3541,7 @@ function ci(e) {
|
|
|
3438
3541
|
}).contentHeight, P(t), P(n), P(r), P(a), P(o);
|
|
3439
3542
|
}
|
|
3440
3543
|
function l(e, n, r, i) {
|
|
3441
|
-
return
|
|
3544
|
+
return lr({
|
|
3442
3545
|
addedItems: r.addedItems,
|
|
3443
3546
|
columnCount: i,
|
|
3444
3547
|
columnHeights: o.value,
|
|
@@ -3479,21 +3582,21 @@ function ci(e) {
|
|
|
3479
3582
|
}
|
|
3480
3583
|
//#endregion
|
|
3481
3584
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
3482
|
-
var
|
|
3483
|
-
function
|
|
3585
|
+
var mi = 300, hi = 600, gi = 40, _i = 300, vi = 400;
|
|
3586
|
+
function yi(e, t) {
|
|
3484
3587
|
return t === "top" ? [...e].reverse() : e;
|
|
3485
3588
|
}
|
|
3486
|
-
function
|
|
3487
|
-
return e <= 0 ?
|
|
3589
|
+
function bi(e) {
|
|
3590
|
+
return e <= 0 ? hi : hi + Math.min((e - 1) * gi, vi);
|
|
3488
3591
|
}
|
|
3489
|
-
function
|
|
3490
|
-
return
|
|
3592
|
+
function xi() {
|
|
3593
|
+
return _i;
|
|
3491
3594
|
}
|
|
3492
|
-
function
|
|
3595
|
+
function Si(e) {
|
|
3493
3596
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
3494
3597
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
3495
3598
|
}
|
|
3496
|
-
function
|
|
3599
|
+
function Ci(e) {
|
|
3497
3600
|
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()));
|
|
3498
3601
|
z(e.visibleIndices, (i) => {
|
|
3499
3602
|
if (!i.length) return;
|
|
@@ -3503,20 +3606,20 @@ function vi(e) {
|
|
|
3503
3606
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
3504
3607
|
}
|
|
3505
3608
|
if (!o.length) return;
|
|
3506
|
-
let s =
|
|
3507
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
3508
|
-
r.value = c,
|
|
3609
|
+
let s = yi(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
3610
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * gi, vi));
|
|
3611
|
+
r.value = c, wi(() => {
|
|
3509
3612
|
let e = new Set(n.value);
|
|
3510
3613
|
for (let t of o) e.add(t);
|
|
3511
3614
|
n.value = e;
|
|
3512
|
-
}),
|
|
3615
|
+
}), Ti(() => {
|
|
3513
3616
|
let e = new Set(t.value);
|
|
3514
3617
|
for (let t of o) e.delete(t);
|
|
3515
3618
|
t.value = e, S(() => {
|
|
3516
3619
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
3517
3620
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
3518
3621
|
n.value = e, r.value = t, a.value = i;
|
|
3519
|
-
},
|
|
3622
|
+
}, bi(o.length));
|
|
3520
3623
|
});
|
|
3521
3624
|
}, { flush: "post" }), z(() => e.items.value.map((e) => $(e)), (e) => {
|
|
3522
3625
|
if (!e.length || !o.value.size) return;
|
|
@@ -3543,7 +3646,7 @@ function vi(e) {
|
|
|
3543
3646
|
let e = $(t.item);
|
|
3544
3647
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
3545
3648
|
}
|
|
3546
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
3649
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, wi(() => {
|
|
3547
3650
|
let e = new Set(s.value);
|
|
3548
3651
|
for (let t of p) e.add(t);
|
|
3549
3652
|
s.value = e;
|
|
@@ -3551,9 +3654,9 @@ function vi(e) {
|
|
|
3551
3654
|
let e = new Map(o.value), t = new Set(s.value);
|
|
3552
3655
|
for (let n of p) e.delete(n), t.delete(n);
|
|
3553
3656
|
o.value = e, s.value = t;
|
|
3554
|
-
},
|
|
3657
|
+
}, _i);
|
|
3555
3658
|
}
|
|
3556
|
-
function g(t, n, r =
|
|
3659
|
+
function g(t, n, r = mi) {
|
|
3557
3660
|
if (!t.size) return;
|
|
3558
3661
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
3559
3662
|
for (let [r, o] of t.entries()) {
|
|
@@ -3572,8 +3675,8 @@ function vi(e) {
|
|
|
3572
3675
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
3573
3676
|
let o = new Map(l.value);
|
|
3574
3677
|
for (let e of a) o.set(e, r);
|
|
3575
|
-
l.value = o,
|
|
3576
|
-
u.value = new Set(a),
|
|
3678
|
+
l.value = o, wi(() => {
|
|
3679
|
+
u.value = new Set(a), wi(() => {
|
|
3577
3680
|
c.value = /* @__PURE__ */ new Map();
|
|
3578
3681
|
});
|
|
3579
3682
|
}), S(() => {
|
|
@@ -3584,8 +3687,8 @@ function vi(e) {
|
|
|
3584
3687
|
}, r);
|
|
3585
3688
|
}
|
|
3586
3689
|
function _(e) {
|
|
3587
|
-
if (n.value.has(e)) return `transform ${
|
|
3588
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
3690
|
+
if (n.value.has(e)) return `transform ${hi}ms ease-out`;
|
|
3691
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? mi}ms ease-out`;
|
|
3589
3692
|
}
|
|
3590
3693
|
function v(e) {
|
|
3591
3694
|
if (!n.value.has(e)) return;
|
|
@@ -3602,7 +3705,7 @@ function vi(e) {
|
|
|
3602
3705
|
} : {
|
|
3603
3706
|
dx: 0,
|
|
3604
3707
|
dy: 0
|
|
3605
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
3708
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Si({
|
|
3606
3709
|
columnWidth: e.columnWidth.value,
|
|
3607
3710
|
direction: u,
|
|
3608
3711
|
itemHeight: o,
|
|
@@ -3616,14 +3719,14 @@ function vi(e) {
|
|
|
3616
3719
|
if (!r) return {
|
|
3617
3720
|
opacity: "0",
|
|
3618
3721
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
3619
|
-
transition: `opacity ${
|
|
3722
|
+
transition: `opacity ${_i}ms ease-out, transform ${_i}ms ease-out`
|
|
3620
3723
|
};
|
|
3621
3724
|
let i = s.value.has(n);
|
|
3622
3725
|
return {
|
|
3623
3726
|
height: `${r.height}px`,
|
|
3624
3727
|
opacity: i ? "0" : "1",
|
|
3625
3728
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
3626
|
-
transition: `opacity ${
|
|
3729
|
+
transition: `opacity ${_i}ms ease-out, transform ${_i}ms ease-out`,
|
|
3627
3730
|
width: `${e.columnWidth.value}px`
|
|
3628
3731
|
};
|
|
3629
3732
|
}
|
|
@@ -3644,28 +3747,28 @@ function vi(e) {
|
|
|
3644
3747
|
playFlipMoveAnimation: g
|
|
3645
3748
|
};
|
|
3646
3749
|
}
|
|
3647
|
-
function
|
|
3750
|
+
function wi(e) {
|
|
3648
3751
|
if (typeof requestAnimationFrame == "function") {
|
|
3649
3752
|
requestAnimationFrame(() => e());
|
|
3650
3753
|
return;
|
|
3651
3754
|
}
|
|
3652
3755
|
setTimeout(e, 0);
|
|
3653
3756
|
}
|
|
3654
|
-
function
|
|
3655
|
-
|
|
3757
|
+
function Ti(e) {
|
|
3758
|
+
wi(() => wi(e));
|
|
3656
3759
|
}
|
|
3657
3760
|
//#endregion
|
|
3658
3761
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
3659
|
-
function
|
|
3762
|
+
function Ei(e, t) {
|
|
3660
3763
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
3661
3764
|
}
|
|
3662
|
-
function
|
|
3765
|
+
function Di(e, t, n) {
|
|
3663
3766
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
3664
3767
|
}
|
|
3665
|
-
function
|
|
3768
|
+
function Oi(e, t, n, r) {
|
|
3666
3769
|
return Math.max(e?.scrollHeight ?? 0, r) - (t + n);
|
|
3667
3770
|
}
|
|
3668
|
-
function
|
|
3771
|
+
function ki(e, t) {
|
|
3669
3772
|
return {
|
|
3670
3773
|
height: `${e}px`,
|
|
3671
3774
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -3673,11 +3776,11 @@ function wi(e, t) {
|
|
|
3673
3776
|
}
|
|
3674
3777
|
//#endregion
|
|
3675
3778
|
//#region src/components/viewer-core/masonryScrollBehavior.ts
|
|
3676
|
-
var
|
|
3677
|
-
function
|
|
3779
|
+
var Ai = 24, ji = 48;
|
|
3780
|
+
function Mi(e) {
|
|
3678
3781
|
let t = D(0), n = 0, r = 0;
|
|
3679
3782
|
function i(e) {
|
|
3680
|
-
if (t.value =
|
|
3783
|
+
if (t.value = Li(e), t.value <= 0) {
|
|
3681
3784
|
o();
|
|
3682
3785
|
return;
|
|
3683
3786
|
}
|
|
@@ -3697,7 +3800,7 @@ function Di(e) {
|
|
|
3697
3800
|
let s = e.getViewport();
|
|
3698
3801
|
if (s && r > 0) {
|
|
3699
3802
|
let n = Math.min(Math.max(0, i - r), 250), a = t.value * n / 1e3;
|
|
3700
|
-
s.scrollTop =
|
|
3803
|
+
s.scrollTop = Ri(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
|
|
3701
3804
|
}
|
|
3702
3805
|
r = i, a();
|
|
3703
3806
|
}
|
|
@@ -3707,44 +3810,44 @@ function Di(e) {
|
|
|
3707
3810
|
stop: o
|
|
3708
3811
|
};
|
|
3709
3812
|
}
|
|
3710
|
-
function
|
|
3813
|
+
function Ni(e) {
|
|
3711
3814
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3712
3815
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3713
|
-
return t <= 0 ? 1 :
|
|
3816
|
+
return t <= 0 ? 1 : Ri(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3714
3817
|
}
|
|
3715
|
-
function
|
|
3818
|
+
function Pi(e) {
|
|
3716
3819
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3717
3820
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3718
|
-
return t <= 0 ? 1 :
|
|
3821
|
+
return t <= 0 ? 1 : Ri(e.progressDistancePx / t, 0, 1);
|
|
3719
3822
|
}
|
|
3720
|
-
function
|
|
3721
|
-
let t = i(() => Math.max(0, e.viewportHeight.value -
|
|
3823
|
+
function Fi(e) {
|
|
3824
|
+
let t = i(() => Math.max(0, e.viewportHeight.value - Ai * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
|
|
3722
3825
|
if (!n.value) return 0;
|
|
3723
3826
|
let r = e.viewportHeight.value / e.containerHeight.value * t.value;
|
|
3724
|
-
return Math.min(t.value, Math.max(
|
|
3827
|
+
return Math.min(t.value, Math.max(ji, r));
|
|
3725
3828
|
}), a = i(() => {
|
|
3726
|
-
if (!n.value) return
|
|
3829
|
+
if (!n.value) return Ai;
|
|
3727
3830
|
let i = Math.max(0, e.containerHeight.value - e.viewportHeight.value);
|
|
3728
|
-
return
|
|
3831
|
+
return Ai + Math.max(0, t.value - r.value) * (i > 0 ? Ri(e.scrollTop.value / i, 0, 1) : 0);
|
|
3729
3832
|
});
|
|
3730
3833
|
return {
|
|
3731
|
-
getScrollbarThumbStyle: () =>
|
|
3834
|
+
getScrollbarThumbStyle: () => ki(r.value, a.value),
|
|
3732
3835
|
showScrollbar: n
|
|
3733
3836
|
};
|
|
3734
3837
|
}
|
|
3735
|
-
function
|
|
3838
|
+
function Ii(e) {
|
|
3736
3839
|
return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3737
3840
|
}
|
|
3738
|
-
function
|
|
3841
|
+
function Li(e) {
|
|
3739
3842
|
return Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3740
3843
|
}
|
|
3741
|
-
function
|
|
3844
|
+
function Ri(e, t, n) {
|
|
3742
3845
|
return Math.min(Math.max(e, t), n);
|
|
3743
3846
|
}
|
|
3744
3847
|
//#endregion
|
|
3745
3848
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
3746
|
-
var
|
|
3747
|
-
function
|
|
3849
|
+
var zi = 250, Bi = 1e3;
|
|
3850
|
+
function Vi(e) {
|
|
3748
3851
|
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;
|
|
3749
3852
|
x(() => {
|
|
3750
3853
|
S();
|
|
@@ -3767,7 +3870,7 @@ function Ii(e) {
|
|
|
3767
3870
|
if (!C(t) || !e.isAtBoundary()) return;
|
|
3768
3871
|
let n = Date.now();
|
|
3769
3872
|
if (!(n < c)) {
|
|
3770
|
-
if (c = n +
|
|
3873
|
+
if (c = n + zi, a.value) {
|
|
3771
3874
|
s.value = !0;
|
|
3772
3875
|
return;
|
|
3773
3876
|
}
|
|
@@ -3806,7 +3909,7 @@ function Ii(e) {
|
|
|
3806
3909
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3807
3910
|
}
|
|
3808
3911
|
function v() {
|
|
3809
|
-
o.value = !1, y(
|
|
3912
|
+
o.value = !1, y(Bi);
|
|
3810
3913
|
}
|
|
3811
3914
|
function y(e) {
|
|
3812
3915
|
S(), a.value = !0, l = setTimeout(() => {
|
|
@@ -3838,7 +3941,7 @@ function Ii(e) {
|
|
|
3838
3941
|
}
|
|
3839
3942
|
//#endregion
|
|
3840
3943
|
//#region src/components/viewer-core/masonryBoundaryLock.ts
|
|
3841
|
-
function
|
|
3944
|
+
function Hi() {
|
|
3842
3945
|
let e = D(!1), t = null;
|
|
3843
3946
|
x(() => {
|
|
3844
3947
|
r();
|
|
@@ -3859,8 +3962,8 @@ function Li() {
|
|
|
3859
3962
|
}
|
|
3860
3963
|
//#endregion
|
|
3861
3964
|
//#region src/components/viewer-core/masonryItemMutation.ts
|
|
3862
|
-
function
|
|
3863
|
-
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r =
|
|
3965
|
+
function Ui(e) {
|
|
3966
|
+
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r = Gi(e.previousItems, e.layoutIndexById, e.layoutHeights), i = Ki(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has($(e))), c = Wi(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;
|
|
3864
3967
|
return {
|
|
3865
3968
|
addedItems: s,
|
|
3866
3969
|
anchorId: d ? $(d) : null,
|
|
@@ -3872,7 +3975,7 @@ function Ri(e) {
|
|
|
3872
3975
|
shouldResetScrollForEmptyRemoval: e.currentItems.length === 0 && e.previousItems.length > 0 && c.length > 0 && e.scrollTop > 0
|
|
3873
3976
|
};
|
|
3874
3977
|
}
|
|
3875
|
-
function
|
|
3978
|
+
function Wi(e, t, n, r) {
|
|
3876
3979
|
return e.flatMap((e) => {
|
|
3877
3980
|
let i = $(e);
|
|
3878
3981
|
if (t.has(i)) return [];
|
|
@@ -3884,7 +3987,7 @@ function zi(e, t, n, r) {
|
|
|
3884
3987
|
}] : [];
|
|
3885
3988
|
});
|
|
3886
3989
|
}
|
|
3887
|
-
function
|
|
3990
|
+
function Gi(e, t, n) {
|
|
3888
3991
|
let r = /* @__PURE__ */ new Map();
|
|
3889
3992
|
for (let i of e) {
|
|
3890
3993
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3892,7 +3995,7 @@ function Bi(e, t, n) {
|
|
|
3892
3995
|
}
|
|
3893
3996
|
return r;
|
|
3894
3997
|
}
|
|
3895
|
-
function
|
|
3998
|
+
function Ki(e, t, n) {
|
|
3896
3999
|
let r = /* @__PURE__ */ new Map();
|
|
3897
4000
|
for (let i of e) {
|
|
3898
4001
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3902,7 +4005,7 @@ function Vi(e, t, n) {
|
|
|
3902
4005
|
}
|
|
3903
4006
|
//#endregion
|
|
3904
4007
|
//#region src/components/viewer-core/masonryPendingAppend.ts
|
|
3905
|
-
function
|
|
4008
|
+
function qi(e) {
|
|
3906
4009
|
let t = D(null), n = D(!1), r = null;
|
|
3907
4010
|
function i() {
|
|
3908
4011
|
o(), e.pendingAppendItems.value.length && (t.value = c([...e.items.value, ...e.pendingAppendItems.value]), s());
|
|
@@ -3925,12 +4028,12 @@ function Hi(e) {
|
|
|
3925
4028
|
}, 300));
|
|
3926
4029
|
}
|
|
3927
4030
|
function c(t) {
|
|
3928
|
-
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ?
|
|
4031
|
+
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? cr(e.pendingAppendItems.value, {
|
|
3929
4032
|
columnHeights: e.columnHeights.value,
|
|
3930
4033
|
columnWidth: e.columnWidth.value,
|
|
3931
4034
|
contentHeight: e.contentHeight.value,
|
|
3932
4035
|
gapY: e.gapPx
|
|
3933
|
-
}) + e.contentInsetPx * 2 :
|
|
4036
|
+
}) + e.contentInsetPx * 2 : or(t, {
|
|
3934
4037
|
bucketPx: e.bucketPx,
|
|
3935
4038
|
columnCount: e.columnCount.value,
|
|
3936
4039
|
columnWidth: e.columnWidth.value,
|
|
@@ -3947,42 +4050,42 @@ function Hi(e) {
|
|
|
3947
4050
|
}
|
|
3948
4051
|
//#endregion
|
|
3949
4052
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
3950
|
-
var
|
|
3951
|
-
function
|
|
3952
|
-
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth ||
|
|
3953
|
-
bucketPx:
|
|
3954
|
-
contentInsetPx:
|
|
3955
|
-
gapPx:
|
|
3956
|
-
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m =
|
|
4053
|
+
var Ji = 600, Yi = 24, Xi = 16, Zi = 300, Qi = 200, $i = 0, ea = 1, ta = Yi + Xi, na = 200, ra = 500, ia = 1e3;
|
|
4054
|
+
function aa(e) {
|
|
4055
|
+
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Zi), o = pi({
|
|
4056
|
+
bucketPx: Ji,
|
|
4057
|
+
contentInsetPx: Yi,
|
|
4058
|
+
gapPx: Xi
|
|
4059
|
+
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Hi(), h = i(() => Math.max(Zi, a.value - Yi * 2)), g = i(() => rr(h.value, Zi)), v = i(() => ir(h.value, g.value, Zi, Xi)), y = i(() => Ii(e.bottomLoadBufferPx.value)), b = i(() => oa(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => ur({
|
|
3957
4060
|
itemCount: e.items.value.length,
|
|
3958
4061
|
viewportHeight: r.value,
|
|
3959
4062
|
scrollTop: n.value,
|
|
3960
|
-
overscanPx:
|
|
3961
|
-
bucketPx:
|
|
4063
|
+
overscanPx: Qi,
|
|
4064
|
+
bucketPx: Ji,
|
|
3962
4065
|
buckets: s.value
|
|
3963
4066
|
})), w = i(() => C.value.map((t) => ({
|
|
3964
4067
|
item: e.items.value[t],
|
|
3965
4068
|
index: t
|
|
3966
4069
|
}))), T = i(() => {
|
|
3967
|
-
let e = l.value +
|
|
3968
|
-
return Math.max(e, t, r.value) +
|
|
3969
|
-
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() =>
|
|
4070
|
+
let e = l.value + Yi * 2, t = I.reservedContentHeight.value ?? 0;
|
|
4071
|
+
return Math.max(e, t, r.value) + na + y.value;
|
|
4072
|
+
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Pi({
|
|
3970
4073
|
active: e.active.value,
|
|
3971
4074
|
maxScrollTop: Y(),
|
|
3972
4075
|
progressDistancePx: n.value,
|
|
3973
|
-
thresholdPx:
|
|
4076
|
+
thresholdPx: $i,
|
|
3974
4077
|
triggerEnabled: E.value
|
|
3975
|
-
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() =>
|
|
4078
|
+
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() => Ni({
|
|
3976
4079
|
active: e.active.value,
|
|
3977
4080
|
maxScrollTop: Y(),
|
|
3978
4081
|
progressDistancePx: n.value,
|
|
3979
|
-
thresholdPx:
|
|
4082
|
+
thresholdPx: ta,
|
|
3980
4083
|
triggerEnabled: e.hasPreviousPage.value
|
|
3981
|
-
})), j =
|
|
4084
|
+
})), j = Fi({
|
|
3982
4085
|
containerHeight: T,
|
|
3983
4086
|
scrollTop: n,
|
|
3984
4087
|
viewportHeight: r
|
|
3985
|
-
}), M =
|
|
4088
|
+
}), M = Ci({
|
|
3986
4089
|
items: e.items,
|
|
3987
4090
|
visibleIndices: C,
|
|
3988
4091
|
positions: f,
|
|
@@ -3991,44 +4094,44 @@ function ea(e) {
|
|
|
3991
4094
|
columnWidth: v,
|
|
3992
4095
|
scrollTop: n,
|
|
3993
4096
|
viewportHeight: r
|
|
3994
|
-
}), N =
|
|
4097
|
+
}), N = Vi({
|
|
3995
4098
|
direction: "top",
|
|
3996
4099
|
getAnimationLockMs(e) {
|
|
3997
|
-
return Math.max(
|
|
4100
|
+
return Math.max(ra, bi(e)) + ia;
|
|
3998
4101
|
},
|
|
3999
4102
|
hasPage: e.hasPreviousPage,
|
|
4000
4103
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4001
4104
|
isAtBoundary() {
|
|
4002
|
-
return n.value <=
|
|
4105
|
+
return n.value <= ta;
|
|
4003
4106
|
},
|
|
4004
4107
|
loading: e.loading,
|
|
4005
4108
|
requestPage: e.requestPreviousPage
|
|
4006
|
-
}), P =
|
|
4109
|
+
}), P = Vi({
|
|
4007
4110
|
direction: "bottom",
|
|
4008
4111
|
getAnimationLockMs(e) {
|
|
4009
|
-
return
|
|
4112
|
+
return bi(e) + ia;
|
|
4010
4113
|
},
|
|
4011
4114
|
hasPage: E,
|
|
4012
4115
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4013
4116
|
isAtBoundary() {
|
|
4014
|
-
return J() <=
|
|
4117
|
+
return J() <= ea;
|
|
4015
4118
|
},
|
|
4016
4119
|
loading: e.loading,
|
|
4017
4120
|
requestPage: e.requestNextPage
|
|
4018
|
-
}), F =
|
|
4121
|
+
}), F = Mi({
|
|
4019
4122
|
active: e.active,
|
|
4020
4123
|
getMaxScrollTop: Y,
|
|
4021
4124
|
getViewport: () => t.value,
|
|
4022
4125
|
onScroll: ee
|
|
4023
|
-
}), I =
|
|
4024
|
-
bucketPx:
|
|
4126
|
+
}), I = qi({
|
|
4127
|
+
bucketPx: Ji,
|
|
4025
4128
|
columnHeights: c,
|
|
4026
4129
|
columnCount: g,
|
|
4027
4130
|
columnWidth: v,
|
|
4028
4131
|
commitPendingAppend: e.commitPendingAppend,
|
|
4029
4132
|
contentHeight: l,
|
|
4030
|
-
contentInsetPx:
|
|
4031
|
-
gapPx:
|
|
4133
|
+
contentInsetPx: Yi,
|
|
4134
|
+
gapPx: Xi,
|
|
4032
4135
|
items: e.items,
|
|
4033
4136
|
pendingAppendItems: e.pendingAppendItems
|
|
4034
4137
|
}), L = null, R = 0;
|
|
@@ -4037,20 +4140,20 @@ function ea(e) {
|
|
|
4037
4140
|
g,
|
|
4038
4141
|
v
|
|
4039
4142
|
], async ([t], [r = []]) => {
|
|
4040
|
-
let i =
|
|
4143
|
+
let i = Ui({
|
|
4041
4144
|
activeIndex: b.value,
|
|
4042
|
-
contentInsetPx:
|
|
4145
|
+
contentInsetPx: Yi,
|
|
4043
4146
|
currentItems: t,
|
|
4044
|
-
gapPx:
|
|
4147
|
+
gapPx: Xi,
|
|
4045
4148
|
layoutHeights: u.value,
|
|
4046
4149
|
layoutIndexById: d.value,
|
|
4047
4150
|
layoutPositions: f.value,
|
|
4048
4151
|
previousItems: r ?? [],
|
|
4049
4152
|
scrollTop: n.value
|
|
4050
4153
|
});
|
|
4051
|
-
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(
|
|
4154
|
+
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(xi() + ia), i.shouldResetScrollForEmptyRemoval && W();
|
|
4052
4155
|
let a = r ?? [];
|
|
4053
|
-
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 ?
|
|
4156
|
+
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 ? ra : void 0), i.anchorId ? (await _(), U(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && te();
|
|
4054
4157
|
}, { immediate: !0 }), z([
|
|
4055
4158
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
4056
4159
|
g,
|
|
@@ -4064,20 +4167,20 @@ function ea(e) {
|
|
|
4064
4167
|
}
|
|
4065
4168
|
if (F.start(), !a || i !== !1 || p.value == null) return;
|
|
4066
4169
|
await _();
|
|
4067
|
-
let o = Math.max(0, T.value - r.value), s =
|
|
4170
|
+
let o = Math.max(0, T.value - r.value), s = oa(p.value, 0, o);
|
|
4068
4171
|
a.scrollTop = s, n.value = s, N.syncBoundary(), P.syncBoundary();
|
|
4069
4172
|
}), z(() => e.loading.value, async (e) => {
|
|
4070
4173
|
I.clearReservedHeightWhenIdle(e), N.onLoadingChange(e), P.onLoadingChange(e), await _();
|
|
4071
4174
|
}), S(async () => {
|
|
4072
|
-
K(), await _(), b.value > 0 ? H(b.value, "center") :
|
|
4175
|
+
K(), await _(), b.value > 0 ? H(b.value, "center") : G(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
|
|
4073
4176
|
K();
|
|
4074
4177
|
}), t.value && L.observe(t.value)) : window.addEventListener("resize", K);
|
|
4075
4178
|
}), x(() => {
|
|
4076
4179
|
L?.disconnect(), L = null, window.removeEventListener("resize", K), I.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), R &&= (cancelAnimationFrame(R), 0), F.stop();
|
|
4077
4180
|
});
|
|
4078
4181
|
function ee() {
|
|
4079
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(), N.syncBoundary("scroll"), P.syncBoundary("scroll"), ne(), !
|
|
4080
|
-
R = 0,
|
|
4182
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(), N.syncBoundary("scroll"), P.syncBoundary("scroll"), ne(), !te() && (R ||= requestAnimationFrame(() => {
|
|
4183
|
+
R = 0, G();
|
|
4081
4184
|
})));
|
|
4082
4185
|
}
|
|
4083
4186
|
function B(t) {
|
|
@@ -4097,7 +4200,7 @@ function ea(e) {
|
|
|
4097
4200
|
let a = t.value, o = f.value[e], s = u.value[e];
|
|
4098
4201
|
if (!a || !o || !s) return;
|
|
4099
4202
|
let c = a.scrollTop, l = Math.max(0, T.value - r.value);
|
|
4100
|
-
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y -
|
|
4203
|
+
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Yi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Yi), a.scrollTop = oa(c, 0, l), n.value = a.scrollTop, G();
|
|
4101
4204
|
}
|
|
4102
4205
|
function U(e, r) {
|
|
4103
4206
|
let i = t.value, a = r.get(e), o = d.value.get(e), s = o == null ? null : f.value[o];
|
|
@@ -4105,7 +4208,7 @@ function ea(e) {
|
|
|
4105
4208
|
let c = s.y - a.y;
|
|
4106
4209
|
i.scrollTop += c, n.value = i.scrollTop;
|
|
4107
4210
|
}
|
|
4108
|
-
function
|
|
4211
|
+
function W() {
|
|
4109
4212
|
let e = t.value;
|
|
4110
4213
|
if (!e) {
|
|
4111
4214
|
n.value = 0;
|
|
@@ -4113,8 +4216,8 @@ function ea(e) {
|
|
|
4113
4216
|
}
|
|
4114
4217
|
e.scrollTop = 0, n.value = 0, N.syncBoundary(), P.syncBoundary();
|
|
4115
4218
|
}
|
|
4116
|
-
function
|
|
4117
|
-
if (!C.value.length ||
|
|
4219
|
+
function G() {
|
|
4220
|
+
if (!C.value.length || te()) return;
|
|
4118
4221
|
let t = n.value + r.value / 2, i = b.value, a = Infinity;
|
|
4119
4222
|
for (let e of C.value) {
|
|
4120
4223
|
let n = f.value[e], r = u.value[e];
|
|
@@ -4124,8 +4227,8 @@ function ea(e) {
|
|
|
4124
4227
|
}
|
|
4125
4228
|
e.setActiveIndex(i);
|
|
4126
4229
|
}
|
|
4127
|
-
function
|
|
4128
|
-
let t = n.value <=
|
|
4230
|
+
function te() {
|
|
4231
|
+
let t = n.value <= ta, r = J() <= ea;
|
|
4129
4232
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
4130
4233
|
}
|
|
4131
4234
|
function ne() {
|
|
@@ -4135,13 +4238,13 @@ function ea(e) {
|
|
|
4135
4238
|
r.value = q(), a.value = re();
|
|
4136
4239
|
}
|
|
4137
4240
|
function q() {
|
|
4138
|
-
return
|
|
4241
|
+
return Ei(t.value, r.value);
|
|
4139
4242
|
}
|
|
4140
4243
|
function re() {
|
|
4141
|
-
return
|
|
4244
|
+
return Di(t.value, a.value, Zi);
|
|
4142
4245
|
}
|
|
4143
4246
|
function J() {
|
|
4144
|
-
return
|
|
4247
|
+
return Oi(t.value, n.value, r.value, T.value);
|
|
4145
4248
|
}
|
|
4146
4249
|
function Y() {
|
|
4147
4250
|
let e = Math.max(t.value?.scrollHeight ?? 0, T.value);
|
|
@@ -4167,17 +4270,17 @@ function ea(e) {
|
|
|
4167
4270
|
scrollViewportRef: t
|
|
4168
4271
|
};
|
|
4169
4272
|
}
|
|
4170
|
-
function
|
|
4273
|
+
function oa(e, t, n) {
|
|
4171
4274
|
return Math.min(Math.max(e, t), n);
|
|
4172
4275
|
}
|
|
4173
4276
|
//#endregion
|
|
4174
4277
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
4175
|
-
function
|
|
4278
|
+
function sa(e) {
|
|
4176
4279
|
if (e) try {
|
|
4177
4280
|
e.removeAttribute("src"), e.src = "";
|
|
4178
4281
|
} catch {}
|
|
4179
4282
|
}
|
|
4180
|
-
function
|
|
4283
|
+
function ca(e) {
|
|
4181
4284
|
if (e) {
|
|
4182
4285
|
try {
|
|
4183
4286
|
e.currentTime = 0;
|
|
@@ -4188,12 +4291,12 @@ function ra(e) {
|
|
|
4188
4291
|
} catch {}
|
|
4189
4292
|
}
|
|
4190
4293
|
}
|
|
4191
|
-
function
|
|
4294
|
+
function la(e, t) {
|
|
4192
4295
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
4193
4296
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
4194
4297
|
return e.bottom > 0 && e.top < n;
|
|
4195
4298
|
}
|
|
4196
|
-
function
|
|
4299
|
+
function ua(e) {
|
|
4197
4300
|
if (!e) return null;
|
|
4198
4301
|
try {
|
|
4199
4302
|
return new URL(e, window.location.href).href;
|
|
@@ -4203,9 +4306,9 @@ function aa(e) {
|
|
|
4203
4306
|
}
|
|
4204
4307
|
//#endregion
|
|
4205
4308
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
4206
|
-
function
|
|
4309
|
+
function da(e) {
|
|
4207
4310
|
let t = D(null), n = i(() => {
|
|
4208
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
4311
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? ua(e.item.value.healthCheck.url) : null;
|
|
4209
4312
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
4210
4313
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
4211
4314
|
z(n, (e, n) => {
|
|
@@ -4283,14 +4386,14 @@ function oa(e) {
|
|
|
4283
4386
|
}
|
|
4284
4387
|
//#endregion
|
|
4285
4388
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
4286
|
-
var
|
|
4389
|
+
var fa = ["aria-label"], pa = {
|
|
4287
4390
|
key: 0,
|
|
4288
4391
|
"data-testid": "vibe-list-card-spinner",
|
|
4289
4392
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
4290
|
-
},
|
|
4393
|
+
}, ma = { 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]" }, ha = ["src", "alt"], ga = ["src"], _a = ["data-kind"], va = { class: "grid justify-items-center gap-3 px-4 text-center" }, ya = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, ba = {
|
|
4291
4394
|
key: 4,
|
|
4292
4395
|
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))]"
|
|
4293
|
-
},
|
|
4396
|
+
}, xa = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Sa = { class: "pointer-events-none absolute inset-0 z-[3]" }, Ca = /* @__PURE__ */ d({
|
|
4294
4397
|
__name: "ListCard",
|
|
4295
4398
|
props: {
|
|
4296
4399
|
active: {
|
|
@@ -4314,9 +4417,9 @@ var sa = ["aria-label"], ca = {
|
|
|
4314
4417
|
},
|
|
4315
4418
|
emits: ["open"],
|
|
4316
4419
|
setup(e, { emit: t }) {
|
|
4317
|
-
let n = e, r = t, l = i(() =>
|
|
4420
|
+
let n = e, r = t, l = i(() => gr(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 = da({
|
|
4318
4421
|
attachedAssetUrl: E,
|
|
4319
|
-
getPriority:
|
|
4422
|
+
getPriority: ce,
|
|
4320
4423
|
isInView: d,
|
|
4321
4424
|
isReady: m,
|
|
4322
4425
|
item: i(() => n.item),
|
|
@@ -4357,10 +4460,10 @@ var sa = ["aria-label"], ca = {
|
|
|
4357
4460
|
}), x(() => {
|
|
4358
4461
|
re(), P.release(), B?.disconnect(), B = null;
|
|
4359
4462
|
});
|
|
4360
|
-
function
|
|
4463
|
+
function W() {
|
|
4361
4464
|
le(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
|
|
4362
4465
|
}
|
|
4363
|
-
async function
|
|
4466
|
+
async function G() {
|
|
4364
4467
|
if (!le(_.value)) return;
|
|
4365
4468
|
let e = E.value ?? n.item.url;
|
|
4366
4469
|
m.value = !1, g.value = "generic";
|
|
@@ -4373,7 +4476,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4373
4476
|
surface: "grid"
|
|
4374
4477
|
}), J();
|
|
4375
4478
|
}
|
|
4376
|
-
function
|
|
4479
|
+
function te() {
|
|
4377
4480
|
le(C.value) && (h.value = !0, m.value = !0, g.value = null, ie(E.value ?? n.item.url), J(), q());
|
|
4378
4481
|
}
|
|
4379
4482
|
function ne() {
|
|
@@ -4398,7 +4501,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4398
4501
|
}
|
|
4399
4502
|
V = Jt.request({
|
|
4400
4503
|
assetType: l.value.kind,
|
|
4401
|
-
getPriority:
|
|
4504
|
+
getPriority: ce,
|
|
4402
4505
|
onGrant() {
|
|
4403
4506
|
T.value = !0, m.value = !1, g.value = null;
|
|
4404
4507
|
},
|
|
@@ -4423,7 +4526,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4423
4526
|
}
|
|
4424
4527
|
}
|
|
4425
4528
|
function re(e = !0) {
|
|
4426
|
-
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (oe(),
|
|
4529
|
+
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (oe(), X()), J();
|
|
4427
4530
|
}
|
|
4428
4531
|
function J() {
|
|
4429
4532
|
V?.release(), V = null;
|
|
@@ -4434,7 +4537,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4434
4537
|
d.value = !0;
|
|
4435
4538
|
return;
|
|
4436
4539
|
}
|
|
4437
|
-
d.value =
|
|
4540
|
+
d.value = la(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
4438
4541
|
}
|
|
4439
4542
|
function ie(e) {
|
|
4440
4543
|
if (!e) return;
|
|
@@ -4454,12 +4557,12 @@ var sa = ["aria-label"], ca = {
|
|
|
4454
4557
|
}), g.value = null, m.value = !1, T.value = !1, J(), K();
|
|
4455
4558
|
}
|
|
4456
4559
|
function oe() {
|
|
4457
|
-
|
|
4458
|
-
}
|
|
4459
|
-
function se() {
|
|
4460
|
-
ra(C.value);
|
|
4560
|
+
sa(_.value);
|
|
4461
4561
|
}
|
|
4462
4562
|
function X() {
|
|
4563
|
+
ca(C.value);
|
|
4564
|
+
}
|
|
4565
|
+
function ce() {
|
|
4463
4566
|
let e = y.value;
|
|
4464
4567
|
if (!e) return Infinity;
|
|
4465
4568
|
let t = e.getBoundingClientRect();
|
|
@@ -4471,8 +4574,8 @@ var sa = ["aria-label"], ca = {
|
|
|
4471
4574
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
4472
4575
|
}
|
|
4473
4576
|
function le(e) {
|
|
4474
|
-
let t =
|
|
4475
|
-
return !e || !t ? !1 :
|
|
4577
|
+
let t = ua(E.value);
|
|
4578
|
+
return !e || !t ? !1 : ua("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
4476
4579
|
}
|
|
4477
4580
|
function ue() {
|
|
4478
4581
|
r("open");
|
|
@@ -4500,8 +4603,8 @@ var sa = ["aria-label"], ca = {
|
|
|
4500
4603
|
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]",
|
|
4501
4604
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
4502
4605
|
onClick: ue
|
|
4503
|
-
}, null, 8,
|
|
4504
|
-
ee.value ? (w(), s("div",
|
|
4606
|
+
}, null, 8, fa),
|
|
4607
|
+
ee.value ? (w(), s("div", pa, [c("span", ma, [u(F(se), {
|
|
4505
4608
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
4506
4609
|
"aria-hidden": "true"
|
|
4507
4610
|
})])])) : o("", !0),
|
|
@@ -4513,9 +4616,9 @@ var sa = ["aria-label"], ca = {
|
|
|
4513
4616
|
alt: l.value.label,
|
|
4514
4617
|
draggable: "false",
|
|
4515
4618
|
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"]),
|
|
4516
|
-
onLoad:
|
|
4517
|
-
onError:
|
|
4518
|
-
}, null, 42,
|
|
4619
|
+
onLoad: W,
|
|
4620
|
+
onError: G
|
|
4621
|
+
}, null, 42, ha)) : N.value && E.value && !L.value ? (w(), s("video", {
|
|
4519
4622
|
key: 2,
|
|
4520
4623
|
ref_key: "videoRef",
|
|
4521
4624
|
ref: C,
|
|
@@ -4525,37 +4628,37 @@ var sa = ["aria-label"], ca = {
|
|
|
4525
4628
|
playsinline: "",
|
|
4526
4629
|
preload: "metadata",
|
|
4527
4630
|
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"]),
|
|
4528
|
-
onCanplay:
|
|
4529
|
-
onError:
|
|
4631
|
+
onCanplay: te,
|
|
4632
|
+
onError: G,
|
|
4530
4633
|
onLoadstart: ne,
|
|
4531
|
-
onPlaying:
|
|
4634
|
+
onPlaying: te,
|
|
4532
4635
|
onStalled: ne,
|
|
4533
4636
|
onWaiting: ne
|
|
4534
|
-
}, null, 42,
|
|
4637
|
+
}, null, 42, ga)) : L.value ? (w(), s("div", {
|
|
4535
4638
|
key: 3,
|
|
4536
4639
|
"data-testid": "vibe-list-card-error",
|
|
4537
4640
|
"data-kind": I.value,
|
|
4538
4641
|
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))]"
|
|
4539
|
-
}, [c("div",
|
|
4642
|
+
}, [c("div", va, [
|
|
4540
4643
|
u(F(de), {
|
|
4541
4644
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4542
4645
|
"aria-hidden": "true"
|
|
4543
4646
|
}),
|
|
4544
|
-
c("span",
|
|
4647
|
+
c("span", ya, M(F(yn)(I.value)), 1),
|
|
4545
4648
|
R.value ? (w(), s("button", {
|
|
4546
4649
|
key: 0,
|
|
4547
4650
|
type: "button",
|
|
4548
4651
|
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",
|
|
4549
4652
|
onClick: H(ae, ["stop"])
|
|
4550
4653
|
}, " Retry ")) : o("", !0)
|
|
4551
|
-
])], 8,
|
|
4654
|
+
])], 8, _a)) : (w(), s("div", ba, [c("div", xa, [k(e.$slots, "item-icon", {
|
|
4552
4655
|
icon: F(Gt)(n.item.type),
|
|
4553
4656
|
item: n.item
|
|
4554
4657
|
}, () => [(w(), a(A(F(Gt)(n.item.type)), {
|
|
4555
4658
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4556
4659
|
"aria-hidden": "true"
|
|
4557
4660
|
}))])])])),
|
|
4558
|
-
c("div",
|
|
4661
|
+
c("div", Sa, [k(e.$slots, "grid-item-overlay", {
|
|
4559
4662
|
active: n.active,
|
|
4560
4663
|
focused: f.value,
|
|
4561
4664
|
hovered: p.value,
|
|
@@ -4565,24 +4668,24 @@ var sa = ["aria-label"], ca = {
|
|
|
4565
4668
|
})])
|
|
4566
4669
|
], 34));
|
|
4567
4670
|
}
|
|
4568
|
-
}),
|
|
4671
|
+
}), wa = { 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)]" }, Ta = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Ea = {
|
|
4569
4672
|
"data-testid": "vibe-pagination",
|
|
4570
4673
|
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]"
|
|
4571
|
-
},
|
|
4674
|
+
}, Da = { class: "whitespace-nowrap" }, Oa = {
|
|
4572
4675
|
key: 0,
|
|
4573
4676
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
4574
|
-
},
|
|
4677
|
+
}, ka = [
|
|
4575
4678
|
"data-active",
|
|
4576
4679
|
"data-index",
|
|
4577
4680
|
"data-item-id",
|
|
4578
4681
|
"data-occurrence-key"
|
|
4579
|
-
],
|
|
4682
|
+
], Aa = ["data-item-id"], ja = {
|
|
4580
4683
|
key: 0,
|
|
4581
4684
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
4582
|
-
},
|
|
4685
|
+
}, Ma = {
|
|
4583
4686
|
key: 1,
|
|
4584
4687
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
4585
|
-
},
|
|
4688
|
+
}, Na = { class: "mx-auto flex w-full justify-center" }, Pa = /* @__PURE__ */ d({
|
|
4586
4689
|
__name: "ListSurface",
|
|
4587
4690
|
props: {
|
|
4588
4691
|
active: {
|
|
@@ -4644,7 +4747,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4644
4747
|
"update:activeIndex"
|
|
4645
4748
|
],
|
|
4646
4749
|
setup(e, { expose: n, emit: r }) {
|
|
4647
|
-
let d = e, f = L(), p = r, m =
|
|
4750
|
+
let d = e, f = L(), p = r, m = aa({
|
|
4648
4751
|
active: N(d, "active"),
|
|
4649
4752
|
allowExhaustedNextPageRefresh: N(d, "allowExhaustedNextPageRefresh"),
|
|
4650
4753
|
bottomLoadBufferPx: N(d, "bottomLoadBufferPx"),
|
|
@@ -4692,8 +4795,8 @@ var sa = ["aria-label"], ca = {
|
|
|
4692
4795
|
nextBoundaryLoadProgress: e,
|
|
4693
4796
|
previousBoundaryLoadProgress: t
|
|
4694
4797
|
});
|
|
4695
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
4696
|
-
c("div",
|
|
4798
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", wa, [
|
|
4799
|
+
c("div", Ta, [c("span", Ea, [c("span", Da, M(F(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", Oa, M(d.paginationDetail), 1)) : o("", !0)])]),
|
|
4697
4800
|
c("div", {
|
|
4698
4801
|
ref: F(m).scrollViewportRef,
|
|
4699
4802
|
"data-testid": "vibe-list-scroll",
|
|
@@ -4714,7 +4817,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4714
4817
|
"data-occurrence-key": F($)(t),
|
|
4715
4818
|
class: "absolute will-change-transform",
|
|
4716
4819
|
style: b(F(m).getCardStyle(n))
|
|
4717
|
-
}, [u(
|
|
4820
|
+
}, [u(Ca, {
|
|
4718
4821
|
active: n === F(m).resolvedActiveIndex.value,
|
|
4719
4822
|
index: n,
|
|
4720
4823
|
item: t,
|
|
@@ -4738,14 +4841,14 @@ var sa = ["aria-label"], ca = {
|
|
|
4738
4841
|
"report-asset-load",
|
|
4739
4842
|
"surface-active",
|
|
4740
4843
|
"onOpen"
|
|
4741
|
-
])], 12,
|
|
4844
|
+
])], 12, ka))), 128)),
|
|
4742
4845
|
(w(!0), s(t, null, O(F(m).leavingItems.value, (t) => (w(), s("article", {
|
|
4743
4846
|
key: `leaving-${F($)(t.item)}`,
|
|
4744
4847
|
"data-testid": "vibe-list-card-leaving",
|
|
4745
4848
|
"data-item-id": t.item.id,
|
|
4746
4849
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
4747
4850
|
style: b(F(m).getLeavingCardStyle(t.item))
|
|
4748
|
-
}, [u(
|
|
4851
|
+
}, [u(Ca, {
|
|
4749
4852
|
active: !1,
|
|
4750
4853
|
index: -1,
|
|
4751
4854
|
item: t.item,
|
|
@@ -4760,8 +4863,8 @@ var sa = ["aria-label"], ca = {
|
|
|
4760
4863
|
"item",
|
|
4761
4864
|
"report-asset-error",
|
|
4762
4865
|
"report-asset-load"
|
|
4763
|
-
])], 12,
|
|
4764
|
-
F(j) && F(E) ? (w(), a(
|
|
4866
|
+
])], 12, Aa))), 128)),
|
|
4867
|
+
F(j) && F(E) ? (w(), a(Pr, {
|
|
4765
4868
|
key: 0,
|
|
4766
4869
|
message: F(E).message,
|
|
4767
4870
|
mode: F(E).mode,
|
|
@@ -4775,12 +4878,12 @@ var sa = ["aria-label"], ca = {
|
|
|
4775
4878
|
"surface"
|
|
4776
4879
|
])) : o("", !0)
|
|
4777
4880
|
], 4)], 544),
|
|
4778
|
-
F(m).showScrollbar.value ? (w(), s("div",
|
|
4881
|
+
F(m).showScrollbar.value ? (w(), s("div", ja, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
4779
4882
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
4780
4883
|
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"]),
|
|
4781
4884
|
style: b(F(m).getScrollbarThumbStyle())
|
|
4782
4885
|
}, null, 6)])) : o("", !0),
|
|
4783
|
-
f["grid-footer"] ? (w(), s("div",
|
|
4886
|
+
f["grid-footer"] ? (w(), s("div", Ma, [c("div", Na, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
4784
4887
|
x.value ? (w(), s("div", {
|
|
4785
4888
|
key: 2,
|
|
4786
4889
|
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"])
|
|
@@ -4789,7 +4892,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4789
4892
|
"data-testid": "vibe-grid-status-badge",
|
|
4790
4893
|
class: v(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", x.value.kind === "end" ? "border-amber-300/35 text-amber-200" : x.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
4791
4894
|
}, M(x.value.message), 3))], 2)) : o("", !0),
|
|
4792
|
-
F(D) && F(E) ? (w(), a(
|
|
4895
|
+
F(D) && F(E) ? (w(), a(Pr, {
|
|
4793
4896
|
key: 3,
|
|
4794
4897
|
class: v(["z-[3]", f["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
4795
4898
|
message: F(E).message,
|
|
@@ -4806,13 +4909,13 @@ var sa = ["aria-label"], ca = {
|
|
|
4806
4909
|
])) : o("", !0)
|
|
4807
4910
|
]));
|
|
4808
4911
|
}
|
|
4809
|
-
}),
|
|
4912
|
+
}), Fa = ["data-surface-mode"], Ia = {
|
|
4810
4913
|
key: 1,
|
|
4811
4914
|
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"
|
|
4812
|
-
},
|
|
4915
|
+
}, La = ["data-visible", "inert"], Ra = ["data-visible", "inert"], za = {
|
|
4813
4916
|
key: 3,
|
|
4814
4917
|
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"
|
|
4815
|
-
},
|
|
4918
|
+
}, Ba = /* @__PURE__ */ d({
|
|
4816
4919
|
name: "VibeLayout",
|
|
4817
4920
|
__name: "Layout",
|
|
4818
4921
|
props: {
|
|
@@ -4880,7 +4983,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4880
4983
|
type: "button",
|
|
4881
4984
|
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",
|
|
4882
4985
|
onClick: n[0] ||= (...e) => F(h).retryInitialLoad && F(h).retryInitialLoad(...e)
|
|
4883
|
-
}, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div",
|
|
4986
|
+
}, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div", Ia, M(F(h).errorMessage.value), 1)) : o("", !0), F(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
|
|
4884
4987
|
appear: "",
|
|
4885
4988
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4886
4989
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4894,7 +4997,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4894
4997
|
"data-visible": F(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4895
4998
|
inert: F(h).surfaceMode.value !== "list",
|
|
4896
4999
|
class: "absolute inset-0 z-[2]"
|
|
4897
|
-
}, [u(
|
|
5000
|
+
}, [u(Pa, {
|
|
4898
5001
|
ref_key: "listSurfaceRef",
|
|
4899
5002
|
ref: g,
|
|
4900
5003
|
active: F(h).surfaceMode.value === "list",
|
|
@@ -4968,7 +5071,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4968
5071
|
"onBoundaryLoadProgress",
|
|
4969
5072
|
"onOpenFullscreen",
|
|
4970
5073
|
"onUpdate:activeIndex"
|
|
4971
|
-
])], 8,
|
|
5074
|
+
])], 8, La), [[R, F(h).surfaceMode.value === "list"]])]),
|
|
4972
5075
|
_: 3
|
|
4973
5076
|
}), u(r, {
|
|
4974
5077
|
appear: "",
|
|
@@ -4984,11 +5087,19 @@ var sa = ["aria-label"], ca = {
|
|
|
4984
5087
|
"data-visible": F(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
4985
5088
|
inert: F(h).surfaceMode.value !== "fullscreen",
|
|
4986
5089
|
class: "absolute inset-0 z-[3]"
|
|
4987
|
-
}, [u(
|
|
5090
|
+
}, [u(fi, {
|
|
4988
5091
|
items: F(h).items.value,
|
|
4989
5092
|
active: F(h).surfaceMode.value === "fullscreen",
|
|
4990
5093
|
"active-index": F(h).activeIndex.value,
|
|
4991
5094
|
"error-message": F(h).errorMessage.value,
|
|
5095
|
+
"fill-collected-count": F(h).fillCollectedCount.value,
|
|
5096
|
+
"fill-completed-calls": F(h).fillCompletedCalls.value,
|
|
5097
|
+
"fill-loaded-count": F(h).fillLoadedCount.value,
|
|
5098
|
+
"fill-mode": F(h).fillMode.value,
|
|
5099
|
+
"fill-progress": F(h).fillProgress.value,
|
|
5100
|
+
"fill-target-calls": F(h).fillTargetCalls.value,
|
|
5101
|
+
"fill-target-count": F(h).fillTargetCount.value,
|
|
5102
|
+
"fill-total-count": F(h).fillTotalCount.value,
|
|
4992
5103
|
loading: F(h).loading.value,
|
|
4993
5104
|
"has-next-page": F(h).hasNextPage.value,
|
|
4994
5105
|
"pagination-detail": F(h).paginationDetail.value,
|
|
@@ -5034,36 +5145,25 @@ var sa = ["aria-label"], ca = {
|
|
|
5034
5145
|
fn: B((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
5035
5146
|
key: "5"
|
|
5036
5147
|
} : void 0
|
|
5037
|
-
]), 1032, [
|
|
5038
|
-
"items",
|
|
5039
|
-
"active",
|
|
5040
|
-
"active-index",
|
|
5041
|
-
"error-message",
|
|
5042
|
-
"loading",
|
|
5043
|
-
"has-next-page",
|
|
5044
|
-
"pagination-detail",
|
|
5045
|
-
"phase",
|
|
5046
|
-
"report-asset-error",
|
|
5047
|
-
"report-asset-load",
|
|
5048
|
-
"empty-state-mode",
|
|
5049
|
-
"loop-fullscreen-video",
|
|
5050
|
-
"show-dominant-image-tone",
|
|
5051
|
-
"show-end-badge",
|
|
5052
|
-
"show-status-badges",
|
|
5053
|
-
"show-back-to-list",
|
|
5054
|
-
"onBackToList",
|
|
5055
|
-
"onUpdate:activeIndex"
|
|
5056
|
-
])], 8, Na), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
|
|
5148
|
+
]), 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, Ra), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
|
|
5057
5149
|
_: 3
|
|
5058
|
-
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value ? (w(), s("div",
|
|
5150
|
+
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div", za, [u(F(se), {
|
|
5059
5151
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
5060
5152
|
"aria-hidden": "true"
|
|
5061
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(
|
|
5153
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(fi, {
|
|
5062
5154
|
key: 4,
|
|
5063
5155
|
items: F(h).items.value,
|
|
5064
5156
|
active: !0,
|
|
5065
5157
|
"active-index": F(h).activeIndex.value,
|
|
5066
5158
|
"error-message": F(h).errorMessage.value,
|
|
5159
|
+
"fill-collected-count": F(h).fillCollectedCount.value,
|
|
5160
|
+
"fill-completed-calls": F(h).fillCompletedCalls.value,
|
|
5161
|
+
"fill-loaded-count": F(h).fillLoadedCount.value,
|
|
5162
|
+
"fill-mode": F(h).fillMode.value,
|
|
5163
|
+
"fill-progress": F(h).fillProgress.value,
|
|
5164
|
+
"fill-target-calls": F(h).fillTargetCalls.value,
|
|
5165
|
+
"fill-target-count": F(h).fillTargetCount.value,
|
|
5166
|
+
"fill-total-count": F(h).fillTotalCount.value,
|
|
5067
5167
|
loading: F(h).loading.value,
|
|
5068
5168
|
"has-next-page": F(h).hasNextPage.value,
|
|
5069
5169
|
"pagination-detail": F(h).paginationDetail.value,
|
|
@@ -5113,6 +5213,14 @@ var sa = ["aria-label"], ca = {
|
|
|
5113
5213
|
"items",
|
|
5114
5214
|
"active-index",
|
|
5115
5215
|
"error-message",
|
|
5216
|
+
"fill-collected-count",
|
|
5217
|
+
"fill-completed-calls",
|
|
5218
|
+
"fill-loaded-count",
|
|
5219
|
+
"fill-mode",
|
|
5220
|
+
"fill-progress",
|
|
5221
|
+
"fill-target-calls",
|
|
5222
|
+
"fill-target-count",
|
|
5223
|
+
"fill-total-count",
|
|
5116
5224
|
"loading",
|
|
5117
5225
|
"has-next-page",
|
|
5118
5226
|
"pagination-detail",
|
|
@@ -5126,10 +5234,10 @@ var sa = ["aria-label"], ca = {
|
|
|
5126
5234
|
"show-status-badges",
|
|
5127
5235
|
"onBackToList",
|
|
5128
5236
|
"onUpdate:activeIndex"
|
|
5129
|
-
]))], 8,
|
|
5237
|
+
]))], 8, Fa));
|
|
5130
5238
|
}
|
|
5131
|
-
}),
|
|
5132
|
-
e.component("VibeLayout",
|
|
5239
|
+
}), Va = { install(e) {
|
|
5240
|
+
e.component("VibeLayout", Ba);
|
|
5133
5241
|
} };
|
|
5134
5242
|
//#endregion
|
|
5135
|
-
export {
|
|
5243
|
+
export { Ba as VibeLayout, Va as VibePlugin, Va as default };
|