@wyxos/vibe 3.0.5 → 3.0.7
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/README.md +10 -0
- package/lib/components/FullscreenSurface.vue.d.ts +4 -1
- package/lib/components/Layout.vue.d.ts +2 -1
- package/lib/components/ListSurface.vue.d.ts +4 -1
- package/lib/components/SurfaceEmptyState.vue.d.ts +21 -0
- package/lib/components/viewer-core/removalState.d.ts +3 -0
- package/lib/components/viewer-core/surfaceSlots.d.ts +8 -0
- package/lib/components/viewer-core/useAutoResolveSource.d.ts +3 -0
- package/lib/components/viewer-core/useController.d.ts +4 -0
- package/lib/components/viewer-core/useDataSource.d.ts +5 -0
- package/lib/components/viewer-core/useEdgeBoundary.d.ts +1 -0
- package/lib/components/viewer-core/useFullscreenSurfaceMedia.d.ts +23 -0
- package/lib/components/viewer-core/useMasonryList.d.ts +34 -0
- package/lib/components/viewer-core/useMasonryMotion.d.ts +41 -0
- package/lib/components/viewer-core/useSurfaceEmptyState.d.ts +15 -0
- package/lib/components/viewer-core/useViewer.d.ts +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +1273 -982
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, guardReactiveProps as f, h as p, isVNode as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, openBlock as S, reactive as C, readonly as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as O, toDisplayString as k, toRef as A, unref as j,
|
|
1
|
+
import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, guardReactiveProps as f, h as p, isVNode as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, openBlock as S, reactive as C, readonly as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as O, toDisplayString as k, toRef as A, unref as j, useAttrs as M, useSlots as N, vShow as P, watch as F, watchEffect as I, withCtx as L, withDirectives as R, withModifiers as z } from "vue";
|
|
2
2
|
//#region node_modules/lucide-vue-next/dist/esm/shared/src/utils/hasA11yProp.js
|
|
3
|
-
var
|
|
3
|
+
var B = (e) => {
|
|
4
4
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
5
5
|
return !1;
|
|
6
|
-
},
|
|
7
|
-
let t =
|
|
6
|
+
}, V = (e) => e === "", H = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), U = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), W = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), ee = (e) => {
|
|
7
|
+
let t = W(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
9
|
-
},
|
|
9
|
+
}, G = {
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11
11
|
width: 24,
|
|
12
12
|
height: 24,
|
|
@@ -16,27 +16,27 @@ var R = (e) => {
|
|
|
16
16
|
"stroke-width": 2,
|
|
17
17
|
"stroke-linecap": "round",
|
|
18
18
|
"stroke-linejoin": "round"
|
|
19
|
-
},
|
|
20
|
-
...
|
|
19
|
+
}, K = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = G.width, color: s = G.stroke, ...c }, { slots: l }) => p("svg", {
|
|
20
|
+
...G,
|
|
21
21
|
...c,
|
|
22
22
|
width: o,
|
|
23
23
|
height: o,
|
|
24
24
|
stroke: s,
|
|
25
|
-
"stroke-width":
|
|
26
|
-
class:
|
|
27
|
-
...!l.default && !
|
|
28
|
-
}, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]),
|
|
25
|
+
"stroke-width": V(n) || V(r) || n === !0 || r === !0 ? Number(i || a || G["stroke-width"]) * 24 / Number(o) : i || a || G["stroke-width"],
|
|
26
|
+
class: H("lucide", c.class, ...e ? [`lucide-${U(ee(e))}-icon`, `lucide-${U(e)}`] : ["lucide-icon"]),
|
|
27
|
+
...!l.default && !B(c) && { "aria-hidden": "true" }
|
|
28
|
+
}, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]), q = (e, t) => (n, { slots: r, attrs: i }) => p(K, {
|
|
29
29
|
...i,
|
|
30
30
|
...n,
|
|
31
31
|
iconNode: t,
|
|
32
32
|
name: e
|
|
33
|
-
}, r),
|
|
33
|
+
}, r), J = q("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
|
+
}]]), Y = q("audio-lines", [
|
|
40
40
|
["path", {
|
|
41
41
|
d: "M2 10v3",
|
|
42
42
|
key: "1fnikh"
|
|
@@ -61,7 +61,7 @@ var R = (e) => {
|
|
|
61
61
|
d: "M22 10v3",
|
|
62
62
|
key: "154ddg"
|
|
63
63
|
}]
|
|
64
|
-
]),
|
|
64
|
+
]), X = q("clapperboard", [
|
|
65
65
|
["path", {
|
|
66
66
|
d: "m12.296 3.464 3.02 3.956",
|
|
67
67
|
key: "qash78"
|
|
@@ -78,13 +78,13 @@ var R = (e) => {
|
|
|
78
78
|
d: "m6.18 5.276 3.1 3.899",
|
|
79
79
|
key: "zjj9t3"
|
|
80
80
|
}]
|
|
81
|
-
]),
|
|
81
|
+
]), te = q("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
|
-
}]]), ne =
|
|
87
|
+
}]]), ne = q("image-plus", [
|
|
88
88
|
["path", {
|
|
89
89
|
d: "M16 5h6",
|
|
90
90
|
key: "1vod17"
|
|
@@ -107,10 +107,10 @@ var R = (e) => {
|
|
|
107
107
|
r: "2",
|
|
108
108
|
key: "af1f0g"
|
|
109
109
|
}]
|
|
110
|
-
]), re =
|
|
110
|
+
]), re = q("loader-circle", [["path", {
|
|
111
111
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
112
112
|
key: "13zald"
|
|
113
|
-
}]]), ie =
|
|
113
|
+
}]]), ie = q("pause", [["rect", {
|
|
114
114
|
x: "14",
|
|
115
115
|
y: "3",
|
|
116
116
|
width: "5",
|
|
@@ -124,10 +124,10 @@ var R = (e) => {
|
|
|
124
124
|
height: "18",
|
|
125
125
|
rx: "1",
|
|
126
126
|
key: "1wsw3u"
|
|
127
|
-
}]]), ae =
|
|
127
|
+
}]]), ae = q("play", [["path", {
|
|
128
128
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
129
129
|
key: "10ikf1"
|
|
130
|
-
}]]), oe =
|
|
130
|
+
}]]), oe = q("triangle-alert", [
|
|
131
131
|
["path", {
|
|
132
132
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
133
133
|
key: "wmoenq"
|
|
@@ -142,12 +142,12 @@ var R = (e) => {
|
|
|
142
142
|
}]
|
|
143
143
|
]);
|
|
144
144
|
function se(e, t = 150) {
|
|
145
|
-
return
|
|
145
|
+
return le(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
return
|
|
147
|
+
function ce(e, t = 150) {
|
|
148
|
+
return le(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function le(e, t, n) {
|
|
151
151
|
let r = [], i = /* @__PURE__ */ new Set(), a = null;
|
|
152
152
|
function o(e) {
|
|
153
153
|
let o = t(e);
|
|
@@ -171,29 +171,29 @@ function ce(e, t, n) {
|
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region src/components/viewer-core/dom.ts
|
|
174
|
-
function
|
|
174
|
+
function ue(e) {
|
|
175
175
|
return e instanceof HTMLElement && [
|
|
176
176
|
"INPUT",
|
|
177
177
|
"TEXTAREA",
|
|
178
178
|
"SELECT"
|
|
179
179
|
].includes(e.tagName);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function de(e) {
|
|
182
182
|
return e instanceof HTMLElement && !!e.closest("[data-swipe-lock], input, textarea, select, a");
|
|
183
183
|
}
|
|
184
184
|
//#endregion
|
|
185
185
|
//#region src/components/viewer-core/removalState.ts
|
|
186
|
-
function
|
|
186
|
+
function fe() {
|
|
187
187
|
let e = T(/* @__PURE__ */ new Set()), t = T([]);
|
|
188
188
|
function n(n) {
|
|
189
|
-
let r =
|
|
189
|
+
let r = Z(n).filter((t) => !e.value.has(t));
|
|
190
190
|
if (!r.length) return { ids: [] };
|
|
191
191
|
let i = new Set(e.value);
|
|
192
192
|
for (let e of r) i.add(e);
|
|
193
193
|
return e.value = i, t.value = [...t.value, r], { ids: r };
|
|
194
194
|
}
|
|
195
195
|
function r(t) {
|
|
196
|
-
let n =
|
|
196
|
+
let n = Z(t).filter((t) => e.value.has(t));
|
|
197
197
|
if (!n.length) return { ids: [] };
|
|
198
198
|
let r = new Set(e.value);
|
|
199
199
|
for (let e of n) r.delete(e);
|
|
@@ -224,92 +224,92 @@ function le() {
|
|
|
224
224
|
undo: i
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Z(e) {
|
|
228
228
|
let t = Array.isArray(e) ? e : [e];
|
|
229
229
|
return Array.from(new Set(t.filter((e) => typeof e == "string" && e.length > 0)));
|
|
230
230
|
}
|
|
231
231
|
//#endregion
|
|
232
232
|
//#region src/components/viewer-core/itemIdentity.ts
|
|
233
|
-
var
|
|
234
|
-
function
|
|
235
|
-
let t = e[
|
|
233
|
+
var pe = "__vibeOccurrenceKey";
|
|
234
|
+
function Q(e) {
|
|
235
|
+
let t = e[pe];
|
|
236
236
|
return typeof t == "string" && t.length > 0 ? t : e.id;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function me(e, t, n) {
|
|
239
239
|
let r = /* @__PURE__ */ new Map(), i = [], a = n;
|
|
240
240
|
for (let e of t) {
|
|
241
|
-
let t = r.get(e.id), n =
|
|
241
|
+
let t = r.get(e.id), n = Q(e);
|
|
242
242
|
t ? t.push(n) : r.set(e.id, [n]);
|
|
243
243
|
}
|
|
244
244
|
for (let t of e) {
|
|
245
245
|
let e = r.get(t.id)?.shift() ?? `vibe-occurrence-${a += 1}`;
|
|
246
|
-
i.push(
|
|
246
|
+
i.push(he(t, e));
|
|
247
247
|
}
|
|
248
248
|
return {
|
|
249
249
|
items: i,
|
|
250
250
|
nextSequence: a
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
return
|
|
253
|
+
function he(e, t) {
|
|
254
|
+
return Q(e) === t ? e : {
|
|
255
255
|
...e,
|
|
256
|
-
[
|
|
256
|
+
[pe]: t
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
259
|
//#endregion
|
|
260
260
|
//#region src/components/viewer-core/autoBuckets.ts
|
|
261
|
-
function
|
|
261
|
+
function ge(e) {
|
|
262
262
|
return e.flatMap((e) => e.items);
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function _e(e, t) {
|
|
265
265
|
return t.size ? e.filter((e) => !t.has(e.id)) : e;
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
return
|
|
267
|
+
function ve(e, t) {
|
|
268
|
+
return _e(e.items, t);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
return
|
|
270
|
+
function ye(e, t) {
|
|
271
|
+
return ve(e, t).length;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function be(e, t, n) {
|
|
274
274
|
if (n < 0) return null;
|
|
275
275
|
let r = 0;
|
|
276
276
|
for (let i of e) {
|
|
277
|
-
let e =
|
|
277
|
+
let e = ve(i, t), a = r + e.length;
|
|
278
278
|
if (n < a) return i.cursor;
|
|
279
279
|
r = a;
|
|
280
280
|
}
|
|
281
281
|
return null;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function xe(e, t, n) {
|
|
284
284
|
let r = [...e], i = r.findIndex((e) => e.cursor === t);
|
|
285
285
|
return i >= 0 && r.splice(i, 1, n), r;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
let r =
|
|
287
|
+
function Se(e, t, n) {
|
|
288
|
+
let r = me(e, t, n);
|
|
289
289
|
return {
|
|
290
290
|
items: r.items,
|
|
291
291
|
nextSequence: r.nextSequence
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Ce(e) {
|
|
295
295
|
return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function we(e) {
|
|
298
298
|
return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Te(e) {
|
|
301
301
|
return e ?? "__vibe_initial_cursor__";
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function Ee(e, t, n) {
|
|
304
304
|
return Math.min(Math.max(e, t), n);
|
|
305
305
|
}
|
|
306
306
|
//#endregion
|
|
307
307
|
//#region src/components/viewer-core/autoResolveState.ts
|
|
308
|
-
function
|
|
308
|
+
function De(e) {
|
|
309
309
|
return e instanceof DOMException && e.name === "AbortError" || e instanceof Error && (e.name === "AbortError" || e.name === "CanceledError") ? !0 : typeof e == "object" && !!e && "code" in e && e.code === "ERR_CANCELED";
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
let t =
|
|
311
|
+
function Oe(e) {
|
|
312
|
+
let t = Se(e.nextItems, e.previousItems, e.sequence);
|
|
313
313
|
return {
|
|
314
314
|
bucket: {
|
|
315
315
|
cursor: e.cursor,
|
|
@@ -320,7 +320,7 @@ function Ee(e) {
|
|
|
320
320
|
nextSequence: t.nextSequence
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function ke(e, t, n, r) {
|
|
324
324
|
if (!e.length) return r ? null : {
|
|
325
325
|
buckets: [],
|
|
326
326
|
canceled: r,
|
|
@@ -330,46 +330,46 @@ function De(e, t, n, r) {
|
|
|
330
330
|
return {
|
|
331
331
|
buckets: i,
|
|
332
332
|
canceled: r,
|
|
333
|
-
visibleCount: i.reduce((e, t) => e +
|
|
333
|
+
visibleCount: i.reduce((e, t) => e + ye(t, n), 0)
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
let t =
|
|
336
|
+
function Ae(e) {
|
|
337
|
+
let t = Oe({
|
|
338
338
|
cursor: e.initialState.cursor,
|
|
339
339
|
nextCursor: e.initialState.nextCursor ?? null,
|
|
340
340
|
nextItems: e.initialState.items,
|
|
341
341
|
previousCursor: e.initialState.previousCursor ?? null,
|
|
342
342
|
previousItems: [],
|
|
343
343
|
sequence: e.sequence
|
|
344
|
-
}), n =
|
|
344
|
+
}), n = _e(t.bucket.items, e.removedIds);
|
|
345
345
|
return {
|
|
346
|
-
activeIndex:
|
|
346
|
+
activeIndex: Ee(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
|
|
347
347
|
buckets: [t.bucket],
|
|
348
348
|
nextSequence: t.nextSequence
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
let n = e[
|
|
353
|
-
return n ?
|
|
351
|
+
function je(e, t) {
|
|
352
|
+
let n = e[Ee(t, 0, Math.max(0, e.length - 1))];
|
|
353
|
+
return n ? Q(n) : null;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function Me(e, t, n = null) {
|
|
356
356
|
if (!e.length) return 0;
|
|
357
|
-
let r = n ? e.findIndex((e) =>
|
|
358
|
-
return r >= 0 ? r :
|
|
357
|
+
let r = n ? e.findIndex((e) => Q(e) === n) : -1;
|
|
358
|
+
return r >= 0 ? r : Ee(t, 0, e.length - 1);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
return e ?
|
|
360
|
+
function Ne(e, t, n) {
|
|
361
|
+
return e ? ye(e, t) < n : !1;
|
|
362
362
|
}
|
|
363
363
|
//#endregion
|
|
364
364
|
//#region src/components/viewer-core/fillDelay.ts
|
|
365
|
-
var
|
|
366
|
-
function
|
|
365
|
+
var Pe = 2e3, Fe = 1e3, Ie = 100;
|
|
366
|
+
function Le(e, t = Pe, n = Fe) {
|
|
367
367
|
return t + Math.max(0, e - 1) * n;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Re(e, t) {
|
|
370
370
|
return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function ze() {
|
|
373
373
|
let e = T(null), t = null, n = null, r = null;
|
|
374
374
|
function i(i = !1) {
|
|
375
375
|
if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
|
|
@@ -387,7 +387,7 @@ function Le() {
|
|
|
387
387
|
let t = Math.max(0, a - (Date.now() - s));
|
|
388
388
|
e.value = t, t <= 0 && l();
|
|
389
389
|
};
|
|
390
|
-
t = setInterval(u,
|
|
390
|
+
t = setInterval(u, Ie), n = setTimeout(l, a), u();
|
|
391
391
|
}));
|
|
392
392
|
}
|
|
393
393
|
return {
|
|
@@ -398,258 +398,293 @@ function Le() {
|
|
|
398
398
|
}
|
|
399
399
|
//#endregion
|
|
400
400
|
//#region src/components/viewer-core/useAutoResolveSource.ts
|
|
401
|
-
function
|
|
402
|
-
let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(
|
|
403
|
-
|
|
401
|
+
function Be(e) {
|
|
402
|
+
let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = ze(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Re(e.fillDelayMs, Pe)), w = i(() => Re(e.fillDelayStepMs, Fe)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => we(e.pageSize)), k = i(() => ge(n.value)), A = i(() => _e(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => Ce(c.value) || p.value), N = i(() => Ve(n.value, e.removedIds.value)), P = i(() => He(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value), B = i(() => E.value && n.value.length > 0), V = i(() => _e(ge(a.value), e.removedIds.value)), H = i(() => be(n.value, e.removedIds.value, j.value)), U = i(() => !A.value.length && !M.value && !!s.value);
|
|
403
|
+
F(() => A.value.length, (e) => {
|
|
404
404
|
if (e === 0) {
|
|
405
405
|
r.value = 0;
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
r.value > e - 1 && (r.value = e - 1);
|
|
409
|
-
}),
|
|
410
|
-
|
|
408
|
+
o.value &&= (he(), !1), r.value > e - 1 && (r.value = e - 1);
|
|
409
|
+
}), F(() => r.value, () => {
|
|
410
|
+
m.value && se();
|
|
411
411
|
}), x(() => {
|
|
412
|
-
|
|
412
|
+
pe() || e.resolve && W();
|
|
413
413
|
}), b(() => {
|
|
414
|
-
|
|
414
|
+
_?.abort(), _ = null, u.clear(!0);
|
|
415
415
|
});
|
|
416
|
-
async function
|
|
417
|
-
|
|
418
|
-
let t = await
|
|
419
|
-
continueUntilFilled:
|
|
416
|
+
async function W() {
|
|
417
|
+
v = W;
|
|
418
|
+
let t = await de({
|
|
419
|
+
continueUntilFilled: D.value === "dynamic",
|
|
420
420
|
cursor: e.initialCursor ?? null,
|
|
421
421
|
direction: "forward",
|
|
422
422
|
phase: "initializing"
|
|
423
423
|
});
|
|
424
424
|
t && (n.value = t.buckets, r.value = 0, Z());
|
|
425
425
|
}
|
|
426
|
-
async function
|
|
427
|
-
if (!
|
|
428
|
-
if (!
|
|
429
|
-
if (
|
|
430
|
-
await
|
|
426
|
+
async function ee() {
|
|
427
|
+
if (!(h.value || M.value)) {
|
|
428
|
+
if (!R.value) return B.value ? ue("trailing") : void 0;
|
|
429
|
+
if (D.value === "static" && me("trailing")) return ue("trailing");
|
|
430
|
+
await ce(I.value);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
async function
|
|
434
|
-
if (!(!
|
|
435
|
-
if (
|
|
436
|
-
await
|
|
433
|
+
async function G() {
|
|
434
|
+
if (!(h.value || !z.value || M.value)) {
|
|
435
|
+
if (D.value === "static" && me("leading")) return ue("leading");
|
|
436
|
+
await le(L.value);
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
async function
|
|
440
|
-
if (
|
|
441
|
-
if (n.value = [], r.value = 0, a.value = [], o.value =
|
|
439
|
+
async function K() {
|
|
440
|
+
if (U.value) {
|
|
441
|
+
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0), pe()) {
|
|
442
442
|
Z();
|
|
443
443
|
return;
|
|
444
444
|
}
|
|
445
|
-
await
|
|
445
|
+
await W();
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
async function
|
|
449
|
-
if (
|
|
450
|
-
|
|
448
|
+
async function q() {
|
|
449
|
+
if (U.value) return K();
|
|
450
|
+
h.value || c.value !== "failed" || !v || (s.value = null, await v());
|
|
451
451
|
}
|
|
452
|
-
async function
|
|
453
|
-
if (!a.value.length) return
|
|
454
|
-
n.value = [...n.value, ...a.value], a.value = [],
|
|
452
|
+
async function J() {
|
|
453
|
+
if (!a.value.length) return p.value = !1, Z();
|
|
454
|
+
n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Z();
|
|
455
455
|
}
|
|
456
|
-
function
|
|
457
|
-
let n =
|
|
456
|
+
function Y(t) {
|
|
457
|
+
let n = A.value;
|
|
458
458
|
if (!n.length) return;
|
|
459
|
-
let i =
|
|
459
|
+
let i = Ee(t, 0, n.length - 1);
|
|
460
460
|
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
461
461
|
}
|
|
462
|
-
function
|
|
463
|
-
|
|
462
|
+
function X(e) {
|
|
463
|
+
m.value = e;
|
|
464
464
|
}
|
|
465
465
|
function te() {
|
|
466
|
-
|
|
466
|
+
h.value = !0, u.clear(!0);
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
function ne(e = null) {
|
|
472
|
-
r.value = Ae(O.value, k.value, e);
|
|
468
|
+
function ne() {
|
|
469
|
+
h.value = !1;
|
|
473
470
|
}
|
|
474
471
|
function re() {
|
|
475
|
-
a.value.length > 0 &&
|
|
472
|
+
y += 1, _?.abort(), _ = null, u.clear(!0), g.clear(), s.value = null, l.value = null, f.value = null, a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), p.value = !1, o.value = !1, Z();
|
|
476
473
|
}
|
|
477
|
-
|
|
478
|
-
|
|
474
|
+
function ie() {
|
|
475
|
+
return je(A.value, j.value);
|
|
479
476
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
477
|
+
function ae(e = null) {
|
|
478
|
+
if (A.value.length === 0) {
|
|
479
|
+
r.value = 0, n.value.length > 0 && (o.value = !0);
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
r.value = Me(A.value, j.value, e);
|
|
483
|
+
}
|
|
484
|
+
function oe() {
|
|
485
|
+
a.value.length > 0 && !V.value.length && J();
|
|
486
|
+
}
|
|
487
|
+
async function se() {
|
|
488
|
+
!A.value.length || Q() || (z.value && r.value < 3 && await G(), R.value && r.value >= A.value.length - 3 && await ee());
|
|
489
|
+
}
|
|
490
|
+
async function ce(e) {
|
|
491
|
+
v = async () => {
|
|
492
|
+
await ce(e);
|
|
483
493
|
};
|
|
484
|
-
let t = await
|
|
485
|
-
continueUntilFilled:
|
|
494
|
+
let t = await de({
|
|
495
|
+
continueUntilFilled: D.value === "dynamic",
|
|
486
496
|
cursor: e,
|
|
487
497
|
direction: "forward",
|
|
488
498
|
phase: "loading"
|
|
489
499
|
});
|
|
490
500
|
if (t) {
|
|
491
|
-
if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [],
|
|
492
|
-
if (a.value = t.buckets, !
|
|
493
|
-
|
|
501
|
+
if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1, Z();
|
|
502
|
+
if (a.value = t.buckets, !V.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Z();
|
|
503
|
+
p.value = !0;
|
|
494
504
|
}
|
|
495
505
|
}
|
|
496
|
-
async function
|
|
497
|
-
|
|
498
|
-
await
|
|
506
|
+
async function le(e) {
|
|
507
|
+
v = async () => {
|
|
508
|
+
await le(e);
|
|
499
509
|
};
|
|
500
|
-
let t = await
|
|
501
|
-
continueUntilFilled:
|
|
510
|
+
let t = await de({
|
|
511
|
+
continueUntilFilled: D.value === "dynamic",
|
|
502
512
|
cursor: e,
|
|
503
513
|
direction: "backward",
|
|
504
514
|
phase: "loading"
|
|
505
515
|
});
|
|
506
516
|
if (!t) return;
|
|
507
|
-
let r =
|
|
508
|
-
n.value = [...t.buckets, ...n.value],
|
|
517
|
+
let r = ie();
|
|
518
|
+
n.value = [...t.buckets, ...n.value], ae(r), Z();
|
|
509
519
|
}
|
|
510
|
-
async function
|
|
511
|
-
if (
|
|
512
|
-
await
|
|
520
|
+
async function ue(t) {
|
|
521
|
+
if (v = async () => {
|
|
522
|
+
await ue(t);
|
|
513
523
|
}, !e.resolve) return;
|
|
514
|
-
let r = t === "leading" ?
|
|
524
|
+
let r = t === "leading" ? N.value : P.value;
|
|
515
525
|
if (!r) return;
|
|
516
|
-
let i =
|
|
517
|
-
if (
|
|
518
|
-
|
|
519
|
-
let a = ++
|
|
520
|
-
|
|
526
|
+
let i = Te(r.cursor);
|
|
527
|
+
if (g.has(i)) return;
|
|
528
|
+
g.add(i), s.value = null, c.value = "refreshing", l.value = null, f.value = null;
|
|
529
|
+
let a = ++y, o = typeof AbortController > "u" ? null : new AbortController();
|
|
530
|
+
_ = o;
|
|
521
531
|
try {
|
|
522
532
|
let t = await e.resolve({
|
|
523
533
|
cursor: r.cursor,
|
|
524
|
-
pageSize:
|
|
525
|
-
signal:
|
|
534
|
+
pageSize: O.value,
|
|
535
|
+
signal: o?.signal
|
|
526
536
|
});
|
|
527
|
-
if (a !==
|
|
528
|
-
let i =
|
|
537
|
+
if (a !== y) return Z();
|
|
538
|
+
let i = fe({
|
|
529
539
|
cursor: r.cursor,
|
|
530
540
|
nextCursor: t.nextPage,
|
|
531
541
|
nextItems: t.items,
|
|
532
542
|
previousCursor: t.previousPage ?? null,
|
|
533
543
|
previousItems: r.items
|
|
534
|
-
}),
|
|
535
|
-
n.value =
|
|
544
|
+
}), s = ie();
|
|
545
|
+
n.value = xe(n.value, r.cursor, i), ae(s), Z();
|
|
536
546
|
} catch (e) {
|
|
537
|
-
if (
|
|
547
|
+
if (De(e) || a !== y) {
|
|
538
548
|
Z();
|
|
539
549
|
return;
|
|
540
550
|
}
|
|
541
|
-
|
|
551
|
+
s.value = e instanceof Error ? e.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null;
|
|
542
552
|
} finally {
|
|
543
|
-
|
|
553
|
+
_ === o && (_ = null), g.delete(i);
|
|
544
554
|
}
|
|
545
555
|
}
|
|
546
|
-
async function
|
|
556
|
+
async function de(t) {
|
|
547
557
|
if (!e.resolve) return null;
|
|
548
|
-
let n = ++
|
|
549
|
-
for (
|
|
550
|
-
if (n !==
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
r.
|
|
558
|
+
let n = ++y, r = /* @__PURE__ */ new Set(), i = [], a = t.cursor, o = 0;
|
|
559
|
+
for (s.value = null, c.value = t.phase, l.value = null, f.value = null;;) {
|
|
560
|
+
if (n !== y) return ke(i, t.direction, e.removedIds.value, !0);
|
|
561
|
+
if (i.length > 0 && h.value) return ke(i, t.direction, e.removedIds.value, !1);
|
|
562
|
+
let d = Te(a);
|
|
563
|
+
if (r.has(d) || g.has(d)) break;
|
|
564
|
+
r.add(d), g.add(d);
|
|
554
565
|
let p = typeof AbortController > "u" ? null : new AbortController();
|
|
555
|
-
|
|
566
|
+
_ = p;
|
|
556
567
|
try {
|
|
557
568
|
let r = await e.resolve({
|
|
558
569
|
cursor: a,
|
|
559
|
-
pageSize:
|
|
570
|
+
pageSize: O.value,
|
|
560
571
|
signal: p?.signal
|
|
561
572
|
});
|
|
562
|
-
if (n !==
|
|
563
|
-
let
|
|
573
|
+
if (n !== y) return ke(i, t.direction, e.removedIds.value, !0);
|
|
574
|
+
let s = fe({
|
|
564
575
|
cursor: a,
|
|
565
576
|
nextCursor: r.nextPage,
|
|
566
577
|
nextItems: r.items,
|
|
567
578
|
previousCursor: r.previousPage ?? null,
|
|
568
579
|
previousItems: []
|
|
569
580
|
});
|
|
570
|
-
i.push(
|
|
571
|
-
let
|
|
572
|
-
if (!t.continueUntilFilled ||
|
|
581
|
+
i.push(s);
|
|
582
|
+
let d = i.reduce((t, n) => t + ye(n, e.removedIds.value), 0), m = t.direction === "forward" ? s.nextCursor : s.previousCursor;
|
|
583
|
+
if (!t.continueUntilFilled || d >= O.value || !m) return {
|
|
573
584
|
canceled: !1,
|
|
574
585
|
buckets: t.direction === "backward" ? [...i].reverse() : i,
|
|
575
|
-
visibleCount:
|
|
586
|
+
visibleCount: d
|
|
576
587
|
};
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
588
|
+
if (h.value) return ke(i, t.direction, e.removedIds.value, !1);
|
|
589
|
+
c.value = "filling", l.value = d, f.value = O.value, o += 1;
|
|
590
|
+
let g = Le(o, C.value, w.value);
|
|
591
|
+
if (await u.wait(g), n !== y) return ke(i, t.direction, e.removedIds.value, !0);
|
|
580
592
|
a = m;
|
|
581
593
|
} catch (r) {
|
|
582
|
-
return
|
|
594
|
+
return De(r) || n !== y ? ke(i, t.direction, e.removedIds.value, !0) : (s.value = r instanceof Error ? r.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null, null);
|
|
583
595
|
} finally {
|
|
584
|
-
|
|
596
|
+
_ === p && (_ = null), g.delete(d);
|
|
585
597
|
}
|
|
586
598
|
}
|
|
587
|
-
return
|
|
599
|
+
return ke(i, t.direction, e.removedIds.value, !1);
|
|
588
600
|
}
|
|
589
|
-
function
|
|
590
|
-
let t =
|
|
601
|
+
function fe(e) {
|
|
602
|
+
let t = Oe({
|
|
591
603
|
cursor: e.cursor,
|
|
592
604
|
nextCursor: e.nextCursor,
|
|
593
605
|
nextItems: e.nextItems,
|
|
594
606
|
previousCursor: e.previousCursor,
|
|
595
607
|
previousItems: e.previousItems,
|
|
596
|
-
sequence:
|
|
608
|
+
sequence: S
|
|
597
609
|
});
|
|
598
|
-
return
|
|
610
|
+
return S = t.nextSequence, t.bucket;
|
|
599
611
|
}
|
|
600
612
|
function Z() {
|
|
601
|
-
|
|
613
|
+
c.value = "idle", l.value = null, f.value = null, u.clear();
|
|
602
614
|
}
|
|
603
|
-
function
|
|
615
|
+
function pe() {
|
|
604
616
|
if (!e.initialState || !e.initialState.items.length) return !1;
|
|
605
|
-
let t =
|
|
617
|
+
let t = Ae({
|
|
606
618
|
initialState: e.initialState,
|
|
607
619
|
removedIds: e.removedIds.value,
|
|
608
|
-
sequence:
|
|
620
|
+
sequence: S
|
|
609
621
|
});
|
|
610
|
-
return n.value = t.buckets, r.value = t.activeIndex,
|
|
611
|
-
}
|
|
612
|
-
function le() {
|
|
613
|
-
return s.value === "initializing";
|
|
622
|
+
return n.value = t.buckets, r.value = t.activeIndex, S = t.nextSequence, o.value = !1, s.value = null, a.value = [], p.value = !1, !0;
|
|
614
623
|
}
|
|
615
|
-
function
|
|
616
|
-
return
|
|
624
|
+
function Q() {
|
|
625
|
+
return c.value === "initializing";
|
|
626
|
+
}
|
|
627
|
+
function me(t) {
|
|
628
|
+
return Ne(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
|
|
629
|
+
}
|
|
630
|
+
function he() {
|
|
631
|
+
let t = n.value.findIndex((t) => ye(t, e.removedIds.value) > 0);
|
|
632
|
+
if (t < 0) return;
|
|
633
|
+
let r = t;
|
|
634
|
+
for (let i = n.value.length - 1; i >= t; --i) if (ye(n.value[i], e.removedIds.value) > 0) {
|
|
635
|
+
r = i;
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
n.value = n.value.slice(t, r + 1);
|
|
617
639
|
}
|
|
618
640
|
return {
|
|
619
|
-
activeIndex:
|
|
620
|
-
canRetryInitialLoad:
|
|
621
|
-
cancel:
|
|
622
|
-
canRefreshTrailingBoundary:
|
|
623
|
-
commitPendingAppend:
|
|
624
|
-
currentCursor:
|
|
625
|
-
errorMessage:
|
|
626
|
-
fillCollectedCount:
|
|
627
|
-
fillDelayRemainingMs:
|
|
628
|
-
fillTargetCount:
|
|
629
|
-
hasNextPage:
|
|
630
|
-
hasPreviousPage:
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
641
|
+
activeIndex: j,
|
|
642
|
+
canRetryInitialLoad: U,
|
|
643
|
+
cancel: re,
|
|
644
|
+
canRefreshTrailingBoundary: B,
|
|
645
|
+
commitPendingAppend: J,
|
|
646
|
+
currentCursor: H,
|
|
647
|
+
errorMessage: s,
|
|
648
|
+
fillCollectedCount: l,
|
|
649
|
+
fillDelayRemainingMs: d,
|
|
650
|
+
fillTargetCount: f,
|
|
651
|
+
hasNextPage: R,
|
|
652
|
+
hasPreviousPage: z,
|
|
653
|
+
isPageLoadingLocked: h,
|
|
654
|
+
items: A,
|
|
655
|
+
lockPageLoading: te,
|
|
656
|
+
loading: M,
|
|
657
|
+
mode: D,
|
|
658
|
+
nextCursor: I,
|
|
659
|
+
pendingAppendItems: V,
|
|
660
|
+
phase: c,
|
|
661
|
+
prefetchNextPage: ee,
|
|
662
|
+
prefetchPreviousPage: G,
|
|
663
|
+
previousCursor: L,
|
|
664
|
+
retryInitialLoad: K,
|
|
665
|
+
retry: q,
|
|
666
|
+
setActiveIndex: Y,
|
|
667
|
+
setAutoPrefetchEnabled: X,
|
|
668
|
+
syncActiveIndexAfterVisibilityChange: ae,
|
|
669
|
+
unlockPageLoading: ne,
|
|
670
|
+
getActiveOccurrenceKey: ie,
|
|
671
|
+
maybeCommitPendingAppendWhenFilteredOut: oe
|
|
647
672
|
};
|
|
648
673
|
}
|
|
674
|
+
function Ve(e, t) {
|
|
675
|
+
return e.find((e) => ye(e, t) > 0) ?? e[0] ?? null;
|
|
676
|
+
}
|
|
677
|
+
function He(e, t) {
|
|
678
|
+
for (let n = e.length - 1; n >= 0; --n) {
|
|
679
|
+
let r = e[n];
|
|
680
|
+
if (ye(r, t) > 0) return r;
|
|
681
|
+
}
|
|
682
|
+
return e[e.length - 1] ?? null;
|
|
683
|
+
}
|
|
649
684
|
//#endregion
|
|
650
685
|
//#region src/components/viewer-core/useDataSource.ts
|
|
651
|
-
function
|
|
652
|
-
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } =
|
|
686
|
+
function Ue(e, t) {
|
|
687
|
+
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = fe(), l = Be({
|
|
653
688
|
emit: t,
|
|
654
689
|
fillDelayMs: e.fillDelayMs,
|
|
655
690
|
fillDelayStepMs: e.fillDelayStepMs,
|
|
@@ -710,7 +745,9 @@ function ze(e, t) {
|
|
|
710
745
|
getRemovedIds: r,
|
|
711
746
|
hasNextPage: p,
|
|
712
747
|
hasPreviousPage: m,
|
|
748
|
+
isPageLoadingLocked: l.isPageLoadingLocked,
|
|
713
749
|
items: u,
|
|
750
|
+
lockPageLoading: l.lockPageLoading,
|
|
714
751
|
loading: f,
|
|
715
752
|
loadNext: T,
|
|
716
753
|
loadPrevious: E,
|
|
@@ -729,14 +766,15 @@ function ze(e, t) {
|
|
|
729
766
|
retryInitialLoad: l.retryInitialLoad,
|
|
730
767
|
setActiveIndex: v,
|
|
731
768
|
setAutoPrefetchEnabled: l.setAutoPrefetchEnabled,
|
|
732
|
-
undo: x
|
|
769
|
+
undo: x,
|
|
770
|
+
unlockPageLoading: l.unlockPageLoading
|
|
733
771
|
};
|
|
734
772
|
}
|
|
735
773
|
//#endregion
|
|
736
774
|
//#region src/components/viewer-core/useController.ts
|
|
737
|
-
var
|
|
738
|
-
function
|
|
739
|
-
let n =
|
|
775
|
+
var We = 1024;
|
|
776
|
+
function Ge(e, t) {
|
|
777
|
+
let n = Ue(e, t), r = T(0), a = T("list"), o = C({
|
|
740
778
|
activeIndex: 0,
|
|
741
779
|
currentCursor: null,
|
|
742
780
|
errorMessage: null,
|
|
@@ -749,22 +787,25 @@ function Ve(e, t) {
|
|
|
749
787
|
loadState: "loaded",
|
|
750
788
|
mode: "dynamic",
|
|
751
789
|
nextCursor: null,
|
|
790
|
+
pageLoadingLocked: !1,
|
|
752
791
|
phase: "idle",
|
|
753
792
|
previousCursor: null,
|
|
754
793
|
removedCount: 0,
|
|
755
794
|
removedIds: [],
|
|
756
795
|
surfaceMode: "list"
|
|
757
|
-
}), s = i(() => r.value >=
|
|
758
|
-
|
|
796
|
+
}), s = i(() => r.value >= We), c = i(() => s.value ? a.value : "fullscreen"), l = i(() => s.value && c.value === "fullscreen");
|
|
797
|
+
F(s, (e) => {
|
|
759
798
|
e && m();
|
|
760
|
-
}),
|
|
799
|
+
}), F(() => e.surfaceMode, () => {
|
|
761
800
|
m();
|
|
762
|
-
}),
|
|
801
|
+
}), F([c, () => n.pendingAppendItems.value.length], ([e, t]) => {
|
|
763
802
|
e === "list" || t <= 0 || n.commitPendingAppend();
|
|
764
|
-
}),
|
|
803
|
+
}), F(() => n.items.value.length, (e) => {
|
|
804
|
+
!s.value || e > 0 || a.value === "list" || (a.value = "list", t("update:surfaceMode", "list"));
|
|
805
|
+
}), F(c, (e) => {
|
|
765
806
|
n.setAutoPrefetchEnabled(e === "fullscreen");
|
|
766
|
-
}, { immediate: !0 }),
|
|
767
|
-
o.activeIndex = n.activeIndex.value, o.currentCursor = n.currentCursor.value, o.errorMessage = n.errorMessage.value, o.fillCollectedCount = n.fillCollectedCount.value, o.fillDelayRemainingMs = n.fillDelayRemainingMs.value, o.fillTargetCount = n.fillTargetCount.value, o.hasNextPage = n.hasNextPage.value, o.hasPreviousPage = n.hasPreviousPage.value, o.itemCount = n.items.value.length, o.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", o.mode = n.mode.value, o.nextCursor = n.nextCursor.value, o.phase = n.phase.value, o.previousCursor = n.previousCursor.value, o.removedCount = n.removedCount.value, o.removedIds = n.getRemovedIds(), o.surfaceMode = c.value;
|
|
807
|
+
}, { immediate: !0 }), I(() => {
|
|
808
|
+
o.activeIndex = n.activeIndex.value, o.currentCursor = n.currentCursor.value, o.errorMessage = n.errorMessage.value, o.fillCollectedCount = n.fillCollectedCount.value, o.fillDelayRemainingMs = n.fillDelayRemainingMs.value, o.fillTargetCount = n.fillTargetCount.value, o.hasNextPage = n.hasNextPage.value, o.hasPreviousPage = n.hasPreviousPage.value, o.itemCount = n.items.value.length, o.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", o.mode = n.mode.value, o.nextCursor = n.nextCursor.value, o.pageLoadingLocked = n.isPageLoadingLocked.value, o.phase = n.phase.value, o.previousCursor = n.previousCursor.value, o.removedCount = n.removedCount.value, o.removedIds = n.getRemovedIds(), o.surfaceMode = c.value;
|
|
768
809
|
}), x(() => {
|
|
769
810
|
p(), m(), window.addEventListener("keydown", f), window.addEventListener("resize", p);
|
|
770
811
|
}), b(() => {
|
|
@@ -777,7 +818,7 @@ function Ve(e, t) {
|
|
|
777
818
|
!s.value || a.value === "list" || (a.value = "list", t("update:surfaceMode", "list"));
|
|
778
819
|
}
|
|
779
820
|
function f(e) {
|
|
780
|
-
e.defaultPrevented || e.key !== "Escape" || !s.value || c.value !== "fullscreen" ||
|
|
821
|
+
e.defaultPrevented || e.key !== "Escape" || !s.value || c.value !== "fullscreen" || ue(e.target) || (e.preventDefault(), d());
|
|
781
822
|
}
|
|
782
823
|
function p() {
|
|
783
824
|
r.value = window.innerWidth || 0;
|
|
@@ -789,6 +830,7 @@ function Ve(e, t) {
|
|
|
789
830
|
...n,
|
|
790
831
|
cancel: n.cancel,
|
|
791
832
|
isDesktop: s,
|
|
833
|
+
lockPageLoading: n.lockPageLoading,
|
|
792
834
|
loadNext: n.loadNext,
|
|
793
835
|
loadPrevious: n.loadPrevious,
|
|
794
836
|
openFullscreen: u,
|
|
@@ -796,19 +838,20 @@ function Ve(e, t) {
|
|
|
796
838
|
retry: n.retry,
|
|
797
839
|
showBackToList: l,
|
|
798
840
|
status: w(o),
|
|
799
|
-
surfaceMode: c
|
|
841
|
+
surfaceMode: c,
|
|
842
|
+
unlockPageLoading: n.unlockPageLoading
|
|
800
843
|
};
|
|
801
844
|
}
|
|
802
845
|
//#endregion
|
|
803
846
|
//#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
|
|
804
|
-
var
|
|
847
|
+
var Ke = {
|
|
805
848
|
"data-testid": "vibe-media-bar",
|
|
806
849
|
class: "absolute inset-x-0 bottom-0 z-[5] bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.42)_24%,rgba(0,0,0,0.78))] px-[clamp(1rem,2.6vw,2.25rem)] pt-4 pb-[1.15rem]"
|
|
807
|
-
},
|
|
850
|
+
}, qe = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, Je = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Ye = { class: "relative h-4 w-full" }, Xe = [
|
|
808
851
|
"max",
|
|
809
852
|
"value",
|
|
810
853
|
"disabled"
|
|
811
|
-
],
|
|
854
|
+
], Ze = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Qe = /* @__PURE__ */ d({
|
|
812
855
|
__name: "FullscreenMediaBar",
|
|
813
856
|
props: {
|
|
814
857
|
currentTime: {},
|
|
@@ -820,9 +863,9 @@ var He = {
|
|
|
820
863
|
emits: ["seek-input"],
|
|
821
864
|
setup(e, { emit: t }) {
|
|
822
865
|
let n = e, r = t;
|
|
823
|
-
return (e, t) => (S(), s("div",
|
|
824
|
-
c("span",
|
|
825
|
-
c("div",
|
|
866
|
+
return (e, t) => (S(), s("div", Ke, [c("div", qe, [
|
|
867
|
+
c("span", Je, k(n.currentTimeLabel), 1),
|
|
868
|
+
c("div", Ye, [
|
|
826
869
|
t[1] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
827
870
|
c("div", {
|
|
828
871
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -839,25 +882,25 @@ var He = {
|
|
|
839
882
|
disabled: n.duration <= 0,
|
|
840
883
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
|
|
841
884
|
onInput: t[0] ||= (e) => r("seek-input", e)
|
|
842
|
-
}, null, 40,
|
|
885
|
+
}, null, 40, Xe)
|
|
843
886
|
]),
|
|
844
|
-
c("span",
|
|
887
|
+
c("span", Ze, k(n.durationLabel), 1)
|
|
845
888
|
])]));
|
|
846
889
|
}
|
|
847
|
-
}),
|
|
890
|
+
}), $e = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, et = { class: "grid gap-4" }, tt = { class: "flex min-h-11 items-center justify-between gap-4" }, nt = { class: "min-w-0 flex flex-1 items-center gap-3" }, rt = {
|
|
848
891
|
key: 1,
|
|
849
892
|
"data-testid": "vibe-title",
|
|
850
893
|
class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
|
|
851
|
-
},
|
|
894
|
+
}, it = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, at = {
|
|
852
895
|
"data-testid": "vibe-pagination",
|
|
853
896
|
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]"
|
|
854
|
-
},
|
|
897
|
+
}, ot = { class: "whitespace-nowrap" }, st = {
|
|
855
898
|
key: 0,
|
|
856
899
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
857
|
-
},
|
|
900
|
+
}, ct = {
|
|
858
901
|
key: 0,
|
|
859
902
|
class: "grid gap-2 max-[720px]:justify-items-start"
|
|
860
|
-
},
|
|
903
|
+
}, lt = /* @__PURE__ */ d({
|
|
861
904
|
__name: "FullscreenHeader",
|
|
862
905
|
props: {
|
|
863
906
|
currentIndex: {},
|
|
@@ -870,32 +913,136 @@ var He = {
|
|
|
870
913
|
emits: ["back-to-list"],
|
|
871
914
|
setup(e, { emit: t }) {
|
|
872
915
|
let n = e, r = t;
|
|
873
|
-
return (e, t) => (S(), s("div",
|
|
916
|
+
return (e, t) => (S(), s("div", $e, [c("div", et, [c("div", tt, [c("div", nt, [n.showBackToList ? (S(), s("button", {
|
|
874
917
|
key: 0,
|
|
875
918
|
type: "button",
|
|
876
919
|
"data-testid": "vibe-back-to-list",
|
|
877
920
|
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",
|
|
878
921
|
"aria-label": "Back to list",
|
|
879
922
|
onClick: t[0] ||= (e) => r("back-to-list")
|
|
880
|
-
}, [u(j(
|
|
923
|
+
}, [u(j(J), {
|
|
881
924
|
class: "h-4 w-4 stroke-[2.2]",
|
|
882
925
|
"aria-hidden": "true"
|
|
883
|
-
})])) : o("", !0), n.title ? (S(), s("h2",
|
|
926
|
+
})])) : o("", !0), n.title ? (S(), s("h2", rt, k(n.title), 1)) : o("", !0)]), c("div", it, [c("span", at, [c("span", ot, k(n.currentIndex + 1) + " / " + k(n.total), 1), n.paginationDetail ? (S(), s("span", st, k(n.paginationDetail), 1)) : o("", !0)]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div", ct, [...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)]));
|
|
927
|
+
}
|
|
928
|
+
}), ut = {
|
|
929
|
+
image: ne,
|
|
930
|
+
video: X,
|
|
931
|
+
audio: Y,
|
|
932
|
+
other: te
|
|
933
|
+
}, dt = {
|
|
934
|
+
image: "Image",
|
|
935
|
+
video: "Video",
|
|
936
|
+
audio: "Audio",
|
|
937
|
+
other: "File"
|
|
938
|
+
};
|
|
939
|
+
function ft(e) {
|
|
940
|
+
return ut[e];
|
|
941
|
+
}
|
|
942
|
+
function pt(e) {
|
|
943
|
+
return dt[e];
|
|
944
|
+
}
|
|
945
|
+
//#endregion
|
|
946
|
+
//#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
|
|
947
|
+
var mt = 2;
|
|
948
|
+
function ht(e) {
|
|
949
|
+
function t(e, t) {
|
|
950
|
+
let n = t.title?.trim();
|
|
951
|
+
return n ? `${e} ${n}` : `${e} ${pt(t.type).toLowerCase()}`;
|
|
952
|
+
}
|
|
953
|
+
function n(e) {
|
|
954
|
+
return Q(e);
|
|
955
|
+
}
|
|
956
|
+
function r(t) {
|
|
957
|
+
let n = e.resolvedActiveIndex.value;
|
|
958
|
+
return !!e.active.value && t >= n && t <= n + mt;
|
|
959
|
+
}
|
|
960
|
+
function i(t, i) {
|
|
961
|
+
let a = n(i);
|
|
962
|
+
return !r(t) || t !== e.resolvedActiveIndex.value || e.viewer.getAssetErrorKind(a) ? !1 : i.type === "image" ? !e.viewer.isImageReady(a) : i.type === "video" || i.type === "audio" ? !e.viewer.isMediaReady(a) : !1;
|
|
963
|
+
}
|
|
964
|
+
function a(t) {
|
|
965
|
+
return e.viewer.getAssetErrorKind(n(t));
|
|
966
|
+
}
|
|
967
|
+
function o(t) {
|
|
968
|
+
return e.viewer.getAssetErrorLabel(n(t)) ?? "Load error";
|
|
969
|
+
}
|
|
970
|
+
function s(t, n) {
|
|
971
|
+
return r(t) && t === e.resolvedActiveIndex.value && !!a(n);
|
|
972
|
+
}
|
|
973
|
+
function c(t, n) {
|
|
974
|
+
return r(t) ? e.viewer.getImageSource(n) : void 0;
|
|
975
|
+
}
|
|
976
|
+
function l(e, t) {
|
|
977
|
+
return r(e) ? t.url : void 0;
|
|
978
|
+
}
|
|
979
|
+
return {
|
|
980
|
+
getAssetErrorKind: a,
|
|
981
|
+
getAssetErrorLabel: o,
|
|
982
|
+
getFullscreenImageSource: c,
|
|
983
|
+
getFullscreenMediaSource: l,
|
|
984
|
+
getItemKey: n,
|
|
985
|
+
getMediaActionLabel: t,
|
|
986
|
+
isAssetErrored: s,
|
|
987
|
+
isAssetLoading: i,
|
|
988
|
+
shouldPreloadSlideAsset: r
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
//#endregion
|
|
992
|
+
//#region src/components/viewer-core/slotContent.ts
|
|
993
|
+
function gt(e) {
|
|
994
|
+
if (!Array.isArray(e)) return !1;
|
|
995
|
+
for (let t of e) {
|
|
996
|
+
if (Array.isArray(t)) {
|
|
997
|
+
if (gt(t)) return !0;
|
|
998
|
+
continue;
|
|
999
|
+
}
|
|
1000
|
+
if (!m(t)) {
|
|
1001
|
+
if (typeof t == "string") {
|
|
1002
|
+
if (t.trim().length > 0) return !0;
|
|
1003
|
+
continue;
|
|
1004
|
+
}
|
|
1005
|
+
if (t != null && t !== !1) return !0;
|
|
1006
|
+
continue;
|
|
1007
|
+
}
|
|
1008
|
+
if (!_t(t)) return !0;
|
|
884
1009
|
}
|
|
885
|
-
|
|
1010
|
+
return !1;
|
|
1011
|
+
}
|
|
1012
|
+
function _t(r) {
|
|
1013
|
+
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !gt(r.children) : !1;
|
|
1014
|
+
}
|
|
1015
|
+
//#endregion
|
|
1016
|
+
//#region src/components/viewer-core/useSurfaceEmptyState.ts
|
|
1017
|
+
var vt = "no items available";
|
|
1018
|
+
function yt(e) {
|
|
1019
|
+
let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
|
|
1020
|
+
loading: !!e.loading.value,
|
|
1021
|
+
message: vt,
|
|
1022
|
+
mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
|
|
1023
|
+
surface: e.surface,
|
|
1024
|
+
total: e.itemCount.value
|
|
1025
|
+
}), n = i(() => !t.value || !e.renderSlot ? [] : e.renderSlot(t.value));
|
|
1026
|
+
return {
|
|
1027
|
+
emptyStateProps: t,
|
|
1028
|
+
showBadgeEmptyState: i(() => t.value?.mode === "badge"),
|
|
1029
|
+
showCustomEmptyState: i(() => gt(n.value)),
|
|
1030
|
+
showInlineEmptyState: i(() => t.value?.mode === "inline")
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
886
1033
|
//#endregion
|
|
887
1034
|
//#region src/components/viewer-core/format.ts
|
|
888
|
-
function
|
|
1035
|
+
function bt(e) {
|
|
889
1036
|
if (!Number.isFinite(e) || e <= 0) return "0:00";
|
|
890
1037
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
891
1038
|
return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
|
|
892
1039
|
}
|
|
893
1040
|
//#endregion
|
|
894
1041
|
//#region src/components/viewer-core/surfaceStatus.ts
|
|
895
|
-
function
|
|
1042
|
+
function xt(e) {
|
|
896
1043
|
return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
|
|
897
1044
|
}
|
|
898
|
-
function
|
|
1045
|
+
function St(e) {
|
|
899
1046
|
return e.phase === "failed" ? {
|
|
900
1047
|
kind: "failed",
|
|
901
1048
|
message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
|
|
@@ -918,9 +1065,9 @@ function ct(e) {
|
|
|
918
1065
|
}
|
|
919
1066
|
//#endregion
|
|
920
1067
|
//#region src/components/viewer-core/useActivation.ts
|
|
921
|
-
function
|
|
1068
|
+
function Ct(e) {
|
|
922
1069
|
let t = !1;
|
|
923
|
-
|
|
1070
|
+
F(e.enabled, async (t) => {
|
|
924
1071
|
if (n(t), t) {
|
|
925
1072
|
e.onResize(), await e.onEnable();
|
|
926
1073
|
return;
|
|
@@ -941,42 +1088,42 @@ function lt(e) {
|
|
|
941
1088
|
}
|
|
942
1089
|
//#endregion
|
|
943
1090
|
//#region src/components/viewer-core/assetState.ts
|
|
944
|
-
var
|
|
1091
|
+
var wt = {
|
|
945
1092
|
currentTime: 0,
|
|
946
1093
|
duration: 0,
|
|
947
1094
|
errorKind: null,
|
|
948
1095
|
paused: !0,
|
|
949
1096
|
ready: !1
|
|
950
1097
|
};
|
|
951
|
-
function
|
|
952
|
-
return { ...
|
|
1098
|
+
function Tt() {
|
|
1099
|
+
return { ...wt };
|
|
953
1100
|
}
|
|
954
|
-
function
|
|
1101
|
+
function Et(e) {
|
|
955
1102
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
956
1103
|
}
|
|
957
|
-
function
|
|
958
|
-
e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.paused = t.paused, n && n !== "error" && (e.errorKind = null), e.ready =
|
|
1104
|
+
function Dt(e, t, n) {
|
|
1105
|
+
e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.paused = t.paused, n && n !== "error" && (e.errorKind = null), e.ready = Ot(t, n);
|
|
959
1106
|
}
|
|
960
|
-
function
|
|
1107
|
+
function Ot(e, t) {
|
|
961
1108
|
return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
962
1109
|
}
|
|
963
1110
|
//#endregion
|
|
964
1111
|
//#region src/components/viewer-core/loadError.ts
|
|
965
|
-
var
|
|
966
|
-
function
|
|
1112
|
+
var kt = /* @__PURE__ */ new Map();
|
|
1113
|
+
function At(e) {
|
|
967
1114
|
return e === "not-found" ? "404" : "Load error";
|
|
968
1115
|
}
|
|
969
|
-
function
|
|
1116
|
+
function jt(e) {
|
|
970
1117
|
return e === "generic";
|
|
971
1118
|
}
|
|
972
|
-
function
|
|
973
|
-
let t =
|
|
1119
|
+
function Mt(e) {
|
|
1120
|
+
let t = kt.get(e);
|
|
974
1121
|
if (t) return t;
|
|
975
|
-
let n =
|
|
976
|
-
return
|
|
1122
|
+
let n = Nt(e);
|
|
1123
|
+
return kt.set(e, n), n;
|
|
977
1124
|
}
|
|
978
|
-
async function
|
|
979
|
-
if (!
|
|
1125
|
+
async function Nt(e) {
|
|
1126
|
+
if (!Pt(e)) return "generic";
|
|
980
1127
|
try {
|
|
981
1128
|
let t = await fetch(e, { method: "HEAD" });
|
|
982
1129
|
if (!t.ok && t.status === 404) return "not-found";
|
|
@@ -985,12 +1132,12 @@ async function yt(e) {
|
|
|
985
1132
|
}
|
|
986
1133
|
return "generic";
|
|
987
1134
|
}
|
|
988
|
-
function
|
|
1135
|
+
function Pt(e) {
|
|
989
1136
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
990
1137
|
}
|
|
991
1138
|
//#endregion
|
|
992
1139
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
993
|
-
function
|
|
1140
|
+
function Ft(e) {
|
|
994
1141
|
try {
|
|
995
1142
|
let t = e.play();
|
|
996
1143
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
@@ -998,64 +1145,64 @@ function xt(e) {
|
|
|
998
1145
|
}
|
|
999
1146
|
//#endregion
|
|
1000
1147
|
//#region src/components/viewer-core/useMedia.ts
|
|
1001
|
-
function
|
|
1002
|
-
let t = T({}), n = T({}), r = T({}), a = T({}), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = i(() => e.activeItem.value ?
|
|
1148
|
+
function It(e) {
|
|
1149
|
+
let t = T({}), n = T({}), r = T({}), a = T({}), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = i(() => e.activeItem.value ? Q(e.activeItem.value) : null), u = i(() => e.activeMediaItem.value ? Q(e.activeMediaItem.value) : null), d = i(() => {
|
|
1003
1150
|
let t = /* @__PURE__ */ new Map();
|
|
1004
|
-
for (let n of e.items.value) t.set(
|
|
1151
|
+
for (let n of e.items.value) t.set(Q(n), n);
|
|
1005
1152
|
return t;
|
|
1006
|
-
}), f = i(() => u.value ? r.value[u.value] ??
|
|
1007
|
-
|
|
1153
|
+
}), f = i(() => u.value ? r.value[u.value] ?? wt : wt), p = i(() => u.value ? f.value.duration : 0), m = i(() => p.value <= 0 ? 0 : Lt(f.value.currentTime / p.value * 100, 0, 100)), h = i(() => l.value ? N(l.value) : null);
|
|
1154
|
+
F(() => l.value, async () => {
|
|
1008
1155
|
await x();
|
|
1009
|
-
}),
|
|
1156
|
+
}), F(() => e.itemCount.value, async () => {
|
|
1010
1157
|
await x();
|
|
1011
1158
|
});
|
|
1012
1159
|
function _(e, t) {
|
|
1013
1160
|
if (t instanceof HTMLVideoElement) {
|
|
1014
|
-
o.set(e, t),
|
|
1161
|
+
o.set(e, t), H(e, t);
|
|
1015
1162
|
return;
|
|
1016
1163
|
}
|
|
1017
1164
|
o.delete(e);
|
|
1018
1165
|
}
|
|
1019
1166
|
function v(e, t) {
|
|
1020
1167
|
if (t instanceof HTMLAudioElement) {
|
|
1021
|
-
s.set(e, t),
|
|
1168
|
+
s.set(e, t), H(e, t);
|
|
1022
1169
|
return;
|
|
1023
1170
|
}
|
|
1024
1171
|
s.delete(e);
|
|
1025
1172
|
}
|
|
1026
1173
|
function y(e, r) {
|
|
1027
|
-
r instanceof HTMLImageElement &&
|
|
1174
|
+
r instanceof HTMLImageElement && Et(r) && (t.value[e] = !0, n.value[e] = null, K(e, r.currentSrc || r.src || J(e)));
|
|
1028
1175
|
}
|
|
1029
1176
|
function b() {
|
|
1030
|
-
|
|
1177
|
+
B(), a.value = {}, n.value = {}, t.value = {}, r.value = {}, c.clear();
|
|
1031
1178
|
}
|
|
1032
1179
|
async function x() {
|
|
1033
1180
|
if (!e.isEnabled.value) {
|
|
1034
|
-
|
|
1181
|
+
B();
|
|
1035
1182
|
return;
|
|
1036
1183
|
}
|
|
1037
1184
|
await g();
|
|
1038
1185
|
let t = l.value;
|
|
1039
1186
|
for (let [e, n] of o.entries()) {
|
|
1040
1187
|
if (e !== t || r.value[e]?.errorKind) {
|
|
1041
|
-
|
|
1188
|
+
z(n, e);
|
|
1042
1189
|
continue;
|
|
1043
1190
|
}
|
|
1044
|
-
n.muted = !0, n.loop = !1, n.playsInline = !0,
|
|
1191
|
+
n.muted = !0, n.loop = !1, n.playsInline = !0, Ft(n), H(e, n);
|
|
1045
1192
|
}
|
|
1046
1193
|
for (let [e, n] of s.entries()) {
|
|
1047
1194
|
if (e !== t || r.value[e]?.errorKind) {
|
|
1048
|
-
|
|
1195
|
+
z(n, e);
|
|
1049
1196
|
continue;
|
|
1050
1197
|
}
|
|
1051
|
-
|
|
1198
|
+
Ft(n), H(e, n);
|
|
1052
1199
|
}
|
|
1053
1200
|
}
|
|
1054
1201
|
function S(e, t) {
|
|
1055
1202
|
let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
|
|
1056
1203
|
if (n) {
|
|
1057
1204
|
let i = r.value[e]?.ready ?? !1;
|
|
1058
|
-
|
|
1205
|
+
H(e, n, t.type);
|
|
1059
1206
|
let a = r.value[e]?.ready ?? !1;
|
|
1060
1207
|
!i && a && K(e, n.currentSrc || n.src || J(e));
|
|
1061
1208
|
}
|
|
@@ -1066,7 +1213,7 @@ function St(e) {
|
|
|
1066
1213
|
async function w(r, i) {
|
|
1067
1214
|
let a = q(r) ?? e.activeItem.value;
|
|
1068
1215
|
t.value[r] = !1, n.value[r] = "generic";
|
|
1069
|
-
let o = await
|
|
1216
|
+
let o = await Mt(i);
|
|
1070
1217
|
n.value[r] = o, a && e.onAssetError?.({
|
|
1071
1218
|
item: a,
|
|
1072
1219
|
occurrenceKey: r,
|
|
@@ -1076,7 +1223,7 @@ function St(e) {
|
|
|
1076
1223
|
});
|
|
1077
1224
|
}
|
|
1078
1225
|
async function E(t, n) {
|
|
1079
|
-
let r =
|
|
1226
|
+
let r = W(t), i = V(t), a = q(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
1080
1227
|
if (r) {
|
|
1081
1228
|
r.pause();
|
|
1082
1229
|
try {
|
|
@@ -1084,7 +1231,7 @@ function St(e) {
|
|
|
1084
1231
|
} catch {}
|
|
1085
1232
|
}
|
|
1086
1233
|
i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
|
|
1087
|
-
let o = await
|
|
1234
|
+
let o = await Mt(n);
|
|
1088
1235
|
i.errorKind = o, a && e.onAssetError?.({
|
|
1089
1236
|
item: a,
|
|
1090
1237
|
occurrenceKey: t,
|
|
@@ -1097,15 +1244,15 @@ function St(e) {
|
|
|
1097
1244
|
e.button !== 0 || Date.now() < n || G(o.get(t) ?? null);
|
|
1098
1245
|
}
|
|
1099
1246
|
function O(e, t, n) {
|
|
1100
|
-
e.button !== 0 || Date.now() < n || G(
|
|
1247
|
+
e.button !== 0 || Date.now() < n || G(W(t));
|
|
1101
1248
|
}
|
|
1102
1249
|
function k(e) {
|
|
1103
|
-
let t =
|
|
1250
|
+
let t = ee(), n = u.value;
|
|
1104
1251
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1105
1252
|
let r = Number.parseFloat(e.target.value);
|
|
1106
1253
|
if (!Number.isFinite(r)) return;
|
|
1107
|
-
let i =
|
|
1108
|
-
|
|
1254
|
+
let i = Lt(r, 0, p.value || 0);
|
|
1255
|
+
U(n, i, t), t.currentTime = i;
|
|
1109
1256
|
}
|
|
1110
1257
|
function A(e) {
|
|
1111
1258
|
return !!t.value[e] && !n.value[e];
|
|
@@ -1119,57 +1266,57 @@ function St(e) {
|
|
|
1119
1266
|
function N(e) {
|
|
1120
1267
|
return n.value[e] ?? r.value[e]?.errorKind ?? null;
|
|
1121
1268
|
}
|
|
1122
|
-
function
|
|
1269
|
+
function P(e) {
|
|
1123
1270
|
let t = N(e);
|
|
1124
|
-
return t ?
|
|
1271
|
+
return t ? At(t) : null;
|
|
1125
1272
|
}
|
|
1126
1273
|
function I(e) {
|
|
1127
|
-
return
|
|
1274
|
+
return jt(N(e));
|
|
1128
1275
|
}
|
|
1129
1276
|
function L(e) {
|
|
1130
1277
|
return `${e}:${a.value[e] ?? 0}`;
|
|
1131
1278
|
}
|
|
1132
|
-
async function
|
|
1279
|
+
async function R(e) {
|
|
1133
1280
|
if (!I(e)) return;
|
|
1134
1281
|
t.value[e] = !1, n.value[e] = null;
|
|
1135
|
-
let r =
|
|
1282
|
+
let r = V(e);
|
|
1136
1283
|
r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
|
|
1137
|
-
let i =
|
|
1138
|
-
i &&
|
|
1284
|
+
let i = W(e);
|
|
1285
|
+
i && z(i, e), c.forEach((t) => {
|
|
1139
1286
|
t.startsWith(`${e}|`) && c.delete(t);
|
|
1140
1287
|
}), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await x();
|
|
1141
1288
|
}
|
|
1142
|
-
function
|
|
1289
|
+
function z(e, t) {
|
|
1143
1290
|
e.pause();
|
|
1144
1291
|
try {
|
|
1145
1292
|
e.currentTime = 0;
|
|
1146
1293
|
} catch {}
|
|
1147
|
-
|
|
1294
|
+
H(t, e);
|
|
1148
1295
|
}
|
|
1149
|
-
function
|
|
1150
|
-
for (let [e, t] of o.entries())
|
|
1151
|
-
for (let [e, t] of s.entries())
|
|
1296
|
+
function B() {
|
|
1297
|
+
for (let [e, t] of o.entries()) z(t, e);
|
|
1298
|
+
for (let [e, t] of s.entries()) z(t, e);
|
|
1152
1299
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return r.value[e] || (r.value[e] =
|
|
1155
|
-
}
|
|
1156
|
-
function V(e, t, n) {
|
|
1157
|
-
pt(B(e), t, n);
|
|
1300
|
+
function V(e) {
|
|
1301
|
+
return r.value[e] || (r.value[e] = Tt()), r.value[e];
|
|
1158
1302
|
}
|
|
1159
1303
|
function H(e, t, n) {
|
|
1160
|
-
|
|
1304
|
+
Dt(V(e), t, n);
|
|
1305
|
+
}
|
|
1306
|
+
function U(e, t, n) {
|
|
1307
|
+
let r = V(e);
|
|
1161
1308
|
r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.paused = n.paused;
|
|
1162
1309
|
}
|
|
1163
|
-
function
|
|
1310
|
+
function W(e) {
|
|
1164
1311
|
return o.get(e) ?? s.get(e) ?? null;
|
|
1165
1312
|
}
|
|
1166
|
-
function
|
|
1167
|
-
return u.value ?
|
|
1313
|
+
function ee() {
|
|
1314
|
+
return u.value ? W(u.value) : null;
|
|
1168
1315
|
}
|
|
1169
1316
|
function G(e) {
|
|
1170
1317
|
if (e) {
|
|
1171
1318
|
if (e.paused) {
|
|
1172
|
-
|
|
1319
|
+
Ft(e);
|
|
1173
1320
|
return;
|
|
1174
1321
|
}
|
|
1175
1322
|
e.pause();
|
|
@@ -1198,7 +1345,7 @@ function St(e) {
|
|
|
1198
1345
|
activeMediaProgress: m,
|
|
1199
1346
|
activeMediaState: f,
|
|
1200
1347
|
getAssetErrorKind: N,
|
|
1201
|
-
getAssetErrorLabel:
|
|
1348
|
+
getAssetErrorLabel: P,
|
|
1202
1349
|
getAssetRenderKey: L,
|
|
1203
1350
|
getImageSource: M,
|
|
1204
1351
|
isImageReady: A,
|
|
@@ -1216,14 +1363,14 @@ function St(e) {
|
|
|
1216
1363
|
registerImageElement: y,
|
|
1217
1364
|
registerVideoElement: _,
|
|
1218
1365
|
resetMediaState: b,
|
|
1219
|
-
retryAsset:
|
|
1366
|
+
retryAsset: R,
|
|
1220
1367
|
syncMediaPlayback: x
|
|
1221
1368
|
};
|
|
1222
1369
|
}
|
|
1223
|
-
function
|
|
1370
|
+
function Lt(e, t, n) {
|
|
1224
1371
|
return Math.min(Math.max(e, t), n);
|
|
1225
1372
|
}
|
|
1226
|
-
function
|
|
1373
|
+
function Rt(e, t, n = 2) {
|
|
1227
1374
|
return t <= 0 ? {
|
|
1228
1375
|
start: 0,
|
|
1229
1376
|
end: -1
|
|
@@ -1232,14 +1379,14 @@ function wt(e, t, n = 2) {
|
|
|
1232
1379
|
end: Math.min(t - 1, e + n)
|
|
1233
1380
|
};
|
|
1234
1381
|
}
|
|
1235
|
-
function
|
|
1236
|
-
let r =
|
|
1382
|
+
function zt(e, t, n = 2) {
|
|
1383
|
+
let r = Rt(t, e.length, n);
|
|
1237
1384
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
1238
1385
|
item: e,
|
|
1239
1386
|
index: r.start + t
|
|
1240
1387
|
}));
|
|
1241
1388
|
}
|
|
1242
|
-
function
|
|
1389
|
+
function Bt(e, t, n, r, i) {
|
|
1243
1390
|
return {
|
|
1244
1391
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
1245
1392
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -1247,12 +1394,12 @@ function Et(e, t, n, r, i) {
|
|
|
1247
1394
|
}
|
|
1248
1395
|
//#endregion
|
|
1249
1396
|
//#region src/components/viewer-core/useViewer.ts
|
|
1250
|
-
function
|
|
1251
|
-
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.paginationDetail ?? null), u = i(() =>
|
|
1397
|
+
function Vt(e, t, n = {}) {
|
|
1398
|
+
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.paginationDetail ?? null), u = i(() => xt({
|
|
1252
1399
|
itemCount: r.value.length,
|
|
1253
1400
|
loading: s.value,
|
|
1254
1401
|
phase: e.phase
|
|
1255
|
-
})), d = i(() => !1), f = T(null), p = T(0), m = T(!1), h = T(1), g = n.enabled ?? i(() => !0), _ = null, v = 0, y = 0, b = 0, x = i(() => r.value.length === 0 ? 0 : N(a.value, 0, r.value.length - 1)), S = i(() => r.value[x.value] ?? null), C = i(() => S.value?.type === "audio" || S.value?.type === "video" ? S.value : null), w =
|
|
1402
|
+
})), d = i(() => !1), f = T(null), p = T(0), m = T(!1), h = T(1), g = n.enabled ?? i(() => !0), _ = null, v = 0, y = 0, b = 0, x = i(() => r.value.length === 0 ? 0 : N(a.value, 0, r.value.length - 1)), S = i(() => r.value[x.value] ?? null), C = i(() => S.value?.type === "audio" || S.value?.type === "video" ? S.value : null), w = It({
|
|
1256
1403
|
items: r,
|
|
1257
1404
|
activeItem: S,
|
|
1258
1405
|
activeMediaItem: C,
|
|
@@ -1260,22 +1407,22 @@ function Dt(e, t, n = {}) {
|
|
|
1260
1407
|
itemCount: i(() => r.value.length),
|
|
1261
1408
|
onAssetError: n.onAssetError,
|
|
1262
1409
|
onAssetLoad: n.onAssetLoad
|
|
1263
|
-
}), E = i(() => r.value.length > 0 && x.value === r.value.length - 1), D = i(() =>
|
|
1410
|
+
}), E = i(() => r.value.length > 0 && x.value === r.value.length - 1), D = i(() => St({
|
|
1264
1411
|
errorMessage: o.value,
|
|
1265
1412
|
hasItems: r.value.length > 0,
|
|
1266
1413
|
hasNextPage: c.value,
|
|
1267
1414
|
phase: u.value,
|
|
1268
1415
|
surface: "fullscreen"
|
|
1269
|
-
})), O = i(() => D.value?.kind ?? null), k = i(() => D.value?.message ?? null), A = i(() => Math.min(96, h.value * .15 || 96)), j = i(() =>
|
|
1270
|
-
|
|
1416
|
+
})), O = i(() => D.value?.kind ?? null), k = i(() => D.value?.message ?? null), A = i(() => Math.min(96, h.value * .15 || 96)), j = i(() => Rt(x.value, r.value.length)), M = i(() => zt(r.value, x.value));
|
|
1417
|
+
Ct({
|
|
1271
1418
|
enabled: g,
|
|
1272
1419
|
onDisable() {
|
|
1273
|
-
|
|
1420
|
+
U(), w.resetMediaState();
|
|
1274
1421
|
},
|
|
1275
1422
|
onEnable() {
|
|
1276
1423
|
return w.syncMediaPlayback();
|
|
1277
1424
|
},
|
|
1278
|
-
onKeydown:
|
|
1425
|
+
onKeydown: ee,
|
|
1279
1426
|
onResize: P
|
|
1280
1427
|
});
|
|
1281
1428
|
function N(e, t, n) {
|
|
@@ -1296,32 +1443,32 @@ function Dt(e, t, n = {}) {
|
|
|
1296
1443
|
let t = e > 0, n = e < 0;
|
|
1297
1444
|
return t && !F(-1) || n && !F(1) ? e * .24 : e;
|
|
1298
1445
|
}
|
|
1299
|
-
function ee(e) {
|
|
1300
|
-
!g.value || r.value.length === 0 || e.pointerType === "mouse" || Q(e.target) || (_ = e.pointerId, v = e.clientY, p.value = 0, m.value = !0, f.value?.setPointerCapture?.(e.pointerId));
|
|
1301
|
-
}
|
|
1302
1446
|
function R(e) {
|
|
1303
|
-
!g.value ||
|
|
1447
|
+
!g.value || r.value.length === 0 || e.pointerType === "mouse" || de(e.target) || (_ = e.pointerId, v = e.clientY, p.value = 0, m.value = !0, f.value?.setPointerCapture?.(e.pointerId));
|
|
1304
1448
|
}
|
|
1305
1449
|
function z(e) {
|
|
1306
|
-
!g.value || _ !== e.pointerId || (
|
|
1450
|
+
!g.value || !m.value || _ !== e.pointerId || (p.value = L(e.clientY - v));
|
|
1307
1451
|
}
|
|
1308
1452
|
function B(e) {
|
|
1309
1453
|
!g.value || _ !== e.pointerId || (f.value?.releasePointerCapture?.(e.pointerId), H());
|
|
1310
1454
|
}
|
|
1311
|
-
function V() {
|
|
1312
|
-
|
|
1455
|
+
function V(e) {
|
|
1456
|
+
!g.value || _ !== e.pointerId || (f.value?.releasePointerCapture?.(e.pointerId), U());
|
|
1313
1457
|
}
|
|
1314
1458
|
function H() {
|
|
1459
|
+
Math.abs(p.value) >= A.value && (b = Date.now() + 250, I(p.value < 0 ? 1 : -1)), U();
|
|
1460
|
+
}
|
|
1461
|
+
function U() {
|
|
1315
1462
|
p.value = 0, m.value = !1, _ = null;
|
|
1316
1463
|
}
|
|
1317
|
-
function
|
|
1318
|
-
if (!g.value || r.value.length === 0 || m.value ||
|
|
1464
|
+
function W(e) {
|
|
1465
|
+
if (!g.value || r.value.length === 0 || m.value || de(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
1319
1466
|
e.preventDefault();
|
|
1320
1467
|
let t = Date.now();
|
|
1321
1468
|
t < y || (y = t + 400, I(e.deltaY > 0 ? 1 : -1));
|
|
1322
1469
|
}
|
|
1323
|
-
function
|
|
1324
|
-
!g.value || r.value.length === 0 ||
|
|
1470
|
+
function ee(e) {
|
|
1471
|
+
!g.value || r.value.length === 0 || ue(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), I(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), I(-1)));
|
|
1325
1472
|
}
|
|
1326
1473
|
function G(e, t) {
|
|
1327
1474
|
w.onVideoClick(e, t, b);
|
|
@@ -1335,11 +1482,11 @@ function Dt(e, t, n = {}) {
|
|
|
1335
1482
|
function J(e) {
|
|
1336
1483
|
return e.type === "image" || e.type === "video";
|
|
1337
1484
|
}
|
|
1338
|
-
function
|
|
1485
|
+
function Y(e) {
|
|
1339
1486
|
return e.type === "audio";
|
|
1340
1487
|
}
|
|
1341
|
-
function
|
|
1342
|
-
return
|
|
1488
|
+
function X(e) {
|
|
1489
|
+
return Bt(e, x.value, h.value, p.value, m.value);
|
|
1343
1490
|
}
|
|
1344
1491
|
return {
|
|
1345
1492
|
activeItem: S,
|
|
@@ -1354,12 +1501,12 @@ function Dt(e, t, n = {}) {
|
|
|
1354
1501
|
getAssetErrorKind: w.getAssetErrorKind,
|
|
1355
1502
|
getAssetErrorLabel: w.getAssetErrorLabel,
|
|
1356
1503
|
getAssetRenderKey: w.getAssetRenderKey,
|
|
1357
|
-
formatPlaybackTime:
|
|
1504
|
+
formatPlaybackTime: bt,
|
|
1358
1505
|
getImageSource: w.getImageSource,
|
|
1359
|
-
getSlideStyle:
|
|
1506
|
+
getSlideStyle: X,
|
|
1360
1507
|
hasNextPage: c,
|
|
1361
1508
|
isAtEnd: E,
|
|
1362
|
-
isAudio:
|
|
1509
|
+
isAudio: Y,
|
|
1363
1510
|
isVisual: J,
|
|
1364
1511
|
items: r,
|
|
1365
1512
|
loading: s,
|
|
@@ -1372,12 +1519,12 @@ function Dt(e, t, n = {}) {
|
|
|
1372
1519
|
onMediaEvent: w.onMediaEvent,
|
|
1373
1520
|
onMediaError: w.onMediaError,
|
|
1374
1521
|
onMediaSeekInput: q,
|
|
1375
|
-
onPointerCancel:
|
|
1376
|
-
onPointerDown:
|
|
1377
|
-
onPointerMove:
|
|
1378
|
-
onPointerUp:
|
|
1522
|
+
onPointerCancel: V,
|
|
1523
|
+
onPointerDown: R,
|
|
1524
|
+
onPointerMove: z,
|
|
1525
|
+
onPointerUp: B,
|
|
1379
1526
|
onVideoClick: G,
|
|
1380
|
-
onWheel:
|
|
1527
|
+
onWheel: W,
|
|
1381
1528
|
registerAudioElement: w.registerAudioElement,
|
|
1382
1529
|
registerImageElement: w.registerImageElement,
|
|
1383
1530
|
registerVideoElement: w.registerVideoElement,
|
|
@@ -1394,88 +1541,65 @@ function Dt(e, t, n = {}) {
|
|
|
1394
1541
|
};
|
|
1395
1542
|
}
|
|
1396
1543
|
//#endregion
|
|
1397
|
-
//#region src/components/viewer-core/media.ts
|
|
1398
|
-
var Ot = {
|
|
1399
|
-
image: ne,
|
|
1400
|
-
video: te,
|
|
1401
|
-
audio: J,
|
|
1402
|
-
other: Y
|
|
1403
|
-
}, kt = {
|
|
1404
|
-
image: "Image",
|
|
1405
|
-
video: "Video",
|
|
1406
|
-
audio: "Audio",
|
|
1407
|
-
other: "File"
|
|
1408
|
-
};
|
|
1409
|
-
function At(e) {
|
|
1410
|
-
return Ot[e];
|
|
1411
|
-
}
|
|
1412
|
-
function jt(e) {
|
|
1413
|
-
return kt[e];
|
|
1414
|
-
}
|
|
1415
|
-
//#endregion
|
|
1416
|
-
//#region src/components/viewer-core/slotContent.ts
|
|
1417
|
-
function Mt(e) {
|
|
1418
|
-
if (!Array.isArray(e)) return !1;
|
|
1419
|
-
for (let t of e) {
|
|
1420
|
-
if (Array.isArray(t)) {
|
|
1421
|
-
if (Mt(t)) return !0;
|
|
1422
|
-
continue;
|
|
1423
|
-
}
|
|
1424
|
-
if (!m(t)) {
|
|
1425
|
-
if (typeof t == "string") {
|
|
1426
|
-
if (t.trim().length > 0) return !0;
|
|
1427
|
-
continue;
|
|
1428
|
-
}
|
|
1429
|
-
if (t != null && t !== !1) return !0;
|
|
1430
|
-
continue;
|
|
1431
|
-
}
|
|
1432
|
-
if (!Nt(t)) return !0;
|
|
1433
|
-
}
|
|
1434
|
-
return !1;
|
|
1435
|
-
}
|
|
1436
|
-
function Nt(r) {
|
|
1437
|
-
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Mt(r.children) : !1;
|
|
1438
|
-
}
|
|
1439
|
-
//#endregion
|
|
1440
1544
|
//#region src/components/viewer-core/theme.ts
|
|
1441
|
-
var
|
|
1545
|
+
var Ht = {
|
|
1442
1546
|
image: "bg-[radial-gradient(circle_at_top_center,rgba(251,191,36,0.4)_0,transparent_42%),linear-gradient(180deg,#120d08,#050507)]",
|
|
1443
1547
|
video: "bg-[radial-gradient(circle_at_top_center,rgba(56,189,248,0.38)_0,transparent_42%),linear-gradient(180deg,#07111c,#050608)]",
|
|
1444
1548
|
audio: "bg-[radial-gradient(circle_at_top_center,rgba(16,185,129,0.32)_0,transparent_42%),linear-gradient(180deg,#06120f,#040506)]",
|
|
1445
1549
|
other: "bg-[radial-gradient(circle_at_top_center,rgba(148,163,184,0.28)_0,transparent_42%),linear-gradient(180deg,#0d0c10,#040506)]"
|
|
1446
|
-
},
|
|
1550
|
+
}, Ut = {
|
|
1447
1551
|
image: "bg-[radial-gradient(circle_at_center,rgba(251,191,36,0.4)_0,transparent_42%),linear-gradient(180deg,#120d08,#050507)]",
|
|
1448
1552
|
video: "bg-[radial-gradient(circle_at_center,rgba(56,189,248,0.38)_0,transparent_42%),linear-gradient(180deg,#07111c,#050608)]",
|
|
1449
1553
|
audio: "bg-[radial-gradient(circle_at_center,rgba(16,185,129,0.32)_0,transparent_42%),linear-gradient(180deg,#06120f,#040506)]",
|
|
1450
1554
|
other: "bg-[radial-gradient(circle_at_center,rgba(148,163,184,0.28)_0,transparent_42%),linear-gradient(180deg,#0d0c10,#040506)]"
|
|
1451
1555
|
};
|
|
1452
|
-
function
|
|
1453
|
-
return
|
|
1556
|
+
function Wt(e) {
|
|
1557
|
+
return Ht[e];
|
|
1454
1558
|
}
|
|
1455
|
-
function
|
|
1456
|
-
return
|
|
1559
|
+
function Gt(e) {
|
|
1560
|
+
return Ut[e];
|
|
1457
1561
|
}
|
|
1458
1562
|
//#endregion
|
|
1459
|
-
//#region src/components/
|
|
1460
|
-
var
|
|
1563
|
+
//#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
1564
|
+
var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
1565
|
+
inheritAttrs: !1,
|
|
1566
|
+
__name: "SurfaceEmptyState",
|
|
1567
|
+
props: {
|
|
1568
|
+
message: {},
|
|
1569
|
+
mode: {},
|
|
1570
|
+
surface: {}
|
|
1571
|
+
},
|
|
1572
|
+
setup(e) {
|
|
1573
|
+
let t = M();
|
|
1574
|
+
return (n, r) => e.mode === "inline" ? (S(), s("div", h({ key: 0 }, j(t), {
|
|
1575
|
+
"data-testid": "vibe-empty-state-inline",
|
|
1576
|
+
"data-surface": e.surface,
|
|
1577
|
+
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)]"]
|
|
1578
|
+
}), [D(n.$slots, "default", {}, () => [c("p", { class: _(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, k(e.message), 3)])], 16, Kt)) : (S(), s("div", h({ key: 1 }, j(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [D(n.$slots, "default", {}, () => [c("span", {
|
|
1579
|
+
"data-testid": "vibe-empty-state-badge",
|
|
1580
|
+
"data-surface": e.surface,
|
|
1581
|
+
class: _(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
|
|
1582
|
+
}, k(e.message), 11, qt)])], 16));
|
|
1583
|
+
}
|
|
1584
|
+
}), Yt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Xt = {
|
|
1461
1585
|
key: 0,
|
|
1462
1586
|
class: "relative h-full min-h-0"
|
|
1463
|
-
},
|
|
1587
|
+
}, Zt = [
|
|
1464
1588
|
"data-item-id",
|
|
1465
1589
|
"data-occurrence-key",
|
|
1466
1590
|
"data-index",
|
|
1467
1591
|
"data-active",
|
|
1468
1592
|
"aria-hidden"
|
|
1469
|
-
],
|
|
1593
|
+
], Qt = {
|
|
1470
1594
|
key: 0,
|
|
1471
1595
|
"data-testid": "vibe-asset-spinner",
|
|
1472
1596
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
1473
|
-
},
|
|
1597
|
+
}, $t = { 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]" }, en = ["data-kind"], tn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, nn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, rn = ["onClick"], an = [
|
|
1474
1598
|
"src",
|
|
1475
1599
|
"alt",
|
|
1476
1600
|
"onLoad",
|
|
1477
1601
|
"onError"
|
|
1478
|
-
],
|
|
1602
|
+
], on = [
|
|
1479
1603
|
"src",
|
|
1480
1604
|
"preload",
|
|
1481
1605
|
"onClick",
|
|
@@ -1492,15 +1616,15 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1492
1616
|
"onStalled",
|
|
1493
1617
|
"onTimeupdate",
|
|
1494
1618
|
"onWaiting"
|
|
1495
|
-
],
|
|
1619
|
+
], sn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, cn = [
|
|
1496
1620
|
"aria-label",
|
|
1497
1621
|
"disabled",
|
|
1498
1622
|
"onClick"
|
|
1499
|
-
],
|
|
1623
|
+
], ln = { 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]" }, dn = {
|
|
1500
1624
|
key: 0,
|
|
1501
1625
|
"data-testid": "vibe-asset-spinner",
|
|
1502
1626
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
1503
|
-
},
|
|
1627
|
+
}, fn = { 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"], mn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, hn = ["onClick"], gn = [
|
|
1504
1628
|
"src",
|
|
1505
1629
|
"preload",
|
|
1506
1630
|
"onCanplay",
|
|
@@ -1516,21 +1640,21 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1516
1640
|
"onStalled",
|
|
1517
1641
|
"onTimeupdate",
|
|
1518
1642
|
"onWaiting"
|
|
1519
|
-
],
|
|
1643
|
+
], _n = {
|
|
1520
1644
|
key: 2,
|
|
1521
1645
|
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"
|
|
1522
|
-
},
|
|
1646
|
+
}, vn = { 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]" }, yn = {
|
|
1523
1647
|
key: 0,
|
|
1524
1648
|
class: "pointer-events-none absolute inset-0 z-[4]"
|
|
1525
|
-
},
|
|
1649
|
+
}, bn = { class: "h-full w-full" }, xn = {
|
|
1526
1650
|
key: 0,
|
|
1527
1651
|
"data-testid": "vibe-fullscreen-aside",
|
|
1528
1652
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
1529
|
-
},
|
|
1653
|
+
}, Sn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Cn = {
|
|
1530
1654
|
key: 0,
|
|
1531
1655
|
"data-testid": "vibe-fullscreen-aside",
|
|
1532
1656
|
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]"
|
|
1533
|
-
},
|
|
1657
|
+
}, wn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Tn = 1280, En = /* @__PURE__ */ d({
|
|
1534
1658
|
__name: "FullscreenSurface",
|
|
1535
1659
|
props: {
|
|
1536
1660
|
active: {
|
|
@@ -1538,6 +1662,7 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1538
1662
|
default: !0
|
|
1539
1663
|
},
|
|
1540
1664
|
activeIndex: { default: 0 },
|
|
1665
|
+
emptyStateMode: { default: "inline" },
|
|
1541
1666
|
errorMessage: { default: null },
|
|
1542
1667
|
hasNextPage: {
|
|
1543
1668
|
type: Boolean,
|
|
@@ -1573,13 +1698,17 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1573
1698
|
},
|
|
1574
1699
|
emits: ["back-to-list", "update:activeIndex"],
|
|
1575
1700
|
setup(e, { emit: n }) {
|
|
1576
|
-
let d = e, p =
|
|
1701
|
+
let d = e, p = N(), m = n, g = Vt(d, (e, t) => {
|
|
1577
1702
|
m("update:activeIndex", t);
|
|
1578
1703
|
}, {
|
|
1579
1704
|
enabled: A(d, "active"),
|
|
1580
1705
|
onAssetError: d.reportAssetError ?? void 0,
|
|
1581
1706
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
1582
|
-
}), C = T(typeof window > "u" ?
|
|
1707
|
+
}), C = T(typeof window > "u" ? Tn : window.innerWidth || Tn), w = ht({
|
|
1708
|
+
active: A(d, "active"),
|
|
1709
|
+
resolvedActiveIndex: g.resolvedActiveIndex,
|
|
1710
|
+
viewer: g
|
|
1711
|
+
}), M = i(() => Wt(g.activeItem.value?.type ?? "image")), P = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), F = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), I = i(() => F.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), R = i(() => {
|
|
1583
1712
|
let e = g.activeItem.value;
|
|
1584
1713
|
return e ? {
|
|
1585
1714
|
hasNextPage: d.hasNextPage,
|
|
@@ -1589,57 +1718,33 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1589
1718
|
paginationDetail: d.paginationDetail,
|
|
1590
1719
|
total: d.items.length
|
|
1591
1720
|
} : null;
|
|
1592
|
-
}),
|
|
1593
|
-
...
|
|
1721
|
+
}), B = i(() => !R.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](R.value)), V = i(() => !R.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](R.value)), H = i(() => !d.showStatusBadges || !R.value || !g.statusKind.value || !g.statusMessage.value ? null : {
|
|
1722
|
+
...R.value,
|
|
1594
1723
|
kind: g.statusKind.value,
|
|
1595
1724
|
message: g.statusMessage.value
|
|
1596
|
-
}),
|
|
1597
|
-
gridTemplateColumns:
|
|
1725
|
+
}), U = i(() => !H.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](H.value)), W = i(() => ({
|
|
1726
|
+
gridTemplateColumns: K.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
1598
1727
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
1599
|
-
})),
|
|
1728
|
+
})), ee = i(() => gt(B.value)), G = i(() => gt(V.value)), K = i(() => G.value && C.value >= Tn), q = i(() => G.value && !K.value), J = i(() => gt(U.value)), { emptyStateProps: Y, showBadgeEmptyState: X, showCustomEmptyState: te, showInlineEmptyState: ne } = yt({
|
|
1729
|
+
emptyStateMode: A(d, "emptyStateMode"),
|
|
1730
|
+
itemCount: i(() => d.items.length),
|
|
1731
|
+
loading: A(d, "loading"),
|
|
1732
|
+
renderSlot: p["empty-state"],
|
|
1733
|
+
surface: "fullscreen"
|
|
1734
|
+
});
|
|
1600
1735
|
x(() => {
|
|
1601
|
-
window.addEventListener("resize",
|
|
1736
|
+
window.addEventListener("resize", se);
|
|
1602
1737
|
}), b(() => {
|
|
1603
|
-
window.removeEventListener("resize",
|
|
1738
|
+
window.removeEventListener("resize", se);
|
|
1604
1739
|
});
|
|
1605
|
-
function
|
|
1606
|
-
|
|
1607
|
-
return n ? `${e} ${n}` : `${e} ${jt(t.type).toLowerCase()}`;
|
|
1608
|
-
}
|
|
1609
|
-
function te(e, t) {
|
|
1610
|
-
let n = Q(t);
|
|
1611
|
-
return !X(e) || e !== g.resolvedActiveIndex.value || g.getAssetErrorKind(n) ? !1 : t.type === "image" ? !g.isImageReady(n) : t.type === "video" || t.type === "audio" ? !g.isMediaReady(n) : !1;
|
|
1612
|
-
}
|
|
1613
|
-
function Y(e) {
|
|
1614
|
-
return g.getAssetErrorKind(Q(e));
|
|
1615
|
-
}
|
|
1616
|
-
function ne(e) {
|
|
1617
|
-
return g.getAssetErrorLabel(Q(e)) ?? "Load error";
|
|
1618
|
-
}
|
|
1619
|
-
function se(e, t) {
|
|
1620
|
-
return X(e) && e === g.resolvedActiveIndex.value && !!Y(t);
|
|
1621
|
-
}
|
|
1622
|
-
function X(e) {
|
|
1623
|
-
let t = g.resolvedActiveIndex.value;
|
|
1624
|
-
return d.active && e >= t && e <= t + hn;
|
|
1625
|
-
}
|
|
1626
|
-
function ce(e, t) {
|
|
1627
|
-
return X(e) ? g.getImageSource(t) : void 0;
|
|
1628
|
-
}
|
|
1629
|
-
function Z(e, t) {
|
|
1630
|
-
return X(e) ? t.url : void 0;
|
|
1631
|
-
}
|
|
1632
|
-
function Q(e) {
|
|
1633
|
-
return $(e);
|
|
1634
|
-
}
|
|
1635
|
-
function le() {
|
|
1636
|
-
C.value = window.innerWidth || mn;
|
|
1740
|
+
function se() {
|
|
1741
|
+
C.value = window.innerWidth || Tn;
|
|
1637
1742
|
}
|
|
1638
|
-
return (e, n) => (S(), s("div",
|
|
1639
|
-
c("div", { class: _(["absolute inset-0 transition-[background] duration-200",
|
|
1743
|
+
return (e, n) => (S(), s("div", Yt, [
|
|
1744
|
+
c("div", { class: _(["absolute inset-0 transition-[background] duration-200", M.value]) }, null, 2),
|
|
1640
1745
|
c("div", {
|
|
1641
1746
|
class: "relative z-[1] grid h-full min-h-0",
|
|
1642
|
-
style: y(
|
|
1747
|
+
style: y(W.value)
|
|
1643
1748
|
}, [c("div", {
|
|
1644
1749
|
ref: "viewer.stageRef",
|
|
1645
1750
|
"data-testid": "vibe-stage",
|
|
@@ -1649,148 +1754,148 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1649
1754
|
onPointerup: n[3] ||= (...e) => j(g).onPointerUp && j(g).onPointerUp(...e),
|
|
1650
1755
|
onPointercancel: n[4] ||= (...e) => j(g).onPointerCancel && j(g).onPointerCancel(...e),
|
|
1651
1756
|
onWheel: n[5] ||= (...e) => j(g).onWheel && j(g).onWheel(...e)
|
|
1652
|
-
}, [j(g).items.value.length > 0 ? (S(), s("div",
|
|
1757
|
+
}, [j(g).items.value.length > 0 ? (S(), s("div", Xt, [
|
|
1653
1758
|
(S(!0), s(t, null, E(j(g).renderedItems.value, ({ item: r, index: i }) => (S(), s("article", {
|
|
1654
|
-
key:
|
|
1759
|
+
key: j(w).getItemKey(r),
|
|
1655
1760
|
"data-testid": "vibe-slide",
|
|
1656
1761
|
"data-item-id": r.id,
|
|
1657
|
-
"data-occurrence-key":
|
|
1762
|
+
"data-occurrence-key": j(w).getItemKey(r),
|
|
1658
1763
|
"data-index": i,
|
|
1659
1764
|
"data-active": i === j(g).resolvedActiveIndex.value,
|
|
1660
1765
|
"aria-hidden": i === j(g).resolvedActiveIndex.value ? "false" : "true",
|
|
1661
1766
|
class: _(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === j(g).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
|
|
1662
1767
|
style: y(j(g).getSlideStyle(i))
|
|
1663
|
-
}, [c("div", { class: _(["absolute inset-0 opacity-85", j(
|
|
1768
|
+
}, [c("div", { class: _(["absolute inset-0 opacity-85", j(Gt)(r.type)]) }, null, 2), j(g).isVisual(r) ? (S(), s("div", {
|
|
1664
1769
|
key: 0,
|
|
1665
|
-
class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ?
|
|
1666
|
-
}, [
|
|
1770
|
+
class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? I.value : ""])
|
|
1771
|
+
}, [j(w).isAssetLoading(i, r) ? (S(), s("div", Qt, [c("span", $t, [u(j(re), {
|
|
1667
1772
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
1668
1773
|
"aria-hidden": "true"
|
|
1669
|
-
})])])) : o("", !0),
|
|
1774
|
+
})])])) : o("", !0), j(w).isAssetErrored(i, r) ? (S(), s("div", {
|
|
1670
1775
|
key: 1,
|
|
1671
1776
|
"data-testid": "vibe-asset-error",
|
|
1672
|
-
"data-kind":
|
|
1777
|
+
"data-kind": j(w).getAssetErrorKind(r),
|
|
1673
1778
|
class: "grid h-full w-full place-items-center"
|
|
1674
|
-
}, [c("div",
|
|
1779
|
+
}, [c("div", tn, [
|
|
1675
1780
|
u(j(oe), {
|
|
1676
1781
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
1677
1782
|
"aria-hidden": "true"
|
|
1678
1783
|
}),
|
|
1679
|
-
c("p",
|
|
1680
|
-
j(g).canRetryAsset(
|
|
1784
|
+
c("p", nn, k(j(w).getAssetErrorLabel(r)), 1),
|
|
1785
|
+
j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
|
|
1681
1786
|
key: 0,
|
|
1682
1787
|
type: "button",
|
|
1683
1788
|
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",
|
|
1684
|
-
onClick:
|
|
1685
|
-
}, " Retry ", 8,
|
|
1686
|
-
])], 8,
|
|
1687
|
-
key: j(g).getAssetRenderKey(
|
|
1688
|
-
src:
|
|
1789
|
+
onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
|
|
1790
|
+
}, " Retry ", 8, rn)) : o("", !0)
|
|
1791
|
+
])], 8, en)) : r.type === "image" ? (S(), s("img", {
|
|
1792
|
+
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
1793
|
+
src: j(w).getFullscreenImageSource(i, r),
|
|
1689
1794
|
alt: r.title ?? "",
|
|
1690
1795
|
draggable: "false",
|
|
1691
|
-
class: _(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", j(g).isImageReady(
|
|
1796
|
+
class: _(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", j(g).isImageReady(j(w).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
1692
1797
|
ref_for: !0,
|
|
1693
|
-
ref: (e) => j(g).registerImageElement(
|
|
1694
|
-
onLoad: (e) => j(g).onImageLoad(
|
|
1695
|
-
onError: (e) => j(g).onImageError(
|
|
1696
|
-
}, null, 42,
|
|
1697
|
-
key: j(g).getAssetRenderKey(
|
|
1698
|
-
class: _(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", j(g).isMediaReady(
|
|
1798
|
+
ref: (e) => j(g).registerImageElement(j(w).getItemKey(r), e),
|
|
1799
|
+
onLoad: (e) => j(g).onImageLoad(j(w).getItemKey(r), r.url),
|
|
1800
|
+
onError: (e) => j(g).onImageError(j(w).getItemKey(r), r.url)
|
|
1801
|
+
}, null, 42, an)) : (S(), s("video", {
|
|
1802
|
+
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
1803
|
+
class: _(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", j(g).isMediaReady(j(w).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
1699
1804
|
playsinline: "",
|
|
1700
1805
|
muted: "",
|
|
1701
|
-
src:
|
|
1702
|
-
preload:
|
|
1806
|
+
src: j(w).getFullscreenMediaSource(i, r),
|
|
1807
|
+
preload: j(w).shouldPreloadSlideAsset(i) ? "metadata" : "none",
|
|
1703
1808
|
ref_for: !0,
|
|
1704
|
-
ref: (e) => j(g).registerVideoElement(
|
|
1705
|
-
onClick:
|
|
1706
|
-
onCanplay: (e) => j(g).onMediaEvent(
|
|
1707
|
-
onDurationchange: (e) => j(g).onMediaEvent(
|
|
1708
|
-
onError: (e) => j(g).onMediaError(
|
|
1709
|
-
onLoadstart: (e) => j(g).onMediaEvent(
|
|
1710
|
-
onLoadedmetadata: (e) => j(g).onMediaEvent(
|
|
1711
|
-
onPause: (e) => j(g).onMediaEvent(
|
|
1712
|
-
onPlay: (e) => j(g).onMediaEvent(
|
|
1713
|
-
onPlaying: (e) => j(g).onMediaEvent(
|
|
1714
|
-
onSeeking: (e) => j(g).onMediaEvent(
|
|
1715
|
-
onSeeked: (e) => j(g).onMediaEvent(
|
|
1716
|
-
onStalled: (e) => j(g).onMediaEvent(
|
|
1717
|
-
onTimeupdate: (e) => j(g).onMediaEvent(
|
|
1718
|
-
onWaiting: (e) => j(g).onMediaEvent(
|
|
1719
|
-
}, null, 42,
|
|
1809
|
+
ref: (e) => j(g).registerVideoElement(j(w).getItemKey(r), e),
|
|
1810
|
+
onClick: z((e) => j(g).onVideoClick(e, j(w).getItemKey(r)), ["stop"]),
|
|
1811
|
+
onCanplay: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1812
|
+
onDurationchange: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1813
|
+
onError: (e) => j(g).onMediaError(j(w).getItemKey(r), r.url),
|
|
1814
|
+
onLoadstart: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1815
|
+
onLoadedmetadata: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1816
|
+
onPause: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1817
|
+
onPlay: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1818
|
+
onPlaying: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1819
|
+
onSeeking: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1820
|
+
onSeeked: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1821
|
+
onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1822
|
+
onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1823
|
+
onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
|
|
1824
|
+
}, null, 42, on))], 2)) : j(g).isAudio(r) ? (S(), s("div", {
|
|
1720
1825
|
key: 1,
|
|
1721
|
-
class: _(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === j(g).resolvedActiveIndex.value ?
|
|
1722
|
-
}, [c("div",
|
|
1826
|
+
class: _(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === j(g).resolvedActiveIndex.value ? I.value : ""])
|
|
1827
|
+
}, [c("div", sn, [
|
|
1723
1828
|
c("button", {
|
|
1724
1829
|
type: "button",
|
|
1725
1830
|
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]",
|
|
1726
|
-
"aria-label": j(g).mediaStates.value[
|
|
1727
|
-
disabled: !!
|
|
1728
|
-
onClick: (e) => j(g).onAudioCoverClick(e,
|
|
1831
|
+
"aria-label": j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(w).getMediaActionLabel("Play", r) : j(w).getMediaActionLabel("Pause", r),
|
|
1832
|
+
disabled: !!j(w).getAssetErrorKind(r),
|
|
1833
|
+
onClick: (e) => j(g).onAudioCoverClick(e, j(w).getItemKey(r))
|
|
1729
1834
|
}, [
|
|
1730
1835
|
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),
|
|
1731
1836
|
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),
|
|
1732
|
-
c("span",
|
|
1733
|
-
icon: j(
|
|
1837
|
+
c("span", ln, [D(e.$slots, "item-icon", {
|
|
1838
|
+
icon: j(ft)(r.type),
|
|
1734
1839
|
item: r
|
|
1735
|
-
}, () => [(S(), a(O(j(
|
|
1840
|
+
}, () => [(S(), a(O(j(ft)(r.type)), {
|
|
1736
1841
|
class: "h-6 w-6 stroke-[1.9]",
|
|
1737
1842
|
"aria-hidden": "true"
|
|
1738
1843
|
}))])]),
|
|
1739
|
-
c("span",
|
|
1844
|
+
c("span", un, [(S(), a(O(j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(ae) : j(ie)), {
|
|
1740
1845
|
class: "h-4 w-4 stroke-2",
|
|
1741
1846
|
"aria-hidden": "true"
|
|
1742
1847
|
}))])
|
|
1743
|
-
], 8,
|
|
1744
|
-
|
|
1848
|
+
], 8, cn),
|
|
1849
|
+
j(w).isAssetLoading(i, r) ? (S(), s("div", dn, [c("span", fn, [u(j(re), {
|
|
1745
1850
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
1746
1851
|
"aria-hidden": "true"
|
|
1747
1852
|
})])])) : o("", !0),
|
|
1748
|
-
|
|
1853
|
+
j(w).getAssetErrorKind(r) ? (S(), 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", {
|
|
1749
1854
|
"data-testid": "vibe-asset-error",
|
|
1750
|
-
"data-kind":
|
|
1855
|
+
"data-kind": j(w).getAssetErrorKind(r),
|
|
1751
1856
|
class: "relative z-[1] grid justify-items-center gap-4"
|
|
1752
1857
|
}, [
|
|
1753
1858
|
u(j(oe), {
|
|
1754
1859
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
1755
1860
|
"aria-hidden": "true"
|
|
1756
1861
|
}),
|
|
1757
|
-
c("p",
|
|
1758
|
-
j(g).canRetryAsset(
|
|
1862
|
+
c("p", mn, k(j(w).getAssetErrorLabel(r)), 1),
|
|
1863
|
+
j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
|
|
1759
1864
|
key: 0,
|
|
1760
1865
|
type: "button",
|
|
1761
1866
|
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",
|
|
1762
|
-
onClick:
|
|
1763
|
-
}, " Retry ", 8,
|
|
1764
|
-
], 8,
|
|
1867
|
+
onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
|
|
1868
|
+
}, " Retry ", 8, hn)) : o("", !0)
|
|
1869
|
+
], 8, pn)], 64)) : o("", !0)
|
|
1765
1870
|
]), (S(), s("audio", {
|
|
1766
|
-
key: j(g).getAssetRenderKey(
|
|
1767
|
-
src:
|
|
1768
|
-
preload:
|
|
1871
|
+
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
1872
|
+
src: j(w).getFullscreenMediaSource(i, r),
|
|
1873
|
+
preload: j(w).shouldPreloadSlideAsset(i) ? "metadata" : "none",
|
|
1769
1874
|
class: "pointer-events-none absolute h-px w-px opacity-0",
|
|
1770
1875
|
ref_for: !0,
|
|
1771
|
-
ref: (e) => j(g).registerAudioElement(
|
|
1772
|
-
onCanplay: (e) => j(g).onMediaEvent(
|
|
1773
|
-
onDurationchange: (e) => j(g).onMediaEvent(
|
|
1774
|
-
onError: (e) => j(g).onMediaError(
|
|
1775
|
-
onLoadstart: (e) => j(g).onMediaEvent(
|
|
1776
|
-
onLoadedmetadata: (e) => j(g).onMediaEvent(
|
|
1777
|
-
onPause: (e) => j(g).onMediaEvent(
|
|
1778
|
-
onPlay: (e) => j(g).onMediaEvent(
|
|
1779
|
-
onPlaying: (e) => j(g).onMediaEvent(
|
|
1780
|
-
onSeeking: (e) => j(g).onMediaEvent(
|
|
1781
|
-
onSeeked: (e) => j(g).onMediaEvent(
|
|
1782
|
-
onStalled: (e) => j(g).onMediaEvent(
|
|
1783
|
-
onTimeupdate: (e) => j(g).onMediaEvent(
|
|
1784
|
-
onWaiting: (e) => j(g).onMediaEvent(
|
|
1785
|
-
}, null, 40,
|
|
1786
|
-
icon: j(
|
|
1876
|
+
ref: (e) => j(g).registerAudioElement(j(w).getItemKey(r), e),
|
|
1877
|
+
onCanplay: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1878
|
+
onDurationchange: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1879
|
+
onError: (e) => j(g).onMediaError(j(w).getItemKey(r), r.url),
|
|
1880
|
+
onLoadstart: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1881
|
+
onLoadedmetadata: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1882
|
+
onPause: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1883
|
+
onPlay: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1884
|
+
onPlaying: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1885
|
+
onSeeking: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1886
|
+
onSeeked: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1887
|
+
onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1888
|
+
onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1889
|
+
onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
|
|
1890
|
+
}, null, 40, gn))], 2)) : (S(), s("div", _n, [c("div", vn, [D(e.$slots, "item-icon", {
|
|
1891
|
+
icon: j(ft)(r.type),
|
|
1787
1892
|
item: r
|
|
1788
|
-
}, () => [(S(), a(O(j(
|
|
1893
|
+
}, () => [(S(), a(O(j(ft)(r.type)), {
|
|
1789
1894
|
class: "h-6 w-6 stroke-[1.9]",
|
|
1790
1895
|
"aria-hidden": "true"
|
|
1791
|
-
}))])])]))], 14,
|
|
1792
|
-
|
|
1793
|
-
j(g).activeItem.value ? (S(), a(
|
|
1896
|
+
}))])])]))], 14, Zt))), 128)),
|
|
1897
|
+
R.value && p["fullscreen-overlay"] ? (S(), s("div", yn, [c("div", bn, [D(e.$slots, "fullscreen-overlay", v(f(R.value)))])])) : o("", !0),
|
|
1898
|
+
j(g).activeItem.value ? (S(), a(lt, {
|
|
1794
1899
|
key: 1,
|
|
1795
1900
|
"current-index": j(g).resolvedActiveIndex.value,
|
|
1796
1901
|
"pagination-detail": j(g).paginationDetail.value,
|
|
@@ -1799,9 +1904,9 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1799
1904
|
title: j(g).activeItem.value.title ?? null,
|
|
1800
1905
|
total: j(g).items.value.length,
|
|
1801
1906
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
1802
|
-
}, l({ _: 2 }, [
|
|
1907
|
+
}, l({ _: 2 }, [ee.value && R.value ? {
|
|
1803
1908
|
name: "actions",
|
|
1804
|
-
fn:
|
|
1909
|
+
fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(R.value)))]),
|
|
1805
1910
|
key: "0"
|
|
1806
1911
|
} : void 0]), 1032, [
|
|
1807
1912
|
"current-index",
|
|
@@ -1811,7 +1916,7 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1811
1916
|
"title",
|
|
1812
1917
|
"total"
|
|
1813
1918
|
])) : o("", !0),
|
|
1814
|
-
|
|
1919
|
+
F.value ? (S(), a(Qe, {
|
|
1815
1920
|
key: 2,
|
|
1816
1921
|
"current-time": j(g).activeMediaState.value.currentTime,
|
|
1817
1922
|
"current-time-label": j(g).formatPlaybackTime(j(g).activeMediaState.value.currentTime),
|
|
@@ -1827,14 +1932,38 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1827
1932
|
"progress",
|
|
1828
1933
|
"onSeekInput"
|
|
1829
1934
|
])) : o("", !0),
|
|
1830
|
-
|
|
1935
|
+
H.value ? (S(), s("div", {
|
|
1831
1936
|
key: 3,
|
|
1832
|
-
class: _(["absolute left-1/2 z-[4] -translate-x-1/2",
|
|
1833
|
-
}, [
|
|
1937
|
+
class: _(["absolute left-1/2 z-[4] -translate-x-1/2", P.value])
|
|
1938
|
+
}, [J.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, H.value))) : (S(), s("div", {
|
|
1834
1939
|
key: 1,
|
|
1835
1940
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
1836
|
-
class: _(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center",
|
|
1837
|
-
}, k(
|
|
1941
|
+
class: _(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", H.value.kind === "end" ? "border-amber-300/35 text-amber-200" : H.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
1942
|
+
}, k(H.value.message), 3))], 2)) : o("", !0)
|
|
1943
|
+
])) : j(ne) && j(Y) ? (S(), a(Jt, {
|
|
1944
|
+
key: 1,
|
|
1945
|
+
message: j(Y).message,
|
|
1946
|
+
mode: j(Y).mode,
|
|
1947
|
+
surface: j(Y).surface
|
|
1948
|
+
}, {
|
|
1949
|
+
default: L(() => [j(te) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(Y)))) : o("", !0)]),
|
|
1950
|
+
_: 3
|
|
1951
|
+
}, 8, [
|
|
1952
|
+
"message",
|
|
1953
|
+
"mode",
|
|
1954
|
+
"surface"
|
|
1955
|
+
])) : o("", !0), j(X) && j(Y) ? (S(), a(Jt, {
|
|
1956
|
+
key: 2,
|
|
1957
|
+
message: j(Y).message,
|
|
1958
|
+
mode: j(Y).mode,
|
|
1959
|
+
surface: j(Y).surface
|
|
1960
|
+
}, {
|
|
1961
|
+
default: L(() => [j(te) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(Y)))) : o("", !0)]),
|
|
1962
|
+
_: 3
|
|
1963
|
+
}, 8, [
|
|
1964
|
+
"message",
|
|
1965
|
+
"mode",
|
|
1966
|
+
"surface"
|
|
1838
1967
|
])) : o("", !0)], 544), u(r, {
|
|
1839
1968
|
"enter-active-class": "transform-gpu transition-all duration-320 ease-out",
|
|
1840
1969
|
"enter-from-class": "translate-x-full opacity-0",
|
|
@@ -1843,7 +1972,7 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1843
1972
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
1844
1973
|
"leave-to-class": "translate-x-full opacity-0"
|
|
1845
1974
|
}, {
|
|
1846
|
-
default:
|
|
1975
|
+
default: L(() => [K.value && R.value ? (S(), s("aside", xn, [c("div", Sn, [D(e.$slots, "fullscreen-aside", v(f(R.value)))])])) : o("", !0)]),
|
|
1847
1976
|
_: 3
|
|
1848
1977
|
})], 4),
|
|
1849
1978
|
u(r, {
|
|
@@ -1854,29 +1983,29 @@ var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1854
1983
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
1855
1984
|
"leave-to-class": "translate-x-full opacity-0"
|
|
1856
1985
|
}, {
|
|
1857
|
-
default:
|
|
1986
|
+
default: L(() => [q.value && R.value ? (S(), s("aside", Cn, [c("div", wn, [D(e.$slots, "fullscreen-aside", v(f(R.value)))])])) : o("", !0)]),
|
|
1858
1987
|
_: 3
|
|
1859
1988
|
})
|
|
1860
1989
|
]));
|
|
1861
1990
|
}
|
|
1862
|
-
}),
|
|
1863
|
-
function
|
|
1991
|
+
}), Dn = 1, On = .5;
|
|
1992
|
+
function kn(e) {
|
|
1864
1993
|
if (e.type !== "image" && e.type !== "video") return {
|
|
1865
|
-
width:
|
|
1866
|
-
height:
|
|
1994
|
+
width: Dn,
|
|
1995
|
+
height: Dn,
|
|
1867
1996
|
source: "fallback"
|
|
1868
1997
|
};
|
|
1869
1998
|
let t = e.preview?.width, n = e.preview?.height;
|
|
1870
|
-
if (
|
|
1871
|
-
let r =
|
|
1999
|
+
if (In(t) && In(n)) {
|
|
2000
|
+
let r = Ln(e, t, n);
|
|
1872
2001
|
return {
|
|
1873
2002
|
width: r.width,
|
|
1874
2003
|
height: r.height,
|
|
1875
2004
|
source: "preview"
|
|
1876
2005
|
};
|
|
1877
2006
|
}
|
|
1878
|
-
if (
|
|
1879
|
-
let t =
|
|
2007
|
+
if (In(e.width) && In(e.height)) {
|
|
2008
|
+
let t = Ln(e, e.width, e.height);
|
|
1880
2009
|
return {
|
|
1881
2010
|
width: t.width,
|
|
1882
2011
|
height: t.height,
|
|
@@ -1884,31 +2013,31 @@ function yn(e) {
|
|
|
1884
2013
|
};
|
|
1885
2014
|
}
|
|
1886
2015
|
return {
|
|
1887
|
-
width:
|
|
1888
|
-
height:
|
|
2016
|
+
width: Dn,
|
|
2017
|
+
height: Dn,
|
|
1889
2018
|
source: "fallback"
|
|
1890
2019
|
};
|
|
1891
2020
|
}
|
|
1892
|
-
function
|
|
2021
|
+
function An(e, t) {
|
|
1893
2022
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
1894
2023
|
}
|
|
1895
|
-
function
|
|
2024
|
+
function jn(e, t, n, r = 0) {
|
|
1896
2025
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
1897
2026
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
1898
2027
|
return !a || a <= 0 ? n : a / t;
|
|
1899
2028
|
}
|
|
1900
|
-
function
|
|
1901
|
-
let n =
|
|
2029
|
+
function Mn(e, t) {
|
|
2030
|
+
let n = kn(e);
|
|
1902
2031
|
return n.height / n.width * t;
|
|
1903
2032
|
}
|
|
1904
|
-
function
|
|
2033
|
+
function Nn(e, t) {
|
|
1905
2034
|
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;
|
|
1906
2035
|
for (let c = 0; c < e.length; c += 1) {
|
|
1907
2036
|
let l = e[c];
|
|
1908
|
-
o.set(
|
|
2037
|
+
o.set(Q(l), c);
|
|
1909
2038
|
let u = 0;
|
|
1910
2039
|
for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
|
|
1911
|
-
let d = u * (t.columnWidth + t.gapX), f = n[u], p =
|
|
2040
|
+
let d = u * (t.columnWidth + t.gapX), f = n[u], p = Mn(l, t.columnWidth);
|
|
1912
2041
|
r[c] = {
|
|
1913
2042
|
x: d,
|
|
1914
2043
|
y: f
|
|
@@ -1927,7 +2056,7 @@ function Cn(e, t) {
|
|
|
1927
2056
|
indexById: o
|
|
1928
2057
|
};
|
|
1929
2058
|
}
|
|
1930
|
-
function
|
|
2059
|
+
function Pn(e) {
|
|
1931
2060
|
if (e.itemCount <= 0) return [];
|
|
1932
2061
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
1933
2062
|
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();
|
|
@@ -1937,21 +2066,21 @@ function wn(e) {
|
|
|
1937
2066
|
}
|
|
1938
2067
|
return Array.from(a).sort((e, t) => e - t);
|
|
1939
2068
|
}
|
|
1940
|
-
function
|
|
2069
|
+
function Fn(e, t, n) {
|
|
1941
2070
|
let r = /* @__PURE__ */ new Map();
|
|
1942
2071
|
for (let i of e) {
|
|
1943
|
-
let e = t.get(
|
|
2072
|
+
let e = t.get(Q(i));
|
|
1944
2073
|
if (e == null) continue;
|
|
1945
2074
|
let a = n[e];
|
|
1946
|
-
a && r.set(
|
|
2075
|
+
a && r.set(Q(i), a);
|
|
1947
2076
|
}
|
|
1948
2077
|
return r;
|
|
1949
2078
|
}
|
|
1950
|
-
function
|
|
2079
|
+
function In(e) {
|
|
1951
2080
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
1952
2081
|
}
|
|
1953
|
-
function
|
|
1954
|
-
return e.type !== "image" || n / t >=
|
|
2082
|
+
function Ln(e, t, n) {
|
|
2083
|
+
return e.type !== "image" || n / t >= On ? {
|
|
1955
2084
|
width: t,
|
|
1956
2085
|
height: n
|
|
1957
2086
|
} : {
|
|
@@ -1961,149 +2090,193 @@ function Dn(e, t, n) {
|
|
|
1961
2090
|
}
|
|
1962
2091
|
//#endregion
|
|
1963
2092
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
1964
|
-
var
|
|
1965
|
-
function
|
|
2093
|
+
var Rn = 300, zn = 600, Bn = 40, Vn = 300, Hn = 400;
|
|
2094
|
+
function Un(e, t) {
|
|
1966
2095
|
return t === "top" ? [...e].reverse() : e;
|
|
1967
2096
|
}
|
|
1968
|
-
function
|
|
1969
|
-
return e <= 0 ?
|
|
2097
|
+
function Wn(e) {
|
|
2098
|
+
return e <= 0 ? zn : zn + Math.min((e - 1) * Bn, Hn);
|
|
1970
2099
|
}
|
|
1971
|
-
function
|
|
2100
|
+
function Gn() {
|
|
2101
|
+
return Vn;
|
|
2102
|
+
}
|
|
2103
|
+
function Kn(e) {
|
|
1972
2104
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
1973
2105
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
1974
2106
|
}
|
|
1975
|
-
function
|
|
1976
|
-
let t = T(/* @__PURE__ */ new Set()), n = T(/* @__PURE__ */ new Set()), r = T(/* @__PURE__ */ new Map()),
|
|
1977
|
-
|
|
1978
|
-
if (!
|
|
2107
|
+
function qn(e) {
|
|
2108
|
+
let t = T(/* @__PURE__ */ new Set()), n = T(/* @__PURE__ */ new Set()), r = T(/* @__PURE__ */ new Map()), a = T(/* @__PURE__ */ new Map()), o = T(/* @__PURE__ */ new Map()), s = T(/* @__PURE__ */ new Set()), c = T(/* @__PURE__ */ new Map()), l = T(/* @__PURE__ */ new Map()), u = T(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
|
|
2109
|
+
F(e.visibleIndices, (i) => {
|
|
2110
|
+
if (!i.length) return;
|
|
1979
2111
|
let o = [];
|
|
1980
|
-
for (let n of
|
|
1981
|
-
let r = e.items.value[n] ?
|
|
1982
|
-
!r || !t.value.has(r) ||
|
|
2112
|
+
for (let n of i) {
|
|
2113
|
+
let r = e.items.value[n] ? Q(e.items.value[n]) : null;
|
|
2114
|
+
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
1983
2115
|
}
|
|
1984
2116
|
if (!o.length) return;
|
|
1985
|
-
let s =
|
|
1986
|
-
for (let e = 0; e < s.length; e += 1)
|
|
1987
|
-
r.value =
|
|
2117
|
+
let s = Un(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
2118
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * Bn, Hn));
|
|
2119
|
+
r.value = c, Jn(() => {
|
|
1988
2120
|
let e = new Set(n.value);
|
|
1989
2121
|
for (let t of o) e.add(t);
|
|
1990
2122
|
n.value = e;
|
|
1991
|
-
}),
|
|
2123
|
+
}), Yn(() => {
|
|
1992
2124
|
let e = new Set(t.value);
|
|
1993
2125
|
for (let t of o) e.delete(t);
|
|
1994
|
-
t.value = e,
|
|
1995
|
-
let e = new Set(n.value), t = new Map(r.value),
|
|
1996
|
-
for (let n of o) e.delete(n), t.delete(n),
|
|
1997
|
-
n.value = e, r.value = t,
|
|
1998
|
-
},
|
|
2126
|
+
t.value = e, S(() => {
|
|
2127
|
+
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
2128
|
+
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
2129
|
+
n.value = e, r.value = t, a.value = i;
|
|
2130
|
+
}, Wn(o.length));
|
|
1999
2131
|
});
|
|
2000
|
-
}, { flush: "post" }),
|
|
2001
|
-
|
|
2002
|
-
|
|
2132
|
+
}, { flush: "post" }), F(() => e.items.value.map((e) => Q(e)), (e) => {
|
|
2133
|
+
if (!e.length || !o.value.size) return;
|
|
2134
|
+
let t = new Set(e), n = null, r = null;
|
|
2135
|
+
for (let e of o.value.keys()) t.has(e) && (n ||= new Map(o.value), r ||= new Set(s.value), n.delete(e), r.delete(e));
|
|
2136
|
+
n && (o.value = n), r && (s.value = r);
|
|
2137
|
+
}), b(() => {
|
|
2138
|
+
for (let e of f) clearTimeout(e);
|
|
2139
|
+
f.clear();
|
|
2003
2140
|
});
|
|
2004
|
-
function
|
|
2141
|
+
function m(e, n = "bottom") {
|
|
2005
2142
|
if (!e.length) return;
|
|
2006
|
-
let r = new Set(t.value),
|
|
2143
|
+
let r = new Set(t.value), i = new Map(a.value);
|
|
2007
2144
|
for (let t of e) {
|
|
2008
|
-
let e =
|
|
2009
|
-
r.add(e),
|
|
2145
|
+
let e = Q(t);
|
|
2146
|
+
r.add(e), i.set(e, n);
|
|
2010
2147
|
}
|
|
2011
|
-
t.value = r,
|
|
2148
|
+
t.value = r, a.value = i;
|
|
2012
2149
|
}
|
|
2013
|
-
function
|
|
2150
|
+
function h(e) {
|
|
2151
|
+
if (!e.length) return;
|
|
2152
|
+
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 = [];
|
|
2153
|
+
for (let t of e) {
|
|
2154
|
+
let e = Q(t.item);
|
|
2155
|
+
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
2156
|
+
}
|
|
2157
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Jn(() => {
|
|
2158
|
+
let e = new Set(s.value);
|
|
2159
|
+
for (let t of p) e.add(t);
|
|
2160
|
+
s.value = e;
|
|
2161
|
+
}), S(() => {
|
|
2162
|
+
let e = new Map(o.value), t = new Set(s.value);
|
|
2163
|
+
for (let n of p) e.delete(n), t.delete(n);
|
|
2164
|
+
o.value = e, s.value = t;
|
|
2165
|
+
}, Vn);
|
|
2166
|
+
}
|
|
2167
|
+
function g(t, n, r = Rn) {
|
|
2014
2168
|
if (!t.size) return;
|
|
2015
|
-
let i = /* @__PURE__ */ new Map(),
|
|
2016
|
-
for (let [r,
|
|
2169
|
+
let i = /* @__PURE__ */ new Map(), a = [];
|
|
2170
|
+
for (let [r, o] of t.entries()) {
|
|
2017
2171
|
if (n?.has(r)) continue;
|
|
2018
2172
|
let t = e.indexById.value.get(r);
|
|
2019
2173
|
if (t == null) continue;
|
|
2020
|
-
let
|
|
2021
|
-
if (!
|
|
2022
|
-
let
|
|
2023
|
-
!
|
|
2024
|
-
dx:
|
|
2174
|
+
let s = e.positions.value[t];
|
|
2175
|
+
if (!s) continue;
|
|
2176
|
+
let c = o.x - s.x, l = o.y - s.y;
|
|
2177
|
+
!c && !l || (i.set(r, {
|
|
2178
|
+
dx: c,
|
|
2025
2179
|
dy: l
|
|
2026
|
-
}),
|
|
2180
|
+
}), a.push(r));
|
|
2027
2181
|
}
|
|
2028
2182
|
if (!i.size) return;
|
|
2029
|
-
|
|
2030
|
-
let
|
|
2031
|
-
for (let e of
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2183
|
+
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
2184
|
+
let o = new Map(l.value);
|
|
2185
|
+
for (let e of a) o.set(e, r);
|
|
2186
|
+
l.value = o, Jn(() => {
|
|
2187
|
+
u.value = new Set(a), Jn(() => {
|
|
2188
|
+
c.value = /* @__PURE__ */ new Map();
|
|
2035
2189
|
});
|
|
2036
|
-
}),
|
|
2037
|
-
|
|
2038
|
-
let e = new Map(
|
|
2039
|
-
for (let t of
|
|
2040
|
-
|
|
2190
|
+
}), S(() => {
|
|
2191
|
+
u.value = /* @__PURE__ */ new Set();
|
|
2192
|
+
let e = new Map(l.value);
|
|
2193
|
+
for (let t of a) e.delete(t);
|
|
2194
|
+
l.value = e;
|
|
2041
2195
|
}, r);
|
|
2042
2196
|
}
|
|
2043
|
-
function
|
|
2044
|
-
if (n.value.has(e)) return `transform ${
|
|
2045
|
-
if (
|
|
2197
|
+
function _(e) {
|
|
2198
|
+
if (n.value.has(e)) return `transform ${zn}ms ease-out`;
|
|
2199
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? Rn}ms ease-out`;
|
|
2046
2200
|
}
|
|
2047
|
-
function
|
|
2201
|
+
function v(e) {
|
|
2048
2202
|
if (!n.value.has(e)) return;
|
|
2049
2203
|
let t = r.value.get(e) ?? 0;
|
|
2050
2204
|
return t > 0 ? `${t}ms` : void 0;
|
|
2051
2205
|
}
|
|
2052
|
-
function
|
|
2053
|
-
let r = e.items.value[n],
|
|
2206
|
+
function y(n) {
|
|
2207
|
+
let r = e.items.value[n], i = e.positions.value[n] ?? {
|
|
2054
2208
|
x: 0,
|
|
2055
2209
|
y: 0
|
|
2056
|
-
},
|
|
2210
|
+
}, o = e.heights.value[n] ?? e.columnWidth.value, s = r ? Q(r) : null, l = s ? c.value.get(s) ?? {
|
|
2057
2211
|
dx: 0,
|
|
2058
2212
|
dy: 0
|
|
2059
2213
|
} : {
|
|
2060
2214
|
dx: 0,
|
|
2061
2215
|
dy: 0
|
|
2062
|
-
}, u =
|
|
2216
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Kn({
|
|
2063
2217
|
columnWidth: e.columnWidth.value,
|
|
2064
2218
|
direction: u,
|
|
2065
|
-
itemHeight:
|
|
2219
|
+
itemHeight: o,
|
|
2066
2220
|
scrollTop: e.scrollTop.value,
|
|
2067
2221
|
viewportHeight: e.viewportHeight.value
|
|
2068
|
-
}) :
|
|
2069
|
-
return `translate3d(${
|
|
2222
|
+
}) : i.y;
|
|
2223
|
+
return `translate3d(${i.x + l.dx}px, ${d + l.dy}px, 0)`;
|
|
2070
2224
|
}
|
|
2071
|
-
function
|
|
2225
|
+
function x(t) {
|
|
2226
|
+
let n = Q(t), r = o.value.get(n);
|
|
2227
|
+
if (!r) return {
|
|
2228
|
+
opacity: "0",
|
|
2229
|
+
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
2230
|
+
transition: `opacity ${Vn}ms ease-out, transform ${Vn}ms ease-out`
|
|
2231
|
+
};
|
|
2232
|
+
let i = s.value.has(n);
|
|
2233
|
+
return {
|
|
2234
|
+
height: `${r.height}px`,
|
|
2235
|
+
opacity: i ? "0" : "1",
|
|
2236
|
+
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
2237
|
+
transition: `opacity ${Vn}ms ease-out, transform ${Vn}ms ease-out`,
|
|
2238
|
+
width: `${e.columnWidth.value}px`
|
|
2239
|
+
};
|
|
2240
|
+
}
|
|
2241
|
+
function S(e, t) {
|
|
2072
2242
|
let n = setTimeout(() => {
|
|
2073
|
-
|
|
2243
|
+
f.delete(n), e();
|
|
2074
2244
|
}, t);
|
|
2075
|
-
|
|
2245
|
+
f.add(n);
|
|
2076
2246
|
}
|
|
2077
2247
|
return {
|
|
2078
|
-
getCardTransform:
|
|
2079
|
-
getCardTransition:
|
|
2080
|
-
getCardTransitionDelay:
|
|
2081
|
-
|
|
2082
|
-
|
|
2248
|
+
getCardTransform: y,
|
|
2249
|
+
getCardTransition: _,
|
|
2250
|
+
getCardTransitionDelay: v,
|
|
2251
|
+
getLeavingCardStyle: x,
|
|
2252
|
+
leavingItems: p,
|
|
2253
|
+
markEnter: m,
|
|
2254
|
+
markLeave: h,
|
|
2255
|
+
playFlipMoveAnimation: g
|
|
2083
2256
|
};
|
|
2084
2257
|
}
|
|
2085
|
-
function
|
|
2258
|
+
function Jn(e) {
|
|
2086
2259
|
if (typeof requestAnimationFrame == "function") {
|
|
2087
2260
|
requestAnimationFrame(() => e());
|
|
2088
2261
|
return;
|
|
2089
2262
|
}
|
|
2090
2263
|
setTimeout(e, 0);
|
|
2091
2264
|
}
|
|
2092
|
-
function
|
|
2093
|
-
|
|
2265
|
+
function Yn(e) {
|
|
2266
|
+
Jn(() => Jn(e));
|
|
2094
2267
|
}
|
|
2095
2268
|
//#endregion
|
|
2096
2269
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
2097
|
-
function
|
|
2270
|
+
function Xn(e, t) {
|
|
2098
2271
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
2099
2272
|
}
|
|
2100
|
-
function
|
|
2273
|
+
function Zn(e, t, n) {
|
|
2101
2274
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
2102
2275
|
}
|
|
2103
|
-
function
|
|
2276
|
+
function Qn(e, t, n, r) {
|
|
2104
2277
|
return (e?.scrollHeight ?? r) - (t + n);
|
|
2105
2278
|
}
|
|
2106
|
-
function
|
|
2279
|
+
function $n(e, t) {
|
|
2107
2280
|
return {
|
|
2108
2281
|
height: `${e}px`,
|
|
2109
2282
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -2111,8 +2284,8 @@ function Vn(e, t) {
|
|
|
2111
2284
|
}
|
|
2112
2285
|
//#endregion
|
|
2113
2286
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
2114
|
-
var
|
|
2115
|
-
function
|
|
2287
|
+
var er = 250, tr = 1e3;
|
|
2288
|
+
function nr(e) {
|
|
2116
2289
|
let t = T(!1), n = T(!1), r = T(0), i = T(0), a = T(!1), o = T(!1), s = 0, c = null;
|
|
2117
2290
|
b(() => {
|
|
2118
2291
|
y();
|
|
@@ -2128,7 +2301,7 @@ function Wn(e) {
|
|
|
2128
2301
|
function u(t) {
|
|
2129
2302
|
if (!x(t) || !e.isAtBoundary()) return;
|
|
2130
2303
|
let n = Date.now();
|
|
2131
|
-
n < s || (s = n +
|
|
2304
|
+
n < s || (s = n + er, m());
|
|
2132
2305
|
}
|
|
2133
2306
|
function d() {
|
|
2134
2307
|
if (!g()) return;
|
|
@@ -2156,13 +2329,13 @@ function Wn(e) {
|
|
|
2156
2329
|
h() && (r.value += 1);
|
|
2157
2330
|
}
|
|
2158
2331
|
function h() {
|
|
2159
|
-
return e.hasPage.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
2332
|
+
return e.hasPage.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
2160
2333
|
}
|
|
2161
2334
|
function g() {
|
|
2162
|
-
return e.hasPage.value && t.value && r.value > i.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
2335
|
+
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
2163
2336
|
}
|
|
2164
2337
|
function _() {
|
|
2165
|
-
o.value = !1, v(
|
|
2338
|
+
o.value = !1, v(tr);
|
|
2166
2339
|
}
|
|
2167
2340
|
function v(e) {
|
|
2168
2341
|
y(), a.value = !0, c = setTimeout(() => {
|
|
@@ -2185,76 +2358,87 @@ function Wn(e) {
|
|
|
2185
2358
|
}
|
|
2186
2359
|
//#endregion
|
|
2187
2360
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
2188
|
-
var
|
|
2189
|
-
function
|
|
2190
|
-
let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth ||
|
|
2361
|
+
var rr = 600, $ = 24, ir = 16, ar = 300, or = 200, sr = 200, cr = 200, lr = 300, ur = 24, dr = 48, fr = 500, pr = 1e3;
|
|
2362
|
+
function mr(e) {
|
|
2363
|
+
let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || ar), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = T(null), p = T(!1), m = i(() => Math.max(ar, a.value - $ * 2)), h = i(() => An(m.value, ar)), _ = i(() => jn(m.value, h.value, ar, ir)), v = i(() => hr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => Pn({
|
|
2191
2364
|
itemCount: e.items.value.length,
|
|
2192
2365
|
viewportHeight: r.value,
|
|
2193
2366
|
scrollTop: n.value,
|
|
2194
|
-
overscanPx:
|
|
2195
|
-
bucketPx:
|
|
2367
|
+
overscanPx: or,
|
|
2368
|
+
bucketPx: rr,
|
|
2196
2369
|
buckets: c.value
|
|
2197
|
-
})),
|
|
2370
|
+
})), S = i(() => y.value.map((t) => ({
|
|
2198
2371
|
item: e.items.value[t],
|
|
2199
2372
|
index: t
|
|
2200
|
-
}))),
|
|
2201
|
-
let e = l.value +
|
|
2202
|
-
return Math.max(e, t, r.value) +
|
|
2203
|
-
}),
|
|
2204
|
-
if (!
|
|
2205
|
-
let e = r.value /
|
|
2206
|
-
return Math.min(
|
|
2207
|
-
}),
|
|
2208
|
-
if (!
|
|
2209
|
-
let e = Math.max(0,
|
|
2210
|
-
return
|
|
2211
|
-
}),
|
|
2373
|
+
}))), C = i(() => {
|
|
2374
|
+
let e = l.value + $ * 2, t = d.value ?? 0;
|
|
2375
|
+
return Math.max(e, t, r.value) + cr;
|
|
2376
|
+
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), D = i(() => Math.max(0, r.value - ur * 2)), O = i(() => C.value > r.value + 1 && D.value > 0), k = i(() => {
|
|
2377
|
+
if (!O.value) return 0;
|
|
2378
|
+
let e = r.value / C.value * D.value;
|
|
2379
|
+
return Math.min(D.value, Math.max(dr, e));
|
|
2380
|
+
}), A = i(() => {
|
|
2381
|
+
if (!O.value) return ur;
|
|
2382
|
+
let e = Math.max(0, C.value - r.value);
|
|
2383
|
+
return ur + Math.max(0, D.value - k.value) * (e > 0 ? hr(n.value / e, 0, 1) : 0);
|
|
2384
|
+
}), j = qn({
|
|
2212
2385
|
items: e.items,
|
|
2213
|
-
visibleIndices:
|
|
2386
|
+
visibleIndices: y,
|
|
2214
2387
|
positions: o,
|
|
2215
2388
|
heights: s,
|
|
2216
2389
|
indexById: u,
|
|
2217
|
-
columnWidth:
|
|
2390
|
+
columnWidth: _,
|
|
2218
2391
|
scrollTop: n,
|
|
2219
2392
|
viewportHeight: r
|
|
2220
|
-
}),
|
|
2393
|
+
}), M = nr({
|
|
2221
2394
|
direction: "top",
|
|
2222
2395
|
getAnimationLockMs(e) {
|
|
2223
|
-
return Math.max(
|
|
2396
|
+
return Math.max(fr, Wn(e)) + pr;
|
|
2224
2397
|
},
|
|
2225
2398
|
hasPage: e.hasPreviousPage,
|
|
2399
|
+
interactionLocked: p,
|
|
2226
2400
|
isAtBoundary() {
|
|
2227
|
-
return n.value <=
|
|
2401
|
+
return n.value <= $ + ir;
|
|
2228
2402
|
},
|
|
2229
2403
|
loading: e.loading,
|
|
2230
2404
|
requestPage: e.requestPreviousPage
|
|
2231
|
-
}),
|
|
2405
|
+
}), N = nr({
|
|
2232
2406
|
direction: "bottom",
|
|
2233
2407
|
getAnimationLockMs(e) {
|
|
2234
|
-
return
|
|
2408
|
+
return Wn(e) + pr;
|
|
2235
2409
|
},
|
|
2236
|
-
hasPage:
|
|
2410
|
+
hasPage: w,
|
|
2411
|
+
interactionLocked: p,
|
|
2237
2412
|
isAtBoundary() {
|
|
2238
|
-
return
|
|
2413
|
+
return re() <= sr;
|
|
2239
2414
|
},
|
|
2240
2415
|
loading: e.loading,
|
|
2241
2416
|
requestPage: e.requestNextPage
|
|
2242
|
-
}),
|
|
2243
|
-
|
|
2244
|
-
() => e.items.value
|
|
2245
|
-
|
|
2246
|
-
|
|
2417
|
+
}), P = null, I = 0, L = null, R = null, z = !1;
|
|
2418
|
+
F([
|
|
2419
|
+
() => e.items.value,
|
|
2420
|
+
h,
|
|
2421
|
+
_
|
|
2247
2422
|
], async ([t], [r = []]) => {
|
|
2248
|
-
let i =
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2423
|
+
let i = t.map((e) => Q(e)), a = r ?? [], s = a.map((e) => Q(e)), c = Fn(a, u.value, o.value), l = oe(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has(Q(e))), m = a.flatMap((e) => {
|
|
2424
|
+
let t = Q(e);
|
|
2425
|
+
if (f.has(t)) return [];
|
|
2426
|
+
let n = c.get(t), r = l.get(t);
|
|
2427
|
+
return !n || r == null ? [] : [{
|
|
2428
|
+
height: r,
|
|
2429
|
+
item: e,
|
|
2430
|
+
position: n
|
|
2431
|
+
}];
|
|
2432
|
+
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = h && n.value > $ + ir ? t[v.value] : null, b = y ? Q(y) : null;
|
|
2433
|
+
_ && (K(Gn()), G()), B(), m.length > 0 && j.markLeave(m), p.length > 0 && (j.markEnter(p, h ? "top" : "bottom"), h ? M.onItemsMutated(p.length) : N.onItemsMutated(p.length)), j.playFlipMoveAnimation(c, new Set(p.map((e) => Q(e))), h ? fr : void 0), b ? (await g(), ee(b, c)) : e.active.value && s.length > 0 && J();
|
|
2434
|
+
}, { immediate: !0 }), F([
|
|
2435
|
+
() => e.pendingAppendItems.value.map((e) => Q(e)),
|
|
2253
2436
|
h,
|
|
2437
|
+
_,
|
|
2254
2438
|
r
|
|
2255
2439
|
], ([t]) => {
|
|
2256
|
-
|
|
2257
|
-
}, { immediate: !0 }),
|
|
2440
|
+
ce(), t.length && (d.value = ae([...e.items.value, ...e.pendingAppendItems.value]), se());
|
|
2441
|
+
}, { immediate: !0 }), F(() => e.active.value, async (e, i) => {
|
|
2258
2442
|
let a = t.value;
|
|
2259
2443
|
if (!a) return;
|
|
2260
2444
|
if (!e) {
|
|
@@ -2263,64 +2447,77 @@ function rr(e) {
|
|
|
2263
2447
|
}
|
|
2264
2448
|
if (i !== !1 || f.value == null) return;
|
|
2265
2449
|
await g();
|
|
2266
|
-
let o = Math.max(0,
|
|
2267
|
-
a.scrollTop = s, n.value = s,
|
|
2268
|
-
}),
|
|
2269
|
-
!t && !e.pendingAppendItems.value.length && !
|
|
2450
|
+
let o = Math.max(0, C.value - r.value), s = hr(f.value, 0, o);
|
|
2451
|
+
a.scrollTop = s, n.value = s, M.syncBoundary(), N.syncBoundary();
|
|
2452
|
+
}), F(() => e.loading.value, async (t) => {
|
|
2453
|
+
!t && !e.pendingAppendItems.value.length && !L && !z && (d.value = null), M.onLoadingChange(t), N.onLoadingChange(t), await g();
|
|
2270
2454
|
}), x(async () => {
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
}), t.value &&
|
|
2455
|
+
X(), await g(), v.value > 0 ? W(v.value, "center") : q(), M.syncBoundary(), N.syncBoundary(), typeof ResizeObserver < "u" ? (P = new ResizeObserver(() => {
|
|
2456
|
+
X();
|
|
2457
|
+
}), t.value && P.observe(t.value)) : window.addEventListener("resize", X);
|
|
2274
2458
|
}), b(() => {
|
|
2275
|
-
|
|
2459
|
+
P?.disconnect(), P = null, window.removeEventListener("resize", X), ce(), le(), I &&= (cancelAnimationFrame(I), 0);
|
|
2276
2460
|
});
|
|
2277
|
-
function
|
|
2278
|
-
let t =
|
|
2279
|
-
columnCount:
|
|
2280
|
-
columnWidth:
|
|
2281
|
-
gapX:
|
|
2282
|
-
gapY:
|
|
2283
|
-
bucketPx:
|
|
2461
|
+
function B() {
|
|
2462
|
+
let t = Nn(e.items.value, {
|
|
2463
|
+
columnCount: h.value,
|
|
2464
|
+
columnWidth: _.value,
|
|
2465
|
+
gapX: ir,
|
|
2466
|
+
gapY: ir,
|
|
2467
|
+
bucketPx: rr
|
|
2284
2468
|
});
|
|
2285
2469
|
o.value = t.positions.map((e) => ({
|
|
2286
|
-
x: e.x +
|
|
2287
|
-
y: e.y +
|
|
2470
|
+
x: e.x + $,
|
|
2471
|
+
y: e.y + $
|
|
2288
2472
|
})), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
|
|
2289
2473
|
}
|
|
2290
|
-
function
|
|
2291
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value =
|
|
2292
|
-
|
|
2474
|
+
function V() {
|
|
2475
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = te(), M.syncBoundary(), N.syncBoundary(), Y(), !J() && (I ||= requestAnimationFrame(() => {
|
|
2476
|
+
I = 0, q();
|
|
2293
2477
|
})));
|
|
2294
2478
|
}
|
|
2295
|
-
function
|
|
2296
|
-
e.active.value && (
|
|
2479
|
+
function H(t) {
|
|
2480
|
+
e.active.value && (M.onWheel(t), N.onWheel(t), Y());
|
|
2297
2481
|
}
|
|
2298
|
-
function
|
|
2299
|
-
let n = e.items.value[t], r = n ?
|
|
2482
|
+
function U(t) {
|
|
2483
|
+
let n = e.items.value[t], r = n ? Q(n) : "";
|
|
2300
2484
|
return {
|
|
2301
|
-
height: `${s.value[t] ??
|
|
2302
|
-
width: `${
|
|
2303
|
-
transition: r ?
|
|
2304
|
-
transitionDelay: r ?
|
|
2305
|
-
transform:
|
|
2485
|
+
height: `${s.value[t] ?? _.value}px`,
|
|
2486
|
+
width: `${_.value}px`,
|
|
2487
|
+
transition: r ? j.getCardTransition(r) : void 0,
|
|
2488
|
+
transitionDelay: r ? j.getCardTransitionDelay(r) : void 0,
|
|
2489
|
+
transform: j.getCardTransform(t)
|
|
2306
2490
|
};
|
|
2307
2491
|
}
|
|
2308
|
-
function
|
|
2492
|
+
function W(e, i) {
|
|
2309
2493
|
let a = t.value, c = o.value[e], l = s.value[e];
|
|
2310
2494
|
if (!a || !c || !l) return;
|
|
2311
|
-
let u = a.scrollTop, d = Math.max(0,
|
|
2312
|
-
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y -
|
|
2495
|
+
let u = a.scrollTop, d = Math.max(0, C.value - r.value);
|
|
2496
|
+
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - $ : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + $), a.scrollTop = hr(u, 0, d), n.value = a.scrollTop, q();
|
|
2313
2497
|
}
|
|
2314
|
-
function
|
|
2498
|
+
function ee(e, r) {
|
|
2315
2499
|
let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
|
|
2316
2500
|
if (!i || !a || !c) return;
|
|
2317
2501
|
let l = c.y - a.y;
|
|
2318
2502
|
i.scrollTop += l, n.value = i.scrollTop;
|
|
2319
2503
|
}
|
|
2320
|
-
function
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2504
|
+
function G() {
|
|
2505
|
+
let e = t.value;
|
|
2506
|
+
if (!e) {
|
|
2507
|
+
n.value = 0;
|
|
2508
|
+
return;
|
|
2509
|
+
}
|
|
2510
|
+
e.scrollTop = 0, n.value = 0, M.syncBoundary(), N.syncBoundary();
|
|
2511
|
+
}
|
|
2512
|
+
function K(e) {
|
|
2513
|
+
le(), p.value = !0, R = setTimeout(() => {
|
|
2514
|
+
R = null, p.value = !1;
|
|
2515
|
+
}, Math.max(0, e));
|
|
2516
|
+
}
|
|
2517
|
+
function q() {
|
|
2518
|
+
if (!y.value.length || J()) return;
|
|
2519
|
+
let t = n.value + r.value / 2, i = v.value, a = Infinity;
|
|
2520
|
+
for (let e of y.value) {
|
|
2324
2521
|
let n = o.value[e], r = s.value[e];
|
|
2325
2522
|
if (!n || !r) continue;
|
|
2326
2523
|
let c = n.y + r / 2, l = Math.abs(c - t);
|
|
@@ -2328,78 +2525,93 @@ function rr(e) {
|
|
|
2328
2525
|
}
|
|
2329
2526
|
e.setActiveIndex(i);
|
|
2330
2527
|
}
|
|
2331
|
-
function
|
|
2332
|
-
let t = n.value <=
|
|
2528
|
+
function J() {
|
|
2529
|
+
let t = n.value <= $ + ir, r = re() <= sr;
|
|
2333
2530
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
2334
2531
|
}
|
|
2335
|
-
function
|
|
2336
|
-
|
|
2532
|
+
function Y() {
|
|
2533
|
+
M.maybeRequestPage(), N.maybeRequestPage();
|
|
2337
2534
|
}
|
|
2338
|
-
function
|
|
2339
|
-
r.value =
|
|
2340
|
-
}
|
|
2341
|
-
function q() {
|
|
2342
|
-
return Rn(t.value, r.value);
|
|
2343
|
-
}
|
|
2344
|
-
function J() {
|
|
2345
|
-
return zn(t.value, a.value, Jn);
|
|
2535
|
+
function X() {
|
|
2536
|
+
r.value = te(), a.value = ne();
|
|
2346
2537
|
}
|
|
2347
2538
|
function te() {
|
|
2348
|
-
return
|
|
2349
|
-
}
|
|
2350
|
-
function Y() {
|
|
2351
|
-
return Vn(O.value, k.value);
|
|
2539
|
+
return Xn(t.value, r.value);
|
|
2352
2540
|
}
|
|
2353
|
-
function ne(
|
|
2354
|
-
return
|
|
2355
|
-
columnCount: m.value,
|
|
2356
|
-
columnWidth: h.value,
|
|
2357
|
-
gapX: qn,
|
|
2358
|
-
gapY: qn,
|
|
2359
|
-
bucketPx: Gn
|
|
2360
|
-
}).contentHeight + Kn * 2 : 0;
|
|
2541
|
+
function ne() {
|
|
2542
|
+
return Zn(t.value, a.value, ar);
|
|
2361
2543
|
}
|
|
2362
2544
|
function re() {
|
|
2545
|
+
return Qn(t.value, n.value, r.value, C.value);
|
|
2546
|
+
}
|
|
2547
|
+
function ie() {
|
|
2548
|
+
return $n(k.value, A.value);
|
|
2549
|
+
}
|
|
2550
|
+
function ae(e) {
|
|
2551
|
+
return e.length ? Nn(e, {
|
|
2552
|
+
columnCount: h.value,
|
|
2553
|
+
columnWidth: _.value,
|
|
2554
|
+
gapX: ir,
|
|
2555
|
+
gapY: ir,
|
|
2556
|
+
bucketPx: rr
|
|
2557
|
+
}).contentHeight + $ * 2 : 0;
|
|
2558
|
+
}
|
|
2559
|
+
function oe(e) {
|
|
2560
|
+
let t = /* @__PURE__ */ new Map();
|
|
2561
|
+
for (let n of e) {
|
|
2562
|
+
let e = Q(n), r = u.value.get(e);
|
|
2563
|
+
if (r == null) continue;
|
|
2564
|
+
let i = s.value[r];
|
|
2565
|
+
i != null && t.set(e, i);
|
|
2566
|
+
}
|
|
2567
|
+
return t;
|
|
2568
|
+
}
|
|
2569
|
+
function se() {
|
|
2363
2570
|
let t = e.commitPendingAppend.value;
|
|
2364
|
-
typeof t == "function" && (
|
|
2365
|
-
|
|
2571
|
+
typeof t == "function" && (L = setTimeout(async () => {
|
|
2572
|
+
L = null, z = !0;
|
|
2366
2573
|
try {
|
|
2367
2574
|
if (!e.pendingAppendItems.value.length) return;
|
|
2368
2575
|
await t(), await g(), await g();
|
|
2369
2576
|
} finally {
|
|
2370
|
-
d.value = null,
|
|
2577
|
+
d.value = null, z = !1;
|
|
2371
2578
|
}
|
|
2372
|
-
},
|
|
2579
|
+
}, lr));
|
|
2373
2580
|
}
|
|
2374
|
-
function
|
|
2375
|
-
|
|
2581
|
+
function ce() {
|
|
2582
|
+
L &&= (clearTimeout(L), null);
|
|
2583
|
+
}
|
|
2584
|
+
function le() {
|
|
2585
|
+
R && (clearTimeout(R), R = null, p.value = !1);
|
|
2376
2586
|
}
|
|
2377
2587
|
return {
|
|
2378
|
-
columnWidth:
|
|
2379
|
-
containerHeight:
|
|
2380
|
-
getCardStyle:
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2588
|
+
columnWidth: _,
|
|
2589
|
+
containerHeight: C,
|
|
2590
|
+
getCardStyle: U,
|
|
2591
|
+
getLeavingCardStyle: j.getLeavingCardStyle,
|
|
2592
|
+
getScrollbarThumbStyle: ie,
|
|
2593
|
+
leavingItems: j.leavingItems,
|
|
2594
|
+
onScroll: V,
|
|
2595
|
+
onWheel: H,
|
|
2596
|
+
paginationLabel: E,
|
|
2597
|
+
renderedItems: S,
|
|
2598
|
+
resolvedActiveIndex: v,
|
|
2599
|
+
scrollToIndex: W,
|
|
2600
|
+
showScrollbar: O,
|
|
2389
2601
|
scrollViewportRef: t
|
|
2390
2602
|
};
|
|
2391
2603
|
}
|
|
2392
|
-
function
|
|
2604
|
+
function hr(e, t, n) {
|
|
2393
2605
|
return Math.min(Math.max(e, t), n);
|
|
2394
2606
|
}
|
|
2395
2607
|
//#endregion
|
|
2396
2608
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
2397
|
-
function
|
|
2609
|
+
function gr(e) {
|
|
2398
2610
|
if (e) try {
|
|
2399
2611
|
e.removeAttribute("src"), e.src = "";
|
|
2400
2612
|
} catch {}
|
|
2401
2613
|
}
|
|
2402
|
-
function
|
|
2614
|
+
function _r(e) {
|
|
2403
2615
|
if (e) {
|
|
2404
2616
|
try {
|
|
2405
2617
|
e.currentTime = 0;
|
|
@@ -2410,12 +2622,12 @@ function or(e) {
|
|
|
2410
2622
|
} catch {}
|
|
2411
2623
|
}
|
|
2412
2624
|
}
|
|
2413
|
-
function
|
|
2625
|
+
function vr(e, t) {
|
|
2414
2626
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
2415
2627
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
2416
2628
|
return e.bottom > 0 && e.top < n;
|
|
2417
2629
|
}
|
|
2418
|
-
function
|
|
2630
|
+
function yr(e) {
|
|
2419
2631
|
if (!e) return null;
|
|
2420
2632
|
try {
|
|
2421
2633
|
return new URL(e, window.location.href).href;
|
|
@@ -2425,22 +2637,22 @@ function cr(e) {
|
|
|
2425
2637
|
}
|
|
2426
2638
|
//#endregion
|
|
2427
2639
|
//#region src/components/viewer-core/listPreview.ts
|
|
2428
|
-
var
|
|
2429
|
-
function
|
|
2430
|
-
let t = e.preview?.url ?? e.url, n =
|
|
2640
|
+
var br = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, xr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
|
|
2641
|
+
function Sr(e) {
|
|
2642
|
+
let t = e.preview?.url ?? e.url, n = kn(e), r = e.title?.trim() || pt(e.type);
|
|
2431
2643
|
return e.type !== "image" && e.type !== "video" ? {
|
|
2432
2644
|
kind: "fallback",
|
|
2433
2645
|
url: null,
|
|
2434
2646
|
width: n.width,
|
|
2435
2647
|
height: n.height,
|
|
2436
2648
|
label: r
|
|
2437
|
-
} :
|
|
2649
|
+
} : wr(e, t) ? {
|
|
2438
2650
|
kind: "video",
|
|
2439
2651
|
url: t,
|
|
2440
2652
|
width: n.width,
|
|
2441
2653
|
height: n.height,
|
|
2442
2654
|
label: r
|
|
2443
|
-
} :
|
|
2655
|
+
} : Cr(e, t) ? {
|
|
2444
2656
|
kind: "image",
|
|
2445
2657
|
url: t,
|
|
2446
2658
|
width: n.width,
|
|
@@ -2454,28 +2666,28 @@ function dr(e) {
|
|
|
2454
2666
|
label: r
|
|
2455
2667
|
};
|
|
2456
2668
|
}
|
|
2457
|
-
function
|
|
2458
|
-
return e.type !== "image" || typeof t != "string" ? !1 :
|
|
2669
|
+
function Cr(e, t) {
|
|
2670
|
+
return e.type !== "image" || typeof t != "string" ? !1 : br.test(t) || Tr(t);
|
|
2459
2671
|
}
|
|
2460
|
-
function
|
|
2461
|
-
return e.type === "video" && typeof t == "string" &&
|
|
2672
|
+
function wr(e, t) {
|
|
2673
|
+
return e.type === "video" && typeof t == "string" && xr.test(t);
|
|
2462
2674
|
}
|
|
2463
|
-
function
|
|
2675
|
+
function Tr(e) {
|
|
2464
2676
|
return /^https?:\/\//i.test(e);
|
|
2465
2677
|
}
|
|
2466
2678
|
//#endregion
|
|
2467
2679
|
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
2468
|
-
var
|
|
2680
|
+
var Er = {
|
|
2469
2681
|
maxGlobal: 10,
|
|
2470
2682
|
maxPerDomain: 4,
|
|
2471
2683
|
maxVideoPerDomain: 2
|
|
2472
2684
|
};
|
|
2473
|
-
function
|
|
2685
|
+
function Dr(e = Er) {
|
|
2474
2686
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
|
|
2475
2687
|
function i(e) {
|
|
2476
2688
|
let i = {
|
|
2477
2689
|
...e,
|
|
2478
|
-
domain:
|
|
2690
|
+
domain: Ar(e.url),
|
|
2479
2691
|
enqueuedAt: r,
|
|
2480
2692
|
id: `vibe-asset-load-${r += 1}`
|
|
2481
2693
|
};
|
|
@@ -2494,7 +2706,7 @@ function gr(e = hr) {
|
|
|
2494
2706
|
function a() {
|
|
2495
2707
|
if (n.size === 0) return;
|
|
2496
2708
|
let r = [...n.values()].sort((e, t) => {
|
|
2497
|
-
let n =
|
|
2709
|
+
let n = kr(e) - kr(t);
|
|
2498
2710
|
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
2499
2711
|
});
|
|
2500
2712
|
for (let i of r) {
|
|
@@ -2515,8 +2727,8 @@ function gr(e = hr) {
|
|
|
2515
2727
|
}
|
|
2516
2728
|
return { request: i };
|
|
2517
2729
|
}
|
|
2518
|
-
var
|
|
2519
|
-
function
|
|
2730
|
+
var Or = Dr();
|
|
2731
|
+
function kr(e) {
|
|
2520
2732
|
try {
|
|
2521
2733
|
let t = e.getPriority();
|
|
2522
2734
|
return Number.isFinite(t) ? t : Infinity;
|
|
@@ -2524,7 +2736,7 @@ function vr(e) {
|
|
|
2524
2736
|
return Infinity;
|
|
2525
2737
|
}
|
|
2526
2738
|
}
|
|
2527
|
-
function
|
|
2739
|
+
function Ar(e) {
|
|
2528
2740
|
try {
|
|
2529
2741
|
return new URL(e).hostname || "local";
|
|
2530
2742
|
} catch {
|
|
@@ -2533,14 +2745,14 @@ function yr(e) {
|
|
|
2533
2745
|
}
|
|
2534
2746
|
//#endregion
|
|
2535
2747
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
2536
|
-
var
|
|
2748
|
+
var jr = ["aria-label"], Mr = {
|
|
2537
2749
|
key: 0,
|
|
2538
2750
|
"data-testid": "vibe-list-card-spinner",
|
|
2539
2751
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
2540
|
-
},
|
|
2752
|
+
}, 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)] backdrop-blur-[18px]" }, Pr = ["src", "alt"], Fr = ["src"], Ir = ["data-kind"], Lr = { class: "grid justify-items-center gap-3 px-4 text-center" }, Rr = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, zr = {
|
|
2541
2753
|
key: 4,
|
|
2542
2754
|
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))]"
|
|
2543
|
-
},
|
|
2755
|
+
}, Br = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Vr = { class: "pointer-events-none absolute inset-0 z-[3]" }, Hr = /* @__PURE__ */ d({
|
|
2544
2756
|
__name: "ListCard",
|
|
2545
2757
|
props: {
|
|
2546
2758
|
active: {
|
|
@@ -2564,25 +2776,25 @@ var br = ["aria-label"], xr = {
|
|
|
2564
2776
|
},
|
|
2565
2777
|
emits: ["open"],
|
|
2566
2778
|
setup(e, { emit: t }) {
|
|
2567
|
-
let n = e, r = t, l = i(() =>
|
|
2568
|
-
|
|
2779
|
+
let n = e, r = t, l = i(() => Sr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(null), g = T(null), v = T(null), y = T(null), C = T(null), w = T(l.value.kind === "fallback"), E = i(() => w.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), A = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = i(() => !!h.value), I = i(() => jt(h.value)), L = i(() => A.value && !h.value && (!w.value || !m.value)), R = null, B = null, V = /* @__PURE__ */ new Set();
|
|
2780
|
+
F([E, () => l.value.kind], () => {
|
|
2569
2781
|
let e = l.value.kind === "fallback";
|
|
2570
2782
|
m.value = e, h.value = null, e && (w.value = !0);
|
|
2571
|
-
}),
|
|
2783
|
+
}), F(A, () => {
|
|
2572
2784
|
G();
|
|
2573
|
-
}),
|
|
2785
|
+
}), F([
|
|
2574
2786
|
d,
|
|
2575
2787
|
m,
|
|
2576
2788
|
E
|
|
2577
2789
|
], () => {
|
|
2578
2790
|
K();
|
|
2579
|
-
}),
|
|
2791
|
+
}), F(() => n.surfaceActive, (e) => {
|
|
2580
2792
|
if (!e) {
|
|
2581
2793
|
J(), K();
|
|
2582
2794
|
return;
|
|
2583
2795
|
}
|
|
2584
2796
|
requestAnimationFrame(() => {
|
|
2585
|
-
|
|
2797
|
+
Y(), G(), K();
|
|
2586
2798
|
});
|
|
2587
2799
|
}), x(() => {
|
|
2588
2800
|
if (!v.value || typeof IntersectionObserver > "u") {
|
|
@@ -2590,7 +2802,7 @@ var br = ["aria-label"], xr = {
|
|
|
2590
2802
|
return;
|
|
2591
2803
|
}
|
|
2592
2804
|
y.value = v.value.closest("[data-testid=\"vibe-list-scroll\"]"), R = new IntersectionObserver((e) => {
|
|
2593
|
-
for (let t of e) t.target === v.value && (n.surfaceActive &&
|
|
2805
|
+
for (let t of e) t.target === v.value && (n.surfaceActive && Y(t), G(), K());
|
|
2594
2806
|
}, {
|
|
2595
2807
|
root: y.value,
|
|
2596
2808
|
threshold: [0, 1]
|
|
@@ -2598,27 +2810,27 @@ var br = ["aria-label"], xr = {
|
|
|
2598
2810
|
}), b(() => {
|
|
2599
2811
|
q(), R?.disconnect(), R = null;
|
|
2600
2812
|
});
|
|
2601
|
-
function
|
|
2602
|
-
|
|
2813
|
+
function H() {
|
|
2814
|
+
se(g.value) && (m.value = !0, h.value = null, X(E.value ?? n.item.url), J());
|
|
2603
2815
|
}
|
|
2604
|
-
async function
|
|
2605
|
-
if (!
|
|
2816
|
+
async function U() {
|
|
2817
|
+
if (!se(g.value)) return;
|
|
2606
2818
|
let e = E.value ?? n.item.url;
|
|
2607
2819
|
m.value = !1, h.value = "generic";
|
|
2608
|
-
let t = await
|
|
2820
|
+
let t = await Mt(e);
|
|
2609
2821
|
h.value = t, n.reportAssetError?.({
|
|
2610
2822
|
item: n.item,
|
|
2611
|
-
occurrenceKey:
|
|
2823
|
+
occurrenceKey: Q(n.item),
|
|
2612
2824
|
url: e,
|
|
2613
2825
|
kind: t,
|
|
2614
2826
|
surface: "grid"
|
|
2615
2827
|
}), J();
|
|
2616
2828
|
}
|
|
2617
|
-
function U() {
|
|
2618
|
-
X(C.value) && (m.value = !0, h.value = null, Y(E.value ?? n.item.url), J(), K());
|
|
2619
|
-
}
|
|
2620
2829
|
function W() {
|
|
2621
|
-
|
|
2830
|
+
se(C.value) && (m.value = !0, h.value = null, X(E.value ?? n.item.url), J(), K());
|
|
2831
|
+
}
|
|
2832
|
+
function ee() {
|
|
2833
|
+
se(C.value) && (m.value = !1);
|
|
2622
2834
|
}
|
|
2623
2835
|
function G() {
|
|
2624
2836
|
if (l.value.kind === "fallback") {
|
|
@@ -2633,13 +2845,13 @@ var br = ["aria-label"], xr = {
|
|
|
2633
2845
|
q();
|
|
2634
2846
|
return;
|
|
2635
2847
|
}
|
|
2636
|
-
if (w.value ||
|
|
2637
|
-
|
|
2848
|
+
if (w.value || B) {
|
|
2849
|
+
B?.refresh();
|
|
2638
2850
|
return;
|
|
2639
2851
|
}
|
|
2640
|
-
|
|
2852
|
+
B = Or.request({
|
|
2641
2853
|
assetType: l.value.kind,
|
|
2642
|
-
getPriority:
|
|
2854
|
+
getPriority: ae,
|
|
2643
2855
|
onGrant() {
|
|
2644
2856
|
w.value = !0, m.value = !1, h.value = null;
|
|
2645
2857
|
},
|
|
@@ -2654,7 +2866,7 @@ var br = ["aria-label"], xr = {
|
|
|
2654
2866
|
return;
|
|
2655
2867
|
}
|
|
2656
2868
|
if (E.value && d.value && m.value) {
|
|
2657
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
2869
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, Ft(e);
|
|
2658
2870
|
return;
|
|
2659
2871
|
}
|
|
2660
2872
|
try {
|
|
@@ -2664,43 +2876,43 @@ var br = ["aria-label"], xr = {
|
|
|
2664
2876
|
}
|
|
2665
2877
|
}
|
|
2666
2878
|
function q(e = !0) {
|
|
2667
|
-
w.value = l.value.kind === "fallback", h.value = null, m.value = l.value.kind === "fallback", e && (
|
|
2879
|
+
w.value = l.value.kind === "fallback", h.value = null, m.value = l.value.kind === "fallback", e && (ne(), ie()), J();
|
|
2668
2880
|
}
|
|
2669
2881
|
function J() {
|
|
2670
|
-
|
|
2882
|
+
B?.release(), B = null;
|
|
2671
2883
|
}
|
|
2672
|
-
function
|
|
2884
|
+
function Y(e) {
|
|
2673
2885
|
let t = v.value;
|
|
2674
2886
|
if (!t) {
|
|
2675
2887
|
d.value = !0;
|
|
2676
2888
|
return;
|
|
2677
2889
|
}
|
|
2678
|
-
d.value =
|
|
2890
|
+
d.value = vr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? y.value?.getBoundingClientRect() ?? null);
|
|
2679
2891
|
}
|
|
2680
|
-
function
|
|
2892
|
+
function X(e) {
|
|
2681
2893
|
if (!e) return;
|
|
2682
|
-
let t =
|
|
2683
|
-
|
|
2894
|
+
let t = Q(n.item), r = `${t}|${e}`;
|
|
2895
|
+
V.has(r) || (V.add(r), n.reportAssetLoad?.({
|
|
2684
2896
|
item: n.item,
|
|
2685
2897
|
occurrenceKey: t,
|
|
2686
2898
|
surface: "grid",
|
|
2687
2899
|
url: e
|
|
2688
2900
|
}));
|
|
2689
2901
|
}
|
|
2690
|
-
function
|
|
2902
|
+
function te() {
|
|
2691
2903
|
if (!I.value) return;
|
|
2692
|
-
let e =
|
|
2693
|
-
|
|
2694
|
-
t.startsWith(`${e}|`) &&
|
|
2904
|
+
let e = Q(n.item);
|
|
2905
|
+
V.forEach((t) => {
|
|
2906
|
+
t.startsWith(`${e}|`) && V.delete(t);
|
|
2695
2907
|
}), h.value = null, m.value = !1, w.value = !1, J(), G();
|
|
2696
2908
|
}
|
|
2909
|
+
function ne() {
|
|
2910
|
+
gr(g.value);
|
|
2911
|
+
}
|
|
2697
2912
|
function ie() {
|
|
2698
|
-
|
|
2913
|
+
_r(C.value);
|
|
2699
2914
|
}
|
|
2700
2915
|
function ae() {
|
|
2701
|
-
or(C.value);
|
|
2702
|
-
}
|
|
2703
|
-
function se() {
|
|
2704
2916
|
let e = v.value;
|
|
2705
2917
|
if (!e) return Infinity;
|
|
2706
2918
|
let t = e.getBoundingClientRect();
|
|
@@ -2711,17 +2923,17 @@ var br = ["aria-label"], xr = {
|
|
|
2711
2923
|
let n = window.innerHeight / 2;
|
|
2712
2924
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
2713
2925
|
}
|
|
2714
|
-
function
|
|
2715
|
-
let t =
|
|
2716
|
-
return !e || !t ? !1 :
|
|
2926
|
+
function se(e) {
|
|
2927
|
+
let t = yr(E.value);
|
|
2928
|
+
return !e || !t ? !1 : yr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
2717
2929
|
}
|
|
2718
2930
|
function ce() {
|
|
2719
2931
|
r("open");
|
|
2720
2932
|
}
|
|
2721
|
-
function
|
|
2933
|
+
function le() {
|
|
2722
2934
|
f.value = !0;
|
|
2723
2935
|
}
|
|
2724
|
-
function
|
|
2936
|
+
function ue(e) {
|
|
2725
2937
|
let t = e.relatedTarget;
|
|
2726
2938
|
v.value && t instanceof Node && v.value.contains(t) || (f.value = !1);
|
|
2727
2939
|
}
|
|
@@ -2730,8 +2942,8 @@ var br = ["aria-label"], xr = {
|
|
|
2730
2942
|
ref: v,
|
|
2731
2943
|
"data-testid": "vibe-list-card-inner",
|
|
2732
2944
|
class: _(["group relative h-full w-full overflow-hidden border bg-[#0a0b0f] text-[#f7f1ea] transition-[border-color,transform] duration-300", n.active ? "border-white/28" : "border-white/12 hover:border-white/24"]),
|
|
2733
|
-
onFocusin:
|
|
2734
|
-
onFocusout:
|
|
2945
|
+
onFocusin: le,
|
|
2946
|
+
onFocusout: ue,
|
|
2735
2947
|
onPointerenter: t[0] ||= (e) => p.value = !0,
|
|
2736
2948
|
onPointerleave: t[1] ||= (e) => p.value = !1
|
|
2737
2949
|
}, [
|
|
@@ -2741,12 +2953,12 @@ var br = ["aria-label"], xr = {
|
|
|
2741
2953
|
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]",
|
|
2742
2954
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
2743
2955
|
onClick: ce
|
|
2744
|
-
}, null, 8,
|
|
2745
|
-
L.value ? (S(), s("div",
|
|
2956
|
+
}, null, 8, jr),
|
|
2957
|
+
L.value ? (S(), s("div", Mr, [c("span", Nr, [u(j(re), {
|
|
2746
2958
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2747
2959
|
"aria-hidden": "true"
|
|
2748
2960
|
})])])) : o("", !0),
|
|
2749
|
-
M.value && E.value && !
|
|
2961
|
+
M.value && E.value && !P.value ? (S(), s("img", {
|
|
2750
2962
|
key: 1,
|
|
2751
2963
|
ref_key: "imageRef",
|
|
2752
2964
|
ref: g,
|
|
@@ -2754,9 +2966,9 @@ var br = ["aria-label"], xr = {
|
|
|
2754
2966
|
alt: l.value.label,
|
|
2755
2967
|
draggable: "false",
|
|
2756
2968
|
class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
2757
|
-
onLoad:
|
|
2758
|
-
onError:
|
|
2759
|
-
}, null, 42,
|
|
2969
|
+
onLoad: H,
|
|
2970
|
+
onError: U
|
|
2971
|
+
}, null, 42, Pr)) : N.value && E.value && !P.value ? (S(), s("video", {
|
|
2760
2972
|
key: 2,
|
|
2761
2973
|
ref_key: "videoRef",
|
|
2762
2974
|
ref: C,
|
|
@@ -2766,37 +2978,37 @@ var br = ["aria-label"], xr = {
|
|
|
2766
2978
|
playsinline: "",
|
|
2767
2979
|
preload: "metadata",
|
|
2768
2980
|
class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
2769
|
-
onCanplay:
|
|
2770
|
-
onError:
|
|
2771
|
-
onLoadstart:
|
|
2772
|
-
onPlaying:
|
|
2773
|
-
onStalled:
|
|
2774
|
-
onWaiting:
|
|
2775
|
-
}, null, 42,
|
|
2981
|
+
onCanplay: W,
|
|
2982
|
+
onError: U,
|
|
2983
|
+
onLoadstart: ee,
|
|
2984
|
+
onPlaying: W,
|
|
2985
|
+
onStalled: ee,
|
|
2986
|
+
onWaiting: ee
|
|
2987
|
+
}, null, 42, Fr)) : P.value ? (S(), s("div", {
|
|
2776
2988
|
key: 3,
|
|
2777
2989
|
"data-testid": "vibe-list-card-error",
|
|
2778
2990
|
"data-kind": h.value,
|
|
2779
2991
|
class: "relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
|
|
2780
|
-
}, [c("div",
|
|
2992
|
+
}, [c("div", Lr, [
|
|
2781
2993
|
u(j(oe), {
|
|
2782
2994
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
2783
2995
|
"aria-hidden": "true"
|
|
2784
2996
|
}),
|
|
2785
|
-
c("span",
|
|
2997
|
+
c("span", Rr, k(j(At)(h.value)), 1),
|
|
2786
2998
|
I.value ? (S(), s("button", {
|
|
2787
2999
|
key: 0,
|
|
2788
3000
|
type: "button",
|
|
2789
3001
|
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",
|
|
2790
|
-
onClick:
|
|
3002
|
+
onClick: z(te, ["stop"])
|
|
2791
3003
|
}, " Retry ")) : o("", !0)
|
|
2792
|
-
])], 8,
|
|
2793
|
-
icon: j(
|
|
3004
|
+
])], 8, Ir)) : (S(), s("div", zr, [c("div", Br, [D(e.$slots, "item-icon", {
|
|
3005
|
+
icon: j(ft)(n.item.type),
|
|
2794
3006
|
item: n.item
|
|
2795
|
-
}, () => [(S(), a(O(j(
|
|
3007
|
+
}, () => [(S(), a(O(j(ft)(n.item.type)), {
|
|
2796
3008
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
2797
3009
|
"aria-hidden": "true"
|
|
2798
3010
|
}))])])])),
|
|
2799
|
-
c("div",
|
|
3011
|
+
c("div", Vr, [D(e.$slots, "grid-item-overlay", {
|
|
2800
3012
|
active: n.active,
|
|
2801
3013
|
focused: f.value,
|
|
2802
3014
|
hovered: p.value,
|
|
@@ -2806,24 +3018,24 @@ var br = ["aria-label"], xr = {
|
|
|
2806
3018
|
})])
|
|
2807
3019
|
], 34));
|
|
2808
3020
|
}
|
|
2809
|
-
}),
|
|
3021
|
+
}), Ur = { 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)]" }, Wr = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Gr = {
|
|
2810
3022
|
"data-testid": "vibe-pagination",
|
|
2811
3023
|
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]"
|
|
2812
|
-
},
|
|
3024
|
+
}, Kr = { class: "whitespace-nowrap" }, qr = {
|
|
2813
3025
|
key: 0,
|
|
2814
3026
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
2815
|
-
},
|
|
3027
|
+
}, Jr = [
|
|
2816
3028
|
"data-active",
|
|
2817
3029
|
"data-index",
|
|
2818
3030
|
"data-item-id",
|
|
2819
3031
|
"data-occurrence-key"
|
|
2820
|
-
],
|
|
3032
|
+
], Yr = ["data-item-id"], Xr = {
|
|
2821
3033
|
key: 0,
|
|
2822
3034
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
2823
|
-
},
|
|
3035
|
+
}, Zr = {
|
|
2824
3036
|
key: 1,
|
|
2825
3037
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
2826
|
-
},
|
|
3038
|
+
}, Qr = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, $r = /* @__PURE__ */ d({
|
|
2827
3039
|
__name: "ListSurface",
|
|
2828
3040
|
props: {
|
|
2829
3041
|
active: {
|
|
@@ -2839,6 +3051,7 @@ var br = ["aria-label"], xr = {
|
|
|
2839
3051
|
type: [Function, null],
|
|
2840
3052
|
default: null
|
|
2841
3053
|
},
|
|
3054
|
+
emptyStateMode: { default: "inline" },
|
|
2842
3055
|
errorMessage: { default: null },
|
|
2843
3056
|
hasNextPage: {
|
|
2844
3057
|
type: Boolean,
|
|
@@ -2879,7 +3092,7 @@ var br = ["aria-label"], xr = {
|
|
|
2879
3092
|
},
|
|
2880
3093
|
emits: ["open-fullscreen", "update:activeIndex"],
|
|
2881
3094
|
setup(e, { emit: n }) {
|
|
2882
|
-
let r = e,
|
|
3095
|
+
let r = e, d = N(), f = n, p = mr({
|
|
2883
3096
|
active: A(r, "active"),
|
|
2884
3097
|
allowExhaustedNextPageRefresh: A(r, "allowExhaustedNextPageRefresh"),
|
|
2885
3098
|
items: A(r, "items"),
|
|
@@ -2893,98 +3106,157 @@ var br = ["aria-label"], xr = {
|
|
|
2893
3106
|
requestNextPage: A(r, "requestNextPage"),
|
|
2894
3107
|
requestPreviousPage: A(r, "requestPreviousPage"),
|
|
2895
3108
|
setActiveIndex(e) {
|
|
2896
|
-
|
|
3109
|
+
f("update:activeIndex", e);
|
|
2897
3110
|
}
|
|
2898
|
-
}),
|
|
3111
|
+
}), m = i(() => xt({
|
|
2899
3112
|
itemCount: r.items.length,
|
|
2900
3113
|
loading: r.loading,
|
|
2901
3114
|
phase: r.phase
|
|
2902
|
-
})),
|
|
3115
|
+
})), g = i(() => St({
|
|
2903
3116
|
errorMessage: r.errorMessage,
|
|
2904
3117
|
hasItems: r.items.length > 0,
|
|
2905
3118
|
hasNextPage: r.hasNextPage,
|
|
2906
|
-
phase:
|
|
3119
|
+
phase: m.value,
|
|
2907
3120
|
surface: "grid"
|
|
2908
|
-
})),
|
|
2909
|
-
activeIndex:
|
|
2910
|
-
kind:
|
|
3121
|
+
})), b = i(() => !r.showStatusBadges || !g.value ? null : {
|
|
3122
|
+
activeIndex: p.resolvedActiveIndex.value,
|
|
3123
|
+
kind: g.value.kind,
|
|
2911
3124
|
loading: r.loading,
|
|
2912
|
-
message:
|
|
3125
|
+
message: g.value.message,
|
|
2913
3126
|
paginationDetail: r.paginationDetail,
|
|
2914
3127
|
total: r.items.length
|
|
2915
|
-
}),
|
|
2916
|
-
|
|
2917
|
-
|
|
3128
|
+
}), x = i(() => !b.value || !d["grid-status"] ? [] : d["grid-status"](b.value)), C = i(() => gt(x.value)), w = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: O, showCustomEmptyState: M, showInlineEmptyState: P } = yt({
|
|
3129
|
+
emptyStateMode: A(r, "emptyStateMode"),
|
|
3130
|
+
itemCount: w,
|
|
3131
|
+
loading: A(r, "loading"),
|
|
3132
|
+
renderSlot: d["empty-state"],
|
|
3133
|
+
surface: "grid"
|
|
3134
|
+
});
|
|
3135
|
+
return (e, n) => (S(), s("div", Ur, [
|
|
3136
|
+
c("div", Wr, [c("span", Gr, [c("span", Kr, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", qr, k(r.paginationDetail), 1)) : o("", !0)])]),
|
|
2918
3137
|
c("div", {
|
|
2919
|
-
ref: j(
|
|
3138
|
+
ref: j(p).scrollViewportRef,
|
|
2920
3139
|
"data-testid": "vibe-list-scroll",
|
|
2921
3140
|
class: "h-full min-h-0 overflow-y-auto overflow-x-hidden [overflow-anchor:none] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
2922
|
-
onScroll: n[0] ||= (...e) => j(
|
|
2923
|
-
onWheel: n[1] ||= (...e) => j(
|
|
3141
|
+
onScroll: n[0] ||= (...e) => j(p).onScroll && j(p).onScroll(...e),
|
|
3142
|
+
onWheel: n[1] ||= (...e) => j(p).onWheel && j(p).onWheel(...e)
|
|
2924
3143
|
}, [c("div", {
|
|
2925
3144
|
"data-testid": "vibe-list-content",
|
|
2926
3145
|
class: "relative",
|
|
2927
|
-
style: y({ height: `${j(
|
|
2928
|
-
}, [
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
3146
|
+
style: y({ height: `${j(p).containerHeight.value}px` })
|
|
3147
|
+
}, [
|
|
3148
|
+
(S(!0), s(t, null, E(j(p).renderedItems.value, ({ item: t, index: n }) => (S(), s("article", {
|
|
3149
|
+
key: j(Q)(t),
|
|
3150
|
+
"data-testid": "vibe-list-card",
|
|
3151
|
+
"data-active": n === j(p).resolvedActiveIndex.value ? "true" : "false",
|
|
3152
|
+
"data-index": n,
|
|
3153
|
+
"data-item-id": t.id,
|
|
3154
|
+
"data-occurrence-key": j(Q)(t),
|
|
3155
|
+
class: "absolute will-change-transform",
|
|
3156
|
+
style: y(j(p).getCardStyle(n))
|
|
3157
|
+
}, [u(Hr, {
|
|
3158
|
+
active: n === j(p).resolvedActiveIndex.value,
|
|
3159
|
+
index: n,
|
|
3160
|
+
item: t,
|
|
3161
|
+
"report-asset-error": r.reportAssetError,
|
|
3162
|
+
"report-asset-load": r.reportAssetLoad,
|
|
3163
|
+
"surface-active": r.active,
|
|
3164
|
+
onOpen: (e) => f("open-fullscreen", n)
|
|
3165
|
+
}, l({ _: 2 }, [d["grid-item-overlay"] ? {
|
|
3166
|
+
name: "grid-item-overlay",
|
|
3167
|
+
fn: L((t) => [D(e.$slots, "grid-item-overlay", h({ ref_for: !0 }, t))]),
|
|
3168
|
+
key: "0"
|
|
3169
|
+
} : void 0, d["item-icon"] ? {
|
|
3170
|
+
name: "item-icon",
|
|
3171
|
+
fn: L((t) => [D(e.$slots, "item-icon", h({ ref_for: !0 }, t))]),
|
|
3172
|
+
key: "1"
|
|
3173
|
+
} : void 0]), 1032, [
|
|
3174
|
+
"active",
|
|
3175
|
+
"index",
|
|
3176
|
+
"item",
|
|
3177
|
+
"report-asset-error",
|
|
3178
|
+
"report-asset-load",
|
|
3179
|
+
"surface-active",
|
|
3180
|
+
"onOpen"
|
|
3181
|
+
])], 12, Jr))), 128)),
|
|
3182
|
+
(S(!0), s(t, null, E(j(p).leavingItems.value, (t) => (S(), s("article", {
|
|
3183
|
+
key: `leaving-${j(Q)(t.item)}`,
|
|
3184
|
+
"data-testid": "vibe-list-card-leaving",
|
|
3185
|
+
"data-item-id": t.item.id,
|
|
3186
|
+
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
3187
|
+
style: y(j(p).getLeavingCardStyle(t.item))
|
|
3188
|
+
}, [u(Hr, {
|
|
3189
|
+
active: !1,
|
|
3190
|
+
index: -1,
|
|
3191
|
+
item: t.item,
|
|
3192
|
+
"report-asset-error": r.reportAssetError,
|
|
3193
|
+
"report-asset-load": r.reportAssetLoad,
|
|
3194
|
+
"surface-active": !1
|
|
3195
|
+
}, l({ _: 2 }, [d["item-icon"] ? {
|
|
3196
|
+
name: "item-icon",
|
|
3197
|
+
fn: L((t) => [D(e.$slots, "item-icon", h({ ref_for: !0 }, t))]),
|
|
3198
|
+
key: "0"
|
|
3199
|
+
} : void 0]), 1032, [
|
|
3200
|
+
"item",
|
|
3201
|
+
"report-asset-error",
|
|
3202
|
+
"report-asset-load"
|
|
3203
|
+
])], 12, Yr))), 128)),
|
|
3204
|
+
j(P) && j(T) ? (S(), a(Jt, {
|
|
3205
|
+
key: 0,
|
|
3206
|
+
message: j(T).message,
|
|
3207
|
+
mode: j(T).mode,
|
|
3208
|
+
surface: j(T).surface
|
|
3209
|
+
}, {
|
|
3210
|
+
default: L(() => [j(M) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(T)))) : o("", !0)]),
|
|
3211
|
+
_: 3
|
|
3212
|
+
}, 8, [
|
|
3213
|
+
"message",
|
|
3214
|
+
"mode",
|
|
3215
|
+
"surface"
|
|
3216
|
+
])) : o("", !0)
|
|
3217
|
+
], 4)], 544),
|
|
3218
|
+
j(p).showScrollbar.value ? (S(), s("div", Xr, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
2963
3219
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
2964
3220
|
class: _(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
|
|
2965
|
-
style: y(j(
|
|
3221
|
+
style: y(j(p).getScrollbarThumbStyle())
|
|
2966
3222
|
}, null, 6)])) : o("", !0),
|
|
2967
|
-
|
|
2968
|
-
|
|
3223
|
+
d["grid-footer"] ? (S(), s("div", Zr, [c("div", Qr, [D(e.$slots, "grid-footer")])])) : o("", !0),
|
|
3224
|
+
b.value ? (S(), s("div", {
|
|
2969
3225
|
key: 2,
|
|
2970
|
-
class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6",
|
|
2971
|
-
}, [
|
|
3226
|
+
class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
|
|
3227
|
+
}, [C.value ? D(e.$slots, "grid-status", v(h({ key: 0 }, b.value))) : (S(), s("span", {
|
|
2972
3228
|
key: 1,
|
|
2973
3229
|
"data-testid": "vibe-grid-status-badge",
|
|
2974
|
-
class: _(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]",
|
|
2975
|
-
}, k(
|
|
3230
|
+
class: _(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", b.value.kind === "end" ? "border-amber-300/35 text-amber-200" : b.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
3231
|
+
}, k(b.value.message), 3))], 2)) : o("", !0),
|
|
3232
|
+
j(O) && j(T) ? (S(), a(Jt, {
|
|
3233
|
+
key: 3,
|
|
3234
|
+
class: _(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
3235
|
+
message: j(T).message,
|
|
3236
|
+
mode: j(T).mode,
|
|
3237
|
+
surface: j(T).surface
|
|
3238
|
+
}, {
|
|
3239
|
+
default: L(() => [j(M) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(T)))) : o("", !0)]),
|
|
3240
|
+
_: 3
|
|
3241
|
+
}, 8, [
|
|
3242
|
+
"class",
|
|
3243
|
+
"message",
|
|
3244
|
+
"mode",
|
|
3245
|
+
"surface"
|
|
3246
|
+
])) : o("", !0)
|
|
2976
3247
|
]));
|
|
2977
3248
|
}
|
|
2978
|
-
}),
|
|
3249
|
+
}), ei = ["data-surface-mode"], ti = {
|
|
2979
3250
|
key: 1,
|
|
2980
3251
|
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"
|
|
2981
|
-
},
|
|
2982
|
-
key:
|
|
3252
|
+
}, ni = ["data-visible", "inert"], ri = ["data-visible", "inert"], ii = {
|
|
3253
|
+
key: 3,
|
|
2983
3254
|
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"
|
|
2984
|
-
},
|
|
3255
|
+
}, ai = /* @__PURE__ */ d({
|
|
2985
3256
|
name: "VibeLayout",
|
|
2986
3257
|
__name: "Layout",
|
|
2987
3258
|
props: {
|
|
3259
|
+
emptyStateMode: {},
|
|
2988
3260
|
fillDelayMs: {},
|
|
2989
3261
|
fillDelayStepMs: {},
|
|
2990
3262
|
initialCursor: {},
|
|
@@ -3004,9 +3276,9 @@ var br = ["aria-label"], xr = {
|
|
|
3004
3276
|
"update:surfaceMode"
|
|
3005
3277
|
],
|
|
3006
3278
|
setup(e, { expose: n, emit: i }) {
|
|
3007
|
-
let d = e, p =
|
|
3279
|
+
let d = e, p = N(), m = i, h = Ge(d, m), g = se((e) => {
|
|
3008
3280
|
m("asset-errors", e);
|
|
3009
|
-
}), _ =
|
|
3281
|
+
}), _ = ce((e) => {
|
|
3010
3282
|
m("asset-loads", e);
|
|
3011
3283
|
});
|
|
3012
3284
|
return b(() => {
|
|
@@ -3015,13 +3287,15 @@ var br = ["aria-label"], xr = {
|
|
|
3015
3287
|
cancel: h.cancel,
|
|
3016
3288
|
clearRemoved: h.clearRemoved,
|
|
3017
3289
|
getRemovedIds: h.getRemovedIds,
|
|
3290
|
+
lockPageLoading: h.lockPageLoading,
|
|
3018
3291
|
loadNext: h.loadNext,
|
|
3019
3292
|
loadPrevious: h.loadPrevious,
|
|
3020
3293
|
remove: h.remove,
|
|
3021
3294
|
restore: h.restore,
|
|
3022
3295
|
retry: h.retry,
|
|
3023
3296
|
status: h.status,
|
|
3024
|
-
undo: h.undo
|
|
3297
|
+
undo: h.undo,
|
|
3298
|
+
unlockPageLoading: h.unlockPageLoading
|
|
3025
3299
|
}), (e, n) => (S(), s("section", {
|
|
3026
3300
|
"data-testid": "vibe",
|
|
3027
3301
|
"data-surface-mode": j(h).surfaceMode.value,
|
|
@@ -3031,14 +3305,7 @@ var br = ["aria-label"], xr = {
|
|
|
3031
3305
|
type: "button",
|
|
3032
3306
|
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",
|
|
3033
3307
|
onClick: n[0] ||= (...e) => j(h).retryInitialLoad && j(h).retryInitialLoad(...e)
|
|
3034
|
-
}, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div",
|
|
3035
|
-
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
3036
|
-
"aria-hidden": "true"
|
|
3037
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)], 64)) : (S(), s(t, { key: 1 }, [
|
|
3038
|
-
n[2] ||= c("p", { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/68" }, " Viewer ready ", -1),
|
|
3039
|
-
n[3] ||= c("h2", { class: "m-0 text-[clamp(2rem,4.4vw,3.6rem)] leading-[0.95] tracking-[-0.05em]" }, " No items available ", -1),
|
|
3040
|
-
n[4] ||= c("p", { class: "m-0 text-[clamp(0.98rem,1.3vw,1.12rem)] leading-[1.8] text-[#f7f1ea]/70" }, " Attach items to VibeLayout to turn this screen into the viewer. ", -1)
|
|
3041
|
-
], 64))])) : j(h).isDesktop.value ? (S(), s(t, { key: 3 }, [u(r, {
|
|
3308
|
+
}, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", ti, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
|
|
3042
3309
|
appear: "",
|
|
3043
3310
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
3044
3311
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -3047,12 +3314,12 @@ var br = ["aria-label"], xr = {
|
|
|
3047
3314
|
"leave-from-class": "translate-y-0 opacity-100",
|
|
3048
3315
|
"leave-to-class": "translate-y-3 opacity-0"
|
|
3049
3316
|
}, {
|
|
3050
|
-
default:
|
|
3317
|
+
default: L(() => [R(c("div", {
|
|
3051
3318
|
"data-testid": "vibe-list-surface",
|
|
3052
3319
|
"data-visible": j(h).surfaceMode.value === "list" ? "true" : "false",
|
|
3053
3320
|
inert: j(h).surfaceMode.value !== "list",
|
|
3054
3321
|
class: "absolute inset-0 z-[2]"
|
|
3055
|
-
}, [u(
|
|
3322
|
+
}, [u($r, {
|
|
3056
3323
|
active: j(h).surfaceMode.value === "list",
|
|
3057
3324
|
"allow-exhausted-next-page-refresh": j(h).canRefreshExhaustedNextPage.value,
|
|
3058
3325
|
items: j(h).items.value,
|
|
@@ -3069,29 +3336,35 @@ var br = ["aria-label"], xr = {
|
|
|
3069
3336
|
"report-asset-load": j(_).report,
|
|
3070
3337
|
"request-next-page": j(h).prefetchNextPage,
|
|
3071
3338
|
"request-previous-page": j(h).prefetchPreviousPage,
|
|
3339
|
+
"empty-state-mode": d.emptyStateMode,
|
|
3072
3340
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3073
3341
|
onOpenFullscreen: j(h).openFullscreen,
|
|
3074
3342
|
"onUpdate:activeIndex": j(h).setActiveIndex
|
|
3075
3343
|
}, l({ _: 2 }, [
|
|
3344
|
+
p["empty-state"] ? {
|
|
3345
|
+
name: "empty-state",
|
|
3346
|
+
fn: L((t) => [D(e.$slots, "empty-state", v(f(t)))]),
|
|
3347
|
+
key: "0"
|
|
3348
|
+
} : void 0,
|
|
3076
3349
|
p["grid-footer"] ? {
|
|
3077
3350
|
name: "grid-footer",
|
|
3078
|
-
fn:
|
|
3079
|
-
key: "
|
|
3351
|
+
fn: L(() => [D(e.$slots, "grid-footer")]),
|
|
3352
|
+
key: "1"
|
|
3080
3353
|
} : void 0,
|
|
3081
3354
|
p["grid-item-overlay"] ? {
|
|
3082
3355
|
name: "grid-item-overlay",
|
|
3083
|
-
fn:
|
|
3084
|
-
key: "
|
|
3356
|
+
fn: L((t) => [D(e.$slots, "grid-item-overlay", v(f(t)))]),
|
|
3357
|
+
key: "2"
|
|
3085
3358
|
} : void 0,
|
|
3086
3359
|
p["grid-status"] ? {
|
|
3087
3360
|
name: "grid-status",
|
|
3088
|
-
fn:
|
|
3089
|
-
key: "
|
|
3361
|
+
fn: L((t) => [D(e.$slots, "grid-status", v(f(t)))]),
|
|
3362
|
+
key: "3"
|
|
3090
3363
|
} : void 0,
|
|
3091
3364
|
p["item-icon"] ? {
|
|
3092
3365
|
name: "item-icon",
|
|
3093
|
-
fn:
|
|
3094
|
-
key: "
|
|
3366
|
+
fn: L((t) => [D(e.$slots, "item-icon", v(f(t)))]),
|
|
3367
|
+
key: "4"
|
|
3095
3368
|
} : void 0
|
|
3096
3369
|
]), 1032, [
|
|
3097
3370
|
"active",
|
|
@@ -3110,10 +3383,11 @@ var br = ["aria-label"], xr = {
|
|
|
3110
3383
|
"report-asset-load",
|
|
3111
3384
|
"request-next-page",
|
|
3112
3385
|
"request-previous-page",
|
|
3386
|
+
"empty-state-mode",
|
|
3113
3387
|
"show-status-badges",
|
|
3114
3388
|
"onOpenFullscreen",
|
|
3115
3389
|
"onUpdate:activeIndex"
|
|
3116
|
-
])], 8,
|
|
3390
|
+
])], 8, ni), [[P, j(h).surfaceMode.value === "list"]])]),
|
|
3117
3391
|
_: 3
|
|
3118
3392
|
}), u(r, {
|
|
3119
3393
|
appear: "",
|
|
@@ -3124,12 +3398,12 @@ var br = ["aria-label"], xr = {
|
|
|
3124
3398
|
"leave-from-class": "translate-y-0 opacity-100",
|
|
3125
3399
|
"leave-to-class": "-translate-y-3 opacity-0"
|
|
3126
3400
|
}, {
|
|
3127
|
-
default:
|
|
3401
|
+
default: L(() => [R(c("div", {
|
|
3128
3402
|
"data-testid": "vibe-fullscreen-surface",
|
|
3129
3403
|
"data-visible": j(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
3130
3404
|
inert: j(h).surfaceMode.value !== "fullscreen",
|
|
3131
3405
|
class: "absolute inset-0 z-[3]"
|
|
3132
|
-
}, [u(
|
|
3406
|
+
}, [u(En, {
|
|
3133
3407
|
items: j(h).items.value,
|
|
3134
3408
|
active: j(h).surfaceMode.value === "fullscreen",
|
|
3135
3409
|
"active-index": j(h).activeIndex.value,
|
|
@@ -3140,36 +3414,42 @@ var br = ["aria-label"], xr = {
|
|
|
3140
3414
|
phase: j(h).phase.value,
|
|
3141
3415
|
"report-asset-error": j(g).report,
|
|
3142
3416
|
"report-asset-load": j(_).report,
|
|
3417
|
+
"empty-state-mode": d.emptyStateMode,
|
|
3143
3418
|
"show-end-badge": d.showEndBadge ?? !0,
|
|
3144
3419
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3145
3420
|
"show-back-to-list": j(h).showBackToList.value,
|
|
3146
3421
|
onBackToList: j(h).returnToList,
|
|
3147
3422
|
"onUpdate:activeIndex": j(h).setActiveIndex
|
|
3148
3423
|
}, l({ _: 2 }, [
|
|
3424
|
+
p["empty-state"] ? {
|
|
3425
|
+
name: "empty-state",
|
|
3426
|
+
fn: L((t) => [D(e.$slots, "empty-state", v(f(t)))]),
|
|
3427
|
+
key: "0"
|
|
3428
|
+
} : void 0,
|
|
3149
3429
|
p["fullscreen-overlay"] ? {
|
|
3150
3430
|
name: "fullscreen-overlay",
|
|
3151
|
-
fn:
|
|
3152
|
-
key: "
|
|
3431
|
+
fn: L((t) => [D(e.$slots, "fullscreen-overlay", v(f(t)))]),
|
|
3432
|
+
key: "1"
|
|
3153
3433
|
} : void 0,
|
|
3154
3434
|
p["fullscreen-aside"] ? {
|
|
3155
3435
|
name: "fullscreen-aside",
|
|
3156
|
-
fn:
|
|
3157
|
-
key: "
|
|
3436
|
+
fn: L((t) => [D(e.$slots, "fullscreen-aside", v(f(t)))]),
|
|
3437
|
+
key: "2"
|
|
3158
3438
|
} : void 0,
|
|
3159
3439
|
p["fullscreen-header-actions"] ? {
|
|
3160
3440
|
name: "fullscreen-header-actions",
|
|
3161
|
-
fn:
|
|
3162
|
-
key: "
|
|
3441
|
+
fn: L((t) => [D(e.$slots, "fullscreen-header-actions", v(f(t)))]),
|
|
3442
|
+
key: "3"
|
|
3163
3443
|
} : void 0,
|
|
3164
3444
|
p["fullscreen-status"] ? {
|
|
3165
3445
|
name: "fullscreen-status",
|
|
3166
|
-
fn:
|
|
3167
|
-
key: "
|
|
3446
|
+
fn: L((t) => [D(e.$slots, "fullscreen-status", v(f(t)))]),
|
|
3447
|
+
key: "4"
|
|
3168
3448
|
} : void 0,
|
|
3169
3449
|
p["item-icon"] ? {
|
|
3170
3450
|
name: "item-icon",
|
|
3171
|
-
fn:
|
|
3172
|
-
key: "
|
|
3451
|
+
fn: L((t) => [D(e.$slots, "item-icon", v(f(t)))]),
|
|
3452
|
+
key: "5"
|
|
3173
3453
|
} : void 0
|
|
3174
3454
|
]), 1032, [
|
|
3175
3455
|
"items",
|
|
@@ -3182,14 +3462,18 @@ var br = ["aria-label"], xr = {
|
|
|
3182
3462
|
"phase",
|
|
3183
3463
|
"report-asset-error",
|
|
3184
3464
|
"report-asset-load",
|
|
3465
|
+
"empty-state-mode",
|
|
3185
3466
|
"show-end-badge",
|
|
3186
3467
|
"show-status-badges",
|
|
3187
3468
|
"show-back-to-list",
|
|
3188
3469
|
"onBackToList",
|
|
3189
3470
|
"onUpdate:activeIndex"
|
|
3190
|
-
])], 8,
|
|
3471
|
+
])], 8, ri), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
|
|
3191
3472
|
_: 3
|
|
3192
|
-
})], 64)) : (S(),
|
|
3473
|
+
})], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", ii, [u(j(re), {
|
|
3474
|
+
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
3475
|
+
"aria-hidden": "true"
|
|
3476
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(En, {
|
|
3193
3477
|
key: 4,
|
|
3194
3478
|
items: j(h).items.value,
|
|
3195
3479
|
active: !0,
|
|
@@ -3201,36 +3485,42 @@ var br = ["aria-label"], xr = {
|
|
|
3201
3485
|
phase: j(h).phase.value,
|
|
3202
3486
|
"report-asset-error": j(g).report,
|
|
3203
3487
|
"report-asset-load": j(_).report,
|
|
3488
|
+
"empty-state-mode": d.emptyStateMode,
|
|
3204
3489
|
"show-end-badge": d.showEndBadge ?? !0,
|
|
3205
3490
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3206
3491
|
"show-back-to-list": !1,
|
|
3207
3492
|
onBackToList: j(h).returnToList,
|
|
3208
3493
|
"onUpdate:activeIndex": j(h).setActiveIndex
|
|
3209
3494
|
}, l({ _: 2 }, [
|
|
3495
|
+
p["empty-state"] ? {
|
|
3496
|
+
name: "empty-state",
|
|
3497
|
+
fn: L((t) => [D(e.$slots, "empty-state", v(f(t)))]),
|
|
3498
|
+
key: "0"
|
|
3499
|
+
} : void 0,
|
|
3210
3500
|
p["fullscreen-overlay"] ? {
|
|
3211
3501
|
name: "fullscreen-overlay",
|
|
3212
|
-
fn:
|
|
3213
|
-
key: "
|
|
3502
|
+
fn: L((t) => [D(e.$slots, "fullscreen-overlay", v(f(t)))]),
|
|
3503
|
+
key: "1"
|
|
3214
3504
|
} : void 0,
|
|
3215
3505
|
p["fullscreen-aside"] ? {
|
|
3216
3506
|
name: "fullscreen-aside",
|
|
3217
|
-
fn:
|
|
3218
|
-
key: "
|
|
3507
|
+
fn: L((t) => [D(e.$slots, "fullscreen-aside", v(f(t)))]),
|
|
3508
|
+
key: "2"
|
|
3219
3509
|
} : void 0,
|
|
3220
3510
|
p["fullscreen-header-actions"] ? {
|
|
3221
3511
|
name: "fullscreen-header-actions",
|
|
3222
|
-
fn:
|
|
3223
|
-
key: "
|
|
3512
|
+
fn: L((t) => [D(e.$slots, "fullscreen-header-actions", v(f(t)))]),
|
|
3513
|
+
key: "3"
|
|
3224
3514
|
} : void 0,
|
|
3225
3515
|
p["fullscreen-status"] ? {
|
|
3226
3516
|
name: "fullscreen-status",
|
|
3227
|
-
fn:
|
|
3228
|
-
key: "
|
|
3517
|
+
fn: L((t) => [D(e.$slots, "fullscreen-status", v(f(t)))]),
|
|
3518
|
+
key: "4"
|
|
3229
3519
|
} : void 0,
|
|
3230
3520
|
p["item-icon"] ? {
|
|
3231
3521
|
name: "item-icon",
|
|
3232
|
-
fn:
|
|
3233
|
-
key: "
|
|
3522
|
+
fn: L((t) => [D(e.$slots, "item-icon", v(f(t)))]),
|
|
3523
|
+
key: "5"
|
|
3234
3524
|
} : void 0
|
|
3235
3525
|
]), 1032, [
|
|
3236
3526
|
"items",
|
|
@@ -3242,14 +3532,15 @@ var br = ["aria-label"], xr = {
|
|
|
3242
3532
|
"phase",
|
|
3243
3533
|
"report-asset-error",
|
|
3244
3534
|
"report-asset-load",
|
|
3535
|
+
"empty-state-mode",
|
|
3245
3536
|
"show-end-badge",
|
|
3246
3537
|
"show-status-badges",
|
|
3247
3538
|
"onBackToList",
|
|
3248
3539
|
"onUpdate:activeIndex"
|
|
3249
|
-
]))], 8,
|
|
3540
|
+
]))], 8, ei));
|
|
3250
3541
|
}
|
|
3251
|
-
}),
|
|
3252
|
-
e.component("VibeLayout",
|
|
3542
|
+
}), oi = { install(e) {
|
|
3543
|
+
e.component("VibeLayout", ai);
|
|
3253
3544
|
} };
|
|
3254
3545
|
//#endregion
|
|
3255
|
-
export {
|
|
3546
|
+
export { ai as VibeLayout, oi as VibePlugin, oi as default };
|