@qualityunit/liveagent-components-editor 0.0.80 → 0.0.81
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/dist/ckeditor.js +1 -1
- package/dist/{ckeditor5-8LqIgjm8.js → ckeditor5-wzeDqku8.js} +2784 -2749
- package/dist/editor-lib.js +115 -106
- package/package.json +2 -2
package/dist/editor-lib.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as N, r as ee, d as
|
|
1
|
+
import { c as N, r as ee, d as I, p as re, a as G, b as D, m as ge, s as se, h as E, e as k, f as ne, E as ye, g as ie, i as le, H as fe, j as J, k as Q, l as H, n as x, o as Ae, q as Me, t as Te, u as te, v as ue, w as xe, x as Ne, y as Se, z as we, I as q, A as ke, B as Ce, C as Ie, D as He, F as De, G as Re, J as Le, N as Pe, K as Fe, L as Oe, M as Ve, O as Be, P, Q as Ue, R as Ye, S as oe, T as $e, U as F, V as ce, W as Y, X as K, Y as V, Z as ve, _ as he, $ as B, a0 as Z, a1 as O, a2 as U, a3 as qe, a4 as Ke, a5 as We, a6 as Xe } from "./ckeditor5-wzeDqku8.js";
|
|
2
2
|
class ze {
|
|
3
3
|
/** @type {TemplateNode} */
|
|
4
4
|
anchor;
|
|
5
5
|
/** @type {Map<Batch, Key>} */
|
|
6
|
-
#a = /* @__PURE__ */ new Map();
|
|
7
|
-
/** @type {Map<Key, Effect>} */
|
|
8
6
|
#t = /* @__PURE__ */ new Map();
|
|
7
|
+
/** @type {Map<Key, Effect>} */
|
|
8
|
+
#a = /* @__PURE__ */ new Map();
|
|
9
9
|
/** @type {Map<Key, Branch>} */
|
|
10
10
|
#e = /* @__PURE__ */ new Map();
|
|
11
11
|
/**
|
|
@@ -25,37 +25,46 @@ class ze {
|
|
|
25
25
|
/** @type {Batch} */
|
|
26
26
|
N
|
|
27
27
|
);
|
|
28
|
-
if (this.#
|
|
28
|
+
if (this.#t.has(a)) {
|
|
29
29
|
var t = (
|
|
30
30
|
/** @type {Key} */
|
|
31
|
-
this.#
|
|
32
|
-
), r = this.#
|
|
31
|
+
this.#t.get(a)
|
|
32
|
+
), r = this.#a.get(t);
|
|
33
33
|
if (r)
|
|
34
34
|
ee(r);
|
|
35
35
|
else {
|
|
36
36
|
var s = this.#e.get(t);
|
|
37
|
-
s && (this.#
|
|
37
|
+
s && (this.#a.set(t, s.effect), this.#e.delete(t), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), r = s.effect);
|
|
38
38
|
}
|
|
39
|
-
for (const [n,
|
|
40
|
-
if (this.#
|
|
39
|
+
for (const [n, i] of this.#t) {
|
|
40
|
+
if (this.#t.delete(n), n === a)
|
|
41
41
|
break;
|
|
42
|
-
const
|
|
43
|
-
|
|
42
|
+
const l = this.#e.get(i);
|
|
43
|
+
l && (I(l.effect), this.#e.delete(i));
|
|
44
44
|
}
|
|
45
|
-
for (const [n,
|
|
45
|
+
for (const [n, i] of this.#a) {
|
|
46
46
|
if (n === t) continue;
|
|
47
|
-
const
|
|
48
|
-
if (Array.from(this.#
|
|
47
|
+
const l = () => {
|
|
48
|
+
if (Array.from(this.#t.values()).includes(n)) {
|
|
49
49
|
var v = document.createDocumentFragment();
|
|
50
|
-
ge(
|
|
50
|
+
ge(i, v), v.append(G()), this.#e.set(n, { effect: i, fragment: v });
|
|
51
51
|
} else
|
|
52
|
-
|
|
53
|
-
this.#
|
|
52
|
+
I(i);
|
|
53
|
+
this.#a.delete(n);
|
|
54
54
|
};
|
|
55
|
-
this.#r || !r ? re(
|
|
55
|
+
this.#r || !r ? re(i, l, !1) : l();
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* @param {Batch} batch
|
|
61
|
+
*/
|
|
62
|
+
#n = (a) => {
|
|
63
|
+
this.#t.delete(a);
|
|
64
|
+
const t = Array.from(this.#t.values());
|
|
65
|
+
for (const [r, s] of this.#e)
|
|
66
|
+
t.includes(r) || (I(s.effect), this.#e.delete(r));
|
|
67
|
+
};
|
|
59
68
|
/**
|
|
60
69
|
*
|
|
61
70
|
* @param {any} key
|
|
@@ -66,57 +75,57 @@ class ze {
|
|
|
66
75
|
/** @type {Batch} */
|
|
67
76
|
N
|
|
68
77
|
), s = se();
|
|
69
|
-
if (t && !this.#
|
|
78
|
+
if (t && !this.#a.has(a) && !this.#e.has(a))
|
|
70
79
|
if (s) {
|
|
71
|
-
var n = document.createDocumentFragment(),
|
|
72
|
-
n.append(
|
|
73
|
-
effect:
|
|
80
|
+
var n = document.createDocumentFragment(), i = G();
|
|
81
|
+
n.append(i), this.#e.set(a, {
|
|
82
|
+
effect: D(() => t(i)),
|
|
74
83
|
fragment: n
|
|
75
84
|
});
|
|
76
85
|
} else
|
|
77
|
-
this.#
|
|
86
|
+
this.#a.set(
|
|
78
87
|
a,
|
|
79
|
-
|
|
88
|
+
D(() => t(this.anchor))
|
|
80
89
|
);
|
|
81
|
-
if (this.#
|
|
82
|
-
for (const [
|
|
83
|
-
|
|
84
|
-
for (const [
|
|
85
|
-
|
|
86
|
-
r.
|
|
90
|
+
if (this.#t.set(r, a), s) {
|
|
91
|
+
for (const [l, c] of this.#a)
|
|
92
|
+
l === a ? r.skipped_effects.delete(c) : r.skipped_effects.add(c);
|
|
93
|
+
for (const [l, c] of this.#e)
|
|
94
|
+
l === a ? r.skipped_effects.delete(c.effect) : r.skipped_effects.add(c.effect);
|
|
95
|
+
r.oncommit(this.#s), r.ondiscard(this.#n);
|
|
87
96
|
} else
|
|
88
97
|
E && (this.anchor = k), this.#s();
|
|
89
98
|
}
|
|
90
99
|
}
|
|
91
100
|
function Ge(e, a, t = !1) {
|
|
92
|
-
E &&
|
|
101
|
+
E && ie();
|
|
93
102
|
var r = new ze(e), s = t ? ye : 0;
|
|
94
|
-
function n(
|
|
103
|
+
function n(i, l) {
|
|
95
104
|
if (E) {
|
|
96
|
-
const v =
|
|
97
|
-
if (
|
|
105
|
+
const v = le(e) === fe;
|
|
106
|
+
if (i === v) {
|
|
98
107
|
var c = J();
|
|
99
|
-
Q(c), r.anchor = c,
|
|
108
|
+
Q(c), r.anchor = c, H(!1), r.ensure(i, l), H(!0);
|
|
100
109
|
return;
|
|
101
110
|
}
|
|
102
111
|
}
|
|
103
|
-
r.ensure(
|
|
112
|
+
r.ensure(i, l);
|
|
104
113
|
}
|
|
105
114
|
ne(() => {
|
|
106
|
-
var
|
|
107
|
-
a((
|
|
108
|
-
|
|
109
|
-
}),
|
|
115
|
+
var i = !1;
|
|
116
|
+
a((l, c = !0) => {
|
|
117
|
+
i = !0, n(c, l);
|
|
118
|
+
}), i || n(!1, null);
|
|
110
119
|
}, s);
|
|
111
120
|
}
|
|
112
121
|
function Je(e, a) {
|
|
113
122
|
return a;
|
|
114
123
|
}
|
|
115
124
|
function Qe(e, a, t) {
|
|
116
|
-
for (var r = e.items, s = [], n = a.length,
|
|
117
|
-
Ce(a[
|
|
118
|
-
var
|
|
119
|
-
if (
|
|
125
|
+
for (var r = e.items, s = [], n = a.length, i = 0; i < n; i++)
|
|
126
|
+
Ce(a[i].e, s, !0);
|
|
127
|
+
var l = n > 0 && s.length === 0 && t !== null;
|
|
128
|
+
if (l) {
|
|
120
129
|
var c = (
|
|
121
130
|
/** @type {Element} */
|
|
122
131
|
/** @type {Element} */
|
|
@@ -130,13 +139,13 @@ function Qe(e, a, t) {
|
|
|
130
139
|
He(s, () => {
|
|
131
140
|
for (var v = 0; v < n; v++) {
|
|
132
141
|
var m = a[v];
|
|
133
|
-
|
|
142
|
+
l || (r.delete(m.k), T(e, m.prev, m.next)), I(m.e, !l);
|
|
134
143
|
}
|
|
135
144
|
});
|
|
136
145
|
}
|
|
137
146
|
function Ze(e, a, t, r, s, n = null) {
|
|
138
|
-
var
|
|
139
|
-
E &&
|
|
147
|
+
var i = e, l = { flags: a, items: /* @__PURE__ */ new Map(), first: null };
|
|
148
|
+
E && ie();
|
|
140
149
|
var c = null, v = !1, m = /* @__PURE__ */ new Map(), g = Ae(() => {
|
|
141
150
|
var o = t();
|
|
142
151
|
return xe(o) ? o : o == null ? [] : ue(o);
|
|
@@ -145,14 +154,14 @@ function Ze(e, a, t, r, s, n = null) {
|
|
|
145
154
|
je(
|
|
146
155
|
d,
|
|
147
156
|
u,
|
|
148
|
-
i,
|
|
149
|
-
m,
|
|
150
157
|
l,
|
|
158
|
+
m,
|
|
159
|
+
i,
|
|
151
160
|
s,
|
|
152
161
|
a,
|
|
153
162
|
r,
|
|
154
163
|
t
|
|
155
|
-
), n !== null && (u.length === 0 ? c ? ee(c) : c =
|
|
164
|
+
), n !== null && (u.length === 0 ? c ? ee(c) : c = D(() => n(i)) : c !== null && re(c, () => {
|
|
156
165
|
c = null;
|
|
157
166
|
}));
|
|
158
167
|
}
|
|
@@ -166,21 +175,21 @@ function Ze(e, a, t, r, s, n = null) {
|
|
|
166
175
|
v = o === 0;
|
|
167
176
|
let b = !1;
|
|
168
177
|
if (E) {
|
|
169
|
-
var w =
|
|
170
|
-
w !== (o === 0) && (
|
|
178
|
+
var w = le(i) === fe;
|
|
179
|
+
w !== (o === 0) && (i = J(), Q(i), H(!1), b = !0);
|
|
171
180
|
}
|
|
172
181
|
if (E) {
|
|
173
182
|
for (var y = null, h, _ = 0; _ < o; _++) {
|
|
174
183
|
if (k.nodeType === Re && /** @type {Comment} */
|
|
175
184
|
k.data === Le) {
|
|
176
|
-
|
|
177
|
-
k, b = !0,
|
|
185
|
+
i = /** @type {Comment} */
|
|
186
|
+
k, b = !0, H(!1);
|
|
178
187
|
break;
|
|
179
188
|
}
|
|
180
189
|
var p = u[_], A = r(p, _);
|
|
181
190
|
h = j(
|
|
182
191
|
k,
|
|
183
|
-
|
|
192
|
+
l,
|
|
184
193
|
y,
|
|
185
194
|
null,
|
|
186
195
|
p,
|
|
@@ -189,23 +198,23 @@ function Ze(e, a, t, r, s, n = null) {
|
|
|
189
198
|
s,
|
|
190
199
|
a,
|
|
191
200
|
t
|
|
192
|
-
),
|
|
201
|
+
), l.items.set(A, h), y = h;
|
|
193
202
|
}
|
|
194
203
|
o > 0 && Q(J());
|
|
195
204
|
}
|
|
196
205
|
if (E)
|
|
197
|
-
o === 0 && n && (c =
|
|
206
|
+
o === 0 && n && (c = D(() => n(i)));
|
|
198
207
|
else if (se()) {
|
|
199
|
-
var
|
|
208
|
+
var R = /* @__PURE__ */ new Set(), S = (
|
|
200
209
|
/** @type {Batch} */
|
|
201
210
|
N
|
|
202
211
|
);
|
|
203
212
|
for (_ = 0; _ < o; _ += 1) {
|
|
204
213
|
p = u[_], A = r(p, _);
|
|
205
|
-
var M =
|
|
214
|
+
var M = l.items.get(A) ?? m.get(A);
|
|
206
215
|
M ? de(M, p, _) : (h = j(
|
|
207
216
|
null,
|
|
208
|
-
|
|
217
|
+
l,
|
|
209
218
|
null,
|
|
210
219
|
null,
|
|
211
220
|
p,
|
|
@@ -215,32 +224,32 @@ function Ze(e, a, t, r, s, n = null) {
|
|
|
215
224
|
a,
|
|
216
225
|
t,
|
|
217
226
|
!0
|
|
218
|
-
), m.set(A, h)),
|
|
227
|
+
), m.set(A, h)), R.add(A);
|
|
219
228
|
}
|
|
220
|
-
for (const [
|
|
221
|
-
|
|
222
|
-
S.
|
|
229
|
+
for (const [L, C] of l.items)
|
|
230
|
+
R.has(L) || S.skipped_effects.add(C.e);
|
|
231
|
+
S.oncommit(f);
|
|
223
232
|
} else
|
|
224
233
|
f();
|
|
225
|
-
b &&
|
|
226
|
-
}), E && (
|
|
234
|
+
b && H(!0), x(g);
|
|
235
|
+
}), E && (i = k);
|
|
227
236
|
}
|
|
228
|
-
function je(e, a, t, r, s, n,
|
|
237
|
+
function je(e, a, t, r, s, n, i, l, c) {
|
|
229
238
|
var v = a.length, m = t.items, g = t.first, u = g, d, f = null, o = [], b = [], w, y, h, _;
|
|
230
239
|
for (_ = 0; _ < v; _ += 1) {
|
|
231
|
-
if (w = a[_], y =
|
|
240
|
+
if (w = a[_], y = l(w, _), h = m.get(y), h === void 0) {
|
|
232
241
|
var p = r.get(y);
|
|
233
242
|
if (p !== void 0) {
|
|
234
243
|
r.delete(y), m.set(y, p);
|
|
235
244
|
var A = f ? f.next : u;
|
|
236
245
|
T(t, f, p), T(t, p, A), W(p, A, s), f = p;
|
|
237
246
|
} else {
|
|
238
|
-
var
|
|
247
|
+
var R = u ? (
|
|
239
248
|
/** @type {TemplateNode} */
|
|
240
249
|
u.e.nodes_start
|
|
241
250
|
) : s;
|
|
242
251
|
f = j(
|
|
243
|
-
|
|
252
|
+
R,
|
|
244
253
|
t,
|
|
245
254
|
f,
|
|
246
255
|
f === null ? t.first : f.next,
|
|
@@ -248,7 +257,7 @@ function je(e, a, t, r, s, n, l, i, c) {
|
|
|
248
257
|
y,
|
|
249
258
|
_,
|
|
250
259
|
n,
|
|
251
|
-
|
|
260
|
+
i,
|
|
252
261
|
c
|
|
253
262
|
);
|
|
254
263
|
}
|
|
@@ -260,12 +269,12 @@ function je(e, a, t, r, s, n, l, i, c) {
|
|
|
260
269
|
if (o.length < b.length) {
|
|
261
270
|
var S = b[0], M;
|
|
262
271
|
f = S.prev;
|
|
263
|
-
var
|
|
272
|
+
var L = o[0], C = o[o.length - 1];
|
|
264
273
|
for (M = 0; M < o.length; M += 1)
|
|
265
274
|
W(o[M], S, s);
|
|
266
275
|
for (M = 0; M < b.length; M += 1)
|
|
267
276
|
d.delete(b[M]);
|
|
268
|
-
T(t,
|
|
277
|
+
T(t, L.prev, C.next), T(t, f, L), T(t, C, S), u = S, f = C, _ -= 1, o = [], b = [];
|
|
269
278
|
} else
|
|
270
279
|
d.delete(h), W(h, u, s), T(t, h.prev, h.next), T(t, h, f === null ? t.first : f.next), T(t, f, h), f = h;
|
|
271
280
|
continue;
|
|
@@ -289,14 +298,14 @@ function je(e, a, t, r, s, n, l, i, c) {
|
|
|
289
298
|
}
|
|
290
299
|
e.first = t.first && t.first.e, e.last = f && f.e;
|
|
291
300
|
for (var Ee of r.values())
|
|
292
|
-
|
|
301
|
+
I(Ee.e);
|
|
293
302
|
r.clear();
|
|
294
303
|
}
|
|
295
304
|
function de(e, a, t, r) {
|
|
296
305
|
Me(e.v, a), e.i = t;
|
|
297
306
|
}
|
|
298
|
-
function j(e, a, t, r, s, n,
|
|
299
|
-
var g = (c & Se) !== 0, u = (c & we) === 0, d = g ? u ? Te(s, !1, !1) : te(s) : s, f = (c & Ne) === 0 ?
|
|
307
|
+
function j(e, a, t, r, s, n, i, l, c, v, m) {
|
|
308
|
+
var g = (c & Se) !== 0, u = (c & we) === 0, d = g ? u ? Te(s, !1, !1) : te(s) : s, f = (c & Ne) === 0 ? i : te(i), o = {
|
|
300
309
|
i: f,
|
|
301
310
|
v: d,
|
|
302
311
|
k: n,
|
|
@@ -311,7 +320,7 @@ function j(e, a, t, r, s, n, l, i, c, v, m) {
|
|
|
311
320
|
var b = document.createDocumentFragment();
|
|
312
321
|
b.append(e = G());
|
|
313
322
|
}
|
|
314
|
-
return o.e =
|
|
323
|
+
return o.e = D(() => l(
|
|
315
324
|
/** @type {Node} */
|
|
316
325
|
e,
|
|
317
326
|
d,
|
|
@@ -332,11 +341,11 @@ function W(e, a, t) {
|
|
|
332
341
|
/** @type {TemplateNode} */
|
|
333
342
|
e.e.nodes_start
|
|
334
343
|
); n !== null && n !== r; ) {
|
|
335
|
-
var
|
|
344
|
+
var i = (
|
|
336
345
|
/** @type {TemplateNode} */
|
|
337
346
|
ke(n)
|
|
338
347
|
);
|
|
339
|
-
s.before(n), n =
|
|
348
|
+
s.before(n), n = i;
|
|
340
349
|
}
|
|
341
350
|
}
|
|
342
351
|
function T(e, a, t) {
|
|
@@ -363,19 +372,19 @@ function at(e, a, t) {
|
|
|
363
372
|
return r === "" ? null : r;
|
|
364
373
|
}
|
|
365
374
|
function rt(e, a, t, r, s, n) {
|
|
366
|
-
var
|
|
367
|
-
if (E ||
|
|
368
|
-
var
|
|
369
|
-
(!E ||
|
|
375
|
+
var i = e.__className;
|
|
376
|
+
if (E || i !== t || i === void 0) {
|
|
377
|
+
var l = at(t);
|
|
378
|
+
(!E || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = t;
|
|
370
379
|
}
|
|
371
380
|
return n;
|
|
372
381
|
}
|
|
373
382
|
const st = Symbol("is custom element"), nt = Symbol("is html");
|
|
374
|
-
function
|
|
375
|
-
var s =
|
|
383
|
+
function it(e, a, t, r) {
|
|
384
|
+
var s = lt(e);
|
|
376
385
|
E && (s[a] = e.getAttribute(a)), s[a] !== (s[a] = t) && (t == null ? e.removeAttribute(a) : typeof t != "string" && ft(e).includes(a) ? e[a] = t : e.setAttribute(a, t));
|
|
377
386
|
}
|
|
378
|
-
function
|
|
387
|
+
function lt(e) {
|
|
379
388
|
return (
|
|
380
389
|
/** @type {Record<string | symbol, unknown>} **/
|
|
381
390
|
// @ts-expect-error
|
|
@@ -392,8 +401,8 @@ function ft(e) {
|
|
|
392
401
|
ae.set(a, t = []);
|
|
393
402
|
for (var r, s = e, n = Element.prototype; n !== s; ) {
|
|
394
403
|
r = Oe(s);
|
|
395
|
-
for (var
|
|
396
|
-
r[
|
|
404
|
+
for (var i in r)
|
|
405
|
+
r[i].set && t.push(i);
|
|
397
406
|
s = Fe(s);
|
|
398
407
|
}
|
|
399
408
|
return t;
|
|
@@ -403,17 +412,17 @@ function ut(e, a, t = a) {
|
|
|
403
412
|
Ve(e, "input", async (s) => {
|
|
404
413
|
var n = s ? e.defaultValue : e.value;
|
|
405
414
|
if (n = X(e) ? z(n) : n, t(n), N !== null && r.add(N), await Be(), n !== (n = a())) {
|
|
406
|
-
var
|
|
407
|
-
if (e.value = n ?? "",
|
|
415
|
+
var i = e.selectionStart, l = e.selectionEnd, c = e.value.length;
|
|
416
|
+
if (e.value = n ?? "", l !== null) {
|
|
408
417
|
var v = e.value.length;
|
|
409
|
-
|
|
418
|
+
i === l && l === c && v > c ? (e.selectionStart = v, e.selectionEnd = v) : (e.selectionStart = i, e.selectionEnd = Math.min(l, v));
|
|
410
419
|
}
|
|
411
420
|
}
|
|
412
421
|
}), // If we are hydrating and the value has since changed,
|
|
413
422
|
// then use the updated value from the input instead.
|
|
414
423
|
(E && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
|
|
415
424
|
// TODO Svelte 6: remove input.value check and set to empty string?
|
|
416
|
-
|
|
425
|
+
P(a) == null && e.value) && (t(X(e) ? z(e.value) : e.value), N !== null && r.add(N)), Ue(() => {
|
|
417
426
|
var s = a();
|
|
418
427
|
if (e === document.activeElement) {
|
|
419
428
|
var n = (
|
|
@@ -437,61 +446,61 @@ var ot = Y("<button> </button>"), ct = Y('<div><button class="HTMLEditor">HTML</
|
|
|
437
446
|
function me(e, a) {
|
|
438
447
|
he(a, !1);
|
|
439
448
|
const t = $e();
|
|
440
|
-
let r =
|
|
449
|
+
let r = F(a, "buttons", 28, () => []);
|
|
441
450
|
function s() {
|
|
442
451
|
t("html", {});
|
|
443
452
|
}
|
|
444
453
|
function n() {
|
|
445
454
|
t("plain", {});
|
|
446
455
|
}
|
|
447
|
-
var
|
|
456
|
+
var i = {
|
|
448
457
|
get buttons() {
|
|
449
458
|
return r();
|
|
450
459
|
},
|
|
451
460
|
set buttons(g) {
|
|
452
|
-
r(g),
|
|
461
|
+
r(g), O();
|
|
453
462
|
}
|
|
454
463
|
};
|
|
455
464
|
ce();
|
|
456
|
-
var
|
|
465
|
+
var l = ct(), c = B(l), v = Z(c, 2), m = Z(v, 2);
|
|
457
466
|
return Ze(m, 1, r, Je, (g, u) => {
|
|
458
467
|
var d = ot(), f = B(d, !0);
|
|
459
468
|
U(d), qe(() => {
|
|
460
|
-
rt(d, 1, tt((x(u),
|
|
469
|
+
rt(d, 1, tt((x(u), P(() => x(u).style)))), it(d, "title", (x(u), P(() => x(u).text))), Ke(f, (x(u), P(() => x(u).text)));
|
|
461
470
|
}), K("click", d, function(...o) {
|
|
462
471
|
x(u).handler?.apply(this, o);
|
|
463
472
|
}), V(g, d);
|
|
464
|
-
}), U(
|
|
473
|
+
}), U(l), K("click", c, s), K("click", v, n), V(e, l), ve(i);
|
|
465
474
|
}
|
|
466
475
|
oe(me, { buttons: {} }, [], [], !0);
|
|
467
476
|
var vt = Y("<textarea></textarea>"), ht = Y('<main><div class="Editor"><!></div> <!></main>');
|
|
468
477
|
function dt(e, a) {
|
|
469
478
|
he(a, !1);
|
|
470
|
-
let t =
|
|
479
|
+
let t = F(a, "value", 12, ""), r = F(a, "buttons", 28, () => []), s = F(a, "html", 12, !0);
|
|
471
480
|
function n() {
|
|
472
481
|
s() || s(!0);
|
|
473
482
|
}
|
|
474
|
-
function
|
|
483
|
+
function i() {
|
|
475
484
|
s() && (t(t().replace(/<[^>]*>?/gm, "")), s(!1));
|
|
476
485
|
}
|
|
477
|
-
var
|
|
486
|
+
var l = {
|
|
478
487
|
get value() {
|
|
479
488
|
return t();
|
|
480
489
|
},
|
|
481
490
|
set value(f) {
|
|
482
|
-
t(f),
|
|
491
|
+
t(f), O();
|
|
483
492
|
},
|
|
484
493
|
get buttons() {
|
|
485
494
|
return r();
|
|
486
495
|
},
|
|
487
496
|
set buttons(f) {
|
|
488
|
-
r(f),
|
|
497
|
+
r(f), O();
|
|
489
498
|
},
|
|
490
499
|
get html() {
|
|
491
500
|
return s();
|
|
492
501
|
},
|
|
493
502
|
set html(f) {
|
|
494
|
-
s(f),
|
|
503
|
+
s(f), O();
|
|
495
504
|
}
|
|
496
505
|
};
|
|
497
506
|
ce();
|
|
@@ -524,8 +533,8 @@ function dt(e, a) {
|
|
|
524
533
|
set buttons(f) {
|
|
525
534
|
r(f);
|
|
526
535
|
},
|
|
527
|
-
$$events: { html: n, plain:
|
|
536
|
+
$$events: { html: n, plain: i },
|
|
528
537
|
$$legacy: !0
|
|
529
|
-
}), U(c), V(e, c), ve(
|
|
538
|
+
}), U(c), V(e, c), ve(l);
|
|
530
539
|
}
|
|
531
540
|
customElements.define("switchable-editor", oe(dt, { value: {}, buttons: {}, html: {} }, [], [], !1));
|
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.
|
|
6
|
+
"version": "0.0.81",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist/*"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
29
29
|
"@tsconfig/svelte": "^5.0.5",
|
|
30
|
-
"svelte": "^5.
|
|
30
|
+
"svelte": "^5.43.0",
|
|
31
31
|
"svelte-check": "^4.3.3",
|
|
32
32
|
"tslib": "^2.8.1",
|
|
33
33
|
"typescript": "^5.9.3",
|