keyring-chatbot-agent-sdk-test 1.0.7 → 1.0.12
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 +133 -70
- package/dist/chat-widget-wc.es.js +47 -56
- package/dist/chat-widget-wc.umd.js +2 -2
- package/dist/chat-widget.es.js +47 -56
- package/dist/chat-widget.umd.js +2 -2
- package/dist/lib.d.ts +23 -1
- package/package.json +10 -4
package/dist/lib.d.ts
CHANGED
|
@@ -5,6 +5,15 @@ export declare interface Account {
|
|
|
5
5
|
chainId: number | string;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
export declare interface ChatUICustomization {
|
|
9
|
+
chatTitle?: string;
|
|
10
|
+
welcomeMessage?: string;
|
|
11
|
+
suggestions?: SuggestionButtonConfig[];
|
|
12
|
+
additionalSuggestions?: SuggestionButtonConfig[];
|
|
13
|
+
buttonIcon?: string;
|
|
14
|
+
chatIcon?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
8
17
|
/**
|
|
9
18
|
* `ChatWidget` is the main entry point for embedding the Keyring AI chat assistant
|
|
10
19
|
* into your dApp. It renders a floating chat button that opens a full-featured
|
|
@@ -44,7 +53,7 @@ export declare interface Account {
|
|
|
44
53
|
* over the built-in defaults for balance queries and fee estimation.
|
|
45
54
|
* e.g. `{ 1: 'https://...', 137: 'https://...' }`
|
|
46
55
|
*/
|
|
47
|
-
export declare const ChatWidget: ({ position, theme, defaultOpen, onOpen, onClose, account, onTransaction, language, rpcUrls, }: ChatWidgetProps) => JSX.Element | null;
|
|
56
|
+
export declare const ChatWidget: ({ position, theme, defaultOpen, onOpen, onClose, account, onTransaction, language, rpcUrls, chatTitle, welcomeMessage, customSuggestions, additionalSuggestions, buttonIcon, chatIcon, }: ChatWidgetProps) => JSX.Element | null;
|
|
48
57
|
|
|
49
58
|
/** Alias kept for backwards-compatibility */
|
|
50
59
|
export declare type ChatWidgetLanguage = Language;
|
|
@@ -59,6 +68,12 @@ export declare interface ChatWidgetProps {
|
|
|
59
68
|
onTransaction?: (tx: Transaction) => Promise<TransactionResult>;
|
|
60
69
|
language?: ChatWidgetLanguage;
|
|
61
70
|
rpcUrls?: Record<number, string>;
|
|
71
|
+
chatTitle?: string;
|
|
72
|
+
welcomeMessage?: string;
|
|
73
|
+
customSuggestions?: SuggestionButtonConfig[];
|
|
74
|
+
additionalSuggestions?: SuggestionButtonConfig[];
|
|
75
|
+
buttonIcon?: string;
|
|
76
|
+
chatIcon?: string;
|
|
62
77
|
}
|
|
63
78
|
|
|
64
79
|
export declare interface ChatWidgetTheme {
|
|
@@ -72,6 +87,8 @@ export declare interface ChatWidgetTheme {
|
|
|
72
87
|
};
|
|
73
88
|
}
|
|
74
89
|
|
|
90
|
+
export declare function clearChat(): void;
|
|
91
|
+
|
|
75
92
|
export declare interface Config {
|
|
76
93
|
position?: 'bottom-right' | 'bottom-left';
|
|
77
94
|
theme?: ChatWidgetTheme;
|
|
@@ -134,6 +151,11 @@ export declare interface MessageTokenInfo {
|
|
|
134
151
|
contractAddress: string;
|
|
135
152
|
}
|
|
136
153
|
|
|
154
|
+
export declare interface SuggestionButtonConfig {
|
|
155
|
+
icon?: string;
|
|
156
|
+
text: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
137
159
|
export declare interface Transaction {
|
|
138
160
|
from: string;
|
|
139
161
|
to: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keyring-chatbot-agent-sdk-test",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A React chat widget SDK with floating button and modal",
|
|
6
6
|
"keywords": [
|
|
@@ -53,7 +53,10 @@
|
|
|
53
53
|
"lint": "eslint .",
|
|
54
54
|
"lint:fix": "eslint . --fix",
|
|
55
55
|
"format": "prettier --write \"src/**/*.{ts,tsx,css,json}\"",
|
|
56
|
-
"preview": "vite preview"
|
|
56
|
+
"preview": "vite preview",
|
|
57
|
+
"build:package": "npx tsx build-2-publish.ts",
|
|
58
|
+
"publish:package": "npx tsx publish.ts",
|
|
59
|
+
"publish:all": "npx tsx publish-all.ts"
|
|
57
60
|
},
|
|
58
61
|
"dependencies": {
|
|
59
62
|
"@solana/web3.js": "^1.98.4",
|
|
@@ -97,5 +100,8 @@
|
|
|
97
100
|
"module": "./dist/chat-widget.es.js",
|
|
98
101
|
"sideEffects": [
|
|
99
102
|
"**/*.css"
|
|
100
|
-
]
|
|
101
|
-
|
|
103
|
+
],
|
|
104
|
+
"resolutions": {
|
|
105
|
+
"@noble/hashes": "1.8.0"
|
|
106
|
+
}
|
|
107
|
+
}
|