@poolse/react-ui 2.19.0 → 2.21.0

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/styles.css CHANGED
@@ -323,6 +323,56 @@
323
323
  border-radius: var(--poolse-radius-pill);
324
324
  }
325
325
 
326
+ /* Call-log line — centered compact pill between bubble clusters,
327
+ same family as the day separator (surface chip, hairline border,
328
+ small semibold label). Missed calls take the error tone. */
329
+ .poolse-call-log {
330
+ display: flex;
331
+ justify-content: center;
332
+ align-items: center;
333
+ margin: 8px 0;
334
+ }
335
+
336
+ .poolse-call-log__chip {
337
+ display: inline-flex;
338
+ align-items: center;
339
+ gap: 6px;
340
+ max-width: 100%;
341
+ padding: 4px 12px;
342
+ font: 600 12px / 1.3 var(--poolse-font-body);
343
+ color: var(--poolse-ink-2);
344
+ background: var(--poolse-surface);
345
+ border: 1px solid var(--poolse-border);
346
+ border-radius: var(--poolse-radius-pill);
347
+ }
348
+
349
+ .poolse-call-log__icon {
350
+ flex: none;
351
+ color: var(--poolse-ink-3);
352
+ }
353
+
354
+ .poolse-call-log__title {
355
+ color: var(--poolse-ink);
356
+ }
357
+
358
+ .poolse-call-log__detail,
359
+ .poolse-call-log__time {
360
+ font-weight: 500;
361
+ color: var(--poolse-ink-3);
362
+ font-variant-numeric: tabular-nums;
363
+ }
364
+
365
+ .poolse-call-log__detail::before,
366
+ .poolse-call-log__time::before {
367
+ content: '·';
368
+ margin-right: 6px;
369
+ }
370
+
371
+ .poolse-call-log--missed .poolse-call-log__icon,
372
+ .poolse-call-log--missed .poolse-call-log__title {
373
+ color: var(--poolse-error);
374
+ }
375
+
326
376
  .poolse-conversation__load-more {
327
377
  align-self: center;
328
378
  margin-bottom: 8px;
@@ -358,10 +408,10 @@
358
408
  flex-direction: column;
359
409
  max-width: 78%;
360
410
  /* Tighter padding for a denser, more iMessage/WhatsApp-like read. */
361
- padding: 7px 11px;
411
+ padding: 8px 12px;
362
412
  /* Default fully-rounded; the group-position modifiers below swap in
363
413
  the asymmetric tail corner for `last` / `standalone`. */
364
- border-radius: 16px;
414
+ border-radius: 18px;
365
415
  font-size: 14.5px;
366
416
  line-height: 1.4;
367
417
  word-wrap: break-word;
@@ -369,11 +419,9 @@
369
419
  /* Anchor for the chevron action-trigger overlay AND the in-bubble
370
420
  image mosaic's overlaid meta pill (WhatsApp-style). */
371
421
  position: relative;
372
- /* Clip the in-bubble image mosaic to the bubble's rounded corners
373
- so the media reads as part of the bubble rather than an island
374
- pasted on top. The chevron + actions overlay sit well within the
375
- interior so they aren't affected by the clip. */
376
- overflow: hidden;
422
+ /* No overflow clip: the mosaic rounds and clips itself (it sits
423
+ inset in its 3px frame), and the hover action disc floats half
424
+ outside the corner — a clip here would slice it. */
377
425
  }
378
426
 
379
427
  .poolse-message--self {
@@ -405,19 +453,78 @@
405
453
  }
406
454
 
407
455
  .poolse-message__meta {
408
- display: flex;
456
+ display: inline-flex;
409
457
  align-items: center;
410
458
  gap: 4px;
411
- justify-content: flex-end;
412
459
  font-size: 10.5px;
460
+ line-height: 1.2;
461
+ opacity: 0.75;
462
+ white-space: nowrap;
463
+ }
464
+
465
+ /* Meta on its own right-aligned row — markdown bodies, file-card
466
+ bubbles, deleted messages. The fallback placement. */
467
+ .poolse-message__meta--block {
468
+ display: flex;
469
+ justify-content: flex-end;
413
470
  margin-top: 3px;
414
- opacity: 0.85;
471
+ }
472
+
473
+ /* Meta floated into the last line of a plain-text body. The absolute
474
+ position pins it to the bubble's bottom-right; the inline spacer
475
+ twin (below) has already reserved exactly this much room on the
476
+ last line, so it never covers a glyph. */
477
+ .poolse-message__meta--inline {
478
+ position: absolute;
479
+ right: 12px;
480
+ /* Optically centers the meta against the body's last line box
481
+ (20.3px line over the 8px bottom padding): 8 + (20.3 - 14) / 2.
482
+ At 9px it sat visibly low beside a one-line message. */
483
+ bottom: 11px;
484
+ }
485
+
486
+ /* The invisible reservation. Lives inline at the end of the text so
487
+ the line either has room for the meta or wraps — same trick
488
+ WhatsApp uses. The zero height keeps it from stretching the line. */
489
+ .poolse-message__meta--spacer {
490
+ visibility: hidden;
491
+ padding-left: 10px;
492
+ height: 0;
415
493
  }
416
494
 
417
495
  .poolse-message__body {
418
496
  white-space: pre-wrap;
419
497
  }
420
498
 
499
+ /* Markdown bodies un-inherit pre-wrap: react-markdown emits real
500
+ block elements with newline text nodes between them, and pre-wrap
501
+ would render each of those as a phantom blank line. Newlines
502
+ inside the content become <br>/<p> via the parser instead. */
503
+ .poolse-message__body--md {
504
+ white-space: normal;
505
+ }
506
+
507
+ /* ── Jumbo emoji — 1-3 emoji and nothing else ──────────────────
508
+ The bubble chrome drops away and the glyphs carry the message.
509
+ Meta falls below in the list's quiet grey on both sides. */
510
+ .poolse-message--jumbo {
511
+ background: transparent;
512
+ border: none;
513
+ box-shadow: none;
514
+ padding: 2px 0;
515
+ overflow: visible;
516
+ }
517
+
518
+ .poolse-message--jumbo .poolse-message__body--jumbo {
519
+ line-height: 1.15;
520
+ display: block;
521
+ }
522
+
523
+ .poolse-message--jumbo .poolse-message__meta,
524
+ .poolse-message--jumbo.poolse-message--self .poolse-message__meta {
525
+ color: var(--poolse-ink-3);
526
+ }
527
+
421
528
  /* Sender label — small, bold, per-user color. Only renders on the
422
529
  first (or standalone) bubble of an other-side cluster when
423
530
  `showSenderName` is true. Sits inside the bubble, above the body. */
@@ -779,11 +886,11 @@
779
886
  flex-direction: column;
780
887
  align-items: stretch;
781
888
  gap: 1px;
782
- padding: 5px 9px;
889
+ padding: 6px 10px;
783
890
  margin-bottom: 6px;
784
- border-radius: 6px;
891
+ border-radius: 10px;
785
892
  border: none;
786
- border-left: 4px solid var(--poolse-brand);
893
+ border-left: 3px solid var(--poolse-brand);
787
894
  cursor: pointer;
788
895
  text-align: left;
789
896
  max-width: 100%;
@@ -1287,6 +1394,10 @@
1287
1394
  }
1288
1395
 
1289
1396
  .poolse-attachment__file {
1397
+ /* border-box, explicitly: in-bubble cards get `width: 100%`, and
1398
+ the host page may not reset box-sizing — content-box + this
1399
+ padding made the card 26px wider than the bubble. */
1400
+ box-sizing: border-box;
1290
1401
  display: flex;
1291
1402
  align-items: center;
1292
1403
  gap: 10px;
@@ -1348,25 +1459,52 @@
1348
1459
  /* 2px hairline gutters between tiles mirror the WA chat look — the
1349
1460
  bubble's background bleeds through and reads as a tasteful seam. */
1350
1461
  gap: 2px;
1351
- /* Full-bleed: cancel the bubble's 7px/11px padding so each image
1352
- touches the bubble border. The bubble's `overflow: hidden` +
1353
- border-radius clip the mosaic to the bubble shape. */
1354
- margin: -7px -11px 0 -11px;
1462
+ /* Near-full-bleed with a 3px frame: cancel most of the bubble's
1463
+ 8px/12px padding so the bubble color reads as a thin picture
1464
+ frame around the media — the WhatsApp/Telegram treatment. */
1465
+ margin: -5px -9px 0 -9px;
1466
+ /* The frame inset means the bubble's own clip no longer shapes the
1467
+ media, so the mosaic rounds and clips itself — 3px tighter than
1468
+ the bubble's 18px so the curves stay concentric. */
1469
+ border-radius: 15px;
1470
+ overflow: hidden;
1355
1471
  /* Minimum width so a tiny solo image doesn't collapse the bubble
1356
- into a thumbnail-narrow strip. Capped naturally by the row's
1357
- 78% max-width. */
1472
+ into a thumbnail-narrow strip. */
1358
1473
  min-width: 220px;
1359
- /* Subtle backing color in case an image is transparent / still
1360
- loading — keeps the seam color consistent with the bubble seams. */
1361
- background: var(--poolse-surface-2);
1474
+ /* Transparent so the 2px seams read as the bubble's own color —
1475
+ brand on self, surface on other — instead of a grey grid. Each
1476
+ tile carries its own placeholder background while loading. */
1477
+ background: transparent;
1478
+ }
1479
+
1480
+ /* Media (and file-card) bubbles cap tighter than text: a photo at
1481
+ the full 78% of a desktop pane is a poster, not a message. Every
1482
+ major chat caps media around this width. */
1483
+ .poolse-message--has-media {
1484
+ max-width: min(78%, 420px);
1485
+ }
1486
+
1487
+ /* When a caption or file cards follow the mosaic, its bottom corners
1488
+ go square so the media flows into the text block — rounding them
1489
+ left little "ears" of bubble color poking between image and
1490
+ caption. Media-only bubbles keep the full rounding. */
1491
+ .poolse-message--has-media:not(.poolse-message--media-only) .poolse-message__media {
1492
+ border-bottom-left-radius: 5px;
1493
+ border-bottom-right-radius: 5px;
1362
1494
  }
1363
1495
 
1364
1496
  /* When the bubble has only the media + meta overlay (no body, no file
1365
- cards), extend the mosaic into the bubble's bottom padding too so
1366
- the image fully fills the bubble. The bubble's rounded corners +
1367
- overflow:hidden handle the bottom shape. */
1497
+ cards), the frame wraps the bottom too. */
1368
1498
  .poolse-message--media-only .poolse-message__media {
1369
- margin-bottom: -7px;
1499
+ margin-bottom: -5px;
1500
+ }
1501
+
1502
+ /* A sender label or quote card above the media keeps its headroom —
1503
+ without this the mosaic's negative top margin pulls the picture up
1504
+ over the label. */
1505
+ .poolse-message__sender + .poolse-message__media,
1506
+ .poolse-quote + .poolse-message__media {
1507
+ margin-top: 2px;
1370
1508
  }
1371
1509
 
1372
1510
  /* When body text or file cards follow the mosaic, add a small gap so
@@ -1383,6 +1521,12 @@
1383
1521
  margin-top: 6px;
1384
1522
  }
1385
1523
 
1524
+ /* File-only bubble: the meta row follows the cards directly — give
1525
+ it air so the time doesn't sit glued to the card's border. */
1526
+ .poolse-message__files + .poolse-message__meta--block {
1527
+ margin-top: 7px;
1528
+ }
1529
+
1386
1530
  /* Layout templates by image count */
1387
1531
  .poolse-message__media--n1 {
1388
1532
  grid-template-columns: 1fr;
@@ -1818,20 +1962,26 @@
1818
1962
  without hover. On desktop: hidden by default, visible on row hover
1819
1963
  OR while the popover is open. WhatsApp-style affordance — discoverable
1820
1964
  without being visually noisy. */
1965
+ /* Floating control half outside the bubble's top-right corner, not a
1966
+ translucent stamp inside it — overlaying the rounded corner always
1967
+ fought the bubble shape. A small surface-colored disc with a border
1968
+ and shadow reads as a control hovering NEXT to the message, the way
1969
+ Slack/Discord float their action bars. Revealed on hover. */
1821
1970
  .poolse-message__chevron {
1822
1971
  position: absolute;
1823
- top: 4px;
1824
- right: 4px;
1825
- width: 22px;
1826
- height: 22px;
1972
+ top: -9px;
1973
+ right: -6px;
1974
+ width: 26px;
1975
+ height: 26px;
1827
1976
  display: inline-flex;
1828
1977
  align-items: center;
1829
1978
  justify-content: center;
1830
1979
  padding: 0;
1831
- border: none;
1980
+ border: 1px solid var(--poolse-border);
1832
1981
  border-radius: 50%;
1833
- background: color-mix(in oklab, var(--poolse-ink) 18%, transparent);
1834
- color: var(--poolse-on-brand);
1982
+ background: var(--poolse-surface);
1983
+ color: var(--poolse-ink-2);
1984
+ box-shadow: 0 2px 8px rgba(16, 16, 32, 0.14);
1835
1985
  cursor: pointer;
1836
1986
  opacity: 0;
1837
1987
  pointer-events: none;
@@ -1841,17 +1991,8 @@
1841
1991
  z-index: 2;
1842
1992
  }
1843
1993
 
1844
- .poolse-message--other .poolse-message__chevron {
1845
- background: color-mix(in oklab, var(--poolse-ink-2) 18%, transparent);
1846
- color: var(--poolse-ink-2);
1847
- }
1848
-
1849
1994
  .poolse-message__chevron:hover {
1850
- background: color-mix(in oklab, var(--poolse-ink) 34%, transparent);
1851
- }
1852
-
1853
- .poolse-message--other .poolse-message__chevron:hover {
1854
- background: color-mix(in oklab, var(--poolse-ink-2) 32%, transparent);
1995
+ background: var(--poolse-surface-2);
1855
1996
  color: var(--poolse-ink);
1856
1997
  }
1857
1998
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poolse/react-ui",
3
- "version": "2.19.0",
3
+ "version": "2.21.0",
4
4
  "description": "React chat UI components — ConversationView, PoolseInbox, MessageBubble, TypingIndicator, ReactionPicker, ThreadView. CSS-variable theming, render-prop escape hatches. MIT — alternative to Sendbird, Stream, TalkJS, CometChat.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -64,8 +64,8 @@
64
64
  "lint": "eslint src test"
65
65
  },
66
66
  "dependencies": {
67
- "@poolse/react": "^2.19.0",
68
- "@poolse/sdk": "^2.19.0",
67
+ "@poolse/react": "^2.25.0",
68
+ "@poolse/sdk": "^2.21.0",
69
69
  "react-markdown": "^9.0.1",
70
70
  "remark-gfm": "^4.0.0"
71
71
  },