Skip to content

Commit 6b6a828

Browse files
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

File tree

src/components/MessageComposer/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
export * from './AttachmentSelector';
2-
export { AttachmentPreviewList } from './AttachmentPreviewList';
2+
export {
3+
AttachmentPreviewList,
4+
VoiceRecordingPreviewSlot,
5+
} from './AttachmentPreviewList';
36
export type {
47
AttachmentPreviewListProps,
58
FileAttachmentPreviewProps,
@@ -16,6 +19,7 @@ export * from './hooks';
1619
export * from './icons';
1720
export * from './LinkPreviewList';
1821
export * from './MessageComposer';
22+
export * from './MessageComposerActions';
1923
export * from './MessageComposerUI';
2024
export * from './QuotedMessagePreview';
2125
export * from './SendButton';

src/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export * from './Notifications';
3838
export * from './Poll';
3939
export * from './Reactions';
4040
export * from './SafeAnchor';
41+
export * from './SummarizedMessagePreview';
4142
export * from './TextareaComposer';
4243
export * from './Thread';
4344
export * from './Threads';

src/context/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ export * from './ModalContext';
1414
export * from './PollContext';
1515
export * from './TranslationContext';
1616
export * from './TypingContext';
17+
export * from './VirtualizedMessageListContext';
1718
export * from './WithComponents';

0 commit comments

Comments
 (0)