@waniwani/sdk 0.5.3-beta.1 → 0.5.3-beta.2
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/chat/index.d.ts +18 -1
- package/dist/chat/index.js +6 -6
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/styles.css +1 -1
- package/package.json +1 -1
package/dist/chat/index.d.ts
CHANGED
|
@@ -37,6 +37,16 @@ interface ChatTheme {
|
|
|
37
37
|
/** Tool call JSON section background. Defaults to light gray / #262626 in dark. */
|
|
38
38
|
toolCardColor?: string;
|
|
39
39
|
}
|
|
40
|
+
interface WelcomeConfig {
|
|
41
|
+
/** Icon displayed above the title. Accepts any React node (e.g. an SVG or img). */
|
|
42
|
+
icon?: React.ReactNode;
|
|
43
|
+
/** Title text shown prominently in the welcome screen. */
|
|
44
|
+
title: string;
|
|
45
|
+
/** Description text shown below the title. */
|
|
46
|
+
description?: string;
|
|
47
|
+
/** Suggestion cards shown in the welcome screen. Disappear after the first message. */
|
|
48
|
+
suggestions?: string[];
|
|
49
|
+
}
|
|
40
50
|
interface SuggestionsConfig {
|
|
41
51
|
/**
|
|
42
52
|
* Initial suggestions to show before the user sends their first message.
|
|
@@ -56,6 +66,13 @@ interface ChatBaseProps {
|
|
|
56
66
|
api?: string;
|
|
57
67
|
/** Initial greeting shown before user types */
|
|
58
68
|
welcomeMessage?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Rich welcome screen shown when the conversation is empty.
|
|
71
|
+
* Replaces `welcomeMessage` with a centered layout featuring an icon, title,
|
|
72
|
+
* description, and card-style suggestion prompts.
|
|
73
|
+
* Takes precedence over `welcomeMessage` when provided.
|
|
74
|
+
*/
|
|
75
|
+
welcome?: WelcomeConfig;
|
|
59
76
|
/** Theme overrides */
|
|
60
77
|
theme?: ChatTheme;
|
|
61
78
|
/** Additional headers to send with chat API requests */
|
|
@@ -302,4 +319,4 @@ declare const DARK_THEME: ChatTheme;
|
|
|
302
319
|
declare function mergeTheme(userTheme?: ChatTheme): Required<ChatTheme>;
|
|
303
320
|
declare function themeToCSSProperties(theme: Required<ChatTheme>): Record<string, string>;
|
|
304
321
|
|
|
305
|
-
export { ChatBar, type ChatBarProps, type ChatBaseProps, ChatCard, type ChatCardProps, ChatEmbed, type ChatEmbedMcpConfig, type ChatEmbedProps, type ChatHandle, type ChatTheme, ChatBar as ChatWidget, type ChatWidgetProps, DARK_THEME, DEFAULT_THEME, EvalPanel, type McpAppDisplayMode, McpAppFrame, type McpAppFrameProps, type SuggestionsConfig, mergeTheme, themeToCSSProperties };
|
|
322
|
+
export { ChatBar, type ChatBarProps, type ChatBaseProps, ChatCard, type ChatCardProps, ChatEmbed, type ChatEmbedMcpConfig, type ChatEmbedProps, type ChatHandle, type ChatTheme, ChatBar as ChatWidget, type ChatWidgetProps, DARK_THEME, DEFAULT_THEME, EvalPanel, type McpAppDisplayMode, McpAppFrame, type McpAppFrameProps, type SuggestionsConfig, type WelcomeConfig, mergeTheme, themeToCSSProperties };
|