@poolse/react-ui 0.1.2 → 0.2.0-alpha.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
@@ -839,3 +839,418 @@
839
839
  .poolse-mention-menu__item--active:hover {
840
840
  background: var(--poolse-brand-soft);
841
841
  }
842
+
843
+ /* ─────────────────────────────────────────────────────────────
844
+ MessageActions — hover popover
845
+ ───────────────────────────────────────────────────────────── */
846
+
847
+ .poolse-msg-actions {
848
+ display: inline-flex;
849
+ align-items: center;
850
+ gap: 2px;
851
+ padding: 4px;
852
+ background: var(--poolse-surface);
853
+ border: 1px solid var(--poolse-border);
854
+ border-radius: var(--poolse-radius-pill);
855
+ box-shadow: var(--poolse-shadow-sm);
856
+ position: relative;
857
+ }
858
+
859
+ .poolse-msg-actions__btn {
860
+ width: 28px;
861
+ height: 28px;
862
+ display: inline-flex;
863
+ align-items: center;
864
+ justify-content: center;
865
+ background: transparent;
866
+ border: none;
867
+ border-radius: 50%;
868
+ color: var(--poolse-ink-2);
869
+ cursor: pointer;
870
+ transition:
871
+ background-color 0.12s,
872
+ color 0.12s;
873
+ }
874
+
875
+ .poolse-msg-actions__btn:hover {
876
+ background: var(--poolse-surface-2);
877
+ color: var(--poolse-ink);
878
+ }
879
+
880
+ .poolse-msg-actions__btn--active {
881
+ background: var(--poolse-brand-soft);
882
+ color: var(--poolse-brand-strong);
883
+ }
884
+
885
+ .poolse-msg-actions__btn--danger:hover {
886
+ color: var(--poolse-error);
887
+ }
888
+
889
+ .poolse-msg-actions__picker {
890
+ position: absolute;
891
+ bottom: calc(100% + 6px);
892
+ left: 0;
893
+ z-index: 10;
894
+ }
895
+
896
+ /* Default container that customers can wrap each message in for
897
+ hover-show behavior. Adds positioning context + reveals the
898
+ actions only on row hover. */
899
+ .poolse-message-row {
900
+ display: flex;
901
+ flex-direction: column;
902
+ align-self: stretch;
903
+ position: relative;
904
+ }
905
+
906
+ .poolse-message-row__actions {
907
+ position: absolute;
908
+ top: -16px;
909
+ opacity: 0;
910
+ pointer-events: none;
911
+ transition: opacity 0.12s;
912
+ }
913
+
914
+ .poolse-message-row__actions--right {
915
+ right: 0;
916
+ }
917
+
918
+ .poolse-message-row__actions--left {
919
+ left: 0;
920
+ }
921
+
922
+ .poolse-message-row:hover .poolse-message-row__actions,
923
+ .poolse-message-row:focus-within .poolse-message-row__actions {
924
+ opacity: 1;
925
+ pointer-events: auto;
926
+ }
927
+
928
+ /* ─────────────────────────────────────────────────────────────
929
+ EditableMessageBubble — in-place edit
930
+ ───────────────────────────────────────────────────────────── */
931
+
932
+ .poolse-message--editing {
933
+ padding: 10px;
934
+ gap: 8px;
935
+ min-width: 220px;
936
+ }
937
+
938
+ .poolse-message__edit {
939
+ width: 100%;
940
+ background: var(--poolse-surface);
941
+ color: var(--poolse-ink);
942
+ border: 1px solid var(--poolse-border);
943
+ border-radius: var(--poolse-radius-md);
944
+ padding: 8px 12px;
945
+ font: inherit;
946
+ resize: vertical;
947
+ outline: none;
948
+ }
949
+
950
+ .poolse-message--self .poolse-message__edit {
951
+ /* Switch self-edit to a surface-color textarea — coral background
952
+ would make the cursor invisible. */
953
+ background: var(--poolse-on-brand);
954
+ color: var(--poolse-ink);
955
+ }
956
+
957
+ .poolse-message__edit:focus {
958
+ border-color: var(--poolse-brand);
959
+ }
960
+
961
+ .poolse-message__edit-actions {
962
+ display: flex;
963
+ justify-content: flex-end;
964
+ gap: 6px;
965
+ }
966
+
967
+ .poolse-message__edit-btn {
968
+ font: 600 12.5px / 1 var(--poolse-font-body);
969
+ padding: 6px 12px;
970
+ border-radius: var(--poolse-radius-pill);
971
+ border: 1px solid transparent;
972
+ background: transparent;
973
+ color: var(--poolse-ink-2);
974
+ cursor: pointer;
975
+ transition:
976
+ background-color 0.12s,
977
+ color 0.12s,
978
+ border-color 0.12s;
979
+ }
980
+
981
+ .poolse-message--self .poolse-message__edit-btn {
982
+ color: var(--poolse-on-brand);
983
+ }
984
+
985
+ .poolse-message__edit-btn:hover {
986
+ background: var(--poolse-surface-2);
987
+ color: var(--poolse-ink);
988
+ }
989
+
990
+ .poolse-message--self .poolse-message__edit-btn:hover {
991
+ background: color-mix(in oklab, var(--poolse-on-brand) 15%, transparent);
992
+ color: var(--poolse-on-brand);
993
+ }
994
+
995
+ .poolse-message__edit-btn--primary {
996
+ background: var(--poolse-brand);
997
+ color: var(--poolse-on-brand);
998
+ }
999
+
1000
+ .poolse-message--self .poolse-message__edit-btn--primary {
1001
+ background: var(--poolse-on-brand);
1002
+ color: var(--poolse-brand);
1003
+ }
1004
+
1005
+ .poolse-message__edit-btn--primary:hover {
1006
+ background: var(--poolse-brand);
1007
+ color: var(--poolse-on-brand);
1008
+ filter: brightness(1.04);
1009
+ }
1010
+
1011
+ .poolse-message__edit-btn:disabled {
1012
+ opacity: 0.5;
1013
+ cursor: not-allowed;
1014
+ }
1015
+
1016
+ /* ─────────────────────────────────────────────────────────────
1017
+ ThreadView — side pane
1018
+ ───────────────────────────────────────────────────────────── */
1019
+
1020
+ .poolse-thread {
1021
+ display: flex;
1022
+ flex-direction: column;
1023
+ height: 100%;
1024
+ min-height: 0;
1025
+ background: var(--poolse-paper);
1026
+ color: var(--poolse-ink);
1027
+ font-family: var(--poolse-font-body);
1028
+ font-size: var(--poolse-font-size);
1029
+ border-left: 1px solid var(--poolse-border);
1030
+ }
1031
+
1032
+ .poolse-thread__header {
1033
+ display: flex;
1034
+ align-items: center;
1035
+ justify-content: space-between;
1036
+ padding: 12px 16px;
1037
+ border-bottom: 1px solid var(--poolse-border);
1038
+ background: var(--poolse-surface);
1039
+ flex-shrink: 0;
1040
+ }
1041
+
1042
+ .poolse-thread__title {
1043
+ font-family: var(--poolse-font-display);
1044
+ font-weight: 800;
1045
+ font-size: 16px;
1046
+ letter-spacing: -0.01em;
1047
+ color: var(--poolse-ink);
1048
+ }
1049
+
1050
+ .poolse-thread__root {
1051
+ padding: 14px 18px;
1052
+ border-bottom: 1px solid var(--poolse-border);
1053
+ background: var(--poolse-surface-2);
1054
+ display: flex;
1055
+ flex-direction: column;
1056
+ }
1057
+
1058
+ .poolse-thread__messages {
1059
+ flex: 1 1 auto;
1060
+ min-height: 0;
1061
+ overflow-y: auto;
1062
+ padding: 14px 18px;
1063
+ display: flex;
1064
+ flex-direction: column;
1065
+ gap: 10px;
1066
+ }
1067
+
1068
+ /* ─────────────────────────────────────────────────────────────
1069
+ ConversationView shell — composes view + optional thread pane
1070
+ ───────────────────────────────────────────────────────────── */
1071
+
1072
+ .poolse-conversation-shell {
1073
+ display: flex;
1074
+ height: 100%;
1075
+ min-height: 0;
1076
+ }
1077
+
1078
+ .poolse-conversation-shell > .poolse-conversation {
1079
+ flex: 1 1 auto;
1080
+ min-width: 0;
1081
+ }
1082
+
1083
+ .poolse-conversation-shell__thread {
1084
+ width: 380px;
1085
+ flex-shrink: 0;
1086
+ min-width: 0;
1087
+ }
1088
+
1089
+ @media (max-width: 760px) {
1090
+ .poolse-conversation-shell__thread {
1091
+ position: absolute;
1092
+ inset: 0;
1093
+ width: 100%;
1094
+ background: var(--poolse-paper);
1095
+ z-index: 5;
1096
+ }
1097
+ }
1098
+
1099
+ /* Message row — flex container that wraps bubble + attachments +
1100
+ reactions + (hover) actions. Keeps the row a direct flex child of
1101
+ the messages list so align-self works the same way as the bare
1102
+ bubble. */
1103
+ .poolse-message-row {
1104
+ display: flex;
1105
+ flex-direction: column;
1106
+ align-items: flex-start;
1107
+ align-self: flex-start;
1108
+ max-width: 78%;
1109
+ position: relative;
1110
+ gap: 4px;
1111
+ }
1112
+
1113
+ .poolse-message-row--right {
1114
+ align-items: flex-end;
1115
+ align-self: flex-end;
1116
+ }
1117
+
1118
+ .poolse-message-row .poolse-message {
1119
+ /* Bubble's own max-width was on the bubble itself; lift the
1120
+ row-level cap and let the row decide. */
1121
+ max-width: 100%;
1122
+ }
1123
+
1124
+ .poolse-message-row__attachments {
1125
+ display: flex;
1126
+ flex-direction: column;
1127
+ gap: 4px;
1128
+ align-items: flex-start;
1129
+ }
1130
+
1131
+ .poolse-message-row__attachments.is-self {
1132
+ align-items: flex-end;
1133
+ }
1134
+
1135
+ .poolse-message-row__reactions {
1136
+ display: flex;
1137
+ align-items: flex-start;
1138
+ }
1139
+
1140
+ .poolse-message-row__reactions.is-self {
1141
+ justify-content: flex-end;
1142
+ }
1143
+
1144
+ /* Composer row — attach button + composer */
1145
+ .poolse-conversation__composer-row {
1146
+ display: flex;
1147
+ align-items: stretch;
1148
+ gap: 0;
1149
+ border-top: 1px solid var(--poolse-border);
1150
+ background: var(--poolse-surface);
1151
+ }
1152
+
1153
+ .poolse-conversation__composer-row > .poolse-attach-btn {
1154
+ align-self: center;
1155
+ margin-left: 8px;
1156
+ }
1157
+
1158
+ .poolse-conversation__composer-flex {
1159
+ flex: 1 1 auto;
1160
+ min-width: 0;
1161
+ }
1162
+
1163
+ .poolse-conversation__composer-flex .poolse-composer {
1164
+ border-top: none;
1165
+ }
1166
+
1167
+ .poolse-attach-input {
1168
+ display: none;
1169
+ }
1170
+
1171
+ .poolse-attach-btn {
1172
+ display: inline-flex;
1173
+ align-items: center;
1174
+ justify-content: center;
1175
+ width: 40px;
1176
+ height: 40px;
1177
+ border-radius: 50%;
1178
+ border: none;
1179
+ background: transparent;
1180
+ color: var(--poolse-ink-2);
1181
+ cursor: pointer;
1182
+ flex-shrink: 0;
1183
+ transition:
1184
+ background-color 0.12s,
1185
+ color 0.12s;
1186
+ }
1187
+
1188
+ .poolse-attach-btn:hover:not(:disabled) {
1189
+ background: var(--poolse-surface-2);
1190
+ color: var(--poolse-ink);
1191
+ }
1192
+
1193
+ .poolse-attach-btn:disabled {
1194
+ opacity: 0.5;
1195
+ cursor: not-allowed;
1196
+ }
1197
+
1198
+ /* ─────────────────────────────────────────────────────────────
1199
+ ConversationList unread badge (Phase 5)
1200
+ ───────────────────────────────────────────────────────────── */
1201
+
1202
+ .poolse-list__unread {
1203
+ display: inline-flex;
1204
+ align-items: center;
1205
+ justify-content: center;
1206
+ min-width: 22px;
1207
+ height: 22px;
1208
+ padding: 0 7px;
1209
+ background: var(--poolse-brand);
1210
+ color: var(--poolse-on-brand);
1211
+ font-family: var(--poolse-font-body);
1212
+ font-weight: 700;
1213
+ font-size: 11px;
1214
+ font-variant-numeric: tabular-nums;
1215
+ border-radius: var(--poolse-radius-pill);
1216
+ flex-shrink: 0;
1217
+ margin-left: auto;
1218
+ letter-spacing: 0.01em;
1219
+ }
1220
+
1221
+ .poolse-list__item--selected .poolse-list__unread {
1222
+ background: var(--poolse-on-brand);
1223
+ color: var(--poolse-brand-strong);
1224
+ }
1225
+
1226
+ /* ─────────────────────────────────────────────────────────────
1227
+ Scroll-to-new floating button (Phase 5)
1228
+ ───────────────────────────────────────────────────────────── */
1229
+
1230
+ .poolse-conversation__scroll-to-new {
1231
+ position: absolute;
1232
+ bottom: 92px; /* clears the composer */
1233
+ left: 50%;
1234
+ transform: translateX(-50%);
1235
+ background: var(--poolse-brand);
1236
+ color: var(--poolse-on-brand);
1237
+ border: none;
1238
+ border-radius: var(--poolse-radius-pill);
1239
+ padding: 8px 16px;
1240
+ font-family: var(--poolse-font-body);
1241
+ font-weight: 700;
1242
+ font-size: 12.5px;
1243
+ cursor: pointer;
1244
+ box-shadow: 0 8px 22px -6px color-mix(in oklab, var(--poolse-brand) 60%, transparent);
1245
+ z-index: 5;
1246
+ transition: filter 0.12s;
1247
+ }
1248
+
1249
+ .poolse-conversation__scroll-to-new:hover {
1250
+ filter: brightness(1.05);
1251
+ }
1252
+
1253
+ /* Make the parent positioning context — the conversation container */
1254
+ .poolse-conversation {
1255
+ position: relative;
1256
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poolse/react-ui",
3
- "version": "0.1.2",
3
+ "version": "0.2.0-alpha.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": [
@@ -44,8 +44,8 @@
44
44
  "CHANGELOG.md"
45
45
  ],
46
46
  "dependencies": {
47
- "@poolse/react": "0.1.1",
48
- "@poolse/sdk": "0.1.0"
47
+ "@poolse/react": "0.2.0-alpha.2",
48
+ "@poolse/sdk": "0.2.0-alpha.2"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": ">=18"