@grapesjs/studio-sdk-plugins 1.0.12 → 1.0.13-rc.1
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/iconifyComponent/index.d.ts +3 -0
- package/dist/iconifyComponent/types.d.ts +42 -0
- package/dist/iconifyComponent/typesSchema.d.ts +19 -0
- package/dist/iconifyComponent/utils.d.ts +18 -0
- package/dist/index.cjs.d.ts +2 -0
- package/dist/index.cjs.js +182 -170
- package/dist/index.d.ts +2 -0
- package/dist/index.es.d.ts +2 -0
- package/dist/index.es.js +21738 -16239
- package/dist/index.umd.js +182 -170
- package/dist/lightGalleryComponent/index.cjs.js +1 -1
- package/dist/lightGalleryComponent/index.es.js +29 -30
- package/dist/lightGalleryComponent/index.umd.js +1 -1
- package/dist/prosemirror/index.cjs.js +6 -6
- package/dist/prosemirror/index.es.js +97 -96
- package/dist/prosemirror/index.umd.js +6 -6
- package/dist/prosemirror/types.d.ts +3 -3
- package/dist/rteTinyMce/index.cjs.js +81 -71
- package/dist/rteTinyMce/index.es.js +9747 -4641
- package/dist/rteTinyMce/index.umd.js +81 -71
- package/dist/swiperComponent/index.cjs.js +3 -3
- package/dist/swiperComponent/index.es.js +50 -53
- package/dist/swiperComponent/index.umd.js +3 -3
- package/dist/tableComponent/index.cjs.js +1 -1
- package/dist/tableComponent/index.es.js +121 -121
- package/dist/tableComponent/index.umd.js +1 -1
- package/dist/youtubeAssetProvider/assetProviders/youtube.d.ts +3 -0
- package/dist/youtubeAssetProvider/index.cjs.d.ts +3 -0
- package/dist/youtubeAssetProvider/index.cjs.js +1 -0
- package/dist/youtubeAssetProvider/index.d.ts +3 -0
- package/dist/youtubeAssetProvider/index.es.d.ts +3 -0
- package/dist/youtubeAssetProvider/index.es.js +242 -0
- package/dist/youtubeAssetProvider/index.umd.js +1 -0
- package/dist/youtubeAssetProvider/types.d.ts +202 -0
- package/package.json +2 -2
|
@@ -2242,13 +2242,13 @@ class lt {
|
|
|
2242
2242
|
for (let i in e.marks) {
|
|
2243
2243
|
let s = e.marks[i].spec.parseDOM;
|
|
2244
2244
|
s && s.forEach((o) => {
|
|
2245
|
-
r(o =
|
|
2245
|
+
r(o = Pr(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
|
|
2246
2246
|
});
|
|
2247
2247
|
}
|
|
2248
2248
|
for (let i in e.nodes) {
|
|
2249
2249
|
let s = e.nodes[i].spec.parseDOM;
|
|
2250
2250
|
s && s.forEach((o) => {
|
|
2251
|
-
r(o =
|
|
2251
|
+
r(o = Pr(o)), o.node || o.ignore || o.mark || (o.node = i);
|
|
2252
2252
|
});
|
|
2253
2253
|
}
|
|
2254
2254
|
return t;
|
|
@@ -2492,7 +2492,7 @@ class Br {
|
|
|
2492
2492
|
i.match && (i.match = i.match.matchType(e.type));
|
|
2493
2493
|
let s = N.none;
|
|
2494
2494
|
for (let o of r.concat(e.marks))
|
|
2495
|
-
(i.type ? i.type.allowsMarkType(o.type) :
|
|
2495
|
+
(i.type ? i.type.allowsMarkType(o.type) : Vr(o.type, e.type)) && (s = o.addToSet(s));
|
|
2496
2496
|
return i.content.push(e.mark(s)), !0;
|
|
2497
2497
|
}
|
|
2498
2498
|
return !1;
|
|
@@ -2511,7 +2511,7 @@ class Br {
|
|
|
2511
2511
|
let l = zr(e, s, o.options);
|
|
2512
2512
|
o.options & St && o.content.length == 0 && (l |= St);
|
|
2513
2513
|
let a = N.none;
|
|
2514
|
-
return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) :
|
|
2514
|
+
return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : Vr(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new Ht(e, t, a, i, null, l)), this.open++, r;
|
|
2515
2515
|
}
|
|
2516
2516
|
// Make sure all nodes above this.open are finished and added to
|
|
2517
2517
|
// their parents
|
|
@@ -2612,13 +2612,13 @@ function al(n) {
|
|
|
2612
2612
|
function cl(n, e) {
|
|
2613
2613
|
return (n.matches || n.msMatchesSelector || n.webkitMatchesSelector || n.mozMatchesSelector).call(n, e);
|
|
2614
2614
|
}
|
|
2615
|
-
function
|
|
2615
|
+
function Pr(n) {
|
|
2616
2616
|
let e = {};
|
|
2617
2617
|
for (let t in n)
|
|
2618
2618
|
e[t] = n[t];
|
|
2619
2619
|
return e;
|
|
2620
2620
|
}
|
|
2621
|
-
function
|
|
2621
|
+
function Vr(n, e) {
|
|
2622
2622
|
let t = e.schema.nodes;
|
|
2623
2623
|
for (let r in t) {
|
|
2624
2624
|
let i = t[r];
|
|
@@ -4643,11 +4643,11 @@ class X extends S {
|
|
|
4643
4643
|
return e instanceof X;
|
|
4644
4644
|
}
|
|
4645
4645
|
getBookmark() {
|
|
4646
|
-
return
|
|
4646
|
+
return Pl;
|
|
4647
4647
|
}
|
|
4648
4648
|
}
|
|
4649
4649
|
S.jsonID("all", X);
|
|
4650
|
-
const
|
|
4650
|
+
const Pl = {
|
|
4651
4651
|
map() {
|
|
4652
4652
|
return this;
|
|
4653
4653
|
},
|
|
@@ -4685,7 +4685,7 @@ function qr(n, e, t) {
|
|
|
4685
4685
|
}), n.setSelection(S.near(n.doc.resolve(o), t));
|
|
4686
4686
|
}
|
|
4687
4687
|
const Kr = 1, $t = 2, jr = 4;
|
|
4688
|
-
class
|
|
4688
|
+
class Vl extends Ns {
|
|
4689
4689
|
/**
|
|
4690
4690
|
@internal
|
|
4691
4691
|
*/
|
|
@@ -4973,7 +4973,7 @@ class tt {
|
|
|
4973
4973
|
Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
|
|
4974
4974
|
*/
|
|
4975
4975
|
get tr() {
|
|
4976
|
-
return new
|
|
4976
|
+
return new Vl(this);
|
|
4977
4977
|
}
|
|
4978
4978
|
/**
|
|
4979
4979
|
Create a new state.
|
|
@@ -5113,7 +5113,7 @@ const Hl = (n, e, t) => {
|
|
|
5113
5113
|
return l == null ? !1 : (e && e(n.tr.lift(o, l).scrollIntoView()), !0);
|
|
5114
5114
|
}
|
|
5115
5115
|
let s = i.nodeBefore;
|
|
5116
|
-
if (
|
|
5116
|
+
if (Vs(n, i, e, -1))
|
|
5117
5117
|
return !0;
|
|
5118
5118
|
if (r.parent.content.size == 0 && (ft(s, "end") || k.isSelectable(s)))
|
|
5119
5119
|
for (let o = r.depth; ; o--) {
|
|
@@ -5173,7 +5173,7 @@ const Jl = (n, e, t) => {
|
|
|
5173
5173
|
if (!i)
|
|
5174
5174
|
return !1;
|
|
5175
5175
|
let s = i.nodeAfter;
|
|
5176
|
-
if (
|
|
5176
|
+
if (Vs(n, i, e, 1))
|
|
5177
5177
|
return !0;
|
|
5178
5178
|
if (r.parent.content.size == 0 && (ft(s, "start") || k.isSelectable(s))) {
|
|
5179
5179
|
let o = ur(n.doc, r.before(), r.after(), x.empty);
|
|
@@ -5287,12 +5287,12 @@ function Bs(n) {
|
|
|
5287
5287
|
return t && t(f.scrollIntoView()), !0;
|
|
5288
5288
|
};
|
|
5289
5289
|
}
|
|
5290
|
-
const Ul = Bs(),
|
|
5290
|
+
const Ul = Bs(), Ps = (n, e) => (e && e(n.tr.setSelection(new X(n.doc))), !0);
|
|
5291
5291
|
function Gl(n, e, t) {
|
|
5292
5292
|
let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
|
|
5293
5293
|
return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock || mn(n.doc, e.pos)) ? !1 : (t && t(n.tr.join(e.pos).scrollIntoView()), !0);
|
|
5294
5294
|
}
|
|
5295
|
-
function
|
|
5295
|
+
function Vs(n, e, t, r) {
|
|
5296
5296
|
let i = e.nodeBefore, s = e.nodeAfter, o, l, a = i.type.spec.isolating || s.type.spec.isolating;
|
|
5297
5297
|
if (!a && Gl(n, e, t))
|
|
5298
5298
|
return !0;
|
|
@@ -5385,7 +5385,7 @@ function Zl(n, e, t, r) {
|
|
|
5385
5385
|
}
|
|
5386
5386
|
return !1;
|
|
5387
5387
|
}
|
|
5388
|
-
function
|
|
5388
|
+
function Pe(n, e = null, t) {
|
|
5389
5389
|
let r = t !== !1;
|
|
5390
5390
|
return function(i, s) {
|
|
5391
5391
|
let { empty: o, $cursor: l, ranges: a } = i.selection;
|
|
@@ -5428,7 +5428,7 @@ const ge = {
|
|
|
5428
5428
|
"Shift-Backspace": En,
|
|
5429
5429
|
Delete: Gr,
|
|
5430
5430
|
"Mod-Delete": Gr,
|
|
5431
|
-
"Mod-a":
|
|
5431
|
+
"Mod-a": Ps
|
|
5432
5432
|
}, Ls = {
|
|
5433
5433
|
"Ctrl-h": ge.Backspace,
|
|
5434
5434
|
"Alt-Backspace": ge["Mod-Backspace"],
|
|
@@ -5858,10 +5858,10 @@ var ve = {
|
|
|
5858
5858
|
221: "}",
|
|
5859
5859
|
222: '"'
|
|
5860
5860
|
}, fa = typeof navigator < "u" && /Mac/.test(navigator.platform), ha = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
5861
|
-
for (var
|
|
5862
|
-
for (var
|
|
5863
|
-
for (var
|
|
5864
|
-
ve[
|
|
5861
|
+
for (var P = 0; P < 10; P++) ve[48 + P] = ve[96 + P] = String(P);
|
|
5862
|
+
for (var P = 1; P <= 24; P++) ve[P + 111] = "F" + P;
|
|
5863
|
+
for (var P = 65; P <= 90; P++)
|
|
5864
|
+
ve[P] = String.fromCharCode(P + 32), sn[P] = String.fromCharCode(P);
|
|
5865
5865
|
for (var vn in ve) sn.hasOwnProperty(vn) || (sn[vn] = ve[vn]);
|
|
5866
5866
|
function da(n) {
|
|
5867
5867
|
var e = fa && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || ha && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? sn : ve)[n.keyCode] || n.key || "Unidentified";
|
|
@@ -6027,7 +6027,7 @@ function ka(n) {
|
|
|
6027
6027
|
return !0;
|
|
6028
6028
|
};
|
|
6029
6029
|
}
|
|
6030
|
-
const
|
|
6030
|
+
const V = function(n) {
|
|
6031
6031
|
for (var e = 0; ; e++)
|
|
6032
6032
|
if (n = n.previousSibling, !n)
|
|
6033
6033
|
return e;
|
|
@@ -6052,7 +6052,7 @@ function Zr(n, e, t, r, i) {
|
|
|
6052
6052
|
let s = n.parentNode;
|
|
6053
6053
|
if (!s || s.nodeType != 1 || zt(n) || Ca.test(n.nodeName) || n.contentEditable == "false")
|
|
6054
6054
|
return !1;
|
|
6055
|
-
e =
|
|
6055
|
+
e = V(n) + (i < 0 ? 0 : 1), n = s;
|
|
6056
6056
|
} else if (n.nodeType == 1) {
|
|
6057
6057
|
if (n = n.childNodes[e + (i < 0 ? -1 : 0)], n.contentEditable == "false")
|
|
6058
6058
|
return !1;
|
|
@@ -6073,7 +6073,7 @@ function wa(n, e) {
|
|
|
6073
6073
|
return null;
|
|
6074
6074
|
n = n.childNodes[e - 1], e = Q(n);
|
|
6075
6075
|
} else if (n.parentNode && !zt(n))
|
|
6076
|
-
e =
|
|
6076
|
+
e = V(n), n = n.parentNode;
|
|
6077
6077
|
else
|
|
6078
6078
|
return null;
|
|
6079
6079
|
}
|
|
@@ -6087,7 +6087,7 @@ function Ma(n, e) {
|
|
|
6087
6087
|
return null;
|
|
6088
6088
|
n = n.childNodes[e], e = 0;
|
|
6089
6089
|
} else if (n.parentNode && !zt(n))
|
|
6090
|
-
e =
|
|
6090
|
+
e = V(n) + 1, n = n.parentNode;
|
|
6091
6091
|
else
|
|
6092
6092
|
return null;
|
|
6093
6093
|
}
|
|
@@ -6096,7 +6096,7 @@ function Oa(n, e, t) {
|
|
|
6096
6096
|
for (let r = e == 0, i = e == Q(n); r || i; ) {
|
|
6097
6097
|
if (n == t)
|
|
6098
6098
|
return !0;
|
|
6099
|
-
let s =
|
|
6099
|
+
let s = V(n);
|
|
6100
6100
|
if (n = n.parentNode, !n)
|
|
6101
6101
|
return !1;
|
|
6102
6102
|
r = r && s == 0, i = i && s == Q(n);
|
|
@@ -6111,7 +6111,7 @@ function zt(n) {
|
|
|
6111
6111
|
const yn = function(n) {
|
|
6112
6112
|
return n.focusNode && Ge(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset);
|
|
6113
6113
|
};
|
|
6114
|
-
function
|
|
6114
|
+
function Ve(n, e) {
|
|
6115
6115
|
let t = document.createEvent("Event");
|
|
6116
6116
|
return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
|
|
6117
6117
|
}
|
|
@@ -6267,11 +6267,11 @@ function Ba(n, e) {
|
|
|
6267
6267
|
function gr(n, e) {
|
|
6268
6268
|
return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
|
|
6269
6269
|
}
|
|
6270
|
-
function
|
|
6270
|
+
function Pa(n, e) {
|
|
6271
6271
|
let t = n.parentNode;
|
|
6272
6272
|
return t && /^li$/i.test(t.nodeName) && e.left < n.getBoundingClientRect().left ? t : n;
|
|
6273
6273
|
}
|
|
6274
|
-
function
|
|
6274
|
+
function Va(n, e, t) {
|
|
6275
6275
|
let { node: r, offset: i } = Gs(e, t), s = -1;
|
|
6276
6276
|
if (r.nodeType == 1 && !r.firstChild) {
|
|
6277
6277
|
let o = r.getBoundingClientRect();
|
|
@@ -6324,7 +6324,7 @@ function La(n, e) {
|
|
|
6324
6324
|
if (J)
|
|
6325
6325
|
for (let c = o; r && c; c = At(c))
|
|
6326
6326
|
c.draggable && (r = void 0);
|
|
6327
|
-
if (o =
|
|
6327
|
+
if (o = Pa(o, e), r) {
|
|
6328
6328
|
if (ie && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
|
|
6329
6329
|
let f = r.childNodes[i], h;
|
|
6330
6330
|
f.nodeName == "IMG" && (h = f.getBoundingClientRect()).right <= e.left && h.bottom > e.top && i++;
|
|
@@ -6332,7 +6332,7 @@ function La(n, e) {
|
|
|
6332
6332
|
let c;
|
|
6333
6333
|
Bt && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = Fa(n, r, i, e));
|
|
6334
6334
|
}
|
|
6335
|
-
l == null && (l =
|
|
6335
|
+
l == null && (l = Va(n, o, e));
|
|
6336
6336
|
let a = n.docView.nearestDesc(o, !0);
|
|
6337
6337
|
return { pos: l, inside: a ? a.posAtStart - a.border : -1 };
|
|
6338
6338
|
}
|
|
@@ -6371,14 +6371,14 @@ function Xs(n, e, t) {
|
|
|
6371
6371
|
if (s == null && i && (t < 0 || i == Q(r))) {
|
|
6372
6372
|
let a = r.childNodes[i - 1];
|
|
6373
6373
|
if (a.nodeType == 1)
|
|
6374
|
-
return
|
|
6374
|
+
return Pn(a.getBoundingClientRect(), !1);
|
|
6375
6375
|
}
|
|
6376
6376
|
if (s == null && i < Q(r)) {
|
|
6377
6377
|
let a = r.childNodes[i];
|
|
6378
6378
|
if (a.nodeType == 1)
|
|
6379
|
-
return
|
|
6379
|
+
return Pn(a.getBoundingClientRect(), !0);
|
|
6380
6380
|
}
|
|
6381
|
-
return
|
|
6381
|
+
return Pn(r.getBoundingClientRect(), t >= 0);
|
|
6382
6382
|
}
|
|
6383
6383
|
if (s == null && i && (t < 0 || i == Q(r))) {
|
|
6384
6384
|
let a = r.childNodes[i - 1], c = a.nodeType == 3 ? me(a, Q(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
|
|
@@ -6401,7 +6401,7 @@ function ut(n, e) {
|
|
|
6401
6401
|
let t = e ? n.left : n.right;
|
|
6402
6402
|
return { top: n.top, bottom: n.bottom, left: t, right: t };
|
|
6403
6403
|
}
|
|
6404
|
-
function
|
|
6404
|
+
function Pn(n, e) {
|
|
6405
6405
|
if (n.height == 0)
|
|
6406
6406
|
return n;
|
|
6407
6407
|
let t = e ? n.top : n.bottom;
|
|
@@ -6470,7 +6470,7 @@ function qa(n, e, t) {
|
|
|
6470
6470
|
return ni == e && ri == t ? ii : (ni = e, ri = t, ii = t == "up" || t == "down" ? $a(n, e, t) : Ja(n, e, t));
|
|
6471
6471
|
}
|
|
6472
6472
|
const ee = 0, si = 1, Fe = 2, ae = 3;
|
|
6473
|
-
class
|
|
6473
|
+
class Pt {
|
|
6474
6474
|
constructor(e, t, r, i) {
|
|
6475
6475
|
this.parent = e, this.children = t, this.dom = r, this.contentDOM = i, this.dirty = ee, r.pmViewDesc = this;
|
|
6476
6476
|
}
|
|
@@ -6565,7 +6565,7 @@ class Vt {
|
|
|
6565
6565
|
}
|
|
6566
6566
|
let i;
|
|
6567
6567
|
if (e == this.dom && this.contentDOM)
|
|
6568
|
-
i = t >
|
|
6568
|
+
i = t > V(this.contentDOM);
|
|
6569
6569
|
else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM))
|
|
6570
6570
|
i = e.compareDocumentPosition(this.contentDOM) & 2;
|
|
6571
6571
|
else if (this.dom.firstChild) {
|
|
@@ -6649,12 +6649,12 @@ class Vt {
|
|
|
6649
6649
|
let s, o = !0;
|
|
6650
6650
|
for (; s = r ? this.children[r - 1] : null, !(!s || s.dom.parentNode == this.contentDOM); r--, o = !1)
|
|
6651
6651
|
;
|
|
6652
|
-
return s && t && o && !s.border && !s.domAtom ? s.domFromPos(s.size, t) : { node: this.contentDOM, offset: s ?
|
|
6652
|
+
return s && t && o && !s.border && !s.domAtom ? s.domFromPos(s.size, t) : { node: this.contentDOM, offset: s ? V(s.dom) + 1 : 0 };
|
|
6653
6653
|
} else {
|
|
6654
6654
|
let s, o = !0;
|
|
6655
6655
|
for (; s = r < this.children.length ? this.children[r] : null, !(!s || s.dom.parentNode == this.contentDOM); r++, o = !1)
|
|
6656
6656
|
;
|
|
6657
|
-
return s && o && !s.border && !s.domAtom ? s.domFromPos(0, t) : { node: this.contentDOM, offset: s ?
|
|
6657
|
+
return s && o && !s.border && !s.domAtom ? s.domFromPos(0, t) : { node: this.contentDOM, offset: s ? V(s.dom) : this.contentDOM.childNodes.length };
|
|
6658
6658
|
}
|
|
6659
6659
|
}
|
|
6660
6660
|
// Used to find a DOM range in a single parent for a given changed
|
|
@@ -6673,7 +6673,7 @@ class Vt {
|
|
|
6673
6673
|
for (let h = l; h > 0; h--) {
|
|
6674
6674
|
let d = this.children[h - 1];
|
|
6675
6675
|
if (d.size && d.dom.parentNode == this.contentDOM && !d.emptyChildAt(1)) {
|
|
6676
|
-
i =
|
|
6676
|
+
i = V(d.dom) + 1;
|
|
6677
6677
|
break;
|
|
6678
6678
|
}
|
|
6679
6679
|
e -= d.size;
|
|
@@ -6685,7 +6685,7 @@ class Vt {
|
|
|
6685
6685
|
for (let f = l + 1; f < this.children.length; f++) {
|
|
6686
6686
|
let h = this.children[f];
|
|
6687
6687
|
if (h.size && h.dom.parentNode == this.contentDOM && !h.emptyChildAt(-1)) {
|
|
6688
|
-
s =
|
|
6688
|
+
s = V(h.dom);
|
|
6689
6689
|
break;
|
|
6690
6690
|
}
|
|
6691
6691
|
t += h.size;
|
|
@@ -6730,7 +6730,7 @@ class Vt {
|
|
|
6730
6730
|
`), h && p == u.nodeValue.length)
|
|
6731
6731
|
for (let m = u, g; m; m = m.parentNode) {
|
|
6732
6732
|
if (g = m.nextSibling) {
|
|
6733
|
-
g.nodeName == "BR" && (l = a = { node: g.parentNode, offset:
|
|
6733
|
+
g.nodeName == "BR" && (l = a = { node: g.parentNode, offset: V(g) + 1 });
|
|
6734
6734
|
break;
|
|
6735
6735
|
}
|
|
6736
6736
|
let b = m.pmViewDesc;
|
|
@@ -6805,7 +6805,7 @@ class Vt {
|
|
|
6805
6805
|
return !1;
|
|
6806
6806
|
}
|
|
6807
6807
|
}
|
|
6808
|
-
class Zs extends
|
|
6808
|
+
class Zs extends Pt {
|
|
6809
6809
|
constructor(e, t, r, i) {
|
|
6810
6810
|
let s, o = t.type.toDOM;
|
|
6811
6811
|
if (typeof o == "function" && (o = o(r, () => {
|
|
@@ -6845,7 +6845,7 @@ class Zs extends Vt {
|
|
|
6845
6845
|
return this.widget.type.side;
|
|
6846
6846
|
}
|
|
6847
6847
|
}
|
|
6848
|
-
class Ka extends
|
|
6848
|
+
class Ka extends Pt {
|
|
6849
6849
|
constructor(e, t, r, i) {
|
|
6850
6850
|
super(e, [], t, null), this.textDOM = r, this.text = i;
|
|
6851
6851
|
}
|
|
@@ -6862,7 +6862,7 @@ class Ka extends Vt {
|
|
|
6862
6862
|
return e.type === "characterData" && e.target.nodeValue == e.oldValue;
|
|
6863
6863
|
}
|
|
6864
6864
|
}
|
|
6865
|
-
class _e extends
|
|
6865
|
+
class _e extends Pt {
|
|
6866
6866
|
constructor(e, t, r, i, s) {
|
|
6867
6867
|
super(e, [], r, i), this.mark = t, this.spec = s;
|
|
6868
6868
|
}
|
|
@@ -6898,7 +6898,7 @@ class _e extends Vt {
|
|
|
6898
6898
|
this.spec.destroy && this.spec.destroy(), super.destroy();
|
|
6899
6899
|
}
|
|
6900
6900
|
}
|
|
6901
|
-
class Re extends
|
|
6901
|
+
class Re extends Pt {
|
|
6902
6902
|
constructor(e, t, r, i, s, o, l, a, c) {
|
|
6903
6903
|
super(e, [], s, o), this.node = t, this.outerDeco = r, this.innerDeco = i, this.nodeDOM = l;
|
|
6904
6904
|
}
|
|
@@ -7072,7 +7072,7 @@ class bn extends Re {
|
|
|
7072
7072
|
return this.node.text == e;
|
|
7073
7073
|
}
|
|
7074
7074
|
}
|
|
7075
|
-
class Qs extends
|
|
7075
|
+
class Qs extends Pt {
|
|
7076
7076
|
parseRule() {
|
|
7077
7077
|
return { ignore: !0 };
|
|
7078
7078
|
}
|
|
@@ -7541,15 +7541,15 @@ const ai = J || $ && Ks < 63;
|
|
|
7541
7541
|
function ci(n, e) {
|
|
7542
7542
|
let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, s = r ? t.childNodes[r - 1] : null;
|
|
7543
7543
|
if (J && i && i.contentEditable == "false")
|
|
7544
|
-
return
|
|
7544
|
+
return Vn(i);
|
|
7545
7545
|
if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
|
|
7546
7546
|
if (i)
|
|
7547
|
-
return
|
|
7547
|
+
return Vn(i);
|
|
7548
7548
|
if (s)
|
|
7549
|
-
return
|
|
7549
|
+
return Vn(s);
|
|
7550
7550
|
}
|
|
7551
7551
|
}
|
|
7552
|
-
function
|
|
7552
|
+
function Vn(n) {
|
|
7553
7553
|
return n.contentEditable = "true", J && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
|
|
7554
7554
|
}
|
|
7555
7555
|
function fi(n) {
|
|
@@ -7570,7 +7570,7 @@ function tc(n) {
|
|
|
7570
7570
|
if (!e)
|
|
7571
7571
|
return;
|
|
7572
7572
|
let r = n.cursorWrapper.dom, i = r.nodeName == "IMG";
|
|
7573
|
-
i ? t.setStart(r.parentNode,
|
|
7573
|
+
i ? t.setStart(r.parentNode, V(r) + 1) : t.setStart(r, 0), t.collapse(!0), e.removeAllRanges(), e.addRange(t), !i && !n.state.selection.visible && U && Ee <= 11 && (r.disabled = !0, r.disabled = !1);
|
|
7574
7574
|
}
|
|
7575
7575
|
function io(n, e) {
|
|
7576
7576
|
if (e instanceof k) {
|
|
@@ -7673,7 +7673,7 @@ function rc(n) {
|
|
|
7673
7673
|
{
|
|
7674
7674
|
let l = t.previousSibling;
|
|
7675
7675
|
for (; l && wt(l, -1); )
|
|
7676
|
-
i = t.parentNode, s =
|
|
7676
|
+
i = t.parentNode, s = V(l), l = l.previousSibling;
|
|
7677
7677
|
if (l)
|
|
7678
7678
|
t = l, r = ln(t);
|
|
7679
7679
|
else {
|
|
@@ -7705,7 +7705,7 @@ function ic(n) {
|
|
|
7705
7705
|
{
|
|
7706
7706
|
let l = t.nextSibling;
|
|
7707
7707
|
for (; l && wt(l, 1); )
|
|
7708
|
-
s = l.parentNode, o =
|
|
7708
|
+
s = l.parentNode, o = V(l) + 1, l = l.nextSibling;
|
|
7709
7709
|
if (l)
|
|
7710
7710
|
t = l, r = 0, i = ln(t);
|
|
7711
7711
|
else {
|
|
@@ -7723,7 +7723,7 @@ function oo(n) {
|
|
|
7723
7723
|
}
|
|
7724
7724
|
function sc(n, e) {
|
|
7725
7725
|
for (; n && e == n.childNodes.length && !zt(n); )
|
|
7726
|
-
e =
|
|
7726
|
+
e = V(n) + 1, n = n.parentNode;
|
|
7727
7727
|
for (; n && e < n.childNodes.length; ) {
|
|
7728
7728
|
let t = n.childNodes[e];
|
|
7729
7729
|
if (t.nodeType == 3)
|
|
@@ -7735,7 +7735,7 @@ function sc(n, e) {
|
|
|
7735
7735
|
}
|
|
7736
7736
|
function oc(n, e) {
|
|
7737
7737
|
for (; n && !e && !zt(n); )
|
|
7738
|
-
e =
|
|
7738
|
+
e = V(n), n = n.parentNode;
|
|
7739
7739
|
for (; n && e; ) {
|
|
7740
7740
|
let t = n.childNodes[e - 1];
|
|
7741
7741
|
if (t.nodeType == 3)
|
|
@@ -8097,7 +8097,7 @@ K.keydown = (n, e) => {
|
|
|
8097
8097
|
if (t.keyCode != 229 && n.domObserver.forceFlush(), ht && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
8098
8098
|
let r = Date.now();
|
|
8099
8099
|
n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
8100
|
-
n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n,
|
|
8100
|
+
n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, Ve(13, "Enter"))), n.input.lastIOSEnter = 0);
|
|
8101
8101
|
}, 200);
|
|
8102
8102
|
} else n.someProp("handleKeyDown", (r) => r(n, t)) || cc(n, t) ? t.preventDefault() : De(n, "key");
|
|
8103
8103
|
};
|
|
@@ -8458,7 +8458,7 @@ q.beforeinput = (n, e) => {
|
|
|
8458
8458
|
n.domObserver.flushSoon();
|
|
8459
8459
|
let { domChangeCount: r } = n.input;
|
|
8460
8460
|
setTimeout(() => {
|
|
8461
|
-
if (n.input.domChangeCount != r || (n.dom.blur(), n.focus(), n.someProp("handleKeyDown", (s) => s(n,
|
|
8461
|
+
if (n.input.domChangeCount != r || (n.dom.blur(), n.focus(), n.someProp("handleKeyDown", (s) => s(n, Ve(8, "Backspace")))))
|
|
8462
8462
|
return;
|
|
8463
8463
|
let { $cursor: i } = n.state.selection;
|
|
8464
8464
|
i && i.pos > 0 && n.dispatch(n.state.tr.delete(i.pos - 1, i.pos).scrollIntoView());
|
|
@@ -8663,7 +8663,7 @@ class A {
|
|
|
8663
8663
|
let a = this.local[l].map(e, r, i);
|
|
8664
8664
|
a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
|
|
8665
8665
|
}
|
|
8666
|
-
return this.children.length ?
|
|
8666
|
+
return this.children.length ? Pc(this.children, o || [], e, t, r, i, s) : o ? new A(o.sort(je), et) : L;
|
|
8667
8667
|
}
|
|
8668
8668
|
/**
|
|
8669
8669
|
Add the given array of decorations to the ones in the set,
|
|
@@ -8841,7 +8841,7 @@ class Oe {
|
|
|
8841
8841
|
this.members[t].forEachSet(e);
|
|
8842
8842
|
}
|
|
8843
8843
|
}
|
|
8844
|
-
function
|
|
8844
|
+
function Pc(n, e, t, r, i, s, o) {
|
|
8845
8845
|
let l = n.slice();
|
|
8846
8846
|
for (let c = 0, f = s; c < t.maps.length; c++) {
|
|
8847
8847
|
let h = 0;
|
|
@@ -8877,7 +8877,7 @@ function Vc(n, e, t, r, i, s, o) {
|
|
|
8877
8877
|
a = !0;
|
|
8878
8878
|
}
|
|
8879
8879
|
if (a) {
|
|
8880
|
-
let c =
|
|
8880
|
+
let c = Vc(l, n, e, t, i, s, o), f = fn(c, r, 0, o);
|
|
8881
8881
|
e = f.local;
|
|
8882
8882
|
for (let h = 0; h < l.length; h += 3)
|
|
8883
8883
|
l[h + 1] < 0 && (l.splice(h, 3), h -= 3);
|
|
@@ -8900,7 +8900,7 @@ function Co(n, e) {
|
|
|
8900
8900
|
}
|
|
8901
8901
|
return t;
|
|
8902
8902
|
}
|
|
8903
|
-
function
|
|
8903
|
+
function Vc(n, e, t, r, i, s, o) {
|
|
8904
8904
|
function l(a, c) {
|
|
8905
8905
|
for (let f = 0; f < a.local.length; f++) {
|
|
8906
8906
|
let h = a.local[f].map(r, i, c);
|
|
@@ -9126,7 +9126,7 @@ class $c {
|
|
|
9126
9126
|
let { previousSibling: h, nextSibling: d } = e.addedNodes[f];
|
|
9127
9127
|
(!h || Array.prototype.indexOf.call(e.addedNodes, h) < 0) && (i = h), (!d || Array.prototype.indexOf.call(e.addedNodes, d) < 0) && (s = d);
|
|
9128
9128
|
}
|
|
9129
|
-
let o = i && i.parentNode == e.target ?
|
|
9129
|
+
let o = i && i.parentNode == e.target ? V(i) + 1 : 0, l = r.localPosFromDOM(e.target, o, -1), a = s && s.parentNode == e.target ? V(s) : e.target.childNodes.length, c = r.localPosFromDOM(e.target, a, 1);
|
|
9130
9130
|
return { from: l, to: c };
|
|
9131
9131
|
} else return e.type == "attributes" ? { from: r.posAtStart - r.border, to: r.posAtEnd + r.border } : (this.lastChangedTextNode = e.target, {
|
|
9132
9132
|
from: r.posAtStart,
|
|
@@ -9220,7 +9220,7 @@ function Gc(n, e, t, r, i) {
|
|
|
9220
9220
|
if (n.input.compositionPendingChanges = 0, e < 0) {
|
|
9221
9221
|
let M = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, ke = yr(n, M);
|
|
9222
9222
|
if (ke && !n.state.selection.eq(ke)) {
|
|
9223
|
-
if ($ && ne && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", ($o) => $o(n,
|
|
9223
|
+
if ($ && ne && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", ($o) => $o(n, Ve(13, "Enter"))))
|
|
9224
9224
|
return;
|
|
9225
9225
|
let Ft = n.state.tr.setSelection(ke);
|
|
9226
9226
|
M == "pointer" ? Ft.setMeta("pointer", !0) : M == "key" && Ft.scrollIntoView(), s && Ft.setMeta("composition", s), n.dispatch(Ft);
|
|
@@ -9232,7 +9232,7 @@ function Gc(n, e, t, r, i) {
|
|
|
9232
9232
|
let a = n.state.selection, c = Kc(n, e, t), f = n.state.doc, h = f.slice(c.from, c.to), d, u;
|
|
9233
9233
|
n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (d = n.state.selection.to, u = "end") : (d = n.state.selection.from, u = "start"), n.input.lastKeyCode = null;
|
|
9234
9234
|
let p = Yc(h.content, c.doc.content, c.from, d, u);
|
|
9235
|
-
if (p && n.input.domChangeCount++, (ht && n.input.lastIOSEnter > Date.now() - 225 || ne) && i.some((M) => M.nodeType == 1 && !Uc.test(M.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (M) => M(n,
|
|
9235
|
+
if (p && n.input.domChangeCount++, (ht && n.input.lastIOSEnter > Date.now() - 225 || ne) && i.some((M) => M.nodeType == 1 && !Uc.test(M.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (M) => M(n, Ve(13, "Enter")))) {
|
|
9236
9236
|
n.input.lastIOSEnter = 0;
|
|
9237
9237
|
return;
|
|
9238
9238
|
}
|
|
@@ -9251,17 +9251,17 @@ function Gc(n, e, t, r, i) {
|
|
|
9251
9251
|
}
|
|
9252
9252
|
n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof C && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), U && Ee <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == " " && (p.start--, p.endA--, p.endB--);
|
|
9253
9253
|
let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), b = f.resolve(p.start), w = m.sameParent(g) && m.parent.inlineContent && b.end() >= p.endA, O;
|
|
9254
|
-
if ((ht && n.input.lastIOSEnter > Date.now() - 225 && (!w || i.some((M) => M.nodeName == "DIV" || M.nodeName == "P")) || !w && m.pos < c.doc.content.size && !m.sameParent(g) && (O = S.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && O.head == g.pos) && n.someProp("handleKeyDown", (M) => M(n,
|
|
9254
|
+
if ((ht && n.input.lastIOSEnter > Date.now() - 225 && (!w || i.some((M) => M.nodeName == "DIV" || M.nodeName == "P")) || !w && m.pos < c.doc.content.size && !m.sameParent(g) && (O = S.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && O.head == g.pos) && n.someProp("handleKeyDown", (M) => M(n, Ve(13, "Enter")))) {
|
|
9255
9255
|
n.input.lastIOSEnter = 0;
|
|
9256
9256
|
return;
|
|
9257
9257
|
}
|
|
9258
|
-
if (n.state.selection.anchor > p.start && Xc(f, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (M) => M(n,
|
|
9258
|
+
if (n.state.selection.anchor > p.start && Xc(f, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (M) => M(n, Ve(8, "Backspace")))) {
|
|
9259
9259
|
ne && $ && n.domObserver.suppressSelectionUpdates();
|
|
9260
9260
|
return;
|
|
9261
9261
|
}
|
|
9262
9262
|
$ && ne && p.endB == p.start && (n.input.lastAndroidDelete = Date.now()), ne && !w && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, g = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
|
|
9263
9263
|
n.someProp("handleKeyDown", function(M) {
|
|
9264
|
-
return M(n,
|
|
9264
|
+
return M(n, Ve(13, "Enter"));
|
|
9265
9265
|
});
|
|
9266
9266
|
}, 20));
|
|
9267
9267
|
let T = p.start, R = p.endA, I, fe, xe;
|
|
@@ -10128,7 +10128,7 @@ function ce(n) {
|
|
|
10128
10128
|
return e;
|
|
10129
10129
|
}
|
|
10130
10130
|
var Ne = new vt("selectingCells");
|
|
10131
|
-
function
|
|
10131
|
+
function Vt(n) {
|
|
10132
10132
|
for (let e = n.depth - 1; e > 0; e--)
|
|
10133
10133
|
if (n.node(e).type.spec.tableRole == "row")
|
|
10134
10134
|
return n.node(0).resolve(n.before(e + 1));
|
|
@@ -10147,7 +10147,7 @@ function Mr(n) {
|
|
|
10147
10147
|
return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
|
|
10148
10148
|
if ("node" in e && e.node && e.node.type.spec.tableRole == "cell")
|
|
10149
10149
|
return e.$anchor;
|
|
10150
|
-
const t =
|
|
10150
|
+
const t = Vt(e.$head) || yf(e.$head);
|
|
10151
10151
|
if (t)
|
|
10152
10152
|
return t;
|
|
10153
10153
|
throw new RangeError(`No cell found around position ${e.head}`);
|
|
@@ -10617,7 +10617,7 @@ function Af(n, e) {
|
|
|
10617
10617
|
}
|
|
10618
10618
|
return null;
|
|
10619
10619
|
}
|
|
10620
|
-
function
|
|
10620
|
+
function Pi(n) {
|
|
10621
10621
|
return function(e, t) {
|
|
10622
10622
|
if (!kn(e))
|
|
10623
10623
|
return !1;
|
|
@@ -10773,7 +10773,7 @@ function If(n, e, t, r, i, s, o) {
|
|
|
10773
10773
|
}
|
|
10774
10774
|
return !!(c || f);
|
|
10775
10775
|
}
|
|
10776
|
-
function
|
|
10776
|
+
function Vi(n, e, t, r, i, s, o, l) {
|
|
10777
10777
|
if (o == 0 || o == e.height)
|
|
10778
10778
|
return !1;
|
|
10779
10779
|
let a = !1;
|
|
@@ -10835,7 +10835,7 @@ function Li(n, e, t, r, i) {
|
|
|
10835
10835
|
throw new Error("No table found");
|
|
10836
10836
|
o = D.get(s), d = h.mapping.maps.length;
|
|
10837
10837
|
}
|
|
10838
|
-
If(h, o, s, t, c, f, d) && u(),
|
|
10838
|
+
If(h, o, s, t, c, f, d) && u(), Vi(h, o, s, t, a, c, l, d) && u(), Vi(h, o, s, t, a, c, f, d) && u(), Fi(h, o, s, t, l, f, a, d) && u(), Fi(h, o, s, t, l, f, c, d) && u();
|
|
10839
10839
|
for (let p = l; p < f; p++) {
|
|
10840
10840
|
const m = o.positionAt(p, a, s), g = o.positionAt(p, c, s);
|
|
10841
10841
|
h.replace(
|
|
@@ -10920,7 +10920,7 @@ function qt(n, e) {
|
|
|
10920
10920
|
};
|
|
10921
10921
|
}
|
|
10922
10922
|
function zf(n, e) {
|
|
10923
|
-
const t = n.state.doc, r =
|
|
10923
|
+
const t = n.state.doc, r = Vt(t.resolve(e));
|
|
10924
10924
|
return r ? (n.dispatch(n.state.tr.setSelection(new z(r))), !0) : !1;
|
|
10925
10925
|
}
|
|
10926
10926
|
function Bf(n, e, t) {
|
|
@@ -10955,7 +10955,7 @@ function Bf(n, e, t) {
|
|
|
10955
10955
|
} else
|
|
10956
10956
|
return !1;
|
|
10957
10957
|
}
|
|
10958
|
-
function
|
|
10958
|
+
function Pf(n, e) {
|
|
10959
10959
|
var t;
|
|
10960
10960
|
if (e.ctrlKey || e.metaKey)
|
|
10961
10961
|
return;
|
|
@@ -10963,7 +10963,7 @@ function Vf(n, e) {
|
|
|
10963
10963
|
let i;
|
|
10964
10964
|
if (e.shiftKey && n.state.selection instanceof z)
|
|
10965
10965
|
s(n.state.selection.$anchorCell, e), e.preventDefault();
|
|
10966
|
-
else if (e.shiftKey && r && (i =
|
|
10966
|
+
else if (e.shiftKey && r && (i = Vt(n.state.selection.$anchor)) != null && ((t = $n(n, e)) == null ? void 0 : t.pos) != i.pos)
|
|
10967
10967
|
s(i, e), e.preventDefault();
|
|
10968
10968
|
else if (!r)
|
|
10969
10969
|
return;
|
|
@@ -11021,9 +11021,9 @@ function $n(n, e) {
|
|
|
11021
11021
|
left: e.clientX,
|
|
11022
11022
|
top: e.clientY
|
|
11023
11023
|
});
|
|
11024
|
-
return t && t ?
|
|
11024
|
+
return t && t ? Vt(n.state.doc.resolve(t.pos)) : null;
|
|
11025
11025
|
}
|
|
11026
|
-
var
|
|
11026
|
+
var Vf = class {
|
|
11027
11027
|
constructor(n, e) {
|
|
11028
11028
|
this.node = n, this.defaultCellMinWidth = e, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table")), this.table.style.setProperty(
|
|
11029
11029
|
"--default-cell-min-width",
|
|
@@ -11073,7 +11073,7 @@ function Ff({
|
|
|
11073
11073
|
handleWidth: n = 5,
|
|
11074
11074
|
cellMinWidth: e = 25,
|
|
11075
11075
|
defaultCellMinWidth: t = 100,
|
|
11076
|
-
View: r =
|
|
11076
|
+
View: r = Vf,
|
|
11077
11077
|
lastColumnResizable: i = !0
|
|
11078
11078
|
} = {}) {
|
|
11079
11079
|
const s = new It({
|
|
@@ -11220,7 +11220,7 @@ function $i(n, e, t, r) {
|
|
|
11220
11220
|
});
|
|
11221
11221
|
if (!s)
|
|
11222
11222
|
return -1;
|
|
11223
|
-
const { pos: o } = s, l =
|
|
11223
|
+
const { pos: o } = s, l = Vt(n.state.doc.resolve(o));
|
|
11224
11224
|
if (!l)
|
|
11225
11225
|
return -1;
|
|
11226
11226
|
if (t == "right")
|
|
@@ -11316,7 +11316,7 @@ function Gf({
|
|
|
11316
11316
|
props: {
|
|
11317
11317
|
decorations: kf,
|
|
11318
11318
|
handleDOMEvents: {
|
|
11319
|
-
mousedown:
|
|
11319
|
+
mousedown: Pf
|
|
11320
11320
|
},
|
|
11321
11321
|
createSelectionBetween(e) {
|
|
11322
11322
|
return Ne.getState(e.state) != null ? e.state.selection : null;
|
|
@@ -11531,7 +11531,7 @@ const Mt = (n) => {
|
|
|
11531
11531
|
nodes: _f,
|
|
11532
11532
|
marks: Xf
|
|
11533
11533
|
});
|
|
11534
|
-
var dn = /* @__PURE__ */ ((n) => (n.toastAdd = "studio:toastAdd", n.dialogOpen = "studio:dialogOpen", n.dialogClose = "studio:dialogClose", n.sidebarLeftSet = "studio:sidebarLeft:set", n.sidebarLeftGet = "studio:sidebarLeft:get", n.sidebarLeftToggle = "studio:sidebarLeft:toggle", n.sidebarRightSet = "studio:sidebarRight:set", n.sidebarRightGet = "studio:sidebarRight:get", n.sidebarRightToggle = "studio:sidebarRight:toggle", n.sidebarTopSet = "studio:sidebarTop:set", n.sidebarTopGet = "studio:sidebarTop:get", n.sidebarTopToggle = "studio:sidebarTop:toggle", n.sidebarBottomSet = "studio:sidebarBottom:set", n.sidebarBottomGet = "studio:sidebarBottom:get", n.sidebarBottomToggle = "studio:sidebarBottom:toggle", n.symbolAdd = "studio:symbolAdd", n.symbolDetach = "studio:symbolDetach", n.symbolOverride = "studio:symbolOverride", n.symbolPropagateStyles = "studio:propagateStyles", n.getPagesConfig = "studio:getPagesConfig", n.setPagesConfig = "studio:setPagesConfig", n.getPageSettings = "studio:getPageSettings", n.setPageSettings = "studio:setPageSettings", n.projectFiles = "studio:projectFiles", n.canvasReload = "studio:canvasReload", n.getBlocksPanel = "studio:getBlocksPanel", n.setBlocksPanel = "studio:setBlocksPanel", n.getStateContextMenu = "studio:getStateContextMenu", n.setStateContextMenu = "studio:setStateContextMenu", n.contextMenuComponent = "studio:contextMenuComponent", n.layoutAdd = "studio:layoutAdd", n.layoutRemove = "studio:layoutRemove", n.layoutToggle = "studio:layoutToggle", n.getStateTheme = "studio:getStateTheme", n.setStateTheme = "studio:setStateTheme", n))(dn || {});
|
|
11534
|
+
var dn = /* @__PURE__ */ ((n) => (n.toastAdd = "studio:toastAdd", n.dialogOpen = "studio:dialogOpen", n.dialogClose = "studio:dialogClose", n.sidebarLeftSet = "studio:sidebarLeft:set", n.sidebarLeftGet = "studio:sidebarLeft:get", n.sidebarLeftToggle = "studio:sidebarLeft:toggle", n.sidebarRightSet = "studio:sidebarRight:set", n.sidebarRightGet = "studio:sidebarRight:get", n.sidebarRightToggle = "studio:sidebarRight:toggle", n.sidebarTopSet = "studio:sidebarTop:set", n.sidebarTopGet = "studio:sidebarTop:get", n.sidebarTopToggle = "studio:sidebarTop:toggle", n.sidebarBottomSet = "studio:sidebarBottom:set", n.sidebarBottomGet = "studio:sidebarBottom:get", n.sidebarBottomToggle = "studio:sidebarBottom:toggle", n.symbolAdd = "studio:symbolAdd", n.symbolDetach = "studio:symbolDetach", n.symbolOverride = "studio:symbolOverride", n.symbolPropagateStyles = "studio:propagateStyles", n.getPagesConfig = "studio:getPagesConfig", n.setPagesConfig = "studio:setPagesConfig", n.getPageSettings = "studio:getPageSettings", n.setPageSettings = "studio:setPageSettings", n.projectFiles = "studio:projectFiles", n.canvasReload = "studio:canvasReload", n.getBlocksPanel = "studio:getBlocksPanel", n.setBlocksPanel = "studio:setBlocksPanel", n.getStateContextMenu = "studio:getStateContextMenu", n.setStateContextMenu = "studio:setStateContextMenu", n.contextMenuComponent = "studio:contextMenuComponent", n.layoutAdd = "studio:layoutAdd", n.layoutRemove = "studio:layoutRemove", n.layoutToggle = "studio:layoutToggle", n.getStateTheme = "studio:getStateTheme", n.setStateTheme = "studio:setStateTheme", n.assetProviderGet = "studio:assetProviderGet", n.assetProviderAdd = "studio:assetProviderAdd", n.assetProviderRemove = "studio:assetProviderRemove", n))(dn || {});
|
|
11535
11535
|
const Sn = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Yf = (n, e) => {
|
|
11536
11536
|
Sn.set(n, e), Tr.set(e, n);
|
|
11537
11537
|
}, Zf = (n, e) => {
|
|
@@ -11696,9 +11696,9 @@ const hh = (n, e) => {
|
|
|
11696
11696
|
const { event: i } = e, s = n.posAtCoords({ left: i.clientX, top: i.clientY });
|
|
11697
11697
|
s != null && s.pos && r(t.tr.setSelection(C.create(t.doc, s.pos)));
|
|
11698
11698
|
} else
|
|
11699
|
-
|
|
11699
|
+
Ps(t, r);
|
|
11700
11700
|
setTimeout(() => setTimeout(() => n.focus()));
|
|
11701
|
-
}, fr = (n) => n.isBlock, Bo = (n) => n.type.name === "inlineFragment", dh = (n) => fr(n) && !Bo(n),
|
|
11701
|
+
}, fr = (n) => n.isBlock, Bo = (n) => n.type.name === "inlineFragment", dh = (n) => fr(n) && !Bo(n), Po = (n) => n.type.name === "bulletList", Vo = (n) => n.type.name === "orderedList", uh = (n) => n.type.name === "heading", ph = (n) => Po(n) || Vo(n), Gi = (n, e) => {
|
|
11702
11702
|
var s, o;
|
|
11703
11703
|
const t = (s = He(n, (l) => l.type === e)) == null ? void 0 : s.node, r = n.state.schema.nodes.listItem;
|
|
11704
11704
|
let i;
|
|
@@ -11749,19 +11749,19 @@ const hh = (n, e) => {
|
|
|
11749
11749
|
}
|
|
11750
11750
|
},
|
|
11751
11751
|
bold: {
|
|
11752
|
-
toggle: () =>
|
|
11752
|
+
toggle: () => Pe(i.strong)(n.state, t),
|
|
11753
11753
|
isActive: () => gt(n.state, i.strong)
|
|
11754
11754
|
},
|
|
11755
11755
|
italic: {
|
|
11756
|
-
toggle: () =>
|
|
11756
|
+
toggle: () => Pe(i.em)(n.state, t),
|
|
11757
11757
|
isActive: () => gt(n.state, i.em)
|
|
11758
11758
|
},
|
|
11759
11759
|
underline: {
|
|
11760
|
-
toggle: () =>
|
|
11760
|
+
toggle: () => Pe(i.underline)(n.state, t),
|
|
11761
11761
|
isActive: () => gt(n.state, i.underline)
|
|
11762
11762
|
},
|
|
11763
11763
|
strikethrough: {
|
|
11764
|
-
toggle: () =>
|
|
11764
|
+
toggle: () => Pe(i.strikethrough)(n.state, t),
|
|
11765
11765
|
isActive: () => gt(n.state, i.strikethrough)
|
|
11766
11766
|
},
|
|
11767
11767
|
link: {
|
|
@@ -11774,7 +11774,7 @@ const hh = (n, e) => {
|
|
|
11774
11774
|
return o ? Me(o) : {};
|
|
11775
11775
|
}
|
|
11776
11776
|
},
|
|
11777
|
-
toggle: () =>
|
|
11777
|
+
toggle: () => Pe(i.link)(n.state, t),
|
|
11778
11778
|
isActive: () => gt(n.state, i.link),
|
|
11779
11779
|
create: (s) => {
|
|
11780
11780
|
const o = Ui(n);
|
|
@@ -11825,14 +11825,14 @@ const hh = (n, e) => {
|
|
|
11825
11825
|
listBullet: {
|
|
11826
11826
|
isActive: () => {
|
|
11827
11827
|
var s;
|
|
11828
|
-
return !!((s = He(n,
|
|
11828
|
+
return !!((s = He(n, Po)) != null && s.node);
|
|
11829
11829
|
},
|
|
11830
11830
|
toggle: () => Gi(n, r.bulletList)
|
|
11831
11831
|
},
|
|
11832
11832
|
listOrdered: {
|
|
11833
11833
|
isActive: () => {
|
|
11834
11834
|
var s;
|
|
11835
|
-
return !!((s = He(n,
|
|
11835
|
+
return !!((s = He(n, Vo)) != null && s.node);
|
|
11836
11836
|
},
|
|
11837
11837
|
toggle: () => Gi(n, r.orderedList)
|
|
11838
11838
|
}
|
|
@@ -12261,7 +12261,7 @@ function zh(n) {
|
|
|
12261
12261
|
let t;
|
|
12262
12262
|
return (t = n.nodes.blockquote) && e.push(Dh(t)), (t = n.nodes.orderedList) && e.push(Eh(t)), (t = n.nodes.bulletList) && e.push(Rh(t)), (t = n.nodes.codeBlock) && e.push(Ih(t)), (t = n.nodes.heading) && e.push(vh(t, 6)), Sh({ rules: e });
|
|
12263
12263
|
}
|
|
12264
|
-
const Bh = "rteProseMirror",
|
|
12264
|
+
const Bh = "rteProseMirror", Ph = function(n, e = {}) {
|
|
12265
12265
|
const t = {
|
|
12266
12266
|
plugins: (o) => o.plugins,
|
|
12267
12267
|
...e
|
|
@@ -12278,8 +12278,8 @@ const Bh = "rteProseMirror", Vh = function(n, e = {}) {
|
|
|
12278
12278
|
zh(a),
|
|
12279
12279
|
ca(),
|
|
12280
12280
|
Bn({
|
|
12281
|
-
Tab:
|
|
12282
|
-
"Shift-Tab":
|
|
12281
|
+
Tab: Pi(1),
|
|
12282
|
+
"Shift-Tab": Pi(-1)
|
|
12283
12283
|
}),
|
|
12284
12284
|
Bn({
|
|
12285
12285
|
Enter: Tt(zs, ya(c.listItem), rh),
|
|
@@ -12289,8 +12289,8 @@ const Bh = "rteProseMirror", Vh = function(n, e = {}) {
|
|
|
12289
12289
|
// On Windows
|
|
12290
12290
|
"Mod-Shift-z": Un,
|
|
12291
12291
|
// On Mac
|
|
12292
|
-
"Mod-b":
|
|
12293
|
-
"Mod-i":
|
|
12292
|
+
"Mod-b": Pe(f.strong),
|
|
12293
|
+
"Mod-i": Pe(f.em),
|
|
12294
12294
|
"Shift-Tab": Gn(c.listItem),
|
|
12295
12295
|
Tab: ka(c.listItem)
|
|
12296
12296
|
}),
|
|
@@ -12323,6 +12323,7 @@ const Bh = "rteProseMirror", Vh = function(n, e = {}) {
|
|
|
12323
12323
|
// Use Studio SDK toolbar
|
|
12324
12324
|
toolbar: i,
|
|
12325
12325
|
parseContent: !0,
|
|
12326
|
+
// @ts-expect-error - Type 'CustomRteOptions' is missing the following properties from type 'CustomRteOptions': editor, component, el
|
|
12326
12327
|
async enable(o, l, a) {
|
|
12327
12328
|
const c = Wn(o);
|
|
12328
12329
|
if (c) return c;
|
|
@@ -12355,7 +12356,7 @@ const Bh = "rteProseMirror", Vh = function(n, e = {}) {
|
|
|
12355
12356
|
n.RichTextEditor.customRte = void 0, s();
|
|
12356
12357
|
}
|
|
12357
12358
|
});
|
|
12358
|
-
}, Fh = cf(
|
|
12359
|
+
}, Fh = cf(Ph);
|
|
12359
12360
|
export {
|
|
12360
12361
|
Fh as default
|
|
12361
12362
|
};
|