@poolse/react-native 3.7.1 → 3.8.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 +19 -0
- package/README.md +27 -0
- package/dist/index.cjs +676 -344
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +77 -4
- package/dist/index.d.ts +77 -4
- package/dist/index.js +674 -346
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,25 @@ All notable changes to `@poolse/react-native` are documented here.
|
|
|
4
4
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
|
|
5
5
|
versions follow [semver](https://semver.org).
|
|
6
6
|
|
|
7
|
+
## [3.8.0] - 2026-11-21
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `useBackgroundClients(clients, active)` / `applyBackground`: only the
|
|
12
|
+
workspace on screen keeps its socket; all close in the background.
|
|
13
|
+
- `<SendStatus>` under unsent messages (Retry / Delete), `<EmptyState>`
|
|
14
|
+
defaults for the conversation list (and `query` / `noResultsState`), an
|
|
15
|
+
empty conversation and an empty thread.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Drafts are per client and namespaced (the pre-3.8 key is moved), cleared
|
|
20
|
+
by `destroy({ clearStorage: true })`.
|
|
21
|
+
- `useAppStateLifecycle` uses `client.setBackground`.
|
|
22
|
+
- Message rows read as "Ana: text" with a "Message actions" accessibility
|
|
23
|
+
action (they all read "Message actions" before); reaction chips, header,
|
|
24
|
+
composer buttons and the text input have roles and labels.
|
|
25
|
+
|
|
7
26
|
## [3.7.1] - 2026-11-21
|
|
8
27
|
|
|
9
28
|
### Fixed
|
package/README.md
CHANGED
|
@@ -156,6 +156,33 @@ background; `useAppStateLifecycle({ presence: false })` leaves that out.
|
|
|
156
156
|
`useAppStatePresence()` does only that part, and `<PoolseInbox>` does it by
|
|
157
157
|
default (`trackActivity={false}` to stop).
|
|
158
158
|
|
|
159
|
+
## Several workspaces: `useBackgroundClients()`
|
|
160
|
+
|
|
161
|
+
With more than one workspace signed in, keep one `Poolse` per workspace and
|
|
162
|
+
call this once, outside the providers, instead of `useAppStateLifecycle`:
|
|
163
|
+
|
|
164
|
+
```tsx
|
|
165
|
+
useBackgroundClients(clients, current, { keepConnected: inCall ? [callClient] : [] });
|
|
166
|
+
// Push handler: connect the push's workspace for 30 s.
|
|
167
|
+
clientFor(data.tenant_id)?.wake();
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Only the workspace on screen keeps its socket; the others close theirs
|
|
171
|
+
(caches stay warm in memory, so switching is instant) and reconnect when
|
|
172
|
+
switched to. With the app in the background every socket closes. Presence
|
|
173
|
+
follows the app state on the client on screen (`presence: false` to skip).
|
|
174
|
+
`useAppStateLifecycle` now uses `setBackground` too. Unread totals for the
|
|
175
|
+
others: `useUnreadTotals(client)` refreshes when a client is woken or
|
|
176
|
+
foregrounded.
|
|
177
|
+
|
|
178
|
+
Drafts are kept per client (namespaced by server + user) and removed by
|
|
179
|
+
`client.destroy({ clearStorage: true })`. Unsent messages show "Waiting for
|
|
180
|
+
network…" or "Not sent" with Retry / Delete. `ConversationList`,
|
|
181
|
+
`ConversationView` and `ThreadView` default to an `EmptyState` that says what
|
|
182
|
+
to do next (`ConversationList query` / `noResultsState` for search). Message
|
|
183
|
+
rows read as "Ana: text" to VoiceOver/TalkBack with a "Message actions"
|
|
184
|
+
accessibility action; reaction chips say "👍 3, you reacted".
|
|
185
|
+
|
|
159
186
|
## `ConversationList`
|
|
160
187
|
|
|
161
188
|
```tsx
|