@wyxos/vibe 3.1.27 → 3.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
2853
|
class: "pointer-events-auto absolute right-[clamp(1.25rem,2.6vw,2.25rem)] top-[clamp(5.75rem,7vw,7rem)] z-[4] grid gap-2 max-[860px]:hidden"
|
|
2783
|
-
},
|
|
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
|
}));
|
|
@@ -2860,7 +2931,7 @@ var pr = {
|
|
|
2860
2931
|
[p(e)]: t
|
|
2861
2932
|
};
|
|
2862
2933
|
}
|
|
2863
|
-
return (e, n) => f.value.length ? (w(), s("div",
|
|
2934
|
+
return (e, n) => f.value.length ? (w(), s("div", Sr, [(w(!0), s(t, null, O(f.value, (e) => (w(), s("button", {
|
|
2864
2935
|
key: `${e.item.id}-${e.index}`,
|
|
2865
2936
|
type: "button",
|
|
2866
2937
|
"data-testid": "vibe-fullscreen-next-preview",
|
|
@@ -2880,7 +2951,7 @@ var pr = {
|
|
|
2880
2951
|
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, "opacity-[0.82]")]]),
|
|
2881
2952
|
onError: (t) => x(e, "error"),
|
|
2882
2953
|
onLoad: (t) => x(e, "ready")
|
|
2883
|
-
}, null, 42,
|
|
2954
|
+
}, null, 42, wr)) : e.asset.kind === "video" ? (w(), s("video", {
|
|
2884
2955
|
key: 1,
|
|
2885
2956
|
src: e.asset.url ?? void 0,
|
|
2886
2957
|
"aria-hidden": "true",
|
|
@@ -2890,13 +2961,13 @@ var pr = {
|
|
|
2890
2961
|
preload: "metadata",
|
|
2891
2962
|
onError: (t) => x(e, "error"),
|
|
2892
2963
|
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
|
-
], 8,
|
|
2964
|
+
}, 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" }))])),
|
|
2965
|
+
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),
|
|
2966
|
+
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),
|
|
2967
|
+
c("span", Ar, M(e.index + 1) + " / " + M(r.items.length), 1)
|
|
2968
|
+
], 8, Cr))), 128))])) : o("", !0);
|
|
2898
2969
|
}
|
|
2899
|
-
}),
|
|
2970
|
+
}), Mr = ["data-surface"], Nr = ["data-surface"], Pr = /* @__PURE__ */ d({
|
|
2900
2971
|
inheritAttrs: !1,
|
|
2901
2972
|
__name: "SurfaceEmptyState",
|
|
2902
2973
|
props: {
|
|
@@ -2910,31 +2981,31 @@ var pr = {
|
|
|
2910
2981
|
"data-testid": "vibe-empty-state-inline",
|
|
2911
2982
|
"data-surface": e.surface,
|
|
2912
2983
|
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,
|
|
2984
|
+
}), [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
2985
|
"data-testid": "vibe-empty-state-badge",
|
|
2915
2986
|
"data-surface": e.surface,
|
|
2916
2987
|
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,
|
|
2988
|
+
}, M(e.message), 11, Nr)])], 16));
|
|
2918
2989
|
}
|
|
2919
|
-
}),
|
|
2990
|
+
}), Fr = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Ir = {
|
|
2920
2991
|
key: 0,
|
|
2921
2992
|
class: "relative h-full min-h-0"
|
|
2922
|
-
},
|
|
2993
|
+
}, Lr = [
|
|
2923
2994
|
"data-item-id",
|
|
2924
2995
|
"data-occurrence-key",
|
|
2925
2996
|
"data-index",
|
|
2926
2997
|
"data-active",
|
|
2927
2998
|
"aria-hidden"
|
|
2928
|
-
],
|
|
2999
|
+
], Rr = {
|
|
2929
3000
|
key: 0,
|
|
2930
3001
|
"data-testid": "vibe-asset-spinner",
|
|
2931
3002
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
2932
|
-
},
|
|
3003
|
+
}, 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
3004
|
"src",
|
|
2934
3005
|
"alt",
|
|
2935
3006
|
"onLoad",
|
|
2936
3007
|
"onError"
|
|
2937
|
-
],
|
|
3008
|
+
], Gr = [
|
|
2938
3009
|
"loop",
|
|
2939
3010
|
"src",
|
|
2940
3011
|
"preload",
|
|
@@ -2953,15 +3024,15 @@ var pr = {
|
|
|
2953
3024
|
"onStalled",
|
|
2954
3025
|
"onTimeupdate",
|
|
2955
3026
|
"onWaiting"
|
|
2956
|
-
],
|
|
3027
|
+
], Kr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, qr = [
|
|
2957
3028
|
"aria-label",
|
|
2958
3029
|
"disabled",
|
|
2959
3030
|
"onClick"
|
|
2960
|
-
],
|
|
3031
|
+
], 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
3032
|
key: 0,
|
|
2962
3033
|
"data-testid": "vibe-asset-spinner",
|
|
2963
3034
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
2964
|
-
},
|
|
3035
|
+
}, 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
3036
|
"src",
|
|
2966
3037
|
"preload",
|
|
2967
3038
|
"onCanplay",
|
|
@@ -2977,26 +3048,22 @@ var pr = {
|
|
|
2977
3048
|
"onStalled",
|
|
2978
3049
|
"onTimeupdate",
|
|
2979
3050
|
"onWaiting"
|
|
2980
|
-
],
|
|
3051
|
+
], ni = {
|
|
2981
3052
|
key: 2,
|
|
2982
3053
|
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
|
-
},
|
|
3054
|
+
}, 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
3055
|
key: 0,
|
|
2985
3056
|
"data-testid": "vibe-fullscreen-overlay",
|
|
2986
3057
|
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 = {
|
|
3058
|
+
}, ai = { class: "h-full w-full" }, oi = {
|
|
2992
3059
|
key: 0,
|
|
2993
3060
|
"data-testid": "vibe-fullscreen-aside",
|
|
2994
3061
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
2995
|
-
},
|
|
3062
|
+
}, si = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ci = {
|
|
2996
3063
|
key: 0,
|
|
2997
3064
|
"data-testid": "vibe-fullscreen-aside",
|
|
2998
3065
|
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
|
-
},
|
|
3066
|
+
}, li = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ui = 1280, di = 768, fi = /* @__PURE__ */ d({
|
|
3000
3067
|
__name: "FullscreenSurface",
|
|
3001
3068
|
props: {
|
|
3002
3069
|
active: {
|
|
@@ -3006,6 +3073,14 @@ var pr = {
|
|
|
3006
3073
|
activeIndex: { default: 0 },
|
|
3007
3074
|
emptyStateMode: { default: "inline" },
|
|
3008
3075
|
errorMessage: { default: null },
|
|
3076
|
+
fillCollectedCount: { default: null },
|
|
3077
|
+
fillCompletedCalls: { default: 0 },
|
|
3078
|
+
fillLoadedCount: { default: 0 },
|
|
3079
|
+
fillMode: { default: "idle" },
|
|
3080
|
+
fillProgress: { default: null },
|
|
3081
|
+
fillTargetCalls: { default: null },
|
|
3082
|
+
fillTargetCount: { default: null },
|
|
3083
|
+
fillTotalCount: { default: null },
|
|
3009
3084
|
hasNextPage: {
|
|
3010
3085
|
type: Boolean,
|
|
3011
3086
|
default: !1
|
|
@@ -3054,7 +3129,7 @@ var pr = {
|
|
|
3054
3129
|
enabled: N(d, "active"),
|
|
3055
3130
|
onAssetError: d.reportAssetError ?? void 0,
|
|
3056
3131
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
3057
|
-
}), _ = D(typeof window > "u" ?
|
|
3132
|
+
}), _ = D(typeof window > "u" ? ui : window.innerWidth || ui), C = rn({
|
|
3058
3133
|
active: N(d, "active"),
|
|
3059
3134
|
items: h.items,
|
|
3060
3135
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
@@ -3069,9 +3144,9 @@ var pr = {
|
|
|
3069
3144
|
showDominantImageTone: N(d, "showDominantImageTone")
|
|
3070
3145
|
}), R = Bn({
|
|
3071
3146
|
fullscreenMedia: C,
|
|
3072
|
-
updateDominantToneFromImageElement:
|
|
3147
|
+
updateDominantToneFromImageElement: ve,
|
|
3073
3148
|
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 <
|
|
3149
|
+
}), 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
3150
|
let e = h.activeItem.value;
|
|
3076
3151
|
return e ? {
|
|
3077
3152
|
hasNextPage: d.hasNextPage,
|
|
@@ -3081,14 +3156,14 @@ var pr = {
|
|
|
3081
3156
|
paginationDetail: d.paginationDetail,
|
|
3082
3157
|
total: d.items.length
|
|
3083
3158
|
} : null;
|
|
3084
|
-
}),
|
|
3159
|
+
}), 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
3160
|
...G.value,
|
|
3086
3161
|
kind: h.statusKind.value,
|
|
3087
3162
|
message: h.statusMessage.value
|
|
3088
|
-
}),
|
|
3089
|
-
gridTemplateColumns:
|
|
3163
|
+
}), q = i(() => !K.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](K.value)), re = i(() => ({
|
|
3164
|
+
gridTemplateColumns: ie.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
3090
3165
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
3091
|
-
})),
|
|
3166
|
+
})), 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
3167
|
emptyStateMode: N(d, "emptyStateMode"),
|
|
3093
3168
|
itemCount: i(() => d.items.length),
|
|
3094
3169
|
loading: N(d, "loading"),
|
|
@@ -3096,30 +3171,30 @@ var pr = {
|
|
|
3096
3171
|
surface: "fullscreen"
|
|
3097
3172
|
});
|
|
3098
3173
|
S(() => {
|
|
3099
|
-
window.addEventListener("resize",
|
|
3174
|
+
window.addEventListener("resize", me);
|
|
3100
3175
|
}), x(() => {
|
|
3101
|
-
window.removeEventListener("resize",
|
|
3176
|
+
window.removeEventListener("resize", me);
|
|
3102
3177
|
});
|
|
3103
|
-
function
|
|
3104
|
-
_.value = window.innerWidth ||
|
|
3178
|
+
function me() {
|
|
3179
|
+
_.value = window.innerWidth || ui;
|
|
3105
3180
|
}
|
|
3106
|
-
function
|
|
3107
|
-
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement &&
|
|
3181
|
+
function he(e, t) {
|
|
3182
|
+
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && ve(e, t);
|
|
3108
3183
|
}
|
|
3109
|
-
function
|
|
3184
|
+
function ge(e, t) {
|
|
3110
3185
|
C.registerMediaElement(e, t), h.registerVideoElement(e, t), T.registerElement(e, t);
|
|
3111
3186
|
}
|
|
3112
|
-
function
|
|
3187
|
+
function _e(e, t) {
|
|
3113
3188
|
C.registerMediaElement(e, t), h.registerAudioElement(e, t);
|
|
3114
3189
|
}
|
|
3115
3190
|
function Z(e, t, n) {
|
|
3116
3191
|
let r = R.onFullscreenMediaEvent(e, t, n), i = n.currentTarget, a = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
3117
3192
|
r && i instanceof HTMLMediaElement && i.readyState >= a && C.settleAssetPreload(r);
|
|
3118
3193
|
}
|
|
3119
|
-
function
|
|
3194
|
+
function ve(e, t) {
|
|
3120
3195
|
I(e, t);
|
|
3121
3196
|
}
|
|
3122
|
-
function
|
|
3197
|
+
function ye(e, t, n) {
|
|
3123
3198
|
let r = R.getHandledItemKey(t, n);
|
|
3124
3199
|
if (!r || (h.onMediaEvent(r, e), !d.loopFullscreenVideo)) return;
|
|
3125
3200
|
let i = e.currentTarget;
|
|
@@ -3130,14 +3205,14 @@ var pr = {
|
|
|
3130
3205
|
let a = i.play();
|
|
3131
3206
|
a && typeof a.catch == "function" && a.catch(() => {});
|
|
3132
3207
|
}
|
|
3133
|
-
return (e, n) => (w(), s("div",
|
|
3208
|
+
return (e, n) => (w(), s("div", Fr, [
|
|
3134
3209
|
c("div", {
|
|
3135
3210
|
class: v(["absolute inset-0 transition-[background] duration-200", E.value]),
|
|
3136
3211
|
style: b(F(P))
|
|
3137
3212
|
}, null, 6),
|
|
3138
3213
|
c("div", {
|
|
3139
3214
|
class: "relative z-[1] grid h-full min-h-0",
|
|
3140
|
-
style: b(
|
|
3215
|
+
style: b(re.value)
|
|
3141
3216
|
}, [c("div", {
|
|
3142
3217
|
ref: "viewer.stageRef",
|
|
3143
3218
|
"data-testid": "vibe-stage",
|
|
@@ -3147,7 +3222,7 @@ var pr = {
|
|
|
3147
3222
|
onPointerup: n[4] ||= (...e) => F(h).onPointerUp && F(h).onPointerUp(...e),
|
|
3148
3223
|
onPointercancel: n[5] ||= (...e) => F(h).onPointerCancel && F(h).onPointerCancel(...e),
|
|
3149
3224
|
onWheel: n[6] ||= (...e) => F(h).onWheel && F(h).onWheel(...e)
|
|
3150
|
-
}, [F(h).activeItem.value ? (w(), s("div",
|
|
3225
|
+
}, [F(h).activeItem.value ? (w(), s("div", Ir, [
|
|
3151
3226
|
(w(!0), s(t, null, O(F(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
3152
3227
|
key: F(C).getItemKey(r),
|
|
3153
3228
|
"data-testid": "vibe-slide",
|
|
@@ -3164,7 +3239,7 @@ var pr = {
|
|
|
3164
3239
|
}, null, 6), F(h).isVisual(r) ? (w(), s("div", {
|
|
3165
3240
|
key: 0,
|
|
3166
3241
|
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",
|
|
3242
|
+
}, [F(C).isAssetLoading(i, r) ? (w(), s("div", Rr, [c("span", zr, [u(F(se), {
|
|
3168
3243
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3169
3244
|
"aria-hidden": "true"
|
|
3170
3245
|
})])])) : o("", !0), F(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
@@ -3172,19 +3247,19 @@ var pr = {
|
|
|
3172
3247
|
"data-testid": "vibe-asset-error",
|
|
3173
3248
|
"data-kind": F(C).getAssetErrorKind(r),
|
|
3174
3249
|
class: "grid h-full w-full place-items-center"
|
|
3175
|
-
}, [c("div",
|
|
3250
|
+
}, [c("div", Vr, [
|
|
3176
3251
|
u(F(de), {
|
|
3177
3252
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3178
3253
|
"aria-hidden": "true"
|
|
3179
3254
|
}),
|
|
3180
|
-
c("p",
|
|
3255
|
+
c("p", Hr, M(F(C).getAssetErrorLabel(r)), 1),
|
|
3181
3256
|
F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
|
|
3182
3257
|
key: 0,
|
|
3183
3258
|
type: "button",
|
|
3184
3259
|
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
3260
|
onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
|
|
3186
|
-
}, " Retry ", 8,
|
|
3187
|
-
])], 8,
|
|
3261
|
+
}, " Retry ", 8, Ur)) : o("", !0)
|
|
3262
|
+
])], 8, Br)) : r.type === "image" ? (w(), s("img", {
|
|
3188
3263
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3189
3264
|
src: F(C).getFullscreenImageSource(i, r),
|
|
3190
3265
|
alt: r.title ?? "",
|
|
@@ -3192,10 +3267,10 @@ var pr = {
|
|
|
3192
3267
|
draggable: "false",
|
|
3193
3268
|
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
3269
|
ref_for: !0,
|
|
3195
|
-
ref: (e) =>
|
|
3270
|
+
ref: (e) => he(F(C).getItemKey(r), e),
|
|
3196
3271
|
onLoad: (e) => F(R).onFullscreenImageLoad(e, i, r),
|
|
3197
3272
|
onError: (e) => F(R).onFullscreenImageError(i, r)
|
|
3198
|
-
}, null, 42,
|
|
3273
|
+
}, null, 42, Wr)) : (w(), s("video", {
|
|
3199
3274
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3200
3275
|
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
3276
|
playsinline: "",
|
|
@@ -3203,11 +3278,11 @@ var pr = {
|
|
|
3203
3278
|
src: F(C).getFullscreenMediaSource(i, r),
|
|
3204
3279
|
preload: F(C).getFullscreenMediaPreload(i),
|
|
3205
3280
|
ref_for: !0,
|
|
3206
|
-
ref: (e) =>
|
|
3281
|
+
ref: (e) => ge(F(C).getItemKey(r), e),
|
|
3207
3282
|
onClick: H((e) => F(h).onVideoClick(e, F(C).getItemKey(r)), ["stop"]),
|
|
3208
3283
|
onCanplay: (e) => Z(i, r, e),
|
|
3209
3284
|
onDurationchange: (e) => Z(i, r, e),
|
|
3210
|
-
onEnded: (e) =>
|
|
3285
|
+
onEnded: (e) => ye(e, i, r),
|
|
3211
3286
|
onError: (e) => F(R).onFullscreenMediaError(i, r),
|
|
3212
3287
|
onLoadstart: (e) => Z(i, r, e),
|
|
3213
3288
|
onLoadedmetadata: (e) => Z(i, r, e),
|
|
@@ -3219,10 +3294,10 @@ var pr = {
|
|
|
3219
3294
|
onStalled: (e) => Z(i, r, e),
|
|
3220
3295
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3221
3296
|
onWaiting: (e) => Z(i, r, e)
|
|
3222
|
-
}, null, 42,
|
|
3297
|
+
}, null, 42, Gr))], 2)) : F(h).isAudio(r) ? (w(), s("div", {
|
|
3223
3298
|
key: 1,
|
|
3224
3299
|
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",
|
|
3300
|
+
}, [c("div", Kr, [
|
|
3226
3301
|
c("button", {
|
|
3227
3302
|
type: "button",
|
|
3228
3303
|
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 +3307,19 @@ var pr = {
|
|
|
3232
3307
|
}, [
|
|
3233
3308
|
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
3309
|
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",
|
|
3310
|
+
c("span", Jr, [k(e.$slots, "item-icon", {
|
|
3236
3311
|
icon: F(Gt)(r.type),
|
|
3237
3312
|
item: r
|
|
3238
3313
|
}, () => [(w(), a(A(F(Gt)(r.type)), {
|
|
3239
3314
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3240
3315
|
"aria-hidden": "true"
|
|
3241
3316
|
}))])]),
|
|
3242
|
-
c("span",
|
|
3317
|
+
c("span", Yr, [(w(), a(A(F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(ue) : F(le)), {
|
|
3243
3318
|
class: "h-4 w-4 stroke-2",
|
|
3244
3319
|
"aria-hidden": "true"
|
|
3245
3320
|
}))])
|
|
3246
|
-
], 8,
|
|
3247
|
-
F(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
3321
|
+
], 8, qr),
|
|
3322
|
+
F(C).isAssetLoading(i, r) ? (w(), s("div", Xr, [c("span", Zr, [u(F(se), {
|
|
3248
3323
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3249
3324
|
"aria-hidden": "true"
|
|
3250
3325
|
})])])) : o("", !0),
|
|
@@ -3257,21 +3332,21 @@ var pr = {
|
|
|
3257
3332
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3258
3333
|
"aria-hidden": "true"
|
|
3259
3334
|
}),
|
|
3260
|
-
c("p",
|
|
3335
|
+
c("p", $r, M(F(C).getAssetErrorLabel(r)), 1),
|
|
3261
3336
|
F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
|
|
3262
3337
|
key: 0,
|
|
3263
3338
|
type: "button",
|
|
3264
3339
|
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
3340
|
onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
|
|
3266
|
-
}, " Retry ", 8,
|
|
3267
|
-
], 8,
|
|
3341
|
+
}, " Retry ", 8, ei)) : o("", !0)
|
|
3342
|
+
], 8, Qr)], 64)) : o("", !0)
|
|
3268
3343
|
]), (w(), s("audio", {
|
|
3269
3344
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3270
3345
|
src: F(C).getFullscreenMediaSource(i, r),
|
|
3271
3346
|
preload: F(C).getFullscreenMediaPreload(i),
|
|
3272
3347
|
class: "pointer-events-none absolute h-px w-px opacity-0",
|
|
3273
3348
|
ref_for: !0,
|
|
3274
|
-
ref: (e) =>
|
|
3349
|
+
ref: (e) => _e(F(C).getItemKey(r), e),
|
|
3275
3350
|
onCanplay: (e) => Z(i, r, e),
|
|
3276
3351
|
onDurationchange: (e) => Z(i, r, e),
|
|
3277
3352
|
onError: (e) => F(R).onFullscreenMediaError(i, r),
|
|
@@ -3285,14 +3360,14 @@ var pr = {
|
|
|
3285
3360
|
onStalled: (e) => Z(i, r, e),
|
|
3286
3361
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3287
3362
|
onWaiting: (e) => Z(i, r, e)
|
|
3288
|
-
}, null, 40,
|
|
3363
|
+
}, null, 40, ti))], 2)) : (w(), s("div", ni, [c("div", ri, [k(e.$slots, "item-icon", {
|
|
3289
3364
|
icon: F(Gt)(r.type),
|
|
3290
3365
|
item: r
|
|
3291
3366
|
}, () => [(w(), a(A(F(Gt)(r.type)), {
|
|
3292
3367
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3293
3368
|
"aria-hidden": "true"
|
|
3294
|
-
}))])])]))], 14,
|
|
3295
|
-
G.value && f["fullscreen-overlay"] ? (w(), s("div",
|
|
3369
|
+
}))])])]))], 14, Lr))), 128)),
|
|
3370
|
+
G.value && f["fullscreen-overlay"] ? (w(), s("div", ii, [c("div", ai, [k(e.$slots, "fullscreen-overlay", y(p(G.value)))])])) : o("", !0),
|
|
3296
3371
|
F(h).activeItem.value ? (w(), a(Ht, {
|
|
3297
3372
|
key: 1,
|
|
3298
3373
|
"current-index": F(h).resolvedActiveIndex.value,
|
|
@@ -3303,7 +3378,7 @@ var pr = {
|
|
|
3303
3378
|
title: F(h).activeItem.value.title ?? null,
|
|
3304
3379
|
total: F(h).items.value.length,
|
|
3305
3380
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
3306
|
-
}, l({ _: 2 }, [
|
|
3381
|
+
}, l({ _: 2 }, [J.value && G.value ? {
|
|
3307
3382
|
name: "actions",
|
|
3308
3383
|
fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(G.value)))]),
|
|
3309
3384
|
key: "0"
|
|
@@ -3316,7 +3391,7 @@ var pr = {
|
|
|
3316
3391
|
"title",
|
|
3317
3392
|
"total"
|
|
3318
3393
|
])) : o("", !0),
|
|
3319
|
-
u(
|
|
3394
|
+
u(jr, {
|
|
3320
3395
|
"active-index": F(h).resolvedActiveIndex.value,
|
|
3321
3396
|
items: F(h).items.value,
|
|
3322
3397
|
onSelect: n[1] ||= (e) => m("update:activeIndex", e)
|
|
@@ -3351,36 +3426,58 @@ var pr = {
|
|
|
3351
3426
|
"onVolumeInput",
|
|
3352
3427
|
"onVolumeToggle"
|
|
3353
3428
|
])) : o("", !0),
|
|
3354
|
-
|
|
3429
|
+
K.value ? (w(), s("div", {
|
|
3355
3430
|
key: 3,
|
|
3356
3431
|
class: v(["absolute left-1/2 z-[4] -translate-x-1/2", z.value])
|
|
3357
|
-
}, [
|
|
3432
|
+
}, [oe.value ? k(e.$slots, "fullscreen-status", y(g({ key: 0 }, K.value))) : (w(), s("div", {
|
|
3358
3433
|
key: 1,
|
|
3359
3434
|
"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
|
-
|
|
3435
|
+
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" : ""])
|
|
3436
|
+
}, M(K.value.message), 3))], 2)) : o("", !0)
|
|
3437
|
+
])) : W.value ? (w(), a($n, {
|
|
3438
|
+
key: 1,
|
|
3439
|
+
"fill-collected-count": d.fillCollectedCount,
|
|
3440
|
+
"fill-completed-calls": d.fillCompletedCalls,
|
|
3441
|
+
"fill-loaded-count": d.fillLoadedCount,
|
|
3442
|
+
"fill-mode": d.fillMode,
|
|
3443
|
+
"fill-progress": d.fillProgress,
|
|
3444
|
+
"fill-target-calls": d.fillTargetCalls,
|
|
3445
|
+
"fill-target-count": d.fillTargetCount,
|
|
3446
|
+
"fill-total-count": d.fillTotalCount,
|
|
3447
|
+
"has-next-page": d.hasNextPage,
|
|
3448
|
+
phase: d.phase,
|
|
3449
|
+
"status-message": F(h).statusMessage.value
|
|
3450
|
+
}, null, 8, [
|
|
3451
|
+
"fill-collected-count",
|
|
3452
|
+
"fill-completed-calls",
|
|
3453
|
+
"fill-loaded-count",
|
|
3454
|
+
"fill-mode",
|
|
3455
|
+
"fill-progress",
|
|
3456
|
+
"fill-target-calls",
|
|
3457
|
+
"fill-target-count",
|
|
3458
|
+
"fill-total-count",
|
|
3459
|
+
"has-next-page",
|
|
3460
|
+
"phase",
|
|
3461
|
+
"status-message"
|
|
3462
|
+
])) : F(pe) && F(X) ? (w(), a(Pr, {
|
|
3366
3463
|
key: 2,
|
|
3367
3464
|
message: F(X).message,
|
|
3368
3465
|
mode: F(X).mode,
|
|
3369
3466
|
surface: F(X).surface
|
|
3370
3467
|
}, {
|
|
3371
|
-
default: B(() => [F(
|
|
3468
|
+
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(X)))) : o("", !0)]),
|
|
3372
3469
|
_: 3
|
|
3373
3470
|
}, 8, [
|
|
3374
3471
|
"message",
|
|
3375
3472
|
"mode",
|
|
3376
3473
|
"surface"
|
|
3377
|
-
])) : o("", !0), F(
|
|
3474
|
+
])) : o("", !0), F(ce) && F(X) ? (w(), a(Pr, {
|
|
3378
3475
|
key: 3,
|
|
3379
3476
|
message: F(X).message,
|
|
3380
3477
|
mode: F(X).mode,
|
|
3381
3478
|
surface: F(X).surface
|
|
3382
3479
|
}, {
|
|
3383
|
-
default: B(() => [F(
|
|
3480
|
+
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(X)))) : o("", !0)]),
|
|
3384
3481
|
_: 3
|
|
3385
3482
|
}, 8, [
|
|
3386
3483
|
"message",
|
|
@@ -3394,7 +3491,7 @@ var pr = {
|
|
|
3394
3491
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3395
3492
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3396
3493
|
}, {
|
|
3397
|
-
default: B(() => [
|
|
3494
|
+
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
3495
|
_: 3
|
|
3399
3496
|
})], 4),
|
|
3400
3497
|
u(r, {
|
|
@@ -3405,7 +3502,7 @@ var pr = {
|
|
|
3405
3502
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3406
3503
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3407
3504
|
}, {
|
|
3408
|
-
default: B(() => [
|
|
3505
|
+
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
3506
|
_: 3
|
|
3410
3507
|
})
|
|
3411
3508
|
]));
|
|
@@ -3413,10 +3510,10 @@ var pr = {
|
|
|
3413
3510
|
});
|
|
3414
3511
|
//#endregion
|
|
3415
3512
|
//#region src/components/viewer-core/masonryLayoutState.ts
|
|
3416
|
-
function
|
|
3513
|
+
function pi(e) {
|
|
3417
3514
|
let t = j([]), n = j([]), r = j(/* @__PURE__ */ new Map()), i = j(0), a = j(/* @__PURE__ */ new Map()), o = j([]);
|
|
3418
3515
|
function s(s, c, l) {
|
|
3419
|
-
let u =
|
|
3516
|
+
let u = or(s, {
|
|
3420
3517
|
columnCount: c,
|
|
3421
3518
|
columnWidth: l,
|
|
3422
3519
|
gapX: e.gapPx,
|
|
@@ -3426,7 +3523,7 @@ function ci(e) {
|
|
|
3426
3523
|
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
3524
|
}
|
|
3428
3525
|
function c(s, c, l, d) {
|
|
3429
|
-
i.value =
|
|
3526
|
+
i.value = sr(u(), s, {
|
|
3430
3527
|
columnCount: l,
|
|
3431
3528
|
columnWidth: d,
|
|
3432
3529
|
gapX: e.gapPx,
|
|
@@ -3438,7 +3535,7 @@ function ci(e) {
|
|
|
3438
3535
|
}).contentHeight, P(t), P(n), P(r), P(a), P(o);
|
|
3439
3536
|
}
|
|
3440
3537
|
function l(e, n, r, i) {
|
|
3441
|
-
return
|
|
3538
|
+
return lr({
|
|
3442
3539
|
addedItems: r.addedItems,
|
|
3443
3540
|
columnCount: i,
|
|
3444
3541
|
columnHeights: o.value,
|
|
@@ -3479,21 +3576,21 @@ function ci(e) {
|
|
|
3479
3576
|
}
|
|
3480
3577
|
//#endregion
|
|
3481
3578
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
3482
|
-
var
|
|
3483
|
-
function
|
|
3579
|
+
var mi = 300, hi = 600, gi = 40, _i = 300, vi = 400;
|
|
3580
|
+
function yi(e, t) {
|
|
3484
3581
|
return t === "top" ? [...e].reverse() : e;
|
|
3485
3582
|
}
|
|
3486
|
-
function
|
|
3487
|
-
return e <= 0 ?
|
|
3583
|
+
function bi(e) {
|
|
3584
|
+
return e <= 0 ? hi : hi + Math.min((e - 1) * gi, vi);
|
|
3488
3585
|
}
|
|
3489
|
-
function
|
|
3490
|
-
return
|
|
3586
|
+
function xi() {
|
|
3587
|
+
return _i;
|
|
3491
3588
|
}
|
|
3492
|
-
function
|
|
3589
|
+
function Si(e) {
|
|
3493
3590
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
3494
3591
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
3495
3592
|
}
|
|
3496
|
-
function
|
|
3593
|
+
function Ci(e) {
|
|
3497
3594
|
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
3595
|
z(e.visibleIndices, (i) => {
|
|
3499
3596
|
if (!i.length) return;
|
|
@@ -3503,20 +3600,20 @@ function vi(e) {
|
|
|
3503
3600
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
3504
3601
|
}
|
|
3505
3602
|
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,
|
|
3603
|
+
let s = yi(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
3604
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * gi, vi));
|
|
3605
|
+
r.value = c, wi(() => {
|
|
3509
3606
|
let e = new Set(n.value);
|
|
3510
3607
|
for (let t of o) e.add(t);
|
|
3511
3608
|
n.value = e;
|
|
3512
|
-
}),
|
|
3609
|
+
}), Ti(() => {
|
|
3513
3610
|
let e = new Set(t.value);
|
|
3514
3611
|
for (let t of o) e.delete(t);
|
|
3515
3612
|
t.value = e, S(() => {
|
|
3516
3613
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
3517
3614
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
3518
3615
|
n.value = e, r.value = t, a.value = i;
|
|
3519
|
-
},
|
|
3616
|
+
}, bi(o.length));
|
|
3520
3617
|
});
|
|
3521
3618
|
}, { flush: "post" }), z(() => e.items.value.map((e) => $(e)), (e) => {
|
|
3522
3619
|
if (!e.length || !o.value.size) return;
|
|
@@ -3543,7 +3640,7 @@ function vi(e) {
|
|
|
3543
3640
|
let e = $(t.item);
|
|
3544
3641
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
3545
3642
|
}
|
|
3546
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
3643
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, wi(() => {
|
|
3547
3644
|
let e = new Set(s.value);
|
|
3548
3645
|
for (let t of p) e.add(t);
|
|
3549
3646
|
s.value = e;
|
|
@@ -3551,9 +3648,9 @@ function vi(e) {
|
|
|
3551
3648
|
let e = new Map(o.value), t = new Set(s.value);
|
|
3552
3649
|
for (let n of p) e.delete(n), t.delete(n);
|
|
3553
3650
|
o.value = e, s.value = t;
|
|
3554
|
-
},
|
|
3651
|
+
}, _i);
|
|
3555
3652
|
}
|
|
3556
|
-
function g(t, n, r =
|
|
3653
|
+
function g(t, n, r = mi) {
|
|
3557
3654
|
if (!t.size) return;
|
|
3558
3655
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
3559
3656
|
for (let [r, o] of t.entries()) {
|
|
@@ -3572,8 +3669,8 @@ function vi(e) {
|
|
|
3572
3669
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
3573
3670
|
let o = new Map(l.value);
|
|
3574
3671
|
for (let e of a) o.set(e, r);
|
|
3575
|
-
l.value = o,
|
|
3576
|
-
u.value = new Set(a),
|
|
3672
|
+
l.value = o, wi(() => {
|
|
3673
|
+
u.value = new Set(a), wi(() => {
|
|
3577
3674
|
c.value = /* @__PURE__ */ new Map();
|
|
3578
3675
|
});
|
|
3579
3676
|
}), S(() => {
|
|
@@ -3584,8 +3681,8 @@ function vi(e) {
|
|
|
3584
3681
|
}, r);
|
|
3585
3682
|
}
|
|
3586
3683
|
function _(e) {
|
|
3587
|
-
if (n.value.has(e)) return `transform ${
|
|
3588
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
3684
|
+
if (n.value.has(e)) return `transform ${hi}ms ease-out`;
|
|
3685
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? mi}ms ease-out`;
|
|
3589
3686
|
}
|
|
3590
3687
|
function v(e) {
|
|
3591
3688
|
if (!n.value.has(e)) return;
|
|
@@ -3602,7 +3699,7 @@ function vi(e) {
|
|
|
3602
3699
|
} : {
|
|
3603
3700
|
dx: 0,
|
|
3604
3701
|
dy: 0
|
|
3605
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
3702
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Si({
|
|
3606
3703
|
columnWidth: e.columnWidth.value,
|
|
3607
3704
|
direction: u,
|
|
3608
3705
|
itemHeight: o,
|
|
@@ -3616,14 +3713,14 @@ function vi(e) {
|
|
|
3616
3713
|
if (!r) return {
|
|
3617
3714
|
opacity: "0",
|
|
3618
3715
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
3619
|
-
transition: `opacity ${
|
|
3716
|
+
transition: `opacity ${_i}ms ease-out, transform ${_i}ms ease-out`
|
|
3620
3717
|
};
|
|
3621
3718
|
let i = s.value.has(n);
|
|
3622
3719
|
return {
|
|
3623
3720
|
height: `${r.height}px`,
|
|
3624
3721
|
opacity: i ? "0" : "1",
|
|
3625
3722
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
3626
|
-
transition: `opacity ${
|
|
3723
|
+
transition: `opacity ${_i}ms ease-out, transform ${_i}ms ease-out`,
|
|
3627
3724
|
width: `${e.columnWidth.value}px`
|
|
3628
3725
|
};
|
|
3629
3726
|
}
|
|
@@ -3644,28 +3741,28 @@ function vi(e) {
|
|
|
3644
3741
|
playFlipMoveAnimation: g
|
|
3645
3742
|
};
|
|
3646
3743
|
}
|
|
3647
|
-
function
|
|
3744
|
+
function wi(e) {
|
|
3648
3745
|
if (typeof requestAnimationFrame == "function") {
|
|
3649
3746
|
requestAnimationFrame(() => e());
|
|
3650
3747
|
return;
|
|
3651
3748
|
}
|
|
3652
3749
|
setTimeout(e, 0);
|
|
3653
3750
|
}
|
|
3654
|
-
function
|
|
3655
|
-
|
|
3751
|
+
function Ti(e) {
|
|
3752
|
+
wi(() => wi(e));
|
|
3656
3753
|
}
|
|
3657
3754
|
//#endregion
|
|
3658
3755
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
3659
|
-
function
|
|
3756
|
+
function Ei(e, t) {
|
|
3660
3757
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
3661
3758
|
}
|
|
3662
|
-
function
|
|
3759
|
+
function Di(e, t, n) {
|
|
3663
3760
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
3664
3761
|
}
|
|
3665
|
-
function
|
|
3762
|
+
function Oi(e, t, n, r) {
|
|
3666
3763
|
return Math.max(e?.scrollHeight ?? 0, r) - (t + n);
|
|
3667
3764
|
}
|
|
3668
|
-
function
|
|
3765
|
+
function ki(e, t) {
|
|
3669
3766
|
return {
|
|
3670
3767
|
height: `${e}px`,
|
|
3671
3768
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -3673,11 +3770,11 @@ function wi(e, t) {
|
|
|
3673
3770
|
}
|
|
3674
3771
|
//#endregion
|
|
3675
3772
|
//#region src/components/viewer-core/masonryScrollBehavior.ts
|
|
3676
|
-
var
|
|
3677
|
-
function
|
|
3773
|
+
var Ai = 24, ji = 48;
|
|
3774
|
+
function Mi(e) {
|
|
3678
3775
|
let t = D(0), n = 0, r = 0;
|
|
3679
3776
|
function i(e) {
|
|
3680
|
-
if (t.value =
|
|
3777
|
+
if (t.value = Li(e), t.value <= 0) {
|
|
3681
3778
|
o();
|
|
3682
3779
|
return;
|
|
3683
3780
|
}
|
|
@@ -3697,7 +3794,7 @@ function Di(e) {
|
|
|
3697
3794
|
let s = e.getViewport();
|
|
3698
3795
|
if (s && r > 0) {
|
|
3699
3796
|
let n = Math.min(Math.max(0, i - r), 250), a = t.value * n / 1e3;
|
|
3700
|
-
s.scrollTop =
|
|
3797
|
+
s.scrollTop = Ri(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
|
|
3701
3798
|
}
|
|
3702
3799
|
r = i, a();
|
|
3703
3800
|
}
|
|
@@ -3707,44 +3804,44 @@ function Di(e) {
|
|
|
3707
3804
|
stop: o
|
|
3708
3805
|
};
|
|
3709
3806
|
}
|
|
3710
|
-
function
|
|
3807
|
+
function Ni(e) {
|
|
3711
3808
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3712
3809
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3713
|
-
return t <= 0 ? 1 :
|
|
3810
|
+
return t <= 0 ? 1 : Ri(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3714
3811
|
}
|
|
3715
|
-
function
|
|
3812
|
+
function Pi(e) {
|
|
3716
3813
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3717
3814
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3718
|
-
return t <= 0 ? 1 :
|
|
3815
|
+
return t <= 0 ? 1 : Ri(e.progressDistancePx / t, 0, 1);
|
|
3719
3816
|
}
|
|
3720
|
-
function
|
|
3721
|
-
let t = i(() => Math.max(0, e.viewportHeight.value -
|
|
3817
|
+
function Fi(e) {
|
|
3818
|
+
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
3819
|
if (!n.value) return 0;
|
|
3723
3820
|
let r = e.viewportHeight.value / e.containerHeight.value * t.value;
|
|
3724
|
-
return Math.min(t.value, Math.max(
|
|
3821
|
+
return Math.min(t.value, Math.max(ji, r));
|
|
3725
3822
|
}), a = i(() => {
|
|
3726
|
-
if (!n.value) return
|
|
3823
|
+
if (!n.value) return Ai;
|
|
3727
3824
|
let i = Math.max(0, e.containerHeight.value - e.viewportHeight.value);
|
|
3728
|
-
return
|
|
3825
|
+
return Ai + Math.max(0, t.value - r.value) * (i > 0 ? Ri(e.scrollTop.value / i, 0, 1) : 0);
|
|
3729
3826
|
});
|
|
3730
3827
|
return {
|
|
3731
|
-
getScrollbarThumbStyle: () =>
|
|
3828
|
+
getScrollbarThumbStyle: () => ki(r.value, a.value),
|
|
3732
3829
|
showScrollbar: n
|
|
3733
3830
|
};
|
|
3734
3831
|
}
|
|
3735
|
-
function
|
|
3832
|
+
function Ii(e) {
|
|
3736
3833
|
return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3737
3834
|
}
|
|
3738
|
-
function
|
|
3835
|
+
function Li(e) {
|
|
3739
3836
|
return Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3740
3837
|
}
|
|
3741
|
-
function
|
|
3838
|
+
function Ri(e, t, n) {
|
|
3742
3839
|
return Math.min(Math.max(e, t), n);
|
|
3743
3840
|
}
|
|
3744
3841
|
//#endregion
|
|
3745
3842
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
3746
|
-
var
|
|
3747
|
-
function
|
|
3843
|
+
var zi = 250, Bi = 1e3;
|
|
3844
|
+
function Vi(e) {
|
|
3748
3845
|
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
3846
|
x(() => {
|
|
3750
3847
|
S();
|
|
@@ -3767,7 +3864,7 @@ function Ii(e) {
|
|
|
3767
3864
|
if (!C(t) || !e.isAtBoundary()) return;
|
|
3768
3865
|
let n = Date.now();
|
|
3769
3866
|
if (!(n < c)) {
|
|
3770
|
-
if (c = n +
|
|
3867
|
+
if (c = n + zi, a.value) {
|
|
3771
3868
|
s.value = !0;
|
|
3772
3869
|
return;
|
|
3773
3870
|
}
|
|
@@ -3806,7 +3903,7 @@ function Ii(e) {
|
|
|
3806
3903
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3807
3904
|
}
|
|
3808
3905
|
function v() {
|
|
3809
|
-
o.value = !1, y(
|
|
3906
|
+
o.value = !1, y(Bi);
|
|
3810
3907
|
}
|
|
3811
3908
|
function y(e) {
|
|
3812
3909
|
S(), a.value = !0, l = setTimeout(() => {
|
|
@@ -3838,7 +3935,7 @@ function Ii(e) {
|
|
|
3838
3935
|
}
|
|
3839
3936
|
//#endregion
|
|
3840
3937
|
//#region src/components/viewer-core/masonryBoundaryLock.ts
|
|
3841
|
-
function
|
|
3938
|
+
function Hi() {
|
|
3842
3939
|
let e = D(!1), t = null;
|
|
3843
3940
|
x(() => {
|
|
3844
3941
|
r();
|
|
@@ -3859,8 +3956,8 @@ function Li() {
|
|
|
3859
3956
|
}
|
|
3860
3957
|
//#endregion
|
|
3861
3958
|
//#region src/components/viewer-core/masonryItemMutation.ts
|
|
3862
|
-
function
|
|
3863
|
-
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r =
|
|
3959
|
+
function Ui(e) {
|
|
3960
|
+
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
3961
|
return {
|
|
3865
3962
|
addedItems: s,
|
|
3866
3963
|
anchorId: d ? $(d) : null,
|
|
@@ -3872,7 +3969,7 @@ function Ri(e) {
|
|
|
3872
3969
|
shouldResetScrollForEmptyRemoval: e.currentItems.length === 0 && e.previousItems.length > 0 && c.length > 0 && e.scrollTop > 0
|
|
3873
3970
|
};
|
|
3874
3971
|
}
|
|
3875
|
-
function
|
|
3972
|
+
function Wi(e, t, n, r) {
|
|
3876
3973
|
return e.flatMap((e) => {
|
|
3877
3974
|
let i = $(e);
|
|
3878
3975
|
if (t.has(i)) return [];
|
|
@@ -3884,7 +3981,7 @@ function zi(e, t, n, r) {
|
|
|
3884
3981
|
}] : [];
|
|
3885
3982
|
});
|
|
3886
3983
|
}
|
|
3887
|
-
function
|
|
3984
|
+
function Gi(e, t, n) {
|
|
3888
3985
|
let r = /* @__PURE__ */ new Map();
|
|
3889
3986
|
for (let i of e) {
|
|
3890
3987
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3892,7 +3989,7 @@ function Bi(e, t, n) {
|
|
|
3892
3989
|
}
|
|
3893
3990
|
return r;
|
|
3894
3991
|
}
|
|
3895
|
-
function
|
|
3992
|
+
function Ki(e, t, n) {
|
|
3896
3993
|
let r = /* @__PURE__ */ new Map();
|
|
3897
3994
|
for (let i of e) {
|
|
3898
3995
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3902,7 +3999,7 @@ function Vi(e, t, n) {
|
|
|
3902
3999
|
}
|
|
3903
4000
|
//#endregion
|
|
3904
4001
|
//#region src/components/viewer-core/masonryPendingAppend.ts
|
|
3905
|
-
function
|
|
4002
|
+
function qi(e) {
|
|
3906
4003
|
let t = D(null), n = D(!1), r = null;
|
|
3907
4004
|
function i() {
|
|
3908
4005
|
o(), e.pendingAppendItems.value.length && (t.value = c([...e.items.value, ...e.pendingAppendItems.value]), s());
|
|
@@ -3925,12 +4022,12 @@ function Hi(e) {
|
|
|
3925
4022
|
}, 300));
|
|
3926
4023
|
}
|
|
3927
4024
|
function c(t) {
|
|
3928
|
-
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ?
|
|
4025
|
+
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? cr(e.pendingAppendItems.value, {
|
|
3929
4026
|
columnHeights: e.columnHeights.value,
|
|
3930
4027
|
columnWidth: e.columnWidth.value,
|
|
3931
4028
|
contentHeight: e.contentHeight.value,
|
|
3932
4029
|
gapY: e.gapPx
|
|
3933
|
-
}) + e.contentInsetPx * 2 :
|
|
4030
|
+
}) + e.contentInsetPx * 2 : or(t, {
|
|
3934
4031
|
bucketPx: e.bucketPx,
|
|
3935
4032
|
columnCount: e.columnCount.value,
|
|
3936
4033
|
columnWidth: e.columnWidth.value,
|
|
@@ -3947,42 +4044,42 @@ function Hi(e) {
|
|
|
3947
4044
|
}
|
|
3948
4045
|
//#endregion
|
|
3949
4046
|
//#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 =
|
|
4047
|
+
var Ji = 600, Yi = 24, Xi = 16, Zi = 300, Qi = 200, $i = 0, ea = 1, ta = Yi + Xi, na = 200, ra = 500, ia = 1e3;
|
|
4048
|
+
function aa(e) {
|
|
4049
|
+
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({
|
|
4050
|
+
bucketPx: Ji,
|
|
4051
|
+
contentInsetPx: Yi,
|
|
4052
|
+
gapPx: Xi
|
|
4053
|
+
}), { 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
4054
|
itemCount: e.items.value.length,
|
|
3958
4055
|
viewportHeight: r.value,
|
|
3959
4056
|
scrollTop: n.value,
|
|
3960
|
-
overscanPx:
|
|
3961
|
-
bucketPx:
|
|
4057
|
+
overscanPx: Qi,
|
|
4058
|
+
bucketPx: Ji,
|
|
3962
4059
|
buckets: s.value
|
|
3963
4060
|
})), w = i(() => C.value.map((t) => ({
|
|
3964
4061
|
item: e.items.value[t],
|
|
3965
4062
|
index: t
|
|
3966
4063
|
}))), 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(() =>
|
|
4064
|
+
let e = l.value + Yi * 2, t = I.reservedContentHeight.value ?? 0;
|
|
4065
|
+
return Math.max(e, t, r.value) + na + y.value;
|
|
4066
|
+
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Pi({
|
|
3970
4067
|
active: e.active.value,
|
|
3971
4068
|
maxScrollTop: Y(),
|
|
3972
4069
|
progressDistancePx: n.value,
|
|
3973
|
-
thresholdPx:
|
|
4070
|
+
thresholdPx: $i,
|
|
3974
4071
|
triggerEnabled: E.value
|
|
3975
|
-
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() =>
|
|
4072
|
+
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() => Ni({
|
|
3976
4073
|
active: e.active.value,
|
|
3977
4074
|
maxScrollTop: Y(),
|
|
3978
4075
|
progressDistancePx: n.value,
|
|
3979
|
-
thresholdPx:
|
|
4076
|
+
thresholdPx: ta,
|
|
3980
4077
|
triggerEnabled: e.hasPreviousPage.value
|
|
3981
|
-
})), j =
|
|
4078
|
+
})), j = Fi({
|
|
3982
4079
|
containerHeight: T,
|
|
3983
4080
|
scrollTop: n,
|
|
3984
4081
|
viewportHeight: r
|
|
3985
|
-
}), M =
|
|
4082
|
+
}), M = Ci({
|
|
3986
4083
|
items: e.items,
|
|
3987
4084
|
visibleIndices: C,
|
|
3988
4085
|
positions: f,
|
|
@@ -3991,44 +4088,44 @@ function ea(e) {
|
|
|
3991
4088
|
columnWidth: v,
|
|
3992
4089
|
scrollTop: n,
|
|
3993
4090
|
viewportHeight: r
|
|
3994
|
-
}), N =
|
|
4091
|
+
}), N = Vi({
|
|
3995
4092
|
direction: "top",
|
|
3996
4093
|
getAnimationLockMs(e) {
|
|
3997
|
-
return Math.max(
|
|
4094
|
+
return Math.max(ra, bi(e)) + ia;
|
|
3998
4095
|
},
|
|
3999
4096
|
hasPage: e.hasPreviousPage,
|
|
4000
4097
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4001
4098
|
isAtBoundary() {
|
|
4002
|
-
return n.value <=
|
|
4099
|
+
return n.value <= ta;
|
|
4003
4100
|
},
|
|
4004
4101
|
loading: e.loading,
|
|
4005
4102
|
requestPage: e.requestPreviousPage
|
|
4006
|
-
}), P =
|
|
4103
|
+
}), P = Vi({
|
|
4007
4104
|
direction: "bottom",
|
|
4008
4105
|
getAnimationLockMs(e) {
|
|
4009
|
-
return
|
|
4106
|
+
return bi(e) + ia;
|
|
4010
4107
|
},
|
|
4011
4108
|
hasPage: E,
|
|
4012
4109
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4013
4110
|
isAtBoundary() {
|
|
4014
|
-
return J() <=
|
|
4111
|
+
return J() <= ea;
|
|
4015
4112
|
},
|
|
4016
4113
|
loading: e.loading,
|
|
4017
4114
|
requestPage: e.requestNextPage
|
|
4018
|
-
}), F =
|
|
4115
|
+
}), F = Mi({
|
|
4019
4116
|
active: e.active,
|
|
4020
4117
|
getMaxScrollTop: Y,
|
|
4021
4118
|
getViewport: () => t.value,
|
|
4022
4119
|
onScroll: ee
|
|
4023
|
-
}), I =
|
|
4024
|
-
bucketPx:
|
|
4120
|
+
}), I = qi({
|
|
4121
|
+
bucketPx: Ji,
|
|
4025
4122
|
columnHeights: c,
|
|
4026
4123
|
columnCount: g,
|
|
4027
4124
|
columnWidth: v,
|
|
4028
4125
|
commitPendingAppend: e.commitPendingAppend,
|
|
4029
4126
|
contentHeight: l,
|
|
4030
|
-
contentInsetPx:
|
|
4031
|
-
gapPx:
|
|
4127
|
+
contentInsetPx: Yi,
|
|
4128
|
+
gapPx: Xi,
|
|
4032
4129
|
items: e.items,
|
|
4033
4130
|
pendingAppendItems: e.pendingAppendItems
|
|
4034
4131
|
}), L = null, R = 0;
|
|
@@ -4037,20 +4134,20 @@ function ea(e) {
|
|
|
4037
4134
|
g,
|
|
4038
4135
|
v
|
|
4039
4136
|
], async ([t], [r = []]) => {
|
|
4040
|
-
let i =
|
|
4137
|
+
let i = Ui({
|
|
4041
4138
|
activeIndex: b.value,
|
|
4042
|
-
contentInsetPx:
|
|
4139
|
+
contentInsetPx: Yi,
|
|
4043
4140
|
currentItems: t,
|
|
4044
|
-
gapPx:
|
|
4141
|
+
gapPx: Xi,
|
|
4045
4142
|
layoutHeights: u.value,
|
|
4046
4143
|
layoutIndexById: d.value,
|
|
4047
4144
|
layoutPositions: f.value,
|
|
4048
4145
|
previousItems: r ?? [],
|
|
4049
4146
|
scrollTop: n.value
|
|
4050
4147
|
});
|
|
4051
|
-
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(
|
|
4148
|
+
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(xi() + ia), i.shouldResetScrollForEmptyRemoval && W();
|
|
4052
4149
|
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 ?
|
|
4150
|
+
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
4151
|
}, { immediate: !0 }), z([
|
|
4055
4152
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
4056
4153
|
g,
|
|
@@ -4064,20 +4161,20 @@ function ea(e) {
|
|
|
4064
4161
|
}
|
|
4065
4162
|
if (F.start(), !a || i !== !1 || p.value == null) return;
|
|
4066
4163
|
await _();
|
|
4067
|
-
let o = Math.max(0, T.value - r.value), s =
|
|
4164
|
+
let o = Math.max(0, T.value - r.value), s = oa(p.value, 0, o);
|
|
4068
4165
|
a.scrollTop = s, n.value = s, N.syncBoundary(), P.syncBoundary();
|
|
4069
4166
|
}), z(() => e.loading.value, async (e) => {
|
|
4070
4167
|
I.clearReservedHeightWhenIdle(e), N.onLoadingChange(e), P.onLoadingChange(e), await _();
|
|
4071
4168
|
}), S(async () => {
|
|
4072
|
-
K(), await _(), b.value > 0 ? H(b.value, "center") :
|
|
4169
|
+
K(), await _(), b.value > 0 ? H(b.value, "center") : G(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
|
|
4073
4170
|
K();
|
|
4074
4171
|
}), t.value && L.observe(t.value)) : window.addEventListener("resize", K);
|
|
4075
4172
|
}), x(() => {
|
|
4076
4173
|
L?.disconnect(), L = null, window.removeEventListener("resize", K), I.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), R &&= (cancelAnimationFrame(R), 0), F.stop();
|
|
4077
4174
|
});
|
|
4078
4175
|
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,
|
|
4176
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(), N.syncBoundary("scroll"), P.syncBoundary("scroll"), ne(), !te() && (R ||= requestAnimationFrame(() => {
|
|
4177
|
+
R = 0, G();
|
|
4081
4178
|
})));
|
|
4082
4179
|
}
|
|
4083
4180
|
function B(t) {
|
|
@@ -4097,7 +4194,7 @@ function ea(e) {
|
|
|
4097
4194
|
let a = t.value, o = f.value[e], s = u.value[e];
|
|
4098
4195
|
if (!a || !o || !s) return;
|
|
4099
4196
|
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 -
|
|
4197
|
+
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
4198
|
}
|
|
4102
4199
|
function U(e, r) {
|
|
4103
4200
|
let i = t.value, a = r.get(e), o = d.value.get(e), s = o == null ? null : f.value[o];
|
|
@@ -4105,7 +4202,7 @@ function ea(e) {
|
|
|
4105
4202
|
let c = s.y - a.y;
|
|
4106
4203
|
i.scrollTop += c, n.value = i.scrollTop;
|
|
4107
4204
|
}
|
|
4108
|
-
function
|
|
4205
|
+
function W() {
|
|
4109
4206
|
let e = t.value;
|
|
4110
4207
|
if (!e) {
|
|
4111
4208
|
n.value = 0;
|
|
@@ -4113,8 +4210,8 @@ function ea(e) {
|
|
|
4113
4210
|
}
|
|
4114
4211
|
e.scrollTop = 0, n.value = 0, N.syncBoundary(), P.syncBoundary();
|
|
4115
4212
|
}
|
|
4116
|
-
function
|
|
4117
|
-
if (!C.value.length ||
|
|
4213
|
+
function G() {
|
|
4214
|
+
if (!C.value.length || te()) return;
|
|
4118
4215
|
let t = n.value + r.value / 2, i = b.value, a = Infinity;
|
|
4119
4216
|
for (let e of C.value) {
|
|
4120
4217
|
let n = f.value[e], r = u.value[e];
|
|
@@ -4124,8 +4221,8 @@ function ea(e) {
|
|
|
4124
4221
|
}
|
|
4125
4222
|
e.setActiveIndex(i);
|
|
4126
4223
|
}
|
|
4127
|
-
function
|
|
4128
|
-
let t = n.value <=
|
|
4224
|
+
function te() {
|
|
4225
|
+
let t = n.value <= ta, r = J() <= ea;
|
|
4129
4226
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
4130
4227
|
}
|
|
4131
4228
|
function ne() {
|
|
@@ -4135,13 +4232,13 @@ function ea(e) {
|
|
|
4135
4232
|
r.value = q(), a.value = re();
|
|
4136
4233
|
}
|
|
4137
4234
|
function q() {
|
|
4138
|
-
return
|
|
4235
|
+
return Ei(t.value, r.value);
|
|
4139
4236
|
}
|
|
4140
4237
|
function re() {
|
|
4141
|
-
return
|
|
4238
|
+
return Di(t.value, a.value, Zi);
|
|
4142
4239
|
}
|
|
4143
4240
|
function J() {
|
|
4144
|
-
return
|
|
4241
|
+
return Oi(t.value, n.value, r.value, T.value);
|
|
4145
4242
|
}
|
|
4146
4243
|
function Y() {
|
|
4147
4244
|
let e = Math.max(t.value?.scrollHeight ?? 0, T.value);
|
|
@@ -4167,17 +4264,17 @@ function ea(e) {
|
|
|
4167
4264
|
scrollViewportRef: t
|
|
4168
4265
|
};
|
|
4169
4266
|
}
|
|
4170
|
-
function
|
|
4267
|
+
function oa(e, t, n) {
|
|
4171
4268
|
return Math.min(Math.max(e, t), n);
|
|
4172
4269
|
}
|
|
4173
4270
|
//#endregion
|
|
4174
4271
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
4175
|
-
function
|
|
4272
|
+
function sa(e) {
|
|
4176
4273
|
if (e) try {
|
|
4177
4274
|
e.removeAttribute("src"), e.src = "";
|
|
4178
4275
|
} catch {}
|
|
4179
4276
|
}
|
|
4180
|
-
function
|
|
4277
|
+
function ca(e) {
|
|
4181
4278
|
if (e) {
|
|
4182
4279
|
try {
|
|
4183
4280
|
e.currentTime = 0;
|
|
@@ -4188,12 +4285,12 @@ function ra(e) {
|
|
|
4188
4285
|
} catch {}
|
|
4189
4286
|
}
|
|
4190
4287
|
}
|
|
4191
|
-
function
|
|
4288
|
+
function la(e, t) {
|
|
4192
4289
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
4193
4290
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
4194
4291
|
return e.bottom > 0 && e.top < n;
|
|
4195
4292
|
}
|
|
4196
|
-
function
|
|
4293
|
+
function ua(e) {
|
|
4197
4294
|
if (!e) return null;
|
|
4198
4295
|
try {
|
|
4199
4296
|
return new URL(e, window.location.href).href;
|
|
@@ -4203,9 +4300,9 @@ function aa(e) {
|
|
|
4203
4300
|
}
|
|
4204
4301
|
//#endregion
|
|
4205
4302
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
4206
|
-
function
|
|
4303
|
+
function da(e) {
|
|
4207
4304
|
let t = D(null), n = i(() => {
|
|
4208
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
4305
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? ua(e.item.value.healthCheck.url) : null;
|
|
4209
4306
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
4210
4307
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
4211
4308
|
z(n, (e, n) => {
|
|
@@ -4283,14 +4380,14 @@ function oa(e) {
|
|
|
4283
4380
|
}
|
|
4284
4381
|
//#endregion
|
|
4285
4382
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
4286
|
-
var
|
|
4383
|
+
var fa = ["aria-label"], pa = {
|
|
4287
4384
|
key: 0,
|
|
4288
4385
|
"data-testid": "vibe-list-card-spinner",
|
|
4289
4386
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
4290
|
-
},
|
|
4387
|
+
}, 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
4388
|
key: 4,
|
|
4292
4389
|
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
|
-
},
|
|
4390
|
+
}, 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
4391
|
__name: "ListCard",
|
|
4295
4392
|
props: {
|
|
4296
4393
|
active: {
|
|
@@ -4314,9 +4411,9 @@ var sa = ["aria-label"], ca = {
|
|
|
4314
4411
|
},
|
|
4315
4412
|
emits: ["open"],
|
|
4316
4413
|
setup(e, { emit: t }) {
|
|
4317
|
-
let n = e, r = t, l = i(() =>
|
|
4414
|
+
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
4415
|
attachedAssetUrl: E,
|
|
4319
|
-
getPriority:
|
|
4416
|
+
getPriority: ce,
|
|
4320
4417
|
isInView: d,
|
|
4321
4418
|
isReady: m,
|
|
4322
4419
|
item: i(() => n.item),
|
|
@@ -4357,10 +4454,10 @@ var sa = ["aria-label"], ca = {
|
|
|
4357
4454
|
}), x(() => {
|
|
4358
4455
|
re(), P.release(), B?.disconnect(), B = null;
|
|
4359
4456
|
});
|
|
4360
|
-
function
|
|
4457
|
+
function W() {
|
|
4361
4458
|
le(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
|
|
4362
4459
|
}
|
|
4363
|
-
async function
|
|
4460
|
+
async function G() {
|
|
4364
4461
|
if (!le(_.value)) return;
|
|
4365
4462
|
let e = E.value ?? n.item.url;
|
|
4366
4463
|
m.value = !1, g.value = "generic";
|
|
@@ -4373,7 +4470,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4373
4470
|
surface: "grid"
|
|
4374
4471
|
}), J();
|
|
4375
4472
|
}
|
|
4376
|
-
function
|
|
4473
|
+
function te() {
|
|
4377
4474
|
le(C.value) && (h.value = !0, m.value = !0, g.value = null, ie(E.value ?? n.item.url), J(), q());
|
|
4378
4475
|
}
|
|
4379
4476
|
function ne() {
|
|
@@ -4398,7 +4495,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4398
4495
|
}
|
|
4399
4496
|
V = Jt.request({
|
|
4400
4497
|
assetType: l.value.kind,
|
|
4401
|
-
getPriority:
|
|
4498
|
+
getPriority: ce,
|
|
4402
4499
|
onGrant() {
|
|
4403
4500
|
T.value = !0, m.value = !1, g.value = null;
|
|
4404
4501
|
},
|
|
@@ -4423,7 +4520,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4423
4520
|
}
|
|
4424
4521
|
}
|
|
4425
4522
|
function re(e = !0) {
|
|
4426
|
-
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (oe(),
|
|
4523
|
+
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (oe(), X()), J();
|
|
4427
4524
|
}
|
|
4428
4525
|
function J() {
|
|
4429
4526
|
V?.release(), V = null;
|
|
@@ -4434,7 +4531,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4434
4531
|
d.value = !0;
|
|
4435
4532
|
return;
|
|
4436
4533
|
}
|
|
4437
|
-
d.value =
|
|
4534
|
+
d.value = la(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
4438
4535
|
}
|
|
4439
4536
|
function ie(e) {
|
|
4440
4537
|
if (!e) return;
|
|
@@ -4454,12 +4551,12 @@ var sa = ["aria-label"], ca = {
|
|
|
4454
4551
|
}), g.value = null, m.value = !1, T.value = !1, J(), K();
|
|
4455
4552
|
}
|
|
4456
4553
|
function oe() {
|
|
4457
|
-
|
|
4458
|
-
}
|
|
4459
|
-
function se() {
|
|
4460
|
-
ra(C.value);
|
|
4554
|
+
sa(_.value);
|
|
4461
4555
|
}
|
|
4462
4556
|
function X() {
|
|
4557
|
+
ca(C.value);
|
|
4558
|
+
}
|
|
4559
|
+
function ce() {
|
|
4463
4560
|
let e = y.value;
|
|
4464
4561
|
if (!e) return Infinity;
|
|
4465
4562
|
let t = e.getBoundingClientRect();
|
|
@@ -4471,8 +4568,8 @@ var sa = ["aria-label"], ca = {
|
|
|
4471
4568
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
4472
4569
|
}
|
|
4473
4570
|
function le(e) {
|
|
4474
|
-
let t =
|
|
4475
|
-
return !e || !t ? !1 :
|
|
4571
|
+
let t = ua(E.value);
|
|
4572
|
+
return !e || !t ? !1 : ua("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
4476
4573
|
}
|
|
4477
4574
|
function ue() {
|
|
4478
4575
|
r("open");
|
|
@@ -4500,8 +4597,8 @@ var sa = ["aria-label"], ca = {
|
|
|
4500
4597
|
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
4598
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
4502
4599
|
onClick: ue
|
|
4503
|
-
}, null, 8,
|
|
4504
|
-
ee.value ? (w(), s("div",
|
|
4600
|
+
}, null, 8, fa),
|
|
4601
|
+
ee.value ? (w(), s("div", pa, [c("span", ma, [u(F(se), {
|
|
4505
4602
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
4506
4603
|
"aria-hidden": "true"
|
|
4507
4604
|
})])])) : o("", !0),
|
|
@@ -4513,9 +4610,9 @@ var sa = ["aria-label"], ca = {
|
|
|
4513
4610
|
alt: l.value.label,
|
|
4514
4611
|
draggable: "false",
|
|
4515
4612
|
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,
|
|
4613
|
+
onLoad: W,
|
|
4614
|
+
onError: G
|
|
4615
|
+
}, null, 42, ha)) : N.value && E.value && !L.value ? (w(), s("video", {
|
|
4519
4616
|
key: 2,
|
|
4520
4617
|
ref_key: "videoRef",
|
|
4521
4618
|
ref: C,
|
|
@@ -4525,37 +4622,37 @@ var sa = ["aria-label"], ca = {
|
|
|
4525
4622
|
playsinline: "",
|
|
4526
4623
|
preload: "metadata",
|
|
4527
4624
|
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:
|
|
4625
|
+
onCanplay: te,
|
|
4626
|
+
onError: G,
|
|
4530
4627
|
onLoadstart: ne,
|
|
4531
|
-
onPlaying:
|
|
4628
|
+
onPlaying: te,
|
|
4532
4629
|
onStalled: ne,
|
|
4533
4630
|
onWaiting: ne
|
|
4534
|
-
}, null, 42,
|
|
4631
|
+
}, null, 42, ga)) : L.value ? (w(), s("div", {
|
|
4535
4632
|
key: 3,
|
|
4536
4633
|
"data-testid": "vibe-list-card-error",
|
|
4537
4634
|
"data-kind": I.value,
|
|
4538
4635
|
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",
|
|
4636
|
+
}, [c("div", va, [
|
|
4540
4637
|
u(F(de), {
|
|
4541
4638
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4542
4639
|
"aria-hidden": "true"
|
|
4543
4640
|
}),
|
|
4544
|
-
c("span",
|
|
4641
|
+
c("span", ya, M(F(yn)(I.value)), 1),
|
|
4545
4642
|
R.value ? (w(), s("button", {
|
|
4546
4643
|
key: 0,
|
|
4547
4644
|
type: "button",
|
|
4548
4645
|
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
4646
|
onClick: H(ae, ["stop"])
|
|
4550
4647
|
}, " Retry ")) : o("", !0)
|
|
4551
|
-
])], 8,
|
|
4648
|
+
])], 8, _a)) : (w(), s("div", ba, [c("div", xa, [k(e.$slots, "item-icon", {
|
|
4552
4649
|
icon: F(Gt)(n.item.type),
|
|
4553
4650
|
item: n.item
|
|
4554
4651
|
}, () => [(w(), a(A(F(Gt)(n.item.type)), {
|
|
4555
4652
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4556
4653
|
"aria-hidden": "true"
|
|
4557
4654
|
}))])])])),
|
|
4558
|
-
c("div",
|
|
4655
|
+
c("div", Sa, [k(e.$slots, "grid-item-overlay", {
|
|
4559
4656
|
active: n.active,
|
|
4560
4657
|
focused: f.value,
|
|
4561
4658
|
hovered: p.value,
|
|
@@ -4565,24 +4662,24 @@ var sa = ["aria-label"], ca = {
|
|
|
4565
4662
|
})])
|
|
4566
4663
|
], 34));
|
|
4567
4664
|
}
|
|
4568
|
-
}),
|
|
4665
|
+
}), 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
4666
|
"data-testid": "vibe-pagination",
|
|
4570
4667
|
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
|
-
},
|
|
4668
|
+
}, Da = { class: "whitespace-nowrap" }, Oa = {
|
|
4572
4669
|
key: 0,
|
|
4573
4670
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
4574
|
-
},
|
|
4671
|
+
}, ka = [
|
|
4575
4672
|
"data-active",
|
|
4576
4673
|
"data-index",
|
|
4577
4674
|
"data-item-id",
|
|
4578
4675
|
"data-occurrence-key"
|
|
4579
|
-
],
|
|
4676
|
+
], Aa = ["data-item-id"], ja = {
|
|
4580
4677
|
key: 0,
|
|
4581
4678
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
4582
|
-
},
|
|
4679
|
+
}, Ma = {
|
|
4583
4680
|
key: 1,
|
|
4584
4681
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
4585
|
-
},
|
|
4682
|
+
}, Na = { class: "mx-auto flex w-full justify-center" }, Pa = /* @__PURE__ */ d({
|
|
4586
4683
|
__name: "ListSurface",
|
|
4587
4684
|
props: {
|
|
4588
4685
|
active: {
|
|
@@ -4644,7 +4741,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4644
4741
|
"update:activeIndex"
|
|
4645
4742
|
],
|
|
4646
4743
|
setup(e, { expose: n, emit: r }) {
|
|
4647
|
-
let d = e, f = L(), p = r, m =
|
|
4744
|
+
let d = e, f = L(), p = r, m = aa({
|
|
4648
4745
|
active: N(d, "active"),
|
|
4649
4746
|
allowExhaustedNextPageRefresh: N(d, "allowExhaustedNextPageRefresh"),
|
|
4650
4747
|
bottomLoadBufferPx: N(d, "bottomLoadBufferPx"),
|
|
@@ -4692,8 +4789,8 @@ var sa = ["aria-label"], ca = {
|
|
|
4692
4789
|
nextBoundaryLoadProgress: e,
|
|
4693
4790
|
previousBoundaryLoadProgress: t
|
|
4694
4791
|
});
|
|
4695
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
4696
|
-
c("div",
|
|
4792
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", wa, [
|
|
4793
|
+
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
4794
|
c("div", {
|
|
4698
4795
|
ref: F(m).scrollViewportRef,
|
|
4699
4796
|
"data-testid": "vibe-list-scroll",
|
|
@@ -4714,7 +4811,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4714
4811
|
"data-occurrence-key": F($)(t),
|
|
4715
4812
|
class: "absolute will-change-transform",
|
|
4716
4813
|
style: b(F(m).getCardStyle(n))
|
|
4717
|
-
}, [u(
|
|
4814
|
+
}, [u(Ca, {
|
|
4718
4815
|
active: n === F(m).resolvedActiveIndex.value,
|
|
4719
4816
|
index: n,
|
|
4720
4817
|
item: t,
|
|
@@ -4738,14 +4835,14 @@ var sa = ["aria-label"], ca = {
|
|
|
4738
4835
|
"report-asset-load",
|
|
4739
4836
|
"surface-active",
|
|
4740
4837
|
"onOpen"
|
|
4741
|
-
])], 12,
|
|
4838
|
+
])], 12, ka))), 128)),
|
|
4742
4839
|
(w(!0), s(t, null, O(F(m).leavingItems.value, (t) => (w(), s("article", {
|
|
4743
4840
|
key: `leaving-${F($)(t.item)}`,
|
|
4744
4841
|
"data-testid": "vibe-list-card-leaving",
|
|
4745
4842
|
"data-item-id": t.item.id,
|
|
4746
4843
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
4747
4844
|
style: b(F(m).getLeavingCardStyle(t.item))
|
|
4748
|
-
}, [u(
|
|
4845
|
+
}, [u(Ca, {
|
|
4749
4846
|
active: !1,
|
|
4750
4847
|
index: -1,
|
|
4751
4848
|
item: t.item,
|
|
@@ -4760,8 +4857,8 @@ var sa = ["aria-label"], ca = {
|
|
|
4760
4857
|
"item",
|
|
4761
4858
|
"report-asset-error",
|
|
4762
4859
|
"report-asset-load"
|
|
4763
|
-
])], 12,
|
|
4764
|
-
F(j) && F(E) ? (w(), a(
|
|
4860
|
+
])], 12, Aa))), 128)),
|
|
4861
|
+
F(j) && F(E) ? (w(), a(Pr, {
|
|
4765
4862
|
key: 0,
|
|
4766
4863
|
message: F(E).message,
|
|
4767
4864
|
mode: F(E).mode,
|
|
@@ -4775,12 +4872,12 @@ var sa = ["aria-label"], ca = {
|
|
|
4775
4872
|
"surface"
|
|
4776
4873
|
])) : o("", !0)
|
|
4777
4874
|
], 4)], 544),
|
|
4778
|
-
F(m).showScrollbar.value ? (w(), s("div",
|
|
4875
|
+
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
4876
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
4780
4877
|
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
4878
|
style: b(F(m).getScrollbarThumbStyle())
|
|
4782
4879
|
}, null, 6)])) : o("", !0),
|
|
4783
|
-
f["grid-footer"] ? (w(), s("div",
|
|
4880
|
+
f["grid-footer"] ? (w(), s("div", Ma, [c("div", Na, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
4784
4881
|
x.value ? (w(), s("div", {
|
|
4785
4882
|
key: 2,
|
|
4786
4883
|
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 +4886,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4789
4886
|
"data-testid": "vibe-grid-status-badge",
|
|
4790
4887
|
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
4888
|
}, M(x.value.message), 3))], 2)) : o("", !0),
|
|
4792
|
-
F(D) && F(E) ? (w(), a(
|
|
4889
|
+
F(D) && F(E) ? (w(), a(Pr, {
|
|
4793
4890
|
key: 3,
|
|
4794
4891
|
class: v(["z-[3]", f["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
4795
4892
|
message: F(E).message,
|
|
@@ -4806,13 +4903,13 @@ var sa = ["aria-label"], ca = {
|
|
|
4806
4903
|
])) : o("", !0)
|
|
4807
4904
|
]));
|
|
4808
4905
|
}
|
|
4809
|
-
}),
|
|
4906
|
+
}), Fa = ["data-surface-mode"], Ia = {
|
|
4810
4907
|
key: 1,
|
|
4811
4908
|
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
|
-
},
|
|
4909
|
+
}, La = ["data-visible", "inert"], Ra = ["data-visible", "inert"], za = {
|
|
4813
4910
|
key: 3,
|
|
4814
4911
|
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
|
-
},
|
|
4912
|
+
}, Ba = /* @__PURE__ */ d({
|
|
4816
4913
|
name: "VibeLayout",
|
|
4817
4914
|
__name: "Layout",
|
|
4818
4915
|
props: {
|
|
@@ -4880,7 +4977,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4880
4977
|
type: "button",
|
|
4881
4978
|
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
4979
|
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",
|
|
4980
|
+
}, " 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
4981
|
appear: "",
|
|
4885
4982
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4886
4983
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4894,7 +4991,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4894
4991
|
"data-visible": F(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4895
4992
|
inert: F(h).surfaceMode.value !== "list",
|
|
4896
4993
|
class: "absolute inset-0 z-[2]"
|
|
4897
|
-
}, [u(
|
|
4994
|
+
}, [u(Pa, {
|
|
4898
4995
|
ref_key: "listSurfaceRef",
|
|
4899
4996
|
ref: g,
|
|
4900
4997
|
active: F(h).surfaceMode.value === "list",
|
|
@@ -4968,7 +5065,7 @@ var sa = ["aria-label"], ca = {
|
|
|
4968
5065
|
"onBoundaryLoadProgress",
|
|
4969
5066
|
"onOpenFullscreen",
|
|
4970
5067
|
"onUpdate:activeIndex"
|
|
4971
|
-
])], 8,
|
|
5068
|
+
])], 8, La), [[R, F(h).surfaceMode.value === "list"]])]),
|
|
4972
5069
|
_: 3
|
|
4973
5070
|
}), u(r, {
|
|
4974
5071
|
appear: "",
|
|
@@ -4984,11 +5081,19 @@ var sa = ["aria-label"], ca = {
|
|
|
4984
5081
|
"data-visible": F(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
4985
5082
|
inert: F(h).surfaceMode.value !== "fullscreen",
|
|
4986
5083
|
class: "absolute inset-0 z-[3]"
|
|
4987
|
-
}, [u(
|
|
5084
|
+
}, [u(fi, {
|
|
4988
5085
|
items: F(h).items.value,
|
|
4989
5086
|
active: F(h).surfaceMode.value === "fullscreen",
|
|
4990
5087
|
"active-index": F(h).activeIndex.value,
|
|
4991
5088
|
"error-message": F(h).errorMessage.value,
|
|
5089
|
+
"fill-collected-count": F(h).fillCollectedCount.value,
|
|
5090
|
+
"fill-completed-calls": F(h).fillCompletedCalls.value,
|
|
5091
|
+
"fill-loaded-count": F(h).fillLoadedCount.value,
|
|
5092
|
+
"fill-mode": F(h).fillMode.value,
|
|
5093
|
+
"fill-progress": F(h).fillProgress.value,
|
|
5094
|
+
"fill-target-calls": F(h).fillTargetCalls.value,
|
|
5095
|
+
"fill-target-count": F(h).fillTargetCount.value,
|
|
5096
|
+
"fill-total-count": F(h).fillTotalCount.value,
|
|
4992
5097
|
loading: F(h).loading.value,
|
|
4993
5098
|
"has-next-page": F(h).hasNextPage.value,
|
|
4994
5099
|
"pagination-detail": F(h).paginationDetail.value,
|
|
@@ -5034,36 +5139,25 @@ var sa = ["aria-label"], ca = {
|
|
|
5034
5139
|
fn: B((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
5035
5140
|
key: "5"
|
|
5036
5141
|
} : 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"]])]),
|
|
5142
|
+
]), 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
5143
|
_: 3
|
|
5058
|
-
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value ? (w(), s("div",
|
|
5144
|
+
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div", za, [u(F(se), {
|
|
5059
5145
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
5060
5146
|
"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(
|
|
5147
|
+
}), 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
5148
|
key: 4,
|
|
5063
5149
|
items: F(h).items.value,
|
|
5064
5150
|
active: !0,
|
|
5065
5151
|
"active-index": F(h).activeIndex.value,
|
|
5066
5152
|
"error-message": F(h).errorMessage.value,
|
|
5153
|
+
"fill-collected-count": F(h).fillCollectedCount.value,
|
|
5154
|
+
"fill-completed-calls": F(h).fillCompletedCalls.value,
|
|
5155
|
+
"fill-loaded-count": F(h).fillLoadedCount.value,
|
|
5156
|
+
"fill-mode": F(h).fillMode.value,
|
|
5157
|
+
"fill-progress": F(h).fillProgress.value,
|
|
5158
|
+
"fill-target-calls": F(h).fillTargetCalls.value,
|
|
5159
|
+
"fill-target-count": F(h).fillTargetCount.value,
|
|
5160
|
+
"fill-total-count": F(h).fillTotalCount.value,
|
|
5067
5161
|
loading: F(h).loading.value,
|
|
5068
5162
|
"has-next-page": F(h).hasNextPage.value,
|
|
5069
5163
|
"pagination-detail": F(h).paginationDetail.value,
|
|
@@ -5113,6 +5207,14 @@ var sa = ["aria-label"], ca = {
|
|
|
5113
5207
|
"items",
|
|
5114
5208
|
"active-index",
|
|
5115
5209
|
"error-message",
|
|
5210
|
+
"fill-collected-count",
|
|
5211
|
+
"fill-completed-calls",
|
|
5212
|
+
"fill-loaded-count",
|
|
5213
|
+
"fill-mode",
|
|
5214
|
+
"fill-progress",
|
|
5215
|
+
"fill-target-calls",
|
|
5216
|
+
"fill-target-count",
|
|
5217
|
+
"fill-total-count",
|
|
5116
5218
|
"loading",
|
|
5117
5219
|
"has-next-page",
|
|
5118
5220
|
"pagination-detail",
|
|
@@ -5126,10 +5228,10 @@ var sa = ["aria-label"], ca = {
|
|
|
5126
5228
|
"show-status-badges",
|
|
5127
5229
|
"onBackToList",
|
|
5128
5230
|
"onUpdate:activeIndex"
|
|
5129
|
-
]))], 8,
|
|
5231
|
+
]))], 8, Fa));
|
|
5130
5232
|
}
|
|
5131
|
-
}),
|
|
5132
|
-
e.component("VibeLayout",
|
|
5233
|
+
}), Va = { install(e) {
|
|
5234
|
+
e.component("VibeLayout", Ba);
|
|
5133
5235
|
} };
|
|
5134
5236
|
//#endregion
|
|
5135
|
-
export {
|
|
5237
|
+
export { Ba as VibeLayout, Va as VibePlugin, Va as default };
|