@linktr.ee/messaging-react 3.12.3-rc-1784036626 → 3.12.3-rc-1784083967

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/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BB78YkWG.cjs");exports.ActionButton=e.ActionButton;exports.Avatar=e.Avatar;exports.ChannelEmptyState=e.ChannelEmptyState;exports.ChannelList=e.ChannelList;exports.ChannelView=e.ChannelView;exports.CustomMessageProvider=e.CustomMessageProvider;exports.FaqList=e.FaqList;exports.FaqListItem=e.FaqListItem;exports.LinkAttachment=e.LinkAttachment;exports.LockedAttachment=e.LockedAttachment;exports.MediaMessage=e.MediaMessage;exports.MessageAttachment=e.MessageAttachment;exports.MessageBubble=e.MessageBubble;exports.MessageVoteButtons=e.MessageVoteButtons;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;exports.buildCompactMetaLabel=e.buildCompactMetaLabel;exports.formatFileSize=e.formatFileSize;exports.formatRelativeTime=e.formatRelativeTime;exports.getFileExtensionLabel=e.getFileExtensionLabel;exports.getMessageDisplayText=e.getMessageDisplayText;exports.isLinkAttachment=e.isLinkAttachment;exports.isUuidLike=e.isUuidLike;exports.messageAttachmentGroupPositionFromStream=e.bubbleGroupPositionFromStream;exports.normalizeLanguageCode=e.normalizeLanguageCode;exports.resolveConversationParticipant=e.resolveConversationParticipant;exports.resolveLinkAttachment=e.resolveLinkAttachment;exports.resolveMediaFromMessage=e.resolveMediaFromMessage;exports.resolveParticipantDisplayName=e.resolveParticipantDisplayName;exports.useComposerLocked=e.useComposerLocked;exports.useCustomMessage=e.useCustomMessage;exports.useMessageVote=e.useMessageVote;exports.useMessaging=e.useMessaging;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DSxpS5J9.cjs");exports.ActionButton=e.ActionButton;exports.Avatar=e.Avatar;exports.ChannelEmptyState=e.ChannelEmptyState;exports.ChannelList=e.ChannelList;exports.ChannelView=e.ChannelView;exports.CustomMessageProvider=e.CustomMessageProvider;exports.FaqList=e.FaqList;exports.FaqListItem=e.FaqListItem;exports.LinkAttachment=e.LinkAttachment;exports.LockedAttachment=e.LockedAttachment;exports.MediaMessage=e.MediaMessage;exports.MessageAttachment=e.MessageAttachment;exports.MessageBubble=e.MessageBubble;exports.MessageVoteButtons=e.MessageVoteButtons;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;exports.buildCompactMetaLabel=e.buildCompactMetaLabel;exports.formatFileSize=e.formatFileSize;exports.formatRelativeTime=e.formatRelativeTime;exports.getFileExtensionLabel=e.getFileExtensionLabel;exports.getMessageDisplayText=e.getMessageDisplayText;exports.isLinkAttachment=e.isLinkAttachment;exports.isUuidLike=e.isUuidLike;exports.messageAttachmentGroupPositionFromStream=e.bubbleGroupPositionFromStream;exports.normalizeLanguageCode=e.normalizeLanguageCode;exports.resolveConversationParticipant=e.resolveConversationParticipant;exports.resolveLinkAttachment=e.resolveLinkAttachment;exports.resolveMediaFromMessage=e.resolveMediaFromMessage;exports.resolveParticipantDisplayName=e.resolveParticipantDisplayName;exports.useComposerLocked=e.useComposerLocked;exports.useCustomMessage=e.useCustomMessage;exports.useMessageVote=e.useMessageVote;exports.useMessaging=e.useMessaging;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, b as t, C as i, c as o, d as n, e as m, F as r, f as g, L as l, h as M, M as u, i as c, j as L, k as h, l as d, m as p, n as v, p as C, q as A, s as k, t as F, u as b, v as P, w as f, x, y, z as B, B as S, D as q, E as z, G as D, H as E, I as V } from "./index-5kR8BcYv.js";
1
+ import { a as e, b as t, C as i, c as o, d as n, e as m, F as r, f as g, L as l, h as M, M as u, i as c, j as L, k as h, l as d, m as p, n as v, p as C, q as A, s as k, t as F, u as b, v as P, w as f, x, y, z as B, B as S, D as q, E as z, G as D, H as E, I as V } from "./index-B2BrYTjw.js";
2
2
  export {
3
3
  e as ActionButton,
4
4
  t as Avatar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/messaging-react",
3
- "version": "3.12.3-rc-1784036626",
3
+ "version": "3.12.3-rc-1784083967",
4
4
  "description": "React messaging components built on messaging-core for web applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@linktr.ee/component-library": "11.8.6",
53
- "@linktr.ee/messaging-core": "2.3.0-rc-1784036626",
53
+ "@linktr.ee/messaging-core": "2.3.0-rc-1784083967",
54
54
  "@phosphor-icons/react": "^2.1.10"
55
55
  },
56
56
  "devDependencies": {
@@ -8,6 +8,7 @@ import { ChannelView } from './ChannelView'
8
8
 
9
9
  let activeChannel: unknown
10
10
  let activeChannelProps: Record<string, unknown> = {}
11
+ let activeComponentOverrides: Record<string, unknown> = {}
11
12
 
12
13
  vi.mock('stream-chat-react', () => ({
13
14
  Channel: (props: {
@@ -25,9 +26,16 @@ vi.mock('stream-chat-react', () => ({
25
26
  MessageList: ({ head }: { head?: React.ReactElement }) => (
26
27
  <div data-testid="message-list">{head}</div>
27
28
  ),
28
- WithComponents: ({ children }: { children: React.ReactNode }) => (
29
- <>{children}</>
30
- ),
29
+ WithComponents: ({
30
+ children,
31
+ overrides,
32
+ }: {
33
+ children: React.ReactNode
34
+ overrides?: Record<string, unknown>
35
+ }) => {
36
+ activeComponentOverrides = overrides ?? {}
37
+ return <>{children}</>
38
+ },
31
39
  useMessageContext: () => ({ message: { id: 'message-1', text: 'hello' } }),
32
40
  useChannelStateContext: () => ({ channel: activeChannel }),
33
41
  useChatContext: () => ({
@@ -162,6 +170,7 @@ describe('ChannelView', () => {
162
170
  beforeEach(() => {
163
171
  activeChannel = undefined
164
172
  activeChannelProps = {}
173
+ activeComponentOverrides = {}
165
174
  avatarRenderCalls.length = 0
166
175
  channelActionsMenuProps.length = 0
167
176
  messageInputProps.length = 0
@@ -301,6 +310,17 @@ describe('ChannelView', () => {
301
310
  ).toBeGreaterThan(0)
302
311
  })
303
312
 
313
+ it('suppresses stream unread message UI overrides', () => {
314
+ renderWithProviders(<ChannelView channel={createChannel()} />)
315
+
316
+ expect(activeComponentOverrides.UnreadMessagesSeparator).toBeTypeOf(
317
+ 'function'
318
+ )
319
+ expect(activeComponentOverrides.UnreadMessagesNotification).toBeTypeOf(
320
+ 'function'
321
+ )
322
+ })
323
+
304
324
  it('hides the actions menu (both desktop and mobile) when showChannelInfo is false', () => {
305
325
  renderWithProviders(
306
326
  <ChannelView channel={createChannel()} showChannelInfo={false} />
@@ -523,6 +523,7 @@ const ChannelViewInner: React.FC<{
523
523
  overrides={{
524
524
  Message: MessageOverride,
525
525
  MessageActions: CustomMessageActions,
526
+ UnreadMessagesNotification: () => null,
526
527
  UnreadMessagesSeparator: () => null,
527
528
  }}
528
529
  >