@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.
- package/README.md +2 -0
- package/dist/dashboard/dashboard-module.d.ts +1 -1
- package/dist/dashboard/dashboard-module.types.d.ts +2 -5
- package/dist/features/composer/conversation-composer.d.ts +4 -0
- package/dist/features/composer/sticker/sticker-icon.d.ts +1 -0
- package/dist/features/composer/sticker/sticker-picker-button.d.ts +10 -0
- package/dist/features/composer/toolbar/composer-toolbar.d.ts +9 -3
- package/dist/features/message-list/bubble/message-bubble.d.ts +2 -1
- package/dist/features/message-list/bubble/message-content-body.d.ts +2 -1
- package/dist/features/stickers/sticker-keyword.d.ts +3 -0
- package/dist/features/stickers/sticker-label.d.ts +1 -0
- package/dist/features/stickers/sticker-message.d.ts +8 -0
- package/dist/features/stickers/sticker-picker/sticker-pack-section.d.ts +11 -0
- package/dist/features/stickers/sticker-picker/sticker-pack-tab-bar.d.ts +9 -0
- package/dist/features/stickers/sticker-picker/sticker-picker-panel.d.ts +8 -0
- package/dist/features/stickers/sticker-picker/use-active-sticker-section.d.ts +6 -0
- package/dist/features/stickers/sticker-picker/use-recent-stickers.d.ts +2 -0
- package/dist/features/stickers/sticker-sprite.d.ts +9 -0
- package/dist/features/stickers/sticker-storage.d.ts +2 -0
- package/dist/features/stickers/sticker-store.d.ts +15 -0
- package/dist/features/stickers/sticker-suggestion-bar.d.ts +9 -0
- package/dist/features/stickers/use-sticker-keyword-suggestions.d.ts +13 -0
- package/dist/features/stickers/use-sticker-playback.d.ts +2 -0
- package/dist/index.cjs +67 -66
- package/dist/index.js +11503 -10433
- package/dist/module/chat-module.types.d.ts +1 -0
- package/dist/module/session/chat-api-connection.d.ts +8 -0
- package/dist/module/session/chat-session.d.ts +2 -5
- package/dist/pages/conversation/conversation-detail/conversation-detail.d.ts +1 -0
- package/dist/pages/conversation/conversation-footer/conversation-footer.d.ts +1 -0
- package/dist/shared/components/user-profile-modal.d.ts +4 -4
- package/dist/shared/hooks/use-dismiss-on-outside-click.d.ts +9 -0
- package/dist/styles.css +1 -1
- package/dist/utils/chat.d.ts +2 -1
- package/package.json +2 -2
- package/dist/features/composer/stickers.d.ts +0 -6
|
@@ -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
|
-
|
|
2
|
-
|
|
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
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* the
|
|
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 {};
|