@orion-ds/react 2.0.1 → 2.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/AI_COMPONENTS.md +68 -1
- package/AI_QUICKREF.md +1 -1
- package/README.md +14 -0
- package/dist/components/Chat/Chat.d.ts +45 -0
- package/dist/components/Chat/Chat.d.ts.map +1 -0
- package/dist/components/Chat/Chat.types.d.ts +392 -0
- package/dist/components/Chat/Chat.types.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatAttachment.d.ts +10 -0
- package/dist/components/Chat/components/ChatAttachment.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatAudioPlayer.d.ts +9 -0
- package/dist/components/Chat/components/ChatAudioPlayer.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatCodeBlock.d.ts +10 -0
- package/dist/components/Chat/components/ChatCodeBlock.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatFileUpload.d.ts +9 -0
- package/dist/components/Chat/components/ChatFileUpload.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatHeader.d.ts +9 -0
- package/dist/components/Chat/components/ChatHeader.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatImagePreview.d.ts +9 -0
- package/dist/components/Chat/components/ChatImagePreview.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatInput.d.ts +10 -0
- package/dist/components/Chat/components/ChatInput.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatLightbox.d.ts +9 -0
- package/dist/components/Chat/components/ChatLightbox.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatMarkdown.d.ts +10 -0
- package/dist/components/Chat/components/ChatMarkdown.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatMessage.d.ts +10 -0
- package/dist/components/Chat/components/ChatMessage.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatMessages.d.ts +10 -0
- package/dist/components/Chat/components/ChatMessages.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatSidebar.d.ts +10 -0
- package/dist/components/Chat/components/ChatSidebar.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatTypingIndicator.d.ts +14 -0
- package/dist/components/Chat/components/ChatTypingIndicator.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatVoiceRecorder.d.ts +9 -0
- package/dist/components/Chat/components/ChatVoiceRecorder.d.ts.map +1 -0
- package/dist/components/Chat/components/index.d.ts +18 -0
- package/dist/components/Chat/components/index.d.ts.map +1 -0
- package/dist/components/Chat/hooks/index.d.ts +12 -0
- package/dist/components/Chat/hooks/index.d.ts.map +1 -0
- package/dist/components/Chat/hooks/useAutoScroll.d.ts +24 -0
- package/dist/components/Chat/hooks/useAutoScroll.d.ts.map +1 -0
- package/dist/components/Chat/hooks/useChatInput.d.ts +43 -0
- package/dist/components/Chat/hooks/useChatInput.d.ts.map +1 -0
- package/dist/components/Chat/hooks/useStreamingText.d.ts +22 -0
- package/dist/components/Chat/hooks/useStreamingText.d.ts.map +1 -0
- package/dist/components/Chat/hooks/useVoiceRecorder.d.ts +31 -0
- package/dist/components/Chat/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/dist/components/Chat/index.d.ts +28 -0
- package/dist/components/Chat/index.d.ts.map +1 -0
- package/dist/components/Chat/utils.d.ts +16 -0
- package/dist/components/Chat/utils.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/docs/DocComponents.d.ts +60 -0
- package/dist/docs/DocComponents.d.ts.map +1 -0
- package/dist/index.cjs +60 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +51573 -18518
- package/dist/index.mjs.map +1 -1
- package/dist/react.css +1 -1
- package/dist/sections/Chat/ChatSection.d.ts +22 -0
- package/dist/sections/Chat/ChatSection.d.ts.map +1 -0
- package/dist/sections/Chat/index.d.ts +19 -0
- package/dist/sections/Chat/index.d.ts.map +1 -0
- package/dist/sections/index.d.ts +2 -0
- package/dist/sections/index.d.ts.map +1 -1
- package/dist/styles.css +65 -57
- package/dist/templates/app/ChatPageTemplate/ChatPageTemplate.d.ts +21 -0
- package/dist/templates/app/ChatPageTemplate/ChatPageTemplate.d.ts.map +1 -0
- package/dist/templates/app/ChatPageTemplate/index.d.ts +19 -0
- package/dist/templates/app/ChatPageTemplate/index.d.ts.map +1 -0
- package/dist/templates/app/index.d.ts +2 -0
- package/dist/templates/app/index.d.ts.map +1 -1
- package/package.json +6 -2
package/AI_COMPONENTS.md
CHANGED
|
@@ -187,6 +187,13 @@ Use these for landing pages, marketing sites, and product pages. **DO NOT create
|
|
|
187
187
|
| `Container` | Constrain content width |
|
|
188
188
|
| `Section` | Vertical section with spacing |
|
|
189
189
|
|
|
190
|
+
### AI Chat Sections
|
|
191
|
+
|
|
192
|
+
| Section | Use When | Required Props |
|
|
193
|
+
|---------|----------|----------------|
|
|
194
|
+
| `ChatSection` | Chat UI with sidebar | `messages`, `onSendMessage` |
|
|
195
|
+
| `ChatPageTemplate` | Full-page chat app | `messages`, `onSendMessage` |
|
|
196
|
+
|
|
190
197
|
---
|
|
191
198
|
|
|
192
199
|
## Complete Landing Page Example
|
|
@@ -478,6 +485,66 @@ Some components use the compound pattern with dot notation:
|
|
|
478
485
|
</Drawer>
|
|
479
486
|
```
|
|
480
487
|
|
|
488
|
+
### Chat (AI Chat Interface)
|
|
489
|
+
|
|
490
|
+
Full-featured chat interface with multimodal support (text, images, audio, files, code).
|
|
491
|
+
|
|
492
|
+
```tsx
|
|
493
|
+
<Chat>
|
|
494
|
+
<Chat.Header title="AI Assistant" subtitle="Online" />
|
|
495
|
+
<Chat.Messages>
|
|
496
|
+
{messages.map(msg => (
|
|
497
|
+
<Chat.Message
|
|
498
|
+
key={msg.id}
|
|
499
|
+
role={msg.role}
|
|
500
|
+
content={msg.content}
|
|
501
|
+
timestamp={msg.timestamp}
|
|
502
|
+
attachments={msg.attachments}
|
|
503
|
+
/>
|
|
504
|
+
))}
|
|
505
|
+
{isTyping && <Chat.TypingIndicator />}
|
|
506
|
+
</Chat.Messages>
|
|
507
|
+
<Chat.Input
|
|
508
|
+
onSend={handleSend}
|
|
509
|
+
allowAttachments
|
|
510
|
+
allowVoiceRecording
|
|
511
|
+
/>
|
|
512
|
+
</Chat>
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
**Chat Sub-components:**
|
|
516
|
+
- `Chat.Header` - Title, avatar, and actions
|
|
517
|
+
- `Chat.Messages` - Scrollable message container with auto-scroll
|
|
518
|
+
- `Chat.Message` - Individual message (user/assistant/system)
|
|
519
|
+
- `Chat.Input` - Multi-line input with attachments and voice
|
|
520
|
+
- `Chat.TypingIndicator` - Animated "typing" dots
|
|
521
|
+
- `Chat.CodeBlock` - Syntax-highlighted code
|
|
522
|
+
- `Chat.Markdown` - Markdown rendering
|
|
523
|
+
- `Chat.ImagePreview` - Image with lightbox
|
|
524
|
+
- `Chat.AudioPlayer` - Audio playback
|
|
525
|
+
- `Chat.VoiceRecorder` - Voice recording
|
|
526
|
+
- `Chat.FileUpload` - Drag-and-drop file upload
|
|
527
|
+
- `Chat.Attachment` - Attachment preview
|
|
528
|
+
- `Chat.Sidebar` - Conversation history list
|
|
529
|
+
|
|
530
|
+
**Pre-built Sections:**
|
|
531
|
+
- `ChatSection` - Chat with sidebar layout
|
|
532
|
+
- `ChatPageTemplate` - Full-page ChatGPT-style layout
|
|
533
|
+
|
|
534
|
+
```tsx
|
|
535
|
+
// Full-page template (ChatGPT-style)
|
|
536
|
+
<ChatPageTemplate
|
|
537
|
+
conversations={conversations}
|
|
538
|
+
activeConversationId={activeId}
|
|
539
|
+
messages={messages}
|
|
540
|
+
onSendMessage={handleSend}
|
|
541
|
+
onSelectConversation={handleSelect}
|
|
542
|
+
onNewConversation={handleNew}
|
|
543
|
+
isTyping={isTyping}
|
|
544
|
+
user={{ name: 'John', avatar: '...' }}
|
|
545
|
+
/>
|
|
546
|
+
```
|
|
547
|
+
|
|
481
548
|
---
|
|
482
549
|
|
|
483
550
|
## Icons (Lucide)
|
|
@@ -535,7 +602,7 @@ function ThemeSwitcher() {
|
|
|
535
602
|
}
|
|
536
603
|
```
|
|
537
604
|
|
|
538
|
-
**Available brands:** `orion`, `red`, `deepblue`, `orange`
|
|
605
|
+
**Available brands:** `orion`, `red`, `deepblue`, `orange`, `lemon`
|
|
539
606
|
**Available themes:** `light`, `dark`
|
|
540
607
|
|
|
541
608
|
---
|
package/AI_QUICKREF.md
CHANGED
|
@@ -46,7 +46,7 @@ import { Search } from 'lucide-react';
|
|
|
46
46
|
## Theme Switching
|
|
47
47
|
```tsx
|
|
48
48
|
const { theme, brand, setTheme, setBrand } = useThemeContext();
|
|
49
|
-
// brands: orion, red, deepblue, orange
|
|
49
|
+
// brands: orion, red, deepblue, orange, lemon
|
|
50
50
|
// themes: light, dark
|
|
51
51
|
```
|
|
52
52
|
|
package/README.md
CHANGED
|
@@ -22,6 +22,8 @@ TypeScript-first React component library built on the Orion Design System. Featu
|
|
|
22
22
|
|
|
23
23
|
## Installation
|
|
24
24
|
|
|
25
|
+
### Option A: npm install (full library)
|
|
26
|
+
|
|
25
27
|
\`\`\`bash
|
|
26
28
|
npm install @orion-ds/react @orion-ds/core
|
|
27
29
|
# or
|
|
@@ -32,6 +34,18 @@ yarn add @orion-ds/react @orion-ds/core
|
|
|
32
34
|
|
|
33
35
|
> **Note**: `@orion-ds/core` is a peer dependency that must be installed alongside `@orion-ds/react`.
|
|
34
36
|
|
|
37
|
+
### Option B: CLI copy (own the code)
|
|
38
|
+
|
|
39
|
+
Copy individual components into your project, shadcn-style. You own the source and can modify freely.
|
|
40
|
+
|
|
41
|
+
\`\`\`bash
|
|
42
|
+
npx @orion-ds/cli init # Creates orion.json, installs @orion-ds/core
|
|
43
|
+
npx @orion-ds/cli add button card modal # Copies component source files
|
|
44
|
+
npx @orion-ds/cli list # Shows all 90 available items
|
|
45
|
+
\`\`\`
|
|
46
|
+
|
|
47
|
+
See [@orion-ds/cli README](../cli/README.md) for full documentation.
|
|
48
|
+
|
|
35
49
|
## CSS Setup
|
|
36
50
|
|
|
37
51
|
### Option 1: Single Import (Recommended)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Component
|
|
3
|
+
*
|
|
4
|
+
* A flexible compound component for building AI chat interfaces.
|
|
5
|
+
* Supports multimodal content including text, images, audio, files, and code.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Chat>
|
|
10
|
+
* <Chat.Header title="AI Assistant" />
|
|
11
|
+
* <Chat.Messages>
|
|
12
|
+
* {messages.map(msg => (
|
|
13
|
+
* <Chat.Message
|
|
14
|
+
* key={msg.id}
|
|
15
|
+
* role={msg.role}
|
|
16
|
+
* content={msg.content}
|
|
17
|
+
* />
|
|
18
|
+
* ))}
|
|
19
|
+
* {isTyping && <Chat.TypingIndicator />}
|
|
20
|
+
* </Chat.Messages>
|
|
21
|
+
* <Chat.Input onSend={handleSend} />
|
|
22
|
+
* </Chat>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
import React from 'react';
|
|
26
|
+
import type { ChatProps } from './Chat.types';
|
|
27
|
+
import { ChatMessage, ChatMessages, ChatInput, ChatHeader, ChatTypingIndicator, ChatCodeBlock, ChatMarkdown, ChatImagePreview, ChatAudioPlayer, ChatVoiceRecorder, ChatFileUpload, ChatAttachment, ChatSidebar } from './components';
|
|
28
|
+
type ChatComponent = React.FC<ChatProps> & {
|
|
29
|
+
Header: typeof ChatHeader;
|
|
30
|
+
Messages: typeof ChatMessages;
|
|
31
|
+
Message: typeof ChatMessage;
|
|
32
|
+
Input: typeof ChatInput;
|
|
33
|
+
TypingIndicator: typeof ChatTypingIndicator;
|
|
34
|
+
CodeBlock: typeof ChatCodeBlock;
|
|
35
|
+
Markdown: typeof ChatMarkdown;
|
|
36
|
+
ImagePreview: typeof ChatImagePreview;
|
|
37
|
+
AudioPlayer: typeof ChatAudioPlayer;
|
|
38
|
+
VoiceRecorder: typeof ChatVoiceRecorder;
|
|
39
|
+
FileUpload: typeof ChatFileUpload;
|
|
40
|
+
Attachment: typeof ChatAttachment;
|
|
41
|
+
Sidebar: typeof ChatSidebar;
|
|
42
|
+
};
|
|
43
|
+
export declare const Chat: ChatComponent;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=Chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Chat.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,WAAW,EACZ,MAAM,cAAc,CAAC;AAwBtB,KAAK,aAAa,GAAG,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG;IACzC,MAAM,EAAE,OAAO,UAAU,CAAC;IAC1B,QAAQ,EAAE,OAAO,YAAY,CAAC;IAC9B,OAAO,EAAE,OAAO,WAAW,CAAC;IAC5B,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB,eAAe,EAAE,OAAO,mBAAmB,CAAC;IAC5C,SAAS,EAAE,OAAO,aAAa,CAAC;IAChC,QAAQ,EAAE,OAAO,YAAY,CAAC;IAC9B,YAAY,EAAE,OAAO,gBAAgB,CAAC;IACtC,WAAW,EAAE,OAAO,eAAe,CAAC;IACpC,aAAa,EAAE,OAAO,iBAAiB,CAAC;IACxC,UAAU,EAAE,OAAO,cAAc,CAAC;IAClC,UAAU,EAAE,OAAO,cAAc,CAAC;IAClC,OAAO,EAAE,OAAO,WAAW,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,IAAI,EAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Component Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the Orion Chat component - an AI-first chat interface
|
|
5
|
+
* with multimodal support (text, images, audio, files, code).
|
|
6
|
+
*/
|
|
7
|
+
import type { HTMLAttributes, ReactNode, TextareaHTMLAttributes, RefObject } from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* Message role types
|
|
10
|
+
*/
|
|
11
|
+
export type ChatRole = 'user' | 'assistant' | 'system';
|
|
12
|
+
/**
|
|
13
|
+
* Message delivery status
|
|
14
|
+
*/
|
|
15
|
+
export type MessageStatus = 'sending' | 'sent' | 'error' | 'streaming';
|
|
16
|
+
/**
|
|
17
|
+
* Attachment types for multimodal support
|
|
18
|
+
*/
|
|
19
|
+
export type AttachmentType = 'image' | 'audio' | 'file' | 'code';
|
|
20
|
+
/**
|
|
21
|
+
* Message reaction types (feedback)
|
|
22
|
+
*/
|
|
23
|
+
export type MessageReaction = 'like' | 'dislike';
|
|
24
|
+
/**
|
|
25
|
+
* Base attachment interface
|
|
26
|
+
*/
|
|
27
|
+
export interface ChatAttachment {
|
|
28
|
+
/** Unique identifier for the attachment */
|
|
29
|
+
id: string;
|
|
30
|
+
/** Type of attachment */
|
|
31
|
+
type: AttachmentType;
|
|
32
|
+
/** Display name for the attachment */
|
|
33
|
+
name: string;
|
|
34
|
+
/** URL for media files (images, audio, etc.) */
|
|
35
|
+
url?: string;
|
|
36
|
+
/** Content for code blocks */
|
|
37
|
+
content?: string;
|
|
38
|
+
/** Programming language for syntax highlighting */
|
|
39
|
+
language?: string;
|
|
40
|
+
/** MIME type of the file */
|
|
41
|
+
mimeType?: string;
|
|
42
|
+
/** File size in bytes */
|
|
43
|
+
size?: number;
|
|
44
|
+
/** Audio duration in seconds */
|
|
45
|
+
duration?: number;
|
|
46
|
+
/** Thumbnail URL for images */
|
|
47
|
+
thumbnail?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Chat message structure
|
|
51
|
+
*/
|
|
52
|
+
export interface ChatMessage {
|
|
53
|
+
/** Unique identifier for the message */
|
|
54
|
+
id: string;
|
|
55
|
+
/** Message sender role */
|
|
56
|
+
role: ChatRole;
|
|
57
|
+
/** Message content (supports Markdown) */
|
|
58
|
+
content: string;
|
|
59
|
+
/** Timestamp of the message */
|
|
60
|
+
timestamp?: Date;
|
|
61
|
+
/** Message delivery status */
|
|
62
|
+
status?: MessageStatus;
|
|
63
|
+
/** Attached files, images, audio, or code */
|
|
64
|
+
attachments?: ChatAttachment[];
|
|
65
|
+
/** Whether the message is currently streaming */
|
|
66
|
+
isStreaming?: boolean;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Conversation for sidebar listing
|
|
70
|
+
*/
|
|
71
|
+
export interface ChatConversation {
|
|
72
|
+
/** Unique identifier for the conversation */
|
|
73
|
+
id: string;
|
|
74
|
+
/** Conversation title */
|
|
75
|
+
title: string;
|
|
76
|
+
/** Preview of the last message */
|
|
77
|
+
preview?: string;
|
|
78
|
+
/** Last update timestamp */
|
|
79
|
+
updatedAt: Date;
|
|
80
|
+
/** Total number of messages */
|
|
81
|
+
messageCount?: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Voice recorder state interface
|
|
85
|
+
*/
|
|
86
|
+
export interface VoiceRecorderState {
|
|
87
|
+
/** Whether currently recording */
|
|
88
|
+
isRecording: boolean;
|
|
89
|
+
/** Recording duration in seconds */
|
|
90
|
+
duration: number;
|
|
91
|
+
/** Recorded audio blob */
|
|
92
|
+
audioBlob?: Blob;
|
|
93
|
+
/** Recording error */
|
|
94
|
+
error?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Main Chat container props
|
|
98
|
+
*/
|
|
99
|
+
export interface ChatProps extends HTMLAttributes<HTMLDivElement> {
|
|
100
|
+
/** Chat content (compound components) */
|
|
101
|
+
children?: ReactNode;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Chat Header props
|
|
105
|
+
*/
|
|
106
|
+
export interface ChatHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
107
|
+
/** Title displayed in the header */
|
|
108
|
+
title?: string;
|
|
109
|
+
/** Subtitle or description */
|
|
110
|
+
subtitle?: string;
|
|
111
|
+
/** Avatar or icon to display */
|
|
112
|
+
avatar?: ReactNode;
|
|
113
|
+
/** Actions (buttons, menu) on the right side */
|
|
114
|
+
actions?: ReactNode;
|
|
115
|
+
/** Custom content */
|
|
116
|
+
children?: ReactNode;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Chat Messages container props
|
|
120
|
+
*/
|
|
121
|
+
export interface ChatMessagesProps extends HTMLAttributes<HTMLDivElement> {
|
|
122
|
+
/** Message content */
|
|
123
|
+
children?: ReactNode;
|
|
124
|
+
/** Reference for scroll control */
|
|
125
|
+
scrollRef?: RefObject<HTMLDivElement>;
|
|
126
|
+
/** Enable auto-scroll to latest message */
|
|
127
|
+
autoScroll?: boolean;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Individual chat message props
|
|
131
|
+
*/
|
|
132
|
+
export interface ChatMessageProps extends HTMLAttributes<HTMLDivElement> {
|
|
133
|
+
/** Message sender role */
|
|
134
|
+
role: ChatRole;
|
|
135
|
+
/** Message content (supports Markdown) */
|
|
136
|
+
content: string;
|
|
137
|
+
/** Timestamp of the message */
|
|
138
|
+
timestamp?: Date;
|
|
139
|
+
/** Message delivery status */
|
|
140
|
+
status?: MessageStatus;
|
|
141
|
+
/** Attached files, images, audio, or code */
|
|
142
|
+
attachments?: ChatAttachment[];
|
|
143
|
+
/** Custom avatar element */
|
|
144
|
+
avatar?: ReactNode;
|
|
145
|
+
/** Whether to show the avatar (defaults to false) */
|
|
146
|
+
showAvatar?: boolean;
|
|
147
|
+
/** Action buttons (copy, regenerate, etc.) */
|
|
148
|
+
actions?: ReactNode;
|
|
149
|
+
/** Whether the message is streaming */
|
|
150
|
+
isStreaming?: boolean;
|
|
151
|
+
/** Callback when an image attachment is clicked */
|
|
152
|
+
onImageClick?: (attachment: ChatAttachment) => void;
|
|
153
|
+
/** Callback to retry sending a failed message */
|
|
154
|
+
onRetry?: () => void;
|
|
155
|
+
/** Current reaction on this message */
|
|
156
|
+
reaction?: MessageReaction;
|
|
157
|
+
/** Callback when user reacts to a message */
|
|
158
|
+
onReaction?: (reaction: MessageReaction) => void;
|
|
159
|
+
/** Custom content instead of default rendering */
|
|
160
|
+
children?: ReactNode;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Chat input props
|
|
164
|
+
*/
|
|
165
|
+
export interface ChatInputProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onSubmit'> {
|
|
166
|
+
/** Callback when message is sent */
|
|
167
|
+
onSend?: (message: string, attachments?: File[]) => void;
|
|
168
|
+
/** Allow file attachments (images, files) */
|
|
169
|
+
allowAttachments?: boolean;
|
|
170
|
+
/** Allow voice recording */
|
|
171
|
+
allowVoiceRecording?: boolean;
|
|
172
|
+
/** Allow audio file upload */
|
|
173
|
+
allowAudioUpload?: boolean;
|
|
174
|
+
/** Whether input is disabled */
|
|
175
|
+
disabled?: boolean;
|
|
176
|
+
/** Maximum character count */
|
|
177
|
+
maxLength?: number;
|
|
178
|
+
/** Accepted file types for upload */
|
|
179
|
+
acceptedFileTypes?: string[];
|
|
180
|
+
/** Whether a message is being sent */
|
|
181
|
+
isLoading?: boolean;
|
|
182
|
+
/** Pending attachments to display */
|
|
183
|
+
pendingAttachments?: File[];
|
|
184
|
+
/** Callback to remove a pending attachment */
|
|
185
|
+
onRemoveAttachment?: (index: number) => void;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Typing indicator props
|
|
189
|
+
*/
|
|
190
|
+
export interface ChatTypingIndicatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
191
|
+
/** Label text (default: "Assistant is typing") */
|
|
192
|
+
label?: string;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Code block props
|
|
196
|
+
*/
|
|
197
|
+
export interface ChatCodeBlockProps extends HTMLAttributes<HTMLDivElement> {
|
|
198
|
+
/** Code content */
|
|
199
|
+
code: string;
|
|
200
|
+
/** Programming language for syntax highlighting */
|
|
201
|
+
language?: string;
|
|
202
|
+
/** Show line numbers */
|
|
203
|
+
showLineNumbers?: boolean;
|
|
204
|
+
/** Show copy button */
|
|
205
|
+
showCopyButton?: boolean;
|
|
206
|
+
/** Maximum height before scrolling */
|
|
207
|
+
maxHeight?: string;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Markdown renderer props
|
|
211
|
+
*/
|
|
212
|
+
export interface ChatMarkdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
213
|
+
/** Markdown content to render */
|
|
214
|
+
content: string;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Image preview props
|
|
218
|
+
*/
|
|
219
|
+
export interface ChatImagePreviewProps extends HTMLAttributes<HTMLDivElement> {
|
|
220
|
+
/** Image source URL */
|
|
221
|
+
src: string;
|
|
222
|
+
/** Alt text for accessibility */
|
|
223
|
+
alt?: string;
|
|
224
|
+
/** Thumbnail URL (optional, uses src if not provided) */
|
|
225
|
+
thumbnail?: string;
|
|
226
|
+
/** Callback when image is clicked */
|
|
227
|
+
onClick?: () => void;
|
|
228
|
+
/** Enable lightbox on click */
|
|
229
|
+
enableLightbox?: boolean;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Audio player props
|
|
233
|
+
*/
|
|
234
|
+
export interface ChatAudioPlayerProps extends HTMLAttributes<HTMLDivElement> {
|
|
235
|
+
/** Audio source URL */
|
|
236
|
+
src: string;
|
|
237
|
+
/** Duration in seconds (optional, auto-detected if not provided) */
|
|
238
|
+
duration?: number;
|
|
239
|
+
/** Audio title/name */
|
|
240
|
+
title?: string;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Voice recorder props
|
|
244
|
+
*/
|
|
245
|
+
export interface ChatVoiceRecorderProps extends HTMLAttributes<HTMLDivElement> {
|
|
246
|
+
/** Callback when recording is complete */
|
|
247
|
+
onRecordingComplete?: (blob: Blob) => void;
|
|
248
|
+
/** Callback when recording is cancelled */
|
|
249
|
+
onCancel?: () => void;
|
|
250
|
+
/** Maximum recording duration in seconds */
|
|
251
|
+
maxDuration?: number;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* File upload zone props
|
|
255
|
+
*/
|
|
256
|
+
export interface ChatFileUploadProps extends HTMLAttributes<HTMLDivElement> {
|
|
257
|
+
/** Callback when files are selected */
|
|
258
|
+
onFilesSelected?: (files: File[]) => void;
|
|
259
|
+
/** Accepted file types */
|
|
260
|
+
accept?: string[];
|
|
261
|
+
/** Allow multiple files */
|
|
262
|
+
multiple?: boolean;
|
|
263
|
+
/** Maximum file size in bytes */
|
|
264
|
+
maxSize?: number;
|
|
265
|
+
/** Custom upload button content */
|
|
266
|
+
children?: ReactNode;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Attachment preview props (unified)
|
|
270
|
+
*/
|
|
271
|
+
export interface ChatAttachmentPreviewProps extends HTMLAttributes<HTMLDivElement> {
|
|
272
|
+
/** Attachment data */
|
|
273
|
+
attachment: ChatAttachment;
|
|
274
|
+
/** Show remove button */
|
|
275
|
+
removable?: boolean;
|
|
276
|
+
/** Callback when remove is clicked */
|
|
277
|
+
onRemove?: () => void;
|
|
278
|
+
/** Callback when attachment is clicked */
|
|
279
|
+
onClick?: () => void;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Chat sidebar props
|
|
283
|
+
*/
|
|
284
|
+
export interface ChatSidebarProps extends HTMLAttributes<HTMLDivElement> {
|
|
285
|
+
/** List of conversations */
|
|
286
|
+
conversations?: ChatConversation[];
|
|
287
|
+
/** Currently active conversation ID */
|
|
288
|
+
activeConversationId?: string;
|
|
289
|
+
/** Callback when a conversation is selected */
|
|
290
|
+
onSelectConversation?: (id: string) => void;
|
|
291
|
+
/** Callback when new conversation is created */
|
|
292
|
+
onNewConversation?: () => void;
|
|
293
|
+
/** Callback when a conversation is deleted */
|
|
294
|
+
onDeleteConversation?: (id: string) => void;
|
|
295
|
+
/** Callback when search query changes */
|
|
296
|
+
onSearch?: (query: string) => void;
|
|
297
|
+
/** Custom header content */
|
|
298
|
+
header?: ReactNode;
|
|
299
|
+
/** Custom footer content */
|
|
300
|
+
footer?: ReactNode;
|
|
301
|
+
/** Whether sidebar is collapsed (mobile) */
|
|
302
|
+
collapsed?: boolean;
|
|
303
|
+
/** Callback when collapse state changes */
|
|
304
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* ChatSection props (sidebar + chat)
|
|
308
|
+
*/
|
|
309
|
+
export interface ChatSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
310
|
+
/** List of conversations for sidebar */
|
|
311
|
+
conversations?: ChatConversation[];
|
|
312
|
+
/** Currently active conversation ID */
|
|
313
|
+
activeConversationId?: string;
|
|
314
|
+
/** Messages for the active conversation */
|
|
315
|
+
messages?: ChatMessage[];
|
|
316
|
+
/** Callback when a message is sent */
|
|
317
|
+
onSendMessage?: (message: string, attachments?: File[]) => void;
|
|
318
|
+
/** Callback when a conversation is selected */
|
|
319
|
+
onSelectConversation?: (id: string) => void;
|
|
320
|
+
/** Callback when new conversation is created */
|
|
321
|
+
onNewConversation?: () => void;
|
|
322
|
+
/** Callback when a conversation is deleted */
|
|
323
|
+
onDeleteConversation?: (id: string) => void;
|
|
324
|
+
/** Whether assistant is typing */
|
|
325
|
+
isTyping?: boolean;
|
|
326
|
+
/** Whether message is being sent */
|
|
327
|
+
isLoading?: boolean;
|
|
328
|
+
/** Chat header configuration */
|
|
329
|
+
header?: {
|
|
330
|
+
title?: string;
|
|
331
|
+
subtitle?: string;
|
|
332
|
+
avatar?: ReactNode;
|
|
333
|
+
actions?: ReactNode;
|
|
334
|
+
};
|
|
335
|
+
/** Input configuration */
|
|
336
|
+
inputConfig?: {
|
|
337
|
+
placeholder?: string;
|
|
338
|
+
allowAttachments?: boolean;
|
|
339
|
+
allowVoiceRecording?: boolean;
|
|
340
|
+
maxLength?: number;
|
|
341
|
+
};
|
|
342
|
+
/** Hide sidebar (full-width chat) */
|
|
343
|
+
hideSidebar?: boolean;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* ChatPageTemplate props (full page layout)
|
|
347
|
+
*/
|
|
348
|
+
export interface ChatPageTemplateProps extends HTMLAttributes<HTMLDivElement> {
|
|
349
|
+
/** List of conversations */
|
|
350
|
+
conversations?: ChatConversation[];
|
|
351
|
+
/** Currently active conversation ID */
|
|
352
|
+
activeConversationId?: string;
|
|
353
|
+
/** Callback when a conversation is selected */
|
|
354
|
+
onSelectConversation?: (id: string) => void;
|
|
355
|
+
/** Callback when new conversation is created */
|
|
356
|
+
onNewConversation?: () => void;
|
|
357
|
+
/** Callback when a conversation is deleted */
|
|
358
|
+
onDeleteConversation?: (id: string) => void;
|
|
359
|
+
/** Messages for the active conversation */
|
|
360
|
+
messages?: ChatMessage[];
|
|
361
|
+
/** Callback when a message is sent */
|
|
362
|
+
onSendMessage?: (message: string, attachments?: File[]) => void;
|
|
363
|
+
/** Whether assistant is typing */
|
|
364
|
+
isTyping?: boolean;
|
|
365
|
+
/** Whether message is being sent */
|
|
366
|
+
isLoading?: boolean;
|
|
367
|
+
/** User information for header */
|
|
368
|
+
user?: {
|
|
369
|
+
name: string;
|
|
370
|
+
avatar?: string;
|
|
371
|
+
};
|
|
372
|
+
/** Callback when user logs out */
|
|
373
|
+
onLogout?: () => void;
|
|
374
|
+
/** Custom logo element */
|
|
375
|
+
logo?: ReactNode;
|
|
376
|
+
/** Chat input configuration */
|
|
377
|
+
inputConfig?: ChatSectionProps['inputConfig'];
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Image lightbox props
|
|
381
|
+
*/
|
|
382
|
+
export interface ChatLightboxProps extends HTMLAttributes<HTMLDivElement> {
|
|
383
|
+
/** Image source URL */
|
|
384
|
+
src: string;
|
|
385
|
+
/** Alt text for accessibility */
|
|
386
|
+
alt?: string;
|
|
387
|
+
/** Whether lightbox is open */
|
|
388
|
+
isOpen: boolean;
|
|
389
|
+
/** Callback when lightbox is closed */
|
|
390
|
+
onClose: () => void;
|
|
391
|
+
}
|
|
392
|
+
//# sourceMappingURL=Chat.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chat.types.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Chat.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAM1F;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,CAAC;AAMjD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC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 -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatAttachment Component
|
|
3
|
+
*
|
|
4
|
+
* Unified attachment preview component that renders the appropriate
|
|
5
|
+
* display based on attachment type (image, audio, file, code).
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { ChatAttachmentPreviewProps } from '../Chat.types';
|
|
9
|
+
export declare const ChatAttachment: React.FC<ChatAttachmentPreviewProps>;
|
|
10
|
+
//# sourceMappingURL=ChatAttachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatAttachment.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/components/ChatAttachment.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,0BAA0B,EAAkB,MAAM,eAAe,CAAC;AAqBhF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA0H/D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatAudioPlayer Component
|
|
3
|
+
*
|
|
4
|
+
* Audio playback controls with progress tracking and keyboard navigation.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { ChatAudioPlayerProps } from '../Chat.types';
|
|
8
|
+
export declare const ChatAudioPlayer: React.FC<ChatAudioPlayerProps>;
|
|
9
|
+
//# sourceMappingURL=ChatAudioPlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatAudioPlayer.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/components/ChatAudioPlayer.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAI1D,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwK1D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatCodeBlock Component
|
|
3
|
+
*
|
|
4
|
+
* Syntax-highlighted code block with copy functionality
|
|
5
|
+
* and theme-aware highlighting.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { ChatCodeBlockProps } from '../Chat.types';
|
|
9
|
+
export declare const ChatCodeBlock: React.FC<ChatCodeBlockProps>;
|
|
10
|
+
//# sourceMappingURL=ChatCodeBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatCodeBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/components/ChatCodeBlock.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAgC,MAAM,OAAO,CAAC;AAIrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAwBxD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgGtD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatFileUpload Component
|
|
3
|
+
*
|
|
4
|
+
* File upload zone with drag-and-drop support.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { ChatFileUploadProps } from '../Chat.types';
|
|
8
|
+
export declare const ChatFileUpload: React.FC<ChatFileUploadProps>;
|
|
9
|
+
//# sourceMappingURL=ChatFileUpload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatFileUpload.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/components/ChatFileUpload.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAIzD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6JxD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatHeader Component
|
|
3
|
+
*
|
|
4
|
+
* Header bar with title, avatar, and action buttons.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { ChatHeaderProps } from '../Chat.types';
|
|
8
|
+
export declare const ChatHeader: React.FC<ChatHeaderProps>;
|
|
9
|
+
//# sourceMappingURL=ChatHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/components/ChatHeader.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA6ChD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatImagePreview Component
|
|
3
|
+
*
|
|
4
|
+
* Displays image attachments with thumbnail and lightbox support.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { ChatImagePreviewProps } from '../Chat.types';
|
|
8
|
+
export declare const ChatImagePreview: React.FC<ChatImagePreviewProps>;
|
|
9
|
+
//# sourceMappingURL=ChatImagePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatImagePreview.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/components/ChatImagePreview.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAI3D,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA2E5D,CAAC"}
|