@automattic/agenttic-ui 0.1.10 → 0.1.12
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 +281 -387
- package/dist/components/AgentUI.d.ts +19 -1
- package/dist/components/AgentUI.d.ts.map +1 -1
- package/dist/components/AgentUIContainer.d.ts +8 -0
- package/dist/components/AgentUIContainer.d.ts.map +1 -0
- package/dist/components/chat/Chat.d.ts.map +1 -1
- package/dist/components/chat/ChatFooter.stories.d.ts.map +1 -1
- package/dist/components/chat/ChatHeader.d.ts +2 -1
- package/dist/components/chat/ChatHeader.d.ts.map +1 -1
- package/dist/components/chat/ChatInput.d.ts +2 -1
- package/dist/components/chat/ChatInput.d.ts.map +1 -1
- package/dist/components/chat/ChatInput.stories.d.ts +39 -1
- package/dist/components/chat/ChatInput.stories.d.ts.map +1 -1
- package/dist/components/chat/Messages.d.ts +2 -1
- package/dist/components/chat/Messages.d.ts.map +1 -1
- package/dist/components/chat/Notice.d.ts +3 -1
- package/dist/components/chat/Notice.d.ts.map +1 -1
- package/dist/components/chat/Notice.stories.d.ts +3 -0
- package/dist/components/chat/Notice.stories.d.ts.map +1 -1
- package/dist/components/chat/Suggestions.d.ts +2 -0
- package/dist/components/chat/Suggestions.d.ts.map +1 -1
- package/dist/components/composable/AgentUIConversationView.d.ts +8 -0
- package/dist/components/composable/AgentUIConversationView.d.ts.map +1 -0
- package/dist/components/composable/AgentUIFooter.d.ts +7 -0
- package/dist/components/composable/AgentUIFooter.d.ts.map +1 -0
- package/dist/components/composable/AgentUIHeader.d.ts +5 -0
- package/dist/components/composable/AgentUIHeader.d.ts.map +1 -0
- package/dist/components/composable/AgentUIInput.d.ts +9 -0
- package/dist/components/composable/AgentUIInput.d.ts.map +1 -0
- package/dist/components/composable/AgentUIMessages.d.ts +5 -0
- package/dist/components/composable/AgentUIMessages.d.ts.map +1 -0
- package/dist/components/composable/AgentUINotice.d.ts +5 -0
- package/dist/components/composable/AgentUINotice.d.ts.map +1 -0
- package/dist/components/composable/AgentUISuggestions.d.ts +6 -0
- package/dist/components/composable/AgentUISuggestions.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/views/CompactView.d.ts +4 -1
- package/dist/components/views/CompactView.d.ts.map +1 -1
- package/dist/context/AgentUIContext.d.ts +41 -0
- package/dist/context/AgentUIContext.d.ts.map +1 -0
- package/dist/hooks/useMultiTimeout.d.ts +11 -0
- package/dist/hooks/useMultiTimeout.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1388 -1852
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -6
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AgentUIProps } from '../types';
|
|
3
|
+
import { AgentUIContainer } from './AgentUIContainer';
|
|
4
|
+
import { AgentUIHeader } from './composable/AgentUIHeader';
|
|
5
|
+
import { AgentUIMessages } from './composable/AgentUIMessages';
|
|
6
|
+
import { AgentUIInput } from './composable/AgentUIInput';
|
|
7
|
+
import { AgentUISuggestions } from './composable/AgentUISuggestions';
|
|
8
|
+
import { AgentUINotice } from './composable/AgentUINotice';
|
|
9
|
+
import { AgentUIFooter } from './composable/AgentUIFooter';
|
|
10
|
+
import { AgentUIConversationView } from './composable/AgentUIConversationView';
|
|
3
11
|
/**
|
|
4
12
|
* AgentUI - Pure UI component for chat interface
|
|
5
13
|
*
|
|
@@ -61,6 +69,16 @@ import type { AgentUIProps } from '../types';
|
|
|
61
69
|
* @param props.floatingChatState
|
|
62
70
|
* @param props.className - Additional CSS classes to apply to the component
|
|
63
71
|
*/
|
|
64
|
-
|
|
72
|
+
declare const AgentUINamespace: {
|
|
73
|
+
Container: typeof AgentUIContainer;
|
|
74
|
+
Header: typeof AgentUIHeader;
|
|
75
|
+
Messages: typeof AgentUIMessages;
|
|
76
|
+
Input: typeof AgentUIInput;
|
|
77
|
+
Suggestions: typeof AgentUISuggestions;
|
|
78
|
+
Notice: typeof AgentUINotice;
|
|
79
|
+
Footer: typeof AgentUIFooter;
|
|
80
|
+
ConversationView: typeof AgentUIConversationView;
|
|
81
|
+
};
|
|
82
|
+
export declare const AgentUI: React.FC<AgentUIProps> & typeof AgentUINamespace;
|
|
65
83
|
export default AgentUI;
|
|
66
84
|
//# sourceMappingURL=AgentUI.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAG7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,QAAA,MAAM,gBAAgB;;;;;;;;;CAcrB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAE,YAAY,CAAE,GAAG,OAAO,gBAatD,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AgentUIProps } from '../types';
|
|
3
|
+
interface AgentUIContainerProps extends AgentUIProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function AgentUIContainer({ children, messages, isProcessing, error, onSubmit, variant, triggerIcon, placeholder, notice, onOpen, onExpand, onClose, onStop, emptyView, floatingChatState, suggestions, clearSuggestions, messageRenderer, className, inputValue: controlledInputValue, onInputChange: controlledOnInputChange, ...props }: AgentUIContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=AgentUIContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentUIContainer.d.ts","sourceRoot":"","sources":["../../src/components/AgentUIContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAWxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAmC7C,UAAU,qBAAsB,SAAQ,YAAY;IACnD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,wBAAgB,gBAAgB,CAAE,EACjC,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,OAAoB,EACpB,WAAW,EACX,WAAW,EACX,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,UAAU,EAAE,oBAAoB,EAChC,aAAa,EAAE,uBAAuB,EACtC,GAAG,KAAK,EACR,EAAE,qBAAqB,2CA8dvB"}
|
|
@@ -1 +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,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,SAAS,GACT,EAAE,SAAS,
|
|
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,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,SAAS,GACT,EAAE,SAAS,2CA8bX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatFooter.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatFooter.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatFooter.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatFooter.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgE2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AA0GrC,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAc7B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAe5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAezB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAoBxB,CAAC;AAkDF,eAAO,MAAM,sBAAsB,EAAE,KAiBpC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface ChatHeaderProps {
|
|
2
2
|
onClose?: () => void;
|
|
3
|
+
className?: string;
|
|
3
4
|
}
|
|
4
|
-
export declare function ChatHeader({ onClose }: ChatHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function ChatHeader({ onClose, className }: ChatHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
|
6
7
|
//# sourceMappingURL=ChatHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatHeader.tsx"],"names":[],"mappings":"AAOA,UAAU,eAAe;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatHeader.tsx"],"names":[],"mappings":"AAOA,UAAU,eAAe;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,UAAU,CAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,eAAe,2CAoBlE"}
|
|
@@ -25,7 +25,8 @@ interface ChatInputProps {
|
|
|
25
25
|
actionOrder?: 'before-submit' | 'after-submit';
|
|
26
26
|
onStop?: () => void;
|
|
27
27
|
disabled?: boolean;
|
|
28
|
+
className?: string;
|
|
28
29
|
}
|
|
29
|
-
export declare function ChatInput({ value, onChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onBlur, fromCompact, onExpand, showExpandButton, focusOnMount, customActions, actionOrder, onStop, disabled, }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function ChatInput({ value, onChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onBlur, fromCompact, onExpand, showExpandButton, focusOnMount, customActions, actionOrder, onStop, disabled, className, }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
export type { ActionButton };
|
|
31
32
|
//# sourceMappingURL=ChatInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAcxD,UAAU,YAAY;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,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,GAAG,MAAM,EAAE,CAAC;IAChC,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;IACvB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC;IAC/C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;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,EACpB,aAAkB,EAClB,WAA6B,EAC7B,MAAM,EACN,QAAgB,EAChB,SAAS,GACT,EAAE,cAAc,2CA0IhB;AAED,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
import { ChatInput } from './ChatInput';
|
|
2
|
+
import { type ActionButton, ChatInput } from './ChatInput';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
declare const meta: {
|
|
4
5
|
title: string;
|
|
5
6
|
component: typeof ChatInput;
|
|
@@ -7,6 +8,43 @@ declare const meta: {
|
|
|
7
8
|
layout: string;
|
|
8
9
|
};
|
|
9
10
|
tags: string[];
|
|
11
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
12
|
+
value: string;
|
|
13
|
+
onChange: (value: string) => void;
|
|
14
|
+
onSubmit: () => void;
|
|
15
|
+
onKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
16
|
+
textareaRef: React.RefObject<HTMLTextAreaElement>;
|
|
17
|
+
placeholder?: string | string[] | undefined;
|
|
18
|
+
isProcessing: boolean;
|
|
19
|
+
onBlur?: (() => void) | undefined;
|
|
20
|
+
fromCompact?: boolean | undefined;
|
|
21
|
+
onExpand?: (() => void) | undefined;
|
|
22
|
+
showExpandButton?: boolean | undefined;
|
|
23
|
+
focusOnMount?: boolean | undefined;
|
|
24
|
+
customActions?: ActionButton[] | undefined;
|
|
25
|
+
actionOrder?: "before-submit" | "after-submit" | undefined;
|
|
26
|
+
onStop?: (() => void) | undefined;
|
|
27
|
+
disabled?: boolean | undefined;
|
|
28
|
+
className?: string | undefined;
|
|
29
|
+
}>, context: import("storybook/internal/csf").StoryContext<import("@storybook/react").ReactRenderer, {
|
|
30
|
+
value: string;
|
|
31
|
+
onChange: (value: string) => void;
|
|
32
|
+
onSubmit: () => void;
|
|
33
|
+
onKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
34
|
+
textareaRef: React.RefObject<HTMLTextAreaElement>;
|
|
35
|
+
placeholder?: string | string[] | undefined;
|
|
36
|
+
isProcessing: boolean;
|
|
37
|
+
onBlur?: (() => void) | undefined;
|
|
38
|
+
fromCompact?: boolean | undefined;
|
|
39
|
+
onExpand?: (() => void) | undefined;
|
|
40
|
+
showExpandButton?: boolean | undefined;
|
|
41
|
+
focusOnMount?: boolean | undefined;
|
|
42
|
+
customActions?: ActionButton[] | undefined;
|
|
43
|
+
actionOrder?: "before-submit" | "after-submit" | undefined;
|
|
44
|
+
onStop?: (() => void) | undefined;
|
|
45
|
+
disabled?: boolean | undefined;
|
|
46
|
+
className?: string | undefined;
|
|
47
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
10
48
|
};
|
|
11
49
|
export default meta;
|
|
12
50
|
type Story = StoryObj<typeof meta>;
|
|
@@ -1 +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,
|
|
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,KAAK,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAiB,MAAM,OAAO,CAAC;AAQtC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB0B,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;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAe9B,CAAC;AAwCF,eAAO,MAAM,iBAAiB,EAAE,KAiB/B,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,KAiB1C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAkB5B,CAAC;AA6CF,eAAO,MAAM,sBAAsB,EAAE,KAkBpC,CAAC"}
|
|
@@ -8,7 +8,8 @@ interface MessagesProps {
|
|
|
8
8
|
messageRenderer?: ComponentType<{
|
|
9
9
|
children: string;
|
|
10
10
|
}>;
|
|
11
|
+
className?: string;
|
|
11
12
|
}
|
|
12
|
-
export declare function Messages({ messages, isProcessing, error, emptyView, messageRenderer, }: MessagesProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export declare function Messages({ messages, isProcessing, error, emptyView, messageRenderer, className, }: MessagesProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
14
|
export {};
|
|
14
15
|
//# sourceMappingURL=Messages.d.ts.map
|
|
@@ -1 +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,eAAe,CAAC,EAAE,aAAa,CAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAE,CAAC;
|
|
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,eAAe,CAAC,EAAE,aAAa,CAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAE,CAAC;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,QAAQ,CAAE,EACzB,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,SAAS,EACT,eAAe,EACf,SAAS,GACT,EAAE,aAAa,kDA2Hf"}
|
|
@@ -8,7 +8,9 @@ interface NoticeProps {
|
|
|
8
8
|
};
|
|
9
9
|
dismissible?: boolean;
|
|
10
10
|
onDismiss?: () => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
status?: 'success' | 'warning' | 'error';
|
|
11
13
|
}
|
|
12
|
-
export declare function Notice({ icon, message, action, dismissible, onDismiss, }: NoticeProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Notice({ icon, message, action, dismissible, onDismiss, className, status, }: NoticeProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
14
16
|
//# sourceMappingURL=Notice.d.ts.map
|
|
@@ -1 +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;
|
|
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;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;CACzC;AAED,wBAAgB,MAAM,CAAE,EACvB,IAAI,EACJ,OAAO,EACP,MAAM,EACN,WAAkB,EAClB,SAAS,EACT,SAAS,EACT,MAAM,GACN,EAAE,WAAW,2CAqCb"}
|
|
@@ -15,4 +15,7 @@ export declare const WithIcon: Story;
|
|
|
15
15
|
export declare const WithAction: Story;
|
|
16
16
|
export declare const Dismissible: Story;
|
|
17
17
|
export declare const NonDismissible: Story;
|
|
18
|
+
export declare const Success: Story;
|
|
19
|
+
export declare const Warning: Story;
|
|
20
|
+
export declare const Error: Story;
|
|
18
21
|
//# sourceMappingURL=Notice.stories.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAKlC,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;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAUnB,CAAC"}
|
|
@@ -4,6 +4,8 @@ export interface SuggestionsProps {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
suggestions?: Suggestion[];
|
|
6
6
|
onSubmit?: (message: string) => void;
|
|
7
|
+
layout?: 'horizontal' | 'vertical';
|
|
8
|
+
visible?: boolean;
|
|
7
9
|
}
|
|
8
10
|
export declare const Suggestions: React.FC<SuggestionsProps>;
|
|
9
11
|
//# sourceMappingURL=Suggestions.d.ts.map
|
|
@@ -1 +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;
|
|
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;IACvC,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAE,gBAAgB,CAkEnD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AgentUIConversationViewProps {
|
|
3
|
+
showHeader?: boolean;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function AgentUIConversationView({ showHeader, children, className, }?: AgentUIConversationViewProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=AgentUIConversationView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentUIConversationView.d.ts","sourceRoot":"","sources":["../../../src/components/composable/AgentUIConversationView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,MAAM,WAAW,4BAA4B;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,uBAAuB,CAAE,EACxC,UAAiB,EACjB,QAAQ,EACR,SAAS,GACT,GAAE,4BAAiC,2CAyCnC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AgentUIFooterProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function AgentUIFooter({ children, className, }?: AgentUIFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=AgentUIFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentUIFooter.d.ts","sourceRoot":"","sources":["../../../src/components/composable/AgentUIFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,aAAa,CAAE,EAC9B,QAAQ,EACR,SAAS,GACT,GAAE,kBAAuB,2CA6BzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentUIHeader.d.ts","sourceRoot":"","sources":["../../../src/components/composable/AgentUIHeader.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,kBAAkB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,aAAa,CAAE,EAAE,SAAS,EAAE,GAAE,kBAAuB,2CAIpE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ActionButton } from '../chat/ChatInput';
|
|
2
|
+
export interface AgentUIInputProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
customActions?: ActionButton[];
|
|
6
|
+
actionOrder?: 'before-submit' | 'after-submit';
|
|
7
|
+
}
|
|
8
|
+
export declare function AgentUIInput({ className, disabled, customActions, actionOrder, }?: AgentUIInputProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=AgentUIInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentUIInput.d.ts","sourceRoot":"","sources":["../../../src/components/composable/AgentUIInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,mBAAmB,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC;CAC/C;AAED,wBAAgB,YAAY,CAAE,EAC7B,SAAS,EACT,QAAQ,EACR,aAAa,EACb,WAAW,GACX,GAAE,iBAAsB,2CAoCxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentUIMessages.d.ts","sourceRoot":"","sources":["../../../src/components/composable/AgentUIMessages.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,oBAAoB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,eAAe,CAAE,EAAE,SAAS,EAAE,GAAE,oBAAyB,2CAcxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentUINotice.d.ts","sourceRoot":"","sources":["../../../src/components/composable/AgentUINotice.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,kBAAkB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,aAAa,CAAE,EAAE,SAAS,EAAE,GAAE,kBAAuB,kDAiBpE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface AgentUISuggestionsProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
showSuggestions?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function AgentUISuggestions({ className, showSuggestions, }?: AgentUISuggestionsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
//# sourceMappingURL=AgentUISuggestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentUISuggestions.d.ts","sourceRoot":"","sources":["../../../src/components/composable/AgentUISuggestions.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,uBAAuB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAE,EACnC,SAAS,EACT,eAAe,GACf,GAAE,uBAA4B,kDAgB9B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
interface ButtonProps extends React.ComponentProps<'button'> {
|
|
3
|
-
variant?: 'primary' | 'ghost' | 'outline' | 'link' | 'icon';
|
|
4
|
-
size?: 'sm' | '
|
|
3
|
+
variant?: 'primary' | 'ghost' | 'outline' | 'link' | 'icon' | 'transparent';
|
|
4
|
+
size?: 'icon' | 'sm' | 'lg';
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
6
|
asChild?: boolean;
|
|
7
7
|
pressed?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAE,QAAQ,CAAE;IAC7D,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAE,QAAQ,CAAE;IAC7D,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC;IAC5E,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,MAAM,oGA0CX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Suggestion } from '../../types';
|
|
2
3
|
import { type ActionButton } from '../chat/ChatInput';
|
|
3
4
|
interface CompactViewProps {
|
|
4
5
|
value: string;
|
|
@@ -15,7 +16,9 @@ interface CompactViewProps {
|
|
|
15
16
|
customActions?: ActionButton[];
|
|
16
17
|
actionOrder?: 'before-submit' | 'after-submit';
|
|
17
18
|
onStop?: () => void;
|
|
19
|
+
suggestions?: Suggestion[];
|
|
20
|
+
clearSuggestions?: () => void;
|
|
18
21
|
}
|
|
19
|
-
export declare function CompactView({ value, onChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onBlur, onExpand, showExpandButton, focusOnMount, customActions, actionOrder, onStop, }: CompactViewProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function CompactView({ value, onChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onBlur, onExpand, showExpandButton, focusOnMount, customActions, actionOrder, onStop, suggestions, clearSuggestions, }: CompactViewProps): import("react/jsx-runtime").JSX.Element;
|
|
20
23
|
export {};
|
|
21
24
|
//# sourceMappingURL=CompactView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactView.d.ts","sourceRoot":"","sources":["../../../src/components/views/CompactView.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CompactView.d.ts","sourceRoot":"","sources":["../../../src/components/views/CompactView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,mBAAmB,CAAC;AAQjE,UAAU,gBAAgB;IACzB,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,GAAG,MAAM,EAAE,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC;IAC/C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAE,EAC5B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,gBAAuB,EACvB,YAAoB,EACpB,aAAa,EACb,WAAW,EACX,MAAM,EACN,WAAW,EACX,gBAAgB,GAChB,EAAE,gBAAgB,2CAsFlB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentType } from 'react';
|
|
3
|
+
import type { ChatState, Message, NoticeConfig, Suggestion } from '../types';
|
|
4
|
+
export interface AgentUIContextValue {
|
|
5
|
+
messages: Message[];
|
|
6
|
+
isProcessing: boolean;
|
|
7
|
+
error?: string | null;
|
|
8
|
+
inputValue: string;
|
|
9
|
+
setInputValue: (value: string) => void;
|
|
10
|
+
clearInput: () => void;
|
|
11
|
+
textareaRef: React.RefObject<HTMLTextAreaElement>;
|
|
12
|
+
handleKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
13
|
+
onSubmit: (message: string) => void;
|
|
14
|
+
handleSubmit: () => void;
|
|
15
|
+
onStop?: () => void;
|
|
16
|
+
variant: 'floating' | 'embedded';
|
|
17
|
+
placeholder?: string | string[];
|
|
18
|
+
emptyView?: React.ReactNode;
|
|
19
|
+
messageRenderer?: ComponentType<{
|
|
20
|
+
children: string;
|
|
21
|
+
}>;
|
|
22
|
+
floatingChatState?: ChatState;
|
|
23
|
+
triggerIcon?: React.ReactNode;
|
|
24
|
+
onOpen?: () => void;
|
|
25
|
+
onExpand?: () => void;
|
|
26
|
+
onClose?: () => void;
|
|
27
|
+
suggestions?: Suggestion[];
|
|
28
|
+
clearSuggestions?: () => void;
|
|
29
|
+
handleSuggestionSubmit: (value: string) => void;
|
|
30
|
+
notice?: NoticeConfig;
|
|
31
|
+
focusOnMount?: boolean;
|
|
32
|
+
fromCompact?: boolean;
|
|
33
|
+
showExpandButton?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare function useAgentUIContext(): AgentUIContextValue;
|
|
36
|
+
export interface AgentUIProviderProps {
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
value: AgentUIContextValue;
|
|
39
|
+
}
|
|
40
|
+
export declare function AgentUIProvider({ children, value }: AgentUIProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
//# sourceMappingURL=AgentUIContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentUIContext.d.ts","sourceRoot":"","sources":["../../src/context/AgentUIContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACX,SAAS,EACT,OAAO,EACP,YAAY,EACZ,UAAU,EAEV,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,mBAAmB;IAEnC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,KAAK,CAAC,SAAS,CAAE,mBAAmB,CAAE,CAAC;IACpD,aAAa,EAAE,CAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,mBAAmB,CAAE,KAAM,IAAI,CAAC;IAGzE,QAAQ,EAAE,CAAE,OAAO,EAAE,MAAM,KAAM,IAAI,CAAC;IACtC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAGpB,OAAO,EAAE,UAAU,GAAG,UAAU,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,eAAe,CAAC,EAAE,aAAa,CAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAE,CAAC;IAGxD,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAGrB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,sBAAsB,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IAGlD,MAAM,CAAC,EAAE,YAAY,CAAC;IAGtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B;AAID,wBAAgB,iBAAiB,IAAI,mBAAmB,CAQvD;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,mBAAmB,CAAC;CAC3B;AAED,wBAAgB,eAAe,CAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,oBAAoB,2CAMzE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing multiple named timeouts with automatic cleanup
|
|
3
|
+
* Prevents memory leaks and race conditions in timeout management
|
|
4
|
+
*/
|
|
5
|
+
export declare function useMultiTimeout(): {
|
|
6
|
+
setNamedTimeout: (name: string, callback: () => void, delay: number) => NodeJS.Timeout;
|
|
7
|
+
clearNamedTimeout: (name: string) => void;
|
|
8
|
+
clearAllTimeouts: () => void;
|
|
9
|
+
hasTimeout: (name: string) => boolean;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useMultiTimeout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMultiTimeout.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultiTimeout.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,eAAe;4BAarB,MAAM,YAAY,MAAM,IAAI,SAAS,MAAM;8BATL,MAAM;;uBA8Bb,MAAM;EAe9C"}
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.agenttic{--color-background: oklch(.99 0 0);--color-foreground: oklch(.241 0 0);--color-primary: oklch(.53 .22 268.05);--color-primary-foreground: oklch(1 0 0);--color-ring: var(--color-primary);--color-destructive: oklch(.492 .2095 28.09);--color-muted: color-mix(in srgb, var(--color-foreground) 10%, var(--color-background));--color-muted-foreground: color-mix(in srgb, var(--color-background) 40%, var(--color-foreground));--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-weight-medium: 450;--font-weight-semibold: 500;--text-sm: .875rem;--text-sm--line-height: 1.65;--text-base: .9375rem;--text-base--line-height: 1.625;--text-base--tracking: -.01em;--spacing: .25rem;--spacing-1: var(--spacing);--spacing-1\.5: calc(var(--spacing) * 1.5);--spacing-2: calc(var(--spacing) * 2);--spacing-3: calc(var(--spacing) * 3);--spacing-4: calc(var(--spacing) * 4);--spacing-5: calc(var(--spacing) * 5);--spacing-6: calc(var(--spacing) * 6);--spacing-7: calc(var(--spacing) * 7);--spacing-8: calc(var(--spacing) * 8);--spacing-9: calc(var(--spacing) * 9);--spacing-10: calc(var(--spacing) * 10);--spacing-20: calc(var(--spacing) * 20);--radius: 1rem;--radius-xs: calc(var(--radius) - 10px);--radius-sm: calc(var(--radius) - 8px);--radius-md: calc(var(--radius) - 2px);--radius-lg: var(--radius);--radius-xl: calc(var(--radius) + 8px);--radius-full: 9999px;--shadow-sm: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 10%, transparent), 0 0 6px color-mix(in srgb, var(--color-foreground) 5%, transparent);--shadow-lg: 0 0 0 1px rgba(0, 0, 0, .075), 0 2px 24px rgba(0, 0, 0, .075);--shadow-outline: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 10%, transparent);--shadow-outline-strong: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 20%, transparent);--transition-colors: color .15s cubic-bezier(.4, 0, .2, 1), background-color .15s cubic-bezier(.4, 0, .2, 1), border-color .15s cubic-bezier(.4, 0, .2, 1), box-shadow .15s cubic-bezier(.4, 0, .2, 1), fill .15s cubic-bezier(.4, 0, .2, 1), stroke .15s cubic-bezier(.4, 0, .2, 1)}@layer base{.agenttic *,.agenttic :before,.agenttic :after,.agenttic ::backdrop,.agenttic ::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}.agenttic *{outline-color:var(--color-ring)}.agenttic button,.agenttic input,.agenttic select,.agenttic optgroup,.agenttic textarea,.agenttic ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;background-color:transparent;opacity:1}.agenttic input,.agenttic select,.agenttic optgroup,.agenttic textarea,.agenttic ::file-selector-button{color:inherit;border-radius:0}}.button-module_button{align-items:center;border-radius:var(--radius-sm);border:1px solid transparent;color:var(--color-foreground);cursor:pointer;display:inline-flex;flex-shrink:0;font-weight:var(--font-weight-semibold);font-size:var(--text-sm);gap:calc(var(--spacing) * .5);justify-content:center;outline:none;transition:var(--transition-colors);letter-spacing:var(--text-base--tracking);white-space:nowrap;height:var(--spacing-8);padding:var(--spacing-2) var(--spacing-3)}.button-module_button:disabled{pointer-events:none;background-color:var(--color-muted);color:var(--color-muted-foreground)}.button-module_button:focus-visible{outline:2px solid var(--color-ring);outline-offset:1.5px}.button-module_pressed{color:var(--color-foreground)}.button-module_pressed svg{color:var(--color-foreground)}.button-module_primary{background-color:var(--color-primary);color:var(--color-primary-foreground)}.button-module_primary:hover:not(:disabled){background-color:color-mix(in srgb,var(--color-primary) 85%,#000)}.button-module_ghost{background-color:transparent;color:var(--color-muted-foreground)}.button-module_ghost svg{color:var(--color-muted-foreground)}.button-module_ghost:hover:not(:disabled){background:transparent;color:var(--color-foreground)}.button-module_ghost:hover:not(:disabled) svg{color:var(--color-foreground)}.button-module_ghost:disabled{background:transparent;opacity:.66}.button-module_ghost:focus-visible{outline-offset:0}.button-module_ghost.button-module_pressed{color:var(--color-foreground)}.button-module_ghost.button-module_pressed svg{color:var(--color-foreground)}.button-module_outline{box-shadow:var(--shadow-outline);background-color:var(--color-background);height:calc(var(--spacing-8) - 1px)}.button-module_outline:hover:not(:disabled){color:var(--color-primary);box-shadow:var(--shadow-outline-strong)}.button-module_outline:focus-visible{outline-offset:0}.button-module_outline:disabled{background-color:var(--color-background)}.button-module_outline.button-module_pressed{color:var(--color-foreground)}.button-module_outline.button-module_pressed svg{color:var(--color-foreground)}.button-module_link{background-color:transparent;color:var(--color-primary);font-weight:var(--font-weight-semibold);padding-left:var(--spacing-2);padding-right:var(--spacing-2);width:auto}.button-module_link:hover:not(:disabled){color:color-mix(in srgb,var(--color-primary) 85%,#000)}.button-module_link.button-module_pressed{color:var(--color-primary)}.button-module_link.button-module_pressed svg{color:var(--color-primary)}.button-module_icon{border-radius:var(--radius-xs);height:var(--spacing-8);padding:0;width:var(--spacing-8)}.button-module_sm{border-radius:var(--radius-xs);gap:0;height:var(--spacing-6);padding:0;width:var(--spacing-6)}.button-module_sm svg{height:var(--spacing-6);width:var(--spacing-6)}.button-module_withTextAndIcon{padding-left:var(--spacing-1);width:inherit}.button-module_sm.button-module_withTextAndIcon{padding-left:0;padding-right:var(--spacing-1)}.button-module_button svg{flex-shrink:0;pointer-events:none}.CollapsedView-module_button{border-radius:var(--radius-lg);height:var(--spacing-10);width:var(--spacing-10)}.Textarea-module_textarea{display:flex;width:100%;border-radius:var(--radius-md);border:0;background-color:transparent;min-height:var(--spacing-10);padding:var(--spacing-2);scrollbar-width:none;resize:none}.Textarea-module_textarea::-moz-placeholder{color:var(--color-muted-foreground);font-weight:var(--font-weight-medium)}.Textarea-module_textarea::placeholder{color:var(--color-muted-foreground);font-weight:var(--font-weight-medium)}.Textarea-module_textarea:focus-visible{outline:none}.Textarea-module_textarea:disabled{cursor:not-allowed;opacity:.5}.ChatInput-module_container{display:flex;align-items:end;gap:var(--spacing)}.ChatInput-module_textareaContainer{position:relative;flex:1;width:100%}.ChatInput-module_actions{display:flex;flex-direction:row;padding-left:var(--spacing);padding-right:var(--spacing);height:var(--spacing-10);gap:var(--spacing);align-items:center}.ChatInput-module_button{border-radius:var(--radius-full)}.AnimatedPlaceholder-module_container{color:var(--color-muted-foreground);font-weight:var(--font-weight-medium);padding-left:var(--spacing-3);padding-right:var(--spacing-3);padding-top:var(--spacing-2);pointer-events:none;position:absolute;z-index:1}.ChatHeader-module_container{display:flex;align-items:center;justify-content:flex-end;gap:var(--spacing);cursor:grab}.ChatHeader-module_container:active{cursor:grabbing}.Notice-module_container{position:relative;display:flex;align-items:center;padding:var(--spacing);padding-left:var(--spacing-3);gap:var(--spacing-3);background-color:var(--color-muted);border-radius:var(--radius-sm);color:var(--color-foreground);font-size:var(--text-sm);font-weight:var(--font-weight-medium);line-height:var(--text-sm--line-height)}.Notice-module_containerWithIcon{padding-left:var(--spacing-3)}.Notice-module_content{align-items:center;display:flex;flex:1;gap:var(--spacing);min-width:0}.Notice-module_actions{align-items:center;display:flex;flex-shrink:0;gap:var(--spacing)}.Notice-module_icon{align-items:center;display:flex;flex-shrink:0;justify-content:center}.Notice-module_icon svg{display:block;height:var(--spacing-5);width:var(--spacing-5)}.Notice-module_dismissible{position:absolute;top:calc(var(--spacing) * -1.5);right:calc(var(--spacing) * -1.5);opacity:0;transform:scale(.9);border-radius:var(--radius-full);transition:all .15s ease}.Notice-module_dismissible:focus,.Notice-module_dismissible:focus-visible,.Notice-module_container:hover .Notice-module_dismissible{opacity:1;transform:scale(1)}.Notice-module_dismissible svg{display:block;width:var(--spacing-4);height:var(--spacing-4);background-color:var(--color-muted-foreground);color:var(--color-background);border-radius:inherit;box-shadow:0 0 0 2.5px var(--color-background);opacity:.8}.Notice-module_dismissible:hover svg{opacity:1}.Suggestions-module_container{position:absolute;top:0;left:0;right:0;display:flex;flex-wrap:nowrap;gap:var(--spacing-2);padding:var(--spacing-2) var(--spacing-1\.5);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.Suggestions-module_container::-webkit-scrollbar{display:none}.ChatFooter-module_container{background-color:var(--color-background);border-radius:calc(var(--radius-lg) + 1px);box-shadow:var(--shadow-sm);color:var(--color-foreground);display:flex;flex-direction:column;gap:var(--spacing-2);padding:var(--spacing-2);position:relative;z-index:10}.MessageActions-module_container{display:flex;align-items:center;margin-top:var(--spacing-2);gap:var(--spacing-1)}.MessageActions-module_container button[aria-hidden=true]{display:none}.Message-module_message{display:flex;align-items:flex-start;padding:0 var(--spacing-3);color:var(--color-foreground)}.Message-module_message.Message-module_user .Message-module_bubble{background-color:var(--color-muted);max-width:85%;padding:var(--spacing-3) var(--spacing-4);border-radius:var(--radius-xl);border-bottom-right-radius:var(--radius-sm)}.Message-module_message.Message-module_error{color:var(--color-destructive)}.Message-module_content{flex:1;text-align:start;word-break:break-word;white-space:normal}.Message-module_message.Message-module_user .Message-module_content{display:flex;justify-content:flex-end}.Message-module_message p{text-wrap-style:pretty;margin-bottom:var(--spacing-3)}.Message-module_message a{color:var(--color-primary)}.Message-module_message p:last-child{margin-bottom:0}.Message-module_message strong{font-weight:var(--font-weight-semibold)}.Message-module_message ol,.Message-module_message ul{margin-bottom:var(--spacing-3)}.Message-module_message p+:where(ol,ul){margin-top:0}.Message-module_message li{margin-bottom:var(--spacing-2)}.Message-module_message li::marker{font-size:var(--text-sm)}.Message-module_message table{width:100%;margin:12px 0;border-collapse:collapse}.Message-module_message th,.Message-module_message td{padding:8px 12px;border:1px solid #ddd;text-align:left}.Message-module_message th{background-color:var(--color-muted);font-weight:600}.Messages-module_container{display:flex;flex-direction:column;flex:1;padding-top:var(--spacing-2);padding-bottom:var(--spacing-20);gap:var(--spacing-8);overflow-y:auto;height:100%;position:relative;z-index:10}.animating .Messages-module_container::-webkit-scrollbar{display:none}.Messages-module_container [data-role=user]:has(+[data-role=user]),.Messages-module_container [data-role=agent]:has(+[data-role=agent]){margin-bottom:calc(-1 * var(--spacing-6))}.Messages-module_emptyState{display:flex;flex-direction:column;align-items:center;justify-content:center}.Thinking-module_container{display:flex;align-items:center;gap:var(--spacing);padding:0 var(--spacing-2);color:var(--color-muted-foreground);font-size:var(--text-sm)}.Thinking-module_icon{display:flex;align-items:center;justify-content:center}.Thinking-module_icon svg{width:var(--spacing-6);height:var(--spacing-6)}.Thinking-module_content{background:linear-gradient(90deg,color-mix(in srgb,currentColor 30%,transparent),currentColor,color-mix(in srgb,currentColor 30%,transparent));background-size:200% 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:Thinking-module_shimmer 2s infinite linear 0ms}@keyframes Thinking-module_shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.ConversationView-module_container{display:flex;flex-direction:column;height:100%;justify-content:flex-end}.ConversationView-module_container.ConversationView-module_withHeader{justify-content:space-between}.Chat-module_container{font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:400;font-family:var(--font-sans);letter-spacing:var(--text-base--tracking);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.Chat-module_container.Chat-module_embedded{height:100%}.Chat-module_container.Chat-module_floating{position:fixed;z-index:50}.Chat-module_container.Chat-module_floating .Chat-module_content{background-color:var(--color-background);color:var(--color-foreground);overflow:hidden;min-height:56px;padding:var(--spacing-2);box-shadow:var(--shadow-lg)}
|
|
1
|
+
.agenttic{--color-background: oklch(.99 0 0);--color-foreground: oklch(.241 0 0);--color-primary: oklch(.53 .22 268.05);--color-primary-foreground: oklch(1 0 0);--color-ring: var(--color-primary);--color-destructive: oklch(.492 .2095 28.09);--color-muted: color-mix(in srgb, var(--color-foreground) 10%, var(--color-background));--color-muted-foreground: color-mix(in srgb, var(--color-background) 40%, var(--color-foreground));--color-success: rgba(74, 184, 102, .04);--color-success-icon: #2C723E;--color-warning: rgba(240, 184, 73, .04);--color-warning-icon: #A77F30;--color-error: rgba(204, 24, 24, .04);--color-error-icon: #8C0B0B;--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-weight-medium: 450;--font-weight-semibold: 500;--text-sm: .875rem;--text-sm--line-height: 1.65;--text-base: .9375rem;--text-base--line-height: 1.625;--text-base--tracking: -.01em;--spacing: .25rem;--spacing-1: var(--spacing);--spacing-1\.5: calc(var(--spacing) * 1.5);--spacing-2: calc(var(--spacing) * 2);--spacing-3: calc(var(--spacing) * 3);--spacing-3\.5: calc(var(--spacing) * 3.5);--spacing-4: calc(var(--spacing) * 4);--spacing-5: calc(var(--spacing) * 5);--spacing-6: calc(var(--spacing) * 6);--spacing-7: calc(var(--spacing) * 7);--spacing-8: calc(var(--spacing) * 8);--spacing-9: calc(var(--spacing) * 9);--spacing-10: calc(var(--spacing) * 10);--spacing-20: calc(var(--spacing) * 20);--radius: 1rem;--radius-xs: calc(var(--radius) - 10px);--radius-sm: calc(var(--radius) - 8px);--radius-md: calc(var(--radius) - 2px);--radius-lg: var(--radius);--radius-xl: calc(var(--radius) + 8px);--radius-full: 9999px;--shadow-sm: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 10%, transparent), 0 0 6px color-mix(in srgb, var(--color-foreground) 5%, transparent);--shadow-lg: 0 0 0 1px rgba(0, 0, 0, .075), 0 2px 24px rgba(0, 0, 0, .075);--shadow-outline: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 10%, transparent);--shadow-outline-strong: 0 0 0 1px color-mix(in srgb, var(--color-foreground) 25%, transparent);--transition-colors: color .15s cubic-bezier(.4, 0, .2, 1), background-color .15s cubic-bezier(.4, 0, .2, 1), border-color .15s cubic-bezier(.4, 0, .2, 1), box-shadow .15s cubic-bezier(.4, 0, .2, 1), fill .15s cubic-bezier(.4, 0, .2, 1), stroke .15s cubic-bezier(.4, 0, .2, 1)}@layer base{.agenttic *,.agenttic :before,.agenttic :after,.agenttic ::backdrop,.agenttic ::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}.agenttic *{outline-color:var(--color-ring)}.agenttic button,.agenttic input,.agenttic select,.agenttic optgroup,.agenttic textarea,.agenttic ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;background-color:transparent;opacity:1}.agenttic input,.agenttic select,.agenttic optgroup,.agenttic textarea,.agenttic ::file-selector-button{color:inherit;border-radius:0}}.button-module_button{align-items:center;border-radius:var(--radius-sm);border:1px solid transparent;color:var(--color-foreground);cursor:pointer;display:inline-flex;flex-shrink:0;font-weight:var(--font-weight-medium);font-size:var(--text-sm);gap:calc(var(--spacing) * .5);justify-content:center;outline:none;transition:var(--transition-colors);letter-spacing:var(--text-base--tracking);white-space:nowrap;height:var(--spacing-8);padding:var(--spacing-2) var(--spacing-3)}.button-module_button:disabled{pointer-events:none;background-color:var(--color-muted);color:var(--color-muted-foreground)}.button-module_button:focus-visible{outline:2px solid var(--color-ring);outline-offset:1.5px}.button-module_pressed{color:var(--color-foreground)}.button-module_pressed svg{color:var(--color-foreground)}.button-module_primary{background-color:var(--color-primary);color:var(--color-primary-foreground)}.button-module_primary:hover:not(:disabled){background-color:color-mix(in srgb,var(--color-primary) 85%,#000)}.button-module_ghost{background-color:transparent;color:var(--color-muted-foreground)}.button-module_ghost svg{color:var(--color-muted-foreground)}.button-module_ghost:hover:not(:disabled){background:transparent;color:var(--color-foreground)}.button-module_ghost:hover:not(:disabled) svg{color:var(--color-foreground)}.button-module_ghost:disabled{background:transparent;opacity:.66}.button-module_ghost:focus-visible{outline-offset:0}.button-module_ghost.button-module_pressed{color:var(--color-foreground)}.button-module_ghost.button-module_pressed svg{color:var(--color-foreground)}.button-module_outline{box-shadow:var(--shadow-outline);background-color:var(--color-background)}.button-module_outline:hover:not(:disabled){box-shadow:var(--shadow-outline-strong)}.button-module_outline:focus-visible{outline-offset:0}.button-module_outline:disabled{background-color:var(--color-background)}.button-module_outline.button-module_pressed{color:var(--color-foreground)}.button-module_outline.button-module_pressed svg{color:var(--color-foreground)}.button-module_transparent{background-color:color-mix(in srgb,var(--color-background) 95%,transparent);color:var(--color-foreground);box-shadow:var(--shadow-lg)}.button-module_transparent:hover:not(:disabled){background-color:var(--color-background);box-shadow:var(--shadow-lg)}.button-module_link{background-color:transparent;color:var(--color-primary);font-weight:var(--font-weight-semibold);padding-left:var(--spacing-2);padding-right:var(--spacing-2);width:auto}.button-module_link:hover:not(:disabled){color:color-mix(in srgb,var(--color-primary) 85%,#000)}.button-module_link.button-module_pressed{color:var(--color-primary)}.button-module_link.button-module_pressed svg{color:var(--color-primary)}.button-module_icon{border-radius:var(--radius-xs);height:var(--spacing-8);padding:0;width:var(--spacing-8)}.button-module_sm{border-radius:var(--radius-xs);gap:0;height:var(--spacing-6);padding:0;width:var(--spacing-6)}.button-module_sm svg{height:var(--spacing-6);width:var(--spacing-6)}.button-module_lg{height:var(--spacing-10);border-radius:var(--radius-md);font-size:var(--text-base);padding-left:var(--spacing-3\.5);padding-right:var(--spacing-3\.5)}.button-module_withTextAndIcon{padding-left:var(--spacing-1);width:inherit}.button-module_sm.button-module_withTextAndIcon{padding-left:0;padding-right:var(--spacing-1)}.button-module_button svg{flex-shrink:0;pointer-events:none}.CollapsedView-module_button{border-radius:var(--radius-lg);height:var(--spacing-10);width:var(--spacing-10)}.Textarea-module_textarea{display:flex;width:100%;border-radius:var(--radius-md);border:0;background-color:transparent;min-height:var(--spacing-10);padding:var(--spacing-2);scrollbar-width:none;resize:none}.Textarea-module_textarea::-moz-placeholder{color:var(--color-muted-foreground);font-weight:var(--font-weight-medium)}.Textarea-module_textarea::placeholder{color:var(--color-muted-foreground);font-weight:var(--font-weight-medium)}.Textarea-module_textarea:focus-visible{outline:none}.Textarea-module_textarea:disabled{cursor:not-allowed;opacity:.5}.ChatInput-module_container{display:flex;align-items:end;gap:var(--spacing)}.ChatInput-module_textareaContainer{position:relative;flex:1;width:100%}.ChatInput-module_actions{display:flex;flex-direction:row;padding-left:var(--spacing);padding-right:var(--spacing);height:var(--spacing-10);gap:var(--spacing);align-items:center}.ChatInput-module_button{border-radius:var(--radius-full)}.AnimatedPlaceholder-module_container{color:var(--color-muted-foreground);font-weight:var(--font-weight-medium);padding-left:var(--spacing-2);padding-right:var(--spacing-2);padding-top:var(--spacing-2);pointer-events:none;position:absolute;z-index:1}.Suggestions-module_container{position:absolute;top:0;left:0;right:0;display:flex;flex-wrap:nowrap;gap:var(--spacing-2);padding:var(--spacing-2) var(--spacing-1\.5);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.Suggestions-module_container::-webkit-scrollbar{display:none}.Suggestions-module_vertical{flex-direction:column;gap:var(--spacing-1);overflow:visible;padding:1px;padding-bottom:var(--spacing-1);z-index:-1}.ChatHeader-module_container{display:flex;align-items:center;justify-content:flex-end;gap:var(--spacing);cursor:grab}.ChatHeader-module_container:active{cursor:grabbing}.Notice-module_container{position:relative;display:flex;align-items:center;padding:var(--spacing);padding-left:var(--spacing-3);gap:var(--spacing-3);background-color:var(--color-muted);border-radius:var(--radius-sm);color:var(--color-foreground);font-size:var(--text-sm);font-weight:var(--font-weight-medium);line-height:var(--text-sm--line-height)}.Notice-module_containerWithIcon{padding-left:var(--spacing-3)}.Notice-module_is-success{border:1px solid rgba(0,0,0,.1);background-color:var(--color-success)}.Notice-module_is-success svg path{fill:var(--color-success-icon)}.Notice-module_is-warning{border:1px solid rgba(0,0,0,.1);background-color:var(--color-warning)}.Notice-module_is-warning svg path{fill:var(--color-warning-icon)}.Notice-module_is-error{border:1px solid rgba(0,0,0,.1);background-color:var(--color-error)}.Notice-module_is-error svg path{fill:var(--color-error-icon)}.Notice-module_content{align-items:center;display:flex;flex:1;gap:var(--spacing);min-width:0}.Notice-module_actions{align-items:center;display:flex;flex-shrink:0;gap:var(--spacing)}.Notice-module_icon{align-items:center;display:flex;flex-shrink:0;justify-content:center}.Notice-module_icon svg{display:block;height:var(--spacing-5);width:var(--spacing-5)}.Notice-module_dismissible{position:absolute;top:calc(var(--spacing) * -1.5);right:calc(var(--spacing) * -1.5);opacity:0;transform:scale(.9);border-radius:var(--radius-full);transition:all .15s ease}.Notice-module_dismissible:focus,.Notice-module_dismissible:focus-visible,.Notice-module_container:hover .Notice-module_dismissible{opacity:1;transform:scale(1)}.Notice-module_dismissible svg{display:block;width:var(--spacing-4);height:var(--spacing-4);background-color:var(--color-muted-foreground);color:var(--color-background);border-radius:inherit;box-shadow:0 0 0 2.5px var(--color-background);opacity:.8}.Notice-module_dismissible:hover svg{opacity:1}.ChatFooter-module_container{background-color:var(--color-background);border-radius:calc(var(--radius-lg) + 1px);box-shadow:var(--shadow-sm);color:var(--color-foreground);display:flex;flex-direction:column;gap:var(--spacing-2);padding:var(--spacing-2);position:relative;z-index:10}.MessageActions-module_container{display:flex;align-items:center;margin-top:var(--spacing-2);gap:var(--spacing-1)}.MessageActions-module_container button[aria-hidden=true]{display:none}.Message-module_message{display:flex;align-items:flex-start;padding:0 var(--spacing-3);color:var(--color-foreground)}.Message-module_message.Message-module_user .Message-module_bubble{background-color:var(--color-muted);max-width:85%;padding:var(--spacing-3) var(--spacing-4);border-radius:var(--radius-xl);border-bottom-right-radius:var(--radius-sm)}.Message-module_message.Message-module_error{color:var(--color-destructive)}.Message-module_content{flex:1;text-align:start;word-break:break-word;white-space:normal}.Message-module_message.Message-module_user .Message-module_content{display:flex;justify-content:flex-end}.Message-module_message p{text-wrap-style:pretty;margin-bottom:var(--spacing-3)}.Message-module_message a{color:var(--color-primary)}.Message-module_message p:last-child{margin-bottom:0}.Message-module_message strong{font-weight:var(--font-weight-semibold)}.Message-module_message ol,.Message-module_message ul{margin-bottom:var(--spacing-3);padding-left:var(--spacing-6)}.Message-module_message p+:where(ol,ul){margin-top:0}.Message-module_message li{margin-bottom:var(--spacing-2)}.Message-module_message li::marker{font-size:var(--text-sm)}.Message-module_message table{width:100%;margin:12px 0;border-collapse:collapse}.Message-module_message th,.Message-module_message td{padding:8px 12px;border:1px solid #ddd;text-align:left}.Message-module_message th{background-color:var(--color-muted);font-weight:600}.Messages-module_container{display:flex;flex-direction:column;flex:1;padding-top:var(--spacing-2);padding-bottom:var(--spacing-20);gap:var(--spacing-8);overflow-y:auto;height:100%;position:relative;z-index:10}.animating .Messages-module_container::-webkit-scrollbar{display:none}.Messages-module_container [data-role=user]:has(+[data-role=user]),.Messages-module_container [data-role=agent]:has(+[data-role=agent]){margin-bottom:calc(-1 * var(--spacing-6))}.Messages-module_emptyState{display:flex;flex-direction:column;align-items:center;justify-content:center}.Thinking-module_container{display:flex;align-items:center;gap:var(--spacing);padding:0 var(--spacing-2);color:var(--color-muted-foreground);font-size:var(--text-sm)}.Thinking-module_icon{display:flex;align-items:center;justify-content:center}.Thinking-module_icon svg{width:var(--spacing-6);height:var(--spacing-6)}.Thinking-module_content{background:linear-gradient(90deg,color-mix(in srgb,currentColor 30%,transparent),currentColor,color-mix(in srgb,currentColor 30%,transparent));background-size:200% 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:Thinking-module_shimmer 2s infinite linear 0ms}@keyframes Thinking-module_shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.ConversationView-module_container{display:flex;flex-direction:column;height:100%;justify-content:flex-end}.ConversationView-module_container.ConversationView-module_withHeader{justify-content:space-between}.Chat-module_container{font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:400;font-family:var(--font-sans);letter-spacing:var(--text-base--tracking);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.Chat-module_container.Chat-module_embedded{height:100%}.Chat-module_container.Chat-module_floating{position:fixed;z-index:50}.Chat-module_container.Chat-module_floating .Chat-module_content{background-color:var(--color-background);color:var(--color-foreground);overflow:hidden;min-height:56px;padding:var(--spacing-2);box-shadow:var(--shadow-lg)}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import './styles/global.css';
|
|
2
|
-
export { AgentUI } from './components/AgentUI';
|
|
2
|
+
export { AgentUI, default } from './components/AgentUI';
|
|
3
|
+
export { AgentUIContainer } from './components/AgentUIContainer';
|
|
4
|
+
export { AgentUIHeader } from './components/composable/AgentUIHeader';
|
|
5
|
+
export { AgentUIMessages } from './components/composable/AgentUIMessages';
|
|
6
|
+
export { AgentUIInput } from './components/composable/AgentUIInput';
|
|
7
|
+
export { AgentUISuggestions } from './components/composable/AgentUISuggestions';
|
|
8
|
+
export { AgentUINotice } from './components/composable/AgentUINotice';
|
|
9
|
+
export { AgentUIFooter } from './components/composable/AgentUIFooter';
|
|
10
|
+
export { AgentUIConversationView } from './components/composable/AgentUIConversationView';
|
|
11
|
+
export { AgentUIProvider } from './context/AgentUIContext';
|
|
12
|
+
export { useAgentUIContext } from './context/AgentUIContext';
|
|
13
|
+
export type { AgentUIContextValue } from './context/AgentUIContext';
|
|
3
14
|
export { Chat } from './components/chat/Chat';
|
|
4
15
|
export { ChatFooter } from './components/chat/ChatFooter';
|
|
5
16
|
export { ChatInput } from './components/chat/ChatInput';
|
|
@@ -10,6 +21,13 @@ export { Notice } from './components/chat/Notice';
|
|
|
10
21
|
export { Message } from './components/chat/Message';
|
|
11
22
|
export { Suggestions } from './components/chat/Suggestions';
|
|
12
23
|
export { AnimatedPlaceholder } from './components/chat/AnimatedPlaceholder';
|
|
24
|
+
export { ChatHeader } from './components/chat/ChatHeader';
|
|
25
|
+
export { CollapsedView } from './components/views/CollapsedView';
|
|
26
|
+
export { CompactView } from './components/views/CompactView';
|
|
27
|
+
export { ConversationView } from './components/views/ConversationView';
|
|
28
|
+
export { useChat } from './hooks/useChat';
|
|
29
|
+
export { useInput } from './hooks/useInput';
|
|
30
|
+
export { cn } from './utils/classNames';
|
|
13
31
|
export * as animations from './components/animations';
|
|
14
32
|
export { ThumbsUpIcon } from './components/icons/ThumbsUpIcon';
|
|
15
33
|
export { ThumbsDownIcon } from './components/icons/ThumbsDownIcon';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,CAAC;AAG7B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,CAAC;AAG7B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAG1F,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAGvE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE,mBAAmB,SAAS,CAAC"}
|