@linktr.ee/messaging-react 3.13.0-rc-1783924547 → 3.13.1-rc-1784219498

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.
Files changed (45) hide show
  1. package/dist/{Card-CQcaDQQj.js → Card-DRuAkKPA.js} +123 -119
  2. package/dist/Card-DRuAkKPA.js.map +1 -0
  3. package/dist/Card-DoiU-rmw.cjs +2 -0
  4. package/dist/Card-DoiU-rmw.cjs.map +1 -0
  5. package/dist/assets/index.css +1 -1
  6. package/dist/index-5x3u5nJw.js +5390 -0
  7. package/dist/index-5x3u5nJw.js.map +1 -0
  8. package/dist/index-BrVUDc5h.cjs +2 -0
  9. package/dist/index-BrVUDc5h.cjs.map +1 -0
  10. package/dist/index.cjs +1 -1
  11. package/dist/index.d.ts +19 -6
  12. package/dist/index.js +11 -10
  13. package/dist/testing.d.ts +10 -0
  14. package/package.json +2 -2
  15. package/src/components/AttachmentCard/Thumbnail.tsx +10 -6
  16. package/src/components/ChannelHeaderRedesign.tsx +57 -80
  17. package/src/components/ChannelView.stories.tsx +82 -79
  18. package/src/components/ChannelView.test.tsx +101 -61
  19. package/src/components/ChannelView.tsx +421 -43
  20. package/src/components/CustomMessage/LockedAttachment/components/_shared/GalleryThumbnail.tsx +5 -1
  21. package/src/components/CustomMessage/LockedAttachment/components/_shared/SingleThumbnail.tsx +5 -1
  22. package/src/components/CustomMessage/StreamAttachmentMessage.test.tsx +58 -1
  23. package/src/components/CustomMessage/StreamAttachmentMessage.tsx +2 -1
  24. package/src/components/CustomMessageInput/index.tsx +77 -25
  25. package/src/components/LinkAttachment/components/_shared/CardThumbnail.tsx +4 -2
  26. package/src/components/MediaMessage/index.tsx +2 -1
  27. package/src/components/MessageAttachment/Image/index.tsx +3 -2
  28. package/src/components/MessageAttachment/MessageAttachment.test.tsx +20 -0
  29. package/src/components/MessagingShell/index.tsx +2 -0
  30. package/src/index.test.ts +13 -0
  31. package/src/index.ts +1 -0
  32. package/src/stream-custom-data.ts +11 -0
  33. package/src/styles.css +150 -1
  34. package/src/types.ts +7 -5
  35. package/src/utils/cdnImageUrl.test.ts +57 -0
  36. package/src/utils/cdnImageUrl.ts +41 -0
  37. package/src/utils/resolveParticipantDisplayName.test.ts +28 -0
  38. package/src/utils/resolveParticipantDisplayName.ts +5 -0
  39. package/dist/Card-BQarTR9w.cjs +0 -2
  40. package/dist/Card-BQarTR9w.cjs.map +0 -1
  41. package/dist/Card-CQcaDQQj.js.map +0 -1
  42. package/dist/index-C-dn7Ime.js +0 -5016
  43. package/dist/index-C-dn7Ime.js.map +0 -1
  44. package/dist/index-DJwZVg6y.cjs +0 -2
  45. package/dist/index-DJwZVg6y.cjs.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
- import { PlayIcon as B, LockOpenIcon as q, LockSimpleIcon as V, CaretLeftIcon as F, CaretRightIcon as H, ImagesIcon as J, DownloadSimpleIcon as R, XIcon as Q, PencilSimpleIcon as W } from "@phosphor-icons/react";
3
- import y, { useState as k, useRef as I, useCallback as L, useEffect as Y } from "react";
4
- import v from "classnames";
5
- import { r as A, g as T, A as G } from "./index-C-dn7Ime.js";
6
- import { L as Z, P as O } from "./LoadingDots-Ct3WmVlT.js";
7
- const z = ({
2
+ import { PlayIcon as B, LockOpenIcon as F, LockSimpleIcon as V, CaretLeftIcon as H, CaretRightIcon as J, ImagesIcon as Q, DownloadSimpleIcon as R, XIcon as W, PencilSimpleIcon as Y } from "@phosphor-icons/react";
3
+ import P, { useState as y, useRef as z, useCallback as T, useEffect as Z } from "react";
4
+ import g from "classnames";
5
+ import { r as A, g as L, o as G, A as O } from "./index-5x3u5nJw.js";
6
+ import { L as ee, P as _ } from "./LoadingDots-Ct3WmVlT.js";
7
+ const U = ({
8
8
  variant: t,
9
9
  title: a,
10
10
  placeholderTitle: n = "Attachment title",
@@ -16,7 +16,7 @@ const z = ({
16
16
  trailingAction: d
17
17
  }) => {
18
18
  const l = t === "dark", o = a || n, f = !a, m = u ?? A(r, {
19
- className: v(
19
+ className: g(
20
20
  "size-5 shrink-0",
21
21
  l ? "text-white/55" : "text-black/55"
22
22
  ),
@@ -28,7 +28,7 @@ const z = ({
28
28
  o.trim() !== "" && /* @__PURE__ */ e(
29
29
  "p",
30
30
  {
31
- className: v("truncate text-base font-medium leading-6", {
31
+ className: g("truncate text-base font-medium leading-6", {
32
32
  "text-black/90": !l && !f,
33
33
  "text-black/30": !l && f,
34
34
  "text-white/30": l && f,
@@ -42,7 +42,7 @@ const z = ({
42
42
  i != null && i !== "" && /* @__PURE__ */ e(
43
43
  "span",
44
44
  {
45
- className: v(
45
+ className: g(
46
46
  "text-xs font-medium",
47
47
  l ? "text-white/55" : "text-black/55"
48
48
  ),
@@ -56,17 +56,17 @@ const z = ({
56
56
  ] }),
57
57
  c
58
58
  ] });
59
- }, _ = ({
59
+ }, E = ({
60
60
  paymentStatus: t,
61
61
  mimeType: a,
62
62
  isPlayable: n,
63
63
  isLocked: r
64
64
  }) => {
65
- const i = a ? T(a) : void 0, c = (n ?? (i === "video" || i === "audio")) && !r ? B : t === "paid" ? q : V;
65
+ const i = a ? L(a) : void 0, c = (n ?? (i === "video" || i === "audio")) && !r ? B : t === "paid" ? F : V;
66
66
  return /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(
67
67
  "div",
68
68
  {
69
- className: v(
69
+ className: g(
70
70
  "flex size-12 items-center justify-center rounded-full bg-black/30 text-white",
71
71
  c === B && "group-hover:bg-black/40"
72
72
  ),
@@ -74,11 +74,11 @@ const z = ({
74
74
  }
75
75
  ) });
76
76
  };
77
- function ee(t) {
78
- const a = T(t.mimeType);
77
+ function te(t) {
78
+ const a = L(t.mimeType);
79
79
  return a === "video" || a === "audio";
80
80
  }
81
- const te = ({
81
+ const ae = ({
82
82
  variant: t,
83
83
  gallery: a,
84
84
  title: n,
@@ -86,15 +86,17 @@ const te = ({
86
86
  paymentStatus: i,
87
87
  topRight: s
88
88
  }) => {
89
- const [c, u] = k(0), d = a.length, l = Math.min(c, d - 1), o = a[l], f = ee(o), m = (g) => {
90
- g.stopPropagation(), u((p) => Math.max(0, p - 1));
91
- }, w = (g) => {
92
- g.stopPropagation(), u((p) => Math.min(d - 1, p + 1));
93
- }, x = l === 0, b = l === d - 1, N = t === "dark";
89
+ const [c, u] = y(0), d = a.length, l = Math.min(c, d - 1), o = a[l], f = te(o), m = G(
90
+ o.thumbnailUrl
91
+ ), x = (N) => {
92
+ N.stopPropagation(), u((k) => Math.max(0, k - 1));
93
+ }, p = (N) => {
94
+ N.stopPropagation(), u((k) => Math.min(d - 1, k + 1));
95
+ }, b = l === 0, w = l === d - 1, v = t === "dark";
94
96
  return /* @__PURE__ */ h(
95
97
  "div",
96
98
  {
97
- className: v(
99
+ className: g(
98
100
  "group relative overflow-hidden rounded-t-md",
99
101
  r ? "aspect-[337/386]" : void 0
100
102
  ),
@@ -102,14 +104,14 @@ const te = ({
102
104
  r ? /* @__PURE__ */ e(
103
105
  "div",
104
106
  {
105
- className: v(
107
+ className: g(
106
108
  "absolute inset-0",
107
- N ? "bg-white/10" : "bg-black/5"
109
+ v ? "bg-white/10" : "bg-black/5"
108
110
  ),
109
111
  children: o.thumbnailUrl && /* @__PURE__ */ e(
110
112
  "img",
111
113
  {
112
- src: o.thumbnailUrl,
114
+ src: m ?? o.thumbnailUrl,
113
115
  alt: "",
114
116
  "aria-hidden": !0,
115
117
  draggable: !1,
@@ -118,7 +120,7 @@ const te = ({
118
120
  )
119
121
  }
120
122
  ) : /* @__PURE__ */ e(
121
- G,
123
+ O,
122
124
  {
123
125
  mimeType: o.mimeType,
124
126
  sourceUrl: o.sourceUrl,
@@ -130,40 +132,40 @@ const te = ({
130
132
  l
131
133
  ),
132
134
  r && /* @__PURE__ */ e(
133
- _,
135
+ E,
134
136
  {
135
137
  paymentStatus: i,
136
138
  isPlayable: f,
137
139
  isLocked: r
138
140
  }
139
141
  ),
140
- d > 1 && /* @__PURE__ */ h(y.Fragment, { children: [
142
+ d > 1 && /* @__PURE__ */ h(P.Fragment, { children: [
141
143
  /* @__PURE__ */ e(
142
144
  "button",
143
145
  {
144
146
  type: "button",
145
- onClick: m,
146
- disabled: x,
147
+ onClick: x,
148
+ disabled: b,
147
149
  "aria-label": "Previous item",
148
- className: v(
150
+ className: g(
149
151
  "absolute left-3 top-1/2 -translate-y-1/2 flex size-7 items-center justify-center rounded-full bg-black/30 text-white transition-opacity",
150
- x ? "opacity-40" : "hover:bg-black/40"
152
+ b ? "opacity-40" : "hover:bg-black/40"
151
153
  ),
152
- children: /* @__PURE__ */ e(F, { className: "size-5", weight: "bold" })
154
+ children: /* @__PURE__ */ e(H, { className: "size-5", weight: "bold" })
153
155
  }
154
156
  ),
155
157
  /* @__PURE__ */ e(
156
158
  "button",
157
159
  {
158
160
  type: "button",
159
- onClick: w,
160
- disabled: b,
161
+ onClick: p,
162
+ disabled: w,
161
163
  "aria-label": "Next item",
162
- className: v(
164
+ className: g(
163
165
  "absolute right-3 top-1/2 -translate-y-1/2 flex size-7 items-center justify-center rounded-full bg-black/30 text-white transition-opacity",
164
- b ? "opacity-40" : "hover:bg-black/40"
166
+ w ? "opacity-40" : "hover:bg-black/40"
165
167
  ),
166
- children: /* @__PURE__ */ e(H, { className: "size-5", weight: "bold" })
168
+ children: /* @__PURE__ */ e(J, { className: "size-5", weight: "bold" })
167
169
  }
168
170
  ),
169
171
  /* @__PURE__ */ e("div", { className: "pointer-events-none absolute bottom-10 left-1/2 flex size-8 -translate-x-1/2 items-center justify-center rounded-full bg-black/30", children: /* @__PURE__ */ h("span", { className: "text-xs font-medium leading-none text-white", children: [
@@ -176,7 +178,7 @@ const te = ({
176
178
  ]
177
179
  }
178
180
  );
179
- }, ae = ({
181
+ }, ie = ({
180
182
  variant: t,
181
183
  mimeType: a,
182
184
  thumbnailUrl: n,
@@ -187,31 +189,33 @@ const te = ({
187
189
  topRight: u,
188
190
  containedImage: d = !1
189
191
  }) => {
190
- const l = s || i == null ? void 0 : i.sourceUrl, o = s ? n : (i == null ? void 0 : i.thumbnailUrl) ?? n, f = t === "dark";
192
+ const l = s || i == null ? void 0 : i.sourceUrl, o = s ? n : (i == null ? void 0 : i.thumbnailUrl) ?? n, f = G(
193
+ o
194
+ ), m = t === "dark";
191
195
  return /* @__PURE__ */ h("div", { className: "relative overflow-hidden rounded-t-md", children: [
192
196
  s ? /* @__PURE__ */ h(
193
197
  "div",
194
198
  {
195
- className: v(
199
+ className: g(
196
200
  "relative aspect-video overflow-hidden",
197
- f ? "bg-white/10" : "bg-black/5"
201
+ m ? "bg-white/10" : "bg-black/5"
198
202
  ),
199
203
  children: [
200
204
  o ? /* @__PURE__ */ e(
201
205
  "img",
202
206
  {
203
- src: o,
207
+ src: f ?? o,
204
208
  alt: "",
205
209
  "aria-hidden": !0,
206
210
  draggable: !1,
207
211
  className: "absolute inset-0 h-full w-full scale-110 object-cover blur-[40px]"
208
212
  }
209
213
  ) : /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: A(a, {
210
- className: f ? "size-12 text-white/20" : "size-12 text-black/20",
214
+ className: m ? "size-12 text-white/20" : "size-12 text-black/20",
211
215
  weight: "regular"
212
216
  }) }),
213
217
  /* @__PURE__ */ e(
214
- _,
218
+ E,
215
219
  {
216
220
  paymentStatus: c,
217
221
  mimeType: a,
@@ -221,7 +225,7 @@ const te = ({
221
225
  ]
222
226
  }
223
227
  ) : /* @__PURE__ */ e(
224
- G,
228
+ O,
225
229
  {
226
230
  mimeType: a,
227
231
  sourceUrl: l,
@@ -234,12 +238,12 @@ const te = ({
234
238
  ),
235
239
  u && /* @__PURE__ */ e("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: u })
236
240
  ] });
237
- }, P = (t) => t.length >= 2, U = (t) => /* @__PURE__ */ e(
238
- J,
241
+ }, I = (t) => t.length >= 2, j = (t) => /* @__PURE__ */ e(
242
+ Q,
239
243
  {
240
244
  className: t === "dark" ? "size-5 shrink-0 text-white/55" : "size-5 shrink-0 text-black/55"
241
245
  }
242
- ), j = ({
246
+ ), D = ({
243
247
  variant: t,
244
248
  gallery: a,
245
249
  title: n,
@@ -250,8 +254,8 @@ const te = ({
250
254
  source: u,
251
255
  containedImage: d,
252
256
  topRight: l
253
- }) => P(a) ? /* @__PURE__ */ e(
254
- te,
257
+ }) => I(a) ? /* @__PURE__ */ e(
258
+ ae,
255
259
  {
256
260
  variant: t,
257
261
  gallery: a,
@@ -261,7 +265,7 @@ const te = ({
261
265
  topRight: l
262
266
  }
263
267
  ) : /* @__PURE__ */ e(
264
- ae,
268
+ ie,
265
269
  {
266
270
  variant: t,
267
271
  mimeType: s,
@@ -273,7 +277,7 @@ const te = ({
273
277
  topRight: l,
274
278
  containedImage: d
275
279
  }
276
- ), D = ({
280
+ ), M = ({
277
281
  variant: t,
278
282
  children: a,
279
283
  rootRef: n,
@@ -283,14 +287,14 @@ const te = ({
283
287
  {
284
288
  ref: n,
285
289
  "data-testid": r,
286
- className: v(
290
+ className: g(
287
291
  "relative w-[280px] select-none overflow-hidden rounded-md",
288
292
  t === "dark" ? "bg-[#1e2330]" : "bg-white",
289
293
  "shadow-[0_1px_2px_rgba(0,0,0,0.08)]"
290
294
  ),
291
295
  children: a
292
296
  }
293
- ), E = ({
297
+ ), S = ({
294
298
  onToggle: t,
295
299
  isBusy: a,
296
300
  isPreviewVisible: n,
@@ -311,13 +315,13 @@ const te = ({
311
315
  className: a ? "block w-full text-left" : "block w-full cursor-pointer text-left",
312
316
  children: r
313
317
  }
314
- ) : /* @__PURE__ */ e(y.Fragment, { children: r });
315
- function S({
318
+ ) : /* @__PURE__ */ e(P.Fragment, { children: r });
319
+ function K({
316
320
  isGallery: t,
317
321
  onFetchSource: a,
318
322
  onPreviewClick: n
319
323
  }) {
320
- const [r, i] = k(), [s, c] = k(!1), [u, d] = k(!1), l = I(!1), o = L(async () => {
324
+ const [r, i] = y(), [s, c] = y(!1), [u, d] = y(!1), l = z(!1), o = T(async () => {
321
325
  if (n == null || n(), s) {
322
326
  c(!1);
323
327
  return;
@@ -348,14 +352,14 @@ function S({
348
352
  togglePreview: f
349
353
  };
350
354
  }
351
- function ie({
355
+ function re({
352
356
  paymentStatus: t,
353
357
  onFetchSource: a,
354
358
  onUnlockClick: n
355
359
  }) {
356
- const [r, i] = k(), s = I(null), c = I(!1), u = I(a);
360
+ const [r, i] = y(), s = z(null), c = z(!1), u = z(a);
357
361
  u.current = a;
358
- const d = L(async () => {
362
+ const d = T(async () => {
359
363
  var o;
360
364
  if (!c.current) {
361
365
  c.current = !0;
@@ -366,10 +370,10 @@ function ie({
366
370
  c.current = !1;
367
371
  }
368
372
  }
369
- }, []), l = L(() => {
373
+ }, []), l = T(() => {
370
374
  t === "paid" ? d() : n == null || n();
371
375
  }, [t, d, n]);
372
- return Y(() => {
376
+ return Z(() => {
373
377
  if (!s.current || t !== "paid" || r !== void 0) return;
374
378
  const o = new IntersectionObserver(
375
379
  ([f]) => {
@@ -380,7 +384,7 @@ function ie({
380
384
  return o.observe(s.current), () => o.disconnect();
381
385
  }, [t, r, d]), { source: r, cardRef: s, handleUnlockClick: l };
382
386
  }
383
- const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928]", re = ({
387
+ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928]", ne = ({
384
388
  isLocked: t,
385
389
  sourceUrl: a,
386
390
  redeemUrl: n,
@@ -399,7 +403,7 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
399
403
  "aria-busy": s,
400
404
  title: s ? "Unlocking" : "Unlock",
401
405
  className: C,
402
- children: s ? /* @__PURE__ */ e(Z, {}) : /* @__PURE__ */ h(y.Fragment, { children: [
406
+ children: s ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ h(P.Fragment, { children: [
403
407
  /* @__PURE__ */ e(V, { className: "size-4", weight: "fill" }),
404
408
  "Unlock"
405
409
  ] })
@@ -436,7 +440,7 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
436
440
  );
437
441
  }
438
442
  return null;
439
- }, ne = ({
443
+ }, se = ({
440
444
  title: t,
441
445
  mimeType: a = "application/octet-stream",
442
446
  thumbnailUrl: n,
@@ -450,7 +454,7 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
450
454
  onFetchSource: o,
451
455
  onEditClick: f
452
456
  }) => {
453
- const m = P(u), { source: w, isPreviewVisible: x, isLoadingPreview: b, togglePreview: N } = S({ isGallery: m, onFetchSource: o, onPreviewClick: l }), g = !x, p = b, M = /* @__PURE__ */ h(y.Fragment, { children: [
457
+ const m = I(u), { source: x, isPreviewVisible: p, isLoadingPreview: b, togglePreview: w } = K({ isGallery: m, onFetchSource: o, onPreviewClick: l }), v = !p, N = b, k = /* @__PURE__ */ h(P.Fragment, { children: [
454
458
  /* @__PURE__ */ e("span", { className: "text-xs font-medium text-white/55", children: "•" }),
455
459
  /* @__PURE__ */ e(
456
460
  "span",
@@ -459,64 +463,64 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
459
463
  children: i || c
460
464
  }
461
465
  )
462
- ] }), K = d ? /* @__PURE__ */ e(
466
+ ] }), X = d ? /* @__PURE__ */ e(
463
467
  "button",
464
468
  {
465
469
  type: "button",
466
- onClick: ($) => {
467
- $.stopPropagation(), d();
470
+ onClick: (q) => {
471
+ q.stopPropagation(), d();
468
472
  },
469
473
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
470
474
  "aria-label": "Dismiss attachment",
471
- children: /* @__PURE__ */ e(Q, { className: "size-3", weight: "bold" })
475
+ children: /* @__PURE__ */ e(W, { className: "size-3", weight: "bold" })
472
476
  }
473
- ) : void 0, X = f ? /* @__PURE__ */ e(
477
+ ) : void 0, $ = f ? /* @__PURE__ */ e(
474
478
  "button",
475
479
  {
476
480
  type: "button",
477
481
  onClick: f,
478
482
  "aria-label": "Edit attachment",
479
483
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
480
- children: /* @__PURE__ */ e(W, { className: "size-5", weight: "regular" })
484
+ children: /* @__PURE__ */ e(Y, { className: "size-5", weight: "regular" })
481
485
  }
482
486
  ) : void 0;
483
- return /* @__PURE__ */ h(D, { variant: "dark", children: [
487
+ return /* @__PURE__ */ h(M, { variant: "dark", children: [
484
488
  /* @__PURE__ */ e(
485
- E,
489
+ S,
486
490
  {
487
- onToggle: N,
488
- isBusy: p,
489
- isPreviewVisible: !g,
491
+ onToggle: w,
492
+ isBusy: N,
493
+ isPreviewVisible: !v,
490
494
  children: /* @__PURE__ */ e(
491
- j,
495
+ D,
492
496
  {
493
497
  variant: "dark",
494
498
  gallery: u,
495
499
  title: t,
496
- showLocked: g,
500
+ showLocked: v,
497
501
  mimeType: a,
498
502
  thumbnailUrl: n,
499
- source: w,
500
- topRight: K
503
+ source: x,
504
+ topRight: X
501
505
  }
502
506
  )
503
507
  }
504
508
  ),
505
509
  /* @__PURE__ */ e(
506
- z,
510
+ U,
507
511
  {
508
512
  variant: "dark",
509
513
  title: t,
510
514
  placeholderTitle: s,
511
515
  mimeType: a,
512
516
  detail: r,
513
- statusBadge: M,
514
- icon: m ? U("dark") : void 0,
515
- trailingAction: X
517
+ statusBadge: k,
518
+ icon: m ? j("dark") : void 0,
519
+ trailingAction: $
516
520
  }
517
521
  )
518
522
  ] });
519
- }, se = ({
523
+ }, le = ({
520
524
  title: t,
521
525
  mimeType: a = "application/octet-stream",
522
526
  thumbnailUrl: n,
@@ -526,7 +530,7 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
526
530
  placeholderAmountText: c,
527
531
  gallery: u = []
528
532
  }) => {
529
- const d = P(u), l = /* @__PURE__ */ h(y.Fragment, { children: [
533
+ const d = I(u), l = /* @__PURE__ */ h(P.Fragment, { children: [
530
534
  /* @__PURE__ */ e("span", { className: "text-xs font-medium text-black/55", children: "•" }),
531
535
  /* @__PURE__ */ e(
532
536
  "span",
@@ -536,9 +540,9 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
536
540
  }
537
541
  )
538
542
  ] });
539
- return /* @__PURE__ */ h(D, { variant: "light", children: [
543
+ return /* @__PURE__ */ h(M, { variant: "light", children: [
540
544
  /* @__PURE__ */ e(
541
- j,
545
+ D,
542
546
  {
543
547
  variant: "light",
544
548
  gallery: u,
@@ -549,7 +553,7 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
549
553
  }
550
554
  ),
551
555
  /* @__PURE__ */ e(
552
- z,
556
+ U,
553
557
  {
554
558
  variant: "light",
555
559
  title: t,
@@ -557,11 +561,11 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
557
561
  mimeType: a,
558
562
  detail: r,
559
563
  statusBadge: l,
560
- icon: d ? U("light") : void 0
564
+ icon: d ? j("light") : void 0
561
565
  }
562
566
  )
563
567
  ] });
564
- }, le = ({
568
+ }, oe = ({
565
569
  title: t,
566
570
  mimeType: a = "application/octet-stream",
567
571
  thumbnailUrl: n,
@@ -573,16 +577,16 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
573
577
  onPreviewClick: d,
574
578
  onFetchSource: l
575
579
  }) => {
576
- const o = P(u), { source: f, isPreviewVisible: m, isLoadingPreview: w, togglePreview: x } = S({ isGallery: o, onFetchSource: l, onPreviewClick: d }), b = !m;
577
- return /* @__PURE__ */ h(D, { variant: "dark", children: [
580
+ const o = I(u), { source: f, isPreviewVisible: m, isLoadingPreview: x, togglePreview: p } = K({ isGallery: o, onFetchSource: l, onPreviewClick: d }), b = !m;
581
+ return /* @__PURE__ */ h(M, { variant: "dark", children: [
578
582
  /* @__PURE__ */ e(
579
- E,
583
+ S,
580
584
  {
581
- onToggle: x,
582
- isBusy: w,
585
+ onToggle: p,
586
+ isBusy: x,
583
587
  isPreviewVisible: !b,
584
588
  children: /* @__PURE__ */ e(
585
- j,
589
+ D,
586
590
  {
587
591
  variant: "dark",
588
592
  gallery: u,
@@ -597,7 +601,7 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
597
601
  }
598
602
  ),
599
603
  /* @__PURE__ */ e(
600
- z,
604
+ U,
601
605
  {
602
606
  variant: "dark",
603
607
  title: t,
@@ -605,14 +609,14 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
605
609
  mimeType: a,
606
610
  detail: r,
607
611
  statusBadge: /* @__PURE__ */ e(
608
- O,
612
+ _,
609
613
  {
610
614
  isMine: !0,
611
615
  paymentStatus: c,
612
616
  amountText: i
613
617
  }
614
618
  ),
615
- icon: o ? U("dark") : void 0
619
+ icon: o ? j("dark") : void 0
616
620
  }
617
621
  )
618
622
  ] });
@@ -629,56 +633,56 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
629
633
  paymentStatus: l,
630
634
  isUnlocking: o = !1
631
635
  }) => {
632
- const f = P(s), { source: m, cardRef: w, handleUnlockClick: x } = ie({
636
+ const f = I(s), { source: m, cardRef: x, handleUnlockClick: p } = re({
633
637
  paymentStatus: l,
634
638
  onFetchSource: u,
635
639
  onUnlockClick: c
636
- }), b = m == null ? void 0 : m.sourceUrl, N = m == null ? void 0 : m.redeemUrl, g = f ? l !== "paid" : b === void 0, p = T(r), M = f ? void 0 : b;
640
+ }), b = m == null ? void 0 : m.sourceUrl, w = m == null ? void 0 : m.redeemUrl, v = f ? l !== "paid" : b === void 0, N = L(r), k = f ? void 0 : b;
637
641
  return /* @__PURE__ */ h(
638
- D,
642
+ M,
639
643
  {
640
644
  variant: "light",
641
- rootRef: w,
645
+ rootRef: x,
642
646
  "data-testid": "locked-attachment",
643
647
  children: [
644
648
  /* @__PURE__ */ e(
645
- j,
649
+ D,
646
650
  {
647
651
  variant: "light",
648
652
  gallery: s,
649
653
  title: t,
650
- showLocked: g,
654
+ showLocked: v,
651
655
  paymentStatus: l,
652
656
  mimeType: r,
653
657
  thumbnailUrl: n,
654
658
  source: m,
655
- containedImage: !g && p === "document"
659
+ containedImage: !v && N === "document"
656
660
  }
657
661
  ),
658
662
  /* @__PURE__ */ e(
659
- z,
663
+ U,
660
664
  {
661
665
  variant: "light",
662
666
  title: t,
663
667
  mimeType: r,
664
668
  detail: i,
665
669
  statusBadge: /* @__PURE__ */ e(
666
- O,
670
+ _,
667
671
  {
668
672
  isMine: !1,
669
673
  paymentStatus: l,
670
674
  amountText: a
671
675
  }
672
676
  ),
673
- icon: f ? U("light") : void 0,
677
+ icon: f ? j("light") : void 0,
674
678
  action: /* @__PURE__ */ e(
675
- re,
679
+ ne,
676
680
  {
677
- isLocked: g,
681
+ isLocked: v,
678
682
  isUnlocking: o,
679
- sourceUrl: M,
680
- redeemUrl: N,
681
- onUnlockClicked: x,
683
+ sourceUrl: k,
684
+ redeemUrl: w,
685
+ onUnlockClicked: p,
682
686
  onDownloadClicked: d
683
687
  }
684
688
  )
@@ -687,8 +691,8 @@ const C = "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounde
687
691
  ]
688
692
  }
689
693
  );
690
- }, be = (t) => t.isDraft ? /* @__PURE__ */ e(ne, { ...t }) : t.isPreview ? /* @__PURE__ */ e(se, { ...t }) : t.isMine ? /* @__PURE__ */ e(le, { ...t }) : /* @__PURE__ */ e(ce, { ...t });
694
+ }, ge = (t) => t.isDraft ? /* @__PURE__ */ e(se, { ...t }) : t.isPreview ? /* @__PURE__ */ e(le, { ...t }) : t.isMine ? /* @__PURE__ */ e(oe, { ...t }) : /* @__PURE__ */ e(ce, { ...t });
691
695
  export {
692
- be as default
696
+ ge as default
693
697
  };
694
- //# sourceMappingURL=Card-CQcaDQQj.js.map
698
+ //# sourceMappingURL=Card-DRuAkKPA.js.map