@wakz/chat-widget 1.0.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 +71 -0
- package/index.js +1936 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# wakz-chat-widget
|
|
2
|
+
|
|
3
|
+
**Premium AI chat widget by WAKZ** — A production-grade, self-contained chat widget using Shadow DOM.
|
|
4
|
+
|
|
5
|
+
> Competes with Intercom & Crisp in quality. **Zero external dependencies** — pure vanilla JavaScript.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- Shadow DOM isolation (no CSS conflicts)
|
|
10
|
+
- Multi-language support (English, Arabic, French) with full RTL
|
|
11
|
+
- Device detection (model, platform, type)
|
|
12
|
+
- Online/offline status with animated indicators
|
|
13
|
+
- Message polling with deduplication
|
|
14
|
+
- Mobile responsive (full-screen on small devices)
|
|
15
|
+
- Typing indicator animations
|
|
16
|
+
- Welcome messages
|
|
17
|
+
- Human agent badge support
|
|
18
|
+
- Auto-resizing textarea input
|
|
19
|
+
- Keyboard shortcuts (Enter to send, Shift+Enter for newline, Escape to close)
|
|
20
|
+
- Smooth animations and transitions
|
|
21
|
+
- Configurable theming (colors, position)
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install wakz-chat-widget
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
Copy `index.js` from `node_modules/wakz-chat-widget/` to your public folder and include it:
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<script src="/wakz-widget.js"
|
|
35
|
+
data-api-key="YOUR_API_KEY"
|
|
36
|
+
data-server="https://your-server.com"
|
|
37
|
+
async>
|
|
38
|
+
</script>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Configuration
|
|
42
|
+
|
|
43
|
+
The widget fetches its configuration from your server's `/api/v1/embed/config` endpoint. Configurable options include:
|
|
44
|
+
|
|
45
|
+
| Option | Type | Default | Description |
|
|
46
|
+
|--------|------|---------|-------------|
|
|
47
|
+
| `botName` | string | `'WAKZ'` | Bot display name |
|
|
48
|
+
| `welcomeMessage` | string | `''` | Initial welcome message |
|
|
49
|
+
| `primaryColor` | string | `'#171717'` | Primary theme color |
|
|
50
|
+
| `chatBg` | string | `'#f8f9fa'` | Chat area background |
|
|
51
|
+
| `btnColor` | string | `'#171717'` | FAB button color |
|
|
52
|
+
| `widgetBg` | string | `'#ffffff'` | Widget background |
|
|
53
|
+
| `position` | string | `'bottom-right'` | Widget position |
|
|
54
|
+
| `language` | string | `'en'` | Language (`en`, `ar`, `fr`) |
|
|
55
|
+
| `showStatus` | boolean | `true` | Show online/offline dot |
|
|
56
|
+
| `online` | boolean | `true` | Initial status |
|
|
57
|
+
|
|
58
|
+
## Version History
|
|
59
|
+
|
|
60
|
+
### v2.2.0
|
|
61
|
+
- Added device model, platform, and type detection (User-Agent Client Hints API + UA fallback)
|
|
62
|
+
- Device info sent with session data for dashboard analytics
|
|
63
|
+
|
|
64
|
+
### v2.0.0
|
|
65
|
+
- Complete rewrite with Shadow DOM architecture
|
|
66
|
+
- Multi-language support (EN/AR/FR) with RTL
|
|
67
|
+
- Production-grade UI with animations
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|