@agentiffai/design 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/LICENSE +21 -0
  3. package/README.md +187 -0
  4. package/assets/layout/main-pane-section.png +0 -0
  5. package/assets/layout/nav-complete.png +0 -0
  6. package/assets/layout/nav-horizontal-section.png +0 -0
  7. package/assets/layout/nav-vertical-section.png +0 -0
  8. package/assets/layout/pane-section-dropdowns.png +0 -0
  9. package/assets/layout/pane-section-header.png +0 -0
  10. package/dist/Window-B6e_UfLV.d.ts +429 -0
  11. package/dist/Window-CgGFIYHS.d.cts +429 -0
  12. package/dist/chunk-CNVJ5UF2.js +2069 -0
  13. package/dist/chunk-CNVJ5UF2.js.map +1 -0
  14. package/dist/chunk-CVHHTWDQ.cjs +72 -0
  15. package/dist/chunk-CVHHTWDQ.cjs.map +1 -0
  16. package/dist/chunk-H4VHCHCP.cjs +1268 -0
  17. package/dist/chunk-H4VHCHCP.cjs.map +1 -0
  18. package/dist/chunk-JQ6Q7MDQ.js +67 -0
  19. package/dist/chunk-JQ6Q7MDQ.js.map +1 -0
  20. package/dist/chunk-KNSPBTTJ.cjs +2158 -0
  21. package/dist/chunk-KNSPBTTJ.cjs.map +1 -0
  22. package/dist/chunk-MNXQDDWP.js +2143 -0
  23. package/dist/chunk-MNXQDDWP.js.map +1 -0
  24. package/dist/chunk-P4Q3MHIY.cjs +2093 -0
  25. package/dist/chunk-P4Q3MHIY.cjs.map +1 -0
  26. package/dist/chunk-PAOXD7DF.js +1253 -0
  27. package/dist/chunk-PAOXD7DF.js.map +1 -0
  28. package/dist/copilotkit/index.cjs +611 -0
  29. package/dist/copilotkit/index.cjs.map +1 -0
  30. package/dist/copilotkit/index.d.cts +162 -0
  31. package/dist/copilotkit/index.d.ts +162 -0
  32. package/dist/copilotkit/index.js +538 -0
  33. package/dist/copilotkit/index.js.map +1 -0
  34. package/dist/icons/index.cjs +48 -0
  35. package/dist/icons/index.cjs.map +1 -0
  36. package/dist/icons/index.d.cts +375 -0
  37. package/dist/icons/index.d.ts +375 -0
  38. package/dist/icons/index.js +3 -0
  39. package/dist/icons/index.js.map +1 -0
  40. package/dist/index.cjs +536 -0
  41. package/dist/index.cjs.map +1 -0
  42. package/dist/index.d-DYU1eVeb.d.cts +252 -0
  43. package/dist/index.d-DYU1eVeb.d.ts +252 -0
  44. package/dist/index.d.cts +185 -0
  45. package/dist/index.d.ts +185 -0
  46. package/dist/index.js +358 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/layout/index.cjs +48 -0
  49. package/dist/layout/index.cjs.map +1 -0
  50. package/dist/layout/index.d.cts +206 -0
  51. package/dist/layout/index.d.ts +206 -0
  52. package/dist/layout/index.js +3 -0
  53. package/dist/layout/index.js.map +1 -0
  54. package/dist/theme/index.cjs +24 -0
  55. package/dist/theme/index.cjs.map +1 -0
  56. package/dist/theme/index.d.cts +95 -0
  57. package/dist/theme/index.d.ts +95 -0
  58. package/dist/theme/index.js +3 -0
  59. package/dist/theme/index.js.map +1 -0
  60. package/package.json +148 -0
  61. package/public/assets/bg-set/brand-logos/Google.svg +1 -0
  62. package/public/assets/bg-set/brand-logos/Google2.svg +1 -0
  63. package/public/assets/bg-set/brand-logos/Microsoft.svg +1 -0
  64. package/public/assets/bg-set/brand-logos/Microsoft2.svg +1 -0
  65. package/public/assets/bg-set/brand-logos/Slack.svg +1 -0
  66. package/public/assets/bg-set/brand-logos/Slack2.svg +1 -0
  67. package/public/assets/bg-set/brand-logos/YouTube.svg +1 -0
  68. package/public/assets/bg-set/brand-logos/YouTube2.svg +1 -0
  69. package/public/assets/bg-set/pattern/Size=lg, Type=Waves Rays2.svg +1 -0
  70. package/public/assets/bg-set/pattern/Size=md, Type=Waves Rays2.svg +1 -0
  71. package/public/assets/bg-set/pattern/Size=sm, Type=Waves Rays2.svg +1 -0
  72. package/public/assets/bg-set/pattern/Size=xl, Type=Waves Rays2.svg +1 -0
  73. package/public/assets/bg-set/pattern/Size=xs, Type=Waves Rays2.svg +1 -0
  74. package/public/assets/icon-set/Icon-add-circle-fill.svg +1 -0
  75. package/public/assets/icon-set/Icon-calendar-fill.svg +1 -0
  76. package/public/assets/icon-set/Icon-chat-1-fill.svg +1 -0
  77. package/public/assets/icon-set/Icon-download-2-fill.svg +1 -0
  78. package/public/assets/icon-set/Icon-home-fill.svg +1 -0
  79. package/public/assets/icon-set/Icon-mic-fill.svg +1 -0
  80. package/public/assets/icon-set/Icon-settings-3-fill.svg +1 -0
  81. package/public/assets/icon-set/Icon-settings-fill.svg +1 -0
  82. package/public/assets/icon-set/Icon-settings-line.svg +1 -0
@@ -0,0 +1,429 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React$1 from 'react';
3
+ import React__default, { ReactNode } from 'react';
4
+ import { AriaButtonProps } from '@react-aria/button';
5
+ import { AriaTextFieldProps } from '@react-aria/textfield';
6
+ import { A as AriaButtonProps$1 } from './index.d-DYU1eVeb.cjs';
7
+ import * as styled_components from 'styled-components';
8
+ import * as styled_components_dist_types from 'styled-components/dist/types';
9
+
10
+ type ActionVariant = 'primary' | 'secondary' | 'icon';
11
+ type ActionsLayout = 'horizontal' | 'vertical';
12
+ interface Action {
13
+ id: string;
14
+ label: string;
15
+ onClick: () => void;
16
+ variant?: ActionVariant;
17
+ disabled?: boolean;
18
+ icon?: React__default.ReactNode;
19
+ }
20
+ interface ActionsProps {
21
+ actions: Action[];
22
+ layout?: ActionsLayout;
23
+ className?: string;
24
+ }
25
+ declare function Actions({ actions, layout, className }: ActionsProps): react_jsx_runtime.JSX.Element;
26
+ declare namespace Actions {
27
+ var displayName: string;
28
+ }
29
+
30
+ interface AgentStateProps {
31
+ /** Current agent state */
32
+ state: 'idle' | 'thinking' | 'responding' | 'error';
33
+ /** Optional message to display */
34
+ message?: string;
35
+ /** Optional progress percentage (0-100) */
36
+ progress?: number;
37
+ /** Additional CSS class name */
38
+ className?: string;
39
+ }
40
+ /**
41
+ * AgentState component for displaying agent status
42
+ * Styled to match AssistantThinking and Response components with dark theme
43
+ */
44
+ declare const AgentState: ({ state, message, progress, className }: AgentStateProps) => react_jsx_runtime.JSX.Element | null;
45
+
46
+ type ButtonVariant = 'primary' | 'secondary' | 'icon';
47
+ type ButtonSize = 'small' | 'medium' | 'large';
48
+ interface ButtonProps extends AriaButtonProps {
49
+ variant?: ButtonVariant;
50
+ size?: ButtonSize;
51
+ children: React.ReactNode;
52
+ className?: string;
53
+ disabled?: boolean;
54
+ isLoading?: boolean;
55
+ }
56
+ declare function Button({ variant, size, children, className, disabled, isLoading, ...ariaProps }: ButtonProps): react_jsx_runtime.JSX.Element;
57
+ declare namespace Button {
58
+ var displayName: string;
59
+ }
60
+
61
+ interface FooterProps {
62
+ /**
63
+ * Branding text to display (e.g., "Powered by CopilotKit")
64
+ */
65
+ branding?: string;
66
+ /**
67
+ * Optional status text (e.g., "Connected", "Typing...", "3 tokens remaining")
68
+ */
69
+ status?: string;
70
+ /**
71
+ * Optional link URL for the branding text
72
+ */
73
+ brandingUrl?: string;
74
+ /**
75
+ * Callback when branding link is clicked
76
+ */
77
+ onBrandingClick?: () => void;
78
+ /**
79
+ * Additional CSS class name for custom styling
80
+ */
81
+ className?: string;
82
+ }
83
+ /**
84
+ * Footer Component
85
+ *
86
+ * A chat footer component that displays branding, status information, and optional links.
87
+ * Typically used at the bottom of a chat interface to show provider information or connection status.
88
+ *
89
+ * @example
90
+ * ```tsx
91
+ * <Footer
92
+ * branding="Powered by CopilotKit"
93
+ * status="Connected"
94
+ * brandingUrl="https://copilotkit.ai"
95
+ * />
96
+ * ```
97
+ */
98
+ declare const Footer: React__default.FC<FooterProps>;
99
+
100
+ interface HeaderProps {
101
+ /**
102
+ * The main title text displayed in the header
103
+ */
104
+ title: string;
105
+ /**
106
+ * Optional subtitle text displayed below the title
107
+ */
108
+ subtitle?: string;
109
+ /**
110
+ * Callback function triggered when the close button is clicked
111
+ */
112
+ onClose?: () => void;
113
+ /**
114
+ * Callback function triggered when the minimize button is clicked
115
+ */
116
+ onMinimize?: () => void;
117
+ /**
118
+ * Additional CSS class name for custom styling
119
+ */
120
+ className?: string;
121
+ }
122
+ /**
123
+ * Header Component
124
+ *
125
+ * A chat header component that displays a title, optional subtitle, and action buttons.
126
+ * Built with React ARIA for accessibility and Styled Components for theming.
127
+ *
128
+ * @example
129
+ * ```tsx
130
+ * <Header
131
+ * title="AI Assistant"
132
+ * subtitle="How can I help you today?"
133
+ * onClose={() => console.log('Close clicked')}
134
+ * onMinimize={() => console.log('Minimize clicked')}
135
+ * />
136
+ * ```
137
+ */
138
+ declare const Header: React__default.FC<HeaderProps>;
139
+
140
+ interface InputProps extends Omit<AriaTextFieldProps, 'onChange' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp'> {
141
+ /** Current message value */
142
+ value?: string;
143
+ /** Callback when message value changes */
144
+ onChange?: (value: string) => void;
145
+ /** Callback when message is submitted */
146
+ onSubmit?: (message: string) => void;
147
+ /** Placeholder text */
148
+ placeholder?: string;
149
+ /** Whether the input is disabled */
150
+ isDisabled?: boolean;
151
+ /** Whether the input is read-only */
152
+ isReadOnly?: boolean;
153
+ /** Maximum number of rows before scrolling */
154
+ maxRows?: number;
155
+ /** Whether to auto-focus the input */
156
+ autoFocus?: boolean;
157
+ /** Additional CSS class name */
158
+ className?: string;
159
+ /** ARIA label for the input */
160
+ 'aria-label'?: string;
161
+ }
162
+ /**
163
+ * Input component for chat interfaces
164
+ * Features:
165
+ * - Multi-line text support
166
+ * - Submit on Enter, Shift+Enter for new line
167
+ * - React ARIA for accessibility
168
+ * - Auto-growing textarea
169
+ * - Integrated send button
170
+ */
171
+ declare const Input: React__default.FC<InputProps>;
172
+
173
+ interface FileAttachmentProps extends Omit<AriaButtonProps$1, 'children'> {
174
+ /** File name/title */
175
+ title: string;
176
+ /** File subtitle/category (e.g., "Downloads", "Documents") */
177
+ subtitle?: string;
178
+ /** File size in human-readable format (e.g., "500 KB", "2.5 MB") */
179
+ size?: string;
180
+ /** File icon emoji or Unicode character */
181
+ icon?: string;
182
+ /** Click handler for file interaction */
183
+ onClick?: () => void;
184
+ /** Custom className for styling */
185
+ className?: string;
186
+ }
187
+ /**
188
+ * FileAttachment component displays file information in assistant messages
189
+ *
190
+ * Features:
191
+ * - File icon display (emoji or Unicode)
192
+ * - File metadata (title, subtitle, size)
193
+ * - Accessible keyboard navigation via React ARIA
194
+ * - Clean, minimal card-based design
195
+ * - WCAG 2.1 AA compliant
196
+ *
197
+ * @example
198
+ * ```tsx
199
+ * <FileAttachment
200
+ * title="Example File"
201
+ * subtitle="Downloads"
202
+ * size="500 KB"
203
+ * icon="📄"
204
+ * onPress={() => console.log('File clicked')}
205
+ * />
206
+ * ```
207
+ */
208
+ declare const FileAttachment: React__default.FC<FileAttachmentProps>;
209
+
210
+ interface AssistantMessageProps {
211
+ /** Message content to display */
212
+ content?: string;
213
+ /** Avatar image URL */
214
+ avatarUrl?: string;
215
+ /** Avatar initials when no image is provided */
216
+ avatarInitials?: string;
217
+ /** Whether to show loading state */
218
+ isLoading?: boolean;
219
+ /** Custom className for styling */
220
+ className?: string;
221
+ /** Support for markdown rendering (future enhancement) */
222
+ enableMarkdown?: boolean;
223
+ /** File attachments to display below the message */
224
+ attachments?: FileAttachmentProps[];
225
+ }
226
+ /**
227
+ * AssistantMessage component displays AI assistant messages with avatar
228
+ *
229
+ * Features:
230
+ * - Avatar with image or initials fallback
231
+ * - Loading state with animated dots
232
+ * - Markdown support (optional)
233
+ * - Clean, modern design
234
+ */
235
+ declare const AssistantMessage: React__default.FC<AssistantMessageProps>;
236
+
237
+ interface MessagesProps {
238
+ /**
239
+ * Children elements to be rendered inside the messages container
240
+ */
241
+ children?: React__default.ReactNode;
242
+ /**
243
+ * Additional CSS class name
244
+ */
245
+ className?: string;
246
+ /**
247
+ * ARIA label for accessibility
248
+ */
249
+ ariaLabel?: string;
250
+ }
251
+ /**
252
+ * Messages component - Container for message list
253
+ *
254
+ * This component serves as a wrapper for the messages area,
255
+ * providing consistent spacing and layout for chat messages.
256
+ *
257
+ * @example
258
+ * ```tsx
259
+ * <Messages ariaLabel="Chat messages">
260
+ * <MessagesList messages={messages} />
261
+ * </Messages>
262
+ * ```
263
+ */
264
+ declare const Messages: React__default.FC<MessagesProps>;
265
+
266
+ interface Message {
267
+ id: string;
268
+ content: ReactNode;
269
+ role: 'user' | 'assistant' | 'system';
270
+ timestamp?: Date;
271
+ }
272
+ interface MessagesListProps {
273
+ /** Array of messages to display */
274
+ messages: Message[];
275
+ /** Whether to automatically scroll to the bottom when new messages arrive */
276
+ autoScroll?: boolean;
277
+ /** Custom class name for the container */
278
+ className?: string;
279
+ /** Custom render function for individual messages */
280
+ renderMessage?: (message: Message) => ReactNode;
281
+ /** Callback when scroll reaches the top (for loading more messages) */
282
+ onScrollTop?: () => void;
283
+ /** Maximum height of the messages list */
284
+ maxHeight?: string;
285
+ }
286
+ /**
287
+ * MessagesList Component
288
+ *
289
+ * A scrollable message list component with auto-scroll functionality.
290
+ * Designed for chat interfaces where messages need to be displayed
291
+ * in a scrollable container with automatic scrolling to the latest message.
292
+ *
293
+ * Features:
294
+ * - Auto-scroll to bottom on new messages
295
+ * - Overflow handling with custom scrollbar
296
+ * - Flexible message rendering
297
+ * - Scroll event handling for pagination
298
+ */
299
+ declare const MessagesList: ({ messages, autoScroll, className, renderMessage, onScrollTop, maxHeight, }: MessagesListProps) => react_jsx_runtime.JSX.Element;
300
+
301
+ declare const MessagesListContainer: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
302
+ $maxHeight: string;
303
+ }>> & string;
304
+ declare const MessagesListContent: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
305
+
306
+ interface UserMessageProps {
307
+ /** The message content to display */
308
+ content: string;
309
+ /** Optional timestamp for the message */
310
+ timestamp?: string;
311
+ /** Optional CSS class name */
312
+ className?: string;
313
+ /** Optional avatar URL */
314
+ avatarUrl?: string;
315
+ /** Optional username */
316
+ username?: string;
317
+ }
318
+ /**
319
+ * UserMessage component displays a user's message in a chat interface.
320
+ * Styled with right alignment and distinct styling from assistant messages.
321
+ */
322
+ declare const UserMessage: ({ content, timestamp, className, avatarUrl, username, }: UserMessageProps) => react_jsx_runtime.JSX.Element;
323
+
324
+ interface ResponseProps {
325
+ /** Loading state - shows animated dots */
326
+ isLoading?: boolean;
327
+ /** Typing state - shows typing indicator */
328
+ isTyping?: boolean;
329
+ /** Streaming state - shows text being typed */
330
+ isStreaming?: boolean;
331
+ /** Content to display when streaming */
332
+ streamingContent?: string;
333
+ /** Message to display with loading/typing state */
334
+ message?: string;
335
+ /** Additional CSS class name */
336
+ className?: string;
337
+ }
338
+ /**
339
+ * Response component for displaying loading and streaming states
340
+ * Shows animated loading dots, typing indicators, and streaming text
341
+ */
342
+ declare const Response: ({ isLoading, isTyping, isStreaming, streamingContent, message, className, }: ResponseProps) => react_jsx_runtime.JSX.Element | null;
343
+
344
+ interface SuggestionsProps {
345
+ suggestions: string[];
346
+ onSelect: (suggestion: string) => void;
347
+ className?: string;
348
+ }
349
+ declare function Suggestions({ suggestions, onSelect, className }: SuggestionsProps): react_jsx_runtime.JSX.Element | null;
350
+ declare namespace Suggestions {
351
+ var displayName: string;
352
+ }
353
+
354
+ interface WindowProps {
355
+ /**
356
+ * Whether the window is minimized to a small bar
357
+ */
358
+ isMinimized?: boolean;
359
+ /**
360
+ * Whether the window is fullscreen (100vw x 100vh)
361
+ */
362
+ isFullscreen?: boolean;
363
+ /**
364
+ * Custom width for the window (e.g., "400px", "50vw")
365
+ * @default "400px"
366
+ */
367
+ width?: string;
368
+ /**
369
+ * Custom height for the window (e.g., "600px", "80vh")
370
+ * @default "600px"
371
+ */
372
+ height?: string;
373
+ /**
374
+ * Children elements to be rendered inside the window
375
+ */
376
+ children: React__default.ReactNode;
377
+ /**
378
+ * Additional CSS class name for custom styling
379
+ */
380
+ className?: string;
381
+ /**
382
+ * ARIA label for the window
383
+ */
384
+ ariaLabel?: string;
385
+ }
386
+ /**
387
+ * Window Component
388
+ *
389
+ * Main container/window wrapper for the CopilotKit chat interface.
390
+ * This component holds the Header, Messages, Input, and Footer components.
391
+ *
392
+ * Features:
393
+ * - Default: 400px width x 600px height with rounded corners and shadow
394
+ * - Minimized: Collapsed to a small bar
395
+ * - Fullscreen: Takes full viewport (100vw x 100vh)
396
+ * - Smooth transitions between states
397
+ * - Customizable dimensions via width/height props
398
+ *
399
+ * @example
400
+ * ```tsx
401
+ * // Default window
402
+ * <Window>
403
+ * <Header title="AI Assistant" />
404
+ * <Messages>...</Messages>
405
+ * <MessageInput />
406
+ * <Footer />
407
+ * </Window>
408
+ *
409
+ * // Minimized window
410
+ * <Window isMinimized>
411
+ * <Header title="AI Assistant" />
412
+ * </Window>
413
+ *
414
+ * // Fullscreen window
415
+ * <Window isFullscreen>
416
+ * <Header title="AI Assistant" />
417
+ * <Messages>...</Messages>
418
+ * <MessageInput />
419
+ * </Window>
420
+ *
421
+ * // Custom dimensions
422
+ * <Window width="500px" height="700px">
423
+ * ...
424
+ * </Window>
425
+ * ```
426
+ */
427
+ declare const Window: React__default.FC<WindowProps>;
428
+
429
+ export { type Action as A, type ButtonProps as B, type FooterProps as F, type HeaderProps as H, type InputProps as I, type Message as M, type ResponseProps as R, type SuggestionsProps as S, type UserMessageProps as U, type WindowProps as W, type ActionsLayout as a, type ActionsProps as b, type ActionVariant as c, Actions as d, type AgentStateProps as e, AgentState as f, type ButtonSize as g, type ButtonVariant as h, Button as i, Footer as j, Header as k, Input as l, type AssistantMessageProps as m, type FileAttachmentProps as n, type MessagesListProps as o, type MessagesProps as p, AssistantMessage as q, FileAttachment as r, Messages as s, MessagesList as t, MessagesListContainer as u, MessagesListContent as v, UserMessage as w, Response as x, Suggestions as y, Window as z };