@realtimexsco/live-chat 1.3.2 → 1.3.3
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/README.md +6 -9
- package/dist/index.cjs +30 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +30 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/dist/index.mjs
CHANGED
|
@@ -10344,11 +10344,12 @@ function MessageAttachmentsView({
|
|
|
10344
10344
|
const isImageOnlyBubble = isBubbleLayout && nonImages.length === 0 && images.length > 0;
|
|
10345
10345
|
const showImageMetaOverlay = isImageOnlyBubble && !hasMessageCaption && !anyImageHasCaption && !attachmentSelectionMode;
|
|
10346
10346
|
const showCaptionBar = showBottomBar && (!isImageOnlyBubble || hasMessageCaption);
|
|
10347
|
-
const
|
|
10347
|
+
const canShowSenderName = !!isGroup && !isSender && !!showSenderLabel && !!senderName;
|
|
10348
|
+
const showForwardedInHeader = isBubbleLayout && isForwarded;
|
|
10349
|
+
const bubbleSurface = !isBubbleLayout ? void 0 : isImageOnlyBubble && !hasMessageCaption && !anyImageHasCaption && !isForwarded && !canShowSenderName ? "media" : isSender ? "sent" : "received";
|
|
10348
10350
|
const metaTimeClass = showImageMetaOverlay ? "text-white/90" : isSender ? "text-white/70" : "text-(--chat-muted)";
|
|
10349
10351
|
const metaBorderClass = isSender ? "border-white/15" : "border-(--chat-border)/40";
|
|
10350
10352
|
const metaBadgeVariant = showImageMetaOverlay || isBubbleLayout && isSender ? "on-dark" : "default";
|
|
10351
|
-
const isForwardedImageOnly = isBubbleLayout && isForwarded && isImageOnlyBubble;
|
|
10352
10353
|
return /* @__PURE__ */ jsxs(
|
|
10353
10354
|
"div",
|
|
10354
10355
|
{
|
|
@@ -10367,29 +10368,36 @@ function MessageAttachmentsView({
|
|
|
10367
10368
|
isSender,
|
|
10368
10369
|
surface: bubbleSurface,
|
|
10369
10370
|
className: cn(
|
|
10370
|
-
isImageOnlyBubble ? "p-0" : isForwarded ? "px-2 py-0.5" : "px-2.5 py-1"
|
|
10371
|
+
isImageOnlyBubble ? "overflow-hidden p-0" : isForwarded || canShowSenderName ? "px-2 py-0.5" : "px-2.5 py-1"
|
|
10371
10372
|
)
|
|
10372
10373
|
})
|
|
10373
10374
|
),
|
|
10374
10375
|
children: [
|
|
10375
|
-
|
|
10376
|
-
|
|
10376
|
+
(canShowSenderName || showForwardedInHeader) && /* @__PURE__ */ jsxs(
|
|
10377
|
+
"div",
|
|
10378
|
+
{
|
|
10379
|
+
className: cn(
|
|
10380
|
+
"relative z-10 flex min-w-0 flex-col gap-0.5",
|
|
10381
|
+
isImageOnlyBubble ? "px-2.5 pt-1.5 pb-1" : "px-0.5 pb-0.5"
|
|
10382
|
+
),
|
|
10383
|
+
children: [
|
|
10384
|
+
canShowSenderName ? /* @__PURE__ */ jsx(GroupSenderName, { name: senderName }) : null,
|
|
10385
|
+
showForwardedInHeader ? /* @__PURE__ */ jsx(
|
|
10386
|
+
MessageForwardedLabel,
|
|
10387
|
+
{
|
|
10388
|
+
isSender,
|
|
10389
|
+
className: "px-0 pt-0 pb-0"
|
|
10390
|
+
}
|
|
10391
|
+
) : null
|
|
10392
|
+
]
|
|
10393
|
+
}
|
|
10394
|
+
),
|
|
10377
10395
|
isBubbleLayout && replySnippet ? /* @__PURE__ */ jsx("div", { className: "px-2 pb-1", children: replySnippet }) : null,
|
|
10378
10396
|
/* @__PURE__ */ jsxs("div", { className: cn(
|
|
10379
10397
|
"flex w-full flex-col",
|
|
10380
10398
|
!isImageOnlyBubble && "gap-0",
|
|
10381
|
-
isImageOnlyBubble && "relative overflow-hidden
|
|
10399
|
+
isImageOnlyBubble && "relative overflow-hidden"
|
|
10382
10400
|
), children: [
|
|
10383
|
-
isForwardedImageOnly && /* @__PURE__ */ jsx(
|
|
10384
|
-
"div",
|
|
10385
|
-
{
|
|
10386
|
-
className: cn(
|
|
10387
|
-
"pointer-events-none absolute inset-x-0 top-0 z-20 px-2 py-0.5",
|
|
10388
|
-
isSender ? "bg-linear-to-b from-(--chat-theme)/95 via-(--chat-theme)/55 to-transparent" : "bg-linear-to-b from-(--chat-incoming-bubble)/95 via-(--chat-incoming-bubble)/55 to-transparent"
|
|
10389
|
-
),
|
|
10390
|
-
children: /* @__PURE__ */ jsx(MessageForwardedLabel, { isSender, overlay: true, className: "px-0 pt-0 pb-0" })
|
|
10391
|
-
}
|
|
10392
|
-
),
|
|
10393
10401
|
/* @__PURE__ */ jsx(
|
|
10394
10402
|
MessageAttachmentsImageSection,
|
|
10395
10403
|
{
|
|
@@ -13827,6 +13835,7 @@ function MessageItemTextBubble({
|
|
|
13827
13835
|
isSender,
|
|
13828
13836
|
className: extra
|
|
13829
13837
|
});
|
|
13838
|
+
const canShowSenderName = !!isGroup && !isSender && !!showSenderLabel && !!senderName;
|
|
13830
13839
|
return /* @__PURE__ */ jsxs(
|
|
13831
13840
|
"div",
|
|
13832
13841
|
{
|
|
@@ -13834,15 +13843,17 @@ function MessageItemTextBubble({
|
|
|
13834
13843
|
bubbleClasses(
|
|
13835
13844
|
cn(
|
|
13836
13845
|
"flex min-w-[72px] flex-col transition-all duration-200",
|
|
13837
|
-
isForwarded ? "gap-0.5 px-2.5 py-1.5 text-[13px]" : "gap-1 px-3.5 py-2.5 text-[14px]"
|
|
13846
|
+
canShowSenderName ? "gap-0.5 px-2.5 py-1.5 text-[14px]" : isForwarded ? "gap-0.5 px-2.5 py-1.5 text-[13px]" : "gap-1 px-3.5 py-2.5 text-[14px]"
|
|
13838
13847
|
)
|
|
13839
13848
|
),
|
|
13840
13849
|
isPending && "opacity-70",
|
|
13841
13850
|
isHighlighted && (isSender ? "ring-2 ring-amber-300/60" : "ring-2 ring-amber-200/60")
|
|
13842
13851
|
),
|
|
13843
13852
|
children: [
|
|
13844
|
-
isForwarded && /* @__PURE__ */
|
|
13845
|
-
|
|
13853
|
+
(canShowSenderName || isForwarded) && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
13854
|
+
canShowSenderName ? /* @__PURE__ */ jsx(GroupSenderName, { name: senderName }) : null,
|
|
13855
|
+
isForwarded ? /* @__PURE__ */ jsx(MessageForwardedLabel, { isSender, className: "px-0 pt-0 pb-0" }) : null
|
|
13856
|
+
] }),
|
|
13846
13857
|
/* @__PURE__ */ jsx(
|
|
13847
13858
|
MessageReplySnippet_default,
|
|
13848
13859
|
{
|