Commit 6b6a828
authored
feat: expose internal contexts and composer components in the public API (#3242)
## Summary
Several components, hooks, and contexts are used internally and
referenced by the docs, but were never re-exported from the package
barrels — so consumers can't import them. This wires them into the
public API. Purely additive barrel re-exports; no behavior change.
## Newly exported
**`src/context/index.ts`**
- `VirtualizedMessageListContext`,
`VirtualizedMessageListContextProvider`,
`useVirtualizedMessageListContext`, `VirtualizedMessageListContextValue`
**`src/components/index.ts`**
- `SummarizedMessagePreview`, `useLatestMessagePreview` (+ its
`ChannelPreviewMessageType`, `ChannelPreviewDeliveryStatus`,
`LatestMessagePreviewData`, `UseLatestMessagePreviewParams` types)
**`src/components/MessageComposer/index.ts`**
- `VoiceRecordingPreviewSlot` (component; only its Props type was
exported before)
- `MessageComposerActions` and `AdditionalMessageComposerActions`
## Why
A docs audit of the v14 React SDK found multiple cookbook/reference
pages instructing readers to import these symbols from
`stream-chat-react`, which fails at runtime because the barrels don't
re-export them. Rather than route the docs around them, expose the
symbols (the docs update is in GetStream/docs-content#1431).
## Notes
- No collisions: none of the newly-exported names are exported
elsewhere.
- `AdditionalMessageComposerActions` and the four
`useLatestMessagePreview` types ride along via `export *` — intentional;
flag if you'd prefer narrower named exports.
- Not exposed (left internal, unchanged): `EditedMessagePreview`,
`SendToChannelCheckbox`, `restorePreEditSnapshot`.
## Checks
- `yarn types` ✅
- `yarn eslint` (changed files) ✅
- Barrel-only change; no tests added. Happy to add export-surface tests
if desired.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added support for voice recording previews in the message composer.
* Exposed additional message composer actions.
* Added summarized message preview functionality.
* Added access to virtualized message list context functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 05236db commit 6b6a828
3 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
0 commit comments