stream-chat-react 14.0.0 → 14.0.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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
3
  import Picker from "@emoji-mart/react";
4
- import { c as useTranslationContext, W as useMessageComposerContext, a as useMessageComposerController, X as useIsCooldownActive, s as usePopoverPosition, aH as IconEmoji, B as Button } from "./WithAudioPlayback.9b779236.mjs";
4
+ import { c as useTranslationContext, W as useMessageComposerContext, a as useMessageComposerController, X as useIsCooldownActive, s as usePopoverPosition, aH as IconEmoji, B as Button } from "./WithAudioPlayback.610fdf2c.mjs";
5
5
  import mergeWith from "lodash.mergewith";
6
6
  import { insertItemWithTrigger, getTriggerCharWithToken, replaceWordWithEntity, BaseSearchSource, getTokenizedSuggestionDisplayName } from "stream-chat";
7
7
  const isShadowRoot = (node) => !!node.host;
package/dist/es/index.mjs CHANGED
@@ -3,8 +3,8 @@ import clsx from "clsx";
3
3
  import { nanoid } from "nanoid";
4
4
  import React, { useState, useEffect, useCallback, useLayoutEffect, useMemo, useContext, createContext, useRef, forwardRef, createElement, Component, Fragment as Fragment$1 } from "react";
5
5
  import { u as useHandleFileChangeWrapper, d as dataTransferItemsToFiles, r as renderAudio, t as toAudioBuffer, c as createFileFromBlobs, g as getExtensionFromMimeType, a as getRecordedMediaTypeFromMimeType } from "./audioProcessing.21cb49e1.mjs";
6
- import { u as useStateStore, a as useMessageComposerController, i as isMessageBounced, b as useChannelActionContext, C as ComponentContext, c as useTranslationContext, d as useChannelStateContext, I as IconDownload, e as useChatContext, f as isNotificationForPanel, B as Button, g as IconPauseFill, h as IconPlayFill, j as getDefaultExportFromCjs, k as defaultTranslatorFunction, p as predefinedFormatters, L as LocalizedFormat, l as calendar, m as IconLoading, n as useComponentContext, o as isNetworkSendFailure, q as isUserMuted, r as useThreadContext, s as usePopoverPosition, t as IconXmark, v as IconUser, w as IconExclamationMarkFill, x as IconChevronRight, y as IconChevronLeft, z as IconArrowLeft, A as IconExclamationMark, D as IconNoSign, E as isMessageDeleted, F as isMessageErrorRetryable, G as ACTIONS_NOT_WORKING_IN_THREAD, H as useNotificationApi, J as IconArrowUpRight, K as IconPin, M as mapToUserNameOrId, N as IconClock, O as IconCheckmark1Small, P as IconChecks, Q as getReadByTooltipText, R as messageHasAttachments, S as messageTextHasEmojisOnly, T as isDate, U as getDateString, V as IconTranslate, W as useMessageComposerContext, X as useIsCooldownActive, Y as IconXmarkSmall, Z as IconImage, _ as IconPoll, $ as IconLocation, a0 as IconFile, a1 as IconLink, a2 as IconVideo, a3 as IconCamera, a4 as IconVoice, a5 as IconBookmark, a6 as IconBell, a7 as IconChevronDown, a8 as IconMinus, a9 as IconPlusSmall, aa as IconCheckmark, ab as DEFAULT_LOAD_PAGE_SCROLL_THRESHOLD, ac as IconTrophy, ad as IconReorder, ae as IconMinusCircle, af as IconSend, ag as IconAudio, ah as IconUserAdd, ai as IconMute, aj as IconGiphy, ak as IconFlag, al as IconUserRemove, am as IconAttachment, an as IconCommand, ao as CHANNEL_CONTAINER_ID, ap as IconPlus, aq as IconUnsupportedAttachment, ar as IconExclamationTriangleFill, as as useAudioPlayer, at as IconMicrophoneSolid, au as IconVideoFill, av as IconRetry, aw as IconArrowDownCircle, ax as IconBolt, ay as IconDelete, az as IconUpload, aA as MessageComposerContextProvider, aB as useTypingContext, aC as useChatViewContext, aD as MESSAGE_ACTIONS, aE as LegacyThreadContext, aF as IconEmojiAdd, aG as IconReply, aH as IconEmoji, aI as IconMore, aJ as IconUserCheck, aK as IconBookmarkRemove, aL as IconBellOff, aM as IconNotification, aN as IconEdit, aO as IconCopy, aP as IconUnpin, aQ as IconQuote, aR as IconThread, aS as areMessageUIPropsEqual, aT as isDateSeparatorMessage, aU as isMessageBlocked, aV as messageHasSingleAttachment, aW as messageHasGiphyAttachment, aX as messageHasReactions, aY as messageHasQuotedMessage, aZ as isMessageEdited, a_ as countEmojis, a$ as areMessagePropsEqual, b0 as getMessageActions, b1 as processMessages, b2 as insertIntro, b3 as getGroupStyles, b4 as getLastReceived, b5 as IconArrowUp, b6 as isIntroMessage, b7 as isLocalMessage, b8 as getIsFirstUnreadMessage, b9 as IconArrowDown, ba as DEFAULT_NEXT_CHANNEL_PAGE_SIZE, bb as EmptyStateIndicator, bc as useNotificationTarget, bd as getChannel, be as IconSearch, bf as IconXCircle, bg as useChannelListContext, bh as DEFAULT_JUMP_TO_PAGE_SIZE, bi as ChannelListContextProvider, bj as IconLeave, bk as IconArchive, bl as IconExclamationCircleFill, bm as useThreadsViewContext, bn as IconMessageBubbles, bo as IconRefresh, bp as hasSystemNotificationTag, bq as IconEyeFill, br as defaultDateTimeParser, bs as isLanguageSupported, bt as ChatProvider, bu as TranslationProvider } from "./WithAudioPlayback.9b779236.mjs";
7
- import { bz, bC, c4, c5, c6, c7, c8, c9, bE, bH, bD, bG, bI, ca, bL, bM, bN, bO, bP, cb, bR, bX, c2, c3, cc, cd, ce, bw, c0, bK, bJ, bx, by, bS, bT, bZ, b_, b$, bW, cf, bY, cg, bV, bU, bv, bF, bA, bB, c1, bQ } from "./WithAudioPlayback.9b779236.mjs";
6
+ import { u as useStateStore, a as useMessageComposerController, i as isMessageBounced, b as useChannelActionContext, C as ComponentContext, c as useTranslationContext, d as useChannelStateContext, I as IconDownload, e as useChatContext, f as isNotificationForPanel, B as Button, g as IconPauseFill, h as IconPlayFill, j as getDefaultExportFromCjs, k as defaultTranslatorFunction, p as predefinedFormatters, L as LocalizedFormat, l as calendar, m as IconLoading, n as useComponentContext, o as isNetworkSendFailure, q as isUserMuted, r as useThreadContext, s as usePopoverPosition, t as IconXmark, v as IconUser, w as IconExclamationMarkFill, x as IconChevronRight, y as IconChevronLeft, z as IconArrowLeft, A as IconExclamationMark, D as IconNoSign, E as isMessageDeleted, F as isMessageErrorRetryable, G as ACTIONS_NOT_WORKING_IN_THREAD, H as useNotificationApi, J as IconArrowUpRight, K as IconPin, M as mapToUserNameOrId, N as IconClock, O as IconCheckmark1Small, P as IconChecks, Q as getReadByTooltipText, R as messageHasAttachments, S as messageTextHasEmojisOnly, T as isDate, U as getDateString, V as IconTranslate, W as useMessageComposerContext, X as useIsCooldownActive, Y as IconXmarkSmall, Z as IconImage, _ as IconPoll, $ as IconLocation, a0 as IconFile, a1 as IconLink, a2 as IconVideo, a3 as IconCamera, a4 as IconVoice, a5 as IconBookmark, a6 as IconBell, a7 as IconChevronDown, a8 as IconMinus, a9 as IconPlusSmall, aa as IconCheckmark, ab as DEFAULT_LOAD_PAGE_SCROLL_THRESHOLD, ac as IconTrophy, ad as IconReorder, ae as IconMinusCircle, af as IconSend, ag as IconAudio, ah as IconUserAdd, ai as IconMute, aj as IconGiphy, ak as IconFlag, al as IconUserRemove, am as IconAttachment, an as IconCommand, ao as CHANNEL_CONTAINER_ID, ap as IconPlus, aq as IconUnsupportedAttachment, ar as IconExclamationTriangleFill, as as useAudioPlayer, at as IconMicrophoneSolid, au as IconVideoFill, av as IconRetry, aw as IconArrowDownCircle, ax as IconBolt, ay as IconDelete, az as IconUpload, aA as MessageComposerContextProvider, aB as useTypingContext, aC as useChatViewContext, aD as MESSAGE_ACTIONS, aE as LegacyThreadContext, aF as IconEmojiAdd, aG as IconReply, aH as IconEmoji, aI as IconMore, aJ as IconUserCheck, aK as IconBookmarkRemove, aL as IconBellOff, aM as IconNotification, aN as IconEdit, aO as IconCopy, aP as IconUnpin, aQ as IconQuote, aR as IconThread, aS as areMessageUIPropsEqual, aT as isDateSeparatorMessage, aU as isMessageBlocked, aV as messageHasSingleAttachment, aW as messageHasGiphyAttachment, aX as messageHasReactions, aY as messageHasQuotedMessage, aZ as isMessageEdited, a_ as countEmojis, a$ as areMessagePropsEqual, b0 as getMessageActions, b1 as processMessages, b2 as insertIntro, b3 as getGroupStyles, b4 as getLastReceived, b5 as IconArrowUp, b6 as isIntroMessage, b7 as isLocalMessage, b8 as getIsFirstUnreadMessage, b9 as IconArrowDown, ba as DEFAULT_NEXT_CHANNEL_PAGE_SIZE, bb as EmptyStateIndicator, bc as useNotificationTarget, bd as getChannel, be as IconSearch, bf as IconXCircle, bg as useChannelListContext, bh as DEFAULT_JUMP_TO_PAGE_SIZE, bi as ChannelListContextProvider, bj as IconLeave, bk as IconArchive, bl as IconExclamationCircleFill, bm as useThreadsViewContext, bn as IconMessageBubbles, bo as IconRefresh, bp as hasSystemNotificationTag, bq as IconEyeFill, br as defaultDateTimeParser, bs as isLanguageSupported, bt as ChatProvider, bu as TranslationProvider } from "./WithAudioPlayback.610fdf2c.mjs";
7
+ import { bz, bC, c4, c5, c6, c7, c8, c9, bE, bH, bD, bG, bI, ca, bL, bM, bN, bO, bP, cb, bR, bX, c2, c3, cc, cd, ce, bw, c0, bK, bJ, bx, by, bS, bT, bZ, b_, b$, bW, cf, bY, cg, bV, bU, bv, bF, bA, bB, c1, bQ } from "./WithAudioPlayback.610fdf2c.mjs";
8
8
  import { StateStore, isFileAttachment, isImageAttachment, isVideoAttachment, isAudioAttachment, isVoiceRecordingAttachment, formatMessage, MessageComposer as MessageComposer$1, isGiphyAttachment, isScrapedContent, isLocalVideoAttachment, isLocalImageAttachment, isVoteAnswer, VotingVisibility, isLocalVoiceRecordingAttachment, isLocalAudioAttachment, isLocalFileAttachment, isLocalAttachment, LinkPreviewsManager, isSharedLocationResponse, LiveLocationManager, SearchController, ChannelSearchSource, UserSearchSource, MessageSearchSource, StreamChat } from "stream-chat";
9
9
  import { sanitizeUrl } from "@braintree/sanitize-url";
10
10
  import throttle from "lodash.throttle";
@@ -19427,7 +19427,7 @@ const ThreadHeader = (props) => {
19427
19427
  const replyCount = threadInstance ? replyCountThreadInstance : thread ? thread.reply_count ?? 0 : 0;
19428
19428
  const threadDisplayName = overrideTitle ?? channelDisplayTitle ?? displayNameFromParentMessage(thread) ?? void 0;
19429
19429
  return /* @__PURE__ */ jsxs("div", { className: "str-chat__thread-header", children: [
19430
- activeChatView === "threads" && HeaderStartContent && /* @__PURE__ */ jsx("div", { className: "str-chat__thread-header__start", children: /* @__PURE__ */ jsx(HeaderStartContent, {}) }),
19430
+ /* @__PURE__ */ jsx("div", { className: "str-chat__thread-header__start", children: activeChatView === "threads" && HeaderStartContent && /* @__PURE__ */ jsx(HeaderStartContent, {}) }),
19431
19431
  /* @__PURE__ */ jsxs("div", { className: "str-chat__thread-header-details", children: [
19432
19432
  /* @__PURE__ */ jsx("div", { className: "str-chat__thread-header-title", children: t("Thread") }),
19433
19433
  /* @__PURE__ */ jsx(
@@ -20456,6 +20456,7 @@ const ReactionSelectorWithButton = ({
20456
20456
  {
20457
20457
  dialogManagerId: dialogManager?.id,
20458
20458
  id: dialogId2,
20459
+ offset: 8,
20459
20460
  placement: isMyMessage() ? "top-end" : "top-start",
20460
20461
  referenceElement: buttonRef.current,
20461
20462
  trapFocus: true,
@@ -21519,7 +21520,6 @@ const MessageActions = ({
21519
21520
  /* @__PURE__ */ jsx(
21520
21521
  ContextMenuComponent,
21521
21522
  {
21522
- allowFlip: false,
21523
21523
  backLabel: t("Back"),
21524
21524
  className: clsx("str-chat__message-actions-box", {
21525
21525
  "str-chat__message-actions-box--hidden": dropdownReactionSelectorDialogIsOpen,
@@ -28511,7 +28511,7 @@ const useChat = ({
28511
28511
  };
28512
28512
  useEffect(() => {
28513
28513
  if (!client) return;
28514
- const version = "14.0.0";
28514
+ const version = "14.0.1";
28515
28515
  const userAgent = client.getUserAgent();
28516
28516
  if (!userAgent.includes("stream-chat-react")) {
28517
28517
  client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);