@jinntec/jinntap 1.10.1 → 1.11.0
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/jinn-tap.es.js +102 -98
- package/dist/jinn-tap.umd.js +1 -1
- package/package.json +1 -1
package/dist/jinn-tap.es.js
CHANGED
|
@@ -650,44 +650,44 @@ function Ji(r, e, t, n) {
|
|
|
650
650
|
} else if (t.content.size)
|
|
651
651
|
if (!t.openStart && !t.openEnd && r.depth == n && e.depth == n) {
|
|
652
652
|
let o = r.parent, l = o.content;
|
|
653
|
-
return
|
|
653
|
+
return Le(o, l.cut(0, r.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
|
|
654
654
|
} else {
|
|
655
655
|
let { start: o, end: l } = Io(t, r);
|
|
656
|
-
return
|
|
656
|
+
return Le(s, Ui(r, o, l, e, n));
|
|
657
657
|
}
|
|
658
|
-
else return
|
|
658
|
+
else return Le(s, Jt(r, e, n));
|
|
659
659
|
}
|
|
660
660
|
function Ki(r, e) {
|
|
661
661
|
if (!e.type.compatibleContent(r.type))
|
|
662
662
|
throw new qt("Cannot join " + e.type.name + " onto " + r.type.name);
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function Fn(r, e, t) {
|
|
665
665
|
let n = r.node(t);
|
|
666
666
|
return Ki(n, e.node(t)), n;
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function Fe(r, e) {
|
|
669
669
|
let t = e.length - 1;
|
|
670
670
|
t >= 0 && r.isText && r.sameMarkup(e[t]) ? e[t] = r.withText(e[t].text + r.text) : e.push(r);
|
|
671
671
|
}
|
|
672
672
|
function dt(r, e, t, n) {
|
|
673
673
|
let i = (e || r).node(t), s = 0, o = e ? e.index(t) : i.childCount;
|
|
674
|
-
r && (s = r.index(t), r.depth > t ? s++ : r.textOffset && (
|
|
674
|
+
r && (s = r.index(t), r.depth > t ? s++ : r.textOffset && (Fe(r.nodeAfter, n), s++));
|
|
675
675
|
for (let l = s; l < o; l++)
|
|
676
|
-
|
|
677
|
-
e && e.depth == t && e.textOffset &&
|
|
676
|
+
Fe(i.child(l), n);
|
|
677
|
+
e && e.depth == t && e.textOffset && Fe(e.nodeBefore, n);
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function Le(r, e) {
|
|
680
680
|
return r.type.checkContent(e), r.copy(e);
|
|
681
681
|
}
|
|
682
682
|
function Ui(r, e, t, n, i) {
|
|
683
|
-
let s = r.depth > i &&
|
|
684
|
-
return dt(null, r, i, l), s && o && e.index(i) == t.index(i) ? (Ki(s, o), Le(
|
|
683
|
+
let s = r.depth > i && Fn(r, e, i + 1), o = n.depth > i && Fn(t, n, i + 1), l = [];
|
|
684
|
+
return dt(null, r, i, l), s && o && e.index(i) == t.index(i) ? (Ki(s, o), Fe(Le(s, Ui(r, e, t, n, i + 1)), l)) : (s && Fe(Le(s, Jt(r, e, i + 1)), l), dt(e, t, i, l), o && Fe(Le(o, Jt(t, n, i + 1)), l)), dt(n, null, i, l), new b(l);
|
|
685
685
|
}
|
|
686
686
|
function Jt(r, e, t) {
|
|
687
687
|
let n = [];
|
|
688
688
|
if (dt(null, r, t, n), r.depth > t) {
|
|
689
|
-
let i =
|
|
690
|
-
Le(
|
|
689
|
+
let i = Fn(r, e, t + 1);
|
|
690
|
+
Fe(Le(i, Jt(r, e, t + 1)), n);
|
|
691
691
|
}
|
|
692
692
|
return dt(e, null, t, n), new b(n);
|
|
693
693
|
}
|
|
@@ -994,7 +994,7 @@ class Kt {
|
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
const Bo = /* @__PURE__ */ Object.create(null);
|
|
997
|
-
let Me = class
|
|
997
|
+
let Me = class Ln {
|
|
998
998
|
/**
|
|
999
999
|
@internal
|
|
1000
1000
|
*/
|
|
@@ -1119,14 +1119,14 @@ let Me = class Fn {
|
|
|
1119
1119
|
the given content (or empty, if no content is given).
|
|
1120
1120
|
*/
|
|
1121
1121
|
copy(e = null) {
|
|
1122
|
-
return e == this.content ? this : new
|
|
1122
|
+
return e == this.content ? this : new Ln(this.type, this.attrs, e, this.marks);
|
|
1123
1123
|
}
|
|
1124
1124
|
/**
|
|
1125
1125
|
Create a copy of this node, with the given set of marks instead
|
|
1126
1126
|
of the node's own marks.
|
|
1127
1127
|
*/
|
|
1128
1128
|
mark(e) {
|
|
1129
|
-
return e == this.marks ? this : new
|
|
1129
|
+
return e == this.marks ? this : new Ln(this.type, this.attrs, this.content, e);
|
|
1130
1130
|
}
|
|
1131
1131
|
/**
|
|
1132
1132
|
Create a copy of this node with only the content between the
|
|
@@ -1587,18 +1587,18 @@ class zo {
|
|
|
1587
1587
|
function Gi(r) {
|
|
1588
1588
|
let e = [];
|
|
1589
1589
|
do
|
|
1590
|
-
e.push(
|
|
1590
|
+
e.push(Fo(r));
|
|
1591
1591
|
while (r.eat("|"));
|
|
1592
1592
|
return e.length == 1 ? e[0] : { type: "choice", exprs: e };
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function Fo(r) {
|
|
1595
1595
|
let e = [];
|
|
1596
1596
|
do
|
|
1597
|
-
e.push(
|
|
1597
|
+
e.push(Lo(r));
|
|
1598
1598
|
while (r.next && r.next != ")" && r.next != "|");
|
|
1599
1599
|
return e.length == 1 ? e[0] : { type: "seq", exprs: e };
|
|
1600
1600
|
}
|
|
1601
|
-
function
|
|
1601
|
+
function Lo(r) {
|
|
1602
1602
|
let e = jo(r);
|
|
1603
1603
|
for (; ; )
|
|
1604
1604
|
if (r.eat("+"))
|
|
@@ -2241,13 +2241,13 @@ let ht = class $n {
|
|
|
2241
2241
|
for (let i in e.marks) {
|
|
2242
2242
|
let s = e.marks[i].spec.parseDOM;
|
|
2243
2243
|
s && s.forEach((o) => {
|
|
2244
|
-
n(o =
|
|
2244
|
+
n(o = Fr(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
|
|
2245
2245
|
});
|
|
2246
2246
|
}
|
|
2247
2247
|
for (let i in e.nodes) {
|
|
2248
2248
|
let s = e.nodes[i].spec.parseDOM;
|
|
2249
2249
|
s && s.forEach((o) => {
|
|
2250
|
-
n(o =
|
|
2250
|
+
n(o = Fr(o)), o.node || o.ignore || o.mark || (o.node = i);
|
|
2251
2251
|
});
|
|
2252
2252
|
}
|
|
2253
2253
|
return t;
|
|
@@ -2301,13 +2301,13 @@ const rs = {
|
|
|
2301
2301
|
script: !0,
|
|
2302
2302
|
style: !0,
|
|
2303
2303
|
title: !0
|
|
2304
|
-
}, is = { ol: !0, ul: !0 }, yt = 1, Vn = 2,
|
|
2304
|
+
}, is = { ol: !0, ul: !0 }, yt = 1, Vn = 2, Lt = 4;
|
|
2305
2305
|
function Br(r, e, t) {
|
|
2306
2306
|
return e != null ? (e ? yt : 0) | (e === "full" ? Vn : 0) : r && r.whitespace == "pre" ? yt | Vn : t & -5;
|
|
2307
2307
|
}
|
|
2308
2308
|
class Pt {
|
|
2309
2309
|
constructor(e, t, n, i, s, o) {
|
|
2310
|
-
this.type = e, this.attrs = t, this.marks = n, this.solid = i, this.options = o, this.content = [], this.activeMarks = D.none, this.match = s || (o &
|
|
2310
|
+
this.type = e, this.attrs = t, this.marks = n, this.solid = i, this.options = o, this.content = [], this.activeMarks = D.none, this.match = s || (o & Lt ? null : e.contentMatch);
|
|
2311
2311
|
}
|
|
2312
2312
|
findWrapping(e) {
|
|
2313
2313
|
if (!this.match) {
|
|
@@ -2341,7 +2341,7 @@ class Pt {
|
|
|
2341
2341
|
class zr {
|
|
2342
2342
|
constructor(e, t, n) {
|
|
2343
2343
|
this.parser = e, this.options = t, this.isOpen = n, this.open = 0, this.localPreserveWS = !1;
|
|
2344
|
-
let i = t.topNode, s, o = Br(null, t.preserveWhitespace, 0) | (n ?
|
|
2344
|
+
let i = t.topNode, s, o = Br(null, t.preserveWhitespace, 0) | (n ? Lt : 0);
|
|
2345
2345
|
i ? s = new Pt(i.type, i.attrs, D.none, !0, t.topMatch || i.type.contentMatch, o) : n ? s = new Pt(null, null, D.none, !0, null, o) : s = new Pt(e.schema.topNodeType, null, D.none, !0, null, o), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
|
|
2346
2346
|
}
|
|
2347
2347
|
get top() {
|
|
@@ -2499,7 +2499,7 @@ class zr {
|
|
|
2499
2499
|
s.match && (s.match = s.match.matchType(e.type));
|
|
2500
2500
|
let o = D.none;
|
|
2501
2501
|
for (let l of i.concat(e.marks))
|
|
2502
|
-
(s.type ? s.type.allowsMarkType(l.type) :
|
|
2502
|
+
(s.type ? s.type.allowsMarkType(l.type) : Lr(l.type, e.type)) && (o = l.addToSet(o));
|
|
2503
2503
|
return s.content.push(e.mark(o)), !0;
|
|
2504
2504
|
}
|
|
2505
2505
|
return !1;
|
|
@@ -2516,9 +2516,9 @@ class zr {
|
|
|
2516
2516
|
let o = this.top;
|
|
2517
2517
|
o.match = o.match && o.match.matchType(e);
|
|
2518
2518
|
let l = Br(e, s, o.options);
|
|
2519
|
-
o.options &
|
|
2519
|
+
o.options & Lt && o.content.length == 0 && (l |= Lt);
|
|
2520
2520
|
let a = D.none;
|
|
2521
|
-
return n = n.filter((c) => (o.type ? o.type.allowsMarkType(c.type) :
|
|
2521
|
+
return n = n.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : Lr(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new Pt(e, t, a, i, null, l)), this.open++, n;
|
|
2522
2522
|
}
|
|
2523
2523
|
// Make sure all nodes above this.open are finished and added to
|
|
2524
2524
|
// their parents
|
|
@@ -2621,13 +2621,13 @@ function Yo(r) {
|
|
|
2621
2621
|
function Xo(r, e) {
|
|
2622
2622
|
return (r.matches || r.msMatchesSelector || r.webkitMatchesSelector || r.mozMatchesSelector).call(r, e);
|
|
2623
2623
|
}
|
|
2624
|
-
function
|
|
2624
|
+
function Fr(r) {
|
|
2625
2625
|
let e = {};
|
|
2626
2626
|
for (let t in r)
|
|
2627
2627
|
e[t] = r[t];
|
|
2628
2628
|
return e;
|
|
2629
2629
|
}
|
|
2630
|
-
function
|
|
2630
|
+
function Lr(r, e) {
|
|
2631
2631
|
let t = e.schema.nodes;
|
|
2632
2632
|
for (let n in t) {
|
|
2633
2633
|
let i = t[n];
|
|
@@ -5234,7 +5234,7 @@ function Rl(r, e, t) {
|
|
|
5234
5234
|
const ue = typeof navigator < "u" ? navigator : null, Xr = typeof document < "u" ? document : null, ve = ue && ue.userAgent || "", qn = /Edge\/(\d+)/.exec(ve), xs = /MSIE \d/.exec(ve), Jn = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ve), Y = !!(xs || Jn || qn), Ee = xs ? document.documentMode : Jn ? +Jn[1] : qn ? +qn[1] : 0, oe = !Y && /gecko\/(\d+)/i.test(ve);
|
|
5235
5235
|
oe && +(/Firefox\/(\d+)/.exec(ve) || [0, 0])[1];
|
|
5236
5236
|
const Kn = !Y && /Chrome\/(\d+)/.exec(ve), q = !!Kn, Ss = Kn ? +Kn[1] : 0, U = !Y && !!ue && /Apple Computer/.test(ue.vendor), rt = U && (/Mobile\/\w+/.test(ve) || !!ue && ue.maxTouchPoints > 2), te = rt || (ue ? /Mac/.test(ue.platform) : !1), Bl = ue ? /Win/.test(ue.platform) : !1, pe = /Android \d/.test(ve), Nt = !!Xr && "webkitFontSmoothing" in Xr.documentElement.style, zl = Nt ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5237
|
-
function
|
|
5237
|
+
function Fl(r) {
|
|
5238
5238
|
let e = r.defaultView && r.defaultView.visualViewport;
|
|
5239
5239
|
return e ? {
|
|
5240
5240
|
left: 0,
|
|
@@ -5251,7 +5251,7 @@ function Ll(r) {
|
|
|
5251
5251
|
function he(r, e) {
|
|
5252
5252
|
return typeof r == "number" ? r : r[e];
|
|
5253
5253
|
}
|
|
5254
|
-
function
|
|
5254
|
+
function Ll(r) {
|
|
5255
5255
|
let e = r.getBoundingClientRect(), t = e.width / r.offsetWidth || 1, n = e.height / r.offsetHeight || 1;
|
|
5256
5256
|
return {
|
|
5257
5257
|
left: e.left,
|
|
@@ -5267,7 +5267,7 @@ function Zr(r, e, t) {
|
|
|
5267
5267
|
o = nt(o);
|
|
5268
5268
|
continue;
|
|
5269
5269
|
}
|
|
5270
|
-
let l = o, a = l == s.body, c = a ?
|
|
5270
|
+
let l = o, a = l == s.body, c = a ? Fl(s) : Ll(l), u = 0, d = 0;
|
|
5271
5271
|
if (e.top < c.top + he(n, "top") ? d = -(c.top - e.top + he(i, "top")) : e.bottom > c.bottom - he(n, "bottom") && (d = e.bottom - e.top > c.bottom - c.top ? e.top + he(i, "top") - c.top : e.bottom - c.bottom + he(i, "bottom")), e.left < c.left + he(n, "left") ? u = -(c.left - e.left + he(i, "left")) : e.right > c.right - he(n, "right") && (u = e.right - c.right + he(i, "right")), u || d)
|
|
5272
5272
|
if (a)
|
|
5273
5273
|
s.defaultView.scrollBy(u, d);
|
|
@@ -6986,7 +6986,7 @@ function hr(r, e) {
|
|
|
6986
6986
|
`);
|
|
6987
6987
|
return { dom: a, text: h, slice: e };
|
|
6988
6988
|
}
|
|
6989
|
-
function
|
|
6989
|
+
function Fs(r, e, t, n, i) {
|
|
6990
6990
|
let s = i.parent.type.spec.code, o, l;
|
|
6991
6991
|
if (!t && !e)
|
|
6992
6992
|
return null;
|
|
@@ -7057,7 +7057,7 @@ function ba(r, e) {
|
|
|
7057
7057
|
o[o.length - 1] = c;
|
|
7058
7058
|
else {
|
|
7059
7059
|
o.length && (o[o.length - 1] = Vs(o[o.length - 1], s.length));
|
|
7060
|
-
let u =
|
|
7060
|
+
let u = Ls(l, a);
|
|
7061
7061
|
o.push(u), i = i.matchType(u.type), s = a;
|
|
7062
7062
|
}
|
|
7063
7063
|
}), o)
|
|
@@ -7065,7 +7065,7 @@ function ba(r, e) {
|
|
|
7065
7065
|
}
|
|
7066
7066
|
return r;
|
|
7067
7067
|
}
|
|
7068
|
-
function
|
|
7068
|
+
function Ls(r, e, t = 0) {
|
|
7069
7069
|
for (let n = e.length - 1; n >= t; n--)
|
|
7070
7070
|
r = e[n].create(null, b.from(r));
|
|
7071
7071
|
return r;
|
|
@@ -7076,7 +7076,7 @@ function $s(r, e, t, n, i) {
|
|
|
7076
7076
|
if (s)
|
|
7077
7077
|
return n.copy(n.content.replaceChild(n.childCount - 1, s));
|
|
7078
7078
|
if (n.contentMatchAt(n.childCount).matchType(i == r.length - 1 ? t.type : r[i + 1]))
|
|
7079
|
-
return n.copy(n.content.append(b.from(
|
|
7079
|
+
return n.copy(n.content.append(b.from(Ls(t, r, i + 1))));
|
|
7080
7080
|
}
|
|
7081
7081
|
}
|
|
7082
7082
|
function Vs(r, e) {
|
|
@@ -7360,7 +7360,7 @@ _.contextmenu = (r) => mr(r);
|
|
|
7360
7360
|
function qs(r, e) {
|
|
7361
7361
|
return r.composing ? !0 : U && Math.abs(e.timeStamp - r.input.compositionEndedAt) < 500 ? (r.input.compositionEndedAt = -2e8, !0) : !1;
|
|
7362
7362
|
}
|
|
7363
|
-
const
|
|
7363
|
+
const Fa = pe ? 5e3 : -1;
|
|
7364
7364
|
G.compositionstart = G.compositionupdate = (r) => {
|
|
7365
7365
|
if (!r.composing) {
|
|
7366
7366
|
r.domObserver.flush();
|
|
@@ -7383,7 +7383,7 @@ G.compositionstart = G.compositionupdate = (r) => {
|
|
|
7383
7383
|
}
|
|
7384
7384
|
r.input.composing = !0;
|
|
7385
7385
|
}
|
|
7386
|
-
Js(r,
|
|
7386
|
+
Js(r, Fa);
|
|
7387
7387
|
};
|
|
7388
7388
|
G.compositionend = (r, e) => {
|
|
7389
7389
|
r.composing && (r.input.composing = !1, r.input.compositionEndedAt = e.timeStamp, r.input.compositionPendingChanges = r.domObserver.pendingRecords().length ? r.input.compositionID : 0, r.input.compositionNode = null, r.input.compositionPendingChanges && Promise.resolve().then(() => r.domObserver.flush()), r.input.compositionID++, Js(r, 20));
|
|
@@ -7395,7 +7395,7 @@ function Ks(r) {
|
|
|
7395
7395
|
for (r.composing && (r.input.composing = !1, r.input.compositionEndedAt = $a()); r.input.compositionNodes.length > 0; )
|
|
7396
7396
|
r.input.compositionNodes.pop().markParentsDirty();
|
|
7397
7397
|
}
|
|
7398
|
-
function
|
|
7398
|
+
function La(r) {
|
|
7399
7399
|
let e = r.domSelectionRange();
|
|
7400
7400
|
if (!e.focusNode)
|
|
7401
7401
|
return null;
|
|
@@ -7459,7 +7459,7 @@ function Ha(r, e) {
|
|
|
7459
7459
|
}, 50);
|
|
7460
7460
|
}
|
|
7461
7461
|
function St(r, e, t, n, i) {
|
|
7462
|
-
let s =
|
|
7462
|
+
let s = Fs(r, e, t, n, r.state.selection.$from);
|
|
7463
7463
|
if (r.someProp("handlePaste", (a) => a(r, i, s || k.empty)))
|
|
7464
7464
|
return !0;
|
|
7465
7465
|
if (!s)
|
|
@@ -7524,7 +7524,7 @@ G.drop = (r, e) => {
|
|
|
7524
7524
|
let s = r.state.doc.resolve(i.pos), o = n && n.slice;
|
|
7525
7525
|
o ? r.someProp("transformPasted", (p) => {
|
|
7526
7526
|
o = p(o, r);
|
|
7527
|
-
}) : o =
|
|
7527
|
+
}) : o = Fs(r, Us(t.dataTransfer), xt ? null : t.dataTransfer.getData("text/html"), !1, s);
|
|
7528
7528
|
let l = !!(n && Gs(r, t));
|
|
7529
7529
|
if (r.someProp("handleDrop", (p) => p(r, t, o || k.empty, l))) {
|
|
7530
7530
|
t.preventDefault();
|
|
@@ -8547,7 +8547,7 @@ class oc {
|
|
|
8547
8547
|
let f = d && (Y || q) && !this.composing && !i.selection.empty && !e.selection.empty && lc(i.selection, e.selection);
|
|
8548
8548
|
if (d) {
|
|
8549
8549
|
let p = q ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
8550
|
-
this.composing && (this.input.compositionNode =
|
|
8550
|
+
this.composing && (this.input.compositionNode = La(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = ii(e.doc, c, a, this.dom, this)), p && !this.trackWrites && (f = !0);
|
|
8551
8551
|
}
|
|
8552
8552
|
f || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && ca(this)) ? ge(this, f) : (Rs(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
8553
8553
|
}
|
|
@@ -9526,7 +9526,7 @@ class dn {
|
|
|
9526
9526
|
return l;
|
|
9527
9527
|
}
|
|
9528
9528
|
}
|
|
9529
|
-
class
|
|
9529
|
+
class Fc {
|
|
9530
9530
|
constructor() {
|
|
9531
9531
|
this.callbacks = {};
|
|
9532
9532
|
}
|
|
@@ -9619,7 +9619,7 @@ function ho(r) {
|
|
|
9619
9619
|
});
|
|
9620
9620
|
}), e;
|
|
9621
9621
|
}
|
|
9622
|
-
function
|
|
9622
|
+
function L(r, e) {
|
|
9623
9623
|
if (typeof r == "string") {
|
|
9624
9624
|
if (!e.nodes[r])
|
|
9625
9625
|
throw Error(`There is no node type named '${r}'. Maybe you forgot to add the extension?`);
|
|
@@ -9627,7 +9627,7 @@ function F(r, e) {
|
|
|
9627
9627
|
}
|
|
9628
9628
|
return r;
|
|
9629
9629
|
}
|
|
9630
|
-
function
|
|
9630
|
+
function Lc(...r) {
|
|
9631
9631
|
return r.filter((e) => !!e).reduce((e, t) => {
|
|
9632
9632
|
const n = { ...e };
|
|
9633
9633
|
return Object.entries(t).forEach(([i, s]) => {
|
|
@@ -9655,7 +9655,7 @@ function Fc(...r) {
|
|
|
9655
9655
|
function Qn(r, e) {
|
|
9656
9656
|
return e.filter((t) => t.type === r.type.name).filter((t) => t.attribute.rendered).map((t) => t.attribute.renderHTML ? t.attribute.renderHTML(r.attrs) || {} : {
|
|
9657
9657
|
[t.name]: r.attrs[t.name]
|
|
9658
|
-
}).reduce((t, n) =>
|
|
9658
|
+
}).reduce((t, n) => Lc(t, n), {});
|
|
9659
9659
|
}
|
|
9660
9660
|
function fo(r) {
|
|
9661
9661
|
return typeof r == "function";
|
|
@@ -10252,7 +10252,7 @@ class Ze {
|
|
|
10252
10252
|
options: n.options,
|
|
10253
10253
|
storage: n.storage,
|
|
10254
10254
|
editor: e,
|
|
10255
|
-
type:
|
|
10255
|
+
type: L(n.name, this.schema)
|
|
10256
10256
|
}, o = x(n, "addNodeView", s);
|
|
10257
10257
|
if (!o)
|
|
10258
10258
|
return [];
|
|
@@ -10416,7 +10416,7 @@ const Zc = J.create({
|
|
|
10416
10416
|
}
|
|
10417
10417
|
return !1;
|
|
10418
10418
|
}, ou = (r) => ({ tr: e, state: t, dispatch: n }) => {
|
|
10419
|
-
const i =
|
|
10419
|
+
const i = L(r, t.schema), s = e.selection.$anchor;
|
|
10420
10420
|
for (let o = s.depth; o > 0; o -= 1)
|
|
10421
10421
|
if (s.node(o).type === i) {
|
|
10422
10422
|
if (n) {
|
|
@@ -10540,7 +10540,7 @@ const pu = (r = null, e = {}) => ({ editor: t, view: n, tr: i, dispatch: s }) =>
|
|
|
10540
10540
|
}
|
|
10541
10541
|
return r;
|
|
10542
10542
|
};
|
|
10543
|
-
function
|
|
10543
|
+
function Ft(r) {
|
|
10544
10544
|
const e = `<body>${r}</body>`, t = new window.DOMParser().parseFromString(e, "text/html").body;
|
|
10545
10545
|
return ko(t);
|
|
10546
10546
|
}
|
|
@@ -10585,11 +10585,11 @@ function Mt(r, e, t) {
|
|
|
10585
10585
|
}
|
|
10586
10586
|
})
|
|
10587
10587
|
});
|
|
10588
|
-
if (t.slice ? ht.fromSchema(a).parseSlice(
|
|
10588
|
+
if (t.slice ? ht.fromSchema(a).parseSlice(Ft(r), t.parseOptions) : ht.fromSchema(a).parse(Ft(r), t.parseOptions), t.errorOnInvalidContent && o)
|
|
10589
10589
|
throw new Error("[tiptap error]: Invalid HTML content", { cause: new Error(`Invalid element found: ${l}`) });
|
|
10590
10590
|
}
|
|
10591
10591
|
const s = ht.fromSchema(e);
|
|
10592
|
-
return t.slice ? s.parseSlice(
|
|
10592
|
+
return t.slice ? s.parseSlice(Ft(r), t.parseOptions).content : s.parse(Ft(r), t.parseOptions);
|
|
10593
10593
|
}
|
|
10594
10594
|
return Mt("", e, t);
|
|
10595
10595
|
}
|
|
@@ -10715,7 +10715,7 @@ const Au = (r) => ({ editor: e, view: t, tr: n, dispatch: i }) => {
|
|
|
10715
10715
|
}), !0;
|
|
10716
10716
|
};
|
|
10717
10717
|
function Et(r, e, t = {}) {
|
|
10718
|
-
const { from: n, to: i, empty: s } = r.selection, o = e ?
|
|
10718
|
+
const { from: n, to: i, empty: s } = r.selection, o = e ? L(e, r.schema) : null, l = [];
|
|
10719
10719
|
r.doc.nodesBetween(n, i, (d, h) => {
|
|
10720
10720
|
if (d.isText)
|
|
10721
10721
|
return;
|
|
@@ -10730,10 +10730,10 @@ function Et(r, e, t = {}) {
|
|
|
10730
10730
|
return s ? !!c.length : c.reduce((d, h) => d + h.to - h.from, 0) >= a;
|
|
10731
10731
|
}
|
|
10732
10732
|
const vu = (r, e = {}) => ({ state: t, dispatch: n }) => {
|
|
10733
|
-
const i =
|
|
10733
|
+
const i = L(r, t.schema);
|
|
10734
10734
|
return Et(t, i, e) ? Sc(t, n) : !1;
|
|
10735
10735
|
}, Du = () => ({ state: r, dispatch: e }) => ao(r, e), Iu = (r) => ({ state: e, dispatch: t }) => {
|
|
10736
|
-
const n =
|
|
10736
|
+
const n = L(r, e.schema);
|
|
10737
10737
|
return Pc(n)(e, t);
|
|
10738
10738
|
}, Pu = () => ({ state: r, dispatch: e }) => oo(r, e);
|
|
10739
10739
|
function pn(r, e) {
|
|
@@ -10746,7 +10746,7 @@ function Ri(r, e) {
|
|
|
10746
10746
|
const Ru = (r, e) => ({ tr: t, state: n, dispatch: i }) => {
|
|
10747
10747
|
let s = null, o = null;
|
|
10748
10748
|
const l = pn(typeof r == "string" ? r : r.name, n.schema);
|
|
10749
|
-
return l ? (l === "node" && (s =
|
|
10749
|
+
return l ? (l === "node" && (s = L(r, n.schema)), l === "mark" && (o = De(r, n.schema)), i && t.selection.ranges.forEach((a) => {
|
|
10750
10750
|
n.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, u) => {
|
|
10751
10751
|
s && s === c.type && t.setNodeMarkup(u, void 0, Ri(c.attrs, e)), o && c.marks.length && c.marks.forEach((d) => {
|
|
10752
10752
|
o === d.type && t.addMark(u, u + c.nodeSize, o.create(Ri(d.attrs, e)));
|
|
@@ -10759,7 +10759,7 @@ const Ru = (r, e) => ({ tr: t, state: n, dispatch: i }) => {
|
|
|
10759
10759
|
r.setSelection(t);
|
|
10760
10760
|
}
|
|
10761
10761
|
return !0;
|
|
10762
|
-
},
|
|
10762
|
+
}, Fu = () => ({ state: r, dispatch: e }) => no(r, e), Lu = () => ({ state: r, dispatch: e }) => so(r, e), $u = () => ({ state: r, dispatch: e }) => Ec(r, e), Vu = () => ({ state: r, dispatch: e }) => Nc(r, e), ju = () => ({ state: r, dispatch: e }) => Oc(r, e);
|
|
10763
10763
|
function er(r, e, t = {}, n = {}) {
|
|
10764
10764
|
return Mt(r, e, {
|
|
10765
10765
|
slice: !1,
|
|
@@ -10820,7 +10820,7 @@ function qu(r, e) {
|
|
|
10820
10820
|
return po(r, t, e);
|
|
10821
10821
|
}
|
|
10822
10822
|
function Ju(r, e) {
|
|
10823
|
-
const t =
|
|
10823
|
+
const t = L(e, r.schema), { from: n, to: i } = r.selection, s = [];
|
|
10824
10824
|
r.doc.nodesBetween(n, i, (l) => {
|
|
10825
10825
|
s.push(l);
|
|
10826
10826
|
});
|
|
@@ -10945,7 +10945,7 @@ const Gu = (r, e = {}) => ({ tr: t, state: n, dispatch: i }) => {
|
|
|
10945
10945
|
});
|
|
10946
10946
|
return _u(n, t, a);
|
|
10947
10947
|
}, Yu = (r, e) => ({ tr: t }) => (t.setMeta(r, e), !0), Xu = (r, e = {}) => ({ state: t, dispatch: n, chain: i }) => {
|
|
10948
|
-
const s =
|
|
10948
|
+
const s = L(r, t.schema);
|
|
10949
10949
|
let o;
|
|
10950
10950
|
return t.selection.$anchor.sameParent(t.selection.$head) && (o = t.selection.$anchor.parent.attrs), s.isTextblock ? i().command(({ commands: l }) => Ai(s, { ...o, ...e })(t) ? !0 : l.clearNodes()).command(({ state: l }) => Ai(s, { ...o, ...e })(l, n)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
10951
10951
|
}, Zu = (r) => ({ tr: e, dispatch: t }) => {
|
|
@@ -10961,7 +10961,7 @@ const Gu = (r, e = {}) => ({ tr: t, state: n, dispatch: i }) => {
|
|
|
10961
10961
|
}
|
|
10962
10962
|
return !0;
|
|
10963
10963
|
}, ed = (r) => ({ state: e, dispatch: t }) => {
|
|
10964
|
-
const n =
|
|
10964
|
+
const n = L(r, e.schema);
|
|
10965
10965
|
return zc(n)(e, t);
|
|
10966
10966
|
};
|
|
10967
10967
|
function zi(r, e) {
|
|
@@ -10999,7 +10999,7 @@ const td = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
|
|
|
10999
10999
|
return p;
|
|
11000
11000
|
}, nd = (r, e = {}) => ({ tr: t, state: n, dispatch: i, editor: s }) => {
|
|
11001
11001
|
var o;
|
|
11002
|
-
const l =
|
|
11002
|
+
const l = L(r, n.schema), { $from: a, $to: c } = n.selection, u = n.selection.node;
|
|
11003
11003
|
if (u && u.isBlock || a.depth < 2 || !a.sameParent(c))
|
|
11004
11004
|
return !1;
|
|
11005
11005
|
const d = a.node(-1);
|
|
@@ -11071,7 +11071,7 @@ const td = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
|
|
|
11071
11071
|
const i = r.doc.nodeAt(n);
|
|
11072
11072
|
return t.node.type === (i == null ? void 0 : i.type) && Ae(r.doc, n) && r.join(n), !0;
|
|
11073
11073
|
}, rd = (r, e, t, n = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: u }) => {
|
|
11074
|
-
const { extensions: d, splittableMarks: h } = i.extensionManager, f =
|
|
11074
|
+
const { extensions: d, splittableMarks: h } = i.extensionManager, f = L(r, o.schema), p = L(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: S } = m, C = y.blockRange(S), v = g || m.$to.parentOffset && m.$from.marks();
|
|
11075
11075
|
if (!C)
|
|
11076
11076
|
return !1;
|
|
11077
11077
|
const A = Nr((M) => Bi(M.type.name, d))(m);
|
|
@@ -11089,11 +11089,11 @@ const td = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
|
|
|
11089
11089
|
const { extendEmptyMarkRange: s = !1 } = t, o = De(r, n.schema);
|
|
11090
11090
|
return tr(n, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
|
|
11091
11091
|
}, sd = (r, e, t = {}) => ({ state: n, commands: i }) => {
|
|
11092
|
-
const s =
|
|
11092
|
+
const s = L(r, n.schema), o = L(e, n.schema), l = Et(n, s, t);
|
|
11093
11093
|
let a;
|
|
11094
11094
|
return n.selection.$anchor.sameParent(n.selection.$head) && (a = n.selection.$anchor.parent.attrs), l ? i.setNode(o, a) : i.setNode(s, { ...a, ...t });
|
|
11095
11095
|
}, od = (r, e = {}) => ({ state: t, commands: n }) => {
|
|
11096
|
-
const i =
|
|
11096
|
+
const i = L(r, t.schema);
|
|
11097
11097
|
return Et(t, i, e) ? n.lift(i) : n.wrapIn(i, e);
|
|
11098
11098
|
}, ld = () => ({ state: r, dispatch: e }) => {
|
|
11099
11099
|
const t = r.plugins;
|
|
@@ -11137,7 +11137,7 @@ const td = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
|
|
|
11137
11137
|
}, ud = (r, e = {}) => ({ tr: t, state: n, dispatch: i }) => {
|
|
11138
11138
|
let s = null, o = null;
|
|
11139
11139
|
const l = pn(typeof r == "string" ? r : r.name, n.schema);
|
|
11140
|
-
return l ? (l === "node" && (s =
|
|
11140
|
+
return l ? (l === "node" && (s = L(r, n.schema)), l === "mark" && (o = De(r, n.schema)), i && t.selection.ranges.forEach((a) => {
|
|
11141
11141
|
const c = a.$from.pos, u = a.$to.pos;
|
|
11142
11142
|
let d, h, f, p;
|
|
11143
11143
|
t.selection.empty ? n.doc.nodesBetween(c, u, (m, g) => {
|
|
@@ -11166,10 +11166,10 @@ const td = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
|
|
|
11166
11166
|
}));
|
|
11167
11167
|
}), !0) : !1;
|
|
11168
11168
|
}, dd = (r, e = {}) => ({ state: t, dispatch: n }) => {
|
|
11169
|
-
const i =
|
|
11169
|
+
const i = L(r, t.schema);
|
|
11170
11170
|
return Ac(i, e)(t, n);
|
|
11171
11171
|
}, hd = (r, e = {}) => ({ state: t, dispatch: n }) => {
|
|
11172
|
-
const i =
|
|
11172
|
+
const i = L(r, t.schema);
|
|
11173
11173
|
return vc(i, e)(t, n);
|
|
11174
11174
|
};
|
|
11175
11175
|
var fd = /* @__PURE__ */ Object.freeze({
|
|
@@ -11208,8 +11208,8 @@ var fd = /* @__PURE__ */ Object.freeze({
|
|
|
11208
11208
|
resetAttributes: Ru,
|
|
11209
11209
|
scrollIntoView: Bu,
|
|
11210
11210
|
selectAll: zu,
|
|
11211
|
-
selectNodeBackward:
|
|
11212
|
-
selectNodeForward:
|
|
11211
|
+
selectNodeBackward: Fu,
|
|
11212
|
+
selectNodeForward: Lu,
|
|
11213
11213
|
selectParentNode: $u,
|
|
11214
11214
|
selectTextblockEnd: Vu,
|
|
11215
11215
|
selectTextblockStart: ju,
|
|
@@ -11609,7 +11609,7 @@ function Cd(r, e, t) {
|
|
|
11609
11609
|
const i = document.createElement("style");
|
|
11610
11610
|
return e && i.setAttribute("nonce", e), i.setAttribute("data-tiptap-style", ""), i.innerHTML = r, document.getElementsByTagName("head")[0].appendChild(i), i;
|
|
11611
11611
|
}
|
|
11612
|
-
class Md extends
|
|
11612
|
+
class Md extends Fc {
|
|
11613
11613
|
constructor(e = {}) {
|
|
11614
11614
|
super(), this.isFocused = !1, this.isInitialized = !1, this.extensionStorage = {}, this.options = {
|
|
11615
11615
|
element: document.createElement("div"),
|
|
@@ -12040,36 +12040,36 @@ let Ar = class nr {
|
|
|
12040
12040
|
})), t;
|
|
12041
12041
|
}
|
|
12042
12042
|
};
|
|
12043
|
-
var tn = 200,
|
|
12043
|
+
var tn = 200, F = function() {
|
|
12044
12044
|
};
|
|
12045
|
-
|
|
12046
|
-
return e.length ? (e =
|
|
12045
|
+
F.prototype.append = function(e) {
|
|
12046
|
+
return e.length ? (e = F.from(e), !this.length && e || e.length < tn && this.leafAppend(e) || this.length < tn && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
12047
12047
|
};
|
|
12048
|
-
|
|
12049
|
-
return e.length ?
|
|
12048
|
+
F.prototype.prepend = function(e) {
|
|
12049
|
+
return e.length ? F.from(e).append(this) : this;
|
|
12050
12050
|
};
|
|
12051
|
-
|
|
12051
|
+
F.prototype.appendInner = function(e) {
|
|
12052
12052
|
return new Od(this, e);
|
|
12053
12053
|
};
|
|
12054
|
-
|
|
12055
|
-
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ?
|
|
12054
|
+
F.prototype.slice = function(e, t) {
|
|
12055
|
+
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? F.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
|
|
12056
12056
|
};
|
|
12057
|
-
|
|
12057
|
+
F.prototype.get = function(e) {
|
|
12058
12058
|
if (!(e < 0 || e >= this.length))
|
|
12059
12059
|
return this.getInner(e);
|
|
12060
12060
|
};
|
|
12061
|
-
|
|
12061
|
+
F.prototype.forEach = function(e, t, n) {
|
|
12062
12062
|
t === void 0 && (t = 0), n === void 0 && (n = this.length), t <= n ? this.forEachInner(e, t, n, 0) : this.forEachInvertedInner(e, t, n, 0);
|
|
12063
12063
|
};
|
|
12064
|
-
|
|
12064
|
+
F.prototype.map = function(e, t, n) {
|
|
12065
12065
|
t === void 0 && (t = 0), n === void 0 && (n = this.length);
|
|
12066
12066
|
var i = [];
|
|
12067
12067
|
return this.forEach(function(s, o) {
|
|
12068
12068
|
return i.push(e(s, o));
|
|
12069
12069
|
}, t, n), i;
|
|
12070
12070
|
};
|
|
12071
|
-
|
|
12072
|
-
return e instanceof
|
|
12071
|
+
F.from = function(e) {
|
|
12072
|
+
return e instanceof F ? e : e && e.length ? new Co(e) : F.empty;
|
|
12073
12073
|
};
|
|
12074
12074
|
var Co = /* @__PURE__ */ function(r) {
|
|
12075
12075
|
function e(n) {
|
|
@@ -12102,8 +12102,8 @@ var Co = /* @__PURE__ */ function(r) {
|
|
|
12102
12102
|
}, t.depth.get = function() {
|
|
12103
12103
|
return 0;
|
|
12104
12104
|
}, Object.defineProperties(e.prototype, t), e;
|
|
12105
|
-
}(
|
|
12106
|
-
|
|
12105
|
+
}(F);
|
|
12106
|
+
F.empty = new Co([]);
|
|
12107
12107
|
var Od = /* @__PURE__ */ function(r) {
|
|
12108
12108
|
function e(t, n) {
|
|
12109
12109
|
r.call(this), this.left = t, this.right = n, this.length = t.length + n.length, this.depth = Math.max(t.depth, n.depth) + 1;
|
|
@@ -12136,7 +12136,7 @@ var Od = /* @__PURE__ */ function(r) {
|
|
|
12136
12136
|
}, e.prototype.appendInner = function(n) {
|
|
12137
12137
|
return this.left.depth >= Math.max(this.right.depth, n.depth) + 1 ? new e(this.left, new e(this.right, n)) : new e(this, n);
|
|
12138
12138
|
}, e;
|
|
12139
|
-
}(
|
|
12139
|
+
}(F);
|
|
12140
12140
|
const Nd = 500;
|
|
12141
12141
|
class se {
|
|
12142
12142
|
constructor(e, t) {
|
|
@@ -12247,10 +12247,10 @@ class se {
|
|
|
12247
12247
|
(h = i.length && i[f].merge(d)) ? i[f] = h : i.push(d);
|
|
12248
12248
|
}
|
|
12249
12249
|
} else o.map && n--;
|
|
12250
|
-
}, this.items.length, 0), new se(
|
|
12250
|
+
}, this.items.length, 0), new se(F.from(i.reverse()), s);
|
|
12251
12251
|
}
|
|
12252
12252
|
}
|
|
12253
|
-
se.empty = new se(
|
|
12253
|
+
se.empty = new se(F.empty, 0);
|
|
12254
12254
|
function Ad(r, e) {
|
|
12255
12255
|
let t;
|
|
12256
12256
|
return r.forEach((n, i) => {
|
|
@@ -12285,9 +12285,9 @@ function Dd(r, e, t, n) {
|
|
|
12285
12285
|
if (t.steps.length == 0)
|
|
12286
12286
|
return r;
|
|
12287
12287
|
if (o && o.getMeta(je))
|
|
12288
|
-
return o.getMeta(je).redo ? new ke(r.done.addTransform(t, void 0, n, Ht(e)), r.undone,
|
|
12288
|
+
return o.getMeta(je).redo ? new ke(r.done.addTransform(t, void 0, n, Ht(e)), r.undone, Fi(t.mapping.maps), r.prevTime, r.prevComposition) : new ke(r.done, r.undone.addTransform(t, void 0, n, Ht(e)), null, r.prevTime, r.prevComposition);
|
|
12289
12289
|
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
12290
|
-
let l = t.getMeta("composition"), a = r.prevTime == 0 || !o && r.prevComposition != l && (r.prevTime < (t.time || 0) - n.newGroupDelay || !Id(t, r.prevRanges)), c = o ? Rn(r.prevRanges, t.mapping) :
|
|
12290
|
+
let l = t.getMeta("composition"), a = r.prevTime == 0 || !o && r.prevComposition != l && (r.prevTime < (t.time || 0) - n.newGroupDelay || !Id(t, r.prevRanges)), c = o ? Rn(r.prevRanges, t.mapping) : Fi(t.mapping.maps);
|
|
12291
12291
|
return new ke(r.done.addTransform(t, a ? e.selection.getBookmark() : void 0, n, Ht(e)), se.empty, c, t.time, l ?? r.prevComposition);
|
|
12292
12292
|
} else return (s = t.getMeta("rebased")) ? new ke(r.done.rebased(t, s), r.undone.rebased(t, s), Rn(r.prevRanges, t.mapping), r.prevTime, r.prevComposition) : new ke(r.done.addMaps(t.mapping.maps), r.undone.addMaps(t.mapping.maps), Rn(r.prevRanges, t.mapping), r.prevTime, r.prevComposition);
|
|
12293
12293
|
}
|
|
@@ -12302,7 +12302,7 @@ function Id(r, e) {
|
|
|
12302
12302
|
n <= e[s + 1] && i >= e[s] && (t = !0);
|
|
12303
12303
|
}), t;
|
|
12304
12304
|
}
|
|
12305
|
-
function
|
|
12305
|
+
function Fi(r) {
|
|
12306
12306
|
let e = [];
|
|
12307
12307
|
for (let t = r.length - 1; t >= 0 && e.length == 0; t--)
|
|
12308
12308
|
r[t].forEach((n, i, s, o) => e.push(s, o));
|
|
@@ -12325,11 +12325,11 @@ function Pd(r, e, t) {
|
|
|
12325
12325
|
let o = s.selection.resolve(s.transform.doc), l = (t ? r.done : r.undone).addTransform(s.transform, e.selection.getBookmark(), i, n), a = new ke(t ? l : s.remaining, t ? s.remaining : l, null, 0, -1);
|
|
12326
12326
|
return s.transform.setSelection(o).setMeta(je, { redo: t, historyState: a });
|
|
12327
12327
|
}
|
|
12328
|
-
let Bn = !1,
|
|
12328
|
+
let Bn = !1, Li = null;
|
|
12329
12329
|
function Ht(r) {
|
|
12330
12330
|
let e = r.plugins;
|
|
12331
|
-
if (
|
|
12332
|
-
Bn = !1,
|
|
12331
|
+
if (Li != e) {
|
|
12332
|
+
Bn = !1, Li = e;
|
|
12333
12333
|
for (let t = 0; t < e.length; t++)
|
|
12334
12334
|
if (e[t].spec.historyPreserveItems) {
|
|
12335
12335
|
Bn = !0;
|
|
@@ -12405,7 +12405,7 @@ const Eo = Mo(!1, !0), To = Mo(!0, !0), zd = J.create({
|
|
|
12405
12405
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
12406
12406
|
};
|
|
12407
12407
|
}
|
|
12408
|
-
}),
|
|
12408
|
+
}), Fd = J.create({
|
|
12409
12409
|
name: "placeholder",
|
|
12410
12410
|
addOptions() {
|
|
12411
12411
|
return {
|
|
@@ -12452,7 +12452,7 @@ const Eo = Mo(!1, !0), To = Mo(!0, !0), zd = J.create({
|
|
|
12452
12452
|
}
|
|
12453
12453
|
});
|
|
12454
12454
|
function $i(r) {
|
|
12455
|
-
const t = r.state.doc.toJSON(), n = new
|
|
12455
|
+
const t = r.state.doc.toJSON(), n = new Ld(r);
|
|
12456
12456
|
let i = [];
|
|
12457
12457
|
return t.content.forEach((s) => {
|
|
12458
12458
|
i.push(n.serialize(s));
|
|
@@ -12462,7 +12462,7 @@ function $i(r) {
|
|
|
12462
12462
|
function lt(r, e) {
|
|
12463
12463
|
return r.type === e.type && JSON.stringify(r.attrs) === JSON.stringify(e.attrs);
|
|
12464
12464
|
}
|
|
12465
|
-
class
|
|
12465
|
+
class Ld {
|
|
12466
12466
|
constructor(e) {
|
|
12467
12467
|
this.editor = e, this.openMarks = [];
|
|
12468
12468
|
}
|
|
@@ -13634,6 +13634,10 @@ const fh = {
|
|
|
13634
13634
|
command: "moveUp",
|
|
13635
13635
|
label: "<i class='bi bi-unindent'></i>"
|
|
13636
13636
|
},
|
|
13637
|
+
"Clear Formatting": {
|
|
13638
|
+
command: "unsetAllMarks",
|
|
13639
|
+
label: "<i class='bi bi-eraser'></i>"
|
|
13640
|
+
},
|
|
13637
13641
|
"choice/abbr/expan": {
|
|
13638
13642
|
command: "insertSnippet",
|
|
13639
13643
|
args: [
|
|
@@ -14385,7 +14389,7 @@ class yh extends HTMLElement {
|
|
|
14385
14389
|
rh,
|
|
14386
14390
|
Yd,
|
|
14387
14391
|
zd,
|
|
14388
|
-
|
|
14392
|
+
Fd.configure({
|
|
14389
14393
|
placeholder: "Write something...",
|
|
14390
14394
|
includeChildren: !0
|
|
14391
14395
|
})
|
package/dist/jinn-tap.umd.js
CHANGED
|
@@ -113,7 +113,7 @@ img.ProseMirror-separator {
|
|
|
113
113
|
|
|
114
114
|
${n.join(`
|
|
115
115
|
`)}
|
|
116
|
-
`}const Ao={attributes:{rend:{type:"string"},id:{type:"string"}},toolbar:{"Move Up":{command:"moveUp",label:"<i class='bi bi-unindent'></i>"},"choice/abbr/expan":{command:"insertSnippet",args:["<tei-choice><tei-abbr>{abbrev}</tei-abbr><tei-expan>{expansion}</tei-expan></tei-choice>"],select:"Textcritical",label:"<i class='bi bi-three-dots'></i>"},Figure:{command:"insertFigure",label:"<i class='bi bi-images'></i>",select:"Blocks"}},selects:{Blocks:{label:"<i class='bi bi-text-paragraph'></i>",order:0},Textcritical:{label:"<i class='bi bi-highlighter'></i>",order:9}},schema:{div:{type:"block",defining:!0,content:"heading* block*",attributes:{type:{type:"string"},n:{type:"string"}},keyboard:{"Mod-Shift-e":{attributes:{},command:"wrapDiv"}},toolbar:{Division:{select:"Blocks",attributes:{},command:"wrapDiv",label:"<i class='bi bi-body-text'></i>"}}},hi:{type:"inline",attributes:{rend:{type:"string",default:"i",enum:["i","b","u","code"]}},keyboard:{"Cmd-b":{attributes:{rend:"b"}},"Cmd-i":{attributes:{rend:"i"}},"Cmd-u":{attributes:{rend:"u"}}},toolbar:{Bold:{attributes:{rend:"b"},label:"<i class='bi bi-type-bold'></i>",order:1},Italic:{attributes:{rend:"i"},label:"<i class='bi bi-type-italic'></i>",order:1},Underline:{attributes:{rend:"u"},label:"<i class='bi bi-type-underline'></i>",order:1}}},ref:{type:"inline",attributes:{target:{type:"string"}},keyboard:{"Alt-Shift-r":{attributes:{}}},toolbar:{Reference:{attributes:{},label:"<i class='bi bi-link'></i>",order:2}}},title:{type:"inline",attributes:{level:{type:"string",enum:["m","s","a"]}},keyboard:{"Mod-Alt-t":{attributes:{level:"m"}}},toolbar:{Title:{attributes:{level:"m"},label:"<i class='bi bi-quote'></i>",select:"Textcritical",order:2}}},figure:{type:"block",content:"(graphic|figDesc)*"},figDesc:{type:"block",content:"inline*",priority:99},graphic:{type:"graphic",attributes:{url:{type:"string",default:"https://placehold.co/320x200"}},toolbar:{Graphic:{label:"<i class='bi bi-image'></i>",select:"Blocks"}}},persName:{type:"inline",attributes:{key:{connector:{name:"GND",type:"person",prefix:"gnd"},type:"string"}},keyboard:{"Mod-Shift-p":{attributes:{}}},toolbar:{Person:{attributes:{},label:"<i class='bi bi-person'></i>",order:11}}},orgName:{type:"inline",attributes:{key:{connector:{name:"GND",type:"organization",prefix:"gnd"},type:"string"}},toolbar:{Organization:{attributes:{},label:"<i class='bi bi-people'></i>",order:11}}},placeName:{type:"inline",attributes:{key:{type:"string",connector:{name:"GeoNames",type:"place",prefix:"geo",user:"existdb"}}},keyboard:{"Mod-Shift-h":{attributes:{}}},toolbar:{Place:{attributes:{},label:"<i class='bi bi-geo-alt'></i>",order:11}}},term:{type:"inline",attributes:{key:{type:"string",connector:{name:"GND",type:"term",prefix:"gnd"}}},keyboard:{"Mod-Shift-t":{attributes:{}}},toolbar:{Term:{attributes:{},label:"<i class='bi bi-bookmark'></i>",order:11}}},date:{type:"inline",attributes:{when:{type:"string"},"not-before":{type:"string"},"not-after":{type:"string"},from:{type:"string"},to:{type:"string"}},toolbar:{Date:{attributes:{},label:"<i class='bi bi-calendar-date'></i>",order:12}}},p:{type:"block",priority:100,toolbar:{Paragraph:{select:"Blocks",attributes:{},label:"<i class='bi bi-paragraph'></i>"}}},head:{type:"block",group:"heading",content:"inline*",attributes:{type:{type:"string"},n:{type:"string"}},keyboard:{"Shift-Mod-1":{attributes:{n:"1"}}},toolbar:{Head:{select:"Blocks",attributes:{},label:"<i class='bi bi-type-h1'></i>"}},inputRules:[{find:"^##$",type:"textblock"}]},item:{type:"listItem"},list:{type:"list",content:"heading* item+",attributes:{rend:{type:"string",enum:["ordered","unordered"],open:!0}},keyboard:{"Mod-Shift-l":{attributes:{}}},toolbar:{List:{select:"Blocks",attributes:{rend:"unordered"},label:"<i class='bi bi-list-ul'></i>"},"Numbered list":{select:"Blocks",attributes:{rend:"ordered"},label:"<i class='bi bi-list-ol'></i>"}},inputRules:[{find:"^\\s*([-+*])\\s$",type:"wrapping",attributes:{rend:"unordered"}},{find:"^\\s*(\\d+)\\.\\s$",type:"wrapping",attributes:{rend:"ordered"}}]},opener:{type:"block",content:"block*",toolbar:{Opener:{select:"Blocks",attributes:{},label:"<i class='bi bi-envelope-open'></i>"}}},closer:{type:"block",content:"block*",toolbar:{Closer:{select:"Blocks",attributes:{},label:"<i class='bi bi-envelope'></i>"}}},listAnnotation:{type:"list",group:"",defining:!0,content:"note+",keyboard:{"Mod-Shift-u":{attributes:{}}}},note:{type:"listItem",content:"inline*",defining:!0,isolating:!0,attributes:{target:{type:"string"},_reference:{type:"string"}}},anchor:{type:"anchor",attributes:{type:{type:"string",default:"note"}},toolbar:{Footnote:{attributes:{type:"note"},label:"<i class='bi bi-123'></i>",order:2}}},choice:{type:"inline",content:"abbr expan",toolbar:{Choice:{select:"Textcritical",label:"<i class='bi bi-alt'></i>"}}},abbr:{type:"inline",toolbar:{Abbreviation:{select:"Textcritical",label:"<i class='bi bi-three-dots'></i>"}}},expan:{type:"inline",toolbar:{Expansion:{select:"Textcritical",label:"<i class='bi bi-arrows-expand-vertical'></i>"}}},gap:{type:"empty",label:"[...]",attributes:{unit:{type:"string",default:"chars",enum:["chars","lines","words"]},quantity:{type:"string"}},toolbar:{Gap:{select:"Textcritical",label:"<i class='bi bi-braces-asterisk'></i>"}}},unclear:{type:"inline",attributes:{rend:{type:"string",default:"unclear"}},toolbar:{Unclear:{select:"Textcritical",label:"<i class='bi bi-patch-question'></i>"}}},supplied:{type:"inline",attributes:{reason:{type:"string"}},toolbar:{Supplied:{select:"Textcritical",label:"<i class='bi bi-plus-circle-dotted'></i>"}}},pb:{type:"empty",label:"pb",attributes:{n:{type:"string"}},keyboard:{"Mod-Alt-p":{attributes:{n:"22"}}},toolbar:{PageBreak:{attributes:{n:"22"},label:"<i class='bi bi-file-earmark-break'></i>",order:3}}},lb:{type:"empty",label:"↵",attributes:{n:{type:"string"}},toolbar:{LineBreak:{attributes:{},label:"<i class='bi bi-arrow-return-left'></i>",order:3}}}}},Tr=document.createElement("style");Tr.textContent=`
|
|
116
|
+
`}const Ao={attributes:{rend:{type:"string"},id:{type:"string"}},toolbar:{"Move Up":{command:"moveUp",label:"<i class='bi bi-unindent'></i>"},"Clear Formatting":{command:"unsetAllMarks",label:"<i class='bi bi-eraser'></i>"},"choice/abbr/expan":{command:"insertSnippet",args:["<tei-choice><tei-abbr>{abbrev}</tei-abbr><tei-expan>{expansion}</tei-expan></tei-choice>"],select:"Textcritical",label:"<i class='bi bi-three-dots'></i>"},Figure:{command:"insertFigure",label:"<i class='bi bi-images'></i>",select:"Blocks"}},selects:{Blocks:{label:"<i class='bi bi-text-paragraph'></i>",order:0},Textcritical:{label:"<i class='bi bi-highlighter'></i>",order:9}},schema:{div:{type:"block",defining:!0,content:"heading* block*",attributes:{type:{type:"string"},n:{type:"string"}},keyboard:{"Mod-Shift-e":{attributes:{},command:"wrapDiv"}},toolbar:{Division:{select:"Blocks",attributes:{},command:"wrapDiv",label:"<i class='bi bi-body-text'></i>"}}},hi:{type:"inline",attributes:{rend:{type:"string",default:"i",enum:["i","b","u","code"]}},keyboard:{"Cmd-b":{attributes:{rend:"b"}},"Cmd-i":{attributes:{rend:"i"}},"Cmd-u":{attributes:{rend:"u"}}},toolbar:{Bold:{attributes:{rend:"b"},label:"<i class='bi bi-type-bold'></i>",order:1},Italic:{attributes:{rend:"i"},label:"<i class='bi bi-type-italic'></i>",order:1},Underline:{attributes:{rend:"u"},label:"<i class='bi bi-type-underline'></i>",order:1}}},ref:{type:"inline",attributes:{target:{type:"string"}},keyboard:{"Alt-Shift-r":{attributes:{}}},toolbar:{Reference:{attributes:{},label:"<i class='bi bi-link'></i>",order:2}}},title:{type:"inline",attributes:{level:{type:"string",enum:["m","s","a"]}},keyboard:{"Mod-Alt-t":{attributes:{level:"m"}}},toolbar:{Title:{attributes:{level:"m"},label:"<i class='bi bi-quote'></i>",select:"Textcritical",order:2}}},figure:{type:"block",content:"(graphic|figDesc)*"},figDesc:{type:"block",content:"inline*",priority:99},graphic:{type:"graphic",attributes:{url:{type:"string",default:"https://placehold.co/320x200"}},toolbar:{Graphic:{label:"<i class='bi bi-image'></i>",select:"Blocks"}}},persName:{type:"inline",attributes:{key:{connector:{name:"GND",type:"person",prefix:"gnd"},type:"string"}},keyboard:{"Mod-Shift-p":{attributes:{}}},toolbar:{Person:{attributes:{},label:"<i class='bi bi-person'></i>",order:11}}},orgName:{type:"inline",attributes:{key:{connector:{name:"GND",type:"organization",prefix:"gnd"},type:"string"}},toolbar:{Organization:{attributes:{},label:"<i class='bi bi-people'></i>",order:11}}},placeName:{type:"inline",attributes:{key:{type:"string",connector:{name:"GeoNames",type:"place",prefix:"geo",user:"existdb"}}},keyboard:{"Mod-Shift-h":{attributes:{}}},toolbar:{Place:{attributes:{},label:"<i class='bi bi-geo-alt'></i>",order:11}}},term:{type:"inline",attributes:{key:{type:"string",connector:{name:"GND",type:"term",prefix:"gnd"}}},keyboard:{"Mod-Shift-t":{attributes:{}}},toolbar:{Term:{attributes:{},label:"<i class='bi bi-bookmark'></i>",order:11}}},date:{type:"inline",attributes:{when:{type:"string"},"not-before":{type:"string"},"not-after":{type:"string"},from:{type:"string"},to:{type:"string"}},toolbar:{Date:{attributes:{},label:"<i class='bi bi-calendar-date'></i>",order:12}}},p:{type:"block",priority:100,toolbar:{Paragraph:{select:"Blocks",attributes:{},label:"<i class='bi bi-paragraph'></i>"}}},head:{type:"block",group:"heading",content:"inline*",attributes:{type:{type:"string"},n:{type:"string"}},keyboard:{"Shift-Mod-1":{attributes:{n:"1"}}},toolbar:{Head:{select:"Blocks",attributes:{},label:"<i class='bi bi-type-h1'></i>"}},inputRules:[{find:"^##$",type:"textblock"}]},item:{type:"listItem"},list:{type:"list",content:"heading* item+",attributes:{rend:{type:"string",enum:["ordered","unordered"],open:!0}},keyboard:{"Mod-Shift-l":{attributes:{}}},toolbar:{List:{select:"Blocks",attributes:{rend:"unordered"},label:"<i class='bi bi-list-ul'></i>"},"Numbered list":{select:"Blocks",attributes:{rend:"ordered"},label:"<i class='bi bi-list-ol'></i>"}},inputRules:[{find:"^\\s*([-+*])\\s$",type:"wrapping",attributes:{rend:"unordered"}},{find:"^\\s*(\\d+)\\.\\s$",type:"wrapping",attributes:{rend:"ordered"}}]},opener:{type:"block",content:"block*",toolbar:{Opener:{select:"Blocks",attributes:{},label:"<i class='bi bi-envelope-open'></i>"}}},closer:{type:"block",content:"block*",toolbar:{Closer:{select:"Blocks",attributes:{},label:"<i class='bi bi-envelope'></i>"}}},listAnnotation:{type:"list",group:"",defining:!0,content:"note+",keyboard:{"Mod-Shift-u":{attributes:{}}}},note:{type:"listItem",content:"inline*",defining:!0,isolating:!0,attributes:{target:{type:"string"},_reference:{type:"string"}}},anchor:{type:"anchor",attributes:{type:{type:"string",default:"note"}},toolbar:{Footnote:{attributes:{type:"note"},label:"<i class='bi bi-123'></i>",order:2}}},choice:{type:"inline",content:"abbr expan",toolbar:{Choice:{select:"Textcritical",label:"<i class='bi bi-alt'></i>"}}},abbr:{type:"inline",toolbar:{Abbreviation:{select:"Textcritical",label:"<i class='bi bi-three-dots'></i>"}}},expan:{type:"inline",toolbar:{Expansion:{select:"Textcritical",label:"<i class='bi bi-arrows-expand-vertical'></i>"}}},gap:{type:"empty",label:"[...]",attributes:{unit:{type:"string",default:"chars",enum:["chars","lines","words"]},quantity:{type:"string"}},toolbar:{Gap:{select:"Textcritical",label:"<i class='bi bi-braces-asterisk'></i>"}}},unclear:{type:"inline",attributes:{rend:{type:"string",default:"unclear"}},toolbar:{Unclear:{select:"Textcritical",label:"<i class='bi bi-patch-question'></i>"}}},supplied:{type:"inline",attributes:{reason:{type:"string"}},toolbar:{Supplied:{select:"Textcritical",label:"<i class='bi bi-plus-circle-dotted'></i>"}}},pb:{type:"empty",label:"pb",attributes:{n:{type:"string"}},keyboard:{"Mod-Alt-p":{attributes:{n:"22"}}},toolbar:{PageBreak:{attributes:{n:"22"},label:"<i class='bi bi-file-earmark-break'></i>",order:3}}},lb:{type:"empty",label:"↵",attributes:{n:{type:"string"}},toolbar:{LineBreak:{attributes:{},label:"<i class='bi bi-arrow-return-left'></i>",order:3}}}}},Tr=document.createElement("style");Tr.textContent=`
|
|
117
117
|
jinn-tap {
|
|
118
118
|
display: grid;
|
|
119
119
|
grid-template-rows: min-content 1fr;
|