@kaifusion/widget 1.0.2 → 1.0.4
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 +10 -8
- package/dist/KaiChatWidget.d.ts +2 -1
- package/dist/index.es.js +1530 -1529
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/KaiChatWidget.tsx +4 -2
package/README.md
CHANGED
|
@@ -49,6 +49,7 @@ function App() {
|
|
|
49
49
|
title="KAI Assistant" // (Optional) Widget title
|
|
50
50
|
position="right" // (Optional) 'left' or 'right'
|
|
51
51
|
color="#526cfe" // (Optional) Main theme color hex code
|
|
52
|
+
icon={"💬"} // (Optional) Custom icon for the toggle button
|
|
52
53
|
/>
|
|
53
54
|
</div>
|
|
54
55
|
);
|
|
@@ -59,11 +60,12 @@ export default App;
|
|
|
59
60
|
|
|
60
61
|
## Props
|
|
61
62
|
|
|
62
|
-
| Prop | Type | Required | Default
|
|
63
|
-
| ------------ | ------------------- | -------- |
|
|
64
|
-
| `targetUrl` | `string` | **Yes** | -
|
|
65
|
-
| `workflowId` | `string` | **Yes** | -
|
|
66
|
-
| `authToken` | `string` | **Yes** | -
|
|
67
|
-
| `title` | `string` | No | `"ChatBot"`
|
|
68
|
-
| `position` | `"left" \| "right"` | No | `"right"`
|
|
69
|
-
| `color` | `string` | No | `"#526cfe"`
|
|
63
|
+
| Prop | Type | Required | Default | Description |
|
|
64
|
+
| ------------ | ------------------- | -------- | --------------- | ---------------------------------------------------------------------------- |
|
|
65
|
+
| `targetUrl` | `string` | **Yes** | - | The address of the KAI Fusion backend API (e.g., `https://api.example.com`). |
|
|
66
|
+
| `workflowId` | `string` | **Yes** | - | Unique identifier (UUID) of the workflow to run. |
|
|
67
|
+
| `authToken` | `string` | **Yes** | - | Bearer token or API Key for API access. |
|
|
68
|
+
| `title` | `string` | No | `"ChatBot"` | Title of the widget window. |
|
|
69
|
+
| `position` | `"left" \| "right"` | No | `"right"` | Position of the widget on the screen (bottom-left or bottom-right). |
|
|
70
|
+
| `color` | `string` | No | `"#526cfe"` | Main theme color of the widget (Hex code). |
|
|
71
|
+
| `icon` | `ReactNode` | No | `MessageSquare` | Custom icon for the toggle button. |
|
package/dist/KaiChatWidget.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export interface KaiChatWidgetProps {
|
|
|
5
5
|
targetUrl: string;
|
|
6
6
|
position?: "left" | "right";
|
|
7
7
|
color?: string;
|
|
8
|
+
icon?: React.ReactNode;
|
|
8
9
|
}
|
|
9
|
-
export default function KaiChatWidget({ authToken, workflowId, title, targetUrl, position, color, }: KaiChatWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default function KaiChatWidget({ authToken, workflowId, title, targetUrl, position, color, icon, }: KaiChatWidgetProps): import("react/jsx-runtime").JSX.Element;
|