@linktr.ee/messaging-react 3.5.4-rc-1782920176 → 3.5.4

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 (38) hide show
  1. package/dist/{Card-Cvy-wtHk.cjs → Card--81_C_sQ.cjs} +2 -2
  2. package/dist/{Card-Cvy-wtHk.cjs.map → Card--81_C_sQ.cjs.map} +1 -1
  3. package/dist/{Card-yGooZXB0.cjs → Card-B3vKWCNO.cjs} +2 -2
  4. package/dist/{Card-yGooZXB0.cjs.map → Card-B3vKWCNO.cjs.map} +1 -1
  5. package/dist/{Card-CxeRmW47.cjs → Card-CeONWqN2.cjs} +2 -2
  6. package/dist/{Card-CxeRmW47.cjs.map → Card-CeONWqN2.cjs.map} +1 -1
  7. package/dist/{Card-CKV0d2i9.js → Card-Dxq760eB.js} +3 -3
  8. package/dist/{Card-CKV0d2i9.js.map → Card-Dxq760eB.js.map} +1 -1
  9. package/dist/{Card-BkToB7yL.js → Card-Ss_tlf9e.js} +2 -2
  10. package/dist/{Card-BkToB7yL.js.map → Card-Ss_tlf9e.js.map} +1 -1
  11. package/dist/{Card-DbdWoTwf.js → Card-ukTqXWLq.js} +2 -2
  12. package/dist/{Card-DbdWoTwf.js.map → Card-ukTqXWLq.js.map} +1 -1
  13. package/dist/{LockedThumbnail-PsO_A6dM.js → LockedThumbnail-BC_Di5pi.js} +3 -3
  14. package/dist/{LockedThumbnail-PsO_A6dM.js.map → LockedThumbnail-BC_Di5pi.js.map} +1 -1
  15. package/dist/{LockedThumbnail-Dkr6-8Lw.cjs → LockedThumbnail-DDOEKes4.cjs} +2 -2
  16. package/dist/{LockedThumbnail-Dkr6-8Lw.cjs.map → LockedThumbnail-DDOEKes4.cjs.map} +1 -1
  17. package/dist/assets/index.css +1 -1
  18. package/dist/{index-B7fsmwKg.js → index-Tv7yJSkO.js} +87 -87
  19. package/dist/index-Tv7yJSkO.js.map +1 -0
  20. package/dist/index-wqJgn5CZ.cjs +2 -0
  21. package/dist/index-wqJgn5CZ.cjs.map +1 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/AttachmentCard/index.tsx +1 -1
  26. package/src/components/Avatar/Avatar.test.tsx +16 -12
  27. package/src/components/Avatar/index.tsx +7 -3
  28. package/src/components/CustomLinkPreviewList/CustomLinkPreviewCard.tsx +1 -1
  29. package/src/components/CustomMessage/MessageAttachmentConversations.stories.tsx +1 -1
  30. package/src/components/CustomMessage/MessageTag.stories.tsx +2 -2
  31. package/src/components/LinkAttachment/components/_shared/CardShell.tsx +1 -1
  32. package/src/components/LockedAttachment/components/_shared/LockedCardShell.tsx +1 -1
  33. package/src/components/MediaMessage/index.tsx +1 -1
  34. package/src/components/MessageAttachment/_shared/Bubble.tsx +3 -3
  35. package/src/styles.css +4 -5
  36. package/dist/index-B7fsmwKg.js.map +0 -1
  37. package/dist/index-CwyUGS68.cjs +0 -2
  38. package/dist/index-CwyUGS68.cjs.map +0 -1
@@ -2,10 +2,10 @@ import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
2
  import F, { createContext as Xe, useContext as ye, useCallback as W, useState as $, useRef as H, useEffect as q, useId as Sn, useMemo as re, Suspense as Ke } from "react";
3
3
  import { StreamChatService as Tn } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as An, LinkPreviewsManager as Dt } from "stream-chat";
5
- import { Chat as Mn, DateSeparator as Rn, useChannelStateContext as de, useChatContext as ue, areMessageUIPropsEqual as Ln, useMessageReminder as Dn, useComponentContext as Ht, Attachment as Pn, EditMessageModal as zn, MessageBlocked as On, MessageBouncePrompt as $n, MessageDeleted as Fn, MessageIsThreadReplyInChannelButtonIndicator as Bn, MessageRepliesCountButton as Un, ReminderNotification as jn, StreamedMessageText as Vn, messageHasAttachments as Gn, messageHasReactions as Hn, isDateSeparatorMessage as Yn, isMessageBlocked as qn, isMessageBounced as Wn, MessageBounceModal as Xn, MessageText as Pt, Poll as Kn, MessageErrorIcon as Jn, useMessageContext as ke, useMessageComposer as Zn, useStateStore as Qn, MessageInput as es, useMessageInputContext as ts, useMessageComposerHasSendableData as ns, AttachmentPreviewList as ss, QuotedMessagePreview as as, TextareaComposer as rs, MessageTimestamp as Fe, AIStates as Be, useTypingContext as is, useAIState as os, Channel as ls, WithComponents as cs, Window as ds, MessageList as us, ChannelList as ms, InfiniteScroll as hs } from "stream-chat-react";
6
- import { StarIcon as He, DotsThreeIcon as fs, SpinnerGapIcon as Ae, SignOutIcon as gs, ProhibitInsetIcon as zt, FlagIcon as Yt, FileIcon as qt, ImageIcon as ps, SpeakerHighIcon as bs, VideoCameraIcon as Wt, FileMdIcon as vs, FileTextIcon as xs, FileZipIcon as ws, FilePptIcon as Ns, FileCsvIcon as _s, FileXlsIcon as ys, FileDocIcon as ks, FilePdfIcon as Cs, CircleNotchIcon as Ne, PlayIcon as Ye, PauseIcon as Es, LinkIcon as Is, DownloadSimpleIcon as _e, GiftIcon as Ss, ThumbsUpIcon as Ts, ThumbsDownIcon as As, TrashSimpleIcon as Ms, XIcon as ze, ArrowUpIcon as Rs, SparkleIcon as ve, ProhibitIcon as Ls, ArrowLeftIcon as Ot, CaretRightIcon as xe, PencilSimpleIcon as Ds, CaretLeftIcon as Ps } from "@phosphor-icons/react";
5
+ import { Chat as Mn, DateSeparator as Rn, useChannelStateContext as de, useChatContext as ue, areMessageUIPropsEqual as Ln, useMessageReminder as Dn, useComponentContext as Ht, Attachment as Pn, EditMessageModal as On, MessageBlocked as zn, MessageBouncePrompt as $n, MessageDeleted as Fn, MessageIsThreadReplyInChannelButtonIndicator as Bn, MessageRepliesCountButton as Un, ReminderNotification as jn, StreamedMessageText as Vn, messageHasAttachments as Gn, messageHasReactions as Hn, isDateSeparatorMessage as Yn, isMessageBlocked as qn, isMessageBounced as Wn, MessageBounceModal as Xn, MessageText as Pt, Poll as Kn, MessageErrorIcon as Jn, useMessageContext as ke, useMessageComposer as Zn, useStateStore as Qn, MessageInput as es, useMessageInputContext as ts, useMessageComposerHasSendableData as ns, AttachmentPreviewList as ss, QuotedMessagePreview as as, TextareaComposer as rs, MessageTimestamp as Fe, AIStates as Be, useTypingContext as is, useAIState as os, Channel as ls, WithComponents as cs, Window as ds, MessageList as us, ChannelList as ms, InfiniteScroll as hs } from "stream-chat-react";
6
+ import { StarIcon as He, DotsThreeIcon as fs, SpinnerGapIcon as Ae, SignOutIcon as gs, ProhibitInsetIcon as Ot, FlagIcon as Yt, FileIcon as qt, ImageIcon as ps, SpeakerHighIcon as bs, VideoCameraIcon as Wt, FileMdIcon as vs, FileTextIcon as xs, FileZipIcon as ws, FilePptIcon as Ns, FileCsvIcon as _s, FileXlsIcon as ys, FileDocIcon as ks, FilePdfIcon as Cs, CircleNotchIcon as Ne, PlayIcon as Ye, PauseIcon as Es, LinkIcon as Is, DownloadSimpleIcon as _e, GiftIcon as Ss, ThumbsUpIcon as Ts, ThumbsDownIcon as As, TrashSimpleIcon as Ms, XIcon as Oe, ArrowUpIcon as Rs, SparkleIcon as ve, ProhibitIcon as Ls, ArrowLeftIcon as zt, CaretRightIcon as xe, PencilSimpleIcon as Ds, CaretLeftIcon as Ps } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
- import { MessageActions as zs, DefaultDropdownActionButton as Xt } from "stream-chat-react/experimental";
8
+ import { MessageActions as Os, DefaultDropdownActionButton as Xt } from "stream-chat-react/experimental";
9
9
  const Kt = Xe({
10
10
  service: null,
11
11
  client: null,
@@ -78,20 +78,20 @@ const Kt = Xe({
78
78
  renderCount: y,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const O = new Tn({
81
+ const z = new Tn({
82
82
  ...I,
83
83
  apiKey: a,
84
84
  debug: T.current,
85
85
  client: D
86
86
  });
87
- N.current = O, d(O), o("✅ SERVICE SET", {
87
+ N.current = z, d(z), o("✅ SERVICE SET", {
88
88
  renderCount: y,
89
- serviceInstance: !!O
89
+ serviceInstance: !!z
90
90
  });
91
91
  }, [a, D]);
92
92
  const B = H(null);
93
93
  q(() => {
94
- var I, O;
94
+ var I, z;
95
95
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!l,
97
97
  hasUser: !!t,
@@ -107,7 +107,7 @@ const Kt = Xe({
107
107
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((I = B.current) == null ? void 0 : I.serviceId) === l && ((O = B.current) == null ? void 0 : O.userId) === t.id) {
110
+ if (((I = B.current) == null ? void 0 : I.serviceId) === l && ((z = B.current) == null ? void 0 : z.userId) === t.id) {
111
111
  o(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -118,13 +118,13 @@ const Kt = Xe({
118
118
  o("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), v(null);
119
119
  try {
120
120
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const z = await l.connectUser(t);
122
- g(z), f(!0), B.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
121
+ const O = await l.connectUser(t);
122
+ g(O), f(!0), B.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: z.userID
124
+ clientId: O.userID
125
125
  });
126
- } catch (z) {
127
- const U = z instanceof Error ? z.message : "Connection failed";
126
+ } catch (O) {
127
+ const U = O instanceof Error ? O.message : "Connection failed";
128
128
  v(U), o("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: U
@@ -206,7 +206,7 @@ const Kt = Xe({
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, Os = () => Je(), Jt = (e) => {
209
+ }, zs = () => Je(), Jt = (e) => {
210
210
  var a, r;
211
211
  const [t, s] = $(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -307,7 +307,7 @@ const ne = ({
307
307
  shape: i = "squircle",
308
308
  dmAgentEnabled: o = !1
309
309
  }) => {
310
- const l = Vs(e), u = s < 20 ? 10 : s < 32 ? 12 : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, m = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: m, children: t ? /* @__PURE__ */ n(
310
+ const l = Vs(e), d = 0.45, g = s < 32 ? Math.round(s * d) : s < 56 ? 14 : s < 120 ? 18 : 36, m = s >= 40 ? 2 : 1, f = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, c = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: f, children: t ? /* @__PURE__ */ n(
311
311
  "img",
312
312
  {
313
313
  src: t,
@@ -321,7 +321,7 @@ const ne = ({
321
321
  className: k(
322
322
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors"
323
323
  ),
324
- style: { fontSize: `${u}px`, lineHeight: 1 },
324
+ style: { fontSize: g, lineHeight: 1 },
325
325
  children: l
326
326
  }
327
327
  ) });
@@ -355,15 +355,15 @@ const ne = ({
355
355
  "bg-transparent"
356
356
  ),
357
357
  style: {
358
- ...m,
358
+ ...f,
359
359
  ...o && {
360
- borderWidth: `${g}px`,
360
+ borderWidth: `${m}px`,
361
361
  borderStyle: "solid",
362
362
  borderColor: "var(--AI-Gradient, #7F22FE)",
363
363
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
364
364
  }
365
365
  },
366
- children: f
366
+ children: c
367
367
  }
368
368
  )
369
369
  ]
@@ -432,8 +432,8 @@ const ne = ({
432
432
  l == null || l(), f && console.log(`[${g}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
433
433
  try {
434
434
  await m.blockUser((y = t == null ? void 0 : t.user) == null ? void 0 : y.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
435
- } catch (O) {
436
- console.error(`[${g}] Failed to block member`, O);
435
+ } catch (z) {
436
+ console.error(`[${g}] Failed to block member`, z);
437
437
  } finally {
438
438
  M(!1);
439
439
  }
@@ -445,8 +445,8 @@ const ne = ({
445
445
  l == null || l(), f && console.log(`[${g}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
446
446
  try {
447
447
  await m.unBlockUser((y = t == null ? void 0 : t.user) == null ? void 0 : y.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
448
- } catch (O) {
449
- console.error(`[${g}] Failed to unblock member`, O);
448
+ } catch (z) {
449
+ console.error(`[${g}] Failed to unblock member`, z);
450
450
  } finally {
451
451
  M(!1);
452
452
  }
@@ -571,7 +571,7 @@ const ne = ({
571
571
  disabled: T,
572
572
  "aria-busy": T,
573
573
  children: [
574
- T ? /* @__PURE__ */ n(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(zt, { className: "h-5 w-5" }),
574
+ T ? /* @__PURE__ */ n(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Ot, { className: "h-5 w-5" }),
575
575
  /* @__PURE__ */ n("span", { children: "Unblock" })
576
576
  ]
577
577
  }
@@ -582,7 +582,7 @@ const ne = ({
582
582
  disabled: T,
583
583
  "aria-busy": T,
584
584
  children: [
585
- T ? /* @__PURE__ */ n(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(zt, { className: "h-5 w-5" }),
585
+ T ? /* @__PURE__ */ n(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Ot, { className: "h-5 w-5" }),
586
586
  /* @__PURE__ */ n("span", { children: "Block" })
587
587
  ]
588
588
  }
@@ -638,7 +638,7 @@ function Qt({
638
638
  const s = e == null ? void 0 : e.text, a = Xs(t);
639
639
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
640
640
  }
641
- const Ks = F.lazy(() => import("./Card-BkToB7yL.js")), Js = F.lazy(() => import("./Card-DbdWoTwf.js")), Zs = F.lazy(() => import("./Card-CKV0d2i9.js")), Qe = () => /* @__PURE__ */ n(
641
+ const Ks = F.lazy(() => import("./Card-Ss_tlf9e.js")), Js = F.lazy(() => import("./Card-ukTqXWLq.js")), Zs = F.lazy(() => import("./Card-Dxq760eB.js")), Qe = () => /* @__PURE__ */ n(
642
642
  "div",
643
643
  {
644
644
  className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
@@ -703,7 +703,7 @@ const ia = (e) => {
703
703
  }) => {
704
704
  const g = ie(t), m = H(null), f = H(null), c = H(null), b = H(r), [w, v] = $(a), [p, N] = $(0), [_, T] = $(!1), [R, M] = $(!1), [L, D] = $(!1), [B, P] = $(!1), [C, A] = $(!0), [E, y] = $(null), I = W(() => {
705
705
  D(!1), v(!0);
706
- }, []), O = W((x) => {
706
+ }, []), z = W((x) => {
707
707
  const S = f.current;
708
708
  if (!S) return 0;
709
709
  const G = S.getBoundingClientRect();
@@ -711,13 +711,13 @@ const ia = (e) => {
711
711
  0,
712
712
  Math.min(1, (ia(x) - G.left) / G.width)
713
713
  );
714
- }, []), z = W((x) => {
714
+ }, []), O = W((x) => {
715
715
  const S = m.current;
716
716
  S && S.duration && (S.currentTime = x * S.duration);
717
717
  }, []), U = (x) => {
718
718
  x.stopPropagation(), T(!0);
719
- const S = O(x);
720
- N(S), z(S);
719
+ const S = z(x);
720
+ N(S), O(S);
721
721
  };
722
722
  q(() => {
723
723
  r !== void 0 && r !== b.current && (b.current = r, v(r));
@@ -740,13 +740,13 @@ const ia = (e) => {
740
740
  }) : x.pause());
741
741
  }, [w]), q(() => {
742
742
  if (!_) return;
743
- const x = (G) => N(O(G)), S = (G) => {
744
- T(!1), z(O(G));
743
+ const x = (G) => N(z(G)), S = (G) => {
744
+ T(!1), O(z(G));
745
745
  };
746
746
  return window.addEventListener("mousemove", x), window.addEventListener("mouseup", S), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", S), () => {
747
747
  window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", S), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", S);
748
748
  };
749
- }, [_, O, z]);
749
+ }, [_, z, O]);
750
750
  const X = E ? { aspectRatio: String(E) } : void 0, Z = E ? "" : " aspect-video", Y = Math.round(p * 100);
751
751
  return /* @__PURE__ */ h(
752
752
  "div",
@@ -866,7 +866,7 @@ const ia = (e) => {
866
866
  onTouchStart: U,
867
867
  onClick: (x) => x.stopPropagation(),
868
868
  onKeyDown: (x) => {
869
- x.key === "ArrowRight" && z(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && z(Math.max(0, p - 0.05));
869
+ x.key === "ArrowRight" && O(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && O(Math.max(0, p - 0.05));
870
870
  },
871
871
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
872
872
  "div",
@@ -907,7 +907,7 @@ const ia = (e) => {
907
907
  onMouseEnter: () => M(!0),
908
908
  onMouseLeave: () => M(!1),
909
909
  onKeyDown: (x) => {
910
- x.key === "ArrowRight" && z(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && z(Math.max(0, p - 0.05));
910
+ x.key === "ArrowRight" && O(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && O(Math.max(0, p - 0.05));
911
911
  },
912
912
  children: [
913
913
  /* @__PURE__ */ n(
@@ -1039,7 +1039,7 @@ const ia = (e) => {
1039
1039
  "data-testid": m,
1040
1040
  className: k(
1041
1041
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1042
- f ? "bg-[#1e2330]" : "bg-white"
1042
+ f ? "bg-[#121110]" : "bg-white"
1043
1043
  ),
1044
1044
  children: [
1045
1045
  d ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
@@ -1087,7 +1087,7 @@ function rn(e) {
1087
1087
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1088
1088
  }
1089
1089
  function et(e) {
1090
- return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1090
+ return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1091
1091
  }
1092
1092
  function ca(e) {
1093
1093
  return e ? "bg-white/10" : "bg-black/5";
@@ -1427,10 +1427,10 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1427
1427
  viewerLanguage: v
1428
1428
  } = e, { client: p } = ue("CustomMessage"), { channel: N } = de("CustomMessage"), { isUnlocking: _, onUnlockClick: T, onFetchSource: R, onDownloadClick: M } = Na("LockedAttachment"), [L, D] = $(!1), B = Dn(c.id), { selected: P, voteUp: C, voteDown: A } = Ws(c), {
1429
1429
  Attachment: E = Pn,
1430
- EditMessageModal: y = zn,
1430
+ EditMessageModal: y = On,
1431
1431
  MessageActions: I,
1432
- MessageBlocked: O = On,
1433
- MessageBouncePrompt: z = $n,
1432
+ MessageBlocked: z = zn,
1433
+ MessageBouncePrompt: O = $n,
1434
1434
  MessageDeleted: U = Fn,
1435
1435
  MessageIsThreadReplyInChannelButtonIndicator: X = Bn,
1436
1436
  MessageRepliesCountButton: Z = Un,
@@ -1454,7 +1454,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1454
1454
  if (c.deleted_at || c.type === "deleted")
1455
1455
  return /* @__PURE__ */ n(U, { message: c });
1456
1456
  if (qn(c))
1457
- return /* @__PURE__ */ n(O, {});
1457
+ return /* @__PURE__ */ n(z, {});
1458
1458
  const ee = !w && !!c.reply_count, me = !w && c.show_in_channel && c.parent_id, he = c.status === "failed" && ((vt = c.error) == null ? void 0 : vt.status) !== 403, fe = Wn(c);
1459
1459
  let J;
1460
1460
  he ? J = () => u(c) : fe && (J = () => D(!0));
@@ -1486,7 +1486,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1486
1486
  L && /* @__PURE__ */ n(
1487
1487
  Xn,
1488
1488
  {
1489
- MessageBouncePrompt: z,
1489
+ MessageBouncePrompt: O,
1490
1490
  onClose: () => D(!1),
1491
1491
  open: L
1492
1492
  }
@@ -1673,7 +1673,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1673
1673
  var t;
1674
1674
  const { message: e } = ke("CustomMessageActions");
1675
1675
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1676
- zs,
1676
+ Os,
1677
1677
  {
1678
1678
  messageActionSet: [
1679
1679
  { Component: Ma, placement: "quick", type: "delete" },
@@ -1692,7 +1692,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1692
1692
  href: s,
1693
1693
  target: "_blank",
1694
1694
  rel: "noopener noreferrer",
1695
- className: "relative block w-full rounded-[24px] bg-[#1e2330] p-2 no-underline transition-opacity hover:opacity-90",
1695
+ className: "relative block w-full rounded-[24px] bg-[#121110] p-2 no-underline transition-opacity hover:opacity-90",
1696
1696
  children: [
1697
1697
  r && /* @__PURE__ */ n(
1698
1698
  "img",
@@ -1711,7 +1711,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1711
1711
  },
1712
1712
  className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
1713
1713
  "aria-label": "Close link preview",
1714
- children: /* @__PURE__ */ n(ze, { className: "size-4 text-black/90" })
1714
+ children: /* @__PURE__ */ n(Oe, { className: "size-4 text-black/90" })
1715
1715
  }
1716
1716
  ),
1717
1717
  /* @__PURE__ */ h("div", { className: "p-2", children: [
@@ -1725,7 +1725,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1725
1725
  linkPreviews: Array.from(e.previews.values()).filter(
1726
1726
  (t) => Dt.previewIsLoaded(t) || Dt.previewIsLoading(t)
1727
1727
  )
1728
- }), za = () => {
1728
+ }), Oa = () => {
1729
1729
  const { linkPreviewsManager: e } = Zn(), { linkPreviews: t } = Qn(
1730
1730
  e.state,
1731
1731
  Pa
@@ -1740,7 +1740,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1740
1740
  },
1741
1741
  r.og_scrape_url
1742
1742
  )) }) : null;
1743
- }, at = F.createContext(!1), Si = () => ye(at), Oa = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1743
+ }, at = F.createContext(!1), Si = () => ye(at), za = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1744
1744
  "button",
1745
1745
  {
1746
1746
  ...s,
@@ -1752,7 +1752,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1752
1752
  }
1753
1753
  ), $a = () => {
1754
1754
  const e = ye(at), { handleSubmit: t } = ts(), s = ns(), a = e || !s, {
1755
- SendButton: r = Oa,
1755
+ SendButton: r = za,
1756
1756
  AttachmentPreviewList: i = ss
1757
1757
  } = Ht("CustomMessageInput");
1758
1758
  return /* @__PURE__ */ h(
@@ -1762,7 +1762,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1762
1762
  "data-dd-privacy": "mask",
1763
1763
  children: [
1764
1764
  /* @__PURE__ */ n(as, {}),
1765
- /* @__PURE__ */ n(za, {}),
1765
+ /* @__PURE__ */ n(Oa, {}),
1766
1766
  /* @__PURE__ */ n(i, {}),
1767
1767
  /* @__PURE__ */ h("div", { className: "flex", children: [
1768
1768
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
@@ -2106,7 +2106,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2106
2106
  onParticipantNameClick: w,
2107
2107
  renderHeaderTitleBadges: v
2108
2108
  }) => {
2109
- var A, E, y, I, O, z;
2109
+ var A, E, y, I, z, O;
2110
2110
  const { channel: p } = de(), { client: N } = ue(), _ = F.useMemo(
2111
2111
  () => {
2112
2112
  var U;
@@ -2146,7 +2146,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2146
2146
  }),
2147
2147
  type: "button",
2148
2148
  "aria-label": "Back to conversations",
2149
- children: /* @__PURE__ */ n(Ot, { className: "size-5 text-black/90" })
2149
+ children: /* @__PURE__ */ n(zt, { className: "size-5 text-black/90" })
2150
2150
  }
2151
2151
  ) }),
2152
2152
  /* @__PURE__ */ n(
@@ -2266,7 +2266,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2266
2266
  type: "button",
2267
2267
  onClick: e,
2268
2268
  "aria-label": "Back to conversations",
2269
- children: /* @__PURE__ */ n(Ot, { className: "size-5 text-black/90" })
2269
+ children: /* @__PURE__ */ n(zt, { className: "size-5 text-black/90" })
2270
2270
  }
2271
2271
  ),
2272
2272
  w ? /* @__PURE__ */ h(
@@ -2283,7 +2283,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2283
2283
  /* @__PURE__ */ n(
2284
2284
  ne,
2285
2285
  {
2286
- id: ((O = _ == null ? void 0 : _.user) == null ? void 0 : O.id) || p.id || "unknown",
2286
+ id: ((z = _ == null ? void 0 : _.user) == null ? void 0 : z.id) || p.id || "unknown",
2287
2287
  name: T,
2288
2288
  image: R,
2289
2289
  starred: s && M,
@@ -2307,7 +2307,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2307
2307
  /* @__PURE__ */ n(
2308
2308
  ne,
2309
2309
  {
2310
- id: ((z = _ == null ? void 0 : _.user) == null ? void 0 : z.id) || p.id || "unknown",
2310
+ id: ((O = _ == null ? void 0 : _.user) == null ? void 0 : O.id) || p.id || "unknown",
2311
2311
  name: T,
2312
2312
  image: R,
2313
2313
  starred: s && M,
@@ -2420,7 +2420,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2420
2420
  var j;
2421
2421
  return ((j = Q.user) == null ? void 0 : j.id) === S;
2422
2422
  }) : void 0;
2423
- }, [A == null ? void 0 : A.userID, (Z = C.state) == null ? void 0 : Z.members]), I = ((Y = y == null ? void 0 : y.user) == null ? void 0 : Y.is_account) ?? (y == null ? void 0 : y.is_account), O = ((x = E == null ? void 0 : E.user) == null ? void 0 : x.is_account) ?? (E == null ? void 0 : E.is_account), z = M && I === !1 && O === !0, U = W(
2423
+ }, [A == null ? void 0 : A.userID, (Z = C.state) == null ? void 0 : Z.members]), I = ((Y = y == null ? void 0 : y.user) == null ? void 0 : Y.is_account) ?? (y == null ? void 0 : y.is_account), z = ((x = E == null ? void 0 : E.user) == null ? void 0 : x.is_account) ?? (E == null ? void 0 : E.is_account), O = M && I === !1 && z === !0, U = W(
2424
2424
  (S) => {
2425
2425
  const { message: G } = ke("ChannelView"), V = /* @__PURE__ */ n(
2426
2426
  Aa,
@@ -2449,7 +2449,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2449
2449
  showBackButton: t,
2450
2450
  showChannelInfo: D,
2451
2451
  showStarButton: w,
2452
- dmAgentEnabled: z,
2452
+ dmAgentEnabled: O,
2453
2453
  onLeaveConversation: i,
2454
2454
  onBlockParticipant: o,
2455
2455
  showDeleteConversation: l,
@@ -2524,8 +2524,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2524
2524
  sendButton: E,
2525
2525
  attachmentPreviewList: y,
2526
2526
  viewerLanguage: I,
2527
- showChannelInfo: O = !0,
2528
- onParticipantNameClick: z,
2527
+ showChannelInfo: z = !0,
2528
+ onParticipantNameClick: O,
2529
2529
  composerInput: U
2530
2530
  }) => {
2531
2531
  const X = W(
@@ -2607,8 +2607,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2607
2607
  renderChannelActions: P,
2608
2608
  renderMessage: C,
2609
2609
  viewerLanguage: I,
2610
- showChannelInfo: O,
2611
- onParticipantNameClick: z,
2610
+ showChannelInfo: z,
2611
+ onParticipantNameClick: O,
2612
2612
  composerInput: U
2613
2613
  }
2614
2614
  )
@@ -2667,7 +2667,7 @@ const Ti = ({
2667
2667
  refreshConnection: C,
2668
2668
  service: A,
2669
2669
  debug: E
2670
- } = Os(), [y, I] = $(null), [O, z] = $(null), [U, X] = $(!1), { showDeleteConversation: Z = !0 } = e, Y = H(o);
2670
+ } = zs(), [y, I] = $(null), [z, O] = $(null), [U, X] = $(!1), { showDeleteConversation: Z = !0 } = e, Y = H(o);
2671
2671
  Y.current = o;
2672
2672
  const x = H(a);
2673
2673
  x.current = a;
@@ -2700,7 +2700,7 @@ const Ti = ({
2700
2700
  { limit: 1 }
2701
2701
  );
2702
2702
  if (J.length > 0) {
2703
- I(J[0]), z(null), (he = x.current) == null || he.call(x, J[0]), E && console.log(
2703
+ I(J[0]), O(null), (he = x.current) == null || he.call(x, J[0]), E && console.log(
2704
2704
  "[MessagingShell] Initial conversation loaded:",
2705
2705
  J[0].id
2706
2706
  );
@@ -2708,7 +2708,7 @@ const Ti = ({
2708
2708
  }
2709
2709
  const te = Y.current;
2710
2710
  if (!te || !A) {
2711
- ee(), z("No conversation found with this account"), E && console.log(
2711
+ ee(), O("No conversation found with this account"), E && console.log(
2712
2712
  "[MessagingShell] No conversation found for:",
2713
2713
  i
2714
2714
  );
@@ -2720,7 +2720,7 @@ const Ti = ({
2720
2720
  name: te.name,
2721
2721
  phone: te.phone
2722
2722
  });
2723
- I(oe), z(null), (fe = x.current) == null || fe.call(x, oe), E && console.log(
2723
+ I(oe), O(null), (fe = x.current) == null || fe.call(x, oe), E && console.log(
2724
2724
  "[MessagingShell] Channel created and loaded:",
2725
2725
  oe.id
2726
2726
  );
@@ -2728,13 +2728,13 @@ const Ti = ({
2728
2728
  console.error(
2729
2729
  "[MessagingShell] Failed to create conversation:",
2730
2730
  oe
2731
- ), ee(), z("Failed to create conversation");
2731
+ ), ee(), O("Failed to create conversation");
2732
2732
  }
2733
2733
  } catch (J) {
2734
2734
  console.error(
2735
2735
  "[MessagingShell] Failed to load initial conversation:",
2736
2736
  J
2737
- ), ee(), G.current || z("Failed to load conversation");
2737
+ ), ee(), G.current || O("Failed to load conversation");
2738
2738
  }
2739
2739
  })();
2740
2740
  }, [i, L, D, A, E]);
@@ -2750,7 +2750,7 @@ const Ti = ({
2750
2750
  message: "Not connected to messaging service",
2751
2751
  onBack: C
2752
2752
  }
2753
- ) : O ? /* @__PURE__ */ n(we, { message: O }) : U && !y ? /* @__PURE__ */ n(we, { message: "Conversation ended" }) : y ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2753
+ ) : z ? /* @__PURE__ */ n(we, { message: z }) : U && !y ? /* @__PURE__ */ n(we, { message: "Conversation ended" }) : y ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2754
2754
  hn,
2755
2755
  {
2756
2756
  channel: y,
@@ -2853,13 +2853,13 @@ const fn = F.createContext({
2853
2853
  if (C[E].type !== "system") return C[E];
2854
2854
  }
2855
2855
  })(), _ = (() => {
2856
- var O, z, U, X;
2856
+ var z, O, U, X;
2857
2857
  const C = Qt({
2858
2858
  message: p,
2859
2859
  viewerLanguage: d
2860
2860
  });
2861
- if (((O = p == null ? void 0 : p.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_TIP") return C ? `💵 ${C}` : "💵 Sent a tip";
2862
- if (((z = p == null ? void 0 : p.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_PAID") return C ? `💰 ${C}` : "💰 Sent a message";
2861
+ if (((z = p == null ? void 0 : p.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return C ? `💵 ${C}` : "💵 Sent a tip";
2862
+ if (((O = p == null ? void 0 : p.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return C ? `💰 ${C}` : "💰 Sent a message";
2863
2863
  if (((U = p == null ? void 0 : p.metadata) == null ? void 0 : U.custom_type) === "MESSAGE_ATTACHMENT")
2864
2864
  return C ? `📎 ${C}` : "📎 Sent an attachment";
2865
2865
  if (C) return C;
@@ -3105,7 +3105,7 @@ const ur = {
3105
3105
  }) => {
3106
3106
  const u = s != null || a != null, g = k(
3107
3107
  pr,
3108
- l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
3108
+ l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3109
3109
  // `focus-ring` is a design-system utility from the component-library
3110
3110
  // tailwind preset — outline-none + a black 2px focus-visible ring
3111
3111
  // with offset, so keyboard users can see the focused card.
@@ -3158,7 +3158,7 @@ const ur = {
3158
3158
  }, vr = {
3159
3159
  dark: "size-16 text-white/25",
3160
3160
  light: "size-16 text-black/25"
3161
- }, Oe = (e, t) => !!t && !!e && ie(e) === "audio", pn = (e, t) => {
3161
+ }, ze = (e, t) => !!t && !!e && ie(e) === "audio", pn = (e, t) => {
3162
3162
  if (!t || !e) return !1;
3163
3163
  const s = ie(e);
3164
3164
  return s === "video" || s === "audio";
@@ -3172,7 +3172,7 @@ const ur = {
3172
3172
  topRight: o
3173
3173
  }) => {
3174
3174
  const l = ie(r), d = !!s && l === "video";
3175
- return Oe(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3175
+ return ze(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3176
3176
  "audio",
3177
3177
  {
3178
3178
  src: s,
@@ -3240,14 +3240,14 @@ const ur = {
3240
3240
  onDismiss: g,
3241
3241
  onEditClick: m
3242
3242
  }) => {
3243
- const f = l === "classic", c = Oe(r, o), b = g ? /* @__PURE__ */ n(
3243
+ const f = l === "classic", c = ze(r, o), b = g ? /* @__PURE__ */ n(
3244
3244
  "button",
3245
3245
  {
3246
3246
  type: "button",
3247
3247
  onClick: g,
3248
3248
  "aria-label": "Dismiss attachment",
3249
3249
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3250
- children: /* @__PURE__ */ n(ze, { className: "size-3", weight: "bold" })
3250
+ children: /* @__PURE__ */ n(Oe, { className: "size-3", weight: "bold" })
3251
3251
  }
3252
3252
  ) : void 0, w = m ? /* @__PURE__ */ n(
3253
3253
  "button",
@@ -3315,7 +3315,7 @@ const ur = {
3315
3315
  cta: d,
3316
3316
  onClick: u
3317
3317
  }) => {
3318
- const g = pn(a, i), m = rt(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = Oe(a, i) ? ot : void 0, w = d && u ? {
3318
+ const g = pn(a, i), m = rt(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = ze(a, i) ? ot : void 0, w = d && u ? {
3319
3319
  ...d,
3320
3320
  onClick: () => {
3321
3321
  var v;
@@ -3376,7 +3376,7 @@ const ur = {
3376
3376
  variant: "dark",
3377
3377
  href: c,
3378
3378
  onClick: b,
3379
- bgClassName: Oe(r, o) ? ot : void 0,
3379
+ bgClassName: ze(r, o) ? ot : void 0,
3380
3380
  children: [
3381
3381
  l === "featured" && /* @__PURE__ */ n(
3382
3382
  Pe,
@@ -3408,7 +3408,7 @@ const ur = {
3408
3408
  Sent: Nr,
3409
3409
  Received: wr
3410
3410
  }, _r = {
3411
- dark: "bg-[#1e2330]",
3411
+ dark: "bg-[#121110]",
3412
3412
  light: "bg-[#e9eaed]"
3413
3413
  }, yr = {
3414
3414
  dark: "text-white",
@@ -3497,7 +3497,7 @@ const ur = {
3497
3497
  "flex size-6 items-center justify-center rounded-full text-white",
3498
3498
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3499
3499
  ),
3500
- children: /* @__PURE__ */ n(ze, { className: "size-3", weight: "bold" })
3500
+ children: /* @__PURE__ */ n(Oe, { className: "size-3", weight: "bold" })
3501
3501
  }
3502
3502
  ), Ie = (e) => e === "received" ? "light" : "dark", Mi = ({
3503
3503
  firstOfGroup: e,
@@ -3593,7 +3593,7 @@ function Pr(e, t) {
3593
3593
  if (!(!a || a === "*"))
3594
3594
  return a.toUpperCase();
3595
3595
  }
3596
- function zr(e, t, s) {
3596
+ function Or(e, t, s) {
3597
3597
  const a = Pr(e, t), r = typeof s == "number" && s > 0 ? Lr(s) : void 0;
3598
3598
  return [a, r].filter(Boolean).join(" · ") || void 0;
3599
3599
  }
@@ -3605,7 +3605,7 @@ function ae(e) {
3605
3605
  return "download";
3606
3606
  }
3607
3607
  }
3608
- const Or = {
3608
+ const zr = {
3609
3609
  dark: "text-white/55",
3610
3610
  light: "text-black/65"
3611
3611
  }, $r = {
@@ -3624,7 +3624,7 @@ const Or = {
3624
3624
  activateLabel: o,
3625
3625
  trailingAction: l
3626
3626
  }) => {
3627
- const d = s ?? t ?? "File", u = zr(a, t, r), g = /* @__PURE__ */ n(
3627
+ const d = s ?? t ?? "File", u = Or(a, t, r), g = /* @__PURE__ */ n(
3628
3628
  "div",
3629
3629
  {
3630
3630
  className: k(
@@ -3644,7 +3644,7 @@ const Or = {
3644
3644
  {
3645
3645
  className: k(
3646
3646
  "truncate text-xs leading-4",
3647
- Or[e]
3647
+ zr[e]
3648
3648
  ),
3649
3649
  children: u
3650
3650
  }
@@ -3996,7 +3996,7 @@ const Br = ({
3996
3996
  onClick: t,
3997
3997
  "aria-label": "Close viewer",
3998
3998
  className: "mes-media-viewer__action",
3999
- children: /* @__PURE__ */ n(ze, { size: 20, weight: "bold", "aria-hidden": !0 })
3999
+ children: /* @__PURE__ */ n(Oe, { size: 20, weight: "bold", "aria-hidden": !0 })
4000
4000
  }
4001
4001
  )
4002
4002
  ] })
@@ -4634,7 +4634,7 @@ export {
4634
4634
  Na as D,
4635
4635
  Ws as E,
4636
4636
  Li as F,
4637
- Os as G,
4637
+ zs as G,
4638
4638
  Ai as L,
4639
4639
  Ei as M,
4640
4640
  be as a,
@@ -4649,7 +4649,7 @@ export {
4649
4649
  Ia as j,
4650
4650
  Ci as k,
4651
4651
  Ti as l,
4652
- zr as m,
4652
+ Or as m,
4653
4653
  Lr as n,
4654
4654
  ir as o,
4655
4655
  Pr as p,
@@ -4664,4 +4664,4 @@ export {
4664
4664
  st as y,
4665
4665
  Zt as z
4666
4666
  };
4667
- //# sourceMappingURL=index-B7fsmwKg.js.map
4667
+ //# sourceMappingURL=index-Tv7yJSkO.js.map