@jackuait/blok 0.6.0-beta.6 → 0.6.0-beta.7
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/blok.mjs +2 -2
- package/dist/chunks/{blok-BOtlKwVO.mjs → blok-Bjkxis7j.mjs} +177 -176
- package/dist/chunks/{i18next-loader-CJNShSyT.mjs → i18next-loader-D-sjerXt.mjs} +1 -1
- package/dist/chunks/{index-BUAPAChM.mjs → index-CJfN4Vuv.mjs} +1 -1
- package/dist/chunks/{inline-tool-convert-UoYdJJic.mjs → inline-tool-convert-5DE7c2fi.mjs} +1 -1
- package/dist/full.mjs +2 -2
- package/dist/tools.mjs +3 -3
- package/package.json +1 -1
- package/src/components/modules/rectangleSelection.ts +7 -3
- package/src/components/modules/saver.ts +3 -2
- package/src/components/modules/toolbar/index.ts +46 -11
- package/src/components/modules/toolbar/plus-button.ts +22 -1
- package/src/tools/table/table-add-controls.ts +1 -1
|
@@ -9,7 +9,7 @@ var Io = (s, t, e) => t in s ? qi(s, t, { enumerable: !0, configurable: !0, writ
|
|
|
9
9
|
for (var e of Ce(t))
|
|
10
10
|
cs.call(t, e) && Io(s, e, t[e]);
|
|
11
11
|
return s;
|
|
12
|
-
},
|
|
12
|
+
}, j = (s, t) => Zi(s, Ji(t));
|
|
13
13
|
var Eo = (s, t) => {
|
|
14
14
|
var e = {};
|
|
15
15
|
for (var o in s)
|
|
@@ -20,7 +20,7 @@ var Eo = (s, t) => {
|
|
|
20
20
|
return e;
|
|
21
21
|
};
|
|
22
22
|
var Ie = (s, t, e) => Io(s, typeof t != "symbol" ? t + "" : t, e);
|
|
23
|
-
import { L as uo, l as C, c as Qi, i as z, a as k, S as w, D as y, t as O, b as I, P as G, E as yn, g as wt, d as tl, e as gr, f as $e, h as st, j as A, k as le, m as Ut, n as kr, s as el, o as po, p as Bn, q as wn, r as
|
|
23
|
+
import { L as uo, l as C, c as Qi, i as z, a as k, S as w, D as y, t as O, b as I, P as G, E as yn, g as wt, d as tl, e as gr, f as $e, h as st, j as A, k as le, m as Ut, n as kr, s as el, o as po, p as Bn, q as wn, r as S, u as Vo, v as hs, F as ae, w as Wo, x as ds, y as us, z as ut, A as ol, B as nl, C as sl, I as rl, G as Xo, H as Ke, J as ce, K as Mt, M as br, N as Ot, O as K, Q as Ht, R as il, T as ll, U as ps, V as al, W as cl, X as hl, Y as dl, Z as ul, _ as mr, $ as pl, a0 as yr, a1 as Br, a2 as Ct, a3 as fl, a4 as wr, a5 as vr, a6 as gl, a7 as kl, a8 as bl, a9 as ml, aa as yl, ab as Bl, ac as fs, ad as xr, ae as wl, af as vl, ag as xl, ah as Tl, ai as Sl, aj as Cl, ak as Il, al as El } from "./inline-tool-convert-5DE7c2fi.mjs";
|
|
24
24
|
function Ml(s) {
|
|
25
25
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
26
26
|
}
|
|
@@ -1783,7 +1783,7 @@ class ql {
|
|
|
1783
1783
|
* @returns {Promise<NotifierModule>} loaded notifier module
|
|
1784
1784
|
*/
|
|
1785
1785
|
loadNotifierModule() {
|
|
1786
|
-
return this.notifierModule !== null ? Promise.resolve(this.notifierModule) : (this.loadingPromise === null && (this.loadingPromise = import("./index-
|
|
1786
|
+
return this.notifierModule !== null ? Promise.resolve(this.notifierModule) : (this.loadingPromise === null && (this.loadingPromise = import("./index-CJfN4Vuv.mjs").then((t) => {
|
|
1787
1787
|
const e = t;
|
|
1788
1788
|
if (!this.isNotifierModule(e))
|
|
1789
1789
|
throw new Error('notifier module does not expose a "show" method.');
|
|
@@ -1919,8 +1919,8 @@ function ta() {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
var b = i(f), g;
|
|
1921
1921
|
b && (g = Array.prototype.some.call(f.childNodes, n));
|
|
1922
|
-
var m = !!u.parentNode, v = n(u) && n(f) && m,
|
|
1923
|
-
if (Q || c(f,
|
|
1922
|
+
var m = !!u.parentNode, v = n(u) && n(f) && m, T = f.nodeName.toLowerCase(), L = a(this.config, T, f), Q = b && g;
|
|
1923
|
+
if (Q || c(f, L) || !this.config.keepNestedBlockElements && v) {
|
|
1924
1924
|
if (!(f.nodeName === "SCRIPT" || f.nodeName === "STYLE"))
|
|
1925
1925
|
for (; f.childNodes.length > 0; )
|
|
1926
1926
|
u.insertBefore(f.childNodes[0], f);
|
|
@@ -1929,7 +1929,7 @@ function ta() {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
for (var X = 0; X < f.attributes.length; X += 1) {
|
|
1931
1931
|
var St = f.attributes[X];
|
|
1932
|
-
h(St,
|
|
1932
|
+
h(St, L, f) && (f.removeAttribute(St.name), X = X - 1);
|
|
1933
1933
|
}
|
|
1934
1934
|
this._sanitize(d, f);
|
|
1935
1935
|
} while (f = p.nextSibling());
|
|
@@ -1959,7 +1959,7 @@ function ta() {
|
|
|
1959
1959
|
var ea = ta();
|
|
1960
1960
|
const oa = /* @__PURE__ */ Ml(ea), na = /^\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)/i, sa = /\s*(?:href|src)\s*=\s*(?:"\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^"]*"|'\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^']*|(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^ \t\r\n>]*)/gi, fo = (s, t, e = {}) => s.map((o) => {
|
|
1961
1961
|
const n = I(t) ? t(o.tool) : t, r = n != null ? n : {};
|
|
1962
|
-
return A(r) && z(r) && z(e) ? o :
|
|
1962
|
+
return A(r) && z(r) && z(e) ? o : j(B({}, o), {
|
|
1963
1963
|
data: xn(o.data, r, e)
|
|
1964
1964
|
});
|
|
1965
1965
|
}), ct = (s, t = {}) => {
|
|
@@ -2508,30 +2508,30 @@ const In = () => new we(), za = (s) => {
|
|
|
2508
2508
|
}, Ya = (s, t) => {
|
|
2509
2509
|
const e = s.cbuf.length;
|
|
2510
2510
|
e - s.cpos < t && (s.bufs.push(new Uint8Array(s.cbuf.buffer, 0, s.cpos)), s.cbuf = new Uint8Array(Jt(e, t) * 2), s.cpos = 0);
|
|
2511
|
-
},
|
|
2511
|
+
}, _ = (s, t) => {
|
|
2512
2512
|
const e = s.cbuf.length;
|
|
2513
2513
|
s.cpos === e && (s.bufs.push(s.cbuf), s.cbuf = new Uint8Array(e * 2), s.cpos = 0), s.cbuf[s.cpos++] = t;
|
|
2514
|
-
}, Qo =
|
|
2514
|
+
}, Qo = _, E = (s, t) => {
|
|
2515
2515
|
for (; t > ne; )
|
|
2516
|
-
|
|
2517
|
-
|
|
2516
|
+
_(s, We | ne & t), t = ft(t / 128);
|
|
2517
|
+
_(s, ne & t);
|
|
2518
2518
|
}, En = (s, t) => {
|
|
2519
2519
|
const e = Ea(t);
|
|
2520
|
-
for (e && (t = -t),
|
|
2521
|
-
|
|
2520
|
+
for (e && (t = -t), _(s, (t > ws ? We : 0) | (e ? Mr : 0) | ws & t), t = ft(t / 64); t > 0; )
|
|
2521
|
+
_(s, (t > ne ? We : 0) | ne & t), t = ft(t / 128);
|
|
2522
2522
|
}, tn = new Uint8Array(3e4), $a = tn.length / 3, Ka = (s, t) => {
|
|
2523
2523
|
if (t.length < $a) {
|
|
2524
2524
|
const e = ue.encodeInto(t, tn).written || 0;
|
|
2525
2525
|
E(s, e);
|
|
2526
2526
|
for (let o = 0; o < e; o++)
|
|
2527
|
-
|
|
2527
|
+
_(s, tn[o]);
|
|
2528
2528
|
} else
|
|
2529
2529
|
Z(s, ja(t));
|
|
2530
2530
|
}, Va = (s, t) => {
|
|
2531
2531
|
const e = unescape(encodeURIComponent(t)), o = e.length;
|
|
2532
2532
|
E(s, o);
|
|
2533
2533
|
for (let n = 0; n < o; n++)
|
|
2534
|
-
|
|
2534
|
+
_(
|
|
2535
2535
|
s,
|
|
2536
2536
|
/** @type {number} */
|
|
2537
2537
|
e.codePointAt(n)
|
|
@@ -2552,25 +2552,25 @@ ue.encodeInto ? Ka : Va, Mn = (s, t) => {
|
|
|
2552
2552
|
), Ss = new DataView(new ArrayBuffer(4)), qa = (s) => (Ss.setFloat32(0, s), Ss.getFloat32(0) === s), pe = (s, t) => {
|
|
2553
2553
|
switch (typeof t) {
|
|
2554
2554
|
case "string":
|
|
2555
|
-
|
|
2555
|
+
_(s, 119), Ft(s, t);
|
|
2556
2556
|
break;
|
|
2557
2557
|
case "number":
|
|
2558
|
-
Ra(t) && Le(t) <= Da ? (
|
|
2558
|
+
Ra(t) && Le(t) <= Da ? (_(s, 125), En(s, t)) : qa(t) ? (_(s, 124), Wa(s, t)) : (_(s, 123), Xa(s, t));
|
|
2559
2559
|
break;
|
|
2560
2560
|
case "bigint":
|
|
2561
|
-
|
|
2561
|
+
_(s, 122), Ga(s, t);
|
|
2562
2562
|
break;
|
|
2563
2563
|
case "object":
|
|
2564
2564
|
if (t === null)
|
|
2565
|
-
|
|
2565
|
+
_(s, 126);
|
|
2566
2566
|
else if ($t(t)) {
|
|
2567
|
-
|
|
2567
|
+
_(s, 117), E(s, t.length);
|
|
2568
2568
|
for (let e = 0; e < t.length; e++)
|
|
2569
2569
|
pe(s, t[e]);
|
|
2570
2570
|
} else if (t instanceof Uint8Array)
|
|
2571
|
-
|
|
2571
|
+
_(s, 116), Z(s, t);
|
|
2572
2572
|
else {
|
|
2573
|
-
|
|
2573
|
+
_(s, 118);
|
|
2574
2574
|
const e = Object.keys(t);
|
|
2575
2575
|
E(s, e.length);
|
|
2576
2576
|
for (let o = 0; o < e.length; o++) {
|
|
@@ -2580,10 +2580,10 @@ ue.encodeInto ? Ka : Va, Mn = (s, t) => {
|
|
|
2580
2580
|
}
|
|
2581
2581
|
break;
|
|
2582
2582
|
case "boolean":
|
|
2583
|
-
|
|
2583
|
+
_(s, t ? 120 : 121);
|
|
2584
2584
|
break;
|
|
2585
2585
|
default:
|
|
2586
|
-
|
|
2586
|
+
_(s, 127);
|
|
2587
2587
|
}
|
|
2588
2588
|
};
|
|
2589
2589
|
class Cs extends we {
|
|
@@ -3006,7 +3006,7 @@ class Ln extends $ {
|
|
|
3006
3006
|
return !o && (e == null || e.extend(null, "custom prop", t == null ? void 0 : t.constructor.name, "failed to check custom prop")), o;
|
|
3007
3007
|
}
|
|
3008
3008
|
}
|
|
3009
|
-
const
|
|
3009
|
+
const F = (s) => new Ln(s);
|
|
3010
3010
|
N(Ln);
|
|
3011
3011
|
class go extends $ {
|
|
3012
3012
|
/**
|
|
@@ -3128,7 +3128,7 @@ let qe = lo;
|
|
|
3128
3128
|
const Ic = (s) => (
|
|
3129
3129
|
/** @type {any} */
|
|
3130
3130
|
new qe(s)
|
|
3131
|
-
), Ec = N(qe), Mc =
|
|
3131
|
+
), Ec = N(qe), Mc = F((s) => s != null && (s.constructor === Object || s.constructor == null));
|
|
3132
3132
|
class Fr extends $ {
|
|
3133
3133
|
/**
|
|
3134
3134
|
* @param {Keys} keys
|
|
@@ -3194,7 +3194,7 @@ class zr extends $ {
|
|
|
3194
3194
|
return !o && (e == null || e.extend(null, "Array", "")), o;
|
|
3195
3195
|
}
|
|
3196
3196
|
}
|
|
3197
|
-
const Yr = (...s) => new zr(s), Rc = N(zr), Oc =
|
|
3197
|
+
const Yr = (...s) => new zr(s), Rc = N(zr), Oc = F((s) => $t(s));
|
|
3198
3198
|
class $r extends $ {
|
|
3199
3199
|
/**
|
|
3200
3200
|
* @param {new (...args:any) => T} constructor
|
|
@@ -3233,7 +3233,7 @@ class _c extends $ {
|
|
|
3233
3233
|
return !o && (e == null || e.extend(null, "function", typeof t)), o;
|
|
3234
3234
|
}
|
|
3235
3235
|
}
|
|
3236
|
-
const Pc = N(_c), Hc =
|
|
3236
|
+
const Pc = N(_c), Hc = F((s) => typeof s == "function");
|
|
3237
3237
|
class Fc extends $ {
|
|
3238
3238
|
/**
|
|
3239
3239
|
* @param {T} v
|
|
@@ -3273,23 +3273,23 @@ Ie(bo, "_dilutes", !0);
|
|
|
3273
3273
|
const Qt = (...s) => s.findIndex((t) => Ze.check(t)) >= 0 ? Qt(...s.map((t) => ke(t)).map((t) => Ze.check(t) ? t.shape : [t]).flat(1)) : s.length === 1 ? s[0] : new bo(s), Ze = (
|
|
3274
3274
|
/** @type {Schema<$Union<any>>} */
|
|
3275
3275
|
N(bo)
|
|
3276
|
-
), Kr = () => !0, Je =
|
|
3276
|
+
), Kr = () => !0, Je = F(Kr), jc = (
|
|
3277
3277
|
/** @type {Schema<Schema<any>>} */
|
|
3278
3278
|
N(Ln, (s) => s.shape === Kr)
|
|
3279
|
-
), _n =
|
|
3279
|
+
), _n = F((s) => typeof s == "bigint"), Uc = (
|
|
3280
3280
|
/** @type {Schema<Schema<BigInt>>} */
|
|
3281
|
-
|
|
3282
|
-
), Vr =
|
|
3283
|
-
|
|
3284
|
-
const jt =
|
|
3281
|
+
F((s) => s === _n)
|
|
3282
|
+
), Vr = F((s) => typeof s == "symbol");
|
|
3283
|
+
F((s) => s === Vr);
|
|
3284
|
+
const jt = F((s) => typeof s == "number"), Wr = (
|
|
3285
3285
|
/** @type {Schema<Schema<number>>} */
|
|
3286
|
-
|
|
3287
|
-
), Kt =
|
|
3286
|
+
F((s) => s === jt)
|
|
3287
|
+
), Kt = F((s) => typeof s == "string"), Xr = (
|
|
3288
3288
|
/** @type {Schema<Schema<string>>} */
|
|
3289
|
-
|
|
3290
|
-
), mo =
|
|
3289
|
+
F((s) => s === Kt)
|
|
3290
|
+
), mo = F((s) => typeof s == "boolean"), zc = (
|
|
3291
3291
|
/** @type {Schema<Schema<Boolean>>} */
|
|
3292
|
-
|
|
3292
|
+
F((s) => s === mo)
|
|
3293
3293
|
), Gr = ko(void 0);
|
|
3294
3294
|
N(go, (s) => s.shape.length === 1 && s.shape[0] === void 0);
|
|
3295
3295
|
ko(void 0);
|
|
@@ -3447,12 +3447,12 @@ const Vc = (s) => new Kc(
|
|
|
3447
3447
|
/** @type {Document} */
|
|
3448
3448
|
typeof document != "undefined" ? document : {}
|
|
3449
3449
|
);
|
|
3450
|
-
|
|
3450
|
+
F((s) => s.nodeType === Zc);
|
|
3451
3451
|
typeof DOMParser != "undefined" && new DOMParser();
|
|
3452
|
-
|
|
3453
|
-
|
|
3452
|
+
F((s) => s.nodeType === Xc);
|
|
3453
|
+
F((s) => s.nodeType === Gc);
|
|
3454
3454
|
const Wc = (s) => Ta(s, (t, e) => `${e}:${t};`).join(""), Xc = Bo.ELEMENT_NODE, Gc = Bo.TEXT_NODE, qc = Bo.DOCUMENT_NODE, Zc = Bo.DOCUMENT_FRAGMENT_NODE;
|
|
3455
|
-
|
|
3455
|
+
F((s) => s.nodeType === qc);
|
|
3456
3456
|
const mt = Symbol, Zr = mt(), Jr = mt(), Jc = mt(), Qc = mt(), th = mt(), Qr = mt(), eh = mt(), Pn = mt(), oh = mt(), nh = (s) => {
|
|
3457
3457
|
var n;
|
|
3458
3458
|
s.length === 1 && ((n = s[0]) == null ? void 0 : n.constructor) === Function && (s = /** @type {Array<string|Symbol|Object|number>} */
|
|
@@ -3701,14 +3701,14 @@ class Rt extends Ir {
|
|
|
3701
3701
|
*/
|
|
3702
3702
|
get(t, e = (
|
|
3703
3703
|
/** @type {any} */
|
|
3704
|
-
|
|
3704
|
+
P
|
|
3705
3705
|
)) {
|
|
3706
3706
|
const o = Zt(this.share, t, () => {
|
|
3707
3707
|
const r = new e();
|
|
3708
3708
|
return r._integrate(this, null), r;
|
|
3709
3709
|
}), n = o.constructor;
|
|
3710
|
-
if (e !==
|
|
3711
|
-
if (n ===
|
|
3710
|
+
if (e !== P && n !== e)
|
|
3711
|
+
if (n === P) {
|
|
3712
3712
|
const r = new e();
|
|
3713
3713
|
r._map = o._map, o._map.forEach(
|
|
3714
3714
|
/** @param {Item?} n */
|
|
@@ -3810,7 +3810,7 @@ class Rt extends Ir {
|
|
|
3810
3810
|
/** @type {ContentDoc} */
|
|
3811
3811
|
t.content
|
|
3812
3812
|
);
|
|
3813
|
-
e.doc = new Rt(
|
|
3813
|
+
e.doc = new Rt(j(B({ guid: this.guid }, e.opts), { shouldLoad: !1 })), e.doc._item = t, M(
|
|
3814
3814
|
/** @type {any} */
|
|
3815
3815
|
t.parent.doc,
|
|
3816
3816
|
(o) => {
|
|
@@ -4393,8 +4393,8 @@ class Ih extends Ir {
|
|
|
4393
4393
|
c ? this.stopCapturing() : h || this.clear(!1, !0);
|
|
4394
4394
|
const u = new Hn();
|
|
4395
4395
|
a.afterState.forEach((g, m) => {
|
|
4396
|
-
const v = a.beforeState.get(m) || 0,
|
|
4397
|
-
|
|
4396
|
+
const v = a.beforeState.get(m) || 0, T = g - v;
|
|
4397
|
+
T > 0 && jn(u, m, v, T);
|
|
4398
4398
|
});
|
|
4399
4399
|
const p = ec();
|
|
4400
4400
|
let f = !1;
|
|
@@ -4429,7 +4429,7 @@ class Ih extends Ir {
|
|
|
4429
4429
|
addToScope(t) {
|
|
4430
4430
|
const e = new Set(this.scope);
|
|
4431
4431
|
t = $t(t) ? t : [t], t.forEach((o) => {
|
|
4432
|
-
e.has(o) || (e.add(o), (o instanceof
|
|
4432
|
+
e.has(o) || (e.add(o), (o instanceof P ? o.doc !== this.doc : o !== this.doc) && ei("[yjs#509] Not same Y.Doc"), this.scope.push(o));
|
|
4433
4433
|
});
|
|
4434
4434
|
}
|
|
4435
4435
|
/**
|
|
@@ -4741,7 +4741,7 @@ const Ah = (s) => {
|
|
|
4741
4741
|
s._item.parent;
|
|
4742
4742
|
ri(o._eH, e, t);
|
|
4743
4743
|
};
|
|
4744
|
-
class
|
|
4744
|
+
class P {
|
|
4745
4745
|
constructor() {
|
|
4746
4746
|
this._item = null, this._map = /* @__PURE__ */ new Map(), this._start = null, this.doc = null, this._length = 0, this._eH = Ns(), this._dEH = Ns(), this._searchMarker = null;
|
|
4747
4747
|
}
|
|
@@ -4966,7 +4966,7 @@ const di = (s, t, e) => {
|
|
|
4966
4966
|
)), n.integrate(s, 0);
|
|
4967
4967
|
break;
|
|
4968
4968
|
default:
|
|
4969
|
-
if (d instanceof
|
|
4969
|
+
if (d instanceof P)
|
|
4970
4970
|
n = new R(D(i, W(l, i)), n, n && n.lastId, a, a && a.id, t, null, new Tt(d)), n.integrate(s, 0);
|
|
4971
4971
|
else
|
|
4972
4972
|
throw new Error("Unexpected content type in insert operation");
|
|
@@ -5044,7 +5044,7 @@ const di = (s, t, e) => {
|
|
|
5044
5044
|
);
|
|
5045
5045
|
break;
|
|
5046
5046
|
default:
|
|
5047
|
-
if (o instanceof
|
|
5047
|
+
if (o instanceof P)
|
|
5048
5048
|
l = new Tt(o);
|
|
5049
5049
|
else
|
|
5050
5050
|
throw new Error("Unexpected content type");
|
|
@@ -5084,7 +5084,7 @@ const di = (s, t, e) => {
|
|
|
5084
5084
|
};
|
|
5085
5085
|
class Lh extends wo {
|
|
5086
5086
|
}
|
|
5087
|
-
class At extends
|
|
5087
|
+
class At extends P {
|
|
5088
5088
|
constructor() {
|
|
5089
5089
|
super(), this._prelimContent = [], this._searchMarker = [];
|
|
5090
5090
|
}
|
|
@@ -5131,7 +5131,7 @@ class At extends _ {
|
|
|
5131
5131
|
clone() {
|
|
5132
5132
|
const t = new At();
|
|
5133
5133
|
return t.insert(0, this.toArray().map(
|
|
5134
|
-
(e) => e instanceof
|
|
5134
|
+
(e) => e instanceof P ? (
|
|
5135
5135
|
/** @type {typeof el} */
|
|
5136
5136
|
e.clone()
|
|
5137
5137
|
) : e
|
|
@@ -5247,7 +5247,7 @@ class At extends _ {
|
|
|
5247
5247
|
* @return {Array<any>}
|
|
5248
5248
|
*/
|
|
5249
5249
|
toJSON() {
|
|
5250
|
-
return this.map((t) => t instanceof
|
|
5250
|
+
return this.map((t) => t instanceof P ? t.toJSON() : t);
|
|
5251
5251
|
}
|
|
5252
5252
|
/**
|
|
5253
5253
|
* Returns an Array with the result of calling a provided function on every
|
|
@@ -5296,7 +5296,7 @@ class _h extends wo {
|
|
|
5296
5296
|
super(t, e), this.keysChanged = o;
|
|
5297
5297
|
}
|
|
5298
5298
|
}
|
|
5299
|
-
class J extends
|
|
5299
|
+
class J extends P {
|
|
5300
5300
|
/**
|
|
5301
5301
|
*
|
|
5302
5302
|
* @param {Iterable<readonly [string, any]>=} entries - an optional iterable to initialize the YMap
|
|
@@ -5335,7 +5335,7 @@ class J extends _ {
|
|
|
5335
5335
|
clone() {
|
|
5336
5336
|
const t = new J();
|
|
5337
5337
|
return this.forEach((e, o) => {
|
|
5338
|
-
t.set(o, e instanceof
|
|
5338
|
+
t.set(o, e instanceof P ? (
|
|
5339
5339
|
/** @type {typeof value} */
|
|
5340
5340
|
e.clone()
|
|
5341
5341
|
) : e);
|
|
@@ -5362,7 +5362,7 @@ class J extends _ {
|
|
|
5362
5362
|
return this._map.forEach((o, n) => {
|
|
5363
5363
|
if (!o.deleted) {
|
|
5364
5364
|
const r = o.content.getContent()[o.length - 1];
|
|
5365
|
-
t[n] = r instanceof
|
|
5365
|
+
t[n] = r instanceof P ? r.toJSON() : r;
|
|
5366
5366
|
}
|
|
5367
5367
|
}), t;
|
|
5368
5368
|
}
|
|
@@ -5515,7 +5515,7 @@ class rn {
|
|
|
5515
5515
|
*/
|
|
5516
5516
|
forward() {
|
|
5517
5517
|
switch (this.right === null && gt(), this.right.content.constructor) {
|
|
5518
|
-
case
|
|
5518
|
+
case H:
|
|
5519
5519
|
this.right.deleted || te(
|
|
5520
5520
|
this.currentAttributes,
|
|
5521
5521
|
/** @type {ContentFormat} */
|
|
@@ -5532,7 +5532,7 @@ class rn {
|
|
|
5532
5532
|
const Ys = (s, t, e) => {
|
|
5533
5533
|
for (; t.right !== null && e > 0; ) {
|
|
5534
5534
|
switch (t.right.content.constructor) {
|
|
5535
|
-
case
|
|
5535
|
+
case H:
|
|
5536
5536
|
t.right.deleted || te(
|
|
5537
5537
|
t.currentAttributes,
|
|
5538
5538
|
/** @type {ContentFormat} */
|
|
@@ -5556,7 +5556,7 @@ const Ys = (s, t, e) => {
|
|
|
5556
5556
|
return Ys(s, i, e);
|
|
5557
5557
|
}
|
|
5558
5558
|
}, Bi = (s, t, e, o) => {
|
|
5559
|
-
for (; e.right !== null && (e.right.deleted === !0 || e.right.content.constructor ===
|
|
5559
|
+
for (; e.right !== null && (e.right.deleted === !0 || e.right.content.constructor === H && Bt(
|
|
5560
5560
|
o.get(
|
|
5561
5561
|
/** @type {ContentFormat} */
|
|
5562
5562
|
e.right.content.key
|
|
@@ -5570,7 +5570,7 @@ const Ys = (s, t, e) => {
|
|
|
5570
5570
|
), e.forward();
|
|
5571
5571
|
const n = s.doc, r = n.clientID;
|
|
5572
5572
|
o.forEach((i, l) => {
|
|
5573
|
-
const a = e.left, c = e.right, h = new R(D(r, W(n.store, r)), a, a && a.lastId, c, c && c.id, t, null, new
|
|
5573
|
+
const a = e.left, c = e.right, h = new R(D(r, W(n.store, r)), a, a && a.lastId, c, c && c.id, t, null, new H(l, i));
|
|
5574
5574
|
h.integrate(s, 0), e.right = h, e.forward();
|
|
5575
5575
|
});
|
|
5576
5576
|
}, te = (s, t) => {
|
|
@@ -5579,7 +5579,7 @@ const Ys = (s, t, e) => {
|
|
|
5579
5579
|
}, wi = (s, t) => {
|
|
5580
5580
|
var e;
|
|
5581
5581
|
for (; s.right !== null; ) {
|
|
5582
|
-
if (!(s.right.deleted || s.right.content.constructor ===
|
|
5582
|
+
if (!(s.right.deleted || s.right.content.constructor === H && Bt(
|
|
5583
5583
|
(e = t[
|
|
5584
5584
|
/** @type {ContentFormat} */
|
|
5585
5585
|
s.right.content.key
|
|
@@ -5597,7 +5597,7 @@ const Ys = (s, t, e) => {
|
|
|
5597
5597
|
if (!Bt(h, c)) {
|
|
5598
5598
|
i.set(a, h);
|
|
5599
5599
|
const { left: d, right: u } = e;
|
|
5600
|
-
e.right = new R(D(r, W(n.store, r)), d, d && d.lastId, u, u && u.id, t, null, new
|
|
5600
|
+
e.right = new R(D(r, W(n.store, r)), d, d && d.lastId, u, u && u.id, t, null, new H(a, c)), e.right.integrate(s, 0), e.forward();
|
|
5601
5601
|
}
|
|
5602
5602
|
}
|
|
5603
5603
|
return i;
|
|
@@ -5610,17 +5610,17 @@ const Ys = (s, t, e) => {
|
|
|
5610
5610
|
const l = vi(s, t, e, n), a = o.constructor === String ? new bt(
|
|
5611
5611
|
/** @type {string} */
|
|
5612
5612
|
o
|
|
5613
|
-
) : o instanceof
|
|
5613
|
+
) : o instanceof P ? new Tt(o) : new ee(o);
|
|
5614
5614
|
let { left: c, right: h, index: d } = e;
|
|
5615
5615
|
t._searchMarker && be(t._searchMarker, e.index, a.getLength()), h = new R(D(i, W(r.store, i)), c, c && c.lastId, h, h && h.id, t, null, a), h.integrate(s, 0), e.right = h, e.index = d, e.forward(), Bi(s, t, e, l);
|
|
5616
5616
|
}, $s = (s, t, e, o, n) => {
|
|
5617
5617
|
const r = s.doc, i = r.clientID;
|
|
5618
5618
|
wi(e, n);
|
|
5619
5619
|
const l = vi(s, t, e, n);
|
|
5620
|
-
t: for (; e.right !== null && (o > 0 || l.size > 0 && (e.right.deleted || e.right.content.constructor ===
|
|
5620
|
+
t: for (; e.right !== null && (o > 0 || l.size > 0 && (e.right.deleted || e.right.content.constructor === H)); ) {
|
|
5621
5621
|
if (!e.right.deleted)
|
|
5622
5622
|
switch (e.right.content.constructor) {
|
|
5623
|
-
case
|
|
5623
|
+
case H: {
|
|
5624
5624
|
const { key: a, value: c } = (
|
|
5625
5625
|
/** @type {ContentFormat} */
|
|
5626
5626
|
e.right.content
|
|
@@ -5657,7 +5657,7 @@ const Ys = (s, t, e) => {
|
|
|
5657
5657
|
let r = t;
|
|
5658
5658
|
const i = at();
|
|
5659
5659
|
for (; r && (!r.countable || r.deleted); ) {
|
|
5660
|
-
if (!r.deleted && r.content.constructor ===
|
|
5660
|
+
if (!r.deleted && r.content.constructor === H) {
|
|
5661
5661
|
const d = (
|
|
5662
5662
|
/** @type {ContentFormat} */
|
|
5663
5663
|
r.content
|
|
@@ -5671,7 +5671,7 @@ const Ys = (s, t, e) => {
|
|
|
5671
5671
|
if (e === t && (a = !0), !t.deleted) {
|
|
5672
5672
|
const d = t.content;
|
|
5673
5673
|
switch (d.constructor) {
|
|
5674
|
-
case
|
|
5674
|
+
case H: {
|
|
5675
5675
|
const { key: u, value: p } = (
|
|
5676
5676
|
/** @type {ContentFormat} */
|
|
5677
5677
|
d
|
|
@@ -5694,7 +5694,7 @@ const Ys = (s, t, e) => {
|
|
|
5694
5694
|
t = t.right;
|
|
5695
5695
|
const e = /* @__PURE__ */ new Set();
|
|
5696
5696
|
for (; t && (t.deleted || !t.countable); ) {
|
|
5697
|
-
if (!t.deleted && t.content.constructor ===
|
|
5697
|
+
if (!t.deleted && t.content.constructor === H) {
|
|
5698
5698
|
const o = (
|
|
5699
5699
|
/** @type {ContentFormat} */
|
|
5700
5700
|
t.content.key
|
|
@@ -5717,7 +5717,7 @@ const Ys = (s, t, e) => {
|
|
|
5717
5717
|
for (; n; ) {
|
|
5718
5718
|
if (n.deleted === !1)
|
|
5719
5719
|
switch (n.content.constructor) {
|
|
5720
|
-
case
|
|
5720
|
+
case H:
|
|
5721
5721
|
te(
|
|
5722
5722
|
i,
|
|
5723
5723
|
/** @type {ContentFormat} */
|
|
@@ -5744,7 +5744,7 @@ const Ys = (s, t, e) => {
|
|
|
5744
5744
|
n,
|
|
5745
5745
|
(i) => {
|
|
5746
5746
|
!i.deleted && /** @type {Item} */
|
|
5747
|
-
i.content.constructor ===
|
|
5747
|
+
i.content.constructor === H && i.constructor !== yt && t.add(
|
|
5748
5748
|
/** @type {any} */
|
|
5749
5749
|
i.parent
|
|
5750
5750
|
);
|
|
@@ -5763,7 +5763,7 @@ const Ys = (s, t, e) => {
|
|
|
5763
5763
|
/** @type {YText} */
|
|
5764
5764
|
n.parent
|
|
5765
5765
|
);
|
|
5766
|
-
n.content.constructor ===
|
|
5766
|
+
n.content.constructor === H ? t.add(r) : Ph(o, n);
|
|
5767
5767
|
});
|
|
5768
5768
|
for (const n of t)
|
|
5769
5769
|
Hh(n);
|
|
@@ -5867,7 +5867,7 @@ class jh extends wo {
|
|
|
5867
5867
|
this.adds(i) ? this.deletes(i) || (l !== "insert" && (u(), l = "insert"), c += /** @type {ContentString} */
|
|
5868
5868
|
i.content.str) : this.deletes(i) ? (l !== "delete" && (u(), l = "delete"), d += i.length) : i.deleted || (l !== "retain" && (u(), l = "retain"), h += i.length);
|
|
5869
5869
|
break;
|
|
5870
|
-
case
|
|
5870
|
+
case H: {
|
|
5871
5871
|
const { key: g, value: m } = (
|
|
5872
5872
|
/** @type {ContentFormat} */
|
|
5873
5873
|
i.content
|
|
@@ -5911,7 +5911,7 @@ class jh extends wo {
|
|
|
5911
5911
|
);
|
|
5912
5912
|
}
|
|
5913
5913
|
}
|
|
5914
|
-
class oo extends
|
|
5914
|
+
class oo extends P {
|
|
5915
5915
|
/**
|
|
5916
5916
|
* @param {String} [string] The initial value of the YText.
|
|
5917
5917
|
*/
|
|
@@ -6068,7 +6068,7 @@ class oo extends _ {
|
|
|
6068
6068
|
n.push(u);
|
|
6069
6069
|
break;
|
|
6070
6070
|
}
|
|
6071
|
-
case
|
|
6071
|
+
case H:
|
|
6072
6072
|
Lt(a, t) && (c(), te(
|
|
6073
6073
|
r,
|
|
6074
6074
|
/** @type {ContentFormat} */
|
|
@@ -6269,7 +6269,7 @@ class jo {
|
|
|
6269
6269
|
), done: !1 });
|
|
6270
6270
|
}
|
|
6271
6271
|
}
|
|
6272
|
-
class Wt extends
|
|
6272
|
+
class Wt extends P {
|
|
6273
6273
|
constructor() {
|
|
6274
6274
|
super(), this._prelimContent = [];
|
|
6275
6275
|
}
|
|
@@ -6309,7 +6309,7 @@ class Wt extends _ {
|
|
|
6309
6309
|
*/
|
|
6310
6310
|
clone() {
|
|
6311
6311
|
const t = new Wt();
|
|
6312
|
-
return t.insert(0, this.toArray().map((e) => e instanceof
|
|
6312
|
+
return t.insert(0, this.toArray().map((e) => e instanceof P ? e.clone() : e)), t;
|
|
6313
6313
|
}
|
|
6314
6314
|
get length() {
|
|
6315
6315
|
var t;
|
|
@@ -6441,7 +6441,7 @@ class Wt extends _ {
|
|
|
6441
6441
|
insertAfter(t, e) {
|
|
6442
6442
|
if (this.doc !== null)
|
|
6443
6443
|
M(this.doc, (o) => {
|
|
6444
|
-
const n = t && t instanceof
|
|
6444
|
+
const n = t && t instanceof P ? t._item : t;
|
|
6445
6445
|
to(o, this, n, e);
|
|
6446
6446
|
});
|
|
6447
6447
|
else {
|
|
@@ -6594,7 +6594,7 @@ class ye extends Wt {
|
|
|
6594
6594
|
/** @type {any} */
|
|
6595
6595
|
o
|
|
6596
6596
|
);
|
|
6597
|
-
}), t.insert(0, this.toArray().map((o) => o instanceof
|
|
6597
|
+
}), t.insert(0, this.toArray().map((o) => o instanceof P ? o.clone() : o)), t;
|
|
6598
6598
|
}
|
|
6599
6599
|
/**
|
|
6600
6600
|
* Returns the XML serialization of this YXmlElement.
|
|
@@ -6970,7 +6970,7 @@ class no {
|
|
|
6970
6970
|
return 1;
|
|
6971
6971
|
}
|
|
6972
6972
|
}
|
|
6973
|
-
const Yh = (s, t) => new Rt(
|
|
6973
|
+
const Yh = (s, t) => new Rt(j(B({ guid: s }, t), { shouldLoad: t.shouldLoad || t.autoLoad || !1 }));
|
|
6974
6974
|
class So {
|
|
6975
6975
|
/**
|
|
6976
6976
|
* @param {Doc} doc
|
|
@@ -7125,7 +7125,7 @@ class ee {
|
|
|
7125
7125
|
return 5;
|
|
7126
7126
|
}
|
|
7127
7127
|
}
|
|
7128
|
-
class
|
|
7128
|
+
class H {
|
|
7129
7129
|
/**
|
|
7130
7130
|
* @param {string} key
|
|
7131
7131
|
* @param {Object} value
|
|
@@ -7155,7 +7155,7 @@ class P {
|
|
|
7155
7155
|
* @return {ContentFormat}
|
|
7156
7156
|
*/
|
|
7157
7157
|
copy() {
|
|
7158
|
-
return new
|
|
7158
|
+
return new H(this.key, this.value);
|
|
7159
7159
|
}
|
|
7160
7160
|
/**
|
|
7161
7161
|
* @param {number} _offset
|
|
@@ -8985,14 +8985,14 @@ class Pi extends x {
|
|
|
8985
8985
|
}
|
|
8986
8986
|
}
|
|
8987
8987
|
const tr = {
|
|
8988
|
-
Backspace:
|
|
8989
|
-
Delete:
|
|
8990
|
-
Enter:
|
|
8991
|
-
Tab:
|
|
8992
|
-
ArrowDown:
|
|
8993
|
-
ArrowRight:
|
|
8994
|
-
ArrowUp:
|
|
8995
|
-
ArrowLeft:
|
|
8988
|
+
Backspace: S.BACKSPACE,
|
|
8989
|
+
Delete: S.DELETE,
|
|
8990
|
+
Enter: S.ENTER,
|
|
8991
|
+
Tab: S.TAB,
|
|
8992
|
+
ArrowDown: S.DOWN,
|
|
8993
|
+
ArrowRight: S.RIGHT,
|
|
8994
|
+
ArrowUp: S.UP,
|
|
8995
|
+
ArrowLeft: S.LEFT
|
|
8996
8996
|
}, pd = /* @__PURE__ */ new Set(["Enter", "Process", "Spacebar", "Space", "Dead"]), De = '[contenteditable="true"], textarea, input', Pt = "list", er = "header", fd = /^\[(x|X| )?\]\s([\s\S]*)$/, gd = /^[-*]\s([\s\S]*)$/, kd = /^(\d+)[.)]\s([\s\S]*)$/, bd = /^(#{1,6})\s([\s\S]*)$/;
|
|
8997
8997
|
class Co {
|
|
8998
8998
|
constructor(t) {
|
|
@@ -9044,7 +9044,7 @@ class md extends Co {
|
|
|
9044
9044
|
const i = o.getBlockByIndex(r);
|
|
9045
9045
|
if (!i)
|
|
9046
9046
|
continue;
|
|
9047
|
-
const l = await i.save(), a = await o.update(i,
|
|
9047
|
+
const l = await i.save(), a = await o.update(i, j(B({}, l), {
|
|
9048
9048
|
depth: Math.max(0, this.getListBlockDepth(i) + t)
|
|
9049
9049
|
}));
|
|
9050
9050
|
a.selected = !0;
|
|
@@ -9238,31 +9238,31 @@ class yd extends Co {
|
|
|
9238
9238
|
const e = so(t);
|
|
9239
9239
|
if (e === null || or(t, "down"))
|
|
9240
9240
|
return;
|
|
9241
|
-
const o = ae.usedKeys.includes(e) && (!t.shiftKey || e ===
|
|
9241
|
+
const o = ae.usedKeys.includes(e) && (!t.shiftKey || e === S.TAB);
|
|
9242
9242
|
if (this.Blok.UI.someToolbarOpened && o)
|
|
9243
9243
|
return;
|
|
9244
9244
|
t.shiftKey || (this.Blok.Toolbar.close(), this.Blok.InlineToolbar.close());
|
|
9245
9245
|
const n = w.get();
|
|
9246
9246
|
n != null && n.anchorNode && !this.Blok.BlockSelection.anyBlockSelected && this.Blok.BlockManager.setCurrentBlockByChildNode(n.anchorNode);
|
|
9247
9247
|
const { currentBlock: r } = this.Blok.BlockManager, i = t.target, l = document.activeElement instanceof HTMLElement ? document.activeElement : null, a = [
|
|
9248
|
-
r == null ? void 0 : r.inputs.find((
|
|
9249
|
-
r == null ? void 0 : r.inputs.find((
|
|
9248
|
+
r == null ? void 0 : r.inputs.find((T) => i !== null && T.contains(i)),
|
|
9249
|
+
r == null ? void 0 : r.inputs.find((T) => l !== null && T.contains(l)),
|
|
9250
9250
|
i == null ? void 0 : i.closest(De),
|
|
9251
9251
|
l == null ? void 0 : l.closest(De)
|
|
9252
9252
|
], c = (v = r == null ? void 0 : r.currentInput) != null ? v : a.find(
|
|
9253
|
-
(
|
|
9254
|
-
), d = (c !== void 0 ? se(c) : void 0) || this.Blok.BlockSelection.anyBlockSelected, u = t.shiftKey && e ===
|
|
9253
|
+
(T) => T instanceof HTMLElement
|
|
9254
|
+
), d = (c !== void 0 ? se(c) : void 0) || this.Blok.BlockSelection.anyBlockSelected, u = t.shiftKey && e === S.DOWN;
|
|
9255
9255
|
if (u && d) {
|
|
9256
9256
|
this.Blok.CrossBlockSelection.toggleBlockSelectedState();
|
|
9257
9257
|
return;
|
|
9258
9258
|
}
|
|
9259
9259
|
u && this.Blok.InlineToolbar.tryToShow();
|
|
9260
|
-
const f = e ===
|
|
9260
|
+
const f = e === S.RIGHT && !t.shiftKey && !this.isRtl && c instanceof HTMLElement ? ud(c) : null;
|
|
9261
9261
|
if (f !== null) {
|
|
9262
9262
|
w.setCursor(f.node, f.offset), t.preventDefault();
|
|
9263
9263
|
return;
|
|
9264
9264
|
}
|
|
9265
|
-
const b = e ===
|
|
9265
|
+
const b = e === S.DOWN, g = e === S.RIGHT && !this.isRtl;
|
|
9266
9266
|
if (b ? this.Blok.Caret.navigateVerticalNext() : g ? this.Blok.Caret.navigateNext() : !1) {
|
|
9267
9267
|
t.preventDefault();
|
|
9268
9268
|
return;
|
|
@@ -9278,7 +9278,7 @@ class yd extends Co {
|
|
|
9278
9278
|
handleArrowLeftAndUp(t) {
|
|
9279
9279
|
var g;
|
|
9280
9280
|
const e = this.Blok.UI.someToolbarOpened, o = so(t);
|
|
9281
|
-
if (o === null || or(t, "up") || e && ae.usedKeys.includes(o) && (!t.shiftKey || o ===
|
|
9281
|
+
if (o === null || or(t, "up") || e && ae.usedKeys.includes(o) && (!t.shiftKey || o === S.TAB))
|
|
9282
9282
|
return;
|
|
9283
9283
|
e && this.Blok.UI.closeAllToolbars(), t.shiftKey || (this.Blok.Toolbar.close(), this.Blok.InlineToolbar.close());
|
|
9284
9284
|
const n = window.getSelection();
|
|
@@ -9290,13 +9290,13 @@ class yd extends Co {
|
|
|
9290
9290
|
l == null ? void 0 : l.closest(De)
|
|
9291
9291
|
], c = (g = r == null ? void 0 : r.currentInput) != null ? g : a.find(
|
|
9292
9292
|
(m) => m instanceof HTMLElement
|
|
9293
|
-
), d = (c !== void 0 ? Ue(c) : void 0) || this.Blok.BlockSelection.anyBlockSelected, u = t.shiftKey && o ===
|
|
9293
|
+
), d = (c !== void 0 ? Ue(c) : void 0) || this.Blok.BlockSelection.anyBlockSelected, u = t.shiftKey && o === S.UP;
|
|
9294
9294
|
if (u && d) {
|
|
9295
9295
|
this.Blok.CrossBlockSelection.toggleBlockSelectedState(!1);
|
|
9296
9296
|
return;
|
|
9297
9297
|
}
|
|
9298
9298
|
u && this.Blok.InlineToolbar.tryToShow();
|
|
9299
|
-
const p = o ===
|
|
9299
|
+
const p = o === S.UP, f = o === S.LEFT && !this.isRtl;
|
|
9300
9300
|
if (p ? this.Blok.Caret.navigateVerticalPrevious() : f ? this.Blok.Caret.navigatePrevious() : !1) {
|
|
9301
9301
|
t.preventDefault();
|
|
9302
9302
|
return;
|
|
@@ -9334,17 +9334,17 @@ class Bd extends Co {
|
|
|
9334
9334
|
const i = r.textContent || "", l = o.holder.getAttribute("data-blok-depth"), a = l ? parseInt(l, 10) : 0, c = fd.exec(i);
|
|
9335
9335
|
if (c) {
|
|
9336
9336
|
this.Blok.YjsManager.stopCapturing();
|
|
9337
|
-
const
|
|
9337
|
+
const T = ((v = c[1]) == null ? void 0 : v.toLowerCase()) === "x", L = c[1] !== void 0 ? 4 : 3, Q = this.extractRemainingHtml(r, L), X = this.getCaretOffset(r) - L, St = t.replace(o, Pt, B({
|
|
9338
9338
|
text: Q,
|
|
9339
9339
|
style: "checklist",
|
|
9340
|
-
checked:
|
|
9340
|
+
checked: T
|
|
9341
9341
|
}, a > 0 ? { depth: a } : {}));
|
|
9342
9342
|
return this.setCaretAfterConversion(St, X), this.Blok.YjsManager.stopCapturing(), !0;
|
|
9343
9343
|
}
|
|
9344
9344
|
if (gd.exec(i)) {
|
|
9345
9345
|
this.Blok.YjsManager.stopCapturing();
|
|
9346
|
-
const
|
|
9347
|
-
text:
|
|
9346
|
+
const T = 2, L = this.extractRemainingHtml(r, T), Q = this.getCaretOffset(r) - T, X = t.replace(o, Pt, B({
|
|
9347
|
+
text: L,
|
|
9348
9348
|
style: "unordered",
|
|
9349
9349
|
checked: !1
|
|
9350
9350
|
}, a > 0 ? { depth: a } : {}));
|
|
@@ -9521,24 +9521,24 @@ class vd extends x {
|
|
|
9521
9521
|
if (this.navigationMode.handleKey(t) || this.navigationMode.handleEscape(t) || (this.beforeKeydownProcessing(t), this.blockSelectionKeys.handleDeletion(t)) || t.defaultPrevented)
|
|
9522
9522
|
return;
|
|
9523
9523
|
switch (so(t)) {
|
|
9524
|
-
case
|
|
9524
|
+
case S.BACKSPACE:
|
|
9525
9525
|
this.keyboardNavigation.handleBackspace(t);
|
|
9526
9526
|
break;
|
|
9527
|
-
case
|
|
9527
|
+
case S.DELETE:
|
|
9528
9528
|
this.keyboardNavigation.handleDelete(t);
|
|
9529
9529
|
break;
|
|
9530
|
-
case
|
|
9530
|
+
case S.ENTER:
|
|
9531
9531
|
this.keyboardNavigation.handleEnter(t);
|
|
9532
9532
|
break;
|
|
9533
|
-
case
|
|
9534
|
-
case
|
|
9533
|
+
case S.DOWN:
|
|
9534
|
+
case S.RIGHT:
|
|
9535
9535
|
this.keyboardNavigation.handleArrowRightAndDown(t);
|
|
9536
9536
|
break;
|
|
9537
|
-
case
|
|
9538
|
-
case
|
|
9537
|
+
case S.UP:
|
|
9538
|
+
case S.LEFT:
|
|
9539
9539
|
this.keyboardNavigation.handleArrowLeftAndUp(t);
|
|
9540
9540
|
break;
|
|
9541
|
-
case
|
|
9541
|
+
case S.TAB:
|
|
9542
9542
|
if (this.blockSelectionKeys.handleIndent(t))
|
|
9543
9543
|
return;
|
|
9544
9544
|
this.keyboardNavigation.handleTab(t);
|
|
@@ -9635,7 +9635,7 @@ class vd extends x {
|
|
|
9635
9635
|
* @param {KeyboardEvent} event - keyboard event
|
|
9636
9636
|
*/
|
|
9637
9637
|
needToolbarClosing(t) {
|
|
9638
|
-
const e = so(t), o = e ===
|
|
9638
|
+
const e = so(t), o = e === S.ENTER, n = e === S.TAB, r = o && this.Blok.Toolbar.toolbox.opened, i = o && this.Blok.BlockSettings.opened, l = o && this.Blok.InlineToolbar.opened, a = n, c = this.Blok.Toolbar.toolbox.opened && !o && !n;
|
|
9639
9639
|
return !(t.shiftKey || a || r || i || l || c);
|
|
9640
9640
|
}
|
|
9641
9641
|
}
|
|
@@ -12759,7 +12759,7 @@ class Gd {
|
|
|
12759
12759
|
updateTarget(t, e) {
|
|
12760
12760
|
if (this.state.type !== "dragging")
|
|
12761
12761
|
throw new Error(`Cannot update target from state "${this.state.type}", must be dragging`);
|
|
12762
|
-
this.state =
|
|
12762
|
+
this.state = j(B({}, this.state), {
|
|
12763
12763
|
targetBlock: t,
|
|
12764
12764
|
targetEdge: e
|
|
12765
12765
|
});
|
|
@@ -13607,7 +13607,7 @@ class lu extends x {
|
|
|
13607
13607
|
async ensureI18nextLoaded(t, e) {
|
|
13608
13608
|
if (this.i18nextWrapper !== null)
|
|
13609
13609
|
return;
|
|
13610
|
-
const { loadI18next: o } = await import("./i18next-loader-
|
|
13610
|
+
const { loadI18next: o } = await import("./i18next-loader-D-sjerXt.mjs");
|
|
13611
13611
|
this.i18nextWrapper = await o(t, e);
|
|
13612
13612
|
}
|
|
13613
13613
|
/**
|
|
@@ -13781,7 +13781,7 @@ class Se {
|
|
|
13781
13781
|
* Process paste of single Block tool content.
|
|
13782
13782
|
*/
|
|
13783
13783
|
async processSingleBlock(t, e) {
|
|
13784
|
-
const { Caret: o, BlockManager: n } = this.Blok, { currentBlock: r } = n, { Dom: i } = await import("./inline-tool-convert-
|
|
13784
|
+
const { Caret: o, BlockManager: n } = this.Blok, { currentBlock: r } = n, { Dom: i } = await import("./inline-tool-convert-5DE7c2fi.mjs").then((a) => a.aI), l = i;
|
|
13785
13785
|
if (!r || t.tool !== r.name || !l.containsOnlyInlineElements(t.content.innerHTML)) {
|
|
13786
13786
|
await this.insertBlock(t, e);
|
|
13787
13787
|
return;
|
|
@@ -14568,13 +14568,13 @@ class uu extends x {
|
|
|
14568
14568
|
const i = r.getBoundingClientRect(), l = this.getScrollTop(), a = e - l;
|
|
14569
14569
|
if (!(a >= i.top && a <= i.bottom))
|
|
14570
14570
|
return;
|
|
14571
|
-
const h = this.getScrollLeft(), d = t - h, u = d >=
|
|
14572
|
-
!
|
|
14571
|
+
const h = this.getScrollLeft(), d = t - h, u = r.querySelector('[data-blok-testid="block-content"]'), p = u ? u.getBoundingClientRect() : i, f = d >= p.left && d <= p.right, b = document.elementFromPoint(t - h, a);
|
|
14572
|
+
!b || (!b.closest(ut(y.toolbar)) && !o && (this.Blok.BlockSelection.allBlocksSelected = !1, this.clearSelection(), this.stackOfSelected = []), [
|
|
14573
14573
|
ut(y.elementContent),
|
|
14574
14574
|
ut(y.toolbar),
|
|
14575
14575
|
ut(y.popover),
|
|
14576
14576
|
rl
|
|
14577
|
-
].some((
|
|
14577
|
+
].some((T) => !!b.closest(T))) || (f && this.Blok.Toolbar.close(), this.mousedown = !0, this.startX = t, this.startY = e);
|
|
14578
14578
|
}
|
|
14579
14579
|
/**
|
|
14580
14580
|
* Clear all params to end selection
|
|
@@ -14886,7 +14886,7 @@ const pu = (s) => typeof s == "object" && "text" in s && !("content" in s), Yi =
|
|
|
14886
14886
|
const n = xu(o.data, o.tunes);
|
|
14887
14887
|
t.push(...n);
|
|
14888
14888
|
} else
|
|
14889
|
-
t.push(
|
|
14889
|
+
t.push(j(B({}, o), {
|
|
14890
14890
|
id: (e = o.id) != null ? e : wt()
|
|
14891
14891
|
}));
|
|
14892
14892
|
return t;
|
|
@@ -14970,29 +14970,29 @@ class Du extends x {
|
|
|
14970
14970
|
const r = this.config.dataModel || "auto", i = vu(t);
|
|
14971
14971
|
this.detectedInputFormat = i.format;
|
|
14972
14972
|
const a = (Mu(r, i.format) ? Tu(t) : t).map((c) => {
|
|
14973
|
-
const { tunes: h, id: d, parent: u, content: p } = c, f = c.type, g = ((
|
|
14973
|
+
const { tunes: h, id: d, parent: u, content: p } = c, f = c.type, g = ((T) => typeof T == "object" && T !== null)(c.data) ? c.data : {}, m = o.available.has(f) ? {
|
|
14974
14974
|
tool: f,
|
|
14975
14975
|
data: g
|
|
14976
14976
|
} : (st(`Tool «${f}» is not found. Check 'tools' property at the Blok config.`, "warn"), {
|
|
14977
14977
|
tool: o.stubTool,
|
|
14978
14978
|
data: this.composeStubDataForTool(f, g, d)
|
|
14979
14979
|
});
|
|
14980
|
-
return ((
|
|
14980
|
+
return ((T, L) => {
|
|
14981
14981
|
try {
|
|
14982
14982
|
return n.composeBlock({
|
|
14983
14983
|
id: d,
|
|
14984
|
-
tool:
|
|
14985
|
-
data:
|
|
14984
|
+
tool: T,
|
|
14985
|
+
data: L,
|
|
14986
14986
|
tunes: h,
|
|
14987
14987
|
parentId: u,
|
|
14988
14988
|
contentIds: p
|
|
14989
14989
|
});
|
|
14990
14990
|
} catch (Q) {
|
|
14991
|
-
C(`Block «${
|
|
14992
|
-
data:
|
|
14991
|
+
C(`Block «${T}» skipped because of plugins error`, "error", {
|
|
14992
|
+
data: L,
|
|
14993
14993
|
error: Q
|
|
14994
14994
|
});
|
|
14995
|
-
const X = this.composeStubDataForTool(
|
|
14995
|
+
const X = this.composeStubDataForTool(T, L, d);
|
|
14996
14996
|
return n.composeBlock({
|
|
14997
14997
|
id: d,
|
|
14998
14998
|
tool: o.stubTool,
|
|
@@ -15079,7 +15079,7 @@ class Ru extends x {
|
|
|
15079
15079
|
isValid: !1
|
|
15080
15080
|
};
|
|
15081
15081
|
const r = await t.validate(n.data);
|
|
15082
|
-
return
|
|
15082
|
+
return j(B({}, n), {
|
|
15083
15083
|
isValid: r,
|
|
15084
15084
|
parentId: t.parentId,
|
|
15085
15085
|
contentIds: t.contentIds
|
|
@@ -15094,7 +15094,8 @@ class Ru extends x {
|
|
|
15094
15094
|
var i, l, a;
|
|
15095
15095
|
const e = [];
|
|
15096
15096
|
t.forEach(({ id: c, tool: h, data: d, tunes: u, isValid: p, parentId: f, contentIds: b }) => {
|
|
15097
|
-
|
|
15097
|
+
const g = f != null;
|
|
15098
|
+
if (!p && !g) {
|
|
15098
15099
|
C(`Block «${h}» skipped because saved data is invalid`);
|
|
15099
15100
|
return;
|
|
15100
15101
|
}
|
|
@@ -15110,18 +15111,18 @@ class Ru extends x {
|
|
|
15110
15111
|
C("Stub block data is malformed and was skipped");
|
|
15111
15112
|
return;
|
|
15112
15113
|
}
|
|
15113
|
-
const
|
|
15114
|
+
const m = u === void 0 || z(u), v = b !== void 0 && b.length > 0, T = B(B(B({
|
|
15114
15115
|
id: c,
|
|
15115
15116
|
type: h,
|
|
15116
15117
|
data: d
|
|
15117
|
-
}, !
|
|
15118
|
+
}, !m && {
|
|
15118
15119
|
tunes: u
|
|
15119
|
-
}),
|
|
15120
|
+
}), g && {
|
|
15120
15121
|
parent: f
|
|
15121
15122
|
}), v && {
|
|
15122
15123
|
content: b
|
|
15123
15124
|
});
|
|
15124
|
-
e.push(
|
|
15125
|
+
e.push(T);
|
|
15125
15126
|
});
|
|
15126
15127
|
const o = this.config.dataModel || "auto", n = (a = (l = (i = this.Blok.Renderer) == null ? void 0 : i.getDetectedInputFormat) == null ? void 0 : l.call(i)) != null ? a : "flat", r = Au(o, n) ? Eu(e) : e;
|
|
15127
15128
|
return {
|
|
@@ -15152,7 +15153,7 @@ class Ru extends x {
|
|
|
15152
15153
|
), i = t.map((l) => B({}, l));
|
|
15153
15154
|
return n.forEach(({ index: l }, a) => {
|
|
15154
15155
|
const c = r[a];
|
|
15155
|
-
i[l] =
|
|
15156
|
+
i[l] = j(B({}, i[l]), {
|
|
15156
15157
|
data: c.data
|
|
15157
15158
|
});
|
|
15158
15159
|
}), i;
|
|
@@ -15189,7 +15190,7 @@ class Ru extends x {
|
|
|
15189
15190
|
if (z(e))
|
|
15190
15191
|
return;
|
|
15191
15192
|
const o = t.preservedTunes;
|
|
15192
|
-
return
|
|
15193
|
+
return j(B({
|
|
15193
15194
|
id: t.id,
|
|
15194
15195
|
tool: t.name,
|
|
15195
15196
|
data: e
|
|
@@ -15209,14 +15210,14 @@ class ur extends ce {
|
|
|
15209
15210
|
const e = !Mt(), o = new ae({
|
|
15210
15211
|
focusedItemClass: br.focused,
|
|
15211
15212
|
allowedKeys: [
|
|
15212
|
-
|
|
15213
|
-
|
|
15214
|
-
|
|
15215
|
-
|
|
15213
|
+
S.TAB,
|
|
15214
|
+
S.UP,
|
|
15215
|
+
S.DOWN,
|
|
15216
|
+
S.ENTER
|
|
15216
15217
|
]
|
|
15217
15218
|
});
|
|
15218
15219
|
super(
|
|
15219
|
-
|
|
15220
|
+
j(B({}, t), {
|
|
15220
15221
|
flipper: o
|
|
15221
15222
|
}),
|
|
15222
15223
|
{
|
|
@@ -15591,12 +15592,12 @@ class Pu extends x {
|
|
|
15591
15592
|
super(...arguments), this.opened = !1, this.isOpening = !1, this.selection = new w(), this.popover = null, this.flipperInstance = new ae({
|
|
15592
15593
|
focusedItemClass: br.focused,
|
|
15593
15594
|
allowedKeys: [
|
|
15594
|
-
|
|
15595
|
-
|
|
15596
|
-
|
|
15597
|
-
|
|
15598
|
-
|
|
15599
|
-
|
|
15595
|
+
S.TAB,
|
|
15596
|
+
S.UP,
|
|
15597
|
+
S.DOWN,
|
|
15598
|
+
S.ENTER,
|
|
15599
|
+
S.RIGHT,
|
|
15600
|
+
S.LEFT
|
|
15600
15601
|
]
|
|
15601
15602
|
}), this.flipperKeydownHandler = null, this.flipperKeydownSource = null, this.close = () => {
|
|
15602
15603
|
this.opened && (this.opened = !1, this.isOpening = !1, w.isAtBlok || this.selection.restore(), this.selection.clearSaved(), this.detachFlipperKeydownListener(), this.clearBlockSelectionOnClose(), this.eventsDispatcher.emit(this.events.closed), this.popover && (this.popover.off(Ht.Closed, this.onPopoverClose), this.popover.destroy(), this.popover.getElement().remove(), this.popover = null));
|
|
@@ -16326,14 +16327,17 @@ class Uu {
|
|
|
16326
16327
|
* @param insertAbove - if true, insert above the current block instead of below
|
|
16327
16328
|
*/
|
|
16328
16329
|
handleClick(t = !1) {
|
|
16329
|
-
var
|
|
16330
|
+
var m, v;
|
|
16330
16331
|
const { BlockManager: e, BlockSettings: o, BlockSelection: n, Caret: r } = this.getBlok();
|
|
16331
|
-
if (o.opened && o.close(), n.anyBlockSelected && n.clearSelection(), (
|
|
16332
|
+
if (o.opened && o.close(), n.anyBlockSelected && n.clearSelection(), (m = w.get()) == null || m.removeAllRanges(), this.getToolboxOpened()) {
|
|
16332
16333
|
this.closeToolbox();
|
|
16333
16334
|
return;
|
|
16334
16335
|
}
|
|
16335
|
-
const i = this.hoveredBlockInternal, l = (i == null ? void 0 : i.name) === "paragraph", a = l && ((
|
|
16336
|
-
|
|
16336
|
+
const i = this.hoveredBlockInternal, l = (i == null ? void 0 : i.name) === "paragraph", a = l && ((v = i.pluginsContent.textContent) == null ? void 0 : v.startsWith("/")), c = l && i.isEmpty, h = i !== null ? e.getBlockIndex(i) : e.currentBlockIndex, d = t ? h : h + 1, u = e.blocks.slice(d), p = (T) => {
|
|
16337
|
+
var L;
|
|
16338
|
+
return ((L = T.holder.parentElement) == null ? void 0 : L.closest('[data-blok-testid="block-wrapper"]')) !== null;
|
|
16339
|
+
}, f = !t && i && u.length > 0 ? u.findIndex((T) => !p(T)) : 0, b = d + (f === -1 ? u.length : f), g = c || a ? i : e.insertDefaultBlockAtIndex(b, !0);
|
|
16340
|
+
g !== i && p(g) && (i == null || i.holder.after(g.holder)), a ? r.setToBlock(g, r.positions.DEFAULT, 1) : (r.setToBlock(g, r.positions.START), r.insertContentAtCaretPosition("/")), this.moveAndOpenToolbar(g), this.openToolbox();
|
|
16337
16341
|
}
|
|
16338
16342
|
}
|
|
16339
16343
|
class zu {
|
|
@@ -16371,11 +16375,11 @@ class zu {
|
|
|
16371
16375
|
* @returns the Y position in pixels, or null if calculation is not possible
|
|
16372
16376
|
*/
|
|
16373
16377
|
calculateToolbarY(t, e) {
|
|
16374
|
-
var
|
|
16378
|
+
var T;
|
|
16375
16379
|
const { targetBlock: o, hoveredTarget: n, isMobile: r } = t;
|
|
16376
16380
|
if (!o || !e)
|
|
16377
16381
|
return null;
|
|
16378
|
-
const l = o.holder.getBoundingClientRect(), a = n == null ? void 0 : n.closest('[role="listitem"]'), c = a == null ? void 0 : a.querySelector("[contenteditable]"), h = (
|
|
16382
|
+
const l = o.holder.getBoundingClientRect(), a = n == null ? void 0 : n.closest('[role="listitem"]'), c = a == null ? void 0 : a.querySelector("[contenteditable]"), h = (T = c != null ? c : a) != null ? T : o.pluginsContent, u = h.getBoundingClientRect().top - l.top, p = window.getComputedStyle(h), f = parseInt(p.paddingTop, 10) || 0, b = parseFloat(p.lineHeight) || 24, g = parseInt(window.getComputedStyle(e).height, 10);
|
|
16379
16383
|
return r ? u - g : u + f + b / 2 - g / 2;
|
|
16380
16384
|
}
|
|
16381
16385
|
/**
|
|
@@ -16612,7 +16616,7 @@ class Ku extends x {
|
|
|
16612
16616
|
super({
|
|
16613
16617
|
config: t,
|
|
16614
16618
|
eventsDispatcher: e
|
|
16615
|
-
}), this.hoveredBlock = null, this.explicitlyClosed = !1, this.toolboxInstance = null, this.onBlockSettingsOpen = () => {
|
|
16619
|
+
}), this.hoveredBlock = null, this.explicitlyClosed = !1, this.hoveredBlockIsFromTableCell = !1, this.toolboxInstance = null, this.onBlockSettingsOpen = () => {
|
|
16616
16620
|
this.Blok.UI.nodes.wrapper.setAttribute(y.blockSettingsOpened, "true");
|
|
16617
16621
|
}, this.onBlockSettingsClose = () => {
|
|
16618
16622
|
this.Blok.UI.nodes.wrapper.removeAttribute(y.blockSettingsOpened);
|
|
@@ -16685,7 +16689,7 @@ class Ku extends x {
|
|
|
16685
16689
|
C("toolbox.open() called before initialization is finished", "warn");
|
|
16686
16690
|
return;
|
|
16687
16691
|
}
|
|
16688
|
-
this.hoveredBlock && (this.Blok.BlockManager.currentBlock = this.hoveredBlock), this.toolboxInstance.open();
|
|
16692
|
+
this.hoveredBlock && !this.hoveredBlockIsFromTableCell && (this.Blok.BlockManager.currentBlock = this.hoveredBlock), this.toolboxInstance.open();
|
|
16689
16693
|
},
|
|
16690
16694
|
toggle: () => {
|
|
16691
16695
|
if (this.toolboxInstance === null) {
|
|
@@ -16756,14 +16760,11 @@ class Ku extends x {
|
|
|
16756
16760
|
if (!o)
|
|
16757
16761
|
return;
|
|
16758
16762
|
const n = this.resolveTableCellBlock(o);
|
|
16759
|
-
|
|
16760
|
-
this.close();
|
|
16761
|
-
return;
|
|
16762
|
-
}
|
|
16763
|
-
this.hoveredBlock && this.hoveredBlock !== n && this.hoveredBlock.cleanupDraggable(), this.hoveredBlock = n, this.plusButtonHandler.setHoveredBlock(n), this.settingsTogglerHandler.setHoveredBlock(n), this.positioner.setHoveredTarget(e != null ? e : null), this.positioner.resetCachedPosition();
|
|
16763
|
+
this.hoveredBlockIsFromTableCell = n !== o, this.hoveredBlock && this.hoveredBlock !== n && this.hoveredBlock.cleanupDraggable(), this.hoveredBlock = n, this.plusButtonHandler.setHoveredBlock(n), this.settingsTogglerHandler.setHoveredBlock(n), this.positioner.setHoveredTarget(e != null ? e : null), this.positioner.resetCachedPosition();
|
|
16764
16764
|
const { wrapper: r, plusButton: i, settingsToggler: l } = this.nodes;
|
|
16765
16765
|
if (!r || !i)
|
|
16766
16766
|
return;
|
|
16767
|
+
this.hoveredBlockIsFromTableCell ? (i.style.display = "none", l && (l.style.display = "none")) : (i.style.display = "", l && (l.style.display = ""));
|
|
16767
16768
|
const a = n.holder, { isMobile: c } = this.Blok.UI, h = this.positioner.calculateToolbarY(
|
|
16768
16769
|
{ targetBlock: n, hoveredTarget: e != null ? e : null, isMobile: c },
|
|
16769
16770
|
i
|
|
@@ -16811,7 +16812,7 @@ class Ku extends x {
|
|
|
16811
16812
|
*/
|
|
16812
16813
|
close(t) {
|
|
16813
16814
|
var e, o, n, r;
|
|
16814
|
-
this.Blok.ReadOnly.isEnabled || ((e = this.nodes.wrapper) == null || e.classList.remove(this.CSS.toolbarOpened), (o = this.nodes.wrapper) == null || o.classList.add(this.CSS.toolbarClosed), (n = this.nodes.wrapper) == null || n.removeAttribute("data-blok-opened"), this.blockActions.hide(), (r = this.toolboxInstance) == null || r.close(), this.Blok.BlockSettings.close(), this.hoveredBlock = null, (t == null ? void 0 : t.setExplicitlyClosed) !== !1 && (this.explicitlyClosed = !0), this.nodes.plusButton && (this.nodes.plusButton.style.display = ""), this.nodes.actions && (this.nodes.actions.style.transform = ""), this.positioner.setHoveredTarget(null), this.reset());
|
|
16815
|
+
this.Blok.ReadOnly.isEnabled || ((e = this.nodes.wrapper) == null || e.classList.remove(this.CSS.toolbarOpened), (o = this.nodes.wrapper) == null || o.classList.add(this.CSS.toolbarClosed), (n = this.nodes.wrapper) == null || n.removeAttribute("data-blok-opened"), this.blockActions.hide(), (r = this.toolboxInstance) == null || r.close(), this.Blok.BlockSettings.close(), this.hoveredBlock = null, this.hoveredBlockIsFromTableCell = !1, (t == null ? void 0 : t.setExplicitlyClosed) !== !1 && (this.explicitlyClosed = !0), this.nodes.plusButton && (this.nodes.plusButton.style.display = ""), this.nodes.settingsToggler && (this.nodes.settingsToggler.style.display = ""), this.nodes.actions && (this.nodes.actions.style.transform = ""), this.positioner.setHoveredTarget(null), this.reset());
|
|
16815
16816
|
}
|
|
16816
16817
|
/**
|
|
16817
16818
|
* Prevents the settings menu from opening on the next mouseup event
|
|
@@ -16833,7 +16834,7 @@ class Ku extends x {
|
|
|
16833
16834
|
* Uses the DOM attribute directly to avoid cross-module dependency on the table tool.
|
|
16834
16835
|
*
|
|
16835
16836
|
* @param block - the block to resolve
|
|
16836
|
-
* @returns the parent table block if inside a cell, the original block otherwise
|
|
16837
|
+
* @returns the parent table block if inside a cell, the original block otherwise
|
|
16837
16838
|
*/
|
|
16838
16839
|
resolveTableCellBlock(t) {
|
|
16839
16840
|
var n;
|
|
@@ -16841,7 +16842,7 @@ class Ku extends x {
|
|
|
16841
16842
|
if (!e)
|
|
16842
16843
|
return t;
|
|
16843
16844
|
const o = e.closest('[data-blok-testid="block-wrapper"]');
|
|
16844
|
-
return o && (n = this.Blok.BlockManager.getBlockByChildNode(o)) != null ? n :
|
|
16845
|
+
return o && (n = this.Blok.BlockManager.getBlockByChildNode(o)) != null ? n : t;
|
|
16845
16846
|
}
|
|
16846
16847
|
/**
|
|
16847
16848
|
* Reset the Toolbar position to prevent DOM height growth, for example after blocks deletion
|
|
@@ -17133,14 +17134,14 @@ class Xu {
|
|
|
17133
17134
|
if (t instanceof HTMLElement)
|
|
17134
17135
|
return i;
|
|
17135
17136
|
if (t.type === G.Html)
|
|
17136
|
-
return i.push(
|
|
17137
|
+
return i.push(j(B(B({}, l), t), {
|
|
17137
17138
|
type: G.Html
|
|
17138
17139
|
})), i;
|
|
17139
17140
|
if (t.type === G.Separator)
|
|
17140
17141
|
return i.push({
|
|
17141
17142
|
type: G.Separator
|
|
17142
17143
|
}), i;
|
|
17143
|
-
const a =
|
|
17144
|
+
const a = j(B(B({}, l), t), {
|
|
17144
17145
|
type: G.Default
|
|
17145
17146
|
});
|
|
17146
17147
|
return i.push(a), "children" in a && r && i.push({
|
|
@@ -17586,7 +17587,7 @@ class op extends x {
|
|
|
17586
17587
|
* Shows Inline Toolbar
|
|
17587
17588
|
*/
|
|
17588
17589
|
async open() {
|
|
17589
|
-
var i, l, a, c, h, d, u, p, f, b, g, m, v,
|
|
17590
|
+
var i, l, a, c, h, d, u, p, f, b, g, m, v, T, L, Q, X, St, rs, is, ls;
|
|
17590
17591
|
if (this.opened || (this.initialize(), this.opened = !0, this.popover && ((l = (i = this.popover).hide) == null || l.call(i), (c = (a = this.popover).destroy) == null || c.call(a), this.popover = null), this.createToolsInstances(), !this.nodes.wrapper))
|
|
17591
17592
|
return;
|
|
17592
17593
|
this.nodes.wrapper.innerHTML = "";
|
|
@@ -17599,7 +17600,7 @@ class op extends x {
|
|
|
17599
17600
|
search: this.Blok.I18n.t("popover.search")
|
|
17600
17601
|
}
|
|
17601
17602
|
});
|
|
17602
|
-
const o = (
|
|
17603
|
+
const o = (T = (g = (b = this.popover).getMountElement) == null ? void 0 : g.call(b)) != null ? T : (v = (m = this.popover).getElement) == null ? void 0 : v.call(m), n = (Q = (L = this.popover).getElement) == null ? void 0 : Q.call(L), r = (rs = (St = (X = this.popover.size) == null ? void 0 : X.width) != null ? St : n == null ? void 0 : n.getBoundingClientRect().width) != null ? rs : 0;
|
|
17603
17604
|
this.applyPosition(r), o && this.nodes.wrapper && this.nodes.wrapper.appendChild(o), (ls = (is = this.popover).show) == null || ls.call(is);
|
|
17604
17605
|
}
|
|
17605
17606
|
/**
|
|
@@ -17774,7 +17775,7 @@ class np extends Qn {
|
|
|
17774
17775
|
* @param readOnly - True if Blok is in read-only mode
|
|
17775
17776
|
*/
|
|
17776
17777
|
create(t, e, o) {
|
|
17777
|
-
const n = this.toolbox, r = n !== void 0 ?
|
|
17778
|
+
const n = this.toolbox, r = n !== void 0 ? j(B({}, this.settings), { _toolboxEntries: n }) : this.settings;
|
|
17778
17779
|
return new this.constructable({
|
|
17779
17780
|
data: t,
|
|
17780
17781
|
block: e,
|
|
@@ -18037,7 +18038,7 @@ class ip {
|
|
|
18037
18038
|
},
|
|
18038
18039
|
getEnglishTranslation: (r) => e.i18n.getEnglishTranslation(r)
|
|
18039
18040
|
};
|
|
18040
|
-
return
|
|
18041
|
+
return j(B({}, e), {
|
|
18041
18042
|
i18n: n
|
|
18042
18043
|
});
|
|
18043
18044
|
}
|
|
@@ -19299,8 +19300,8 @@ class mp {
|
|
|
19299
19300
|
};
|
|
19300
19301
|
if (A(t)) {
|
|
19301
19302
|
const e = t, o = e.config;
|
|
19302
|
-
return
|
|
19303
|
-
config:
|
|
19303
|
+
return j(B({}, e), {
|
|
19304
|
+
config: j(B({}, A(o) ? o : {}), {
|
|
19304
19305
|
preserveBlank: !0
|
|
19305
19306
|
})
|
|
19306
19307
|
});
|
|
@@ -19435,9 +19436,9 @@ const Sp = Ke(), ie = class ie {
|
|
|
19435
19436
|
save: "save"
|
|
19436
19437
|
}
|
|
19437
19438
|
}).forEach(([g, m]) => {
|
|
19438
|
-
Object.entries(m).forEach(([v,
|
|
19439
|
-
const
|
|
19440
|
-
this[
|
|
19439
|
+
Object.entries(m).forEach(([v, T]) => {
|
|
19440
|
+
const L = g, Q = t.moduleInstances.API.methods[L];
|
|
19441
|
+
this[T] = Q[v];
|
|
19441
19442
|
});
|
|
19442
19443
|
});
|
|
19443
19444
|
const b = t.moduleInstances.API.methods.ui;
|