@fileverse-dev/ddoc 3.1.4 → 3.1.6
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/index.es.js +211 -152
- package/dist/package/types.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -5184,7 +5184,7 @@ class kt {
|
|
|
5184
5184
|
found.
|
|
5185
5185
|
*/
|
|
5186
5186
|
static findFrom(t, n, r = !1) {
|
|
5187
|
-
let o = t.parent.inlineContent ? new
|
|
5187
|
+
let o = t.parent.inlineContent ? new ut(t) : ip(t.node(0), t.parent, t.pos, t.index(), n, r);
|
|
5188
5188
|
if (o)
|
|
5189
5189
|
return o;
|
|
5190
5190
|
for (let i = t.depth - 1; i >= 0; i--) {
|
|
@@ -5251,7 +5251,7 @@ class kt {
|
|
|
5251
5251
|
returns the bookmark for that.
|
|
5252
5252
|
*/
|
|
5253
5253
|
getBookmark() {
|
|
5254
|
-
return
|
|
5254
|
+
return ut.between(this.$anchor, this.$head).getBookmark();
|
|
5255
5255
|
}
|
|
5256
5256
|
}
|
|
5257
5257
|
kt.prototype.visible = !0;
|
|
@@ -5267,7 +5267,7 @@ let t_ = !1;
|
|
|
5267
5267
|
function n_(e) {
|
|
5268
5268
|
!t_ && !e.parent.inlineContent && (t_ = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + e.parent.type.name + ")"));
|
|
5269
5269
|
}
|
|
5270
|
-
class
|
|
5270
|
+
class ut extends kt {
|
|
5271
5271
|
/**
|
|
5272
5272
|
Construct a text selection between the given points.
|
|
5273
5273
|
*/
|
|
@@ -5286,7 +5286,7 @@ class ct extends kt {
|
|
|
5286
5286
|
if (!r.parent.inlineContent)
|
|
5287
5287
|
return kt.near(r);
|
|
5288
5288
|
let o = t.resolve(n.map(this.anchor));
|
|
5289
|
-
return new
|
|
5289
|
+
return new ut(o.parent.inlineContent ? o : r, r);
|
|
5290
5290
|
}
|
|
5291
5291
|
replace(t, n = rt.empty) {
|
|
5292
5292
|
if (super.replace(t, n), n == rt.empty) {
|
|
@@ -5295,7 +5295,7 @@ class ct extends kt {
|
|
|
5295
5295
|
}
|
|
5296
5296
|
}
|
|
5297
5297
|
eq(t) {
|
|
5298
|
-
return t instanceof
|
|
5298
|
+
return t instanceof ut && t.anchor == this.anchor && t.head == this.head;
|
|
5299
5299
|
}
|
|
5300
5300
|
getBookmark() {
|
|
5301
5301
|
return new qy(this.anchor, this.head);
|
|
@@ -5309,7 +5309,7 @@ class ct extends kt {
|
|
|
5309
5309
|
static fromJSON(t, n) {
|
|
5310
5310
|
if (typeof n.anchor != "number" || typeof n.head != "number")
|
|
5311
5311
|
throw new RangeError("Invalid input for TextSelection.fromJSON");
|
|
5312
|
-
return new
|
|
5312
|
+
return new ut(t.resolve(n.anchor), t.resolve(n.head));
|
|
5313
5313
|
}
|
|
5314
5314
|
/**
|
|
5315
5315
|
Create a text selection from non-resolved positions.
|
|
@@ -5335,10 +5335,10 @@ class ct extends kt {
|
|
|
5335
5335
|
else
|
|
5336
5336
|
return kt.near(n, r);
|
|
5337
5337
|
}
|
|
5338
|
-
return t.parent.inlineContent || (o == 0 ? t = n : (t = (kt.findFrom(t, -r, !0) || kt.findFrom(t, r, !0)).$anchor, t.pos < n.pos != o < 0 && (t = n))), new
|
|
5338
|
+
return t.parent.inlineContent || (o == 0 ? t = n : (t = (kt.findFrom(t, -r, !0) || kt.findFrom(t, r, !0)).$anchor, t.pos < n.pos != o < 0 && (t = n))), new ut(t, n);
|
|
5339
5339
|
}
|
|
5340
5340
|
}
|
|
5341
|
-
kt.jsonID("text",
|
|
5341
|
+
kt.jsonID("text", ut);
|
|
5342
5342
|
class qy {
|
|
5343
5343
|
constructor(t, n) {
|
|
5344
5344
|
this.anchor = t, this.head = n;
|
|
@@ -5347,7 +5347,7 @@ class qy {
|
|
|
5347
5347
|
return new qy(t.map(this.anchor), t.map(this.head));
|
|
5348
5348
|
}
|
|
5349
5349
|
resolve(t) {
|
|
5350
|
-
return
|
|
5350
|
+
return ut.between(t.resolve(this.anchor), t.resolve(this.head));
|
|
5351
5351
|
}
|
|
5352
5352
|
}
|
|
5353
5353
|
class gt extends kt {
|
|
@@ -5457,7 +5457,7 @@ const Ute = {
|
|
|
5457
5457
|
};
|
|
5458
5458
|
function ip(e, t, n, r, o, i = !1) {
|
|
5459
5459
|
if (t.inlineContent)
|
|
5460
|
-
return
|
|
5460
|
+
return ut.create(e, n);
|
|
5461
5461
|
for (let s = r - (o > 0 ? 0 : 1); o > 0 ? s < t.childCount : s >= 0; s += o) {
|
|
5462
5462
|
let a = t.child(s);
|
|
5463
5463
|
if (a.isAtom) {
|
|
@@ -5966,7 +5966,7 @@ function BI(e, t, n) {
|
|
|
5966
5966
|
return !1;
|
|
5967
5967
|
if (n) {
|
|
5968
5968
|
let c = e.tr.step(u);
|
|
5969
|
-
c.setSelection(
|
|
5969
|
+
c.setSelection(ut.create(c.doc, i)), n(c.scrollIntoView());
|
|
5970
5970
|
}
|
|
5971
5971
|
return !0;
|
|
5972
5972
|
}
|
|
@@ -6108,7 +6108,7 @@ const Gte = (e, t) => {
|
|
|
6108
6108
|
return !1;
|
|
6109
6109
|
if (t) {
|
|
6110
6110
|
let s = (!r.parentOffset && o.index() < o.parent.childCount ? r : o).pos, a = e.tr.insert(s, i.createAndFill());
|
|
6111
|
-
a.setSelection(
|
|
6111
|
+
a.setSelection(ut.create(a.doc, s + 1)), t(a.scrollIntoView());
|
|
6112
6112
|
}
|
|
6113
6113
|
return !0;
|
|
6114
6114
|
}, UI = (e, t) => {
|
|
@@ -6141,7 +6141,7 @@ function Kte(e) {
|
|
|
6141
6141
|
i.unshift(null);
|
|
6142
6142
|
}
|
|
6143
6143
|
let c = t.tr;
|
|
6144
|
-
(t.selection instanceof
|
|
6144
|
+
(t.selection instanceof ut || t.selection instanceof Jo) && c.deleteSelection();
|
|
6145
6145
|
let d = c.mapping.map(r.pos), p = sl(c.doc, d, i.length, i);
|
|
6146
6146
|
if (p || (i[0] = a ? { type: a } : null, p = sl(c.doc, d, i.length, i)), !p)
|
|
6147
6147
|
return !1;
|
|
@@ -6207,7 +6207,7 @@ function zI(e) {
|
|
|
6207
6207
|
return !1;
|
|
6208
6208
|
i--;
|
|
6209
6209
|
}
|
|
6210
|
-
return o.node(i).isTextblock ? (n && n(t.tr.setSelection(
|
|
6210
|
+
return o.node(i).isTextblock ? (n && n(t.tr.setSelection(ut.create(t.doc, e < 0 ? o.start(i) : o.end(i)))), !0) : !1;
|
|
6211
6211
|
};
|
|
6212
6212
|
}
|
|
6213
6213
|
const Jte = zI(-1), Qte = zI(1);
|
|
@@ -7304,7 +7304,7 @@ class ku extends U1 {
|
|
|
7304
7304
|
}
|
|
7305
7305
|
localCompositionInfo(t, n) {
|
|
7306
7306
|
let { from: r, to: o } = t.state.selection;
|
|
7307
|
-
if (!(t.state.selection instanceof
|
|
7307
|
+
if (!(t.state.selection instanceof ut) || r < n || o > n + this.node.content.size)
|
|
7308
7308
|
return null;
|
|
7309
7309
|
let i = t.input.compositionNode;
|
|
7310
7310
|
if (!i || !this.dom.contains(i.parentNode))
|
|
@@ -7863,7 +7863,7 @@ function al(e, t = !1) {
|
|
|
7863
7863
|
$ne(e);
|
|
7864
7864
|
else {
|
|
7865
7865
|
let { anchor: r, head: o } = n, i, s;
|
|
7866
|
-
y_ && !(n instanceof
|
|
7866
|
+
y_ && !(n instanceof ut) && (n.$from.parent.inlineContent || (i = x_(e, n.from)), !n.empty && !n.$from.parent.inlineContent && (s = x_(e, n.to))), e.docView.setSelection(r, o, e, t), y_ && (i && v_(i), s && v_(s)), n.visible ? e.dom.classList.remove("ProseMirror-hideselection") : (e.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && zne(e));
|
|
7867
7867
|
}
|
|
7868
7868
|
e.domObserver.setCurSelection(), e.domObserver.connectSelection();
|
|
7869
7869
|
}
|
|
@@ -7914,7 +7914,7 @@ function F_(e) {
|
|
|
7914
7914
|
e.lastSelectedViewDesc && (e.lastSelectedViewDesc.parent && e.lastSelectedViewDesc.deselectNode(), e.lastSelectedViewDesc = void 0);
|
|
7915
7915
|
}
|
|
7916
7916
|
function Ak(e, t, n, r) {
|
|
7917
|
-
return e.someProp("createSelectionBetween", (o) => o(e, t, n)) ||
|
|
7917
|
+
return e.someProp("createSelectionBetween", (o) => o(e, t, n)) || ut.between(t, n, r);
|
|
7918
7918
|
}
|
|
7919
7919
|
function w_(e) {
|
|
7920
7920
|
return e.editable && !e.hasFocus() ? !1 : rL(e);
|
|
@@ -7942,13 +7942,13 @@ function tu(e, t) {
|
|
|
7942
7942
|
}
|
|
7943
7943
|
function D_(e, t, n) {
|
|
7944
7944
|
let r = e.state.selection;
|
|
7945
|
-
if (r instanceof
|
|
7945
|
+
if (r instanceof ut)
|
|
7946
7946
|
if (n.indexOf("s") > -1) {
|
|
7947
7947
|
let { $head: o } = r, i = o.textOffset ? null : t < 0 ? o.nodeBefore : o.nodeAfter;
|
|
7948
7948
|
if (!i || i.isText || !i.isLeaf)
|
|
7949
7949
|
return !1;
|
|
7950
7950
|
let s = e.state.doc.resolve(o.pos + i.nodeSize * (t < 0 ? -1 : 1));
|
|
7951
|
-
return tu(e, new
|
|
7951
|
+
return tu(e, new ut(r.$anchor, s));
|
|
7952
7952
|
} else if (r.empty) {
|
|
7953
7953
|
if (e.endOfTextblock(t > 0 ? "forward" : "backward")) {
|
|
7954
7954
|
let o = F5(e.state, t);
|
|
@@ -7958,12 +7958,12 @@ function D_(e, t, n) {
|
|
|
7958
7958
|
if (!i || i.isText)
|
|
7959
7959
|
return !1;
|
|
7960
7960
|
let a = t < 0 ? o.pos - i.nodeSize : o.pos;
|
|
7961
|
-
return i.isAtom || (s = e.docView.descAt(a)) && !s.contentDOM ? gt.isSelectable(i) ? tu(e, new gt(t < 0 ? e.state.doc.resolve(o.pos - i.nodeSize) : o)) : L1 ? tu(e, new
|
|
7961
|
+
return i.isAtom || (s = e.docView.descAt(a)) && !s.contentDOM ? gt.isSelectable(i) ? tu(e, new gt(t < 0 ? e.state.doc.resolve(o.pos - i.nodeSize) : o)) : L1 ? tu(e, new ut(e.state.doc.resolve(t < 0 ? a : a + i.nodeSize))) : !1 : !1;
|
|
7962
7962
|
}
|
|
7963
7963
|
} else return !1;
|
|
7964
7964
|
else {
|
|
7965
7965
|
if (r instanceof gt && r.node.isInline)
|
|
7966
|
-
return tu(e, new
|
|
7966
|
+
return tu(e, new ut(t > 0 ? r.$to : r.$from));
|
|
7967
7967
|
{
|
|
7968
7968
|
let o = F5(e.state, t);
|
|
7969
7969
|
return o ? tu(e, o) : !1;
|
|
@@ -8113,7 +8113,7 @@ function k_(e, t) {
|
|
|
8113
8113
|
}
|
|
8114
8114
|
function E_(e, t, n) {
|
|
8115
8115
|
let r = e.state.selection;
|
|
8116
|
-
if (r instanceof
|
|
8116
|
+
if (r instanceof ut && !r.empty || n.indexOf("s") > -1 || Pi && n.indexOf("m") > -1)
|
|
8117
8117
|
return !1;
|
|
8118
8118
|
let { $from: o, $to: i } = r;
|
|
8119
8119
|
if (!o.parent.inlineContent || e.endOfTextblock(t < 0 ? "up" : "down")) {
|
|
@@ -8128,7 +8128,7 @@ function E_(e, t, n) {
|
|
|
8128
8128
|
return !1;
|
|
8129
8129
|
}
|
|
8130
8130
|
function C_(e, t) {
|
|
8131
|
-
if (!(e.state.selection instanceof
|
|
8131
|
+
if (!(e.state.selection instanceof ut))
|
|
8132
8132
|
return !0;
|
|
8133
8133
|
let { $head: n, $anchor: r, empty: o } = e.state.selection;
|
|
8134
8134
|
if (!n.sameParent(r))
|
|
@@ -8446,7 +8446,7 @@ Mo.keypress = (e, t) => {
|
|
|
8446
8446
|
return;
|
|
8447
8447
|
}
|
|
8448
8448
|
let r = e.state.selection;
|
|
8449
|
-
if (!(r instanceof
|
|
8449
|
+
if (!(r instanceof ut) || !r.$from.sameParent(r.$to)) {
|
|
8450
8450
|
let o = String.fromCharCode(n.charCode), i = () => e.state.tr.insertText(o).scrollIntoView();
|
|
8451
8451
|
!/[\r\n]/.test(o) && !e.someProp("handleTextInput", (s) => s(e, r.$from.pos, r.$to.pos, o, i)) && e.dispatch(i()), n.preventDefault();
|
|
8452
8452
|
}
|
|
@@ -8508,12 +8508,12 @@ function gre(e, t, n) {
|
|
|
8508
8508
|
return !1;
|
|
8509
8509
|
let r = e.state.doc;
|
|
8510
8510
|
if (t == -1)
|
|
8511
|
-
return r.inlineContent ? (Dp(e,
|
|
8511
|
+
return r.inlineContent ? (Dp(e, ut.create(r, 0, r.content.size)), !0) : !1;
|
|
8512
8512
|
let o = r.resolve(t);
|
|
8513
8513
|
for (let i = o.depth + 1; i > 0; i--) {
|
|
8514
8514
|
let s = i > o.depth ? o.nodeAfter : o.node(i), a = o.before(i);
|
|
8515
8515
|
if (s.inlineContent)
|
|
8516
|
-
Dp(e,
|
|
8516
|
+
Dp(e, ut.create(r, a + 1, a + 1 + s.content.size));
|
|
8517
8517
|
else if (gt.isSelectable(s))
|
|
8518
8518
|
Dp(e, gt.create(r, a));
|
|
8519
8519
|
else
|
|
@@ -8594,7 +8594,7 @@ Mo.compositionstart = Mo.compositionupdate = (e) => {
|
|
|
8594
8594
|
if (!e.composing) {
|
|
8595
8595
|
e.domObserver.flush();
|
|
8596
8596
|
let { state: t } = e, n = t.selection.$to;
|
|
8597
|
-
if (t.selection instanceof
|
|
8597
|
+
if (t.selection instanceof ut && (t.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
|
|
8598
8598
|
e.markCursor = e.state.storedMarks || n.marks(), $2(e, !0), e.markCursor = null;
|
|
8599
8599
|
else if ($2(e, !t.selection.empty), Xi && t.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
|
|
8600
8600
|
let r = e.domSelectionRange();
|
|
@@ -9574,7 +9574,7 @@ function Ire(e, t, n, r, o) {
|
|
|
9574
9574
|
return;
|
|
9575
9575
|
}
|
|
9576
9576
|
if (!f)
|
|
9577
|
-
if (r && l instanceof
|
|
9577
|
+
if (r && l instanceof ut && !l.empty && l.$head.sameParent(l.$anchor) && !e.composing && !(u.sel && u.sel.anchor != u.sel.head))
|
|
9578
9578
|
f = { start: l.from, endA: l.to, endB: l.to };
|
|
9579
9579
|
else {
|
|
9580
9580
|
if (u.sel) {
|
|
@@ -9586,7 +9586,7 @@ function Ire(e, t, n, r, o) {
|
|
|
9586
9586
|
}
|
|
9587
9587
|
return;
|
|
9588
9588
|
}
|
|
9589
|
-
e.state.selection.from < e.state.selection.to && f.start == f.endB && e.state.selection instanceof
|
|
9589
|
+
e.state.selection.from < e.state.selection.to && f.start == f.endB && e.state.selection instanceof ut && (f.start > e.state.selection.from && f.start <= e.state.selection.from + 2 && e.state.selection.from >= u.from ? f.start = e.state.selection.from : f.endA < e.state.selection.to && f.endA >= e.state.selection.to - 2 && e.state.selection.to <= u.to && (f.endB += e.state.selection.to - f.endA, f.endA = e.state.selection.to)), Qo && Du <= 11 && f.endB == f.start + 1 && f.endA == f.start && f.start > u.from && u.doc.textBetween(f.start - u.from - 1, f.start - u.from + 1) == " " && (f.start--, f.endA--, f.endB--);
|
|
9590
9590
|
let g = u.doc.resolveNoCache(f.start - u.from), m = u.doc.resolveNoCache(f.endB - u.from), b = c.resolve(f.start), y = g.sameParent(m) && g.parent.inlineContent && b.end() >= f.endA;
|
|
9591
9591
|
if ((Hp && e.input.lastIOSEnter > Date.now() - 225 && (!y || o.some((D) => D.nodeName == "DIV" || D.nodeName == "P")) || !y && g.pos < u.doc.content.size && (!g.sameParent(m) || !g.parent.inlineContent) && g.pos < m.pos && !/\S/.test(u.doc.textBetween(g.pos, m.pos, "", ""))) && e.someProp("handleKeyDown", (D) => D(e, vc(13, "Enter")))) {
|
|
9592
9592
|
e.input.lastIOSEnter = 0;
|
|
@@ -10409,7 +10409,7 @@ var Jre = () => ({ editor: e, view: t }) => (requestAnimationFrame(() => {
|
|
|
10409
10409
|
const { state: o } = n, i = o.doc.slice(e.from, e.to);
|
|
10410
10410
|
r.deleteRange(e.from, e.to);
|
|
10411
10411
|
const s = r.mapping.map(t);
|
|
10412
|
-
return r.insert(s, i.content), r.setSelection(new
|
|
10412
|
+
return r.insert(s, i.content), r.setSelection(new ut(r.doc.resolve(Math.max(s - 1, 0)))), !0;
|
|
10413
10413
|
}, ooe = () => ({ tr: e, dispatch: t }) => {
|
|
10414
10414
|
const { selection: n } = e, r = n.$anchor.node();
|
|
10415
10415
|
if (r.content.size > 0)
|
|
@@ -10495,7 +10495,7 @@ var coe = (e, t = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
10495
10495
|
if (o) {
|
|
10496
10496
|
const d = Zy(l, i, t);
|
|
10497
10497
|
if (d && d.from <= u && d.to >= c) {
|
|
10498
|
-
const p =
|
|
10498
|
+
const p = ut.create(s, d.from, d.to);
|
|
10499
10499
|
n.setSelection(p);
|
|
10500
10500
|
}
|
|
10501
10501
|
}
|
|
@@ -10508,7 +10508,7 @@ var coe = (e, t = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
10508
10508
|
return !1;
|
|
10509
10509
|
};
|
|
10510
10510
|
function Jy(e) {
|
|
10511
|
-
return e instanceof
|
|
10511
|
+
return e instanceof ut;
|
|
10512
10512
|
}
|
|
10513
10513
|
function tl(e = 0, t = 0, n = 0) {
|
|
10514
10514
|
return Math.min(Math.max(e, t), n);
|
|
@@ -10522,7 +10522,7 @@ function EL(e, t = null) {
|
|
|
10522
10522
|
if (t === "end")
|
|
10523
10523
|
return r;
|
|
10524
10524
|
const o = n.from, i = r.to;
|
|
10525
|
-
return t === "all" ?
|
|
10525
|
+
return t === "all" ? ut.create(e, tl(0, o, i), tl(e.content.size, o, i)) : ut.create(e, tl(t, o, i), tl(t, o, i));
|
|
10526
10526
|
}
|
|
10527
10527
|
function CL() {
|
|
10528
10528
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
@@ -11452,7 +11452,7 @@ var nie = (e, t = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
11452
11452
|
}), !0;
|
|
11453
11453
|
}, aie = (e) => ({ tr: t, dispatch: n }) => {
|
|
11454
11454
|
if (n) {
|
|
11455
|
-
const { doc: r } = t, { from: o, to: i } = typeof e == "number" ? { from: e, to: e } : e, s =
|
|
11455
|
+
const { doc: r } = t, { from: o, to: i } = typeof e == "number" ? { from: e, to: e } : e, s = ut.atStart(r).from, a = ut.atEnd(r).to, l = tl(o, s, a), u = tl(i, s, a), c = ut.create(r, l, u);
|
|
11456
11456
|
t.setSelection(c);
|
|
11457
11457
|
}
|
|
11458
11458
|
return !0;
|
|
@@ -11486,7 +11486,7 @@ var uie = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, edito
|
|
|
11486
11486
|
attrs: c
|
|
11487
11487
|
}
|
|
11488
11488
|
] : void 0), r) {
|
|
11489
|
-
if (f && (i instanceof
|
|
11489
|
+
if (f && (i instanceof ut && t.deleteSelection(), t.split(t.mapping.map(a.pos), 1, h), p && !d && !a.parentOffset && a.parent.type !== p)) {
|
|
11490
11490
|
const g = t.mapping.map(a.before()), m = t.doc.resolve(g);
|
|
11491
11491
|
a.node(-1).canReplaceWith(m.index(), m.index() + 1, p) && t.setNodeMarkup(t.mapping.map(a.before()), p);
|
|
11492
11492
|
}
|
|
@@ -11525,7 +11525,7 @@ var uie = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: n, dispatch: r, edito
|
|
|
11525
11525
|
if (D > -1)
|
|
11526
11526
|
return !1;
|
|
11527
11527
|
C.isTextblock && C.content.size === 0 && (D = A + 1);
|
|
11528
|
-
}), D > -1 && n.setSelection(
|
|
11528
|
+
}), D > -1 && n.setSelection(ut.near(n.doc.resolve(D))), n.scrollIntoView();
|
|
11529
11529
|
}
|
|
11530
11530
|
return !0;
|
|
11531
11531
|
}
|
|
@@ -16089,7 +16089,7 @@ var _n = class Va extends kt {
|
|
|
16089
16089
|
const i = this.$anchorCell.node(-1) != r.node(-1);
|
|
16090
16090
|
return i && this.isRowSelection() ? Va.rowSelection(r, o) : i && this.isColSelection() ? Va.colSelection(r, o) : new Va(r, o);
|
|
16091
16091
|
}
|
|
16092
|
-
return
|
|
16092
|
+
return ut.between(r, o);
|
|
16093
16093
|
}
|
|
16094
16094
|
// Returns a rectangular slice of table rows containing the selected
|
|
16095
16095
|
// cells.
|
|
@@ -16287,7 +16287,7 @@ function pae(e, t, n) {
|
|
|
16287
16287
|
const a = Yn.get(r.node), l = r.from + 1, u = l + a.map[a.width * a.height - 1];
|
|
16288
16288
|
i = _n.create(o, l + 1, u);
|
|
16289
16289
|
}
|
|
16290
|
-
} else r instanceof
|
|
16290
|
+
} else r instanceof ut && cae(r) ? i = ut.create(o, r.from) : r instanceof ut && dae(r) && (i = ut.create(o, r.$from.start(), r.$from.end()));
|
|
16291
16291
|
return i && (t || (t = e.tr)).setSelection(i), t;
|
|
16292
16292
|
}
|
|
16293
16293
|
var hae = new At("fix-tables");
|
|
@@ -16774,7 +16774,7 @@ function gA(e) {
|
|
|
16774
16774
|
if (n) {
|
|
16775
16775
|
const o = t.doc.resolve(r);
|
|
16776
16776
|
n(
|
|
16777
|
-
t.tr.setSelection(
|
|
16777
|
+
t.tr.setSelection(ut.between(o, sae(o))).scrollIntoView()
|
|
16778
16778
|
);
|
|
16779
16779
|
}
|
|
16780
16780
|
return !0;
|
|
@@ -17136,7 +17136,7 @@ function Lae(e, t) {
|
|
|
17136
17136
|
e.root.addEventListener("mouseup", s), e.root.addEventListener("dragstart", s), e.root.addEventListener("mousemove", a);
|
|
17137
17137
|
}
|
|
17138
17138
|
function LU(e, t, n) {
|
|
17139
|
-
if (!(e.state.selection instanceof
|
|
17139
|
+
if (!(e.state.selection instanceof ut)) return null;
|
|
17140
17140
|
const { $head: r } = e.state.selection;
|
|
17141
17141
|
for (let o = r.depth - 1; o >= 0; o--) {
|
|
17142
17142
|
const i = r.node(o);
|
|
@@ -24974,7 +24974,7 @@ function U(e, t, n, r, o, i) {
|
|
|
24974
24974
|
replace: r
|
|
24975
24975
|
}, i && r && (jn[e][r] = jn[e][o]);
|
|
24976
24976
|
}
|
|
24977
|
-
var W = "math", $e = "text", Q = "main", ye = "ams", Pn = "accent-token",
|
|
24977
|
+
var W = "math", $e = "text", Q = "main", ye = "ams", Pn = "accent-token", ct = "bin", Uo = "close", Eh = "inner", Ft = "mathord", pr = "op-token", Ti = "open", fx = "punct", Fe = "rel", jl = "spacing", ke = "textord";
|
|
24978
24978
|
U(W, Q, Fe, "≡", "\\equiv", !0);
|
|
24979
24979
|
U(W, Q, Fe, "≺", "\\prec", !0);
|
|
24980
24980
|
U(W, Q, Fe, "≻", "\\succ", !0);
|
|
@@ -25035,18 +25035,18 @@ U(W, Q, Uo, "⎱", "\\rmoustache", !0);
|
|
|
25035
25035
|
U(W, Q, Ti, "⎰", "\\lmoustache", !0);
|
|
25036
25036
|
U(W, Q, Uo, "⟯", "\\rgroup", !0);
|
|
25037
25037
|
U(W, Q, Ti, "⟮", "\\lgroup", !0);
|
|
25038
|
-
U(W, Q,
|
|
25039
|
-
U(W, Q,
|
|
25040
|
-
U(W, Q,
|
|
25041
|
-
U(W, Q,
|
|
25042
|
-
U(W, Q,
|
|
25043
|
-
U(W, Q,
|
|
25044
|
-
U(W, Q,
|
|
25045
|
-
U(W, Q,
|
|
25046
|
-
U(W, Q,
|
|
25047
|
-
U(W, Q,
|
|
25048
|
-
U(W, Q,
|
|
25049
|
-
U(W, Q,
|
|
25038
|
+
U(W, Q, ct, "∓", "\\mp", !0);
|
|
25039
|
+
U(W, Q, ct, "⊖", "\\ominus", !0);
|
|
25040
|
+
U(W, Q, ct, "⊎", "\\uplus", !0);
|
|
25041
|
+
U(W, Q, ct, "⊓", "\\sqcap", !0);
|
|
25042
|
+
U(W, Q, ct, "∗", "\\ast");
|
|
25043
|
+
U(W, Q, ct, "⊔", "\\sqcup", !0);
|
|
25044
|
+
U(W, Q, ct, "◯", "\\bigcirc", !0);
|
|
25045
|
+
U(W, Q, ct, "∙", "\\bullet", !0);
|
|
25046
|
+
U(W, Q, ct, "‡", "\\ddagger");
|
|
25047
|
+
U(W, Q, ct, "≀", "\\wr", !0);
|
|
25048
|
+
U(W, Q, ct, "⨿", "\\amalg");
|
|
25049
|
+
U(W, Q, ct, "&", "\\And");
|
|
25050
25050
|
U(W, Q, Fe, "⟵", "\\longleftarrow", !0);
|
|
25051
25051
|
U(W, Q, Fe, "⇐", "\\Leftarrow", !0);
|
|
25052
25052
|
U(W, Q, Fe, "⟸", "\\Longleftarrow", !0);
|
|
@@ -25120,8 +25120,8 @@ U(W, ye, Fe, "⊮", "\\nVdash", !0);
|
|
|
25120
25120
|
U(W, ye, Fe, "⪵", "\\precneqq", !0);
|
|
25121
25121
|
U(W, ye, Fe, "⪶", "\\succneqq", !0);
|
|
25122
25122
|
U(W, ye, Fe, "", "\\@nsubseteqq");
|
|
25123
|
-
U(W, ye,
|
|
25124
|
-
U(W, ye,
|
|
25123
|
+
U(W, ye, ct, "⊴", "\\unlhd");
|
|
25124
|
+
U(W, ye, ct, "⊵", "\\unrhd");
|
|
25125
25125
|
U(W, ye, Fe, "↚", "\\nleftarrow", !0);
|
|
25126
25126
|
U(W, ye, Fe, "↛", "\\nrightarrow", !0);
|
|
25127
25127
|
U(W, ye, Fe, "⇍", "\\nLeftarrow", !0);
|
|
@@ -25174,7 +25174,7 @@ U(W, ye, Fe, "⪕", "\\eqslantless", !0);
|
|
|
25174
25174
|
U(W, ye, Fe, "≲", "\\lesssim", !0);
|
|
25175
25175
|
U(W, ye, Fe, "⪅", "\\lessapprox", !0);
|
|
25176
25176
|
U(W, ye, Fe, "≊", "\\approxeq", !0);
|
|
25177
|
-
U(W, ye,
|
|
25177
|
+
U(W, ye, ct, "⋖", "\\lessdot");
|
|
25178
25178
|
U(W, ye, Fe, "⋘", "\\lll", !0);
|
|
25179
25179
|
U(W, ye, Fe, "≶", "\\lessgtr", !0);
|
|
25180
25180
|
U(W, ye, Fe, "⋚", "\\lesseqgtr", !0);
|
|
@@ -25204,7 +25204,7 @@ U(W, ye, Fe, "⩾", "\\geqslant", !0);
|
|
|
25204
25204
|
U(W, ye, Fe, "⪖", "\\eqslantgtr", !0);
|
|
25205
25205
|
U(W, ye, Fe, "≳", "\\gtrsim", !0);
|
|
25206
25206
|
U(W, ye, Fe, "⪆", "\\gtrapprox", !0);
|
|
25207
|
-
U(W, ye,
|
|
25207
|
+
U(W, ye, ct, "⋗", "\\gtrdot");
|
|
25208
25208
|
U(W, ye, Fe, "⋙", "\\ggg", !0);
|
|
25209
25209
|
U(W, ye, Fe, "≷", "\\gtrless", !0);
|
|
25210
25210
|
U(W, ye, Fe, "⋛", "\\gtreqless", !0);
|
|
@@ -25236,32 +25236,32 @@ U(W, ye, Fe, "▶", "\\blacktriangleright");
|
|
|
25236
25236
|
U(W, ye, Fe, "∵", "\\because", !0);
|
|
25237
25237
|
U(W, ye, Fe, "⋘", "\\llless");
|
|
25238
25238
|
U(W, ye, Fe, "⋙", "\\gggtr");
|
|
25239
|
-
U(W, ye,
|
|
25240
|
-
U(W, ye,
|
|
25239
|
+
U(W, ye, ct, "⊲", "\\lhd");
|
|
25240
|
+
U(W, ye, ct, "⊳", "\\rhd");
|
|
25241
25241
|
U(W, ye, Fe, "≂", "\\eqsim", !0);
|
|
25242
25242
|
U(W, Q, Fe, "⋈", "\\Join");
|
|
25243
25243
|
U(W, ye, Fe, "≑", "\\Doteq", !0);
|
|
25244
|
-
U(W, ye,
|
|
25245
|
-
U(W, ye,
|
|
25246
|
-
U(W, ye,
|
|
25247
|
-
U(W, ye,
|
|
25248
|
-
U(W, ye,
|
|
25249
|
-
U(W, ye,
|
|
25250
|
-
U(W, ye,
|
|
25251
|
-
U(W, ye,
|
|
25252
|
-
U(W, ye,
|
|
25253
|
-
U(W, ye,
|
|
25254
|
-
U(W, ye,
|
|
25255
|
-
U(W, ye,
|
|
25256
|
-
U(W, ye,
|
|
25257
|
-
U(W, ye,
|
|
25258
|
-
U(W, ye,
|
|
25259
|
-
U(W, ye,
|
|
25260
|
-
U(W, ye,
|
|
25261
|
-
U(W, ye,
|
|
25262
|
-
U(W, ye,
|
|
25263
|
-
U(W, ye,
|
|
25264
|
-
U(W, ye,
|
|
25244
|
+
U(W, ye, ct, "∔", "\\dotplus", !0);
|
|
25245
|
+
U(W, ye, ct, "∖", "\\smallsetminus");
|
|
25246
|
+
U(W, ye, ct, "⋒", "\\Cap", !0);
|
|
25247
|
+
U(W, ye, ct, "⋓", "\\Cup", !0);
|
|
25248
|
+
U(W, ye, ct, "⩞", "\\doublebarwedge", !0);
|
|
25249
|
+
U(W, ye, ct, "⊟", "\\boxminus", !0);
|
|
25250
|
+
U(W, ye, ct, "⊞", "\\boxplus", !0);
|
|
25251
|
+
U(W, ye, ct, "⋇", "\\divideontimes", !0);
|
|
25252
|
+
U(W, ye, ct, "⋉", "\\ltimes", !0);
|
|
25253
|
+
U(W, ye, ct, "⋊", "\\rtimes", !0);
|
|
25254
|
+
U(W, ye, ct, "⋋", "\\leftthreetimes", !0);
|
|
25255
|
+
U(W, ye, ct, "⋌", "\\rightthreetimes", !0);
|
|
25256
|
+
U(W, ye, ct, "⋏", "\\curlywedge", !0);
|
|
25257
|
+
U(W, ye, ct, "⋎", "\\curlyvee", !0);
|
|
25258
|
+
U(W, ye, ct, "⊝", "\\circleddash", !0);
|
|
25259
|
+
U(W, ye, ct, "⊛", "\\circledast", !0);
|
|
25260
|
+
U(W, ye, ct, "⋅", "\\centerdot");
|
|
25261
|
+
U(W, ye, ct, "⊺", "\\intercal", !0);
|
|
25262
|
+
U(W, ye, ct, "⋒", "\\doublecap");
|
|
25263
|
+
U(W, ye, ct, "⋓", "\\doublecup");
|
|
25264
|
+
U(W, ye, ct, "⊠", "\\boxtimes", !0);
|
|
25265
25265
|
U(W, ye, Fe, "⇢", "\\dashrightarrow", !0);
|
|
25266
25266
|
U(W, ye, Fe, "⇠", "\\dashleftarrow", !0);
|
|
25267
25267
|
U(W, ye, Fe, "⇇", "\\leftleftarrows", !0);
|
|
@@ -25369,21 +25369,21 @@ U(W, Q, Ft, "ϖ", "\\varpi", !0);
|
|
|
25369
25369
|
U(W, Q, Ft, "ϱ", "\\varrho", !0);
|
|
25370
25370
|
U(W, Q, Ft, "ς", "\\varsigma", !0);
|
|
25371
25371
|
U(W, Q, Ft, "φ", "\\varphi", !0);
|
|
25372
|
-
U(W, Q,
|
|
25373
|
-
U(W, Q,
|
|
25374
|
-
U(W, Q,
|
|
25375
|
-
U(W, Q,
|
|
25376
|
-
U(W, Q,
|
|
25377
|
-
U(W, Q,
|
|
25378
|
-
U(W, Q,
|
|
25379
|
-
U(W, Q,
|
|
25380
|
-
U(W, Q,
|
|
25381
|
-
U(W, Q,
|
|
25382
|
-
U(W, Q,
|
|
25383
|
-
U(W, Q,
|
|
25384
|
-
U(W, Q,
|
|
25385
|
-
U(W, Q,
|
|
25386
|
-
U(W, Q,
|
|
25372
|
+
U(W, Q, ct, "∗", "*", !0);
|
|
25373
|
+
U(W, Q, ct, "+", "+");
|
|
25374
|
+
U(W, Q, ct, "−", "-", !0);
|
|
25375
|
+
U(W, Q, ct, "⋅", "\\cdot", !0);
|
|
25376
|
+
U(W, Q, ct, "∘", "\\circ", !0);
|
|
25377
|
+
U(W, Q, ct, "÷", "\\div", !0);
|
|
25378
|
+
U(W, Q, ct, "±", "\\pm", !0);
|
|
25379
|
+
U(W, Q, ct, "×", "\\times", !0);
|
|
25380
|
+
U(W, Q, ct, "∩", "\\cap", !0);
|
|
25381
|
+
U(W, Q, ct, "∪", "\\cup", !0);
|
|
25382
|
+
U(W, Q, ct, "∖", "\\setminus", !0);
|
|
25383
|
+
U(W, Q, ct, "∧", "\\land");
|
|
25384
|
+
U(W, Q, ct, "∨", "\\lor");
|
|
25385
|
+
U(W, Q, ct, "∧", "\\wedge", !0);
|
|
25386
|
+
U(W, Q, ct, "∨", "\\vee", !0);
|
|
25387
25387
|
U(W, Q, ke, "√", "\\surd");
|
|
25388
25388
|
U(W, Q, Ti, "⟨", "\\langle", !0);
|
|
25389
25389
|
U(W, Q, Ti, "∣", "\\lvert");
|
|
@@ -25429,22 +25429,22 @@ U(W, Q, jl, null, "\\nobreak");
|
|
|
25429
25429
|
U(W, Q, jl, null, "\\allowbreak");
|
|
25430
25430
|
U(W, Q, fx, ",", ",");
|
|
25431
25431
|
U(W, Q, fx, ";", ";");
|
|
25432
|
-
U(W, ye,
|
|
25433
|
-
U(W, ye,
|
|
25434
|
-
U(W, Q,
|
|
25435
|
-
U(W, Q,
|
|
25436
|
-
U(W, Q,
|
|
25432
|
+
U(W, ye, ct, "⊼", "\\barwedge", !0);
|
|
25433
|
+
U(W, ye, ct, "⊻", "\\veebar", !0);
|
|
25434
|
+
U(W, Q, ct, "⊙", "\\odot", !0);
|
|
25435
|
+
U(W, Q, ct, "⊕", "\\oplus", !0);
|
|
25436
|
+
U(W, Q, ct, "⊗", "\\otimes", !0);
|
|
25437
25437
|
U(W, Q, ke, "∂", "\\partial", !0);
|
|
25438
|
-
U(W, Q,
|
|
25439
|
-
U(W, ye,
|
|
25440
|
-
U(W, ye,
|
|
25441
|
-
U(W, Q,
|
|
25442
|
-
U(W, Q,
|
|
25443
|
-
U(W, Q,
|
|
25444
|
-
U(W, Q,
|
|
25445
|
-
U(W, Q,
|
|
25446
|
-
U(W, Q,
|
|
25447
|
-
U(W, Q,
|
|
25438
|
+
U(W, Q, ct, "⊘", "\\oslash", !0);
|
|
25439
|
+
U(W, ye, ct, "⊚", "\\circledcirc", !0);
|
|
25440
|
+
U(W, ye, ct, "⊡", "\\boxdot", !0);
|
|
25441
|
+
U(W, Q, ct, "△", "\\bigtriangleup");
|
|
25442
|
+
U(W, Q, ct, "▽", "\\bigtriangledown");
|
|
25443
|
+
U(W, Q, ct, "†", "\\dagger");
|
|
25444
|
+
U(W, Q, ct, "⋄", "\\diamond");
|
|
25445
|
+
U(W, Q, ct, "⋆", "\\star");
|
|
25446
|
+
U(W, Q, ct, "◃", "\\triangleleft");
|
|
25447
|
+
U(W, Q, ct, "▹", "\\triangleright");
|
|
25448
25448
|
U(W, Q, Ti, "{", "\\{");
|
|
25449
25449
|
U($e, Q, ke, "{", "\\{");
|
|
25450
25450
|
U($e, Q, ke, "{", "\\textbraceleft");
|
|
@@ -50115,7 +50115,7 @@ class Fb extends kt {
|
|
|
50115
50115
|
}
|
|
50116
50116
|
/// Create a node selection from non-resolved positions.
|
|
50117
50117
|
static create(n, r, o) {
|
|
50118
|
-
const i = n.resolve(r), s = n.resolve(o), a = new
|
|
50118
|
+
const i = n.resolve(r), s = n.resolve(o), a = new ut(i, s);
|
|
50119
50119
|
return new Fb(a);
|
|
50120
50120
|
}
|
|
50121
50121
|
getFirstNode() {
|
|
@@ -54232,11 +54232,11 @@ t.sv.get(e.id.client) > e.id.clock && !Sh(t.ds, e.id), Jye = [{ light: "#ecd4443
|
|
|
54232
54232
|
t.head,
|
|
54233
54233
|
n.mapping
|
|
54234
54234
|
);
|
|
54235
|
-
r !== null && o !== null && e.setSelection(
|
|
54235
|
+
r !== null && o !== null && e.setSelection(ut.between(e.doc.resolve(r), e.doc.resolve(o)));
|
|
54236
54236
|
}
|
|
54237
54237
|
}, nxe = (e, t) => {
|
|
54238
54238
|
const n = e.doc.resolve(t);
|
|
54239
|
-
return n.nodeAfter ? gt.create(e.doc, t) :
|
|
54239
|
+
return n.nodeAfter ? gt.create(e.doc, t) : ut.near(n);
|
|
54240
54240
|
}, Lw = (e, t) => ({
|
|
54241
54241
|
type: (
|
|
54242
54242
|
/** @type {any} */
|
|
@@ -54331,7 +54331,7 @@ class rxe {
|
|
|
54331
54331
|
);
|
|
54332
54332
|
if (t) {
|
|
54333
54333
|
const o = dl(Ts(t.anchor, 0), r.doc.content.size), i = dl(Ts(t.head, 0), r.doc.content.size);
|
|
54334
|
-
r.setSelection(
|
|
54334
|
+
r.setSelection(ut.create(r.doc, o, i));
|
|
54335
54335
|
}
|
|
54336
54336
|
this.prosemirrorView.dispatch(
|
|
54337
54337
|
r.setMeta($n, { isChangeOrigin: !0, binding: this })
|
|
@@ -55487,7 +55487,7 @@ ${n}
|
|
|
55487
55487
|
let v = c;
|
|
55488
55488
|
for (let w = 0; w < f; w += 1)
|
|
55489
55489
|
v += h[w].length + 1;
|
|
55490
|
-
return a.delete(v, v + x), u - v <= x && a.setSelection(
|
|
55490
|
+
return a.delete(v, v + x), u - v <= x && a.setSelection(ut.create(a.doc, v)), !0;
|
|
55491
55491
|
}) : e.commands.command(({ tr: a }) => {
|
|
55492
55492
|
const { from: l, to: u } = o, p = r.doc.textBetween(l, u, `
|
|
55493
55493
|
`, `
|
|
@@ -55558,7 +55558,7 @@ ${n}
|
|
|
55558
55558
|
return !1;
|
|
55559
55559
|
const { tr: s, schema: a } = e.state, l = a.text(n.replace(/\r\n?/g, `
|
|
55560
55560
|
`));
|
|
55561
|
-
return s.replaceSelectionWith(this.type.create({ language: i }, l)), s.selection.$from.parent.type !== this.type && s.setSelection(
|
|
55561
|
+
return s.replaceSelectionWith(this.type.create({ language: i }, l)), s.selection.$from.parent.type !== this.type && s.setSelection(ut.near(s.doc.resolve(Math.max(0, s.selection.from - 2)))), s.setMeta("paste", !0), e.dispatch(s), !0;
|
|
55562
55562
|
}
|
|
55563
55563
|
}
|
|
55564
55564
|
})
|
|
@@ -55713,10 +55713,10 @@ ${n}
|
|
|
55713
55713
|
if (a) {
|
|
55714
55714
|
const { $to: l } = s.selection, u = l.end();
|
|
55715
55715
|
if (l.nodeAfter)
|
|
55716
|
-
l.nodeAfter.isTextblock ? s.setSelection(
|
|
55716
|
+
l.nodeAfter.isTextblock ? s.setSelection(ut.create(s.doc, l.pos + 1)) : l.nodeAfter.isBlock ? s.setSelection(gt.create(s.doc, l.pos)) : s.setSelection(ut.create(s.doc, l.pos));
|
|
55717
55717
|
else {
|
|
55718
55718
|
const c = i.schema.nodes[this.options.nextNodeType] || l.parent.type.contentMatch.defaultType, d = c == null ? void 0 : c.create();
|
|
55719
|
-
d && (s.insert(u, d), s.setSelection(
|
|
55719
|
+
d && (s.insert(u, d), s.setSelection(ut.create(s.doc, u + 1)));
|
|
55720
55720
|
}
|
|
55721
55721
|
s.scrollIntoView();
|
|
55722
55722
|
}
|
|
@@ -57893,7 +57893,7 @@ function hm(e, t) {
|
|
|
57893
57893
|
const n = e == "vert" ? t > 0 ? "down" : "up" : t > 0 ? "right" : "left";
|
|
57894
57894
|
return function(r, o, i) {
|
|
57895
57895
|
let s = r.selection, a = t > 0 ? s.$to : s.$from, l = s.empty;
|
|
57896
|
-
if (s instanceof
|
|
57896
|
+
if (s instanceof ut) {
|
|
57897
57897
|
if (!i.endOfTextblock(n) || a.depth == 0)
|
|
57898
57898
|
return !1;
|
|
57899
57899
|
l = !1, a = r.doc.resolve(t > 0 ? a.after() : a.before());
|
|
@@ -57921,7 +57921,7 @@ function z3e(e, t) {
|
|
|
57921
57921
|
for (let s = r.length - 1; s >= 0; s--)
|
|
57922
57922
|
o = Re.from(r[s].createAndFill(null, o));
|
|
57923
57923
|
let i = e.state.tr.replace(n.pos, n.pos, new rt(o, 0, 0));
|
|
57924
|
-
return i.setSelection(
|
|
57924
|
+
return i.setSelection(ut.near(i.doc.resolve(n.pos + 1))), e.dispatch(i), !1;
|
|
57925
57925
|
}
|
|
57926
57926
|
function $3e(e) {
|
|
57927
57927
|
if (!(e.selection instanceof Xn))
|
|
@@ -65457,7 +65457,7 @@ const Sq = St.create({
|
|
|
65457
65457
|
const _ = (k = o.slice(n, L)) == null ? void 0 : k.toJSON().content;
|
|
65458
65458
|
try {
|
|
65459
65459
|
if (B === "codeBlock")
|
|
65460
|
-
return
|
|
65460
|
+
return !1;
|
|
65461
65461
|
if (["columns", "heading"].includes(B) && p) {
|
|
65462
65462
|
const T = (a == null ? void 0 : a.fontFamily) || ((w = l == null ? void 0 : l.attrs) == null ? void 0 : w.fontFamily) || null, R = (a == null ? void 0 : a.fontSize) || ((D = l == null ? void 0 : l.attrs) == null ? void 0 : D.fontSize) || null;
|
|
65463
65463
|
return e.chain().insertContent({
|
|
@@ -65574,7 +65574,7 @@ const Sq = St.create({
|
|
|
65574
65574
|
);
|
|
65575
65575
|
const S = C + 4;
|
|
65576
65576
|
j.setSelection(
|
|
65577
|
-
|
|
65577
|
+
ut.create(j.doc, S)
|
|
65578
65578
|
);
|
|
65579
65579
|
}
|
|
65580
65580
|
return !1;
|
|
@@ -65659,7 +65659,7 @@ const Sq = St.create({
|
|
|
65659
65659
|
});
|
|
65660
65660
|
I = $ + P.nodeSize + 2;
|
|
65661
65661
|
}
|
|
65662
|
-
return T.setSelection(
|
|
65662
|
+
return T.setSelection(ut.create(T.doc, I)), S.dispatch(T), !0;
|
|
65663
65663
|
}
|
|
65664
65664
|
if (l) {
|
|
65665
65665
|
let D = !1;
|
|
@@ -65719,7 +65719,7 @@ const Sq = St.create({
|
|
|
65719
65719
|
}
|
|
65720
65720
|
]
|
|
65721
65721
|
}), I = S + H.nodeSize + 3;
|
|
65722
|
-
return j.setSelection(
|
|
65722
|
+
return j.setSelection(ut.create(j.doc, I)), _.dispatch(j), !0;
|
|
65723
65723
|
}
|
|
65724
65724
|
}
|
|
65725
65725
|
return !1;
|
|
@@ -65930,7 +65930,7 @@ const a5e = St.create({
|
|
|
65930
65930
|
const { selection: s } = r, a = o5e(i.schema, e, t, n);
|
|
65931
65931
|
if (o) {
|
|
65932
65932
|
const l = r.selection.anchor + 1;
|
|
65933
|
-
r.replaceRangeWith(s.from - 1, s.to, a).scrollIntoView().setSelection(
|
|
65933
|
+
r.replaceRangeWith(s.from - 1, s.to, a).scrollIntoView().setSelection(ut.near(r.doc.resolve(l)));
|
|
65934
65934
|
}
|
|
65935
65935
|
return !0;
|
|
65936
65936
|
},
|
|
@@ -94627,15 +94627,54 @@ const PRe = [
|
|
|
94627
94627
|
{ label: "CSS", value: "css" },
|
|
94628
94628
|
{ label: "JavaScript", value: "js" },
|
|
94629
94629
|
{ label: "TypeScript", value: "ts" },
|
|
94630
|
+
{ label: "JSX", value: "jsx" },
|
|
94631
|
+
{ label: "TSX", value: "tsx" },
|
|
94630
94632
|
{ label: "JSON", value: "json" },
|
|
94631
94633
|
{ label: "Markdown", value: "md" }
|
|
94632
94634
|
]
|
|
94633
94635
|
},
|
|
94636
|
+
{
|
|
94637
|
+
label: "Systems",
|
|
94638
|
+
options: [
|
|
94639
|
+
{ label: "C", value: "c" },
|
|
94640
|
+
{ label: "C++", value: "cpp" },
|
|
94641
|
+
{ label: "Rust", value: "rust" },
|
|
94642
|
+
{ label: "Go", value: "go" }
|
|
94643
|
+
]
|
|
94644
|
+
},
|
|
94634
94645
|
{
|
|
94635
94646
|
label: "Scripting",
|
|
94636
94647
|
options: [
|
|
94637
94648
|
{ label: "Python", value: "python" },
|
|
94638
|
-
{ label: "Bash", value: "bash" }
|
|
94649
|
+
{ label: "Bash", value: "bash" },
|
|
94650
|
+
{ label: "Ruby", value: "ruby" },
|
|
94651
|
+
{ label: "PHP", value: "php" }
|
|
94652
|
+
]
|
|
94653
|
+
},
|
|
94654
|
+
{
|
|
94655
|
+
label: "Data",
|
|
94656
|
+
options: [
|
|
94657
|
+
{ label: "SQL", value: "sql" },
|
|
94658
|
+
{ label: "YAML", value: "yaml" },
|
|
94659
|
+
{ label: "XML", value: "xml" }
|
|
94660
|
+
]
|
|
94661
|
+
},
|
|
94662
|
+
{
|
|
94663
|
+
label: "Build",
|
|
94664
|
+
options: [{ label: "Makefile", value: "makefile" }]
|
|
94665
|
+
},
|
|
94666
|
+
{
|
|
94667
|
+
label: "JVM",
|
|
94668
|
+
options: [
|
|
94669
|
+
{ label: "Java", value: "java" },
|
|
94670
|
+
{ label: "Kotlin", value: "kotlin" }
|
|
94671
|
+
]
|
|
94672
|
+
},
|
|
94673
|
+
{
|
|
94674
|
+
label: "Apple",
|
|
94675
|
+
options: [
|
|
94676
|
+
{ label: "Swift", value: "swift" },
|
|
94677
|
+
{ label: "Objective-C", value: "objectivec" }
|
|
94639
94678
|
]
|
|
94640
94679
|
},
|
|
94641
94680
|
{
|
|
@@ -94711,25 +94750,18 @@ function $Re({
|
|
|
94711
94750
|
/* @__PURE__ */ F.jsx(N2, { placeholder: "Select language" }),
|
|
94712
94751
|
/* @__PURE__ */ F.jsx("span", { className: "w-1" })
|
|
94713
94752
|
] }) }),
|
|
94714
|
-
/* @__PURE__ */ F.jsx(
|
|
94715
|
-
|
|
94716
|
-
|
|
94717
|
-
|
|
94718
|
-
|
|
94719
|
-
|
|
94720
|
-
|
|
94721
|
-
|
|
94722
|
-
|
|
94723
|
-
|
|
94724
|
-
|
|
94725
|
-
|
|
94726
|
-
children: x.label
|
|
94727
|
-
},
|
|
94728
|
-
x.value
|
|
94729
|
-
))
|
|
94730
|
-
] }, y.label))
|
|
94731
|
-
}
|
|
94732
|
-
)
|
|
94753
|
+
/* @__PURE__ */ F.jsx(x0, { className: "min-w-fit", showScrollButtons: !1, children: PRe.map((y) => /* @__PURE__ */ F.jsxs(KR, { children: [
|
|
94754
|
+
/* @__PURE__ */ F.jsx(yee, { children: y.label }),
|
|
94755
|
+
y.options.map((x) => /* @__PURE__ */ F.jsx(
|
|
94756
|
+
v0,
|
|
94757
|
+
{
|
|
94758
|
+
value: x.value,
|
|
94759
|
+
className: "text-helper-text-sm",
|
|
94760
|
+
children: x.label
|
|
94761
|
+
},
|
|
94762
|
+
x.value
|
|
94763
|
+
))
|
|
94764
|
+
] }, y.label)) })
|
|
94733
94765
|
]
|
|
94734
94766
|
}
|
|
94735
94767
|
),
|
|
@@ -94991,7 +95023,7 @@ const HRe = URe.extend({
|
|
|
94991
95023
|
t.schema.text(g)
|
|
94992
95024
|
);
|
|
94993
95025
|
const m = r.pos + a, b = o.pos + a;
|
|
94994
|
-
return e.setSelection(
|
|
95026
|
+
return e.setSelection(ut.create(e.doc, m, b)), !0;
|
|
94995
95027
|
}) : !1,
|
|
94996
95028
|
"Shift-Tab": () => this.editor.isActive("codeBlock") ? this.editor.commands.command(({ tr: e, state: t }) => {
|
|
94997
95029
|
var y, x;
|
|
@@ -95023,14 +95055,41 @@ const HRe = URe.extend({
|
|
|
95023
95055
|
t.schema.text(g)
|
|
95024
95056
|
);
|
|
95025
95057
|
const m = r.pos - a, b = o.pos - a;
|
|
95026
|
-
return e.setSelection(
|
|
95058
|
+
return e.setSelection(ut.create(e.doc, m, b)), !0;
|
|
95027
95059
|
}) : !1,
|
|
95060
|
+
Enter: () => {
|
|
95061
|
+
if (!this.editor.isActive("codeBlock")) return !1;
|
|
95062
|
+
const e = this.editor, { state: t } = e, { selection: n } = t, { $from: r, empty: o } = n;
|
|
95063
|
+
if (!o || r.parent.type.name !== "codeBlock") return !1;
|
|
95064
|
+
const i = r.parentOffset === r.parent.nodeSize - 2, s = r.parent.textContent.endsWith(`
|
|
95065
|
+
|
|
95066
|
+
`);
|
|
95067
|
+
return i && s ? e.chain().command(({ tr: a, dispatch: l }) => (l && a.delete(r.pos - 2, r.pos), !0)).command(({ tr: a, state: l, dispatch: u }) => {
|
|
95068
|
+
const { $from: c } = l.selection;
|
|
95069
|
+
let d = -1;
|
|
95070
|
+
for (let m = c.depth; m >= 0; m--)
|
|
95071
|
+
if (c.node(m).type.name === "dBlock") {
|
|
95072
|
+
d = m;
|
|
95073
|
+
break;
|
|
95074
|
+
}
|
|
95075
|
+
if (d === -1) return !1;
|
|
95076
|
+
const p = c.after(d), h = l.schema.nodes.dBlock, f = l.schema.nodes.paragraph;
|
|
95077
|
+
if (!h || !f) return !1;
|
|
95078
|
+
const g = h.create(
|
|
95079
|
+
null,
|
|
95080
|
+
f.create()
|
|
95081
|
+
);
|
|
95082
|
+
return u && (a.insert(p, g), a.setSelection(
|
|
95083
|
+
ut.create(a.doc, p + 2)
|
|
95084
|
+
)), !0;
|
|
95085
|
+
}).focus().run() : e.commands.newlineInCode();
|
|
95086
|
+
},
|
|
95028
95087
|
Backspace: () => this.editor.isActive("codeBlock") ? this.editor.commands.command(({ tr: e, state: t }) => {
|
|
95029
95088
|
const { selection: n } = t, { $from: r, empty: o } = n, i = r.before(), s = t.doc.nodeAt(i);
|
|
95030
95089
|
if (!s || s.type.name !== "codeBlock")
|
|
95031
95090
|
return !1;
|
|
95032
95091
|
const a = s.textContent.length, l = i + 1, u = l + a;
|
|
95033
|
-
return !o && n.from === l && n.to === u ? (e.replaceWith(l, u, t.schema.text("")), e.setSelection(
|
|
95092
|
+
return !o && n.from === l && n.to === u ? (e.replaceWith(l, u, t.schema.text("")), e.setSelection(ut.create(e.doc, l)), !0) : !1;
|
|
95034
95093
|
}) : !1
|
|
95035
95094
|
};
|
|
95036
95095
|
}
|
|
@@ -170550,7 +170609,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170550
170609
|
if (he !== void 0) {
|
|
170551
170610
|
ae.delete(he, he + e.nodeSize);
|
|
170552
170611
|
const me = ae.doc.resolve(he);
|
|
170553
|
-
ae.setSelection(
|
|
170612
|
+
ae.setSelection(ut.near(me));
|
|
170554
170613
|
} else
|
|
170555
170614
|
o();
|
|
170556
170615
|
}
|
|
@@ -170569,7 +170628,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170569
170628
|
if (he !== void 0) {
|
|
170570
170629
|
ae.delete(he, he + e.nodeSize);
|
|
170571
170630
|
const me = ae.doc.resolve(he);
|
|
170572
|
-
ae.setSelection(
|
|
170631
|
+
ae.setSelection(ut.near(me));
|
|
170573
170632
|
} else
|
|
170574
170633
|
o();
|
|
170575
170634
|
}
|
|
@@ -171368,7 +171427,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
171368
171427
|
), Xe = mt == null ? void 0 : mt.split("-").slice(0, -1).join("-");
|
|
171369
171428
|
qe !== Xe && (We.set("heading", `${qe}-${Ae}`), window.location.hash = We.toString());
|
|
171370
171429
|
const dt = he.view.posAtDOM(Je, 0), Ve = he.view.state.tr;
|
|
171371
|
-
Ve.setSelection(new
|
|
171430
|
+
Ve.setSelection(new ut(Ve.doc.resolve(dt))), he.view.dispatch(Ve);
|
|
171372
171431
|
const bt = Vf({
|
|
171373
171432
|
targetElement: Je,
|
|
171374
171433
|
editorRoot: he.view.dom
|
|
@@ -183379,7 +183438,7 @@ const OQ = M1(
|
|
|
183379
183438
|
return;
|
|
183380
183439
|
const k = setTimeout(() => {
|
|
183381
183440
|
const w = t.view.posAtDOM(v, 0), D = t.view.state.tr;
|
|
183382
|
-
D.setSelection(new
|
|
183441
|
+
D.setSelection(new ut(D.doc.resolve(w))), t.view.dispatch(D);
|
|
183383
183442
|
const C = Vf({
|
|
183384
183443
|
targetElement: v,
|
|
183385
183444
|
editorRoot: t.view.dom
|