advanced-chat-kai 1.1.2 → 1.1.4

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
@@ -3,32 +3,33 @@
3
3
  <img alt="light" src="https://github.com/user-attachments/assets/c7efa2e4-c7f5-4a83-968c-cbc0b0fea91f" />
4
4
  <img alt="dark" src="https://github.com/user-attachments/assets/b547b8b6-2154-4334-8f5d-16fb2c8e264c"" />
5
5
 
6
- ![npm version](https://img.shields.io/npm/v/advanced-chat-kai) ![npm downloads](https://img.shields.io/npm/dm/advanced-chat-kai) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/advanced-chat-kai) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) [![codecov](https://codecov.io/gh/spider-hand/advanced-chat-kai/graph/badge.svg?token=ETHZJ2CTPF)](https://codecov.io/gh/spider-hand/advanced-chat-kai)
6
+ ![npm version](https://img.shields.io/npm/v/advanced-chat-kai) ![npm downloads](https://img.shields.io/npm/dm/advanced-chat-kai) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/advanced-chat-kai) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) [![codecov](https://codecov.io/gh/spider-hand/advanced-chat-kai/graph/badge.svg?token=ETHZJ2CTPF)](https://codecov.io/gh/spider-hand/advanced-chat-kai) ![Lit](https://img.shields.io/badge/lit-%23324FFF.svg?&logo=lit&logoColor=white)
7
7
 
8
- A highly customizable Web Component for building chat interfaces
8
+ A highly customizable chat Web Component that integrates easily with shadcn - works with any framework (React, Vue, Angular, Svelte, etc.)
9
9
 
10
- > "Kai" (改) means "improved" in Japanese - this is a modern, lightweight, and framework-agnostic chat component built for flexibility and ease of integration.
10
+ > "Kai" (改) means "improved" in Japanese - inspired by vue-advanced-chat, this project started with the goal of building an improved alternative.
11
11
 
12
12
  ## Features
13
13
 
14
- - Framework-agnostic - Can be used with any frontend framework or none at all
15
- - Backend-agnostic - No assumptions about your backend; integrate freely
16
- - Lightweight - Built with Lit for minimal bundle size and high performance
17
- - Logic-free - You own the data, state and behavior; components only handle UI
18
- - Theming support - Built-in light and dark themes
19
- - Customizable style - Easily style components with CSS variables
14
+ - **Framework-agnostic** - Can be used with any frontend framework
15
+ - **Backend-agnostic** - No assumptions about your backend
16
+ - **Lightweight** - Built with Lit for minimal bundle size and high performance
17
+ - **Logic-free** - Component handles only UI
18
+ - **Theming** - Light and dark themes with CSS variables, which is designed to be easily used with shadcn based UI
20
19
 
21
20
  ### Comparison
22
21
 
23
- | | Bundle size (minified) | Bundle size (minified + gzipped) | Download time (slow 3G) | Download time (4G) |
24
- | ------------------- | ---------------------- | -------------------------------- | ----------------------- | ------------------ |
25
- | `advanced-chat-kai` | 112.9kB | 23.2kB | 465ms | 27ms |
26
- | `vue-advanced-chat` | 493.4kB | 149.8kB | 3s | 171ms |
27
- | | 📦 **77% smaller** | 📦 **84% smaller** | ⚡️ **85% faster** | ⚡️ **84% faster** |
22
+ | | Bundle size (minified) | Bundle size (minified + gzipped) | Download time (slow 3G) | Download time (4G) |
23
+ | ----------------- | ---------------------- | -------------------------------- | ----------------------- | ------------------ |
24
+ | advanced-chat-kai | 112.9kB | 23.1kB | 465ms | 27ms |
25
+ | vue-advanced-chat | 493.4kB | 149.8kB | 3s | 171ms |
26
+ | | 📦 **77% smaller** | 📦 **84% smaller** | ⚡️ **85% faster** | ⚡️ **84% faster** |
28
27
 
29
28
  ## Demo
30
29
 
31
- Try it out [here](https://advanced-chat-kai-demo.pages.dev/).
30
+ 👉 [Storybook](https://main--6810a95e2c6e78e3e3be0658.chromatic.com)
31
+
32
+ 👉 [Live Chat Example](https://advanced-chat-kai-demo.pages.dev)
32
33
 
33
34
  ## Table of contents
34
35
 
@@ -382,6 +383,18 @@ CSS variable names are based on the [shadcn](https://ui.shadcn.com/docs/theming)
382
383
  | `--chat-spacing-6` | `1.5rem` |
383
384
  | `--chat-spacing-8` | `2rem` |
384
385
 
386
+ ### Shadow Variables
387
+
388
+ | Variable | Default |
389
+ | ------------------- | --------------------------------------------------------------------- |
390
+ | `--chat-shadow-2xs` | `0 1px rgb(0 0 0 / 0.05)` |
391
+ | `--chat-shadow-xs` | `0 1px 2px 0 rgb(0 0 0 / 0.05)` |
392
+ | `--chat-shadow-sm` | `0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)` |
393
+ | `--chat-shadow-md` | `0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)` |
394
+ | `--chat-shadow-lg` | `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
395
+ | `--chat-shadow-xl` | `0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)` |
396
+ | `--chat-shadow-2xl` | `0 25px 50px -12px rgb(0 0 0 / 0.25)` |
397
+
385
398
  ### Custom Variables
386
399
 
387
400
  | Variable | Description |
@@ -45,7 +45,7 @@ const _e = (i) => new Jt(typeof i == "string" ? i : i + "", void 0, wt), u = (i,
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: ye, defineProperty: xe, getOwnPropertyDescriptor: we, getOwnPropertyNames: $e, getOwnPropertySymbols: ke, getPrototypeOf: Ae } = Object, dt = globalThis, Ht = dt.trustedTypes, Me = Ht ? Ht.emptyScript : "", Ee = dt.reactiveElementPolyfillSupport, X = (i, t) => i, lt = { toAttribute(i, t) {
48
+ const { is: ye, defineProperty: xe, getOwnPropertyDescriptor: we, getOwnPropertyNames: $e, getOwnPropertySymbols: ke, getPrototypeOf: Ae } = Object, dt = globalThis, Ht = dt.trustedTypes, Me = Ht ? Ht.emptyScript : "", Ee = dt.reactiveElementPolyfillSupport, X = (i, t) => i, ht = { toAttribute(i, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
51
  i = i ? Me : null;
@@ -73,7 +73,7 @@ const { is: ye, defineProperty: xe, getOwnPropertyDescriptor: we, getOwnProperty
73
73
  }
74
74
  }
75
75
  return s;
76
- } }, $t = (i, t) => !ye(i, t), Dt = { attribute: !0, type: String, converter: lt, reflect: !1, useDefault: !1, hasChanged: $t };
76
+ } }, $t = (i, t) => !ye(i, t), Dt = { attribute: !0, type: String, converter: ht, reflect: !1, useDefault: !1, hasChanged: $t };
77
77
  Symbol.metadata ??= Symbol("metadata"), dt.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
78
  let N = class extends HTMLElement {
79
79
  static addInitializer(t) {
@@ -95,8 +95,8 @@ let N = class extends HTMLElement {
95
95
  this[s] = r;
96
96
  } };
97
97
  return { get: e, set(r) {
98
- const h = e?.call(this);
99
- a?.call(this, r), this.requestUpdate(t, h, o);
98
+ const l = e?.call(this);
99
+ a?.call(this, r), this.requestUpdate(t, l, o);
100
100
  }, configurable: !0, enumerable: !0 };
101
101
  }
102
102
  static getPropertyOptions(t) {
@@ -172,17 +172,17 @@ let N = class extends HTMLElement {
172
172
  _$ET(t, s) {
173
173
  const o = this.constructor.elementProperties.get(t), e = this.constructor._$Eu(t, o);
174
174
  if (e !== void 0 && o.reflect === !0) {
175
- const a = (o.converter?.toAttribute !== void 0 ? o.converter : lt).toAttribute(s, o.type);
175
+ const a = (o.converter?.toAttribute !== void 0 ? o.converter : ht).toAttribute(s, o.type);
176
176
  this._$Em = t, a == null ? this.removeAttribute(e) : this.setAttribute(e, a), this._$Em = null;
177
177
  }
178
178
  }
179
179
  _$AK(t, s) {
180
180
  const o = this.constructor, e = o._$Eh.get(t);
181
181
  if (e !== void 0 && this._$Em !== e) {
182
- const a = o.getPropertyOptions(e), r = typeof a.converter == "function" ? { fromAttribute: a.converter } : a.converter?.fromAttribute !== void 0 ? a.converter : lt;
182
+ const a = o.getPropertyOptions(e), r = typeof a.converter == "function" ? { fromAttribute: a.converter } : a.converter?.fromAttribute !== void 0 ? a.converter : ht;
183
183
  this._$Em = e;
184
- const h = r.fromAttribute(s, a.type);
185
- this[e] = h ?? this._$Ej?.get(e) ?? h, this._$Em = null;
184
+ const l = r.fromAttribute(s, a.type);
185
+ this[e] = l ?? this._$Ej?.get(e) ?? l, this._$Em = null;
186
186
  }
187
187
  }
188
188
  requestUpdate(t, s, o, e = !1, a) {
@@ -218,8 +218,8 @@ let N = class extends HTMLElement {
218
218
  }
219
219
  const o = this.constructor.elementProperties;
220
220
  if (o.size > 0) for (const [e, a] of o) {
221
- const { wrapped: r } = a, h = this[e];
222
- r !== !0 || this._$AL.has(e) || h === void 0 || this.C(e, void 0, a, h);
221
+ const { wrapped: r } = a, l = this[e];
222
+ r !== !0 || this._$AL.has(e) || l === void 0 || this.C(e, void 0, a, l);
223
223
  }
224
224
  }
225
225
  let t = !1;
@@ -262,9 +262,9 @@ N.elementStyles = [], N.shadowRootOptions = { mode: "open" }, N[X("elementProper
262
262
  * Copyright 2017 Google LLC
263
263
  * SPDX-License-Identifier: BSD-3-Clause
264
264
  */
265
- const kt = globalThis, Ft = (i) => i, ht = kt.trustedTypes, Vt = ht ? ht.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Qt = "$lit$", R = `lit$${Math.random().toFixed(9).slice(2)}$`, te = "?" + R, Ce = `<${te}>`, U = document, Z = () => U.createComment(""), J = (i) => i === null || typeof i != "object" && typeof i != "function", At = Array.isArray, je = (i) => At(i) || typeof i?.[Symbol.iterator] == "function", _t = `[
265
+ const kt = globalThis, Ft = (i) => i, lt = kt.trustedTypes, Vt = lt ? lt.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Qt = "$lit$", R = `lit$${Math.random().toFixed(9).slice(2)}$`, te = "?" + R, Ce = `<${te}>`, U = document, Z = () => U.createComment(""), J = (i) => i === null || typeof i != "object" && typeof i != "function", At = Array.isArray, je = (i) => At(i) || typeof i?.[Symbol.iterator] == "function", _t = `[
266
266
  \f\r]`, G = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, qt = /-->/g, Wt = />/g, O = RegExp(`>|${_t}(?:([^\\s"'>=/]+)(${_t}*=${_t}*(?:[^
267
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Kt = /'/g, Gt = /"/g, ee = /^(?:script|style|textarea|title)$/i, Se = (i) => (t, ...s) => ({ _$litType$: i, strings: t, values: s }), c = Se(1), C = Symbol.for("lit-noChange"), l = Symbol.for("lit-nothing"), Xt = /* @__PURE__ */ new WeakMap(), I = U.createTreeWalker(U, 129);
267
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Kt = /'/g, Gt = /"/g, ee = /^(?:script|style|textarea|title)$/i, Se = (i) => (t, ...s) => ({ _$litType$: i, strings: t, values: s }), c = Se(1), C = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), Xt = /* @__PURE__ */ new WeakMap(), I = U.createTreeWalker(U, 129);
268
268
  function se(i, t) {
269
269
  if (!At(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
270
  return Vt !== void 0 ? Vt.createHTML(t) : t;
@@ -272,12 +272,12 @@ function se(i, t) {
272
272
  const Te = (i, t) => {
273
273
  const s = i.length - 1, o = [];
274
274
  let e, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = G;
275
- for (let h = 0; h < s; h++) {
276
- const d = i[h];
275
+ for (let l = 0; l < s; l++) {
276
+ const d = i[l];
277
277
  let y, $, f = -1, E = 0;
278
278
  for (; E < d.length && (r.lastIndex = E, $ = r.exec(d), $ !== null); ) E = r.lastIndex, r === G ? $[1] === "!--" ? r = qt : $[1] !== void 0 ? r = Wt : $[2] !== void 0 ? (ee.test($[2]) && (e = RegExp("</" + $[2], "g")), r = O) : $[3] !== void 0 && (r = O) : r === O ? $[0] === ">" ? (r = e ?? G, f = -1) : $[1] === void 0 ? f = -2 : (f = r.lastIndex - $[2].length, y = $[1], r = $[3] === void 0 ? O : $[3] === '"' ? Gt : Kt) : r === Gt || r === Kt ? r = O : r === qt || r === Wt ? r = G : (r = O, e = void 0);
279
- const L = r === O && i[h + 1].startsWith("/>") ? " " : "";
280
- a += r === G ? d + Ce : f >= 0 ? (o.push(y), d.slice(0, f) + Qt + d.slice(f) + R + L) : d + R + (f === -2 ? h : L);
279
+ const L = r === O && i[l + 1].startsWith("/>") ? " " : "";
280
+ a += r === G ? d + Ce : f >= 0 ? (o.push(y), d.slice(0, f) + Qt + d.slice(f) + R + L) : d + R + (f === -2 ? l : L);
281
281
  }
282
282
  return [se(i, a + (i[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), o];
283
283
  };
@@ -286,12 +286,12 @@ class Q {
286
286
  let e;
287
287
  this.parts = [];
288
288
  let a = 0, r = 0;
289
- const h = t.length - 1, d = this.parts, [y, $] = Te(t, s);
289
+ const l = t.length - 1, d = this.parts, [y, $] = Te(t, s);
290
290
  if (this.el = Q.createElement(y, o), I.currentNode = this.el.content, s === 2 || s === 3) {
291
291
  const f = this.el.content.firstChild;
292
292
  f.replaceWith(...f.childNodes);
293
293
  }
294
- for (; (e = I.nextNode()) !== null && d.length < h; ) {
294
+ for (; (e = I.nextNode()) !== null && d.length < l; ) {
295
295
  if (e.nodeType === 1) {
296
296
  if (e.hasAttributes()) for (const f of e.getAttributeNames()) if (f.endsWith(Qt)) {
297
297
  const E = $[r++], L = e.getAttribute(f).split(R), nt = /([.?@])?(.*)/.exec(E);
@@ -300,7 +300,7 @@ class Q {
300
300
  if (ee.test(e.tagName)) {
301
301
  const f = e.textContent.split(R), E = f.length - 1;
302
302
  if (E > 0) {
303
- e.textContent = ht ? ht.emptyScript : "";
303
+ e.textContent = lt ? lt.emptyScript : "";
304
304
  for (let L = 0; L < E; L++) e.append(f[L], Z()), I.nextNode(), d.push({ type: 2, index: ++a });
305
305
  e.append(f[E], Z());
306
306
  }
@@ -337,11 +337,11 @@ class Le {
337
337
  u(t) {
338
338
  const { el: { content: s }, parts: o } = this._$AD, e = (t?.creationScope ?? U).importNode(s, !0);
339
339
  I.currentNode = e;
340
- let a = I.nextNode(), r = 0, h = 0, d = o[0];
340
+ let a = I.nextNode(), r = 0, l = 0, d = o[0];
341
341
  for (; d !== void 0; ) {
342
342
  if (r === d.index) {
343
343
  let y;
344
- d.type === 2 ? y = new tt(a, a.nextSibling, this, t) : d.type === 1 ? y = new d.ctor(a, d.name, d.strings, this, t) : d.type === 6 && (y = new Oe(a, this, t)), this._$AV.push(y), d = o[++h];
344
+ d.type === 2 ? y = new tt(a, a.nextSibling, this, t) : d.type === 1 ? y = new d.ctor(a, d.name, d.strings, this, t) : d.type === 6 && (y = new Oe(a, this, t)), this._$AV.push(y), d = o[++l];
345
345
  }
346
346
  r !== d?.index && (a = I.nextNode(), r++);
347
347
  }
@@ -357,7 +357,7 @@ class tt {
357
357
  return this._$AM?._$AU ?? this._$Cv;
358
358
  }
359
359
  constructor(t, s, o, e) {
360
- this.type = 2, this._$AH = l, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = o, this.options = e, this._$Cv = e?.isConnected ?? !0;
360
+ this.type = 2, this._$AH = h, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = o, this.options = e, this._$Cv = e?.isConnected ?? !0;
361
361
  }
362
362
  get parentNode() {
363
363
  let t = this._$AA.parentNode;
@@ -371,7 +371,7 @@ class tt {
371
371
  return this._$AB;
372
372
  }
373
373
  _$AI(t, s = this) {
374
- t = H(this, t, s), J(t) ? t === l || t == null || t === "" ? (this._$AH !== l && this._$AR(), this._$AH = l) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : je(t) ? this.k(t) : this._(t);
374
+ t = H(this, t, s), J(t) ? t === h || t == null || t === "" ? (this._$AH !== h && this._$AR(), this._$AH = h) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : je(t) ? this.k(t) : this._(t);
375
375
  }
376
376
  O(t) {
377
377
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -380,7 +380,7 @@ class tt {
380
380
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
381
381
  }
382
382
  _(t) {
383
- this._$AH !== l && J(this._$AH) ? this._$AA.nextSibling.data = t : this.T(U.createTextNode(t)), this._$AH = t;
383
+ this._$AH !== h && J(this._$AH) ? this._$AA.nextSibling.data = t : this.T(U.createTextNode(t)), this._$AH = t;
384
384
  }
385
385
  $(t) {
386
386
  const { values: s, _$litType$: o } = t, e = typeof o == "number" ? this._$AC(t) : (o.el === void 0 && (o.el = Q.createElement(se(o.h, o.h[0]), this.options)), o);
@@ -419,21 +419,21 @@ class pt {
419
419
  return this._$AM._$AU;
420
420
  }
421
421
  constructor(t, s, o, e, a) {
422
- this.type = 1, this._$AH = l, this._$AN = void 0, this.element = t, this.name = s, this._$AM = e, this.options = a, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = l;
422
+ this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = s, this._$AM = e, this.options = a, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = h;
423
423
  }
424
424
  _$AI(t, s = this, o, e) {
425
425
  const a = this.strings;
426
426
  let r = !1;
427
427
  if (a === void 0) t = H(this, t, s, 0), r = !J(t) || t !== this._$AH && t !== C, r && (this._$AH = t);
428
428
  else {
429
- const h = t;
429
+ const l = t;
430
430
  let d, y;
431
- for (t = a[0], d = 0; d < a.length - 1; d++) y = H(this, h[o + d], s, d), y === C && (y = this._$AH[d]), r ||= !J(y) || y !== this._$AH[d], y === l ? t = l : t !== l && (t += (y ?? "") + a[d + 1]), this._$AH[d] = y;
431
+ for (t = a[0], d = 0; d < a.length - 1; d++) y = H(this, l[o + d], s, d), y === C && (y = this._$AH[d]), r ||= !J(y) || y !== this._$AH[d], y === h ? t = h : t !== h && (t += (y ?? "") + a[d + 1]), this._$AH[d] = y;
432
432
  }
433
433
  r && !e && this.j(t);
434
434
  }
435
435
  j(t) {
436
- t === l ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
436
+ t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
437
437
  }
438
438
  }
439
439
  class Re extends pt {
@@ -441,7 +441,7 @@ class Re extends pt {
441
441
  super(...arguments), this.type = 3;
442
442
  }
443
443
  j(t) {
444
- this.element[this.name] = t === l ? void 0 : t;
444
+ this.element[this.name] = t === h ? void 0 : t;
445
445
  }
446
446
  }
447
447
  class Pe extends pt {
@@ -449,7 +449,7 @@ class Pe extends pt {
449
449
  super(...arguments), this.type = 4;
450
450
  }
451
451
  j(t) {
452
- this.element.toggleAttribute(this.name, !!t && t !== l);
452
+ this.element.toggleAttribute(this.name, !!t && t !== h);
453
453
  }
454
454
  }
455
455
  class Be extends pt {
@@ -457,8 +457,8 @@ class Be extends pt {
457
457
  super(t, s, o, e, a), this.type = 5;
458
458
  }
459
459
  _$AI(t, s = this) {
460
- if ((t = H(this, t, s, 0) ?? l) === C) return;
461
- const o = this._$AH, e = t === l && o !== l || t.capture !== o.capture || t.once !== o.once || t.passive !== o.passive, a = t !== l && (o === l || e);
460
+ if ((t = H(this, t, s, 0) ?? h) === C) return;
461
+ const o = this._$AH, e = t === h && o !== h || t.capture !== o.capture || t.once !== o.once || t.passive !== o.passive, a = t !== h && (o === h || e);
462
462
  e && this.element.removeEventListener(this.name, this, o), a && this.element.addEventListener(this.name, this, t), this._$AH = t;
463
463
  }
464
464
  handleEvent(t) {
@@ -524,23 +524,23 @@ ze?.({ LitElement: m });
524
524
  * Copyright 2017 Google LLC
525
525
  * SPDX-License-Identifier: BSD-3-Clause
526
526
  */
527
- const Ne = { attribute: !0, type: String, converter: lt, reflect: !1, hasChanged: $t }, He = (i = Ne, t, s) => {
527
+ const Ne = { attribute: !0, type: String, converter: ht, reflect: !1, hasChanged: $t }, He = (i = Ne, t, s) => {
528
528
  const { kind: o, metadata: e } = s;
529
529
  let a = globalThis.litPropertyMetadata.get(e);
530
530
  if (a === void 0 && globalThis.litPropertyMetadata.set(e, a = /* @__PURE__ */ new Map()), o === "setter" && ((i = Object.create(i)).wrapped = !0), a.set(s.name, i), o === "accessor") {
531
531
  const { name: r } = s;
532
- return { set(h) {
532
+ return { set(l) {
533
533
  const d = t.get.call(this);
534
- t.set.call(this, h), this.requestUpdate(r, d, i, !0, h);
535
- }, init(h) {
536
- return h !== void 0 && this.C(r, void 0, i, h), h;
534
+ t.set.call(this, l), this.requestUpdate(r, d, i, !0, l);
535
+ }, init(l) {
536
+ return l !== void 0 && this.C(r, void 0, i, l), l;
537
537
  } };
538
538
  }
539
539
  if (o === "setter") {
540
540
  const { name: r } = s;
541
- return function(h) {
541
+ return function(l) {
542
542
  const d = this[r];
543
- t.call(this, h), this.requestUpdate(r, d, i, !0, h);
543
+ t.call(this, l), this.requestUpdate(r, d, i, !0, l);
544
544
  };
545
545
  }
546
546
  throw Error("Unsupported decorator location: " + o);
@@ -718,7 +718,7 @@ let Ve = class extends Event {
718
718
  }, this.onProviderRequest = (e) => {
719
719
  if (e.context !== this.context || (e.contextTarget ?? e.composedPath()[0]) === this.host) return;
720
720
  const a = /* @__PURE__ */ new Set();
721
- for (const [r, { consumerHost: h }] of this.subscriptions) a.has(r) || (a.add(r), h.dispatchEvent(new oe(this.context, h, r, !0)));
721
+ for (const [r, { consumerHost: l }] of this.subscriptions) a.has(r) || (a.add(r), l.dispatchEvent(new oe(this.context, l, r, !0)));
722
722
  e.stopPropagation();
723
723
  }, this.host = t, s.context !== void 0 ? this.context = s.context : this.context = s, this.attachListeners(), this.host.addController?.(this);
724
724
  }
@@ -754,13 +754,13 @@ function D({ context: i }) {
754
754
  const r = /* @__PURE__ */ new WeakMap();
755
755
  a = { get() {
756
756
  return r.get(this);
757
- }, set(h) {
758
- o.get(this).setValue(h), r.set(this, h);
757
+ }, set(l) {
758
+ o.get(this).setValue(l), r.set(this, l);
759
759
  }, configurable: !0, enumerable: !0 };
760
760
  } else {
761
761
  const r = e.set;
762
- a = { ...e, set(h) {
763
- o.get(this).setValue(h), r?.call(this, h);
762
+ a = { ...e, set(l) {
763
+ o.get(this).setValue(l), r?.call(this, l);
764
764
  } };
765
765
  }
766
766
  return void Object.defineProperty(t, s, a);
@@ -832,7 +832,7 @@ const v = u`
832
832
  --chat-spacing-6: 1.5rem;
833
833
  --chat-spacing-8: 2rem;
834
834
 
835
- /** Overlays & Shadows */
835
+ /** Overlays */
836
836
  --chat-overlay-subtle: oklch(0% 0 0deg / 5%);
837
837
  --chat-overlay-light: oklch(0% 0 0deg / 8%);
838
838
  --chat-overlay: oklch(0% 0 0deg / 10%);
@@ -841,6 +841,7 @@ const v = u`
841
841
  }
842
842
 
843
843
  :host([theme="light"]) {
844
+ /** Colors */
844
845
  --chat-background: oklch(100% 0 0deg);
845
846
  --chat-foreground: oklch(14.5% 0 0deg);
846
847
  --chat-card: oklch(100% 0 0deg);
@@ -878,9 +879,23 @@ const v = u`
878
879
  --chat-warning-foreground: oklch(100% 0 0deg);
879
880
  --chat-info: oklch(54.6% 0.245 262.881deg);
880
881
  --chat-info-foreground: oklch(100% 0 0deg);
882
+
883
+ /** Shadows */
884
+ --chat-shadow-2xs: 0 1px rgb(0 0 0 / 5%);
885
+ --chat-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 5%);
886
+ --chat-shadow-sm:
887
+ 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
888
+ --chat-shadow-md:
889
+ 0 4px 6px -1px rgb(0 0 0 / 10%), 0 2px 4px -2px rgb(0 0 0 / 10%);
890
+ --chat-shadow-lg:
891
+ 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);
892
+ --chat-shadow-xl:
893
+ 0 20px 25px -5px rgb(0 0 0 / 10%), 0 8px 10px -6px rgb(0 0 0 / 10%);
894
+ --chat-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 25%);
881
895
  }
882
896
 
883
897
  :host([theme="dark"]) {
898
+ /** Colors */
884
899
  --chat-background: oklch(14.5% 0 0deg);
885
900
  --chat-foreground: oklch(98.5% 0 0deg);
886
901
  --chat-card: oklch(20.5% 0 0deg);
@@ -918,6 +933,15 @@ const v = u`
918
933
  --chat-warning-foreground: oklch(14.5% 0 0deg);
919
934
  --chat-info: oklch(70.7% 0.165 254.624deg);
920
935
  --chat-info-foreground: oklch(14.5% 0 0deg);
936
+
937
+ /** Shadows */
938
+ --chat-shadow-2xs: none;
939
+ --chat-shadow-xs: none;
940
+ --chat-shadow-sm: none;
941
+ --chat-shadow-md: none;
942
+ --chat-shadow-lg: none;
943
+ --chat-shadow-xl: none;
944
+ --chat-shadow-2xl: none;
921
945
  }
922
946
  `;
923
947
  var qe = Object.defineProperty, et = (i, t, s, o) => {
@@ -954,7 +978,7 @@ class F extends m {
954
978
  background-color: var(--chat-popover);
955
979
  border: 1px solid var(--chat-border);
956
980
  border-radius: var(--chat-radius-lg);
957
- box-shadow: 0 0.125rem 0.25rem var(--chat-overlay);
981
+ box-shadow: var(--chat-shadow-sm);
958
982
  }
959
983
 
960
984
  .action-list__item {
@@ -1167,7 +1191,7 @@ class mt extends m {
1167
1191
  <circle cx="12" cy="5" r="1" />
1168
1192
  <circle cx="12" cy="19" r="1" />
1169
1193
  </svg>
1170
- </button>` : l}
1194
+ </button>` : h}
1171
1195
  ${this._showActionList ? c`<chat-action-list
1172
1196
  style="position: absolute; top: 4em; right: 1.2em;"
1173
1197
  .actionType="${"room"}"
@@ -1175,7 +1199,7 @@ class mt extends m {
1175
1199
  .actions="${this.roomContext.roomActions}"
1176
1200
  @select-action="${this._closeActionList}"
1177
1201
  @close="${this._closeActionList}"
1178
- ></chat-action-list>` : l}
1202
+ ></chat-action-list>` : h}
1179
1203
  </header>`;
1180
1204
  }
1181
1205
  }
@@ -1197,10 +1221,10 @@ Lt([
1197
1221
  */
1198
1222
  class yt extends jt {
1199
1223
  constructor(t) {
1200
- if (super(t), this.it = l, t.type !== Et.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
1224
+ if (super(t), this.it = h, t.type !== Et.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
1201
1225
  }
1202
1226
  render(t) {
1203
- if (t === l || t == null) return this._t = void 0, this.it = t;
1227
+ if (t === h || t == null) return this._t = void 0, this.it = t;
1204
1228
  if (t === C) return t;
1205
1229
  if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
1206
1230
  if (t === this.it) return this._t;
@@ -1318,7 +1342,7 @@ class z extends m {
1318
1342
  display: flex;
1319
1343
  overflow: hidden;
1320
1344
  border-radius: var(--chat-radius-lg);
1321
- box-shadow: 0 0.25rem 0.5rem var(--chat-overlay-medium);
1345
+ box-shadow: var(--chat-shadow-sm);
1322
1346
  }
1323
1347
 
1324
1348
  emoji-picker {
@@ -1348,7 +1372,7 @@ class z extends m {
1348
1372
  return c`${this._hasEmojiPickerLoaded ? c`<emoji-picker
1349
1373
  style="width: ${this.width}px; height: ${this.height}px"
1350
1374
  @emoji-click="${this._onClickEmoji}"
1351
- ></emoji-picker>` : l}`;
1375
+ ></emoji-picker>` : h}`;
1352
1376
  }
1353
1377
  }
1354
1378
  q([
@@ -1419,7 +1443,7 @@ class W extends m {
1419
1443
  background-color: var(--chat-secondary);
1420
1444
  border: 1px solid var(--chat-border);
1421
1445
  border-radius: var(--chat-radius-lg);
1422
- box-shadow: 0 0.125rem 0.25rem var(--chat-overlay);
1446
+ box-shadow: var(--chat-shadow-xs);
1423
1447
  }
1424
1448
 
1425
1449
  .message-menu--mine {
@@ -1477,7 +1501,7 @@ class W extends m {
1477
1501
  <path d="M16 5h6" />
1478
1502
  <path d="M19 2v6" />
1479
1503
  </svg>
1480
- </button>` : l}
1504
+ </button>` : h}
1481
1505
  ${this.isReplyAvailable ? c`<button
1482
1506
  class="message-menu__button"
1483
1507
  @click="${this._replyToMesssage}"
@@ -1497,7 +1521,7 @@ class W extends m {
1497
1521
  <path d="M20 18v-2a4 4 0 0 0-4-4H4" />
1498
1522
  <path d="m9 17-5-5 5-5" />
1499
1523
  </svg>
1500
- </button>` : l}
1524
+ </button>` : h}
1501
1525
  ${this.isMessageActionAvailable ? c`<button
1502
1526
  class="message-menu__button"
1503
1527
  @click="${this._clickActionButton}"
@@ -1518,7 +1542,7 @@ class W extends m {
1518
1542
  <circle cx="19" cy="12" r="1" />
1519
1543
  <circle cx="5" cy="12" r="1" />
1520
1544
  </svg>
1521
- </button>` : l}
1545
+ </button>` : h}
1522
1546
  </div>`;
1523
1547
  }
1524
1548
  }
@@ -1578,7 +1602,7 @@ class K extends m {
1578
1602
  background-color: var(--chat-secondary);
1579
1603
  border: 1px solid var(--chat-border);
1580
1604
  border-radius: var(--chat-radius);
1581
- box-shadow: 0 0.125rem 0.25rem var(--chat-overlay);
1605
+ box-shadow: var(--chat-shadow-xs);
1582
1606
  }
1583
1607
 
1584
1608
  .message-reaction-list--mine {
@@ -1909,7 +1933,7 @@ class Bt extends m {
1909
1933
  ${this.replyTo.senderAvatar ? c`<chat-avatar
1910
1934
  .size="${2.4}"
1911
1935
  .src="${this.replyTo.senderAvatar}"
1912
- ></chat-avatar>` : l}
1936
+ ></chat-avatar>` : h}
1913
1937
  <div class="message-reply-to__container">
1914
1938
  <span
1915
1939
  class=${x({
@@ -2185,7 +2209,7 @@ class _ extends m {
2185
2209
  "message-item--selected": this.isReplying || this.message.isSelected
2186
2210
  })}"
2187
2211
  >
2188
- ${this._isAlignedLeft && this.showTheirAvatar ? c`<chat-avatar .src="${this.message.senderAvatar ?? null}"></chat-avatar>` : l}
2212
+ ${this._isAlignedLeft && this.showTheirAvatar ? c`<chat-avatar .src="${this.message.senderAvatar ?? null}"></chat-avatar>` : h}
2189
2213
  <div class="message-item__container">
2190
2214
  <div
2191
2215
  class=${x({
@@ -2195,7 +2219,7 @@ class _ extends m {
2195
2219
  >
2196
2220
  ${this._isAlignedLeft ? c`<span class="message-item__name"
2197
2221
  >${this.message.senderName}</span
2198
- >` : l}<span class="message-item__date"
2222
+ >` : h}<span class="message-item__date"
2199
2223
  >${this._formatTimestamp(this.message.timestamp)}</span
2200
2224
  >
2201
2225
  </div>
@@ -2213,17 +2237,17 @@ class _ extends m {
2213
2237
  ${this.message.replyTo && !this.message.isDeleted ? c`<chat-message-reply-to
2214
2238
  .replyTo="${this.message.replyTo}"
2215
2239
  .mine="${this._mine}"
2216
- ></chat-message-reply-to>` : l}
2240
+ ></chat-message-reply-to>` : h}
2217
2241
  ${this.message.isDeleted ? c`<chat-deleted-message
2218
2242
  .fontSize="${1.4}"
2219
2243
  ></chat-deleted-message>` : this.message.content !== "" ? c`<span
2220
2244
  >${this.isMarkdownAvailable ? Ke(this._content) : this._content}</span
2221
- >` : l}
2245
+ >` : h}
2222
2246
  ${!this.message.isDeleted && this.message.attachments.length > 0 ? c`<chat-message-attachment-list
2223
2247
  style="margin-top: 0.8em;"
2224
2248
  .attachments=${this.message.attachments}
2225
2249
  .mine="${this._mine}"
2226
- ></chat-message-attachment-list>` : l}
2250
+ ></chat-message-attachment-list>` : h}
2227
2251
  ${!this.message.isDeleted && this._hover && this._isMessageMenuAvailable ? c`<chat-message-menu
2228
2252
  style=${Y({
2229
2253
  position: "absolute",
@@ -2239,7 +2263,7 @@ class _ extends m {
2239
2263
  @click-emoji-button="${this._toggleEmojiPicker}"
2240
2264
  @click-action-button="${this._openActionList}"
2241
2265
  @blur="${this._onBlurMenu}"
2242
- ></chat-message-menu>` : l}
2266
+ ></chat-message-menu>` : h}
2243
2267
  ${!this.message.isDeleted && this._showActionList ? c`<chat-action-list
2244
2268
  style=${Y({
2245
2269
  position: "absolute",
@@ -2254,7 +2278,7 @@ class _ extends m {
2254
2278
  .actions="${this._mine ? this.myMessageActions : this.theirMessageActions}"
2255
2279
  @select-action="${this._closeActionList}"
2256
2280
  @close="${this._closeActionList}"
2257
- ></chat-action-list>` : l}
2281
+ ></chat-action-list>` : h}
2258
2282
  ${!this.message.isDeleted && this.isEmojiReactionAvailable && this._showEmojiPicker ? c`<chat-emoji-picker
2259
2283
  style=${Y({
2260
2284
  position: "absolute",
@@ -2269,14 +2293,14 @@ class _ extends m {
2269
2293
  .messageId="${this.message.id}"
2270
2294
  @select-emoji="${this._closeEmojiPicker}"
2271
2295
  @close="${this._closeEmojiPicker}"
2272
- ></chat-emoji-picker>` : l}
2296
+ ></chat-emoji-picker>` : h}
2273
2297
  </div>
2274
2298
  ${!this.message.isDeleted && Object.keys(this.message.reactions).length > 0 ? c`<chat-message-reaction-list
2275
2299
  .messageId="${this.message.id}"
2276
2300
  .mine="${this._mine}"
2277
2301
  .alignMyMessagesLeft="${this.alignMyMessagesLeft}"
2278
2302
  .reactions="${this.message.reactions}"
2279
- ></chat-message-reaction-list>` : l}
2303
+ ></chat-message-reaction-list>` : h}
2280
2304
  </div>
2281
2305
  </div>`;
2282
2306
  }
@@ -2350,7 +2374,7 @@ var os = Object.defineProperty, is = (i, t, s, o) => {
2350
2374
  (r = i[a]) && (e = r(t, s, e) || e);
2351
2375
  return e && os(t, s, e), e;
2352
2376
  };
2353
- class le extends m {
2377
+ class he extends m {
2354
2378
  constructor() {
2355
2379
  super(...arguments), this.size = 3.2;
2356
2380
  }
@@ -2390,8 +2414,8 @@ class le extends m {
2390
2414
  }
2391
2415
  is([
2392
2416
  n({ type: Number })
2393
- ], le.prototype, "size");
2394
- var as = Object.defineProperty, he = (i, t, s, o) => {
2417
+ ], he.prototype, "size");
2418
+ var as = Object.defineProperty, le = (i, t, s, o) => {
2395
2419
  for (var e = void 0, a = i.length - 1, r; a >= 0; a--)
2396
2420
  (r = i[a]) && (e = r(t, s, e) || e);
2397
2421
  return e && as(t, s, e), e;
@@ -2458,10 +2482,10 @@ class It extends m {
2458
2482
  </div>`;
2459
2483
  }
2460
2484
  }
2461
- he([
2485
+ le([
2462
2486
  n({ type: Array })
2463
2487
  ], It.prototype, "suggestions");
2464
- he([
2488
+ le([
2465
2489
  n({ type: Boolean })
2466
2490
  ], It.prototype, "alignMyMessagesLeft");
2467
2491
  class rs extends m {
@@ -2603,10 +2627,10 @@ class de extends m {
2603
2627
  cs([
2604
2628
  n({ type: Object })
2605
2629
  ], de.prototype, "message");
2606
- var ls = Object.defineProperty, hs = (i, t, s, o) => {
2630
+ var hs = Object.defineProperty, ls = (i, t, s, o) => {
2607
2631
  for (var e = void 0, a = i.length - 1, r; a >= 0; a--)
2608
2632
  (r = i[a]) && (e = r(t, s, e) || e);
2609
- return e && ls(t, s, e), e;
2633
+ return e && hs(t, s, e), e;
2610
2634
  };
2611
2635
  class pe extends m {
2612
2636
  constructor() {
@@ -2631,7 +2655,7 @@ class pe extends m {
2631
2655
  background-color: var(--chat-primary);
2632
2656
  border: none;
2633
2657
  border-radius: var(--chat-radius-full);
2634
- box-shadow: 0 0.125rem 0.25rem var(--chat-overlay);
2658
+ box-shadow: var(--chat-shadow-sm);
2635
2659
  }
2636
2660
  `
2637
2661
  ];
@@ -2645,7 +2669,7 @@ class pe extends m {
2645
2669
  </button>`;
2646
2670
  }
2647
2671
  }
2648
- hs([
2672
+ ls([
2649
2673
  k({ context: st, subscribe: !0 }),
2650
2674
  n({ type: Object })
2651
2675
  ], pe.prototype, "i18nContext");
@@ -2682,14 +2706,14 @@ class j extends m {
2682
2706
  }
2683
2707
  updated(t) {
2684
2708
  if (t.has("messageContext")) {
2685
- const { id: s, roomId: o } = t.get("messageContext")?.messages[0] ?? {}, e = t.get("messageContext")?.messages.length ?? 0, a = this.scrollHeight, r = this.scrollTop, { id: h, roomId: d } = this.messageContext.messages[0] ?? {}, y = this.messageContext.messages.length;
2709
+ const { id: s, roomId: o } = t.get("messageContext")?.messages[0] ?? {}, e = t.get("messageContext")?.messages.length ?? 0, a = this.scrollHeight, r = this.scrollTop, { id: l, roomId: d } = this.messageContext.messages[0] ?? {}, y = this.messageContext.messages.length;
2686
2710
  if (o !== d) {
2687
2711
  this._showScrollToBottomButton = !1, this._showNotificationBadge = !1, setTimeout(() => {
2688
2712
  this._scrollToBottom(void 0, "instant");
2689
2713
  });
2690
2714
  return;
2691
2715
  }
2692
- y > e && (s !== h ? setTimeout(() => {
2716
+ y > e && (s !== l ? setTimeout(() => {
2693
2717
  const $ = this.scrollHeight;
2694
2718
  this.scrollTop = r + ($ - a);
2695
2719
  }) : this._isWithinClientHeight || this.messageContext.messages[this.messageContext.messages.length - 1].senderId === this.currentUserId ? setTimeout(() => {
@@ -2758,7 +2782,7 @@ class j extends m {
2758
2782
  background-color: var(--chat-popover);
2759
2783
  border: 1px solid var(--chat-border);
2760
2784
  border-radius: var(--chat-radius-full);
2761
- box-shadow: 0 0.125rem 0.25rem var(--chat-overlay);
2785
+ box-shadow: var(--chat-shadow-sm);
2762
2786
  }
2763
2787
 
2764
2788
  .message-list__button:hover {
@@ -2777,7 +2801,7 @@ class j extends m {
2777
2801
  <div class="message-list__top"></div>
2778
2802
  ${this.messageContext.isLoadingMessage ? c`<chat-loader
2779
2803
  style="position: absolute; top: 50%; transform: translateY(-50%);"
2780
- ></chat-loader>` : c` ${!this.messageContext.isLoadingMessage && this.messageContext.isLoadingMoreMessages ? c`<chat-loader></chat-loader>` : l}
2804
+ ></chat-loader>` : c` ${!this.messageContext.isLoadingMessage && this.messageContext.isLoadingMoreMessages ? c`<chat-loader></chat-loader>` : h}
2781
2805
  ${this.messageContext.messages.map(
2782
2806
  (t, s) => t.type === "message" ? c`<chat-message-item
2783
2807
  .message="${t}"
@@ -2795,14 +2819,14 @@ class j extends m {
2795
2819
  .containerBottom="${this._rectBottom}"
2796
2820
  ></chat-message-item>` : t.type === "divider" ? c`<chat-message-divider
2797
2821
  .message="${t}"
2798
- ></chat-message-divider>` : l
2822
+ ></chat-message-divider>` : h
2799
2823
  )}
2800
- ${this.messageContext.isTyping ? c`<chat-message-typing></chat-message-typing>` : l}
2824
+ ${this.messageContext.isTyping ? c`<chat-message-typing></chat-message-typing>` : h}
2801
2825
  ${this.messageContext.suggestions.length > 0 ? c`<chat-suggestion-list
2802
2826
  style="align-self: ${this.messageContext.alignMyMessagesLeft ? "flex-start" : "flex-end"};"
2803
2827
  .suggestions="${this.messageContext.suggestions}"
2804
2828
  .alignMyMessagesLeft="${this.messageContext.alignMyMessagesLeft}"
2805
- ></chat-suggestion-list>` : l}
2829
+ ></chat-suggestion-list>` : h}
2806
2830
  <button
2807
2831
  class="${x({
2808
2832
  "message-list__button": !0,
@@ -2815,7 +2839,7 @@ class j extends m {
2815
2839
  <div class="message-list__bottom"></div>
2816
2840
  ${this._showNotificationBadge ? c`<chat-notification-badge
2817
2841
  @click-notification-badge="${this._scrollToBottom}"
2818
- ></chat-notification-badge>` : l}
2842
+ ></chat-notification-badge>` : h}
2819
2843
  </div>
2820
2844
  `;
2821
2845
  }
@@ -3140,7 +3164,7 @@ class A extends m {
3140
3164
  );
3141
3165
  }
3142
3166
  _onSelectEmoji(t) {
3143
- this._textareaValue += t.detail.emoji, this._textarea.value = this._textareaValue, this._showEmojiPicker = !1;
3167
+ t.stopPropagation(), this._textareaValue += t.detail.emoji, this._textarea.value = this._textareaValue, this._showEmojiPicker = !1;
3144
3168
  }
3145
3169
  _toggleEmojiPicker() {
3146
3170
  this._showEmojiPicker = !this._showEmojiPicker;
@@ -3255,10 +3279,10 @@ class A extends m {
3255
3279
  >${this.i18nContext.i18n.CLOSED_ROOM_MESSAGE}</span
3256
3280
  >` : c` ${this.footerContext.attachments.length > 0 ? c`<chat-footer-attachment-section
3257
3281
  .attachments=${this.footerContext.attachments}
3258
- ></chat-footer-attachment-section>` : l}
3282
+ ></chat-footer-attachment-section>` : h}
3259
3283
  ${this.messageContext.replyTo ? c`<chat-footer-reply-to-section
3260
3284
  .replyTo="${this.messageContext.replyTo}"
3261
- ></chat-footer-reply-to-section>` : l}
3285
+ ></chat-footer-reply-to-section>` : h}
3262
3286
  <textarea
3263
3287
  class="footer__textarea"
3264
3288
  .placeholder="${this.i18nContext.i18n.CHAT_FOOTER_TEXTAREA_PLACEHOLDER}"
@@ -3292,7 +3316,7 @@ class A extends m {
3292
3316
  type="file"
3293
3317
  class="footer__file"
3294
3318
  @change="${this._handleFileChange}"
3295
- />` : l}
3319
+ />` : h}
3296
3320
  ${this.footerContext.isEmojiPickerAvailable ? c`<button
3297
3321
  class="footer__button footer__button--emoji"
3298
3322
  @click="${this._toggleEmojiPicker}"
@@ -3316,7 +3340,7 @@ class A extends m {
3316
3340
  <path d="M16 5h6" />
3317
3341
  <path d="M19 2v6" />
3318
3342
  </svg>
3319
- </button>` : l}
3343
+ </button>` : h}
3320
3344
  <button
3321
3345
  class="${x({
3322
3346
  footer__button: !0,
@@ -3346,7 +3370,7 @@ class A extends m {
3346
3370
  style="position: absolute; bottom: calc(100% + 0.8em); left: 0; display: ${this._showEmojiPicker ? "block" : "none"};"
3347
3371
  @select-emoji="${this._onSelectEmoji}"
3348
3372
  @close="${this._closeEmojiPicker}"
3349
- ></chat-emoji-picker>` : l}
3373
+ ></chat-emoji-picker>` : h}
3350
3374
  </div>`}
3351
3375
  </footer>`;
3352
3376
  }
@@ -3559,7 +3583,7 @@ class at extends m {
3559
3583
  >
3560
3584
  <chat-header></chat-header><chat-message-list></chat-message-list
3561
3585
  ><chat-footer></chat-footer>
3562
- ${this.dialog ? c`<chat-dialog .dialog="${this.dialog}"></chat-dialog>` : l}
3586
+ ${this.dialog ? c`<chat-dialog .dialog="${this.dialog}"></chat-dialog>` : h}
3563
3587
  </div>`;
3564
3588
  }
3565
3589
  }
@@ -3752,7 +3776,7 @@ class M extends m {
3752
3776
  role="button"
3753
3777
  tabindex="0"
3754
3778
  >
3755
- ${this.showAvatar ? c`<chat-avatar .src="${this.room.avatar ?? null}"></chat-avatar>` : l}
3779
+ ${this.showAvatar ? c`<chat-avatar .src="${this.room.avatar ?? null}"></chat-avatar>` : h}
3756
3780
  <div class="room-item__text">
3757
3781
  <span class="room-item__title">${this.room.sidebarTitle}</span>
3758
3782
  <span class="room-item__subtitle">
@@ -3788,7 +3812,7 @@ class M extends m {
3788
3812
  [`room-item__badge--${this.room.badge.type}`]: !0
3789
3813
  })}"
3790
3814
  >${this.room.badge.label}</span
3791
- >` : l}
3815
+ >` : h}
3792
3816
  </div>`}
3793
3817
  ${this._showActionList ? c`<chat-action-list
3794
3818
  style=${Y({
@@ -3803,7 +3827,7 @@ class M extends m {
3803
3827
  .actions="${this.actions}"
3804
3828
  @select-action="${this._closeActionList}"
3805
3829
  @close="${this._closeActionList}"
3806
- ></chat-action-list>` : l}
3830
+ ></chat-action-list>` : h}
3807
3831
  </div>`;
3808
3832
  }
3809
3833
  }
@@ -3918,7 +3942,7 @@ class rt extends m {
3918
3942
  ${!this.roomContext.isLoadingRoom && this.roomContext.isLoadingMoreRooms ? c`<chat-loader
3919
3943
  style="padding: 1.6em 0;"
3920
3944
  .size="${2.4}"
3921
- ></chat-loader>` : l} `;
3945
+ ></chat-loader>` : h} `;
3922
3946
  }
3923
3947
  }
3924
3948
  ft([
@@ -4299,7 +4323,7 @@ class p extends m {
4299
4323
  overflow: hidden;
4300
4324
  border: 1px solid var(--chat-border);
4301
4325
  border-radius: var(--chat-radius-2xl);
4302
- box-shadow: rgb(0 0 0 / 15%) 0 0.1875rem 0.1875rem 0;
4326
+ box-shadow: var(--chat-shadow-sm);
4303
4327
  }
4304
4328
 
4305
4329
  .main--fullscreen {
@@ -4316,7 +4340,7 @@ class p extends m {
4316
4340
  })}
4317
4341
  style="height: ${this.height}; width: ${this.width}"
4318
4342
  >
4319
- ${this.isSingleRoom ? l : c`<chat-sidebar
4343
+ ${this.isSingleRoom ? h : c`<chat-sidebar
4320
4344
  .show="${this.showSidebar}"
4321
4345
  .isMobile="${this.isMobile}"
4322
4346
  @close="${this._closeSidebar}"
@@ -4463,7 +4487,7 @@ customElements.define(
4463
4487
  customElements.define("chat-footer-reply-to-section", ge);
4464
4488
  customElements.define("chat-footer", A);
4465
4489
  customElements.define("chat-header", mt);
4466
- customElements.define("chat-loader", le);
4490
+ customElements.define("chat-loader", he);
4467
4491
  customElements.define("chat-message-divider", de);
4468
4492
  customElements.define(
4469
4493
  "chat-message-attachment-list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "advanced-chat-kai",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "A highly customizable chat web component",
5
5
  "main": "dist/advanced-chat-kai.es.js",
6
6
  "module": "dist/advanced-chat-kai.es.js",
@@ -63,6 +63,7 @@
63
63
  "@vitest/browser": "^3.1.2",
64
64
  "@vitest/coverage-v8": "^3.1.2",
65
65
  "@vitest/ui": "^3.1.2",
66
+ "chromatic": "^15.1.1",
66
67
  "emoji-picker-element": "^1.26.3",
67
68
  "eslint": "^9.25.1",
68
69
  "eslint-config-prettier": "^10.1.2",