@linktr.ee/messaging-react 4.4.3 → 4.4.4-rc-1788190776
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/AttachmentCard-BbsjzdLJ.cjs +2 -0
- package/dist/AttachmentCard-BbsjzdLJ.cjs.map +1 -0
- package/dist/{AttachmentCard-BqwWgqvi.js → AttachmentCard-DSekwIOA.js} +35 -20
- package/dist/AttachmentCard-DSekwIOA.js.map +1 -0
- package/dist/{Card-BIbqWagz.cjs → Card-BS6Fza2a.cjs} +2 -2
- package/dist/{Card-BIbqWagz.cjs.map → Card-BS6Fza2a.cjs.map} +1 -1
- package/dist/{Card-f51K6V7Y.js → Card-BhwBkgxI.js} +2 -2
- package/dist/{Card-f51K6V7Y.js.map → Card-BhwBkgxI.js.map} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +67 -42
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/AttachmentCard/MediaPlayer.test.tsx +62 -85
- package/src/components/AttachmentCard/MediaPlayer.tsx +14 -2
- package/src/components/AttachmentCard/Thumbnail.test.tsx +37 -46
- package/src/components/AttachmentCard/index.test.tsx +18 -46
- package/src/components/AttachmentCard/index.tsx +8 -2
- package/src/components/AttachmentCard/utils/icons.ts +11 -1
- package/src/components/Avatar/Avatar.test.tsx +37 -64
- package/src/components/Avatar/index.tsx +8 -1
- package/src/components/ChannelList/CustomChannelPreview.test.tsx +19 -19
- package/src/components/ChannelList/CustomChannelPreview.tsx +8 -2
- package/src/components/ChannelView.outbound-resolution.integration.test.tsx +25 -30
- package/src/components/ChannelView.test.tsx +17 -31
- package/src/components/ChannelView.tsx +1 -0
- package/src/components/CustomLinkPreviewList/CustomLinkPreviewList.test.tsx +8 -5
- package/src/components/CustomLinkPreviewList/index.tsx +4 -1
- package/src/components/CustomMessage/StreamAttachmentMessage.test.tsx +26 -21
- package/src/components/CustomMessage/StreamAttachmentMessage.tsx +2 -0
- package/src/components/CustomMessageInput/CustomMessageInput.test.tsx +43 -56
- package/src/components/CustomMessageInput/index.tsx +25 -5
- package/src/components/CustomSystemMessage/CustomSystemMessage.test.tsx +17 -23
- package/src/components/FaqList/FaqList.test.tsx +5 -4
- package/src/components/FaqList/index.tsx +6 -1
- package/src/components/LinkAttachment/LinkAttachment.test.tsx +70 -81
- package/src/components/LinkAttachment/components/_shared/BubbleTail.test.tsx +1 -0
- package/src/components/LinkAttachment/components/_shared/CardBody.test.tsx +20 -61
- package/src/components/LinkAttachment/components/_shared/CardBody.tsx +10 -2
- package/src/components/LinkAttachment/components/_shared/CardCta.test.tsx +1 -21
- package/src/components/LinkAttachment/components/_shared/CardShell.test.tsx +11 -37
- package/src/components/LinkAttachment/components/_shared/CardShell.tsx +5 -2
- package/src/components/LinkAttachment/components/_shared/CardThumbnail.test.tsx +65 -72
- package/src/components/LinkAttachment/components/_shared/CardThumbnail.tsx +13 -2
- package/src/components/MessageAttachment/MessageAttachment.test.tsx +25 -8
- package/src/components/MessageAttachment/_shared/CompactDocumentRow.test.tsx +5 -19
- package/src/components/MessageAttachment/_shared/MediaStackGrid.test.tsx +7 -9
- package/src/components/MessageAttachment/_shared/VideoViewer.test.tsx +9 -2
- package/src/components/MessageAttachment/_shared/VideoViewer.tsx +1 -0
- package/src/components/MessageAttachment/_shared/ViewerShell.test.tsx +2 -2
- package/src/components/MessageBubble/MessageBubble.test.tsx +0 -1
- package/src/components/RichCard/RichCard.test.tsx +24 -54
- package/src/components/RichCard/RichCardBody.tsx +4 -1
- package/src/hooks/useChannelModerationActions.ts +15 -30
- package/src/logging/index.test.tsx +1 -0
- package/src/providers/MessagingProvider.test.tsx +37 -41
- package/dist/AttachmentCard-BqwWgqvi.js.map +0 -1
- package/dist/AttachmentCard-DUrgGRsq.cjs +0 -2
- package/dist/AttachmentCard-DUrgGRsq.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a } from "./AttachmentCard-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a } from "./AttachmentCard-DSekwIOA.js";
|
|
2
2
|
import o, { Suspense as s, createContext as c, useCallback as l, useContext as u, useEffect as d, useId as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
3
3
|
import { StreamChatService as g } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { LinkPreviewsManager as _, StreamChat as v } from "stream-chat";
|
|
@@ -364,6 +364,7 @@ function gt(e) {
|
|
|
364
364
|
//#region src/components/Avatar/index.tsx
|
|
365
365
|
var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape: a = "squircle", dmAgentEnabled: o = !1 }) => {
|
|
366
366
|
let s = ht(e), c = gt(e), l = n < 32 ? Math.round(n * .45) : n < 56 ? 14 : n < 120 ? 18 : 36, u = n >= 40 ? 2 : 1, d = a === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ U("div", {
|
|
367
|
+
"data-testid": "avatar-inner",
|
|
367
368
|
className: "h-full w-full overflow-hidden",
|
|
368
369
|
style: d,
|
|
369
370
|
children: t ? /* @__PURE__ */ U("img", {
|
|
@@ -372,6 +373,7 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
|
|
|
372
373
|
className: "h-full w-full object-cover"
|
|
373
374
|
}) : /* @__PURE__ */ U("div", {
|
|
374
375
|
"aria-hidden": "true",
|
|
376
|
+
"data-testid": "avatar-fallback",
|
|
375
377
|
className: J("avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"),
|
|
376
378
|
style: {
|
|
377
379
|
fontSize: l,
|
|
@@ -381,6 +383,7 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
|
|
|
381
383
|
})
|
|
382
384
|
});
|
|
383
385
|
return /* @__PURE__ */ W("div", {
|
|
386
|
+
"data-testid": "avatar",
|
|
384
387
|
className: J("relative flex-shrink-0", r),
|
|
385
388
|
style: {
|
|
386
389
|
"--str-chat__avatar-size": `${n}px`,
|
|
@@ -391,6 +394,7 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
|
|
|
391
394
|
},
|
|
392
395
|
children: [i && /* @__PURE__ */ U("div", {
|
|
393
396
|
"aria-hidden": "true",
|
|
397
|
+
"data-testid": "avatar-star",
|
|
394
398
|
className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
395
399
|
children: /* @__PURE__ */ U(We, {
|
|
396
400
|
className: "size-3 text-yellow-600",
|
|
@@ -413,7 +417,7 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
|
|
|
413
417
|
});
|
|
414
418
|
}, vt = "https://linktr.ee/s/about/trust-center/report", yt = ({ channel: e, participant: t, showBlockParticipant: n = !0, enabled: r = !0, onLeaveConversation: i, onBlockParticipant: a, onDeleteConversationClick: o, onBlockParticipantClick: s, onReportParticipantClick: c, onActionComplete: l, logLabel: u = "useChannelModerationActions" }) => {
|
|
415
419
|
let { service: f, debug: p } = rt(), m = t?.user?.id, g = !!(r && n && f && m), [_, v] = h(!1), [y, b] = h(null), [x, S] = h(!1), [C, w] = h(!1), T = g && (y?.participantId !== m || y?.service !== f);
|
|
416
|
-
|
|
420
|
+
d(() => {
|
|
417
421
|
if (!g || !f || !m) {
|
|
418
422
|
v(!1), b(null);
|
|
419
423
|
return;
|
|
@@ -440,48 +444,40 @@ var _t = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
|
|
|
440
444
|
f,
|
|
441
445
|
m,
|
|
442
446
|
u
|
|
443
|
-
])
|
|
447
|
+
]);
|
|
448
|
+
let E = async () => {
|
|
449
|
+
if (!x) {
|
|
450
|
+
o?.(), p && console.log(`[${u}] Leave conversation`, e.cid), S(!0);
|
|
451
|
+
try {
|
|
452
|
+
let t = e._client?.userID ?? null;
|
|
453
|
+
await e.hide(t, !1), i && await i(e), l?.();
|
|
454
|
+
} catch (e) {
|
|
455
|
+
console.error(`[${u}] Failed to leave conversation`, e);
|
|
456
|
+
} finally {
|
|
457
|
+
S(!1);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}, D = (e) => async () => {
|
|
461
|
+
if (C || !f) return;
|
|
462
|
+
s?.();
|
|
463
|
+
let n = t?.user?.id;
|
|
464
|
+
p && console.log(`[${u}] ${e === "block" ? "Block" : "Unblock"} member`, n), w(!0);
|
|
465
|
+
try {
|
|
466
|
+
e === "block" ? await f.blockUser(n) : await f.unBlockUser(n), a && await a(n), l?.();
|
|
467
|
+
} catch (t) {
|
|
468
|
+
console.error(`[${u}] Failed to ${e} member`, t);
|
|
469
|
+
} finally {
|
|
470
|
+
w(!1);
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
return {
|
|
444
474
|
isParticipantBlocked: _,
|
|
445
475
|
isCheckingBlockedStatus: T,
|
|
446
476
|
isLeaving: x,
|
|
447
477
|
isUpdatingBlockStatus: C,
|
|
448
|
-
handleLeaveConversation:
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
try {
|
|
452
|
-
let t = e._client?.userID ?? null;
|
|
453
|
-
await e.hide(t, !1), i && await i(e), l?.();
|
|
454
|
-
} catch (e) {
|
|
455
|
-
console.error(`[${u}] Failed to leave conversation`, e);
|
|
456
|
-
} finally {
|
|
457
|
-
S(!1);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
},
|
|
461
|
-
handleBlockUser: async () => {
|
|
462
|
-
if (!(C || !f)) {
|
|
463
|
-
s?.(), p && console.log(`[${u}] Block member`, t?.user?.id), w(!0);
|
|
464
|
-
try {
|
|
465
|
-
await f.blockUser(t?.user?.id), a && await a(t?.user?.id), l?.();
|
|
466
|
-
} catch (e) {
|
|
467
|
-
console.error(`[${u}] Failed to block member`, e);
|
|
468
|
-
} finally {
|
|
469
|
-
w(!1);
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
},
|
|
473
|
-
handleUnblockUser: async () => {
|
|
474
|
-
if (!(C || !f)) {
|
|
475
|
-
s?.(), p && console.log(`[${u}] Unblock member`, t?.user?.id), w(!0);
|
|
476
|
-
try {
|
|
477
|
-
await f.unBlockUser(t?.user?.id), a && await a(t?.user?.id), l?.();
|
|
478
|
-
} catch (e) {
|
|
479
|
-
console.error(`[${u}] Failed to unblock member`, e);
|
|
480
|
-
} finally {
|
|
481
|
-
w(!1);
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
},
|
|
478
|
+
handleLeaveConversation: E,
|
|
479
|
+
handleBlockUser: D("block"),
|
|
480
|
+
handleUnblockUser: D("unblock"),
|
|
485
481
|
handleReportUser: () => {
|
|
486
482
|
c?.(), l?.(), window.open(vt, "_blank", "noopener,noreferrer");
|
|
487
483
|
}
|
|
@@ -711,7 +707,7 @@ function Nt(e) {
|
|
|
711
707
|
}
|
|
712
708
|
//#endregion
|
|
713
709
|
//#region src/components/CustomMessage/LockedAttachment/index.tsx
|
|
714
|
-
var Pt = o.lazy(() => import("./Card-C7uLQbYz.js")), Ft = o.lazy(() => import("./Card-
|
|
710
|
+
var Pt = o.lazy(() => import("./Card-C7uLQbYz.js")), Ft = o.lazy(() => import("./Card-BhwBkgxI.js")), It = () => /* @__PURE__ */ U("div", {
|
|
715
711
|
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)]",
|
|
716
712
|
"aria-hidden": !0
|
|
717
713
|
}), Lt = (e) => /* @__PURE__ */ U(s, {
|
|
@@ -951,9 +947,11 @@ var fn = {
|
|
|
951
947
|
children: /* @__PURE__ */ W("div", {
|
|
952
948
|
className: "flex min-w-0 flex-col gap-[2px]",
|
|
953
949
|
children: [/* @__PURE__ */ U("div", {
|
|
950
|
+
"data-testid": "card-body-skeleton-bar",
|
|
954
951
|
className: J("h-5 w-3/4", t),
|
|
955
952
|
"aria-hidden": !0
|
|
956
953
|
}), /* @__PURE__ */ U("div", {
|
|
954
|
+
"data-testid": "card-body-skeleton-bar",
|
|
957
955
|
className: J("h-4 w-1/2", t),
|
|
958
956
|
"aria-hidden": !0
|
|
959
957
|
})]
|
|
@@ -1006,12 +1004,13 @@ var fn = {
|
|
|
1006
1004
|
cta: l
|
|
1007
1005
|
})]
|
|
1008
1006
|
});
|
|
1009
|
-
}, yn = "Loading link preview", bn = J("relative w-[var(--lt-msg-card-width,290px)] max-w-full select-none overflow-hidden", "rounded-[20px]"), xn = "flex h-[250px] flex-col", Sn = ({ variant: e, children: t, href: n, onClick: r, ariaLabel: i, rootRef: a, topRight: o, bgClassName: s, accentHex: c, fixedHeight: l = !1, busy: u = !1, "data-testid": d }) => {
|
|
1007
|
+
}, yn = "Loading link preview", bn = J("relative w-[var(--lt-msg-card-width,290px)] max-w-full select-none overflow-hidden", "rounded-[20px]"), xn = "flex h-[250px] flex-col", Sn = ({ variant: e, children: t, href: n, onClick: r, ariaLabel: i, rootRef: a, topRight: o, bgClassName: s, accentHex: c, fixedHeight: l = !1, busy: u = !1, "data-testid": d = "link-card" }) => {
|
|
1010
1008
|
let f = J("messaging-link-card", bn, l ? xn : "block", s ?? (e === "dark" ? "bg-[#1e2330]" : "bg-[#f1f0ee]"), n != null || r != null ? "cursor-pointer no-underline focus-ring" : null), p = u ? {
|
|
1011
1009
|
role: "status",
|
|
1012
1010
|
"aria-busy": !0,
|
|
1013
1011
|
"aria-label": yn
|
|
1014
1012
|
} : void 0, m = c ? { "--accent": c } : void 0, h = o ? /* @__PURE__ */ U("div", {
|
|
1013
|
+
"data-testid": "card-shell-top-right",
|
|
1015
1014
|
className: "pointer-events-auto absolute right-3 top-3 z-10",
|
|
1016
1015
|
children: o
|
|
1017
1016
|
}) : null;
|
|
@@ -1063,6 +1062,7 @@ var fn = {
|
|
|
1063
1062
|
className: "p-3",
|
|
1064
1063
|
children: /* @__PURE__ */ U("audio", {
|
|
1065
1064
|
...e,
|
|
1065
|
+
"data-testid": "card-thumbnail-audio",
|
|
1066
1066
|
src: o,
|
|
1067
1067
|
controls: !0,
|
|
1068
1068
|
preload: "metadata",
|
|
@@ -1070,12 +1070,15 @@ var fn = {
|
|
|
1070
1070
|
children: /* @__PURE__ */ U("track", { kind: "captions" })
|
|
1071
1071
|
})
|
|
1072
1072
|
}) : /* @__PURE__ */ W("div", {
|
|
1073
|
+
"data-testid": "card-thumbnail-hero",
|
|
1073
1074
|
className: J("relative min-h-0 w-full flex-1 overflow-hidden", m && "bg-black"),
|
|
1074
1075
|
children: [
|
|
1075
1076
|
d ? /* @__PURE__ */ U("div", {
|
|
1077
|
+
"data-testid": "card-thumbnail-skeleton",
|
|
1076
1078
|
className: J("h-full w-full animate-pulse", Cn[r]),
|
|
1077
1079
|
"aria-hidden": !0
|
|
1078
1080
|
}) : m ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("video", {
|
|
1081
|
+
"data-testid": "card-thumbnail-video",
|
|
1079
1082
|
src: o,
|
|
1080
1083
|
poster: h,
|
|
1081
1084
|
controls: !0,
|
|
@@ -1098,6 +1101,7 @@ var fn = {
|
|
|
1098
1101
|
onError: f,
|
|
1099
1102
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
1100
1103
|
}) : /* @__PURE__ */ U("div", {
|
|
1104
|
+
"data-testid": "card-thumbnail-placeholder",
|
|
1101
1105
|
className: J("flex h-full w-full items-center justify-center", Cn[r]),
|
|
1102
1106
|
children: n(c, {
|
|
1103
1107
|
className: wn[r],
|
|
@@ -1105,10 +1109,12 @@ var fn = {
|
|
|
1105
1109
|
})
|
|
1106
1110
|
}),
|
|
1107
1111
|
l ? /* @__PURE__ */ U("div", {
|
|
1112
|
+
"data-testid": "card-thumbnail-top-left",
|
|
1108
1113
|
className: "pointer-events-auto absolute left-3 top-3 z-10",
|
|
1109
1114
|
children: l
|
|
1110
1115
|
}) : null,
|
|
1111
1116
|
u ? /* @__PURE__ */ U("div", {
|
|
1117
|
+
"data-testid": "card-thumbnail-top-right",
|
|
1112
1118
|
className: "pointer-events-auto absolute right-3 top-3 z-10",
|
|
1113
1119
|
children: u
|
|
1114
1120
|
}) : null
|
|
@@ -2144,6 +2150,7 @@ var cr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
|
|
|
2144
2150
|
"data-testid": "video-viewer",
|
|
2145
2151
|
children: [u ? /* @__PURE__ */ U("video", {
|
|
2146
2152
|
ref: c,
|
|
2153
|
+
"data-testid": "video-viewer-media",
|
|
2147
2154
|
src: g.src,
|
|
2148
2155
|
poster: g.poster,
|
|
2149
2156
|
controls: !0,
|
|
@@ -2477,6 +2484,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2477
2484
|
children: [/* @__PURE__ */ W("div", {
|
|
2478
2485
|
className: "str-chat__message-bubble",
|
|
2479
2486
|
"data-attachment-bubble": "true",
|
|
2487
|
+
"data-testid": "message-attachment-bubble",
|
|
2480
2488
|
style: {
|
|
2481
2489
|
background: "transparent",
|
|
2482
2490
|
borderRadius: 0,
|
|
@@ -2485,6 +2493,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2485
2493
|
},
|
|
2486
2494
|
children: [d, !l && /* @__PURE__ */ U(M, {})]
|
|
2487
2495
|
}), l ? /* @__PURE__ */ W("div", {
|
|
2496
|
+
"data-testid": "message-caption-bubble",
|
|
2488
2497
|
className: J("str-chat__message-bubble", { "relative isolate": p }),
|
|
2489
2498
|
children: [
|
|
2490
2499
|
/* @__PURE__ */ U(R, {
|
|
@@ -2729,6 +2738,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2729
2738
|
e.dismissPreview(t);
|
|
2730
2739
|
};
|
|
2731
2740
|
return t.length > 0 ? /* @__PURE__ */ U("div", {
|
|
2741
|
+
"data-testid": "link-preview-list",
|
|
2732
2742
|
className: "messaging-link-preview-list flex flex-col items-stretch w-full gap-2",
|
|
2733
2743
|
children: t.map((e) => {
|
|
2734
2744
|
let t = _.previewIsLoading(e);
|
|
@@ -2771,9 +2781,11 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2771
2781
|
return e.addEventListener("paste", t), () => e.removeEventListener("paste", t);
|
|
2772
2782
|
}, []), /* @__PURE__ */ W("div", {
|
|
2773
2783
|
ref: s,
|
|
2784
|
+
"data-testid": "composer-card",
|
|
2774
2785
|
className: "central-container flex flex-col min-w-0 w-full max-h-[calc(var(--messaging-surface-height,100dvh)*0.5)] overflow-y-auto overscroll-contain bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)] [&>:not(.messaging-composer-previews):not(.messaging-composer-row)]:p-2",
|
|
2775
2786
|
"data-dd-privacy": "mask",
|
|
2776
2787
|
children: [/* @__PURE__ */ W("div", {
|
|
2788
|
+
"data-testid": "composer-previews",
|
|
2777
2789
|
className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2",
|
|
2778
2790
|
children: [
|
|
2779
2791
|
/* @__PURE__ */ U(te, {}),
|
|
@@ -2781,6 +2793,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2781
2793
|
/* @__PURE__ */ U(a, {})
|
|
2782
2794
|
]
|
|
2783
2795
|
}), /* @__PURE__ */ W("div", {
|
|
2796
|
+
"data-testid": "composer-row",
|
|
2784
2797
|
className: "messaging-composer-row flex items-start",
|
|
2785
2798
|
children: [/* @__PURE__ */ U(ie, {
|
|
2786
2799
|
"aria-disabled": e || void 0,
|
|
@@ -2792,6 +2805,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2792
2805
|
readOnly: e,
|
|
2793
2806
|
tabIndex: e ? -1 : void 0
|
|
2794
2807
|
}), /* @__PURE__ */ U("div", {
|
|
2808
|
+
"data-testid": "send-button-wrapper",
|
|
2795
2809
|
className: "sticky bottom-2 mt-auto mb-2 mr-2 shrink-0 pt-2",
|
|
2796
2810
|
children: /* @__PURE__ */ U(i, {
|
|
2797
2811
|
sendMessage: t,
|
|
@@ -2834,12 +2848,14 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2834
2848
|
};
|
|
2835
2849
|
}, [l]), r ? l ? /* @__PURE__ */ W("div", {
|
|
2836
2850
|
ref: u,
|
|
2851
|
+
"data-testid": "composer-chrome",
|
|
2837
2852
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
2838
2853
|
children: [/* @__PURE__ */ U(Ti, {}), /* @__PURE__ */ W("div", {
|
|
2839
2854
|
className: "relative z-10 flex flex-col",
|
|
2840
2855
|
children: [
|
|
2841
2856
|
t?.(),
|
|
2842
2857
|
/* @__PURE__ */ U("div", {
|
|
2858
|
+
"data-testid": "composer-locked-panel",
|
|
2843
2859
|
className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4",
|
|
2844
2860
|
children: i ? /* @__PURE__ */ U("p", {
|
|
2845
2861
|
className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40",
|
|
@@ -2852,6 +2868,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2852
2868
|
}) : /* @__PURE__ */ W(H, { children: [
|
|
2853
2869
|
t?.(),
|
|
2854
2870
|
/* @__PURE__ */ U("div", {
|
|
2871
|
+
"data-testid": "composer-locked-panel",
|
|
2855
2872
|
className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4",
|
|
2856
2873
|
children: i ? /* @__PURE__ */ U("p", {
|
|
2857
2874
|
className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40",
|
|
@@ -2861,6 +2878,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2861
2878
|
n?.()
|
|
2862
2879
|
] }) : l ? /* @__PURE__ */ W("div", {
|
|
2863
2880
|
ref: u,
|
|
2881
|
+
"data-testid": "composer-chrome",
|
|
2864
2882
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
2865
2883
|
children: [/* @__PURE__ */ U(Ti, {}), /* @__PURE__ */ W("div", {
|
|
2866
2884
|
className: "relative z-10 flex min-h-0 flex-col",
|
|
@@ -2869,6 +2887,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2869
2887
|
children: [/* @__PURE__ */ W("div", {
|
|
2870
2888
|
inert: c ? "" : void 0,
|
|
2871
2889
|
"aria-disabled": c || void 0,
|
|
2890
|
+
"data-testid": "message-input",
|
|
2872
2891
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
2873
2892
|
children: [e && /* @__PURE__ */ U("div", {
|
|
2874
2893
|
className: "flex h-12 shrink-0 items-center justify-center",
|
|
@@ -2887,6 +2906,7 @@ var fi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
|
|
|
2887
2906
|
/* @__PURE__ */ W("div", {
|
|
2888
2907
|
inert: c ? "" : void 0,
|
|
2889
2908
|
"aria-disabled": c || void 0,
|
|
2909
|
+
"data-testid": "message-input",
|
|
2890
2910
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
2891
2911
|
children: [e && /* @__PURE__ */ U("div", {
|
|
2892
2912
|
className: "flex h-12 shrink-0 items-center justify-center",
|
|
@@ -3290,6 +3310,7 @@ var Ki = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
|
|
|
3290
3310
|
let te = we(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
|
|
3291
3311
|
return /* @__PURE__ */ U("div", {
|
|
3292
3312
|
ref: ee,
|
|
3313
|
+
"data-testid": "channel-view",
|
|
3293
3314
|
className: J("messaging-channel-view h-full flex flex-col", c),
|
|
3294
3315
|
style: te,
|
|
3295
3316
|
children: /* @__PURE__ */ U(Li.Provider, {
|
|
@@ -3573,6 +3594,7 @@ var Zi = o.createContext({
|
|
|
3573
3594
|
children: "Starred conversation. "
|
|
3574
3595
|
}), h]
|
|
3575
3596
|
}), y && /* @__PURE__ */ U("span", {
|
|
3597
|
+
"data-testid": "channel-preview-timestamp",
|
|
3576
3598
|
className: "text-xs text-[#717070] flex-shrink-0",
|
|
3577
3599
|
children: y
|
|
3578
3600
|
})]
|
|
@@ -3582,6 +3604,7 @@ var Zi = o.createContext({
|
|
|
3582
3604
|
className: "text-sm text-[#717070] flex-1 line-clamp-1",
|
|
3583
3605
|
children: x
|
|
3584
3606
|
}), S > 0 && /* @__PURE__ */ U("span", {
|
|
3607
|
+
"data-testid": "channel-preview-unread-badge",
|
|
3585
3608
|
className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0",
|
|
3586
3609
|
children: S > 99 ? "99+" : S
|
|
3587
3610
|
})]
|
|
@@ -3694,6 +3717,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
|
|
|
3694
3717
|
return /* @__PURE__ */ U("div", {
|
|
3695
3718
|
className: "shrink-0 px-4 py-3",
|
|
3696
3719
|
children: f ? /* @__PURE__ */ W("div", {
|
|
3720
|
+
"data-testid": "rich-card-chin-row",
|
|
3697
3721
|
className: "flex items-center justify-between gap-3",
|
|
3698
3722
|
children: [p, /* @__PURE__ */ U(la, {
|
|
3699
3723
|
surface: e,
|
|
@@ -3911,6 +3935,7 @@ var aa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", oa
|
|
|
3911
3935
|
className: "flex-1 flex flex-col gap-3 rounded-lg p-4",
|
|
3912
3936
|
style: { backgroundColor: "#F1F0EE" },
|
|
3913
3937
|
children: [r && /* @__PURE__ */ U("p", {
|
|
3938
|
+
"data-testid": "faq-list-header",
|
|
3914
3939
|
className: "text-md text-charcoal mb-4",
|
|
3915
3940
|
children: r
|
|
3916
3941
|
}), s.map((e) => /* @__PURE__ */ U(Da, {
|