@wyxos/vibe 3.1.1 → 3.1.3
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/components/viewer-core/loadError.d.ts +2 -1
- package/lib/components/viewer-core/useAssetLoadQueue.d.ts +1 -1
- package/lib/components/viewer-core/useListCardHealthCheck.d.ts +20 -0
- package/lib/components/viewer-core/useMasonryList.d.ts +4 -0
- package/lib/components/viewer-core/useMasonryMotion.d.ts +4 -0
- package/lib/components/viewer.d.ts +5 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +502 -411
- package/package.json +1 -1
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 B = (e) => {
|
|
4
4
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
5
5
|
return !1;
|
|
6
|
-
},
|
|
6
|
+
}, ee = (e) => e === "", V = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), H = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), U = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), W = (e) => {
|
|
7
7
|
let t = U(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
9
9
|
}, G = {
|
|
@@ -16,27 +16,27 @@ var B = (e) => {
|
|
|
16
16
|
"stroke-width": 2,
|
|
17
17
|
"stroke-linecap": "round",
|
|
18
18
|
"stroke-linejoin": "round"
|
|
19
|
-
},
|
|
19
|
+
}, te = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = G.width, color: s = G.stroke, ...c }, { slots: l }) => p("svg", {
|
|
20
20
|
...G,
|
|
21
21
|
...c,
|
|
22
22
|
width: o,
|
|
23
23
|
height: o,
|
|
24
24
|
stroke: s,
|
|
25
|
-
"stroke-width":
|
|
26
|
-
class:
|
|
25
|
+
"stroke-width": ee(n) || ee(r) || n === !0 || r === !0 ? Number(i || a || G["stroke-width"]) * 24 / Number(o) : i || a || G["stroke-width"],
|
|
26
|
+
class: V("lucide", c.class, ...e ? [`lucide-${H(W(e))}-icon`, `lucide-${H(e)}`] : ["lucide-icon"]),
|
|
27
27
|
...!l.default && !B(c) && { "aria-hidden": "true" }
|
|
28
|
-
}, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]),
|
|
28
|
+
}, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]), K = (e, t) => (n, { slots: r, attrs: i }) => p(te, {
|
|
29
29
|
...i,
|
|
30
30
|
...n,
|
|
31
31
|
iconNode: t,
|
|
32
32
|
name: e
|
|
33
|
-
}, r),
|
|
33
|
+
}, r), q = K("arrow-left", [["path", {
|
|
34
34
|
d: "m12 19-7-7 7-7",
|
|
35
35
|
key: "1l729n"
|
|
36
36
|
}], ["path", {
|
|
37
37
|
d: "M19 12H5",
|
|
38
38
|
key: "x3x0zl"
|
|
39
|
-
}]]), J =
|
|
39
|
+
}]]), J = K("audio-lines", [
|
|
40
40
|
["path", {
|
|
41
41
|
d: "M2 10v3",
|
|
42
42
|
key: "1fnikh"
|
|
@@ -61,7 +61,7 @@ var B = (e) => {
|
|
|
61
61
|
d: "M22 10v3",
|
|
62
62
|
key: "154ddg"
|
|
63
63
|
}]
|
|
64
|
-
]), ne =
|
|
64
|
+
]), ne = K("clapperboard", [
|
|
65
65
|
["path", {
|
|
66
66
|
d: "m12.296 3.464 3.02 3.956",
|
|
67
67
|
key: "qash78"
|
|
@@ -78,13 +78,13 @@ var B = (e) => {
|
|
|
78
78
|
d: "m6.18 5.276 3.1 3.899",
|
|
79
79
|
key: "zjj9t3"
|
|
80
80
|
}]
|
|
81
|
-
]), Y =
|
|
81
|
+
]), Y = K("file", [["path", {
|
|
82
82
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
83
83
|
key: "1oefj6"
|
|
84
84
|
}], ["path", {
|
|
85
85
|
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
86
86
|
key: "wfsgrz"
|
|
87
|
-
}]]), X =
|
|
87
|
+
}]]), X = K("image-plus", [
|
|
88
88
|
["path", {
|
|
89
89
|
d: "M16 5h6",
|
|
90
90
|
key: "1vod17"
|
|
@@ -107,10 +107,10 @@ var B = (e) => {
|
|
|
107
107
|
r: "2",
|
|
108
108
|
key: "af1f0g"
|
|
109
109
|
}]
|
|
110
|
-
]), re =
|
|
110
|
+
]), re = K("loader-circle", [["path", {
|
|
111
111
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
112
112
|
key: "13zald"
|
|
113
|
-
}]]), ie =
|
|
113
|
+
}]]), ie = K("pause", [["rect", {
|
|
114
114
|
x: "14",
|
|
115
115
|
y: "3",
|
|
116
116
|
width: "5",
|
|
@@ -124,10 +124,10 @@ var B = (e) => {
|
|
|
124
124
|
height: "18",
|
|
125
125
|
rx: "1",
|
|
126
126
|
key: "1wsw3u"
|
|
127
|
-
}]]), ae =
|
|
127
|
+
}]]), ae = K("play", [["path", {
|
|
128
128
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
129
129
|
key: "10ikf1"
|
|
130
|
-
}]]), oe =
|
|
130
|
+
}]]), oe = K("triangle-alert", [
|
|
131
131
|
["path", {
|
|
132
132
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
133
133
|
key: "wmoenq"
|
|
@@ -140,13 +140,13 @@ var B = (e) => {
|
|
|
140
140
|
d: "M12 17h.01",
|
|
141
141
|
key: "p32p05"
|
|
142
142
|
}]
|
|
143
|
-
]), se =
|
|
143
|
+
]), se = K("volume-1", [["path", {
|
|
144
144
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
145
145
|
key: "uqj9uw"
|
|
146
146
|
}], ["path", {
|
|
147
147
|
d: "M16 9a5 5 0 0 1 0 6",
|
|
148
148
|
key: "1q6k2b"
|
|
149
|
-
}]]), ce =
|
|
149
|
+
}]]), ce = K("volume-2", [
|
|
150
150
|
["path", {
|
|
151
151
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
152
152
|
key: "uqj9uw"
|
|
@@ -159,7 +159,7 @@ var B = (e) => {
|
|
|
159
159
|
d: "M19.364 18.364a9 9 0 0 0 0-12.728",
|
|
160
160
|
key: "ijwkga"
|
|
161
161
|
}]
|
|
162
|
-
]), Z =
|
|
162
|
+
]), Z = K("volume-x", [
|
|
163
163
|
["path", {
|
|
164
164
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
165
165
|
key: "uqj9uw"
|
|
@@ -437,7 +437,7 @@ function Ve() {
|
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region src/components/viewer-core/useAutoResolveSource.ts
|
|
439
439
|
function He(e) {
|
|
440
|
-
let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = Ve(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Be(e.fillDelayMs, Ie)), w = i(() => Be(e.fillDelayStepMs, Le)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => me(e.pageSize)), k = i(() => Se(n.value)), A = i(() => Ce(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => pe(c.value) || p.value), N = i(() => Ue(n.value, e.removedIds.value)), P = i(() => We(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value), B = i(() => E.value && n.value.length > 0),
|
|
440
|
+
let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = Ve(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Be(e.fillDelayMs, Ie)), w = i(() => Be(e.fillDelayStepMs, Le)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => me(e.pageSize)), k = i(() => Se(n.value)), A = i(() => Ce(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => pe(c.value) || p.value), N = i(() => Ue(n.value, e.removedIds.value)), P = i(() => We(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value), B = i(() => E.value && n.value.length > 0), ee = i(() => Ce(Se(a.value), e.removedIds.value)), V = i(() => Ee(n.value, e.removedIds.value, j.value)), H = i(() => !A.value.length && !M.value && !!s.value);
|
|
441
441
|
F(() => A.value.length, (e) => {
|
|
442
442
|
if (e === 0) {
|
|
443
443
|
r.value = 0;
|
|
@@ -474,8 +474,8 @@ function He(e) {
|
|
|
474
474
|
await Z(L.value);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
async function
|
|
478
|
-
if (
|
|
477
|
+
async function te() {
|
|
478
|
+
if (H.value) {
|
|
479
479
|
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0), fe()) {
|
|
480
480
|
Q();
|
|
481
481
|
return;
|
|
@@ -483,11 +483,11 @@ function He(e) {
|
|
|
483
483
|
await U();
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
async function
|
|
487
|
-
if (
|
|
486
|
+
async function K() {
|
|
487
|
+
if (H.value) return te();
|
|
488
488
|
h.value || c.value !== "failed" || !v || (s.value = null, await v());
|
|
489
489
|
}
|
|
490
|
-
async function
|
|
490
|
+
async function q() {
|
|
491
491
|
if (!a.value.length) return p.value = !1, Q();
|
|
492
492
|
n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
|
|
493
493
|
}
|
|
@@ -531,7 +531,7 @@ function He(e) {
|
|
|
531
531
|
r.value = Pe(A.value, j.value, e);
|
|
532
532
|
}
|
|
533
533
|
function oe() {
|
|
534
|
-
a.value.length > 0 && !
|
|
534
|
+
a.value.length > 0 && !ee.value.length && q();
|
|
535
535
|
}
|
|
536
536
|
async function se() {
|
|
537
537
|
if (!(!m.value || _e())) {
|
|
@@ -554,7 +554,7 @@ function He(e) {
|
|
|
554
554
|
});
|
|
555
555
|
if (t) {
|
|
556
556
|
if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1, Q();
|
|
557
|
-
if (a.value = t.buckets, !
|
|
557
|
+
if (a.value = t.buckets, !ee.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
|
|
558
558
|
p.value = !0;
|
|
559
559
|
}
|
|
560
560
|
}
|
|
@@ -694,11 +694,11 @@ function He(e) {
|
|
|
694
694
|
}
|
|
695
695
|
return {
|
|
696
696
|
activeIndex: j,
|
|
697
|
-
canRetryInitialLoad:
|
|
697
|
+
canRetryInitialLoad: H,
|
|
698
698
|
cancel: re,
|
|
699
699
|
canRefreshTrailingBoundary: B,
|
|
700
|
-
commitPendingAppend:
|
|
701
|
-
currentCursor:
|
|
700
|
+
commitPendingAppend: q,
|
|
701
|
+
currentCursor: V,
|
|
702
702
|
errorMessage: s,
|
|
703
703
|
fillCollectedCount: l,
|
|
704
704
|
fillDelayRemainingMs: d,
|
|
@@ -713,13 +713,13 @@ function He(e) {
|
|
|
713
713
|
mode: D,
|
|
714
714
|
maybePrefetchAround: se,
|
|
715
715
|
nextCursor: I,
|
|
716
|
-
pendingAppendItems:
|
|
716
|
+
pendingAppendItems: ee,
|
|
717
717
|
phase: c,
|
|
718
718
|
prefetchNextPage: W,
|
|
719
719
|
prefetchPreviousPage: G,
|
|
720
720
|
previousCursor: L,
|
|
721
|
-
retryInitialLoad:
|
|
722
|
-
retry:
|
|
721
|
+
retryInitialLoad: te,
|
|
722
|
+
retry: K,
|
|
723
723
|
setActiveIndex: J,
|
|
724
724
|
setAutoPrefetchEnabled: ne,
|
|
725
725
|
syncActiveIndexAfterVisibilityChange: ae,
|
|
@@ -1085,7 +1085,7 @@ var Ye = {
|
|
|
1085
1085
|
class: "pointer-events-auto inline-flex h-11 w-11 shrink-0 items-center justify-center border border-white/14 bg-black/40 text-[#f7f1ea]/78 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/55",
|
|
1086
1086
|
"aria-label": "Back to list",
|
|
1087
1087
|
onClick: t[0] ||= (e) => r("back-to-list")
|
|
1088
|
-
}, [u(j(
|
|
1088
|
+
}, [u(j(q), {
|
|
1089
1089
|
class: "h-4 w-4 stroke-[2.2]",
|
|
1090
1090
|
"aria-hidden": "true"
|
|
1091
1091
|
})])) : o("", !0), n.title ? (S(), s("h2", mt, k(n.title), 1)) : o("", !0)]), c("div", ht, [c("span", gt, [
|
|
@@ -1293,27 +1293,29 @@ function Ut(e) {
|
|
|
1293
1293
|
return e === "generic";
|
|
1294
1294
|
}
|
|
1295
1295
|
function Wt(e) {
|
|
1296
|
+
return Gt(e).then((e) => e ?? "generic");
|
|
1297
|
+
}
|
|
1298
|
+
function Gt(e) {
|
|
1296
1299
|
let t = Vt.get(e);
|
|
1297
1300
|
if (t) return t;
|
|
1298
|
-
let n =
|
|
1301
|
+
let n = Kt(e);
|
|
1299
1302
|
return Vt.set(e, n), n;
|
|
1300
1303
|
}
|
|
1301
|
-
async function
|
|
1302
|
-
if (!
|
|
1304
|
+
async function Kt(e) {
|
|
1305
|
+
if (!qt(e)) return null;
|
|
1303
1306
|
try {
|
|
1304
1307
|
let t = await fetch(e, { method: "HEAD" });
|
|
1305
|
-
|
|
1308
|
+
return t.ok ? null : t.status === 404 ? "not-found" : "generic";
|
|
1306
1309
|
} catch {
|
|
1307
1310
|
return "generic";
|
|
1308
1311
|
}
|
|
1309
|
-
return "generic";
|
|
1310
1312
|
}
|
|
1311
|
-
function
|
|
1313
|
+
function qt(e) {
|
|
1312
1314
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
1313
1315
|
}
|
|
1314
1316
|
//#endregion
|
|
1315
1317
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
1316
|
-
function
|
|
1318
|
+
function Jt(e) {
|
|
1317
1319
|
try {
|
|
1318
1320
|
let t = e.play();
|
|
1319
1321
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
@@ -1321,12 +1323,12 @@ function qt(e) {
|
|
|
1321
1323
|
}
|
|
1322
1324
|
//#endregion
|
|
1323
1325
|
//#region src/components/viewer-core/useMedia.ts
|
|
1324
|
-
function
|
|
1326
|
+
function Yt(e) {
|
|
1325
1327
|
let t = T({}), n = T({}), r = T({}), a = T({}), o = T({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? $(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), f = i(() => {
|
|
1326
1328
|
let t = /* @__PURE__ */ new Map();
|
|
1327
1329
|
for (let n of e.items.value) t.set($(n), n);
|
|
1328
1330
|
return t;
|
|
1329
|
-
}), p = i(() => d.value ? r.value[d.value] ?? It : It), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 :
|
|
1331
|
+
}), p = i(() => d.value ? r.value[d.value] ?? It : It), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : Xt(p.value.currentTime / m.value * 100, 0, 100)), _ = i(() => u.value ? L(u.value) : null);
|
|
1330
1332
|
F(() => u.value, async () => {
|
|
1331
1333
|
await S();
|
|
1332
1334
|
}), F(() => e.itemCount.value, async () => {
|
|
@@ -1352,28 +1354,28 @@ function Jt(e) {
|
|
|
1352
1354
|
r instanceof HTMLImageElement && Rt(r) && (t.value[e] = !0, n.value[e] = null, ne(e, r.currentSrc || r.src || X(e)));
|
|
1353
1355
|
}
|
|
1354
1356
|
function x() {
|
|
1355
|
-
|
|
1357
|
+
H(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
1356
1358
|
}
|
|
1357
1359
|
async function S() {
|
|
1358
1360
|
if (!e.isEnabled.value) {
|
|
1359
|
-
|
|
1361
|
+
H();
|
|
1360
1362
|
return;
|
|
1361
1363
|
}
|
|
1362
1364
|
await g();
|
|
1363
1365
|
let t = u.value;
|
|
1364
1366
|
for (let [n, i] of s.entries()) {
|
|
1365
1367
|
if (n !== t || r.value[n]?.errorKind) {
|
|
1366
|
-
|
|
1368
|
+
V(i, n);
|
|
1367
1369
|
continue;
|
|
1368
1370
|
}
|
|
1369
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0,
|
|
1371
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Jt(i), W(n, i);
|
|
1370
1372
|
}
|
|
1371
1373
|
for (let [e, n] of c.entries()) {
|
|
1372
1374
|
if (e !== t || r.value[e]?.errorKind) {
|
|
1373
|
-
|
|
1375
|
+
V(n, e);
|
|
1374
1376
|
continue;
|
|
1375
1377
|
}
|
|
1376
|
-
|
|
1378
|
+
Jt(n), W(e, n);
|
|
1377
1379
|
}
|
|
1378
1380
|
}
|
|
1379
1381
|
function C(e, t) {
|
|
@@ -1401,7 +1403,7 @@ function Jt(e) {
|
|
|
1401
1403
|
});
|
|
1402
1404
|
}
|
|
1403
1405
|
async function D(t, n) {
|
|
1404
|
-
let r =
|
|
1406
|
+
let r = K(t), i = U(t), a = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
1405
1407
|
if (r) {
|
|
1406
1408
|
r.pause();
|
|
1407
1409
|
try {
|
|
@@ -1422,25 +1424,25 @@ function Jt(e) {
|
|
|
1422
1424
|
e.button !== 0 || Date.now() < n || J(s.get(t) ?? null);
|
|
1423
1425
|
}
|
|
1424
1426
|
function k(e, t, n) {
|
|
1425
|
-
e.button !== 0 || Date.now() < n || J(
|
|
1427
|
+
e.button !== 0 || Date.now() < n || J(K(t));
|
|
1426
1428
|
}
|
|
1427
1429
|
function A(e) {
|
|
1428
|
-
let t =
|
|
1430
|
+
let t = q(), n = d.value;
|
|
1429
1431
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1430
1432
|
let r = Number.parseFloat(e.target.value);
|
|
1431
1433
|
if (!Number.isFinite(r)) return;
|
|
1432
|
-
let i =
|
|
1434
|
+
let i = Xt(r, 0, m.value || 0);
|
|
1433
1435
|
G(n, i, t), t.currentTime = i;
|
|
1434
1436
|
}
|
|
1435
1437
|
function j(e) {
|
|
1436
|
-
let t =
|
|
1438
|
+
let t = q(), n = d.value;
|
|
1437
1439
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1438
|
-
let r =
|
|
1440
|
+
let r = Xt(Number.parseFloat(e.target.value), 0, 1);
|
|
1439
1441
|
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
|
|
1440
1442
|
}
|
|
1441
1443
|
function M() {
|
|
1442
|
-
let e =
|
|
1443
|
-
!e || !t || (e.muted || e.volume <= 0 ? (e.volume =
|
|
1444
|
+
let e = q(), t = d.value;
|
|
1445
|
+
!e || !t || (e.muted || e.volume <= 0 ? (e.volume = te(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
|
|
1444
1446
|
}
|
|
1445
1447
|
function N(e) {
|
|
1446
1448
|
return !!t.value[e] && !n.value[e];
|
|
@@ -1464,26 +1466,26 @@ function Jt(e) {
|
|
|
1464
1466
|
function B(e) {
|
|
1465
1467
|
return `${e}:${a.value[e] ?? 0}`;
|
|
1466
1468
|
}
|
|
1467
|
-
async function
|
|
1469
|
+
async function ee(e) {
|
|
1468
1470
|
if (!z(e)) return;
|
|
1469
1471
|
t.value[e] = !1, n.value[e] = null;
|
|
1470
1472
|
let r = U(e);
|
|
1471
1473
|
r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
|
|
1472
|
-
let i =
|
|
1473
|
-
i &&
|
|
1474
|
+
let i = K(e);
|
|
1475
|
+
i && V(i, e), l.forEach((t) => {
|
|
1474
1476
|
t.startsWith(`${e}|`) && l.delete(t);
|
|
1475
1477
|
}), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await S();
|
|
1476
1478
|
}
|
|
1477
|
-
function
|
|
1479
|
+
function V(e, t) {
|
|
1478
1480
|
e.pause();
|
|
1479
1481
|
try {
|
|
1480
1482
|
e.currentTime = 0;
|
|
1481
1483
|
} catch {}
|
|
1482
1484
|
W(t, e);
|
|
1483
1485
|
}
|
|
1484
|
-
function
|
|
1485
|
-
for (let [e, t] of s.entries())
|
|
1486
|
-
for (let [e, t] of c.entries())
|
|
1486
|
+
function H() {
|
|
1487
|
+
for (let [e, t] of s.entries()) V(t, e);
|
|
1488
|
+
for (let [e, t] of c.entries()) V(t, e);
|
|
1487
1489
|
}
|
|
1488
1490
|
function U(e) {
|
|
1489
1491
|
return r.value[e] || (r.value[e] = Lt()), r.value[e];
|
|
@@ -1495,19 +1497,19 @@ function Jt(e) {
|
|
|
1495
1497
|
let r = U(e);
|
|
1496
1498
|
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;
|
|
1497
1499
|
}
|
|
1498
|
-
function
|
|
1499
|
-
return
|
|
1500
|
+
function te(e) {
|
|
1501
|
+
return Xt(o.value[e] ?? 1, 0, 1);
|
|
1500
1502
|
}
|
|
1501
|
-
function
|
|
1503
|
+
function K(e) {
|
|
1502
1504
|
return s.get(e) ?? c.get(e) ?? null;
|
|
1503
1505
|
}
|
|
1504
|
-
function
|
|
1505
|
-
return d.value ?
|
|
1506
|
+
function q() {
|
|
1507
|
+
return d.value ? K(d.value) : null;
|
|
1506
1508
|
}
|
|
1507
1509
|
function J(e) {
|
|
1508
1510
|
if (e) {
|
|
1509
1511
|
if (e.paused) {
|
|
1510
|
-
|
|
1512
|
+
Jt(e);
|
|
1511
1513
|
return;
|
|
1512
1514
|
}
|
|
1513
1515
|
e.pause();
|
|
@@ -1556,14 +1558,14 @@ function Jt(e) {
|
|
|
1556
1558
|
registerImageElement: b,
|
|
1557
1559
|
registerVideoElement: v,
|
|
1558
1560
|
resetMediaState: x,
|
|
1559
|
-
retryAsset:
|
|
1561
|
+
retryAsset: ee,
|
|
1560
1562
|
syncMediaPlayback: S
|
|
1561
1563
|
};
|
|
1562
1564
|
}
|
|
1563
|
-
function
|
|
1565
|
+
function Xt(e, t, n) {
|
|
1564
1566
|
return Math.min(Math.max(e, t), n);
|
|
1565
1567
|
}
|
|
1566
|
-
function
|
|
1568
|
+
function Zt(e, t, n = 2) {
|
|
1567
1569
|
return t <= 0 ? {
|
|
1568
1570
|
start: 0,
|
|
1569
1571
|
end: -1
|
|
@@ -1572,14 +1574,14 @@ function Xt(e, t, n = 2) {
|
|
|
1572
1574
|
end: Math.min(t - 1, e + n)
|
|
1573
1575
|
};
|
|
1574
1576
|
}
|
|
1575
|
-
function
|
|
1576
|
-
let r =
|
|
1577
|
+
function Qt(e, t, n = 2) {
|
|
1578
|
+
let r = Zt(t, e.length, n);
|
|
1577
1579
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
1578
1580
|
item: e,
|
|
1579
1581
|
index: r.start + t
|
|
1580
1582
|
}));
|
|
1581
1583
|
}
|
|
1582
|
-
function
|
|
1584
|
+
function $t(e, t, n, r, i) {
|
|
1583
1585
|
return {
|
|
1584
1586
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
1585
1587
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -1587,12 +1589,12 @@ function Qt(e, t, n, r, i) {
|
|
|
1587
1589
|
}
|
|
1588
1590
|
//#endregion
|
|
1589
1591
|
//#region src/components/viewer-core/useViewer.ts
|
|
1590
|
-
function
|
|
1592
|
+
function en(e, t, n = {}) {
|
|
1591
1593
|
let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => Nt({
|
|
1592
1594
|
itemCount: r.value.length,
|
|
1593
1595
|
loading: s.value,
|
|
1594
1596
|
phase: e.phase
|
|
1595
|
-
})), f = i(() => !1), p = T(null), m = T(0), h = T(!1), g = T(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), E =
|
|
1597
|
+
})), f = i(() => !1), p = T(null), m = T(0), h = T(!1), g = T(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), E = Yt({
|
|
1596
1598
|
items: r,
|
|
1597
1599
|
activeItem: C,
|
|
1598
1600
|
activeMediaItem: w,
|
|
@@ -1607,7 +1609,7 @@ function $t(e, t, n = {}) {
|
|
|
1607
1609
|
hasNextPage: c.value,
|
|
1608
1610
|
phase: d.value,
|
|
1609
1611
|
surface: "fullscreen"
|
|
1610
|
-
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() =>
|
|
1612
|
+
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => Zt(S.value, r.value.length)), N = i(() => Qt(r.value, S.value));
|
|
1611
1613
|
Ft({
|
|
1612
1614
|
enabled: _,
|
|
1613
1615
|
onDisable() {
|
|
@@ -1643,13 +1645,13 @@ function $t(e, t, n = {}) {
|
|
|
1643
1645
|
function B(e) {
|
|
1644
1646
|
!_.value || !h.value || v !== e.pointerId || (m.value = R(e.clientY - y));
|
|
1645
1647
|
}
|
|
1646
|
-
function
|
|
1647
|
-
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId),
|
|
1648
|
+
function ee(e) {
|
|
1649
|
+
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), H());
|
|
1648
1650
|
}
|
|
1649
|
-
function
|
|
1651
|
+
function V(e) {
|
|
1650
1652
|
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), U());
|
|
1651
1653
|
}
|
|
1652
|
-
function
|
|
1654
|
+
function H() {
|
|
1653
1655
|
Math.abs(m.value) >= j.value && (x = Date.now() + 250, L(m.value < 0 ? 1 : -1)), U();
|
|
1654
1656
|
}
|
|
1655
1657
|
function U() {
|
|
@@ -1664,13 +1666,13 @@ function $t(e, t, n = {}) {
|
|
|
1664
1666
|
function G(e) {
|
|
1665
1667
|
!_.value || r.value.length === 0 || Q(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
|
|
1666
1668
|
}
|
|
1667
|
-
function
|
|
1669
|
+
function te(e, t) {
|
|
1668
1670
|
E.onVideoClick(e, t, x);
|
|
1669
1671
|
}
|
|
1670
|
-
function
|
|
1672
|
+
function K(e, t) {
|
|
1671
1673
|
E.onAudioCoverClick(e, t, x);
|
|
1672
1674
|
}
|
|
1673
|
-
function
|
|
1675
|
+
function q(e) {
|
|
1674
1676
|
E.onMediaSeekInput(e);
|
|
1675
1677
|
}
|
|
1676
1678
|
function J(e) {
|
|
@@ -1686,7 +1688,7 @@ function $t(e, t, n = {}) {
|
|
|
1686
1688
|
return e.type === "audio";
|
|
1687
1689
|
}
|
|
1688
1690
|
function re(e) {
|
|
1689
|
-
return
|
|
1691
|
+
return $t(e, S.value, g.value, m.value, h.value);
|
|
1690
1692
|
}
|
|
1691
1693
|
return {
|
|
1692
1694
|
activeItem: C,
|
|
@@ -1713,19 +1715,19 @@ function $t(e, t, n = {}) {
|
|
|
1713
1715
|
mediaStates: E.mediaStates,
|
|
1714
1716
|
isImageReady: E.isImageReady,
|
|
1715
1717
|
isMediaReady: E.isMediaReady,
|
|
1716
|
-
onAudioCoverClick:
|
|
1718
|
+
onAudioCoverClick: K,
|
|
1717
1719
|
onImageError: E.onImageError,
|
|
1718
1720
|
onImageLoad: E.onImageLoad,
|
|
1719
1721
|
onMediaEvent: E.onMediaEvent,
|
|
1720
1722
|
onMediaError: E.onMediaError,
|
|
1721
|
-
onMediaSeekInput:
|
|
1723
|
+
onMediaSeekInput: q,
|
|
1722
1724
|
onMediaVolumeInput: J,
|
|
1723
1725
|
onMediaVolumeToggle: ne,
|
|
1724
|
-
onPointerCancel:
|
|
1726
|
+
onPointerCancel: V,
|
|
1725
1727
|
onPointerDown: z,
|
|
1726
1728
|
onPointerMove: B,
|
|
1727
|
-
onPointerUp:
|
|
1728
|
-
onVideoClick:
|
|
1729
|
+
onPointerUp: ee,
|
|
1730
|
+
onVideoClick: te,
|
|
1729
1731
|
onWheel: W,
|
|
1730
1732
|
registerAudioElement: E.registerAudioElement,
|
|
1731
1733
|
registerImageElement: E.registerImageElement,
|
|
@@ -1744,21 +1746,21 @@ function $t(e, t, n = {}) {
|
|
|
1744
1746
|
}
|
|
1745
1747
|
//#endregion
|
|
1746
1748
|
//#region src/components/viewer-core/theme.ts
|
|
1747
|
-
var
|
|
1749
|
+
var tn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", nn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", rn = {
|
|
1748
1750
|
image: !0,
|
|
1749
1751
|
video: !0,
|
|
1750
1752
|
audio: !0,
|
|
1751
1753
|
other: !0
|
|
1752
1754
|
};
|
|
1753
|
-
function rn(e) {
|
|
1754
|
-
return nn[e], en;
|
|
1755
|
-
}
|
|
1756
1755
|
function an(e) {
|
|
1757
|
-
return
|
|
1756
|
+
return rn[e], tn;
|
|
1757
|
+
}
|
|
1758
|
+
function on(e) {
|
|
1759
|
+
return rn[e], nn;
|
|
1758
1760
|
}
|
|
1759
1761
|
//#endregion
|
|
1760
1762
|
//#region src/components/viewer-core/dominantImageTone.ts
|
|
1761
|
-
function
|
|
1763
|
+
function sn(e) {
|
|
1762
1764
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
|
|
1763
1765
|
let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
|
|
1764
1766
|
if (!n) return null;
|
|
@@ -1773,20 +1775,20 @@ function on(e) {
|
|
|
1773
1775
|
r += d, i += s * d, a += c * d, o += l * d;
|
|
1774
1776
|
}
|
|
1775
1777
|
return r <= 0 ? null : {
|
|
1776
|
-
r:
|
|
1777
|
-
g:
|
|
1778
|
-
b:
|
|
1778
|
+
r: cn(Math.round(i / r)),
|
|
1779
|
+
g: cn(Math.round(a / r)),
|
|
1780
|
+
b: cn(Math.round(o / r))
|
|
1779
1781
|
};
|
|
1780
1782
|
} catch {
|
|
1781
1783
|
return null;
|
|
1782
1784
|
}
|
|
1783
1785
|
}
|
|
1784
|
-
function
|
|
1786
|
+
function cn(e) {
|
|
1785
1787
|
return Math.min(235, Math.max(26, e));
|
|
1786
1788
|
}
|
|
1787
1789
|
//#endregion
|
|
1788
1790
|
//#region src/components/viewer-core/useFullscreenDominantTone.ts
|
|
1789
|
-
function
|
|
1791
|
+
function ln(e) {
|
|
1790
1792
|
let t = T({}), n = i(() => e.activeItem.value ? e.getItemKey(e.activeItem.value) : null), r = i(() => !e.showDominantImageTone.value || e.activeItem.value?.type !== "image" || !n.value || !e.isImageReady(n.value) ? null : t.value[n.value] ?? null), a = i(() => {
|
|
1791
1793
|
if (!r.value) return;
|
|
1792
1794
|
let { r: e, g: t, b: n } = r.value;
|
|
@@ -1801,7 +1803,7 @@ function cn(e) {
|
|
|
1801
1803
|
});
|
|
1802
1804
|
function s(n, r) {
|
|
1803
1805
|
if (!e.showDominantImageTone.value) return;
|
|
1804
|
-
let i =
|
|
1806
|
+
let i = sn(r);
|
|
1805
1807
|
i && (t.value[n] = i);
|
|
1806
1808
|
}
|
|
1807
1809
|
return {
|
|
@@ -1812,7 +1814,7 @@ function cn(e) {
|
|
|
1812
1814
|
}
|
|
1813
1815
|
//#endregion
|
|
1814
1816
|
//#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
1815
|
-
var
|
|
1817
|
+
var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
|
|
1816
1818
|
inheritAttrs: !1,
|
|
1817
1819
|
__name: "SurfaceEmptyState",
|
|
1818
1820
|
props: {
|
|
@@ -1826,31 +1828,31 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
1826
1828
|
"data-testid": "vibe-empty-state-inline",
|
|
1827
1829
|
"data-surface": e.surface,
|
|
1828
1830
|
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)]"]
|
|
1829
|
-
}), [D(n.$slots, "default", {}, () => [c("p", { class: _(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, k(e.message), 3)])], 16,
|
|
1831
|
+
}), [D(n.$slots, "default", {}, () => [c("p", { class: _(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, k(e.message), 3)])], 16, un)) : (S(), s("div", h({ key: 1 }, j(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]"] }), [D(n.$slots, "default", {}, () => [c("span", {
|
|
1830
1832
|
"data-testid": "vibe-empty-state-badge",
|
|
1831
1833
|
"data-surface": e.surface,
|
|
1832
1834
|
class: _(["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"])
|
|
1833
|
-
}, k(e.message), 11,
|
|
1835
|
+
}, k(e.message), 11, dn)])], 16));
|
|
1834
1836
|
}
|
|
1835
|
-
}),
|
|
1837
|
+
}), pn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, mn = {
|
|
1836
1838
|
key: 0,
|
|
1837
1839
|
class: "relative h-full min-h-0"
|
|
1838
|
-
},
|
|
1840
|
+
}, hn = [
|
|
1839
1841
|
"data-item-id",
|
|
1840
1842
|
"data-occurrence-key",
|
|
1841
1843
|
"data-index",
|
|
1842
1844
|
"data-active",
|
|
1843
1845
|
"aria-hidden"
|
|
1844
|
-
],
|
|
1846
|
+
], gn = {
|
|
1845
1847
|
key: 0,
|
|
1846
1848
|
"data-testid": "vibe-asset-spinner",
|
|
1847
1849
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
1848
|
-
},
|
|
1850
|
+
}, _n = { 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]" }, vn = ["data-kind"], yn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, bn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, xn = ["onClick"], Sn = [
|
|
1849
1851
|
"src",
|
|
1850
1852
|
"alt",
|
|
1851
1853
|
"onLoad",
|
|
1852
1854
|
"onError"
|
|
1853
|
-
],
|
|
1855
|
+
], Cn = [
|
|
1854
1856
|
"loop",
|
|
1855
1857
|
"src",
|
|
1856
1858
|
"preload",
|
|
@@ -1868,15 +1870,15 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
1868
1870
|
"onStalled",
|
|
1869
1871
|
"onTimeupdate",
|
|
1870
1872
|
"onWaiting"
|
|
1871
|
-
],
|
|
1873
|
+
], wn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Tn = [
|
|
1872
1874
|
"aria-label",
|
|
1873
1875
|
"disabled",
|
|
1874
1876
|
"onClick"
|
|
1875
|
-
],
|
|
1877
|
+
], En = { 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]" }, Dn = { 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]" }, On = {
|
|
1876
1878
|
key: 0,
|
|
1877
1879
|
"data-testid": "vibe-asset-spinner",
|
|
1878
1880
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
1879
|
-
},
|
|
1881
|
+
}, kn = { 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]" }, An = ["data-kind"], jn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Mn = ["onClick"], Nn = [
|
|
1880
1882
|
"src",
|
|
1881
1883
|
"preload",
|
|
1882
1884
|
"onCanplay",
|
|
@@ -1892,25 +1894,25 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
1892
1894
|
"onStalled",
|
|
1893
1895
|
"onTimeupdate",
|
|
1894
1896
|
"onWaiting"
|
|
1895
|
-
],
|
|
1897
|
+
], Pn = {
|
|
1896
1898
|
key: 2,
|
|
1897
1899
|
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"
|
|
1898
|
-
},
|
|
1900
|
+
}, Fn = { 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]" }, In = {
|
|
1899
1901
|
key: 0,
|
|
1900
1902
|
class: "pointer-events-none absolute inset-0 z-[4]"
|
|
1901
|
-
},
|
|
1903
|
+
}, Ln = { class: "h-full w-full" }, Rn = {
|
|
1902
1904
|
key: 1,
|
|
1903
1905
|
"data-testid": "vibe-forward-fill-placeholder",
|
|
1904
1906
|
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
1905
|
-
},
|
|
1907
|
+
}, zn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Bn = { 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)]" }, Vn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, Hn = {
|
|
1906
1908
|
key: 0,
|
|
1907
1909
|
"data-testid": "vibe-fullscreen-aside",
|
|
1908
1910
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
1909
|
-
},
|
|
1911
|
+
}, Un = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Wn = {
|
|
1910
1912
|
key: 0,
|
|
1911
1913
|
"data-testid": "vibe-fullscreen-aside",
|
|
1912
1914
|
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]"
|
|
1913
|
-
},
|
|
1915
|
+
}, Gn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Kn = 1280, qn = 768, Jn = /* @__PURE__ */ d({
|
|
1914
1916
|
__name: "FullscreenSurface",
|
|
1915
1917
|
props: {
|
|
1916
1918
|
active: {
|
|
@@ -1962,22 +1964,22 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
1962
1964
|
},
|
|
1963
1965
|
emits: ["back-to-list", "update:activeIndex"],
|
|
1964
1966
|
setup(e, { emit: n }) {
|
|
1965
|
-
let d = e, p = N(), m = n, g =
|
|
1967
|
+
let d = e, p = N(), m = n, g = en(d, (e, t) => {
|
|
1966
1968
|
m("update:activeIndex", t);
|
|
1967
1969
|
}, {
|
|
1968
1970
|
enabled: A(d, "active"),
|
|
1969
1971
|
onAssetError: d.reportAssetError ?? void 0,
|
|
1970
1972
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
1971
|
-
}), C = T(typeof window > "u" ?
|
|
1973
|
+
}), C = T(typeof window > "u" ? Kn : window.innerWidth || Kn), w = Dt({
|
|
1972
1974
|
active: A(d, "active"),
|
|
1973
1975
|
resolvedActiveIndex: g.resolvedActiveIndex,
|
|
1974
1976
|
viewer: g
|
|
1975
|
-
}), M = i(() =>
|
|
1977
|
+
}), M = i(() => an(g.activeItem.value?.type ?? "image")), { activeSlideToneStyle: P, activeStageToneStyle: F, updateFromImageElement: I } = ln({
|
|
1976
1978
|
activeItem: g.activeItem,
|
|
1977
1979
|
getItemKey: w.getItemKey,
|
|
1978
1980
|
isImageReady: g.isImageReady,
|
|
1979
1981
|
showDominantImageTone: A(d, "showDominantImageTone")
|
|
1980
|
-
}), R = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), B = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value),
|
|
1982
|
+
}), R = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), B = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), ee = i(() => C.value < qn ? "vertical" : "horizontal"), V = i(() => B.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), H = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), U = i(() => d.hasNextPage ? "Loading more items" : g.statusMessage.value ?? "Loading more items"), W = i(() => {
|
|
1981
1983
|
let e = g.activeItem.value;
|
|
1982
1984
|
return e ? {
|
|
1983
1985
|
hasNextPage: d.hasNextPage,
|
|
@@ -1987,14 +1989,14 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
1987
1989
|
paginationDetail: d.paginationDetail,
|
|
1988
1990
|
total: d.items.length
|
|
1989
1991
|
} : null;
|
|
1990
|
-
}), G = i(() => !W.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](W.value)),
|
|
1992
|
+
}), G = i(() => !W.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](W.value)), te = i(() => !W.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](W.value)), K = i(() => !d.showStatusBadges || !W.value || !g.statusKind.value || !g.statusMessage.value ? null : {
|
|
1991
1993
|
...W.value,
|
|
1992
1994
|
kind: g.statusKind.value,
|
|
1993
1995
|
message: g.statusMessage.value
|
|
1994
|
-
}),
|
|
1996
|
+
}), q = i(() => !K.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](K.value)), J = i(() => ({
|
|
1995
1997
|
gridTemplateColumns: X.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
1996
1998
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
1997
|
-
})), ne = i(() => Ot(G.value)), Y = i(() => Ot(
|
|
1999
|
+
})), ne = i(() => Ot(G.value)), Y = i(() => Ot(te.value)), X = i(() => Y.value && C.value >= Kn), se = i(() => Y.value && !X.value), ce = i(() => Ot(q.value)), { emptyStateProps: Z, showBadgeEmptyState: le, showCustomEmptyState: ue, showInlineEmptyState: de } = jt({
|
|
1998
2000
|
emptyStateMode: A(d, "emptyStateMode"),
|
|
1999
2001
|
itemCount: i(() => d.items.length),
|
|
2000
2002
|
loading: A(d, "loading"),
|
|
@@ -2007,7 +2009,7 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2007
2009
|
window.removeEventListener("resize", Q);
|
|
2008
2010
|
});
|
|
2009
2011
|
function Q() {
|
|
2010
|
-
C.value = window.innerWidth ||
|
|
2012
|
+
C.value = window.innerWidth || Kn;
|
|
2011
2013
|
}
|
|
2012
2014
|
function fe(e, t, n) {
|
|
2013
2015
|
g.onImageLoad(t, n);
|
|
@@ -2020,7 +2022,7 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2020
2022
|
function me(e, t) {
|
|
2021
2023
|
I(e, t);
|
|
2022
2024
|
}
|
|
2023
|
-
return (e, n) => (S(), s("div",
|
|
2025
|
+
return (e, n) => (S(), s("div", pn, [
|
|
2024
2026
|
c("div", {
|
|
2025
2027
|
class: _(["absolute inset-0 transition-[background] duration-200", M.value]),
|
|
2026
2028
|
style: y(j(F))
|
|
@@ -2037,7 +2039,7 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2037
2039
|
onPointerup: n[3] ||= (...e) => j(g).onPointerUp && j(g).onPointerUp(...e),
|
|
2038
2040
|
onPointercancel: n[4] ||= (...e) => j(g).onPointerCancel && j(g).onPointerCancel(...e),
|
|
2039
2041
|
onWheel: n[5] ||= (...e) => j(g).onWheel && j(g).onWheel(...e)
|
|
2040
|
-
}, [j(g).activeItem.value ? (S(), s("div",
|
|
2042
|
+
}, [j(g).activeItem.value ? (S(), s("div", mn, [
|
|
2041
2043
|
(S(!0), s(t, null, E(j(g).renderedItems.value, ({ item: r, index: i }) => (S(), s("article", {
|
|
2042
2044
|
key: j(w).getItemKey(r),
|
|
2043
2045
|
"data-testid": "vibe-slide",
|
|
@@ -2049,12 +2051,12 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2049
2051
|
class: _(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === j(g).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
|
|
2050
2052
|
style: y(j(g).getSlideStyle(i))
|
|
2051
2053
|
}, [c("div", {
|
|
2052
|
-
class: _(["absolute inset-0 opacity-85", j(
|
|
2054
|
+
class: _(["absolute inset-0 opacity-85", j(on)(r.type)]),
|
|
2053
2055
|
style: y(i === j(g).resolvedActiveIndex.value && r.type === "image" ? j(P) : void 0)
|
|
2054
2056
|
}, null, 6), j(g).isVisual(r) ? (S(), s("div", {
|
|
2055
2057
|
key: 0,
|
|
2056
|
-
class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ?
|
|
2057
|
-
}, [j(w).isAssetLoading(i, r) ? (S(), s("div",
|
|
2058
|
+
class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? V.value : ""])
|
|
2059
|
+
}, [j(w).isAssetLoading(i, r) ? (S(), s("div", gn, [c("span", _n, [u(j(re), {
|
|
2058
2060
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2059
2061
|
"aria-hidden": "true"
|
|
2060
2062
|
})])])) : o("", !0), j(w).isAssetErrored(i, r) ? (S(), s("div", {
|
|
@@ -2062,19 +2064,19 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2062
2064
|
"data-testid": "vibe-asset-error",
|
|
2063
2065
|
"data-kind": j(w).getAssetErrorKind(r),
|
|
2064
2066
|
class: "grid h-full w-full place-items-center"
|
|
2065
|
-
}, [c("div",
|
|
2067
|
+
}, [c("div", yn, [
|
|
2066
2068
|
u(j(oe), {
|
|
2067
2069
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2068
2070
|
"aria-hidden": "true"
|
|
2069
2071
|
}),
|
|
2070
|
-
c("p",
|
|
2072
|
+
c("p", bn, k(j(w).getAssetErrorLabel(r)), 1),
|
|
2071
2073
|
j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
|
|
2072
2074
|
key: 0,
|
|
2073
2075
|
type: "button",
|
|
2074
2076
|
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",
|
|
2075
2077
|
onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
|
|
2076
|
-
}, " Retry ", 8,
|
|
2077
|
-
])], 8,
|
|
2078
|
+
}, " Retry ", 8, xn)) : o("", !0)
|
|
2079
|
+
])], 8, vn)) : r.type === "image" ? (S(), s("img", {
|
|
2078
2080
|
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
2079
2081
|
src: j(w).getFullscreenImageSource(i, r),
|
|
2080
2082
|
alt: r.title ?? "",
|
|
@@ -2085,7 +2087,7 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2085
2087
|
ref: (e) => pe(j(w).getItemKey(r), e),
|
|
2086
2088
|
onLoad: (e) => fe(e, j(w).getItemKey(r), r.url),
|
|
2087
2089
|
onError: (e) => j(g).onImageError(j(w).getItemKey(r), r.url)
|
|
2088
|
-
}, null, 42,
|
|
2090
|
+
}, null, 42, Sn)) : (S(), s("video", {
|
|
2089
2091
|
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
2090
2092
|
class: _(["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", j(g).isMediaReady(j(w).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
2091
2093
|
playsinline: "",
|
|
@@ -2108,10 +2110,10 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2108
2110
|
onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
2109
2111
|
onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
2110
2112
|
onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
|
|
2111
|
-
}, null, 42,
|
|
2113
|
+
}, null, 42, Cn))], 2)) : j(g).isAudio(r) ? (S(), s("div", {
|
|
2112
2114
|
key: 1,
|
|
2113
|
-
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", i === j(g).resolvedActiveIndex.value ?
|
|
2114
|
-
}, [c("div",
|
|
2115
|
+
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", i === j(g).resolvedActiveIndex.value ? V.value : ""])
|
|
2116
|
+
}, [c("div", wn, [
|
|
2115
2117
|
c("button", {
|
|
2116
2118
|
type: "button",
|
|
2117
2119
|
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]",
|
|
@@ -2121,19 +2123,19 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2121
2123
|
}, [
|
|
2122
2124
|
n[6] ||= 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),
|
|
2123
2125
|
n[7] ||= 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),
|
|
2124
|
-
c("span",
|
|
2126
|
+
c("span", En, [D(e.$slots, "item-icon", {
|
|
2125
2127
|
icon: j(Ct)(r.type),
|
|
2126
2128
|
item: r
|
|
2127
2129
|
}, () => [(S(), a(O(j(Ct)(r.type)), {
|
|
2128
2130
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2129
2131
|
"aria-hidden": "true"
|
|
2130
2132
|
}))])]),
|
|
2131
|
-
c("span",
|
|
2133
|
+
c("span", Dn, [(S(), a(O(j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(ae) : j(ie)), {
|
|
2132
2134
|
class: "h-4 w-4 stroke-2",
|
|
2133
2135
|
"aria-hidden": "true"
|
|
2134
2136
|
}))])
|
|
2135
|
-
], 8,
|
|
2136
|
-
j(w).isAssetLoading(i, r) ? (S(), s("div",
|
|
2137
|
+
], 8, Tn),
|
|
2138
|
+
j(w).isAssetLoading(i, r) ? (S(), s("div", On, [c("span", kn, [u(j(re), {
|
|
2137
2139
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2138
2140
|
"aria-hidden": "true"
|
|
2139
2141
|
})])])) : o("", !0),
|
|
@@ -2146,14 +2148,14 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2146
2148
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2147
2149
|
"aria-hidden": "true"
|
|
2148
2150
|
}),
|
|
2149
|
-
c("p",
|
|
2151
|
+
c("p", jn, k(j(w).getAssetErrorLabel(r)), 1),
|
|
2150
2152
|
j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
|
|
2151
2153
|
key: 0,
|
|
2152
2154
|
type: "button",
|
|
2153
2155
|
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",
|
|
2154
2156
|
onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
|
|
2155
|
-
}, " Retry ", 8,
|
|
2156
|
-
], 8,
|
|
2157
|
+
}, " Retry ", 8, Mn)) : o("", !0)
|
|
2158
|
+
], 8, An)], 64)) : o("", !0)
|
|
2157
2159
|
]), (S(), s("audio", {
|
|
2158
2160
|
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
2159
2161
|
src: j(w).getFullscreenMediaSource(i, r),
|
|
@@ -2174,14 +2176,14 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2174
2176
|
onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
2175
2177
|
onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
2176
2178
|
onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
|
|
2177
|
-
}, null, 40,
|
|
2179
|
+
}, null, 40, Nn))], 2)) : (S(), s("div", Pn, [c("div", Fn, [D(e.$slots, "item-icon", {
|
|
2178
2180
|
icon: j(Ct)(r.type),
|
|
2179
2181
|
item: r
|
|
2180
2182
|
}, () => [(S(), a(O(j(Ct)(r.type)), {
|
|
2181
2183
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2182
2184
|
"aria-hidden": "true"
|
|
2183
|
-
}))])])]))], 14,
|
|
2184
|
-
W.value && p["fullscreen-overlay"] ? (S(), s("div",
|
|
2185
|
+
}))])])]))], 14, hn))), 128)),
|
|
2186
|
+
W.value && p["fullscreen-overlay"] ? (S(), s("div", In, [c("div", Ln, [D(e.$slots, "fullscreen-overlay", v(f(W.value)))])])) : o("", !0),
|
|
2185
2187
|
j(g).activeItem.value ? (S(), a(bt, {
|
|
2186
2188
|
key: 1,
|
|
2187
2189
|
"current-index": j(g).resolvedActiveIndex.value,
|
|
@@ -2214,7 +2216,7 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2214
2216
|
muted: j(g).activeMediaState.value.muted,
|
|
2215
2217
|
progress: j(g).activeMediaProgress.value,
|
|
2216
2218
|
volume: j(g).activeMediaState.value.volume,
|
|
2217
|
-
"volume-control-layout":
|
|
2219
|
+
"volume-control-layout": ee.value,
|
|
2218
2220
|
onSeekInput: j(g).onMediaSeekInput,
|
|
2219
2221
|
onVolumeInput: j(g).onMediaVolumeInput,
|
|
2220
2222
|
onVolumeToggle: j(g).onMediaVolumeToggle
|
|
@@ -2231,18 +2233,18 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2231
2233
|
"onVolumeInput",
|
|
2232
2234
|
"onVolumeToggle"
|
|
2233
2235
|
])) : o("", !0),
|
|
2234
|
-
|
|
2236
|
+
K.value ? (S(), s("div", {
|
|
2235
2237
|
key: 3,
|
|
2236
2238
|
class: _(["absolute left-1/2 z-[4] -translate-x-1/2", R.value])
|
|
2237
|
-
}, [ce.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 },
|
|
2239
|
+
}, [ce.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, K.value))) : (S(), s("div", {
|
|
2238
2240
|
key: 1,
|
|
2239
2241
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
2240
|
-
class: _(["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",
|
|
2241
|
-
}, k(
|
|
2242
|
-
])) :
|
|
2242
|
+
class: _(["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" : ""])
|
|
2243
|
+
}, k(K.value.message), 3))], 2)) : o("", !0)
|
|
2244
|
+
])) : H.value ? (S(), s("div", Rn, [c("div", zn, [c("span", Bn, [u(j(re), {
|
|
2243
2245
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2244
2246
|
"aria-hidden": "true"
|
|
2245
|
-
})]), c("p",
|
|
2247
|
+
})]), c("p", Vn, k(U.value), 1)])])) : j(de) && j(Z) ? (S(), a(fn, {
|
|
2246
2248
|
key: 2,
|
|
2247
2249
|
message: j(Z).message,
|
|
2248
2250
|
mode: j(Z).mode,
|
|
@@ -2254,7 +2256,7 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2254
2256
|
"message",
|
|
2255
2257
|
"mode",
|
|
2256
2258
|
"surface"
|
|
2257
|
-
])) : o("", !0), j(le) && j(Z) ? (S(), a(
|
|
2259
|
+
])) : o("", !0), j(le) && j(Z) ? (S(), a(fn, {
|
|
2258
2260
|
key: 3,
|
|
2259
2261
|
message: j(Z).message,
|
|
2260
2262
|
mode: j(Z).mode,
|
|
@@ -2274,7 +2276,7 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2274
2276
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2275
2277
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2276
2278
|
}, {
|
|
2277
|
-
default: L(() => [X.value && W.value ? (S(), s("aside",
|
|
2279
|
+
default: L(() => [X.value && W.value ? (S(), s("aside", Hn, [c("div", Un, [D(e.$slots, "fullscreen-aside", v(f(W.value)))])])) : o("", !0)]),
|
|
2278
2280
|
_: 3
|
|
2279
2281
|
})], 4),
|
|
2280
2282
|
u(r, {
|
|
@@ -2285,29 +2287,29 @@ var ln = ["data-surface"], un = ["data-surface"], dn = /* @__PURE__ */ d({
|
|
|
2285
2287
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2286
2288
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2287
2289
|
}, {
|
|
2288
|
-
default: L(() => [se.value && W.value ? (S(), s("aside",
|
|
2290
|
+
default: L(() => [se.value && W.value ? (S(), s("aside", Wn, [c("div", Gn, [D(e.$slots, "fullscreen-aside", v(f(W.value)))])])) : o("", !0)]),
|
|
2289
2291
|
_: 3
|
|
2290
2292
|
})
|
|
2291
2293
|
]));
|
|
2292
2294
|
}
|
|
2293
|
-
}),
|
|
2294
|
-
function
|
|
2295
|
+
}), Yn = 1, Xn = .5;
|
|
2296
|
+
function Zn(e) {
|
|
2295
2297
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2296
|
-
width:
|
|
2297
|
-
height:
|
|
2298
|
+
width: Yn,
|
|
2299
|
+
height: Yn,
|
|
2298
2300
|
source: "fallback"
|
|
2299
2301
|
};
|
|
2300
2302
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2301
|
-
if (
|
|
2302
|
-
let r =
|
|
2303
|
+
if (ir(t) && ir(n)) {
|
|
2304
|
+
let r = ar(e, t, n);
|
|
2303
2305
|
return {
|
|
2304
2306
|
width: r.width,
|
|
2305
2307
|
height: r.height,
|
|
2306
2308
|
source: "preview"
|
|
2307
2309
|
};
|
|
2308
2310
|
}
|
|
2309
|
-
if (
|
|
2310
|
-
let t =
|
|
2311
|
+
if (ir(e.width) && ir(e.height)) {
|
|
2312
|
+
let t = ar(e, e.width, e.height);
|
|
2311
2313
|
return {
|
|
2312
2314
|
width: t.width,
|
|
2313
2315
|
height: t.height,
|
|
@@ -2315,31 +2317,31 @@ function Xn(e) {
|
|
|
2315
2317
|
};
|
|
2316
2318
|
}
|
|
2317
2319
|
return {
|
|
2318
|
-
width:
|
|
2319
|
-
height:
|
|
2320
|
+
width: Yn,
|
|
2321
|
+
height: Yn,
|
|
2320
2322
|
source: "fallback"
|
|
2321
2323
|
};
|
|
2322
2324
|
}
|
|
2323
|
-
function
|
|
2325
|
+
function Qn(e, t) {
|
|
2324
2326
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2325
2327
|
}
|
|
2326
|
-
function
|
|
2328
|
+
function $n(e, t, n, r = 0) {
|
|
2327
2329
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2328
2330
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2329
2331
|
return !a || a <= 0 ? n : a / t;
|
|
2330
2332
|
}
|
|
2331
|
-
function
|
|
2332
|
-
let n =
|
|
2333
|
+
function er(e, t) {
|
|
2334
|
+
let n = Zn(e);
|
|
2333
2335
|
return n.height / n.width * t;
|
|
2334
2336
|
}
|
|
2335
|
-
function
|
|
2337
|
+
function tr(e, t) {
|
|
2336
2338
|
let n = Array.from({ length: t.columnCount }, () => 0), r = Array(e.length), i = Array(e.length), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = 0;
|
|
2337
2339
|
for (let c = 0; c < e.length; c += 1) {
|
|
2338
2340
|
let l = e[c];
|
|
2339
2341
|
o.set($(l), c);
|
|
2340
2342
|
let u = 0;
|
|
2341
2343
|
for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
|
|
2342
|
-
let d = u * (t.columnWidth + t.gapX), f = n[u], p =
|
|
2344
|
+
let d = u * (t.columnWidth + t.gapX), f = n[u], p = er(l, t.columnWidth);
|
|
2343
2345
|
r[c] = {
|
|
2344
2346
|
x: d,
|
|
2345
2347
|
y: f
|
|
@@ -2358,7 +2360,7 @@ function er(e, t) {
|
|
|
2358
2360
|
indexById: o
|
|
2359
2361
|
};
|
|
2360
2362
|
}
|
|
2361
|
-
function
|
|
2363
|
+
function nr(e) {
|
|
2362
2364
|
if (e.itemCount <= 0) return [];
|
|
2363
2365
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2364
2366
|
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();
|
|
@@ -2368,7 +2370,7 @@ function tr(e) {
|
|
|
2368
2370
|
}
|
|
2369
2371
|
return Array.from(a).sort((e, t) => e - t);
|
|
2370
2372
|
}
|
|
2371
|
-
function
|
|
2373
|
+
function rr(e, t, n) {
|
|
2372
2374
|
let r = /* @__PURE__ */ new Map();
|
|
2373
2375
|
for (let i of e) {
|
|
2374
2376
|
let e = t.get($(i));
|
|
@@ -2378,11 +2380,11 @@ function nr(e, t, n) {
|
|
|
2378
2380
|
}
|
|
2379
2381
|
return r;
|
|
2380
2382
|
}
|
|
2381
|
-
function
|
|
2383
|
+
function ir(e) {
|
|
2382
2384
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2383
2385
|
}
|
|
2384
|
-
function
|
|
2385
|
-
return e.type !== "image" || n / t >=
|
|
2386
|
+
function ar(e, t, n) {
|
|
2387
|
+
return e.type !== "image" || n / t >= Xn ? {
|
|
2386
2388
|
width: t,
|
|
2387
2389
|
height: n
|
|
2388
2390
|
} : {
|
|
@@ -2392,21 +2394,21 @@ function ir(e, t, n) {
|
|
|
2392
2394
|
}
|
|
2393
2395
|
//#endregion
|
|
2394
2396
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
2395
|
-
var
|
|
2396
|
-
function
|
|
2397
|
+
var or = 300, sr = 600, cr = 40, lr = 300, ur = 400;
|
|
2398
|
+
function dr(e, t) {
|
|
2397
2399
|
return t === "top" ? [...e].reverse() : e;
|
|
2398
2400
|
}
|
|
2399
|
-
function
|
|
2400
|
-
return e <= 0 ?
|
|
2401
|
+
function fr(e) {
|
|
2402
|
+
return e <= 0 ? sr : sr + Math.min((e - 1) * cr, ur);
|
|
2401
2403
|
}
|
|
2402
|
-
function
|
|
2403
|
-
return
|
|
2404
|
+
function pr() {
|
|
2405
|
+
return lr;
|
|
2404
2406
|
}
|
|
2405
|
-
function
|
|
2407
|
+
function mr(e) {
|
|
2406
2408
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
2407
2409
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
2408
2410
|
}
|
|
2409
|
-
function
|
|
2411
|
+
function hr(e) {
|
|
2410
2412
|
let t = T(/* @__PURE__ */ new Set()), n = T(/* @__PURE__ */ new Set()), r = T(/* @__PURE__ */ new Map()), a = T(/* @__PURE__ */ new Map()), o = T(/* @__PURE__ */ new Map()), s = T(/* @__PURE__ */ new Set()), c = T(/* @__PURE__ */ new Map()), l = T(/* @__PURE__ */ new Map()), u = T(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
|
|
2411
2413
|
F(e.visibleIndices, (i) => {
|
|
2412
2414
|
if (!i.length) return;
|
|
@@ -2416,20 +2418,20 @@ function mr(e) {
|
|
|
2416
2418
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
2417
2419
|
}
|
|
2418
2420
|
if (!o.length) return;
|
|
2419
|
-
let s =
|
|
2420
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
2421
|
-
r.value = c,
|
|
2421
|
+
let s = dr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
2422
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * cr, ur));
|
|
2423
|
+
r.value = c, gr(() => {
|
|
2422
2424
|
let e = new Set(n.value);
|
|
2423
2425
|
for (let t of o) e.add(t);
|
|
2424
2426
|
n.value = e;
|
|
2425
|
-
}),
|
|
2427
|
+
}), _r(() => {
|
|
2426
2428
|
let e = new Set(t.value);
|
|
2427
2429
|
for (let t of o) e.delete(t);
|
|
2428
2430
|
t.value = e, S(() => {
|
|
2429
2431
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
2430
2432
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
2431
2433
|
n.value = e, r.value = t, a.value = i;
|
|
2432
|
-
},
|
|
2434
|
+
}, fr(o.length));
|
|
2433
2435
|
});
|
|
2434
2436
|
}, { flush: "post" }), F(() => e.items.value.map((e) => $(e)), (e) => {
|
|
2435
2437
|
if (!e.length || !o.value.size) return;
|
|
@@ -2456,7 +2458,7 @@ function mr(e) {
|
|
|
2456
2458
|
let e = $(t.item);
|
|
2457
2459
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
2458
2460
|
}
|
|
2459
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
2461
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, gr(() => {
|
|
2460
2462
|
let e = new Set(s.value);
|
|
2461
2463
|
for (let t of p) e.add(t);
|
|
2462
2464
|
s.value = e;
|
|
@@ -2464,9 +2466,9 @@ function mr(e) {
|
|
|
2464
2466
|
let e = new Map(o.value), t = new Set(s.value);
|
|
2465
2467
|
for (let n of p) e.delete(n), t.delete(n);
|
|
2466
2468
|
o.value = e, s.value = t;
|
|
2467
|
-
},
|
|
2469
|
+
}, lr);
|
|
2468
2470
|
}
|
|
2469
|
-
function g(t, n, r =
|
|
2471
|
+
function g(t, n, r = or) {
|
|
2470
2472
|
if (!t.size) return;
|
|
2471
2473
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
2472
2474
|
for (let [r, o] of t.entries()) {
|
|
@@ -2485,8 +2487,8 @@ function mr(e) {
|
|
|
2485
2487
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
2486
2488
|
let o = new Map(l.value);
|
|
2487
2489
|
for (let e of a) o.set(e, r);
|
|
2488
|
-
l.value = o,
|
|
2489
|
-
u.value = new Set(a),
|
|
2490
|
+
l.value = o, gr(() => {
|
|
2491
|
+
u.value = new Set(a), gr(() => {
|
|
2490
2492
|
c.value = /* @__PURE__ */ new Map();
|
|
2491
2493
|
});
|
|
2492
2494
|
}), S(() => {
|
|
@@ -2497,8 +2499,8 @@ function mr(e) {
|
|
|
2497
2499
|
}, r);
|
|
2498
2500
|
}
|
|
2499
2501
|
function _(e) {
|
|
2500
|
-
if (n.value.has(e)) return `transform ${
|
|
2501
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
2502
|
+
if (n.value.has(e)) return `transform ${sr}ms ease-out`;
|
|
2503
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? or}ms ease-out`;
|
|
2502
2504
|
}
|
|
2503
2505
|
function v(e) {
|
|
2504
2506
|
if (!n.value.has(e)) return;
|
|
@@ -2515,7 +2517,7 @@ function mr(e) {
|
|
|
2515
2517
|
} : {
|
|
2516
2518
|
dx: 0,
|
|
2517
2519
|
dy: 0
|
|
2518
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
2520
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? mr({
|
|
2519
2521
|
columnWidth: e.columnWidth.value,
|
|
2520
2522
|
direction: u,
|
|
2521
2523
|
itemHeight: o,
|
|
@@ -2529,14 +2531,14 @@ function mr(e) {
|
|
|
2529
2531
|
if (!r) return {
|
|
2530
2532
|
opacity: "0",
|
|
2531
2533
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
2532
|
-
transition: `opacity ${
|
|
2534
|
+
transition: `opacity ${lr}ms ease-out, transform ${lr}ms ease-out`
|
|
2533
2535
|
};
|
|
2534
2536
|
let i = s.value.has(n);
|
|
2535
2537
|
return {
|
|
2536
2538
|
height: `${r.height}px`,
|
|
2537
2539
|
opacity: i ? "0" : "1",
|
|
2538
2540
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
2539
|
-
transition: `opacity ${
|
|
2541
|
+
transition: `opacity ${lr}ms ease-out, transform ${lr}ms ease-out`,
|
|
2540
2542
|
width: `${e.columnWidth.value}px`
|
|
2541
2543
|
};
|
|
2542
2544
|
}
|
|
@@ -2557,28 +2559,28 @@ function mr(e) {
|
|
|
2557
2559
|
playFlipMoveAnimation: g
|
|
2558
2560
|
};
|
|
2559
2561
|
}
|
|
2560
|
-
function
|
|
2562
|
+
function gr(e) {
|
|
2561
2563
|
if (typeof requestAnimationFrame == "function") {
|
|
2562
2564
|
requestAnimationFrame(() => e());
|
|
2563
2565
|
return;
|
|
2564
2566
|
}
|
|
2565
2567
|
setTimeout(e, 0);
|
|
2566
2568
|
}
|
|
2567
|
-
function
|
|
2568
|
-
|
|
2569
|
+
function _r(e) {
|
|
2570
|
+
gr(() => gr(e));
|
|
2569
2571
|
}
|
|
2570
2572
|
//#endregion
|
|
2571
2573
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
2572
|
-
function
|
|
2574
|
+
function vr(e, t) {
|
|
2573
2575
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
2574
2576
|
}
|
|
2575
|
-
function
|
|
2577
|
+
function yr(e, t, n) {
|
|
2576
2578
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
2577
2579
|
}
|
|
2578
|
-
function
|
|
2580
|
+
function br(e, t, n, r) {
|
|
2579
2581
|
return (e?.scrollHeight ?? r) - (t + n);
|
|
2580
2582
|
}
|
|
2581
|
-
function
|
|
2583
|
+
function xr(e, t) {
|
|
2582
2584
|
return {
|
|
2583
2585
|
height: `${e}px`,
|
|
2584
2586
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -2586,8 +2588,8 @@ function br(e, t) {
|
|
|
2586
2588
|
}
|
|
2587
2589
|
//#endregion
|
|
2588
2590
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
2589
|
-
var
|
|
2590
|
-
function
|
|
2591
|
+
var Sr = 250, Cr = 1e3;
|
|
2592
|
+
function wr(e) {
|
|
2591
2593
|
let t = T(!1), n = T(!1), r = T(0), i = T(0), a = T(!1), o = T(!1), s = 0, c = null;
|
|
2592
2594
|
b(() => {
|
|
2593
2595
|
y();
|
|
@@ -2603,7 +2605,7 @@ function Cr(e) {
|
|
|
2603
2605
|
function u(t) {
|
|
2604
2606
|
if (!x(t) || !e.isAtBoundary()) return;
|
|
2605
2607
|
let n = Date.now();
|
|
2606
|
-
n < s || (s = n +
|
|
2608
|
+
n < s || (s = n + Sr, m());
|
|
2607
2609
|
}
|
|
2608
2610
|
function d() {
|
|
2609
2611
|
if (!g()) return;
|
|
@@ -2637,7 +2639,7 @@ function Cr(e) {
|
|
|
2637
2639
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
2638
2640
|
}
|
|
2639
2641
|
function _() {
|
|
2640
|
-
o.value = !1, v(
|
|
2642
|
+
o.value = !1, v(Cr);
|
|
2641
2643
|
}
|
|
2642
2644
|
function v(e) {
|
|
2643
2645
|
y(), a.value = !0, c = setTimeout(() => {
|
|
@@ -2660,42 +2662,42 @@ function Cr(e) {
|
|
|
2660
2662
|
}
|
|
2661
2663
|
//#endregion
|
|
2662
2664
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
2663
|
-
var
|
|
2664
|
-
function
|
|
2665
|
-
let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth ||
|
|
2665
|
+
var Tr = 600, Er = 24, Dr = 16, Or = 300, kr = 200, Ar = 200, jr = Er + Dr, Mr = 200, Nr = 300, Pr = 24, Fr = 48, Ir = 500, Lr = 1e3;
|
|
2666
|
+
function Rr(e) {
|
|
2667
|
+
let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || Or), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = T(null), p = T(!1), m = i(() => Math.max(Or, a.value - Er * 2)), h = i(() => Qn(m.value, Or)), _ = i(() => $n(m.value, h.value, Or, Dr)), v = i(() => zr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => nr({
|
|
2666
2668
|
itemCount: e.items.value.length,
|
|
2667
2669
|
viewportHeight: r.value,
|
|
2668
2670
|
scrollTop: n.value,
|
|
2669
|
-
overscanPx:
|
|
2670
|
-
bucketPx:
|
|
2671
|
+
overscanPx: kr,
|
|
2672
|
+
bucketPx: Tr,
|
|
2671
2673
|
buckets: c.value
|
|
2672
2674
|
})), S = i(() => y.value.map((t) => ({
|
|
2673
2675
|
item: e.items.value[t],
|
|
2674
2676
|
index: t
|
|
2675
2677
|
}))), C = i(() => {
|
|
2676
|
-
let e = l.value +
|
|
2677
|
-
return Math.max(e, t, r.value) +
|
|
2678
|
-
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() =>
|
|
2678
|
+
let e = l.value + Er * 2, t = d.value ?? 0;
|
|
2679
|
+
return Math.max(e, t, r.value) + Mr;
|
|
2680
|
+
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => Vr({
|
|
2679
2681
|
active: e.active.value,
|
|
2680
2682
|
maxScrollTop: oe(),
|
|
2681
2683
|
progressDistancePx: n.value,
|
|
2682
|
-
thresholdPx:
|
|
2684
|
+
thresholdPx: Ar,
|
|
2683
2685
|
triggerEnabled: w.value
|
|
2684
|
-
})), D = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() =>
|
|
2686
|
+
})), D = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => Br({
|
|
2685
2687
|
active: e.active.value,
|
|
2686
2688
|
maxScrollTop: oe(),
|
|
2687
2689
|
progressDistancePx: n.value,
|
|
2688
|
-
thresholdPx:
|
|
2690
|
+
thresholdPx: jr,
|
|
2689
2691
|
triggerEnabled: e.hasPreviousPage.value
|
|
2690
|
-
})), k = i(() => Math.max(0, r.value -
|
|
2692
|
+
})), k = i(() => Math.max(0, r.value - Pr * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
|
|
2691
2693
|
if (!A.value) return 0;
|
|
2692
2694
|
let e = r.value / C.value * k.value;
|
|
2693
|
-
return Math.min(k.value, Math.max(
|
|
2695
|
+
return Math.min(k.value, Math.max(Fr, e));
|
|
2694
2696
|
}), M = i(() => {
|
|
2695
|
-
if (!A.value) return
|
|
2697
|
+
if (!A.value) return Pr;
|
|
2696
2698
|
let e = Math.max(0, C.value - r.value);
|
|
2697
|
-
return
|
|
2698
|
-
}), N =
|
|
2699
|
+
return Pr + Math.max(0, k.value - j.value) * (e > 0 ? zr(n.value / e, 0, 1) : 0);
|
|
2700
|
+
}), N = hr({
|
|
2699
2701
|
items: e.items,
|
|
2700
2702
|
visibleIndices: y,
|
|
2701
2703
|
positions: o,
|
|
@@ -2704,37 +2706,37 @@ function Lr(e) {
|
|
|
2704
2706
|
columnWidth: _,
|
|
2705
2707
|
scrollTop: n,
|
|
2706
2708
|
viewportHeight: r
|
|
2707
|
-
}), P =
|
|
2709
|
+
}), P = wr({
|
|
2708
2710
|
direction: "top",
|
|
2709
2711
|
getAnimationLockMs(e) {
|
|
2710
|
-
return Math.max(
|
|
2712
|
+
return Math.max(Ir, fr(e)) + Lr;
|
|
2711
2713
|
},
|
|
2712
2714
|
hasPage: e.hasPreviousPage,
|
|
2713
2715
|
interactionLocked: p,
|
|
2714
2716
|
isAtBoundary() {
|
|
2715
|
-
return n.value <=
|
|
2717
|
+
return n.value <= jr;
|
|
2716
2718
|
},
|
|
2717
2719
|
loading: e.loading,
|
|
2718
2720
|
requestPage: e.requestPreviousPage
|
|
2719
|
-
}), I =
|
|
2721
|
+
}), I = wr({
|
|
2720
2722
|
direction: "bottom",
|
|
2721
2723
|
getAnimationLockMs(e) {
|
|
2722
|
-
return
|
|
2724
|
+
return fr(e) + Lr;
|
|
2723
2725
|
},
|
|
2724
2726
|
hasPage: w,
|
|
2725
2727
|
interactionLocked: p,
|
|
2726
2728
|
isAtBoundary() {
|
|
2727
|
-
return ae() <=
|
|
2729
|
+
return ae() <= Ar;
|
|
2728
2730
|
},
|
|
2729
2731
|
loading: e.loading,
|
|
2730
2732
|
requestPage: e.requestNextPage
|
|
2731
|
-
}), L = null, R = 0, z = null, B = null,
|
|
2733
|
+
}), L = null, R = 0, z = null, B = null, ee = !1;
|
|
2732
2734
|
F([
|
|
2733
2735
|
() => e.items.value,
|
|
2734
2736
|
h,
|
|
2735
2737
|
_
|
|
2736
2738
|
], async ([t], [r = []]) => {
|
|
2737
|
-
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c =
|
|
2739
|
+
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = rr(a, u.value, o.value), l = Z(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
|
|
2738
2740
|
let t = $(e);
|
|
2739
2741
|
if (f.has(t)) return [];
|
|
2740
2742
|
let n = c.get(t), r = l.get(t);
|
|
@@ -2743,8 +2745,8 @@ function Lr(e) {
|
|
|
2743
2745
|
item: e,
|
|
2744
2746
|
position: n
|
|
2745
2747
|
}];
|
|
2746
|
-
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value >
|
|
2747
|
-
y &&
|
|
2748
|
+
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > Er + Dr, b = h && n.value > Er + Dr ? t[v.value] : null, x = b ? $(b) : null;
|
|
2749
|
+
y && q(pr() + Lr), _ && K(), V(), m.length > 0 && N.markLeave(m), p.length > 0 && (N.markEnter(p, h ? "top" : "bottom"), h ? P.onItemsMutated(p.length) : I.onItemsMutated(p.length)), N.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? Ir : void 0), x ? (await g(), te(x, c)) : e.active.value && s.length > 0 && ne();
|
|
2748
2750
|
}, { immediate: !0 }), F([
|
|
2749
2751
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
2750
2752
|
h,
|
|
@@ -2761,10 +2763,10 @@ function Lr(e) {
|
|
|
2761
2763
|
}
|
|
2762
2764
|
if (i !== !1 || f.value == null) return;
|
|
2763
2765
|
await g();
|
|
2764
|
-
let o = Math.max(0, C.value - r.value), s =
|
|
2766
|
+
let o = Math.max(0, C.value - r.value), s = zr(f.value, 0, o);
|
|
2765
2767
|
a.scrollTop = s, n.value = s, P.syncBoundary(), I.syncBoundary();
|
|
2766
2768
|
}), F(() => e.loading.value, async (t) => {
|
|
2767
|
-
!t && !e.pendingAppendItems.value.length && !z && !
|
|
2769
|
+
!t && !e.pendingAppendItems.value.length && !z && !ee && (d.value = null), P.onLoadingChange(t), I.onLoadingChange(t), await g();
|
|
2768
2770
|
}), x(async () => {
|
|
2769
2771
|
X(), await g(), v.value > 0 ? G(v.value, "center") : J(), P.syncBoundary(), I.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
|
|
2770
2772
|
X();
|
|
@@ -2772,20 +2774,20 @@ function Lr(e) {
|
|
|
2772
2774
|
}), b(() => {
|
|
2773
2775
|
L?.disconnect(), L = null, window.removeEventListener("resize", X), ue(), de(), R &&= (cancelAnimationFrame(R), 0);
|
|
2774
2776
|
});
|
|
2775
|
-
function
|
|
2776
|
-
let t =
|
|
2777
|
+
function V() {
|
|
2778
|
+
let t = tr(e.items.value, {
|
|
2777
2779
|
columnCount: h.value,
|
|
2778
2780
|
columnWidth: _.value,
|
|
2779
|
-
gapX:
|
|
2780
|
-
gapY:
|
|
2781
|
-
bucketPx:
|
|
2781
|
+
gapX: Dr,
|
|
2782
|
+
gapY: Dr,
|
|
2783
|
+
bucketPx: Tr
|
|
2782
2784
|
});
|
|
2783
2785
|
o.value = t.positions.map((e) => ({
|
|
2784
|
-
x: e.x +
|
|
2785
|
-
y: e.y +
|
|
2786
|
+
x: e.x + Er,
|
|
2787
|
+
y: e.y + Er
|
|
2786
2788
|
})), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
|
|
2787
2789
|
}
|
|
2788
|
-
function
|
|
2790
|
+
function H() {
|
|
2789
2791
|
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = re(), P.syncBoundary(), I.syncBoundary(), Y(), !ne() && (R ||= requestAnimationFrame(() => {
|
|
2790
2792
|
R = 0, J();
|
|
2791
2793
|
})));
|
|
@@ -2807,15 +2809,15 @@ function Lr(e) {
|
|
|
2807
2809
|
let a = t.value, c = o.value[e], l = s.value[e];
|
|
2808
2810
|
if (!a || !c || !l) return;
|
|
2809
2811
|
let u = a.scrollTop, d = Math.max(0, C.value - r.value);
|
|
2810
|
-
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y -
|
|
2812
|
+
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Er : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Er), a.scrollTop = zr(u, 0, d), n.value = a.scrollTop, J();
|
|
2811
2813
|
}
|
|
2812
|
-
function
|
|
2814
|
+
function te(e, r) {
|
|
2813
2815
|
let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
|
|
2814
2816
|
if (!i || !a || !c) return;
|
|
2815
2817
|
let l = c.y - a.y;
|
|
2816
2818
|
i.scrollTop += l, n.value = i.scrollTop;
|
|
2817
2819
|
}
|
|
2818
|
-
function
|
|
2820
|
+
function K() {
|
|
2819
2821
|
let e = t.value;
|
|
2820
2822
|
if (!e) {
|
|
2821
2823
|
n.value = 0;
|
|
@@ -2823,7 +2825,7 @@ function Lr(e) {
|
|
|
2823
2825
|
}
|
|
2824
2826
|
e.scrollTop = 0, n.value = 0, P.syncBoundary(), I.syncBoundary();
|
|
2825
2827
|
}
|
|
2826
|
-
function
|
|
2828
|
+
function q(e) {
|
|
2827
2829
|
de(), p.value = !0, B = setTimeout(() => {
|
|
2828
2830
|
B = null, p.value = !1;
|
|
2829
2831
|
}, Math.max(0, e));
|
|
@@ -2840,7 +2842,7 @@ function Lr(e) {
|
|
|
2840
2842
|
e.setActiveIndex(i);
|
|
2841
2843
|
}
|
|
2842
2844
|
function ne() {
|
|
2843
|
-
let t = n.value <=
|
|
2845
|
+
let t = n.value <= jr, r = ae() <= Ar;
|
|
2844
2846
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
2845
2847
|
}
|
|
2846
2848
|
function Y() {
|
|
@@ -2850,29 +2852,29 @@ function Lr(e) {
|
|
|
2850
2852
|
r.value = re(), a.value = ie();
|
|
2851
2853
|
}
|
|
2852
2854
|
function re() {
|
|
2853
|
-
return
|
|
2855
|
+
return vr(t.value, r.value);
|
|
2854
2856
|
}
|
|
2855
2857
|
function ie() {
|
|
2856
|
-
return
|
|
2858
|
+
return yr(t.value, a.value, Or);
|
|
2857
2859
|
}
|
|
2858
2860
|
function ae() {
|
|
2859
|
-
return
|
|
2861
|
+
return br(t.value, n.value, r.value, C.value);
|
|
2860
2862
|
}
|
|
2861
2863
|
function oe() {
|
|
2862
2864
|
let e = Math.max(t.value?.scrollHeight ?? 0, C.value);
|
|
2863
2865
|
return Math.max(0, e - r.value);
|
|
2864
2866
|
}
|
|
2865
2867
|
function se() {
|
|
2866
|
-
return
|
|
2868
|
+
return xr(j.value, M.value);
|
|
2867
2869
|
}
|
|
2868
2870
|
function ce(e) {
|
|
2869
|
-
return e.length ?
|
|
2871
|
+
return e.length ? tr(e, {
|
|
2870
2872
|
columnCount: h.value,
|
|
2871
2873
|
columnWidth: _.value,
|
|
2872
|
-
gapX:
|
|
2873
|
-
gapY:
|
|
2874
|
-
bucketPx:
|
|
2875
|
-
}).contentHeight +
|
|
2874
|
+
gapX: Dr,
|
|
2875
|
+
gapY: Dr,
|
|
2876
|
+
bucketPx: Tr
|
|
2877
|
+
}).contentHeight + Er * 2 : 0;
|
|
2876
2878
|
}
|
|
2877
2879
|
function Z(e) {
|
|
2878
2880
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -2887,14 +2889,14 @@ function Lr(e) {
|
|
|
2887
2889
|
function le() {
|
|
2888
2890
|
let t = e.commitPendingAppend.value;
|
|
2889
2891
|
typeof t == "function" && (z = setTimeout(async () => {
|
|
2890
|
-
z = null,
|
|
2892
|
+
z = null, ee = !0;
|
|
2891
2893
|
try {
|
|
2892
2894
|
if (!e.pendingAppendItems.value.length) return;
|
|
2893
2895
|
await t(), await g(), await g();
|
|
2894
2896
|
} finally {
|
|
2895
|
-
d.value = null,
|
|
2897
|
+
d.value = null, ee = !1;
|
|
2896
2898
|
}
|
|
2897
|
-
},
|
|
2899
|
+
}, Nr));
|
|
2898
2900
|
}
|
|
2899
2901
|
function ue() {
|
|
2900
2902
|
z &&= (clearTimeout(z), null);
|
|
@@ -2910,7 +2912,7 @@ function Lr(e) {
|
|
|
2910
2912
|
getScrollbarThumbStyle: se,
|
|
2911
2913
|
leavingItems: N.leavingItems,
|
|
2912
2914
|
nextBoundaryLoadProgress: E,
|
|
2913
|
-
onScroll:
|
|
2915
|
+
onScroll: H,
|
|
2914
2916
|
onWheel: U,
|
|
2915
2917
|
paginationLabel: D,
|
|
2916
2918
|
previousBoundaryLoadProgress: O,
|
|
@@ -2921,27 +2923,27 @@ function Lr(e) {
|
|
|
2921
2923
|
scrollViewportRef: t
|
|
2922
2924
|
};
|
|
2923
2925
|
}
|
|
2924
|
-
function
|
|
2926
|
+
function zr(e, t, n) {
|
|
2925
2927
|
return Math.min(Math.max(e, t), n);
|
|
2926
2928
|
}
|
|
2927
|
-
function
|
|
2929
|
+
function Br(e) {
|
|
2928
2930
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
2929
2931
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
2930
|
-
return t <= 0 ? 1 :
|
|
2932
|
+
return t <= 0 ? 1 : zr(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
2931
2933
|
}
|
|
2932
|
-
function
|
|
2934
|
+
function Vr(e) {
|
|
2933
2935
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
2934
2936
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
2935
|
-
return t <= 0 ? 1 :
|
|
2937
|
+
return t <= 0 ? 1 : zr(e.progressDistancePx / t, 0, 1);
|
|
2936
2938
|
}
|
|
2937
2939
|
//#endregion
|
|
2938
2940
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
2939
|
-
function
|
|
2941
|
+
function Hr(e) {
|
|
2940
2942
|
if (e) try {
|
|
2941
2943
|
e.removeAttribute("src"), e.src = "";
|
|
2942
2944
|
} catch {}
|
|
2943
2945
|
}
|
|
2944
|
-
function
|
|
2946
|
+
function Ur(e) {
|
|
2945
2947
|
if (e) {
|
|
2946
2948
|
try {
|
|
2947
2949
|
e.currentTime = 0;
|
|
@@ -2952,12 +2954,12 @@ function Hr(e) {
|
|
|
2952
2954
|
} catch {}
|
|
2953
2955
|
}
|
|
2954
2956
|
}
|
|
2955
|
-
function
|
|
2957
|
+
function Wr(e, t) {
|
|
2956
2958
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
2957
2959
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
2958
2960
|
return e.bottom > 0 && e.top < n;
|
|
2959
2961
|
}
|
|
2960
|
-
function
|
|
2962
|
+
function Gr(e) {
|
|
2961
2963
|
if (!e) return null;
|
|
2962
2964
|
try {
|
|
2963
2965
|
return new URL(e, window.location.href).href;
|
|
@@ -2967,9 +2969,9 @@ function Wr(e) {
|
|
|
2967
2969
|
}
|
|
2968
2970
|
//#endregion
|
|
2969
2971
|
//#region src/components/viewer-core/listPreview.ts
|
|
2970
|
-
var
|
|
2971
|
-
function
|
|
2972
|
-
let t =
|
|
2972
|
+
var Kr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, qr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, Jr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
2973
|
+
function Yr(e) {
|
|
2974
|
+
let t = Xr(e), n = t?.url, r = Zn(e), i = e.title?.trim() || wt(e.type);
|
|
2973
2975
|
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
2974
2976
|
kind: "video",
|
|
2975
2977
|
url: n,
|
|
@@ -2988,13 +2990,13 @@ function Jr(e) {
|
|
|
2988
2990
|
width: r.width,
|
|
2989
2991
|
height: r.height,
|
|
2990
2992
|
label: i
|
|
2991
|
-
} : typeof n == "string" &&
|
|
2993
|
+
} : typeof n == "string" && Qr(e, n) ? {
|
|
2992
2994
|
kind: "video",
|
|
2993
2995
|
url: n,
|
|
2994
2996
|
width: r.width,
|
|
2995
2997
|
height: r.height,
|
|
2996
2998
|
label: i
|
|
2997
|
-
} : typeof n == "string" &&
|
|
2999
|
+
} : typeof n == "string" && Zr(e, n) ? {
|
|
2998
3000
|
kind: "image",
|
|
2999
3001
|
url: n,
|
|
3000
3002
|
width: r.width,
|
|
@@ -3008,34 +3010,34 @@ function Jr(e) {
|
|
|
3008
3010
|
label: i
|
|
3009
3011
|
};
|
|
3010
3012
|
}
|
|
3011
|
-
function
|
|
3013
|
+
function Xr(e) {
|
|
3012
3014
|
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
3013
3015
|
}
|
|
3014
|
-
function Xr(e, t) {
|
|
3015
|
-
return e.type !== "image" || typeof t != "string" ? !1 : Gr.test(t) || Qr(t);
|
|
3016
|
-
}
|
|
3017
3016
|
function Zr(e, t) {
|
|
3018
|
-
return e.type !== "
|
|
3017
|
+
return e.type !== "image" || typeof t != "string" ? !1 : Kr.test(t) || $r(t);
|
|
3019
3018
|
}
|
|
3020
|
-
function Qr(e) {
|
|
3021
|
-
return
|
|
3019
|
+
function Qr(e, t) {
|
|
3020
|
+
return e.type !== "video" || typeof t != "string" ? !1 : qr.test(t) || ei(t);
|
|
3022
3021
|
}
|
|
3023
3022
|
function $r(e) {
|
|
3024
|
-
return
|
|
3023
|
+
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
3024
|
+
}
|
|
3025
|
+
function ei(e) {
|
|
3026
|
+
return Jr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
3025
3027
|
}
|
|
3026
3028
|
//#endregion
|
|
3027
3029
|
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
3028
|
-
var
|
|
3030
|
+
var ti = {
|
|
3029
3031
|
maxGlobal: 10,
|
|
3030
3032
|
maxPerDomain: 4,
|
|
3031
3033
|
maxVideoPerDomain: 2
|
|
3032
3034
|
};
|
|
3033
|
-
function
|
|
3035
|
+
function ni(e = ti) {
|
|
3034
3036
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
|
|
3035
3037
|
function i(e) {
|
|
3036
3038
|
let i = {
|
|
3037
3039
|
...e,
|
|
3038
|
-
domain:
|
|
3040
|
+
domain: ai(e.url),
|
|
3039
3041
|
enqueuedAt: r,
|
|
3040
3042
|
id: `vibe-asset-load-${r += 1}`
|
|
3041
3043
|
};
|
|
@@ -3054,7 +3056,7 @@ function ti(e = ei) {
|
|
|
3054
3056
|
function a() {
|
|
3055
3057
|
if (n.size === 0) return;
|
|
3056
3058
|
let r = [...n.values()].sort((e, t) => {
|
|
3057
|
-
let n =
|
|
3059
|
+
let n = ii(e) - ii(t);
|
|
3058
3060
|
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
3059
3061
|
});
|
|
3060
3062
|
for (let i of r) {
|
|
@@ -3075,8 +3077,8 @@ function ti(e = ei) {
|
|
|
3075
3077
|
}
|
|
3076
3078
|
return { request: i };
|
|
3077
3079
|
}
|
|
3078
|
-
var
|
|
3079
|
-
function
|
|
3080
|
+
var ri = ni();
|
|
3081
|
+
function ii(e) {
|
|
3080
3082
|
try {
|
|
3081
3083
|
let t = e.getPriority();
|
|
3082
3084
|
return Number.isFinite(t) ? t : Infinity;
|
|
@@ -3084,7 +3086,7 @@ function ri(e) {
|
|
|
3084
3086
|
return Infinity;
|
|
3085
3087
|
}
|
|
3086
3088
|
}
|
|
3087
|
-
function
|
|
3089
|
+
function ai(e) {
|
|
3088
3090
|
try {
|
|
3089
3091
|
return new URL(e).hostname || "local";
|
|
3090
3092
|
} catch {
|
|
@@ -3092,15 +3094,95 @@ function ii(e) {
|
|
|
3092
3094
|
}
|
|
3093
3095
|
}
|
|
3094
3096
|
//#endregion
|
|
3097
|
+
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
3098
|
+
function oi(e) {
|
|
3099
|
+
let t = T(null), n = i(() => {
|
|
3100
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? Gr(e.item.value.healthCheck.url) : null;
|
|
3101
|
+
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
3102
|
+
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
3103
|
+
F(n, (e, n) => {
|
|
3104
|
+
e !== n && (t.value = null, l(), a += 1);
|
|
3105
|
+
}), F([
|
|
3106
|
+
n,
|
|
3107
|
+
e.surfaceActive,
|
|
3108
|
+
e.isInView,
|
|
3109
|
+
e.isReady,
|
|
3110
|
+
e.loadErrorKind
|
|
3111
|
+
], () => {
|
|
3112
|
+
s();
|
|
3113
|
+
});
|
|
3114
|
+
function s() {
|
|
3115
|
+
let i = n.value;
|
|
3116
|
+
if (!i) {
|
|
3117
|
+
l();
|
|
3118
|
+
return;
|
|
3119
|
+
}
|
|
3120
|
+
if (!e.surfaceActive.value || !e.isInView.value || !e.isReady.value || e.loadErrorKind.value) {
|
|
3121
|
+
l();
|
|
3122
|
+
return;
|
|
3123
|
+
}
|
|
3124
|
+
if (o.has(i)) {
|
|
3125
|
+
t.value = o.get(i) ?? null;
|
|
3126
|
+
return;
|
|
3127
|
+
}
|
|
3128
|
+
if (r) {
|
|
3129
|
+
r.refresh();
|
|
3130
|
+
return;
|
|
3131
|
+
}
|
|
3132
|
+
r = ri.request({
|
|
3133
|
+
assetType: "probe",
|
|
3134
|
+
getPriority: e.getPriority,
|
|
3135
|
+
onGrant() {
|
|
3136
|
+
let r = n.value;
|
|
3137
|
+
if (!r) {
|
|
3138
|
+
l();
|
|
3139
|
+
return;
|
|
3140
|
+
}
|
|
3141
|
+
let i = ++a;
|
|
3142
|
+
Gt(r).then((s) => {
|
|
3143
|
+
if (!(i !== a || n.value !== r)) {
|
|
3144
|
+
if (o.set(r, s ?? null), !s) {
|
|
3145
|
+
t.value = null;
|
|
3146
|
+
return;
|
|
3147
|
+
}
|
|
3148
|
+
t.value = s, e.reportAssetError?.({
|
|
3149
|
+
item: e.item.value,
|
|
3150
|
+
occurrenceKey: $(e.item.value),
|
|
3151
|
+
url: r,
|
|
3152
|
+
kind: s,
|
|
3153
|
+
surface: "grid"
|
|
3154
|
+
});
|
|
3155
|
+
}
|
|
3156
|
+
}).finally(() => {
|
|
3157
|
+
i === a && l();
|
|
3158
|
+
});
|
|
3159
|
+
},
|
|
3160
|
+
url: i
|
|
3161
|
+
});
|
|
3162
|
+
}
|
|
3163
|
+
function c() {
|
|
3164
|
+
let e = n.value;
|
|
3165
|
+
return !t.value || !e ? !1 : (o.delete(e), t.value = null, l(), s(), !0);
|
|
3166
|
+
}
|
|
3167
|
+
function l() {
|
|
3168
|
+
r?.release(), r = null;
|
|
3169
|
+
}
|
|
3170
|
+
return {
|
|
3171
|
+
errorKind: t,
|
|
3172
|
+
release: l,
|
|
3173
|
+
retry: c
|
|
3174
|
+
};
|
|
3175
|
+
}
|
|
3176
|
+
//#endregion
|
|
3095
3177
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
3096
|
-
var
|
|
3178
|
+
var si = ["aria-label"], ci = {
|
|
3097
3179
|
key: 0,
|
|
3098
3180
|
"data-testid": "vibe-list-card-spinner",
|
|
3099
3181
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
3100
|
-
},
|
|
3182
|
+
}, li = { 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]" }, ui = ["src", "alt"], di = ["src"], fi = ["data-kind"], pi = { class: "grid justify-items-center gap-3 px-4 text-center" }, mi = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, hi = {
|
|
3101
3183
|
key: 4,
|
|
3102
3184
|
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))]"
|
|
3103
|
-
},
|
|
3185
|
+
}, gi = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, _i = { class: "pointer-events-none absolute inset-0 z-[3]" }, vi = /* @__PURE__ */ d({
|
|
3104
3186
|
__name: "ListCard",
|
|
3105
3187
|
props: {
|
|
3106
3188
|
active: {
|
|
@@ -3124,45 +3206,54 @@ var ai = ["aria-label"], oi = {
|
|
|
3124
3206
|
},
|
|
3125
3207
|
emits: ["open"],
|
|
3126
3208
|
setup(e, { emit: t }) {
|
|
3127
|
-
let n = e, r = t, l = i(() =>
|
|
3209
|
+
let n = e, r = t, l = i(() => Yr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(!1), g = T(null), v = T(null), y = T(null), C = T(null), w = T(null), E = T(l.value.kind === "fallback"), A = i(() => E.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), M = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), N = i(() => l.value.kind === "image" && !!A.value), P = i(() => l.value.kind === "video" && !!A.value), I = oi({
|
|
3210
|
+
attachedAssetUrl: A,
|
|
3211
|
+
getPriority: Z,
|
|
3212
|
+
isInView: d,
|
|
3213
|
+
isReady: m,
|
|
3214
|
+
item: i(() => n.item),
|
|
3215
|
+
loadErrorKind: g,
|
|
3216
|
+
reportAssetError: n.reportAssetError,
|
|
3217
|
+
surfaceActive: i(() => n.surfaceActive)
|
|
3218
|
+
}), L = i(() => I.errorKind.value ?? g.value), R = i(() => !!L.value), B = i(() => Ut(L.value)), ee = i(() => M.value && !g.value && (!E.value || !m.value)), V = null, H = null, U = /* @__PURE__ */ new Set();
|
|
3128
3219
|
F([A, () => l.value.kind], () => {
|
|
3129
3220
|
let e = l.value.kind === "fallback";
|
|
3130
3221
|
m.value = e, h.value = !1, g.value = null, e && (E.value = !0);
|
|
3131
3222
|
}), F(M, () => {
|
|
3132
|
-
|
|
3223
|
+
q();
|
|
3133
3224
|
}), F([
|
|
3134
3225
|
d,
|
|
3135
3226
|
m,
|
|
3136
3227
|
A
|
|
3137
3228
|
], () => {
|
|
3138
|
-
|
|
3229
|
+
J();
|
|
3139
3230
|
}), F(() => n.surfaceActive, (e) => {
|
|
3140
3231
|
if (!e) {
|
|
3141
|
-
|
|
3232
|
+
Y(), J();
|
|
3142
3233
|
return;
|
|
3143
3234
|
}
|
|
3144
3235
|
requestAnimationFrame(() => {
|
|
3145
|
-
|
|
3236
|
+
X(), q(), J();
|
|
3146
3237
|
});
|
|
3147
3238
|
}), x(() => {
|
|
3148
3239
|
if (!y.value || typeof IntersectionObserver > "u") {
|
|
3149
|
-
C.value = null, d.value = !0,
|
|
3240
|
+
C.value = null, d.value = !0, q();
|
|
3150
3241
|
return;
|
|
3151
3242
|
}
|
|
3152
|
-
C.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"),
|
|
3153
|
-
for (let t of e) t.target === y.value && (n.surfaceActive &&
|
|
3243
|
+
C.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), V = new IntersectionObserver((e) => {
|
|
3244
|
+
for (let t of e) t.target === y.value && (n.surfaceActive && X(t), q(), J());
|
|
3154
3245
|
}, {
|
|
3155
3246
|
root: C.value,
|
|
3156
3247
|
threshold: [0, 1]
|
|
3157
|
-
}),
|
|
3248
|
+
}), V.observe(y.value);
|
|
3158
3249
|
}), b(() => {
|
|
3159
|
-
|
|
3250
|
+
ne(), I.release(), V?.disconnect(), V = null;
|
|
3160
3251
|
});
|
|
3161
|
-
function
|
|
3162
|
-
|
|
3252
|
+
function W() {
|
|
3253
|
+
le(v.value) && (m.value = !0, g.value = null, ie(A.value ?? n.item.url), Y());
|
|
3163
3254
|
}
|
|
3164
|
-
async function
|
|
3165
|
-
if (!
|
|
3255
|
+
async function G() {
|
|
3256
|
+
if (!le(v.value)) return;
|
|
3166
3257
|
let e = A.value ?? n.item.url;
|
|
3167
3258
|
m.value = !1, g.value = "generic";
|
|
3168
3259
|
let t = await Wt(e);
|
|
@@ -3172,49 +3263,49 @@ var ai = ["aria-label"], oi = {
|
|
|
3172
3263
|
url: e,
|
|
3173
3264
|
kind: t,
|
|
3174
3265
|
surface: "grid"
|
|
3175
|
-
}),
|
|
3266
|
+
}), Y();
|
|
3176
3267
|
}
|
|
3177
|
-
function
|
|
3178
|
-
|
|
3179
|
-
}
|
|
3180
|
-
function G() {
|
|
3181
|
-
ce(w.value) && (h.value || (m.value = !1));
|
|
3268
|
+
function te() {
|
|
3269
|
+
le(w.value) && (h.value = !0, m.value = !0, g.value = null, ie(A.value ?? n.item.url), Y(), J());
|
|
3182
3270
|
}
|
|
3183
3271
|
function K() {
|
|
3272
|
+
le(w.value) && (h.value || (m.value = !1));
|
|
3273
|
+
}
|
|
3274
|
+
function q() {
|
|
3184
3275
|
if (l.value.kind === "fallback") {
|
|
3185
|
-
|
|
3276
|
+
ne(!1);
|
|
3186
3277
|
return;
|
|
3187
3278
|
}
|
|
3188
3279
|
if (!n.surfaceActive) {
|
|
3189
|
-
|
|
3280
|
+
Y();
|
|
3190
3281
|
return;
|
|
3191
3282
|
}
|
|
3192
3283
|
if (!M.value) {
|
|
3193
|
-
|
|
3284
|
+
ne();
|
|
3194
3285
|
return;
|
|
3195
3286
|
}
|
|
3196
|
-
if (E.value ||
|
|
3197
|
-
|
|
3287
|
+
if (E.value || H) {
|
|
3288
|
+
H?.refresh();
|
|
3198
3289
|
return;
|
|
3199
3290
|
}
|
|
3200
|
-
|
|
3291
|
+
H = ri.request({
|
|
3201
3292
|
assetType: l.value.kind,
|
|
3202
|
-
getPriority:
|
|
3293
|
+
getPriority: Z,
|
|
3203
3294
|
onGrant() {
|
|
3204
3295
|
E.value = !0, m.value = !1, g.value = null;
|
|
3205
3296
|
},
|
|
3206
3297
|
url: l.value.url ?? n.item.url
|
|
3207
3298
|
});
|
|
3208
3299
|
}
|
|
3209
|
-
function
|
|
3300
|
+
function J() {
|
|
3210
3301
|
let e = w.value;
|
|
3211
3302
|
if (!(!e || l.value.kind !== "video")) {
|
|
3212
|
-
if (
|
|
3303
|
+
if (L.value) {
|
|
3213
3304
|
e.pause();
|
|
3214
3305
|
return;
|
|
3215
3306
|
}
|
|
3216
3307
|
if (A.value && d.value && m.value) {
|
|
3217
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
3308
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, Jt(e);
|
|
3218
3309
|
return;
|
|
3219
3310
|
}
|
|
3220
3311
|
try {
|
|
@@ -3223,44 +3314,44 @@ var ai = ["aria-label"], oi = {
|
|
|
3223
3314
|
e.pause();
|
|
3224
3315
|
}
|
|
3225
3316
|
}
|
|
3226
|
-
function
|
|
3227
|
-
E.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (
|
|
3317
|
+
function ne(e = !0) {
|
|
3318
|
+
E.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (se(), ce()), Y();
|
|
3228
3319
|
}
|
|
3229
|
-
function
|
|
3230
|
-
|
|
3320
|
+
function Y() {
|
|
3321
|
+
H?.release(), H = null;
|
|
3231
3322
|
}
|
|
3232
|
-
function
|
|
3323
|
+
function X(e) {
|
|
3233
3324
|
let t = y.value;
|
|
3234
3325
|
if (!t) {
|
|
3235
3326
|
d.value = !0;
|
|
3236
3327
|
return;
|
|
3237
3328
|
}
|
|
3238
|
-
d.value =
|
|
3329
|
+
d.value = Wr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? C.value?.getBoundingClientRect() ?? null);
|
|
3239
3330
|
}
|
|
3240
|
-
function
|
|
3331
|
+
function ie(e) {
|
|
3241
3332
|
if (!e) return;
|
|
3242
3333
|
let t = $(n.item), r = `${t}|${e}`;
|
|
3243
|
-
|
|
3334
|
+
U.has(r) || (U.add(r), n.reportAssetLoad?.({
|
|
3244
3335
|
item: n.item,
|
|
3245
3336
|
occurrenceKey: t,
|
|
3246
3337
|
surface: "grid",
|
|
3247
3338
|
url: e
|
|
3248
3339
|
}));
|
|
3249
3340
|
}
|
|
3250
|
-
function
|
|
3251
|
-
if (!
|
|
3341
|
+
function ae() {
|
|
3342
|
+
if (!B.value || I.retry()) return;
|
|
3252
3343
|
let e = $(n.item);
|
|
3253
|
-
|
|
3254
|
-
t.startsWith(`${e}|`) &&
|
|
3255
|
-
}), g.value = null, m.value = !1, E.value = !1,
|
|
3344
|
+
U.forEach((t) => {
|
|
3345
|
+
t.startsWith(`${e}|`) && U.delete(t);
|
|
3346
|
+
}), g.value = null, m.value = !1, E.value = !1, Y(), q();
|
|
3256
3347
|
}
|
|
3257
|
-
function
|
|
3258
|
-
|
|
3348
|
+
function se() {
|
|
3349
|
+
Hr(v.value);
|
|
3259
3350
|
}
|
|
3260
|
-
function
|
|
3261
|
-
|
|
3351
|
+
function ce() {
|
|
3352
|
+
Ur(w.value);
|
|
3262
3353
|
}
|
|
3263
|
-
function
|
|
3354
|
+
function Z() {
|
|
3264
3355
|
let e = y.value;
|
|
3265
3356
|
if (!e) return Infinity;
|
|
3266
3357
|
let t = e.getBoundingClientRect();
|
|
@@ -3271,17 +3362,17 @@ var ai = ["aria-label"], oi = {
|
|
|
3271
3362
|
let n = window.innerHeight / 2;
|
|
3272
3363
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
3273
3364
|
}
|
|
3274
|
-
function
|
|
3275
|
-
let t =
|
|
3276
|
-
return !e || !t ? !1 :
|
|
3365
|
+
function le(e) {
|
|
3366
|
+
let t = Gr(A.value);
|
|
3367
|
+
return !e || !t ? !1 : Gr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
3277
3368
|
}
|
|
3278
|
-
function
|
|
3369
|
+
function ue() {
|
|
3279
3370
|
r("open");
|
|
3280
3371
|
}
|
|
3281
|
-
function
|
|
3372
|
+
function de() {
|
|
3282
3373
|
f.value = !0;
|
|
3283
3374
|
}
|
|
3284
|
-
function
|
|
3375
|
+
function Q(e) {
|
|
3285
3376
|
let t = e.relatedTarget;
|
|
3286
3377
|
y.value && t instanceof Node && y.value.contains(t) || (f.value = !1);
|
|
3287
3378
|
}
|
|
@@ -3290,8 +3381,8 @@ var ai = ["aria-label"], oi = {
|
|
|
3290
3381
|
ref: y,
|
|
3291
3382
|
"data-testid": "vibe-list-card-inner",
|
|
3292
3383
|
class: _(["group relative h-full w-full overflow-hidden border bg-[#0a0b0f] text-[#f7f1ea] transition-[border-color,transform] duration-300", n.active ? "border-white/28" : "border-white/12 hover:border-white/24"]),
|
|
3293
|
-
onFocusin:
|
|
3294
|
-
onFocusout:
|
|
3384
|
+
onFocusin: de,
|
|
3385
|
+
onFocusout: Q,
|
|
3295
3386
|
onPointerenter: t[0] ||= (e) => p.value = !0,
|
|
3296
3387
|
onPointerleave: t[1] ||= (e) => p.value = !1
|
|
3297
3388
|
}, [
|
|
@@ -3300,13 +3391,13 @@ var ai = ["aria-label"], oi = {
|
|
|
3300
3391
|
"data-testid": "vibe-list-card-open",
|
|
3301
3392
|
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]",
|
|
3302
3393
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
3303
|
-
onClick:
|
|
3304
|
-
}, null, 8,
|
|
3305
|
-
|
|
3394
|
+
onClick: ue
|
|
3395
|
+
}, null, 8, si),
|
|
3396
|
+
ee.value ? (S(), s("div", ci, [c("span", li, [u(j(re), {
|
|
3306
3397
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3307
3398
|
"aria-hidden": "true"
|
|
3308
3399
|
})])])) : o("", !0),
|
|
3309
|
-
N.value && A.value && !
|
|
3400
|
+
N.value && A.value && !R.value ? (S(), s("img", {
|
|
3310
3401
|
key: 1,
|
|
3311
3402
|
ref_key: "imageRef",
|
|
3312
3403
|
ref: v,
|
|
@@ -3314,9 +3405,9 @@ var ai = ["aria-label"], oi = {
|
|
|
3314
3405
|
alt: l.value.label,
|
|
3315
3406
|
draggable: "false",
|
|
3316
3407
|
class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
3317
|
-
onLoad:
|
|
3318
|
-
onError:
|
|
3319
|
-
}, null, 42,
|
|
3408
|
+
onLoad: W,
|
|
3409
|
+
onError: G
|
|
3410
|
+
}, null, 42, ui)) : P.value && A.value && !R.value ? (S(), s("video", {
|
|
3320
3411
|
key: 2,
|
|
3321
3412
|
ref_key: "videoRef",
|
|
3322
3413
|
ref: w,
|
|
@@ -3326,64 +3417,64 @@ var ai = ["aria-label"], oi = {
|
|
|
3326
3417
|
playsinline: "",
|
|
3327
3418
|
preload: "metadata",
|
|
3328
3419
|
class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
3329
|
-
onCanplay:
|
|
3330
|
-
onError:
|
|
3331
|
-
onLoadstart:
|
|
3332
|
-
onPlaying:
|
|
3333
|
-
onStalled:
|
|
3334
|
-
onWaiting:
|
|
3335
|
-
}, null, 42,
|
|
3420
|
+
onCanplay: te,
|
|
3421
|
+
onError: G,
|
|
3422
|
+
onLoadstart: K,
|
|
3423
|
+
onPlaying: te,
|
|
3424
|
+
onStalled: K,
|
|
3425
|
+
onWaiting: K
|
|
3426
|
+
}, null, 42, di)) : R.value ? (S(), s("div", {
|
|
3336
3427
|
key: 3,
|
|
3337
3428
|
"data-testid": "vibe-list-card-error",
|
|
3338
|
-
"data-kind":
|
|
3339
|
-
class: "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))]"
|
|
3340
|
-
}, [c("div",
|
|
3429
|
+
"data-kind": L.value,
|
|
3430
|
+
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))]"
|
|
3431
|
+
}, [c("div", pi, [
|
|
3341
3432
|
u(j(oe), {
|
|
3342
3433
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3343
3434
|
"aria-hidden": "true"
|
|
3344
3435
|
}),
|
|
3345
|
-
c("span",
|
|
3346
|
-
|
|
3436
|
+
c("span", mi, k(j(Ht)(L.value)), 1),
|
|
3437
|
+
B.value ? (S(), s("button", {
|
|
3347
3438
|
key: 0,
|
|
3348
3439
|
type: "button",
|
|
3349
3440
|
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",
|
|
3350
|
-
onClick: z(
|
|
3441
|
+
onClick: z(ae, ["stop"])
|
|
3351
3442
|
}, " Retry ")) : o("", !0)
|
|
3352
|
-
])], 8,
|
|
3443
|
+
])], 8, fi)) : (S(), s("div", hi, [c("div", gi, [D(e.$slots, "item-icon", {
|
|
3353
3444
|
icon: j(Ct)(n.item.type),
|
|
3354
3445
|
item: n.item
|
|
3355
3446
|
}, () => [(S(), a(O(j(Ct)(n.item.type)), {
|
|
3356
3447
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3357
3448
|
"aria-hidden": "true"
|
|
3358
3449
|
}))])])])),
|
|
3359
|
-
c("div",
|
|
3450
|
+
c("div", _i, [D(e.$slots, "grid-item-overlay", {
|
|
3360
3451
|
active: n.active,
|
|
3361
3452
|
focused: f.value,
|
|
3362
3453
|
hovered: p.value,
|
|
3363
3454
|
index: n.index,
|
|
3364
3455
|
item: n.item,
|
|
3365
|
-
openFullscreen:
|
|
3456
|
+
openFullscreen: ue
|
|
3366
3457
|
})])
|
|
3367
3458
|
], 34));
|
|
3368
3459
|
}
|
|
3369
|
-
}),
|
|
3460
|
+
}), yi = { 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)]" }, bi = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, xi = {
|
|
3370
3461
|
"data-testid": "vibe-pagination",
|
|
3371
3462
|
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]"
|
|
3372
|
-
},
|
|
3463
|
+
}, Si = { class: "whitespace-nowrap" }, Ci = {
|
|
3373
3464
|
key: 0,
|
|
3374
3465
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
3375
|
-
},
|
|
3466
|
+
}, wi = [
|
|
3376
3467
|
"data-active",
|
|
3377
3468
|
"data-index",
|
|
3378
3469
|
"data-item-id",
|
|
3379
3470
|
"data-occurrence-key"
|
|
3380
|
-
],
|
|
3471
|
+
], Ti = ["data-item-id"], Ei = {
|
|
3381
3472
|
key: 0,
|
|
3382
3473
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
3383
|
-
},
|
|
3474
|
+
}, Di = {
|
|
3384
3475
|
key: 1,
|
|
3385
3476
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
3386
|
-
},
|
|
3477
|
+
}, Oi = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, ki = /* @__PURE__ */ d({
|
|
3387
3478
|
__name: "ListSurface",
|
|
3388
3479
|
props: {
|
|
3389
3480
|
active: {
|
|
@@ -3444,7 +3535,7 @@ var ai = ["aria-label"], oi = {
|
|
|
3444
3535
|
"update:activeIndex"
|
|
3445
3536
|
],
|
|
3446
3537
|
setup(e, { emit: n }) {
|
|
3447
|
-
let r = e, d = N(), f = n, p =
|
|
3538
|
+
let r = e, d = N(), f = n, p = Rr({
|
|
3448
3539
|
active: A(r, "active"),
|
|
3449
3540
|
allowExhaustedNextPageRefresh: A(r, "allowExhaustedNextPageRefresh"),
|
|
3450
3541
|
items: A(r, "items"),
|
|
@@ -3489,8 +3580,8 @@ var ai = ["aria-label"], oi = {
|
|
|
3489
3580
|
nextBoundaryLoadProgress: e,
|
|
3490
3581
|
previousBoundaryLoadProgress: t
|
|
3491
3582
|
});
|
|
3492
|
-
}, { immediate: !0 }), (e, n) => (S(), s("div",
|
|
3493
|
-
c("div",
|
|
3583
|
+
}, { immediate: !0 }), (e, n) => (S(), s("div", yi, [
|
|
3584
|
+
c("div", bi, [c("span", xi, [c("span", Si, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", Ci, k(r.paginationDetail), 1)) : o("", !0)])]),
|
|
3494
3585
|
c("div", {
|
|
3495
3586
|
ref: j(p).scrollViewportRef,
|
|
3496
3587
|
"data-testid": "vibe-list-scroll",
|
|
@@ -3511,7 +3602,7 @@ var ai = ["aria-label"], oi = {
|
|
|
3511
3602
|
"data-occurrence-key": j($)(t),
|
|
3512
3603
|
class: "absolute will-change-transform",
|
|
3513
3604
|
style: y(j(p).getCardStyle(n))
|
|
3514
|
-
}, [u(
|
|
3605
|
+
}, [u(vi, {
|
|
3515
3606
|
active: n === j(p).resolvedActiveIndex.value,
|
|
3516
3607
|
index: n,
|
|
3517
3608
|
item: t,
|
|
@@ -3535,14 +3626,14 @@ var ai = ["aria-label"], oi = {
|
|
|
3535
3626
|
"report-asset-load",
|
|
3536
3627
|
"surface-active",
|
|
3537
3628
|
"onOpen"
|
|
3538
|
-
])], 12,
|
|
3629
|
+
])], 12, wi))), 128)),
|
|
3539
3630
|
(S(!0), s(t, null, E(j(p).leavingItems.value, (t) => (S(), s("article", {
|
|
3540
3631
|
key: `leaving-${j($)(t.item)}`,
|
|
3541
3632
|
"data-testid": "vibe-list-card-leaving",
|
|
3542
3633
|
"data-item-id": t.item.id,
|
|
3543
3634
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
3544
3635
|
style: y(j(p).getLeavingCardStyle(t.item))
|
|
3545
|
-
}, [u(
|
|
3636
|
+
}, [u(vi, {
|
|
3546
3637
|
active: !1,
|
|
3547
3638
|
index: -1,
|
|
3548
3639
|
item: t.item,
|
|
@@ -3557,8 +3648,8 @@ var ai = ["aria-label"], oi = {
|
|
|
3557
3648
|
"item",
|
|
3558
3649
|
"report-asset-error",
|
|
3559
3650
|
"report-asset-load"
|
|
3560
|
-
])], 12,
|
|
3561
|
-
j(P) && j(T) ? (S(), a(
|
|
3651
|
+
])], 12, Ti))), 128)),
|
|
3652
|
+
j(P) && j(T) ? (S(), a(fn, {
|
|
3562
3653
|
key: 0,
|
|
3563
3654
|
message: j(T).message,
|
|
3564
3655
|
mode: j(T).mode,
|
|
@@ -3572,12 +3663,12 @@ var ai = ["aria-label"], oi = {
|
|
|
3572
3663
|
"surface"
|
|
3573
3664
|
])) : o("", !0)
|
|
3574
3665
|
], 4)], 544),
|
|
3575
|
-
j(p).showScrollbar.value ? (S(), s("div",
|
|
3666
|
+
j(p).showScrollbar.value ? (S(), s("div", Ei, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
3576
3667
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
3577
3668
|
class: _(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
|
|
3578
3669
|
style: y(j(p).getScrollbarThumbStyle())
|
|
3579
3670
|
}, null, 6)])) : o("", !0),
|
|
3580
|
-
d["grid-footer"] ? (S(), s("div",
|
|
3671
|
+
d["grid-footer"] ? (S(), s("div", Di, [c("div", Oi, [D(e.$slots, "grid-footer")])])) : o("", !0),
|
|
3581
3672
|
b.value ? (S(), s("div", {
|
|
3582
3673
|
key: 2,
|
|
3583
3674
|
class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
|
|
@@ -3586,7 +3677,7 @@ var ai = ["aria-label"], oi = {
|
|
|
3586
3677
|
"data-testid": "vibe-grid-status-badge",
|
|
3587
3678
|
class: _(["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]", b.value.kind === "end" ? "border-amber-300/35 text-amber-200" : b.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
3588
3679
|
}, k(b.value.message), 3))], 2)) : o("", !0),
|
|
3589
|
-
j(O) && j(T) ? (S(), a(
|
|
3680
|
+
j(O) && j(T) ? (S(), a(fn, {
|
|
3590
3681
|
key: 3,
|
|
3591
3682
|
class: _(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
3592
3683
|
message: j(T).message,
|
|
@@ -3603,13 +3694,13 @@ var ai = ["aria-label"], oi = {
|
|
|
3603
3694
|
])) : o("", !0)
|
|
3604
3695
|
]));
|
|
3605
3696
|
}
|
|
3606
|
-
}),
|
|
3697
|
+
}), Ai = ["data-surface-mode"], ji = {
|
|
3607
3698
|
key: 1,
|
|
3608
3699
|
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"
|
|
3609
|
-
},
|
|
3700
|
+
}, Mi = ["data-visible", "inert"], Ni = ["data-visible", "inert"], Pi = {
|
|
3610
3701
|
key: 3,
|
|
3611
3702
|
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"
|
|
3612
|
-
},
|
|
3703
|
+
}, Fi = /* @__PURE__ */ d({
|
|
3613
3704
|
name: "VibeLayout",
|
|
3614
3705
|
__name: "Layout",
|
|
3615
3706
|
props: {
|
|
@@ -3664,7 +3755,7 @@ var ai = ["aria-label"], oi = {
|
|
|
3664
3755
|
type: "button",
|
|
3665
3756
|
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",
|
|
3666
3757
|
onClick: n[0] ||= (...e) => j(h).retryInitialLoad && j(h).retryInitialLoad(...e)
|
|
3667
|
-
}, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div",
|
|
3758
|
+
}, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", ji, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
|
|
3668
3759
|
appear: "",
|
|
3669
3760
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
3670
3761
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -3678,7 +3769,7 @@ var ai = ["aria-label"], oi = {
|
|
|
3678
3769
|
"data-visible": j(h).surfaceMode.value === "list" ? "true" : "false",
|
|
3679
3770
|
inert: j(h).surfaceMode.value !== "list",
|
|
3680
3771
|
class: "absolute inset-0 z-[2]"
|
|
3681
|
-
}, [u(
|
|
3772
|
+
}, [u(ki, {
|
|
3682
3773
|
active: j(h).surfaceMode.value === "list",
|
|
3683
3774
|
"allow-exhausted-next-page-refresh": j(h).canRefreshExhaustedNextPage.value,
|
|
3684
3775
|
items: j(h).items.value,
|
|
@@ -3748,7 +3839,7 @@ var ai = ["aria-label"], oi = {
|
|
|
3748
3839
|
"onBoundaryLoadProgress",
|
|
3749
3840
|
"onOpenFullscreen",
|
|
3750
3841
|
"onUpdate:activeIndex"
|
|
3751
|
-
])], 8,
|
|
3842
|
+
])], 8, Mi), [[P, j(h).surfaceMode.value === "list"]])]),
|
|
3752
3843
|
_: 3
|
|
3753
3844
|
}), u(r, {
|
|
3754
3845
|
appear: "",
|
|
@@ -3764,7 +3855,7 @@ var ai = ["aria-label"], oi = {
|
|
|
3764
3855
|
"data-visible": j(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
3765
3856
|
inert: j(h).surfaceMode.value !== "fullscreen",
|
|
3766
3857
|
class: "absolute inset-0 z-[3]"
|
|
3767
|
-
}, [u(
|
|
3858
|
+
}, [u(Jn, {
|
|
3768
3859
|
items: j(h).items.value,
|
|
3769
3860
|
active: j(h).surfaceMode.value === "fullscreen",
|
|
3770
3861
|
"active-index": j(h).activeIndex.value,
|
|
@@ -3833,12 +3924,12 @@ var ai = ["aria-label"], oi = {
|
|
|
3833
3924
|
"show-back-to-list",
|
|
3834
3925
|
"onBackToList",
|
|
3835
3926
|
"onUpdate:activeIndex"
|
|
3836
|
-
])], 8,
|
|
3927
|
+
])], 8, Ni), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
|
|
3837
3928
|
_: 3
|
|
3838
|
-
})], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div",
|
|
3929
|
+
})], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", Pi, [u(j(re), {
|
|
3839
3930
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
3840
3931
|
"aria-hidden": "true"
|
|
3841
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(
|
|
3932
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(Jn, {
|
|
3842
3933
|
key: 4,
|
|
3843
3934
|
items: j(h).items.value,
|
|
3844
3935
|
active: !0,
|
|
@@ -3906,10 +3997,10 @@ var ai = ["aria-label"], oi = {
|
|
|
3906
3997
|
"show-status-badges",
|
|
3907
3998
|
"onBackToList",
|
|
3908
3999
|
"onUpdate:activeIndex"
|
|
3909
|
-
]))], 8,
|
|
4000
|
+
]))], 8, Ai));
|
|
3910
4001
|
}
|
|
3911
|
-
}),
|
|
3912
|
-
e.component("VibeLayout",
|
|
4002
|
+
}), Ii = { install(e) {
|
|
4003
|
+
e.component("VibeLayout", Fi);
|
|
3913
4004
|
} };
|
|
3914
4005
|
//#endregion
|
|
3915
|
-
export {
|
|
4006
|
+
export { Fi as VibeLayout, Ii as VibePlugin, Ii as default };
|