@athenaintel/react 0.4.6 → 0.5.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.
- package/README.md +51 -0
- package/dist/index.cjs +279 -104
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +308 -4
- package/dist/index.js +279 -104
- package/dist/index.js.map +1 -1
- package/dist/styles.css +35 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ export declare interface AthenaLayoutProps {
|
|
|
95
95
|
minPercent?: number;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
export declare function AthenaProvider({ children, apiKey, token: tokenProp, agent, model, tools, frontendTools, apiUrl, backendUrl, workbench, knowledgeBase, systemPrompt, threadId: threadIdProp, enableThreadList, }: AthenaProviderProps): JSX.Element;
|
|
98
|
+
export declare function AthenaProvider({ children, apiKey, token: tokenProp, agent, model, tools, frontendTools, apiUrl, backendUrl, workbench, knowledgeBase, systemPrompt, threadId: threadIdProp, enableThreadList, theme, }: AthenaProviderProps): JSX.Element;
|
|
99
99
|
|
|
100
100
|
export declare interface AthenaProviderProps {
|
|
101
101
|
children: ReactNode;
|
|
@@ -124,8 +124,22 @@ export declare interface AthenaProviderProps {
|
|
|
124
124
|
systemPrompt?: string;
|
|
125
125
|
/** Thread ID override. Auto-generated if not provided. */
|
|
126
126
|
threadId?: string;
|
|
127
|
-
/** Enable thread list management (
|
|
127
|
+
/** Enable thread list management (sidebar thread switching). */
|
|
128
128
|
enableThreadList?: boolean;
|
|
129
|
+
/** Theme configuration. Pass a preset from `themes` or a custom `AthenaTheme` object.
|
|
130
|
+
* Injects CSS variables on a wrapper element — no CSS files needed.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* import { themes } from '@athenaintel/react';
|
|
134
|
+
* <AthenaProvider theme={themes.dark}>
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* <AthenaProvider theme={{ primary: '#8b5cf6', radius: '1rem' }}>
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* <AthenaProvider theme={{ ...themes.dark, primary: '#22c55e' }}>
|
|
141
|
+
*/
|
|
142
|
+
theme?: AthenaTheme;
|
|
129
143
|
}
|
|
130
144
|
|
|
131
145
|
export declare interface AthenaRuntimeConfig {
|
|
@@ -153,10 +167,80 @@ export declare interface AthenaRuntimeConfig {
|
|
|
153
167
|
systemPrompt?: string;
|
|
154
168
|
/** Thread ID override. Auto-generated if not provided. */
|
|
155
169
|
threadId?: string;
|
|
156
|
-
/** Pre-loaded messages for
|
|
170
|
+
/** Pre-loaded messages for thread switching. */
|
|
157
171
|
initialMessages?: LangChainMessage[];
|
|
158
172
|
}
|
|
159
173
|
|
|
174
|
+
/**
|
|
175
|
+
* Athena SDK Theming System
|
|
176
|
+
*
|
|
177
|
+
* Usage:
|
|
178
|
+
* import { AthenaProvider, themes } from '@athenaintel/react';
|
|
179
|
+
*
|
|
180
|
+
* // Use a preset theme
|
|
181
|
+
* <AthenaProvider theme={themes.dark}>
|
|
182
|
+
*
|
|
183
|
+
* // Customize a preset
|
|
184
|
+
* <AthenaProvider theme={{ ...themes.dark, primary: '#8b5cf6' }}>
|
|
185
|
+
*
|
|
186
|
+
* // Full custom theme
|
|
187
|
+
* <AthenaProvider theme={{ primary: '#2563eb', background: '#fafafa', radius: '1rem' }}>
|
|
188
|
+
*/
|
|
189
|
+
export declare interface AthenaTheme {
|
|
190
|
+
/** Brand / accent color. Send button, active states, focus ring, spinner. */
|
|
191
|
+
primary?: string;
|
|
192
|
+
/** Text color on primary background. */
|
|
193
|
+
primaryForeground?: string;
|
|
194
|
+
/** Page / panel background. */
|
|
195
|
+
background?: string;
|
|
196
|
+
/** Primary text color. */
|
|
197
|
+
foreground?: string;
|
|
198
|
+
/** Subtle background. User message bubble, sidebar hover, thread highlight. */
|
|
199
|
+
muted?: string;
|
|
200
|
+
/** De-emphasized text. Timestamps, placeholders, sidebar items. */
|
|
201
|
+
mutedForeground?: string;
|
|
202
|
+
/** Hover / focus highlight background. */
|
|
203
|
+
accent?: string;
|
|
204
|
+
/** Text on accent background. */
|
|
205
|
+
accentForeground?: string;
|
|
206
|
+
/** Secondary surface color. */
|
|
207
|
+
secondary?: string;
|
|
208
|
+
/** Text on secondary surface. */
|
|
209
|
+
secondaryForeground?: string;
|
|
210
|
+
/** Card / modal surface color. */
|
|
211
|
+
card?: string;
|
|
212
|
+
/** Text on card surface. */
|
|
213
|
+
cardForeground?: string;
|
|
214
|
+
/** Popover / tooltip / dropdown surface. */
|
|
215
|
+
popover?: string;
|
|
216
|
+
/** Text on popover surface. */
|
|
217
|
+
popoverForeground?: string;
|
|
218
|
+
/** Error / danger color. Error banners, delete actions. */
|
|
219
|
+
destructive?: string;
|
|
220
|
+
/** Default border color. Dividers, card borders. */
|
|
221
|
+
border?: string;
|
|
222
|
+
/** Input field border color. Composer border. */
|
|
223
|
+
input?: string;
|
|
224
|
+
/** Focus ring color. Composer focus ring. */
|
|
225
|
+
ring?: string;
|
|
226
|
+
/** Base border radius for all rounded corners. e.g. '0.5rem', '0.75rem', '0' */
|
|
227
|
+
radius?: string;
|
|
228
|
+
/** Sidebar background color. Falls back to muted with transparency. */
|
|
229
|
+
sidebarBackground?: string;
|
|
230
|
+
/** Sidebar border color. Falls back to border. */
|
|
231
|
+
sidebarBorder?: string;
|
|
232
|
+
/** User message bubble background. Falls back to muted. */
|
|
233
|
+
userBubble?: string;
|
|
234
|
+
/** User message bubble text color. Falls back to foreground. */
|
|
235
|
+
userBubbleForeground?: string;
|
|
236
|
+
/** Assistant message text color. Falls back to foreground. */
|
|
237
|
+
assistantForeground?: string;
|
|
238
|
+
/** Composer border color. Falls back to input. */
|
|
239
|
+
composerBorder?: string;
|
|
240
|
+
/** Composer border radius. Falls back to radius-based default. */
|
|
241
|
+
composerRadius?: string;
|
|
242
|
+
}
|
|
243
|
+
|
|
160
244
|
export declare const BrowseToolUI: ToolCallMessagePartComponent;
|
|
161
245
|
|
|
162
246
|
export declare function Button({ className, variant, size, asChild, ...props }: React_2.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
@@ -164,7 +248,7 @@ export declare function Button({ className, variant, size, asChild, ...props }:
|
|
|
164
248
|
}): JSX.Element;
|
|
165
249
|
|
|
166
250
|
export declare const buttonVariants: (props?: ({
|
|
167
|
-
variant?: "link" | "
|
|
251
|
+
variant?: "link" | "secondary" | "destructive" | "default" | "outline" | "ghost" | null | undefined;
|
|
168
252
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
169
253
|
} & ClassProp) | undefined) => string;
|
|
170
254
|
|
|
@@ -276,6 +360,144 @@ declare interface StoreConfig {
|
|
|
276
360
|
token?: string | null;
|
|
277
361
|
}
|
|
278
362
|
|
|
363
|
+
export declare const themes: {
|
|
364
|
+
/** Default light theme. Neutral grays with blue accent. */
|
|
365
|
+
readonly light: {
|
|
366
|
+
background: string;
|
|
367
|
+
foreground: string;
|
|
368
|
+
primary: string;
|
|
369
|
+
primaryForeground: string;
|
|
370
|
+
secondary: string;
|
|
371
|
+
secondaryForeground: string;
|
|
372
|
+
muted: string;
|
|
373
|
+
mutedForeground: string;
|
|
374
|
+
accent: string;
|
|
375
|
+
accentForeground: string;
|
|
376
|
+
card: string;
|
|
377
|
+
cardForeground: string;
|
|
378
|
+
popover: string;
|
|
379
|
+
popoverForeground: string;
|
|
380
|
+
destructive: string;
|
|
381
|
+
border: string;
|
|
382
|
+
input: string;
|
|
383
|
+
ring: string;
|
|
384
|
+
radius: string;
|
|
385
|
+
};
|
|
386
|
+
/** Dark theme. Deep gray background with lighter text. */
|
|
387
|
+
readonly dark: {
|
|
388
|
+
background: string;
|
|
389
|
+
foreground: string;
|
|
390
|
+
primary: string;
|
|
391
|
+
primaryForeground: string;
|
|
392
|
+
secondary: string;
|
|
393
|
+
secondaryForeground: string;
|
|
394
|
+
muted: string;
|
|
395
|
+
mutedForeground: string;
|
|
396
|
+
accent: string;
|
|
397
|
+
accentForeground: string;
|
|
398
|
+
card: string;
|
|
399
|
+
cardForeground: string;
|
|
400
|
+
popover: string;
|
|
401
|
+
popoverForeground: string;
|
|
402
|
+
destructive: string;
|
|
403
|
+
border: string;
|
|
404
|
+
input: string;
|
|
405
|
+
ring: string;
|
|
406
|
+
radius: string;
|
|
407
|
+
};
|
|
408
|
+
/** Midnight theme. Deep navy with soft blue tones. */
|
|
409
|
+
readonly midnight: {
|
|
410
|
+
background: string;
|
|
411
|
+
foreground: string;
|
|
412
|
+
primary: string;
|
|
413
|
+
primaryForeground: string;
|
|
414
|
+
secondary: string;
|
|
415
|
+
secondaryForeground: string;
|
|
416
|
+
muted: string;
|
|
417
|
+
mutedForeground: string;
|
|
418
|
+
accent: string;
|
|
419
|
+
accentForeground: string;
|
|
420
|
+
card: string;
|
|
421
|
+
cardForeground: string;
|
|
422
|
+
popover: string;
|
|
423
|
+
popoverForeground: string;
|
|
424
|
+
destructive: string;
|
|
425
|
+
border: string;
|
|
426
|
+
input: string;
|
|
427
|
+
ring: string;
|
|
428
|
+
radius: string;
|
|
429
|
+
};
|
|
430
|
+
/** Warm earthy theme. Brown and sand tones. */
|
|
431
|
+
readonly warm: {
|
|
432
|
+
background: string;
|
|
433
|
+
foreground: string;
|
|
434
|
+
primary: string;
|
|
435
|
+
primaryForeground: string;
|
|
436
|
+
secondary: string;
|
|
437
|
+
secondaryForeground: string;
|
|
438
|
+
muted: string;
|
|
439
|
+
mutedForeground: string;
|
|
440
|
+
accent: string;
|
|
441
|
+
accentForeground: string;
|
|
442
|
+
card: string;
|
|
443
|
+
cardForeground: string;
|
|
444
|
+
popover: string;
|
|
445
|
+
popoverForeground: string;
|
|
446
|
+
destructive: string;
|
|
447
|
+
border: string;
|
|
448
|
+
input: string;
|
|
449
|
+
ring: string;
|
|
450
|
+
radius: string;
|
|
451
|
+
};
|
|
452
|
+
/** Purple creative theme. Vibrant purple accent. */
|
|
453
|
+
readonly purple: {
|
|
454
|
+
background: string;
|
|
455
|
+
foreground: string;
|
|
456
|
+
primary: string;
|
|
457
|
+
primaryForeground: string;
|
|
458
|
+
secondary: string;
|
|
459
|
+
secondaryForeground: string;
|
|
460
|
+
muted: string;
|
|
461
|
+
mutedForeground: string;
|
|
462
|
+
accent: string;
|
|
463
|
+
accentForeground: string;
|
|
464
|
+
card: string;
|
|
465
|
+
cardForeground: string;
|
|
466
|
+
popover: string;
|
|
467
|
+
popoverForeground: string;
|
|
468
|
+
destructive: string;
|
|
469
|
+
border: string;
|
|
470
|
+
input: string;
|
|
471
|
+
ring: string;
|
|
472
|
+
radius: string;
|
|
473
|
+
};
|
|
474
|
+
/** Green nature theme. Fresh green tones. */
|
|
475
|
+
readonly green: {
|
|
476
|
+
background: string;
|
|
477
|
+
foreground: string;
|
|
478
|
+
primary: string;
|
|
479
|
+
primaryForeground: string;
|
|
480
|
+
secondary: string;
|
|
481
|
+
secondaryForeground: string;
|
|
482
|
+
muted: string;
|
|
483
|
+
mutedForeground: string;
|
|
484
|
+
accent: string;
|
|
485
|
+
accentForeground: string;
|
|
486
|
+
card: string;
|
|
487
|
+
cardForeground: string;
|
|
488
|
+
popover: string;
|
|
489
|
+
popoverForeground: string;
|
|
490
|
+
destructive: string;
|
|
491
|
+
border: string;
|
|
492
|
+
input: string;
|
|
493
|
+
ring: string;
|
|
494
|
+
radius: string;
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
/** Convert an AthenaTheme object to a CSS variables style object. */
|
|
499
|
+
export declare function themeToStyleVars(theme: AthenaTheme): Record<string, string>;
|
|
500
|
+
|
|
279
501
|
export declare function ThreadList({ className }: ThreadListProps): JSX.Element;
|
|
280
502
|
|
|
281
503
|
export declare interface ThreadListActions {
|
|
@@ -370,6 +592,88 @@ export declare function ToolFallbackTrigger({ toolName, argsText, result, status
|
|
|
370
592
|
|
|
371
593
|
export { Toolkit }
|
|
372
594
|
|
|
595
|
+
/** A toolkit ID string. */
|
|
596
|
+
export declare type ToolkitId = (typeof Toolkits)[keyof typeof Toolkits];
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Backend toolkit IDs.
|
|
600
|
+
*
|
|
601
|
+
* Pass these to the `tools` prop on `<AthenaProvider>` to enable backend toolkits.
|
|
602
|
+
*
|
|
603
|
+
* @example
|
|
604
|
+
* import { Toolkits } from '@athenaintel/react';
|
|
605
|
+
*
|
|
606
|
+
* <AthenaProvider tools={[Toolkits.DOCUMENT, Toolkits.SPREADSHEET, Toolkits.WEB_SEARCH]}>
|
|
607
|
+
*/
|
|
608
|
+
export declare const Toolkits: {
|
|
609
|
+
/** Web search and page browsing. */
|
|
610
|
+
readonly WEB_SEARCH: "web_search_browse_toolkit";
|
|
611
|
+
/** SQL query execution. */
|
|
612
|
+
readonly SQL: "sql_toolkit";
|
|
613
|
+
/** Athena Code development environment. */
|
|
614
|
+
readonly ATHENA_CODE: "athena_code_toolkit";
|
|
615
|
+
/** Document comments and collaboration. */
|
|
616
|
+
readonly COMMENTS: "comments_toolkit";
|
|
617
|
+
/** Visual canvas creation. */
|
|
618
|
+
readonly CANVAS: "canvas_toolkit";
|
|
619
|
+
/** PostgreSQL database management. */
|
|
620
|
+
readonly DATABASE: "database_toolkit";
|
|
621
|
+
/** Asset collections management. */
|
|
622
|
+
readonly COLLECTIONS: "collections_toolkit";
|
|
623
|
+
/** Charts, dashboards, and figures. */
|
|
624
|
+
readonly VISUALIZATIONS: "visualizations_toolkit";
|
|
625
|
+
/** Custom UI creation. */
|
|
626
|
+
readonly USER_INTERFACE: "user_interface_toolkit";
|
|
627
|
+
/** Agent Operating Procedures. */
|
|
628
|
+
readonly AOP: "aop_toolkit";
|
|
629
|
+
/** Ephemeral compute environments. */
|
|
630
|
+
readonly COMPUTER_ASSET: "computer_asset_toolkit";
|
|
631
|
+
/** Web browser automation. */
|
|
632
|
+
readonly BROWSER: "browser_toolkit";
|
|
633
|
+
/** Virtual machine management. */
|
|
634
|
+
readonly VM: "vm_toolkit";
|
|
635
|
+
/** Jupyter notebook execution. */
|
|
636
|
+
readonly NOTEBOOK: "notebook_toolkit";
|
|
637
|
+
/** Presentation slide editing. */
|
|
638
|
+
readonly PRESENTATION: "presentation_toolkit";
|
|
639
|
+
/** PowerPoint presentation creation from templates. */
|
|
640
|
+
readonly POWERPOINT: "powerpoint_deck_toolkit";
|
|
641
|
+
/** Workspace file management (Spaces). */
|
|
642
|
+
readonly DRIVE: "olympus_drive_toolkit";
|
|
643
|
+
/** Python code execution. */
|
|
644
|
+
readonly PYTHON: "python_toolkit";
|
|
645
|
+
/** Multi-account email and calendar (Gmail + Outlook). */
|
|
646
|
+
readonly EMAIL: "unified_email_toolkit";
|
|
647
|
+
/** Legacy email and calendar operations. */
|
|
648
|
+
readonly EMAIL_CALENDAR: "email_calendar_toolkit";
|
|
649
|
+
/** Spreadsheet operations. */
|
|
650
|
+
readonly SPREADSHEET: "spreadsheet_toolkit";
|
|
651
|
+
/** Athena document editing. */
|
|
652
|
+
readonly DOCUMENT: "document_toolkit";
|
|
653
|
+
/** Word document backend operations. */
|
|
654
|
+
readonly WORD_DOCUMENT: "word_document_be_toolkit";
|
|
655
|
+
/** Go-To-Market management. */
|
|
656
|
+
readonly GTM: "gtm_toolkit";
|
|
657
|
+
/** Marketing campaign management. */
|
|
658
|
+
readonly MARKETING: "marketing_toolkit";
|
|
659
|
+
/** FDE implementations and workflows. */
|
|
660
|
+
readonly FDE: "fde_toolkit";
|
|
661
|
+
/** Code repository search via Greptile. */
|
|
662
|
+
readonly GREPTILE: "greptile_toolkit";
|
|
663
|
+
/** SharePoint / Google Drive / workspace file access. */
|
|
664
|
+
readonly EXTERNAL_DRIVE: "external_drive_toolkit";
|
|
665
|
+
/** Reusable playbooks and prompts. */
|
|
666
|
+
readonly PLAYBOOK: "playbook_toolkit";
|
|
667
|
+
/** Local Chrome browser control via tunnel. */
|
|
668
|
+
readonly DEVICE_TUNNEL: "device_tunnel_toolkit";
|
|
669
|
+
/** Project management. */
|
|
670
|
+
readonly PROJECTS: "projects_toolkit";
|
|
671
|
+
/** Task Studio script execution. */
|
|
672
|
+
readonly TASK_STUDIO: "task_studio_toolkit";
|
|
673
|
+
/** User memory and preferences. */
|
|
674
|
+
readonly PREFERENCES: "preferences_toolkit";
|
|
675
|
+
};
|
|
676
|
+
|
|
373
677
|
export declare function Tooltip({ ...props }: React_2.ComponentProps<typeof Tooltip_2.Root>): JSX.Element;
|
|
374
678
|
|
|
375
679
|
export declare function TooltipContent({ className, sideOffset, children, ...props }: React_2.ComponentProps<typeof Tooltip_2.Content>): JSX.Element;
|