@poolse/react-ui 3.6.0 → 3.6.2

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/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ All notable changes to `@poolse/react-ui` are documented here. Format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
5
5
  [semver](https://semver.org).
6
6
 
7
+ ## [3.6.2] - 2026-11-21
8
+
9
+ ### Fixed
10
+
11
+ - The thread pane follows `ConversationView`: replies get its `showAvatars`,
12
+ `showPresence` and `linkPreviews`. `ThreadView` takes those plus `density`
13
+ for use on its own.
14
+ - Re-exports `tokensFromFlat` and `FlatThemeTokens` from `@poolse/theme`.
15
+
16
+ ## [3.6.1] - 2026-11-21
17
+
18
+ ### Fixed
19
+
20
+ - A direct chat in `ConversationList` and the sender of a quoted message
21
+ show the provider's resolved display name, not the external id, when no
22
+ `labelFor` is passed.
23
+
7
24
  ## [3.6.0] - 2026-11-21
8
25
 
9
26
  ### Added
package/dist/index.cjs CHANGED
@@ -3601,7 +3601,8 @@ function QuotedCard({
3601
3601
  labelFor,
3602
3602
  onClick
3603
3603
  }) {
3604
- const senderLabel = quoted.sender_external_id ? labelFor?.(quoted.sender_external_id) ?? quoted.sender_external_id : "Unknown";
3604
+ const { profile: quotedSender } = react$1.useUser(quoted.sender_external_id ?? null);
3605
+ const senderLabel = quoted.sender_external_id ? labelFor?.(quoted.sender_external_id) ?? quotedSender?.displayName ?? quoted.sender_external_id : "Unknown";
3605
3606
  const isDeleted = !!quoted.deleted_at;
3606
3607
  const handleClick = onClick ? () => onClick(quoted.id) : void 0;
3607
3608
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -4571,6 +4572,10 @@ function ThreadView({
4571
4572
  renderMessage,
4572
4573
  layout,
4573
4574
  timeFormat,
4575
+ density,
4576
+ showAvatars,
4577
+ showPresence = false,
4578
+ linkPreviews = true,
4574
4579
  maxFileSize,
4575
4580
  acceptFileTypes
4576
4581
  }) {
@@ -4657,14 +4662,17 @@ function ThreadView({
4657
4662
  },
4658
4663
  onDelete: () => void deleteReply(msg.id),
4659
4664
  ...layout ? { layout } : {},
4660
- ...timeFormat ? { timeFormat } : {}
4665
+ ...timeFormat ? { timeFormat } : {},
4666
+ ...showAvatars !== void 0 ? { showAvatar: showAvatars } : {},
4667
+ showPresence,
4668
+ linkPreviews
4661
4669
  }
4662
4670
  );
4663
4671
  const renderOne = renderMessage ? (msg, currentUserId) => renderMessage(msg, currentUserId) : (msg) => renderDefault(msg);
4664
4672
  return /* @__PURE__ */ jsxRuntime.jsxs(
4665
4673
  "aside",
4666
4674
  {
4667
- className: `poolse-thread${dragActive ? " is-drag-active" : ""}`,
4675
+ className: `poolse-thread${density ? ` poolse-conversation--density-${density}` : ""}${dragActive ? " is-drag-active" : ""}`,
4668
4676
  role: "complementary",
4669
4677
  "aria-label": "Message thread",
4670
4678
  onDragEnter,
@@ -5520,6 +5528,9 @@ function ConversationView({
5520
5528
  onClose: () => setThreadRootId(null),
5521
5529
  layout,
5522
5530
  ...timeFormat ? { timeFormat } : {},
5531
+ showAvatars: showAvatarsResolved,
5532
+ showPresence,
5533
+ linkPreviews,
5523
5534
  ...attachmentRules
5524
5535
  }
5525
5536
  ) })
@@ -5797,8 +5808,9 @@ function DefaultRow({
5797
5808
  }) {
5798
5809
  const isDirect = conv.type === "direct";
5799
5810
  const otherExtId = isDirect && meExternalId ? (conv.member_external_ids ?? []).find((x) => x !== meExternalId) : null;
5800
- const title = isDirect ? otherExtId ? labelFor?.(otherExtId) ?? otherExtId : conv.name ?? "Direct chat" : conv.name ?? "Untitled group";
5801
- const avatarUrl = isDirect ? otherExtId ? avatarFor?.(otherExtId) ?? null : conv.avatar_url ?? null : conv.avatar_url ?? null;
5811
+ const { profile: other } = react$1.useUser(isDirect && otherExtId ? otherExtId : null);
5812
+ const title = isDirect ? otherExtId ? labelFor?.(otherExtId) ?? other?.displayName ?? otherExtId : conv.name ?? "Direct chat" : conv.name ?? "Untitled group";
5813
+ const avatarUrl = isDirect ? otherExtId ? avatarFor?.(otherExtId) ?? other?.avatarUrl ?? null : conv.avatar_url ?? null : conv.avatar_url ?? null;
5802
5814
  const time = conv.last_message_at ? formatRelative(conv.last_message_at) : "";
5803
5815
  const hasUnread = unread > 0;
5804
5816
  const preview = react$1.formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (conv.last_sequence > 0 ? `${conv.last_sequence} message${conv.last_sequence === 1 ? "" : "s"}` : "No messages yet");
@@ -6726,6 +6738,10 @@ Object.defineProperty(exports, "encodeTheme", {
6726
6738
  enumerable: true,
6727
6739
  get: function () { return theme.encodeTheme; }
6728
6740
  });
6741
+ Object.defineProperty(exports, "tokensFromFlat", {
6742
+ enumerable: true,
6743
+ get: function () { return theme.tokensFromFlat; }
6744
+ });
6729
6745
  exports.AttachmentPreview = AttachmentPreview;
6730
6746
  exports.Avatar = Avatar;
6731
6747
  exports.CallControlButton = CallControlButton;