@wyxos/vibe 1.6.6 → 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 +46 -7
- package/lib/apple-touch-icon-114x114.png +0 -0
- package/lib/apple-touch-icon-120x120.png +0 -0
- package/lib/apple-touch-icon-144x144.png +0 -0
- package/lib/apple-touch-icon-152x152.png +0 -0
- package/lib/apple-touch-icon-180x180.png +0 -0
- package/lib/apple-touch-icon-57x57.png +0 -0
- package/lib/apple-touch-icon-60x60.png +0 -0
- package/lib/apple-touch-icon-72x72.png +0 -0
- package/lib/apple-touch-icon-76x76.png +0 -0
- package/lib/favicon-128x128.png +0 -0
- package/lib/favicon-16x16.png +0 -0
- package/lib/favicon-256x256.png +0 -0
- package/lib/favicon-32x32.png +0 -0
- package/lib/favicon-48x48.png +0 -0
- package/lib/favicon-64x64.png +0 -0
- package/lib/favicon.ico +0 -0
- package/lib/index.js +560 -438
- package/lib/logo-dark.svg +36 -0
- package/lib/logo-light.svg +29 -0
- package/lib/logo.svg +32 -0
- package/lib/manifest.json +41 -0
- package/lib/vibe.css +1 -1
- package/package.json +5 -2
- package/src/App.vue +30 -159
- package/src/Masonry.vue +3 -2
- package/src/components/MasonryItem.vue +239 -41
- package/src/main.ts +2 -1
- package/src/pages.json +36401 -32501
- package/src/router/index.ts +20 -0
- package/src/style.css +31 -31
- package/src/views/Examples.vue +20 -0
- package/src/views/Home.vue +169 -0
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
7
|
const o = document.createElement("div");
|
|
8
8
|
o.style.width = "100%", e.appendChild(o);
|
|
9
9
|
const l = e.offsetWidth - o.offsetWidth;
|
|
10
|
-
return document.body.removeChild(e),
|
|
10
|
+
return document.body.removeChild(e), fe = l, l;
|
|
11
11
|
}
|
|
12
12
|
function Ye(e, o, l, s = {}) {
|
|
13
13
|
const {
|
|
14
|
-
gutterX:
|
|
15
|
-
gutterY:
|
|
14
|
+
gutterX: T = 0,
|
|
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,
|
|
@@ -27,93 +27,93 @@ function Ye(e, o, l, s = {}) {
|
|
|
27
27
|
},
|
|
28
28
|
placement: b = "masonry"
|
|
29
29
|
} = s;
|
|
30
|
-
let
|
|
30
|
+
let f = 0, x = 0;
|
|
31
31
|
try {
|
|
32
32
|
if (o && o.nodeType === 1 && typeof window < "u" && window.getComputedStyle) {
|
|
33
|
-
const
|
|
34
|
-
|
|
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
|
|
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, Ae = Je || Ke || Function("return this")(),
|
|
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 o = Qe.call(e,
|
|
101
|
+
var o = Qe.call(e, le), l = e[le];
|
|
102
102
|
try {
|
|
103
|
-
e[
|
|
103
|
+
e[le] = void 0;
|
|
104
104
|
var s = !0;
|
|
105
105
|
} catch {
|
|
106
106
|
}
|
|
107
|
-
var
|
|
108
|
-
return s && (o ? e[
|
|
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]",
|
|
114
|
+
var rt = "[object Null]", ot = "[object Undefined]", Me = ce ? ce.toStringTag : void 0;
|
|
115
115
|
function lt(e) {
|
|
116
|
-
return e == null ? e === void 0 ? ot : rt :
|
|
116
|
+
return e == null ? e === void 0 ? ot : rt : Me && Me in Object(e) ? et(e) : nt(e);
|
|
117
117
|
}
|
|
118
118
|
function st(e) {
|
|
119
119
|
return e != null && typeof e == "object";
|
|
@@ -129,87 +129,87 @@ function ft(e) {
|
|
|
129
129
|
return o;
|
|
130
130
|
}
|
|
131
131
|
var dt = /^\s+/;
|
|
132
|
-
function
|
|
132
|
+
function vt(e) {
|
|
133
133
|
return e && e.slice(0, ft(e) + 1).replace(dt, "");
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function me(e) {
|
|
136
136
|
var o = typeof e;
|
|
137
137
|
return e != null && (o == "object" || o == "function");
|
|
138
138
|
}
|
|
139
|
-
var
|
|
140
|
-
function
|
|
139
|
+
var Ie = NaN, mt = /^[-+]0x[0-9a-f]+$/i, gt = /^0b[01]+$/i, pt = /^0o[0-7]+$/i, yt = parseInt;
|
|
140
|
+
function Pe(e) {
|
|
141
141
|
if (typeof e == "number")
|
|
142
142
|
return e;
|
|
143
143
|
if (ut(e))
|
|
144
|
-
return
|
|
145
|
-
if (
|
|
144
|
+
return Ie;
|
|
145
|
+
if (me(e)) {
|
|
146
146
|
var o = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
147
|
-
e =
|
|
147
|
+
e = me(o) ? o + "" : o;
|
|
148
148
|
}
|
|
149
149
|
if (typeof e != "string")
|
|
150
150
|
return e === 0 ? e : +e;
|
|
151
|
-
e =
|
|
152
|
-
var l =
|
|
153
|
-
return l || pt.test(e) ?
|
|
151
|
+
e = vt(e);
|
|
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
|
|
155
|
+
var de = function() {
|
|
156
156
|
return Ae.Date.now();
|
|
157
|
-
},
|
|
157
|
+
}, ht = "Expected a function", bt = Math.max, xt = Math.min;
|
|
158
158
|
function ke(e, o, l) {
|
|
159
|
-
var s,
|
|
159
|
+
var s, T, m, a, n, y, c = 0, v = !1, b = !1, f = !0;
|
|
160
160
|
if (typeof e != "function")
|
|
161
|
-
throw new TypeError(
|
|
162
|
-
o =
|
|
163
|
-
function x(
|
|
164
|
-
var
|
|
165
|
-
return s =
|
|
161
|
+
throw new TypeError(ht);
|
|
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 (s = arguments,
|
|
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
|
|
205
|
+
function ve(e) {
|
|
206
206
|
const o = window.innerWidth, l = e.sizes;
|
|
207
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
210
|
return e.reduce((l, s) => Math.max(l, s.top + s.columnHeight), 0) + 500;
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Tt(e) {
|
|
213
213
|
return {
|
|
214
214
|
transform: `translate3d(${e.left}px, ${e.top}px, 0)`,
|
|
215
215
|
top: "0px",
|
|
@@ -218,72 +218,72 @@ function Mt(e) {
|
|
|
218
218
|
height: `${e.columnHeight}px`
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function Mt(e, o = 0) {
|
|
222
222
|
return {
|
|
223
|
-
style:
|
|
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
227
|
"data-index": o
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function ge(e, o) {
|
|
231
231
|
if (!e.length || o <= 0)
|
|
232
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),
|
|
234
|
-
for (let a = 0; a < s.length; a++)
|
|
235
|
-
const
|
|
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 =
|
|
238
|
-
n != null && (
|
|
237
|
+
const n = T.get(a.left);
|
|
238
|
+
n != null && (m[n] = Math.max(m[n], a.top + a.columnHeight));
|
|
239
239
|
}
|
|
240
|
-
for (;
|
|
241
|
-
return
|
|
240
|
+
for (; m.length < o; ) m.push(0);
|
|
241
|
+
return m;
|
|
242
242
|
}
|
|
243
243
|
function It(e, o) {
|
|
244
244
|
function l(a, n) {
|
|
245
|
-
const
|
|
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(${
|
|
247
|
+
a.style.opacity = "1", a.style.transform = `translate3d(${y}px, ${c}px, 0) scale(1)`;
|
|
248
248
|
const x = () => {
|
|
249
|
-
|
|
249
|
+
f ? a.style.setProperty("--masonry-opacity-delay", f) : a.style.removeProperty("--masonry-opacity-delay"), a.removeEventListener("transitionend", x), n();
|
|
250
250
|
};
|
|
251
251
|
a.addEventListener("transitionend", x);
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
254
|
function s(a) {
|
|
255
|
-
const n = parseInt(a.dataset.left || "0", 10),
|
|
256
|
-
a.style.opacity = "0", a.style.transform = `translate3d(${n}px, ${
|
|
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
|
-
function
|
|
265
|
-
const
|
|
266
|
-
let b = Number.isFinite(
|
|
264
|
+
function m(a, n) {
|
|
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
|
-
},
|
|
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
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
283
|
onEnter: l,
|
|
284
284
|
onBeforeEnter: s,
|
|
285
|
-
onBeforeLeave:
|
|
286
|
-
onLeave:
|
|
285
|
+
onBeforeLeave: T,
|
|
286
|
+
onLeave: m
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
289
|
function Pt({
|
|
@@ -291,21 +291,21 @@ function Pt({
|
|
|
291
291
|
masonry: o,
|
|
292
292
|
columns: l,
|
|
293
293
|
containerHeight: s,
|
|
294
|
-
isLoading:
|
|
295
|
-
pageSize:
|
|
294
|
+
isLoading: T,
|
|
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 x =
|
|
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,101 +313,220 @@ 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
|
-
class: "absolute inset-0 flex items-center justify-center bg-slate-100"
|
|
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: "relative w-full h-full"
|
|
322
|
+
}, St = ["src"], Nt = ["src"], Ht = {
|
|
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,
|
|
321
330
|
class: "absolute inset-0 flex flex-col items-center justify-center bg-slate-50 text-slate-400 text-sm p-4 text-center"
|
|
322
|
-
},
|
|
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({
|
|
323
332
|
__name: "MasonryItem",
|
|
324
333
|
props: {
|
|
325
334
|
item: {},
|
|
326
|
-
remove: {
|
|
335
|
+
remove: {},
|
|
336
|
+
type: { default: void 0 },
|
|
337
|
+
notFound: { type: Boolean, default: void 0 }
|
|
327
338
|
},
|
|
328
339
|
setup(e) {
|
|
329
|
-
const o = e, l =
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
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;
|
|
348
|
+
});
|
|
349
|
+
function $(i) {
|
|
350
|
+
return new Promise((d, L) => {
|
|
351
|
+
if (!i) {
|
|
352
|
+
L(new Error("No image source provided"));
|
|
334
353
|
return;
|
|
335
354
|
}
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
const
|
|
355
|
+
const I = new Image(), P = Date.now(), h = 300;
|
|
356
|
+
I.onload = () => {
|
|
357
|
+
const S = Date.now() - P, M = Math.max(0, h - S);
|
|
339
358
|
setTimeout(() => {
|
|
340
|
-
l.value = !0, s.value = !1,
|
|
341
|
-
},
|
|
342
|
-
},
|
|
343
|
-
s.value = !0, l.value = !1,
|
|
344
|
-
},
|
|
359
|
+
l.value = !0, s.value = !1, c.value = !1, d();
|
|
360
|
+
}, M);
|
|
361
|
+
}, I.onerror = () => {
|
|
362
|
+
s.value = !0, l.value = !1, c.value = !1, L(new Error("Failed to load image"));
|
|
363
|
+
}, I.src = i;
|
|
345
364
|
});
|
|
346
365
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
h.value = a, l.value = !1, s.value = !1;
|
|
353
|
-
try {
|
|
354
|
-
await v(a);
|
|
355
|
-
} catch {
|
|
366
|
+
function z(i) {
|
|
367
|
+
return new Promise((d, L) => {
|
|
368
|
+
if (!i) {
|
|
369
|
+
L(new Error("No video source provided"));
|
|
370
|
+
return;
|
|
356
371
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
372
|
+
const I = document.createElement("video"), P = Date.now(), h = 300;
|
|
373
|
+
I.preload = "metadata", I.muted = !0, I.onloadedmetadata = () => {
|
|
374
|
+
const S = Date.now() - P, M = Math.max(0, h - S);
|
|
375
|
+
setTimeout(() => {
|
|
376
|
+
m.value = !0, a.value = !1, c.value = !1, d();
|
|
377
|
+
}, M);
|
|
378
|
+
}, I.onerror = () => {
|
|
379
|
+
a.value = !0, m.value = !1, c.value = !1, L(new Error("Failed to load video"));
|
|
380
|
+
}, I.src = i;
|
|
381
|
+
});
|
|
382
|
+
}
|
|
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)
|
|
386
|
+
return;
|
|
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;
|
|
391
|
+
try {
|
|
392
|
+
await z(i);
|
|
393
|
+
} catch {
|
|
394
|
+
}
|
|
395
|
+
} else {
|
|
396
|
+
T.value = i, l.value = !1, s.value = !1;
|
|
366
397
|
try {
|
|
367
|
-
await
|
|
398
|
+
await $(i);
|
|
368
399
|
} catch {
|
|
369
400
|
}
|
|
370
401
|
}
|
|
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(
|
|
418
|
+
() => {
|
|
419
|
+
var i;
|
|
420
|
+
return (i = o.item) == null ? void 0 : i.src;
|
|
421
|
+
},
|
|
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;
|
|
427
|
+
try {
|
|
428
|
+
await z(i);
|
|
429
|
+
} catch {
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
} else if (i !== T.value && (l.value = !1, s.value = !1, T.value = i, y.value)) {
|
|
433
|
+
c.value = !0;
|
|
434
|
+
try {
|
|
435
|
+
await $(i);
|
|
436
|
+
} catch {
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
371
440
|
}
|
|
372
|
-
), (
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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,
|
|
376
449
|
imageLoaded: l.value,
|
|
377
|
-
imageError: s.value
|
|
450
|
+
imageError: s.value,
|
|
451
|
+
videoLoaded: m.value,
|
|
452
|
+
videoError: a.value,
|
|
453
|
+
showNotFound: x.value,
|
|
454
|
+
isLoading: c.value,
|
|
455
|
+
mediaType: f.value
|
|
378
456
|
}, () => [
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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", {
|
|
388
505
|
key: 2,
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
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", {
|
|
396
515
|
key: 3,
|
|
397
|
-
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",
|
|
398
|
-
onClick:
|
|
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"])),
|
|
399
518
|
"aria-label": "Remove item"
|
|
400
|
-
},
|
|
401
|
-
|
|
402
|
-
]))) :
|
|
403
|
-
|
|
404
|
-
|
|
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)
|
|
405
524
|
])
|
|
406
525
|
])
|
|
407
526
|
])
|
|
408
|
-
]));
|
|
527
|
+
], 512));
|
|
409
528
|
}
|
|
410
|
-
}),
|
|
529
|
+
}), zt = /* @__PURE__ */ Le({
|
|
411
530
|
__name: "Masonry",
|
|
412
531
|
props: {
|
|
413
532
|
getNextPage: {
|
|
@@ -508,7 +627,7 @@ const St = { class: "relative w-full h-full group" }, kt = { class: "w-full h-fu
|
|
|
508
627
|
"remove-all:complete"
|
|
509
628
|
],
|
|
510
629
|
setup(e, { expose: o, emit: l }) {
|
|
511
|
-
const s = e,
|
|
630
|
+
const s = e, T = {
|
|
512
631
|
sizes: { base: 1, sm: 2, md: 3, lg: 4, xl: 5, "2xl": 6 },
|
|
513
632
|
gutterX: 10,
|
|
514
633
|
gutterY: 10,
|
|
@@ -517,41 +636,41 @@ const St = { class: "relative w-full h-full group" }, kt = { class: "w-full h-fu
|
|
|
517
636
|
paddingLeft: 0,
|
|
518
637
|
paddingRight: 0,
|
|
519
638
|
placement: "masonry"
|
|
520
|
-
},
|
|
639
|
+
}, m = ee(() => {
|
|
521
640
|
var t;
|
|
522
641
|
return {
|
|
523
|
-
...
|
|
642
|
+
...T,
|
|
524
643
|
...s.layout,
|
|
525
644
|
sizes: {
|
|
526
|
-
...
|
|
645
|
+
...T.sizes,
|
|
527
646
|
...((t = s.layout) == null ? void 0 : t.sizes) || {}
|
|
528
647
|
}
|
|
529
648
|
};
|
|
530
|
-
}), a = l, n =
|
|
649
|
+
}), a = l, n = ee({
|
|
531
650
|
get: () => s.items,
|
|
532
651
|
set: (t) => a("update:items", t)
|
|
533
|
-
}),
|
|
534
|
-
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) {
|
|
535
654
|
return typeof t == "number" && Number.isFinite(t) && t > 0;
|
|
536
655
|
}
|
|
537
|
-
function
|
|
656
|
+
function N(t, r) {
|
|
538
657
|
try {
|
|
539
658
|
if (!Array.isArray(t) || t.length === 0) return;
|
|
540
|
-
const
|
|
541
|
-
if (
|
|
542
|
-
const
|
|
543
|
-
for (const
|
|
544
|
-
const
|
|
545
|
-
|
|
659
|
+
const u = t.filter((p) => !z(p == null ? void 0 : p.width) || !z(p == null ? void 0 : p.height));
|
|
660
|
+
if (u.length === 0) return;
|
|
661
|
+
const g = [];
|
|
662
|
+
for (const p of u) {
|
|
663
|
+
const O = (p == null ? void 0 : p.id) ?? `idx:${t.indexOf(p)}`;
|
|
664
|
+
$.value.has(O) || ($.value.add(O), g.push(O));
|
|
546
665
|
}
|
|
547
|
-
if (
|
|
548
|
-
const
|
|
666
|
+
if (g.length > 0) {
|
|
667
|
+
const p = g.slice(0, 10);
|
|
549
668
|
console.warn(
|
|
550
669
|
"[Masonry] Items missing width/height detected:",
|
|
551
670
|
{
|
|
552
671
|
context: r,
|
|
553
|
-
count:
|
|
554
|
-
sampleIds:
|
|
672
|
+
count: g.length,
|
|
673
|
+
sampleIds: p,
|
|
555
674
|
hint: "Ensure each item has positive width and height. Consider providing fallbacks (e.g., 512x512) at the data layer."
|
|
556
675
|
}
|
|
557
676
|
);
|
|
@@ -559,364 +678,367 @@ const St = { class: "relative w-full h-full group" }, kt = { class: "w-full h-fu
|
|
|
559
678
|
} catch {
|
|
560
679
|
}
|
|
561
680
|
}
|
|
562
|
-
const
|
|
681
|
+
const i = E(0), d = E(0), L = s.virtualBufferPx, I = E(!1), P = E({
|
|
563
682
|
distanceToTrigger: 0,
|
|
564
683
|
isNearTrigger: !1
|
|
565
|
-
}),
|
|
566
|
-
if (!
|
|
567
|
-
const { scrollTop: r, clientHeight:
|
|
568
|
-
|
|
569
|
-
distanceToTrigger: Math.round(
|
|
570
|
-
isNearTrigger:
|
|
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 = {
|
|
688
|
+
distanceToTrigger: Math.round(we),
|
|
689
|
+
isNearTrigger: De
|
|
571
690
|
};
|
|
572
|
-
}, { onEnter:
|
|
573
|
-
function
|
|
574
|
-
if (
|
|
575
|
-
const
|
|
576
|
-
t.style.transition = "none", t.style.opacity = "1", t.style.transform = `translate3d(${
|
|
691
|
+
}, { onEnter: S, onBeforeEnter: M, onBeforeLeave: W, onLeave: H } = It(n, { leaveDurationMs: s.leaveDurationMs });
|
|
692
|
+
function _(t, r) {
|
|
693
|
+
if (I.value) {
|
|
694
|
+
const u = parseInt(t.dataset.left || "0", 10), g = parseInt(t.dataset.top || "0", 10);
|
|
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(() => {
|
|
577
696
|
t.style.transition = "", r();
|
|
578
697
|
});
|
|
579
698
|
} else
|
|
580
|
-
|
|
699
|
+
S(t, r);
|
|
581
700
|
}
|
|
582
|
-
function
|
|
583
|
-
if (
|
|
584
|
-
const r = parseInt(t.dataset.left || "0", 10),
|
|
585
|
-
t.style.transition = "none", t.style.opacity = "1", t.style.transform = `translate3d(${r}px, ${
|
|
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");
|
|
586
705
|
} else
|
|
587
|
-
|
|
706
|
+
M(t);
|
|
588
707
|
}
|
|
589
|
-
function
|
|
590
|
-
|
|
708
|
+
function ae(t) {
|
|
709
|
+
I.value || W(t);
|
|
591
710
|
}
|
|
592
|
-
function
|
|
593
|
-
|
|
711
|
+
function Y(t, r) {
|
|
712
|
+
I.value ? r() : H(t, r);
|
|
594
713
|
}
|
|
595
|
-
const
|
|
596
|
-
const t =
|
|
597
|
-
return !
|
|
598
|
-
const
|
|
599
|
-
return
|
|
714
|
+
const ne = ee(() => {
|
|
715
|
+
const t = i.value - L, r = i.value + d.value + L, u = n.value;
|
|
716
|
+
return !u || u.length === 0 ? [] : u.filter((g) => {
|
|
717
|
+
const p = g.top;
|
|
718
|
+
return g.top + g.columnHeight >= t && p <= r;
|
|
600
719
|
});
|
|
601
|
-
}), { handleScroll:
|
|
602
|
-
container:
|
|
720
|
+
}), { handleScroll: J } = Pt({
|
|
721
|
+
container: c,
|
|
603
722
|
masonry: n,
|
|
604
|
-
columns:
|
|
723
|
+
columns: y,
|
|
605
724
|
containerHeight: x,
|
|
606
|
-
isLoading:
|
|
725
|
+
isLoading: f,
|
|
607
726
|
pageSize: s.pageSize,
|
|
608
|
-
refreshLayout:
|
|
727
|
+
refreshLayout: C,
|
|
609
728
|
setItemsRaw: (t) => {
|
|
610
729
|
n.value = t;
|
|
611
730
|
},
|
|
612
|
-
loadNext:
|
|
731
|
+
loadNext: q,
|
|
613
732
|
loadThresholdPx: s.loadThresholdPx
|
|
614
733
|
});
|
|
615
734
|
o({
|
|
616
|
-
isLoading:
|
|
617
|
-
refreshLayout:
|
|
735
|
+
isLoading: f,
|
|
736
|
+
refreshLayout: C,
|
|
618
737
|
containerHeight: x,
|
|
619
|
-
remove:
|
|
620
|
-
removeMany:
|
|
621
|
-
removeAll:
|
|
622
|
-
loadNext:
|
|
623
|
-
loadPage:
|
|
624
|
-
refreshCurrentPage:
|
|
738
|
+
remove: U,
|
|
739
|
+
removeMany: V,
|
|
740
|
+
removeAll: We,
|
|
741
|
+
loadNext: q,
|
|
742
|
+
loadPage: R,
|
|
743
|
+
refreshCurrentPage: j,
|
|
625
744
|
reset: Oe,
|
|
626
|
-
init:
|
|
627
|
-
paginationHistory:
|
|
745
|
+
init: Be,
|
|
746
|
+
paginationHistory: v,
|
|
628
747
|
cancelLoad: he,
|
|
629
|
-
scrollToTop:
|
|
630
|
-
totalItems:
|
|
748
|
+
scrollToTop: ye,
|
|
749
|
+
totalItems: ee(() => n.value.length)
|
|
631
750
|
});
|
|
632
|
-
function
|
|
751
|
+
function K(t) {
|
|
633
752
|
const r = wt(t);
|
|
634
|
-
let
|
|
635
|
-
if (
|
|
636
|
-
const { scrollTop:
|
|
637
|
-
|
|
753
|
+
let u = 0;
|
|
754
|
+
if (c.value) {
|
|
755
|
+
const { scrollTop: g, clientHeight: p } = c.value;
|
|
756
|
+
u = g + p + 100;
|
|
638
757
|
}
|
|
639
|
-
x.value = Math.max(r,
|
|
640
|
-
}
|
|
641
|
-
function
|
|
642
|
-
if (!
|
|
643
|
-
|
|
644
|
-
const r = t.map((
|
|
645
|
-
...
|
|
646
|
-
originalIndex:
|
|
647
|
-
})),
|
|
648
|
-
|
|
649
|
-
}
|
|
650
|
-
function
|
|
651
|
-
return new Promise((
|
|
652
|
-
const
|
|
653
|
-
r(
|
|
654
|
-
const
|
|
655
|
-
if (
|
|
656
|
-
clearInterval(
|
|
758
|
+
x.value = Math.max(r, u);
|
|
759
|
+
}
|
|
760
|
+
function C(t) {
|
|
761
|
+
if (!c.value) return;
|
|
762
|
+
N(t, "refreshLayout");
|
|
763
|
+
const r = t.map((g, p) => ({
|
|
764
|
+
...g,
|
|
765
|
+
originalIndex: g.originalIndex ?? p
|
|
766
|
+
})), u = Ye(r, c.value, y.value, m.value);
|
|
767
|
+
K(u), n.value = u;
|
|
768
|
+
}
|
|
769
|
+
function re(t, r) {
|
|
770
|
+
return new Promise((u) => {
|
|
771
|
+
const g = Math.max(0, t | 0), p = Date.now();
|
|
772
|
+
r(g, g);
|
|
773
|
+
const O = setInterval(() => {
|
|
774
|
+
if (F.value) {
|
|
775
|
+
clearInterval(O), u();
|
|
657
776
|
return;
|
|
658
777
|
}
|
|
659
|
-
const
|
|
660
|
-
r(
|
|
778
|
+
const G = Date.now() - p, Q = Math.max(0, g - G);
|
|
779
|
+
r(Q, g), Q <= 0 && (clearInterval(O), u());
|
|
661
780
|
}, 100);
|
|
662
781
|
});
|
|
663
782
|
}
|
|
664
|
-
async function
|
|
783
|
+
async function w(t) {
|
|
665
784
|
try {
|
|
666
|
-
const r = await
|
|
667
|
-
return
|
|
785
|
+
const r = await A(() => s.getNextPage(t));
|
|
786
|
+
return C([...n.value, ...r.items]), r;
|
|
668
787
|
} catch (r) {
|
|
669
788
|
throw console.error("Error in getContent:", r), r;
|
|
670
789
|
}
|
|
671
790
|
}
|
|
672
|
-
async function
|
|
791
|
+
async function A(t) {
|
|
673
792
|
let r = 0;
|
|
674
|
-
const
|
|
675
|
-
let
|
|
793
|
+
const u = s.retryMaxAttempts;
|
|
794
|
+
let g = s.retryInitialDelayMs;
|
|
676
795
|
for (; ; )
|
|
677
796
|
try {
|
|
678
|
-
const
|
|
679
|
-
return r > 0 && a("retry:stop", { attempt: r, success: !0 }),
|
|
680
|
-
} catch (
|
|
681
|
-
if (r++, r >
|
|
682
|
-
throw a("retry:stop", { attempt: r - 1, success: !1 }),
|
|
683
|
-
a("retry:start", { attempt: r, max:
|
|
684
|
-
a("retry:tick", { attempt: r, remainingMs:
|
|
685
|
-
}),
|
|
797
|
+
const p = await t();
|
|
798
|
+
return r > 0 && a("retry:stop", { attempt: r, success: !0 }), p;
|
|
799
|
+
} catch (p) {
|
|
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;
|
|
686
805
|
}
|
|
687
806
|
}
|
|
688
|
-
async function
|
|
689
|
-
if (!
|
|
690
|
-
|
|
807
|
+
async function R(t) {
|
|
808
|
+
if (!f.value) {
|
|
809
|
+
F.value = !1, f.value = !0;
|
|
691
810
|
try {
|
|
692
811
|
const r = n.value.length;
|
|
693
|
-
if (
|
|
694
|
-
const
|
|
695
|
-
return
|
|
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);
|
|
696
815
|
} catch (r) {
|
|
697
816
|
throw console.error("Error loading page:", r), r;
|
|
698
817
|
} finally {
|
|
699
|
-
|
|
818
|
+
f.value = !1;
|
|
700
819
|
}
|
|
701
820
|
}
|
|
702
821
|
}
|
|
703
|
-
async function
|
|
704
|
-
if (!
|
|
705
|
-
|
|
822
|
+
async function q() {
|
|
823
|
+
if (!f.value) {
|
|
824
|
+
F.value = !1, f.value = !0;
|
|
706
825
|
try {
|
|
707
826
|
const t = n.value.length;
|
|
708
|
-
if (
|
|
709
|
-
const r =
|
|
710
|
-
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);
|
|
711
830
|
} catch (t) {
|
|
712
831
|
throw console.error("Error loading next page:", t), t;
|
|
713
832
|
} finally {
|
|
714
|
-
|
|
833
|
+
f.value = !1;
|
|
715
834
|
}
|
|
716
835
|
}
|
|
717
836
|
}
|
|
718
|
-
async function
|
|
719
|
-
if (console.log("[Masonry] refreshCurrentPage called, isLoading:",
|
|
720
|
-
|
|
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;
|
|
721
840
|
try {
|
|
722
841
|
const t = b.value;
|
|
723
842
|
if (console.log("[Masonry] pageToRefresh:", t), t == null) {
|
|
724
|
-
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);
|
|
725
844
|
return;
|
|
726
845
|
}
|
|
727
|
-
n.value = [], x.value = 0,
|
|
728
|
-
const r = await
|
|
729
|
-
if (
|
|
730
|
-
b.value = t,
|
|
731
|
-
const
|
|
732
|
-
return await
|
|
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);
|
|
850
|
+
const u = n.value.length;
|
|
851
|
+
return await oe(u), r;
|
|
733
852
|
} catch (t) {
|
|
734
853
|
throw console.error("[Masonry] Error refreshing current page:", t), t;
|
|
735
854
|
} finally {
|
|
736
|
-
|
|
855
|
+
f.value = !1;
|
|
737
856
|
}
|
|
738
857
|
}
|
|
739
858
|
}
|
|
740
|
-
async function
|
|
741
|
-
const r = n.value.filter((
|
|
742
|
-
if (n.value = r, await
|
|
859
|
+
async function U(t) {
|
|
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) {
|
|
743
862
|
if (s.autoRefreshOnEmpty)
|
|
744
|
-
console.log("[Masonry] All items removed, calling refreshCurrentPage"), await
|
|
863
|
+
console.log("[Masonry] All items removed, calling refreshCurrentPage"), await j();
|
|
745
864
|
else {
|
|
746
865
|
console.log("[Masonry] All items removed, calling loadNext and forcing backfill");
|
|
747
866
|
try {
|
|
748
|
-
await
|
|
867
|
+
await q(), await oe(0, !0);
|
|
749
868
|
} catch {
|
|
750
869
|
}
|
|
751
870
|
}
|
|
752
871
|
return;
|
|
753
872
|
}
|
|
754
|
-
await new Promise((
|
|
755
|
-
|
|
873
|
+
await new Promise((u) => requestAnimationFrame(() => u())), requestAnimationFrame(() => {
|
|
874
|
+
C(r);
|
|
756
875
|
});
|
|
757
876
|
}
|
|
758
|
-
async function
|
|
877
|
+
async function V(t) {
|
|
759
878
|
if (!t || t.length === 0) return;
|
|
760
|
-
const r = new Set(t.map((
|
|
761
|
-
if (n.value =
|
|
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) {
|
|
762
881
|
if (s.autoRefreshOnEmpty)
|
|
763
|
-
await
|
|
882
|
+
await j();
|
|
764
883
|
else
|
|
765
884
|
try {
|
|
766
|
-
await
|
|
885
|
+
await q(), await oe(0, !0);
|
|
767
886
|
} catch {
|
|
768
887
|
}
|
|
769
888
|
return;
|
|
770
889
|
}
|
|
771
|
-
await new Promise((
|
|
772
|
-
|
|
890
|
+
await new Promise((g) => requestAnimationFrame(() => g())), requestAnimationFrame(() => {
|
|
891
|
+
C(u);
|
|
773
892
|
});
|
|
774
893
|
}
|
|
775
|
-
function
|
|
776
|
-
|
|
894
|
+
function ye(t) {
|
|
895
|
+
c.value && c.value.scrollTo({
|
|
777
896
|
top: 0,
|
|
778
897
|
behavior: (t == null ? void 0 : t.behavior) ?? "smooth",
|
|
779
898
|
...t
|
|
780
899
|
});
|
|
781
900
|
}
|
|
782
|
-
async function
|
|
783
|
-
|
|
901
|
+
async function We() {
|
|
902
|
+
ye({ behavior: "smooth" }), n.value = [], x.value = 0, await Z(), a("remove-all:complete");
|
|
784
903
|
}
|
|
785
|
-
function
|
|
786
|
-
|
|
904
|
+
function je() {
|
|
905
|
+
y.value = ve(m.value), C(n.value), c.value && (i.value = c.value.scrollTop, d.value = c.value.clientHeight);
|
|
787
906
|
}
|
|
788
|
-
let
|
|
789
|
-
const
|
|
790
|
-
async function
|
|
791
|
-
if (!r && !s.backfillEnabled ||
|
|
792
|
-
const
|
|
793
|
-
if (!(!s.pageSize || s.pageSize <= 0 ||
|
|
794
|
-
|
|
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;
|
|
795
914
|
try {
|
|
796
|
-
let
|
|
797
|
-
for (a("backfill:start", { target:
|
|
915
|
+
let p = 0;
|
|
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) => {
|
|
798
917
|
a("backfill:tick", {
|
|
799
918
|
fetched: n.value.length,
|
|
800
|
-
target:
|
|
801
|
-
calls:
|
|
802
|
-
remainingMs:
|
|
803
|
-
totalMs:
|
|
919
|
+
target: u,
|
|
920
|
+
calls: p,
|
|
921
|
+
remainingMs: G,
|
|
922
|
+
totalMs: Q
|
|
804
923
|
});
|
|
805
|
-
}), !
|
|
806
|
-
const
|
|
924
|
+
}), !F.value); ) {
|
|
925
|
+
const O = v.value[v.value.length - 1];
|
|
807
926
|
try {
|
|
808
|
-
|
|
809
|
-
const
|
|
810
|
-
if (
|
|
811
|
-
|
|
927
|
+
f.value = !0;
|
|
928
|
+
const G = await w(O);
|
|
929
|
+
if (F.value) break;
|
|
930
|
+
v.value.push(G.nextPage);
|
|
812
931
|
} finally {
|
|
813
|
-
|
|
932
|
+
f.value = !1;
|
|
814
933
|
}
|
|
815
|
-
|
|
934
|
+
p++;
|
|
816
935
|
}
|
|
817
|
-
a("backfill:stop", { fetched: n.value.length, calls:
|
|
936
|
+
a("backfill:stop", { fetched: n.value.length, calls: p });
|
|
818
937
|
} finally {
|
|
819
|
-
|
|
938
|
+
ue = !1;
|
|
820
939
|
}
|
|
821
940
|
}
|
|
822
941
|
}
|
|
823
942
|
function he() {
|
|
824
|
-
|
|
943
|
+
F.value = !0, f.value = !1, ue = !1;
|
|
825
944
|
}
|
|
826
945
|
function Oe() {
|
|
827
|
-
he(),
|
|
946
|
+
he(), F.value = !1, c.value && c.value.scrollTo({
|
|
828
947
|
top: 0,
|
|
829
948
|
behavior: "smooth"
|
|
830
|
-
}), n.value = [], x.value = 0, b.value = s.loadAtPage,
|
|
949
|
+
}), n.value = [], x.value = 0, b.value = s.loadAtPage, v.value = [s.loadAtPage], P.value = {
|
|
831
950
|
distanceToTrigger: 0,
|
|
832
951
|
isNearTrigger: !1
|
|
833
952
|
};
|
|
834
953
|
}
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
const t =
|
|
838
|
-
|
|
839
|
-
}, 200),
|
|
840
|
-
function
|
|
841
|
-
b.value = r,
|
|
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();
|
|
842
961
|
}
|
|
843
|
-
return
|
|
844
|
-
|
|
962
|
+
return He(
|
|
963
|
+
m,
|
|
845
964
|
() => {
|
|
846
|
-
|
|
965
|
+
c.value && (y.value = ve(m.value), C(n.value));
|
|
847
966
|
},
|
|
848
967
|
{ deep: !0 }
|
|
849
|
-
),
|
|
968
|
+
), Se(async () => {
|
|
850
969
|
var t;
|
|
851
970
|
try {
|
|
852
|
-
|
|
971
|
+
y.value = ve(m.value), c.value && (i.value = c.value.scrollTop, d.value = c.value.clientHeight);
|
|
853
972
|
const r = s.loadAtPage;
|
|
854
|
-
|
|
973
|
+
v.value = [r], s.skipInitialLoad || await R(v.value[0]), h();
|
|
855
974
|
} catch (r) {
|
|
856
|
-
console.error("Error during component initialization:", r),
|
|
975
|
+
console.error("Error during component initialization:", r), f.value = !1;
|
|
857
976
|
}
|
|
858
|
-
(t =
|
|
859
|
-
}),
|
|
977
|
+
(t = c.value) == null || t.addEventListener("scroll", be, { passive: !0 }), window.addEventListener("resize", xe);
|
|
978
|
+
}), Ne(() => {
|
|
860
979
|
var t;
|
|
861
|
-
(t =
|
|
862
|
-
}), (t, r) => (
|
|
863
|
-
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 }]),
|
|
864
983
|
ref_key: "container",
|
|
865
|
-
ref:
|
|
984
|
+
ref: c
|
|
866
985
|
}, [
|
|
867
|
-
|
|
986
|
+
k("div", {
|
|
868
987
|
class: "relative",
|
|
869
|
-
style:
|
|
988
|
+
style: Re({ height: `${x.value}px`, "--masonry-duration": `${e.transitionDurationMs}ms`, "--masonry-leave-duration": `${e.leaveDurationMs}ms`, "--masonry-ease": e.transitionEasing })
|
|
870
989
|
}, [
|
|
871
|
-
|
|
990
|
+
Te(_e, {
|
|
872
991
|
name: "masonry",
|
|
873
992
|
css: !1,
|
|
874
|
-
onEnter:
|
|
875
|
-
onBeforeEnter:
|
|
876
|
-
onLeave:
|
|
877
|
-
onBeforeLeave:
|
|
993
|
+
onEnter: _,
|
|
994
|
+
onBeforeEnter: te,
|
|
995
|
+
onLeave: Y,
|
|
996
|
+
onBeforeLeave: ae
|
|
878
997
|
}, {
|
|
879
|
-
default:
|
|
880
|
-
(
|
|
881
|
-
key: `${
|
|
998
|
+
default: Ce(() => [
|
|
999
|
+
(D(!0), B(qe, null, Ve(ne.value, (u, g) => (D(), B("div", Ge({
|
|
1000
|
+
key: `${u.page}-${u.id}`,
|
|
882
1001
|
class: "absolute masonry-item",
|
|
883
1002
|
ref_for: !0
|
|
884
|
-
}, Ue(
|
|
885
|
-
style: { paddingTop: `${
|
|
1003
|
+
}, Ue(Mt)(u, g), {
|
|
1004
|
+
style: { paddingTop: `${m.value.header}px`, paddingBottom: `${m.value.footer}px` }
|
|
886
1005
|
}), [
|
|
887
|
-
$e(t.$slots, "
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
1006
|
+
$e(t.$slots, "default", {
|
|
1007
|
+
item: u,
|
|
1008
|
+
remove: U
|
|
1009
|
+
}, () => [
|
|
1010
|
+
Te(pe, {
|
|
1011
|
+
item: u,
|
|
1012
|
+
remove: U
|
|
891
1013
|
}, null, 8, ["item"])
|
|
892
1014
|
], !0)
|
|
893
1015
|
], 16))), 128))
|
|
894
1016
|
]),
|
|
895
1017
|
_: 3
|
|
896
1018
|
}),
|
|
897
|
-
x.value > 0 ? (
|
|
1019
|
+
x.value > 0 ? (D(), B("div", {
|
|
898
1020
|
key: 0,
|
|
899
|
-
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 }])
|
|
900
1022
|
}, [
|
|
901
|
-
|
|
902
|
-
r[0] || (r[0] =
|
|
903
|
-
|
|
904
|
-
], 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)
|
|
905
1027
|
], 4)
|
|
906
1028
|
], 2));
|
|
907
1029
|
}
|
|
908
|
-
}),
|
|
1030
|
+
}), Rt = (e, o) => {
|
|
909
1031
|
const l = e.__vccOpts || e;
|
|
910
|
-
for (const [s,
|
|
911
|
-
l[s] =
|
|
1032
|
+
for (const [s, T] of o)
|
|
1033
|
+
l[s] = T;
|
|
912
1034
|
return l;
|
|
913
|
-
}, Ee = /* @__PURE__ */
|
|
1035
|
+
}, Ee = /* @__PURE__ */ Rt(zt, [["__scopeId", "data-v-110c3294"]]), Ct = {
|
|
914
1036
|
install(e) {
|
|
915
|
-
e.component("WyxosMasonry", Ee), e.component("WMasonry", Ee), e.component("WyxosMasonryItem",
|
|
1037
|
+
e.component("WyxosMasonry", Ee), e.component("WMasonry", Ee), e.component("WyxosMasonryItem", pe), e.component("WMasonryItem", pe);
|
|
916
1038
|
}
|
|
917
1039
|
};
|
|
918
1040
|
export {
|
|
919
1041
|
Ee as Masonry,
|
|
920
|
-
|
|
921
|
-
|
|
1042
|
+
pe as MasonryItem,
|
|
1043
|
+
Ct as default
|
|
922
1044
|
};
|