wakz-chat-widget 4.0.1 → 4.0.2

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.
Files changed (2) hide show
  1. package/index.js +34 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * WAKZ Chat Widget v4.0.0
2
+ * WAKZ Chat Widget v4.0.2
3
3
  * ─────────────────────────────────────────────────────────────────
4
4
  * A production-grade, self-contained chat widget using Shadow DOM.
5
5
  * Liquid Glass design — pill header, floating input, dark user bubbles.
@@ -146,7 +146,13 @@
146
146
  close:
147
147
  '<svg width="14" height="14" viewBox="0 0 24 24" fill="none"><line x1="18" y1="6" x2="6" y2="18" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/><line x1="6" y1="6" x2="18" y2="18" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/></svg>',
148
148
  error:
149
- '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>'
149
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>',
150
+ message:
151
+ '<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M7.9 20A9 9 0 1 0 4 16.1L2 22z"/></svg>',
152
+ whatsapp:
153
+ '<svg width="26" height="26" viewBox="0 0 24 24" fill="currentColor"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/></svg>',
154
+ headset:
155
+ '<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 18v-6a9 9 0 0 1 18 0v6"/><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3ZM3 19a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H5"/></svg>'
150
156
  };
151
157
 
152
158
  /* ════════════════════════════════════════════════════════════════
@@ -1004,6 +1010,28 @@
1004
1010
  ' border-bottom-right-radius: 4px;',
1005
1011
  '}',
1006
1012
 
1013
+ /* ══════════════════════════════════════════════════
1014
+ FULLSCREEN MODE — overrides window to fill viewport
1015
+ ══════════════════════════════════════════════════ */
1016
+ '.wakz-mode-fullscreen {',
1017
+ ' width: 100vw !important;',
1018
+ ' height: 100vh !important;',
1019
+ ' max-width: 100vw !important;',
1020
+ ' max-height: 100vh !important;',
1021
+ ' top: 0 !important;',
1022
+ ' left: 0 !important;',
1023
+ ' transform: none !important;',
1024
+ ' border-radius: 0 !important;',
1025
+ ' box-shadow: none !important;',
1026
+ '}',
1027
+ '.wakz-mode-fullscreen.wakz-visible {',
1028
+ ' transform: none !important;',
1029
+ '}',
1030
+ /* Hide overlay in fullscreen mode — not needed */
1031
+ '.wakz-mode-fullscreen ~ .wakz-overlay {',
1032
+ ' display: none !important;',
1033
+ '}',
1034
+
1007
1035
  /* ══════════════════════════════════════════════════
1008
1036
  RESPONSIVE
1009
1037
  ══════════════════════════════════════════════════ */
@@ -1395,10 +1423,11 @@
1395
1423
 
1396
1424
  /* ── FAB Icon ── */
1397
1425
  var iconKey = cfg.fabIcon || 'chat';
1398
- if (iconKey === 'chat') {
1399
- self._toggleBtn.innerHTML = _ICONS.chatBubble;
1400
- } else if (_ICONS[iconKey]) {
1426
+ if (iconKey === 'chatBubble') iconKey = 'chat';
1427
+ if (_ICONS[iconKey]) {
1401
1428
  self._toggleBtn.innerHTML = _ICONS[iconKey];
1429
+ } else {
1430
+ self._toggleBtn.innerHTML = _ICONS.chatBubble;
1402
1431
  }
1403
1432
  /* Re-append status dot after innerHTML change */
1404
1433
  if (self._statusDot && self._statusDot.parentNode !== self._toggleBtn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wakz-chat-widget",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "WAKZ Chat Widget — Liquid Glass design with Shadow DOM isolation, CSS Variables, Data-Driven customization, zero dependencies.",
5
5
  "main": "index.js",
6
6
  "scripts": {