@linktr.ee/messaging-react 1.28.0-rc-1776231821 → 1.28.0-rc-1776233688
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/dist/{Creator-BFpHsh2u.js → Creator-BJ6UBWsR.js} +103 -94
- package/dist/Creator-BJ6UBWsR.js.map +1 -0
- package/dist/index.js +640 -636
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LockedAttachment/components/Creator.tsx +18 -2
- package/src/components/MessagingShell/index.tsx +4 -0
- package/dist/Creator-BFpHsh2u.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as f, jsx as e, Fragment as
|
|
2
|
-
import { XIcon as F, CheckCircleIcon as R,
|
|
1
|
+
import { jsxs as f, jsx as e, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import { XIcon as F, CheckCircleIcon as O, LockOpenIcon as R, LockIcon as S, PauseIcon as X, PlayIcon as D, EyeSlashIcon as j, EyeIcon as q } from "@phosphor-icons/react";
|
|
3
3
|
import N from "classnames";
|
|
4
|
-
import { useState as C, useRef as
|
|
5
|
-
import { g as
|
|
6
|
-
const
|
|
4
|
+
import { useState as C, useRef as I, useEffect as k, useCallback as P } from "react";
|
|
5
|
+
import { g as B, r as E, M as K } from "./MediaPlayer-DXz4IBLx.js";
|
|
6
|
+
const M = (u) => {
|
|
7
7
|
const { onClose: n } = u;
|
|
8
8
|
return /* @__PURE__ */ e(
|
|
9
9
|
"button",
|
|
@@ -12,22 +12,22 @@ const L = (u) => {
|
|
|
12
12
|
onClick: n,
|
|
13
13
|
className: "absolute left-3 top-3 z-40 flex size-8 items-center justify-center rounded-full bg-black/60 text-white",
|
|
14
14
|
"aria-label": "Close preview",
|
|
15
|
-
children: /* @__PURE__ */ e(
|
|
15
|
+
children: /* @__PURE__ */ e(q, { className: "size-4", weight: "fill" })
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
}, T = (u) => {
|
|
19
|
-
const { thumbnail: n, mimeType: s, overlayIcon:
|
|
19
|
+
const { thumbnail: n, mimeType: s, overlayIcon: i, darkOverlay: l, onClick: o } = u;
|
|
20
20
|
return /* @__PURE__ */ f(
|
|
21
21
|
"button",
|
|
22
22
|
{
|
|
23
23
|
type: "button",
|
|
24
|
-
disabled: !
|
|
24
|
+
disabled: !o,
|
|
25
25
|
className: N(
|
|
26
26
|
"relative aspect-video block w-full overflow-hidden border-0 bg-black/5 p-0 text-left appearance-none",
|
|
27
|
-
{ "cursor-pointer": !!
|
|
27
|
+
{ "cursor-pointer": !!o, "cursor-default": !o }
|
|
28
28
|
),
|
|
29
|
-
onClick:
|
|
30
|
-
"aria-label":
|
|
29
|
+
onClick: o,
|
|
30
|
+
"aria-label": i ? "Toggle preview" : void 0,
|
|
31
31
|
children: [
|
|
32
32
|
n ? /* @__PURE__ */ e(
|
|
33
33
|
"img",
|
|
@@ -36,69 +36,70 @@ const L = (u) => {
|
|
|
36
36
|
alt: "",
|
|
37
37
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
38
38
|
}
|
|
39
|
-
) : /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
39
|
+
) : /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: E(s, {
|
|
40
40
|
className: "size-12 text-black/20",
|
|
41
41
|
weight: "regular"
|
|
42
42
|
}) }),
|
|
43
|
-
|
|
43
|
+
l && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0 bg-black/30" }),
|
|
44
|
+
i && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute left-3 top-3 flex size-8 items-center justify-center rounded-full bg-black/60 text-white", children: /* @__PURE__ */ e(i, { className: "size-4", weight: "fill" }) })
|
|
44
45
|
]
|
|
45
46
|
}
|
|
46
47
|
);
|
|
47
|
-
},
|
|
48
|
-
const { source: n, thumbnail: s, mimeType:
|
|
49
|
-
|
|
50
|
-
const t =
|
|
51
|
-
t && (l ? t.play().catch(() =>
|
|
52
|
-
}, [l]),
|
|
48
|
+
}, U = (u) => {
|
|
49
|
+
const { source: n, thumbnail: s, mimeType: i } = u, [l, o] = C(!1), [r, d] = C(0), [b, w] = C(!1), p = I(null), x = I(null), m = I(null);
|
|
50
|
+
k(() => {
|
|
51
|
+
const t = p.current;
|
|
52
|
+
t && (l ? t.play().catch(() => o(!1)) : t.pause());
|
|
53
|
+
}, [l]), k(() => {
|
|
53
54
|
if (!l) {
|
|
54
55
|
m.current !== null && cancelAnimationFrame(m.current);
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
58
|
const t = () => {
|
|
58
|
-
const a =
|
|
59
|
-
a && a.duration && !
|
|
59
|
+
const a = p.current;
|
|
60
|
+
a && a.duration && !b && d(a.currentTime / a.duration), m.current = requestAnimationFrame(t);
|
|
60
61
|
};
|
|
61
62
|
return m.current = requestAnimationFrame(t), () => {
|
|
62
63
|
m.current !== null && cancelAnimationFrame(m.current);
|
|
63
64
|
};
|
|
64
|
-
}, [l,
|
|
65
|
-
|
|
65
|
+
}, [l, b]), k(() => {
|
|
66
|
+
o(!1), d(0);
|
|
66
67
|
}, [n]);
|
|
67
|
-
const
|
|
68
|
+
const h = P(
|
|
68
69
|
(t) => {
|
|
69
|
-
var
|
|
70
|
-
const a =
|
|
70
|
+
var z, A;
|
|
71
|
+
const a = x.current;
|
|
71
72
|
if (!a) return 0;
|
|
72
|
-
const
|
|
73
|
-
return Math.max(0, Math.min(1, (
|
|
73
|
+
const g = "touches" in t ? ((z = t.touches[0]) == null ? void 0 : z.clientX) ?? ((A = t.changedTouches[0]) == null ? void 0 : A.clientX) ?? 0 : t.clientX, y = a.getBoundingClientRect();
|
|
74
|
+
return Math.max(0, Math.min(1, (g - y.left) / y.width));
|
|
74
75
|
},
|
|
75
76
|
[]
|
|
76
|
-
), c =
|
|
77
|
-
const a =
|
|
77
|
+
), c = P((t) => {
|
|
78
|
+
const a = p.current;
|
|
78
79
|
a && a.duration && (a.currentTime = t * a.duration);
|
|
79
80
|
}, []);
|
|
80
|
-
|
|
81
|
-
if (!
|
|
82
|
-
const t = (
|
|
83
|
-
const y =
|
|
81
|
+
k(() => {
|
|
82
|
+
if (!b) return;
|
|
83
|
+
const t = (g) => {
|
|
84
|
+
const y = h(g);
|
|
84
85
|
d(y), c(y);
|
|
85
|
-
}, a = (
|
|
86
|
-
|
|
86
|
+
}, a = (g) => {
|
|
87
|
+
w(!1), c(h(g));
|
|
87
88
|
};
|
|
88
89
|
return window.addEventListener("mousemove", t), window.addEventListener("mouseup", a), window.addEventListener("touchmove", t, { passive: !0 }), window.addEventListener("touchend", a), () => {
|
|
89
90
|
window.removeEventListener("mousemove", t), window.removeEventListener("mouseup", a), window.removeEventListener("touchmove", t), window.removeEventListener("touchend", a);
|
|
90
91
|
};
|
|
91
|
-
}, [
|
|
92
|
-
const v =
|
|
92
|
+
}, [b, h, c]);
|
|
93
|
+
const v = P(() => o((t) => !t), []);
|
|
93
94
|
return /* @__PURE__ */ f("div", { className: "relative", children: [
|
|
94
95
|
n && /* @__PURE__ */ e(
|
|
95
96
|
"audio",
|
|
96
97
|
{
|
|
97
|
-
ref:
|
|
98
|
+
ref: p,
|
|
98
99
|
src: n,
|
|
99
100
|
loop: !0,
|
|
100
101
|
onEnded: () => {
|
|
101
|
-
|
|
102
|
+
o(!1), d(0);
|
|
102
103
|
},
|
|
103
104
|
children: /* @__PURE__ */ e("track", { kind: "captions" })
|
|
104
105
|
}
|
|
@@ -107,50 +108,50 @@ const L = (u) => {
|
|
|
107
108
|
T,
|
|
108
109
|
{
|
|
109
110
|
thumbnail: s,
|
|
110
|
-
mimeType:
|
|
111
|
-
overlayIcon: n ? l ?
|
|
111
|
+
mimeType: i,
|
|
112
|
+
overlayIcon: n ? l ? X : D : void 0,
|
|
112
113
|
onClick: n ? v : void 0
|
|
113
114
|
}
|
|
114
115
|
),
|
|
115
116
|
n && /* @__PURE__ */ e("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ e(
|
|
116
117
|
"div",
|
|
117
118
|
{
|
|
118
|
-
ref:
|
|
119
|
+
ref: x,
|
|
119
120
|
role: "slider",
|
|
120
121
|
"aria-label": "Playback position",
|
|
121
|
-
"aria-valuenow": Math.round(
|
|
122
|
+
"aria-valuenow": Math.round(r * 100),
|
|
122
123
|
"aria-valuemin": 0,
|
|
123
124
|
"aria-valuemax": 100,
|
|
124
125
|
tabIndex: 0,
|
|
125
126
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
126
127
|
onMouseDown: (t) => {
|
|
127
|
-
t.stopPropagation(),
|
|
128
|
-
const a =
|
|
128
|
+
t.stopPropagation(), w(!0);
|
|
129
|
+
const a = h(t);
|
|
129
130
|
d(a), c(a);
|
|
130
131
|
},
|
|
131
132
|
onTouchStart: (t) => {
|
|
132
|
-
t.stopPropagation(),
|
|
133
|
-
const a =
|
|
133
|
+
t.stopPropagation(), w(!0);
|
|
134
|
+
const a = h(t);
|
|
134
135
|
d(a), c(a);
|
|
135
136
|
},
|
|
136
137
|
onClick: (t) => t.stopPropagation(),
|
|
137
138
|
onKeyDown: (t) => {
|
|
138
|
-
t.key === "ArrowRight" && c(Math.min(1,
|
|
139
|
+
t.key === "ArrowRight" && c(Math.min(1, r + 0.05)), t.key === "ArrowLeft" && c(Math.max(0, r - 0.05));
|
|
139
140
|
},
|
|
140
141
|
children: /* @__PURE__ */ e("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ e(
|
|
141
142
|
"div",
|
|
142
143
|
{
|
|
143
144
|
className: "h-full rounded-full bg-white",
|
|
144
|
-
style: { width: `${Math.round(
|
|
145
|
+
style: { width: `${Math.round(r * 100)}%` }
|
|
145
146
|
}
|
|
146
147
|
) })
|
|
147
148
|
}
|
|
148
149
|
) })
|
|
149
150
|
] });
|
|
150
|
-
},
|
|
151
|
-
const { source: n, thumbnail: s, mimeType:
|
|
152
|
-
return
|
|
153
|
-
|
|
151
|
+
}, V = (u) => {
|
|
152
|
+
const { source: n, thumbnail: s, mimeType: i } = u, [l, o] = C(!1), r = () => o(!1);
|
|
153
|
+
return k(() => {
|
|
154
|
+
o(!1);
|
|
154
155
|
}, [n]), n ? /* @__PURE__ */ f(
|
|
155
156
|
"div",
|
|
156
157
|
{
|
|
@@ -159,16 +160,16 @@ const L = (u) => {
|
|
|
159
160
|
}),
|
|
160
161
|
children: [
|
|
161
162
|
/* @__PURE__ */ e(
|
|
162
|
-
|
|
163
|
+
K,
|
|
163
164
|
{
|
|
164
165
|
source: n,
|
|
165
|
-
mimeType:
|
|
166
|
+
mimeType: i,
|
|
166
167
|
poster: s,
|
|
167
168
|
playing: l,
|
|
168
169
|
loop: !0,
|
|
169
170
|
controls: !1,
|
|
170
171
|
showProgress: !0,
|
|
171
|
-
onContainerClick:
|
|
172
|
+
onContainerClick: r,
|
|
172
173
|
muted: !0
|
|
173
174
|
}
|
|
174
175
|
),
|
|
@@ -177,7 +178,7 @@ const L = (u) => {
|
|
|
177
178
|
{
|
|
178
179
|
type: "button",
|
|
179
180
|
className: "absolute inset-0 block cursor-pointer border-0 p-0 text-left appearance-none",
|
|
180
|
-
onClick: () =>
|
|
181
|
+
onClick: () => o(!0),
|
|
181
182
|
"aria-label": "Expand video preview",
|
|
182
183
|
children: [
|
|
183
184
|
s ? /* @__PURE__ */ e(
|
|
@@ -187,23 +188,23 @@ const L = (u) => {
|
|
|
187
188
|
alt: "",
|
|
188
189
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
189
190
|
}
|
|
190
|
-
) : /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
191
|
+
) : /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: E(i, {
|
|
191
192
|
className: "size-12 text-black/20",
|
|
192
193
|
weight: "regular"
|
|
193
194
|
}) }),
|
|
194
|
-
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute left-3 top-3 flex size-8 items-center justify-center rounded-full bg-black/60 text-white", children: /* @__PURE__ */ e(
|
|
195
|
+
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute left-3 top-3 flex size-8 items-center justify-center rounded-full bg-black/60 text-white", children: /* @__PURE__ */ e(j, { className: "size-4", weight: "fill" }) })
|
|
195
196
|
]
|
|
196
197
|
}
|
|
197
198
|
),
|
|
198
|
-
l && /* @__PURE__ */ e(
|
|
199
|
+
l && /* @__PURE__ */ e(M, { onClose: r })
|
|
199
200
|
]
|
|
200
201
|
}
|
|
201
|
-
) : /* @__PURE__ */ e(T, { thumbnail: s, mimeType:
|
|
202
|
-
},
|
|
203
|
-
const { source: n, thumbnail: s, mimeType:
|
|
204
|
-
return
|
|
205
|
-
|
|
206
|
-
}, [n]),
|
|
202
|
+
) : /* @__PURE__ */ e(T, { thumbnail: s, mimeType: i });
|
|
203
|
+
}, $ = (u) => {
|
|
204
|
+
const { source: n, thumbnail: s, mimeType: i, title: l } = u, [o, r] = C(!1), d = () => r(!1);
|
|
205
|
+
return k(() => {
|
|
206
|
+
r(!1);
|
|
207
|
+
}, [n]), o && n ? /* @__PURE__ */ f("div", { className: "relative", children: [
|
|
207
208
|
/* @__PURE__ */ e(
|
|
208
209
|
"button",
|
|
209
210
|
{
|
|
@@ -214,45 +215,53 @@ const L = (u) => {
|
|
|
214
215
|
children: /* @__PURE__ */ e("img", { src: n, alt: l ?? "", className: "block w-full" })
|
|
215
216
|
}
|
|
216
217
|
),
|
|
217
|
-
/* @__PURE__ */ e(
|
|
218
|
+
/* @__PURE__ */ e(M, { onClose: d })
|
|
218
219
|
] }) : /* @__PURE__ */ e(
|
|
219
220
|
T,
|
|
220
221
|
{
|
|
221
222
|
thumbnail: s,
|
|
222
|
-
mimeType:
|
|
223
|
-
overlayIcon: n ?
|
|
224
|
-
onClick: n ? () =>
|
|
223
|
+
mimeType: i,
|
|
224
|
+
overlayIcon: n ? j : void 0,
|
|
225
|
+
onClick: n ? () => r(!0) : void 0
|
|
225
226
|
}
|
|
226
227
|
);
|
|
227
|
-
},
|
|
228
|
+
}, Y = (u) => {
|
|
228
229
|
const {
|
|
229
230
|
title: n,
|
|
230
231
|
mimeType: s = "application/octet-stream",
|
|
231
|
-
thumbnail:
|
|
232
|
+
thumbnail: i,
|
|
232
233
|
source: l,
|
|
233
|
-
detail:
|
|
234
|
-
amountText:
|
|
234
|
+
detail: o,
|
|
235
|
+
amountText: r,
|
|
235
236
|
placeholderTitle: d = "Attachment title",
|
|
236
|
-
placeholderAmountText:
|
|
237
|
-
paymentStatus:
|
|
238
|
-
onDismiss:
|
|
239
|
-
isPreview:
|
|
240
|
-
} = u, m =
|
|
237
|
+
placeholderAmountText: b,
|
|
238
|
+
paymentStatus: w,
|
|
239
|
+
onDismiss: p,
|
|
240
|
+
isPreview: x = !1
|
|
241
|
+
} = u, m = B(s), h = r ?? b, c = !r && !!b;
|
|
241
242
|
let v;
|
|
242
|
-
return
|
|
243
|
-
|
|
243
|
+
return x && m === "audio" ? v = /* @__PURE__ */ e(U, { source: l, thumbnail: i, mimeType: s }) : x && m === "video" ? v = /* @__PURE__ */ e(V, { source: l, thumbnail: i, mimeType: s }) : x && m === "image" ? v = /* @__PURE__ */ e(
|
|
244
|
+
$,
|
|
244
245
|
{
|
|
245
246
|
source: l,
|
|
246
|
-
thumbnail:
|
|
247
|
+
thumbnail: i,
|
|
247
248
|
mimeType: s,
|
|
248
249
|
title: n
|
|
249
250
|
}
|
|
250
|
-
) : v = /* @__PURE__ */ e(
|
|
251
|
-
|
|
251
|
+
) : v = /* @__PURE__ */ e(
|
|
252
|
+
T,
|
|
253
|
+
{
|
|
254
|
+
thumbnail: i,
|
|
255
|
+
mimeType: s,
|
|
256
|
+
overlayIcon: p ? void 0 : w === "paid" ? R : S,
|
|
257
|
+
darkOverlay: !0
|
|
258
|
+
}
|
|
259
|
+
), /* @__PURE__ */ f("div", { className: "relative w-[280px] select-none overflow-hidden rounded-3xl bg-white shadow-card", children: [
|
|
260
|
+
p && /* @__PURE__ */ e(
|
|
252
261
|
"button",
|
|
253
262
|
{
|
|
254
263
|
type: "button",
|
|
255
|
-
onClick:
|
|
264
|
+
onClick: p,
|
|
256
265
|
className: "absolute right-3 top-3 z-50 flex size-8 items-center justify-center rounded-full bg-black/60 text-white",
|
|
257
266
|
"aria-label": "Dismiss attachment",
|
|
258
267
|
children: /* @__PURE__ */ e(F, { className: "size-4", weight: "bold" })
|
|
@@ -271,22 +280,22 @@ const L = (u) => {
|
|
|
271
280
|
}
|
|
272
281
|
),
|
|
273
282
|
/* @__PURE__ */ f("div", { className: "flex items-center gap-1", children: [
|
|
274
|
-
|
|
283
|
+
E(s, {
|
|
275
284
|
className: "size-5 shrink-0 text-black/55",
|
|
276
285
|
weight: "regular"
|
|
277
286
|
}),
|
|
278
|
-
|
|
279
|
-
|
|
287
|
+
o && /* @__PURE__ */ e("span", { className: "text-xs font-medium text-black/55", children: o }),
|
|
288
|
+
w === "paid" ? /* @__PURE__ */ f(L, { children: [
|
|
280
289
|
/* @__PURE__ */ e("span", { className: "text-xs font-medium text-black/55", children: "•" }),
|
|
281
290
|
/* @__PURE__ */ e("span", { className: "text-xs font-medium text-[#008236]", children: "Purchased" }),
|
|
282
291
|
/* @__PURE__ */ e(
|
|
283
|
-
|
|
292
|
+
O,
|
|
284
293
|
{
|
|
285
294
|
className: "size-4 text-[#008236]",
|
|
286
295
|
weight: "bold"
|
|
287
296
|
}
|
|
288
297
|
)
|
|
289
|
-
] }) :
|
|
298
|
+
] }) : h && /* @__PURE__ */ f(L, { children: [
|
|
290
299
|
/* @__PURE__ */ e(
|
|
291
300
|
"span",
|
|
292
301
|
{
|
|
@@ -304,7 +313,7 @@ const L = (u) => {
|
|
|
304
313
|
"text-black/30": c,
|
|
305
314
|
"text-black/55": !c
|
|
306
315
|
}),
|
|
307
|
-
children:
|
|
316
|
+
children: h
|
|
308
317
|
}
|
|
309
318
|
)
|
|
310
319
|
] })
|
|
@@ -313,6 +322,6 @@ const L = (u) => {
|
|
|
313
322
|
] });
|
|
314
323
|
};
|
|
315
324
|
export {
|
|
316
|
-
|
|
325
|
+
Y as default
|
|
317
326
|
};
|
|
318
|
-
//# sourceMappingURL=Creator-
|
|
327
|
+
//# sourceMappingURL=Creator-BJ6UBWsR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Creator-BJ6UBWsR.js","sources":["../src/components/LockedAttachment/components/Creator.tsx"],"sourcesContent":["import {\n CheckCircleIcon,\n EyeIcon,\n EyeSlashIcon,\n LockIcon,\n LockOpenIcon,\n PauseIcon,\n PlayIcon,\n XIcon,\n} from '@phosphor-icons/react'\nimport classNames from 'classnames'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\n\nimport type { LockedAttachmentBaseProps } from '../types'\nimport { renderTypeIcon } from '../utils/icons'\nimport { getSourceType } from '../utils/mimeType'\n\nimport MediaPlayer from './MediaPlayer'\n\nexport interface CreatorCardProps extends LockedAttachmentBaseProps {\n isPreview?: boolean\n placeholderTitle?: string\n placeholderAmountText?: string\n onDismiss?: () => void\n}\n\ninterface CloseButtonProps {\n onClose: () => void\n}\n\nconst CloseButton: React.FC<CloseButtonProps> = (props) => {\n const { onClose } = props\n return (\n <button\n type=\"button\"\n onClick={onClose}\n className=\"absolute left-3 top-3 z-40 flex size-8 items-center justify-center rounded-full bg-black/60 text-white\"\n aria-label=\"Close preview\"\n >\n <EyeIcon className=\"size-4\" weight=\"fill\" />\n </button>\n )\n}\n\ninterface CollapsedThumbnailProps {\n thumbnail?: string\n mimeType: string\n overlayIcon?: React.ElementType\n darkOverlay?: boolean\n onClick?: () => void\n}\n\nconst CollapsedThumbnail: React.FC<CollapsedThumbnailProps> = (props) => {\n const { thumbnail, mimeType, overlayIcon: OverlayIcon, darkOverlay, onClick } = props\n return (\n <button\n type=\"button\"\n disabled={!onClick}\n className={classNames(\n 'relative aspect-video block w-full overflow-hidden border-0 bg-black/5 p-0 text-left appearance-none',\n { 'cursor-pointer': !!onClick, 'cursor-default': !onClick }\n )}\n onClick={onClick}\n aria-label={OverlayIcon ? 'Toggle preview' : undefined}\n >\n {thumbnail ? (\n <img\n src={thumbnail}\n alt=\"\"\n className=\"absolute inset-0 h-full w-full object-cover\"\n />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n {renderTypeIcon(mimeType, {\n className: 'size-12 text-black/20',\n weight: 'regular',\n })}\n </div>\n )}\n {darkOverlay && (\n <div className=\"pointer-events-none absolute inset-0 bg-black/30\" />\n )}\n {OverlayIcon && (\n <div className=\"pointer-events-none absolute left-3 top-3 flex size-8 items-center justify-center rounded-full bg-black/60 text-white\">\n <OverlayIcon className=\"size-4\" weight=\"fill\" />\n </div>\n )}\n </button>\n )\n}\n\n\ninterface AudioPreviewProps {\n source?: string\n thumbnail?: string\n mimeType: string\n}\n\nconst AudioPreview: React.FC<AudioPreviewProps> = (props) => {\n const { source, thumbnail, mimeType } = props\n const [playing, setPlaying] = useState(false)\n const [played, setPlayed] = useState(0)\n const [seeking, setSeeking] = useState(false)\n const audioRef = useRef<HTMLAudioElement>(null)\n const trackRef = useRef<HTMLDivElement>(null)\n const rafRef = useRef<number | null>(null)\n\n useEffect(() => {\n const el = audioRef.current\n if (!el) return\n if (playing) {\n void el.play().catch(() => setPlaying(false))\n } else {\n el.pause()\n }\n }, [playing])\n\n useEffect(() => {\n if (!playing) {\n if (rafRef.current !== null) cancelAnimationFrame(rafRef.current)\n return\n }\n const tick = () => {\n const el = audioRef.current\n if (el && el.duration && !seeking) setPlayed(el.currentTime / el.duration)\n rafRef.current = requestAnimationFrame(tick)\n }\n rafRef.current = requestAnimationFrame(tick)\n return () => {\n if (rafRef.current !== null) cancelAnimationFrame(rafRef.current)\n }\n }, [playing, seeking])\n\n useEffect(() => {\n setPlaying(false)\n setPlayed(0)\n }, [source])\n\n const getFraction = useCallback(\n (e: MouseEvent | TouchEvent | React.MouseEvent | React.TouchEvent) => {\n const track = trackRef.current\n if (!track) return 0\n const clientX =\n 'touches' in e\n ? (e.touches[0]?.clientX ?? e.changedTouches[0]?.clientX ?? 0)\n : e.clientX\n const rect = track.getBoundingClientRect()\n return Math.max(0, Math.min(1, (clientX - rect.left) / rect.width))\n },\n []\n )\n\n const seekTo = useCallback((fraction: number) => {\n const el = audioRef.current\n if (el && el.duration) el.currentTime = fraction * el.duration\n }, [])\n\n useEffect(() => {\n if (!seeking) return\n const onMove = (e: MouseEvent | TouchEvent) => {\n const f = getFraction(e)\n setPlayed(f)\n seekTo(f)\n }\n const onUp = (e: MouseEvent | TouchEvent) => {\n setSeeking(false)\n seekTo(getFraction(e))\n }\n window.addEventListener('mousemove', onMove)\n window.addEventListener('mouseup', onUp)\n window.addEventListener('touchmove', onMove, { passive: true })\n window.addEventListener('touchend', onUp)\n return () => {\n window.removeEventListener('mousemove', onMove)\n window.removeEventListener('mouseup', onUp)\n window.removeEventListener('touchmove', onMove)\n window.removeEventListener('touchend', onUp)\n }\n }, [seeking, getFraction, seekTo])\n\n const toggle = useCallback(() => setPlaying((p) => !p), [])\n\n return (\n <div className=\"relative\">\n {source && (\n <audio\n ref={audioRef}\n src={source}\n loop\n onEnded={() => {\n setPlaying(false)\n setPlayed(0)\n }}\n >\n <track kind=\"captions\" />\n </audio>\n )}\n <CollapsedThumbnail\n thumbnail={thumbnail}\n mimeType={mimeType}\n overlayIcon={source ? (playing ? PauseIcon : PlayIcon) : undefined}\n onClick={source ? toggle : undefined}\n />\n {source && (\n <div className=\"absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent\">\n <div\n ref={trackRef}\n role=\"slider\"\n aria-label=\"Playback position\"\n aria-valuenow={Math.round(played * 100)}\n aria-valuemin={0}\n aria-valuemax={100}\n tabIndex={0}\n className=\"relative flex h-4 w-full cursor-pointer items-center\"\n onMouseDown={(e) => {\n e.stopPropagation()\n setSeeking(true)\n const f = getFraction(e)\n setPlayed(f)\n seekTo(f)\n }}\n onTouchStart={(e) => {\n e.stopPropagation()\n setSeeking(true)\n const f = getFraction(e)\n setPlayed(f)\n seekTo(f)\n }}\n onClick={(e) => e.stopPropagation()}\n onKeyDown={(e) => {\n if (e.key === 'ArrowRight') seekTo(Math.min(1, played + 0.05))\n if (e.key === 'ArrowLeft') seekTo(Math.max(0, played - 0.05))\n }}\n >\n <div className=\"w-full overflow-hidden rounded-full bg-white/30 h-1\">\n <div\n className=\"h-full rounded-full bg-white\"\n style={{ width: `${Math.round(played * 100)}%` }}\n />\n </div>\n </div>\n </div>\n )}\n </div>\n )\n}\n\ninterface VideoPreviewProps {\n source?: string\n thumbnail?: string\n mimeType: string\n}\n\nconst VideoPreview: React.FC<VideoPreviewProps> = (props) => {\n const { source, thumbnail, mimeType } = props\n const [expanded, setExpanded] = useState(false)\n const collapse = () => setExpanded(false)\n\n useEffect(() => {\n setExpanded(false)\n }, [source])\n\n if (!source) {\n return <CollapsedThumbnail thumbnail={thumbnail} mimeType={mimeType} />\n }\n\n return (\n <div\n className={classNames('relative overflow-hidden', {\n 'aspect-video': !expanded,\n })}\n >\n <MediaPlayer\n source={source}\n mimeType={mimeType}\n poster={thumbnail}\n playing={expanded}\n loop\n controls={false}\n showProgress\n onContainerClick={collapse}\n muted\n />\n {!expanded && (\n <button\n type=\"button\"\n className=\"absolute inset-0 block cursor-pointer border-0 p-0 text-left appearance-none\"\n onClick={() => setExpanded(true)}\n aria-label=\"Expand video preview\"\n >\n {thumbnail ? (\n <img\n src={thumbnail}\n alt=\"\"\n className=\"absolute inset-0 h-full w-full object-cover\"\n />\n ) : (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n {renderTypeIcon(mimeType, {\n className: 'size-12 text-black/20',\n weight: 'regular',\n })}\n </div>\n )}\n <div className=\"pointer-events-none absolute left-3 top-3 flex size-8 items-center justify-center rounded-full bg-black/60 text-white\">\n <EyeSlashIcon className=\"size-4\" weight=\"fill\" />\n </div>\n </button>\n )}\n {expanded && <CloseButton onClose={collapse} />}\n </div>\n )\n}\n\ninterface ImagePreviewProps {\n source?: string\n thumbnail?: string\n mimeType: string\n title?: string\n}\n\nconst ImagePreview: React.FC<ImagePreviewProps> = (props) => {\n const { source, thumbnail, mimeType, title } = props\n const [expanded, setExpanded] = useState(false)\n const collapse = () => setExpanded(false)\n\n useEffect(() => {\n setExpanded(false)\n }, [source])\n\n if (expanded && source) {\n return (\n <div className=\"relative\">\n <button\n type=\"button\"\n className=\"block w-full cursor-pointer border-0 p-0 text-left appearance-none\"\n onClick={collapse}\n aria-label=\"Close preview\"\n >\n <img src={source} alt={title ?? ''} className=\"block w-full\" />\n </button>\n <CloseButton onClose={collapse} />\n </div>\n )\n }\n\n return (\n <CollapsedThumbnail\n thumbnail={thumbnail}\n mimeType={mimeType}\n overlayIcon={source ? EyeSlashIcon : undefined}\n onClick={source ? () => setExpanded(true) : undefined}\n />\n )\n}\n\n\nconst CreatorCard: React.FC<CreatorCardProps> = (props) => {\n const {\n title,\n mimeType = 'application/octet-stream',\n thumbnail,\n source,\n detail,\n amountText,\n placeholderTitle = 'Attachment title',\n placeholderAmountText,\n paymentStatus,\n onDismiss,\n isPreview = false,\n } = props\n const sourceType = getSourceType(mimeType)\n const displayAmountText = amountText ?? placeholderAmountText\n const isPlaceholderAmount = !amountText && !!placeholderAmountText\n\n let mediaPreview: React.ReactNode\n if (isPreview && sourceType === 'audio') {\n mediaPreview = (\n <AudioPreview source={source} thumbnail={thumbnail} mimeType={mimeType} />\n )\n } else if (isPreview && sourceType === 'video') {\n mediaPreview = (\n <VideoPreview source={source} thumbnail={thumbnail} mimeType={mimeType} />\n )\n } else if (isPreview && sourceType === 'image') {\n mediaPreview = (\n <ImagePreview\n source={source}\n thumbnail={thumbnail}\n mimeType={mimeType}\n title={title}\n />\n )\n } else {\n const lockedOverlayIcon = onDismiss\n ? undefined\n : paymentStatus === 'paid'\n ? LockOpenIcon\n : LockIcon\n mediaPreview = (\n <CollapsedThumbnail\n thumbnail={thumbnail}\n mimeType={mimeType}\n overlayIcon={lockedOverlayIcon}\n darkOverlay\n />\n )\n }\n\n return (\n <div className=\"relative w-[280px] select-none overflow-hidden rounded-3xl bg-white shadow-card\">\n {onDismiss && (\n <button\n type=\"button\"\n onClick={onDismiss}\n className=\"absolute right-3 top-3 z-50 flex size-8 items-center justify-center rounded-full bg-black/60 text-white\"\n aria-label=\"Dismiss attachment\"\n >\n <XIcon className=\"size-4\" weight=\"bold\" />\n </button>\n )}\n {mediaPreview}\n <div className=\"px-4 pb-3 pt-3\">\n <p\n className={classNames('mb-1.5 truncate text-base font-medium', {\n 'text-black/30': !title,\n 'text-black': !!title,\n })}\n >\n {title || placeholderTitle}\n </p>\n <div className=\"flex items-center gap-1\">\n {renderTypeIcon(mimeType, {\n className: 'size-5 shrink-0 text-black/55',\n weight: 'regular',\n })}\n {detail && (\n <span className=\"text-xs font-medium text-black/55\">{detail}</span>\n )}\n {paymentStatus === 'paid' ? (\n <>\n <span className=\"text-xs font-medium text-black/55\">•</span>\n <span className=\"text-xs font-medium text-[#008236]\">\n Purchased\n </span>\n <CheckCircleIcon\n className=\"size-4 text-[#008236]\"\n weight=\"bold\"\n />\n </>\n ) : (\n displayAmountText && (\n <>\n <span\n className={classNames('text-xs font-medium', {\n 'text-black/30': isPlaceholderAmount,\n 'text-black/55': !isPlaceholderAmount,\n })}\n >\n •\n </span>\n <span\n className={classNames('text-xs font-medium', {\n 'text-black/30': isPlaceholderAmount,\n 'text-black/55': !isPlaceholderAmount,\n })}\n >\n {displayAmountText}\n </span>\n </>\n )\n )}\n </div>\n </div>\n </div>\n )\n}\n\nexport default CreatorCard\n"],"names":["CloseButton","props","onClose","jsx","EyeIcon","CollapsedThumbnail","thumbnail","mimeType","OverlayIcon","darkOverlay","onClick","jsxs","classNames","AudioPreview","source","playing","setPlaying","useState","played","setPlayed","seeking","setSeeking","audioRef","useRef","trackRef","rafRef","useEffect","el","tick","getFraction","useCallback","e","track","clientX","_a","_b","rect","seekTo","fraction","onMove","f","onUp","toggle","p","PauseIcon","PlayIcon","VideoPreview","expanded","setExpanded","collapse","MediaPlayer","EyeSlashIcon","ImagePreview","title","CreatorCard","detail","amountText","placeholderTitle","placeholderAmountText","paymentStatus","onDismiss","isPreview","sourceType","getSourceType","displayAmountText","isPlaceholderAmount","mediaPreview","LockOpenIcon","LockIcon","XIcon","renderTypeIcon","Fragment","CheckCircleIcon"],"mappings":";;;;;AA8BA,MAAMA,IAA0C,CAACC,MAAU;AACzD,QAAM,EAAE,SAAAC,MAAYD;AACpB,SACE,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,SAASD;AAAA,MACT,WAAU;AAAA,MACV,cAAW;AAAA,MAEX,UAAA,gBAAAC,EAACC,GAAA,EAAQ,WAAU,UAAS,QAAO,OAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGhD,GAUMC,IAAwD,CAACJ,MAAU;AACvE,QAAM,EAAE,WAAAK,GAAW,UAAAC,GAAU,aAAaC,GAAa,aAAAC,GAAa,SAAAC,MAAYT;AAChF,SACE,gBAAAU;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU,CAACD;AAAA,MACX,WAAWE;AAAA,QACT;AAAA,QACA,EAAE,kBAAkB,CAAC,CAACF,GAAS,kBAAkB,CAACA,EAAA;AAAA,MAAQ;AAAA,MAE5D,SAAAA;AAAA,MACA,cAAYF,IAAc,mBAAmB;AAAA,MAE5C,UAAA;AAAA,QAAAF,IACC,gBAAAH;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,KAAKG;AAAA,YACL,KAAI;AAAA,YACJ,WAAU;AAAA,UAAA;AAAA,QAAA,IAGZ,gBAAAH,EAAC,OAAA,EAAI,WAAU,qDACZ,YAAeI,GAAU;AAAA,UACxB,WAAW;AAAA,UACX,QAAQ;AAAA,QAAA,CACT,GACH;AAAA,QAEDE,KACC,gBAAAN,EAAC,OAAA,EAAI,WAAU,mDAAA,CAAmD;AAAA,QAEnEK,KACC,gBAAAL,EAAC,OAAA,EAAI,WA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