@medipha/chat 1.0.62 → 1.0.63

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.
@@ -25,6 +25,7 @@ interface ConversationComposerProps {
25
25
  }
26
26
  export interface ConversationComposerHandle {
27
27
  focus: () => void;
28
+ openStickerPack: (packSlug: string) => void;
28
29
  insertMentionAtStart: (userId: string, fallbackName: string) => void;
29
30
  /** Undoes the above when the reply is cancelled, leaving whatever else was typed. */
30
31
  removeMentionAtStart: (userId: string) => void;
@@ -3,5 +3,8 @@ interface StickerPickerButtonProps {
3
3
  onSelectSticker: (sticker: StickerFrameAsset) => boolean;
4
4
  isCompact?: boolean;
5
5
  }
6
- export declare function StickerPickerButton({ onSelectSticker, isCompact }: StickerPickerButtonProps): import('react/jsx-runtime').JSX.Element;
6
+ export interface StickerPickerButtonHandle {
7
+ openPack: (packSlug: string) => void;
8
+ }
9
+ export declare const StickerPickerButton: import('react').ForwardRefExoticComponent<StickerPickerButtonProps & import('react').RefAttributes<StickerPickerButtonHandle>>;
7
10
  export {};
@@ -1,5 +1,6 @@
1
1
  import { Editor } from '@tiptap/core';
2
- import { ReactNode } from 'react';
2
+ import { ReactNode, RefObject } from 'react';
3
+ import { StickerPickerButtonHandle } from '../sticker/sticker-picker-button';
3
4
  import { StickerFrameAsset } from '@medipha/chat-core';
4
5
  interface ComposerToolbarProps {
5
6
  editor: Editor | null | undefined;
@@ -17,9 +18,11 @@ interface ComposerToolbarProps {
17
18
  showEmojiButton?: boolean;
18
19
  onSelectSticker?: (sticker: StickerFrameAsset) => boolean;
19
20
  showStickerButton?: boolean;
21
+ stickerPickerRef?: RefObject<StickerPickerButtonHandle>;
22
+ stickerPickerKey?: string;
20
23
  }
21
24
  /** Composer toolbar row: attach file/image, the "Định dạng" toggle, the emoji and sticker pickers, and
22
25
  * the "..." more menu — plus the format bar it reveals underneath when toggled open. Each
23
26
  * button's own popover/panel lives in its own feature folder; this just arranges them. */
24
- export declare function ComposerToolbar({ editor, onAttach, onAttachImages, isFormatOpen, onToggleFormat, isEnlarged, onToggleEnlarged, sendButton, isCollapsed, onExpand, showEmojiButton, onSelectSticker, showStickerButton, }: ComposerToolbarProps): import('react/jsx-runtime').JSX.Element;
27
+ export declare function ComposerToolbar({ editor, onAttach, onAttachImages, isFormatOpen, onToggleFormat, isEnlarged, onToggleEnlarged, sendButton, isCollapsed, onExpand, showEmojiButton, onSelectSticker, showStickerButton, stickerPickerRef, stickerPickerKey, }: ComposerToolbarProps): import('react/jsx-runtime').JSX.Element;
25
28
  export {};
@@ -40,6 +40,7 @@ export interface MessageBubbleProps {
40
40
  onOpenMentionCard: (userId: string, fallbackName?: string) => void;
41
41
  onOpenSystemMembers: (messageId: string, totalCount: number, actionLabel: string) => void;
42
42
  onOpenImageLightbox: (sources: MediaPreviewSource[], index: number) => void;
43
+ onOpenStickerPack?: (packSlug: string) => void;
43
44
  onImageSettled: () => void;
44
45
  onRetry: () => void;
45
46
  /** Failed send never reached the server (no `id`) — this is a local-only delete, not a recall. */
@@ -54,4 +55,4 @@ export interface MessageBubbleProps {
54
55
  /** Renders one message: day divider, SYSTEM notice, reply/forward context, bubble body
55
56
  * (delegated to MessageContentBody), reaction badge/picker (MessageReactions), action buttons
56
57
  * and options menu (MessageActionsMenu), and the trailing timestamp/status/retry. */
57
- export declare function MessageBubble({ message, isMine, currentUserId, resolveUserName, isGroup, isFocused, isLatestMessage, showDayDivider, isReactionPickerOpen, myReactionType, onOpenReactionPicker, onCloseReactionPickerIfSelf, onApplyReaction, onRemoveReaction, onOpenReactionModal, canManagePins, isPinned, onTogglePin, isMenuOpen, menuPosition, onOpenMenu, onCloseMenu, onCopyMessage, onViewDetails, canRemove, removeLabel, isRemoving, onRemove, onReply, onForward, onJumpToReply, onOpenMentionCard, onOpenSystemMembers, onOpenImageLightbox, onImageSettled, onRetry, onDeleteFailed, isSenderGroupOwner, resolveUserAvatar, onOpenUserProfile, }: MessageBubbleProps): import('react/jsx-runtime').JSX.Element;
58
+ export declare function MessageBubble({ message, isMine, currentUserId, resolveUserName, isGroup, isFocused, isLatestMessage, showDayDivider, isReactionPickerOpen, myReactionType, onOpenReactionPicker, onCloseReactionPickerIfSelf, onApplyReaction, onRemoveReaction, onOpenReactionModal, canManagePins, isPinned, onTogglePin, isMenuOpen, menuPosition, onOpenMenu, onCloseMenu, onCopyMessage, onViewDetails, canRemove, removeLabel, isRemoving, onRemove, onReply, onForward, onJumpToReply, onOpenMentionCard, onOpenSystemMembers, onOpenImageLightbox, onOpenStickerPack, onImageSettled, onRetry, onDeleteFailed, isSenderGroupOwner, resolveUserAvatar, onOpenUserProfile, }: MessageBubbleProps): import('react/jsx-runtime').JSX.Element;
@@ -6,8 +6,9 @@ interface MessageContentBodyProps {
6
6
  onOpenImageLightbox: (sources: MediaPreviewSource[], index: number) => void;
7
7
  onImageSettled: () => void;
8
8
  onOpenMentionCard: (userId: string, fallbackName?: string) => void;
9
+ onOpenStickerPack?: (packSlug: string) => void;
9
10
  }
10
11
  /** The bubble's inner content: image grid, document attachment(s), or marked-up text
11
12
  * with clickable links/mentions — whichever the message type calls for. */
12
- export declare function MessageContentBody({ message, isLatestMessage, onOpenImageLightbox, onImageSettled, onOpenMentionCard, }: MessageContentBodyProps): import('react/jsx-runtime').JSX.Element;
13
+ export declare function MessageContentBody({ message, isLatestMessage, onOpenImageLightbox, onImageSettled, onOpenMentionCard, onOpenStickerPack, }: MessageContentBodyProps): import('react/jsx-runtime').JSX.Element;
13
14
  export {};
@@ -2,6 +2,7 @@ import { StickerId } from '@medipha/chat-core';
2
2
  export declare const STICKER_MESSAGE_SIZE = 130;
3
3
  interface StickerMessageProps {
4
4
  stickerId: StickerId | null | undefined;
5
+ onOpenPack?: (packSlug: string) => void;
5
6
  }
6
- export declare function StickerMessage({ stickerId }: StickerMessageProps): import('react/jsx-runtime').JSX.Element;
7
+ export declare function StickerMessage({ stickerId, onOpenPack }: StickerMessageProps): import('react/jsx-runtime').JSX.Element;
7
8
  export {};
@@ -2,6 +2,7 @@ import { StickerFrameAsset } from '@medipha/chat-core';
2
2
  interface StickerPickerPanelProps {
3
3
  onSelectSticker: (sticker: StickerFrameAsset) => void;
4
4
  onClose: () => void;
5
+ initialPackSlug?: string;
5
6
  }
6
- export declare function StickerPickerPanel({ onSelectSticker, onClose }: StickerPickerPanelProps): import('react/jsx-runtime').JSX.Element;
7
+ export declare function StickerPickerPanel({ onSelectSticker, onClose, initialPackSlug, }: StickerPickerPanelProps): import('react/jsx-runtime').JSX.Element;
7
8
  export {};