@streamoji/avatar-widget 0.3.8 → 0.3.9

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
@@ -15,6 +15,20 @@ export interface AvatarWidgetProps {
15
15
  avatarGender?: "male" | "female";
16
16
  /** Optional user details to identify logged-in users and skip lead capture. */
17
17
  presetUserDetails?: UserDetails;
18
+ /** Callback triggered when the avatar is ready, providing action functions. */
19
+ onAvatarReady?: (actions: {
20
+ avatarSpeak: (
21
+ text: string,
22
+ userQuery: string,
23
+ llmPrompt: string
24
+ ) => Promise<void>;
25
+ avatarRespond: (
26
+ userQuery: string,
27
+ llmPrompt: string,
28
+ knowledge: string,
29
+ history: any[]
30
+ ) => Promise<void>;
31
+ }) => void;
18
32
  }
19
33
 
20
34
  declare const AvatarWidget: (props: AvatarWidgetProps) => ReactElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoji/avatar-widget",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Plug-and-play React avatar widget for token-based AI conversations.",
5
5
  "type": "module",
6
6
  "main": "./dist/avatar-widget.cjs",