stream-chat-react 12.0.0-rc.9 → 12.0.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/dist/components/Avatar/Avatar.js +5 -1
- package/dist/components/Channel/Channel.d.ts +3 -4
- package/dist/components/Channel/Channel.js +76 -24
- package/dist/components/Channel/hooks/useCreateChannelStateContext.js +2 -1
- package/dist/components/ChannelHeader/ChannelHeader.js +4 -5
- package/dist/components/ChannelPreview/hooks/useChannelPreviewInfo.js +14 -16
- package/dist/components/ChannelPreview/utils.js +9 -20
- package/dist/components/ChannelSearch/hooks/useChannelSearch.js +2 -3
- package/dist/components/Chat/Chat.d.ts +1 -1
- package/dist/components/Chat/hooks/useChat.d.ts +2 -2
- package/dist/components/Chat/hooks/useChat.js +11 -8
- package/dist/components/ChatView/ChatView.d.ts +18 -0
- package/dist/components/ChatView/ChatView.js +103 -0
- package/dist/components/ChatView/index.d.ts +1 -0
- package/dist/components/ChatView/index.js +1 -0
- package/dist/components/DateSeparator/DateSeparator.d.ts +1 -1
- package/dist/components/Dialog/DialogAnchor.d.ts +25 -0
- package/dist/components/Dialog/DialogAnchor.js +68 -0
- package/dist/components/Dialog/DialogManager.d.ts +43 -0
- package/dist/components/Dialog/DialogManager.js +98 -0
- package/dist/components/Dialog/DialogPortal.d.ts +7 -0
- package/dist/components/Dialog/DialogPortal.js +25 -0
- package/dist/components/Dialog/hooks/index.d.ts +1 -0
- package/dist/components/Dialog/hooks/index.js +1 -0
- package/dist/components/Dialog/hooks/useDialog.d.ts +4 -0
- package/dist/components/Dialog/hooks/useDialog.js +26 -0
- package/dist/components/Dialog/index.d.ts +4 -0
- package/dist/components/Dialog/index.js +4 -0
- package/dist/components/EventComponent/EventComponent.d.ts +1 -1
- package/dist/components/Message/Message.js +5 -6
- package/dist/components/Message/MessageOptions.d.ts +1 -2
- package/dist/components/Message/MessageOptions.js +14 -11
- package/dist/components/Message/MessageSimple.js +6 -14
- package/dist/components/Message/MessageTimestamp.d.ts +1 -1
- package/dist/components/Message/QuotedMessage.js +2 -1
- package/dist/components/Message/Timestamp.d.ts +1 -1
- package/dist/components/Message/Timestamp.js +2 -2
- package/dist/components/Message/hooks/useReactionHandler.d.ts +1 -7
- package/dist/components/Message/hooks/useReactionHandler.js +8 -63
- package/dist/components/Message/utils.d.ts +10 -1
- package/dist/components/Message/utils.js +19 -7
- package/dist/components/MessageActions/MessageActions.d.ts +1 -2
- package/dist/components/MessageActions/MessageActions.js +26 -55
- package/dist/components/MessageActions/MessageActionsBox.d.ts +1 -1
- package/dist/components/MessageActions/MessageActionsBox.js +6 -6
- package/dist/components/MessageInput/MessageInputFlat.js +2 -2
- package/dist/components/MessageInput/QuotedMessagePreview.js +2 -1
- package/dist/components/MessageInput/hooks/useUserTrigger.js +0 -1
- package/dist/components/MessageList/MessageList.js +7 -7
- package/dist/components/MessageList/VirtualizedMessageList.d.ts +2 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +44 -39
- package/dist/components/MessageList/VirtualizedMessageListComponents.d.ts +1 -1
- package/dist/components/MessageList/VirtualizedMessageListComponents.js +6 -6
- package/dist/components/MessageList/renderMessages.d.ts +2 -2
- package/dist/components/MessageList/renderMessages.js +4 -1
- package/dist/components/MessageList/utils.js +1 -1
- package/dist/components/Reactions/ReactionSelector.d.ts +6 -3
- package/dist/components/Reactions/ReactionSelector.js +34 -24
- package/dist/components/Reactions/ReactionSelectorWithButton.d.ts +13 -0
- package/dist/components/Reactions/ReactionSelectorWithButton.js +22 -0
- package/dist/components/Reactions/ReactionsList.d.ts +4 -4
- package/dist/components/Reactions/hooks/useProcessReactions.js +2 -1
- package/dist/components/Thread/Thread.js +38 -10
- package/dist/components/Threads/ThreadContext.d.ts +9 -0
- package/dist/components/Threads/ThreadContext.js +9 -0
- package/dist/components/Threads/ThreadList/ThreadList.d.ts +9 -0
- package/dist/components/Threads/ThreadList/ThreadList.js +41 -0
- package/dist/components/Threads/ThreadList/ThreadListEmptyPlaceholder.d.ts +2 -0
- package/dist/components/Threads/ThreadList/ThreadListEmptyPlaceholder.js +5 -0
- package/dist/components/Threads/ThreadList/ThreadListItem.d.ts +9 -0
- package/dist/components/Threads/ThreadList/ThreadListItem.js +52 -0
- package/dist/components/Threads/ThreadList/ThreadListItemUI.d.ts +15 -0
- package/dist/components/Threads/ThreadList/ThreadListItemUI.js +75 -0
- package/dist/components/Threads/ThreadList/ThreadListLoadingIndicator.d.ts +2 -0
- package/dist/components/Threads/ThreadList/ThreadListLoadingIndicator.js +14 -0
- package/dist/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.d.ts +2 -0
- package/dist/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.js +16 -0
- package/dist/components/Threads/ThreadList/index.d.ts +3 -0
- package/dist/components/Threads/ThreadList/index.js +3 -0
- package/dist/components/Threads/UnreadCountBadge.d.ts +6 -0
- package/dist/components/Threads/UnreadCountBadge.js +5 -0
- package/dist/components/Threads/hooks/useThreadManagerState.d.ts +2 -0
- package/dist/components/Threads/hooks/useThreadManagerState.js +6 -0
- package/dist/components/Threads/hooks/useThreadState.d.ts +5 -0
- package/dist/components/Threads/hooks/useThreadState.js +11 -0
- package/dist/components/Threads/icons.d.ts +8 -0
- package/dist/components/Threads/icons.js +13 -0
- package/dist/components/Threads/index.d.ts +2 -0
- package/dist/components/Threads/index.js +2 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/context/ComponentContext.d.ts +15 -40
- package/dist/context/ComponentContext.js +7 -9
- package/dist/context/DialogManagerContext.d.ts +10 -0
- package/dist/context/DialogManagerContext.js +14 -0
- package/dist/context/MessageContext.d.ts +3 -11
- package/dist/context/MessageContext.js +3 -2
- package/dist/context/TranslationContext.d.ts +1 -11
- package/dist/context/TranslationContext.js +1 -9
- package/dist/context/WithComponents.d.ts +5 -0
- package/dist/context/WithComponents.js +7 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.js +2 -0
- package/dist/css/v2/index.css +2 -2
- package/dist/css/v2/index.layout.css +2 -2
- package/dist/i18n/Streami18n.d.ts +1 -3
- package/dist/i18n/Streami18n.js +1 -2
- package/dist/i18n/index.d.ts +2 -1
- package/dist/i18n/index.js +2 -0
- package/dist/i18n/types.d.ts +26 -0
- package/dist/i18n/types.js +1 -0
- package/dist/i18n/utils.d.ts +9 -20
- package/dist/i18n/utils.js +10 -1
- package/dist/index.browser.cjs +10817 -10579
- package/dist/index.browser.cjs.map +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.node.cjs +10704 -10482
- package/dist/index.node.cjs.map +4 -4
- package/dist/plugins/Emojis/index.browser.cjs +7 -169
- package/dist/plugins/Emojis/index.browser.cjs.map +4 -4
- package/dist/plugins/Emojis/index.node.cjs +7 -169
- package/dist/plugins/Emojis/index.node.cjs.map +4 -4
- package/dist/plugins/encoders/mp3.browser.cjs +2 -4
- package/dist/plugins/encoders/mp3.browser.cjs.map +1 -1
- package/dist/plugins/encoders/mp3.node.cjs +2 -4
- package/dist/plugins/encoders/mp3.node.cjs.map +1 -1
- package/dist/scss/v2/Avatar/Avatar-layout.scss +10 -2
- package/dist/scss/v2/Avatar/Avatar-theme.scss +5 -0
- package/dist/scss/v2/ChatView/ChatView-layout.scss +43 -0
- package/dist/scss/v2/ChatView/ChatView-theme.scss +32 -0
- package/dist/scss/v2/Dialog/Dialog-layout.scss +8 -0
- package/dist/scss/v2/LoadingIndicator/LoadingIndicator-layout.scss +16 -0
- package/dist/scss/v2/Message/Message-layout.scss +8 -0
- package/dist/scss/v2/MessageActionsBox/MessageActionsBox-theme.scss +8 -0
- package/dist/scss/v2/MessageList/MessageList-layout.scss +0 -6
- package/dist/scss/v2/MessageList/VirtualizedMessageList-layout.scss +0 -12
- package/dist/scss/v2/MessageReactions/MessageReactionsSelector-layout.scss +16 -0
- package/dist/scss/v2/MessageReactions/MessageReactionsSelector-theme.scss +6 -0
- package/dist/scss/v2/Thread/Thread-layout.scss +15 -1
- package/dist/scss/v2/ThreadList/ThreadList-layout.scss +152 -0
- package/dist/scss/v2/ThreadList/ThreadList-theme.scss +75 -0
- package/dist/scss/v2/UnreadCountBadge/UnreadCountBadge-layout.scss +49 -0
- package/dist/scss/v2/UnreadCountBadge/UnreadCountBadge-theme.scss +11 -0
- package/dist/scss/v2/_base.scss +31 -0
- package/dist/scss/v2/index.layout.scss +4 -0
- package/dist/scss/v2/index.scss +3 -0
- package/dist/store/hooks/index.d.ts +1 -0
- package/dist/store/hooks/index.js +1 -0
- package/dist/store/hooks/useStateStore.d.ts +3 -0
- package/dist/store/hooks/useStateStore.js +15 -0
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.js +1 -0
- package/package.json +7 -6
- package/dist/assets/Poweredby_100px-White_VertText.png +0 -0
- package/dist/assets/str-chat__reaction-list-sprite@1x.png +0 -0
- package/dist/assets/str-chat__reaction-list-sprite@2x.png +0 -0
- package/dist/assets/str-chat__reaction-list-sprite@3x.png +0 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
.str-chat__thread-list-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
flex-grow: 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.str-chat__unseen-threads-banner {
|
|
8
|
+
font-size: 16px;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
|
|
11
|
+
margin: 8px;
|
|
12
|
+
padding: 16px;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
|
|
17
|
+
&__button {
|
|
18
|
+
--str-chat-icon-width: 16px;
|
|
19
|
+
--str-chat-icon-heigh: 22px;
|
|
20
|
+
|
|
21
|
+
all: unset;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
width: 24px;
|
|
27
|
+
height: 24px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.str-chat__thread-list {
|
|
32
|
+
.str-chat__thread-list-item {
|
|
33
|
+
align-items: stretch;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
padding-block: 14px;
|
|
36
|
+
padding-inline: 8px;
|
|
37
|
+
gap: 6px;
|
|
38
|
+
width: 100%;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
|
|
43
|
+
.str-chat__thread-list-item__channel {
|
|
44
|
+
--str-chat-icon-height: 14px;
|
|
45
|
+
--str-chat-icon-width: 14px;
|
|
46
|
+
|
|
47
|
+
display: flex;
|
|
48
|
+
gap: 5px;
|
|
49
|
+
|
|
50
|
+
.str-chat__icon {
|
|
51
|
+
margin-top: 2px;
|
|
52
|
+
flex-shrink: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.str-chat__thread-list-item__thread-status-symbol {
|
|
57
|
+
font-size: 14px;
|
|
58
|
+
line-height: 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.str-chat__thread-list-item__channel-text {
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
text-overflow: ellipsis;
|
|
65
|
+
font-size: 14px;
|
|
66
|
+
font-weight: 400;
|
|
67
|
+
line-height: 1;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.str-chat__thread-list-item__parent-message {
|
|
71
|
+
display: flex;
|
|
72
|
+
gap: 3px;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
align-items: center;
|
|
75
|
+
height: 15px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.str-chat__thread-list-item__parent-message-text {
|
|
79
|
+
font-size: 12px;
|
|
80
|
+
font-weight: 400;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
white-space: nowrap;
|
|
83
|
+
text-overflow: ellipsis;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.str-chat__thread-list-item__latest-reply {
|
|
87
|
+
--str-chat__avatar-size: 49px;
|
|
88
|
+
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
gap: 5px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.str-chat__thread-list-item__latest-reply-details {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
flex-grow: 1;
|
|
98
|
+
gap: 4px;
|
|
99
|
+
width: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.str-chat__thread-list-item__latest-reply-created-by {
|
|
103
|
+
font-weight: 500;
|
|
104
|
+
font-size: 16px;
|
|
105
|
+
text-align: left;
|
|
106
|
+
text-overflow: ellipsis;
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
overflow-x: hidden;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.str-chat__thread-list-item__latest-reply-text-and-timestamp {
|
|
112
|
+
display: flex;
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
font-weight: 400;
|
|
115
|
+
justify-content: space-between;
|
|
116
|
+
align-items: baseline;
|
|
117
|
+
line-height: 16px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.str-chat__thread-list-item__latest-reply-text {
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
white-space: nowrap;
|
|
123
|
+
text-overflow: ellipsis;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.str-chat__thread-list-item__latest-reply-timestamp {
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.str-chat__thread-list-loading-indicator {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
padding-block: 14px;
|
|
136
|
+
padding-inline: 8px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.str-chat__thread-list-empty-placeholder {
|
|
141
|
+
--str-chat-icon-height: 95px;
|
|
142
|
+
--str-chat-icon-width: 95px;
|
|
143
|
+
|
|
144
|
+
font-size: 20px;
|
|
145
|
+
font-weight: 500;
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
height: 100%;
|
|
151
|
+
gap: 16px;
|
|
152
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* Only available in React SDK. */
|
|
2
|
+
.str-chat {
|
|
3
|
+
--str-chat-thread-list-border-color: var(--str-chat__surface-color);
|
|
4
|
+
--str-chat-thread-list-container-background-color: var(--str-chat__secondary-background-color);
|
|
5
|
+
|
|
6
|
+
--str-chat-unseen-threads-banner-background-color: var(--str-chat__text-color);
|
|
7
|
+
--str-chat-unseen-threads-banner-color: var(--str-chat__opaque-surface-text-color);
|
|
8
|
+
|
|
9
|
+
--str-chat-thread-list-item-background-color-default: var(--str-chat__secondary-background-color);
|
|
10
|
+
--str-chat-thread-list-item-background-color-selected: var(--str-chat__surface-color);
|
|
11
|
+
|
|
12
|
+
--str-chat-thread-list-item-text-color: var(--str-chat__text-color);
|
|
13
|
+
--str-chat-thread-list-item-text-low-emphasis-color: var(--str-chat__text-low-emphasis-color);
|
|
14
|
+
|
|
15
|
+
--str-chat-thread-list-empty-placeholder-background-color: var(
|
|
16
|
+
--str-chat__secondary-background-color
|
|
17
|
+
);
|
|
18
|
+
--str-chat-thread-list-empty-placeholder-color: var(--str-chat__text-low-emphasis-color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.str-chat__thread-list-container {
|
|
22
|
+
background-color: var(--str-chat-thread-list-container-background-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.str-chat__unseen-threads-banner {
|
|
26
|
+
border-radius: 16px;
|
|
27
|
+
background: var(--str-chat-unseen-threads-banner-background-color);
|
|
28
|
+
color: var(--str-chat-unseen-threads-banner-color);
|
|
29
|
+
|
|
30
|
+
&__button {
|
|
31
|
+
--str-chat-icon-color: var(--str-chat-unseen-threads-banner-color);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.str-chat__thread-list {
|
|
36
|
+
|
|
37
|
+
border-right: 1px solid var(--str-chat-thread-list-border-color);
|
|
38
|
+
|
|
39
|
+
.str-chat__thread-list-item {
|
|
40
|
+
--str-chat-icon-color: var(--str-chat-thread-list-item-text-color);
|
|
41
|
+
|
|
42
|
+
border: none;
|
|
43
|
+
background-color: var(--str-chat-thread-list-item-background-color-default);
|
|
44
|
+
color: var(--str-chat-thread-list-item-text-color);
|
|
45
|
+
|
|
46
|
+
&[aria-selected='true'] {
|
|
47
|
+
background-color: var(--str-chat-thread-list-item-background-color-selected);
|
|
48
|
+
|
|
49
|
+
.str-chat__thread-list-item__parent-message-text,
|
|
50
|
+
.str-chat__thread-list-item__latest-reply-text-and-timestamp {
|
|
51
|
+
color: inherit;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.str-chat__thread-list-item__parent-message-text {
|
|
56
|
+
color: var(--str-chat-thread-list-item-text-low-emphasis-color);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.str-chat__thread-list-item__latest-reply {
|
|
60
|
+
--str-chat__avatar-background-color: var(--str-chat__secondary-surface-color);
|
|
61
|
+
--str-chat__avatar-color: var(--str-chat__text-low-emphasis-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.str-chat__thread-list-item__latest-reply-text-and-timestamp {
|
|
65
|
+
color: var(--str-chat-thread-list-item-text-low-emphasis-color);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.str-chat__thread-list-empty-placeholder {
|
|
71
|
+
--str-chat-icon-color: var(--str-chat-thread-list-empty-placeholder-color);
|
|
72
|
+
|
|
73
|
+
background-color: var(--str-chat-thread-list-empty-placeholder-background-color);
|
|
74
|
+
color: var(--str-chat-thread-list-empty-placeholder-color);
|
|
75
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.str-chat {
|
|
2
|
+
--str-chat-unread-count-badge-absolute-offset-vertical: 50%;
|
|
3
|
+
--str-chat-unread-count-badge-absolute-offset-horizontal: 50%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.str-chat__unread-count-badge-container {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.str-chat__unread-count-badge {
|
|
14
|
+
font-size: 12px;
|
|
15
|
+
min-width: 22px;
|
|
16
|
+
min-height: 22px;
|
|
17
|
+
line-height: 8px;
|
|
18
|
+
font-weight: 700;
|
|
19
|
+
padding: 7px;
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
font-variant-numeric: tabular-nums;
|
|
25
|
+
|
|
26
|
+
&--top-right {
|
|
27
|
+
position: absolute;
|
|
28
|
+
translate: var(--str-chat-unread-count-badge-absolute-offset-horizontal)
|
|
29
|
+
calc(var(--str-chat-unread-count-badge-absolute-offset-vertical) * -1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&--bottom-left {
|
|
33
|
+
position: absolute;
|
|
34
|
+
translate: calc(var(--str-chat-unread-count-badge-absolute-offset-horizontal) * -1)
|
|
35
|
+
var(--str-chat-unread-count-badge-absolute-offset-vertical);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--bottom-right {
|
|
39
|
+
position: absolute;
|
|
40
|
+
translate: var(--str-chat-unread-count-badge-absolute-offset-horizontal)
|
|
41
|
+
var(--str-chat-unread-count-badge-absolute-offset-vertical);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&--top-left {
|
|
45
|
+
position: absolute;
|
|
46
|
+
translate: calc(var(--str-chat-unread-count-badge-absolute-offset-horizontal) * -1)
|
|
47
|
+
calc(var(--str-chat-unread-count-badge-absolute-offset-vertical) * -1);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* Only available in React SDK. */
|
|
2
|
+
.str-chat {
|
|
3
|
+
--str-chat-unread-count-badge-color: var(--str-chat__on-unread-badge-color);
|
|
4
|
+
--str-chat-unread-count-badge-background-color: var(--str-chat__danger-color);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.str-chat__unread-count-badge {
|
|
8
|
+
background-color: var(--str-chat-unread-count-badge-background-color);
|
|
9
|
+
color: var(--str-chat-unread-count-badge-color);
|
|
10
|
+
border-radius: 9999px;
|
|
11
|
+
}
|
package/dist/scss/v2/_base.scss
CHANGED
|
@@ -28,3 +28,34 @@ stream-icon-placeholder {
|
|
|
28
28
|
justify-content: center;
|
|
29
29
|
align-items: center;
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
.stream-chat__paginated-list {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
height: 100%;
|
|
36
|
+
overflow-x: hidden;
|
|
37
|
+
overflow-y: scroll;
|
|
38
|
+
max-height: 100%;
|
|
39
|
+
min-height: 0;
|
|
40
|
+
gap: var(--str-chat__spacing-2);
|
|
41
|
+
|
|
42
|
+
.str-chat__loading-indicator {
|
|
43
|
+
margin: auto;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
stream-paginated-list {
|
|
48
|
+
height: 100%;
|
|
49
|
+
max-height: 100%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
stream-user-list {
|
|
53
|
+
height: 100%;
|
|
54
|
+
max-height: 100%;
|
|
55
|
+
|
|
56
|
+
.str-chat__user-list-item {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: var(--str-chat__spacing-2);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
@use 'ChannelSearch/ChannelSearch-layout';
|
|
16
16
|
@use 'common/CTAButton/CTAButton-layout';
|
|
17
17
|
@use 'common/CircleFAButton/CircleFAButton-layout';
|
|
18
|
+
@use 'Dialog/Dialog-layout';
|
|
18
19
|
@use 'EditMessageForm/EditMessageForm-layout';
|
|
19
20
|
@use 'ImageCarousel/ImageCarousel-layout';
|
|
20
21
|
@use 'Icon/Icon-layout';
|
|
@@ -35,3 +36,6 @@
|
|
|
35
36
|
@use 'Thread/Thread-layout';
|
|
36
37
|
@use 'Tooltip/Tooltip-layout';
|
|
37
38
|
@use 'TypingIndicator/TypingIndicator-layout';
|
|
39
|
+
@use 'ThreadList/ThreadList-layout';
|
|
40
|
+
@use 'ChatView/ChatView-layout';
|
|
41
|
+
@use 'UnreadCountBadge/UnreadCountBadge-layout';
|
package/dist/scss/v2/index.scss
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useStateStore';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useStateStore';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { StateStore } from 'stream-chat';
|
|
2
|
+
export declare function useStateStore<T extends Record<string, unknown>, O extends readonly unknown[]>(store: StateStore<T>, selector: (v: T) => O): O;
|
|
3
|
+
export declare function useStateStore<T extends Record<string, unknown>, O extends readonly unknown[]>(store: StateStore<T> | undefined, selector: (v: T) => O): O | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
export function useStateStore(store, selector) {
|
|
3
|
+
const [state, setState] = useState(() => {
|
|
4
|
+
if (!store)
|
|
5
|
+
return undefined;
|
|
6
|
+
return selector(store.getLatestValue());
|
|
7
|
+
});
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (!store)
|
|
10
|
+
return;
|
|
11
|
+
const unsubscribe = store.subscribeWithSelector(selector, setState);
|
|
12
|
+
return unsubscribe;
|
|
13
|
+
}, [store, selector]);
|
|
14
|
+
return state;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hooks';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hooks';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react",
|
|
3
|
-
"version": "12.0.0
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "React components to create chat conversations or livestream style chat",
|
|
5
5
|
"author": "GetStream",
|
|
6
6
|
"homepage": "https://getstream.io/chat/",
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"sideEffects": [
|
|
77
|
-
"*.css"
|
|
77
|
+
"*.css",
|
|
78
|
+
"./dist/i18n/Streami18n.js"
|
|
78
79
|
],
|
|
79
80
|
"keywords": [
|
|
80
81
|
"chat",
|
|
@@ -129,7 +130,7 @@
|
|
|
129
130
|
"emoji-mart": "^5.4.0",
|
|
130
131
|
"react": "^18.0.0 || ^17.0.0 || ^16.8.0",
|
|
131
132
|
"react-dom": "^18.0.0 || ^17.0.0 || ^16.8.0",
|
|
132
|
-
"stream-chat": "^8.
|
|
133
|
+
"stream-chat": "^8.40.8"
|
|
133
134
|
},
|
|
134
135
|
"peerDependenciesMeta": {
|
|
135
136
|
"@breezystack/lamejs": {
|
|
@@ -170,7 +171,7 @@
|
|
|
170
171
|
"@semantic-release/changelog": "^6.0.2",
|
|
171
172
|
"@semantic-release/git": "^10.0.1",
|
|
172
173
|
"@stream-io/rollup-plugin-node-builtins": "^2.1.5",
|
|
173
|
-
"@stream-io/stream-chat-css": "5.0.0
|
|
174
|
+
"@stream-io/stream-chat-css": "^5.0.0",
|
|
174
175
|
"@testing-library/jest-dom": "^6.1.4",
|
|
175
176
|
"@testing-library/react": "^13.1.1",
|
|
176
177
|
"@testing-library/react-hooks": "^8.0.0",
|
|
@@ -204,7 +205,7 @@
|
|
|
204
205
|
"core-js": "^3.6.5",
|
|
205
206
|
"dotenv": "^8.6.0",
|
|
206
207
|
"emoji-mart": "^5.5.2",
|
|
207
|
-
"esbuild": "^0.
|
|
208
|
+
"esbuild": "^0.23.1",
|
|
208
209
|
"eslint": "7.14.0",
|
|
209
210
|
"eslint-config-airbnb": "^18.2.1",
|
|
210
211
|
"eslint-config-prettier": "^6.15.0",
|
|
@@ -239,7 +240,7 @@
|
|
|
239
240
|
"react-dom": "^18.1.0",
|
|
240
241
|
"react-test-renderer": "^18.1.0",
|
|
241
242
|
"semantic-release": "^19.0.5",
|
|
242
|
-
"stream-chat": "8.
|
|
243
|
+
"stream-chat": "^8.40.8",
|
|
243
244
|
"ts-jest": "^29.1.4",
|
|
244
245
|
"typescript": "^5.4.5"
|
|
245
246
|
},
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|