@medipha/chat 1.0.61 → 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.
Files changed (36) hide show
  1. package/README.md +2 -0
  2. package/dist/dashboard/dashboard-module.d.ts +1 -1
  3. package/dist/dashboard/dashboard-module.types.d.ts +2 -5
  4. package/dist/features/composer/conversation-composer.d.ts +4 -0
  5. package/dist/features/composer/sticker/sticker-icon.d.ts +1 -0
  6. package/dist/features/composer/sticker/sticker-picker-button.d.ts +10 -0
  7. package/dist/features/composer/toolbar/composer-toolbar.d.ts +9 -3
  8. package/dist/features/message-list/bubble/message-bubble.d.ts +2 -1
  9. package/dist/features/message-list/bubble/message-content-body.d.ts +2 -1
  10. package/dist/features/stickers/sticker-keyword.d.ts +3 -0
  11. package/dist/features/stickers/sticker-label.d.ts +1 -0
  12. package/dist/features/stickers/sticker-message.d.ts +8 -0
  13. package/dist/features/stickers/sticker-picker/sticker-pack-section.d.ts +11 -0
  14. package/dist/features/stickers/sticker-picker/sticker-pack-tab-bar.d.ts +9 -0
  15. package/dist/features/stickers/sticker-picker/sticker-picker-panel.d.ts +8 -0
  16. package/dist/features/stickers/sticker-picker/use-active-sticker-section.d.ts +6 -0
  17. package/dist/features/stickers/sticker-picker/use-recent-stickers.d.ts +2 -0
  18. package/dist/features/stickers/sticker-sprite.d.ts +9 -0
  19. package/dist/features/stickers/sticker-storage.d.ts +2 -0
  20. package/dist/features/stickers/sticker-store.d.ts +15 -0
  21. package/dist/features/stickers/sticker-suggestion-bar.d.ts +9 -0
  22. package/dist/features/stickers/use-sticker-keyword-suggestions.d.ts +13 -0
  23. package/dist/features/stickers/use-sticker-playback.d.ts +2 -0
  24. package/dist/index.cjs +67 -66
  25. package/dist/index.js +11503 -10433
  26. package/dist/module/chat-module.types.d.ts +1 -0
  27. package/dist/module/session/chat-api-connection.d.ts +8 -0
  28. package/dist/module/session/chat-session.d.ts +2 -5
  29. package/dist/pages/conversation/conversation-detail/conversation-detail.d.ts +1 -0
  30. package/dist/pages/conversation/conversation-footer/conversation-footer.d.ts +1 -0
  31. package/dist/shared/components/user-profile-modal.d.ts +4 -4
  32. package/dist/shared/hooks/use-dismiss-on-outside-click.d.ts +9 -0
  33. package/dist/styles.css +1 -1
  34. package/dist/utils/chat.d.ts +2 -1
  35. package/package.json +2 -2
  36. package/dist/features/composer/stickers.d.ts +0 -6
@@ -7,6 +7,7 @@ export interface ChatModuleProps {
7
7
  expireTime: string | number;
8
8
  apiUrl: string;
9
9
  socketUrl: string;
10
+ stickerBaseUrl?: string;
10
11
  onUnauthorized?: () => void;
11
12
  onRefreshToken?: () => Promise<string>;
12
13
  onNavigateOutsideChat?: (path: string) => void;
@@ -0,0 +1,8 @@
1
+ export interface ChatApiConnectionConfig {
2
+ accessToken: string;
3
+ apiUrl: string;
4
+ stickerBaseUrl?: string;
5
+ onRefreshToken?: () => Promise<string>;
6
+ onUnauthorized?: () => void;
7
+ }
8
+ export declare function configureChatApiConnection({ accessToken, apiUrl, stickerBaseUrl, onRefreshToken, onUnauthorized, }: ChatApiConnectionConfig): void;
@@ -1,10 +1,7 @@
1
- export interface ChatSessionConfig {
2
- accessToken: string;
3
- apiUrl: string;
1
+ import { ChatApiConnectionConfig } from './chat-api-connection';
2
+ export interface ChatSessionConfig extends ChatApiConnectionConfig {
4
3
  socketUrl: string;
5
4
  userId: string;
6
- onRefreshToken?: () => Promise<string>;
7
- onUnauthorized?: () => void;
8
5
  }
9
6
  export declare function configureChatTransport(config: ChatSessionConfig): void;
10
7
  export declare function acquireChatSession(config: ChatSessionConfig): () => void;
@@ -69,6 +69,7 @@ interface ConversationDetailProps {
69
69
  onOpenMentionCard: (userId: string) => void;
70
70
  onOpenUserProfile: (userId: string) => void;
71
71
  onOpenImageLightbox: (message: ChatMessage, sources: MediaPreviewSource[], index: number) => void;
72
+ onOpenStickerPack?: (packSlug: string) => void;
72
73
  onRetry: (message: ChatMessage) => void;
73
74
  /** Failed sends never reached the server (no `id`), so removing one is a local-only drop. */
74
75
  onDeleteFailed: (message: ChatMessage) => void;
@@ -44,6 +44,7 @@ interface ConversationFooterProps {
44
44
  }
45
45
  export interface ConversationFooterHandle {
46
46
  focusComposer: () => void;
47
+ openStickerPack: (packSlug: string) => void;
47
48
  sendFiles: (files: File[]) => void;
48
49
  }
49
50
  /** The message composer itself — toolbar + input — plus its two hidden file inputs. Owns
@@ -17,9 +17,9 @@ interface UserProfileSummaryProps {
17
17
  actions?: ReactNode;
18
18
  }
19
19
  export declare function UserProfileSummary({ userId, fallbackName, isGroupOwner, actions, }: UserProfileSummaryProps): import('react/jsx-runtime').JSX.Element;
20
- /** Zalo-style "Thông tin tài khoản" dialog, opened from a user avatar click: avatar on
21
- * top, then contact details (họ tên, ngày sinh, email, số điện thoại) and a second
22
- * group with the directory info (chi nhánh, phòng ban, chức vụ). Portals to body with
23
- * the layered mask so it stacks above the member-list modal it may be opened from. */
20
+ /** Zalo-style "Thông tin tài khoản" dialog, opened from a user avatar click: avatar,
21
+ * name, work status, job title and department on top, then the "Thông tin cá nhân" and
22
+ * "Thông tin công việc" groups. Portals to body with the layered mask so it stacks above
23
+ * the member-list modal it may be opened from. */
24
24
  export declare function UserProfileModal({ userId, fallbackName, onClose, onStartChat, isGroupOwner, }: UserProfileModalProps): import('react').ReactPortal;
25
25
  export {};
@@ -0,0 +1,9 @@
1
+ import { RefObject } from 'react';
2
+ interface DismissOnOutsideClickOptions {
3
+ isOpen: boolean;
4
+ containerRef: RefObject<HTMLElement>;
5
+ triggerRef: RefObject<HTMLElement>;
6
+ onDismiss: () => void;
7
+ }
8
+ export declare function useDismissOnOutsideClick({ isOpen, containerRef, triggerRef, onDismiss, }: DismissOnOutsideClickOptions): void;
9
+ export {};