@wyxos/vibe 3.1.29 → 3.1.31
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/fullscreenPreviews.d.ts +8 -0
- package/lib/components/viewer-core/removalState.d.ts +2 -0
- package/lib/components/viewer-core/surfaceSlots.d.ts +3 -0
- package/lib/components/viewer-core/useController.d.ts +2 -0
- package/lib/components/viewer-core/useMasonryMotion.d.ts +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.js +544 -638
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/lib/components/FullscreenPreviewRail.vue.d.ts +0 -15
package/lib/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i,
|
|
|
3
3
|
var U = (e) => {
|
|
4
4
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
5
5
|
return !1;
|
|
6
|
-
},
|
|
7
|
-
let t =
|
|
6
|
+
}, te = (e) => e === "", W = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), G = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), K = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), q = (e) => {
|
|
7
|
+
let t = K(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
9
|
-
},
|
|
9
|
+
}, J = {
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11
11
|
width: 24,
|
|
12
12
|
height: 24,
|
|
@@ -16,27 +16,27 @@ var U = (e) => {
|
|
|
16
16
|
"stroke-width": 2,
|
|
17
17
|
"stroke-linecap": "round",
|
|
18
18
|
"stroke-linejoin": "round"
|
|
19
|
-
},
|
|
20
|
-
...
|
|
19
|
+
}, ne = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = J.width, color: s = J.stroke, ...c }, { slots: l }) => m("svg", {
|
|
20
|
+
...J,
|
|
21
21
|
...c,
|
|
22
22
|
width: o,
|
|
23
23
|
height: o,
|
|
24
24
|
stroke: s,
|
|
25
|
-
"stroke-width":
|
|
26
|
-
class:
|
|
25
|
+
"stroke-width": te(n) || te(r) || n === !0 || r === !0 ? Number(i || a || J["stroke-width"]) * 24 / Number(o) : i || a || J["stroke-width"],
|
|
26
|
+
class: W("lucide", c.class, ...e ? [`lucide-${G(q(e))}-icon`, `lucide-${G(e)}`] : ["lucide-icon"]),
|
|
27
27
|
...!l.default && !U(c) && { "aria-hidden": "true" }
|
|
28
|
-
}, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]),
|
|
28
|
+
}, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), Y = (e, t) => (n, { slots: r, attrs: i }) => m(ne, {
|
|
29
29
|
...i,
|
|
30
30
|
...n,
|
|
31
31
|
iconNode: t,
|
|
32
32
|
name: e
|
|
33
|
-
}, r),
|
|
33
|
+
}, r), X = Y("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
|
-
}]]),
|
|
39
|
+
}]]), re = Y("audio-lines", [
|
|
40
40
|
["path", {
|
|
41
41
|
d: "M2 10v3",
|
|
42
42
|
key: "1fnikh"
|
|
@@ -61,7 +61,7 @@ var U = (e) => {
|
|
|
61
61
|
d: "M22 10v3",
|
|
62
62
|
key: "154ddg"
|
|
63
63
|
}]
|
|
64
|
-
]),
|
|
64
|
+
]), ie = Y("clapperboard", [
|
|
65
65
|
["path", {
|
|
66
66
|
d: "m12.296 3.464 3.02 3.956",
|
|
67
67
|
key: "qash78"
|
|
@@ -78,13 +78,13 @@ var U = (e) => {
|
|
|
78
78
|
d: "m6.18 5.276 3.1 3.899",
|
|
79
79
|
key: "zjj9t3"
|
|
80
80
|
}]
|
|
81
|
-
]),
|
|
81
|
+
]), ae = Y("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
|
-
}]]),
|
|
87
|
+
}]]), oe = Y("image-plus", [
|
|
88
88
|
["path", {
|
|
89
89
|
d: "M16 5h6",
|
|
90
90
|
key: "1vod17"
|
|
@@ -107,10 +107,10 @@ var U = (e) => {
|
|
|
107
107
|
r: "2",
|
|
108
108
|
key: "af1f0g"
|
|
109
109
|
}]
|
|
110
|
-
]), se =
|
|
110
|
+
]), se = Y("loader-circle", [["path", {
|
|
111
111
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
112
112
|
key: "13zald"
|
|
113
|
-
}]]), ce =
|
|
113
|
+
}]]), ce = Y("maximize-2", [
|
|
114
114
|
["path", {
|
|
115
115
|
d: "M15 3h6v6",
|
|
116
116
|
key: "1q9fwt"
|
|
@@ -127,7 +127,7 @@ var U = (e) => {
|
|
|
127
127
|
d: "M9 21H3v-6",
|
|
128
128
|
key: "wtvkvv"
|
|
129
129
|
}]
|
|
130
|
-
]), le =
|
|
130
|
+
]), le = Y("pause", [["rect", {
|
|
131
131
|
x: "14",
|
|
132
132
|
y: "3",
|
|
133
133
|
width: "5",
|
|
@@ -141,10 +141,10 @@ var U = (e) => {
|
|
|
141
141
|
height: "18",
|
|
142
142
|
rx: "1",
|
|
143
143
|
key: "1wsw3u"
|
|
144
|
-
}]]), ue =
|
|
144
|
+
}]]), ue = Y("play", [["path", {
|
|
145
145
|
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",
|
|
146
146
|
key: "10ikf1"
|
|
147
|
-
}]]), de =
|
|
147
|
+
}]]), de = Y("triangle-alert", [
|
|
148
148
|
["path", {
|
|
149
149
|
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",
|
|
150
150
|
key: "wmoenq"
|
|
@@ -157,13 +157,13 @@ var U = (e) => {
|
|
|
157
157
|
d: "M12 17h.01",
|
|
158
158
|
key: "p32p05"
|
|
159
159
|
}]
|
|
160
|
-
]), fe =
|
|
160
|
+
]), fe = Y("volume-1", [["path", {
|
|
161
161
|
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",
|
|
162
162
|
key: "uqj9uw"
|
|
163
163
|
}], ["path", {
|
|
164
164
|
d: "M16 9a5 5 0 0 1 0 6",
|
|
165
165
|
key: "1q6k2b"
|
|
166
|
-
}]]), pe =
|
|
166
|
+
}]]), pe = Y("volume-2", [
|
|
167
167
|
["path", {
|
|
168
168
|
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",
|
|
169
169
|
key: "uqj9uw"
|
|
@@ -176,7 +176,7 @@ var U = (e) => {
|
|
|
176
176
|
d: "M19.364 18.364a9 9 0 0 0 0-12.728",
|
|
177
177
|
key: "ijwkga"
|
|
178
178
|
}]
|
|
179
|
-
]), me =
|
|
179
|
+
]), me = Y("volume-x", [
|
|
180
180
|
["path", {
|
|
181
181
|
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",
|
|
182
182
|
key: "uqj9uw"
|
|
@@ -841,7 +841,7 @@ function dt(e) {
|
|
|
841
841
|
setSequence: (e) => {
|
|
842
842
|
w = e;
|
|
843
843
|
}
|
|
844
|
-
}), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => be(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => ye(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length),
|
|
844
|
+
}), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => be(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => ye(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length), te = i(() => Oe(De(a.value), e.removedIds.value)), W = i(() => je(n.value, e.removedIds.value, P.value)), G = i(() => !N.value.length && !F.value && !!s.value), K = Qe({
|
|
845
845
|
autoBuckets: n,
|
|
846
846
|
clearActiveResolveController(e) {
|
|
847
847
|
y === e && (y = null);
|
|
@@ -878,17 +878,17 @@ function dt(e) {
|
|
|
878
878
|
b = e;
|
|
879
879
|
},
|
|
880
880
|
waitFillDelay: (e) => d.wait(e)
|
|
881
|
-
}),
|
|
881
|
+
}), q = it({
|
|
882
882
|
canRefreshTrailingBoundary: U,
|
|
883
883
|
hasNextPage: B,
|
|
884
884
|
isInitialLoading: Te,
|
|
885
885
|
isPageLoadingLocked: H,
|
|
886
886
|
items: N,
|
|
887
887
|
loading: F,
|
|
888
|
-
prefetchNextPage:
|
|
888
|
+
prefetchNextPage: Y,
|
|
889
889
|
removedIds: e.removedIds,
|
|
890
890
|
trailingBoundaryBucket: L
|
|
891
|
-
}),
|
|
891
|
+
}), J = nt({
|
|
892
892
|
autoBuckets: n,
|
|
893
893
|
clearActiveResolveController(e) {
|
|
894
894
|
y === e && (y = null);
|
|
@@ -923,19 +923,19 @@ function dt(e) {
|
|
|
923
923
|
});
|
|
924
924
|
z(() => N.value.length, (e) => {
|
|
925
925
|
if (e === 0) {
|
|
926
|
-
r.value = 0,
|
|
926
|
+
r.value = 0, q.schedule();
|
|
927
927
|
return;
|
|
928
928
|
}
|
|
929
|
-
|
|
929
|
+
q.resetRefreshAttempt(), o.value &&= (ke(), !1), r.value > e - 1 && (r.value = e - 1);
|
|
930
930
|
}), z(() => r.value, () => {
|
|
931
931
|
h.value && ge();
|
|
932
932
|
}), S(() => {
|
|
933
|
-
we() || e.resolve &&
|
|
933
|
+
we() || e.resolve && ne();
|
|
934
934
|
}), x(() => {
|
|
935
935
|
y?.abort(), y = null, d.clear(!0);
|
|
936
936
|
});
|
|
937
|
-
async function
|
|
938
|
-
b =
|
|
937
|
+
async function ne() {
|
|
938
|
+
b = ne;
|
|
939
939
|
let t = await xe({
|
|
940
940
|
continueUntilFilled: !0,
|
|
941
941
|
cursor: e.initialCursor ?? null,
|
|
@@ -944,7 +944,7 @@ function dt(e) {
|
|
|
944
944
|
});
|
|
945
945
|
t && (n.value = t.buckets, r.value = 0, Q());
|
|
946
946
|
}
|
|
947
|
-
async function
|
|
947
|
+
async function Y() {
|
|
948
948
|
if (H.value || F.value) return;
|
|
949
949
|
let e = !N.value.length, t = L.value, n = {
|
|
950
950
|
commitImmediately: e,
|
|
@@ -972,7 +972,7 @@ function dt(e) {
|
|
|
972
972
|
}
|
|
973
973
|
await _e(R.value, n);
|
|
974
974
|
}
|
|
975
|
-
async function
|
|
975
|
+
async function X() {
|
|
976
976
|
if (!(H.value || !V.value || F.value)) {
|
|
977
977
|
if (Ee("leading")) {
|
|
978
978
|
let e = await ve("leading");
|
|
@@ -982,43 +982,43 @@ function dt(e) {
|
|
|
982
982
|
await Z(ee.value);
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
|
-
async function
|
|
986
|
-
if (
|
|
985
|
+
async function re() {
|
|
986
|
+
if (G.value) {
|
|
987
987
|
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = k.value ? "initializing" : "idle", Ce(), M.reset(), m.value = !1, v.clear(), y?.abort(), y = null, d.clear(!0), we()) {
|
|
988
988
|
Q();
|
|
989
989
|
return;
|
|
990
990
|
}
|
|
991
|
-
await
|
|
991
|
+
await ne();
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
async function
|
|
995
|
-
if (
|
|
994
|
+
async function ie() {
|
|
995
|
+
if (G.value) return re();
|
|
996
996
|
H.value || c.value !== "failed" || !b || (s.value = null, await b());
|
|
997
997
|
}
|
|
998
|
-
async function
|
|
998
|
+
async function ae() {
|
|
999
999
|
if (!a.value.length) return m.value = !1, Q();
|
|
1000
1000
|
n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function oe(t) {
|
|
1003
1003
|
let n = N.value;
|
|
1004
1004
|
if (!n.length) return;
|
|
1005
1005
|
let i = Se(t, 0, n.length - 1);
|
|
1006
1006
|
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
1007
1007
|
}
|
|
1008
1008
|
function se(e) {
|
|
1009
|
-
h.value = e,
|
|
1009
|
+
h.value = e, q.schedule();
|
|
1010
1010
|
}
|
|
1011
1011
|
function ce() {
|
|
1012
1012
|
_.value = !0, d.clear(!0);
|
|
1013
1013
|
}
|
|
1014
1014
|
function le() {
|
|
1015
|
-
_.value = !1,
|
|
1015
|
+
_.value = !1, q.schedule();
|
|
1016
1016
|
}
|
|
1017
1017
|
function ue() {
|
|
1018
|
-
fe(), s.value = null, Ce(),
|
|
1018
|
+
fe(), s.value = null, Ce(), K.cancel(), a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, Q();
|
|
1019
1019
|
}
|
|
1020
1020
|
function de() {
|
|
1021
|
-
g.value && (fe(), Ce(),
|
|
1021
|
+
g.value && (fe(), Ce(), K.cancel(), m.value = !1, Q());
|
|
1022
1022
|
}
|
|
1023
1023
|
function fe() {
|
|
1024
1024
|
C += 1, y?.abort(), y = null, d.clear(!0), v.clear();
|
|
@@ -1045,15 +1045,15 @@ function dt(e) {
|
|
|
1045
1045
|
r.value = He(N.value, P.value, e);
|
|
1046
1046
|
}
|
|
1047
1047
|
function he() {
|
|
1048
|
-
a.value.length > 0 && (!
|
|
1048
|
+
a.value.length > 0 && (!te.value.length || !N.value.length) && ae();
|
|
1049
1049
|
}
|
|
1050
1050
|
async function ge() {
|
|
1051
1051
|
if (!(!h.value || Te())) {
|
|
1052
1052
|
if (!N.value.length) {
|
|
1053
|
-
(B.value || U.value) && await
|
|
1053
|
+
(B.value || U.value) && await Y();
|
|
1054
1054
|
return;
|
|
1055
1055
|
}
|
|
1056
|
-
V.value && r.value < 3 && await
|
|
1056
|
+
V.value && r.value < 3 && await X(), B.value && r.value >= N.value.length - 3 && await Y();
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
1059
|
async function _e(e, t = {}) {
|
|
@@ -1069,7 +1069,7 @@ function dt(e) {
|
|
|
1069
1069
|
if (r) {
|
|
1070
1070
|
if (!r.visibleCount) return n.value = Je(n.value, t.originCursor, e, !0), a.value = [], m.value = !1, Q();
|
|
1071
1071
|
if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, Q();
|
|
1072
|
-
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !
|
|
1072
|
+
if (a.value = r.buckets, t.commitImmediately || !N.value.length || !te.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
|
|
1073
1073
|
m.value = !0;
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
@@ -1090,13 +1090,13 @@ function dt(e) {
|
|
|
1090
1090
|
async function ve(e) {
|
|
1091
1091
|
return b = async () => {
|
|
1092
1092
|
await ve(e);
|
|
1093
|
-
},
|
|
1093
|
+
}, J.reloadBoundaryBucket(e);
|
|
1094
1094
|
}
|
|
1095
1095
|
function xe(e) {
|
|
1096
|
-
return
|
|
1096
|
+
return J.collectBuckets(e);
|
|
1097
1097
|
}
|
|
1098
1098
|
function Q() {
|
|
1099
|
-
c.value = "idle", Ce(), d.clear(),
|
|
1099
|
+
c.value = "idle", Ce(), d.clear(), q.schedule();
|
|
1100
1100
|
}
|
|
1101
1101
|
function Ce() {
|
|
1102
1102
|
l.value = null, u.value = null, p.value = null;
|
|
@@ -1121,20 +1121,20 @@ function dt(e) {
|
|
|
1121
1121
|
}
|
|
1122
1122
|
return {
|
|
1123
1123
|
activeIndex: P,
|
|
1124
|
-
canRetryInitialLoad:
|
|
1124
|
+
canRetryInitialLoad: G,
|
|
1125
1125
|
cancel: ue,
|
|
1126
1126
|
cancelFill: de,
|
|
1127
1127
|
canRefreshTrailingBoundary: U,
|
|
1128
|
-
commitPendingAppend:
|
|
1129
|
-
currentCursor:
|
|
1128
|
+
commitPendingAppend: ae,
|
|
1129
|
+
currentCursor: W,
|
|
1130
1130
|
errorMessage: s,
|
|
1131
1131
|
fillCollectedCount: l,
|
|
1132
1132
|
fillCursor: u,
|
|
1133
1133
|
fillDelayRemainingMs: f,
|
|
1134
1134
|
fillTargetCount: p,
|
|
1135
1135
|
...M.refs,
|
|
1136
|
-
fillUntil:
|
|
1137
|
-
fillUntilEnd:
|
|
1136
|
+
fillUntil: K.fillUntil,
|
|
1137
|
+
fillUntilEnd: K.fillUntilEnd,
|
|
1138
1138
|
hasNextPage: B,
|
|
1139
1139
|
hasPreviousPage: V,
|
|
1140
1140
|
isAutoPrefetchEnabled: h,
|
|
@@ -1144,14 +1144,14 @@ function dt(e) {
|
|
|
1144
1144
|
loading: F,
|
|
1145
1145
|
maybePrefetchAround: ge,
|
|
1146
1146
|
nextCursor: R,
|
|
1147
|
-
pendingAppendItems:
|
|
1147
|
+
pendingAppendItems: te,
|
|
1148
1148
|
phase: c,
|
|
1149
|
-
prefetchNextPage:
|
|
1150
|
-
prefetchPreviousPage:
|
|
1149
|
+
prefetchNextPage: Y,
|
|
1150
|
+
prefetchPreviousPage: X,
|
|
1151
1151
|
previousCursor: ee,
|
|
1152
|
-
retryInitialLoad:
|
|
1153
|
-
retry:
|
|
1154
|
-
setActiveIndex:
|
|
1152
|
+
retryInitialLoad: re,
|
|
1153
|
+
retry: ie,
|
|
1154
|
+
setActiveIndex: oe,
|
|
1155
1155
|
setAutoPrefetchEnabled: se,
|
|
1156
1156
|
syncActiveIndexAfterVisibilityChange: me,
|
|
1157
1157
|
unlockPageLoading: le,
|
|
@@ -1291,6 +1291,7 @@ function mt(e, t) {
|
|
|
1291
1291
|
hasNextPage: !1,
|
|
1292
1292
|
hasPreviousPage: !1,
|
|
1293
1293
|
itemCount: 0,
|
|
1294
|
+
itemsRevision: 0,
|
|
1294
1295
|
loadState: "loaded",
|
|
1295
1296
|
nextBoundaryLoadProgress: 0,
|
|
1296
1297
|
nextCursor: null,
|
|
@@ -1300,13 +1301,14 @@ function mt(e, t) {
|
|
|
1300
1301
|
previousCursor: null,
|
|
1301
1302
|
removedCount: 0,
|
|
1302
1303
|
removedIds: [],
|
|
1304
|
+
removedRevision: 0,
|
|
1303
1305
|
surfaceMode: "list"
|
|
1304
|
-
}), c = i(() => a.value >= pt), l = i(() => c.value ? o.value : "fullscreen"),
|
|
1306
|
+
}), c = i(() => a.value >= pt), l = D(0), u = D(0), d = i(() => c.value ? o.value : "fullscreen"), f = i(() => c.value && d.value === "fullscreen");
|
|
1305
1307
|
z(c, (e) => {
|
|
1306
|
-
e &&
|
|
1308
|
+
e && _();
|
|
1307
1309
|
}), z(() => e.surfaceMode, () => {
|
|
1308
|
-
|
|
1309
|
-
}), z([
|
|
1310
|
+
_();
|
|
1311
|
+
}), z([d, () => n.pendingAppendItems.value.length], ([e, t]) => {
|
|
1310
1312
|
e === "list" || t <= 0 || n.commitPendingAppend();
|
|
1311
1313
|
}), z([
|
|
1312
1314
|
() => n.items.value.length,
|
|
@@ -1315,31 +1317,35 @@ function mt(e, t) {
|
|
|
1315
1317
|
() => n.pendingAppendItems.value.length
|
|
1316
1318
|
], ([e, n, r, i]) => {
|
|
1317
1319
|
!c.value || e > 0 || o.value === "list" || n || r || i > 0 || (o.value = "list", t("update:surfaceMode", "list"));
|
|
1318
|
-
}), z(
|
|
1320
|
+
}), z(d, (e) => {
|
|
1319
1321
|
n.setAutoPrefetchEnabled(e === "fullscreen");
|
|
1322
|
+
}, { immediate: !0 }), z(() => n.items.value, (e) => {
|
|
1323
|
+
l.value += 1, s.itemCount = e.length, s.itemsRevision = l.value;
|
|
1324
|
+
}, { immediate: !0 }), z(() => n.getRemovedIds(), (e) => {
|
|
1325
|
+
u.value += 1, s.removedCount = n.removedCount.value, s.removedIds = e, s.removedRevision = u.value;
|
|
1320
1326
|
}, { immediate: !0 }), ee(() => {
|
|
1321
|
-
s.activeIndex = n.activeIndex.value, s.currentCursor = n.currentCursor.value, s.errorMessage = n.errorMessage.value, s.fillCollectedCount = n.fillCollectedCount.value, s.fillCompletedCalls = n.fillCompletedCalls.value, s.fillCursor = n.fillCursor.value, s.fillDelayRemainingMs = n.fillDelayRemainingMs.value, s.fillLoadedCount = n.fillLoadedCount.value, s.fillMode = n.fillMode.value, s.fillProgress = n.fillProgress.value, s.fillTargetCalls = n.fillTargetCalls.value, s.fillTargetCount = n.fillTargetCount.value, s.fillTotalCount = n.fillTotalCount.value, s.hasNextPage = n.hasNextPage.value, s.hasPreviousPage = n.hasPreviousPage.value, s.
|
|
1327
|
+
s.activeIndex = n.activeIndex.value, s.currentCursor = n.currentCursor.value, s.errorMessage = n.errorMessage.value, s.fillCollectedCount = n.fillCollectedCount.value, s.fillCompletedCalls = n.fillCompletedCalls.value, s.fillCursor = n.fillCursor.value, s.fillDelayRemainingMs = n.fillDelayRemainingMs.value, s.fillLoadedCount = n.fillLoadedCount.value, s.fillMode = n.fillMode.value, s.fillProgress = n.fillProgress.value, s.fillTargetCalls = n.fillTargetCalls.value, s.fillTargetCount = n.fillTargetCount.value, s.fillTotalCount = n.fillTotalCount.value, s.hasNextPage = n.hasNextPage.value, s.hasPreviousPage = n.hasPreviousPage.value, s.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", s.nextBoundaryLoadProgress = r.nextBoundaryLoadProgress, s.nextCursor = n.nextCursor.value, s.pageLoadingLocked = n.isPageLoadingLocked.value, s.phase = n.phase.value, s.previousBoundaryLoadProgress = r.previousBoundaryLoadProgress, s.previousCursor = n.previousCursor.value, s.surfaceMode = d.value;
|
|
1322
1328
|
}), S(() => {
|
|
1323
|
-
|
|
1329
|
+
g(), _(), window.addEventListener("keydown", h), window.addEventListener("resize", g);
|
|
1324
1330
|
}), x(() => {
|
|
1325
|
-
window.removeEventListener("keydown",
|
|
1331
|
+
window.removeEventListener("keydown", h), window.removeEventListener("resize", g);
|
|
1326
1332
|
});
|
|
1327
|
-
function
|
|
1333
|
+
function p(e) {
|
|
1328
1334
|
n.setActiveIndex(e), c.value && o.value !== "fullscreen" && (o.value = "fullscreen", t("update:surfaceMode", "fullscreen"));
|
|
1329
1335
|
}
|
|
1330
|
-
function
|
|
1336
|
+
function m() {
|
|
1331
1337
|
!c.value || o.value === "list" || (o.value = "list", t("update:surfaceMode", "list"));
|
|
1332
1338
|
}
|
|
1333
|
-
function
|
|
1334
|
-
e.defaultPrevented || e.key !== "Escape" || !c.value ||
|
|
1339
|
+
function h(e) {
|
|
1340
|
+
e.defaultPrevented || e.key !== "Escape" || !c.value || d.value !== "fullscreen" || Z(e.target) || (e.preventDefault(), m());
|
|
1335
1341
|
}
|
|
1336
|
-
function
|
|
1342
|
+
function g() {
|
|
1337
1343
|
a.value = window.innerWidth || 0;
|
|
1338
1344
|
}
|
|
1339
|
-
function
|
|
1345
|
+
function _() {
|
|
1340
1346
|
!c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
|
|
1341
1347
|
}
|
|
1342
|
-
function
|
|
1348
|
+
function v(e) {
|
|
1343
1349
|
r.nextBoundaryLoadProgress = ht(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = ht(e.previousBoundaryLoadProgress);
|
|
1344
1350
|
}
|
|
1345
1351
|
return {
|
|
@@ -1349,13 +1355,13 @@ function mt(e, t) {
|
|
|
1349
1355
|
lockPageLoading: n.lockPageLoading,
|
|
1350
1356
|
loadNext: n.loadNext,
|
|
1351
1357
|
loadPrevious: n.loadPrevious,
|
|
1352
|
-
openFullscreen:
|
|
1353
|
-
returnToList:
|
|
1358
|
+
openFullscreen: p,
|
|
1359
|
+
returnToList: m,
|
|
1354
1360
|
retry: n.retry,
|
|
1355
|
-
setBoundaryLoadProgress:
|
|
1356
|
-
showBackToList:
|
|
1361
|
+
setBoundaryLoadProgress: v,
|
|
1362
|
+
showBackToList: f,
|
|
1357
1363
|
status: E(s),
|
|
1358
|
-
surfaceMode:
|
|
1364
|
+
surfaceMode: d,
|
|
1359
1365
|
unlockPageLoading: n.unlockPageLoading
|
|
1360
1366
|
};
|
|
1361
1367
|
}
|
|
@@ -1549,7 +1555,7 @@ var gt = {
|
|
|
1549
1555
|
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",
|
|
1550
1556
|
"aria-label": "Back to list",
|
|
1551
1557
|
onClick: t[0] ||= (e) => r("back-to-list")
|
|
1552
|
-
}, [u(F(
|
|
1558
|
+
}, [u(F(X), {
|
|
1553
1559
|
class: "h-4 w-4 stroke-[2.2]",
|
|
1554
1560
|
"aria-hidden": "true"
|
|
1555
1561
|
})])) : o("", !0), n.title ? (w(), s("h2", It, M(n.title), 1)) : o("", !0)]), c("div", Lt, [c("span", Rt, [
|
|
@@ -1564,10 +1570,10 @@ var gt = {
|
|
|
1564
1570
|
]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", Vt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
|
|
1565
1571
|
}
|
|
1566
1572
|
}), Ut = {
|
|
1567
|
-
image:
|
|
1568
|
-
video:
|
|
1569
|
-
audio:
|
|
1570
|
-
other:
|
|
1573
|
+
image: oe,
|
|
1574
|
+
video: ie,
|
|
1575
|
+
audio: re,
|
|
1576
|
+
other: ae
|
|
1571
1577
|
}, Wt = {
|
|
1572
1578
|
image: "Image",
|
|
1573
1579
|
video: "Video",
|
|
@@ -2064,20 +2070,20 @@ function On(e) {
|
|
|
2064
2070
|
});
|
|
2065
2071
|
function v(e, t) {
|
|
2066
2072
|
if (t instanceof HTMLVideoElement) {
|
|
2067
|
-
s.set(e, t),
|
|
2073
|
+
s.set(e, t), W(e, t);
|
|
2068
2074
|
return;
|
|
2069
2075
|
}
|
|
2070
2076
|
s.delete(e);
|
|
2071
2077
|
}
|
|
2072
2078
|
function y(e, t) {
|
|
2073
2079
|
if (t instanceof HTMLAudioElement) {
|
|
2074
|
-
c.set(e, t),
|
|
2080
|
+
c.set(e, t), W(e, t);
|
|
2075
2081
|
return;
|
|
2076
2082
|
}
|
|
2077
2083
|
c.delete(e);
|
|
2078
2084
|
}
|
|
2079
2085
|
function b(e, r) {
|
|
2080
|
-
r instanceof HTMLImageElement && hn(r) && (t.value[e] = !0, n.value[e] = null,
|
|
2086
|
+
r instanceof HTMLImageElement && hn(r) && (t.value[e] = !0, n.value[e] = null, Y(e, r.currentSrc || r.src || re(e)));
|
|
2081
2087
|
}
|
|
2082
2088
|
function x() {
|
|
2083
2089
|
U(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
@@ -2099,30 +2105,30 @@ function On(e) {
|
|
|
2099
2105
|
H(i, n);
|
|
2100
2106
|
continue;
|
|
2101
2107
|
}
|
|
2102
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Tn(i),
|
|
2108
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Tn(i), W(n, i);
|
|
2103
2109
|
}
|
|
2104
2110
|
for (let [e, n] of c.entries()) {
|
|
2105
2111
|
if (e !== t || r.value[e]?.errorKind) {
|
|
2106
2112
|
H(n, e);
|
|
2107
2113
|
continue;
|
|
2108
2114
|
}
|
|
2109
|
-
Tn(n),
|
|
2115
|
+
Tn(n), W(e, n);
|
|
2110
2116
|
}
|
|
2111
2117
|
}
|
|
2112
2118
|
function w(e, t) {
|
|
2113
2119
|
let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
|
|
2114
2120
|
if (n) {
|
|
2115
2121
|
let i = r.value[e]?.ready ?? !1;
|
|
2116
|
-
|
|
2122
|
+
W(e, n, t.type);
|
|
2117
2123
|
let a = r.value[e]?.ready ?? !1;
|
|
2118
|
-
!i && a &&
|
|
2124
|
+
!i && a && Y(e, n.currentSrc || n.src || re(e));
|
|
2119
2125
|
}
|
|
2120
2126
|
}
|
|
2121
2127
|
function T(e, r) {
|
|
2122
|
-
t.value[e] = !0, n.value[e] = null,
|
|
2128
|
+
t.value[e] = !0, n.value[e] = null, Y(e, r);
|
|
2123
2129
|
}
|
|
2124
2130
|
async function E(r, i) {
|
|
2125
|
-
let a =
|
|
2131
|
+
let a = X(r) ?? e.activeItem.value;
|
|
2126
2132
|
t.value[r] = !1, n.value[r] = "generic";
|
|
2127
2133
|
let o = await xn(i);
|
|
2128
2134
|
n.value[r] = o, a && e.onAssetError?.({
|
|
@@ -2134,7 +2140,7 @@ function On(e) {
|
|
|
2134
2140
|
});
|
|
2135
2141
|
}
|
|
2136
2142
|
async function O(t, n) {
|
|
2137
|
-
let r =
|
|
2143
|
+
let r = q(t), i = te(t), a = X(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
2138
2144
|
if (r) {
|
|
2139
2145
|
r.pause();
|
|
2140
2146
|
try {
|
|
@@ -2152,28 +2158,28 @@ function On(e) {
|
|
|
2152
2158
|
});
|
|
2153
2159
|
}
|
|
2154
2160
|
function k(e, t, n) {
|
|
2155
|
-
e.button !== 0 || Date.now() < n || En(e.currentTarget) ||
|
|
2161
|
+
e.button !== 0 || Date.now() < n || En(e.currentTarget) || ne(s.get(t) ?? null);
|
|
2156
2162
|
}
|
|
2157
2163
|
function A(e, t, n) {
|
|
2158
|
-
e.button !== 0 || Date.now() < n ||
|
|
2164
|
+
e.button !== 0 || Date.now() < n || ne(q(t));
|
|
2159
2165
|
}
|
|
2160
2166
|
function j(e) {
|
|
2161
|
-
let t =
|
|
2167
|
+
let t = J(), n = d.value;
|
|
2162
2168
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2163
2169
|
let r = Number.parseFloat(e.target.value);
|
|
2164
2170
|
if (!Number.isFinite(r)) return;
|
|
2165
2171
|
let i = kn(r, 0, m.value || 0);
|
|
2166
|
-
|
|
2172
|
+
G(n, i, t), t.currentTime = i;
|
|
2167
2173
|
}
|
|
2168
2174
|
function M(e) {
|
|
2169
|
-
let t =
|
|
2175
|
+
let t = J(), n = d.value;
|
|
2170
2176
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
2171
2177
|
let r = kn(Number.parseFloat(e.target.value), 0, 1);
|
|
2172
|
-
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r),
|
|
2178
|
+
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
|
|
2173
2179
|
}
|
|
2174
2180
|
function N() {
|
|
2175
|
-
let e =
|
|
2176
|
-
!e || !t || (e.muted || e.volume <= 0 ? (e.volume =
|
|
2181
|
+
let e = J(), t = d.value;
|
|
2182
|
+
!e || !t || (e.muted || e.volume <= 0 ? (e.volume = K(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
|
|
2177
2183
|
}
|
|
2178
2184
|
function P(e) {
|
|
2179
2185
|
return !!t.value[e] && !n.value[e];
|
|
@@ -2200,9 +2206,9 @@ function On(e) {
|
|
|
2200
2206
|
async function V(e) {
|
|
2201
2207
|
if (!ee(e)) return;
|
|
2202
2208
|
t.value[e] = !1, n.value[e] = null;
|
|
2203
|
-
let r =
|
|
2209
|
+
let r = te(e);
|
|
2204
2210
|
r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
|
|
2205
|
-
let i =
|
|
2211
|
+
let i = q(e);
|
|
2206
2212
|
i && H(i, e), l.forEach((t) => {
|
|
2207
2213
|
t.startsWith(`${e}|`) && l.delete(t);
|
|
2208
2214
|
}), a.value[e] = (a.value[e] ?? 0) + 1, await _(), await C();
|
|
@@ -2212,32 +2218,32 @@ function On(e) {
|
|
|
2212
2218
|
try {
|
|
2213
2219
|
e.currentTime = 0;
|
|
2214
2220
|
} catch {}
|
|
2215
|
-
|
|
2221
|
+
W(t, e);
|
|
2216
2222
|
}
|
|
2217
2223
|
function U() {
|
|
2218
2224
|
for (let [e, t] of s.entries()) H(t, e);
|
|
2219
2225
|
for (let [e, t] of c.entries()) H(t, e);
|
|
2220
2226
|
}
|
|
2221
|
-
function
|
|
2227
|
+
function te(e) {
|
|
2222
2228
|
return r.value[e] || (r.value[e] = mn()), r.value[e];
|
|
2223
2229
|
}
|
|
2224
|
-
function
|
|
2225
|
-
gn(
|
|
2230
|
+
function W(e, t, n) {
|
|
2231
|
+
gn(te(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
2226
2232
|
}
|
|
2227
|
-
function
|
|
2228
|
-
let r =
|
|
2233
|
+
function G(e, t, n) {
|
|
2234
|
+
let r = te(e);
|
|
2229
2235
|
r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.muted = n.muted, r.paused = n.paused, r.volume = Number.isFinite(n.volume) ? n.volume : r.volume;
|
|
2230
2236
|
}
|
|
2231
|
-
function
|
|
2237
|
+
function K(e) {
|
|
2232
2238
|
return kn(o.value[e] ?? 1, 0, 1);
|
|
2233
2239
|
}
|
|
2234
|
-
function
|
|
2240
|
+
function q(e) {
|
|
2235
2241
|
return s.get(e) ?? c.get(e) ?? null;
|
|
2236
2242
|
}
|
|
2237
|
-
function
|
|
2238
|
-
return d.value ?
|
|
2243
|
+
function J() {
|
|
2244
|
+
return d.value ? q(d.value) : null;
|
|
2239
2245
|
}
|
|
2240
|
-
function
|
|
2246
|
+
function ne(e) {
|
|
2241
2247
|
if (e) {
|
|
2242
2248
|
if (e.paused) {
|
|
2243
2249
|
Tn(e);
|
|
@@ -2246,8 +2252,8 @@ function On(e) {
|
|
|
2246
2252
|
e.pause();
|
|
2247
2253
|
}
|
|
2248
2254
|
}
|
|
2249
|
-
function
|
|
2250
|
-
let r =
|
|
2255
|
+
function Y(t, n) {
|
|
2256
|
+
let r = X(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
2251
2257
|
if (!r || !n) return;
|
|
2252
2258
|
let i = `${t}|${n}`;
|
|
2253
2259
|
l.has(i) || (l.add(i), e.onAssetLoad?.({
|
|
@@ -2257,11 +2263,11 @@ function On(e) {
|
|
|
2257
2263
|
url: n
|
|
2258
2264
|
}));
|
|
2259
2265
|
}
|
|
2260
|
-
function
|
|
2266
|
+
function X(e) {
|
|
2261
2267
|
return f.value.get(e) ?? null;
|
|
2262
2268
|
}
|
|
2263
|
-
function
|
|
2264
|
-
return
|
|
2269
|
+
function re(e) {
|
|
2270
|
+
return X(e)?.url ?? null;
|
|
2265
2271
|
}
|
|
2266
2272
|
return {
|
|
2267
2273
|
activeAssetErrorKind: g,
|
|
@@ -2356,7 +2362,7 @@ function Pn(e, t, n = {}) {
|
|
|
2356
2362
|
onEnable() {
|
|
2357
2363
|
return T.syncMediaPlayback();
|
|
2358
2364
|
},
|
|
2359
|
-
onKeydown:
|
|
2365
|
+
onKeydown: W,
|
|
2360
2366
|
onResize: F
|
|
2361
2367
|
});
|
|
2362
2368
|
function P(e, t, n) {
|
|
@@ -2395,37 +2401,37 @@ function Pn(e, t, n = {}) {
|
|
|
2395
2401
|
function U() {
|
|
2396
2402
|
m.value = 0, h.value = !1, v = null;
|
|
2397
2403
|
}
|
|
2398
|
-
function
|
|
2404
|
+
function te(e) {
|
|
2399
2405
|
if (!_.value || r.value.length === 0 || h.value || ve(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
2400
2406
|
e.preventDefault();
|
|
2401
2407
|
let t = Date.now();
|
|
2402
2408
|
t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
|
|
2403
2409
|
}
|
|
2404
|
-
function
|
|
2410
|
+
function W(e) {
|
|
2405
2411
|
!_.value || r.value.length === 0 || Z(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
|
|
2406
2412
|
}
|
|
2407
|
-
function
|
|
2413
|
+
function G(e, t) {
|
|
2408
2414
|
T.onVideoClick(e, t, x);
|
|
2409
2415
|
}
|
|
2410
|
-
function
|
|
2416
|
+
function K(e, t) {
|
|
2411
2417
|
T.onAudioCoverClick(e, t, x);
|
|
2412
2418
|
}
|
|
2413
|
-
function
|
|
2419
|
+
function q(e) {
|
|
2414
2420
|
T.onMediaSeekInput(e);
|
|
2415
2421
|
}
|
|
2416
|
-
function
|
|
2422
|
+
function J(e) {
|
|
2417
2423
|
T.onMediaVolumeInput(e);
|
|
2418
2424
|
}
|
|
2419
|
-
function
|
|
2425
|
+
function ne() {
|
|
2420
2426
|
T.onMediaVolumeToggle();
|
|
2421
2427
|
}
|
|
2422
|
-
function
|
|
2428
|
+
function Y(e) {
|
|
2423
2429
|
return e.type === "image" || e.type === "video";
|
|
2424
2430
|
}
|
|
2425
|
-
function
|
|
2431
|
+
function X(e) {
|
|
2426
2432
|
return e.type === "audio";
|
|
2427
2433
|
}
|
|
2428
|
-
function
|
|
2434
|
+
function re(e) {
|
|
2429
2435
|
return Nn(e, S.value, g.value, m.value, h.value);
|
|
2430
2436
|
}
|
|
2431
2437
|
return {
|
|
@@ -2443,30 +2449,30 @@ function Pn(e, t, n = {}) {
|
|
|
2443
2449
|
getAssetRenderKey: T.getAssetRenderKey,
|
|
2444
2450
|
formatPlaybackTime: ln,
|
|
2445
2451
|
getImageSource: T.getImageSource,
|
|
2446
|
-
getSlideStyle:
|
|
2452
|
+
getSlideStyle: re,
|
|
2447
2453
|
hasNextPage: c,
|
|
2448
2454
|
isAtEnd: E,
|
|
2449
|
-
isAudio:
|
|
2450
|
-
isVisual:
|
|
2455
|
+
isAudio: X,
|
|
2456
|
+
isVisual: Y,
|
|
2451
2457
|
items: r,
|
|
2452
2458
|
loading: s,
|
|
2453
2459
|
mediaStates: T.mediaStates,
|
|
2454
2460
|
isImageReady: T.isImageReady,
|
|
2455
2461
|
isMediaReady: T.isMediaReady,
|
|
2456
|
-
onAudioCoverClick:
|
|
2462
|
+
onAudioCoverClick: K,
|
|
2457
2463
|
onImageError: T.onImageError,
|
|
2458
2464
|
onImageLoad: T.onImageLoad,
|
|
2459
2465
|
onMediaEvent: T.onMediaEvent,
|
|
2460
2466
|
onMediaError: T.onMediaError,
|
|
2461
|
-
onMediaSeekInput:
|
|
2462
|
-
onMediaVolumeInput:
|
|
2463
|
-
onMediaVolumeToggle:
|
|
2467
|
+
onMediaSeekInput: q,
|
|
2468
|
+
onMediaVolumeInput: J,
|
|
2469
|
+
onMediaVolumeToggle: ne,
|
|
2464
2470
|
onPointerCancel: V,
|
|
2465
2471
|
onPointerDown: z,
|
|
2466
2472
|
onPointerMove: ee,
|
|
2467
2473
|
onPointerUp: B,
|
|
2468
|
-
onVideoClick:
|
|
2469
|
-
onWheel:
|
|
2474
|
+
onVideoClick: G,
|
|
2475
|
+
onWheel: te,
|
|
2470
2476
|
registerAudioElement: T.registerAudioElement,
|
|
2471
2477
|
registerImageElement: T.registerImageElement,
|
|
2472
2478
|
registerVideoElement: T.registerVideoElement,
|
|
@@ -2677,24 +2683,44 @@ var Gn = {
|
|
|
2677
2683
|
}, null, 4)]))])) : o("", !0)
|
|
2678
2684
|
])]));
|
|
2679
2685
|
}
|
|
2680
|
-
}), er =
|
|
2681
|
-
|
|
2686
|
+
}), er = ["data-surface"], tr = ["data-surface"], nr = /* @__PURE__ */ d({
|
|
2687
|
+
inheritAttrs: !1,
|
|
2688
|
+
__name: "SurfaceEmptyState",
|
|
2689
|
+
props: {
|
|
2690
|
+
message: {},
|
|
2691
|
+
mode: {},
|
|
2692
|
+
surface: {}
|
|
2693
|
+
},
|
|
2694
|
+
setup(e) {
|
|
2695
|
+
let t = I();
|
|
2696
|
+
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, F(t), {
|
|
2697
|
+
"data-testid": "vibe-empty-state-inline",
|
|
2698
|
+
"data-surface": e.surface,
|
|
2699
|
+
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)]"]
|
|
2700
|
+
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, M(e.message), 3)])], 16, er)) : (w(), s("div", g({ key: 1 }, F(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
|
|
2701
|
+
"data-testid": "vibe-empty-state-badge",
|
|
2702
|
+
"data-surface": e.surface,
|
|
2703
|
+
class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
|
|
2704
|
+
}, M(e.message), 11, tr)])], 16));
|
|
2705
|
+
}
|
|
2706
|
+
}), rr = 1, ir = .5;
|
|
2707
|
+
function ar(e) {
|
|
2682
2708
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2683
|
-
width:
|
|
2684
|
-
height:
|
|
2709
|
+
width: rr,
|
|
2710
|
+
height: rr,
|
|
2685
2711
|
source: "fallback"
|
|
2686
2712
|
};
|
|
2687
2713
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2688
|
-
if (
|
|
2689
|
-
let r =
|
|
2714
|
+
if (mr(t) && mr(n)) {
|
|
2715
|
+
let r = hr(e, t, n);
|
|
2690
2716
|
return {
|
|
2691
2717
|
width: r.width,
|
|
2692
2718
|
height: r.height,
|
|
2693
2719
|
source: "preview"
|
|
2694
2720
|
};
|
|
2695
2721
|
}
|
|
2696
|
-
if (
|
|
2697
|
-
let t =
|
|
2722
|
+
if (mr(e.width) && mr(e.height)) {
|
|
2723
|
+
let t = hr(e, e.width, e.height);
|
|
2698
2724
|
return {
|
|
2699
2725
|
width: t.width,
|
|
2700
2726
|
height: t.height,
|
|
@@ -2702,24 +2728,24 @@ function nr(e) {
|
|
|
2702
2728
|
};
|
|
2703
2729
|
}
|
|
2704
2730
|
return {
|
|
2705
|
-
width:
|
|
2706
|
-
height:
|
|
2731
|
+
width: rr,
|
|
2732
|
+
height: rr,
|
|
2707
2733
|
source: "fallback"
|
|
2708
2734
|
};
|
|
2709
2735
|
}
|
|
2710
|
-
function
|
|
2736
|
+
function or(e, t) {
|
|
2711
2737
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2712
2738
|
}
|
|
2713
|
-
function
|
|
2739
|
+
function sr(e, t, n, r = 0) {
|
|
2714
2740
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2715
2741
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2716
2742
|
return !a || a <= 0 ? n : a / t;
|
|
2717
2743
|
}
|
|
2718
|
-
function
|
|
2719
|
-
let n =
|
|
2744
|
+
function cr(e, t) {
|
|
2745
|
+
let n = ar(e);
|
|
2720
2746
|
return n.height / n.width * t;
|
|
2721
2747
|
}
|
|
2722
|
-
function
|
|
2748
|
+
function lr(e, t) {
|
|
2723
2749
|
let n = Array.from({ length: t.columnCount }, () => 0), r = {
|
|
2724
2750
|
positions: Array(e.length),
|
|
2725
2751
|
heights: Array(e.length),
|
|
@@ -2728,18 +2754,18 @@ function or(e, t) {
|
|
|
2728
2754
|
indexById: /* @__PURE__ */ new Map(),
|
|
2729
2755
|
columnHeights: n
|
|
2730
2756
|
};
|
|
2731
|
-
return
|
|
2757
|
+
return ur(r, e, {
|
|
2732
2758
|
...t,
|
|
2733
2759
|
startIndex: 0
|
|
2734
2760
|
}), r;
|
|
2735
2761
|
}
|
|
2736
|
-
function
|
|
2762
|
+
function ur(e, t, n) {
|
|
2737
2763
|
for (let r = 0; r < t.length; r += 1) {
|
|
2738
2764
|
let i = t[r], a = n.startIndex + r;
|
|
2739
2765
|
e.indexById.set($(i), a);
|
|
2740
2766
|
let o = 0;
|
|
2741
2767
|
for (let t = 1; t < e.columnHeights.length; t += 1) e.columnHeights[t] < e.columnHeights[o] && (o = t);
|
|
2742
|
-
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l =
|
|
2768
|
+
let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = cr(i, n.columnWidth);
|
|
2743
2769
|
e.positions[a] = {
|
|
2744
2770
|
x: s + (n.positionOffsetX ?? 0),
|
|
2745
2771
|
y: c + (n.positionOffsetY ?? 0)
|
|
@@ -2752,20 +2778,20 @@ function sr(e, t, n) {
|
|
|
2752
2778
|
}
|
|
2753
2779
|
return e;
|
|
2754
2780
|
}
|
|
2755
|
-
function
|
|
2781
|
+
function dr(e, t) {
|
|
2756
2782
|
let n = [...t.columnHeights], r = t.contentHeight;
|
|
2757
2783
|
for (let i of e) {
|
|
2758
2784
|
let e = 0;
|
|
2759
2785
|
for (let t = 1; t < n.length; t += 1) n[t] < n[e] && (e = t);
|
|
2760
|
-
let a = n[e], o =
|
|
2786
|
+
let a = n[e], o = cr(i, t.columnWidth);
|
|
2761
2787
|
n[e] = a + o + t.gapY, r = Math.max(r, a + o);
|
|
2762
2788
|
}
|
|
2763
2789
|
return r;
|
|
2764
2790
|
}
|
|
2765
|
-
function
|
|
2791
|
+
function fr(e) {
|
|
2766
2792
|
return e.addedItems.length === 0 || e.removedItemCount > 0 || e.isPrepend || e.previousItems.length === 0 || e.layoutItemCount !== e.previousItems.length || e.columnHeights.length !== e.columnCount || e.currentItems.length !== e.previousItems.length + e.addedItems.length ? !1 : e.previousItems.every((t, n) => $(t) === $(e.currentItems[n]));
|
|
2767
2793
|
}
|
|
2768
|
-
function
|
|
2794
|
+
function pr(e) {
|
|
2769
2795
|
if (e.itemCount <= 0) return [];
|
|
2770
2796
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2771
2797
|
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();
|
|
@@ -2775,11 +2801,11 @@ function ur(e) {
|
|
|
2775
2801
|
}
|
|
2776
2802
|
return Array.from(a).sort((e, t) => e - t);
|
|
2777
2803
|
}
|
|
2778
|
-
function
|
|
2804
|
+
function mr(e) {
|
|
2779
2805
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2780
2806
|
}
|
|
2781
|
-
function
|
|
2782
|
-
return e.type !== "image" || n / t >=
|
|
2807
|
+
function hr(e, t, n) {
|
|
2808
|
+
return e.type !== "image" || n / t >= ir ? {
|
|
2783
2809
|
width: t,
|
|
2784
2810
|
height: n
|
|
2785
2811
|
} : {
|
|
@@ -2789,9 +2815,9 @@ function fr(e, t, n) {
|
|
|
2789
2815
|
}
|
|
2790
2816
|
//#endregion
|
|
2791
2817
|
//#region src/components/viewer-core/listPreview.ts
|
|
2792
|
-
var
|
|
2793
|
-
function
|
|
2794
|
-
let t =
|
|
2818
|
+
var gr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, _r = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, vr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
2819
|
+
function yr(e) {
|
|
2820
|
+
let t = br(e), n = t?.url, r = ar(e), i = e.title?.trim() || Kt(e.type);
|
|
2795
2821
|
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
2796
2822
|
kind: "video",
|
|
2797
2823
|
url: n,
|
|
@@ -2810,13 +2836,13 @@ function gr(e) {
|
|
|
2810
2836
|
width: r.width,
|
|
2811
2837
|
height: r.height,
|
|
2812
2838
|
label: i
|
|
2813
|
-
} : typeof n == "string" &&
|
|
2839
|
+
} : typeof n == "string" && Sr(e, n) ? {
|
|
2814
2840
|
kind: "video",
|
|
2815
2841
|
url: n,
|
|
2816
2842
|
width: r.width,
|
|
2817
2843
|
height: r.height,
|
|
2818
2844
|
label: i
|
|
2819
|
-
} : typeof n == "string" &&
|
|
2845
|
+
} : typeof n == "string" && xr(e, n) ? {
|
|
2820
2846
|
kind: "image",
|
|
2821
2847
|
url: n,
|
|
2822
2848
|
width: r.width,
|
|
@@ -2830,188 +2856,51 @@ function gr(e) {
|
|
|
2830
2856
|
label: i
|
|
2831
2857
|
};
|
|
2832
2858
|
}
|
|
2833
|
-
function
|
|
2859
|
+
function br(e) {
|
|
2834
2860
|
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
2835
2861
|
}
|
|
2836
|
-
function
|
|
2837
|
-
return e.type !== "image" || typeof t != "string" ? !1 :
|
|
2862
|
+
function xr(e, t) {
|
|
2863
|
+
return e.type !== "image" || typeof t != "string" ? !1 : gr.test(t) || Cr(t);
|
|
2838
2864
|
}
|
|
2839
|
-
function
|
|
2840
|
-
return e.type !== "video" || typeof t != "string" ? !1 :
|
|
2865
|
+
function Sr(e, t) {
|
|
2866
|
+
return e.type !== "video" || typeof t != "string" ? !1 : _r.test(t) || wr(t);
|
|
2841
2867
|
}
|
|
2842
|
-
function
|
|
2868
|
+
function Cr(e) {
|
|
2843
2869
|
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
2844
2870
|
}
|
|
2845
|
-
function
|
|
2846
|
-
return
|
|
2871
|
+
function wr(e) {
|
|
2872
|
+
return vr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
2847
2873
|
}
|
|
2848
2874
|
//#endregion
|
|
2849
|
-
//#region src/components/
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
],
|
|
2860
|
-
"src",
|
|
2861
|
-
"onError",
|
|
2862
|
-
"onLoad"
|
|
2863
|
-
], Tr = [
|
|
2864
|
-
"src",
|
|
2865
|
-
"onError",
|
|
2866
|
-
"onLoadedmetadata"
|
|
2867
|
-
], Er = {
|
|
2868
|
-
key: 2,
|
|
2869
|
-
class: "grid h-full w-full place-items-center bg-white/6",
|
|
2870
|
-
"aria-hidden": "true"
|
|
2871
|
-
}, Dr = {
|
|
2872
|
-
key: 3,
|
|
2873
|
-
class: "pointer-events-none absolute left-2 top-2 inline-flex h-6 w-6 items-center justify-center border border-white/14 bg-black/55 backdrop-blur-[14px]",
|
|
2874
|
-
"aria-hidden": "true"
|
|
2875
|
-
}, Or = {
|
|
2876
|
-
key: 4,
|
|
2877
|
-
"data-testid": "vibe-fullscreen-next-preview-spinner",
|
|
2878
|
-
class: "pointer-events-none absolute inset-0 grid place-items-center bg-black/18",
|
|
2879
|
-
"aria-hidden": "true"
|
|
2880
|
-
}, kr = { class: "inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/50 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Ar = { class: "pointer-events-none absolute bottom-1.5 right-1.5 border border-white/14 bg-black/58 px-1.5 py-1 text-[0.56rem] font-bold leading-none tracking-[0.12em] text-[#f7f1ea]/78 backdrop-blur-[14px]" }, jr = /* @__PURE__ */ d({
|
|
2881
|
-
__name: "FullscreenPreviewRail",
|
|
2882
|
-
props: {
|
|
2883
|
-
activeIndex: {},
|
|
2884
|
-
items: {},
|
|
2885
|
-
maxItems: { default: 2 }
|
|
2886
|
-
},
|
|
2887
|
-
emits: ["select"],
|
|
2888
|
-
setup(e, { emit: n }) {
|
|
2889
|
-
let r = e, l = n, d = D({}), f = i(() => {
|
|
2890
|
-
let e = Math.min(Math.max(r.activeIndex + 1, 0), r.items.length);
|
|
2891
|
-
return r.items.slice(e, e + r.maxItems).map((t, n) => ({
|
|
2892
|
-
asset: gr(t),
|
|
2893
|
-
index: e + n,
|
|
2894
|
-
item: t
|
|
2895
|
-
}));
|
|
2896
|
-
});
|
|
2897
|
-
z(f, (e) => {
|
|
2898
|
-
let t = {};
|
|
2899
|
-
for (let n of e) {
|
|
2900
|
-
let e = p(n);
|
|
2901
|
-
_(n) && (t[e] = d.value[e] ?? "loading");
|
|
2902
|
-
}
|
|
2903
|
-
d.value = t;
|
|
2904
|
-
}, { immediate: !0 });
|
|
2905
|
-
function p(e) {
|
|
2906
|
-
return `${e.item.id}:${e.index}:${e.asset.url ?? "fallback"}`;
|
|
2907
|
-
}
|
|
2908
|
-
function m(e) {
|
|
2909
|
-
return `Open item ${e.index + 1} of ${r.items.length}: ${e.asset.label}`;
|
|
2910
|
-
}
|
|
2911
|
-
function h(e) {
|
|
2912
|
-
return g(e) ? "object-cover" : "object-contain";
|
|
2913
|
-
}
|
|
2914
|
-
function g(e) {
|
|
2915
|
-
if (e.width <= 0 || e.height <= 0) return !1;
|
|
2916
|
-
let t = e.width / e.height;
|
|
2917
|
-
return (t >= 1 ? 1 - 1 / t : 1 - t) >= .3;
|
|
2918
|
-
}
|
|
2919
|
-
function _(e) {
|
|
2920
|
-
return !!e.asset.url && (e.asset.kind === "image" || e.asset.kind === "video");
|
|
2921
|
-
}
|
|
2922
|
-
function y(e) {
|
|
2923
|
-
return _(e) && d.value[p(e)] === "loading";
|
|
2924
|
-
}
|
|
2925
|
-
function b(e, t) {
|
|
2926
|
-
return d.value[p(e)] === "ready" ? t : "opacity-0";
|
|
2927
|
-
}
|
|
2928
|
-
function x(e, t) {
|
|
2929
|
-
d.value = {
|
|
2930
|
-
...d.value,
|
|
2931
|
-
[p(e)]: t
|
|
2932
|
-
};
|
|
2933
|
-
}
|
|
2934
|
-
function S(e) {
|
|
2935
|
-
return e === 0 ? "h-[220px] w-[220px]" : "h-[140px] w-[140px]";
|
|
2936
|
-
}
|
|
2937
|
-
function C(e) {
|
|
2938
|
-
return e === 0 ? "opacity-90" : "opacity-40";
|
|
2939
|
-
}
|
|
2940
|
-
return (e, n) => f.value.length ? (w(), s("div", Sr, [(w(!0), s(t, null, O(f.value, (e, t) => (w(), s("button", {
|
|
2941
|
-
key: `${e.item.id}-${e.index}`,
|
|
2942
|
-
type: "button",
|
|
2943
|
-
"data-testid": "vibe-fullscreen-next-preview",
|
|
2944
|
-
"data-index": e.index,
|
|
2945
|
-
"aria-label": m(e),
|
|
2946
|
-
title: e.asset.label,
|
|
2947
|
-
class: v(["group relative overflow-hidden border border-white/14 bg-black/45 text-[#f7f1ea] shadow-[0_20px_50px_-30px_rgba(0,0,0,0.9)] backdrop-blur-[18px] transition hover:border-white/34 hover:bg-black/58 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]", S(t)]),
|
|
2948
|
-
onClick: (t) => l("select", e.index)
|
|
2949
|
-
}, [
|
|
2950
|
-
e.asset.kind === "image" ? (w(), s("img", {
|
|
2951
|
-
key: 0,
|
|
2952
|
-
src: e.asset.url ?? void 0,
|
|
2953
|
-
alt: "",
|
|
2954
|
-
"aria-hidden": "true",
|
|
2955
|
-
draggable: "false",
|
|
2956
|
-
loading: "lazy",
|
|
2957
|
-
class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e, C(t))]]),
|
|
2958
|
-
onError: (t) => x(e, "error"),
|
|
2959
|
-
onLoad: (t) => x(e, "ready")
|
|
2960
|
-
}, null, 42, wr)) : e.asset.kind === "video" ? (w(), s("video", {
|
|
2961
|
-
key: 1,
|
|
2962
|
-
src: e.asset.url ?? void 0,
|
|
2963
|
-
"aria-hidden": "true",
|
|
2964
|
-
class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e, C(t))]]),
|
|
2965
|
-
muted: "",
|
|
2966
|
-
playsinline: "",
|
|
2967
|
-
preload: "metadata",
|
|
2968
|
-
onError: (t) => x(e, "error"),
|
|
2969
|
-
onLoadedmetadata: (t) => x(e, "ready")
|
|
2970
|
-
}, null, 42, Tr)) : (w(), s("span", Er, [(w(), a(A(F(Gt)(e.item.type)), { class: "h-5 w-5 stroke-[1.9] text-[#f7f1ea]/70" }))])),
|
|
2971
|
-
e.asset.kind === "video" ? (w(), s("span", Dr, [(w(), a(A(F(Gt)(e.item.type)), { class: "h-3.5 w-3.5 stroke-[2]" }))])) : o("", !0),
|
|
2972
|
-
y(e) ? (w(), s("span", Or, [c("span", kr, [u(F(se), { class: "h-4 w-4 animate-spin stroke-[1.9] text-[#f7f1ea]/82" })])])) : o("", !0),
|
|
2973
|
-
c("span", Ar, M(e.index + 1) + " / " + M(r.items.length), 1)
|
|
2974
|
-
], 10, Cr))), 128))])) : o("", !0);
|
|
2975
|
-
}
|
|
2976
|
-
}), Mr = ["data-surface"], Nr = ["data-surface"], Pr = /* @__PURE__ */ d({
|
|
2977
|
-
inheritAttrs: !1,
|
|
2978
|
-
__name: "SurfaceEmptyState",
|
|
2979
|
-
props: {
|
|
2980
|
-
message: {},
|
|
2981
|
-
mode: {},
|
|
2982
|
-
surface: {}
|
|
2983
|
-
},
|
|
2984
|
-
setup(e) {
|
|
2985
|
-
let t = I();
|
|
2986
|
-
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, F(t), {
|
|
2987
|
-
"data-testid": "vibe-empty-state-inline",
|
|
2988
|
-
"data-surface": e.surface,
|
|
2989
|
-
class: ["pointer-events-none absolute z-[4] text-center", e.surface === "grid" ? "inset-x-0 top-[clamp(6rem,22vh,11rem)] flex justify-center px-6" : "inset-0 grid place-items-center px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)]"]
|
|
2990
|
-
}), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, M(e.message), 3)])], 16, Mr)) : (w(), s("div", g({ key: 1 }, F(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
|
|
2991
|
-
"data-testid": "vibe-empty-state-badge",
|
|
2992
|
-
"data-surface": e.surface,
|
|
2993
|
-
class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
|
|
2994
|
-
}, M(e.message), 11, Nr)])], 16));
|
|
2995
|
-
}
|
|
2996
|
-
}), Fr = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Ir = {
|
|
2875
|
+
//#region src/components/viewer-core/fullscreenPreviews.ts
|
|
2876
|
+
function Tr(e, t, n = 2) {
|
|
2877
|
+
return e.slice(t + 1, t + 1 + n).map((e, n) => ({
|
|
2878
|
+
asset: yr(e),
|
|
2879
|
+
index: t + n + 1,
|
|
2880
|
+
item: e
|
|
2881
|
+
}));
|
|
2882
|
+
}
|
|
2883
|
+
//#endregion
|
|
2884
|
+
//#region src/components/FullscreenSurface.vue?vue&type=script&setup=true&lang.ts
|
|
2885
|
+
var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Dr = {
|
|
2997
2886
|
key: 0,
|
|
2998
2887
|
class: "relative h-full min-h-0"
|
|
2999
|
-
},
|
|
2888
|
+
}, Or = [
|
|
3000
2889
|
"data-item-id",
|
|
3001
2890
|
"data-occurrence-key",
|
|
3002
2891
|
"data-index",
|
|
3003
2892
|
"data-active",
|
|
3004
2893
|
"aria-hidden"
|
|
3005
|
-
],
|
|
2894
|
+
], kr = {
|
|
3006
2895
|
key: 0,
|
|
3007
2896
|
"data-testid": "vibe-asset-spinner",
|
|
3008
2897
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
3009
|
-
},
|
|
2898
|
+
}, Ar = { 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]" }, jr = ["data-kind"], Mr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Nr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Pr = ["onClick"], Fr = [
|
|
3010
2899
|
"src",
|
|
3011
2900
|
"alt",
|
|
3012
2901
|
"onLoad",
|
|
3013
2902
|
"onError"
|
|
3014
|
-
],
|
|
2903
|
+
], Ir = [
|
|
3015
2904
|
"loop",
|
|
3016
2905
|
"src",
|
|
3017
2906
|
"preload",
|
|
@@ -3030,15 +2919,15 @@ var Sr = {
|
|
|
3030
2919
|
"onStalled",
|
|
3031
2920
|
"onTimeupdate",
|
|
3032
2921
|
"onWaiting"
|
|
3033
|
-
],
|
|
2922
|
+
], Lr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Rr = [
|
|
3034
2923
|
"aria-label",
|
|
3035
2924
|
"disabled",
|
|
3036
2925
|
"onClick"
|
|
3037
|
-
],
|
|
2926
|
+
], zr = { 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]" }, Br = { 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]" }, Vr = {
|
|
3038
2927
|
key: 0,
|
|
3039
2928
|
"data-testid": "vibe-asset-spinner",
|
|
3040
2929
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
3041
|
-
},
|
|
2930
|
+
}, Hr = { 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]" }, Ur = ["data-kind"], Wr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Gr = ["onClick"], Kr = [
|
|
3042
2931
|
"src",
|
|
3043
2932
|
"preload",
|
|
3044
2933
|
"onCanplay",
|
|
@@ -3054,22 +2943,22 @@ var Sr = {
|
|
|
3054
2943
|
"onStalled",
|
|
3055
2944
|
"onTimeupdate",
|
|
3056
2945
|
"onWaiting"
|
|
3057
|
-
],
|
|
2946
|
+
], qr = {
|
|
3058
2947
|
key: 2,
|
|
3059
2948
|
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"
|
|
3060
|
-
},
|
|
2949
|
+
}, Jr = { 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]" }, Yr = {
|
|
3061
2950
|
key: 0,
|
|
3062
2951
|
"data-testid": "vibe-fullscreen-overlay",
|
|
3063
2952
|
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
3064
|
-
},
|
|
2953
|
+
}, Xr = { class: "h-full w-full" }, Zr = {
|
|
3065
2954
|
key: 0,
|
|
3066
2955
|
"data-testid": "vibe-fullscreen-aside",
|
|
3067
2956
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
3068
|
-
},
|
|
2957
|
+
}, Qr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, $r = {
|
|
3069
2958
|
key: 0,
|
|
3070
2959
|
"data-testid": "vibe-fullscreen-aside",
|
|
3071
2960
|
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]"
|
|
3072
|
-
},
|
|
2961
|
+
}, ei = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ti = 1280, ni = 768, ri = /* @__PURE__ */ d({
|
|
3073
2962
|
__name: "FullscreenSurface",
|
|
3074
2963
|
props: {
|
|
3075
2964
|
active: {
|
|
@@ -3135,7 +3024,7 @@ var Sr = {
|
|
|
3135
3024
|
enabled: N(d, "active"),
|
|
3136
3025
|
onAssetError: d.reportAssetError ?? void 0,
|
|
3137
3026
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
3138
|
-
}), _ = D(typeof window > "u" ?
|
|
3027
|
+
}), _ = D(typeof window > "u" ? ti : window.innerWidth || ti), C = rn({
|
|
3139
3028
|
active: N(d, "active"),
|
|
3140
3029
|
items: h.items,
|
|
3141
3030
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
@@ -3152,24 +3041,25 @@ var Sr = {
|
|
|
3152
3041
|
fullscreenMedia: C,
|
|
3153
3042
|
updateDominantToneFromImageElement: ve,
|
|
3154
3043
|
viewer: h
|
|
3155
|
-
}), z = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), V = i(() => _.value <
|
|
3044
|
+
}), z = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), V = i(() => _.value < ni ? "vertical" : "horizontal"), U = i(() => ee.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), te = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), W = i(() => {
|
|
3156
3045
|
let e = h.activeItem.value;
|
|
3157
3046
|
return e ? {
|
|
3158
3047
|
hasNextPage: d.hasNextPage,
|
|
3159
3048
|
index: h.resolvedActiveIndex.value,
|
|
3160
3049
|
item: e,
|
|
3161
3050
|
loading: d.loading,
|
|
3051
|
+
nextPreviews: Tr(h.items.value, h.resolvedActiveIndex.value),
|
|
3162
3052
|
paginationDetail: d.paginationDetail,
|
|
3163
3053
|
total: d.items.length
|
|
3164
3054
|
} : null;
|
|
3165
|
-
}),
|
|
3166
|
-
...
|
|
3055
|
+
}), G = i(() => !W.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](W.value)), K = i(() => !W.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](W.value)), q = i(() => !d.showStatusBadges || !W.value || !h.statusKind.value || !h.statusMessage.value ? null : {
|
|
3056
|
+
...W.value,
|
|
3167
3057
|
kind: h.statusKind.value,
|
|
3168
3058
|
message: h.statusMessage.value
|
|
3169
|
-
}),
|
|
3170
|
-
gridTemplateColumns:
|
|
3059
|
+
}), J = i(() => !q.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](q.value)), ne = i(() => ({
|
|
3060
|
+
gridTemplateColumns: re.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
3171
3061
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
3172
|
-
})),
|
|
3062
|
+
})), Y = i(() => an(G.value)), X = i(() => an(K.value)), re = i(() => X.value && _.value >= ti), ie = i(() => X.value && !re.value), ae = i(() => an(J.value)), { emptyStateProps: oe, showBadgeEmptyState: ce, showCustomEmptyState: fe, showInlineEmptyState: pe } = cn({
|
|
3173
3063
|
emptyStateMode: N(d, "emptyStateMode"),
|
|
3174
3064
|
itemCount: i(() => d.items.length),
|
|
3175
3065
|
loading: N(d, "loading"),
|
|
@@ -3182,7 +3072,7 @@ var Sr = {
|
|
|
3182
3072
|
window.removeEventListener("resize", me);
|
|
3183
3073
|
});
|
|
3184
3074
|
function me() {
|
|
3185
|
-
_.value = window.innerWidth ||
|
|
3075
|
+
_.value = window.innerWidth || ti;
|
|
3186
3076
|
}
|
|
3187
3077
|
function he(e, t) {
|
|
3188
3078
|
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && ve(e, t);
|
|
@@ -3211,24 +3101,24 @@ var Sr = {
|
|
|
3211
3101
|
let a = i.play();
|
|
3212
3102
|
a && typeof a.catch == "function" && a.catch(() => {});
|
|
3213
3103
|
}
|
|
3214
|
-
return (e, n) => (w(), s("div",
|
|
3104
|
+
return (e, n) => (w(), s("div", Er, [
|
|
3215
3105
|
c("div", {
|
|
3216
3106
|
class: v(["absolute inset-0 transition-[background] duration-200", E.value]),
|
|
3217
3107
|
style: b(F(P))
|
|
3218
3108
|
}, null, 6),
|
|
3219
3109
|
c("div", {
|
|
3220
3110
|
class: "relative z-[1] grid h-full min-h-0",
|
|
3221
|
-
style: b(
|
|
3111
|
+
style: b(ne.value)
|
|
3222
3112
|
}, [c("div", {
|
|
3223
3113
|
ref: "viewer.stageRef",
|
|
3224
3114
|
"data-testid": "vibe-stage",
|
|
3225
3115
|
class: "relative h-full min-h-0 touch-none overflow-hidden",
|
|
3226
|
-
onPointerdown: n[
|
|
3227
|
-
onPointermove: n[
|
|
3228
|
-
onPointerup: n[
|
|
3229
|
-
onPointercancel: n[
|
|
3230
|
-
onWheel: n[
|
|
3231
|
-
}, [F(h).activeItem.value ? (w(), s("div",
|
|
3116
|
+
onPointerdown: n[1] ||= (...e) => F(h).onPointerDown && F(h).onPointerDown(...e),
|
|
3117
|
+
onPointermove: n[2] ||= (...e) => F(h).onPointerMove && F(h).onPointerMove(...e),
|
|
3118
|
+
onPointerup: n[3] ||= (...e) => F(h).onPointerUp && F(h).onPointerUp(...e),
|
|
3119
|
+
onPointercancel: n[4] ||= (...e) => F(h).onPointerCancel && F(h).onPointerCancel(...e),
|
|
3120
|
+
onWheel: n[5] ||= (...e) => F(h).onWheel && F(h).onWheel(...e)
|
|
3121
|
+
}, [F(h).activeItem.value ? (w(), s("div", Dr, [
|
|
3232
3122
|
(w(!0), s(t, null, O(F(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
3233
3123
|
key: F(C).getItemKey(r),
|
|
3234
3124
|
"data-testid": "vibe-slide",
|
|
@@ -3245,7 +3135,7 @@ var Sr = {
|
|
|
3245
3135
|
}, null, 6), F(h).isVisual(r) ? (w(), s("div", {
|
|
3246
3136
|
key: 0,
|
|
3247
3137
|
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === F(h).resolvedActiveIndex.value ? U.value : ""])
|
|
3248
|
-
}, [F(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
3138
|
+
}, [F(C).isAssetLoading(i, r) ? (w(), s("div", kr, [c("span", Ar, [u(F(se), {
|
|
3249
3139
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3250
3140
|
"aria-hidden": "true"
|
|
3251
3141
|
})])])) : o("", !0), F(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
@@ -3253,19 +3143,19 @@ var Sr = {
|
|
|
3253
3143
|
"data-testid": "vibe-asset-error",
|
|
3254
3144
|
"data-kind": F(C).getAssetErrorKind(r),
|
|
3255
3145
|
class: "grid h-full w-full place-items-center"
|
|
3256
|
-
}, [c("div",
|
|
3146
|
+
}, [c("div", Mr, [
|
|
3257
3147
|
u(F(de), {
|
|
3258
3148
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3259
3149
|
"aria-hidden": "true"
|
|
3260
3150
|
}),
|
|
3261
|
-
c("p",
|
|
3151
|
+
c("p", Nr, M(F(C).getAssetErrorLabel(r)), 1),
|
|
3262
3152
|
F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
|
|
3263
3153
|
key: 0,
|
|
3264
3154
|
type: "button",
|
|
3265
3155
|
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",
|
|
3266
3156
|
onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
|
|
3267
|
-
}, " Retry ", 8,
|
|
3268
|
-
])], 8,
|
|
3157
|
+
}, " Retry ", 8, Pr)) : o("", !0)
|
|
3158
|
+
])], 8, jr)) : r.type === "image" ? (w(), s("img", {
|
|
3269
3159
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3270
3160
|
src: F(C).getFullscreenImageSource(i, r),
|
|
3271
3161
|
alt: r.title ?? "",
|
|
@@ -3276,7 +3166,7 @@ var Sr = {
|
|
|
3276
3166
|
ref: (e) => he(F(C).getItemKey(r), e),
|
|
3277
3167
|
onLoad: (e) => F(R).onFullscreenImageLoad(e, i, r),
|
|
3278
3168
|
onError: (e) => F(R).onFullscreenImageError(i, r)
|
|
3279
|
-
}, null, 42,
|
|
3169
|
+
}, null, 42, Fr)) : (w(), s("video", {
|
|
3280
3170
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3281
3171
|
class: v(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", F(h).isMediaReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
3282
3172
|
playsinline: "",
|
|
@@ -3300,10 +3190,10 @@ var Sr = {
|
|
|
3300
3190
|
onStalled: (e) => Z(i, r, e),
|
|
3301
3191
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3302
3192
|
onWaiting: (e) => Z(i, r, e)
|
|
3303
|
-
}, null, 42,
|
|
3193
|
+
}, null, 42, Ir))], 2)) : F(h).isAudio(r) ? (w(), s("div", {
|
|
3304
3194
|
key: 1,
|
|
3305
3195
|
class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === F(h).resolvedActiveIndex.value ? U.value : ""])
|
|
3306
|
-
}, [c("div",
|
|
3196
|
+
}, [c("div", Lr, [
|
|
3307
3197
|
c("button", {
|
|
3308
3198
|
type: "button",
|
|
3309
3199
|
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]",
|
|
@@ -3311,25 +3201,25 @@ var Sr = {
|
|
|
3311
3201
|
disabled: !!F(C).getAssetErrorKind(r),
|
|
3312
3202
|
onClick: (e) => F(h).onAudioCoverClick(e, F(C).getItemKey(r))
|
|
3313
3203
|
}, [
|
|
3314
|
-
n[
|
|
3315
|
-
n[
|
|
3316
|
-
c("span",
|
|
3204
|
+
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),
|
|
3205
|
+
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),
|
|
3206
|
+
c("span", zr, [k(e.$slots, "item-icon", {
|
|
3317
3207
|
icon: F(Gt)(r.type),
|
|
3318
3208
|
item: r
|
|
3319
3209
|
}, () => [(w(), a(A(F(Gt)(r.type)), {
|
|
3320
3210
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3321
3211
|
"aria-hidden": "true"
|
|
3322
3212
|
}))])]),
|
|
3323
|
-
c("span",
|
|
3213
|
+
c("span", Br, [(w(), a(A(F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(ue) : F(le)), {
|
|
3324
3214
|
class: "h-4 w-4 stroke-2",
|
|
3325
3215
|
"aria-hidden": "true"
|
|
3326
3216
|
}))])
|
|
3327
|
-
], 8,
|
|
3328
|
-
F(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
3217
|
+
], 8, Rr),
|
|
3218
|
+
F(C).isAssetLoading(i, r) ? (w(), s("div", Vr, [c("span", Hr, [u(F(se), {
|
|
3329
3219
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3330
3220
|
"aria-hidden": "true"
|
|
3331
3221
|
})])])) : o("", !0),
|
|
3332
|
-
F(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[
|
|
3222
|
+
F(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
|
|
3333
3223
|
"data-testid": "vibe-asset-error",
|
|
3334
3224
|
"data-kind": F(C).getAssetErrorKind(r),
|
|
3335
3225
|
class: "relative z-[1] grid justify-items-center gap-4"
|
|
@@ -3338,14 +3228,14 @@ var Sr = {
|
|
|
3338
3228
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
3339
3229
|
"aria-hidden": "true"
|
|
3340
3230
|
}),
|
|
3341
|
-
c("p",
|
|
3231
|
+
c("p", Wr, M(F(C).getAssetErrorLabel(r)), 1),
|
|
3342
3232
|
F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
|
|
3343
3233
|
key: 0,
|
|
3344
3234
|
type: "button",
|
|
3345
3235
|
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",
|
|
3346
3236
|
onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
|
|
3347
|
-
}, " Retry ", 8,
|
|
3348
|
-
], 8,
|
|
3237
|
+
}, " Retry ", 8, Gr)) : o("", !0)
|
|
3238
|
+
], 8, Ur)], 64)) : o("", !0)
|
|
3349
3239
|
]), (w(), s("audio", {
|
|
3350
3240
|
key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
|
|
3351
3241
|
src: F(C).getFullscreenMediaSource(i, r),
|
|
@@ -3366,14 +3256,14 @@ var Sr = {
|
|
|
3366
3256
|
onStalled: (e) => Z(i, r, e),
|
|
3367
3257
|
onTimeupdate: (e) => Z(i, r, e),
|
|
3368
3258
|
onWaiting: (e) => Z(i, r, e)
|
|
3369
|
-
}, null, 40,
|
|
3259
|
+
}, null, 40, Kr))], 2)) : (w(), s("div", qr, [c("div", Jr, [k(e.$slots, "item-icon", {
|
|
3370
3260
|
icon: F(Gt)(r.type),
|
|
3371
3261
|
item: r
|
|
3372
3262
|
}, () => [(w(), a(A(F(Gt)(r.type)), {
|
|
3373
3263
|
class: "h-6 w-6 stroke-[1.9]",
|
|
3374
3264
|
"aria-hidden": "true"
|
|
3375
|
-
}))])])]))], 14,
|
|
3376
|
-
|
|
3265
|
+
}))])])]))], 14, Or))), 128)),
|
|
3266
|
+
W.value && f["fullscreen-overlay"] ? (w(), s("div", Yr, [c("div", Xr, [k(e.$slots, "fullscreen-overlay", y(p(W.value)))])])) : o("", !0),
|
|
3377
3267
|
F(h).activeItem.value ? (w(), a(Ht, {
|
|
3378
3268
|
key: 1,
|
|
3379
3269
|
"current-index": F(h).resolvedActiveIndex.value,
|
|
@@ -3384,9 +3274,9 @@ var Sr = {
|
|
|
3384
3274
|
title: F(h).activeItem.value.title ?? null,
|
|
3385
3275
|
total: F(h).items.value.length,
|
|
3386
3276
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
3387
|
-
}, l({ _: 2 }, [
|
|
3277
|
+
}, l({ _: 2 }, [Y.value && W.value ? {
|
|
3388
3278
|
name: "actions",
|
|
3389
|
-
fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(
|
|
3279
|
+
fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(W.value)))]),
|
|
3390
3280
|
key: "0"
|
|
3391
3281
|
} : void 0]), 1032, [
|
|
3392
3282
|
"current-index",
|
|
@@ -3397,11 +3287,6 @@ var Sr = {
|
|
|
3397
3287
|
"title",
|
|
3398
3288
|
"total"
|
|
3399
3289
|
])) : o("", !0),
|
|
3400
|
-
u(jr, {
|
|
3401
|
-
"active-index": F(h).resolvedActiveIndex.value,
|
|
3402
|
-
items: F(h).items.value,
|
|
3403
|
-
onSelect: n[1] ||= (e) => m("update:activeIndex", e)
|
|
3404
|
-
}, null, 8, ["active-index", "items"]),
|
|
3405
3290
|
ee.value ? (w(), a(jt, {
|
|
3406
3291
|
key: 2,
|
|
3407
3292
|
"current-time": F(h).activeMediaState.value.currentTime,
|
|
@@ -3432,15 +3317,15 @@ var Sr = {
|
|
|
3432
3317
|
"onVolumeInput",
|
|
3433
3318
|
"onVolumeToggle"
|
|
3434
3319
|
])) : o("", !0),
|
|
3435
|
-
|
|
3320
|
+
q.value ? (w(), s("div", {
|
|
3436
3321
|
key: 3,
|
|
3437
3322
|
class: v(["absolute left-1/2 z-[4] -translate-x-1/2", z.value])
|
|
3438
|
-
}, [
|
|
3323
|
+
}, [ae.value ? k(e.$slots, "fullscreen-status", y(g({ key: 0 }, q.value))) : (w(), s("div", {
|
|
3439
3324
|
key: 1,
|
|
3440
3325
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
3441
|
-
class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center",
|
|
3442
|
-
}, M(
|
|
3443
|
-
])) :
|
|
3326
|
+
class: v(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", q.value.kind === "end" ? "border-amber-300/35 text-amber-200" : q.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
3327
|
+
}, M(q.value.message), 3))], 2)) : o("", !0)
|
|
3328
|
+
])) : te.value ? (w(), a($n, {
|
|
3444
3329
|
key: 1,
|
|
3445
3330
|
"fill-collected-count": d.fillCollectedCount,
|
|
3446
3331
|
"fill-completed-calls": d.fillCompletedCalls,
|
|
@@ -3465,25 +3350,25 @@ var Sr = {
|
|
|
3465
3350
|
"has-next-page",
|
|
3466
3351
|
"phase",
|
|
3467
3352
|
"status-message"
|
|
3468
|
-
])) : F(pe) && F(
|
|
3353
|
+
])) : F(pe) && F(oe) ? (w(), a(nr, {
|
|
3469
3354
|
key: 2,
|
|
3470
|
-
message: F(
|
|
3471
|
-
mode: F(
|
|
3472
|
-
surface: F(
|
|
3355
|
+
message: F(oe).message,
|
|
3356
|
+
mode: F(oe).mode,
|
|
3357
|
+
surface: F(oe).surface
|
|
3473
3358
|
}, {
|
|
3474
|
-
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(
|
|
3359
|
+
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(oe)))) : o("", !0)]),
|
|
3475
3360
|
_: 3
|
|
3476
3361
|
}, 8, [
|
|
3477
3362
|
"message",
|
|
3478
3363
|
"mode",
|
|
3479
3364
|
"surface"
|
|
3480
|
-
])) : o("", !0), F(ce) && F(
|
|
3365
|
+
])) : o("", !0), F(ce) && F(oe) ? (w(), a(nr, {
|
|
3481
3366
|
key: 3,
|
|
3482
|
-
message: F(
|
|
3483
|
-
mode: F(
|
|
3484
|
-
surface: F(
|
|
3367
|
+
message: F(oe).message,
|
|
3368
|
+
mode: F(oe).mode,
|
|
3369
|
+
surface: F(oe).surface
|
|
3485
3370
|
}, {
|
|
3486
|
-
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(
|
|
3371
|
+
default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(oe)))) : o("", !0)]),
|
|
3487
3372
|
_: 3
|
|
3488
3373
|
}, 8, [
|
|
3489
3374
|
"message",
|
|
@@ -3497,7 +3382,7 @@ var Sr = {
|
|
|
3497
3382
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3498
3383
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3499
3384
|
}, {
|
|
3500
|
-
default: B(() => [
|
|
3385
|
+
default: B(() => [re.value && W.value ? (w(), s("aside", Zr, [c("div", Qr, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
|
|
3501
3386
|
_: 3
|
|
3502
3387
|
})], 4),
|
|
3503
3388
|
u(r, {
|
|
@@ -3508,7 +3393,7 @@ var Sr = {
|
|
|
3508
3393
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
3509
3394
|
"leave-to-class": "translate-x-full opacity-0"
|
|
3510
3395
|
}, {
|
|
3511
|
-
default: B(() => [
|
|
3396
|
+
default: B(() => [ie.value && W.value ? (w(), s("aside", $r, [c("div", ei, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
|
|
3512
3397
|
_: 3
|
|
3513
3398
|
})
|
|
3514
3399
|
]));
|
|
@@ -3516,10 +3401,10 @@ var Sr = {
|
|
|
3516
3401
|
});
|
|
3517
3402
|
//#endregion
|
|
3518
3403
|
//#region src/components/viewer-core/masonryLayoutState.ts
|
|
3519
|
-
function
|
|
3404
|
+
function ii(e) {
|
|
3520
3405
|
let t = j([]), n = j([]), r = j(/* @__PURE__ */ new Map()), i = j(0), a = j(/* @__PURE__ */ new Map()), o = j([]);
|
|
3521
3406
|
function s(s, c, l) {
|
|
3522
|
-
let u =
|
|
3407
|
+
let u = lr(s, {
|
|
3523
3408
|
columnCount: c,
|
|
3524
3409
|
columnWidth: l,
|
|
3525
3410
|
gapX: e.gapPx,
|
|
@@ -3529,7 +3414,7 @@ function pi(e) {
|
|
|
3529
3414
|
t.value = u.positions.map(d), n.value = u.heights, r.value = u.buckets, i.value = u.contentHeight, a.value = u.indexById, o.value = u.columnHeights;
|
|
3530
3415
|
}
|
|
3531
3416
|
function c(s, c, l, d) {
|
|
3532
|
-
i.value =
|
|
3417
|
+
i.value = ur(u(), s, {
|
|
3533
3418
|
columnCount: l,
|
|
3534
3419
|
columnWidth: d,
|
|
3535
3420
|
gapX: e.gapPx,
|
|
@@ -3541,7 +3426,7 @@ function pi(e) {
|
|
|
3541
3426
|
}).contentHeight, P(t), P(n), P(r), P(a), P(o);
|
|
3542
3427
|
}
|
|
3543
3428
|
function l(e, n, r, i) {
|
|
3544
|
-
return
|
|
3429
|
+
return fr({
|
|
3545
3430
|
addedItems: r.addedItems,
|
|
3546
3431
|
columnCount: i,
|
|
3547
3432
|
columnHeights: o.value,
|
|
@@ -3582,21 +3467,24 @@ function pi(e) {
|
|
|
3582
3467
|
}
|
|
3583
3468
|
//#endregion
|
|
3584
3469
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
3585
|
-
var
|
|
3586
|
-
function
|
|
3470
|
+
var ai = 300, oi = 600, si = 40, ci = 300, li = 400, ui = 300;
|
|
3471
|
+
function di(e, t) {
|
|
3587
3472
|
return t === "top" ? [...e].reverse() : e;
|
|
3588
3473
|
}
|
|
3589
|
-
function
|
|
3590
|
-
return e <= 0 ?
|
|
3474
|
+
function fi(e) {
|
|
3475
|
+
return e <= 0 ? oi : oi + Math.min((e - 1) * si, li);
|
|
3476
|
+
}
|
|
3477
|
+
function pi(e, t, n = ui) {
|
|
3478
|
+
return e + t > n;
|
|
3591
3479
|
}
|
|
3592
|
-
function
|
|
3593
|
-
return
|
|
3480
|
+
function mi() {
|
|
3481
|
+
return ci;
|
|
3594
3482
|
}
|
|
3595
|
-
function
|
|
3483
|
+
function hi(e) {
|
|
3596
3484
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
3597
3485
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
3598
3486
|
}
|
|
3599
|
-
function
|
|
3487
|
+
function gi(e) {
|
|
3600
3488
|
let t = D(/* @__PURE__ */ new Set()), n = D(/* @__PURE__ */ new Set()), r = D(/* @__PURE__ */ new Map()), a = D(/* @__PURE__ */ new Map()), o = D(/* @__PURE__ */ new Map()), s = D(/* @__PURE__ */ new Set()), c = D(/* @__PURE__ */ new Map()), l = D(/* @__PURE__ */ new Map()), u = D(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
|
|
3601
3489
|
z(e.visibleIndices, (i) => {
|
|
3602
3490
|
if (!i.length) return;
|
|
@@ -3606,20 +3494,20 @@ function Ci(e) {
|
|
|
3606
3494
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
3607
3495
|
}
|
|
3608
3496
|
if (!o.length) return;
|
|
3609
|
-
let s =
|
|
3610
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
3611
|
-
r.value = c,
|
|
3497
|
+
let s = di(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
3498
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * si, li));
|
|
3499
|
+
r.value = c, _i(() => {
|
|
3612
3500
|
let e = new Set(n.value);
|
|
3613
3501
|
for (let t of o) e.add(t);
|
|
3614
3502
|
n.value = e;
|
|
3615
|
-
}),
|
|
3503
|
+
}), vi(() => {
|
|
3616
3504
|
let e = new Set(t.value);
|
|
3617
3505
|
for (let t of o) e.delete(t);
|
|
3618
|
-
t.value = e,
|
|
3506
|
+
t.value = e, w(() => {
|
|
3619
3507
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
3620
3508
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
3621
3509
|
n.value = e, r.value = t, a.value = i;
|
|
3622
|
-
},
|
|
3510
|
+
}, fi(o.length));
|
|
3623
3511
|
});
|
|
3624
3512
|
}, { flush: "post" }), z(() => e.items.value.map((e) => $(e)), (e) => {
|
|
3625
3513
|
if (!e.length || !o.value.size) return;
|
|
@@ -3630,33 +3518,51 @@ function Ci(e) {
|
|
|
3630
3518
|
for (let e of f) clearTimeout(e);
|
|
3631
3519
|
f.clear();
|
|
3632
3520
|
});
|
|
3633
|
-
function m(
|
|
3634
|
-
if (!
|
|
3635
|
-
let
|
|
3636
|
-
for (let t of
|
|
3637
|
-
let
|
|
3638
|
-
|
|
3521
|
+
function m(n, r = "bottom") {
|
|
3522
|
+
if (!n.length) return;
|
|
3523
|
+
let i = pi(t.value.size, n.length), o = i ? new Set(e.visibleIndices.value) : null, s = o ? h(o) : new Set(t.value), c = i ? g(s) : new Map(a.value);
|
|
3524
|
+
for (let t of n) {
|
|
3525
|
+
let n = $(t), a = i ? e.indexById.value.get(n) : null;
|
|
3526
|
+
o && (a == null || !o.has(a)) || (s.add(n), c.set(n, r));
|
|
3639
3527
|
}
|
|
3640
|
-
t.value =
|
|
3528
|
+
t.value = s, a.value = c;
|
|
3641
3529
|
}
|
|
3642
|
-
function h(
|
|
3530
|
+
function h(r) {
|
|
3531
|
+
let i = /* @__PURE__ */ new Set();
|
|
3532
|
+
for (let n of r) {
|
|
3533
|
+
let r = e.items.value[n], a = r ? $(r) : null;
|
|
3534
|
+
a && t.value.has(a) && i.add(a);
|
|
3535
|
+
}
|
|
3536
|
+
for (let e of d) t.value.has(e) && i.add(e);
|
|
3537
|
+
for (let e of n.value) t.value.has(e) && i.add(e);
|
|
3538
|
+
return i;
|
|
3539
|
+
}
|
|
3540
|
+
function g(e) {
|
|
3541
|
+
let t = /* @__PURE__ */ new Map();
|
|
3542
|
+
for (let n of e) {
|
|
3543
|
+
let e = a.value.get(n);
|
|
3544
|
+
e && t.set(n, e);
|
|
3545
|
+
}
|
|
3546
|
+
return t;
|
|
3547
|
+
}
|
|
3548
|
+
function _(e) {
|
|
3643
3549
|
if (!e.length) return;
|
|
3644
3550
|
let i = new Map(o.value), c = new Set(t.value), l = new Set(n.value), u = new Map(r.value), f = new Map(a.value), p = [];
|
|
3645
3551
|
for (let t of e) {
|
|
3646
3552
|
let e = $(t.item);
|
|
3647
3553
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
3648
3554
|
}
|
|
3649
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
3555
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, _i(() => {
|
|
3650
3556
|
let e = new Set(s.value);
|
|
3651
3557
|
for (let t of p) e.add(t);
|
|
3652
3558
|
s.value = e;
|
|
3653
|
-
}),
|
|
3559
|
+
}), w(() => {
|
|
3654
3560
|
let e = new Map(o.value), t = new Set(s.value);
|
|
3655
3561
|
for (let n of p) e.delete(n), t.delete(n);
|
|
3656
3562
|
o.value = e, s.value = t;
|
|
3657
|
-
},
|
|
3563
|
+
}, ci);
|
|
3658
3564
|
}
|
|
3659
|
-
function
|
|
3565
|
+
function v(t, n, r = ai) {
|
|
3660
3566
|
if (!t.size) return;
|
|
3661
3567
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
3662
3568
|
for (let [r, o] of t.entries()) {
|
|
@@ -3675,27 +3581,27 @@ function Ci(e) {
|
|
|
3675
3581
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
3676
3582
|
let o = new Map(l.value);
|
|
3677
3583
|
for (let e of a) o.set(e, r);
|
|
3678
|
-
l.value = o,
|
|
3679
|
-
u.value = new Set(a),
|
|
3584
|
+
l.value = o, _i(() => {
|
|
3585
|
+
u.value = new Set(a), _i(() => {
|
|
3680
3586
|
c.value = /* @__PURE__ */ new Map();
|
|
3681
3587
|
});
|
|
3682
|
-
}),
|
|
3588
|
+
}), w(() => {
|
|
3683
3589
|
u.value = /* @__PURE__ */ new Set();
|
|
3684
3590
|
let e = new Map(l.value);
|
|
3685
3591
|
for (let t of a) e.delete(t);
|
|
3686
3592
|
l.value = e;
|
|
3687
3593
|
}, r);
|
|
3688
3594
|
}
|
|
3689
|
-
function
|
|
3690
|
-
if (n.value.has(e)) return `transform ${
|
|
3691
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
3595
|
+
function y(e) {
|
|
3596
|
+
if (n.value.has(e)) return `transform ${oi}ms ease-out`;
|
|
3597
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? ai}ms ease-out`;
|
|
3692
3598
|
}
|
|
3693
|
-
function
|
|
3599
|
+
function b(e) {
|
|
3694
3600
|
if (!n.value.has(e)) return;
|
|
3695
3601
|
let t = r.value.get(e) ?? 0;
|
|
3696
3602
|
return t > 0 ? `${t}ms` : void 0;
|
|
3697
3603
|
}
|
|
3698
|
-
function
|
|
3604
|
+
function S(n) {
|
|
3699
3605
|
let r = e.items.value[n], i = e.positions.value[n] ?? {
|
|
3700
3606
|
x: 0,
|
|
3701
3607
|
y: 0
|
|
@@ -3705,7 +3611,7 @@ function Ci(e) {
|
|
|
3705
3611
|
} : {
|
|
3706
3612
|
dx: 0,
|
|
3707
3613
|
dy: 0
|
|
3708
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
3614
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? hi({
|
|
3709
3615
|
columnWidth: e.columnWidth.value,
|
|
3710
3616
|
direction: u,
|
|
3711
3617
|
itemHeight: o,
|
|
@@ -3714,61 +3620,61 @@ function Ci(e) {
|
|
|
3714
3620
|
}) : i.y;
|
|
3715
3621
|
return `translate3d(${i.x + l.dx}px, ${d + l.dy}px, 0)`;
|
|
3716
3622
|
}
|
|
3717
|
-
function
|
|
3623
|
+
function C(t) {
|
|
3718
3624
|
let n = $(t), r = o.value.get(n);
|
|
3719
3625
|
if (!r) return {
|
|
3720
3626
|
opacity: "0",
|
|
3721
3627
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
3722
|
-
transition: `opacity ${
|
|
3628
|
+
transition: `opacity ${ci}ms ease-out, transform ${ci}ms ease-out`
|
|
3723
3629
|
};
|
|
3724
3630
|
let i = s.value.has(n);
|
|
3725
3631
|
return {
|
|
3726
3632
|
height: `${r.height}px`,
|
|
3727
3633
|
opacity: i ? "0" : "1",
|
|
3728
3634
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
3729
|
-
transition: `opacity ${
|
|
3635
|
+
transition: `opacity ${ci}ms ease-out, transform ${ci}ms ease-out`,
|
|
3730
3636
|
width: `${e.columnWidth.value}px`
|
|
3731
3637
|
};
|
|
3732
3638
|
}
|
|
3733
|
-
function
|
|
3639
|
+
function w(e, t) {
|
|
3734
3640
|
let n = setTimeout(() => {
|
|
3735
3641
|
f.delete(n), e();
|
|
3736
3642
|
}, t);
|
|
3737
3643
|
f.add(n);
|
|
3738
3644
|
}
|
|
3739
3645
|
return {
|
|
3740
|
-
getCardTransform:
|
|
3741
|
-
getCardTransition:
|
|
3742
|
-
getCardTransitionDelay:
|
|
3743
|
-
getLeavingCardStyle:
|
|
3646
|
+
getCardTransform: S,
|
|
3647
|
+
getCardTransition: y,
|
|
3648
|
+
getCardTransitionDelay: b,
|
|
3649
|
+
getLeavingCardStyle: C,
|
|
3744
3650
|
leavingItems: p,
|
|
3745
3651
|
markEnter: m,
|
|
3746
|
-
markLeave:
|
|
3747
|
-
playFlipMoveAnimation:
|
|
3652
|
+
markLeave: _,
|
|
3653
|
+
playFlipMoveAnimation: v
|
|
3748
3654
|
};
|
|
3749
3655
|
}
|
|
3750
|
-
function
|
|
3656
|
+
function _i(e) {
|
|
3751
3657
|
if (typeof requestAnimationFrame == "function") {
|
|
3752
3658
|
requestAnimationFrame(() => e());
|
|
3753
3659
|
return;
|
|
3754
3660
|
}
|
|
3755
3661
|
setTimeout(e, 0);
|
|
3756
3662
|
}
|
|
3757
|
-
function
|
|
3758
|
-
|
|
3663
|
+
function vi(e) {
|
|
3664
|
+
_i(() => _i(e));
|
|
3759
3665
|
}
|
|
3760
3666
|
//#endregion
|
|
3761
3667
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
3762
|
-
function
|
|
3668
|
+
function yi(e, t) {
|
|
3763
3669
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
3764
3670
|
}
|
|
3765
|
-
function
|
|
3671
|
+
function bi(e, t, n) {
|
|
3766
3672
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
3767
3673
|
}
|
|
3768
|
-
function
|
|
3674
|
+
function xi(e, t, n, r) {
|
|
3769
3675
|
return Math.max(e?.scrollHeight ?? 0, r) - (t + n);
|
|
3770
3676
|
}
|
|
3771
|
-
function
|
|
3677
|
+
function Si(e, t) {
|
|
3772
3678
|
return {
|
|
3773
3679
|
height: `${e}px`,
|
|
3774
3680
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -3776,11 +3682,11 @@ function ki(e, t) {
|
|
|
3776
3682
|
}
|
|
3777
3683
|
//#endregion
|
|
3778
3684
|
//#region src/components/viewer-core/masonryScrollBehavior.ts
|
|
3779
|
-
var
|
|
3780
|
-
function
|
|
3685
|
+
var Ci = 24, wi = 48;
|
|
3686
|
+
function Ti(e) {
|
|
3781
3687
|
let t = D(0), n = 0, r = 0;
|
|
3782
3688
|
function i(e) {
|
|
3783
|
-
if (t.value =
|
|
3689
|
+
if (t.value = Ai(e), t.value <= 0) {
|
|
3784
3690
|
o();
|
|
3785
3691
|
return;
|
|
3786
3692
|
}
|
|
@@ -3800,7 +3706,7 @@ function Mi(e) {
|
|
|
3800
3706
|
let s = e.getViewport();
|
|
3801
3707
|
if (s && r > 0) {
|
|
3802
3708
|
let n = Math.min(Math.max(0, i - r), 250), a = t.value * n / 1e3;
|
|
3803
|
-
s.scrollTop =
|
|
3709
|
+
s.scrollTop = ji(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
|
|
3804
3710
|
}
|
|
3805
3711
|
r = i, a();
|
|
3806
3712
|
}
|
|
@@ -3810,44 +3716,44 @@ function Mi(e) {
|
|
|
3810
3716
|
stop: o
|
|
3811
3717
|
};
|
|
3812
3718
|
}
|
|
3813
|
-
function
|
|
3719
|
+
function Ei(e) {
|
|
3814
3720
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3815
3721
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3816
|
-
return t <= 0 ? 1 :
|
|
3722
|
+
return t <= 0 ? 1 : ji(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3817
3723
|
}
|
|
3818
|
-
function
|
|
3724
|
+
function Di(e) {
|
|
3819
3725
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3820
3726
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3821
|
-
return t <= 0 ? 1 :
|
|
3727
|
+
return t <= 0 ? 1 : ji(e.progressDistancePx / t, 0, 1);
|
|
3822
3728
|
}
|
|
3823
|
-
function
|
|
3824
|
-
let t = i(() => Math.max(0, e.viewportHeight.value -
|
|
3729
|
+
function Oi(e) {
|
|
3730
|
+
let t = i(() => Math.max(0, e.viewportHeight.value - Ci * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
|
|
3825
3731
|
if (!n.value) return 0;
|
|
3826
3732
|
let r = e.viewportHeight.value / e.containerHeight.value * t.value;
|
|
3827
|
-
return Math.min(t.value, Math.max(
|
|
3733
|
+
return Math.min(t.value, Math.max(wi, r));
|
|
3828
3734
|
}), a = i(() => {
|
|
3829
|
-
if (!n.value) return
|
|
3735
|
+
if (!n.value) return Ci;
|
|
3830
3736
|
let i = Math.max(0, e.containerHeight.value - e.viewportHeight.value);
|
|
3831
|
-
return
|
|
3737
|
+
return Ci + Math.max(0, t.value - r.value) * (i > 0 ? ji(e.scrollTop.value / i, 0, 1) : 0);
|
|
3832
3738
|
});
|
|
3833
3739
|
return {
|
|
3834
|
-
getScrollbarThumbStyle: () =>
|
|
3740
|
+
getScrollbarThumbStyle: () => Si(r.value, a.value),
|
|
3835
3741
|
showScrollbar: n
|
|
3836
3742
|
};
|
|
3837
3743
|
}
|
|
3838
|
-
function
|
|
3744
|
+
function ki(e) {
|
|
3839
3745
|
return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3840
3746
|
}
|
|
3841
|
-
function
|
|
3747
|
+
function Ai(e) {
|
|
3842
3748
|
return Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
3843
3749
|
}
|
|
3844
|
-
function
|
|
3750
|
+
function ji(e, t, n) {
|
|
3845
3751
|
return Math.min(Math.max(e, t), n);
|
|
3846
3752
|
}
|
|
3847
3753
|
//#endregion
|
|
3848
3754
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
3849
|
-
var
|
|
3850
|
-
function
|
|
3755
|
+
var Mi = 250, Ni = 1e3;
|
|
3756
|
+
function Pi(e) {
|
|
3851
3757
|
let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = D(!1), c = 0, l = null;
|
|
3852
3758
|
x(() => {
|
|
3853
3759
|
S();
|
|
@@ -3870,7 +3776,7 @@ function Vi(e) {
|
|
|
3870
3776
|
if (!C(t) || !e.isAtBoundary()) return;
|
|
3871
3777
|
let n = Date.now();
|
|
3872
3778
|
if (!(n < c)) {
|
|
3873
|
-
if (c = n +
|
|
3779
|
+
if (c = n + Mi, a.value) {
|
|
3874
3780
|
s.value = !0;
|
|
3875
3781
|
return;
|
|
3876
3782
|
}
|
|
@@ -3909,7 +3815,7 @@ function Vi(e) {
|
|
|
3909
3815
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3910
3816
|
}
|
|
3911
3817
|
function v() {
|
|
3912
|
-
o.value = !1, y(
|
|
3818
|
+
o.value = !1, y(Ni);
|
|
3913
3819
|
}
|
|
3914
3820
|
function y(e) {
|
|
3915
3821
|
S(), a.value = !0, l = setTimeout(() => {
|
|
@@ -3941,7 +3847,7 @@ function Vi(e) {
|
|
|
3941
3847
|
}
|
|
3942
3848
|
//#endregion
|
|
3943
3849
|
//#region src/components/viewer-core/masonryBoundaryLock.ts
|
|
3944
|
-
function
|
|
3850
|
+
function Fi() {
|
|
3945
3851
|
let e = D(!1), t = null;
|
|
3946
3852
|
x(() => {
|
|
3947
3853
|
r();
|
|
@@ -3962,8 +3868,8 @@ function Hi() {
|
|
|
3962
3868
|
}
|
|
3963
3869
|
//#endregion
|
|
3964
3870
|
//#region src/components/viewer-core/masonryItemMutation.ts
|
|
3965
|
-
function
|
|
3966
|
-
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r =
|
|
3871
|
+
function Ii(e) {
|
|
3872
|
+
let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r = Ri(e.previousItems, e.layoutIndexById, e.layoutHeights), i = zi(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has($(e))), c = Li(e.previousItems, o, r, i), l = t.length > n.length && n.length > 0 && t[0] !== n[0], u = e.scrollTop > e.contentInsetPx + e.gapPx, d = l && u ? e.currentItems[e.activeIndex] : null;
|
|
3967
3873
|
return {
|
|
3968
3874
|
addedItems: s,
|
|
3969
3875
|
anchorId: d ? $(d) : null,
|
|
@@ -3975,7 +3881,7 @@ function Ui(e) {
|
|
|
3975
3881
|
shouldResetScrollForEmptyRemoval: e.currentItems.length === 0 && e.previousItems.length > 0 && c.length > 0 && e.scrollTop > 0
|
|
3976
3882
|
};
|
|
3977
3883
|
}
|
|
3978
|
-
function
|
|
3884
|
+
function Li(e, t, n, r) {
|
|
3979
3885
|
return e.flatMap((e) => {
|
|
3980
3886
|
let i = $(e);
|
|
3981
3887
|
if (t.has(i)) return [];
|
|
@@ -3987,7 +3893,7 @@ function Wi(e, t, n, r) {
|
|
|
3987
3893
|
}] : [];
|
|
3988
3894
|
});
|
|
3989
3895
|
}
|
|
3990
|
-
function
|
|
3896
|
+
function Ri(e, t, n) {
|
|
3991
3897
|
let r = /* @__PURE__ */ new Map();
|
|
3992
3898
|
for (let i of e) {
|
|
3993
3899
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -3995,7 +3901,7 @@ function Gi(e, t, n) {
|
|
|
3995
3901
|
}
|
|
3996
3902
|
return r;
|
|
3997
3903
|
}
|
|
3998
|
-
function
|
|
3904
|
+
function zi(e, t, n) {
|
|
3999
3905
|
let r = /* @__PURE__ */ new Map();
|
|
4000
3906
|
for (let i of e) {
|
|
4001
3907
|
let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
|
|
@@ -4005,7 +3911,7 @@ function Ki(e, t, n) {
|
|
|
4005
3911
|
}
|
|
4006
3912
|
//#endregion
|
|
4007
3913
|
//#region src/components/viewer-core/masonryPendingAppend.ts
|
|
4008
|
-
function
|
|
3914
|
+
function Bi(e) {
|
|
4009
3915
|
let t = D(null), n = D(!1), r = null;
|
|
4010
3916
|
function i() {
|
|
4011
3917
|
o(), e.pendingAppendItems.value.length && (t.value = c([...e.items.value, ...e.pendingAppendItems.value]), s());
|
|
@@ -4028,12 +3934,12 @@ function qi(e) {
|
|
|
4028
3934
|
}, 300));
|
|
4029
3935
|
}
|
|
4030
3936
|
function c(t) {
|
|
4031
|
-
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ?
|
|
3937
|
+
return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? dr(e.pendingAppendItems.value, {
|
|
4032
3938
|
columnHeights: e.columnHeights.value,
|
|
4033
3939
|
columnWidth: e.columnWidth.value,
|
|
4034
3940
|
contentHeight: e.contentHeight.value,
|
|
4035
3941
|
gapY: e.gapPx
|
|
4036
|
-
}) + e.contentInsetPx * 2 :
|
|
3942
|
+
}) + e.contentInsetPx * 2 : lr(t, {
|
|
4037
3943
|
bucketPx: e.bucketPx,
|
|
4038
3944
|
columnCount: e.columnCount.value,
|
|
4039
3945
|
columnWidth: e.columnWidth.value,
|
|
@@ -4050,42 +3956,42 @@ function qi(e) {
|
|
|
4050
3956
|
}
|
|
4051
3957
|
//#endregion
|
|
4052
3958
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
4053
|
-
var
|
|
4054
|
-
function
|
|
4055
|
-
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth ||
|
|
4056
|
-
bucketPx:
|
|
4057
|
-
contentInsetPx:
|
|
4058
|
-
gapPx:
|
|
4059
|
-
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m =
|
|
3959
|
+
var Vi = 600, Hi = 24, Ui = 16, Wi = 300, Gi = 200, Ki = 0, qi = 1, Ji = Hi + Ui, Yi = 200, Xi = 500, Zi = 1e3;
|
|
3960
|
+
function Qi(e) {
|
|
3961
|
+
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Wi), o = ii({
|
|
3962
|
+
bucketPx: Vi,
|
|
3963
|
+
contentInsetPx: Hi,
|
|
3964
|
+
gapPx: Ui
|
|
3965
|
+
}), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Fi(), h = i(() => Math.max(Wi, a.value - Hi * 2)), g = i(() => or(h.value, Wi)), v = i(() => sr(h.value, g.value, Wi, Ui)), y = i(() => ki(e.bottomLoadBufferPx.value)), b = i(() => $i(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => pr({
|
|
4060
3966
|
itemCount: e.items.value.length,
|
|
4061
3967
|
viewportHeight: r.value,
|
|
4062
3968
|
scrollTop: n.value,
|
|
4063
|
-
overscanPx:
|
|
4064
|
-
bucketPx:
|
|
3969
|
+
overscanPx: Gi,
|
|
3970
|
+
bucketPx: Vi,
|
|
4065
3971
|
buckets: s.value
|
|
4066
3972
|
})), w = i(() => C.value.map((t) => ({
|
|
4067
3973
|
item: e.items.value[t],
|
|
4068
3974
|
index: t
|
|
4069
3975
|
}))), T = i(() => {
|
|
4070
|
-
let e = l.value +
|
|
4071
|
-
return Math.max(e, t, r.value) +
|
|
4072
|
-
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() =>
|
|
3976
|
+
let e = l.value + Hi * 2, t = I.reservedContentHeight.value ?? 0;
|
|
3977
|
+
return Math.max(e, t, r.value) + Yi + y.value;
|
|
3978
|
+
}), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Di({
|
|
4073
3979
|
active: e.active.value,
|
|
4074
|
-
maxScrollTop:
|
|
3980
|
+
maxScrollTop: X(),
|
|
4075
3981
|
progressDistancePx: n.value,
|
|
4076
|
-
thresholdPx:
|
|
3982
|
+
thresholdPx: Ki,
|
|
4077
3983
|
triggerEnabled: E.value
|
|
4078
|
-
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() =>
|
|
3984
|
+
})), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() => Ei({
|
|
4079
3985
|
active: e.active.value,
|
|
4080
|
-
maxScrollTop:
|
|
3986
|
+
maxScrollTop: X(),
|
|
4081
3987
|
progressDistancePx: n.value,
|
|
4082
|
-
thresholdPx:
|
|
3988
|
+
thresholdPx: Ji,
|
|
4083
3989
|
triggerEnabled: e.hasPreviousPage.value
|
|
4084
|
-
})), j =
|
|
3990
|
+
})), j = Oi({
|
|
4085
3991
|
containerHeight: T,
|
|
4086
3992
|
scrollTop: n,
|
|
4087
3993
|
viewportHeight: r
|
|
4088
|
-
}), M =
|
|
3994
|
+
}), M = gi({
|
|
4089
3995
|
items: e.items,
|
|
4090
3996
|
visibleIndices: C,
|
|
4091
3997
|
positions: f,
|
|
@@ -4094,44 +4000,44 @@ function aa(e) {
|
|
|
4094
4000
|
columnWidth: v,
|
|
4095
4001
|
scrollTop: n,
|
|
4096
4002
|
viewportHeight: r
|
|
4097
|
-
}), N =
|
|
4003
|
+
}), N = Pi({
|
|
4098
4004
|
direction: "top",
|
|
4099
4005
|
getAnimationLockMs(e) {
|
|
4100
|
-
return Math.max(
|
|
4006
|
+
return Math.max(Xi, fi(e)) + Zi;
|
|
4101
4007
|
},
|
|
4102
4008
|
hasPage: e.hasPreviousPage,
|
|
4103
4009
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4104
4010
|
isAtBoundary() {
|
|
4105
|
-
return n.value <=
|
|
4011
|
+
return n.value <= Ji;
|
|
4106
4012
|
},
|
|
4107
4013
|
loading: e.loading,
|
|
4108
4014
|
requestPage: e.requestPreviousPage
|
|
4109
|
-
}), P =
|
|
4015
|
+
}), P = Pi({
|
|
4110
4016
|
direction: "bottom",
|
|
4111
4017
|
getAnimationLockMs(e) {
|
|
4112
|
-
return
|
|
4018
|
+
return fi(e) + Zi;
|
|
4113
4019
|
},
|
|
4114
4020
|
hasPage: E,
|
|
4115
4021
|
interactionLocked: m.isBoundaryInteractionLocked,
|
|
4116
4022
|
isAtBoundary() {
|
|
4117
|
-
return
|
|
4023
|
+
return Y() <= qi;
|
|
4118
4024
|
},
|
|
4119
4025
|
loading: e.loading,
|
|
4120
4026
|
requestPage: e.requestNextPage
|
|
4121
|
-
}), F =
|
|
4027
|
+
}), F = Ti({
|
|
4122
4028
|
active: e.active,
|
|
4123
|
-
getMaxScrollTop:
|
|
4029
|
+
getMaxScrollTop: X,
|
|
4124
4030
|
getViewport: () => t.value,
|
|
4125
4031
|
onScroll: ee
|
|
4126
|
-
}), I =
|
|
4127
|
-
bucketPx:
|
|
4032
|
+
}), I = Bi({
|
|
4033
|
+
bucketPx: Vi,
|
|
4128
4034
|
columnHeights: c,
|
|
4129
4035
|
columnCount: g,
|
|
4130
4036
|
columnWidth: v,
|
|
4131
4037
|
commitPendingAppend: e.commitPendingAppend,
|
|
4132
4038
|
contentHeight: l,
|
|
4133
|
-
contentInsetPx:
|
|
4134
|
-
gapPx:
|
|
4039
|
+
contentInsetPx: Hi,
|
|
4040
|
+
gapPx: Ui,
|
|
4135
4041
|
items: e.items,
|
|
4136
4042
|
pendingAppendItems: e.pendingAppendItems
|
|
4137
4043
|
}), L = null, R = 0;
|
|
@@ -4140,20 +4046,20 @@ function aa(e) {
|
|
|
4140
4046
|
g,
|
|
4141
4047
|
v
|
|
4142
4048
|
], async ([t], [r = []]) => {
|
|
4143
|
-
let i =
|
|
4049
|
+
let i = Ii({
|
|
4144
4050
|
activeIndex: b.value,
|
|
4145
|
-
contentInsetPx:
|
|
4051
|
+
contentInsetPx: Hi,
|
|
4146
4052
|
currentItems: t,
|
|
4147
|
-
gapPx:
|
|
4053
|
+
gapPx: Ui,
|
|
4148
4054
|
layoutHeights: u.value,
|
|
4149
4055
|
layoutIndexById: d.value,
|
|
4150
4056
|
layoutPositions: f.value,
|
|
4151
4057
|
previousItems: r ?? [],
|
|
4152
4058
|
scrollTop: n.value
|
|
4153
4059
|
});
|
|
4154
|
-
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(
|
|
4060
|
+
i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(mi() + Zi), i.shouldResetScrollForEmptyRemoval && te();
|
|
4155
4061
|
let a = r ?? [];
|
|
4156
|
-
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ?
|
|
4062
|
+
o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ? Xi : void 0), i.anchorId ? (await _(), U(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && G();
|
|
4157
4063
|
}, { immediate: !0 }), z([
|
|
4158
4064
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
4159
4065
|
g,
|
|
@@ -4167,24 +4073,24 @@ function aa(e) {
|
|
|
4167
4073
|
}
|
|
4168
4074
|
if (F.start(), !a || i !== !1 || p.value == null) return;
|
|
4169
4075
|
await _();
|
|
4170
|
-
let o = Math.max(0, T.value - r.value), s =
|
|
4076
|
+
let o = Math.max(0, T.value - r.value), s = $i(p.value, 0, o);
|
|
4171
4077
|
a.scrollTop = s, n.value = s, N.syncBoundary(), P.syncBoundary();
|
|
4172
4078
|
}), z(() => e.loading.value, async (e) => {
|
|
4173
4079
|
I.clearReservedHeightWhenIdle(e), N.onLoadingChange(e), P.onLoadingChange(e), await _();
|
|
4174
4080
|
}), S(async () => {
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
}), t.value && L.observe(t.value)) : window.addEventListener("resize",
|
|
4081
|
+
q(), await _(), b.value > 0 ? H(b.value, "center") : W(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
|
|
4082
|
+
q();
|
|
4083
|
+
}), t.value && L.observe(t.value)) : window.addEventListener("resize", q);
|
|
4178
4084
|
}), x(() => {
|
|
4179
|
-
L?.disconnect(), L = null, window.removeEventListener("resize",
|
|
4085
|
+
L?.disconnect(), L = null, window.removeEventListener("resize", q), I.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), R &&= (cancelAnimationFrame(R), 0), F.stop();
|
|
4180
4086
|
});
|
|
4181
4087
|
function ee() {
|
|
4182
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value =
|
|
4183
|
-
R = 0,
|
|
4088
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = J(), N.syncBoundary("scroll"), P.syncBoundary("scroll"), K(), !G() && (R ||= requestAnimationFrame(() => {
|
|
4089
|
+
R = 0, W();
|
|
4184
4090
|
})));
|
|
4185
4091
|
}
|
|
4186
4092
|
function B(t) {
|
|
4187
|
-
e.active.value && (N.onWheel(t), P.onWheel(t),
|
|
4093
|
+
e.active.value && (N.onWheel(t), P.onWheel(t), K());
|
|
4188
4094
|
}
|
|
4189
4095
|
function V(t) {
|
|
4190
4096
|
let n = e.items.value[t], r = n ? $(n) : "";
|
|
@@ -4200,7 +4106,7 @@ function aa(e) {
|
|
|
4200
4106
|
let a = t.value, o = f.value[e], s = u.value[e];
|
|
4201
4107
|
if (!a || !o || !s) return;
|
|
4202
4108
|
let c = a.scrollTop, l = Math.max(0, T.value - r.value);
|
|
4203
|
-
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y -
|
|
4109
|
+
i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Hi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Hi), a.scrollTop = $i(c, 0, l), n.value = a.scrollTop, W();
|
|
4204
4110
|
}
|
|
4205
4111
|
function U(e, r) {
|
|
4206
4112
|
let i = t.value, a = r.get(e), o = d.value.get(e), s = o == null ? null : f.value[o];
|
|
@@ -4208,7 +4114,7 @@ function aa(e) {
|
|
|
4208
4114
|
let c = s.y - a.y;
|
|
4209
4115
|
i.scrollTop += c, n.value = i.scrollTop;
|
|
4210
4116
|
}
|
|
4211
|
-
function
|
|
4117
|
+
function te() {
|
|
4212
4118
|
let e = t.value;
|
|
4213
4119
|
if (!e) {
|
|
4214
4120
|
n.value = 0;
|
|
@@ -4216,8 +4122,8 @@ function aa(e) {
|
|
|
4216
4122
|
}
|
|
4217
4123
|
e.scrollTop = 0, n.value = 0, N.syncBoundary(), P.syncBoundary();
|
|
4218
4124
|
}
|
|
4219
|
-
function
|
|
4220
|
-
if (!C.value.length ||
|
|
4125
|
+
function W() {
|
|
4126
|
+
if (!C.value.length || G()) return;
|
|
4221
4127
|
let t = n.value + r.value / 2, i = b.value, a = Infinity;
|
|
4222
4128
|
for (let e of C.value) {
|
|
4223
4129
|
let n = f.value[e], r = u.value[e];
|
|
@@ -4227,26 +4133,26 @@ function aa(e) {
|
|
|
4227
4133
|
}
|
|
4228
4134
|
e.setActiveIndex(i);
|
|
4229
4135
|
}
|
|
4230
|
-
function
|
|
4231
|
-
let t = n.value <=
|
|
4136
|
+
function G() {
|
|
4137
|
+
let t = n.value <= Ji, r = Y() <= qi;
|
|
4232
4138
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
4233
4139
|
}
|
|
4234
|
-
function ne() {
|
|
4235
|
-
N.maybeRequestPage(), P.maybeRequestPage();
|
|
4236
|
-
}
|
|
4237
4140
|
function K() {
|
|
4238
|
-
|
|
4141
|
+
N.maybeRequestPage(), P.maybeRequestPage();
|
|
4239
4142
|
}
|
|
4240
4143
|
function q() {
|
|
4241
|
-
|
|
4242
|
-
}
|
|
4243
|
-
function re() {
|
|
4244
|
-
return Di(t.value, a.value, Zi);
|
|
4144
|
+
r.value = J(), a.value = ne();
|
|
4245
4145
|
}
|
|
4246
4146
|
function J() {
|
|
4247
|
-
return
|
|
4147
|
+
return yi(t.value, r.value);
|
|
4148
|
+
}
|
|
4149
|
+
function ne() {
|
|
4150
|
+
return bi(t.value, a.value, Wi);
|
|
4248
4151
|
}
|
|
4249
4152
|
function Y() {
|
|
4153
|
+
return xi(t.value, n.value, r.value, T.value);
|
|
4154
|
+
}
|
|
4155
|
+
function X() {
|
|
4250
4156
|
let e = Math.max(t.value?.scrollHeight ?? 0, T.value);
|
|
4251
4157
|
return Math.max(0, e - r.value);
|
|
4252
4158
|
}
|
|
@@ -4270,17 +4176,17 @@ function aa(e) {
|
|
|
4270
4176
|
scrollViewportRef: t
|
|
4271
4177
|
};
|
|
4272
4178
|
}
|
|
4273
|
-
function
|
|
4179
|
+
function $i(e, t, n) {
|
|
4274
4180
|
return Math.min(Math.max(e, t), n);
|
|
4275
4181
|
}
|
|
4276
4182
|
//#endregion
|
|
4277
4183
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
4278
|
-
function
|
|
4184
|
+
function ea(e) {
|
|
4279
4185
|
if (e) try {
|
|
4280
4186
|
e.removeAttribute("src"), e.src = "";
|
|
4281
4187
|
} catch {}
|
|
4282
4188
|
}
|
|
4283
|
-
function
|
|
4189
|
+
function ta(e) {
|
|
4284
4190
|
if (e) {
|
|
4285
4191
|
try {
|
|
4286
4192
|
e.currentTime = 0;
|
|
@@ -4291,12 +4197,12 @@ function ca(e) {
|
|
|
4291
4197
|
} catch {}
|
|
4292
4198
|
}
|
|
4293
4199
|
}
|
|
4294
|
-
function
|
|
4200
|
+
function na(e, t) {
|
|
4295
4201
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
4296
4202
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
4297
4203
|
return e.bottom > 0 && e.top < n;
|
|
4298
4204
|
}
|
|
4299
|
-
function
|
|
4205
|
+
function ra(e) {
|
|
4300
4206
|
if (!e) return null;
|
|
4301
4207
|
try {
|
|
4302
4208
|
return new URL(e, window.location.href).href;
|
|
@@ -4306,9 +4212,9 @@ function ua(e) {
|
|
|
4306
4212
|
}
|
|
4307
4213
|
//#endregion
|
|
4308
4214
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
4309
|
-
function
|
|
4215
|
+
function ia(e) {
|
|
4310
4216
|
let t = D(null), n = i(() => {
|
|
4311
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
4217
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? ra(e.item.value.healthCheck.url) : null;
|
|
4312
4218
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
4313
4219
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
4314
4220
|
z(n, (e, n) => {
|
|
@@ -4386,14 +4292,14 @@ function da(e) {
|
|
|
4386
4292
|
}
|
|
4387
4293
|
//#endregion
|
|
4388
4294
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
4389
|
-
var
|
|
4295
|
+
var aa = ["aria-label"], oa = {
|
|
4390
4296
|
key: 0,
|
|
4391
4297
|
"data-testid": "vibe-list-card-spinner",
|
|
4392
4298
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
4393
|
-
},
|
|
4299
|
+
}, sa = { 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]" }, ca = ["src", "alt"], la = ["src"], ua = ["data-kind"], da = { class: "grid justify-items-center gap-3 px-4 text-center" }, fa = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, pa = {
|
|
4394
4300
|
key: 4,
|
|
4395
4301
|
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))]"
|
|
4396
|
-
},
|
|
4302
|
+
}, ma = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, ha = { class: "pointer-events-none absolute inset-0 z-[3]" }, ga = /* @__PURE__ */ d({
|
|
4397
4303
|
__name: "ListCard",
|
|
4398
4304
|
props: {
|
|
4399
4305
|
active: {
|
|
@@ -4417,7 +4323,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4417
4323
|
},
|
|
4418
4324
|
emits: ["open"],
|
|
4419
4325
|
setup(e, { emit: t }) {
|
|
4420
|
-
let n = e, r = t, l = i(() =>
|
|
4326
|
+
let n = e, r = t, l = i(() => yr(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), j = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = ia({
|
|
4421
4327
|
attachedAssetUrl: E,
|
|
4422
4328
|
getPriority: ce,
|
|
4423
4329
|
isInView: d,
|
|
@@ -4431,39 +4337,39 @@ var fa = ["aria-label"], pa = {
|
|
|
4431
4337
|
let e = l.value.kind === "fallback";
|
|
4432
4338
|
m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
|
|
4433
4339
|
}), z(O, () => {
|
|
4434
|
-
|
|
4340
|
+
q();
|
|
4435
4341
|
}), z([
|
|
4436
4342
|
d,
|
|
4437
4343
|
m,
|
|
4438
4344
|
E
|
|
4439
4345
|
], () => {
|
|
4440
|
-
|
|
4346
|
+
J();
|
|
4441
4347
|
}), z(() => n.surfaceActive, (e) => {
|
|
4442
4348
|
if (!e) {
|
|
4443
|
-
|
|
4349
|
+
Y(), J();
|
|
4444
4350
|
return;
|
|
4445
4351
|
}
|
|
4446
4352
|
requestAnimationFrame(() => {
|
|
4447
|
-
|
|
4353
|
+
X(), q(), J();
|
|
4448
4354
|
});
|
|
4449
4355
|
}), S(() => {
|
|
4450
4356
|
if (!y.value || typeof IntersectionObserver > "u") {
|
|
4451
|
-
b.value = null, d.value = !0,
|
|
4357
|
+
b.value = null, d.value = !0, q();
|
|
4452
4358
|
return;
|
|
4453
4359
|
}
|
|
4454
4360
|
b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), B = new IntersectionObserver((e) => {
|
|
4455
|
-
for (let t of e) t.target === y.value && (n.surfaceActive &&
|
|
4361
|
+
for (let t of e) t.target === y.value && (n.surfaceActive && X(t), q(), J());
|
|
4456
4362
|
}, {
|
|
4457
4363
|
root: b.value,
|
|
4458
4364
|
threshold: [0, 1]
|
|
4459
4365
|
}), B.observe(y.value);
|
|
4460
4366
|
}), x(() => {
|
|
4461
|
-
|
|
4367
|
+
ne(), P.release(), B?.disconnect(), B = null;
|
|
4462
4368
|
});
|
|
4463
|
-
function
|
|
4464
|
-
le(_.value) && (m.value = !0, g.value = null,
|
|
4369
|
+
function te() {
|
|
4370
|
+
le(_.value) && (m.value = !0, g.value = null, re(E.value ?? n.item.url), Y());
|
|
4465
4371
|
}
|
|
4466
|
-
async function
|
|
4372
|
+
async function W() {
|
|
4467
4373
|
if (!le(_.value)) return;
|
|
4468
4374
|
let e = E.value ?? n.item.url;
|
|
4469
4375
|
m.value = !1, g.value = "generic";
|
|
@@ -4474,25 +4380,25 @@ var fa = ["aria-label"], pa = {
|
|
|
4474
4380
|
url: e,
|
|
4475
4381
|
kind: t,
|
|
4476
4382
|
surface: "grid"
|
|
4477
|
-
}),
|
|
4383
|
+
}), Y();
|
|
4478
4384
|
}
|
|
4479
|
-
function
|
|
4480
|
-
le(C.value) && (h.value = !0, m.value = !0, g.value = null,
|
|
4385
|
+
function G() {
|
|
4386
|
+
le(C.value) && (h.value = !0, m.value = !0, g.value = null, re(E.value ?? n.item.url), Y(), J());
|
|
4481
4387
|
}
|
|
4482
|
-
function
|
|
4388
|
+
function K() {
|
|
4483
4389
|
le(C.value) && (h.value || (m.value = !1));
|
|
4484
4390
|
}
|
|
4485
|
-
function
|
|
4391
|
+
function q() {
|
|
4486
4392
|
if (l.value.kind === "fallback") {
|
|
4487
|
-
|
|
4393
|
+
ne(!1);
|
|
4488
4394
|
return;
|
|
4489
4395
|
}
|
|
4490
4396
|
if (!n.surfaceActive) {
|
|
4491
|
-
|
|
4397
|
+
Y();
|
|
4492
4398
|
return;
|
|
4493
4399
|
}
|
|
4494
4400
|
if (!O.value) {
|
|
4495
|
-
|
|
4401
|
+
ne();
|
|
4496
4402
|
return;
|
|
4497
4403
|
}
|
|
4498
4404
|
if (T.value || V) {
|
|
@@ -4508,7 +4414,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4508
4414
|
url: l.value.url ?? n.item.url
|
|
4509
4415
|
});
|
|
4510
4416
|
}
|
|
4511
|
-
function
|
|
4417
|
+
function J() {
|
|
4512
4418
|
let e = C.value;
|
|
4513
4419
|
if (!(!e || l.value.kind !== "video")) {
|
|
4514
4420
|
if (I.value) {
|
|
@@ -4525,21 +4431,21 @@ var fa = ["aria-label"], pa = {
|
|
|
4525
4431
|
e.pause();
|
|
4526
4432
|
}
|
|
4527
4433
|
}
|
|
4528
|
-
function
|
|
4529
|
-
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (
|
|
4434
|
+
function ne(e = !0) {
|
|
4435
|
+
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (ae(), oe()), Y();
|
|
4530
4436
|
}
|
|
4531
|
-
function
|
|
4437
|
+
function Y() {
|
|
4532
4438
|
V?.release(), V = null;
|
|
4533
4439
|
}
|
|
4534
|
-
function
|
|
4440
|
+
function X(e) {
|
|
4535
4441
|
let t = y.value;
|
|
4536
4442
|
if (!t) {
|
|
4537
4443
|
d.value = !0;
|
|
4538
4444
|
return;
|
|
4539
4445
|
}
|
|
4540
|
-
d.value =
|
|
4446
|
+
d.value = na(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
4541
4447
|
}
|
|
4542
|
-
function
|
|
4448
|
+
function re(e) {
|
|
4543
4449
|
if (!e) return;
|
|
4544
4450
|
let t = $(n.item), r = `${t}|${e}`;
|
|
4545
4451
|
U.has(r) || (U.add(r), n.reportAssetLoad?.({
|
|
@@ -4549,18 +4455,18 @@ var fa = ["aria-label"], pa = {
|
|
|
4549
4455
|
url: e
|
|
4550
4456
|
}));
|
|
4551
4457
|
}
|
|
4552
|
-
function
|
|
4458
|
+
function ie() {
|
|
4553
4459
|
if (!R.value || P.retry()) return;
|
|
4554
4460
|
let e = $(n.item);
|
|
4555
4461
|
U.forEach((t) => {
|
|
4556
4462
|
t.startsWith(`${e}|`) && U.delete(t);
|
|
4557
|
-
}), g.value = null, m.value = !1, T.value = !1,
|
|
4463
|
+
}), g.value = null, m.value = !1, T.value = !1, Y(), q();
|
|
4558
4464
|
}
|
|
4559
|
-
function
|
|
4560
|
-
|
|
4465
|
+
function ae() {
|
|
4466
|
+
ea(_.value);
|
|
4561
4467
|
}
|
|
4562
|
-
function
|
|
4563
|
-
|
|
4468
|
+
function oe() {
|
|
4469
|
+
ta(C.value);
|
|
4564
4470
|
}
|
|
4565
4471
|
function ce() {
|
|
4566
4472
|
let e = y.value;
|
|
@@ -4574,8 +4480,8 @@ var fa = ["aria-label"], pa = {
|
|
|
4574
4480
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
4575
4481
|
}
|
|
4576
4482
|
function le(e) {
|
|
4577
|
-
let t =
|
|
4578
|
-
return !e || !t ? !1 :
|
|
4483
|
+
let t = ra(E.value);
|
|
4484
|
+
return !e || !t ? !1 : ra("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
4579
4485
|
}
|
|
4580
4486
|
function ue() {
|
|
4581
4487
|
r("open");
|
|
@@ -4603,8 +4509,8 @@ var fa = ["aria-label"], pa = {
|
|
|
4603
4509
|
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]",
|
|
4604
4510
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
4605
4511
|
onClick: ue
|
|
4606
|
-
}, null, 8,
|
|
4607
|
-
ee.value ? (w(), s("div",
|
|
4512
|
+
}, null, 8, aa),
|
|
4513
|
+
ee.value ? (w(), s("div", oa, [c("span", sa, [u(F(se), {
|
|
4608
4514
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
4609
4515
|
"aria-hidden": "true"
|
|
4610
4516
|
})])])) : o("", !0),
|
|
@@ -4616,9 +4522,9 @@ var fa = ["aria-label"], pa = {
|
|
|
4616
4522
|
alt: l.value.label,
|
|
4617
4523
|
draggable: "false",
|
|
4618
4524
|
class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
4619
|
-
onLoad:
|
|
4620
|
-
onError:
|
|
4621
|
-
}, null, 42,
|
|
4525
|
+
onLoad: te,
|
|
4526
|
+
onError: W
|
|
4527
|
+
}, null, 42, ca)) : N.value && E.value && !L.value ? (w(), s("video", {
|
|
4622
4528
|
key: 2,
|
|
4623
4529
|
ref_key: "videoRef",
|
|
4624
4530
|
ref: C,
|
|
@@ -4628,37 +4534,37 @@ var fa = ["aria-label"], pa = {
|
|
|
4628
4534
|
playsinline: "",
|
|
4629
4535
|
preload: "metadata",
|
|
4630
4536
|
class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
4631
|
-
onCanplay:
|
|
4632
|
-
onError:
|
|
4633
|
-
onLoadstart:
|
|
4634
|
-
onPlaying:
|
|
4635
|
-
onStalled:
|
|
4636
|
-
onWaiting:
|
|
4637
|
-
}, null, 42,
|
|
4537
|
+
onCanplay: G,
|
|
4538
|
+
onError: W,
|
|
4539
|
+
onLoadstart: K,
|
|
4540
|
+
onPlaying: G,
|
|
4541
|
+
onStalled: K,
|
|
4542
|
+
onWaiting: K
|
|
4543
|
+
}, null, 42, la)) : L.value ? (w(), s("div", {
|
|
4638
4544
|
key: 3,
|
|
4639
4545
|
"data-testid": "vibe-list-card-error",
|
|
4640
4546
|
"data-kind": I.value,
|
|
4641
4547
|
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))]"
|
|
4642
|
-
}, [c("div",
|
|
4548
|
+
}, [c("div", da, [
|
|
4643
4549
|
u(F(de), {
|
|
4644
4550
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4645
4551
|
"aria-hidden": "true"
|
|
4646
4552
|
}),
|
|
4647
|
-
c("span",
|
|
4553
|
+
c("span", fa, M(F(yn)(I.value)), 1),
|
|
4648
4554
|
R.value ? (w(), s("button", {
|
|
4649
4555
|
key: 0,
|
|
4650
4556
|
type: "button",
|
|
4651
4557
|
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",
|
|
4652
|
-
onClick: H(
|
|
4558
|
+
onClick: H(ie, ["stop"])
|
|
4653
4559
|
}, " Retry ")) : o("", !0)
|
|
4654
|
-
])], 8,
|
|
4560
|
+
])], 8, ua)) : (w(), s("div", pa, [c("div", ma, [k(e.$slots, "item-icon", {
|
|
4655
4561
|
icon: F(Gt)(n.item.type),
|
|
4656
4562
|
item: n.item
|
|
4657
4563
|
}, () => [(w(), a(A(F(Gt)(n.item.type)), {
|
|
4658
4564
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
4659
4565
|
"aria-hidden": "true"
|
|
4660
4566
|
}))])])])),
|
|
4661
|
-
c("div",
|
|
4567
|
+
c("div", ha, [k(e.$slots, "grid-item-overlay", {
|
|
4662
4568
|
active: n.active,
|
|
4663
4569
|
focused: f.value,
|
|
4664
4570
|
hovered: p.value,
|
|
@@ -4668,24 +4574,24 @@ var fa = ["aria-label"], pa = {
|
|
|
4668
4574
|
})])
|
|
4669
4575
|
], 34));
|
|
4670
4576
|
}
|
|
4671
|
-
}),
|
|
4577
|
+
}), _a = { 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)]" }, va = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, ya = {
|
|
4672
4578
|
"data-testid": "vibe-pagination",
|
|
4673
4579
|
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]"
|
|
4674
|
-
},
|
|
4580
|
+
}, ba = { class: "whitespace-nowrap" }, xa = {
|
|
4675
4581
|
key: 0,
|
|
4676
4582
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
4677
|
-
},
|
|
4583
|
+
}, Sa = [
|
|
4678
4584
|
"data-active",
|
|
4679
4585
|
"data-index",
|
|
4680
4586
|
"data-item-id",
|
|
4681
4587
|
"data-occurrence-key"
|
|
4682
|
-
],
|
|
4588
|
+
], Ca = ["data-item-id"], wa = {
|
|
4683
4589
|
key: 0,
|
|
4684
4590
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
4685
|
-
},
|
|
4591
|
+
}, Ta = {
|
|
4686
4592
|
key: 1,
|
|
4687
4593
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
4688
|
-
},
|
|
4594
|
+
}, Ea = { class: "mx-auto flex w-full justify-center" }, Da = /* @__PURE__ */ d({
|
|
4689
4595
|
__name: "ListSurface",
|
|
4690
4596
|
props: {
|
|
4691
4597
|
active: {
|
|
@@ -4747,7 +4653,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4747
4653
|
"update:activeIndex"
|
|
4748
4654
|
],
|
|
4749
4655
|
setup(e, { expose: n, emit: r }) {
|
|
4750
|
-
let d = e, f = L(), p = r, m =
|
|
4656
|
+
let d = e, f = L(), p = r, m = Qi({
|
|
4751
4657
|
active: N(d, "active"),
|
|
4752
4658
|
allowExhaustedNextPageRefresh: N(d, "allowExhaustedNextPageRefresh"),
|
|
4753
4659
|
bottomLoadBufferPx: N(d, "bottomLoadBufferPx"),
|
|
@@ -4795,8 +4701,8 @@ var fa = ["aria-label"], pa = {
|
|
|
4795
4701
|
nextBoundaryLoadProgress: e,
|
|
4796
4702
|
previousBoundaryLoadProgress: t
|
|
4797
4703
|
});
|
|
4798
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
4799
|
-
c("div",
|
|
4704
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", _a, [
|
|
4705
|
+
c("div", va, [c("span", ya, [c("span", ba, M(F(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", xa, M(d.paginationDetail), 1)) : o("", !0)])]),
|
|
4800
4706
|
c("div", {
|
|
4801
4707
|
ref: F(m).scrollViewportRef,
|
|
4802
4708
|
"data-testid": "vibe-list-scroll",
|
|
@@ -4817,7 +4723,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4817
4723
|
"data-occurrence-key": F($)(t),
|
|
4818
4724
|
class: "absolute will-change-transform",
|
|
4819
4725
|
style: b(F(m).getCardStyle(n))
|
|
4820
|
-
}, [u(
|
|
4726
|
+
}, [u(ga, {
|
|
4821
4727
|
active: n === F(m).resolvedActiveIndex.value,
|
|
4822
4728
|
index: n,
|
|
4823
4729
|
item: t,
|
|
@@ -4841,14 +4747,14 @@ var fa = ["aria-label"], pa = {
|
|
|
4841
4747
|
"report-asset-load",
|
|
4842
4748
|
"surface-active",
|
|
4843
4749
|
"onOpen"
|
|
4844
|
-
])], 12,
|
|
4750
|
+
])], 12, Sa))), 128)),
|
|
4845
4751
|
(w(!0), s(t, null, O(F(m).leavingItems.value, (t) => (w(), s("article", {
|
|
4846
4752
|
key: `leaving-${F($)(t.item)}`,
|
|
4847
4753
|
"data-testid": "vibe-list-card-leaving",
|
|
4848
4754
|
"data-item-id": t.item.id,
|
|
4849
4755
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
4850
4756
|
style: b(F(m).getLeavingCardStyle(t.item))
|
|
4851
|
-
}, [u(
|
|
4757
|
+
}, [u(ga, {
|
|
4852
4758
|
active: !1,
|
|
4853
4759
|
index: -1,
|
|
4854
4760
|
item: t.item,
|
|
@@ -4863,8 +4769,8 @@ var fa = ["aria-label"], pa = {
|
|
|
4863
4769
|
"item",
|
|
4864
4770
|
"report-asset-error",
|
|
4865
4771
|
"report-asset-load"
|
|
4866
|
-
])], 12,
|
|
4867
|
-
F(j) && F(E) ? (w(), a(
|
|
4772
|
+
])], 12, Ca))), 128)),
|
|
4773
|
+
F(j) && F(E) ? (w(), a(nr, {
|
|
4868
4774
|
key: 0,
|
|
4869
4775
|
message: F(E).message,
|
|
4870
4776
|
mode: F(E).mode,
|
|
@@ -4878,12 +4784,12 @@ var fa = ["aria-label"], pa = {
|
|
|
4878
4784
|
"surface"
|
|
4879
4785
|
])) : o("", !0)
|
|
4880
4786
|
], 4)], 544),
|
|
4881
|
-
F(m).showScrollbar.value ? (w(), s("div",
|
|
4787
|
+
F(m).showScrollbar.value ? (w(), s("div", wa, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
4882
4788
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
4883
4789
|
class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", d.loading ? "bg-white/52" : "bg-white/34"]),
|
|
4884
4790
|
style: b(F(m).getScrollbarThumbStyle())
|
|
4885
4791
|
}, null, 6)])) : o("", !0),
|
|
4886
|
-
f["grid-footer"] ? (w(), s("div",
|
|
4792
|
+
f["grid-footer"] ? (w(), s("div", Ta, [c("div", Ea, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
4887
4793
|
x.value ? (w(), s("div", {
|
|
4888
4794
|
key: 2,
|
|
4889
4795
|
class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", f["grid-footer"] ? "pb-24" : "pb-6"])
|
|
@@ -4892,7 +4798,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4892
4798
|
"data-testid": "vibe-grid-status-badge",
|
|
4893
4799
|
class: v(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", x.value.kind === "end" ? "border-amber-300/35 text-amber-200" : x.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
4894
4800
|
}, M(x.value.message), 3))], 2)) : o("", !0),
|
|
4895
|
-
F(D) && F(E) ? (w(), a(
|
|
4801
|
+
F(D) && F(E) ? (w(), a(nr, {
|
|
4896
4802
|
key: 3,
|
|
4897
4803
|
class: v(["z-[3]", f["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
4898
4804
|
message: F(E).message,
|
|
@@ -4909,13 +4815,13 @@ var fa = ["aria-label"], pa = {
|
|
|
4909
4815
|
])) : o("", !0)
|
|
4910
4816
|
]));
|
|
4911
4817
|
}
|
|
4912
|
-
}),
|
|
4818
|
+
}), Oa = ["data-surface-mode"], ka = {
|
|
4913
4819
|
key: 1,
|
|
4914
4820
|
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"
|
|
4915
|
-
},
|
|
4821
|
+
}, Aa = ["data-visible", "inert"], ja = ["data-visible", "inert"], Ma = {
|
|
4916
4822
|
key: 3,
|
|
4917
4823
|
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"
|
|
4918
|
-
},
|
|
4824
|
+
}, Na = /* @__PURE__ */ d({
|
|
4919
4825
|
name: "VibeLayout",
|
|
4920
4826
|
__name: "Layout",
|
|
4921
4827
|
props: {
|
|
@@ -4983,7 +4889,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4983
4889
|
type: "button",
|
|
4984
4890
|
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",
|
|
4985
4891
|
onClick: n[0] ||= (...e) => F(h).retryInitialLoad && F(h).retryInitialLoad(...e)
|
|
4986
|
-
}, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div",
|
|
4892
|
+
}, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div", ka, M(F(h).errorMessage.value), 1)) : o("", !0), F(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
|
|
4987
4893
|
appear: "",
|
|
4988
4894
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4989
4895
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4997,7 +4903,7 @@ var fa = ["aria-label"], pa = {
|
|
|
4997
4903
|
"data-visible": F(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4998
4904
|
inert: F(h).surfaceMode.value !== "list",
|
|
4999
4905
|
class: "absolute inset-0 z-[2]"
|
|
5000
|
-
}, [u(
|
|
4906
|
+
}, [u(Da, {
|
|
5001
4907
|
ref_key: "listSurfaceRef",
|
|
5002
4908
|
ref: g,
|
|
5003
4909
|
active: F(h).surfaceMode.value === "list",
|
|
@@ -5071,7 +4977,7 @@ var fa = ["aria-label"], pa = {
|
|
|
5071
4977
|
"onBoundaryLoadProgress",
|
|
5072
4978
|
"onOpenFullscreen",
|
|
5073
4979
|
"onUpdate:activeIndex"
|
|
5074
|
-
])], 8,
|
|
4980
|
+
])], 8, Aa), [[R, F(h).surfaceMode.value === "list"]])]),
|
|
5075
4981
|
_: 3
|
|
5076
4982
|
}), u(r, {
|
|
5077
4983
|
appear: "",
|
|
@@ -5087,7 +4993,7 @@ var fa = ["aria-label"], pa = {
|
|
|
5087
4993
|
"data-visible": F(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
5088
4994
|
inert: F(h).surfaceMode.value !== "fullscreen",
|
|
5089
4995
|
class: "absolute inset-0 z-[3]"
|
|
5090
|
-
}, [u(
|
|
4996
|
+
}, [u(ri, {
|
|
5091
4997
|
items: F(h).items.value,
|
|
5092
4998
|
active: F(h).surfaceMode.value === "fullscreen",
|
|
5093
4999
|
"active-index": F(h).activeIndex.value,
|
|
@@ -5145,12 +5051,12 @@ var fa = ["aria-label"], pa = {
|
|
|
5145
5051
|
fn: B((t) => [k(e.$slots, "item-icon", y(p(t)))]),
|
|
5146
5052
|
key: "5"
|
|
5147
5053
|
} : void 0
|
|
5148
|
-
]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8,
|
|
5054
|
+
]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8, ja), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
|
|
5149
5055
|
_: 3
|
|
5150
|
-
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div",
|
|
5056
|
+
})], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div", Ma, [u(F(se), {
|
|
5151
5057
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
5152
5058
|
"aria-hidden": "true"
|
|
5153
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(
|
|
5059
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(ri, {
|
|
5154
5060
|
key: 4,
|
|
5155
5061
|
items: F(h).items.value,
|
|
5156
5062
|
active: !0,
|
|
@@ -5234,10 +5140,10 @@ var fa = ["aria-label"], pa = {
|
|
|
5234
5140
|
"show-status-badges",
|
|
5235
5141
|
"onBackToList",
|
|
5236
5142
|
"onUpdate:activeIndex"
|
|
5237
|
-
]))], 8,
|
|
5143
|
+
]))], 8, Oa));
|
|
5238
5144
|
}
|
|
5239
|
-
}),
|
|
5240
|
-
e.component("VibeLayout",
|
|
5145
|
+
}), Pa = { install(e) {
|
|
5146
|
+
e.component("VibeLayout", Na);
|
|
5241
5147
|
} };
|
|
5242
5148
|
//#endregion
|
|
5243
|
-
export {
|
|
5149
|
+
export { Na as VibeLayout, Pa as VibePlugin, Pa as default };
|