@poolse/react-ui 1.0.1-beta.0 → 1.0.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/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 {
@@ -417,6 +420,13 @@
417
420
  margin-bottom: 2px;
418
421
  /* color is set inline via the userColor() palette so each user
419
422
  keeps a stable identity tint. */
423
+ /* Defense-in-depth: the <UserName> component already truncates to
424
+ 24 chars, but explicit overflow guards here keep a 50-char
425
+ value (e.g. passed via labelFor) from blowing the bubble width. */
426
+ max-width: 100%;
427
+ overflow: hidden;
428
+ text-overflow: ellipsis;
429
+ white-space: nowrap;
420
430
  }
421
431
 
422
432
  /* Bubble + avatar shell — flex row, avatar slot to the left,
@@ -503,6 +513,11 @@
503
513
  text-decoration: underline;
504
514
  text-underline-offset: 2px;
505
515
  font-weight: 600;
516
+ /* Long URLs without spaces (e.g. autolinked tracking links) would
517
+ otherwise blow the bubble's max-width. Allow word-break inside
518
+ the <a> so they wrap across lines. */
519
+ word-break: break-word;
520
+ overflow-wrap: anywhere;
506
521
  }
507
522
  .poolse-message__body a:hover {
508
523
  opacity: 0.85;
@@ -572,6 +587,13 @@
572
587
  min-height: 22px;
573
588
  }
574
589
 
590
+ /* Hide the decorative bubble + label visually when nobody is typing
591
+ — the screen-reader live region stays mounted (empty string) so
592
+ the polite announcement fires on next change. */
593
+ .poolse-typing:not([data-typing]) .poolse-typing__dots {
594
+ visibility: hidden;
595
+ }
596
+
575
597
  .poolse-typing__dots {
576
598
  display: inline-flex;
577
599
  gap: 5px;
@@ -810,6 +832,45 @@
810
832
  max-height: 140px;
811
833
  }
812
834
 
835
+ /* iOS auto-zooms when a focused text input has font-size < 16px.
836
+ Bump to exactly 16px on touch viewports so the page stays at its
837
+ intended scale on tap. */
838
+ @media (max-width: 760px) {
839
+ .poolse-composer__input {
840
+ font-size: 16px;
841
+ }
842
+
843
+ /* WCAG 2.5.5 / Apple HIG: 44x44 minimum touch target for primary
844
+ icon controls. Desktop sizes stay tight; mobile gets the bump.
845
+ Inner icon stays the same — only the hit-area grows. */
846
+ .poolse-composer__send,
847
+ .poolse-attach-btn,
848
+ .poolse-icon-btn {
849
+ width: 44px;
850
+ height: 44px;
851
+ }
852
+
853
+ /* The hover-revealed message-actions toolbar isn't reachable by
854
+ touch (no hover state). The toolbar buttons size up so when the
855
+ `…` tap-reveal opens it, taps land reliably. */
856
+ .poolse-msg-actions__btn {
857
+ width: 36px;
858
+ height: 36px;
859
+ }
860
+
861
+ /* Tighten horizontal padding so bubbles can stretch a bit wider
862
+ on narrow phones — readability over symmetry. */
863
+ .poolse-conversation__messages {
864
+ padding: 16px 8px;
865
+ }
866
+
867
+ /* Bubbles get a touch more breathing room — same column rules
868
+ desktop uses become cramped at <360px viewports. */
869
+ .poolse-message-row {
870
+ max-width: 88%;
871
+ }
872
+ }
873
+
813
874
  .poolse-composer__input:focus {
814
875
  border-color: var(--poolse-brand);
815
876
  background: var(--poolse-surface);
@@ -1078,15 +1139,105 @@
1078
1139
  max-width: 320px;
1079
1140
  }
1080
1141
 
1142
+ .poolse-attachment__image-button {
1143
+ padding: 0;
1144
+ border: none;
1145
+ background: none;
1146
+ cursor: zoom-in;
1147
+ border-radius: var(--poolse-radius-md);
1148
+ display: block;
1149
+ }
1150
+
1151
+ .poolse-attachment__image-button:focus-visible {
1152
+ outline: 2px solid var(--poolse-brand);
1153
+ outline-offset: 2px;
1154
+ }
1155
+
1081
1156
  .poolse-attachment__image {
1082
1157
  display: block;
1083
1158
  max-width: 100%;
1084
1159
  max-height: 260px;
1085
1160
  border-radius: var(--poolse-radius-md);
1086
- cursor: zoom-in;
1087
1161
  background: var(--poolse-surface-2);
1088
1162
  }
1089
1163
 
1164
+ /* Image lightbox (Phase 4a-4) */
1165
+ .poolse-lightbox {
1166
+ position: fixed;
1167
+ inset: 0;
1168
+ background: rgba(17, 15, 14, 0.86);
1169
+ display: flex;
1170
+ align-items: center;
1171
+ justify-content: center;
1172
+ z-index: 9999;
1173
+ padding: max(40px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
1174
+ max(40px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
1175
+ cursor: zoom-out;
1176
+ animation: poolse-lightbox-fade-in 0.14s ease-out;
1177
+ }
1178
+
1179
+ .poolse-lightbox__image {
1180
+ max-width: 100%;
1181
+ max-height: 100%;
1182
+ object-fit: contain;
1183
+ border-radius: var(--poolse-radius-md);
1184
+ box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
1185
+ cursor: default;
1186
+ }
1187
+
1188
+ .poolse-lightbox__close {
1189
+ position: fixed;
1190
+ top: max(20px, env(safe-area-inset-top));
1191
+ right: max(24px, env(safe-area-inset-right));
1192
+ width: 40px;
1193
+ height: 40px;
1194
+ border-radius: 50%;
1195
+ border: none;
1196
+ background: rgba(255, 255, 255, 0.12);
1197
+ color: white;
1198
+ font-size: 26px;
1199
+ line-height: 1;
1200
+ cursor: pointer;
1201
+ display: inline-flex;
1202
+ align-items: center;
1203
+ justify-content: center;
1204
+ transition: background-color 0.12s;
1205
+ }
1206
+
1207
+ .poolse-lightbox__close:hover {
1208
+ background: rgba(255, 255, 255, 0.22);
1209
+ }
1210
+
1211
+ .poolse-lightbox__download {
1212
+ position: fixed;
1213
+ bottom: max(24px, env(safe-area-inset-bottom));
1214
+ left: 50%;
1215
+ transform: translateX(-50%);
1216
+ padding: 8px 16px;
1217
+ background: rgba(255, 255, 255, 0.12);
1218
+ color: white;
1219
+ text-decoration: none;
1220
+ border-radius: var(--poolse-radius-pill);
1221
+ font-family: var(--poolse-font-body);
1222
+ font-weight: 600;
1223
+ font-size: 13px;
1224
+ cursor: pointer;
1225
+ transition: background-color 0.12s;
1226
+ }
1227
+
1228
+ .poolse-lightbox__download:hover {
1229
+ background: rgba(255, 255, 255, 0.22);
1230
+ }
1231
+
1232
+ @keyframes poolse-lightbox-fade-in {
1233
+ from {
1234
+ opacity: 0;
1235
+ }
1236
+ to {
1237
+ opacity: 1;
1238
+ }
1239
+ }
1240
+
1090
1241
  .poolse-attachment__file {
1091
1242
  display: flex;
1092
1243
  align-items: center;
@@ -1325,7 +1476,9 @@
1325
1476
 
1326
1477
  .poolse-msg-actions__picker {
1327
1478
  position: absolute;
1328
- bottom: calc(100% + 6px);
1479
+ /* Picker appears BELOW the actions toolbar so the stack is
1480
+ bubble → toolbar → picker, no overlap with the bubble body. */
1481
+ top: calc(100% + 6px);
1329
1482
  left: 0;
1330
1483
  z-index: 10;
1331
1484
  }
@@ -1340,36 +1493,34 @@
1340
1493
  position: relative;
1341
1494
  }
1342
1495
 
1496
+ /* The actions toolbar sits BELOW the bubble — flush to the bubble's
1497
+ trailing edge so it visually anchors to the message rather than
1498
+ floating elsewhere on the row.
1499
+ - Self (right-aligned) bubble → toolbar right-aligned
1500
+ - Other (left-aligned) bubble → toolbar left-aligned
1501
+ Reveals on hover/focus (desktop) or tap-on-bubble (touch — handled
1502
+ in MessageRow.tsx, which sets data-actions-open). */
1343
1503
  .poolse-message-row__actions {
1344
1504
  position: absolute;
1345
- /* Vertically align with the bubble's top edge, slightly inset so
1346
- the toolbar visually centers on the first line of a multi-line
1347
- message. */
1348
- top: 4px;
1505
+ top: 100%;
1506
+ margin-top: 4px;
1349
1507
  z-index: 3;
1350
1508
  opacity: 0;
1351
1509
  pointer-events: none;
1352
1510
  transition: opacity 0.12s;
1353
1511
  }
1354
1512
 
1355
- /* The toolbar sits BESIDE the bubble — never over it. That keeps
1356
- the entire bubble body clickable (links, embedded UI, etc.) and
1357
- sidesteps the messages-container overflow clipping that bit the
1358
- "float above" approach when a bubble was near the top of the
1359
- scrollable area.
1360
- - Self (right-aligned) bubble → toolbar on the LEFT
1361
- - Other (left-aligned) bubble → toolbar on the RIGHT
1362
- Both directions point INTO the messages container's free space. */
1363
1513
  .poolse-message-row__actions--right {
1364
- right: calc(100% + 6px);
1514
+ right: 0;
1365
1515
  }
1366
1516
 
1367
1517
  .poolse-message-row__actions--left {
1368
- left: calc(100% + 6px);
1518
+ left: 0;
1369
1519
  }
1370
1520
 
1371
1521
  .poolse-message-row:hover .poolse-message-row__actions,
1372
- .poolse-message-row:focus-within .poolse-message-row__actions {
1522
+ .poolse-message-row:focus-within .poolse-message-row__actions,
1523
+ .poolse-message-row[data-actions-open] .poolse-message-row__actions {
1373
1524
  opacity: 1;
1374
1525
  pointer-events: auto;
1375
1526
  }
@@ -1597,6 +1748,9 @@
1597
1748
  gap: 0;
1598
1749
  border-top: 1px solid var(--poolse-border);
1599
1750
  background: var(--poolse-surface);
1751
+ /* Clear the iPhone home-indicator strip when ConversationView sits
1752
+ at the bottom of the viewport. No-op on devices without an inset. */
1753
+ padding-bottom: env(safe-area-inset-bottom);
1600
1754
  }
1601
1755
 
1602
1756
  .poolse-conversation__composer-row > .poolse-attach-btn {
@@ -1703,3 +1857,198 @@
1703
1857
  .poolse-conversation {
1704
1858
  position: relative;
1705
1859
  }
1860
+
1861
+ /* ─────────────────────────────────────────────────────────────
1862
+ Drag-and-drop upload overlay (Phase 4a-2)
1863
+ ───────────────────────────────────────────────────────────── */
1864
+
1865
+ .poolse-conversation__drop-overlay {
1866
+ position: absolute;
1867
+ inset: 6px;
1868
+ border: 2px dashed var(--poolse-brand);
1869
+ border-radius: var(--poolse-radius-lg);
1870
+ background: color-mix(in oklab, var(--poolse-brand-soft) 92%, transparent);
1871
+ display: flex;
1872
+ align-items: center;
1873
+ justify-content: center;
1874
+ pointer-events: none;
1875
+ z-index: 10;
1876
+ animation: poolse-drop-fade-in 0.12s ease-out;
1877
+ }
1878
+
1879
+ .poolse-conversation__drop-overlay-inner {
1880
+ display: flex;
1881
+ flex-direction: column;
1882
+ align-items: center;
1883
+ gap: 6px;
1884
+ color: var(--poolse-brand-strong);
1885
+ }
1886
+
1887
+ .poolse-conversation__drop-overlay-title {
1888
+ font-family: var(--poolse-font-display);
1889
+ font-weight: 600;
1890
+ font-size: 18px;
1891
+ letter-spacing: -0.01em;
1892
+ }
1893
+
1894
+ .poolse-conversation__drop-overlay-hint {
1895
+ font-family: var(--poolse-font-body);
1896
+ font-size: 13px;
1897
+ color: var(--poolse-ink-2);
1898
+ }
1899
+
1900
+ @keyframes poolse-drop-fade-in {
1901
+ from {
1902
+ opacity: 0;
1903
+ }
1904
+ to {
1905
+ opacity: 1;
1906
+ }
1907
+ }
1908
+
1909
+ /* Subtle visual cue on the surrounding container while dragging. */
1910
+ .poolse-conversation.is-drag-active .poolse-conversation__messages {
1911
+ filter: blur(1px) saturate(0.9);
1912
+ transition: filter 0.14s ease-out;
1913
+ }
1914
+
1915
+ /* ─────────────────────────────────────────────────────────────
1916
+ Upload queue strip — chips above the composer (Phase 4a-3)
1917
+ ───────────────────────────────────────────────────────────── */
1918
+
1919
+ .poolse-upload-strip {
1920
+ display: flex;
1921
+ flex-direction: column;
1922
+ gap: 6px;
1923
+ padding: 8px 12px;
1924
+ background: var(--poolse-surface-2);
1925
+ border-top: 1px solid var(--poolse-border);
1926
+ }
1927
+
1928
+ .poolse-upload-chip {
1929
+ display: flex;
1930
+ align-items: center;
1931
+ gap: 10px;
1932
+ padding: 8px 10px;
1933
+ background: var(--poolse-surface);
1934
+ border: 1px solid var(--poolse-border);
1935
+ border-radius: var(--poolse-radius-md);
1936
+ font-family: var(--poolse-font-body);
1937
+ font-size: 13px;
1938
+ color: var(--poolse-ink);
1939
+ min-width: 0;
1940
+ }
1941
+
1942
+ .poolse-upload-chip--error {
1943
+ border-color: color-mix(in oklab, var(--poolse-error) 50%, var(--poolse-border));
1944
+ background: color-mix(in oklab, var(--poolse-error) 8%, var(--poolse-surface));
1945
+ }
1946
+
1947
+ .poolse-upload-chip__icon {
1948
+ flex-shrink: 0;
1949
+ width: 24px;
1950
+ height: 24px;
1951
+ display: inline-flex;
1952
+ align-items: center;
1953
+ justify-content: center;
1954
+ color: var(--poolse-ink-2);
1955
+ }
1956
+
1957
+ .poolse-upload-chip--error .poolse-upload-chip__icon {
1958
+ color: var(--poolse-error);
1959
+ }
1960
+
1961
+ .poolse-upload-chip__body {
1962
+ flex: 1 1 auto;
1963
+ min-width: 0;
1964
+ display: flex;
1965
+ flex-direction: column;
1966
+ gap: 4px;
1967
+ }
1968
+
1969
+ .poolse-upload-chip__filename {
1970
+ font-weight: 500;
1971
+ white-space: nowrap;
1972
+ overflow: hidden;
1973
+ text-overflow: ellipsis;
1974
+ }
1975
+
1976
+ .poolse-upload-chip__bar {
1977
+ height: 4px;
1978
+ border-radius: var(--poolse-radius-pill);
1979
+ background: var(--poolse-surface-2);
1980
+ overflow: hidden;
1981
+ }
1982
+
1983
+ .poolse-upload-chip__bar-fill {
1984
+ height: 100%;
1985
+ background: var(--poolse-brand);
1986
+ transition: width 0.12s linear;
1987
+ border-radius: inherit;
1988
+ }
1989
+
1990
+ .poolse-upload-chip__error {
1991
+ color: var(--poolse-error);
1992
+ font-size: 12px;
1993
+ white-space: nowrap;
1994
+ overflow: hidden;
1995
+ text-overflow: ellipsis;
1996
+ }
1997
+
1998
+ .poolse-upload-chip__action {
1999
+ flex-shrink: 0;
2000
+ width: 22px;
2001
+ height: 22px;
2002
+ border-radius: 50%;
2003
+ border: none;
2004
+ background: transparent;
2005
+ color: var(--poolse-ink-2);
2006
+ font-size: 18px;
2007
+ line-height: 1;
2008
+ cursor: pointer;
2009
+ display: inline-flex;
2010
+ align-items: center;
2011
+ justify-content: center;
2012
+ transition: background-color 0.12s;
2013
+ }
2014
+
2015
+ .poolse-upload-chip__action:hover {
2016
+ background: var(--poolse-surface-2);
2017
+ color: var(--poolse-ink);
2018
+ }
2019
+
2020
+ /* ─────────────────────────────────────────────────────────────
2021
+ Reduced motion — respect the user's OS preference (WCAG 2.3.3)
2022
+ ───────────────────────────────────────────────────────────── */
2023
+
2024
+ @media (prefers-reduced-motion: reduce) {
2025
+ /* Scoped to the @poolse/react-ui surfaces — we don't want to
2026
+ forcibly disable host-app animations from a third-party stylesheet. */
2027
+ .poolse-conversation,
2028
+ .poolse-conversation *,
2029
+ .poolse-conversation-shell,
2030
+ .poolse-conversation-shell *,
2031
+ .poolse-thread,
2032
+ .poolse-thread *,
2033
+ .poolse-lightbox,
2034
+ .poolse-lightbox *,
2035
+ .poolse-upload-strip,
2036
+ .poolse-upload-strip *,
2037
+ .poolse-mention-menu,
2038
+ .poolse-mention-menu *,
2039
+ .poolse-reaction-picker,
2040
+ .poolse-reaction-picker *,
2041
+ .poolse-list,
2042
+ .poolse-list * {
2043
+ animation-duration: 0.001ms !important;
2044
+ animation-iteration-count: 1 !important;
2045
+ transition-duration: 0.001ms !important;
2046
+ scroll-behavior: auto !important;
2047
+ }
2048
+
2049
+ /* The drag overlay's container blur reads as motion to some users
2050
+ even though no transform actually moves — neutralize it. */
2051
+ .poolse-conversation.is-drag-active .poolse-conversation__messages {
2052
+ filter: none;
2053
+ }
2054
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poolse/react-ui",
3
- "version": "1.0.1-beta.0",
3
+ "version": "1.0.2",
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/react": "1.0.1-beta.0",
50
- "@poolse/sdk": "1.0.1-beta.0"
49
+ "@poolse/react": "1.0.2",
50
+ "@poolse/sdk": "1.0.2"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": ">=18"