stream-chat-react 6.8.0 → 6.9.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/browser.full-bundle.js +1372 -1201
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +2 -2
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.js +3 -1
- package/dist/components/Channel/Channel.d.ts +2 -0
- package/dist/components/Channel/Channel.d.ts.map +1 -1
- package/dist/components/Channel/Channel.js +62 -92
- package/dist/components/Channel/hooks/useCreateChannelStateContext.d.ts +15 -0
- package/dist/components/Channel/hooks/useCreateChannelStateContext.d.ts.map +1 -0
- package/dist/components/Channel/hooks/useCreateChannelStateContext.js +87 -0
- package/dist/components/Channel/hooks/useCreateTypingContext.d.ts +4 -0
- package/dist/components/Channel/hooks/useCreateTypingContext.d.ts.map +1 -0
- package/dist/components/Channel/hooks/useCreateTypingContext.js +9 -0
- package/dist/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/dist/components/ChannelList/ChannelList.js +2 -2
- package/dist/components/ChannelList/hooks/useNotificationMessageNewListener.d.ts +1 -1
- package/dist/components/ChannelList/hooks/useNotificationMessageNewListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useNotificationMessageNewListener.js +2 -4
- package/dist/components/ChannelList/hooks/usePaginatedChannels.d.ts +0 -1
- package/dist/components/ChannelList/hooks/usePaginatedChannels.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/usePaginatedChannels.js +7 -15
- package/dist/components/Chat/Chat.d.ts.map +1 -1
- package/dist/components/Chat/Chat.js +14 -12
- package/dist/components/Chat/hooks/useChat.js +1 -1
- package/dist/components/Chat/hooks/useCreateChatContext.d.ts +4 -0
- package/dist/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -0
- package/dist/components/Chat/hooks/useCreateChatContext.js +21 -0
- package/dist/components/MessageInput/MessageInput.d.ts +1 -1
- package/dist/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInput.js +2 -1
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.d.ts +4 -0
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.d.ts.map +1 -0
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.js +88 -0
- package/dist/components/MessageList/VirtualizedMessageList.d.ts +4 -2
- package/dist/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +2 -2
- package/dist/index.cjs.js +317 -146
- package/dist/index.cjs.js.map +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +22 -15
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { UserResponse } from 'stream-chat';
|
|
3
|
-
import type { DefaultUserType
|
|
3
|
+
import type { DefaultUserType } from './types/types';
|
|
4
4
|
export declare const isOnlyEmojis: (text?: string | undefined) => boolean;
|
|
5
5
|
export declare type MentionProps<Us extends DefaultUserType<Us> = DefaultUserType> = {
|
|
6
6
|
mentioned_user: UserResponse<Us>;
|
|
@@ -13,5 +13,5 @@ export declare type RenderTextOptions = {
|
|
|
13
13
|
export declare const renderText: <Us extends DefaultUserType<Us> = DefaultUserType<import("./types/types").DefaultUserTypeInternal>>(text?: string | undefined, mentioned_users?: UserResponse<Us>[] | undefined, options?: RenderTextOptions) => JSX.Element | null;
|
|
14
14
|
export declare function escapeRegExp(text: string): string;
|
|
15
15
|
export declare function generateRandomId(): string;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const getWholeChar: (str: string, i: number) => string;
|
|
17
17
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AASjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AASjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,YAAY,wCAOxB,CAAC;AA4HF,oBAAY,YAAY,CAAC,EAAE,SAAS,eAAe,CAAC,EAAE,CAAC,GAAG,eAAe,IAAI;IAC3E,cAAc,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC;CAClC,CAAC;AAMF,oBAAY,iBAAiB,GAAG;IAC9B,uBAAuB,CAAC,EAAE;QACxB,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC;KACvC,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,UAAU,6LAGZ,iBAAiB,uBA8D3B,CAAC;AAEF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,UAExC;AAOD,wBAAgB,gBAAgB,WAG/B;AAGD,eAAO,MAAM,YAAY,QAAS,MAAM,KAAK,MAAM,WAgClD,CAAC"}
|
package/dist/utils.js
CHANGED
|
@@ -161,22 +161,29 @@ export function generateRandomId() {
|
|
|
161
161
|
// prettier-ignore
|
|
162
162
|
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
|
163
163
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt#getting_whole_characters
|
|
165
|
+
export var getWholeChar = function (str, i) {
|
|
166
|
+
var code = str.charCodeAt(i);
|
|
167
|
+
if (Number.isNaN(code))
|
|
168
|
+
return '';
|
|
169
|
+
if (code < 0xd800 || code > 0xdfff)
|
|
170
|
+
return str.charAt(i);
|
|
171
|
+
if (0xd800 <= code && code <= 0xdbff) {
|
|
172
|
+
if (str.length <= i + 1) {
|
|
173
|
+
throw 'High surrogate without following low surrogate';
|
|
174
|
+
}
|
|
175
|
+
var next = str.charCodeAt(i + 1);
|
|
176
|
+
if (0xdc00 > next || next > 0xdfff) {
|
|
177
|
+
throw 'High surrogate without following low surrogate';
|
|
178
|
+
}
|
|
179
|
+
return str.charAt(i) + str.charAt(i + 1);
|
|
167
180
|
}
|
|
168
|
-
if (
|
|
169
|
-
|
|
170
|
-
var element = ElementOrComponentOrLiteral;
|
|
171
|
-
return element;
|
|
181
|
+
if (i === 0) {
|
|
182
|
+
throw 'Low surrogate without preceding high surrogate';
|
|
172
183
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
typeof ComponentOrLiteral === 'number' ||
|
|
177
|
-
typeof ComponentOrLiteral === 'boolean' ||
|
|
178
|
-
ComponentOrLiteral == null) {
|
|
179
|
-
return ComponentOrLiteral;
|
|
184
|
+
var prev = str.charCodeAt(i - 1);
|
|
185
|
+
if (0xd800 > prev || prev > 0xdbff) {
|
|
186
|
+
throw 'Low surrogate without preceding high surrogate';
|
|
180
187
|
}
|
|
181
|
-
return
|
|
188
|
+
return '';
|
|
182
189
|
};
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "6.
|
|
1
|
+
export declare const version = "6.9.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var version = '6.
|
|
1
|
+
export var version = '6.9.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.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/",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"react-markdown": "^5.0.3",
|
|
50
50
|
"react-player": "^2.7.0",
|
|
51
51
|
"react-textarea-autosize": "^8.3.0",
|
|
52
|
-
"react-virtuoso": "^
|
|
52
|
+
"react-virtuoso": "^2.2.0",
|
|
53
53
|
"stream-chat-css": "1.0.0",
|
|
54
54
|
"textarea-caret": "^3.1.0",
|
|
55
55
|
"uuid": "^8.3.1"
|