@myned-ai/avatar-chat-widget 0.7.0 → 0.9.0

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 CHANGED
@@ -4,6 +4,17 @@
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@myned-ai/avatar-chat-widget.svg)](https://www.npmjs.com/package/@myned-ai/avatar-chat-widget)
6
6
 
7
+ > **Next-Gen Engagement:** Replace static chatbots with a living, breathing 3D avatar that talks to your visitors.
8
+
9
+ ## ✨ Features
10
+
11
+ - **Hyper-Realistic 3D Avatars**: Powered by **3D Gaussian Splatting** for cinematic visual fidelity directly in the browser.
12
+ - **Precise Lip-Sync**: Animation tightly synchronized with audio for a lifelike experience.
13
+ - **Natural Voice Interaction**: Full duplex voice chat with echo cancellation and noise suppression.
14
+ - **Zero-Conflict styles**: Fully encapsulated using **Shadow DOM** – never breaks your site's layout.
15
+ - **Smart Loading**: Lazy-loaded 3D engine ensures your initial page load remains instant.
16
+ - **100% Customizable**: Change suggestions, colors, and behaviors via simple config.
17
+
7
18
  ---
8
19
 
9
20
  ## Quick Start
@@ -41,7 +52,6 @@ import '@myned-ai/avatar-chat-widget/style.css';
41
52
  const chat = AvatarChat.init({
42
53
  container: '#avatar-chat',
43
54
  serverUrl: 'wss://your-backend-server.com/ws',
44
- theme: 'dark',
45
55
  onReady: () => console.log('Widget ready!'),
46
56
  onMessage: (msg) => console.log('Message:', msg)
47
57
  });
@@ -62,15 +72,19 @@ chat.destroy(); // Cleanup
62
72
  | `container` | `string \| HTMLElement` | **required** | CSS selector or DOM element |
63
73
  | `serverUrl` | `string` | **required** | WebSocket server URL (ws:// or wss://) |
64
74
  | `position` | `string` | `'bottom-right'` | `bottom-right`, `bottom-left`, `top-right`, `top-left`, `inline` |
75
+ | `primaryColor` | `string` | `'#4B4ACF'` | Main brand color (hex, rgb, etc) |
76
+ | `suggestions` | `string[]` | `['...']` | Array of quick-reply suggestions |
65
77
  | `startCollapsed` | `boolean` | `true` | Start minimized as bubble |
78
+ | `tooltipText` | `string` | `'Hi! 👋...'` | Text shown on bubble hover |
66
79
  | `width` | `number` | `380` | Widget width (200-2000px) |
67
80
  | `height` | `number` | `550` | Widget height (300-2000px) |
68
81
  | `enableVoice` | `boolean` | `true` | Enable voice chat |
69
82
  | `enableText` | `boolean` | `true` | Enable text chat |
70
- | `logLevel` | `string` | `'error'` | `none`, `error`, `warn`, `info`, `debug` |
71
- | `customStyles` | `string` | `undefined` | Custom CSS to inject into Shadow DOM |
72
- | `authEnabled` | `boolean` | `true` | Enable HMAC authentication (disable for dev) |
83
+ | `authEnabled` | `boolean` | `false` | Enable HMAC authentication |
73
84
  | `avatarUrl` | `string` | auto-detected | URL to avatar ZIP file |
85
+ | `assetsBaseUrl` | `string` | auto-detected | Base URL for worklet/assets |
86
+ | `customStyles` | `string` | `undefined` | Custom CSS to inject into Shadow DOM |
87
+ | `logLevel` | `string` | `'error'` | `none`, `error`, `warn`, `info`, `debug` |
74
88
 
75
89
  ### Callbacks
76
90
 
@@ -85,9 +99,22 @@ chat.destroy(); // Cleanup
85
99
 
86
100
  ## Customization
87
101
 
88
- ### Changing Colors
102
+ ### Quick Branding
89
103
 
90
- The widget uses CSS variables that you can override with the `customStyles` option:
104
+ For simple color matching, use the `primaryColor` option:
105
+
106
+ ```typescript
107
+ AvatarChat.init({
108
+ container: '#avatar-chat',
109
+ serverUrl: 'wss://...',
110
+ primaryColor: '#FF5722', // Match your brand
111
+ secondaryColor: '#37474F'
112
+ });
113
+ ```
114
+
115
+ ### Advanced Styling
116
+
117
+ For deeper customization, use the `customStyles` option to inject CSS directly into the widget's Shadow DOM:
91
118
 
92
119
  ```typescript
93
120
  AvatarChat.init({
@@ -226,23 +253,6 @@ docker-compose up
226
253
 
227
254
  Server runs on `ws://localhost:8765` by default.
228
255
 
229
- ---
230
-
231
- ## Browser Requirements
232
-
233
- **Supported browsers:**
234
- - Chrome/Edge 90+
235
- - Firefox 89+
236
- - Safari 15.2+
237
-
238
- **Production deployment:**
239
-
240
- For optimal performance, your server must send these headers to enable SharedArrayBuffer:
241
-
242
- ```
243
- Cross-Origin-Embedder-Policy: require-corp
244
- Cross-Origin-Opener-Policy: same-origin
245
- ```
246
256
 
247
257
  ---
248
258
 
Binary file