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