stream-chat-react 12.4.0 → 12.5.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.
Files changed (181) hide show
  1. package/dist/assets/icons/stream-chat-icons.eot +0 -0
  2. package/dist/assets/icons/stream-chat-icons.svg +4 -0
  3. package/dist/assets/icons/stream-chat-icons.ttf +0 -0
  4. package/dist/assets/icons/stream-chat-icons.woff +0 -0
  5. package/dist/assets/icons/stream-chat-icons.woff2 +0 -0
  6. package/dist/components/Attachment/components/ProgressBar.d.ts +2 -2
  7. package/dist/components/Attachment/components/ProgressBar.js +2 -1
  8. package/dist/components/Channel/Channel.d.ts +1 -1
  9. package/dist/components/Channel/Channel.js +36 -15
  10. package/dist/components/Channel/constants.d.ts +1 -0
  11. package/dist/components/Channel/constants.js +1 -0
  12. package/dist/components/Channel/hooks/useChannelContainerClasses.d.ts +2 -0
  13. package/dist/components/Channel/hooks/useChannelContainerClasses.js +10 -5
  14. package/dist/components/ChannelPreview/utils.js +35 -0
  15. package/dist/components/Chat/hooks/useChat.js +2 -0
  16. package/dist/components/Dialog/DialogAnchor.d.ts +1 -2
  17. package/dist/components/Dialog/DialogMenu.d.ts +3 -0
  18. package/dist/components/Dialog/DialogMenu.js +5 -0
  19. package/dist/components/Dialog/DialogPortal.d.ts +1 -1
  20. package/dist/components/Dialog/DialogPortal.js +4 -12
  21. package/dist/components/Dialog/FormDialog.d.ts +23 -0
  22. package/dist/components/Dialog/FormDialog.js +72 -0
  23. package/dist/components/Dialog/PromptDialog.d.ts +8 -0
  24. package/dist/components/Dialog/PromptDialog.js +7 -0
  25. package/dist/components/DragAndDrop/DragAndDropContainer.d.ts +7 -0
  26. package/dist/components/DragAndDrop/DragAndDropContainer.js +93 -0
  27. package/dist/components/Form/FieldError.d.ts +6 -0
  28. package/dist/components/Form/FieldError.js +3 -0
  29. package/dist/components/Form/SwitchField.d.ts +7 -0
  30. package/dist/components/Form/SwitchField.js +21 -0
  31. package/dist/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +10 -0
  32. package/dist/components/InfiniteScrollPaginator/InfiniteScroll.js +10 -0
  33. package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.d.ts +10 -0
  34. package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.js +68 -0
  35. package/dist/components/InfiniteScrollPaginator/hooks/useCursorPaginator.d.ts +18 -0
  36. package/dist/components/InfiniteScrollPaginator/hooks/useCursorPaginator.js +41 -0
  37. package/dist/components/Message/MessageSimple.js +5 -1
  38. package/dist/components/Message/QuotedMessage.js +8 -4
  39. package/dist/components/Message/hooks/useUserRole.js +3 -2
  40. package/dist/components/Message/index.d.ts +1 -0
  41. package/dist/components/MessageInput/AttachmentSelector.d.ts +25 -0
  42. package/dist/components/MessageInput/AttachmentSelector.js +125 -0
  43. package/dist/components/MessageInput/EditMessageForm.js +1 -1
  44. package/dist/components/MessageInput/MessageInput.d.ts +2 -0
  45. package/dist/components/MessageInput/MessageInput.js +9 -4
  46. package/dist/components/MessageInput/MessageInputFlat.js +4 -10
  47. package/dist/components/MessageInput/QuotedMessagePreview.js +7 -3
  48. package/dist/components/MessageInput/hooks/useCreateMessageInputContext.js +3 -1
  49. package/dist/components/MessageInput/hooks/useSubmitHandler.js +4 -1
  50. package/dist/components/MessageInput/index.d.ts +1 -0
  51. package/dist/components/MessageInput/index.js +1 -0
  52. package/dist/components/Modal/ModalHeader.d.ts +8 -0
  53. package/dist/components/Modal/ModalHeader.js +6 -0
  54. package/dist/components/Poll/Poll.d.ts +7 -0
  55. package/dist/components/Poll/Poll.js +8 -0
  56. package/dist/components/Poll/PollActions/AddCommentForm.d.ts +7 -0
  57. package/dist/components/Poll/PollActions/AddCommentForm.js +24 -0
  58. package/dist/components/Poll/PollActions/EndPollDialog.d.ts +6 -0
  59. package/dist/components/Poll/PollActions/EndPollDialog.js +19 -0
  60. package/dist/components/Poll/PollActions/PollAction.d.ts +9 -0
  61. package/dist/components/Poll/PollActions/PollAction.js +5 -0
  62. package/dist/components/Poll/PollActions/PollActions.d.ts +17 -0
  63. package/dist/components/Poll/PollActions/PollActions.js +46 -0
  64. package/dist/components/Poll/PollActions/PollAnswerList.d.ts +7 -0
  65. package/dist/components/Poll/PollActions/PollAnswerList.js +28 -0
  66. package/dist/components/Poll/PollActions/PollOptionsFullList.d.ts +6 -0
  67. package/dist/components/Poll/PollActions/PollOptionsFullList.js +16 -0
  68. package/dist/components/Poll/PollActions/PollResults/PollOptionVotesList.d.ts +7 -0
  69. package/dist/components/Poll/PollActions/PollResults/PollOptionVotesList.js +18 -0
  70. package/dist/components/Poll/PollActions/PollResults/PollOptionWithLatestVotes.d.ts +9 -0
  71. package/dist/components/Poll/PollActions/PollResults/PollOptionWithLatestVotes.js +19 -0
  72. package/dist/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.d.ts +11 -0
  73. package/dist/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.js +18 -0
  74. package/dist/components/Poll/PollActions/PollResults/PollResults.d.ts +6 -0
  75. package/dist/components/Poll/PollActions/PollResults/PollResults.js +33 -0
  76. package/dist/components/Poll/PollActions/PollResults/index.d.ts +1 -0
  77. package/dist/components/Poll/PollActions/PollResults/index.js +1 -0
  78. package/dist/components/Poll/PollActions/SuggestPollOptionForm.d.ts +7 -0
  79. package/dist/components/Poll/PollActions/SuggestPollOptionForm.js +37 -0
  80. package/dist/components/Poll/PollActions/index.d.ts +7 -0
  81. package/dist/components/Poll/PollActions/index.js +7 -0
  82. package/dist/components/Poll/PollContent.d.ts +3 -0
  83. package/dist/components/Poll/PollContent.js +18 -0
  84. package/dist/components/Poll/PollCreationDialog/OptionFieldSet.d.ts +9 -0
  85. package/dist/components/Poll/PollCreationDialog/OptionFieldSet.js +70 -0
  86. package/dist/components/Poll/PollCreationDialog/PollCreationDialog.d.ts +5 -0
  87. package/dist/components/Poll/PollCreationDialog/PollCreationDialog.js +87 -0
  88. package/dist/components/Poll/PollCreationDialog/PollCreationDialogControls.d.ts +8 -0
  89. package/dist/components/Poll/PollCreationDialog/PollCreationDialogControls.js +44 -0
  90. package/dist/components/Poll/PollCreationDialog/index.d.ts +1 -0
  91. package/dist/components/Poll/PollCreationDialog/index.js +1 -0
  92. package/dist/components/Poll/PollCreationDialog/types.d.ts +21 -0
  93. package/dist/components/Poll/PollCreationDialog/types.js +1 -0
  94. package/dist/components/Poll/PollHeader.d.ts +3 -0
  95. package/dist/components/Poll/PollHeader.js +31 -0
  96. package/dist/components/Poll/PollOptionList.d.ts +6 -0
  97. package/dist/components/Poll/PollOptionList.js +14 -0
  98. package/dist/components/Poll/PollOptionSelector.d.ts +19 -0
  99. package/dist/components/Poll/PollOptionSelector.js +53 -0
  100. package/dist/components/Poll/PollVote.d.ts +12 -0
  101. package/dist/components/Poll/PollVote.js +31 -0
  102. package/dist/components/Poll/QuotedPoll.d.ts +3 -0
  103. package/dist/components/Poll/QuotedPoll.js +17 -0
  104. package/dist/components/Poll/constants.d.ts +3 -0
  105. package/dist/components/Poll/constants.js +3 -0
  106. package/dist/components/Poll/hooks/index.d.ts +2 -0
  107. package/dist/components/Poll/hooks/index.js +2 -0
  108. package/dist/components/Poll/hooks/useManagePollVotesRealtime.d.ts +4 -0
  109. package/dist/components/Poll/hooks/useManagePollVotesRealtime.js +36 -0
  110. package/dist/components/Poll/hooks/usePollAnswerPagination.d.ts +13 -0
  111. package/dist/components/Poll/hooks/usePollAnswerPagination.js +27 -0
  112. package/dist/components/Poll/hooks/usePollOptionVotesPagination.d.ts +13 -0
  113. package/dist/components/Poll/hooks/usePollOptionVotesPagination.js +27 -0
  114. package/dist/components/Poll/index.d.ts +10 -0
  115. package/dist/components/Poll/index.js +10 -0
  116. package/dist/components/Portal/Portal.d.ts +6 -0
  117. package/dist/components/Portal/Portal.js +14 -0
  118. package/dist/components/ReactFileUtilities/UploadButton.d.ts +11 -1
  119. package/dist/components/ReactFileUtilities/UploadButton.js +22 -4
  120. package/dist/components/Thread/Thread.js +1 -1
  121. package/dist/components/index.d.ts +2 -0
  122. package/dist/components/index.js +1 -0
  123. package/dist/context/AttachmentSelectorContext.d.ts +8 -0
  124. package/dist/context/AttachmentSelectorContext.js +6 -0
  125. package/dist/context/ComponentContext.d.ts +21 -5
  126. package/dist/context/PollContext.d.ts +11 -0
  127. package/dist/context/PollContext.js +7 -0
  128. package/dist/context/index.d.ts +1 -0
  129. package/dist/context/index.js +1 -0
  130. package/dist/css/v2/index.css +2 -2
  131. package/dist/css/v2/index.layout.css +2 -2
  132. package/dist/experimental/index.browser.cjs +129 -117
  133. package/dist/experimental/index.browser.cjs.map +4 -4
  134. package/dist/experimental/index.node.cjs +129 -117
  135. package/dist/experimental/index.node.cjs.map +4 -4
  136. package/dist/i18n/Streami18n.d.ts +45 -0
  137. package/dist/i18n/de.json +70 -25
  138. package/dist/i18n/en.json +46 -1
  139. package/dist/i18n/es.json +74 -25
  140. package/dist/i18n/fr.json +83 -34
  141. package/dist/i18n/hi.json +54 -9
  142. package/dist/i18n/it.json +75 -26
  143. package/dist/i18n/ja.json +46 -5
  144. package/dist/i18n/ko.json +46 -5
  145. package/dist/i18n/nl.json +59 -14
  146. package/dist/i18n/pt.json +66 -17
  147. package/dist/i18n/ru.json +66 -13
  148. package/dist/i18n/tr.json +77 -32
  149. package/dist/index.browser.cjs +4232 -1860
  150. package/dist/index.browser.cjs.map +4 -4
  151. package/dist/index.node.cjs +4172 -1773
  152. package/dist/index.node.cjs.map +4 -4
  153. package/dist/scss/v2/AttachmentPreviewList/AttachmentPreviewList-layout.scss +2 -2
  154. package/dist/scss/v2/AudioRecorder/AudioRecorder-layout.scss +64 -14
  155. package/dist/scss/v2/AudioRecorder/AudioRecorder-theme.scss +11 -1
  156. package/dist/scss/v2/Avatar/Avatar-layout.scss +4 -0
  157. package/dist/scss/v2/ChannelList/ChannelList-layout.scss +15 -0
  158. package/dist/scss/v2/Dialog/Dialog-layout.scss +54 -0
  159. package/dist/scss/v2/Dialog/Dialog-theme.scss +103 -0
  160. package/dist/scss/v2/DragAndDropContainer/DragAmdDropContainer-layout.scss +5 -0
  161. package/dist/scss/v2/DragAndDropContainer/DragAndDropContainer-theme.scss +47 -0
  162. package/dist/scss/v2/Form/Form-layout.scss +9 -0
  163. package/dist/scss/v2/Form/Form-theme.scss +17 -0
  164. package/dist/scss/v2/Icon/Icon-layout.scss +6 -1
  165. package/dist/scss/v2/InfiniteScrollPaginator/InfiniteScrollPaginator-layout.scss +4 -0
  166. package/dist/scss/v2/MessageActionsBox/MessageActionsBox-layout.scss +0 -9
  167. package/dist/scss/v2/MessageInput/MessageInput-layout.scss +29 -4
  168. package/dist/scss/v2/MessageInput/MessageInput-theme.scss +61 -0
  169. package/dist/scss/v2/Modal/Modal-layout.scss +31 -0
  170. package/dist/scss/v2/Modal/Modal-theme.scss +6 -0
  171. package/dist/scss/v2/Notification/MessageNotification-layout.scss +1 -1
  172. package/dist/scss/v2/Poll/Poll-layout.scss +488 -0
  173. package/dist/scss/v2/Poll/Poll-theme.scss +206 -0
  174. package/dist/scss/v2/_base.scss +4 -0
  175. package/dist/scss/v2/_global-theme-variables.scss +1 -1
  176. package/dist/scss/v2/_icons.scss +7 -0
  177. package/dist/scss/v2/index.layout.scss +4 -0
  178. package/dist/scss/v2/index.scss +4 -0
  179. package/dist/types/types.d.ts +6 -0
  180. package/dist/utils/getChannel.js +7 -3
  181. package/package.json +4 -4
@@ -72,5 +72,5 @@ const ThreadInner = (props) => {
72
72
  return (React.createElement("div", { className: threadClass },
73
73
  React.createElement(ThreadHeader, { closeThread: closeThread, thread: messageAsThread }),
74
74
  React.createElement(ThreadMessageList, { disableDateSeparator: !enableDateSeparator, head: head, Message: MessageUIComponent, messageActions: messageActions, suppressAutoscroll: threadSuppressAutoscroll, threadList: true, ...threadProps, ...(virtualized ? additionalVirtualizedMessageListProps : additionalMessageListProps) }),
75
- React.createElement(MessageInput, { focus: autoFocus, Input: ThreadInput, parent: thread ?? parentMessage, publishTypingEvent: false, ...additionalMessageInputProps })));
75
+ React.createElement(MessageInput, { focus: autoFocus, Input: ThreadInput, isThreadInput: true, parent: thread ?? parentMessage, publishTypingEvent: false, ...additionalMessageInputProps })));
76
76
  };
@@ -21,10 +21,12 @@ export * from './LoadMore';
21
21
  export * from './MediaRecorder';
22
22
  export * from './Message';
23
23
  export * from './MessageActions';
24
+ export type { MessageBouncePromptProps } from './MessageBounce';
24
25
  export * from './MessageInput';
25
26
  export * from './MessageList';
26
27
  export * from './MML';
27
28
  export * from './Modal';
29
+ export * from './Poll';
28
30
  export * from './Reactions';
29
31
  export * from './SafeAnchor';
30
32
  export * from './Thread';
@@ -25,6 +25,7 @@ export * from './MessageInput';
25
25
  export * from './MessageList';
26
26
  export * from './MML';
27
27
  export * from './Modal';
28
+ export * from './Poll';
28
29
  export * from './Reactions';
29
30
  export * from './SafeAnchor';
30
31
  export * from './Thread';
@@ -0,0 +1,8 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ export type AttachmentSelectorContextValue = {
3
+ fileInput: HTMLInputElement | null;
4
+ };
5
+ export declare const AttachmentSelectorContextProvider: ({ children, value, }: PropsWithChildren<{
6
+ value: AttachmentSelectorContextValue;
7
+ }>) => React.JSX.Element;
8
+ export declare const useAttachmentSelectorContext: () => AttachmentSelectorContextValue;
@@ -0,0 +1,6 @@
1
+ import React, { createContext, useContext } from 'react';
2
+ const AttachmentSelectorContext = createContext({
3
+ fileInput: null,
4
+ });
5
+ export const AttachmentSelectorContextProvider = ({ children, value, }) => (React.createElement(AttachmentSelectorContext.Provider, { value: value }, children));
6
+ export const useAttachmentSelectorContext = () => useContext(AttachmentSelectorContext);
@@ -1,14 +1,15 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- import { BaseImageProps, CooldownTimerProps, CustomMessageActionsListProps, StartRecordingAudioButtonProps } from '../components';
3
- import type { AttachmentPreviewListProps, AttachmentProps, AvatarProps, DateSeparatorProps, EmojiSearchIndex, EmptyStateIndicatorProps, EventComponentProps, FixedHeightMessageProps, GiphyPreviewMessageProps, LinkPreviewListProps, LoadingIndicatorProps, MessageDeletedProps, MessageInputProps, MessageListNotificationsProps, MessageNotificationProps, MessageOptionsProps, MessageProps, MessageRepliesCountButtonProps, MessageStatusProps, MessageTimestampProps, MessageUIComponentProps, ModalGalleryProps, PinIndicatorProps, QuotedMessagePreviewProps, ReactionOptions, ReactionSelectorProps, ReactionsListProps, RecordingPermissionDeniedNotificationProps, SendButtonProps, SuggestionItemProps, SuggestionListProps, ThreadHeaderProps, ThreadListItemProps, ThreadListItemUIProps, TypingIndicatorProps, UnreadMessagesNotificationProps, UnreadMessagesSeparatorProps } from '../components';
4
- import type { MessageBouncePromptProps } from '../components/MessageBounce';
5
- import type { TimestampProps } from '../components/Message/Timestamp';
2
+ import { AttachmentPreviewListProps, AttachmentProps, AvatarProps, BaseImageProps, CooldownTimerProps, CustomMessageActionsListProps, DateSeparatorProps, EmojiSearchIndex, EmptyStateIndicatorProps, EventComponentProps, FixedHeightMessageProps, GiphyPreviewMessageProps, LinkPreviewListProps, LoadingIndicatorProps, MessageBouncePromptProps, MessageDeletedProps, MessageInputProps, MessageListNotificationsProps, MessageNotificationProps, MessageOptionsProps, MessageProps, MessageRepliesCountButtonProps, MessageStatusProps, MessageTimestampProps, MessageUIComponentProps, ModalGalleryProps, PinIndicatorProps, PollCreationDialogProps, PollOptionSelectorProps, QuotedMessagePreviewProps, ReactionOptions, ReactionSelectorProps, ReactionsListProps, RecordingPermissionDeniedNotificationProps, SendButtonProps, StartRecordingAudioButtonProps, SuggestionItemProps, SuggestionListProps, ThreadHeaderProps, ThreadListItemProps, ThreadListItemUIProps, TimestampProps, TypingIndicatorProps, UnreadMessagesNotificationProps, UnreadMessagesSeparatorProps } from '../components';
6
3
  import type { CustomTrigger, DefaultStreamChatGenerics, PropsWithChildrenOnly, UnknownType } from '../types/types';
7
4
  export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger> = {
8
5
  /** Custom UI component to display a message attachment, defaults to and accepts same props as: [Attachment](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Attachment.tsx) */
9
6
  Attachment?: React.ComponentType<AttachmentProps<StreamChatGenerics>>;
10
7
  /** Custom UI component to display an attachment previews in MessageInput, defaults to and accepts same props as: [Attachment](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/AttachmentPreviewList.tsx) */
11
8
  AttachmentPreviewList?: React.ComponentType<AttachmentPreviewListProps>;
9
+ /** Custom UI component to control adding attachments to MessageInput, defaults to and accepts same props as: [AttachmentSelector](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/AttachmentSelector.tsx) */
10
+ AttachmentSelector?: React.ComponentType;
11
+ /** Custom UI component for contents of attachment selector initiation button */
12
+ AttachmentSelectorInitiationButtonContents?: React.ComponentType;
12
13
  /** Custom UI component to display AudioRecorder in MessageInput, defaults to and accepts same props as: [AudioRecorder](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/AudioRecorder.tsx) */
13
14
  AudioRecorder?: React.ComponentType;
14
15
  /** Optional UI component to override the default suggestion Item component, defaults to and accepts same props as: [Item](https://github.com/GetStream/stream-chat-react/blob/master/src/components/AutoCompleteTextarea/Item.js) */
@@ -33,7 +34,10 @@ export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGe
33
34
  emojiSearchIndex?: EmojiSearchIndex;
34
35
  /** Custom UI component to be displayed when the `MessageList` is empty, defaults to and accepts same props as: [EmptyStateIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/EmptyStateIndicator/EmptyStateIndicator.tsx) */
35
36
  EmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>;
36
- /** Custom UI component for file upload icon, defaults to and accepts same props as: [FileUploadIcon](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/icons.tsx) */
37
+ /**
38
+ * Custom UI component for file upload icon, defaults to and accepts same props as: [FileUploadIcon](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/icons.tsx)
39
+ * @deprecated use AttachmentSelectorInitiationButtonContents prop instead
40
+ */
37
41
  FileUploadIcon?: React.ComponentType;
38
42
  /** Custom UI component to render a Giphy preview in the `VirtualizedMessageList` */
39
43
  GiphyPreviewMessage?: React.ComponentType<GiphyPreviewMessageProps<StreamChatGenerics>>;
@@ -76,10 +80,22 @@ export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGe
76
80
  ModalGallery?: React.ComponentType<ModalGalleryProps>;
77
81
  /** Custom UI component to override default pinned message indicator, defaults to and accepts same props as: [PinIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/icons.tsx) */
78
82
  PinIndicator?: React.ComponentType<PinIndicatorProps<StreamChatGenerics>>;
83
+ /** Custom UI component to override default poll actions rendering in a message, defaults to and accepts same props as: [PollActions](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollActions/PollActions.tsx) */
84
+ PollActions?: React.ComponentType;
85
+ /** Custom UI component to override default poll rendering in a message, defaults to and accepts same props as: [PollContent](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollContent.tsx) */
86
+ PollContent?: React.ComponentType;
87
+ /** Custom UI component to override default poll creation dialog contents, defaults to and accepts same props as: [PollCreationDialog](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollCreationDialog/PollCreationDialog.tsx) */
88
+ PollCreationDialog?: React.ComponentType<PollCreationDialogProps>;
89
+ /** Custom UI component to override default poll header in a message, defaults to and accepts same props as: [PollHeader](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollHeader.tsx) */
90
+ PollHeader?: React.ComponentType;
91
+ /** Custom UI component to override default poll option selector, defaults to and accepts same props as: [PollOptionSelector](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollOptionSelector.tsx) */
92
+ PollOptionSelector?: React.ComponentType<PollOptionSelectorProps<StreamChatGenerics>>;
79
93
  /** Custom UI component to override quoted message UI on a sent message, defaults to and accepts same props as: [QuotedMessage](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/QuotedMessage.tsx) */
80
94
  QuotedMessage?: React.ComponentType;
81
95
  /** Custom UI component to override the message input's quoted message preview, defaults to and accepts same props as: [QuotedMessagePreview](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/QuotedMessagePreview.tsx) */
82
96
  QuotedMessagePreview?: React.ComponentType<QuotedMessagePreviewProps<StreamChatGenerics>>;
97
+ /** Custom UI component to override the rendering of quoted poll, defaults to and accepts same props as: [QuotedPoll](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/QuotedPoll.tsx) */
98
+ QuotedPoll?: React.ComponentType;
83
99
  /** Custom reaction options to be applied to ReactionSelector, ReactionList and SimpleReactionList components */
84
100
  reactionOptions?: ReactionOptions;
85
101
  /** Custom UI component to display the reaction selector, defaults to and accepts same props as: [ReactionSelector](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Reactions/ReactionSelector.tsx) */
@@ -0,0 +1,11 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import type { Poll } from 'stream-chat';
3
+ import type { DefaultStreamChatGenerics } from '../types';
4
+ export type PollContextValue<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
5
+ poll: Poll<StreamChatGenerics>;
6
+ };
7
+ export declare const PollContext: React.Context<PollContextValue<DefaultStreamChatGenerics> | undefined>;
8
+ export declare const PollProvider: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ children, poll, }: PropsWithChildren<{
9
+ poll: Poll<StreamChatGenerics>;
10
+ }>) => React.JSX.Element | null;
11
+ export declare const usePollContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>() => PollContextValue<StreamChatGenerics>;
@@ -0,0 +1,7 @@
1
+ import React, { useContext } from 'react';
2
+ export const PollContext = React.createContext(undefined);
3
+ export const PollProvider = ({ children, poll, }) => poll ? (React.createElement(PollContext.Provider, { value: { poll } }, children)) : null;
4
+ export const usePollContext = () => {
5
+ const contextValue = useContext(PollContext);
6
+ return contextValue;
7
+ };
@@ -8,6 +8,7 @@ export * from './MessageContext';
8
8
  export * from './MessageBounceContext';
9
9
  export * from './MessageInputContext';
10
10
  export * from './MessageListContext';
11
+ export * from './PollContext';
11
12
  export * from './TranslationContext';
12
13
  export * from './TypingContext';
13
14
  export * from './WithComponents';
@@ -8,6 +8,7 @@ export * from './MessageContext';
8
8
  export * from './MessageBounceContext';
9
9
  export * from './MessageInputContext';
10
10
  export * from './MessageListContext';
11
+ export * from './PollContext';
11
12
  export * from './TranslationContext';
12
13
  export * from './TypingContext';
13
14
  export * from './WithComponents';