stream-chat-react 12.10.0 → 12.11.1
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/dist/components/Attachment/Attachment.js +2 -1
- package/dist/components/Attachment/AttachmentContainer.d.ts +1 -1
- package/dist/components/Attachment/AttachmentContainer.js +2 -2
- package/dist/components/Attachment/Card.js +3 -3
- package/dist/components/Attachment/VoiceRecording.d.ts +1 -1
- package/dist/components/Attachment/VoiceRecording.js +2 -2
- package/dist/components/Attachment/attachment-sizing.js +2 -1
- package/dist/components/Attachment/components/FileSizeIndicator.d.ts +1 -1
- package/dist/components/Attachment/components/FileSizeIndicator.js +1 -1
- package/dist/components/Attachment/hooks/useAudioController.js +3 -1
- package/dist/components/Attachment/utils.d.ts +1 -1
- package/dist/components/Attachment/utils.js +12 -3
- package/dist/components/AutoCompleteTextarea/List.js +3 -2
- package/dist/components/AutoCompleteTextarea/Textarea.js +3 -3
- package/dist/components/AutoCompleteTextarea/utils.js +2 -2
- package/dist/components/Avatar/ChannelAvatar.js +1 -1
- package/dist/components/Channel/Channel.d.ts +1 -1
- package/dist/components/Channel/Channel.js +27 -12
- package/dist/components/Channel/channelState.js +9 -3
- package/dist/components/Channel/hooks/useCreateChannelStateContext.js +5 -3
- package/dist/components/Channel/hooks/useMentionsHandlers.js +5 -2
- package/dist/components/Channel/utils.js +2 -1
- package/dist/components/ChannelHeader/ChannelHeader.js +1 -1
- package/dist/components/ChannelList/ChannelList.js +13 -8
- package/dist/components/ChannelList/hooks/useChannelListShape.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useChannelListShape.js +48 -20
- package/dist/components/ChannelList/hooks/useChannelUpdatedListener.js +2 -1
- package/dist/components/ChannelList/hooks/useMessageNewListener.js +3 -1
- package/dist/components/ChannelList/hooks/usePaginatedChannels.js +4 -2
- package/dist/components/ChannelList/hooks/useSelectedChannelState.js +1 -1
- package/dist/components/ChannelPreview/ChannelPreview.js +2 -2
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.js +1 -1
- package/dist/components/ChannelPreview/icons.js +0 -1
- package/dist/components/ChannelPreview/utils.js +3 -3
- package/dist/components/ChannelSearch/ChannelSearch.js +5 -3
- package/dist/components/ChannelSearch/SearchResults.js +1 -1
- package/dist/components/ChannelSearch/hooks/useChannelSearch.d.ts +4 -2
- package/dist/components/ChannelSearch/hooks/useChannelSearch.js +61 -36
- package/dist/components/ChannelSearch/index.d.ts +1 -1
- package/dist/components/Chat/hooks/useChat.js +4 -2
- package/dist/components/Chat/hooks/useCreateChatClient.js +3 -1
- package/dist/components/ChatAutoComplete/ChatAutoComplete.js +1 -1
- package/dist/components/ChatView/ChatView.js +0 -1
- package/dist/components/Dialog/PromptDialog.d.ts +1 -1
- package/dist/components/Dialog/PromptDialog.js +1 -1
- package/dist/components/EventComponent/EventComponent.js +1 -1
- package/dist/components/Gallery/Image.js +1 -1
- package/dist/components/Gallery/ModalGallery.js +1 -2
- package/dist/components/InfiniteScrollPaginator/InfiniteScroll.js +5 -2
- package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.js +1 -1
- package/dist/components/LoadMore/LoadMorePaginator.js +1 -1
- package/dist/components/MML/MML.js +1 -0
- package/dist/components/MediaRecorder/transcode/wav.js +6 -3
- package/dist/components/Message/FixedHeightMessage.js +6 -8
- package/dist/components/Message/Message.js +2 -1
- package/dist/components/Message/MessageEditedTimestamp.js +1 -1
- package/dist/components/Message/MessageSimple.js +2 -5
- package/dist/components/Message/MessageStatus.js +1 -1
- package/dist/components/Message/MessageText.js +7 -7
- package/dist/components/Message/QuotedMessage.js +2 -2
- package/dist/components/Message/Timestamp.js +9 -1
- package/dist/components/Message/hooks/useActionHandler.js +1 -1
- package/dist/components/Message/hooks/useFlagHandler.js +2 -1
- package/dist/components/Message/hooks/useMarkUnreadHandler.js +2 -1
- package/dist/components/Message/hooks/useMessageTextStreaming.d.ts +1 -1
- package/dist/components/Message/hooks/useMessageTextStreaming.js +1 -1
- package/dist/components/Message/hooks/useMuteHandler.js +7 -4
- package/dist/components/Message/hooks/usePinHandler.js +1 -1
- package/dist/components/Message/hooks/useReactionHandler.js +10 -5
- package/dist/components/Message/hooks/useRetryHandler.js +1 -1
- package/dist/components/Message/hooks/useUserRole.js +1 -1
- package/dist/components/Message/renderText/renderText.js +2 -2
- package/dist/components/Message/utils.js +3 -3
- package/dist/components/MessageActions/MessageActionsBox.js +7 -3
- package/dist/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.js +1 -1
- package/dist/components/MessageInput/AttachmentPreviewList/FileAttachmentPreview.js +4 -2
- package/dist/components/MessageInput/AttachmentPreviewList/UnsupportedAttachmentPreview.js +4 -2
- package/dist/components/MessageInput/AttachmentSelector.js +1 -1
- package/dist/components/MessageInput/DefaultTriggerProvider.js +1 -1
- package/dist/components/MessageInput/DropzoneProvider.js +1 -1
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/MessageInputFlat.js +4 -3
- package/dist/components/MessageInput/QuotedMessagePreview.js +1 -1
- package/dist/components/MessageInput/hooks/useAttachments.js +12 -4
- package/dist/components/MessageInput/hooks/useLinkPreviews.js +3 -1
- package/dist/components/MessageInput/hooks/useMessageInputState.js +4 -3
- package/dist/components/MessageInput/hooks/useMessageInputText.js +3 -1
- package/dist/components/MessageInput/hooks/useSubmitHandler.js +5 -3
- package/dist/components/MessageInput/hooks/useUserTrigger.js +2 -2
- package/dist/components/MessageInput/hooks/utils.js +6 -2
- package/dist/components/MessageList/ConnectionStatus.js +1 -1
- package/dist/components/MessageList/MessageList.js +5 -5
- package/dist/components/MessageList/MessageListNotifications.js +3 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +17 -10
- package/dist/components/MessageList/VirtualizedMessageListComponents.js +2 -2
- package/dist/components/MessageList/hooks/MessageList/useMessageListElements.js +1 -3
- package/dist/components/MessageList/hooks/MessageList/useMessageListScrollManager.js +2 -1
- package/dist/components/MessageList/hooks/MessageList/useScrollLocationLogic.js +3 -2
- package/dist/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.js +6 -2
- package/dist/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.js +2 -1
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.js +7 -3
- package/dist/components/MessageList/utils.js +28 -11
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/ModalHeader.js +1 -1
- package/dist/components/Poll/Poll.js +1 -1
- package/dist/components/Poll/PollActions/PollActions.js +6 -4
- package/dist/components/Poll/PollActions/PollAnswerList.js +1 -1
- package/dist/components/Poll/PollActions/PollResults/PollOptionVotesList.js +1 -1
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithLatestVotes.js +4 -2
- package/dist/components/Poll/PollActions/PollResults/PollResults.js +2 -1
- package/dist/components/Poll/PollContent.js +1 -1
- package/dist/components/Poll/PollCreationDialog/OptionFieldSet.d.ts +1 -1
- package/dist/components/Poll/PollCreationDialog/OptionFieldSet.js +11 -4
- package/dist/components/Poll/PollCreationDialog/PollCreationDialog.js +13 -4
- package/dist/components/Poll/PollCreationDialog/PollCreationDialogControls.js +6 -3
- package/dist/components/Poll/PollOptionList.js +1 -1
- package/dist/components/Poll/PollOptionSelector.js +12 -5
- package/dist/components/Poll/hooks/useManagePollVotesRealtime.js +9 -4
- package/dist/components/Poll/hooks/usePollAnswerPagination.js +8 -2
- package/dist/components/Poll/hooks/usePollOptionVotesPagination.js +8 -2
- package/dist/components/ReactFileUtilities/FileIcon/mimeTypes.d.ts +1 -1
- package/dist/components/ReactFileUtilities/ImageDropzone.js +3 -1
- package/dist/components/ReactFileUtilities/UploadButton.js +1 -1
- package/dist/components/ReactFileUtilities/utils.js +3 -1
- package/dist/components/Reactions/ReactionSelector.js +3 -1
- package/dist/components/Reactions/ReactionSelectorWithButton.js +1 -1
- package/dist/components/Reactions/ReactionsList.d.ts +2 -2
- package/dist/components/Reactions/ReactionsList.js +7 -4
- package/dist/components/Reactions/ReactionsListModal.d.ts +1 -2
- package/dist/components/Reactions/ReactionsListModal.js +1 -1
- package/dist/components/Reactions/SpriteImage.js +6 -2
- package/dist/components/Reactions/hooks/useFetchReactions.js +1 -1
- package/dist/components/Reactions/hooks/useProcessReactions.js +1 -1
- package/dist/components/Reactions/index.d.ts +1 -0
- package/dist/components/Reactions/index.js +1 -0
- package/dist/components/Reactions/reactionOptions.js +20 -5
- package/dist/components/Thread/Thread.js +4 -3
- package/dist/components/Threads/ThreadContext.d.ts +1 -1
- package/dist/components/Threads/ThreadContext.js +1 -1
- package/dist/components/Threads/ThreadList/ThreadList.js +1 -1
- package/dist/components/Threads/ThreadList/ThreadListItem.d.ts +1 -1
- package/dist/components/Threads/ThreadList/ThreadListItem.js +1 -1
- package/dist/components/Threads/ThreadList/ThreadListItemUI.js +5 -3
- package/dist/components/Threads/icons.js +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/context/ComponentContext.d.ts +3 -1
- package/dist/context/ComponentContext.js +1 -1
- package/dist/context/DialogManagerContext.d.ts +1 -1
- package/dist/context/DialogManagerContext.js +1 -1
- package/dist/context/MessageBounceContext.js +2 -2
- package/dist/context/MessageContext.js +1 -1
- package/dist/context/WithComponents.js +1 -1
- package/dist/css/v2/index.css +2 -2
- package/dist/css/v2/index.layout.css +2 -2
- package/dist/experimental/MessageActions/MessageActions.js +0 -1
- package/dist/experimental/MessageActions/defaults.js +31 -7
- package/dist/experimental/index.browser.cjs +103 -37
- package/dist/experimental/index.browser.cjs.map +2 -2
- package/dist/experimental/index.node.cjs +103 -37
- package/dist/experimental/index.node.cjs.map +2 -2
- package/dist/i18n/Streami18n.js +11 -2
- package/dist/i18n/utils.js +14 -1
- package/dist/index.browser.cjs +1774 -982
- package/dist/index.browser.cjs.map +4 -4
- package/dist/index.node.cjs +1775 -982
- package/dist/index.node.cjs.map +4 -4
- package/dist/plugins/Emojis/EmojiPicker.js +0 -1
- package/dist/plugins/Emojis/index.browser.cjs +3 -1
- package/dist/plugins/Emojis/index.browser.cjs.map +2 -2
- package/dist/plugins/Emojis/index.node.cjs +3 -1
- package/dist/plugins/Emojis/index.node.cjs.map +2 -2
- package/dist/plugins/encoders/mp3.browser.cjs +7 -4
- package/dist/plugins/encoders/mp3.browser.cjs.map +2 -2
- package/dist/plugins/encoders/mp3.node.cjs +7 -4
- package/dist/plugins/encoders/mp3.node.cjs.map +2 -2
- package/dist/scss/v2/ChannelSearch/ChannelSearch-layout.scss +1 -0
- package/dist/scss/v2/Message/Message-layout.scss +12 -5
- package/dist/scss/v2/Poll/Poll-layout.scss +1 -1
- package/dist/scss/v2/Search/Search-layout.scss +148 -0
- package/dist/scss/v2/Search/Search-theme.scss +222 -0
- package/dist/scss/v2/_icons.scss +2 -0
- package/dist/scss/v2/index.layout.scss +1 -0
- package/dist/scss/v2/index.scss +1 -0
- package/dist/store/hooks/useStateStore.js +35 -11
- package/package.json +21 -33
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
@use '../utils';
|
|
2
|
+
|
|
3
|
+
/* Only available in React SDK. */
|
|
4
|
+
.str-chat {
|
|
5
|
+
/* The text/icon color of the component */
|
|
6
|
+
--str-chat__search-input-color: var(--str-chat__text-color);
|
|
7
|
+
|
|
8
|
+
/* The text/icon color of the component */
|
|
9
|
+
--str-chat__search-input-placeholder-color: var(--str-chat__text-low-emphasis-color);
|
|
10
|
+
|
|
11
|
+
/* The text/icon color of the component */
|
|
12
|
+
--str-chat__search-input-icon-color: var(--str-chat__text-low-emphasis-color);
|
|
13
|
+
|
|
14
|
+
/* Top border of the component */
|
|
15
|
+
--str-chat__search-input-border-block-start: none;
|
|
16
|
+
|
|
17
|
+
/* Bottom border of the component */
|
|
18
|
+
--str-chat__search-input-border-block-end: none;
|
|
19
|
+
|
|
20
|
+
/* Left (right in RTL layout) borhe component */
|
|
21
|
+
--str-chat__search-input-border-inline-start: none;
|
|
22
|
+
|
|
23
|
+
/* Right (left in RTL layout) borhe component */
|
|
24
|
+
--str-chat__search-input-border-inline-end: none;
|
|
25
|
+
|
|
26
|
+
/* The border radius used for the borders of the component */
|
|
27
|
+
--str-chat__search-input-wrapper-border-radius: var(--str-chat__border-radius-circle);
|
|
28
|
+
|
|
29
|
+
/* The background color of the component */
|
|
30
|
+
--str-chat__search-input-wrapper-background-color: transparent;
|
|
31
|
+
|
|
32
|
+
/* Top border of the component */
|
|
33
|
+
--str-chat__search-input-wrapper-border-block-start: var(--str-chat__surface-color) 1px
|
|
34
|
+
solid;
|
|
35
|
+
|
|
36
|
+
/* Bottom border of the component */
|
|
37
|
+
--str-chat__search-input-wrapper-border-block-end: var(--str-chat__surface-color) 1px
|
|
38
|
+
solid;
|
|
39
|
+
|
|
40
|
+
/* Left (right in RTL layout) border of the component */
|
|
41
|
+
--str-chat__search-input-wrapper-border-inline-start: var(--str-chat__surface-color) 1px
|
|
42
|
+
solid;
|
|
43
|
+
|
|
44
|
+
/* Right (left in RTL layout) border of the component */
|
|
45
|
+
--str-chat__search-input-wrapper-border-inline-end: var(--str-chat__surface-color) 1px
|
|
46
|
+
solid;
|
|
47
|
+
|
|
48
|
+
/* The border radius used for the borders of the component */
|
|
49
|
+
--str-chat__search-input-wrapper-active-border-radius: var(--str-chat__border-radius-circle);
|
|
50
|
+
|
|
51
|
+
/* The background color of the component */
|
|
52
|
+
--str-chat__search-input-wrapper-active-background-color: transparent;
|
|
53
|
+
|
|
54
|
+
/* Top border of the component */
|
|
55
|
+
--str-chat__search-input-wrapper-active-border-block-start: var(--str-chat__primary-color)
|
|
56
|
+
1px solid;
|
|
57
|
+
|
|
58
|
+
/* Bottom border of the component */
|
|
59
|
+
--str-chat__search-input-wrapper-active-border-block-end: var(--str-chat__primary-color)
|
|
60
|
+
1px solid;
|
|
61
|
+
|
|
62
|
+
/* Left (right in RTL layout) border of the component */
|
|
63
|
+
--str-chat__search-input-wrapper-active-border-inline-start: var(
|
|
64
|
+
--str-chat__primary-color
|
|
65
|
+
)
|
|
66
|
+
1px solid;
|
|
67
|
+
|
|
68
|
+
/* Right (left in RTL layout) border of the component */
|
|
69
|
+
--str-chat__search-input-wrapper-active-border-inline-end: var(--str-chat__primary-color)
|
|
70
|
+
1px solid;
|
|
71
|
+
|
|
72
|
+
/* The background applied to channel search result */
|
|
73
|
+
--str-chat__search-result-background-color: transparent;
|
|
74
|
+
|
|
75
|
+
/* Top border of the component */
|
|
76
|
+
--str-chat__search-result-border-block-start: none;
|
|
77
|
+
|
|
78
|
+
/* Bottom border of the component */
|
|
79
|
+
--str-chat__search-result-border-block-end: none;
|
|
80
|
+
|
|
81
|
+
/* Left (right in RTL layout) border of the component */
|
|
82
|
+
--str-chat__search-result-border-inline-start: none;
|
|
83
|
+
|
|
84
|
+
/* Right (left in RTL layout) border of the component */
|
|
85
|
+
--str-chat__search-result-border-inline-end: none;
|
|
86
|
+
|
|
87
|
+
/* Background color used for the search result hover / focused state */
|
|
88
|
+
--str-chat__search-result-hover-background-color: var(
|
|
89
|
+
--str-chat__secondary-surface-color
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
--str-chat__search-result-list-color: var(--str-chat__text-color);
|
|
93
|
+
|
|
94
|
+
--str-chat__search-result-list-background-color: var(--str-chat__secondary-background-color);
|
|
95
|
+
|
|
96
|
+
/* Top border of the component */
|
|
97
|
+
--str-chat__search-result-list-border-block-start: none;
|
|
98
|
+
|
|
99
|
+
/* Bottom border of the component */
|
|
100
|
+
--str-chat__search-result-list-border-block-end: none;
|
|
101
|
+
|
|
102
|
+
/* Left (right in RTL layout) border of the component */
|
|
103
|
+
--str-chat__search-result-list-border-inline-start: none;
|
|
104
|
+
|
|
105
|
+
/* Right (left in RTL layout) border of the component */
|
|
106
|
+
--str-chat__search-result-list-border-inline-end: none;
|
|
107
|
+
|
|
108
|
+
/* Box shadow applied to the component */
|
|
109
|
+
--str-chat__search-result-list-popup-box-shadow: 0 4px 4px var(--str-chat__box-shadow-color);
|
|
110
|
+
|
|
111
|
+
/* The font color used in the search results header */
|
|
112
|
+
--str-chat__search-results-header-color: var(--str-chat__text-low-emphasis-color);
|
|
113
|
+
|
|
114
|
+
/* The background color used in the search results header */
|
|
115
|
+
--str-chat__search-results-header-background-color: var(--str-chat__background-color);
|
|
116
|
+
|
|
117
|
+
/* Top border of the component */
|
|
118
|
+
--str-chat__search-results-header-border-block-start: none;
|
|
119
|
+
|
|
120
|
+
/* Bottom border of the component */
|
|
121
|
+
--str-chat__search-results-header-border-block-end: var(--str-chat__surface-color) 1px
|
|
122
|
+
solid;
|
|
123
|
+
|
|
124
|
+
/* Left (right in RTL layout) border of the component */
|
|
125
|
+
--str-chat__search-results-header-border-inline-start: none;
|
|
126
|
+
|
|
127
|
+
/* Right (left in RTL layout) border of the component */
|
|
128
|
+
--str-chat__search-results-header-border-inline-end: none;
|
|
129
|
+
|
|
130
|
+
/* The font color used in the empty search results indicator */
|
|
131
|
+
--str-chat__search-results-empty-color: var(--str-chat__text-low-emphasis-color);
|
|
132
|
+
|
|
133
|
+
/* The icon color used in the empty search results indicator */
|
|
134
|
+
--str-chat__search-results-empty-icon-color: var(--str-chat__disabled-color);
|
|
135
|
+
|
|
136
|
+
/* The background color used in the empty search results indicator */
|
|
137
|
+
--str-chat__search-results-empty-background-color: var(--str-chat__background-color);
|
|
138
|
+
|
|
139
|
+
/* Top border of the component */
|
|
140
|
+
--str-chat__search-results-empty-border-block-start: none;
|
|
141
|
+
|
|
142
|
+
/* Bottom border of the component */
|
|
143
|
+
--str-chat__search-results-empty-border-block-end: none;
|
|
144
|
+
|
|
145
|
+
/* Left (right in RTL layout) border of the component */
|
|
146
|
+
--str-chat__search-results-empty-border-inline-start: none;
|
|
147
|
+
|
|
148
|
+
/* Right (left in RTL layout) border of the component */
|
|
149
|
+
--str-chat__search-results-empty-border-inline-end: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.str-chat__search-input--wrapper {
|
|
153
|
+
@include utils.component-layer-overrides('search-input-wrapper');
|
|
154
|
+
|
|
155
|
+
.str-chat__search-input--icon {
|
|
156
|
+
background-image: var(--str-chat__magnifier-glass-icon);
|
|
157
|
+
background-repeat: no-repeat;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
input {
|
|
161
|
+
@include utils.component-layer-overrides('search-input');
|
|
162
|
+
outline: none;
|
|
163
|
+
font: var(--str-chat__subtitle-text);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.str-chat__search-input--clear-button-icon {
|
|
167
|
+
background-color: transparent;
|
|
168
|
+
-webkit-mask: var(--str-chat__clear-icon) no-repeat center / contain;
|
|
169
|
+
mask: var(--str-chat__clear-icon) no-repeat center / contain;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.str-chat__search-input--wrapper-active {
|
|
174
|
+
@include utils.component-layer-overrides('search-input-wrapper-active');
|
|
175
|
+
|
|
176
|
+
.str-chat__search-input--clear-button-icon {
|
|
177
|
+
background-color: var(--str-chat__text-low-emphasis-color);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.str-chat__search-bar-button--exit-search {
|
|
182
|
+
@include utils.button-reset();
|
|
183
|
+
color: var(--str-chat__primary-color);
|
|
184
|
+
font: var(--str-chat__subtitle-text);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.str-chat__search-results-header {
|
|
188
|
+
@include utils.component-layer-overrides('search-results-header');
|
|
189
|
+
font: var(--str-chat__subtitle-text);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.str-chat__search-source-result-list {
|
|
193
|
+
@include utils.component-layer-overrides('search-result-list');
|
|
194
|
+
|
|
195
|
+
.str-chat__search-container-empty {
|
|
196
|
+
@include utils.component-layer-overrides('search-results-empty');
|
|
197
|
+
font: var(--str-chat__subtitle2-medium-text);
|
|
198
|
+
|
|
199
|
+
svg path {
|
|
200
|
+
fill: var(--str-chat__search-results-empty-icon-color);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.str-chat__search-result {
|
|
205
|
+
@include utils.component-layer-overrides('search-result');
|
|
206
|
+
|
|
207
|
+
&.str-chat__channel-preview-messenger--active {
|
|
208
|
+
background-color: var(--str-chat__channel-preview-active-background-color);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.str-chat__search-result--display-name {
|
|
212
|
+
@include utils.channel-preview-display-name-theme;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
.str-chat__search-result:hover,
|
|
219
|
+
.str-chat__search-result--focused {
|
|
220
|
+
background-color: var(--str-chat__search-result-hover-background-color);
|
|
221
|
+
}
|
|
222
|
+
}
|
package/dist/scss/v2/_icons.scss
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
--str-chat__poll-icon: url('data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTggMTgiIGZpbGw9ImN1cnJlbnRDb2xvciIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xNiAwSDJDMC45IDAgMCAwLjkgMCAyVjE2QzAgMTcuMSAwLjkgMTggMiAxOEgxNkMxNy4xIDE4IDE4IDE3LjEgMTggMTZWMkMxOCAwLjkgMTcuMSAwIDE2IDBaTTE2IDE2SDJWMkgxNlYxNlpNNCA3SDZWMTRINFY3Wk04IDRIMTBWMTRIOFY0Wk0xMiAxMEgxNFYxNEgxMlYxMFoiLz4KPC9zdmc+');
|
|
11
11
|
--str-chat__handle-icon: url('data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTYgNiIgZmlsbD0iY3VycmVuQ29sb3IiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8cGF0aCBkPSJNMTYgMEgwVjJIMTZWMFpNMCA2SDE2VjRIMFY2WiIvPgo8L3N2Zz4K');
|
|
12
12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IDUuNTgxNzIgMTggMTAgMThDMTQuNDE4MyAxOCAxOCAxNC40MTgzIDE4IDEwQzE4IDUuNTgxNzIgMTQuNDE4MyAyIDEwIDJaTTEzLjUzNTggNi40NjQ0NkMxMy4xNDUzIDYuMDczOTQgMTIuNTEyMSA2LjA3Mzk0IDEyLjEyMTYgNi40NjQ0NkwxMC4wMDAzIDguNTg1NzhMNy44Nzg5OCA2LjQ2NDQ2QzcuNDg4NDYgNi4wNzM5NCA2Ljg1NTI5IDYuMDczOTQgNi40NjQ3NyA2LjQ2NDQ2QzYuMDc0MjQgNi44NTQ5OSA2LjA3NDI0IDcuNDg4MTUgNi40NjQ3NyA3Ljg3ODY4TDguNTg2MDkgMTBMNi40NjQ3NyAxMi4xMjEzQzYuMDc0MjQgMTIuNTExOCA2LjA3NDI0IDEzLjE0NSA2LjQ2NDc3IDEzLjUzNTVDNi44NTUyOSAxMy45MjYxIDcuNDg4NDYgMTMuOTI2MSA3Ljg3ODk4IDEzLjUzNTVMMTAuMDAwMyAxMS40MTQyTDEyLjEyMTYgMTMuNTM1NUMxMi41MTIxIDEzLjkyNjEgMTMuMTQ1MyAxMy45MjYxIDEzLjUzNTggMTMuNTM1NUMxMy45MjY0IDEzLjE0NSAxMy45MjY0IDEyLjUxMTggMTMuNTM1OCAxMi4xMjEzTDExLjQxNDUgMTBMMTMuNTM1OCA3Ljg3ODY4QzEzLjkyNjQgNy40ODgxNSAxMy45MjY0IDYuODU0OTkgMTMuNTM1OCA2LjQ2NDQ2WiIvPgo8L3N2Zz4K');
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
@font-face {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
@use 'Notification/NotificationList-layout';
|
|
38
38
|
@use 'Notification/Notification-layout';
|
|
39
39
|
@use 'Poll/Poll-layout';
|
|
40
|
+
@use 'Search/Search-layout';
|
|
40
41
|
@use 'Thread/Thread-layout';
|
|
41
42
|
@use 'Tooltip/Tooltip-layout';
|
|
42
43
|
@use 'TypingIndicator/TypingIndicator-layout';
|
package/dist/scss/v2/index.scss
CHANGED
|
@@ -1,15 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useCallback, useMemo } from 'react';
|
|
2
|
+
import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
4
|
+
const noop = () => { };
|
|
2
5
|
export function useStateStore(store, selector) {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return selector(store.getLatestValue());
|
|
7
|
-
});
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
if (!store)
|
|
10
|
-
return;
|
|
11
|
-
const unsubscribe = store.subscribeWithSelector(selector, setState);
|
|
12
|
-
return unsubscribe;
|
|
6
|
+
const wrappedSubscription = useCallback((onStoreChange) => {
|
|
7
|
+
const unsubscribe = store?.subscribeWithSelector(selector, onStoreChange);
|
|
8
|
+
return unsubscribe ?? noop;
|
|
13
9
|
}, [store, selector]);
|
|
10
|
+
const wrappedSnapshot = useMemo(() => {
|
|
11
|
+
let cachedTuple;
|
|
12
|
+
return () => {
|
|
13
|
+
const currentValue = store?.getLatestValue();
|
|
14
|
+
if (!currentValue)
|
|
15
|
+
return undefined;
|
|
16
|
+
// store value hasn't changed, no need to compare individual values
|
|
17
|
+
if (cachedTuple && cachedTuple[0] === currentValue) {
|
|
18
|
+
return cachedTuple[1];
|
|
19
|
+
}
|
|
20
|
+
const newlySelected = selector(currentValue);
|
|
21
|
+
// store value changed but selected values wouldn't have to, double-check selected
|
|
22
|
+
if (cachedTuple) {
|
|
23
|
+
let selectededAreEqualToCached = true;
|
|
24
|
+
for (const key in cachedTuple[1]) {
|
|
25
|
+
if (cachedTuple[1][key] === newlySelected[key])
|
|
26
|
+
continue;
|
|
27
|
+
selectededAreEqualToCached = false;
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
if (selectededAreEqualToCached)
|
|
31
|
+
return cachedTuple[1];
|
|
32
|
+
}
|
|
33
|
+
cachedTuple = [currentValue, newlySelected];
|
|
34
|
+
return cachedTuple[1];
|
|
35
|
+
};
|
|
36
|
+
}, [store, selector]);
|
|
37
|
+
const state = useSyncExternalStore(wrappedSubscription, wrappedSnapshot);
|
|
14
38
|
return state;
|
|
15
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.11.1",
|
|
4
4
|
"description": "React components to create chat conversations or livestream style chat",
|
|
5
5
|
"author": "GetStream",
|
|
6
6
|
"homepage": "https://getstream.io/chat/",
|
|
@@ -181,13 +181,15 @@
|
|
|
181
181
|
"@commitlint/config-conventional": "^18.4.3",
|
|
182
182
|
"@emoji-mart/data": "^1.1.2",
|
|
183
183
|
"@emoji-mart/react": "^1.1.1",
|
|
184
|
+
"@eslint/js": "^9.16.0",
|
|
184
185
|
"@ladle/react": "^0.16.0",
|
|
185
186
|
"@playwright/test": "^1.42.1",
|
|
186
187
|
"@semantic-release/changelog": "^6.0.2",
|
|
187
188
|
"@semantic-release/exec": "^6.0.3",
|
|
188
189
|
"@semantic-release/git": "^10.0.1",
|
|
189
190
|
"@stream-io/rollup-plugin-node-builtins": "^2.1.5",
|
|
190
|
-
"@stream-io/stream-chat-css": "^5.
|
|
191
|
+
"@stream-io/stream-chat-css": "^5.7.0",
|
|
192
|
+
"@testing-library/dom": "^10.4.0",
|
|
191
193
|
"@testing-library/jest-dom": "^6.6.3",
|
|
192
194
|
"@testing-library/react": "^16.2.0",
|
|
193
195
|
"@types/deep-equal": "^1.0.1",
|
|
@@ -208,10 +210,7 @@
|
|
|
208
210
|
"@types/textarea-caret": "3.0.0",
|
|
209
211
|
"@types/use-sync-external-store": "^0.0.6",
|
|
210
212
|
"@types/uuid": "^8.3.0",
|
|
211
|
-
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
212
|
-
"@typescript-eslint/parser": "5.62.0",
|
|
213
213
|
"autoprefixer": "^10.0.3",
|
|
214
|
-
"babel-eslint": "^10.1.0",
|
|
215
214
|
"babel-jest": "^28.1.3",
|
|
216
215
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
217
216
|
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
|
@@ -223,27 +222,14 @@
|
|
|
223
222
|
"emoji-mart": "^5.5.2",
|
|
224
223
|
"esbuild": "^0.23.1",
|
|
225
224
|
"esbuild-plugin-replace": "^1.4.0",
|
|
226
|
-
"eslint": "
|
|
227
|
-
"eslint-
|
|
228
|
-
"eslint-
|
|
229
|
-
"eslint-
|
|
230
|
-
"eslint-
|
|
231
|
-
"eslint-
|
|
232
|
-
"eslint-plugin-
|
|
233
|
-
"
|
|
234
|
-
"eslint-plugin-import": "^2.22.1",
|
|
235
|
-
"eslint-plugin-jest": "^24.1.3",
|
|
236
|
-
"eslint-plugin-jest-dom": "^3.3.0",
|
|
237
|
-
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
238
|
-
"eslint-plugin-node": "^11.1.0",
|
|
239
|
-
"eslint-plugin-prettier": "^3.1.4",
|
|
240
|
-
"eslint-plugin-promise": "^4.2.1",
|
|
241
|
-
"eslint-plugin-react": "^7.21.5",
|
|
242
|
-
"eslint-plugin-react-hooks": "^4.2.0",
|
|
243
|
-
"eslint-plugin-sort-destructure-keys": "1.3.5",
|
|
244
|
-
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
245
|
-
"eslint-plugin-testing-library": "^6.2.0",
|
|
246
|
-
"eslint-plugin-typescript-sort-keys": "^2.1.0",
|
|
225
|
+
"eslint": "^9.16.0",
|
|
226
|
+
"eslint-plugin-import": "^2.31.0",
|
|
227
|
+
"eslint-plugin-jest": "^28.11.0",
|
|
228
|
+
"eslint-plugin-jest-dom": "^5.5.0",
|
|
229
|
+
"eslint-plugin-react": "^7.37.2",
|
|
230
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
231
|
+
"eslint-plugin-sort-destructure-keys": "^2.0.0",
|
|
232
|
+
"globals": "^15.13.0",
|
|
247
233
|
"husky": "^8.0.3",
|
|
248
234
|
"i18next-parser": "^6.0.0",
|
|
249
235
|
"jest": "^29.7.0",
|
|
@@ -252,24 +238,26 @@
|
|
|
252
238
|
"jsdom": "^24.1.1",
|
|
253
239
|
"lint-staged": "^15.2.1",
|
|
254
240
|
"moment-timezone": "^0.5.43",
|
|
255
|
-
"prettier": "^
|
|
241
|
+
"prettier": "^3.4.2",
|
|
256
242
|
"react": "^19.0.0",
|
|
257
243
|
"react-dom": "^19.0.0",
|
|
258
244
|
"semantic-release": "^19.0.5",
|
|
259
245
|
"stream-chat": "^8.50.0",
|
|
260
246
|
"ts-jest": "^29.2.5",
|
|
261
|
-
"typescript": "^5.4.5"
|
|
247
|
+
"typescript": "^5.4.5",
|
|
248
|
+
"typescript-eslint": "^8.17.0"
|
|
262
249
|
},
|
|
263
250
|
"scripts": {
|
|
264
251
|
"build": "rm -rf dist && yarn build-translations && yarn bundle",
|
|
265
252
|
"bundle": "concurrently ./scripts/bundle-esm.mjs ./scripts/copy-css.sh scripts/bundle-cjs.mjs",
|
|
266
253
|
"build-translations": "i18next",
|
|
267
254
|
"coverage": "jest --collectCoverage && codecov",
|
|
268
|
-
"
|
|
269
|
-
"lint": "prettier
|
|
270
|
-
"
|
|
271
|
-
"
|
|
272
|
-
"prettier
|
|
255
|
+
"lint": "yarn prettier --list-different && yarn eslint && yarn validate-translations",
|
|
256
|
+
"lint-fix": "yarn prettier-fix && yarn eslint-fix",
|
|
257
|
+
"eslint": "eslint --max-warnings 0",
|
|
258
|
+
"eslint-fix": "eslint --fix",
|
|
259
|
+
"prettier": "prettier 'src/**/*.{js,ts,jsx,tsx,md,json}' .prettierrc babel.config.js eslint.config.mjs",
|
|
260
|
+
"prettier-fix": "yarn prettier --write",
|
|
273
261
|
"fix-staged": "lint-staged --config .lintstagedrc.fix.json --concurrent 1",
|
|
274
262
|
"start": "tsc --watch --sourceMap --declarationMap",
|
|
275
263
|
"prepare": "husky install",
|