@qualityunit/liveagent-components-editor 0.0.75 → 0.0.76

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.
@@ -1,69 +1,69 @@
1
- import { b as ae, E as pe, c as te, a as D, d as S, U as ye, s as re, r as $, p as ne, h as y, e as se, f as le, H as ie, g as z, i as G, j as H, k as w, l as x, m as Te, n as Ae, o as Ne, q as j, t as fe, u as Me, v as xe, w as Ie, x as Se, I as Y, y as ue, z as we, A as Ce, B as He, C as De, D as Re, F as ke, G as Le, N as Pe, J as Oe, K as Fe, L as Ue, M as Ve, O as L, P as qe, Q as Be, R as ve, S as Ye, T as P, V as oe, W as q, X as K, Y as F, Z as ce, _ as de, $ as O, a0 as U, a1 as J, a2 as V, a3 as Ke, a4 as We, a5 as Xe, a6 as Ze } from "./ckeditor5-CejG8_Bt.js";
1
+ import { b as ae, E as pe, c as te, a as k, d as S, U as ye, s as re, r as $, p as ne, h as y, e as se, f as le, H as ie, g as z, i as G, j as H, k as w, l as x, m as Ae, n as Te, o as Ne, q as j, t as fe, u as Me, v as xe, w as Ie, x as Se, I as Y, y as ue, z as we, A as Ce, B as He, C as ke, D as De, F as Re, G as Le, N as Pe, J as Oe, K as Fe, L as Ue, M as Ve, O as L, P as qe, Q as Be, R as ve, S as Ye, T as P, V as oe, W as q, X as K, Y as F, Z as ce, _ as de, $ as O, a0 as U, a1 as J, a2 as V, a3 as Ke, a4 as We, a5 as Xe, a6 as Ze } from "./ckeditor5-C9zI3swn.js";
2
2
  function ze(e, t, a = !1) {
3
3
  y && se();
4
- var r = e, n = null, f = null, s = ye, c = a ? pe : 0, o = !1;
4
+ var r = e, n = null, s = null, f = ye, o = a ? pe : 0, c = !1;
5
5
  const E = (u, i = !0) => {
6
- o = !0, l(i, u);
6
+ c = !0, l(i, u);
7
7
  };
8
8
  var d = null;
9
9
  function m() {
10
10
  d !== null && (d.lastChild.remove(), r.before(d), d = null);
11
- var u = s ? n : f, i = s ? f : n;
11
+ var u = f ? n : s, i = f ? s : n;
12
12
  u && $(u), i && ne(i, () => {
13
- s ? f = null : n = null;
13
+ f ? s = null : n = null;
14
14
  });
15
15
  }
16
16
  const l = (u, i) => {
17
- if (s === (s = u)) return;
17
+ if (f === (f = u)) return;
18
18
  let v = !1;
19
19
  if (y) {
20
20
  const p = le(r) === ie;
21
- !!s === p && (r = z(), G(r), H(!1), v = !0);
21
+ !!f === p && (r = z(), G(r), H(!1), v = !0);
22
22
  }
23
23
  var b = re(), N = r;
24
- if (b && (d = document.createDocumentFragment(), d.append(N = te())), s ? n ??= i && D(() => i(N)) : f ??= i && D(() => i(N)), b) {
24
+ if (b && (d = document.createDocumentFragment(), d.append(N = te())), f ? n ??= i && k(() => i(N)) : s ??= i && k(() => i(N)), b) {
25
25
  var g = (
26
26
  /** @type {Batch} */
27
27
  S
28
- ), _ = s ? n : f, h = s ? f : n;
28
+ ), _ = f ? n : s, h = f ? s : n;
29
29
  _ && g.skipped_effects.delete(_), h && g.skipped_effects.add(h), g.add_callback(m);
30
30
  } else
31
31
  m();
32
32
  v && H(!0);
33
33
  };
34
34
  ae(() => {
35
- o = !1, t(E), o || l(null, null);
36
- }, c), y && (r = w);
35
+ c = !1, t(E), c || l(null, null);
36
+ }, o), y && (r = w);
37
37
  }
38
38
  function Ge(e, t) {
39
39
  return t;
40
40
  }
41
41
  function Je(e, t, a) {
42
- for (var r = e.items, n = [], f = t.length, s = 0; s < f; s++)
43
- Ce(t[s].e, n, !0);
44
- var c = f > 0 && n.length === 0 && a !== null;
45
- if (c) {
46
- var o = (
42
+ for (var r = e.items, n = [], s = t.length, f = 0; f < s; f++)
43
+ Ce(t[f].e, n, !0);
44
+ var o = s > 0 && n.length === 0 && a !== null;
45
+ if (o) {
46
+ var c = (
47
47
  /** @type {Element} */
48
48
  /** @type {Element} */
49
49
  a.parentNode
50
50
  );
51
- He(o), o.append(
51
+ He(c), c.append(
52
52
  /** @type {Element} */
53
53
  a
54
- ), r.clear(), M(e, t[0].prev, t[f - 1].next);
54
+ ), r.clear(), M(e, t[0].prev, t[s - 1].next);
55
55
  }
56
- De(n, () => {
57
- for (var E = 0; E < f; E++) {
56
+ ke(n, () => {
57
+ for (var E = 0; E < s; E++) {
58
58
  var d = t[E];
59
- c || (r.delete(d.k), M(e, d.prev, d.next)), ue(d.e, !c);
59
+ o || (r.delete(d.k), M(e, d.prev, d.next)), ue(d.e, !o);
60
60
  }
61
61
  });
62
62
  }
63
- function Qe(e, t, a, r, n, f = null) {
64
- var s = e, c = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
63
+ function Qe(e, t, a, r, n, s = null) {
64
+ var f = e, o = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
65
65
  y && se();
66
- var o = null, E = !1, d = /* @__PURE__ */ new Map(), m = Te(() => {
66
+ var c = null, E = !1, d = /* @__PURE__ */ new Map(), m = Ae(() => {
67
67
  var v = a();
68
68
  return Me(v) ? v : v == null ? [] : fe(v);
69
69
  }), l, u;
@@ -71,20 +71,20 @@ function Qe(e, t, a, r, n, f = null) {
71
71
  $e(
72
72
  u,
73
73
  l,
74
- c,
74
+ o,
75
75
  d,
76
- s,
76
+ f,
77
77
  n,
78
78
  t,
79
79
  r,
80
80
  a
81
- ), f !== null && (l.length === 0 ? o ? $(o) : o = D(() => f(s)) : o !== null && ne(o, () => {
82
- o = null;
81
+ ), s !== null && (l.length === 0 ? c ? $(c) : c = k(() => s(f)) : c !== null && ne(c, () => {
82
+ c = null;
83
83
  }));
84
84
  }
85
85
  ae(() => {
86
86
  u ??= /** @type {Effect} */
87
- Re, l = /** @type {V[]} */
87
+ De, l = /** @type {V[]} */
88
88
  x(m);
89
89
  var v = l.length;
90
90
  if (E && v === 0)
@@ -92,90 +92,90 @@ function Qe(e, t, a, r, n, f = null) {
92
92
  E = v === 0;
93
93
  let b = !1;
94
94
  if (y) {
95
- var N = le(s) === ie;
96
- N !== (v === 0) && (s = z(), G(s), H(!1), b = !0);
95
+ var N = le(f) === ie;
96
+ N !== (v === 0) && (f = z(), G(f), H(!1), b = !0);
97
97
  }
98
98
  if (y) {
99
99
  for (var g = null, _, h = 0; h < v; h++) {
100
- if (w.nodeType === ke && /** @type {Comment} */
100
+ if (w.nodeType === Re && /** @type {Comment} */
101
101
  w.data === Le) {
102
- s = /** @type {Comment} */
102
+ f = /** @type {Comment} */
103
103
  w, b = !0, H(!1);
104
104
  break;
105
105
  }
106
- var p = l[h], T = r(p, h);
106
+ var p = l[h], A = r(p, h);
107
107
  _ = Q(
108
108
  w,
109
- c,
109
+ o,
110
110
  g,
111
111
  null,
112
112
  p,
113
- T,
113
+ A,
114
114
  h,
115
115
  n,
116
116
  t,
117
117
  a
118
- ), c.items.set(T, _), g = _;
118
+ ), o.items.set(A, _), g = _;
119
119
  }
120
120
  v > 0 && G(z());
121
121
  }
122
122
  if (y)
123
- v === 0 && f && (o = D(() => f(s)));
123
+ v === 0 && s && (c = k(() => s(f)));
124
124
  else if (re()) {
125
- var R = /* @__PURE__ */ new Set(), I = (
125
+ var D = /* @__PURE__ */ new Set(), I = (
126
126
  /** @type {Batch} */
127
127
  S
128
128
  );
129
129
  for (h = 0; h < v; h += 1) {
130
- p = l[h], T = r(p, h);
131
- var A = c.items.get(T) ?? d.get(T);
132
- A ? _e(A, p, h) : (_ = Q(
130
+ p = l[h], A = r(p, h);
131
+ var T = o.items.get(A) ?? d.get(A);
132
+ T ? _e(T, p, h) : (_ = Q(
133
133
  null,
134
- c,
134
+ o,
135
135
  null,
136
136
  null,
137
137
  p,
138
- T,
138
+ A,
139
139
  h,
140
140
  n,
141
141
  t,
142
142
  a,
143
143
  !0
144
- ), d.set(T, _)), R.add(T);
144
+ ), d.set(A, _)), D.add(A);
145
145
  }
146
- for (const [k, C] of c.items)
147
- R.has(k) || I.skipped_effects.add(C.e);
146
+ for (const [R, C] of o.items)
147
+ D.has(R) || I.skipped_effects.add(C.e);
148
148
  I.add_callback(i);
149
149
  } else
150
150
  i();
151
151
  b && H(!0), x(m);
152
- }), y && (s = w);
152
+ }), y && (f = w);
153
153
  }
154
- function $e(e, t, a, r, n, f, s, c, o) {
154
+ function $e(e, t, a, r, n, s, f, o, c) {
155
155
  var E = t.length, d = a.items, m = a.first, l = m, u, i = null, v = [], b = [], N, g, _, h;
156
156
  for (h = 0; h < E; h += 1) {
157
- if (N = t[h], g = c(N, h), _ = d.get(g), _ === void 0) {
157
+ if (N = t[h], g = o(N, h), _ = d.get(g), _ === void 0) {
158
158
  var p = r.get(g);
159
159
  if (p !== void 0) {
160
160
  r.delete(g), d.set(g, p);
161
- var T = i ? i.next : l;
162
- M(a, i, p), M(a, p, T), W(p, T, n), i = p;
161
+ var A = i ? i.next : l;
162
+ M(a, i, p), M(a, p, A), W(p, A, n), i = p;
163
163
  } else {
164
- var R = l ? (
164
+ var D = l ? (
165
165
  /** @type {TemplateNode} */
166
166
  l.e.nodes_start
167
167
  ) : n;
168
168
  i = Q(
169
- R,
169
+ D,
170
170
  a,
171
171
  i,
172
172
  i === null ? a.first : i.next,
173
173
  N,
174
174
  g,
175
175
  h,
176
- f,
177
176
  s,
178
- o
177
+ f,
178
+ c
179
179
  );
180
180
  }
181
181
  d.set(g, i), v = [], b = [], l = i.next;
@@ -184,14 +184,14 @@ function $e(e, t, a, r, n, f, s, c, o) {
184
184
  if (_e(_, N, h), (_.e.f & Y) !== 0 && $(_.e), _ !== l) {
185
185
  if (u !== void 0 && u.has(_)) {
186
186
  if (v.length < b.length) {
187
- var I = b[0], A;
187
+ var I = b[0], T;
188
188
  i = I.prev;
189
- var k = v[0], C = v[v.length - 1];
190
- for (A = 0; A < v.length; A += 1)
191
- W(v[A], I, n);
192
- for (A = 0; A < b.length; A += 1)
193
- u.delete(b[A]);
194
- M(a, k.prev, C.next), M(a, i, k), M(a, C, I), l = I, i = C, h -= 1, v = [], b = [];
189
+ var R = v[0], C = v[v.length - 1];
190
+ for (T = 0; T < v.length; T += 1)
191
+ W(v[T], I, n);
192
+ for (T = 0; T < b.length; T += 1)
193
+ u.delete(b[T]);
194
+ M(a, R.prev, C.next), M(a, i, R), M(a, C, I), l = I, i = C, h -= 1, v = [], b = [];
195
195
  } else
196
196
  u.delete(_), W(_, l, n), M(a, _.prev, _.next), M(a, _, i === null ? a.first : i.next), M(a, i, _), i = _;
197
197
  continue;
@@ -219,13 +219,13 @@ function $e(e, t, a, r, n, f, s, c, o) {
219
219
  r.clear();
220
220
  }
221
221
  function _e(e, t, a, r) {
222
- Ae(e.v, t), e.i = a;
222
+ Te(e.v, t), e.i = a;
223
223
  }
224
- function Q(e, t, a, r, n, f, s, c, o, E, d) {
225
- var m = (o & Ie) !== 0, l = (o & Se) === 0, u = m ? l ? Ne(n, !1, !1) : j(n) : n, i = (o & xe) === 0 ? s : j(s), v = {
224
+ function Q(e, t, a, r, n, s, f, o, c, E, d) {
225
+ var m = (c & Ie) !== 0, l = (c & Se) === 0, u = m ? l ? Ne(n, !1, !1) : j(n) : n, i = (c & xe) === 0 ? f : j(f), v = {
226
226
  i,
227
227
  v: u,
228
- k: f,
228
+ k: s,
229
229
  a: null,
230
230
  // @ts-expect-error
231
231
  e: null,
@@ -237,7 +237,7 @@ function Q(e, t, a, r, n, f, s, c, o, E, d) {
237
237
  var b = document.createDocumentFragment();
238
238
  b.append(e = te());
239
239
  }
240
- return v.e = D(() => c(
240
+ return v.e = k(() => o(
241
241
  /** @type {Node} */
242
242
  e,
243
243
  u,
@@ -254,15 +254,15 @@ function W(e, t, a) {
254
254
  ) : a, n = t ? (
255
255
  /** @type {TemplateNode} */
256
256
  t.e.nodes_start
257
- ) : a, f = (
257
+ ) : a, s = (
258
258
  /** @type {TemplateNode} */
259
259
  e.e.nodes_start
260
- ); f !== null && f !== r; ) {
261
- var s = (
260
+ ); s !== null && s !== r; ) {
261
+ var f = (
262
262
  /** @type {TemplateNode} */
263
- we(f)
263
+ we(s)
264
264
  );
265
- n.before(f), f = s;
265
+ n.before(s), s = f;
266
266
  }
267
267
  }
268
268
  function M(e, t, a) {
@@ -288,13 +288,13 @@ function aa(e, t, a) {
288
288
  var r = e == null ? "" : "" + e;
289
289
  return r === "" ? null : r;
290
290
  }
291
- function ta(e, t, a, r, n, f) {
292
- var s = e.__className;
293
- if (y || s !== a || s === void 0) {
294
- var c = aa(a);
295
- (!y || c !== e.getAttribute("class")) && (c == null ? e.removeAttribute("class") : e.className = c), e.__className = a;
291
+ function ta(e, t, a, r, n, s) {
292
+ var f = e.__className;
293
+ if (y || f !== a || f === void 0) {
294
+ var o = aa(a);
295
+ (!y || o !== e.getAttribute("class")) && (o == null ? e.removeAttribute("class") : e.className = o), e.__className = a;
296
296
  }
297
- return f;
297
+ return s;
298
298
  }
299
299
  const ra = Symbol("is custom element"), na = Symbol("is html");
300
300
  function sa(e, t, a, r) {
@@ -313,40 +313,40 @@ function la(e) {
313
313
  }
314
314
  var ee = /* @__PURE__ */ new Map();
315
315
  function ia(e) {
316
- var t = ee.get(e.nodeName);
317
- if (t) return t;
318
- ee.set(e.nodeName, t = []);
319
- for (var a, r = e, n = Element.prototype; n !== r; ) {
320
- a = Fe(r);
321
- for (var f in a)
322
- a[f].set && t.push(f);
323
- r = Oe(r);
316
+ var t = e.getAttribute("is") || e.nodeName, a = ee.get(t);
317
+ if (a) return a;
318
+ ee.set(t, a = []);
319
+ for (var r, n = e, s = Element.prototype; s !== n; ) {
320
+ r = Fe(n);
321
+ for (var f in r)
322
+ r[f].set && a.push(f);
323
+ n = Oe(n);
324
324
  }
325
- return t;
325
+ return a;
326
326
  }
327
327
  function fa(e, t, a = t) {
328
- var r = Ue(), n = /* @__PURE__ */ new WeakSet();
329
- Ve(e, "input", (f) => {
330
- var s = f ? e.defaultValue : e.value;
331
- if (s = X(e) ? Z(s) : s, a(s), S !== null && n.add(S), r && s !== (s = t())) {
332
- var c = e.selectionStart, o = e.selectionEnd;
333
- e.value = s ?? "", o !== null && (e.selectionStart = c, e.selectionEnd = Math.min(o, e.value.length));
328
+ var r = /* @__PURE__ */ new WeakSet();
329
+ Ue(e, "input", async (n) => {
330
+ var s = n ? e.defaultValue : e.value;
331
+ if (s = X(e) ? Z(s) : s, a(s), S !== null && r.add(S), await Ve(), s !== (s = t())) {
332
+ var f = e.selectionStart, o = e.selectionEnd;
333
+ e.value = s ?? "", o !== null && (e.selectionStart = f, e.selectionEnd = Math.min(o, e.value.length));
334
334
  }
335
335
  }), // If we are hydrating and the value has since changed,
336
336
  // then use the updated value from the input instead.
337
337
  (y && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
338
338
  // TODO Svelte 6: remove input.value check and set to empty string?
339
- L(t) == null && e.value) && (a(X(e) ? Z(e.value) : e.value), S !== null && n.add(S)), qe(() => {
340
- var f = t();
339
+ L(t) == null && e.value) && (a(X(e) ? Z(e.value) : e.value), S !== null && r.add(S)), qe(() => {
340
+ var n = t();
341
341
  if (e === document.activeElement) {
342
342
  var s = (
343
343
  /** @type {Batch} */
344
344
  Be ?? S
345
345
  );
346
- if (n.has(s))
346
+ if (r.has(s))
347
347
  return;
348
348
  }
349
- X(e) && f === Z(e.value) || e.type === "date" && !f && !e.value || f !== e.value && (e.value = f ?? "");
349
+ X(e) && n === Z(e.value) || e.type === "date" && !n && !e.value || n !== e.value && (e.value = n ?? "");
350
350
  });
351
351
  }
352
352
  function X(e) {
@@ -364,11 +364,11 @@ function me(e, t) {
364
364
  function n() {
365
365
  a("html", {});
366
366
  }
367
- function f() {
367
+ function s() {
368
368
  a("plain", {});
369
369
  }
370
370
  oe();
371
- var s = va(), c = U(s), o = J(c, 2), E = J(o, 2);
371
+ var f = va(), o = U(f), c = J(o, 2), E = J(c, 2);
372
372
  return Qe(E, 1, r, Ge, (d, m) => {
373
373
  var l = ua(), u = U(l, !0);
374
374
  V(l), Ke(() => {
@@ -376,7 +376,7 @@ function me(e, t) {
376
376
  }), K("click", l, function(...i) {
377
377
  x(m).handler?.apply(this, i);
378
378
  }), F(d, l);
379
- }), V(s), K("click", c, n), K("click", o, f), F(e, s), ce({
379
+ }), V(f), K("click", o, n), K("click", c, s), F(e, f), ce({
380
380
  get buttons() {
381
381
  return r();
382
382
  },
@@ -390,14 +390,14 @@ var oa = q("<textarea></textarea>"), ca = q('<main><div class="Editor"><!></div>
390
390
  function da(e, t) {
391
391
  de(t, !1);
392
392
  let a = P(t, "value", 12, ""), r = P(t, "buttons", 28, () => []), n = P(t, "html", 12, !0);
393
- function f() {
393
+ function s() {
394
394
  n() || n(!0);
395
395
  }
396
- function s() {
396
+ function f() {
397
397
  n() && (a(a().replace(/<[^>]*>?/gm, "")), n(!1));
398
398
  }
399
399
  oe();
400
- var c = ca(), o = U(c), E = U(o);
400
+ var o = ca(), c = U(o), E = U(c);
401
401
  {
402
402
  var d = (u) => {
403
403
  Xe(u, {
@@ -417,8 +417,8 @@ function da(e, t) {
417
417
  n() ? u(d) : u(m, !1);
418
418
  });
419
419
  }
420
- V(o);
421
- var l = J(o, 2);
420
+ V(c);
421
+ var l = J(c, 2);
422
422
  return me(l, {
423
423
  get buttons() {
424
424
  return r();
@@ -426,9 +426,9 @@ function da(e, t) {
426
426
  set buttons(u) {
427
427
  r(u);
428
428
  },
429
- $$events: { html: f, plain: s },
429
+ $$events: { html: s, plain: f },
430
430
  $$legacy: !0
431
- }), V(c), F(e, c), ce({
431
+ }), V(o), F(e, o), ce({
432
432
  get value() {
433
433
  return a();
434
434
  },
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Editor component for LiveAgent",
4
4
  "author": "QualityUnit",
5
5
  "private": false,
6
- "version": "0.0.75",
6
+ "version": "0.0.76",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist/*"
@@ -25,15 +25,15 @@
25
25
  "check": "svelte-check --tsconfig ./tsconfig.json"
26
26
  },
27
27
  "devDependencies": {
28
- "@sveltejs/vite-plugin-svelte": "^6.1.1",
29
- "@tsconfig/svelte": "^5.0.4",
30
- "svelte": "^5.38.1",
28
+ "@sveltejs/vite-plugin-svelte": "^6.1.4",
29
+ "@tsconfig/svelte": "^5.0.5",
30
+ "svelte": "^5.38.6",
31
31
  "svelte-check": "^4.3.1",
32
32
  "tslib": "^2.8.1",
33
33
  "typescript": "^5.9.2",
34
- "vite": "^7.1.2"
34
+ "vite": "^7.1.4"
35
35
  },
36
36
  "dependencies": {
37
- "ckeditor5": "^46.0.1"
37
+ "ckeditor5": "^46.0.3"
38
38
  }
39
39
  }