@linktr.ee/messaging-react 1.22.3 → 1.23.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/index.d.ts CHANGED
@@ -65,7 +65,7 @@ export declare const ChannelView: default_2.NamedExoticComponent<ChannelViewProp
65
65
  * Props that MessagingShell passes through to ChannelView.
66
66
  * ChannelViewProps is the source of truth for these props.
67
67
  */
68
- declare type ChannelViewPassthroughProps = Pick<ChannelViewProps, 'renderMessageInputActions' | 'CustomChannelEmptyState' | 'onDeleteConversationClick' | 'onBlockParticipantClick' | 'onReportParticipantClick' | 'dmAgentEnabled' | 'messageMetadata' | 'onMessageSent' | 'showStarButton' | 'chatbotVotingEnabled' | 'renderChannelBanner' | 'customChannelActions'>;
68
+ declare type ChannelViewPassthroughProps = Pick<ChannelViewProps, 'renderMessageInputActions' | 'CustomChannelEmptyState' | 'onDeleteConversationClick' | 'onBlockParticipantClick' | 'onReportParticipantClick' | 'dmAgentEnabled' | 'messageMetadata' | 'onMessageSent' | 'showStarButton' | 'chatbotVotingEnabled' | 'renderChannelBanner' | 'customChannelActions' | 'renderMessage'>;
69
69
 
70
70
  /**
71
71
  * ChannelView component props
@@ -148,6 +148,18 @@ export declare interface ChannelViewProps {
148
148
  * Use the exported ActionButton for consistent styling.
149
149
  */
150
150
  customChannelActions?: React.ReactNode;
151
+ /**
152
+ * Custom render function for decorating each message in the message list.
153
+ * Receives the default message node and the message object.
154
+ *
155
+ * @example
156
+ * renderMessage={(messageNode, message) => (
157
+ * <MessageDecorator isStarred={Boolean(message.pinned)}>
158
+ * {messageNode}
159
+ * </MessageDecorator>
160
+ * )}
161
+ */
162
+ renderMessage?: (messageNode: React.ReactElement, message: LocalMessage) => React.ReactNode;
151
163
  }
152
164
 
153
165
  declare type DmAgentSystemType = 'SYSTEM_DM_AGENT_PAUSED' | 'SYSTEM_DM_AGENT_RESUMED';