@automattic/agenttic-ui 0.1.0 → 0.1.1
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 +23 -5
- package/dist/components/AgentUI.d.ts +65 -0
- package/dist/components/AgentUI.d.ts.map +1 -0
- package/dist/components/animations/index.d.ts +22 -0
- package/dist/components/animations/index.d.ts.map +1 -0
- package/dist/components/chat/Chat.d.ts +3 -0
- package/dist/components/chat/Chat.d.ts.map +1 -0
- package/dist/components/chat/Chat.stories.d.ts +38 -0
- package/dist/components/chat/Chat.stories.d.ts.map +1 -0
- package/dist/components/chat/ChatFooter.d.ts +20 -0
- package/dist/components/chat/ChatFooter.d.ts.map +1 -0
- package/dist/components/chat/ChatHeader.d.ts +6 -0
- package/dist/components/chat/ChatHeader.d.ts.map +1 -0
- package/dist/components/chat/ChatHeader.stories.d.ts +20 -0
- package/dist/components/chat/ChatHeader.stories.d.ts.map +1 -0
- package/dist/components/chat/ChatInput.d.ts +18 -0
- package/dist/components/chat/ChatInput.d.ts.map +1 -0
- package/dist/components/chat/ChatInput.stories.d.ts +15 -0
- package/dist/components/chat/ChatInput.stories.d.ts.map +1 -0
- package/dist/components/chat/MarkdownExamples.stories.d.ts +23 -0
- package/dist/components/chat/MarkdownExamples.stories.d.ts.map +1 -0
- package/dist/components/chat/Message.d.ts +11 -0
- package/dist/components/chat/Message.d.ts.map +1 -0
- package/dist/components/chat/Message.stories.d.ts +24 -0
- package/dist/components/chat/Message.stories.d.ts.map +1 -0
- package/dist/components/chat/MessageActions.d.ts +7 -0
- package/dist/components/chat/MessageActions.d.ts.map +1 -0
- package/dist/components/chat/MessageActions.stories.d.ts +23 -0
- package/dist/components/chat/MessageActions.stories.d.ts.map +1 -0
- package/dist/components/chat/Messages.d.ts +15 -0
- package/dist/components/chat/Messages.d.ts.map +1 -0
- package/dist/components/chat/Messages.stories.d.ts +41 -0
- package/dist/components/chat/Messages.stories.d.ts.map +1 -0
- package/dist/components/chat/Notice.d.ts +14 -0
- package/dist/components/chat/Notice.d.ts.map +1 -0
- package/dist/components/chat/Notice.stories.d.ts +18 -0
- package/dist/components/chat/Notice.stories.d.ts.map +1 -0
- package/dist/components/chat/Suggestions.d.ts +9 -0
- package/dist/components/chat/Suggestions.d.ts.map +1 -0
- package/dist/components/chat/ThinkingMessage.d.ts +6 -0
- package/dist/components/chat/ThinkingMessage.d.ts.map +1 -0
- package/dist/components/chat/ThinkingMessage.stories.d.ts +14 -0
- package/dist/components/chat/ThinkingMessage.stories.d.ts.map +1 -0
- package/dist/components/chat/index.d.ts +13 -0
- package/dist/components/chat/index.d.ts.map +1 -0
- package/dist/components/icons/ArrowUpIcon.d.ts +7 -0
- package/dist/components/icons/ArrowUpIcon.d.ts.map +1 -0
- package/dist/components/icons/BigSkyIcon.d.ts +7 -0
- package/dist/components/icons/BigSkyIcon.d.ts.map +1 -0
- package/dist/components/icons/ChevronDownIcon.d.ts +7 -0
- package/dist/components/icons/ChevronDownIcon.d.ts.map +1 -0
- package/dist/components/icons/ChevronUpIcon.d.ts +7 -0
- package/dist/components/icons/ChevronUpIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts +7 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/Icons.stories.d.ts +40 -0
- package/dist/components/icons/Icons.stories.d.ts.map +1 -0
- package/dist/components/icons/StopIcon.d.ts +7 -0
- package/dist/components/icons/StopIcon.d.ts.map +1 -0
- package/dist/components/icons/StylesIcon.d.ts +7 -0
- package/dist/components/icons/StylesIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsDownIcon.d.ts +7 -0
- package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsUpIcon.d.ts +7 -0
- package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -0
- package/dist/components/icons/XIcon.d.ts +7 -0
- package/dist/components/icons/XIcon.d.ts.map +1 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.stories.d.ts +17 -0
- package/dist/components/ui/button.stories.d.ts.map +1 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.stories.d.ts +44 -0
- package/dist/components/ui/textarea.stories.d.ts.map +1 -0
- package/dist/components/views/ChatViews.stories.d.ts +33 -0
- package/dist/components/views/ChatViews.stories.d.ts.map +1 -0
- package/dist/components/views/CollapsedView.d.ts +10 -0
- package/dist/components/views/CollapsedView.d.ts.map +1 -0
- package/dist/components/views/CompactView.d.ts +17 -0
- package/dist/components/views/CompactView.d.ts.map +1 -0
- package/dist/components/views/ConversationView.d.ts +31 -0
- package/dist/components/views/ConversationView.d.ts.map +1 -0
- package/dist/hooks/useChat.d.ts +3 -0
- package/dist/hooks/useChat.d.ts.map +1 -0
- package/dist/hooks/useInput.d.ts +17 -0
- package/dist/hooks/useInput.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1270 -1221
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/dist/stories/charts/BarChart.stories.d.ts +26 -0
- package/dist/stories/charts/BarChart.stories.d.ts.map +1 -0
- package/dist/stories/charts/LineChart.stories.d.ts +26 -0
- package/dist/stories/charts/LineChart.stories.d.ts.map +1 -0
- package/dist/stories/gfm/GithubFlavoredMarkdown.stories.d.ts +36 -0
- package/dist/stories/gfm/GithubFlavoredMarkdown.stories.d.ts.map +1 -0
- package/dist/stories/mocks/messageActions.d.ts +20 -0
- package/dist/stories/mocks/messageActions.d.ts.map +1 -0
- package/dist/types/index.d.ts +85 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/classNames.d.ts +11 -0
- package/dist/utils/classNames.d.ts.map +1 -0
- package/dist/utils/message-helpers.d.ts +64 -0
- package/dist/utils/message-helpers.d.ts.map +1 -0
- package/dist/utils/theme.d.ts +8 -0
- package/dist/utils/theme.d.ts.map +1 -0
- package/package.json +101 -100
package/README.md
CHANGED
|
@@ -341,18 +341,36 @@ Components automatically import their styles. For manual control:
|
|
|
341
341
|
import '@automattic/agenttic-ui/index.css';
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
+
### CSS Scoping
|
|
345
|
+
|
|
346
|
+
All AgentUI styles are scoped to the `.agenttic` class to prevent conflicts with host applications. This ensures that the component styles don't interfere with your existing styles.
|
|
347
|
+
|
|
344
348
|
### Customization
|
|
345
349
|
|
|
346
|
-
|
|
350
|
+
Override CSS custom properties to theme the entire chat or specific areas:
|
|
347
351
|
|
|
348
352
|
```css
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
--
|
|
352
|
-
--
|
|
353
|
+
/* Global theming */
|
|
354
|
+
.agenttic {
|
|
355
|
+
--color-primary: #your-brand-color;
|
|
356
|
+
--color-background: #ffffff;
|
|
357
|
+
--color-foreground: #000000;
|
|
358
|
+
/* ...other custom properties as needed. */
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* Target specific UI areas, e.g. the chat footer as seen in Big Sky embedded site spec. */
|
|
362
|
+
.agenttic [data-slot="chat-footer"] {
|
|
363
|
+
--color-background: oklch(1 0 0);
|
|
364
|
+
--color-foreground: oklch(0.241 0 0);
|
|
365
|
+
--color-primary: #your-brand-color;
|
|
366
|
+
--color-primary-foreground: oklch(1 0 0);
|
|
367
|
+
--color-muted: oklch(0.925 0 0);
|
|
368
|
+
--color-muted-foreground: oklch(0.6 0 0);
|
|
353
369
|
}
|
|
354
370
|
```
|
|
355
371
|
|
|
372
|
+
This approach allows granular theming of specific areas without affecting other parts of the application.
|
|
373
|
+
|
|
356
374
|
## Advanced Usage
|
|
357
375
|
|
|
358
376
|
### Custom Message Renderer
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AgentUIProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* AgentUI - Pure UI component for chat interface
|
|
5
|
+
*
|
|
6
|
+
* This component ONLY handles UI concerns. It receives all data and callbacks
|
|
7
|
+
* as props, making it completely framework-agnostic and reusable.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { useAgentChat } from '@automattic/agenttic-client';
|
|
13
|
+
* import { AgentUI } from '@automattic/agenttic-ui';
|
|
14
|
+
*
|
|
15
|
+
* function ChatComponent() {
|
|
16
|
+
* const {
|
|
17
|
+
* messages,
|
|
18
|
+
* isProcessing,
|
|
19
|
+
* error,
|
|
20
|
+
* onSubmit,
|
|
21
|
+
* suggestions,
|
|
22
|
+
* clearSuggestions
|
|
23
|
+
* } = useAgentChat({
|
|
24
|
+
* agentId: 'your-agent-id',
|
|
25
|
+
* contextProvider,
|
|
26
|
+
* toolProvider
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* return (
|
|
30
|
+
* <AgentUI
|
|
31
|
+
* messages={messages}
|
|
32
|
+
* isProcessing={isProcessing}
|
|
33
|
+
* error={error}
|
|
34
|
+
* onSubmit={onSubmit}
|
|
35
|
+
* suggestions={suggestions}
|
|
36
|
+
* clearSuggestions={clearSuggestions}
|
|
37
|
+
* variant="floating"
|
|
38
|
+
* placeholder="Ask anything..."
|
|
39
|
+
* />
|
|
40
|
+
* );
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @param props - UI-only props for chat interface
|
|
45
|
+
* @param props.variant
|
|
46
|
+
* @param props.triggerIcon
|
|
47
|
+
* @param props.placeholder
|
|
48
|
+
* @param props.notice
|
|
49
|
+
* @param props.onOpen
|
|
50
|
+
* @param props.onExpand
|
|
51
|
+
* @param props.onClose
|
|
52
|
+
* @param props.emptyView
|
|
53
|
+
* @param props.messages
|
|
54
|
+
* @param props.isProcessing
|
|
55
|
+
* @param props.error
|
|
56
|
+
* @param props.onSubmit
|
|
57
|
+
* @param props.suggestions
|
|
58
|
+
* @param props.clearSuggestions
|
|
59
|
+
* @param props.messageRenderer
|
|
60
|
+
* @param props.floatingChatState
|
|
61
|
+
* @param props.className - Additional CSS classes to apply to the component
|
|
62
|
+
*/
|
|
63
|
+
export declare const AgentUI: React.FC<AgentUIProps>;
|
|
64
|
+
export default AgentUI;
|
|
65
|
+
//# sourceMappingURL=AgentUI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentUI.d.ts","sourceRoot":"","sources":["../../src/components/AgentUI.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAE,YAAY,CAwC3C,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Transition, Variants } from 'framer-motion';
|
|
2
|
+
export declare const springConfig: Transition;
|
|
3
|
+
export declare const layoutTransition: Transition;
|
|
4
|
+
export declare const fastSpring: Transition;
|
|
5
|
+
export declare const fastSpringWithDelay: Transition;
|
|
6
|
+
export declare const morphSpring: Transition;
|
|
7
|
+
export declare const fadeVariants: Variants;
|
|
8
|
+
export declare const getDragConstraints: () => {
|
|
9
|
+
left: number;
|
|
10
|
+
right: number;
|
|
11
|
+
top: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const thinkingGradientKeyframes: {
|
|
15
|
+
'0%': {
|
|
16
|
+
backgroundPosition: string;
|
|
17
|
+
};
|
|
18
|
+
'100%': {
|
|
19
|
+
backgroundPosition: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/animations/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG1D,eAAO,MAAM,YAAY,EAAE,UAI1B,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,UAI9B,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,UAKxB,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,UAIjC,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,UAKzB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,QAY1B,CAAC;AAGF,eAAO,MAAM,kBAAkB;;;;;CAY9B,CAAC;AAGF,eAAO,MAAM,yBAAyB;;;;;;;CAGrC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ChatProps } from '../../types';
|
|
2
|
+
export declare function Chat({ messages, isProcessing, error, onSubmit, variant, triggerIcon, placeholder, notice, onOpen, onExpand, onClose, emptyView, floatingChatState, suggestions, clearSuggestions, messageRenderer, className, }: ChatProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=Chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/chat/Chat.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiC7C,wBAAgB,IAAI,CAAE,EACrB,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,OAAoB,EACpB,WAAW,EACX,WAAiC,EACjC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,SAAS,GACT,EAAE,SAAS,2CAkbX"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Chat } from './Chat';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Chat;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
canvas: {
|
|
10
|
+
sourceState: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
args: {
|
|
16
|
+
placeholder: string;
|
|
17
|
+
};
|
|
18
|
+
argTypes: {
|
|
19
|
+
variant: {
|
|
20
|
+
control: "select";
|
|
21
|
+
options: string[];
|
|
22
|
+
};
|
|
23
|
+
placeholder: {
|
|
24
|
+
control: "text";
|
|
25
|
+
};
|
|
26
|
+
floatingChatState: {
|
|
27
|
+
control: "select";
|
|
28
|
+
options: string[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default meta;
|
|
33
|
+
type Story = StoryObj<typeof meta>;
|
|
34
|
+
export declare const Default: Story;
|
|
35
|
+
export declare const Embedded: Story;
|
|
36
|
+
export declare const Floating: Story;
|
|
37
|
+
export declare const WithEmptyView: Story;
|
|
38
|
+
//# sourceMappingURL=Chat.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chat.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/Chat.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAkC9B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAuBrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KA4CtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA6D3B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NoticeConfig, Suggestion } from '../../types';
|
|
3
|
+
interface ChatFooterProps {
|
|
4
|
+
inputValue: string;
|
|
5
|
+
onInputChange: (value: string) => void;
|
|
6
|
+
onSubmit: () => void;
|
|
7
|
+
onKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
8
|
+
textareaRef: React.RefObject<HTMLTextAreaElement>;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
isProcessing: boolean;
|
|
11
|
+
fromCompact?: boolean;
|
|
12
|
+
onExpand?: () => void;
|
|
13
|
+
notice?: NoticeConfig;
|
|
14
|
+
suggestions?: Suggestion[];
|
|
15
|
+
clearSuggestions?: () => void;
|
|
16
|
+
focusOnMount?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function ChatFooter({ inputValue, onInputChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, fromCompact, onExpand, notice, suggestions, clearSuggestions, focusOnMount, }: ChatFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=ChatFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatFooter.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAM5D,UAAU,eAAe;IAExB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,CAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,mBAAmB,CAAE,KAAM,IAAI,CAAC;IACrE,WAAW,EAAE,KAAK,CAAC,SAAS,CAAE,mBAAmB,CAAE,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IAGtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAGtB,MAAM,CAAC,EAAE,YAAY,CAAC;IAGtB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAG9B,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,UAAU,CAAE,EAC3B,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAmB,EACnB,QAAQ,EACR,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,YAAY,GACZ,EAAE,eAAe,2CAsCjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatHeader.tsx"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAE,EAAE,OAAO,EAAE,EAAE,eAAe,2CAiBvD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ChatHeader } from './ChatHeader';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ChatHeader;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
onClose: {
|
|
12
|
+
action: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Default: Story;
|
|
20
|
+
//# sourceMappingURL=ChatHeader.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatHeader.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatHeader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,QAAA,MAAM,IAAI;;;;;;;;;;;;;CAa2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ChatInputProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
onSubmit: () => void;
|
|
6
|
+
onKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
7
|
+
textareaRef: React.RefObject<HTMLTextAreaElement>;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
isProcessing: boolean;
|
|
10
|
+
onBlur?: () => void;
|
|
11
|
+
fromCompact?: boolean;
|
|
12
|
+
onExpand?: () => void;
|
|
13
|
+
showExpandButton?: boolean;
|
|
14
|
+
focusOnMount?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function ChatInput({ value, onChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onBlur, fromCompact, onExpand, showExpandButton, focusOnMount, }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ChatInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAYxD,UAAU,cAAc;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,CAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,mBAAmB,CAAE,KAAM,IAAI,CAAC;IACrE,WAAW,EAAE,KAAK,CAAC,SAAS,CAAE,mBAAmB,CAAE,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,SAAS,CAAE,EAC1B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAiC,EACjC,YAAY,EACZ,MAAM,EACN,WAAmB,EACnB,QAAQ,EACR,gBAAuB,EACvB,YAAoB,GACpB,EAAE,cAAc,2CAoFhB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ChatInput } from './ChatInput';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ChatInput;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const Processing: Story;
|
|
15
|
+
//# sourceMappingURL=ChatInput.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatInput.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,IAAI;;;;;;;CAO0B,CAAC;AAErC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAsBrC,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Messages } from './Messages';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Messages;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const BlockquoteExample: Story;
|
|
19
|
+
export declare const CodeBlockExample: Story;
|
|
20
|
+
export declare const MixedMarkdownContent: Story;
|
|
21
|
+
export declare const LongCodeExample: Story;
|
|
22
|
+
export declare const NestedQuotes: Story;
|
|
23
|
+
//# sourceMappingURL=MarkdownExamples.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownExamples.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/MarkdownExamples.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,QAAA,MAAM,IAAI;;;;;;;;;;;;CA6ByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AA2JrC,eAAO,MAAM,iBAAiB,EAAE,KAM/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KA0DlC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA+H7B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAiD1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentType } from 'react';
|
|
3
|
+
import type { Message as MessageType } from '../../types';
|
|
4
|
+
export interface MessageProps {
|
|
5
|
+
message: MessageType;
|
|
6
|
+
messageRenderer?: ComponentType<{
|
|
7
|
+
children: string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
//# sourceMappingURL=Message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/components/chat/Message.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,WAAW,YAAY;IAC5B,OAAO,EAAE,WAAW,CAAC;IACrB,eAAe,CAAC,EAAE,aAAa,CAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAE,CAAC;CACxD;AAED,eAAO,MAAM,OAAO,qFA6DnB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./Message").MessageProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
argTypes: {
|
|
10
|
+
message: {
|
|
11
|
+
control: "object";
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const UserMessage: Story;
|
|
19
|
+
export declare const AssistantMessage: Story;
|
|
20
|
+
export declare const MarkdownContent: Story;
|
|
21
|
+
export declare const CodeContent: Story;
|
|
22
|
+
export declare const LongMessage: Story;
|
|
23
|
+
export declare const MessageThread: Story;
|
|
24
|
+
//# sourceMappingURL=Message.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/Message.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;CAawB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AA+ErC,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAI9B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAI7B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAgBzB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAyB3B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Message } from '../../types';
|
|
2
|
+
interface MessageActionsProps {
|
|
3
|
+
message: Message;
|
|
4
|
+
}
|
|
5
|
+
export declare function MessageActions({ message }: MessageActionsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=MessageActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageActions.d.ts","sourceRoot":"","sources":["../../../src/components/chat/MessageActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,aAAa,CAAC;AAI1D,UAAU,mBAAmB;IAC5B,OAAO,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,cAAc,CAAE,EAAE,OAAO,EAAE,EAAE,mBAAmB,kDA+B/D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { MessageActions } from './MessageActions';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof MessageActions;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const ComponentExample: Story;
|
|
18
|
+
export declare const FeedbackExample: Story;
|
|
19
|
+
export declare const CustomAssistantMessage: Story;
|
|
20
|
+
export declare const CustomUserMessage: Story;
|
|
21
|
+
export declare const NoActions: Story;
|
|
22
|
+
export declare const DisabledActions: Story;
|
|
23
|
+
//# sourceMappingURL=MessageActions.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageActions.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/MessageActions.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAmBlD,QAAA,MAAM,IAAI;;;;;;;;;;;CAY+B,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAGrC,eAAO,MAAM,gBAAgB,EAAE,KAa9B,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,KAyE7B,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,KAapC,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,KA8C/B,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,KAcvB,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,KA0B7B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { Message as MessageType } from '../../types';
|
|
3
|
+
interface MessagesProps {
|
|
4
|
+
messages: MessageType[];
|
|
5
|
+
isProcessing?: boolean;
|
|
6
|
+
error?: string | null;
|
|
7
|
+
emptyView?: React.ReactNode;
|
|
8
|
+
fromCompact?: boolean;
|
|
9
|
+
messageRenderer?: ComponentType<{
|
|
10
|
+
children: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
export declare function Messages({ messages, isProcessing, error, emptyView, fromCompact, messageRenderer, }: MessagesProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=Messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Messages.d.ts","sourceRoot":"","sources":["../../../src/components/chat/Messages.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1D,UAAU,aAAa;IACtB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,aAAa,CAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAE,CAAC;CACxD;AAED,wBAAgB,QAAQ,CAAE,EACzB,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,SAAS,EACT,WAAmB,EACnB,eAAe,GACf,EAAE,aAAa,kDAgIf"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Messages } from './Messages';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Messages;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
messages: {
|
|
12
|
+
control: "object";
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
isProcessing: {
|
|
16
|
+
control: "boolean";
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
error: {
|
|
20
|
+
control: "text";
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
emptyView: {
|
|
24
|
+
control: "object";
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
fromCompact: {
|
|
28
|
+
control: "boolean";
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default meta;
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
export declare const Default: Story;
|
|
36
|
+
export declare const Empty: Story;
|
|
37
|
+
export declare const Thinking: Story;
|
|
38
|
+
export declare const SingleMessage: Story;
|
|
39
|
+
export declare const LongConversation: Story;
|
|
40
|
+
export declare const WithError: Story;
|
|
41
|
+
//# sourceMappingURL=Messages.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Messages.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/Messages.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAiFrC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAK3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAgE9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface NoticeProps {
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
message: string;
|
|
5
|
+
action?: {
|
|
6
|
+
label: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
};
|
|
9
|
+
dismissible?: boolean;
|
|
10
|
+
onDismiss?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function Notice({ icon, message, action, dismissible, onDismiss, }: NoticeProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=Notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Notice.d.ts","sourceRoot":"","sources":["../../../src/components/chat/Notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,WAAW;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;KACpB,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,MAAM,CAAE,EACvB,IAAI,EACJ,OAAO,EACP,MAAM,EACN,WAAkB,EAClB,SAAS,GACT,EAAE,WAAW,2CA8Bb"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Notice } from './Notice';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Notice;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const WithIcon: Story;
|
|
15
|
+
export declare const WithAction: Story;
|
|
16
|
+
export declare const Dismissible: Story;
|
|
17
|
+
export declare const NonDismissible: Story;
|
|
18
|
+
//# sourceMappingURL=Notice.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Notice.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/Notice.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,QAAA,MAAM,IAAI;;;;;;;CAOuB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAK5B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Suggestion } from '../../types';
|
|
3
|
+
export interface SuggestionsProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
suggestions?: Suggestion[];
|
|
6
|
+
onSubmit?: (message: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const Suggestions: React.FC<SuggestionsProps>;
|
|
9
|
+
//# sourceMappingURL=Suggestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Suggestions.d.ts","sourceRoot":"","sources":["../../../src/components/chat/Suggestions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAM9C,MAAM,WAAW,gBAAgB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAE,OAAO,EAAE,MAAM,KAAM,IAAI,CAAC;CACvC;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAE,gBAAgB,CAoDnD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ThinkingMessageProps {
|
|
3
|
+
content?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const ThinkingMessage: React.MemoExoticComponent<React.ForwardRefExoticComponent<ThinkingMessageProps & React.RefAttributes<HTMLDivElement>>>;
|
|
6
|
+
//# sourceMappingURL=ThinkingMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThinkingMessage.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ThinkingMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAI7C,MAAM,WAAW,oBAAoB;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,wHAoB3B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./ThinkingMessage").ThinkingMessageProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const InConversation: Story;
|
|
14
|
+
//# sourceMappingURL=ThinkingMessage.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThinkingMessage.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ThinkingMessage.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,QAAA,MAAM,IAAI;;;;;;;CAOgC,CAAC;AAE3C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AA8BF,eAAO,MAAM,cAAc,EAAE,KAW5B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { Chat } from './Chat';
|
|
2
|
+
export { Message as ChatMessage } from './Message';
|
|
3
|
+
export { Messages } from './Messages';
|
|
4
|
+
export { ThinkingMessage } from './ThinkingMessage';
|
|
5
|
+
export { ChatInput } from './ChatInput';
|
|
6
|
+
export { CollapsedView } from '../views/CollapsedView';
|
|
7
|
+
export { CompactView } from '../views/CompactView';
|
|
8
|
+
export { ConversationView } from '../views/ConversationView';
|
|
9
|
+
export { useChat } from '../../hooks/useChat';
|
|
10
|
+
export { useInput } from '../../hooks/useInput';
|
|
11
|
+
export type { ChatProps, ChatState, Message, UseChatReturn, UseInputReturn, } from '../../types';
|
|
12
|
+
export * from '../animations';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG7D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,YAAY,EACX,SAAS,EACT,SAAS,EACT,OAAO,EACP,aAAa,EACb,cAAc,GACd,MAAM,aAAa,CAAC;AAGrB,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrowUpIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/ArrowUpIcon.tsx"],"names":[],"mappings":"AAAA,UAAU,gBAAgB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,WAAW,CAAE,EAAE,SAAS,EAAE,IAAS,EAAE,EAAE,gBAAgB,2CAgBtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BigSkyIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/BigSkyIcon.tsx"],"names":[],"mappings":"AAEA,UAAU,eAAe;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,UAAU,CAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,eAAe,2CAwB/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChevronDownIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/ChevronDownIcon.tsx"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,eAAe,CAAE,EAChC,SAAS,EACT,IAAS,GACT,EAAE,oBAAoB,2CAkBtB"}
|