reachat 1.0.1 → 1.0.2

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 CHANGED
@@ -53,6 +53,7 @@ theme via Tailwind.
53
53
  - Embeds ( Youtube )
54
54
  - remark plugin support
55
55
  - File Uploads
56
+ - Image Preview
56
57
  - Message Sources
57
58
  - Animations
58
59
  - Conversation Pagination
package/dist/Chat.d.ts CHANGED
@@ -54,5 +54,17 @@ export interface ChatProps extends PropsWithChildren {
54
54
  * Callback function to handle creating a new session.
55
55
  */
56
56
  onNewSession?: () => void;
57
+ /**
58
+ * Callback function to handle sending a new message.
59
+ */
60
+ onSendMessage?: (message: string) => void;
61
+ /**
62
+ * Callback function to handle stopping the current action.
63
+ */
64
+ onStopMessage?: () => void;
65
+ /**
66
+ * Callback function to handle file upload.
67
+ */
68
+ onFileUpload?: (file: File) => void;
57
69
  }
58
70
  export declare const Chat: FC<ChatProps>;
@@ -14,5 +14,8 @@ export interface ChatContextProps {
14
14
  selectSession?: (sessionId: string) => void;
15
15
  deleteSession?: (sessionId: string) => void;
16
16
  createSession?: () => void;
17
+ sendMessage?: (message: string) => void;
18
+ stopMessage?: () => void;
19
+ fileUpload?: (file: File) => void;
17
20
  }
18
21
  export declare const ChatContext: import('react').Context<ChatContextProps>;
@@ -25,18 +25,6 @@ interface ChatInputProps {
25
25
  * Icon to show for attach.
26
26
  */
27
27
  attachIcon?: ReactElement;
28
- /**
29
- * Callback function to handle sending a new message.
30
- */
31
- onSendMessage?: (message: string) => void;
32
- /**
33
- * Callback function to handle stopping the current action.
34
- */
35
- onStopMessage?: () => void;
36
- /**
37
- * Callback function to handle file upload.
38
- */
39
- onFileUpload?: (file: File) => void;
40
28
  }
41
29
  export declare const ChatInput: FC<ChatInputProps>;
42
30
  export {};
@@ -1,5 +1,5 @@
1
1
  import { FC, ReactElement } from 'react';
2
- import { ConversationFile } from '../types';
2
+ import { ConversationFile } from '../../types';
3
3
 
4
4
  export interface MessageFileProps extends ConversationFile {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { ConversationFile } from '../types';
1
+ import { ConversationFile } from '../../types';
2
2
  import { FC, PropsWithChildren } from 'react';
3
3
 
4
4
  interface MessageFilesProps extends PropsWithChildren {
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { ConversationSource } from '../types';
2
+ import { ConversationSource } from '../../types';
3
3
 
4
4
  export interface MessageSourceProps extends ConversationSource {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { ConversationSource } from '../types';
1
+ import { ConversationSource } from '../../types';
2
2
  import { FC, PropsWithChildren } from 'react';
3
3
 
4
4
  interface MessageSourcesProps extends PropsWithChildren {
@@ -1,5 +1,5 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { Conversation } from '../types';
2
+ import { Conversation } from '../../types';
3
3
 
4
4
  interface SessionMessageProps extends PropsWithChildren {
5
5
  /**
@@ -0,0 +1,8 @@
1
+ export * from './SessionMessage';
2
+ export * from './MessageSource';
3
+ export * from './MessageActions';
4
+ export * from './MessageFile';
5
+ export * from './MessageFiles';
6
+ export * from './MessageQuestion';
7
+ export * from './MessageResponse';
8
+ export * from './MessageSources';
@@ -3,10 +3,3 @@ export * from './SessionMessagesHeader';
3
3
  export * from './SessionMessagePanel';
4
4
  export * from './SessionMessage';
5
5
  export * from './SessionMessages';
6
- export * from './MessageSource';
7
- export * from './MessageActions';
8
- export * from './MessageFile';
9
- export * from './MessageFiles';
10
- export * from './MessageQuestion';
11
- export * from './MessageResponse';
12
- export * from './MessageSources';