@automattic/agenttic-ui 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +37 -0
  2. package/dist/components/AgentUI.d.ts +1 -0
  3. package/dist/components/AgentUI.d.ts.map +1 -1
  4. package/dist/components/animations/index.d.ts +0 -1
  5. package/dist/components/animations/index.d.ts.map +1 -1
  6. package/dist/components/chat/AnimatedPlaceholder.d.ts +8 -0
  7. package/dist/components/chat/AnimatedPlaceholder.d.ts.map +1 -0
  8. package/dist/components/chat/Chat.d.ts +1 -1
  9. package/dist/components/chat/Chat.d.ts.map +1 -1
  10. package/dist/components/chat/ChatFooter.d.ts +4 -2
  11. package/dist/components/chat/ChatFooter.d.ts.map +1 -1
  12. package/dist/components/chat/ChatFooter.stories.d.ts +73 -0
  13. package/dist/components/chat/ChatFooter.stories.d.ts.map +1 -0
  14. package/dist/components/chat/ChatHeader.d.ts.map +1 -1
  15. package/dist/components/chat/ChatInput.d.ts +4 -2
  16. package/dist/components/chat/ChatInput.d.ts.map +1 -1
  17. package/dist/components/chat/ChatInput.stories.d.ts +2 -0
  18. package/dist/components/chat/ChatInput.stories.d.ts.map +1 -1
  19. package/dist/components/chat/MessageActions.d.ts.map +1 -1
  20. package/dist/components/chat/Messages.d.ts +1 -2
  21. package/dist/components/chat/Messages.d.ts.map +1 -1
  22. package/dist/components/chat/Messages.stories.d.ts +2 -2
  23. package/dist/components/icons/ZoomIcon.d.ts +3 -0
  24. package/dist/components/icons/ZoomIcon.d.ts.map +1 -0
  25. package/dist/components/icons/ZoomIconFilled.d.ts +3 -0
  26. package/dist/components/icons/ZoomIconFilled.d.ts.map +1 -0
  27. package/dist/components/ui/button.d.ts +1 -0
  28. package/dist/components/ui/button.d.ts.map +1 -1
  29. package/dist/components/ui/button.stories.d.ts +15 -4
  30. package/dist/components/ui/button.stories.d.ts.map +1 -1
  31. package/dist/components/views/CompactView.d.ts +3 -2
  32. package/dist/components/views/CompactView.d.ts.map +1 -1
  33. package/dist/components/views/ConversationView.d.ts +3 -2
  34. package/dist/components/views/ConversationView.d.ts.map +1 -1
  35. package/dist/index.css +1 -1
  36. package/dist/index.d.ts +4 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +1382 -1252
  39. package/dist/types/index.d.ts +5 -2
  40. package/dist/types/index.d.ts.map +1 -1
  41. package/package.json +4 -5
package/README.md CHANGED
@@ -14,6 +14,7 @@ npm install @automattic/agenttic-ui
14
14
  - Floating and embedded chat variants
15
15
  - Smooth animations and drag-and-drop positioning
16
16
  - Message actions and markdown rendering
17
+ - Request cancellation UI with stop button functionality
17
18
  - TypeScript support with comprehensive types
18
19
  - Storybook component documentation
19
20
  - Modular component architecture for custom layouts
@@ -32,6 +33,7 @@ function ChatApplication() {
32
33
  isProcessing,
33
34
  error,
34
35
  onSubmit,
36
+ abortCurrentRequest,
35
37
  suggestions,
36
38
  clearSuggestions,
37
39
  messageRenderer
@@ -46,6 +48,7 @@ function ChatApplication() {
46
48
  isProcessing={isProcessing}
47
49
  error={error}
48
50
  onSubmit={onSubmit}
51
+ onStop={abortCurrentRequest}
49
52
  suggestions={suggestions}
50
53
  clearSuggestions={clearSuggestions}
51
54
  messageRenderer={messageRenderer}
@@ -82,6 +85,7 @@ interface AgentUIProps {
82
85
  isProcessing: boolean;
83
86
  error?: string | null;
84
87
  onSubmit: (message: string) => void;
88
+ onStop?: () => void; // Optional callback to stop current request
85
89
 
86
90
  // UI configuration
87
91
  variant?: 'floating' | 'embedded';
@@ -201,6 +205,7 @@ Text input with auto-resize and submit handling.
201
205
  onChange={setValue}
202
206
  onSubmit={handleSubmit}
203
207
  onKeyDown={handleKeyDown}
208
+ onStop={handleStop} // Optional callback to stop current request
204
209
  placeholder="Type a message..."
205
210
  isProcessing={false}
206
211
  textareaRef={textareaRef}
@@ -373,6 +378,38 @@ This approach allows granular theming of specific areas without affecting other
373
378
 
374
379
  ## Advanced Usage
375
380
 
381
+ ### Request Cancellation UI
382
+
383
+ The UI automatically displays a stop button when `isProcessing` is true and an `onStop` callback is provided. The submit button transforms into a stop button during processing:
384
+
385
+ ```tsx
386
+ const {
387
+ abortCurrentRequest,
388
+ isProcessing
389
+ } = useAgentChat(config);
390
+
391
+ <AgentUI
392
+ isProcessing={isProcessing}
393
+ onStop={abortCurrentRequest}
394
+ // When processing, the submit button becomes a stop button
395
+ // ... other props
396
+ />
397
+ ```
398
+
399
+ For custom implementations:
400
+
401
+ ```tsx
402
+ <ChatInput
403
+ isProcessing={isProcessing}
404
+ onStop={() => {
405
+ console.log('User requested to stop');
406
+ abortCurrentRequest();
407
+ }}
408
+ // The button automatically shows stop icon during processing
409
+ // ... other props
410
+ />
411
+ ```
412
+
376
413
  ### Custom Message Renderer
377
414
 
378
415
  Provide a custom markdown renderer:
@@ -49,6 +49,7 @@ import type { AgentUIProps } from '../types';
49
49
  * @param props.onOpen
50
50
  * @param props.onExpand
51
51
  * @param props.onClose
52
+ * @param props.onStop
52
53
  * @param props.emptyView
53
54
  * @param props.messages
54
55
  * @param props.isProcessing
@@ -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;AAI7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAE,YAAY,CAwC3C,CAAC;AAEF,eAAe,OAAO,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;AAI7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAE,YAAY,CA0C3C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import type { Transition, Variants } from 'framer-motion';
2
2
  export declare const springConfig: Transition;
3
- export declare const layoutTransition: Transition;
4
3
  export declare const fastSpring: Transition;
5
4
  export declare const fastSpringWithDelay: Transition;
6
5
  export declare const morphSpring: Transition;
@@ -1 +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"}
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,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,8 @@
1
+ interface AnimatedPlaceholderProps {
2
+ texts: string[];
3
+ interval?: number;
4
+ className?: string;
5
+ }
6
+ export declare function AnimatedPlaceholder({ texts, interval, className, }: AnimatedPlaceholderProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=AnimatedPlaceholder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimatedPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/chat/AnimatedPlaceholder.tsx"],"names":[],"mappings":"AAKA,UAAU,wBAAwB;IACjC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,mBAAmB,CAAE,EACpC,KAAK,EACL,QAAe,EACf,SAAc,GACd,EAAE,wBAAwB,2CA+B1B"}
@@ -1,3 +1,3 @@
1
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;
2
+ export declare function Chat({ messages, isProcessing, error, onSubmit, variant, triggerIcon, placeholder, notice, onOpen, onExpand, onClose, onStop, emptyView, floatingChatState, suggestions, clearSuggestions, messageRenderer, className, }: ChatProps): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=Chat.d.ts.map
@@ -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,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,SAAS,GACT,EAAE,SAAS,2CAkbX"}
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,2CA4bX"}
@@ -7,10 +7,12 @@ interface ChatFooterProps {
7
7
  onSubmit: () => void;
8
8
  onKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
9
9
  textareaRef: React.RefObject<HTMLTextAreaElement>;
10
- placeholder?: string;
10
+ placeholder?: string | string[];
11
11
  isProcessing: boolean;
12
+ onStop?: () => void;
12
13
  fromCompact?: boolean;
13
14
  onExpand?: () => void;
15
+ disabled?: boolean;
14
16
  notice?: NoticeConfig;
15
17
  suggestions?: Suggestion[];
16
18
  clearSuggestions?: () => void;
@@ -18,6 +20,6 @@ interface ChatFooterProps {
18
20
  customActions?: ActionButton[];
19
21
  actionOrder?: 'before-submit' | 'after-submit';
20
22
  }
21
- export declare function ChatFooter({ inputValue, onInputChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, fromCompact, onExpand, notice, suggestions, clearSuggestions, focusOnMount, customActions, actionOrder, }: ChatFooterProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function ChatFooter({ inputValue, onInputChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onStop, fromCompact, onExpand, disabled, notice, suggestions, clearSuggestions, focusOnMount, customActions, actionOrder, }: ChatFooterProps): import("react/jsx-runtime").JSX.Element;
22
24
  export {};
23
25
  //# sourceMappingURL=ChatFooter.d.ts.map
@@ -1 +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;AAC5D,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,aAAa,CAAC;AAK3D,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;IAGvB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC;CAC/C;AAED,wBAAgB,UAAU,CAAE,EAC3B,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EAC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AAE,EAC3B,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,MAAM,EACN,WAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,WAAW,GACX,EAAE,eAAe,2CAkDjB"}
@@ -0,0 +1,73 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { ChatFooter } from './ChatFooter';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof ChatFooter;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ argTypes: {
11
+ inputValue: {
12
+ control: "text";
13
+ description: string;
14
+ };
15
+ placeholder: {
16
+ control: "text";
17
+ description: string;
18
+ };
19
+ isProcessing: {
20
+ control: "boolean";
21
+ description: string;
22
+ };
23
+ disabled: {
24
+ control: "boolean";
25
+ description: string;
26
+ };
27
+ fromCompact: {
28
+ control: "boolean";
29
+ description: string;
30
+ };
31
+ focusOnMount: {
32
+ control: "boolean";
33
+ description: string;
34
+ };
35
+ actionOrder: {
36
+ description: string;
37
+ };
38
+ onInputChange: {
39
+ action: string;
40
+ description: string;
41
+ };
42
+ onSubmit: {
43
+ action: string;
44
+ description: string;
45
+ };
46
+ onKeyDown: {
47
+ action: string;
48
+ description: string;
49
+ };
50
+ onStop: {
51
+ action: string;
52
+ description: string;
53
+ };
54
+ onExpand: {
55
+ action: string;
56
+ description: string;
57
+ };
58
+ clearSuggestions: {
59
+ action: string;
60
+ description: string;
61
+ };
62
+ };
63
+ };
64
+ export default meta;
65
+ type Story = StoryObj<typeof meta>;
66
+ export declare const Default: Story;
67
+ export declare const WithSuggestions: Story;
68
+ export declare const Processing: Story;
69
+ export declare const DisabledSubmit: Story;
70
+ export declare const FromCompact: Story;
71
+ export declare const WithNotice: Story;
72
+ export declare const DisabledWithValidation: Story;
73
+ //# sourceMappingURL=ChatFooter.stories.d.ts.map
@@ -0,0 +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;AAI1C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgE2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AA0DrC,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;AAiEF,eAAO,MAAM,sBAAsB,EAAE,KAiBpC,CAAC"}
@@ -1 +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"}
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;CACrB;AAED,wBAAgB,UAAU,CAAE,EAAE,OAAO,EAAE,EAAE,eAAe,2CAoBvD"}
@@ -14,7 +14,7 @@ interface ChatInputProps {
14
14
  onSubmit: () => void;
15
15
  onKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
16
16
  textareaRef: React.RefObject<HTMLTextAreaElement>;
17
- placeholder?: string;
17
+ placeholder?: string | string[];
18
18
  isProcessing: boolean;
19
19
  onBlur?: () => void;
20
20
  fromCompact?: boolean;
@@ -23,7 +23,9 @@ interface ChatInputProps {
23
23
  focusOnMount?: boolean;
24
24
  customActions?: ActionButton[];
25
25
  actionOrder?: 'before-submit' | 'after-submit';
26
+ onStop?: () => void;
27
+ disabled?: boolean;
26
28
  }
27
- export declare function ChatInput({ value, onChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onBlur, fromCompact, onExpand, showExpandButton, focusOnMount, customActions, actionOrder, }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
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;
28
30
  export type { ActionButton };
29
31
  //# 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;AAYxD,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,I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ACrB,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;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,GAChB,EAAE,cAAc,2CAsIhB;AAED,YAAY,EAAE,YAAY,EAAE,CAAC"}
@@ -15,4 +15,6 @@ export declare const Processing: Story;
15
15
  export declare const WithExpandButton: Story;
16
16
  export declare const WithCustomActions: Story;
17
17
  export declare const WithCustomActionsAfterSubmit: Story;
18
+ export declare const DisabledSubmit: Story;
19
+ export declare const DisabledWithValidation: Story;
18
20
  //# sourceMappingURL=ChatInput.stories.d.ts.map
@@ -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,EAAqB,SAAS,EAAE,MAAM,aAAa,CAAC;AAQ3D,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;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAe9B,CAAC;AAwCF,eAAO,MAAM,iBAAiB,EAAE,KAiB/B,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,KAiB1C,CAAC"}
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,EAAqB,SAAS,EAAE,MAAM,aAAa,CAAC;AAQ3D,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;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"}
@@ -1 +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"}
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,kDAkC/D"}
@@ -5,11 +5,10 @@ interface MessagesProps {
5
5
  isProcessing?: boolean;
6
6
  error?: string | null;
7
7
  emptyView?: React.ReactNode;
8
- fromCompact?: boolean;
9
8
  messageRenderer?: ComponentType<{
10
9
  children: string;
11
10
  }>;
12
11
  }
13
- export declare function Messages({ messages, isProcessing, error, emptyView, fromCompact, messageRenderer, }: MessagesProps): import("react/jsx-runtime").JSX.Element | null;
12
+ export declare function Messages({ messages, isProcessing, error, emptyView, messageRenderer, }: MessagesProps): import("react/jsx-runtime").JSX.Element | null;
14
13
  export {};
15
14
  //# 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,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"}
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;CACxD;AAED,wBAAgB,QAAQ,CAAE,EACzB,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,SAAS,EACT,eAAe,GACf,EAAE,aAAa,kDA2Hf"}
@@ -24,8 +24,8 @@ declare const meta: {
24
24
  control: "object";
25
25
  description: string;
26
26
  };
27
- fromCompact: {
28
- control: "boolean";
27
+ messageRenderer: {
28
+ control: "object";
29
29
  description: string;
30
30
  };
31
31
  };
@@ -0,0 +1,3 @@
1
+ import type { BaseIconProps } from './types';
2
+ export declare function ZoomIcon({ className, size }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=ZoomIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZoomIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/ZoomIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,QAAQ,CAAE,EAAE,SAAS,EAAE,IAAS,EAAE,EAAE,aAAa,2CAkBhE"}
@@ -0,0 +1,3 @@
1
+ import type { BaseIconProps } from './types';
2
+ export declare function ZoomIconFilled({ className, size }: BaseIconProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=ZoomIconFilled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZoomIconFilled.d.ts","sourceRoot":"","sources":["../../../src/components/icons/ZoomIconFilled.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,cAAc,CAAE,EAAE,SAAS,EAAE,IAAS,EAAE,EAAE,aAAa,2CAsBtE"}
@@ -4,6 +4,7 @@ interface ButtonProps extends React.ComponentProps<'button'> {
4
4
  size?: 'sm' | 'icon';
5
5
  icon?: React.ReactNode;
6
6
  asChild?: boolean;
7
+ pressed?: boolean;
7
8
  }
8
9
  declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
10
  export { Button };
@@ -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;IAC5D,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,MAAM,oGAuCX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,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,CAAC;IAC5D,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACrB,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"}
@@ -5,13 +5,24 @@ export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
7
  export declare const Primary: Story;
8
+ export declare const PrimaryPressed: Story;
9
+ export declare const PrimaryDisabled: Story;
10
+ export declare const PrimaryWithIcon: Story;
11
+ export declare const PrimaryIconOnly: Story;
8
12
  export declare const Ghost: Story;
13
+ export declare const GhostPressed: Story;
14
+ export declare const GhostDisabled: Story;
15
+ export declare const GhostWithIcon: Story;
16
+ export declare const GhostIconOnly: Story;
9
17
  export declare const Outline: Story;
18
+ export declare const OutlinePressed: Story;
19
+ export declare const OutlineDisabled: Story;
20
+ export declare const OutlineWithIcon: Story;
21
+ export declare const OutlineIconOnly: Story;
10
22
  export declare const Link: Story;
11
- export declare const WithIcon: Story;
12
- export declare const IconOnly: Story;
13
- export declare const Disabled: Story;
14
- export declare const AllVariants: Story;
23
+ export declare const LinkPressed: Story;
24
+ export declare const LinkDisabled: Story;
25
+ export declare const AllVariantsMatrix: Story;
15
26
  export declare const IconVariations: Story;
16
27
  export declare const Interactive: Story;
17
28
  //# sourceMappingURL=button.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,MAAM,CAqBE,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,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAKlB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAkCzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAgF5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAkBzB,CAAC"}
1
+ {"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAG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efObject<HTMLTextAreaElement>;
9
- placeholder?: string;
9
+ placeholder?: string | string[];
10
10
  isProcessing: boolean;
11
11
  onBlur?: () => void;
12
12
  onExpand?: () => void;
@@ -14,7 +14,8 @@ interface CompactViewProps {
14
14
  focusOnMount?: boolean;
15
15
  customActions?: ActionButton[];
16
16
  actionOrder?: 'before-submit' | 'after-submit';
17
+ onStop?: () => void;
17
18
  }
18
- export declare function CompactView({ value, onChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onBlur, onExpand, showExpandButton, focusOnMount, customActions, actionOrder, }: CompactViewProps): import("react/jsx-runtime").JSX.Element;
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;
19
20
  export {};
20
21
  //# 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,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,mBAAmB,CAAC;AAEjE,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,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,gBAAgB,CAA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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,GACN,EAAE,gBAAgB,2CAmBlB"}
@@ -7,8 +7,9 @@ interface InputHandlers {
7
7
  onSubmit: () => void;
8
8
  onKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
9
9
  textareaRef: React.RefObject<HTMLTextAreaElement>;
10
- placeholder?: string;
10
+ placeholder?: string | string[];
11
11
  isProcessing: boolean;
12
+ onStop?: () => void;
12
13
  }
13
14
  interface ConversationViewProps extends InputHandlers {
14
15
  messages: Message[];
@@ -26,6 +27,6 @@ interface ConversationViewProps extends InputHandlers {
26
27
  }>;
27
28
  focusOnMount?: boolean;
28
29
  }
29
- export declare function ConversationView({ messages, error, inputValue, onInputChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, fromCompact, showHeader, onClose, onExpand, notice, emptyView, suggestions, clearSuggestions, messageRenderer, focusOnMount, }: ConversationViewProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function ConversationView({ messages, error, inputValue, onInputChange, onSubmit, onKeyDown, textareaRef, placeholder, isProcessing, onStop, fromCompact, showHeader, onClose, onExpand, notice, emptyView, suggestions, clearSuggestions, messageRenderer, focusOnMount, }: ConversationViewProps): import("react/jsx-runtime").JSX.Element;
30
31
  export {};
31
32
  //# sourceMappingURL=ConversationView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationView.d.ts","sourceRoot":"","sources":["../../../src/components/views/ConversationView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAA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AAE,CAAE,CAAC;IAGxD,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAAE,EACjC,QAAQ,EACR,KAAK,EACL,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,MAAM,EACN,WAAmB,EACnB,UAAkB,EAClB,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,YAAoB,GACpB,EAAE,qBAAqB,2CA8CvB"}
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-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_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-foreground)}.button-module_ghost svg{color:var(--color-muted-foreground)}.button-module_ghost:hover:not(:disabled){background:transparent;color:var(--color-primary)}.button-module_ghost:hover:not(:disabled) svg{color:var(--color-foreground)}.button-module_ghost:focus-visible{outline-offset:0}.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_link{background-color:transparent;color:var(--color-primary);font-weight:var(--font-weight-semibold)}.button-module_link:hover:not(:disabled){color:color-mix(in srgb,var(--color-primary) 85%,#000)}.button-module_icon{border-radius:var(--radius-xs);height:var(--spacing-8);width:var(--spacing-8);padding:0}.button-module_sm{border-radius:var(--radius-xs);height:var(--spacing-6);width:var(--spacing-6);padding:0}.button-module_sm svg{height:var(--spacing-6);width:var(--spacing-6)}.button-module_withTextAndIcon{padding-left: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-left:var(--spacing-3);padding-right:var(--spacing-3);padding-top:var(--spacing-2);padding-bottom: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{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)}.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;min-height:var(--spacing-10);padding:var(--spacing) var(--spacing) var(--spacing) var(--spacing-4);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;gap:var(--spacing-1);align-items:center;margin-top:var(--spacing-2)}.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-5)}.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}.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-3);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));--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)}
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { MessageActions } from './components/chat/MessageActions';
9
9
  export { Notice } from './components/chat/Notice';
10
10
  export { Message } from './components/chat/Message';
11
11
  export { Suggestions } from './components/chat/Suggestions';
12
+ export { AnimatedPlaceholder } from './components/chat/AnimatedPlaceholder';
12
13
  export * as animations from './components/animations';
13
14
  export { ThumbsUpIcon } from './components/icons/ThumbsUpIcon';
14
15
  export { ThumbsDownIcon } from './components/icons/ThumbsDownIcon';
@@ -18,5 +19,8 @@ export { BigSkyIcon } from './components/icons/BigSkyIcon';
18
19
  export { StopIcon } from './components/icons/StopIcon';
19
20
  export { XIcon } from './components/icons/XIcon';
20
21
  export { ArrowUpIcon } from './components/icons/ArrowUpIcon';
22
+ export { ChevronUpIcon } from './components/icons/ChevronUpIcon';
23
+ export { ZoomIcon } from './components/icons/ZoomIcon';
24
+ export { ZoomIconFilled } from './components/icons/ZoomIconFilled';
21
25
  export type * from './types';
22
26
  //# sourceMappingURL=index.d.ts.map
@@ -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;AAG/C,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,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