reachat 3.2.2 → 3.3.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.
Files changed (42) hide show
  1. package/dist/AppBar/AppBar.d.ts +1 -0
  2. package/dist/Chat.d.ts +3 -0
  3. package/dist/ChatInput/ChatInput.d.ts +10 -3
  4. package/dist/ChatInput/RichTextInput.d.ts +9 -3
  5. package/dist/Markdown/CodeHighlighter.d.ts +2 -0
  6. package/dist/Markdown/Markdown.d.ts +1 -0
  7. package/dist/SessionMessages/SessionMessage/MessageFile/renderers/index.d.ts +4 -4
  8. package/dist/SessionMessages/SessionMessagePanel.d.ts +4 -0
  9. package/dist/SessionMessages/SessionMessages.d.ts +4 -0
  10. package/dist/SessionsList/NewSessionButton.d.ts +1 -0
  11. package/dist/SessionsList/SessionListItem.d.ts +4 -0
  12. package/dist/index.css +267 -97
  13. package/dist/index.js +3792 -76
  14. package/dist/index.js.map +1 -1
  15. package/dist/stories/AgUi.stories.tsx +1 -1
  16. package/dist/stories/Charts.stories.tsx +1 -1
  17. package/dist/stories/Chat.stories.tsx +1 -1
  18. package/dist/stories/ChatBubble.stories.tsx +1 -1
  19. package/dist/stories/ChatSuggestions.stories.tsx +1 -1
  20. package/dist/stories/Companion.stories.tsx +3 -6
  21. package/dist/stories/ComponentCatalog.stories.tsx +1 -1
  22. package/dist/stories/ComponentError.stories.tsx +1 -1
  23. package/dist/stories/Console.stories.tsx +1 -1
  24. package/dist/stories/EnhancedInput.stories.tsx +4 -2
  25. package/dist/stories/MessageStatus.stories.tsx +1 -1
  26. package/dist/stories/Redact.stories.tsx +1 -1
  27. package/dist/stories/RichTextInput.stories.tsx +1 -1
  28. package/dist/stories/examples.ts +1 -1
  29. package/package.json +50 -61
  30. package/dist/CSVFileRenderer-CQkyw8il.js +0 -141
  31. package/dist/CSVFileRenderer-CQkyw8il.js.map +0 -1
  32. package/dist/DefaultFileRenderer-B0ZTdkz2.js +0 -15
  33. package/dist/DefaultFileRenderer-B0ZTdkz2.js.map +0 -1
  34. package/dist/ImageFileRenderer-C8tVW3I8.js +0 -6
  35. package/dist/ImageFileRenderer-C8tVW3I8.js.map +0 -1
  36. package/dist/PDFFileRenderer-DQdFS2l6.js +0 -9
  37. package/dist/PDFFileRenderer-DQdFS2l6.js.map +0 -1
  38. package/dist/docs.json +0 -3545
  39. package/dist/index-BiStNXJ4.js +0 -4014
  40. package/dist/index-BiStNXJ4.js.map +0 -1
  41. package/dist/index.umd.cjs +0 -4177
  42. package/dist/index.umd.cjs.map +0 -1
@@ -7,6 +7,7 @@ export interface AppBarProps {
7
7
  content?: ReactNode;
8
8
  /**
9
9
  * Custom theme for the appbar
10
+ * @default chatTheme
10
11
  */
11
12
  theme?: ChatTheme;
12
13
  }
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 (default: 24px)
51
+ * Minimum height for the input.
52
+ * @default 24
48
53
  */
49
54
  minHeight?: number;
50
55
  /**
51
- * Maximum height for the input (default: 200px)
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 (default: true)
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 (default: true)
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 (default: 24)
35
+ * Minimum height in pixels.
36
+ * @default 24
32
37
  */
33
38
  minHeight?: number;
34
39
  /**
35
- * Maximum height in pixels (default: 200)
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
  }
@@ -9,6 +9,7 @@ interface MarkdownWrapperProps extends PropsWithChildren {
9
9
  remarkPlugins?: Plugin[];
10
10
  /**
11
11
  * Rehype plugins to apply to the markdown content.
12
+ * @default [rehypeRaw, rehypeKatex]
12
13
  */
13
14
  rehypePlugins?: Plugin[];
14
15
  /**
@@ -1,4 +1,4 @@
1
- export * from './DefaultFileRenderer';
2
- export * from './CSVFileRenderer';
3
- export * from './ImageFileRenderer';
4
- export * from './PDFFileRenderer';
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
  /**
@@ -2,6 +2,7 @@ import { FC, PropsWithChildren, ReactNode } from 'react';
2
2
  interface NewSessionButtonProps extends PropsWithChildren {
3
3
  /**
4
4
  * Text for the new session button.
5
+ * @default 'New Session'
5
6
  */
6
7
  newSessionText?: string | ReactNode;
7
8
  }
@@ -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
  }