@poolse/react-ui 2.18.0 → 2.20.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/CHANGELOG.md +36 -0
- package/dist/index.cjs +101 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +101 -55
- package/dist/index.js.map +1 -1
- package/dist/styles.css +134 -43
- package/package.json +3 -3
package/dist/styles.css
CHANGED
|
@@ -358,10 +358,10 @@
|
|
|
358
358
|
flex-direction: column;
|
|
359
359
|
max-width: 78%;
|
|
360
360
|
/* Tighter padding for a denser, more iMessage/WhatsApp-like read. */
|
|
361
|
-
padding:
|
|
361
|
+
padding: 8px 12px;
|
|
362
362
|
/* Default fully-rounded; the group-position modifiers below swap in
|
|
363
363
|
the asymmetric tail corner for `last` / `standalone`. */
|
|
364
|
-
border-radius:
|
|
364
|
+
border-radius: 18px;
|
|
365
365
|
font-size: 14.5px;
|
|
366
366
|
line-height: 1.4;
|
|
367
367
|
word-wrap: break-word;
|
|
@@ -369,11 +369,9 @@
|
|
|
369
369
|
/* Anchor for the chevron action-trigger overlay AND the in-bubble
|
|
370
370
|
image mosaic's overlaid meta pill (WhatsApp-style). */
|
|
371
371
|
position: relative;
|
|
372
|
-
/*
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
interior so they aren't affected by the clip. */
|
|
376
|
-
overflow: hidden;
|
|
372
|
+
/* No overflow clip: the mosaic rounds and clips itself (it sits
|
|
373
|
+
inset in its 3px frame), and the hover action disc floats half
|
|
374
|
+
outside the corner — a clip here would slice it. */
|
|
377
375
|
}
|
|
378
376
|
|
|
379
377
|
.poolse-message--self {
|
|
@@ -405,19 +403,78 @@
|
|
|
405
403
|
}
|
|
406
404
|
|
|
407
405
|
.poolse-message__meta {
|
|
408
|
-
display: flex;
|
|
406
|
+
display: inline-flex;
|
|
409
407
|
align-items: center;
|
|
410
408
|
gap: 4px;
|
|
411
|
-
justify-content: flex-end;
|
|
412
409
|
font-size: 10.5px;
|
|
410
|
+
line-height: 1.2;
|
|
411
|
+
opacity: 0.75;
|
|
412
|
+
white-space: nowrap;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* Meta on its own right-aligned row — markdown bodies, file-card
|
|
416
|
+
bubbles, deleted messages. The fallback placement. */
|
|
417
|
+
.poolse-message__meta--block {
|
|
418
|
+
display: flex;
|
|
419
|
+
justify-content: flex-end;
|
|
413
420
|
margin-top: 3px;
|
|
414
|
-
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/* Meta floated into the last line of a plain-text body. The absolute
|
|
424
|
+
position pins it to the bubble's bottom-right; the inline spacer
|
|
425
|
+
twin (below) has already reserved exactly this much room on the
|
|
426
|
+
last line, so it never covers a glyph. */
|
|
427
|
+
.poolse-message__meta--inline {
|
|
428
|
+
position: absolute;
|
|
429
|
+
right: 12px;
|
|
430
|
+
/* Optically centers the meta against the body's last line box
|
|
431
|
+
(20.3px line over the 8px bottom padding): 8 + (20.3 - 14) / 2.
|
|
432
|
+
At 9px it sat visibly low beside a one-line message. */
|
|
433
|
+
bottom: 11px;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/* The invisible reservation. Lives inline at the end of the text so
|
|
437
|
+
the line either has room for the meta or wraps — same trick
|
|
438
|
+
WhatsApp uses. The zero height keeps it from stretching the line. */
|
|
439
|
+
.poolse-message__meta--spacer {
|
|
440
|
+
visibility: hidden;
|
|
441
|
+
padding-left: 10px;
|
|
442
|
+
height: 0;
|
|
415
443
|
}
|
|
416
444
|
|
|
417
445
|
.poolse-message__body {
|
|
418
446
|
white-space: pre-wrap;
|
|
419
447
|
}
|
|
420
448
|
|
|
449
|
+
/* Markdown bodies un-inherit pre-wrap: react-markdown emits real
|
|
450
|
+
block elements with newline text nodes between them, and pre-wrap
|
|
451
|
+
would render each of those as a phantom blank line. Newlines
|
|
452
|
+
inside the content become <br>/<p> via the parser instead. */
|
|
453
|
+
.poolse-message__body--md {
|
|
454
|
+
white-space: normal;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/* ── Jumbo emoji — 1-3 emoji and nothing else ──────────────────
|
|
458
|
+
The bubble chrome drops away and the glyphs carry the message.
|
|
459
|
+
Meta falls below in the list's quiet grey on both sides. */
|
|
460
|
+
.poolse-message--jumbo {
|
|
461
|
+
background: transparent;
|
|
462
|
+
border: none;
|
|
463
|
+
box-shadow: none;
|
|
464
|
+
padding: 2px 0;
|
|
465
|
+
overflow: visible;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.poolse-message--jumbo .poolse-message__body--jumbo {
|
|
469
|
+
line-height: 1.15;
|
|
470
|
+
display: block;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.poolse-message--jumbo .poolse-message__meta,
|
|
474
|
+
.poolse-message--jumbo.poolse-message--self .poolse-message__meta {
|
|
475
|
+
color: var(--poolse-ink-3);
|
|
476
|
+
}
|
|
477
|
+
|
|
421
478
|
/* Sender label — small, bold, per-user color. Only renders on the
|
|
422
479
|
first (or standalone) bubble of an other-side cluster when
|
|
423
480
|
`showSenderName` is true. Sits inside the bubble, above the body. */
|
|
@@ -779,11 +836,11 @@
|
|
|
779
836
|
flex-direction: column;
|
|
780
837
|
align-items: stretch;
|
|
781
838
|
gap: 1px;
|
|
782
|
-
padding:
|
|
839
|
+
padding: 6px 10px;
|
|
783
840
|
margin-bottom: 6px;
|
|
784
|
-
border-radius:
|
|
841
|
+
border-radius: 10px;
|
|
785
842
|
border: none;
|
|
786
|
-
border-left:
|
|
843
|
+
border-left: 3px solid var(--poolse-brand);
|
|
787
844
|
cursor: pointer;
|
|
788
845
|
text-align: left;
|
|
789
846
|
max-width: 100%;
|
|
@@ -1287,6 +1344,10 @@
|
|
|
1287
1344
|
}
|
|
1288
1345
|
|
|
1289
1346
|
.poolse-attachment__file {
|
|
1347
|
+
/* border-box, explicitly: in-bubble cards get `width: 100%`, and
|
|
1348
|
+
the host page may not reset box-sizing — content-box + this
|
|
1349
|
+
padding made the card 26px wider than the bubble. */
|
|
1350
|
+
box-sizing: border-box;
|
|
1290
1351
|
display: flex;
|
|
1291
1352
|
align-items: center;
|
|
1292
1353
|
gap: 10px;
|
|
@@ -1348,25 +1409,52 @@
|
|
|
1348
1409
|
/* 2px hairline gutters between tiles mirror the WA chat look — the
|
|
1349
1410
|
bubble's background bleeds through and reads as a tasteful seam. */
|
|
1350
1411
|
gap: 2px;
|
|
1351
|
-
/*
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
margin: -
|
|
1412
|
+
/* Near-full-bleed with a 3px frame: cancel most of the bubble's
|
|
1413
|
+
8px/12px padding so the bubble color reads as a thin picture
|
|
1414
|
+
frame around the media — the WhatsApp/Telegram treatment. */
|
|
1415
|
+
margin: -5px -9px 0 -9px;
|
|
1416
|
+
/* The frame inset means the bubble's own clip no longer shapes the
|
|
1417
|
+
media, so the mosaic rounds and clips itself — 3px tighter than
|
|
1418
|
+
the bubble's 18px so the curves stay concentric. */
|
|
1419
|
+
border-radius: 15px;
|
|
1420
|
+
overflow: hidden;
|
|
1355
1421
|
/* Minimum width so a tiny solo image doesn't collapse the bubble
|
|
1356
|
-
into a thumbnail-narrow strip.
|
|
1357
|
-
78% max-width. */
|
|
1422
|
+
into a thumbnail-narrow strip. */
|
|
1358
1423
|
min-width: 220px;
|
|
1359
|
-
/*
|
|
1360
|
-
|
|
1361
|
-
|
|
1424
|
+
/* Transparent so the 2px seams read as the bubble's own color —
|
|
1425
|
+
brand on self, surface on other — instead of a grey grid. Each
|
|
1426
|
+
tile carries its own placeholder background while loading. */
|
|
1427
|
+
background: transparent;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
/* Media (and file-card) bubbles cap tighter than text: a photo at
|
|
1431
|
+
the full 78% of a desktop pane is a poster, not a message. Every
|
|
1432
|
+
major chat caps media around this width. */
|
|
1433
|
+
.poolse-message--has-media {
|
|
1434
|
+
max-width: min(78%, 420px);
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
/* When a caption or file cards follow the mosaic, its bottom corners
|
|
1438
|
+
go square so the media flows into the text block — rounding them
|
|
1439
|
+
left little "ears" of bubble color poking between image and
|
|
1440
|
+
caption. Media-only bubbles keep the full rounding. */
|
|
1441
|
+
.poolse-message--has-media:not(.poolse-message--media-only) .poolse-message__media {
|
|
1442
|
+
border-bottom-left-radius: 5px;
|
|
1443
|
+
border-bottom-right-radius: 5px;
|
|
1362
1444
|
}
|
|
1363
1445
|
|
|
1364
1446
|
/* When the bubble has only the media + meta overlay (no body, no file
|
|
1365
|
-
cards),
|
|
1366
|
-
the image fully fills the bubble. The bubble's rounded corners +
|
|
1367
|
-
overflow:hidden handle the bottom shape. */
|
|
1447
|
+
cards), the frame wraps the bottom too. */
|
|
1368
1448
|
.poolse-message--media-only .poolse-message__media {
|
|
1369
|
-
margin-bottom: -
|
|
1449
|
+
margin-bottom: -5px;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
/* A sender label or quote card above the media keeps its headroom —
|
|
1453
|
+
without this the mosaic's negative top margin pulls the picture up
|
|
1454
|
+
over the label. */
|
|
1455
|
+
.poolse-message__sender + .poolse-message__media,
|
|
1456
|
+
.poolse-quote + .poolse-message__media {
|
|
1457
|
+
margin-top: 2px;
|
|
1370
1458
|
}
|
|
1371
1459
|
|
|
1372
1460
|
/* When body text or file cards follow the mosaic, add a small gap so
|
|
@@ -1383,6 +1471,12 @@
|
|
|
1383
1471
|
margin-top: 6px;
|
|
1384
1472
|
}
|
|
1385
1473
|
|
|
1474
|
+
/* File-only bubble: the meta row follows the cards directly — give
|
|
1475
|
+
it air so the time doesn't sit glued to the card's border. */
|
|
1476
|
+
.poolse-message__files + .poolse-message__meta--block {
|
|
1477
|
+
margin-top: 7px;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1386
1480
|
/* Layout templates by image count */
|
|
1387
1481
|
.poolse-message__media--n1 {
|
|
1388
1482
|
grid-template-columns: 1fr;
|
|
@@ -1818,20 +1912,26 @@
|
|
|
1818
1912
|
without hover. On desktop: hidden by default, visible on row hover
|
|
1819
1913
|
OR while the popover is open. WhatsApp-style affordance — discoverable
|
|
1820
1914
|
without being visually noisy. */
|
|
1915
|
+
/* Floating control half outside the bubble's top-right corner, not a
|
|
1916
|
+
translucent stamp inside it — overlaying the rounded corner always
|
|
1917
|
+
fought the bubble shape. A small surface-colored disc with a border
|
|
1918
|
+
and shadow reads as a control hovering NEXT to the message, the way
|
|
1919
|
+
Slack/Discord float their action bars. Revealed on hover. */
|
|
1821
1920
|
.poolse-message__chevron {
|
|
1822
1921
|
position: absolute;
|
|
1823
|
-
top:
|
|
1824
|
-
right:
|
|
1825
|
-
width:
|
|
1826
|
-
height:
|
|
1922
|
+
top: -9px;
|
|
1923
|
+
right: -6px;
|
|
1924
|
+
width: 26px;
|
|
1925
|
+
height: 26px;
|
|
1827
1926
|
display: inline-flex;
|
|
1828
1927
|
align-items: center;
|
|
1829
1928
|
justify-content: center;
|
|
1830
1929
|
padding: 0;
|
|
1831
|
-
border:
|
|
1930
|
+
border: 1px solid var(--poolse-border);
|
|
1832
1931
|
border-radius: 50%;
|
|
1833
|
-
background:
|
|
1834
|
-
color: var(--poolse-
|
|
1932
|
+
background: var(--poolse-surface);
|
|
1933
|
+
color: var(--poolse-ink-2);
|
|
1934
|
+
box-shadow: 0 2px 8px rgba(16, 16, 32, 0.14);
|
|
1835
1935
|
cursor: pointer;
|
|
1836
1936
|
opacity: 0;
|
|
1837
1937
|
pointer-events: none;
|
|
@@ -1841,17 +1941,8 @@
|
|
|
1841
1941
|
z-index: 2;
|
|
1842
1942
|
}
|
|
1843
1943
|
|
|
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
1944
|
.poolse-message__chevron:hover {
|
|
1850
|
-
background:
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
.poolse-message--other .poolse-message__chevron:hover {
|
|
1854
|
-
background: color-mix(in oklab, var(--poolse-ink-2) 32%, transparent);
|
|
1945
|
+
background: var(--poolse-surface-2);
|
|
1855
1946
|
color: var(--poolse-ink);
|
|
1856
1947
|
}
|
|
1857
1948
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poolse/react-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.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.
|
|
68
|
-
"@poolse/sdk": "^2.
|
|
67
|
+
"@poolse/react": "^2.20.0",
|
|
68
|
+
"@poolse/sdk": "^2.20.0",
|
|
69
69
|
"react-markdown": "^9.0.1",
|
|
70
70
|
"remark-gfm": "^4.0.0"
|
|
71
71
|
},
|