@wyxos/vibe 1.6.7 → 1.6.8
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 +45 -6
- package/lib/index.js +525 -471
- package/package.json +1 -1
- package/src/components/MasonryItem.vue +151 -55
- package/src/views/Home.vue +1 -1
package/lib/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { nextTick as
|
|
2
|
-
let
|
|
1
|
+
import { nextTick as Z, defineComponent as Le, ref as E, computed as ee, onMounted as Se, onUnmounted as Ne, watch as He, createElementBlock as B, openBlock as D, renderSlot as $e, createElementVNode as k, createCommentVNode as X, normalizeClass as se, toDisplayString as ie, withModifiers as ze, normalizeStyle as Re, createVNode as Te, TransitionGroup as _e, withCtx as Ce, Fragment as qe, renderList as Ve, mergeProps as Ge, unref as Ue } from "vue";
|
|
2
|
+
let fe = null;
|
|
3
3
|
function Xe() {
|
|
4
|
-
if (
|
|
4
|
+
if (fe != null) return fe;
|
|
5
5
|
const e = document.createElement("div");
|
|
6
6
|
e.style.visibility = "hidden", e.style.overflow = "scroll", e.style.msOverflowStyle = "scrollbar", e.style.width = "100px", e.style.height = "100px", document.body.appendChild(e);
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
return document.body.removeChild(e),
|
|
7
|
+
const o = document.createElement("div");
|
|
8
|
+
o.style.width = "100%", e.appendChild(o);
|
|
9
|
+
const l = e.offsetWidth - o.offsetWidth;
|
|
10
|
+
return document.body.removeChild(e), fe = l, l;
|
|
11
11
|
}
|
|
12
|
-
function Ye(e, l, s
|
|
12
|
+
function Ye(e, o, l, s = {}) {
|
|
13
13
|
const {
|
|
14
|
-
gutterX:
|
|
14
|
+
gutterX: T = 0,
|
|
15
15
|
gutterY: m = 0,
|
|
16
16
|
header: a = 0,
|
|
17
17
|
footer: n = 0,
|
|
18
|
-
paddingLeft:
|
|
19
|
-
paddingRight:
|
|
20
|
-
sizes:
|
|
18
|
+
paddingLeft: y = 0,
|
|
19
|
+
paddingRight: c = 0,
|
|
20
|
+
sizes: v = {
|
|
21
21
|
base: 1,
|
|
22
22
|
sm: 2,
|
|
23
23
|
md: 3,
|
|
@@ -26,92 +26,92 @@ function Ye(e, l, s, i = {}) {
|
|
|
26
26
|
"2xl": 6
|
|
27
27
|
},
|
|
28
28
|
placement: b = "masonry"
|
|
29
|
-
} =
|
|
30
|
-
let
|
|
29
|
+
} = s;
|
|
30
|
+
let f = 0, x = 0;
|
|
31
31
|
try {
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
|
|
32
|
+
if (o && o.nodeType === 1 && typeof window < "u" && window.getComputedStyle) {
|
|
33
|
+
const M = window.getComputedStyle(o);
|
|
34
|
+
f = parseFloat(M.paddingLeft) || 0, x = parseFloat(M.paddingRight) || 0;
|
|
35
35
|
}
|
|
36
36
|
} catch {
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
return Math.round(
|
|
38
|
+
const $ = (y || 0) + f, z = (c || 0) + x, N = o.offsetWidth - o.clientWidth, i = N > 0 ? N + 2 : Xe() + 2, d = o.offsetWidth - i - $ - z, L = T * (l - 1), I = Math.floor((d - L) / l), P = e.map((M) => {
|
|
39
|
+
const W = M.width, H = M.height;
|
|
40
|
+
return Math.round(I * H / W) + n + a;
|
|
41
41
|
});
|
|
42
42
|
if (b === "sequential-balanced") {
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
const
|
|
46
|
-
let
|
|
47
|
-
const
|
|
48
|
-
let
|
|
49
|
-
for (let
|
|
50
|
-
const U =
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
else if (
|
|
43
|
+
const M = P.length;
|
|
44
|
+
if (M === 0) return [];
|
|
45
|
+
const W = (w, A, R) => w + (A > 0 ? m : 0) + R;
|
|
46
|
+
let H = Math.max(...P), _ = P.reduce((w, A) => w + A, 0) + m * Math.max(0, M - 1);
|
|
47
|
+
const te = (w) => {
|
|
48
|
+
let A = 1, R = 0, q = 0;
|
|
49
|
+
for (let j = 0; j < M; j++) {
|
|
50
|
+
const U = P[j], V = W(R, q, U);
|
|
51
|
+
if (V <= w)
|
|
52
|
+
R = V, q++;
|
|
53
|
+
else if (A++, R = U, q = 1, U > w || A > l) return !1;
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return A <= l;
|
|
56
56
|
};
|
|
57
|
-
for (;
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
const
|
|
62
|
-
let
|
|
63
|
-
for (let
|
|
64
|
-
const
|
|
65
|
-
!(
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
for (let
|
|
70
|
-
const
|
|
71
|
-
for (let
|
|
72
|
-
const
|
|
73
|
-
...e[
|
|
74
|
-
columnWidth:
|
|
57
|
+
for (; H < _; ) {
|
|
58
|
+
const w = Math.floor((H + _) / 2);
|
|
59
|
+
te(w) ? _ = w : H = w + 1;
|
|
60
|
+
}
|
|
61
|
+
const ae = _, Y = new Array(l).fill(0);
|
|
62
|
+
let ne = l - 1, J = 0, K = 0;
|
|
63
|
+
for (let w = M - 1; w >= 0; w--) {
|
|
64
|
+
const A = P[w], R = w < ne;
|
|
65
|
+
!(W(J, K, A) <= ae) || R ? (Y[ne] = w + 1, ne--, J = A, K = 1) : (J = W(J, K, A), K++);
|
|
66
|
+
}
|
|
67
|
+
Y[0] = 0;
|
|
68
|
+
const C = [], re = new Array(l).fill(0);
|
|
69
|
+
for (let w = 0; w < l; w++) {
|
|
70
|
+
const A = Y[w], R = w + 1 < l ? Y[w + 1] : M, q = w * (I + T);
|
|
71
|
+
for (let j = A; j < R; j++) {
|
|
72
|
+
const V = {
|
|
73
|
+
...e[j],
|
|
74
|
+
columnWidth: I,
|
|
75
75
|
imageHeight: 0,
|
|
76
76
|
columnHeight: 0,
|
|
77
77
|
left: 0,
|
|
78
78
|
top: 0
|
|
79
79
|
};
|
|
80
|
-
|
|
80
|
+
V.imageHeight = P[j] - (n + a), V.columnHeight = P[j], V.left = q, V.top = re[w], re[w] += V.columnHeight + (j + 1 < R ? m : 0), C.push(V);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return C;
|
|
84
84
|
}
|
|
85
|
-
const
|
|
86
|
-
for (let
|
|
87
|
-
const
|
|
88
|
-
...
|
|
85
|
+
const h = new Array(l).fill(0), S = [];
|
|
86
|
+
for (let M = 0; M < e.length; M++) {
|
|
87
|
+
const W = e[M], H = {
|
|
88
|
+
...W,
|
|
89
89
|
columnWidth: 0,
|
|
90
90
|
imageHeight: 0,
|
|
91
91
|
columnHeight: 0,
|
|
92
92
|
left: 0,
|
|
93
93
|
top: 0
|
|
94
|
-
},
|
|
95
|
-
|
|
94
|
+
}, _ = h.indexOf(Math.min(...h)), te = W.width, ae = W.height;
|
|
95
|
+
H.columnWidth = I, H.left = _ * (I + T), H.imageHeight = Math.round(I * ae / te), H.columnHeight = H.imageHeight + n + a, H.top = h[_], h[_] += H.columnHeight + m, S.push(H);
|
|
96
96
|
}
|
|
97
|
-
return
|
|
97
|
+
return S;
|
|
98
98
|
}
|
|
99
|
-
var Je = typeof global == "object" && global && global.Object === Object && global, Ke = typeof self == "object" && self && self.Object === Object && self,
|
|
99
|
+
var Je = typeof global == "object" && global && global.Object === Object && global, Ke = typeof self == "object" && self && self.Object === Object && self, Ae = Je || Ke || Function("return this")(), ce = Ae.Symbol, Fe = Object.prototype, Qe = Fe.hasOwnProperty, Ze = Fe.toString, le = ce ? ce.toStringTag : void 0;
|
|
100
100
|
function et(e) {
|
|
101
|
-
var
|
|
101
|
+
var o = Qe.call(e, le), l = e[le];
|
|
102
102
|
try {
|
|
103
|
-
e[
|
|
104
|
-
var
|
|
103
|
+
e[le] = void 0;
|
|
104
|
+
var s = !0;
|
|
105
105
|
} catch {
|
|
106
106
|
}
|
|
107
|
-
var
|
|
108
|
-
return
|
|
107
|
+
var T = Ze.call(e);
|
|
108
|
+
return s && (o ? e[le] = l : delete e[le]), T;
|
|
109
109
|
}
|
|
110
110
|
var tt = Object.prototype, at = tt.toString;
|
|
111
111
|
function nt(e) {
|
|
112
112
|
return at.call(e);
|
|
113
113
|
}
|
|
114
|
-
var rt = "[object Null]", ot = "[object Undefined]", Me =
|
|
114
|
+
var rt = "[object Null]", ot = "[object Undefined]", Me = ce ? ce.toStringTag : void 0;
|
|
115
115
|
function lt(e) {
|
|
116
116
|
return e == null ? e === void 0 ? ot : rt : Me && Me in Object(e) ? et(e) : nt(e);
|
|
117
117
|
}
|
|
@@ -124,17 +124,17 @@ function ut(e) {
|
|
|
124
124
|
}
|
|
125
125
|
var ct = /\s/;
|
|
126
126
|
function ft(e) {
|
|
127
|
-
for (var
|
|
127
|
+
for (var o = e.length; o-- && ct.test(e.charAt(o)); )
|
|
128
128
|
;
|
|
129
|
-
return
|
|
129
|
+
return o;
|
|
130
130
|
}
|
|
131
131
|
var dt = /^\s+/;
|
|
132
132
|
function vt(e) {
|
|
133
133
|
return e && e.slice(0, ft(e) + 1).replace(dt, "");
|
|
134
134
|
}
|
|
135
135
|
function me(e) {
|
|
136
|
-
var
|
|
137
|
-
return e != null && (
|
|
136
|
+
var o = typeof e;
|
|
137
|
+
return e != null && (o == "object" || o == "function");
|
|
138
138
|
}
|
|
139
139
|
var Ie = NaN, mt = /^[-+]0x[0-9a-f]+$/i, gt = /^0b[01]+$/i, pt = /^0o[0-7]+$/i, yt = parseInt;
|
|
140
140
|
function Pe(e) {
|
|
@@ -143,71 +143,71 @@ function Pe(e) {
|
|
|
143
143
|
if (ut(e))
|
|
144
144
|
return Ie;
|
|
145
145
|
if (me(e)) {
|
|
146
|
-
var
|
|
147
|
-
e = me(
|
|
146
|
+
var o = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
147
|
+
e = me(o) ? o + "" : o;
|
|
148
148
|
}
|
|
149
149
|
if (typeof e != "string")
|
|
150
150
|
return e === 0 ? e : +e;
|
|
151
151
|
e = vt(e);
|
|
152
|
-
var
|
|
153
|
-
return
|
|
152
|
+
var l = gt.test(e);
|
|
153
|
+
return l || pt.test(e) ? yt(e.slice(2), l ? 2 : 8) : mt.test(e) ? Ie : +e;
|
|
154
154
|
}
|
|
155
|
-
var
|
|
156
|
-
return
|
|
155
|
+
var de = function() {
|
|
156
|
+
return Ae.Date.now();
|
|
157
157
|
}, ht = "Expected a function", bt = Math.max, xt = Math.min;
|
|
158
|
-
function
|
|
159
|
-
var
|
|
158
|
+
function ke(e, o, l) {
|
|
159
|
+
var s, T, m, a, n, y, c = 0, v = !1, b = !1, f = !0;
|
|
160
160
|
if (typeof e != "function")
|
|
161
161
|
throw new TypeError(ht);
|
|
162
|
-
|
|
163
|
-
function
|
|
164
|
-
var
|
|
165
|
-
return
|
|
162
|
+
o = Pe(o) || 0, me(l) && (v = !!l.leading, b = "maxWait" in l, m = b ? bt(Pe(l.maxWait) || 0, o) : m, f = "trailing" in l ? !!l.trailing : f);
|
|
163
|
+
function x(h) {
|
|
164
|
+
var S = s, M = T;
|
|
165
|
+
return s = T = void 0, c = h, a = e.apply(M, S), a;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
return
|
|
167
|
+
function $(h) {
|
|
168
|
+
return c = h, n = setTimeout(i, o), v ? x(h) : a;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
var
|
|
172
|
-
return b ? xt(
|
|
170
|
+
function z(h) {
|
|
171
|
+
var S = h - y, M = h - c, W = o - S;
|
|
172
|
+
return b ? xt(W, m - M) : W;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
var
|
|
176
|
-
return
|
|
174
|
+
function N(h) {
|
|
175
|
+
var S = h - y, M = h - c;
|
|
176
|
+
return y === void 0 || S >= o || S < 0 || b && M >= m;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
var
|
|
180
|
-
if (
|
|
181
|
-
return
|
|
182
|
-
n = setTimeout(
|
|
178
|
+
function i() {
|
|
179
|
+
var h = de();
|
|
180
|
+
if (N(h))
|
|
181
|
+
return d(h);
|
|
182
|
+
n = setTimeout(i, z(h));
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
return n = void 0,
|
|
184
|
+
function d(h) {
|
|
185
|
+
return n = void 0, f && s ? x(h) : (s = T = void 0, a);
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
n !== void 0 && clearTimeout(n),
|
|
187
|
+
function L() {
|
|
188
|
+
n !== void 0 && clearTimeout(n), c = 0, s = y = T = n = void 0;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
return n === void 0 ? a :
|
|
190
|
+
function I() {
|
|
191
|
+
return n === void 0 ? a : d(de());
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
var
|
|
195
|
-
if (
|
|
193
|
+
function P() {
|
|
194
|
+
var h = de(), S = N(h);
|
|
195
|
+
if (s = arguments, T = this, y = h, S) {
|
|
196
196
|
if (n === void 0)
|
|
197
|
-
return
|
|
197
|
+
return $(y);
|
|
198
198
|
if (b)
|
|
199
|
-
return clearTimeout(n), n = setTimeout(
|
|
199
|
+
return clearTimeout(n), n = setTimeout(i, o), x(y);
|
|
200
200
|
}
|
|
201
|
-
return n === void 0 && (n = setTimeout(
|
|
201
|
+
return n === void 0 && (n = setTimeout(i, o)), a;
|
|
202
202
|
}
|
|
203
|
-
return
|
|
203
|
+
return P.cancel = L, P.flush = I, P;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
const
|
|
207
|
-
return
|
|
205
|
+
function ve(e) {
|
|
206
|
+
const o = window.innerWidth, l = e.sizes;
|
|
207
|
+
return o >= 1536 && l["2xl"] ? l["2xl"] : o >= 1280 && l.xl ? l.xl : o >= 1024 && l.lg ? l.lg : o >= 768 && l.md ? l.md : o >= 640 && l.sm ? l.sm : l.base;
|
|
208
208
|
}
|
|
209
209
|
function wt(e) {
|
|
210
|
-
return e.reduce((
|
|
210
|
+
return e.reduce((l, s) => Math.max(l, s.top + s.columnHeight), 0) + 500;
|
|
211
211
|
}
|
|
212
212
|
function Tt(e) {
|
|
213
213
|
return {
|
|
@@ -218,94 +218,94 @@ function Tt(e) {
|
|
|
218
218
|
height: `${e.columnHeight}px`
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
|
-
function Mt(e,
|
|
221
|
+
function Mt(e, o = 0) {
|
|
222
222
|
return {
|
|
223
223
|
style: Tt(e),
|
|
224
224
|
"data-top": e.top,
|
|
225
225
|
"data-left": e.left,
|
|
226
226
|
"data-id": `${e.page}-${e.id}`,
|
|
227
|
-
"data-index":
|
|
227
|
+
"data-index": o
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
function ge(e,
|
|
231
|
-
if (!e.length ||
|
|
232
|
-
return new Array(Math.max(1,
|
|
233
|
-
const
|
|
234
|
-
for (let a = 0; a <
|
|
235
|
-
const m = new Array(
|
|
230
|
+
function ge(e, o) {
|
|
231
|
+
if (!e.length || o <= 0)
|
|
232
|
+
return new Array(Math.max(1, o)).fill(0);
|
|
233
|
+
const s = Array.from(new Set(e.map((a) => a.left))).sort((a, n) => a - n).slice(0, o), T = /* @__PURE__ */ new Map();
|
|
234
|
+
for (let a = 0; a < s.length; a++) T.set(s[a], a);
|
|
235
|
+
const m = new Array(s.length).fill(0);
|
|
236
236
|
for (const a of e) {
|
|
237
|
-
const n =
|
|
237
|
+
const n = T.get(a.left);
|
|
238
238
|
n != null && (m[n] = Math.max(m[n], a.top + a.columnHeight));
|
|
239
239
|
}
|
|
240
|
-
for (; m.length <
|
|
240
|
+
for (; m.length < o; ) m.push(0);
|
|
241
241
|
return m;
|
|
242
242
|
}
|
|
243
|
-
function It(e,
|
|
244
|
-
function
|
|
245
|
-
const
|
|
243
|
+
function It(e, o) {
|
|
244
|
+
function l(a, n) {
|
|
245
|
+
const y = parseInt(a.dataset.left || "0", 10), c = parseInt(a.dataset.top || "0", 10), v = parseInt(a.dataset.index || "0", 10), b = Math.min(v * 20, 160), f = a.style.getPropertyValue("--masonry-opacity-delay");
|
|
246
246
|
a.style.setProperty("--masonry-opacity-delay", `${b}ms`), requestAnimationFrame(() => {
|
|
247
|
-
a.style.opacity = "1", a.style.transform = `translate3d(${
|
|
248
|
-
const
|
|
249
|
-
|
|
247
|
+
a.style.opacity = "1", a.style.transform = `translate3d(${y}px, ${c}px, 0) scale(1)`;
|
|
248
|
+
const x = () => {
|
|
249
|
+
f ? a.style.setProperty("--masonry-opacity-delay", f) : a.style.removeProperty("--masonry-opacity-delay"), a.removeEventListener("transitionend", x), n();
|
|
250
250
|
};
|
|
251
|
-
a.addEventListener("transitionend",
|
|
251
|
+
a.addEventListener("transitionend", x);
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
const n = parseInt(a.dataset.left || "0", 10),
|
|
256
|
-
a.style.opacity = "0", a.style.transform = `translate3d(${n}px, ${
|
|
254
|
+
function s(a) {
|
|
255
|
+
const n = parseInt(a.dataset.left || "0", 10), y = parseInt(a.dataset.top || "0", 10);
|
|
256
|
+
a.style.opacity = "0", a.style.transform = `translate3d(${n}px, ${y + 10}px, 0) scale(0.985)`;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
const n = parseInt(a.dataset.left || "0", 10),
|
|
260
|
-
a.style.transition = "none", a.style.opacity = "1", a.style.transform = `translate3d(${n}px, ${
|
|
258
|
+
function T(a) {
|
|
259
|
+
const n = parseInt(a.dataset.left || "0", 10), y = parseInt(a.dataset.top || "0", 10);
|
|
260
|
+
a.style.transition = "none", a.style.opacity = "1", a.style.transform = `translate3d(${n}px, ${y}px, 0) scale(1)`, a.style.removeProperty("--masonry-opacity-delay"), requestAnimationFrame(() => {
|
|
261
261
|
a.style.transition = "";
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
function m(a, n) {
|
|
265
|
-
const
|
|
266
|
-
let b = Number.isFinite(
|
|
265
|
+
const y = parseInt(a.dataset.left || "0", 10), c = parseInt(a.dataset.top || "0", 10), v = typeof (o == null ? void 0 : o.leaveDurationMs) == "number" ? o.leaveDurationMs : NaN;
|
|
266
|
+
let b = Number.isFinite(v) && v > 0 ? v : NaN;
|
|
267
267
|
if (!Number.isFinite(b)) {
|
|
268
|
-
const
|
|
269
|
-
b = Number.isFinite(
|
|
270
|
-
}
|
|
271
|
-
const
|
|
272
|
-
a.removeEventListener("transitionend",
|
|
273
|
-
},
|
|
274
|
-
(!
|
|
275
|
-
},
|
|
276
|
-
|
|
268
|
+
const i = getComputedStyle(a).getPropertyValue("--masonry-leave-duration") || "", d = parseFloat(i);
|
|
269
|
+
b = Number.isFinite(d) && d > 0 ? d : 200;
|
|
270
|
+
}
|
|
271
|
+
const f = a.style.transitionDuration, x = () => {
|
|
272
|
+
a.removeEventListener("transitionend", $), clearTimeout(z), a.style.transitionDuration = f || "";
|
|
273
|
+
}, $ = (N) => {
|
|
274
|
+
(!N || N.target === a) && (x(), n());
|
|
275
|
+
}, z = setTimeout(() => {
|
|
276
|
+
x(), n();
|
|
277
277
|
}, b + 100);
|
|
278
278
|
requestAnimationFrame(() => {
|
|
279
|
-
a.style.transitionDuration = `${b}ms`, a.style.opacity = "0", a.style.transform = `translate3d(${
|
|
279
|
+
a.style.transitionDuration = `${b}ms`, a.style.opacity = "0", a.style.transform = `translate3d(${y}px, ${c + 10}px, 0) scale(0.985)`, a.addEventListener("transitionend", $);
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
return {
|
|
283
|
-
onEnter:
|
|
284
|
-
onBeforeEnter:
|
|
285
|
-
onBeforeLeave:
|
|
283
|
+
onEnter: l,
|
|
284
|
+
onBeforeEnter: s,
|
|
285
|
+
onBeforeLeave: T,
|
|
286
286
|
onLeave: m
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
289
|
function Pt({
|
|
290
290
|
container: e,
|
|
291
|
-
masonry:
|
|
292
|
-
columns:
|
|
293
|
-
containerHeight:
|
|
294
|
-
isLoading:
|
|
291
|
+
masonry: o,
|
|
292
|
+
columns: l,
|
|
293
|
+
containerHeight: s,
|
|
294
|
+
isLoading: T,
|
|
295
295
|
pageSize: m,
|
|
296
296
|
refreshLayout: a,
|
|
297
297
|
setItemsRaw: n,
|
|
298
|
-
loadNext:
|
|
299
|
-
loadThresholdPx:
|
|
298
|
+
loadNext: y,
|
|
299
|
+
loadThresholdPx: c
|
|
300
300
|
}) {
|
|
301
|
-
let
|
|
302
|
-
async function b(
|
|
301
|
+
let v = 0;
|
|
302
|
+
async function b(f) {
|
|
303
303
|
if (!e.value) return;
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
const
|
|
307
|
-
if (
|
|
308
|
-
await
|
|
304
|
+
const x = f ?? ge(o.value, l.value), $ = x.length ? Math.max(...x) : 0, z = e.value.scrollTop + e.value.clientHeight, N = e.value.scrollTop > v + 1;
|
|
305
|
+
v = e.value.scrollTop;
|
|
306
|
+
const i = typeof c == "number" ? c : 200, d = i >= 0 ? Math.max(0, $ - i) : Math.max(0, $ + i);
|
|
307
|
+
if (z >= d && N && !T.value) {
|
|
308
|
+
await y(), await Z();
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
311
|
}
|
|
@@ -313,16 +313,22 @@ function Pt({
|
|
|
313
313
|
handleScroll: b
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const kt = { class: "w-full h-full rounded-xl overflow-hidden shadow-sm hover:shadow-md transition-all duration-300 bg-white relative" }, Et = {
|
|
317
317
|
key: 0,
|
|
318
318
|
class: "absolute inset-0 flex flex-col items-center justify-center bg-slate-100 text-slate-400 text-sm p-4 text-center"
|
|
319
319
|
}, Lt = {
|
|
320
320
|
key: 1,
|
|
321
|
-
class: "
|
|
322
|
-
}, Nt = {
|
|
321
|
+
class: "relative w-full h-full"
|
|
322
|
+
}, St = ["src"], Nt = ["src"], Ht = {
|
|
323
323
|
key: 2,
|
|
324
|
+
class: "absolute inset-0 bg-slate-100 flex items-center justify-center"
|
|
325
|
+
}, $t = { class: "flex flex-col items-center justify-center gap-2 text-slate-400" }, At = { class: "w-12 h-12 rounded-full bg-white/80 backdrop-blur-sm flex items-center justify-center shadow-sm" }, Ft = { class: "text-xs font-medium uppercase" }, Wt = {
|
|
326
|
+
key: 3,
|
|
327
|
+
class: "absolute bottom-2 left-1/2 transform -translate-x-1/2 flex items-center justify-center"
|
|
328
|
+
}, jt = {
|
|
329
|
+
key: 4,
|
|
324
330
|
class: "absolute inset-0 flex flex-col items-center justify-center bg-slate-50 text-slate-400 text-sm p-4 text-center"
|
|
325
|
-
},
|
|
331
|
+
}, Ot = ["title"], Bt = { class: "absolute bottom-0 left-0 right-0 p-3 opacity-0 group-hover:opacity-100 transform translate-y-2 group-hover:translate-y-0 transition-all duration-300 delay-75 pointer-events-none" }, Dt = { class: "text-white text-xs font-medium truncate drop-shadow-md" }, pe = /* @__PURE__ */ Le({
|
|
326
332
|
__name: "MasonryItem",
|
|
327
333
|
props: {
|
|
328
334
|
item: {},
|
|
@@ -331,148 +337,196 @@ const Et = { class: "relative w-full h-full group" }, kt = { class: "w-full h-fu
|
|
|
331
337
|
notFound: { type: Boolean, default: void 0 }
|
|
332
338
|
},
|
|
333
339
|
setup(e) {
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
+
const o = e, l = E(!1), s = E(!1), T = E(null), m = E(!1), a = E(!1), n = E(null), y = E(!1), c = E(!1), v = E(null);
|
|
341
|
+
let b = null;
|
|
342
|
+
const f = ee(() => {
|
|
343
|
+
var i;
|
|
344
|
+
return o.type ?? ((i = o.item) == null ? void 0 : i.type) ?? "image";
|
|
345
|
+
}), x = ee(() => {
|
|
346
|
+
var i;
|
|
347
|
+
return o.notFound ?? ((i = o.item) == null ? void 0 : i.notFound) ?? !1;
|
|
340
348
|
});
|
|
341
|
-
function
|
|
342
|
-
return new Promise((
|
|
343
|
-
if (!
|
|
344
|
-
|
|
349
|
+
function $(i) {
|
|
350
|
+
return new Promise((d, L) => {
|
|
351
|
+
if (!i) {
|
|
352
|
+
L(new Error("No image source provided"));
|
|
345
353
|
return;
|
|
346
354
|
}
|
|
347
|
-
const I = new Image(),
|
|
355
|
+
const I = new Image(), P = Date.now(), h = 300;
|
|
348
356
|
I.onload = () => {
|
|
349
|
-
const
|
|
357
|
+
const S = Date.now() - P, M = Math.max(0, h - S);
|
|
350
358
|
setTimeout(() => {
|
|
351
|
-
|
|
352
|
-
},
|
|
359
|
+
l.value = !0, s.value = !1, c.value = !1, d();
|
|
360
|
+
}, M);
|
|
353
361
|
}, I.onerror = () => {
|
|
354
|
-
|
|
355
|
-
}, I.src =
|
|
362
|
+
s.value = !0, l.value = !1, c.value = !1, L(new Error("Failed to load image"));
|
|
363
|
+
}, I.src = i;
|
|
356
364
|
});
|
|
357
365
|
}
|
|
358
|
-
function
|
|
359
|
-
return new Promise((
|
|
360
|
-
if (!
|
|
361
|
-
|
|
366
|
+
function z(i) {
|
|
367
|
+
return new Promise((d, L) => {
|
|
368
|
+
if (!i) {
|
|
369
|
+
L(new Error("No video source provided"));
|
|
362
370
|
return;
|
|
363
371
|
}
|
|
364
|
-
const I = document.createElement("video"),
|
|
372
|
+
const I = document.createElement("video"), P = Date.now(), h = 300;
|
|
365
373
|
I.preload = "metadata", I.muted = !0, I.onloadedmetadata = () => {
|
|
366
|
-
const
|
|
374
|
+
const S = Date.now() - P, M = Math.max(0, h - S);
|
|
367
375
|
setTimeout(() => {
|
|
368
|
-
m.value = !0, a.value = !1, c();
|
|
369
|
-
},
|
|
376
|
+
m.value = !0, a.value = !1, c.value = !1, d();
|
|
377
|
+
}, M);
|
|
370
378
|
}, I.onerror = () => {
|
|
371
|
-
a.value = !0, m.value = !1,
|
|
372
|
-
}, I.src =
|
|
379
|
+
a.value = !0, m.value = !1, c.value = !1, L(new Error("Failed to load video"));
|
|
380
|
+
}, I.src = i;
|
|
373
381
|
});
|
|
374
382
|
}
|
|
375
|
-
|
|
376
|
-
var
|
|
377
|
-
if (
|
|
383
|
+
async function N() {
|
|
384
|
+
var d;
|
|
385
|
+
if (!y.value || c.value || x.value || f.value === "video" && m.value || f.value === "image" && l.value)
|
|
378
386
|
return;
|
|
379
|
-
const
|
|
380
|
-
if (
|
|
381
|
-
if (
|
|
382
|
-
n.value =
|
|
387
|
+
const i = (d = o.item) == null ? void 0 : d.src;
|
|
388
|
+
if (i)
|
|
389
|
+
if (c.value = !0, f.value === "video") {
|
|
390
|
+
n.value = i, m.value = !1, a.value = !1;
|
|
383
391
|
try {
|
|
384
|
-
await
|
|
392
|
+
await z(i);
|
|
385
393
|
} catch {
|
|
386
394
|
}
|
|
387
395
|
} else {
|
|
388
|
-
|
|
396
|
+
T.value = i, l.value = !1, s.value = !1;
|
|
389
397
|
try {
|
|
390
|
-
await
|
|
398
|
+
await $(i);
|
|
391
399
|
} catch {
|
|
392
400
|
}
|
|
393
401
|
}
|
|
394
|
-
}
|
|
402
|
+
}
|
|
403
|
+
return Se(() => {
|
|
404
|
+
v.value && (b = new IntersectionObserver(
|
|
405
|
+
(i) => {
|
|
406
|
+
i.forEach((d) => {
|
|
407
|
+
d.isIntersecting && d.intersectionRatio >= 1 ? y.value || (y.value = !0, N()) : d.isIntersecting;
|
|
408
|
+
});
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
// Only trigger when item is 100% visible (full height in view)
|
|
412
|
+
threshold: [1]
|
|
413
|
+
}
|
|
414
|
+
), b.observe(v.value));
|
|
415
|
+
}), Ne(() => {
|
|
416
|
+
b && (b.disconnect(), b = null);
|
|
417
|
+
}), He(
|
|
395
418
|
() => {
|
|
396
|
-
var
|
|
397
|
-
return (
|
|
419
|
+
var i;
|
|
420
|
+
return (i = o.item) == null ? void 0 : i.src;
|
|
398
421
|
},
|
|
399
|
-
async (
|
|
400
|
-
if (!(!
|
|
401
|
-
if (
|
|
402
|
-
if (
|
|
403
|
-
|
|
422
|
+
async (i) => {
|
|
423
|
+
if (!(!i || x.value)) {
|
|
424
|
+
if (f.value === "video") {
|
|
425
|
+
if (i !== n.value && (m.value = !1, a.value = !1, n.value = i, y.value)) {
|
|
426
|
+
c.value = !0;
|
|
404
427
|
try {
|
|
405
|
-
await
|
|
428
|
+
await z(i);
|
|
406
429
|
} catch {
|
|
407
430
|
}
|
|
408
431
|
}
|
|
409
|
-
} else if (
|
|
410
|
-
|
|
432
|
+
} else if (i !== T.value && (l.value = !1, s.value = !1, T.value = i, y.value)) {
|
|
433
|
+
c.value = !0;
|
|
411
434
|
try {
|
|
412
|
-
await
|
|
435
|
+
await $(i);
|
|
413
436
|
} catch {
|
|
414
437
|
}
|
|
415
438
|
}
|
|
416
439
|
}
|
|
417
440
|
}
|
|
418
|
-
), (
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
441
|
+
), (i, d) => (D(), B("div", {
|
|
442
|
+
ref_key: "containerRef",
|
|
443
|
+
ref: v,
|
|
444
|
+
class: "relative w-full h-full group"
|
|
445
|
+
}, [
|
|
446
|
+
$e(i.$slots, "default", {
|
|
447
|
+
item: i.item,
|
|
448
|
+
remove: i.remove,
|
|
449
|
+
imageLoaded: l.value,
|
|
450
|
+
imageError: s.value,
|
|
424
451
|
videoLoaded: m.value,
|
|
425
452
|
videoError: a.value,
|
|
426
|
-
showNotFound:
|
|
453
|
+
showNotFound: x.value,
|
|
454
|
+
isLoading: c.value,
|
|
455
|
+
mediaType: f.value
|
|
427
456
|
}, () => [
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
]))) :
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
class:
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
457
|
+
k("div", kt, [
|
|
458
|
+
x.value ? (D(), B("div", Et, d[4] || (d[4] = [
|
|
459
|
+
k("i", { class: "fas fa-search text-3xl mb-3 opacity-50" }, null, -1),
|
|
460
|
+
k("span", { class: "font-medium" }, "Not Found", -1),
|
|
461
|
+
k("span", { class: "text-xs mt-1 opacity-75" }, "This item could not be located", -1)
|
|
462
|
+
]))) : (D(), B("div", Lt, [
|
|
463
|
+
f.value === "image" && l.value && T.value ? (D(), B("img", {
|
|
464
|
+
key: 0,
|
|
465
|
+
src: T.value,
|
|
466
|
+
class: "w-full h-full object-cover transition-transform duration-500 group-hover:scale-105",
|
|
467
|
+
loading: "lazy",
|
|
468
|
+
decoding: "async",
|
|
469
|
+
alt: ""
|
|
470
|
+
}, null, 8, St)) : X("", !0),
|
|
471
|
+
f.value === "video" && m.value && n.value ? (D(), B("video", {
|
|
472
|
+
key: 1,
|
|
473
|
+
src: n.value,
|
|
474
|
+
class: "w-full h-full object-cover transition-transform duration-500 group-hover:scale-105",
|
|
475
|
+
muted: "",
|
|
476
|
+
loop: "",
|
|
477
|
+
playsinline: "",
|
|
478
|
+
onMouseenter: d[0] || (d[0] = (L) => L.target.play()),
|
|
479
|
+
onMouseleave: d[1] || (d[1] = (L) => L.target.pause()),
|
|
480
|
+
onError: d[2] || (d[2] = (L) => a.value = !0)
|
|
481
|
+
}, null, 40, Nt)) : X("", !0),
|
|
482
|
+
!l.value && !m.value && !s.value && !a.value ? (D(), B("div", Ht, [
|
|
483
|
+
k("div", $t, [
|
|
484
|
+
k("div", At, [
|
|
485
|
+
k("i", {
|
|
486
|
+
class: se(f.value === "video" ? "fas fa-video text-xl" : "fas fa-image text-xl")
|
|
487
|
+
}, null, 2)
|
|
488
|
+
]),
|
|
489
|
+
k("span", Ft, ie(f.value), 1)
|
|
490
|
+
])
|
|
491
|
+
])) : X("", !0),
|
|
492
|
+
c.value ? (D(), B("div", Wt, d[5] || (d[5] = [
|
|
493
|
+
k("div", { class: "bg-white/90 backdrop-blur-sm rounded-full px-3 py-1.5 shadow-sm" }, [
|
|
494
|
+
k("div", { class: "animate-spin rounded-full h-4 w-4 border-b-2 border-blue-500" })
|
|
495
|
+
], -1)
|
|
496
|
+
]))) : X("", !0),
|
|
497
|
+
f.value === "image" && s.value || f.value === "video" && a.value ? (D(), B("div", jt, [
|
|
498
|
+
k("i", {
|
|
499
|
+
class: se(f.value === "video" ? "fas fa-video text-2xl mb-2 opacity-50" : "fas fa-image text-2xl mb-2 opacity-50")
|
|
500
|
+
}, null, 2),
|
|
501
|
+
k("span", null, "Failed to load " + ie(f.value), 1)
|
|
502
|
+
])) : X("", !0)
|
|
503
|
+
])),
|
|
504
|
+
!x.value && (l.value || m.value || c.value) ? (D(), B("div", {
|
|
505
|
+
key: 2,
|
|
506
|
+
class: "absolute top-2 left-2 w-7 h-7 flex items-center justify-center bg-black/60 backdrop-blur-sm text-white rounded-full shadow-sm opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none",
|
|
507
|
+
title: f.value === "video" ? "Video" : "Image"
|
|
508
|
+
}, [
|
|
509
|
+
k("i", {
|
|
510
|
+
class: se(f.value === "video" ? "fas fa-video text-xs" : "fas fa-image text-xs")
|
|
511
|
+
}, null, 2)
|
|
512
|
+
], 8, Ot)) : X("", !0),
|
|
513
|
+
d[7] || (d[7] = k("div", { class: "absolute inset-0 bg-gradient-to-t from-black/50 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none" }, null, -1)),
|
|
514
|
+
i.remove ? (D(), B("button", {
|
|
442
515
|
key: 3,
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
loading: "lazy",
|
|
446
|
-
decoding: "async"
|
|
447
|
-
}, null, 8, Ht)) : le("", !0),
|
|
448
|
-
v.value === "video" && m.value && n.value && !f.value ? (G(), V("video", {
|
|
449
|
-
key: 4,
|
|
450
|
-
src: n.value,
|
|
451
|
-
class: "w-full h-full object-cover transition-transform duration-500 group-hover:scale-105",
|
|
452
|
-
muted: "",
|
|
453
|
-
loop: "",
|
|
454
|
-
playsinline: "",
|
|
455
|
-
onMouseenter: c[0] || (c[0] = (w) => w.target.play()),
|
|
456
|
-
onMouseleave: c[1] || (c[1] = (w) => w.target.pause()),
|
|
457
|
-
onError: c[2] || (c[2] = (w) => a.value = !0)
|
|
458
|
-
}, null, 40, $t)) : le("", !0),
|
|
459
|
-
c[7] || (c[7] = A("div", { class: "absolute inset-0 bg-gradient-to-t from-black/50 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none" }, null, -1)),
|
|
460
|
-
r.remove ? (G(), V("button", {
|
|
461
|
-
key: 5,
|
|
462
|
-
class: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center bg-white/90 backdrop-blur-sm text-slate-700 rounded-full shadow-sm opacity-0 group-hover:opacity-100 transform translate-y-2 group-hover:translate-y-0 transition-all duration-300 hover:bg-red-500 hover:text-white cursor-pointer",
|
|
463
|
-
onClick: c[3] || (c[3] = je((w) => r.remove(r.item), ["stop"])),
|
|
516
|
+
class: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center bg-white/90 backdrop-blur-sm text-slate-700 rounded-full shadow-sm opacity-0 group-hover:opacity-100 transform translate-y-2 group-hover:translate-y-0 transition-all duration-300 hover:bg-red-500 hover:text-white cursor-pointer z-10",
|
|
517
|
+
onClick: d[3] || (d[3] = ze((L) => i.remove(i.item), ["stop"])),
|
|
464
518
|
"aria-label": "Remove item"
|
|
465
|
-
},
|
|
466
|
-
|
|
467
|
-
]))) :
|
|
468
|
-
|
|
469
|
-
|
|
519
|
+
}, d[6] || (d[6] = [
|
|
520
|
+
k("i", { class: "fas fa-times text-sm" }, null, -1)
|
|
521
|
+
]))) : X("", !0),
|
|
522
|
+
k("div", Bt, [
|
|
523
|
+
k("p", Dt, "Item #" + ie(String(i.item.id).split("-")[0]), 1)
|
|
470
524
|
])
|
|
471
525
|
])
|
|
472
526
|
])
|
|
473
|
-
]));
|
|
527
|
+
], 512));
|
|
474
528
|
}
|
|
475
|
-
}),
|
|
529
|
+
}), zt = /* @__PURE__ */ Le({
|
|
476
530
|
__name: "Masonry",
|
|
477
531
|
props: {
|
|
478
532
|
getNextPage: {
|
|
@@ -572,8 +626,8 @@ const Et = { class: "relative w-full h-full group" }, kt = { class: "w-full h-fu
|
|
|
572
626
|
"retry:stop",
|
|
573
627
|
"remove-all:complete"
|
|
574
628
|
],
|
|
575
|
-
setup(e, { expose:
|
|
576
|
-
const
|
|
629
|
+
setup(e, { expose: o, emit: l }) {
|
|
630
|
+
const s = e, T = {
|
|
577
631
|
sizes: { base: 1, sm: 2, md: 3, lg: 4, xl: 5, "2xl": 6 },
|
|
578
632
|
gutterX: 10,
|
|
579
633
|
gutterY: 10,
|
|
@@ -582,39 +636,39 @@ const Et = { class: "relative w-full h-full group" }, kt = { class: "w-full h-fu
|
|
|
582
636
|
paddingLeft: 0,
|
|
583
637
|
paddingRight: 0,
|
|
584
638
|
placement: "masonry"
|
|
585
|
-
}, m =
|
|
639
|
+
}, m = ee(() => {
|
|
586
640
|
var t;
|
|
587
641
|
return {
|
|
588
|
-
...
|
|
589
|
-
...
|
|
642
|
+
...T,
|
|
643
|
+
...s.layout,
|
|
590
644
|
sizes: {
|
|
591
|
-
...
|
|
592
|
-
...((t =
|
|
645
|
+
...T.sizes,
|
|
646
|
+
...((t = s.layout) == null ? void 0 : t.sizes) || {}
|
|
593
647
|
}
|
|
594
648
|
};
|
|
595
|
-
}), a =
|
|
596
|
-
get: () =>
|
|
649
|
+
}), a = l, n = ee({
|
|
650
|
+
get: () => s.items,
|
|
597
651
|
set: (t) => a("update:items", t)
|
|
598
|
-
}),
|
|
599
|
-
function
|
|
652
|
+
}), y = E(7), c = E(null), v = E([]), b = E(null), f = E(!1), x = E(0), $ = E(/* @__PURE__ */ new Set());
|
|
653
|
+
function z(t) {
|
|
600
654
|
return typeof t == "number" && Number.isFinite(t) && t > 0;
|
|
601
655
|
}
|
|
602
|
-
function
|
|
656
|
+
function N(t, r) {
|
|
603
657
|
try {
|
|
604
658
|
if (!Array.isArray(t) || t.length === 0) return;
|
|
605
|
-
const u = t.filter((p) => !
|
|
659
|
+
const u = t.filter((p) => !z(p == null ? void 0 : p.width) || !z(p == null ? void 0 : p.height));
|
|
606
660
|
if (u.length === 0) return;
|
|
607
661
|
const g = [];
|
|
608
662
|
for (const p of u) {
|
|
609
|
-
const
|
|
610
|
-
|
|
663
|
+
const O = (p == null ? void 0 : p.id) ?? `idx:${t.indexOf(p)}`;
|
|
664
|
+
$.value.has(O) || ($.value.add(O), g.push(O));
|
|
611
665
|
}
|
|
612
666
|
if (g.length > 0) {
|
|
613
667
|
const p = g.slice(0, 10);
|
|
614
668
|
console.warn(
|
|
615
669
|
"[Masonry] Items missing width/height detected:",
|
|
616
670
|
{
|
|
617
|
-
context:
|
|
671
|
+
context: r,
|
|
618
672
|
count: g.length,
|
|
619
673
|
sampleIds: p,
|
|
620
674
|
hint: "Ensure each item has positive width and height. Consider providing fallbacks (e.g., 512x512) at the data layer."
|
|
@@ -624,332 +678,332 @@ const Et = { class: "relative w-full h-full group" }, kt = { class: "w-full h-fu
|
|
|
624
678
|
} catch {
|
|
625
679
|
}
|
|
626
680
|
}
|
|
627
|
-
const
|
|
681
|
+
const i = E(0), d = E(0), L = s.virtualBufferPx, I = E(!1), P = E({
|
|
628
682
|
distanceToTrigger: 0,
|
|
629
683
|
isNearTrigger: !1
|
|
630
|
-
}),
|
|
631
|
-
if (!
|
|
632
|
-
const { scrollTop:
|
|
633
|
-
|
|
684
|
+
}), h = (t) => {
|
|
685
|
+
if (!c.value) return;
|
|
686
|
+
const { scrollTop: r, clientHeight: u } = c.value, g = r + u, p = t ?? ge(n.value, y.value), O = p.length ? Math.max(...p) : 0, G = typeof s.loadThresholdPx == "number" ? s.loadThresholdPx : 200, Q = G >= 0 ? Math.max(0, O - G) : Math.max(0, O + G), we = Math.max(0, Q - g), De = we <= 100;
|
|
687
|
+
P.value = {
|
|
634
688
|
distanceToTrigger: Math.round(we),
|
|
635
|
-
isNearTrigger:
|
|
689
|
+
isNearTrigger: De
|
|
636
690
|
};
|
|
637
|
-
}, { onEnter:
|
|
638
|
-
function
|
|
639
|
-
if (
|
|
691
|
+
}, { onEnter: S, onBeforeEnter: M, onBeforeLeave: W, onLeave: H } = It(n, { leaveDurationMs: s.leaveDurationMs });
|
|
692
|
+
function _(t, r) {
|
|
693
|
+
if (I.value) {
|
|
640
694
|
const u = parseInt(t.dataset.left || "0", 10), g = parseInt(t.dataset.top || "0", 10);
|
|
641
695
|
t.style.transition = "none", t.style.opacity = "1", t.style.transform = `translate3d(${u}px, ${g}px, 0) scale(1)`, t.style.removeProperty("--masonry-opacity-delay"), requestAnimationFrame(() => {
|
|
642
|
-
t.style.transition = "",
|
|
696
|
+
t.style.transition = "", r();
|
|
643
697
|
});
|
|
644
698
|
} else
|
|
645
|
-
|
|
699
|
+
S(t, r);
|
|
646
700
|
}
|
|
647
|
-
function
|
|
648
|
-
if (
|
|
649
|
-
const
|
|
650
|
-
t.style.transition = "none", t.style.opacity = "1", t.style.transform = `translate3d(${
|
|
701
|
+
function te(t) {
|
|
702
|
+
if (I.value) {
|
|
703
|
+
const r = parseInt(t.dataset.left || "0", 10), u = parseInt(t.dataset.top || "0", 10);
|
|
704
|
+
t.style.transition = "none", t.style.opacity = "1", t.style.transform = `translate3d(${r}px, ${u}px, 0) scale(1)`, t.style.removeProperty("--masonry-opacity-delay");
|
|
651
705
|
} else
|
|
652
|
-
|
|
706
|
+
M(t);
|
|
653
707
|
}
|
|
654
|
-
function
|
|
655
|
-
|
|
708
|
+
function ae(t) {
|
|
709
|
+
I.value || W(t);
|
|
656
710
|
}
|
|
657
|
-
function
|
|
658
|
-
|
|
711
|
+
function Y(t, r) {
|
|
712
|
+
I.value ? r() : H(t, r);
|
|
659
713
|
}
|
|
660
|
-
const
|
|
661
|
-
const t =
|
|
714
|
+
const ne = ee(() => {
|
|
715
|
+
const t = i.value - L, r = i.value + d.value + L, u = n.value;
|
|
662
716
|
return !u || u.length === 0 ? [] : u.filter((g) => {
|
|
663
717
|
const p = g.top;
|
|
664
|
-
return g.top + g.columnHeight >= t && p <=
|
|
718
|
+
return g.top + g.columnHeight >= t && p <= r;
|
|
665
719
|
});
|
|
666
|
-
}), { handleScroll:
|
|
667
|
-
container:
|
|
720
|
+
}), { handleScroll: J } = Pt({
|
|
721
|
+
container: c,
|
|
668
722
|
masonry: n,
|
|
669
|
-
columns:
|
|
670
|
-
containerHeight:
|
|
671
|
-
isLoading:
|
|
672
|
-
pageSize:
|
|
673
|
-
refreshLayout:
|
|
723
|
+
columns: y,
|
|
724
|
+
containerHeight: x,
|
|
725
|
+
isLoading: f,
|
|
726
|
+
pageSize: s.pageSize,
|
|
727
|
+
refreshLayout: C,
|
|
674
728
|
setItemsRaw: (t) => {
|
|
675
729
|
n.value = t;
|
|
676
730
|
},
|
|
677
|
-
loadNext:
|
|
678
|
-
loadThresholdPx:
|
|
731
|
+
loadNext: q,
|
|
732
|
+
loadThresholdPx: s.loadThresholdPx
|
|
679
733
|
});
|
|
680
|
-
|
|
681
|
-
isLoading:
|
|
682
|
-
refreshLayout:
|
|
683
|
-
containerHeight:
|
|
734
|
+
o({
|
|
735
|
+
isLoading: f,
|
|
736
|
+
refreshLayout: C,
|
|
737
|
+
containerHeight: x,
|
|
684
738
|
remove: U,
|
|
685
|
-
removeMany:
|
|
686
|
-
removeAll:
|
|
687
|
-
loadNext:
|
|
688
|
-
loadPage:
|
|
689
|
-
refreshCurrentPage:
|
|
690
|
-
reset:
|
|
691
|
-
init:
|
|
692
|
-
paginationHistory:
|
|
739
|
+
removeMany: V,
|
|
740
|
+
removeAll: We,
|
|
741
|
+
loadNext: q,
|
|
742
|
+
loadPage: R,
|
|
743
|
+
refreshCurrentPage: j,
|
|
744
|
+
reset: Oe,
|
|
745
|
+
init: Be,
|
|
746
|
+
paginationHistory: v,
|
|
693
747
|
cancelLoad: he,
|
|
694
748
|
scrollToTop: ye,
|
|
695
|
-
totalItems:
|
|
749
|
+
totalItems: ee(() => n.value.length)
|
|
696
750
|
});
|
|
697
|
-
function
|
|
698
|
-
const
|
|
751
|
+
function K(t) {
|
|
752
|
+
const r = wt(t);
|
|
699
753
|
let u = 0;
|
|
700
|
-
if (
|
|
701
|
-
const { scrollTop: g, clientHeight: p } =
|
|
754
|
+
if (c.value) {
|
|
755
|
+
const { scrollTop: g, clientHeight: p } = c.value;
|
|
702
756
|
u = g + p + 100;
|
|
703
757
|
}
|
|
704
|
-
|
|
758
|
+
x.value = Math.max(r, u);
|
|
705
759
|
}
|
|
706
|
-
function
|
|
707
|
-
if (!
|
|
708
|
-
|
|
709
|
-
const
|
|
760
|
+
function C(t) {
|
|
761
|
+
if (!c.value) return;
|
|
762
|
+
N(t, "refreshLayout");
|
|
763
|
+
const r = t.map((g, p) => ({
|
|
710
764
|
...g,
|
|
711
765
|
originalIndex: g.originalIndex ?? p
|
|
712
|
-
})), u = Ye(
|
|
713
|
-
|
|
766
|
+
})), u = Ye(r, c.value, y.value, m.value);
|
|
767
|
+
K(u), n.value = u;
|
|
714
768
|
}
|
|
715
|
-
function
|
|
769
|
+
function re(t, r) {
|
|
716
770
|
return new Promise((u) => {
|
|
717
771
|
const g = Math.max(0, t | 0), p = Date.now();
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
if (
|
|
721
|
-
clearInterval(
|
|
772
|
+
r(g, g);
|
|
773
|
+
const O = setInterval(() => {
|
|
774
|
+
if (F.value) {
|
|
775
|
+
clearInterval(O), u();
|
|
722
776
|
return;
|
|
723
777
|
}
|
|
724
|
-
const
|
|
725
|
-
|
|
778
|
+
const G = Date.now() - p, Q = Math.max(0, g - G);
|
|
779
|
+
r(Q, g), Q <= 0 && (clearInterval(O), u());
|
|
726
780
|
}, 100);
|
|
727
781
|
});
|
|
728
782
|
}
|
|
729
|
-
async function
|
|
783
|
+
async function w(t) {
|
|
730
784
|
try {
|
|
731
|
-
const
|
|
732
|
-
return
|
|
733
|
-
} catch (
|
|
734
|
-
throw console.error("Error in getContent:",
|
|
785
|
+
const r = await A(() => s.getNextPage(t));
|
|
786
|
+
return C([...n.value, ...r.items]), r;
|
|
787
|
+
} catch (r) {
|
|
788
|
+
throw console.error("Error in getContent:", r), r;
|
|
735
789
|
}
|
|
736
790
|
}
|
|
737
|
-
async function
|
|
738
|
-
let
|
|
739
|
-
const u =
|
|
740
|
-
let g =
|
|
791
|
+
async function A(t) {
|
|
792
|
+
let r = 0;
|
|
793
|
+
const u = s.retryMaxAttempts;
|
|
794
|
+
let g = s.retryInitialDelayMs;
|
|
741
795
|
for (; ; )
|
|
742
796
|
try {
|
|
743
797
|
const p = await t();
|
|
744
|
-
return
|
|
798
|
+
return r > 0 && a("retry:stop", { attempt: r, success: !0 }), p;
|
|
745
799
|
} catch (p) {
|
|
746
|
-
if (
|
|
747
|
-
throw a("retry:stop", { attempt:
|
|
748
|
-
a("retry:start", { attempt:
|
|
749
|
-
a("retry:tick", { attempt:
|
|
750
|
-
}), g +=
|
|
800
|
+
if (r++, r > u)
|
|
801
|
+
throw a("retry:stop", { attempt: r - 1, success: !1 }), p;
|
|
802
|
+
a("retry:start", { attempt: r, max: u, totalMs: g }), await re(g, (O, G) => {
|
|
803
|
+
a("retry:tick", { attempt: r, remainingMs: O, totalMs: G });
|
|
804
|
+
}), g += s.retryBackoffStepMs;
|
|
751
805
|
}
|
|
752
806
|
}
|
|
753
|
-
async function
|
|
754
|
-
if (!
|
|
755
|
-
|
|
807
|
+
async function R(t) {
|
|
808
|
+
if (!f.value) {
|
|
809
|
+
F.value = !1, f.value = !0;
|
|
756
810
|
try {
|
|
757
|
-
const
|
|
758
|
-
if (
|
|
759
|
-
const u = await
|
|
760
|
-
return
|
|
761
|
-
} catch (
|
|
762
|
-
throw console.error("Error loading page:",
|
|
811
|
+
const r = n.value.length;
|
|
812
|
+
if (F.value) return;
|
|
813
|
+
const u = await w(t);
|
|
814
|
+
return F.value ? void 0 : (b.value = t, v.value.push(u.nextPage), await oe(r), u);
|
|
815
|
+
} catch (r) {
|
|
816
|
+
throw console.error("Error loading page:", r), r;
|
|
763
817
|
} finally {
|
|
764
|
-
|
|
818
|
+
f.value = !1;
|
|
765
819
|
}
|
|
766
820
|
}
|
|
767
821
|
}
|
|
768
|
-
async function
|
|
769
|
-
if (!
|
|
770
|
-
|
|
822
|
+
async function q() {
|
|
823
|
+
if (!f.value) {
|
|
824
|
+
F.value = !1, f.value = !0;
|
|
771
825
|
try {
|
|
772
826
|
const t = n.value.length;
|
|
773
|
-
if (
|
|
774
|
-
const
|
|
775
|
-
return
|
|
827
|
+
if (F.value) return;
|
|
828
|
+
const r = v.value[v.value.length - 1], u = await w(r);
|
|
829
|
+
return F.value ? void 0 : (b.value = r, v.value.push(u.nextPage), await oe(t), u);
|
|
776
830
|
} catch (t) {
|
|
777
831
|
throw console.error("Error loading next page:", t), t;
|
|
778
832
|
} finally {
|
|
779
|
-
|
|
833
|
+
f.value = !1;
|
|
780
834
|
}
|
|
781
835
|
}
|
|
782
836
|
}
|
|
783
|
-
async function
|
|
784
|
-
if (console.log("[Masonry] refreshCurrentPage called, isLoading:",
|
|
785
|
-
|
|
837
|
+
async function j() {
|
|
838
|
+
if (console.log("[Masonry] refreshCurrentPage called, isLoading:", f.value, "currentPage:", b.value), !f.value) {
|
|
839
|
+
F.value = !1, f.value = !0;
|
|
786
840
|
try {
|
|
787
841
|
const t = b.value;
|
|
788
842
|
if (console.log("[Masonry] pageToRefresh:", t), t == null) {
|
|
789
|
-
console.warn("[Masonry] No current page to refresh - currentPage:", b.value, "paginationHistory:",
|
|
843
|
+
console.warn("[Masonry] No current page to refresh - currentPage:", b.value, "paginationHistory:", v.value);
|
|
790
844
|
return;
|
|
791
845
|
}
|
|
792
|
-
n.value = [],
|
|
793
|
-
const
|
|
794
|
-
if (
|
|
795
|
-
b.value = t,
|
|
846
|
+
n.value = [], x.value = 0, v.value = [t], await Z();
|
|
847
|
+
const r = await w(t);
|
|
848
|
+
if (F.value) return;
|
|
849
|
+
b.value = t, v.value.push(r.nextPage);
|
|
796
850
|
const u = n.value.length;
|
|
797
|
-
return await
|
|
851
|
+
return await oe(u), r;
|
|
798
852
|
} catch (t) {
|
|
799
853
|
throw console.error("[Masonry] Error refreshing current page:", t), t;
|
|
800
854
|
} finally {
|
|
801
|
-
|
|
855
|
+
f.value = !1;
|
|
802
856
|
}
|
|
803
857
|
}
|
|
804
858
|
}
|
|
805
859
|
async function U(t) {
|
|
806
|
-
const
|
|
807
|
-
if (n.value =
|
|
808
|
-
if (
|
|
809
|
-
console.log("[Masonry] All items removed, calling refreshCurrentPage"), await
|
|
860
|
+
const r = n.value.filter((u) => u.id !== t.id);
|
|
861
|
+
if (n.value = r, await Z(), console.log("[Masonry] remove - next.length:", r.length, "paginationHistory.length:", v.value.length), r.length === 0 && v.value.length > 0) {
|
|
862
|
+
if (s.autoRefreshOnEmpty)
|
|
863
|
+
console.log("[Masonry] All items removed, calling refreshCurrentPage"), await j();
|
|
810
864
|
else {
|
|
811
865
|
console.log("[Masonry] All items removed, calling loadNext and forcing backfill");
|
|
812
866
|
try {
|
|
813
|
-
await
|
|
867
|
+
await q(), await oe(0, !0);
|
|
814
868
|
} catch {
|
|
815
869
|
}
|
|
816
870
|
}
|
|
817
871
|
return;
|
|
818
872
|
}
|
|
819
873
|
await new Promise((u) => requestAnimationFrame(() => u())), requestAnimationFrame(() => {
|
|
820
|
-
|
|
874
|
+
C(r);
|
|
821
875
|
});
|
|
822
876
|
}
|
|
823
|
-
async function
|
|
877
|
+
async function V(t) {
|
|
824
878
|
if (!t || t.length === 0) return;
|
|
825
|
-
const
|
|
826
|
-
if (n.value = u, await
|
|
827
|
-
if (
|
|
828
|
-
await
|
|
879
|
+
const r = new Set(t.map((g) => g.id)), u = n.value.filter((g) => !r.has(g.id));
|
|
880
|
+
if (n.value = u, await Z(), u.length === 0 && v.value.length > 0) {
|
|
881
|
+
if (s.autoRefreshOnEmpty)
|
|
882
|
+
await j();
|
|
829
883
|
else
|
|
830
884
|
try {
|
|
831
|
-
await
|
|
885
|
+
await q(), await oe(0, !0);
|
|
832
886
|
} catch {
|
|
833
887
|
}
|
|
834
888
|
return;
|
|
835
889
|
}
|
|
836
890
|
await new Promise((g) => requestAnimationFrame(() => g())), requestAnimationFrame(() => {
|
|
837
|
-
|
|
891
|
+
C(u);
|
|
838
892
|
});
|
|
839
893
|
}
|
|
840
894
|
function ye(t) {
|
|
841
|
-
|
|
895
|
+
c.value && c.value.scrollTo({
|
|
842
896
|
top: 0,
|
|
843
897
|
behavior: (t == null ? void 0 : t.behavior) ?? "smooth",
|
|
844
898
|
...t
|
|
845
899
|
});
|
|
846
900
|
}
|
|
847
|
-
async function
|
|
848
|
-
ye({ behavior: "smooth" }), n.value = [],
|
|
901
|
+
async function We() {
|
|
902
|
+
ye({ behavior: "smooth" }), n.value = [], x.value = 0, await Z(), a("remove-all:complete");
|
|
849
903
|
}
|
|
850
|
-
function
|
|
851
|
-
|
|
904
|
+
function je() {
|
|
905
|
+
y.value = ve(m.value), C(n.value), c.value && (i.value = c.value.scrollTop, d.value = c.value.clientHeight);
|
|
852
906
|
}
|
|
853
|
-
let
|
|
854
|
-
const
|
|
855
|
-
async function
|
|
856
|
-
if (!
|
|
857
|
-
const u = (t || 0) + (
|
|
858
|
-
if (!(!
|
|
859
|
-
|
|
907
|
+
let ue = !1;
|
|
908
|
+
const F = E(!1);
|
|
909
|
+
async function oe(t, r = !1) {
|
|
910
|
+
if (!r && !s.backfillEnabled || ue || F.value) return;
|
|
911
|
+
const u = (t || 0) + (s.pageSize || 0);
|
|
912
|
+
if (!(!s.pageSize || s.pageSize <= 0 || v.value[v.value.length - 1] == null) && !(n.value.length >= u)) {
|
|
913
|
+
ue = !0;
|
|
860
914
|
try {
|
|
861
915
|
let p = 0;
|
|
862
|
-
for (a("backfill:start", { target: u, fetched: n.value.length, calls: p }); n.value.length < u && p <
|
|
916
|
+
for (a("backfill:start", { target: u, fetched: n.value.length, calls: p }); n.value.length < u && p < s.backfillMaxCalls && v.value[v.value.length - 1] != null && !F.value && (await re(s.backfillDelayMs, (G, Q) => {
|
|
863
917
|
a("backfill:tick", {
|
|
864
918
|
fetched: n.value.length,
|
|
865
919
|
target: u,
|
|
866
920
|
calls: p,
|
|
867
|
-
remainingMs:
|
|
868
|
-
totalMs:
|
|
921
|
+
remainingMs: G,
|
|
922
|
+
totalMs: Q
|
|
869
923
|
});
|
|
870
|
-
}),
|
|
871
|
-
const
|
|
924
|
+
}), !F.value); ) {
|
|
925
|
+
const O = v.value[v.value.length - 1];
|
|
872
926
|
try {
|
|
873
|
-
|
|
874
|
-
const
|
|
875
|
-
if (
|
|
876
|
-
|
|
927
|
+
f.value = !0;
|
|
928
|
+
const G = await w(O);
|
|
929
|
+
if (F.value) break;
|
|
930
|
+
v.value.push(G.nextPage);
|
|
877
931
|
} finally {
|
|
878
|
-
|
|
932
|
+
f.value = !1;
|
|
879
933
|
}
|
|
880
934
|
p++;
|
|
881
935
|
}
|
|
882
936
|
a("backfill:stop", { fetched: n.value.length, calls: p });
|
|
883
937
|
} finally {
|
|
884
|
-
|
|
938
|
+
ue = !1;
|
|
885
939
|
}
|
|
886
940
|
}
|
|
887
941
|
}
|
|
888
942
|
function he() {
|
|
889
|
-
|
|
943
|
+
F.value = !0, f.value = !1, ue = !1;
|
|
890
944
|
}
|
|
891
|
-
function
|
|
892
|
-
he(),
|
|
945
|
+
function Oe() {
|
|
946
|
+
he(), F.value = !1, c.value && c.value.scrollTo({
|
|
893
947
|
top: 0,
|
|
894
948
|
behavior: "smooth"
|
|
895
|
-
}), n.value = [],
|
|
949
|
+
}), n.value = [], x.value = 0, b.value = s.loadAtPage, v.value = [s.loadAtPage], P.value = {
|
|
896
950
|
distanceToTrigger: 0,
|
|
897
951
|
isNearTrigger: !1
|
|
898
952
|
};
|
|
899
953
|
}
|
|
900
|
-
const be =
|
|
901
|
-
|
|
902
|
-
const t = ge(n.value,
|
|
903
|
-
|
|
904
|
-
}, 200), xe =
|
|
905
|
-
function
|
|
906
|
-
b.value =
|
|
954
|
+
const be = ke(async () => {
|
|
955
|
+
c.value && (i.value = c.value.scrollTop, d.value = c.value.clientHeight), I.value = !0, await Z(), await new Promise((r) => requestAnimationFrame(() => r())), I.value = !1;
|
|
956
|
+
const t = ge(n.value, y.value);
|
|
957
|
+
J(t), h(t);
|
|
958
|
+
}, 200), xe = ke(je, 200);
|
|
959
|
+
function Be(t, r, u) {
|
|
960
|
+
b.value = r, v.value = [r], v.value.push(u), N(t, "init"), C([...n.value, ...t]), h();
|
|
907
961
|
}
|
|
908
|
-
return
|
|
962
|
+
return He(
|
|
909
963
|
m,
|
|
910
964
|
() => {
|
|
911
|
-
|
|
965
|
+
c.value && (y.value = ve(m.value), C(n.value));
|
|
912
966
|
},
|
|
913
967
|
{ deep: !0 }
|
|
914
|
-
),
|
|
968
|
+
), Se(async () => {
|
|
915
969
|
var t;
|
|
916
970
|
try {
|
|
917
|
-
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
} catch (
|
|
921
|
-
console.error("Error during component initialization:",
|
|
971
|
+
y.value = ve(m.value), c.value && (i.value = c.value.scrollTop, d.value = c.value.clientHeight);
|
|
972
|
+
const r = s.loadAtPage;
|
|
973
|
+
v.value = [r], s.skipInitialLoad || await R(v.value[0]), h();
|
|
974
|
+
} catch (r) {
|
|
975
|
+
console.error("Error during component initialization:", r), f.value = !1;
|
|
922
976
|
}
|
|
923
|
-
(t =
|
|
924
|
-
}),
|
|
977
|
+
(t = c.value) == null || t.addEventListener("scroll", be, { passive: !0 }), window.addEventListener("resize", xe);
|
|
978
|
+
}), Ne(() => {
|
|
925
979
|
var t;
|
|
926
|
-
(t =
|
|
927
|
-
}), (t,
|
|
928
|
-
class:
|
|
980
|
+
(t = c.value) == null || t.removeEventListener("scroll", be), window.removeEventListener("resize", xe);
|
|
981
|
+
}), (t, r) => (D(), B("div", {
|
|
982
|
+
class: se(["overflow-auto w-full flex-1 masonry-container", { "force-motion": s.forceMotion }]),
|
|
929
983
|
ref_key: "container",
|
|
930
|
-
ref:
|
|
984
|
+
ref: c
|
|
931
985
|
}, [
|
|
932
|
-
|
|
986
|
+
k("div", {
|
|
933
987
|
class: "relative",
|
|
934
|
-
style: Re({ height: `${
|
|
988
|
+
style: Re({ height: `${x.value}px`, "--masonry-duration": `${e.transitionDurationMs}ms`, "--masonry-leave-duration": `${e.leaveDurationMs}ms`, "--masonry-ease": e.transitionEasing })
|
|
935
989
|
}, [
|
|
936
|
-
Te(
|
|
990
|
+
Te(_e, {
|
|
937
991
|
name: "masonry",
|
|
938
992
|
css: !1,
|
|
939
|
-
onEnter:
|
|
940
|
-
onBeforeEnter:
|
|
941
|
-
onLeave:
|
|
942
|
-
onBeforeLeave:
|
|
993
|
+
onEnter: _,
|
|
994
|
+
onBeforeEnter: te,
|
|
995
|
+
onLeave: Y,
|
|
996
|
+
onBeforeLeave: ae
|
|
943
997
|
}, {
|
|
944
|
-
default:
|
|
945
|
-
(
|
|
998
|
+
default: Ce(() => [
|
|
999
|
+
(D(!0), B(qe, null, Ve(ne.value, (u, g) => (D(), B("div", Ge({
|
|
946
1000
|
key: `${u.page}-${u.id}`,
|
|
947
1001
|
class: "absolute masonry-item",
|
|
948
1002
|
ref_for: !0
|
|
949
1003
|
}, Ue(Mt)(u, g), {
|
|
950
1004
|
style: { paddingTop: `${m.value.header}px`, paddingBottom: `${m.value.footer}px` }
|
|
951
1005
|
}), [
|
|
952
|
-
|
|
1006
|
+
$e(t.$slots, "default", {
|
|
953
1007
|
item: u,
|
|
954
1008
|
remove: U
|
|
955
1009
|
}, () => [
|
|
@@ -962,29 +1016,29 @@ const Et = { class: "relative w-full h-full group" }, kt = { class: "w-full h-fu
|
|
|
962
1016
|
]),
|
|
963
1017
|
_: 3
|
|
964
1018
|
}),
|
|
965
|
-
|
|
1019
|
+
x.value > 0 ? (D(), B("div", {
|
|
966
1020
|
key: 0,
|
|
967
|
-
class:
|
|
1021
|
+
class: se(["fixed bottom-4 right-4 bg-gray-800 text-white text-xs rounded-full px-3 py-1.5 shadow-lg z-10 transition-opacity duration-300", { "opacity-50 hover:opacity-100": !P.value.isNearTrigger, "opacity-100": P.value.isNearTrigger }])
|
|
968
1022
|
}, [
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
], 2)) :
|
|
1023
|
+
k("span", null, ie(n.value.length) + " items", 1),
|
|
1024
|
+
r[0] || (r[0] = k("span", { class: "mx-2" }, "|", -1)),
|
|
1025
|
+
k("span", null, ie(P.value.distanceToTrigger) + "px to load", 1)
|
|
1026
|
+
], 2)) : X("", !0)
|
|
973
1027
|
], 4)
|
|
974
1028
|
], 2));
|
|
975
1029
|
}
|
|
976
|
-
}),
|
|
977
|
-
const
|
|
978
|
-
for (const [
|
|
979
|
-
s
|
|
980
|
-
return
|
|
981
|
-
},
|
|
1030
|
+
}), Rt = (e, o) => {
|
|
1031
|
+
const l = e.__vccOpts || e;
|
|
1032
|
+
for (const [s, T] of o)
|
|
1033
|
+
l[s] = T;
|
|
1034
|
+
return l;
|
|
1035
|
+
}, Ee = /* @__PURE__ */ Rt(zt, [["__scopeId", "data-v-110c3294"]]), Ct = {
|
|
982
1036
|
install(e) {
|
|
983
|
-
e.component("WyxosMasonry",
|
|
1037
|
+
e.component("WyxosMasonry", Ee), e.component("WMasonry", Ee), e.component("WyxosMasonryItem", pe), e.component("WMasonryItem", pe);
|
|
984
1038
|
}
|
|
985
1039
|
};
|
|
986
1040
|
export {
|
|
987
|
-
|
|
1041
|
+
Ee as Masonry,
|
|
988
1042
|
pe as MasonryItem,
|
|
989
|
-
|
|
1043
|
+
Ct as default
|
|
990
1044
|
};
|