reachat 3.2.2 → 3.2.3
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/AppBar/AppBar.d.ts +1 -0
- package/dist/Chat.d.ts +3 -0
- package/dist/ChatInput/ChatInput.d.ts +10 -3
- package/dist/ChatInput/RichTextInput.d.ts +9 -3
- package/dist/Markdown/CodeHighlighter.d.ts +2 -0
- package/dist/Markdown/Markdown.d.ts +1 -0
- package/dist/SessionMessages/SessionMessage/MessageFile/renderers/index.d.ts +4 -4
- package/dist/SessionMessages/SessionMessagePanel.d.ts +4 -0
- package/dist/SessionMessages/SessionMessages.d.ts +4 -0
- package/dist/SessionsList/NewSessionButton.d.ts +1 -0
- package/dist/SessionsList/SessionListItem.d.ts +4 -0
- package/dist/docs.json +19 -11
- package/dist/index.js +4173 -61
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +6 -2
- package/dist/index.umd.cjs.map +1 -1
- package/dist/stories/ChatSuggestions.stories.tsx +1 -1
- package/dist/stories/examples.ts +1 -1
- package/package.json +1 -1
- package/dist/CSVFileRenderer-CQkyw8il.js +0 -141
- package/dist/CSVFileRenderer-CQkyw8il.js.map +0 -1
- package/dist/DefaultFileRenderer-B0ZTdkz2.js +0 -15
- package/dist/DefaultFileRenderer-B0ZTdkz2.js.map +0 -1
- package/dist/ImageFileRenderer-C8tVW3I8.js +0 -6
- package/dist/ImageFileRenderer-C8tVW3I8.js.map +0 -1
- package/dist/PDFFileRenderer-DQdFS2l6.js +0 -9
- package/dist/PDFFileRenderer-DQdFS2l6.js.map +0 -1
- package/dist/index-BiStNXJ4.js +0 -4014
- package/dist/index-BiStNXJ4.js.map +0 -1
package/dist/AppBar/AppBar.d.ts
CHANGED
package/dist/Chat.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface ChatProps extends PropsWithChildren {
|
|
|
20
20
|
* - Companion: Smaller prompt screen with session lists.
|
|
21
21
|
* - Console: Full screen experience.
|
|
22
22
|
* - Chat: Only chat, no sessions.
|
|
23
|
+
* @default 'console'
|
|
23
24
|
*/
|
|
24
25
|
viewType?: ChatViewType;
|
|
25
26
|
/**
|
|
@@ -32,10 +33,12 @@ export interface ChatProps extends PropsWithChildren {
|
|
|
32
33
|
activeSessionId?: string;
|
|
33
34
|
/**
|
|
34
35
|
* Custom theme for the chat.
|
|
36
|
+
* @default chatTheme
|
|
35
37
|
*/
|
|
36
38
|
theme?: ChatTheme;
|
|
37
39
|
/**
|
|
38
40
|
* Remark plugins to apply to the request/response.
|
|
41
|
+
* @default defaultRemarkPlugins
|
|
39
42
|
*/
|
|
40
43
|
remarkPlugins?: Plugin[];
|
|
41
44
|
/**
|
|
@@ -11,18 +11,22 @@ export interface ChatInputProps {
|
|
|
11
11
|
allowedFiles?: string[];
|
|
12
12
|
/**
|
|
13
13
|
* Allow multiple file uploads.
|
|
14
|
+
* @default false
|
|
14
15
|
*/
|
|
15
16
|
allowMultipleFiles?: boolean;
|
|
16
17
|
/**
|
|
17
18
|
* Placeholder text for the input field.
|
|
19
|
+
* @default 'Type a message...'
|
|
18
20
|
*/
|
|
19
21
|
placeholder?: string;
|
|
20
22
|
/**
|
|
21
23
|
* Icon to show for send.
|
|
24
|
+
* @default <SendIcon />
|
|
22
25
|
*/
|
|
23
26
|
sendIcon?: ReactElement;
|
|
24
27
|
/**
|
|
25
28
|
* Icon to show for stop.
|
|
29
|
+
* @default <StopIcon />
|
|
26
30
|
*/
|
|
27
31
|
stopIcon?: ReactElement;
|
|
28
32
|
/**
|
|
@@ -44,15 +48,18 @@ export interface ChatInputProps {
|
|
|
44
48
|
*/
|
|
45
49
|
commands?: SuggestionConfig<SlashCommandItem>;
|
|
46
50
|
/**
|
|
47
|
-
* Minimum height for the input
|
|
51
|
+
* Minimum height for the input.
|
|
52
|
+
* @default 24
|
|
48
53
|
*/
|
|
49
54
|
minHeight?: number;
|
|
50
55
|
/**
|
|
51
|
-
* Maximum height for the input
|
|
56
|
+
* Maximum height for the input.
|
|
57
|
+
* @default 200
|
|
52
58
|
*/
|
|
53
59
|
maxHeight?: number;
|
|
54
60
|
/**
|
|
55
|
-
* Whether to auto-focus the input on mount
|
|
61
|
+
* Whether to auto-focus the input on mount.
|
|
62
|
+
* @default true
|
|
56
63
|
*/
|
|
57
64
|
autoFocus?: boolean;
|
|
58
65
|
/**
|
|
@@ -9,18 +9,22 @@ export interface RichTextInputRef {
|
|
|
9
9
|
export interface RichTextInputProps {
|
|
10
10
|
/**
|
|
11
11
|
* Current value of the input
|
|
12
|
+
* @default ''
|
|
12
13
|
*/
|
|
13
14
|
value?: string;
|
|
14
15
|
/**
|
|
15
16
|
* Placeholder text when empty
|
|
17
|
+
* @default 'Type a message...'
|
|
16
18
|
*/
|
|
17
19
|
placeholder?: string;
|
|
18
20
|
/**
|
|
19
21
|
* Whether the input is disabled
|
|
22
|
+
* @default false
|
|
20
23
|
*/
|
|
21
24
|
disabled?: boolean;
|
|
22
25
|
/**
|
|
23
|
-
* Whether to auto-focus on mount
|
|
26
|
+
* Whether to auto-focus on mount.
|
|
27
|
+
* @default true
|
|
24
28
|
*/
|
|
25
29
|
autoFocus?: boolean;
|
|
26
30
|
/**
|
|
@@ -28,11 +32,13 @@ export interface RichTextInputProps {
|
|
|
28
32
|
*/
|
|
29
33
|
className?: string;
|
|
30
34
|
/**
|
|
31
|
-
* Minimum height in pixels
|
|
35
|
+
* Minimum height in pixels.
|
|
36
|
+
* @default 24
|
|
32
37
|
*/
|
|
33
38
|
minHeight?: number;
|
|
34
39
|
/**
|
|
35
|
-
* Maximum height in pixels
|
|
40
|
+
* Maximum height in pixels.
|
|
41
|
+
* @default 200
|
|
36
42
|
*/
|
|
37
43
|
maxHeight?: number;
|
|
38
44
|
/**
|
|
@@ -22,10 +22,12 @@ export interface CodeHighlighterProps extends PropsWithChildren {
|
|
|
22
22
|
toolbarClassName?: string;
|
|
23
23
|
/**
|
|
24
24
|
* Icon to show for copy.
|
|
25
|
+
* @default <CopyIcon />
|
|
25
26
|
*/
|
|
26
27
|
copyIcon?: ReactElement;
|
|
27
28
|
/**
|
|
28
29
|
* The theme to use for the code block.
|
|
30
|
+
* @default dark
|
|
29
31
|
*/
|
|
30
32
|
theme?: Record<string, string>;
|
|
31
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export { default as DefaultFileRenderer } from './DefaultFileRenderer';
|
|
2
|
+
export { default as CSVFileRenderer } from './CSVFileRenderer';
|
|
3
|
+
export { default as ImageFileRenderer } from './ImageFileRenderer';
|
|
4
|
+
export { default as PDFFileRenderer } from './PDFFileRenderer';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
interface SessionMessagePanelProps extends PropsWithChildren {
|
|
3
|
+
/**
|
|
4
|
+
* Whether to show the back button to return to the session list in compact mode.
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
3
7
|
allowBack?: boolean;
|
|
4
8
|
}
|
|
5
9
|
export declare const SessionMessagePanel: FC<SessionMessagePanelProps>;
|
|
@@ -11,14 +11,17 @@ interface SessionMessagesProps {
|
|
|
11
11
|
newSessionContent?: string | ReactNode;
|
|
12
12
|
/**
|
|
13
13
|
* Limit the number of results returned. Clientside pagination.
|
|
14
|
+
* @default 10
|
|
14
15
|
*/
|
|
15
16
|
limit?: number | null;
|
|
16
17
|
/**
|
|
17
18
|
* Text to display for the show more button.
|
|
19
|
+
* @default 'Show more'
|
|
18
20
|
*/
|
|
19
21
|
showMoreText?: string;
|
|
20
22
|
/**
|
|
21
23
|
* Whether to automatically scroll to the bottom of the content.
|
|
24
|
+
* @default true
|
|
22
25
|
*/
|
|
23
26
|
autoScroll?: boolean;
|
|
24
27
|
/**
|
|
@@ -31,6 +34,7 @@ interface SessionMessagesProps {
|
|
|
31
34
|
children?: (conversations: Conversation[]) => ReactNode;
|
|
32
35
|
/**
|
|
33
36
|
* Whether to show the load more button.
|
|
37
|
+
* @default false
|
|
34
38
|
*/
|
|
35
39
|
showLoadMoreButton?: boolean;
|
|
36
40
|
/**
|
|
@@ -7,18 +7,22 @@ export interface SessionListItemProps extends PropsWithChildren {
|
|
|
7
7
|
session: Session;
|
|
8
8
|
/**
|
|
9
9
|
* Indicates whether the session is deletable.
|
|
10
|
+
* @default true
|
|
10
11
|
*/
|
|
11
12
|
deletable?: boolean;
|
|
12
13
|
/**
|
|
13
14
|
* Icon to show for delete.
|
|
15
|
+
* @default <TrashIcon />
|
|
14
16
|
*/
|
|
15
17
|
deleteIcon?: ReactElement;
|
|
16
18
|
/**
|
|
17
19
|
* Icon to show for chat.
|
|
20
|
+
* @default <ChatIcon className="mr-2" />
|
|
18
21
|
*/
|
|
19
22
|
chatIcon?: ReactElement;
|
|
20
23
|
/**
|
|
21
24
|
* Limit for the ellipsis.
|
|
25
|
+
* @default 100
|
|
22
26
|
*/
|
|
23
27
|
limit?: number;
|
|
24
28
|
}
|
package/dist/docs.json
CHANGED
|
@@ -703,7 +703,7 @@
|
|
|
703
703
|
"defaultValue": {
|
|
704
704
|
"value": "24"
|
|
705
705
|
},
|
|
706
|
-
"description": "Minimum height for the input
|
|
706
|
+
"description": "Minimum height for the input.",
|
|
707
707
|
"name": "minHeight",
|
|
708
708
|
"parent": {
|
|
709
709
|
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
@@ -724,7 +724,7 @@
|
|
|
724
724
|
"defaultValue": {
|
|
725
725
|
"value": "200"
|
|
726
726
|
},
|
|
727
|
-
"description": "Maximum height for the input
|
|
727
|
+
"description": "Maximum height for the input.",
|
|
728
728
|
"name": "maxHeight",
|
|
729
729
|
"parent": {
|
|
730
730
|
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
@@ -745,7 +745,7 @@
|
|
|
745
745
|
"defaultValue": {
|
|
746
746
|
"value": "true"
|
|
747
747
|
},
|
|
748
|
-
"description": "Whether to auto-focus the input on mount
|
|
748
|
+
"description": "Whether to auto-focus the input on mount.",
|
|
749
749
|
"name": "autoFocus",
|
|
750
750
|
"parent": {
|
|
751
751
|
"fileName": "src/ChatInput/ChatInput.tsx",
|
|
@@ -1086,7 +1086,7 @@
|
|
|
1086
1086
|
"defaultValue": {
|
|
1087
1087
|
"value": "true"
|
|
1088
1088
|
},
|
|
1089
|
-
"description": "Whether to auto-focus on mount
|
|
1089
|
+
"description": "Whether to auto-focus on mount.",
|
|
1090
1090
|
"name": "autoFocus",
|
|
1091
1091
|
"parent": {
|
|
1092
1092
|
"fileName": "src/ChatInput/RichTextInput.tsx",
|
|
@@ -1126,7 +1126,7 @@
|
|
|
1126
1126
|
"defaultValue": {
|
|
1127
1127
|
"value": "24"
|
|
1128
1128
|
},
|
|
1129
|
-
"description": "Minimum height in pixels
|
|
1129
|
+
"description": "Minimum height in pixels.",
|
|
1130
1130
|
"name": "minHeight",
|
|
1131
1131
|
"parent": {
|
|
1132
1132
|
"fileName": "src/ChatInput/RichTextInput.tsx",
|
|
@@ -1147,7 +1147,7 @@
|
|
|
1147
1147
|
"defaultValue": {
|
|
1148
1148
|
"value": "200"
|
|
1149
1149
|
},
|
|
1150
|
-
"description": "Maximum height in pixels
|
|
1150
|
+
"description": "Maximum height in pixels.",
|
|
1151
1151
|
"name": "maxHeight",
|
|
1152
1152
|
"parent": {
|
|
1153
1153
|
"fileName": "src/ChatInput/RichTextInput.tsx",
|
|
@@ -2040,7 +2040,7 @@
|
|
|
2040
2040
|
"defaultValue": {
|
|
2041
2041
|
"value": "true"
|
|
2042
2042
|
},
|
|
2043
|
-
"description": "",
|
|
2043
|
+
"description": "Whether to show the back button to return to the session list in compact mode.",
|
|
2044
2044
|
"name": "allowBack",
|
|
2045
2045
|
"parent": {
|
|
2046
2046
|
"fileName": "src/SessionMessages/SessionMessagePanel.tsx",
|
|
@@ -2378,7 +2378,9 @@
|
|
|
2378
2378
|
}
|
|
2379
2379
|
},
|
|
2380
2380
|
"deletable": {
|
|
2381
|
-
"defaultValue":
|
|
2381
|
+
"defaultValue": {
|
|
2382
|
+
"value": "true"
|
|
2383
|
+
},
|
|
2382
2384
|
"description": "Indicates whether the session is deletable.",
|
|
2383
2385
|
"name": "deletable",
|
|
2384
2386
|
"parent": {
|
|
@@ -2397,7 +2399,9 @@
|
|
|
2397
2399
|
}
|
|
2398
2400
|
},
|
|
2399
2401
|
"deleteIcon": {
|
|
2400
|
-
"defaultValue":
|
|
2402
|
+
"defaultValue": {
|
|
2403
|
+
"value": "<TrashIcon />"
|
|
2404
|
+
},
|
|
2401
2405
|
"description": "Icon to show for delete.",
|
|
2402
2406
|
"name": "deleteIcon",
|
|
2403
2407
|
"parent": {
|
|
@@ -2416,7 +2420,9 @@
|
|
|
2416
2420
|
}
|
|
2417
2421
|
},
|
|
2418
2422
|
"chatIcon": {
|
|
2419
|
-
"defaultValue":
|
|
2423
|
+
"defaultValue": {
|
|
2424
|
+
"value": "<ChatIcon className=\"mr-2\" />"
|
|
2425
|
+
},
|
|
2420
2426
|
"description": "Icon to show for chat.",
|
|
2421
2427
|
"name": "chatIcon",
|
|
2422
2428
|
"parent": {
|
|
@@ -2435,7 +2441,9 @@
|
|
|
2435
2441
|
}
|
|
2436
2442
|
},
|
|
2437
2443
|
"limit": {
|
|
2438
|
-
"defaultValue":
|
|
2444
|
+
"defaultValue": {
|
|
2445
|
+
"value": "100"
|
|
2446
|
+
},
|
|
2439
2447
|
"description": "Limit for the ellipsis.",
|
|
2440
2448
|
"name": "limit",
|
|
2441
2449
|
"parent": {
|