@wyxos/vibe 3.1.11 → 3.1.13
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/virtualization.d.ts +7 -3
- package/lib/index.cjs +1 -1
- package/lib/index.js +275 -277
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1253,17 +1253,20 @@ function Pt(e) {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
//#endregion
|
|
1255
1255
|
//#region src/components/viewer-core/useFullscreenPreloadController.ts
|
|
1256
|
-
var Ft =
|
|
1256
|
+
var Ft = [
|
|
1257
|
+
1,
|
|
1258
|
+
2,
|
|
1259
|
+
3
|
|
1260
|
+
], It = {
|
|
1257
1261
|
1: 0,
|
|
1258
1262
|
2: 1,
|
|
1259
|
-
3: 2
|
|
1260
|
-
[-1]: 3
|
|
1263
|
+
3: 2
|
|
1261
1264
|
};
|
|
1262
1265
|
function Lt(e) {
|
|
1263
1266
|
let t = D({}), n = jt({
|
|
1264
|
-
maxGlobal:
|
|
1265
|
-
maxPerDomain:
|
|
1266
|
-
maxVideoPerDomain:
|
|
1267
|
+
maxGlobal: 2,
|
|
1268
|
+
maxPerDomain: 2,
|
|
1269
|
+
maxVideoPerDomain: 2
|
|
1267
1270
|
}), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
|
|
1268
1271
|
L([
|
|
1269
1272
|
e.active,
|
|
@@ -1301,7 +1304,7 @@ function Lt(e) {
|
|
|
1301
1304
|
}
|
|
1302
1305
|
function d() {
|
|
1303
1306
|
for (let e of r.values()) e.lease.release();
|
|
1304
|
-
r.clear(), t.value = {},
|
|
1307
|
+
r.clear(), t.value = {}, v();
|
|
1305
1308
|
}
|
|
1306
1309
|
function p() {
|
|
1307
1310
|
if (!e.active.value) {
|
|
@@ -1309,8 +1312,8 @@ function Lt(e) {
|
|
|
1309
1312
|
return;
|
|
1310
1313
|
}
|
|
1311
1314
|
let s = m(), c = new Set(s.map((e) => e.key)), l = h();
|
|
1312
|
-
for (let e of o) e !== l && c.has(e) &&
|
|
1313
|
-
for (let e of Object.keys(t.value)) c.has(e) ||
|
|
1315
|
+
for (let e of o) e !== l && c.has(e) && y(e, !0);
|
|
1316
|
+
for (let e of Object.keys(t.value)) c.has(e) || y(e, !1);
|
|
1314
1317
|
for (let [e, t] of r.entries()) {
|
|
1315
1318
|
if (!c.has(e)) {
|
|
1316
1319
|
t.lease.release(), r.delete(e);
|
|
@@ -1329,37 +1332,18 @@ function Lt(e) {
|
|
|
1329
1332
|
assetType: e.item.type === "image" ? "image" : "video",
|
|
1330
1333
|
getPriority: () => g(o.index),
|
|
1331
1334
|
onGrant: () => {
|
|
1332
|
-
|
|
1335
|
+
y(e.key, !0), Rt(e.key, i, a) && u(e.key);
|
|
1333
1336
|
},
|
|
1334
1337
|
url: e.item.url
|
|
1335
1338
|
})
|
|
1336
1339
|
}, r.set(e.key, o);
|
|
1337
1340
|
}
|
|
1338
1341
|
for (let e of r.values()) e.lease.refresh();
|
|
1339
|
-
|
|
1342
|
+
v();
|
|
1340
1343
|
}
|
|
1341
1344
|
function m() {
|
|
1342
|
-
let
|
|
1343
|
-
|
|
1344
|
-
item: t,
|
|
1345
|
-
key: e.getItemKey(t)
|
|
1346
|
-
} : null).filter((e) => !!e), a = new Map(i.map((e) => [e.key, e])), o = /* @__PURE__ */ new Set(), s = [], c = (e) => {
|
|
1347
|
-
!e || o.has(e.key) || (o.add(e.key), s.push(e));
|
|
1348
|
-
}, l = /* @__PURE__ */ new Map();
|
|
1349
|
-
for (let e of Object.keys(t.value)) {
|
|
1350
|
-
let t = a.get(e);
|
|
1351
|
-
t && t.index > n && l.set(e, t);
|
|
1352
|
-
}
|
|
1353
|
-
for (let e of r.values()) {
|
|
1354
|
-
if (e.index <= n) continue;
|
|
1355
|
-
let t = a.get(e.key);
|
|
1356
|
-
t && l.set(e.key, t);
|
|
1357
|
-
}
|
|
1358
|
-
let u = [...l.values()].sort((e, t) => e.index - t.index);
|
|
1359
|
-
for (let e of u) c(e);
|
|
1360
|
-
let d = u.reduce((e, t) => Math.max(e, t.index), n), f = 0;
|
|
1361
|
-
for (let e of i) if (!(e.index <= d || o.has(e.key)) && (c(e), f += 1, f >= Ft)) break;
|
|
1362
|
-
return c(i.find((e) => e.index === n - 1)), s;
|
|
1345
|
+
let t = e.resolvedActiveIndex.value;
|
|
1346
|
+
return Ft.map((e) => _(t + e)).filter((e) => !!e);
|
|
1363
1347
|
}
|
|
1364
1348
|
function h() {
|
|
1365
1349
|
let t = e.items.value[e.resolvedActiveIndex.value];
|
|
@@ -1368,14 +1352,22 @@ function Lt(e) {
|
|
|
1368
1352
|
function g(t) {
|
|
1369
1353
|
return e.active.value ? It[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
|
|
1370
1354
|
}
|
|
1371
|
-
function _() {
|
|
1355
|
+
function _(t) {
|
|
1356
|
+
let n = e.items.value[t];
|
|
1357
|
+
return !n || !Vt(n) ? null : {
|
|
1358
|
+
index: t,
|
|
1359
|
+
item: n,
|
|
1360
|
+
key: e.getItemKey(n)
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
function v() {
|
|
1372
1364
|
let n = /* @__PURE__ */ new Set(), r = h();
|
|
1373
1365
|
r && n.add(r);
|
|
1374
1366
|
for (let e of Object.keys(t.value)) n.add(e);
|
|
1375
|
-
for (let t of o) n.has(t) || (
|
|
1367
|
+
for (let t of o) n.has(t) || (b(t), e.onResetAssetState(t));
|
|
1376
1368
|
o = n;
|
|
1377
1369
|
}
|
|
1378
|
-
function
|
|
1370
|
+
function y(e, n) {
|
|
1379
1371
|
if (n) {
|
|
1380
1372
|
if (t.value[e]) return;
|
|
1381
1373
|
t.value = {
|
|
@@ -1388,7 +1380,7 @@ function Lt(e) {
|
|
|
1388
1380
|
let r = { ...t.value };
|
|
1389
1381
|
delete r[e], t.value = r;
|
|
1390
1382
|
}
|
|
1391
|
-
function
|
|
1383
|
+
function b(e) {
|
|
1392
1384
|
let t = i.get(e);
|
|
1393
1385
|
if (t) try {
|
|
1394
1386
|
t.removeAttribute("src"), t.src = "";
|
|
@@ -1895,23 +1887,29 @@ function dn(e) {
|
|
|
1895
1887
|
function fn(e, t, n) {
|
|
1896
1888
|
return Math.min(Math.max(e, t), n);
|
|
1897
1889
|
}
|
|
1898
|
-
|
|
1890
|
+
//#endregion
|
|
1891
|
+
//#region src/components/viewer-core/virtualization.ts
|
|
1892
|
+
var pn = {
|
|
1893
|
+
backward: 1,
|
|
1894
|
+
forward: 3
|
|
1895
|
+
};
|
|
1896
|
+
function mn(e, t, n = pn) {
|
|
1899
1897
|
return t <= 0 ? {
|
|
1900
1898
|
start: 0,
|
|
1901
1899
|
end: -1
|
|
1902
1900
|
} : {
|
|
1903
|
-
start: Math.max(0, e - n),
|
|
1904
|
-
end: Math.min(t - 1, e + n)
|
|
1901
|
+
start: Math.max(0, e - n.backward),
|
|
1902
|
+
end: Math.min(t - 1, e + n.forward)
|
|
1905
1903
|
};
|
|
1906
1904
|
}
|
|
1907
|
-
function
|
|
1908
|
-
let r =
|
|
1905
|
+
function hn(e, t, n = pn) {
|
|
1906
|
+
let r = mn(t, e.length, n);
|
|
1909
1907
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
1910
1908
|
item: e,
|
|
1911
1909
|
index: r.start + t
|
|
1912
1910
|
}));
|
|
1913
1911
|
}
|
|
1914
|
-
function
|
|
1912
|
+
function gn(e, t, n, r, i) {
|
|
1915
1913
|
return {
|
|
1916
1914
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
1917
1915
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -1919,7 +1917,7 @@ function hn(e, t, n, r, i) {
|
|
|
1919
1917
|
}
|
|
1920
1918
|
//#endregion
|
|
1921
1919
|
//#region src/components/viewer-core/useViewer.ts
|
|
1922
|
-
function
|
|
1920
|
+
function _n(e, t, n = {}) {
|
|
1923
1921
|
let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => Jt({
|
|
1924
1922
|
itemCount: r.value.length,
|
|
1925
1923
|
loading: s.value,
|
|
@@ -1939,7 +1937,7 @@ function gn(e, t, n = {}) {
|
|
|
1939
1937
|
hasNextPage: c.value,
|
|
1940
1938
|
phase: d.value,
|
|
1941
1939
|
surface: "fullscreen"
|
|
1942
|
-
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() =>
|
|
1940
|
+
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => mn(S.value, r.value.length)), N = i(() => hn(r.value, S.value));
|
|
1943
1941
|
Xt({
|
|
1944
1942
|
enabled: _,
|
|
1945
1943
|
onDisable() {
|
|
@@ -2018,7 +2016,7 @@ function gn(e, t, n = {}) {
|
|
|
2018
2016
|
return e.type === "audio";
|
|
2019
2017
|
}
|
|
2020
2018
|
function ie(e) {
|
|
2021
|
-
return
|
|
2019
|
+
return gn(e, S.value, g.value, m.value, h.value);
|
|
2022
2020
|
}
|
|
2023
2021
|
return {
|
|
2024
2022
|
activeItem: C,
|
|
@@ -2077,21 +2075,21 @@ function gn(e, t, n = {}) {
|
|
|
2077
2075
|
}
|
|
2078
2076
|
//#endregion
|
|
2079
2077
|
//#region src/components/viewer-core/theme.ts
|
|
2080
|
-
var
|
|
2078
|
+
var vn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", yn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", bn = {
|
|
2081
2079
|
image: !0,
|
|
2082
2080
|
video: !0,
|
|
2083
2081
|
audio: !0,
|
|
2084
2082
|
other: !0
|
|
2085
2083
|
};
|
|
2086
|
-
function bn(e) {
|
|
2087
|
-
return yn[e], _n;
|
|
2088
|
-
}
|
|
2089
2084
|
function xn(e) {
|
|
2090
|
-
return
|
|
2085
|
+
return bn[e], vn;
|
|
2086
|
+
}
|
|
2087
|
+
function Sn(e) {
|
|
2088
|
+
return bn[e], yn;
|
|
2091
2089
|
}
|
|
2092
2090
|
//#endregion
|
|
2093
2091
|
//#region src/components/viewer-core/dominantImageTone.ts
|
|
2094
|
-
function
|
|
2092
|
+
function Cn(e) {
|
|
2095
2093
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
|
|
2096
2094
|
let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
|
|
2097
2095
|
if (!n) return null;
|
|
@@ -2106,20 +2104,20 @@ function Sn(e) {
|
|
|
2106
2104
|
r += d, i += s * d, a += c * d, o += l * d;
|
|
2107
2105
|
}
|
|
2108
2106
|
return r <= 0 ? null : {
|
|
2109
|
-
r:
|
|
2110
|
-
g:
|
|
2111
|
-
b:
|
|
2107
|
+
r: wn(Math.round(i / r)),
|
|
2108
|
+
g: wn(Math.round(a / r)),
|
|
2109
|
+
b: wn(Math.round(o / r))
|
|
2112
2110
|
};
|
|
2113
2111
|
} catch {
|
|
2114
2112
|
return null;
|
|
2115
2113
|
}
|
|
2116
2114
|
}
|
|
2117
|
-
function
|
|
2115
|
+
function wn(e) {
|
|
2118
2116
|
return Math.min(235, Math.max(26, e));
|
|
2119
2117
|
}
|
|
2120
2118
|
//#endregion
|
|
2121
2119
|
//#region src/components/viewer-core/useFullscreenDominantTone.ts
|
|
2122
|
-
function
|
|
2120
|
+
function Tn(e) {
|
|
2123
2121
|
let t = D({}), n = i(() => e.activeItem.value ? e.getItemKey(e.activeItem.value) : null), r = i(() => !e.showDominantImageTone.value || e.activeItem.value?.type !== "image" || !n.value || !e.isImageReady(n.value) ? null : t.value[n.value] ?? null), a = i(() => {
|
|
2124
2122
|
if (!r.value) return;
|
|
2125
2123
|
let { r: e, g: t, b: n } = r.value;
|
|
@@ -2134,7 +2132,7 @@ function wn(e) {
|
|
|
2134
2132
|
});
|
|
2135
2133
|
function s(n, r) {
|
|
2136
2134
|
if (!e.showDominantImageTone.value) return;
|
|
2137
|
-
let i =
|
|
2135
|
+
let i = Cn(r);
|
|
2138
2136
|
i && (t.value[n] = i);
|
|
2139
2137
|
}
|
|
2140
2138
|
return {
|
|
@@ -2145,7 +2143,7 @@ function wn(e) {
|
|
|
2145
2143
|
}
|
|
2146
2144
|
//#endregion
|
|
2147
2145
|
//#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
2148
|
-
var
|
|
2146
|
+
var En = ["data-surface"], Dn = ["data-surface"], On = /* @__PURE__ */ d({
|
|
2149
2147
|
inheritAttrs: !1,
|
|
2150
2148
|
__name: "SurfaceEmptyState",
|
|
2151
2149
|
props: {
|
|
@@ -2159,31 +2157,31 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2159
2157
|
"data-testid": "vibe-empty-state-inline",
|
|
2160
2158
|
"data-surface": e.surface,
|
|
2161
2159
|
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)]"]
|
|
2162
|
-
}), [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"]) }, j(e.message), 3)])], 16,
|
|
2160
|
+
}), [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"]) }, j(e.message), 3)])], 16, En)) : (w(), s("div", g({ key: 1 }, N(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", {
|
|
2163
2161
|
"data-testid": "vibe-empty-state-badge",
|
|
2164
2162
|
"data-surface": e.surface,
|
|
2165
2163
|
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"])
|
|
2166
|
-
}, j(e.message), 11,
|
|
2164
|
+
}, j(e.message), 11, Dn)])], 16));
|
|
2167
2165
|
}
|
|
2168
|
-
}),
|
|
2166
|
+
}), kn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, An = {
|
|
2169
2167
|
key: 0,
|
|
2170
2168
|
class: "relative h-full min-h-0"
|
|
2171
|
-
},
|
|
2169
|
+
}, jn = [
|
|
2172
2170
|
"data-item-id",
|
|
2173
2171
|
"data-occurrence-key",
|
|
2174
2172
|
"data-index",
|
|
2175
2173
|
"data-active",
|
|
2176
2174
|
"aria-hidden"
|
|
2177
|
-
],
|
|
2175
|
+
], Mn = {
|
|
2178
2176
|
key: 0,
|
|
2179
2177
|
"data-testid": "vibe-asset-spinner",
|
|
2180
2178
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
2181
|
-
},
|
|
2179
|
+
}, Nn = { 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]" }, Pn = ["data-kind"], Fn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, In = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Ln = ["onClick"], Rn = [
|
|
2182
2180
|
"src",
|
|
2183
2181
|
"alt",
|
|
2184
2182
|
"onLoad",
|
|
2185
2183
|
"onError"
|
|
2186
|
-
],
|
|
2184
|
+
], zn = [
|
|
2187
2185
|
"loop",
|
|
2188
2186
|
"src",
|
|
2189
2187
|
"preload",
|
|
@@ -2202,15 +2200,15 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2202
2200
|
"onStalled",
|
|
2203
2201
|
"onTimeupdate",
|
|
2204
2202
|
"onWaiting"
|
|
2205
|
-
],
|
|
2203
|
+
], Bn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Vn = [
|
|
2206
2204
|
"aria-label",
|
|
2207
2205
|
"disabled",
|
|
2208
2206
|
"onClick"
|
|
2209
|
-
],
|
|
2207
|
+
], Hn = { 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]" }, Un = { 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]" }, Wn = {
|
|
2210
2208
|
key: 0,
|
|
2211
2209
|
"data-testid": "vibe-asset-spinner",
|
|
2212
2210
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
2213
|
-
},
|
|
2211
|
+
}, Gn = { 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]" }, Kn = ["data-kind"], qn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Jn = ["onClick"], Yn = [
|
|
2214
2212
|
"src",
|
|
2215
2213
|
"preload",
|
|
2216
2214
|
"onCanplay",
|
|
@@ -2226,26 +2224,26 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2226
2224
|
"onStalled",
|
|
2227
2225
|
"onTimeupdate",
|
|
2228
2226
|
"onWaiting"
|
|
2229
|
-
],
|
|
2227
|
+
], Xn = {
|
|
2230
2228
|
key: 2,
|
|
2231
2229
|
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"
|
|
2232
|
-
},
|
|
2230
|
+
}, Zn = { 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]" }, Qn = {
|
|
2233
2231
|
key: 0,
|
|
2234
2232
|
"data-testid": "vibe-fullscreen-overlay",
|
|
2235
2233
|
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
2236
|
-
},
|
|
2234
|
+
}, $n = { class: "h-full w-full" }, er = {
|
|
2237
2235
|
key: 1,
|
|
2238
2236
|
"data-testid": "vibe-forward-fill-placeholder",
|
|
2239
2237
|
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
2240
|
-
},
|
|
2238
|
+
}, tr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, nr = { 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)]" }, rr = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, ir = {
|
|
2241
2239
|
key: 0,
|
|
2242
2240
|
"data-testid": "vibe-fullscreen-aside",
|
|
2243
2241
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
2244
|
-
},
|
|
2242
|
+
}, ar = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, or = {
|
|
2245
2243
|
key: 0,
|
|
2246
2244
|
"data-testid": "vibe-fullscreen-aside",
|
|
2247
2245
|
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]"
|
|
2248
|
-
},
|
|
2246
|
+
}, sr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, cr = 1280, lr = 768, ur = /* @__PURE__ */ d({
|
|
2249
2247
|
__name: "FullscreenSurface",
|
|
2250
2248
|
props: {
|
|
2251
2249
|
active: {
|
|
@@ -2297,23 +2295,23 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2297
2295
|
},
|
|
2298
2296
|
emits: ["back-to-list", "update:activeIndex"],
|
|
2299
2297
|
setup(e, { emit: n }) {
|
|
2300
|
-
let d = e, f = F(), m = n, h =
|
|
2298
|
+
let d = e, f = F(), m = n, h = _n(d, (e, t) => {
|
|
2301
2299
|
m("update:activeIndex", t);
|
|
2302
2300
|
}, {
|
|
2303
2301
|
enabled: M(d, "active"),
|
|
2304
2302
|
onAssetError: d.reportAssetError ?? void 0,
|
|
2305
2303
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
2306
|
-
}), _ = D(typeof window > "u" ?
|
|
2304
|
+
}), _ = D(typeof window > "u" ? cr : window.innerWidth || cr), C = Ht({
|
|
2307
2305
|
active: M(d, "active"),
|
|
2308
2306
|
items: h.items,
|
|
2309
2307
|
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
2310
2308
|
viewer: h
|
|
2311
|
-
}), T = i(() =>
|
|
2309
|
+
}), T = i(() => xn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: P, updateFromImageElement: I } = Tn({
|
|
2312
2310
|
activeItem: h.activeItem,
|
|
2313
2311
|
getItemKey: C.getItemKey,
|
|
2314
2312
|
isImageReady: h.isImageReady,
|
|
2315
2313
|
showDominantImageTone: M(d, "showDominantImageTone")
|
|
2316
|
-
}), L = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), R = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), B = i(() => _.value <
|
|
2314
|
+
}), L = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), R = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), B = i(() => _.value < lr ? "vertical" : "horizontal"), te = i(() => R.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), V = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), H = i(() => d.hasNextPage ? "Loading more items" : h.statusMessage.value ?? "Loading more items"), U = i(() => {
|
|
2317
2315
|
let e = h.activeItem.value;
|
|
2318
2316
|
return e ? {
|
|
2319
2317
|
hasNextPage: d.hasNextPage,
|
|
@@ -2330,7 +2328,7 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2330
2328
|
}), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() => ({
|
|
2331
2329
|
gridTemplateColumns: Y.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
2332
2330
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
2333
|
-
})), re = i(() => Ut(W.value)), J = i(() => Ut(ne.value)), Y = i(() => J.value && _.value >=
|
|
2331
|
+
})), re = i(() => Ut(W.value)), J = i(() => Ut(ne.value)), Y = i(() => J.value && _.value >= cr), ie = i(() => J.value && !Y.value), ae = i(() => Ut(K.value)), { emptyStateProps: X, showBadgeEmptyState: ue, showCustomEmptyState: de, showInlineEmptyState: fe } = Kt({
|
|
2334
2332
|
emptyStateMode: M(d, "emptyStateMode"),
|
|
2335
2333
|
itemCount: i(() => d.items.length),
|
|
2336
2334
|
loading: M(d, "loading"),
|
|
@@ -2343,7 +2341,7 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2343
2341
|
window.removeEventListener("resize", Z);
|
|
2344
2342
|
});
|
|
2345
2343
|
function Z() {
|
|
2346
|
-
_.value = window.innerWidth ||
|
|
2344
|
+
_.value = window.innerWidth || cr;
|
|
2347
2345
|
}
|
|
2348
2346
|
function pe(e, t, n) {
|
|
2349
2347
|
C.settleBackgroundPreload(t), h.onImageLoad(t, n);
|
|
@@ -2383,7 +2381,7 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2383
2381
|
let r = n.play();
|
|
2384
2382
|
r && typeof r.catch == "function" && r.catch(() => {});
|
|
2385
2383
|
}
|
|
2386
|
-
return (e, n) => (w(), s("div",
|
|
2384
|
+
return (e, n) => (w(), s("div", kn, [
|
|
2387
2385
|
c("div", {
|
|
2388
2386
|
class: v(["absolute inset-0 transition-[background] duration-200", T.value]),
|
|
2389
2387
|
style: b(N(P))
|
|
@@ -2400,7 +2398,7 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2400
2398
|
onPointerup: n[3] ||= (...e) => N(h).onPointerUp && N(h).onPointerUp(...e),
|
|
2401
2399
|
onPointercancel: n[4] ||= (...e) => N(h).onPointerCancel && N(h).onPointerCancel(...e),
|
|
2402
2400
|
onWheel: n[5] ||= (...e) => N(h).onWheel && N(h).onWheel(...e)
|
|
2403
|
-
}, [N(h).activeItem.value ? (w(), s("div",
|
|
2401
|
+
}, [N(h).activeItem.value ? (w(), s("div", An, [
|
|
2404
2402
|
(w(!0), s(t, null, O(N(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
2405
2403
|
key: N(C).getItemKey(r),
|
|
2406
2404
|
"data-testid": "vibe-slide",
|
|
@@ -2412,12 +2410,12 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2412
2410
|
class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === N(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
|
|
2413
2411
|
style: b(N(h).getSlideStyle(i))
|
|
2414
2412
|
}, [c("div", {
|
|
2415
|
-
class: v(["absolute inset-0 opacity-85", N(
|
|
2413
|
+
class: v(["absolute inset-0 opacity-85", N(Sn)(r.type)]),
|
|
2416
2414
|
style: b(i === N(h).resolvedActiveIndex.value && r.type === "image" ? N(E) : void 0)
|
|
2417
2415
|
}, null, 6), N(h).isVisual(r) ? (w(), s("div", {
|
|
2418
2416
|
key: 0,
|
|
2419
2417
|
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === N(h).resolvedActiveIndex.value ? te.value : ""])
|
|
2420
|
-
}, [N(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
2418
|
+
}, [N(C).isAssetLoading(i, r) ? (w(), s("div", Mn, [c("span", Nn, [u(N(oe), {
|
|
2421
2419
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2422
2420
|
"aria-hidden": "true"
|
|
2423
2421
|
})])])) : o("", !0), N(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
@@ -2425,19 +2423,19 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2425
2423
|
"data-testid": "vibe-asset-error",
|
|
2426
2424
|
"data-kind": N(C).getAssetErrorKind(r),
|
|
2427
2425
|
class: "grid h-full w-full place-items-center"
|
|
2428
|
-
}, [c("div",
|
|
2426
|
+
}, [c("div", Fn, [
|
|
2429
2427
|
u(N(le), {
|
|
2430
2428
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2431
2429
|
"aria-hidden": "true"
|
|
2432
2430
|
}),
|
|
2433
|
-
c("p",
|
|
2431
|
+
c("p", In, j(N(C).getAssetErrorLabel(r)), 1),
|
|
2434
2432
|
N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
|
|
2435
2433
|
key: 0,
|
|
2436
2434
|
type: "button",
|
|
2437
2435
|
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",
|
|
2438
2436
|
onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
|
|
2439
|
-
}, " Retry ", 8,
|
|
2440
|
-
])], 8,
|
|
2437
|
+
}, " Retry ", 8, Ln)) : o("", !0)
|
|
2438
|
+
])], 8, Pn)) : r.type === "image" ? (w(), s("img", {
|
|
2441
2439
|
key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
|
|
2442
2440
|
src: N(C).getFullscreenImageSource(i, r),
|
|
2443
2441
|
alt: r.title ?? "",
|
|
@@ -2448,7 +2446,7 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2448
2446
|
ref: (e) => he(N(C).getItemKey(r), e),
|
|
2449
2447
|
onLoad: (e) => pe(e, N(C).getItemKey(r), r.url),
|
|
2450
2448
|
onError: (e) => me(N(C).getItemKey(r), r.url)
|
|
2451
|
-
}, null, 42,
|
|
2449
|
+
}, null, 42, Rn)) : (w(), s("video", {
|
|
2452
2450
|
key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
|
|
2453
2451
|
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", N(h).isMediaReady(N(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
2454
2452
|
playsinline: "",
|
|
@@ -2472,10 +2470,10 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2472
2470
|
onStalled: (e) => Q(N(C).getItemKey(r), e),
|
|
2473
2471
|
onTimeupdate: (e) => Q(N(C).getItemKey(r), e),
|
|
2474
2472
|
onWaiting: (e) => Q(N(C).getItemKey(r), e)
|
|
2475
|
-
}, null, 42,
|
|
2473
|
+
}, null, 42, zn))], 2)) : N(h).isAudio(r) ? (w(), s("div", {
|
|
2476
2474
|
key: 1,
|
|
2477
2475
|
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 === N(h).resolvedActiveIndex.value ? te.value : ""])
|
|
2478
|
-
}, [c("div",
|
|
2476
|
+
}, [c("div", Bn, [
|
|
2479
2477
|
c("button", {
|
|
2480
2478
|
type: "button",
|
|
2481
2479
|
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]",
|
|
@@ -2485,19 +2483,19 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2485
2483
|
}, [
|
|
2486
2484
|
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),
|
|
2487
2485
|
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),
|
|
2488
|
-
c("span",
|
|
2486
|
+
c("span", Hn, [k(e.$slots, "item-icon", {
|
|
2489
2487
|
icon: N(Ot)(r.type),
|
|
2490
2488
|
item: r
|
|
2491
2489
|
}, () => [(w(), a(A(N(Ot)(r.type)), {
|
|
2492
2490
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2493
2491
|
"aria-hidden": "true"
|
|
2494
2492
|
}))])]),
|
|
2495
|
-
c("span",
|
|
2493
|
+
c("span", Un, [(w(), a(A(N(h).mediaStates.value[N(C).getItemKey(r)]?.paused ?? !0 ? N(ce) : N(se)), {
|
|
2496
2494
|
class: "h-4 w-4 stroke-2",
|
|
2497
2495
|
"aria-hidden": "true"
|
|
2498
2496
|
}))])
|
|
2499
|
-
], 8,
|
|
2500
|
-
N(C).isAssetLoading(i, r) ? (w(), s("div",
|
|
2497
|
+
], 8, Vn),
|
|
2498
|
+
N(C).isAssetLoading(i, r) ? (w(), s("div", Wn, [c("span", Gn, [u(N(oe), {
|
|
2501
2499
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2502
2500
|
"aria-hidden": "true"
|
|
2503
2501
|
})])])) : o("", !0),
|
|
@@ -2510,14 +2508,14 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2510
2508
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2511
2509
|
"aria-hidden": "true"
|
|
2512
2510
|
}),
|
|
2513
|
-
c("p",
|
|
2511
|
+
c("p", qn, j(N(C).getAssetErrorLabel(r)), 1),
|
|
2514
2512
|
N(h).canRetryAsset(N(C).getItemKey(r)) ? (w(), s("button", {
|
|
2515
2513
|
key: 0,
|
|
2516
2514
|
type: "button",
|
|
2517
2515
|
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",
|
|
2518
2516
|
onClick: ee((e) => N(h).retryAsset(N(C).getItemKey(r)), ["stop"])
|
|
2519
|
-
}, " Retry ", 8,
|
|
2520
|
-
], 8,
|
|
2517
|
+
}, " Retry ", 8, Jn)) : o("", !0)
|
|
2518
|
+
], 8, Kn)], 64)) : o("", !0)
|
|
2521
2519
|
]), (w(), s("audio", {
|
|
2522
2520
|
key: N(h).getAssetRenderKey(N(C).getItemKey(r)),
|
|
2523
2521
|
src: N(C).getFullscreenMediaSource(i, r),
|
|
@@ -2538,14 +2536,14 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2538
2536
|
onStalled: (e) => Q(N(C).getItemKey(r), e),
|
|
2539
2537
|
onTimeupdate: (e) => Q(N(C).getItemKey(r), e),
|
|
2540
2538
|
onWaiting: (e) => Q(N(C).getItemKey(r), e)
|
|
2541
|
-
}, null, 40,
|
|
2539
|
+
}, null, 40, Yn))], 2)) : (w(), s("div", Xn, [c("div", Zn, [k(e.$slots, "item-icon", {
|
|
2542
2540
|
icon: N(Ot)(r.type),
|
|
2543
2541
|
item: r
|
|
2544
2542
|
}, () => [(w(), a(A(N(Ot)(r.type)), {
|
|
2545
2543
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2546
2544
|
"aria-hidden": "true"
|
|
2547
|
-
}))])])]))], 14,
|
|
2548
|
-
U.value && f["fullscreen-overlay"] ? (w(), s("div",
|
|
2545
|
+
}))])])]))], 14, jn))), 128)),
|
|
2546
|
+
U.value && f["fullscreen-overlay"] ? (w(), s("div", Qn, [c("div", $n, [k(e.$slots, "fullscreen-overlay", y(p(U.value)))])])) : o("", !0),
|
|
2549
2547
|
N(h).activeItem.value ? (w(), a(Tt, {
|
|
2550
2548
|
key: 1,
|
|
2551
2549
|
"current-index": N(h).resolvedActiveIndex.value,
|
|
@@ -2603,10 +2601,10 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2603
2601
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
2604
2602
|
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", G.value.kind === "end" ? "border-amber-300/35 text-amber-200" : G.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
2605
2603
|
}, j(G.value.message), 3))], 2)) : o("", !0)
|
|
2606
|
-
])) : V.value ? (w(), s("div",
|
|
2604
|
+
])) : V.value ? (w(), s("div", er, [c("div", tr, [c("span", nr, [u(N(oe), {
|
|
2607
2605
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2608
2606
|
"aria-hidden": "true"
|
|
2609
|
-
})]), c("p",
|
|
2607
|
+
})]), c("p", rr, j(H.value), 1)])])) : N(fe) && N(X) ? (w(), a(On, {
|
|
2610
2608
|
key: 2,
|
|
2611
2609
|
message: N(X).message,
|
|
2612
2610
|
mode: N(X).mode,
|
|
@@ -2618,7 +2616,7 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2618
2616
|
"message",
|
|
2619
2617
|
"mode",
|
|
2620
2618
|
"surface"
|
|
2621
|
-
])) : o("", !0), N(ue) && N(X) ? (w(), a(
|
|
2619
|
+
])) : o("", !0), N(ue) && N(X) ? (w(), a(On, {
|
|
2622
2620
|
key: 3,
|
|
2623
2621
|
message: N(X).message,
|
|
2624
2622
|
mode: N(X).mode,
|
|
@@ -2638,7 +2636,7 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2638
2636
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2639
2637
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2640
2638
|
}, {
|
|
2641
|
-
default: z(() => [Y.value && U.value ? (w(), s("aside",
|
|
2639
|
+
default: z(() => [Y.value && U.value ? (w(), s("aside", ir, [c("div", ar, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
|
|
2642
2640
|
_: 3
|
|
2643
2641
|
})], 4),
|
|
2644
2642
|
u(r, {
|
|
@@ -2649,29 +2647,29 @@ var Tn = ["data-surface"], En = ["data-surface"], Dn = /* @__PURE__ */ d({
|
|
|
2649
2647
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2650
2648
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2651
2649
|
}, {
|
|
2652
|
-
default: z(() => [ie.value && U.value ? (w(), s("aside",
|
|
2650
|
+
default: z(() => [ie.value && U.value ? (w(), s("aside", or, [c("div", sr, [k(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
|
|
2653
2651
|
_: 3
|
|
2654
2652
|
})
|
|
2655
2653
|
]));
|
|
2656
2654
|
}
|
|
2657
|
-
}),
|
|
2658
|
-
function
|
|
2655
|
+
}), dr = 1, fr = .5;
|
|
2656
|
+
function pr(e) {
|
|
2659
2657
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2660
|
-
width:
|
|
2661
|
-
height:
|
|
2658
|
+
width: dr,
|
|
2659
|
+
height: dr,
|
|
2662
2660
|
source: "fallback"
|
|
2663
2661
|
};
|
|
2664
2662
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2665
|
-
if (
|
|
2666
|
-
let r =
|
|
2663
|
+
if (br(t) && br(n)) {
|
|
2664
|
+
let r = xr(e, t, n);
|
|
2667
2665
|
return {
|
|
2668
2666
|
width: r.width,
|
|
2669
2667
|
height: r.height,
|
|
2670
2668
|
source: "preview"
|
|
2671
2669
|
};
|
|
2672
2670
|
}
|
|
2673
|
-
if (
|
|
2674
|
-
let t =
|
|
2671
|
+
if (br(e.width) && br(e.height)) {
|
|
2672
|
+
let t = xr(e, e.width, e.height);
|
|
2675
2673
|
return {
|
|
2676
2674
|
width: t.width,
|
|
2677
2675
|
height: t.height,
|
|
@@ -2679,31 +2677,31 @@ function fr(e) {
|
|
|
2679
2677
|
};
|
|
2680
2678
|
}
|
|
2681
2679
|
return {
|
|
2682
|
-
width:
|
|
2683
|
-
height:
|
|
2680
|
+
width: dr,
|
|
2681
|
+
height: dr,
|
|
2684
2682
|
source: "fallback"
|
|
2685
2683
|
};
|
|
2686
2684
|
}
|
|
2687
|
-
function
|
|
2685
|
+
function mr(e, t) {
|
|
2688
2686
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2689
2687
|
}
|
|
2690
|
-
function
|
|
2688
|
+
function hr(e, t, n, r = 0) {
|
|
2691
2689
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2692
2690
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2693
2691
|
return !a || a <= 0 ? n : a / t;
|
|
2694
2692
|
}
|
|
2695
|
-
function
|
|
2696
|
-
let n =
|
|
2693
|
+
function gr(e, t) {
|
|
2694
|
+
let n = pr(e);
|
|
2697
2695
|
return n.height / n.width * t;
|
|
2698
2696
|
}
|
|
2699
|
-
function
|
|
2697
|
+
function _r(e, t) {
|
|
2700
2698
|
let n = Array.from({ length: t.columnCount }, () => 0), r = Array(e.length), i = Array(e.length), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = 0;
|
|
2701
2699
|
for (let c = 0; c < e.length; c += 1) {
|
|
2702
2700
|
let l = e[c];
|
|
2703
2701
|
o.set($(l), c);
|
|
2704
2702
|
let u = 0;
|
|
2705
2703
|
for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
|
|
2706
|
-
let d = u * (t.columnWidth + t.gapX), f = n[u], p =
|
|
2704
|
+
let d = u * (t.columnWidth + t.gapX), f = n[u], p = gr(l, t.columnWidth);
|
|
2707
2705
|
r[c] = {
|
|
2708
2706
|
x: d,
|
|
2709
2707
|
y: f
|
|
@@ -2722,7 +2720,7 @@ function gr(e, t) {
|
|
|
2722
2720
|
indexById: o
|
|
2723
2721
|
};
|
|
2724
2722
|
}
|
|
2725
|
-
function
|
|
2723
|
+
function vr(e) {
|
|
2726
2724
|
if (e.itemCount <= 0) return [];
|
|
2727
2725
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2728
2726
|
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();
|
|
@@ -2732,7 +2730,7 @@ function _r(e) {
|
|
|
2732
2730
|
}
|
|
2733
2731
|
return Array.from(a).sort((e, t) => e - t);
|
|
2734
2732
|
}
|
|
2735
|
-
function
|
|
2733
|
+
function yr(e, t, n) {
|
|
2736
2734
|
let r = /* @__PURE__ */ new Map();
|
|
2737
2735
|
for (let i of e) {
|
|
2738
2736
|
let e = t.get($(i));
|
|
@@ -2742,11 +2740,11 @@ function vr(e, t, n) {
|
|
|
2742
2740
|
}
|
|
2743
2741
|
return r;
|
|
2744
2742
|
}
|
|
2745
|
-
function
|
|
2743
|
+
function br(e) {
|
|
2746
2744
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2747
2745
|
}
|
|
2748
|
-
function
|
|
2749
|
-
return e.type !== "image" || n / t >=
|
|
2746
|
+
function xr(e, t, n) {
|
|
2747
|
+
return e.type !== "image" || n / t >= fr ? {
|
|
2750
2748
|
width: t,
|
|
2751
2749
|
height: n
|
|
2752
2750
|
} : {
|
|
@@ -2756,21 +2754,21 @@ function br(e, t, n) {
|
|
|
2756
2754
|
}
|
|
2757
2755
|
//#endregion
|
|
2758
2756
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
2759
|
-
var
|
|
2760
|
-
function
|
|
2757
|
+
var Sr = 300, Cr = 600, wr = 40, Tr = 300, Er = 400;
|
|
2758
|
+
function Dr(e, t) {
|
|
2761
2759
|
return t === "top" ? [...e].reverse() : e;
|
|
2762
2760
|
}
|
|
2763
|
-
function
|
|
2764
|
-
return e <= 0 ?
|
|
2761
|
+
function Or(e) {
|
|
2762
|
+
return e <= 0 ? Cr : Cr + Math.min((e - 1) * wr, Er);
|
|
2765
2763
|
}
|
|
2766
|
-
function
|
|
2767
|
-
return
|
|
2764
|
+
function kr() {
|
|
2765
|
+
return Tr;
|
|
2768
2766
|
}
|
|
2769
|
-
function
|
|
2767
|
+
function Ar(e) {
|
|
2770
2768
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
2771
2769
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
2772
2770
|
}
|
|
2773
|
-
function
|
|
2771
|
+
function jr(e) {
|
|
2774
2772
|
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()));
|
|
2775
2773
|
L(e.visibleIndices, (i) => {
|
|
2776
2774
|
if (!i.length) return;
|
|
@@ -2780,20 +2778,20 @@ function Ar(e) {
|
|
|
2780
2778
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
2781
2779
|
}
|
|
2782
2780
|
if (!o.length) return;
|
|
2783
|
-
let s =
|
|
2784
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
2785
|
-
r.value = c,
|
|
2781
|
+
let s = Dr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
2782
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * wr, Er));
|
|
2783
|
+
r.value = c, Mr(() => {
|
|
2786
2784
|
let e = new Set(n.value);
|
|
2787
2785
|
for (let t of o) e.add(t);
|
|
2788
2786
|
n.value = e;
|
|
2789
|
-
}),
|
|
2787
|
+
}), Nr(() => {
|
|
2790
2788
|
let e = new Set(t.value);
|
|
2791
2789
|
for (let t of o) e.delete(t);
|
|
2792
2790
|
t.value = e, S(() => {
|
|
2793
2791
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
2794
2792
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
2795
2793
|
n.value = e, r.value = t, a.value = i;
|
|
2796
|
-
},
|
|
2794
|
+
}, Or(o.length));
|
|
2797
2795
|
});
|
|
2798
2796
|
}, { flush: "post" }), L(() => e.items.value.map((e) => $(e)), (e) => {
|
|
2799
2797
|
if (!e.length || !o.value.size) return;
|
|
@@ -2820,7 +2818,7 @@ function Ar(e) {
|
|
|
2820
2818
|
let e = $(t.item);
|
|
2821
2819
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
2822
2820
|
}
|
|
2823
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
2821
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Mr(() => {
|
|
2824
2822
|
let e = new Set(s.value);
|
|
2825
2823
|
for (let t of p) e.add(t);
|
|
2826
2824
|
s.value = e;
|
|
@@ -2828,9 +2826,9 @@ function Ar(e) {
|
|
|
2828
2826
|
let e = new Map(o.value), t = new Set(s.value);
|
|
2829
2827
|
for (let n of p) e.delete(n), t.delete(n);
|
|
2830
2828
|
o.value = e, s.value = t;
|
|
2831
|
-
},
|
|
2829
|
+
}, Tr);
|
|
2832
2830
|
}
|
|
2833
|
-
function g(t, n, r =
|
|
2831
|
+
function g(t, n, r = Sr) {
|
|
2834
2832
|
if (!t.size) return;
|
|
2835
2833
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
2836
2834
|
for (let [r, o] of t.entries()) {
|
|
@@ -2849,8 +2847,8 @@ function Ar(e) {
|
|
|
2849
2847
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
2850
2848
|
let o = new Map(l.value);
|
|
2851
2849
|
for (let e of a) o.set(e, r);
|
|
2852
|
-
l.value = o,
|
|
2853
|
-
u.value = new Set(a),
|
|
2850
|
+
l.value = o, Mr(() => {
|
|
2851
|
+
u.value = new Set(a), Mr(() => {
|
|
2854
2852
|
c.value = /* @__PURE__ */ new Map();
|
|
2855
2853
|
});
|
|
2856
2854
|
}), S(() => {
|
|
@@ -2861,8 +2859,8 @@ function Ar(e) {
|
|
|
2861
2859
|
}, r);
|
|
2862
2860
|
}
|
|
2863
2861
|
function _(e) {
|
|
2864
|
-
if (n.value.has(e)) return `transform ${
|
|
2865
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
2862
|
+
if (n.value.has(e)) return `transform ${Cr}ms ease-out`;
|
|
2863
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? Sr}ms ease-out`;
|
|
2866
2864
|
}
|
|
2867
2865
|
function v(e) {
|
|
2868
2866
|
if (!n.value.has(e)) return;
|
|
@@ -2879,7 +2877,7 @@ function Ar(e) {
|
|
|
2879
2877
|
} : {
|
|
2880
2878
|
dx: 0,
|
|
2881
2879
|
dy: 0
|
|
2882
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
2880
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Ar({
|
|
2883
2881
|
columnWidth: e.columnWidth.value,
|
|
2884
2882
|
direction: u,
|
|
2885
2883
|
itemHeight: o,
|
|
@@ -2893,14 +2891,14 @@ function Ar(e) {
|
|
|
2893
2891
|
if (!r) return {
|
|
2894
2892
|
opacity: "0",
|
|
2895
2893
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
2896
|
-
transition: `opacity ${
|
|
2894
|
+
transition: `opacity ${Tr}ms ease-out, transform ${Tr}ms ease-out`
|
|
2897
2895
|
};
|
|
2898
2896
|
let i = s.value.has(n);
|
|
2899
2897
|
return {
|
|
2900
2898
|
height: `${r.height}px`,
|
|
2901
2899
|
opacity: i ? "0" : "1",
|
|
2902
2900
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
2903
|
-
transition: `opacity ${
|
|
2901
|
+
transition: `opacity ${Tr}ms ease-out, transform ${Tr}ms ease-out`,
|
|
2904
2902
|
width: `${e.columnWidth.value}px`
|
|
2905
2903
|
};
|
|
2906
2904
|
}
|
|
@@ -2921,28 +2919,28 @@ function Ar(e) {
|
|
|
2921
2919
|
playFlipMoveAnimation: g
|
|
2922
2920
|
};
|
|
2923
2921
|
}
|
|
2924
|
-
function
|
|
2922
|
+
function Mr(e) {
|
|
2925
2923
|
if (typeof requestAnimationFrame == "function") {
|
|
2926
2924
|
requestAnimationFrame(() => e());
|
|
2927
2925
|
return;
|
|
2928
2926
|
}
|
|
2929
2927
|
setTimeout(e, 0);
|
|
2930
2928
|
}
|
|
2931
|
-
function
|
|
2932
|
-
|
|
2929
|
+
function Nr(e) {
|
|
2930
|
+
Mr(() => Mr(e));
|
|
2933
2931
|
}
|
|
2934
2932
|
//#endregion
|
|
2935
2933
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
2936
|
-
function
|
|
2934
|
+
function Pr(e, t) {
|
|
2937
2935
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
2938
2936
|
}
|
|
2939
|
-
function
|
|
2937
|
+
function Fr(e, t, n) {
|
|
2940
2938
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
2941
2939
|
}
|
|
2942
|
-
function
|
|
2940
|
+
function Ir(e, t, n, r) {
|
|
2943
2941
|
return (e?.scrollHeight ?? r) - (t + n);
|
|
2944
2942
|
}
|
|
2945
|
-
function
|
|
2943
|
+
function Lr(e, t) {
|
|
2946
2944
|
return {
|
|
2947
2945
|
height: `${e}px`,
|
|
2948
2946
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -2950,8 +2948,8 @@ function Ir(e, t) {
|
|
|
2950
2948
|
}
|
|
2951
2949
|
//#endregion
|
|
2952
2950
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
2953
|
-
var
|
|
2954
|
-
function
|
|
2951
|
+
var Rr = 250, zr = 1e3;
|
|
2952
|
+
function Br(e) {
|
|
2955
2953
|
let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = 0, c = null;
|
|
2956
2954
|
x(() => {
|
|
2957
2955
|
y();
|
|
@@ -2967,7 +2965,7 @@ function zr(e) {
|
|
|
2967
2965
|
function u(t) {
|
|
2968
2966
|
if (!b(t) || !e.isAtBoundary()) return;
|
|
2969
2967
|
let n = Date.now();
|
|
2970
|
-
n < s || (s = n +
|
|
2968
|
+
n < s || (s = n + Rr, m());
|
|
2971
2969
|
}
|
|
2972
2970
|
function d() {
|
|
2973
2971
|
if (!g()) return;
|
|
@@ -3001,7 +2999,7 @@ function zr(e) {
|
|
|
3001
2999
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
3002
3000
|
}
|
|
3003
3001
|
function _() {
|
|
3004
|
-
o.value = !1, v(
|
|
3002
|
+
o.value = !1, v(zr);
|
|
3005
3003
|
}
|
|
3006
3004
|
function v(e) {
|
|
3007
3005
|
y(), a.value = !0, c = setTimeout(() => {
|
|
@@ -3024,42 +3022,42 @@ function zr(e) {
|
|
|
3024
3022
|
}
|
|
3025
3023
|
//#endregion
|
|
3026
3024
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
3027
|
-
var
|
|
3028
|
-
function
|
|
3029
|
-
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth ||
|
|
3025
|
+
var Vr = 600, Hr = 24, Ur = 16, Wr = 300, Gr = 200, Kr = 200, qr = Hr + Ur, Jr = 200, Yr = 300, Xr = 24, Zr = 48, Qr = 500, $r = 1e3;
|
|
3026
|
+
function ei(e) {
|
|
3027
|
+
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Wr), o = D([]), s = D([]), c = D(/* @__PURE__ */ new Map()), l = D(0), u = D(/* @__PURE__ */ new Map()), d = D(null), f = D(null), p = D(!1), m = i(() => Math.max(Wr, a.value - Hr * 2)), h = i(() => mr(m.value, Wr)), g = i(() => hr(m.value, h.value, Wr, Ur)), v = i(() => ti(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => vr({
|
|
3030
3028
|
itemCount: e.items.value.length,
|
|
3031
3029
|
viewportHeight: r.value,
|
|
3032
3030
|
scrollTop: n.value,
|
|
3033
|
-
overscanPx:
|
|
3034
|
-
bucketPx:
|
|
3031
|
+
overscanPx: Gr,
|
|
3032
|
+
bucketPx: Vr,
|
|
3035
3033
|
buckets: c.value
|
|
3036
3034
|
})), b = i(() => y.value.map((t) => ({
|
|
3037
3035
|
item: e.items.value[t],
|
|
3038
3036
|
index: t
|
|
3039
3037
|
}))), C = i(() => {
|
|
3040
|
-
let e = l.value +
|
|
3041
|
-
return Math.max(e, t, r.value) +
|
|
3042
|
-
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() =>
|
|
3038
|
+
let e = l.value + Hr * 2, t = d.value ?? 0;
|
|
3039
|
+
return Math.max(e, t, r.value) + Jr;
|
|
3040
|
+
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => ri({
|
|
3043
3041
|
active: e.active.value,
|
|
3044
3042
|
maxScrollTop: se(),
|
|
3045
3043
|
progressDistancePx: n.value,
|
|
3046
|
-
thresholdPx:
|
|
3044
|
+
thresholdPx: Kr,
|
|
3047
3045
|
triggerEnabled: w.value
|
|
3048
|
-
})), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() =>
|
|
3046
|
+
})), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), O = i(() => ni({
|
|
3049
3047
|
active: e.active.value,
|
|
3050
3048
|
maxScrollTop: se(),
|
|
3051
3049
|
progressDistancePx: n.value,
|
|
3052
|
-
thresholdPx:
|
|
3050
|
+
thresholdPx: qr,
|
|
3053
3051
|
triggerEnabled: e.hasPreviousPage.value
|
|
3054
|
-
})), k = i(() => Math.max(0, r.value -
|
|
3052
|
+
})), k = i(() => Math.max(0, r.value - Xr * 2)), A = i(() => C.value > r.value + 1 && k.value > 0), j = i(() => {
|
|
3055
3053
|
if (!A.value) return 0;
|
|
3056
3054
|
let e = r.value / C.value * k.value;
|
|
3057
|
-
return Math.min(k.value, Math.max(
|
|
3055
|
+
return Math.min(k.value, Math.max(Zr, e));
|
|
3058
3056
|
}), M = i(() => {
|
|
3059
|
-
if (!A.value) return
|
|
3057
|
+
if (!A.value) return Xr;
|
|
3060
3058
|
let e = Math.max(0, C.value - r.value);
|
|
3061
|
-
return
|
|
3062
|
-
}), N =
|
|
3059
|
+
return Xr + Math.max(0, k.value - j.value) * (e > 0 ? ti(n.value / e, 0, 1) : 0);
|
|
3060
|
+
}), N = jr({
|
|
3063
3061
|
items: e.items,
|
|
3064
3062
|
visibleIndices: y,
|
|
3065
3063
|
positions: o,
|
|
@@ -3068,27 +3066,27 @@ function $r(e) {
|
|
|
3068
3066
|
columnWidth: g,
|
|
3069
3067
|
scrollTop: n,
|
|
3070
3068
|
viewportHeight: r
|
|
3071
|
-
}), P =
|
|
3069
|
+
}), P = Br({
|
|
3072
3070
|
direction: "top",
|
|
3073
3071
|
getAnimationLockMs(e) {
|
|
3074
|
-
return Math.max(
|
|
3072
|
+
return Math.max(Qr, Or(e)) + $r;
|
|
3075
3073
|
},
|
|
3076
3074
|
hasPage: e.hasPreviousPage,
|
|
3077
3075
|
interactionLocked: p,
|
|
3078
3076
|
isAtBoundary() {
|
|
3079
|
-
return n.value <=
|
|
3077
|
+
return n.value <= qr;
|
|
3080
3078
|
},
|
|
3081
3079
|
loading: e.loading,
|
|
3082
3080
|
requestPage: e.requestPreviousPage
|
|
3083
|
-
}), F =
|
|
3081
|
+
}), F = Br({
|
|
3084
3082
|
direction: "bottom",
|
|
3085
3083
|
getAnimationLockMs(e) {
|
|
3086
|
-
return
|
|
3084
|
+
return Or(e) + $r;
|
|
3087
3085
|
},
|
|
3088
3086
|
hasPage: w,
|
|
3089
3087
|
interactionLocked: p,
|
|
3090
3088
|
isAtBoundary() {
|
|
3091
|
-
return oe() <=
|
|
3089
|
+
return oe() <= Kr;
|
|
3092
3090
|
},
|
|
3093
3091
|
loading: e.loading,
|
|
3094
3092
|
requestPage: e.requestNextPage
|
|
@@ -3098,7 +3096,7 @@ function $r(e) {
|
|
|
3098
3096
|
h,
|
|
3099
3097
|
g
|
|
3100
3098
|
], async ([t], [r = []]) => {
|
|
3101
|
-
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c =
|
|
3099
|
+
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = yr(a, u.value, o.value), l = X(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
|
|
3102
3100
|
let t = $(e);
|
|
3103
3101
|
if (f.has(t)) return [];
|
|
3104
3102
|
let n = c.get(t), r = l.get(t);
|
|
@@ -3107,8 +3105,8 @@ function $r(e) {
|
|
|
3107
3105
|
item: e,
|
|
3108
3106
|
position: n
|
|
3109
3107
|
}];
|
|
3110
|
-
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], g = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value >
|
|
3111
|
-
y && K(
|
|
3108
|
+
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], g = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > Hr + Ur, b = h && n.value > Hr + Ur ? t[v.value] : null, x = b ? $(b) : null;
|
|
3109
|
+
y && K(kr() + $r), g && G(), te(), m.length > 0 && N.markLeave(m), p.length > 0 && (N.markEnter(p, h ? "top" : "bottom"), h ? P.onItemsMutated(p.length) : F.onItemsMutated(p.length)), N.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? Qr : void 0), x ? (await _(), ne(x, c)) : e.active.value && s.length > 0 && re();
|
|
3112
3110
|
}, { immediate: !0 }), L([
|
|
3113
3111
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
3114
3112
|
h,
|
|
@@ -3125,7 +3123,7 @@ function $r(e) {
|
|
|
3125
3123
|
}
|
|
3126
3124
|
if (i !== !1 || f.value == null) return;
|
|
3127
3125
|
await _();
|
|
3128
|
-
let o = Math.max(0, C.value - r.value), s =
|
|
3126
|
+
let o = Math.max(0, C.value - r.value), s = ti(f.value, 0, o);
|
|
3129
3127
|
a.scrollTop = s, n.value = s, P.syncBoundary(), F.syncBoundary();
|
|
3130
3128
|
}), L(() => e.loading.value, async (t) => {
|
|
3131
3129
|
!t && !e.pendingAppendItems.value.length && !z && !ee && (d.value = null), P.onLoadingChange(t), F.onLoadingChange(t), await _();
|
|
@@ -3137,16 +3135,16 @@ function $r(e) {
|
|
|
3137
3135
|
I?.disconnect(), I = null, window.removeEventListener("resize", Y), de(), fe(), R &&= (cancelAnimationFrame(R), 0);
|
|
3138
3136
|
});
|
|
3139
3137
|
function te() {
|
|
3140
|
-
let t =
|
|
3138
|
+
let t = _r(e.items.value, {
|
|
3141
3139
|
columnCount: h.value,
|
|
3142
3140
|
columnWidth: g.value,
|
|
3143
|
-
gapX:
|
|
3144
|
-
gapY:
|
|
3145
|
-
bucketPx:
|
|
3141
|
+
gapX: Ur,
|
|
3142
|
+
gapY: Ur,
|
|
3143
|
+
bucketPx: Vr
|
|
3146
3144
|
});
|
|
3147
3145
|
o.value = t.positions.map((e) => ({
|
|
3148
|
-
x: e.x +
|
|
3149
|
-
y: e.y +
|
|
3146
|
+
x: e.x + Hr,
|
|
3147
|
+
y: e.y + Hr
|
|
3150
3148
|
})), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
|
|
3151
3149
|
}
|
|
3152
3150
|
function V() {
|
|
@@ -3171,7 +3169,7 @@ function $r(e) {
|
|
|
3171
3169
|
let a = t.value, c = o.value[e], l = s.value[e];
|
|
3172
3170
|
if (!a || !c || !l) return;
|
|
3173
3171
|
let u = a.scrollTop, d = Math.max(0, C.value - r.value);
|
|
3174
|
-
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y -
|
|
3172
|
+
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Hr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Hr), a.scrollTop = ti(u, 0, d), n.value = a.scrollTop, q();
|
|
3175
3173
|
}
|
|
3176
3174
|
function ne(e, r) {
|
|
3177
3175
|
let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
|
|
@@ -3204,7 +3202,7 @@ function $r(e) {
|
|
|
3204
3202
|
e.setActiveIndex(i);
|
|
3205
3203
|
}
|
|
3206
3204
|
function re() {
|
|
3207
|
-
let t = n.value <=
|
|
3205
|
+
let t = n.value <= qr, r = oe() <= Kr;
|
|
3208
3206
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
3209
3207
|
}
|
|
3210
3208
|
function J() {
|
|
@@ -3214,29 +3212,29 @@ function $r(e) {
|
|
|
3214
3212
|
r.value = ie(), a.value = ae();
|
|
3215
3213
|
}
|
|
3216
3214
|
function ie() {
|
|
3217
|
-
return
|
|
3215
|
+
return Pr(t.value, r.value);
|
|
3218
3216
|
}
|
|
3219
3217
|
function ae() {
|
|
3220
|
-
return
|
|
3218
|
+
return Fr(t.value, a.value, Wr);
|
|
3221
3219
|
}
|
|
3222
3220
|
function oe() {
|
|
3223
|
-
return
|
|
3221
|
+
return Ir(t.value, n.value, r.value, C.value);
|
|
3224
3222
|
}
|
|
3225
3223
|
function se() {
|
|
3226
3224
|
let e = Math.max(t.value?.scrollHeight ?? 0, C.value);
|
|
3227
3225
|
return Math.max(0, e - r.value);
|
|
3228
3226
|
}
|
|
3229
3227
|
function ce() {
|
|
3230
|
-
return
|
|
3228
|
+
return Lr(j.value, M.value);
|
|
3231
3229
|
}
|
|
3232
3230
|
function le(e) {
|
|
3233
|
-
return e.length ?
|
|
3231
|
+
return e.length ? _r(e, {
|
|
3234
3232
|
columnCount: h.value,
|
|
3235
3233
|
columnWidth: g.value,
|
|
3236
|
-
gapX:
|
|
3237
|
-
gapY:
|
|
3238
|
-
bucketPx:
|
|
3239
|
-
}).contentHeight +
|
|
3234
|
+
gapX: Ur,
|
|
3235
|
+
gapY: Ur,
|
|
3236
|
+
bucketPx: Vr
|
|
3237
|
+
}).contentHeight + Hr * 2 : 0;
|
|
3240
3238
|
}
|
|
3241
3239
|
function X(e) {
|
|
3242
3240
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -3258,7 +3256,7 @@ function $r(e) {
|
|
|
3258
3256
|
} finally {
|
|
3259
3257
|
d.value = null, ee = !1;
|
|
3260
3258
|
}
|
|
3261
|
-
},
|
|
3259
|
+
}, Yr));
|
|
3262
3260
|
}
|
|
3263
3261
|
function de() {
|
|
3264
3262
|
z &&= (clearTimeout(z), null);
|
|
@@ -3285,27 +3283,27 @@ function $r(e) {
|
|
|
3285
3283
|
scrollViewportRef: t
|
|
3286
3284
|
};
|
|
3287
3285
|
}
|
|
3288
|
-
function
|
|
3286
|
+
function ti(e, t, n) {
|
|
3289
3287
|
return Math.min(Math.max(e, t), n);
|
|
3290
3288
|
}
|
|
3291
|
-
function
|
|
3289
|
+
function ni(e) {
|
|
3292
3290
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3293
3291
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3294
|
-
return t <= 0 ? 1 :
|
|
3292
|
+
return t <= 0 ? 1 : ti(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
3295
3293
|
}
|
|
3296
|
-
function
|
|
3294
|
+
function ri(e) {
|
|
3297
3295
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
3298
3296
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
3299
|
-
return t <= 0 ? 1 :
|
|
3297
|
+
return t <= 0 ? 1 : ti(e.progressDistancePx / t, 0, 1);
|
|
3300
3298
|
}
|
|
3301
3299
|
//#endregion
|
|
3302
3300
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
3303
|
-
function
|
|
3301
|
+
function ii(e) {
|
|
3304
3302
|
if (e) try {
|
|
3305
3303
|
e.removeAttribute("src"), e.src = "";
|
|
3306
3304
|
} catch {}
|
|
3307
3305
|
}
|
|
3308
|
-
function
|
|
3306
|
+
function ai(e) {
|
|
3309
3307
|
if (e) {
|
|
3310
3308
|
try {
|
|
3311
3309
|
e.currentTime = 0;
|
|
@@ -3316,12 +3314,12 @@ function ii(e) {
|
|
|
3316
3314
|
} catch {}
|
|
3317
3315
|
}
|
|
3318
3316
|
}
|
|
3319
|
-
function
|
|
3317
|
+
function oi(e, t) {
|
|
3320
3318
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
3321
3319
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
3322
3320
|
return e.bottom > 0 && e.top < n;
|
|
3323
3321
|
}
|
|
3324
|
-
function
|
|
3322
|
+
function si(e) {
|
|
3325
3323
|
if (!e) return null;
|
|
3326
3324
|
try {
|
|
3327
3325
|
return new URL(e, window.location.href).href;
|
|
@@ -3331,9 +3329,9 @@ function oi(e) {
|
|
|
3331
3329
|
}
|
|
3332
3330
|
//#endregion
|
|
3333
3331
|
//#region src/components/viewer-core/listPreview.ts
|
|
3334
|
-
var
|
|
3335
|
-
function
|
|
3336
|
-
let t =
|
|
3332
|
+
var ci = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, li = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, ui = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
3333
|
+
function di(e) {
|
|
3334
|
+
let t = fi(e), n = t?.url, r = pr(e), i = e.title?.trim() || kt(e.type);
|
|
3337
3335
|
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
3338
3336
|
kind: "video",
|
|
3339
3337
|
url: n,
|
|
@@ -3352,13 +3350,13 @@ function ui(e) {
|
|
|
3352
3350
|
width: r.width,
|
|
3353
3351
|
height: r.height,
|
|
3354
3352
|
label: i
|
|
3355
|
-
} : typeof n == "string" &&
|
|
3353
|
+
} : typeof n == "string" && mi(e, n) ? {
|
|
3356
3354
|
kind: "video",
|
|
3357
3355
|
url: n,
|
|
3358
3356
|
width: r.width,
|
|
3359
3357
|
height: r.height,
|
|
3360
3358
|
label: i
|
|
3361
|
-
} : typeof n == "string" &&
|
|
3359
|
+
} : typeof n == "string" && pi(e, n) ? {
|
|
3362
3360
|
kind: "image",
|
|
3363
3361
|
url: n,
|
|
3364
3362
|
width: r.width,
|
|
@@ -3372,26 +3370,26 @@ function ui(e) {
|
|
|
3372
3370
|
label: i
|
|
3373
3371
|
};
|
|
3374
3372
|
}
|
|
3375
|
-
function
|
|
3373
|
+
function fi(e) {
|
|
3376
3374
|
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
3377
3375
|
}
|
|
3378
|
-
function fi(e, t) {
|
|
3379
|
-
return e.type !== "image" || typeof t != "string" ? !1 : si.test(t) || mi(t);
|
|
3380
|
-
}
|
|
3381
3376
|
function pi(e, t) {
|
|
3382
|
-
return e.type !== "
|
|
3377
|
+
return e.type !== "image" || typeof t != "string" ? !1 : ci.test(t) || hi(t);
|
|
3383
3378
|
}
|
|
3384
|
-
function mi(e) {
|
|
3385
|
-
return
|
|
3379
|
+
function mi(e, t) {
|
|
3380
|
+
return e.type !== "video" || typeof t != "string" ? !1 : li.test(t) || gi(t);
|
|
3386
3381
|
}
|
|
3387
3382
|
function hi(e) {
|
|
3388
|
-
return
|
|
3383
|
+
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
3384
|
+
}
|
|
3385
|
+
function gi(e) {
|
|
3386
|
+
return ui.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
3389
3387
|
}
|
|
3390
3388
|
//#endregion
|
|
3391
3389
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
3392
|
-
function
|
|
3390
|
+
function _i(e) {
|
|
3393
3391
|
let t = D(null), n = i(() => {
|
|
3394
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
3392
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? si(e.item.value.healthCheck.url) : null;
|
|
3395
3393
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
3396
3394
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
3397
3395
|
L(n, (e, n) => {
|
|
@@ -3469,14 +3467,14 @@ function gi(e) {
|
|
|
3469
3467
|
}
|
|
3470
3468
|
//#endregion
|
|
3471
3469
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
3472
|
-
var
|
|
3470
|
+
var vi = ["aria-label"], yi = {
|
|
3473
3471
|
key: 0,
|
|
3474
3472
|
"data-testid": "vibe-list-card-spinner",
|
|
3475
3473
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
3476
|
-
},
|
|
3474
|
+
}, bi = { 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]" }, xi = ["src", "alt"], Si = ["src"], Ci = ["data-kind"], wi = { class: "grid justify-items-center gap-3 px-4 text-center" }, Ti = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Ei = {
|
|
3477
3475
|
key: 4,
|
|
3478
3476
|
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))]"
|
|
3479
|
-
},
|
|
3477
|
+
}, Di = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Oi = { class: "pointer-events-none absolute inset-0 z-[3]" }, ki = /* @__PURE__ */ d({
|
|
3480
3478
|
__name: "ListCard",
|
|
3481
3479
|
props: {
|
|
3482
3480
|
active: {
|
|
@@ -3500,7 +3498,7 @@ var _i = ["aria-label"], vi = {
|
|
|
3500
3498
|
},
|
|
3501
3499
|
emits: ["open"],
|
|
3502
3500
|
setup(e, { emit: t }) {
|
|
3503
|
-
let n = e, r = t, l = i(() =>
|
|
3501
|
+
let n = e, r = t, l = i(() => di(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), M = i(() => l.value.kind === "image" && !!E.value), P = i(() => l.value.kind === "video" && !!E.value), F = _i({
|
|
3504
3502
|
attachedAssetUrl: E,
|
|
3505
3503
|
getPriority: X,
|
|
3506
3504
|
isInView: d,
|
|
@@ -3620,7 +3618,7 @@ var _i = ["aria-label"], vi = {
|
|
|
3620
3618
|
d.value = !0;
|
|
3621
3619
|
return;
|
|
3622
3620
|
}
|
|
3623
|
-
d.value =
|
|
3621
|
+
d.value = oi(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
3624
3622
|
}
|
|
3625
3623
|
function ie(e) {
|
|
3626
3624
|
if (!e) return;
|
|
@@ -3640,10 +3638,10 @@ var _i = ["aria-label"], vi = {
|
|
|
3640
3638
|
}), g.value = null, m.value = !1, T.value = !1, J(), K();
|
|
3641
3639
|
}
|
|
3642
3640
|
function se() {
|
|
3643
|
-
|
|
3641
|
+
ii(_.value);
|
|
3644
3642
|
}
|
|
3645
3643
|
function ce() {
|
|
3646
|
-
|
|
3644
|
+
ai(C.value);
|
|
3647
3645
|
}
|
|
3648
3646
|
function X() {
|
|
3649
3647
|
let e = y.value;
|
|
@@ -3657,8 +3655,8 @@ var _i = ["aria-label"], vi = {
|
|
|
3657
3655
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
3658
3656
|
}
|
|
3659
3657
|
function ue(e) {
|
|
3660
|
-
let t =
|
|
3661
|
-
return !e || !t ? !1 :
|
|
3658
|
+
let t = si(E.value);
|
|
3659
|
+
return !e || !t ? !1 : si("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
3662
3660
|
}
|
|
3663
3661
|
function de() {
|
|
3664
3662
|
r("open");
|
|
@@ -3686,8 +3684,8 @@ var _i = ["aria-label"], vi = {
|
|
|
3686
3684
|
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]",
|
|
3687
3685
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
3688
3686
|
onClick: de
|
|
3689
|
-
}, null, 8,
|
|
3690
|
-
B.value ? (w(), s("div",
|
|
3687
|
+
}, null, 8, vi),
|
|
3688
|
+
B.value ? (w(), s("div", yi, [c("span", bi, [u(N(oe), {
|
|
3691
3689
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3692
3690
|
"aria-hidden": "true"
|
|
3693
3691
|
})])])) : o("", !0),
|
|
@@ -3701,7 +3699,7 @@ var _i = ["aria-label"], vi = {
|
|
|
3701
3699
|
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"]),
|
|
3702
3700
|
onLoad: U,
|
|
3703
3701
|
onError: W
|
|
3704
|
-
}, null, 42,
|
|
3702
|
+
}, null, 42, xi)) : P.value && E.value && !R.value ? (w(), s("video", {
|
|
3705
3703
|
key: 2,
|
|
3706
3704
|
ref_key: "videoRef",
|
|
3707
3705
|
ref: C,
|
|
@@ -3717,31 +3715,31 @@ var _i = ["aria-label"], vi = {
|
|
|
3717
3715
|
onPlaying: ne,
|
|
3718
3716
|
onStalled: G,
|
|
3719
3717
|
onWaiting: G
|
|
3720
|
-
}, null, 42,
|
|
3718
|
+
}, null, 42, Si)) : R.value ? (w(), s("div", {
|
|
3721
3719
|
key: 3,
|
|
3722
3720
|
"data-testid": "vibe-list-card-error",
|
|
3723
3721
|
"data-kind": I.value,
|
|
3724
3722
|
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))]"
|
|
3725
|
-
}, [c("div",
|
|
3723
|
+
}, [c("div", wi, [
|
|
3726
3724
|
u(N(le), {
|
|
3727
3725
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3728
3726
|
"aria-hidden": "true"
|
|
3729
3727
|
}),
|
|
3730
|
-
c("span",
|
|
3728
|
+
c("span", Ti, j(N(rn)(I.value)), 1),
|
|
3731
3729
|
z.value ? (w(), s("button", {
|
|
3732
3730
|
key: 0,
|
|
3733
3731
|
type: "button",
|
|
3734
3732
|
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",
|
|
3735
3733
|
onClick: ee(ae, ["stop"])
|
|
3736
3734
|
}, " Retry ")) : o("", !0)
|
|
3737
|
-
])], 8,
|
|
3735
|
+
])], 8, Ci)) : (w(), s("div", Ei, [c("div", Di, [k(e.$slots, "item-icon", {
|
|
3738
3736
|
icon: N(Ot)(n.item.type),
|
|
3739
3737
|
item: n.item
|
|
3740
3738
|
}, () => [(w(), a(A(N(Ot)(n.item.type)), {
|
|
3741
3739
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3742
3740
|
"aria-hidden": "true"
|
|
3743
3741
|
}))])])])),
|
|
3744
|
-
c("div",
|
|
3742
|
+
c("div", Oi, [k(e.$slots, "grid-item-overlay", {
|
|
3745
3743
|
active: n.active,
|
|
3746
3744
|
focused: f.value,
|
|
3747
3745
|
hovered: p.value,
|
|
@@ -3751,24 +3749,24 @@ var _i = ["aria-label"], vi = {
|
|
|
3751
3749
|
})])
|
|
3752
3750
|
], 34));
|
|
3753
3751
|
}
|
|
3754
|
-
}),
|
|
3752
|
+
}), Ai = { 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)]" }, ji = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Mi = {
|
|
3755
3753
|
"data-testid": "vibe-pagination",
|
|
3756
3754
|
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]"
|
|
3757
|
-
},
|
|
3755
|
+
}, Ni = { class: "whitespace-nowrap" }, Pi = {
|
|
3758
3756
|
key: 0,
|
|
3759
3757
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
3760
|
-
},
|
|
3758
|
+
}, Fi = [
|
|
3761
3759
|
"data-active",
|
|
3762
3760
|
"data-index",
|
|
3763
3761
|
"data-item-id",
|
|
3764
3762
|
"data-occurrence-key"
|
|
3765
|
-
],
|
|
3763
|
+
], Ii = ["data-item-id"], Li = {
|
|
3766
3764
|
key: 0,
|
|
3767
3765
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
3768
|
-
},
|
|
3766
|
+
}, Ri = {
|
|
3769
3767
|
key: 1,
|
|
3770
3768
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
3771
|
-
},
|
|
3769
|
+
}, zi = { class: "mx-auto flex w-full justify-center" }, Bi = /* @__PURE__ */ d({
|
|
3772
3770
|
__name: "ListSurface",
|
|
3773
3771
|
props: {
|
|
3774
3772
|
active: {
|
|
@@ -3829,7 +3827,7 @@ var _i = ["aria-label"], vi = {
|
|
|
3829
3827
|
"update:activeIndex"
|
|
3830
3828
|
],
|
|
3831
3829
|
setup(e, { emit: n }) {
|
|
3832
|
-
let r = e, d = F(), f = n, p =
|
|
3830
|
+
let r = e, d = F(), f = n, p = ei({
|
|
3833
3831
|
active: M(r, "active"),
|
|
3834
3832
|
allowExhaustedNextPageRefresh: M(r, "allowExhaustedNextPageRefresh"),
|
|
3835
3833
|
items: M(r, "items"),
|
|
@@ -3874,8 +3872,8 @@ var _i = ["aria-label"], vi = {
|
|
|
3874
3872
|
nextBoundaryLoadProgress: e,
|
|
3875
3873
|
previousBoundaryLoadProgress: t
|
|
3876
3874
|
});
|
|
3877
|
-
}, { immediate: !0 }), (e, n) => (w(), s("div",
|
|
3878
|
-
c("div",
|
|
3875
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", Ai, [
|
|
3876
|
+
c("div", ji, [c("span", Mi, [c("span", Ni, j(N(p).paginationLabel.value), 1), r.paginationDetail ? (w(), s("span", Pi, j(r.paginationDetail), 1)) : o("", !0)])]),
|
|
3879
3877
|
c("div", {
|
|
3880
3878
|
ref: N(p).scrollViewportRef,
|
|
3881
3879
|
"data-testid": "vibe-list-scroll",
|
|
@@ -3896,7 +3894,7 @@ var _i = ["aria-label"], vi = {
|
|
|
3896
3894
|
"data-occurrence-key": N($)(t),
|
|
3897
3895
|
class: "absolute will-change-transform",
|
|
3898
3896
|
style: b(N(p).getCardStyle(n))
|
|
3899
|
-
}, [u(
|
|
3897
|
+
}, [u(ki, {
|
|
3900
3898
|
active: n === N(p).resolvedActiveIndex.value,
|
|
3901
3899
|
index: n,
|
|
3902
3900
|
item: t,
|
|
@@ -3920,14 +3918,14 @@ var _i = ["aria-label"], vi = {
|
|
|
3920
3918
|
"report-asset-load",
|
|
3921
3919
|
"surface-active",
|
|
3922
3920
|
"onOpen"
|
|
3923
|
-
])], 12,
|
|
3921
|
+
])], 12, Fi))), 128)),
|
|
3924
3922
|
(w(!0), s(t, null, O(N(p).leavingItems.value, (t) => (w(), s("article", {
|
|
3925
3923
|
key: `leaving-${N($)(t.item)}`,
|
|
3926
3924
|
"data-testid": "vibe-list-card-leaving",
|
|
3927
3925
|
"data-item-id": t.item.id,
|
|
3928
3926
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
3929
3927
|
style: b(N(p).getLeavingCardStyle(t.item))
|
|
3930
|
-
}, [u(
|
|
3928
|
+
}, [u(ki, {
|
|
3931
3929
|
active: !1,
|
|
3932
3930
|
index: -1,
|
|
3933
3931
|
item: t.item,
|
|
@@ -3942,8 +3940,8 @@ var _i = ["aria-label"], vi = {
|
|
|
3942
3940
|
"item",
|
|
3943
3941
|
"report-asset-error",
|
|
3944
3942
|
"report-asset-load"
|
|
3945
|
-
])], 12,
|
|
3946
|
-
N(A) && N(T) ? (w(), a(
|
|
3943
|
+
])], 12, Ii))), 128)),
|
|
3944
|
+
N(A) && N(T) ? (w(), a(On, {
|
|
3947
3945
|
key: 0,
|
|
3948
3946
|
message: N(T).message,
|
|
3949
3947
|
mode: N(T).mode,
|
|
@@ -3957,12 +3955,12 @@ var _i = ["aria-label"], vi = {
|
|
|
3957
3955
|
"surface"
|
|
3958
3956
|
])) : o("", !0)
|
|
3959
3957
|
], 4)], 544),
|
|
3960
|
-
N(p).showScrollbar.value ? (w(), s("div",
|
|
3958
|
+
N(p).showScrollbar.value ? (w(), s("div", Li, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
3961
3959
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
3962
3960
|
class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
|
|
3963
3961
|
style: b(N(p).getScrollbarThumbStyle())
|
|
3964
3962
|
}, null, 6)])) : o("", !0),
|
|
3965
|
-
d["grid-footer"] ? (w(), s("div",
|
|
3963
|
+
d["grid-footer"] ? (w(), s("div", Ri, [c("div", zi, [k(e.$slots, "grid-footer")])])) : o("", !0),
|
|
3966
3964
|
_.value ? (w(), s("div", {
|
|
3967
3965
|
key: 2,
|
|
3968
3966
|
class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
|
|
@@ -3971,7 +3969,7 @@ var _i = ["aria-label"], vi = {
|
|
|
3971
3969
|
"data-testid": "vibe-grid-status-badge",
|
|
3972
3970
|
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]", _.value.kind === "end" ? "border-amber-300/35 text-amber-200" : _.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
3973
3971
|
}, j(_.value.message), 3))], 2)) : o("", !0),
|
|
3974
|
-
N(E) && N(T) ? (w(), a(
|
|
3972
|
+
N(E) && N(T) ? (w(), a(On, {
|
|
3975
3973
|
key: 3,
|
|
3976
3974
|
class: v(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
3977
3975
|
message: N(T).message,
|
|
@@ -3988,13 +3986,13 @@ var _i = ["aria-label"], vi = {
|
|
|
3988
3986
|
])) : o("", !0)
|
|
3989
3987
|
]));
|
|
3990
3988
|
}
|
|
3991
|
-
}),
|
|
3989
|
+
}), Vi = ["data-surface-mode"], Hi = {
|
|
3992
3990
|
key: 1,
|
|
3993
3991
|
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"
|
|
3994
|
-
},
|
|
3992
|
+
}, Ui = ["data-visible", "inert"], Wi = ["data-visible", "inert"], Gi = {
|
|
3995
3993
|
key: 3,
|
|
3996
3994
|
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"
|
|
3997
|
-
},
|
|
3995
|
+
}, Ki = /* @__PURE__ */ d({
|
|
3998
3996
|
name: "VibeLayout",
|
|
3999
3997
|
__name: "Layout",
|
|
4000
3998
|
props: {
|
|
@@ -4048,7 +4046,7 @@ var _i = ["aria-label"], vi = {
|
|
|
4048
4046
|
type: "button",
|
|
4049
4047
|
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",
|
|
4050
4048
|
onClick: n[0] ||= (...e) => N(h).retryInitialLoad && N(h).retryInitialLoad(...e)
|
|
4051
|
-
}, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div",
|
|
4049
|
+
}, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div", Hi, j(N(h).errorMessage.value), 1)) : o("", !0), N(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
|
|
4052
4050
|
appear: "",
|
|
4053
4051
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
4054
4052
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -4062,7 +4060,7 @@ var _i = ["aria-label"], vi = {
|
|
|
4062
4060
|
"data-visible": N(h).surfaceMode.value === "list" ? "true" : "false",
|
|
4063
4061
|
inert: N(h).surfaceMode.value !== "list",
|
|
4064
4062
|
class: "absolute inset-0 z-[2]"
|
|
4065
|
-
}, [u(
|
|
4063
|
+
}, [u(Bi, {
|
|
4066
4064
|
active: N(h).surfaceMode.value === "list",
|
|
4067
4065
|
"allow-exhausted-next-page-refresh": N(h).canRefreshExhaustedNextPage.value,
|
|
4068
4066
|
items: N(h).items.value,
|
|
@@ -4132,7 +4130,7 @@ var _i = ["aria-label"], vi = {
|
|
|
4132
4130
|
"onBoundaryLoadProgress",
|
|
4133
4131
|
"onOpenFullscreen",
|
|
4134
4132
|
"onUpdate:activeIndex"
|
|
4135
|
-
])], 8,
|
|
4133
|
+
])], 8, Ui), [[I, N(h).surfaceMode.value === "list"]])]),
|
|
4136
4134
|
_: 3
|
|
4137
4135
|
}), u(r, {
|
|
4138
4136
|
appear: "",
|
|
@@ -4148,7 +4146,7 @@ var _i = ["aria-label"], vi = {
|
|
|
4148
4146
|
"data-visible": N(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
4149
4147
|
inert: N(h).surfaceMode.value !== "fullscreen",
|
|
4150
4148
|
class: "absolute inset-0 z-[3]"
|
|
4151
|
-
}, [u(
|
|
4149
|
+
}, [u(ur, {
|
|
4152
4150
|
items: N(h).items.value,
|
|
4153
4151
|
active: N(h).surfaceMode.value === "fullscreen",
|
|
4154
4152
|
"active-index": N(h).activeIndex.value,
|
|
@@ -4217,12 +4215,12 @@ var _i = ["aria-label"], vi = {
|
|
|
4217
4215
|
"show-back-to-list",
|
|
4218
4216
|
"onBackToList",
|
|
4219
4217
|
"onUpdate:activeIndex"
|
|
4220
|
-
])], 8,
|
|
4218
|
+
])], 8, Wi), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
|
|
4221
4219
|
_: 3
|
|
4222
|
-
})], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div",
|
|
4220
|
+
})], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", Gi, [u(N(oe), {
|
|
4223
4221
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
4224
4222
|
"aria-hidden": "true"
|
|
4225
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(
|
|
4223
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(ur, {
|
|
4226
4224
|
key: 4,
|
|
4227
4225
|
items: N(h).items.value,
|
|
4228
4226
|
active: !0,
|
|
@@ -4290,10 +4288,10 @@ var _i = ["aria-label"], vi = {
|
|
|
4290
4288
|
"show-status-badges",
|
|
4291
4289
|
"onBackToList",
|
|
4292
4290
|
"onUpdate:activeIndex"
|
|
4293
|
-
]))], 8,
|
|
4291
|
+
]))], 8, Vi));
|
|
4294
4292
|
}
|
|
4295
|
-
}),
|
|
4296
|
-
e.component("VibeLayout",
|
|
4293
|
+
}), qi = { install(e) {
|
|
4294
|
+
e.component("VibeLayout", Ki);
|
|
4297
4295
|
} };
|
|
4298
4296
|
//#endregion
|
|
4299
|
-
export {
|
|
4297
|
+
export { Ki as VibeLayout, qi as VibePlugin, qi as default };
|