@scalemule/chat 0.0.7 → 0.0.9
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/react-components/ChatInput.d.ts +10 -2
- package/dist/react-components/ChatInput.d.ts.map +1 -1
- package/dist/react-components/ChatMessageItem.d.ts +13 -2
- package/dist/react-components/ChatMessageItem.d.ts.map +1 -1
- package/dist/react-components/ChatMessageList.d.ts +20 -4
- package/dist/react-components/ChatMessageList.d.ts.map +1 -1
- package/dist/react-components/ChatThread.d.ts +8 -1
- package/dist/react-components/ChatThread.d.ts.map +1 -1
- package/dist/react-components/EmojiPicker.d.ts +8 -1
- package/dist/react-components/EmojiPicker.d.ts.map +1 -1
- package/dist/react-components/ReactionBar.d.ts +10 -0
- package/dist/react-components/ReactionBar.d.ts.map +1 -0
- package/dist/react-components/ReportDialog.d.ts +30 -0
- package/dist/react-components/ReportDialog.d.ts.map +1 -0
- package/dist/react-components/index.d.ts +3 -1
- package/dist/react-components/index.d.ts.map +1 -1
- package/dist/react.cjs +1981 -559
- package/dist/react.d.cts +97 -13
- package/dist/react.d.ts +1 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +1913 -494
- package/dist/support-widget.global.js +50 -25
- package/dist/widget/styles.d.ts +1 -1
- package/dist/widget/styles.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Attachment } from '../types';
|
|
3
3
|
interface ChatInputProps {
|
|
4
|
-
onSend: (content: string, attachments
|
|
4
|
+
onSend: (content: string, attachments?: Attachment[]) => void | Promise<void>;
|
|
5
5
|
onTypingChange?: (isTyping: boolean) => void;
|
|
6
6
|
onUploadAttachment?: (file: File | Blob, onProgress?: (percent: number) => void, signal?: AbortSignal) => Promise<{
|
|
7
7
|
data: Attachment | null;
|
|
@@ -9,8 +9,16 @@ interface ChatInputProps {
|
|
|
9
9
|
message: string;
|
|
10
10
|
} | null;
|
|
11
11
|
} | undefined>;
|
|
12
|
+
onDeleteAttachment?: (fileId: string) => void | Promise<void>;
|
|
13
|
+
onValidateFile?: (file: File) => {
|
|
14
|
+
valid: boolean;
|
|
15
|
+
error?: string;
|
|
16
|
+
};
|
|
12
17
|
placeholder?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
maxAttachments?: number;
|
|
20
|
+
accept?: string;
|
|
13
21
|
}
|
|
14
|
-
export declare function ChatInput({ onSend, onTypingChange, onUploadAttachment, placeholder, }: ChatInputProps): React.JSX.Element;
|
|
22
|
+
export declare function ChatInput({ onSend, onTypingChange, onUploadAttachment, onDeleteAttachment, onValidateFile, placeholder, disabled, maxAttachments, accept, }: ChatInputProps): React.JSX.Element;
|
|
15
23
|
export {};
|
|
16
24
|
//# sourceMappingURL=ChatInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAa3C,UAAU,cAAc;IACtB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,kBAAkB,CAAC,EAAE,CACnB,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACtC,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;IACzF,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,WAAiC,EACjC,QAAgB,EAChB,cAAkB,EAClB,MAA0B,GAC3B,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAgkBpC"}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ChatMessage } from '../types';
|
|
3
|
+
interface UserProfile {
|
|
4
|
+
display_name: string;
|
|
5
|
+
username?: string;
|
|
6
|
+
avatar_url?: string;
|
|
7
|
+
}
|
|
3
8
|
interface ChatMessageItemProps {
|
|
4
9
|
message: ChatMessage;
|
|
5
10
|
currentUserId?: string;
|
|
11
|
+
conversationId?: string;
|
|
12
|
+
profile?: UserProfile;
|
|
6
13
|
onAddReaction?: (messageId: string, emoji: string) => void | Promise<void>;
|
|
7
14
|
onRemoveReaction?: (messageId: string, emoji: string) => void | Promise<void>;
|
|
8
|
-
|
|
15
|
+
onEdit?: (messageId: string, content: string) => void | Promise<void>;
|
|
16
|
+
onDelete?: (messageId: string) => void | Promise<void>;
|
|
17
|
+
onReport?: (messageId: string) => void;
|
|
18
|
+
onFetchAttachmentUrl?: (fileId: string) => Promise<string>;
|
|
19
|
+
isOwnMessage?: boolean;
|
|
9
20
|
highlight?: boolean;
|
|
10
21
|
}
|
|
11
|
-
export declare function ChatMessageItem({ message, currentUserId, onAddReaction, onRemoveReaction, onReport, highlight, }: ChatMessageItemProps): React.JSX.Element;
|
|
22
|
+
export declare function ChatMessageItem({ message, currentUserId, conversationId, profile, onAddReaction, onRemoveReaction, onEdit, onDelete, onReport, onFetchAttachmentUrl, isOwnMessage: isOwnMessageProp, highlight, }: ChatMessageItemProps): React.JSX.Element;
|
|
12
23
|
export {};
|
|
13
24
|
//# sourceMappingURL=ChatMessageItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessageItem.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatMessageItem.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatMessageItem.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatMessageItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,UAAU,CAAC;AAuBxD,UAAU,WAAW;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,oBAAoB;IAC5B,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAqKD,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,aAAa,EACb,cAAc,EACd,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,YAAY,EAAE,gBAAgB,EAC9B,SAAiB,GAClB,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6Z1C"}
|
|
@@ -1,15 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ChatMessage } from '../types';
|
|
3
|
+
interface UserProfile {
|
|
4
|
+
display_name: string;
|
|
5
|
+
username?: string;
|
|
6
|
+
avatar_url?: string;
|
|
7
|
+
}
|
|
3
8
|
interface ChatMessageListProps {
|
|
4
9
|
messages: ChatMessage[];
|
|
5
10
|
currentUserId?: string;
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
conversationId?: string;
|
|
12
|
+
profiles?: Map<string, UserProfile>;
|
|
13
|
+
hasMore?: boolean;
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
onLoadMore?: () => void;
|
|
8
16
|
onAddReaction?: (messageId: string, emoji: string) => void | Promise<void>;
|
|
9
17
|
onRemoveReaction?: (messageId: string, emoji: string) => void | Promise<void>;
|
|
10
|
-
|
|
18
|
+
onEdit?: (messageId: string, content: string) => void | Promise<void>;
|
|
19
|
+
onDelete?: (messageId: string) => void | Promise<void>;
|
|
20
|
+
onReport?: (messageId: string) => void;
|
|
21
|
+
onFetchAttachmentUrl?: (fileId: string) => Promise<string>;
|
|
22
|
+
firstUnreadMessageId?: string;
|
|
23
|
+
/** @deprecated use firstUnreadMessageId instead */
|
|
24
|
+
unreadSince?: string;
|
|
25
|
+
isNearBottom?: boolean;
|
|
26
|
+
onReachBottom?: () => void;
|
|
11
27
|
emptyState?: React.ReactNode;
|
|
12
28
|
}
|
|
13
|
-
export declare function ChatMessageList({ messages, currentUserId,
|
|
29
|
+
export declare function ChatMessageList({ messages, currentUserId, conversationId, profiles, hasMore, isLoading, onLoadMore, onAddReaction, onRemoveReaction, onEdit, onDelete, onReport, onFetchAttachmentUrl, firstUnreadMessageId, unreadSince, isNearBottom: isNearBottomProp, onReachBottom, emptyState, }: ChatMessageListProps): React.JSX.Element;
|
|
14
30
|
export {};
|
|
15
31
|
//# sourceMappingURL=ChatMessageList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessageList.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatMessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatMessageList.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatMessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,UAAU,WAAW;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAyBD,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,aAAa,EACb,cAAc,EACd,QAAQ,EACR,OAAe,EACf,SAAiB,EACjB,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,YAAY,EAAE,gBAAgB,EAC9B,aAAa,EACb,UAAU,GACX,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwU1C"}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ChatTheme } from './theme';
|
|
3
|
+
interface UserProfile {
|
|
4
|
+
display_name: string;
|
|
5
|
+
username?: string;
|
|
6
|
+
avatar_url?: string;
|
|
7
|
+
}
|
|
3
8
|
interface ChatThreadProps {
|
|
4
9
|
conversationId: string;
|
|
5
10
|
theme?: ChatTheme;
|
|
6
11
|
currentUserId?: string;
|
|
12
|
+
profiles?: Map<string, UserProfile>;
|
|
7
13
|
title?: string;
|
|
8
14
|
subtitle?: string;
|
|
15
|
+
onFetchAttachmentUrl?: (fileId: string) => Promise<string>;
|
|
9
16
|
}
|
|
10
|
-
export declare function ChatThread({ conversationId, theme, currentUserId, title, subtitle, }: ChatThreadProps): React.JSX.Element;
|
|
17
|
+
export declare function ChatThread({ conversationId, theme, currentUserId, profiles, title, subtitle, onFetchAttachmentUrl, }: ChatThreadProps): React.JSX.Element;
|
|
11
18
|
export {};
|
|
12
19
|
//# sourceMappingURL=ChatThread.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatThread.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatThread.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAMlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,UAAU,eAAe;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatThread.d.ts","sourceRoot":"","sources":["../../src/react-components/ChatThread.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAMlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,UAAU,WAAW;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,eAAe;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5D;AAUD,wBAAgB,UAAU,CAAC,EACzB,cAAc,EACd,KAAK,EACL,aAAa,EACb,QAAQ,EACR,KAAc,EACd,QAAQ,EACR,oBAAoB,GACrB,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAgKrC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface EmojiPickerProps {
|
|
3
3
|
onSelect: (emoji: string) => void;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
anchorRef: React.RefObject<HTMLButtonElement | null>;
|
|
4
6
|
emojis?: string[];
|
|
5
7
|
}
|
|
6
|
-
export declare function EmojiPicker({ onSelect, emojis, }: EmojiPickerProps): React.JSX.Element;
|
|
8
|
+
export declare function EmojiPicker({ onSelect, onClose, anchorRef, emojis, }: EmojiPickerProps): React.JSX.Element | null;
|
|
9
|
+
interface EmojiPickerTriggerProps {
|
|
10
|
+
onSelect: (emoji: string) => void;
|
|
11
|
+
emojis?: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare function EmojiPickerTrigger({ onSelect, emojis, }: EmojiPickerTriggerProps): React.JSX.Element;
|
|
7
14
|
export {};
|
|
8
15
|
//# sourceMappingURL=EmojiPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmojiPicker.d.ts","sourceRoot":"","sources":["../../src/react-components/EmojiPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"EmojiPicker.d.ts","sourceRoot":"","sources":["../../src/react-components/EmojiPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,gBAAgB;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,OAAO,EACP,SAAS,EACT,MAAwB,GACzB,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA6F7C;AAED,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,MAAM,GACP,EAAE,uBAAuB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA4D7C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactionSummary } from '../types';
|
|
3
|
+
interface ReactionBarProps {
|
|
4
|
+
reactions: ReactionSummary[];
|
|
5
|
+
currentUserId?: string;
|
|
6
|
+
onToggleReaction: (emoji: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function ReactionBar({ reactions, currentUserId, onToggleReaction, }: ReactionBarProps): React.JSX.Element | null;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ReactionBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactionBar.d.ts","sourceRoot":"","sources":["../../src/react-components/ReactionBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,UAAU,gBAAgB;IACxB,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,aAAa,EACb,gBAAgB,GACjB,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAyC7C"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const REPORT_REASONS: readonly [{
|
|
3
|
+
readonly value: "spam";
|
|
4
|
+
readonly label: "Spam";
|
|
5
|
+
}, {
|
|
6
|
+
readonly value: "harassment";
|
|
7
|
+
readonly label: "Harassment";
|
|
8
|
+
}, {
|
|
9
|
+
readonly value: "hate";
|
|
10
|
+
readonly label: "Hate speech";
|
|
11
|
+
}, {
|
|
12
|
+
readonly value: "violence";
|
|
13
|
+
readonly label: "Violence";
|
|
14
|
+
}, {
|
|
15
|
+
readonly value: "other";
|
|
16
|
+
readonly label: "Other";
|
|
17
|
+
}];
|
|
18
|
+
type ReportReason = (typeof REPORT_REASONS)[number]['value'];
|
|
19
|
+
interface ReportDialogProps {
|
|
20
|
+
messageId: string;
|
|
21
|
+
onSubmit: (data: {
|
|
22
|
+
messageId: string;
|
|
23
|
+
reason: ReportReason;
|
|
24
|
+
description?: string;
|
|
25
|
+
}) => void | Promise<void>;
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function ReportDialog({ messageId, onSubmit, onClose, }: ReportDialogProps): React.JSX.Element;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=ReportDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportDialog.d.ts","sourceRoot":"","sources":["../../src/react-components/ReportDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;EAMV,CAAC;AAEX,KAAK,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;AAE7D,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,IAAI,EAAE;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,YAAY,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,OAAO,GACR,EAAE,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6SvC"}
|
|
@@ -3,6 +3,8 @@ export { ChatMessageItem } from './ChatMessageItem';
|
|
|
3
3
|
export { ChatMessageList } from './ChatMessageList';
|
|
4
4
|
export { ChatThread } from './ChatThread';
|
|
5
5
|
export { ConversationList } from './ConversationList';
|
|
6
|
-
export { EmojiPicker } from './EmojiPicker';
|
|
6
|
+
export { EmojiPicker, EmojiPickerTrigger } from './EmojiPicker';
|
|
7
|
+
export { ReactionBar } from './ReactionBar';
|
|
8
|
+
export { ReportDialog } from './ReportDialog';
|
|
7
9
|
export type { ChatTheme } from './theme';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|