@poolse/react-ui 1.0.1-beta.0 → 1.0.1

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
@@ -417,6 +417,13 @@
417
417
  margin-bottom: 2px;
418
418
  /* color is set inline via the userColor() palette so each user
419
419
  keeps a stable identity tint. */
420
+ /* Defense-in-depth: the <UserName> component already truncates to
421
+ 24 chars, but explicit overflow guards here keep a 50-char
422
+ value (e.g. passed via labelFor) from blowing the bubble width. */
423
+ max-width: 100%;
424
+ overflow: hidden;
425
+ text-overflow: ellipsis;
426
+ white-space: nowrap;
420
427
  }
421
428
 
422
429
  /* Bubble + avatar shell — flex row, avatar slot to the left,
@@ -503,6 +510,11 @@
503
510
  text-decoration: underline;
504
511
  text-underline-offset: 2px;
505
512
  font-weight: 600;
513
+ /* Long URLs without spaces (e.g. autolinked tracking links) would
514
+ otherwise blow the bubble's max-width. Allow word-break inside
515
+ the <a> so they wrap across lines. */
516
+ word-break: break-word;
517
+ overflow-wrap: anywhere;
506
518
  }
507
519
  .poolse-message__body a:hover {
508
520
  opacity: 0.85;
@@ -572,6 +584,13 @@
572
584
  min-height: 22px;
573
585
  }
574
586
 
587
+ /* Hide the decorative bubble + label visually when nobody is typing
588
+ — the screen-reader live region stays mounted (empty string) so
589
+ the polite announcement fires on next change. */
590
+ .poolse-typing:not([data-typing]) .poolse-typing__dots {
591
+ visibility: hidden;
592
+ }
593
+
575
594
  .poolse-typing__dots {
576
595
  display: inline-flex;
577
596
  gap: 5px;
@@ -810,6 +829,45 @@
810
829
  max-height: 140px;
811
830
  }
812
831
 
832
+ /* iOS auto-zooms when a focused text input has font-size < 16px.
833
+ Bump to exactly 16px on touch viewports so the page stays at its
834
+ intended scale on tap. */
835
+ @media (max-width: 760px) {
836
+ .poolse-composer__input {
837
+ font-size: 16px;
838
+ }
839
+
840
+ /* WCAG 2.5.5 / Apple HIG: 44x44 minimum touch target for primary
841
+ icon controls. Desktop sizes stay tight; mobile gets the bump.
842
+ Inner icon stays the same — only the hit-area grows. */
843
+ .poolse-composer__send,
844
+ .poolse-attach-btn,
845
+ .poolse-icon-btn {
846
+ width: 44px;
847
+ height: 44px;
848
+ }
849
+
850
+ /* The hover-revealed message-actions toolbar isn't reachable by
851
+ touch (no hover state). The toolbar buttons size up so when the
852
+ `…` tap-reveal opens it, taps land reliably. */
853
+ .poolse-msg-actions__btn {
854
+ width: 36px;
855
+ height: 36px;
856
+ }
857
+
858
+ /* Tighten horizontal padding so bubbles can stretch a bit wider
859
+ on narrow phones — readability over symmetry. */
860
+ .poolse-conversation__messages {
861
+ padding: 16px 8px;
862
+ }
863
+
864
+ /* Bubbles get a touch more breathing room — same column rules
865
+ desktop uses become cramped at <360px viewports. */
866
+ .poolse-message-row {
867
+ max-width: 88%;
868
+ }
869
+ }
870
+
813
871
  .poolse-composer__input:focus {
814
872
  border-color: var(--poolse-brand);
815
873
  background: var(--poolse-surface);
@@ -1078,15 +1136,105 @@
1078
1136
  max-width: 320px;
1079
1137
  }
1080
1138
 
1139
+ .poolse-attachment__image-button {
1140
+ padding: 0;
1141
+ border: none;
1142
+ background: none;
1143
+ cursor: zoom-in;
1144
+ border-radius: var(--poolse-radius-md);
1145
+ display: block;
1146
+ }
1147
+
1148
+ .poolse-attachment__image-button:focus-visible {
1149
+ outline: 2px solid var(--poolse-brand);
1150
+ outline-offset: 2px;
1151
+ }
1152
+
1081
1153
  .poolse-attachment__image {
1082
1154
  display: block;
1083
1155
  max-width: 100%;
1084
1156
  max-height: 260px;
1085
1157
  border-radius: var(--poolse-radius-md);
1086
- cursor: zoom-in;
1087
1158
  background: var(--poolse-surface-2);
1088
1159
  }
1089
1160
 
1161
+ /* Image lightbox (Phase 4a-4) */
1162
+ .poolse-lightbox {
1163
+ position: fixed;
1164
+ inset: 0;
1165
+ background: rgba(17, 15, 14, 0.86);
1166
+ display: flex;
1167
+ align-items: center;
1168
+ justify-content: center;
1169
+ z-index: 9999;
1170
+ padding: max(40px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
1171
+ max(40px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
1172
+ cursor: zoom-out;
1173
+ animation: poolse-lightbox-fade-in 0.14s ease-out;
1174
+ }
1175
+
1176
+ .poolse-lightbox__image {
1177
+ max-width: 100%;
1178
+ max-height: 100%;
1179
+ object-fit: contain;
1180
+ border-radius: var(--poolse-radius-md);
1181
+ box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
1182
+ cursor: default;
1183
+ }
1184
+
1185
+ .poolse-lightbox__close {
1186
+ position: fixed;
1187
+ top: max(20px, env(safe-area-inset-top));
1188
+ right: max(24px, env(safe-area-inset-right));
1189
+ width: 40px;
1190
+ height: 40px;
1191
+ border-radius: 50%;
1192
+ border: none;
1193
+ background: rgba(255, 255, 255, 0.12);
1194
+ color: white;
1195
+ font-size: 26px;
1196
+ line-height: 1;
1197
+ cursor: pointer;
1198
+ display: inline-flex;
1199
+ align-items: center;
1200
+ justify-content: center;
1201
+ transition: background-color 0.12s;
1202
+ }
1203
+
1204
+ .poolse-lightbox__close:hover {
1205
+ background: rgba(255, 255, 255, 0.22);
1206
+ }
1207
+
1208
+ .poolse-lightbox__download {
1209
+ position: fixed;
1210
+ bottom: max(24px, env(safe-area-inset-bottom));
1211
+ left: 50%;
1212
+ transform: translateX(-50%);
1213
+ padding: 8px 16px;
1214
+ background: rgba(255, 255, 255, 0.12);
1215
+ color: white;
1216
+ text-decoration: none;
1217
+ border-radius: var(--poolse-radius-pill);
1218
+ font-family: var(--poolse-font-body);
1219
+ font-weight: 600;
1220
+ font-size: 13px;
1221
+ cursor: pointer;
1222
+ transition: background-color 0.12s;
1223
+ }
1224
+
1225
+ .poolse-lightbox__download:hover {
1226
+ background: rgba(255, 255, 255, 0.22);
1227
+ }
1228
+
1229
+ @keyframes poolse-lightbox-fade-in {
1230
+ from {
1231
+ opacity: 0;
1232
+ }
1233
+ to {
1234
+ opacity: 1;
1235
+ }
1236
+ }
1237
+
1090
1238
  .poolse-attachment__file {
1091
1239
  display: flex;
1092
1240
  align-items: center;
@@ -1369,11 +1517,46 @@
1369
1517
  }
1370
1518
 
1371
1519
  .poolse-message-row:hover .poolse-message-row__actions,
1372
- .poolse-message-row:focus-within .poolse-message-row__actions {
1520
+ .poolse-message-row:focus-within .poolse-message-row__actions,
1521
+ .poolse-message-row[data-actions-open] .poolse-message-row__actions {
1373
1522
  opacity: 1;
1374
1523
  pointer-events: auto;
1375
1524
  }
1376
1525
 
1526
+ /* Tap-reveal trigger for touch devices. Hidden where hover works
1527
+ (desktop): the hover/focus reveal above already covers that case.
1528
+ On touch, tap the `…` to open; tap outside the row to close. */
1529
+ .poolse-message-row__more {
1530
+ display: none;
1531
+ position: absolute;
1532
+ top: -6px;
1533
+ width: 28px;
1534
+ height: 28px;
1535
+ border: 1px solid var(--poolse-border);
1536
+ border-radius: 50%;
1537
+ background: var(--poolse-surface);
1538
+ color: var(--poolse-ink-2);
1539
+ padding: 0;
1540
+ cursor: pointer;
1541
+ z-index: 3;
1542
+ align-items: center;
1543
+ justify-content: center;
1544
+ }
1545
+
1546
+ .poolse-message-row--right .poolse-message-row__more {
1547
+ right: -6px;
1548
+ }
1549
+
1550
+ .poolse-message-row:not(.poolse-message-row--right) .poolse-message-row__more {
1551
+ left: -6px;
1552
+ }
1553
+
1554
+ @media (hover: none) {
1555
+ .poolse-message-row__more {
1556
+ display: inline-flex;
1557
+ }
1558
+ }
1559
+
1377
1560
  /* ─────────────────────────────────────────────────────────────
1378
1561
  EditableMessageBubble — in-place edit
1379
1562
  ───────────────────────────────────────────────────────────── */
@@ -1597,6 +1780,9 @@
1597
1780
  gap: 0;
1598
1781
  border-top: 1px solid var(--poolse-border);
1599
1782
  background: var(--poolse-surface);
1783
+ /* Clear the iPhone home-indicator strip when ConversationView sits
1784
+ at the bottom of the viewport. No-op on devices without an inset. */
1785
+ padding-bottom: env(safe-area-inset-bottom);
1600
1786
  }
1601
1787
 
1602
1788
  .poolse-conversation__composer-row > .poolse-attach-btn {
@@ -1703,3 +1889,198 @@
1703
1889
  .poolse-conversation {
1704
1890
  position: relative;
1705
1891
  }
1892
+
1893
+ /* ─────────────────────────────────────────────────────────────
1894
+ Drag-and-drop upload overlay (Phase 4a-2)
1895
+ ───────────────────────────────────────────────────────────── */
1896
+
1897
+ .poolse-conversation__drop-overlay {
1898
+ position: absolute;
1899
+ inset: 6px;
1900
+ border: 2px dashed var(--poolse-brand);
1901
+ border-radius: var(--poolse-radius-lg);
1902
+ background: color-mix(in oklab, var(--poolse-brand-soft) 92%, transparent);
1903
+ display: flex;
1904
+ align-items: center;
1905
+ justify-content: center;
1906
+ pointer-events: none;
1907
+ z-index: 10;
1908
+ animation: poolse-drop-fade-in 0.12s ease-out;
1909
+ }
1910
+
1911
+ .poolse-conversation__drop-overlay-inner {
1912
+ display: flex;
1913
+ flex-direction: column;
1914
+ align-items: center;
1915
+ gap: 6px;
1916
+ color: var(--poolse-brand-strong);
1917
+ }
1918
+
1919
+ .poolse-conversation__drop-overlay-title {
1920
+ font-family: var(--poolse-font-display);
1921
+ font-weight: 600;
1922
+ font-size: 18px;
1923
+ letter-spacing: -0.01em;
1924
+ }
1925
+
1926
+ .poolse-conversation__drop-overlay-hint {
1927
+ font-family: var(--poolse-font-body);
1928
+ font-size: 13px;
1929
+ color: var(--poolse-ink-2);
1930
+ }
1931
+
1932
+ @keyframes poolse-drop-fade-in {
1933
+ from {
1934
+ opacity: 0;
1935
+ }
1936
+ to {
1937
+ opacity: 1;
1938
+ }
1939
+ }
1940
+
1941
+ /* Subtle visual cue on the surrounding container while dragging. */
1942
+ .poolse-conversation.is-drag-active .poolse-conversation__messages {
1943
+ filter: blur(1px) saturate(0.9);
1944
+ transition: filter 0.14s ease-out;
1945
+ }
1946
+
1947
+ /* ─────────────────────────────────────────────────────────────
1948
+ Upload queue strip — chips above the composer (Phase 4a-3)
1949
+ ───────────────────────────────────────────────────────────── */
1950
+
1951
+ .poolse-upload-strip {
1952
+ display: flex;
1953
+ flex-direction: column;
1954
+ gap: 6px;
1955
+ padding: 8px 12px;
1956
+ background: var(--poolse-surface-2);
1957
+ border-top: 1px solid var(--poolse-border);
1958
+ }
1959
+
1960
+ .poolse-upload-chip {
1961
+ display: flex;
1962
+ align-items: center;
1963
+ gap: 10px;
1964
+ padding: 8px 10px;
1965
+ background: var(--poolse-surface);
1966
+ border: 1px solid var(--poolse-border);
1967
+ border-radius: var(--poolse-radius-md);
1968
+ font-family: var(--poolse-font-body);
1969
+ font-size: 13px;
1970
+ color: var(--poolse-ink);
1971
+ min-width: 0;
1972
+ }
1973
+
1974
+ .poolse-upload-chip--error {
1975
+ border-color: color-mix(in oklab, var(--poolse-error) 50%, var(--poolse-border));
1976
+ background: color-mix(in oklab, var(--poolse-error) 8%, var(--poolse-surface));
1977
+ }
1978
+
1979
+ .poolse-upload-chip__icon {
1980
+ flex-shrink: 0;
1981
+ width: 24px;
1982
+ height: 24px;
1983
+ display: inline-flex;
1984
+ align-items: center;
1985
+ justify-content: center;
1986
+ color: var(--poolse-ink-2);
1987
+ }
1988
+
1989
+ .poolse-upload-chip--error .poolse-upload-chip__icon {
1990
+ color: var(--poolse-error);
1991
+ }
1992
+
1993
+ .poolse-upload-chip__body {
1994
+ flex: 1 1 auto;
1995
+ min-width: 0;
1996
+ display: flex;
1997
+ flex-direction: column;
1998
+ gap: 4px;
1999
+ }
2000
+
2001
+ .poolse-upload-chip__filename {
2002
+ font-weight: 500;
2003
+ white-space: nowrap;
2004
+ overflow: hidden;
2005
+ text-overflow: ellipsis;
2006
+ }
2007
+
2008
+ .poolse-upload-chip__bar {
2009
+ height: 4px;
2010
+ border-radius: var(--poolse-radius-pill);
2011
+ background: var(--poolse-surface-2);
2012
+ overflow: hidden;
2013
+ }
2014
+
2015
+ .poolse-upload-chip__bar-fill {
2016
+ height: 100%;
2017
+ background: var(--poolse-brand);
2018
+ transition: width 0.12s linear;
2019
+ border-radius: inherit;
2020
+ }
2021
+
2022
+ .poolse-upload-chip__error {
2023
+ color: var(--poolse-error);
2024
+ font-size: 12px;
2025
+ white-space: nowrap;
2026
+ overflow: hidden;
2027
+ text-overflow: ellipsis;
2028
+ }
2029
+
2030
+ .poolse-upload-chip__action {
2031
+ flex-shrink: 0;
2032
+ width: 22px;
2033
+ height: 22px;
2034
+ border-radius: 50%;
2035
+ border: none;
2036
+ background: transparent;
2037
+ color: var(--poolse-ink-2);
2038
+ font-size: 18px;
2039
+ line-height: 1;
2040
+ cursor: pointer;
2041
+ display: inline-flex;
2042
+ align-items: center;
2043
+ justify-content: center;
2044
+ transition: background-color 0.12s;
2045
+ }
2046
+
2047
+ .poolse-upload-chip__action:hover {
2048
+ background: var(--poolse-surface-2);
2049
+ color: var(--poolse-ink);
2050
+ }
2051
+
2052
+ /* ─────────────────────────────────────────────────────────────
2053
+ Reduced motion — respect the user's OS preference (WCAG 2.3.3)
2054
+ ───────────────────────────────────────────────────────────── */
2055
+
2056
+ @media (prefers-reduced-motion: reduce) {
2057
+ /* Scoped to the @poolse/react-ui surfaces — we don't want to
2058
+ forcibly disable host-app animations from a third-party stylesheet. */
2059
+ .poolse-conversation,
2060
+ .poolse-conversation *,
2061
+ .poolse-conversation-shell,
2062
+ .poolse-conversation-shell *,
2063
+ .poolse-thread,
2064
+ .poolse-thread *,
2065
+ .poolse-lightbox,
2066
+ .poolse-lightbox *,
2067
+ .poolse-upload-strip,
2068
+ .poolse-upload-strip *,
2069
+ .poolse-mention-menu,
2070
+ .poolse-mention-menu *,
2071
+ .poolse-reaction-picker,
2072
+ .poolse-reaction-picker *,
2073
+ .poolse-list,
2074
+ .poolse-list * {
2075
+ animation-duration: 0.001ms !important;
2076
+ animation-iteration-count: 1 !important;
2077
+ transition-duration: 0.001ms !important;
2078
+ scroll-behavior: auto !important;
2079
+ }
2080
+
2081
+ /* The drag overlay's container blur reads as motion to some users
2082
+ even though no transform actually moves — neutralize it. */
2083
+ .poolse-conversation.is-drag-active .poolse-conversation__messages {
2084
+ filter: none;
2085
+ }
2086
+ }
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.1",
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.1",
50
+ "@poolse/sdk": "1.0.1"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": ">=18"