stream-chat-react 12.0.0 → 12.1.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/Channel/Channel.d.ts +3 -103
- package/dist/components/MessageList/MessageList.js +2 -2
- package/dist/components/MessageList/MessageListMainPanel.d.ts +1 -1
- package/dist/components/MessageList/MessageListMainPanel.js +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +2 -2
- package/dist/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.js +2 -2
- package/dist/context/ComponentContext.d.ts +50 -1
- package/dist/index.browser.cjs +8 -6
- package/dist/index.browser.cjs.map +3 -3
- package/dist/index.node.cjs +8 -6
- package/dist/index.node.cjs.map +3 -3
- package/package.json +1 -1
package/dist/index.node.cjs
CHANGED
|
@@ -47994,7 +47994,7 @@ var import_react161 = require("react");
|
|
|
47994
47994
|
|
|
47995
47995
|
// src/components/MessageList/MessageListMainPanel.tsx
|
|
47996
47996
|
var import_react159 = __toESM(require("react"));
|
|
47997
|
-
var MESSAGE_LIST_MAIN_PANEL_CLASS = "str-chat__main-panel-inner";
|
|
47997
|
+
var MESSAGE_LIST_MAIN_PANEL_CLASS = "str-chat__main-panel-inner str-chat__message-list-main-panel";
|
|
47998
47998
|
var MessageListMainPanel = ({ children }) => /* @__PURE__ */ import_react159.default.createElement("div", { className: MESSAGE_LIST_MAIN_PANEL_CLASS }, children);
|
|
47999
47999
|
|
|
48000
48000
|
// src/components/MessageList/UnreadMessagesSeparator.tsx
|
|
@@ -48032,9 +48032,9 @@ var useUnreadMessagesNotification = ({
|
|
|
48032
48032
|
setShow(false);
|
|
48033
48033
|
return;
|
|
48034
48034
|
}
|
|
48035
|
-
const msgListPanel = document.
|
|
48035
|
+
const [msgListPanel] = document.getElementsByClassName(MESSAGE_LIST_MAIN_PANEL_CLASS);
|
|
48036
48036
|
if (!msgListPanel) return;
|
|
48037
|
-
const observedTarget = document.
|
|
48037
|
+
const [observedTarget] = document.getElementsByClassName(UNREAD_MESSAGE_SEPARATOR_CLASS);
|
|
48038
48038
|
if (!observedTarget) {
|
|
48039
48039
|
setShow(true);
|
|
48040
48040
|
return;
|
|
@@ -48720,7 +48720,8 @@ var MessageListWithContext = (props) => {
|
|
|
48720
48720
|
MessageListNotifications: MessageListNotifications2 = MessageListNotifications,
|
|
48721
48721
|
MessageNotification: MessageNotification2 = MessageNotification,
|
|
48722
48722
|
TypingIndicator: TypingIndicator2 = TypingIndicator,
|
|
48723
|
-
UnreadMessagesNotification: UnreadMessagesNotification2 = UnreadMessagesNotification
|
|
48723
|
+
UnreadMessagesNotification: UnreadMessagesNotification2 = UnreadMessagesNotification,
|
|
48724
|
+
MessageListMainPanel: MessageListMainPanel2 = MessageListMainPanel
|
|
48724
48725
|
} = useComponentContext("MessageList");
|
|
48725
48726
|
const {
|
|
48726
48727
|
hasNewMessages,
|
|
@@ -48824,7 +48825,7 @@ var MessageListWithContext = (props) => {
|
|
|
48824
48825
|
}
|
|
48825
48826
|
}, [highlightedMessageId]);
|
|
48826
48827
|
const showEmptyStateIndicator = elements.length === 0 && !threadList;
|
|
48827
|
-
return /* @__PURE__ */ import_react175.default.createElement(MessageListContextProvider, { value: { listElement, scrollToBottom } }, /* @__PURE__ */ import_react175.default.createElement(
|
|
48828
|
+
return /* @__PURE__ */ import_react175.default.createElement(MessageListContextProvider, { value: { listElement, scrollToBottom } }, /* @__PURE__ */ import_react175.default.createElement(MessageListMainPanel2, null, /* @__PURE__ */ import_react175.default.createElement(DialogManagerProvider, { id: "message-list-dialog-manager" }, !threadList && showUnreadMessagesNotification && /* @__PURE__ */ import_react175.default.createElement(UnreadMessagesNotification2, { unreadCount: channelUnreadUiState?.unread_messages }), /* @__PURE__ */ import_react175.default.createElement(
|
|
48828
48829
|
"div",
|
|
48829
48830
|
{
|
|
48830
48831
|
className: (0, import_clsx38.default)(messageListClass, customClasses?.threadList),
|
|
@@ -49381,6 +49382,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
49381
49382
|
MessageListNotifications: MessageListNotifications2 = MessageListNotifications,
|
|
49382
49383
|
MessageNotification: MessageNotification2 = MessageNotification,
|
|
49383
49384
|
MessageSystem = EventComponent,
|
|
49385
|
+
MessageListMainPanel: MessageListMainPanel2 = MessageListMainPanel,
|
|
49384
49386
|
UnreadMessagesNotification: UnreadMessagesNotification2 = UnreadMessagesNotification,
|
|
49385
49387
|
UnreadMessagesSeparator: UnreadMessagesSeparator2 = UnreadMessagesSeparator,
|
|
49386
49388
|
VirtualMessage: MessageUIComponentFromContext = MessageSimple,
|
|
@@ -49533,7 +49535,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
49533
49535
|
};
|
|
49534
49536
|
}, [highlightedMessageId, processedMessages]);
|
|
49535
49537
|
if (!processedMessages) return null;
|
|
49536
|
-
return /* @__PURE__ */ import_react185.default.createElement(import_react185.default.Fragment, null, /* @__PURE__ */ import_react185.default.createElement(
|
|
49538
|
+
return /* @__PURE__ */ import_react185.default.createElement(import_react185.default.Fragment, null, /* @__PURE__ */ import_react185.default.createElement(MessageListMainPanel2, null, /* @__PURE__ */ import_react185.default.createElement(DialogManagerProvider, { id: "virtualized-message-list-dialog-manager" }, !threadList && showUnreadMessagesNotification && /* @__PURE__ */ import_react185.default.createElement(UnreadMessagesNotification2, { unreadCount: channelUnreadUiState?.unread_messages }), /* @__PURE__ */ import_react185.default.createElement("div", { className: customClasses?.virtualizedMessageList || "str-chat__virtual-list" }, /* @__PURE__ */ import_react185.default.createElement(
|
|
49537
49539
|
import_react_virtuoso2.Virtuoso,
|
|
49538
49540
|
{
|
|
49539
49541
|
atBottomStateChange,
|