@telia-ace/widget-conversation-flamingo 1.1.123-rc.11 → 1.1.123-rc.12

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 (3) hide show
  1. package/index.js +77 -77
  2. package/index.mjs +7 -10
  3. package/package.json +2 -2
package/index.mjs CHANGED
@@ -6792,21 +6792,18 @@ const ii = class ii extends N {
6792
6792
  }
6793
6793
  // Run on every update of an observed value
6794
6794
  updated() {
6795
- var i, r;
6795
+ var o, a;
6796
6796
  const e = this.getLastChunk();
6797
6797
  if (!e) return;
6798
- this.buffer += e;
6799
- const t = Ho.sanitize(
6800
- k.parse(this.buffer),
6801
- { ADD_ATTR: ["target"] }
6802
- );
6803
- if (this.includesImage(this.buffer))
6804
- (i = this.contentRef.value) == null || i.appendChild(document.createElement("div")), this.buffer = "";
6798
+ if (this.buffer += e, this.includesImage(this.buffer))
6799
+ (o = this.contentRef.value) == null || o.appendChild(document.createElement("div")), this.buffer = "";
6805
6800
  else if (this.buffer.includes("![")) return;
6806
- const s = (r = this.contentRef.value) == null ? void 0 : r.querySelector(
6801
+ const t = k.parse(this.buffer), s = fl(t), i = Ho.sanitize(s, {
6802
+ ADD_ATTR: ["target"]
6803
+ }), r = (a = this.contentRef.value) == null ? void 0 : a.querySelector(
6807
6804
  "div:last-of-type"
6808
6805
  );
6809
- s.innerHTML = fl(t), this.applyCodeStyles(s), this.autoScroll && this.scrollRef.value.scrollIntoView();
6806
+ r && (r.innerHTML = i, this.applyCodeStyles(r)), this.autoScroll && this.scrollRef.value.scrollIntoView();
6810
6807
  }
6811
6808
  // Apply white-space: pre-wrap to <code> elements
6812
6809
  applyCodeStyles(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-conversation-flamingo",
3
- "version": "1.1.123-rc.11",
3
+ "version": "1.1.123-rc.12",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -9,7 +9,7 @@
9
9
  "@lit-labs/motion": "^1.0.8",
10
10
  "@teliads/icons": "^8.4.0",
11
11
  "@teliads/components": "^22.1.1",
12
- "@telia-ace/widget-core-flamingo": "1.1.123-rc.11",
12
+ "@telia-ace/widget-core-flamingo": "1.1.123-rc.12",
13
13
  "lit-html": "^3.0.2",
14
14
  "rxjs": "^7.8.2",
15
15
  "marked": "^15.0.12",