@poolse/react-ui 0.2.0-alpha.6 → 0.2.0-alpha.7

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
@@ -6,6 +6,18 @@ All notable changes to `@poolse/react-ui` are documented here. Format follows
6
6
 
7
7
  ## [0.2.0] — 2026-06-01
8
8
 
9
+ ### Changed — quote card polish
10
+
11
+ - WhatsApp-style quote card visuals: compact padding, 4px Pulse Coral
12
+ accent stripe flush with the bubble edge, body text at 0.62 opacity
13
+ so the eye lands on the actual message. Self-bubble variant tints
14
+ with a dark overlay; other-bubble variant tints slightly darker than
15
+ the surface for visual "depth."
16
+ - Optimistic quote preview: when you quote-reply, the card renders
17
+ immediately on the locally-inserted bubble (looked up from the
18
+ in-memory message list) instead of flashing in once the realtime
19
+ echo arrives ~100ms later.
20
+
9
21
  ### Added — quote replies (WhatsApp-style)
10
22
 
11
23
  - `<ConversationView quotations?>` (default `true`) — new feature
package/dist/index.cjs CHANGED
@@ -451,10 +451,7 @@ function MessageComposer({
451
451
  if (!trimmed || sending) return;
452
452
  setSending(true);
453
453
  try {
454
- await onSend(
455
- trimmed,
456
- replyingTo ? { quoted_message_id: replyingTo.id } : void 0
457
- );
454
+ await onSend(trimmed, replyingTo ? { quoted_message_id: replyingTo.id } : void 0);
458
455
  setValue("");
459
456
  } finally {
460
457
  setSending(false);
@@ -1331,12 +1328,26 @@ function ConversationView({
1331
1328
  if (renderMessage) {
1332
1329
  return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: renderMessage(msg, me?.id ?? null) }, msg.id);
1333
1330
  }
1331
+ const enriched = quotations && msg.quoted_message_id && !msg.quoted_message ? (() => {
1332
+ const original = messages.find((m) => m.id === msg.quoted_message_id);
1333
+ if (!original) return msg;
1334
+ return {
1335
+ ...msg,
1336
+ quoted_message: {
1337
+ id: original.id,
1338
+ sender_id: original.sender_id,
1339
+ body: original.body,
1340
+ deleted_at: original.deleted_at,
1341
+ inserted_at: original.inserted_at
1342
+ }
1343
+ };
1344
+ })() : msg;
1334
1345
  const isSelf = me !== null && msg.sender_id === me.id;
1335
1346
  const readState = readReceipts && isSelf && maxReadByOthers !== null ? maxReadByOthers >= msg.sequence ? "read" : "sent" : void 0;
1336
1347
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-message-id": msg.id, children: /* @__PURE__ */ jsxRuntime.jsx(
1337
1348
  MessageRow,
1338
1349
  {
1339
- msg,
1350
+ msg: enriched,
1340
1351
  meId: me?.id ?? null,
1341
1352
  reactions,
1342
1353
  attachments,