@linktr.ee/messaging-react 3.3.13-rc-1782276914 → 3.3.13-rc-1782277797
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/{Card-D3GZ1U9K.cjs → Card-BDVT0cV2.cjs} +2 -2
- package/dist/{Card-D3GZ1U9K.cjs.map → Card-BDVT0cV2.cjs.map} +1 -1
- package/dist/{Card-hH0rGjK-.cjs → Card-BTJMCVf1.cjs} +2 -2
- package/dist/{Card-hH0rGjK-.cjs.map → Card-BTJMCVf1.cjs.map} +1 -1
- package/dist/{Card-D7dNfO0R.cjs → Card-DBp_8QQn.cjs} +2 -2
- package/dist/{Card-D7dNfO0R.cjs.map → Card-DBp_8QQn.cjs.map} +1 -1
- package/dist/{Card-Dj4FxfS8.js → Card-Dv2KEVRW.js} +2 -2
- package/dist/{Card-Dj4FxfS8.js.map → Card-Dv2KEVRW.js.map} +1 -1
- package/dist/{Card-CqIwxaqP.js → Card-Hn41fH7f.js} +3 -3
- package/dist/{Card-CqIwxaqP.js.map → Card-Hn41fH7f.js.map} +1 -1
- package/dist/{Card-mB_H4qWR.js → Card-NVRWULiK.js} +2 -2
- package/dist/{Card-mB_H4qWR.js.map → Card-NVRWULiK.js.map} +1 -1
- package/dist/{LockedThumbnail-BxPfcpA1.cjs → LockedThumbnail-CocS6J_E.cjs} +2 -2
- package/dist/{LockedThumbnail-BxPfcpA1.cjs.map → LockedThumbnail-CocS6J_E.cjs.map} +1 -1
- package/dist/{LockedThumbnail-Cr5Ef1lP.js → LockedThumbnail-D2vwt1XN.js} +2 -2
- package/dist/{LockedThumbnail-Cr5Ef1lP.js.map → LockedThumbnail-D2vwt1XN.js.map} +1 -1
- package/dist/{index-BtwKlrVN.js → index-CAotDlQ-.js} +67 -69
- package/dist/index-CAotDlQ-.js.map +1 -0
- package/dist/index-DXtxvlA5.cjs +2 -0
- package/dist/index-DXtxvlA5.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -8
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/ChannelView.tsx +4 -10
- package/src/types.ts +3 -6
- package/dist/index-BtwKlrVN.js.map +0 -1
- package/dist/index-ZypBvHiI.cjs +0 -2
- package/dist/index-ZypBvHiI.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as n, jsxs as h, Fragment as
|
|
2
|
-
import V, { createContext as Ge, useContext as Te, useCallback as W, useState as P, useRef as G, useEffect as Y, useId as En, useMemo as
|
|
1
|
+
import { jsx as n, jsxs as h, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import V, { createContext as Ge, useContext as Te, useCallback as W, useState as P, useRef as G, useEffect as Y, useId as En, useMemo as te, Suspense as He } from "react";
|
|
3
3
|
import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { StreamChat as In, LinkPreviewsManager as Tt } from "stream-chat";
|
|
5
5
|
import { Chat as Tn, DateSeparator as An, useChannelStateContext as de, useChatContext as Ye, areMessageUIPropsEqual as Mn, useMessageReminder as Rn, useComponentContext as Ut, Attachment as Ln, EditMessageModal as Dn, MessageBlocked as Pn, MessageBouncePrompt as On, MessageDeleted as zn, MessageIsThreadReplyInChannelButtonIndicator as $n, MessageRepliesCountButton as Fn, ReminderNotification as Bn, StreamedMessageText as Un, messageHasAttachments as jn, messageHasReactions as Vn, isDateSeparatorMessage as Gn, isMessageBlocked as Hn, isMessageBounced as Yn, MessageBounceModal as qn, MessageText as At, Poll as Wn, MessageErrorIcon as Xn, useMessageContext as ve, useMessageComposer as Kn, useStateStore as Jn, MessageInput as Zn, useMessageInputContext as Qn, useMessageComposerHasSendableData as es, AttachmentPreviewList as ts, QuotedMessagePreview as ns, TextareaComposer as ss, MessageTimestamp as Le, AIStates as De, useTypingContext as as, useAIState as rs, Channel as is, WithComponents as os, Window as ls, MessageList as cs, ChannelList as ds, InfiniteScroll as us } from "stream-chat-react";
|
|
@@ -279,7 +279,7 @@ function Bs(e) {
|
|
|
279
279
|
const s = Fs(e) % Dt.length;
|
|
280
280
|
return Dt[s];
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const re = ({
|
|
283
283
|
id: e,
|
|
284
284
|
image: t,
|
|
285
285
|
size: s = 40,
|
|
@@ -582,7 +582,7 @@ function Gs(e) {
|
|
|
582
582
|
return e != null && e.length ? e.some((t) => t.type === Ve) ? "down" : e.some((t) => t.type === je) ? "up" : null : null;
|
|
583
583
|
}
|
|
584
584
|
function Hs(e) {
|
|
585
|
-
const { channel: t } = de(), { client: s } = Ye("useMessageVote"), a =
|
|
585
|
+
const { channel: t } = de(), { client: s } = Ye("useMessageVote"), a = te(
|
|
586
586
|
() => Gs(e.own_reactions),
|
|
587
587
|
[e.own_reactions]
|
|
588
588
|
), r = W(async () => {
|
|
@@ -619,7 +619,7 @@ function Xt({
|
|
|
619
619
|
const s = e == null ? void 0 : e.text, a = Ys(t);
|
|
620
620
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
621
621
|
}
|
|
622
|
-
const qs = V.lazy(() => import("./Card-
|
|
622
|
+
const qs = V.lazy(() => import("./Card-Dv2KEVRW.js")), Ws = V.lazy(() => import("./Card-NVRWULiK.js")), Xs = V.lazy(() => import("./Card-Hn41fH7f.js")), We = () => /* @__PURE__ */ n(
|
|
623
623
|
"div",
|
|
624
624
|
{
|
|
625
625
|
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)]",
|
|
@@ -635,7 +635,7 @@ const qs = V.lazy(() => import("./Card-Dj4FxfS8.js")), Ws = V.lazy(() => import(
|
|
|
635
635
|
[/plain|rtf/, "text"],
|
|
636
636
|
[/markdown/, "markdown"]
|
|
637
637
|
];
|
|
638
|
-
function
|
|
638
|
+
function se(e) {
|
|
639
639
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
640
640
|
}
|
|
641
641
|
function Zt(e) {
|
|
@@ -661,7 +661,7 @@ const ea = {
|
|
|
661
661
|
generic: Vt
|
|
662
662
|
};
|
|
663
663
|
function na(e) {
|
|
664
|
-
const t =
|
|
664
|
+
const t = se(e);
|
|
665
665
|
return t !== "document" ? ea[t] : ta[Zt(e)];
|
|
666
666
|
}
|
|
667
667
|
function ce(e, t) {
|
|
@@ -682,7 +682,7 @@ const sa = (e) => {
|
|
|
682
682
|
muted: d = !1,
|
|
683
683
|
onContainerClick: m
|
|
684
684
|
}) => {
|
|
685
|
-
const g =
|
|
685
|
+
const g = se(t), u = G(null), f = G(null), c = G(null), b = G(r), [x, p] = P(a), [w, _] = P(0), [k, S] = P(!1), [R, D] = P(!1), [O, T] = P(!1), [N, E] = P(!1), [L, F] = P(!0), [I, A] = P(null), M = W(() => {
|
|
686
686
|
T(!1), p(!0);
|
|
687
687
|
}, []), z = W((v) => {
|
|
688
688
|
const y = f.current;
|
|
@@ -927,7 +927,7 @@ const sa = (e) => {
|
|
|
927
927
|
mediaPlayerProps: i,
|
|
928
928
|
containedImage: o = !1
|
|
929
929
|
}) => {
|
|
930
|
-
const l =
|
|
930
|
+
const l = se(e), [d, m] = P(!1);
|
|
931
931
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
932
932
|
aa,
|
|
933
933
|
{
|
|
@@ -1211,7 +1211,7 @@ const sn = ({
|
|
|
1211
1211
|
fileSize: a,
|
|
1212
1212
|
thumbnailUrl: r
|
|
1213
1213
|
}) => {
|
|
1214
|
-
const i =
|
|
1214
|
+
const i = se(t), o = a !== void 0 ? tn(a) : void 0;
|
|
1215
1215
|
return /* @__PURE__ */ n(
|
|
1216
1216
|
en,
|
|
1217
1217
|
{
|
|
@@ -1240,7 +1240,7 @@ const sn = ({
|
|
|
1240
1240
|
const s = Je(e), a = Ze(e);
|
|
1241
1241
|
return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
|
|
1242
1242
|
!t && e.user && /* @__PURE__ */ n(
|
|
1243
|
-
|
|
1243
|
+
re,
|
|
1244
1244
|
{
|
|
1245
1245
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1246
1246
|
id: e.user.id,
|
|
@@ -1347,10 +1347,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1347
1347
|
s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
1348
1348
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
1349
1349
|
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: o ? 12 : 15 }) });
|
|
1350
|
-
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(
|
|
1350
|
+
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(ne, { children: [
|
|
1351
1351
|
m,
|
|
1352
1352
|
g
|
|
1353
|
-
] }) : /* @__PURE__ */ h(
|
|
1353
|
+
] }) : /* @__PURE__ */ h(ne, { children: [
|
|
1354
1354
|
g,
|
|
1355
1355
|
m
|
|
1356
1356
|
] }) });
|
|
@@ -1418,15 +1418,15 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1418
1418
|
ReminderNotification: B = Bn,
|
|
1419
1419
|
StreamedMessageText: v = Un,
|
|
1420
1420
|
PinIndicator: y
|
|
1421
|
-
} = Ut("CustomMessage"), j = jn(c), q = Vn(c), K =
|
|
1421
|
+
} = Ut("CustomMessage"), j = jn(c), q = Vn(c), K = te(
|
|
1422
1422
|
() => u == null ? void 0 : u(c),
|
|
1423
1423
|
[u, c]
|
|
1424
|
-
), J =
|
|
1424
|
+
), J = te(() => {
|
|
1425
1425
|
const he = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...he] : he;
|
|
1426
1426
|
if (!ke(c)) return ye;
|
|
1427
1427
|
const St = ye.filter((It) => !("type" in It) || !nn(It));
|
|
1428
1428
|
return St.length === ye.length ? ye : St;
|
|
1429
|
-
}, [c]),
|
|
1429
|
+
}, [c]), ie = te(() => {
|
|
1430
1430
|
const he = Xt({ message: c, viewerLanguage: p });
|
|
1431
1431
|
return he === c.text ? c : { ...c, text: he };
|
|
1432
1432
|
}, [c, p]);
|
|
@@ -1436,9 +1436,9 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1436
1436
|
return /* @__PURE__ */ n(U, { message: c });
|
|
1437
1437
|
if (Hn(c))
|
|
1438
1438
|
return /* @__PURE__ */ n(z, {});
|
|
1439
|
-
const Z = !x && !!c.reply_count,
|
|
1440
|
-
let
|
|
1441
|
-
ee ?
|
|
1439
|
+
const Z = !x && !!c.reply_count, ae = !x && c.show_in_channel && c.parent_id, ee = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt = Yn(c);
|
|
1440
|
+
let oe;
|
|
1441
|
+
ee ? oe = () => m(c) : lt && (oe = () => T(!0));
|
|
1442
1442
|
const ue = f(), kn = C(
|
|
1443
1443
|
"str-chat__message str-chat__message-simple",
|
|
1444
1444
|
`str-chat__message--${c.type}`,
|
|
@@ -1451,13 +1451,13 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1451
1451
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
1452
1452
|
"str-chat__message--with-reactions": q,
|
|
1453
1453
|
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((ft = c == null ? void 0 : c.error) == null ? void 0 : ft.status) !== 403,
|
|
1454
|
-
"str-chat__message-with-thread-link": Z ||
|
|
1454
|
+
"str-chat__message-with-thread-link": Z || ae,
|
|
1455
1455
|
"str-chat__virtual-message__wrapper--end": r,
|
|
1456
1456
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1457
1457
|
"str-chat__virtual-message__wrapper--group": o
|
|
1458
1458
|
}
|
|
1459
1459
|
), ct = c.poll_id && w.polls.fromState(c.poll_id), dt = ya(c), me = ke(c), ut = Na(c), Re = !!(J != null && J.length && !c.quoted_message), mt = me && ue && Re;
|
|
1460
|
-
return /* @__PURE__ */ h(
|
|
1460
|
+
return /* @__PURE__ */ h(ne, { children: [
|
|
1461
1461
|
a && /* @__PURE__ */ n(
|
|
1462
1462
|
A,
|
|
1463
1463
|
{
|
|
@@ -1481,7 +1481,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1481
1481
|
y && /* @__PURE__ */ n(y, {}),
|
|
1482
1482
|
!!N && /* @__PURE__ */ n(B, { reminder: N }),
|
|
1483
1483
|
c.user && /* @__PURE__ */ n(
|
|
1484
|
-
|
|
1484
|
+
re,
|
|
1485
1485
|
{
|
|
1486
1486
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1487
1487
|
id: c.user.id,
|
|
@@ -1499,10 +1499,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1499
1499
|
"str-chat__simple-message--error-failed": ee || lt
|
|
1500
1500
|
}),
|
|
1501
1501
|
"data-testid": "message-inner",
|
|
1502
|
-
onClick:
|
|
1503
|
-
onKeyDown:
|
|
1504
|
-
role:
|
|
1505
|
-
tabIndex:
|
|
1502
|
+
onClick: oe,
|
|
1503
|
+
onKeyDown: oe,
|
|
1504
|
+
role: oe ? "button" : void 0,
|
|
1505
|
+
tabIndex: oe ? 0 : void 0,
|
|
1506
1506
|
style: {
|
|
1507
1507
|
// Force margins to 0 to prevent hover layout shift
|
|
1508
1508
|
// Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
|
|
@@ -1546,7 +1546,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1546
1546
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
1547
1547
|
At,
|
|
1548
1548
|
{
|
|
1549
|
-
message:
|
|
1549
|
+
message: ie,
|
|
1550
1550
|
renderText: b
|
|
1551
1551
|
}
|
|
1552
1552
|
) })
|
|
@@ -1573,13 +1573,13 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1573
1573
|
K ? /* @__PURE__ */ n(
|
|
1574
1574
|
v,
|
|
1575
1575
|
{
|
|
1576
|
-
message:
|
|
1576
|
+
message: ie,
|
|
1577
1577
|
renderText: b
|
|
1578
1578
|
}
|
|
1579
1579
|
) : /* @__PURE__ */ n(
|
|
1580
1580
|
At,
|
|
1581
1581
|
{
|
|
1582
|
-
message:
|
|
1582
|
+
message: ie,
|
|
1583
1583
|
renderText: b
|
|
1584
1584
|
}
|
|
1585
1585
|
),
|
|
@@ -1612,7 +1612,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1612
1612
|
reply_count: c.reply_count
|
|
1613
1613
|
}
|
|
1614
1614
|
),
|
|
1615
|
-
|
|
1615
|
+
ae && /* @__PURE__ */ n(H, {})
|
|
1616
1616
|
]
|
|
1617
1617
|
},
|
|
1618
1618
|
c.id
|
|
@@ -1772,7 +1772,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1772
1772
|
}) => {
|
|
1773
1773
|
var o;
|
|
1774
1774
|
const { channel: r } = de(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
|
|
1775
|
-
return s ? /* @__PURE__ */ h(
|
|
1775
|
+
return s ? /* @__PURE__ */ h(ne, { children: [
|
|
1776
1776
|
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
|
|
1777
1777
|
t == null ? void 0 : t()
|
|
1778
1778
|
] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
|
|
@@ -1824,7 +1824,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1824
1824
|
if (t === -1)
|
|
1825
1825
|
return e;
|
|
1826
1826
|
const s = t + Oe.length;
|
|
1827
|
-
return /* @__PURE__ */ h(
|
|
1827
|
+
return /* @__PURE__ */ h(ne, { children: [
|
|
1828
1828
|
e.slice(0, t),
|
|
1829
1829
|
/* @__PURE__ */ n(
|
|
1830
1830
|
"a",
|
|
@@ -1973,7 +1973,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1973
1973
|
},
|
|
1974
1974
|
children: /* @__PURE__ */ h("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
|
|
1975
1975
|
/* @__PURE__ */ n(
|
|
1976
|
-
|
|
1976
|
+
re,
|
|
1977
1977
|
{
|
|
1978
1978
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1979
1979
|
id: e,
|
|
@@ -2059,7 +2059,7 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2059
2059
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2060
2060
|
] }) }));
|
|
2061
2061
|
Ee.displayName = "LoadingState";
|
|
2062
|
-
const
|
|
2062
|
+
const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Ja = ({
|
|
2063
2063
|
onBack: e,
|
|
2064
2064
|
showBackButton: t,
|
|
2065
2065
|
showStarButton: s = !1,
|
|
@@ -2102,7 +2102,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2102
2102
|
"button",
|
|
2103
2103
|
{
|
|
2104
2104
|
className: C(
|
|
2105
|
-
|
|
2105
|
+
le,
|
|
2106
2106
|
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
2107
2107
|
),
|
|
2108
2108
|
onClick: e || (() => {
|
|
@@ -2114,7 +2114,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2114
2114
|
) }),
|
|
2115
2115
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
2116
2116
|
/* @__PURE__ */ n(
|
|
2117
|
-
|
|
2117
|
+
re,
|
|
2118
2118
|
{
|
|
2119
2119
|
id: ((T = p == null ? void 0 : p.user) == null ? void 0 : T.id) || x.id || "unknown",
|
|
2120
2120
|
name: w,
|
|
@@ -2134,7 +2134,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2134
2134
|
s && /* @__PURE__ */ n(
|
|
2135
2135
|
"button",
|
|
2136
2136
|
{
|
|
2137
|
-
className:
|
|
2137
|
+
className: le,
|
|
2138
2138
|
onClick: S,
|
|
2139
2139
|
type: "button",
|
|
2140
2140
|
"aria-label": k ? "Unstar conversation" : "Star conversation",
|
|
@@ -2150,9 +2150,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2150
2150
|
)
|
|
2151
2151
|
}
|
|
2152
2152
|
),
|
|
2153
|
-
b && (c
|
|
2154
|
-
triggerClassName: C(te, "bg-[#F1F0EE]")
|
|
2155
|
-
}) : /* @__PURE__ */ n(
|
|
2153
|
+
b && (c ?? /* @__PURE__ */ n(
|
|
2156
2154
|
Pt,
|
|
2157
2155
|
{
|
|
2158
2156
|
channel: x,
|
|
@@ -2166,7 +2164,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2166
2164
|
onBlockParticipantClick: g,
|
|
2167
2165
|
onReportParticipantClick: u,
|
|
2168
2166
|
customChannelActions: f,
|
|
2169
|
-
triggerClassName: C(
|
|
2167
|
+
triggerClassName: C(le, "bg-[#F1F0EE]")
|
|
2170
2168
|
}
|
|
2171
2169
|
))
|
|
2172
2170
|
] })
|
|
@@ -2177,7 +2175,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2177
2175
|
"button",
|
|
2178
2176
|
{
|
|
2179
2177
|
className: C(
|
|
2180
|
-
|
|
2178
|
+
le,
|
|
2181
2179
|
"messaging-channel-view-back-button-desktop"
|
|
2182
2180
|
),
|
|
2183
2181
|
type: "button",
|
|
@@ -2187,7 +2185,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2187
2185
|
}
|
|
2188
2186
|
),
|
|
2189
2187
|
/* @__PURE__ */ n(
|
|
2190
|
-
|
|
2188
|
+
re,
|
|
2191
2189
|
{
|
|
2192
2190
|
id: ((N = p == null ? void 0 : p.user) == null ? void 0 : N.id) || x.id || "unknown",
|
|
2193
2191
|
name: w,
|
|
@@ -2209,7 +2207,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2209
2207
|
s && /* @__PURE__ */ n(
|
|
2210
2208
|
"button",
|
|
2211
2209
|
{
|
|
2212
|
-
className:
|
|
2210
|
+
className: le,
|
|
2213
2211
|
onClick: S,
|
|
2214
2212
|
type: "button",
|
|
2215
2213
|
"aria-label": k ? "Unstar conversation" : "Star conversation",
|
|
@@ -2225,7 +2223,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2225
2223
|
)
|
|
2226
2224
|
}
|
|
2227
2225
|
),
|
|
2228
|
-
b && (c
|
|
2226
|
+
b && (c ?? /* @__PURE__ */ n(
|
|
2229
2227
|
Pt,
|
|
2230
2228
|
{
|
|
2231
2229
|
channel: x,
|
|
@@ -2239,7 +2237,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2239
2237
|
onBlockParticipantClick: g,
|
|
2240
2238
|
onReportParticipantClick: u,
|
|
2241
2239
|
customChannelActions: f,
|
|
2242
|
-
triggerClassName:
|
|
2240
|
+
triggerClassName: le
|
|
2243
2241
|
}
|
|
2244
2242
|
))
|
|
2245
2243
|
] })
|
|
@@ -2302,7 +2300,7 @@ const te = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2302
2300
|
},
|
|
2303
2301
|
[p, S, D]
|
|
2304
2302
|
);
|
|
2305
|
-
return /* @__PURE__ */ n(
|
|
2303
|
+
return /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
|
|
2306
2304
|
os,
|
|
2307
2305
|
{
|
|
2308
2306
|
overrides: {
|
|
@@ -2540,7 +2538,7 @@ const ki = ({
|
|
|
2540
2538
|
H.current === j && (H.current = null);
|
|
2541
2539
|
};
|
|
2542
2540
|
(async () => {
|
|
2543
|
-
var J,
|
|
2541
|
+
var J, ie;
|
|
2544
2542
|
try {
|
|
2545
2543
|
N && console.log(
|
|
2546
2544
|
"[MessagingShell] Loading initial conversation with:",
|
|
@@ -2561,8 +2559,8 @@ const ki = ({
|
|
|
2561
2559
|
);
|
|
2562
2560
|
return;
|
|
2563
2561
|
}
|
|
2564
|
-
const
|
|
2565
|
-
if (!
|
|
2562
|
+
const ae = $.current;
|
|
2563
|
+
if (!ae || !T) {
|
|
2566
2564
|
q(), I("No conversation found with this account"), N && console.log(
|
|
2567
2565
|
"[MessagingShell] No conversation found for:",
|
|
2568
2566
|
i
|
|
@@ -2571,11 +2569,11 @@ const ki = ({
|
|
|
2571
2569
|
}
|
|
2572
2570
|
try {
|
|
2573
2571
|
const ee = await T.startChannelWithParticipant({
|
|
2574
|
-
id:
|
|
2575
|
-
name:
|
|
2576
|
-
phone:
|
|
2572
|
+
id: ae.id,
|
|
2573
|
+
name: ae.name,
|
|
2574
|
+
phone: ae.phone
|
|
2577
2575
|
});
|
|
2578
|
-
L(ee), I(null), (
|
|
2576
|
+
L(ee), I(null), (ie = U.current) == null || ie.call(U, ee), N && console.log(
|
|
2579
2577
|
"[MessagingShell] Channel created and loaded:",
|
|
2580
2578
|
ee.id
|
|
2581
2579
|
);
|
|
@@ -2725,7 +2723,7 @@ const un = V.createContext({
|
|
|
2725
2723
|
),
|
|
2726
2724
|
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
|
|
2727
2725
|
/* @__PURE__ */ n(
|
|
2728
|
-
|
|
2726
|
+
re,
|
|
2729
2727
|
{
|
|
2730
2728
|
id: ((T = u == null ? void 0 : u.user) == null ? void 0 : T.id) || e.id || "unknown",
|
|
2731
2729
|
name: f,
|
|
@@ -2990,9 +2988,9 @@ const lr = {
|
|
|
2990
2988
|
}, gr = {
|
|
2991
2989
|
dark: "size-16 text-white/25",
|
|
2992
2990
|
light: "size-16 text-black/25"
|
|
2993
|
-
}, Me = (e, t) => !!t && !!e &&
|
|
2991
|
+
}, Me = (e, t) => !!t && !!e && se(e) === "audio", hn = (e, t) => {
|
|
2994
2992
|
if (!t || !e) return !1;
|
|
2995
|
-
const s =
|
|
2993
|
+
const s = se(e);
|
|
2996
2994
|
return s === "video" || s === "audio";
|
|
2997
2995
|
}, tt = "bg-[#F2F3F4]", Ie = ({
|
|
2998
2996
|
variant: e,
|
|
@@ -3003,7 +3001,7 @@ const lr = {
|
|
|
3003
3001
|
topLeft: i,
|
|
3004
3002
|
topRight: o
|
|
3005
3003
|
}) => {
|
|
3006
|
-
const l =
|
|
3004
|
+
const l = se(r), d = !!s && l === "video";
|
|
3007
3005
|
return Me(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
|
|
3008
3006
|
"audio",
|
|
3009
3007
|
{
|
|
@@ -3416,7 +3414,7 @@ function Rr(e, t) {
|
|
|
3416
3414
|
}
|
|
3417
3415
|
}
|
|
3418
3416
|
if (!e) return;
|
|
3419
|
-
if (
|
|
3417
|
+
if (se(e) === "document") {
|
|
3420
3418
|
const r = Zt(e), i = Mr[r];
|
|
3421
3419
|
if (i) return i;
|
|
3422
3420
|
if (e === "application/octet-stream") return;
|
|
@@ -3496,7 +3494,7 @@ const Dr = {
|
|
|
3496
3494
|
u
|
|
3497
3495
|
]
|
|
3498
3496
|
}
|
|
3499
|
-
) : /* @__PURE__ */ h(
|
|
3497
|
+
) : /* @__PURE__ */ h(ne, { children: [
|
|
3500
3498
|
g,
|
|
3501
3499
|
u
|
|
3502
3500
|
] });
|
|
@@ -3616,7 +3614,7 @@ const zr = ({
|
|
|
3616
3614
|
onNext: t,
|
|
3617
3615
|
prevLabel: s = "Previous",
|
|
3618
3616
|
nextLabel: a = "Next"
|
|
3619
|
-
}) => /* @__PURE__ */ h(
|
|
3617
|
+
}) => /* @__PURE__ */ h(ne, { children: [
|
|
3620
3618
|
/* @__PURE__ */ n(
|
|
3621
3619
|
"button",
|
|
3622
3620
|
{
|
|
@@ -3847,7 +3845,7 @@ const zr = ({
|
|
|
3847
3845
|
length: t.length,
|
|
3848
3846
|
initialIndex: s,
|
|
3849
3847
|
open: e
|
|
3850
|
-
}), l = t[r], d =
|
|
3848
|
+
}), l = t[r], d = te(
|
|
3851
3849
|
() => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "image"),
|
|
3852
3850
|
[l]
|
|
3853
3851
|
);
|
|
@@ -4084,10 +4082,10 @@ const zr = ({
|
|
|
4084
4082
|
length: t.length,
|
|
4085
4083
|
initialIndex: s,
|
|
4086
4084
|
open: e
|
|
4087
|
-
}), l = t[r], d =
|
|
4085
|
+
}), l = t[r], d = te(
|
|
4088
4086
|
() => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "document"),
|
|
4089
4087
|
[l]
|
|
4090
|
-
), m =
|
|
4088
|
+
), m = te(
|
|
4091
4089
|
() => l ? Zr(l.src) : void 0,
|
|
4092
4090
|
[l]
|
|
4093
4091
|
);
|
|
@@ -4230,7 +4228,7 @@ const zr = ({
|
|
|
4230
4228
|
length: t.length,
|
|
4231
4229
|
initialIndex: s,
|
|
4232
4230
|
open: e
|
|
4233
|
-
}), l = t[r], d =
|
|
4231
|
+
}), l = t[r], d = te(
|
|
4234
4232
|
() => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "video"),
|
|
4235
4233
|
[l]
|
|
4236
4234
|
);
|
|
@@ -4429,7 +4427,7 @@ const zr = ({
|
|
|
4429
4427
|
const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
|
|
4430
4428
|
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
|
|
4431
4429
|
(i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
4432
|
-
|
|
4430
|
+
re,
|
|
4433
4431
|
{
|
|
4434
4432
|
id: o || "account",
|
|
4435
4433
|
name: o || "Account",
|
|
@@ -4468,12 +4466,12 @@ export {
|
|
|
4468
4466
|
Ei as L,
|
|
4469
4467
|
yi as M,
|
|
4470
4468
|
fe as a,
|
|
4471
|
-
|
|
4469
|
+
re as b,
|
|
4472
4470
|
rr as c,
|
|
4473
4471
|
dn as d,
|
|
4474
4472
|
Ci as e,
|
|
4475
4473
|
hi as f,
|
|
4476
|
-
|
|
4474
|
+
se as g,
|
|
4477
4475
|
Ot as h,
|
|
4478
4476
|
Ii as i,
|
|
4479
4477
|
Ca as j,
|
|
@@ -4494,4 +4492,4 @@ export {
|
|
|
4494
4492
|
Wt as y,
|
|
4495
4493
|
va as z
|
|
4496
4494
|
};
|
|
4497
|
-
//# sourceMappingURL=index-
|
|
4495
|
+
//# sourceMappingURL=index-CAotDlQ-.js.map
|