@linktr.ee/messaging-react 1.40.0 → 1.40.1
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-RBVM8Gy3.js → Card-CmnkZNNQ.js} +2 -2
- package/dist/{Card-RBVM8Gy3.js.map → Card-CmnkZNNQ.js.map} +1 -1
- package/dist/{Card-CuiPAb_A.js → Card-QrKCxqCI.js} +2 -2
- package/dist/{Card-CuiPAb_A.js.map → Card-QrKCxqCI.js.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{index-DY-3-rt4.js → index-8ZuHtwFb.js} +72 -68
- package/dist/index-8ZuHtwFb.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/index.tsx +3 -2
- package/src/components/CustomMessage/index.tsx +3 -0
- package/src/styles.css +1 -1
- package/dist/index-DY-3-rt4.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as d, Fragment as ce } from "react/jsx-runtime";
|
|
2
2
|
import D from "classnames";
|
|
3
|
-
import O, { createContext as ot, useContext as lt, useCallback as G, useState as A, useRef as
|
|
3
|
+
import O, { createContext as ot, useContext as lt, useCallback as G, useState as A, useRef as K, useEffect as J, useMemo as Ce, Suspense as ct } from "react";
|
|
4
4
|
import { StreamChatService as Tt } from "@linktr.ee/messaging-core";
|
|
5
|
-
import { Chat as Dt, ChannelList as Rt, DateSeparator as Lt, useChannelStateContext as oe, useChatContext as Me, areMessageUIPropsEqual as At, useMessageReminder as Ft, useComponentContext as dt, Attachment as Ot, EditMessageModal as Pt, MessageBlocked as Ut, MessageBouncePrompt as zt, MessageDeleted as Bt, MessageIsThreadReplyInChannelButtonIndicator as $t, MessageRepliesCountButton as jt, ReminderNotification as Gt, StreamedMessageText as Vt, messageHasAttachments as Ht, messageHasReactions as Yt, isDateSeparatorMessage as
|
|
5
|
+
import { Chat as Dt, ChannelList as Rt, DateSeparator as Lt, useChannelStateContext as oe, useChatContext as Me, areMessageUIPropsEqual as At, useMessageReminder as Ft, useComponentContext as dt, Attachment as Ot, EditMessageModal as Pt, MessageBlocked as Ut, MessageBouncePrompt as zt, MessageDeleted as Bt, MessageIsThreadReplyInChannelButtonIndicator as $t, MessageRepliesCountButton as jt, ReminderNotification as Gt, StreamedMessageText as Vt, messageHasAttachments as Ht, messageHasReactions as Yt, isDateSeparatorMessage as Wt, isMessageBlocked as qt, isMessageBounced as Xt, MessageBounceModal as Zt, MessageText as Xe, Poll as Jt, MessageErrorIcon as Kt, useMessageContext as ut, useMessageComposer as Qt, useStateStore as es, MessageInput as ts, useMessageInputContext as ss, useMessageComposerHasSendableData as ns, SimpleAttachmentSelector as as, QuotedMessagePreview as rs, AttachmentPreviewList as is, TextareaComposer as os, MessageTimestamp as ve, useTypingContext as ls, Channel as cs, WithComponents as ds, Window as us, MessageList as ms } from "stream-chat-react";
|
|
6
6
|
import { StarIcon as Ee, GiftIcon as hs, XIcon as mt, SpinnerGapIcon as we, SignOutIcon as fs, ProhibitInsetIcon as Ze, FlagIcon as gs, ThumbsUpIcon as bs, ThumbsDownIcon as ps, ArrowUpIcon as xs, SparkleIcon as Se, ProhibitIcon as vs, ArrowLeftIcon as Je, CaretRightIcon as Ke, DotsThreeIcon as Qe, FileIcon as ht, ImageIcon as ws, SpeakerHighIcon as _s, VideoCameraIcon as ys, FileMdIcon as Ns, FileTextIcon as Cs, FileZipIcon as Es, FilePptIcon as Ss, FileCsvIcon as Is, FileXlsIcon as ks, FileDocIcon as Ms, FilePdfIcon as Ts, CircleNotchIcon as ft, PlayIcon as et, PauseIcon as Ds, LinkIcon as Rs, DownloadSimpleIcon as Ls } from "@phosphor-icons/react";
|
|
7
7
|
import { LinkPreviewsManager as tt } from "stream-chat";
|
|
8
8
|
const gt = ot({
|
|
@@ -35,12 +35,12 @@ const gt = ot({
|
|
|
35
35
|
serviceConfig: !!n,
|
|
36
36
|
capabilities: Object.keys(o)
|
|
37
37
|
});
|
|
38
|
-
const [c, m] = A(null), [u, h] = A(null), [f, v] = A(!1), [a, N] = A(!1), [b, C] = A(null), x =
|
|
38
|
+
const [c, m] = A(null), [u, h] = A(null), [f, v] = A(!1), [a, N] = A(!1), [b, C] = A(null), x = K(!1), I = K({
|
|
39
39
|
userId: s == null ? void 0 : s.id,
|
|
40
40
|
apiKey: r,
|
|
41
41
|
serviceConfig: n,
|
|
42
42
|
capabilities: o
|
|
43
|
-
}), w =
|
|
43
|
+
}), w = K(0);
|
|
44
44
|
w.current++, i("📊 RENDER INFO", {
|
|
45
45
|
renderCount: w.current,
|
|
46
46
|
currentProps: { userId: s == null ? void 0 : s.id, apiKey: (r == null ? void 0 : r.substring(0, 8)) + "..." },
|
|
@@ -55,7 +55,7 @@ const gt = ot({
|
|
|
55
55
|
apiKey: r,
|
|
56
56
|
serviceConfig: n,
|
|
57
57
|
capabilities: o
|
|
58
|
-
},
|
|
58
|
+
}, J(() => {
|
|
59
59
|
const k = w.current;
|
|
60
60
|
if (i("🔧 SERVICE INIT EFFECT TRIGGERED", {
|
|
61
61
|
renderCount: k,
|
|
@@ -94,8 +94,8 @@ const gt = ot({
|
|
|
94
94
|
}), T.disconnectUser().catch(console.error);
|
|
95
95
|
};
|
|
96
96
|
}, [r, n, l, i]);
|
|
97
|
-
const E =
|
|
98
|
-
|
|
97
|
+
const E = K(null);
|
|
98
|
+
J(() => {
|
|
99
99
|
var T, M;
|
|
100
100
|
if (i("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
101
101
|
hasService: !!c,
|
|
@@ -141,7 +141,7 @@ const gt = ot({
|
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
})();
|
|
144
|
-
}, [c, s, i, f]),
|
|
144
|
+
}, [c, s, i, f]), J(() => (i("🔌 CLEANUP EFFECT REGISTERED", {
|
|
145
145
|
hasService: !!c,
|
|
146
146
|
isConnected: f
|
|
147
147
|
}), () => {
|
|
@@ -234,7 +234,7 @@ const bt = O.createContext({
|
|
|
234
234
|
const [s, n] = A(
|
|
235
235
|
!!((o = (r = t == null ? void 0 : t.state) == null ? void 0 : r.membership) != null && o.pinned_at)
|
|
236
236
|
);
|
|
237
|
-
return
|
|
237
|
+
return J(() => {
|
|
238
238
|
var i;
|
|
239
239
|
if (!t) {
|
|
240
240
|
n(!1);
|
|
@@ -329,7 +329,7 @@ const ne = ({
|
|
|
329
329
|
{
|
|
330
330
|
src: s,
|
|
331
331
|
alt: "",
|
|
332
|
-
className: "
|
|
332
|
+
className: "h-full w-full object-cover"
|
|
333
333
|
}
|
|
334
334
|
) : /* @__PURE__ */ e(
|
|
335
335
|
"div",
|
|
@@ -350,6 +350,7 @@ const ne = ({
|
|
|
350
350
|
r
|
|
351
351
|
),
|
|
352
352
|
style: {
|
|
353
|
+
"--str-chat__avatar-size": `${n}px`,
|
|
353
354
|
width: `${n}px`,
|
|
354
355
|
height: `${n}px`
|
|
355
356
|
},
|
|
@@ -535,7 +536,7 @@ const ne = ({
|
|
|
535
536
|
}
|
|
536
537
|
);
|
|
537
538
|
vt.displayName = "CustomChannelPreview";
|
|
538
|
-
const
|
|
539
|
+
const Ws = { last_message_at: -1 }, wt = O.memo(
|
|
539
540
|
({
|
|
540
541
|
onChannelSelect: t,
|
|
541
542
|
selectedChannel: s,
|
|
@@ -544,7 +545,7 @@ const qs = { last_message_at: -1 }, wt = O.memo(
|
|
|
544
545
|
onMessageNew: o,
|
|
545
546
|
onAddedToChannel: l,
|
|
546
547
|
channelRenderFilterFn: i,
|
|
547
|
-
sort: c =
|
|
548
|
+
sort: c = Ws,
|
|
548
549
|
className: m,
|
|
549
550
|
customEmptyStateIndicator: u,
|
|
550
551
|
renderMessagePreview: h
|
|
@@ -618,7 +619,7 @@ const me = ({
|
|
|
618
619
|
children: n
|
|
619
620
|
}
|
|
620
621
|
);
|
|
621
|
-
function
|
|
622
|
+
function qs({ label: t, className: s, children: n, ...r }) {
|
|
622
623
|
return /* @__PURE__ */ d(
|
|
623
624
|
"button",
|
|
624
625
|
{
|
|
@@ -640,7 +641,7 @@ function Ws({ label: t, className: s, children: n, ...r }) {
|
|
|
640
641
|
);
|
|
641
642
|
}
|
|
642
643
|
function Xs({ onClick: t }) {
|
|
643
|
-
return /* @__PURE__ */ e(
|
|
644
|
+
return /* @__PURE__ */ e(qs, { label: "Close", onClick: t, className: "p-1", children: /* @__PURE__ */ e(mt, { className: "h-5 w-5 text-stone", weight: "bold" }) });
|
|
644
645
|
}
|
|
645
646
|
const Zs = ({
|
|
646
647
|
dialogRef: t,
|
|
@@ -657,7 +658,7 @@ const Zs = ({
|
|
|
657
658
|
customProfileContent: f,
|
|
658
659
|
customChannelActions: v
|
|
659
660
|
}) => {
|
|
660
|
-
var S, $, V, ee, te,
|
|
661
|
+
var S, $, V, ee, te, W, g;
|
|
661
662
|
const { service: a, debug: N } = Te(), [b, C] = A(!1), [x, I] = A(!1), [w, E] = A(!1), P = G(async () => {
|
|
662
663
|
var p;
|
|
663
664
|
if (!(!a || !((p = n == null ? void 0 : n.user) != null && p.id)))
|
|
@@ -676,7 +677,7 @@ const Zs = ({
|
|
|
676
677
|
);
|
|
677
678
|
}
|
|
678
679
|
}, [a, (S = n == null ? void 0 : n.user) == null ? void 0 : S.id]);
|
|
679
|
-
|
|
680
|
+
J(() => {
|
|
680
681
|
P();
|
|
681
682
|
}, [P]);
|
|
682
683
|
const U = async () => {
|
|
@@ -724,7 +725,7 @@ const Zs = ({
|
|
|
724
725
|
);
|
|
725
726
|
};
|
|
726
727
|
if (!n) return null;
|
|
727
|
-
const y = (($ = n.user) == null ? void 0 : $.name) || ((V = n.user) == null ? void 0 : V.id) || "Unknown member", _ = (ee = n.user) == null ? void 0 : ee.image, F = (te = n.user) == null ? void 0 : te.email, H = (
|
|
728
|
+
const y = (($ = n.user) == null ? void 0 : $.name) || ((V = n.user) == null ? void 0 : V.id) || "Unknown member", _ = (ee = n.user) == null ? void 0 : ee.image, F = (te = n.user) == null ? void 0 : te.email, H = (W = n.user) == null ? void 0 : W.username, R = F || (H ? `linktr.ee/${H}` : void 0), z = ((g = n.user) == null ? void 0 : g.id) || "unknown";
|
|
728
729
|
return (
|
|
729
730
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
730
731
|
/* @__PURE__ */ e(
|
|
@@ -860,7 +861,7 @@ function Qs(t) {
|
|
|
860
861
|
}, [s, n == null ? void 0 : n.userID, t.id, r]);
|
|
861
862
|
return { selected: r, voteUp: o, voteDown: l };
|
|
862
863
|
}
|
|
863
|
-
const en = O.lazy(() => import("./Card-
|
|
864
|
+
const en = O.lazy(() => import("./Card-QrKCxqCI.js")), tn = O.lazy(() => import("./Card-CmnkZNNQ.js")), _t = () => /* @__PURE__ */ e(
|
|
864
865
|
"div",
|
|
865
866
|
{
|
|
866
867
|
className: "w-[280px] min-h-[200px] animate-pulse rounded-[24px] bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
@@ -908,7 +909,7 @@ const ln = ({
|
|
|
908
909
|
}
|
|
909
910
|
)
|
|
910
911
|
] }), cn = (t) => {
|
|
911
|
-
var se, Oe, Pe, Ue, ze, Be, $e, je, Ge, Ve, He, Ye,
|
|
912
|
+
var se, Oe, Pe, Ue, ze, Be, $e, je, Ge, Ve, He, Ye, We, qe;
|
|
912
913
|
const {
|
|
913
914
|
additionalMessageInputProps: s,
|
|
914
915
|
chatbotVotingEnabled: n,
|
|
@@ -935,7 +936,7 @@ const ln = ({
|
|
|
935
936
|
MessageRepliesCountButton: V = jt,
|
|
936
937
|
ReminderNotification: ee = Gt,
|
|
937
938
|
StreamedMessageText: te = Vt,
|
|
938
|
-
PinIndicator:
|
|
939
|
+
PinIndicator: W
|
|
939
940
|
} = dt("CustomMessage"), g = Ht(a), p = Yt(a), L = Ce(
|
|
940
941
|
() => f == null ? void 0 : f(a),
|
|
941
942
|
[f, a]
|
|
@@ -943,15 +944,15 @@ const ln = ({
|
|
|
943
944
|
() => !a.shared_location && !a.attachments ? [] : a.shared_location ? [a.shared_location, ...a.attachments ?? []] : a.attachments,
|
|
944
945
|
[a]
|
|
945
946
|
);
|
|
946
|
-
if (
|
|
947
|
+
if (Wt(a))
|
|
947
948
|
return null;
|
|
948
949
|
if (a.deleted_at || a.type === "deleted")
|
|
949
950
|
return /* @__PURE__ */ e(S, { message: a });
|
|
950
|
-
if (
|
|
951
|
+
if (qt(a))
|
|
951
952
|
return /* @__PURE__ */ e(R, {});
|
|
952
953
|
const Y = !b && !!a.reply_count, ae = !b && a.show_in_channel && a.parent_id, de = a.status === "failed" && ((se = a.error) == null ? void 0 : se.status) !== 403, re = Xt(a);
|
|
953
|
-
let
|
|
954
|
-
de ?
|
|
954
|
+
let q;
|
|
955
|
+
de ? q = () => u(a) : re && (q = () => k(!0));
|
|
955
956
|
const ie = v(), pe = D(
|
|
956
957
|
"str-chat__message str-chat__message-simple",
|
|
957
958
|
`str-chat__message--${a.type}`,
|
|
@@ -969,7 +970,7 @@ const ln = ({
|
|
|
969
970
|
"str-chat__virtual-message__wrapper--first": l,
|
|
970
971
|
"str-chat__virtual-message__wrapper--group": i
|
|
971
972
|
}
|
|
972
|
-
), ue = a.poll_id && C.polls.fromState(a.poll_id), xe = Ys(a),
|
|
973
|
+
), ue = a.poll_id && C.polls.fromState(a.poll_id), xe = Ys(a), Z = De(a), B = Hs(a), X = !!(j != null && j.length && !a.quoted_message), Q = Z && ie && X;
|
|
973
974
|
return /* @__PURE__ */ d(ce, { children: [
|
|
974
975
|
r && /* @__PURE__ */ e(
|
|
975
976
|
H,
|
|
@@ -986,7 +987,7 @@ const ln = ({
|
|
|
986
987
|
}
|
|
987
988
|
),
|
|
988
989
|
/* @__PURE__ */ d("div", { className: pe, children: [
|
|
989
|
-
|
|
990
|
+
W && /* @__PURE__ */ e(W, {}),
|
|
990
991
|
!!T && /* @__PURE__ */ e(ee, { reminder: T }),
|
|
991
992
|
a.user && /* @__PURE__ */ e(
|
|
992
993
|
ne,
|
|
@@ -994,7 +995,10 @@ const ln = ({
|
|
|
994
995
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
995
996
|
id: a.user.id,
|
|
996
997
|
image: a.user.image,
|
|
997
|
-
name: a.user.name || a.user.id
|
|
998
|
+
name: a.user.name || a.user.id,
|
|
999
|
+
size: Z ? 24 : 28,
|
|
1000
|
+
shape: "circle",
|
|
1001
|
+
dmAgentEnabled: Z
|
|
998
1002
|
}
|
|
999
1003
|
),
|
|
1000
1004
|
/* @__PURE__ */ e(
|
|
@@ -1004,10 +1008,10 @@ const ln = ({
|
|
|
1004
1008
|
"str-chat__simple-message--error-failed": de || re
|
|
1005
1009
|
}),
|
|
1006
1010
|
"data-testid": "message-inner",
|
|
1007
|
-
onClick:
|
|
1008
|
-
onKeyDown:
|
|
1009
|
-
role:
|
|
1010
|
-
tabIndex:
|
|
1011
|
+
onClick: q,
|
|
1012
|
+
onKeyDown: q,
|
|
1013
|
+
role: q ? "button" : void 0,
|
|
1014
|
+
tabIndex: q ? 0 : void 0,
|
|
1011
1015
|
style: {
|
|
1012
1016
|
// Force margins to 0 to prevent hover layout shift
|
|
1013
1017
|
// Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
|
|
@@ -1035,8 +1039,8 @@ const ln = ({
|
|
|
1035
1039
|
mimeType: (Ve = a.metadata) == null ? void 0 : Ve.attachment_mime_type,
|
|
1036
1040
|
thumbnailUrl: (He = a.metadata) == null ? void 0 : He.attachment_thumbnail,
|
|
1037
1041
|
amountText: (Ye = a.metadata) == null ? void 0 : Ye.amount_text,
|
|
1038
|
-
detail: (
|
|
1039
|
-
paymentStatus: (
|
|
1042
|
+
detail: (We = a.metadata) == null ? void 0 : We.attachment_detail,
|
|
1043
|
+
paymentStatus: (qe = a.metadata) == null ? void 0 : qe.payment_status,
|
|
1040
1044
|
isUnlocking: I(a.id),
|
|
1041
1045
|
onUnlockClick: () => w == null ? void 0 : w(a, x),
|
|
1042
1046
|
onFetchSource: async () => await (E == null ? void 0 : E(a, x)),
|
|
@@ -1049,7 +1053,7 @@ const ln = ({
|
|
|
1049
1053
|
/* @__PURE__ */ e(_e, { message: a, standalone: !0 })
|
|
1050
1054
|
) : /* @__PURE__ */ d("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
1051
1055
|
/* @__PURE__ */ d("div", { className: "str-chat__message-bubble", children: [
|
|
1052
|
-
|
|
1056
|
+
Z && !Q && /* @__PURE__ */ e(
|
|
1053
1057
|
_e,
|
|
1054
1058
|
{
|
|
1055
1059
|
message: a,
|
|
@@ -1074,7 +1078,7 @@ const ln = ({
|
|
|
1074
1078
|
) : /* @__PURE__ */ e(Xe, { message: a, renderText: N }),
|
|
1075
1079
|
/* @__PURE__ */ e(Kt, {})
|
|
1076
1080
|
] }),
|
|
1077
|
-
(!
|
|
1081
|
+
(!Z || Q) && /* @__PURE__ */ e(
|
|
1078
1082
|
_e,
|
|
1079
1083
|
{
|
|
1080
1084
|
message: a,
|
|
@@ -1082,7 +1086,7 @@ const ln = ({
|
|
|
1082
1086
|
isMyMessage: ie
|
|
1083
1087
|
}
|
|
1084
1088
|
),
|
|
1085
|
-
n &&
|
|
1089
|
+
n && Z && /* @__PURE__ */ e(
|
|
1086
1090
|
ln,
|
|
1087
1091
|
{
|
|
1088
1092
|
selected: M,
|
|
@@ -1654,7 +1658,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1654
1658
|
dmAgentEnabled: C = !1
|
|
1655
1659
|
}) => {
|
|
1656
1660
|
var F, H;
|
|
1657
|
-
const { channel: x } = oe(), I =
|
|
1661
|
+
const { channel: x } = oe(), I = K(null), w = O.useMemo(() => Object.values(x.state.members || {}).find(
|
|
1658
1662
|
(z) => {
|
|
1659
1663
|
var S;
|
|
1660
1664
|
return ((S = z.user) == null ? void 0 : S.id) && z.user.id !== x._client.userID;
|
|
@@ -2019,7 +2023,7 @@ const oa = ({
|
|
|
2019
2023
|
error: R,
|
|
2020
2024
|
refreshConnection: z,
|
|
2021
2025
|
debug: S
|
|
2022
|
-
} = As(), [$, V] = A(null), [ee, te] = A(!1), [
|
|
2026
|
+
} = As(), [$, V] = A(null), [ee, te] = A(!1), [W, g] = A(!1), [p, L] = A(!1), [j, Y] = A(null), {
|
|
2023
2027
|
showDeleteConversation: ae = !0
|
|
2024
2028
|
} = t, de = O.useMemo(() => {
|
|
2025
2029
|
const B = _ == null ? void 0 : _.userID;
|
|
@@ -2034,7 +2038,7 @@ const oa = ({
|
|
|
2034
2038
|
},
|
|
2035
2039
|
...u
|
|
2036
2040
|
};
|
|
2037
|
-
}, [u, _ == null ? void 0 : _.userID]), re =
|
|
2041
|
+
}, [u, _ == null ? void 0 : _.userID]), re = K(null), q = G(async () => {
|
|
2038
2042
|
if (!_ || !F) return;
|
|
2039
2043
|
const B = _.userID;
|
|
2040
2044
|
if (B)
|
|
@@ -2055,11 +2059,11 @@ const oa = ({
|
|
|
2055
2059
|
console.error("[MessagingShell] Failed to sync channels:", X);
|
|
2056
2060
|
}
|
|
2057
2061
|
}, [_, F, S]);
|
|
2058
|
-
|
|
2062
|
+
J(() => {
|
|
2059
2063
|
if (!_ || !F) return;
|
|
2060
2064
|
const B = _.userID;
|
|
2061
|
-
B && re.current !== B &&
|
|
2062
|
-
}, [_, F,
|
|
2065
|
+
B && re.current !== B && q();
|
|
2066
|
+
}, [_, F, q]), J(() => {
|
|
2063
2067
|
if (!l || !_ || !F) return;
|
|
2064
2068
|
(async () => {
|
|
2065
2069
|
const X = _.userID;
|
|
@@ -2136,15 +2140,15 @@ const oa = ({
|
|
|
2136
2140
|
p || V(null);
|
|
2137
2141
|
}, [p]), ue = G(
|
|
2138
2142
|
async (B) => {
|
|
2139
|
-
S && console.log("[MessagingShell] Leaving conversation:", B.id), V(null), L(!1), re.current = null, await
|
|
2143
|
+
S && console.log("[MessagingShell] Leaving conversation:", B.id), V(null), L(!1), re.current = null, await q();
|
|
2140
2144
|
},
|
|
2141
|
-
[
|
|
2145
|
+
[q, S]
|
|
2142
2146
|
), xe = G(
|
|
2143
2147
|
async (B) => {
|
|
2144
|
-
S && console.log("[MessagingShell] Blocking participant:", B), V(null), L(!1), re.current = null, await
|
|
2148
|
+
S && console.log("[MessagingShell] Blocking participant:", B), V(null), L(!1), re.current = null, await q();
|
|
2145
2149
|
},
|
|
2146
|
-
[
|
|
2147
|
-
),
|
|
2150
|
+
[q, S]
|
|
2151
|
+
), Z = !!$;
|
|
2148
2152
|
return H ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(fe, {}) }) : R ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(he, { message: R, onBack: z }) }) : !F || !_ ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(
|
|
2149
2153
|
he,
|
|
2150
2154
|
{
|
|
@@ -2167,9 +2171,9 @@ const oa = ({
|
|
|
2167
2171
|
{
|
|
2168
2172
|
"!hidden": m === !1 || p,
|
|
2169
2173
|
// Hide on mobile when channel selected, show on desktop with consistent wide width
|
|
2170
|
-
"hidden lg:flex lg:flex-1 lg:max-w-2xl": m !== !1 && !p &&
|
|
2174
|
+
"hidden lg:flex lg:flex-1 lg:max-w-2xl": m !== !1 && !p && Z,
|
|
2171
2175
|
// Show on mobile when no channel selected, use same wide width on desktop
|
|
2172
|
-
"flex flex-col w-full lg:flex-1 lg:max-w-2xl": m !== !1 && !p && !
|
|
2176
|
+
"flex flex-col w-full lg:flex-1 lg:max-w-2xl": m !== !1 && !p && !Z
|
|
2173
2177
|
}
|
|
2174
2178
|
),
|
|
2175
2179
|
children: /* @__PURE__ */ e(
|
|
@@ -2192,9 +2196,9 @@ const oa = ({
|
|
|
2192
2196
|
"messaging-conversation-view flex-1 flex-col min-w-0 min-h-0",
|
|
2193
2197
|
{
|
|
2194
2198
|
// In direct conversation mode (or waiting for it), always show (full width)
|
|
2195
|
-
flex: p ||
|
|
2199
|
+
flex: p || Z || l,
|
|
2196
2200
|
// Normal mode: hide on mobile when no channel selected
|
|
2197
|
-
"hidden lg:flex": !p && !
|
|
2201
|
+
"hidden lg:flex": !p && !Z && !l
|
|
2198
2202
|
}
|
|
2199
2203
|
),
|
|
2200
2204
|
children: $ ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ e(
|
|
@@ -2231,7 +2235,7 @@ const oa = ({
|
|
|
2231
2235
|
Ct,
|
|
2232
2236
|
{
|
|
2233
2237
|
hasChannels: ee,
|
|
2234
|
-
channelsLoaded:
|
|
2238
|
+
channelsLoaded: W
|
|
2235
2239
|
}
|
|
2236
2240
|
)
|
|
2237
2241
|
}
|
|
@@ -2359,7 +2363,7 @@ const zn = (t) => {
|
|
|
2359
2363
|
muted: m = !1,
|
|
2360
2364
|
onContainerClick: u
|
|
2361
2365
|
}) => {
|
|
2362
|
-
const h = be(s), f =
|
|
2366
|
+
const h = be(s), f = K(null), v = K(null), a = K(null), N = K(o), [b, C] = A(r), [x, I] = A(0), [w, E] = A(!1), [P, U] = A(!1), [k, T] = A(!1), [M, y] = A(!1), [_, F] = A(!0), [H, R] = A(null), z = G(() => {
|
|
2363
2367
|
T(!1), C(!0);
|
|
2364
2368
|
}, []), S = G((g) => {
|
|
2365
2369
|
const p = v.current;
|
|
@@ -2377,9 +2381,9 @@ const zn = (t) => {
|
|
|
2377
2381
|
const p = S(g);
|
|
2378
2382
|
I(p), $(p);
|
|
2379
2383
|
};
|
|
2380
|
-
|
|
2384
|
+
J(() => {
|
|
2381
2385
|
o !== void 0 && o !== N.current && (N.current = o, C(o));
|
|
2382
|
-
}, [o]),
|
|
2386
|
+
}, [o]), J(() => {
|
|
2383
2387
|
if (!b) {
|
|
2384
2388
|
a.current !== null && (cancelAnimationFrame(a.current), a.current = null);
|
|
2385
2389
|
return;
|
|
@@ -2391,12 +2395,12 @@ const zn = (t) => {
|
|
|
2391
2395
|
return a.current = requestAnimationFrame(g), () => {
|
|
2392
2396
|
a.current !== null && cancelAnimationFrame(a.current);
|
|
2393
2397
|
};
|
|
2394
|
-
}, [b, w]),
|
|
2398
|
+
}, [b, w]), J(() => {
|
|
2395
2399
|
const g = f.current;
|
|
2396
2400
|
g && (b ? g.play().catch((p) => {
|
|
2397
2401
|
C(!1), T(!0);
|
|
2398
2402
|
}) : g.pause());
|
|
2399
|
-
}, [b]),
|
|
2403
|
+
}, [b]), J(() => {
|
|
2400
2404
|
if (!w) return;
|
|
2401
2405
|
const g = (L) => I(S(L)), p = (L) => {
|
|
2402
2406
|
E(!1), $(S(L));
|
|
@@ -2405,7 +2409,7 @@ const zn = (t) => {
|
|
|
2405
2409
|
window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", p), window.removeEventListener("touchmove", g), window.removeEventListener("touchend", p);
|
|
2406
2410
|
};
|
|
2407
2411
|
}, [w, S, $]);
|
|
2408
|
-
const ee = H ? { aspectRatio: String(H) } : void 0, te = H ? "" : " aspect-video",
|
|
2412
|
+
const ee = H ? { aspectRatio: String(H) } : void 0, te = H ? "" : " aspect-video", W = Math.round(x * 100);
|
|
2409
2413
|
return /* @__PURE__ */ d(
|
|
2410
2414
|
"div",
|
|
2411
2415
|
{
|
|
@@ -2514,7 +2518,7 @@ const zn = (t) => {
|
|
|
2514
2518
|
{
|
|
2515
2519
|
role: "slider",
|
|
2516
2520
|
"aria-label": "Playback position",
|
|
2517
|
-
"aria-valuenow":
|
|
2521
|
+
"aria-valuenow": W,
|
|
2518
2522
|
"aria-valuemin": 0,
|
|
2519
2523
|
"aria-valuemax": 100,
|
|
2520
2524
|
tabIndex: 0,
|
|
@@ -2530,7 +2534,7 @@ const zn = (t) => {
|
|
|
2530
2534
|
"div",
|
|
2531
2535
|
{
|
|
2532
2536
|
className: "h-full rounded-full bg-white",
|
|
2533
|
-
style: { width: `${
|
|
2537
|
+
style: { width: `${W}%` }
|
|
2534
2538
|
}
|
|
2535
2539
|
) })
|
|
2536
2540
|
}
|
|
@@ -2553,7 +2557,7 @@ const zn = (t) => {
|
|
|
2553
2557
|
{
|
|
2554
2558
|
role: "slider",
|
|
2555
2559
|
"aria-label": "Playback position",
|
|
2556
|
-
"aria-valuenow":
|
|
2560
|
+
"aria-valuenow": W,
|
|
2557
2561
|
"aria-valuemin": 0,
|
|
2558
2562
|
"aria-valuemax": 100,
|
|
2559
2563
|
tabIndex: 0,
|
|
@@ -2576,7 +2580,7 @@ const zn = (t) => {
|
|
|
2576
2580
|
"div",
|
|
2577
2581
|
{
|
|
2578
2582
|
className: "h-full rounded-full bg-white",
|
|
2579
|
-
style: { width: `${
|
|
2583
|
+
style: { width: `${W}%` }
|
|
2580
2584
|
}
|
|
2581
2585
|
)
|
|
2582
2586
|
}
|
|
@@ -2585,7 +2589,7 @@ const zn = (t) => {
|
|
|
2585
2589
|
"div",
|
|
2586
2590
|
{
|
|
2587
2591
|
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${P || w ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
2588
|
-
style: { left: `${
|
|
2592
|
+
style: { left: `${W}%` }
|
|
2589
2593
|
}
|
|
2590
2594
|
)
|
|
2591
2595
|
]
|
|
@@ -2792,7 +2796,7 @@ function Ae(t) {
|
|
|
2792
2796
|
(n) => n.type === "link" || !!n.og_scrape_url && !n.asset_url
|
|
2793
2797
|
);
|
|
2794
2798
|
}
|
|
2795
|
-
async function
|
|
2799
|
+
async function Wn(t, s) {
|
|
2796
2800
|
let n;
|
|
2797
2801
|
try {
|
|
2798
2802
|
n = s ?? new URL(t).pathname.split("/").pop() ?? "download";
|
|
@@ -2804,7 +2808,7 @@ async function qn(t, s) {
|
|
|
2804
2808
|
const o = await r.blob(), l = URL.createObjectURL(o), i = document.createElement("a");
|
|
2805
2809
|
i.href = l, i.download = n, i.style.display = "none", document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(l);
|
|
2806
2810
|
}
|
|
2807
|
-
const
|
|
2811
|
+
const qn = ({
|
|
2808
2812
|
url: t,
|
|
2809
2813
|
filename: s
|
|
2810
2814
|
}) => {
|
|
@@ -2816,7 +2820,7 @@ const Wn = ({
|
|
|
2816
2820
|
onClick: (l) => {
|
|
2817
2821
|
l.stopPropagation();
|
|
2818
2822
|
const i = window.open("", "_blank", "noopener,noreferrer");
|
|
2819
|
-
r(!0),
|
|
2823
|
+
r(!0), Wn(t, s).then(() => {
|
|
2820
2824
|
i == null || i.close();
|
|
2821
2825
|
}).catch(() => {
|
|
2822
2826
|
i && (i.location.href = t);
|
|
@@ -2906,7 +2910,7 @@ const kt = ({
|
|
|
2906
2910
|
containedImage: l === "image" || l === "document"
|
|
2907
2911
|
}
|
|
2908
2912
|
),
|
|
2909
|
-
action: /* @__PURE__ */ e(
|
|
2913
|
+
action: /* @__PURE__ */ e(qn, { url: t, filename: n })
|
|
2910
2914
|
}
|
|
2911
2915
|
);
|
|
2912
2916
|
}, Xn = ({
|
|
@@ -2983,4 +2987,4 @@ export {
|
|
|
2983
2987
|
Ae as r,
|
|
2984
2988
|
on as u
|
|
2985
2989
|
};
|
|
2986
|
-
//# sourceMappingURL=index-
|
|
2990
|
+
//# sourceMappingURL=index-8ZuHtwFb.js.map
|