@athenaintel/react 0.9.9 → 0.9.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.
package/dist/index.d.ts CHANGED
@@ -3,14 +3,18 @@ import { ClassProp } from 'class-variance-authority/types';
3
3
  import { ClassValue } from 'clsx';
4
4
  import { Collapsible as Collapsible_2 } from 'radix-ui';
5
5
  import { ComponentPropsWithRef } from 'react';
6
+ import { EmptyMessagePartComponent } from '@assistant-ui/react';
6
7
  import { FC } from 'react';
7
8
  import { ForwardRefExoticComponent } from 'react';
8
9
  import { JSX } from 'react/jsx-runtime';
9
10
  import * as React_2 from 'react';
10
11
  import { ReactNode } from 'react';
12
+ import { ReasoningMessagePartComponent } from '@assistant-ui/react';
13
+ import { ReasoningMessagePartProps } from '@assistant-ui/react';
11
14
  import { RefAttributes } from 'react';
12
15
  import { Store } from '@tanstack/react-store';
13
16
  import { StoreApi } from 'zustand';
17
+ import { TextMessagePartComponent } from '@assistant-ui/react';
14
18
  import { ToolCallMessagePartComponent } from '@assistant-ui/react';
15
19
  import { ToolCallMessagePartStatus } from '@assistant-ui/react';
16
20
  import { Toolkit } from '@assistant-ui/react';
@@ -49,29 +53,6 @@ export declare interface AssetPanelState {
49
53
  markAutoOpened: (assetId: string) => boolean;
50
54
  }
51
55
 
52
- /**
53
- * Render an Athena asset anywhere inside AthenaProvider.
54
- *
55
- * This component only needs `assetId`. The embed token endpoint resolves the
56
- * correct viewer from that ID, so callers do not need to pass an asset type.
57
- */
58
- export declare const AssetRenderer: FC<AssetRendererProps>;
59
-
60
- export declare interface AssetRendererProps extends UseAssetEmbedOptions {
61
- /** Athena asset ID to render. */
62
- assetId: string | null;
63
- /** Accessible iframe title. */
64
- title?: string | null;
65
- /** Applied to the iframe or fallback container. */
66
- className?: string;
67
- /** Optional loading UI override. */
68
- loadingFallback?: ReactNode;
69
- /** Optional empty state override when assetId is missing. */
70
- emptyFallback?: ReactNode;
71
- /** Optional error UI override. */
72
- errorFallback?: ReactNode | ((error: string) => ReactNode);
73
- }
74
-
75
56
  export declare interface AssetTab {
76
57
  id: string;
77
58
  name: string | null;
@@ -80,8 +61,37 @@ export declare interface AssetTab {
80
61
 
81
62
  export declare type AssetType = 'presentation' | 'spreadsheet' | 'document' | 'notebook' | 'unknown';
82
63
 
64
+ export declare const AthenaAssistantActionBar: FC<AthenaAssistantActionBarProps>;
65
+
66
+ export declare interface AthenaAssistantActionBarProps {
67
+ className?: string;
68
+ }
69
+
70
+ export declare const AthenaAssistantMessage: FC<AthenaAssistantMessageProps>;
71
+
72
+ export declare interface AthenaAssistantMessageProps {
73
+ toolUIs: Record<string, ToolCallMessagePartComponent>;
74
+ TextComponent?: TextMessagePartComponent;
75
+ ReasoningComponent?: ReasoningMessagePartComponent;
76
+ EmptyComponent?: EmptyMessagePartComponent;
77
+ ActionBarComponent?: FC<AthenaAssistantActionBarProps>;
78
+ }
79
+
83
80
  export declare const AthenaChat: FC<AthenaChatProps>;
84
81
 
82
+ export declare interface AthenaChatComponents {
83
+ UserMessage?: FC;
84
+ AssistantMessage?: FC;
85
+ AssistantActionBar?: FC<AthenaAssistantActionBarProps>;
86
+ messageParts?: AthenaChatMessagePartComponents;
87
+ }
88
+
89
+ export declare interface AthenaChatMessagePartComponents {
90
+ Text?: TextMessagePartComponent;
91
+ Reasoning?: ReasoningMessagePartComponent;
92
+ Empty?: EmptyMessagePartComponent;
93
+ }
94
+
85
95
  export declare interface AthenaChatProps {
86
96
  /** CSS class name for the root element. */
87
97
  className?: string;
@@ -99,6 +109,8 @@ export declare interface AthenaChatProps {
99
109
  * For workflow launchers outside AthenaChat, use `useSendMessage()`.
100
110
  */
101
111
  welcomeSuggestions?: WelcomeSuggestion[];
112
+ /** Optional component overrides for message containers and key message parts. */
113
+ components?: AthenaChatComponents;
102
114
  }
103
115
 
104
116
  export declare interface AthenaConfig extends Pick<AthenaProviderConfig, 'apiKey' | 'token'> {
@@ -190,6 +202,12 @@ export declare interface AthenaProviderProps {
190
202
  theme?: AthenaTheme;
191
203
  }
192
204
 
205
+ export declare const AthenaReasoningPart: FC<AthenaReasoningPartProps>;
206
+
207
+ export declare interface AthenaReasoningPartProps extends ReasoningMessagePartProps {
208
+ TextComponent?: TextMessagePartComponent;
209
+ }
210
+
193
211
  export declare interface AthenaRuntimeConfig {
194
212
  /** URL for the chat streaming endpoint. Defaults to Athena production sync server. */
195
213
  apiUrl?: string;
@@ -237,7 +255,7 @@ export declare interface AthenaRuntimeConfig {
237
255
  export declare interface AthenaTheme {
238
256
  /** Brand / accent color. Send button, active states, focus ring, spinner. */
239
257
  primary?: string;
240
- /** Text color on primary background. If omitted, the SDK tries to derive a readable black/white fallback for solid colors. */
258
+ /** Text color on primary background. Set this with `primary` when you change contrast significantly. */
241
259
  primaryForeground?: string;
242
260
  /** Page / panel background. */
243
261
  background?: string;
@@ -283,11 +301,11 @@ export declare interface AthenaTheme {
283
301
  sidebarWidth?: string;
284
302
  /** User message bubble background. Falls back to muted. */
285
303
  userBubble?: string;
286
- /** User message bubble text color. If omitted, the SDK tries to derive a readable black/white fallback for solid colors. */
304
+ /** User message bubble text color. Falls back to foreground. Set this when `userBubble` is dark or saturated. */
287
305
  userBubbleForeground?: string;
288
306
  /** User message bubble border radius. e.g. '1rem', '0.5rem'. */
289
307
  userBubbleRadius?: string;
290
- /** Assistant message text color. If omitted, the SDK tries to derive a readable black/white fallback for solid colors. */
308
+ /** Assistant message text color. Falls back to foreground. Set this when `assistantBubble` reduces contrast. */
291
309
  assistantForeground?: string;
292
310
  /** Assistant message bubble background. Transparent by default. */
293
311
  assistantBubble?: string;
@@ -299,6 +317,12 @@ export declare interface AthenaTheme {
299
317
  threadMaxWidth?: string;
300
318
  }
301
319
 
320
+ export declare const AthenaUserMessage: FC<AthenaUserMessageProps>;
321
+
322
+ export declare interface AthenaUserMessageProps {
323
+ TextComponent?: TextMessagePartComponent;
324
+ }
325
+
302
326
  export declare const BrowseToolUI: ToolCallMessagePartComponent;
303
327
 
304
328
  export declare function Button({ className, variant, size, asChild, ...props }: React_2.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {