@poolse/react-ui 3.7.1 → 3.9.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 +43 -0
- package/README.md +72 -1
- package/dist/index.cjs +1085 -83
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +325 -8
- package/dist/index.d.ts +325 -8
- package/dist/index.js +1072 -85
- package/dist/index.js.map +1 -1
- package/dist/styles.css +595 -0
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,49 @@ All notable changes to `@poolse/react-ui` are documented here. Format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
|
|
5
5
|
[semver](https://semver.org).
|
|
6
6
|
|
|
7
|
+
## [3.9.0] - 2026-11-22
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `RecordingBanner`, `RecordingIndicator`, `ConsentPrompt` (`onAnswer`,
|
|
12
|
+
`onAccepted` — bring the microphone and camera back — `onDeclined`),
|
|
13
|
+
`RecordingNoticeRow`, `LiveTranscriptPanel`, `TranscriptViewer` (speakers,
|
|
14
|
+
timestamps, search, speaker rename). Same props in `@poolse/react-native`.
|
|
15
|
+
- `MessageRow` renders the `{"kind":"recording"}` system message as a line
|
|
16
|
+
instead of raw JSON (`nameForUserId` names people; `ConversationView`
|
|
17
|
+
passes it from the members), and conversation lists word it in previews.
|
|
18
|
+
- `RoomStage` shows the recording banner, indicator and consent prompt
|
|
19
|
+
(`capture`, default `true`) and can offer a Record control (`allowRecord`).
|
|
20
|
+
- poolse's transcript assistant and the recorder no longer appear in
|
|
21
|
+
`CallVideoGrid` / `RoomStage`.
|
|
22
|
+
|
|
23
|
+
## [3.8.0] - 2026-11-21
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- Keyboard shortcuts scoped to the focused view, overridable: `keymap`,
|
|
28
|
+
`sendOn`, `keyboardShortcuts`, `confirmDelete` on `ConversationView`;
|
|
29
|
+
`keymap` / `onEditLast` on `MessageComposer` and `MentionInput`;
|
|
30
|
+
`DEFAULT_KEYMAP`, `resolveKeymap`, `matchesKey`.
|
|
31
|
+
- Unsent rows (`<SendStatus>`): "Waiting for network…" or "Not sent" with
|
|
32
|
+
Retry / Delete.
|
|
33
|
+
- `<EmptyState>` defaults for an empty channel, conversation list, thread
|
|
34
|
+
and `ConversationList query` with no results (`noResultsState`);
|
|
35
|
+
`emptyState` on `ConversationView` may be a function of `{ readOnly }`.
|
|
36
|
+
- Automated accessibility check (axe-core in vitest).
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- Drafts are per client (`draftsOf(chat)`), keyed by its namespace; the
|
|
41
|
+
pre-3.8 key is moved on first read, and `destroy({ clearStorage: true })`
|
|
42
|
+
removes them.
|
|
43
|
+
- `ThreadView` closes on Esc only while it has focus (it listened on the
|
|
44
|
+
document), so views side by side don't close each other.
|
|
45
|
+
- Message rows are focusable `article`s named "Message from …"; the mention
|
|
46
|
+
textarea drops the invalid `combobox` role; the hidden file input is
|
|
47
|
+
labelled; list sections use valid group markup. Reduced motion disables
|
|
48
|
+
animation and smooth scrolling.
|
|
49
|
+
|
|
7
50
|
## [3.7.1] - 2026-11-21
|
|
8
51
|
|
|
9
52
|
### Fixed
|
package/README.md
CHANGED
|
@@ -114,6 +114,39 @@ preview>` draws one on its own.
|
|
|
114
114
|
link; quotes of them read "Original message deleted". A send refused with
|
|
115
115
|
`quoted_message_deleted` shows a notice and puts the text back.
|
|
116
116
|
|
|
117
|
+
## Keyboard, offline, empty states, accessibility
|
|
118
|
+
|
|
119
|
+
- **Shortcuts**, scoped to the focused component so an app's own (Cmd+K,
|
|
120
|
+
Cmd+[ …) never collide and two views side by side don't hear each other.
|
|
121
|
+
Composer: Enter sends (`sendOn="mod+enter"`: Enter is a new line,
|
|
122
|
+
Cmd/Ctrl+Enter sends), Shift+Enter new line, ↑ in an empty composer edits
|
|
123
|
+
your last message, Esc cancels the reply. Message list (Tab into it): j / k
|
|
124
|
+
or ↓ / ↑, Home / End, r reply, t thread, e edit, Delete (yours, after
|
|
125
|
+
`confirmDelete`, default `window.confirm`), Esc back to the composer.
|
|
126
|
+
`keymap={{ messageList: { reply: ['q'] }, composer: { editLast: [] } }}`
|
|
127
|
+
overrides (`[]` turns one off); `keyboardShortcuts={false}` turns the list
|
|
128
|
+
ones off. `DEFAULT_KEYMAP`, `resolveKeymap`, `matchesKey` are exported for
|
|
129
|
+
a shortcut sheet. `MessageComposer` / `MentionInput` take `keymap` and
|
|
130
|
+
`onEditLast`.
|
|
131
|
+
- **Unsent messages**: queued (offline) rows read "Waiting for network…" with
|
|
132
|
+
"Send now"; refused ones "Not sent: …" with Retry and Delete
|
|
133
|
+
(`<SendStatus>`). The composer clears either way.
|
|
134
|
+
- **Empty states** that say what to do next (`<EmptyState title hint action>`):
|
|
135
|
+
empty channel (`emptyState` — a node, or `({ readOnly }) => node`),
|
|
136
|
+
conversation list (`emptyState`), `ConversationList query="…"` with no
|
|
137
|
+
matches (`noResultsState`), an empty thread.
|
|
138
|
+
- **Drafts** are per client (server + user): key
|
|
139
|
+
`<client.namespace>:draft:<conversationId>` (the pre-3.8
|
|
140
|
+
`poolse:draft:<user>:<conversation>` is moved on first read);
|
|
141
|
+
`client.destroy({ clearStorage: true })` removes them.
|
|
142
|
+
- **Accessibility**: message rows are `article`s named "Message from …" and
|
|
143
|
+
focusable for the list shortcuts; the composer textarea is labelled and
|
|
144
|
+
announces mention suggestions (`aria-autocomplete`, `aria-activedescendant`);
|
|
145
|
+
reduced motion turns off animation and smooth scrolling. `test/a11y.test.tsx`
|
|
146
|
+
runs axe-core over ConversationView (full and empty), ConversationList
|
|
147
|
+
(rows, sections, empty), ThreadView, MemberList and a failed send; colour
|
|
148
|
+
contrast is covered by the theme's own contrast tests.
|
|
149
|
+
|
|
117
150
|
## Components
|
|
118
151
|
|
|
119
152
|
- Composed: `PoolseInbox` (with a ref: `open`, `openDirect`, `openGroup`,
|
|
@@ -128,7 +161,12 @@ preview>` draws one on its own.
|
|
|
128
161
|
- Lists: `ConversationList`, `MemberList`.
|
|
129
162
|
- Reactions and emoji: `ReactionStrip`, `ReactionPicker`, `EmojiPicker`.
|
|
130
163
|
- Rooms and calls: `RoomJoinBar`, `RoomStage` (both take `useRoom()` from
|
|
131
|
-
`@poolse/react
|
|
164
|
+
`@poolse/react`; `RoomStage` shows recording state and the consent prompt
|
|
165
|
+
— `capture`, default on — and a Record control with `allowRecord`),
|
|
166
|
+
`CallVideoGrid`, `CallControlButton`, `CallDeviceMenu`.
|
|
167
|
+
- Recording and transcripts: `RecordingBanner`, `RecordingIndicator`,
|
|
168
|
+
`ConsentPrompt`, `RecordingNoticeRow` (rendered by `MessageRow`),
|
|
169
|
+
`LiveTranscriptPanel`, `TranscriptViewer`. See below.
|
|
132
170
|
- Identity and brand: `Avatar`, `PresenceBadge`, `UserName`, `useDisplayName`, `PoolseIcon`,
|
|
133
171
|
`PoolseLogo`, `PoolseFonts`, `usePoolseFonts`.
|
|
134
172
|
- Theme: `PoolseTheme`, `useTheme`, `useSystemColorScheme`.
|
|
@@ -136,6 +174,39 @@ preview>` draws one on its own.
|
|
|
136
174
|
Every `labelFor` / `avatarFor` takes your user id (`external_id`), except on
|
|
137
175
|
`CallVideoGrid` and `RoomStage`, where it takes the poolse user id.
|
|
138
176
|
|
|
177
|
+
## Recording, consent and transcripts
|
|
178
|
+
|
|
179
|
+
```tsx
|
|
180
|
+
const rec = useRecording(call.id, call.conversation_id, call);
|
|
181
|
+
const media = useCallRoom(call.conversation_id, { livekit });
|
|
182
|
+
|
|
183
|
+
<RecordingBanner
|
|
184
|
+
recording={rec.active}
|
|
185
|
+
transcribing={!!rec.transcription?.active}
|
|
186
|
+
mode={rec.recording?.mode}
|
|
187
|
+
consentRequired={rec.consentRequired}
|
|
188
|
+
myConsent={rec.myConsent}
|
|
189
|
+
onStop={() => void rec.stop()}
|
|
190
|
+
/>
|
|
191
|
+
{rec.needsConsent && (
|
|
192
|
+
<ConsentPrompt
|
|
193
|
+
recording={rec.active}
|
|
194
|
+
transcribing={!!rec.transcription?.active}
|
|
195
|
+
onAnswer={rec.consent}
|
|
196
|
+
onAccepted={() => void media.republish()} // CallRoom also does it by itself
|
|
197
|
+
/>
|
|
198
|
+
)}
|
|
199
|
+
<LiveTranscriptPanel callId={call.id} onClose={…} />
|
|
200
|
+
<TranscriptViewer callId={pastCallId} onSeek={(ms) => …} />
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
`ConsentPrompt` fills the nearest positioned ancestor with a scrim
|
|
204
|
+
(`overlay={false}` for the card alone). `TranscriptViewer` searches within the
|
|
205
|
+
transcript (accent- and case-insensitive, Enter / Shift+Enter between hits)
|
|
206
|
+
and renames speakers for people who were in the call (others get an
|
|
207
|
+
explanation). The recording notice in the chat is a centred line like a call
|
|
208
|
+
log, naming people through `MessageRow`'s `nameForUserId`.
|
|
209
|
+
|
|
139
210
|
## Theming
|
|
140
211
|
|
|
141
212
|
Wrap the UI in `PoolseTheme` to use one of the eight built-in themes from
|