@college-africa/chat-ui 1.3.2 → 2.0.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/components/CameraModal.d.ts +8 -0
- package/dist/components/ImageLightbox.d.ts +11 -0
- package/dist/components/MessageBubble.d.ts +1 -11
- package/dist/components/MessageInput.d.ts +2 -10
- package/dist/index.js +28 -9
- package/dist/index.mjs +4735 -1935
- package/dist/{summaries-DI36-zkM.js → summaries-CJ-n36dY.js} +64 -40
- package/dist/{summaries-BLYBgHwg.cjs → summaries-xrTgKTOr.cjs} +2 -2
- package/dist/utils/image.d.ts +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ImageLightboxProps {
|
|
3
|
+
src: string;
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
alt?: string;
|
|
7
|
+
senderName?: string;
|
|
8
|
+
onPrev?: () => void;
|
|
9
|
+
onNext?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const ImageLightbox: React.FC<ImageLightboxProps>;
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Message } from '@college-africa/chat-sdk';
|
|
3
3
|
export interface MessageBubbleProps {
|
|
4
|
-
/** The message to display */
|
|
5
4
|
message: Message;
|
|
6
|
-
/** Whether this message was sent by the current user */
|
|
7
5
|
isOwnMessage: boolean;
|
|
8
|
-
/** Optional sender name to display (if not provided, shows "User {id}") */
|
|
9
6
|
senderName?: string;
|
|
10
|
-
/** Whether to show sender name (hide for grouped messages) */
|
|
11
7
|
showSenderName?: boolean;
|
|
12
|
-
/** Whether this is the first message in a group */
|
|
13
8
|
isFirstInGroup?: boolean;
|
|
14
|
-
/** Whether this is the last message in a group */
|
|
15
9
|
isLastInGroup?: boolean;
|
|
16
|
-
/** Message send status (for optimistic UI) */
|
|
17
10
|
status?: "sending" | "sent" | "failed";
|
|
11
|
+
onImagePress?: (message: Message) => void;
|
|
18
12
|
}
|
|
19
|
-
/**
|
|
20
|
-
* MessageBubble component
|
|
21
|
-
* Displays a single message with sender info, content, and timestamp
|
|
22
|
-
*/
|
|
23
13
|
export declare const MessageBubble: React.FC<MessageBubbleProps>;
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { PendingMedia } from '@college-africa/chat-sdk';
|
|
2
3
|
export interface MessageInputProps {
|
|
3
|
-
|
|
4
|
-
onSend: (content: string) => void;
|
|
5
|
-
/** Whether a message is currently being sent */
|
|
4
|
+
onSend: (content: string, media?: PendingMedia[]) => void;
|
|
6
5
|
sending?: boolean;
|
|
7
|
-
/** Placeholder text */
|
|
8
6
|
placeholder?: string;
|
|
9
|
-
/** Disabled state */
|
|
10
7
|
disabled?: boolean;
|
|
11
|
-
/** Reason why input is disabled (displayed to user) */
|
|
12
8
|
disableReason?: string;
|
|
13
9
|
}
|
|
14
|
-
/**
|
|
15
|
-
* MessageInput component
|
|
16
|
-
* Text field with send button for composing and sending messages
|
|
17
|
-
*/
|
|
18
10
|
export declare const MessageInput: React.FC<MessageInputProps>;
|