hanc-webrtc-widgets 1.4.2 → 2.0.1
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 +194 -0
- package/dist/hanc-webrtc-widgets.es.js +7538 -5091
- package/dist/hanc-webrtc-widgets.umd.js +352 -295
- package/dist/src/components/floating-call/floating-call.d.ts +42 -0
- package/dist/src/components/floating-call/styles.d.ts +5 -0
- package/dist/src/components/inline-call/inline-call.d.ts +35 -0
- package/dist/src/core/color-utils.d.ts +2 -0
- package/dist/src/renderers/base-renderer.d.ts +82 -0
- package/dist/src/renderers/index.d.ts +12 -0
- package/dist/src/renderers/liquid-glass-renderer.d.ts +19 -0
- package/dist/src/renderers/morphing-blob-renderer.d.ts +23 -0
- package/dist/src/renderers/neural-liquid-renderer.d.ts +20 -0
- package/dist/src/renderers/neural-network-renderer.d.ts +17 -0
- package/dist/src/renderers/organic-sphere-renderer.d.ts +16 -0
- package/dist/src/themes/index.d.ts +1 -0
- package/dist/src/themes/presets.d.ts +50 -0
- package/dist/src/themes/theme-vars.d.ts +2 -0
- package/dist/src/types/config.d.ts +186 -0
- package/dist/src/types/index.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -153,6 +153,15 @@ An “inline” widget that you embed directly in page content (often as a hero
|
|
|
153
153
|
| `agent-id` (required) | string | Agent ID for Twilio calls |
|
|
154
154
|
| `button-start-text` | string | Custom start button text (default: `Start Call with ai`) |
|
|
155
155
|
| `button-connecting-text` | string | Custom connecting button text (default: `Connecting...`) |
|
|
156
|
+
| `button-end-text` | string | End button text (default: `End call`) |
|
|
157
|
+
| `hide-button` | bool | Hide the button (orb click still toggles the call) |
|
|
158
|
+
| `button-position` | string | Button placement: `top` or `bottom` |
|
|
159
|
+
| `orb-color` | string | Base orb color in idle state |
|
|
160
|
+
| `active-orb-color` | string | Orb color applied when the call becomes active |
|
|
161
|
+
| `button-color` | string | Base button color (also used to derive hover/active) |
|
|
162
|
+
| `button-hover-color` | string | Button hover color override |
|
|
163
|
+
| `button-active-color` | string | Button active color override |
|
|
164
|
+
| `button-text-color` | string | Button text color |
|
|
156
165
|
|
|
157
166
|
#### Available Events:
|
|
158
167
|
|
|
@@ -199,6 +208,183 @@ An “inline” widget that you embed directly in page content (often as a hero
|
|
|
199
208
|
</style>
|
|
200
209
|
```
|
|
201
210
|
|
|
211
|
+
## Additional customization options (append-only)
|
|
212
|
+
|
|
213
|
+
Below are the new properties and examples you can add to the widgets.
|
|
214
|
+
|
|
215
|
+
### Theme and visual style
|
|
216
|
+
|
|
217
|
+
Themes: `liquid-purple` , `liquid-cyan`, `liquid-pink`, `neural-green`,
|
|
218
|
+
`neural-blue`(default), `orbit-blue`, `synaptic-purple`, `minimal-dark`, `minimal-light`, `custom`.
|
|
219
|
+
|
|
220
|
+
Visual styles: `liquid-glass` , `liquid-glass-premium`, `neural-liquid`,
|
|
221
|
+
`neural-orbit`, `neural-network`(default), `synaptic-core`, `organic-sphere`, `morphing-blob`.
|
|
222
|
+
|
|
223
|
+
```html
|
|
224
|
+
<hanc-ai-inline-call
|
|
225
|
+
agent-id="YOUR_AGENT_ID"
|
|
226
|
+
theme="liquid-cyan"
|
|
227
|
+
visual-style="neural-liquid"
|
|
228
|
+
orb-size="200"
|
|
229
|
+
></hanc-ai-inline-call>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Inline widget new attributes
|
|
233
|
+
|
|
234
|
+
- `voice-service-url`
|
|
235
|
+
- `theme`
|
|
236
|
+
- `visual-style`
|
|
237
|
+
- `orb-size`
|
|
238
|
+
- `button-end-text`
|
|
239
|
+
- `hide-button`
|
|
240
|
+
- `button-position`
|
|
241
|
+
- `orb-color`
|
|
242
|
+
- `active-orb-color`
|
|
243
|
+
- `button-color`
|
|
244
|
+
- `button-hover-color`
|
|
245
|
+
- `button-active-color`
|
|
246
|
+
- `button-text-color`
|
|
247
|
+
|
|
248
|
+
```html
|
|
249
|
+
<hanc-ai-inline-call
|
|
250
|
+
agent-id="YOUR_AGENT_ID"
|
|
251
|
+
voice-service-url="https://voice.example.com"
|
|
252
|
+
theme="minimal-light"
|
|
253
|
+
visual-style="morphing-blob"
|
|
254
|
+
orb-size="220"
|
|
255
|
+
button-end-text="Stop"
|
|
256
|
+
></hanc-ai-inline-call>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Floating widget new attributes
|
|
260
|
+
|
|
261
|
+
- `voice-service-url`
|
|
262
|
+
- `theme`
|
|
263
|
+
- `visual-style`
|
|
264
|
+
- `position`
|
|
265
|
+
- `offset-x`
|
|
266
|
+
- `offset-y`
|
|
267
|
+
- `orb-size`
|
|
268
|
+
- `hide-button`
|
|
269
|
+
- `button-position`
|
|
270
|
+
- `orb-color`
|
|
271
|
+
- `active-orb-color`
|
|
272
|
+
- `button-color`
|
|
273
|
+
- `button-hover-color`
|
|
274
|
+
- `button-active-color`
|
|
275
|
+
- `button-text-color`
|
|
276
|
+
- `minimized`
|
|
277
|
+
|
|
278
|
+
```html
|
|
279
|
+
<hanc-ai-floating-call
|
|
280
|
+
agent-id="YOUR_AGENT_ID"
|
|
281
|
+
voice-service-url="https://voice.example.com"
|
|
282
|
+
theme="neural-green"
|
|
283
|
+
visual-style="neural-network"
|
|
284
|
+
position="top-left"
|
|
285
|
+
offset-x="32"
|
|
286
|
+
offset-y="32"
|
|
287
|
+
orb-size="140"
|
|
288
|
+
minimized
|
|
289
|
+
></hanc-ai-floating-call>
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### CSS variables (when using theme="custom")
|
|
293
|
+
|
|
294
|
+
```css
|
|
295
|
+
hanc-ai-inline-call {
|
|
296
|
+
--hanc-button: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 100%);
|
|
297
|
+
--hanc-button-hover: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
|
|
298
|
+
--hanc-button-active: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
|
|
299
|
+
--hanc-button-text: #ffffff;
|
|
300
|
+
--hanc-button-radius: 16px;
|
|
301
|
+
--hanc-button-shadow: rgba(14, 165, 233, 0.35);
|
|
302
|
+
--hanc-button-shadow-hover: rgba(14, 165, 233, 0.45);
|
|
303
|
+
--hanc-button-shadow-active: rgba(239, 68, 68, 0.45);
|
|
304
|
+
--hanc-orb-active-glow: rgba(14, 165, 233, 0.35);
|
|
305
|
+
--hanc-orb-z-index: 10000;
|
|
306
|
+
--hanc-widget-z-index: 9999;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
hanc-ai-floating-call {
|
|
310
|
+
--hanc-background: rgba(10, 10, 20, 0.9);
|
|
311
|
+
--hanc-glow-shadow: rgba(14, 165, 233, 0.2);
|
|
312
|
+
--hanc-orb-size: 140px;
|
|
313
|
+
--hanc-orb-active-glow: rgba(14, 165, 233, 0.35);
|
|
314
|
+
--hanc-orb-z-index: 10000;
|
|
315
|
+
--hanc-widget-z-index: 9999;
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
#### Custom theme examples
|
|
320
|
+
|
|
321
|
+
Tip: set `theme="custom"` and override only the variables you need. All other values fall back to defaults.
|
|
322
|
+
|
|
323
|
+
```html
|
|
324
|
+
<hanc-ai-inline-call
|
|
325
|
+
agent-id="YOUR_AGENT_ID"
|
|
326
|
+
theme="custom"
|
|
327
|
+
visual-style="neural-network"
|
|
328
|
+
active-orb-color="#22c55e"
|
|
329
|
+
></hanc-ai-inline-call>
|
|
330
|
+
|
|
331
|
+
<style>
|
|
332
|
+
hanc-ai-inline-call {
|
|
333
|
+
--hanc-background: rgba(10, 15, 20, 0.8);
|
|
334
|
+
--hanc-orb-size: 220px;
|
|
335
|
+
--hanc-button: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
|
|
336
|
+
--hanc-button-hover: linear-gradient(135deg, #0284c7 0%, #16a34a 100%);
|
|
337
|
+
--hanc-button-active: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
|
|
338
|
+
--hanc-button-text: #ffffff;
|
|
339
|
+
--hanc-orb-active-glow: rgba(34, 197, 94, 0.4);
|
|
340
|
+
}
|
|
341
|
+
</style>
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
```html
|
|
345
|
+
<hanc-ai-inline-call
|
|
346
|
+
agent-id="YOUR_AGENT_ID"
|
|
347
|
+
theme="custom"
|
|
348
|
+
visual-style="neural-orbit"
|
|
349
|
+
button-position="top"
|
|
350
|
+
></hanc-ai-inline-call>
|
|
351
|
+
|
|
352
|
+
<style>
|
|
353
|
+
hanc-ai-inline-call {
|
|
354
|
+
--hanc-orb-size: 260px;
|
|
355
|
+
--hanc-button-radius: 999px;
|
|
356
|
+
--hanc-button: linear-gradient(135deg, #111827 0%, #374151 100%);
|
|
357
|
+
--hanc-button-hover: linear-gradient(135deg, #1f2937 0%, #111827 100%);
|
|
358
|
+
--hanc-button-active: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
|
|
359
|
+
--hanc-button-text: #f9fafb;
|
|
360
|
+
--hanc-orb-active-glow: rgba(59, 130, 246, 0.35);
|
|
361
|
+
}
|
|
362
|
+
</style>
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
```html
|
|
366
|
+
<hanc-ai-floating-call
|
|
367
|
+
agent-id="YOUR_AGENT_ID"
|
|
368
|
+
theme="custom"
|
|
369
|
+
position="top-right"
|
|
370
|
+
button-position="top"
|
|
371
|
+
active-orb-color="#f97316"
|
|
372
|
+
></hanc-ai-floating-call>
|
|
373
|
+
|
|
374
|
+
<style>
|
|
375
|
+
hanc-ai-floating-call {
|
|
376
|
+
--hanc-background: rgba(255, 255, 255, 0.92);
|
|
377
|
+
--hanc-text: rgba(24, 24, 27, 0.8);
|
|
378
|
+
--hanc-glow-shadow: rgba(249, 115, 22, 0.2);
|
|
379
|
+
--hanc-orb-size: 120px;
|
|
380
|
+
--hanc-button: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
|
|
381
|
+
--hanc-button-hover: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
|
|
382
|
+
--hanc-button-active: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
|
|
383
|
+
--hanc-button-text: #ffffff;
|
|
384
|
+
}
|
|
385
|
+
</style>
|
|
386
|
+
```
|
|
387
|
+
|
|
202
388
|
---
|
|
203
389
|
|
|
204
390
|
### `<hanc-ai-floating-call>`
|
|
@@ -215,6 +401,14 @@ A persistent, docked widget that floats in the corner and launches the same voic
|
|
|
215
401
|
| `button-start-text` | string | Start button text (default: `Start Call with ai`) |
|
|
216
402
|
| `button-connecting-text` | string | Custom connecting button text (default: `Connecting...`) |
|
|
217
403
|
| `button-end-text` | string | End button text (default: `End call`) |
|
|
404
|
+
| `hide-button` | bool | Hide the button (orb click still toggles the call) |
|
|
405
|
+
| `button-position` | string | Button placement: `top` or `bottom` |
|
|
406
|
+
| `orb-color` | string | Base orb color in idle state |
|
|
407
|
+
| `active-orb-color` | string | Orb color applied when the call becomes active |
|
|
408
|
+
| `button-color` | string | Base button color (also used to derive hover/active) |
|
|
409
|
+
| `button-hover-color` | string | Button hover color override |
|
|
410
|
+
| `button-active-color` | string | Button active color override |
|
|
411
|
+
| `button-text-color` | string | Button text color |
|
|
218
412
|
|
|
219
413
|
#### Available Events:
|
|
220
414
|
|