@realtimexsco/live-chat 1.4.17 → 1.4.18

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/index.mjs CHANGED
@@ -9795,10 +9795,10 @@ function AudioAttachmentPlayer({
9795
9795
  "div",
9796
9796
  {
9797
9797
  className: cn(
9798
- "chat-audio-player w-full min-w-[220px] max-w-[280px] rounded-xl border p-2.5",
9798
+ "chat-audio-player w-full min-w-[220px] max-w-[280px] rounded-xl border p-2.5 transition-shadow duration-150",
9799
9799
  onThemeBubble && "chat-audio-player-on-dark border-white/20 bg-white/12 text-white shadow-[inset_0_1px_0_rgba(255,255,255,0.08)] backdrop-blur-[2px]",
9800
- onIncomingBubble && "border-(--chat-border)/70 bg-(--chat-elevated) text-(--chat-text) shadow-sm [.dark_&]:bg-(--chat-surface)",
9801
- !inBubble && "border-(--chat-border) bg-(--chat-elevated) text-(--chat-text) shadow-sm",
9800
+ onIncomingBubble && "border-(--chat-border)/70 bg-(--chat-elevated) text-(--chat-text) shadow-sm hover:shadow-md [.dark_&]:bg-(--chat-surface)",
9801
+ !inBubble && "border-(--chat-border) bg-(--chat-elevated) text-(--chat-text) shadow-sm hover:shadow-md",
9802
9802
  className
9803
9803
  ),
9804
9804
  children: [
@@ -9834,7 +9834,7 @@ function AudioAttachmentPlayer({
9834
9834
  onClick: () => void togglePlay(),
9835
9835
  disabled: !url,
9836
9836
  className: cn(
9837
- "flex size-8 shrink-0 items-center justify-center rounded-full border transition-colors",
9837
+ "flex size-8 shrink-0 items-center justify-center rounded-full border transition-all duration-150 hover:scale-105",
9838
9838
  onThemeBubble ? "border-white/30 bg-white/10 text-white hover:bg-white/15" : "border-(--chat-border) bg-(--chat-input-bg) text-(--chat-text) hover:bg-(--chat-hover)",
9839
9839
  !url && "opacity-40"
9840
9840
  ),
@@ -9888,10 +9888,10 @@ function getMediaCardClasses(inBubble, isSender) {
9888
9888
  const onThemeBubble = inBubble && isSender;
9889
9889
  const onIncomingBubble = inBubble && !isSender;
9890
9890
  return cn(
9891
- "w-full min-w-[220px] max-w-[280px] rounded-xl border p-2.5",
9891
+ "w-full min-w-[220px] max-w-[280px] rounded-xl border p-2.5 transition-shadow duration-150",
9892
9892
  onThemeBubble && "border-white/20 bg-white/12 text-white shadow-[inset_0_1px_0_rgba(255,255,255,0.08)] backdrop-blur-[2px]",
9893
- onIncomingBubble && "border-(--chat-border)/70 bg-(--chat-elevated) text-(--chat-text) shadow-sm [.dark_&]:bg-(--chat-surface)",
9894
- !inBubble && "border-(--chat-border) bg-(--chat-elevated) text-(--chat-text) shadow-sm"
9893
+ onIncomingBubble && "border-(--chat-border)/70 bg-(--chat-elevated) text-(--chat-text) shadow-sm hover:shadow-md [.dark_&]:bg-(--chat-surface)",
9894
+ !inBubble && "border-(--chat-border) bg-(--chat-elevated) text-(--chat-text) shadow-sm hover:shadow-md"
9895
9895
  );
9896
9896
  }
9897
9897
  function VideoAttachmentPlayer({
@@ -10015,10 +10015,10 @@ function VideoAttachmentPlayer({
10015
10015
  {
10016
10016
  type: "button",
10017
10017
  onClick: () => void togglePlay(),
10018
- className: "absolute inset-0 flex items-center justify-center bg-black/20 transition-colors hover:bg-black/30",
10018
+ className: "group/play absolute inset-0 flex items-center justify-center bg-black/20 transition-colors hover:bg-black/30",
10019
10019
  "aria-label": `Play ${name}`,
10020
10020
  children: /* @__PURE__ */ jsx("span", { className: cn(
10021
- "flex items-center justify-center rounded-full shadow-md",
10021
+ "flex items-center justify-center rounded-full shadow-md transition-transform duration-150 group-hover/play:scale-110",
10022
10022
  compact ? "size-9" : "size-11",
10023
10023
  onThemeBubble ? "bg-white/95 text-(--chat-theme)" : "bg-(--chat-surface)/95 text-(--chat-text)"
10024
10024
  ), children: /* @__PURE__ */ jsx(Play, { size: compact ? 15 : 18, className: "ml-0.5 fill-current" }) })
@@ -10061,13 +10061,13 @@ function getAttachmentIcon(fileName, type, className, size = 20) {
10061
10061
  }
10062
10062
  function getAttachmentIconBoxClass(fileName, type) {
10063
10063
  const ext = fileName.split(".").pop()?.toLowerCase() || "";
10064
- if (["mp3", "wav", "ogg", "m4a"].includes(ext)) return "bg-violet-500";
10065
- if (["mp4", "mov", "webm"].includes(ext)) return "bg-pink-500";
10066
- if (ext === "pdf") return "bg-red-500";
10067
- if (["doc", "docx"].includes(ext)) return "bg-blue-500";
10068
- if (["xls", "xlsx", "csv"].includes(ext)) return "bg-emerald-600";
10069
- if (["ppt", "pptx"].includes(ext)) return "bg-orange-500";
10070
- return "bg-slate-500";
10064
+ if (["mp3", "wav", "ogg", "m4a"].includes(ext)) return "bg-linear-to-br from-violet-500 to-fuchsia-500";
10065
+ if (["mp4", "mov", "webm"].includes(ext)) return "bg-linear-to-br from-pink-500 to-rose-500";
10066
+ if (ext === "pdf") return "bg-linear-to-br from-red-500 to-rose-600";
10067
+ if (["doc", "docx"].includes(ext)) return "bg-linear-to-br from-blue-500 to-indigo-500";
10068
+ if (["xls", "xlsx", "csv"].includes(ext)) return "bg-linear-to-br from-emerald-500 to-teal-600";
10069
+ if (["ppt", "pptx"].includes(ext)) return "bg-linear-to-br from-orange-500 to-amber-500";
10070
+ return "bg-linear-to-br from-slate-500 to-slate-600";
10071
10071
  }
10072
10072
  var MessageStatus = ({ status, isPending, className }) => {
10073
10073
  const resolvedStatus = status || "sent";
@@ -11217,28 +11217,28 @@ function ImageTile({ att, className, fill, embeddedInBubble, showImageCaption, o
11217
11217
  {
11218
11218
  type: "button",
11219
11219
  className: cn(
11220
- "relative block w-full overflow-hidden bg-(--chat-elevated)",
11220
+ "group relative block w-full overflow-hidden bg-(--chat-elevated)",
11221
11221
  fill ? "h-full min-h-0" : "",
11222
11222
  className
11223
11223
  ),
11224
11224
  onClick: onOpen,
11225
11225
  "aria-label": `Open ${att.name || "image"}`,
11226
11226
  children: [
11227
- mediaUrl ? (
11228
- // eslint-disable-next-line @next/next/no-img-element -- remote chat attachment URLs are dynamic/user-supplied
11227
+ mediaUrl ? /* @__PURE__ */ jsxs(Fragment, { children: [
11229
11228
  /* @__PURE__ */ jsx(
11230
11229
  "img",
11231
11230
  {
11232
11231
  src: mediaUrl,
11233
11232
  alt: att.name || "Image",
11234
11233
  className: cn(
11235
- "block",
11234
+ "block transition-transform duration-300 ease-out group-hover:scale-[1.04]",
11236
11235
  fill || embeddedInBubble ? "size-full object-cover" : "max-h-[300px] w-full rounded-xl object-contain"
11237
11236
  ),
11238
11237
  loading: "lazy"
11239
11238
  }
11240
- )
11241
- ) : /* @__PURE__ */ jsx("div", { className: "flex size-full min-h-[80px] items-center justify-center text-xs text-(--chat-muted)", children: "Image unavailable" }),
11239
+ ),
11240
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute inset-0 bg-black/0 transition-colors duration-200 group-hover:bg-black/10", "aria-hidden": true })
11241
+ ] }) : /* @__PURE__ */ jsx("div", { className: "flex size-full min-h-[80px] items-center justify-center text-xs text-(--chat-muted)", children: "Image unavailable" }),
11242
11242
  showImageCaption && imageCaption ? /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 z-10 bg-linear-to-t from-black/75 via-black/35 to-transparent px-1.5 pb-1 pt-5 text-left", children: /* @__PURE__ */ jsx("p", { className: "line-clamp-3 text-[10px] leading-snug text-white", children: imageCaption }) }) : null
11243
11243
  ]
11244
11244
  }
@@ -11673,14 +11673,14 @@ function FileAttachmentRow({
11673
11673
  "div",
11674
11674
  {
11675
11675
  className: cn(
11676
- "group w-full transition-opacity",
11676
+ "group w-full transition-all duration-150",
11677
11677
  !stacked && "flex min-w-[220px] items-center gap-2",
11678
11678
  stacked && "py-1.5",
11679
11679
  stacked && showDivider && (onThemeBubble ? "border-t border-white/15" : "border-t border-(--chat-border)/35"),
11680
11680
  !stacked && "rounded-xl border p-2.5",
11681
- !stacked && onThemeBubble && "border-white/20 bg-white/12 text-white shadow-[inset_0_1px_0_rgba(255,255,255,0.08)] backdrop-blur-[2px]",
11682
- !stacked && onIncomingBubble && "border-(--chat-border)/70 bg-(--chat-elevated) text-(--chat-text) shadow-sm [.dark_&]:bg-(--chat-surface)",
11683
- !stacked && !inBubble && "border-(--chat-border) bg-(--chat-surface) shadow-sm",
11681
+ !stacked && onThemeBubble && "border-white/20 bg-white/12 text-white shadow-[inset_0_1px_0_rgba(255,255,255,0.08)] backdrop-blur-[2px] hover:bg-white/16",
11682
+ !stacked && onIncomingBubble && "border-(--chat-border)/70 bg-(--chat-elevated) text-(--chat-text) shadow-sm hover:border-(--chat-theme)/30 hover:shadow-md [.dark_&]:bg-(--chat-surface)",
11683
+ !stacked && !inBubble && "border-(--chat-border) bg-(--chat-surface) shadow-sm hover:border-(--chat-theme)/30 hover:shadow-md",
11684
11684
  !fileUrl && "pointer-events-none opacity-60",
11685
11685
  isCaptionActive && "opacity-90"
11686
11686
  ),
@@ -11695,7 +11695,7 @@ function FileAttachmentRow({
11695
11695
  className: "flex min-w-0 flex-1 items-center gap-2.5 text-left disabled:cursor-default",
11696
11696
  children: [
11697
11697
  /* @__PURE__ */ jsx("div", { className: cn(
11698
- "flex size-10 shrink-0 items-center justify-center rounded-lg text-white shadow-sm",
11698
+ "flex size-10 shrink-0 items-center justify-center rounded-lg text-white shadow-sm transition-transform duration-150 group-hover:scale-105",
11699
11699
  getAttachmentIconBoxClass(rawName)
11700
11700
  ), children: getAttachmentIcon(rawName, "file", "text-white", 18) }),
11701
11701
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [