@poolse/react-ui 1.0.1 → 1.0.3
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.cjs +65 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +65 -15
- package/dist/index.js.map +1 -1
- package/dist/styles.css +78 -38
- package/package.json +3 -3
package/dist/styles.css
CHANGED
|
@@ -209,7 +209,9 @@
|
|
|
209
209
|
font-size: 15px;
|
|
210
210
|
letter-spacing: -0.01em;
|
|
211
211
|
flex-shrink: 0;
|
|
212
|
-
overflow: hidden
|
|
212
|
+
/* NOTE: no `overflow: hidden` here — the presence dot sits at
|
|
213
|
+
right/bottom: -1px and must overhang the avatar. The <img> is
|
|
214
|
+
independently circle-clipped via `border-radius` on `img` below. */
|
|
213
215
|
user-select: none;
|
|
214
216
|
}
|
|
215
217
|
|
|
@@ -228,6 +230,7 @@
|
|
|
228
230
|
width: 100%;
|
|
229
231
|
height: 100%;
|
|
230
232
|
object-fit: cover;
|
|
233
|
+
border-radius: inherit;
|
|
231
234
|
}
|
|
232
235
|
|
|
233
236
|
.poolse-avatar__presence {
|
|
@@ -363,6 +366,8 @@
|
|
|
363
366
|
line-height: 1.4;
|
|
364
367
|
word-wrap: break-word;
|
|
365
368
|
overflow-wrap: anywhere;
|
|
369
|
+
/* Anchor for the chevron action-trigger overlay. */
|
|
370
|
+
position: relative;
|
|
366
371
|
}
|
|
367
372
|
|
|
368
373
|
.poolse-message--self {
|
|
@@ -1473,7 +1478,9 @@
|
|
|
1473
1478
|
|
|
1474
1479
|
.poolse-msg-actions__picker {
|
|
1475
1480
|
position: absolute;
|
|
1476
|
-
|
|
1481
|
+
/* Picker appears BELOW the actions toolbar so the stack is
|
|
1482
|
+
bubble → toolbar → picker, no overlap with the bubble body. */
|
|
1483
|
+
top: calc(100% + 6px);
|
|
1477
1484
|
left: 0;
|
|
1478
1485
|
z-index: 10;
|
|
1479
1486
|
}
|
|
@@ -1488,72 +1495,105 @@
|
|
|
1488
1495
|
position: relative;
|
|
1489
1496
|
}
|
|
1490
1497
|
|
|
1498
|
+
/* The actions toolbar sits BELOW the bubble — flush to the bubble's
|
|
1499
|
+
trailing edge so it visually anchors to the message rather than
|
|
1500
|
+
floating elsewhere on the row.
|
|
1501
|
+
- Self (right-aligned) bubble → toolbar right-aligned
|
|
1502
|
+
- Other (left-aligned) bubble → toolbar left-aligned
|
|
1503
|
+
Reveals on hover/focus (desktop) or tap-on-bubble (touch — handled
|
|
1504
|
+
in MessageRow.tsx, which sets data-actions-open). */
|
|
1491
1505
|
.poolse-message-row__actions {
|
|
1492
1506
|
position: absolute;
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
message. */
|
|
1496
|
-
top: 4px;
|
|
1507
|
+
top: 100%;
|
|
1508
|
+
margin-top: 4px;
|
|
1497
1509
|
z-index: 3;
|
|
1498
1510
|
opacity: 0;
|
|
1499
1511
|
pointer-events: none;
|
|
1500
1512
|
transition: opacity 0.12s;
|
|
1501
1513
|
}
|
|
1502
1514
|
|
|
1503
|
-
/* The toolbar sits BESIDE the bubble — never over it. That keeps
|
|
1504
|
-
the entire bubble body clickable (links, embedded UI, etc.) and
|
|
1505
|
-
sidesteps the messages-container overflow clipping that bit the
|
|
1506
|
-
"float above" approach when a bubble was near the top of the
|
|
1507
|
-
scrollable area.
|
|
1508
|
-
- Self (right-aligned) bubble → toolbar on the LEFT
|
|
1509
|
-
- Other (left-aligned) bubble → toolbar on the RIGHT
|
|
1510
|
-
Both directions point INTO the messages container's free space. */
|
|
1511
1515
|
.poolse-message-row__actions--right {
|
|
1512
|
-
right:
|
|
1516
|
+
right: 0;
|
|
1513
1517
|
}
|
|
1514
1518
|
|
|
1515
1519
|
.poolse-message-row__actions--left {
|
|
1516
|
-
left:
|
|
1520
|
+
left: 0;
|
|
1517
1521
|
}
|
|
1518
1522
|
|
|
1519
|
-
|
|
1523
|
+
/* Reveal the actions popover only on explicit open — keyboard focus
|
|
1524
|
+
(focus-within) or click (data-actions-open via chevron on desktop /
|
|
1525
|
+
tap-on-bubble on touch). Pure hover used to open it, but the gap
|
|
1526
|
+
between bubble and popover was a no-mans-land that closed the popover
|
|
1527
|
+
before the cursor reached it. The chevron trigger eliminates the
|
|
1528
|
+
gap-crossing problem entirely. */
|
|
1520
1529
|
.poolse-message-row:focus-within .poolse-message-row__actions,
|
|
1521
1530
|
.poolse-message-row[data-actions-open] .poolse-message-row__actions {
|
|
1522
1531
|
opacity: 1;
|
|
1523
1532
|
pointer-events: auto;
|
|
1524
1533
|
}
|
|
1525
1534
|
|
|
1526
|
-
/*
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
.poolse-message-
|
|
1530
|
-
|
|
1535
|
+
/* For other-side rows with avatar, the row spans avatar + gap + bubble.
|
|
1536
|
+
Shift the popover right by the avatar slot (28px + 6px gap) so it
|
|
1537
|
+
left-aligns with the bubble, not the avatar. */
|
|
1538
|
+
.poolse-message-row[data-avatar] .poolse-message-row__actions--left {
|
|
1539
|
+
left: 34px;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
/* Chevron action trigger — overlay at the bubble's top-trailing
|
|
1543
|
+
corner. Hidden on touch (tap-on-bubble works there) and on screens
|
|
1544
|
+
without hover. On desktop: hidden by default, visible on row hover
|
|
1545
|
+
OR while the popover is open. WhatsApp-style affordance — discoverable
|
|
1546
|
+
without being visually noisy. */
|
|
1547
|
+
.poolse-message__chevron {
|
|
1531
1548
|
position: absolute;
|
|
1532
|
-
top:
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
background: var(--poolse-surface);
|
|
1538
|
-
color: var(--poolse-ink-2);
|
|
1539
|
-
padding: 0;
|
|
1540
|
-
cursor: pointer;
|
|
1541
|
-
z-index: 3;
|
|
1549
|
+
top: 4px;
|
|
1550
|
+
right: 4px;
|
|
1551
|
+
width: 22px;
|
|
1552
|
+
height: 22px;
|
|
1553
|
+
display: inline-flex;
|
|
1542
1554
|
align-items: center;
|
|
1543
1555
|
justify-content: center;
|
|
1556
|
+
padding: 0;
|
|
1557
|
+
border: none;
|
|
1558
|
+
border-radius: 50%;
|
|
1559
|
+
background: color-mix(in oklab, var(--poolse-ink) 18%, transparent);
|
|
1560
|
+
color: var(--poolse-on-brand);
|
|
1561
|
+
cursor: pointer;
|
|
1562
|
+
opacity: 0;
|
|
1563
|
+
pointer-events: none;
|
|
1564
|
+
transition:
|
|
1565
|
+
opacity 0.12s,
|
|
1566
|
+
background-color 0.12s;
|
|
1567
|
+
z-index: 2;
|
|
1544
1568
|
}
|
|
1545
1569
|
|
|
1546
|
-
.poolse-message
|
|
1547
|
-
|
|
1570
|
+
.poolse-message--other .poolse-message__chevron {
|
|
1571
|
+
background: color-mix(in oklab, var(--poolse-ink-2) 18%, transparent);
|
|
1572
|
+
color: var(--poolse-ink-2);
|
|
1548
1573
|
}
|
|
1549
1574
|
|
|
1550
|
-
.poolse-
|
|
1551
|
-
|
|
1575
|
+
.poolse-message__chevron:hover {
|
|
1576
|
+
background: color-mix(in oklab, var(--poolse-ink) 34%, transparent);
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
.poolse-message--other .poolse-message__chevron:hover {
|
|
1580
|
+
background: color-mix(in oklab, var(--poolse-ink-2) 32%, transparent);
|
|
1581
|
+
color: var(--poolse-ink);
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
.poolse-message-row:hover .poolse-message__chevron,
|
|
1585
|
+
.poolse-message-row:focus-within .poolse-message__chevron,
|
|
1586
|
+
.poolse-message-row[data-actions-open] .poolse-message__chevron {
|
|
1587
|
+
opacity: 1;
|
|
1588
|
+
pointer-events: auto;
|
|
1552
1589
|
}
|
|
1553
1590
|
|
|
1591
|
+
/* Touch devices don't need the chevron — tap-on-bubble opens the
|
|
1592
|
+
popover there. The chevron would also miss `:hover` on touch
|
|
1593
|
+
anyway, but hiding it explicitly keeps the bubble visually clean. */
|
|
1554
1594
|
@media (hover: none) {
|
|
1555
|
-
.poolse-
|
|
1556
|
-
display:
|
|
1595
|
+
.poolse-message__chevron {
|
|
1596
|
+
display: none;
|
|
1557
1597
|
}
|
|
1558
1598
|
}
|
|
1559
1599
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poolse/react-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Plug-and-play React components for poolse — realtime chat infrastructure. Brand-aligned defaults, CSS-variable theming, render-prop escape hatches.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"react-markdown": "^9.0.1",
|
|
48
48
|
"remark-gfm": "^4.0.0",
|
|
49
|
-
"@poolse/
|
|
50
|
-
"@poolse/
|
|
49
|
+
"@poolse/sdk": "1.0.3",
|
|
50
|
+
"@poolse/react": "1.0.3"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": ">=18"
|